1234 |
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7529],{7529:function(Na,We,y){y.d(We,{Rs:function(){return ja}});var n=y(4942),f=y(1413),ge=y(45987),Ze=y(89451),Ye=y(56886),Ue=Ye.Z,he=y(21532),Fe=y(93967),p=y.n(Fe),x=y(67294),Pe=y(74902),oe=y(97685),ke=y(67159),je=y(2487),Je=y(84164),Qe=y(58448),qe=y(33275);function _e(a,e){for(var t=a,l=0;l<e.length;l+=1){if(t==null)return;t=t[e[l]]}return t}var ze=y(90814),Me=y(21770),ea=y(7134),aa=y(80171),Ne=y(48054),Be=y(64847),na=y(98423),Ke=y(11568),De=function(e){return{backgroundColor:e.colorPrimaryBg,borderColor:e.colorPrimary}},Le=function(e){return(0,n.Z)({backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"},e.componentCls,{"&-description":{color:e.colorTextDisabled},"&-title":{color:e.colorTextDisabled},"&-avatar":{opacity:"0.25"}})},Ba=new Ke.E4("card-loading",{"0%":{backgroundPosition:"0 50%"},"50%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),ta=function(e){var t;return(0,n.Z)({},e.componentCls,(t={position:"relative",display:"inline-block",width:"320px",marginInlineEnd:"16px",marginBlockEnd:"16px",color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,verticalAlign:"top",backgroundColor:e.colorBgContainer,borderRadius:e.borderRadius,overflow:"auto",cursor:"pointer",transition:"all 0.3s","&:after":{position:"absolute",insetBlockStart:2,insetInlineEnd:2,width:0,height:0,opacity:0,transition:"all 0.3s "+e.motionEaseInOut,borderBlockEnd:"".concat(e.borderRadius+4,"px solid transparent"),borderInlineStart:"".concat(e.borderRadius+4,"px solid transparent"),borderStartEndRadius:"".concat(e.borderRadius,"px"),content:"''"},"&:last-child":{marginInlineEnd:0},"& + &":{marginInlineStart:"0 !important"},"&-bordered":{border:"".concat(e.lineWidth,"px solid ").concat(e.colorBorder)},"&-group":{display:"inline-block","&-sub-check-card":{display:"flex",flexDirection:"column",gap:"8px","&-title":{cursor:"pointer",paddingBlock:e.paddingXS,display:"flex",gap:4,alignItems:"center"},"&-panel":{visibility:"initial",transition:"all 0.3s",opacity:1,"&-collapse":{display:"none",visibility:"hidden",opacity:0}}}}},(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)(t,"".concat(e.componentCls,"-loading"),{overflow:"hidden",userSelect:"none","&-content":{padding:e.paddingMD}}),"&:focus",De(e)),"&-checked",(0,f.Z)((0,f.Z)({},De(e)),{},{"&:after":{opacity:1,border:"".concat(e.borderRadius+4,"px solid ").concat(e.colorPrimary),borderBlockEnd:"".concat(e.borderRadius+4,"px solid transparent"),borderInlineStart:"".concat(e.borderRadius+4,"px solid transparent"),borderStartEndRadius:"".concat(e.borderRadius,"px")}})),"&-disabled",Le(e)),"&[disabled]",Le(e)),"&-checked&-disabled",{"&:after":{position:"absolute",insetBlockStart:2,insetInlineEnd:2,width:0,height:0,border:"".concat(e.borderRadius+4,"px solid ").concat(e.colorTextDisabled),borderBlockEnd:"".concat(e.borderRadius+4,"px solid transparent"),borderInlineStart:"".concat(e.borderRadius+4,"px solid transparent"),borderStartEndRadius:"".concat(e.borderRadius,"px"),content:"''"}}),"&-lg",{width:440}),"&-sm",{width:212}),"&-cover",{paddingInline:e.paddingXXS,paddingBlock:e.paddingXXS,img:{width:"100%",height:"100%",overflow:"hidden",borderRadius:e.borderRadius}}),"&-content",{display:"flex",paddingInline:e.paddingSM,paddingBlock:e.padding}),(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)(t,"&-body",{paddingInline:e.paddingSM,paddingBlock:e.padding}),"&-avatar-header",{display:"flex",alignItems:"center"}),"&-avatar",{paddingInlineEnd:8}),"&-detail",{overflow:"hidden",width:"100%","> div:not(:last-child)":{marginBlockEnd:4}}),"&-header",{display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:e.lineHeight,"&-left":{display:"flex",alignItems:"center",gap:e.sizeSM,minWidth:0}}),"&-title",{overflow:"hidden",color:e.colorTextHeading,fontWeight:"500",fontSize:e.fontSize,whiteSpace:"nowrap",textOverflow:"ellipsis",display:"flex",alignItems:"center",justifyContent:"space-between","&-with-ellipsis":{display:"inline-block"}}),"&-description",{color:e.colorTextSecondary}),"&:not(".concat(e.componentCls,"-disabled)"),{"&:hover":{borderColor:e.colorPrimary}})))};function $e(a){return(0,Be.Xj)("CheckCard",function(e){var t=(0,f.Z)((0,f.Z)({},e),{},{componentCls:".".concat(a)});return[ta(t)]})}var r=y(85893),ra=["prefixCls","className","style","options","loading","multiple","bordered","onChange"],ia=function(e){var t=e.prefixCls,l=e.hashId;return(0,r.jsx)("div",{className:p()("".concat(t,"-loading-content"),l),children:(0,r.jsx)(Ne.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1})})},He=(0,x.createContext)(null),oa=function(e){var t=(0,x.useState)(!1),l=(0,oe.Z)(t,2),h=l[0],Z=l[1],i=Be.Ow.useToken(),o=i.hashId,R="".concat(e.prefix,"-sub-check-card");return(0,r.jsxs)("div",{className:p()(R,o),children:[(0,r.jsxs)("div",{className:p()("".concat(R,"-title"),o),onClick:function(){Z(!h)},children:[(0,r.jsx)(ze.Z,{style:{transform:"rotate(".concat(h?90:0,"deg)"),transition:"transform 0.3s"}}),e.title]}),(0,r.jsx)("div",{className:p()("".concat(R,"-panel"),o,(0,n.Z)({},"".concat(R,"-panel-collapse"),h)),children:e.children})]})},la=function(e){var t=e.prefixCls,l=e.className,h=e.style,Z=e.options,i=Z===void 0?[]:Z,o=e.loading,R=o===void 0?!1:o,s=e.multiple,N=s===void 0?!1:s,A=e.bordered,H=A===void 0?!0:A,B=e.onChange,k=(0,ge.Z)(e,ra),L=(0,x.useContext)(he.ZP.ConfigContext),W=(0,x.useCallback)(function(){return i==null?void 0:i.map(function(S){return typeof S=="string"?{title:S,value:S}:S})},[i]),G=L.getPrefixCls("pro-checkcard",t),z=$e(G),D=z.wrapSSR,ae=z.hashId,P="".concat(G,"-group"),d=(0,na.Z)(k,["children","defaultValue","value","disabled","size"]),E=(0,Me.Z)(e.defaultValue,{value:e.value,onChange:e.onChange}),te=(0,oe.Z)(E,2),w=te[0],Y=te[1],V=(0,x.useRef)(new Map),X=function(T){var C;(C=V.current)===null||C===void 0||C.set(T,!0)},U=function(T){var C;(C=V.current)===null||C===void 0||C.delete(T)},O=function(T){if(!N){var C;C=w,C===T.value?C=void 0:C=T.value,Y==null||Y(C)}if(N){var I,c=[],b=w,g=b==null?void 0:b.includes(T.value);c=(0,Pe.Z)(b||[]),g||c.push(T.value),g&&(c=c.filter(function(j){return j!==T.value}));var u=W(),m=(I=c)===null||I===void 0||(I=I.filter(function(j){return V.current.has(j)}))===null||I===void 0?void 0:I.sort(function(j,M){var F=u.findIndex(function(se){return se.value===j}),ie=u.findIndex(function(se){return se.value===M});return F-ie});Y(m)}},J=(0,x.useMemo)(function(){if(R)return new Array(i.length||x.Children.toArray(e.children).length||1).fill(0).map(function(C,I){return(0,r.jsx)(Te,{loading:!0},I)});if(i&&i.length>0){var S=w,T=function C(I){return I.map(function(c){var b;if(c.children&&c.children.length>0){var g,u;return(0,r.jsx)(oa,{title:c.title,prefix:P,children:C(c.children)},((g=c.value)===null||g===void 0?void 0:g.toString())||((u=c.title)===null||u===void 0?void 0:u.toString()))}return(0,r.jsx)(Te,{disabled:c.disabled,size:(b=c.size)!==null&&b!==void 0?b:e.size,value:c.value,checked:N?S==null?void 0:S.includes(c.value):S===c.value,onChange:c.onChange,title:c.title,avatar:c.avatar,description:c.description,cover:c.cover},c.value.toString())})};return T(W())}return e.children},[W,R,N,i,e.children,e.size,w]),re=p()(P,l,ae);return D((0,r.jsx)(He.Provider,{value:{toggleOption:O,bordered:H,value:w,disabled:e.disabled,size:e.size,loading:e.loading,multiple:e.multiple,registerValue:X,cancelValue:U},children:(0,r.jsx)("div",(0,f.Z)((0,f.Z)({className:re,style:h},d),{},{children:J}))}))},ca=function(a){return(0,r.jsx)(Ze._Y,{needDeps:!0,children:(0,r.jsx)(la,(0,f.Z)({},a))})},da=["prefixCls","className","avatar","title","description","cover","extra","style"],Oe=function(e){var t=(0,Me.Z)(e.defaultChecked||!1,{value:e.checked,onChange:e.onChange}),l=(0,oe.Z)(t,2),h=l[0],Z=l[1],i=(0,x.useContext)(He),o=(0,x.useContext)(he.ZP.ConfigContext),R=o.getPrefixCls,s=function(m){var j,M;e==null||(j=e.onClick)===null||j===void 0||j.call(e,m);var F=!h;i==null||(M=i.toggleOption)===null||M===void 0||M.call(i,{value:e.value}),Z==null||Z(F)},N=function(m){return m==="large"?"lg":m==="small"?"sm":""};(0,x.useEffect)(function(){var u;return i==null||(u=i.registerValue)===null||u===void 0||u.call(i,e.value),function(){var m;return i==null||(m=i.cancelValue)===null||m===void 0?void 0:m.call(i,e.value)}},[e.value]);var A=e.prefixCls,H=e.className,B=e.avatar,k=e.title,L=e.description,W=e.cover,G=e.extra,z=e.style,D=z===void 0?{}:z,ae=(0,ge.Z)(e,da),P=(0,f.Z)({},ae),d=R("pro-checkcard",A),E=$e(d),te=E.wrapSSR,w=E.hashId,Y=function(m,j){return(0,r.jsx)("div",{className:p()("".concat(m,"-cover"),w),children:typeof j=="string"?(0,r.jsx)("img",{src:j,alt:"checkcard"}):j})};P.checked=h;var V=!1;if(i){var X;P.disabled=e.disabled||i.disabled,P.loading=e.loading||i.loading,P.bordered=e.bordered||i.bordered,V=i.multiple;var U=i.multiple?(X=i.value)===null||X===void 0?void 0:X.includes(e.value):i.value===e.value;P.checked=P.loading?!1:U,P.size=e.size||i.size}var O=P.disabled,J=O===void 0?!1:O,re=P.size,S=P.loading,T=P.bordered,C=T===void 0?!0:T,I=P.checked,c=N(re),b=p()(d,H,w,(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)({},"".concat(d,"-loading"),S),"".concat(d,"-").concat(c),c),"".concat(d,"-checked"),I),"".concat(d,"-multiple"),V),"".concat(d,"-disabled"),J),"".concat(d,"-bordered"),C),"".concat(d,"-ghost"),e.ghost)),g=(0,x.useMemo)(function(){if(S)return(0,r.jsx)(ia,{prefixCls:d||"",hashId:w});if(W)return Y(d||"",W);var u=B?(0,r.jsx)("div",{className:p()("".concat(d,"-avatar"),w),children:typeof B=="string"?(0,r.jsx)(ea.C,{size:48,shape:"square",src:B}):B}):null,m=(k!=null?k:G)!=null&&(0,r.jsxs)("div",{className:p()("".concat(d,"-header"),w),children:[(0,r.jsxs)("div",{className:p()("".concat(d,"-header-left"),w),children:[(0,r.jsx)("div",{className:p()("".concat(d,"-title"),w,(0,n.Z)({},"".concat(d,"-title-with-ellipsis"),typeof k=="string")),children:k}),e.subTitle?(0,r.jsx)("div",{className:p()("".concat(d,"-subTitle"),w),children:e.subTitle}):null]}),G&&(0,r.jsx)("div",{className:p()("".concat(d,"-extra"),w),children:G})]}),j=L?(0,r.jsx)("div",{className:p()("".concat(d,"-description"),w),children:L}):null,M=p()("".concat(d,"-content"),w,(0,n.Z)({},"".concat(d,"-avatar-header"),u&&m&&!j));return(0,r.jsxs)("div",{className:M,children:[u,m||j?(0,r.jsxs)("div",{className:p()("".concat(d,"-detail"),w),children:[m,j]}):null]})},[B,S,W,L,G,w,d,e.subTitle,k]);return te((0,r.jsxs)("div",{className:b,style:D,onClick:function(m){!S&&!J&&s(m)},onMouseEnter:e.onMouseEnter,children:[g,e.children?(0,r.jsx)("div",{className:p()("".concat(d,"-body"),w),style:e.bodyStyle,children:e.children}):null,e.actions?(0,r.jsx)(aa.Z,{actions:e.actions,prefixCls:d}):null]}))};Oe.Group=ca;var Te=Oe;function sa(a,e){return ma(a)||fa(a,e)||va(a,e)||ua()}function ua(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function va(a,e){if(a){if(typeof a=="string")return Ge(a,e);var t=Object.prototype.toString.call(a).slice(8,-1);if(t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set")return Array.from(a);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ge(a,e)}}function Ge(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,l=new Array(e);t<e;t++)l[t]=a[t];return l}function fa(a,e){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(a)))){var t=[],l=!0,h=!1,Z=void 0;try{for(var i=a[Symbol.iterator](),o;!(l=(o=i.next()).done)&&(t.push(o.value),!(e&&t.length===e));l=!0);}catch(R){h=!0,Z=R}finally{try{!l&&i.return!=null&&i.return()}finally{if(h)throw Z}}return t}}function ma(a){if(Array.isArray(a))return a}function xa(a,e){var t=e||{},l=t.defaultValue,h=t.value,Z=t.onChange,i=t.postState,o=x.useState(function(){return h!==void 0?h:l!==void 0?typeof l=="function"?l():l:typeof a=="function"?a():a}),R=sa(o,2),s=R[0],N=R[1],A=h!==void 0?h:s;i&&(A=i(A));function H(k){N(k),A!==k&&Z&&Z(k,A)}var B=x.useRef(!0);return x.useEffect(function(){if(B.current){B.current=!1;return}h===void 0&&N(h)},[h]),[A,H]}var ga=["title","subTitle","content","itemTitleRender","prefixCls","actions","item","recordKey","avatar","cardProps","description","isEditable","checkbox","index","selected","loading","expand","onExpand","expandable","rowSupportExpand","showActions","showExtra","type","style","className","record","onRow","onItem","itemHeaderRender","cardActionProps","extra"];function ha(a){var e=a.prefixCls,t=a.expandIcon,l=t===void 0?(0,r.jsx)(ze.Z,{}):t,h=a.onExpand,Z=a.expanded,i=a.record,o=a.hashId,R=l,s="".concat(e,"-row-expand-icon"),N=function(H){h(!Z),H.stopPropagation()};return typeof l=="function"&&(R=l({expanded:Z,onExpand:h,record:i})),(0,r.jsx)("span",{className:p()(s,o,(0,n.Z)((0,n.Z)({},"".concat(e,"-row-expanded"),Z),"".concat(e,"-row-collapsed"),!Z)),onClick:N,children:R})}function Ca(a){var e,t,l=a.prefixCls,h=(0,x.useContext)(he.ZP.ConfigContext),Z=h.getPrefixCls,i=(0,x.useContext)(Ze.L_),o=i.hashId,R=Z("pro-list",l),s="".concat(R,"-row"),N=a.title,A=a.subTitle,H=a.content,B=a.itemTitleRender,k=a.prefixCls,L=a.actions,W=a.item,G=a.recordKey,z=a.avatar,D=a.cardProps,ae=a.description,P=a.isEditable,d=a.checkbox,E=a.index,te=a.selected,w=a.loading,Y=a.expand,V=a.onExpand,X=a.expandable,U=a.rowSupportExpand,O=a.showActions,J=a.showExtra,re=a.type,S=a.style,T=a.className,C=T===void 0?s:T,I=a.record,c=a.onRow,b=a.onItem,g=a.itemHeaderRender,u=a.cardActionProps,m=a.extra,j=(0,ge.Z)(a,ga),M=X||{},F=M.expandedRowRender,ie=M.expandIcon,se=M.expandRowByClick,Ce=M.indentSize,pe=Ce===void 0?8:Ce,me=M.expandedRowClassName,le=xa(!!Y,{value:Y,onChange:V}),we=(0,oe.Z)(le,2),ce=we[0],Q=we[1],v=p()((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)({},"".concat(s,"-selected"),!D&&te),"".concat(s,"-show-action-hover"),O==="hover"),"".concat(s,"-type-").concat(re),!!re),"".concat(s,"-editable"),P),"".concat(s,"-show-extra-hover"),J==="hover"),o,s),K=p()(o,(0,n.Z)({},"".concat(C,"-extra"),J==="hover")),q=ce||Object.values(X||{}).length===0,de=F&&F(I,E,pe,ce),ue=(0,x.useMemo)(function(){if(!(!L||u==="actions"))return[(0,r.jsx)("div",{onClick:function(ee){return ee.stopPropagation()},children:L},"action")]},[L,u]),Se=(0,x.useMemo)(function(){if(!(!L||!u||u==="extra"))return[(0,r.jsx)("div",{className:"".concat(s,"-actions ").concat(o).trim(),onClick:function(ee){return ee.stopPropagation()},children:L},"action")]},[L,u,s,o]),be=N||A?(0,r.jsxs)("div",{className:"".concat(s,"-header-container ").concat(o).trim(),children:[N&&(0,r.jsx)("div",{className:p()("".concat(s,"-title"),o,(0,n.Z)({},"".concat(s,"-title-editable"),P)),children:N}),A&&(0,r.jsx)("div",{className:p()("".concat(s,"-subTitle"),o,(0,n.Z)({},"".concat(s,"-subTitle-editable"),P)),children:A})]}):null,xe=(e=B&&(B==null?void 0:B(I,E,be)))!==null&&e!==void 0?e:be,Ie=xe||z||A||ae?(0,r.jsx)(je.Z.Item.Meta,{avatar:z,title:xe,description:ae&&q&&(0,r.jsx)("div",{className:"".concat(v,"-description ").concat(o).trim(),children:ae})}):null,Re=p()(o,(0,n.Z)((0,n.Z)((0,n.Z)({},"".concat(s,"-item-has-checkbox"),d),"".concat(s,"-item-has-avatar"),z),v,v)),_=(0,x.useMemo)(function(){return z||N?(0,r.jsxs)(r.Fragment,{children:[z,(0,r.jsx)("span",{className:"".concat(Z("list-item-meta-title")," ").concat(o).trim(),children:N})]}):null},[z,Z,o,N]),$=b==null?void 0:b(I,E),ye=D?(0,r.jsx)(Te,(0,f.Z)((0,f.Z)((0,f.Z)({bordered:!0,style:{width:"100%"}},D),{},{title:_,subTitle:A,extra:ue,actions:Se,bodyStyle:(0,f.Z)({padding:24},D.bodyStyle)},$),{},{onClick:function(ee){var ne,fe;D==null||(ne=D.onClick)===null||ne===void 0||ne.call(D,ee),$==null||(fe=$.onClick)===null||fe===void 0||fe.call($,ee)},children:(0,r.jsx)(Ne.Z,{avatar:!0,title:!1,loading:w,active:!0,children:(0,r.jsxs)("div",{className:"".concat(v,"-header ").concat(o).trim(),children:[B&&(B==null?void 0:B(I,E,be)),H]})})})):(0,r.jsx)(je.Z.Item,(0,f.Z)((0,f.Z)((0,f.Z)((0,f.Z)({className:p()(Re,o,(0,n.Z)({},C,C!==s))},j),{},{actions:ue,extra:!!m&&(0,r.jsx)("div",{className:K,children:m})},c==null?void 0:c(I,E)),$),{},{onClick:function(ee){var ne,fe,Ee,Ae;c==null||(ne=c(I,E))===null||ne===void 0||(fe=ne.onClick)===null||fe===void 0||fe.call(ne,ee),b==null||(Ee=b(I,E))===null||Ee===void 0||(Ae=Ee.onClick)===null||Ae===void 0||Ae.call(Ee,ee),se&&Q(!ce)},children:(0,r.jsxs)(Ne.Z,{avatar:!0,title:!1,loading:w,active:!0,children:[(0,r.jsxs)("div",{className:"".concat(v,"-header ").concat(o).trim(),children:[(0,r.jsxs)("div",{className:"".concat(v,"-header-option ").concat(o).trim(),children:[!!d&&(0,r.jsx)("div",{className:"".concat(v,"-checkbox ").concat(o).trim(),children:d}),Object.values(X||{}).length>0&&U&&ha({prefixCls:R,hashId:o,expandIcon:ie,onExpand:Q,expanded:ce,record:I})]}),(t=g&&(g==null?void 0:g(I,E,Ie)))!==null&&t!==void 0?t:Ie]}),q&&(H||de)&&(0,r.jsxs)("div",{className:"".concat(v,"-content ").concat(o).trim(),children:[H,F&&U&&(0,r.jsx)("div",{className:me&&typeof me!="string"?me(I,E,pe):me,children:de})]})]})}));return D?(0,r.jsx)("div",{className:p()(o,(0,n.Z)((0,n.Z)({},"".concat(v,"-card"),D),C,C!==s)),style:S,children:ye}):ye}var pa=Ca,ba=["title","subTitle","avatar","description","extra","content","actions","type"],ya=ba.reduce(function(a,e){return a.set(e,!0),a},new Map),Ve=y(1977),Za=["dataSource","columns","rowKey","showActions","showExtra","prefixCls","actionRef","itemTitleRender","renderItem","itemCardProps","itemHeaderRender","expandable","rowSelection","pagination","onRow","onItem","rowClassName"];function wa(a){var e=a.dataSource,t=a.columns,l=a.rowKey,h=a.showActions,Z=a.showExtra,i=a.prefixCls,o=a.actionRef,R=a.itemTitleRender,s=a.renderItem,N=a.itemCardProps,A=a.itemHeaderRender,H=a.expandable,B=a.rowSelection,k=a.pagination,L=a.onRow,W=a.onItem,G=a.rowClassName,z=(0,ge.Z)(a,Za),D=(0,x.useContext)(Ze.L_),ae=D.hashId,P=(0,x.useContext)(he.ZP.ConfigContext),d=P.getPrefixCls,E=x.useMemo(function(){return typeof l=="function"?l:function(Q,v){return Q[l]||v}},[l]),te=(0,Je.Z)(e,"children",E),w=(0,oe.Z)(te,1),Y=w[0],V=[function(){},k];(0,Ve.n)(ke.Z,"5.3.0")<0&&V.reverse();var X=(0,Qe.ZP)(e.length,V[0],V[1]),U=(0,oe.Z)(X,1),O=U[0],J=x.useMemo(function(){if(k===!1||!O.pageSize||e.length<O.total)return e;var Q=O.current,v=Q===void 0?1:Q,K=O.pageSize,q=K===void 0?10:K,de=e.slice((v-1)*q,v*q);return de},[e,O,k]),re=d("pro-list",i),S=[{getRowKey:E,getRecordByKey:Y,prefixCls:re,data:e,pageData:J,expandType:"row",childrenColumnName:"children",locale:{}},B];(0,Ve.n)(ke.Z,"5.3.0")<0&&S.reverse();var T=qe.ZP.apply(void 0,S),C=(0,oe.Z)(T,2),I=C[0],c=C[1],b=H||{},g=b.expandedRowKeys,u=b.defaultExpandedRowKeys,m=b.defaultExpandAllRows,j=m===void 0?!0:m,M=b.onExpand,F=b.onExpandedRowsChange,ie=b.rowExpandable,se=x.useState(function(){return u||(j!==!1?e.map(E):[])}),Ce=(0,oe.Z)(se,2),pe=Ce[0],me=Ce[1],le=x.useMemo(function(){return new Set(g||pe||[])},[g,pe]),we=x.useCallback(function(Q){var v=E(Q,e.indexOf(Q)),K,q=le.has(v);q?(le.delete(v),K=(0,Pe.Z)(le)):K=[].concat((0,Pe.Z)(le),[v]),me(K),M&&M(!q,Q),F&&F(K)},[E,le,e,M,F]),ce=I([])[0];return(0,r.jsx)(je.Z,(0,f.Z)((0,f.Z)({},z),{},{className:p()(d("pro-list-container",i),ae,z.className),dataSource:J,pagination:k&&O,renderItem:function(v,K){var q,de={className:typeof G=="function"?G(v,K):G};t==null||t.forEach(function(_){var $=_.listKey,ye=_.cardActionProps;if(ya.has($)){var ve=_.dataIndex||$||_.key,ee=Array.isArray(ve)?_e(v,ve):v[ve];ye==="actions"&&$==="actions"&&(de.cardActionProps=ye);var ne=_.render?_.render(ee,v,K):ee;ne!=="-"&&(de[_.listKey]=ne)}});var ue;ce&&ce.render&&(ue=ce.render(v,v,K));var Se=((q=o.current)===null||q===void 0?void 0:q.isEditable((0,f.Z)((0,f.Z)({},v),{},{index:K})))||{},be=Se.isEditable,xe=Se.recordKey,Ie=c.has(xe||K),Re=(0,r.jsx)(pa,(0,f.Z)((0,f.Z)({cardProps:z.grid?(0,f.Z)((0,f.Z)((0,f.Z)({},N),z.grid),{},{checked:Ie,onChange:x.isValidElement(ue)?function(_){var $;return($=ue)===null||$===void 0||($=$.props)===null||$===void 0?void 0:$.onChange({nativeEvent:{},changeChecked:_})}:void 0}):void 0},de),{},{recordKey:xe,isEditable:be||!1,expandable:H,expand:le.has(E(v,K)),onExpand:function(){we(v)},index:K,record:v,item:v,showActions:h,showExtra:Z,itemTitleRender:R,itemHeaderRender:A,rowSupportExpand:!ie||ie&&ie(v),selected:c.has(E(v,K)),checkbox:ue,onRow:L,onItem:W}),xe);return s?s(v,K,Re):Re}}))}var Sa=wa,Ia=new Ke.E4("techUiListActive",{"0%":{backgroundColor:"unset"},"30%":{background:"#fefbe6"},"100%":{backgroundColor:"unset"}}),Ra=function(e){var t;return(0,n.Z)({},e.componentCls,(0,n.Z)((0,n.Z)({backgroundColor:"transparent"},"".concat(e.proComponentsCls,"-table-alert"),{marginBlockEnd:"16px"}),"&-row",(t={borderBlockEnd:"1px solid ".concat(e.colorSplit)},(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)(t,"".concat(e.antCls,"-list-item-meta-title"),{borderBlockEnd:"none",margin:0}),"&:last-child",(0,n.Z)({borderBlockEnd:"none"},"".concat(e.antCls,"-list-item"),{borderBlockEnd:"none"})),"&:hover",(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)({backgroundColor:"rgba(0, 0, 0, 0.02)",transition:"background-color 0.3s"},"".concat(e.antCls,"-list-item-action"),{display:"block"}),"".concat(e.antCls,"-list-item-extra"),{display:"flex"}),"".concat(e.componentCls,"-row-extra"),{display:"block"}),"".concat(e.componentCls,"-row-subheader-actions"),{display:"block"})),"&-card",(0,n.Z)({marginBlock:8,marginInline:0,paddingBlock:0,paddingInline:8,"&:hover":{backgroundColor:"transparent"}},"".concat(e.antCls,"-list-item-meta-title"),{flexShrink:9,marginBlock:0,marginInline:0,lineHeight:"22px"})),"&".concat(e.componentCls,"-row-editable"),(0,n.Z)({},"".concat(e.componentCls,"-list-item"),{"&-meta":{"&-avatar,&-description,&-title":{paddingBlock:6,paddingInline:0,"&-editable":{paddingBlock:0}}},"&-action":{display:"block"}})),"&".concat(e.componentCls,"-row-selected"),{backgroundColor:e.colorPrimaryBgHover,"&:hover":{backgroundColor:e.colorPrimaryBgHover}}),"&".concat(e.componentCls,"-row-type-new"),{animationName:Ia,animationDuration:"3s"}),"&".concat(e.componentCls,"-row-type-inline"),(0,n.Z)({},"".concat(e.componentCls,"-row-title"),{fontWeight:"normal"})),"&".concat(e.componentCls,"-row-type-top"),{backgroundImage:"url('https://gw.alipayobjects.com/zos/antfincdn/DehQfMbOJb/icon.svg')",backgroundRepeat:"no-repeat",backgroundPosition:"left top",backgroundSize:"12px 12px"}),"&-show-action-hover",(0,n.Z)({},"".concat(e.antCls,`-list-item-action,
- `).concat(e.proComponentsCls,`-card-extra,
- `).concat(e.proComponentsCls,"-card-actions"),{display:"flex"})),(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)(t,"&-show-extra-hover",(0,n.Z)({},"".concat(e.antCls,"-list-item-extra"),{display:"none"})),"&-extra",{display:"none"}),"&-subheader",{display:"flex",alignItems:"center",justifyContent:"space-between",height:"44px",paddingInline:24,paddingBlock:0,color:e.colorTextSecondary,lineHeight:"44px",background:"rgba(0, 0, 0, 0.02)","&-actions":{display:"none"},"&-actions *":{marginInlineEnd:8,"&:last-child":{marginInlineEnd:0}}}),"&-expand-icon",{marginInlineEnd:8,display:"flex",fontSize:12,cursor:"pointer",height:"24px",marginRight:4,color:e.colorTextSecondary,"> .anticon > svg":{transition:"0.3s"}}),"&-expanded",{" > .anticon > svg":{transform:"rotate(90deg)"}}),"&-title",{marginInlineEnd:"16px",wordBreak:"break-all",cursor:"pointer","&-editable":{paddingBlock:8},"&:hover":{color:e.colorPrimary}}),"&-content",{position:"relative",display:"flex",flex:"1",flexDirection:"column",marginBlock:0,marginInline:32}),"&-subTitle",{color:"rgba(0, 0, 0, 0.45)","&-editable":{paddingBlock:8}}),"&-description",{marginBlockStart:"4px",wordBreak:"break-all"}),"&-avatar",{display:"flex"}),(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)(t,"&-header",{display:"flex",flex:"1",justifyContent:"flex-start",h4:{margin:0,padding:0}}),"&-header-container",{display:"flex",alignItems:"center",justifyContent:"flex-start"}),"&-header-option",{display:"flex"}),"&-checkbox",{width:"16px",marginInlineEnd:"12px"}),"&-no-split",(0,n.Z)((0,n.Z)({},"".concat(e.componentCls,"-row"),{borderBlockEnd:"none"}),"".concat(e.antCls,"-list ").concat(e.antCls,"-list-item"),{borderBlockEnd:"none"})),"&-bordered",(0,n.Z)({},"".concat(e.componentCls,"-toolbar"),{borderBlockEnd:"1px solid ".concat(e.colorSplit)})),"".concat(e.antCls,"-list-vertical"),(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)({},"".concat(e.componentCls,"-row"),{borderBlockEnd:"12px 18px 12px 24px"}),"&-header-title",{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"}),"&-content",{marginBlock:0,marginInline:0}),"&-subTitle",{marginBlockStart:8}),"".concat(e.antCls,"-list-item-extra"),(0,n.Z)({display:"flex",alignItems:"center",marginInlineStart:"32px"},"".concat(e.componentCls,"-row-description"),{marginBlockStart:16})),"".concat(e.antCls,"-list-bordered ").concat(e.antCls,"-list-item"),{paddingInline:0}),"".concat(e.componentCls,"-row-show-extra-hover"),(0,n.Z)({},"".concat(e.antCls,"-list-item-extra "),{display:"none"}))),"".concat(e.antCls,"-list-pagination"),{marginBlockStart:e.margin,marginBlockEnd:e.margin}),"".concat(e.antCls,"-list-list"),{"&-item":{cursor:"pointer",paddingBlock:12,paddingInline:12}}),"".concat(e.antCls,"-list-vertical ").concat(e.proComponentsCls,"-list-row"),(0,n.Z)({"&-header":{paddingBlock:0,paddingInline:0,borderBlockEnd:"none"}},"".concat(e.antCls,"-list-item"),(0,n.Z)((0,n.Z)((0,n.Z)({width:"100%",paddingBlock:12,paddingInlineStart:24,paddingInlineEnd:18},"".concat(e.antCls,"-list-item-meta-avatar"),{display:"flex",alignItems:"center",marginInlineEnd:8}),"".concat(e.antCls,"-list-item-action-split"),{display:"none"}),"".concat(e.antCls,"-list-item-meta-title"),{marginBlock:0,marginInline:0}))))))};function Ea(a){return(0,Be.Xj)("ProList",function(e){var t=(0,f.Z)((0,f.Z)({},e),{},{componentCls:".".concat(a)});return[Ra(t)]})}var Pa=["metas","split","footer","rowKey","tooltip","className","options","search","expandable","showActions","showExtra","rowSelection","pagination","itemLayout","renderItem","grid","itemCardProps","onRow","onItem","rowClassName","locale","itemHeaderRender","itemTitleRender"];function Xe(a){var e=a.metas,t=a.split,l=a.footer,h=a.rowKey,Z=a.tooltip,i=a.className,o=a.options,R=o===void 0?!1:o,s=a.search,N=s===void 0?!1:s,A=a.expandable,H=a.showActions,B=a.showExtra,k=a.rowSelection,L=k===void 0?!1:k,W=a.pagination,G=W===void 0?!1:W,z=a.itemLayout,D=a.renderItem,ae=a.grid,P=a.itemCardProps,d=a.onRow,E=a.onItem,te=a.rowClassName,w=a.locale,Y=a.itemHeaderRender,V=a.itemTitleRender,X=(0,ge.Z)(a,Pa),U=(0,x.useRef)();(0,x.useImperativeHandle)(X.actionRef,function(){return U.current},[U.current]);var O=(0,x.useContext)(he.ZP.ConfigContext),J=O.getPrefixCls,re=(0,x.useMemo)(function(){var b=[];return Object.keys(e||{}).forEach(function(g){var u=e[g]||{},m=u.valueType;m||(g==="avatar"&&(m="avatar"),g==="actions"&&(m="option"),g==="description"&&(m="textarea")),b.push((0,f.Z)((0,f.Z)({listKey:g,dataIndex:(u==null?void 0:u.dataIndex)||g},u),{},{valueType:m}))}),b},[e]),S=J("pro-list",a.prefixCls),T=Ea(S),C=T.wrapSSR,I=T.hashId,c=p()(S,I,(0,n.Z)({},"".concat(S,"-no-split"),!t));return C((0,r.jsx)(Ue,(0,f.Z)((0,f.Z)({tooltip:Z},X),{},{actionRef:U,pagination:G,type:"list",rowSelection:L,search:N,options:R,className:p()(S,i,c),columns:re,rowKey:h,tableViewRender:function(g){var u=g.columns,m=g.size,j=g.pagination,M=g.rowSelection,F=g.dataSource,ie=g.loading;return(0,r.jsx)(Sa,{grid:ae,itemCardProps:P,itemTitleRender:V,prefixCls:a.prefixCls,columns:u,renderItem:D,actionRef:U,dataSource:F||[],size:m,footer:l,split:t,rowKey:h,expandable:A,rowSelection:L===!1?void 0:M,showActions:H,showExtra:B,pagination:j,itemLayout:z,loading:ie,itemHeaderRender:Y,onRow:d,onItem:E,rowClassName:te,locale:w})}})))}function Ta(a){return _jsx(ProConfigProvider,{needDeps:!0,children:_jsx(Xe,_objectSpread({cardProps:!1,search:!1,toolBarRender:!1},a))})}function ja(a){return(0,r.jsx)(Ze._Y,{needDeps:!0,children:(0,r.jsx)(Xe,(0,f.Z)({},a))})}var Aa=null}}]);
|