import{n as c,aS as Ye,a as ge,v as $e,a7 as ye,s as me,N as Oe,f as q,T as L,fh as Ze,c2 as de,fi as et,J as _e,_ as y,R as ae,S as tt,cO as Re,X as W,M as nt,cd as pe,al as Ee,L as at,O as G,co as it,a6 as rt,c1 as V,F as Te,am as ot,cj as lt,bi as fe,cw as st,di as ut,fj as ct}from"./index.7e08ba81.js";import{T as we}from"./transButton.38e068f8.js";import{C as dt}from"./CopyOutlined.56217d1c.js";import{E as pt}from"./EditOutlined.c9dad9df.js";var ft={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"},vt=ft;function Ne(t){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:0,k=arguments.length>3&&arguments[3]!==void 0?arguments[3]:C.length,se=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,M=Math.floor((T+k)/2),Z=C.slice(0,M);if(p.textContent=Z,T>=k-1)for(var H=k;H>=T;H-=1){var X=C.slice(0,H);if(p.textContent=X,E()||!X)return H===C.length?{finished:!1,vNode:C}:{finished:!0,vNode:X}}return E()?R(p,C,M,k,M):R(p,C,T,M,se)}function j(p){var C=p.nodeType;if(C===Ct){var T=p.textContent||"",k=document.createTextNode(T);return x(k),R(k,T)}return{finished:!1,vNode:null}}return $.some(function(p){var C=j(p),T=C.finished,k=C.vNode;return k&&K.push(k),T}),{content:K,text:N.innerHTML,ellipsis:!0}},wt=["prefixCls","class","direction","component"],Nt=function(){return{prefixCls:String,direction:String,component:String}},kt=ge({name:"ATypography",inheritAttrs:!1,props:Nt(),setup:function(e,i){var r=i.slots,u=i.attrs,o=_e("typography",e),s=o.prefixCls,v=o.direction;return function(){var m,a=y(y({},e),u);a.prefixCls,a.class,a.direction;var g=a.component,E=g===void 0?"article":g,$=ae(a,wt);return c(E,y({class:tt(s.value,L({},"".concat(s.value,"-rtl"),v.value==="rtl"),u.class)},$),{default:function(){return[(m=r.default)===null||m===void 0?void 0:m.call(r)]}})}}}),P=kt,Pt=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var i=document.activeElement,r=[],u=0;u1&&te,F=b,qe;if(D&&a.isEllipsis&&!a.expanded&&!te){var ce,Se=A.title,ne=Se||"";!Se&&(typeof b=="string"||typeof b=="number")&&(ne=String(b)),ne=(ce=ne)===null||ce===void 0?void 0:ce.slice(String(a.ellipsisContent||"").length),F=c(Te,null,[ot(a.ellipsisContent),c("span",{title:ne,"aria-hidden":"true"},[Pe]),Ce])}else F=c(Te,null,[b,Ce]);F=je(e,F);var Ge=ue&&D&&a.isEllipsis&&!a.expanded&&!te,Qe=r.ellipsisTooltip?r.ellipsisTooltip():ue;return c(lt,{onResize:Z,disabled:!D},{default:function(){return[c(P,y({ref:g,class:[(S={},L(S,"".concat(v.value,"-").concat(I),I),L(S,"".concat(v.value,"-disabled"),_),L(S,"".concat(v.value,"-ellipsis"),D),L(S,"".concat(v.value,"-single-line"),D===1&&!a.isEllipsis),L(S,"".concat(v.value,"-ellipsis-single-line"),Je),L(S,"".concat(v.value,"-ellipsis-multiple-line"),xe),S),J],style:y(y({},U),{},{WebkitLineClamp:xe?D:void 0}),"aria-label":qe,direction:m.value,onClick:f.indexOf("text")!==-1?B:function(){}},Xe),{default:function(){return[Ge?c(fe,{title:ue===!0?b:Qe},{default:function(){return[c("span",null,[F])]}}):F,he()]}})]}})}},null)}}}),Y=Dt,Bt=["ellipsis","rel"],jt=function(){return V(y(y({},Q()),{},{ellipsis:{type:Boolean,default:void 0}}),["component"])},ie=function(e,i){var r=i.slots,u=i.attrs,o=y(y({},e),u),s=o.ellipsis,v=o.rel,m=ae(o,Bt);G(W(s)!=="object","Typography.Link","`ellipsis` only supports boolean value.");var a=y(y({},m),{},{rel:v===void 0&&m.target==="_blank"?"noopener noreferrer":v,ellipsis:!!s,component:"a"});return delete a.navigate,c(Y,a,r)};ie.displayName="ATypographyLink";ie.inheritAttrs=!1;ie.props=jt();var Ie=ie,Mt=function(){return V(Q(),["component"])},re=function(e,i){var r=i.slots,u=i.attrs,o=y(y({},e),{},{component:"div"},u);return c(Y,o,r)};re.displayName="ATypographyParagraph";re.inheritAttrs=!1;re.props=Mt();var Ae=re,Kt=function(){return y(y({},V(Q(),["component"])),{},{ellipsis:{type:[Boolean,Object],default:void 0}})},oe=function(e,i){var r=i.slots,u=i.attrs,o=e.ellipsis;G(W(o)!=="object"||!o||!("expandable"in o)&&!("rows"in o),"Typography.Text","`ellipsis` do not support `expandable` or `rows` props.");var s=y(y({},e),{},{ellipsis:o&&W(o)==="object"?V(o,["expandable","rows"]):o,component:"span"},u);return c(Y,s,r)};oe.displayName="ATypographyText";oe.inheritAttrs=!1;oe.props=Kt();var De=oe,Ht=["level"],zt=ct(1,2,3,4,5),Ut=function(){return y(y({},V(Q(),["component","strong"])),{},{level:Number})},le=function(e,i){var r=i.slots,u=i.attrs,o=e.level,s=o===void 0?1:o,v=ae(e,Ht),m;zt.indexOf(s)!==-1?m="h".concat(s):(G(!1,"Typography","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value."),m="h1");var a=y(y({},v),{},{component:m},u);return c(Y,a,r)};le.displayName="ATypographyTitle";le.inheritAttrs=!1;le.props=Ut();var Be=le;P.Text=De;P.Title=Be;P.Paragraph=Ae;P.Link=Ie;P.Base=Y;P.install=function(t){return t.component(P.name,P),t.component(P.Text.displayName,De),t.component(P.Title.displayName,Be),t.component(P.Paragraph.displayName,Ae),t.component(P.Link.displayName,Ie),t};export{P as T};