import{n as d,r as Ae,a as re,w as We,K as pe,v as ae,J as Xe,f as I,Z as j,fZ as xt,c3 as xe,f_ as Ft,R as Je,_ as C,X as ve,Y as Bt,cW as Ze,a2 as J,U as _t,cd as Fe,aq as Re,T as Dt,V as ie,co as St,ac as Tt,c2 as Y,F as fe,ap as wt,cj as At,bl as Be,cw as kt,da as Ot,f$ as Pt,b as Ye,cA as Nt,k as _e,L as Qe,aG as P,o as A,j as Z,z as N,h as q,aJ as et,i as De,bn as $t,B as tt,t as ne,l as we,q as nt,bp as jt,E as Lt}from"./index.c32990f8.js";import{T as ze}from"./index.ec7e65df.js";import{B as Rt}from"./index.c4eaa479.js";import{L as te}from"./index.7bbfb1bb.js";import"./index.7581729a.js";import{A as Ie}from"./index.b82f04cc.js";import{T as Me}from"./index.89a648c8.js";import{T as Ke}from"./transButton.c32900a3.js";import{C as zt}from"./CopyOutlined.b4d4e50f.js";import"./useRefs.e81244b6.js";import"./PlusOutlined.36faec12.js";import"./eagerComputed.4b10fdb6.js";import"./useSize.4791f091.js";var It={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},Mt=It;function Ge(t){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:0,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:x.length,be=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,G=Math.floor((_+w)/2),ue=x.slice(0,G);if(y.textContent=ue,_>=w-1)for(var V=w;V>=_;V-=1){var Q=x.slice(0,V);if(y.textContent=Q,E()||!Q)return V===x.length?{finished:!1,vNode:x}:{finished:!0,vNode:Q}}return E()?$(y,x,G,w,G):$(y,x,_,G,be)}function K(y){var x=y.nodeType;if(x===qt){var _=y.textContent||"",w=document.createTextNode(_);return F(w),$(w,_)}return{finished:!1,vNode:null}}return p.some(function(y){var x=K(y),_=x.finished,w=x.vNode;return w&&U.push(w),_}),{content:U,text:S.innerHTML,ellipsis:!0}},Yt=["prefixCls","class","direction","component"],Qt=function(){return{prefixCls:String,direction:String,component:String}},en=re({name:"ATypography",inheritAttrs:!1,props:Qt(),setup:function(e,n){var a=n.slots,l=n.attrs,o=Je("typography",e),u=o.prefixCls,f=o.direction;return function(){var c,i=C(C({},e),l);i.prefixCls,i.class,i.direction;var v=i.component,E=v===void 0?"article":v,p=ve(i,Yt);return d(E,C({class:Bt(u.value,j({},"".concat(u.value,"-rtl"),f.value==="rtl"),l.class)},p),{default:function(){return[(c=a.default)===null||c===void 0?void 0:c.call(a)]}})}}}),T=en,tn=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,a=[],l=0;l1&&ce,X=b,bt;if(z&&i.isEllipsis&&!i.expanded&&!ce){var Ee,Le=R.title,de=Le||"";!Le&&(typeof b=="string"||typeof b=="number")&&(de=String(b)),de=(Ee=de)===null||Ee===void 0?void 0:Ee.slice(String(i.ellipsisContent||"").length),X=d(fe,null,[wt(i.ellipsisContent),d("span",{title:de,"aria-hidden":"true"},[Ve]),$e])}else X=d(fe,null,[b,$e]);X=ut(e,X);var ht=he&&z&&i.isEllipsis&&!i.expanded&&!ce,Et=a.ellipsisTooltip?a.ellipsisTooltip():he;return d(At,{onResize:ue,disabled:!z},{default:function(){return[d(T,C({ref:v,class:[(B={},j(B,"".concat(f.value,"-").concat(L),L),j(B,"".concat(f.value,"-disabled"),O),j(B,"".concat(f.value,"-ellipsis"),z),j(B,"".concat(f.value,"-single-line"),z===1&&!i.isEllipsis),j(B,"".concat(f.value,"-ellipsis-single-line"),Ct),j(B,"".concat(f.value,"-ellipsis-multiple-line"),je),B),ee],style:C(C({},W),{},{WebkitLineClamp:je?z:void 0}),"aria-label":bt,direction:c.value,onClick:g.indexOf("text")!==-1?M:function(){}},gt),{default:function(){return[ht?d(Be,{title:he===!0?b:Et},{default:function(){return[d("span",null,[X])]}}):X,Ne()]}})]}})}},null)}}}),le=vn,mn=["ellipsis","rel"],yn=function(){return Y(C(C({},oe()),{},{ellipsis:{type:Boolean,default:void 0}}),["component"])},me=function(e,n){var a=n.slots,l=n.attrs,o=C(C({},e),l),u=o.ellipsis,f=o.rel,c=ve(o,mn);ie(J(u)!=="object","Typography.Link","`ellipsis` only supports boolean value.");var i=C(C({},c),{},{rel:f===void 0&&c.target==="_blank"?"noopener noreferrer":f,ellipsis:!!u,component:"a"});return delete i.navigate,d(le,i,a)};me.displayName="ATypographyLink";me.inheritAttrs=!1;me.props=yn();var it=me,gn=function(){return Y(oe(),["component"])},ye=function(e,n){var a=n.slots,l=n.attrs,o=C(C({},e),{},{component:"div"},l);return d(le,o,a)};ye.displayName="ATypographyParagraph";ye.inheritAttrs=!1;ye.props=gn();var rt=ye,Cn=function(){return C(C({},Y(oe(),["component"])),{},{ellipsis:{type:[Boolean,Object],default:void 0}})},ge=function(e,n){var a=n.slots,l=n.attrs,o=e.ellipsis;ie(J(o)!=="object"||!o||!("expandable"in o)&&!("rows"in o),"Typography.Text","`ellipsis` do not support `expandable` or `rows` props.");var u=C(C({},e),{},{ellipsis:o&&J(o)==="object"?Y(o,["expandable","rows"]):o,component:"span"},l);return d(le,u,a)};ge.displayName="ATypographyText";ge.inheritAttrs=!1;ge.props=Cn();var ot=ge,bn=["level"],hn=Pt(1,2,3,4,5),En=function(){return C(C({},Y(oe(),["component","strong"])),{},{level:Number})},Ce=function(e,n){var a=n.slots,l=n.attrs,o=e.level,u=o===void 0?1:o,f=ve(e,bn),c;hn.indexOf(u)!==-1?c="h".concat(u):(ie(!1,"Typography","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value."),c="h1");var i=C(C({},f),{},{component:c},l);return d(le,i,a)};Ce.displayName="ATypographyTitle";Ce.inheritAttrs=!1;Ce.props=En();var lt=Ce;T.Text=ot;T.Title=lt;T.Paragraph=rt;T.Link=it;T.Base=le;T.install=function(t){return t.component(T.name,T),t.component(T.Text.displayName,ot),t.component(T.Title.displayName,lt),t.component(T.Paragraph.displayName,rt),t.component(T.Link.displayName,it),t};var xn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z"}}]},name:"bell",theme:"outlined"},Fn=xn;function qe(t){for(var e=1;e[]},pageSize:{type:[Boolean,Number],default:5},currentPage:{type:Number,default:1},titleRows:{type:Number,default:1},descRows:{type:Number,default:2},onTitleClick:{type:Function}},emits:["update:currentPage"],setup(t,{emit:e}){const{prefixCls:n}=Ye("header-notify-list"),a=ae(t.currentPage||1),l=I(()=>{const{pageSize:c,list:i}=t;if(c===!1)return[];let v=Nt(c)?c:5;return i.slice(v*(_e(a)-1),v*_e(a))});pe(()=>t.currentPage,c=>{a.value=c});const o=I(()=>!!t.onTitleClick),u=I(()=>{const{list:c,pageSize:i}=t;return i>0&&c&&c.length>i?{total:c.length,pageSize:i,current:_e(a),onChange(v){a.value=v,e("update:currentPage",v)}}:!1});function f(c){t.onTitleClick&&t.onTitleClick(c)}return{prefixCls:n,getPagination:u,getData:l,handleTitleClick:f,isTitleClickable:o}}}),Sn={class:"title"},Tn={key:0,class:"extra"},wn={key:1},An={key:0,class:"description"},kn={class:"datetime"};function On(t,e,n,a,l,o){const u=P("a-typography-paragraph"),f=P("a-tag"),c=P("a-avatar"),i=P("a-list-item-meta"),v=P("a-list-item"),E=P("a-list");return A(),Z(E,{class:nt(t.prefixCls),bordered:"",pagination:t.getPagination},{default:N(()=>[(A(!0),q(fe,null,et(t.getData,p=>(A(),Z(v,{key:p.id,class:"list-item"},{default:N(()=>[d(i,null,{title:N(()=>[De("div",Sn,[d(u,{onClick:H=>t.handleTitleClick(p),style:$t([{width:"100%","margin-bottom":"0 !important"},{cursor:t.isTitleClickable?"pointer":""}]),delete:!!p.titleDelete,ellipsis:t.$props.titleRows&&t.$props.titleRows>0?{rows:t.$props.titleRows,tooltip:!!p.title}:!1,content:p.title},null,8,["onClick","style","delete","ellipsis","content"]),p.extra?(A(),q("div",Tn,[d(f,{class:"tag",color:p.color},{default:N(()=>[tt(ne(p.extra),1)]),_:2},1032,["color"])])):we("",!0)])]),avatar:N(()=>[p.avatar?(A(),Z(c,{key:0,class:"avatar",src:p.avatar},null,8,["src"])):(A(),q("span",wn,ne(p.avatar),1))]),description:N(()=>[De("div",null,[p.description?(A(),q("div",An,[d(u,{style:{width:"100%","margin-bottom":"0 !important"},ellipsis:t.$props.descRows&&t.$props.descRows>0?{rows:t.$props.descRows,tooltip:!!p.description}:!1,content:p.description},null,8,["ellipsis","content"])])):we("",!0),De("div",kn,ne(p.datetime),1)])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["class","pagination"])}var Pn=Qe(Dn,[["render",On],["__scopeId","data-v-737c3776"]]);const Nn=re({components:{Popover:jt,BellOutlined:_n,Tabs:ze,TabPane:ze.TabPane,Badge:Rt,NoticeList:Pn},setup(){const{prefixCls:t}=Ye("header-notify"),{createMessage:e}=Lt(),n=ae(Te),a=I(()=>{let o=0;for(let u=0;u[d(v,null,{default:N(()=>[(A(!0),q(fe,null,et(t.listData,p=>(A(),Z(i,{key:p.key},{tab:N(()=>[tt(ne(p.name)+" ",1),p.list.length!==0?(A(),q("span",$n,"("+ne(p.list.length)+")",1)):we("",!0)]),default:N(()=>[p.key==="1"?(A(),Z(c,{key:0,list:p.list,onTitleClick:t.onNoticeClick},null,8,["list","onTitleClick"])):(A(),Z(c,{key:1,list:p.list},null,8,["list"]))]),_:2},1024))),128))]),_:1})]),default:N(()=>[d(f,{count:t.count,dot:"",numberStyle:t.numberStyle},{default:N(()=>[d(u)]),_:1},8,["count","numberStyle"])]),_:1},8,["overlayClassName"])],2)}var Qn=Qe(Nn,[["render",jn]]);export{Qn as default};