| | |
| | | <a-menu-item v-if="data.editorType !== 0" @click="openTemplateCreate(data.shareStatus !== undefined)"> |
| | | <IconParkPageTemplate/> 设为模板 |
| | | </a-menu-item> |
| | | <a-menu-item @click="deleteWikiPage(data.shareStatus)"> |
| | | <a-menu-item @click="deleteWikiPage(data)"> |
| | | <IconParkDelete class="el-icon"/> 删除 |
| | | </a-menu-item> |
| | | </a-menu> |
| | |
| | | } |
| | | |
| | | |
| | | const deleteWikiPage = (share) => { |
| | | const deleteWikiPage = (data) => { |
| | | let msg = '确定要删除此页面及其所有子页面吗?' |
| | | if (share !== undefined) { |
| | | msg = '选中的页面是:' + filterShareStatus(share) + '删除后无法使用此模板! 确定要删除此页面及其所有子页面吗?' |
| | | if (data !== undefined) { |
| | | msg = '选中的页面是:' + filterShareStatus(data) + '删除后无法使用此模板! 确定要删除此页面及其所有子页面吗?' |
| | | } |
| | | ElMessageBox.confirm(msg, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | let param = {pageId: optionPageId.value}; |
| | | // let param = {pageId: optionPageId.value}; |
| | | let param = {pageId: data.id}; |
| | | pageApi.pageDelete(param).then(() => { |
| | | ElMessage.success('已删除') |
| | | doGetPageList(null) |
| | |
| | | } |
| | | |
| | | const rename = (node, data) => { |
| | | console.log(data) |
| | | data.renaming = true |
| | | } |
| | | const doRename = (node, data) => { |
文件名从 iailab-doc-wiki/src/main/resources/dist/assets/main-4e713bb9.js 修改 |
| | |
| | | m 0 ${C?"":"-"}${b} |
| | | a ${b} ${b} 0 1 1 0 ${C?"-":""}${b*2} |
| | | a ${b} ${b} 0 1 1 0 ${C?"":"-"}${b*2} |
| | | `}),u=S(()=>2*Math.PI*r.value),c=S(()=>t.type==="dashboard"?.75:1),f=S(()=>`${-1*u.value*(1-c.value)/2}px`),d=S(()=>({strokeDasharray:`${u.value*c.value}px, ${u.value}px`,strokeDashoffset:f.value})),p=S(()=>({strokeDasharray:`${u.value*c.value*(t.percentage/100)}px, ${u.value}px`,strokeDashoffset:f.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),m=S(()=>{let b;return t.color?b=k(t.percentage):b=n[t.status]||n.default,b}),h=S(()=>t.status==="warning"?Da:t.type==="line"?t.status==="success"?Ba:Zn:t.status==="success"?no:Sn),v=S(()=>t.type==="line"?12+t.strokeWidth*.4:t.width*.111111+2),g=S(()=>t.format(t.percentage));function y(b){const C=100/b.length;return b.map((T,M)=>ct(T)?{color:T,percentage:(M+1)*C}:T).sort((T,M)=>T.percentage-M.percentage)}const k=b=>{var C;const{color:I}=t;if(kt(I))return I(b);if(ct(I))return I;{const T=y(I);for(const M of T)if(M.percentage>b)return M.color;return(C=T[T.length-1])==null?void 0:C.color}};return(b,C)=>(w(),O("div",{class:$([o(l).b(),o(l).m(b.type),o(l).is(b.status),{[o(l).m("without-text")]:!b.showText,[o(l).m("text-inside")]:b.textInside}]),role:"progressbar","aria-valuenow":b.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[b.type==="line"?(w(),O("div",{key:0,class:$(o(l).b("bar"))},[R("div",{class:$(o(l).be("bar","outer")),style:Re({height:`${b.strokeWidth}px`})},[R("div",{class:$([o(l).be("bar","inner"),{[o(l).bem("bar","inner","indeterminate")]:b.indeterminate},{[o(l).bem("bar","inner","striped")]:b.striped},{[o(l).bem("bar","inner","striped-flow")]:b.stripedFlow}]),style:Re(o(a))},[(b.showText||b.$slots.default)&&b.textInside?(w(),O("div",{key:0,class:$(o(l).be("bar","innerText"))},[ie(b.$slots,"default",{percentage:b.percentage},()=>[R("span",null,ae(o(g)),1)])],2)):Z("v-if",!0)],6)],6)],2)):(w(),O("div",{key:1,class:$(o(l).b("circle")),style:Re({height:`${b.width}px`,width:`${b.width}px`})},[(w(),O("svg",F$,[R("path",{class:$(o(l).be("circle","track")),d:o(i),stroke:`var(${o(l).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-width":o(s),fill:"none",style:Re(o(d))},null,14,z$),R("path",{class:$(o(l).be("circle","path")),d:o(i),stroke:o(m),fill:"none",opacity:b.percentage?1:0,"stroke-linecap":b.strokeLinecap,"stroke-width":o(s),style:Re(o(p))},null,14,H$)]))],6)),(b.showText||b.$slots.default)&&!b.textInside?(w(),O("div",{key:2,class:$(o(l).e("text")),style:Re({fontSize:`${o(v)}px`})},[ie(b.$slots,"default",{percentage:b.percentage},()=>[b.status?(w(),G(o(Pe),{key:1},{default:N(()=>[(w(),G(rt(o(h))))]),_:1})):(w(),O("span",K$,ae(o(g)),1))])],6)):Z("v-if",!0)],10,x$))}});var j$=he(U$,[["__file","/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]);const vf=Qe(j$),q$=ge({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:te([Array,Object]),default:()=>Ot(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:te([Array,Object]),default:()=>[vo,vo,vo]},voidIcon:{type:Pt,default:()=>ec},disabledVoidIcon:{type:Pt,default:()=>vo},disabled:Boolean,allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:te(Array),default:()=>Ot(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:ln,label:{type:String,default:void 0},clearable:{type:Boolean,default:!1}}),G$={[Mt]:e=>He(e),[tt]:e=>He(e)},Y$=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"],X$=["onMousemove","onClick"],Z$=j({name:"ElRate"}),J$=j({...Z$,props:q$,emits:G$,setup(e,{expose:t,emit:n}){const l=e;function a(K,V){const W=Y=>It(Y),P=Object.keys(V).map(Y=>+Y).filter(Y=>{const z=V[Y];return(W(z)?z.excluded:!1)?K<Y:K<=Y}).sort((Y,z)=>Y-z),H=V[P[0]];return W(H)&&H.value||H}const s=Me(Ml,void 0),r=Me(zn,void 0),i=qt(),u=ce("rate"),{inputId:c,isLabeledByFormItem:f}=cl(l,{formItemContext:r}),d=_(l.modelValue),p=_(-1),m=_(!0),h=S(()=>[u.b(),u.m(i.value)]),v=S(()=>l.disabled||(s==null?void 0:s.disabled)),g=S(()=>u.cssVarBlock({"void-color":l.voidColor,"disabled-void-color":l.disabledVoidColor,"fill-color":C.value})),y=S(()=>{let K="";return l.showScore?K=l.scoreTemplate.replace(/\{\s*value\s*\}/,v.value?`${l.modelValue}`:`${d.value}`):l.showText&&(K=l.texts[Math.ceil(d.value)-1]),K}),k=S(()=>l.modelValue*100-Math.floor(l.modelValue)*100),b=S(()=>et(l.colors)?{[l.lowThreshold]:l.colors[0],[l.highThreshold]:{value:l.colors[1],excluded:!0},[l.max]:l.colors[2]}:l.colors),C=S(()=>{const K=a(d.value,b.value);return It(K)?"":K}),I=S(()=>{let K="";return v.value?K=`${k.value}%`:l.allowHalf&&(K="50%"),{color:C.value,width:K}}),T=S(()=>{let K=et(l.icons)?[...l.icons]:{...l.icons};return K=ho(K),et(K)?{[l.lowThreshold]:K[0],[l.highThreshold]:{value:K[1],excluded:!0},[l.max]:K[2]}:K}),M=S(()=>a(l.modelValue,T.value)),L=S(()=>v.value?ct(l.disabledVoidIcon)?l.disabledVoidIcon:ho(l.disabledVoidIcon):ct(l.voidIcon)?l.voidIcon:ho(l.voidIcon)),A=S(()=>a(d.value,T.value));function D(K){const V=v.value&&k.value>0&&K-1<l.modelValue&&K>l.modelValue,W=l.allowHalf&&m.value&&K-.5<=d.value&&K>d.value;return V||W}function B(K){l.clearable&&K===l.modelValue&&(K=0),n(tt,K),l.modelValue!==K&&n("change",K)}function F(K){v.value||(l.allowHalf&&m.value?B(d.value):B(K))}function x(K){if(v.value)return;let V=d.value;const W=K.code;return W===Ae.up||W===Ae.right?(l.allowHalf?V+=.5:V+=1,K.stopPropagation(),K.preventDefault()):(W===Ae.left||W===Ae.down)&&(l.allowHalf?V-=.5:V-=1,K.stopPropagation(),K.preventDefault()),V=V<0?0:V,V=V>l.max?l.max:V,n(tt,V),n("change",V),V}function U(K,V){if(!v.value){if(l.allowHalf&&V){let W=V.target;Mn(W,u.e("item"))&&(W=W.querySelector(`.${u.e("icon")}`)),(W.clientWidth===0||Mn(W,u.e("decimal")))&&(W=W.parentNode),m.value=V.offsetX*2<=W.clientWidth,d.value=m.value?K-.5:K}else d.value=K;p.value=K}}function X(){v.value||(l.allowHalf&&(m.value=l.modelValue!==Math.floor(l.modelValue)),d.value=l.modelValue,p.value=-1)}return ue(()=>l.modelValue,K=>{d.value=K,m.value=l.modelValue!==Math.floor(l.modelValue)}),l.modelValue||n(tt,0),t({setCurrentValue:U,resetCurrentValue:X}),(K,V)=>{var W;return w(),O("div",{id:o(c),class:$([o(h),o(u).is("disabled",o(v))]),role:"slider","aria-label":o(f)?void 0:K.label||"rating","aria-labelledby":o(f)?(W=o(r))==null?void 0:W.labelId:void 0,"aria-valuenow":d.value,"aria-valuetext":o(y)||void 0,"aria-valuemin":"0","aria-valuemax":K.max,tabindex:"0",style:Re(o(g)),onKeydown:x},[(w(!0),O(Ne,null,Ze(K.max,(P,H)=>(w(),O("span",{key:H,class:$(o(u).e("item")),onMousemove:Y=>U(P,Y),onMouseleave:X,onClick:Y=>F(P)},[E(o(Pe),{class:$([o(u).e("icon"),{hover:p.value===P},o(u).is("active",P<=d.value)])},{default:N(()=>[D(P)?Z("v-if",!0):(w(),O(Ne,{key:0},[xe((w(),G(rt(o(A)),null,null,512)),[[lt,P<=d.value]]),xe((w(),G(rt(o(L)),null,null,512)),[[lt,!(P<=d.value)]])],64)),D(P)?(w(),G(o(Pe),{key:1,style:Re(o(I)),class:$([o(u).e("icon"),o(u).e("decimal")])},{default:N(()=>[(w(),G(rt(o(M))))]),_:1},8,["style","class"])):Z("v-if",!0)]),_:2},1032,["class"])],42,X$))),128)),K.showText||K.showScore?(w(),O("span",{key:0,class:$(o(u).e("text"))},ae(o(y)),3)):Z("v-if",!0)],46,Y$)}}});var Q$=he(J$,[["__file","/home/runner/work/element-plus/element-plus/packages/components/rate/src/rate.vue"]]);const eT=Qe(Q$),Fl={success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},au={[Fl.success]:wv,[Fl.warning]:Da,[Fl.error]:vr,[Fl.info]:mr},tT=ge({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["success","warning","info","error"],default:"info"}}),nT=j({name:"ElResult"}),lT=j({...nT,props:tT,setup(e){const t=e,n=ce("result"),l=S(()=>{const a=t.icon,s=a&&Fl[a]?Fl[a]:"icon-info",r=au[s]||au["icon-info"];return{class:s,component:r}});return(a,s)=>(w(),O("div",{class:$(o(n).b())},[R("div",{class:$(o(n).e("icon"))},[ie(a.$slots,"icon",{},()=>[o(l).component?(w(),G(rt(o(l).component),{key:0,class:$(o(l).class)},null,8,["class"])):Z("v-if",!0)])],2),a.title||a.$slots.title?(w(),O("div",{key:0,class:$(o(n).e("title"))},[ie(a.$slots,"title",{},()=>[R("p",null,ae(a.title),1)])],2)):Z("v-if",!0),a.subTitle||a.$slots["sub-title"]?(w(),O("div",{key:1,class:$(o(n).e("subtitle"))},[ie(a.$slots,"sub-title",{},()=>[R("p",null,ae(a.subTitle),1)])],2)):Z("v-if",!0),a.$slots.extra?(w(),O("div",{key:2,class:$(o(n).e("extra"))},[ie(a.$slots,"extra")],2)):Z("v-if",!0)],2))}});var oT=he(lT,[["__file","/home/runner/work/element-plus/element-plus/packages/components/result/src/result.vue"]]);const aT=Qe(oT),mf=()=>{const t=at().proxy.$props;return S(()=>{const n=(l,a,s)=>({});return t.perfMode?kv(n):Cv(n)})},xs=50,Ia="itemRendered",Na="scroll",zl="forward",Pa="backward",kn="auto",ns="smart",$o="start",Bn="center",To="end",Jl="horizontal",Ur="vertical",sT="ltr",Ul="rtl",Io="negative",jr="positive-ascending",qr="positive-descending",rT={[Jl]:"left",[Ur]:"top"},iT=20,uT={[Jl]:"deltaX",[Ur]:"deltaY"},cT=({atEndEdge:e,atStartEdge:t,layout:n},l)=>{let a,s=0;const r=u=>u<0&&t.value||u>0&&e.value;return{hasReachedEdge:r,onWheel:u=>{qa(a);const c=u[uT[n.value]];r(s)&&r(s+c)||(s+=c,fc()||u.preventDefault(),a=Co(()=>{l(s),s=0}))}}},Fs=Ln({type:te([Number,Function]),required:!0}),zs=Ln({type:Number}),Hs=Ln({type:Number,default:2}),dT=Ln({type:String,values:["ltr","rtl"],default:"ltr"}),Ks=Ln({type:Number,default:0}),Ma=Ln({type:Number,required:!0}),hf=Ln({type:String,values:["horizontal","vertical"],default:Ur}),gf=ge({className:{type:String,default:""},containerElement:{type:te([String,Object]),default:"div"},data:{type:te(Array),default:()=>Ot([])},direction:dT,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:te([Object,String,Array])},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),yf=ge({cache:Hs,estimatedItemSize:zs,layout:hf,initScrollOffset:Ks,total:Ma,itemSize:Fs,...gf}),Ws={type:Number,default:6},bf={type:Number,default:0},wf={type:Number,default:2},kl=ge({columnCache:Hs,columnWidth:Fs,estimatedColumnWidth:zs,estimatedRowHeight:zs,initScrollLeft:Ks,initScrollTop:Ks,itemKey:{type:te(Function),default:({columnIndex:e,rowIndex:t})=>`${t}:${e}`},rowCache:Hs,rowHeight:Fs,totalColumn:Ma,totalRow:Ma,hScrollbarSize:Ws,vScrollbarSize:Ws,scrollbarStartGap:bf,scrollbarEndGap:wf,role:String,...gf}),kf=ge({alwaysOn:Boolean,class:String,layout:hf,total:Ma,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:Ws,startGap:bf,endGap:wf,visible:Boolean}),gl=(e,t)=>e<t?zl:Pa,No=e=>e===sT||e===Ul||e===Jl,su=e=>e===Ul;let Rl=null;function La(e=!1){if(Rl===null||e){const t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";const l=document.createElement("div"),a=l.style;return a.width="100px",a.height="100px",t.appendChild(l),document.body.appendChild(t),t.scrollLeft>0?Rl=qr:(t.scrollLeft=1,t.scrollLeft===0?Rl=Io:Rl=jr),document.body.removeChild(t),Rl}return Rl}function fT({move:e,size:t,bar:n},l){const a={},s=`translate${n.axis}(${e}px)`;return a[n.size]=t,a.transform=s,a.msTransform=s,a.webkitTransform=s,l==="horizontal"?a.height="100%":a.width="100%",a}const Us=j({name:"ElVirtualScrollBar",props:kf,emits:["scroll","start-move","stop-move"],setup(e,{emit:t}){const n=S(()=>e.startGap+e.endGap),l=ce("virtual-scrollbar"),a=ce("scrollbar"),s=_(),r=_();let i=null,u=null;const c=St({isDragging:!1,traveled:0}),f=S(()=>Dc[e.layout]),d=S(()=>e.clientSize-o(n)),p=S(()=>({position:"absolute",width:`${Jl===e.layout?d.value:e.scrollbarSize}px`,height:`${Jl===e.layout?e.scrollbarSize:d.value}px`,[rT[e.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),m=S(()=>{const T=e.ratio,M=e.clientSize;if(T>=100)return Number.POSITIVE_INFINITY;if(T>=50)return T*M/100;const L=M/3;return Math.floor(Math.min(Math.max(T*M,iT),L))}),h=S(()=>{if(!Number.isFinite(m.value))return{display:"none"};const T=`${m.value}px`;return fT({bar:f.value,size:T,move:c.traveled},e.layout)}),v=S(()=>Math.floor(e.clientSize-m.value-o(n))),g=()=>{window.addEventListener("mousemove",C),window.addEventListener("mouseup",b);const T=o(r);T&&(u=document.onselectstart,document.onselectstart=()=>!1,T.addEventListener("touchmove",C),T.addEventListener("touchend",b))},y=()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",b),document.onselectstart=u,u=null;const T=o(r);T&&(T.removeEventListener("touchmove",C),T.removeEventListener("touchend",b))},k=T=>{T.stopImmediatePropagation(),!(T.ctrlKey||[1,2].includes(T.button))&&(c.isDragging=!0,c[f.value.axis]=T.currentTarget[f.value.offset]-(T[f.value.client]-T.currentTarget.getBoundingClientRect()[f.value.direction]),t("start-move"),g())},b=()=>{c.isDragging=!1,c[f.value.axis]=0,t("stop-move"),y()},C=T=>{const{isDragging:M}=c;if(!M||!r.value||!s.value)return;const L=c[f.value.axis];if(!L)return;qa(i);const A=(s.value.getBoundingClientRect()[f.value.direction]-T[f.value.client])*-1,D=r.value[f.value.offset]-L,B=A-D;i=Co(()=>{c.traveled=Math.max(e.startGap,Math.min(B,v.value)),t("scroll",B,v.value)})},I=T=>{const M=Math.abs(T.target.getBoundingClientRect()[f.value.direction]-T[f.value.client]),L=r.value[f.value.offset]/2,A=M-L;c.traveled=Math.max(0,Math.min(A,v.value)),t("scroll",A,v.value)};return ue(()=>e.scrollFrom,T=>{c.isDragging||(c.traveled=Math.ceil(T*v.value))}),Rt(()=>{y()}),()=>De("div",{role:"presentation",ref:s,class:[l.b(),e.class,(e.alwaysOn||c.isDragging)&&"always-on"],style:p.value,onMousedown:Fe(I,["stop","prevent"]),onTouchstartPrevent:k},De("div",{ref:r,class:a.e("thumb"),style:h.value,onMousedown:k},[]))}}),Cf=({name:e,getOffset:t,getItemSize:n,getItemOffset:l,getEstimatedTotalSize:a,getStartIndexForOffset:s,getStopIndexForStartIndex:r,initCache:i,clearCache:u,validateProps:c})=>j({name:e??"ElVirtualList",props:yf,emits:[Ia,Na],setup(f,{emit:d,expose:p}){c(f);const m=at(),h=ce("vl"),v=_(i(f,m)),g=mf(),y=_(),k=_(),b=_(),C=_({isScrolling:!1,scrollDir:"forward",scrollOffset:He(f.initScrollOffset)?f.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:f.scrollbarAlwaysOn}),I=S(()=>{const{total:q,cache:se}=f,{isScrolling:pe,scrollDir:oe,scrollOffset:re}=o(C);if(q===0)return[0,0,0,0];const Q=s(f,re,o(v)),ve=r(f,Q,re,o(v)),_e=!pe||oe===Pa?Math.max(1,se):1,Te=!pe||oe===zl?Math.max(1,se):1;return[Math.max(0,Q-_e),Math.max(0,Math.min(q-1,ve+Te)),Q,ve]}),T=S(()=>a(f,o(v))),M=S(()=>No(f.layout)),L=S(()=>[{position:"relative",[`overflow-${M.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:f.direction,height:He(f.height)?`${f.height}px`:f.height,width:He(f.width)?`${f.width}px`:f.width},f.style]),A=S(()=>{const q=o(T),se=o(M);return{height:se?"100%":`${q}px`,pointerEvents:o(C).isScrolling?"none":void 0,width:se?`${q}px`:"100%"}}),D=S(()=>M.value?f.width:f.height),{onWheel:B}=cT({atStartEdge:S(()=>C.value.scrollOffset<=0),atEndEdge:S(()=>C.value.scrollOffset>=T.value),layout:S(()=>f.layout)},q=>{var se,pe;(pe=(se=b.value).onMouseUp)==null||pe.call(se),V(Math.min(C.value.scrollOffset+q,T.value-D.value))}),F=()=>{const{total:q}=f;if(q>0){const[re,Q,ve,_e]=o(I);d(Ia,re,Q,ve,_e)}const{scrollDir:se,scrollOffset:pe,updateRequested:oe}=o(C);d(Na,se,pe,oe)},x=q=>{const{clientHeight:se,scrollHeight:pe,scrollTop:oe}=q.currentTarget,re=o(C);if(re.scrollOffset===oe)return;const Q=Math.max(0,Math.min(oe,pe-se));C.value={...re,isScrolling:!0,scrollDir:gl(re.scrollOffset,Q),scrollOffset:Q,updateRequested:!1},Le(H)},U=q=>{const{clientWidth:se,scrollLeft:pe,scrollWidth:oe}=q.currentTarget,re=o(C);if(re.scrollOffset===pe)return;const{direction:Q}=f;let ve=pe;if(Q===Ul)switch(La()){case Io:{ve=-pe;break}case qr:{ve=oe-se-pe;break}}ve=Math.max(0,Math.min(ve,oe-se)),C.value={...re,isScrolling:!0,scrollDir:gl(re.scrollOffset,ve),scrollOffset:ve,updateRequested:!1},Le(H)},X=q=>{o(M)?U(q):x(q),F()},K=(q,se)=>{const pe=(T.value-D.value)/se*q;V(Math.min(T.value-D.value,pe))},V=q=>{q=Math.max(q,0),q!==o(C).scrollOffset&&(C.value={...o(C),scrollOffset:q,scrollDir:gl(o(C).scrollOffset,q),updateRequested:!0},Le(H))},W=(q,se=kn)=>{const{scrollOffset:pe}=o(C);q=Math.max(0,Math.min(q,f.total-1)),V(t(f,q,se,pe,o(v)))},P=q=>{const{direction:se,itemSize:pe,layout:oe}=f,re=g.value(u&&pe,u&&oe,u&&se);let Q;if(nn(re,String(q)))Q=re[q];else{const ve=l(f,q,o(v)),_e=n(f,q,o(v)),Te=o(M),Ie=se===Ul,Ke=Te?ve:0;re[q]=Q={position:"absolute",left:Ie?void 0:`${Ke}px`,right:Ie?`${Ke}px`:void 0,top:Te?0:`${ve}px`,height:Te?"100%":`${_e}px`,width:Te?`${_e}px`:"100%"}}return Q},H=()=>{C.value.isScrolling=!1,Le(()=>{g.value(-1,null,null)})},Y=()=>{const q=y.value;q&&(q.scrollTop=0)};ze(()=>{if(!yt)return;const{initScrollOffset:q}=f,se=o(y);He(q)&&se&&(o(M)?se.scrollLeft=q:se.scrollTop=q),F()}),Nl(()=>{const{direction:q,layout:se}=f,{scrollOffset:pe,updateRequested:oe}=o(C),re=o(y);if(oe&&re)if(se===Jl)if(q===Ul)switch(La()){case Io:{re.scrollLeft=-pe;break}case jr:{re.scrollLeft=pe;break}default:{const{clientWidth:Q,scrollWidth:ve}=re;re.scrollLeft=ve-Q-pe;break}}else re.scrollLeft=pe;else re.scrollTop=pe});const z={ns:h,clientSize:D,estimatedTotalSize:T,windowStyle:L,windowRef:y,innerRef:k,innerStyle:A,itemsToRender:I,scrollbarRef:b,states:C,getItemStyle:P,onScroll:X,onScrollbarScroll:K,onWheel:B,scrollTo:V,scrollToItem:W,resetScrollTop:Y};return p({windowRef:y,innerRef:k,getItemStyleCache:g,scrollTo:V,scrollToItem:W,resetScrollTop:Y,states:C}),z},render(f){var d;const{$slots:p,className:m,clientSize:h,containerElement:v,data:g,getItemStyle:y,innerElement:k,itemsToRender:b,innerStyle:C,layout:I,total:T,onScroll:M,onScrollbarScroll:L,onWheel:A,states:D,useIsScrolling:B,windowStyle:F,ns:x}=f,[U,X]=b,K=rt(v),V=rt(k),W=[];if(T>0)for(let z=U;z<=X;z++)W.push((d=p.default)==null?void 0:d.call(p,{data:g,key:z,index:z,isScrolling:B?D.isScrolling:void 0,style:y(z)}));const P=[De(V,{style:C,ref:"innerRef"},ct(V)?W:{default:()=>W})],H=De(Us,{ref:"scrollbarRef",clientSize:h,layout:I,onScroll:L,ratio:h*100/this.estimatedTotalSize,scrollFrom:D.scrollOffset/(this.estimatedTotalSize-h),total:T}),Y=De(K,{class:[x.e("window"),m],style:F,onScroll:M,onWheel:A,ref:"windowRef",key:0},ct(K)?[P]:{default:()=>[P]});return De("div",{key:0,class:[x.e("wrapper"),D.scrollbarAlwaysOn?"always-on":""]},[Y,H])}}),Sf=Cf({name:"ElFixedSizeList",getItemOffset:({itemSize:e},t)=>t*e,getItemSize:({itemSize:e})=>e,getEstimatedTotalSize:({total:e,itemSize:t})=>t*e,getOffset:({height:e,total:t,itemSize:n,layout:l,width:a},s,r,i)=>{const u=No(l)?a:e,c=Math.max(0,t*n-u),f=Math.min(c,s*n),d=Math.max(0,(s+1)*n-u);switch(r===ns&&(i>=d-u&&i<=f+u?r=kn:r=Bn),r){case $o:return f;case To:return d;case Bn:{const p=Math.round(d+(f-d)/2);return p<Math.ceil(u/2)?0:p>c+Math.floor(u/2)?c:p}case kn:default:return i>=d&&i<=f?i:i<d?d:f}},getStartIndexForOffset:({total:e,itemSize:t},n)=>Math.max(0,Math.min(e-1,Math.floor(n/t))),getStopIndexForStartIndex:({height:e,total:t,itemSize:n,layout:l,width:a},s,r)=>{const i=s*n,u=No(l)?a:e,c=Math.ceil((u+r-i)/n);return Math.max(0,Math.min(t-1,s+c-1))},initCache(){},clearCache:!0,validateProps(){}}),Hl=(e,t,n)=>{const{itemSize:l}=e,{items:a,lastVisitedIndex:s}=n;if(t>s){let r=0;if(s>=0){const i=a[s];r=i.offset+i.size}for(let i=s+1;i<=t;i++){const u=l(i);a[i]={offset:r,size:u},r+=u}n.lastVisitedIndex=t}return a[t]},pT=(e,t,n)=>{const{items:l,lastVisitedIndex:a}=t;return(a>0?l[a].offset:0)>=n?_f(e,t,0,a,n):vT(e,t,Math.max(0,a),n)},_f=(e,t,n,l,a)=>{for(;n<=l;){const s=n+Math.floor((l-n)/2),r=Hl(e,s,t).offset;if(r===a)return s;r<a?n=s+1:r>a&&(l=s-1)}return Math.max(0,n-1)},vT=(e,t,n,l)=>{const{total:a}=e;let s=1;for(;n<a&&Hl(e,n,t).offset<l;)n+=s,s*=2;return _f(e,t,Math.floor(n/2),Math.min(n,a-1),l)},ru=({total:e},{items:t,estimatedItemSize:n,lastVisitedIndex:l})=>{let a=0;if(l>=e&&(l=e-1),l>=0){const i=t[l];a=i.offset+i.size}const r=(e-l-1)*n;return a+r},mT=Cf({name:"ElDynamicSizeList",getItemOffset:(e,t,n)=>Hl(e,t,n).offset,getItemSize:(e,t,{items:n})=>n[t].size,getEstimatedTotalSize:ru,getOffset:(e,t,n,l,a)=>{const{height:s,layout:r,width:i}=e,u=No(r)?i:s,c=Hl(e,t,a),f=ru(e,a),d=Math.max(0,Math.min(f-u,c.offset)),p=Math.max(0,c.offset-u+c.size);switch(n===ns&&(l>=p-u&&l<=d+u?n=kn:n=Bn),n){case $o:return d;case To:return p;case Bn:return Math.round(p+(d-p)/2);case kn:default:return l>=p&&l<=d?l:l<p?p:d}},getStartIndexForOffset:(e,t,n)=>pT(e,n,t),getStopIndexForStartIndex:(e,t,n,l)=>{const{height:a,total:s,layout:r,width:i}=e,u=No(r)?i:a,c=Hl(e,t,l),f=n+u;let d=c.offset+c.size,p=t;for(;p<s-1&&d<f;)p++,d+=Hl(e,p,l).size;return p},initCache({estimatedItemSize:e=xs},t){const n={items:{},estimatedItemSize:e,lastVisitedIndex:-1};return n.clearCacheAfterIndex=(l,a=!0)=>{var s,r;n.lastVisitedIndex=Math.min(n.lastVisitedIndex,l-1),(s=t.exposed)==null||s.getItemStyleCache(-1),a&&((r=t.proxy)==null||r.$forceUpdate())},n},clearCache:!1,validateProps:({itemSize:e})=>{}}),hT=({atXEndEdge:e,atXStartEdge:t,atYEndEdge:n,atYStartEdge:l},a)=>{let s=null,r=0,i=0;const u=(f,d)=>{const p=f<=0&&t.value||f>=0&&e.value,m=d<=0&&l.value||d>=0&&n.value;return p&&m};return{hasReachedEdge:u,onWheel:f=>{qa(s);let d=f.deltaX,p=f.deltaY;Math.abs(d)>Math.abs(p)?p=0:d=0,f.shiftKey&&p!==0&&(d=p,p=0),!(u(r,i)&&u(r+d,i+p))&&(r+=d,i+=p,f.preventDefault(),s=Co(()=>{a(r,i),r=0,i=0}))}}},Ef=({name:e,clearCache:t,getColumnPosition:n,getColumnStartIndexForOffset:l,getColumnStopIndexForStartIndex:a,getEstimatedTotalHeight:s,getEstimatedTotalWidth:r,getColumnOffset:i,getRowOffset:u,getRowPosition:c,getRowStartIndexForOffset:f,getRowStopIndexForStartIndex:d,initCache:p,injectToInstance:m,validateProps:h})=>j({name:e??"ElVirtualList",props:kl,emits:[Ia,Na],setup(v,{emit:g,expose:y,slots:k}){const b=ce("vl");h(v);const C=at(),I=_(p(v,C));m==null||m(C,I);const T=_(),M=_(),L=_(),A=_(null),D=_({isScrolling:!1,scrollLeft:He(v.initScrollLeft)?v.initScrollLeft:0,scrollTop:He(v.initScrollTop)?v.initScrollTop:0,updateRequested:!1,xAxisScrollDir:zl,yAxisScrollDir:zl}),B=mf(),F=S(()=>Number.parseInt(`${v.height}`,10)),x=S(()=>Number.parseInt(`${v.width}`,10)),U=S(()=>{const{totalColumn:ke,totalRow:Ee,columnCache:Be}=v,{isScrolling:Ve,xAxisScrollDir:Ye,scrollLeft:Xe}=o(D);if(ke===0||Ee===0)return[0,0,0,0];const nt=l(v,Xe,o(I)),Se=a(v,nt,Xe,o(I)),Ue=!Ve||Ye===Pa?Math.max(1,Be):1,gt=!Ve||Ye===zl?Math.max(1,Be):1;return[Math.max(0,nt-Ue),Math.max(0,Math.min(ke-1,Se+gt)),nt,Se]}),X=S(()=>{const{totalColumn:ke,totalRow:Ee,rowCache:Be}=v,{isScrolling:Ve,yAxisScrollDir:Ye,scrollTop:Xe}=o(D);if(ke===0||Ee===0)return[0,0,0,0];const nt=f(v,Xe,o(I)),Se=d(v,nt,Xe,o(I)),Ue=!Ve||Ye===Pa?Math.max(1,Be):1,gt=!Ve||Ye===zl?Math.max(1,Be):1;return[Math.max(0,nt-Ue),Math.max(0,Math.min(Ee-1,Se+gt)),nt,Se]}),K=S(()=>s(v,o(I))),V=S(()=>r(v,o(I))),W=S(()=>{var ke;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:v.direction,height:He(v.height)?`${v.height}px`:v.height,width:He(v.width)?`${v.width}px`:v.width},(ke=v.style)!=null?ke:{}]}),P=S(()=>{const ke=`${o(V)}px`;return{height:`${o(K)}px`,pointerEvents:o(D).isScrolling?"none":void 0,width:ke}}),H=()=>{const{totalColumn:ke,totalRow:Ee}=v;if(ke>0&&Ee>0){const[Se,Ue,gt,Et]=o(U),[$t,be,me,ne]=o(X);g(Ia,{columnCacheStart:Se,columnCacheEnd:Ue,rowCacheStart:$t,rowCacheEnd:be,columnVisibleStart:gt,columnVisibleEnd:Et,rowVisibleStart:me,rowVisibleEnd:ne})}const{scrollLeft:Be,scrollTop:Ve,updateRequested:Ye,xAxisScrollDir:Xe,yAxisScrollDir:nt}=o(D);g(Na,{xAxisScrollDir:Xe,scrollLeft:Be,yAxisScrollDir:nt,scrollTop:Ve,updateRequested:Ye})},Y=ke=>{const{clientHeight:Ee,clientWidth:Be,scrollHeight:Ve,scrollLeft:Ye,scrollTop:Xe,scrollWidth:nt}=ke.currentTarget,Se=o(D);if(Se.scrollTop===Xe&&Se.scrollLeft===Ye)return;let Ue=Ye;if(su(v.direction))switch(La()){case Io:Ue=-Ye;break;case qr:Ue=nt-Be-Ye;break}D.value={...Se,isScrolling:!0,scrollLeft:Ue,scrollTop:Math.max(0,Math.min(Xe,Ve-Ee)),updateRequested:!0,xAxisScrollDir:gl(Se.scrollLeft,Ue),yAxisScrollDir:gl(Se.scrollTop,Xe)},Le(()=>Q()),ve(),H()},z=(ke,Ee)=>{const Be=o(F),Ve=(K.value-Be)/Ee*ke;pe({scrollTop:Math.min(K.value-Be,Ve)})},q=(ke,Ee)=>{const Be=o(x),Ve=(V.value-Be)/Ee*ke;pe({scrollLeft:Math.min(V.value-Be,Ve)})},{onWheel:se}=hT({atXStartEdge:S(()=>D.value.scrollLeft<=0),atXEndEdge:S(()=>D.value.scrollLeft>=V.value-o(x)),atYStartEdge:S(()=>D.value.scrollTop<=0),atYEndEdge:S(()=>D.value.scrollTop>=K.value-o(F))},(ke,Ee)=>{var Be,Ve,Ye,Xe;(Ve=(Be=M.value)==null?void 0:Be.onMouseUp)==null||Ve.call(Be),(Xe=(Ye=M.value)==null?void 0:Ye.onMouseUp)==null||Xe.call(Ye);const nt=o(x),Se=o(F);pe({scrollLeft:Math.min(D.value.scrollLeft+ke,V.value-nt),scrollTop:Math.min(D.value.scrollTop+Ee,K.value-Se)})}),pe=({scrollLeft:ke=D.value.scrollLeft,scrollTop:Ee=D.value.scrollTop})=>{ke=Math.max(ke,0),Ee=Math.max(Ee,0);const Be=o(D);Ee===Be.scrollTop&&ke===Be.scrollLeft||(D.value={...Be,xAxisScrollDir:gl(Be.scrollLeft,ke),yAxisScrollDir:gl(Be.scrollTop,Ee),scrollLeft:ke,scrollTop:Ee,updateRequested:!0},Le(()=>Q()),ve(),H())},oe=(ke=0,Ee=0,Be=kn)=>{const Ve=o(D);Ee=Math.max(0,Math.min(Ee,v.totalColumn-1)),ke=Math.max(0,Math.min(ke,v.totalRow-1));const Ye=mc(b.namespace.value),Xe=o(I),nt=s(v,Xe),Se=r(v,Xe);pe({scrollLeft:i(v,Ee,Be,Ve.scrollLeft,Xe,Se>v.width?Ye:0),scrollTop:u(v,ke,Be,Ve.scrollTop,Xe,nt>v.height?Ye:0)})},re=(ke,Ee)=>{const{columnWidth:Be,direction:Ve,rowHeight:Ye}=v,Xe=B.value(t&&Be,t&&Ye,t&&Ve),nt=`${ke},${Ee}`;if(nn(Xe,nt))return Xe[nt];{const[,Se]=n(v,Ee,o(I)),Ue=o(I),gt=su(Ve),[Et,$t]=c(v,ke,Ue),[be]=n(v,Ee,Ue);return Xe[nt]={position:"absolute",left:gt?void 0:`${Se}px`,right:gt?`${Se}px`:void 0,top:`${$t}px`,height:`${Et}px`,width:`${be}px`},Xe[nt]}},Q=()=>{D.value.isScrolling=!1,Le(()=>{B.value(-1,null,null)})};ze(()=>{if(!yt)return;const{initScrollLeft:ke,initScrollTop:Ee}=v,Be=o(T);Be&&(He(ke)&&(Be.scrollLeft=ke),He(Ee)&&(Be.scrollTop=Ee)),H()});const ve=()=>{const{direction:ke}=v,{scrollLeft:Ee,scrollTop:Be,updateRequested:Ve}=o(D),Ye=o(T);if(Ve&&Ye){if(ke===Ul)switch(La()){case Io:{Ye.scrollLeft=-Ee;break}case jr:{Ye.scrollLeft=Ee;break}default:{const{clientWidth:Xe,scrollWidth:nt}=Ye;Ye.scrollLeft=nt-Xe-Ee;break}}else Ye.scrollLeft=Math.max(0,Ee);Ye.scrollTop=Math.max(0,Be)}},{resetAfterColumnIndex:_e,resetAfterRowIndex:Te,resetAfter:Ie}=C.proxy;y({windowRef:T,innerRef:A,getItemStyleCache:B,scrollTo:pe,scrollToItem:oe,states:D,resetAfterColumnIndex:_e,resetAfterRowIndex:Te,resetAfter:Ie});const Ke=()=>{const{scrollbarAlwaysOn:ke,scrollbarStartGap:Ee,scrollbarEndGap:Be,totalColumn:Ve,totalRow:Ye}=v,Xe=o(x),nt=o(F),Se=o(V),Ue=o(K),{scrollLeft:gt,scrollTop:Et}=o(D),$t=De(Us,{ref:M,alwaysOn:ke,startGap:Ee,endGap:Be,class:b.e("horizontal"),clientSize:Xe,layout:"horizontal",onScroll:q,ratio:Xe*100/Se,scrollFrom:gt/(Se-Xe),total:Ye,visible:!0}),be=De(Us,{ref:L,alwaysOn:ke,startGap:Ee,endGap:Be,class:b.e("vertical"),clientSize:nt,layout:"vertical",onScroll:z,ratio:nt*100/Ue,scrollFrom:Et/(Ue-nt),total:Ve,visible:!0});return{horizontalScrollbar:$t,verticalScrollbar:be}},Ge=()=>{var ke;const[Ee,Be]=o(U),[Ve,Ye]=o(X),{data:Xe,totalColumn:nt,totalRow:Se,useIsScrolling:Ue,itemKey:gt}=v,Et=[];if(Se>0&&nt>0)for(let $t=Ve;$t<=Ye;$t++)for(let be=Ee;be<=Be;be++)Et.push((ke=k.default)==null?void 0:ke.call(k,{columnIndex:be,data:Xe,key:gt({columnIndex:be,data:Xe,rowIndex:$t}),isScrolling:Ue?o(D).isScrolling:void 0,style:re($t,be),rowIndex:$t}));return Et},qe=()=>{const ke=rt(v.innerElement),Ee=Ge();return[De(ke,{style:o(P),ref:A},ct(ke)?Ee:{default:()=>Ee})]};return()=>{const ke=rt(v.containerElement),{horizontalScrollbar:Ee,verticalScrollbar:Be}=Ke(),Ve=qe();return De("div",{key:0,class:b.e("wrapper"),role:v.role},[De(ke,{class:v.className,style:o(W),onScroll:Y,onWheel:se,ref:T},ct(ke)?Ve:{default:()=>Ve}),Ee,Be])}}}),gT=Ef({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:e},t)=>[e,t*e],getRowPosition:({rowHeight:e},t)=>[e,t*e],getEstimatedTotalHeight:({totalRow:e,rowHeight:t})=>t*e,getEstimatedTotalWidth:({totalColumn:e,columnWidth:t})=>t*e,getColumnOffset:({totalColumn:e,columnWidth:t,width:n},l,a,s,r,i)=>{n=Number(n);const u=Math.max(0,e*t-n),c=Math.min(u,l*t),f=Math.max(0,l*t-n+i+t);switch(a==="smart"&&(s>=f-n&&s<=c+n?a=kn:a=Bn),a){case $o:return c;case To:return f;case Bn:{const d=Math.round(f+(c-f)/2);return d<Math.ceil(n/2)?0:d>u+Math.floor(n/2)?u:d}case kn:default:return s>=f&&s<=c?s:f>c||s<f?f:c}},getRowOffset:({rowHeight:e,height:t,totalRow:n},l,a,s,r,i)=>{t=Number(t);const u=Math.max(0,n*e-t),c=Math.min(u,l*e),f=Math.max(0,l*e-t+i+e);switch(a===ns&&(s>=f-t&&s<=c+t?a=kn:a=Bn),a){case $o:return c;case To:return f;case Bn:{const d=Math.round(f+(c-f)/2);return d<Math.ceil(t/2)?0:d>u+Math.floor(t/2)?u:d}case kn:default:return s>=f&&s<=c?s:f>c||s<f?f:c}},getColumnStartIndexForOffset:({columnWidth:e,totalColumn:t},n)=>Math.max(0,Math.min(t-1,Math.floor(n/e))),getColumnStopIndexForStartIndex:({columnWidth:e,totalColumn:t,width:n},l,a)=>{const s=l*e,r=Math.ceil((n+a-s)/e);return Math.max(0,Math.min(t-1,l+r-1))},getRowStartIndexForOffset:({rowHeight:e,totalRow:t},n)=>Math.max(0,Math.min(t-1,Math.floor(n/e))),getRowStopIndexForStartIndex:({rowHeight:e,totalRow:t,height:n},l,a)=>{const s=l*e,r=Math.ceil((n+a-s)/e);return Math.max(0,Math.min(t-1,l+r-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:e,rowHeight:t})=>{}}),{max:Ra,min:$f,floor:Tf}=Math,yT={column:"columnWidth",row:"rowHeight"},js={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},Un=(e,t,n,l)=>{const[a,s,r]=[n[l],e[yT[l]],n[js[l]]];if(t>r){let i=0;if(r>=0){const u=a[r];i=u.offset+u.size}for(let u=r+1;u<=t;u++){const c=s(u);a[u]={offset:i,size:c},i+=c}n[js[l]]=t}return a[t]},If=(e,t,n,l,a,s)=>{for(;n<=l;){const r=n+Tf((l-n)/2),i=Un(e,r,t,s).offset;if(i===a)return r;i<a?n=r+1:l=r-1}return Ra(0,n-1)},bT=(e,t,n,l,a)=>{const s=a==="column"?e.totalColumn:e.totalRow;let r=1;for(;n<s&&Un(e,n,t,a).offset<l;)n+=r,r*=2;return If(e,t,Tf(n/2),$f(n,s-1),l,a)},iu=(e,t,n,l)=>{const[a,s]=[t[l],t[js[l]]];return(s>0?a[s].offset:0)>=n?If(e,t,0,s,n,l):bT(e,t,Ra(0,s),n,l)},Nf=({totalRow:e},{estimatedRowHeight:t,lastVisitedRowIndex:n,row:l})=>{let a=0;if(n>=e&&(n=e-1),n>=0){const i=l[n];a=i.offset+i.size}const r=(e-n-1)*t;return a+r},Pf=({totalColumn:e},{column:t,estimatedColumnWidth:n,lastVisitedColumnIndex:l})=>{let a=0;if(l>e&&(l=e-1),l>=0){const i=t[l];a=i.offset+i.size}const r=(e-l-1)*n;return a+r},wT={column:Pf,row:Nf},uu=(e,t,n,l,a,s,r)=>{const[i,u]=[s==="row"?e.height:e.width,wT[s]],c=Un(e,t,a,s),f=u(e,a),d=Ra(0,$f(f-i,c.offset)),p=Ra(0,c.offset-i+r+c.size);switch(n===ns&&(l>=p-i&&l<=d+i?n=kn:n=Bn),n){case $o:return d;case To:return p;case Bn:return Math.round(p+(d-p)/2);case kn:default:return l>=p&&l<=d?l:p>d||l<p?p:d}},kT=Ef({name:"ElDynamicSizeGrid",getColumnPosition:(e,t,n)=>{const l=Un(e,t,n,"column");return[l.size,l.offset]},getRowPosition:(e,t,n)=>{const l=Un(e,t,n,"row");return[l.size,l.offset]},getColumnOffset:(e,t,n,l,a,s)=>uu(e,t,n,l,a,"column",s),getRowOffset:(e,t,n,l,a,s)=>uu(e,t,n,l,a,"row",s),getColumnStartIndexForOffset:(e,t,n)=>iu(e,n,t,"column"),getColumnStopIndexForStartIndex:(e,t,n,l)=>{const a=Un(e,t,l,"column"),s=n+e.width;let r=a.offset+a.size,i=t;for(;i<e.totalColumn-1&&r<s;)i++,r+=Un(e,t,l,"column").size;return i},getEstimatedTotalHeight:Nf,getEstimatedTotalWidth:Pf,getRowStartIndexForOffset:(e,t,n)=>iu(e,n,t,"row"),getRowStopIndexForStartIndex:(e,t,n,l)=>{const{totalRow:a,height:s}=e,r=Un(e,t,l,"row"),i=n+s;let u=r.size+r.offset,c=t;for(;c<a-1&&u<i;)c++,u+=Un(e,c,l,"row").size;return c},injectToInstance:(e,t)=>{const n=({columnIndex:s,rowIndex:r},i)=>{var u,c;i=Yt(i)?!0:i,He(s)&&(t.value.lastVisitedColumnIndex=Math.min(t.value.lastVisitedColumnIndex,s-1)),He(r)&&(t.value.lastVisitedRowIndex=Math.min(t.value.lastVisitedRowIndex,r-1)),(u=e.exposed)==null||u.getItemStyleCache.value(-1,null,null),i&&((c=e.proxy)==null||c.$forceUpdate())},l=(s,r)=>{n({columnIndex:s},r)},a=(s,r)=>{n({rowIndex:s},r)};Object.assign(e.proxy,{resetAfterColumnIndex:l,resetAfterRowIndex:a,resetAfter:n})},initCache:({estimatedColumnWidth:e=xs,estimatedRowHeight:t=xs})=>({column:{},estimatedColumnWidth:e,estimatedRowHeight:t,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:e,rowHeight:t})=>{}}),CT=j({props:{item:{type:Object,required:!0},style:Object,height:Number},setup(){return{ns:ce("select")}}});function ST(e,t,n,l,a,s){return e.item.isTitle?(w(),O("div",{key:0,class:$(e.ns.be("group","title")),style:Re([e.style,{lineHeight:`${e.height}px`}])},ae(e.item.label),7)):(w(),O("div",{key:1,class:$(e.ns.be("group","split")),style:Re(e.style)},[R("span",{class:$(e.ns.be("group","split-dash")),style:Re({top:`${e.height/2}px`})},null,6)],6))}var _T=he(CT,[["render",ST],["__file","/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/group-item.vue"]]);function ET(e,{emit:t}){return{hoverItem:()=>{e.disabled||t("hover",e.index)},selectOptionClick:()=>{e.disabled||t("select",e.item,e.index)}}}const $T={allowCreate:Boolean,autocomplete:{type:String,default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:[String,Object],default:Zn},effect:{type:String,default:"light"},collapseTags:Boolean,collapseTagsTooltip:{type:Boolean,default:!1},maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:Function,height:{type:Number,default:170},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,label:String,modelValue:[Array,String,Number,Boolean,Object],multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:Function,reserveKeyword:{type:Boolean,default:!0},options:{type:Array,required:!0},placeholder:{type:String},teleported:Zt.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},remote:Boolean,size:{type:String,validator:Ua},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:{type:Boolean,default:!1},validateEvent:{type:Boolean,default:!0},placement:{type:te(String),values:Do,default:"bottom-start"}},TT={data:Array,disabled:Boolean,hovering:Boolean,item:Object,index:Number,style:Object,selected:Boolean,created:Boolean},IT=j({props:TT,emits:["select","hover"],setup(e,{emit:t}){const n=ce("select"),{hoverItem:l,selectOptionClick:a}=ET(e,{emit:t});return{ns:n,hoverItem:l,selectOptionClick:a}}}),NT=["aria-selected"];function PT(e,t,n,l,a,s){return w(),O("li",{"aria-selected":e.selected,style:Re(e.style),class:$([e.ns.be("dropdown","option-item"),e.ns.is("selected",e.selected),e.ns.is("disabled",e.disabled),e.ns.is("created",e.created),{hover:e.hovering}]),onMouseenter:t[0]||(t[0]=(...r)=>e.hoverItem&&e.hoverItem(...r)),onClick:t[1]||(t[1]=Fe((...r)=>e.selectOptionClick&&e.selectOptionClick(...r),["stop"]))},[ie(e.$slots,"default",{item:e.item,index:e.index,disabled:e.disabled},()=>[R("span",null,ae(e.item.label),1)])],46,NT)}var MT=he(IT,[["render",PT],["__file","/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/option-item.vue"]]);const Mf=Symbol("ElSelectV2Injection");var LT=j({name:"ElSelectDropdown",props:{data:{type:Array,required:!0},hoveringIndex:Number,width:Number},setup(e,{slots:t,expose:n}){const l=Me(Mf),a=ce("select"),s=_([]),r=_(),i=S(()=>e.data.length);ue(()=>i.value,()=>{var L,A;(A=(L=l.popper.value).updatePopper)==null||A.call(L)});const u=S(()=>Yt(l.props.estimatedOptionHeight)),c=S(()=>u.value?{itemSize:l.props.itemHeight}:{estimatedSize:l.props.estimatedOptionHeight,itemSize:L=>s.value[L]}),f=(L=[],A)=>{const{props:{valueKey:D}}=l;return It(A)?L&&L.some(B=>Vt(B,D)===Vt(A,D)):L.includes(A)},d=(L,A)=>{if(It(A)){const{valueKey:D}=l.props;return Vt(L,D)===Vt(A,D)}else return L===A},p=(L,A)=>{const{valueKey:D}=l.props;return l.props.multiple?f(L,Vt(A,D)):d(L,Vt(A,D))},m=(L,A)=>{const{disabled:D,multiple:B,multipleLimit:F}=l.props;return D||!A&&(B?F>0&&L.length>=F:!1)},h=L=>e.hoveringIndex===L;n({listRef:r,isSized:u,isItemDisabled:m,isItemHovering:h,isItemSelected:p,scrollToItem:L=>{const A=r.value;A&&A.scrollToItem(L)},resetScrollTop:()=>{const L=r.value;L&&L.resetScrollTop()}});const y=L=>{const{index:A,data:D,style:B}=L,F=o(u),{itemSize:x,estimatedSize:U}=o(c),{modelValue:X}=l.props,{onSelect:K,onHover:V}=l,W=D[A];if(W.type==="Group")return E(_T,{item:W,style:B,height:F?x:U},null);const P=p(X,W),H=m(X,P),Y=h(A);return E(MT,ot(L,{selected:P,disabled:W.disabled||H,created:!!W.created,hovering:Y,item:W,onSelect:K,onHover:V}),{default:z=>{var q;return((q=t.default)==null?void 0:q.call(t,z))||E("span",null,[W.label])}})},{onKeyboardNavigate:k,onKeyboardSelect:b}=l,C=()=>{k("forward")},I=()=>{k("backward")},T=()=>{l.expanded=!1},M=L=>{const{code:A}=L,{tab:D,esc:B,down:F,up:x,enter:U}=Ae;switch(A!==D&&(L.preventDefault(),L.stopPropagation()),A){case D:case B:{T();break}case F:{C();break}case x:{I();break}case U:{b();break}}};return()=>{var L;const{data:A,width:D}=e,{height:B,multiple:F,scrollbarAlwaysOn:x}=l.props;if(A.length===0)return E("div",{class:a.b("dropdown"),style:{width:`${D}px`}},[(L=t.empty)==null?void 0:L.call(t)]);const U=o(u)?Sf:mT;return E("div",{class:[a.b("dropdown"),a.is("multiple",F)]},[E(U,ot({ref:r},o(c),{className:a.be("dropdown","list"),scrollbarAlwaysOn:x,data:A,height:B,width:D,total:A.length,onKeydown:M}),{default:X=>E(y,X,null)})])}}});function RT(e,t){const n=_(0),l=_(null),a=S(()=>e.allowCreate&&e.filterable);function s(f){const d=p=>p.value===f;return e.options&&e.options.some(d)||t.createdOptions.some(d)}function r(f){a.value&&(e.multiple&&f.created?n.value++:l.value=f)}function i(f){if(a.value)if(f&&f.length>0&&!s(f)){const d={value:f,label:f,created:!0,disabled:!1};t.createdOptions.length>=n.value?t.createdOptions[n.value]=d:t.createdOptions.push(d)}else if(e.multiple)t.createdOptions.length=n.value;else{const d=l.value;t.createdOptions.length=0,d&&d.created&&t.createdOptions.push(d)}}function u(f){if(!a.value||!f||!f.created||f.created&&e.reserveKeyword&&t.inputValue===f.label)return;const d=t.createdOptions.findIndex(p=>p.value===f.value);~d&&(t.createdOptions.splice(d,1),n.value--)}function c(){a.value&&(t.createdOptions.length=0,n.value=0)}return{createNewOption:i,removeNewOption:u,selectNewOption:r,clearAllNewOption:c}}const OT=e=>{const t=[];return e.forEach(n=>{et(n.options)?(t.push({label:n.label,isTitle:!0,type:"Group"}),n.options.forEach(l=>{t.push(l)}),t.push({type:"Group"})):t.push(n)}),t};function AT(e){const t=_(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:s=>{const r=s.target.value,i=r[r.length-1]||"";t.value=!ja(i)},handleCompositionEnd:s=>{t.value&&(t.value=!1,kt(e)&&e(s))}}}const cu="",du=11,VT={larget:51,default:42,small:33},DT=(e,t)=>{const{t:n}=ht(),l=ce("select-v2"),a=ce("input"),{form:s,formItem:r}=fn(),i=St({inputValue:cu,displayInputValue:cu,calculatedWidth:0,cachedPlaceholder:"",cachedOptions:[],createdOptions:[],createdLabel:"",createdSelected:!1,currentPlaceholder:"",hoveringIndex:-1,comboBoxHovering:!1,isOnComposition:!1,isSilentBlur:!1,isComposing:!1,inputLength:20,selectWidth:200,initialInputHeight:0,previousQuery:null,previousValue:void 0,query:"",selectedLabel:"",softFocus:!1,tagInMultiLine:!1}),u=_(-1),c=_(-1),f=_(null),d=_(null),p=_(null),m=_(null),h=_(null),v=_(null),g=_(null),y=_(!1),k=S(()=>e.disabled||(s==null?void 0:s.disabled)),b=S(()=>{const fe=F.value.length*34;return fe>e.height?e.height:fe}),C=S(()=>!Ht(e.modelValue)),I=S(()=>{const fe=e.multiple?Array.isArray(e.modelValue)&&e.modelValue.length>0:C.value;return e.clearable&&!k.value&&i.comboBoxHovering&&fe}),T=S(()=>e.remote&&e.filterable?"":Fa),M=S(()=>T.value&&l.is("reverse",y.value)),L=S(()=>(r==null?void 0:r.validateState)||""),A=S(()=>bc[L.value]),D=S(()=>e.remote?300:0),B=S(()=>{const fe=F.value;return e.loading?e.loadingText||n("el.select.loading"):e.remote&&i.inputValue===""&&fe.length===0?!1:e.filterable&&i.inputValue&&fe.length>0?e.noMatchText||n("el.select.noMatch"):fe.length===0?e.noDataText||n("el.select.noData"):null}),F=S(()=>{const fe=We=>{const wt=i.inputValue,Lt=new RegExp(pc(wt),"i");return wt?Lt.test(We.label||""):!0};return e.loading?[]:OT(e.options.concat(i.createdOptions).map(We=>{if(et(We.options)){const wt=We.options.filter(fe);if(wt.length>0)return{...We,options:wt}}else if(e.remote||fe(We))return We;return null}).filter(We=>We!==null))}),x=S(()=>{const fe=new Map;return F.value.forEach((We,wt)=>{fe.set(Xe(We),{option:We,index:wt})}),fe}),U=S(()=>F.value.every(fe=>fe.disabled)),X=qt(),K=S(()=>X.value==="small"?"small":"default"),V=S(()=>{const fe=v.value,We=K.value||"default",wt=fe?Number.parseInt(getComputedStyle(fe).paddingLeft):0,Lt=fe?Number.parseInt(getComputedStyle(fe).paddingRight):0;return i.selectWidth-Lt-wt-VT[We]}),W=()=>{var fe;c.value=((fe=h.value)==null?void 0:fe.offsetWidth)||200},P=S(()=>({width:`${i.calculatedWidth===0?du:Math.ceil(i.calculatedWidth)+du}px`})),H=S(()=>et(e.modelValue)?e.modelValue.length===0&&!i.displayInputValue:e.filterable?i.displayInputValue.length===0:!0),Y=S(()=>{const fe=e.placeholder||n("el.select.placeholder");return e.multiple||Ht(e.modelValue)?fe:i.selectedLabel}),z=S(()=>{var fe,We;return(We=(fe=m.value)==null?void 0:fe.popperRef)==null?void 0:We.contentRef}),q=S(()=>{if(e.multiple){const fe=e.modelValue.length;if(e.modelValue.length>0&&x.value.has(e.modelValue[fe-1])){const{index:We}=x.value.get(e.modelValue[fe-1]);return We}}else if(e.modelValue&&x.value.has(e.modelValue)){const{index:fe}=x.value.get(e.modelValue);return fe}return-1}),se=S({get(){return y.value&&B.value!==!1},set(fe){y.value=fe}}),pe=S(()=>i.cachedOptions.slice(0,e.maxCollapseTags)),oe=S(()=>i.cachedOptions.slice(e.maxCollapseTags)),{createNewOption:re,removeNewOption:Q,selectNewOption:ve,clearAllNewOption:_e}=RT(e,i),{handleCompositionStart:Te,handleCompositionUpdate:Ie,handleCompositionEnd:Ke}=AT(fe=>st(fe)),Ge=()=>{var fe,We,wt;(We=(fe=d.value)==null?void 0:fe.focus)==null||We.call(fe),(wt=m.value)==null||wt.updatePopper()},qe=()=>{if(!e.automaticDropdown&&!k.value)return i.isComposing&&(i.softFocus=!0),Le(()=>{var fe,We;y.value=!y.value,(We=(fe=d.value)==null?void 0:fe.focus)==null||We.call(fe)})},it=()=>(e.filterable&&i.inputValue!==i.selectedLabel&&(i.query=i.selectedLabel),Ee(i.inputValue),Le(()=>{re(i.inputValue)})),ke=hn(it,D.value),Ee=fe=>{i.previousQuery!==fe&&(i.previousQuery=fe,e.filterable&&kt(e.filterMethod)?e.filterMethod(fe):e.filterable&&e.remote&&kt(e.remoteMethod)&&e.remoteMethod(fe))},Be=fe=>{vn(e.modelValue,fe)||t(Mt,fe)},Ve=fe=>{t(tt,fe),Be(fe),i.previousValue=fe==null?void 0:fe.toString()},Ye=(fe=[],We)=>{if(!It(We))return fe.indexOf(We);const wt=e.valueKey;let Lt=-1;return fe.some((Rn,On)=>Vt(Rn,wt)===Vt(We,wt)?(Lt=On,!0):!1),Lt},Xe=fe=>It(fe)?Vt(fe,e.valueKey):fe,nt=fe=>It(fe)?fe.label:fe,Se=()=>Le(()=>{var fe,We;if(!d.value)return;const wt=v.value;h.value.height=wt.offsetHeight,y.value&&B.value!==!1&&((We=(fe=m.value)==null?void 0:fe.updatePopper)==null||We.call(fe))}),Ue=()=>{var fe,We;if(gt(),W(),(We=(fe=m.value)==null?void 0:fe.updatePopper)==null||We.call(fe),e.multiple)return Se()},gt=()=>{const fe=v.value;fe&&(i.selectWidth=fe.getBoundingClientRect().width)},Et=(fe,We,wt=!0)=>{var Lt,Rn;if(e.multiple){let On=e.modelValue.slice();const Ko=Ye(On,Xe(fe));Ko>-1?(On=[...On.slice(0,Ko),...On.slice(Ko+1)],i.cachedOptions.splice(Ko,1),Q(fe)):(e.multipleLimit<=0||On.length<e.multipleLimit)&&(On=[...On,Xe(fe)],i.cachedOptions.push(fe),ve(fe),le(We)),Ve(On),fe.created&&(i.query="",Ee(""),i.inputLength=20),e.filterable&&!e.reserveKeyword&&((Rn=(Lt=d.value).focus)==null||Rn.call(Lt),$e("")),e.filterable&&(i.calculatedWidth=g.value.getBoundingClientRect().width),Se(),je()}else u.value=We,i.selectedLabel=fe.label,Ve(Xe(fe)),y.value=!1,i.isComposing=!1,i.isSilentBlur=wt,ve(fe),fe.created||_e(),le(We)},$t=(fe,We)=>{const{valueKey:wt}=e,Lt=e.modelValue.indexOf(Vt(We,wt));if(Lt>-1&&!k.value){const Rn=[...e.modelValue.slice(0,Lt),...e.modelValue.slice(Lt+1)];return i.cachedOptions.splice(Lt,1),Ve(Rn),t("remove-tag",Vt(We,wt)),i.softFocus=!0,Q(We),Le(Ge)}fe.stopPropagation()},be=fe=>{const We=i.isComposing;i.isComposing=!0,i.softFocus?i.softFocus=!1:We||t("focus",fe)},me=fe=>(i.softFocus=!1,Le(()=>{var We,wt;(wt=(We=d.value)==null?void 0:We.blur)==null||wt.call(We),g.value&&(i.calculatedWidth=g.value.getBoundingClientRect().width),i.isSilentBlur?i.isSilentBlur=!1:i.isComposing&&t("blur",fe),i.isComposing=!1})),ne=()=>{i.displayInputValue.length>0?$e(""):y.value=!1},we=fe=>{if(i.displayInputValue.length===0){fe.preventDefault();const We=e.modelValue.slice();We.pop(),Q(i.cachedOptions.pop()),Ve(We)}},de=()=>{let fe;return et(e.modelValue)?fe=[]:fe=void 0,i.softFocus=!0,e.multiple?i.cachedOptions=[]:i.selectedLabel="",y.value=!1,Ve(fe),t("clear"),_e(),Le(Ge)},$e=fe=>{i.displayInputValue=fe,i.inputValue=fe},J=(fe,We=void 0)=>{const wt=F.value;if(!["forward","backward"].includes(fe)||k.value||wt.length<=0||U.value)return;if(!y.value)return qe();We===void 0&&(We=i.hoveringIndex);let Lt=-1;fe==="forward"?(Lt=We+1,Lt>=wt.length&&(Lt=0)):fe==="backward"&&(Lt=We-1,(Lt<0||Lt>=wt.length)&&(Lt=wt.length-1));const Rn=wt[Lt];if(Rn.disabled||Rn.type==="Group")return J(fe,Lt);le(Lt),Xt(Lt)},Oe=()=>{if(y.value)~i.hoveringIndex&&F.value[i.hoveringIndex]&&Et(F.value[i.hoveringIndex],i.hoveringIndex,!1);else return qe()},le=fe=>{i.hoveringIndex=fe},Ce=()=>{i.hoveringIndex=-1},je=()=>{var fe;const We=d.value;We&&((fe=We.focus)==null||fe.call(We))},st=fe=>{const We=fe.target.value;if($e(We),i.displayInputValue.length>0&&!y.value&&(y.value=!0),i.calculatedWidth=g.value.getBoundingClientRect().width,e.multiple&&Se(),e.remote)ke();else return it()},vt=()=>(y.value=!1,me()),Tt=()=>(i.inputValue=i.displayInputValue,Le(()=>{~q.value&&(le(q.value),Xt(i.hoveringIndex))})),Xt=fe=>{p.value.scrollToItem(fe)},_t=()=>{if(Ce(),e.multiple)if(e.modelValue.length>0){let fe=!1;i.cachedOptions.length=0,i.previousValue=e.modelValue.toString();for(const We of e.modelValue)if(x.value.has(We)){const{index:wt,option:Lt}=x.value.get(We);i.cachedOptions.push(Lt),fe||le(wt),fe=!0}}else i.cachedOptions=[],i.previousValue=void 0;else if(C.value){i.previousValue=e.modelValue;const fe=F.value,We=fe.findIndex(wt=>Xe(wt)===Xe(e.modelValue));~We?(i.selectedLabel=fe[We].label,le(We)):i.selectedLabel=`${e.modelValue}`}else i.selectedLabel="",i.previousValue=void 0;_e(),W()};return ue(y,fe=>{var We,wt;t("visible-change",fe),fe?(wt=(We=m.value).update)==null||wt.call(We):(i.displayInputValue="",i.previousQuery=null,re(""))}),ue(()=>e.modelValue,(fe,We)=>{var wt;(!fe||fe.toString()!==i.previousValue)&&_t(),!vn(fe,We)&&e.validateEvent&&((wt=r==null?void 0:r.validate)==null||wt.call(r,"change").catch(Lt=>void 0))},{deep:!0}),ue(()=>e.options,()=>{const fe=d.value;(!fe||fe&&document.activeElement!==fe)&&_t()},{deep:!0}),ue(F,()=>Le(p.value.resetScrollTop)),ue(()=>se.value,fe=>{fe||Ce()}),ze(()=>{_t()}),un(h,Ue),{collapseTagSize:K,currentPlaceholder:Y,expanded:y,emptyText:B,popupHeight:b,debounce:D,filteredOptions:F,iconComponent:T,iconReverse:M,inputWrapperStyle:P,popperSize:c,dropdownMenuVisible:se,hasModelValue:C,shouldShowPlaceholder:H,selectDisabled:k,selectSize:X,showClearBtn:I,states:i,tagMaxWidth:V,nsSelectV2:l,nsInput:a,calculatorRef:g,controlRef:f,inputRef:d,menuRef:p,popper:m,selectRef:h,selectionRef:v,popperRef:z,validateState:L,validateIcon:A,showTagList:pe,collapseTagList:oe,debouncedOnInputChange:ke,deleteTag:$t,getLabel:nt,getValueKey:Xe,handleBlur:me,handleClear:de,handleClickOutside:vt,handleDel:we,handleEsc:ne,handleFocus:be,handleMenuEnter:Tt,handleResize:Ue,toggleMenu:qe,scrollTo:Xt,onInput:st,onKeyboardNavigate:J,onKeyboardSelect:Oe,onSelect:Et,onHover:le,onUpdateInputValue:$e,handleCompositionStart:Te,handleCompositionEnd:Ke,handleCompositionUpdate:Ie}},BT=j({name:"ElSelectV2",components:{ElSelectMenu:LT,ElTag:_o,ElTooltip:cn,ElIcon:Pe},directives:{ClickOutside:il,ModelText:Ao},props:$T,emits:[tt,Mt,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const n=S(()=>{const{modelValue:a,multiple:s}=e,r=s?[]:void 0;return et(a)?s?a:r:s?r:a}),l=DT(St({...Gt(e),modelValue:n}),t);return dt(Mf,{props:St({...Gt(e),height:l.popupHeight,modelValue:n}),popper:l.popper,onSelect:l.onSelect,onHover:l.onHover,onKeyboardNavigate:l.onKeyboardNavigate,onKeyboardSelect:l.onKeyboardSelect}),{...l,modelValue:n}}}),xT={key:0},FT=["id","autocomplete","aria-expanded","aria-labelledby","disabled","readonly","name","unselectable"],zT=["textContent"],HT=["id","aria-labelledby","aria-expanded","autocomplete","disabled","name","readonly","unselectable"],KT=["textContent"];function WT(e,t,n,l,a,s){const r=ee("el-tag"),i=ee("el-tooltip"),u=ee("el-icon"),c=ee("el-select-menu"),f=Sl("model-text"),d=Sl("click-outside");return xe((w(),O("div",{ref:"selectRef",class:$([e.nsSelectV2.b(),e.nsSelectV2.m(e.selectSize)]),onClick:t[24]||(t[24]=Fe((...p)=>e.toggleMenu&&e.toggleMenu(...p),["stop"])),onMouseenter:t[25]||(t[25]=p=>e.states.comboBoxHovering=!0),onMouseleave:t[26]||(t[26]=p=>e.states.comboBoxHovering=!1)},[E(i,{ref:"popper",visible:e.dropdownMenuVisible,teleported:e.teleported,"popper-class":[e.nsSelectV2.e("popper"),e.popperClass],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":e.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:e.effect,placement:e.placement,pure:"",transition:`${e.nsSelectV2.namespace.value}-zoom-in-top`,trigger:"click",persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[23]||(t[23]=p=>e.states.inputValue=e.states.displayInputValue)},{default:N(()=>[R("div",{ref:"selectionRef",class:$([e.nsSelectV2.e("wrapper"),e.nsSelectV2.is("focused",e.states.isComposing||e.expanded),e.nsSelectV2.is("hovering",e.states.comboBoxHovering),e.nsSelectV2.is("filterable",e.filterable),e.nsSelectV2.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(w(),O("div",xT,[ie(e.$slots,"prefix")])):Z("v-if",!0),e.multiple?(w(),O("div",{key:1,class:$(e.nsSelectV2.e("selection"))},[e.collapseTags&&e.modelValue.length>0?(w(),O(Ne,{key:0},[(w(!0),O(Ne,null,Ze(e.showTagList,p=>(w(),O("div",{key:e.getValueKey(p),class:$(e.nsSelectV2.e("selected-item"))},[E(r,{closable:!e.selectDisabled&&!(p!=null&&p.disable),size:e.collapseTagSize,type:"info","disable-transitions":"",onClose:m=>e.deleteTag(m,p)},{default:N(()=>[R("span",{class:$(e.nsSelectV2.e("tags-text")),style:Re({maxWidth:`${e.tagMaxWidth}px`})},ae(p==null?void 0:p.label),7)]),_:2},1032,["closable","size","onClose"])],2))),128)),R("div",{class:$(e.nsSelectV2.e("selected-item"))},[e.modelValue.length>e.maxCollapseTags?(w(),G(r,{key:0,closable:!1,size:e.collapseTagSize,type:"info","disable-transitions":""},{default:N(()=>[e.collapseTagsTooltip?(w(),G(i,{key:0,disabled:e.dropdownMenuVisible,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:!1},{default:N(()=>[R("span",{class:$(e.nsSelectV2.e("tags-text")),style:Re({maxWidth:`${e.tagMaxWidth}px`})},"+ "+ae(e.modelValue.length-e.maxCollapseTags),7)]),content:N(()=>[R("div",{class:$(e.nsSelectV2.e("selection"))},[(w(!0),O(Ne,null,Ze(e.collapseTagList,p=>(w(),O("div",{key:e.getValueKey(p),class:$(e.nsSelectV2.e("selected-item"))},[E(r,{closable:!e.selectDisabled&&!p.disabled,size:e.collapseTagSize,class:"in-tooltip",type:"info","disable-transitions":"",onClose:m=>e.deleteTag(m,p)},{default:N(()=>[R("span",{class:$(e.nsSelectV2.e("tags-text")),style:Re({maxWidth:`${e.tagMaxWidth}px`})},ae(e.getLabel(p)),7)]),_:2},1032,["closable","size","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect"])):(w(),O("span",{key:1,class:$(e.nsSelectV2.e("tags-text")),style:Re({maxWidth:`${e.tagMaxWidth}px`})},"+ "+ae(e.modelValue.length-e.maxCollapseTags),7))]),_:1},8,["size"])):Z("v-if",!0)],2)],64)):(w(!0),O(Ne,{key:1},Ze(e.states.cachedOptions,p=>(w(),O("div",{key:e.getValueKey(p),class:$(e.nsSelectV2.e("selected-item"))},[E(r,{closable:!e.selectDisabled&&!p.disabled,size:e.collapseTagSize,type:"info","disable-transitions":"",onClose:m=>e.deleteTag(m,p)},{default:N(()=>[R("span",{class:$(e.nsSelectV2.e("tags-text")),style:Re({maxWidth:`${e.tagMaxWidth}px`})},ae(e.getLabel(p)),7)]),_:2},1032,["closable","size","onClose"])],2))),128)),R("div",{class:$([e.nsSelectV2.e("selected-item"),e.nsSelectV2.e("input-wrapper")]),style:Re(e.inputWrapperStyle)},[xe(R("input",{id:e.id,ref:"inputRef",autocomplete:e.autocomplete,"aria-autocomplete":"list","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":e.expanded,"aria-labelledby":e.label,class:$([e.nsSelectV2.is(e.selectSize),e.nsSelectV2.e("combobox-input")]),disabled:e.disabled,role:"combobox",readonly:!e.filterable,spellcheck:"false",type:"text",name:e.name,unselectable:e.expanded?"on":void 0,"onUpdate:modelValue":t[0]||(t[0]=(...p)=>e.onUpdateInputValue&&e.onUpdateInputValue(...p)),onFocus:t[1]||(t[1]=(...p)=>e.handleFocus&&e.handleFocus(...p)),onBlur:t[2]||(t[2]=(...p)=>e.handleBlur&&e.handleBlur(...p)),onInput:t[3]||(t[3]=(...p)=>e.onInput&&e.onInput(...p)),onCompositionstart:t[4]||(t[4]=(...p)=>e.handleCompositionStart&&e.handleCompositionStart(...p)),onCompositionupdate:t[5]||(t[5]=(...p)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...p)),onCompositionend:t[6]||(t[6]=(...p)=>e.handleCompositionEnd&&e.handleCompositionEnd(...p)),onKeydown:[t[7]||(t[7]=pt(Fe(p=>e.onKeyboardNavigate("backward"),["stop","prevent"]),["up"])),t[8]||(t[8]=pt(Fe(p=>e.onKeyboardNavigate("forward"),["stop","prevent"]),["down"])),t[9]||(t[9]=pt(Fe((...p)=>e.onKeyboardSelect&&e.onKeyboardSelect(...p),["stop","prevent"]),["enter"])),t[10]||(t[10]=pt(Fe((...p)=>e.handleEsc&&e.handleEsc(...p),["stop","prevent"]),["esc"])),t[11]||(t[11]=pt(Fe((...p)=>e.handleDel&&e.handleDel(...p),["stop"]),["delete"]))]},null,42,FT),[[f,e.states.displayInputValue]]),e.filterable?(w(),O("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:$(e.nsSelectV2.e("input-calculator")),textContent:ae(e.states.displayInputValue)},null,10,zT)):Z("v-if",!0)],6)],2)):(w(),O(Ne,{key:2},[R("div",{class:$([e.nsSelectV2.e("selected-item"),e.nsSelectV2.e("input-wrapper")])},[xe(R("input",{id:e.id,ref:"inputRef","aria-autocomplete":"list","aria-haspopup":"listbox","aria-labelledby":e.label,"aria-expanded":e.expanded,autocapitalize:"off",autocomplete:e.autocomplete,class:$(e.nsSelectV2.e("combobox-input")),disabled:e.disabled,name:e.name,role:"combobox",readonly:!e.filterable,spellcheck:"false",type:"text",unselectable:e.expanded?"on":void 0,onCompositionstart:t[12]||(t[12]=(...p)=>e.handleCompositionStart&&e.handleCompositionStart(...p)),onCompositionupdate:t[13]||(t[13]=(...p)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...p)),onCompositionend:t[14]||(t[14]=(...p)=>e.handleCompositionEnd&&e.handleCompositionEnd(...p)),onFocus:t[15]||(t[15]=(...p)=>e.handleFocus&&e.handleFocus(...p)),onBlur:t[16]||(t[16]=(...p)=>e.handleBlur&&e.handleBlur(...p)),onInput:t[17]||(t[17]=(...p)=>e.onInput&&e.onInput(...p)),onKeydown:[t[18]||(t[18]=pt(Fe(p=>e.onKeyboardNavigate("backward"),["stop","prevent"]),["up"])),t[19]||(t[19]=pt(Fe(p=>e.onKeyboardNavigate("forward"),["stop","prevent"]),["down"])),t[20]||(t[20]=pt(Fe((...p)=>e.onKeyboardSelect&&e.onKeyboardSelect(...p),["stop","prevent"]),["enter"])),t[21]||(t[21]=pt(Fe((...p)=>e.handleEsc&&e.handleEsc(...p),["stop","prevent"]),["esc"]))],"onUpdate:modelValue":t[22]||(t[22]=(...p)=>e.onUpdateInputValue&&e.onUpdateInputValue(...p))},null,42,HT),[[f,e.states.displayInputValue]])],2),e.filterable?(w(),O("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:$([e.nsSelectV2.e("selected-item"),e.nsSelectV2.e("input-calculator")]),textContent:ae(e.states.displayInputValue)},null,10,KT)):Z("v-if",!0)],64)),e.shouldShowPlaceholder?(w(),O("span",{key:3,class:$([e.nsSelectV2.e("placeholder"),e.nsSelectV2.is("transparent",e.multiple?e.modelValue.length===0:!e.hasModelValue)])},ae(e.currentPlaceholder),3)):Z("v-if",!0),R("span",{class:$(e.nsSelectV2.e("suffix"))},[e.iconComponent?xe((w(),G(u,{key:0,class:$([e.nsSelectV2.e("caret"),e.nsInput.e("icon"),e.iconReverse])},{default:N(()=>[(w(),G(rt(e.iconComponent)))]),_:1},8,["class"])),[[lt,!e.showClearBtn]]):Z("v-if",!0),e.showClearBtn&&e.clearIcon?(w(),G(u,{key:1,class:$([e.nsSelectV2.e("caret"),e.nsInput.e("icon")]),onClick:Fe(e.handleClear,["prevent","stop"])},{default:N(()=>[(w(),G(rt(e.clearIcon)))]),_:1},8,["class","onClick"])):Z("v-if",!0),e.validateState&&e.validateIcon?(w(),G(u,{key:2,class:$([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:N(()=>[(w(),G(rt(e.validateIcon)))]),_:1},8,["class"])):Z("v-if",!0)],2)],2)]),content:N(()=>[E(c,{ref:"menuRef",data:e.filteredOptions,width:e.popperSize,"hovering-index":e.states.hoveringIndex,"scrollbar-always-on":e.scrollbarAlwaysOn},{default:N(p=>[ie(e.$slots,"default",Nn(dr(p)))]),empty:N(()=>[ie(e.$slots,"empty",{},()=>[R("p",{class:$(e.nsSelectV2.e("empty"))},ae(e.emptyText?e.emptyText:""),3)])]),_:3},8,["data","width","hovering-index","scrollbar-always-on"])]),_:3},8,["visible","teleported","popper-class","popper-options","effect","placement","transition","persistent","onBeforeShow"])],34)),[[d,e.handleClickOutside,e.popperRef]])}var ca=he(BT,[["render",WT],["__file","/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/select.vue"]]);ca.install=e=>{e.component(ca.name,ca)};const UT=ca,jT=UT,qT=ge({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),GT=ge({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),YT=j({name:"ElSkeletonItem"}),XT=j({...YT,props:GT,setup(e){const t=ce("skeleton");return(n,l)=>(w(),O("div",{class:$([o(t).e("item"),o(t).e(n.variant)])},[n.variant==="image"?(w(),G(o(Sv),{key:0})):Z("v-if",!0)],2))}});var Oa=he(XT,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]);const ZT=j({name:"ElSkeleton"}),JT=j({...ZT,props:qT,setup(e,{expose:t}){const n=e,l=ce("skeleton"),a=Km(At(n,"loading"),n.throttle);return t({uiLoading:a}),(s,r)=>o(a)?(w(),O("div",ot({key:0,class:[o(l).b(),o(l).is("animated",s.animated)]},s.$attrs),[(w(!0),O(Ne,null,Ze(s.count,i=>(w(),O(Ne,{key:i},[s.loading?ie(s.$slots,"template",{key:i},()=>[E(Oa,{class:$(o(l).is("first")),variant:"p"},null,8,["class"]),(w(!0),O(Ne,null,Ze(s.rows,u=>(w(),G(Oa,{key:u,class:$([o(l).e("paragraph"),o(l).is("last",u===s.rows&&s.rows>1)]),variant:"p"},null,8,["class"]))),128))]):Z("v-if",!0)],64))),128))],16)):ie(s.$slots,"default",Nn(ot({key:1},s.$attrs)))}});var QT=he(JT,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]);const eI=Qe(QT,{SkeletonItem:Oa}),tI=xt(Oa),Lf=Symbol("sliderContextKey"),nI=ge({modelValue:{type:te([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:ln,inputSize:ln,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:te(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},label:{type:String,default:void 0},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:te(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:Do,default:"top"},marks:{type:te(Object)},validateEvent:{type:Boolean,default:!0}}),ys=e=>He(e)||et(e)&&e.every(He),lI={[tt]:ys,[rn]:ys,[Mt]:ys},oI=(e,t,n)=>{const l=_();return ze(async()=>{e.range?(Array.isArray(e.modelValue)?(t.firstValue=Math.max(e.min,e.modelValue[0]),t.secondValue=Math.min(e.max,e.modelValue[1])):(t.firstValue=e.min,t.secondValue=e.max),t.oldValue=[t.firstValue,t.secondValue]):(typeof e.modelValue!="number"||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),Jt(window,"resize",n),await Le(),n()}),{sliderWrapper:l}},aI=e=>S(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((n,l)=>n-l).filter(n=>n<=e.max&&n>=e.min).map(n=>({point:n,position:(n-e.min)*100/(e.max-e.min),mark:e.marks[n]})):[]),sI=(e,t,n)=>{const{form:l,formItem:a}=fn(),s=Nt(),r=_(),i=_(),u={firstButton:r,secondButton:i},c=S(()=>e.disabled||(l==null?void 0:l.disabled)||!1),f=S(()=>Math.min(t.firstValue,t.secondValue)),d=S(()=>Math.max(t.firstValue,t.secondValue)),p=S(()=>e.range?`${100*(d.value-f.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),m=S(()=>e.range?`${100*(f.value-e.min)/(e.max-e.min)}%`:"0%"),h=S(()=>e.vertical?{height:e.height}:{}),v=S(()=>e.vertical?{height:p.value,bottom:m.value}:{width:p.value,left:m.value}),g=()=>{s.value&&(t.sliderSize=s.value[`client${e.vertical?"Height":"Width"}`])},y=B=>{const F=e.min+B*(e.max-e.min)/100;if(!e.range)return r;let x;return Math.abs(f.value-F)<Math.abs(d.value-F)?x=t.firstValue<t.secondValue?"firstButton":"secondButton":x=t.firstValue>t.secondValue?"firstButton":"secondButton",u[x]},k=B=>{const F=y(B);return F.value.setPosition(B),F},b=B=>{t.firstValue=B,I(e.range?[f.value,d.value]:B)},C=B=>{t.secondValue=B,e.range&&I([f.value,d.value])},I=B=>{n(tt,B),n(rn,B)},T=async()=>{await Le(),n(Mt,e.range?[f.value,d.value]:e.modelValue)},M=B=>{var F,x,U,X,K,V;if(c.value||t.dragging)return;g();let W=0;if(e.vertical){const P=(U=(x=(F=B.touches)==null?void 0:F.item(0))==null?void 0:x.clientY)!=null?U:B.clientY;W=(s.value.getBoundingClientRect().bottom-P)/t.sliderSize*100}else{const P=(V=(K=(X=B.touches)==null?void 0:X.item(0))==null?void 0:K.clientX)!=null?V:B.clientX,H=s.value.getBoundingClientRect().left;W=(P-H)/t.sliderSize*100}if(!(W<0||W>100))return k(W)};return{elFormItem:a,slider:s,firstButton:r,secondButton:i,sliderDisabled:c,minValue:f,maxValue:d,runwayStyle:h,barStyle:v,resetSize:g,setPosition:k,emitChange:T,onSliderWrapperPrevent:B=>{var F,x;((F=u.firstButton.value)!=null&&F.dragging||(x=u.secondButton.value)!=null&&x.dragging)&&B.preventDefault()},onSliderClick:B=>{M(B)&&T()},onSliderDown:async B=>{const F=M(B);F&&(await Le(),F.value.onButtonDown(B))},setFirstValue:b,setSecondValue:C}},{left:rI,down:iI,right:uI,up:cI,home:dI,end:fI,pageUp:pI,pageDown:vI}=Ae,mI=(e,t,n)=>{const l=_(),a=_(!1),s=S(()=>t.value instanceof Function),r=S(()=>s.value&&t.value(e.modelValue)||e.modelValue),i=hn(()=>{n.value&&(a.value=!0)},50),u=hn(()=>{n.value&&(a.value=!1)},50);return{tooltip:l,tooltipVisible:a,formatValue:r,displayTooltip:i,hideTooltip:u}},hI=(e,t,n)=>{const{disabled:l,min:a,max:s,step:r,showTooltip:i,precision:u,sliderSize:c,formatTooltip:f,emitChange:d,resetSize:p,updateDragging:m}=Me(Lf),{tooltip:h,tooltipVisible:v,formatValue:g,displayTooltip:y,hideTooltip:k}=mI(e,f,i),b=_(),C=S(()=>`${(e.modelValue-a.value)/(s.value-a.value)*100}%`),I=S(()=>e.vertical?{bottom:C.value}:{left:C.value}),T=()=>{t.hovering=!0,y()},M=()=>{t.hovering=!1,t.dragging||k()},L=z=>{l.value||(z.preventDefault(),W(z),window.addEventListener("mousemove",P),window.addEventListener("touchmove",P),window.addEventListener("mouseup",H),window.addEventListener("touchend",H),window.addEventListener("contextmenu",H),b.value.focus())},A=z=>{l.value||(t.newPosition=Number.parseFloat(C.value)+z/(s.value-a.value)*100,Y(t.newPosition),d())},D=()=>{A(-r.value)},B=()=>{A(r.value)},F=()=>{A(-r.value*4)},x=()=>{A(r.value*4)},U=()=>{l.value||(Y(0),d())},X=()=>{l.value||(Y(100),d())},K=z=>{let q=!0;[rI,iI].includes(z.key)?D():[uI,cI].includes(z.key)?B():z.key===dI?U():z.key===fI?X():z.key===vI?F():z.key===pI?x():q=!1,q&&z.preventDefault()},V=z=>{let q,se;return z.type.startsWith("touch")?(se=z.touches[0].clientY,q=z.touches[0].clientX):(se=z.clientY,q=z.clientX),{clientX:q,clientY:se}},W=z=>{t.dragging=!0,t.isClick=!0;const{clientX:q,clientY:se}=V(z);e.vertical?t.startY=se:t.startX=q,t.startPosition=Number.parseFloat(C.value),t.newPosition=t.startPosition},P=z=>{if(t.dragging){t.isClick=!1,y(),p();let q;const{clientX:se,clientY:pe}=V(z);e.vertical?(t.currentY=pe,q=(t.startY-t.currentY)/c.value*100):(t.currentX=se,q=(t.currentX-t.startX)/c.value*100),t.newPosition=t.startPosition+q,Y(t.newPosition)}},H=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||k(),t.isClick||Y(t.newPosition),d()},0),window.removeEventListener("mousemove",P),window.removeEventListener("touchmove",P),window.removeEventListener("mouseup",H),window.removeEventListener("touchend",H),window.removeEventListener("contextmenu",H))},Y=async z=>{if(z===null||Number.isNaN(+z))return;z<0?z=0:z>100&&(z=100);const q=100/((s.value-a.value)/r.value);let pe=Math.round(z/q)*q*(s.value-a.value)*.01+a.value;pe=Number.parseFloat(pe.toFixed(u.value)),pe!==e.modelValue&&n(tt,pe),!t.dragging&&e.modelValue!==t.oldValue&&(t.oldValue=e.modelValue),await Le(),t.dragging&&y(),h.value.updatePopper()};return ue(()=>t.dragging,z=>{m(z)}),{disabled:l,button:b,tooltip:h,tooltipVisible:v,showTooltip:i,wrapperStyle:I,formatValue:g,handleMouseEnter:T,handleMouseLeave:M,onButtonDown:L,onKeyDown:K,setPosition:Y}},gI=(e,t,n,l)=>({stops:S(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step===0)return[];const r=(e.max-e.min)/e.step,i=100*e.step/(e.max-e.min),u=Array.from({length:r-1}).map((c,f)=>(f+1)*i);return e.range?u.filter(c=>c<100*(n.value-e.min)/(e.max-e.min)||c>100*(l.value-e.min)/(e.max-e.min)):u.filter(c=>c>100*(t.firstValue-e.min)/(e.max-e.min))}),getStopStyle:r=>e.vertical?{bottom:`${r}%`}:{left:`${r}%`}}),yI=(e,t,n,l,a,s)=>{const r=c=>{a(tt,c),a(rn,c)},i=()=>e.range?![n.value,l.value].every((c,f)=>c===t.oldValue[f]):e.modelValue!==t.oldValue,u=()=>{var c,f;e.min>e.max&&jt("Slider","min should not be greater than max.");const d=e.modelValue;e.range&&Array.isArray(d)?d[1]<e.min?r([e.min,e.min]):d[0]>e.max?r([e.max,e.max]):d[0]<e.min?r([e.min,d[1]]):d[1]>e.max?r([d[0],e.max]):(t.firstValue=d[0],t.secondValue=d[1],i()&&(e.validateEvent&&((c=s==null?void 0:s.validate)==null||c.call(s,"change").catch(p=>void 0)),t.oldValue=d.slice())):!e.range&&typeof d=="number"&&!Number.isNaN(d)&&(d<e.min?r(e.min):d>e.max?r(e.max):(t.firstValue=d,i()&&(e.validateEvent&&((f=s==null?void 0:s.validate)==null||f.call(s,"change").catch(p=>void 0)),t.oldValue=d)))};u(),ue(()=>t.dragging,c=>{c||u()}),ue(()=>e.modelValue,(c,f)=>{t.dragging||Array.isArray(c)&&Array.isArray(f)&&c.every((d,p)=>d===f[p])&&t.firstValue===c[0]&&t.secondValue===c[1]||u()},{deep:!0}),ue(()=>[e.min,e.max],()=>{u()})},bI=ge({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:Do,default:"top"}}),wI={[tt]:e=>He(e)},kI=["tabindex"],CI=j({name:"ElSliderButton"}),SI=j({...CI,props:bI,emits:wI,setup(e,{expose:t,emit:n}){const l=e,a=ce("slider"),s=St({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:l.modelValue}),{disabled:r,button:i,tooltip:u,showTooltip:c,tooltipVisible:f,wrapperStyle:d,formatValue:p,handleMouseEnter:m,handleMouseLeave:h,onButtonDown:v,onKeyDown:g,setPosition:y}=hI(l,s,n),{hovering:k,dragging:b}=Gt(s);return t({onButtonDown:v,onKeyDown:g,setPosition:y,hovering:k,dragging:b}),(C,I)=>(w(),O("div",{ref_key:"button",ref:i,class:$([o(a).e("button-wrapper"),{hover:o(k),dragging:o(b)}]),style:Re(o(d)),tabindex:o(r)?-1:0,onMouseenter:I[0]||(I[0]=(...T)=>o(m)&&o(m)(...T)),onMouseleave:I[1]||(I[1]=(...T)=>o(h)&&o(h)(...T)),onMousedown:I[2]||(I[2]=(...T)=>o(v)&&o(v)(...T)),onTouchstart:I[3]||(I[3]=(...T)=>o(v)&&o(v)(...T)),onFocus:I[4]||(I[4]=(...T)=>o(m)&&o(m)(...T)),onBlur:I[5]||(I[5]=(...T)=>o(h)&&o(h)(...T)),onKeydown:I[6]||(I[6]=(...T)=>o(g)&&o(g)(...T))},[E(o(cn),{ref_key:"tooltip",ref:u,visible:o(f),placement:C.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":C.tooltipClass,disabled:!o(c),persistent:""},{content:N(()=>[R("span",null,ae(o(p)),1)]),default:N(()=>[R("div",{class:$([o(a).e("button"),{hover:o(k),dragging:o(b)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled"])],46,kI))}});var fu=he(SI,[["__file","/home/runner/work/element-plus/element-plus/packages/components/slider/src/button.vue"]]);const _I=ge({mark:{type:te([String,Object]),default:void 0}});var EI=j({name:"ElSliderMarker",props:_I,setup(e){const t=ce("slider"),n=S(()=>ct(e.mark)?e.mark:e.mark.label),l=S(()=>ct(e.mark)?void 0:e.mark.style);return()=>De("div",{class:t.e("marks-text"),style:l.value},n.value)}});const $I=["id","role","aria-label","aria-labelledby"],TI={key:1},II=j({name:"ElSlider"}),NI=j({...II,props:nI,emits:lI,setup(e,{expose:t,emit:n}){const l=e,a=ce("slider"),{t:s}=ht(),r=St({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:i,slider:u,firstButton:c,secondButton:f,sliderDisabled:d,minValue:p,maxValue:m,runwayStyle:h,barStyle:v,resetSize:g,emitChange:y,onSliderWrapperPrevent:k,onSliderClick:b,onSliderDown:C,setFirstValue:I,setSecondValue:T}=sI(l,r,n),{stops:M,getStopStyle:L}=gI(l,r,p,m),{inputId:A,isLabeledByFormItem:D}=cl(l,{formItemContext:i}),B=qt(),F=S(()=>l.inputSize||B.value),x=S(()=>l.label||s("el.slider.defaultLabel",{min:l.min,max:l.max})),U=S(()=>l.range?l.rangeStartLabel||s("el.slider.defaultRangeStartLabel"):x.value),X=S(()=>l.formatValueText?l.formatValueText(z.value):`${z.value}`),K=S(()=>l.rangeEndLabel||s("el.slider.defaultRangeEndLabel")),V=S(()=>l.formatValueText?l.formatValueText(q.value):`${q.value}`),W=S(()=>[a.b(),a.m(B.value),a.is("vertical",l.vertical),{[a.m("with-input")]:l.showInput}]),P=aI(l);yI(l,r,p,m,n,i);const H=S(()=>{const oe=[l.min,l.max,l.step].map(re=>{const Q=`${re}`.split(".")[1];return Q?Q.length:0});return Math.max.apply(null,oe)}),{sliderWrapper:Y}=oI(l,r,g),{firstValue:z,secondValue:q,sliderSize:se}=Gt(r),pe=oe=>{r.dragging=oe};return dt(Lf,{...Gt(l),sliderSize:se,disabled:d,precision:H,emitChange:y,resetSize:g,updateDragging:pe}),t({onSliderClick:b}),(oe,re)=>{var Q,ve;return w(),O("div",{id:oe.range?o(A):void 0,ref_key:"sliderWrapper",ref:Y,class:$(o(W)),role:oe.range?"group":void 0,"aria-label":oe.range&&!o(D)?o(x):void 0,"aria-labelledby":oe.range&&o(D)?(Q=o(i))==null?void 0:Q.labelId:void 0,onTouchstart:re[2]||(re[2]=(..._e)=>o(k)&&o(k)(..._e)),onTouchmove:re[3]||(re[3]=(..._e)=>o(k)&&o(k)(..._e))},[R("div",{ref_key:"slider",ref:u,class:$([o(a).e("runway"),{"show-input":oe.showInput&&!oe.range},o(a).is("disabled",o(d))]),style:Re(o(h)),onMousedown:re[0]||(re[0]=(..._e)=>o(C)&&o(C)(..._e)),onTouchstart:re[1]||(re[1]=(..._e)=>o(C)&&o(C)(..._e))},[R("div",{class:$(o(a).e("bar")),style:Re(o(v))},null,6),E(fu,{id:oe.range?void 0:o(A),ref_key:"firstButton",ref:c,"model-value":o(z),vertical:oe.vertical,"tooltip-class":oe.tooltipClass,placement:oe.placement,role:"slider","aria-label":oe.range||!o(D)?o(U):void 0,"aria-labelledby":!oe.range&&o(D)?(ve=o(i))==null?void 0:ve.labelId:void 0,"aria-valuemin":oe.min,"aria-valuemax":oe.range?o(q):oe.max,"aria-valuenow":o(z),"aria-valuetext":o(X),"aria-orientation":oe.vertical?"vertical":"horizontal","aria-disabled":o(d),"onUpdate:modelValue":o(I)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),oe.range?(w(),G(fu,{key:0,ref_key:"secondButton",ref:f,"model-value":o(q),vertical:oe.vertical,"tooltip-class":oe.tooltipClass,placement:oe.placement,role:"slider","aria-label":o(K),"aria-valuemin":o(z),"aria-valuemax":oe.max,"aria-valuenow":o(q),"aria-valuetext":o(V),"aria-orientation":oe.vertical?"vertical":"horizontal","aria-disabled":o(d),"onUpdate:modelValue":o(T)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):Z("v-if",!0),oe.showStops?(w(),O("div",TI,[(w(!0),O(Ne,null,Ze(o(M),(_e,Te)=>(w(),O("div",{key:Te,class:$(o(a).e("stop")),style:Re(o(L)(_e))},null,6))),128))])):Z("v-if",!0),o(P).length>0?(w(),O(Ne,{key:2},[R("div",null,[(w(!0),O(Ne,null,Ze(o(P),(_e,Te)=>(w(),O("div",{key:Te,style:Re(o(L)(_e.position)),class:$([o(a).e("stop"),o(a).e("marks-stop")])},null,6))),128))]),R("div",{class:$(o(a).e("marks"))},[(w(!0),O(Ne,null,Ze(o(P),(_e,Te)=>(w(),G(o(EI),{key:Te,mark:_e.mark,style:Re(o(L)(_e.position))},null,8,["mark","style"]))),128))],2)],64)):Z("v-if",!0)],38),oe.showInput&&!oe.range?(w(),G(o(of),{key:0,ref:"input","model-value":o(z),class:$(o(a).e("input")),step:oe.step,disabled:o(d),controls:oe.showInputControls,min:oe.min,max:oe.max,debounce:oe.debounce,size:o(F),"onUpdate:modelValue":o(I),onChange:o(y)},null,8,["model-value","class","step","disabled","controls","min","max","debounce","size","onUpdate:modelValue","onChange"])):Z("v-if",!0)],42,$I)}}});var PI=he(NI,[["__file","/home/runner/work/element-plus/element-plus/packages/components/slider/src/slider.vue"]]);const MI=Qe(PI),LI=ge({prefixCls:{type:String}}),pu=j({name:"ElSpaceItem",props:LI,setup(e,{slots:t}){const n=ce("space"),l=S(()=>`${e.prefixCls||n.b()}__item`);return()=>De("div",{class:l.value},ie(t,"default"))}}),vu={small:8,default:12,large:16};function RI(e){const t=ce("space"),n=S(()=>[t.b(),t.m(e.direction),e.class]),l=_(0),a=_(0),s=S(()=>{const i=e.wrap||e.fill?{flexWrap:"wrap",marginBottom:`-${a.value}px`}:{},u={alignItems:e.alignment};return[i,u,e.style]}),r=S(()=>{const i={paddingBottom:`${a.value}px`,marginRight:`${l.value}px`},u=e.fill?{flexGrow:1,minWidth:`${e.fillRatio}%`}:{};return[i,u]});return Cn(()=>{const{size:i="small",wrap:u,direction:c,fill:f}=e;if(et(i)){const[d=0,p=0]=i;l.value=d,a.value=p}else{let d;He(i)?d=i:d=vu[i||"small"]||vu.small,(u||f)&&c==="horizontal"?l.value=a.value=d:c==="horizontal"?(l.value=d,a.value=0):(a.value=d,l.value=0)}}),{classes:n,containerStyle:s,itemStyle:r}}const OI=ge({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:te([String,Object,Array]),default:""},style:{type:te([String,Array,Object]),default:""},alignment:{type:te(String),default:"center"},prefixCls:{type:String},spacer:{type:te([Object,String,Number,Array]),default:null,validator:e=>zt(e)||He(e)||ct(e)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:Hn,validator:e=>He(e)||et(e)&&e.length===2&&e.every(He)}}),AI=j({name:"ElSpace",props:OI,setup(e,{slots:t}){const{classes:n,containerStyle:l,itemStyle:a}=RI(e);function s(r,i="",u=[]){const{prefixCls:c}=e;return r.forEach((f,d)=>{$s(f)?et(f.children)&&f.children.forEach((p,m)=>{$s(p)&&et(p.children)?s(p.children,`${i+m}-`,u):u.push(E(pu,{style:a.value,prefixCls:c,key:`nested-${i+m}`},{default:()=>[p]},bn.PROPS|bn.STYLE,["style","prefixCls"]))}):Im(f)&&u.push(E(pu,{style:a.value,prefixCls:c,key:`LoopKey${i+d}`},{default:()=>[f]},bn.PROPS|bn.STYLE,["style","prefixCls"]))}),u}return()=>{var r;const{spacer:i,direction:u}=e,c=ie(t,"default",{key:0},()=>[]);if(((r=c.children)!=null?r:[]).length===0)return null;if(et(c.children)){let f=s(c.children);if(i){const d=f.length-1;f=f.reduce((p,m,h)=>{const v=[...p,m];return h!==d&&v.push(E("span",{style:[a.value,u==="vertical"?"width: 100%":null],key:h},[zt(i)?i:ye(i,bn.TEXT)],bn.STYLE)),v},[])}return E("div",{class:n.value,style:l.value},f,bn.STYLE|bn.CLASS)}return c.children}}}),VI=Qe(AI),DI=ge({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:te([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:te([String,Object,Array])}}),BI=j({name:"ElStatistic"}),xI=j({...BI,props:DI,setup(e,{expose:t}){const n=e,l=ce("statistic"),a=S(()=>{const{value:s,formatter:r,precision:i,decimalSeparator:u,groupSeparator:c}=n;if(kt(r))return r(s);if(!He(s))return s;let[f,d=""]=String(s).split(".");return d=d.padEnd(i,"0").slice(0,i>0?i:0),f=f.replace(/\B(?=(\d{3})+(?!\d))/g,c),[f,d].join(d?u:"")});return t({displayValue:a}),(s,r)=>(w(),O("div",{class:$(o(l).b())},[s.$slots.title||s.title?(w(),O("div",{key:0,class:$(o(l).e("head"))},[ie(s.$slots,"title",{},()=>[ye(ae(s.title),1)])],2)):Z("v-if",!0),R("div",{class:$(o(l).e("content"))},[s.$slots.prefix||s.prefix?(w(),O("div",{key:0,class:$(o(l).e("prefix"))},[ie(s.$slots,"prefix",{},()=>[R("span",null,ae(s.prefix),1)])],2)):Z("v-if",!0),R("span",{class:$(o(l).e("number")),style:Re(s.valueStyle)},ae(o(a)),7),s.$slots.suffix||s.suffix?(w(),O("div",{key:1,class:$(o(l).e("suffix"))},[ie(s.$slots,"suffix",{},()=>[R("span",null,ae(s.suffix),1)])],2)):Z("v-if",!0)],2)],2))}});var FI=he(xI,[["__file","/home/runner/work/element-plus/element-plus/packages/components/statistic/src/statistic.vue"]]);const Rf=Qe(FI),zI=ge({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:te([Number,Object]),default:0},valueStyle:{type:te([String,Object,Array])}}),HI={finish:()=>!0,[Mt]:e=>He(e)},KI=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],mu=e=>He(e)?new Date(e).getTime():e.valueOf(),hu=(e,t)=>{let n=e;const l=/\[([^\]]*)]/g;return KI.reduce((s,[r,i])=>{const u=new RegExp(`${r}+(?![^\\[\\]]*\\])`,"g");if(u.test(s)){const c=Math.floor(n/i);return n-=c*i,s.replace(u,f=>String(c).padStart(f.length,"0"))}return s},t).replace(l,"$1")},WI=j({name:"ElCountdown"}),UI=j({...WI,props:zI,emits:HI,setup(e,{expose:t,emit:n}){const l=e;let a;const s=_(mu(l.value)-Date.now()),r=S(()=>hu(s.value,l.format)),i=f=>hu(f,l.format),u=()=>{a&&(qa(a),a=void 0)},c=()=>{const f=mu(l.value),d=()=>{let p=f-Date.now();n("change",p),p<=0?(p=0,u(),n("finish")):a=Co(d),s.value=p};a=Co(d)};return ue(()=>[l.value,l.format],()=>{u(),c()},{immediate:!0}),Rt(()=>{u()}),t({displayValue:r}),(f,d)=>(w(),G(o(Rf),{value:s.value,title:f.title,prefix:f.prefix,suffix:f.suffix,"value-style":f.valueStyle,formatter:i},xn({_:2},[Ze(f.$slots,(p,m)=>({name:m,fn:N(()=>[ie(f.$slots,m)])}))]),1032,["value","title","prefix","suffix","value-style"]))}});var jI=he(UI,[["__file","/home/runner/work/element-plus/element-plus/packages/components/countdown/src/countdown.vue"]]);const qI=Qe(jI),GI=ge({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),YI={[Mt]:(e,t)=>[e,t].every(He)},XI=j({name:"ElSteps"}),ZI=j({...XI,props:GI,emits:YI,setup(e,{emit:t}){const n=e,l=ce("steps"),{children:a,addChild:s,removeChild:r}=$r(at(),"ElStep");return ue(a,()=>{a.value.forEach((i,u)=>{i.setIndex(u)})}),dt("ElSteps",{props:n,steps:a,addStep:s,removeStep:r}),ue(()=>n.active,(i,u)=>{t(Mt,i,u)}),(i,u)=>(w(),O("div",{class:$([o(l).b(),o(l).m(i.simple?"simple":i.direction)])},[ie(i.$slots,"default")],2))}});var JI=he(ZI,[["__file","/home/runner/work/element-plus/element-plus/packages/components/steps/src/steps.vue"]]);const QI=ge({title:{type:String,default:""},icon:{type:Pt},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),eN=j({name:"ElStep"}),tN=j({...eN,props:QI,setup(e){const t=e,n=ce("step"),l=_(-1),a=_({}),s=_(""),r=Me("ElSteps"),i=at();ze(()=>{ue([()=>r.props.active,()=>r.props.processStatus,()=>r.props.finishStatus],([T])=>{C(T)},{immediate:!0})}),Rt(()=>{r.removeStep(I.uid)});const u=S(()=>t.status||s.value),c=S(()=>{const T=r.steps.value[l.value-1];return T?T.currentStatus:"wait"}),f=S(()=>r.props.alignCenter),d=S(()=>r.props.direction==="vertical"),p=S(()=>r.props.simple),m=S(()=>r.steps.value.length),h=S(()=>{var T;return((T=r.steps.value[m.value-1])==null?void 0:T.uid)===(i==null?void 0:i.uid)}),v=S(()=>p.value?"":r.props.space),g=S(()=>[n.b(),n.is(p.value?"simple":r.props.direction),n.is("flex",h.value&&!v.value&&!f.value),n.is("center",f.value&&!d.value&&!p.value)]),y=S(()=>{const T={flexBasis:He(v.value)?`${v.value}px`:v.value?v.value:`${100/(m.value-(f.value?0:1))}%`};return d.value||h.value&&(T.maxWidth=`${100/m.value}%`),T}),k=T=>{l.value=T},b=T=>{const M=T==="wait",L={transitionDelay:`${M?"-":""}${150*l.value}ms`},A=T===r.props.processStatus||M?0:100;L.borderWidth=A&&!p.value?"1px":0,L[r.props.direction==="vertical"?"height":"width"]=`${A}%`,a.value=L},C=T=>{T>l.value?s.value=r.props.finishStatus:T===l.value&&c.value!=="error"?s.value=r.props.processStatus:s.value="wait";const M=r.steps.value[l.value-1];M&&M.calcProgress(s.value)},I=St({uid:i.uid,currentStatus:u,setIndex:k,calcProgress:b});return r.addStep(I),(T,M)=>(w(),O("div",{style:Re(o(y)),class:$(o(g))},[Z(" icon & line "),R("div",{class:$([o(n).e("head"),o(n).is(o(u))])},[o(p)?Z("v-if",!0):(w(),O("div",{key:0,class:$(o(n).e("line"))},[R("i",{class:$(o(n).e("line-inner")),style:Re(a.value)},null,6)],2)),R("div",{class:$([o(n).e("icon"),o(n).is(T.icon||T.$slots.icon?"icon":"text")])},[ie(T.$slots,"icon",{},()=>[T.icon?(w(),G(o(Pe),{key:0,class:$(o(n).e("icon-inner"))},{default:N(()=>[(w(),G(rt(T.icon)))]),_:1},8,["class"])):o(u)==="success"?(w(),G(o(Pe),{key:1,class:$([o(n).e("icon-inner"),o(n).is("status")])},{default:N(()=>[E(o(no))]),_:1},8,["class"])):o(u)==="error"?(w(),G(o(Pe),{key:2,class:$([o(n).e("icon-inner"),o(n).is("status")])},{default:N(()=>[E(o(Sn))]),_:1},8,["class"])):o(p)?Z("v-if",!0):(w(),O("div",{key:3,class:$(o(n).e("icon-inner"))},ae(l.value+1),3))])],2)],2),Z(" title & description "),R("div",{class:$(o(n).e("main"))},[R("div",{class:$([o(n).e("title"),o(n).is(o(u))])},[ie(T.$slots,"title",{},()=>[ye(ae(T.title),1)])],2),o(p)?(w(),O("div",{key:0,class:$(o(n).e("arrow"))},null,2)):(w(),O("div",{key:1,class:$([o(n).e("description"),o(n).is(o(u))])},[ie(T.$slots,"description",{},()=>[ye(ae(T.description),1)])],2))],2)],6))}});var Of=he(tN,[["__file","/home/runner/work/element-plus/element-plus/packages/components/steps/src/item.vue"]]);const nN=Qe(JI,{Step:Of}),lN=xt(Of),oN=ge({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:String,validator:Ua},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},activeIcon:{type:Pt},inactiveIcon:{type:Pt},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},borderColor:{type:String,default:""},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:te(Function)},id:String,tabindex:{type:[String,Number]},value:{type:[Boolean,String,Number],default:!1}}),aN={[tt]:e=>Kt(e)||ct(e)||He(e),[Mt]:e=>Kt(e)||ct(e)||He(e),[rn]:e=>Kt(e)||ct(e)||He(e)},sN=["onClick"],rN=["id","aria-checked","aria-disabled","name","true-value","false-value","disabled","tabindex","onKeydown"],iN=["aria-hidden"],uN=["aria-hidden"],cN=["aria-hidden"],qs="ElSwitch",dN=j({name:qs}),fN=j({...dN,props:oN,emits:aN,setup(e,{expose:t,emit:n}){const l=e,a=at(),{formItem:s}=fn(),r=qt(),i=ce("switch");(L=>{L.forEach(A=>{Fn({from:A[0],replacement:A[1],scope:qs,version:"2.3.0",ref:"https://element-plus.org/en-US/component/switch.html#attributes",type:"Attribute"},S(()=>{var D;return!!((D=a.vnode.props)!=null&&D[A[2]])}))})})([['"value"','"model-value" or "v-model"',"value"],['"active-color"',"CSS var `--el-switch-on-color`","activeColor"],['"inactive-color"',"CSS var `--el-switch-off-color`","inactiveColor"],['"border-color"',"CSS var `--el-switch-border-color`","borderColor"]]);const{inputId:c}=cl(l,{formItemContext:s}),f=gn(S(()=>l.loading)),d=_(l.modelValue!==!1),p=_(),m=_(),h=S(()=>[i.b(),i.m(r.value),i.is("disabled",f.value),i.is("checked",b.value)]),v=S(()=>[i.e("label"),i.em("label","left"),i.is("active",!b.value)]),g=S(()=>[i.e("label"),i.em("label","right"),i.is("active",b.value)]),y=S(()=>({width:Ft(l.width)}));ue(()=>l.modelValue,()=>{d.value=!0}),ue(()=>l.value,()=>{d.value=!1});const k=S(()=>d.value?l.modelValue:l.value),b=S(()=>k.value===l.activeValue);[l.activeValue,l.inactiveValue].includes(k.value)||(n(tt,l.inactiveValue),n(Mt,l.inactiveValue),n(rn,l.inactiveValue)),ue(b,L=>{var A;p.value.checked=L,l.validateEvent&&((A=s==null?void 0:s.validate)==null||A.call(s,"change").catch(D=>void 0))});const C=()=>{const L=b.value?l.inactiveValue:l.activeValue;n(tt,L),n(Mt,L),n(rn,L),Le(()=>{p.value.checked=b.value})},I=()=>{if(f.value)return;const{beforeChange:L}=l;if(!L){C();return}const A=L();[Es(A),Kt(A)].includes(!0)||jt(qs,"beforeChange must return type `Promise<boolean>` or `boolean`"),Es(A)?A.then(B=>{B&&C()}).catch(B=>{}):A&&C()},T=S(()=>i.cssVarBlock({...l.activeColor?{"on-color":l.activeColor}:null,...l.inactiveColor?{"off-color":l.inactiveColor}:null,...l.borderColor?{"border-color":l.borderColor}:null})),M=()=>{var L,A;(A=(L=p.value)==null?void 0:L.focus)==null||A.call(L)};return ze(()=>{p.value.checked=b.value}),t({focus:M,checked:b}),(L,A)=>(w(),O("div",{class:$(o(h)),style:Re(o(T)),onClick:Fe(I,["prevent"])},[R("input",{id:o(c),ref_key:"input",ref:p,class:$(o(i).e("input")),type:"checkbox",role:"switch","aria-checked":o(b),"aria-disabled":o(f),name:L.name,"true-value":L.activeValue,"false-value":L.inactiveValue,disabled:o(f),tabindex:L.tabindex,onChange:C,onKeydown:pt(I,["enter"])},null,42,rN),!L.inlinePrompt&&(L.inactiveIcon||L.inactiveText)?(w(),O("span",{key:0,class:$(o(v))},[L.inactiveIcon?(w(),G(o(Pe),{key:0},{default:N(()=>[(w(),G(rt(L.inactiveIcon)))]),_:1})):Z("v-if",!0),!L.inactiveIcon&&L.inactiveText?(w(),O("span",{key:1,"aria-hidden":o(b)},ae(L.inactiveText),9,iN)):Z("v-if",!0)],2)):Z("v-if",!0),R("span",{ref_key:"core",ref:m,class:$(o(i).e("core")),style:Re(o(y))},[L.inlinePrompt?(w(),O("div",{key:0,class:$(o(i).e("inner"))},[L.activeIcon||L.inactiveIcon?(w(),G(o(Pe),{key:0,class:$(o(i).is("icon"))},{default:N(()=>[(w(),G(rt(o(b)?L.activeIcon:L.inactiveIcon)))]),_:1},8,["class"])):L.activeText||L.inactiveText?(w(),O("span",{key:1,class:$(o(i).is("text")),"aria-hidden":!o(b)},ae(o(b)?L.activeText:L.inactiveText),11,uN)):Z("v-if",!0)],2)):Z("v-if",!0),R("div",{class:$(o(i).e("action"))},[L.loading?(w(),G(o(Pe),{key:0,class:$(o(i).is("loading"))},{default:N(()=>[E(o(Xn))]),_:1},8,["class"])):Z("v-if",!0)],2)],6),!L.inlinePrompt&&(L.activeIcon||L.activeText)?(w(),O("span",{key:1,class:$(o(g))},[L.activeIcon?(w(),G(o(Pe),{key:0},{default:N(()=>[(w(),G(rt(L.activeIcon)))]),_:1})):Z("v-if",!0),!L.activeIcon&&L.activeText?(w(),O("span",{key:1,"aria-hidden":!o(b)},ae(L.activeText),9,cN)):Z("v-if",!0)],2)):Z("v-if",!0)],14,sN))}});var pN=he(fN,[["__file","/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]);const vN=Qe(pN),bs=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},mN=function(e,t,n,l,a){if(!t&&!l&&(!a||Array.isArray(a)&&!a.length))return e;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const s=l?null:function(i,u){return a?(Array.isArray(a)||(a=[a]),a.map(c=>typeof c=="string"?Vt(i,c):c(i,u,e))):(t!=="$key"&&It(i)&&"$value"in i&&(i=i.$value),[It(i)?Vt(i,t):i])},r=function(i,u){if(l)return l(i.value,u.value);for(let c=0,f=i.key.length;c<f;c++){if(i.key[c]<u.key[c])return-1;if(i.key[c]>u.key[c])return 1}return 0};return e.map((i,u)=>({value:i,index:u,key:s?s(i,u):null})).sort((i,u)=>{let c=r(i,u);return c||(c=i.index-u.index),c*+n}).map(i=>i.value)},Af=function(e,t){let n=null;return e.columns.forEach(l=>{l.id===t&&(n=l)}),n},hN=function(e,t){let n=null;for(let l=0;l<e.columns.length;l++){const a=e.columns[l];if(a.columnKey===t){n=a;break}}return n||jt("ElTable",`No column matching with column-key: ${t}`),n},gu=function(e,t,n){const l=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return l?Af(e,l[0]):null},en=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let l=e;for(const a of n)l=l[a];return`${l}`}else if(typeof t=="function")return t.call(null,e)},yl=function(e,t){const n={};return(e||[]).forEach((l,a)=>{n[en(l,t)]={row:l,index:a}}),n};function gN(e,t){const n={};let l;for(l in e)n[l]=e[l];for(l in t)if(nn(t,l)){const a=t[l];typeof a<"u"&&(n[l]=a)}return n}function Gr(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function Vf(e){return e===""||e!==void 0&&(e=Gr(e),Number.isNaN(e)&&(e=80)),e}function yN(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function bN(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...l)=>t(n(...l)))}function yo(e,t,n){let l=!1;const a=e.indexOf(t),s=a!==-1,r=i=>{i==="add"?e.push(t):e.splice(a,1),l=!0,et(t.children)&&t.children.forEach(u=>{yo(e,u,n??!s)})};return Kt(n)?n&&!s?r("add"):!n&&s&&r("remove"):r(s?"remove":"add"),l}function wN(e,t,n="children",l="hasChildren"){const a=r=>!(Array.isArray(r)&&r.length);function s(r,i,u){t(r,i,u),i.forEach(c=>{if(c[l]){t(c,null,u+1);return}const f=c[n];a(f)||s(c,f,u+1)})}e.forEach(r=>{if(r[l]){t(r,null,0);return}const i=r[n];a(i)||s(r,i,0)})}let Wn;function kN(e,t,n,l,a){a=tc({enterable:!0,showArrow:!0},a);const s=e==null?void 0:e.dataset.prefix,r=e==null?void 0:e.querySelector(`.${s}-scrollbar__wrap`);function i(){const g=a.effect==="light",y=document.createElement("div");return y.className=[`${s}-popper`,g?"is-light":"is-dark",a.popperClass||""].join(" "),n=_v(n),y.innerHTML=n,y.style.zIndex=String(l()),e==null||e.appendChild(y),y}function u(){const g=document.createElement("div");return g.className=`${s}-popper__arrow`,g}function c(){f&&f.update()}Wn==null||Wn(),Wn=()=>{try{f&&f.destroy(),m&&(e==null||e.removeChild(m)),t.removeEventListener("mouseenter",d),t.removeEventListener("mouseleave",p),r==null||r.removeEventListener("scroll",Wn),Wn=void 0}catch{}};let f=null,d=c,p=Wn;a.enterable&&({onOpen:d,onClose:p}=Nc({showAfter:a.showAfter,hideAfter:a.hideAfter,open:c,close:Wn}));const m=i();m.onmouseenter=d,m.onmouseleave=p;const h=[];if(a.offset&&h.push({name:"offset",options:{offset:[0,a.offset]}}),a.showArrow){const g=m.appendChild(u());h.push({name:"arrow",options:{element:g,padding:10}})}const v=a.popperOptions||{};return f=qu(t,m,{placement:a.placement||"top",strategy:"fixed",...v,modifiers:v.modifiers?h.concat(v.modifiers):h}),t.addEventListener("mouseenter",d),t.addEventListener("mouseleave",p),r==null||r.addEventListener("scroll",Wn),f}function Df(e){return e.children?Ev(e.children,Df):[e]}function yu(e,t){return e+t.colSpan}const Bf=(e,t,n,l)=>{let a=0,s=e;const r=n.states.columns.value;if(l){const u=Df(l[e]);a=r.slice(0,r.indexOf(u[0])).reduce(yu,0),s=a+u.reduce(yu,0)-1}else a=e;let i;switch(t){case"left":s<n.states.fixedLeafColumnsLength.value&&(i="left");break;case"right":a>=r.length-n.states.rightFixedLeafColumnsLength.value&&(i="right");break;default:s<n.states.fixedLeafColumnsLength.value?i="left":a>=r.length-n.states.rightFixedLeafColumnsLength.value&&(i="right")}return i?{direction:i,start:a,after:s}:{}},Yr=(e,t,n,l,a,s=0)=>{const r=[],{direction:i,start:u,after:c}=Bf(t,n,l,a);if(i){const f=i==="left";r.push(`${e}-fixed-column--${i}`),f&&c+s===l.states.fixedLeafColumnsLength.value-1?r.push("is-last-column"):!f&&u-s===l.states.columns.value.length-l.states.rightFixedLeafColumnsLength.value&&r.push("is-first-column")}return r};function bu(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Xr=(e,t,n,l)=>{const{direction:a,start:s=0,after:r=0}=Bf(e,t,n,l);if(!a)return;const i={},u=a==="left",c=n.states.columns.value;return u?i.left=c.slice(0,s).reduce(bu,0):i.right=c.slice(r+1).reverse().reduce(bu,0),i},Ql=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function CN(e){const t=at(),n=_(!1),l=_([]);return{updateExpandRows:()=>{const u=e.data.value||[],c=e.rowKey.value;if(n.value)l.value=u.slice();else if(c){const f=yl(l.value,c);l.value=u.reduce((d,p)=>{const m=en(p,c);return f[m]&&d.push(p),d},[])}else l.value=[]},toggleRowExpansion:(u,c)=>{yo(l.value,u,c)&&t.emit("expand-change",u,l.value.slice())},setExpandRowKeys:u=>{t.store.assertRowKey();const c=e.data.value||[],f=e.rowKey.value,d=yl(c,f);l.value=u.reduce((p,m)=>{const h=d[m];return h&&p.push(h.row),p},[])},isRowExpanded:u=>{const c=e.rowKey.value;return c?!!yl(l.value,c)[en(u,c)]:l.value.includes(u)},states:{expandRows:l,defaultExpandAll:n}}}function SN(e){const t=at(),n=_(null),l=_(null),a=c=>{t.store.assertRowKey(),n.value=c,r(c)},s=()=>{n.value=null},r=c=>{const{data:f,rowKey:d}=e;let p=null;d.value&&(p=(o(f)||[]).find(m=>en(m,d.value)===c)),l.value=p,t.emit("current-change",l.value,null)};return{setCurrentRowKey:a,restoreCurrentRowKey:s,setCurrentRowByKey:r,updateCurrentRow:c=>{const f=l.value;if(c&&c!==f){l.value=c,t.emit("current-change",l.value,f);return}!c&&f&&(l.value=null,t.emit("current-change",null,f))},updateCurrentRowData:()=>{const c=e.rowKey.value,f=e.data.value||[],d=l.value;if(!f.includes(d)&&d){if(c){const p=en(d,c);r(p)}else l.value=null;l.value===null&&t.emit("current-change",null,d)}else n.value&&(r(n.value),s())},states:{_currentRowKey:n,currentRow:l}}}function _N(e){const t=_([]),n=_({}),l=_(16),a=_(!1),s=_({}),r=_("hasChildren"),i=_("children"),u=at(),c=S(()=>{if(!e.rowKey.value)return{};const y=e.data.value||[];return d(y)}),f=S(()=>{const y=e.rowKey.value,k=Object.keys(s.value),b={};return k.length&&k.forEach(C=>{if(s.value[C].length){const I={children:[]};s.value[C].forEach(T=>{const M=en(T,y);I.children.push(M),T[r.value]&&!b[M]&&(b[M]={children:[]})}),b[C]=I}}),b}),d=y=>{const k=e.rowKey.value,b={};return wN(y,(C,I,T)=>{const M=en(C,k);Array.isArray(I)?b[M]={children:I.map(L=>en(L,k)),level:T}:a.value&&(b[M]={children:[],lazy:!0,level:T})},i.value,r.value),b},p=(y=!1,k=(b=>(b=u.store)==null?void 0:b.states.defaultExpandAll.value)())=>{var b;const C=c.value,I=f.value,T=Object.keys(C),M={};if(T.length){const L=o(n),A=[],D=(F,x)=>{if(y)return t.value?k||t.value.includes(x):!!(k||F!=null&&F.expanded);{const U=k||t.value&&t.value.includes(x);return!!(F!=null&&F.expanded||U)}};T.forEach(F=>{const x=L[F],U={...C[F]};if(U.expanded=D(x,F),U.lazy){const{loaded:X=!1,loading:K=!1}=x||{};U.loaded=!!X,U.loading=!!K,A.push(F)}M[F]=U});const B=Object.keys(I);a.value&&B.length&&A.length&&B.forEach(F=>{const x=L[F],U=I[F].children;if(A.includes(F)){if(M[F].children.length!==0)throw new Error("[ElTable]children must be an empty array.");M[F].children=U}else{const{loaded:X=!1,loading:K=!1}=x||{};M[F]={lazy:!0,loaded:!!X,loading:!!K,expanded:D(x,F),children:U,level:""}}})}n.value=M,(b=u.store)==null||b.updateTableScrollY()};ue(()=>t.value,()=>{p(!0)}),ue(()=>c.value,()=>{p()}),ue(()=>f.value,()=>{p()});const m=y=>{t.value=y,p()},h=(y,k)=>{u.store.assertRowKey();const b=e.rowKey.value,C=en(y,b),I=C&&n.value[C];if(C&&I&&"expanded"in I){const T=I.expanded;k=typeof k>"u"?!I.expanded:k,n.value[C].expanded=k,T!==k&&u.emit("expand-change",y,k),u.store.updateTableScrollY()}},v=y=>{u.store.assertRowKey();const k=e.rowKey.value,b=en(y,k),C=n.value[b];a.value&&C&&"loaded"in C&&!C.loaded?g(y,b,C):h(y,void 0)},g=(y,k,b)=>{const{load:C}=u.props;C&&!n.value[k].loaded&&(n.value[k].loading=!0,C(y,b,I=>{if(!Array.isArray(I))throw new TypeError("[ElTable] data must be an array");n.value[k].loading=!1,n.value[k].loaded=!0,n.value[k].expanded=!0,I.length&&(s.value[k]=I),u.emit("expand-change",y,!0)}))};return{loadData:g,loadOrToggle:v,toggleTreeExpansion:h,updateTreeExpandKeys:m,updateTreeData:p,normalize:d,states:{expandRowKeys:t,treeData:n,indent:l,lazy:a,lazyTreeNodeMap:s,lazyColumnIdentifier:r,childrenColumnName:i}}}const EN=(e,t)=>{const n=t.sortingColumn;return!n||typeof n.sortable=="string"?e:mN(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},da=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,da(n.children)):t.push(n)}),t};function $N(){var e;const t=at(),{size:n}=Gt((e=t.proxy)==null?void 0:e.$props),l=_(null),a=_([]),s=_([]),r=_(!1),i=_([]),u=_([]),c=_([]),f=_([]),d=_([]),p=_([]),m=_([]),h=_([]),v=[],g=_(0),y=_(0),k=_(0),b=_(!1),C=_([]),I=_(!1),T=_(!1),M=_(null),L=_({}),A=_(null),D=_(null),B=_(null),F=_(null),x=_(null);ue(a,()=>t.state&&V(!1),{deep:!0});const U=()=>{if(!l.value)throw new Error("[ElTable] prop row-key is required")},X=me=>{var ne;(ne=me.children)==null||ne.forEach(we=>{we.fixed=me.fixed,X(we)})},K=()=>{i.value.forEach($e=>{X($e)}),f.value=i.value.filter($e=>$e.fixed===!0||$e.fixed==="left"),d.value=i.value.filter($e=>$e.fixed==="right"),f.value.length>0&&i.value[0]&&i.value[0].type==="selection"&&!i.value[0].fixed&&(i.value[0].fixed=!0,f.value.unshift(i.value[0]));const me=i.value.filter($e=>!$e.fixed);u.value=[].concat(f.value).concat(me).concat(d.value);const ne=da(me),we=da(f.value),de=da(d.value);g.value=ne.length,y.value=we.length,k.value=de.length,c.value=[].concat(we).concat(ne).concat(de),r.value=f.value.length>0||d.value.length>0},V=(me,ne=!1)=>{me&&K(),ne?t.state.doLayout():t.state.debouncedUpdateLayout()},W=me=>C.value.includes(me),P=()=>{b.value=!1,C.value.length&&(C.value=[],t.emit("selection-change",[]))},H=()=>{let me;if(l.value){me=[];const ne=yl(C.value,l.value),we=yl(a.value,l.value);for(const de in ne)nn(ne,de)&&!we[de]&&me.push(ne[de].row)}else me=C.value.filter(ne=>!a.value.includes(ne));if(me.length){const ne=C.value.filter(we=>!me.includes(we));C.value=ne,t.emit("selection-change",ne.slice())}},Y=()=>(C.value||[]).slice(),z=(me,ne=void 0,we=!0)=>{if(yo(C.value,me,ne)){const $e=(C.value||[]).slice();we&&t.emit("select",$e,me),t.emit("selection-change",$e)}},q=()=>{var me,ne;const we=T.value?!b.value:!(b.value||C.value.length);b.value=we;let de=!1,$e=0;const J=(ne=(me=t==null?void 0:t.store)==null?void 0:me.states)==null?void 0:ne.rowKey.value;a.value.forEach((Oe,le)=>{const Ce=le+$e;M.value?M.value.call(null,Oe,Ce)&&yo(C.value,Oe,we)&&(de=!0):yo(C.value,Oe,we)&&(de=!0),$e+=oe(en(Oe,J))}),de&&t.emit("selection-change",C.value?C.value.slice():[]),t.emit("select-all",C.value)},se=()=>{const me=yl(C.value,l.value);a.value.forEach(ne=>{const we=en(ne,l.value),de=me[we];de&&(C.value[de.index]=ne)})},pe=()=>{var me,ne,we;if(((me=a.value)==null?void 0:me.length)===0){b.value=!1;return}let de;l.value&&(de=yl(C.value,l.value));const $e=function(Ce){return de?!!de[en(Ce,l.value)]:C.value.includes(Ce)};let J=!0,Oe=0,le=0;for(let Ce=0,je=(a.value||[]).length;Ce<je;Ce++){const st=(we=(ne=t==null?void 0:t.store)==null?void 0:ne.states)==null?void 0:we.rowKey.value,vt=Ce+le,Tt=a.value[Ce],Xt=M.value&&M.value.call(null,Tt,vt);if($e(Tt))Oe++;else if(!M.value||Xt){J=!1;break}le+=oe(en(Tt,st))}Oe===0&&(J=!1),b.value=J},oe=me=>{var ne;if(!t||!t.store)return 0;const{treeData:we}=t.store.states;let de=0;const $e=(ne=we.value[me])==null?void 0:ne.children;return $e&&(de+=$e.length,$e.forEach(J=>{de+=oe(J)})),de},re=(me,ne)=>{Array.isArray(me)||(me=[me]);const we={};return me.forEach(de=>{L.value[de.id]=ne,we[de.columnKey||de.id]=ne}),we},Q=(me,ne,we)=>{D.value&&D.value!==me&&(D.value.order=null),D.value=me,B.value=ne,F.value=we},ve=()=>{let me=o(s);Object.keys(L.value).forEach(ne=>{const we=L.value[ne];if(!we||we.length===0)return;const de=Af({columns:c.value},ne);de&&de.filterMethod&&(me=me.filter($e=>we.some(J=>de.filterMethod.call(null,J,$e,de))))}),A.value=me},_e=()=>{a.value=EN(A.value,{sortingColumn:D.value,sortProp:B.value,sortOrder:F.value})},Te=(me=void 0)=>{me&&me.filter||ve(),_e()},Ie=me=>{const{tableHeaderRef:ne}=t.refs;if(!ne)return;const we=Object.assign({},ne.filterPanels),de=Object.keys(we);if(de.length)if(typeof me=="string"&&(me=[me]),Array.isArray(me)){const $e=me.map(J=>hN({columns:c.value},J));de.forEach(J=>{const Oe=$e.find(le=>le.id===J);Oe&&(Oe.filteredValue=[])}),t.store.commit("filterChange",{column:$e,values:[],silent:!0,multi:!0})}else de.forEach($e=>{const J=c.value.find(Oe=>Oe.id===$e);J&&(J.filteredValue=[])}),L.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},Ke=()=>{D.value&&(Q(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:Ge,toggleRowExpansion:qe,updateExpandRows:it,states:ke,isRowExpanded:Ee}=CN({data:a,rowKey:l}),{updateTreeExpandKeys:Be,toggleTreeExpansion:Ve,updateTreeData:Ye,loadOrToggle:Xe,states:nt}=_N({data:a,rowKey:l}),{updateCurrentRowData:Se,updateCurrentRow:Ue,setCurrentRowKey:gt,states:Et}=SN({data:a,rowKey:l});return{assertRowKey:U,updateColumns:K,scheduleLayout:V,isSelected:W,clearSelection:P,cleanSelection:H,getSelectionRows:Y,toggleRowSelection:z,_toggleAllSelection:q,toggleAllSelection:null,updateSelectionByRowKey:se,updateAllSelected:pe,updateFilters:re,updateCurrentRow:Ue,updateSort:Q,execFilter:ve,execSort:_e,execQuery:Te,clearFilter:Ie,clearSort:Ke,toggleRowExpansion:qe,setExpandRowKeysAdapter:me=>{Ge(me),Be(me)},setCurrentRowKey:gt,toggleRowExpansionAdapter:(me,ne)=>{c.value.some(({type:de})=>de==="expand")?qe(me,ne):Ve(me,ne)},isRowExpanded:Ee,updateExpandRows:it,updateCurrentRowData:Se,loadOrToggle:Xe,updateTreeData:Ye,states:{tableSize:n,rowKey:l,data:a,_data:s,isComplex:r,_columns:i,originColumns:u,columns:c,fixedColumns:f,rightFixedColumns:d,leafColumns:p,fixedLeafColumns:m,rightFixedLeafColumns:h,updateOrderFns:v,leafColumnsLength:g,fixedLeafColumnsLength:y,rightFixedLeafColumnsLength:k,isAllSelected:b,selection:C,reserveSelection:I,selectOnIndeterminate:T,selectable:M,filters:L,filteredData:A,sortingColumn:D,sortProp:B,sortOrder:F,hoverRow:x,...ke,...nt,...Et}}}function Gs(e,t){return e.map(n=>{var l;return n.id===t.id?t:((l=n.children)!=null&&l.length&&(n.children=Gs(n.children,t)),n)})}function Ys(e){e.forEach(t=>{var n,l;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(l=t.children)!=null&&l.length&&Ys(t.children)}),e.sort((t,n)=>t.no-n.no)}function TN(){const e=at(),t=$N();return{ns:ce("table"),...t,mutations:{setData(r,i){const u=o(r._data)!==i;r.data.value=i,r._data.value=i,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),o(r.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):u?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(r,i,u,c){const f=o(r._columns);let d=[];u?(u&&!u.children&&(u.children=[]),u.children.push(i),d=Gs(f,u)):(f.push(i),d=f),Ys(d),r._columns.value=d,r.updateOrderFns.push(c),i.type==="selection"&&(r.selectable.value=i.selectable,r.reserveSelection.value=i.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(r,i){var u;((u=i.getColumnIndex)==null?void 0:u.call(i))!==i.no&&(Ys(r._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(r,i,u,c){const f=o(r._columns)||[];if(u)u.children.splice(u.children.findIndex(p=>p.id===i.id),1),Le(()=>{var p;((p=u.children)==null?void 0:p.length)===0&&delete u.children}),r._columns.value=Gs(f,u);else{const p=f.indexOf(i);p>-1&&(f.splice(p,1),r._columns.value=f)}const d=r.updateOrderFns.indexOf(c);d>-1&&r.updateOrderFns.splice(d,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(r,i){const{prop:u,order:c,init:f}=i;if(u){const d=o(r.columns).find(p=>p.property===u);d&&(d.order=c,e.store.updateSort(d,u,c),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(r,i){const{sortingColumn:u,sortProp:c,sortOrder:f}=r,d=o(u),p=o(c),m=o(f);m===null&&(r.sortingColumn.value=null,r.sortProp.value=null);const h={filter:!0};e.store.execQuery(h),(!i||!(i.silent||i.init))&&e.emit("sort-change",{column:d,prop:p,order:m}),e.store.updateTableScrollY()},filterChange(r,i){const{column:u,values:c,silent:f}=i,d=e.store.updateFilters(u,c);e.store.execQuery(),f||e.emit("filter-change",d),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(r,i){e.store.toggleRowSelection(i),e.store.updateAllSelected()},setHoverRow(r,i){r.hoverRow.value=i},setCurrentRow(r,i){e.store.updateCurrentRow(i)}},commit:function(r,...i){const u=e.store.mutations;if(u[r])u[r].apply(e,[e.store.states].concat(i));else throw new Error(`Action not found: ${r}`)},updateTableScrollY:function(){Le(()=>e.layout.updateScrollY.apply(e.layout))}}}const bo={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"}};function IN(e,t){if(!e)throw new Error("Table is required.");const n=TN();return n.toggleAllSelection=hn(n._toggleAllSelection,10),Object.keys(bo).forEach(l=>{xf(Ff(t,l),l,n)}),NN(n,t),n}function NN(e,t){Object.keys(bo).forEach(n=>{ue(()=>Ff(t,n),l=>{xf(l,n,e)})})}function xf(e,t,n){let l=e,a=bo[t];typeof bo[t]=="object"&&(a=a.key,l=l||bo[t].default),n.states[a].value=l}function Ff(e,t){if(t.includes(".")){const n=t.split(".");let l=e;return n.forEach(a=>{l=l[a]}),l}else return e[t]}class PN{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=_(null),this.scrollX=_(!1),this.scrollY=_(!1),this.bodyWidth=_(null),this.fixedWidth=_(null),this.rightFixedWidth=_(null),this.gutterWidth=0;for(const n in t)nn(t,n)&&(bt(this[n])?this[n].value=t[n]:this[n]=t[n]);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(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n!=null&&n.wrapRef)){let l=!0;const a=this.scrollY.value;return l=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=l,a!==l}return!1}setHeight(t,n="height"){if(!yt)return;const l=this.table.vnode.el;if(t=yN(t),this.height.value=Number(t),!l&&(t||t===0))return Le(()=>this.setHeight(t,n));typeof t=="number"?(l.style[n]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(l.style[n]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(l=>{l.isColumnGroup?t.push.apply(t,l.columns):t.push(l)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let n=t;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!yt)return;const t=this.fit,n=this.table.vnode.el.clientWidth;let l=0;const a=this.getFlattenColumns(),s=a.filter(u=>typeof u.width!="number");if(a.forEach(u=>{typeof u.width=="number"&&u.realWidth&&(u.realWidth=null)}),s.length>0&&t){if(a.forEach(u=>{l+=Number(u.width||u.minWidth||80)}),l<=n){this.scrollX.value=!1;const u=n-l;if(s.length===1)s[0].realWidth=Number(s[0].minWidth||80)+u;else{const c=s.reduce((p,m)=>p+Number(m.minWidth||80),0),f=u/c;let d=0;s.forEach((p,m)=>{if(m===0)return;const h=Math.floor(Number(p.minWidth||80)*f);d+=h,p.realWidth=Number(p.minWidth||80)+h}),s[0].realWidth=Number(s[0].minWidth||80)+u-d}}else this.scrollX.value=!0,s.forEach(u=>{u.realWidth=Number(u.minWidth)});this.bodyWidth.value=Math.max(l,n),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),l+=u.realWidth}),this.scrollX.value=l>n,this.bodyWidth.value=l;const r=this.store.states.fixedColumns.value;if(r.length>0){let u=0;r.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.fixedWidth.value=u}const i=this.store.states.rightFixedColumns.value;if(i.length>0){let u=0;i.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=u}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&this.observers.splice(n,1)}notifyObservers(t){this.observers.forEach(l=>{var a,s;switch(t){case"columns":(a=l.state)==null||a.onColumnsChange(this);break;case"scrollable":(s=l.state)==null||s.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:MN}=$n,LN=j({name:"ElTableFilterPanel",components:{ElCheckbox:$n,ElCheckboxGroup:MN,ElScrollbar:Qn,ElTooltip:cn,ElIcon:Pe,ArrowDown:ul,ArrowUp:Fa},directives:{ClickOutside:il},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=at(),{t:n}=ht(),l=ce("table-filter"),a=t==null?void 0:t.parent;a.filterPanels.value[e.column.id]||(a.filterPanels.value[e.column.id]=t);const s=_(!1),r=_(null),i=S(()=>e.column&&e.column.filters),u=S({get:()=>{var C;return(((C=e.column)==null?void 0:C.filteredValue)||[])[0]},set:C=>{c.value&&(typeof C<"u"&&C!==null?c.value.splice(0,1,C):c.value.splice(0,1))}}),c=S({get(){return e.column?e.column.filteredValue||[]:[]},set(C){e.column&&e.upDataColumn("filteredValue",C)}}),f=S(()=>e.column?e.column.filterMultiple:!0),d=C=>C.value===u.value,p=()=>{s.value=!1},m=C=>{C.stopPropagation(),s.value=!s.value},h=()=>{s.value=!1},v=()=>{k(c.value),p()},g=()=>{c.value=[],k(c.value),p()},y=C=>{u.value=C,k(typeof C<"u"&&C!==null?c.value:[]),p()},k=C=>{e.store.commit("filterChange",{column:e.column,values:C}),e.store.updateAllSelected()};ue(s,C=>{e.column&&e.upDataColumn("filterOpened",C)},{immediate:!0});const b=S(()=>{var C,I;return(I=(C=r.value)==null?void 0:C.popperRef)==null?void 0:I.contentRef});return{tooltipVisible:s,multiple:f,filteredValue:c,filterValue:u,filters:i,handleConfirm:v,handleReset:g,handleSelect:y,isActive:d,t:n,ns:l,showFilterPanel:m,hideFilterPanel:h,popperPaneRef:b,tooltip:r}}}),RN={key:0},ON=["disabled"],AN=["label","onClick"];function VN(e,t,n,l,a,s){const r=ee("el-checkbox"),i=ee("el-checkbox-group"),u=ee("el-scrollbar"),c=ee("arrow-up"),f=ee("arrow-down"),d=ee("el-icon"),p=ee("el-tooltip"),m=Sl("click-outside");return w(),G(p,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.ns.b(),persistent:""},{content:N(()=>[e.multiple?(w(),O("div",RN,[R("div",{class:$(e.ns.e("content"))},[E(u,{"wrap-class":e.ns.e("wrap")},{default:N(()=>[E(i,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=h=>e.filteredValue=h),class:$(e.ns.e("checkbox-group"))},{default:N(()=>[(w(!0),O(Ne,null,Ze(e.filters,h=>(w(),G(r,{key:h.value,label:h.value},{default:N(()=>[ye(ae(h.text),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),R("div",{class:$(e.ns.e("bottom"))},[R("button",{class:$({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...h)=>e.handleConfirm&&e.handleConfirm(...h))},ae(e.t("el.table.confirmFilter")),11,ON),R("button",{type:"button",onClick:t[2]||(t[2]=(...h)=>e.handleReset&&e.handleReset(...h))},ae(e.t("el.table.resetFilter")),1)],2)])):(w(),O("ul",{key:1,class:$(e.ns.e("list"))},[R("li",{class:$([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=h=>e.handleSelect(null))},ae(e.t("el.table.clearFilter")),3),(w(!0),O(Ne,null,Ze(e.filters,h=>(w(),O("li",{key:h.value,class:$([e.ns.e("list-item"),e.ns.is("active",e.isActive(h))]),label:h.value,onClick:v=>e.handleSelect(h.value)},ae(h.text),11,AN))),128))],2))]),default:N(()=>[xe((w(),O("span",{class:$([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...h)=>e.showFilterPanel&&e.showFilterPanel(...h))},[E(d,null,{default:N(()=>[e.column.filterOpened?(w(),G(c,{key:0})):(w(),G(f,{key:1}))]),_:1})],2)),[[m,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}var DN=he(LN,[["render",VN],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);function zf(e){const t=at();cr(()=>{n.value.addObserver(t)}),ze(()=>{l(n.value),a(n.value)}),Nl(()=>{l(n.value),a(n.value)}),Il(()=>{n.value.removeObserver(t)});const n=S(()=>{const s=e.layout;if(!s)throw new Error("Can not find table layout.");return s}),l=s=>{var r;const i=((r=e.vnode.el)==null?void 0:r.querySelectorAll("colgroup > col"))||[];if(!i.length)return;const u=s.getFlattenColumns(),c={};u.forEach(f=>{c[f.id]=f});for(let f=0,d=i.length;f<d;f++){const p=i[f],m=p.getAttribute("name"),h=c[m];h&&p.setAttribute("width",h.realWidth||h.width)}},a=s=>{var r,i;const u=((r=e.vnode.el)==null?void 0:r.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let f=0,d=u.length;f<d;f++)u[f].setAttribute("width",s.scrollY.value?s.gutterWidth:"0");const c=((i=e.vnode.el)==null?void 0:i.querySelectorAll("th.gutter"))||[];for(let f=0,d=c.length;f<d;f++){const p=c[f];p.style.width=s.scrollY.value?`${s.gutterWidth}px`:"0",p.style.display=s.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:l,onScrollableChange:a}}const Kn=Symbol("ElTable");function BN(e,t){const n=at(),l=Me(Kn),a=v=>{v.stopPropagation()},s=(v,g)=>{!g.filters&&g.sortable?h(v,g,!1):g.filterable&&!g.sortable&&a(v),l==null||l.emit("header-click",g,v)},r=(v,g)=>{l==null||l.emit("header-contextmenu",g,v)},i=_(null),u=_(!1),c=_({}),f=(v,g)=>{if(yt&&!(g.children&&g.children.length>0)&&i.value&&e.border){u.value=!0;const y=l;t("set-drag-visible",!0);const b=(y==null?void 0:y.vnode.el).getBoundingClientRect().left,C=n.vnode.el.querySelector(`th.${g.id}`),I=C.getBoundingClientRect(),T=I.left-b+30;Dn(C,"noclick"),c.value={startMouseLeft:v.clientX,startLeft:I.right-b,startColumnLeft:I.left-b,tableLeft:b};const M=y==null?void 0:y.refs.resizeProxy;M.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const L=D=>{const B=D.clientX-c.value.startMouseLeft,F=c.value.startLeft+B;M.style.left=`${Math.max(T,F)}px`},A=()=>{if(u.value){const{startColumnLeft:D,startLeft:B}=c.value,x=Number.parseInt(M.style.left,10)-D;g.width=g.realWidth=x,y==null||y.emit("header-dragend",g.width,B-D,g,v),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",u.value=!1,i.value=null,c.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",A),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{mn(C,"noclick")},0)};document.addEventListener("mousemove",L),document.addEventListener("mouseup",A)}},d=(v,g)=>{if(g.children&&g.children.length>0)return;const y=v.target;if(!_n(y))return;const k=y==null?void 0:y.closest("th");if(!(!g||!g.resizable)&&!u.value&&e.border){const b=k.getBoundingClientRect(),C=document.body.style;b.width>12&&b.right-v.pageX<8?(C.cursor="col-resize",Mn(k,"is-sortable")&&(k.style.cursor="col-resize"),i.value=g):u.value||(C.cursor="",Mn(k,"is-sortable")&&(k.style.cursor="pointer"),i.value=null)}},p=()=>{yt&&(document.body.style.cursor="")},m=({order:v,sortOrders:g})=>{if(v==="")return g[0];const y=g.indexOf(v||null);return g[y>g.length-2?0:y+1]},h=(v,g,y)=>{var k;v.stopPropagation();const b=g.order===y?null:y||m(g),C=(k=v.target)==null?void 0:k.closest("th");if(C&&Mn(C,"noclick")){mn(C,"noclick");return}if(!g.sortable)return;const I=e.store.states;let T=I.sortProp.value,M;const L=I.sortingColumn.value;(L!==g||L===g&&L.order===null)&&(L&&(L.order=null),I.sortingColumn.value=g,T=g.property),b?M=g.order=b:M=g.order=null,I.sortProp.value=T,I.sortOrder.value=M,l==null||l.store.commit("changeSortCondition")};return{handleHeaderClick:s,handleHeaderContextMenu:r,handleMouseDown:f,handleMouseMove:d,handleMouseOut:p,handleSortClick:h,handleFilterClick:a}}function xN(e){const t=Me(Kn),n=ce("table");return{getHeaderRowStyle:i=>{const u=t==null?void 0:t.props.headerRowStyle;return typeof u=="function"?u.call(null,{rowIndex:i}):u},getHeaderRowClass:i=>{const u=[],c=t==null?void 0:t.props.headerRowClassName;return typeof c=="string"?u.push(c):typeof c=="function"&&u.push(c.call(null,{rowIndex:i})),u.join(" ")},getHeaderCellStyle:(i,u,c,f)=>{var d;let p=(d=t==null?void 0:t.props.headerCellStyle)!=null?d:{};typeof p=="function"&&(p=p.call(null,{rowIndex:i,columnIndex:u,row:c,column:f}));const m=Xr(u,f.fixed,e.store,c);return Ql(m,"left"),Ql(m,"right"),Object.assign({},p,m)},getHeaderCellClass:(i,u,c,f)=>{const d=Yr(n.b(),u,f.fixed,e.store,c),p=[f.id,f.order,f.headerAlign,f.className,f.labelClassName,...d];f.children||p.push("is-leaf"),f.sortable&&p.push("is-sortable");const m=t==null?void 0:t.props.headerCellClassName;return typeof m=="string"?p.push(m):typeof m=="function"&&p.push(m.call(null,{rowIndex:i,columnIndex:u,row:c,column:f})),p.push(n.e("cell")),p.filter(h=>!!h).join(" ")}}}const Hf=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,Hf(n.children))):t.push(n)}),t},FN=e=>{let t=1;const n=(s,r)=>{if(r&&(s.level=r.level+1,t<s.level&&(t=s.level)),s.children){let i=0;s.children.forEach(u=>{n(u,s),i+=u.colSpan}),s.colSpan=i}else s.colSpan=1};e.forEach(s=>{s.level=1,n(s,void 0)});const l=[];for(let s=0;s<t;s++)l.push([]);return Hf(e).forEach(s=>{s.children?(s.rowSpan=1,s.children.forEach(r=>r.isSubColumn=!0)):s.rowSpan=t-s.level+1,l[s.level-1].push(s)}),l};function zN(e){const t=Me(Kn),n=S(()=>FN(e.store.states.originColumns.value));return{isGroup:S(()=>{const s=n.value.length>1;return s&&t&&(t.state.isGroup.value=!0),s}),toggleAllSelection:s=>{s.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var HN=j({name:"ElTableHeader",components:{ElCheckbox:$n},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const n=at(),l=Me(Kn),a=ce("table"),s=_({}),{onColumnsChange:r,onScrollableChange:i}=zf(l);ze(async()=>{await Le(),await Le();const{prop:T,order:M}=e.defaultSort;l==null||l.store.commit("sort",{prop:T,order:M,init:!0})});const{handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:f,handleMouseMove:d,handleMouseOut:p,handleSortClick:m,handleFilterClick:h}=BN(e,t),{getHeaderRowStyle:v,getHeaderRowClass:g,getHeaderCellStyle:y,getHeaderCellClass:k}=xN(e),{isGroup:b,toggleAllSelection:C,columnRows:I}=zN(e);return n.state={onColumnsChange:r,onScrollableChange:i},n.filterPanels=s,{ns:a,filterPanels:s,onColumnsChange:r,onScrollableChange:i,columnRows:I,getHeaderRowClass:g,getHeaderRowStyle:v,getHeaderCellClass:k,getHeaderCellStyle:y,handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:f,handleMouseMove:d,handleMouseOut:p,handleSortClick:m,handleFilterClick:h,isGroup:b,toggleAllSelection:C}},render(){const{ns:e,isGroup:t,columnRows:n,getHeaderCellStyle:l,getHeaderCellClass:a,getHeaderRowClass:s,getHeaderRowStyle:r,handleHeaderClick:i,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:f,handleSortClick:d,handleMouseOut:p,store:m,$parent:h}=this;let v=1;return De("thead",{class:{[e.is("group")]:t}},n.map((g,y)=>De("tr",{class:s(y),key:y,style:r(y)},g.map((k,b)=>(k.rowSpan>v&&(v=k.rowSpan),De("th",{class:a(y,b,g,k),colspan:k.colSpan,key:`${k.id}-thead`,rowspan:k.rowSpan,style:l(y,b,g,k),onClick:C=>i(C,k),onContextmenu:C=>u(C,k),onMousedown:C=>c(C,k),onMousemove:C=>f(C,k),onMouseout:p},[De("div",{class:["cell",k.filteredValue&&k.filteredValue.length>0?"highlight":""]},[k.renderHeader?k.renderHeader({column:k,$index:b,store:m,_self:h}):k.label,k.sortable&&De("span",{onClick:C=>d(C,k),class:"caret-wrapper"},[De("i",{onClick:C=>d(C,k,"ascending"),class:"sort-caret ascending"}),De("i",{onClick:C=>d(C,k,"descending"),class:"sort-caret descending"})]),k.filterable&&De(DN,{store:m,placement:k.filterPlacement||"bottom-start",column:k,upDataColumn:(C,I)=>{k[C]=I}})])]))))))}});function KN(e){const t=Me(Kn),n=_(""),l=_(De("div")),{nextZIndex:a}=ao(),s=(m,h,v)=>{var g;const y=t,k=bs(m);let b;const C=(g=y==null?void 0:y.vnode.el)==null?void 0:g.dataset.prefix;k&&(b=gu({columns:e.store.states.columns.value},k,C),b&&(y==null||y.emit(`cell-${v}`,h,b,k,m))),y==null||y.emit(`row-${v}`,h,b,m)},r=(m,h)=>{s(m,h,"dblclick")},i=(m,h)=>{e.store.commit("setCurrentRow",h),s(m,h,"click")},u=(m,h)=>{s(m,h,"contextmenu")},c=hn(m=>{e.store.commit("setHoverRow",m)},30),f=hn(()=>{e.store.commit("setHoverRow",null)},30);return{handleDoubleClick:r,handleClick:i,handleContextMenu:u,handleMouseEnter:c,handleMouseLeave:f,handleCellMouseEnter:(m,h,v)=>{var g;const y=t,k=bs(m),b=(g=y==null?void 0:y.vnode.el)==null?void 0:g.dataset.prefix;if(k){const L=gu({columns:e.store.states.columns.value},k,b),A=y.hoverState={cell:k,column:L,row:h};y==null||y.emit("cell-mouse-enter",A.row,A.column,A.cell,m)}if(!v)return;const C=m.target.querySelector(".cell");if(!(Mn(C,`${b}-tooltip`)&&C.childNodes.length))return;const I=document.createRange();I.setStart(C,0),I.setEnd(C,C.childNodes.length);const T=Math.round(I.getBoundingClientRect().width),M=(Number.parseInt(Vn(C,"paddingLeft"),10)||0)+(Number.parseInt(Vn(C,"paddingRight"),10)||0);(T+M>C.offsetWidth||C.scrollWidth>C.offsetWidth)&&kN(t==null?void 0:t.refs.tableWrapper,k,k.innerText||k.textContent,a,v)},handleCellMouseLeave:m=>{if(!bs(m))return;const v=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",v==null?void 0:v.row,v==null?void 0:v.column,v==null?void 0:v.cell,m)},tooltipContent:n,tooltipTrigger:l}}function WN(e){const t=Me(Kn),n=ce("table");return{getRowStyle:(c,f)=>{const d=t==null?void 0:t.props.rowStyle;return typeof d=="function"?d.call(null,{row:c,rowIndex:f}):d||null},getRowClass:(c,f)=>{const d=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&c===e.store.states.currentRow.value&&d.push("current-row"),e.stripe&&f%2===1&&d.push(n.em("row","striped"));const p=t==null?void 0:t.props.rowClassName;return typeof p=="string"?d.push(p):typeof p=="function"&&d.push(p.call(null,{row:c,rowIndex:f})),d},getCellStyle:(c,f,d,p)=>{const m=t==null?void 0:t.props.cellStyle;let h=m??{};typeof m=="function"&&(h=m.call(null,{rowIndex:c,columnIndex:f,row:d,column:p}));const v=Xr(f,e==null?void 0:e.fixed,e.store);return Ql(v,"left"),Ql(v,"right"),Object.assign({},h,v)},getCellClass:(c,f,d,p,m)=>{const h=Yr(n.b(),f,e==null?void 0:e.fixed,e.store,void 0,m),v=[p.id,p.align,p.className,...h],g=t==null?void 0:t.props.cellClassName;return typeof g=="string"?v.push(g):typeof g=="function"&&v.push(g.call(null,{rowIndex:c,columnIndex:f,row:d,column:p})),v.push(n.e("cell")),v.filter(y=>!!y).join(" ")},getSpan:(c,f,d,p)=>{let m=1,h=1;const v=t==null?void 0:t.props.spanMethod;if(typeof v=="function"){const g=v({row:c,column:f,rowIndex:d,columnIndex:p});Array.isArray(g)?(m=g[0],h=g[1]):typeof g=="object"&&(m=g.rowspan,h=g.colspan)}return{rowspan:m,colspan:h}},getColspanRealWidth:(c,f,d)=>{if(f<1)return c[d].realWidth;const p=c.map(({realWidth:m,width:h})=>m||h).slice(d,d+f);return Number(p.reduce((m,h)=>Number(m)+Number(h),-1))}}}function UN(e){const t=Me(Kn),n=ce("table"),{handleDoubleClick:l,handleClick:a,handleContextMenu:s,handleMouseEnter:r,handleMouseLeave:i,handleCellMouseEnter:u,handleCellMouseLeave:c,tooltipContent:f,tooltipTrigger:d}=KN(e),{getRowStyle:p,getRowClass:m,getCellStyle:h,getCellClass:v,getSpan:g,getColspanRealWidth:y}=WN(e),k=S(()=>e.store.states.columns.value.findIndex(({type:M})=>M==="default")),b=(M,L)=>{const A=t.props.rowKey;return A?en(M,A):L},C=(M,L,A,D=!1)=>{const{tooltipEffect:B,tooltipOptions:F,store:x}=e,{indent:U,columns:X}=x.states,K=m(M,L);let V=!0;return A&&(K.push(n.em("row",`level-${A.level}`)),V=A.display),De("tr",{style:[V?null:{display:"none"},p(M,L)],class:K,key:b(M,L),onDblclick:P=>l(P,M),onClick:P=>a(P,M),onContextmenu:P=>s(P,M),onMouseenter:()=>r(L),onMouseleave:i},X.value.map((P,H)=>{const{rowspan:Y,colspan:z}=g(M,P,L,H);if(!Y||!z)return null;const q={...P};q.realWidth=y(X.value,z,H);const se={store:e.store,_self:e.context||t,column:q,row:M,$index:L,cellIndex:H,expanded:D};H===k.value&&A&&(se.treeNode={indent:A.level*U.value,level:A.level},typeof A.expanded=="boolean"&&(se.treeNode.expanded=A.expanded,"loading"in A&&(se.treeNode.loading=A.loading),"noLazyChildren"in A&&(se.treeNode.noLazyChildren=A.noLazyChildren)));const pe=`${L},${H}`,oe=q.columnKey||q.rawColumnKey||"",re=I(H,P,se),Q=P.showOverflowTooltip&&tc({effect:B},F,P.showOverflowTooltip);return De("td",{style:h(L,H,M,P),class:v(L,H,M,P,z-1),key:`${oe}${pe}`,rowspan:Y,colspan:z,onMouseenter:ve=>u(ve,M,Q),onMouseleave:c},[re])}))},I=(M,L,A)=>L.renderCell(A);return{wrappedRowRender:(M,L)=>{const A=e.store,{isRowExpanded:D,assertRowKey:B}=A,{treeData:F,lazyTreeNodeMap:x,childrenColumnName:U,rowKey:X}=A.states,K=A.states.columns.value;if(K.some(({type:W})=>W==="expand")){const W=D(M),P=C(M,L,void 0,W),H=t.renderExpanded;return W?H?[[P,De("tr",{key:`expanded-row__${P.key}`},[De("td",{colspan:K.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[H({row:M,$index:L,store:A,expanded:W})])])]]:(console.error("[Element Error]renderExpanded is required."),P):[[P]]}else if(Object.keys(F.value).length){B();const W=en(M,X.value);let P=F.value[W],H=null;P&&(H={expanded:P.expanded,level:P.level,display:!0},typeof P.lazy=="boolean"&&(typeof P.loaded=="boolean"&&P.loaded&&(H.noLazyChildren=!(P.children&&P.children.length)),H.loading=P.loading));const Y=[C(M,L,H)];if(P){let z=0;const q=(pe,oe)=>{pe&&pe.length&&oe&&pe.forEach(re=>{const Q={display:oe.display&&oe.expanded,level:oe.level+1,expanded:!1,noLazyChildren:!1,loading:!1},ve=en(re,X.value);if(ve==null)throw new Error("For nested data item, row-key is required.");if(P={...F.value[ve]},P&&(Q.expanded=P.expanded,P.level=P.level||Q.level,P.display=!!(P.expanded&&Q.display),typeof P.lazy=="boolean"&&(typeof P.loaded=="boolean"&&P.loaded&&(Q.noLazyChildren=!(P.children&&P.children.length)),Q.loading=P.loading)),z++,Y.push(C(re,L+z,Q)),P){const _e=x.value[ve]||re[U.value];q(_e,P)}})};P.display=!0;const se=x.value[W]||M[U.value];q(se,P)}return Y}else return C(M,L,void 0)},tooltipContent:f,tooltipTrigger:d}}const jN={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 qN=j({name:"ElTableBody",props:jN,setup(e){const t=at(),n=Me(Kn),l=ce("table"),{wrappedRowRender:a,tooltipContent:s,tooltipTrigger:r}=UN(e),{onColumnsChange:i,onScrollableChange:u}=zf(n);return ue(e.store.states.hoverRow,(c,f)=>{if(!e.store.states.isComplex.value||!yt)return;let d=window.requestAnimationFrame;d||(d=p=>window.setTimeout(p,16)),d(()=>{const p=t==null?void 0:t.vnode.el,m=Array.from((p==null?void 0:p.children)||[]).filter(g=>g==null?void 0:g.classList.contains(`${l.e("row")}`)),h=m[f],v=m[c];h&&mn(h,"hover-row"),v&&Dn(v,"hover-row")})}),Il(()=>{var c;(c=Wn)==null||c()}),{ns:l,onColumnsChange:i,onScrollableChange:u,wrappedRowRender:a,tooltipContent:s,tooltipTrigger:r}},render(){const{wrappedRowRender:e,store:t}=this,n=t.states.data.value||[];return De("tbody",{},[n.reduce((l,a)=>l.concat(e(a,l.length)),[])])}});function Zr(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(a=>a.width===void 0)&&(n=[]);const l=a=>{const s={key:`${e.tableLayout}_${a.id}`,style:{},name:void 0};return t?s.style={width:`${a.width}px`}:s.name=a.id,s};return De("colgroup",{},n.map(a=>De("col",l(a))))}Zr.props=["columns","tableLayout"];function GN(){const e=Me(Kn),t=e==null?void 0:e.store,n=S(()=>t.states.fixedLeafColumnsLength.value),l=S(()=>t.states.rightFixedColumns.value.length),a=S(()=>t.states.columns.value.length),s=S(()=>t.states.fixedColumns.value.length),r=S(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:l,columnsCount:a,leftFixedCount:s,rightFixedCount:r,columns:t.states.columns}}function YN(e){const{columns:t}=GN(),n=ce("table");return{getCellClasses:(s,r)=>{const i=s[r],u=[n.e("cell"),i.id,i.align,i.labelClassName,...Yr(n.b(),r,i.fixed,e.store)];return i.className&&u.push(i.className),i.children||u.push(n.is("leaf")),u},getCellStyles:(s,r)=>{const i=Xr(r,s.fixed,e.store);return Ql(i,"left"),Ql(i,"right"),i},columns:t}}var XN=j({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{getCellClasses:t,getCellStyles:n,columns:l}=YN(e);return{ns:ce("table"),getCellClasses:t,getCellStyles:n,columns:l}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:l,sumText:a,ns:s}=this,r=this.store.states.data.value;let i=[];return l?i=l({columns:e,data:r}):e.forEach((u,c)=>{if(c===0){i[c]=a;return}const f=r.map(h=>Number(h[u.property])),d=[];let p=!0;f.forEach(h=>{if(!Number.isNaN(+h)){p=!1;const v=`${h}`.split(".")[1];d.push(v?v.length:0)}});const m=Math.max.apply(null,d);p?i[c]="":i[c]=f.reduce((h,v)=>{const g=Number(v);return Number.isNaN(+g)?h:Number.parseFloat((h+v).toFixed(Math.min(m,20)))},0)}),De("table",{class:s.e("footer"),cellspacing:"0",cellpadding:"0",border:"0"},[Zr({columns:e}),De("tbody",[De("tr",{},[...e.map((u,c)=>De("td",{key:c,colspan:u.colSpan,rowspan:u.rowSpan,class:n(e,c),style:t(u,c)},[De("div",{class:["cell",u.labelClassName]},[i[c]])]))])])])}});function ZN(e){return{setCurrentRow:f=>{e.commit("setCurrentRow",f)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(f,d)=>{e.toggleRowSelection(f,d,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:f=>{e.clearFilter(f)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(f,d)=>{e.toggleRowExpansionAdapter(f,d)},clearSort:()=>{e.clearSort()},sort:(f,d)=>{e.commit("sort",{prop:f,order:d})}}}function JN(e,t,n,l){const a=_(!1),s=_(null),r=_(!1),i=P=>{r.value=P},u=_({width:null,height:null,headerHeight:null}),c=_(!1),f={display:"inline-block",verticalAlign:"middle"},d=_(),p=_(0),m=_(0),h=_(0),v=_(0),g=_(0);Cn(()=>{t.setHeight(e.height)}),Cn(()=>{t.setMaxHeight(e.maxHeight)}),ue(()=>[e.currentRowKey,n.states.rowKey],([P,H])=>{!o(H)||!o(P)||n.setCurrentRowKey(`${P}`)},{immediate:!0}),ue(()=>e.data,P=>{l.store.commit("setData",P)},{immediate:!0,deep:!0}),Cn(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const y=()=>{l.store.commit("setHoverRow",null),l.hoverState&&(l.hoverState=null)},k=(P,H)=>{const{pixelX:Y,pixelY:z}=H;Math.abs(Y)>=Math.abs(z)&&(l.refs.bodyWrapper.scrollLeft+=H.pixelX/5)},b=S(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),C=S(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),I=()=>{b.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(A)};ze(async()=>{await Le(),n.updateColumns(),D(),requestAnimationFrame(I);const P=l.vnode.el,H=l.refs.headerWrapper;e.flexible&&P&&P.parentElement&&(P.parentElement.style.minWidth="0"),u.value={width:d.value=P.offsetWidth,height:P.offsetHeight,headerHeight:e.showHeader&&H?H.offsetHeight:null},n.states.columns.value.forEach(Y=>{Y.filteredValue&&Y.filteredValue.length&&l.store.commit("filterChange",{column:Y,values:Y.filteredValue,silent:!0})}),l.$ready=!0});const T=(P,H)=>{if(!P)return;const Y=Array.from(P.classList).filter(z=>!z.startsWith("is-scrolling-"));Y.push(t.scrollX.value?H:"is-scrolling-none"),P.className=Y.join(" ")},M=P=>{const{tableWrapper:H}=l.refs;T(H,P)},L=P=>{const{tableWrapper:H}=l.refs;return!!(H&&H.classList.contains(P))},A=function(){if(!l.refs.scrollBarRef)return;if(!t.scrollX.value){const oe="is-scrolling-none";L(oe)||M(oe);return}const P=l.refs.scrollBarRef.wrapRef;if(!P)return;const{scrollLeft:H,offsetWidth:Y,scrollWidth:z}=P,{headerWrapper:q,footerWrapper:se}=l.refs;q&&(q.scrollLeft=H),se&&(se.scrollLeft=H);const pe=z-Y-1;H>=pe?M("is-scrolling-right"):M(H===0?"is-scrolling-left":"is-scrolling-middle")},D=()=>{l.refs.scrollBarRef&&(l.refs.scrollBarRef.wrapRef&&Jt(l.refs.scrollBarRef.wrapRef,"scroll",A,{passive:!0}),e.fit?un(l.vnode.el,B):Jt(window,"resize",B),un(l.refs.bodyWrapper,()=>{var P,H;B(),(H=(P=l.refs)==null?void 0:P.scrollBarRef)==null||H.update()}))},B=()=>{var P,H,Y,z;const q=l.vnode.el;if(!l.$ready||!q)return;let se=!1;const{width:pe,height:oe,headerHeight:re}=u.value,Q=d.value=q.offsetWidth;pe!==Q&&(se=!0);const ve=q.offsetHeight;(e.height||b.value)&&oe!==ve&&(se=!0);const _e=e.tableLayout==="fixed"?l.refs.headerWrapper:(P=l.refs.tableHeaderRef)==null?void 0:P.$el;e.showHeader&&(_e==null?void 0:_e.offsetHeight)!==re&&(se=!0),p.value=((H=l.refs.tableWrapper)==null?void 0:H.scrollHeight)||0,h.value=(_e==null?void 0:_e.scrollHeight)||0,v.value=((Y=l.refs.footerWrapper)==null?void 0:Y.offsetHeight)||0,g.value=((z=l.refs.appendWrapper)==null?void 0:z.offsetHeight)||0,m.value=p.value-h.value-v.value-g.value,se&&(u.value={width:Q,height:ve,headerHeight:e.showHeader&&(_e==null?void 0:_e.offsetHeight)||0},I())},F=qt(),x=S(()=>{const{bodyWidth:P,scrollY:H,gutterWidth:Y}=t;return P.value?`${P.value-(H.value?Y:0)}px`:""}),U=S(()=>e.maxHeight?"fixed":e.tableLayout),X=S(()=>{if(e.data&&e.data.length)return null;let P="100%";e.height&&m.value&&(P=`${m.value}px`);const H=d.value;return{width:H?`${H}px`:"",height:P}}),K=S(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),V=S(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${h.value+v.value}px)`}:{maxHeight:`${e.maxHeight-h.value-v.value}px`}:{});return{isHidden:a,renderExpanded:s,setDragVisible:i,isGroup:c,handleMouseLeave:y,handleHeaderFooterMousewheel:k,tableSize:F,emptyBlockStyle:X,handleFixedMousewheel:(P,H)=>{const Y=l.refs.bodyWrapper;if(Math.abs(H.spinY)>0){const z=Y.scrollTop;H.pixelY<0&&z!==0&&P.preventDefault(),H.pixelY>0&&Y.scrollHeight-Y.clientHeight>z&&P.preventDefault(),Y.scrollTop+=Math.ceil(H.pixelY/5)}else Y.scrollLeft+=Math.ceil(H.pixelX/5)},resizeProxyVisible:r,bodyWidth:x,resizeState:u,doLayout:I,tableBodyStyles:C,tableLayout:U,scrollbarViewStyle:f,tableInnerStyle:K,scrollbarStyle:V}}function QN(e){const t=_(),n=()=>{const a=e.vnode.el.querySelector(".hidden-columns"),s={childList:!0,subtree:!0},r=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{r.forEach(i=>i())}),t.value.observe(a,s)};ze(()=>{n()}),Il(()=>{var l;(l=t.value)==null||l.disconnect()})}var eP={data:{type:Array,default:()=>[]},size:ln,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,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"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:{type:Boolean,default:!1},flexible:Boolean,showOverflowTooltip:[Boolean,Object]};const tP=()=>{const e=_(),t=(s,r)=>{const i=e.value;i&&i.scrollTo(s,r)},n=(s,r)=>{const i=e.value;i&&He(r)&&["Top","Left"].includes(s)&&i[`setScroll${s}`](r)};return{scrollBarRef:e,scrollTo:t,setScrollTop:s=>n("Top",s),setScrollLeft:s=>n("Left",s)}};let nP=1;const lP=j({name:"ElTable",directives:{Mousewheel:vb},components:{TableHeader:HN,TableBody:qN,TableFooter:XN,ElScrollbar:Qn,hColgroup:Zr},props:eP,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=ht(),n=ce("table"),l=at();dt(Kn,l);const a=IN(l,e);l.store=a;const s=new PN({store:l.store,table:l,fit:e.fit,showHeader:e.showHeader});l.layout=s;const r=S(()=>(a.states.data.value||[]).length===0),{setCurrentRow:i,getSelectionRows:u,toggleRowSelection:c,clearSelection:f,clearFilter:d,toggleAllSelection:p,toggleRowExpansion:m,clearSort:h,sort:v}=ZN(a),{isHidden:g,renderExpanded:y,setDragVisible:k,isGroup:b,handleMouseLeave:C,handleHeaderFooterMousewheel:I,tableSize:T,emptyBlockStyle:M,handleFixedMousewheel:L,resizeProxyVisible:A,bodyWidth:D,resizeState:B,doLayout:F,tableBodyStyles:x,tableLayout:U,scrollbarViewStyle:X,tableInnerStyle:K,scrollbarStyle:V}=JN(e,s,a,l),{scrollBarRef:W,scrollTo:P,setScrollLeft:H,setScrollTop:Y}=tP(),z=hn(F,50),q=`${n.namespace.value}-table_${nP++}`;l.tableId=q,l.state={isGroup:b,resizeState:B,doLayout:F,debouncedUpdateLayout:z};const se=S(()=>e.sumText||t("el.table.sumText")),pe=S(()=>e.emptyText||t("el.table.emptyText"));return QN(l),{ns:n,layout:s,store:a,handleHeaderFooterMousewheel:I,handleMouseLeave:C,tableId:q,tableSize:T,isHidden:g,isEmpty:r,renderExpanded:y,resizeProxyVisible:A,resizeState:B,isGroup:b,bodyWidth:D,tableBodyStyles:x,emptyBlockStyle:M,debouncedUpdateLayout:z,handleFixedMousewheel:L,setCurrentRow:i,getSelectionRows:u,toggleRowSelection:c,clearSelection:f,clearFilter:d,toggleAllSelection:p,toggleRowExpansion:m,clearSort:h,doLayout:F,sort:v,t,setDragVisible:k,context:l,computedSumText:se,computedEmptyText:pe,tableLayout:U,scrollbarViewStyle:X,tableInnerStyle:K,scrollbarStyle:V,scrollBarRef:W,scrollTo:P,setScrollLeft:H,setScrollTop:Y}}}),oP=["data-prefix"],aP={ref:"hiddenColumns",class:"hidden-columns"};function sP(e,t,n,l,a,s){const r=ee("hColgroup"),i=ee("table-header"),u=ee("table-body"),c=ee("el-scrollbar"),f=ee("table-footer"),d=Sl("mousewheel");return w(),O("div",{ref:"tableWrapper",class:$([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:Re(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...p)=>e.handleMouseLeave&&e.handleMouseLeave(...p))},[R("div",{class:$(e.ns.e("inner-wrapper")),style:Re(e.tableInnerStyle)},[R("div",aP,[ie(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?xe((w(),O("div",{key:0,ref:"headerWrapper",class:$(e.ns.e("header-wrapper"))},[R("table",{ref:"tableHeader",class:$(e.ns.e("header")),style:Re(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[E(r,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),E(i,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[d,e.handleHeaderFooterMousewheel]]):Z("v-if",!0),R("div",{ref:"bodyWrapper",class:$(e.ns.e("body-wrapper"))},[E(c,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:N(()=>[R("table",{ref:"tableBody",class:$(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Re({width:e.bodyWidth,tableLayout:e.tableLayout})},[E(r,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(w(),G(i,{key:0,ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])):Z("v-if",!0),E(u,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"])],6),e.isEmpty?(w(),O("div",{key:0,ref:"emptyBlock",style:Re(e.emptyBlockStyle),class:$(e.ns.e("empty-block"))},[R("span",{class:$(e.ns.e("empty-text"))},[ie(e.$slots,"empty",{},()=>[ye(ae(e.computedEmptyText),1)])],2)],6)):Z("v-if",!0),e.$slots.append?(w(),O("div",{key:1,ref:"appendWrapper",class:$(e.ns.e("append-wrapper"))},[ie(e.$slots,"append")],2)):Z("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary?xe((w(),O("div",{key:1,ref:"footerWrapper",class:$(e.ns.e("footer-wrapper"))},[E(f,{border:e.border,"default-sort":e.defaultSort,store:e.store,style:Re(e.tableBodyStyles),"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","style","sum-text","summary-method"])],2)),[[lt,!e.isEmpty],[d,e.handleHeaderFooterMousewheel]]):Z("v-if",!0),e.border||e.isGroup?(w(),O("div",{key:2,class:$(e.ns.e("border-left-patch"))},null,2)):Z("v-if",!0)],6),xe(R("div",{ref:"resizeProxy",class:$(e.ns.e("column-resize-proxy"))},null,2),[[lt,e.resizeProxyVisible]])],46,oP)}var rP=he(lP,[["render",sP],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]);const iP={selection:"table-column--selection",expand:"table__expand-column"},uP={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:""}},cP=e=>iP[e]||"",dP={selection:{renderHeader({store:e}){function t(){return e.states.data.value&&e.states.data.value.length===0}return De($n,{disabled:t(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value})},renderCell({row:e,column:t,store:n,$index:l}){return De($n,{disabled:t.selectable?!t.selectable.call(null,e,l):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:a=>a.stopPropagation(),modelValue:n.isSelected(e)})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const l=e.index;return typeof l=="number"?n=t+l:typeof l=="function"&&(n=l(t)),De("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:n}){const{ns:l}=t,a=[l.e("expand-icon")];return n&&a.push(l.em("expand-icon","expanded")),De("div",{class:a,onClick:function(r){r.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[De(Pe,null,{default:()=>[De(sn)]})]})},sortable:!1,resizable:!1}};function fP({row:e,column:t,$index:n}){var l;const a=t.property,s=a&&na(e,a).value;return t&&t.formatter?t.formatter(e,t,s,n):((l=s==null?void 0:s.toString)==null?void 0:l.call(s))||""}function pP({row:e,treeNode:t,store:n},l=!1){const{ns:a}=n;if(!t)return l?[De("span",{class:a.e("placeholder")})]:null;const s=[],r=function(i){i.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&s.push(De("span",{class:a.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const i=[a.e("expand-icon"),t.expanded?a.em("expand-icon","expanded"):""];let u=sn;t.loading&&(u=Xn),s.push(De("div",{class:i,onClick:r},{default:()=>[De(Pe,{class:{[a.is("loading")]:t.loading}},{default:()=>[De(u)]})]}))}else s.push(De("span",{class:a.e("placeholder")}));return s}function wu(e,t){return e.reduce((n,l)=>(n[l]=l,n),t)}function vP(e,t){const n=at();return{registerComplexWatchers:()=>{const s=["fixed"],r={realWidth:"width",realMinWidth:"minWidth"},i=wu(s,r);Object.keys(i).forEach(u=>{const c=r[u];nn(t,c)&&ue(()=>t[c],f=>{let d=f;c==="width"&&u==="realWidth"&&(d=Gr(f)),c==="minWidth"&&u==="realMinWidth"&&(d=Vf(f)),n.columnConfig.value[c]=d,n.columnConfig.value[u]=d;const p=c==="fixed";e.value.store.scheduleLayout(p)})})},registerNormalWatchers:()=>{const s=["label","filters","filterMultiple","sortable","index","formatter","className","labelClassName","showOverflowTooltip"],r={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},i=wu(s,r);Object.keys(i).forEach(u=>{const c=r[u];nn(t,c)&&ue(()=>t[c],f=>{n.columnConfig.value[u]=f})})}}}function mP(e,t,n){const l=at(),a=_(""),s=_(!1),r=_(),i=_(),u=ce("table");Cn(()=>{r.value=e.align?`is-${e.align}`:null,r.value}),Cn(()=>{i.value=e.headerAlign?`is-${e.headerAlign}`:r.value,i.value});const c=S(()=>{let C=l.vnode.vParent||l.parent;for(;C&&!C.tableId&&!C.columnId;)C=C.vnode.vParent||C.parent;return C}),f=S(()=>{const{store:C}=l.parent;if(!C)return!1;const{treeData:I}=C.states,T=I.value;return T&&Object.keys(T).length>0}),d=_(Gr(e.width)),p=_(Vf(e.minWidth)),m=C=>(d.value&&(C.width=d.value),p.value&&(C.minWidth=p.value),!d.value&&p.value&&(C.width=void 0),C.minWidth||(C.minWidth=80),C.realWidth=Number(C.width===void 0?C.minWidth:C.width),C),h=C=>{const I=C.type,T=dP[I]||{};Object.keys(T).forEach(L=>{const A=T[L];L!=="className"&&A!==void 0&&(C[L]=A)});const M=cP(I);if(M){const L=`${o(u.namespace)}-${M}`;C.className=C.className?`${C.className} ${L}`:L}return C},v=C=>{Array.isArray(C)?C.forEach(T=>I(T)):I(C);function I(T){var M;((M=T==null?void 0:T.type)==null?void 0:M.name)==="ElTableColumn"&&(T.vParent=l)}};return{columnId:a,realAlign:r,isSubColumn:s,realHeaderAlign:i,columnOrTableParent:c,setColumnWidth:m,setColumnForcedProps:h,setColumnRenders:C=>{e.renderHeader||C.type!=="selection"&&(C.renderHeader=T=>{l.columnConfig.value.label;const M=t.header;return M?M(T):C.label});let I=C.renderCell;return C.type==="expand"?(C.renderCell=T=>De("div",{class:"cell"},[I(T)]),n.value.renderExpanded=T=>t.default?t.default(T):t.default):(I=I||fP,C.renderCell=T=>{let M=null;if(t.default){const x=t.default(T);M=x.some(U=>U.type!==ur)?x:I(T)}else M=I(T);const{columns:L}=n.value.store.states,A=L.value.findIndex(x=>x.type==="default"),D=f.value&&T.cellIndex===A,B=pP(T,D),F={class:"cell",style:{}};return C.showOverflowTooltip&&(F.class=`${F.class} ${o(u.namespace)}-tooltip`,F.style={width:`${(T.column.realWidth||Number(T.column.width))-1}px`}),v(M),De("div",F,[B,M])}),C},getPropsData:(...C)=>C.reduce((I,T)=>(Array.isArray(T)&&T.forEach(M=>{I[M]=e[M]}),I),{}),getColumnElIndex:(C,I)=>Array.prototype.indexOf.call(C,I),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",l.columnConfig.value)}}}var hP={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},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let gP=1;var Kf=j({name:"ElTableColumn",components:{ElCheckbox:$n},props:hP,setup(e,{slots:t}){const n=at(),l=_({}),a=S(()=>{let b=n.parent;for(;b&&!b.tableId;)b=b.parent;return b}),{registerNormalWatchers:s,registerComplexWatchers:r}=vP(a,e),{columnId:i,isSubColumn:u,realHeaderAlign:c,columnOrTableParent:f,setColumnWidth:d,setColumnForcedProps:p,setColumnRenders:m,getPropsData:h,getColumnElIndex:v,realAlign:g,updateColumnOrder:y}=mP(e,t,a),k=f.value;i.value=`${k.tableId||k.columnId}_column_${gP++}`,cr(()=>{u.value=a.value!==k;const b=e.type||"default",C=e.sortable===""?!0:e.sortable,I=Yt(e.showOverflowTooltip)?k.props.showOverflowTooltip:e.showOverflowTooltip,T={...uP[b],id:i.value,type:b,property:e.prop||e.property,align:g,headerAlign:c,showOverflowTooltip:I,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:C,index:e.index,rawColumnKey:n.vnode.key};let B=h(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement"]);B=gN(T,B),B=bN(m,d,p)(B),l.value=B,s(),r()}),ze(()=>{var b;const C=f.value,I=u.value?C.vnode.el.children:(b=C.refs.hiddenColumns)==null?void 0:b.children,T=()=>v(I||[],n.vnode.el);l.value.getColumnIndex=T,T()>-1&&a.value.store.commit("insertColumn",l.value,u.value?C.columnConfig.value:null,y)}),Rt(()=>{a.value.store.commit("removeColumn",l.value,u.value?k.columnConfig.value:null,y)}),n.columnId=i.value,n.columnConfig=l},render(){var e,t,n;try{const l=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),a=[];if(Array.isArray(l))for(const r of l)((n=r.type)==null?void 0:n.name)==="ElTableColumn"||r.shapeFlag&2?a.push(r):r.type===Ne&&Array.isArray(r.children)&&r.children.forEach(i=>{(i==null?void 0:i.patchFlag)!==1024&&!ct(i==null?void 0:i.children)&&a.push(i)});return De("div",a)}catch{return De("div",[])}}});const yP=Qe(rP,{TableColumn:Kf}),bP=xt(Kf);var Po=(e=>(e.ASC="asc",e.DESC="desc",e))(Po||{}),Mo=(e=>(e.CENTER="center",e.RIGHT="right",e))(Mo||{}),Wf=(e=>(e.LEFT="left",e.RIGHT="right",e))(Wf||{});const Xs={asc:"desc",desc:"asc"},Lo=Symbol("placeholder"),wP=(e,t,n)=>{var l;const a={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:e.flexGrow||0,flexShrink:e.flexShrink||1}};n||(a.flexShrink=1);const s={...(l=e.style)!=null?l:{},...a,flexBasis:"auto",width:e.width};return t||(e.maxWidth&&(s.maxWidth=e.maxWidth),e.minWidth&&(s.minWidth=e.minWidth)),s};function kP(e,t,n){const l=S(()=>o(t).filter(v=>!v.hidden)),a=S(()=>o(l).filter(v=>v.fixed==="left"||v.fixed===!0)),s=S(()=>o(l).filter(v=>v.fixed==="right")),r=S(()=>o(l).filter(v=>!v.fixed)),i=S(()=>{const v=[];return o(a).forEach(g=>{v.push({...g,placeholderSign:Lo})}),o(r).forEach(g=>{v.push(g)}),o(s).forEach(g=>{v.push({...g,placeholderSign:Lo})}),v}),u=S(()=>o(a).length||o(s).length),c=S(()=>o(t).reduce((g,y)=>(g[y.key]=wP(y,o(n),e.fixed),g),{})),f=S(()=>o(l).reduce((v,g)=>v+g.width,0)),d=v=>o(t).find(g=>g.key===v),p=v=>o(c)[v],m=(v,g)=>{v.width=g};function h(v){var g;const{key:y}=v.currentTarget.dataset;if(!y)return;const{sortState:k,sortBy:b}=e;let C=Po.ASC;It(k)?C=Xs[k[y]]:C=Xs[b.order],(g=e.onColumnSort)==null||g.call(e,{column:d(y),key:y,order:C})}return{columns:t,columnsStyles:c,columnsTotalWidth:f,fixedColumnsOnLeft:a,fixedColumnsOnRight:s,hasFixedColumns:u,mainColumns:i,normalColumns:r,visibleColumns:l,getColumn:d,getColumnStyle:p,updateColumnWidth:m,onColumnSorted:h}}const CP=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:l,onMaybeEndReached:a})=>{const s=_({scrollLeft:0,scrollTop:0});function r(m){var h,v,g;const{scrollTop:y}=m;(h=t.value)==null||h.scrollTo(m),(v=n.value)==null||v.scrollToTop(y),(g=l.value)==null||g.scrollToTop(y)}function i(m){s.value=m,r(m)}function u(m){s.value.scrollTop=m,r(o(s))}function c(m){var h,v;s.value.scrollLeft=m,(v=(h=t.value)==null?void 0:h.scrollTo)==null||v.call(h,o(s))}function f(m){var h;i(m),(h=e.onScroll)==null||h.call(e,m)}function d({scrollTop:m}){const{scrollTop:h}=o(s);m!==h&&u(m)}function p(m,h="auto"){var v;(v=t.value)==null||v.scrollToRow(m,h)}return ue(()=>o(s).scrollTop,(m,h)=>{m>h&&a()}),{scrollPos:s,scrollTo:i,scrollToLeft:c,scrollToTop:u,scrollToRow:p,onScroll:f,onVerticalScroll:d}},SP=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:l})=>{const a=at(),{emit:s}=a,r=Nt(!1),i=Nt(null),u=_(e.defaultExpandedRowKeys||[]),c=_(-1),f=Nt(null),d=_({}),p=_({}),m=Nt({}),h=Nt({}),v=Nt({}),g=S(()=>He(e.estimatedRowHeight));function y(L){var A;(A=e.onRowsRendered)==null||A.call(e,L),L.rowCacheEnd>o(c)&&(c.value=L.rowCacheEnd)}function k({hovered:L,rowKey:A}){i.value=L?A:null}function b({expanded:L,rowData:A,rowIndex:D,rowKey:B}){var F,x;const U=[...o(u)],X=U.indexOf(B);L?X===-1&&U.push(B):X>-1&&U.splice(X,1),u.value=U,s("update:expandedRowKeys",U),(F=e.onRowExpand)==null||F.call(e,{expanded:L,rowData:A,rowIndex:D,rowKey:B}),(x=e.onExpandedRowsChange)==null||x.call(e,U)}const C=hn(()=>{var L,A,D,B;r.value=!0,d.value={...o(d),...o(p)},I(o(f),!1),p.value={},f.value=null,(L=t.value)==null||L.forceUpdate(),(A=n.value)==null||A.forceUpdate(),(D=l.value)==null||D.forceUpdate(),(B=a.proxy)==null||B.$forceUpdate(),r.value=!1},0);function I(L,A=!1){o(g)&&[t,n,l].forEach(D=>{const B=o(D);B&&B.resetAfterRowIndex(L,A)})}function T(L,A,D){const B=o(f);(B===null||B>D)&&(f.value=D),p.value[L]=A}function M({rowKey:L,height:A,rowIndex:D},B){B?B===Wf.RIGHT?v.value[L]=A:m.value[L]=A:h.value[L]=A;const F=Math.max(...[m,v,h].map(x=>x.value[L]||0));o(d)[L]!==F&&(T(L,F,D),C())}return{hoveringRowKey:i,expandedRowKeys:u,lastRenderedRowIndex:c,isDynamic:g,isResetting:r,rowHeights:d,resetAfterIndex:I,onRowExpanded:b,onRowHovered:k,onRowsRendered:y,onRowHeightChange:M}},_P=(e,{expandedRowKeys:t,lastRenderedRowIndex:n,resetAfterIndex:l})=>{const a=_({}),s=S(()=>{const i={},{data:u,rowKey:c}=e,f=o(t);if(!f||!f.length)return u;const d=[],p=new Set;f.forEach(h=>p.add(h));let m=u.slice();for(m.forEach(h=>i[h[c]]=0);m.length>0;){const h=m.shift();d.push(h),p.has(h[c])&&Array.isArray(h.children)&&h.children.length>0&&(m=[...h.children,...m],h.children.forEach(v=>i[v[c]]=i[h[c]]+1))}return a.value=i,d}),r=S(()=>{const{data:i,expandColumnKey:u}=e;return u?o(s):i});return ue(r,(i,u)=>{i!==u&&(n.value=-1,l(0,!0))}),{data:r,depthMap:a}},EP=(e,t)=>e+t,fa=e=>et(e)?e.reduce(EP,0):e,$l=(e,t,n={})=>kt(e)?e(t):e??n,ol=e=>(["width","maxWidth","minWidth","height"].forEach(t=>{e[t]=Ft(e[t])}),e),Uf=e=>zt(e)?t=>De(e,t):e,$P=(e,{columnsTotalWidth:t,data:n,fixedColumnsOnLeft:l,fixedColumnsOnRight:a})=>{const s=S(()=>{const{fixed:b,width:C,vScrollbarSize:I}=e,T=C-I;return b?Math.max(Math.round(o(t)),T):T}),r=S(()=>o(s)+(e.fixed?e.vScrollbarSize:0)),i=S(()=>{const{height:b=0,maxHeight:C=0,footerHeight:I,hScrollbarSize:T}=e;if(C>0){const M=o(h),L=o(u),D=o(m)+M+L+T;return Math.min(D,C-I)}return b-I}),u=S(()=>{const{rowHeight:b,estimatedRowHeight:C}=e,I=o(n);return He(C)?I.length*C:I.length*b}),c=S(()=>{const{maxHeight:b}=e,C=o(i);if(He(b)&&b>0)return C;const I=o(u)+o(m)+o(h);return Math.min(C,I)}),f=b=>b.width,d=S(()=>fa(o(l).map(f))),p=S(()=>fa(o(a).map(f))),m=S(()=>fa(e.headerHeight)),h=S(()=>{var b;return(((b=e.fixedData)==null?void 0:b.length)||0)*e.rowHeight}),v=S(()=>o(i)-o(m)-o(h)),g=S(()=>{const{style:b={},height:C,width:I}=e;return ol({...b,height:C,width:I})}),y=S(()=>ol({height:e.footerHeight})),k=S(()=>({top:Ft(o(m)),bottom:Ft(e.footerHeight),width:Ft(e.width)}));return{bodyWidth:s,fixedTableHeight:c,mainTableHeight:i,leftTableWidth:d,rightTableWidth:p,headerWidth:r,rowsHeight:u,windowHeight:v,footerHeight:y,emptyStyle:k,rootStyle:g,headerHeight:m}},TP=e=>{const t=_(),n=_(0),l=_(0);let a;return ze(()=>{a=un(t,([s])=>{const{width:r,height:i}=s.contentRect,{paddingLeft:u,paddingRight:c,paddingTop:f,paddingBottom:d}=getComputedStyle(s.target),p=Number.parseInt(u)||0,m=Number.parseInt(c)||0,h=Number.parseInt(f)||0,v=Number.parseInt(d)||0;n.value=r-p-m,l.value=i-h-v}).stop}),Rt(()=>{a==null||a()}),ue([n,l],([s,r])=>{var i;(i=e.onResize)==null||i.call(e,{width:s,height:r})}),{sizer:t,width:n,height:l}};function IP(e){const t=_(),n=_(),l=_(),{columns:a,columnsStyles:s,columnsTotalWidth:r,fixedColumnsOnLeft:i,fixedColumnsOnRight:u,hasFixedColumns:c,mainColumns:f,onColumnSorted:d}=kP(e,At(e,"columns"),At(e,"fixed")),{scrollTo:p,scrollToLeft:m,scrollToTop:h,scrollToRow:v,onScroll:g,onVerticalScroll:y,scrollPos:k}=CP(e,{mainTableRef:t,leftTableRef:n,rightTableRef:l,onMaybeEndReached:Ie}),{expandedRowKeys:b,hoveringRowKey:C,lastRenderedRowIndex:I,isDynamic:T,isResetting:M,rowHeights:L,resetAfterIndex:A,onRowExpanded:D,onRowHeightChange:B,onRowHovered:F,onRowsRendered:x}=SP(e,{mainTableRef:t,leftTableRef:n,rightTableRef:l}),{data:U,depthMap:X}=_P(e,{expandedRowKeys:b,lastRenderedRowIndex:I,resetAfterIndex:A}),{bodyWidth:K,fixedTableHeight:V,mainTableHeight:W,leftTableWidth:P,rightTableWidth:H,headerWidth:Y,rowsHeight:z,windowHeight:q,footerHeight:se,emptyStyle:pe,rootStyle:oe,headerHeight:re}=$P(e,{columnsTotalWidth:r,data:U,fixedColumnsOnLeft:i,fixedColumnsOnRight:u}),Q=Nt(!1),ve=_(),_e=S(()=>{const Ke=o(U).length===0;return et(e.fixedData)?e.fixedData.length===0&&Ke:Ke});function Te(Ke){const{estimatedRowHeight:Ge,rowHeight:qe,rowKey:it}=e;return Ge?o(L)[o(U)[Ke][it]]||Ge:qe}function Ie(){const{onEndReached:Ke}=e;if(!Ke)return;const{scrollTop:Ge}=o(k),qe=o(z),it=o(q),ke=qe-(Ge+it)+e.hScrollbarSize;o(I)>=0&&qe===Ge+o(W)-o(re)&&Ke(ke)}return ue(()=>e.expandedRowKeys,Ke=>b.value=Ke,{deep:!0}),{columns:a,containerRef:ve,mainTableRef:t,leftTableRef:n,rightTableRef:l,isDynamic:T,isResetting:M,isScrolling:Q,hoveringRowKey:C,hasFixedColumns:c,columnsStyles:s,columnsTotalWidth:r,data:U,expandedRowKeys:b,depthMap:X,fixedColumnsOnLeft:i,fixedColumnsOnRight:u,mainColumns:f,bodyWidth:K,emptyStyle:pe,rootStyle:oe,headerWidth:Y,footerHeight:se,mainTableHeight:W,fixedTableHeight:V,leftTableWidth:P,rightTableWidth:H,showEmpty:_e,getRowHeight:Te,onColumnSorted:d,onRowHovered:F,onRowExpanded:D,onRowsRendered:x,onRowHeightChange:B,scrollTo:p,scrollToLeft:m,scrollToTop:h,scrollToRow:v,onScroll:g,onVerticalScroll:y}}const Jr=Symbol("tableV2"),jf=String,xo={type:te(Array),required:!0},Qr={type:te(Array)},qf={...Qr,required:!0},NP=String,ku={type:te(Array),default:()=>Ot([])},ml={type:Number,required:!0},Gf={type:te([String,Number,Symbol]),default:"id"},Cu={type:te(Object)},bl=ge({class:String,columns:xo,columnsStyles:{type:te(Object),required:!0},depth:Number,expandColumnKey:NP,estimatedRowHeight:{...kl.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:te(Function)},onRowHover:{type:te(Function)},onRowHeightChange:{type:te(Function)},rowData:{type:te(Object),required:!0},rowEventHandlers:{type:te(Object)},rowIndex:{type:Number,required:!0},rowKey:Gf,style:{type:te(Object)}}),ws={type:Number,required:!0},ei=ge({class:String,columns:xo,fixedHeaderData:{type:te(Array)},headerData:{type:te(Array),required:!0},headerHeight:{type:te([Number,Array]),default:50},rowWidth:ws,rowHeight:{type:Number,default:50},height:ws,width:ws}),pa=ge({columns:xo,data:qf,fixedData:Qr,estimatedRowHeight:bl.estimatedRowHeight,width:ml,height:ml,headerWidth:ml,headerHeight:ei.headerHeight,bodyWidth:ml,rowHeight:ml,cache:yf.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:kl.scrollbarAlwaysOn,scrollbarStartGap:kl.scrollbarStartGap,scrollbarEndGap:kl.scrollbarEndGap,class:jf,style:Cu,containerStyle:Cu,getRowHeight:{type:te(Function),required:!0},rowKey:bl.rowKey,onRowsRendered:{type:te(Function)},onScroll:{type:te(Function)}}),PP=ge({cache:pa.cache,estimatedRowHeight:bl.estimatedRowHeight,rowKey:Gf,headerClass:{type:te([String,Function])},headerProps:{type:te([Object,Function])},headerCellProps:{type:te([Object,Function])},headerHeight:ei.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:te([String,Function])},rowProps:{type:te([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:te([Object,Function])},columns:xo,data:qf,dataGetter:{type:te(Function)},fixedData:Qr,expandColumnKey:bl.expandColumnKey,expandedRowKeys:ku,defaultExpandedRowKeys:ku,class:jf,fixed:Boolean,style:{type:te(Object)},width:ml,height:ml,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:kl.hScrollbarSize,vScrollbarSize:kl.vScrollbarSize,scrollbarAlwaysOn:kf.alwaysOn,sortBy:{type:te(Object),default:()=>({})},sortState:{type:te(Object),default:void 0},onColumnSort:{type:te(Function)},onExpandedRowsChange:{type:te(Function)},onEndReached:{type:te(Function)},onRowExpand:bl.onRowExpand,onScroll:pa.onScroll,onRowsRendered:pa.onRowsRendered,rowEventHandlers:bl.rowEventHandlers}),ti=(e,{slots:t})=>{var n;const{cellData:l,style:a}=e,s=((n=l==null?void 0:l.toString)==null?void 0:n.call(l))||"";return E("div",{class:e.class,title:s,style:a},[t.default?t.default(e):s])};ti.displayName="ElTableV2Cell";ti.inheritAttrs=!1;const ni=(e,{slots:t})=>{var n,l;return t.default?t.default(e):E("div",{class:e.class,title:(n=e.column)==null?void 0:n.title},[(l=e.column)==null?void 0:l.title])};ni.displayName="ElTableV2HeaderCell";ni.inheritAttrs=!1;const MP=ge({class:String,columns:xo,columnsStyles:{type:te(Object),required:!0},headerIndex:Number,style:{type:te(Object)}}),LP=j({name:"ElTableV2HeaderRow",props:MP,setup(e,{slots:t}){return()=>{const{columns:n,columnsStyles:l,headerIndex:a,style:s}=e;let r=n.map((i,u)=>t.cell({columns:n,column:i,columnIndex:u,headerIndex:a,style:l[i.key]}));return t.header&&(r=t.header({cells:r.map(i=>et(i)&&i.length===1?i[0]:i),columns:n,headerIndex:a})),E("div",{class:e.class,style:s,role:"row"},[r])}}}),RP="ElTableV2Header",OP=j({name:RP,props:ei,setup(e,{slots:t,expose:n}){const l=ce("table-v2"),a=_(),s=S(()=>ol({width:e.width,height:e.height})),r=S(()=>ol({width:e.rowWidth,height:e.height})),i=S(()=>Yl(o(e.headerHeight))),u=d=>{const p=o(a);Le(()=>{p!=null&&p.scroll&&p.scroll({left:d})})},c=()=>{const d=l.e("fixed-header-row"),{columns:p,fixedHeaderData:m,rowHeight:h}=e;return m==null?void 0:m.map((v,g)=>{var y;const k=ol({height:h,width:"100%"});return(y=t.fixed)==null?void 0:y.call(t,{class:d,columns:p,rowData:v,rowIndex:-(g+1),style:k})})},f=()=>{const d=l.e("dynamic-header-row"),{columns:p}=e;return o(i).map((m,h)=>{var v;const g=ol({width:"100%",height:m});return(v=t.dynamic)==null?void 0:v.call(t,{class:d,columns:p,headerIndex:h,style:g})})};return n({scrollToLeft:u}),()=>{if(!(e.height<=0))return E("div",{ref:a,class:e.class,style:o(s),role:"rowgroup"},[E("div",{style:o(r),class:l.e("header")},[f(),c()])])}}}),AP=e=>{const{isScrolling:t}=Me(Jr),n=_(!1),l=_(),a=S(()=>He(e.estimatedRowHeight)&&e.rowIndex>=0),s=(u=!1)=>{const c=o(l);if(!c)return;const{columns:f,onRowHeightChange:d,rowKey:p,rowIndex:m,style:h}=e,{height:v}=c.getBoundingClientRect();n.value=!0,Le(()=>{if(u||v!==Number.parseInt(h.height)){const g=f[0],y=(g==null?void 0:g.placeholderSign)===Lo;d==null||d({rowKey:p,height:v,rowIndex:m},g&&!y&&g.fixed)}})},r=S(()=>{const{rowData:u,rowIndex:c,rowKey:f,onRowHover:d}=e,p=e.rowEventHandlers||{},m={};return Object.entries(p).forEach(([h,v])=>{kt(v)&&(m[h]=g=>{v({event:g,rowData:u,rowIndex:c,rowKey:f})})}),d&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:h,hovered:v})=>{const g=m[h];m[h]=y=>{d({event:y,hovered:v,rowData:u,rowIndex:c,rowKey:f}),g==null||g(y)}}),m}),i=u=>{const{onRowExpand:c,rowData:f,rowIndex:d,rowKey:p}=e;c==null||c({expanded:u,rowData:f,rowIndex:d,rowKey:p})};return ze(()=>{o(a)&&s(!0)}),{isScrolling:t,measurable:a,measured:n,rowRef:l,eventHandlers:r,onExpand:i}},VP="ElTableV2TableRow",DP=j({name:VP,props:bl,setup(e,{expose:t,slots:n,attrs:l}){const{eventHandlers:a,isScrolling:s,measurable:r,measured:i,rowRef:u,onExpand:c}=AP(e);return t({onExpand:c}),()=>{const{columns:f,columnsStyles:d,expandColumnKey:p,depth:m,rowData:h,rowIndex:v,style:g}=e;let y=f.map((k,b)=>{const C=et(h.children)&&h.children.length>0&&k.key===p;return n.cell({column:k,columns:f,columnIndex:b,depth:m,style:d[k.key],rowData:h,rowIndex:v,isScrolling:o(s),expandIconProps:C?{rowData:h,rowIndex:v,onExpand:c}:void 0})});if(n.row&&(y=n.row({cells:y.map(k=>et(k)&&k.length===1?k[0]:k),style:g,columns:f,depth:m,rowData:h,rowIndex:v,isScrolling:o(s)})),o(r)){const{height:k,...b}=g||{},C=o(i);return E("div",ot({ref:u,class:e.class,style:C?g:b,role:"row"},l,o(a)),[y])}return E("div",ot(l,{ref:u,class:e.class,style:g,role:"row"},o(a)),[y])}}}),BP=e=>{const{sortOrder:t}=e;return E(Pe,{size:14,class:e.class},{default:()=>[t===Po.ASC?E($v,null,null):E(Tv,null,null)]})},xP=e=>{const{expanded:t,expandable:n,onExpand:l,style:a,size:s}=e,r={onClick:n?()=>l(!t):void 0,class:e.class};return E(Pe,ot(r,{size:s,style:a}),{default:()=>[E(sn,null,null)]})},FP="ElTableV2Grid",zP=e=>{const t=_(),n=_(),l=S(()=>{const{data:v,rowHeight:g,estimatedRowHeight:y}=e;if(!y)return v.length*g}),a=S(()=>{const{fixedData:v,rowHeight:g}=e;return((v==null?void 0:v.length)||0)*g}),s=S(()=>fa(e.headerHeight)),r=S(()=>{const{height:v}=e;return Math.max(0,v-o(s)-o(a))}),i=S(()=>o(s)+o(a)>0),u=({data:v,rowIndex:g})=>v[g][e.rowKey];function c({rowCacheStart:v,rowCacheEnd:g,rowVisibleStart:y,rowVisibleEnd:k}){var b;(b=e.onRowsRendered)==null||b.call(e,{rowCacheStart:v,rowCacheEnd:g,rowVisibleStart:y,rowVisibleEnd:k})}function f(v,g){var y;(y=n.value)==null||y.resetAfterRowIndex(v,g)}function d(v,g){const y=o(t),k=o(n);!y||!k||(It(v)?(y.scrollToLeft(v.scrollLeft),k.scrollTo(v)):(y.scrollToLeft(v),k.scrollTo({scrollLeft:v,scrollTop:g})))}function p(v){var g;(g=o(n))==null||g.scrollTo({scrollTop:v})}function m(v,g){var y;(y=o(n))==null||y.scrollToItem(v,1,g)}function h(){var v,g;(v=o(n))==null||v.$forceUpdate(),(g=o(t))==null||g.$forceUpdate()}return{bodyRef:n,forceUpdate:h,fixedRowHeight:a,gridHeight:r,hasHeader:i,headerHeight:s,headerRef:t,totalHeight:l,itemKey:u,onItemRendered:c,resetAfterRowIndex:f,scrollTo:d,scrollToTop:p,scrollToRow:m}},li=j({name:FP,props:pa,setup(e,{slots:t,expose:n}){const{ns:l}=Me(Jr),{bodyRef:a,fixedRowHeight:s,gridHeight:r,hasHeader:i,headerRef:u,headerHeight:c,totalHeight:f,forceUpdate:d,itemKey:p,onItemRendered:m,resetAfterRowIndex:h,scrollTo:v,scrollToTop:g,scrollToRow:y}=zP(e);n({forceUpdate:d,totalHeight:f,scrollTo:v,scrollToTop:g,scrollToRow:y,resetAfterRowIndex:h});const k=()=>e.bodyWidth;return()=>{const{cache:b,columns:C,data:I,fixedData:T,useIsScrolling:M,scrollbarAlwaysOn:L,scrollbarEndGap:A,scrollbarStartGap:D,style:B,rowHeight:F,bodyWidth:x,estimatedRowHeight:U,headerWidth:X,height:K,width:V,getRowHeight:W,onScroll:P}=e,H=He(U),Y=H?kT:gT,z=o(c);return E("div",{role:"table",class:[l.e("table"),e.class],style:B},[E(Y,{ref:a,data:I,useIsScrolling:M,itemKey:p,columnCache:0,columnWidth:H?k:x,totalColumn:1,totalRow:I.length,rowCache:b,rowHeight:H?W:F,width:V,height:o(r),class:l.e("body"),role:"rowgroup",scrollbarStartGap:D,scrollbarEndGap:A,scrollbarAlwaysOn:L,onScroll:P,onItemRendered:m,perfMode:!1},{default:q=>{var se;const pe=I[q.rowIndex];return(se=t.row)==null?void 0:se.call(t,{...q,columns:C,rowData:pe})}}),o(i)&&E(OP,{ref:u,class:l.e("header-wrapper"),columns:C,headerData:I,headerHeight:e.headerHeight,fixedHeaderData:T,rowWidth:X,rowHeight:F,width:V,height:Math.min(z+o(s),K)},{dynamic:t.header,fixed:t.row})])}}});function HP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const KP=(e,{slots:t})=>{const{mainTableRef:n,...l}=e;return E(li,ot({ref:n},l),HP(t)?t:{default:()=>[t]})};function WP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const UP=(e,{slots:t})=>{if(!e.columns.length)return;const{leftTableRef:n,...l}=e;return E(li,ot({ref:n},l),WP(t)?t:{default:()=>[t]})};function jP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const qP=(e,{slots:t})=>{if(!e.columns.length)return;const{rightTableRef:n,...l}=e;return E(li,ot({ref:n},l),jP(t)?t:{default:()=>[t]})};function GP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const YP=(e,{slots:t})=>{const{columns:n,columnsStyles:l,depthMap:a,expandColumnKey:s,expandedRowKeys:r,estimatedRowHeight:i,hasFixedColumns:u,hoveringRowKey:c,rowData:f,rowIndex:d,style:p,isScrolling:m,rowProps:h,rowClass:v,rowKey:g,rowEventHandlers:y,ns:k,onRowHovered:b,onRowExpanded:C}=e,I=$l(v,{columns:n,rowData:f,rowIndex:d},""),T=$l(h,{columns:n,rowData:f,rowIndex:d}),M=f[g],L=a[M]||0,A=!!s,D=d<0,B=[k.e("row"),I,{[k.e(`row-depth-${L}`)]:A&&d>=0,[k.is("expanded")]:A&&r.includes(M),[k.is("hovered")]:!m&&M===c,[k.is("fixed")]:!L&&D,[k.is("customized")]:!!t.row}],F=u?b:void 0,x={...T,columns:n,columnsStyles:l,class:B,depth:L,expandColumnKey:s,estimatedRowHeight:D?void 0:i,isScrolling:m,rowIndex:d,rowData:f,rowKey:M,rowEventHandlers:y,style:p};return E(DP,ot(x,{onRowHover:F,onRowExpand:C}),GP(t)?t:{default:()=>[t]})},Zs=({columns:e,column:t,columnIndex:n,depth:l,expandIconProps:a,isScrolling:s,rowData:r,rowIndex:i,style:u,expandedRowKeys:c,ns:f,cellProps:d,expandColumnKey:p,indentSize:m,iconSize:h,rowKey:v},{slots:g})=>{const y=ol(u);if(t.placeholderSign===Lo)return E("div",{class:f.em("row-cell","placeholder"),style:y},null);const{cellRenderer:k,dataKey:b,dataGetter:C}=t,T=Uf(k)||g.default||(K=>E(ti,K,null)),M=kt(C)?C({columns:e,column:t,columnIndex:n,rowData:r,rowIndex:i}):Vt(r,b??""),L=$l(d,{cellData:M,columns:e,column:t,columnIndex:n,rowIndex:i,rowData:r}),A={class:f.e("cell-text"),columns:e,column:t,columnIndex:n,cellData:M,isScrolling:s,rowData:r,rowIndex:i},D=T(A),B=[f.e("row-cell"),t.class,t.align===Mo.CENTER&&f.is("align-center"),t.align===Mo.RIGHT&&f.is("align-right")],F=i>=0&&p&&t.key===p,x=i>=0&&c.includes(r[v]);let U;const X=`margin-inline-start: ${l*m}px;`;return F&&(It(a)?U=E(xP,ot(a,{class:[f.e("expand-icon"),f.is("expanded",x)],size:h,expanded:x,style:X,expandable:!0}),null):U=E("div",{style:[X,`width: ${h}px; height: ${h}px;`].join(" ")},null)),E("div",ot({class:B,style:y},L,{role:"cell"}),[U,D])};Zs.inheritAttrs=!1;function XP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const ZP=({columns:e,columnsStyles:t,headerIndex:n,style:l,headerClass:a,headerProps:s,ns:r},{slots:i})=>{const u={columns:e,headerIndex:n},c=[r.e("header-row"),$l(a,u,""),{[r.is("customized")]:!!i.header}],f={...$l(s,u),columnsStyles:t,class:c,columns:e,headerIndex:n,style:l};return E(LP,f,XP(i)?i:{default:()=>[i]})},Su=(e,{slots:t})=>{const{column:n,ns:l,style:a,onColumnSorted:s}=e,r=ol(a);if(n.placeholderSign===Lo)return E("div",{class:l.em("header-row-cell","placeholder"),style:r},null);const{headerCellRenderer:i,headerClass:u,sortable:c}=n,f={...e,class:l.e("header-cell-text")},p=(Uf(i)||t.default||(C=>E(ni,C,null)))(f),{sortBy:m,sortState:h,headerCellProps:v}=e;let g,y;if(h){const C=h[n.key];g=!!Xs[C],y=g?C:Po.ASC}else g=n.key===m.key,y=g?m.order:Po.ASC;const k=[l.e("header-cell"),$l(u,e,""),n.align===Mo.CENTER&&l.is("align-center"),n.align===Mo.RIGHT&&l.is("align-right"),c&&l.is("sortable")],b={...$l(v,e),onClick:n.sortable?s:void 0,class:k,style:r,"data-key":n.key};return E("div",ot(b,{role:"columnheader"}),[p,c&&E(BP,{class:[l.e("sort-icon"),g&&l.is("sorting")],sortOrder:y},null)])},Yf=(e,{slots:t})=>{var n;return E("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};Yf.displayName="ElTableV2Footer";const Xf=(e,{slots:t})=>E("div",{class:e.class,style:e.style},[t.default?t.default():E(nf,null,null)]);Xf.displayName="ElTableV2Empty";const Zf=(e,{slots:t})=>{var n;return E("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};Zf.displayName="ElTableV2Overlay";function fo(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const JP="ElTableV2",QP=j({name:JP,props:PP,setup(e,{slots:t,expose:n}){const l=ce("table-v2"),{columnsStyles:a,fixedColumnsOnLeft:s,fixedColumnsOnRight:r,mainColumns:i,mainTableHeight:u,fixedTableHeight:c,leftTableWidth:f,rightTableWidth:d,data:p,depthMap:m,expandedRowKeys:h,hasFixedColumns:v,hoveringRowKey:g,mainTableRef:y,leftTableRef:k,rightTableRef:b,isDynamic:C,isResetting:I,isScrolling:T,bodyWidth:M,emptyStyle:L,rootStyle:A,headerWidth:D,footerHeight:B,showEmpty:F,scrollTo:x,scrollToLeft:U,scrollToTop:X,scrollToRow:K,getRowHeight:V,onColumnSorted:W,onRowHeightChange:P,onRowHovered:H,onRowExpanded:Y,onRowsRendered:z,onScroll:q,onVerticalScroll:se}=IP(e);return n({scrollTo:x,scrollToLeft:U,scrollToTop:X,scrollToRow:K}),dt(Jr,{ns:l,isResetting:I,hoveringRowKey:g,isScrolling:T}),()=>{const{cache:pe,cellProps:oe,estimatedRowHeight:re,expandColumnKey:Q,fixedData:ve,headerHeight:_e,headerClass:Te,headerProps:Ie,headerCellProps:Ke,sortBy:Ge,sortState:qe,rowHeight:it,rowClass:ke,rowEventHandlers:Ee,rowKey:Be,rowProps:Ve,scrollbarAlwaysOn:Ye,indentSize:Xe,iconSize:nt,useIsScrolling:Se,vScrollbarSize:Ue,width:gt}=e,Et=o(p),$t={cache:pe,class:l.e("main"),columns:o(i),data:Et,fixedData:ve,estimatedRowHeight:re,bodyWidth:o(M),headerHeight:_e,headerWidth:o(D),height:o(u),mainTableRef:y,rowKey:Be,rowHeight:it,scrollbarAlwaysOn:Ye,scrollbarStartGap:2,scrollbarEndGap:Ue,useIsScrolling:Se,width:gt,getRowHeight:V,onRowsRendered:z,onScroll:q},be=o(f),me=o(c),ne={cache:pe,class:l.e("left"),columns:o(s),data:Et,estimatedRowHeight:re,leftTableRef:k,rowHeight:it,bodyWidth:be,headerWidth:be,headerHeight:_e,height:me,rowKey:Be,scrollbarAlwaysOn:Ye,scrollbarStartGap:2,scrollbarEndGap:Ue,useIsScrolling:Se,width:be,getRowHeight:V,onScroll:se},de=o(d)+Ue,$e={cache:pe,class:l.e("right"),columns:o(r),data:Et,estimatedRowHeight:re,rightTableRef:b,rowHeight:it,bodyWidth:de,headerWidth:de,headerHeight:_e,height:me,rowKey:Be,scrollbarAlwaysOn:Ye,scrollbarStartGap:2,scrollbarEndGap:Ue,width:de,style:`--${o(l.namespace)}-table-scrollbar-size: ${Ue}px`,useIsScrolling:Se,getRowHeight:V,onScroll:se},J=o(a),Oe={ns:l,depthMap:o(m),columnsStyles:J,expandColumnKey:Q,expandedRowKeys:o(h),estimatedRowHeight:re,hasFixedColumns:o(v),hoveringRowKey:o(g),rowProps:Ve,rowClass:ke,rowKey:Be,rowEventHandlers:Ee,onRowHovered:H,onRowExpanded:Y,onRowHeightChange:P},le={cellProps:oe,expandColumnKey:Q,indentSize:Xe,iconSize:nt,rowKey:Be,expandedRowKeys:o(h),ns:l},Ce={ns:l,headerClass:Te,headerProps:Ie,columnsStyles:J},je={ns:l,sortBy:Ge,sortState:qe,headerCellProps:Ke,onColumnSorted:W},st={row:Xt=>E(YP,ot(Xt,Oe),{row:t.row,cell:_t=>{let fe;return t.cell?E(Zs,ot(_t,le,{style:J[_t.column.key]}),fo(fe=t.cell(_t))?fe:{default:()=>[fe]}):E(Zs,ot(_t,le,{style:J[_t.column.key]}),null)}}),header:Xt=>E(ZP,ot(Xt,Ce),{header:t.header,cell:_t=>{let fe;return t["header-cell"]?E(Su,ot(_t,je,{style:J[_t.column.key]}),fo(fe=t["header-cell"](_t))?fe:{default:()=>[fe]}):E(Su,ot(_t,je,{style:J[_t.column.key]}),null)}})},vt=[e.class,l.b(),l.e("root"),{[l.is("dynamic")]:o(C)}],Tt={class:l.e("footer"),style:o(B)};return E("div",{class:vt,style:o(A)},[E(KP,$t,fo(st)?st:{default:()=>[st]}),E(UP,ne,fo(st)?st:{default:()=>[st]}),E(qP,$e,fo(st)?st:{default:()=>[st]}),t.footer&&E(Yf,Tt,{default:t.footer}),o(F)&&E(Xf,{class:l.e("empty"),style:o(L)},{default:t.empty}),t.overlay&&E(Zf,{class:l.e("overlay")},{default:t.overlay})])}}}),e2=ge({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:te(Function)}}),t2=j({name:"ElAutoResizer",props:e2,setup(e,{slots:t}){const n=ce("auto-resizer"),{height:l,width:a,sizer:s}=TP(e),r={width:"100%",height:"100%"};return()=>{var i;return E("div",{ref:s,class:n.b(),style:r},[(i=t.default)==null?void 0:i.call(t,{height:l.value,width:a.value})])}}}),n2=Qe(QP),l2=Qe(t2),ls=Symbol("tabsRootContextKey"),o2=ge({tabs:{type:te(Array),default:()=>Ot([])}}),Jf="ElTabBar",a2=j({name:Jf}),s2=j({...a2,props:o2,setup(e,{expose:t}){const n=e,l=at(),a=Me(ls);a||jt(Jf,"<el-tabs><el-tab-bar /></el-tabs>");const s=ce("tabs"),r=_(),i=_(),u=()=>{let f=0,d=0;const p=["top","bottom"].includes(a.props.tabPosition)?"width":"height",m=p==="width"?"x":"y",h=m==="x"?"left":"top";return n.tabs.every(v=>{var g,y;const k=(y=(g=l.parent)==null?void 0:g.refs)==null?void 0:y[`tab-${v.uid}`];if(!k)return!1;if(!v.active)return!0;f=k[`offset${An(h)}`],d=k[`client${An(p)}`];const b=window.getComputedStyle(k);return p==="width"&&(n.tabs.length>1&&(d-=Number.parseFloat(b.paddingLeft)+Number.parseFloat(b.paddingRight)),f+=Number.parseFloat(b.paddingLeft)),!1}),{[p]:`${d}px`,transform:`translate${An(m)}(${f}px)`}},c=()=>i.value=u();return ue(()=>n.tabs,async()=>{await Le(),c()},{immediate:!0}),un(r,()=>c()),t({ref:r,update:c}),(f,d)=>(w(),O("div",{ref_key:"barRef",ref:r,class:$([o(s).e("active-bar"),o(s).is(o(a).props.tabPosition)]),style:Re(i.value)},null,6))}});var r2=he(s2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]);const i2=ge({panes:{type:te(Array),default:()=>Ot([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),u2={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},_u="ElTabNav",c2=j({name:_u,props:i2,emits:u2,setup(e,{expose:t,emit:n}){const l=at(),a=Me(ls);a||jt(_u,"<el-tabs><tab-nav /></el-tabs>");const s=ce("tabs"),r=Iv(),i=Nv(),u=_(),c=_(),f=_(),d=_(),p=_(!1),m=_(0),h=_(!1),v=_(!0),g=S(()=>["top","bottom"].includes(a.props.tabPosition)?"width":"height"),y=S(()=>({transform:`translate${g.value==="width"?"X":"Y"}(-${m.value}px)`})),k=()=>{if(!u.value)return;const A=u.value[`offset${An(g.value)}`],D=m.value;if(!D)return;const B=D>A?D-A:0;m.value=B},b=()=>{if(!u.value||!c.value)return;const A=c.value[`offset${An(g.value)}`],D=u.value[`offset${An(g.value)}`],B=m.value;if(A-B<=D)return;const F=A-B>D*2?B+D:A-D;m.value=F},C=async()=>{const A=c.value;if(!p.value||!f.value||!u.value||!A)return;await Le();const D=f.value.querySelector(".is-active");if(!D)return;const B=u.value,F=["top","bottom"].includes(a.props.tabPosition),x=D.getBoundingClientRect(),U=B.getBoundingClientRect(),X=F?A.offsetWidth-U.width:A.offsetHeight-U.height,K=m.value;let V=K;F?(x.left<U.left&&(V=K-(U.left-x.left)),x.right>U.right&&(V=K+x.right-U.right)):(x.top<U.top&&(V=K-(U.top-x.top)),x.bottom>U.bottom&&(V=K+(x.bottom-U.bottom))),V=Math.max(V,0),m.value=Math.min(V,X)},I=()=>{var A;if(!c.value||!u.value)return;e.stretch&&((A=d.value)==null||A.update());const D=c.value[`offset${An(g.value)}`],B=u.value[`offset${An(g.value)}`],F=m.value;B<D?(p.value=p.value||{},p.value.prev=F,p.value.next=F+B<D,D-F<B&&(m.value=D-B)):(p.value=!1,F>0&&(m.value=0))},T=A=>{const D=A.code,{up:B,down:F,left:x,right:U}=Ae;if(![B,F,x,U].includes(D))return;const X=Array.from(A.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),K=X.indexOf(A.target);let V;D===x||D===B?K===0?V=X.length-1:V=K-1:K<X.length-1?V=K+1:V=0,X[V].focus({preventScroll:!0}),X[V].click(),M()},M=()=>{v.value&&(h.value=!0)},L=()=>h.value=!1;return ue(r,A=>{A==="hidden"?v.value=!1:A==="visible"&&setTimeout(()=>v.value=!0,50)}),ue(i,A=>{A?setTimeout(()=>v.value=!0,50):v.value=!1}),un(f,I),ze(()=>setTimeout(()=>C(),0)),Nl(()=>I()),t({scrollToActiveTab:C,removeFocus:L}),ue(()=>e.panes,()=>l.update(),{flush:"post",deep:!0}),()=>{const A=p.value?[E("span",{class:[s.e("nav-prev"),s.is("disabled",!p.value.prev)],onClick:k},[E(Pe,null,{default:()=>[E(sl,null,null)]})]),E("span",{class:[s.e("nav-next"),s.is("disabled",!p.value.next)],onClick:b},[E(Pe,null,{default:()=>[E(sn,null,null)]})])]:null,D=e.panes.map((B,F)=>{var x,U,X,K;const V=B.uid,W=B.props.disabled,P=(U=(x=B.props.name)!=null?x:B.index)!=null?U:`${F}`,H=!W&&(B.isClosable||e.editable);B.index=`${F}`;const Y=H?E(Pe,{class:"is-icon-close",onClick:se=>n("tabRemove",B,se)},{default:()=>[E(Sn,null,null)]}):null,z=((K=(X=B.slots).label)==null?void 0:K.call(X))||B.props.label,q=!W&&B.active?0:-1;return E("div",{ref:`tab-${V}`,class:[s.e("item"),s.is(a.props.tabPosition),s.is("active",B.active),s.is("disabled",W),s.is("closable",H),s.is("focus",h.value)],id:`tab-${P}`,key:`tab-${V}`,"aria-controls":`pane-${P}`,role:"tab","aria-selected":B.active,tabindex:q,onFocus:()=>M(),onBlur:()=>L(),onClick:se=>{L(),n("tabClick",B,P,se)},onKeydown:se=>{H&&(se.code===Ae.delete||se.code===Ae.backspace)&&n("tabRemove",B,se)}},[z,Y])});return E("div",{ref:f,class:[s.e("nav-wrap"),s.is("scrollable",!!p.value),s.is(a.props.tabPosition)]},[A,E("div",{class:s.e("nav-scroll"),ref:u},[E("div",{class:[s.e("nav"),s.is(a.props.tabPosition),s.is("stretch",e.stretch&&["top","bottom"].includes(a.props.tabPosition))],ref:c,style:y.value,role:"tablist",onKeydown:T},[e.type?null:E(r2,{ref:d,tabs:[...e.panes]},null),D])])])}}}),d2=ge({type:{type:String,values:["card","border-card",""],default:""},activeName:{type:[String,Number]},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:te(Function),default:()=>!0},stretch:Boolean}),ks=e=>ct(e)||He(e),f2={[tt]:e=>ks(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>ks(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>ks(e),tabAdd:()=>!0};var p2=j({name:"ElTabs",props:d2,emits:f2,setup(e,{emit:t,slots:n,expose:l}){var a,s;const r=ce("tabs"),{children:i,addChild:u,removeChild:c}=$r(at(),"ElTabPane"),f=_(),d=_((s=(a=e.modelValue)!=null?a:e.activeName)!=null?s:"0"),p=y=>{d.value=y,t(tt,y),t("tabChange",y)},m=async y=>{var k,b,C;if(!(d.value===y||Yt(y)))try{await((k=e.beforeLeave)==null?void 0:k.call(e,y,d.value))!==!1&&(p(y),(C=(b=f.value)==null?void 0:b.removeFocus)==null||C.call(b))}catch{}},h=(y,k,b)=>{y.props.disabled||(m(k),t("tabClick",y,b))},v=(y,k)=>{y.props.disabled||Yt(y.props.name)||(k.stopPropagation(),t("edit",y.props.name,"remove"),t("tabRemove",y.props.name))},g=()=>{t("edit",void 0,"add"),t("tabAdd")};return Fn({from:'"activeName"',replacement:'"model-value" or "v-model"',scope:"ElTabs",version:"2.3.0",ref:"https://element-plus.org/en-US/component/tabs.html#attributes",type:"Attribute"},S(()=>!!e.activeName)),ue(()=>e.activeName,y=>m(y)),ue(()=>e.modelValue,y=>m(y)),ue(d,async()=>{var y;await Le(),(y=f.value)==null||y.scrollToActiveTab()}),dt(ls,{props:e,currentName:d,registerPane:u,unregisterPane:c}),l({currentName:d}),()=>{const y=e.editable||e.addable?E("span",{class:r.e("new-tab"),tabindex:"0",onClick:g,onKeydown:C=>{C.code===Ae.enter&&g()}},[E(Pe,{class:r.is("icon-plus")},{default:()=>[E(za,null,null)]})]):null,k=E("div",{class:[r.e("header"),r.is(e.tabPosition)]},[y,E(c2,{ref:f,currentName:d.value,editable:e.editable,type:e.type,panes:i.value,stretch:e.stretch,onTabClick:h,onTabRemove:v},null)]),b=E("div",{class:r.e("content")},[ie(n,"default")]);return E("div",{class:[r.b(),r.m(e.tabPosition),{[r.m("card")]:e.type==="card",[r.m("border-card")]:e.type==="border-card"}]},[...e.tabPosition!=="bottom"?[k,b]:[b,k]])}}});const v2=ge({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),m2=["id","aria-hidden","aria-labelledby"],Qf="ElTabPane",h2=j({name:Qf}),g2=j({...h2,props:v2,setup(e){const t=e,n=at(),l=Qt(),a=Me(ls);a||jt(Qf,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const s=ce("tab-pane"),r=_(),i=S(()=>t.closable||a.props.closable),u=mi(()=>{var m;return a.currentName.value===((m=t.name)!=null?m:r.value)}),c=_(u.value),f=S(()=>{var m;return(m=t.name)!=null?m:r.value}),d=mi(()=>!t.lazy||c.value||u.value);ue(u,m=>{m&&(c.value=!0)});const p=St({uid:n.uid,slots:l,props:t,paneName:f,active:u,index:r,isClosable:i});return ze(()=>{a.registerPane(p)}),Il(()=>{a.unregisterPane(p.uid)}),(m,h)=>o(d)?xe((w(),O("div",{key:0,id:`pane-${o(f)}`,class:$(o(s).b()),role:"tabpanel","aria-hidden":!o(u),"aria-labelledby":`tab-${o(f)}`},[ie(m.$slots,"default")],10,m2)),[[lt,o(u)]]):Z("v-if",!0)}});var ep=he(g2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]);const y2=Qe(p2,{TabPane:ep}),b2=xt(ep),w2=ge({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:Hn,default:""},truncated:{type:Boolean},tag:{type:String,default:"span"}}),k2=j({name:"ElText"}),C2=j({...k2,props:w2,setup(e){const t=e,n=qt(),l=ce("text"),a=S(()=>[l.b(),l.m(t.type),l.m(n.value),l.is("truncated",t.truncated)]);return(s,r)=>(w(),G(rt(s.tag),{class:$(o(a))},{default:N(()=>[ie(s.$slots,"default")]),_:3},8,["class"]))}});var S2=he(C2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/text/src/text.vue"]]);const _2=Qe(S2),E2=ge({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:String,default:"light"},clearable:{type:Boolean,default:!0},size:ln,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:te([String,Object]),default:()=>Xu},clearIcon:{type:te([String,Object]),default:()=>Zn}}),jn=e=>{const t=(e||"").split(":");if(t.length>=2){let n=Number.parseInt(t[0],10);const l=Number.parseInt(t[1],10),a=e.toUpperCase();return a.includes("AM")&&n===12?n=0:a.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:l}}return null},Cs=(e,t)=>{const n=jn(e);if(!n)return-1;const l=jn(t);if(!l)return-1;const a=n.minutes+n.hours*60,s=l.minutes+l.hours*60;return a===s?0:a>s?1:-1},Eu=e=>`${e}`.padStart(2,"0"),Dl=e=>`${Eu(e.hours)}:${Eu(e.minutes)}`,$2=(e,t)=>{const n=jn(e);if(!n)return"";const l=jn(t);if(!l)return"";const a={hours:n.hours,minutes:n.minutes};return a.minutes+=l.minutes,a.hours+=l.hours,a.hours+=Math.floor(a.minutes/60),a.minutes=a.minutes%60,Dl(a)},T2=j({name:"ElTimeSelect"}),I2=j({...T2,props:E2,emits:["change","blur","focus","update:modelValue"],setup(e,{expose:t}){const n=e;Je.extend(gr);const{Option:l}=El,a=ce("input"),s=_(),r=gn(),i=S(()=>n.modelValue),u=S(()=>{const g=jn(n.start);return g?Dl(g):null}),c=S(()=>{const g=jn(n.end);return g?Dl(g):null}),f=S(()=>{const g=jn(n.step);return g?Dl(g):null}),d=S(()=>{const g=jn(n.minTime||"");return g?Dl(g):null}),p=S(()=>{const g=jn(n.maxTime||"");return g?Dl(g):null}),m=S(()=>{const g=[];if(n.start&&n.end&&n.step){let y=u.value,k;for(;y&&c.value&&Cs(y,c.value)<=0;)k=Je(y,"HH:mm").format(n.format),g.push({value:k,disabled:Cs(y,d.value||"-1:-1")<=0||Cs(y,p.value||"100:100")>=0}),y=$2(y,f.value)}return g});return t({blur:()=>{var g,y;(y=(g=s.value)==null?void 0:g.blur)==null||y.call(g)},focus:()=>{var g,y;(y=(g=s.value)==null?void 0:g.focus)==null||y.call(g)}}),(g,y)=>(w(),G(o(El),{ref_key:"select",ref:s,"model-value":o(i),disabled:o(r),clearable:g.clearable,"clear-icon":g.clearIcon,size:g.size,effect:g.effect,placeholder:g.placeholder,"default-first-option":"",filterable:g.editable,"onUpdate:modelValue":y[0]||(y[0]=k=>g.$emit("update:modelValue",k)),onChange:y[1]||(y[1]=k=>g.$emit("change",k)),onBlur:y[2]||(y[2]=k=>g.$emit("blur",k)),onFocus:y[3]||(y[3]=k=>g.$emit("focus",k))},{prefix:N(()=>[g.prefixIcon?(w(),G(o(Pe),{key:0,class:$(o(a).e("prefix-icon"))},{default:N(()=>[(w(),G(rt(g.prefixIcon)))]),_:1},8,["class"])):Z("v-if",!0)]),default:N(()=>[(w(!0),O(Ne,null,Ze(o(m),k=>(w(),G(o(l),{key:k.value,label:k.value,value:k.value,disabled:k.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable"]))}});var va=he(I2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]);va.install=e=>{e.component(va.name,va)};const N2=va,P2=N2,M2=j({name:"ElTimeline",setup(e,{slots:t}){const n=ce("timeline");return dt("timeline",t),()=>De("ul",{class:[n.b()]},[ie(t,"default")])}}),L2=ge({timestamp:{type:String,default:""},hideTimestamp:{type:Boolean,default:!1},center:{type:Boolean,default:!1},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:Pt},hollow:{type:Boolean,default:!1}}),R2=j({name:"ElTimelineItem"}),O2=j({...R2,props:L2,setup(e){const t=e,n=ce("timeline-item"),l=S(()=>[n.e("node"),n.em("node",t.size||""),n.em("node",t.type||""),n.is("hollow",t.hollow)]);return(a,s)=>(w(),O("li",{class:$([o(n).b(),{[o(n).e("center")]:a.center}])},[R("div",{class:$(o(n).e("tail"))},null,2),a.$slots.dot?Z("v-if",!0):(w(),O("div",{key:0,class:$(o(l)),style:Re({backgroundColor:a.color})},[a.icon?(w(),G(o(Pe),{key:0,class:$(o(n).e("icon"))},{default:N(()=>[(w(),G(rt(a.icon)))]),_:1},8,["class"])):Z("v-if",!0)],6)),a.$slots.dot?(w(),O("div",{key:1,class:$(o(n).e("dot"))},[ie(a.$slots,"dot")],2)):Z("v-if",!0),R("div",{class:$(o(n).e("wrapper"))},[!a.hideTimestamp&&a.placement==="top"?(w(),O("div",{key:0,class:$([o(n).e("timestamp"),o(n).is("top")])},ae(a.timestamp),3)):Z("v-if",!0),R("div",{class:$(o(n).e("content"))},[ie(a.$slots,"default")],2),!a.hideTimestamp&&a.placement==="bottom"?(w(),O("div",{key:1,class:$([o(n).e("timestamp"),o(n).is("bottom")])},ae(a.timestamp),3)):Z("v-if",!0)],2)],2))}});var tp=he(O2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/timeline/src/timeline-item.vue"]]);const A2=Qe(M2,{TimelineItem:tp}),V2=xt(tp),np=ge({nowrap:Boolean});var lp=(e=>(e.top="top",e.bottom="bottom",e.left="left",e.right="right",e))(lp||{});const D2=Object.values(lp),oi=ge({width:{type:Number,default:10},height:{type:Number,default:10},style:{type:te(Object),default:null}}),B2=ge({side:{type:te(String),values:D2,required:!0}}),x2=["absolute","fixed"],F2=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],ai=ge({ariaLabel:String,arrowPadding:{type:te(Number),default:5},effect:{type:String,default:""},contentClass:String,placement:{type:te(String),values:F2,default:"bottom"},reference:{type:te(Object),default:null},offset:{type:Number,default:8},strategy:{type:te(String),values:x2,default:"absolute"},showArrow:{type:Boolean,default:!1}}),si=ge({delayDuration:{type:Number,default:300},defaultOpen:Boolean,open:{type:Boolean,default:void 0},onOpenChange:{type:te(Function)},"onUpdate:open":{type:te(Function)}}),Ol={type:te(Function)},ri=ge({onBlur:Ol,onClick:Ol,onFocus:Ol,onMouseDown:Ol,onMouseEnter:Ol,onMouseLeave:Ol}),z2=ge({...si,...oi,...ri,...ai,alwaysOn:Boolean,fullTransition:Boolean,transitionProps:{type:te(Object),default:null},teleported:Boolean,to:{type:te(String),default:"body"}}),os=Symbol("tooltipV2"),op=Symbol("tooltipV2Content"),Ss="tooltip_v2.open",H2=j({name:"ElTooltipV2Root"}),K2=j({...H2,props:si,setup(e,{expose:t}){const n=e,l=_(n.defaultOpen),a=_(null),s=S({get:()=>gm(n.open)?l.value:n.open,set:g=>{var y;l.value=g,(y=n["onUpdate:open"])==null||y.call(n,g)}}),r=S(()=>He(n.delayDuration)&&n.delayDuration>0),{start:i,stop:u}=_l(()=>{s.value=!0},S(()=>n.delayDuration),{immediate:!1}),c=ce("tooltip-v2"),f=En(),d=()=>{u(),s.value=!0},p=()=>{o(r)?i():d()},m=d,h=()=>{u(),s.value=!1};return ue(s,g=>{var y;g&&(document.dispatchEvent(new CustomEvent(Ss)),m()),(y=n.onOpenChange)==null||y.call(n,g)}),ze(()=>{document.addEventListener(Ss,h)}),Rt(()=>{u(),document.removeEventListener(Ss,h)}),dt(os,{contentId:f,triggerRef:a,ns:c,onClose:h,onDelayOpen:p,onOpen:m}),t({onOpen:m,onClose:h}),(g,y)=>ie(g.$slots,"default",{open:o(s)})}});var W2=he(K2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/root.vue"]]);const U2=j({name:"ElTooltipV2Arrow"}),j2=j({...U2,props:{...oi,...B2},setup(e){const t=e,{ns:n}=Me(os),{arrowRef:l}=Me(op),a=S(()=>{const{style:s,width:r,height:i}=t,u=n.namespace.value;return{[`--${u}-tooltip-v2-arrow-width`]:`${r}px`,[`--${u}-tooltip-v2-arrow-height`]:`${i}px`,[`--${u}-tooltip-v2-arrow-border-width`]:`${r/2}px`,[`--${u}-tooltip-v2-arrow-cover-width`]:r/2-1,...s||{}}});return(s,r)=>(w(),O("span",{ref_key:"arrowRef",ref:l,style:Re(o(a)),class:$(o(n).e("arrow"))},null,6))}});var $u=he(j2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/arrow.vue"]]);const q2=ge({style:{type:te([String,Object,Array]),default:()=>({})}}),G2=j({name:"ElVisuallyHidden"}),Y2=j({...G2,props:q2,setup(e){const t=e,n=S(()=>[t.style,{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}]);return(l,a)=>(w(),O("span",ot(l.$attrs,{style:o(n)}),[ie(l.$slots,"default")],16))}});var X2=he(Y2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/visual-hidden/src/visual-hidden.vue"]]);const Z2=["data-side"],J2=j({name:"ElTooltipV2Content"}),Q2=j({...J2,props:{...ai,...np},setup(e){const t=e,{triggerRef:n,contentId:l}=Me(os),a=_(t.placement),s=_(t.strategy),r=_(null),{referenceRef:i,contentRef:u,middlewareData:c,x:f,y:d,update:p}=Jm({placement:a,strategy:s,middleware:S(()=>{const b=[Pv(t.offset)];return t.showArrow&&b.push(Qm({arrowRef:r})),b})}),m=ao().nextZIndex(),h=ce("tooltip-v2"),v=S(()=>a.value.split("-")[0]),g=S(()=>({position:o(s),top:`${o(d)||0}px`,left:`${o(f)||0}px`,zIndex:m})),y=S(()=>{if(!t.showArrow)return{};const{arrow:b}=o(c);return{[`--${h.namespace.value}-tooltip-v2-arrow-x`]:`${b==null?void 0:b.x}px`||"",[`--${h.namespace.value}-tooltip-v2-arrow-y`]:`${b==null?void 0:b.y}px`||""}}),k=S(()=>[h.e("content"),h.is("dark",t.effect==="dark"),h.is(o(s)),t.contentClass]);return ue(r,()=>p()),ue(()=>t.placement,b=>a.value=b),ze(()=>{ue(()=>t.reference||n.value,b=>{i.value=b||void 0},{immediate:!0})}),dt(op,{arrowRef:r}),(b,C)=>(w(),O("div",{ref_key:"contentRef",ref:u,style:Re(o(g)),"data-tooltip-v2-root":""},[b.nowrap?Z("v-if",!0):(w(),O("div",{key:0,"data-side":o(v),class:$(o(k))},[ie(b.$slots,"default",{contentStyle:o(g),contentClass:o(k)}),E(o(X2),{id:o(l),role:"tooltip"},{default:N(()=>[b.ariaLabel?(w(),O(Ne,{key:0},[ye(ae(b.ariaLabel),1)],64)):ie(b.$slots,"default",{key:1})]),_:3},8,["id"]),ie(b.$slots,"arrow",{style:Re(o(y)),side:o(v)})],10,Z2))],4))}});var Tu=he(Q2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/content.vue"]]);const eM=ge({setRef:{type:te(Function),required:!0},onlyChild:Boolean});var tM=j({props:eM,setup(e,{slots:t}){const n=_(),l=Wa(n,a=>{a?e.setRef(a.nextElementSibling):e.setRef(null)});return()=>{var a;const[s]=((a=t.default)==null?void 0:a.call(t))||[],r=e.onlyChild?Pm(s.children):s.children;return E(Ne,{ref:l},[r])}}});const nM=j({name:"ElTooltipV2Trigger"}),lM=j({...nM,props:{...np,...ri},setup(e){const t=e,{onClose:n,onOpen:l,onDelayOpen:a,triggerRef:s,contentId:r}=Me(os);let i=!1;const u=k=>{s.value=k},c=()=>{i=!1},f=Bt(t.onMouseEnter,a),d=Bt(t.onMouseLeave,n),p=Bt(t.onMouseDown,()=>{n(),i=!0,document.addEventListener("mouseup",c,{once:!0})}),m=Bt(t.onFocus,()=>{i||l()}),h=Bt(t.onBlur,n),v=Bt(t.onClick,k=>{k.detail===0&&n()}),g={blur:h,click:v,focus:m,mousedown:p,mouseenter:f,mouseleave:d},y=(k,b,C)=>{k&&Object.entries(b).forEach(([I,T])=>{k[C](I,T)})};return ue(s,(k,b)=>{y(k,g,"addEventListener"),y(b,g,"removeEventListener"),k&&k.setAttribute("aria-describedby",r.value)}),Rt(()=>{y(s.value,g,"removeEventListener"),document.removeEventListener("mouseup",c)}),(k,b)=>k.nowrap?(w(),G(o(tM),{key:0,"set-ref":u,"only-child":""},{default:N(()=>[ie(k.$slots,"default")]),_:3})):(w(),O("button",ot({key:1,ref_key:"triggerRef",ref:s},k.$attrs),[ie(k.$slots,"default")],16))}});var oM=he(lM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/trigger.vue"]]);const aM=j({name:"ElTooltipV2"}),sM=j({...aM,props:z2,setup(e){const n=Gt(e),l=St(qn(n,Object.keys(oi))),a=St(qn(n,Object.keys(ai))),s=St(qn(n,Object.keys(si))),r=St(qn(n,Object.keys(ri)));return(i,u)=>(w(),G(W2,Nn(dr(s)),{default:N(({open:c})=>[E(oM,ot(r,{nowrap:""}),{default:N(()=>[ie(i.$slots,"trigger")]),_:3},16),(w(),G(Oo,{to:i.to,disabled:!i.teleported},[i.fullTransition?(w(),G(Wt,Nn(ot({key:0},i.transitionProps)),{default:N(()=>[i.alwaysOn||c?(w(),G(Tu,Nn(ot({key:0},a)),{arrow:N(({style:f,side:d})=>[i.showArrow?(w(),G($u,ot({key:0},l,{style:f,side:d}),null,16,["style","side"])):Z("v-if",!0)]),default:N(()=>[ie(i.$slots,"default")]),_:3},16)):Z("v-if",!0)]),_:2},1040)):(w(),O(Ne,{key:1},[i.alwaysOn||c?(w(),G(Tu,Nn(ot({key:0},a)),{arrow:N(({style:f,side:d})=>[i.showArrow?(w(),G($u,ot({key:0},l,{style:f,side:d}),null,16,["style","side"])):Z("v-if",!0)]),default:N(()=>[ie(i.$slots,"default")]),_:3},16)):Z("v-if",!0)],64))],8,["to","disabled"]))]),_:3},16))}});var rM=he(sM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/tooltip.vue"]]);const iM=Qe(rM),ap="left-check-change",sp="right-check-change",Bl=ge({data:{type:te(Array),default:()=>[]},titles:{type:te(Array),default:()=>[]},buttonTexts:{type:te(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:te(Function)},leftDefaultChecked:{type:te(Array),default:()=>[]},rightDefaultChecked:{type:te(Array),default:()=>[]},renderContent:{type:te(Function)},modelValue:{type:te(Array),default:()=>[]},format:{type:te(Object),default:()=>({})},filterable:Boolean,props:{type:te(Object),default:()=>Ot({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),Js=(e,t)=>[e,t].every(et)||et(e)&&Ht(t),uM={[Mt]:(e,t,n)=>[e,n].every(et)&&["left","right"].includes(t),[tt]:e=>et(e),[ap]:Js,[sp]:Js},Qs="checked-change",cM=ge({data:Bl.data,optionRender:{type:te(Function)},placeholder:String,title:String,filterable:Boolean,format:Bl.format,filterMethod:Bl.filterMethod,defaultChecked:Bl.leftDefaultChecked,props:Bl.props}),dM={[Qs]:Js},Fo=e=>{const t={label:"label",key:"key",disabled:"disabled"};return S(()=>({...t,...e.props}))},fM=(e,t,n)=>{const l=Fo(e),a=S(()=>e.data.filter(f=>kt(e.filterMethod)?e.filterMethod(t.query,f):String(f[l.value.label]||f[l.value.key]).toLowerCase().includes(t.query.toLowerCase()))),s=S(()=>a.value.filter(f=>!f[l.value.disabled])),r=S(()=>{const f=t.checked.length,d=e.data.length,{noChecked:p,hasChecked:m}=e.format;return p&&m?f>0?m.replace(/\${checked}/g,f.toString()).replace(/\${total}/g,d.toString()):p.replace(/\${total}/g,d.toString()):`${f}/${d}`}),i=S(()=>{const f=t.checked.length;return f>0&&f<s.value.length}),u=()=>{const f=s.value.map(d=>d[l.value.key]);t.allChecked=f.length>0&&f.every(d=>t.checked.includes(d))},c=f=>{t.checked=f?s.value.map(d=>d[l.value.key]):[]};return ue(()=>t.checked,(f,d)=>{if(u(),t.checkChangeByUser){const p=f.concat(d).filter(m=>!f.includes(m)||!d.includes(m));n(Qs,f,p)}else n(Qs,f),t.checkChangeByUser=!0}),ue(s,()=>{u()}),ue(()=>e.data,()=>{const f=[],d=a.value.map(p=>p[l.value.key]);t.checked.forEach(p=>{d.includes(p)&&f.push(p)}),t.checkChangeByUser=!1,t.checked=f}),ue(()=>e.defaultChecked,(f,d)=>{if(d&&f.length===d.length&&f.every(h=>d.includes(h)))return;const p=[],m=s.value.map(h=>h[l.value.key]);f.forEach(h=>{m.includes(h)&&p.push(h)}),t.checkChangeByUser=!1,t.checked=p},{immediate:!0}),{filteredData:a,checkableData:s,checkedSummary:r,isIndeterminate:i,updateAllChecked:u,handleAllCheckedChange:c}},pM=(e,t)=>({onSourceCheckedChange:(a,s)=>{e.leftChecked=a,s&&t(ap,a,s)},onTargetCheckedChange:(a,s)=>{e.rightChecked=a,s&&t(sp,a,s)}}),vM=e=>{const t=Fo(e),n=S(()=>e.data.reduce((s,r)=>(s[r[t.value.key]]=r)&&s,{})),l=S(()=>e.data.filter(s=>!e.modelValue.includes(s[t.value.key]))),a=S(()=>e.targetOrder==="original"?e.data.filter(s=>e.modelValue.includes(s[t.value.key])):e.modelValue.reduce((s,r)=>{const i=n.value[r];return i&&s.push(i),s},[]));return{sourceData:l,targetData:a}},mM=(e,t,n)=>{const l=Fo(e),a=(i,u,c)=>{n(tt,i),n(Mt,i,u,c)};return{addToLeft:()=>{const i=e.modelValue.slice();t.rightChecked.forEach(u=>{const c=i.indexOf(u);c>-1&&i.splice(c,1)}),a(i,"left",t.rightChecked)},addToRight:()=>{let i=e.modelValue.slice();const u=e.data.filter(c=>{const f=c[l.value.key];return t.leftChecked.includes(f)&&!e.modelValue.includes(f)}).map(c=>c[l.value.key]);i=e.targetOrder==="unshift"?u.concat(i):i.concat(u),e.targetOrder==="original"&&(i=e.data.filter(c=>i.includes(c[l.value.key])).map(c=>c[l.value.key])),a(i,"right",t.leftChecked)}}},hM=j({name:"ElTransferPanel"}),gM=j({...hM,props:cM,emits:dM,setup(e,{expose:t,emit:n}){const l=e,a=Qt(),s=({option:b})=>b,{t:r}=ht(),i=ce("transfer"),u=St({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),c=Fo(l),{filteredData:f,checkedSummary:d,isIndeterminate:p,handleAllCheckedChange:m}=fM(l,u,n),h=S(()=>!wn(u.query)&&wn(f.value)),v=S(()=>!wn(a.default()[0].children)),{checked:g,allChecked:y,query:k}=Gt(u);return t({query:k}),(b,C)=>(w(),O("div",{class:$(o(i).b("panel"))},[R("p",{class:$(o(i).be("panel","header"))},[E(o($n),{modelValue:o(y),"onUpdate:modelValue":C[0]||(C[0]=I=>bt(y)?y.value=I:null),indeterminate:o(p),"validate-event":!1,onChange:o(m)},{default:N(()=>[ye(ae(b.title)+" ",1),R("span",null,ae(o(d)),1)]),_:1},8,["modelValue","indeterminate","onChange"])],2),R("div",{class:$([o(i).be("panel","body"),o(i).is("with-footer",o(v))])},[b.filterable?(w(),G(o(on),{key:0,modelValue:o(k),"onUpdate:modelValue":C[1]||(C[1]=I=>bt(k)?k.value=I:null),class:$(o(i).be("panel","filter")),size:"default",placeholder:b.placeholder,"prefix-icon":o(yr),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):Z("v-if",!0),xe(E(o(yd),{modelValue:o(g),"onUpdate:modelValue":C[2]||(C[2]=I=>bt(g)?g.value=I:null),"validate-event":!1,class:$([o(i).is("filterable",b.filterable),o(i).be("panel","list")])},{default:N(()=>[(w(!0),O(Ne,null,Ze(o(f),I=>(w(),G(o($n),{key:I[o(c).key],class:$(o(i).be("panel","item")),label:I[o(c).key],disabled:I[o(c).disabled],"validate-event":!1},{default:N(()=>{var T;return[E(s,{option:(T=b.optionRender)==null?void 0:T.call(b,I)},null,8,["option"])]}),_:2},1032,["class","label","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[lt,!o(h)&&!o(wn)(b.data)]]),xe(R("p",{class:$(o(i).be("panel","empty"))},ae(o(h)?o(r)("el.transfer.noMatch"):o(r)("el.transfer.noData")),3),[[lt,o(h)||o(wn)(b.data)]])],2),o(v)?(w(),O("p",{key:0,class:$(o(i).be("panel","footer"))},[ie(b.$slots,"default")],2)):Z("v-if",!0)],2))}});var Iu=he(gM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer-panel.vue"]]);const yM={key:0},bM={key:0},wM=j({name:"ElTransfer"}),kM=j({...wM,props:Bl,emits:uM,setup(e,{expose:t,emit:n}){const l=e,a=Qt(),{t:s}=ht(),r=ce("transfer"),{formItem:i}=fn(),u=St({leftChecked:[],rightChecked:[]}),c=Fo(l),{sourceData:f,targetData:d}=vM(l),{onSourceCheckedChange:p,onTargetCheckedChange:m}=pM(u,n),{addToLeft:h,addToRight:v}=mM(l,u,n),g=_(),y=_(),k=L=>{switch(L){case"left":g.value.query="";break;case"right":y.value.query="";break}},b=S(()=>l.buttonTexts.length===2),C=S(()=>l.titles[0]||s("el.transfer.titles.0")),I=S(()=>l.titles[1]||s("el.transfer.titles.1")),T=S(()=>l.filterPlaceholder||s("el.transfer.filterPlaceholder"));ue(()=>l.modelValue,()=>{var L;l.validateEvent&&((L=i==null?void 0:i.validate)==null||L.call(i,"change").catch(A=>void 0))});const M=S(()=>L=>l.renderContent?l.renderContent(De,L):a.default?a.default({option:L}):De("span",L[c.value.label]||L[c.value.key]));return t({clearQuery:k,leftPanel:g,rightPanel:y}),(L,A)=>(w(),O("div",{class:$(o(r).b())},[E(Iu,{ref_key:"leftPanel",ref:g,data:o(f),"option-render":o(M),placeholder:o(T),title:o(C),filterable:L.filterable,format:L.format,"filter-method":L.filterMethod,"default-checked":L.leftDefaultChecked,props:l.props,onCheckedChange:o(p)},{default:N(()=>[ie(L.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),R("div",{class:$(o(r).e("buttons"))},[E(o(tn),{type:"primary",class:$([o(r).e("button"),o(r).is("with-texts",o(b))]),disabled:o(wn)(u.rightChecked),onClick:o(h)},{default:N(()=>[E(o(Pe),null,{default:N(()=>[E(o(sl))]),_:1}),o(Yt)(L.buttonTexts[0])?Z("v-if",!0):(w(),O("span",yM,ae(L.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),E(o(tn),{type:"primary",class:$([o(r).e("button"),o(r).is("with-texts",o(b))]),disabled:o(wn)(u.leftChecked),onClick:o(v)},{default:N(()=>[o(Yt)(L.buttonTexts[1])?Z("v-if",!0):(w(),O("span",bM,ae(L.buttonTexts[1]),1)),E(o(Pe),null,{default:N(()=>[E(o(sn))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),E(Iu,{ref_key:"rightPanel",ref:y,data:o(d),"option-render":o(M),placeholder:o(T),filterable:L.filterable,format:L.format,"filter-method":L.filterMethod,title:o(I),"default-checked":L.rightDefaultChecked,props:l.props,onCheckedChange:o(m)},{default:N(()=>[ie(L.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});var CM=he(kM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer.vue"]]);const SM=Qe(CM),jl="$treeNodeId",Nu=function(e,t){!t||t[jl]||Object.defineProperty(t,jl,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},ii=function(e,t){return e?t[e]:t[jl]},er=(e,t,n)=>{const l=e.value.currentNode;n();const a=e.value.currentNode;l!==a&&t("current-change",a?a.data:null,a)},tr=e=>{let t=!0,n=!0,l=!0;for(let a=0,s=e.length;a<s;a++){const r=e[a];(r.checked!==!0||r.indeterminate)&&(t=!1,r.disabled||(l=!1)),(r.checked!==!1||r.indeterminate)&&(n=!1)}return{all:t,none:n,allWithoutDisable:l,half:!t&&!n}},ma=function(e){if(e.childNodes.length===0||e.loading)return;const{all:t,none:n,half:l}=tr(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):l?(e.checked=!1,e.indeterminate=!0):n&&(e.checked=!1,e.indeterminate=!1);const a=e.parent;!a||a.level===0||e.store.checkStrictly||ma(a)},Jo=function(e,t){const n=e.store.props,l=e.data||{},a=n[t];if(typeof a=="function")return a(l,e);if(typeof a=="string")return l[a];if(typeof a>"u"){const s=l[t];return s===void 0?"":s}};let _M=0;class Cl{constructor(t){this.id=_M++,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)nn(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(){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=Jo(this,"isLeaf");typeof s=="boolean"&&(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.expand(),Array.isArray(this.data)||Nu(this,this.data),!this.data)return;const l=t.defaultExpandedKeys,a=t.key;a&&l&&l.includes(this.key)&&this.expand(null,t.autoExpandParent),a&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(t){Array.isArray(t)||Nu(this,t),this.data=t,this.childNodes=[];let n;this.level===0&&Array.isArray(this.data)?n=this.data:n=Jo(this,"children")||[];for(let l=0,a=n.length;l<a;l++)this.insertChild({data:n[l]})}get label(){return Jo(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return Jo(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-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(l=>l===t||n&&l.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,n,l){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof Cl)){if(!l){const a=this.getChildren(!0);a.includes(t.data)||(typeof n>"u"||n<0?a.push(t.data):a.splice(n,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=St(new Cl(t)),t instanceof Cl&&t.initialize()}t.level=this.level+1,typeof n>"u"||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}insertBefore(t,n){let l;n&&(l=this.childNodes.indexOf(n)),this.insertChild(t,l)}insertAfter(t,n){let l;n&&(l=this.childNodes.indexOf(n),l!==-1&&(l+=1)),this.insertChild(t,l)}removeChild(t){const n=this.getChildren()||[],l=n.indexOf(t.data);l>-1&&n.splice(l,1);const a=this.childNodes.indexOf(t);a>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(a,1)),this.updateLeafState()}removeChildByData(t){let n=null;for(let l=0;l<this.childNodes.length;l++)if(this.childNodes[l].data===t){n=this.childNodes[l];break}n&&this.removeChild(n)}expand(t,n){const l=()=>{if(n){let a=this.parent;for(;a.level>0;)a.expanded=!0,a=a.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(a=>{a.canFocus=!0})};this.shouldLoadData()?this.loadData(a=>{Array.isArray(a)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||ma(this),l())}):l()}doCreateChildren(t,n={}){t.forEach(l=>{this.insertChild(Object.assign({data:l},n),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!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;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0;return}this.isLeaf=!1}setChecked(t,n,l,a){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:r,allWithoutDisable:i}=tr(this.childNodes);!this.isLeaf&&!r&&i&&(this.checked=!1,t=!1);const u=()=>{if(n){const c=this.childNodes;for(let p=0,m=c.length;p<m;p++){const h=c[p];a=a||t!==!1;const v=h.disabled?h.checked:a;h.setChecked(v,n,!0,a)}const{half:f,all:d}=tr(c);d||(this.checked=d,this.indeterminate=f)}};if(this.shouldLoadData()){this.loadData(()=>{u(),ma(this)},{checked:t!==!1});return}else u()}const s=this.parent;!s||s.level===0||l||ma(s)}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const l=this.store.props;let a="children";return l&&(a=l.children||"children"),n[a]===void 0&&(n[a]=null),t&&!n[a]&&(n[a]=[]),n[a]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(s=>s.data),l={},a=[];t.forEach((s,r)=>{const i=s[jl];!!i&&n.findIndex(c=>c[jl]===i)>=0?l[i]={index:r,data:s}:a.push({index:r,data:s})}),this.store.lazy||n.forEach(s=>{l[s[jl]]||this.removeChildByData(s)}),a.forEach(({index:s,data:r})=>{this.insertChild({data:r},s)}),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 l=a=>{this.childNodes=[],this.doCreateChildren(a,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,a)};this.store.load(this,l)}else t&&t.call(this)}}class EM{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const n in t)nn(t,n)&&(this[n]=t[n]);this.nodesMap={}}initialize(){if(this.root=new Cl({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,n=>{this.root.doCreateChildren(n),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(t){const n=this.filterNodeMethod,l=this.lazy,a=function(s){const r=s.root?s.root.childNodes:s.childNodes;if(r.forEach(i=>{i.visible=n.call(i,t,i.data,i),a(i)}),!s.visible&&r.length){let i=!0;i=!r.some(u=>u.visible),s.root?s.root.visible=i===!1:s.visible=i===!1}t&&s.visible&&!s.isLeaf&&!l&&s.expand()};a(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof Cl)return t;const n=It(t)?ii(this.key,t):t;return this.nodesMap[n]||null}insertBefore(t,n){const l=this.getNode(n);l.parent.insertBefore({data:t},l)}insertAfter(t,n){const l=this.getNode(n);l.parent.insertAfter({data:t},l)}remove(t){const n=this.getNode(t);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(t,n){const l=n?this.getNode(n):this.root;l&&l.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],n=this.nodesMap;t.forEach(l=>{const a=n[l];a&&a.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const n=this.key;!t||!t.data||(n?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(l=>{this.deregisterNode(l)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,n=!1){const l=[],a=function(s){(s.root?s.root.childNodes:s.childNodes).forEach(i=>{(i.checked||n&&i.indeterminate)&&(!t||t&&i.isLeaf)&&l.push(i.data),a(i)})};return a(this),l}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const t=[],n=function(l){(l.root?l.root.childNodes:l.childNodes).forEach(s=>{s.indeterminate&&t.push(s.data),n(s)})};return n(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],n=this.nodesMap;for(const l in n)nn(n,l)&&t.push(n[l]);return t}updateChildren(t,n){const l=this.nodesMap[t];if(!l)return;const a=l.childNodes;for(let s=a.length-1;s>=0;s--){const r=a[s];this.remove(r.data)}for(let s=0,r=n.length;s<r;s++){const i=n[s];this.append(i,l.data)}}_setCheckedKeys(t,n=!1,l){const a=this._getAllNodes().sort((i,u)=>u.level-i.level),s=Object.create(null),r=Object.keys(l);a.forEach(i=>i.setChecked(!1,!1));for(let i=0,u=a.length;i<u;i++){const c=a[i],f=c.data[t].toString();if(!r.includes(f)){c.checked&&!s[f]&&c.setChecked(!1,!1);continue}let p=c.parent;for(;p&&p.level>0;)s[p.data[t]]=!0,p=p.parent;if(c.isLeaf||this.checkStrictly){c.setChecked(!0,!1);continue}if(c.setChecked(!0,!0),n){c.setChecked(!1,!1);const m=function(h){h.childNodes.forEach(g=>{g.isLeaf||g.setChecked(!1,!1),m(g)})};m(c)}}}setCheckedNodes(t,n=!1){const l=this.key,a={};t.forEach(s=>{a[(s||{})[l]]=!0}),this._setCheckedKeys(l,n,a)}setCheckedKeys(t,n=!1){this.defaultCheckedKeys=t;const l=this.key,a={};t.forEach(s=>{a[s]=!0}),this._setCheckedKeys(l,n,a)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(n=>{const l=this.getNode(n);l&&l.expand(null,this.autoExpandParent)})}setChecked(t,n,l){const a=this.getNode(t);a&&a.setChecked(!!n,l)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const n=this.currentNode;n&&(n.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,n=!0){const l=t[this.key],a=this.nodesMap[l];this.setCurrentNode(a),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,n=!0){if(t==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const l=this.getNode(t);l&&(this.setCurrentNode(l),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const $M=j({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=ce("tree"),n=Me("NodeInstance"),l=Me("RootTree");return()=>{const a=e.node,{data:s,store:r}=a;return e.renderContent?e.renderContent(De,{_self:n,node:a,data:s,store:r}):l.ctx.slots.default?l.ctx.slots.default({node:a,data:s}):De("span",{class:t.be("node","label")},[a.label])}}});var TM=he($M,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node-content.vue"]]);function rp(e){const t=Me("TreeNodeMap",null),n={treeNodeExpand:l=>{e.node!==l&&e.node.collapse()},children:[]};return t&&t.children.push(n),dt("TreeNodeMap",n),{broadcastExpanded:l=>{if(e.accordion)for(const a of n.children)a.treeNodeExpand(l)}}}const ip=Symbol("dragEvents");function IM({props:e,ctx:t,el$:n,dropIndicator$:l,store:a}){const s=ce("tree"),r=_({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return dt(ip,{treeNodeDragStart:({event:f,treeNode:d})=>{if(typeof e.allowDrag=="function"&&!e.allowDrag(d.node))return f.preventDefault(),!1;f.dataTransfer.effectAllowed="move";try{f.dataTransfer.setData("text/plain","")}catch{}r.value.draggingNode=d,t.emit("node-drag-start",d.node,f)},treeNodeDragOver:({event:f,treeNode:d})=>{const p=d,m=r.value.dropNode;m&&m.node.id!==p.node.id&&mn(m.$el,s.is("drop-inner"));const h=r.value.draggingNode;if(!h||!p)return;let v=!0,g=!0,y=!0,k=!0;typeof e.allowDrop=="function"&&(v=e.allowDrop(h.node,p.node,"prev"),k=g=e.allowDrop(h.node,p.node,"inner"),y=e.allowDrop(h.node,p.node,"next")),f.dataTransfer.dropEffect=g||v||y?"move":"none",(v||g||y)&&(m==null?void 0:m.node.id)!==p.node.id&&(m&&t.emit("node-drag-leave",h.node,m.node,f),t.emit("node-drag-enter",h.node,p.node,f)),(v||g||y)&&(r.value.dropNode=p),p.node.nextSibling===h.node&&(y=!1),p.node.previousSibling===h.node&&(v=!1),p.node.contains(h.node,!1)&&(g=!1),(h.node===p.node||h.node.contains(p.node))&&(v=!1,g=!1,y=!1);const b=p.$el.getBoundingClientRect(),C=n.value.getBoundingClientRect();let I;const T=v?g?.25:y?.45:1:-1,M=y?g?.75:v?.55:0:1;let L=-9999;const A=f.clientY-b.top;A<b.height*T?I="before":A>b.height*M?I="after":g?I="inner":I="none";const D=p.$el.querySelector(`.${s.be("node","expand-icon")}`).getBoundingClientRect(),B=l.value;I==="before"?L=D.top-C.top:I==="after"&&(L=D.bottom-C.top),B.style.top=`${L}px`,B.style.left=`${D.right-C.left}px`,I==="inner"?Dn(p.$el,s.is("drop-inner")):mn(p.$el,s.is("drop-inner")),r.value.showDropIndicator=I==="before"||I==="after",r.value.allowDrop=r.value.showDropIndicator||k,r.value.dropType=I,t.emit("node-drag-over",h.node,p.node,f)},treeNodeDragEnd:f=>{const{draggingNode:d,dropType:p,dropNode:m}=r.value;if(f.preventDefault(),f.dataTransfer.dropEffect="move",d&&m){const h={data:d.node.data};p!=="none"&&d.node.remove(),p==="before"?m.node.parent.insertBefore(h,m.node):p==="after"?m.node.parent.insertAfter(h,m.node):p==="inner"&&m.node.insertChild(h),p!=="none"&&a.value.registerNode(h),mn(m.$el,s.is("drop-inner")),t.emit("node-drag-end",d.node,m.node,p,f),p!=="none"&&t.emit("node-drop",d.node,m.node,p,f)}d&&!m&&t.emit("node-drag-end",d.node,null,p,f),r.value.showDropIndicator=!1,r.value.draggingNode=null,r.value.dropNode=null,r.value.allowDrop=!0}}),{dragState:r}}const NM=j({name:"ElTreeNode",components:{ElCollapseTransition:es,ElCheckbox:$n,NodeContent:TM,ElIcon:Pe,Loading:Xn},props:{node:{type:Cl,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const n=ce("tree"),{broadcastExpanded:l}=rp(e),a=Me("RootTree"),s=_(!1),r=_(!1),i=_(null),u=_(null),c=_(null),f=Me(ip),d=at();dt("NodeInstance",d),e.node.expanded&&(s.value=!0,r.value=!0);const p=a.props.children||"children";ue(()=>{const A=e.node.data[p];return A&&[...A]},()=>{e.node.updateChildren()}),ue(()=>e.node.indeterminate,A=>{v(e.node.checked,A)}),ue(()=>e.node.checked,A=>{v(A,e.node.indeterminate)}),ue(()=>e.node.expanded,A=>{Le(()=>s.value=A),A&&(r.value=!0)});const m=A=>ii(a.props.nodeKey,A.data),h=A=>{const D=e.props.class;if(!D)return{};let B;if(kt(D)){const{data:F}=A;B=D(F,A)}else B=D;return ct(B)?{[B]:!0}:B},v=(A,D)=>{(i.value!==A||u.value!==D)&&a.ctx.emit("check-change",e.node.data,A,D),i.value=A,u.value=D},g=A=>{er(a.store,a.ctx.emit,()=>a.store.value.setCurrentNode(e.node)),a.currentNode.value=e.node,a.props.expandOnClickNode&&k(),a.props.checkOnClickNode&&!e.node.disabled&&b(null,{target:{checked:!e.node.checked}}),a.ctx.emit("node-click",e.node.data,e.node,d,A)},y=A=>{a.instance.vnode.props.onNodeContextmenu&&(A.stopPropagation(),A.preventDefault()),a.ctx.emit("node-contextmenu",A,e.node.data,e.node,d)},k=()=>{e.node.isLeaf||(s.value?(a.ctx.emit("node-collapse",e.node.data,e.node,d),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,d)))},b=(A,D)=>{e.node.setChecked(D.target.checked,!a.props.checkStrictly),Le(()=>{const B=a.store.value;a.ctx.emit("check",e.node.data,{checkedNodes:B.getCheckedNodes(),checkedKeys:B.getCheckedKeys(),halfCheckedNodes:B.getHalfCheckedNodes(),halfCheckedKeys:B.getHalfCheckedKeys()})})};return{ns:n,node$:c,tree:a,expanded:s,childNodeRendered:r,oldChecked:i,oldIndeterminate:u,getNodeKey:m,getNodeClass:h,handleSelectChange:v,handleClick:g,handleContextMenu:y,handleExpandIconClick:k,handleCheckChange:b,handleChildNodeExpand:(A,D,B)=>{l(D),a.ctx.emit("node-expand",A,D,B)},handleDragStart:A=>{a.props.draggable&&f.treeNodeDragStart({event:A,treeNode:e})},handleDragOver:A=>{A.preventDefault(),a.props.draggable&&f.treeNodeDragOver({event:A,treeNode:{$el:c.value,node:e.node}})},handleDrop:A=>{A.preventDefault()},handleDragEnd:A=>{a.props.draggable&&f.treeNodeDragEnd(A)},CaretRight:nc}}}),PM=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],MM=["aria-expanded"];function LM(e,t,n,l,a,s){const r=ee("el-icon"),i=ee("el-checkbox"),u=ee("loading"),c=ee("node-content"),f=ee("el-tree-node"),d=ee("el-collapse-transition");return xe((w(),O("div",{ref:"node$",class:$([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[1]||(t[1]=Fe((...p)=>e.handleClick&&e.handleClick(...p),["stop"])),onContextmenu:t[2]||(t[2]=(...p)=>e.handleContextMenu&&e.handleContextMenu(...p)),onDragstart:t[3]||(t[3]=Fe((...p)=>e.handleDragStart&&e.handleDragStart(...p),["stop"])),onDragover:t[4]||(t[4]=Fe((...p)=>e.handleDragOver&&e.handleDragOver(...p),["stop"])),onDragend:t[5]||(t[5]=Fe((...p)=>e.handleDragEnd&&e.handleDragEnd(...p),["stop"])),onDrop:t[6]||(t[6]=Fe((...p)=>e.handleDrop&&e.handleDrop(...p),["stop"]))},[R("div",{class:$(e.ns.be("node","content")),style:Re({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(w(),G(r,{key:0,class:$([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Fe(e.handleExpandIconClick,["stop"])},{default:N(()=>[(w(),G(rt(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):Z("v-if",!0),e.showCheckbox?(w(),G(i,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=Fe(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):Z("v-if",!0),e.node.loading?(w(),G(r,{key:2,class:$([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:N(()=>[E(u)]),_:1},8,["class"])):Z("v-if",!0),E(c,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),E(d,null,{default:N(()=>[!e.renderAfterExpand||e.childNodeRendered?xe((w(),O("div",{key:0,class:$(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(w(!0),O(Ne,null,Ze(e.node.childNodes,p=>(w(),G(f,{key:e.getNodeKey(p),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:p,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,MM)),[[lt,e.expanded]]):Z("v-if",!0)]),_:1})],42,PM)),[[lt,e.node.visible]])}var RM=he(NM,[["render",LM],["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node.vue"]]);function OM({el$:e},t){const n=ce("tree"),l=Nt([]),a=Nt([]);ze(()=>{r()}),Nl(()=>{l.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),a.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))}),ue(a,i=>{i.forEach(u=>{u.setAttribute("tabindex","-1")})}),Jt(e,"keydown",i=>{const u=i.target;if(!u.className.includes(n.b("node")))return;const c=i.code;l.value=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));const f=l.value.indexOf(u);let d;if([Ae.up,Ae.down].includes(c)){if(i.preventDefault(),c===Ae.up){d=f===-1?0:f!==0?f-1:l.value.length-1;const m=d;for(;!t.value.getNode(l.value[d].dataset.key).canFocus;){if(d--,d===m){d=-1;break}d<0&&(d=l.value.length-1)}}else{d=f===-1?0:f<l.value.length-1?f+1:0;const m=d;for(;!t.value.getNode(l.value[d].dataset.key).canFocus;){if(d++,d===m){d=-1;break}d>=l.value.length&&(d=0)}}d!==-1&&l.value[d].focus()}[Ae.left,Ae.right].includes(c)&&(i.preventDefault(),u.click());const p=u.querySelector('[type="checkbox"]');[Ae.enter,Ae.space].includes(c)&&p&&(i.preventDefault(),p.click())});const r=()=>{var i;l.value=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),a.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const u=e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(u.length){u[0].setAttribute("tabindex","0");return}(i=l.value[0])==null||i.setAttribute("tabindex","0")}}const AM=j({name:"ElTree",components:{ElTreeNode:RM},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:Pt}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:n}=ht(),l=ce("tree"),a=_(new EM({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}));a.value.initialize();const s=_(a.value.root),r=_(null),i=_(null),u=_(null),{broadcastExpanded:c}=rp(e),{dragState:f}=IM({props:e,ctx:t,el$:i,dropIndicator$:u,store:a});OM({el$:i},a);const d=S(()=>{const{childNodes:V}=s.value;return!V||V.length===0||V.every(({visible:W})=>!W)});ue(()=>e.currentNodeKey,V=>{a.value.setCurrentNodeKey(V)}),ue(()=>e.defaultCheckedKeys,V=>{a.value.setDefaultCheckedKey(V)}),ue(()=>e.defaultExpandedKeys,V=>{a.value.setDefaultExpandedKeys(V)}),ue(()=>e.data,V=>{a.value.setData(V)},{deep:!0}),ue(()=>e.checkStrictly,V=>{a.value.checkStrictly=V});const p=V=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");a.value.filter(V)},m=V=>ii(e.nodeKey,V.data),h=V=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const W=a.value.getNode(V);if(!W)return[];const P=[W.data];let H=W.parent;for(;H&&H!==s.value;)P.push(H.data),H=H.parent;return P.reverse()},v=(V,W)=>a.value.getCheckedNodes(V,W),g=V=>a.value.getCheckedKeys(V),y=()=>{const V=a.value.getCurrentNode();return V?V.data:null},k=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const V=y();return V?V[e.nodeKey]:null},b=(V,W)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");a.value.setCheckedNodes(V,W)},C=(V,W)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");a.value.setCheckedKeys(V,W)},I=(V,W,P)=>{a.value.setChecked(V,W,P)},T=()=>a.value.getHalfCheckedNodes(),M=()=>a.value.getHalfCheckedKeys(),L=(V,W=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");er(a,t.emit,()=>a.value.setUserCurrentNode(V,W))},A=(V,W=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");er(a,t.emit,()=>a.value.setCurrentNodeKey(V,W))},D=V=>a.value.getNode(V),B=V=>{a.value.remove(V)},F=(V,W)=>{a.value.append(V,W)},x=(V,W)=>{a.value.insertBefore(V,W)},U=(V,W)=>{a.value.insertAfter(V,W)},X=(V,W,P)=>{c(W),t.emit("node-expand",V,W,P)},K=(V,W)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");a.value.updateChildren(V,W)};return dt("RootTree",{ctx:t,props:e,store:a,root:s,currentNode:r,instance:at()}),dt(zn,void 0),{ns:l,store:a,root:s,currentNode:r,dragState:f,el$:i,dropIndicator$:u,isEmpty:d,filter:p,getNodeKey:m,getNodePath:h,getCheckedNodes:v,getCheckedKeys:g,getCurrentNode:y,getCurrentKey:k,setCheckedNodes:b,setCheckedKeys:C,setChecked:I,getHalfCheckedNodes:T,getHalfCheckedKeys:M,setCurrentNode:L,setCurrentKey:A,t:n,getNode:D,remove:B,append:F,insertBefore:x,insertAfter:U,handleNodeExpand:X,updateKeyChildren:K}}});function VM(e,t,n,l,a,s){const r=ee("el-tree-node");return w(),O("div",{ref:"el$",class:$([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"},[(w(!0),O(Ne,null,Ze(e.root.childNodes,i=>(w(),G(r,{key:e.getNodeKey(i),node:i,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?(w(),O("div",{key:0,class:$(e.ns.e("empty-block"))},[ie(e.$slots,"empty",{},()=>{var i;return[R("span",{class:$(e.ns.e("empty-text"))},ae((i=e.emptyText)!=null?i:e.t("el.tree.emptyText")),3)]})],2)):Z("v-if",!0),xe(R("div",{ref:"dropIndicator$",class:$(e.ns.e("drop-indicator"))},null,2),[[lt,e.dragState.showDropIndicator]])],2)}var ha=he(AM,[["render",VM],["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree.vue"]]);ha.install=e=>{e.component(ha.name,ha)};const Aa=ha,DM=Aa,BM=(e,{attrs:t},{tree:n,key:l})=>{const a=ce("tree-select"),s={...qn(Gt(e),Object.keys(El.props)),...t,valueKey:l,popperClass:S(()=>{const r=[a.e("popper")];return e.popperClass&&r.push(e.popperClass),r.join(" ")}),filterMethod:(r="")=>{e.filterMethod&&e.filterMethod(r),Le(()=>{var i;(i=n.value)==null||i.filter(r)})},onVisibleChange:r=>{var i;(i=t.onVisibleChange)==null||i.call(t,r),e.filterable&&r&&s.filterMethod()}};return s},xM=j({extends:Ta,setup(e,t){const n=Ta.setup(e,t);delete n.selectOptionClick;const l=at().proxy;return Le(()=>{n.select.cachedOptions.get(l.value)||n.select.onOptionCreate(l)}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function nr(e){return e||e===0}function ui(e){return Array.isArray(e)&&e.length}function po(e){return Array.isArray(e)?e:nr(e)?[e]:[]}function ga(e,t,n,l,a){for(let s=0;s<e.length;s++){const r=e[s];if(t(r,s,e,a))return l?l(r,s,e,a):r;{const i=n(r);if(ui(i)){const u=ga(i,t,n,l,r);if(u)return u}}}}function up(e,t,n,l){for(let a=0;a<e.length;a++){const s=e[a];t(s,a,e,l);const r=n(s);ui(r)&&up(r,t,n,s)}}const FM=(e,{attrs:t,slots:n,emit:l},{select:a,tree:s,key:r})=>{ue(()=>e.modelValue,()=>{e.showCheckbox&&Le(()=>{const p=s.value;p&&!vn(p.getCheckedKeys(),po(e.modelValue))&&p.setCheckedKeys(po(e.modelValue))})},{immediate:!0,deep:!0});const i=S(()=>({value:r.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props})),u=(p,m)=>{var h;const v=i.value[p];return kt(v)?v(m,(h=s.value)==null?void 0:h.getNode(u("value",m))):m[v]},c=po(e.modelValue).map(p=>ga(e.data||[],m=>u("value",m)===p,m=>u("children",m),(m,h,v,g)=>g&&u("value",g))).filter(p=>nr(p)),f=S(()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const p=[];return up(e.data.concat(e.cacheData),m=>{const h=u("value",m);p.push({value:h,currentLabel:u("label",m),isDisabled:u("disabled",m)})},m=>u("children",m)),p}),d=S(()=>f.value.reduce((p,m)=>({...p,[m.value]:m}),{}));return{...qn(Gt(e),Object.keys(Aa.props)),...t,nodeKey:r,expandOnClickNode:S(()=>!e.checkStrictly&&e.expandOnClickNode),defaultExpandedKeys:S(()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(c):c),renderContent:(p,{node:m,data:h,store:v})=>p(xM,{value:u("value",h),label:u("label",h),disabled:u("disabled",h)},e.renderContent?()=>e.renderContent(p,{node:m,data:h,store:v}):n.default?()=>n.default({node:m,data:h,store:v}):void 0),filterNodeMethod:(p,m,h)=>{var v;return e.filterNodeMethod?e.filterNodeMethod(p,m,h):p?(v=u("label",m))==null?void 0:v.includes(p):!0},onNodeClick:(p,m,h)=>{var v,g,y;if((v=t.onNodeClick)==null||v.call(t,p,m,h),!(e.showCheckbox&&e.checkOnClickNode))if(!e.showCheckbox&&(e.checkStrictly||m.isLeaf)){if(!u("disabled",p)){const k=(g=a.value)==null?void 0:g.options.get(u("value",p));(y=a.value)==null||y.handleOptionSelect(k)}}else e.expandOnClickNode&&h.proxy.handleExpandIconClick()},onCheck:(p,m)=>{if(!e.showCheckbox)return;const h=u("value",p),v=m.checkedKeys,g=e.multiple?po(e.modelValue).filter(k=>k in d.value&&!s.value.getNode(k)&&!v.includes(k)):[],y=v.concat(g);if(e.checkStrictly)l(tt,e.multiple?y:y.includes(h)?h:void 0);else if(e.multiple)l(tt,s.value.getCheckedKeys(!0));else{const k=ga([p],I=>!ui(u("children",I))&&!u("disabled",I),I=>u("children",I)),b=k?u("value",k):void 0,C=nr(e.modelValue)&&!!ga([p],I=>u("value",I)===e.modelValue,I=>u("children",I));l(tt,b===e.modelValue||C?void 0:b)}Le(()=>{var k;const b=po(e.modelValue);s.value.setCheckedKeys(b),(k=t.onCheck)==null||k.call(t,p,{checkedKeys:s.value.getCheckedKeys(),checkedNodes:s.value.getCheckedNodes(),halfCheckedKeys:s.value.getHalfCheckedKeys(),halfCheckedNodes:s.value.getHalfCheckedNodes()})})},cacheOptions:f}};var zM=j({props:{data:{type:Array,default:()=>[]}},setup(e){const t=Me(Bo);return ue(()=>e.data,()=>{var n;e.data.forEach(a=>{t.cachedOptions.has(a.value)||t.cachedOptions.set(a.value,a)});const l=((n=t.selectWrapper)==null?void 0:n.querySelectorAll("input"))||[];Array.from(l).includes(document.activeElement)||t.setSelected()},{flush:"post",immediate:!0}),()=>{}}});const HM=j({name:"ElTreeSelect",inheritAttrs:!1,props:{...El.props,...Aa.props,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:n,expose:l}=t,a=_(),s=_(),r=S(()=>e.nodeKey||e.valueKey||"value"),i=BM(e,t,{select:a,tree:s,key:r}),{cacheOptions:u,...c}=FM(e,t,{select:a,tree:s,key:r}),f=St({});return l(f),ze(()=>{Object.assign(f,{...qn(s.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...qn(a.value,["focus","blur"])})}),()=>De(El,St({...i,ref:d=>a.value=d}),{...n,default:()=>[De(zM,{data:u.value}),De(Aa,St({...c,ref:d=>s.value=d}))]})}});var ya=he(HM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-select/src/tree-select.vue"]]);ya.install=e=>{e.component(ya.name,ya)};const KM=ya,WM=KM,ci=Symbol(),UM={key:-1,level:-1,data:{}};var mo=(e=>(e.KEY="id",e.LABEL="label",e.CHILDREN="children",e.DISABLED="disabled",e))(mo||{}),lr=(e=>(e.ADD="add",e.DELETE="delete",e))(lr||{});const cp={type:Number,default:26},jM=ge({data:{type:te(Array),default:()=>Ot([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:te(Object),default:()=>Ot({children:"children",label:"label",disabled:"disabled",value:"id"})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:te(Array),default:()=>Ot([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:te(Array),default:()=>Ot([])},indent:{type:Number,default:16},itemSize:cp,icon:{type:Pt},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:te([String,Number])},accordion:{type:Boolean,default:!1},filterMethod:{type:te(Function)},perfMode:{type:Boolean,default:!0}}),qM=ge({node:{type:te(Object),default:()=>Ot(UM)},expanded:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},current:{type:Boolean,default:!1},hiddenExpandIcon:{type:Boolean,default:!1},itemSize:cp}),GM=ge({node:{type:te(Object),required:!0}}),dp="node-click",fp="node-expand",pp="node-collapse",vp="current-change",mp="check",hp="check-change",gp="node-contextmenu",YM={[dp]:(e,t,n)=>e&&t&&n,[fp]:(e,t)=>e&&t,[pp]:(e,t)=>e&&t,[vp]:(e,t)=>e&&t,[mp]:(e,t)=>e&&t,[hp]:(e,t)=>e&&typeof t=="boolean",[gp]:(e,t,n)=>e&&t&&n},XM={click:(e,t)=>!!(e&&t),toggle:e=>!!e,check:(e,t)=>e&&typeof t=="boolean"};function ZM(e,t){const n=_(new Set),l=_(new Set),{emit:a}=at();ue([()=>t.value,()=>e.defaultCheckedKeys],()=>Le(()=>{k(e.defaultCheckedKeys)}),{immediate:!0});const s=()=>{if(!t.value||!e.showCheckbox||e.checkStrictly)return;const{levelTreeNodeMap:b,maxLevel:C}=t.value,I=n.value,T=new Set;for(let M=C-1;M>=1;--M){const L=b.get(M);L&&L.forEach(A=>{const D=A.children;if(D){let B=!0,F=!1;for(const x of D){const U=x.key;if(I.has(U))F=!0;else if(T.has(U)){B=!1,F=!0;break}else B=!1}B?I.add(A.key):F?(T.add(A.key),I.delete(A.key)):(I.delete(A.key),T.delete(A.key))}})}l.value=T},r=b=>n.value.has(b.key),i=b=>l.value.has(b.key),u=(b,C,I=!0)=>{const T=n.value,M=(L,A)=>{T[A?lr.ADD:lr.DELETE](L.key);const D=L.children;!e.checkStrictly&&D&&D.forEach(B=>{B.disabled||M(B,A)})};M(b,C),s(),I&&c(b,C)},c=(b,C)=>{const{checkedNodes:I,checkedKeys:T}=h(),{halfCheckedNodes:M,halfCheckedKeys:L}=v();a(mp,b.data,{checkedKeys:T,checkedNodes:I,halfCheckedKeys:L,halfCheckedNodes:M}),a(hp,b.data,C)};function f(b=!1){return h(b).checkedKeys}function d(b=!1){return h(b).checkedNodes}function p(){return v().halfCheckedKeys}function m(){return v().halfCheckedNodes}function h(b=!1){const C=[],I=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:T}=t.value;n.value.forEach(M=>{const L=T.get(M);L&&(!b||b&&L.isLeaf)&&(I.push(M),C.push(L.data))})}return{checkedKeys:I,checkedNodes:C}}function v(){const b=[],C=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:I}=t.value;l.value.forEach(T=>{const M=I.get(T);M&&(C.push(T),b.push(M.data))})}return{halfCheckedNodes:b,halfCheckedKeys:C}}function g(b){n.value.clear(),l.value.clear(),k(b)}function y(b,C){if(t!=null&&t.value&&e.showCheckbox){const I=t.value.treeNodeMap.get(b);I&&u(I,C,!1)}}function k(b){if(t!=null&&t.value){const{treeNodeMap:C}=t.value;if(e.showCheckbox&&C&&b)for(const I of b){const T=C.get(I);T&&!r(T)&&u(T,!0,!1)}}}return{updateCheckedKeys:s,toggleCheckbox:u,isChecked:r,isIndeterminate:i,getCheckedKeys:f,getCheckedNodes:d,getHalfCheckedKeys:p,getHalfCheckedNodes:m,setChecked:y,setCheckedKeys:g}}function JM(e,t){const n=_(new Set([])),l=_(new Set([])),a=S(()=>kt(e.filterMethod));function s(i){var u;if(!a.value)return;const c=new Set,f=l.value,d=n.value,p=[],m=((u=t.value)==null?void 0:u.treeNodes)||[],h=e.filterMethod;d.clear();function v(g){g.forEach(y=>{p.push(y),h!=null&&h(i,y.data)?p.forEach(b=>{c.add(b.key)}):y.isLeaf&&d.add(y.key);const k=y.children;if(k&&v(k),!y.isLeaf){if(!c.has(y.key))d.add(y.key);else if(k){let b=!0;for(const C of k)if(!d.has(C.key)){b=!1;break}b?f.add(y.key):f.delete(y.key)}}p.pop()})}return v(m),c}function r(i){return l.value.has(i.key)}return{hiddenExpandIconKeySet:l,hiddenNodeKeySet:n,doFilter:s,isForceHiddenExpandIcon:r}}function QM(e,t){const n=_(new Set(e.defaultExpandedKeys)),l=_(),a=Nt();ue(()=>e.currentNodeKey,Q=>{l.value=Q},{immediate:!0}),ue(()=>e.data,Q=>{oe(Q)},{immediate:!0});const{isIndeterminate:s,isChecked:r,toggleCheckbox:i,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:f,getHalfCheckedNodes:d,setChecked:p,setCheckedKeys:m}=ZM(e,a),{doFilter:h,hiddenNodeKeySet:v,isForceHiddenExpandIcon:g}=JM(e,a),y=S(()=>{var Q;return((Q=e.props)==null?void 0:Q.value)||mo.KEY}),k=S(()=>{var Q;return((Q=e.props)==null?void 0:Q.children)||mo.CHILDREN}),b=S(()=>{var Q;return((Q=e.props)==null?void 0:Q.disabled)||mo.DISABLED}),C=S(()=>{var Q;return((Q=e.props)==null?void 0:Q.label)||mo.LABEL}),I=S(()=>{const Q=n.value,ve=v.value,_e=[],Te=a.value&&a.value.treeNodes||[];function Ie(){const Ke=[];for(let Ge=Te.length-1;Ge>=0;--Ge)Ke.push(Te[Ge]);for(;Ke.length;){const Ge=Ke.pop();if(Ge&&(ve.has(Ge.key)||_e.push(Ge),Q.has(Ge.key))){const qe=Ge.children;if(qe){const it=qe.length;for(let ke=it-1;ke>=0;--ke)Ke.push(qe[ke])}}}}return Ie(),_e}),T=S(()=>I.value.length>0);function M(Q){const ve=new Map,_e=new Map;let Te=1;function Ie(Ge,qe=1,it=void 0){var ke;const Ee=[];for(const Be of Ge){const Ve=D(Be),Ye={level:qe,key:Ve,data:Be};Ye.label=F(Be),Ye.parent=it;const Xe=A(Be);Ye.disabled=B(Be),Ye.isLeaf=!Xe||Xe.length===0,Xe&&Xe.length&&(Ye.children=Ie(Xe,qe+1,Ye)),Ee.push(Ye),ve.set(Ve,Ye),_e.has(qe)||_e.set(qe,[]),(ke=_e.get(qe))==null||ke.push(Ye)}return qe>Te&&(Te=qe),Ee}const Ke=Ie(Q);return{treeNodeMap:ve,levelTreeNodeMap:_e,maxLevel:Te,treeNodes:Ke}}function L(Q){const ve=h(Q);ve&&(n.value=ve)}function A(Q){return Q[k.value]}function D(Q){return Q?Q[y.value]:""}function B(Q){return Q[b.value]}function F(Q){return Q[C.value]}function x(Q){n.value.has(Q.key)?P(Q):W(Q)}function U(Q){n.value=new Set(Q)}function X(Q,ve){t(dp,Q.data,Q,ve),K(Q),e.expandOnClickNode&&x(Q),e.showCheckbox&&e.checkOnClickNode&&!Q.disabled&&i(Q,!r(Q),!0)}function K(Q){z(Q)||(l.value=Q.key,t(vp,Q.data,Q))}function V(Q,ve){i(Q,ve)}function W(Q){const ve=n.value;if(a.value&&e.accordion){const{treeNodeMap:_e}=a.value;ve.forEach(Te=>{const Ie=_e.get(Te);Q&&Q.level===(Ie==null?void 0:Ie.level)&&ve.delete(Te)})}ve.add(Q.key),t(fp,Q.data,Q)}function P(Q){n.value.delete(Q.key),t(pp,Q.data,Q)}function H(Q){return n.value.has(Q.key)}function Y(Q){return!!Q.disabled}function z(Q){const ve=l.value;return!!ve&&ve===Q.key}function q(){var Q,ve;if(l.value)return(ve=(Q=a.value)==null?void 0:Q.treeNodeMap.get(l.value))==null?void 0:ve.data}function se(){return l.value}function pe(Q){l.value=Q}function oe(Q){Le(()=>a.value=M(Q))}function re(Q){var ve;const _e=It(Q)?D(Q):Q;return(ve=a.value)==null?void 0:ve.treeNodeMap.get(_e)}return{tree:a,flattenTree:I,isNotEmpty:T,getKey:D,getChildren:A,toggleExpand:x,toggleCheckbox:i,isExpanded:H,isChecked:r,isIndeterminate:s,isDisabled:Y,isCurrent:z,isForceHiddenExpandIcon:g,handleNodeClick:X,handleNodeCheck:V,getCurrentNode:q,getCurrentKey:se,setCurrentKey:pe,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:f,getHalfCheckedNodes:d,setChecked:p,setCheckedKeys:m,filter:L,setData:oe,getNode:re,expandNode:W,collapseNode:P,setExpandedKeys:U}}var eL=j({name:"ElTreeNodeContent",props:GM,setup(e){const t=Me(ci),n=ce("tree");return()=>{const l=e.node,{data:a}=l;return t!=null&&t.ctx.slots.default?t.ctx.slots.default({node:l,data:a}):De("span",{class:n.be("node","label")},[l==null?void 0:l.label])}}});const tL=["aria-expanded","aria-disabled","aria-checked","data-key","onClick"],nL=j({name:"ElTreeNode"}),lL=j({...nL,props:qM,emits:XM,setup(e,{emit:t}){const n=e,l=Me(ci),a=ce("tree"),s=S(()=>{var d;return(d=l==null?void 0:l.props.indent)!=null?d:16}),r=S(()=>{var d;return(d=l==null?void 0:l.props.icon)!=null?d:nc}),i=d=>{t("click",n.node,d)},u=()=>{t("toggle",n.node)},c=d=>{t("check",n.node,d)},f=d=>{var p,m,h,v;(h=(m=(p=l==null?void 0:l.instance)==null?void 0:p.vnode)==null?void 0:m.props)!=null&&h.onNodeContextmenu&&(d.stopPropagation(),d.preventDefault()),l==null||l.ctx.emit(gp,d,(v=n.node)==null?void 0:v.data,n.node)};return(d,p)=>{var m,h,v;return w(),O("div",{ref:"node$",class:$([o(a).b("node"),o(a).is("expanded",d.expanded),o(a).is("current",d.current),o(a).is("focusable",!d.disabled),o(a).is("checked",!d.disabled&&d.checked)]),role:"treeitem",tabindex:"-1","aria-expanded":d.expanded,"aria-disabled":d.disabled,"aria-checked":d.checked,"data-key":(m=d.node)==null?void 0:m.key,onClick:Fe(i,["stop"]),onContextmenu:f},[R("div",{class:$(o(a).be("node","content")),style:Re({paddingLeft:`${(d.node.level-1)*o(s)}px`,height:d.itemSize+"px"})},[o(r)?(w(),G(o(Pe),{key:0,class:$([o(a).is("leaf",!!((h=d.node)!=null&&h.isLeaf)),o(a).is("hidden",d.hiddenExpandIcon),{expanded:!((v=d.node)!=null&&v.isLeaf)&&d.expanded},o(a).be("node","expand-icon")]),onClick:Fe(u,["stop"])},{default:N(()=>[(w(),G(rt(o(r))))]),_:1},8,["class","onClick"])):Z("v-if",!0),d.showCheckbox?(w(),G(o($n),{key:1,"model-value":d.checked,indeterminate:d.indeterminate,disabled:d.disabled,onChange:c,onClick:p[0]||(p[0]=Fe(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):Z("v-if",!0),E(o(eL),{node:d.node},null,8,["node"])],6)],42,tL)}}});var oL=he(lL,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree-node.vue"]]);const aL=j({name:"ElTreeV2"}),sL=j({...aL,props:jM,emits:YM,setup(e,{expose:t,emit:n}){const l=e,a=Qt(),s=S(()=>l.itemSize);dt(ci,{ctx:{emit:n,slots:a},props:l,instance:at()}),dt(zn,void 0);const{t:r}=ht(),i=ce("tree"),{flattenTree:u,isNotEmpty:c,toggleExpand:f,isExpanded:d,isIndeterminate:p,isChecked:m,isDisabled:h,isCurrent:v,isForceHiddenExpandIcon:g,handleNodeClick:y,handleNodeCheck:k,toggleCheckbox:b,getCurrentNode:C,getCurrentKey:I,setCurrentKey:T,getCheckedKeys:M,getCheckedNodes:L,getHalfCheckedKeys:A,getHalfCheckedNodes:D,setChecked:B,setCheckedKeys:F,filter:x,setData:U,getNode:X,expandNode:K,collapseNode:V,setExpandedKeys:W}=QM(l,n);return t({toggleCheckbox:b,getCurrentNode:C,getCurrentKey:I,setCurrentKey:T,getCheckedKeys:M,getCheckedNodes:L,getHalfCheckedKeys:A,getHalfCheckedNodes:D,setChecked:B,setCheckedKeys:F,filter:x,setData:U,getNode:X,expandNode:K,collapseNode:V,setExpandedKeys:W}),(P,H)=>{var Y;return w(),O("div",{class:$([o(i).b(),{[o(i).m("highlight-current")]:P.highlightCurrent}]),role:"tree"},[o(c)?(w(),G(o(Sf),{key:0,"class-name":o(i).b("virtual-list"),data:o(u),total:o(u).length,height:P.height,"item-size":o(s),"perf-mode":P.perfMode},{default:N(({data:z,index:q,style:se})=>[(w(),G(oL,{key:z[q].key,style:Re(se),node:z[q],expanded:o(d)(z[q]),"show-checkbox":P.showCheckbox,checked:o(m)(z[q]),indeterminate:o(p)(z[q]),"item-size":o(s),disabled:o(h)(z[q]),current:o(v)(z[q]),"hidden-expand-icon":o(g)(z[q]),onClick:o(y),onToggle:o(f),onCheck:o(k)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode"])):(w(),O("div",{key:1,class:$(o(i).e("empty-block"))},[R("span",{class:$(o(i).e("empty-text"))},ae((Y=P.emptyText)!=null?Y:o(r)("el.tree.emptyText")),3)],2))],2)}}});var rL=he(sL,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree.vue"]]);const iL=Qe(rL),yp=Symbol("uploadContextKey"),uL="ElUpload";class cL extends Error{constructor(t,n,l,a){super(t),this.name="UploadAjaxError",this.status=n,this.method=l,this.url=a}}function Pu(e,t,n){let l;return n.response?l=`${n.response.error||n.response}`:n.responseText?l=`${n.responseText}`:l=`fail to ${t.method} ${e} ${n.status}`,new cL(l,n.status,t.method,e)}function dL(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const fL=e=>{typeof XMLHttpRequest>"u"&&jt(uL,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",s=>{const r=s;r.percent=s.total>0?s.loaded/s.total*100:0,e.onProgress(r)});const l=new FormData;if(e.data)for(const[s,r]of Object.entries(e.data))Array.isArray(r)?l.append(s,...r):l.append(s,r);l.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(Pu(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(Pu(n,e,t));e.onSuccess(dL(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const a=e.headers||{};if(a instanceof Headers)a.forEach((s,r)=>t.setRequestHeader(r,s));else for(const[s,r]of Object.entries(a))Ht(r)||t.setRequestHeader(s,String(r));return t.send(l),t},bp=["text","picture","picture-card"];let pL=1;const or=()=>Date.now()+pL++,wp=ge({action:{type:String,default:"#"},headers:{type:te(Object)},method:{type:String,default:"post"},data:{type:Object,default:()=>Ot({})},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},drag:{type:Boolean,default:!1},withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},type:{type:String,default:"select"},fileList:{type:te(Array),default:()=>Ot([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:bp,default:"text"},httpRequest:{type:te(Function),default:fL},disabled:Boolean,limit:Number}),vL=ge({...wp,beforeUpload:{type:te(Function),default:Dt},beforeRemove:{type:te(Function)},onRemove:{type:te(Function),default:Dt},onChange:{type:te(Function),default:Dt},onPreview:{type:te(Function),default:Dt},onSuccess:{type:te(Function),default:Dt},onProgress:{type:te(Function),default:Dt},onError:{type:te(Function),default:Dt},onExceed:{type:te(Function),default:Dt}}),mL=ge({files:{type:te(Array),default:()=>Ot([])},disabled:{type:Boolean,default:!1},handlePreview:{type:te(Function),default:Dt},listType:{type:String,values:bp,default:"text"}}),hL={remove:e=>!!e},gL=["onKeydown"],yL=["src"],bL=["onClick"],wL=["title"],kL=["onClick"],CL=["onClick"],SL=j({name:"ElUploadList"}),_L=j({...SL,props:mL,emits:hL,setup(e,{emit:t}){const{t:n}=ht(),l=ce("upload"),a=ce("icon"),s=ce("list"),r=gn(),i=_(!1),u=c=>{t("remove",c)};return(c,f)=>(w(),G(zu,{tag:"ul",class:$([o(l).b("list"),o(l).bm("list",c.listType),o(l).is("disabled",o(r))]),name:o(s).b()},{default:N(()=>[(w(!0),O(Ne,null,Ze(c.files,d=>(w(),O("li",{key:d.uid||d.name,class:$([o(l).be("list","item"),o(l).is(d.status),{focusing:i.value}]),tabindex:"0",onKeydown:pt(p=>!o(r)&&u(d),["delete"]),onFocus:f[0]||(f[0]=p=>i.value=!0),onBlur:f[1]||(f[1]=p=>i.value=!1),onClick:f[2]||(f[2]=p=>i.value=!1)},[ie(c.$slots,"default",{file:d},()=>[c.listType==="picture"||d.status!=="uploading"&&c.listType==="picture-card"?(w(),O("img",{key:0,class:$(o(l).be("list","item-thumbnail")),src:d.url,alt:""},null,10,yL)):Z("v-if",!0),d.status==="uploading"||c.listType!=="picture-card"?(w(),O("div",{key:1,class:$(o(l).be("list","item-info"))},[R("a",{class:$(o(l).be("list","item-name")),onClick:Fe(p=>c.handlePreview(d),["prevent"])},[E(o(Pe),{class:$(o(a).m("document"))},{default:N(()=>[E(o(lc))]),_:1},8,["class"]),R("span",{class:$(o(l).be("list","item-file-name")),title:d.name},ae(d.name),11,wL)],10,bL),d.status==="uploading"?(w(),G(o(vf),{key:0,type:c.listType==="picture-card"?"circle":"line","stroke-width":c.listType==="picture-card"?6:2,percentage:Number(d.percentage),style:Re(c.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):Z("v-if",!0)],2)):Z("v-if",!0),R("label",{class:$(o(l).be("list","item-status-label"))},[c.listType==="text"?(w(),G(o(Pe),{key:0,class:$([o(a).m("upload-success"),o(a).m("circle-check")])},{default:N(()=>[E(o(Ba))]),_:1},8,["class"])):["picture-card","picture"].includes(c.listType)?(w(),G(o(Pe),{key:1,class:$([o(a).m("upload-success"),o(a).m("check")])},{default:N(()=>[E(o(no))]),_:1},8,["class"])):Z("v-if",!0)],2),o(r)?Z("v-if",!0):(w(),G(o(Pe),{key:2,class:$(o(a).m("close")),onClick:p=>u(d)},{default:N(()=>[E(o(Sn))]),_:2},1032,["class","onClick"])),Z(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),Z(" This is a bug which needs to be fixed "),Z(" TODO: Fix the incorrect navigation interaction "),o(r)?Z("v-if",!0):(w(),O("i",{key:3,class:$(o(a).m("close-tip"))},ae(o(n)("el.upload.deleteTip")),3)),c.listType==="picture-card"?(w(),O("span",{key:4,class:$(o(l).be("list","item-actions"))},[R("span",{class:$(o(l).be("list","item-preview")),onClick:p=>c.handlePreview(d)},[E(o(Pe),{class:$(o(a).m("zoom-in"))},{default:N(()=>[E(o(Ju))]),_:1},8,["class"])],10,kL),o(r)?Z("v-if",!0):(w(),O("span",{key:0,class:$(o(l).be("list","item-delete")),onClick:p=>u(d)},[E(o(Pe),{class:$(o(a).m("delete"))},{default:N(()=>[E(o(br))]),_:1},8,["class"])],10,CL))],2)):Z("v-if",!0)])],42,gL))),128)),ie(c.$slots,"append")]),_:3},8,["class","name"]))}});var Mu=he(_L,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-list.vue"]]);const EL=ge({disabled:{type:Boolean,default:!1}}),$L={file:e=>et(e)},TL=["onDrop","onDragover"],kp="ElUploadDrag",IL=j({name:kp}),NL=j({...IL,props:EL,emits:$L,setup(e,{emit:t}){const n=Me(yp);n||jt(kp,"usage: <el-upload><el-upload-dragger /></el-upload>");const l=ce("upload"),a=_(!1),s=gn(),r=u=>{if(s.value)return;a.value=!1,u.stopPropagation();const c=Array.from(u.dataTransfer.files),f=n.accept.value;if(!f){t("file",c);return}const d=c.filter(p=>{const{type:m,name:h}=p,v=h.includes(".")?`.${h.split(".").pop()}`:"",g=m.replace(/\/.*$/,"");return f.split(",").map(y=>y.trim()).filter(y=>y).some(y=>y.startsWith(".")?v===y:/\/\*$/.test(y)?g===y.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(y)?m===y:!1)});t("file",d)},i=()=>{s.value||(a.value=!0)};return(u,c)=>(w(),O("div",{class:$([o(l).b("dragger"),o(l).is("dragover",a.value)]),onDrop:Fe(r,["prevent"]),onDragover:Fe(i,["prevent"]),onDragleave:c[0]||(c[0]=Fe(f=>a.value=!1,["prevent"]))},[ie(u.$slots,"default")],42,TL))}});var PL=he(NL,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-dragger.vue"]]);const ML=ge({...wp,beforeUpload:{type:te(Function),default:Dt},onRemove:{type:te(Function),default:Dt},onStart:{type:te(Function),default:Dt},onSuccess:{type:te(Function),default:Dt},onProgress:{type:te(Function),default:Dt},onError:{type:te(Function),default:Dt},onExceed:{type:te(Function),default:Dt}}),LL=["onKeydown"],RL=["name","multiple","accept"],OL=j({name:"ElUploadContent",inheritAttrs:!1}),AL=j({...OL,props:ML,setup(e,{expose:t}){const n=e,l=ce("upload"),a=gn(),s=Nt({}),r=Nt(),i=h=>{if(h.length===0)return;const{autoUpload:v,limit:g,fileList:y,multiple:k,onStart:b,onExceed:C}=n;if(g&&y.length+h.length>g){C(h,y);return}k||(h=h.slice(0,1));for(const I of h){const T=I;T.uid=or(),b(T),v&&u(T)}},u=async h=>{if(r.value.value="",!n.beforeUpload)return c(h);let v,g={};try{const k=n.data,b=n.beforeUpload(h);g=It(n.data)?ka(n.data):n.data,v=await b,It(n.data)&&vn(k,g)&&(g=ka(n.data))}catch{v=!1}if(v===!1){n.onRemove(h);return}let y=h;v instanceof Blob&&(v instanceof File?y=v:y=new File([v],h.name,{type:h.type})),c(Object.assign(y,{uid:h.uid}),g)},c=(h,v)=>{const{headers:g,data:y,method:k,withCredentials:b,name:C,action:I,onProgress:T,onSuccess:M,onError:L,httpRequest:A}=n,{uid:D}=h,B={headers:g||{},withCredentials:b,file:h,data:v??y,method:k,filename:C,action:I,onProgress:x=>{T(x,h)},onSuccess:x=>{M(x,h),delete s.value[D]},onError:x=>{L(x,h),delete s.value[D]}},F=A(B);s.value[D]=F,F instanceof Promise&&F.then(B.onSuccess,B.onError)},f=h=>{const v=h.target.files;v&&i(Array.from(v))},d=()=>{a.value||(r.value.value="",r.value.click())},p=()=>{d()};return t({abort:h=>{bm(s.value).filter(h?([g])=>String(h.uid)===g:()=>!0).forEach(([g,y])=>{y instanceof XMLHttpRequest&&y.abort(),delete s.value[g]})},upload:u}),(h,v)=>(w(),O("div",{class:$([o(l).b(),o(l).m(h.listType),o(l).is("drag",h.drag)]),tabindex:"0",onClick:d,onKeydown:pt(Fe(p,["self"]),["enter","space"])},[h.drag?(w(),G(PL,{key:0,disabled:o(a),onFile:i},{default:N(()=>[ie(h.$slots,"default")]),_:3},8,["disabled"])):ie(h.$slots,"default",{key:1}),R("input",{ref_key:"inputRef",ref:r,class:$(o(l).e("input")),name:h.name,multiple:h.multiple,accept:h.accept,type:"file",onChange:f,onClick:v[0]||(v[0]=Fe(()=>{},["stop"]))},null,42,RL)],42,LL))}});var Lu=he(AL,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]);const Ru="ElUpload",VL=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},DL=(e,t)=>{const n=Mv(e,"fileList",void 0,{passive:!0}),l=p=>n.value.find(m=>m.uid===p.uid);function a(p){var m;(m=t.value)==null||m.abort(p)}function s(p=["ready","uploading","success","fail"]){n.value=n.value.filter(m=>!p.includes(m.status))}const r=(p,m)=>{const h=l(m);h&&(console.error(p),h.status="fail",n.value.splice(n.value.indexOf(h),1),e.onError(p,h,n.value),e.onChange(h,n.value))},i=(p,m)=>{const h=l(m);h&&(e.onProgress(p,h,n.value),h.status="uploading",h.percentage=Math.round(p.percent))},u=(p,m)=>{const h=l(m);h&&(h.status="success",h.response=p,e.onSuccess(p,h,n.value),e.onChange(h,n.value))},c=p=>{Ht(p.uid)&&(p.uid=or());const m={name:p.name,percentage:0,status:"ready",size:p.size,raw:p,uid:p.uid};if(e.listType==="picture-card"||e.listType==="picture")try{m.url=URL.createObjectURL(p)}catch(h){h.message,e.onError(h,m,n.value)}n.value=[...n.value,m],e.onChange(m,n.value)},f=async p=>{const m=p instanceof File?l(p):p;m||jt(Ru,"file to be removed not found");const h=v=>{a(v);const g=n.value;g.splice(g.indexOf(v),1),e.onRemove(v,g),VL(v)};e.beforeRemove?await e.beforeRemove(m,n.value)!==!1&&h(m):h(m)};function d(){n.value.filter(({status:p})=>p==="ready").forEach(({raw:p})=>{var m;return p&&((m=t.value)==null?void 0:m.upload(p))})}return ue(()=>e.listType,p=>{p!=="picture-card"&&p!=="picture"||(n.value=n.value.map(m=>{const{raw:h,url:v}=m;if(!v&&h)try{m.url=URL.createObjectURL(h)}catch(g){e.onError(g,m,n.value)}return m}))}),ue(n,p=>{for(const m of p)m.uid||(m.uid=or()),m.status||(m.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:a,clearFiles:s,handleError:r,handleProgress:i,handleStart:c,handleSuccess:u,handleRemove:f,submit:d}},BL=j({name:"ElUpload"}),xL=j({...BL,props:vL,setup(e,{expose:t}){const n=e,l=Qt(),a=gn(),s=Nt(),{abort:r,submit:i,clearFiles:u,uploadFiles:c,handleStart:f,handleError:d,handleRemove:p,handleSuccess:m,handleProgress:h}=DL(n,s),v=S(()=>n.listType==="picture-card"),g=S(()=>({...n,fileList:c.value,onStart:f,onProgress:h,onSuccess:m,onError:d,onRemove:p}));return Rt(()=>{c.value.forEach(({url:y})=>{y!=null&&y.startsWith("blob:")&&URL.revokeObjectURL(y)})}),dt(yp,{accept:At(n,"accept")}),t({abort:r,submit:i,clearFiles:u,handleStart:f,handleRemove:p}),(y,k)=>(w(),O("div",null,[o(v)&&y.showFileList?(w(),G(Mu,{key:0,disabled:o(a),"list-type":y.listType,files:o(c),"handle-preview":y.onPreview,onRemove:o(p)},xn({append:N(()=>[E(Lu,ot({ref_key:"uploadRef",ref:s},o(g)),{default:N(()=>[o(l).trigger?ie(y.$slots,"trigger",{key:0}):Z("v-if",!0),!o(l).trigger&&o(l).default?ie(y.$slots,"default",{key:1}):Z("v-if",!0)]),_:3},16)]),_:2},[y.$slots.file?{name:"default",fn:N(({file:b})=>[ie(y.$slots,"file",{file:b})])}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):Z("v-if",!0),!o(v)||o(v)&&!y.showFileList?(w(),G(Lu,ot({key:1,ref_key:"uploadRef",ref:s},o(g)),{default:N(()=>[o(l).trigger?ie(y.$slots,"trigger",{key:0}):Z("v-if",!0),!o(l).trigger&&o(l).default?ie(y.$slots,"default",{key:1}):Z("v-if",!0)]),_:3},16)):Z("v-if",!0),y.$slots.trigger?ie(y.$slots,"default",{key:2}):Z("v-if",!0),ie(y.$slots,"tip"),!o(v)&&y.showFileList?(w(),G(Mu,{key:3,disabled:o(a),"list-type":y.listType,files:o(c),"handle-preview":y.onPreview,onRemove:o(p)},xn({_:2},[y.$slots.file?{name:"default",fn:N(({file:b})=>[ie(y.$slots,"file",{file:b})])}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):Z("v-if",!0)]))}});var FL=he(xL,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]]);const zL=Qe(FL);var HL=[vh,Eh,by,l2,$y,Ry,Xc,jy,qy,tn,td,jb,Zb,d0,f0,$w,fw,Lw,$n,L0,yd,Ww,uk,ck,ek,xk,sh,Zk,Jk,Qk,eC,tC,n1,f1,p1,I1,qd,H1,RS,OS,AS,nf,Fh,zh,Pe,T_,lf,on,of,z_,rE,iE,uE,cE,gE,C$,I$,D$,qc,vf,Ed,G0,q0,eT,aT,xw,Qn,El,Ta,GE,jT,eI,tI,MI,VI,Rf,qI,nN,lN,vN,yP,bP,n2,y2,b2,_o,_2,Eb,P2,A2,V2,cn,iM,SM,DM,WM,iL,zL];const In="ElInfiniteScroll",KL=50,WL=200,UL=0,jL={delay:{type:Number,default:WL},distance:{type:Number,default:UL},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},di=(e,t)=>Object.entries(jL).reduce((n,[l,a])=>{var s,r;const{type:i,default:u}=a,c=e.getAttribute(`infinite-scroll-${l}`);let f=(r=(s=t[c])!=null?s:c)!=null?r:u;return f=f==="false"?!1:f,f=i(f),n[l]=Number.isNaN(f)?u:f,n},{}),Cp=e=>{const{observer:t}=e[In];t&&(t.disconnect(),delete e[In].observer)},qL=(e,t)=>{const{container:n,containerEl:l,instance:a,observer:s,lastScrollTop:r}=e[In],{disabled:i,distance:u}=di(e,a),{clientHeight:c,scrollHeight:f,scrollTop:d}=l,p=d-r;if(e[In].lastScrollTop=d,s||i||p<0)return;let m=!1;if(n===e)m=f-(c+d)<=u;else{const{clientTop:h,scrollHeight:v}=e,g=hm(e,l);m=d+c>=g+h+v-u}m&&t.call(a)};function _s(e,t){const{containerEl:n,instance:l}=e[In],{disabled:a}=di(e,l);a||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?t.call(l):Cp(e))}const GL={async mounted(e,t){const{instance:n,value:l}=t;kt(l)||jt(In,"'v-infinite-scroll' binding value must be a function"),await Le();const{delay:a,immediate:s}=di(e,n),r=kr(e,!0),i=r===window?document.documentElement:r,u=wl(qL.bind(null,e,l),a);if(r){if(e[In]={instance:n,container:r,containerEl:i,delay:a,cb:l,onScroll:u,lastScrollTop:i.scrollTop},s){const c=new MutationObserver(wl(_s.bind(null,e,l),KL));e[In].observer=c,c.observe(e,{childList:!0,subtree:!0}),_s(e,l)}r.addEventListener("scroll",u)}},unmounted(e){const{container:t,onScroll:n}=e[In];t==null||t.removeEventListener("scroll",n),Cp(e)},async updated(e){if(!e[In])await Le();else{const{containerEl:t,cb:n,observer:l}=e[In];t.clientHeight&&l&&_s(e,n)}}},ar=GL;ar.install=e=>{e.directive("InfiniteScroll",ar)};const YL=ar;function XL(e){let t;const n=_(!1),l=St({...e,originalPosition:"",originalOverflow:"",visible:!1});function a(p){l.text=p}function s(){const p=l.parent,m=d.ns;if(!p.vLoadingAddClassList){let h=p.getAttribute("loading-number");h=Number.parseInt(h)-1,h?p.setAttribute("loading-number",h.toString()):(mn(p,m.bm("parent","relative")),p.removeAttribute("loading-number")),mn(p,m.bm("parent","hidden"))}r(),f.unmount()}function r(){var p,m;(m=(p=d.$el)==null?void 0:p.parentNode)==null||m.removeChild(d.$el)}function i(){var p;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(t),t=window.setTimeout(u,400),l.visible=!1,(p=e.closed)==null||p.call(e))}function u(){if(!n.value)return;const p=l.parent;n.value=!1,p.vLoadingAddClassList=void 0,s()}const c=j({name:"ElLoading",setup(p,{expose:m}){const{ns:h,zIndex:v}=Xa("loading");return m({ns:h,zIndex:v}),()=>{const g=l.spinner||l.svg,y=De("svg",{class:"circular",viewBox:l.svgViewBox?l.svgViewBox:"0 0 50 50",...g?{innerHTML:g}:{}},[De("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),k=l.text?De("p",{class:h.b("text")},[l.text]):void 0;return De(Wt,{name:h.b("fade"),onAfterLeave:u},{default:N(()=>[xe(E("div",{style:{backgroundColor:l.background||""},class:[h.b("mask"),l.customClass,l.fullscreen?"is-fullscreen":""]},[De("div",{class:h.b("spinner")},[y,k])]),[[lt,l.visible]])])})}}}),f=Uu(c),d=f.mount(document.createElement("div"));return{...Gt(l),setText:a,removeElLoadingChild:r,close:i,handleAfterLeave:u,vm:d,get $el(){return d.$el}}}let Qo;const sr=function(e={}){if(!yt)return;const t=ZL(e);if(t.fullscreen&&Qo)return Qo;const n=XL({...t,closed:()=>{var a;(a=t.closed)==null||a.call(t),t.fullscreen&&(Qo=void 0)}});JL(t,t.parent,n),Ou(t,t.parent,n),t.parent.vLoadingAddClassList=()=>Ou(t,t.parent,n);let l=t.parent.getAttribute("loading-number");return l?l=`${Number.parseInt(l)+1}`:l="1",t.parent.setAttribute("loading-number",l),t.parent.appendChild(n.$el),Le(()=>n.visible.value=t.visible),t.fullscreen&&(Qo=n),n},ZL=e=>{var t,n,l,a;let s;return ct(e.target)?s=(t=document.querySelector(e.target))!=null?t:document.body:s=e.target||document.body,{parent:s===document.body||e.body?document.body:s,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:s===document.body&&((n=e.fullscreen)!=null?n:!0),lock:(l=e.lock)!=null?l:!1,customClass:e.customClass||"",visible:(a=e.visible)!=null?a:!0,target:s}},JL=async(e,t,n)=>{const{nextZIndex:l}=n.vm.zIndex||n.vm._.exposed.zIndex,a={};if(e.fullscreen)n.originalPosition.value=Vn(document.body,"position"),n.originalOverflow.value=Vn(document.body,"overflow"),a.zIndex=l();else if(e.parent===document.body){n.originalPosition.value=Vn(document.body,"position"),await Le();for(const s of["top","left"]){const r=s==="top"?"scrollTop":"scrollLeft";a[s]=`${e.target.getBoundingClientRect()[s]+document.body[r]+document.documentElement[r]-Number.parseInt(Vn(document.body,`margin-${s}`),10)}px`}for(const s of["height","width"])a[s]=`${e.target.getBoundingClientRect()[s]}px`}else n.originalPosition.value=Vn(t,"position");for(const[s,r]of Object.entries(a))n.$el.style[s]=r},Ou=(e,t,n)=>{const l=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?mn(t,l.bm("parent","relative")):Dn(t,l.bm("parent","relative")),e.fullscreen&&e.lock?Dn(t,l.bm("parent","hidden")):mn(t,l.bm("parent","hidden"))},rr=Symbol("ElLoading"),Au=(e,t)=>{var n,l,a,s;const r=t.instance,i=p=>It(t.value)?t.value[p]:void 0,u=p=>{const m=ct(p)&&(r==null?void 0:r[p])||p;return m&&_(m)},c=p=>u(i(p)||e.getAttribute(`element-loading-${Hp(p)}`)),f=(n=i("fullscreen"))!=null?n:t.modifiers.fullscreen,d={text:c("text"),svg:c("svg"),svgViewBox:c("svgViewBox"),spinner:c("spinner"),background:c("background"),customClass:c("customClass"),fullscreen:f,target:(l=i("target"))!=null?l:f?void 0:e,body:(a=i("body"))!=null?a:t.modifiers.body,lock:(s=i("lock"))!=null?s:t.modifiers.lock};e[rr]={options:d,instance:sr(d)}},QL=(e,t)=>{for(const n of Object.keys(t))bt(t[n])&&(t[n].value=e[n])},Vu={mounted(e,t){t.value&&Au(e,t)},updated(e,t){const n=e[rr];t.oldValue!==t.value&&(t.value&&!t.oldValue?Au(e,t):t.value&&t.oldValue?It(t.value)&&QL(t.value,n.options):n==null||n.instance.close())},unmounted(e){var t;(t=e[rr])==null||t.instance.close()}},eR={install(e){e.directive("loading",Vu),e.config.globalProperties.$loading=sr},directive:Vu,service:sr},Sp=["success","info","warning","error"],pn=Ot({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:yt?document.body:void 0}),tR=ge({customClass:{type:String,default:pn.customClass},center:{type:Boolean,default:pn.center},dangerouslyUseHTMLString:{type:Boolean,default:pn.dangerouslyUseHTMLString},duration:{type:Number,default:pn.duration},icon:{type:Pt,default:pn.icon},id:{type:String,default:pn.id},message:{type:te([String,Object,Function]),default:pn.message},onClose:{type:te(Function),required:!1},showClose:{type:Boolean,default:pn.showClose},type:{type:String,values:Sp,default:pn.type},offset:{type:Number,default:pn.offset},zIndex:{type:Number,default:pn.zIndex},grouping:{type:Boolean,default:pn.grouping},repeatNum:{type:Number,default:pn.repeatNum}}),nR={destroy:()=>!0},Pn=Kp([]),lR=e=>{const t=Pn.findIndex(a=>a.id===e),n=Pn[t];let l;return t>0&&(l=Pn[t-1]),{current:n,prev:l}},oR=e=>{const{prev:t}=lR(e);return t?t.vm.exposed.bottom.value:0},aR=(e,t)=>Pn.findIndex(l=>l.id===e)>0?20:t,sR=["id"],rR=["innerHTML"],iR=j({name:"ElMessage"}),uR=j({...iR,props:tR,emits:nR,setup(e,{expose:t}){const n=e,{Close:l}=Cr,{ns:a,zIndex:s}=Xa("message"),{currentZIndex:r,nextZIndex:i}=s,u=_(),c=_(!1),f=_(0);let d;const p=S(()=>n.type?n.type==="error"?"danger":n.type:"info"),m=S(()=>{const M=n.type;return{[a.bm("icon",M)]:M&&rl[M]}}),h=S(()=>n.icon||rl[n.type]||""),v=S(()=>oR(n.id)),g=S(()=>aR(n.id,n.offset)+v.value),y=S(()=>f.value+g.value),k=S(()=>({top:`${g.value}px`,zIndex:r.value}));function b(){n.duration!==0&&({stop:d}=_l(()=>{I()},n.duration))}function C(){d==null||d()}function I(){c.value=!1}function T({code:M}){M===Ae.esc&&I()}return ze(()=>{b(),i(),c.value=!0}),ue(()=>n.repeatNum,()=>{C(),b()}),Jt(document,"keydown",T),un(u,()=>{f.value=u.value.getBoundingClientRect().height}),t({visible:c,bottom:y,close:I}),(M,L)=>(w(),G(Wt,{name:o(a).b("fade"),onBeforeLeave:M.onClose,onAfterLeave:L[0]||(L[0]=A=>M.$emit("destroy")),persisted:""},{default:N(()=>[xe(R("div",{id:M.id,ref_key:"messageRef",ref:u,class:$([o(a).b(),{[o(a).m(M.type)]:M.type&&!M.icon},o(a).is("center",M.center),o(a).is("closable",M.showClose),M.customClass]),style:Re(o(k)),role:"alert",onMouseenter:C,onMouseleave:b},[M.repeatNum>1?(w(),G(o(Xc),{key:0,value:M.repeatNum,type:o(p),class:$(o(a).e("badge"))},null,8,["value","type","class"])):Z("v-if",!0),o(h)?(w(),G(o(Pe),{key:1,class:$([o(a).e("icon"),o(m)])},{default:N(()=>[(w(),G(rt(o(h))))]),_:1},8,["class"])):Z("v-if",!0),ie(M.$slots,"default",{},()=>[M.dangerouslyUseHTMLString?(w(),O(Ne,{key:1},[Z(" Caution here, message could've been compromised, never use user's input as message "),R("p",{class:$(o(a).e("content")),innerHTML:M.message},null,10,rR)],2112)):(w(),O("p",{key:0,class:$(o(a).e("content"))},ae(M.message),3))]),M.showClose?(w(),G(o(Pe),{key:2,class:$(o(a).e("closeBtn")),onClick:Fe(I,["stop"])},{default:N(()=>[E(o(l))]),_:1},8,["class","onClick"])):Z("v-if",!0)],46,sR),[[lt,c.value]])]),_:3},8,["name","onBeforeLeave"]))}});var cR=he(uR,[["__file","/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);let dR=1;const _p=e=>{const t=!e||ct(e)||zt(e)||kt(e)?{message:e}:e,n={...pn,...t};if(!n.appendTo)n.appendTo=document.body;else if(ct(n.appendTo)){let l=document.querySelector(n.appendTo);_n(l)||(l=document.body),n.appendTo=l}return n},fR=e=>{const t=Pn.indexOf(e);if(t===-1)return;Pn.splice(t,1);const{handler:n}=e;n.close()},pR=({appendTo:e,...t},n)=>{const l=`message_${dR++}`,a=t.onClose,s=document.createElement("div"),r={...t,id:l,onClose:()=>{a==null||a(),fR(f)},onDestroy:()=>{Gl(null,s)}},i=E(cR,r,kt(r.message)||zt(r.message)?{default:kt(r.message)?r.message:()=>r.message}:null);i.appContext=n||eo._context,Gl(i,s),e.appendChild(s.firstElementChild);const u=i.component,f={id:l,vnode:i,vm:u,handler:{close:()=>{u.exposed.visible.value=!1}},props:i.component.props};return f},eo=(e={},t)=>{if(!yt)return{close:()=>{}};if(He(Ts.max)&&Pn.length>=Ts.max)return{close:()=>{}};const n=_p(e);if(n.grouping&&Pn.length){const a=Pn.find(({vnode:s})=>{var r;return((r=s.props)==null?void 0:r.message)===n.message});if(a)return a.props.repeatNum+=1,a.props.type=n.type,a.handler}const l=pR(n,t);return Pn.push(l),l.handler};Sp.forEach(e=>{eo[e]=(t={},n)=>{const l=_p(t);return eo({...l,type:e},n)}});function vR(e){for(const t of Pn)(!e||e===t.props.type)&&t.handler.close()}eo.closeAll=vR;eo._context=null;const Ct=wc(eo,"$message"),mR=j({name:"ElMessageBox",directives:{TrapFocus:fb},components:{ElButton:tn,ElFocusTrap:Ja,ElInput:on,ElOverlay:Br,ElIcon:Pe,...Cr},inheritAttrs:!1,props:{buttonSize:{type:String,validator:Ua},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,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:l,ns:a,size:s}=Xa("message-box",S(()=>e.buttonSize)),{t:r}=n,{nextZIndex:i}=l,u=_(!1),c=St({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:i()}),f=S(()=>{const X=c.type;return{[a.bm("icon",X)]:X&&rl[X]}}),d=En(),p=En(),m=S(()=>c.icon||rl[c.type]||""),h=S(()=>!!c.message),v=_(),g=_(),y=_(),k=_(),b=_(),C=S(()=>c.confirmButtonClass);ue(()=>c.inputValue,async X=>{await Le(),e.boxType==="prompt"&&X!==null&&B()},{immediate:!0}),ue(()=>u.value,X=>{var K,V;X&&(e.boxType!=="prompt"&&(c.autofocus?y.value=(V=(K=b.value)==null?void 0:K.$el)!=null?V:v.value:y.value=v.value),c.zIndex=i()),e.boxType==="prompt"&&(X?Le().then(()=>{var W;k.value&&k.value.$el&&(c.autofocus?y.value=(W=F())!=null?W:v.value:y.value=v.value)}):(c.editorErrorMessage="",c.validateError=!1))});const I=S(()=>e.draggable);kc(v,g,I),ze(async()=>{await Le(),e.closeOnHashChange&&window.addEventListener("hashchange",T)}),Rt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",T)});function T(){u.value&&(u.value=!1,Le(()=>{c.action&&t("action",c.action)}))}const M=()=>{e.closeOnClickModal&&D(c.distinguishCancelAndClose?"close":"cancel")},L=Er(M),A=X=>{if(c.inputType!=="textarea")return X.preventDefault(),D("confirm")},D=X=>{var K;e.boxType==="prompt"&&X==="confirm"&&!B()||(c.action=X,c.beforeClose?(K=c.beforeClose)==null||K.call(c,X,c,T):T())},B=()=>{if(e.boxType==="prompt"){const X=c.inputPattern;if(X&&!X.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;const K=c.inputValidator;if(typeof K=="function"){const V=K(c.inputValue);if(V===!1)return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;if(typeof V=="string")return c.editorErrorMessage=V,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},F=()=>{const X=k.value.$refs;return X.input||X.textarea},x=()=>{D("close")},U=()=>{e.closeOnPressEscape&&x()};return e.lockScroll&&_c(u),{...Gt(c),ns:a,overlayEvent:L,visible:u,hasMessage:h,typeClass:f,contentId:d,inputId:p,btnSize:s,iconComponent:m,confirmButtonClasses:C,rootRef:v,focusStartRef:y,headerRef:g,inputRef:k,confirmRef:b,doClose:T,handleClose:x,onCloseRequested:U,handleWrapperClick:M,handleInputEnter:A,handleAction:D,t:r}}}),hR=["aria-label","aria-describedby"],gR=["aria-label"],yR=["id"];function bR(e,t,n,l,a,s){const r=ee("el-icon"),i=ee("close"),u=ee("el-input"),c=ee("el-button"),f=ee("el-focus-trap"),d=ee("el-overlay");return w(),G(Wt,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=p=>e.$emit("vanish")),persisted:""},{default:N(()=>[xe(E(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:N(()=>[R("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:$(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...p)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...p)),onMousedown:t[9]||(t[9]=(...p)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...p)),onMouseup:t[10]||(t[10]=(...p)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...p))},[E(f,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:N(()=>[R("div",{ref:"rootRef",class:$([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:Re(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Fe(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(w(),O("div",{key:0,ref:"headerRef",class:$(e.ns.e("header"))},[R("div",{class:$(e.ns.e("title"))},[e.iconComponent&&e.center?(w(),G(r,{key:0,class:$([e.ns.e("status"),e.typeClass])},{default:N(()=>[(w(),G(rt(e.iconComponent)))]),_:1},8,["class"])):Z("v-if",!0),R("span",null,ae(e.title),1)],2),e.showClose?(w(),O("button",{key:0,type:"button",class:$(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=p=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=pt(Fe(p=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[E(r,{class:$(e.ns.e("close"))},{default:N(()=>[E(i)]),_:1},8,["class"])],42,gR)):Z("v-if",!0)],2)):Z("v-if",!0),R("div",{id:e.contentId,class:$(e.ns.e("content"))},[R("div",{class:$(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(w(),G(r,{key:0,class:$([e.ns.e("status"),e.typeClass])},{default:N(()=>[(w(),G(rt(e.iconComponent)))]),_:1},8,["class"])):Z("v-if",!0),e.hasMessage?(w(),O("div",{key:1,class:$(e.ns.e("message"))},[ie(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(w(),G(rt(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(w(),G(rt(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:N(()=>[ye(ae(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):Z("v-if",!0)],2),xe(R("div",{class:$(e.ns.e("input"))},[E(u,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=p=>e.inputValue=p),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:$({invalid:e.validateError}),onKeydown:pt(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),R("div",{class:$(e.ns.e("errormsg")),style:Re({visibility:e.editorErrorMessage?"visible":"hidden"})},ae(e.editorErrorMessage),7)],2),[[lt,e.showInput]])],10,yR),R("div",{class:$(e.ns.e("btns"))},[e.showCancelButton?(w(),G(c,{key:0,loading:e.cancelButtonLoading,class:$([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=p=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=pt(Fe(p=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:N(()=>[ye(ae(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","class","round","size"])):Z("v-if",!0),xe(E(c,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:$([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=p=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=pt(Fe(p=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:N(()=>[ye(ae(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","class","round","disabled","size"]),[[lt,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,hR)]),_:3},8,["z-index","overlay-class","mask"]),[[lt,e.visible]])]),_:3})}var wR=he(mR,[["render",bR],["__file","/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]);const Ro=new Map,kR=e=>{let t=document.body;return e.appendTo&&(ct(e.appendTo)&&(t=document.querySelector(e.appendTo)),_n(e.appendTo)&&(t=e.appendTo),_n(t)||(t=document.body)),t},CR=(e,t,n=null)=>{const l=E(wR,e,kt(e.message)||zt(e.message)?{default:kt(e.message)?e.message:()=>e.message}:null);return l.appContext=n,Gl(l,t),kR(e).appendChild(t.firstElementChild),l.component},SR=()=>document.createElement("div"),_R=(e,t)=>{const n=SR();e.onVanish=()=>{Gl(null,n),Ro.delete(a)},e.onAction=s=>{const r=Ro.get(a);let i;e.showInput?i={value:a.inputValue,action:s}:i=s,e.callback?e.callback(i,l.proxy):s==="cancel"||s==="close"?e.distinguishCancelAndClose&&s!=="cancel"?r.reject("close"):r.reject("cancel"):r.resolve(i)};const l=CR(e,n,t),a=l.proxy;for(const s in e)nn(e,s)&&!nn(a.$props,s)&&(a[s]=e[s]);return a.visible=!0,a};function ro(e,t=null){if(!yt)return Promise.reject();let n;return ct(e)||zt(e)?e={message:e}:n=e.callback,new Promise((l,a)=>{const s=_R(e,t??ro._context);Ro.set(s,{options:e,callback:n,resolve:l,reject:a})})}const ER=["alert","confirm","prompt"],$R={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};ER.forEach(e=>{ro[e]=TR(e)});function TR(e){return(t,n,l,a)=>{let s="";return It(n)?(l=n,s=""):Yt(n)?s="":s=n,ro(Object.assign({title:s,message:t,type:"",...$R[e]},l,{boxType:e}),a)}}ro.close=()=>{Ro.forEach((e,t)=>{t.doClose()}),Ro.clear()};ro._context=null;const ll=ro;ll.install=e=>{ll._context=e._context,e.config.globalProperties.$msgbox=ll,e.config.globalProperties.$messageBox=ll,e.config.globalProperties.$alert=ll.alert,e.config.globalProperties.$confirm=ll.confirm,e.config.globalProperties.$prompt=ll.prompt};const Tl=ll,Ep=["success","info","warning","error"],IR=ge({customClass:{type:String,default:""},dangerouslyUseHTMLString:{type:Boolean,default:!1},duration:{type:Number,default:4500},icon:{type:Pt},id:{type:String,default:""},message:{type:te([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:te(Function),default:()=>{}},onClose:{type:te(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:[...Ep,""],default:""},zIndex:Number}),NR={destroy:()=>!0},PR=["id"],MR=["textContent"],LR={key:0},RR=["innerHTML"],OR=j({name:"ElNotification"}),AR=j({...OR,props:IR,emits:NR,setup(e,{expose:t}){const n=e,{ns:l,zIndex:a}=Xa("notification"),{nextZIndex:s,currentZIndex:r}=a,{Close:i}=yc,u=_(!1);let c;const f=S(()=>{const b=n.type;return b&&rl[n.type]?l.m(b):""}),d=S(()=>n.type&&rl[n.type]||n.icon),p=S(()=>n.position.endsWith("right")?"right":"left"),m=S(()=>n.position.startsWith("top")?"top":"bottom"),h=S(()=>{var b;return{[m.value]:`${n.offset}px`,zIndex:(b=n.zIndex)!=null?b:r.value}});function v(){n.duration>0&&({stop:c}=_l(()=>{u.value&&y()},n.duration))}function g(){c==null||c()}function y(){u.value=!1}function k({code:b}){b===Ae.delete||b===Ae.backspace?g():b===Ae.esc?u.value&&y():v()}return ze(()=>{v(),s(),u.value=!0}),Jt(document,"keydown",k),t({visible:u,close:y}),(b,C)=>(w(),G(Wt,{name:o(l).b("fade"),onBeforeLeave:b.onClose,onAfterLeave:C[1]||(C[1]=I=>b.$emit("destroy")),persisted:""},{default:N(()=>[xe(R("div",{id:b.id,class:$([o(l).b(),b.customClass,o(p)]),style:Re(o(h)),role:"alert",onMouseenter:g,onMouseleave:v,onClick:C[0]||(C[0]=(...I)=>b.onClick&&b.onClick(...I))},[o(d)?(w(),G(o(Pe),{key:0,class:$([o(l).e("icon"),o(f)])},{default:N(()=>[(w(),G(rt(o(d))))]),_:1},8,["class"])):Z("v-if",!0),R("div",{class:$(o(l).e("group"))},[R("h2",{class:$(o(l).e("title")),textContent:ae(b.title)},null,10,MR),xe(R("div",{class:$(o(l).e("content")),style:Re(b.title?void 0:{margin:0})},[ie(b.$slots,"default",{},()=>[b.dangerouslyUseHTMLString?(w(),O(Ne,{key:1},[Z(" Caution here, message could've been compromised, never use user's input as message "),R("p",{innerHTML:b.message},null,8,RR)],2112)):(w(),O("p",LR,ae(b.message),1))])],6),[[lt,b.message]]),b.showClose?(w(),G(o(Pe),{key:0,class:$(o(l).e("closeBtn")),onClick:Fe(y,["stop"])},{default:N(()=>[E(o(i))]),_:1},8,["class","onClick"])):Z("v-if",!0)],2)],46,PR),[[lt,u.value]])]),_:3},8,["name","onBeforeLeave"]))}});var VR=he(AR,[["__file","/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);const Va={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},ir=16;let DR=1;const to=function(e={},t=null){if(!yt)return{close:()=>{}};(typeof e=="string"||zt(e))&&(e={message:e});const n=e.position||"top-right";let l=e.offset||0;Va[n].forEach(({vm:f})=>{var d;l+=(((d=f.el)==null?void 0:d.offsetHeight)||0)+ir}),l+=ir;const a=`notification_${DR++}`,s=e.onClose,r={...e,offset:l,id:a,onClose:()=>{BR(a,n,s)}};let i=document.body;_n(e.appendTo)?i=e.appendTo:ct(e.appendTo)&&(i=document.querySelector(e.appendTo)),_n(i)||(i=document.body);const u=document.createElement("div"),c=E(VR,r,zt(r.message)?{default:()=>r.message}:null);return c.appContext=t??to._context,c.props.onDestroy=()=>{Gl(null,u)},Gl(c,u),Va[n].push({vm:c}),i.appendChild(u.firstElementChild),{close:()=>{c.component.exposed.visible.value=!1}}};Ep.forEach(e=>{to[e]=(t={})=>((typeof t=="string"||zt(t))&&(t={message:t}),to({...t,type:e}))});function BR(e,t,n){const l=Va[t],a=l.findIndex(({vm:c})=>{var f;return((f=c.component)==null?void 0:f.props.id)===e});if(a===-1)return;const{vm:s}=l[a];if(!s)return;n==null||n(s);const r=s.el.offsetHeight,i=t.split("-")[0];l.splice(a,1);const u=l.length;if(!(u<1))for(let c=a;c<u;c++){const{el:f,component:d}=l[c].vm,p=Number.parseInt(f.style[i],10)-r-ir;d.props.offset=p}}function xR(){for(const e of Object.values(Va))e.forEach(({vm:t})=>{t.component.exposed.visible.value=!1})}to.closeAll=xR;to._context=null;const FR=wc(to,"$notify");var zR=[YL,eR,Ct,Tl,FR,pf],HR=ih([...HL,...zR]);var KR={name:"zh-cn",el:{colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"}}};const dl=Ha("wikiDisplay",{state:()=>({viewMenuWidth:300,commentShow:!0,commentActiveTab:"comment",showMenu:!0,rightAsideWidth:300,showHeader:!0,currentPage:""})}),ft=Ka.create({baseURL:"./",timeout:1e4,headers:{"Content-type":"application/x-www-form-urlencoded"},withCredentials:!0}),WR={"/iailab-doc-db/executor/execute":!0};ft.interceptors.request.use(e=>(e.needValidateResult=!0,WR[e.url]&&(e.needValidateResult=!1),e),e=>(console.log(e),Promise.reject(e)));let Du=new Date().getTime();ft.interceptors.response.use(e=>{if(e.message)Ct.error("请求错误:"+e.message);else{if(!e.config.needValidateResult||e.data.errCode===200)return e.data;if(e.data.errCode===400){new Date().getTime()-Du>2e3&&(Ct.warning("请先登录"),Du=new Date().getTime()),Ct.warning("请先登录");let t=encodeURIComponent(window.location.href);window.location="/user/login?redirect="+t}else if(e.data.errCode!==200){Ct.error(e.data.errMsg||"未知错误");let t=encodeURIComponent(window.location.href);window.location="/user/login?redirect="+t}}return Promise.reject("请求错误")},e=>(Ct.info("请求错误:"+e.message),Promise.reject(e)));const ut={pageUpdate:e=>ft({url:"/iailab-doc-wiki/page/update",method:"post",data:mt.stringify(e)}),pageChangeParent:e=>ft({url:"/iailab-doc-wiki/page/changeParent",method:"post",data:mt.stringify(e)}),pageList:e=>ft({url:"/iailab-doc-wiki/page/list",method:"post",data:mt.stringify(e)}),updatePage:e=>ft({url:"/iailab-doc-wiki/page/update",method:"post",data:mt.stringify(e)}),copyPage:e=>ft({url:"/iailab-doc-wiki/page/copy",method:"post",data:mt.stringify(e)}),movePage:e=>ft({url:"/iailab-doc-wiki/page/move",method:"post",data:mt.stringify(e)}),renamePage:e=>ft({url:"/iailab-doc-wiki/page/rename",method:"post",data:mt.stringify(e)}),pageDetail:e=>ft({url:"/iailab-doc-wiki/page/detail",method:"post",data:mt.stringify(e)}),pageDelete:e=>ft({url:"/iailab-doc-wiki/page/delete",method:"post",data:mt.stringify(e)}),pageHistoryList:e=>ft({url:"/iailab-doc-wiki/page/history/list",method:"post",data:mt.stringify(e)}),pageHistoryDetail:e=>ft({url:"/iailab-doc-wiki/page/history/detail",method:"post",data:mt.stringify(e)}),pageNews:e=>ft({url:"/iailab-doc-wiki/page/news",method:"post",data:mt.stringify(e)}),pageSearchByEs:e=>ft({url:"/iailab-doc-wiki/page/searchByEs",method:"post",data:mt.stringify(e)}),pageLock:e=>ft({url:"/iailab-doc-wiki/page/lock",method:"post",data:mt.stringify(e)}),pageUnlock:e=>ft({url:"/iailab-doc-wiki/page/unlock",method:"post",data:mt.stringify(e)}),spaceFavoriteUpdate:e=>ft({url:"/iailab-doc-wiki/space/favorite/update",method:"post",data:mt.stringify(e)}),spaceAuthAssign:e=>ft({url:"/iailab-doc-wiki/space/auth/assign",method:"post",data:mt.stringify(e)}),spaceAuthList:e=>ft({url:"/iailab-doc-wiki/space/auth/list",method:"post",data:mt.stringify(e)}),spaceSettingList:e=>ft({url:"/iailab-doc-wiki/space/setting/list",method:"post",data:mt.stringify(e)}),spaceSettingUpdate:e=>ft({url:"/iailab-doc-wiki/space/setting/update",method:"post",data:mt.stringify(e)}),spaceList:e=>ft({url:"/iailab-doc-wiki/space/list",method:"post",data:mt.stringify(e)}),updateSpace:e=>ft({url:"/iailab-doc-wiki/space/update",method:"post",data:mt.stringify(e)}),getPageUserAuthList:e=>ft({url:"/iailab-doc-wiki/page/auth/list",method:"post",data:mt.stringify(e)}),assignPageUserAuth:e=>ft({url:"/iailab-doc-wiki/page/auth/assign",method:"post",data:mt.stringify(e)}),deletePageFile:e=>ft({url:"/iailab-doc-wiki/page/file/delete",method:"post",data:mt.stringify(e)}),pageCommentList:e=>ft({url:"/iailab-doc-wiki/page/comment/list",method:"post",data:mt.stringify(e)}),updatePageComment:e=>ft({url:"/iailab-doc-wiki/page/comment/update",method:"post",data:mt.stringify(e)}),deletePageComment:e=>ft({url:"/iailab-doc-wiki/page/comment/delete",method:"post",data:mt.stringify(e)}),pageZanList:e=>ft({url:"/iailab-doc-wiki/page/zan/list",method:"post",data:mt.stringify(e)}),updatePageZan:e=>ft({url:"/iailab-doc-wiki/page/zan/update",method:"post",data:mt.stringify(e)}),openPageDetail:e=>ft({url:"/iailab-doc-wiki/open-api/page/detail",method:"post",data:mt.stringify(e)}),openPageList:e=>ft({url:"/iailab-doc-wiki/open-api/page/list",method:"post",data:mt.stringify(e)}),openSpaceInfo:e=>ft({url:"/iailab-doc-wiki/open-api/space/info",method:"post",data:mt.stringify(e)}),openPageNews:e=>ft({url:"/iailab-doc-wiki/open-api/page/news",method:"post",data:mt.stringify(e)}),addTemplate:e=>ft({url:"/iailab-doc-wiki/template/add",method:"post",data:mt.stringify(e)}),getTemplate:e=>ft({url:"/iailab-doc-wiki/template/filterAll",method:"post",data:mt.stringify(e,{arrayFormat:"indices",allowDots:!0})}),useTemplate:e=>ft({url:"/iailab-doc-wiki/template/use",method:"post",data:mt.stringify(e)}),getTags:e=>ft({url:"/iailab-doc-wiki/template/allTags",method:"post",data:mt.stringify(e)}),xxxxxxxxxxxx:e=>ft({url:"update",method:"post",data:mt.stringify(e)})};const UR={class:"create-space-vue"},jR=R("span",{style:{float:"left"}},"公共空间",-1),qR=R("span",{style:{float:"right",color:"#8492a6","font-size":"13px"}},"属于公共,登录用户可访问、编辑",-1),GR=R("span",{style:{float:"left"}},"个人空间",-1),YR=R("span",{style:{float:"right",color:"#8492a6","font-size":"13px"}},"属于个人,所有登录用户可访问",-1),XR=R("span",{style:{float:"left"}},"隐私空间",-1),ZR=R("span",{style:{float:"right",color:"#8492a6","font-size":"13px"}},"属于个人,仅创建者可访问",-1),$p={__name:"CreateSpace",emits:["success"],setup(e,{expose:t,emit:n}){let l=_(""),a=_({name:[{required:!0,message:"请输入空间名",trigger:"blur"},{min:2,max:25,message:"长度在 2 到 25 个字符",trigger:"blur"}]}),s=_({id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1}),r=_(!1);_(!1);const i=d=>{s.value={id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1},l.value=d||"",l.value&&ut.spaceList({id:l.value}).then(p=>{let m=p.data||[];m.length>0&&(s.value=m[0])}),r.value=!0};let u=_();const c=()=>{u.value.validate(d=>{if(d){let p={id:s.value.id,name:s.value.name,type:s.value.type,openDoc:s.value.openDoc,spaceExplain:s.value.spaceExplain,treeLazyLoad:s.value.treeLazyLoad};ut.updateSpace(p).then(m=>{Ct.success("创建成功"),r.value=!1,n("success",m.data.id)})}})},f=()=>{r.value=!1};return t({show:i}),(d,p)=>{const m=ee("el-input"),h=ee("el-form-item"),v=ee("el-switch"),g=ee("el-option"),y=ee("el-select"),k=ee("el-button"),b=ee("el-form"),C=ee("el-dialog");return w(),O("div",UR,[E(C,{title:"创建空间",modelValue:o(r),"onUpdate:modelValue":p[4]||(p[4]=I=>bt(r)?r.value=I:r=I),width:"600px","close-on-click-modal":!1},{default:N(()=>[E(b,{"label-width":"100px",model:o(s),rules:o(a),ref_key:"newSpaceFormRef",ref:u},{default:N(()=>[E(h,{label:"空间名:",prop:"name"},{default:N(()=>[E(m,{modelValue:o(s).name,"onUpdate:modelValue":p[0]||(p[0]=I=>o(s).name=I)},null,8,["modelValue"])]),_:1}),E(h,{label:"空间描述:",prop:"spaceExplain"},{default:N(()=>[E(m,{modelValue:o(s).spaceExplain,"onUpdate:modelValue":p[1]||(p[1]=I=>o(s).spaceExplain=I)},null,8,["modelValue"])]),_:1}),E(h,{label:"空间开放:"},{default:N(()=>[E(v,{modelValue:o(s).openDoc,"onUpdate:modelValue":p[2]||(p[2]=I=>o(s).openDoc=I),"inactive-text":"需要登录","inactive-value":0,"active-text":"开放访问","active-value":1},null,8,["modelValue"])]),_:1}),E(h,{label:"空间类型:"},{default:N(()=>[E(y,{modelValue:o(s).type,"onUpdate:modelValue":p[3]||(p[3]=I=>o(s).type=I),filterable:"",placeholder:"选择类型",style:{width:"100%"}},{default:N(()=>[(w(),G(g,{key:1,label:"公共空间",value:1},{default:N(()=>[jR,qR]),_:1})),(w(),G(g,{key:2,label:"个人空间",value:2},{default:N(()=>[GR,YR]),_:1})),(w(),G(g,{key:3,label:"隐私空间",value:3},{default:N(()=>[XR,ZR]),_:1}))]),_:1},8,["modelValue"])]),_:1}),E(h,null,{default:N(()=>[o(s).id>0?(w(),G(k,{key:0,type:"primary",onClick:c},{default:N(()=>[ye("保存修改")]),_:1})):(w(),G(k,{key:1,type:"primary",onClick:c},{default:N(()=>[ye("立即创建")]),_:1})),E(k,{onClick:f},{default:N(()=>[ye("取消")]),_:1})]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}};const JR=R("br",null,null,-1),QR=R("br",null,null,-1),eO=["innerHTML"],tO=["innerHTML"],nO={__name:"TemplateManage",props:{pageId:Number,spaceId:Number},emits:"doGetPageList",setup(e,{expose:t,emit:n}){const l=e;let a=Ut(),s=_(1),r=_(0),i=_(!1),u=_({pageId:0,spaceId:0,tagName:"",shareStatus:!1}),c=_(!1);const f=P=>{i.value=P,u.value={pageId:l.pageId,spaceId:l.spaceId,tagName:"",shareStatus:!1},c.value=!0},d=P=>P===1?"公共模板":"个人模板",p=()=>{ut.addTemplate(u.value).then(P=>{Ct.success("模板记录成功"),n("doGetPageList",null)}),c.value=!1},m=()=>{c.value=!1};let h=_(!1),v=_(!1),g=_(!1),y=_([]),k=_([]),b=_(!1),C=_(""),I=_(),T=_(1);const M=()=>{h.value=!0,k.value=[{show:!0,tagName:""}],r.value=0,s.value=1,I.value=[],F()},L=P=>{ut.useTemplate({spaceId:l.spaceId,parentId:l.pageId,templateId:P.templateId}).then(H=>{h.value=!1,n("doGetPageList",null),Ct.success("创建成功"),a.push({path:"/page/edit",query:{parentId:l.pageId,pageId:H.data.id}})})},A=P=>{h.value=!1,a.push({path:"/page/show",query:{spaceId:P.spaceId,pageId:P.id}})},D=()=>{I.value=[],ut.getTemplate({name:C.value,open:b.value,tags:k.value,pageNum:s.value}).then(P=>{r.value=P.total||0,I.value=P.data||[]})},B=()=>{I.value=[],ut.getTemplate({name:C.value,open:b.value,tags:k.value}).then(P=>{r.value=P.total||0,I.value=P.data||[],s.value=1})},F=()=>{ut.getTags({open:b.value}).then(P=>{y.value=P.data||[],k.value=P.data||[],B()})},x=()=>{k.value=y.value.filter(P=>P.show),k.value.length===0&&(k.value=[""]),setTimeout(B(),200)},U=()=>{B()};let X=_(""),K=_(null);const V=P=>{T.value=P.editorType,P.editorType===1&&(X.value=P.content),P.editorType===2&&(X.value=lo.mavonEditor.getMarkdownIt().render(P.content)),setTimeout(W(),500),v.value=!0},W=()=>{const P=[];if(K.value!==void 0||K.value!=="")return;K.value.querySelectorAll("img").forEach((Y,z)=>{P.push(Y.src),Y.onclick=()=>{previewInitialIndex.value=z,showImagePreviewList.value=P,showImagePreview.value=!0}})};return t({showTemplateCreate:f,showTemplateManage:M}),(P,H)=>{const Y=ee("el-input"),z=ee("el-form-item"),q=ee("el-switch"),se=ee("el-button"),pe=ee("el-form"),oe=ee("el-dialog"),re=ee("a-divider"),Q=ee("a-checkable-tag"),ve=ee("a-tag"),_e=ee("el-tooltip"),Te=ee("a-card"),Ie=ee("a-list-item"),Ke=ee("a-list"),Ge=ee("a-pagination"),qe=ee("a-modal"),it=ee("el-row"),ke=Sl("highlight");return w(),O(Ne,null,[E(oe,{title:"设置为模板",modelValue:o(c),"onUpdate:modelValue":H[2]||(H[2]=Ee=>bt(c)?c.value=Ee:c=Ee),width:"600px","close-on-click-modal":!1},{default:N(()=>[E(pe,{"label-width":"100px",model:o(u)},{default:N(()=>[E(z,{label:"模板标签"},{default:N(()=>[E(Y,{modelValue:o(u).tagName,"onUpdate:modelValue":H[0]||(H[0]=Ee=>o(u).tagName=Ee)},null,8,["modelValue"])]),_:1}),E(z,{label:"是否公开"},{default:N(()=>[E(q,{modelValue:o(u).shareStatus,"onUpdate:modelValue":H[1]||(H[1]=Ee=>o(u).shareStatus=Ee),"inactive-text":"个人模板","inactive-value":0,"active-text":"公共模板","active-value":1},null,8,["modelValue"])]),_:1}),E(z,null,{default:N(()=>[o(i)?(w(),G(se,{key:0,type:"primary",onClick:p},{default:N(()=>[ye("保存修改")]),_:1})):(w(),G(se,{key:1,type:"primary",onClick:p},{default:N(()=>[ye("立即创建")]),_:1})),E(se,{onClick:m},{default:N(()=>[ye("取消")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),E(qe,{open:o(h),"onUpdate:open":H[6]||(H[6]=Ee=>bt(h)?h.value=Ee:h=Ee),title:"模板库",width:"100%",wrapClassName:"full-modal","confirm-loading":o(g),destroyOnClose:!0,closable:!0},{footer:N(()=>[]),default:N(()=>[R("div",null,[E(q,{modelValue:o(b),"onUpdate:modelValue":H[3]||(H[3]=Ee=>bt(b)?b.value=Ee:b=Ee),"inactive-text":"个人模板","inactive-value":0,"active-text":"公共模板","active-value":1,onChange:F},null,8,["modelValue"]),E(re,{type:"vertical"}),E(Y,{modelValue:o(C),"onUpdate:modelValue":H[4]||(H[4]=Ee=>bt(C)?C.value=Ee:C=Ee),style:{width:"30%"},onChange:U},null,8,["modelValue"])]),E(re,null,{default:N(()=>[ye("模板标签")]),_:1}),(w(!0),O(Ne,null,Ze(o(y),Ee=>(w(),G(Q,{onClick:Be=>x(Ee.tagName,Ee.show),checked:Ee.show,"onUpdate:checked":Be=>Ee.show=Be,style:{margin:"5px"},size:"big"},{default:N(()=>[ye(ae(Ee.tagName),1)]),_:2},1032,["onClick","checked","onUpdate:checked"]))),256)),E(re),E(Ke,{grid:{gutter:1,column:4,xs:1,sm:1,md:2,lg:2,xl:4,xxl:4},"data-source":o(I)},{renderItem:N(({item:Ee})=>[E(Ie,null,{default:N(()=>[E(Te,{title:Ee.name},{actions:N(()=>[E(_e,{effect:"dark",content:"转到原文档",placement:"top"},{default:N(()=>[E(o(Lv),{onClick:Be=>A(Ee)},null,8,["onClick"])]),_:2},1024),E(_e,{effect:"dark",content:"预览模板",placement:"top"},{default:N(()=>[E(o(Rv),{onClick:Be=>V(Ee)},null,8,["onClick"])]),_:2},1024),E(_e,{effect:"dark",content:"使用模板",placement:"top"},{default:N(()=>[E(o(Ov),{onClick:Be=>L(Ee)},null,8,["onClick"])]),_:2},1024)]),default:N(()=>[E(ve,{color:"#f50"},{default:N(()=>[ye(ae(d(Ee.shareStatus)),1)]),_:2},1024),E(ve,{color:"#87d068"},{default:N(()=>[ye(ae(Ee.tags),1)]),_:2},1024),JR,ye(" "+ae(Ee.createUserName)+" ",1),QR,ye(" "+ae(Ee.createTime)+" ",1)]),_:2},1032,["title"])]),_:2},1024)]),_:1},8,["data-source"]),E(Ge,{simple:"",current:o(s),"onUpdate:current":H[5]||(H[5]=Ee=>bt(s)?s.value=Ee:s=Ee),total:o(r),style:{float:"right"},"page-size":8,"hide-on-single-page":!0,onChange:D},null,8,["current","total"])]),_:1},8,["open","confirm-loading"]),E(qe,{open:o(v),"onUpdate:open":H[7]||(H[7]=Ee=>bt(v)?v.value=Ee:v=Ee),title:"模板预览",width:"100%",wrapClassName:"full-modal",destroyOnClose:!0,closable:!0},{footer:N(()=>[]),default:N(()=>[E(it,null,{default:N(()=>[R("div",{ref_key:"pageContentRef",ref:K,class:"wiki-page-content"},[o(T).value===2?xe((w(),O("div",{key:0,innerHTML:o(X),class:"markdown-body"},null,8,eO)),[[ke]]):(w(),O("div",{key:1,innerHTML:o(X),class:"wang-editor-body"},null,8,tO))],512)]),_:1})]),_:1},8,["open"])],64)}}},lO={class:"i-icon"},oO={viewBox:"0 0 1024 1024",width:"1em",height:"1em"},aO=["fill"],Tp={__name:"IconDocument",props:{fill:{type:String,default:"#515151"}},setup(e){return(t,n)=>(w(),O("span",lO,[(w(),O("svg",oO,[R("path",{fill:e.fill,d:"M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"},null,8,aO)]))]))}};const Bu={__name:"AddMenu",props:{choiceSpace:Number,choosePageId:Number,nowPageId:Number,funcId:Number},emits:["choosePageIdFunc","doGetPageList","createWikiByTemplate"],setup(e,{emit:t}){const n=e;let l=Ut(),a=_(".//iailab-doc-wiki/page/file/import/upload"),s=_([]);const r=f=>{let d=new FormData;d.append("files",f.file),d.append("pageId",n.choosePageId),n.choosePageId===0&&d.append("id",n.choiceSpace),Ka({url:a.value,method:"post",data:d,headers:{"Content-Type":"multipart/form-data"},timeout:1e4,withCredentials:!0}).then(p=>{s.value=[],p.data.errCode===200&&Ct.success("导入成功"),p.data.errCode===300&&(Ct.warning(p.data.errMsg),Ct.warning("文件太多可能超时,如果是超时,请稍等后刷新查看列表~")),t("doGetPageList",null)}).catch(p=>{s.value=[],t("doGetPageList",null),Ct.error("导入失败:"+p.message)})},i=f=>{t("choosePageIdFunc",f)},u=f=>{t("createWikiByTemplate",f)},c=(f,d)=>{if(n.choiceSpace>0){let p="新建文档";f===0&&(p="新建文件夹"),ut.updatePage({spaceId:n.choiceSpace,parentId:d,editorType:f,name:p,content:"",preview:""}).then(m=>{t("doGetPageList",null),Ct.success("创建成功"),f!==0&&l.push({path:"/page/edit",query:{parentId:n.nowPageId.value,pageId:m.data.id}})})}else Ct.warning("请先选择或创建空间")};return(f,d)=>{const p=ee("el-button"),m=ee("a-menu-item"),h=ee("a-upload"),v=ee("el-tooltip"),g=ee("a-menu"),y=ee("a-dropdown");return w(),G(y,{trigger:["click"],onClick:d[5]||(d[5]=k=>i(o(n).funcId))},{overlay:N(()=>[E(g,null,{default:N(()=>[E(m,{key:"1",onClick:d[0]||(d[0]=k=>c(1,o(n).funcId))},{default:N(()=>[E(o(oc),{fill:"#498ba7"}),ye(" 创建富文本 ")]),_:1}),E(m,{key:"2",onClick:d[1]||(d[1]=k=>c(2,o(n).funcId))},{default:N(()=>[E(Tp,{fill:"#558ff2"}),ye(" 创建Markdown ")]),_:1}),E(m,{key:"0",onClick:d[2]||(d[2]=k=>c(0,o(n).funcId))},{default:N(()=>[E(o(ac),{fill:"#ffd149"}),ye(" 创建文件夹 ")]),_:1}),E(m,{key:"4",onClick:d[3]||(d[3]=k=>u(o(n).funcId))},{default:N(()=>[E(o(sc)),ye(" 从模板创建 ")]),_:1}),E(m,{key:"3"},{default:N(()=>[E(v,{content:"支持MD,ZIP格式(图片和MD文件请放到同级目录并配置同级相对路径)",placement:"right-start","show-after":300},{default:N(()=>[E(h,{"file-list":o(s),"onUpdate:fileList":d[4]||(d[4]=k=>bt(s)?s.value=k:s=k),name:"file",multiple:!1,customRequest:r,class:"import-upload"},{default:N(()=>[E(o(Av)),ye(" 导入 ")]),_:1},8,["file-list"])]),_:1})]),_:1})]),_:1})]),default:N(()=>[E(p,{icon:o(za),text:"",class:"add-menu-dropdown-btn"},null,8,["icon"])]),_:1})}}},yn=Ha("pageData",{state:()=>({pageInfo:{},pageAuth:{},fileList:[],choosePageId:0,optionPageId:0,wikiPageList:[],pageIsUnLock:!1})}),sO={style:{padding:"10px",height:"100%","box-sizing":"border-box",background:"#fafafa"}},rO={style:{"margin-bottom":"5px"}},iO={class:"search-option-item"},uO={class:"title"},cO=["innerHTML"],dO=["innerHTML"],fO={key:1,class:"space-folder-box"},pO={class:"wiki-page-tree-box"},xu={__name:"LeftSidebarCli",props:{wikiPageList:Array,spaceOptions:Array,nowPageId:Number,choiceSpace:Number,readOnly:Boolean},emits:["doGetPageList","spaceChangeEvents","setNowPageId"],setup(e,{expose:t,emit:n}){const l=e;let a=_(""),s=_("点击收起目录"),r=_(!1),i=_("el-tree"),u=_([]);dn();let c=Ut(),f=_({children:"children",label:"name"});_({});let d=_(),p=dl();const m=I=>{n("spaceChangeEvents",I,l.readOnly)},h=(I,T)=>{if(!I||!I.trim()){T([]);return}ut.pageNews({spaceId:l.choiceSpace,keywords:I}).then(M=>{let L=M.data||[];T(L)})},v=I=>{a.value="",c.push({path:"/page/show",query:{pageId:I.pageId}})},g=()=>{r.value?(i.value="el-tree",s.value="点击收起目录",r.value=!1):(i.value="hidTree",s.value="点击展开目录",r.value=!0)},y=(I,T)=>!I||!T.name?!0:T.name.toLowerCase().indexOf(I.toLowerCase())!==-1,k=()=>{d.value.filter(a.value)};yn();const b=I=>{p.showHeader=!0,n("setNowPageId",I.id,l.readOnly),!l.readOnly&&I.editorType!==0&&c.push({path:"/page/show",query:{pageId:I.id}})},C=(I,T,M,L)=>{console.log("tree drop: ",I.data,T.data,M);var A={id:I.data.id,parentId:T.data.parentId};M=="inner"?A.parentId=T.data.id:M=="before"?A.beforeSeq=T.data.seqNo:M=="after"&&(A.afterSeq=T.data.seqNo),ut.pageChangeParent(A).then(D=>{n("doGetPageList",node.id,node)})};return t({searchByKeywords:k}),(I,T)=>{const M=ee("el-option"),L=ee("el-option-group"),A=ee("el-select"),D=ee("el-autocomplete"),B=ee("el-tooltip"),F=ee("el-col"),x=ee("el-row"),U=ee("el-tree");return w(),O("div",sO,[R("div",rO,[E(A,{"model-value":e.choiceSpace,filterable:"",placeholder:"选择空间",onChange:m,style:{width:"100%"}},{default:N(()=>[o(l).readOnly?Z("",!0):(w(),G(L,{key:0,label:""},{default:N(()=>[(w(),G(M,{key:-1,label:"空间管理",value:-1}))]),_:1})),E(L,{label:""}),(w(!0),O(Ne,null,Ze(e.spaceOptions,X=>(w(),G(M,{key:X.value,label:X.label,value:X.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])]),o(l).readOnly?Z("",!0):(w(),G(D,{key:0,modelValue:o(a),"onUpdate:modelValue":T[0]||(T[0]=X=>bt(a)?a.value=X:a=X),"fetch-suggestions":h,placeholder:"在当前空间搜索","popper-class":"search-autocomplete",style:{width:"100%",margin:"10px 0"},onSelect:v},{default:N(({item:X})=>[R("div",iO,[R("div",uO,[R("span",{innerHTML:X.pageTitle||"-"},null,8,cO)]),R("span",{class:"content",innerHTML:X.previewContent||"-"},null,8,dO)])]),_:1},8,["modelValue"])),o(l).readOnly?Z("",!0):(w(),O("div",fO,[E(x,{justify:"space-between"},{default:N(()=>[E(F,{span:12},{default:N(()=>[E(B,{style:{margin:"4px"},effect:"dark",content:o(s),placement:"top"},{default:N(()=>[R("span",{style:{color:"#888","font-size":"12px",cursor:"pointer","line-height":"32px"},onClick:g},"空间目录")]),_:1},8,["content"])]),_:1}),E(F,{span:12,style:{"text-align":"right"}},{default:N(()=>[ie(I.$slots,"addMenuDir")]),_:3})]),_:3})])),R("div",pO,[E(U,{class:$(o(i)),ref_key:"wikiPageTreeRef",ref:d,"current-node-key":o(l).nowPageId,data:o(l).wikiPageList,"default-expanded-keys":o(u),"expand-on-click-node":!0,"filter-node-method":y,props:o(f),draggable:!o(l).readOnly,"highlight-current":"","node-key":"id",style:{"background-color":"#fafafa"},onNodeClick:b,onNodeDrop:C},xn({_:2},[o(l).readOnly?void 0:{name:"default",fn:N(({node:X,data:K})=>[ie(I.$slots,"addMenuNode",{node:X,data:K})]),key:"0"}]),1032,["class","current-node-key","data","default-expanded-keys","props","draggable"])])])}}},zo=Ha("spaceData",{state:()=>({spaceInfo:{},chooseSpaceId:1,spaceOptions:[],spaceList:[]})});const vO=["onMouseover"],mO={class:"node-content"},hO={class:"left-icon"},gO={key:2,style:{"vertical-align":"middle","margin-right":"5px"}},yO={__name:"LeftSidebar",setup(e,{expose:t}){let n=dn(),l=Ut(),a=yn();dl();let s=zo(),r=_({}),i=_(0),u=_(0),c=_([]);_({}),_([]),_(300);let f=_(""),d=_(!1),p=_(!1),m=_(!1),h=_(null);ze(()=>{v()});const v=()=>{U()},g=K=>{h.value.showTemplateCreate(K)},y=()=>{h.value.showTemplateManage()},k=K=>K===1?"公共模板":"个人模板",b=K=>{p.value=K,d.value=!0,i.value=a.choosePageId,u.value=s.chooseSpaceId,c.value=a.wikiPageList},C=K=>{if(m.value=!0,p.value){ut.movePage({id:a.optionPageId,spaceId:s.chooseSpaceId,moveToPageId:i.value,moveToSpaceId:u.value}).then(V=>{X(),Ct.success("迁移成功"),I(),m.value=!1}).catch(V=>{m.value=!1});return}ut.copyPage({id:a.optionPageId,spaceId:s.chooseSpaceId,moveToPageId:i.value,moveToSpaceId:u.value}).then(V=>{X(),Ct.success("复制成功"),I(),m.value=!1}).catch(V=>{m.value=!1})},I=()=>{d.value=!1,i.value=0,u.value=0,c.value=[]},T=K=>{let V="确定要删除此页面及其所有子页面吗?";K!==void 0&&(V="选中的页面是:"+k(K)+"删除后无法使用此模板! 确定要删除此页面及其所有子页面吗?"),Tl.confirm(V,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{let W={pageId:f.value};ut.pageDelete(W).then(()=>{Ct.success("已删除"),X()})}).catch(()=>{})},M=K=>{a.optionPageId=K},L=(K,V)=>{if(V){i.value=K;return}a.choosePageId=K},A=(K,V)=>{V.renaming=!0},D=(K,V)=>{ut.renamePage({id:V.id,name:V.name}).then(W=>{X(),Ct.success("重命名成功"),V.renaming=!1})},B=K=>{f.value=K.id};let F=_();const x=(K,V)=>{if(a.pageInfo={},V){u.value=K,L(0,V);let W={spaceId:u.value};ut.pageList(W).then(P=>{c.value=P.data||[]});return}K===0?F.value.show():K===-1?l.push({path:"/space/manage"}):(a.choosePageId=0,s.chooseSpaceId=Number(K),r.value=s.spaceList.find(W=>W.id===K),s.spaceInfo=r.value,X(),l.push({path:"/home",query:{spaceId:K}}))},U=K=>{ut.spaceList({}).then(V=>{s.spaceList=V.data||[];let W=[];if(s.spaceList.forEach(P=>W.push({label:P.name,value:P.id})),s.spaceOptions=W,s.spaceList.length>0){let P=K,H=s.spaceList.find(Y=>Y.id===K);H||(H=s.spaceList[0],P=H.id),r.value=H,s.spaceInfo=H,s.chooseSpaceId=P,a.choosePageId=0,X();try{n.path==="/home"&&l.push({path:"/home",query:{spaceId:P}})}catch(Y){console.log(Y)}}})},X=(K,V)=>{let W={spaceId:s.chooseSpaceId};ut.pageList(W).then(P=>{a.wikiPageList=P.data||[]})};return t({init:v}),(K,V)=>{const W=ee("a-tag"),P=ee("el-tooltip"),H=ee("a-input"),Y=ee("el-button"),z=ee("a-menu-item"),q=ee("a-sub-menu"),se=ee("a-menu"),pe=ee("a-dropdown"),oe=ee("a-modal");return w(),O(Ne,null,[E(xu,{readOnly:!1,wikiPageList:o(a).wikiPageList,spaceOptions:o(s).spaceOptions,nowPageId:o(a).choosePageId,choiceSpace:o(s).chooseSpaceId,onSetNowPageId:L,onDoGetPageList:X,onSpaceChangeEvents:x},{addMenuDir:N(()=>[E(Bu,{choiceSpace:o(s).chooseSpaceId,choosePageId:o(a).optionPageId,nowPageId:o(a).choosePageId,funcId:0,onCreateWikiByTemplate:y,onChoosePageIdFunc:M,onDoGetPageList:X},null,8,["choiceSpace","choosePageId","nowPageId"])]),addMenuNode:N(({node:re,data:Q})=>[R("div",{class:"page-tree-node",onMouseover:ve=>B(Q)},[R("div",mO,[R("span",hO,[Q.editorType===0?(w(),O(Ne,{key:0},[re.expanded?(w(),G(o(ac),{key:0,class:"el-icon"})):(w(),G(o(Vv),{key:1,class:"el-icon"}))],64)):Q.editorType===1?(w(),G(o(oc),{key:1,class:"el-icon"})):Q.editorType===2?(w(),G(Tp,{key:2,class:"el-icon"})):Z("",!0)]),Q.shareStatus!==void 0?(w(),G(P,{key:0,content:Q.tags,placement:"top-start","show-after":500},{default:N(()=>[E(W,{color:"warning",style:{"margin-inline-end":"4px","padding-inline":"4px"}},{default:N(()=>[ye(ae(k(Q.shareStatus)),1)]),_:2},1024)]),_:2},1032,["content"])):Z("",!0),Q.renaming?(w(),G(H,{key:1,value:Q.name,"onUpdate:value":ve=>Q.name=ve,class:"rename-input",placeholder:"请输入文档名称",onBlur:ve=>D(re,Q),onClick:V[0]||(V[0]=Fe(()=>{},["stop"]))},null,8,["value","onUpdate:value","onBlur"])):(w(),O("span",gO,[E(P,{content:re.label,placement:"top-start","show-after":700},{default:N(()=>[ye(ae(re.label),1)]),_:2},1032,["content"])])),R("div",{class:$(["page-action-box",Q.renaming?"renaming":""]),onClick:V[3]||(V[3]=Fe(()=>{},["stop"]))},[E(Bu,{choiceSpace:o(s).chooseSpaceId,choosePageId:o(a).optionPageId,nowPageId:o(a).choosePageId,funcId:Q.id,onCreateWikiByTemplate:y,onChoosePageIdFunc:M,onDoGetPageList:X},null,8,["choiceSpace","choosePageId","nowPageId","funcId"]),E(pe,{trigger:["click"],onClick:ve=>M(Q.id)},{overlay:N(()=>[E(se,null,{default:N(()=>[E(z,{onClick:ve=>A(re,Q)},{default:N(()=>[E(o(Dv),{class:"el-icon"}),ye(" 重命名 ")]),_:2},1032,["onClick"]),E(q,{title:"移动文档"},{icon:N(()=>[E(o(Bv))]),default:N(()=>[E(z,{onClick:V[1]||(V[1]=ve=>b(!1))},{default:N(()=>[E(o(xv)),ye(" 复制文档 ")]),_:1}),E(z,{onClick:V[2]||(V[2]=ve=>b(!0))},{default:N(()=>[E(o(Fv)),ye(" 迁移文档 ")]),_:1})]),_:1}),Q.editorType!==0?(w(),G(z,{key:0,onClick:ve=>g(Q.shareStatus!==void 0)},{default:N(()=>[E(o(sc)),ye(" 设为模板 ")]),_:2},1032,["onClick"])):Z("",!0),E(z,{onClick:ve=>T(Q.shareStatus)},{default:N(()=>[E(o(zv),{class:"el-icon"}),ye(" 删除 ")]),_:2},1032,["onClick"])]),_:2},1024)]),default:N(()=>[E(Y,{icon:o(Ca),text:"",class:"page-action-dropdown-btn"},null,8,["icon"])]),_:2},1032,["onClick"])],2)])],40,vO)]),_:1},8,["wikiPageList","spaceOptions","nowPageId","choiceSpace"]),E(nO,{ref_key:"templateManageRef",ref:h,pageId:o(a).optionPageId,spaceId:o(s).chooseSpaceId,onDoGetPageList:X},null,8,["pageId","spaceId"]),E($p,{ref_key:"createSpaceRef",ref:F,onSuccess:U},null,512),E(oe,{open:o(d),"onUpdate:open":V[4]||(V[4]=re=>bt(d)?d.value=re:d=re),title:"选择",onOk:C,onCancel:I,"ok-text":"确认","cancel-text":"取消","confirm-loading":o(m),destroyOnClose:!0,closable:!1},{default:N(()=>[E(xu,{readOnly:!0,wikiPageList:o(c),spaceOptions:o(s).spaceOptions,nowPageId:o(i),choiceSpace:o(u),onSetNowPageId:L,onDoGetPageList:X,onSpaceChangeEvents:x},null,8,["wikiPageList","spaceOptions","nowPageId","choiceSpace"])]),_:1},8,["open","confirm-loading"])],64)}}},fi=Ha("userData",{state:()=>({userInfo:{}})}),Yn={userLogin:e=>ft({url:"/login",method:"post",data:mt.stringify(e)}),ssoLoginPasswordCallback:e=>ft({url:"/ssoLoginPasswordCallback",method:"post",data:mt.stringify(e)}),userLogout:()=>ft({url:"/logout",method:"post",data:mt.stringify({})}),getSelfUserInfo:()=>ft({url:"/user/info/selfInfo",method:"post",data:mt.stringify({})}),getUserBaseInfo:e=>ft({url:"/iailab-doc-wiki/common/user/base",method:"post",data:mt.stringify(e)}),userGroupList:e=>ft({url:"/user/group/list",method:"post",data:mt.stringify(e)}),getUserMessageList:e=>ft({url:"/user/message/list",method:"post",data:mt.stringify(e)}),readUserMessage:e=>ft({url:"/user/message/read",method:"post",data:mt.stringify(e)}),deleteUserMessage:e=>ft({url:"/user/message/delete",method:"post",data:mt.stringify(e)})};const bO={__name:"PageAuthDialog",props:{visible:Boolean,data:Object},emits:["update:visible","ok"],setup(e,{emit:t}){const n=e;let l=yn(),a=_(!1);ue(a,()=>{t("update:visible",a.value)}),ue(()=>n.visible,()=>{a.value=n.visible,c()}),ze(()=>{a.value=n.visible,c()});let s=_([]),r=_([]),i=_(),u=_(!1);const c=()=>{if(!a.value)return;i.value="",s.value=[];let v={pageId:l.pageInfo.id};ut.getPageUserAuthList(v).then(g=>{s.value=g.data||[]})},f=()=>{if(!i.value){Ct.warning("请先选择用户");return}if(s.value.find(g=>g.userId===i.value)){i.value=void 0;return}let v=r.value.find(g=>g.id===i.value);v||(s.value.push({userId:v.id,userName:v.userName,editPage:0,commentPage:0,deletePage:0,pageFileUpload:0,pageFileDelete:0,pageAuthManage:0}),i.value="")},d=v=>{v&&(u.value=!0,Yn.getUserBaseInfo({search:v}).then(g=>{r.value=g.data||[],u.value=!1}))},p=()=>{let v={pageId:l.pageInfo.id,authList:JSON.stringify(s.value)};ut.assignPageUserAuth(v).then(()=>{Ct.success("保存成功!")})},m=()=>{a.value=!1},h=v=>{s.value=s.value.filter(g=>g.userId!==v.userId)};return(v,g)=>{const y=ee("el-option"),k=ee("el-select"),b=ee("el-button"),C=ee("el-row"),I=ee("el-table-column"),T=ee("el-checkbox"),M=ee("el-table"),L=ee("el-dialog");return w(),G(L,{title:"页面权限",modelValue:o(a),"onUpdate:modelValue":g[1]||(g[1]=A=>bt(a)?a.value=A:a=A),width:"800px",class:"page-auth-dialog"},{footer:N(()=>[E(b,{onClick:m},{default:N(()=>[ye("取消")]),_:1}),E(b,{type:"primary",onClick:p},{default:N(()=>[ye("保存配置")]),_:1})]),default:N(()=>[E(C,null,{default:N(()=>[E(k,{modelValue:o(i),"onUpdate:modelValue":g[0]||(g[0]=A=>bt(i)?i.value=A:i=A),filterable:"",remote:"","reserve-keyword":"",autoComplete:"new-password",placeholder:"请输入名字、邮箱、账号搜索用户","remote-method":d,loading:o(u),style:{width:"690px","margin-right":"10px"}},{default:N(()=>[(w(!0),O(Ne,null,Ze(o(r),A=>(w(),G(y,{key:A.id,label:A.userName,value:A.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"]),E(b,{onClick:f},{default:N(()=>[ye("添加")]),_:1})]),_:1}),E(M,{data:o(s),border:"",style:{width:"100%",margin:"10px 0"}},{default:N(()=>[E(I,{prop:"userName",label:"用户",width:"150"}),E(I,{label:"权限"},{default:N(A=>[E(T,{"true-label":1,"false-label":0,modelValue:A.row.editPage,"onUpdate:modelValue":D=>A.row.editPage=D},{default:N(()=>[ye("编辑")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(T,{"true-label":1,"false-label":0,modelValue:A.row.deletePage,"onUpdate:modelValue":D=>A.row.deletePage=D},{default:N(()=>[ye("删除")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(T,{"true-label":1,"false-label":0,modelValue:A.row.pageFileUpload,"onUpdate:modelValue":D=>A.row.pageFileUpload=D},{default:N(()=>[ye("文件上传")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(T,{"true-label":1,"false-label":0,modelValue:A.row.pageFileDelete,"onUpdate:modelValue":D=>A.row.pageFileDelete=D},{default:N(()=>[ye("文件删除")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(T,{"true-label":1,"false-label":0,modelValue:A.row.pageAuthManage,"onUpdate:modelValue":D=>A.row.pageAuthManage=D},{default:N(()=>[ye("权限管理")]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1}),E(I,{label:"操作",width:"80"},{default:N(A=>[E(b,{size:"small",type:"danger",plain:"",onClick:D=>h(A.row)},{default:N(()=>[ye("删除")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1},8,["modelValue"])}}};const wO={style:{"text-align":"center"}},kO={class:"mobile-qr"},CO=R("div",null,"使用微信或手机浏览器扫一扫查看",-1),SO=["href"],_O={__name:"MobileQrScanDialog",props:{visible:Boolean,data:Object},emits:["update:visible","ok"],setup(e,{emit:t}){const n=e;let l=yn(),a=zo();const s=Ut();let r=_(!1);ue(r,()=>{t("update:visible",r.value)}),ue(()=>n.visible,()=>{r.value=n.visible,c()}),ze(()=>{r.value=n.visible,c()});let i=_(""),u=_();const c=()=>{if(!r.value)return;let f=s.resolve({path:"/page/share/mobile/view",query:{pageId:l.pageInfo.id,space:a.spaceInfo.uuid}}),d=window.location.href.split("#")[0];setTimeout(()=>{i.value=d+f.href,Hv.toCanvas(u.value,i.value,{scale:5,height:250,wight:250},p=>{p&&console.error(p)})},0)};return(f,d)=>{const p=ee("el-dialog");return w(),G(p,{title:"手机扫码查看",modelValue:o(r),"onUpdate:modelValue":d[0]||(d[0]=m=>bt(r)?r.value=m:r=m),width:"400px"},{default:N(()=>[R("div",wO,[R("div",kO,[R("canvas",{ref_key:"qrCodeDivRef",ref:u},null,512)]),CO,R("div",null,[ye("或 "),R("a",{target:"_blank",href:o(i)},"直接访问",8,SO)])])]),_:1},8,["modelValue"])}}},EO={systemUpgradeInfo:e=>ft({url:"/system/info/upgrade",method:"post",data:mt.stringify(e)}),fetchMoudleData:e=>ft({url:"/system/info/module",method:"get",data:mt.stringify(e)})};const $O={class:"about-content"},TO=R("div",{class:"doc-name"},"iailab文档管理中心",-1),IO={class:"doc-desc"},NO=R("div",{class:"slogan"},"iailab私有化部署的在线知识库管理平台",-1),PO=R("div",null,[ye(" 版权所有 © 2019-2024 "),R("a",{target:"_blank",href:"https://doc.iailab.com"},"doc.iailab.com")],-1),MO={__name:"AboutDialog",props:{visible:Boolean},emits:["update:visible","ok"],setup(e,{emit:t}){const n=e;fi();let l=_(!1);ue(l,()=>{t("update:visible",l.value)}),ue(()=>n.visible,()=>{l.value=n.visible}),ze(()=>{l.value=n.visible,s()});let a=_({});const s=()=>{EO.systemUpgradeInfo({}).then(r=>{r.data&&(a.value=r.data)})};return(r,i)=>{const u=ee("el-dialog");return w(),G(u,{title:"关于",modelValue:o(l),"onUpdate:modelValue":i[0]||(i[0]=c=>bt(l)?l.value=c:l=c),width:"600px",class:"about-iailab-doc"},{default:N(()=>[R("div",$O,[TO,R("div",IO,[NO,R("div",null,"当前版本 "+ae(o(a).nowVersion||"1.0.0"),1),PO])])]),_:1},8,["modelValue"])}}};const LO={class:"user-message-popover"},RO={class:"header"},OO=R("span",{class:"title"},"文档通知",-1),AO={class:"header-user-message"},VO={class:"page-info-box"},DO={__name:"UserMessagePopover",setup(e){let t=Ut(),n=_(),l=_([]),a=_(0),s=_(!1),r=_(0),i=_({sysType:2,pageNum:1,pageSize:20}),u;ze(()=>{c(),u=setInterval(()=>{c()},10*1e3)}),Rt(()=>{u&&clearInterval(u)});const c=()=>{Yn.getUserMessageList(i.value).then(m=>{l.value=m.data||[],r.value=m.total||0,a.value=l.value.filter(h=>h.msgStatus===0).length})},f=m=>{m.msgStatus===0&&Yn.readUserMessage({ids:m.id}).then(()=>{c()}),m.msgType>=2&&m.msgType<=14&&(t.push({path:"/page/show",query:{pageId:m.dataId}}),s.value=!1)},d=()=>{let m=[];l.value.filter(h=>h.msgStatus===0).forEach(h=>{m.push(h.id)}),!(m.length<=0)&&Yn.readUserMessage({ids:m.join(",")}).then(()=>{Ct.success("标记成功"),c()})},p=m=>{i.value.pageNum=m,c()};return(m,h)=>{const v=ee("el-button"),g=ee("el-badge"),y=ee("el-tooltip"),k=ee("el-link"),b=ee("el-table-column"),C=ee("el-table"),I=ee("el-pagination"),T=ee("el-popover");return w(),O("span",LO,[E(y,{content:"文档通知"},{default:N(()=>[E(g,{value:o(a),max:99,hidden:o(a)<=0},{default:N(()=>[E(v,{ref_key:"remindButtonRef",ref:n,class:"hover-button",text:""},{default:N(()=>[E(o(Kv),{size:"18"})]),_:1},512)]),_:1},8,["value","hidden"])]),_:1}),E(T,{visible:o(s),"onUpdate:visible":h[0]||(h[0]=M=>bt(s)?s.value=M:s=M),placement:"bottom",width:700,trigger:"click","popper-class":"header-user-remind",ref:"popoverRef","virtual-ref":o(n),"virtual-triggering":""},{default:N(()=>[R("div",RO,[OO,o(a)>0?(w(),G(k,{key:0,icon:o(no),type:"primary",onClick:d},{default:N(()=>[ye("本页标记已读")]),_:1},8,["icon"])):Z("",!0)]),R("div",AO,[E(C,{data:o(l),stripe:"","max-height":"400",style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(b,{label:"操作时间",prop:"creationTime",width:"150px"}),E(b,{label:"内容",prop:"msgContent","show-overflow-tooltip":""}),E(b,{width:"60px"},{default:N(M=>[E(g,{"is-dot":M.row.msgStatus===0,style:{"line-height":"10px","padding-right":"5px"}},{default:N(()=>[E(k,{type:"primary",onClick:L=>f(M.row)},{default:N(()=>[ye("查看")]),_:2},1032,["onClick"])]),_:2},1032,["is-dot"])]),_:1})]),_:1},8,["data"]),R("div",VO,[E(I,{background:"","current-page":o(i).pageNum,"page-size":o(i).pageSize,total:o(r),layout:"prev, pager, next, total",onCurrentChange:p},null,8,["current-page","page-size","total"])])])]),_:1},8,["visible","virtual-ref"])])}}};let BO="./";function xO(e){return FO(BO,e)}function FO(e,t){return!e||!t?!e&&!t?"":e||t:e.endsWith("/")&&t.startsWith("/")?e+t.substring(1):!e.endsWith("/")&&!t.startsWith("/")?e+"/"+t:e+t}const zO={class:"left-action-box"},HO={class:"collapse-box"},KO={key:0,class:"title-time-box"},WO={class:"title"},UO={class:"text"},jO={class:"time"},qO={class:"header-action-box"},GO={style:{"line-height":"60px",display:"inline-block",margin:"0 8px"}},YO={style:{"line-height":"60px",display:"inline-block"}},XO=["action"],ZO=["name","value"],JO={__name:"RightHeader",emits:["collapse"],setup(e,{emit:t}){let n=Ut(),l=yn(),a=dl(),s=fi(),r=zo(),i=()=>{a.showMenu=!a.showMenu,setTimeout(()=>{a.showMenu?a.rightAsideWidth=301:a.rightAsideWidth=1},100)};ue(()=>s.ts,()=>{console.clear()}),ue(()=>l.favoritePageChange,T=>{if(l.needVersion){Ct.warning("不支持在指定版本后收藏页面");return}});const u=()=>{l.pageIsUnlock=!1;let T={pageId:l.pageInfo.id};ut.pageLock(T).then(()=>{n.push({path:"/page/edit",query:{pageId:l.pageInfo.id}})})},c=()=>{a.commentShow=!a.commentShow};let f=_(!1);const d=()=>{f.value=!0},p=()=>{if(r.spaceInfo.openDoc!==1)Ct.warning("该空间未开放,无法查看开放文档地址");else{let T=n.resolve({path:"/page/share/view",query:{pageId:l.pageInfo.id,space:r.spaceInfo.uuid}});window.open(T.href,"_blank")}},m=()=>{Tl.confirm("确定要删除此页面及其所有子页面吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{ut.pageDelete({pageId:l.pageInfo.id}).then(()=>{ut.pageList({spaceId:r.chooseSpaceId}).then(T=>{l.wikiPageList=T.data||[]}).then(()=>{n.push({path:"/home",query:{spaceId:l.pageInfo.spaceId}})})})}).catch(T=>{console.log(T)})};let h=_(),v=_({url:xO("iailab-doc-wiki/page/download"),param:{}});const g=()=>{let M=document.getElementById("pageContentBox").innerHTML||"";v.value.param={pageId:l.pageInfo.id,content:M},setTimeout(()=>h.value.submit(),0)};let y=_(!1);const k=()=>{r.spaceInfo.openDoc!==1?Ct.warning("该空间未开放,无法查看开放文档地址"):y.value=!0},b=()=>{Yn.userLogout().then(()=>{n.push("/user/login")})};let C=_(!1);const I=()=>{C.value=!0};return(T,M)=>{const L=ee("el-button"),A=ee("el-col"),D=ee("el-tooltip"),B=ee("el-icon"),F=ee("a-menu-item"),x=ee("a-menu-divider"),U=ee("a-menu"),X=ee("a-dropdown"),K=ee("el-row");return w(),O(Ne,null,[E(K,null,{default:N(()=>[E(A,{span:12},{default:N(()=>[R("div",zO,[R("div",HO,[o(a).showMenu?(w(),G(L,{key:0,onClick:o(i),text:"",icon:o(rc),class:"fold-btn"},null,8,["onClick","icon"])):(w(),G(L,{key:1,onClick:o(i),text:"",icon:o(ic),class:"fold-btn"},null,8,["onClick","icon"]))]),o(a).currentPage==="view"?(w(),O("div",KO,[R("div",WO,[R("span",UO,ae(o(l).pageInfo.name||""),1)]),R("div",jO,"最近修改:"+ae(o(l).pageInfo.updateTime||""),1)])):Z("",!0)])]),_:1}),E(A,{span:12,style:{"text-align":"right"}},{default:N(()=>[R("div",qO,[o(a).currentPage==="view"?(w(),O(Ne,{key:0},[o(l).pageAuth.canEdit===1?(w(),G(D,{key:0,content:"编辑文档"},{default:N(()=>[E(L,{class:"hover-button",onClick:u,text:""},{default:N(()=>[E(o(Wv),{size:"18"})]),_:1})]),_:1})):Z("",!0),E(D,{content:"文档沟通"},{default:N(()=>[E(L,{class:"hover-button",onClick:c,text:""},{default:N(()=>[E(o(Uv),{size:"18"})]),_:1})]),_:1}),E(DO),E(X,{trigger:"click",placement:"bottom",overlayClassName:"header-action-more-dropdown"},{overlay:N(()=>[E(U,null,{default:N(()=>[o(l).pageAuth.canConfigAuth===1?(w(),G(F,{key:0,onClick:d},{default:N(()=>[E(B,null,{default:N(()=>[E(o(jv))]),_:1}),ye(" 权限设置")]),_:1})):Z("",!0),o(r).spaceInfo.openDoc===1?(w(),G(F,{key:1,onClick:p},{default:N(()=>[E(B,null,{default:N(()=>[E(o(qv))]),_:1}),ye(" 查看开放文档")]),_:1})):Z("",!0),o(r).spaceInfo.openDoc===1?(w(),G(F,{key:2,onClick:k},{default:N(()=>[E(B,null,{default:N(()=>[E(o(Gv))]),_:1}),ye(" 手机端查看")]),_:1})):Z("",!0),E(F,{onClick:g},{default:N(()=>[E(B,null,{default:N(()=>[E(o(Yv))]),_:1}),ye("导出为Word")]),_:1}),E(x),o(l).pageAuth.canDelete===1?(w(),G(F,{key:3,onClick:m,class:"delete"},{default:N(()=>[E(B,null,{default:N(()=>[E(o(br))]),_:1}),ye(" 删除")]),_:1})):Z("",!0)]),_:1})]),default:N(()=>[R("span",GO,[E(L,{icon:o(Ca),class:"hover-button",text:""},null,8,["icon"])])]),_:1})],64)):Z("",!0),E(X,{trigger:"click",placement:"bottom",overlayClassName:"header-action-user-dropdown"},{overlay:N(()=>[E(U,null,{default:N(()=>[E(F,{onClick:I},{default:N(()=>[ye("关于")]),_:1}),E(x),E(F,{onClick:b},{default:N(()=>[ye("退出登录")]),_:1})]),_:1})]),default:N(()=>[R("span",YO,[E(L,{icon:o(Xv),class:"hover-button",text:""},null,8,["icon"])])]),_:1})])]),_:1})]),_:1}),E(_O,{visible:o(y),"onUpdate:visible":M[0]||(M[0]=V=>bt(y)?y.value=V:y=V)},null,8,["visible"]),E(bO,{visible:o(f),"onUpdate:visible":M[1]||(M[1]=V=>bt(f)?f.value=V:f=V)},null,8,["visible"]),E(MO,{visible:o(C),"onUpdate:visible":M[2]||(M[2]=V=>bt(C)?C.value=V:C=V)},null,8,["visible"]),R("form",{method:"post",ref_key:"downloadFormRef",ref:h,action:o(v).url,target:"_blank"},[(w(!0),O(Ne,null,Ze(o(v).param,(V,W)=>(w(),O("input",{type:"hidden",name:W,value:V},null,8,ZO))),256))],8,XO)],64)}}},QO=Jn(JO,[["__scopeId","data-v-db97c018"]]);const eA={__name:"RightResize",emits:["update:value","change"],setup(e,{emit:t}){let n=300;ze(()=>{a()});let l=_();const a=()=>{let s=l.value;s.onmousedown=r=>{let i=r.clientX;return s.left=s.offsetLeft,document.onmousemove=u=>{let c=u.clientX,f=i-c;(f<0&&n<600||f>0&&n>300)&&(i=c,n-=f,n<300&&(n=300),t("update:value",n),t("change",n))},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null},!1}};return(s,r)=>(w(),O("div",{ref_key:"rightResizeRef",ref:l,class:"right-resize"},null,512))}},Ip=Jn(eA,[["__scopeId","data-v-bc03f234"]]);const tA={class:"global-layout-vue"},nA={__name:"GlobalLayout",setup(e){let t=dl();const n=l=>{t.rightAsideWidth=l,t.commentShow=l};return(l,a)=>{const s=ee("el-aside"),r=ee("el-header"),i=ee("router-view"),u=ee("el-main"),c=ee("el-container");return w(),O("div",tA,[E(c,null,{default:N(()=>[xe(E(s,{style:Re({width:o(t).rightAsideWidth+"px"})},{default:N(()=>[E(yO,{ref:"leftSideBarRef"},null,512)]),_:1},8,["style"]),[[lt,o(t).showMenu]]),xe(E(Ip,{value:o(t).rightAsideWidth,"onUpdate:value":a[0]||(a[0]=f=>o(t).rightAsideWidth=f),onChange:n},null,8,["value"]),[[lt,o(t).showMenu]]),E(c,null,{default:N(()=>[o(t).showHeader?(w(),G(r,{key:0},{default:N(()=>[E(QO,{ref:"rightHeaderRef"},null,512)]),_:1})):Z("",!0),E(u,{style:{padding:"0"}},{default:N(()=>[E(i)]),_:1})]),_:1})]),_:1})])}}};const lA=e=>(fr("data-v-d74018ea"),e=e(),pr(),e),oA={style:{height:"100%"}},aA={class:"logo"},sA={style:{padding:"10px","box-sizing":"border-box",background:"#fafafa"}},rA={class:"wiki-page-tree-box"},iA={class:"page-tree-node"},uA={class:"label"},cA={class:"text"},dA=lA(()=>R("div",{class:"build-info"},[ye("本文档使用"),R("a",{target:"_blank",href:"https://gitee.com/iailab/iailab-doc"},"iailab-doc"),ye("构建")],-1)),fA={__name:"ShareLayout",setup(e){let t=_(!0),n=_({children:"children",label:"name"}),l=_(""),a=_(""),s=_({}),r=_(""),i=_([]),u=_([]),c=_(300),f=dn(),d=Ut();ze(()=>{l.value=f.query.space||"",y(),g()});const p=(k,b)=>!k||!b.name?!0:b.name.toLowerCase().indexOf(k.toLowerCase())!==-1,m=k=>{a.value!=k.id&&(a.value=k.id,d.push({path:"/page/share/view",query:{pageId:k.id,space:l.value}}))};let h=_();const v=()=>{h.value.filter(r.value)},g=()=>{ut.openPageList({space:l.value}).then(k=>{i.value=k.data||[],a.value=""})},y=()=>{ut.openSpaceInfo({space:l.value}).then(k=>{s.value=k.data})};return(k,b)=>{const C=ee("el-button"),I=ee("el-input"),T=ee("el-icon"),M=ee("el-tooltip"),L=ee("el-tree"),A=ee("el-aside"),D=ee("router-view"),B=ee("el-main"),F=ee("el-container");return w(),O("div",oA,[E(F,null,{default:N(()=>[xe(E(A,{width:"300px",style:Re([{"background-color":"#fafafa"},{width:o(c)+"px"}])},{default:N(()=>[R("div",aA,ae(o(s).name),1),R("div",sA,[E(I,{modelValue:o(r),"onUpdate:modelValue":b[0]||(b[0]=x=>bt(r)?r.value=x:r=x),onKeyup:pt(v,["enter"]),placeholder:"搜索文档",style:{margin:"10px 0"}},{append:N(()=>[E(C,{icon:o(yr),onClick:v},null,8,["icon"])]),_:1},8,["modelValue","onKeyup"]),R("div",rA,[E(L,{ref_key:"wikiPageTreeRef",ref:h,"current-node-key":o(a),data:o(i),"default-expanded-keys":o(u),"expand-on-click-node":!0,"filter-node-method":p,props:o(n),draggable:"","highlight-current":"","node-key":"id",style:{"background-color":"#fafafa"},onNodeClick:m},{default:N(({node:x,data:U})=>[R("div",iA,[E(M,{content:x.label,placement:"top-start","show-after":1e3},{default:N(()=>[R("span",uA,[E(T,null,{default:N(()=>[E(o(lc))]),_:1}),R("span",cA,ae(x.label),1)])]),_:2},1032,["content"])])]),_:1},8,["current-node-key","data","default-expanded-keys","props"])]),dA])]),_:1},8,["style"]),[[lt,o(t)]]),xe(E(Ip,{value:o(c),"onUpdate:value":b[1]||(b[1]=x=>bt(c)?c.value=x:c=x)},null,8,["value"]),[[lt,o(t)]]),E(F,null,{default:N(()=>[E(B,{class:"doc-body-box"},{default:N(()=>[E(D)]),_:1})]),_:1})]),_:1})])}}},pA=Jn(fA,[["__scopeId","data-v-d74018ea"]]),vA=["onClick"],mA=["onClick"],hA={__name:"PageTree",props:{pageList:Array},emits:["pageChange"],setup(e,{emit:t}){const n=a=>{t("pageChange",a)};let l=_([]);return(a,s)=>{const r=ee("page-tree",!0),i=ee("van-collapse-item"),u=ee("van-collapse");return w(),G(u,{modelValue:o(l),"onUpdate:modelValue":s[0]||(s[0]=c=>bt(l)?l.value=c:l=c)},{default:N(()=>[(w(!0),O(Ne,null,Ze(e.pageList,c=>(w(),O(Ne,null,[c.children?(w(),G(i,{key:1,name:c.id},{title:N(()=>[R("span",{onClick:f=>n(c.id)},ae(c.name),9,mA)]),default:N(()=>[E(r,{"page-list":c.children,onPageChange:n},null,8,["page-list"])]),_:2},1032,["name"])):(w(),O("div",{key:0,onClick:f=>n(c.id),class:"van-cell van-cell--clickable"},ae(c.name),9,vA))],64))),256))]),_:1},8,["modelValue"])}}};const gA=e=>(fr("data-v-7ee9baa3"),e=e(),pr(),e),yA={class:"share-mobile-layout"},bA={class:"header"},wA={class:"main"},kA=gA(()=>R("div",{class:"build-info"},[ye("本文档使用"),R("a",{target:"_blank",href:"https://gitee.com/iailab/iailab-doc"},"iailab-doc"),ye("构建")],-1)),CA={__name:"ShareMobileLayout",setup(e){_({children:"children",label:"name"});let t=_(""),n=_(""),l=_({}),a=_([]),s=_(!1);_([]);let r=dn(),i=Ut();ze(()=>{t.value=r.query.space||"",d(),f()});const u=p=>{s.value=!1,i.replace({path:"/page/share/mobile/view",query:{pageId:p,space:t.value}})},c=p=>{s.value=p},f=()=>{ut.openPageList({space:t.value}).then(p=>{a.value=p.data||[],n.value=""})},d=()=>{ut.openSpaceInfo({space:t.value}).then(p=>{l.value=p.data})};return(p,m)=>{const h=ee("van-nav-bar"),v=ee("van-popup"),g=ee("router-view");return w(),O("div",yA,[E(v,{show:o(s),"onUpdate:show":m[0]||(m[0]=y=>bt(s)?s.value=y:s=y),closeable:"",position:"left",class:"popup-module",style:{height:"100%",width:"80%"}},{default:N(()=>[R("div",bA,[E(h,{title:o(l).name},null,8,["title"])]),R("div",wA,[E(hA,{"page-list":o(a),onPageChange:u},null,8,["page-list"]),kA])]),_:1},8,["show"]),E(g,{onPopupShow:c})])}}},SA=Jn(CA,[["__scopeId","data-v-7ee9baa3"]]),Ho="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAqFBMVEX///9wcHBwcHBwcHBwcHB8fHxwcHB6enpwcHCDg4NwcHB8fHx6enqSkpJ8fHxycnJwcHDp6el2dnZwcHD////39/f19fXz8/Pw8PDr6+vn5+fj4+PZ2dnX19fHx8fExMS9vb20tLSrq6uhoaGenp6MjIyKioqDg4N8fHx6enp4eHh0dHRycnKZmZmOjo6KioqDg4OAgIB/f396enp4eHh2dnZycnJwcHDyRjyJAAAALXRSTlMAETNEVWZmd3eIiJmqu7u7u93d3e7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u6OCyV0AAAAi0lEQVQYGXXBRwKCMBAF0B9Q7Io6RJGo2LAEu8zc/2YuyCILfQ/4R8k5gK+zy0v4TilZeAZb2rTCSMHp3bV+jeJpDEDFIvagSRtNJAro2vHjSo4owOYzNlTTAoDnGZNjLABOFkzOagigWiecUW3fBNB/L5+33GgiSksFQE1YPkUlciwuETxhox3ghy8Wng9K1E9YIwAAAABJRU5ErkJggg==";const _A={style:{background:"#f1f1f1","min-height":"100%"},class:"page-search-vue"},EA={style:{"max-width":"1200px",margin:"0 auto",background:"#fff",padding:"20px","min-height":"100%","box-sizing":"border-box"}},$A={style:{"margin-bottom":"20px"}},TA={key:0,class:"empty-news"},IA={class:"line-box"},NA={class:"line-title"},PA={class:"text-link"},MA={class:"text-link"},LA={class:"page-preview-box"},RA=["onClick","innerHTML"],OA=["innerHTML"],AA=R("img",{src:Ho,class:"zan-img"},null,-1),VA={class:"page-info-box"},DA={__name:"Search",setup(e){let t=dn();Ut(),ze(()=>{c(t)});let n=_(0),l=_({spaceId:"",keywords:"",newsType:1,pageNum:1,pageSize:20}),a=_([]);const s=()=>{ut.pageSearchByEs(l.value).then(f=>{a.value=f.data||[],n.value=f.total})},r=f=>{l.value.pageSize=f,s()},i=f=>{window.open("#/page/show?pageId="+f.pageId)},u=f=>{l.value.pageNum=f,s()},c=f=>{l.value={keywords:f.query.keywords,spaceId:f.query.spaceId,newsType:1,pageNum:1,pageSize:20},s()};return(f,d)=>{const p=ee("el-input"),m=ee("el-col"),h=ee("el-button"),v=ee("el-row"),g=ee("el-icon"),y=ee("el-pagination");return w(),O("div",_A,[R("div",EA,[R("div",$A,[E(v,{gutter:20,style:{"max-width":"700px",margin:"0 auto"}},{default:N(()=>[E(m,{span:20},{default:N(()=>[E(p,{modelValue:o(l).keywords,"onUpdate:modelValue":d[0]||(d[0]=k=>o(l).keywords=k),onKeyup:pt(s,["enter"]),placeholder:"",style:{width:"100%"}},null,8,["modelValue","onKeyup"])]),_:1}),E(m,{span:4},{default:N(()=>[E(h,{type:"primary",onClick:s,icon:o(yr)},{default:N(()=>[ye("搜索一下")]),_:1},8,["icon"])]),_:1})]),_:1})]),o(a).length<=0?(w(),O("div",TA,"暂无数据")):(w(!0),O(Ne,{key:1},Ze(o(a),k=>(w(),O("div",IA,[R("div",NA,[R("span",PA,ae(k.createUserName),1),ye(" 发布于 "),R("span",MA,ae(k.spaceName),1)]),R("div",LA,[R("div",{class:"page-preview-title",onClick:b=>i(k),innerHTML:k.pageTitle},null,8,RA),R("div",{class:"page-preview-content",innerHTML:k.previewContent},null,8,OA),R("div",null,[R("span",null,[AA,ye(ae(k.zanNum)+" ",1)]),R("span",null,[E(g,{class:"view-img"},{default:N(()=>[E(o(Vo))]),_:1}),ye(ae(k.viewNum)+" ",1)]),R("span",null,ae(k.updateTime||k.createTime),1)])])]))),256)),R("div",VA,[E(y,{onSizeChange:r,onCurrentChange:u,"page-sizes":[20,50,100],"page-size":20,"current-page":o(l).pageNum,layout:"prev, pager, next, jumper, sizes, total",total:o(n)},null,8,["current-page","total"])])])])}}},BA={};function xA(e,t){return w(),O("div",null,"没有权限访问该模块")}const FA=Jn(BA,[["render",xA]]);const zA={style:{padding:"10px"},class:"home-vue"},HA={style:{"max-width":"800px",margin:"0 auto"}},KA={key:0,class:"empty-news"},WA={class:"line-box"},UA={class:"line-title"},jA={class:"text-link"},qA={class:"text-link"},GA={class:"page-preview-box"},YA=["onClick","innerHTML"],XA=["innerHTML"],ZA=R("img",{src:Ho,class:"zan-img"},null,-1),JA={__name:"Home",setup(e){_(0);let t=_({spaceId:"",newsType:1,pageNum:1,pageSize:20}),n=_([]),l=_([{key:1,val:"最近更新"},{key:2,val:"最新创建"},{key:3,val:"查看最多"},{key:4,val:"点赞最多"},{key:5,val:"查看+点赞最多"}]),a=_({});oo(f=>{c(f)});let s=dn(),r=Ut();ze(()=>{c(s)});const i=()=>{ut.pageNews(t.value).then(f=>{n.value=f.data||[]})},u=f=>{let d={pageId:f.pageId};r.push({path:"/page/show",query:d})},c=f=>{t.value={spaceId:f.query.spaceId,newsType:1,pageNum:1,pageSize:20,dirId:f.query.dirId},t.value.spaceId&&i(),a.value={},l.value.forEach(d=>a.value[d.key]=d.val)};return(f,d)=>{const p=ee("el-icon"),m=ee("el-tab-pane"),h=ee("el-tabs");return w(),O("div",zA,[R("div",HA,[E(h,{"model-value":"first"},{default:N(()=>[E(m,{label:o(a)[o(t).newsType],name:"first"},{default:N(()=>[o(n).length<=0?(w(),O("div",KA," 暂无数据 ")):(w(!0),O(Ne,{key:1},Ze(o(n),v=>(w(),O("div",WA,[R("div",UA,[R("span",jA,ae(v.createUserName),1),ye(" 发布于 "),R("span",qA,ae(v.spaceName),1)]),R("div",GA,[R("div",{class:"page-preview-title",onClick:g=>u(v),innerHTML:v.pageTitle},null,8,YA),R("div",{class:"page-preview-content",innerHTML:v.previewContent},null,8,XA),R("div",null,[R("span",null,[ZA,ye(ae(v.zanNum)+" ",1)]),R("span",null,[E(p,{class:"view-img"},{default:N(()=>[E(o(Vo))]),_:1}),ye(ae(v.viewNum)+" ",1)]),R("span",null,ae(v.updateTime||v.createTime),1)])])]))),256))]),_:1},8,["label"])]),_:1})])])}}};const QA={class:"my-info-vue"},eV={style:{margin:"0 auto","max-width":"1000px"}},tV=R("div",{class:"clearfix"},"我的信息",-1),nV={__name:"MyInfo",setup(e){let t=_({});ze(()=>{n()});const n=()=>{Yn.getSelfUserInfo().then(l=>{t.value=l.data})};return(l,a)=>{const s=ee("el-form-item"),r=ee("el-form"),i=ee("el-card");return w(),O("div",QA,[R("div",eV,[E(i,{class:"box-card"},{header:N(()=>[tV]),default:N(()=>[E(r,{class:"search-form-box","label-width":"100px"},{default:N(()=>[E(s,{label:"账号:"},{default:N(()=>[ye(ae(o(t).userNo),1)]),_:1}),E(s,{label:"用户名:"},{default:N(()=>[ye(ae(o(t).userName),1)]),_:1}),E(s,{label:"手机号:"},{default:N(()=>[ye(ae(o(t).phone),1)]),_:1}),E(s,{label:"邮箱:"},{default:N(()=>[ye(ae(o(t).email),1)]),_:1}),E(s,{label:"状态:"},{default:N(()=>[ye(ae(o(t).delFlag==0?"正常":"停用"),1)]),_:1}),E(s,{label:"性别:"},{default:N(()=>[ye(ae(o(t).sex==0?"女":"男"),1)]),_:1})]),_:1})]),_:1})])])}}},lV={computeFileSize(e){if(!e)return"-";let t="";e<.1*1024?t=e.toFixed(2)+"B":e<.1*1024*1024?t=(e/1024).toFixed(2)+"KB":e<.1*1024*1024*1024?t=(e/(1024*1024)).toFixed(2)+"MB":t=(e/(1024*1024*1024)).toFixed(2)+"GB";let n=t+"",l=n.indexOf(".");return n.substr(l+1,2)=="00"?n.substring(0,l)+n.substr(l+3,2):t}},Np={createNavigationHeading(){let e=[],t=document.querySelector(".wiki-page-content");if(t===null)return e;let n=t.querySelectorAll("h1,h2,h3,h4,h5,h6");return n.length<=0?[]:(n.forEach(l=>{let a=l.innerHTML.replace(/^\s+/g,"").replace(/\s+$/g,"").replace(/<\/?[^>]+(>|$)/g,"");e.push({node:l,level:parseInt(l.tagName.replace(/[h]/i,""),10),text:a})}),e)}};const oV={class:"navigation"},aV=["onClick"],Pp={__name:"Navigation",props:{heading:{type:Array,default:[]}},setup(e){let t=yn();const n=dl();let l=_("100px");ze(()=>{window.onresize=()=>{s()},setTimeout(()=>s(),100)}),ue(()=>n.viewMenuWidth,i=>{s()}),ue(()=>t.commentShow,i=>{s()});let a=_();const s=()=>{l.value=window.getComputedStyle(a.value,null).width},r=i=>{i.node.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})};return(i,u)=>(w(),O("div",oV,[R("div",{ref_key:"navigationRef",ref:a,style:{display:"inline-block",width:"100%"}},null,512),R("div",{class:"navigation-heading",style:Re({width:o(l)})},[(w(!0),O(Ne,null,Ze(e.heading,c=>(w(),O("div",{class:$("heading-item heading-"+c.level),onClick:f=>r(c)},ae(c.text),11,aV))),256))],4)]))}},sV={class:"wiki-file"},rV={__name:"Annex",setup(e){let t=yn(),n=_({pageId:0}),l=_(".//iailab-doc-wiki/page/file/upload");const a=()=>{n.value.pageId=t.pageInfo.id},s=c=>{Ct.error("上传失败,"+c)},r=c=>{c.errCode===200?(t.fileList.push(c.data),Ct.success("上传成功!")):Ct("上传失败:"+(c.errMsg||"未知错误"))},i=c=>{Tl.confirm("确定要删除此文件吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{let f={id:c.id};ut.deletePageFile(f).then(()=>{t.fileList=t.fileList.filter(d=>d.id!==c.id)})})},u=c=>lV.computeFileSize(c);return(c,f)=>{const d=ee("el-button"),p=ee("el-upload"),m=ee("el-link"),h=ee("el-table-column"),v=ee("el-table");return w(),O("div",sV,[o(t).pageAuth.canUploadFile===1?(w(),G(p,{key:0,"on-success":r,"on-error":s,"before-upload":a,action:o(l),data:o(n),"with-credentials":!0,class:"action-btn upload-page-file",name:"files","show-file-list":"",multiple:"",limit:999},{default:N(()=>[E(d,{type:"primary",underline:!1,icon:o(Zv),style:{margin:"10px",width:"100%"}},{default:N(()=>[ye(" 上传附件")]),_:1},8,["icon"])]),_:1},8,["action","data"])):Z("",!0),xe(E(v,{data:o(t).fileList,border:"",style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(h,{label:"文件名","show-overflow-tooltip":""},{default:N(g=>[E(m,{target:"_blank",href:g.row.fileUrl,type:"primary"},{default:N(()=>[ye(ae(g.row.fileName),1)]),_:2},1032,["href"])]),_:1}),E(h,{prop:"createUserName",label:"创建人",width:"110px","show-overflow-tooltip":""}),E(h,{label:"文件大小",width:"120px"},{default:N(g=>[ye(ae(u(g.row.fileSize)),1)]),_:1}),E(h,{prop:"createTime",label:"创建时间",width:"160px"}),E(h,{prop:"downloadNum",label:"下载次数",width:"90px"},{default:N(g=>[ye(ae(g.row.downloadNum||0),1)]),_:1}),o(t).pageAuth.canDeleteFile==1?(w(),G(h,{key:0,label:"操作",width:"90px"},{default:N(g=>[E(d,{onClick:y=>i(g.row)},{default:N(()=>[ye("删除")]),_:2},1032,["onClick"])]),_:1})):Z("",!0)]),_:1},8,["data"]),[[lt,o(t).fileList.length>0]])])}}},iV={class:"action-tab-box"},uV={key:0,class:"action-box-empty"},cV={__name:"PageHistory",props:{pageHistoryList:Array,pageHistoryChoice:Object,pageHistoryDetail:String},emits:["historyClickHandle","previewPageImage","createNavigationHeading"],setup(e,{emit:t}){const n=e;let l=yn();const a=s=>{n.pageHistoryChoice.id===s.id&&n.pageHistoryDetail.value||(s.content?(s.loading=2,t("historyClickHandle",s),setTimeout(()=>{t("previewPageImage",s),t("createNavigationHeading",s)},500)):(s.loading=1,ut.pageHistoryDetail({id:s.id}).then(r=>{s.loading=2,s.content=r.data||"--",l.pageInfo.editorType===2&&(s.content=lo.mavonEditor.getMarkdownIt().render(s.content)),t("historyClickHandle",s),setTimeout(()=>{t("previewPageImage",s),t("createNavigationHeading",s)},500)}).catch(()=>{s.loading=3})))};return(s,r)=>{const i=ee("el-tag"),u=ee("el-icon"),c=ee("el-timeline-item"),f=ee("el-timeline");return w(),O("div",iV,[o(n).pageHistoryList.length<=0?(w(),O("div",uV," 暂无修改历史记录 ")):(w(),G(f,{key:1},{default:N(()=>[(w(!0),O(Ne,null,Ze(o(n).pageHistoryList,d=>(w(),G(c,null,{default:N(()=>[E(i,{type:o(n).pageHistoryChoice.id===d.id?d.loading===3?"danger":"success":"info",class:"history-item",onClick:p=>a(d)},{default:N(()=>[R("div",null,ae(d.createUserName),1),R("div",null,ae(d.createTime),1)]),_:2},1032,["type","onClick"]),xe(E(u,{class:"history-loading-status"},{default:N(()=>[E(o(Xn))]),_:2},1536),[[lt,d.loading===1]]),xe(E(u,{class:"history-loading-status"},{default:N(()=>[E(o(Ba))]),_:2},1536),[[lt,d.loading===2]]),xe(E(u,{class:"history-loading-status"},{default:N(()=>[E(o(Zn))]),_:2},1536),[[lt,d.loading===3]])]),_:2},1024))),256))]),_:1}))])}}};const dV={key:0,class:"action-box-empty"},fV={key:1,class:"comment-list"},pV={class:"comment-user-name"},vV={class:"comment-content"},mV={class:"comment-input-box"},hV={__name:"Comment",setup(e){let t={colorArr:["#67C23A","#409EFF","#E6A23C","#F56C6C","#909399","#303133"],userHeadColor:{}},n=_(""),l=_([]),a=_({});dn(),Ut();let s=yn(),r=fi();ue(()=>s.pageInfo,v=>{s.pageInfo.editorType!==0&&c()}),ze(()=>{c()});let i=_();const u=()=>{setTimeout(()=>{let v=i.value;v.scrollTop=v.scrollHeight},0)},c=()=>{!s.pageInfo||!s.pageInfo.id||(p(),ut.pageCommentList({pageId:s.pageInfo.id}).then(v=>{let g=v.data||[];for(let y=0;y<g.length;y++){g[y].color=h(g[y].createUserId);let k=g[y].commentList||[];for(let b=0;b<k.length;b++){let C=k[b];C.color=h(C.createUserId)}g[y].commentList=k,g[y].visible=!1}l.value=g,u()}))};let f=v=>r.userInfo.id===v.createUserId||r.userInfo.id===s.pageInfo.createUserId;const d=v=>{ut.deletePageComment({id:v}).then(()=>{c()})},p=()=>{a.value={}},m=()=>{if(n.value.length<=0){Ct.error("请输入评论内容");return}let v={pageId:s.pageInfo.id,content:n.value,parentId:a.value.id};ut.updatePageComment(v).then(g=>{let y=g.data;y.color=h(y.createUserId),n.value="",c()})},h=v=>{let g=t.userHeadColor[v];return g||(g=t.colorArr[Math.ceil(Math.random()*t.colorArr.length)-1],t.userHeadColor[v]=g),g};return(v,g)=>{const y=ee("el-icon"),k=ee("el-popconfirm"),b=ee("el-card"),C=ee("el-timeline-item"),I=ee("el-timeline"),T=ee("el-button");return w(),O(Ne,null,[R("div",{class:"comment-box",ref_key:"actionTabCommentRef",ref:i},[o(l).length<=0?(w(),O("div",dV," 暂无评论 ")):(w(),O("div",fV,[E(I,null,{default:N(()=>[(w(!0),O(Ne,null,Ze(o(l),M=>(w(),G(C,{timestamp:M.createTime,placement:"top"},{default:N(()=>[E(b,{class:"box-card comment-card","body-style":{padding:"10px"}},{default:N(()=>[R("div",{style:Re("background-color: "+M.color),class:"head"},ae(M.createUserName.substr(0,1)),5),R("div",pV,[ye(ae(M.createUserName)+" ",1),o(f)(M)?(w(),G(k,{key:0,placement:"top",width:"160",trigger:"click","confirm-button-text":"删除","cancel-button-text":"取消",onConfirm:L=>d(M.id),title:"确定要删除此评论吗?"},{reference:N(()=>[E(y,{class:"icon-delete"},{default:N(()=>[E(o(br))]),_:1})]),_:2},1032,["onConfirm"])):Z("",!0)]),R("pre",vV,ae(M.content),1)]),_:2},1024)]),_:2},1032,["timestamp"]))),256))]),_:1})]))],512),R("div",mV,[xe(R("textarea",{rows:"5",placeholder:"发表评论","onUpdate:modelValue":g[0]||(g[0]=M=>bt(n)?n.value=M:n=M),maxlength:500},null,512),[[Ao,o(n)]]),E(T,{style:{float:"right",margin:"2px 5px"},type:"primary",size:"small",onClick:m},{default:N(()=>[ye("发送")]),_:1})])],64)}}},gV={style:{"margin-top":"40px","font-size":"14px"}},yV={style:{"vertical-align":"top"},class:"is-link"},bV=R("img",{src:Ho,style:{"vertical-align":"middle"}},null,-1),wV=R("img",{src:Ho,style:{"vertical-align":"middle",transform:"rotateX(180deg)"}},null,-1),kV={style:{"margin-left":"10px","vertical-align":"top"}},CV={key:0},SV={key:1},_V={key:2},EV={key:3},$V={style:{"margin-left":"10px"}},TV={__name:"PageZan",setup(e){let t=_([]),n=_(!1),l=yn();const a=r=>{let i={yn:r,pageId:l.pageInfo.id};ut.updatePageZan(i).then(()=>{l.pageInfo.selfZan=r,l.pageInfo.zanNum=l.pageInfo.zanNum+(r==1?1:-1)})},s=()=>{n.value=!0,t.value=[];let r={pageId:l.pageInfo.id};ut.pageZanList(r).then(i=>{t.value=i.data})};return(r,i)=>{const u=ee("el-icon"),c=ee("el-table-column"),f=ee("el-table"),d=ee("el-dialog");return w(),O(Ne,null,[R("div",gV,[R("span",yV,[xe(R("span",{onClick:i[0]||(i[0]=p=>a(1))},[bV,ye(" 赞")],512),[[lt,o(l).pageInfo.selfZan==0]]),xe(R("span",{onClick:i[1]||(i[1]=p=>a(0))},[wV,ye(" 踩")],512),[[lt,o(l).pageInfo.selfZan==1]])]),R("span",kV,[o(l).pageInfo.selfZan==0&&o(l).pageInfo.zanNum<=0?(w(),O("span",CV,"成为第一个赞同者")):o(l).pageInfo.selfZan==0&&o(l).pageInfo.zanNum>0?(w(),O("span",SV,[R("span",{class:"is-link",onClick:s},ae(o(l).pageInfo.zanNum)+"人",1),ye("赞了它 ")])):o(l).pageInfo.selfZan==1&&o(l).pageInfo.zanNum<=1?(w(),O("span",_V,"我赞了它")):o(l).pageInfo.selfZan==1&&o(l).pageInfo.zanNum>1?(w(),O("span",EV,[R("span",{class:"is-link",onClick:s},"我和"+ae(o(l).pageInfo.zanNum-1)+"个其他人",1),ye("赞了它 ")])):Z("",!0)]),R("span",$V,[E(u,{style:{"font-size":"16px",color:"#666","vertical-align":"middle"}},{default:N(()=>[E(o(Vo))]),_:1}),ye(" "+ae(o(l).pageInfo.viewNum)+"次阅读 ",1)])]),E(d,{title:"赞了它的人",modelValue:o(n),"onUpdate:modelValue":i[2]||(i[2]=p=>bt(n)?n.value=p:n=p),width:"600px"},{default:N(()=>[E(f,{data:o(t),border:"","show-header":!1,style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(c,{prop:"createUserName",label:"用户"}),E(c,{prop:"createTime",label:"时间"})]),_:1},8,["data"])]),_:1},8,["modelValue"])],64)}}};const IV={key:0,class:"page-show-vue"},NV={style:{"max-width":"1000px",margin:"0 auto","padding-left":"10px"}},PV=["innerHTML"],MV=["innerHTML"],LV={__name:"Show",props:{spaceInfo:Object},emits:["switchSpace","changeExpandedKeys","loadPageList"],setup(e,{emit:t}){let n=_({}),l=_({}),a=_({}),s=_(0);_([]);let r=_({});_(""),_(!1),_(!1),_([]),_([]),_(""),_(!1);let i=_(""),u=_(""),c=_({}),f=_([]),d=_(1),p=_([]),m=_(0),h=_(!1),v=_([]);_({fullscreen:!0,readmodel:!0}),_({url:"iailab-doc-wiki/page/download",param:{}});let g=dn();Ut();let y=dl(),k=yn();oo(U=>{x(U)}),ze(()=>{y.currentPage="view",x(g)});const b=()=>{y.commentShow=!1,T()},C=(U,X)=>{X===1&&(f.value=[],d.value=1);let K={pageId:U,pageNum:X};ut.pageHistoryList(K).then(V=>{let W=V.data||[];W.length<=0?d.value=0:(W.forEach(P=>P.loading=0),f.value=f.value.concat(W))})},I=U=>{c.value.loading=0,c.value=U,i.value=U.content,u.value=U.content},T=()=>{c.value.loading=0,i.value="",c.value={},f.value.forEach(U=>U.loading=0),u.value=a.value.content},M=U=>{T(),ut.pageDetail({id:U}).then(X=>{let K=X.data||{},V=K.wikiPage||{};V.selfZan=K.selfZan||0,n.value=V,a.value=K.pageContent||{},k.fileList=K.fileList||[],s.value=K.selfUserId||0,l.value={canEdit:K.canEdit,canDelete:K.canDelete,canUploadFile:K.canUploadFile,canDeleteFile:K.canDeleteFile,canConfigAuth:K.canConfigAuth},n.value.editorType===2&&(a.value.content=lo.mavonEditor.getMarkdownIt().render(a.value.content)),u.value=a.value.content,document.title=V.name||"WIKI-内容展示",t("switchSpace",n.value.spaceId),t("changeExpandedKeys",U),setTimeout(()=>{k.pageInfo.editorType!==0&&F(),A()},500),k.pageInfo=V,k.pageAuth=l.value}),C(U,1)};let L=_();const A=()=>{let U=Np.createNavigationHeading();if(U.length>0){let X=n.value.name||"WIKI-内容展示";U.unshift({level:1,node:L.value,text:X})}p.value=U},D=()=>{h.value=!1};let B=_();const F=()=>{const U=[];B.value.querySelectorAll("img").forEach((K,V)=>{U.push(K.src),K.onclick=()=>{m.value=V,v.value=U,h.value=!0}})},x=U=>{r.value={pageId:U.query.pageId},r.value.pageId&&M(r.value.pageId)};return(U,X)=>{const K=ee("el-col"),V=ee("el-row"),W=ee("el-icon"),P=ee("el-tab-pane"),H=ee("el-tabs"),Y=ee("el-image-viewer"),z=Sl("highlight");return o(k).pageInfo.editorType!==0?(w(),O("div",IV,[E(V,{type:"border-card",style:{height:"100%"}},{default:N(()=>[E(K,{span:o(y).commentShow?18:24,style:{padding:"20px","border-right":"1px solid #f1f1f1",height:"100%",overflow:"auto"}},{default:N(()=>[E(V,null,{default:N(()=>[E(K,{span:o(p).length>0?18:24},{default:N(()=>[R("div",NV,[R("div",{class:"wiki-title",ref_key:"wikiTitleRef",ref:L},ae(o(k).pageInfo.name),513),R("div",{id:"pageContentBox",ref_key:"pageContentRef",ref:B,class:"wiki-page-content"},[o(n).editorType==2?xe((w(),O("div",{key:0,innerHTML:o(u),class:"markdown-body"},null,8,PV)),[[z]]):(w(),O("div",{key:1,innerHTML:o(u),class:"wang-editor-body"},null,8,MV))],512),E(TV)])]),_:1},8,["span"]),o(p).length>0?(w(),G(K,{key:0,span:o(p).length>0?6:0},{default:N(()=>[E(Pp,{heading:o(p)},null,8,["heading"])]),_:1},8,["span"])):Z("",!0)]),_:1})]),_:1},8,["span"]),xe(E(K,{span:6,style:{height:"100%"}},{default:N(()=>[E(W,{onClick:b,class:"close-action-tab"},{default:N(()=>[E(o(Sn))]),_:1}),E(H,{modelValue:o(y).commentActiveTab,"onUpdate:modelValue":X[0]||(X[0]=q=>o(y).commentActiveTab=q)},{default:N(()=>[E(P,{label:"评论",name:"comment"},{default:N(()=>[E(hV)]),_:1}),E(P,{label:"附件",name:"annex"},{default:N(()=>[E(rV)]),_:1}),E(P,{label:"修改历史",name:"history"},{default:N(()=>[E(cV,{pageHistoryList:o(f),pageHistoryChoice:o(c),pageHistoryDetail:o(i),onHistoryClickHandle:I,onPreviewPageImage:F,onCreateNavigationHeading:A},null,8,["pageHistoryList","pageHistoryChoice","pageHistoryDetail"])]),_:1})]),_:1},8,["modelValue"])]),_:1},512),[[lt,o(y).commentShow]])]),_:1}),o(h)?(w(),G(Y,{key:0,"url-list":o(v),"initial-index":o(m),onClose:D,"hide-on-click-modal":""},null,8,["url-list","initial-index"])):Z("",!0)])):Z("",!0)}}},RV=Jn(LV,[["__scopeId","data-v-00ba83ac"]]);const OV={class:"wang-editor-box"},AV={class:"editor-toolbar-box fix-top"},VV={class:"wang-editor-content"},DV={class:"editor-container"},BV={class:"title-container"},xV={__name:"WangEditor",setup(e,{expose:t}){let n={excludeKeys:["fullScreen","undo","redo","emotion","|","lineHeight","fontFamily"]},l=_("");dn();let a=_({placeholder:"请输入文档内容",scroll:!1,MENU_CONF:{uploadImage:{server:".//iailab-doc-wiki/page/file/wangEditor/upload",fieldName:"files",maxFileSize:50*1024*1024,withCredentials:!0,meta:{pageId:l}},uploadVideo:{server:".//iailab-doc-wiki/page/file/wangEditor/upload",fieldName:"files",maxFileSize:300*1024*1024,withCredentials:!0,meta:{pageId:l}}}}),s="default";const r=Nt();let i=_("");const u=h=>{r.value=h},c=h=>{h.target.classList&&h.target.classList.contains("page-editor-body")&&(r.value.blur(),r.value.focus(!0))},f=()=>({title:i.value,html:r.value.getHtml(),text:r.value.getText()}),d=h=>{i.value=h},p=h=>{l.value=h},m=h=>{r.value.select([]),r.value.deleteFragment(),r.value.dangerouslyInsertHtml(h)};return Rt(()=>{const h=r.value;h!=null&&h.destroy()}),t({setTitle:d,setPageId:p,setHtml:m,getPageData:f}),(h,v)=>(w(),O("div",OV,[R("div",AV,[E(o(rm),{class:"editor-toolbar",defaultConfig:o(n),mode:o(s),editor:r.value},null,8,["defaultConfig","mode","editor"])]),R("div",VV,[R("div",DV,[R("div",BV,[xe(R("input",{"onUpdate:modelValue":v[0]||(v[0]=g=>bt(i)?i.value=g:i=g),placeholder:"请输入标题",maxlength:40},null,512),[[Ao,o(i)]])]),R("div",{onClick:c,class:"page-editor-body"},[E(o(im),{defaultConfig:o(a),mode:o(s),onOnCreated:u},null,8,["defaultConfig","mode"])])])])]))}};const FV={style:{height:"100%"},class:"page-edit-vue"},zV={style:{"box-sizing":"border-box",background:"#f5f5f5",overflow:"hidden"}},HV={style:{padding:"10px",background:"#fff"}},KV={__name:"Edit",props:{spaceId:Number},emits:["loadPageList"],setup(e,{emit:t}){const n=e;let l=_({}),a=_({editorType:2,pageTitle:""}),s=_({}),r=_({}),i=_([]),u=_({}),c=_(!1),f=_(""),d=_(""),p=_(""),m=_(".//iailab-doc-wiki/page/file/wangEditor/upload"),h={bold:!0,italic:!0,header:!0,underline:!0,strikethrough:!0,mark:!0,superscript:!0,subscript:!0,quote:!0,ol:!0,ul:!0,link:!0,imagelink:!0,code:!0,table:!0,fullscreen:!0,readmodel:!0,undo:!0,redo:!0,trash:!0,save:!0,navigation:!0,alignleft:!0,aligncenter:!0,alignright:!0,subfield:!0,preview:!0},v=zo(),g=yn(),y=dl();oo(V=>{x(V)});let k=dn(),b=Ut();Il(()=>{I()}),ze(()=>{K(),x(k);let V=this;window.onunload=function(){V.unlockPage()},window.onbeforeunload=function(){V.unlockPage()},y.showHeader=!1});const C=()=>{y.showMenu=!y.showMenu,setTimeout(()=>{y.showMenu?y.rightAsideWidth=301:y.rightAsideWidth=1},100)},I=()=>{c.value||(c.value=!0,ut.pageUnlock({pageId:f.value}))},T=()=>{Tl.confirm("确定要取消编辑吗?您编辑的内容将不会被保存哦~","提示",{confirmButtonText:"确定",cancelButtonText:"继续编辑",type:"warning"}).then(()=>{I(),b.back(),y.showHeader=!0})};let M=_();const L=V=>{let W="",P="";if(a.value.editorType===2)W=p.value,P=p.value;else{let z=M.value.getPageData();W=z.html,P=z.text,a.value.pageTitle=z.title}if(!a.value.pageTitle){Ct.warning("标题不能为空");return}let H=f.value>0?"":d.value;f.value&&(s.value.id=f.value);let Y={spaceId:n.spaceId,parentId:H,id:s.value.id,name:a.value.pageTitle,editorType:a.value.editorType,content:W,preview:P};ut.updatePage(Y).then(z=>{Ct.success("保存成功!"),A(),f.value=z.data.id,V==1?b.push({path:"/page/show",query:{pageId:f.value}}).then(()=>{y.showHeader=!0}):D(f.value)})},A=()=>{let V={spaceId:v.chooseSpaceId};ut.pageList(V).then(W=>{g.wikiPageList=W.data||[]})},D=V=>{ut.pageDetail({id:V}).then(W=>{s.value=W.data.wikiPage||{},r.value=W.data.pageContent||{},i.value=W.data.fileList||[],a.value.pageTitle=s.value.name,a.value.editorType=s.value.editorType,a.value.editorType===2?p.value=r.value.content||"":setTimeout(()=>{M.value.setTitle(s.value.name||""),M.value.setHtml(r.value.content||"")},0)})},B=V=>{V&&ut.pageDetail({id:V}).then(W=>{u.value=W.data.wikiPage||{}})},F=()=>{s.value={},r.value={},i.value=[],a.value.pageTitle="",l.value.txt&&l.value.txt.html("")},x=V=>{f.value=V.query.pageId,d.value=V.query.parentId,f.value&&M.value.setPageId(f.value),f.value?(D(f.value),ut.pageLock({pageId:f.value}).catch(W=>{Tl.alert(W.errMsg||"未知错误","错误",{confirmButtonText:"确定",callback:()=>{b.back()}})})):(B(d.value),F())};let U=_();const X=(V,W)=>{let P=new FormData;P.append("files",W),f.value&&P.append("pageId",f.value),Ka({url:m.value,method:"post",data:P,headers:{"Content-Type":"multipart/form-data"},timeout:1e4,withCredentials:!0}).then(H=>{let Y=H.data.data||{};Y.url?U.value.$img2Url(V,Y.url):Ct.warning("上传失败,返回数据为空")}).catch(H=>{Ct.warning("上传失败:"+H.message)})},K=()=>{};return(V,W)=>{const P=ee("el-button"),H=ee("el-col"),Y=ee("el-input"),z=ee("el-row");return w(),O("div",FV,[E(z,{class:"fake-header"},{default:N(()=>[E(H,{style:{flex:"0 0 45px"},class:"collapse-box"},{default:N(()=>[o(y).showMenu?(w(),G(P,{key:0,onClick:C,text:"",icon:o(rc),class:"fold-btn"},null,8,["icon"])):(w(),G(P,{key:1,onClick:C,text:"",icon:o(ic),class:"fold-btn"},null,8,["icon"]))]),_:1}),E(H,{style:{flex:"1 1 auto"}},{default:N(()=>[o(a).editorType===2?(w(),G(Y,{key:0,modelValue:o(a).pageTitle,"onUpdate:modelValue":W[0]||(W[0]=q=>o(a).pageTitle=q),maxlength:40,placeholder:"请输入标题",class:"page-title-input"},null,8,["modelValue"])):Z("",!0)]),_:1}),E(H,{style:{flex:"0 0 180px","text-align":"right"}},{default:N(()=>[E(P,{type:"primary",onClick:W[1]||(W[1]=q=>L(1)),icon:o(Jv)},{default:N(()=>[ye("保存")]),_:1},8,["icon"]),E(P,{onClick:T,icon:o(Qu),style:{"margin-right":"5px"}},{default:N(()=>[ye("取消")]),_:1},8,["icon"])]),_:1})]),_:1}),R("div",zV,[xe(R("div",HV,[E(o(lo.mavonEditor),{ref_key:"mavonEditorRef",ref:U,modelValue:o(p),"onUpdate:modelValue":W[2]||(W[2]=q=>bt(p)?p.value=q:p=q),toolbars:o(h),externalLink:!1,style:{height:"calc(100vh - 100px)","z-index":"1"},onSave:W[3]||(W[3]=q=>L(0)),onImgAdd:X,placeholder:"请录入文档内容",class:"page-content-editor wang-editor-body"},null,8,["modelValue","toolbars"])],512),[[lt,o(a).editorType===2]]),xe(R("div",null,[E(xV,{ref_key:"wangEditorRef",ref:M},null,512)],512),[[lt,o(a).editorType===1]])])])}}},WV=Jn(KV,[["__scopeId","data-v-d6bd756c"]]);const UV={style:{"min-height":"100%"},class:"space-manage-vue"},jV={style:{"max-width":"1200px",margin:"0 auto",background:"#fff",padding:"20px","min-height":"100%","box-sizing":"border-box"}},qV={style:{"text-align":"right","margin-bottom":"10px"}},GV={style:{float:"left","line-height":"40px"}},YV={key:1},XV={class:"page-info-box"},ZV={style:{"text-align":"right"}},JV={__name:"Manage",setup(e){let t=_(!1);_([]);let n=_([]);_("");let l=_({});_({id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1});let a=_({}),s=_(""),r=_(!1),i=_(""),u=_([]),c=_({}),f=_([]),d=_({wiki_only_show_favorite:0}),p=dn(),m=Ut(),h=dl(),v=yn(),g=zo();ze(()=>{h.currentPage="space",U(),P(),W()});const y=z=>{let q=m.resolve({path:"/page/share/home",query:{space:z}});window.open(q.href,"_blank")};let k=_();const b=()=>{k.value.show()},C=z=>{k.value.show(z.id)},I=()=>{if(!i.value){Ct.warning("请先选择分组");return}if(f.value.find(z=>z.groupId==i.value)){i.value="";return}f.value.push({groupId:i.value,editPage:0,commentPage:0,deletePage:0,pageFileUpload:0,pageFileDelete:0,pageAuthManage:0}),i.value=""},T=z=>{let q=z.favorite==1?1:0;ut.spaceFavoriteUpdate({spaceId:z.id,delFlag:q}).then(se=>{z.favorite=z.favorite==1?0:1})},M=()=>{let z={spaceId:s.value,authList:JSON.stringify(f.value)};ut.spaceAuthAssign(z).then(q=>{Ct.success("授权成功!")})},L=()=>{let z=location.href.substring(0,location.href.indexOf("/doc-wiki"))+"#/console/userGroupList";window.open(z,"_blank")},A=z=>{f.value=f.value.filter(q=>q.groupId!=z.groupId)},D=z=>{s.value=z.id,i.value="",f.value=[],Yn.userGroupList().then(q=>{u.value=q.data||[],u.value.forEach(se=>c.value[se.id]=se.name)}),ut.spaceAuthList({spaceId:z.id}).then(q=>{f.value=q.data||[],r.value=!0})},B=z=>{Tl.confirm("确定要删除此空间及下面的所有文档吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{let q={id:z.id,delFlag:1};ut.updateSpace(q).then(()=>{Ct.success("删除成功"),U(),H()})})};let F=_(0),x=_({ignoreFavorite:1,pageNum:1,pageSize:10});const U=()=>{t.value=!0,ut.spaceList(x.value).then(z=>{n.value=z.data||[],x.value.pageNum===1&&(F.value=z.total),setTimeout(()=>t.value=!1,500)})},X=z=>{x.value.pageSize=z,U()},K=z=>{x.value.pageNum=z,U()},V=()=>{let z={name:"wiki_only_show_favorite",value:d.value.wiki_only_show_favorite};ut.spaceSettingUpdate(z).then(q=>{H()})},W=()=>{ut.spaceSettingList().then(z=>{let q=z.data||{};d.value={wiki_only_show_favorite:q.wiki_only_show_favorite||0}})},P=()=>{Yn.getSelfUserInfo().then(z=>{a.value=z.data})},H=z=>{ut.spaceList({}).then(q=>{g.spaceList=q.data||[];let se=[];if(g.spaceList.forEach(pe=>se.push({label:pe.name,value:pe.id})),g.spaceOptions=se,n.value.length>0){let pe=z,oe=g.spaceList.find(re=>re.id===z);oe||(oe=g.spaceList[0],pe=oe.id),l.value=oe,g.spaceInfo=oe,g.chooseSpaceId=pe,v.choosePageId=0,Y();try{p.path==="/home"&&m.push({path:"/home",query:{spaceId:pe}})}catch(re){console.log(re)}}})},Y=(z,q)=>{let se={spaceId:g.chooseSpaceId};ut.pageList(se).then(pe=>{v.wikiPageList=pe.data||[]})};return(z,q)=>{const se=ee("el-switch"),pe=ee("el-icon"),oe=ee("el-tooltip"),re=ee("el-button"),Q=ee("el-table-column"),ve=ee("el-link"),_e=ee("el-table"),Te=ee("el-pagination"),Ie=ee("el-option"),Ke=ee("el-select"),Ge=ee("el-row"),qe=ee("el-checkbox"),it=ee("el-dialog");return w(),O("div",UV,[R("div",jV,[R("div",qV,[R("span",GV,[ye(" 仅展示我收藏的空间: "),E(se,{modelValue:o(d).wiki_only_show_favorite,"onUpdate:modelValue":q[0]||(q[0]=ke=>o(d).wiki_only_show_favorite=ke),"inactive-value":"0","active-value":"1",onChange:V},null,8,["modelValue"]),E(oe,{class:"item",effect:"dark",content:"控制左上角空间下拉列表仅展示我收藏的空间",placement:"top-start"},{default:N(()=>[E(pe,{style:{"vertical-align":"middle","margin-left":"10px",color:"#999"}},{default:N(()=>[E(o(Qv))]),_:1})]),_:1})]),E(re,{onClick:U,icon:o(em),loading:o(t)},{default:N(()=>[ye("刷新")]),_:1},8,["icon","loading"]),E(re,{type:"primary",onClick:b,icon:o(za)},{default:N(()=>[ye("创建空间")]),_:1},8,["icon"])]),E(_e,{data:o(n),border:"",style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(Q,{prop:"id",label:"ID",width:"60"}),E(Q,{prop:"name",label:"名字"}),E(Q,{prop:"spaceExplain",label:"说明"}),E(Q,{label:"开放地址"},{default:N(ke=>[ke.row.openDoc==1?(w(),G(ve,{key:0,onClick:Ee=>y(ke.row.uuid)},{default:N(()=>[ye(ae(ke.row.name),1)]),_:2},1032,["onClick"])):(w(),O("span",YV,"暂未开放"))]),_:1}),E(Q,{prop:"createUserName",label:"创建人"}),E(Q,{prop:"createTime",label:"创建时间"}),E(Q,{prop:"favorite",label:"收藏",width:"60"},{default:N(ke=>[ke.row.favorite===1?(w(),G(pe,{key:0,onClick:Ee=>T(ke.row),class:"favorite-icon el-icon-star-on"},{default:N(()=>[E(o(vo))]),_:2},1032,["onClick"])):(w(),G(pe,{key:1,onClick:Ee=>T(ke.row),class:"favorite-icon el-icon-star-off"},{default:N(()=>[E(o(ec))]),_:2},1032,["onClick"]))]),_:1}),E(Q,{label:"操作",width:"220"},{default:N(ke=>[o(a).id==ke.row.createUserId?(w(),O(Ne,{key:0},[E(re,{size:"small",type:"primary",onClick:Ee=>C(ke.row)},{default:N(()=>[ye("编辑")]),_:2},1032,["onClick"]),E(re,{size:"small",type:"warning",onClick:Ee=>D(ke.row)},{default:N(()=>[ye("授权")]),_:2},1032,["onClick"]),E(re,{size:"small",type:"danger",onClick:Ee=>B(ke.row)},{default:N(()=>[ye("删除")]),_:2},1032,["onClick"])],64)):Z("",!0)]),_:1})]),_:1},8,["data"]),R("div",XV,[E(Te,{onSizeChange:X,onCurrentChange:K,"page-sizes":[10,30,50],"page-size":10,"current-page":o(x).pageNum,layout:"prev, pager, next, jumper, sizes, total",total:o(F)},null,8,["current-page","total"])])]),E(it,{title:"权限管理",modelValue:o(r),"onUpdate:modelValue":q[2]||(q[2]=ke=>bt(r)?r.value=ke:r=ke),width:"900px","close-on-click-modal":!1},{default:N(()=>[E(Ge,null,{default:N(()=>[E(Ke,{modelValue:o(i),"onUpdate:modelValue":q[1]||(q[1]=ke=>bt(i)?i.value=ke:i=ke),filterable:"",placeholder:"请选择分组",style:{width:"750px","margin-right":"10px"}},{default:N(()=>[(w(!0),O(Ne,null,Ze(o(u),ke=>(w(),G(Ie,{key:ke.id,label:o(c)[ke.id],value:ke.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),E(re,{onClick:I},{default:N(()=>[ye("添加")]),_:1})]),_:1}),E(_e,{data:o(f),border:"",style:{width:"100%",margin:"10px 0"}},{default:N(()=>[E(Q,{prop:"groupId",label:"分组名",width:"150"},{default:N(ke=>[ye(ae(o(c)[ke.row.groupId]),1)]),_:1}),E(Q,{label:"权限"},{default:N(ke=>[E(qe,{"true-label":1,"false-label":0,modelValue:ke.row.editPage,"onUpdate:modelValue":Ee=>ke.row.editPage=Ee},{default:N(()=>[ye("编辑")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(qe,{"true-label":1,"false-label":0,modelValue:ke.row.deletePage,"onUpdate:modelValue":Ee=>ke.row.deletePage=Ee},{default:N(()=>[ye("删除")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(qe,{"true-label":1,"false-label":0,modelValue:ke.row.pageFileUpload,"onUpdate:modelValue":Ee=>ke.row.pageFileUpload=Ee},{default:N(()=>[ye("文件上传")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(qe,{"true-label":1,"false-label":0,modelValue:ke.row.pageFileDelete,"onUpdate:modelValue":Ee=>ke.row.pageFileDelete=Ee},{default:N(()=>[ye("文件删除")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(qe,{"true-label":1,"false-label":0,modelValue:ke.row.pageAuthManage,"onUpdate:modelValue":Ee=>ke.row.pageAuthManage=Ee},{default:N(()=>[ye("权限管理")]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1}),E(Q,{label:"操作",width:"80"},{default:N(ke=>[E(re,{size:"small",type:"danger",plain:"",onClick:Ee=>A(ke.row)},{default:N(()=>[ye("删除")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),R("div",ZV,[E(re,{onClick:L},{default:N(()=>[ye("分组管理")]),_:1}),E(re,{type:"primary",onClick:M},{default:N(()=>[ye("保存配置")]),_:1})])]),_:1},8,["modelValue"]),E(o($p),{ref_key:"createSpaceRef",ref:k,onSuccess:U},null,512)])}}};const QV={style:{padding:"10px"},class:"page-share-home-vue"},eD={style:{"max-width":"800px",margin:"0 auto"}},tD={key:0,class:"empty-news"},nD={class:"line-box"},lD={class:"line-title"},oD={class:"text-link"},aD={class:"text-link"},sD={class:"page-preview-box"},rD=["onClick","innerHTML"],iD=["innerHTML"],uD=R("img",{src:Ho,class:"zan-img"},null,-1),cD={class:"page-info-box"},dD={__name:"Home",setup(e){let t=_(0),n=_({spaceId:"",newsType:1,pageNum:1,pageSize:20}),l=_([]);oo(d=>{f(d)});let a=dn(),s=Ut();ze(()=>{f(a)});const r=()=>{ut.openPageNews(n.value).then(d=>{l.value=d.data||[],t.value=d.total})},i=d=>{n.value.pageSize=d,r()},u=d=>{let p={space:d.space,pageId:d.pageId};s.push({path:"/page/share/view",query:p})},c=d=>{n.value.pageNum=d,r()},f=d=>{n.value={space:d.query.space,newsType:1,pageNum:1,pageSize:20},n.value.space&&r()};return(d,p)=>{const m=ee("el-icon"),h=ee("el-pagination");return w(),O("div",QV,[R("div",eD,[o(l).length<=0?(w(),O("div",tD,"暂无数据")):(w(!0),O(Ne,{key:1},Ze(o(l),v=>(w(),O("div",nD,[R("div",lD,[R("span",oD,ae(v.createUserName),1),ye(" 发布于 "),R("span",aD,ae(v.spaceName),1)]),R("div",sD,[R("div",{class:"page-preview-title",onClick:g=>u(v),innerHTML:v.pageTitle},null,8,rD),R("div",{class:"page-preview-content",innerHTML:v.previewContent},null,8,iD),R("div",null,[R("span",null,[uD,ye(ae(v.zanNum)+" ",1)]),R("span",null,[E(m,{class:"view-img"},{default:N(()=>[E(o(Vo))]),_:1}),ye(" "+ae(v.viewNum)+" ",1)]),R("span",null,ae(v.updateTime||v.createTime),1)])])]))),256)),R("div",cD,[E(h,{onSizeChange:i,onCurrentChange:c,"page-sizes":[20,50,100],"page-size":20,"current-page":o(n).pageNum,layout:"prev, pager, next, jumper, sizes, total",total:o(t)},null,8,["current-page","total"])])])])}}};const fD={class:"page-share-view-vue"},pD={style:{"max-width":"1000px","padding-left":"10px",margin:"0 auto"}},vD={class:"wiki-author"},mD={key:0},hD={key:1},gD={class:"wiki-files"},yD=["href"],bD=["innerHTML"],wD=["innerHTML"],kD={__name:"View",setup(e){let t=_(""),n=_(""),l=_({}),a=_([]),s=_(""),r=_(0),i=_(!1),u=_([]),c=_([]);oo(k=>{m(k)});let f=dn();Ut(),ze(()=>{m(f)});let d=_();const p=k=>{let b={pageId:k,space:t.value};ut.openPageDetail(b).then(C=>{let I=C.data.wikiPage||{};I.selfZan=C.data.selfZan||0,l.value=I;let T=C.data.pageContent||{};a.value=C.data.fileList||[],l.value.editorType===2&&(T.content=lo.mavonEditor.getMarkdownIt().render(T.content)),s.value=T.content;let M=I.name||"WIKI-内容展示";document.title=M,setTimeout(()=>{y();let L=Np.createNavigationHeading();c.length>0&&L.unshift({level:1,node:d.value,text:M}),c.value=L},500)})},m=k=>{t.value=k.query.space,n.value=k.query.pageId,n.value&&p(n.value)},h=k=>{if(!k)return"-";let b="";k<.1*1024?b=k.toFixed(2)+"B":k<.1*1024*1024?b=(k/1024).toFixed(2)+"KB":k<.1*1024*1024*1024?b=(k/(1024*1024)).toFixed(2)+"MB":b=(k/(1024*1024*1024)).toFixed(2)+"GB";let C=b+"",I=C.indexOf(".");return C.substr(I+1,2)=="00"?C.substring(0,I)+C.substr(I+3,2):b},v=()=>{i.value=!1};let g=_();const y=()=>{const k=[];g.value.querySelectorAll("img").forEach((C,I)=>{k.push(C.src),C.onclick=()=>{r.value=I,u.value=k,i.value=!0}})};return(k,b)=>{const C=ee("el-table-column"),I=ee("el-table"),T=ee("el-col"),M=ee("el-row"),L=ee("el-image-viewer");return w(),O("div",fD,[E(M,{type:"border-card"},{default:N(()=>[E(T,{xs:24,sm:o(c).length>0?20:24,md:o(c).length>0?20:24,lg:o(c).length>0?18:24,xl:o(c).length>0?18:24},{default:N(()=>[R("div",pD,[R("div",{class:"wiki-title",ref_key:"wikiTitleRef",ref:d},ae(o(l).name),513),R("div",vD,[o(l).updateTime?(w(),O("span",mD,"最后修改:"+ae(o(l).updateTime),1)):(w(),O("span",hD,"创建时间:"+ae(o(l).createTime),1))]),R("div",gD,[xe(E(I,{data:o(a),border:"",style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(C,{label:"文件名"},{default:N(A=>[R("a",{target:"_blank",href:A.row.fileUrl},ae(A.row.fileName),9,yD)]),_:1}),E(C,{label:"文件大小"},{default:N(A=>[ye(ae(h(A.row.fileSize)),1)]),_:1}),E(C,{prop:"createTime",label:"创建时间",width:"180px"}),E(C,{prop:"downloadNum",label:"下载次数",width:"80px"})]),_:1},8,["data"]),[[lt,o(a).length>0]])]),R("div",{ref_key:"pageContentRef",ref:g,class:"wiki-page-content"},[o(l).editorType==2?(w(),O("div",{key:0,innerHTML:o(s),class:"markdown-body"},null,8,bD)):(w(),O("div",{key:1,innerHTML:o(s),class:"wang-editor-body"},null,8,wD))],512)])]),_:1},8,["sm","md","lg","xl"]),o(c).length>0?(w(),G(T,{key:0,xs:0,sm:4,md:4,lg:6,xl:6},{default:N(()=>[E(Pp,{heading:o(c)},null,8,["heading"])]),_:1})):Z("",!0)]),_:1}),o(i)?(w(),G(L,{key:0,"url-list":o(u),"initial-index":o(r),onClose:v,"hide-on-click-modal":""},null,8,["url-list","initial-index"])):Z("",!0)])}}};const CD={class:"mobile-share-view-vue"},SD={style:{"max-width":"950px",margin:"0 auto"}},_D={class:"wiki-author"},ED={key:0},$D={key:1},TD={class:"wiki-files"},ID=["href"],ND=["innerHTML"],PD=["innerHTML"],MD={__name:"View",emits:["popupShow"],setup(e,{emit:t}){let n=_(""),l=_(""),a=_({}),s=_([]),r=_(""),i=_(0),u=_([]);oo(g=>{p(g)});let c=dn();Ut(),ze(()=>{p(c)});const f=()=>{t("popupShow",!0)},d=g=>{let y={pageId:g,space:n.value};ut.openPageDetail(y).then(k=>{let b=k.data.wikiPage||{};b.selfZan=k.data.selfZan||0,a.value=b;let C=k.data.pageContent||{};s.value=k.data.fileList||[],a.value.editorType===2&&(C.content=lo.mavonEditor.getMarkdownIt().render(C.content)),r.value=C.content,document.title=b.name||"WIKI-内容展示",setTimeout(()=>v(),500)})},p=g=>{n.value=g.query.space,l.value=g.query.pageId,l.value&&d(l.value)},m=g=>{if(!g)return"-";let y="";g<.1*1024?y=g.toFixed(2)+"B":g<.1*1024*1024?y=(g/1024).toFixed(2)+"KB":g<.1*1024*1024*1024?y=(g/(1024*1024)).toFixed(2)+"MB":y=(g/(1024*1024*1024)).toFixed(2)+"GB";let k=y+"",b=k.indexOf(".");return k.substr(b+1,2)=="00"?k.substring(0,b)+k.substr(b+3,2):y};let h=_();const v=()=>{const g=[];h.value.querySelectorAll("img").forEach((k,b)=>{g.push(k.src),k.onclick=()=>{i.value=b,u.value=g,am({images:g,startPosition:b})}})};return(g,y)=>{const k=ee("van-icon"),b=ee("van-nav-bar"),C=ee("el-table-column"),I=ee("el-table"),T=ee("el-row");return w(),O("div",CD,[E(b,{title:o(a).name,class:"header"},{left:N(()=>[E(k,{name:"wap-nav",size:"20",onClick:f})]),_:1},8,["title"]),E(T,{type:"border-card",class:"main"},{default:N(()=>[R("div",SD,[R("div",_D,[o(a).updateTime?(w(),O("span",ED,"最后修改:"+ae(o(a).updateTime),1)):(w(),O("span",$D,"创建时间:"+ae(o(a).createTime),1))]),R("div",TD,[xe(E(I,{data:o(s),border:"",style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(C,{label:"文件名"},{default:N(M=>[R("a",{target:"_blank",href:M.row.fileUrl},ae(M.row.fileName),9,ID)]),_:1}),E(C,{label:"文件大小"},{default:N(M=>[ye(ae(m(M.row.fileSize)),1)]),_:1}),E(C,{prop:"createTime",label:"创建时间",width:"180px"}),E(C,{prop:"downloadNum",label:"下载次数",width:"80px"})]),_:1},8,["data"]),[[lt,o(s).length>0]])]),R("div",{ref_key:"pageContentRef",ref:h,class:"wiki-page-content"},[o(a).editorType==2?(w(),O("div",{key:0,innerHTML:o(r),class:"markdown-body"},null,8,ND)):(w(),O("div",{key:1,innerHTML:o(r),class:"wang-editor-body"},null,8,PD))],512)])]),_:1})])}}};const LD={class:"login-box"},RD=R("h3",{class:"title"},"IAILAB文档管理-系统登录",-1),OD=R("div",{class:"power-by"},[ye("Powered By "),R("a",{target:"_blank",href:"https://xxxx"},"iailab-doc")],-1),AD={__name:"Login",setup(e){const t=_(!1);_("密码模式"),_("授权模式");const n=_("");let l=dn(),a=Ut();const s=_(Math.ceil(Math.random()*5)),r=St({loginParam:{username:"",password:""}}),i={username:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]};ze(()=>{n.value=l.params.redirect;let c=uc.get("accessToken");console.log(c)});const u=async c=>{t.value=!0,Yn.userLogin(r.loginParam).then(()=>{Ct.success("loginSuccess"),t.value=!1,n.value?location.href=decodeURIComponent(n.value):a.push("/home")}).catch(f=>{console.log("登录失败",f),Ct.error("登录失败"),t.value=!1})};return(c,f)=>{const d=ee("el-input"),p=ee("el-form-item"),m=ee("el-button"),h=ee("el-form");return w(),O("div",{class:$("login-background linear-gradient-"+s.value)},[R("div",LD,[E(h,{model:r.loginParam,rules:i,ref:"loginParam","label-position":"left","label-width":"0px",class:"demo-ruleForm login-container"},{default:N(()=>[RD,E(p,{prop:"username"},{default:N(()=>[E(d,{type:"text",modelValue:r.loginParam.username,"onUpdate:modelValue":f[0]||(f[0]=v=>r.loginParam.username=v),"auto-complete":"off",placeholder:"账号",onKeyup:pt(u,["enter","native"])},null,8,["modelValue","onKeyup"])]),_:1}),E(p,{prop:"password"},{default:N(()=>[E(d,{type:"password",modelValue:r.loginParam.password,"onUpdate:modelValue":f[1]||(f[1]=v=>r.loginParam.password=v),"auto-complete":"off",placeholder:"密码",onKeyup:pt(u,["enter","native"])},null,8,["modelValue","onKeyup"])]),_:1}),E(p,{style:{width:"100%"}},{default:N(()=>[E(m,{type:"primary",style:{width:"100%"},onClick:Fe(u,["prevent"]),loading:t.value},{default:N(()=>[ye(" 登录 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1},8,["model"])]),OD],2)}}};const Mp=e=>(fr("data-v-7c225de6"),e=e(),pr(),e),VD=Mp(()=>R("div",{class:"login-box"},[R("h3",{class:"title"}," 正在使用 code 授权码,进行 accessToken 访问令牌的获取 ")],-1)),DD=Mp(()=>R("div",{class:"power-by"},[ye("Powered By "),R("a",{target:"_blank",href:"https://xxxx"},"iailab-doc")],-1)),BD=[VD,DD],xD={__name:"Callback",setup(e){const{VITE_APP_SSO_CODE_CALLBACK_URL:t,VITE_APP_SSO_LOGIN_BY_CODE:n}={VITE_APP_BASE_API:"./",BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1},{currentRoute:l}=Ut();let a=Ut();const s=_(Math.ceil(Math.random()*5));ze(()=>{r()});const r=()=>{const u=l.value.query.code;if(!u){alert("获取不到 code 参数,请排查!");return}let c=t;Ka({url:n+"?code="+u+"&redirectUri="+c,method:"POST"}).then(f=>{const d=f.data,p=d.data.accessToken;if(d.errCode!==200){alert("获得访问令牌失败!");return}let m=new Date(new Date*1+d.data.expiresIn*1e3);i(p,m),alert("获得访问令牌成功!点击确认,跳转回首页"),a.push("/home")})},i=(u,c)=>{uc.set("accessToken",u,{expires:c})};return(u,c)=>(w(),O("div",{class:$("login-background linear-gradient-"+s.value)},BD,2))}},FD=Jn(xD,[["__scopeId","data-v-7c225de6"]]);let zD=[{path:"/",redirect:"/home"},{path:"/user/login",name:"系统登录",component:AD,meta:{fullscreen:!0}},{path:"/callback",name:"授权回调页面",component:FD,meta:{fullscreen:!0}},{path:"/page/search",name:"WIKI-全局搜索",component:DA},{path:"/common/noAuth",name:"WIKI-没有权限",component:FA},{path:"/",name:"文档管理",component:nA,children:[{path:"/home",name:"WIKI文档管理",component:JA},{path:"/user/myInfo",name:"WIKI-我的信息",component:nV},{path:"/page/show",name:"WIKI-页面查看",component:RV},{path:"/page/edit",name:"WIKI-编辑内容",component:WV},{path:"/space/manage",name:"WIKI-空间管理",component:JV}]},{path:"/",name:"PC端开放文档",component:pA,children:[{path:"/page/share/home",name:"WIKI-开放文档",component:dD},{path:"/page/share/view",name:"WIKI-内容展示",component:kD}]},{path:"/",name:"APP端开放文档",component:SA,children:[{path:"/page/share/mobile/view",name:"WIKI-开放文档-APP",component:MD}]}];const HD=tm({history:nm(),routes:zD}),fl=Uu(dm);fl.config.productionTip=!1;fl.use(lm);fl.use(HR,{locale:KR});fl.use(sm);fl.use(HD);fl.use(om());fl.mount("#app");fl.directive("highlight",function(e){e.querySelectorAll("pre code").forEach(n=>{Lp.highlightBlock(n)})}); |
| | | `}),u=S(()=>2*Math.PI*r.value),c=S(()=>t.type==="dashboard"?.75:1),f=S(()=>`${-1*u.value*(1-c.value)/2}px`),d=S(()=>({strokeDasharray:`${u.value*c.value}px, ${u.value}px`,strokeDashoffset:f.value})),p=S(()=>({strokeDasharray:`${u.value*c.value*(t.percentage/100)}px, ${u.value}px`,strokeDashoffset:f.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),m=S(()=>{let b;return t.color?b=k(t.percentage):b=n[t.status]||n.default,b}),h=S(()=>t.status==="warning"?Da:t.type==="line"?t.status==="success"?Ba:Zn:t.status==="success"?no:Sn),v=S(()=>t.type==="line"?12+t.strokeWidth*.4:t.width*.111111+2),g=S(()=>t.format(t.percentage));function y(b){const C=100/b.length;return b.map((T,M)=>ct(T)?{color:T,percentage:(M+1)*C}:T).sort((T,M)=>T.percentage-M.percentage)}const k=b=>{var C;const{color:I}=t;if(kt(I))return I(b);if(ct(I))return I;{const T=y(I);for(const M of T)if(M.percentage>b)return M.color;return(C=T[T.length-1])==null?void 0:C.color}};return(b,C)=>(w(),O("div",{class:$([o(l).b(),o(l).m(b.type),o(l).is(b.status),{[o(l).m("without-text")]:!b.showText,[o(l).m("text-inside")]:b.textInside}]),role:"progressbar","aria-valuenow":b.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[b.type==="line"?(w(),O("div",{key:0,class:$(o(l).b("bar"))},[R("div",{class:$(o(l).be("bar","outer")),style:Re({height:`${b.strokeWidth}px`})},[R("div",{class:$([o(l).be("bar","inner"),{[o(l).bem("bar","inner","indeterminate")]:b.indeterminate},{[o(l).bem("bar","inner","striped")]:b.striped},{[o(l).bem("bar","inner","striped-flow")]:b.stripedFlow}]),style:Re(o(a))},[(b.showText||b.$slots.default)&&b.textInside?(w(),O("div",{key:0,class:$(o(l).be("bar","innerText"))},[ie(b.$slots,"default",{percentage:b.percentage},()=>[R("span",null,ae(o(g)),1)])],2)):Z("v-if",!0)],6)],6)],2)):(w(),O("div",{key:1,class:$(o(l).b("circle")),style:Re({height:`${b.width}px`,width:`${b.width}px`})},[(w(),O("svg",F$,[R("path",{class:$(o(l).be("circle","track")),d:o(i),stroke:`var(${o(l).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-width":o(s),fill:"none",style:Re(o(d))},null,14,z$),R("path",{class:$(o(l).be("circle","path")),d:o(i),stroke:o(m),fill:"none",opacity:b.percentage?1:0,"stroke-linecap":b.strokeLinecap,"stroke-width":o(s),style:Re(o(p))},null,14,H$)]))],6)),(b.showText||b.$slots.default)&&!b.textInside?(w(),O("div",{key:2,class:$(o(l).e("text")),style:Re({fontSize:`${o(v)}px`})},[ie(b.$slots,"default",{percentage:b.percentage},()=>[b.status?(w(),G(o(Pe),{key:1},{default:N(()=>[(w(),G(rt(o(h))))]),_:1})):(w(),O("span",K$,ae(o(g)),1))])],6)):Z("v-if",!0)],10,x$))}});var j$=he(U$,[["__file","/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]);const vf=Qe(j$),q$=ge({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:te([Array,Object]),default:()=>Ot(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:te([Array,Object]),default:()=>[vo,vo,vo]},voidIcon:{type:Pt,default:()=>ec},disabledVoidIcon:{type:Pt,default:()=>vo},disabled:Boolean,allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:te(Array),default:()=>Ot(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:ln,label:{type:String,default:void 0},clearable:{type:Boolean,default:!1}}),G$={[Mt]:e=>He(e),[tt]:e=>He(e)},Y$=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"],X$=["onMousemove","onClick"],Z$=j({name:"ElRate"}),J$=j({...Z$,props:q$,emits:G$,setup(e,{expose:t,emit:n}){const l=e;function a(K,V){const W=Y=>It(Y),P=Object.keys(V).map(Y=>+Y).filter(Y=>{const z=V[Y];return(W(z)?z.excluded:!1)?K<Y:K<=Y}).sort((Y,z)=>Y-z),H=V[P[0]];return W(H)&&H.value||H}const s=Me(Ml,void 0),r=Me(zn,void 0),i=qt(),u=ce("rate"),{inputId:c,isLabeledByFormItem:f}=cl(l,{formItemContext:r}),d=_(l.modelValue),p=_(-1),m=_(!0),h=S(()=>[u.b(),u.m(i.value)]),v=S(()=>l.disabled||(s==null?void 0:s.disabled)),g=S(()=>u.cssVarBlock({"void-color":l.voidColor,"disabled-void-color":l.disabledVoidColor,"fill-color":C.value})),y=S(()=>{let K="";return l.showScore?K=l.scoreTemplate.replace(/\{\s*value\s*\}/,v.value?`${l.modelValue}`:`${d.value}`):l.showText&&(K=l.texts[Math.ceil(d.value)-1]),K}),k=S(()=>l.modelValue*100-Math.floor(l.modelValue)*100),b=S(()=>et(l.colors)?{[l.lowThreshold]:l.colors[0],[l.highThreshold]:{value:l.colors[1],excluded:!0},[l.max]:l.colors[2]}:l.colors),C=S(()=>{const K=a(d.value,b.value);return It(K)?"":K}),I=S(()=>{let K="";return v.value?K=`${k.value}%`:l.allowHalf&&(K="50%"),{color:C.value,width:K}}),T=S(()=>{let K=et(l.icons)?[...l.icons]:{...l.icons};return K=ho(K),et(K)?{[l.lowThreshold]:K[0],[l.highThreshold]:{value:K[1],excluded:!0},[l.max]:K[2]}:K}),M=S(()=>a(l.modelValue,T.value)),L=S(()=>v.value?ct(l.disabledVoidIcon)?l.disabledVoidIcon:ho(l.disabledVoidIcon):ct(l.voidIcon)?l.voidIcon:ho(l.voidIcon)),A=S(()=>a(d.value,T.value));function D(K){const V=v.value&&k.value>0&&K-1<l.modelValue&&K>l.modelValue,W=l.allowHalf&&m.value&&K-.5<=d.value&&K>d.value;return V||W}function B(K){l.clearable&&K===l.modelValue&&(K=0),n(tt,K),l.modelValue!==K&&n("change",K)}function F(K){v.value||(l.allowHalf&&m.value?B(d.value):B(K))}function x(K){if(v.value)return;let V=d.value;const W=K.code;return W===Ae.up||W===Ae.right?(l.allowHalf?V+=.5:V+=1,K.stopPropagation(),K.preventDefault()):(W===Ae.left||W===Ae.down)&&(l.allowHalf?V-=.5:V-=1,K.stopPropagation(),K.preventDefault()),V=V<0?0:V,V=V>l.max?l.max:V,n(tt,V),n("change",V),V}function U(K,V){if(!v.value){if(l.allowHalf&&V){let W=V.target;Mn(W,u.e("item"))&&(W=W.querySelector(`.${u.e("icon")}`)),(W.clientWidth===0||Mn(W,u.e("decimal")))&&(W=W.parentNode),m.value=V.offsetX*2<=W.clientWidth,d.value=m.value?K-.5:K}else d.value=K;p.value=K}}function X(){v.value||(l.allowHalf&&(m.value=l.modelValue!==Math.floor(l.modelValue)),d.value=l.modelValue,p.value=-1)}return ue(()=>l.modelValue,K=>{d.value=K,m.value=l.modelValue!==Math.floor(l.modelValue)}),l.modelValue||n(tt,0),t({setCurrentValue:U,resetCurrentValue:X}),(K,V)=>{var W;return w(),O("div",{id:o(c),class:$([o(h),o(u).is("disabled",o(v))]),role:"slider","aria-label":o(f)?void 0:K.label||"rating","aria-labelledby":o(f)?(W=o(r))==null?void 0:W.labelId:void 0,"aria-valuenow":d.value,"aria-valuetext":o(y)||void 0,"aria-valuemin":"0","aria-valuemax":K.max,tabindex:"0",style:Re(o(g)),onKeydown:x},[(w(!0),O(Ne,null,Ze(K.max,(P,H)=>(w(),O("span",{key:H,class:$(o(u).e("item")),onMousemove:Y=>U(P,Y),onMouseleave:X,onClick:Y=>F(P)},[E(o(Pe),{class:$([o(u).e("icon"),{hover:p.value===P},o(u).is("active",P<=d.value)])},{default:N(()=>[D(P)?Z("v-if",!0):(w(),O(Ne,{key:0},[xe((w(),G(rt(o(A)),null,null,512)),[[lt,P<=d.value]]),xe((w(),G(rt(o(L)),null,null,512)),[[lt,!(P<=d.value)]])],64)),D(P)?(w(),G(o(Pe),{key:1,style:Re(o(I)),class:$([o(u).e("icon"),o(u).e("decimal")])},{default:N(()=>[(w(),G(rt(o(M))))]),_:1},8,["style","class"])):Z("v-if",!0)]),_:2},1032,["class"])],42,X$))),128)),K.showText||K.showScore?(w(),O("span",{key:0,class:$(o(u).e("text"))},ae(o(y)),3)):Z("v-if",!0)],46,Y$)}}});var Q$=he(J$,[["__file","/home/runner/work/element-plus/element-plus/packages/components/rate/src/rate.vue"]]);const eT=Qe(Q$),Fl={success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},au={[Fl.success]:wv,[Fl.warning]:Da,[Fl.error]:vr,[Fl.info]:mr},tT=ge({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["success","warning","info","error"],default:"info"}}),nT=j({name:"ElResult"}),lT=j({...nT,props:tT,setup(e){const t=e,n=ce("result"),l=S(()=>{const a=t.icon,s=a&&Fl[a]?Fl[a]:"icon-info",r=au[s]||au["icon-info"];return{class:s,component:r}});return(a,s)=>(w(),O("div",{class:$(o(n).b())},[R("div",{class:$(o(n).e("icon"))},[ie(a.$slots,"icon",{},()=>[o(l).component?(w(),G(rt(o(l).component),{key:0,class:$(o(l).class)},null,8,["class"])):Z("v-if",!0)])],2),a.title||a.$slots.title?(w(),O("div",{key:0,class:$(o(n).e("title"))},[ie(a.$slots,"title",{},()=>[R("p",null,ae(a.title),1)])],2)):Z("v-if",!0),a.subTitle||a.$slots["sub-title"]?(w(),O("div",{key:1,class:$(o(n).e("subtitle"))},[ie(a.$slots,"sub-title",{},()=>[R("p",null,ae(a.subTitle),1)])],2)):Z("v-if",!0),a.$slots.extra?(w(),O("div",{key:2,class:$(o(n).e("extra"))},[ie(a.$slots,"extra")],2)):Z("v-if",!0)],2))}});var oT=he(lT,[["__file","/home/runner/work/element-plus/element-plus/packages/components/result/src/result.vue"]]);const aT=Qe(oT),mf=()=>{const t=at().proxy.$props;return S(()=>{const n=(l,a,s)=>({});return t.perfMode?kv(n):Cv(n)})},xs=50,Ia="itemRendered",Na="scroll",zl="forward",Pa="backward",kn="auto",ns="smart",$o="start",Bn="center",To="end",Jl="horizontal",Ur="vertical",sT="ltr",Ul="rtl",Io="negative",jr="positive-ascending",qr="positive-descending",rT={[Jl]:"left",[Ur]:"top"},iT=20,uT={[Jl]:"deltaX",[Ur]:"deltaY"},cT=({atEndEdge:e,atStartEdge:t,layout:n},l)=>{let a,s=0;const r=u=>u<0&&t.value||u>0&&e.value;return{hasReachedEdge:r,onWheel:u=>{qa(a);const c=u[uT[n.value]];r(s)&&r(s+c)||(s+=c,fc()||u.preventDefault(),a=Co(()=>{l(s),s=0}))}}},Fs=Ln({type:te([Number,Function]),required:!0}),zs=Ln({type:Number}),Hs=Ln({type:Number,default:2}),dT=Ln({type:String,values:["ltr","rtl"],default:"ltr"}),Ks=Ln({type:Number,default:0}),Ma=Ln({type:Number,required:!0}),hf=Ln({type:String,values:["horizontal","vertical"],default:Ur}),gf=ge({className:{type:String,default:""},containerElement:{type:te([String,Object]),default:"div"},data:{type:te(Array),default:()=>Ot([])},direction:dT,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:te([Object,String,Array])},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),yf=ge({cache:Hs,estimatedItemSize:zs,layout:hf,initScrollOffset:Ks,total:Ma,itemSize:Fs,...gf}),Ws={type:Number,default:6},bf={type:Number,default:0},wf={type:Number,default:2},kl=ge({columnCache:Hs,columnWidth:Fs,estimatedColumnWidth:zs,estimatedRowHeight:zs,initScrollLeft:Ks,initScrollTop:Ks,itemKey:{type:te(Function),default:({columnIndex:e,rowIndex:t})=>`${t}:${e}`},rowCache:Hs,rowHeight:Fs,totalColumn:Ma,totalRow:Ma,hScrollbarSize:Ws,vScrollbarSize:Ws,scrollbarStartGap:bf,scrollbarEndGap:wf,role:String,...gf}),kf=ge({alwaysOn:Boolean,class:String,layout:hf,total:Ma,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:Ws,startGap:bf,endGap:wf,visible:Boolean}),gl=(e,t)=>e<t?zl:Pa,No=e=>e===sT||e===Ul||e===Jl,su=e=>e===Ul;let Rl=null;function La(e=!1){if(Rl===null||e){const t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";const l=document.createElement("div"),a=l.style;return a.width="100px",a.height="100px",t.appendChild(l),document.body.appendChild(t),t.scrollLeft>0?Rl=qr:(t.scrollLeft=1,t.scrollLeft===0?Rl=Io:Rl=jr),document.body.removeChild(t),Rl}return Rl}function fT({move:e,size:t,bar:n},l){const a={},s=`translate${n.axis}(${e}px)`;return a[n.size]=t,a.transform=s,a.msTransform=s,a.webkitTransform=s,l==="horizontal"?a.height="100%":a.width="100%",a}const Us=j({name:"ElVirtualScrollBar",props:kf,emits:["scroll","start-move","stop-move"],setup(e,{emit:t}){const n=S(()=>e.startGap+e.endGap),l=ce("virtual-scrollbar"),a=ce("scrollbar"),s=_(),r=_();let i=null,u=null;const c=St({isDragging:!1,traveled:0}),f=S(()=>Dc[e.layout]),d=S(()=>e.clientSize-o(n)),p=S(()=>({position:"absolute",width:`${Jl===e.layout?d.value:e.scrollbarSize}px`,height:`${Jl===e.layout?e.scrollbarSize:d.value}px`,[rT[e.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),m=S(()=>{const T=e.ratio,M=e.clientSize;if(T>=100)return Number.POSITIVE_INFINITY;if(T>=50)return T*M/100;const L=M/3;return Math.floor(Math.min(Math.max(T*M,iT),L))}),h=S(()=>{if(!Number.isFinite(m.value))return{display:"none"};const T=`${m.value}px`;return fT({bar:f.value,size:T,move:c.traveled},e.layout)}),v=S(()=>Math.floor(e.clientSize-m.value-o(n))),g=()=>{window.addEventListener("mousemove",C),window.addEventListener("mouseup",b);const T=o(r);T&&(u=document.onselectstart,document.onselectstart=()=>!1,T.addEventListener("touchmove",C),T.addEventListener("touchend",b))},y=()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",b),document.onselectstart=u,u=null;const T=o(r);T&&(T.removeEventListener("touchmove",C),T.removeEventListener("touchend",b))},k=T=>{T.stopImmediatePropagation(),!(T.ctrlKey||[1,2].includes(T.button))&&(c.isDragging=!0,c[f.value.axis]=T.currentTarget[f.value.offset]-(T[f.value.client]-T.currentTarget.getBoundingClientRect()[f.value.direction]),t("start-move"),g())},b=()=>{c.isDragging=!1,c[f.value.axis]=0,t("stop-move"),y()},C=T=>{const{isDragging:M}=c;if(!M||!r.value||!s.value)return;const L=c[f.value.axis];if(!L)return;qa(i);const A=(s.value.getBoundingClientRect()[f.value.direction]-T[f.value.client])*-1,D=r.value[f.value.offset]-L,B=A-D;i=Co(()=>{c.traveled=Math.max(e.startGap,Math.min(B,v.value)),t("scroll",B,v.value)})},I=T=>{const M=Math.abs(T.target.getBoundingClientRect()[f.value.direction]-T[f.value.client]),L=r.value[f.value.offset]/2,A=M-L;c.traveled=Math.max(0,Math.min(A,v.value)),t("scroll",A,v.value)};return ue(()=>e.scrollFrom,T=>{c.isDragging||(c.traveled=Math.ceil(T*v.value))}),Rt(()=>{y()}),()=>De("div",{role:"presentation",ref:s,class:[l.b(),e.class,(e.alwaysOn||c.isDragging)&&"always-on"],style:p.value,onMousedown:Fe(I,["stop","prevent"]),onTouchstartPrevent:k},De("div",{ref:r,class:a.e("thumb"),style:h.value,onMousedown:k},[]))}}),Cf=({name:e,getOffset:t,getItemSize:n,getItemOffset:l,getEstimatedTotalSize:a,getStartIndexForOffset:s,getStopIndexForStartIndex:r,initCache:i,clearCache:u,validateProps:c})=>j({name:e??"ElVirtualList",props:yf,emits:[Ia,Na],setup(f,{emit:d,expose:p}){c(f);const m=at(),h=ce("vl"),v=_(i(f,m)),g=mf(),y=_(),k=_(),b=_(),C=_({isScrolling:!1,scrollDir:"forward",scrollOffset:He(f.initScrollOffset)?f.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:f.scrollbarAlwaysOn}),I=S(()=>{const{total:q,cache:se}=f,{isScrolling:pe,scrollDir:oe,scrollOffset:re}=o(C);if(q===0)return[0,0,0,0];const Q=s(f,re,o(v)),ve=r(f,Q,re,o(v)),_e=!pe||oe===Pa?Math.max(1,se):1,Te=!pe||oe===zl?Math.max(1,se):1;return[Math.max(0,Q-_e),Math.max(0,Math.min(q-1,ve+Te)),Q,ve]}),T=S(()=>a(f,o(v))),M=S(()=>No(f.layout)),L=S(()=>[{position:"relative",[`overflow-${M.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:f.direction,height:He(f.height)?`${f.height}px`:f.height,width:He(f.width)?`${f.width}px`:f.width},f.style]),A=S(()=>{const q=o(T),se=o(M);return{height:se?"100%":`${q}px`,pointerEvents:o(C).isScrolling?"none":void 0,width:se?`${q}px`:"100%"}}),D=S(()=>M.value?f.width:f.height),{onWheel:B}=cT({atStartEdge:S(()=>C.value.scrollOffset<=0),atEndEdge:S(()=>C.value.scrollOffset>=T.value),layout:S(()=>f.layout)},q=>{var se,pe;(pe=(se=b.value).onMouseUp)==null||pe.call(se),V(Math.min(C.value.scrollOffset+q,T.value-D.value))}),F=()=>{const{total:q}=f;if(q>0){const[re,Q,ve,_e]=o(I);d(Ia,re,Q,ve,_e)}const{scrollDir:se,scrollOffset:pe,updateRequested:oe}=o(C);d(Na,se,pe,oe)},x=q=>{const{clientHeight:se,scrollHeight:pe,scrollTop:oe}=q.currentTarget,re=o(C);if(re.scrollOffset===oe)return;const Q=Math.max(0,Math.min(oe,pe-se));C.value={...re,isScrolling:!0,scrollDir:gl(re.scrollOffset,Q),scrollOffset:Q,updateRequested:!1},Le(H)},U=q=>{const{clientWidth:se,scrollLeft:pe,scrollWidth:oe}=q.currentTarget,re=o(C);if(re.scrollOffset===pe)return;const{direction:Q}=f;let ve=pe;if(Q===Ul)switch(La()){case Io:{ve=-pe;break}case qr:{ve=oe-se-pe;break}}ve=Math.max(0,Math.min(ve,oe-se)),C.value={...re,isScrolling:!0,scrollDir:gl(re.scrollOffset,ve),scrollOffset:ve,updateRequested:!1},Le(H)},X=q=>{o(M)?U(q):x(q),F()},K=(q,se)=>{const pe=(T.value-D.value)/se*q;V(Math.min(T.value-D.value,pe))},V=q=>{q=Math.max(q,0),q!==o(C).scrollOffset&&(C.value={...o(C),scrollOffset:q,scrollDir:gl(o(C).scrollOffset,q),updateRequested:!0},Le(H))},W=(q,se=kn)=>{const{scrollOffset:pe}=o(C);q=Math.max(0,Math.min(q,f.total-1)),V(t(f,q,se,pe,o(v)))},P=q=>{const{direction:se,itemSize:pe,layout:oe}=f,re=g.value(u&&pe,u&&oe,u&&se);let Q;if(nn(re,String(q)))Q=re[q];else{const ve=l(f,q,o(v)),_e=n(f,q,o(v)),Te=o(M),Ie=se===Ul,Ke=Te?ve:0;re[q]=Q={position:"absolute",left:Ie?void 0:`${Ke}px`,right:Ie?`${Ke}px`:void 0,top:Te?0:`${ve}px`,height:Te?"100%":`${_e}px`,width:Te?`${_e}px`:"100%"}}return Q},H=()=>{C.value.isScrolling=!1,Le(()=>{g.value(-1,null,null)})},Y=()=>{const q=y.value;q&&(q.scrollTop=0)};ze(()=>{if(!yt)return;const{initScrollOffset:q}=f,se=o(y);He(q)&&se&&(o(M)?se.scrollLeft=q:se.scrollTop=q),F()}),Nl(()=>{const{direction:q,layout:se}=f,{scrollOffset:pe,updateRequested:oe}=o(C),re=o(y);if(oe&&re)if(se===Jl)if(q===Ul)switch(La()){case Io:{re.scrollLeft=-pe;break}case jr:{re.scrollLeft=pe;break}default:{const{clientWidth:Q,scrollWidth:ve}=re;re.scrollLeft=ve-Q-pe;break}}else re.scrollLeft=pe;else re.scrollTop=pe});const z={ns:h,clientSize:D,estimatedTotalSize:T,windowStyle:L,windowRef:y,innerRef:k,innerStyle:A,itemsToRender:I,scrollbarRef:b,states:C,getItemStyle:P,onScroll:X,onScrollbarScroll:K,onWheel:B,scrollTo:V,scrollToItem:W,resetScrollTop:Y};return p({windowRef:y,innerRef:k,getItemStyleCache:g,scrollTo:V,scrollToItem:W,resetScrollTop:Y,states:C}),z},render(f){var d;const{$slots:p,className:m,clientSize:h,containerElement:v,data:g,getItemStyle:y,innerElement:k,itemsToRender:b,innerStyle:C,layout:I,total:T,onScroll:M,onScrollbarScroll:L,onWheel:A,states:D,useIsScrolling:B,windowStyle:F,ns:x}=f,[U,X]=b,K=rt(v),V=rt(k),W=[];if(T>0)for(let z=U;z<=X;z++)W.push((d=p.default)==null?void 0:d.call(p,{data:g,key:z,index:z,isScrolling:B?D.isScrolling:void 0,style:y(z)}));const P=[De(V,{style:C,ref:"innerRef"},ct(V)?W:{default:()=>W})],H=De(Us,{ref:"scrollbarRef",clientSize:h,layout:I,onScroll:L,ratio:h*100/this.estimatedTotalSize,scrollFrom:D.scrollOffset/(this.estimatedTotalSize-h),total:T}),Y=De(K,{class:[x.e("window"),m],style:F,onScroll:M,onWheel:A,ref:"windowRef",key:0},ct(K)?[P]:{default:()=>[P]});return De("div",{key:0,class:[x.e("wrapper"),D.scrollbarAlwaysOn?"always-on":""]},[Y,H])}}),Sf=Cf({name:"ElFixedSizeList",getItemOffset:({itemSize:e},t)=>t*e,getItemSize:({itemSize:e})=>e,getEstimatedTotalSize:({total:e,itemSize:t})=>t*e,getOffset:({height:e,total:t,itemSize:n,layout:l,width:a},s,r,i)=>{const u=No(l)?a:e,c=Math.max(0,t*n-u),f=Math.min(c,s*n),d=Math.max(0,(s+1)*n-u);switch(r===ns&&(i>=d-u&&i<=f+u?r=kn:r=Bn),r){case $o:return f;case To:return d;case Bn:{const p=Math.round(d+(f-d)/2);return p<Math.ceil(u/2)?0:p>c+Math.floor(u/2)?c:p}case kn:default:return i>=d&&i<=f?i:i<d?d:f}},getStartIndexForOffset:({total:e,itemSize:t},n)=>Math.max(0,Math.min(e-1,Math.floor(n/t))),getStopIndexForStartIndex:({height:e,total:t,itemSize:n,layout:l,width:a},s,r)=>{const i=s*n,u=No(l)?a:e,c=Math.ceil((u+r-i)/n);return Math.max(0,Math.min(t-1,s+c-1))},initCache(){},clearCache:!0,validateProps(){}}),Hl=(e,t,n)=>{const{itemSize:l}=e,{items:a,lastVisitedIndex:s}=n;if(t>s){let r=0;if(s>=0){const i=a[s];r=i.offset+i.size}for(let i=s+1;i<=t;i++){const u=l(i);a[i]={offset:r,size:u},r+=u}n.lastVisitedIndex=t}return a[t]},pT=(e,t,n)=>{const{items:l,lastVisitedIndex:a}=t;return(a>0?l[a].offset:0)>=n?_f(e,t,0,a,n):vT(e,t,Math.max(0,a),n)},_f=(e,t,n,l,a)=>{for(;n<=l;){const s=n+Math.floor((l-n)/2),r=Hl(e,s,t).offset;if(r===a)return s;r<a?n=s+1:r>a&&(l=s-1)}return Math.max(0,n-1)},vT=(e,t,n,l)=>{const{total:a}=e;let s=1;for(;n<a&&Hl(e,n,t).offset<l;)n+=s,s*=2;return _f(e,t,Math.floor(n/2),Math.min(n,a-1),l)},ru=({total:e},{items:t,estimatedItemSize:n,lastVisitedIndex:l})=>{let a=0;if(l>=e&&(l=e-1),l>=0){const i=t[l];a=i.offset+i.size}const r=(e-l-1)*n;return a+r},mT=Cf({name:"ElDynamicSizeList",getItemOffset:(e,t,n)=>Hl(e,t,n).offset,getItemSize:(e,t,{items:n})=>n[t].size,getEstimatedTotalSize:ru,getOffset:(e,t,n,l,a)=>{const{height:s,layout:r,width:i}=e,u=No(r)?i:s,c=Hl(e,t,a),f=ru(e,a),d=Math.max(0,Math.min(f-u,c.offset)),p=Math.max(0,c.offset-u+c.size);switch(n===ns&&(l>=p-u&&l<=d+u?n=kn:n=Bn),n){case $o:return d;case To:return p;case Bn:return Math.round(p+(d-p)/2);case kn:default:return l>=p&&l<=d?l:l<p?p:d}},getStartIndexForOffset:(e,t,n)=>pT(e,n,t),getStopIndexForStartIndex:(e,t,n,l)=>{const{height:a,total:s,layout:r,width:i}=e,u=No(r)?i:a,c=Hl(e,t,l),f=n+u;let d=c.offset+c.size,p=t;for(;p<s-1&&d<f;)p++,d+=Hl(e,p,l).size;return p},initCache({estimatedItemSize:e=xs},t){const n={items:{},estimatedItemSize:e,lastVisitedIndex:-1};return n.clearCacheAfterIndex=(l,a=!0)=>{var s,r;n.lastVisitedIndex=Math.min(n.lastVisitedIndex,l-1),(s=t.exposed)==null||s.getItemStyleCache(-1),a&&((r=t.proxy)==null||r.$forceUpdate())},n},clearCache:!1,validateProps:({itemSize:e})=>{}}),hT=({atXEndEdge:e,atXStartEdge:t,atYEndEdge:n,atYStartEdge:l},a)=>{let s=null,r=0,i=0;const u=(f,d)=>{const p=f<=0&&t.value||f>=0&&e.value,m=d<=0&&l.value||d>=0&&n.value;return p&&m};return{hasReachedEdge:u,onWheel:f=>{qa(s);let d=f.deltaX,p=f.deltaY;Math.abs(d)>Math.abs(p)?p=0:d=0,f.shiftKey&&p!==0&&(d=p,p=0),!(u(r,i)&&u(r+d,i+p))&&(r+=d,i+=p,f.preventDefault(),s=Co(()=>{a(r,i),r=0,i=0}))}}},Ef=({name:e,clearCache:t,getColumnPosition:n,getColumnStartIndexForOffset:l,getColumnStopIndexForStartIndex:a,getEstimatedTotalHeight:s,getEstimatedTotalWidth:r,getColumnOffset:i,getRowOffset:u,getRowPosition:c,getRowStartIndexForOffset:f,getRowStopIndexForStartIndex:d,initCache:p,injectToInstance:m,validateProps:h})=>j({name:e??"ElVirtualList",props:kl,emits:[Ia,Na],setup(v,{emit:g,expose:y,slots:k}){const b=ce("vl");h(v);const C=at(),I=_(p(v,C));m==null||m(C,I);const T=_(),M=_(),L=_(),A=_(null),D=_({isScrolling:!1,scrollLeft:He(v.initScrollLeft)?v.initScrollLeft:0,scrollTop:He(v.initScrollTop)?v.initScrollTop:0,updateRequested:!1,xAxisScrollDir:zl,yAxisScrollDir:zl}),B=mf(),F=S(()=>Number.parseInt(`${v.height}`,10)),x=S(()=>Number.parseInt(`${v.width}`,10)),U=S(()=>{const{totalColumn:ke,totalRow:Ee,columnCache:Be}=v,{isScrolling:Ve,xAxisScrollDir:Ye,scrollLeft:Xe}=o(D);if(ke===0||Ee===0)return[0,0,0,0];const nt=l(v,Xe,o(I)),Se=a(v,nt,Xe,o(I)),Ue=!Ve||Ye===Pa?Math.max(1,Be):1,gt=!Ve||Ye===zl?Math.max(1,Be):1;return[Math.max(0,nt-Ue),Math.max(0,Math.min(ke-1,Se+gt)),nt,Se]}),X=S(()=>{const{totalColumn:ke,totalRow:Ee,rowCache:Be}=v,{isScrolling:Ve,yAxisScrollDir:Ye,scrollTop:Xe}=o(D);if(ke===0||Ee===0)return[0,0,0,0];const nt=f(v,Xe,o(I)),Se=d(v,nt,Xe,o(I)),Ue=!Ve||Ye===Pa?Math.max(1,Be):1,gt=!Ve||Ye===zl?Math.max(1,Be):1;return[Math.max(0,nt-Ue),Math.max(0,Math.min(Ee-1,Se+gt)),nt,Se]}),K=S(()=>s(v,o(I))),V=S(()=>r(v,o(I))),W=S(()=>{var ke;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:v.direction,height:He(v.height)?`${v.height}px`:v.height,width:He(v.width)?`${v.width}px`:v.width},(ke=v.style)!=null?ke:{}]}),P=S(()=>{const ke=`${o(V)}px`;return{height:`${o(K)}px`,pointerEvents:o(D).isScrolling?"none":void 0,width:ke}}),H=()=>{const{totalColumn:ke,totalRow:Ee}=v;if(ke>0&&Ee>0){const[Se,Ue,gt,Et]=o(U),[$t,be,me,ne]=o(X);g(Ia,{columnCacheStart:Se,columnCacheEnd:Ue,rowCacheStart:$t,rowCacheEnd:be,columnVisibleStart:gt,columnVisibleEnd:Et,rowVisibleStart:me,rowVisibleEnd:ne})}const{scrollLeft:Be,scrollTop:Ve,updateRequested:Ye,xAxisScrollDir:Xe,yAxisScrollDir:nt}=o(D);g(Na,{xAxisScrollDir:Xe,scrollLeft:Be,yAxisScrollDir:nt,scrollTop:Ve,updateRequested:Ye})},Y=ke=>{const{clientHeight:Ee,clientWidth:Be,scrollHeight:Ve,scrollLeft:Ye,scrollTop:Xe,scrollWidth:nt}=ke.currentTarget,Se=o(D);if(Se.scrollTop===Xe&&Se.scrollLeft===Ye)return;let Ue=Ye;if(su(v.direction))switch(La()){case Io:Ue=-Ye;break;case qr:Ue=nt-Be-Ye;break}D.value={...Se,isScrolling:!0,scrollLeft:Ue,scrollTop:Math.max(0,Math.min(Xe,Ve-Ee)),updateRequested:!0,xAxisScrollDir:gl(Se.scrollLeft,Ue),yAxisScrollDir:gl(Se.scrollTop,Xe)},Le(()=>Q()),ve(),H()},z=(ke,Ee)=>{const Be=o(F),Ve=(K.value-Be)/Ee*ke;pe({scrollTop:Math.min(K.value-Be,Ve)})},q=(ke,Ee)=>{const Be=o(x),Ve=(V.value-Be)/Ee*ke;pe({scrollLeft:Math.min(V.value-Be,Ve)})},{onWheel:se}=hT({atXStartEdge:S(()=>D.value.scrollLeft<=0),atXEndEdge:S(()=>D.value.scrollLeft>=V.value-o(x)),atYStartEdge:S(()=>D.value.scrollTop<=0),atYEndEdge:S(()=>D.value.scrollTop>=K.value-o(F))},(ke,Ee)=>{var Be,Ve,Ye,Xe;(Ve=(Be=M.value)==null?void 0:Be.onMouseUp)==null||Ve.call(Be),(Xe=(Ye=M.value)==null?void 0:Ye.onMouseUp)==null||Xe.call(Ye);const nt=o(x),Se=o(F);pe({scrollLeft:Math.min(D.value.scrollLeft+ke,V.value-nt),scrollTop:Math.min(D.value.scrollTop+Ee,K.value-Se)})}),pe=({scrollLeft:ke=D.value.scrollLeft,scrollTop:Ee=D.value.scrollTop})=>{ke=Math.max(ke,0),Ee=Math.max(Ee,0);const Be=o(D);Ee===Be.scrollTop&&ke===Be.scrollLeft||(D.value={...Be,xAxisScrollDir:gl(Be.scrollLeft,ke),yAxisScrollDir:gl(Be.scrollTop,Ee),scrollLeft:ke,scrollTop:Ee,updateRequested:!0},Le(()=>Q()),ve(),H())},oe=(ke=0,Ee=0,Be=kn)=>{const Ve=o(D);Ee=Math.max(0,Math.min(Ee,v.totalColumn-1)),ke=Math.max(0,Math.min(ke,v.totalRow-1));const Ye=mc(b.namespace.value),Xe=o(I),nt=s(v,Xe),Se=r(v,Xe);pe({scrollLeft:i(v,Ee,Be,Ve.scrollLeft,Xe,Se>v.width?Ye:0),scrollTop:u(v,ke,Be,Ve.scrollTop,Xe,nt>v.height?Ye:0)})},re=(ke,Ee)=>{const{columnWidth:Be,direction:Ve,rowHeight:Ye}=v,Xe=B.value(t&&Be,t&&Ye,t&&Ve),nt=`${ke},${Ee}`;if(nn(Xe,nt))return Xe[nt];{const[,Se]=n(v,Ee,o(I)),Ue=o(I),gt=su(Ve),[Et,$t]=c(v,ke,Ue),[be]=n(v,Ee,Ue);return Xe[nt]={position:"absolute",left:gt?void 0:`${Se}px`,right:gt?`${Se}px`:void 0,top:`${$t}px`,height:`${Et}px`,width:`${be}px`},Xe[nt]}},Q=()=>{D.value.isScrolling=!1,Le(()=>{B.value(-1,null,null)})};ze(()=>{if(!yt)return;const{initScrollLeft:ke,initScrollTop:Ee}=v,Be=o(T);Be&&(He(ke)&&(Be.scrollLeft=ke),He(Ee)&&(Be.scrollTop=Ee)),H()});const ve=()=>{const{direction:ke}=v,{scrollLeft:Ee,scrollTop:Be,updateRequested:Ve}=o(D),Ye=o(T);if(Ve&&Ye){if(ke===Ul)switch(La()){case Io:{Ye.scrollLeft=-Ee;break}case jr:{Ye.scrollLeft=Ee;break}default:{const{clientWidth:Xe,scrollWidth:nt}=Ye;Ye.scrollLeft=nt-Xe-Ee;break}}else Ye.scrollLeft=Math.max(0,Ee);Ye.scrollTop=Math.max(0,Be)}},{resetAfterColumnIndex:_e,resetAfterRowIndex:Te,resetAfter:Ie}=C.proxy;y({windowRef:T,innerRef:A,getItemStyleCache:B,scrollTo:pe,scrollToItem:oe,states:D,resetAfterColumnIndex:_e,resetAfterRowIndex:Te,resetAfter:Ie});const Ke=()=>{const{scrollbarAlwaysOn:ke,scrollbarStartGap:Ee,scrollbarEndGap:Be,totalColumn:Ve,totalRow:Ye}=v,Xe=o(x),nt=o(F),Se=o(V),Ue=o(K),{scrollLeft:gt,scrollTop:Et}=o(D),$t=De(Us,{ref:M,alwaysOn:ke,startGap:Ee,endGap:Be,class:b.e("horizontal"),clientSize:Xe,layout:"horizontal",onScroll:q,ratio:Xe*100/Se,scrollFrom:gt/(Se-Xe),total:Ye,visible:!0}),be=De(Us,{ref:L,alwaysOn:ke,startGap:Ee,endGap:Be,class:b.e("vertical"),clientSize:nt,layout:"vertical",onScroll:z,ratio:nt*100/Ue,scrollFrom:Et/(Ue-nt),total:Ve,visible:!0});return{horizontalScrollbar:$t,verticalScrollbar:be}},Ge=()=>{var ke;const[Ee,Be]=o(U),[Ve,Ye]=o(X),{data:Xe,totalColumn:nt,totalRow:Se,useIsScrolling:Ue,itemKey:gt}=v,Et=[];if(Se>0&&nt>0)for(let $t=Ve;$t<=Ye;$t++)for(let be=Ee;be<=Be;be++)Et.push((ke=k.default)==null?void 0:ke.call(k,{columnIndex:be,data:Xe,key:gt({columnIndex:be,data:Xe,rowIndex:$t}),isScrolling:Ue?o(D).isScrolling:void 0,style:re($t,be),rowIndex:$t}));return Et},qe=()=>{const ke=rt(v.innerElement),Ee=Ge();return[De(ke,{style:o(P),ref:A},ct(ke)?Ee:{default:()=>Ee})]};return()=>{const ke=rt(v.containerElement),{horizontalScrollbar:Ee,verticalScrollbar:Be}=Ke(),Ve=qe();return De("div",{key:0,class:b.e("wrapper"),role:v.role},[De(ke,{class:v.className,style:o(W),onScroll:Y,onWheel:se,ref:T},ct(ke)?Ve:{default:()=>Ve}),Ee,Be])}}}),gT=Ef({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:e},t)=>[e,t*e],getRowPosition:({rowHeight:e},t)=>[e,t*e],getEstimatedTotalHeight:({totalRow:e,rowHeight:t})=>t*e,getEstimatedTotalWidth:({totalColumn:e,columnWidth:t})=>t*e,getColumnOffset:({totalColumn:e,columnWidth:t,width:n},l,a,s,r,i)=>{n=Number(n);const u=Math.max(0,e*t-n),c=Math.min(u,l*t),f=Math.max(0,l*t-n+i+t);switch(a==="smart"&&(s>=f-n&&s<=c+n?a=kn:a=Bn),a){case $o:return c;case To:return f;case Bn:{const d=Math.round(f+(c-f)/2);return d<Math.ceil(n/2)?0:d>u+Math.floor(n/2)?u:d}case kn:default:return s>=f&&s<=c?s:f>c||s<f?f:c}},getRowOffset:({rowHeight:e,height:t,totalRow:n},l,a,s,r,i)=>{t=Number(t);const u=Math.max(0,n*e-t),c=Math.min(u,l*e),f=Math.max(0,l*e-t+i+e);switch(a===ns&&(s>=f-t&&s<=c+t?a=kn:a=Bn),a){case $o:return c;case To:return f;case Bn:{const d=Math.round(f+(c-f)/2);return d<Math.ceil(t/2)?0:d>u+Math.floor(t/2)?u:d}case kn:default:return s>=f&&s<=c?s:f>c||s<f?f:c}},getColumnStartIndexForOffset:({columnWidth:e,totalColumn:t},n)=>Math.max(0,Math.min(t-1,Math.floor(n/e))),getColumnStopIndexForStartIndex:({columnWidth:e,totalColumn:t,width:n},l,a)=>{const s=l*e,r=Math.ceil((n+a-s)/e);return Math.max(0,Math.min(t-1,l+r-1))},getRowStartIndexForOffset:({rowHeight:e,totalRow:t},n)=>Math.max(0,Math.min(t-1,Math.floor(n/e))),getRowStopIndexForStartIndex:({rowHeight:e,totalRow:t,height:n},l,a)=>{const s=l*e,r=Math.ceil((n+a-s)/e);return Math.max(0,Math.min(t-1,l+r-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:e,rowHeight:t})=>{}}),{max:Ra,min:$f,floor:Tf}=Math,yT={column:"columnWidth",row:"rowHeight"},js={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},Un=(e,t,n,l)=>{const[a,s,r]=[n[l],e[yT[l]],n[js[l]]];if(t>r){let i=0;if(r>=0){const u=a[r];i=u.offset+u.size}for(let u=r+1;u<=t;u++){const c=s(u);a[u]={offset:i,size:c},i+=c}n[js[l]]=t}return a[t]},If=(e,t,n,l,a,s)=>{for(;n<=l;){const r=n+Tf((l-n)/2),i=Un(e,r,t,s).offset;if(i===a)return r;i<a?n=r+1:l=r-1}return Ra(0,n-1)},bT=(e,t,n,l,a)=>{const s=a==="column"?e.totalColumn:e.totalRow;let r=1;for(;n<s&&Un(e,n,t,a).offset<l;)n+=r,r*=2;return If(e,t,Tf(n/2),$f(n,s-1),l,a)},iu=(e,t,n,l)=>{const[a,s]=[t[l],t[js[l]]];return(s>0?a[s].offset:0)>=n?If(e,t,0,s,n,l):bT(e,t,Ra(0,s),n,l)},Nf=({totalRow:e},{estimatedRowHeight:t,lastVisitedRowIndex:n,row:l})=>{let a=0;if(n>=e&&(n=e-1),n>=0){const i=l[n];a=i.offset+i.size}const r=(e-n-1)*t;return a+r},Pf=({totalColumn:e},{column:t,estimatedColumnWidth:n,lastVisitedColumnIndex:l})=>{let a=0;if(l>e&&(l=e-1),l>=0){const i=t[l];a=i.offset+i.size}const r=(e-l-1)*n;return a+r},wT={column:Pf,row:Nf},uu=(e,t,n,l,a,s,r)=>{const[i,u]=[s==="row"?e.height:e.width,wT[s]],c=Un(e,t,a,s),f=u(e,a),d=Ra(0,$f(f-i,c.offset)),p=Ra(0,c.offset-i+r+c.size);switch(n===ns&&(l>=p-i&&l<=d+i?n=kn:n=Bn),n){case $o:return d;case To:return p;case Bn:return Math.round(p+(d-p)/2);case kn:default:return l>=p&&l<=d?l:p>d||l<p?p:d}},kT=Ef({name:"ElDynamicSizeGrid",getColumnPosition:(e,t,n)=>{const l=Un(e,t,n,"column");return[l.size,l.offset]},getRowPosition:(e,t,n)=>{const l=Un(e,t,n,"row");return[l.size,l.offset]},getColumnOffset:(e,t,n,l,a,s)=>uu(e,t,n,l,a,"column",s),getRowOffset:(e,t,n,l,a,s)=>uu(e,t,n,l,a,"row",s),getColumnStartIndexForOffset:(e,t,n)=>iu(e,n,t,"column"),getColumnStopIndexForStartIndex:(e,t,n,l)=>{const a=Un(e,t,l,"column"),s=n+e.width;let r=a.offset+a.size,i=t;for(;i<e.totalColumn-1&&r<s;)i++,r+=Un(e,t,l,"column").size;return i},getEstimatedTotalHeight:Nf,getEstimatedTotalWidth:Pf,getRowStartIndexForOffset:(e,t,n)=>iu(e,n,t,"row"),getRowStopIndexForStartIndex:(e,t,n,l)=>{const{totalRow:a,height:s}=e,r=Un(e,t,l,"row"),i=n+s;let u=r.size+r.offset,c=t;for(;c<a-1&&u<i;)c++,u+=Un(e,c,l,"row").size;return c},injectToInstance:(e,t)=>{const n=({columnIndex:s,rowIndex:r},i)=>{var u,c;i=Yt(i)?!0:i,He(s)&&(t.value.lastVisitedColumnIndex=Math.min(t.value.lastVisitedColumnIndex,s-1)),He(r)&&(t.value.lastVisitedRowIndex=Math.min(t.value.lastVisitedRowIndex,r-1)),(u=e.exposed)==null||u.getItemStyleCache.value(-1,null,null),i&&((c=e.proxy)==null||c.$forceUpdate())},l=(s,r)=>{n({columnIndex:s},r)},a=(s,r)=>{n({rowIndex:s},r)};Object.assign(e.proxy,{resetAfterColumnIndex:l,resetAfterRowIndex:a,resetAfter:n})},initCache:({estimatedColumnWidth:e=xs,estimatedRowHeight:t=xs})=>({column:{},estimatedColumnWidth:e,estimatedRowHeight:t,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:e,rowHeight:t})=>{}}),CT=j({props:{item:{type:Object,required:!0},style:Object,height:Number},setup(){return{ns:ce("select")}}});function ST(e,t,n,l,a,s){return e.item.isTitle?(w(),O("div",{key:0,class:$(e.ns.be("group","title")),style:Re([e.style,{lineHeight:`${e.height}px`}])},ae(e.item.label),7)):(w(),O("div",{key:1,class:$(e.ns.be("group","split")),style:Re(e.style)},[R("span",{class:$(e.ns.be("group","split-dash")),style:Re({top:`${e.height/2}px`})},null,6)],6))}var _T=he(CT,[["render",ST],["__file","/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/group-item.vue"]]);function ET(e,{emit:t}){return{hoverItem:()=>{e.disabled||t("hover",e.index)},selectOptionClick:()=>{e.disabled||t("select",e.item,e.index)}}}const $T={allowCreate:Boolean,autocomplete:{type:String,default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:[String,Object],default:Zn},effect:{type:String,default:"light"},collapseTags:Boolean,collapseTagsTooltip:{type:Boolean,default:!1},maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:Function,height:{type:Number,default:170},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,label:String,modelValue:[Array,String,Number,Boolean,Object],multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:Function,reserveKeyword:{type:Boolean,default:!0},options:{type:Array,required:!0},placeholder:{type:String},teleported:Zt.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},remote:Boolean,size:{type:String,validator:Ua},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:{type:Boolean,default:!1},validateEvent:{type:Boolean,default:!0},placement:{type:te(String),values:Do,default:"bottom-start"}},TT={data:Array,disabled:Boolean,hovering:Boolean,item:Object,index:Number,style:Object,selected:Boolean,created:Boolean},IT=j({props:TT,emits:["select","hover"],setup(e,{emit:t}){const n=ce("select"),{hoverItem:l,selectOptionClick:a}=ET(e,{emit:t});return{ns:n,hoverItem:l,selectOptionClick:a}}}),NT=["aria-selected"];function PT(e,t,n,l,a,s){return w(),O("li",{"aria-selected":e.selected,style:Re(e.style),class:$([e.ns.be("dropdown","option-item"),e.ns.is("selected",e.selected),e.ns.is("disabled",e.disabled),e.ns.is("created",e.created),{hover:e.hovering}]),onMouseenter:t[0]||(t[0]=(...r)=>e.hoverItem&&e.hoverItem(...r)),onClick:t[1]||(t[1]=Fe((...r)=>e.selectOptionClick&&e.selectOptionClick(...r),["stop"]))},[ie(e.$slots,"default",{item:e.item,index:e.index,disabled:e.disabled},()=>[R("span",null,ae(e.item.label),1)])],46,NT)}var MT=he(IT,[["render",PT],["__file","/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/option-item.vue"]]);const Mf=Symbol("ElSelectV2Injection");var LT=j({name:"ElSelectDropdown",props:{data:{type:Array,required:!0},hoveringIndex:Number,width:Number},setup(e,{slots:t,expose:n}){const l=Me(Mf),a=ce("select"),s=_([]),r=_(),i=S(()=>e.data.length);ue(()=>i.value,()=>{var L,A;(A=(L=l.popper.value).updatePopper)==null||A.call(L)});const u=S(()=>Yt(l.props.estimatedOptionHeight)),c=S(()=>u.value?{itemSize:l.props.itemHeight}:{estimatedSize:l.props.estimatedOptionHeight,itemSize:L=>s.value[L]}),f=(L=[],A)=>{const{props:{valueKey:D}}=l;return It(A)?L&&L.some(B=>Vt(B,D)===Vt(A,D)):L.includes(A)},d=(L,A)=>{if(It(A)){const{valueKey:D}=l.props;return Vt(L,D)===Vt(A,D)}else return L===A},p=(L,A)=>{const{valueKey:D}=l.props;return l.props.multiple?f(L,Vt(A,D)):d(L,Vt(A,D))},m=(L,A)=>{const{disabled:D,multiple:B,multipleLimit:F}=l.props;return D||!A&&(B?F>0&&L.length>=F:!1)},h=L=>e.hoveringIndex===L;n({listRef:r,isSized:u,isItemDisabled:m,isItemHovering:h,isItemSelected:p,scrollToItem:L=>{const A=r.value;A&&A.scrollToItem(L)},resetScrollTop:()=>{const L=r.value;L&&L.resetScrollTop()}});const y=L=>{const{index:A,data:D,style:B}=L,F=o(u),{itemSize:x,estimatedSize:U}=o(c),{modelValue:X}=l.props,{onSelect:K,onHover:V}=l,W=D[A];if(W.type==="Group")return E(_T,{item:W,style:B,height:F?x:U},null);const P=p(X,W),H=m(X,P),Y=h(A);return E(MT,ot(L,{selected:P,disabled:W.disabled||H,created:!!W.created,hovering:Y,item:W,onSelect:K,onHover:V}),{default:z=>{var q;return((q=t.default)==null?void 0:q.call(t,z))||E("span",null,[W.label])}})},{onKeyboardNavigate:k,onKeyboardSelect:b}=l,C=()=>{k("forward")},I=()=>{k("backward")},T=()=>{l.expanded=!1},M=L=>{const{code:A}=L,{tab:D,esc:B,down:F,up:x,enter:U}=Ae;switch(A!==D&&(L.preventDefault(),L.stopPropagation()),A){case D:case B:{T();break}case F:{C();break}case x:{I();break}case U:{b();break}}};return()=>{var L;const{data:A,width:D}=e,{height:B,multiple:F,scrollbarAlwaysOn:x}=l.props;if(A.length===0)return E("div",{class:a.b("dropdown"),style:{width:`${D}px`}},[(L=t.empty)==null?void 0:L.call(t)]);const U=o(u)?Sf:mT;return E("div",{class:[a.b("dropdown"),a.is("multiple",F)]},[E(U,ot({ref:r},o(c),{className:a.be("dropdown","list"),scrollbarAlwaysOn:x,data:A,height:B,width:D,total:A.length,onKeydown:M}),{default:X=>E(y,X,null)})])}}});function RT(e,t){const n=_(0),l=_(null),a=S(()=>e.allowCreate&&e.filterable);function s(f){const d=p=>p.value===f;return e.options&&e.options.some(d)||t.createdOptions.some(d)}function r(f){a.value&&(e.multiple&&f.created?n.value++:l.value=f)}function i(f){if(a.value)if(f&&f.length>0&&!s(f)){const d={value:f,label:f,created:!0,disabled:!1};t.createdOptions.length>=n.value?t.createdOptions[n.value]=d:t.createdOptions.push(d)}else if(e.multiple)t.createdOptions.length=n.value;else{const d=l.value;t.createdOptions.length=0,d&&d.created&&t.createdOptions.push(d)}}function u(f){if(!a.value||!f||!f.created||f.created&&e.reserveKeyword&&t.inputValue===f.label)return;const d=t.createdOptions.findIndex(p=>p.value===f.value);~d&&(t.createdOptions.splice(d,1),n.value--)}function c(){a.value&&(t.createdOptions.length=0,n.value=0)}return{createNewOption:i,removeNewOption:u,selectNewOption:r,clearAllNewOption:c}}const OT=e=>{const t=[];return e.forEach(n=>{et(n.options)?(t.push({label:n.label,isTitle:!0,type:"Group"}),n.options.forEach(l=>{t.push(l)}),t.push({type:"Group"})):t.push(n)}),t};function AT(e){const t=_(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:s=>{const r=s.target.value,i=r[r.length-1]||"";t.value=!ja(i)},handleCompositionEnd:s=>{t.value&&(t.value=!1,kt(e)&&e(s))}}}const cu="",du=11,VT={larget:51,default:42,small:33},DT=(e,t)=>{const{t:n}=ht(),l=ce("select-v2"),a=ce("input"),{form:s,formItem:r}=fn(),i=St({inputValue:cu,displayInputValue:cu,calculatedWidth:0,cachedPlaceholder:"",cachedOptions:[],createdOptions:[],createdLabel:"",createdSelected:!1,currentPlaceholder:"",hoveringIndex:-1,comboBoxHovering:!1,isOnComposition:!1,isSilentBlur:!1,isComposing:!1,inputLength:20,selectWidth:200,initialInputHeight:0,previousQuery:null,previousValue:void 0,query:"",selectedLabel:"",softFocus:!1,tagInMultiLine:!1}),u=_(-1),c=_(-1),f=_(null),d=_(null),p=_(null),m=_(null),h=_(null),v=_(null),g=_(null),y=_(!1),k=S(()=>e.disabled||(s==null?void 0:s.disabled)),b=S(()=>{const fe=F.value.length*34;return fe>e.height?e.height:fe}),C=S(()=>!Ht(e.modelValue)),I=S(()=>{const fe=e.multiple?Array.isArray(e.modelValue)&&e.modelValue.length>0:C.value;return e.clearable&&!k.value&&i.comboBoxHovering&&fe}),T=S(()=>e.remote&&e.filterable?"":Fa),M=S(()=>T.value&&l.is("reverse",y.value)),L=S(()=>(r==null?void 0:r.validateState)||""),A=S(()=>bc[L.value]),D=S(()=>e.remote?300:0),B=S(()=>{const fe=F.value;return e.loading?e.loadingText||n("el.select.loading"):e.remote&&i.inputValue===""&&fe.length===0?!1:e.filterable&&i.inputValue&&fe.length>0?e.noMatchText||n("el.select.noMatch"):fe.length===0?e.noDataText||n("el.select.noData"):null}),F=S(()=>{const fe=We=>{const wt=i.inputValue,Lt=new RegExp(pc(wt),"i");return wt?Lt.test(We.label||""):!0};return e.loading?[]:OT(e.options.concat(i.createdOptions).map(We=>{if(et(We.options)){const wt=We.options.filter(fe);if(wt.length>0)return{...We,options:wt}}else if(e.remote||fe(We))return We;return null}).filter(We=>We!==null))}),x=S(()=>{const fe=new Map;return F.value.forEach((We,wt)=>{fe.set(Xe(We),{option:We,index:wt})}),fe}),U=S(()=>F.value.every(fe=>fe.disabled)),X=qt(),K=S(()=>X.value==="small"?"small":"default"),V=S(()=>{const fe=v.value,We=K.value||"default",wt=fe?Number.parseInt(getComputedStyle(fe).paddingLeft):0,Lt=fe?Number.parseInt(getComputedStyle(fe).paddingRight):0;return i.selectWidth-Lt-wt-VT[We]}),W=()=>{var fe;c.value=((fe=h.value)==null?void 0:fe.offsetWidth)||200},P=S(()=>({width:`${i.calculatedWidth===0?du:Math.ceil(i.calculatedWidth)+du}px`})),H=S(()=>et(e.modelValue)?e.modelValue.length===0&&!i.displayInputValue:e.filterable?i.displayInputValue.length===0:!0),Y=S(()=>{const fe=e.placeholder||n("el.select.placeholder");return e.multiple||Ht(e.modelValue)?fe:i.selectedLabel}),z=S(()=>{var fe,We;return(We=(fe=m.value)==null?void 0:fe.popperRef)==null?void 0:We.contentRef}),q=S(()=>{if(e.multiple){const fe=e.modelValue.length;if(e.modelValue.length>0&&x.value.has(e.modelValue[fe-1])){const{index:We}=x.value.get(e.modelValue[fe-1]);return We}}else if(e.modelValue&&x.value.has(e.modelValue)){const{index:fe}=x.value.get(e.modelValue);return fe}return-1}),se=S({get(){return y.value&&B.value!==!1},set(fe){y.value=fe}}),pe=S(()=>i.cachedOptions.slice(0,e.maxCollapseTags)),oe=S(()=>i.cachedOptions.slice(e.maxCollapseTags)),{createNewOption:re,removeNewOption:Q,selectNewOption:ve,clearAllNewOption:_e}=RT(e,i),{handleCompositionStart:Te,handleCompositionUpdate:Ie,handleCompositionEnd:Ke}=AT(fe=>st(fe)),Ge=()=>{var fe,We,wt;(We=(fe=d.value)==null?void 0:fe.focus)==null||We.call(fe),(wt=m.value)==null||wt.updatePopper()},qe=()=>{if(!e.automaticDropdown&&!k.value)return i.isComposing&&(i.softFocus=!0),Le(()=>{var fe,We;y.value=!y.value,(We=(fe=d.value)==null?void 0:fe.focus)==null||We.call(fe)})},it=()=>(e.filterable&&i.inputValue!==i.selectedLabel&&(i.query=i.selectedLabel),Ee(i.inputValue),Le(()=>{re(i.inputValue)})),ke=hn(it,D.value),Ee=fe=>{i.previousQuery!==fe&&(i.previousQuery=fe,e.filterable&&kt(e.filterMethod)?e.filterMethod(fe):e.filterable&&e.remote&&kt(e.remoteMethod)&&e.remoteMethod(fe))},Be=fe=>{vn(e.modelValue,fe)||t(Mt,fe)},Ve=fe=>{t(tt,fe),Be(fe),i.previousValue=fe==null?void 0:fe.toString()},Ye=(fe=[],We)=>{if(!It(We))return fe.indexOf(We);const wt=e.valueKey;let Lt=-1;return fe.some((Rn,On)=>Vt(Rn,wt)===Vt(We,wt)?(Lt=On,!0):!1),Lt},Xe=fe=>It(fe)?Vt(fe,e.valueKey):fe,nt=fe=>It(fe)?fe.label:fe,Se=()=>Le(()=>{var fe,We;if(!d.value)return;const wt=v.value;h.value.height=wt.offsetHeight,y.value&&B.value!==!1&&((We=(fe=m.value)==null?void 0:fe.updatePopper)==null||We.call(fe))}),Ue=()=>{var fe,We;if(gt(),W(),(We=(fe=m.value)==null?void 0:fe.updatePopper)==null||We.call(fe),e.multiple)return Se()},gt=()=>{const fe=v.value;fe&&(i.selectWidth=fe.getBoundingClientRect().width)},Et=(fe,We,wt=!0)=>{var Lt,Rn;if(e.multiple){let On=e.modelValue.slice();const Ko=Ye(On,Xe(fe));Ko>-1?(On=[...On.slice(0,Ko),...On.slice(Ko+1)],i.cachedOptions.splice(Ko,1),Q(fe)):(e.multipleLimit<=0||On.length<e.multipleLimit)&&(On=[...On,Xe(fe)],i.cachedOptions.push(fe),ve(fe),le(We)),Ve(On),fe.created&&(i.query="",Ee(""),i.inputLength=20),e.filterable&&!e.reserveKeyword&&((Rn=(Lt=d.value).focus)==null||Rn.call(Lt),$e("")),e.filterable&&(i.calculatedWidth=g.value.getBoundingClientRect().width),Se(),je()}else u.value=We,i.selectedLabel=fe.label,Ve(Xe(fe)),y.value=!1,i.isComposing=!1,i.isSilentBlur=wt,ve(fe),fe.created||_e(),le(We)},$t=(fe,We)=>{const{valueKey:wt}=e,Lt=e.modelValue.indexOf(Vt(We,wt));if(Lt>-1&&!k.value){const Rn=[...e.modelValue.slice(0,Lt),...e.modelValue.slice(Lt+1)];return i.cachedOptions.splice(Lt,1),Ve(Rn),t("remove-tag",Vt(We,wt)),i.softFocus=!0,Q(We),Le(Ge)}fe.stopPropagation()},be=fe=>{const We=i.isComposing;i.isComposing=!0,i.softFocus?i.softFocus=!1:We||t("focus",fe)},me=fe=>(i.softFocus=!1,Le(()=>{var We,wt;(wt=(We=d.value)==null?void 0:We.blur)==null||wt.call(We),g.value&&(i.calculatedWidth=g.value.getBoundingClientRect().width),i.isSilentBlur?i.isSilentBlur=!1:i.isComposing&&t("blur",fe),i.isComposing=!1})),ne=()=>{i.displayInputValue.length>0?$e(""):y.value=!1},we=fe=>{if(i.displayInputValue.length===0){fe.preventDefault();const We=e.modelValue.slice();We.pop(),Q(i.cachedOptions.pop()),Ve(We)}},de=()=>{let fe;return et(e.modelValue)?fe=[]:fe=void 0,i.softFocus=!0,e.multiple?i.cachedOptions=[]:i.selectedLabel="",y.value=!1,Ve(fe),t("clear"),_e(),Le(Ge)},$e=fe=>{i.displayInputValue=fe,i.inputValue=fe},J=(fe,We=void 0)=>{const wt=F.value;if(!["forward","backward"].includes(fe)||k.value||wt.length<=0||U.value)return;if(!y.value)return qe();We===void 0&&(We=i.hoveringIndex);let Lt=-1;fe==="forward"?(Lt=We+1,Lt>=wt.length&&(Lt=0)):fe==="backward"&&(Lt=We-1,(Lt<0||Lt>=wt.length)&&(Lt=wt.length-1));const Rn=wt[Lt];if(Rn.disabled||Rn.type==="Group")return J(fe,Lt);le(Lt),Xt(Lt)},Oe=()=>{if(y.value)~i.hoveringIndex&&F.value[i.hoveringIndex]&&Et(F.value[i.hoveringIndex],i.hoveringIndex,!1);else return qe()},le=fe=>{i.hoveringIndex=fe},Ce=()=>{i.hoveringIndex=-1},je=()=>{var fe;const We=d.value;We&&((fe=We.focus)==null||fe.call(We))},st=fe=>{const We=fe.target.value;if($e(We),i.displayInputValue.length>0&&!y.value&&(y.value=!0),i.calculatedWidth=g.value.getBoundingClientRect().width,e.multiple&&Se(),e.remote)ke();else return it()},vt=()=>(y.value=!1,me()),Tt=()=>(i.inputValue=i.displayInputValue,Le(()=>{~q.value&&(le(q.value),Xt(i.hoveringIndex))})),Xt=fe=>{p.value.scrollToItem(fe)},_t=()=>{if(Ce(),e.multiple)if(e.modelValue.length>0){let fe=!1;i.cachedOptions.length=0,i.previousValue=e.modelValue.toString();for(const We of e.modelValue)if(x.value.has(We)){const{index:wt,option:Lt}=x.value.get(We);i.cachedOptions.push(Lt),fe||le(wt),fe=!0}}else i.cachedOptions=[],i.previousValue=void 0;else if(C.value){i.previousValue=e.modelValue;const fe=F.value,We=fe.findIndex(wt=>Xe(wt)===Xe(e.modelValue));~We?(i.selectedLabel=fe[We].label,le(We)):i.selectedLabel=`${e.modelValue}`}else i.selectedLabel="",i.previousValue=void 0;_e(),W()};return ue(y,fe=>{var We,wt;t("visible-change",fe),fe?(wt=(We=m.value).update)==null||wt.call(We):(i.displayInputValue="",i.previousQuery=null,re(""))}),ue(()=>e.modelValue,(fe,We)=>{var wt;(!fe||fe.toString()!==i.previousValue)&&_t(),!vn(fe,We)&&e.validateEvent&&((wt=r==null?void 0:r.validate)==null||wt.call(r,"change").catch(Lt=>void 0))},{deep:!0}),ue(()=>e.options,()=>{const fe=d.value;(!fe||fe&&document.activeElement!==fe)&&_t()},{deep:!0}),ue(F,()=>Le(p.value.resetScrollTop)),ue(()=>se.value,fe=>{fe||Ce()}),ze(()=>{_t()}),un(h,Ue),{collapseTagSize:K,currentPlaceholder:Y,expanded:y,emptyText:B,popupHeight:b,debounce:D,filteredOptions:F,iconComponent:T,iconReverse:M,inputWrapperStyle:P,popperSize:c,dropdownMenuVisible:se,hasModelValue:C,shouldShowPlaceholder:H,selectDisabled:k,selectSize:X,showClearBtn:I,states:i,tagMaxWidth:V,nsSelectV2:l,nsInput:a,calculatorRef:g,controlRef:f,inputRef:d,menuRef:p,popper:m,selectRef:h,selectionRef:v,popperRef:z,validateState:L,validateIcon:A,showTagList:pe,collapseTagList:oe,debouncedOnInputChange:ke,deleteTag:$t,getLabel:nt,getValueKey:Xe,handleBlur:me,handleClear:de,handleClickOutside:vt,handleDel:we,handleEsc:ne,handleFocus:be,handleMenuEnter:Tt,handleResize:Ue,toggleMenu:qe,scrollTo:Xt,onInput:st,onKeyboardNavigate:J,onKeyboardSelect:Oe,onSelect:Et,onHover:le,onUpdateInputValue:$e,handleCompositionStart:Te,handleCompositionEnd:Ke,handleCompositionUpdate:Ie}},BT=j({name:"ElSelectV2",components:{ElSelectMenu:LT,ElTag:_o,ElTooltip:cn,ElIcon:Pe},directives:{ClickOutside:il,ModelText:Ao},props:$T,emits:[tt,Mt,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const n=S(()=>{const{modelValue:a,multiple:s}=e,r=s?[]:void 0;return et(a)?s?a:r:s?r:a}),l=DT(St({...Gt(e),modelValue:n}),t);return dt(Mf,{props:St({...Gt(e),height:l.popupHeight,modelValue:n}),popper:l.popper,onSelect:l.onSelect,onHover:l.onHover,onKeyboardNavigate:l.onKeyboardNavigate,onKeyboardSelect:l.onKeyboardSelect}),{...l,modelValue:n}}}),xT={key:0},FT=["id","autocomplete","aria-expanded","aria-labelledby","disabled","readonly","name","unselectable"],zT=["textContent"],HT=["id","aria-labelledby","aria-expanded","autocomplete","disabled","name","readonly","unselectable"],KT=["textContent"];function WT(e,t,n,l,a,s){const r=ee("el-tag"),i=ee("el-tooltip"),u=ee("el-icon"),c=ee("el-select-menu"),f=Sl("model-text"),d=Sl("click-outside");return xe((w(),O("div",{ref:"selectRef",class:$([e.nsSelectV2.b(),e.nsSelectV2.m(e.selectSize)]),onClick:t[24]||(t[24]=Fe((...p)=>e.toggleMenu&&e.toggleMenu(...p),["stop"])),onMouseenter:t[25]||(t[25]=p=>e.states.comboBoxHovering=!0),onMouseleave:t[26]||(t[26]=p=>e.states.comboBoxHovering=!1)},[E(i,{ref:"popper",visible:e.dropdownMenuVisible,teleported:e.teleported,"popper-class":[e.nsSelectV2.e("popper"),e.popperClass],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":e.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:e.effect,placement:e.placement,pure:"",transition:`${e.nsSelectV2.namespace.value}-zoom-in-top`,trigger:"click",persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[23]||(t[23]=p=>e.states.inputValue=e.states.displayInputValue)},{default:N(()=>[R("div",{ref:"selectionRef",class:$([e.nsSelectV2.e("wrapper"),e.nsSelectV2.is("focused",e.states.isComposing||e.expanded),e.nsSelectV2.is("hovering",e.states.comboBoxHovering),e.nsSelectV2.is("filterable",e.filterable),e.nsSelectV2.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(w(),O("div",xT,[ie(e.$slots,"prefix")])):Z("v-if",!0),e.multiple?(w(),O("div",{key:1,class:$(e.nsSelectV2.e("selection"))},[e.collapseTags&&e.modelValue.length>0?(w(),O(Ne,{key:0},[(w(!0),O(Ne,null,Ze(e.showTagList,p=>(w(),O("div",{key:e.getValueKey(p),class:$(e.nsSelectV2.e("selected-item"))},[E(r,{closable:!e.selectDisabled&&!(p!=null&&p.disable),size:e.collapseTagSize,type:"info","disable-transitions":"",onClose:m=>e.deleteTag(m,p)},{default:N(()=>[R("span",{class:$(e.nsSelectV2.e("tags-text")),style:Re({maxWidth:`${e.tagMaxWidth}px`})},ae(p==null?void 0:p.label),7)]),_:2},1032,["closable","size","onClose"])],2))),128)),R("div",{class:$(e.nsSelectV2.e("selected-item"))},[e.modelValue.length>e.maxCollapseTags?(w(),G(r,{key:0,closable:!1,size:e.collapseTagSize,type:"info","disable-transitions":""},{default:N(()=>[e.collapseTagsTooltip?(w(),G(i,{key:0,disabled:e.dropdownMenuVisible,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:!1},{default:N(()=>[R("span",{class:$(e.nsSelectV2.e("tags-text")),style:Re({maxWidth:`${e.tagMaxWidth}px`})},"+ "+ae(e.modelValue.length-e.maxCollapseTags),7)]),content:N(()=>[R("div",{class:$(e.nsSelectV2.e("selection"))},[(w(!0),O(Ne,null,Ze(e.collapseTagList,p=>(w(),O("div",{key:e.getValueKey(p),class:$(e.nsSelectV2.e("selected-item"))},[E(r,{closable:!e.selectDisabled&&!p.disabled,size:e.collapseTagSize,class:"in-tooltip",type:"info","disable-transitions":"",onClose:m=>e.deleteTag(m,p)},{default:N(()=>[R("span",{class:$(e.nsSelectV2.e("tags-text")),style:Re({maxWidth:`${e.tagMaxWidth}px`})},ae(e.getLabel(p)),7)]),_:2},1032,["closable","size","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect"])):(w(),O("span",{key:1,class:$(e.nsSelectV2.e("tags-text")),style:Re({maxWidth:`${e.tagMaxWidth}px`})},"+ "+ae(e.modelValue.length-e.maxCollapseTags),7))]),_:1},8,["size"])):Z("v-if",!0)],2)],64)):(w(!0),O(Ne,{key:1},Ze(e.states.cachedOptions,p=>(w(),O("div",{key:e.getValueKey(p),class:$(e.nsSelectV2.e("selected-item"))},[E(r,{closable:!e.selectDisabled&&!p.disabled,size:e.collapseTagSize,type:"info","disable-transitions":"",onClose:m=>e.deleteTag(m,p)},{default:N(()=>[R("span",{class:$(e.nsSelectV2.e("tags-text")),style:Re({maxWidth:`${e.tagMaxWidth}px`})},ae(e.getLabel(p)),7)]),_:2},1032,["closable","size","onClose"])],2))),128)),R("div",{class:$([e.nsSelectV2.e("selected-item"),e.nsSelectV2.e("input-wrapper")]),style:Re(e.inputWrapperStyle)},[xe(R("input",{id:e.id,ref:"inputRef",autocomplete:e.autocomplete,"aria-autocomplete":"list","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":e.expanded,"aria-labelledby":e.label,class:$([e.nsSelectV2.is(e.selectSize),e.nsSelectV2.e("combobox-input")]),disabled:e.disabled,role:"combobox",readonly:!e.filterable,spellcheck:"false",type:"text",name:e.name,unselectable:e.expanded?"on":void 0,"onUpdate:modelValue":t[0]||(t[0]=(...p)=>e.onUpdateInputValue&&e.onUpdateInputValue(...p)),onFocus:t[1]||(t[1]=(...p)=>e.handleFocus&&e.handleFocus(...p)),onBlur:t[2]||(t[2]=(...p)=>e.handleBlur&&e.handleBlur(...p)),onInput:t[3]||(t[3]=(...p)=>e.onInput&&e.onInput(...p)),onCompositionstart:t[4]||(t[4]=(...p)=>e.handleCompositionStart&&e.handleCompositionStart(...p)),onCompositionupdate:t[5]||(t[5]=(...p)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...p)),onCompositionend:t[6]||(t[6]=(...p)=>e.handleCompositionEnd&&e.handleCompositionEnd(...p)),onKeydown:[t[7]||(t[7]=pt(Fe(p=>e.onKeyboardNavigate("backward"),["stop","prevent"]),["up"])),t[8]||(t[8]=pt(Fe(p=>e.onKeyboardNavigate("forward"),["stop","prevent"]),["down"])),t[9]||(t[9]=pt(Fe((...p)=>e.onKeyboardSelect&&e.onKeyboardSelect(...p),["stop","prevent"]),["enter"])),t[10]||(t[10]=pt(Fe((...p)=>e.handleEsc&&e.handleEsc(...p),["stop","prevent"]),["esc"])),t[11]||(t[11]=pt(Fe((...p)=>e.handleDel&&e.handleDel(...p),["stop"]),["delete"]))]},null,42,FT),[[f,e.states.displayInputValue]]),e.filterable?(w(),O("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:$(e.nsSelectV2.e("input-calculator")),textContent:ae(e.states.displayInputValue)},null,10,zT)):Z("v-if",!0)],6)],2)):(w(),O(Ne,{key:2},[R("div",{class:$([e.nsSelectV2.e("selected-item"),e.nsSelectV2.e("input-wrapper")])},[xe(R("input",{id:e.id,ref:"inputRef","aria-autocomplete":"list","aria-haspopup":"listbox","aria-labelledby":e.label,"aria-expanded":e.expanded,autocapitalize:"off",autocomplete:e.autocomplete,class:$(e.nsSelectV2.e("combobox-input")),disabled:e.disabled,name:e.name,role:"combobox",readonly:!e.filterable,spellcheck:"false",type:"text",unselectable:e.expanded?"on":void 0,onCompositionstart:t[12]||(t[12]=(...p)=>e.handleCompositionStart&&e.handleCompositionStart(...p)),onCompositionupdate:t[13]||(t[13]=(...p)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...p)),onCompositionend:t[14]||(t[14]=(...p)=>e.handleCompositionEnd&&e.handleCompositionEnd(...p)),onFocus:t[15]||(t[15]=(...p)=>e.handleFocus&&e.handleFocus(...p)),onBlur:t[16]||(t[16]=(...p)=>e.handleBlur&&e.handleBlur(...p)),onInput:t[17]||(t[17]=(...p)=>e.onInput&&e.onInput(...p)),onKeydown:[t[18]||(t[18]=pt(Fe(p=>e.onKeyboardNavigate("backward"),["stop","prevent"]),["up"])),t[19]||(t[19]=pt(Fe(p=>e.onKeyboardNavigate("forward"),["stop","prevent"]),["down"])),t[20]||(t[20]=pt(Fe((...p)=>e.onKeyboardSelect&&e.onKeyboardSelect(...p),["stop","prevent"]),["enter"])),t[21]||(t[21]=pt(Fe((...p)=>e.handleEsc&&e.handleEsc(...p),["stop","prevent"]),["esc"]))],"onUpdate:modelValue":t[22]||(t[22]=(...p)=>e.onUpdateInputValue&&e.onUpdateInputValue(...p))},null,42,HT),[[f,e.states.displayInputValue]])],2),e.filterable?(w(),O("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:$([e.nsSelectV2.e("selected-item"),e.nsSelectV2.e("input-calculator")]),textContent:ae(e.states.displayInputValue)},null,10,KT)):Z("v-if",!0)],64)),e.shouldShowPlaceholder?(w(),O("span",{key:3,class:$([e.nsSelectV2.e("placeholder"),e.nsSelectV2.is("transparent",e.multiple?e.modelValue.length===0:!e.hasModelValue)])},ae(e.currentPlaceholder),3)):Z("v-if",!0),R("span",{class:$(e.nsSelectV2.e("suffix"))},[e.iconComponent?xe((w(),G(u,{key:0,class:$([e.nsSelectV2.e("caret"),e.nsInput.e("icon"),e.iconReverse])},{default:N(()=>[(w(),G(rt(e.iconComponent)))]),_:1},8,["class"])),[[lt,!e.showClearBtn]]):Z("v-if",!0),e.showClearBtn&&e.clearIcon?(w(),G(u,{key:1,class:$([e.nsSelectV2.e("caret"),e.nsInput.e("icon")]),onClick:Fe(e.handleClear,["prevent","stop"])},{default:N(()=>[(w(),G(rt(e.clearIcon)))]),_:1},8,["class","onClick"])):Z("v-if",!0),e.validateState&&e.validateIcon?(w(),G(u,{key:2,class:$([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:N(()=>[(w(),G(rt(e.validateIcon)))]),_:1},8,["class"])):Z("v-if",!0)],2)],2)]),content:N(()=>[E(c,{ref:"menuRef",data:e.filteredOptions,width:e.popperSize,"hovering-index":e.states.hoveringIndex,"scrollbar-always-on":e.scrollbarAlwaysOn},{default:N(p=>[ie(e.$slots,"default",Nn(dr(p)))]),empty:N(()=>[ie(e.$slots,"empty",{},()=>[R("p",{class:$(e.nsSelectV2.e("empty"))},ae(e.emptyText?e.emptyText:""),3)])]),_:3},8,["data","width","hovering-index","scrollbar-always-on"])]),_:3},8,["visible","teleported","popper-class","popper-options","effect","placement","transition","persistent","onBeforeShow"])],34)),[[d,e.handleClickOutside,e.popperRef]])}var ca=he(BT,[["render",WT],["__file","/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/select.vue"]]);ca.install=e=>{e.component(ca.name,ca)};const UT=ca,jT=UT,qT=ge({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),GT=ge({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),YT=j({name:"ElSkeletonItem"}),XT=j({...YT,props:GT,setup(e){const t=ce("skeleton");return(n,l)=>(w(),O("div",{class:$([o(t).e("item"),o(t).e(n.variant)])},[n.variant==="image"?(w(),G(o(Sv),{key:0})):Z("v-if",!0)],2))}});var Oa=he(XT,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]);const ZT=j({name:"ElSkeleton"}),JT=j({...ZT,props:qT,setup(e,{expose:t}){const n=e,l=ce("skeleton"),a=Km(At(n,"loading"),n.throttle);return t({uiLoading:a}),(s,r)=>o(a)?(w(),O("div",ot({key:0,class:[o(l).b(),o(l).is("animated",s.animated)]},s.$attrs),[(w(!0),O(Ne,null,Ze(s.count,i=>(w(),O(Ne,{key:i},[s.loading?ie(s.$slots,"template",{key:i},()=>[E(Oa,{class:$(o(l).is("first")),variant:"p"},null,8,["class"]),(w(!0),O(Ne,null,Ze(s.rows,u=>(w(),G(Oa,{key:u,class:$([o(l).e("paragraph"),o(l).is("last",u===s.rows&&s.rows>1)]),variant:"p"},null,8,["class"]))),128))]):Z("v-if",!0)],64))),128))],16)):ie(s.$slots,"default",Nn(ot({key:1},s.$attrs)))}});var QT=he(JT,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]);const eI=Qe(QT,{SkeletonItem:Oa}),tI=xt(Oa),Lf=Symbol("sliderContextKey"),nI=ge({modelValue:{type:te([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:ln,inputSize:ln,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:te(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},label:{type:String,default:void 0},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:te(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:Do,default:"top"},marks:{type:te(Object)},validateEvent:{type:Boolean,default:!0}}),ys=e=>He(e)||et(e)&&e.every(He),lI={[tt]:ys,[rn]:ys,[Mt]:ys},oI=(e,t,n)=>{const l=_();return ze(async()=>{e.range?(Array.isArray(e.modelValue)?(t.firstValue=Math.max(e.min,e.modelValue[0]),t.secondValue=Math.min(e.max,e.modelValue[1])):(t.firstValue=e.min,t.secondValue=e.max),t.oldValue=[t.firstValue,t.secondValue]):(typeof e.modelValue!="number"||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),Jt(window,"resize",n),await Le(),n()}),{sliderWrapper:l}},aI=e=>S(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((n,l)=>n-l).filter(n=>n<=e.max&&n>=e.min).map(n=>({point:n,position:(n-e.min)*100/(e.max-e.min),mark:e.marks[n]})):[]),sI=(e,t,n)=>{const{form:l,formItem:a}=fn(),s=Nt(),r=_(),i=_(),u={firstButton:r,secondButton:i},c=S(()=>e.disabled||(l==null?void 0:l.disabled)||!1),f=S(()=>Math.min(t.firstValue,t.secondValue)),d=S(()=>Math.max(t.firstValue,t.secondValue)),p=S(()=>e.range?`${100*(d.value-f.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),m=S(()=>e.range?`${100*(f.value-e.min)/(e.max-e.min)}%`:"0%"),h=S(()=>e.vertical?{height:e.height}:{}),v=S(()=>e.vertical?{height:p.value,bottom:m.value}:{width:p.value,left:m.value}),g=()=>{s.value&&(t.sliderSize=s.value[`client${e.vertical?"Height":"Width"}`])},y=B=>{const F=e.min+B*(e.max-e.min)/100;if(!e.range)return r;let x;return Math.abs(f.value-F)<Math.abs(d.value-F)?x=t.firstValue<t.secondValue?"firstButton":"secondButton":x=t.firstValue>t.secondValue?"firstButton":"secondButton",u[x]},k=B=>{const F=y(B);return F.value.setPosition(B),F},b=B=>{t.firstValue=B,I(e.range?[f.value,d.value]:B)},C=B=>{t.secondValue=B,e.range&&I([f.value,d.value])},I=B=>{n(tt,B),n(rn,B)},T=async()=>{await Le(),n(Mt,e.range?[f.value,d.value]:e.modelValue)},M=B=>{var F,x,U,X,K,V;if(c.value||t.dragging)return;g();let W=0;if(e.vertical){const P=(U=(x=(F=B.touches)==null?void 0:F.item(0))==null?void 0:x.clientY)!=null?U:B.clientY;W=(s.value.getBoundingClientRect().bottom-P)/t.sliderSize*100}else{const P=(V=(K=(X=B.touches)==null?void 0:X.item(0))==null?void 0:K.clientX)!=null?V:B.clientX,H=s.value.getBoundingClientRect().left;W=(P-H)/t.sliderSize*100}if(!(W<0||W>100))return k(W)};return{elFormItem:a,slider:s,firstButton:r,secondButton:i,sliderDisabled:c,minValue:f,maxValue:d,runwayStyle:h,barStyle:v,resetSize:g,setPosition:k,emitChange:T,onSliderWrapperPrevent:B=>{var F,x;((F=u.firstButton.value)!=null&&F.dragging||(x=u.secondButton.value)!=null&&x.dragging)&&B.preventDefault()},onSliderClick:B=>{M(B)&&T()},onSliderDown:async B=>{const F=M(B);F&&(await Le(),F.value.onButtonDown(B))},setFirstValue:b,setSecondValue:C}},{left:rI,down:iI,right:uI,up:cI,home:dI,end:fI,pageUp:pI,pageDown:vI}=Ae,mI=(e,t,n)=>{const l=_(),a=_(!1),s=S(()=>t.value instanceof Function),r=S(()=>s.value&&t.value(e.modelValue)||e.modelValue),i=hn(()=>{n.value&&(a.value=!0)},50),u=hn(()=>{n.value&&(a.value=!1)},50);return{tooltip:l,tooltipVisible:a,formatValue:r,displayTooltip:i,hideTooltip:u}},hI=(e,t,n)=>{const{disabled:l,min:a,max:s,step:r,showTooltip:i,precision:u,sliderSize:c,formatTooltip:f,emitChange:d,resetSize:p,updateDragging:m}=Me(Lf),{tooltip:h,tooltipVisible:v,formatValue:g,displayTooltip:y,hideTooltip:k}=mI(e,f,i),b=_(),C=S(()=>`${(e.modelValue-a.value)/(s.value-a.value)*100}%`),I=S(()=>e.vertical?{bottom:C.value}:{left:C.value}),T=()=>{t.hovering=!0,y()},M=()=>{t.hovering=!1,t.dragging||k()},L=z=>{l.value||(z.preventDefault(),W(z),window.addEventListener("mousemove",P),window.addEventListener("touchmove",P),window.addEventListener("mouseup",H),window.addEventListener("touchend",H),window.addEventListener("contextmenu",H),b.value.focus())},A=z=>{l.value||(t.newPosition=Number.parseFloat(C.value)+z/(s.value-a.value)*100,Y(t.newPosition),d())},D=()=>{A(-r.value)},B=()=>{A(r.value)},F=()=>{A(-r.value*4)},x=()=>{A(r.value*4)},U=()=>{l.value||(Y(0),d())},X=()=>{l.value||(Y(100),d())},K=z=>{let q=!0;[rI,iI].includes(z.key)?D():[uI,cI].includes(z.key)?B():z.key===dI?U():z.key===fI?X():z.key===vI?F():z.key===pI?x():q=!1,q&&z.preventDefault()},V=z=>{let q,se;return z.type.startsWith("touch")?(se=z.touches[0].clientY,q=z.touches[0].clientX):(se=z.clientY,q=z.clientX),{clientX:q,clientY:se}},W=z=>{t.dragging=!0,t.isClick=!0;const{clientX:q,clientY:se}=V(z);e.vertical?t.startY=se:t.startX=q,t.startPosition=Number.parseFloat(C.value),t.newPosition=t.startPosition},P=z=>{if(t.dragging){t.isClick=!1,y(),p();let q;const{clientX:se,clientY:pe}=V(z);e.vertical?(t.currentY=pe,q=(t.startY-t.currentY)/c.value*100):(t.currentX=se,q=(t.currentX-t.startX)/c.value*100),t.newPosition=t.startPosition+q,Y(t.newPosition)}},H=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||k(),t.isClick||Y(t.newPosition),d()},0),window.removeEventListener("mousemove",P),window.removeEventListener("touchmove",P),window.removeEventListener("mouseup",H),window.removeEventListener("touchend",H),window.removeEventListener("contextmenu",H))},Y=async z=>{if(z===null||Number.isNaN(+z))return;z<0?z=0:z>100&&(z=100);const q=100/((s.value-a.value)/r.value);let pe=Math.round(z/q)*q*(s.value-a.value)*.01+a.value;pe=Number.parseFloat(pe.toFixed(u.value)),pe!==e.modelValue&&n(tt,pe),!t.dragging&&e.modelValue!==t.oldValue&&(t.oldValue=e.modelValue),await Le(),t.dragging&&y(),h.value.updatePopper()};return ue(()=>t.dragging,z=>{m(z)}),{disabled:l,button:b,tooltip:h,tooltipVisible:v,showTooltip:i,wrapperStyle:I,formatValue:g,handleMouseEnter:T,handleMouseLeave:M,onButtonDown:L,onKeyDown:K,setPosition:Y}},gI=(e,t,n,l)=>({stops:S(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step===0)return[];const r=(e.max-e.min)/e.step,i=100*e.step/(e.max-e.min),u=Array.from({length:r-1}).map((c,f)=>(f+1)*i);return e.range?u.filter(c=>c<100*(n.value-e.min)/(e.max-e.min)||c>100*(l.value-e.min)/(e.max-e.min)):u.filter(c=>c>100*(t.firstValue-e.min)/(e.max-e.min))}),getStopStyle:r=>e.vertical?{bottom:`${r}%`}:{left:`${r}%`}}),yI=(e,t,n,l,a,s)=>{const r=c=>{a(tt,c),a(rn,c)},i=()=>e.range?![n.value,l.value].every((c,f)=>c===t.oldValue[f]):e.modelValue!==t.oldValue,u=()=>{var c,f;e.min>e.max&&jt("Slider","min should not be greater than max.");const d=e.modelValue;e.range&&Array.isArray(d)?d[1]<e.min?r([e.min,e.min]):d[0]>e.max?r([e.max,e.max]):d[0]<e.min?r([e.min,d[1]]):d[1]>e.max?r([d[0],e.max]):(t.firstValue=d[0],t.secondValue=d[1],i()&&(e.validateEvent&&((c=s==null?void 0:s.validate)==null||c.call(s,"change").catch(p=>void 0)),t.oldValue=d.slice())):!e.range&&typeof d=="number"&&!Number.isNaN(d)&&(d<e.min?r(e.min):d>e.max?r(e.max):(t.firstValue=d,i()&&(e.validateEvent&&((f=s==null?void 0:s.validate)==null||f.call(s,"change").catch(p=>void 0)),t.oldValue=d)))};u(),ue(()=>t.dragging,c=>{c||u()}),ue(()=>e.modelValue,(c,f)=>{t.dragging||Array.isArray(c)&&Array.isArray(f)&&c.every((d,p)=>d===f[p])&&t.firstValue===c[0]&&t.secondValue===c[1]||u()},{deep:!0}),ue(()=>[e.min,e.max],()=>{u()})},bI=ge({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:Do,default:"top"}}),wI={[tt]:e=>He(e)},kI=["tabindex"],CI=j({name:"ElSliderButton"}),SI=j({...CI,props:bI,emits:wI,setup(e,{expose:t,emit:n}){const l=e,a=ce("slider"),s=St({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:l.modelValue}),{disabled:r,button:i,tooltip:u,showTooltip:c,tooltipVisible:f,wrapperStyle:d,formatValue:p,handleMouseEnter:m,handleMouseLeave:h,onButtonDown:v,onKeyDown:g,setPosition:y}=hI(l,s,n),{hovering:k,dragging:b}=Gt(s);return t({onButtonDown:v,onKeyDown:g,setPosition:y,hovering:k,dragging:b}),(C,I)=>(w(),O("div",{ref_key:"button",ref:i,class:$([o(a).e("button-wrapper"),{hover:o(k),dragging:o(b)}]),style:Re(o(d)),tabindex:o(r)?-1:0,onMouseenter:I[0]||(I[0]=(...T)=>o(m)&&o(m)(...T)),onMouseleave:I[1]||(I[1]=(...T)=>o(h)&&o(h)(...T)),onMousedown:I[2]||(I[2]=(...T)=>o(v)&&o(v)(...T)),onTouchstart:I[3]||(I[3]=(...T)=>o(v)&&o(v)(...T)),onFocus:I[4]||(I[4]=(...T)=>o(m)&&o(m)(...T)),onBlur:I[5]||(I[5]=(...T)=>o(h)&&o(h)(...T)),onKeydown:I[6]||(I[6]=(...T)=>o(g)&&o(g)(...T))},[E(o(cn),{ref_key:"tooltip",ref:u,visible:o(f),placement:C.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":C.tooltipClass,disabled:!o(c),persistent:""},{content:N(()=>[R("span",null,ae(o(p)),1)]),default:N(()=>[R("div",{class:$([o(a).e("button"),{hover:o(k),dragging:o(b)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled"])],46,kI))}});var fu=he(SI,[["__file","/home/runner/work/element-plus/element-plus/packages/components/slider/src/button.vue"]]);const _I=ge({mark:{type:te([String,Object]),default:void 0}});var EI=j({name:"ElSliderMarker",props:_I,setup(e){const t=ce("slider"),n=S(()=>ct(e.mark)?e.mark:e.mark.label),l=S(()=>ct(e.mark)?void 0:e.mark.style);return()=>De("div",{class:t.e("marks-text"),style:l.value},n.value)}});const $I=["id","role","aria-label","aria-labelledby"],TI={key:1},II=j({name:"ElSlider"}),NI=j({...II,props:nI,emits:lI,setup(e,{expose:t,emit:n}){const l=e,a=ce("slider"),{t:s}=ht(),r=St({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:i,slider:u,firstButton:c,secondButton:f,sliderDisabled:d,minValue:p,maxValue:m,runwayStyle:h,barStyle:v,resetSize:g,emitChange:y,onSliderWrapperPrevent:k,onSliderClick:b,onSliderDown:C,setFirstValue:I,setSecondValue:T}=sI(l,r,n),{stops:M,getStopStyle:L}=gI(l,r,p,m),{inputId:A,isLabeledByFormItem:D}=cl(l,{formItemContext:i}),B=qt(),F=S(()=>l.inputSize||B.value),x=S(()=>l.label||s("el.slider.defaultLabel",{min:l.min,max:l.max})),U=S(()=>l.range?l.rangeStartLabel||s("el.slider.defaultRangeStartLabel"):x.value),X=S(()=>l.formatValueText?l.formatValueText(z.value):`${z.value}`),K=S(()=>l.rangeEndLabel||s("el.slider.defaultRangeEndLabel")),V=S(()=>l.formatValueText?l.formatValueText(q.value):`${q.value}`),W=S(()=>[a.b(),a.m(B.value),a.is("vertical",l.vertical),{[a.m("with-input")]:l.showInput}]),P=aI(l);yI(l,r,p,m,n,i);const H=S(()=>{const oe=[l.min,l.max,l.step].map(re=>{const Q=`${re}`.split(".")[1];return Q?Q.length:0});return Math.max.apply(null,oe)}),{sliderWrapper:Y}=oI(l,r,g),{firstValue:z,secondValue:q,sliderSize:se}=Gt(r),pe=oe=>{r.dragging=oe};return dt(Lf,{...Gt(l),sliderSize:se,disabled:d,precision:H,emitChange:y,resetSize:g,updateDragging:pe}),t({onSliderClick:b}),(oe,re)=>{var Q,ve;return w(),O("div",{id:oe.range?o(A):void 0,ref_key:"sliderWrapper",ref:Y,class:$(o(W)),role:oe.range?"group":void 0,"aria-label":oe.range&&!o(D)?o(x):void 0,"aria-labelledby":oe.range&&o(D)?(Q=o(i))==null?void 0:Q.labelId:void 0,onTouchstart:re[2]||(re[2]=(..._e)=>o(k)&&o(k)(..._e)),onTouchmove:re[3]||(re[3]=(..._e)=>o(k)&&o(k)(..._e))},[R("div",{ref_key:"slider",ref:u,class:$([o(a).e("runway"),{"show-input":oe.showInput&&!oe.range},o(a).is("disabled",o(d))]),style:Re(o(h)),onMousedown:re[0]||(re[0]=(..._e)=>o(C)&&o(C)(..._e)),onTouchstart:re[1]||(re[1]=(..._e)=>o(C)&&o(C)(..._e))},[R("div",{class:$(o(a).e("bar")),style:Re(o(v))},null,6),E(fu,{id:oe.range?void 0:o(A),ref_key:"firstButton",ref:c,"model-value":o(z),vertical:oe.vertical,"tooltip-class":oe.tooltipClass,placement:oe.placement,role:"slider","aria-label":oe.range||!o(D)?o(U):void 0,"aria-labelledby":!oe.range&&o(D)?(ve=o(i))==null?void 0:ve.labelId:void 0,"aria-valuemin":oe.min,"aria-valuemax":oe.range?o(q):oe.max,"aria-valuenow":o(z),"aria-valuetext":o(X),"aria-orientation":oe.vertical?"vertical":"horizontal","aria-disabled":o(d),"onUpdate:modelValue":o(I)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),oe.range?(w(),G(fu,{key:0,ref_key:"secondButton",ref:f,"model-value":o(q),vertical:oe.vertical,"tooltip-class":oe.tooltipClass,placement:oe.placement,role:"slider","aria-label":o(K),"aria-valuemin":o(z),"aria-valuemax":oe.max,"aria-valuenow":o(q),"aria-valuetext":o(V),"aria-orientation":oe.vertical?"vertical":"horizontal","aria-disabled":o(d),"onUpdate:modelValue":o(T)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):Z("v-if",!0),oe.showStops?(w(),O("div",TI,[(w(!0),O(Ne,null,Ze(o(M),(_e,Te)=>(w(),O("div",{key:Te,class:$(o(a).e("stop")),style:Re(o(L)(_e))},null,6))),128))])):Z("v-if",!0),o(P).length>0?(w(),O(Ne,{key:2},[R("div",null,[(w(!0),O(Ne,null,Ze(o(P),(_e,Te)=>(w(),O("div",{key:Te,style:Re(o(L)(_e.position)),class:$([o(a).e("stop"),o(a).e("marks-stop")])},null,6))),128))]),R("div",{class:$(o(a).e("marks"))},[(w(!0),O(Ne,null,Ze(o(P),(_e,Te)=>(w(),G(o(EI),{key:Te,mark:_e.mark,style:Re(o(L)(_e.position))},null,8,["mark","style"]))),128))],2)],64)):Z("v-if",!0)],38),oe.showInput&&!oe.range?(w(),G(o(of),{key:0,ref:"input","model-value":o(z),class:$(o(a).e("input")),step:oe.step,disabled:o(d),controls:oe.showInputControls,min:oe.min,max:oe.max,debounce:oe.debounce,size:o(F),"onUpdate:modelValue":o(I),onChange:o(y)},null,8,["model-value","class","step","disabled","controls","min","max","debounce","size","onUpdate:modelValue","onChange"])):Z("v-if",!0)],42,$I)}}});var PI=he(NI,[["__file","/home/runner/work/element-plus/element-plus/packages/components/slider/src/slider.vue"]]);const MI=Qe(PI),LI=ge({prefixCls:{type:String}}),pu=j({name:"ElSpaceItem",props:LI,setup(e,{slots:t}){const n=ce("space"),l=S(()=>`${e.prefixCls||n.b()}__item`);return()=>De("div",{class:l.value},ie(t,"default"))}}),vu={small:8,default:12,large:16};function RI(e){const t=ce("space"),n=S(()=>[t.b(),t.m(e.direction),e.class]),l=_(0),a=_(0),s=S(()=>{const i=e.wrap||e.fill?{flexWrap:"wrap",marginBottom:`-${a.value}px`}:{},u={alignItems:e.alignment};return[i,u,e.style]}),r=S(()=>{const i={paddingBottom:`${a.value}px`,marginRight:`${l.value}px`},u=e.fill?{flexGrow:1,minWidth:`${e.fillRatio}%`}:{};return[i,u]});return Cn(()=>{const{size:i="small",wrap:u,direction:c,fill:f}=e;if(et(i)){const[d=0,p=0]=i;l.value=d,a.value=p}else{let d;He(i)?d=i:d=vu[i||"small"]||vu.small,(u||f)&&c==="horizontal"?l.value=a.value=d:c==="horizontal"?(l.value=d,a.value=0):(a.value=d,l.value=0)}}),{classes:n,containerStyle:s,itemStyle:r}}const OI=ge({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:te([String,Object,Array]),default:""},style:{type:te([String,Array,Object]),default:""},alignment:{type:te(String),default:"center"},prefixCls:{type:String},spacer:{type:te([Object,String,Number,Array]),default:null,validator:e=>zt(e)||He(e)||ct(e)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:Hn,validator:e=>He(e)||et(e)&&e.length===2&&e.every(He)}}),AI=j({name:"ElSpace",props:OI,setup(e,{slots:t}){const{classes:n,containerStyle:l,itemStyle:a}=RI(e);function s(r,i="",u=[]){const{prefixCls:c}=e;return r.forEach((f,d)=>{$s(f)?et(f.children)&&f.children.forEach((p,m)=>{$s(p)&&et(p.children)?s(p.children,`${i+m}-`,u):u.push(E(pu,{style:a.value,prefixCls:c,key:`nested-${i+m}`},{default:()=>[p]},bn.PROPS|bn.STYLE,["style","prefixCls"]))}):Im(f)&&u.push(E(pu,{style:a.value,prefixCls:c,key:`LoopKey${i+d}`},{default:()=>[f]},bn.PROPS|bn.STYLE,["style","prefixCls"]))}),u}return()=>{var r;const{spacer:i,direction:u}=e,c=ie(t,"default",{key:0},()=>[]);if(((r=c.children)!=null?r:[]).length===0)return null;if(et(c.children)){let f=s(c.children);if(i){const d=f.length-1;f=f.reduce((p,m,h)=>{const v=[...p,m];return h!==d&&v.push(E("span",{style:[a.value,u==="vertical"?"width: 100%":null],key:h},[zt(i)?i:ye(i,bn.TEXT)],bn.STYLE)),v},[])}return E("div",{class:n.value,style:l.value},f,bn.STYLE|bn.CLASS)}return c.children}}}),VI=Qe(AI),DI=ge({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:te([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:te([String,Object,Array])}}),BI=j({name:"ElStatistic"}),xI=j({...BI,props:DI,setup(e,{expose:t}){const n=e,l=ce("statistic"),a=S(()=>{const{value:s,formatter:r,precision:i,decimalSeparator:u,groupSeparator:c}=n;if(kt(r))return r(s);if(!He(s))return s;let[f,d=""]=String(s).split(".");return d=d.padEnd(i,"0").slice(0,i>0?i:0),f=f.replace(/\B(?=(\d{3})+(?!\d))/g,c),[f,d].join(d?u:"")});return t({displayValue:a}),(s,r)=>(w(),O("div",{class:$(o(l).b())},[s.$slots.title||s.title?(w(),O("div",{key:0,class:$(o(l).e("head"))},[ie(s.$slots,"title",{},()=>[ye(ae(s.title),1)])],2)):Z("v-if",!0),R("div",{class:$(o(l).e("content"))},[s.$slots.prefix||s.prefix?(w(),O("div",{key:0,class:$(o(l).e("prefix"))},[ie(s.$slots,"prefix",{},()=>[R("span",null,ae(s.prefix),1)])],2)):Z("v-if",!0),R("span",{class:$(o(l).e("number")),style:Re(s.valueStyle)},ae(o(a)),7),s.$slots.suffix||s.suffix?(w(),O("div",{key:1,class:$(o(l).e("suffix"))},[ie(s.$slots,"suffix",{},()=>[R("span",null,ae(s.suffix),1)])],2)):Z("v-if",!0)],2)],2))}});var FI=he(xI,[["__file","/home/runner/work/element-plus/element-plus/packages/components/statistic/src/statistic.vue"]]);const Rf=Qe(FI),zI=ge({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:te([Number,Object]),default:0},valueStyle:{type:te([String,Object,Array])}}),HI={finish:()=>!0,[Mt]:e=>He(e)},KI=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],mu=e=>He(e)?new Date(e).getTime():e.valueOf(),hu=(e,t)=>{let n=e;const l=/\[([^\]]*)]/g;return KI.reduce((s,[r,i])=>{const u=new RegExp(`${r}+(?![^\\[\\]]*\\])`,"g");if(u.test(s)){const c=Math.floor(n/i);return n-=c*i,s.replace(u,f=>String(c).padStart(f.length,"0"))}return s},t).replace(l,"$1")},WI=j({name:"ElCountdown"}),UI=j({...WI,props:zI,emits:HI,setup(e,{expose:t,emit:n}){const l=e;let a;const s=_(mu(l.value)-Date.now()),r=S(()=>hu(s.value,l.format)),i=f=>hu(f,l.format),u=()=>{a&&(qa(a),a=void 0)},c=()=>{const f=mu(l.value),d=()=>{let p=f-Date.now();n("change",p),p<=0?(p=0,u(),n("finish")):a=Co(d),s.value=p};a=Co(d)};return ue(()=>[l.value,l.format],()=>{u(),c()},{immediate:!0}),Rt(()=>{u()}),t({displayValue:r}),(f,d)=>(w(),G(o(Rf),{value:s.value,title:f.title,prefix:f.prefix,suffix:f.suffix,"value-style":f.valueStyle,formatter:i},xn({_:2},[Ze(f.$slots,(p,m)=>({name:m,fn:N(()=>[ie(f.$slots,m)])}))]),1032,["value","title","prefix","suffix","value-style"]))}});var jI=he(UI,[["__file","/home/runner/work/element-plus/element-plus/packages/components/countdown/src/countdown.vue"]]);const qI=Qe(jI),GI=ge({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),YI={[Mt]:(e,t)=>[e,t].every(He)},XI=j({name:"ElSteps"}),ZI=j({...XI,props:GI,emits:YI,setup(e,{emit:t}){const n=e,l=ce("steps"),{children:a,addChild:s,removeChild:r}=$r(at(),"ElStep");return ue(a,()=>{a.value.forEach((i,u)=>{i.setIndex(u)})}),dt("ElSteps",{props:n,steps:a,addStep:s,removeStep:r}),ue(()=>n.active,(i,u)=>{t(Mt,i,u)}),(i,u)=>(w(),O("div",{class:$([o(l).b(),o(l).m(i.simple?"simple":i.direction)])},[ie(i.$slots,"default")],2))}});var JI=he(ZI,[["__file","/home/runner/work/element-plus/element-plus/packages/components/steps/src/steps.vue"]]);const QI=ge({title:{type:String,default:""},icon:{type:Pt},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),eN=j({name:"ElStep"}),tN=j({...eN,props:QI,setup(e){const t=e,n=ce("step"),l=_(-1),a=_({}),s=_(""),r=Me("ElSteps"),i=at();ze(()=>{ue([()=>r.props.active,()=>r.props.processStatus,()=>r.props.finishStatus],([T])=>{C(T)},{immediate:!0})}),Rt(()=>{r.removeStep(I.uid)});const u=S(()=>t.status||s.value),c=S(()=>{const T=r.steps.value[l.value-1];return T?T.currentStatus:"wait"}),f=S(()=>r.props.alignCenter),d=S(()=>r.props.direction==="vertical"),p=S(()=>r.props.simple),m=S(()=>r.steps.value.length),h=S(()=>{var T;return((T=r.steps.value[m.value-1])==null?void 0:T.uid)===(i==null?void 0:i.uid)}),v=S(()=>p.value?"":r.props.space),g=S(()=>[n.b(),n.is(p.value?"simple":r.props.direction),n.is("flex",h.value&&!v.value&&!f.value),n.is("center",f.value&&!d.value&&!p.value)]),y=S(()=>{const T={flexBasis:He(v.value)?`${v.value}px`:v.value?v.value:`${100/(m.value-(f.value?0:1))}%`};return d.value||h.value&&(T.maxWidth=`${100/m.value}%`),T}),k=T=>{l.value=T},b=T=>{const M=T==="wait",L={transitionDelay:`${M?"-":""}${150*l.value}ms`},A=T===r.props.processStatus||M?0:100;L.borderWidth=A&&!p.value?"1px":0,L[r.props.direction==="vertical"?"height":"width"]=`${A}%`,a.value=L},C=T=>{T>l.value?s.value=r.props.finishStatus:T===l.value&&c.value!=="error"?s.value=r.props.processStatus:s.value="wait";const M=r.steps.value[l.value-1];M&&M.calcProgress(s.value)},I=St({uid:i.uid,currentStatus:u,setIndex:k,calcProgress:b});return r.addStep(I),(T,M)=>(w(),O("div",{style:Re(o(y)),class:$(o(g))},[Z(" icon & line "),R("div",{class:$([o(n).e("head"),o(n).is(o(u))])},[o(p)?Z("v-if",!0):(w(),O("div",{key:0,class:$(o(n).e("line"))},[R("i",{class:$(o(n).e("line-inner")),style:Re(a.value)},null,6)],2)),R("div",{class:$([o(n).e("icon"),o(n).is(T.icon||T.$slots.icon?"icon":"text")])},[ie(T.$slots,"icon",{},()=>[T.icon?(w(),G(o(Pe),{key:0,class:$(o(n).e("icon-inner"))},{default:N(()=>[(w(),G(rt(T.icon)))]),_:1},8,["class"])):o(u)==="success"?(w(),G(o(Pe),{key:1,class:$([o(n).e("icon-inner"),o(n).is("status")])},{default:N(()=>[E(o(no))]),_:1},8,["class"])):o(u)==="error"?(w(),G(o(Pe),{key:2,class:$([o(n).e("icon-inner"),o(n).is("status")])},{default:N(()=>[E(o(Sn))]),_:1},8,["class"])):o(p)?Z("v-if",!0):(w(),O("div",{key:3,class:$(o(n).e("icon-inner"))},ae(l.value+1),3))])],2)],2),Z(" title & description "),R("div",{class:$(o(n).e("main"))},[R("div",{class:$([o(n).e("title"),o(n).is(o(u))])},[ie(T.$slots,"title",{},()=>[ye(ae(T.title),1)])],2),o(p)?(w(),O("div",{key:0,class:$(o(n).e("arrow"))},null,2)):(w(),O("div",{key:1,class:$([o(n).e("description"),o(n).is(o(u))])},[ie(T.$slots,"description",{},()=>[ye(ae(T.description),1)])],2))],2)],6))}});var Of=he(tN,[["__file","/home/runner/work/element-plus/element-plus/packages/components/steps/src/item.vue"]]);const nN=Qe(JI,{Step:Of}),lN=xt(Of),oN=ge({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:String,validator:Ua},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},activeIcon:{type:Pt},inactiveIcon:{type:Pt},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},borderColor:{type:String,default:""},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:te(Function)},id:String,tabindex:{type:[String,Number]},value:{type:[Boolean,String,Number],default:!1}}),aN={[tt]:e=>Kt(e)||ct(e)||He(e),[Mt]:e=>Kt(e)||ct(e)||He(e),[rn]:e=>Kt(e)||ct(e)||He(e)},sN=["onClick"],rN=["id","aria-checked","aria-disabled","name","true-value","false-value","disabled","tabindex","onKeydown"],iN=["aria-hidden"],uN=["aria-hidden"],cN=["aria-hidden"],qs="ElSwitch",dN=j({name:qs}),fN=j({...dN,props:oN,emits:aN,setup(e,{expose:t,emit:n}){const l=e,a=at(),{formItem:s}=fn(),r=qt(),i=ce("switch");(L=>{L.forEach(A=>{Fn({from:A[0],replacement:A[1],scope:qs,version:"2.3.0",ref:"https://element-plus.org/en-US/component/switch.html#attributes",type:"Attribute"},S(()=>{var D;return!!((D=a.vnode.props)!=null&&D[A[2]])}))})})([['"value"','"model-value" or "v-model"',"value"],['"active-color"',"CSS var `--el-switch-on-color`","activeColor"],['"inactive-color"',"CSS var `--el-switch-off-color`","inactiveColor"],['"border-color"',"CSS var `--el-switch-border-color`","borderColor"]]);const{inputId:c}=cl(l,{formItemContext:s}),f=gn(S(()=>l.loading)),d=_(l.modelValue!==!1),p=_(),m=_(),h=S(()=>[i.b(),i.m(r.value),i.is("disabled",f.value),i.is("checked",b.value)]),v=S(()=>[i.e("label"),i.em("label","left"),i.is("active",!b.value)]),g=S(()=>[i.e("label"),i.em("label","right"),i.is("active",b.value)]),y=S(()=>({width:Ft(l.width)}));ue(()=>l.modelValue,()=>{d.value=!0}),ue(()=>l.value,()=>{d.value=!1});const k=S(()=>d.value?l.modelValue:l.value),b=S(()=>k.value===l.activeValue);[l.activeValue,l.inactiveValue].includes(k.value)||(n(tt,l.inactiveValue),n(Mt,l.inactiveValue),n(rn,l.inactiveValue)),ue(b,L=>{var A;p.value.checked=L,l.validateEvent&&((A=s==null?void 0:s.validate)==null||A.call(s,"change").catch(D=>void 0))});const C=()=>{const L=b.value?l.inactiveValue:l.activeValue;n(tt,L),n(Mt,L),n(rn,L),Le(()=>{p.value.checked=b.value})},I=()=>{if(f.value)return;const{beforeChange:L}=l;if(!L){C();return}const A=L();[Es(A),Kt(A)].includes(!0)||jt(qs,"beforeChange must return type `Promise<boolean>` or `boolean`"),Es(A)?A.then(B=>{B&&C()}).catch(B=>{}):A&&C()},T=S(()=>i.cssVarBlock({...l.activeColor?{"on-color":l.activeColor}:null,...l.inactiveColor?{"off-color":l.inactiveColor}:null,...l.borderColor?{"border-color":l.borderColor}:null})),M=()=>{var L,A;(A=(L=p.value)==null?void 0:L.focus)==null||A.call(L)};return ze(()=>{p.value.checked=b.value}),t({focus:M,checked:b}),(L,A)=>(w(),O("div",{class:$(o(h)),style:Re(o(T)),onClick:Fe(I,["prevent"])},[R("input",{id:o(c),ref_key:"input",ref:p,class:$(o(i).e("input")),type:"checkbox",role:"switch","aria-checked":o(b),"aria-disabled":o(f),name:L.name,"true-value":L.activeValue,"false-value":L.inactiveValue,disabled:o(f),tabindex:L.tabindex,onChange:C,onKeydown:pt(I,["enter"])},null,42,rN),!L.inlinePrompt&&(L.inactiveIcon||L.inactiveText)?(w(),O("span",{key:0,class:$(o(v))},[L.inactiveIcon?(w(),G(o(Pe),{key:0},{default:N(()=>[(w(),G(rt(L.inactiveIcon)))]),_:1})):Z("v-if",!0),!L.inactiveIcon&&L.inactiveText?(w(),O("span",{key:1,"aria-hidden":o(b)},ae(L.inactiveText),9,iN)):Z("v-if",!0)],2)):Z("v-if",!0),R("span",{ref_key:"core",ref:m,class:$(o(i).e("core")),style:Re(o(y))},[L.inlinePrompt?(w(),O("div",{key:0,class:$(o(i).e("inner"))},[L.activeIcon||L.inactiveIcon?(w(),G(o(Pe),{key:0,class:$(o(i).is("icon"))},{default:N(()=>[(w(),G(rt(o(b)?L.activeIcon:L.inactiveIcon)))]),_:1},8,["class"])):L.activeText||L.inactiveText?(w(),O("span",{key:1,class:$(o(i).is("text")),"aria-hidden":!o(b)},ae(o(b)?L.activeText:L.inactiveText),11,uN)):Z("v-if",!0)],2)):Z("v-if",!0),R("div",{class:$(o(i).e("action"))},[L.loading?(w(),G(o(Pe),{key:0,class:$(o(i).is("loading"))},{default:N(()=>[E(o(Xn))]),_:1},8,["class"])):Z("v-if",!0)],2)],6),!L.inlinePrompt&&(L.activeIcon||L.activeText)?(w(),O("span",{key:1,class:$(o(g))},[L.activeIcon?(w(),G(o(Pe),{key:0},{default:N(()=>[(w(),G(rt(L.activeIcon)))]),_:1})):Z("v-if",!0),!L.activeIcon&&L.activeText?(w(),O("span",{key:1,"aria-hidden":!o(b)},ae(L.activeText),9,cN)):Z("v-if",!0)],2)):Z("v-if",!0)],14,sN))}});var pN=he(fN,[["__file","/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]);const vN=Qe(pN),bs=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},mN=function(e,t,n,l,a){if(!t&&!l&&(!a||Array.isArray(a)&&!a.length))return e;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const s=l?null:function(i,u){return a?(Array.isArray(a)||(a=[a]),a.map(c=>typeof c=="string"?Vt(i,c):c(i,u,e))):(t!=="$key"&&It(i)&&"$value"in i&&(i=i.$value),[It(i)?Vt(i,t):i])},r=function(i,u){if(l)return l(i.value,u.value);for(let c=0,f=i.key.length;c<f;c++){if(i.key[c]<u.key[c])return-1;if(i.key[c]>u.key[c])return 1}return 0};return e.map((i,u)=>({value:i,index:u,key:s?s(i,u):null})).sort((i,u)=>{let c=r(i,u);return c||(c=i.index-u.index),c*+n}).map(i=>i.value)},Af=function(e,t){let n=null;return e.columns.forEach(l=>{l.id===t&&(n=l)}),n},hN=function(e,t){let n=null;for(let l=0;l<e.columns.length;l++){const a=e.columns[l];if(a.columnKey===t){n=a;break}}return n||jt("ElTable",`No column matching with column-key: ${t}`),n},gu=function(e,t,n){const l=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return l?Af(e,l[0]):null},en=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let l=e;for(const a of n)l=l[a];return`${l}`}else if(typeof t=="function")return t.call(null,e)},yl=function(e,t){const n={};return(e||[]).forEach((l,a)=>{n[en(l,t)]={row:l,index:a}}),n};function gN(e,t){const n={};let l;for(l in e)n[l]=e[l];for(l in t)if(nn(t,l)){const a=t[l];typeof a<"u"&&(n[l]=a)}return n}function Gr(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function Vf(e){return e===""||e!==void 0&&(e=Gr(e),Number.isNaN(e)&&(e=80)),e}function yN(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function bN(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...l)=>t(n(...l)))}function yo(e,t,n){let l=!1;const a=e.indexOf(t),s=a!==-1,r=i=>{i==="add"?e.push(t):e.splice(a,1),l=!0,et(t.children)&&t.children.forEach(u=>{yo(e,u,n??!s)})};return Kt(n)?n&&!s?r("add"):!n&&s&&r("remove"):r(s?"remove":"add"),l}function wN(e,t,n="children",l="hasChildren"){const a=r=>!(Array.isArray(r)&&r.length);function s(r,i,u){t(r,i,u),i.forEach(c=>{if(c[l]){t(c,null,u+1);return}const f=c[n];a(f)||s(c,f,u+1)})}e.forEach(r=>{if(r[l]){t(r,null,0);return}const i=r[n];a(i)||s(r,i,0)})}let Wn;function kN(e,t,n,l,a){a=tc({enterable:!0,showArrow:!0},a);const s=e==null?void 0:e.dataset.prefix,r=e==null?void 0:e.querySelector(`.${s}-scrollbar__wrap`);function i(){const g=a.effect==="light",y=document.createElement("div");return y.className=[`${s}-popper`,g?"is-light":"is-dark",a.popperClass||""].join(" "),n=_v(n),y.innerHTML=n,y.style.zIndex=String(l()),e==null||e.appendChild(y),y}function u(){const g=document.createElement("div");return g.className=`${s}-popper__arrow`,g}function c(){f&&f.update()}Wn==null||Wn(),Wn=()=>{try{f&&f.destroy(),m&&(e==null||e.removeChild(m)),t.removeEventListener("mouseenter",d),t.removeEventListener("mouseleave",p),r==null||r.removeEventListener("scroll",Wn),Wn=void 0}catch{}};let f=null,d=c,p=Wn;a.enterable&&({onOpen:d,onClose:p}=Nc({showAfter:a.showAfter,hideAfter:a.hideAfter,open:c,close:Wn}));const m=i();m.onmouseenter=d,m.onmouseleave=p;const h=[];if(a.offset&&h.push({name:"offset",options:{offset:[0,a.offset]}}),a.showArrow){const g=m.appendChild(u());h.push({name:"arrow",options:{element:g,padding:10}})}const v=a.popperOptions||{};return f=qu(t,m,{placement:a.placement||"top",strategy:"fixed",...v,modifiers:v.modifiers?h.concat(v.modifiers):h}),t.addEventListener("mouseenter",d),t.addEventListener("mouseleave",p),r==null||r.addEventListener("scroll",Wn),f}function Df(e){return e.children?Ev(e.children,Df):[e]}function yu(e,t){return e+t.colSpan}const Bf=(e,t,n,l)=>{let a=0,s=e;const r=n.states.columns.value;if(l){const u=Df(l[e]);a=r.slice(0,r.indexOf(u[0])).reduce(yu,0),s=a+u.reduce(yu,0)-1}else a=e;let i;switch(t){case"left":s<n.states.fixedLeafColumnsLength.value&&(i="left");break;case"right":a>=r.length-n.states.rightFixedLeafColumnsLength.value&&(i="right");break;default:s<n.states.fixedLeafColumnsLength.value?i="left":a>=r.length-n.states.rightFixedLeafColumnsLength.value&&(i="right")}return i?{direction:i,start:a,after:s}:{}},Yr=(e,t,n,l,a,s=0)=>{const r=[],{direction:i,start:u,after:c}=Bf(t,n,l,a);if(i){const f=i==="left";r.push(`${e}-fixed-column--${i}`),f&&c+s===l.states.fixedLeafColumnsLength.value-1?r.push("is-last-column"):!f&&u-s===l.states.columns.value.length-l.states.rightFixedLeafColumnsLength.value&&r.push("is-first-column")}return r};function bu(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Xr=(e,t,n,l)=>{const{direction:a,start:s=0,after:r=0}=Bf(e,t,n,l);if(!a)return;const i={},u=a==="left",c=n.states.columns.value;return u?i.left=c.slice(0,s).reduce(bu,0):i.right=c.slice(r+1).reverse().reduce(bu,0),i},Ql=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function CN(e){const t=at(),n=_(!1),l=_([]);return{updateExpandRows:()=>{const u=e.data.value||[],c=e.rowKey.value;if(n.value)l.value=u.slice();else if(c){const f=yl(l.value,c);l.value=u.reduce((d,p)=>{const m=en(p,c);return f[m]&&d.push(p),d},[])}else l.value=[]},toggleRowExpansion:(u,c)=>{yo(l.value,u,c)&&t.emit("expand-change",u,l.value.slice())},setExpandRowKeys:u=>{t.store.assertRowKey();const c=e.data.value||[],f=e.rowKey.value,d=yl(c,f);l.value=u.reduce((p,m)=>{const h=d[m];return h&&p.push(h.row),p},[])},isRowExpanded:u=>{const c=e.rowKey.value;return c?!!yl(l.value,c)[en(u,c)]:l.value.includes(u)},states:{expandRows:l,defaultExpandAll:n}}}function SN(e){const t=at(),n=_(null),l=_(null),a=c=>{t.store.assertRowKey(),n.value=c,r(c)},s=()=>{n.value=null},r=c=>{const{data:f,rowKey:d}=e;let p=null;d.value&&(p=(o(f)||[]).find(m=>en(m,d.value)===c)),l.value=p,t.emit("current-change",l.value,null)};return{setCurrentRowKey:a,restoreCurrentRowKey:s,setCurrentRowByKey:r,updateCurrentRow:c=>{const f=l.value;if(c&&c!==f){l.value=c,t.emit("current-change",l.value,f);return}!c&&f&&(l.value=null,t.emit("current-change",null,f))},updateCurrentRowData:()=>{const c=e.rowKey.value,f=e.data.value||[],d=l.value;if(!f.includes(d)&&d){if(c){const p=en(d,c);r(p)}else l.value=null;l.value===null&&t.emit("current-change",null,d)}else n.value&&(r(n.value),s())},states:{_currentRowKey:n,currentRow:l}}}function _N(e){const t=_([]),n=_({}),l=_(16),a=_(!1),s=_({}),r=_("hasChildren"),i=_("children"),u=at(),c=S(()=>{if(!e.rowKey.value)return{};const y=e.data.value||[];return d(y)}),f=S(()=>{const y=e.rowKey.value,k=Object.keys(s.value),b={};return k.length&&k.forEach(C=>{if(s.value[C].length){const I={children:[]};s.value[C].forEach(T=>{const M=en(T,y);I.children.push(M),T[r.value]&&!b[M]&&(b[M]={children:[]})}),b[C]=I}}),b}),d=y=>{const k=e.rowKey.value,b={};return wN(y,(C,I,T)=>{const M=en(C,k);Array.isArray(I)?b[M]={children:I.map(L=>en(L,k)),level:T}:a.value&&(b[M]={children:[],lazy:!0,level:T})},i.value,r.value),b},p=(y=!1,k=(b=>(b=u.store)==null?void 0:b.states.defaultExpandAll.value)())=>{var b;const C=c.value,I=f.value,T=Object.keys(C),M={};if(T.length){const L=o(n),A=[],D=(F,x)=>{if(y)return t.value?k||t.value.includes(x):!!(k||F!=null&&F.expanded);{const U=k||t.value&&t.value.includes(x);return!!(F!=null&&F.expanded||U)}};T.forEach(F=>{const x=L[F],U={...C[F]};if(U.expanded=D(x,F),U.lazy){const{loaded:X=!1,loading:K=!1}=x||{};U.loaded=!!X,U.loading=!!K,A.push(F)}M[F]=U});const B=Object.keys(I);a.value&&B.length&&A.length&&B.forEach(F=>{const x=L[F],U=I[F].children;if(A.includes(F)){if(M[F].children.length!==0)throw new Error("[ElTable]children must be an empty array.");M[F].children=U}else{const{loaded:X=!1,loading:K=!1}=x||{};M[F]={lazy:!0,loaded:!!X,loading:!!K,expanded:D(x,F),children:U,level:""}}})}n.value=M,(b=u.store)==null||b.updateTableScrollY()};ue(()=>t.value,()=>{p(!0)}),ue(()=>c.value,()=>{p()}),ue(()=>f.value,()=>{p()});const m=y=>{t.value=y,p()},h=(y,k)=>{u.store.assertRowKey();const b=e.rowKey.value,C=en(y,b),I=C&&n.value[C];if(C&&I&&"expanded"in I){const T=I.expanded;k=typeof k>"u"?!I.expanded:k,n.value[C].expanded=k,T!==k&&u.emit("expand-change",y,k),u.store.updateTableScrollY()}},v=y=>{u.store.assertRowKey();const k=e.rowKey.value,b=en(y,k),C=n.value[b];a.value&&C&&"loaded"in C&&!C.loaded?g(y,b,C):h(y,void 0)},g=(y,k,b)=>{const{load:C}=u.props;C&&!n.value[k].loaded&&(n.value[k].loading=!0,C(y,b,I=>{if(!Array.isArray(I))throw new TypeError("[ElTable] data must be an array");n.value[k].loading=!1,n.value[k].loaded=!0,n.value[k].expanded=!0,I.length&&(s.value[k]=I),u.emit("expand-change",y,!0)}))};return{loadData:g,loadOrToggle:v,toggleTreeExpansion:h,updateTreeExpandKeys:m,updateTreeData:p,normalize:d,states:{expandRowKeys:t,treeData:n,indent:l,lazy:a,lazyTreeNodeMap:s,lazyColumnIdentifier:r,childrenColumnName:i}}}const EN=(e,t)=>{const n=t.sortingColumn;return!n||typeof n.sortable=="string"?e:mN(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},da=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,da(n.children)):t.push(n)}),t};function $N(){var e;const t=at(),{size:n}=Gt((e=t.proxy)==null?void 0:e.$props),l=_(null),a=_([]),s=_([]),r=_(!1),i=_([]),u=_([]),c=_([]),f=_([]),d=_([]),p=_([]),m=_([]),h=_([]),v=[],g=_(0),y=_(0),k=_(0),b=_(!1),C=_([]),I=_(!1),T=_(!1),M=_(null),L=_({}),A=_(null),D=_(null),B=_(null),F=_(null),x=_(null);ue(a,()=>t.state&&V(!1),{deep:!0});const U=()=>{if(!l.value)throw new Error("[ElTable] prop row-key is required")},X=me=>{var ne;(ne=me.children)==null||ne.forEach(we=>{we.fixed=me.fixed,X(we)})},K=()=>{i.value.forEach($e=>{X($e)}),f.value=i.value.filter($e=>$e.fixed===!0||$e.fixed==="left"),d.value=i.value.filter($e=>$e.fixed==="right"),f.value.length>0&&i.value[0]&&i.value[0].type==="selection"&&!i.value[0].fixed&&(i.value[0].fixed=!0,f.value.unshift(i.value[0]));const me=i.value.filter($e=>!$e.fixed);u.value=[].concat(f.value).concat(me).concat(d.value);const ne=da(me),we=da(f.value),de=da(d.value);g.value=ne.length,y.value=we.length,k.value=de.length,c.value=[].concat(we).concat(ne).concat(de),r.value=f.value.length>0||d.value.length>0},V=(me,ne=!1)=>{me&&K(),ne?t.state.doLayout():t.state.debouncedUpdateLayout()},W=me=>C.value.includes(me),P=()=>{b.value=!1,C.value.length&&(C.value=[],t.emit("selection-change",[]))},H=()=>{let me;if(l.value){me=[];const ne=yl(C.value,l.value),we=yl(a.value,l.value);for(const de in ne)nn(ne,de)&&!we[de]&&me.push(ne[de].row)}else me=C.value.filter(ne=>!a.value.includes(ne));if(me.length){const ne=C.value.filter(we=>!me.includes(we));C.value=ne,t.emit("selection-change",ne.slice())}},Y=()=>(C.value||[]).slice(),z=(me,ne=void 0,we=!0)=>{if(yo(C.value,me,ne)){const $e=(C.value||[]).slice();we&&t.emit("select",$e,me),t.emit("selection-change",$e)}},q=()=>{var me,ne;const we=T.value?!b.value:!(b.value||C.value.length);b.value=we;let de=!1,$e=0;const J=(ne=(me=t==null?void 0:t.store)==null?void 0:me.states)==null?void 0:ne.rowKey.value;a.value.forEach((Oe,le)=>{const Ce=le+$e;M.value?M.value.call(null,Oe,Ce)&&yo(C.value,Oe,we)&&(de=!0):yo(C.value,Oe,we)&&(de=!0),$e+=oe(en(Oe,J))}),de&&t.emit("selection-change",C.value?C.value.slice():[]),t.emit("select-all",C.value)},se=()=>{const me=yl(C.value,l.value);a.value.forEach(ne=>{const we=en(ne,l.value),de=me[we];de&&(C.value[de.index]=ne)})},pe=()=>{var me,ne,we;if(((me=a.value)==null?void 0:me.length)===0){b.value=!1;return}let de;l.value&&(de=yl(C.value,l.value));const $e=function(Ce){return de?!!de[en(Ce,l.value)]:C.value.includes(Ce)};let J=!0,Oe=0,le=0;for(let Ce=0,je=(a.value||[]).length;Ce<je;Ce++){const st=(we=(ne=t==null?void 0:t.store)==null?void 0:ne.states)==null?void 0:we.rowKey.value,vt=Ce+le,Tt=a.value[Ce],Xt=M.value&&M.value.call(null,Tt,vt);if($e(Tt))Oe++;else if(!M.value||Xt){J=!1;break}le+=oe(en(Tt,st))}Oe===0&&(J=!1),b.value=J},oe=me=>{var ne;if(!t||!t.store)return 0;const{treeData:we}=t.store.states;let de=0;const $e=(ne=we.value[me])==null?void 0:ne.children;return $e&&(de+=$e.length,$e.forEach(J=>{de+=oe(J)})),de},re=(me,ne)=>{Array.isArray(me)||(me=[me]);const we={};return me.forEach(de=>{L.value[de.id]=ne,we[de.columnKey||de.id]=ne}),we},Q=(me,ne,we)=>{D.value&&D.value!==me&&(D.value.order=null),D.value=me,B.value=ne,F.value=we},ve=()=>{let me=o(s);Object.keys(L.value).forEach(ne=>{const we=L.value[ne];if(!we||we.length===0)return;const de=Af({columns:c.value},ne);de&&de.filterMethod&&(me=me.filter($e=>we.some(J=>de.filterMethod.call(null,J,$e,de))))}),A.value=me},_e=()=>{a.value=EN(A.value,{sortingColumn:D.value,sortProp:B.value,sortOrder:F.value})},Te=(me=void 0)=>{me&&me.filter||ve(),_e()},Ie=me=>{const{tableHeaderRef:ne}=t.refs;if(!ne)return;const we=Object.assign({},ne.filterPanels),de=Object.keys(we);if(de.length)if(typeof me=="string"&&(me=[me]),Array.isArray(me)){const $e=me.map(J=>hN({columns:c.value},J));de.forEach(J=>{const Oe=$e.find(le=>le.id===J);Oe&&(Oe.filteredValue=[])}),t.store.commit("filterChange",{column:$e,values:[],silent:!0,multi:!0})}else de.forEach($e=>{const J=c.value.find(Oe=>Oe.id===$e);J&&(J.filteredValue=[])}),L.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},Ke=()=>{D.value&&(Q(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:Ge,toggleRowExpansion:qe,updateExpandRows:it,states:ke,isRowExpanded:Ee}=CN({data:a,rowKey:l}),{updateTreeExpandKeys:Be,toggleTreeExpansion:Ve,updateTreeData:Ye,loadOrToggle:Xe,states:nt}=_N({data:a,rowKey:l}),{updateCurrentRowData:Se,updateCurrentRow:Ue,setCurrentRowKey:gt,states:Et}=SN({data:a,rowKey:l});return{assertRowKey:U,updateColumns:K,scheduleLayout:V,isSelected:W,clearSelection:P,cleanSelection:H,getSelectionRows:Y,toggleRowSelection:z,_toggleAllSelection:q,toggleAllSelection:null,updateSelectionByRowKey:se,updateAllSelected:pe,updateFilters:re,updateCurrentRow:Ue,updateSort:Q,execFilter:ve,execSort:_e,execQuery:Te,clearFilter:Ie,clearSort:Ke,toggleRowExpansion:qe,setExpandRowKeysAdapter:me=>{Ge(me),Be(me)},setCurrentRowKey:gt,toggleRowExpansionAdapter:(me,ne)=>{c.value.some(({type:de})=>de==="expand")?qe(me,ne):Ve(me,ne)},isRowExpanded:Ee,updateExpandRows:it,updateCurrentRowData:Se,loadOrToggle:Xe,updateTreeData:Ye,states:{tableSize:n,rowKey:l,data:a,_data:s,isComplex:r,_columns:i,originColumns:u,columns:c,fixedColumns:f,rightFixedColumns:d,leafColumns:p,fixedLeafColumns:m,rightFixedLeafColumns:h,updateOrderFns:v,leafColumnsLength:g,fixedLeafColumnsLength:y,rightFixedLeafColumnsLength:k,isAllSelected:b,selection:C,reserveSelection:I,selectOnIndeterminate:T,selectable:M,filters:L,filteredData:A,sortingColumn:D,sortProp:B,sortOrder:F,hoverRow:x,...ke,...nt,...Et}}}function Gs(e,t){return e.map(n=>{var l;return n.id===t.id?t:((l=n.children)!=null&&l.length&&(n.children=Gs(n.children,t)),n)})}function Ys(e){e.forEach(t=>{var n,l;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(l=t.children)!=null&&l.length&&Ys(t.children)}),e.sort((t,n)=>t.no-n.no)}function TN(){const e=at(),t=$N();return{ns:ce("table"),...t,mutations:{setData(r,i){const u=o(r._data)!==i;r.data.value=i,r._data.value=i,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),o(r.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):u?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(r,i,u,c){const f=o(r._columns);let d=[];u?(u&&!u.children&&(u.children=[]),u.children.push(i),d=Gs(f,u)):(f.push(i),d=f),Ys(d),r._columns.value=d,r.updateOrderFns.push(c),i.type==="selection"&&(r.selectable.value=i.selectable,r.reserveSelection.value=i.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(r,i){var u;((u=i.getColumnIndex)==null?void 0:u.call(i))!==i.no&&(Ys(r._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(r,i,u,c){const f=o(r._columns)||[];if(u)u.children.splice(u.children.findIndex(p=>p.id===i.id),1),Le(()=>{var p;((p=u.children)==null?void 0:p.length)===0&&delete u.children}),r._columns.value=Gs(f,u);else{const p=f.indexOf(i);p>-1&&(f.splice(p,1),r._columns.value=f)}const d=r.updateOrderFns.indexOf(c);d>-1&&r.updateOrderFns.splice(d,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(r,i){const{prop:u,order:c,init:f}=i;if(u){const d=o(r.columns).find(p=>p.property===u);d&&(d.order=c,e.store.updateSort(d,u,c),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(r,i){const{sortingColumn:u,sortProp:c,sortOrder:f}=r,d=o(u),p=o(c),m=o(f);m===null&&(r.sortingColumn.value=null,r.sortProp.value=null);const h={filter:!0};e.store.execQuery(h),(!i||!(i.silent||i.init))&&e.emit("sort-change",{column:d,prop:p,order:m}),e.store.updateTableScrollY()},filterChange(r,i){const{column:u,values:c,silent:f}=i,d=e.store.updateFilters(u,c);e.store.execQuery(),f||e.emit("filter-change",d),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(r,i){e.store.toggleRowSelection(i),e.store.updateAllSelected()},setHoverRow(r,i){r.hoverRow.value=i},setCurrentRow(r,i){e.store.updateCurrentRow(i)}},commit:function(r,...i){const u=e.store.mutations;if(u[r])u[r].apply(e,[e.store.states].concat(i));else throw new Error(`Action not found: ${r}`)},updateTableScrollY:function(){Le(()=>e.layout.updateScrollY.apply(e.layout))}}}const bo={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"}};function IN(e,t){if(!e)throw new Error("Table is required.");const n=TN();return n.toggleAllSelection=hn(n._toggleAllSelection,10),Object.keys(bo).forEach(l=>{xf(Ff(t,l),l,n)}),NN(n,t),n}function NN(e,t){Object.keys(bo).forEach(n=>{ue(()=>Ff(t,n),l=>{xf(l,n,e)})})}function xf(e,t,n){let l=e,a=bo[t];typeof bo[t]=="object"&&(a=a.key,l=l||bo[t].default),n.states[a].value=l}function Ff(e,t){if(t.includes(".")){const n=t.split(".");let l=e;return n.forEach(a=>{l=l[a]}),l}else return e[t]}class PN{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=_(null),this.scrollX=_(!1),this.scrollY=_(!1),this.bodyWidth=_(null),this.fixedWidth=_(null),this.rightFixedWidth=_(null),this.gutterWidth=0;for(const n in t)nn(t,n)&&(bt(this[n])?this[n].value=t[n]:this[n]=t[n]);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(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n!=null&&n.wrapRef)){let l=!0;const a=this.scrollY.value;return l=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=l,a!==l}return!1}setHeight(t,n="height"){if(!yt)return;const l=this.table.vnode.el;if(t=yN(t),this.height.value=Number(t),!l&&(t||t===0))return Le(()=>this.setHeight(t,n));typeof t=="number"?(l.style[n]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(l.style[n]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(l=>{l.isColumnGroup?t.push.apply(t,l.columns):t.push(l)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let n=t;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!yt)return;const t=this.fit,n=this.table.vnode.el.clientWidth;let l=0;const a=this.getFlattenColumns(),s=a.filter(u=>typeof u.width!="number");if(a.forEach(u=>{typeof u.width=="number"&&u.realWidth&&(u.realWidth=null)}),s.length>0&&t){if(a.forEach(u=>{l+=Number(u.width||u.minWidth||80)}),l<=n){this.scrollX.value=!1;const u=n-l;if(s.length===1)s[0].realWidth=Number(s[0].minWidth||80)+u;else{const c=s.reduce((p,m)=>p+Number(m.minWidth||80),0),f=u/c;let d=0;s.forEach((p,m)=>{if(m===0)return;const h=Math.floor(Number(p.minWidth||80)*f);d+=h,p.realWidth=Number(p.minWidth||80)+h}),s[0].realWidth=Number(s[0].minWidth||80)+u-d}}else this.scrollX.value=!0,s.forEach(u=>{u.realWidth=Number(u.minWidth)});this.bodyWidth.value=Math.max(l,n),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),l+=u.realWidth}),this.scrollX.value=l>n,this.bodyWidth.value=l;const r=this.store.states.fixedColumns.value;if(r.length>0){let u=0;r.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.fixedWidth.value=u}const i=this.store.states.rightFixedColumns.value;if(i.length>0){let u=0;i.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=u}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&this.observers.splice(n,1)}notifyObservers(t){this.observers.forEach(l=>{var a,s;switch(t){case"columns":(a=l.state)==null||a.onColumnsChange(this);break;case"scrollable":(s=l.state)==null||s.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:MN}=$n,LN=j({name:"ElTableFilterPanel",components:{ElCheckbox:$n,ElCheckboxGroup:MN,ElScrollbar:Qn,ElTooltip:cn,ElIcon:Pe,ArrowDown:ul,ArrowUp:Fa},directives:{ClickOutside:il},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=at(),{t:n}=ht(),l=ce("table-filter"),a=t==null?void 0:t.parent;a.filterPanels.value[e.column.id]||(a.filterPanels.value[e.column.id]=t);const s=_(!1),r=_(null),i=S(()=>e.column&&e.column.filters),u=S({get:()=>{var C;return(((C=e.column)==null?void 0:C.filteredValue)||[])[0]},set:C=>{c.value&&(typeof C<"u"&&C!==null?c.value.splice(0,1,C):c.value.splice(0,1))}}),c=S({get(){return e.column?e.column.filteredValue||[]:[]},set(C){e.column&&e.upDataColumn("filteredValue",C)}}),f=S(()=>e.column?e.column.filterMultiple:!0),d=C=>C.value===u.value,p=()=>{s.value=!1},m=C=>{C.stopPropagation(),s.value=!s.value},h=()=>{s.value=!1},v=()=>{k(c.value),p()},g=()=>{c.value=[],k(c.value),p()},y=C=>{u.value=C,k(typeof C<"u"&&C!==null?c.value:[]),p()},k=C=>{e.store.commit("filterChange",{column:e.column,values:C}),e.store.updateAllSelected()};ue(s,C=>{e.column&&e.upDataColumn("filterOpened",C)},{immediate:!0});const b=S(()=>{var C,I;return(I=(C=r.value)==null?void 0:C.popperRef)==null?void 0:I.contentRef});return{tooltipVisible:s,multiple:f,filteredValue:c,filterValue:u,filters:i,handleConfirm:v,handleReset:g,handleSelect:y,isActive:d,t:n,ns:l,showFilterPanel:m,hideFilterPanel:h,popperPaneRef:b,tooltip:r}}}),RN={key:0},ON=["disabled"],AN=["label","onClick"];function VN(e,t,n,l,a,s){const r=ee("el-checkbox"),i=ee("el-checkbox-group"),u=ee("el-scrollbar"),c=ee("arrow-up"),f=ee("arrow-down"),d=ee("el-icon"),p=ee("el-tooltip"),m=Sl("click-outside");return w(),G(p,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.ns.b(),persistent:""},{content:N(()=>[e.multiple?(w(),O("div",RN,[R("div",{class:$(e.ns.e("content"))},[E(u,{"wrap-class":e.ns.e("wrap")},{default:N(()=>[E(i,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=h=>e.filteredValue=h),class:$(e.ns.e("checkbox-group"))},{default:N(()=>[(w(!0),O(Ne,null,Ze(e.filters,h=>(w(),G(r,{key:h.value,label:h.value},{default:N(()=>[ye(ae(h.text),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),R("div",{class:$(e.ns.e("bottom"))},[R("button",{class:$({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...h)=>e.handleConfirm&&e.handleConfirm(...h))},ae(e.t("el.table.confirmFilter")),11,ON),R("button",{type:"button",onClick:t[2]||(t[2]=(...h)=>e.handleReset&&e.handleReset(...h))},ae(e.t("el.table.resetFilter")),1)],2)])):(w(),O("ul",{key:1,class:$(e.ns.e("list"))},[R("li",{class:$([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=h=>e.handleSelect(null))},ae(e.t("el.table.clearFilter")),3),(w(!0),O(Ne,null,Ze(e.filters,h=>(w(),O("li",{key:h.value,class:$([e.ns.e("list-item"),e.ns.is("active",e.isActive(h))]),label:h.value,onClick:v=>e.handleSelect(h.value)},ae(h.text),11,AN))),128))],2))]),default:N(()=>[xe((w(),O("span",{class:$([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...h)=>e.showFilterPanel&&e.showFilterPanel(...h))},[E(d,null,{default:N(()=>[e.column.filterOpened?(w(),G(c,{key:0})):(w(),G(f,{key:1}))]),_:1})],2)),[[m,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}var DN=he(LN,[["render",VN],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);function zf(e){const t=at();cr(()=>{n.value.addObserver(t)}),ze(()=>{l(n.value),a(n.value)}),Nl(()=>{l(n.value),a(n.value)}),Il(()=>{n.value.removeObserver(t)});const n=S(()=>{const s=e.layout;if(!s)throw new Error("Can not find table layout.");return s}),l=s=>{var r;const i=((r=e.vnode.el)==null?void 0:r.querySelectorAll("colgroup > col"))||[];if(!i.length)return;const u=s.getFlattenColumns(),c={};u.forEach(f=>{c[f.id]=f});for(let f=0,d=i.length;f<d;f++){const p=i[f],m=p.getAttribute("name"),h=c[m];h&&p.setAttribute("width",h.realWidth||h.width)}},a=s=>{var r,i;const u=((r=e.vnode.el)==null?void 0:r.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let f=0,d=u.length;f<d;f++)u[f].setAttribute("width",s.scrollY.value?s.gutterWidth:"0");const c=((i=e.vnode.el)==null?void 0:i.querySelectorAll("th.gutter"))||[];for(let f=0,d=c.length;f<d;f++){const p=c[f];p.style.width=s.scrollY.value?`${s.gutterWidth}px`:"0",p.style.display=s.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:l,onScrollableChange:a}}const Kn=Symbol("ElTable");function BN(e,t){const n=at(),l=Me(Kn),a=v=>{v.stopPropagation()},s=(v,g)=>{!g.filters&&g.sortable?h(v,g,!1):g.filterable&&!g.sortable&&a(v),l==null||l.emit("header-click",g,v)},r=(v,g)=>{l==null||l.emit("header-contextmenu",g,v)},i=_(null),u=_(!1),c=_({}),f=(v,g)=>{if(yt&&!(g.children&&g.children.length>0)&&i.value&&e.border){u.value=!0;const y=l;t("set-drag-visible",!0);const b=(y==null?void 0:y.vnode.el).getBoundingClientRect().left,C=n.vnode.el.querySelector(`th.${g.id}`),I=C.getBoundingClientRect(),T=I.left-b+30;Dn(C,"noclick"),c.value={startMouseLeft:v.clientX,startLeft:I.right-b,startColumnLeft:I.left-b,tableLeft:b};const M=y==null?void 0:y.refs.resizeProxy;M.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const L=D=>{const B=D.clientX-c.value.startMouseLeft,F=c.value.startLeft+B;M.style.left=`${Math.max(T,F)}px`},A=()=>{if(u.value){const{startColumnLeft:D,startLeft:B}=c.value,x=Number.parseInt(M.style.left,10)-D;g.width=g.realWidth=x,y==null||y.emit("header-dragend",g.width,B-D,g,v),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",u.value=!1,i.value=null,c.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",A),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{mn(C,"noclick")},0)};document.addEventListener("mousemove",L),document.addEventListener("mouseup",A)}},d=(v,g)=>{if(g.children&&g.children.length>0)return;const y=v.target;if(!_n(y))return;const k=y==null?void 0:y.closest("th");if(!(!g||!g.resizable)&&!u.value&&e.border){const b=k.getBoundingClientRect(),C=document.body.style;b.width>12&&b.right-v.pageX<8?(C.cursor="col-resize",Mn(k,"is-sortable")&&(k.style.cursor="col-resize"),i.value=g):u.value||(C.cursor="",Mn(k,"is-sortable")&&(k.style.cursor="pointer"),i.value=null)}},p=()=>{yt&&(document.body.style.cursor="")},m=({order:v,sortOrders:g})=>{if(v==="")return g[0];const y=g.indexOf(v||null);return g[y>g.length-2?0:y+1]},h=(v,g,y)=>{var k;v.stopPropagation();const b=g.order===y?null:y||m(g),C=(k=v.target)==null?void 0:k.closest("th");if(C&&Mn(C,"noclick")){mn(C,"noclick");return}if(!g.sortable)return;const I=e.store.states;let T=I.sortProp.value,M;const L=I.sortingColumn.value;(L!==g||L===g&&L.order===null)&&(L&&(L.order=null),I.sortingColumn.value=g,T=g.property),b?M=g.order=b:M=g.order=null,I.sortProp.value=T,I.sortOrder.value=M,l==null||l.store.commit("changeSortCondition")};return{handleHeaderClick:s,handleHeaderContextMenu:r,handleMouseDown:f,handleMouseMove:d,handleMouseOut:p,handleSortClick:h,handleFilterClick:a}}function xN(e){const t=Me(Kn),n=ce("table");return{getHeaderRowStyle:i=>{const u=t==null?void 0:t.props.headerRowStyle;return typeof u=="function"?u.call(null,{rowIndex:i}):u},getHeaderRowClass:i=>{const u=[],c=t==null?void 0:t.props.headerRowClassName;return typeof c=="string"?u.push(c):typeof c=="function"&&u.push(c.call(null,{rowIndex:i})),u.join(" ")},getHeaderCellStyle:(i,u,c,f)=>{var d;let p=(d=t==null?void 0:t.props.headerCellStyle)!=null?d:{};typeof p=="function"&&(p=p.call(null,{rowIndex:i,columnIndex:u,row:c,column:f}));const m=Xr(u,f.fixed,e.store,c);return Ql(m,"left"),Ql(m,"right"),Object.assign({},p,m)},getHeaderCellClass:(i,u,c,f)=>{const d=Yr(n.b(),u,f.fixed,e.store,c),p=[f.id,f.order,f.headerAlign,f.className,f.labelClassName,...d];f.children||p.push("is-leaf"),f.sortable&&p.push("is-sortable");const m=t==null?void 0:t.props.headerCellClassName;return typeof m=="string"?p.push(m):typeof m=="function"&&p.push(m.call(null,{rowIndex:i,columnIndex:u,row:c,column:f})),p.push(n.e("cell")),p.filter(h=>!!h).join(" ")}}}const Hf=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,Hf(n.children))):t.push(n)}),t},FN=e=>{let t=1;const n=(s,r)=>{if(r&&(s.level=r.level+1,t<s.level&&(t=s.level)),s.children){let i=0;s.children.forEach(u=>{n(u,s),i+=u.colSpan}),s.colSpan=i}else s.colSpan=1};e.forEach(s=>{s.level=1,n(s,void 0)});const l=[];for(let s=0;s<t;s++)l.push([]);return Hf(e).forEach(s=>{s.children?(s.rowSpan=1,s.children.forEach(r=>r.isSubColumn=!0)):s.rowSpan=t-s.level+1,l[s.level-1].push(s)}),l};function zN(e){const t=Me(Kn),n=S(()=>FN(e.store.states.originColumns.value));return{isGroup:S(()=>{const s=n.value.length>1;return s&&t&&(t.state.isGroup.value=!0),s}),toggleAllSelection:s=>{s.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var HN=j({name:"ElTableHeader",components:{ElCheckbox:$n},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const n=at(),l=Me(Kn),a=ce("table"),s=_({}),{onColumnsChange:r,onScrollableChange:i}=zf(l);ze(async()=>{await Le(),await Le();const{prop:T,order:M}=e.defaultSort;l==null||l.store.commit("sort",{prop:T,order:M,init:!0})});const{handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:f,handleMouseMove:d,handleMouseOut:p,handleSortClick:m,handleFilterClick:h}=BN(e,t),{getHeaderRowStyle:v,getHeaderRowClass:g,getHeaderCellStyle:y,getHeaderCellClass:k}=xN(e),{isGroup:b,toggleAllSelection:C,columnRows:I}=zN(e);return n.state={onColumnsChange:r,onScrollableChange:i},n.filterPanels=s,{ns:a,filterPanels:s,onColumnsChange:r,onScrollableChange:i,columnRows:I,getHeaderRowClass:g,getHeaderRowStyle:v,getHeaderCellClass:k,getHeaderCellStyle:y,handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:f,handleMouseMove:d,handleMouseOut:p,handleSortClick:m,handleFilterClick:h,isGroup:b,toggleAllSelection:C}},render(){const{ns:e,isGroup:t,columnRows:n,getHeaderCellStyle:l,getHeaderCellClass:a,getHeaderRowClass:s,getHeaderRowStyle:r,handleHeaderClick:i,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:f,handleSortClick:d,handleMouseOut:p,store:m,$parent:h}=this;let v=1;return De("thead",{class:{[e.is("group")]:t}},n.map((g,y)=>De("tr",{class:s(y),key:y,style:r(y)},g.map((k,b)=>(k.rowSpan>v&&(v=k.rowSpan),De("th",{class:a(y,b,g,k),colspan:k.colSpan,key:`${k.id}-thead`,rowspan:k.rowSpan,style:l(y,b,g,k),onClick:C=>i(C,k),onContextmenu:C=>u(C,k),onMousedown:C=>c(C,k),onMousemove:C=>f(C,k),onMouseout:p},[De("div",{class:["cell",k.filteredValue&&k.filteredValue.length>0?"highlight":""]},[k.renderHeader?k.renderHeader({column:k,$index:b,store:m,_self:h}):k.label,k.sortable&&De("span",{onClick:C=>d(C,k),class:"caret-wrapper"},[De("i",{onClick:C=>d(C,k,"ascending"),class:"sort-caret ascending"}),De("i",{onClick:C=>d(C,k,"descending"),class:"sort-caret descending"})]),k.filterable&&De(DN,{store:m,placement:k.filterPlacement||"bottom-start",column:k,upDataColumn:(C,I)=>{k[C]=I}})])]))))))}});function KN(e){const t=Me(Kn),n=_(""),l=_(De("div")),{nextZIndex:a}=ao(),s=(m,h,v)=>{var g;const y=t,k=bs(m);let b;const C=(g=y==null?void 0:y.vnode.el)==null?void 0:g.dataset.prefix;k&&(b=gu({columns:e.store.states.columns.value},k,C),b&&(y==null||y.emit(`cell-${v}`,h,b,k,m))),y==null||y.emit(`row-${v}`,h,b,m)},r=(m,h)=>{s(m,h,"dblclick")},i=(m,h)=>{e.store.commit("setCurrentRow",h),s(m,h,"click")},u=(m,h)=>{s(m,h,"contextmenu")},c=hn(m=>{e.store.commit("setHoverRow",m)},30),f=hn(()=>{e.store.commit("setHoverRow",null)},30);return{handleDoubleClick:r,handleClick:i,handleContextMenu:u,handleMouseEnter:c,handleMouseLeave:f,handleCellMouseEnter:(m,h,v)=>{var g;const y=t,k=bs(m),b=(g=y==null?void 0:y.vnode.el)==null?void 0:g.dataset.prefix;if(k){const L=gu({columns:e.store.states.columns.value},k,b),A=y.hoverState={cell:k,column:L,row:h};y==null||y.emit("cell-mouse-enter",A.row,A.column,A.cell,m)}if(!v)return;const C=m.target.querySelector(".cell");if(!(Mn(C,`${b}-tooltip`)&&C.childNodes.length))return;const I=document.createRange();I.setStart(C,0),I.setEnd(C,C.childNodes.length);const T=Math.round(I.getBoundingClientRect().width),M=(Number.parseInt(Vn(C,"paddingLeft"),10)||0)+(Number.parseInt(Vn(C,"paddingRight"),10)||0);(T+M>C.offsetWidth||C.scrollWidth>C.offsetWidth)&&kN(t==null?void 0:t.refs.tableWrapper,k,k.innerText||k.textContent,a,v)},handleCellMouseLeave:m=>{if(!bs(m))return;const v=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",v==null?void 0:v.row,v==null?void 0:v.column,v==null?void 0:v.cell,m)},tooltipContent:n,tooltipTrigger:l}}function WN(e){const t=Me(Kn),n=ce("table");return{getRowStyle:(c,f)=>{const d=t==null?void 0:t.props.rowStyle;return typeof d=="function"?d.call(null,{row:c,rowIndex:f}):d||null},getRowClass:(c,f)=>{const d=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&c===e.store.states.currentRow.value&&d.push("current-row"),e.stripe&&f%2===1&&d.push(n.em("row","striped"));const p=t==null?void 0:t.props.rowClassName;return typeof p=="string"?d.push(p):typeof p=="function"&&d.push(p.call(null,{row:c,rowIndex:f})),d},getCellStyle:(c,f,d,p)=>{const m=t==null?void 0:t.props.cellStyle;let h=m??{};typeof m=="function"&&(h=m.call(null,{rowIndex:c,columnIndex:f,row:d,column:p}));const v=Xr(f,e==null?void 0:e.fixed,e.store);return Ql(v,"left"),Ql(v,"right"),Object.assign({},h,v)},getCellClass:(c,f,d,p,m)=>{const h=Yr(n.b(),f,e==null?void 0:e.fixed,e.store,void 0,m),v=[p.id,p.align,p.className,...h],g=t==null?void 0:t.props.cellClassName;return typeof g=="string"?v.push(g):typeof g=="function"&&v.push(g.call(null,{rowIndex:c,columnIndex:f,row:d,column:p})),v.push(n.e("cell")),v.filter(y=>!!y).join(" ")},getSpan:(c,f,d,p)=>{let m=1,h=1;const v=t==null?void 0:t.props.spanMethod;if(typeof v=="function"){const g=v({row:c,column:f,rowIndex:d,columnIndex:p});Array.isArray(g)?(m=g[0],h=g[1]):typeof g=="object"&&(m=g.rowspan,h=g.colspan)}return{rowspan:m,colspan:h}},getColspanRealWidth:(c,f,d)=>{if(f<1)return c[d].realWidth;const p=c.map(({realWidth:m,width:h})=>m||h).slice(d,d+f);return Number(p.reduce((m,h)=>Number(m)+Number(h),-1))}}}function UN(e){const t=Me(Kn),n=ce("table"),{handleDoubleClick:l,handleClick:a,handleContextMenu:s,handleMouseEnter:r,handleMouseLeave:i,handleCellMouseEnter:u,handleCellMouseLeave:c,tooltipContent:f,tooltipTrigger:d}=KN(e),{getRowStyle:p,getRowClass:m,getCellStyle:h,getCellClass:v,getSpan:g,getColspanRealWidth:y}=WN(e),k=S(()=>e.store.states.columns.value.findIndex(({type:M})=>M==="default")),b=(M,L)=>{const A=t.props.rowKey;return A?en(M,A):L},C=(M,L,A,D=!1)=>{const{tooltipEffect:B,tooltipOptions:F,store:x}=e,{indent:U,columns:X}=x.states,K=m(M,L);let V=!0;return A&&(K.push(n.em("row",`level-${A.level}`)),V=A.display),De("tr",{style:[V?null:{display:"none"},p(M,L)],class:K,key:b(M,L),onDblclick:P=>l(P,M),onClick:P=>a(P,M),onContextmenu:P=>s(P,M),onMouseenter:()=>r(L),onMouseleave:i},X.value.map((P,H)=>{const{rowspan:Y,colspan:z}=g(M,P,L,H);if(!Y||!z)return null;const q={...P};q.realWidth=y(X.value,z,H);const se={store:e.store,_self:e.context||t,column:q,row:M,$index:L,cellIndex:H,expanded:D};H===k.value&&A&&(se.treeNode={indent:A.level*U.value,level:A.level},typeof A.expanded=="boolean"&&(se.treeNode.expanded=A.expanded,"loading"in A&&(se.treeNode.loading=A.loading),"noLazyChildren"in A&&(se.treeNode.noLazyChildren=A.noLazyChildren)));const pe=`${L},${H}`,oe=q.columnKey||q.rawColumnKey||"",re=I(H,P,se),Q=P.showOverflowTooltip&&tc({effect:B},F,P.showOverflowTooltip);return De("td",{style:h(L,H,M,P),class:v(L,H,M,P,z-1),key:`${oe}${pe}`,rowspan:Y,colspan:z,onMouseenter:ve=>u(ve,M,Q),onMouseleave:c},[re])}))},I=(M,L,A)=>L.renderCell(A);return{wrappedRowRender:(M,L)=>{const A=e.store,{isRowExpanded:D,assertRowKey:B}=A,{treeData:F,lazyTreeNodeMap:x,childrenColumnName:U,rowKey:X}=A.states,K=A.states.columns.value;if(K.some(({type:W})=>W==="expand")){const W=D(M),P=C(M,L,void 0,W),H=t.renderExpanded;return W?H?[[P,De("tr",{key:`expanded-row__${P.key}`},[De("td",{colspan:K.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[H({row:M,$index:L,store:A,expanded:W})])])]]:(console.error("[Element Error]renderExpanded is required."),P):[[P]]}else if(Object.keys(F.value).length){B();const W=en(M,X.value);let P=F.value[W],H=null;P&&(H={expanded:P.expanded,level:P.level,display:!0},typeof P.lazy=="boolean"&&(typeof P.loaded=="boolean"&&P.loaded&&(H.noLazyChildren=!(P.children&&P.children.length)),H.loading=P.loading));const Y=[C(M,L,H)];if(P){let z=0;const q=(pe,oe)=>{pe&&pe.length&&oe&&pe.forEach(re=>{const Q={display:oe.display&&oe.expanded,level:oe.level+1,expanded:!1,noLazyChildren:!1,loading:!1},ve=en(re,X.value);if(ve==null)throw new Error("For nested data item, row-key is required.");if(P={...F.value[ve]},P&&(Q.expanded=P.expanded,P.level=P.level||Q.level,P.display=!!(P.expanded&&Q.display),typeof P.lazy=="boolean"&&(typeof P.loaded=="boolean"&&P.loaded&&(Q.noLazyChildren=!(P.children&&P.children.length)),Q.loading=P.loading)),z++,Y.push(C(re,L+z,Q)),P){const _e=x.value[ve]||re[U.value];q(_e,P)}})};P.display=!0;const se=x.value[W]||M[U.value];q(se,P)}return Y}else return C(M,L,void 0)},tooltipContent:f,tooltipTrigger:d}}const jN={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 qN=j({name:"ElTableBody",props:jN,setup(e){const t=at(),n=Me(Kn),l=ce("table"),{wrappedRowRender:a,tooltipContent:s,tooltipTrigger:r}=UN(e),{onColumnsChange:i,onScrollableChange:u}=zf(n);return ue(e.store.states.hoverRow,(c,f)=>{if(!e.store.states.isComplex.value||!yt)return;let d=window.requestAnimationFrame;d||(d=p=>window.setTimeout(p,16)),d(()=>{const p=t==null?void 0:t.vnode.el,m=Array.from((p==null?void 0:p.children)||[]).filter(g=>g==null?void 0:g.classList.contains(`${l.e("row")}`)),h=m[f],v=m[c];h&&mn(h,"hover-row"),v&&Dn(v,"hover-row")})}),Il(()=>{var c;(c=Wn)==null||c()}),{ns:l,onColumnsChange:i,onScrollableChange:u,wrappedRowRender:a,tooltipContent:s,tooltipTrigger:r}},render(){const{wrappedRowRender:e,store:t}=this,n=t.states.data.value||[];return De("tbody",{},[n.reduce((l,a)=>l.concat(e(a,l.length)),[])])}});function Zr(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(a=>a.width===void 0)&&(n=[]);const l=a=>{const s={key:`${e.tableLayout}_${a.id}`,style:{},name:void 0};return t?s.style={width:`${a.width}px`}:s.name=a.id,s};return De("colgroup",{},n.map(a=>De("col",l(a))))}Zr.props=["columns","tableLayout"];function GN(){const e=Me(Kn),t=e==null?void 0:e.store,n=S(()=>t.states.fixedLeafColumnsLength.value),l=S(()=>t.states.rightFixedColumns.value.length),a=S(()=>t.states.columns.value.length),s=S(()=>t.states.fixedColumns.value.length),r=S(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:l,columnsCount:a,leftFixedCount:s,rightFixedCount:r,columns:t.states.columns}}function YN(e){const{columns:t}=GN(),n=ce("table");return{getCellClasses:(s,r)=>{const i=s[r],u=[n.e("cell"),i.id,i.align,i.labelClassName,...Yr(n.b(),r,i.fixed,e.store)];return i.className&&u.push(i.className),i.children||u.push(n.is("leaf")),u},getCellStyles:(s,r)=>{const i=Xr(r,s.fixed,e.store);return Ql(i,"left"),Ql(i,"right"),i},columns:t}}var XN=j({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{getCellClasses:t,getCellStyles:n,columns:l}=YN(e);return{ns:ce("table"),getCellClasses:t,getCellStyles:n,columns:l}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:l,sumText:a,ns:s}=this,r=this.store.states.data.value;let i=[];return l?i=l({columns:e,data:r}):e.forEach((u,c)=>{if(c===0){i[c]=a;return}const f=r.map(h=>Number(h[u.property])),d=[];let p=!0;f.forEach(h=>{if(!Number.isNaN(+h)){p=!1;const v=`${h}`.split(".")[1];d.push(v?v.length:0)}});const m=Math.max.apply(null,d);p?i[c]="":i[c]=f.reduce((h,v)=>{const g=Number(v);return Number.isNaN(+g)?h:Number.parseFloat((h+v).toFixed(Math.min(m,20)))},0)}),De("table",{class:s.e("footer"),cellspacing:"0",cellpadding:"0",border:"0"},[Zr({columns:e}),De("tbody",[De("tr",{},[...e.map((u,c)=>De("td",{key:c,colspan:u.colSpan,rowspan:u.rowSpan,class:n(e,c),style:t(u,c)},[De("div",{class:["cell",u.labelClassName]},[i[c]])]))])])])}});function ZN(e){return{setCurrentRow:f=>{e.commit("setCurrentRow",f)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(f,d)=>{e.toggleRowSelection(f,d,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:f=>{e.clearFilter(f)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(f,d)=>{e.toggleRowExpansionAdapter(f,d)},clearSort:()=>{e.clearSort()},sort:(f,d)=>{e.commit("sort",{prop:f,order:d})}}}function JN(e,t,n,l){const a=_(!1),s=_(null),r=_(!1),i=P=>{r.value=P},u=_({width:null,height:null,headerHeight:null}),c=_(!1),f={display:"inline-block",verticalAlign:"middle"},d=_(),p=_(0),m=_(0),h=_(0),v=_(0),g=_(0);Cn(()=>{t.setHeight(e.height)}),Cn(()=>{t.setMaxHeight(e.maxHeight)}),ue(()=>[e.currentRowKey,n.states.rowKey],([P,H])=>{!o(H)||!o(P)||n.setCurrentRowKey(`${P}`)},{immediate:!0}),ue(()=>e.data,P=>{l.store.commit("setData",P)},{immediate:!0,deep:!0}),Cn(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const y=()=>{l.store.commit("setHoverRow",null),l.hoverState&&(l.hoverState=null)},k=(P,H)=>{const{pixelX:Y,pixelY:z}=H;Math.abs(Y)>=Math.abs(z)&&(l.refs.bodyWrapper.scrollLeft+=H.pixelX/5)},b=S(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),C=S(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),I=()=>{b.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(A)};ze(async()=>{await Le(),n.updateColumns(),D(),requestAnimationFrame(I);const P=l.vnode.el,H=l.refs.headerWrapper;e.flexible&&P&&P.parentElement&&(P.parentElement.style.minWidth="0"),u.value={width:d.value=P.offsetWidth,height:P.offsetHeight,headerHeight:e.showHeader&&H?H.offsetHeight:null},n.states.columns.value.forEach(Y=>{Y.filteredValue&&Y.filteredValue.length&&l.store.commit("filterChange",{column:Y,values:Y.filteredValue,silent:!0})}),l.$ready=!0});const T=(P,H)=>{if(!P)return;const Y=Array.from(P.classList).filter(z=>!z.startsWith("is-scrolling-"));Y.push(t.scrollX.value?H:"is-scrolling-none"),P.className=Y.join(" ")},M=P=>{const{tableWrapper:H}=l.refs;T(H,P)},L=P=>{const{tableWrapper:H}=l.refs;return!!(H&&H.classList.contains(P))},A=function(){if(!l.refs.scrollBarRef)return;if(!t.scrollX.value){const oe="is-scrolling-none";L(oe)||M(oe);return}const P=l.refs.scrollBarRef.wrapRef;if(!P)return;const{scrollLeft:H,offsetWidth:Y,scrollWidth:z}=P,{headerWrapper:q,footerWrapper:se}=l.refs;q&&(q.scrollLeft=H),se&&(se.scrollLeft=H);const pe=z-Y-1;H>=pe?M("is-scrolling-right"):M(H===0?"is-scrolling-left":"is-scrolling-middle")},D=()=>{l.refs.scrollBarRef&&(l.refs.scrollBarRef.wrapRef&&Jt(l.refs.scrollBarRef.wrapRef,"scroll",A,{passive:!0}),e.fit?un(l.vnode.el,B):Jt(window,"resize",B),un(l.refs.bodyWrapper,()=>{var P,H;B(),(H=(P=l.refs)==null?void 0:P.scrollBarRef)==null||H.update()}))},B=()=>{var P,H,Y,z;const q=l.vnode.el;if(!l.$ready||!q)return;let se=!1;const{width:pe,height:oe,headerHeight:re}=u.value,Q=d.value=q.offsetWidth;pe!==Q&&(se=!0);const ve=q.offsetHeight;(e.height||b.value)&&oe!==ve&&(se=!0);const _e=e.tableLayout==="fixed"?l.refs.headerWrapper:(P=l.refs.tableHeaderRef)==null?void 0:P.$el;e.showHeader&&(_e==null?void 0:_e.offsetHeight)!==re&&(se=!0),p.value=((H=l.refs.tableWrapper)==null?void 0:H.scrollHeight)||0,h.value=(_e==null?void 0:_e.scrollHeight)||0,v.value=((Y=l.refs.footerWrapper)==null?void 0:Y.offsetHeight)||0,g.value=((z=l.refs.appendWrapper)==null?void 0:z.offsetHeight)||0,m.value=p.value-h.value-v.value-g.value,se&&(u.value={width:Q,height:ve,headerHeight:e.showHeader&&(_e==null?void 0:_e.offsetHeight)||0},I())},F=qt(),x=S(()=>{const{bodyWidth:P,scrollY:H,gutterWidth:Y}=t;return P.value?`${P.value-(H.value?Y:0)}px`:""}),U=S(()=>e.maxHeight?"fixed":e.tableLayout),X=S(()=>{if(e.data&&e.data.length)return null;let P="100%";e.height&&m.value&&(P=`${m.value}px`);const H=d.value;return{width:H?`${H}px`:"",height:P}}),K=S(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),V=S(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${h.value+v.value}px)`}:{maxHeight:`${e.maxHeight-h.value-v.value}px`}:{});return{isHidden:a,renderExpanded:s,setDragVisible:i,isGroup:c,handleMouseLeave:y,handleHeaderFooterMousewheel:k,tableSize:F,emptyBlockStyle:X,handleFixedMousewheel:(P,H)=>{const Y=l.refs.bodyWrapper;if(Math.abs(H.spinY)>0){const z=Y.scrollTop;H.pixelY<0&&z!==0&&P.preventDefault(),H.pixelY>0&&Y.scrollHeight-Y.clientHeight>z&&P.preventDefault(),Y.scrollTop+=Math.ceil(H.pixelY/5)}else Y.scrollLeft+=Math.ceil(H.pixelX/5)},resizeProxyVisible:r,bodyWidth:x,resizeState:u,doLayout:I,tableBodyStyles:C,tableLayout:U,scrollbarViewStyle:f,tableInnerStyle:K,scrollbarStyle:V}}function QN(e){const t=_(),n=()=>{const a=e.vnode.el.querySelector(".hidden-columns"),s={childList:!0,subtree:!0},r=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{r.forEach(i=>i())}),t.value.observe(a,s)};ze(()=>{n()}),Il(()=>{var l;(l=t.value)==null||l.disconnect()})}var eP={data:{type:Array,default:()=>[]},size:ln,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,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"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:{type:Boolean,default:!1},flexible:Boolean,showOverflowTooltip:[Boolean,Object]};const tP=()=>{const e=_(),t=(s,r)=>{const i=e.value;i&&i.scrollTo(s,r)},n=(s,r)=>{const i=e.value;i&&He(r)&&["Top","Left"].includes(s)&&i[`setScroll${s}`](r)};return{scrollBarRef:e,scrollTo:t,setScrollTop:s=>n("Top",s),setScrollLeft:s=>n("Left",s)}};let nP=1;const lP=j({name:"ElTable",directives:{Mousewheel:vb},components:{TableHeader:HN,TableBody:qN,TableFooter:XN,ElScrollbar:Qn,hColgroup:Zr},props:eP,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=ht(),n=ce("table"),l=at();dt(Kn,l);const a=IN(l,e);l.store=a;const s=new PN({store:l.store,table:l,fit:e.fit,showHeader:e.showHeader});l.layout=s;const r=S(()=>(a.states.data.value||[]).length===0),{setCurrentRow:i,getSelectionRows:u,toggleRowSelection:c,clearSelection:f,clearFilter:d,toggleAllSelection:p,toggleRowExpansion:m,clearSort:h,sort:v}=ZN(a),{isHidden:g,renderExpanded:y,setDragVisible:k,isGroup:b,handleMouseLeave:C,handleHeaderFooterMousewheel:I,tableSize:T,emptyBlockStyle:M,handleFixedMousewheel:L,resizeProxyVisible:A,bodyWidth:D,resizeState:B,doLayout:F,tableBodyStyles:x,tableLayout:U,scrollbarViewStyle:X,tableInnerStyle:K,scrollbarStyle:V}=JN(e,s,a,l),{scrollBarRef:W,scrollTo:P,setScrollLeft:H,setScrollTop:Y}=tP(),z=hn(F,50),q=`${n.namespace.value}-table_${nP++}`;l.tableId=q,l.state={isGroup:b,resizeState:B,doLayout:F,debouncedUpdateLayout:z};const se=S(()=>e.sumText||t("el.table.sumText")),pe=S(()=>e.emptyText||t("el.table.emptyText"));return QN(l),{ns:n,layout:s,store:a,handleHeaderFooterMousewheel:I,handleMouseLeave:C,tableId:q,tableSize:T,isHidden:g,isEmpty:r,renderExpanded:y,resizeProxyVisible:A,resizeState:B,isGroup:b,bodyWidth:D,tableBodyStyles:x,emptyBlockStyle:M,debouncedUpdateLayout:z,handleFixedMousewheel:L,setCurrentRow:i,getSelectionRows:u,toggleRowSelection:c,clearSelection:f,clearFilter:d,toggleAllSelection:p,toggleRowExpansion:m,clearSort:h,doLayout:F,sort:v,t,setDragVisible:k,context:l,computedSumText:se,computedEmptyText:pe,tableLayout:U,scrollbarViewStyle:X,tableInnerStyle:K,scrollbarStyle:V,scrollBarRef:W,scrollTo:P,setScrollLeft:H,setScrollTop:Y}}}),oP=["data-prefix"],aP={ref:"hiddenColumns",class:"hidden-columns"};function sP(e,t,n,l,a,s){const r=ee("hColgroup"),i=ee("table-header"),u=ee("table-body"),c=ee("el-scrollbar"),f=ee("table-footer"),d=Sl("mousewheel");return w(),O("div",{ref:"tableWrapper",class:$([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:Re(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...p)=>e.handleMouseLeave&&e.handleMouseLeave(...p))},[R("div",{class:$(e.ns.e("inner-wrapper")),style:Re(e.tableInnerStyle)},[R("div",aP,[ie(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?xe((w(),O("div",{key:0,ref:"headerWrapper",class:$(e.ns.e("header-wrapper"))},[R("table",{ref:"tableHeader",class:$(e.ns.e("header")),style:Re(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[E(r,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),E(i,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[d,e.handleHeaderFooterMousewheel]]):Z("v-if",!0),R("div",{ref:"bodyWrapper",class:$(e.ns.e("body-wrapper"))},[E(c,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:N(()=>[R("table",{ref:"tableBody",class:$(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Re({width:e.bodyWidth,tableLayout:e.tableLayout})},[E(r,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(w(),G(i,{key:0,ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])):Z("v-if",!0),E(u,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"])],6),e.isEmpty?(w(),O("div",{key:0,ref:"emptyBlock",style:Re(e.emptyBlockStyle),class:$(e.ns.e("empty-block"))},[R("span",{class:$(e.ns.e("empty-text"))},[ie(e.$slots,"empty",{},()=>[ye(ae(e.computedEmptyText),1)])],2)],6)):Z("v-if",!0),e.$slots.append?(w(),O("div",{key:1,ref:"appendWrapper",class:$(e.ns.e("append-wrapper"))},[ie(e.$slots,"append")],2)):Z("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary?xe((w(),O("div",{key:1,ref:"footerWrapper",class:$(e.ns.e("footer-wrapper"))},[E(f,{border:e.border,"default-sort":e.defaultSort,store:e.store,style:Re(e.tableBodyStyles),"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","style","sum-text","summary-method"])],2)),[[lt,!e.isEmpty],[d,e.handleHeaderFooterMousewheel]]):Z("v-if",!0),e.border||e.isGroup?(w(),O("div",{key:2,class:$(e.ns.e("border-left-patch"))},null,2)):Z("v-if",!0)],6),xe(R("div",{ref:"resizeProxy",class:$(e.ns.e("column-resize-proxy"))},null,2),[[lt,e.resizeProxyVisible]])],46,oP)}var rP=he(lP,[["render",sP],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]);const iP={selection:"table-column--selection",expand:"table__expand-column"},uP={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:""}},cP=e=>iP[e]||"",dP={selection:{renderHeader({store:e}){function t(){return e.states.data.value&&e.states.data.value.length===0}return De($n,{disabled:t(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value})},renderCell({row:e,column:t,store:n,$index:l}){return De($n,{disabled:t.selectable?!t.selectable.call(null,e,l):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:a=>a.stopPropagation(),modelValue:n.isSelected(e)})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const l=e.index;return typeof l=="number"?n=t+l:typeof l=="function"&&(n=l(t)),De("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:n}){const{ns:l}=t,a=[l.e("expand-icon")];return n&&a.push(l.em("expand-icon","expanded")),De("div",{class:a,onClick:function(r){r.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[De(Pe,null,{default:()=>[De(sn)]})]})},sortable:!1,resizable:!1}};function fP({row:e,column:t,$index:n}){var l;const a=t.property,s=a&&na(e,a).value;return t&&t.formatter?t.formatter(e,t,s,n):((l=s==null?void 0:s.toString)==null?void 0:l.call(s))||""}function pP({row:e,treeNode:t,store:n},l=!1){const{ns:a}=n;if(!t)return l?[De("span",{class:a.e("placeholder")})]:null;const s=[],r=function(i){i.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&s.push(De("span",{class:a.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const i=[a.e("expand-icon"),t.expanded?a.em("expand-icon","expanded"):""];let u=sn;t.loading&&(u=Xn),s.push(De("div",{class:i,onClick:r},{default:()=>[De(Pe,{class:{[a.is("loading")]:t.loading}},{default:()=>[De(u)]})]}))}else s.push(De("span",{class:a.e("placeholder")}));return s}function wu(e,t){return e.reduce((n,l)=>(n[l]=l,n),t)}function vP(e,t){const n=at();return{registerComplexWatchers:()=>{const s=["fixed"],r={realWidth:"width",realMinWidth:"minWidth"},i=wu(s,r);Object.keys(i).forEach(u=>{const c=r[u];nn(t,c)&&ue(()=>t[c],f=>{let d=f;c==="width"&&u==="realWidth"&&(d=Gr(f)),c==="minWidth"&&u==="realMinWidth"&&(d=Vf(f)),n.columnConfig.value[c]=d,n.columnConfig.value[u]=d;const p=c==="fixed";e.value.store.scheduleLayout(p)})})},registerNormalWatchers:()=>{const s=["label","filters","filterMultiple","sortable","index","formatter","className","labelClassName","showOverflowTooltip"],r={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},i=wu(s,r);Object.keys(i).forEach(u=>{const c=r[u];nn(t,c)&&ue(()=>t[c],f=>{n.columnConfig.value[u]=f})})}}}function mP(e,t,n){const l=at(),a=_(""),s=_(!1),r=_(),i=_(),u=ce("table");Cn(()=>{r.value=e.align?`is-${e.align}`:null,r.value}),Cn(()=>{i.value=e.headerAlign?`is-${e.headerAlign}`:r.value,i.value});const c=S(()=>{let C=l.vnode.vParent||l.parent;for(;C&&!C.tableId&&!C.columnId;)C=C.vnode.vParent||C.parent;return C}),f=S(()=>{const{store:C}=l.parent;if(!C)return!1;const{treeData:I}=C.states,T=I.value;return T&&Object.keys(T).length>0}),d=_(Gr(e.width)),p=_(Vf(e.minWidth)),m=C=>(d.value&&(C.width=d.value),p.value&&(C.minWidth=p.value),!d.value&&p.value&&(C.width=void 0),C.minWidth||(C.minWidth=80),C.realWidth=Number(C.width===void 0?C.minWidth:C.width),C),h=C=>{const I=C.type,T=dP[I]||{};Object.keys(T).forEach(L=>{const A=T[L];L!=="className"&&A!==void 0&&(C[L]=A)});const M=cP(I);if(M){const L=`${o(u.namespace)}-${M}`;C.className=C.className?`${C.className} ${L}`:L}return C},v=C=>{Array.isArray(C)?C.forEach(T=>I(T)):I(C);function I(T){var M;((M=T==null?void 0:T.type)==null?void 0:M.name)==="ElTableColumn"&&(T.vParent=l)}};return{columnId:a,realAlign:r,isSubColumn:s,realHeaderAlign:i,columnOrTableParent:c,setColumnWidth:m,setColumnForcedProps:h,setColumnRenders:C=>{e.renderHeader||C.type!=="selection"&&(C.renderHeader=T=>{l.columnConfig.value.label;const M=t.header;return M?M(T):C.label});let I=C.renderCell;return C.type==="expand"?(C.renderCell=T=>De("div",{class:"cell"},[I(T)]),n.value.renderExpanded=T=>t.default?t.default(T):t.default):(I=I||fP,C.renderCell=T=>{let M=null;if(t.default){const x=t.default(T);M=x.some(U=>U.type!==ur)?x:I(T)}else M=I(T);const{columns:L}=n.value.store.states,A=L.value.findIndex(x=>x.type==="default"),D=f.value&&T.cellIndex===A,B=pP(T,D),F={class:"cell",style:{}};return C.showOverflowTooltip&&(F.class=`${F.class} ${o(u.namespace)}-tooltip`,F.style={width:`${(T.column.realWidth||Number(T.column.width))-1}px`}),v(M),De("div",F,[B,M])}),C},getPropsData:(...C)=>C.reduce((I,T)=>(Array.isArray(T)&&T.forEach(M=>{I[M]=e[M]}),I),{}),getColumnElIndex:(C,I)=>Array.prototype.indexOf.call(C,I),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",l.columnConfig.value)}}}var hP={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},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let gP=1;var Kf=j({name:"ElTableColumn",components:{ElCheckbox:$n},props:hP,setup(e,{slots:t}){const n=at(),l=_({}),a=S(()=>{let b=n.parent;for(;b&&!b.tableId;)b=b.parent;return b}),{registerNormalWatchers:s,registerComplexWatchers:r}=vP(a,e),{columnId:i,isSubColumn:u,realHeaderAlign:c,columnOrTableParent:f,setColumnWidth:d,setColumnForcedProps:p,setColumnRenders:m,getPropsData:h,getColumnElIndex:v,realAlign:g,updateColumnOrder:y}=mP(e,t,a),k=f.value;i.value=`${k.tableId||k.columnId}_column_${gP++}`,cr(()=>{u.value=a.value!==k;const b=e.type||"default",C=e.sortable===""?!0:e.sortable,I=Yt(e.showOverflowTooltip)?k.props.showOverflowTooltip:e.showOverflowTooltip,T={...uP[b],id:i.value,type:b,property:e.prop||e.property,align:g,headerAlign:c,showOverflowTooltip:I,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:C,index:e.index,rawColumnKey:n.vnode.key};let B=h(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement"]);B=gN(T,B),B=bN(m,d,p)(B),l.value=B,s(),r()}),ze(()=>{var b;const C=f.value,I=u.value?C.vnode.el.children:(b=C.refs.hiddenColumns)==null?void 0:b.children,T=()=>v(I||[],n.vnode.el);l.value.getColumnIndex=T,T()>-1&&a.value.store.commit("insertColumn",l.value,u.value?C.columnConfig.value:null,y)}),Rt(()=>{a.value.store.commit("removeColumn",l.value,u.value?k.columnConfig.value:null,y)}),n.columnId=i.value,n.columnConfig=l},render(){var e,t,n;try{const l=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),a=[];if(Array.isArray(l))for(const r of l)((n=r.type)==null?void 0:n.name)==="ElTableColumn"||r.shapeFlag&2?a.push(r):r.type===Ne&&Array.isArray(r.children)&&r.children.forEach(i=>{(i==null?void 0:i.patchFlag)!==1024&&!ct(i==null?void 0:i.children)&&a.push(i)});return De("div",a)}catch{return De("div",[])}}});const yP=Qe(rP,{TableColumn:Kf}),bP=xt(Kf);var Po=(e=>(e.ASC="asc",e.DESC="desc",e))(Po||{}),Mo=(e=>(e.CENTER="center",e.RIGHT="right",e))(Mo||{}),Wf=(e=>(e.LEFT="left",e.RIGHT="right",e))(Wf||{});const Xs={asc:"desc",desc:"asc"},Lo=Symbol("placeholder"),wP=(e,t,n)=>{var l;const a={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:e.flexGrow||0,flexShrink:e.flexShrink||1}};n||(a.flexShrink=1);const s={...(l=e.style)!=null?l:{},...a,flexBasis:"auto",width:e.width};return t||(e.maxWidth&&(s.maxWidth=e.maxWidth),e.minWidth&&(s.minWidth=e.minWidth)),s};function kP(e,t,n){const l=S(()=>o(t).filter(v=>!v.hidden)),a=S(()=>o(l).filter(v=>v.fixed==="left"||v.fixed===!0)),s=S(()=>o(l).filter(v=>v.fixed==="right")),r=S(()=>o(l).filter(v=>!v.fixed)),i=S(()=>{const v=[];return o(a).forEach(g=>{v.push({...g,placeholderSign:Lo})}),o(r).forEach(g=>{v.push(g)}),o(s).forEach(g=>{v.push({...g,placeholderSign:Lo})}),v}),u=S(()=>o(a).length||o(s).length),c=S(()=>o(t).reduce((g,y)=>(g[y.key]=wP(y,o(n),e.fixed),g),{})),f=S(()=>o(l).reduce((v,g)=>v+g.width,0)),d=v=>o(t).find(g=>g.key===v),p=v=>o(c)[v],m=(v,g)=>{v.width=g};function h(v){var g;const{key:y}=v.currentTarget.dataset;if(!y)return;const{sortState:k,sortBy:b}=e;let C=Po.ASC;It(k)?C=Xs[k[y]]:C=Xs[b.order],(g=e.onColumnSort)==null||g.call(e,{column:d(y),key:y,order:C})}return{columns:t,columnsStyles:c,columnsTotalWidth:f,fixedColumnsOnLeft:a,fixedColumnsOnRight:s,hasFixedColumns:u,mainColumns:i,normalColumns:r,visibleColumns:l,getColumn:d,getColumnStyle:p,updateColumnWidth:m,onColumnSorted:h}}const CP=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:l,onMaybeEndReached:a})=>{const s=_({scrollLeft:0,scrollTop:0});function r(m){var h,v,g;const{scrollTop:y}=m;(h=t.value)==null||h.scrollTo(m),(v=n.value)==null||v.scrollToTop(y),(g=l.value)==null||g.scrollToTop(y)}function i(m){s.value=m,r(m)}function u(m){s.value.scrollTop=m,r(o(s))}function c(m){var h,v;s.value.scrollLeft=m,(v=(h=t.value)==null?void 0:h.scrollTo)==null||v.call(h,o(s))}function f(m){var h;i(m),(h=e.onScroll)==null||h.call(e,m)}function d({scrollTop:m}){const{scrollTop:h}=o(s);m!==h&&u(m)}function p(m,h="auto"){var v;(v=t.value)==null||v.scrollToRow(m,h)}return ue(()=>o(s).scrollTop,(m,h)=>{m>h&&a()}),{scrollPos:s,scrollTo:i,scrollToLeft:c,scrollToTop:u,scrollToRow:p,onScroll:f,onVerticalScroll:d}},SP=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:l})=>{const a=at(),{emit:s}=a,r=Nt(!1),i=Nt(null),u=_(e.defaultExpandedRowKeys||[]),c=_(-1),f=Nt(null),d=_({}),p=_({}),m=Nt({}),h=Nt({}),v=Nt({}),g=S(()=>He(e.estimatedRowHeight));function y(L){var A;(A=e.onRowsRendered)==null||A.call(e,L),L.rowCacheEnd>o(c)&&(c.value=L.rowCacheEnd)}function k({hovered:L,rowKey:A}){i.value=L?A:null}function b({expanded:L,rowData:A,rowIndex:D,rowKey:B}){var F,x;const U=[...o(u)],X=U.indexOf(B);L?X===-1&&U.push(B):X>-1&&U.splice(X,1),u.value=U,s("update:expandedRowKeys",U),(F=e.onRowExpand)==null||F.call(e,{expanded:L,rowData:A,rowIndex:D,rowKey:B}),(x=e.onExpandedRowsChange)==null||x.call(e,U)}const C=hn(()=>{var L,A,D,B;r.value=!0,d.value={...o(d),...o(p)},I(o(f),!1),p.value={},f.value=null,(L=t.value)==null||L.forceUpdate(),(A=n.value)==null||A.forceUpdate(),(D=l.value)==null||D.forceUpdate(),(B=a.proxy)==null||B.$forceUpdate(),r.value=!1},0);function I(L,A=!1){o(g)&&[t,n,l].forEach(D=>{const B=o(D);B&&B.resetAfterRowIndex(L,A)})}function T(L,A,D){const B=o(f);(B===null||B>D)&&(f.value=D),p.value[L]=A}function M({rowKey:L,height:A,rowIndex:D},B){B?B===Wf.RIGHT?v.value[L]=A:m.value[L]=A:h.value[L]=A;const F=Math.max(...[m,v,h].map(x=>x.value[L]||0));o(d)[L]!==F&&(T(L,F,D),C())}return{hoveringRowKey:i,expandedRowKeys:u,lastRenderedRowIndex:c,isDynamic:g,isResetting:r,rowHeights:d,resetAfterIndex:I,onRowExpanded:b,onRowHovered:k,onRowsRendered:y,onRowHeightChange:M}},_P=(e,{expandedRowKeys:t,lastRenderedRowIndex:n,resetAfterIndex:l})=>{const a=_({}),s=S(()=>{const i={},{data:u,rowKey:c}=e,f=o(t);if(!f||!f.length)return u;const d=[],p=new Set;f.forEach(h=>p.add(h));let m=u.slice();for(m.forEach(h=>i[h[c]]=0);m.length>0;){const h=m.shift();d.push(h),p.has(h[c])&&Array.isArray(h.children)&&h.children.length>0&&(m=[...h.children,...m],h.children.forEach(v=>i[v[c]]=i[h[c]]+1))}return a.value=i,d}),r=S(()=>{const{data:i,expandColumnKey:u}=e;return u?o(s):i});return ue(r,(i,u)=>{i!==u&&(n.value=-1,l(0,!0))}),{data:r,depthMap:a}},EP=(e,t)=>e+t,fa=e=>et(e)?e.reduce(EP,0):e,$l=(e,t,n={})=>kt(e)?e(t):e??n,ol=e=>(["width","maxWidth","minWidth","height"].forEach(t=>{e[t]=Ft(e[t])}),e),Uf=e=>zt(e)?t=>De(e,t):e,$P=(e,{columnsTotalWidth:t,data:n,fixedColumnsOnLeft:l,fixedColumnsOnRight:a})=>{const s=S(()=>{const{fixed:b,width:C,vScrollbarSize:I}=e,T=C-I;return b?Math.max(Math.round(o(t)),T):T}),r=S(()=>o(s)+(e.fixed?e.vScrollbarSize:0)),i=S(()=>{const{height:b=0,maxHeight:C=0,footerHeight:I,hScrollbarSize:T}=e;if(C>0){const M=o(h),L=o(u),D=o(m)+M+L+T;return Math.min(D,C-I)}return b-I}),u=S(()=>{const{rowHeight:b,estimatedRowHeight:C}=e,I=o(n);return He(C)?I.length*C:I.length*b}),c=S(()=>{const{maxHeight:b}=e,C=o(i);if(He(b)&&b>0)return C;const I=o(u)+o(m)+o(h);return Math.min(C,I)}),f=b=>b.width,d=S(()=>fa(o(l).map(f))),p=S(()=>fa(o(a).map(f))),m=S(()=>fa(e.headerHeight)),h=S(()=>{var b;return(((b=e.fixedData)==null?void 0:b.length)||0)*e.rowHeight}),v=S(()=>o(i)-o(m)-o(h)),g=S(()=>{const{style:b={},height:C,width:I}=e;return ol({...b,height:C,width:I})}),y=S(()=>ol({height:e.footerHeight})),k=S(()=>({top:Ft(o(m)),bottom:Ft(e.footerHeight),width:Ft(e.width)}));return{bodyWidth:s,fixedTableHeight:c,mainTableHeight:i,leftTableWidth:d,rightTableWidth:p,headerWidth:r,rowsHeight:u,windowHeight:v,footerHeight:y,emptyStyle:k,rootStyle:g,headerHeight:m}},TP=e=>{const t=_(),n=_(0),l=_(0);let a;return ze(()=>{a=un(t,([s])=>{const{width:r,height:i}=s.contentRect,{paddingLeft:u,paddingRight:c,paddingTop:f,paddingBottom:d}=getComputedStyle(s.target),p=Number.parseInt(u)||0,m=Number.parseInt(c)||0,h=Number.parseInt(f)||0,v=Number.parseInt(d)||0;n.value=r-p-m,l.value=i-h-v}).stop}),Rt(()=>{a==null||a()}),ue([n,l],([s,r])=>{var i;(i=e.onResize)==null||i.call(e,{width:s,height:r})}),{sizer:t,width:n,height:l}};function IP(e){const t=_(),n=_(),l=_(),{columns:a,columnsStyles:s,columnsTotalWidth:r,fixedColumnsOnLeft:i,fixedColumnsOnRight:u,hasFixedColumns:c,mainColumns:f,onColumnSorted:d}=kP(e,At(e,"columns"),At(e,"fixed")),{scrollTo:p,scrollToLeft:m,scrollToTop:h,scrollToRow:v,onScroll:g,onVerticalScroll:y,scrollPos:k}=CP(e,{mainTableRef:t,leftTableRef:n,rightTableRef:l,onMaybeEndReached:Ie}),{expandedRowKeys:b,hoveringRowKey:C,lastRenderedRowIndex:I,isDynamic:T,isResetting:M,rowHeights:L,resetAfterIndex:A,onRowExpanded:D,onRowHeightChange:B,onRowHovered:F,onRowsRendered:x}=SP(e,{mainTableRef:t,leftTableRef:n,rightTableRef:l}),{data:U,depthMap:X}=_P(e,{expandedRowKeys:b,lastRenderedRowIndex:I,resetAfterIndex:A}),{bodyWidth:K,fixedTableHeight:V,mainTableHeight:W,leftTableWidth:P,rightTableWidth:H,headerWidth:Y,rowsHeight:z,windowHeight:q,footerHeight:se,emptyStyle:pe,rootStyle:oe,headerHeight:re}=$P(e,{columnsTotalWidth:r,data:U,fixedColumnsOnLeft:i,fixedColumnsOnRight:u}),Q=Nt(!1),ve=_(),_e=S(()=>{const Ke=o(U).length===0;return et(e.fixedData)?e.fixedData.length===0&&Ke:Ke});function Te(Ke){const{estimatedRowHeight:Ge,rowHeight:qe,rowKey:it}=e;return Ge?o(L)[o(U)[Ke][it]]||Ge:qe}function Ie(){const{onEndReached:Ke}=e;if(!Ke)return;const{scrollTop:Ge}=o(k),qe=o(z),it=o(q),ke=qe-(Ge+it)+e.hScrollbarSize;o(I)>=0&&qe===Ge+o(W)-o(re)&&Ke(ke)}return ue(()=>e.expandedRowKeys,Ke=>b.value=Ke,{deep:!0}),{columns:a,containerRef:ve,mainTableRef:t,leftTableRef:n,rightTableRef:l,isDynamic:T,isResetting:M,isScrolling:Q,hoveringRowKey:C,hasFixedColumns:c,columnsStyles:s,columnsTotalWidth:r,data:U,expandedRowKeys:b,depthMap:X,fixedColumnsOnLeft:i,fixedColumnsOnRight:u,mainColumns:f,bodyWidth:K,emptyStyle:pe,rootStyle:oe,headerWidth:Y,footerHeight:se,mainTableHeight:W,fixedTableHeight:V,leftTableWidth:P,rightTableWidth:H,showEmpty:_e,getRowHeight:Te,onColumnSorted:d,onRowHovered:F,onRowExpanded:D,onRowsRendered:x,onRowHeightChange:B,scrollTo:p,scrollToLeft:m,scrollToTop:h,scrollToRow:v,onScroll:g,onVerticalScroll:y}}const Jr=Symbol("tableV2"),jf=String,xo={type:te(Array),required:!0},Qr={type:te(Array)},qf={...Qr,required:!0},NP=String,ku={type:te(Array),default:()=>Ot([])},ml={type:Number,required:!0},Gf={type:te([String,Number,Symbol]),default:"id"},Cu={type:te(Object)},bl=ge({class:String,columns:xo,columnsStyles:{type:te(Object),required:!0},depth:Number,expandColumnKey:NP,estimatedRowHeight:{...kl.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:te(Function)},onRowHover:{type:te(Function)},onRowHeightChange:{type:te(Function)},rowData:{type:te(Object),required:!0},rowEventHandlers:{type:te(Object)},rowIndex:{type:Number,required:!0},rowKey:Gf,style:{type:te(Object)}}),ws={type:Number,required:!0},ei=ge({class:String,columns:xo,fixedHeaderData:{type:te(Array)},headerData:{type:te(Array),required:!0},headerHeight:{type:te([Number,Array]),default:50},rowWidth:ws,rowHeight:{type:Number,default:50},height:ws,width:ws}),pa=ge({columns:xo,data:qf,fixedData:Qr,estimatedRowHeight:bl.estimatedRowHeight,width:ml,height:ml,headerWidth:ml,headerHeight:ei.headerHeight,bodyWidth:ml,rowHeight:ml,cache:yf.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:kl.scrollbarAlwaysOn,scrollbarStartGap:kl.scrollbarStartGap,scrollbarEndGap:kl.scrollbarEndGap,class:jf,style:Cu,containerStyle:Cu,getRowHeight:{type:te(Function),required:!0},rowKey:bl.rowKey,onRowsRendered:{type:te(Function)},onScroll:{type:te(Function)}}),PP=ge({cache:pa.cache,estimatedRowHeight:bl.estimatedRowHeight,rowKey:Gf,headerClass:{type:te([String,Function])},headerProps:{type:te([Object,Function])},headerCellProps:{type:te([Object,Function])},headerHeight:ei.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:te([String,Function])},rowProps:{type:te([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:te([Object,Function])},columns:xo,data:qf,dataGetter:{type:te(Function)},fixedData:Qr,expandColumnKey:bl.expandColumnKey,expandedRowKeys:ku,defaultExpandedRowKeys:ku,class:jf,fixed:Boolean,style:{type:te(Object)},width:ml,height:ml,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:kl.hScrollbarSize,vScrollbarSize:kl.vScrollbarSize,scrollbarAlwaysOn:kf.alwaysOn,sortBy:{type:te(Object),default:()=>({})},sortState:{type:te(Object),default:void 0},onColumnSort:{type:te(Function)},onExpandedRowsChange:{type:te(Function)},onEndReached:{type:te(Function)},onRowExpand:bl.onRowExpand,onScroll:pa.onScroll,onRowsRendered:pa.onRowsRendered,rowEventHandlers:bl.rowEventHandlers}),ti=(e,{slots:t})=>{var n;const{cellData:l,style:a}=e,s=((n=l==null?void 0:l.toString)==null?void 0:n.call(l))||"";return E("div",{class:e.class,title:s,style:a},[t.default?t.default(e):s])};ti.displayName="ElTableV2Cell";ti.inheritAttrs=!1;const ni=(e,{slots:t})=>{var n,l;return t.default?t.default(e):E("div",{class:e.class,title:(n=e.column)==null?void 0:n.title},[(l=e.column)==null?void 0:l.title])};ni.displayName="ElTableV2HeaderCell";ni.inheritAttrs=!1;const MP=ge({class:String,columns:xo,columnsStyles:{type:te(Object),required:!0},headerIndex:Number,style:{type:te(Object)}}),LP=j({name:"ElTableV2HeaderRow",props:MP,setup(e,{slots:t}){return()=>{const{columns:n,columnsStyles:l,headerIndex:a,style:s}=e;let r=n.map((i,u)=>t.cell({columns:n,column:i,columnIndex:u,headerIndex:a,style:l[i.key]}));return t.header&&(r=t.header({cells:r.map(i=>et(i)&&i.length===1?i[0]:i),columns:n,headerIndex:a})),E("div",{class:e.class,style:s,role:"row"},[r])}}}),RP="ElTableV2Header",OP=j({name:RP,props:ei,setup(e,{slots:t,expose:n}){const l=ce("table-v2"),a=_(),s=S(()=>ol({width:e.width,height:e.height})),r=S(()=>ol({width:e.rowWidth,height:e.height})),i=S(()=>Yl(o(e.headerHeight))),u=d=>{const p=o(a);Le(()=>{p!=null&&p.scroll&&p.scroll({left:d})})},c=()=>{const d=l.e("fixed-header-row"),{columns:p,fixedHeaderData:m,rowHeight:h}=e;return m==null?void 0:m.map((v,g)=>{var y;const k=ol({height:h,width:"100%"});return(y=t.fixed)==null?void 0:y.call(t,{class:d,columns:p,rowData:v,rowIndex:-(g+1),style:k})})},f=()=>{const d=l.e("dynamic-header-row"),{columns:p}=e;return o(i).map((m,h)=>{var v;const g=ol({width:"100%",height:m});return(v=t.dynamic)==null?void 0:v.call(t,{class:d,columns:p,headerIndex:h,style:g})})};return n({scrollToLeft:u}),()=>{if(!(e.height<=0))return E("div",{ref:a,class:e.class,style:o(s),role:"rowgroup"},[E("div",{style:o(r),class:l.e("header")},[f(),c()])])}}}),AP=e=>{const{isScrolling:t}=Me(Jr),n=_(!1),l=_(),a=S(()=>He(e.estimatedRowHeight)&&e.rowIndex>=0),s=(u=!1)=>{const c=o(l);if(!c)return;const{columns:f,onRowHeightChange:d,rowKey:p,rowIndex:m,style:h}=e,{height:v}=c.getBoundingClientRect();n.value=!0,Le(()=>{if(u||v!==Number.parseInt(h.height)){const g=f[0],y=(g==null?void 0:g.placeholderSign)===Lo;d==null||d({rowKey:p,height:v,rowIndex:m},g&&!y&&g.fixed)}})},r=S(()=>{const{rowData:u,rowIndex:c,rowKey:f,onRowHover:d}=e,p=e.rowEventHandlers||{},m={};return Object.entries(p).forEach(([h,v])=>{kt(v)&&(m[h]=g=>{v({event:g,rowData:u,rowIndex:c,rowKey:f})})}),d&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:h,hovered:v})=>{const g=m[h];m[h]=y=>{d({event:y,hovered:v,rowData:u,rowIndex:c,rowKey:f}),g==null||g(y)}}),m}),i=u=>{const{onRowExpand:c,rowData:f,rowIndex:d,rowKey:p}=e;c==null||c({expanded:u,rowData:f,rowIndex:d,rowKey:p})};return ze(()=>{o(a)&&s(!0)}),{isScrolling:t,measurable:a,measured:n,rowRef:l,eventHandlers:r,onExpand:i}},VP="ElTableV2TableRow",DP=j({name:VP,props:bl,setup(e,{expose:t,slots:n,attrs:l}){const{eventHandlers:a,isScrolling:s,measurable:r,measured:i,rowRef:u,onExpand:c}=AP(e);return t({onExpand:c}),()=>{const{columns:f,columnsStyles:d,expandColumnKey:p,depth:m,rowData:h,rowIndex:v,style:g}=e;let y=f.map((k,b)=>{const C=et(h.children)&&h.children.length>0&&k.key===p;return n.cell({column:k,columns:f,columnIndex:b,depth:m,style:d[k.key],rowData:h,rowIndex:v,isScrolling:o(s),expandIconProps:C?{rowData:h,rowIndex:v,onExpand:c}:void 0})});if(n.row&&(y=n.row({cells:y.map(k=>et(k)&&k.length===1?k[0]:k),style:g,columns:f,depth:m,rowData:h,rowIndex:v,isScrolling:o(s)})),o(r)){const{height:k,...b}=g||{},C=o(i);return E("div",ot({ref:u,class:e.class,style:C?g:b,role:"row"},l,o(a)),[y])}return E("div",ot(l,{ref:u,class:e.class,style:g,role:"row"},o(a)),[y])}}}),BP=e=>{const{sortOrder:t}=e;return E(Pe,{size:14,class:e.class},{default:()=>[t===Po.ASC?E($v,null,null):E(Tv,null,null)]})},xP=e=>{const{expanded:t,expandable:n,onExpand:l,style:a,size:s}=e,r={onClick:n?()=>l(!t):void 0,class:e.class};return E(Pe,ot(r,{size:s,style:a}),{default:()=>[E(sn,null,null)]})},FP="ElTableV2Grid",zP=e=>{const t=_(),n=_(),l=S(()=>{const{data:v,rowHeight:g,estimatedRowHeight:y}=e;if(!y)return v.length*g}),a=S(()=>{const{fixedData:v,rowHeight:g}=e;return((v==null?void 0:v.length)||0)*g}),s=S(()=>fa(e.headerHeight)),r=S(()=>{const{height:v}=e;return Math.max(0,v-o(s)-o(a))}),i=S(()=>o(s)+o(a)>0),u=({data:v,rowIndex:g})=>v[g][e.rowKey];function c({rowCacheStart:v,rowCacheEnd:g,rowVisibleStart:y,rowVisibleEnd:k}){var b;(b=e.onRowsRendered)==null||b.call(e,{rowCacheStart:v,rowCacheEnd:g,rowVisibleStart:y,rowVisibleEnd:k})}function f(v,g){var y;(y=n.value)==null||y.resetAfterRowIndex(v,g)}function d(v,g){const y=o(t),k=o(n);!y||!k||(It(v)?(y.scrollToLeft(v.scrollLeft),k.scrollTo(v)):(y.scrollToLeft(v),k.scrollTo({scrollLeft:v,scrollTop:g})))}function p(v){var g;(g=o(n))==null||g.scrollTo({scrollTop:v})}function m(v,g){var y;(y=o(n))==null||y.scrollToItem(v,1,g)}function h(){var v,g;(v=o(n))==null||v.$forceUpdate(),(g=o(t))==null||g.$forceUpdate()}return{bodyRef:n,forceUpdate:h,fixedRowHeight:a,gridHeight:r,hasHeader:i,headerHeight:s,headerRef:t,totalHeight:l,itemKey:u,onItemRendered:c,resetAfterRowIndex:f,scrollTo:d,scrollToTop:p,scrollToRow:m}},li=j({name:FP,props:pa,setup(e,{slots:t,expose:n}){const{ns:l}=Me(Jr),{bodyRef:a,fixedRowHeight:s,gridHeight:r,hasHeader:i,headerRef:u,headerHeight:c,totalHeight:f,forceUpdate:d,itemKey:p,onItemRendered:m,resetAfterRowIndex:h,scrollTo:v,scrollToTop:g,scrollToRow:y}=zP(e);n({forceUpdate:d,totalHeight:f,scrollTo:v,scrollToTop:g,scrollToRow:y,resetAfterRowIndex:h});const k=()=>e.bodyWidth;return()=>{const{cache:b,columns:C,data:I,fixedData:T,useIsScrolling:M,scrollbarAlwaysOn:L,scrollbarEndGap:A,scrollbarStartGap:D,style:B,rowHeight:F,bodyWidth:x,estimatedRowHeight:U,headerWidth:X,height:K,width:V,getRowHeight:W,onScroll:P}=e,H=He(U),Y=H?kT:gT,z=o(c);return E("div",{role:"table",class:[l.e("table"),e.class],style:B},[E(Y,{ref:a,data:I,useIsScrolling:M,itemKey:p,columnCache:0,columnWidth:H?k:x,totalColumn:1,totalRow:I.length,rowCache:b,rowHeight:H?W:F,width:V,height:o(r),class:l.e("body"),role:"rowgroup",scrollbarStartGap:D,scrollbarEndGap:A,scrollbarAlwaysOn:L,onScroll:P,onItemRendered:m,perfMode:!1},{default:q=>{var se;const pe=I[q.rowIndex];return(se=t.row)==null?void 0:se.call(t,{...q,columns:C,rowData:pe})}}),o(i)&&E(OP,{ref:u,class:l.e("header-wrapper"),columns:C,headerData:I,headerHeight:e.headerHeight,fixedHeaderData:T,rowWidth:X,rowHeight:F,width:V,height:Math.min(z+o(s),K)},{dynamic:t.header,fixed:t.row})])}}});function HP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const KP=(e,{slots:t})=>{const{mainTableRef:n,...l}=e;return E(li,ot({ref:n},l),HP(t)?t:{default:()=>[t]})};function WP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const UP=(e,{slots:t})=>{if(!e.columns.length)return;const{leftTableRef:n,...l}=e;return E(li,ot({ref:n},l),WP(t)?t:{default:()=>[t]})};function jP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const qP=(e,{slots:t})=>{if(!e.columns.length)return;const{rightTableRef:n,...l}=e;return E(li,ot({ref:n},l),jP(t)?t:{default:()=>[t]})};function GP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const YP=(e,{slots:t})=>{const{columns:n,columnsStyles:l,depthMap:a,expandColumnKey:s,expandedRowKeys:r,estimatedRowHeight:i,hasFixedColumns:u,hoveringRowKey:c,rowData:f,rowIndex:d,style:p,isScrolling:m,rowProps:h,rowClass:v,rowKey:g,rowEventHandlers:y,ns:k,onRowHovered:b,onRowExpanded:C}=e,I=$l(v,{columns:n,rowData:f,rowIndex:d},""),T=$l(h,{columns:n,rowData:f,rowIndex:d}),M=f[g],L=a[M]||0,A=!!s,D=d<0,B=[k.e("row"),I,{[k.e(`row-depth-${L}`)]:A&&d>=0,[k.is("expanded")]:A&&r.includes(M),[k.is("hovered")]:!m&&M===c,[k.is("fixed")]:!L&&D,[k.is("customized")]:!!t.row}],F=u?b:void 0,x={...T,columns:n,columnsStyles:l,class:B,depth:L,expandColumnKey:s,estimatedRowHeight:D?void 0:i,isScrolling:m,rowIndex:d,rowData:f,rowKey:M,rowEventHandlers:y,style:p};return E(DP,ot(x,{onRowHover:F,onRowExpand:C}),GP(t)?t:{default:()=>[t]})},Zs=({columns:e,column:t,columnIndex:n,depth:l,expandIconProps:a,isScrolling:s,rowData:r,rowIndex:i,style:u,expandedRowKeys:c,ns:f,cellProps:d,expandColumnKey:p,indentSize:m,iconSize:h,rowKey:v},{slots:g})=>{const y=ol(u);if(t.placeholderSign===Lo)return E("div",{class:f.em("row-cell","placeholder"),style:y},null);const{cellRenderer:k,dataKey:b,dataGetter:C}=t,T=Uf(k)||g.default||(K=>E(ti,K,null)),M=kt(C)?C({columns:e,column:t,columnIndex:n,rowData:r,rowIndex:i}):Vt(r,b??""),L=$l(d,{cellData:M,columns:e,column:t,columnIndex:n,rowIndex:i,rowData:r}),A={class:f.e("cell-text"),columns:e,column:t,columnIndex:n,cellData:M,isScrolling:s,rowData:r,rowIndex:i},D=T(A),B=[f.e("row-cell"),t.class,t.align===Mo.CENTER&&f.is("align-center"),t.align===Mo.RIGHT&&f.is("align-right")],F=i>=0&&p&&t.key===p,x=i>=0&&c.includes(r[v]);let U;const X=`margin-inline-start: ${l*m}px;`;return F&&(It(a)?U=E(xP,ot(a,{class:[f.e("expand-icon"),f.is("expanded",x)],size:h,expanded:x,style:X,expandable:!0}),null):U=E("div",{style:[X,`width: ${h}px; height: ${h}px;`].join(" ")},null)),E("div",ot({class:B,style:y},L,{role:"cell"}),[U,D])};Zs.inheritAttrs=!1;function XP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const ZP=({columns:e,columnsStyles:t,headerIndex:n,style:l,headerClass:a,headerProps:s,ns:r},{slots:i})=>{const u={columns:e,headerIndex:n},c=[r.e("header-row"),$l(a,u,""),{[r.is("customized")]:!!i.header}],f={...$l(s,u),columnsStyles:t,class:c,columns:e,headerIndex:n,style:l};return E(LP,f,XP(i)?i:{default:()=>[i]})},Su=(e,{slots:t})=>{const{column:n,ns:l,style:a,onColumnSorted:s}=e,r=ol(a);if(n.placeholderSign===Lo)return E("div",{class:l.em("header-row-cell","placeholder"),style:r},null);const{headerCellRenderer:i,headerClass:u,sortable:c}=n,f={...e,class:l.e("header-cell-text")},p=(Uf(i)||t.default||(C=>E(ni,C,null)))(f),{sortBy:m,sortState:h,headerCellProps:v}=e;let g,y;if(h){const C=h[n.key];g=!!Xs[C],y=g?C:Po.ASC}else g=n.key===m.key,y=g?m.order:Po.ASC;const k=[l.e("header-cell"),$l(u,e,""),n.align===Mo.CENTER&&l.is("align-center"),n.align===Mo.RIGHT&&l.is("align-right"),c&&l.is("sortable")],b={...$l(v,e),onClick:n.sortable?s:void 0,class:k,style:r,"data-key":n.key};return E("div",ot(b,{role:"columnheader"}),[p,c&&E(BP,{class:[l.e("sort-icon"),g&&l.is("sorting")],sortOrder:y},null)])},Yf=(e,{slots:t})=>{var n;return E("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};Yf.displayName="ElTableV2Footer";const Xf=(e,{slots:t})=>E("div",{class:e.class,style:e.style},[t.default?t.default():E(nf,null,null)]);Xf.displayName="ElTableV2Empty";const Zf=(e,{slots:t})=>{var n;return E("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};Zf.displayName="ElTableV2Overlay";function fo(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zt(e)}const JP="ElTableV2",QP=j({name:JP,props:PP,setup(e,{slots:t,expose:n}){const l=ce("table-v2"),{columnsStyles:a,fixedColumnsOnLeft:s,fixedColumnsOnRight:r,mainColumns:i,mainTableHeight:u,fixedTableHeight:c,leftTableWidth:f,rightTableWidth:d,data:p,depthMap:m,expandedRowKeys:h,hasFixedColumns:v,hoveringRowKey:g,mainTableRef:y,leftTableRef:k,rightTableRef:b,isDynamic:C,isResetting:I,isScrolling:T,bodyWidth:M,emptyStyle:L,rootStyle:A,headerWidth:D,footerHeight:B,showEmpty:F,scrollTo:x,scrollToLeft:U,scrollToTop:X,scrollToRow:K,getRowHeight:V,onColumnSorted:W,onRowHeightChange:P,onRowHovered:H,onRowExpanded:Y,onRowsRendered:z,onScroll:q,onVerticalScroll:se}=IP(e);return n({scrollTo:x,scrollToLeft:U,scrollToTop:X,scrollToRow:K}),dt(Jr,{ns:l,isResetting:I,hoveringRowKey:g,isScrolling:T}),()=>{const{cache:pe,cellProps:oe,estimatedRowHeight:re,expandColumnKey:Q,fixedData:ve,headerHeight:_e,headerClass:Te,headerProps:Ie,headerCellProps:Ke,sortBy:Ge,sortState:qe,rowHeight:it,rowClass:ke,rowEventHandlers:Ee,rowKey:Be,rowProps:Ve,scrollbarAlwaysOn:Ye,indentSize:Xe,iconSize:nt,useIsScrolling:Se,vScrollbarSize:Ue,width:gt}=e,Et=o(p),$t={cache:pe,class:l.e("main"),columns:o(i),data:Et,fixedData:ve,estimatedRowHeight:re,bodyWidth:o(M),headerHeight:_e,headerWidth:o(D),height:o(u),mainTableRef:y,rowKey:Be,rowHeight:it,scrollbarAlwaysOn:Ye,scrollbarStartGap:2,scrollbarEndGap:Ue,useIsScrolling:Se,width:gt,getRowHeight:V,onRowsRendered:z,onScroll:q},be=o(f),me=o(c),ne={cache:pe,class:l.e("left"),columns:o(s),data:Et,estimatedRowHeight:re,leftTableRef:k,rowHeight:it,bodyWidth:be,headerWidth:be,headerHeight:_e,height:me,rowKey:Be,scrollbarAlwaysOn:Ye,scrollbarStartGap:2,scrollbarEndGap:Ue,useIsScrolling:Se,width:be,getRowHeight:V,onScroll:se},de=o(d)+Ue,$e={cache:pe,class:l.e("right"),columns:o(r),data:Et,estimatedRowHeight:re,rightTableRef:b,rowHeight:it,bodyWidth:de,headerWidth:de,headerHeight:_e,height:me,rowKey:Be,scrollbarAlwaysOn:Ye,scrollbarStartGap:2,scrollbarEndGap:Ue,width:de,style:`--${o(l.namespace)}-table-scrollbar-size: ${Ue}px`,useIsScrolling:Se,getRowHeight:V,onScroll:se},J=o(a),Oe={ns:l,depthMap:o(m),columnsStyles:J,expandColumnKey:Q,expandedRowKeys:o(h),estimatedRowHeight:re,hasFixedColumns:o(v),hoveringRowKey:o(g),rowProps:Ve,rowClass:ke,rowKey:Be,rowEventHandlers:Ee,onRowHovered:H,onRowExpanded:Y,onRowHeightChange:P},le={cellProps:oe,expandColumnKey:Q,indentSize:Xe,iconSize:nt,rowKey:Be,expandedRowKeys:o(h),ns:l},Ce={ns:l,headerClass:Te,headerProps:Ie,columnsStyles:J},je={ns:l,sortBy:Ge,sortState:qe,headerCellProps:Ke,onColumnSorted:W},st={row:Xt=>E(YP,ot(Xt,Oe),{row:t.row,cell:_t=>{let fe;return t.cell?E(Zs,ot(_t,le,{style:J[_t.column.key]}),fo(fe=t.cell(_t))?fe:{default:()=>[fe]}):E(Zs,ot(_t,le,{style:J[_t.column.key]}),null)}}),header:Xt=>E(ZP,ot(Xt,Ce),{header:t.header,cell:_t=>{let fe;return t["header-cell"]?E(Su,ot(_t,je,{style:J[_t.column.key]}),fo(fe=t["header-cell"](_t))?fe:{default:()=>[fe]}):E(Su,ot(_t,je,{style:J[_t.column.key]}),null)}})},vt=[e.class,l.b(),l.e("root"),{[l.is("dynamic")]:o(C)}],Tt={class:l.e("footer"),style:o(B)};return E("div",{class:vt,style:o(A)},[E(KP,$t,fo(st)?st:{default:()=>[st]}),E(UP,ne,fo(st)?st:{default:()=>[st]}),E(qP,$e,fo(st)?st:{default:()=>[st]}),t.footer&&E(Yf,Tt,{default:t.footer}),o(F)&&E(Xf,{class:l.e("empty"),style:o(L)},{default:t.empty}),t.overlay&&E(Zf,{class:l.e("overlay")},{default:t.overlay})])}}}),e2=ge({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:te(Function)}}),t2=j({name:"ElAutoResizer",props:e2,setup(e,{slots:t}){const n=ce("auto-resizer"),{height:l,width:a,sizer:s}=TP(e),r={width:"100%",height:"100%"};return()=>{var i;return E("div",{ref:s,class:n.b(),style:r},[(i=t.default)==null?void 0:i.call(t,{height:l.value,width:a.value})])}}}),n2=Qe(QP),l2=Qe(t2),ls=Symbol("tabsRootContextKey"),o2=ge({tabs:{type:te(Array),default:()=>Ot([])}}),Jf="ElTabBar",a2=j({name:Jf}),s2=j({...a2,props:o2,setup(e,{expose:t}){const n=e,l=at(),a=Me(ls);a||jt(Jf,"<el-tabs><el-tab-bar /></el-tabs>");const s=ce("tabs"),r=_(),i=_(),u=()=>{let f=0,d=0;const p=["top","bottom"].includes(a.props.tabPosition)?"width":"height",m=p==="width"?"x":"y",h=m==="x"?"left":"top";return n.tabs.every(v=>{var g,y;const k=(y=(g=l.parent)==null?void 0:g.refs)==null?void 0:y[`tab-${v.uid}`];if(!k)return!1;if(!v.active)return!0;f=k[`offset${An(h)}`],d=k[`client${An(p)}`];const b=window.getComputedStyle(k);return p==="width"&&(n.tabs.length>1&&(d-=Number.parseFloat(b.paddingLeft)+Number.parseFloat(b.paddingRight)),f+=Number.parseFloat(b.paddingLeft)),!1}),{[p]:`${d}px`,transform:`translate${An(m)}(${f}px)`}},c=()=>i.value=u();return ue(()=>n.tabs,async()=>{await Le(),c()},{immediate:!0}),un(r,()=>c()),t({ref:r,update:c}),(f,d)=>(w(),O("div",{ref_key:"barRef",ref:r,class:$([o(s).e("active-bar"),o(s).is(o(a).props.tabPosition)]),style:Re(i.value)},null,6))}});var r2=he(s2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]);const i2=ge({panes:{type:te(Array),default:()=>Ot([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),u2={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},_u="ElTabNav",c2=j({name:_u,props:i2,emits:u2,setup(e,{expose:t,emit:n}){const l=at(),a=Me(ls);a||jt(_u,"<el-tabs><tab-nav /></el-tabs>");const s=ce("tabs"),r=Iv(),i=Nv(),u=_(),c=_(),f=_(),d=_(),p=_(!1),m=_(0),h=_(!1),v=_(!0),g=S(()=>["top","bottom"].includes(a.props.tabPosition)?"width":"height"),y=S(()=>({transform:`translate${g.value==="width"?"X":"Y"}(-${m.value}px)`})),k=()=>{if(!u.value)return;const A=u.value[`offset${An(g.value)}`],D=m.value;if(!D)return;const B=D>A?D-A:0;m.value=B},b=()=>{if(!u.value||!c.value)return;const A=c.value[`offset${An(g.value)}`],D=u.value[`offset${An(g.value)}`],B=m.value;if(A-B<=D)return;const F=A-B>D*2?B+D:A-D;m.value=F},C=async()=>{const A=c.value;if(!p.value||!f.value||!u.value||!A)return;await Le();const D=f.value.querySelector(".is-active");if(!D)return;const B=u.value,F=["top","bottom"].includes(a.props.tabPosition),x=D.getBoundingClientRect(),U=B.getBoundingClientRect(),X=F?A.offsetWidth-U.width:A.offsetHeight-U.height,K=m.value;let V=K;F?(x.left<U.left&&(V=K-(U.left-x.left)),x.right>U.right&&(V=K+x.right-U.right)):(x.top<U.top&&(V=K-(U.top-x.top)),x.bottom>U.bottom&&(V=K+(x.bottom-U.bottom))),V=Math.max(V,0),m.value=Math.min(V,X)},I=()=>{var A;if(!c.value||!u.value)return;e.stretch&&((A=d.value)==null||A.update());const D=c.value[`offset${An(g.value)}`],B=u.value[`offset${An(g.value)}`],F=m.value;B<D?(p.value=p.value||{},p.value.prev=F,p.value.next=F+B<D,D-F<B&&(m.value=D-B)):(p.value=!1,F>0&&(m.value=0))},T=A=>{const D=A.code,{up:B,down:F,left:x,right:U}=Ae;if(![B,F,x,U].includes(D))return;const X=Array.from(A.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),K=X.indexOf(A.target);let V;D===x||D===B?K===0?V=X.length-1:V=K-1:K<X.length-1?V=K+1:V=0,X[V].focus({preventScroll:!0}),X[V].click(),M()},M=()=>{v.value&&(h.value=!0)},L=()=>h.value=!1;return ue(r,A=>{A==="hidden"?v.value=!1:A==="visible"&&setTimeout(()=>v.value=!0,50)}),ue(i,A=>{A?setTimeout(()=>v.value=!0,50):v.value=!1}),un(f,I),ze(()=>setTimeout(()=>C(),0)),Nl(()=>I()),t({scrollToActiveTab:C,removeFocus:L}),ue(()=>e.panes,()=>l.update(),{flush:"post",deep:!0}),()=>{const A=p.value?[E("span",{class:[s.e("nav-prev"),s.is("disabled",!p.value.prev)],onClick:k},[E(Pe,null,{default:()=>[E(sl,null,null)]})]),E("span",{class:[s.e("nav-next"),s.is("disabled",!p.value.next)],onClick:b},[E(Pe,null,{default:()=>[E(sn,null,null)]})])]:null,D=e.panes.map((B,F)=>{var x,U,X,K;const V=B.uid,W=B.props.disabled,P=(U=(x=B.props.name)!=null?x:B.index)!=null?U:`${F}`,H=!W&&(B.isClosable||e.editable);B.index=`${F}`;const Y=H?E(Pe,{class:"is-icon-close",onClick:se=>n("tabRemove",B,se)},{default:()=>[E(Sn,null,null)]}):null,z=((K=(X=B.slots).label)==null?void 0:K.call(X))||B.props.label,q=!W&&B.active?0:-1;return E("div",{ref:`tab-${V}`,class:[s.e("item"),s.is(a.props.tabPosition),s.is("active",B.active),s.is("disabled",W),s.is("closable",H),s.is("focus",h.value)],id:`tab-${P}`,key:`tab-${V}`,"aria-controls":`pane-${P}`,role:"tab","aria-selected":B.active,tabindex:q,onFocus:()=>M(),onBlur:()=>L(),onClick:se=>{L(),n("tabClick",B,P,se)},onKeydown:se=>{H&&(se.code===Ae.delete||se.code===Ae.backspace)&&n("tabRemove",B,se)}},[z,Y])});return E("div",{ref:f,class:[s.e("nav-wrap"),s.is("scrollable",!!p.value),s.is(a.props.tabPosition)]},[A,E("div",{class:s.e("nav-scroll"),ref:u},[E("div",{class:[s.e("nav"),s.is(a.props.tabPosition),s.is("stretch",e.stretch&&["top","bottom"].includes(a.props.tabPosition))],ref:c,style:y.value,role:"tablist",onKeydown:T},[e.type?null:E(r2,{ref:d,tabs:[...e.panes]},null),D])])])}}}),d2=ge({type:{type:String,values:["card","border-card",""],default:""},activeName:{type:[String,Number]},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:te(Function),default:()=>!0},stretch:Boolean}),ks=e=>ct(e)||He(e),f2={[tt]:e=>ks(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>ks(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>ks(e),tabAdd:()=>!0};var p2=j({name:"ElTabs",props:d2,emits:f2,setup(e,{emit:t,slots:n,expose:l}){var a,s;const r=ce("tabs"),{children:i,addChild:u,removeChild:c}=$r(at(),"ElTabPane"),f=_(),d=_((s=(a=e.modelValue)!=null?a:e.activeName)!=null?s:"0"),p=y=>{d.value=y,t(tt,y),t("tabChange",y)},m=async y=>{var k,b,C;if(!(d.value===y||Yt(y)))try{await((k=e.beforeLeave)==null?void 0:k.call(e,y,d.value))!==!1&&(p(y),(C=(b=f.value)==null?void 0:b.removeFocus)==null||C.call(b))}catch{}},h=(y,k,b)=>{y.props.disabled||(m(k),t("tabClick",y,b))},v=(y,k)=>{y.props.disabled||Yt(y.props.name)||(k.stopPropagation(),t("edit",y.props.name,"remove"),t("tabRemove",y.props.name))},g=()=>{t("edit",void 0,"add"),t("tabAdd")};return Fn({from:'"activeName"',replacement:'"model-value" or "v-model"',scope:"ElTabs",version:"2.3.0",ref:"https://element-plus.org/en-US/component/tabs.html#attributes",type:"Attribute"},S(()=>!!e.activeName)),ue(()=>e.activeName,y=>m(y)),ue(()=>e.modelValue,y=>m(y)),ue(d,async()=>{var y;await Le(),(y=f.value)==null||y.scrollToActiveTab()}),dt(ls,{props:e,currentName:d,registerPane:u,unregisterPane:c}),l({currentName:d}),()=>{const y=e.editable||e.addable?E("span",{class:r.e("new-tab"),tabindex:"0",onClick:g,onKeydown:C=>{C.code===Ae.enter&&g()}},[E(Pe,{class:r.is("icon-plus")},{default:()=>[E(za,null,null)]})]):null,k=E("div",{class:[r.e("header"),r.is(e.tabPosition)]},[y,E(c2,{ref:f,currentName:d.value,editable:e.editable,type:e.type,panes:i.value,stretch:e.stretch,onTabClick:h,onTabRemove:v},null)]),b=E("div",{class:r.e("content")},[ie(n,"default")]);return E("div",{class:[r.b(),r.m(e.tabPosition),{[r.m("card")]:e.type==="card",[r.m("border-card")]:e.type==="border-card"}]},[...e.tabPosition!=="bottom"?[k,b]:[b,k]])}}});const v2=ge({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),m2=["id","aria-hidden","aria-labelledby"],Qf="ElTabPane",h2=j({name:Qf}),g2=j({...h2,props:v2,setup(e){const t=e,n=at(),l=Qt(),a=Me(ls);a||jt(Qf,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const s=ce("tab-pane"),r=_(),i=S(()=>t.closable||a.props.closable),u=mi(()=>{var m;return a.currentName.value===((m=t.name)!=null?m:r.value)}),c=_(u.value),f=S(()=>{var m;return(m=t.name)!=null?m:r.value}),d=mi(()=>!t.lazy||c.value||u.value);ue(u,m=>{m&&(c.value=!0)});const p=St({uid:n.uid,slots:l,props:t,paneName:f,active:u,index:r,isClosable:i});return ze(()=>{a.registerPane(p)}),Il(()=>{a.unregisterPane(p.uid)}),(m,h)=>o(d)?xe((w(),O("div",{key:0,id:`pane-${o(f)}`,class:$(o(s).b()),role:"tabpanel","aria-hidden":!o(u),"aria-labelledby":`tab-${o(f)}`},[ie(m.$slots,"default")],10,m2)),[[lt,o(u)]]):Z("v-if",!0)}});var ep=he(g2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]);const y2=Qe(p2,{TabPane:ep}),b2=xt(ep),w2=ge({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:Hn,default:""},truncated:{type:Boolean},tag:{type:String,default:"span"}}),k2=j({name:"ElText"}),C2=j({...k2,props:w2,setup(e){const t=e,n=qt(),l=ce("text"),a=S(()=>[l.b(),l.m(t.type),l.m(n.value),l.is("truncated",t.truncated)]);return(s,r)=>(w(),G(rt(s.tag),{class:$(o(a))},{default:N(()=>[ie(s.$slots,"default")]),_:3},8,["class"]))}});var S2=he(C2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/text/src/text.vue"]]);const _2=Qe(S2),E2=ge({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:String,default:"light"},clearable:{type:Boolean,default:!0},size:ln,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:te([String,Object]),default:()=>Xu},clearIcon:{type:te([String,Object]),default:()=>Zn}}),jn=e=>{const t=(e||"").split(":");if(t.length>=2){let n=Number.parseInt(t[0],10);const l=Number.parseInt(t[1],10),a=e.toUpperCase();return a.includes("AM")&&n===12?n=0:a.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:l}}return null},Cs=(e,t)=>{const n=jn(e);if(!n)return-1;const l=jn(t);if(!l)return-1;const a=n.minutes+n.hours*60,s=l.minutes+l.hours*60;return a===s?0:a>s?1:-1},Eu=e=>`${e}`.padStart(2,"0"),Dl=e=>`${Eu(e.hours)}:${Eu(e.minutes)}`,$2=(e,t)=>{const n=jn(e);if(!n)return"";const l=jn(t);if(!l)return"";const a={hours:n.hours,minutes:n.minutes};return a.minutes+=l.minutes,a.hours+=l.hours,a.hours+=Math.floor(a.minutes/60),a.minutes=a.minutes%60,Dl(a)},T2=j({name:"ElTimeSelect"}),I2=j({...T2,props:E2,emits:["change","blur","focus","update:modelValue"],setup(e,{expose:t}){const n=e;Je.extend(gr);const{Option:l}=El,a=ce("input"),s=_(),r=gn(),i=S(()=>n.modelValue),u=S(()=>{const g=jn(n.start);return g?Dl(g):null}),c=S(()=>{const g=jn(n.end);return g?Dl(g):null}),f=S(()=>{const g=jn(n.step);return g?Dl(g):null}),d=S(()=>{const g=jn(n.minTime||"");return g?Dl(g):null}),p=S(()=>{const g=jn(n.maxTime||"");return g?Dl(g):null}),m=S(()=>{const g=[];if(n.start&&n.end&&n.step){let y=u.value,k;for(;y&&c.value&&Cs(y,c.value)<=0;)k=Je(y,"HH:mm").format(n.format),g.push({value:k,disabled:Cs(y,d.value||"-1:-1")<=0||Cs(y,p.value||"100:100")>=0}),y=$2(y,f.value)}return g});return t({blur:()=>{var g,y;(y=(g=s.value)==null?void 0:g.blur)==null||y.call(g)},focus:()=>{var g,y;(y=(g=s.value)==null?void 0:g.focus)==null||y.call(g)}}),(g,y)=>(w(),G(o(El),{ref_key:"select",ref:s,"model-value":o(i),disabled:o(r),clearable:g.clearable,"clear-icon":g.clearIcon,size:g.size,effect:g.effect,placeholder:g.placeholder,"default-first-option":"",filterable:g.editable,"onUpdate:modelValue":y[0]||(y[0]=k=>g.$emit("update:modelValue",k)),onChange:y[1]||(y[1]=k=>g.$emit("change",k)),onBlur:y[2]||(y[2]=k=>g.$emit("blur",k)),onFocus:y[3]||(y[3]=k=>g.$emit("focus",k))},{prefix:N(()=>[g.prefixIcon?(w(),G(o(Pe),{key:0,class:$(o(a).e("prefix-icon"))},{default:N(()=>[(w(),G(rt(g.prefixIcon)))]),_:1},8,["class"])):Z("v-if",!0)]),default:N(()=>[(w(!0),O(Ne,null,Ze(o(m),k=>(w(),G(o(l),{key:k.value,label:k.value,value:k.value,disabled:k.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable"]))}});var va=he(I2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]);va.install=e=>{e.component(va.name,va)};const N2=va,P2=N2,M2=j({name:"ElTimeline",setup(e,{slots:t}){const n=ce("timeline");return dt("timeline",t),()=>De("ul",{class:[n.b()]},[ie(t,"default")])}}),L2=ge({timestamp:{type:String,default:""},hideTimestamp:{type:Boolean,default:!1},center:{type:Boolean,default:!1},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:Pt},hollow:{type:Boolean,default:!1}}),R2=j({name:"ElTimelineItem"}),O2=j({...R2,props:L2,setup(e){const t=e,n=ce("timeline-item"),l=S(()=>[n.e("node"),n.em("node",t.size||""),n.em("node",t.type||""),n.is("hollow",t.hollow)]);return(a,s)=>(w(),O("li",{class:$([o(n).b(),{[o(n).e("center")]:a.center}])},[R("div",{class:$(o(n).e("tail"))},null,2),a.$slots.dot?Z("v-if",!0):(w(),O("div",{key:0,class:$(o(l)),style:Re({backgroundColor:a.color})},[a.icon?(w(),G(o(Pe),{key:0,class:$(o(n).e("icon"))},{default:N(()=>[(w(),G(rt(a.icon)))]),_:1},8,["class"])):Z("v-if",!0)],6)),a.$slots.dot?(w(),O("div",{key:1,class:$(o(n).e("dot"))},[ie(a.$slots,"dot")],2)):Z("v-if",!0),R("div",{class:$(o(n).e("wrapper"))},[!a.hideTimestamp&&a.placement==="top"?(w(),O("div",{key:0,class:$([o(n).e("timestamp"),o(n).is("top")])},ae(a.timestamp),3)):Z("v-if",!0),R("div",{class:$(o(n).e("content"))},[ie(a.$slots,"default")],2),!a.hideTimestamp&&a.placement==="bottom"?(w(),O("div",{key:1,class:$([o(n).e("timestamp"),o(n).is("bottom")])},ae(a.timestamp),3)):Z("v-if",!0)],2)],2))}});var tp=he(O2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/timeline/src/timeline-item.vue"]]);const A2=Qe(M2,{TimelineItem:tp}),V2=xt(tp),np=ge({nowrap:Boolean});var lp=(e=>(e.top="top",e.bottom="bottom",e.left="left",e.right="right",e))(lp||{});const D2=Object.values(lp),oi=ge({width:{type:Number,default:10},height:{type:Number,default:10},style:{type:te(Object),default:null}}),B2=ge({side:{type:te(String),values:D2,required:!0}}),x2=["absolute","fixed"],F2=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],ai=ge({ariaLabel:String,arrowPadding:{type:te(Number),default:5},effect:{type:String,default:""},contentClass:String,placement:{type:te(String),values:F2,default:"bottom"},reference:{type:te(Object),default:null},offset:{type:Number,default:8},strategy:{type:te(String),values:x2,default:"absolute"},showArrow:{type:Boolean,default:!1}}),si=ge({delayDuration:{type:Number,default:300},defaultOpen:Boolean,open:{type:Boolean,default:void 0},onOpenChange:{type:te(Function)},"onUpdate:open":{type:te(Function)}}),Ol={type:te(Function)},ri=ge({onBlur:Ol,onClick:Ol,onFocus:Ol,onMouseDown:Ol,onMouseEnter:Ol,onMouseLeave:Ol}),z2=ge({...si,...oi,...ri,...ai,alwaysOn:Boolean,fullTransition:Boolean,transitionProps:{type:te(Object),default:null},teleported:Boolean,to:{type:te(String),default:"body"}}),os=Symbol("tooltipV2"),op=Symbol("tooltipV2Content"),Ss="tooltip_v2.open",H2=j({name:"ElTooltipV2Root"}),K2=j({...H2,props:si,setup(e,{expose:t}){const n=e,l=_(n.defaultOpen),a=_(null),s=S({get:()=>gm(n.open)?l.value:n.open,set:g=>{var y;l.value=g,(y=n["onUpdate:open"])==null||y.call(n,g)}}),r=S(()=>He(n.delayDuration)&&n.delayDuration>0),{start:i,stop:u}=_l(()=>{s.value=!0},S(()=>n.delayDuration),{immediate:!1}),c=ce("tooltip-v2"),f=En(),d=()=>{u(),s.value=!0},p=()=>{o(r)?i():d()},m=d,h=()=>{u(),s.value=!1};return ue(s,g=>{var y;g&&(document.dispatchEvent(new CustomEvent(Ss)),m()),(y=n.onOpenChange)==null||y.call(n,g)}),ze(()=>{document.addEventListener(Ss,h)}),Rt(()=>{u(),document.removeEventListener(Ss,h)}),dt(os,{contentId:f,triggerRef:a,ns:c,onClose:h,onDelayOpen:p,onOpen:m}),t({onOpen:m,onClose:h}),(g,y)=>ie(g.$slots,"default",{open:o(s)})}});var W2=he(K2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/root.vue"]]);const U2=j({name:"ElTooltipV2Arrow"}),j2=j({...U2,props:{...oi,...B2},setup(e){const t=e,{ns:n}=Me(os),{arrowRef:l}=Me(op),a=S(()=>{const{style:s,width:r,height:i}=t,u=n.namespace.value;return{[`--${u}-tooltip-v2-arrow-width`]:`${r}px`,[`--${u}-tooltip-v2-arrow-height`]:`${i}px`,[`--${u}-tooltip-v2-arrow-border-width`]:`${r/2}px`,[`--${u}-tooltip-v2-arrow-cover-width`]:r/2-1,...s||{}}});return(s,r)=>(w(),O("span",{ref_key:"arrowRef",ref:l,style:Re(o(a)),class:$(o(n).e("arrow"))},null,6))}});var $u=he(j2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/arrow.vue"]]);const q2=ge({style:{type:te([String,Object,Array]),default:()=>({})}}),G2=j({name:"ElVisuallyHidden"}),Y2=j({...G2,props:q2,setup(e){const t=e,n=S(()=>[t.style,{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}]);return(l,a)=>(w(),O("span",ot(l.$attrs,{style:o(n)}),[ie(l.$slots,"default")],16))}});var X2=he(Y2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/visual-hidden/src/visual-hidden.vue"]]);const Z2=["data-side"],J2=j({name:"ElTooltipV2Content"}),Q2=j({...J2,props:{...ai,...np},setup(e){const t=e,{triggerRef:n,contentId:l}=Me(os),a=_(t.placement),s=_(t.strategy),r=_(null),{referenceRef:i,contentRef:u,middlewareData:c,x:f,y:d,update:p}=Jm({placement:a,strategy:s,middleware:S(()=>{const b=[Pv(t.offset)];return t.showArrow&&b.push(Qm({arrowRef:r})),b})}),m=ao().nextZIndex(),h=ce("tooltip-v2"),v=S(()=>a.value.split("-")[0]),g=S(()=>({position:o(s),top:`${o(d)||0}px`,left:`${o(f)||0}px`,zIndex:m})),y=S(()=>{if(!t.showArrow)return{};const{arrow:b}=o(c);return{[`--${h.namespace.value}-tooltip-v2-arrow-x`]:`${b==null?void 0:b.x}px`||"",[`--${h.namespace.value}-tooltip-v2-arrow-y`]:`${b==null?void 0:b.y}px`||""}}),k=S(()=>[h.e("content"),h.is("dark",t.effect==="dark"),h.is(o(s)),t.contentClass]);return ue(r,()=>p()),ue(()=>t.placement,b=>a.value=b),ze(()=>{ue(()=>t.reference||n.value,b=>{i.value=b||void 0},{immediate:!0})}),dt(op,{arrowRef:r}),(b,C)=>(w(),O("div",{ref_key:"contentRef",ref:u,style:Re(o(g)),"data-tooltip-v2-root":""},[b.nowrap?Z("v-if",!0):(w(),O("div",{key:0,"data-side":o(v),class:$(o(k))},[ie(b.$slots,"default",{contentStyle:o(g),contentClass:o(k)}),E(o(X2),{id:o(l),role:"tooltip"},{default:N(()=>[b.ariaLabel?(w(),O(Ne,{key:0},[ye(ae(b.ariaLabel),1)],64)):ie(b.$slots,"default",{key:1})]),_:3},8,["id"]),ie(b.$slots,"arrow",{style:Re(o(y)),side:o(v)})],10,Z2))],4))}});var Tu=he(Q2,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/content.vue"]]);const eM=ge({setRef:{type:te(Function),required:!0},onlyChild:Boolean});var tM=j({props:eM,setup(e,{slots:t}){const n=_(),l=Wa(n,a=>{a?e.setRef(a.nextElementSibling):e.setRef(null)});return()=>{var a;const[s]=((a=t.default)==null?void 0:a.call(t))||[],r=e.onlyChild?Pm(s.children):s.children;return E(Ne,{ref:l},[r])}}});const nM=j({name:"ElTooltipV2Trigger"}),lM=j({...nM,props:{...np,...ri},setup(e){const t=e,{onClose:n,onOpen:l,onDelayOpen:a,triggerRef:s,contentId:r}=Me(os);let i=!1;const u=k=>{s.value=k},c=()=>{i=!1},f=Bt(t.onMouseEnter,a),d=Bt(t.onMouseLeave,n),p=Bt(t.onMouseDown,()=>{n(),i=!0,document.addEventListener("mouseup",c,{once:!0})}),m=Bt(t.onFocus,()=>{i||l()}),h=Bt(t.onBlur,n),v=Bt(t.onClick,k=>{k.detail===0&&n()}),g={blur:h,click:v,focus:m,mousedown:p,mouseenter:f,mouseleave:d},y=(k,b,C)=>{k&&Object.entries(b).forEach(([I,T])=>{k[C](I,T)})};return ue(s,(k,b)=>{y(k,g,"addEventListener"),y(b,g,"removeEventListener"),k&&k.setAttribute("aria-describedby",r.value)}),Rt(()=>{y(s.value,g,"removeEventListener"),document.removeEventListener("mouseup",c)}),(k,b)=>k.nowrap?(w(),G(o(tM),{key:0,"set-ref":u,"only-child":""},{default:N(()=>[ie(k.$slots,"default")]),_:3})):(w(),O("button",ot({key:1,ref_key:"triggerRef",ref:s},k.$attrs),[ie(k.$slots,"default")],16))}});var oM=he(lM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/trigger.vue"]]);const aM=j({name:"ElTooltipV2"}),sM=j({...aM,props:z2,setup(e){const n=Gt(e),l=St(qn(n,Object.keys(oi))),a=St(qn(n,Object.keys(ai))),s=St(qn(n,Object.keys(si))),r=St(qn(n,Object.keys(ri)));return(i,u)=>(w(),G(W2,Nn(dr(s)),{default:N(({open:c})=>[E(oM,ot(r,{nowrap:""}),{default:N(()=>[ie(i.$slots,"trigger")]),_:3},16),(w(),G(Oo,{to:i.to,disabled:!i.teleported},[i.fullTransition?(w(),G(Wt,Nn(ot({key:0},i.transitionProps)),{default:N(()=>[i.alwaysOn||c?(w(),G(Tu,Nn(ot({key:0},a)),{arrow:N(({style:f,side:d})=>[i.showArrow?(w(),G($u,ot({key:0},l,{style:f,side:d}),null,16,["style","side"])):Z("v-if",!0)]),default:N(()=>[ie(i.$slots,"default")]),_:3},16)):Z("v-if",!0)]),_:2},1040)):(w(),O(Ne,{key:1},[i.alwaysOn||c?(w(),G(Tu,Nn(ot({key:0},a)),{arrow:N(({style:f,side:d})=>[i.showArrow?(w(),G($u,ot({key:0},l,{style:f,side:d}),null,16,["style","side"])):Z("v-if",!0)]),default:N(()=>[ie(i.$slots,"default")]),_:3},16)):Z("v-if",!0)],64))],8,["to","disabled"]))]),_:3},16))}});var rM=he(sM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/tooltip.vue"]]);const iM=Qe(rM),ap="left-check-change",sp="right-check-change",Bl=ge({data:{type:te(Array),default:()=>[]},titles:{type:te(Array),default:()=>[]},buttonTexts:{type:te(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:te(Function)},leftDefaultChecked:{type:te(Array),default:()=>[]},rightDefaultChecked:{type:te(Array),default:()=>[]},renderContent:{type:te(Function)},modelValue:{type:te(Array),default:()=>[]},format:{type:te(Object),default:()=>({})},filterable:Boolean,props:{type:te(Object),default:()=>Ot({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),Js=(e,t)=>[e,t].every(et)||et(e)&&Ht(t),uM={[Mt]:(e,t,n)=>[e,n].every(et)&&["left","right"].includes(t),[tt]:e=>et(e),[ap]:Js,[sp]:Js},Qs="checked-change",cM=ge({data:Bl.data,optionRender:{type:te(Function)},placeholder:String,title:String,filterable:Boolean,format:Bl.format,filterMethod:Bl.filterMethod,defaultChecked:Bl.leftDefaultChecked,props:Bl.props}),dM={[Qs]:Js},Fo=e=>{const t={label:"label",key:"key",disabled:"disabled"};return S(()=>({...t,...e.props}))},fM=(e,t,n)=>{const l=Fo(e),a=S(()=>e.data.filter(f=>kt(e.filterMethod)?e.filterMethod(t.query,f):String(f[l.value.label]||f[l.value.key]).toLowerCase().includes(t.query.toLowerCase()))),s=S(()=>a.value.filter(f=>!f[l.value.disabled])),r=S(()=>{const f=t.checked.length,d=e.data.length,{noChecked:p,hasChecked:m}=e.format;return p&&m?f>0?m.replace(/\${checked}/g,f.toString()).replace(/\${total}/g,d.toString()):p.replace(/\${total}/g,d.toString()):`${f}/${d}`}),i=S(()=>{const f=t.checked.length;return f>0&&f<s.value.length}),u=()=>{const f=s.value.map(d=>d[l.value.key]);t.allChecked=f.length>0&&f.every(d=>t.checked.includes(d))},c=f=>{t.checked=f?s.value.map(d=>d[l.value.key]):[]};return ue(()=>t.checked,(f,d)=>{if(u(),t.checkChangeByUser){const p=f.concat(d).filter(m=>!f.includes(m)||!d.includes(m));n(Qs,f,p)}else n(Qs,f),t.checkChangeByUser=!0}),ue(s,()=>{u()}),ue(()=>e.data,()=>{const f=[],d=a.value.map(p=>p[l.value.key]);t.checked.forEach(p=>{d.includes(p)&&f.push(p)}),t.checkChangeByUser=!1,t.checked=f}),ue(()=>e.defaultChecked,(f,d)=>{if(d&&f.length===d.length&&f.every(h=>d.includes(h)))return;const p=[],m=s.value.map(h=>h[l.value.key]);f.forEach(h=>{m.includes(h)&&p.push(h)}),t.checkChangeByUser=!1,t.checked=p},{immediate:!0}),{filteredData:a,checkableData:s,checkedSummary:r,isIndeterminate:i,updateAllChecked:u,handleAllCheckedChange:c}},pM=(e,t)=>({onSourceCheckedChange:(a,s)=>{e.leftChecked=a,s&&t(ap,a,s)},onTargetCheckedChange:(a,s)=>{e.rightChecked=a,s&&t(sp,a,s)}}),vM=e=>{const t=Fo(e),n=S(()=>e.data.reduce((s,r)=>(s[r[t.value.key]]=r)&&s,{})),l=S(()=>e.data.filter(s=>!e.modelValue.includes(s[t.value.key]))),a=S(()=>e.targetOrder==="original"?e.data.filter(s=>e.modelValue.includes(s[t.value.key])):e.modelValue.reduce((s,r)=>{const i=n.value[r];return i&&s.push(i),s},[]));return{sourceData:l,targetData:a}},mM=(e,t,n)=>{const l=Fo(e),a=(i,u,c)=>{n(tt,i),n(Mt,i,u,c)};return{addToLeft:()=>{const i=e.modelValue.slice();t.rightChecked.forEach(u=>{const c=i.indexOf(u);c>-1&&i.splice(c,1)}),a(i,"left",t.rightChecked)},addToRight:()=>{let i=e.modelValue.slice();const u=e.data.filter(c=>{const f=c[l.value.key];return t.leftChecked.includes(f)&&!e.modelValue.includes(f)}).map(c=>c[l.value.key]);i=e.targetOrder==="unshift"?u.concat(i):i.concat(u),e.targetOrder==="original"&&(i=e.data.filter(c=>i.includes(c[l.value.key])).map(c=>c[l.value.key])),a(i,"right",t.leftChecked)}}},hM=j({name:"ElTransferPanel"}),gM=j({...hM,props:cM,emits:dM,setup(e,{expose:t,emit:n}){const l=e,a=Qt(),s=({option:b})=>b,{t:r}=ht(),i=ce("transfer"),u=St({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),c=Fo(l),{filteredData:f,checkedSummary:d,isIndeterminate:p,handleAllCheckedChange:m}=fM(l,u,n),h=S(()=>!wn(u.query)&&wn(f.value)),v=S(()=>!wn(a.default()[0].children)),{checked:g,allChecked:y,query:k}=Gt(u);return t({query:k}),(b,C)=>(w(),O("div",{class:$(o(i).b("panel"))},[R("p",{class:$(o(i).be("panel","header"))},[E(o($n),{modelValue:o(y),"onUpdate:modelValue":C[0]||(C[0]=I=>bt(y)?y.value=I:null),indeterminate:o(p),"validate-event":!1,onChange:o(m)},{default:N(()=>[ye(ae(b.title)+" ",1),R("span",null,ae(o(d)),1)]),_:1},8,["modelValue","indeterminate","onChange"])],2),R("div",{class:$([o(i).be("panel","body"),o(i).is("with-footer",o(v))])},[b.filterable?(w(),G(o(on),{key:0,modelValue:o(k),"onUpdate:modelValue":C[1]||(C[1]=I=>bt(k)?k.value=I:null),class:$(o(i).be("panel","filter")),size:"default",placeholder:b.placeholder,"prefix-icon":o(yr),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):Z("v-if",!0),xe(E(o(yd),{modelValue:o(g),"onUpdate:modelValue":C[2]||(C[2]=I=>bt(g)?g.value=I:null),"validate-event":!1,class:$([o(i).is("filterable",b.filterable),o(i).be("panel","list")])},{default:N(()=>[(w(!0),O(Ne,null,Ze(o(f),I=>(w(),G(o($n),{key:I[o(c).key],class:$(o(i).be("panel","item")),label:I[o(c).key],disabled:I[o(c).disabled],"validate-event":!1},{default:N(()=>{var T;return[E(s,{option:(T=b.optionRender)==null?void 0:T.call(b,I)},null,8,["option"])]}),_:2},1032,["class","label","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[lt,!o(h)&&!o(wn)(b.data)]]),xe(R("p",{class:$(o(i).be("panel","empty"))},ae(o(h)?o(r)("el.transfer.noMatch"):o(r)("el.transfer.noData")),3),[[lt,o(h)||o(wn)(b.data)]])],2),o(v)?(w(),O("p",{key:0,class:$(o(i).be("panel","footer"))},[ie(b.$slots,"default")],2)):Z("v-if",!0)],2))}});var Iu=he(gM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer-panel.vue"]]);const yM={key:0},bM={key:0},wM=j({name:"ElTransfer"}),kM=j({...wM,props:Bl,emits:uM,setup(e,{expose:t,emit:n}){const l=e,a=Qt(),{t:s}=ht(),r=ce("transfer"),{formItem:i}=fn(),u=St({leftChecked:[],rightChecked:[]}),c=Fo(l),{sourceData:f,targetData:d}=vM(l),{onSourceCheckedChange:p,onTargetCheckedChange:m}=pM(u,n),{addToLeft:h,addToRight:v}=mM(l,u,n),g=_(),y=_(),k=L=>{switch(L){case"left":g.value.query="";break;case"right":y.value.query="";break}},b=S(()=>l.buttonTexts.length===2),C=S(()=>l.titles[0]||s("el.transfer.titles.0")),I=S(()=>l.titles[1]||s("el.transfer.titles.1")),T=S(()=>l.filterPlaceholder||s("el.transfer.filterPlaceholder"));ue(()=>l.modelValue,()=>{var L;l.validateEvent&&((L=i==null?void 0:i.validate)==null||L.call(i,"change").catch(A=>void 0))});const M=S(()=>L=>l.renderContent?l.renderContent(De,L):a.default?a.default({option:L}):De("span",L[c.value.label]||L[c.value.key]));return t({clearQuery:k,leftPanel:g,rightPanel:y}),(L,A)=>(w(),O("div",{class:$(o(r).b())},[E(Iu,{ref_key:"leftPanel",ref:g,data:o(f),"option-render":o(M),placeholder:o(T),title:o(C),filterable:L.filterable,format:L.format,"filter-method":L.filterMethod,"default-checked":L.leftDefaultChecked,props:l.props,onCheckedChange:o(p)},{default:N(()=>[ie(L.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),R("div",{class:$(o(r).e("buttons"))},[E(o(tn),{type:"primary",class:$([o(r).e("button"),o(r).is("with-texts",o(b))]),disabled:o(wn)(u.rightChecked),onClick:o(h)},{default:N(()=>[E(o(Pe),null,{default:N(()=>[E(o(sl))]),_:1}),o(Yt)(L.buttonTexts[0])?Z("v-if",!0):(w(),O("span",yM,ae(L.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),E(o(tn),{type:"primary",class:$([o(r).e("button"),o(r).is("with-texts",o(b))]),disabled:o(wn)(u.leftChecked),onClick:o(v)},{default:N(()=>[o(Yt)(L.buttonTexts[1])?Z("v-if",!0):(w(),O("span",bM,ae(L.buttonTexts[1]),1)),E(o(Pe),null,{default:N(()=>[E(o(sn))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),E(Iu,{ref_key:"rightPanel",ref:y,data:o(d),"option-render":o(M),placeholder:o(T),filterable:L.filterable,format:L.format,"filter-method":L.filterMethod,title:o(I),"default-checked":L.rightDefaultChecked,props:l.props,onCheckedChange:o(m)},{default:N(()=>[ie(L.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});var CM=he(kM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer.vue"]]);const SM=Qe(CM),jl="$treeNodeId",Nu=function(e,t){!t||t[jl]||Object.defineProperty(t,jl,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},ii=function(e,t){return e?t[e]:t[jl]},er=(e,t,n)=>{const l=e.value.currentNode;n();const a=e.value.currentNode;l!==a&&t("current-change",a?a.data:null,a)},tr=e=>{let t=!0,n=!0,l=!0;for(let a=0,s=e.length;a<s;a++){const r=e[a];(r.checked!==!0||r.indeterminate)&&(t=!1,r.disabled||(l=!1)),(r.checked!==!1||r.indeterminate)&&(n=!1)}return{all:t,none:n,allWithoutDisable:l,half:!t&&!n}},ma=function(e){if(e.childNodes.length===0||e.loading)return;const{all:t,none:n,half:l}=tr(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):l?(e.checked=!1,e.indeterminate=!0):n&&(e.checked=!1,e.indeterminate=!1);const a=e.parent;!a||a.level===0||e.store.checkStrictly||ma(a)},Jo=function(e,t){const n=e.store.props,l=e.data||{},a=n[t];if(typeof a=="function")return a(l,e);if(typeof a=="string")return l[a];if(typeof a>"u"){const s=l[t];return s===void 0?"":s}};let _M=0;class Cl{constructor(t){this.id=_M++,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)nn(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(){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=Jo(this,"isLeaf");typeof s=="boolean"&&(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.expand(),Array.isArray(this.data)||Nu(this,this.data),!this.data)return;const l=t.defaultExpandedKeys,a=t.key;a&&l&&l.includes(this.key)&&this.expand(null,t.autoExpandParent),a&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(t){Array.isArray(t)||Nu(this,t),this.data=t,this.childNodes=[];let n;this.level===0&&Array.isArray(this.data)?n=this.data:n=Jo(this,"children")||[];for(let l=0,a=n.length;l<a;l++)this.insertChild({data:n[l]})}get label(){return Jo(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return Jo(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-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(l=>l===t||n&&l.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,n,l){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof Cl)){if(!l){const a=this.getChildren(!0);a.includes(t.data)||(typeof n>"u"||n<0?a.push(t.data):a.splice(n,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=St(new Cl(t)),t instanceof Cl&&t.initialize()}t.level=this.level+1,typeof n>"u"||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}insertBefore(t,n){let l;n&&(l=this.childNodes.indexOf(n)),this.insertChild(t,l)}insertAfter(t,n){let l;n&&(l=this.childNodes.indexOf(n),l!==-1&&(l+=1)),this.insertChild(t,l)}removeChild(t){const n=this.getChildren()||[],l=n.indexOf(t.data);l>-1&&n.splice(l,1);const a=this.childNodes.indexOf(t);a>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(a,1)),this.updateLeafState()}removeChildByData(t){let n=null;for(let l=0;l<this.childNodes.length;l++)if(this.childNodes[l].data===t){n=this.childNodes[l];break}n&&this.removeChild(n)}expand(t,n){const l=()=>{if(n){let a=this.parent;for(;a.level>0;)a.expanded=!0,a=a.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(a=>{a.canFocus=!0})};this.shouldLoadData()?this.loadData(a=>{Array.isArray(a)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||ma(this),l())}):l()}doCreateChildren(t,n={}){t.forEach(l=>{this.insertChild(Object.assign({data:l},n),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!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;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0;return}this.isLeaf=!1}setChecked(t,n,l,a){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:r,allWithoutDisable:i}=tr(this.childNodes);!this.isLeaf&&!r&&i&&(this.checked=!1,t=!1);const u=()=>{if(n){const c=this.childNodes;for(let p=0,m=c.length;p<m;p++){const h=c[p];a=a||t!==!1;const v=h.disabled?h.checked:a;h.setChecked(v,n,!0,a)}const{half:f,all:d}=tr(c);d||(this.checked=d,this.indeterminate=f)}};if(this.shouldLoadData()){this.loadData(()=>{u(),ma(this)},{checked:t!==!1});return}else u()}const s=this.parent;!s||s.level===0||l||ma(s)}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const l=this.store.props;let a="children";return l&&(a=l.children||"children"),n[a]===void 0&&(n[a]=null),t&&!n[a]&&(n[a]=[]),n[a]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(s=>s.data),l={},a=[];t.forEach((s,r)=>{const i=s[jl];!!i&&n.findIndex(c=>c[jl]===i)>=0?l[i]={index:r,data:s}:a.push({index:r,data:s})}),this.store.lazy||n.forEach(s=>{l[s[jl]]||this.removeChildByData(s)}),a.forEach(({index:s,data:r})=>{this.insertChild({data:r},s)}),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 l=a=>{this.childNodes=[],this.doCreateChildren(a,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,a)};this.store.load(this,l)}else t&&t.call(this)}}class EM{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const n in t)nn(t,n)&&(this[n]=t[n]);this.nodesMap={}}initialize(){if(this.root=new Cl({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,n=>{this.root.doCreateChildren(n),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(t){const n=this.filterNodeMethod,l=this.lazy,a=function(s){const r=s.root?s.root.childNodes:s.childNodes;if(r.forEach(i=>{i.visible=n.call(i,t,i.data,i),a(i)}),!s.visible&&r.length){let i=!0;i=!r.some(u=>u.visible),s.root?s.root.visible=i===!1:s.visible=i===!1}t&&s.visible&&!s.isLeaf&&!l&&s.expand()};a(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof Cl)return t;const n=It(t)?ii(this.key,t):t;return this.nodesMap[n]||null}insertBefore(t,n){const l=this.getNode(n);l.parent.insertBefore({data:t},l)}insertAfter(t,n){const l=this.getNode(n);l.parent.insertAfter({data:t},l)}remove(t){const n=this.getNode(t);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(t,n){const l=n?this.getNode(n):this.root;l&&l.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],n=this.nodesMap;t.forEach(l=>{const a=n[l];a&&a.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const n=this.key;!t||!t.data||(n?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(l=>{this.deregisterNode(l)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,n=!1){const l=[],a=function(s){(s.root?s.root.childNodes:s.childNodes).forEach(i=>{(i.checked||n&&i.indeterminate)&&(!t||t&&i.isLeaf)&&l.push(i.data),a(i)})};return a(this),l}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const t=[],n=function(l){(l.root?l.root.childNodes:l.childNodes).forEach(s=>{s.indeterminate&&t.push(s.data),n(s)})};return n(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],n=this.nodesMap;for(const l in n)nn(n,l)&&t.push(n[l]);return t}updateChildren(t,n){const l=this.nodesMap[t];if(!l)return;const a=l.childNodes;for(let s=a.length-1;s>=0;s--){const r=a[s];this.remove(r.data)}for(let s=0,r=n.length;s<r;s++){const i=n[s];this.append(i,l.data)}}_setCheckedKeys(t,n=!1,l){const a=this._getAllNodes().sort((i,u)=>u.level-i.level),s=Object.create(null),r=Object.keys(l);a.forEach(i=>i.setChecked(!1,!1));for(let i=0,u=a.length;i<u;i++){const c=a[i],f=c.data[t].toString();if(!r.includes(f)){c.checked&&!s[f]&&c.setChecked(!1,!1);continue}let p=c.parent;for(;p&&p.level>0;)s[p.data[t]]=!0,p=p.parent;if(c.isLeaf||this.checkStrictly){c.setChecked(!0,!1);continue}if(c.setChecked(!0,!0),n){c.setChecked(!1,!1);const m=function(h){h.childNodes.forEach(g=>{g.isLeaf||g.setChecked(!1,!1),m(g)})};m(c)}}}setCheckedNodes(t,n=!1){const l=this.key,a={};t.forEach(s=>{a[(s||{})[l]]=!0}),this._setCheckedKeys(l,n,a)}setCheckedKeys(t,n=!1){this.defaultCheckedKeys=t;const l=this.key,a={};t.forEach(s=>{a[s]=!0}),this._setCheckedKeys(l,n,a)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(n=>{const l=this.getNode(n);l&&l.expand(null,this.autoExpandParent)})}setChecked(t,n,l){const a=this.getNode(t);a&&a.setChecked(!!n,l)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const n=this.currentNode;n&&(n.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,n=!0){const l=t[this.key],a=this.nodesMap[l];this.setCurrentNode(a),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,n=!0){if(t==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const l=this.getNode(t);l&&(this.setCurrentNode(l),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const $M=j({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=ce("tree"),n=Me("NodeInstance"),l=Me("RootTree");return()=>{const a=e.node,{data:s,store:r}=a;return e.renderContent?e.renderContent(De,{_self:n,node:a,data:s,store:r}):l.ctx.slots.default?l.ctx.slots.default({node:a,data:s}):De("span",{class:t.be("node","label")},[a.label])}}});var TM=he($M,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node-content.vue"]]);function rp(e){const t=Me("TreeNodeMap",null),n={treeNodeExpand:l=>{e.node!==l&&e.node.collapse()},children:[]};return t&&t.children.push(n),dt("TreeNodeMap",n),{broadcastExpanded:l=>{if(e.accordion)for(const a of n.children)a.treeNodeExpand(l)}}}const ip=Symbol("dragEvents");function IM({props:e,ctx:t,el$:n,dropIndicator$:l,store:a}){const s=ce("tree"),r=_({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return dt(ip,{treeNodeDragStart:({event:f,treeNode:d})=>{if(typeof e.allowDrag=="function"&&!e.allowDrag(d.node))return f.preventDefault(),!1;f.dataTransfer.effectAllowed="move";try{f.dataTransfer.setData("text/plain","")}catch{}r.value.draggingNode=d,t.emit("node-drag-start",d.node,f)},treeNodeDragOver:({event:f,treeNode:d})=>{const p=d,m=r.value.dropNode;m&&m.node.id!==p.node.id&&mn(m.$el,s.is("drop-inner"));const h=r.value.draggingNode;if(!h||!p)return;let v=!0,g=!0,y=!0,k=!0;typeof e.allowDrop=="function"&&(v=e.allowDrop(h.node,p.node,"prev"),k=g=e.allowDrop(h.node,p.node,"inner"),y=e.allowDrop(h.node,p.node,"next")),f.dataTransfer.dropEffect=g||v||y?"move":"none",(v||g||y)&&(m==null?void 0:m.node.id)!==p.node.id&&(m&&t.emit("node-drag-leave",h.node,m.node,f),t.emit("node-drag-enter",h.node,p.node,f)),(v||g||y)&&(r.value.dropNode=p),p.node.nextSibling===h.node&&(y=!1),p.node.previousSibling===h.node&&(v=!1),p.node.contains(h.node,!1)&&(g=!1),(h.node===p.node||h.node.contains(p.node))&&(v=!1,g=!1,y=!1);const b=p.$el.getBoundingClientRect(),C=n.value.getBoundingClientRect();let I;const T=v?g?.25:y?.45:1:-1,M=y?g?.75:v?.55:0:1;let L=-9999;const A=f.clientY-b.top;A<b.height*T?I="before":A>b.height*M?I="after":g?I="inner":I="none";const D=p.$el.querySelector(`.${s.be("node","expand-icon")}`).getBoundingClientRect(),B=l.value;I==="before"?L=D.top-C.top:I==="after"&&(L=D.bottom-C.top),B.style.top=`${L}px`,B.style.left=`${D.right-C.left}px`,I==="inner"?Dn(p.$el,s.is("drop-inner")):mn(p.$el,s.is("drop-inner")),r.value.showDropIndicator=I==="before"||I==="after",r.value.allowDrop=r.value.showDropIndicator||k,r.value.dropType=I,t.emit("node-drag-over",h.node,p.node,f)},treeNodeDragEnd:f=>{const{draggingNode:d,dropType:p,dropNode:m}=r.value;if(f.preventDefault(),f.dataTransfer.dropEffect="move",d&&m){const h={data:d.node.data};p!=="none"&&d.node.remove(),p==="before"?m.node.parent.insertBefore(h,m.node):p==="after"?m.node.parent.insertAfter(h,m.node):p==="inner"&&m.node.insertChild(h),p!=="none"&&a.value.registerNode(h),mn(m.$el,s.is("drop-inner")),t.emit("node-drag-end",d.node,m.node,p,f),p!=="none"&&t.emit("node-drop",d.node,m.node,p,f)}d&&!m&&t.emit("node-drag-end",d.node,null,p,f),r.value.showDropIndicator=!1,r.value.draggingNode=null,r.value.dropNode=null,r.value.allowDrop=!0}}),{dragState:r}}const NM=j({name:"ElTreeNode",components:{ElCollapseTransition:es,ElCheckbox:$n,NodeContent:TM,ElIcon:Pe,Loading:Xn},props:{node:{type:Cl,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const n=ce("tree"),{broadcastExpanded:l}=rp(e),a=Me("RootTree"),s=_(!1),r=_(!1),i=_(null),u=_(null),c=_(null),f=Me(ip),d=at();dt("NodeInstance",d),e.node.expanded&&(s.value=!0,r.value=!0);const p=a.props.children||"children";ue(()=>{const A=e.node.data[p];return A&&[...A]},()=>{e.node.updateChildren()}),ue(()=>e.node.indeterminate,A=>{v(e.node.checked,A)}),ue(()=>e.node.checked,A=>{v(A,e.node.indeterminate)}),ue(()=>e.node.expanded,A=>{Le(()=>s.value=A),A&&(r.value=!0)});const m=A=>ii(a.props.nodeKey,A.data),h=A=>{const D=e.props.class;if(!D)return{};let B;if(kt(D)){const{data:F}=A;B=D(F,A)}else B=D;return ct(B)?{[B]:!0}:B},v=(A,D)=>{(i.value!==A||u.value!==D)&&a.ctx.emit("check-change",e.node.data,A,D),i.value=A,u.value=D},g=A=>{er(a.store,a.ctx.emit,()=>a.store.value.setCurrentNode(e.node)),a.currentNode.value=e.node,a.props.expandOnClickNode&&k(),a.props.checkOnClickNode&&!e.node.disabled&&b(null,{target:{checked:!e.node.checked}}),a.ctx.emit("node-click",e.node.data,e.node,d,A)},y=A=>{a.instance.vnode.props.onNodeContextmenu&&(A.stopPropagation(),A.preventDefault()),a.ctx.emit("node-contextmenu",A,e.node.data,e.node,d)},k=()=>{e.node.isLeaf||(s.value?(a.ctx.emit("node-collapse",e.node.data,e.node,d),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,d)))},b=(A,D)=>{e.node.setChecked(D.target.checked,!a.props.checkStrictly),Le(()=>{const B=a.store.value;a.ctx.emit("check",e.node.data,{checkedNodes:B.getCheckedNodes(),checkedKeys:B.getCheckedKeys(),halfCheckedNodes:B.getHalfCheckedNodes(),halfCheckedKeys:B.getHalfCheckedKeys()})})};return{ns:n,node$:c,tree:a,expanded:s,childNodeRendered:r,oldChecked:i,oldIndeterminate:u,getNodeKey:m,getNodeClass:h,handleSelectChange:v,handleClick:g,handleContextMenu:y,handleExpandIconClick:k,handleCheckChange:b,handleChildNodeExpand:(A,D,B)=>{l(D),a.ctx.emit("node-expand",A,D,B)},handleDragStart:A=>{a.props.draggable&&f.treeNodeDragStart({event:A,treeNode:e})},handleDragOver:A=>{A.preventDefault(),a.props.draggable&&f.treeNodeDragOver({event:A,treeNode:{$el:c.value,node:e.node}})},handleDrop:A=>{A.preventDefault()},handleDragEnd:A=>{a.props.draggable&&f.treeNodeDragEnd(A)},CaretRight:nc}}}),PM=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],MM=["aria-expanded"];function LM(e,t,n,l,a,s){const r=ee("el-icon"),i=ee("el-checkbox"),u=ee("loading"),c=ee("node-content"),f=ee("el-tree-node"),d=ee("el-collapse-transition");return xe((w(),O("div",{ref:"node$",class:$([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[1]||(t[1]=Fe((...p)=>e.handleClick&&e.handleClick(...p),["stop"])),onContextmenu:t[2]||(t[2]=(...p)=>e.handleContextMenu&&e.handleContextMenu(...p)),onDragstart:t[3]||(t[3]=Fe((...p)=>e.handleDragStart&&e.handleDragStart(...p),["stop"])),onDragover:t[4]||(t[4]=Fe((...p)=>e.handleDragOver&&e.handleDragOver(...p),["stop"])),onDragend:t[5]||(t[5]=Fe((...p)=>e.handleDragEnd&&e.handleDragEnd(...p),["stop"])),onDrop:t[6]||(t[6]=Fe((...p)=>e.handleDrop&&e.handleDrop(...p),["stop"]))},[R("div",{class:$(e.ns.be("node","content")),style:Re({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(w(),G(r,{key:0,class:$([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Fe(e.handleExpandIconClick,["stop"])},{default:N(()=>[(w(),G(rt(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):Z("v-if",!0),e.showCheckbox?(w(),G(i,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=Fe(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):Z("v-if",!0),e.node.loading?(w(),G(r,{key:2,class:$([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:N(()=>[E(u)]),_:1},8,["class"])):Z("v-if",!0),E(c,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),E(d,null,{default:N(()=>[!e.renderAfterExpand||e.childNodeRendered?xe((w(),O("div",{key:0,class:$(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(w(!0),O(Ne,null,Ze(e.node.childNodes,p=>(w(),G(f,{key:e.getNodeKey(p),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:p,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,MM)),[[lt,e.expanded]]):Z("v-if",!0)]),_:1})],42,PM)),[[lt,e.node.visible]])}var RM=he(NM,[["render",LM],["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node.vue"]]);function OM({el$:e},t){const n=ce("tree"),l=Nt([]),a=Nt([]);ze(()=>{r()}),Nl(()=>{l.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),a.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))}),ue(a,i=>{i.forEach(u=>{u.setAttribute("tabindex","-1")})}),Jt(e,"keydown",i=>{const u=i.target;if(!u.className.includes(n.b("node")))return;const c=i.code;l.value=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));const f=l.value.indexOf(u);let d;if([Ae.up,Ae.down].includes(c)){if(i.preventDefault(),c===Ae.up){d=f===-1?0:f!==0?f-1:l.value.length-1;const m=d;for(;!t.value.getNode(l.value[d].dataset.key).canFocus;){if(d--,d===m){d=-1;break}d<0&&(d=l.value.length-1)}}else{d=f===-1?0:f<l.value.length-1?f+1:0;const m=d;for(;!t.value.getNode(l.value[d].dataset.key).canFocus;){if(d++,d===m){d=-1;break}d>=l.value.length&&(d=0)}}d!==-1&&l.value[d].focus()}[Ae.left,Ae.right].includes(c)&&(i.preventDefault(),u.click());const p=u.querySelector('[type="checkbox"]');[Ae.enter,Ae.space].includes(c)&&p&&(i.preventDefault(),p.click())});const r=()=>{var i;l.value=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),a.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const u=e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(u.length){u[0].setAttribute("tabindex","0");return}(i=l.value[0])==null||i.setAttribute("tabindex","0")}}const AM=j({name:"ElTree",components:{ElTreeNode:RM},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:Pt}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:n}=ht(),l=ce("tree"),a=_(new EM({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}));a.value.initialize();const s=_(a.value.root),r=_(null),i=_(null),u=_(null),{broadcastExpanded:c}=rp(e),{dragState:f}=IM({props:e,ctx:t,el$:i,dropIndicator$:u,store:a});OM({el$:i},a);const d=S(()=>{const{childNodes:V}=s.value;return!V||V.length===0||V.every(({visible:W})=>!W)});ue(()=>e.currentNodeKey,V=>{a.value.setCurrentNodeKey(V)}),ue(()=>e.defaultCheckedKeys,V=>{a.value.setDefaultCheckedKey(V)}),ue(()=>e.defaultExpandedKeys,V=>{a.value.setDefaultExpandedKeys(V)}),ue(()=>e.data,V=>{a.value.setData(V)},{deep:!0}),ue(()=>e.checkStrictly,V=>{a.value.checkStrictly=V});const p=V=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");a.value.filter(V)},m=V=>ii(e.nodeKey,V.data),h=V=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const W=a.value.getNode(V);if(!W)return[];const P=[W.data];let H=W.parent;for(;H&&H!==s.value;)P.push(H.data),H=H.parent;return P.reverse()},v=(V,W)=>a.value.getCheckedNodes(V,W),g=V=>a.value.getCheckedKeys(V),y=()=>{const V=a.value.getCurrentNode();return V?V.data:null},k=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const V=y();return V?V[e.nodeKey]:null},b=(V,W)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");a.value.setCheckedNodes(V,W)},C=(V,W)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");a.value.setCheckedKeys(V,W)},I=(V,W,P)=>{a.value.setChecked(V,W,P)},T=()=>a.value.getHalfCheckedNodes(),M=()=>a.value.getHalfCheckedKeys(),L=(V,W=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");er(a,t.emit,()=>a.value.setUserCurrentNode(V,W))},A=(V,W=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");er(a,t.emit,()=>a.value.setCurrentNodeKey(V,W))},D=V=>a.value.getNode(V),B=V=>{a.value.remove(V)},F=(V,W)=>{a.value.append(V,W)},x=(V,W)=>{a.value.insertBefore(V,W)},U=(V,W)=>{a.value.insertAfter(V,W)},X=(V,W,P)=>{c(W),t.emit("node-expand",V,W,P)},K=(V,W)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");a.value.updateChildren(V,W)};return dt("RootTree",{ctx:t,props:e,store:a,root:s,currentNode:r,instance:at()}),dt(zn,void 0),{ns:l,store:a,root:s,currentNode:r,dragState:f,el$:i,dropIndicator$:u,isEmpty:d,filter:p,getNodeKey:m,getNodePath:h,getCheckedNodes:v,getCheckedKeys:g,getCurrentNode:y,getCurrentKey:k,setCheckedNodes:b,setCheckedKeys:C,setChecked:I,getHalfCheckedNodes:T,getHalfCheckedKeys:M,setCurrentNode:L,setCurrentKey:A,t:n,getNode:D,remove:B,append:F,insertBefore:x,insertAfter:U,handleNodeExpand:X,updateKeyChildren:K}}});function VM(e,t,n,l,a,s){const r=ee("el-tree-node");return w(),O("div",{ref:"el$",class:$([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"},[(w(!0),O(Ne,null,Ze(e.root.childNodes,i=>(w(),G(r,{key:e.getNodeKey(i),node:i,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?(w(),O("div",{key:0,class:$(e.ns.e("empty-block"))},[ie(e.$slots,"empty",{},()=>{var i;return[R("span",{class:$(e.ns.e("empty-text"))},ae((i=e.emptyText)!=null?i:e.t("el.tree.emptyText")),3)]})],2)):Z("v-if",!0),xe(R("div",{ref:"dropIndicator$",class:$(e.ns.e("drop-indicator"))},null,2),[[lt,e.dragState.showDropIndicator]])],2)}var ha=he(AM,[["render",VM],["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree.vue"]]);ha.install=e=>{e.component(ha.name,ha)};const Aa=ha,DM=Aa,BM=(e,{attrs:t},{tree:n,key:l})=>{const a=ce("tree-select"),s={...qn(Gt(e),Object.keys(El.props)),...t,valueKey:l,popperClass:S(()=>{const r=[a.e("popper")];return e.popperClass&&r.push(e.popperClass),r.join(" ")}),filterMethod:(r="")=>{e.filterMethod&&e.filterMethod(r),Le(()=>{var i;(i=n.value)==null||i.filter(r)})},onVisibleChange:r=>{var i;(i=t.onVisibleChange)==null||i.call(t,r),e.filterable&&r&&s.filterMethod()}};return s},xM=j({extends:Ta,setup(e,t){const n=Ta.setup(e,t);delete n.selectOptionClick;const l=at().proxy;return Le(()=>{n.select.cachedOptions.get(l.value)||n.select.onOptionCreate(l)}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function nr(e){return e||e===0}function ui(e){return Array.isArray(e)&&e.length}function po(e){return Array.isArray(e)?e:nr(e)?[e]:[]}function ga(e,t,n,l,a){for(let s=0;s<e.length;s++){const r=e[s];if(t(r,s,e,a))return l?l(r,s,e,a):r;{const i=n(r);if(ui(i)){const u=ga(i,t,n,l,r);if(u)return u}}}}function up(e,t,n,l){for(let a=0;a<e.length;a++){const s=e[a];t(s,a,e,l);const r=n(s);ui(r)&&up(r,t,n,s)}}const FM=(e,{attrs:t,slots:n,emit:l},{select:a,tree:s,key:r})=>{ue(()=>e.modelValue,()=>{e.showCheckbox&&Le(()=>{const p=s.value;p&&!vn(p.getCheckedKeys(),po(e.modelValue))&&p.setCheckedKeys(po(e.modelValue))})},{immediate:!0,deep:!0});const i=S(()=>({value:r.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props})),u=(p,m)=>{var h;const v=i.value[p];return kt(v)?v(m,(h=s.value)==null?void 0:h.getNode(u("value",m))):m[v]},c=po(e.modelValue).map(p=>ga(e.data||[],m=>u("value",m)===p,m=>u("children",m),(m,h,v,g)=>g&&u("value",g))).filter(p=>nr(p)),f=S(()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const p=[];return up(e.data.concat(e.cacheData),m=>{const h=u("value",m);p.push({value:h,currentLabel:u("label",m),isDisabled:u("disabled",m)})},m=>u("children",m)),p}),d=S(()=>f.value.reduce((p,m)=>({...p,[m.value]:m}),{}));return{...qn(Gt(e),Object.keys(Aa.props)),...t,nodeKey:r,expandOnClickNode:S(()=>!e.checkStrictly&&e.expandOnClickNode),defaultExpandedKeys:S(()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(c):c),renderContent:(p,{node:m,data:h,store:v})=>p(xM,{value:u("value",h),label:u("label",h),disabled:u("disabled",h)},e.renderContent?()=>e.renderContent(p,{node:m,data:h,store:v}):n.default?()=>n.default({node:m,data:h,store:v}):void 0),filterNodeMethod:(p,m,h)=>{var v;return e.filterNodeMethod?e.filterNodeMethod(p,m,h):p?(v=u("label",m))==null?void 0:v.includes(p):!0},onNodeClick:(p,m,h)=>{var v,g,y;if((v=t.onNodeClick)==null||v.call(t,p,m,h),!(e.showCheckbox&&e.checkOnClickNode))if(!e.showCheckbox&&(e.checkStrictly||m.isLeaf)){if(!u("disabled",p)){const k=(g=a.value)==null?void 0:g.options.get(u("value",p));(y=a.value)==null||y.handleOptionSelect(k)}}else e.expandOnClickNode&&h.proxy.handleExpandIconClick()},onCheck:(p,m)=>{if(!e.showCheckbox)return;const h=u("value",p),v=m.checkedKeys,g=e.multiple?po(e.modelValue).filter(k=>k in d.value&&!s.value.getNode(k)&&!v.includes(k)):[],y=v.concat(g);if(e.checkStrictly)l(tt,e.multiple?y:y.includes(h)?h:void 0);else if(e.multiple)l(tt,s.value.getCheckedKeys(!0));else{const k=ga([p],I=>!ui(u("children",I))&&!u("disabled",I),I=>u("children",I)),b=k?u("value",k):void 0,C=nr(e.modelValue)&&!!ga([p],I=>u("value",I)===e.modelValue,I=>u("children",I));l(tt,b===e.modelValue||C?void 0:b)}Le(()=>{var k;const b=po(e.modelValue);s.value.setCheckedKeys(b),(k=t.onCheck)==null||k.call(t,p,{checkedKeys:s.value.getCheckedKeys(),checkedNodes:s.value.getCheckedNodes(),halfCheckedKeys:s.value.getHalfCheckedKeys(),halfCheckedNodes:s.value.getHalfCheckedNodes()})})},cacheOptions:f}};var zM=j({props:{data:{type:Array,default:()=>[]}},setup(e){const t=Me(Bo);return ue(()=>e.data,()=>{var n;e.data.forEach(a=>{t.cachedOptions.has(a.value)||t.cachedOptions.set(a.value,a)});const l=((n=t.selectWrapper)==null?void 0:n.querySelectorAll("input"))||[];Array.from(l).includes(document.activeElement)||t.setSelected()},{flush:"post",immediate:!0}),()=>{}}});const HM=j({name:"ElTreeSelect",inheritAttrs:!1,props:{...El.props,...Aa.props,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:n,expose:l}=t,a=_(),s=_(),r=S(()=>e.nodeKey||e.valueKey||"value"),i=BM(e,t,{select:a,tree:s,key:r}),{cacheOptions:u,...c}=FM(e,t,{select:a,tree:s,key:r}),f=St({});return l(f),ze(()=>{Object.assign(f,{...qn(s.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...qn(a.value,["focus","blur"])})}),()=>De(El,St({...i,ref:d=>a.value=d}),{...n,default:()=>[De(zM,{data:u.value}),De(Aa,St({...c,ref:d=>s.value=d}))]})}});var ya=he(HM,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-select/src/tree-select.vue"]]);ya.install=e=>{e.component(ya.name,ya)};const KM=ya,WM=KM,ci=Symbol(),UM={key:-1,level:-1,data:{}};var mo=(e=>(e.KEY="id",e.LABEL="label",e.CHILDREN="children",e.DISABLED="disabled",e))(mo||{}),lr=(e=>(e.ADD="add",e.DELETE="delete",e))(lr||{});const cp={type:Number,default:26},jM=ge({data:{type:te(Array),default:()=>Ot([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:te(Object),default:()=>Ot({children:"children",label:"label",disabled:"disabled",value:"id"})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:te(Array),default:()=>Ot([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:te(Array),default:()=>Ot([])},indent:{type:Number,default:16},itemSize:cp,icon:{type:Pt},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:te([String,Number])},accordion:{type:Boolean,default:!1},filterMethod:{type:te(Function)},perfMode:{type:Boolean,default:!0}}),qM=ge({node:{type:te(Object),default:()=>Ot(UM)},expanded:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},current:{type:Boolean,default:!1},hiddenExpandIcon:{type:Boolean,default:!1},itemSize:cp}),GM=ge({node:{type:te(Object),required:!0}}),dp="node-click",fp="node-expand",pp="node-collapse",vp="current-change",mp="check",hp="check-change",gp="node-contextmenu",YM={[dp]:(e,t,n)=>e&&t&&n,[fp]:(e,t)=>e&&t,[pp]:(e,t)=>e&&t,[vp]:(e,t)=>e&&t,[mp]:(e,t)=>e&&t,[hp]:(e,t)=>e&&typeof t=="boolean",[gp]:(e,t,n)=>e&&t&&n},XM={click:(e,t)=>!!(e&&t),toggle:e=>!!e,check:(e,t)=>e&&typeof t=="boolean"};function ZM(e,t){const n=_(new Set),l=_(new Set),{emit:a}=at();ue([()=>t.value,()=>e.defaultCheckedKeys],()=>Le(()=>{k(e.defaultCheckedKeys)}),{immediate:!0});const s=()=>{if(!t.value||!e.showCheckbox||e.checkStrictly)return;const{levelTreeNodeMap:b,maxLevel:C}=t.value,I=n.value,T=new Set;for(let M=C-1;M>=1;--M){const L=b.get(M);L&&L.forEach(A=>{const D=A.children;if(D){let B=!0,F=!1;for(const x of D){const U=x.key;if(I.has(U))F=!0;else if(T.has(U)){B=!1,F=!0;break}else B=!1}B?I.add(A.key):F?(T.add(A.key),I.delete(A.key)):(I.delete(A.key),T.delete(A.key))}})}l.value=T},r=b=>n.value.has(b.key),i=b=>l.value.has(b.key),u=(b,C,I=!0)=>{const T=n.value,M=(L,A)=>{T[A?lr.ADD:lr.DELETE](L.key);const D=L.children;!e.checkStrictly&&D&&D.forEach(B=>{B.disabled||M(B,A)})};M(b,C),s(),I&&c(b,C)},c=(b,C)=>{const{checkedNodes:I,checkedKeys:T}=h(),{halfCheckedNodes:M,halfCheckedKeys:L}=v();a(mp,b.data,{checkedKeys:T,checkedNodes:I,halfCheckedKeys:L,halfCheckedNodes:M}),a(hp,b.data,C)};function f(b=!1){return h(b).checkedKeys}function d(b=!1){return h(b).checkedNodes}function p(){return v().halfCheckedKeys}function m(){return v().halfCheckedNodes}function h(b=!1){const C=[],I=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:T}=t.value;n.value.forEach(M=>{const L=T.get(M);L&&(!b||b&&L.isLeaf)&&(I.push(M),C.push(L.data))})}return{checkedKeys:I,checkedNodes:C}}function v(){const b=[],C=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:I}=t.value;l.value.forEach(T=>{const M=I.get(T);M&&(C.push(T),b.push(M.data))})}return{halfCheckedNodes:b,halfCheckedKeys:C}}function g(b){n.value.clear(),l.value.clear(),k(b)}function y(b,C){if(t!=null&&t.value&&e.showCheckbox){const I=t.value.treeNodeMap.get(b);I&&u(I,C,!1)}}function k(b){if(t!=null&&t.value){const{treeNodeMap:C}=t.value;if(e.showCheckbox&&C&&b)for(const I of b){const T=C.get(I);T&&!r(T)&&u(T,!0,!1)}}}return{updateCheckedKeys:s,toggleCheckbox:u,isChecked:r,isIndeterminate:i,getCheckedKeys:f,getCheckedNodes:d,getHalfCheckedKeys:p,getHalfCheckedNodes:m,setChecked:y,setCheckedKeys:g}}function JM(e,t){const n=_(new Set([])),l=_(new Set([])),a=S(()=>kt(e.filterMethod));function s(i){var u;if(!a.value)return;const c=new Set,f=l.value,d=n.value,p=[],m=((u=t.value)==null?void 0:u.treeNodes)||[],h=e.filterMethod;d.clear();function v(g){g.forEach(y=>{p.push(y),h!=null&&h(i,y.data)?p.forEach(b=>{c.add(b.key)}):y.isLeaf&&d.add(y.key);const k=y.children;if(k&&v(k),!y.isLeaf){if(!c.has(y.key))d.add(y.key);else if(k){let b=!0;for(const C of k)if(!d.has(C.key)){b=!1;break}b?f.add(y.key):f.delete(y.key)}}p.pop()})}return v(m),c}function r(i){return l.value.has(i.key)}return{hiddenExpandIconKeySet:l,hiddenNodeKeySet:n,doFilter:s,isForceHiddenExpandIcon:r}}function QM(e,t){const n=_(new Set(e.defaultExpandedKeys)),l=_(),a=Nt();ue(()=>e.currentNodeKey,Q=>{l.value=Q},{immediate:!0}),ue(()=>e.data,Q=>{oe(Q)},{immediate:!0});const{isIndeterminate:s,isChecked:r,toggleCheckbox:i,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:f,getHalfCheckedNodes:d,setChecked:p,setCheckedKeys:m}=ZM(e,a),{doFilter:h,hiddenNodeKeySet:v,isForceHiddenExpandIcon:g}=JM(e,a),y=S(()=>{var Q;return((Q=e.props)==null?void 0:Q.value)||mo.KEY}),k=S(()=>{var Q;return((Q=e.props)==null?void 0:Q.children)||mo.CHILDREN}),b=S(()=>{var Q;return((Q=e.props)==null?void 0:Q.disabled)||mo.DISABLED}),C=S(()=>{var Q;return((Q=e.props)==null?void 0:Q.label)||mo.LABEL}),I=S(()=>{const Q=n.value,ve=v.value,_e=[],Te=a.value&&a.value.treeNodes||[];function Ie(){const Ke=[];for(let Ge=Te.length-1;Ge>=0;--Ge)Ke.push(Te[Ge]);for(;Ke.length;){const Ge=Ke.pop();if(Ge&&(ve.has(Ge.key)||_e.push(Ge),Q.has(Ge.key))){const qe=Ge.children;if(qe){const it=qe.length;for(let ke=it-1;ke>=0;--ke)Ke.push(qe[ke])}}}}return Ie(),_e}),T=S(()=>I.value.length>0);function M(Q){const ve=new Map,_e=new Map;let Te=1;function Ie(Ge,qe=1,it=void 0){var ke;const Ee=[];for(const Be of Ge){const Ve=D(Be),Ye={level:qe,key:Ve,data:Be};Ye.label=F(Be),Ye.parent=it;const Xe=A(Be);Ye.disabled=B(Be),Ye.isLeaf=!Xe||Xe.length===0,Xe&&Xe.length&&(Ye.children=Ie(Xe,qe+1,Ye)),Ee.push(Ye),ve.set(Ve,Ye),_e.has(qe)||_e.set(qe,[]),(ke=_e.get(qe))==null||ke.push(Ye)}return qe>Te&&(Te=qe),Ee}const Ke=Ie(Q);return{treeNodeMap:ve,levelTreeNodeMap:_e,maxLevel:Te,treeNodes:Ke}}function L(Q){const ve=h(Q);ve&&(n.value=ve)}function A(Q){return Q[k.value]}function D(Q){return Q?Q[y.value]:""}function B(Q){return Q[b.value]}function F(Q){return Q[C.value]}function x(Q){n.value.has(Q.key)?P(Q):W(Q)}function U(Q){n.value=new Set(Q)}function X(Q,ve){t(dp,Q.data,Q,ve),K(Q),e.expandOnClickNode&&x(Q),e.showCheckbox&&e.checkOnClickNode&&!Q.disabled&&i(Q,!r(Q),!0)}function K(Q){z(Q)||(l.value=Q.key,t(vp,Q.data,Q))}function V(Q,ve){i(Q,ve)}function W(Q){const ve=n.value;if(a.value&&e.accordion){const{treeNodeMap:_e}=a.value;ve.forEach(Te=>{const Ie=_e.get(Te);Q&&Q.level===(Ie==null?void 0:Ie.level)&&ve.delete(Te)})}ve.add(Q.key),t(fp,Q.data,Q)}function P(Q){n.value.delete(Q.key),t(pp,Q.data,Q)}function H(Q){return n.value.has(Q.key)}function Y(Q){return!!Q.disabled}function z(Q){const ve=l.value;return!!ve&&ve===Q.key}function q(){var Q,ve;if(l.value)return(ve=(Q=a.value)==null?void 0:Q.treeNodeMap.get(l.value))==null?void 0:ve.data}function se(){return l.value}function pe(Q){l.value=Q}function oe(Q){Le(()=>a.value=M(Q))}function re(Q){var ve;const _e=It(Q)?D(Q):Q;return(ve=a.value)==null?void 0:ve.treeNodeMap.get(_e)}return{tree:a,flattenTree:I,isNotEmpty:T,getKey:D,getChildren:A,toggleExpand:x,toggleCheckbox:i,isExpanded:H,isChecked:r,isIndeterminate:s,isDisabled:Y,isCurrent:z,isForceHiddenExpandIcon:g,handleNodeClick:X,handleNodeCheck:V,getCurrentNode:q,getCurrentKey:se,setCurrentKey:pe,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:f,getHalfCheckedNodes:d,setChecked:p,setCheckedKeys:m,filter:L,setData:oe,getNode:re,expandNode:W,collapseNode:P,setExpandedKeys:U}}var eL=j({name:"ElTreeNodeContent",props:GM,setup(e){const t=Me(ci),n=ce("tree");return()=>{const l=e.node,{data:a}=l;return t!=null&&t.ctx.slots.default?t.ctx.slots.default({node:l,data:a}):De("span",{class:n.be("node","label")},[l==null?void 0:l.label])}}});const tL=["aria-expanded","aria-disabled","aria-checked","data-key","onClick"],nL=j({name:"ElTreeNode"}),lL=j({...nL,props:qM,emits:XM,setup(e,{emit:t}){const n=e,l=Me(ci),a=ce("tree"),s=S(()=>{var d;return(d=l==null?void 0:l.props.indent)!=null?d:16}),r=S(()=>{var d;return(d=l==null?void 0:l.props.icon)!=null?d:nc}),i=d=>{t("click",n.node,d)},u=()=>{t("toggle",n.node)},c=d=>{t("check",n.node,d)},f=d=>{var p,m,h,v;(h=(m=(p=l==null?void 0:l.instance)==null?void 0:p.vnode)==null?void 0:m.props)!=null&&h.onNodeContextmenu&&(d.stopPropagation(),d.preventDefault()),l==null||l.ctx.emit(gp,d,(v=n.node)==null?void 0:v.data,n.node)};return(d,p)=>{var m,h,v;return w(),O("div",{ref:"node$",class:$([o(a).b("node"),o(a).is("expanded",d.expanded),o(a).is("current",d.current),o(a).is("focusable",!d.disabled),o(a).is("checked",!d.disabled&&d.checked)]),role:"treeitem",tabindex:"-1","aria-expanded":d.expanded,"aria-disabled":d.disabled,"aria-checked":d.checked,"data-key":(m=d.node)==null?void 0:m.key,onClick:Fe(i,["stop"]),onContextmenu:f},[R("div",{class:$(o(a).be("node","content")),style:Re({paddingLeft:`${(d.node.level-1)*o(s)}px`,height:d.itemSize+"px"})},[o(r)?(w(),G(o(Pe),{key:0,class:$([o(a).is("leaf",!!((h=d.node)!=null&&h.isLeaf)),o(a).is("hidden",d.hiddenExpandIcon),{expanded:!((v=d.node)!=null&&v.isLeaf)&&d.expanded},o(a).be("node","expand-icon")]),onClick:Fe(u,["stop"])},{default:N(()=>[(w(),G(rt(o(r))))]),_:1},8,["class","onClick"])):Z("v-if",!0),d.showCheckbox?(w(),G(o($n),{key:1,"model-value":d.checked,indeterminate:d.indeterminate,disabled:d.disabled,onChange:c,onClick:p[0]||(p[0]=Fe(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):Z("v-if",!0),E(o(eL),{node:d.node},null,8,["node"])],6)],42,tL)}}});var oL=he(lL,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree-node.vue"]]);const aL=j({name:"ElTreeV2"}),sL=j({...aL,props:jM,emits:YM,setup(e,{expose:t,emit:n}){const l=e,a=Qt(),s=S(()=>l.itemSize);dt(ci,{ctx:{emit:n,slots:a},props:l,instance:at()}),dt(zn,void 0);const{t:r}=ht(),i=ce("tree"),{flattenTree:u,isNotEmpty:c,toggleExpand:f,isExpanded:d,isIndeterminate:p,isChecked:m,isDisabled:h,isCurrent:v,isForceHiddenExpandIcon:g,handleNodeClick:y,handleNodeCheck:k,toggleCheckbox:b,getCurrentNode:C,getCurrentKey:I,setCurrentKey:T,getCheckedKeys:M,getCheckedNodes:L,getHalfCheckedKeys:A,getHalfCheckedNodes:D,setChecked:B,setCheckedKeys:F,filter:x,setData:U,getNode:X,expandNode:K,collapseNode:V,setExpandedKeys:W}=QM(l,n);return t({toggleCheckbox:b,getCurrentNode:C,getCurrentKey:I,setCurrentKey:T,getCheckedKeys:M,getCheckedNodes:L,getHalfCheckedKeys:A,getHalfCheckedNodes:D,setChecked:B,setCheckedKeys:F,filter:x,setData:U,getNode:X,expandNode:K,collapseNode:V,setExpandedKeys:W}),(P,H)=>{var Y;return w(),O("div",{class:$([o(i).b(),{[o(i).m("highlight-current")]:P.highlightCurrent}]),role:"tree"},[o(c)?(w(),G(o(Sf),{key:0,"class-name":o(i).b("virtual-list"),data:o(u),total:o(u).length,height:P.height,"item-size":o(s),"perf-mode":P.perfMode},{default:N(({data:z,index:q,style:se})=>[(w(),G(oL,{key:z[q].key,style:Re(se),node:z[q],expanded:o(d)(z[q]),"show-checkbox":P.showCheckbox,checked:o(m)(z[q]),indeterminate:o(p)(z[q]),"item-size":o(s),disabled:o(h)(z[q]),current:o(v)(z[q]),"hidden-expand-icon":o(g)(z[q]),onClick:o(y),onToggle:o(f),onCheck:o(k)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode"])):(w(),O("div",{key:1,class:$(o(i).e("empty-block"))},[R("span",{class:$(o(i).e("empty-text"))},ae((Y=P.emptyText)!=null?Y:o(r)("el.tree.emptyText")),3)],2))],2)}}});var rL=he(sL,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree.vue"]]);const iL=Qe(rL),yp=Symbol("uploadContextKey"),uL="ElUpload";class cL extends Error{constructor(t,n,l,a){super(t),this.name="UploadAjaxError",this.status=n,this.method=l,this.url=a}}function Pu(e,t,n){let l;return n.response?l=`${n.response.error||n.response}`:n.responseText?l=`${n.responseText}`:l=`fail to ${t.method} ${e} ${n.status}`,new cL(l,n.status,t.method,e)}function dL(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const fL=e=>{typeof XMLHttpRequest>"u"&&jt(uL,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",s=>{const r=s;r.percent=s.total>0?s.loaded/s.total*100:0,e.onProgress(r)});const l=new FormData;if(e.data)for(const[s,r]of Object.entries(e.data))Array.isArray(r)?l.append(s,...r):l.append(s,r);l.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(Pu(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(Pu(n,e,t));e.onSuccess(dL(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const a=e.headers||{};if(a instanceof Headers)a.forEach((s,r)=>t.setRequestHeader(r,s));else for(const[s,r]of Object.entries(a))Ht(r)||t.setRequestHeader(s,String(r));return t.send(l),t},bp=["text","picture","picture-card"];let pL=1;const or=()=>Date.now()+pL++,wp=ge({action:{type:String,default:"#"},headers:{type:te(Object)},method:{type:String,default:"post"},data:{type:Object,default:()=>Ot({})},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},drag:{type:Boolean,default:!1},withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},type:{type:String,default:"select"},fileList:{type:te(Array),default:()=>Ot([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:bp,default:"text"},httpRequest:{type:te(Function),default:fL},disabled:Boolean,limit:Number}),vL=ge({...wp,beforeUpload:{type:te(Function),default:Dt},beforeRemove:{type:te(Function)},onRemove:{type:te(Function),default:Dt},onChange:{type:te(Function),default:Dt},onPreview:{type:te(Function),default:Dt},onSuccess:{type:te(Function),default:Dt},onProgress:{type:te(Function),default:Dt},onError:{type:te(Function),default:Dt},onExceed:{type:te(Function),default:Dt}}),mL=ge({files:{type:te(Array),default:()=>Ot([])},disabled:{type:Boolean,default:!1},handlePreview:{type:te(Function),default:Dt},listType:{type:String,values:bp,default:"text"}}),hL={remove:e=>!!e},gL=["onKeydown"],yL=["src"],bL=["onClick"],wL=["title"],kL=["onClick"],CL=["onClick"],SL=j({name:"ElUploadList"}),_L=j({...SL,props:mL,emits:hL,setup(e,{emit:t}){const{t:n}=ht(),l=ce("upload"),a=ce("icon"),s=ce("list"),r=gn(),i=_(!1),u=c=>{t("remove",c)};return(c,f)=>(w(),G(zu,{tag:"ul",class:$([o(l).b("list"),o(l).bm("list",c.listType),o(l).is("disabled",o(r))]),name:o(s).b()},{default:N(()=>[(w(!0),O(Ne,null,Ze(c.files,d=>(w(),O("li",{key:d.uid||d.name,class:$([o(l).be("list","item"),o(l).is(d.status),{focusing:i.value}]),tabindex:"0",onKeydown:pt(p=>!o(r)&&u(d),["delete"]),onFocus:f[0]||(f[0]=p=>i.value=!0),onBlur:f[1]||(f[1]=p=>i.value=!1),onClick:f[2]||(f[2]=p=>i.value=!1)},[ie(c.$slots,"default",{file:d},()=>[c.listType==="picture"||d.status!=="uploading"&&c.listType==="picture-card"?(w(),O("img",{key:0,class:$(o(l).be("list","item-thumbnail")),src:d.url,alt:""},null,10,yL)):Z("v-if",!0),d.status==="uploading"||c.listType!=="picture-card"?(w(),O("div",{key:1,class:$(o(l).be("list","item-info"))},[R("a",{class:$(o(l).be("list","item-name")),onClick:Fe(p=>c.handlePreview(d),["prevent"])},[E(o(Pe),{class:$(o(a).m("document"))},{default:N(()=>[E(o(lc))]),_:1},8,["class"]),R("span",{class:$(o(l).be("list","item-file-name")),title:d.name},ae(d.name),11,wL)],10,bL),d.status==="uploading"?(w(),G(o(vf),{key:0,type:c.listType==="picture-card"?"circle":"line","stroke-width":c.listType==="picture-card"?6:2,percentage:Number(d.percentage),style:Re(c.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):Z("v-if",!0)],2)):Z("v-if",!0),R("label",{class:$(o(l).be("list","item-status-label"))},[c.listType==="text"?(w(),G(o(Pe),{key:0,class:$([o(a).m("upload-success"),o(a).m("circle-check")])},{default:N(()=>[E(o(Ba))]),_:1},8,["class"])):["picture-card","picture"].includes(c.listType)?(w(),G(o(Pe),{key:1,class:$([o(a).m("upload-success"),o(a).m("check")])},{default:N(()=>[E(o(no))]),_:1},8,["class"])):Z("v-if",!0)],2),o(r)?Z("v-if",!0):(w(),G(o(Pe),{key:2,class:$(o(a).m("close")),onClick:p=>u(d)},{default:N(()=>[E(o(Sn))]),_:2},1032,["class","onClick"])),Z(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),Z(" This is a bug which needs to be fixed "),Z(" TODO: Fix the incorrect navigation interaction "),o(r)?Z("v-if",!0):(w(),O("i",{key:3,class:$(o(a).m("close-tip"))},ae(o(n)("el.upload.deleteTip")),3)),c.listType==="picture-card"?(w(),O("span",{key:4,class:$(o(l).be("list","item-actions"))},[R("span",{class:$(o(l).be("list","item-preview")),onClick:p=>c.handlePreview(d)},[E(o(Pe),{class:$(o(a).m("zoom-in"))},{default:N(()=>[E(o(Ju))]),_:1},8,["class"])],10,kL),o(r)?Z("v-if",!0):(w(),O("span",{key:0,class:$(o(l).be("list","item-delete")),onClick:p=>u(d)},[E(o(Pe),{class:$(o(a).m("delete"))},{default:N(()=>[E(o(br))]),_:1},8,["class"])],10,CL))],2)):Z("v-if",!0)])],42,gL))),128)),ie(c.$slots,"append")]),_:3},8,["class","name"]))}});var Mu=he(_L,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-list.vue"]]);const EL=ge({disabled:{type:Boolean,default:!1}}),$L={file:e=>et(e)},TL=["onDrop","onDragover"],kp="ElUploadDrag",IL=j({name:kp}),NL=j({...IL,props:EL,emits:$L,setup(e,{emit:t}){const n=Me(yp);n||jt(kp,"usage: <el-upload><el-upload-dragger /></el-upload>");const l=ce("upload"),a=_(!1),s=gn(),r=u=>{if(s.value)return;a.value=!1,u.stopPropagation();const c=Array.from(u.dataTransfer.files),f=n.accept.value;if(!f){t("file",c);return}const d=c.filter(p=>{const{type:m,name:h}=p,v=h.includes(".")?`.${h.split(".").pop()}`:"",g=m.replace(/\/.*$/,"");return f.split(",").map(y=>y.trim()).filter(y=>y).some(y=>y.startsWith(".")?v===y:/\/\*$/.test(y)?g===y.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(y)?m===y:!1)});t("file",d)},i=()=>{s.value||(a.value=!0)};return(u,c)=>(w(),O("div",{class:$([o(l).b("dragger"),o(l).is("dragover",a.value)]),onDrop:Fe(r,["prevent"]),onDragover:Fe(i,["prevent"]),onDragleave:c[0]||(c[0]=Fe(f=>a.value=!1,["prevent"]))},[ie(u.$slots,"default")],42,TL))}});var PL=he(NL,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-dragger.vue"]]);const ML=ge({...wp,beforeUpload:{type:te(Function),default:Dt},onRemove:{type:te(Function),default:Dt},onStart:{type:te(Function),default:Dt},onSuccess:{type:te(Function),default:Dt},onProgress:{type:te(Function),default:Dt},onError:{type:te(Function),default:Dt},onExceed:{type:te(Function),default:Dt}}),LL=["onKeydown"],RL=["name","multiple","accept"],OL=j({name:"ElUploadContent",inheritAttrs:!1}),AL=j({...OL,props:ML,setup(e,{expose:t}){const n=e,l=ce("upload"),a=gn(),s=Nt({}),r=Nt(),i=h=>{if(h.length===0)return;const{autoUpload:v,limit:g,fileList:y,multiple:k,onStart:b,onExceed:C}=n;if(g&&y.length+h.length>g){C(h,y);return}k||(h=h.slice(0,1));for(const I of h){const T=I;T.uid=or(),b(T),v&&u(T)}},u=async h=>{if(r.value.value="",!n.beforeUpload)return c(h);let v,g={};try{const k=n.data,b=n.beforeUpload(h);g=It(n.data)?ka(n.data):n.data,v=await b,It(n.data)&&vn(k,g)&&(g=ka(n.data))}catch{v=!1}if(v===!1){n.onRemove(h);return}let y=h;v instanceof Blob&&(v instanceof File?y=v:y=new File([v],h.name,{type:h.type})),c(Object.assign(y,{uid:h.uid}),g)},c=(h,v)=>{const{headers:g,data:y,method:k,withCredentials:b,name:C,action:I,onProgress:T,onSuccess:M,onError:L,httpRequest:A}=n,{uid:D}=h,B={headers:g||{},withCredentials:b,file:h,data:v??y,method:k,filename:C,action:I,onProgress:x=>{T(x,h)},onSuccess:x=>{M(x,h),delete s.value[D]},onError:x=>{L(x,h),delete s.value[D]}},F=A(B);s.value[D]=F,F instanceof Promise&&F.then(B.onSuccess,B.onError)},f=h=>{const v=h.target.files;v&&i(Array.from(v))},d=()=>{a.value||(r.value.value="",r.value.click())},p=()=>{d()};return t({abort:h=>{bm(s.value).filter(h?([g])=>String(h.uid)===g:()=>!0).forEach(([g,y])=>{y instanceof XMLHttpRequest&&y.abort(),delete s.value[g]})},upload:u}),(h,v)=>(w(),O("div",{class:$([o(l).b(),o(l).m(h.listType),o(l).is("drag",h.drag)]),tabindex:"0",onClick:d,onKeydown:pt(Fe(p,["self"]),["enter","space"])},[h.drag?(w(),G(PL,{key:0,disabled:o(a),onFile:i},{default:N(()=>[ie(h.$slots,"default")]),_:3},8,["disabled"])):ie(h.$slots,"default",{key:1}),R("input",{ref_key:"inputRef",ref:r,class:$(o(l).e("input")),name:h.name,multiple:h.multiple,accept:h.accept,type:"file",onChange:f,onClick:v[0]||(v[0]=Fe(()=>{},["stop"]))},null,42,RL)],42,LL))}});var Lu=he(AL,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]);const Ru="ElUpload",VL=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},DL=(e,t)=>{const n=Mv(e,"fileList",void 0,{passive:!0}),l=p=>n.value.find(m=>m.uid===p.uid);function a(p){var m;(m=t.value)==null||m.abort(p)}function s(p=["ready","uploading","success","fail"]){n.value=n.value.filter(m=>!p.includes(m.status))}const r=(p,m)=>{const h=l(m);h&&(console.error(p),h.status="fail",n.value.splice(n.value.indexOf(h),1),e.onError(p,h,n.value),e.onChange(h,n.value))},i=(p,m)=>{const h=l(m);h&&(e.onProgress(p,h,n.value),h.status="uploading",h.percentage=Math.round(p.percent))},u=(p,m)=>{const h=l(m);h&&(h.status="success",h.response=p,e.onSuccess(p,h,n.value),e.onChange(h,n.value))},c=p=>{Ht(p.uid)&&(p.uid=or());const m={name:p.name,percentage:0,status:"ready",size:p.size,raw:p,uid:p.uid};if(e.listType==="picture-card"||e.listType==="picture")try{m.url=URL.createObjectURL(p)}catch(h){h.message,e.onError(h,m,n.value)}n.value=[...n.value,m],e.onChange(m,n.value)},f=async p=>{const m=p instanceof File?l(p):p;m||jt(Ru,"file to be removed not found");const h=v=>{a(v);const g=n.value;g.splice(g.indexOf(v),1),e.onRemove(v,g),VL(v)};e.beforeRemove?await e.beforeRemove(m,n.value)!==!1&&h(m):h(m)};function d(){n.value.filter(({status:p})=>p==="ready").forEach(({raw:p})=>{var m;return p&&((m=t.value)==null?void 0:m.upload(p))})}return ue(()=>e.listType,p=>{p!=="picture-card"&&p!=="picture"||(n.value=n.value.map(m=>{const{raw:h,url:v}=m;if(!v&&h)try{m.url=URL.createObjectURL(h)}catch(g){e.onError(g,m,n.value)}return m}))}),ue(n,p=>{for(const m of p)m.uid||(m.uid=or()),m.status||(m.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:a,clearFiles:s,handleError:r,handleProgress:i,handleStart:c,handleSuccess:u,handleRemove:f,submit:d}},BL=j({name:"ElUpload"}),xL=j({...BL,props:vL,setup(e,{expose:t}){const n=e,l=Qt(),a=gn(),s=Nt(),{abort:r,submit:i,clearFiles:u,uploadFiles:c,handleStart:f,handleError:d,handleRemove:p,handleSuccess:m,handleProgress:h}=DL(n,s),v=S(()=>n.listType==="picture-card"),g=S(()=>({...n,fileList:c.value,onStart:f,onProgress:h,onSuccess:m,onError:d,onRemove:p}));return Rt(()=>{c.value.forEach(({url:y})=>{y!=null&&y.startsWith("blob:")&&URL.revokeObjectURL(y)})}),dt(yp,{accept:At(n,"accept")}),t({abort:r,submit:i,clearFiles:u,handleStart:f,handleRemove:p}),(y,k)=>(w(),O("div",null,[o(v)&&y.showFileList?(w(),G(Mu,{key:0,disabled:o(a),"list-type":y.listType,files:o(c),"handle-preview":y.onPreview,onRemove:o(p)},xn({append:N(()=>[E(Lu,ot({ref_key:"uploadRef",ref:s},o(g)),{default:N(()=>[o(l).trigger?ie(y.$slots,"trigger",{key:0}):Z("v-if",!0),!o(l).trigger&&o(l).default?ie(y.$slots,"default",{key:1}):Z("v-if",!0)]),_:3},16)]),_:2},[y.$slots.file?{name:"default",fn:N(({file:b})=>[ie(y.$slots,"file",{file:b})])}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):Z("v-if",!0),!o(v)||o(v)&&!y.showFileList?(w(),G(Lu,ot({key:1,ref_key:"uploadRef",ref:s},o(g)),{default:N(()=>[o(l).trigger?ie(y.$slots,"trigger",{key:0}):Z("v-if",!0),!o(l).trigger&&o(l).default?ie(y.$slots,"default",{key:1}):Z("v-if",!0)]),_:3},16)):Z("v-if",!0),y.$slots.trigger?ie(y.$slots,"default",{key:2}):Z("v-if",!0),ie(y.$slots,"tip"),!o(v)&&y.showFileList?(w(),G(Mu,{key:3,disabled:o(a),"list-type":y.listType,files:o(c),"handle-preview":y.onPreview,onRemove:o(p)},xn({_:2},[y.$slots.file?{name:"default",fn:N(({file:b})=>[ie(y.$slots,"file",{file:b})])}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):Z("v-if",!0)]))}});var FL=he(xL,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]]);const zL=Qe(FL);var HL=[vh,Eh,by,l2,$y,Ry,Xc,jy,qy,tn,td,jb,Zb,d0,f0,$w,fw,Lw,$n,L0,yd,Ww,uk,ck,ek,xk,sh,Zk,Jk,Qk,eC,tC,n1,f1,p1,I1,qd,H1,RS,OS,AS,nf,Fh,zh,Pe,T_,lf,on,of,z_,rE,iE,uE,cE,gE,C$,I$,D$,qc,vf,Ed,G0,q0,eT,aT,xw,Qn,El,Ta,GE,jT,eI,tI,MI,VI,Rf,qI,nN,lN,vN,yP,bP,n2,y2,b2,_o,_2,Eb,P2,A2,V2,cn,iM,SM,DM,WM,iL,zL];const In="ElInfiniteScroll",KL=50,WL=200,UL=0,jL={delay:{type:Number,default:WL},distance:{type:Number,default:UL},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},di=(e,t)=>Object.entries(jL).reduce((n,[l,a])=>{var s,r;const{type:i,default:u}=a,c=e.getAttribute(`infinite-scroll-${l}`);let f=(r=(s=t[c])!=null?s:c)!=null?r:u;return f=f==="false"?!1:f,f=i(f),n[l]=Number.isNaN(f)?u:f,n},{}),Cp=e=>{const{observer:t}=e[In];t&&(t.disconnect(),delete e[In].observer)},qL=(e,t)=>{const{container:n,containerEl:l,instance:a,observer:s,lastScrollTop:r}=e[In],{disabled:i,distance:u}=di(e,a),{clientHeight:c,scrollHeight:f,scrollTop:d}=l,p=d-r;if(e[In].lastScrollTop=d,s||i||p<0)return;let m=!1;if(n===e)m=f-(c+d)<=u;else{const{clientTop:h,scrollHeight:v}=e,g=hm(e,l);m=d+c>=g+h+v-u}m&&t.call(a)};function _s(e,t){const{containerEl:n,instance:l}=e[In],{disabled:a}=di(e,l);a||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?t.call(l):Cp(e))}const GL={async mounted(e,t){const{instance:n,value:l}=t;kt(l)||jt(In,"'v-infinite-scroll' binding value must be a function"),await Le();const{delay:a,immediate:s}=di(e,n),r=kr(e,!0),i=r===window?document.documentElement:r,u=wl(qL.bind(null,e,l),a);if(r){if(e[In]={instance:n,container:r,containerEl:i,delay:a,cb:l,onScroll:u,lastScrollTop:i.scrollTop},s){const c=new MutationObserver(wl(_s.bind(null,e,l),KL));e[In].observer=c,c.observe(e,{childList:!0,subtree:!0}),_s(e,l)}r.addEventListener("scroll",u)}},unmounted(e){const{container:t,onScroll:n}=e[In];t==null||t.removeEventListener("scroll",n),Cp(e)},async updated(e){if(!e[In])await Le();else{const{containerEl:t,cb:n,observer:l}=e[In];t.clientHeight&&l&&_s(e,n)}}},ar=GL;ar.install=e=>{e.directive("InfiniteScroll",ar)};const YL=ar;function XL(e){let t;const n=_(!1),l=St({...e,originalPosition:"",originalOverflow:"",visible:!1});function a(p){l.text=p}function s(){const p=l.parent,m=d.ns;if(!p.vLoadingAddClassList){let h=p.getAttribute("loading-number");h=Number.parseInt(h)-1,h?p.setAttribute("loading-number",h.toString()):(mn(p,m.bm("parent","relative")),p.removeAttribute("loading-number")),mn(p,m.bm("parent","hidden"))}r(),f.unmount()}function r(){var p,m;(m=(p=d.$el)==null?void 0:p.parentNode)==null||m.removeChild(d.$el)}function i(){var p;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(t),t=window.setTimeout(u,400),l.visible=!1,(p=e.closed)==null||p.call(e))}function u(){if(!n.value)return;const p=l.parent;n.value=!1,p.vLoadingAddClassList=void 0,s()}const c=j({name:"ElLoading",setup(p,{expose:m}){const{ns:h,zIndex:v}=Xa("loading");return m({ns:h,zIndex:v}),()=>{const g=l.spinner||l.svg,y=De("svg",{class:"circular",viewBox:l.svgViewBox?l.svgViewBox:"0 0 50 50",...g?{innerHTML:g}:{}},[De("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),k=l.text?De("p",{class:h.b("text")},[l.text]):void 0;return De(Wt,{name:h.b("fade"),onAfterLeave:u},{default:N(()=>[xe(E("div",{style:{backgroundColor:l.background||""},class:[h.b("mask"),l.customClass,l.fullscreen?"is-fullscreen":""]},[De("div",{class:h.b("spinner")},[y,k])]),[[lt,l.visible]])])})}}}),f=Uu(c),d=f.mount(document.createElement("div"));return{...Gt(l),setText:a,removeElLoadingChild:r,close:i,handleAfterLeave:u,vm:d,get $el(){return d.$el}}}let Qo;const sr=function(e={}){if(!yt)return;const t=ZL(e);if(t.fullscreen&&Qo)return Qo;const n=XL({...t,closed:()=>{var a;(a=t.closed)==null||a.call(t),t.fullscreen&&(Qo=void 0)}});JL(t,t.parent,n),Ou(t,t.parent,n),t.parent.vLoadingAddClassList=()=>Ou(t,t.parent,n);let l=t.parent.getAttribute("loading-number");return l?l=`${Number.parseInt(l)+1}`:l="1",t.parent.setAttribute("loading-number",l),t.parent.appendChild(n.$el),Le(()=>n.visible.value=t.visible),t.fullscreen&&(Qo=n),n},ZL=e=>{var t,n,l,a;let s;return ct(e.target)?s=(t=document.querySelector(e.target))!=null?t:document.body:s=e.target||document.body,{parent:s===document.body||e.body?document.body:s,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:s===document.body&&((n=e.fullscreen)!=null?n:!0),lock:(l=e.lock)!=null?l:!1,customClass:e.customClass||"",visible:(a=e.visible)!=null?a:!0,target:s}},JL=async(e,t,n)=>{const{nextZIndex:l}=n.vm.zIndex||n.vm._.exposed.zIndex,a={};if(e.fullscreen)n.originalPosition.value=Vn(document.body,"position"),n.originalOverflow.value=Vn(document.body,"overflow"),a.zIndex=l();else if(e.parent===document.body){n.originalPosition.value=Vn(document.body,"position"),await Le();for(const s of["top","left"]){const r=s==="top"?"scrollTop":"scrollLeft";a[s]=`${e.target.getBoundingClientRect()[s]+document.body[r]+document.documentElement[r]-Number.parseInt(Vn(document.body,`margin-${s}`),10)}px`}for(const s of["height","width"])a[s]=`${e.target.getBoundingClientRect()[s]}px`}else n.originalPosition.value=Vn(t,"position");for(const[s,r]of Object.entries(a))n.$el.style[s]=r},Ou=(e,t,n)=>{const l=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?mn(t,l.bm("parent","relative")):Dn(t,l.bm("parent","relative")),e.fullscreen&&e.lock?Dn(t,l.bm("parent","hidden")):mn(t,l.bm("parent","hidden"))},rr=Symbol("ElLoading"),Au=(e,t)=>{var n,l,a,s;const r=t.instance,i=p=>It(t.value)?t.value[p]:void 0,u=p=>{const m=ct(p)&&(r==null?void 0:r[p])||p;return m&&_(m)},c=p=>u(i(p)||e.getAttribute(`element-loading-${Hp(p)}`)),f=(n=i("fullscreen"))!=null?n:t.modifiers.fullscreen,d={text:c("text"),svg:c("svg"),svgViewBox:c("svgViewBox"),spinner:c("spinner"),background:c("background"),customClass:c("customClass"),fullscreen:f,target:(l=i("target"))!=null?l:f?void 0:e,body:(a=i("body"))!=null?a:t.modifiers.body,lock:(s=i("lock"))!=null?s:t.modifiers.lock};e[rr]={options:d,instance:sr(d)}},QL=(e,t)=>{for(const n of Object.keys(t))bt(t[n])&&(t[n].value=e[n])},Vu={mounted(e,t){t.value&&Au(e,t)},updated(e,t){const n=e[rr];t.oldValue!==t.value&&(t.value&&!t.oldValue?Au(e,t):t.value&&t.oldValue?It(t.value)&&QL(t.value,n.options):n==null||n.instance.close())},unmounted(e){var t;(t=e[rr])==null||t.instance.close()}},eR={install(e){e.directive("loading",Vu),e.config.globalProperties.$loading=sr},directive:Vu,service:sr},Sp=["success","info","warning","error"],pn=Ot({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:yt?document.body:void 0}),tR=ge({customClass:{type:String,default:pn.customClass},center:{type:Boolean,default:pn.center},dangerouslyUseHTMLString:{type:Boolean,default:pn.dangerouslyUseHTMLString},duration:{type:Number,default:pn.duration},icon:{type:Pt,default:pn.icon},id:{type:String,default:pn.id},message:{type:te([String,Object,Function]),default:pn.message},onClose:{type:te(Function),required:!1},showClose:{type:Boolean,default:pn.showClose},type:{type:String,values:Sp,default:pn.type},offset:{type:Number,default:pn.offset},zIndex:{type:Number,default:pn.zIndex},grouping:{type:Boolean,default:pn.grouping},repeatNum:{type:Number,default:pn.repeatNum}}),nR={destroy:()=>!0},Pn=Kp([]),lR=e=>{const t=Pn.findIndex(a=>a.id===e),n=Pn[t];let l;return t>0&&(l=Pn[t-1]),{current:n,prev:l}},oR=e=>{const{prev:t}=lR(e);return t?t.vm.exposed.bottom.value:0},aR=(e,t)=>Pn.findIndex(l=>l.id===e)>0?20:t,sR=["id"],rR=["innerHTML"],iR=j({name:"ElMessage"}),uR=j({...iR,props:tR,emits:nR,setup(e,{expose:t}){const n=e,{Close:l}=Cr,{ns:a,zIndex:s}=Xa("message"),{currentZIndex:r,nextZIndex:i}=s,u=_(),c=_(!1),f=_(0);let d;const p=S(()=>n.type?n.type==="error"?"danger":n.type:"info"),m=S(()=>{const M=n.type;return{[a.bm("icon",M)]:M&&rl[M]}}),h=S(()=>n.icon||rl[n.type]||""),v=S(()=>oR(n.id)),g=S(()=>aR(n.id,n.offset)+v.value),y=S(()=>f.value+g.value),k=S(()=>({top:`${g.value}px`,zIndex:r.value}));function b(){n.duration!==0&&({stop:d}=_l(()=>{I()},n.duration))}function C(){d==null||d()}function I(){c.value=!1}function T({code:M}){M===Ae.esc&&I()}return ze(()=>{b(),i(),c.value=!0}),ue(()=>n.repeatNum,()=>{C(),b()}),Jt(document,"keydown",T),un(u,()=>{f.value=u.value.getBoundingClientRect().height}),t({visible:c,bottom:y,close:I}),(M,L)=>(w(),G(Wt,{name:o(a).b("fade"),onBeforeLeave:M.onClose,onAfterLeave:L[0]||(L[0]=A=>M.$emit("destroy")),persisted:""},{default:N(()=>[xe(R("div",{id:M.id,ref_key:"messageRef",ref:u,class:$([o(a).b(),{[o(a).m(M.type)]:M.type&&!M.icon},o(a).is("center",M.center),o(a).is("closable",M.showClose),M.customClass]),style:Re(o(k)),role:"alert",onMouseenter:C,onMouseleave:b},[M.repeatNum>1?(w(),G(o(Xc),{key:0,value:M.repeatNum,type:o(p),class:$(o(a).e("badge"))},null,8,["value","type","class"])):Z("v-if",!0),o(h)?(w(),G(o(Pe),{key:1,class:$([o(a).e("icon"),o(m)])},{default:N(()=>[(w(),G(rt(o(h))))]),_:1},8,["class"])):Z("v-if",!0),ie(M.$slots,"default",{},()=>[M.dangerouslyUseHTMLString?(w(),O(Ne,{key:1},[Z(" Caution here, message could've been compromised, never use user's input as message "),R("p",{class:$(o(a).e("content")),innerHTML:M.message},null,10,rR)],2112)):(w(),O("p",{key:0,class:$(o(a).e("content"))},ae(M.message),3))]),M.showClose?(w(),G(o(Pe),{key:2,class:$(o(a).e("closeBtn")),onClick:Fe(I,["stop"])},{default:N(()=>[E(o(l))]),_:1},8,["class","onClick"])):Z("v-if",!0)],46,sR),[[lt,c.value]])]),_:3},8,["name","onBeforeLeave"]))}});var cR=he(uR,[["__file","/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);let dR=1;const _p=e=>{const t=!e||ct(e)||zt(e)||kt(e)?{message:e}:e,n={...pn,...t};if(!n.appendTo)n.appendTo=document.body;else if(ct(n.appendTo)){let l=document.querySelector(n.appendTo);_n(l)||(l=document.body),n.appendTo=l}return n},fR=e=>{const t=Pn.indexOf(e);if(t===-1)return;Pn.splice(t,1);const{handler:n}=e;n.close()},pR=({appendTo:e,...t},n)=>{const l=`message_${dR++}`,a=t.onClose,s=document.createElement("div"),r={...t,id:l,onClose:()=>{a==null||a(),fR(f)},onDestroy:()=>{Gl(null,s)}},i=E(cR,r,kt(r.message)||zt(r.message)?{default:kt(r.message)?r.message:()=>r.message}:null);i.appContext=n||eo._context,Gl(i,s),e.appendChild(s.firstElementChild);const u=i.component,f={id:l,vnode:i,vm:u,handler:{close:()=>{u.exposed.visible.value=!1}},props:i.component.props};return f},eo=(e={},t)=>{if(!yt)return{close:()=>{}};if(He(Ts.max)&&Pn.length>=Ts.max)return{close:()=>{}};const n=_p(e);if(n.grouping&&Pn.length){const a=Pn.find(({vnode:s})=>{var r;return((r=s.props)==null?void 0:r.message)===n.message});if(a)return a.props.repeatNum+=1,a.props.type=n.type,a.handler}const l=pR(n,t);return Pn.push(l),l.handler};Sp.forEach(e=>{eo[e]=(t={},n)=>{const l=_p(t);return eo({...l,type:e},n)}});function vR(e){for(const t of Pn)(!e||e===t.props.type)&&t.handler.close()}eo.closeAll=vR;eo._context=null;const Ct=wc(eo,"$message"),mR=j({name:"ElMessageBox",directives:{TrapFocus:fb},components:{ElButton:tn,ElFocusTrap:Ja,ElInput:on,ElOverlay:Br,ElIcon:Pe,...Cr},inheritAttrs:!1,props:{buttonSize:{type:String,validator:Ua},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,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:l,ns:a,size:s}=Xa("message-box",S(()=>e.buttonSize)),{t:r}=n,{nextZIndex:i}=l,u=_(!1),c=St({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:i()}),f=S(()=>{const X=c.type;return{[a.bm("icon",X)]:X&&rl[X]}}),d=En(),p=En(),m=S(()=>c.icon||rl[c.type]||""),h=S(()=>!!c.message),v=_(),g=_(),y=_(),k=_(),b=_(),C=S(()=>c.confirmButtonClass);ue(()=>c.inputValue,async X=>{await Le(),e.boxType==="prompt"&&X!==null&&B()},{immediate:!0}),ue(()=>u.value,X=>{var K,V;X&&(e.boxType!=="prompt"&&(c.autofocus?y.value=(V=(K=b.value)==null?void 0:K.$el)!=null?V:v.value:y.value=v.value),c.zIndex=i()),e.boxType==="prompt"&&(X?Le().then(()=>{var W;k.value&&k.value.$el&&(c.autofocus?y.value=(W=F())!=null?W:v.value:y.value=v.value)}):(c.editorErrorMessage="",c.validateError=!1))});const I=S(()=>e.draggable);kc(v,g,I),ze(async()=>{await Le(),e.closeOnHashChange&&window.addEventListener("hashchange",T)}),Rt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",T)});function T(){u.value&&(u.value=!1,Le(()=>{c.action&&t("action",c.action)}))}const M=()=>{e.closeOnClickModal&&D(c.distinguishCancelAndClose?"close":"cancel")},L=Er(M),A=X=>{if(c.inputType!=="textarea")return X.preventDefault(),D("confirm")},D=X=>{var K;e.boxType==="prompt"&&X==="confirm"&&!B()||(c.action=X,c.beforeClose?(K=c.beforeClose)==null||K.call(c,X,c,T):T())},B=()=>{if(e.boxType==="prompt"){const X=c.inputPattern;if(X&&!X.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;const K=c.inputValidator;if(typeof K=="function"){const V=K(c.inputValue);if(V===!1)return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;if(typeof V=="string")return c.editorErrorMessage=V,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},F=()=>{const X=k.value.$refs;return X.input||X.textarea},x=()=>{D("close")},U=()=>{e.closeOnPressEscape&&x()};return e.lockScroll&&_c(u),{...Gt(c),ns:a,overlayEvent:L,visible:u,hasMessage:h,typeClass:f,contentId:d,inputId:p,btnSize:s,iconComponent:m,confirmButtonClasses:C,rootRef:v,focusStartRef:y,headerRef:g,inputRef:k,confirmRef:b,doClose:T,handleClose:x,onCloseRequested:U,handleWrapperClick:M,handleInputEnter:A,handleAction:D,t:r}}}),hR=["aria-label","aria-describedby"],gR=["aria-label"],yR=["id"];function bR(e,t,n,l,a,s){const r=ee("el-icon"),i=ee("close"),u=ee("el-input"),c=ee("el-button"),f=ee("el-focus-trap"),d=ee("el-overlay");return w(),G(Wt,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=p=>e.$emit("vanish")),persisted:""},{default:N(()=>[xe(E(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:N(()=>[R("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:$(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...p)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...p)),onMousedown:t[9]||(t[9]=(...p)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...p)),onMouseup:t[10]||(t[10]=(...p)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...p))},[E(f,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:N(()=>[R("div",{ref:"rootRef",class:$([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:Re(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Fe(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(w(),O("div",{key:0,ref:"headerRef",class:$(e.ns.e("header"))},[R("div",{class:$(e.ns.e("title"))},[e.iconComponent&&e.center?(w(),G(r,{key:0,class:$([e.ns.e("status"),e.typeClass])},{default:N(()=>[(w(),G(rt(e.iconComponent)))]),_:1},8,["class"])):Z("v-if",!0),R("span",null,ae(e.title),1)],2),e.showClose?(w(),O("button",{key:0,type:"button",class:$(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=p=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=pt(Fe(p=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[E(r,{class:$(e.ns.e("close"))},{default:N(()=>[E(i)]),_:1},8,["class"])],42,gR)):Z("v-if",!0)],2)):Z("v-if",!0),R("div",{id:e.contentId,class:$(e.ns.e("content"))},[R("div",{class:$(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(w(),G(r,{key:0,class:$([e.ns.e("status"),e.typeClass])},{default:N(()=>[(w(),G(rt(e.iconComponent)))]),_:1},8,["class"])):Z("v-if",!0),e.hasMessage?(w(),O("div",{key:1,class:$(e.ns.e("message"))},[ie(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(w(),G(rt(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(w(),G(rt(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:N(()=>[ye(ae(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):Z("v-if",!0)],2),xe(R("div",{class:$(e.ns.e("input"))},[E(u,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=p=>e.inputValue=p),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:$({invalid:e.validateError}),onKeydown:pt(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),R("div",{class:$(e.ns.e("errormsg")),style:Re({visibility:e.editorErrorMessage?"visible":"hidden"})},ae(e.editorErrorMessage),7)],2),[[lt,e.showInput]])],10,yR),R("div",{class:$(e.ns.e("btns"))},[e.showCancelButton?(w(),G(c,{key:0,loading:e.cancelButtonLoading,class:$([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=p=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=pt(Fe(p=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:N(()=>[ye(ae(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","class","round","size"])):Z("v-if",!0),xe(E(c,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:$([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=p=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=pt(Fe(p=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:N(()=>[ye(ae(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","class","round","disabled","size"]),[[lt,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,hR)]),_:3},8,["z-index","overlay-class","mask"]),[[lt,e.visible]])]),_:3})}var wR=he(mR,[["render",bR],["__file","/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]);const Ro=new Map,kR=e=>{let t=document.body;return e.appendTo&&(ct(e.appendTo)&&(t=document.querySelector(e.appendTo)),_n(e.appendTo)&&(t=e.appendTo),_n(t)||(t=document.body)),t},CR=(e,t,n=null)=>{const l=E(wR,e,kt(e.message)||zt(e.message)?{default:kt(e.message)?e.message:()=>e.message}:null);return l.appContext=n,Gl(l,t),kR(e).appendChild(t.firstElementChild),l.component},SR=()=>document.createElement("div"),_R=(e,t)=>{const n=SR();e.onVanish=()=>{Gl(null,n),Ro.delete(a)},e.onAction=s=>{const r=Ro.get(a);let i;e.showInput?i={value:a.inputValue,action:s}:i=s,e.callback?e.callback(i,l.proxy):s==="cancel"||s==="close"?e.distinguishCancelAndClose&&s!=="cancel"?r.reject("close"):r.reject("cancel"):r.resolve(i)};const l=CR(e,n,t),a=l.proxy;for(const s in e)nn(e,s)&&!nn(a.$props,s)&&(a[s]=e[s]);return a.visible=!0,a};function ro(e,t=null){if(!yt)return Promise.reject();let n;return ct(e)||zt(e)?e={message:e}:n=e.callback,new Promise((l,a)=>{const s=_R(e,t??ro._context);Ro.set(s,{options:e,callback:n,resolve:l,reject:a})})}const ER=["alert","confirm","prompt"],$R={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};ER.forEach(e=>{ro[e]=TR(e)});function TR(e){return(t,n,l,a)=>{let s="";return It(n)?(l=n,s=""):Yt(n)?s="":s=n,ro(Object.assign({title:s,message:t,type:"",...$R[e]},l,{boxType:e}),a)}}ro.close=()=>{Ro.forEach((e,t)=>{t.doClose()}),Ro.clear()};ro._context=null;const ll=ro;ll.install=e=>{ll._context=e._context,e.config.globalProperties.$msgbox=ll,e.config.globalProperties.$messageBox=ll,e.config.globalProperties.$alert=ll.alert,e.config.globalProperties.$confirm=ll.confirm,e.config.globalProperties.$prompt=ll.prompt};const Tl=ll,Ep=["success","info","warning","error"],IR=ge({customClass:{type:String,default:""},dangerouslyUseHTMLString:{type:Boolean,default:!1},duration:{type:Number,default:4500},icon:{type:Pt},id:{type:String,default:""},message:{type:te([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:te(Function),default:()=>{}},onClose:{type:te(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:[...Ep,""],default:""},zIndex:Number}),NR={destroy:()=>!0},PR=["id"],MR=["textContent"],LR={key:0},RR=["innerHTML"],OR=j({name:"ElNotification"}),AR=j({...OR,props:IR,emits:NR,setup(e,{expose:t}){const n=e,{ns:l,zIndex:a}=Xa("notification"),{nextZIndex:s,currentZIndex:r}=a,{Close:i}=yc,u=_(!1);let c;const f=S(()=>{const b=n.type;return b&&rl[n.type]?l.m(b):""}),d=S(()=>n.type&&rl[n.type]||n.icon),p=S(()=>n.position.endsWith("right")?"right":"left"),m=S(()=>n.position.startsWith("top")?"top":"bottom"),h=S(()=>{var b;return{[m.value]:`${n.offset}px`,zIndex:(b=n.zIndex)!=null?b:r.value}});function v(){n.duration>0&&({stop:c}=_l(()=>{u.value&&y()},n.duration))}function g(){c==null||c()}function y(){u.value=!1}function k({code:b}){b===Ae.delete||b===Ae.backspace?g():b===Ae.esc?u.value&&y():v()}return ze(()=>{v(),s(),u.value=!0}),Jt(document,"keydown",k),t({visible:u,close:y}),(b,C)=>(w(),G(Wt,{name:o(l).b("fade"),onBeforeLeave:b.onClose,onAfterLeave:C[1]||(C[1]=I=>b.$emit("destroy")),persisted:""},{default:N(()=>[xe(R("div",{id:b.id,class:$([o(l).b(),b.customClass,o(p)]),style:Re(o(h)),role:"alert",onMouseenter:g,onMouseleave:v,onClick:C[0]||(C[0]=(...I)=>b.onClick&&b.onClick(...I))},[o(d)?(w(),G(o(Pe),{key:0,class:$([o(l).e("icon"),o(f)])},{default:N(()=>[(w(),G(rt(o(d))))]),_:1},8,["class"])):Z("v-if",!0),R("div",{class:$(o(l).e("group"))},[R("h2",{class:$(o(l).e("title")),textContent:ae(b.title)},null,10,MR),xe(R("div",{class:$(o(l).e("content")),style:Re(b.title?void 0:{margin:0})},[ie(b.$slots,"default",{},()=>[b.dangerouslyUseHTMLString?(w(),O(Ne,{key:1},[Z(" Caution here, message could've been compromised, never use user's input as message "),R("p",{innerHTML:b.message},null,8,RR)],2112)):(w(),O("p",LR,ae(b.message),1))])],6),[[lt,b.message]]),b.showClose?(w(),G(o(Pe),{key:0,class:$(o(l).e("closeBtn")),onClick:Fe(y,["stop"])},{default:N(()=>[E(o(i))]),_:1},8,["class","onClick"])):Z("v-if",!0)],2)],46,PR),[[lt,u.value]])]),_:3},8,["name","onBeforeLeave"]))}});var VR=he(AR,[["__file","/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);const Va={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},ir=16;let DR=1;const to=function(e={},t=null){if(!yt)return{close:()=>{}};(typeof e=="string"||zt(e))&&(e={message:e});const n=e.position||"top-right";let l=e.offset||0;Va[n].forEach(({vm:f})=>{var d;l+=(((d=f.el)==null?void 0:d.offsetHeight)||0)+ir}),l+=ir;const a=`notification_${DR++}`,s=e.onClose,r={...e,offset:l,id:a,onClose:()=>{BR(a,n,s)}};let i=document.body;_n(e.appendTo)?i=e.appendTo:ct(e.appendTo)&&(i=document.querySelector(e.appendTo)),_n(i)||(i=document.body);const u=document.createElement("div"),c=E(VR,r,zt(r.message)?{default:()=>r.message}:null);return c.appContext=t??to._context,c.props.onDestroy=()=>{Gl(null,u)},Gl(c,u),Va[n].push({vm:c}),i.appendChild(u.firstElementChild),{close:()=>{c.component.exposed.visible.value=!1}}};Ep.forEach(e=>{to[e]=(t={})=>((typeof t=="string"||zt(t))&&(t={message:t}),to({...t,type:e}))});function BR(e,t,n){const l=Va[t],a=l.findIndex(({vm:c})=>{var f;return((f=c.component)==null?void 0:f.props.id)===e});if(a===-1)return;const{vm:s}=l[a];if(!s)return;n==null||n(s);const r=s.el.offsetHeight,i=t.split("-")[0];l.splice(a,1);const u=l.length;if(!(u<1))for(let c=a;c<u;c++){const{el:f,component:d}=l[c].vm,p=Number.parseInt(f.style[i],10)-r-ir;d.props.offset=p}}function xR(){for(const e of Object.values(Va))e.forEach(({vm:t})=>{t.component.exposed.visible.value=!1})}to.closeAll=xR;to._context=null;const FR=wc(to,"$notify");var zR=[YL,eR,Ct,Tl,FR,pf],HR=ih([...HL,...zR]);var KR={name:"zh-cn",el:{colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"}}};const dl=Ha("wikiDisplay",{state:()=>({viewMenuWidth:300,commentShow:!0,commentActiveTab:"comment",showMenu:!0,rightAsideWidth:300,showHeader:!0,currentPage:""})}),ft=Ka.create({baseURL:"./",timeout:1e4,headers:{"Content-type":"application/x-www-form-urlencoded"},withCredentials:!0}),WR={"/iailab-doc-db/executor/execute":!0};ft.interceptors.request.use(e=>(e.needValidateResult=!0,WR[e.url]&&(e.needValidateResult=!1),e),e=>(console.log(e),Promise.reject(e)));let Du=new Date().getTime();ft.interceptors.response.use(e=>{if(e.message)Ct.error("请求错误:"+e.message);else{if(!e.config.needValidateResult||e.data.errCode===200)return e.data;if(e.data.errCode===400){new Date().getTime()-Du>2e3&&(Ct.warning("请先登录"),Du=new Date().getTime()),Ct.warning("请先登录");let t=encodeURIComponent(window.location.href);window.location="/user/login?redirect="+t}else if(e.data.errCode!==200){Ct.error(e.data.errMsg||"未知错误");let t=encodeURIComponent(window.location.href);window.location="/user/login?redirect="+t}}return Promise.reject("请求错误")},e=>(Ct.info("请求错误:"+e.message),Promise.reject(e)));const ut={pageUpdate:e=>ft({url:"/iailab-doc-wiki/page/update",method:"post",data:mt.stringify(e)}),pageChangeParent:e=>ft({url:"/iailab-doc-wiki/page/changeParent",method:"post",data:mt.stringify(e)}),pageList:e=>ft({url:"/iailab-doc-wiki/page/list",method:"post",data:mt.stringify(e)}),updatePage:e=>ft({url:"/iailab-doc-wiki/page/update",method:"post",data:mt.stringify(e)}),copyPage:e=>ft({url:"/iailab-doc-wiki/page/copy",method:"post",data:mt.stringify(e)}),movePage:e=>ft({url:"/iailab-doc-wiki/page/move",method:"post",data:mt.stringify(e)}),renamePage:e=>ft({url:"/iailab-doc-wiki/page/rename",method:"post",data:mt.stringify(e)}),pageDetail:e=>ft({url:"/iailab-doc-wiki/page/detail",method:"post",data:mt.stringify(e)}),pageDelete:e=>ft({url:"/iailab-doc-wiki/page/delete",method:"post",data:mt.stringify(e)}),pageHistoryList:e=>ft({url:"/iailab-doc-wiki/page/history/list",method:"post",data:mt.stringify(e)}),pageHistoryDetail:e=>ft({url:"/iailab-doc-wiki/page/history/detail",method:"post",data:mt.stringify(e)}),pageNews:e=>ft({url:"/iailab-doc-wiki/page/news",method:"post",data:mt.stringify(e)}),pageSearchByEs:e=>ft({url:"/iailab-doc-wiki/page/searchByEs",method:"post",data:mt.stringify(e)}),pageLock:e=>ft({url:"/iailab-doc-wiki/page/lock",method:"post",data:mt.stringify(e)}),pageUnlock:e=>ft({url:"/iailab-doc-wiki/page/unlock",method:"post",data:mt.stringify(e)}),spaceFavoriteUpdate:e=>ft({url:"/iailab-doc-wiki/space/favorite/update",method:"post",data:mt.stringify(e)}),spaceAuthAssign:e=>ft({url:"/iailab-doc-wiki/space/auth/assign",method:"post",data:mt.stringify(e)}),spaceAuthList:e=>ft({url:"/iailab-doc-wiki/space/auth/list",method:"post",data:mt.stringify(e)}),spaceSettingList:e=>ft({url:"/iailab-doc-wiki/space/setting/list",method:"post",data:mt.stringify(e)}),spaceSettingUpdate:e=>ft({url:"/iailab-doc-wiki/space/setting/update",method:"post",data:mt.stringify(e)}),spaceList:e=>ft({url:"/iailab-doc-wiki/space/list",method:"post",data:mt.stringify(e)}),updateSpace:e=>ft({url:"/iailab-doc-wiki/space/update",method:"post",data:mt.stringify(e)}),getPageUserAuthList:e=>ft({url:"/iailab-doc-wiki/page/auth/list",method:"post",data:mt.stringify(e)}),assignPageUserAuth:e=>ft({url:"/iailab-doc-wiki/page/auth/assign",method:"post",data:mt.stringify(e)}),deletePageFile:e=>ft({url:"/iailab-doc-wiki/page/file/delete",method:"post",data:mt.stringify(e)}),pageCommentList:e=>ft({url:"/iailab-doc-wiki/page/comment/list",method:"post",data:mt.stringify(e)}),updatePageComment:e=>ft({url:"/iailab-doc-wiki/page/comment/update",method:"post",data:mt.stringify(e)}),deletePageComment:e=>ft({url:"/iailab-doc-wiki/page/comment/delete",method:"post",data:mt.stringify(e)}),pageZanList:e=>ft({url:"/iailab-doc-wiki/page/zan/list",method:"post",data:mt.stringify(e)}),updatePageZan:e=>ft({url:"/iailab-doc-wiki/page/zan/update",method:"post",data:mt.stringify(e)}),openPageDetail:e=>ft({url:"/iailab-doc-wiki/open-api/page/detail",method:"post",data:mt.stringify(e)}),openPageList:e=>ft({url:"/iailab-doc-wiki/open-api/page/list",method:"post",data:mt.stringify(e)}),openSpaceInfo:e=>ft({url:"/iailab-doc-wiki/open-api/space/info",method:"post",data:mt.stringify(e)}),openPageNews:e=>ft({url:"/iailab-doc-wiki/open-api/page/news",method:"post",data:mt.stringify(e)}),addTemplate:e=>ft({url:"/iailab-doc-wiki/template/add",method:"post",data:mt.stringify(e)}),getTemplate:e=>ft({url:"/iailab-doc-wiki/template/filterAll",method:"post",data:mt.stringify(e,{arrayFormat:"indices",allowDots:!0})}),useTemplate:e=>ft({url:"/iailab-doc-wiki/template/use",method:"post",data:mt.stringify(e)}),getTags:e=>ft({url:"/iailab-doc-wiki/template/allTags",method:"post",data:mt.stringify(e)}),xxxxxxxxxxxx:e=>ft({url:"update",method:"post",data:mt.stringify(e)})};const UR={class:"create-space-vue"},jR=R("span",{style:{float:"left"}},"公共空间",-1),qR=R("span",{style:{float:"right",color:"#8492a6","font-size":"13px"}},"属于公共,登录用户可访问、编辑",-1),GR=R("span",{style:{float:"left"}},"个人空间",-1),YR=R("span",{style:{float:"right",color:"#8492a6","font-size":"13px"}},"属于个人,所有登录用户可访问",-1),XR=R("span",{style:{float:"left"}},"隐私空间",-1),ZR=R("span",{style:{float:"right",color:"#8492a6","font-size":"13px"}},"属于个人,仅创建者可访问",-1),$p={__name:"CreateSpace",emits:["success"],setup(e,{expose:t,emit:n}){let l=_(""),a=_({name:[{required:!0,message:"请输入空间名",trigger:"blur"},{min:2,max:25,message:"长度在 2 到 25 个字符",trigger:"blur"}]}),s=_({id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1}),r=_(!1);_(!1);const i=d=>{s.value={id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1},l.value=d||"",l.value&&ut.spaceList({id:l.value}).then(p=>{let m=p.data||[];m.length>0&&(s.value=m[0])}),r.value=!0};let u=_();const c=()=>{u.value.validate(d=>{if(d){let p={id:s.value.id,name:s.value.name,type:s.value.type,openDoc:s.value.openDoc,spaceExplain:s.value.spaceExplain,treeLazyLoad:s.value.treeLazyLoad};ut.updateSpace(p).then(m=>{Ct.success("创建成功"),r.value=!1,n("success",m.data.id)})}})},f=()=>{r.value=!1};return t({show:i}),(d,p)=>{const m=ee("el-input"),h=ee("el-form-item"),v=ee("el-switch"),g=ee("el-option"),y=ee("el-select"),k=ee("el-button"),b=ee("el-form"),C=ee("el-dialog");return w(),O("div",UR,[E(C,{title:"创建空间",modelValue:o(r),"onUpdate:modelValue":p[4]||(p[4]=I=>bt(r)?r.value=I:r=I),width:"600px","close-on-click-modal":!1},{default:N(()=>[E(b,{"label-width":"100px",model:o(s),rules:o(a),ref_key:"newSpaceFormRef",ref:u},{default:N(()=>[E(h,{label:"空间名:",prop:"name"},{default:N(()=>[E(m,{modelValue:o(s).name,"onUpdate:modelValue":p[0]||(p[0]=I=>o(s).name=I)},null,8,["modelValue"])]),_:1}),E(h,{label:"空间描述:",prop:"spaceExplain"},{default:N(()=>[E(m,{modelValue:o(s).spaceExplain,"onUpdate:modelValue":p[1]||(p[1]=I=>o(s).spaceExplain=I)},null,8,["modelValue"])]),_:1}),E(h,{label:"空间开放:"},{default:N(()=>[E(v,{modelValue:o(s).openDoc,"onUpdate:modelValue":p[2]||(p[2]=I=>o(s).openDoc=I),"inactive-text":"需要登录","inactive-value":0,"active-text":"开放访问","active-value":1},null,8,["modelValue"])]),_:1}),E(h,{label:"空间类型:"},{default:N(()=>[E(y,{modelValue:o(s).type,"onUpdate:modelValue":p[3]||(p[3]=I=>o(s).type=I),filterable:"",placeholder:"选择类型",style:{width:"100%"}},{default:N(()=>[(w(),G(g,{key:1,label:"公共空间",value:1},{default:N(()=>[jR,qR]),_:1})),(w(),G(g,{key:2,label:"个人空间",value:2},{default:N(()=>[GR,YR]),_:1})),(w(),G(g,{key:3,label:"隐私空间",value:3},{default:N(()=>[XR,ZR]),_:1}))]),_:1},8,["modelValue"])]),_:1}),E(h,null,{default:N(()=>[o(s).id>0?(w(),G(k,{key:0,type:"primary",onClick:c},{default:N(()=>[ye("保存修改")]),_:1})):(w(),G(k,{key:1,type:"primary",onClick:c},{default:N(()=>[ye("立即创建")]),_:1})),E(k,{onClick:f},{default:N(()=>[ye("取消")]),_:1})]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}};const JR=R("br",null,null,-1),QR=R("br",null,null,-1),eO=["innerHTML"],tO=["innerHTML"],nO={__name:"TemplateManage",props:{pageId:Number,spaceId:Number},emits:"doGetPageList",setup(e,{expose:t,emit:n}){const l=e;let a=Ut(),s=_(1),r=_(0),i=_(!1),u=_({pageId:0,spaceId:0,tagName:"",shareStatus:!1}),c=_(!1);const f=P=>{i.value=P,u.value={pageId:l.pageId,spaceId:l.spaceId,tagName:"",shareStatus:!1},c.value=!0},d=P=>P===1?"公共模板":"个人模板",p=()=>{ut.addTemplate(u.value).then(P=>{Ct.success("模板记录成功"),n("doGetPageList",null)}),c.value=!1},m=()=>{c.value=!1};let h=_(!1),v=_(!1),g=_(!1),y=_([]),k=_([]),b=_(!1),C=_(""),I=_(),T=_(1);const M=()=>{h.value=!0,k.value=[{show:!0,tagName:""}],r.value=0,s.value=1,I.value=[],F()},L=P=>{ut.useTemplate({spaceId:l.spaceId,parentId:l.pageId,templateId:P.templateId}).then(H=>{h.value=!1,n("doGetPageList",null),Ct.success("创建成功"),a.push({path:"/page/edit",query:{parentId:l.pageId,pageId:H.data.id}})})},A=P=>{h.value=!1,a.push({path:"/page/show",query:{spaceId:P.spaceId,pageId:P.id}})},D=()=>{I.value=[],ut.getTemplate({name:C.value,open:b.value,tags:k.value,pageNum:s.value}).then(P=>{r.value=P.total||0,I.value=P.data||[]})},B=()=>{I.value=[],ut.getTemplate({name:C.value,open:b.value,tags:k.value}).then(P=>{r.value=P.total||0,I.value=P.data||[],s.value=1})},F=()=>{ut.getTags({open:b.value}).then(P=>{y.value=P.data||[],k.value=P.data||[],B()})},x=()=>{k.value=y.value.filter(P=>P.show),k.value.length===0&&(k.value=[""]),setTimeout(B(),200)},U=()=>{B()};let X=_(""),K=_(null);const V=P=>{T.value=P.editorType,P.editorType===1&&(X.value=P.content),P.editorType===2&&(X.value=lo.mavonEditor.getMarkdownIt().render(P.content)),setTimeout(W(),500),v.value=!0},W=()=>{const P=[];if(K.value!==void 0||K.value!=="")return;K.value.querySelectorAll("img").forEach((Y,z)=>{P.push(Y.src),Y.onclick=()=>{previewInitialIndex.value=z,showImagePreviewList.value=P,showImagePreview.value=!0}})};return t({showTemplateCreate:f,showTemplateManage:M}),(P,H)=>{const Y=ee("el-input"),z=ee("el-form-item"),q=ee("el-switch"),se=ee("el-button"),pe=ee("el-form"),oe=ee("el-dialog"),re=ee("a-divider"),Q=ee("a-checkable-tag"),ve=ee("a-tag"),_e=ee("el-tooltip"),Te=ee("a-card"),Ie=ee("a-list-item"),Ke=ee("a-list"),Ge=ee("a-pagination"),qe=ee("a-modal"),it=ee("el-row"),ke=Sl("highlight");return w(),O(Ne,null,[E(oe,{title:"设置为模板",modelValue:o(c),"onUpdate:modelValue":H[2]||(H[2]=Ee=>bt(c)?c.value=Ee:c=Ee),width:"600px","close-on-click-modal":!1},{default:N(()=>[E(pe,{"label-width":"100px",model:o(u)},{default:N(()=>[E(z,{label:"模板标签"},{default:N(()=>[E(Y,{modelValue:o(u).tagName,"onUpdate:modelValue":H[0]||(H[0]=Ee=>o(u).tagName=Ee)},null,8,["modelValue"])]),_:1}),E(z,{label:"是否公开"},{default:N(()=>[E(q,{modelValue:o(u).shareStatus,"onUpdate:modelValue":H[1]||(H[1]=Ee=>o(u).shareStatus=Ee),"inactive-text":"个人模板","inactive-value":0,"active-text":"公共模板","active-value":1},null,8,["modelValue"])]),_:1}),E(z,null,{default:N(()=>[o(i)?(w(),G(se,{key:0,type:"primary",onClick:p},{default:N(()=>[ye("保存修改")]),_:1})):(w(),G(se,{key:1,type:"primary",onClick:p},{default:N(()=>[ye("立即创建")]),_:1})),E(se,{onClick:m},{default:N(()=>[ye("取消")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),E(qe,{open:o(h),"onUpdate:open":H[6]||(H[6]=Ee=>bt(h)?h.value=Ee:h=Ee),title:"模板库",width:"100%",wrapClassName:"full-modal","confirm-loading":o(g),destroyOnClose:!0,closable:!0},{footer:N(()=>[]),default:N(()=>[R("div",null,[E(q,{modelValue:o(b),"onUpdate:modelValue":H[3]||(H[3]=Ee=>bt(b)?b.value=Ee:b=Ee),"inactive-text":"个人模板","inactive-value":0,"active-text":"公共模板","active-value":1,onChange:F},null,8,["modelValue"]),E(re,{type:"vertical"}),E(Y,{modelValue:o(C),"onUpdate:modelValue":H[4]||(H[4]=Ee=>bt(C)?C.value=Ee:C=Ee),style:{width:"30%"},onChange:U},null,8,["modelValue"])]),E(re,null,{default:N(()=>[ye("模板标签")]),_:1}),(w(!0),O(Ne,null,Ze(o(y),Ee=>(w(),G(Q,{onClick:Be=>x(Ee.tagName,Ee.show),checked:Ee.show,"onUpdate:checked":Be=>Ee.show=Be,style:{margin:"5px"},size:"big"},{default:N(()=>[ye(ae(Ee.tagName),1)]),_:2},1032,["onClick","checked","onUpdate:checked"]))),256)),E(re),E(Ke,{grid:{gutter:1,column:4,xs:1,sm:1,md:2,lg:2,xl:4,xxl:4},"data-source":o(I)},{renderItem:N(({item:Ee})=>[E(Ie,null,{default:N(()=>[E(Te,{title:Ee.name},{actions:N(()=>[E(_e,{effect:"dark",content:"转到原文档",placement:"top"},{default:N(()=>[E(o(Lv),{onClick:Be=>A(Ee)},null,8,["onClick"])]),_:2},1024),E(_e,{effect:"dark",content:"预览模板",placement:"top"},{default:N(()=>[E(o(Rv),{onClick:Be=>V(Ee)},null,8,["onClick"])]),_:2},1024),E(_e,{effect:"dark",content:"使用模板",placement:"top"},{default:N(()=>[E(o(Ov),{onClick:Be=>L(Ee)},null,8,["onClick"])]),_:2},1024)]),default:N(()=>[E(ve,{color:"#f50"},{default:N(()=>[ye(ae(d(Ee.shareStatus)),1)]),_:2},1024),E(ve,{color:"#87d068"},{default:N(()=>[ye(ae(Ee.tags),1)]),_:2},1024),JR,ye(" "+ae(Ee.createUserName)+" ",1),QR,ye(" "+ae(Ee.createTime)+" ",1)]),_:2},1032,["title"])]),_:2},1024)]),_:1},8,["data-source"]),E(Ge,{simple:"",current:o(s),"onUpdate:current":H[5]||(H[5]=Ee=>bt(s)?s.value=Ee:s=Ee),total:o(r),style:{float:"right"},"page-size":8,"hide-on-single-page":!0,onChange:D},null,8,["current","total"])]),_:1},8,["open","confirm-loading"]),E(qe,{open:o(v),"onUpdate:open":H[7]||(H[7]=Ee=>bt(v)?v.value=Ee:v=Ee),title:"模板预览",width:"100%",wrapClassName:"full-modal",destroyOnClose:!0,closable:!0},{footer:N(()=>[]),default:N(()=>[E(it,null,{default:N(()=>[R("div",{ref_key:"pageContentRef",ref:K,class:"wiki-page-content"},[o(T).value===2?xe((w(),O("div",{key:0,innerHTML:o(X),class:"markdown-body"},null,8,eO)),[[ke]]):(w(),O("div",{key:1,innerHTML:o(X),class:"wang-editor-body"},null,8,tO))],512)]),_:1})]),_:1},8,["open"])],64)}}},lO={class:"i-icon"},oO={viewBox:"0 0 1024 1024",width:"1em",height:"1em"},aO=["fill"],Tp={__name:"IconDocument",props:{fill:{type:String,default:"#515151"}},setup(e){return(t,n)=>(w(),O("span",lO,[(w(),O("svg",oO,[R("path",{fill:e.fill,d:"M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"},null,8,aO)]))]))}};const Bu={__name:"AddMenu",props:{choiceSpace:Number,choosePageId:Number,nowPageId:Number,funcId:Number},emits:["choosePageIdFunc","doGetPageList","createWikiByTemplate"],setup(e,{emit:t}){const n=e;let l=Ut(),a=_(".//iailab-doc-wiki/page/file/import/upload"),s=_([]);const r=f=>{let d=new FormData;d.append("files",f.file),d.append("pageId",n.choosePageId),n.choosePageId===0&&d.append("id",n.choiceSpace),Ka({url:a.value,method:"post",data:d,headers:{"Content-Type":"multipart/form-data"},timeout:1e4,withCredentials:!0}).then(p=>{s.value=[],p.data.errCode===200&&Ct.success("导入成功"),p.data.errCode===300&&(Ct.warning(p.data.errMsg),Ct.warning("文件太多可能超时,如果是超时,请稍等后刷新查看列表~")),t("doGetPageList",null)}).catch(p=>{s.value=[],t("doGetPageList",null),Ct.error("导入失败:"+p.message)})},i=f=>{t("choosePageIdFunc",f)},u=f=>{t("createWikiByTemplate",f)},c=(f,d)=>{if(n.choiceSpace>0){let p="新建文档";f===0&&(p="新建文件夹"),ut.updatePage({spaceId:n.choiceSpace,parentId:d,editorType:f,name:p,content:"",preview:""}).then(m=>{t("doGetPageList",null),Ct.success("创建成功"),f!==0&&l.push({path:"/page/edit",query:{parentId:n.nowPageId.value,pageId:m.data.id}})})}else Ct.warning("请先选择或创建空间")};return(f,d)=>{const p=ee("el-button"),m=ee("a-menu-item"),h=ee("a-upload"),v=ee("el-tooltip"),g=ee("a-menu"),y=ee("a-dropdown");return w(),G(y,{trigger:["click"],onClick:d[5]||(d[5]=k=>i(o(n).funcId))},{overlay:N(()=>[E(g,null,{default:N(()=>[E(m,{key:"1",onClick:d[0]||(d[0]=k=>c(1,o(n).funcId))},{default:N(()=>[E(o(oc),{fill:"#498ba7"}),ye(" 创建富文本 ")]),_:1}),E(m,{key:"2",onClick:d[1]||(d[1]=k=>c(2,o(n).funcId))},{default:N(()=>[E(Tp,{fill:"#558ff2"}),ye(" 创建Markdown ")]),_:1}),E(m,{key:"0",onClick:d[2]||(d[2]=k=>c(0,o(n).funcId))},{default:N(()=>[E(o(ac),{fill:"#ffd149"}),ye(" 创建文件夹 ")]),_:1}),E(m,{key:"4",onClick:d[3]||(d[3]=k=>u(o(n).funcId))},{default:N(()=>[E(o(sc)),ye(" 从模板创建 ")]),_:1}),E(m,{key:"3"},{default:N(()=>[E(v,{content:"支持MD,ZIP格式(图片和MD文件请放到同级目录并配置同级相对路径)",placement:"right-start","show-after":300},{default:N(()=>[E(h,{"file-list":o(s),"onUpdate:fileList":d[4]||(d[4]=k=>bt(s)?s.value=k:s=k),name:"file",multiple:!1,customRequest:r,class:"import-upload"},{default:N(()=>[E(o(Av)),ye(" 导入 ")]),_:1},8,["file-list"])]),_:1})]),_:1})]),_:1})]),default:N(()=>[E(p,{icon:o(za),text:"",class:"add-menu-dropdown-btn"},null,8,["icon"])]),_:1})}}},yn=Ha("pageData",{state:()=>({pageInfo:{},pageAuth:{},fileList:[],choosePageId:0,optionPageId:0,wikiPageList:[],pageIsUnLock:!1})}),sO={style:{padding:"10px",height:"100%","box-sizing":"border-box",background:"#fafafa"}},rO={style:{"margin-bottom":"5px"}},iO={class:"search-option-item"},uO={class:"title"},cO=["innerHTML"],dO=["innerHTML"],fO={key:1,class:"space-folder-box"},pO={class:"wiki-page-tree-box"},xu={__name:"LeftSidebarCli",props:{wikiPageList:Array,spaceOptions:Array,nowPageId:Number,choiceSpace:Number,readOnly:Boolean},emits:["doGetPageList","spaceChangeEvents","setNowPageId"],setup(e,{expose:t,emit:n}){const l=e;let a=_(""),s=_("点击收起目录"),r=_(!1),i=_("el-tree"),u=_([]);dn();let c=Ut(),f=_({children:"children",label:"name"});_({});let d=_(),p=dl();const m=I=>{n("spaceChangeEvents",I,l.readOnly)},h=(I,T)=>{if(!I||!I.trim()){T([]);return}ut.pageNews({spaceId:l.choiceSpace,keywords:I}).then(M=>{let L=M.data||[];T(L)})},v=I=>{a.value="",c.push({path:"/page/show",query:{pageId:I.pageId}})},g=()=>{r.value?(i.value="el-tree",s.value="点击收起目录",r.value=!1):(i.value="hidTree",s.value="点击展开目录",r.value=!0)},y=(I,T)=>!I||!T.name?!0:T.name.toLowerCase().indexOf(I.toLowerCase())!==-1,k=()=>{d.value.filter(a.value)};yn();const b=I=>{p.showHeader=!0,n("setNowPageId",I.id,l.readOnly),!l.readOnly&&I.editorType!==0&&c.push({path:"/page/show",query:{pageId:I.id}})},C=(I,T,M,L)=>{console.log("tree drop: ",I.data,T.data,M);var A={id:I.data.id,parentId:T.data.parentId};M=="inner"?A.parentId=T.data.id:M=="before"?A.beforeSeq=T.data.seqNo:M=="after"&&(A.afterSeq=T.data.seqNo),ut.pageChangeParent(A).then(D=>{n("doGetPageList",node.id,node)})};return t({searchByKeywords:k}),(I,T)=>{const M=ee("el-option"),L=ee("el-option-group"),A=ee("el-select"),D=ee("el-autocomplete"),B=ee("el-tooltip"),F=ee("el-col"),x=ee("el-row"),U=ee("el-tree");return w(),O("div",sO,[R("div",rO,[E(A,{"model-value":e.choiceSpace,filterable:"",placeholder:"选择空间",onChange:m,style:{width:"100%"}},{default:N(()=>[o(l).readOnly?Z("",!0):(w(),G(L,{key:0,label:""},{default:N(()=>[(w(),G(M,{key:-1,label:"空间管理",value:-1}))]),_:1})),E(L,{label:""}),(w(!0),O(Ne,null,Ze(e.spaceOptions,X=>(w(),G(M,{key:X.value,label:X.label,value:X.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])]),o(l).readOnly?Z("",!0):(w(),G(D,{key:0,modelValue:o(a),"onUpdate:modelValue":T[0]||(T[0]=X=>bt(a)?a.value=X:a=X),"fetch-suggestions":h,placeholder:"在当前空间搜索","popper-class":"search-autocomplete",style:{width:"100%",margin:"10px 0"},onSelect:v},{default:N(({item:X})=>[R("div",iO,[R("div",uO,[R("span",{innerHTML:X.pageTitle||"-"},null,8,cO)]),R("span",{class:"content",innerHTML:X.previewContent||"-"},null,8,dO)])]),_:1},8,["modelValue"])),o(l).readOnly?Z("",!0):(w(),O("div",fO,[E(x,{justify:"space-between"},{default:N(()=>[E(F,{span:12},{default:N(()=>[E(B,{style:{margin:"4px"},effect:"dark",content:o(s),placement:"top"},{default:N(()=>[R("span",{style:{color:"#888","font-size":"12px",cursor:"pointer","line-height":"32px"},onClick:g},"空间目录")]),_:1},8,["content"])]),_:1}),E(F,{span:12,style:{"text-align":"right"}},{default:N(()=>[ie(I.$slots,"addMenuDir")]),_:3})]),_:3})])),R("div",pO,[E(U,{class:$(o(i)),ref_key:"wikiPageTreeRef",ref:d,"current-node-key":o(l).nowPageId,data:o(l).wikiPageList,"default-expanded-keys":o(u),"expand-on-click-node":!0,"filter-node-method":y,props:o(f),draggable:!o(l).readOnly,"highlight-current":"","node-key":"id",style:{"background-color":"#fafafa"},onNodeClick:b,onNodeDrop:C},xn({_:2},[o(l).readOnly?void 0:{name:"default",fn:N(({node:X,data:K})=>[ie(I.$slots,"addMenuNode",{node:X,data:K})]),key:"0"}]),1032,["class","current-node-key","data","default-expanded-keys","props","draggable"])])])}}},zo=Ha("spaceData",{state:()=>({spaceInfo:{},chooseSpaceId:1,spaceOptions:[],spaceList:[]})});const vO=["onMouseover"],mO={class:"node-content"},hO={class:"left-icon"},gO={key:2,style:{"vertical-align":"middle","margin-right":"5px"}},yO={__name:"LeftSidebar",setup(e,{expose:t}){let n=dn(),l=Ut(),a=yn();dl();let s=zo(),r=_({}),i=_(0),u=_(0),c=_([]);_({}),_([]),_(300);let f=_(""),d=_(!1),p=_(!1),m=_(!1),h=_(null);ze(()=>{v()});const v=()=>{U()},g=K=>{h.value.showTemplateCreate(K)},y=()=>{h.value.showTemplateManage()},k=K=>K===1?"公共模板":"个人模板",b=K=>{p.value=K,d.value=!0,i.value=a.choosePageId,u.value=s.chooseSpaceId,c.value=a.wikiPageList},C=K=>{if(m.value=!0,p.value){ut.movePage({id:a.optionPageId,spaceId:s.chooseSpaceId,moveToPageId:i.value,moveToSpaceId:u.value}).then(V=>{X(),Ct.success("迁移成功"),I(),m.value=!1}).catch(V=>{m.value=!1});return}ut.copyPage({id:a.optionPageId,spaceId:s.chooseSpaceId,moveToPageId:i.value,moveToSpaceId:u.value}).then(V=>{X(),Ct.success("复制成功"),I(),m.value=!1}).catch(V=>{m.value=!1})},I=()=>{d.value=!1,i.value=0,u.value=0,c.value=[]},T=K=>{let V="确定要删除此页面及其所有子页面吗?";K!==void 0&&(V="选中的页面是:"+k(K)+"删除后无法使用此模板! 确定要删除此页面及其所有子页面吗?"),Tl.confirm(V,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{let W={pageId:K.id};ut.pageDelete(W).then(()=>{Ct.success("已删除"),X()})}).catch(()=>{})},M=K=>{a.optionPageId=K},L=(K,V)=>{if(V){i.value=K;return}a.choosePageId=K},A=(K,V)=>{console.log(V),V.renaming=!0},D=(K,V)=>{ut.renamePage({id:V.id,name:V.name}).then(W=>{X(),Ct.success("重命名成功"),V.renaming=!1})},B=K=>{f.value=K.id};let F=_();const x=(K,V)=>{if(a.pageInfo={},V){u.value=K,L(0,V);let W={spaceId:u.value};ut.pageList(W).then(P=>{c.value=P.data||[]});return}K===0?F.value.show():K===-1?l.push({path:"/space/manage"}):(a.choosePageId=0,s.chooseSpaceId=Number(K),r.value=s.spaceList.find(W=>W.id===K),s.spaceInfo=r.value,X(),l.push({path:"/home",query:{spaceId:K}}))},U=K=>{ut.spaceList({}).then(V=>{s.spaceList=V.data||[];let W=[];if(s.spaceList.forEach(P=>W.push({label:P.name,value:P.id})),s.spaceOptions=W,s.spaceList.length>0){let P=K,H=s.spaceList.find(Y=>Y.id===K);H||(H=s.spaceList[0],P=H.id),r.value=H,s.spaceInfo=H,s.chooseSpaceId=P,a.choosePageId=0,X();try{n.path==="/home"&&l.push({path:"/home",query:{spaceId:P}})}catch(Y){console.log(Y)}}})},X=(K,V)=>{let W={spaceId:s.chooseSpaceId};ut.pageList(W).then(P=>{a.wikiPageList=P.data||[]})};return t({init:v}),(K,V)=>{const W=ee("a-tag"),P=ee("el-tooltip"),H=ee("a-input"),Y=ee("el-button"),z=ee("a-menu-item"),q=ee("a-sub-menu"),se=ee("a-menu"),pe=ee("a-dropdown"),oe=ee("a-modal");return w(),O(Ne,null,[E(xu,{readOnly:!1,wikiPageList:o(a).wikiPageList,spaceOptions:o(s).spaceOptions,nowPageId:o(a).choosePageId,choiceSpace:o(s).chooseSpaceId,onSetNowPageId:L,onDoGetPageList:X,onSpaceChangeEvents:x},{addMenuDir:N(()=>[E(Bu,{choiceSpace:o(s).chooseSpaceId,choosePageId:o(a).optionPageId,nowPageId:o(a).choosePageId,funcId:0,onCreateWikiByTemplate:y,onChoosePageIdFunc:M,onDoGetPageList:X},null,8,["choiceSpace","choosePageId","nowPageId"])]),addMenuNode:N(({node:re,data:Q})=>[R("div",{class:"page-tree-node",onMouseover:ve=>B(Q)},[R("div",mO,[R("span",hO,[Q.editorType===0?(w(),O(Ne,{key:0},[re.expanded?(w(),G(o(ac),{key:0,class:"el-icon"})):(w(),G(o(Vv),{key:1,class:"el-icon"}))],64)):Q.editorType===1?(w(),G(o(oc),{key:1,class:"el-icon"})):Q.editorType===2?(w(),G(Tp,{key:2,class:"el-icon"})):Z("",!0)]),Q.shareStatus!==void 0?(w(),G(P,{key:0,content:Q.tags,placement:"top-start","show-after":500},{default:N(()=>[E(W,{color:"warning",style:{"margin-inline-end":"4px","padding-inline":"4px"}},{default:N(()=>[ye(ae(k(Q.shareStatus)),1)]),_:2},1024)]),_:2},1032,["content"])):Z("",!0),Q.renaming?(w(),G(H,{key:1,value:Q.name,"onUpdate:value":ve=>Q.name=ve,class:"rename-input",placeholder:"请输入文档名称",onBlur:ve=>D(re,Q),onClick:V[0]||(V[0]=Fe(()=>{},["stop"]))},null,8,["value","onUpdate:value","onBlur"])):(w(),O("span",gO,[E(P,{content:re.label,placement:"top-start","show-after":700},{default:N(()=>[ye(ae(re.label),1)]),_:2},1032,["content"])])),R("div",{class:$(["page-action-box",Q.renaming?"renaming":""]),onClick:V[3]||(V[3]=Fe(()=>{},["stop"]))},[E(Bu,{choiceSpace:o(s).chooseSpaceId,choosePageId:o(a).optionPageId,nowPageId:o(a).choosePageId,funcId:Q.id,onCreateWikiByTemplate:y,onChoosePageIdFunc:M,onDoGetPageList:X},null,8,["choiceSpace","choosePageId","nowPageId","funcId"]),E(pe,{trigger:["click"],onClick:ve=>M(Q.id)},{overlay:N(()=>[E(se,null,{default:N(()=>[E(z,{onClick:ve=>A(re,Q)},{default:N(()=>[E(o(Dv),{class:"el-icon"}),ye(" 重命名 ")]),_:2},1032,["onClick"]),E(q,{title:"移动文档"},{icon:N(()=>[E(o(Bv))]),default:N(()=>[E(z,{onClick:V[1]||(V[1]=ve=>b(!1))},{default:N(()=>[E(o(xv)),ye(" 复制文档 ")]),_:1}),E(z,{onClick:V[2]||(V[2]=ve=>b(!0))},{default:N(()=>[E(o(Fv)),ye(" 迁移文档 ")]),_:1})]),_:1}),Q.editorType!==0?(w(),G(z,{key:0,onClick:ve=>g(Q.shareStatus!==void 0)},{default:N(()=>[E(o(sc)),ye(" 设为模板 ")]),_:2},1032,["onClick"])):Z("",!0),E(z,{onClick:ve=>T(Q)},{default:N(()=>[E(o(zv),{class:"el-icon"}),ye(" 删除 ")]),_:2},1032,["onClick"])]),_:2},1024)]),default:N(()=>[E(Y,{icon:o(Ca),text:"",class:"page-action-dropdown-btn"},null,8,["icon"])]),_:2},1032,["onClick"])],2)])],40,vO)]),_:1},8,["wikiPageList","spaceOptions","nowPageId","choiceSpace"]),E(nO,{ref_key:"templateManageRef",ref:h,pageId:o(a).optionPageId,spaceId:o(s).chooseSpaceId,onDoGetPageList:X},null,8,["pageId","spaceId"]),E($p,{ref_key:"createSpaceRef",ref:F,onSuccess:U},null,512),E(oe,{open:o(d),"onUpdate:open":V[4]||(V[4]=re=>bt(d)?d.value=re:d=re),title:"选择",onOk:C,onCancel:I,"ok-text":"确认","cancel-text":"取消","confirm-loading":o(m),destroyOnClose:!0,closable:!1},{default:N(()=>[E(xu,{readOnly:!0,wikiPageList:o(c),spaceOptions:o(s).spaceOptions,nowPageId:o(i),choiceSpace:o(u),onSetNowPageId:L,onDoGetPageList:X,onSpaceChangeEvents:x},null,8,["wikiPageList","spaceOptions","nowPageId","choiceSpace"])]),_:1},8,["open","confirm-loading"])],64)}}},fi=Ha("userData",{state:()=>({userInfo:{}})}),Yn={userLogin:e=>ft({url:"/login",method:"post",data:mt.stringify(e)}),ssoLoginPasswordCallback:e=>ft({url:"/ssoLoginPasswordCallback",method:"post",data:mt.stringify(e)}),userLogout:()=>ft({url:"/logout",method:"post",data:mt.stringify({})}),getSelfUserInfo:()=>ft({url:"/user/info/selfInfo",method:"post",data:mt.stringify({})}),getUserBaseInfo:e=>ft({url:"/iailab-doc-wiki/common/user/base",method:"post",data:mt.stringify(e)}),userGroupList:e=>ft({url:"/user/group/list",method:"post",data:mt.stringify(e)}),getUserMessageList:e=>ft({url:"/user/message/list",method:"post",data:mt.stringify(e)}),readUserMessage:e=>ft({url:"/user/message/read",method:"post",data:mt.stringify(e)}),deleteUserMessage:e=>ft({url:"/user/message/delete",method:"post",data:mt.stringify(e)})};const bO={__name:"PageAuthDialog",props:{visible:Boolean,data:Object},emits:["update:visible","ok"],setup(e,{emit:t}){const n=e;let l=yn(),a=_(!1);ue(a,()=>{t("update:visible",a.value)}),ue(()=>n.visible,()=>{a.value=n.visible,c()}),ze(()=>{a.value=n.visible,c()});let s=_([]),r=_([]),i=_(),u=_(!1);const c=()=>{if(!a.value)return;i.value="",s.value=[];let v={pageId:l.pageInfo.id};ut.getPageUserAuthList(v).then(g=>{s.value=g.data||[]})},f=()=>{if(!i.value){Ct.warning("请先选择用户");return}if(s.value.find(g=>g.userId===i.value)){i.value=void 0;return}let v=r.value.find(g=>g.id===i.value);v||(s.value.push({userId:v.id,userName:v.userName,editPage:0,commentPage:0,deletePage:0,pageFileUpload:0,pageFileDelete:0,pageAuthManage:0}),i.value="")},d=v=>{v&&(u.value=!0,Yn.getUserBaseInfo({search:v}).then(g=>{r.value=g.data||[],u.value=!1}))},p=()=>{let v={pageId:l.pageInfo.id,authList:JSON.stringify(s.value)};ut.assignPageUserAuth(v).then(()=>{Ct.success("保存成功!")})},m=()=>{a.value=!1},h=v=>{s.value=s.value.filter(g=>g.userId!==v.userId)};return(v,g)=>{const y=ee("el-option"),k=ee("el-select"),b=ee("el-button"),C=ee("el-row"),I=ee("el-table-column"),T=ee("el-checkbox"),M=ee("el-table"),L=ee("el-dialog");return w(),G(L,{title:"页面权限",modelValue:o(a),"onUpdate:modelValue":g[1]||(g[1]=A=>bt(a)?a.value=A:a=A),width:"800px",class:"page-auth-dialog"},{footer:N(()=>[E(b,{onClick:m},{default:N(()=>[ye("取消")]),_:1}),E(b,{type:"primary",onClick:p},{default:N(()=>[ye("保存配置")]),_:1})]),default:N(()=>[E(C,null,{default:N(()=>[E(k,{modelValue:o(i),"onUpdate:modelValue":g[0]||(g[0]=A=>bt(i)?i.value=A:i=A),filterable:"",remote:"","reserve-keyword":"",autoComplete:"new-password",placeholder:"请输入名字、邮箱、账号搜索用户","remote-method":d,loading:o(u),style:{width:"690px","margin-right":"10px"}},{default:N(()=>[(w(!0),O(Ne,null,Ze(o(r),A=>(w(),G(y,{key:A.id,label:A.userName,value:A.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"]),E(b,{onClick:f},{default:N(()=>[ye("添加")]),_:1})]),_:1}),E(M,{data:o(s),border:"",style:{width:"100%",margin:"10px 0"}},{default:N(()=>[E(I,{prop:"userName",label:"用户",width:"150"}),E(I,{label:"权限"},{default:N(A=>[E(T,{"true-label":1,"false-label":0,modelValue:A.row.editPage,"onUpdate:modelValue":D=>A.row.editPage=D},{default:N(()=>[ye("编辑")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(T,{"true-label":1,"false-label":0,modelValue:A.row.deletePage,"onUpdate:modelValue":D=>A.row.deletePage=D},{default:N(()=>[ye("删除")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(T,{"true-label":1,"false-label":0,modelValue:A.row.pageFileUpload,"onUpdate:modelValue":D=>A.row.pageFileUpload=D},{default:N(()=>[ye("文件上传")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(T,{"true-label":1,"false-label":0,modelValue:A.row.pageFileDelete,"onUpdate:modelValue":D=>A.row.pageFileDelete=D},{default:N(()=>[ye("文件删除")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(T,{"true-label":1,"false-label":0,modelValue:A.row.pageAuthManage,"onUpdate:modelValue":D=>A.row.pageAuthManage=D},{default:N(()=>[ye("权限管理")]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1}),E(I,{label:"操作",width:"80"},{default:N(A=>[E(b,{size:"small",type:"danger",plain:"",onClick:D=>h(A.row)},{default:N(()=>[ye("删除")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1},8,["modelValue"])}}};const wO={style:{"text-align":"center"}},kO={class:"mobile-qr"},CO=R("div",null,"使用微信或手机浏览器扫一扫查看",-1),SO=["href"],_O={__name:"MobileQrScanDialog",props:{visible:Boolean,data:Object},emits:["update:visible","ok"],setup(e,{emit:t}){const n=e;let l=yn(),a=zo();const s=Ut();let r=_(!1);ue(r,()=>{t("update:visible",r.value)}),ue(()=>n.visible,()=>{r.value=n.visible,c()}),ze(()=>{r.value=n.visible,c()});let i=_(""),u=_();const c=()=>{if(!r.value)return;let f=s.resolve({path:"/page/share/mobile/view",query:{pageId:l.pageInfo.id,space:a.spaceInfo.uuid}}),d=window.location.href.split("#")[0];setTimeout(()=>{i.value=d+f.href,Hv.toCanvas(u.value,i.value,{scale:5,height:250,wight:250},p=>{p&&console.error(p)})},0)};return(f,d)=>{const p=ee("el-dialog");return w(),G(p,{title:"手机扫码查看",modelValue:o(r),"onUpdate:modelValue":d[0]||(d[0]=m=>bt(r)?r.value=m:r=m),width:"400px"},{default:N(()=>[R("div",wO,[R("div",kO,[R("canvas",{ref_key:"qrCodeDivRef",ref:u},null,512)]),CO,R("div",null,[ye("或 "),R("a",{target:"_blank",href:o(i)},"直接访问",8,SO)])])]),_:1},8,["modelValue"])}}},EO={systemUpgradeInfo:e=>ft({url:"/system/info/upgrade",method:"post",data:mt.stringify(e)}),fetchMoudleData:e=>ft({url:"/system/info/module",method:"get",data:mt.stringify(e)})};const $O={class:"about-content"},TO=R("div",{class:"doc-name"},"iailab文档管理中心",-1),IO={class:"doc-desc"},NO=R("div",{class:"slogan"},"iailab私有化部署的在线知识库管理平台",-1),PO=R("div",null,[ye(" 版权所有 © 2019-2024 "),R("a",{target:"_blank",href:"https://doc.iailab.com"},"doc.iailab.com")],-1),MO={__name:"AboutDialog",props:{visible:Boolean},emits:["update:visible","ok"],setup(e,{emit:t}){const n=e;fi();let l=_(!1);ue(l,()=>{t("update:visible",l.value)}),ue(()=>n.visible,()=>{l.value=n.visible}),ze(()=>{l.value=n.visible,s()});let a=_({});const s=()=>{EO.systemUpgradeInfo({}).then(r=>{r.data&&(a.value=r.data)})};return(r,i)=>{const u=ee("el-dialog");return w(),G(u,{title:"关于",modelValue:o(l),"onUpdate:modelValue":i[0]||(i[0]=c=>bt(l)?l.value=c:l=c),width:"600px",class:"about-iailab-doc"},{default:N(()=>[R("div",$O,[TO,R("div",IO,[NO,R("div",null,"当前版本 "+ae(o(a).nowVersion||"1.0.0"),1),PO])])]),_:1},8,["modelValue"])}}};const LO={class:"user-message-popover"},RO={class:"header"},OO=R("span",{class:"title"},"文档通知",-1),AO={class:"header-user-message"},VO={class:"page-info-box"},DO={__name:"UserMessagePopover",setup(e){let t=Ut(),n=_(),l=_([]),a=_(0),s=_(!1),r=_(0),i=_({sysType:2,pageNum:1,pageSize:20}),u;ze(()=>{c(),u=setInterval(()=>{c()},10*1e3)}),Rt(()=>{u&&clearInterval(u)});const c=()=>{Yn.getUserMessageList(i.value).then(m=>{l.value=m.data||[],r.value=m.total||0,a.value=l.value.filter(h=>h.msgStatus===0).length})},f=m=>{m.msgStatus===0&&Yn.readUserMessage({ids:m.id}).then(()=>{c()}),m.msgType>=2&&m.msgType<=14&&(t.push({path:"/page/show",query:{pageId:m.dataId}}),s.value=!1)},d=()=>{let m=[];l.value.filter(h=>h.msgStatus===0).forEach(h=>{m.push(h.id)}),!(m.length<=0)&&Yn.readUserMessage({ids:m.join(",")}).then(()=>{Ct.success("标记成功"),c()})},p=m=>{i.value.pageNum=m,c()};return(m,h)=>{const v=ee("el-button"),g=ee("el-badge"),y=ee("el-tooltip"),k=ee("el-link"),b=ee("el-table-column"),C=ee("el-table"),I=ee("el-pagination"),T=ee("el-popover");return w(),O("span",LO,[E(y,{content:"文档通知"},{default:N(()=>[E(g,{value:o(a),max:99,hidden:o(a)<=0},{default:N(()=>[E(v,{ref_key:"remindButtonRef",ref:n,class:"hover-button",text:""},{default:N(()=>[E(o(Kv),{size:"18"})]),_:1},512)]),_:1},8,["value","hidden"])]),_:1}),E(T,{visible:o(s),"onUpdate:visible":h[0]||(h[0]=M=>bt(s)?s.value=M:s=M),placement:"bottom",width:700,trigger:"click","popper-class":"header-user-remind",ref:"popoverRef","virtual-ref":o(n),"virtual-triggering":""},{default:N(()=>[R("div",RO,[OO,o(a)>0?(w(),G(k,{key:0,icon:o(no),type:"primary",onClick:d},{default:N(()=>[ye("本页标记已读")]),_:1},8,["icon"])):Z("",!0)]),R("div",AO,[E(C,{data:o(l),stripe:"","max-height":"400",style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(b,{label:"操作时间",prop:"creationTime",width:"150px"}),E(b,{label:"内容",prop:"msgContent","show-overflow-tooltip":""}),E(b,{width:"60px"},{default:N(M=>[E(g,{"is-dot":M.row.msgStatus===0,style:{"line-height":"10px","padding-right":"5px"}},{default:N(()=>[E(k,{type:"primary",onClick:L=>f(M.row)},{default:N(()=>[ye("查看")]),_:2},1032,["onClick"])]),_:2},1032,["is-dot"])]),_:1})]),_:1},8,["data"]),R("div",VO,[E(I,{background:"","current-page":o(i).pageNum,"page-size":o(i).pageSize,total:o(r),layout:"prev, pager, next, total",onCurrentChange:p},null,8,["current-page","page-size","total"])])])]),_:1},8,["visible","virtual-ref"])])}}};let BO="./";function xO(e){return FO(BO,e)}function FO(e,t){return!e||!t?!e&&!t?"":e||t:e.endsWith("/")&&t.startsWith("/")?e+t.substring(1):!e.endsWith("/")&&!t.startsWith("/")?e+"/"+t:e+t}const zO={class:"left-action-box"},HO={class:"collapse-box"},KO={key:0,class:"title-time-box"},WO={class:"title"},UO={class:"text"},jO={class:"time"},qO={class:"header-action-box"},GO={style:{"line-height":"60px",display:"inline-block",margin:"0 8px"}},YO={style:{"line-height":"60px",display:"inline-block"}},XO=["action"],ZO=["name","value"],JO={__name:"RightHeader",emits:["collapse"],setup(e,{emit:t}){let n=Ut(),l=yn(),a=dl(),s=fi(),r=zo(),i=()=>{a.showMenu=!a.showMenu,setTimeout(()=>{a.showMenu?a.rightAsideWidth=301:a.rightAsideWidth=1},100)};ue(()=>s.ts,()=>{console.clear()}),ue(()=>l.favoritePageChange,T=>{if(l.needVersion){Ct.warning("不支持在指定版本后收藏页面");return}});const u=()=>{l.pageIsUnlock=!1;let T={pageId:l.pageInfo.id};ut.pageLock(T).then(()=>{n.push({path:"/page/edit",query:{pageId:l.pageInfo.id}})})},c=()=>{a.commentShow=!a.commentShow};let f=_(!1);const d=()=>{f.value=!0},p=()=>{if(r.spaceInfo.openDoc!==1)Ct.warning("该空间未开放,无法查看开放文档地址");else{let T=n.resolve({path:"/page/share/view",query:{pageId:l.pageInfo.id,space:r.spaceInfo.uuid}});window.open(T.href,"_blank")}},m=()=>{Tl.confirm("确定要删除此页面及其所有子页面吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{ut.pageDelete({pageId:l.pageInfo.id}).then(()=>{ut.pageList({spaceId:r.chooseSpaceId}).then(T=>{l.wikiPageList=T.data||[]}).then(()=>{n.push({path:"/home",query:{spaceId:l.pageInfo.spaceId}})})})}).catch(T=>{console.log(T)})};let h=_(),v=_({url:xO("iailab-doc-wiki/page/download"),param:{}});const g=()=>{let M=document.getElementById("pageContentBox").innerHTML||"";v.value.param={pageId:l.pageInfo.id,content:M},setTimeout(()=>h.value.submit(),0)};let y=_(!1);const k=()=>{r.spaceInfo.openDoc!==1?Ct.warning("该空间未开放,无法查看开放文档地址"):y.value=!0},b=()=>{Yn.userLogout().then(()=>{n.push("/user/login")})};let C=_(!1);const I=()=>{C.value=!0};return(T,M)=>{const L=ee("el-button"),A=ee("el-col"),D=ee("el-tooltip"),B=ee("el-icon"),F=ee("a-menu-item"),x=ee("a-menu-divider"),U=ee("a-menu"),X=ee("a-dropdown"),K=ee("el-row");return w(),O(Ne,null,[E(K,null,{default:N(()=>[E(A,{span:12},{default:N(()=>[R("div",zO,[R("div",HO,[o(a).showMenu?(w(),G(L,{key:0,onClick:o(i),text:"",icon:o(rc),class:"fold-btn"},null,8,["onClick","icon"])):(w(),G(L,{key:1,onClick:o(i),text:"",icon:o(ic),class:"fold-btn"},null,8,["onClick","icon"]))]),o(a).currentPage==="view"?(w(),O("div",KO,[R("div",WO,[R("span",UO,ae(o(l).pageInfo.name||""),1)]),R("div",jO,"最近修改:"+ae(o(l).pageInfo.updateTime||""),1)])):Z("",!0)])]),_:1}),E(A,{span:12,style:{"text-align":"right"}},{default:N(()=>[R("div",qO,[o(a).currentPage==="view"?(w(),O(Ne,{key:0},[o(l).pageAuth.canEdit===1?(w(),G(D,{key:0,content:"编辑文档"},{default:N(()=>[E(L,{class:"hover-button",onClick:u,text:""},{default:N(()=>[E(o(Wv),{size:"18"})]),_:1})]),_:1})):Z("",!0),E(D,{content:"文档沟通"},{default:N(()=>[E(L,{class:"hover-button",onClick:c,text:""},{default:N(()=>[E(o(Uv),{size:"18"})]),_:1})]),_:1}),E(DO),E(X,{trigger:"click",placement:"bottom",overlayClassName:"header-action-more-dropdown"},{overlay:N(()=>[E(U,null,{default:N(()=>[o(l).pageAuth.canConfigAuth===1?(w(),G(F,{key:0,onClick:d},{default:N(()=>[E(B,null,{default:N(()=>[E(o(jv))]),_:1}),ye(" 权限设置")]),_:1})):Z("",!0),o(r).spaceInfo.openDoc===1?(w(),G(F,{key:1,onClick:p},{default:N(()=>[E(B,null,{default:N(()=>[E(o(qv))]),_:1}),ye(" 查看开放文档")]),_:1})):Z("",!0),o(r).spaceInfo.openDoc===1?(w(),G(F,{key:2,onClick:k},{default:N(()=>[E(B,null,{default:N(()=>[E(o(Gv))]),_:1}),ye(" 手机端查看")]),_:1})):Z("",!0),E(F,{onClick:g},{default:N(()=>[E(B,null,{default:N(()=>[E(o(Yv))]),_:1}),ye("导出为Word")]),_:1}),E(x),o(l).pageAuth.canDelete===1?(w(),G(F,{key:3,onClick:m,class:"delete"},{default:N(()=>[E(B,null,{default:N(()=>[E(o(br))]),_:1}),ye(" 删除")]),_:1})):Z("",!0)]),_:1})]),default:N(()=>[R("span",GO,[E(L,{icon:o(Ca),class:"hover-button",text:""},null,8,["icon"])])]),_:1})],64)):Z("",!0),E(X,{trigger:"click",placement:"bottom",overlayClassName:"header-action-user-dropdown"},{overlay:N(()=>[E(U,null,{default:N(()=>[E(F,{onClick:I},{default:N(()=>[ye("关于")]),_:1}),E(x),E(F,{onClick:b},{default:N(()=>[ye("退出登录")]),_:1})]),_:1})]),default:N(()=>[R("span",YO,[E(L,{icon:o(Xv),class:"hover-button",text:""},null,8,["icon"])])]),_:1})])]),_:1})]),_:1}),E(_O,{visible:o(y),"onUpdate:visible":M[0]||(M[0]=V=>bt(y)?y.value=V:y=V)},null,8,["visible"]),E(bO,{visible:o(f),"onUpdate:visible":M[1]||(M[1]=V=>bt(f)?f.value=V:f=V)},null,8,["visible"]),E(MO,{visible:o(C),"onUpdate:visible":M[2]||(M[2]=V=>bt(C)?C.value=V:C=V)},null,8,["visible"]),R("form",{method:"post",ref_key:"downloadFormRef",ref:h,action:o(v).url,target:"_blank"},[(w(!0),O(Ne,null,Ze(o(v).param,(V,W)=>(w(),O("input",{type:"hidden",name:W,value:V},null,8,ZO))),256))],8,XO)],64)}}},QO=Jn(JO,[["__scopeId","data-v-db97c018"]]);const eA={__name:"RightResize",emits:["update:value","change"],setup(e,{emit:t}){let n=300;ze(()=>{a()});let l=_();const a=()=>{let s=l.value;s.onmousedown=r=>{let i=r.clientX;return s.left=s.offsetLeft,document.onmousemove=u=>{let c=u.clientX,f=i-c;(f<0&&n<600||f>0&&n>300)&&(i=c,n-=f,n<300&&(n=300),t("update:value",n),t("change",n))},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null},!1}};return(s,r)=>(w(),O("div",{ref_key:"rightResizeRef",ref:l,class:"right-resize"},null,512))}},Ip=Jn(eA,[["__scopeId","data-v-bc03f234"]]);const tA={class:"global-layout-vue"},nA={__name:"GlobalLayout",setup(e){let t=dl();const n=l=>{t.rightAsideWidth=l,t.commentShow=l};return(l,a)=>{const s=ee("el-aside"),r=ee("el-header"),i=ee("router-view"),u=ee("el-main"),c=ee("el-container");return w(),O("div",tA,[E(c,null,{default:N(()=>[xe(E(s,{style:Re({width:o(t).rightAsideWidth+"px"})},{default:N(()=>[E(yO,{ref:"leftSideBarRef"},null,512)]),_:1},8,["style"]),[[lt,o(t).showMenu]]),xe(E(Ip,{value:o(t).rightAsideWidth,"onUpdate:value":a[0]||(a[0]=f=>o(t).rightAsideWidth=f),onChange:n},null,8,["value"]),[[lt,o(t).showMenu]]),E(c,null,{default:N(()=>[o(t).showHeader?(w(),G(r,{key:0},{default:N(()=>[E(QO,{ref:"rightHeaderRef"},null,512)]),_:1})):Z("",!0),E(u,{style:{padding:"0"}},{default:N(()=>[E(i)]),_:1})]),_:1})]),_:1})])}}};const lA=e=>(fr("data-v-d74018ea"),e=e(),pr(),e),oA={style:{height:"100%"}},aA={class:"logo"},sA={style:{padding:"10px","box-sizing":"border-box",background:"#fafafa"}},rA={class:"wiki-page-tree-box"},iA={class:"page-tree-node"},uA={class:"label"},cA={class:"text"},dA=lA(()=>R("div",{class:"build-info"},[ye("本文档使用"),R("a",{target:"_blank",href:"https://gitee.com/iailab/iailab-doc"},"iailab-doc"),ye("构建")],-1)),fA={__name:"ShareLayout",setup(e){let t=_(!0),n=_({children:"children",label:"name"}),l=_(""),a=_(""),s=_({}),r=_(""),i=_([]),u=_([]),c=_(300),f=dn(),d=Ut();ze(()=>{l.value=f.query.space||"",y(),g()});const p=(k,b)=>!k||!b.name?!0:b.name.toLowerCase().indexOf(k.toLowerCase())!==-1,m=k=>{a.value!=k.id&&(a.value=k.id,d.push({path:"/page/share/view",query:{pageId:k.id,space:l.value}}))};let h=_();const v=()=>{h.value.filter(r.value)},g=()=>{ut.openPageList({space:l.value}).then(k=>{i.value=k.data||[],a.value=""})},y=()=>{ut.openSpaceInfo({space:l.value}).then(k=>{s.value=k.data})};return(k,b)=>{const C=ee("el-button"),I=ee("el-input"),T=ee("el-icon"),M=ee("el-tooltip"),L=ee("el-tree"),A=ee("el-aside"),D=ee("router-view"),B=ee("el-main"),F=ee("el-container");return w(),O("div",oA,[E(F,null,{default:N(()=>[xe(E(A,{width:"300px",style:Re([{"background-color":"#fafafa"},{width:o(c)+"px"}])},{default:N(()=>[R("div",aA,ae(o(s).name),1),R("div",sA,[E(I,{modelValue:o(r),"onUpdate:modelValue":b[0]||(b[0]=x=>bt(r)?r.value=x:r=x),onKeyup:pt(v,["enter"]),placeholder:"搜索文档",style:{margin:"10px 0"}},{append:N(()=>[E(C,{icon:o(yr),onClick:v},null,8,["icon"])]),_:1},8,["modelValue","onKeyup"]),R("div",rA,[E(L,{ref_key:"wikiPageTreeRef",ref:h,"current-node-key":o(a),data:o(i),"default-expanded-keys":o(u),"expand-on-click-node":!0,"filter-node-method":p,props:o(n),draggable:"","highlight-current":"","node-key":"id",style:{"background-color":"#fafafa"},onNodeClick:m},{default:N(({node:x,data:U})=>[R("div",iA,[E(M,{content:x.label,placement:"top-start","show-after":1e3},{default:N(()=>[R("span",uA,[E(T,null,{default:N(()=>[E(o(lc))]),_:1}),R("span",cA,ae(x.label),1)])]),_:2},1032,["content"])])]),_:1},8,["current-node-key","data","default-expanded-keys","props"])]),dA])]),_:1},8,["style"]),[[lt,o(t)]]),xe(E(Ip,{value:o(c),"onUpdate:value":b[1]||(b[1]=x=>bt(c)?c.value=x:c=x)},null,8,["value"]),[[lt,o(t)]]),E(F,null,{default:N(()=>[E(B,{class:"doc-body-box"},{default:N(()=>[E(D)]),_:1})]),_:1})]),_:1})])}}},pA=Jn(fA,[["__scopeId","data-v-d74018ea"]]),vA=["onClick"],mA=["onClick"],hA={__name:"PageTree",props:{pageList:Array},emits:["pageChange"],setup(e,{emit:t}){const n=a=>{t("pageChange",a)};let l=_([]);return(a,s)=>{const r=ee("page-tree",!0),i=ee("van-collapse-item"),u=ee("van-collapse");return w(),G(u,{modelValue:o(l),"onUpdate:modelValue":s[0]||(s[0]=c=>bt(l)?l.value=c:l=c)},{default:N(()=>[(w(!0),O(Ne,null,Ze(e.pageList,c=>(w(),O(Ne,null,[c.children?(w(),G(i,{key:1,name:c.id},{title:N(()=>[R("span",{onClick:f=>n(c.id)},ae(c.name),9,mA)]),default:N(()=>[E(r,{"page-list":c.children,onPageChange:n},null,8,["page-list"])]),_:2},1032,["name"])):(w(),O("div",{key:0,onClick:f=>n(c.id),class:"van-cell van-cell--clickable"},ae(c.name),9,vA))],64))),256))]),_:1},8,["modelValue"])}}};const gA=e=>(fr("data-v-7ee9baa3"),e=e(),pr(),e),yA={class:"share-mobile-layout"},bA={class:"header"},wA={class:"main"},kA=gA(()=>R("div",{class:"build-info"},[ye("本文档使用"),R("a",{target:"_blank",href:"https://gitee.com/iailab/iailab-doc"},"iailab-doc"),ye("构建")],-1)),CA={__name:"ShareMobileLayout",setup(e){_({children:"children",label:"name"});let t=_(""),n=_(""),l=_({}),a=_([]),s=_(!1);_([]);let r=dn(),i=Ut();ze(()=>{t.value=r.query.space||"",d(),f()});const u=p=>{s.value=!1,i.replace({path:"/page/share/mobile/view",query:{pageId:p,space:t.value}})},c=p=>{s.value=p},f=()=>{ut.openPageList({space:t.value}).then(p=>{a.value=p.data||[],n.value=""})},d=()=>{ut.openSpaceInfo({space:t.value}).then(p=>{l.value=p.data})};return(p,m)=>{const h=ee("van-nav-bar"),v=ee("van-popup"),g=ee("router-view");return w(),O("div",yA,[E(v,{show:o(s),"onUpdate:show":m[0]||(m[0]=y=>bt(s)?s.value=y:s=y),closeable:"",position:"left",class:"popup-module",style:{height:"100%",width:"80%"}},{default:N(()=>[R("div",bA,[E(h,{title:o(l).name},null,8,["title"])]),R("div",wA,[E(hA,{"page-list":o(a),onPageChange:u},null,8,["page-list"]),kA])]),_:1},8,["show"]),E(g,{onPopupShow:c})])}}},SA=Jn(CA,[["__scopeId","data-v-7ee9baa3"]]),Ho="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAqFBMVEX///9wcHBwcHBwcHBwcHB8fHxwcHB6enpwcHCDg4NwcHB8fHx6enqSkpJ8fHxycnJwcHDp6el2dnZwcHD////39/f19fXz8/Pw8PDr6+vn5+fj4+PZ2dnX19fHx8fExMS9vb20tLSrq6uhoaGenp6MjIyKioqDg4N8fHx6enp4eHh0dHRycnKZmZmOjo6KioqDg4OAgIB/f396enp4eHh2dnZycnJwcHDyRjyJAAAALXRSTlMAETNEVWZmd3eIiJmqu7u7u93d3e7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u6OCyV0AAAAi0lEQVQYGXXBRwKCMBAF0B9Q7Io6RJGo2LAEu8zc/2YuyCILfQ/4R8k5gK+zy0v4TilZeAZb2rTCSMHp3bV+jeJpDEDFIvagSRtNJAro2vHjSo4owOYzNlTTAoDnGZNjLABOFkzOagigWiecUW3fBNB/L5+33GgiSksFQE1YPkUlciwuETxhox3ghy8Wng9K1E9YIwAAAABJRU5ErkJggg==";const _A={style:{background:"#f1f1f1","min-height":"100%"},class:"page-search-vue"},EA={style:{"max-width":"1200px",margin:"0 auto",background:"#fff",padding:"20px","min-height":"100%","box-sizing":"border-box"}},$A={style:{"margin-bottom":"20px"}},TA={key:0,class:"empty-news"},IA={class:"line-box"},NA={class:"line-title"},PA={class:"text-link"},MA={class:"text-link"},LA={class:"page-preview-box"},RA=["onClick","innerHTML"],OA=["innerHTML"],AA=R("img",{src:Ho,class:"zan-img"},null,-1),VA={class:"page-info-box"},DA={__name:"Search",setup(e){let t=dn();Ut(),ze(()=>{c(t)});let n=_(0),l=_({spaceId:"",keywords:"",newsType:1,pageNum:1,pageSize:20}),a=_([]);const s=()=>{ut.pageSearchByEs(l.value).then(f=>{a.value=f.data||[],n.value=f.total})},r=f=>{l.value.pageSize=f,s()},i=f=>{window.open("#/page/show?pageId="+f.pageId)},u=f=>{l.value.pageNum=f,s()},c=f=>{l.value={keywords:f.query.keywords,spaceId:f.query.spaceId,newsType:1,pageNum:1,pageSize:20},s()};return(f,d)=>{const p=ee("el-input"),m=ee("el-col"),h=ee("el-button"),v=ee("el-row"),g=ee("el-icon"),y=ee("el-pagination");return w(),O("div",_A,[R("div",EA,[R("div",$A,[E(v,{gutter:20,style:{"max-width":"700px",margin:"0 auto"}},{default:N(()=>[E(m,{span:20},{default:N(()=>[E(p,{modelValue:o(l).keywords,"onUpdate:modelValue":d[0]||(d[0]=k=>o(l).keywords=k),onKeyup:pt(s,["enter"]),placeholder:"",style:{width:"100%"}},null,8,["modelValue","onKeyup"])]),_:1}),E(m,{span:4},{default:N(()=>[E(h,{type:"primary",onClick:s,icon:o(yr)},{default:N(()=>[ye("搜索一下")]),_:1},8,["icon"])]),_:1})]),_:1})]),o(a).length<=0?(w(),O("div",TA,"暂无数据")):(w(!0),O(Ne,{key:1},Ze(o(a),k=>(w(),O("div",IA,[R("div",NA,[R("span",PA,ae(k.createUserName),1),ye(" 发布于 "),R("span",MA,ae(k.spaceName),1)]),R("div",LA,[R("div",{class:"page-preview-title",onClick:b=>i(k),innerHTML:k.pageTitle},null,8,RA),R("div",{class:"page-preview-content",innerHTML:k.previewContent},null,8,OA),R("div",null,[R("span",null,[AA,ye(ae(k.zanNum)+" ",1)]),R("span",null,[E(g,{class:"view-img"},{default:N(()=>[E(o(Vo))]),_:1}),ye(ae(k.viewNum)+" ",1)]),R("span",null,ae(k.updateTime||k.createTime),1)])])]))),256)),R("div",VA,[E(y,{onSizeChange:r,onCurrentChange:u,"page-sizes":[20,50,100],"page-size":20,"current-page":o(l).pageNum,layout:"prev, pager, next, jumper, sizes, total",total:o(n)},null,8,["current-page","total"])])])])}}},BA={};function xA(e,t){return w(),O("div",null,"没有权限访问该模块")}const FA=Jn(BA,[["render",xA]]);const zA={style:{padding:"10px"},class:"home-vue"},HA={style:{"max-width":"800px",margin:"0 auto"}},KA={key:0,class:"empty-news"},WA={class:"line-box"},UA={class:"line-title"},jA={class:"text-link"},qA={class:"text-link"},GA={class:"page-preview-box"},YA=["onClick","innerHTML"],XA=["innerHTML"],ZA=R("img",{src:Ho,class:"zan-img"},null,-1),JA={__name:"Home",setup(e){_(0);let t=_({spaceId:"",newsType:1,pageNum:1,pageSize:20}),n=_([]),l=_([{key:1,val:"最近更新"},{key:2,val:"最新创建"},{key:3,val:"查看最多"},{key:4,val:"点赞最多"},{key:5,val:"查看+点赞最多"}]),a=_({});oo(f=>{c(f)});let s=dn(),r=Ut();ze(()=>{c(s)});const i=()=>{ut.pageNews(t.value).then(f=>{n.value=f.data||[]})},u=f=>{let d={pageId:f.pageId};r.push({path:"/page/show",query:d})},c=f=>{t.value={spaceId:f.query.spaceId,newsType:1,pageNum:1,pageSize:20,dirId:f.query.dirId},t.value.spaceId&&i(),a.value={},l.value.forEach(d=>a.value[d.key]=d.val)};return(f,d)=>{const p=ee("el-icon"),m=ee("el-tab-pane"),h=ee("el-tabs");return w(),O("div",zA,[R("div",HA,[E(h,{"model-value":"first"},{default:N(()=>[E(m,{label:o(a)[o(t).newsType],name:"first"},{default:N(()=>[o(n).length<=0?(w(),O("div",KA," 暂无数据 ")):(w(!0),O(Ne,{key:1},Ze(o(n),v=>(w(),O("div",WA,[R("div",UA,[R("span",jA,ae(v.createUserName),1),ye(" 发布于 "),R("span",qA,ae(v.spaceName),1)]),R("div",GA,[R("div",{class:"page-preview-title",onClick:g=>u(v),innerHTML:v.pageTitle},null,8,YA),R("div",{class:"page-preview-content",innerHTML:v.previewContent},null,8,XA),R("div",null,[R("span",null,[ZA,ye(ae(v.zanNum)+" ",1)]),R("span",null,[E(p,{class:"view-img"},{default:N(()=>[E(o(Vo))]),_:1}),ye(ae(v.viewNum)+" ",1)]),R("span",null,ae(v.updateTime||v.createTime),1)])])]))),256))]),_:1},8,["label"])]),_:1})])])}}};const QA={class:"my-info-vue"},eV={style:{margin:"0 auto","max-width":"1000px"}},tV=R("div",{class:"clearfix"},"我的信息",-1),nV={__name:"MyInfo",setup(e){let t=_({});ze(()=>{n()});const n=()=>{Yn.getSelfUserInfo().then(l=>{t.value=l.data})};return(l,a)=>{const s=ee("el-form-item"),r=ee("el-form"),i=ee("el-card");return w(),O("div",QA,[R("div",eV,[E(i,{class:"box-card"},{header:N(()=>[tV]),default:N(()=>[E(r,{class:"search-form-box","label-width":"100px"},{default:N(()=>[E(s,{label:"账号:"},{default:N(()=>[ye(ae(o(t).userNo),1)]),_:1}),E(s,{label:"用户名:"},{default:N(()=>[ye(ae(o(t).userName),1)]),_:1}),E(s,{label:"手机号:"},{default:N(()=>[ye(ae(o(t).phone),1)]),_:1}),E(s,{label:"邮箱:"},{default:N(()=>[ye(ae(o(t).email),1)]),_:1}),E(s,{label:"状态:"},{default:N(()=>[ye(ae(o(t).delFlag==0?"正常":"停用"),1)]),_:1}),E(s,{label:"性别:"},{default:N(()=>[ye(ae(o(t).sex==0?"女":"男"),1)]),_:1})]),_:1})]),_:1})])])}}},lV={computeFileSize(e){if(!e)return"-";let t="";e<.1*1024?t=e.toFixed(2)+"B":e<.1*1024*1024?t=(e/1024).toFixed(2)+"KB":e<.1*1024*1024*1024?t=(e/(1024*1024)).toFixed(2)+"MB":t=(e/(1024*1024*1024)).toFixed(2)+"GB";let n=t+"",l=n.indexOf(".");return n.substr(l+1,2)=="00"?n.substring(0,l)+n.substr(l+3,2):t}},Np={createNavigationHeading(){let e=[],t=document.querySelector(".wiki-page-content");if(t===null)return e;let n=t.querySelectorAll("h1,h2,h3,h4,h5,h6");return n.length<=0?[]:(n.forEach(l=>{let a=l.innerHTML.replace(/^\s+/g,"").replace(/\s+$/g,"").replace(/<\/?[^>]+(>|$)/g,"");e.push({node:l,level:parseInt(l.tagName.replace(/[h]/i,""),10),text:a})}),e)}};const oV={class:"navigation"},aV=["onClick"],Pp={__name:"Navigation",props:{heading:{type:Array,default:[]}},setup(e){let t=yn();const n=dl();let l=_("100px");ze(()=>{window.onresize=()=>{s()},setTimeout(()=>s(),100)}),ue(()=>n.viewMenuWidth,i=>{s()}),ue(()=>t.commentShow,i=>{s()});let a=_();const s=()=>{l.value=window.getComputedStyle(a.value,null).width},r=i=>{i.node.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})};return(i,u)=>(w(),O("div",oV,[R("div",{ref_key:"navigationRef",ref:a,style:{display:"inline-block",width:"100%"}},null,512),R("div",{class:"navigation-heading",style:Re({width:o(l)})},[(w(!0),O(Ne,null,Ze(e.heading,c=>(w(),O("div",{class:$("heading-item heading-"+c.level),onClick:f=>r(c)},ae(c.text),11,aV))),256))],4)]))}},sV={class:"wiki-file"},rV={__name:"Annex",setup(e){let t=yn(),n=_({pageId:0}),l=_(".//iailab-doc-wiki/page/file/upload");const a=()=>{n.value.pageId=t.pageInfo.id},s=c=>{Ct.error("上传失败,"+c)},r=c=>{c.errCode===200?(t.fileList.push(c.data),Ct.success("上传成功!")):Ct("上传失败:"+(c.errMsg||"未知错误"))},i=c=>{Tl.confirm("确定要删除此文件吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{let f={id:c.id};ut.deletePageFile(f).then(()=>{t.fileList=t.fileList.filter(d=>d.id!==c.id)})})},u=c=>lV.computeFileSize(c);return(c,f)=>{const d=ee("el-button"),p=ee("el-upload"),m=ee("el-link"),h=ee("el-table-column"),v=ee("el-table");return w(),O("div",sV,[o(t).pageAuth.canUploadFile===1?(w(),G(p,{key:0,"on-success":r,"on-error":s,"before-upload":a,action:o(l),data:o(n),"with-credentials":!0,class:"action-btn upload-page-file",name:"files","show-file-list":"",multiple:"",limit:999},{default:N(()=>[E(d,{type:"primary",underline:!1,icon:o(Zv),style:{margin:"10px",width:"100%"}},{default:N(()=>[ye(" 上传附件")]),_:1},8,["icon"])]),_:1},8,["action","data"])):Z("",!0),xe(E(v,{data:o(t).fileList,border:"",style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(h,{label:"文件名","show-overflow-tooltip":""},{default:N(g=>[E(m,{target:"_blank",href:g.row.fileUrl,type:"primary"},{default:N(()=>[ye(ae(g.row.fileName),1)]),_:2},1032,["href"])]),_:1}),E(h,{prop:"createUserName",label:"创建人",width:"110px","show-overflow-tooltip":""}),E(h,{label:"文件大小",width:"120px"},{default:N(g=>[ye(ae(u(g.row.fileSize)),1)]),_:1}),E(h,{prop:"createTime",label:"创建时间",width:"160px"}),E(h,{prop:"downloadNum",label:"下载次数",width:"90px"},{default:N(g=>[ye(ae(g.row.downloadNum||0),1)]),_:1}),o(t).pageAuth.canDeleteFile==1?(w(),G(h,{key:0,label:"操作",width:"90px"},{default:N(g=>[E(d,{onClick:y=>i(g.row)},{default:N(()=>[ye("删除")]),_:2},1032,["onClick"])]),_:1})):Z("",!0)]),_:1},8,["data"]),[[lt,o(t).fileList.length>0]])])}}},iV={class:"action-tab-box"},uV={key:0,class:"action-box-empty"},cV={__name:"PageHistory",props:{pageHistoryList:Array,pageHistoryChoice:Object,pageHistoryDetail:String},emits:["historyClickHandle","previewPageImage","createNavigationHeading"],setup(e,{emit:t}){const n=e;let l=yn();const a=s=>{n.pageHistoryChoice.id===s.id&&n.pageHistoryDetail.value||(s.content?(s.loading=2,t("historyClickHandle",s),setTimeout(()=>{t("previewPageImage",s),t("createNavigationHeading",s)},500)):(s.loading=1,ut.pageHistoryDetail({id:s.id}).then(r=>{s.loading=2,s.content=r.data||"--",l.pageInfo.editorType===2&&(s.content=lo.mavonEditor.getMarkdownIt().render(s.content)),t("historyClickHandle",s),setTimeout(()=>{t("previewPageImage",s),t("createNavigationHeading",s)},500)}).catch(()=>{s.loading=3})))};return(s,r)=>{const i=ee("el-tag"),u=ee("el-icon"),c=ee("el-timeline-item"),f=ee("el-timeline");return w(),O("div",iV,[o(n).pageHistoryList.length<=0?(w(),O("div",uV," 暂无修改历史记录 ")):(w(),G(f,{key:1},{default:N(()=>[(w(!0),O(Ne,null,Ze(o(n).pageHistoryList,d=>(w(),G(c,null,{default:N(()=>[E(i,{type:o(n).pageHistoryChoice.id===d.id?d.loading===3?"danger":"success":"info",class:"history-item",onClick:p=>a(d)},{default:N(()=>[R("div",null,ae(d.createUserName),1),R("div",null,ae(d.createTime),1)]),_:2},1032,["type","onClick"]),xe(E(u,{class:"history-loading-status"},{default:N(()=>[E(o(Xn))]),_:2},1536),[[lt,d.loading===1]]),xe(E(u,{class:"history-loading-status"},{default:N(()=>[E(o(Ba))]),_:2},1536),[[lt,d.loading===2]]),xe(E(u,{class:"history-loading-status"},{default:N(()=>[E(o(Zn))]),_:2},1536),[[lt,d.loading===3]])]),_:2},1024))),256))]),_:1}))])}}};const dV={key:0,class:"action-box-empty"},fV={key:1,class:"comment-list"},pV={class:"comment-user-name"},vV={class:"comment-content"},mV={class:"comment-input-box"},hV={__name:"Comment",setup(e){let t={colorArr:["#67C23A","#409EFF","#E6A23C","#F56C6C","#909399","#303133"],userHeadColor:{}},n=_(""),l=_([]),a=_({});dn(),Ut();let s=yn(),r=fi();ue(()=>s.pageInfo,v=>{s.pageInfo.editorType!==0&&c()}),ze(()=>{c()});let i=_();const u=()=>{setTimeout(()=>{let v=i.value;v.scrollTop=v.scrollHeight},0)},c=()=>{!s.pageInfo||!s.pageInfo.id||(p(),ut.pageCommentList({pageId:s.pageInfo.id}).then(v=>{let g=v.data||[];for(let y=0;y<g.length;y++){g[y].color=h(g[y].createUserId);let k=g[y].commentList||[];for(let b=0;b<k.length;b++){let C=k[b];C.color=h(C.createUserId)}g[y].commentList=k,g[y].visible=!1}l.value=g,u()}))};let f=v=>r.userInfo.id===v.createUserId||r.userInfo.id===s.pageInfo.createUserId;const d=v=>{ut.deletePageComment({id:v}).then(()=>{c()})},p=()=>{a.value={}},m=()=>{if(n.value.length<=0){Ct.error("请输入评论内容");return}let v={pageId:s.pageInfo.id,content:n.value,parentId:a.value.id};ut.updatePageComment(v).then(g=>{let y=g.data;y.color=h(y.createUserId),n.value="",c()})},h=v=>{let g=t.userHeadColor[v];return g||(g=t.colorArr[Math.ceil(Math.random()*t.colorArr.length)-1],t.userHeadColor[v]=g),g};return(v,g)=>{const y=ee("el-icon"),k=ee("el-popconfirm"),b=ee("el-card"),C=ee("el-timeline-item"),I=ee("el-timeline"),T=ee("el-button");return w(),O(Ne,null,[R("div",{class:"comment-box",ref_key:"actionTabCommentRef",ref:i},[o(l).length<=0?(w(),O("div",dV," 暂无评论 ")):(w(),O("div",fV,[E(I,null,{default:N(()=>[(w(!0),O(Ne,null,Ze(o(l),M=>(w(),G(C,{timestamp:M.createTime,placement:"top"},{default:N(()=>[E(b,{class:"box-card comment-card","body-style":{padding:"10px"}},{default:N(()=>[R("div",{style:Re("background-color: "+M.color),class:"head"},ae(M.createUserName.substr(0,1)),5),R("div",pV,[ye(ae(M.createUserName)+" ",1),o(f)(M)?(w(),G(k,{key:0,placement:"top",width:"160",trigger:"click","confirm-button-text":"删除","cancel-button-text":"取消",onConfirm:L=>d(M.id),title:"确定要删除此评论吗?"},{reference:N(()=>[E(y,{class:"icon-delete"},{default:N(()=>[E(o(br))]),_:1})]),_:2},1032,["onConfirm"])):Z("",!0)]),R("pre",vV,ae(M.content),1)]),_:2},1024)]),_:2},1032,["timestamp"]))),256))]),_:1})]))],512),R("div",mV,[xe(R("textarea",{rows:"5",placeholder:"发表评论","onUpdate:modelValue":g[0]||(g[0]=M=>bt(n)?n.value=M:n=M),maxlength:500},null,512),[[Ao,o(n)]]),E(T,{style:{float:"right",margin:"2px 5px"},type:"primary",size:"small",onClick:m},{default:N(()=>[ye("发送")]),_:1})])],64)}}},gV={style:{"margin-top":"40px","font-size":"14px"}},yV={style:{"vertical-align":"top"},class:"is-link"},bV=R("img",{src:Ho,style:{"vertical-align":"middle"}},null,-1),wV=R("img",{src:Ho,style:{"vertical-align":"middle",transform:"rotateX(180deg)"}},null,-1),kV={style:{"margin-left":"10px","vertical-align":"top"}},CV={key:0},SV={key:1},_V={key:2},EV={key:3},$V={style:{"margin-left":"10px"}},TV={__name:"PageZan",setup(e){let t=_([]),n=_(!1),l=yn();const a=r=>{let i={yn:r,pageId:l.pageInfo.id};ut.updatePageZan(i).then(()=>{l.pageInfo.selfZan=r,l.pageInfo.zanNum=l.pageInfo.zanNum+(r==1?1:-1)})},s=()=>{n.value=!0,t.value=[];let r={pageId:l.pageInfo.id};ut.pageZanList(r).then(i=>{t.value=i.data})};return(r,i)=>{const u=ee("el-icon"),c=ee("el-table-column"),f=ee("el-table"),d=ee("el-dialog");return w(),O(Ne,null,[R("div",gV,[R("span",yV,[xe(R("span",{onClick:i[0]||(i[0]=p=>a(1))},[bV,ye(" 赞")],512),[[lt,o(l).pageInfo.selfZan==0]]),xe(R("span",{onClick:i[1]||(i[1]=p=>a(0))},[wV,ye(" 踩")],512),[[lt,o(l).pageInfo.selfZan==1]])]),R("span",kV,[o(l).pageInfo.selfZan==0&&o(l).pageInfo.zanNum<=0?(w(),O("span",CV,"成为第一个赞同者")):o(l).pageInfo.selfZan==0&&o(l).pageInfo.zanNum>0?(w(),O("span",SV,[R("span",{class:"is-link",onClick:s},ae(o(l).pageInfo.zanNum)+"人",1),ye("赞了它 ")])):o(l).pageInfo.selfZan==1&&o(l).pageInfo.zanNum<=1?(w(),O("span",_V,"我赞了它")):o(l).pageInfo.selfZan==1&&o(l).pageInfo.zanNum>1?(w(),O("span",EV,[R("span",{class:"is-link",onClick:s},"我和"+ae(o(l).pageInfo.zanNum-1)+"个其他人",1),ye("赞了它 ")])):Z("",!0)]),R("span",$V,[E(u,{style:{"font-size":"16px",color:"#666","vertical-align":"middle"}},{default:N(()=>[E(o(Vo))]),_:1}),ye(" "+ae(o(l).pageInfo.viewNum)+"次阅读 ",1)])]),E(d,{title:"赞了它的人",modelValue:o(n),"onUpdate:modelValue":i[2]||(i[2]=p=>bt(n)?n.value=p:n=p),width:"600px"},{default:N(()=>[E(f,{data:o(t),border:"","show-header":!1,style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(c,{prop:"createUserName",label:"用户"}),E(c,{prop:"createTime",label:"时间"})]),_:1},8,["data"])]),_:1},8,["modelValue"])],64)}}};const IV={key:0,class:"page-show-vue"},NV={style:{"max-width":"1000px",margin:"0 auto","padding-left":"10px"}},PV=["innerHTML"],MV=["innerHTML"],LV={__name:"Show",props:{spaceInfo:Object},emits:["switchSpace","changeExpandedKeys","loadPageList"],setup(e,{emit:t}){let n=_({}),l=_({}),a=_({}),s=_(0);_([]);let r=_({});_(""),_(!1),_(!1),_([]),_([]),_(""),_(!1);let i=_(""),u=_(""),c=_({}),f=_([]),d=_(1),p=_([]),m=_(0),h=_(!1),v=_([]);_({fullscreen:!0,readmodel:!0}),_({url:"iailab-doc-wiki/page/download",param:{}});let g=dn();Ut();let y=dl(),k=yn();oo(U=>{x(U)}),ze(()=>{y.currentPage="view",x(g)});const b=()=>{y.commentShow=!1,T()},C=(U,X)=>{X===1&&(f.value=[],d.value=1);let K={pageId:U,pageNum:X};ut.pageHistoryList(K).then(V=>{let W=V.data||[];W.length<=0?d.value=0:(W.forEach(P=>P.loading=0),f.value=f.value.concat(W))})},I=U=>{c.value.loading=0,c.value=U,i.value=U.content,u.value=U.content},T=()=>{c.value.loading=0,i.value="",c.value={},f.value.forEach(U=>U.loading=0),u.value=a.value.content},M=U=>{T(),ut.pageDetail({id:U}).then(X=>{let K=X.data||{},V=K.wikiPage||{};V.selfZan=K.selfZan||0,n.value=V,a.value=K.pageContent||{},k.fileList=K.fileList||[],s.value=K.selfUserId||0,l.value={canEdit:K.canEdit,canDelete:K.canDelete,canUploadFile:K.canUploadFile,canDeleteFile:K.canDeleteFile,canConfigAuth:K.canConfigAuth},n.value.editorType===2&&(a.value.content=lo.mavonEditor.getMarkdownIt().render(a.value.content)),u.value=a.value.content,document.title=V.name||"WIKI-内容展示",t("switchSpace",n.value.spaceId),t("changeExpandedKeys",U),setTimeout(()=>{k.pageInfo.editorType!==0&&F(),A()},500),k.pageInfo=V,k.pageAuth=l.value}),C(U,1)};let L=_();const A=()=>{let U=Np.createNavigationHeading();if(U.length>0){let X=n.value.name||"WIKI-内容展示";U.unshift({level:1,node:L.value,text:X})}p.value=U},D=()=>{h.value=!1};let B=_();const F=()=>{const U=[];B.value.querySelectorAll("img").forEach((K,V)=>{U.push(K.src),K.onclick=()=>{m.value=V,v.value=U,h.value=!0}})},x=U=>{r.value={pageId:U.query.pageId},r.value.pageId&&M(r.value.pageId)};return(U,X)=>{const K=ee("el-col"),V=ee("el-row"),W=ee("el-icon"),P=ee("el-tab-pane"),H=ee("el-tabs"),Y=ee("el-image-viewer"),z=Sl("highlight");return o(k).pageInfo.editorType!==0?(w(),O("div",IV,[E(V,{type:"border-card",style:{height:"100%"}},{default:N(()=>[E(K,{span:o(y).commentShow?18:24,style:{padding:"20px","border-right":"1px solid #f1f1f1",height:"100%",overflow:"auto"}},{default:N(()=>[E(V,null,{default:N(()=>[E(K,{span:o(p).length>0?18:24},{default:N(()=>[R("div",NV,[R("div",{class:"wiki-title",ref_key:"wikiTitleRef",ref:L},ae(o(k).pageInfo.name),513),R("div",{id:"pageContentBox",ref_key:"pageContentRef",ref:B,class:"wiki-page-content"},[o(n).editorType==2?xe((w(),O("div",{key:0,innerHTML:o(u),class:"markdown-body"},null,8,PV)),[[z]]):(w(),O("div",{key:1,innerHTML:o(u),class:"wang-editor-body"},null,8,MV))],512),E(TV)])]),_:1},8,["span"]),o(p).length>0?(w(),G(K,{key:0,span:o(p).length>0?6:0},{default:N(()=>[E(Pp,{heading:o(p)},null,8,["heading"])]),_:1},8,["span"])):Z("",!0)]),_:1})]),_:1},8,["span"]),xe(E(K,{span:6,style:{height:"100%"}},{default:N(()=>[E(W,{onClick:b,class:"close-action-tab"},{default:N(()=>[E(o(Sn))]),_:1}),E(H,{modelValue:o(y).commentActiveTab,"onUpdate:modelValue":X[0]||(X[0]=q=>o(y).commentActiveTab=q)},{default:N(()=>[E(P,{label:"评论",name:"comment"},{default:N(()=>[E(hV)]),_:1}),E(P,{label:"附件",name:"annex"},{default:N(()=>[E(rV)]),_:1}),E(P,{label:"修改历史",name:"history"},{default:N(()=>[E(cV,{pageHistoryList:o(f),pageHistoryChoice:o(c),pageHistoryDetail:o(i),onHistoryClickHandle:I,onPreviewPageImage:F,onCreateNavigationHeading:A},null,8,["pageHistoryList","pageHistoryChoice","pageHistoryDetail"])]),_:1})]),_:1},8,["modelValue"])]),_:1},512),[[lt,o(y).commentShow]])]),_:1}),o(h)?(w(),G(Y,{key:0,"url-list":o(v),"initial-index":o(m),onClose:D,"hide-on-click-modal":""},null,8,["url-list","initial-index"])):Z("",!0)])):Z("",!0)}}},RV=Jn(LV,[["__scopeId","data-v-00ba83ac"]]);const OV={class:"wang-editor-box"},AV={class:"editor-toolbar-box fix-top"},VV={class:"wang-editor-content"},DV={class:"editor-container"},BV={class:"title-container"},xV={__name:"WangEditor",setup(e,{expose:t}){let n={excludeKeys:["fullScreen","undo","redo","emotion","|","lineHeight","fontFamily"]},l=_("");dn();let a=_({placeholder:"请输入文档内容",scroll:!1,MENU_CONF:{uploadImage:{server:".//iailab-doc-wiki/page/file/wangEditor/upload",fieldName:"files",maxFileSize:50*1024*1024,withCredentials:!0,meta:{pageId:l}},uploadVideo:{server:".//iailab-doc-wiki/page/file/wangEditor/upload",fieldName:"files",maxFileSize:300*1024*1024,withCredentials:!0,meta:{pageId:l}}}}),s="default";const r=Nt();let i=_("");const u=h=>{r.value=h},c=h=>{h.target.classList&&h.target.classList.contains("page-editor-body")&&(r.value.blur(),r.value.focus(!0))},f=()=>({title:i.value,html:r.value.getHtml(),text:r.value.getText()}),d=h=>{i.value=h},p=h=>{l.value=h},m=h=>{r.value.select([]),r.value.deleteFragment(),r.value.dangerouslyInsertHtml(h)};return Rt(()=>{const h=r.value;h!=null&&h.destroy()}),t({setTitle:d,setPageId:p,setHtml:m,getPageData:f}),(h,v)=>(w(),O("div",OV,[R("div",AV,[E(o(rm),{class:"editor-toolbar",defaultConfig:o(n),mode:o(s),editor:r.value},null,8,["defaultConfig","mode","editor"])]),R("div",VV,[R("div",DV,[R("div",BV,[xe(R("input",{"onUpdate:modelValue":v[0]||(v[0]=g=>bt(i)?i.value=g:i=g),placeholder:"请输入标题",maxlength:40},null,512),[[Ao,o(i)]])]),R("div",{onClick:c,class:"page-editor-body"},[E(o(im),{defaultConfig:o(a),mode:o(s),onOnCreated:u},null,8,["defaultConfig","mode"])])])])]))}};const FV={style:{height:"100%"},class:"page-edit-vue"},zV={style:{"box-sizing":"border-box",background:"#f5f5f5",overflow:"hidden"}},HV={style:{padding:"10px",background:"#fff"}},KV={__name:"Edit",props:{spaceId:Number},emits:["loadPageList"],setup(e,{emit:t}){const n=e;let l=_({}),a=_({editorType:2,pageTitle:""}),s=_({}),r=_({}),i=_([]),u=_({}),c=_(!1),f=_(""),d=_(""),p=_(""),m=_(".//iailab-doc-wiki/page/file/wangEditor/upload"),h={bold:!0,italic:!0,header:!0,underline:!0,strikethrough:!0,mark:!0,superscript:!0,subscript:!0,quote:!0,ol:!0,ul:!0,link:!0,imagelink:!0,code:!0,table:!0,fullscreen:!0,readmodel:!0,undo:!0,redo:!0,trash:!0,save:!0,navigation:!0,alignleft:!0,aligncenter:!0,alignright:!0,subfield:!0,preview:!0},v=zo(),g=yn(),y=dl();oo(V=>{x(V)});let k=dn(),b=Ut();Il(()=>{I()}),ze(()=>{K(),x(k);let V=this;window.onunload=function(){V.unlockPage()},window.onbeforeunload=function(){V.unlockPage()},y.showHeader=!1});const C=()=>{y.showMenu=!y.showMenu,setTimeout(()=>{y.showMenu?y.rightAsideWidth=301:y.rightAsideWidth=1},100)},I=()=>{c.value||(c.value=!0,ut.pageUnlock({pageId:f.value}))},T=()=>{Tl.confirm("确定要取消编辑吗?您编辑的内容将不会被保存哦~","提示",{confirmButtonText:"确定",cancelButtonText:"继续编辑",type:"warning"}).then(()=>{I(),b.back(),y.showHeader=!0})};let M=_();const L=V=>{let W="",P="";if(a.value.editorType===2)W=p.value,P=p.value;else{let z=M.value.getPageData();W=z.html,P=z.text,a.value.pageTitle=z.title}if(!a.value.pageTitle){Ct.warning("标题不能为空");return}let H=f.value>0?"":d.value;f.value&&(s.value.id=f.value);let Y={spaceId:n.spaceId,parentId:H,id:s.value.id,name:a.value.pageTitle,editorType:a.value.editorType,content:W,preview:P};ut.updatePage(Y).then(z=>{Ct.success("保存成功!"),A(),f.value=z.data.id,V==1?b.push({path:"/page/show",query:{pageId:f.value}}).then(()=>{y.showHeader=!0}):D(f.value)})},A=()=>{let V={spaceId:v.chooseSpaceId};ut.pageList(V).then(W=>{g.wikiPageList=W.data||[]})},D=V=>{ut.pageDetail({id:V}).then(W=>{s.value=W.data.wikiPage||{},r.value=W.data.pageContent||{},i.value=W.data.fileList||[],a.value.pageTitle=s.value.name,a.value.editorType=s.value.editorType,a.value.editorType===2?p.value=r.value.content||"":setTimeout(()=>{M.value.setTitle(s.value.name||""),M.value.setHtml(r.value.content||"")},0)})},B=V=>{V&&ut.pageDetail({id:V}).then(W=>{u.value=W.data.wikiPage||{}})},F=()=>{s.value={},r.value={},i.value=[],a.value.pageTitle="",l.value.txt&&l.value.txt.html("")},x=V=>{f.value=V.query.pageId,d.value=V.query.parentId,f.value&&M.value.setPageId(f.value),f.value?(D(f.value),ut.pageLock({pageId:f.value}).catch(W=>{Tl.alert(W.errMsg||"未知错误","错误",{confirmButtonText:"确定",callback:()=>{b.back()}})})):(B(d.value),F())};let U=_();const X=(V,W)=>{let P=new FormData;P.append("files",W),f.value&&P.append("pageId",f.value),Ka({url:m.value,method:"post",data:P,headers:{"Content-Type":"multipart/form-data"},timeout:1e4,withCredentials:!0}).then(H=>{let Y=H.data.data||{};Y.url?U.value.$img2Url(V,Y.url):Ct.warning("上传失败,返回数据为空")}).catch(H=>{Ct.warning("上传失败:"+H.message)})},K=()=>{};return(V,W)=>{const P=ee("el-button"),H=ee("el-col"),Y=ee("el-input"),z=ee("el-row");return w(),O("div",FV,[E(z,{class:"fake-header"},{default:N(()=>[E(H,{style:{flex:"0 0 45px"},class:"collapse-box"},{default:N(()=>[o(y).showMenu?(w(),G(P,{key:0,onClick:C,text:"",icon:o(rc),class:"fold-btn"},null,8,["icon"])):(w(),G(P,{key:1,onClick:C,text:"",icon:o(ic),class:"fold-btn"},null,8,["icon"]))]),_:1}),E(H,{style:{flex:"1 1 auto"}},{default:N(()=>[o(a).editorType===2?(w(),G(Y,{key:0,modelValue:o(a).pageTitle,"onUpdate:modelValue":W[0]||(W[0]=q=>o(a).pageTitle=q),maxlength:40,placeholder:"请输入标题",class:"page-title-input"},null,8,["modelValue"])):Z("",!0)]),_:1}),E(H,{style:{flex:"0 0 180px","text-align":"right"}},{default:N(()=>[E(P,{type:"primary",onClick:W[1]||(W[1]=q=>L(1)),icon:o(Jv)},{default:N(()=>[ye("保存")]),_:1},8,["icon"]),E(P,{onClick:T,icon:o(Qu),style:{"margin-right":"5px"}},{default:N(()=>[ye("取消")]),_:1},8,["icon"])]),_:1})]),_:1}),R("div",zV,[xe(R("div",HV,[E(o(lo.mavonEditor),{ref_key:"mavonEditorRef",ref:U,modelValue:o(p),"onUpdate:modelValue":W[2]||(W[2]=q=>bt(p)?p.value=q:p=q),toolbars:o(h),externalLink:!1,style:{height:"calc(100vh - 100px)","z-index":"1"},onSave:W[3]||(W[3]=q=>L(0)),onImgAdd:X,placeholder:"请录入文档内容",class:"page-content-editor wang-editor-body"},null,8,["modelValue","toolbars"])],512),[[lt,o(a).editorType===2]]),xe(R("div",null,[E(xV,{ref_key:"wangEditorRef",ref:M},null,512)],512),[[lt,o(a).editorType===1]])])])}}},WV=Jn(KV,[["__scopeId","data-v-d6bd756c"]]);const UV={style:{"min-height":"100%"},class:"space-manage-vue"},jV={style:{"max-width":"1200px",margin:"0 auto",background:"#fff",padding:"20px","min-height":"100%","box-sizing":"border-box"}},qV={style:{"text-align":"right","margin-bottom":"10px"}},GV={style:{float:"left","line-height":"40px"}},YV={key:1},XV={class:"page-info-box"},ZV={style:{"text-align":"right"}},JV={__name:"Manage",setup(e){let t=_(!1);_([]);let n=_([]);_("");let l=_({});_({id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1});let a=_({}),s=_(""),r=_(!1),i=_(""),u=_([]),c=_({}),f=_([]),d=_({wiki_only_show_favorite:0}),p=dn(),m=Ut(),h=dl(),v=yn(),g=zo();ze(()=>{h.currentPage="space",U(),P(),W()});const y=z=>{let q=m.resolve({path:"/page/share/home",query:{space:z}});window.open(q.href,"_blank")};let k=_();const b=()=>{k.value.show()},C=z=>{k.value.show(z.id)},I=()=>{if(!i.value){Ct.warning("请先选择分组");return}if(f.value.find(z=>z.groupId==i.value)){i.value="";return}f.value.push({groupId:i.value,editPage:0,commentPage:0,deletePage:0,pageFileUpload:0,pageFileDelete:0,pageAuthManage:0}),i.value=""},T=z=>{let q=z.favorite==1?1:0;ut.spaceFavoriteUpdate({spaceId:z.id,delFlag:q}).then(se=>{z.favorite=z.favorite==1?0:1})},M=()=>{let z={spaceId:s.value,authList:JSON.stringify(f.value)};ut.spaceAuthAssign(z).then(q=>{Ct.success("授权成功!")})},L=()=>{let z=location.href.substring(0,location.href.indexOf("/doc-wiki"))+"#/console/userGroupList";window.open(z,"_blank")},A=z=>{f.value=f.value.filter(q=>q.groupId!=z.groupId)},D=z=>{s.value=z.id,i.value="",f.value=[],Yn.userGroupList().then(q=>{u.value=q.data||[],u.value.forEach(se=>c.value[se.id]=se.name)}),ut.spaceAuthList({spaceId:z.id}).then(q=>{f.value=q.data||[],r.value=!0})},B=z=>{Tl.confirm("确定要删除此空间及下面的所有文档吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{let q={id:z.id,delFlag:1};ut.updateSpace(q).then(()=>{Ct.success("删除成功"),U(),H()})})};let F=_(0),x=_({ignoreFavorite:1,pageNum:1,pageSize:10});const U=()=>{t.value=!0,ut.spaceList(x.value).then(z=>{n.value=z.data||[],x.value.pageNum===1&&(F.value=z.total),setTimeout(()=>t.value=!1,500)})},X=z=>{x.value.pageSize=z,U()},K=z=>{x.value.pageNum=z,U()},V=()=>{let z={name:"wiki_only_show_favorite",value:d.value.wiki_only_show_favorite};ut.spaceSettingUpdate(z).then(q=>{H()})},W=()=>{ut.spaceSettingList().then(z=>{let q=z.data||{};d.value={wiki_only_show_favorite:q.wiki_only_show_favorite||0}})},P=()=>{Yn.getSelfUserInfo().then(z=>{a.value=z.data})},H=z=>{ut.spaceList({}).then(q=>{g.spaceList=q.data||[];let se=[];if(g.spaceList.forEach(pe=>se.push({label:pe.name,value:pe.id})),g.spaceOptions=se,n.value.length>0){let pe=z,oe=g.spaceList.find(re=>re.id===z);oe||(oe=g.spaceList[0],pe=oe.id),l.value=oe,g.spaceInfo=oe,g.chooseSpaceId=pe,v.choosePageId=0,Y();try{p.path==="/home"&&m.push({path:"/home",query:{spaceId:pe}})}catch(re){console.log(re)}}})},Y=(z,q)=>{let se={spaceId:g.chooseSpaceId};ut.pageList(se).then(pe=>{v.wikiPageList=pe.data||[]})};return(z,q)=>{const se=ee("el-switch"),pe=ee("el-icon"),oe=ee("el-tooltip"),re=ee("el-button"),Q=ee("el-table-column"),ve=ee("el-link"),_e=ee("el-table"),Te=ee("el-pagination"),Ie=ee("el-option"),Ke=ee("el-select"),Ge=ee("el-row"),qe=ee("el-checkbox"),it=ee("el-dialog");return w(),O("div",UV,[R("div",jV,[R("div",qV,[R("span",GV,[ye(" 仅展示我收藏的空间: "),E(se,{modelValue:o(d).wiki_only_show_favorite,"onUpdate:modelValue":q[0]||(q[0]=ke=>o(d).wiki_only_show_favorite=ke),"inactive-value":"0","active-value":"1",onChange:V},null,8,["modelValue"]),E(oe,{class:"item",effect:"dark",content:"控制左上角空间下拉列表仅展示我收藏的空间",placement:"top-start"},{default:N(()=>[E(pe,{style:{"vertical-align":"middle","margin-left":"10px",color:"#999"}},{default:N(()=>[E(o(Qv))]),_:1})]),_:1})]),E(re,{onClick:U,icon:o(em),loading:o(t)},{default:N(()=>[ye("刷新")]),_:1},8,["icon","loading"]),E(re,{type:"primary",onClick:b,icon:o(za)},{default:N(()=>[ye("创建空间")]),_:1},8,["icon"])]),E(_e,{data:o(n),border:"",style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(Q,{prop:"id",label:"ID",width:"60"}),E(Q,{prop:"name",label:"名字"}),E(Q,{prop:"spaceExplain",label:"说明"}),E(Q,{label:"开放地址"},{default:N(ke=>[ke.row.openDoc==1?(w(),G(ve,{key:0,onClick:Ee=>y(ke.row.uuid)},{default:N(()=>[ye(ae(ke.row.name),1)]),_:2},1032,["onClick"])):(w(),O("span",YV,"暂未开放"))]),_:1}),E(Q,{prop:"createUserName",label:"创建人"}),E(Q,{prop:"createTime",label:"创建时间"}),E(Q,{prop:"favorite",label:"收藏",width:"60"},{default:N(ke=>[ke.row.favorite===1?(w(),G(pe,{key:0,onClick:Ee=>T(ke.row),class:"favorite-icon el-icon-star-on"},{default:N(()=>[E(o(vo))]),_:2},1032,["onClick"])):(w(),G(pe,{key:1,onClick:Ee=>T(ke.row),class:"favorite-icon el-icon-star-off"},{default:N(()=>[E(o(ec))]),_:2},1032,["onClick"]))]),_:1}),E(Q,{label:"操作",width:"220"},{default:N(ke=>[o(a).id==ke.row.createUserId?(w(),O(Ne,{key:0},[E(re,{size:"small",type:"primary",onClick:Ee=>C(ke.row)},{default:N(()=>[ye("编辑")]),_:2},1032,["onClick"]),E(re,{size:"small",type:"warning",onClick:Ee=>D(ke.row)},{default:N(()=>[ye("授权")]),_:2},1032,["onClick"]),E(re,{size:"small",type:"danger",onClick:Ee=>B(ke.row)},{default:N(()=>[ye("删除")]),_:2},1032,["onClick"])],64)):Z("",!0)]),_:1})]),_:1},8,["data"]),R("div",XV,[E(Te,{onSizeChange:X,onCurrentChange:K,"page-sizes":[10,30,50],"page-size":10,"current-page":o(x).pageNum,layout:"prev, pager, next, jumper, sizes, total",total:o(F)},null,8,["current-page","total"])])]),E(it,{title:"权限管理",modelValue:o(r),"onUpdate:modelValue":q[2]||(q[2]=ke=>bt(r)?r.value=ke:r=ke),width:"900px","close-on-click-modal":!1},{default:N(()=>[E(Ge,null,{default:N(()=>[E(Ke,{modelValue:o(i),"onUpdate:modelValue":q[1]||(q[1]=ke=>bt(i)?i.value=ke:i=ke),filterable:"",placeholder:"请选择分组",style:{width:"750px","margin-right":"10px"}},{default:N(()=>[(w(!0),O(Ne,null,Ze(o(u),ke=>(w(),G(Ie,{key:ke.id,label:o(c)[ke.id],value:ke.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),E(re,{onClick:I},{default:N(()=>[ye("添加")]),_:1})]),_:1}),E(_e,{data:o(f),border:"",style:{width:"100%",margin:"10px 0"}},{default:N(()=>[E(Q,{prop:"groupId",label:"分组名",width:"150"},{default:N(ke=>[ye(ae(o(c)[ke.row.groupId]),1)]),_:1}),E(Q,{label:"权限"},{default:N(ke=>[E(qe,{"true-label":1,"false-label":0,modelValue:ke.row.editPage,"onUpdate:modelValue":Ee=>ke.row.editPage=Ee},{default:N(()=>[ye("编辑")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(qe,{"true-label":1,"false-label":0,modelValue:ke.row.deletePage,"onUpdate:modelValue":Ee=>ke.row.deletePage=Ee},{default:N(()=>[ye("删除")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(qe,{"true-label":1,"false-label":0,modelValue:ke.row.pageFileUpload,"onUpdate:modelValue":Ee=>ke.row.pageFileUpload=Ee},{default:N(()=>[ye("文件上传")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(qe,{"true-label":1,"false-label":0,modelValue:ke.row.pageFileDelete,"onUpdate:modelValue":Ee=>ke.row.pageFileDelete=Ee},{default:N(()=>[ye("文件删除")]),_:2},1032,["modelValue","onUpdate:modelValue"]),E(qe,{"true-label":1,"false-label":0,modelValue:ke.row.pageAuthManage,"onUpdate:modelValue":Ee=>ke.row.pageAuthManage=Ee},{default:N(()=>[ye("权限管理")]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1}),E(Q,{label:"操作",width:"80"},{default:N(ke=>[E(re,{size:"small",type:"danger",plain:"",onClick:Ee=>A(ke.row)},{default:N(()=>[ye("删除")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),R("div",ZV,[E(re,{onClick:L},{default:N(()=>[ye("分组管理")]),_:1}),E(re,{type:"primary",onClick:M},{default:N(()=>[ye("保存配置")]),_:1})])]),_:1},8,["modelValue"]),E(o($p),{ref_key:"createSpaceRef",ref:k,onSuccess:U},null,512)])}}};const QV={style:{padding:"10px"},class:"page-share-home-vue"},eD={style:{"max-width":"800px",margin:"0 auto"}},tD={key:0,class:"empty-news"},nD={class:"line-box"},lD={class:"line-title"},oD={class:"text-link"},aD={class:"text-link"},sD={class:"page-preview-box"},rD=["onClick","innerHTML"],iD=["innerHTML"],uD=R("img",{src:Ho,class:"zan-img"},null,-1),cD={class:"page-info-box"},dD={__name:"Home",setup(e){let t=_(0),n=_({spaceId:"",newsType:1,pageNum:1,pageSize:20}),l=_([]);oo(d=>{f(d)});let a=dn(),s=Ut();ze(()=>{f(a)});const r=()=>{ut.openPageNews(n.value).then(d=>{l.value=d.data||[],t.value=d.total})},i=d=>{n.value.pageSize=d,r()},u=d=>{let p={space:d.space,pageId:d.pageId};s.push({path:"/page/share/view",query:p})},c=d=>{n.value.pageNum=d,r()},f=d=>{n.value={space:d.query.space,newsType:1,pageNum:1,pageSize:20},n.value.space&&r()};return(d,p)=>{const m=ee("el-icon"),h=ee("el-pagination");return w(),O("div",QV,[R("div",eD,[o(l).length<=0?(w(),O("div",tD,"暂无数据")):(w(!0),O(Ne,{key:1},Ze(o(l),v=>(w(),O("div",nD,[R("div",lD,[R("span",oD,ae(v.createUserName),1),ye(" 发布于 "),R("span",aD,ae(v.spaceName),1)]),R("div",sD,[R("div",{class:"page-preview-title",onClick:g=>u(v),innerHTML:v.pageTitle},null,8,rD),R("div",{class:"page-preview-content",innerHTML:v.previewContent},null,8,iD),R("div",null,[R("span",null,[uD,ye(ae(v.zanNum)+" ",1)]),R("span",null,[E(m,{class:"view-img"},{default:N(()=>[E(o(Vo))]),_:1}),ye(" "+ae(v.viewNum)+" ",1)]),R("span",null,ae(v.updateTime||v.createTime),1)])])]))),256)),R("div",cD,[E(h,{onSizeChange:i,onCurrentChange:c,"page-sizes":[20,50,100],"page-size":20,"current-page":o(n).pageNum,layout:"prev, pager, next, jumper, sizes, total",total:o(t)},null,8,["current-page","total"])])])])}}};const fD={class:"page-share-view-vue"},pD={style:{"max-width":"1000px","padding-left":"10px",margin:"0 auto"}},vD={class:"wiki-author"},mD={key:0},hD={key:1},gD={class:"wiki-files"},yD=["href"],bD=["innerHTML"],wD=["innerHTML"],kD={__name:"View",setup(e){let t=_(""),n=_(""),l=_({}),a=_([]),s=_(""),r=_(0),i=_(!1),u=_([]),c=_([]);oo(k=>{m(k)});let f=dn();Ut(),ze(()=>{m(f)});let d=_();const p=k=>{let b={pageId:k,space:t.value};ut.openPageDetail(b).then(C=>{let I=C.data.wikiPage||{};I.selfZan=C.data.selfZan||0,l.value=I;let T=C.data.pageContent||{};a.value=C.data.fileList||[],l.value.editorType===2&&(T.content=lo.mavonEditor.getMarkdownIt().render(T.content)),s.value=T.content;let M=I.name||"WIKI-内容展示";document.title=M,setTimeout(()=>{y();let L=Np.createNavigationHeading();c.length>0&&L.unshift({level:1,node:d.value,text:M}),c.value=L},500)})},m=k=>{t.value=k.query.space,n.value=k.query.pageId,n.value&&p(n.value)},h=k=>{if(!k)return"-";let b="";k<.1*1024?b=k.toFixed(2)+"B":k<.1*1024*1024?b=(k/1024).toFixed(2)+"KB":k<.1*1024*1024*1024?b=(k/(1024*1024)).toFixed(2)+"MB":b=(k/(1024*1024*1024)).toFixed(2)+"GB";let C=b+"",I=C.indexOf(".");return C.substr(I+1,2)=="00"?C.substring(0,I)+C.substr(I+3,2):b},v=()=>{i.value=!1};let g=_();const y=()=>{const k=[];g.value.querySelectorAll("img").forEach((C,I)=>{k.push(C.src),C.onclick=()=>{r.value=I,u.value=k,i.value=!0}})};return(k,b)=>{const C=ee("el-table-column"),I=ee("el-table"),T=ee("el-col"),M=ee("el-row"),L=ee("el-image-viewer");return w(),O("div",fD,[E(M,{type:"border-card"},{default:N(()=>[E(T,{xs:24,sm:o(c).length>0?20:24,md:o(c).length>0?20:24,lg:o(c).length>0?18:24,xl:o(c).length>0?18:24},{default:N(()=>[R("div",pD,[R("div",{class:"wiki-title",ref_key:"wikiTitleRef",ref:d},ae(o(l).name),513),R("div",vD,[o(l).updateTime?(w(),O("span",mD,"最后修改:"+ae(o(l).updateTime),1)):(w(),O("span",hD,"创建时间:"+ae(o(l).createTime),1))]),R("div",gD,[xe(E(I,{data:o(a),border:"",style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(C,{label:"文件名"},{default:N(A=>[R("a",{target:"_blank",href:A.row.fileUrl},ae(A.row.fileName),9,yD)]),_:1}),E(C,{label:"文件大小"},{default:N(A=>[ye(ae(h(A.row.fileSize)),1)]),_:1}),E(C,{prop:"createTime",label:"创建时间",width:"180px"}),E(C,{prop:"downloadNum",label:"下载次数",width:"80px"})]),_:1},8,["data"]),[[lt,o(a).length>0]])]),R("div",{ref_key:"pageContentRef",ref:g,class:"wiki-page-content"},[o(l).editorType==2?(w(),O("div",{key:0,innerHTML:o(s),class:"markdown-body"},null,8,bD)):(w(),O("div",{key:1,innerHTML:o(s),class:"wang-editor-body"},null,8,wD))],512)])]),_:1},8,["sm","md","lg","xl"]),o(c).length>0?(w(),G(T,{key:0,xs:0,sm:4,md:4,lg:6,xl:6},{default:N(()=>[E(Pp,{heading:o(c)},null,8,["heading"])]),_:1})):Z("",!0)]),_:1}),o(i)?(w(),G(L,{key:0,"url-list":o(u),"initial-index":o(r),onClose:v,"hide-on-click-modal":""},null,8,["url-list","initial-index"])):Z("",!0)])}}};const CD={class:"mobile-share-view-vue"},SD={style:{"max-width":"950px",margin:"0 auto"}},_D={class:"wiki-author"},ED={key:0},$D={key:1},TD={class:"wiki-files"},ID=["href"],ND=["innerHTML"],PD=["innerHTML"],MD={__name:"View",emits:["popupShow"],setup(e,{emit:t}){let n=_(""),l=_(""),a=_({}),s=_([]),r=_(""),i=_(0),u=_([]);oo(g=>{p(g)});let c=dn();Ut(),ze(()=>{p(c)});const f=()=>{t("popupShow",!0)},d=g=>{let y={pageId:g,space:n.value};ut.openPageDetail(y).then(k=>{let b=k.data.wikiPage||{};b.selfZan=k.data.selfZan||0,a.value=b;let C=k.data.pageContent||{};s.value=k.data.fileList||[],a.value.editorType===2&&(C.content=lo.mavonEditor.getMarkdownIt().render(C.content)),r.value=C.content,document.title=b.name||"WIKI-内容展示",setTimeout(()=>v(),500)})},p=g=>{n.value=g.query.space,l.value=g.query.pageId,l.value&&d(l.value)},m=g=>{if(!g)return"-";let y="";g<.1*1024?y=g.toFixed(2)+"B":g<.1*1024*1024?y=(g/1024).toFixed(2)+"KB":g<.1*1024*1024*1024?y=(g/(1024*1024)).toFixed(2)+"MB":y=(g/(1024*1024*1024)).toFixed(2)+"GB";let k=y+"",b=k.indexOf(".");return k.substr(b+1,2)=="00"?k.substring(0,b)+k.substr(b+3,2):y};let h=_();const v=()=>{const g=[];h.value.querySelectorAll("img").forEach((k,b)=>{g.push(k.src),k.onclick=()=>{i.value=b,u.value=g,am({images:g,startPosition:b})}})};return(g,y)=>{const k=ee("van-icon"),b=ee("van-nav-bar"),C=ee("el-table-column"),I=ee("el-table"),T=ee("el-row");return w(),O("div",CD,[E(b,{title:o(a).name,class:"header"},{left:N(()=>[E(k,{name:"wap-nav",size:"20",onClick:f})]),_:1},8,["title"]),E(T,{type:"border-card",class:"main"},{default:N(()=>[R("div",SD,[R("div",_D,[o(a).updateTime?(w(),O("span",ED,"最后修改:"+ae(o(a).updateTime),1)):(w(),O("span",$D,"创建时间:"+ae(o(a).createTime),1))]),R("div",TD,[xe(E(I,{data:o(s),border:"",style:{width:"100%","margin-bottom":"5px"}},{default:N(()=>[E(C,{label:"文件名"},{default:N(M=>[R("a",{target:"_blank",href:M.row.fileUrl},ae(M.row.fileName),9,ID)]),_:1}),E(C,{label:"文件大小"},{default:N(M=>[ye(ae(m(M.row.fileSize)),1)]),_:1}),E(C,{prop:"createTime",label:"创建时间",width:"180px"}),E(C,{prop:"downloadNum",label:"下载次数",width:"80px"})]),_:1},8,["data"]),[[lt,o(s).length>0]])]),R("div",{ref_key:"pageContentRef",ref:h,class:"wiki-page-content"},[o(a).editorType==2?(w(),O("div",{key:0,innerHTML:o(r),class:"markdown-body"},null,8,ND)):(w(),O("div",{key:1,innerHTML:o(r),class:"wang-editor-body"},null,8,PD))],512)])]),_:1})])}}};const LD={class:"login-box"},RD=R("h3",{class:"title"},"IAILAB文档管理-系统登录",-1),OD=R("div",{class:"power-by"},[ye("Powered By "),R("a",{target:"_blank",href:"https://xxxx"},"iailab-doc")],-1),AD={__name:"Login",setup(e){const t=_(!1);_("密码模式"),_("授权模式");const n=_("");let l=dn(),a=Ut();const s=_(Math.ceil(Math.random()*5)),r=St({loginParam:{username:"",password:""}}),i={username:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]};ze(()=>{n.value=l.params.redirect;let c=uc.get("accessToken");console.log(c)});const u=async c=>{t.value=!0,Yn.userLogin(r.loginParam).then(()=>{Ct.success("loginSuccess"),t.value=!1,n.value?location.href=decodeURIComponent(n.value):a.push("/home")}).catch(f=>{console.log("登录失败",f),Ct.error("登录失败"),t.value=!1})};return(c,f)=>{const d=ee("el-input"),p=ee("el-form-item"),m=ee("el-button"),h=ee("el-form");return w(),O("div",{class:$("login-background linear-gradient-"+s.value)},[R("div",LD,[E(h,{model:r.loginParam,rules:i,ref:"loginParam","label-position":"left","label-width":"0px",class:"demo-ruleForm login-container"},{default:N(()=>[RD,E(p,{prop:"username"},{default:N(()=>[E(d,{type:"text",modelValue:r.loginParam.username,"onUpdate:modelValue":f[0]||(f[0]=v=>r.loginParam.username=v),"auto-complete":"off",placeholder:"账号",onKeyup:pt(u,["enter","native"])},null,8,["modelValue","onKeyup"])]),_:1}),E(p,{prop:"password"},{default:N(()=>[E(d,{type:"password",modelValue:r.loginParam.password,"onUpdate:modelValue":f[1]||(f[1]=v=>r.loginParam.password=v),"auto-complete":"off",placeholder:"密码",onKeyup:pt(u,["enter","native"])},null,8,["modelValue","onKeyup"])]),_:1}),E(p,{style:{width:"100%"}},{default:N(()=>[E(m,{type:"primary",style:{width:"100%"},onClick:Fe(u,["prevent"]),loading:t.value},{default:N(()=>[ye(" 登录 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1},8,["model"])]),OD],2)}}};const Mp=e=>(fr("data-v-7c225de6"),e=e(),pr(),e),VD=Mp(()=>R("div",{class:"login-box"},[R("h3",{class:"title"}," 正在使用 code 授权码,进行 accessToken 访问令牌的获取 ")],-1)),DD=Mp(()=>R("div",{class:"power-by"},[ye("Powered By "),R("a",{target:"_blank",href:"https://xxxx"},"iailab-doc")],-1)),BD=[VD,DD],xD={__name:"Callback",setup(e){const{VITE_APP_SSO_CODE_CALLBACK_URL:t,VITE_APP_SSO_LOGIN_BY_CODE:n}={VITE_APP_BASE_API:"./",BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1},{currentRoute:l}=Ut();let a=Ut();const s=_(Math.ceil(Math.random()*5));ze(()=>{r()});const r=()=>{const u=l.value.query.code;if(!u){alert("获取不到 code 参数,请排查!");return}let c=t;Ka({url:n+"?code="+u+"&redirectUri="+c,method:"POST"}).then(f=>{const d=f.data,p=d.data.accessToken;if(d.errCode!==200){alert("获得访问令牌失败!");return}let m=new Date(new Date*1+d.data.expiresIn*1e3);i(p,m),alert("获得访问令牌成功!点击确认,跳转回首页"),a.push("/home")})},i=(u,c)=>{uc.set("accessToken",u,{expires:c})};return(u,c)=>(w(),O("div",{class:$("login-background linear-gradient-"+s.value)},BD,2))}},FD=Jn(xD,[["__scopeId","data-v-7c225de6"]]);let zD=[{path:"/",redirect:"/home"},{path:"/user/login",name:"系统登录",component:AD,meta:{fullscreen:!0}},{path:"/callback",name:"授权回调页面",component:FD,meta:{fullscreen:!0}},{path:"/page/search",name:"WIKI-全局搜索",component:DA},{path:"/common/noAuth",name:"WIKI-没有权限",component:FA},{path:"/",name:"文档管理",component:nA,children:[{path:"/home",name:"WIKI文档管理",component:JA},{path:"/user/myInfo",name:"WIKI-我的信息",component:nV},{path:"/page/show",name:"WIKI-页面查看",component:RV},{path:"/page/edit",name:"WIKI-编辑内容",component:WV},{path:"/space/manage",name:"WIKI-空间管理",component:JV}]},{path:"/",name:"PC端开放文档",component:pA,children:[{path:"/page/share/home",name:"WIKI-开放文档",component:dD},{path:"/page/share/view",name:"WIKI-内容展示",component:kD}]},{path:"/",name:"APP端开放文档",component:SA,children:[{path:"/page/share/mobile/view",name:"WIKI-开放文档-APP",component:MD}]}];const HD=tm({history:nm(),routes:zD}),fl=Uu(dm);fl.config.productionTip=!1;fl.use(lm);fl.use(HR,{locale:KR});fl.use(sm);fl.use(HD);fl.use(om());fl.mount("#app");fl.directive("highlight",function(e){e.querySelectorAll("pre code").forEach(n=>{Lp.highlightBlock(n)})}); |
| | |
| | | <link rel="icon" href="./wiki-logo.png" /> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| | | <title>WIKI文档管理系统</title> |
| | | <script type="module" crossorigin src="./assets/main-4e713bb9.js"></script> |
| | | <script type="module" crossorigin src="./assets/main-a8d2ab49.js"></script> |
| | | <link rel="modulepreload" crossorigin href="./assets/highlight.js-d64bc19a.js"> |
| | | <link rel="modulepreload" crossorigin href="./assets/vue-650a4d10.js"> |
| | | <link rel="modulepreload" crossorigin href="./assets/vendor-c19ab73d.js"> |