import{i as e,n as t,t as n}from"./react-B8IZ02wI.js";import{At as r,G as i,H as a,Ot as o,P as s,Q as c,S as l,Tt as u,U as d,Ut as f,V as p,Xt as m,Zt as h,at as g,ct as _,dt as v,et as y,hn as b,in as ee,jt as te,k as x,kt as S,pn as C,q as ne,vn as w,zt as re}from"./button-DqbiydrF.js";import{o as T}from"./useForm-D_WiMFpZ.js";import{t as E}from"./CheckOutlined-DphQKjKC.js";import{dt as D}from"./index-Bg7bo8aA.js";var O=e(n()),k=(e,t={})=>!d(e)&&t?.skipEmpty?[]:Array.isArray(e)?e:[e],A=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`}}))());function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}var ie=O.forwardRef((e,t)=>O.createElement(c,j({},e,{ref:t,icon:A.default}))),ae=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={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`}}))());function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M.apply(this,arguments)}var N=O.forwardRef((e,t)=>O.createElement(c,M({},e,{ref:t,icon:ae.default}))),P=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},oe=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[`
      h${t}&,
      div&-h${t},
      div&-h${t} > textarea,
      h${t}
    `]=P(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},se=e=>{let{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...g(e),userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`,[`${t}-actions`]:{pointerEvents:`auto`}}}}}},F=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:v[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85},table:{width:`100%`,textAlign:`start`,borderCollapse:`separate`,borderSpacing:0,marginBlock:`1em`,"th, td":{padding:u(e.padding),overflowWrap:`break-word`,borderBottom:`${u(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"thead > tr:first-child > th:first-child":{borderStartStartRadius:e.borderRadiusLG},"thead > tr:first-child > th:last-child":{borderStartEndRadius:e.borderRadiusLG},"thead > tr > th":{textAlign:`start`,position:`relative`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,backgroundColor:e.colorFillAlter,transition:`background-color ${e.motionDurationMid} ease`,"&:not(:last-child)::before":{position:`absolute`,top:`50%`,insetInlineEnd:0,width:1,height:`1.6em`,backgroundColor:e.colorSplit,transform:`translateY(-50%)`,content:`""`}},"tbody > tr":{"> th, > td":{transition:`background-color ${e.motionDurationMid} ease`},"&:hover > th, &:hover > td":{backgroundColor:e.colorFillAlter}}}}),I=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},L=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),ce=()=>({"a&-ellipsis, span&-ellipsis":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{..._,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),le=y(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:{color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"div&, p":{marginBottom:`1em`},...oe(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:n},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:n}},...F(e),...se(e),[`${t}-actions`]:{display:`inline`},[`
        ${t}-expand,
        ${t}-collapse,
        ${t}-edit,
        ${t}-copy
      `]:{...g(e),marginInlineStart:e.marginXXS},[`${t}-actions-start`]:{[`
          ${t}-expand,
          ${t}-collapse,
          ${t}-edit,
          ${t}-copy:not(${t}-copy-icon-only)
        `]:{marginInlineStart:0,marginInlineEnd:e.marginXXS}},...I(e),...L(e),...ce(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),ue=e=>{let{prefixCls:t,"aria-label":n,className:i,style:a,classNames:o,styles:s,direction:c,maxLength:l,autoSize:u=!0,value:d,onSave:f,onCancel:p,onEnd:h,component:g,enterIcon:_=O.createElement(N,null)}=e,v=O.useRef(null),y=O.useRef(!1),b=O.useRef(null),[ee,te]=O.useState(d);O.useEffect(()=>{te(d)},[d]),O.useEffect(()=>{if(v.current?.resizableTextArea){let{textArea:e}=v.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let S=({target:e})=>{te(e.value.replace(/[\n\r]/g,``))},C=()=>{y.current=!0},ne=()=>{y.current=!1},w=({keyCode:e})=>{y.current||(b.current=e)},re=()=>{f(ee.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{b.current!==e||y.current||t||n||r||i||(e===m.ENTER?(re(),h?.()):e===m.ESC&&p())},E=()=>{re()},[k,A]=le(t),j=r(t,`${t}-edit-content`,{[`${t}-rtl`]:c===`rtl`,[`${t}-${g}`]:!!g},i,o.root,k,A);return O.createElement(`div`,{className:j,style:{...s.root,...a}},O.createElement(D,{ref:v,maxLength:l,value:ee,onChange:S,onKeyDown:w,onKeyUp:T,onCompositionStart:C,onCompositionEnd:ne,onBlur:E,"aria-label":n,rows:1,autoSize:u,className:o.textarea,style:s.textarea}),_===null?null:x(_,{className:`${t}-edit-content-confirm`}))},de=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},fe=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function pe(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await fe(e,n)||de(e,n))}var me=({copyConfig:e,children:t})=>{let[n,r]=O.useState(!1),[i,o]=O.useState(!1),s=O.useRef(null),c=()=>{s.current&&clearTimeout(s.current)},l={};return e.format&&(l.format=e.format),O.useEffect(()=>c,[]),{copied:n,copyLoading:i,onClick:w(async n=>{n?.preventDefault(),n?.stopPropagation(),o(!0);try{await pe((a(e.text)?await e.text():e.text)||k(t,{skipEmpty:!0}).join(``)||``,l),o(!1),r(!0),c(),s.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw o(!1),e}})}},he=(e,t)=>{let n=!!e;return O.useMemo(()=>[n,{...t,...n&&i(e)?e:null}],[n,e,t])},ge=e=>{let t=(0,O.useRef)(void 0);return(0,O.useEffect)(()=>{t.current=e}),t.current},_e=(e,t,n)=>(0,O.useMemo)(()=>e===!0?{title:t??n}:(0,O.isValidElement)(e)?{title:e}:i(e)?{title:t??n,...e}:{title:e},[e,t,n]),ve=(e,t,n,r,i)=>{let{getPrefixCls:a,direction:s,className:c,style:l,classNames:u,styles:d}=o(`typography`),f=r??s,m=a(`typography`,e),h={...i,prefixCls:m,direction:f},g=(0,O.useMemo)(()=>({root:c}),[c]),_=(0,O.useMemo)(()=>({root:l}),[l]),[v,y]=p([g,u,t],[_,d,n],{props:h});return[v,y,m,f]},ye=O.forwardRef((e,t)=>{let{component:n=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,classNames:l,styles:u,prefixCls:d,...f}=e,[p,m]=le(d),h=r(d,{[`${d}-rtl`]:s===`rtl`},i,a,p,m,l?.root),g={...u?.root,...c};return O.createElement(n,{...f,className:h,style:g,ref:t},o)}),be=O.forwardRef((e,t)=>{let{prefixCls:n,className:i,rootClassName:a,direction:o,classNames:s,styles:c,...l}=e,[u,d,f,p]=ve(n,s,c,o,e);return O.createElement(ye,{ref:t,className:r(i,a),direction:p,classNames:u,styles:d,prefixCls:f,...l})}),xe=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`}}))());function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R.apply(this,arguments)}var Se=O.forwardRef((e,t)=>O.createElement(c,R({},e,{ref:t,icon:xe.default}))),z=e=>e===!1?[!1,!1]:k(e);function B(e,t,n){return e===!0||e===void 0?t:e||n&&t}function Ce(e){let t=document.createElement(`em`);e.appendChild(t);let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}var we=e=>[`string`,`number`].includes(typeof e),Te=e=>{let{prefixCls:t,copied:n,locale:i,iconOnly:a,tooltips:o,icon:s,tabIndex:c,onCopy:u,loading:d,className:f,style:p}=e,m=z(o),h=z(s),{copied:g,copy:_}=i??{},v=n?g:_,y=B(m[+!!n],v),b=typeof y==`string`?y:v;return O.createElement(T,{title:y},O.createElement(`button`,{type:`button`,className:r(`${t}-copy`,f,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:a}),style:p,onClick:u,"aria-label":b,tabIndex:c},n?B(h[1],O.createElement(E,null),!0):B(h[0],d?O.createElement(l,null):O.createElement(Se,null),!0)))},V=O.forwardRef(({style:e,children:t},n)=>{let r=O.useRef(null);return O.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),O.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),Ee=e=>e.reduce((e,t)=>e+(we(t)?String(t).length:1),0);function De(e,t){let n=0,r=[];for(let i=0;i<e.length;i+=1){if(n===t)return r;let a=e[i],o=we(a)?String(a).length:1,s=n+o;if(s>t){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var Oe=0,H=1,ke=2,U=3,Ae=4,W={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function je(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,measureDeps:s,miscDeps:c,onEllipsis:l}=e,u=O.useMemo(()=>re(r),[r]),d=O.useMemo(()=>Ee(u),[r]),f=O.useMemo(()=>i(u,!1),[r].concat(S(s))),[p,m]=O.useState(null),h=O.useRef(null),g=O.useRef(null),_=O.useRef(null),v=O.useRef(null),y=O.useRef(null),[ee,te]=O.useState(!1),[x,C]=O.useState(Oe),[ne,w]=O.useState(0),[T,E]=O.useState(null);b(()=>{C(t&&n&&d?H:Oe)},[n,r,a,t,u].concat(S(s))),b(()=>{if(x===H)C(ke),E(g.current&&getComputedStyle(g.current).whiteSpace);else if(x===ke){let e=!!_.current?.isExceed();C(e?U:Ae),m(e?[0,d]:null),te(e);let t=_.current?.getHeight()||0,n=a===1?0:v.current?.getHeight()||0,r=y.current?.getHeight()||0;w(Math.max(t,n+r)+1),l(e)}},[x]);let D=p?Math.ceil((p[0]+p[1])/2):0;b(()=>{let[e,t]=p||[0,0];if(e!==t){let n=(h.current?.getHeight()||0)>ne,r=D;t-e===1&&(r=n?e:t),m(n?[e,r]:[r,t])}},[p,D]);let k=O.useMemo(()=>{if(!t)return i(u,!1);if(x!==U||!p||p[0]!==p[1]){let e=i(u,!1);return[Ae,Oe].includes(x)?e:O.createElement(`span`,{style:{...W,WebkitLineClamp:a}},e)}return i(o?u:De(u,p[0]),ee)},[o,x,p,u].concat(S(c))),A={width:n,margin:0,padding:0,whiteSpace:T===`nowrap`?`normal`:`inherit`};return O.createElement(O.Fragment,null,k,x===ke&&O.createElement(O.Fragment,null,O.createElement(V,{style:{...A,...W,WebkitLineClamp:a},ref:_},f),O.createElement(V,{style:{...A,...W,WebkitLineClamp:a-1},ref:v},f),O.createElement(V,{style:{...A,...W,WebkitLineClamp:1},ref:y},i([],!0))),x===U&&p&&p[0]!==p[1]&&O.createElement(V,{style:{...A,top:400},ref:h},i(De(u,D),!0)),x===H&&O.createElement(`span`,{style:{whiteSpace:`inherit`},ref:g}))}var Me=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return O.createElement(T,{open:a,...i},r)};function Ne({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=O.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var Pe=`...`,Fe=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],G=O.forwardRef((e,t)=>{let{prefixCls:n,className:i,style:o,classNames:c,styles:l,direction:u,type:d,disabled:p,children:m,ellipsis:g,editable:_,copyable:v,actions:y,component:x,title:w,onMouseEnter:E,onMouseLeave:D,...k}=e,[A]=s(`Text`),j=O.useRef(null),ae=O.useRef(null),[M,N,P,oe]=ve(n,c,l,u,e),se=f(k,Fe),[F,I]=he(_),[L,ce]=C(!1,I.editing),{triggerType:le=[`icon`]}=I,de=e=>{e&&I.onStart?.(),ce(e)},fe=ge(L);b(()=>{!L&&fe&&ae.current?.focus()},[L]);let pe=e=>{e?.preventDefault(),de(!0)},be=e=>{I.onChange?.(e),de(!1)},xe=()=>{I.onCancel?.(),de(!1)},[R,Se]=he(v),{placement:z=`end`}=y??{},{copied:B,copyLoading:V,onClick:Ee}=me({copyConfig:Se,children:m}),[De,Oe]=O.useState(!1),[H,ke]=O.useState(!1),[U,Ae]=O.useState(!1),[W,G]=O.useState(!1),[Ie,Le]=O.useState(!0),[K,q]=he(g,{expandable:!1,symbol:e=>e?A?.collapse:A?.expand}),[J,Y]=C(q.defaultExpanded||!1,q.expanded),X=K&&(!J||q.expandable===`collapsible`),{rows:Z=1}=q,Re=O.useMemo(()=>X&&(q.suffix!==void 0||q.onEllipsis||q.expandable||F||R),[X,q,F,R]);b(()=>{K&&!Re&&(Oe(h(`webkitLineClamp`)),ke(h(`textOverflow`)))},[Re,K]);let[Q,ze]=O.useState(X),Be=O.useMemo(()=>Re?!1:Z===1?H:De,[Re,H,De]);b(()=>{ze(Be&&X)},[Be,X]);let Ve=_e(q.tooltip,I.text,m),$=Q&&!!Ve.title,He=X&&(Q?$&&W:U),Ue=X&&Z===1&&Q,We=X&&Z>1&&Q,Ge=(e,t)=>{Y(t.expanded),q.onExpand?.(e,t)},[Ke,qe]=O.useState(0),[Je,Ye]=O.useState(!1),[Xe,Ze]=O.useState(!1),Qe=({offsetWidth:e})=>{qe(e)},$e=e=>{Ae(e),U!==e&&q.onEllipsis?.(e)};O.useEffect(()=>{let e=j.current;if(K&&$&&e){let t=Ce(e);W!==t&&G(t)}},[K,$,m,We,Ie,Ke]),O.useEffect(()=>{let e=j.current;if(typeof IntersectionObserver>`u`||!e||!$||!X)return;let t=new IntersectionObserver(()=>{Le(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[$,X]);let et=O.useMemo(()=>{if(!(!K||Q))return[I.text,m,w,Ve.title].find(we)},[K,Q,w,Ve.title,He]);if(L)return O.createElement(ue,{value:I.text??(typeof m==`string`?m:``),onSave:be,onCancel:xe,onEnd:I.onEnd,prefixCls:P,className:i,style:o,direction:oe,component:x,maxLength:I.maxLength,autoSize:I.autoSize,enterIcon:I.enterIcon,classNames:M,styles:N});let tt=()=>{let{expandable:e,symbol:t}=q;return e?O.createElement(`button`,{type:`button`,key:`expand`,className:r(`${P}-${J?`collapse`:`expand`}`,M.action),style:N.action,onClick:e=>Ge(e,{expanded:!J}),"aria-label":J?A.collapse:A?.expand},a(t)?t(J):t):null},nt=()=>{if(!F)return;let{icon:e,tooltip:t,tabIndex:n}=I,i=re(t)[0]||A?.edit,a=typeof i==`string`?i:``;return le.includes(`icon`)?O.createElement(T,{key:`edit`,title:t===!1?``:i},O.createElement(`button`,{type:`button`,ref:ae,className:r(`${P}-edit`,M.action),style:N.action,onClick:pe,"aria-label":a,tabIndex:n},e||O.createElement(ie,{role:`button`}))):null},rt=()=>R?O.createElement(Te,{key:`copy`,...Se,prefixCls:P,copied:B,locale:A,onCopy:Ee,loading:V,iconOnly:!ne(m),className:M.action,style:N.action}):null,it=e=>{let t=e&&tt(),n=nt(),i=rt();return!t&&!n&&!i?null:O.createElement(`span`,{key:`operations`,className:r(`${P}-actions`,M.actions,{[`${P}-actions-start`]:z===`start`}),style:N.actions,onMouseEnter:()=>Ye(!0),onMouseLeave:()=>Ye(!1)},t,n,i)},at=e=>[e&&!J&&O.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},Pe),q.suffix];return O.createElement(te,{onResize:Qe,disabled:!X},n=>O.createElement(Me,{tooltipProps:Ve,enableEllipsis:X,isEllipsis:He,open:Xe&&!Je},O.createElement(ye,{onMouseEnter:e=>{Ze(!0),E?.(e)},onMouseLeave:e=>{Ze(!1),D?.(e)},className:r({[`${P}-${d}`]:d,[`${P}-disabled`]:p,[`${P}-ellipsis`]:K,[`${P}-ellipsis-single-line`]:Ue,[`${P}-ellipsis-multiple-line`]:We,[`${P}-link`]:x===`a`},i),classNames:M,styles:N,prefixCls:P,style:{...o,WebkitLineClamp:We?Z:void 0},component:x,ref:ee(n,j,t),direction:oe,onClick:le.includes(`text`)?pe:void 0,"aria-label":et?.toString(),title:w,...se},O.createElement(je,{enableMeasure:X&&!Q,text:m,rows:Z,width:Ke,onEllipsis:$e,expanded:J,measureDeps:[z],miscDeps:[B,J,V,F,R,z,A].concat(S(Fe.map(t=>e[t])))},(t,n)=>Ne(e,O.createElement(O.Fragment,null,z===`start`?it(n):null,t.length>0&&n&&!J&&et?O.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,at(n),z===`start`?null:it(n)))))))}),Ie=O.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return O.createElement(G,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),Le=O.forwardRef((e,t)=>{let{children:n,...r}=e;return O.createElement(G,{ref:t,...r,component:`div`},n)}),K=O.forwardRef((e,t)=>{let{ellipsis:n,children:r,...a}=e,o=O.useMemo(()=>i(n)?f(n,[`expandable`,`rows`]):n,[n]);return O.createElement(G,{ref:t,...a,ellipsis:o,component:`span`},r)}),q=[1,2,3,4,5],J=O.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=q.includes(n)?`h${n}`:`h1`;return O.createElement(G,{ref:t,...i,component:a},r)}),Y=be;Y.Text=K,Y.Link=Ie,Y.Title=J,Y.Paragraph=Le;export{Y as t};