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.
10 lines
34 KiB
10 lines
34 KiB
(globalThis.utooChunk_ant_design_pro||(globalThis.utooChunk_ant_design_pro=[])).push(["object"==typeof document?document.currentScript:void 0,42984,e=>{"use strict";var t=e.i(391398),r=(0,e.i(192306).makeChartComp)("Radar"),i=e.i(203112),a=e.i(82275);e.i(113297);var n=e.i(846205),s=e.i(397591),l=e.i(946077),o=e.i(76820),c=e.i(326440),d=e.i(245538),u=e.i(81867),h=e.i(678485),p=e.i(494834),m=e.i(360618),f=e.i(313367),g=e.i(191788),x=e.i(827830);let y=(0,x.createStyles)(({token:e})=>({linkGroup:{fontSize:"0","& > a":{display:"inline-block",width:"25%",marginBottom:"13px",color:e.colorText,fontSize:e.fontSize,"&:hover":{color:e.colorPrimary}}}}));var v=e=>{let{styles:r}=y(),{links:i=[],linkElement:a="a",onAdd:n=()=>{}}=e;return(0,t.jsxs)("div",{className:r.linkGroup,children:[i.map(e=>(0,g.createElement)(a,{key:`linkGroup-item-${e.id||e.title}`,to:e.href,href:e.href},e.title)),(0,t.jsxs)(f.Button,{size:"small",type:"primary",ghost:!0,onClick:n,children:[(0,t.jsx)(m.PlusOutlined,{})," 添加"]})]})},b=e.i(134124);async function S(){return(0,b.request)("/api/project/notice")}async function $(){return(0,b.request)("/api/activities")}async function R(){return(0,b.request)("/api/fake_workplace_chart_data")}let w=(0,x.createStyles)(({token:e})=>({activitiesList:{padding:0},username:{color:e.colorText},event:{fontWeight:"normal"},pageHeaderContent:{display:"flex",[`@media screen and (max-width: ${e.screenSM}px)`]:{display:"block"}},avatar:{flex:"0 1 72px","& > span":{display:"block",width:"72px",height:"72px",borderRadius:"72px"}},content:{position:"relative",top:"4px",flex:"1 1 auto",marginLeft:"24px",color:e.colorTextSecondary,lineHeight:"22px",[`@media screen and (max-width: ${e.screenSM}px)`]:{marginLeft:"0"}},contentTitle:{marginBottom:"12px",color:e.colorTextHeading,fontWeight:"500",fontSize:"20px",lineHeight:"28px"},extraContent:{zoom:"1","&::before, &::after":{display:"table",content:"' '"},"&::after":{clear:"both",height:"0",fontSize:"0",visibility:"hidden"},float:"right",whiteSpace:"nowrap",[`@media screen and (max-width: ${e.screenXL}px) and (min-width: @screen-lg)`]:{marginLeft:"-44px"},[`@media screen and (max-width: ${e.screenLG}px)`]:{float:"none",marginRight:"0"},[`@media screen and (max-width: ${e.screenMD}px)`]:{marginLeft:"-16px"}},statItem:{position:"relative",display:"inline-block",padding:"0 32px","> p:first-child":{marginBottom:"4px",color:e.colorTextSecondary,fontSize:e.fontSize,lineHeight:"22px"},"> p":{margin:"0",color:e.colorTextHeading,fontSize:"30px",lineHeight:"38px","> span":{color:e.colorTextSecondary,fontSize:"20px"}},"&::after":{position:"absolute",top:"8px",right:"0",width:"1px",height:"40px",backgroundColor:e.colorSplit,content:"''"},"&:last-child":{paddingRight:"0","&::after":{display:"none"}},[`@media screen and (max-width: ${e.screenXL}px) and (min-width: @screen-lg)`]:{padding:"0 16px"},[`@media screen and (max-width: ${e.screenLG}px)`]:{padding:"0 16px",textAlign:"left","&::after":{display:"none"}},[`@media screen and (max-width: ${e.screenSM}px)`]:{float:"none"}},members:{a:{display:"block",height:"24px",margin:"12px 0",color:e.colorText,transition:"all 0.3s",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",wordBreak:"break-all","&:hover":{color:e.colorPrimary}},[`@media screen and (max-width: ${e.screenXL}px) and (min-width: @screen-lg)`]:{marginBottom:"0"},[`@media screen and (max-width: ${e.screenLG}px)`]:{marginBottom:"0"}},member:{marginLeft:"12px",fontSize:e.fontSize,lineHeight:"24px",verticalAlign:"top"},projectList:{".ant-card-meta-description":{height:"44px",overflow:"hidden",color:e.colorTextSecondary,lineHeight:"22px"}},cardTitle:{fontSize:"0",a:{display:"inline-block",height:"24px",marginLeft:"12px",color:e.colorTextHeading,fontSize:e.fontSize,lineHeight:"24px",verticalAlign:"top","&:hover":{color:e.colorPrimary}}},projectGrid:{width:"33.33%",[`@media screen and (max-width: ${e.screenMD}px)`]:{width:"50%"},[`@media screen and (max-width: ${e.screenXS}px)`]:{width:"100%"}},projectItemContent:{display:"flex",height:"20px",marginTop:"8px",overflow:"hidden",fontSize:"12px",gap:"epx",lineHeight:"20px",whiteSpace:"nowrap",textOverflow:"ellipsis",wordBreak:"break-all",a:{display:"inline-block",flex:"1 1 0",color:e.colorTextSecondary,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",wordBreak:"break-all","&:hover":{color:e.colorPrimary}}},datetime:{flex:"0 0 auto",color:e.colorTextDisabled},activeCard:{[`@media screen and (max-width: ${e.screenXL}px) and (min-width: @screen-lg)`]:{marginBottom:"24px"},[`@media screen and (max-width: ${e.screenLG}px)`]:{marginBottom:"24px"}}})),C=[{title:"操作一",href:""},{title:"操作二",href:""},{title:"操作三",href:""},{title:"操作四",href:""},{title:"操作五",href:""},{title:"操作六",href:""}],T=({currentUser:e})=>{let{styles:r}=w();return e&&Object.keys(e).length?(0,t.jsxs)("div",{className:r.pageHeaderContent,children:[(0,t.jsx)("div",{className:r.avatar,children:(0,t.jsx)(s.Avatar,{size:"large",src:e.avatar})}),(0,t.jsxs)("div",{className:r.content,children:[(0,t.jsxs)("div",{className:r.contentTitle,children:["早安,",e.name,",祝你开心每一天!"]}),(0,t.jsxs)("div",{children:[e.title," | ",e.group]})]})]}):(0,t.jsx)(u.Skeleton,{avatar:!0,paragraph:{rows:1},active:!0})},E=()=>{let{styles:e}=w();return(0,t.jsxs)("div",{className:e.extraContent,children:[(0,t.jsx)("div",{className:e.statItem,children:(0,t.jsx)(h.Statistic,{title:"项目数",value:56})}),(0,t.jsx)("div",{className:e.statItem,children:(0,t.jsx)(h.Statistic,{title:"团队内排名",value:8,suffix:"/ 24"})}),(0,t.jsx)("div",{className:e.statItem,children:(0,t.jsx)(h.Statistic,{title:"项目访问",value:2223})})]})};var j=()=>{let{styles:e}=w(),{isLoading:u,data:h=[]}=(0,a.useQuery)({queryKey:["project-notice"],queryFn:()=>S().then(e=>e.data)}),{isLoading:m,data:f=[]}=(0,a.useQuery)({queryKey:["activities"],queryFn:()=>$().then(e=>e.data)}),{data:g}=(0,a.useQuery)({queryKey:["workplace-chart"],queryFn:()=>R().then(e=>e.data)});return(0,t.jsx)(i.PageContainer,{content:(0,t.jsx)(T,{currentUser:{avatar:"https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",name:"吴彦祖",userid:"00000001",email:"antdesign@alipay.com",signature:"海纳百川,有容乃大",title:"交互专家",group:"蚂蚁集团-某某某事业群-某某平台部-某某技术部-UED"}}),extraContent:(0,t.jsx)(E,{}),children:(0,t.jsxs)(d.Row,{gutter:24,children:[(0,t.jsxs)(o.Col,{xl:16,lg:24,md:24,sm:24,xs:24,children:[(0,t.jsx)(l.Card,{className:e.projectList,style:{marginBottom:24},title:"进行中的项目",variant:"borderless",extra:(0,t.jsx)(n.Link,{to:"/",prefetch:!0,children:"全部项目"}),loading:u,children:h.map(r=>(0,t.jsxs)(l.Card.Grid,{className:e.projectGrid,children:[(0,t.jsx)(l.Card.Meta,{title:(0,t.jsxs)("div",{className:e.cardTitle,children:[(0,t.jsx)(s.Avatar,{size:"small",src:r.logo}),(0,t.jsx)(n.Link,{to:r.href||"/",prefetch:!0,children:r.title})]}),description:r.description,style:{width:"100%"}}),(0,t.jsxs)("div",{className:e.projectItemContent,children:[(0,t.jsx)(n.Link,{to:r.memberLink||"/",prefetch:!0,children:r.member||""}),r.updatedAt&&(0,t.jsx)("span",{className:e.datetime,title:r.updatedAt,children:(0,p.default)(r.updatedAt).fromNow()})]})]},r.id))}),(0,t.jsx)(l.Card,{styles:{body:{padding:16*!!m}},variant:"borderless",className:e.activeCard,title:"动态",loading:m,children:(0,t.jsx)(c.List,{loading:m,renderItem:r=>{let i;return i=r.template.split(/@\{([^{}]*)\}/gi).map(e=>{if(r[e]){let i=r[e];return(0,t.jsx)("a",{href:i?.link,children:i.name},i?.name)}return e}),(0,t.jsx)(c.List.Item,{children:(0,t.jsx)(c.List.Item.Meta,{avatar:(0,t.jsx)(s.Avatar,{src:r.user.avatar}),title:(0,t.jsxs)("span",{children:[(0,t.jsx)("a",{className:e.username,children:r.user.name})," ",(0,t.jsx)("span",{className:e.event,children:i})]}),description:(0,t.jsx)("span",{className:e.datetime,title:r.updatedAt,children:(0,p.default)(r.updatedAt).fromNow()})})},r.id)},dataSource:f,className:e.activitiesList,size:"large"})})]}),(0,t.jsxs)(o.Col,{xl:8,lg:24,md:24,sm:24,xs:24,children:[(0,t.jsx)(l.Card,{style:{marginBottom:24},title:"快速开始 / 便捷导航",variant:"borderless",children:(0,t.jsx)(v,{onAdd:()=>{},links:C,linkElement:n.Link})}),(0,t.jsx)(l.Card,{style:{marginBottom:24},variant:"borderless",title:"XX 指数",loading:g?.radarData?.length===0,children:(0,t.jsx)(r,{height:343,data:g?.radarData||[],xField:"label",colorField:"name",yField:"value",shapeField:"smooth",area:{style:{fillOpacity:.4}},axis:{y:{gridStrokeOpacity:.5}},legend:{color:{position:"bottom",layout:{justifyContent:"center"}}}})}),(0,t.jsx)(l.Card,{styles:{body:{paddingTop:12,paddingBottom:12}},variant:"borderless",title:"团队",loading:u,children:(0,t.jsx)("div",{className:e.members,children:(0,t.jsx)(d.Row,{gutter:48,children:h.map(r=>(0,t.jsx)(o.Col,{span:12,children:(0,t.jsxs)("a",{children:[(0,t.jsx)(s.Avatar,{src:r.logo,size:"small"}),(0,t.jsx)("span",{className:e.member,children:r.member.substring(0,3)})]})},`members-item-${r.id}`))})})})]})]})})};e.s(["default",()=>j],42984)},76820,245538,e=>{"use strict";var t=e.i(84443).Col;e.s(["Col",()=>t],76820);var r=e.i(247699).Row;e.s(["Row",()=>r],245538)},82275,e=>{"use strict";let t;var r=e.i(879971),i=e.i(114070),a=e.i(465235),n=e.i(84813),s=e.i(895564),l=e.i(492363),o=e.i(456298),c=e.i(974233),d=class extends s.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,l.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#i=void 0;#a=void 0;#n=void 0;#s;#l;#r;#t;#o;#c;#d;#u;#h;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#i.addObserver(this),u(this.#i,this.options)?this.#f():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return h(this.#i,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.#i,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#y(),this.#i.removeObserver(this)}setOptions(e){let t=this.options,r=this.#i;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveQueryBoolean)(this.options.enabled,this.#i))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#i.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#i,observer:this});let i=this.hasListeners();i&&p(this.#i,r,this.options,t)&&this.#f(),this.updateResult(),i&&(this.#i!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#i)!==(0,o.resolveQueryBoolean)(t.enabled,this.#i)||(0,o.resolveStaleTime)(this.options.staleTime,this.#i)!==(0,o.resolveStaleTime)(t.staleTime,this.#i))&&this.#b();let a=this.#S();i&&(this.#i!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#i)!==(0,o.resolveQueryBoolean)(t.enabled,this.#i)||a!==this.#p)&&this.#$(a)}getOptimisticResult(e){var t,r;let i=this.#e.getQueryCache().build(this.#e,e),a=this.createResult(i,e);return t=this,r=a,(0,o.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#n=a,this.#l=this.options,this.#s=this.#i.state),a}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#i}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#v();let t=this.#i.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#b(){this.#x();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#i);if(i.environmentManager.isServer()||this.#n.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#n.dataUpdatedAt,e);this.#u=c.timeoutManager.setTimeout(()=>{this.#n.isStale||this.updateResult()},t+1)}#S(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#i):this.options.refetchInterval)??!1}#$(e){this.#y(),this.#p=e,!i.environmentManager.isServer()&&!1!==(0,o.resolveQueryBoolean)(this.options.enabled,this.#i)&&(0,o.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#h=c.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#f()},this.#p))}#g(){this.#b(),this.#$(this.#S())}#x(){void 0!==this.#u&&(c.timeoutManager.clearTimeout(this.#u),this.#u=void 0)}#y(){void 0!==this.#h&&(c.timeoutManager.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){let r,i=this.#i,a=this.options,s=this.#n,c=this.#s,d=this.#l,h=e!==i?e.state:this.#a,{state:f}=e,g={...f},x=!1;if(t._optimisticResults){let r=this.hasListeners(),s=!r&&u(e,t),l=r&&p(e,i,t,a);(s||l)&&(g={...g,...(0,n.fetchState)(f.data,e.options)}),"isRestoring"===t._optimisticResults&&(g.fetchStatus="idle")}let{error:y,errorUpdatedAt:v,status:b}=g;r=g.data;let S=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===b){let e;s?.isPlaceholderData&&t.placeholderData===d?.placeholderData?(e=s.data,S=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#d?.state.data,this.#d):t.placeholderData,void 0!==e&&(b="success",r=(0,o.replaceData)(s?.data,e,t),x=!0)}if(t.select&&void 0!==r&&!S)if(s&&r===c?.data&&t.select===this.#o)r=this.#c;else try{this.#o=t.select,r=t.select(r),r=(0,o.replaceData)(s?.data,r,t),this.#c=r,this.#t=null}catch(e){this.#t=e}this.#t&&(y=this.#t,r=this.#c,v=Date.now(),b="error");let $="fetching"===g.fetchStatus,R="pending"===b,w="error"===b,C=R&&$,T=void 0!==r,E={status:b,fetchStatus:g.fetchStatus,isPending:R,isSuccess:"success"===b,isError:w,isInitialLoading:C,isLoading:C,data:r,dataUpdatedAt:g.dataUpdatedAt,error:y,errorUpdatedAt:v,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:$,isRefetching:$&&!R,isLoadingError:w&&!T,isPaused:"paused"===g.fetchStatus,isPlaceholderData:x,isRefetchError:w&&T,isStale:m(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,o.resolveQueryBoolean)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==E.data,r="error"===E.status&&!t,a=e=>{r?e.reject(E.error):t&&e.resolve(E.data)},n=()=>{a(this.#r=E.promise=(0,l.pendingThenable)())},s=this.#r;switch(s.status){case"pending":e.queryHash===i.queryHash&&a(s);break;case"fulfilled":(r||E.data!==s.value)&&n();break;case"rejected":r&&E.error===s.reason||n()}}return E}updateResult(){let e=this.#n,t=this.createResult(this.#i,this.options);if(this.#s=this.#i.state,this.#l=this.options,void 0!==this.#s.data&&(this.#d=this.#i),(0,o.shallowEqualObjects)(t,e))return;this.#n=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#m.size)return!0;let i=new Set(r??this.#m);return this.options.throwOnError&&i.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&i.has(t))};this.#R({listeners:r()})}#v(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#i)return;let t=this.#i;this.#i=e,this.#a=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#R(e){a.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#i,type:"observerResultsUpdated"})})}};function u(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==(0,o.resolveQueryBoolean)(t.retryOnMount,e))||void 0!==e.state.data&&h(e,t,t.refetchOnMount)}function h(e,t,r){if(!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let i="function"==typeof r?r(e):r;return"always"===i||!1!==i&&m(e,t)}return!1}function p(e,t,r,i){return(e!==t||!1===(0,o.resolveQueryBoolean)(i.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&m(e,r)}function m(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}var f=e.i(191788),g=e.i(755224);e.i(391398);var x=f.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),y=f.createContext(!1);y.Provider;var v=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});e.s(["useQuery",0,function(e,t){return function(e,t,r){var n,s,l,c;let d,u=f.useContext(y),h=f.useContext(x),p=(0,g.useQueryClient)(r),m=p.defaultQueryOptions(e);null==(s=null==(n=p.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||s.call(n,m);let b=p.getQueryCache().get(m.queryHash);if(m._optimisticResults=u?"isRestoring":"optimistic",m.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=m.staleTime;m.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof m.gcTime&&(m.gcTime=Math.max(m.gcTime,1e3))}d=(null==b?void 0:b.state.error)&&"function"==typeof m.throwOnError?(0,o.shouldThrowError)(m.throwOnError,[b.state.error,b]):m.throwOnError,(m.suspense||m.experimental_prefetchInRender||d)&&!h.isReset()&&(m.retryOnMount=!1),f.useEffect(()=>{h.clearReset()},[h]);let S=!p.getQueryCache().get(m.queryHash),[$]=f.useState(()=>new t(p,m)),R=$.getOptimisticResult(m),w=!u&&!1!==e.subscribed;if(f.useSyncExternalStore(f.useCallback(e=>{let t=w?$.subscribe(a.notifyManager.batchCalls(e)):o.noop;return $.updateResult(),t},[$,w]),()=>$.getCurrentResult(),()=>$.getCurrentResult()),f.useEffect(()=>{$.setOptions(m)},[m,$]),(null==m?void 0:m.suspense)&&R.isPending)throw v(m,$,h);if((({result:e,errorResetBoundary:t,throwOnError:r,query:i,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(a&&void 0===e.data||(0,o.shouldThrowError)(r,[e.error,i])))({result:R,errorResetBoundary:h,throwOnError:m.throwOnError,query:b,suspense:m.suspense}))throw R.error;if(null==(c=null==(l=p.getDefaultOptions().queries)?void 0:l._experimental_afterQuery)||c.call(l,m,R),m.experimental_prefetchInRender&&!i.environmentManager.isServer()&&R.isLoading&&R.isFetching&&!u){let e=S?v(m,$,h):null==b?void 0:b.promise;null==e||e.catch(o.noop).finally(()=>{$.updateResult()})}return m.notifyOnChangeProps?R:$.trackResult(R)}(e,d,t)}],82275)},98826,e=>{"use strict";var t=e.i(353944);e.i(191788);var r=e.i(391398);e.s(["PageLoading",0,({isLoading:e,pastDelay:i,timedOut:a,error:n,retry:s,...l})=>(0,r.jsx)("div",{style:{paddingBlockStart:100,textAlign:"center"},children:(0,r.jsx)(t.Spin,{size:"large",...l})})])},106555,e=>{"use strict";var t=e.i(379049),r=e.i(56206),i=e.i(191788),a=e.i(814432),n=e.i(889590),s=e.i(391398);e.s(["GridContent",0,e=>{let l=(0,i.useContext)(a.RouteContext),{children:o,contentWidth:c,className:d,style:u}=e,{getPrefixCls:h}=(0,i.useContext)(t.ConfigProvider.ConfigContext),p=e.prefixCls||h("pro"),m=c||l.contentWidth,f=`${p}-grid-content`,{wrapSSR:g,hashId:x}=(0,n.useStyle)("ProLayoutGridContent",e=>[{[({...e,componentCls:`.${f}`}).componentCls]:{boxSizing:"border-box",width:"100%","&-wide":{maxWidth:1152,margin:"0 auto"}}}]),y="Fixed"===m&&"top"===l.layout;return g((0,s.jsx)("div",{className:(0,r.clsx)(f,x,d,{[`${f}-wide`]:y}),style:u,"data-testid":"pro-grid-content",children:(0,s.jsx)("div",{className:(0,r.clsx)(`${p}-grid-content-children`,x),children:o})}))}],106555)},132259,e=>{"use strict";var t=e.i(313213);e.s(["Space",()=>t.default])},154165,e=>{"use strict";var t=e.i(934854),r=(e,r={})=>!(0,t.isNonNullable)(e)&&r?.skipEmpty?[]:Array.isArray(e)?e:[e];e.s(["default",()=>r])},360618,e=>{"use strict";var t=e.i(439214);e.s(["PlusOutlined",()=>t.default])},439214,e=>{"use strict";var t=e.i(191788),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},i=e.i(117716);function a(){return(a=Object.assign.bind()).apply(this,arguments)}let n=t.forwardRef((e,n)=>t.createElement(i.default,a({},e,{ref:n,icon:r})));e.s(["default",()=>n],439214)},454895,e=>{"use strict";var t=e.i(267226);e.s(["Tabs",()=>t.default])},678485,e=>{"use strict";var t=e.i(191788);e.i(957562);var r=e.i(27593),i=e.i(663032),a=e.i(624200),n=e.i(56206),s=e.i(430898),l=e.i(993175),o=e.i(106422),c=e.i(934854),d=e=>{let r,{value:i,formatter:a,precision:n,decimalSeparator:s,groupSeparator:l="",prefixCls:o}=e;if("function"==typeof a)r=a(i);else{let e=String(i),a=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(a&&"-"!==e){let e=a[1],i=a[2]||"0",d=a[4]||"";i=i.replace(/\B(?=(\d{3})+(?!\d))/g,l),(0,c.isNumber)(n)&&(d=d.padEnd(n,"0").slice(0,n>0?n:0)),d&&(d=`${s}${d}`),r=[t.createElement("span",{key:"int",className:`${o}-content-value-int`},e,i),d&&t.createElement("span",{key:"decimal",className:`${o}-content-value-decimal`},d)]}else r=e}return t.createElement("span",{className:`${o}-content-value`},r)},u=e.i(307441),h=e.i(352050),p=e.i(104616),m=(0,h.genStyleHooks)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:r,padding:i,colorTextDescription:a,titleFontSize:n,colorTextHeading:s,contentFontSize:l,fontFamily:o}=e;return{[t]:{...(0,u.resetComponent)(e),[`${t}-header`]:{paddingBottom:r,[`${t}-title`]:{color:a,fontSize:n}},[`${t}-skeleton`]:{paddingTop:i},[`${t}-content`]:{color:s,fontSize:l,fontFamily:o,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:r},[`${t}-content-suffix`]:{marginInlineStart:r}}}}})((0,p.mergeToken)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:r}=e;return{titleFontSize:r,contentFontSize:t}});let f=t.forwardRef((e,r)=>{let{prefixCls:i,className:c,rootClassName:u,style:h,valueStyle:p,value:f=0,title:g,valueRender:x,prefix:y,suffix:v,loading:b=!1,formatter:S,precision:$,decimalSeparator:R=".",groupSeparator:w=",",onMouseEnter:C,onMouseLeave:T,styles:E,classNames:j,...k}=e,{getPrefixCls:I,direction:Q,className:z,style:N,classNames:L,styles:B}=(0,l.useComponentConfig)("statistic"),M=I("statistic",i),[O,H]=m(M),D={...e,decimalSeparator:R,groupSeparator:w,loading:b,value:f},[F,P]=(0,s.useMergeSemantic)([L,j],[B,E],{props:D}),q=t.createElement(d,{decimalSeparator:R,groupSeparator:w,prefixCls:M,formatter:S,precision:$,value:f}),G=(0,n.clsx)(M,{[`${M}-rtl`]:"rtl"===Q},z,c,u,F.root,O,H),W=(0,n.clsx)(`${M}-header`,F.header),A=(0,n.clsx)(`${M}-title`,F.title),_=(0,n.clsx)(`${M}-content`,F.content),U=(0,n.clsx)(`${M}-content-prefix`,F.prefix),X=(0,n.clsx)(`${M}-content-suffix`,F.suffix),K=t.useRef(null);t.useImperativeHandle(r,()=>({nativeElement:K.current}));let V=(0,a.default)(k,{aria:!0,data:!0});return t.createElement("div",{...V,className:G,style:{...P.root,...N,...h},ref:K,onMouseEnter:C,onMouseLeave:T},g&&t.createElement("div",{className:W,style:P.header},t.createElement("div",{className:A,style:P.title},g)),t.createElement(o.default,{paragraph:!1,loading:b,className:`${M}-skeleton`,active:!0},t.createElement("div",{className:_,style:{...p,...P.content}},y&&t.createElement("span",{className:U,style:P.prefix},y),"function"==typeof x?x(q):q,v&&t.createElement("span",{className:X,style:P.suffix},v))))}),g=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],x=1e3/60;var y=e=>{let{value:a,format:n="HH:mm:ss",onChange:s,onFinish:l,type:o,...c}=e,d="countdown"===o,[u,h]=t.useState(null),p=(0,r.useEvent)(()=>{let e=Date.now(),t=new Date(a).getTime();h({});let r=d?t-e:e-t;return s?.(r),!d||!(t<e)||(l?.(),!1)});return t.useEffect(()=>{let e;return e=window.setInterval(()=>{p()||window.clearInterval(e)},x),()=>{window.clearInterval(e)}},[a,d]),t.useEffect(()=>{h({})},[]),t.createElement(f,{...c,value:a,valueRender:e=>(0,i.cloneElement)(e,{title:void 0}),formatter:(e,t)=>u?function(e,t,r){let i,a,n,s,l,o,{format:c=""}=t,d=new Date(e).getTime(),u=Date.now();return i=r?Math.max(d-u,0):Math.max(u-d,0),a=/\[[^\]]*]/g,n=(c.match(a)||[]).map(e=>e.slice(1,-1)),s=c.replace(a,"[]"),l=g.reduce((e,[t,r])=>{if(e.includes(t)){let a=Math.floor(i/r);return i-=a*r,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return a.toString().padStart(t,"0")})}return e},s),o=0,l.replace(a,()=>{let e=n[o];return o+=1,e})}(e,{...t,format:n},d):"-"})},v=t.memo(e=>t.createElement(y,{...e,type:"countdown"}));f.Timer=y,f.Countdown=v,e.s(["Statistic",()=>f],678485)},727168,e=>{e.v(e=>Promise.resolve().then(()=>e(730943)))},770829,e=>{e.v(e=>Promise.resolve().then(()=>e(681912)))},814432,e=>{"use strict";let t=(0,e.i(191788).createContext)({});e.s(["RouteContext",0,t])},946077,e=>{"use strict";var t=e.i(191788);e.i(957562);var r=e.i(191248),i=e.i(531983),a=e.i(56206),n=e.i(430898),s=e.i(993175),l=e.i(625263),o=e.i(536995),c=e.i(106422),d=e.i(267226),u=({prefixCls:e,className:r,hoverable:i=!0,...n})=>{let{getPrefixCls:l}=t.useContext(s.ConfigContext),o=l("card",e),c=(0,a.clsx)(`${o}-grid`,r,{[`${o}-grid-hoverable`]:i});return t.createElement("div",{...n,className:c})};e.i(290586);var h=e.i(774778),p=e.i(307441),m=e.i(352050),f=e.i(104616),g=(0,m.genStyleHooks)("Card",e=>{let t=(0,f.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:r,cardHeadPadding:i,colorBorderSecondary:a,boxShadowTertiary:n,bodyPadding:s,extraColor:l,motionDurationMid:o}=e;return{[t]:{...(0,p.resetComponent)(e),position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:n},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:i,headerPadding:a,tabsMarginBottom:n}=e;return{display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${(0,h.unit)(a)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,h.unit)(e.borderRadiusLG)} ${(0,h.unit)(e.borderRadiusLG)} 0 0`,...(0,p.clearFix)(),"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":{display:"inline-block",flex:1,...p.textEllipsis,[`
|
|
> ${r}-typography,
|
|
> ${r}-typography-edit-content
|
|
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:"both",marginBottom:n,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:l,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:s,borderRadius:`0 0 ${(0,h.unit)(e.borderRadiusLG)} ${(0,h.unit)(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:r,cardShadow:i,lineWidth:a}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
|
|
${(0,h.unit)(a)} 0 0 0 ${r},
|
|
0 ${(0,h.unit)(a)} 0 0 ${r},
|
|
${(0,h.unit)(a)} ${(0,h.unit)(a)} 0 0 ${r},
|
|
${(0,h.unit)(a)} 0 0 0 ${r} inset,
|
|
0 ${(0,h.unit)(a)} 0 0 ${r} inset;
|
|
`,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,h.unit)(e.borderRadiusLG)} ${(0,h.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:r,actionsLiMargin:i,cardActionsIconSize:a,colorBorderSecondary:n,actionsBg:s}=e;return{margin:0,padding:0,listStyle:"none",background:s,borderTop:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${n}`,display:"flex",borderRadius:`0 0 ${(0,h.unit)(e.borderRadiusLG)} ${(0,h.unit)(e.borderRadiusLG)}`,...(0,p.clearFix)(),"& > li":{margin:i,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${r}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,h.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:a,lineHeight:(0,h.unit)(e.calc(a).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${n}`}}}})(e),[`${t}-meta`]:{margin:`${(0,h.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex",...(0,p.clearFix)(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...p.textEllipsis},"&-description":{color:e.colorTextDescription}}},[`${t}-bordered`]:{border:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${a}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:["box-shadow","border-color"].map(e=>`${e} ${o}`).join(", "),"&:hover":{borderColor:"transparent",boxShadow:r}},[`${t}-contain-grid`]:{borderRadius:`${(0,h.unit)(e.borderRadiusLG)} ${(0,h.unit)(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:i}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:r,headerPadding:i,bodyPadding:a}=e;return{[`${t}-head`]:{padding:`0 ${(0,h.unit)(i)}`,background:r,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,h.unit)(e.padding)} ${(0,h.unit)(a)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:r,headerPaddingSM:i,headerHeightSM:a,headerFontSizeSM:n}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:a,padding:`0 ${(0,h.unit)(i)}`,fontSize:n,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:r}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG}));let x=e=>{let{actionClasses:r,actions:i=[],actionStyle:a}=e;return t.createElement("ul",{className:r,style:a},i.map((e,r)=>{let a=`action-${r}`;return t.createElement("li",{style:{width:`${100/i.length}%`},key:a},t.createElement("span",null,e))}))},y=t.forwardRef((e,h)=>{let p,{prefixCls:m,className:f,rootClassName:y,style:v,extra:b,headStyle:S={},bodyStyle:$={},title:R,loading:w,bordered:C,variant:T,size:E,type:j,cover:k,actions:I,tabList:Q,children:z,activeTabKey:N,defaultActiveTabKey:L,tabBarExtraContent:B,hoverable:M,tabProps:O={},classNames:H,styles:D,...F}=e,{getPrefixCls:P,direction:q,className:G,style:W,classNames:A,styles:_}=(0,s.useComponentConfig)("card"),[U]=(0,o.default)("card",T,C),X=(0,l.default)(E),K={...e,size:X,variant:U},[V,Y]=(0,n.useMergeSemantic)([A,H],[_,D],{props:K}),J=t.useMemo(()=>(0,i.toArray)(z),[z]),Z=t.useMemo(()=>J.some(e=>t.isValidElement(e)&&e.type===u),[J]),ee=P("card",m),[et,er]=g(ee),ei=t.createElement(c.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},z),ea=void 0!==N,en={...O,[ea?"activeKey":"defaultActiveKey"]:ea?N:L,tabBarExtraContent:B},es=Q?t.createElement(d.default,{size:"small"!==X?"large":X,...en,className:`${ee}-head-tabs`,onChange:t=>{e.onTabChange?.(t)},items:Q.map(({tab:e,...t})=>({label:e,...t}))}):null;if(R||b||es){let e=(0,a.clsx)(`${ee}-head`,V.header),r=(0,a.clsx)(`${ee}-head-title`,V.title),i=(0,a.clsx)(`${ee}-extra`,V.extra),n={...S,...Y.header};p=t.createElement("div",{className:e,style:n},t.createElement("div",{className:`${ee}-head-wrapper`},R&&t.createElement("div",{className:r,style:Y.title},R),b&&t.createElement("div",{className:i,style:Y.extra},b)),es)}let el=(0,a.clsx)(`${ee}-cover`,V.cover),eo=k?t.createElement("div",{className:el,style:Y.cover},k):null,ec=(0,a.clsx)(`${ee}-body`,V.body),ed={...$,...Y.body},eu=w||J.length?t.createElement("div",{className:ec,style:ed},w?ei:z):null,eh=(0,a.clsx)(`${ee}-actions`,V.actions),ep=I?.length?t.createElement(x,{actionClasses:eh,actionStyle:Y.actions,actions:I}):null,em=(0,r.omit)(F,["onTabChange"]),ef=(0,a.clsx)(ee,G,{[`${ee}-loading`]:w,[`${ee}-bordered`]:"borderless"!==U,[`${ee}-hoverable`]:M,[`${ee}-contain-grid`]:Z,[`${ee}-contain-tabs`]:Q?.length,[`${ee}-small`]:"small"===X,[`${ee}-type-${j}`]:!!j,[`${ee}-rtl`]:"rtl"===q},f,y,et,er,V.root),eg={...Y.root,...W,...v};return t.createElement("div",{ref:h,...em,className:ef,style:eg},p,eo,eu,ep)});y.Grid=u,y.Meta=e=>{let{prefixCls:r,className:i,avatar:l,title:o,description:c,style:d,classNames:u,styles:h,...p}=e,{getPrefixCls:m,className:f,style:g,classNames:x,styles:y}=(0,s.useComponentConfig)("cardMeta"),v=m("card",r),b=`${v}-meta`,[S,$]=(0,n.useMergeSemantic)([x,u],[y,h],{props:e}),R=(0,a.clsx)(b,i,f,S.root),w={...g,...$.root,...d},C=(0,a.clsx)(`${b}-avatar`,S.avatar),T=(0,a.clsx)(`${b}-title`,S.title),E=(0,a.clsx)(`${b}-description`,S.description),j=(0,a.clsx)(`${b}-section`,S.section),k=l?t.createElement("div",{className:C,style:$.avatar},l):null,I=o?t.createElement("div",{className:T,style:$.title},o):null,Q=c?t.createElement("div",{className:E,style:$.description},c):null,z=I||Q?t.createElement("div",{className:j,style:$.section},I,Q):null;return t.createElement("div",{...p,className:R,style:w},k,z)},e.s(["Card",()=>y],946077)}]);
|