You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
41 KiB
44 lines
41 KiB
(globalThis.utooChunk_ant_design_pro||(globalThis.utooChunk_ant_design_pro=[])).push(["object"==typeof document?document.currentScript:void 0,100264,e=>{"use strict";e.i(495059);var t=e.i(191788),r={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"},i=e.i(117716);function n(){return(n=Object.assign.bind()).apply(this,arguments)}let o=t.forwardRef((e,o)=>t.createElement(i.default,n({},e,{ref:o,icon:r})));e.s(["default",0,o],100264)},204275,685986,e=>{"use strict";e.i(495059);var t=e.i(191788),r=e.i(75907),i=e.i(56926),n=e.i(77682),o=e.i(851581),l=e.i(56206),a=e.i(186762),s=e.i(351212);let c=(e,t)=>{if(!e)return null;let r={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},d=e=>void 0!==e?`${e}px`:void 0;function u(e){let{prefixCls:r,containerRef:i,value:n,getValueIndex:u,motionName:m,onMotionStart:p,onMotionEnd:f,direction:g,vertical:h=!1}=e,b=t.useRef(null),[y,$]=t.useState(n),v=e=>{let t=u(e),n=i.current?.querySelectorAll(`.${r}-item`)[t];return n?.offsetParent&&n},[k,x]=t.useState(null),[S,E]=t.useState(null);(0,s.default)(()=>{if(y!==n){let e=v(y),t=v(n),r=c(e,h),i=c(t,h);$(n),x(r),E(i),e&&t?p():f()}},[n]);let C=t.useMemo(()=>h?d(k?.top??0):"rtl"===g?d(-k?.right):d(k?.left),[h,g,k]),w=t.useMemo(()=>h?d(S?.top??0):"rtl"===g?d(-S?.right):d(S?.left),[h,g,S]);return k&&S?t.createElement(a.default,{visible:!0,motionName:m,motionAppear:!0,onAppearStart:()=>h?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},onAppearActive:()=>h?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},onVisibleChanged:()=>{x(null),E(null),f()}},({className:e,style:i},n)=>{let a={...i,"--thumb-start-left":C,"--thumb-start-width":d(k?.width),"--thumb-active-left":w,"--thumb-active-width":d(S?.width),"--thumb-start-top":C,"--thumb-start-height":d(k?.height),"--thumb-active-top":w,"--thumb-active-height":d(S?.height)},s={ref:(0,o.composeRef)(b,n),style:a,className:(0,l.clsx)(`${r}-thumb`,e)};return t.createElement("div",s)}):null}let m=({prefixCls:e,className:r,style:i,styles:n,classNames:o,data:a,disabled:s,checked:c,label:d,title:u,value:m,name:p,onChange:f,onFocus:g,onBlur:h,onKeyDown:b,onKeyUp:y,onMouseDown:$,itemRender:v=e=>e})=>v(t.createElement("label",{className:(0,l.clsx)(r,{[`${e}-item-disabled`]:s}),style:i,onMouseDown:$},t.createElement("input",{name:p,className:`${e}-item-input`,type:"radio",disabled:s,checked:c,onChange:e=>{s||f(e,m)},onFocus:g,onBlur:h,onKeyDown:b,onKeyUp:y}),t.createElement("div",{className:(0,l.clsx)(`${e}-item-label`,o?.label),title:u,style:n?.label},d)),{item:a}),p=t.forwardRef((e,a)=>{let{prefixCls:s="rc-segmented",direction:c,vertical:d,options:p=[],disabled:f,defaultValue:g,value:h,name:b,onChange:y,className:$="",style:v,styles:k,classNames:x,motionName:S="thumb-motion",itemRender:E,...C}=e,w=t.useRef(null),R=t.useMemo(()=>(0,o.composeRef)(w,a),[w,a]),M=t.useMemo(()=>p.map(e=>{if("object"==typeof e&&null!==e){let t=void 0!==e.title?e.title:"object"!=typeof e.label?e.label?.toString():void 0;return{...e,title:t}}return{label:e?.toString(),title:e?.toString(),value:e}}),[p]),[N,I]=(0,i.default)(g??M[0]?.value,h),[H,z]=t.useState(!1),T=(e,t)=>{I(t),y?.(t)},D=(0,n.default)(C,["children"]),[A,B]=t.useState(!1),[W,j]=t.useState(!1),L=()=>{j(!0)},P=()=>{j(!1)},F=()=>{B(!1)},X=e=>{"Tab"===e.key&&B(!0)},O=e=>{let t=M.findIndex(e=>e.value===N),r=M.length,i=M[(t+e+r)%r];i&&(I(i.value),y?.(i.value))},q=e=>{switch(e.key){case"ArrowLeft":case"ArrowUp":O(-1);break;case"ArrowRight":case"ArrowDown":O(1)}};return t.createElement("div",(0,r.default)({role:"radiogroup","aria-label":"segmented control",tabIndex:f?void 0:0,"aria-orientation":d?"vertical":"horizontal",style:v},D,{className:(0,l.clsx)(s,{[`${s}-rtl`]:"rtl"===c,[`${s}-disabled`]:f,[`${s}-vertical`]:d},$),ref:R}),t.createElement("div",{className:`${s}-group`},t.createElement(u,{vertical:d,prefixCls:s,value:N,containerRef:w,motionName:`${s}-${S}`,direction:c,getValueIndex:e=>M.findIndex(t=>t.value===e),onMotionStart:()=>{z(!0)},onMotionEnd:()=>{z(!1)}}),M.map(e=>{let{value:i,disabled:n}=e;return t.createElement(m,(0,r.default)({},e,{name:b,data:e,itemRender:E,key:i,prefixCls:s,className:(0,l.clsx)(e.className,`${s}-item`,x?.item,{[`${s}-item-selected`]:i===N&&!H,[`${s}-item-focused`]:W&&A&&i===N}),style:k?.item,classNames:x,styles:k,checked:i===N,onChange:T,onFocus:L,onBlur:P,onKeyDown:q,onKeyUp:X,onMouseDown:F,disabled:!!f||!!n}))})))});var f=e.i(572353),g=e.i(430898),h=e.i(497630),b=e.i(993175),y=e.i(625263),$=e.i(188304);e.i(290586);var v=e.i(774778),k=e.i(307441),x=e.i(352050),S=e.i(104616);function E(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}let C=e=>({background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}),w={overflow:"hidden",...k.textEllipsis};var R=(0,x.genStyleHooks)("Segmented",e=>{let{lineWidth:t,calc:r}=e;return(e=>{let{componentCls:t,motionDurationSlow:r,motionEaseInOut:i,motionDurationMid:n}=e,o=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),l=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),a=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:{...(0,k.resetComponent)(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${n}`,...(0,k.genFocusStyle)(e),[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${(0,v.unit)(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${n}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":{...C(e),color:e.itemSelectedColor},"&-focused":(0,k.genFocusOutline)(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,pointerEvents:"none",transition:["opacity","background-color"].map(e=>`${e} ${n}`).join(", ")},[`&:not(${t}-item-selected):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":{minHeight:o,lineHeight:(0,v.unit)(o),padding:`0 ${(0,v.unit)(e.segmentedPaddingHorizontal)}`,...w},"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:{...C(e),position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${(0,v.unit)(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}},[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:l,lineHeight:(0,v.unit)(l),padding:`0 ${(0,v.unit)(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:a,lineHeight:(0,v.unit)(a),padding:`0 ${(0,v.unit)(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}},...E(`&-disabled ${t}-item`,e),...E(`${t}-item-disabled`,e),[`${t}-thumb-motion-appear-active`]:{willChange:"transform, width",transition:["transform","width"].map(e=>`${e} ${r} ${i}`).join(", ")},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}}}})((0,S.mergeToken)(e,{segmentedPaddingHorizontal:r(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:r(e.controlPaddingHorizontalSM).sub(t).equal()}))},e=>{let{colorTextLabel:t,colorText:r,colorFillSecondary:i,colorBgElevated:n,colorFill:o,lineWidthBold:l,colorBgLayout:a}=e;return{trackPadding:l,trackBg:a,itemColor:t,itemHoverColor:r,itemHoverBg:i,itemSelectedBg:n,itemActiveBg:o,itemSelectedColor:r}});let M=t.forwardRef((e,r)=>{let i=(0,f.default)(),{prefixCls:n,className:o,rootClassName:a,block:s,options:c=[],size:d,style:u,vertical:m,orientation:v,shape:k="default",name:x=i,styles:S,classNames:E,...C}=e,{getPrefixCls:w,direction:M,className:N,style:I,classNames:H,styles:z}=(0,b.useComponentConfig)("segmented"),T={...e,options:c,size:d,shape:k},[D,A]=(0,g.useMergeSemantic)([H,E],[z,S],{props:T}),B=w("segmented",n),[W,j]=R(B),L=(0,y.default)(d),P=t.useMemo(()=>c.map(e=>{if("object"==typeof e&&e?.icon){let{icon:r,label:i,...n}=e;return{...n,label:t.createElement(t.Fragment,null,t.createElement("span",{className:(0,l.clsx)(`${B}-item-icon`,D.icon),style:A.icon},r),i&&t.createElement("span",null,i))}}return e}),[c,B,D.icon,A.icon]),[,F]=(0,h.useOrientation)(v,m),X=(0,l.clsx)(o,a,N,D.root,{[`${B}-block`]:s,[`${B}-sm`]:"small"===L,[`${B}-lg`]:"large"===L,[`${B}-vertical`]:F,[`${B}-shape-${k}`]:"round"===k},W,j),O={...A.root,...I,...u};return t.createElement(p,{...C,name:x,className:X,style:O,classNames:D,styles:A,itemRender:(e,{item:r})=>{if(!r.tooltip)return e;let i="object"==typeof r.tooltip?r.tooltip:{title:r.tooltip};return t.createElement($.default,{...i},e)},options:P,ref:r,prefixCls:B,direction:M,vertical:F})});e.s(["default",0,M],685986),e.s(["Segmented",0,M],204275)},229068,e=>{"use strict";var t=e.i(461550);e.s(["Progress",()=>t.default])},461550,e=>{"use strict";e.i(495059);var t=e.i(191788);e.i(644038);var r=e.i(839904),i=e.i(202917),n=e.i(146025),o=e.i(876352),l=e.i(449995);e.i(957562);var a=e.i(191248),s=e.i(56206),c=e.i(430898),d=e.i(993175);let u={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,railColor:"#D9D9D9",railWidth:1,gapPosition:"bottom",loading:!1};var m=e.i(572353);let p=({bg:e,children:r})=>t.createElement("div",{style:{width:"100%",height:"100%",background:e}},r);function f(e,t){return Object.keys(e).map(r=>{let i=parseFloat(r),n=`${Math.floor(i*t)}%`;return`${e[r]} ${n}`})}let g=t.forwardRef((e,r)=>{let{prefixCls:i,color:n,gradientId:o,radius:l,className:a,style:c,ptg:d,strokeLinecap:u,strokeWidth:m,size:g,gapDegree:h}=e,b=n&&"object"==typeof n,y=g/2,$=t.createElement("circle",{className:(0,s.clsx)(`${i}-circle-path`,a),r:l,cx:y,cy:y,stroke:b?"#FFF":void 0,strokeLinecap:u,strokeWidth:m,opacity:+(0!==d),style:c,ref:r});if(!b)return $;let v=`${o}-conic`,k=h?`${180+h/2}deg`:"0deg",x=f(n,(360-h)/360),S=f(n,1),E=`conic-gradient(from ${k}, ${x.join(", ")})`,C=`linear-gradient(to ${h?"bottom":"top"}, ${S.join(", ")})`;return t.createElement(t.Fragment,null,t.createElement("mask",{id:v},$),t.createElement("foreignObject",{x:0,y:0,width:g,height:g,mask:`url(#${v})`},t.createElement(p,{bg:C},t.createElement(p,{bg:E}))))}),h=(e,t,r,i,n,o,l,a,s,c,d=0)=>{let u=(100-i)/100*t;return"round"===s&&100!==i&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof a?a:void 0,strokeDasharray:`${t}px ${e}`,strokeDashoffset:u+d,transform:`rotate(${n+r/100*360*((360-o)/360)+(0===o?0:({bottom:0,top:180,left:90,right:-90})[l])}deg)`,transformOrigin:"50px 50px",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}};function b(){return(b=Object.assign.bind()).apply(this,arguments)}function y(e){let t=e??[];return Array.isArray(t)?t:[t]}var $=e=>{let r,i,n,o,l,a,{id:c,prefixCls:d,classNames:p={},styles:f={},steps:$,strokeWidth:v,railWidth:k,gapDegree:x=0,gapPosition:S,railColor:E,strokeLinecap:C,style:w,className:R,strokeColor:M,percent:N,loading:I,...H}={...u,...e},z=(0,m.default)(c),T=`${z}-gradient`,D=50-v/2,A=2*Math.PI*D,B=x>0?90+x/2:-90,W=(360-x)/360*A,{count:j,gap:L}="object"==typeof $?$:{count:$,gap:2},P=y(N),F=y(M),X=F.find(e=>e&&"object"==typeof e),O=X&&"object"==typeof X?"butt":C,{indeterminateStyleProps:q,indeterminateStyleAnimation:K}=(({id:e,loading:r})=>{if(!r)return{indeterminateStyleProps:{},indeterminateStyleAnimation:null};let i=`${e}-indeterminate-animate`;return{indeterminateStyleProps:{transform:"rotate(0deg)",animation:`${i} 1s linear infinite`},indeterminateStyleAnimation:t.default.createElement("style",null,`@keyframes ${i} {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}`)}})({id:z,loading:I}),_=h(A,W,0,100,B,x,S,E,O,v),U=(r=(0,t.useRef)([]),i=(0,t.useRef)(null),(0,t.useEffect)(()=>{let e=Date.now(),t=!1;r.current.forEach(r=>{if(!r)return;t=!0;let n=r.style;n.transitionDuration=".3s, .3s, .3s, .06s",i.current&&e-i.current<100&&(n.transitionDuration="0s, 0s")}),t&&(i.current=Date.now())}),r.current);return t.createElement("svg",b({className:(0,s.clsx)(`${d}-circle`,p.root,R),viewBox:"0 0 100 100",style:{...f.root,...w},id:c,role:"presentation"},H),!j&&t.createElement("circle",{className:(0,s.clsx)(`${d}-circle-rail`,p.rail),r:D,cx:50,cy:50,stroke:E,strokeLinecap:O,strokeWidth:k||v,style:{..._,...f.rail}}),j?(n=Math.round(j*(P[0]/100)),o=100/j,l=0,Array(j).fill(null).map((e,r)=>{let i=r<=n-1?F[0]:E,a=i&&"object"==typeof i?`url(#${T})`:void 0,c=h(A,W,l,o,B,x,S,i,"butt",v,L);return l+=(W-c.strokeDashoffset+L)*100/W,t.createElement("circle",{key:r,className:(0,s.clsx)(`${d}-circle-path`,p.track),r:D,cx:50,cy:50,stroke:a,strokeWidth:v,opacity:1,style:{...c,...f.track},ref:e=>{U[r]=e}})})):(a=0,P.map((e,r)=>{let i=F[r]||F[F.length-1],n=h(A,W,a,e,B,x,S,i,O,v);return a+=e,t.createElement(g,{key:r,color:i,ptg:e,radius:D,prefixCls:d,gradientId:T,className:p.track,style:{...n,...q,...f.track},strokeLinecap:O,strokeWidth:v,gapDegree:x,ref:e=>{U[r]=e},size:100})}).reverse()),K)},v=e.i(188304);e.i(797652);var k=e.i(435187);function x(e){return!e||e<0?0:e>100?100:e}function S({success:e}){let t;return e&&"percent"in e&&(t=e.percent),t}let E=(e,t,r)=>{let i=-1,n=-1;if("step"===t){let t=r.steps,o=r.strokeWidth;"string"==typeof e||void 0===e?(i="small"===e?2:14,n=o??8):"number"==typeof e?[i,n]=[e,e]:[i=14,n=8]=Array.isArray(e)?e:[e.width,e.height],i*=t}else if("line"===t){let t=r?.strokeWidth;"string"==typeof e||void 0===e?n=t||("small"===e?6:8):"number"==typeof e?[i,n]=[e,e]:[i=-1,n=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[i,n]="small"===e?[60,60]:[120,120]:"number"==typeof e?[i,n]=[e,e]:Array.isArray(e)&&(i=e[0]??e[1]??120,n=e[0]??e[1]??120));return[i,n]},C=["root","body","indicator"];var w=e=>{let{prefixCls:r,classNames:i,styles:n,railColor:o,trailColor:l,strokeLinecap:c="round",gapPosition:u,gapPlacement:m,gapDegree:p,width:f=120,type:g,children:h,success:b,size:y=f,steps:w}=e,{direction:R}=(0,d.useComponentConfig)("progress"),[M,N]=E(y,"circle"),{strokeWidth:I}=e;void 0===I&&(I=Math.max(3/M*100,6));let H=t.useMemo(()=>p||0===p?p:"dashboard"===g?75:void 0,[p,g]),z=(({percent:e,success:t})=>{let r=x(S({success:t}));return[r,x(x(e)-r)]})(e),T=t.useMemo(()=>{let e=(m??u)||"dashboard"===g&&"bottom"||void 0,t="rtl"===R;switch(e){case"start":return t?"right":"left";case"end":return t?"left":"right";default:return e}},[R,m,u,g]),D="[object Object]"===Object.prototype.toString.call(e.strokeColor),A=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||k.presetPrimaryColors.green,t||null]})({success:b,strokeColor:e.strokeColor}),B=(0,s.clsx)(`${r}-body`,{[`${r}-circle-gradient`]:D},i.body),W=t.createElement($,{steps:w,percent:w?z[1]:z,strokeWidth:I,railWidth:I,strokeColor:w?A[1]:A,strokeLinecap:c,railColor:o??l,prefixCls:r,gapDegree:H,gapPosition:T,classNames:(0,a.omit)(i,C),styles:(0,a.omit)(n,C)}),j=M<=20,L=t.createElement("div",{className:B,style:{width:M,height:N,fontSize:.15*M+6,...n.body}},W,!j&&h);return j?t.createElement(v.default,{title:h},L):L};e.i(290586);var R=e.i(456161),M=e.i(307441),N=e.i(352050),I=e.i(104616);let H="--progress-line-stroke-color";var z=(0,N.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,I.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{...(0,M.resetComponent)(e),display:"inline-flex","&-rtl":{direction:"rtl"},[`${t}-indicator`]:{color:e.colorText,lineHeight:1,whiteSpace:"nowrap",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize}},[`&${t}-status-exception`]:{[`${t}-indicator`]:{color:e.colorError}},[`&${t}-status-success`]:{[`${t}-indicator`]:{color:e.colorSuccess}}}}})(r),(e=>{var t;let r,{componentCls:i}=e;return{[`${i}-line`]:{position:"relative",width:"100%",fontSize:e.fontSize,[`${i}-body`]:{display:"inline-flex",alignItems:"center",width:"100%",gap:e.marginXS},[`${i}-rail`]:{flex:"auto",background:e.remainingColor,borderRadius:e.lineBorderRadius,position:"relative",width:"100%",overflow:"hidden"},[`&${i}-status-active`]:{[`${i}-track:after`]:{content:'""',position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:"inherit",opacity:0,animationName:(r=t?"100%":"-100%",new R.Keyframes(`antProgress${t?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${r}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${r}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite"}},[`${i}-track`]:{position:"absolute",insetInlineStart:0,insetBlock:0,borderRadius:"inherit",background:e.defaultColor,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,minWidth:"max-content",display:"flex",alignItems:"center","&-success":{background:e.colorSuccess}},[`&${i}-status-exception`]:{[`${i}-track`]:{background:e.colorError}},[`&${i}-status-success`]:{[`${i}-track`]:{background:e.colorSuccess}},[`${i}-indicator-outer`]:{[`&${i}-indicator-start`]:{order:-1}},[`${i}-body-layout-bottom`]:{flexDirection:"column",alignItems:"center",gap:e.marginXXS},[`${i}-indicator${i}-indicator-inner`]:{color:e.colorWhite,paddingInline:e.paddingXXS,width:"100%",display:"flex",justifyContent:"center",[`&${i}-indicator-end`]:{justifyContent:"end"},[`&${i}-indicator-start`]:{justifyContent:"start"},[`&${i}-indicator-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[`${t}-circle`]:{[`${t}-circle-rail`]:{stroke:e.remainingColor},[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-body`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`${t}-indicator`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`&${t}-status-exception`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}}},[`&${t}-status-success`]:{[`${t}-body:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-body":{display:"flex",flexDirection:"row",alignItems:"center",gap:e.progressStepMarginInlineEnd,[`${t}-indicator`]:{marginInlineStart:e.marginXS}},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-indicator ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`})),T=e=>{let{prefixCls:r,classNames:i,styles:n,direction:o,percent:l,size:a,strokeWidth:c,strokeColor:d,strokeLinecap:u="round",children:m,railColor:p,trailColor:f,percentPosition:g,success:h}=e,{align:b,type:y}=g,$="square"===u||"butt"===u?0:void 0,[v,C]=E(a??[-1,c||("small"===a?6:8)],"line",{strokeWidth:c}),w=`${r}-track`,R=d&&"string"!=typeof d?((e,t)=>{let{from:r=k.presetPrimaryColors.blue,to:i=k.presetPrimaryColors.blue,direction:n="rtl"===t?"to left":"to right",...o}=e;if(0!==Object.keys(o).length){let e,t=(e=[],Object.keys(o).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:o[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${n}, ${t})`;return{background:r,[H]:r}}let l=`linear-gradient(${n}, ${r}, ${i})`;return{background:l,[H]:l}})(d,o):{[H]:d,background:d},M={width:`${x(l)}%`,height:C,borderRadius:$,...R},N=S(e),I={width:`${x(N)}%`,height:C,borderRadius:$,backgroundColor:h?.strokeColor};return t.createElement("div",{className:(0,s.clsx)(`${r}-body`,i.body,{[`${r}-body-layout-bottom`]:"center"===b&&"outer"===y}),style:{width:v>0?v:"100%",...n.body}},t.createElement("div",{className:(0,s.clsx)(`${r}-rail`,i.rail),style:{backgroundColor:(p??f)||void 0,borderRadius:$,height:C,...n.rail}},t.createElement("div",{className:(0,s.clsx)(w,i.track),style:{...M,...n.track}},"inner"===y&&m),void 0!==N&&t.createElement("div",{className:(0,s.clsx)(w,`${w}-success`,i.track),style:{...I,...n.track}})),"outer"===y&&m)},D=e=>{let{classNames:r,styles:i,size:n,steps:o,rounding:l=Math.round,percent:a=0,strokeWidth:c=8,strokeColor:d,railColor:u,trailColor:m,prefixCls:p,children:f}=e,g=l(a/100*o),[h,b]=E(n??["small"===n?2:14,c],"step",{steps:o,strokeWidth:c}),y=h/o,$=Array.from({length:o}),v=u??m;for(let e=0;e<o;e++){let n=Array.isArray(d)?d[e]:d;$[e]=t.createElement("div",{key:e,className:(0,s.clsx)(`${p}-steps-item`,{[`${p}-steps-item-active`]:e<=g-1},r.track),style:{backgroundColor:e<=g-1?n:v,width:y,height:b,...i.track}})}return t.createElement("div",{className:(0,s.clsx)(`${p}-steps-body`,r.body),style:i.body},$,f)};let A=["normal","exception","active","success"],B=t.forwardRef((e,u)=>{let m,{prefixCls:p,className:f,rootClassName:g,classNames:h,styles:b,steps:y,strokeColor:$,percent:v=0,size:k="medium",showInfo:C=!0,type:R="line",status:M,format:N,style:I,percentPosition:H={},...B}=e,{align:W="end",type:j="outer"}=H,L=Array.isArray($)?$[0]:$,P="string"==typeof $||Array.isArray($)?$:void 0,F=t.useMemo(()=>{if(L){let e="string"==typeof L?L:Object.values(L)[0];return new r.FastColor(e).isLight()}return!1},[$]),X=t.useMemo(()=>{let t=S(e);return Number.parseInt(void 0!==t?(t??0)?.toString():(v??0)?.toString(),10)},[v,e.success]),O=t.useMemo(()=>!A.includes(M)&&X>=100?"success":M||"normal",[M,X]),{getPrefixCls:q,direction:K,className:_,style:U,classNames:V,styles:G}=(0,d.useComponentConfig)("progress"),Y=q("progress",p),[Q,Z]=z(Y),J={...e,percent:v,type:R,size:k,showInfo:C,percentPosition:H},[ee,et]=(0,c.useMergeSemantic)([V,h],[G,b],{props:J}),er="line"===R,ei=er&&!y,en=t.useMemo(()=>{let r;if(!C)return null;let a=S(e),c=N||(e=>`${e}%`),d=er&&F&&"inner"===j;return"inner"===j||N||"exception"!==O&&"success"!==O?r=c(x(v),x(a)):"exception"===O?r=er?t.createElement(o.default,null):t.createElement(l.default,null):"success"===O&&(r=er?t.createElement(i.default,null):t.createElement(n.default,null)),t.createElement("span",{className:(0,s.clsx)(`${Y}-indicator`,{[`${Y}-indicator-bright`]:d,[`${Y}-indicator-${W}`]:ei,[`${Y}-indicator-${j}`]:ei},ee.indicator),style:et.indicator,title:"string"==typeof r?r:void 0},r)},[C,v,X,O,R,Y,N,er,F,j,W,ei,ee.indicator,et.indicator]),eo={...e,classNames:ee,styles:et};"line"===R?m=y?t.createElement(D,{...eo,strokeColor:P,prefixCls:Y,steps:"object"==typeof y?y.count:y},en):t.createElement(T,{...eo,strokeColor:L,prefixCls:Y,direction:K,percentPosition:{align:W,type:j}},en):("circle"===R||"dashboard"===R)&&(m=t.createElement(w,{...eo,strokeColor:L,prefixCls:Y,progressStatus:O},en));let el=(0,s.clsx)(Y,`${Y}-status-${O}`,{[`${Y}-${"dashboard"===R&&"circle"||R}`]:"line"!==R,[`${Y}-inline-circle`]:"circle"===R&&E(k,"circle")[0]<=20,[`${Y}-line`]:ei,[`${Y}-line-align-${W}`]:ei,[`${Y}-line-position-${j}`]:ei,[`${Y}-steps`]:y,[`${Y}-show-info`]:C,[`${Y}-small`]:"small"===k,[`${Y}-rtl`]:"rtl"===K},_,f,g,ee.root,Q,Z);return t.createElement("div",{ref:u,style:{...U,...et.root,...I},className:el,role:"progressbar","aria-valuenow":X,"aria-valuemin":0,"aria-valuemax":100,...(0,a.omit)(B,["railColor","trailColor","strokeWidth","width","gapDegree","gapPosition","gapPlacement","strokeLinecap","success"])},m)});e.s(["default",0,B],461550)},560370,e=>{"use strict";e.i(495059);var t=e.i(191788),r=e.i(633829),i=e.i(100264),n=e.i(259165);e.i(957562);var o=e.i(191248),l=e.i(531983),a=e.i(617796),s=e.i(351212),c=e.i(851581),d=e.i(56206),u=e.i(708176),m=e.i(664557),p=e.i(993175),f=e.i(583082),g=e.i(188304),h={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"},b=e.i(117716);function y(){return(y=Object.assign.bind()).apply(this,arguments)}let $=t.forwardRef((e,r)=>t.createElement(b.default,y({},e,{ref:r,icon:h})));var v=e.i(536343),k=e.i(663032),x=e.i(97679),S=e.i(307441),E=e.i(352050);e.i(797652);var C=e.i(435187),w=(0,E.genStyleHooks)("Typography",e=>{let t,{componentCls:r,titleMarginTop:i}=e;return{[r]:{color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${r}-secondary, &${r}-link${r}-secondary`]:{color:e.colorTextDescription},[`&${r}-success, &${r}-link${r}-success`]:{color:e.colorSuccessText},[`&${r}-warning, &${r}-link${r}-warning`]:{color:e.colorWarningText},[`&${r}-danger, &${r}-link${r}-danger`]:{color:e.colorErrorText,[`&${r}-link:active, &${r}-link:focus`]:{color:e.colorErrorTextActive},[`&${r}-link:hover`]:{color:e.colorErrorTextHover}},[`&${r}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},[`
|
|
div&,
|
|
p
|
|
`]:{marginBottom:"1em"},...(t={},[1,2,3,4,5].forEach(r=>{t[`
|
|
h${r}&,
|
|
div&-h${r},
|
|
div&-h${r} > textarea,
|
|
h${r}
|
|
`]=((e,t,r,i)=>{let{titleMarginBottom:n,fontWeightStrong:o}=i;return{marginBottom:n,color:r,fontWeight:o,fontSize:e,lineHeight:t}})(e[`fontSizeHeading${r}`],e[`lineHeightHeading${r}`],e.colorTextHeading,e)}),t),[`
|
|
& + h1${r},
|
|
& + h2${r},
|
|
& + h3${r},
|
|
& + h4${r},
|
|
& + h5${r}
|
|
`]:{marginTop:i},[`
|
|
div,
|
|
ul,
|
|
li,
|
|
p,
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5`]:{[`
|
|
+ h1,
|
|
+ h2,
|
|
+ h3,
|
|
+ h4,
|
|
+ h5
|
|
`]:{marginTop:i}},...{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:C.gold[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}},...(e=>{let{componentCls:t}=e,r=`${t}-link`;return{[`&${r}`]:{...(0,S.operationUnit)(e),userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}}}})(e),[`${r}-actions`]:{display:"inline"},[`
|
|
${r}-expand,
|
|
${r}-collapse,
|
|
${r}-edit,
|
|
${r}-copy
|
|
`]:{...(0,S.operationUnit)(e),marginInlineStart:e.marginXXS},...(e=>{let{componentCls:t,paddingSM:r}=e;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"}}}})(e),...{[`${e.componentCls}-copy-success`]:{[`
|
|
&,
|
|
&:hover,
|
|
&:focus`]:{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}},...{[`
|
|
a&-ellipsis,
|
|
span&-ellipsis
|
|
`]:{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","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"}},"&-rtl":{direction:"rtl"}}}},()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"})),R=e=>{let{prefixCls:r,"aria-label":i,className:n,style:o,direction:l,maxLength:a,autoSize:s=!0,value:c,onSave:u,onCancel:m,onEnd:p,component:f,enterIcon:g=t.createElement($,null)}=e,h=t.useRef(null),b=t.useRef(!1),y=t.useRef(null),[S,E]=t.useState(c);t.useEffect(()=>{E(c)},[c]),t.useEffect(()=>{if(h.current?.resizableTextArea){let{textArea:e}=h.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let C=()=>{u(S.trim())},[R,M]=w(r),N=(0,d.clsx)(r,`${r}-edit-content`,{[`${r}-rtl`]:"rtl"===l,[`${r}-${f}`]:!!f},n,R,M);return t.createElement("div",{className:N,style:o},t.createElement(x.default,{ref:h,maxLength:a,value:S,onChange:({target:e})=>{E(e.value.replace(/[\n\r]/g,""))},onKeyDown:({keyCode:e})=>{b.current||(y.current=e)},onKeyUp:({keyCode:e,ctrlKey:t,altKey:r,metaKey:i,shiftKey:n})=>{y.current!==e||b.current||t||r||i||n||(e===v.default.ENTER?(C(),p?.()):e===v.default.ESC&&m())},onCompositionStart:()=>{b.current=!0},onCompositionEnd:()=>{b.current=!1},onBlur:()=>{C()},"aria-label":i,rows:1,autoSize:s}),null!==g?(0,k.cloneElement)(g,{className:`${r}-edit-content-confirm`}):null)},M=e.i(27593);let N=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 I(e,t){if("string"!=typeof e)return!1;let r=t?.format==="text/html";return!!(await N(e,r)||((e,t)=>{let r=!1,i=i=>{i.stopPropagation(),i.preventDefault(),i.clipboardData?.clearData(),i.clipboardData?.setData("text/plain",e),t&&i.clipboardData?.setData("text/html",e),r=!0};try{return document.addEventListener("copy",i,{capture:!0}),document.execCommand("copy"),r}catch{return!1}finally{document.removeEventListener("copy",i,{capture:!0})}})(e,r))}var H=e.i(154165);function z(e,r){return t.useMemo(()=>{let t=!!e;return[t,{...r,...t&&"object"==typeof e?e:null}]},[e])}let T=t.forwardRef((e,r)=>{let{prefixCls:i,component:n="article",className:o,rootClassName:l,children:a,direction:s,style:c,...u}=e,{getPrefixCls:m,direction:f,className:g,style:h}=(0,p.useComponentConfig)("typography"),b=m("typography",i),[y,$]=w(b),v=(0,d.clsx)(b,g,{[`${b}-rtl`]:"rtl"===(s??f)},o,l,y,$),k={...h,...c};return t.createElement(n,{className:v,style:k,ref:r,...u},a)});var D=e.i(146025),A=e.i(636207),B=e.i(677057);let W=e=>!1===e?[!1,!1]:(0,H.default)(e);function j(e,t,r){return!0===e||void 0===e?t:e||r&&t}let L=e=>["string","number"].includes(typeof e);var P=e=>{let{prefixCls:r,copied:i,locale:n,iconOnly:o,tooltips:l,icon:a,tabIndex:s,onCopy:c,loading:u}=e,m=W(l),p=W(a),{copied:f,copy:h}=n??{},b=i?f:h,y=j(m[+!!i],b),$="string"==typeof y?y:b;return t.createElement(g.default,{title:y},t.createElement("button",{type:"button",className:(0,d.clsx)(`${r}-copy`,{[`${r}-copy-success`]:i,[`${r}-copy-icon-only`]:o}),onClick:c,"aria-label":$,tabIndex:s},i?j(p[1],t.createElement(D.default,null),!0):j(p[0],u?t.createElement(B.default,null):t.createElement(A.default,null),!0)))};let F=t.forwardRef(({style:e,children:r},i)=>{let n=t.useRef(null);return t.useImperativeHandle(i,()=>({isExceed:()=>{let e=n.current;return e.scrollHeight>e.clientHeight},getHeight:()=>n.current.clientHeight})),t.createElement("span",{"aria-hidden":!0,ref:n,style:{position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)",...e}},r)});function X(e,t){let r=0,i=[];for(let n=0;n<e.length;n+=1){if(r===t)return i;let o=e[n],l=r+(L(o)?String(o).length:1);if(l>t){let e=t-r;return i.push(String(o).slice(0,e)),i}i.push(o),r=l}return e}let O={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function q(e){let{enableMeasure:i,width:n,text:o,children:a,rows:c,expanded:d,miscDeps:u,onEllipsis:m}=e,p=t.useMemo(()=>(0,l.toArray)(o),[o]),f=t.useMemo(()=>p.reduce((e,t)=>e+(L(t)?String(t).length:1),0),[o]),g=t.useMemo(()=>a(p,!1),[o]),[h,b]=t.useState(null),y=t.useRef(null),$=t.useRef(null),v=t.useRef(null),k=t.useRef(null),x=t.useRef(null),[S,E]=t.useState(!1),[C,w]=t.useState(0),[R,M]=t.useState(0),[N,I]=t.useState(null);(0,s.default)(()=>{i&&n&&f?w(1):w(0)},[n,o,c,i,p]),(0,s.default)(()=>{if(1===C)w(2),I($.current&&getComputedStyle($.current).whiteSpace);else if(2===C){let e=!!v.current?.isExceed();w(e?3:4),b(e?[0,f]:null),E(e),M(Math.max(v.current?.getHeight()||0,(1===c?0:k.current?.getHeight()||0)+(x.current?.getHeight()||0))+1),m(e)}},[C]);let H=h?Math.ceil((h[0]+h[1])/2):0;(0,s.default)(()=>{let[e,t]=h||[0,0];if(e!==t){let r=(y.current?.getHeight()||0)>R,i=H;t-e==1&&(i=r?e:t),b(r?[e,i]:[i,t])}},[h,H]);let z=t.useMemo(()=>{if(!i)return a(p,!1);if(3!==C||!h||h[0]!==h[1]){let e=a(p,!1);return[4,0].includes(C)?e:t.createElement("span",{style:{...O,WebkitLineClamp:c}},e)}return a(d?p:X(p,h[0]),S)},[d,C,h,p].concat((0,r.default)(u))),T={width:n,margin:0,padding:0,whiteSpace:"nowrap"===N?"normal":"inherit"};return t.createElement(t.Fragment,null,z,2===C&&t.createElement(t.Fragment,null,t.createElement(F,{style:{...T,...O,WebkitLineClamp:c},ref:v},g),t.createElement(F,{style:{...T,...O,WebkitLineClamp:c-1},ref:k},g),t.createElement(F,{style:{...T,...O,WebkitLineClamp:1},ref:x},a([],!0))),3===C&&h&&h[0]!==h[1]&&t.createElement(F,{style:{...T,top:400},ref:y},a(X(p,H),!0)),1===C&&t.createElement("span",{style:{whiteSpace:"inherit"},ref:$}))}var K=({enableEllipsis:e,isEllipsis:r,open:i,children:n,tooltipProps:o})=>o?.title&&e?t.createElement(g.default,{open:i&&r,...o},n):n;let _=["delete","mark","code","underline","strong","keyboard","italic"],U=t.forwardRef((e,h)=>{let b,y,$,{prefixCls:v,className:k,style:x,type:S,disabled:E,children:C,ellipsis:w,editable:N,copyable:D,component:A,title:B,onMouseEnter:W,onMouseLeave:j,...F}=e,{getPrefixCls:X,direction:O}=t.useContext(p.ConfigContext),[U]=(0,f.default)("Text"),V=t.useRef(null),G=t.useRef(null),Y=X("typography",v),Q=(0,o.omit)(F,_),[Z,J]=z(N),[ee,et]=(0,a.useControlledState)(!1,J.editing),{triggerType:er=["icon"]}=J,ei=e=>{e&&J.onStart?.(),et(e)},en=(b=(0,t.useRef)(void 0),(0,t.useEffect)(()=>{b.current=ee}),b.current);(0,s.default)(()=>{!ee&&en&&G.current?.focus()},[ee]);let eo=e=>{e?.preventDefault(),ei(!0)},[el,ea]=z(D),{copied:es,copyLoading:ec,onClick:ed}=(({copyConfig:e,children:r})=>{let[i,n]=t.useState(!1),[o,l]=t.useState(!1),a=t.useRef(null),s=()=>{a.current&&clearTimeout(a.current)},c={};return e.format&&(c.format=e.format),t.useEffect(()=>s,[]),{copied:i,copyLoading:o,onClick:(0,M.useEvent)(async t=>{t?.preventDefault(),t?.stopPropagation(),l(!0);try{let i="function"==typeof e.text?await e.text():e.text;await I(i||(0,H.default)(r,{skipEmpty:!0}).join("")||"",c),l(!1),n(!0),s(),a.current=setTimeout(()=>{n(!1)},3e3),e.onCopy?.(t)}catch(e){throw l(!1),e}})}})({copyConfig:ea,children:C}),[eu,em]=t.useState(!1),[ep,ef]=t.useState(!1),[eg,eh]=t.useState(!1),[eb,ey]=t.useState(!1),[e$,ev]=t.useState(!0),[ek,ex]=z(w,{expandable:!1,symbol:e=>e?U?.collapse:U?.expand}),[eS,eE]=(0,a.useControlledState)(ex.defaultExpanded||!1,ex.expanded),eC=ek&&(!eS||"collapsible"===ex.expandable),{rows:ew=1}=ex,eR=t.useMemo(()=>eC&&(void 0!==ex.suffix||ex.onEllipsis||ex.expandable||Z||el),[eC,ex,Z,el]);(0,s.default)(()=>{ek&&!eR&&(em((0,m.isStyleSupport)("webkitLineClamp")),ef((0,m.isStyleSupport)("textOverflow")))},[eR,ek]);let[eM,eN]=t.useState(eC),eI=t.useMemo(()=>!eR&&(1===ew?ep:eu),[eR,ep,eu]);(0,s.default)(()=>{eN(eI&&eC)},[eI,eC]);let eH=eC&&(eM?eb:eg),ez=eC&&1===ew&&eM,eT=eC&&ew>1&&eM,[eD,eA]=t.useState(0),[eB,eW]=t.useState(!1),[ej,eL]=t.useState(!1),eP=e=>{eh(e),eg!==e&&ex.onEllipsis?.(e)};t.useEffect(()=>{let e=V.current;if(ek&&eM&&e){let t,r,i,n=(t=document.createElement("em"),e.appendChild(t),r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),e.removeChild(t),r.left>i.left||i.right>r.right||r.top>i.top||i.bottom>r.bottom);eb!==n&&ey(n)}},[ek,eM,C,eT,e$,eD]),t.useEffect(()=>{let e=V.current;if("u"<typeof IntersectionObserver||!e||!eM||!eC)return;let t=new IntersectionObserver(()=>{ev(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[eM,eC]);let eF=(y=ex.tooltip,$=J.text,(0,t.useMemo)(()=>!0===y?{title:$??C}:(0,t.isValidElement)(y)?{title:y}:"object"==typeof y?{title:$??C,...y}:{title:y},[y,$,C])),eX=t.useMemo(()=>{if(ek&&!eM)return[J.text,C,B,eF.title].find(L)},[ek,eM,B,eF.title,eH]);return ee?t.createElement(R,{value:J.text??("string"==typeof C?C:""),onSave:e=>{J.onChange?.(e),ei(!1)},onCancel:()=>{J.onCancel?.(),ei(!1)},onEnd:J.onEnd,prefixCls:Y,className:k,style:x,direction:O,component:A,maxLength:J.maxLength,autoSize:J.autoSize,enterIcon:J.enterIcon}):t.createElement(n.default,{onResize:({offsetWidth:e})=>{eA(e)},disabled:!eC},n=>t.createElement(K,{tooltipProps:eF,enableEllipsis:eC,isEllipsis:eH,open:ej&&!eB},t.createElement(T,{onMouseEnter:e=>{eL(!0),W?.(e)},onMouseLeave:e=>{eL(!1),j?.(e)},className:(0,d.clsx)({[`${Y}-${S}`]:S,[`${Y}-disabled`]:E,[`${Y}-ellipsis`]:ek,[`${Y}-ellipsis-single-line`]:ez,[`${Y}-ellipsis-multiple-line`]:eT,[`${Y}-link`]:"a"===A},k),prefixCls:v,style:{...x,WebkitLineClamp:eT?ew:void 0},component:A,ref:(0,c.composeRef)(n,V,h),direction:O,onClick:er.includes("text")?eo:void 0,"aria-label":eX?.toString(),title:B,...Q},t.createElement(q,{enableMeasure:eC&&!eM,text:C,rows:ew,width:eD,onEllipsis:eP,expanded:eS,miscDeps:[es,eS,ec,Z,el,U].concat((0,r.default)(_.map(t=>e[t])))},(r,n)=>{var o;let a,s,c;return function({mark:e,code:r,underline:i,delete:n,strong:o,keyboard:l,italic:a},s){let c=s;function d(e,r){r&&(c=t.createElement(e,{},c))}return d("strong",o),d("u",i),d("del",n),d("code",r),d("mark",e),d("kbd",l),d("i",a),c}(e,t.createElement(t.Fragment,null,r.length>0&&n&&!eS&&eX?t.createElement("span",{key:"show-content","aria-hidden":!0},r):r,[(o=n)&&!eS&&t.createElement("span",{"aria-hidden":!0,key:"ellipsis"},"..."),ex.suffix,(a=o&&(()=>{let{expandable:e,symbol:r}=ex;return e?t.createElement("button",{type:"button",key:"expand",className:`${Y}-${eS?"collapse":"expand"}`,onClick:e=>{var t;eE((t={expanded:!eS}).expanded),ex.onExpand?.(e,t)},"aria-label":eS?U.collapse:U?.expand},"function"==typeof r?r(eS):r):null})(),s=(()=>{if(!Z)return;let{icon:e,tooltip:r,tabIndex:n}=J,o=(0,l.toArray)(r)[0]||U?.edit,a="string"==typeof o?o:"";return er.includes("icon")?t.createElement(g.default,{key:"edit",title:!1===r?"":o},t.createElement("button",{type:"button",ref:G,className:`${Y}-edit`,onClick:eo,"aria-label":a,tabIndex:n},e||t.createElement(i.default,{role:"button"}))):null})(),c=el?t.createElement(P,{key:"copy",...ea,prefixCls:Y,copied:es,locale:U,onCopy:ed,loading:ec,iconOnly:!(0,u.default)(C)}):null,a||s||c?t.createElement("span",{key:"operations",className:`${Y}-actions`,onMouseEnter:()=>eW(!0),onMouseLeave:()=>eW(!1)},a,s,c):null)]))}))))}),V=t.forwardRef((e,r)=>{let{ellipsis:i,rel:n,children:o,navigate:l,...a}=e,s={...a,rel:void 0===n&&"_blank"===a.target?"noopener noreferrer":n};return t.createElement(U,{...s,ref:r,ellipsis:!!i,component:"a"},o)}),G=t.forwardRef((e,r)=>{let{children:i,...n}=e;return t.createElement(U,{ref:r,...n,component:"div"},i)}),Y=t.forwardRef((e,r)=>{let{ellipsis:i,children:n,...l}=e,a=t.useMemo(()=>i&&"object"==typeof i?(0,o.omit)(i,["expandable","rows"]):i,[i]);return t.createElement(U,{ref:r,...l,ellipsis:a,component:"span"},n)}),Q=[1,2,3,4,5],Z=t.forwardRef((e,r)=>{let{level:i=1,children:n,...o}=e,l=Q.includes(i)?`h${i}`:"h1";return t.createElement(U,{ref:r,...o,component:l},n)});T.Text=Y,T.Link=V,T.Title=Z,T.Paragraph=G,e.s(["Typography",0,T],560370)}]);
|