import{o as e,t}from"./chunk-jRWAZmH_.js";import{n}from"./jsx-runtime-CEixWuwE.js";import{Bn as r,D as i,Dt as a,G as o,Mn as s,N as c,Nn as l,ct as u,ft as d,ir as f,lt as p,nn as m,pt as h,rr as g,wn as _,xn as v}from"./axios-DOscJEDN.js";import{n as y,t as b}from"./slicedToArray-BQ1tPSGY.js";import{n as x,t as S}from"./typeof-BUNGcdwP.js";import{i as C,r as w}from"./asyncToGenerator-DHhZBkop.js";import{c as T,d as E,f as D,l as O,m as ee,p as k,s as A,u as te}from"./button-BMyidN73.js";import{i as ne}from"./select-C47FfvhI.js";import{t as j}from"./tooltip-3rewahde.js";import{r as re}from"./styleChecker-CBbSvMnG.js";import{n as ie}from"./input-Yn95s9T0.js";import{t as ae}from"./transButton-D0reIx7z.js";import{t as oe}from"./CopyOutlined-DaVzY812.js";var M=e(n());f(),x(),C(),l(),y();var se={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`},ce=M.forwardRef(function(e,t){return M.createElement(a,s(s({},e),{},{ref:t,icon:se}))}),N=t(((e,t)=>{t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r{var n=N(),r={"text/plain":`Text`,"text/html":`Url`,default:`Text`},i=`Copy to clipboard: #{key}, Enter`;function a(e){var t=(/mac os x/i.test(navigator.userAgent)?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}function o(e,t){var o,s,c,l,u,d,f=!1;t||={},o=t.debug||!1;try{if(c=n(),l=document.createRange(),u=document.getSelection(),d=document.createElement(`span`),d.textContent=e,d.ariaHidden=`true`,d.style.all=`unset`,d.style.position=`fixed`,d.style.top=0,d.style.clip=`rect(0, 0, 0, 0)`,d.style.whiteSpace=`pre`,d.style.webkitUserSelect=`text`,d.style.MozUserSelect=`text`,d.style.msUserSelect=`text`,d.style.userSelect=`text`,d.addEventListener(`copy`,function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),n.clipboardData===void 0){o&&console.warn(`unable to use e.clipboardData`),o&&console.warn(`trying IE specific stuff`),window.clipboardData.clearData();var i=r[t.format]||r.default;window.clipboardData.setData(i,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),l.selectNodeContents(d),u.addRange(l),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);f=!0}catch(n){o&&console.error(`unable to copy using execCommand: `,n),o&&console.warn(`trying IE specific stuff`);try{window.clipboardData.setData(t.format||`text`,e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(n){o&&console.error(`unable to copy using clipboardData: `,n),o&&console.error(`falling back to prompt`),s=a(`message`in t?t.message:i),window.prompt(s,e)}}finally{u&&(typeof u.removeRange==`function`?u.removeRange(l):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return f}t.exports=o})),F=e(r());k(),_(),D(),O(),d(),u();var le=e(P()),ue={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`};l();var I=M.forwardRef(function(e,t){return M.createElement(a,s(s({},e),{},{ref:t,icon:ue}))});T();var de=function(e){var t=e.prefixCls,n=e[`aria-label`],r=e.className,i=e.style,a=e.direction,o=e.maxLength,s=e.autoSize,l=s===void 0?!0:s,u=e.value,d=e.onSave,f=e.onCancel,p=e.onEnd,m=e.component,h=e.enterIcon,g=h===void 0?M.createElement(I,null):h,_=M.useRef(null),v=M.useRef(!1),y=M.useRef(),x=b(M.useState(u),2),S=x[0],C=x[1];M.useEffect(function(){C(u)},[u]),M.useEffect(function(){if(_.current&&_.current.resizableTextArea){var e=_.current.resizableTextArea.textArea;e.focus();var t=e.value.length;e.setSelectionRange(t,t)}},[]);var T=function(e){var t=e.target;C(t.value.replace(/[\n\r]/g,``))},E=function(){v.current=!0},D=function(){v.current=!1},O=function(e){var t=e.keyCode;v.current||(y.current=t)},ee=function(){d(S.trim())},k=function(e){var t=e.keyCode,n=e.ctrlKey,r=e.altKey,i=e.metaKey,a=e.shiftKey;y.current===t&&!v.current&&!n&&!r&&!i&&!a&&(t===A.ENTER?(ee(),p?.()):t===A.ESC&&f())},te=function(){ee()},ne=m?`${t}-${m}`:``,j=(0,F.default)(t,`${t}-edit-content`,w({},`${t}-rtl`,a===`rtl`),r,ne);return M.createElement(`div`,{className:j,style:i},M.createElement(ie,{ref:_,maxLength:o,value:S,onChange:T,onKeyDown:O,onKeyUp:k,onCompositionStart:E,onCompositionEnd:D,onBlur:te,"aria-label":n,rows:1,autoSize:l}),g===null?null:c(g,{className:`${t}-edit-content-confirm`}))};function fe(e,t){return M.useMemo(function(){var n=!!e;return[n,g(g({},t),n&&S(e)===`object`?e:null)]},[e])}var pe=function(e,t){var n=M.useRef(!1);M.useEffect(function(){n.current?e():n.current=!0},t)};f(),C();var me=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);it){var c=t-n;return r.push(String(a).slice(0,c)),r}r.push(a),n=s}return e}var _e=0,z=1,ve=2,B=3,V=4,ye=function(e){var t=e.enabledMeasure,n=e.children,r=e.text,i=e.width,a=e.fontSize,o=e.rows,s=e.onEllipsis,c=b(M.useState([0,0,0]),2),l=b(c[0],3),u=l[0],d=l[1],f=l[2],p=c[1],m=b(M.useState(_e),2),_=m[0],v=m[1],y=b(M.useState(0),2),x=y[0],S=y[1],C=M.useRef(null),w=M.useRef(null),T=M.useMemo(function(){return ee(r)},[r]),E=M.useMemo(function(){return ge(T)},[T]),D=M.useMemo(function(){return!t||_!==B?n(T,!1):n(R(T,d),d1&&Z,Qe=function(e){var t;Re(!0),(t=q.onExpand)==null||t.call(q,e)},$e=b(M.useState(0),2),et=$e[0],tt=$e[1],nt=b(M.useState(0),2),rt=nt[0],it=nt[1],at=function(e,t){var n=e.offsetWidth;tt(n),it(parseInt(window.getComputedStyle?.call(window,t).fontSize,10)||0)},ot=function(e){var t;Ve(e),Be!==e&&((t=q.onEllipsis)==null||t.call(q,e))};M.useEffect(function(){var e=O.current;if(K&&Z&&e){var t=Q?e.offsetHeight`u`||!e||!Z||!J)){var t=new IntersectionObserver(function(){qe(!!e.offsetParent)});return t.observe(e),function(){t.disconnect()}}},[Z,J]);var $={};$=q.tooltip===!0?{title:P.text??c}:M.isValidElement(q.tooltip)?{title:q.tooltip}:S(q.tooltip)===`object`?g({title:P.text??c},q.tooltip):{title:q.tooltip};var st=M.useMemo(function(){var e=function(e){return[`string`,`number`].includes(S(e))};if(!(!K||Z)){if(e(P.text))return P.text;if(e(c))return c;if(e(_))return _;if(e($.title))return $.title}},[K,Z,_,$.title,Xe]);if(I)return M.createElement(de,{value:P.text??(typeof c==`string`?c:``),onSave:z,onCancel:ve,onEnd:P.onEnd,prefixCls:A,className:r,style:i,direction:T,component:f,maxLength:P.maxLength,autoSize:P.autoSize,enterIcon:P.enterIcon});var ct=function(){var e=q.expandable,t=q.symbol;if(!e)return null;var n=t||D.expand;return M.createElement(`a`,{key:`expand`,className:`${A}-expand`,onClick:Qe,"aria-label":D.expand},n)},lt=function(){if(N){var e=P.icon,t=P.tooltip,n=ee(t)[0]||D.edit,r=typeof n==`string`?n:``;return ge.includes(`icon`)?M.createElement(j,{key:`edit`,title:t===!1?``:n},M.createElement(ae,{ref:k,className:`${A}-edit`,onClick:_e,"aria-label":r},e||M.createElement(ce,{role:`button`}))):null}},ut=function(){if(V){var e=U.tooltips,t=U.icon,n=Ce(e),r=Ce(t),i=W?H(n[1],D.copied):H(n[0],D.copy),a=W?D.copied:D.copy,o=typeof i==`string`?i:a;return M.createElement(j,{key:`copy`,title:i},M.createElement(ae,{className:(0,F.default)(`${A}-copy`,W&&`${A}-copy-success`),onClick:Ae,"aria-label":o},W?H(r[1],M.createElement(ne,null),!0):H(r[0],M.createElement(oe,null),!0)))}},dt=function(e){return[e&&ct(),lt(),ut()]},ft=function(e){return[e&&M.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},we),q.suffix,dt(e)]};return M.createElement(E,{onResize:at,disabled:!J||Z},function(o){return M.createElement(be,{tooltipProps:$,enabledEllipsis:J,isEllipsis:Xe},M.createElement(he,g({className:(0,F.default)(w(w(w(w(w(w({},`${A}-${a}`,a),`${A}-disabled`,s),`${A}-ellipsis`,K),`${A}-single-line`,J&&Y===1),`${A}-ellipsis-single-line`,Ze),`${A}-ellipsis-multiple-line`,Q),r),prefixCls:n,style:g(g({},i),{WebkitLineClamp:Q?Y:void 0}),component:f,ref:v(o,O,t),direction:T,onClick:ge.includes(`text`)?_e:void 0,"aria-label":st?.toString(),title:_},ie),M.createElement(ye,{enabledMeasure:J&&!Z,text:c,rows:Y,width:et,fontSize:rt,onEllipsis:ot},function(t,n){var r=t;return t.length&&n&&st&&(r=M.createElement(`span`,{key:`show-content`,"aria-hidden":!0},r)),Se(e,M.createElement(M.Fragment,null,r,ft(n)))})))})});f();var Te=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i