import{ab as q,ac as J,X as _,an as K,ad as Q,bt as U,d as ee,ag as ne,N as w,c as oe,ah as te,f as s,a$ as le,aA as ae,aF as ie,aX as se,aZ as re,a_ as ce,aj as R,aY as de,bF as ue,dA as ge,bG as fe,bH as pe,dB as me,dC as ve,dD as $e,dE as ye,av as v}from"./jwt-decode.esm.95147216.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9595a8a5-6a04-4fe7-9af1-ab3feacdc05b",e._sentryDebugIdIdentifier="sentry-dbid-9595a8a5-6a04-4fe7-9af1-ab3feacdc05b")}catch{}})();const B=(e,n,o,a,i)=>({backgroundColor:e,border:`${a.lineWidth}px ${a.lineType} ${n}`,[`${i}-icon`]:{color:o}}),be=e=>{const{componentCls:n,motionDurationSlow:o,marginXS:a,marginSM:i,fontSize:u,fontSizeLG:r,lineHeight:g,borderRadiusLG:$,motionEaseInOutCirc:c,alertIconSizeLG:d,colorText:p,paddingContentVerticalSM:m,alertPaddingHorizontal:y,paddingMD:h,paddingContentHorizontalLG:C}=e;return{[n]:_(_({},K(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${m}px ${y}px`,wordWrap:"break-word",borderRadius:$,[`&${n}-rtl`]:{direction:"rtl"},[`${n}-content`]:{flex:1,minWidth:0},[`${n}-icon`]:{marginInlineEnd:a,lineHeight:0},["&-description"]:{display:"none",fontSize:u,lineHeight:g},"&-message":{color:p},[`&${n}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${o} ${c}, opacity ${o} ${c},
        padding-top ${o} ${c}, padding-bottom ${o} ${c},
        margin-bottom ${o} ${c}`},[`&${n}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${n}-with-description`]:{alignItems:"flex-start",paddingInline:C,paddingBlock:h,[`${n}-icon`]:{marginInlineEnd:i,fontSize:d,lineHeight:0},[`${n}-message`]:{display:"block",marginBottom:a,color:p,fontSize:r},[`${n}-description`]:{display:"block"}},[`${n}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},he=e=>{const{componentCls:n,colorSuccess:o,colorSuccessBorder:a,colorSuccessBg:i,colorWarning:u,colorWarningBorder:r,colorWarningBg:g,colorError:$,colorErrorBorder:c,colorErrorBg:d,colorInfo:p,colorInfoBorder:m,colorInfoBg:y}=e;return{[n]:{"&-success":B(i,a,o,e,n),"&-info":B(y,m,p,e,n),"&-warning":B(g,r,u,e,n),"&-error":_(_({},B(d,c,$,e,n)),{[`${n}-description > pre`]:{margin:0,padding:0}})}}},Ce=e=>{const{componentCls:n,iconCls:o,motionDurationMid:a,marginXS:i,fontSizeIcon:u,colorIcon:r,colorIconHover:g}=e;return{[n]:{["&-action"]:{marginInlineStart:i},[`${n}-close-icon`]:{marginInlineStart:i,padding:0,overflow:"hidden",fontSize:u,lineHeight:`${u}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${o}-close`]:{color:r,transition:`color ${a}`,"&:hover":{color:g}}},"&-close-text":{color:r,transition:`color ${a}`,"&:hover":{color:g}}}}},Ie=e=>[be(e),he(e),Ce(e)],Se=q("Alert",e=>{const{fontSizeHeading3:n}=e,o=J(e,{alertIconSizeLG:n,alertPaddingHorizontal:12});return[Ie(o)]}),xe={success:ue,info:ge,error:fe,warning:pe},we={success:me,info:ve,error:$e,warning:ye},Be=U("success","info","warning","error"),_e=()=>({type:v.oneOf(Be),closable:{type:Boolean,default:void 0},closeText:v.any,message:v.any,description:v.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:v.any,closeIcon:v.any,onClose:Function}),He=ee({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:_e(),setup(e,n){let{slots:o,emit:a,attrs:i,expose:u}=n;const{prefixCls:r,direction:g}=ne("alert",e),[$,c]=Se(r),d=w(!1),p=w(!1),m=w(),y=l=>{l.preventDefault();const f=m.value;f.style.height=`${f.offsetHeight}px`,f.style.height=`${f.offsetHeight}px`,d.value=!0,a("close",l)},h=()=>{var l;d.value=!1,p.value=!0,(l=e.afterClose)===null||l===void 0||l.call(e)},C=oe(()=>{const{type:l}=e;return l!==void 0?l:e.banner?"warning":"info"});u({animationEnd:h});const j=w({});return()=>{var l,f,H,T,A,E,z,D,F,O;const{banner:G,closeIcon:P=(l=o.closeIcon)===null||l===void 0?void 0:l.call(o)}=e;let{closable:L,showIcon:b}=e;const M=(f=e.closeText)!==null&&f!==void 0?f:(H=o.closeText)===null||H===void 0?void 0:H.call(o),I=(T=e.description)!==null&&T!==void 0?T:(A=o.description)===null||A===void 0?void 0:A.call(o),W=(E=e.message)!==null&&E!==void 0?E:(z=o.message)===null||z===void 0?void 0:z.call(o),S=(D=e.icon)!==null&&D!==void 0?D:(F=o.icon)===null||F===void 0?void 0:F.call(o),N=(O=o.action)===null||O===void 0?void 0:O.call(o);b=G&&b===void 0?!0:b;const k=(I?we:xe)[C.value]||null;M&&(L=!0);const t=r.value,V=te(t,{[`${t}-${C.value}`]:!0,[`${t}-closing`]:d.value,[`${t}-with-description`]:!!I,[`${t}-no-icon`]:!b,[`${t}-banner`]:!!G,[`${t}-closable`]:L,[`${t}-rtl`]:g.value==="rtl",[c.value]:!0}),X=L?s("button",{type:"button",onClick:y,class:`${t}-close-icon`,tabindex:0},[M?s("span",{class:`${t}-close-text`},[M]):P===void 0?s(le,null,null):P]):null,Y=S&&(ae(S)?ie(S,{class:`${t}-icon`}):s("span",{class:`${t}-icon`},[S]))||s(k,{class:`${t}-icon`},null),Z=se(`${t}-motion`,{appear:!1,css:!0,onAfterLeave:h,onBeforeLeave:x=>{x.style.maxHeight=`${x.offsetHeight}px`},onLeave:x=>{x.style.maxHeight="0px"}});return $(p.value?null:s(de,Z,{default:()=>[re(s("div",R(R({role:"alert"},i),{},{style:[i.style,j.value],class:[i.class,V],"data-show":!d.value,ref:m}),[b?Y:null,s("div",{class:`${t}-content`},[W?s("div",{class:`${t}-message`},[W]):null,I?s("div",{class:`${t}-description`},[I]):null]),N?s("div",{class:`${t}-action`},[N]):null,X]),[[ce,!d.value]])]}))}}}),Ae=Q(He);export{Ae as A};
//# sourceMappingURL=index.8cd0d351.js.map
