pixivflow 2.35.0 → 2.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/download/novelMarkers.d.ts +18 -2
  2. package/dist/package.json +1 -1
  3. package/dist/version.js +1 -1
  4. package/dist/webui/package.json +1 -1
  5. package/dist/webui/routes/handlers/scheduler-handlers.d.ts +17 -0
  6. package/dist/webui/routes/handlers/scheduler-handlers.js +99 -0
  7. package/dist/webui/routes/scheduler.js +2 -0
  8. package/dist/webui/utils/error-codes.d.ts +2 -0
  9. package/dist/webui/utils/error-codes.js +2 -0
  10. package/package.json +1 -1
  11. package/webui-frontend/dist/assets/ActionButton-bmITMO8t.js +2 -0
  12. package/webui-frontend/dist/assets/{CheckCircleOutlined-BS_TxY3k.js → CheckCircleOutlined-DXxMdP08.js} +2 -2
  13. package/webui-frontend/dist/assets/{ClearOutlined-uIvWLBII.js → ClearOutlined-CVkP1OPo.js} +2 -2
  14. package/webui-frontend/dist/assets/{CloseCircleOutlined-B45wvGw1.js → CloseCircleOutlined-DGYEx-rx.js} +2 -2
  15. package/webui-frontend/dist/assets/{Config-UjgCA3Jq.js → Config-BFBZgSvI.js} +3 -3
  16. package/webui-frontend/dist/assets/{Dashboard-hIW1nAN9.js → Dashboard-CHiRV77D.js} +2 -2
  17. package/webui-frontend/dist/assets/{DeleteOutlined-ByQuZQbZ.js → DeleteOutlined-DwsLtl_I.js} +2 -2
  18. package/webui-frontend/dist/assets/Download-BY0RQ0yW.js +2 -0
  19. package/webui-frontend/dist/assets/{Files-DCMyqujj.js → Files-qrEyGaCr.js} +3 -3
  20. package/webui-frontend/dist/assets/{PictureOutlined-CSEKKDH9.js → PictureOutlined-B5UcfS3J.js} +2 -2
  21. package/webui-frontend/dist/assets/{SortDescendingOutlined-BS5Vnvjg.js → SortDescendingOutlined-CIPBhzNI.js} +2 -2
  22. package/webui-frontend/dist/assets/{Table-CvqrzZX2.js → Table-COdSkj3k.js} +7 -7
  23. package/webui-frontend/dist/assets/{ThunderboltOutlined-DhgtXoNM.js → ThunderboltOutlined-BlHGTLpd.js} +2 -2
  24. package/webui-frontend/dist/assets/{UrlDownload-BHF2qmgI.js → UrlDownload-Dxj1MDnw.js} +2 -2
  25. package/webui-frontend/dist/assets/{dateUtils-CEt5gAeU.js → dateUtils-Dh-zVUtr.js} +2 -2
  26. package/webui-frontend/dist/assets/{errorCodeTranslator-Xn_Z9qOh.js → errorCodeTranslator-D5vahyqQ.js} +2 -2
  27. package/webui-frontend/dist/assets/{index-DiwSYMD5.js → index-B84Vd9_M.js} +2 -2
  28. package/webui-frontend/dist/assets/index-BhmvYPFd.js +19 -0
  29. package/webui-frontend/dist/assets/{index-NSEOZ6G5.js → index-Bp5yfy4e.js} +3 -3
  30. package/webui-frontend/dist/assets/{index-HJggy9SZ.js → index-BtXc5-H2.js} +15 -15
  31. package/webui-frontend/dist/assets/{index-eiyXJZci.js → index-BvQQNYa5.js} +2 -2
  32. package/webui-frontend/dist/assets/index-C2qRwckx.js +2 -0
  33. package/webui-frontend/dist/assets/{index-ZRYuscJf.js → index-CFWcxkyB.js} +2 -2
  34. package/webui-frontend/dist/assets/{index-DpfbKoAX.js → index-CZ44NQeD.js} +2 -2
  35. package/webui-frontend/dist/assets/{index-Cg2Wi2pt.js → index-CZXbP5HB.js} +2 -2
  36. package/webui-frontend/dist/assets/{index-6mtxs9yc.js → index-CZlT-55J.js} +2 -2
  37. package/webui-frontend/dist/assets/index-Cfg0ICF_.js +20 -0
  38. package/webui-frontend/dist/assets/{index-D_qUS2GR.js → index-D1KRxkVR.js} +2 -2
  39. package/webui-frontend/dist/assets/{index-D4mbR-Vx.js → index-D8iUeVsP.js} +2 -2
  40. package/webui-frontend/dist/assets/{index-C66Xw4Fs.js → index-DcqvG64t.js} +2 -2
  41. package/webui-frontend/dist/assets/index-eeF42ACG.js +2 -0
  42. package/webui-frontend/dist/assets/{index-mHLzQpzS.js → index-xZubvNRw.js} +6 -6
  43. package/webui-frontend/dist/assets/row-DaMDSIar.js +2 -0
  44. package/webui-frontend/dist/assets/{useAuth-4erTEEjT.js → useAuth-BfM9bg0I.js} +3 -3
  45. package/webui-frontend/dist/assets/{useConfig-BmhXnAiM.js → useConfig-nFBmSW5k.js} +2 -2
  46. package/webui-frontend/dist/assets/{useDownload-DhuPPKqw.js → useDownload-ChmDqdbc.js} +2 -2
  47. package/webui-frontend/dist/assets/{useErrorHandler-Bcb3l7ju.js → useErrorHandler-MJ8OxkB4.js} +2 -2
  48. package/webui-frontend/dist/index.html +1 -1
  49. package/webui-frontend/dist/assets/Download-DdswOGH7.js +0 -2
  50. package/webui-frontend/dist/assets/index-B4zZ11c-.js +0 -20
  51. package/webui-frontend/dist/assets/index-BlXTpFS3.js +0 -2
  52. package/webui-frontend/dist/assets/index-BvgYmQcZ.js +0 -2
  53. package/webui-frontend/dist/assets/index-DV4iHo-9.js +0 -19
  54. package/webui-frontend/dist/assets/row-CQQO4x82.js +0 -2
@@ -1,9 +1,9 @@
1
- import{r as o,v as He,aa as dt,bM as qe,x as Xe,z as $e,A as ie,bN as Se,E as xe,af as Ne,a9 as Q,a5 as mt,n as X,bO as ft,K as gt,ac as pt,J as bt,bP as ht,bQ as yt,a$ as vt,bR as Ct,bS as Ke,bT as J,bU as $t,bV as St,a6 as xt,H as ue,m as Fe,bW as Et,t as wt,b2 as It,bw as Me,bX as Ot,k as Ge,I as Pt,_ as Ue,aD as jt,Y as Qe,bc as Nt,aN as Ft,b7 as Ye,b6 as Mt,b8 as Ze,ao as _t,ag as Je,bY as et,D as Ee,bZ as Rt,bo as kt,b_ as Tt,be as Lt,b$ as At,bu as Wt,ae as Dt,c0 as Vt,c1 as zt,i as Bt,aZ as Ht,p as le,a4 as _e,o as qt,c2 as Ce,aK as Xt,F as Kt,aS as Gt,$ as Ut,U as Qt,u as Yt,bK as Zt,a as Re,Q as ke}from"./index-HJggy9SZ.js";import{a as tt,g as rt,t as he,b as Jt}from"./index-Cg2Wi2pt.js";import{C as nt,R as er}from"./row-CQQO4x82.js";import{u as tr}from"./errorCodeTranslator-Xn_Z9qOh.js";function rr(e){return e==null?null:typeof e=="object"&&!o.isValidElement(e)?e:{title:e}}function de(e){const[t,r]=o.useState(e);return o.useEffect(()=>{const n=setTimeout(()=>{r(e)},e.length?0:10);return()=>{clearTimeout(n)}},[e]),t}const nr=e=>{const{componentCls:t}=e,r=`${t}-show-help`,n=`${t}-show-help-item`;return{[r]:{transition:`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[n]:{overflow:"hidden",transition:`height ${e.motionDurationFast} ${e.motionEaseInOut},
1
+ import{r as o,v as He,aa as dt,bM as qe,x as Xe,z as $e,A as ie,bN as Se,E as xe,af as Ne,a9 as Q,a5 as mt,n as X,bO as ft,K as gt,ac as pt,J as bt,bP as ht,bQ as yt,b7 as vt,bR as Ct,bS as Ke,bT as J,bU as $t,bV as St,a6 as xt,H as ue,m as Fe,bW as Et,t as wt,ba as It,bw as Me,bX as Ot,k as Ge,I as Pt,_ as Ue,aD as jt,Y as Qe,a$ as Nt,aN as Ft,be as Ye,aZ as Mt,bf as Ze,ao as _t,ag as Je,bY as et,D as Ee,bZ as kt,bo as Rt,b_ as Tt,bk as Lt,b$ as At,bu as Wt,ae as Dt,c0 as Vt,c1 as zt,i as Bt,b6 as Ht,p as le,a4 as _e,o as qt,c2 as Ce,aK as Xt,F as Kt,aS as Gt,$ as Ut,U as Qt,u as Yt,bK as Zt,a as ke,Q as Re}from"./index-BtXc5-H2.js";import{a as tt,g as rt,t as he,b as Jt}from"./index-CZXbP5HB.js";import{C as nt,R as er}from"./row-DaMDSIar.js";import{u as tr}from"./errorCodeTranslator-D5vahyqQ.js";function rr(e){return e==null?null:typeof e=="object"&&!o.isValidElement(e)?e:{title:e}}function de(e){const[t,r]=o.useState(e);return o.useEffect(()=>{const n=setTimeout(()=>{r(e)},e.length?0:10);return()=>{clearTimeout(n)}},[e]),t}const nr=e=>{const{componentCls:t}=e,r=`${t}-show-help`,n=`${t}-show-help-item`;return{[r]:{transition:`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[n]:{overflow:"hidden",transition:`height ${e.motionDurationFast} ${e.motionEaseInOut},
2
2
  opacity ${e.motionDurationFast} ${e.motionEaseInOut},
3
3
  transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${n}-appear, &${n}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${n}-leave-active`]:{transform:"translateY(-5px)"}}}}},or=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${ie(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),Te=(e,t)=>{const{formItemCls:r}=e;return{[r]:{[`${r}-label > label`]:{height:t},[`${r}-control-input`]:{minHeight:t}}}},ar=e=>{const{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},$e(e)),or(e)),{[`${t}-text`]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},Te(e,e.controlHeightSM)),"&-large":Object.assign({},Te(e,e.controlHeightLG))})}},ir=e=>{const{formItemCls:t,iconCls:r,rootPrefixCls:n,antCls:a,labelRequiredMarkColor:s,labelColor:i,labelFontSize:l,labelHeight:u,labelColonMarginInlineStart:d,labelColonMarginInlineEnd:m,itemMarginBottom:f}=e;return{[t]:Object.assign(Object.assign({},$e(e)),{marginBottom:f,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
4
4
  &-hidden${a}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight,whiteSpace:"unset","> label":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:u,color:i,fontSize:l,[`> ${r}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:e.marginXXS,color:s,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:d,marginInlineEnd:m},[`&${t}-no-colon::after`]:{content:'"\\a0"'}}},[`${t}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${n}-col-'"]):not([class*="' ${n}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%",[`&:has(> ${a}-switch:only-child, > ${a}-rate:only-child)`]:{display:"flex",alignItems:"center"}}}},[t]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:"auto",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:qe,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},ae=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),sr=e=>{const{antCls:t,formItemCls:r}=e;return{[`${r}-horizontal`]:{[`${r}-label`]:{flexGrow:0},[`${r}-control`]:{flex:"1 1 0",minWidth:0},[`${r}-label[class$='-24'], ${r}-label[class*='-24 ']`]:{[`& + ${r}-control`]:{minWidth:"unset"}},[`${t}-col-24${r}-label,
5
5
  ${t}-col-xl-24${r}-label`]:ae(e)}}},lr=e=>{const{componentCls:t,formItemCls:r,inlineItemMarginBottom:n}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[`${r}-inline`]:{flex:"none",marginInlineEnd:e.margin,marginBottom:n,"&-row":{flexWrap:"nowrap"},[`> ${r}-label,
6
6
  > ${r}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${r}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${r}-has-feedback`]:{display:"inline-block"}}}}},cr=e=>{const{componentCls:t,formItemCls:r,rootPrefixCls:n}=e;return{[`${r} ${r}-label`]:ae(e),[`${t}:not(${t}-inline)`]:{[r]:{flexWrap:"wrap",[`${r}-label, ${r}-control`]:{[`&:not([class*=" ${n}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ur=e=>{const{componentCls:t,formItemCls:r,antCls:n}=e;return{[`${r}-vertical`]:{[`${r}-row`]:{flexDirection:"column"},[`${r}-label > label`]:{height:"auto"},[`${r}-control`]:{width:"100%"},[`${r}-label,
7
7
  ${n}-col-24${r}-label,
8
- ${n}-col-xl-24${r}-label`]:ae(e)},[`@media (max-width: ${ie(e.screenXSMax)})`]:[cr(e),{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-xs-24${r}-label`]:ae(e)}}}],[`@media (max-width: ${ie(e.screenSMMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-sm-24${r}-label`]:ae(e)}}},[`@media (max-width: ${ie(e.screenMDMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-md-24${r}-label`]:ae(e)}}},[`@media (max-width: ${ie(e.screenLGMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-lg-24${r}-label`]:ae(e)}}}}},dr=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),ot=(e,t)=>Xe(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),we=He("Form",(e,{rootPrefixCls:t})=>{const r=ot(e,t);return[ar(r),ir(r),nr(r),sr(r),lr(r),ur(r),dt(r),qe]},dr,{order:-1e3}),Le=[];function ye(e,t,r,n=0){return{key:typeof e=="string"?e:`${t}-${n}`,error:e,errorStatus:r}}const at=({help:e,helpStatus:t,errors:r=Le,warnings:n=Le,className:a,fieldId:s,onVisibleChanged:i})=>{const{prefixCls:l}=o.useContext(Se),u=`${l}-item-explain`,d=xe(l),[m,f,v]=we(l,d),E=o.useMemo(()=>Ne(l),[l]),$=de(r),C=de(n),b=o.useMemo(()=>e!=null?[ye(e,"help",t)]:[].concat(Q($.map((p,c)=>ye(p,"error","error",c))),Q(C.map((p,c)=>ye(p,"warning","warning",c)))),[e,t,$,C]),h=o.useMemo(()=>{const p={};return b.forEach(({key:c})=>{p[c]=(p[c]||0)+1}),b.map((c,S)=>Object.assign(Object.assign({},c),{key:p[c.key]>1?`${c.key}-fallback-${S}`:c.key}))},[b]),y={};return s&&(y.id=`${s}_help`),m(o.createElement(mt,{motionDeadline:E.motionDeadline,motionName:`${l}-show-help`,visible:!!h.length,onVisibleChanged:i},p=>{const{className:c,style:S}=p;return o.createElement("div",Object.assign({},y,{className:X(u,c,v,d,a,f),style:S}),o.createElement(ft,Object.assign({keys:h},Ne(l),{motionName:`${l}-show-help-item`,component:!1}),w=>{const{key:O,error:I,errorStatus:x,className:g,style:N}=w;return o.createElement("div",{key:O,className:X(g,{[`${u}-${x}`]:x}),style:N},I)}))}))};var mr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const fr=(e,t)=>{const r=o.useContext(gt),{getPrefixCls:n,direction:a,requiredMark:s,colon:i,scrollToFirstError:l,className:u,style:d}=pt("form"),{prefixCls:m,className:f,rootClassName:v,size:E,disabled:$=r,form:C,colon:b,labelAlign:h,labelWrap:y,labelCol:p,wrapperCol:c,hideRequiredMark:S,layout:w="horizontal",scrollToFirstError:O,requiredMark:I,onFinishFailed:x,name:g,style:N,feedbackIcons:B,variant:W}=e,M=mr(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),_=bt(E),R=o.useContext(ht),z=o.useMemo(()=>I!==void 0?I:S?!1:s!==void 0?s:!0,[S,I,s]),D=b??i,P=n("form",m),k=xe(P),[F,H,q]=we(P,k),Y=X(P,`${P}-${w}`,{[`${P}-hide-required-mark`]:z===!1,[`${P}-rtl`]:a==="rtl",[`${P}-${_}`]:_},q,k,H,u,f,v),[G]=tt(C),{__INTERNAL__:K}=G;K.name=g;const j=o.useMemo(()=>({name:g,labelAlign:h,labelCol:p,labelWrap:y,wrapperCol:c,layout:w,colon:D,requiredMark:z,itemRef:K.itemRef,form:G,feedbackIcons:B}),[g,h,p,c,w,D,z,G,B]),A=o.useRef(null);o.useImperativeHandle(t,()=>{var L;return Object.assign(Object.assign({},G),{nativeElement:(L=A.current)===null||L===void 0?void 0:L.nativeElement})});const T=(L,Z)=>{if(L){let ee={block:"nearest"};typeof L=="object"&&(ee=Object.assign(Object.assign({},ee),L)),G.scrollToField(Z,ee)}},U=L=>{if(x?.(L),L.errorFields.length){const Z=L.errorFields[0].name;if(O!==void 0){T(O,Z);return}l!==void 0&&T(l,Z)}};return F(o.createElement(yt.Provider,{value:W},o.createElement(vt,{disabled:$},o.createElement(Ct.Provider,{value:_},o.createElement(Ke,{validateMessages:R},o.createElement(J.Provider,{value:j},o.createElement($t,{status:!0},o.createElement(St,Object.assign({id:g},M,{name:g,onFinishFailed:U,form:G,ref:A,style:Object.assign(Object.assign({},d),N),className:Y})))))))))},gr=o.forwardRef(fr);function pr(e){if(typeof e=="function")return e;const t=xt(e);return t.length<=1?t[0]:t}const it=()=>{const{status:e,errors:t=[],warnings:r=[]}=o.useContext(ue);return{status:e,errors:t,warnings:r}};it.Context=ue;function br(e){const[t,r]=o.useState(e),n=o.useRef(null),a=o.useRef([]),s=o.useRef(!1);o.useEffect(()=>(s.current=!1,()=>{s.current=!0,Fe.cancel(n.current),n.current=null}),[]);function i(l){s.current||(n.current===null&&(a.current=[],n.current=Fe(()=>{n.current=null,r(u=>{let d=u;return a.current.forEach(m=>{d=m(d)}),d})})),a.current.push(l))}return[t,i]}function hr(){const{itemRef:e}=o.useContext(J),t=o.useRef({});function r(n,a){const s=a&&typeof a=="object"&&Et(a),i=n.join("_");return(t.current.name!==i||t.current.originRef!==s)&&(t.current.name=i,t.current.originRef=s,t.current.ref=wt(e(n),s)),t.current.ref}return r}const yr=e=>{const{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:"flex"}}}},vr=It(["Form","item-item"],(e,{rootPrefixCls:t})=>{const r=ot(e,t);return yr(r)});var Cr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const $r=24,Sr=e=>{const{prefixCls:t,status:r,labelCol:n,wrapperCol:a,children:s,errors:i,warnings:l,_internalItemRender:u,extra:d,help:m,fieldId:f,marginBottom:v,onErrorVisibleChanged:E,label:$}=e,C=`${t}-item`,b=o.useContext(J),h=o.useMemo(()=>{let M=Object.assign({},a||b.wrapperCol||{});return $===null&&!n&&!a&&b.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(R=>{const z=R?[R]:[],D=Me(b.labelCol,z),P=typeof D=="object"?D:{},k=Me(M,z),F=typeof k=="object"?k:{};"span"in P&&!("offset"in F)&&P.span<$r&&(M=Ot(M,[].concat(z,["offset"]),P.span))}),M},[a,b.wrapperCol,b.labelCol,$,n]),y=X(`${C}-control`,h.className),p=o.useMemo(()=>{const{labelCol:M,wrapperCol:_}=b;return Cr(b,["labelCol","wrapperCol"])},[b]),c=o.useRef(null),[S,w]=o.useState(0);Ge(()=>{d&&c.current?w(c.current.clientHeight):w(0)},[d]);const O=o.createElement("div",{className:`${C}-control-input`},o.createElement("div",{className:`${C}-control-input-content`},s)),I=o.useMemo(()=>({prefixCls:t,status:r}),[t,r]),x=v!==null||i.length||l.length?o.createElement(Se.Provider,{value:I},o.createElement(at,{fieldId:f,errors:i,warnings:l,help:m,helpStatus:r,className:`${C}-explain-connected`,onVisibleChanged:E})):null,g={};f&&(g.id=`${f}_extra`);const N=d?o.createElement("div",Object.assign({},g,{className:`${C}-extra`,ref:c}),d):null,B=x||N?o.createElement("div",{className:`${C}-additional`,style:v?{minHeight:v+S}:{}},x,N):null,W=u&&u.mark==="pro_table_render"&&u.render?u.render(e,{input:O,errorList:x,extra:N}):o.createElement(o.Fragment,null,O,B);return o.createElement(J.Provider,{value:p},o.createElement(nt,Object.assign({},h,{className:y}),W),o.createElement(vr,{prefixCls:t}))};var xr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},Er=function(t,r){return o.createElement(Pt,Ue({},t,{ref:r,icon:xr}))},wr=o.forwardRef(Er),Ir=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const Or=({prefixCls:e,label:t,htmlFor:r,labelCol:n,labelAlign:a,colon:s,required:i,requiredMark:l,tooltip:u,vertical:d})=>{var m;const[f]=jt("Form"),{labelAlign:v,labelCol:E,labelWrap:$,colon:C}=o.useContext(J);if(!t)return null;const b=n||E||{},h=a||v,y=`${e}-item-label`,p=X(y,h==="left"&&`${y}-left`,b.className,{[`${y}-wrap`]:!!$});let c=t;const S=s===!0||C!==!1&&s!==!1;S&&!d&&typeof t=="string"&&t.trim()&&(c=t.replace(/[:|:]\s*$/,""));const O=rr(u);if(O){const{icon:W=o.createElement(wr,null)}=O,M=Ir(O,["icon"]),_=o.createElement(Qe,Object.assign({},M),o.cloneElement(W,{className:`${e}-item-tooltip`,title:"",onClick:R=>{R.preventDefault()},tabIndex:null}));c=o.createElement(o.Fragment,null,c,_)}const I=l==="optional",x=typeof l=="function",g=l===!1;x?c=l(c,{required:!!i}):I&&!i&&(c=o.createElement(o.Fragment,null,c,o.createElement("span",{className:`${e}-item-optional`,title:""},f?.optional||((m=Nt.Form)===null||m===void 0?void 0:m.optional))));let N;g?N="hidden":(I||x)&&(N="optional");const B=X({[`${e}-item-required`]:i,[`${e}-item-required-mark-${N}`]:N,[`${e}-item-no-colon`]:!S});return o.createElement(nt,Object.assign({},b,{className:p}),o.createElement("label",{htmlFor:r,className:B,title:typeof t=="string"?t:""},c))},Pr={success:Ze,warning:Mt,error:Ye,validating:Ft};function st({children:e,errors:t,warnings:r,hasFeedback:n,validateStatus:a,prefixCls:s,meta:i,noStyle:l,name:u}){const d=`${s}-item`,{feedbackIcons:m}=o.useContext(J),f=rt(t,r,i,null,!!n,a),{isFormItemInput:v,status:E,hasFeedback:$,feedbackIcon:C,name:b}=o.useContext(ue),h=o.useMemo(()=>{var y;let p;if(n){const S=n!==!0&&n.icons||m,w=f&&((y=S?.({status:f,errors:t,warnings:r}))===null||y===void 0?void 0:y[f]),O=f?Pr[f]:null;p=w!==!1&&O?o.createElement("span",{className:X(`${d}-feedback-icon`,`${d}-feedback-icon-${f}`)},w||o.createElement(O,null)):null}const c={status:f||"",errors:t,warnings:r,hasFeedback:!!n,feedbackIcon:p,isFormItemInput:!0,name:u};return l&&(c.status=(f??E)||"",c.isFormItemInput=v,c.hasFeedback=!!(n??$),c.feedbackIcon=n!==void 0?c.feedbackIcon:C,c.name=u??b),c},[f,n,l,v,E]);return o.createElement(ue.Provider,{value:h},e)}var jr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};function Nr(e){const{prefixCls:t,className:r,rootClassName:n,style:a,help:s,errors:i,warnings:l,validateStatus:u,meta:d,hasFeedback:m,hidden:f,children:v,fieldId:E,required:$,isRequired:C,onSubItemMetaChange:b,layout:h,name:y}=e,p=jr(e,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout","name"]),c=`${t}-item`,{requiredMark:S,layout:w}=o.useContext(J),O=h||w,I=O==="vertical",x=o.useRef(null),g=de(i),N=de(l),B=s!=null,W=!!(B||i.length||l.length),M=!!x.current&&_t(x.current),[_,R]=o.useState(null);Ge(()=>{if(W&&x.current){const F=getComputedStyle(x.current);R(Number.parseInt(F.marginBottom,10))}},[W,M]);const z=F=>{F||R(null)},P=((F=!1)=>{const H=F?g:d.errors,q=F?N:d.warnings;return rt(H,q,d,"",!!m,u)})(),k=X(c,r,n,{[`${c}-with-help`]:B||g.length||N.length,[`${c}-has-feedback`]:P&&m,[`${c}-has-success`]:P==="success",[`${c}-has-warning`]:P==="warning",[`${c}-has-error`]:P==="error",[`${c}-is-validating`]:P==="validating",[`${c}-hidden`]:f,[`${c}-${O}`]:O});return o.createElement("div",{className:k,style:a,ref:x},o.createElement(er,Object.assign({className:`${c}-row`},Je(p,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),o.createElement(Or,Object.assign({htmlFor:E},e,{requiredMark:S,required:$??C,prefixCls:t,vertical:I})),o.createElement(Sr,Object.assign({},e,d,{errors:g,warnings:N,prefixCls:t,status:P,help:s,marginBottom:_,onErrorVisibleChanged:z}),o.createElement(et.Provider,{value:b},o.createElement(st,{prefixCls:t,meta:d,errors:d.errors,warnings:d.warnings,hasFeedback:m,validateStatus:P,name:y},v)))),!!_&&o.createElement("div",{className:`${c}-margin-offset`,style:{marginBottom:-_}}))}const Fr="__SPLIT__";function Mr(e,t){const r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(a=>{const s=e[a],i=t[a];return s===i||typeof s=="function"||typeof i=="function"})}const _r=o.memo(({children:e})=>e,(e,t)=>Mr(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((r,n)=>r===t.childProps[n]));function Ae(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Rr(e){const{name:t,noStyle:r,className:n,dependencies:a,prefixCls:s,shouldUpdate:i,rules:l,children:u,required:d,label:m,messageVariables:f,trigger:v="onChange",validateTrigger:E,hidden:$,help:C,layout:b}=e,{getPrefixCls:h}=o.useContext(Ee),{name:y}=o.useContext(J),p=pr(u),c=typeof p=="function",S=o.useContext(et),{validateTrigger:w}=o.useContext(Rt),O=E!==void 0?E:w,I=t!=null,x=h("form",s),g=xe(x),[N,B,W]=we(x,g);kt();const M=o.useContext(Tt),_=o.useRef(null),[R,z]=br({}),[D,P]=Lt(()=>Ae()),k=j=>{const A=M?.getKey(j.name);if(P(j.destroy?Ae():j,!0),r&&C!==!1&&S){let T=j.name;if(j.destroy)T=_.current||T;else if(A!==void 0){const[U,L]=A;T=[U].concat(Q(L)),_.current=T}S(j,T)}},F=(j,A)=>{z(T=>{const U=Object.assign({},T),Z=[].concat(Q(j.name.slice(0,-1)),Q(A)).join(Fr);return j.destroy?delete U[Z]:U[Z]=j,U})},[H,q]=o.useMemo(()=>{const j=Q(D.errors),A=Q(D.warnings);return Object.values(R).forEach(T=>{j.push.apply(j,Q(T.errors||[])),A.push.apply(A,Q(T.warnings||[]))}),[j,A]},[R,D.errors,D.warnings]),Y=hr();function G(j,A,T){return r&&!$?o.createElement(st,{prefixCls:x,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:D,errors:H,warnings:q,noStyle:!0,name:t},j):o.createElement(Nr,Object.assign({key:"row"},e,{className:X(n,W,g,B),prefixCls:x,fieldId:A,isRequired:T,errors:H,warnings:q,meta:D,onSubItemMetaChange:F,layout:b,name:t}),j)}if(!I&&!c&&!a)return N(G(p));let K={};return typeof m=="string"?K.label=m:t&&(K.label=String(t)),f&&(K=Object.assign(Object.assign({},K),f)),N(o.createElement(At,Object.assign({},e,{messageVariables:K,trigger:v,validateTrigger:O,onMetaChange:k}),(j,A,T)=>{const U=he(t).length&&A?A.name:[],L=Jt(U,y),Z=d!==void 0?d:!!l?.some(V=>{if(V&&typeof V=="object"&&V.required&&!V.warningOnly)return!0;if(typeof V=="function"){const ne=V(T);return ne?.required&&!ne?.warningOnly}return!1}),ee=Object.assign({},j);let se=null;if(Array.isArray(p)&&I)se=p;else if(!(c&&(!(i||a)||I))){if(!(a&&!c&&!I))if(o.isValidElement(p)){const V=Object.assign(Object.assign({},p.props),ee);if(V.id||(V.id=L),C||H.length>0||q.length>0||e.extra){const oe=[];(C||H.length>0)&&oe.push(`${L}_help`),e.extra&&oe.push(`${L}_extra`),V["aria-describedby"]=oe.join(" ")}H.length>0&&(V["aria-invalid"]="true"),Z&&(V["aria-required"]="true"),Wt(p)&&(V.ref=Y(U,p)),new Set([].concat(Q(he(v)),Q(he(O)))).forEach(oe=>{V[oe]=(...Ie)=>{var Oe,Pe,pe,je,be;(pe=ee[oe])===null||pe===void 0||(Oe=pe).call.apply(Oe,[ee].concat(Ie)),(be=(je=p.props)[oe])===null||be===void 0||(Pe=be).call.apply(Pe,[je].concat(Ie))}});const ut=[V["aria-required"],V["aria-invalid"],V["aria-describedby"]];se=o.createElement(_r,{control:ee,update:p,childProps:ut},Dt(p,V))}else c&&(i||a)&&!I?se=p(T):se=p}return G(se,L,Z)}))}const lt=Rr;lt.useStatus=it;var kr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const Tr=e=>{var{prefixCls:t,children:r}=e,n=kr(e,["prefixCls","children"]);const{getPrefixCls:a}=o.useContext(Ee),s=a("form",t),i=o.useMemo(()=>({prefixCls:s,status:"error"}),[s]);return o.createElement(Vt,Object.assign({},n),(l,u,d)=>o.createElement(Se.Provider,{value:i},r(l.map(m=>Object.assign(Object.assign({},m),{fieldKey:m.key})),u,{errors:d.errors,warnings:d.warnings})))};function Lr(){const{form:e}=o.useContext(J);return e}const re=gr;re.Item=lt;re.List=Tr;re.ErrorList=at;re.useForm=tt;re.useFormInstance=Lr;re.useWatch=zt;re.Provider=Ke;re.create=()=>{};var Ar={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Wr=function(){var t=o.useRef([]),r=o.useRef(null);return o.useEffect(function(){var n=Date.now(),a=!1;t.current.forEach(function(s){if(s){a=!0;var i=s.style;i.transitionDuration=".3s, .3s, .3s, .06s",r.current&&n-r.current<100&&(i.transitionDuration="0s, 0s")}}),a&&(r.current=Date.now())}),t.current},We=0,Dr=Ht();function Vr(){var e;return Dr?(e=We,We+=1):e="TEST_OR_SSR",e}const zr=(function(e){var t=o.useState(),r=Bt(t,2),n=r[0],a=r[1];return o.useEffect(function(){a("rc_progress_".concat(Vr()))},[]),e||n});var De=function(t){var r=t.bg,n=t.children;return o.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function Ve(e,t){return Object.keys(e).map(function(r){var n=parseFloat(r),a="".concat(Math.floor(n*t),"%");return"".concat(e[r]," ").concat(a)})}var Br=o.forwardRef(function(e,t){var r=e.prefixCls,n=e.color,a=e.gradientId,s=e.radius,i=e.style,l=e.ptg,u=e.strokeLinecap,d=e.strokeWidth,m=e.size,f=e.gapDegree,v=n&&le(n)==="object",E=v?"#FFF":void 0,$=m/2,C=o.createElement("circle",{className:"".concat(r,"-circle-path"),r:s,cx:$,cy:$,stroke:E,strokeLinecap:u,strokeWidth:d,opacity:l===0?0:1,style:i,ref:t});if(!v)return C;var b="".concat(a,"-conic"),h=f?"".concat(180+f/2,"deg"):"0deg",y=Ve(n,(360-f)/360),p=Ve(n,1),c="conic-gradient(from ".concat(h,", ").concat(y.join(", "),")"),S="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(p.join(", "),")");return o.createElement(o.Fragment,null,o.createElement("mask",{id:b},C),o.createElement("foreignObject",{x:0,y:0,width:m,height:m,mask:"url(#".concat(b,")")},o.createElement(De,{bg:S},o.createElement(De,{bg:c}))))}),ce=100,ve=function(t,r,n,a,s,i,l,u,d,m){var f=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,v=n/100*360*((360-i)/360),E=i===0?0:{bottom:0,top:180,left:90,right:-90}[l],$=(100-a)/100*r;d==="round"&&a!==100&&($+=m/2,$>=r&&($=r-.01));var C=ce/2;return{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(r,"px ").concat(t),strokeDashoffset:$+f,transform:"rotate(".concat(s+v+E,"deg)"),transformOrigin:"".concat(C,"px ").concat(C,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Hr=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function ze(e){var t=e??[];return Array.isArray(t)?t:[t]}var qr=function(t){var r=_e(_e({},Ar),t),n=r.id,a=r.prefixCls,s=r.steps,i=r.strokeWidth,l=r.trailWidth,u=r.gapDegree,d=u===void 0?0:u,m=r.gapPosition,f=r.trailColor,v=r.strokeLinecap,E=r.style,$=r.className,C=r.strokeColor,b=r.percent,h=qt(r,Hr),y=ce/2,p=zr(n),c="".concat(p,"-gradient"),S=y-i/2,w=Math.PI*2*S,O=d>0?90+d/2:-90,I=w*((360-d)/360),x=le(s)==="object"?s:{count:s,gap:2},g=x.count,N=x.gap,B=ze(b),W=ze(C),M=W.find(function(F){return F&&le(F)==="object"}),_=M&&le(M)==="object",R=_?"butt":v,z=ve(w,I,0,100,O,d,m,f,R,i),D=Wr(),P=function(){var H=0;return B.map(function(q,Y){var G=W[Y]||W[W.length-1],K=ve(w,I,H,q,O,d,m,G,R,i);return H+=q,o.createElement(Br,{key:Y,color:G,ptg:q,radius:S,prefixCls:a,gradientId:c,style:K,strokeLinecap:R,strokeWidth:i,gapDegree:d,ref:function(A){D[Y]=A},size:ce})}).reverse()},k=function(){var H=Math.round(g*(B[0]/100)),q=100/g,Y=0;return new Array(g).fill(null).map(function(G,K){var j=K<=H-1?W[0]:f,A=j&&le(j)==="object"?"url(#".concat(c,")"):void 0,T=ve(w,I,Y,q,O,d,m,j,"butt",i,N);return Y+=(I-T.strokeDashoffset+N)*100/I,o.createElement("circle",{key:K,className:"".concat(a,"-circle-path"),r:S,cx:y,cy:y,stroke:A,strokeWidth:i,opacity:1,style:T,ref:function(L){D[K]=L}})})};return o.createElement("svg",Ue({className:X("".concat(a,"-circle"),$),viewBox:"0 0 ".concat(ce," ").concat(ce),style:E,id:n,role:"presentation"},h),!g&&o.createElement("circle",{className:"".concat(a,"-circle-trail"),r:S,cx:y,cy:y,stroke:f,strokeLinecap:R,strokeWidth:l||i,style:z}),g?k():P())};function te(e){return!e||e<0?0:e>100?100:e}function me({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}const Xr=({percent:e,success:t,successPercent:r})=>{const n=te(me({success:t,successPercent:r}));return[n,te(te(e)-n)]},Kr=({success:e={},strokeColor:t})=>{const{strokeColor:r}=e;return[r||Ce.green,t||null]},ge=(e,t,r)=>{var n,a,s,i;let l=-1,u=-1;if(t==="step"){const d=r.steps,m=r.strokeWidth;typeof e=="string"||typeof e>"u"?(l=e==="small"?2:14,u=m??8):typeof e=="number"?[l,u]=[e,e]:[l=14,u=8]=Array.isArray(e)?e:[e.width,e.height],l*=d}else if(t==="line"){const d=r?.strokeWidth;typeof e=="string"||typeof e>"u"?u=d||(e==="small"?6:8):typeof e=="number"?[l,u]=[e,e]:[l=-1,u=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[l,u]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[l,u]=[e,e]:Array.isArray(e)&&(l=(a=(n=e[0])!==null&&n!==void 0?n:e[1])!==null&&a!==void 0?a:120,u=(i=(s=e[0])!==null&&s!==void 0?s:e[1])!==null&&i!==void 0?i:120));return[l,u]},Gr=3,Ur=e=>Gr/e*100,Qr=e=>{const{prefixCls:t,trailColor:r=null,strokeLinecap:n="round",gapPosition:a,gapDegree:s,width:i=120,type:l,children:u,success:d,size:m=i,steps:f}=e,[v,E]=ge(m,"circle");let{strokeWidth:$}=e;$===void 0&&($=Math.max(Ur(v),6));const C={width:v,height:E,fontSize:v*.15+6},b=o.useMemo(()=>{if(s||s===0)return s;if(l==="dashboard")return 75},[s,l]),h=Xr(e),y=a||l==="dashboard"&&"bottom"||void 0,p=Object.prototype.toString.call(e.strokeColor)==="[object Object]",c=Kr({success:d,strokeColor:e.strokeColor}),S=X(`${t}-inner`,{[`${t}-circle-gradient`]:p}),w=o.createElement(qr,{steps:f,percent:f?h[1]:h,strokeWidth:$,trailWidth:$,strokeColor:f?c[1]:c,strokeLinecap:n,trailColor:r,prefixCls:t,gapDegree:b,gapPosition:y}),O=v<=20,I=o.createElement("div",{className:S,style:C},w,!O&&u);return O?o.createElement(Qe,{title:u},I):I},fe="--progress-line-stroke-color",ct="--progress-percent",Be=e=>{const t=e?"100%":"-100%";return new Xt(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Yr=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},$e(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${fe})`]},height:"100%",width:`calc(1 / var(${ct}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${ie(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:Be(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:Be(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Zr=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{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}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Jr=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},en=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}},tn=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),rn=He("Progress",e=>{const t=e.calc(e.marginXXS).div(2).equal(),r=Xe(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Yr(r),Zr(r),Jr(r),en(r)]},tn);var nn=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const on=e=>{let t=[];return Object.keys(e).forEach(r=>{const n=Number.parseFloat(r.replace(/%/g,""));Number.isNaN(n)||t.push({key:n,value:e[r]})}),t=t.sort((r,n)=>r.key-n.key),t.map(({key:r,value:n})=>`${n} ${r}%`).join(", ")},an=(e,t)=>{const{from:r=Ce.blue,to:n=Ce.blue,direction:a=t==="rtl"?"to left":"to right"}=e,s=nn(e,["from","to","direction"]);if(Object.keys(s).length!==0){const l=on(s),u=`linear-gradient(${a}, ${l})`;return{background:u,[fe]:u}}const i=`linear-gradient(${a}, ${r}, ${n})`;return{background:i,[fe]:i}},sn=e=>{const{prefixCls:t,direction:r,percent:n,size:a,strokeWidth:s,strokeColor:i,strokeLinecap:l="round",children:u,trailColor:d=null,percentPosition:m,success:f}=e,{align:v,type:E}=m,$=i&&typeof i!="string"?an(i,r):{[fe]:i,background:i},C=l==="square"||l==="butt"?0:void 0,b=a??[-1,s||(a==="small"?6:8)],[h,y]=ge(b,"line",{strokeWidth:s}),p={backgroundColor:d||void 0,borderRadius:C},c=Object.assign(Object.assign({width:`${te(n)}%`,height:y,borderRadius:C},$),{[ct]:te(n)/100}),S=me(e),w={width:`${te(S)}%`,height:y,borderRadius:C,backgroundColor:f?.strokeColor},O={width:h<0?"100%":h},I=o.createElement("div",{className:`${t}-inner`,style:p},o.createElement("div",{className:X(`${t}-bg`,`${t}-bg-${E}`),style:c},E==="inner"&&u),S!==void 0&&o.createElement("div",{className:`${t}-success-bg`,style:w})),x=E==="outer"&&v==="start",g=E==="outer"&&v==="end";return E==="outer"&&v==="center"?o.createElement("div",{className:`${t}-layout-bottom`},I,u):o.createElement("div",{className:`${t}-outer`,style:O},x&&u,I,g&&u)},ln=e=>{const{size:t,steps:r,rounding:n=Math.round,percent:a=0,strokeWidth:s=8,strokeColor:i,trailColor:l=null,prefixCls:u,children:d}=e,m=n(r*(a/100)),v=t??[t==="small"?2:14,s],[E,$]=ge(v,"step",{steps:r,strokeWidth:s}),C=E/r,b=Array.from({length:r});for(let h=0;h<r;h++){const y=Array.isArray(i)?i[h]:i;b[h]=o.createElement("div",{key:h,className:X(`${u}-steps-item`,{[`${u}-steps-item-active`]:h<=m-1}),style:{backgroundColor:h<=m-1?y:l,width:C,height:$}})}return o.createElement("div",{className:`${u}-steps-outer`},b,d)};var cn=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const un=["normal","exception","active","success"],pn=o.forwardRef((e,t)=>{const{prefixCls:r,className:n,rootClassName:a,steps:s,strokeColor:i,percent:l=0,size:u="default",showInfo:d=!0,type:m="line",status:f,format:v,style:E,percentPosition:$={}}=e,C=cn(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:b="end",type:h="outer"}=$,y=Array.isArray(i)?i[0]:i,p=typeof i=="string"||Array.isArray(i)?i:void 0,c=o.useMemo(()=>{if(y){const P=typeof y=="string"?y:Object.values(y)[0];return new Kt(P).isLight()}return!1},[i]),S=o.useMemo(()=>{var P,k;const F=me(e);return Number.parseInt(F!==void 0?(P=F??0)===null||P===void 0?void 0:P.toString():(k=l??0)===null||k===void 0?void 0:k.toString(),10)},[l,e.success,e.successPercent]),w=o.useMemo(()=>!un.includes(f)&&S>=100?"success":f||"normal",[f,S]),{getPrefixCls:O,direction:I,progress:x}=o.useContext(Ee),g=O("progress",r),[N,B,W]=rn(g),M=m==="line",_=M&&!s,R=o.useMemo(()=>{if(!d)return null;const P=me(e);let k;const F=v||(q=>`${q}%`),H=M&&c&&h==="inner";return h==="inner"||v||w!=="exception"&&w!=="success"?k=F(te(l),te(P)):w==="exception"?k=M?o.createElement(Ye,null):o.createElement(Gt,null):w==="success"&&(k=M?o.createElement(Ze,null):o.createElement(Ut,null)),o.createElement("span",{className:X(`${g}-text`,{[`${g}-text-bright`]:H,[`${g}-text-${b}`]:_,[`${g}-text-${h}`]:_}),title:typeof k=="string"?k:void 0},k)},[d,l,S,w,m,g,v]);let z;m==="line"?z=s?o.createElement(ln,Object.assign({},e,{strokeColor:p,prefixCls:g,steps:typeof s=="object"?s.count:s}),R):o.createElement(sn,Object.assign({},e,{strokeColor:y,prefixCls:g,direction:I,percentPosition:{align:b,type:h}}),R):(m==="circle"||m==="dashboard")&&(z=o.createElement(Qr,Object.assign({},e,{strokeColor:y,prefixCls:g,progressStatus:w}),R));const D=X(g,`${g}-status-${w}`,{[`${g}-${m==="dashboard"&&"circle"||m}`]:m!=="line",[`${g}-inline-circle`]:m==="circle"&&ge(u,"circle")[0]<=20,[`${g}-line`]:_,[`${g}-line-align-${b}`]:_,[`${g}-line-position-${h}`]:_,[`${g}-steps`]:s,[`${g}-show-info`]:d,[`${g}-${u}`]:typeof u=="string",[`${g}-rtl`]:I==="rtl"},x?.className,n,a,B,W);return N(o.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},x?.style),E),className:D,role:"progressbar","aria-valuenow":S,"aria-valuemin":0,"aria-valuemax":100},Je(C,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),z))});function bn(){const e=Qt(),[t,r]=o.useState(!1),{data:n,isLoading:a,isError:s}=Yt({queryKey:ke.AUTH_STATUS,queryFn:()=>Re.getAuthStatus(),retry:!1,staleTime:0,refetchOnMount:!0,refetchOnWindowFocus:!1}),i=!s&&Zt(n),l=tr({mutationFn:d=>Re.loginWithToken(d),onSuccess:()=>{e.invalidateQueries({queryKey:ke.AUTH_STATUS}),r(!1)},onError:()=>{r(!1)}});return{authenticated:i,isLoading:a,isError:s,data:n,loginWithTokenAsync:async d=>{r(!0);try{await l.mutateAsync(d)}finally{r(!1)}},isLoggingInWithToken:t}}export{re as F,pn as P,wr as R,bn as u};
9
- //# sourceMappingURL=useAuth-4erTEEjT.js.map
8
+ ${n}-col-xl-24${r}-label`]:ae(e)},[`@media (max-width: ${ie(e.screenXSMax)})`]:[cr(e),{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-xs-24${r}-label`]:ae(e)}}}],[`@media (max-width: ${ie(e.screenSMMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-sm-24${r}-label`]:ae(e)}}},[`@media (max-width: ${ie(e.screenMDMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-md-24${r}-label`]:ae(e)}}},[`@media (max-width: ${ie(e.screenLGMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-lg-24${r}-label`]:ae(e)}}}}},dr=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),ot=(e,t)=>Xe(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),we=He("Form",(e,{rootPrefixCls:t})=>{const r=ot(e,t);return[ar(r),ir(r),nr(r),sr(r),lr(r),ur(r),dt(r),qe]},dr,{order:-1e3}),Le=[];function ye(e,t,r,n=0){return{key:typeof e=="string"?e:`${t}-${n}`,error:e,errorStatus:r}}const at=({help:e,helpStatus:t,errors:r=Le,warnings:n=Le,className:a,fieldId:s,onVisibleChanged:i})=>{const{prefixCls:l}=o.useContext(Se),u=`${l}-item-explain`,d=xe(l),[m,f,v]=we(l,d),E=o.useMemo(()=>Ne(l),[l]),$=de(r),C=de(n),b=o.useMemo(()=>e!=null?[ye(e,"help",t)]:[].concat(Q($.map((p,c)=>ye(p,"error","error",c))),Q(C.map((p,c)=>ye(p,"warning","warning",c)))),[e,t,$,C]),h=o.useMemo(()=>{const p={};return b.forEach(({key:c})=>{p[c]=(p[c]||0)+1}),b.map((c,S)=>Object.assign(Object.assign({},c),{key:p[c.key]>1?`${c.key}-fallback-${S}`:c.key}))},[b]),y={};return s&&(y.id=`${s}_help`),m(o.createElement(mt,{motionDeadline:E.motionDeadline,motionName:`${l}-show-help`,visible:!!h.length,onVisibleChanged:i},p=>{const{className:c,style:S}=p;return o.createElement("div",Object.assign({},y,{className:X(u,c,v,d,a,f),style:S}),o.createElement(ft,Object.assign({keys:h},Ne(l),{motionName:`${l}-show-help-item`,component:!1}),w=>{const{key:O,error:I,errorStatus:x,className:g,style:N}=w;return o.createElement("div",{key:O,className:X(g,{[`${u}-${x}`]:x}),style:N},I)}))}))};var mr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const fr=(e,t)=>{const r=o.useContext(gt),{getPrefixCls:n,direction:a,requiredMark:s,colon:i,scrollToFirstError:l,className:u,style:d}=pt("form"),{prefixCls:m,className:f,rootClassName:v,size:E,disabled:$=r,form:C,colon:b,labelAlign:h,labelWrap:y,labelCol:p,wrapperCol:c,hideRequiredMark:S,layout:w="horizontal",scrollToFirstError:O,requiredMark:I,onFinishFailed:x,name:g,style:N,feedbackIcons:B,variant:W}=e,M=mr(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),_=bt(E),k=o.useContext(ht),z=o.useMemo(()=>I!==void 0?I:S?!1:s!==void 0?s:!0,[S,I,s]),D=b??i,P=n("form",m),R=xe(P),[F,H,q]=we(P,R),Y=X(P,`${P}-${w}`,{[`${P}-hide-required-mark`]:z===!1,[`${P}-rtl`]:a==="rtl",[`${P}-${_}`]:_},q,R,H,u,f,v),[G]=tt(C),{__INTERNAL__:K}=G;K.name=g;const j=o.useMemo(()=>({name:g,labelAlign:h,labelCol:p,labelWrap:y,wrapperCol:c,layout:w,colon:D,requiredMark:z,itemRef:K.itemRef,form:G,feedbackIcons:B}),[g,h,p,c,w,D,z,G,B]),A=o.useRef(null);o.useImperativeHandle(t,()=>{var L;return Object.assign(Object.assign({},G),{nativeElement:(L=A.current)===null||L===void 0?void 0:L.nativeElement})});const T=(L,Z)=>{if(L){let ee={block:"nearest"};typeof L=="object"&&(ee=Object.assign(Object.assign({},ee),L)),G.scrollToField(Z,ee)}},U=L=>{if(x?.(L),L.errorFields.length){const Z=L.errorFields[0].name;if(O!==void 0){T(O,Z);return}l!==void 0&&T(l,Z)}};return F(o.createElement(yt.Provider,{value:W},o.createElement(vt,{disabled:$},o.createElement(Ct.Provider,{value:_},o.createElement(Ke,{validateMessages:k},o.createElement(J.Provider,{value:j},o.createElement($t,{status:!0},o.createElement(St,Object.assign({id:g},M,{name:g,onFinishFailed:U,form:G,ref:A,style:Object.assign(Object.assign({},d),N),className:Y})))))))))},gr=o.forwardRef(fr);function pr(e){if(typeof e=="function")return e;const t=xt(e);return t.length<=1?t[0]:t}const it=()=>{const{status:e,errors:t=[],warnings:r=[]}=o.useContext(ue);return{status:e,errors:t,warnings:r}};it.Context=ue;function br(e){const[t,r]=o.useState(e),n=o.useRef(null),a=o.useRef([]),s=o.useRef(!1);o.useEffect(()=>(s.current=!1,()=>{s.current=!0,Fe.cancel(n.current),n.current=null}),[]);function i(l){s.current||(n.current===null&&(a.current=[],n.current=Fe(()=>{n.current=null,r(u=>{let d=u;return a.current.forEach(m=>{d=m(d)}),d})})),a.current.push(l))}return[t,i]}function hr(){const{itemRef:e}=o.useContext(J),t=o.useRef({});function r(n,a){const s=a&&typeof a=="object"&&Et(a),i=n.join("_");return(t.current.name!==i||t.current.originRef!==s)&&(t.current.name=i,t.current.originRef=s,t.current.ref=wt(e(n),s)),t.current.ref}return r}const yr=e=>{const{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:"flex"}}}},vr=It(["Form","item-item"],(e,{rootPrefixCls:t})=>{const r=ot(e,t);return yr(r)});var Cr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const $r=24,Sr=e=>{const{prefixCls:t,status:r,labelCol:n,wrapperCol:a,children:s,errors:i,warnings:l,_internalItemRender:u,extra:d,help:m,fieldId:f,marginBottom:v,onErrorVisibleChanged:E,label:$}=e,C=`${t}-item`,b=o.useContext(J),h=o.useMemo(()=>{let M=Object.assign({},a||b.wrapperCol||{});return $===null&&!n&&!a&&b.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(k=>{const z=k?[k]:[],D=Me(b.labelCol,z),P=typeof D=="object"?D:{},R=Me(M,z),F=typeof R=="object"?R:{};"span"in P&&!("offset"in F)&&P.span<$r&&(M=Ot(M,[].concat(z,["offset"]),P.span))}),M},[a,b.wrapperCol,b.labelCol,$,n]),y=X(`${C}-control`,h.className),p=o.useMemo(()=>{const{labelCol:M,wrapperCol:_}=b;return Cr(b,["labelCol","wrapperCol"])},[b]),c=o.useRef(null),[S,w]=o.useState(0);Ge(()=>{d&&c.current?w(c.current.clientHeight):w(0)},[d]);const O=o.createElement("div",{className:`${C}-control-input`},o.createElement("div",{className:`${C}-control-input-content`},s)),I=o.useMemo(()=>({prefixCls:t,status:r}),[t,r]),x=v!==null||i.length||l.length?o.createElement(Se.Provider,{value:I},o.createElement(at,{fieldId:f,errors:i,warnings:l,help:m,helpStatus:r,className:`${C}-explain-connected`,onVisibleChanged:E})):null,g={};f&&(g.id=`${f}_extra`);const N=d?o.createElement("div",Object.assign({},g,{className:`${C}-extra`,ref:c}),d):null,B=x||N?o.createElement("div",{className:`${C}-additional`,style:v?{minHeight:v+S}:{}},x,N):null,W=u&&u.mark==="pro_table_render"&&u.render?u.render(e,{input:O,errorList:x,extra:N}):o.createElement(o.Fragment,null,O,B);return o.createElement(J.Provider,{value:p},o.createElement(nt,Object.assign({},h,{className:y}),W),o.createElement(vr,{prefixCls:t}))};var xr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},Er=function(t,r){return o.createElement(Pt,Ue({},t,{ref:r,icon:xr}))},wr=o.forwardRef(Er),Ir=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const Or=({prefixCls:e,label:t,htmlFor:r,labelCol:n,labelAlign:a,colon:s,required:i,requiredMark:l,tooltip:u,vertical:d})=>{var m;const[f]=jt("Form"),{labelAlign:v,labelCol:E,labelWrap:$,colon:C}=o.useContext(J);if(!t)return null;const b=n||E||{},h=a||v,y=`${e}-item-label`,p=X(y,h==="left"&&`${y}-left`,b.className,{[`${y}-wrap`]:!!$});let c=t;const S=s===!0||C!==!1&&s!==!1;S&&!d&&typeof t=="string"&&t.trim()&&(c=t.replace(/[:|:]\s*$/,""));const O=rr(u);if(O){const{icon:W=o.createElement(wr,null)}=O,M=Ir(O,["icon"]),_=o.createElement(Qe,Object.assign({},M),o.cloneElement(W,{className:`${e}-item-tooltip`,title:"",onClick:k=>{k.preventDefault()},tabIndex:null}));c=o.createElement(o.Fragment,null,c,_)}const I=l==="optional",x=typeof l=="function",g=l===!1;x?c=l(c,{required:!!i}):I&&!i&&(c=o.createElement(o.Fragment,null,c,o.createElement("span",{className:`${e}-item-optional`,title:""},f?.optional||((m=Nt.Form)===null||m===void 0?void 0:m.optional))));let N;g?N="hidden":(I||x)&&(N="optional");const B=X({[`${e}-item-required`]:i,[`${e}-item-required-mark-${N}`]:N,[`${e}-item-no-colon`]:!S});return o.createElement(nt,Object.assign({},b,{className:p}),o.createElement("label",{htmlFor:r,className:B,title:typeof t=="string"?t:""},c))},Pr={success:Ze,warning:Mt,error:Ye,validating:Ft};function st({children:e,errors:t,warnings:r,hasFeedback:n,validateStatus:a,prefixCls:s,meta:i,noStyle:l,name:u}){const d=`${s}-item`,{feedbackIcons:m}=o.useContext(J),f=rt(t,r,i,null,!!n,a),{isFormItemInput:v,status:E,hasFeedback:$,feedbackIcon:C,name:b}=o.useContext(ue),h=o.useMemo(()=>{var y;let p;if(n){const S=n!==!0&&n.icons||m,w=f&&((y=S?.({status:f,errors:t,warnings:r}))===null||y===void 0?void 0:y[f]),O=f?Pr[f]:null;p=w!==!1&&O?o.createElement("span",{className:X(`${d}-feedback-icon`,`${d}-feedback-icon-${f}`)},w||o.createElement(O,null)):null}const c={status:f||"",errors:t,warnings:r,hasFeedback:!!n,feedbackIcon:p,isFormItemInput:!0,name:u};return l&&(c.status=(f??E)||"",c.isFormItemInput=v,c.hasFeedback=!!(n??$),c.feedbackIcon=n!==void 0?c.feedbackIcon:C,c.name=u??b),c},[f,n,l,v,E]);return o.createElement(ue.Provider,{value:h},e)}var jr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};function Nr(e){const{prefixCls:t,className:r,rootClassName:n,style:a,help:s,errors:i,warnings:l,validateStatus:u,meta:d,hasFeedback:m,hidden:f,children:v,fieldId:E,required:$,isRequired:C,onSubItemMetaChange:b,layout:h,name:y}=e,p=jr(e,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout","name"]),c=`${t}-item`,{requiredMark:S,layout:w}=o.useContext(J),O=h||w,I=O==="vertical",x=o.useRef(null),g=de(i),N=de(l),B=s!=null,W=!!(B||i.length||l.length),M=!!x.current&&_t(x.current),[_,k]=o.useState(null);Ge(()=>{if(W&&x.current){const F=getComputedStyle(x.current);k(Number.parseInt(F.marginBottom,10))}},[W,M]);const z=F=>{F||k(null)},P=((F=!1)=>{const H=F?g:d.errors,q=F?N:d.warnings;return rt(H,q,d,"",!!m,u)})(),R=X(c,r,n,{[`${c}-with-help`]:B||g.length||N.length,[`${c}-has-feedback`]:P&&m,[`${c}-has-success`]:P==="success",[`${c}-has-warning`]:P==="warning",[`${c}-has-error`]:P==="error",[`${c}-is-validating`]:P==="validating",[`${c}-hidden`]:f,[`${c}-${O}`]:O});return o.createElement("div",{className:R,style:a,ref:x},o.createElement(er,Object.assign({className:`${c}-row`},Je(p,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),o.createElement(Or,Object.assign({htmlFor:E},e,{requiredMark:S,required:$??C,prefixCls:t,vertical:I})),o.createElement(Sr,Object.assign({},e,d,{errors:g,warnings:N,prefixCls:t,status:P,help:s,marginBottom:_,onErrorVisibleChanged:z}),o.createElement(et.Provider,{value:b},o.createElement(st,{prefixCls:t,meta:d,errors:d.errors,warnings:d.warnings,hasFeedback:m,validateStatus:P,name:y},v)))),!!_&&o.createElement("div",{className:`${c}-margin-offset`,style:{marginBottom:-_}}))}const Fr="__SPLIT__";function Mr(e,t){const r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(a=>{const s=e[a],i=t[a];return s===i||typeof s=="function"||typeof i=="function"})}const _r=o.memo(({children:e})=>e,(e,t)=>Mr(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((r,n)=>r===t.childProps[n]));function Ae(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function kr(e){const{name:t,noStyle:r,className:n,dependencies:a,prefixCls:s,shouldUpdate:i,rules:l,children:u,required:d,label:m,messageVariables:f,trigger:v="onChange",validateTrigger:E,hidden:$,help:C,layout:b}=e,{getPrefixCls:h}=o.useContext(Ee),{name:y}=o.useContext(J),p=pr(u),c=typeof p=="function",S=o.useContext(et),{validateTrigger:w}=o.useContext(kt),O=E!==void 0?E:w,I=t!=null,x=h("form",s),g=xe(x),[N,B,W]=we(x,g);Rt();const M=o.useContext(Tt),_=o.useRef(null),[k,z]=br({}),[D,P]=Lt(()=>Ae()),R=j=>{const A=M?.getKey(j.name);if(P(j.destroy?Ae():j,!0),r&&C!==!1&&S){let T=j.name;if(j.destroy)T=_.current||T;else if(A!==void 0){const[U,L]=A;T=[U].concat(Q(L)),_.current=T}S(j,T)}},F=(j,A)=>{z(T=>{const U=Object.assign({},T),Z=[].concat(Q(j.name.slice(0,-1)),Q(A)).join(Fr);return j.destroy?delete U[Z]:U[Z]=j,U})},[H,q]=o.useMemo(()=>{const j=Q(D.errors),A=Q(D.warnings);return Object.values(k).forEach(T=>{j.push.apply(j,Q(T.errors||[])),A.push.apply(A,Q(T.warnings||[]))}),[j,A]},[k,D.errors,D.warnings]),Y=hr();function G(j,A,T){return r&&!$?o.createElement(st,{prefixCls:x,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:D,errors:H,warnings:q,noStyle:!0,name:t},j):o.createElement(Nr,Object.assign({key:"row"},e,{className:X(n,W,g,B),prefixCls:x,fieldId:A,isRequired:T,errors:H,warnings:q,meta:D,onSubItemMetaChange:F,layout:b,name:t}),j)}if(!I&&!c&&!a)return N(G(p));let K={};return typeof m=="string"?K.label=m:t&&(K.label=String(t)),f&&(K=Object.assign(Object.assign({},K),f)),N(o.createElement(At,Object.assign({},e,{messageVariables:K,trigger:v,validateTrigger:O,onMetaChange:R}),(j,A,T)=>{const U=he(t).length&&A?A.name:[],L=Jt(U,y),Z=d!==void 0?d:!!l?.some(V=>{if(V&&typeof V=="object"&&V.required&&!V.warningOnly)return!0;if(typeof V=="function"){const ne=V(T);return ne?.required&&!ne?.warningOnly}return!1}),ee=Object.assign({},j);let se=null;if(Array.isArray(p)&&I)se=p;else if(!(c&&(!(i||a)||I))){if(!(a&&!c&&!I))if(o.isValidElement(p)){const V=Object.assign(Object.assign({},p.props),ee);if(V.id||(V.id=L),C||H.length>0||q.length>0||e.extra){const oe=[];(C||H.length>0)&&oe.push(`${L}_help`),e.extra&&oe.push(`${L}_extra`),V["aria-describedby"]=oe.join(" ")}H.length>0&&(V["aria-invalid"]="true"),Z&&(V["aria-required"]="true"),Wt(p)&&(V.ref=Y(U,p)),new Set([].concat(Q(he(v)),Q(he(O)))).forEach(oe=>{V[oe]=(...Ie)=>{var Oe,Pe,pe,je,be;(pe=ee[oe])===null||pe===void 0||(Oe=pe).call.apply(Oe,[ee].concat(Ie)),(be=(je=p.props)[oe])===null||be===void 0||(Pe=be).call.apply(Pe,[je].concat(Ie))}});const ut=[V["aria-required"],V["aria-invalid"],V["aria-describedby"]];se=o.createElement(_r,{control:ee,update:p,childProps:ut},Dt(p,V))}else c&&(i||a)&&!I?se=p(T):se=p}return G(se,L,Z)}))}const lt=kr;lt.useStatus=it;var Rr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const Tr=e=>{var{prefixCls:t,children:r}=e,n=Rr(e,["prefixCls","children"]);const{getPrefixCls:a}=o.useContext(Ee),s=a("form",t),i=o.useMemo(()=>({prefixCls:s,status:"error"}),[s]);return o.createElement(Vt,Object.assign({},n),(l,u,d)=>o.createElement(Se.Provider,{value:i},r(l.map(m=>Object.assign(Object.assign({},m),{fieldKey:m.key})),u,{errors:d.errors,warnings:d.warnings})))};function Lr(){const{form:e}=o.useContext(J);return e}const re=gr;re.Item=lt;re.List=Tr;re.ErrorList=at;re.useForm=tt;re.useFormInstance=Lr;re.useWatch=zt;re.Provider=Ke;re.create=()=>{};var Ar={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Wr=function(){var t=o.useRef([]),r=o.useRef(null);return o.useEffect(function(){var n=Date.now(),a=!1;t.current.forEach(function(s){if(s){a=!0;var i=s.style;i.transitionDuration=".3s, .3s, .3s, .06s",r.current&&n-r.current<100&&(i.transitionDuration="0s, 0s")}}),a&&(r.current=Date.now())}),t.current},We=0,Dr=Ht();function Vr(){var e;return Dr?(e=We,We+=1):e="TEST_OR_SSR",e}const zr=(function(e){var t=o.useState(),r=Bt(t,2),n=r[0],a=r[1];return o.useEffect(function(){a("rc_progress_".concat(Vr()))},[]),e||n});var De=function(t){var r=t.bg,n=t.children;return o.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function Ve(e,t){return Object.keys(e).map(function(r){var n=parseFloat(r),a="".concat(Math.floor(n*t),"%");return"".concat(e[r]," ").concat(a)})}var Br=o.forwardRef(function(e,t){var r=e.prefixCls,n=e.color,a=e.gradientId,s=e.radius,i=e.style,l=e.ptg,u=e.strokeLinecap,d=e.strokeWidth,m=e.size,f=e.gapDegree,v=n&&le(n)==="object",E=v?"#FFF":void 0,$=m/2,C=o.createElement("circle",{className:"".concat(r,"-circle-path"),r:s,cx:$,cy:$,stroke:E,strokeLinecap:u,strokeWidth:d,opacity:l===0?0:1,style:i,ref:t});if(!v)return C;var b="".concat(a,"-conic"),h=f?"".concat(180+f/2,"deg"):"0deg",y=Ve(n,(360-f)/360),p=Ve(n,1),c="conic-gradient(from ".concat(h,", ").concat(y.join(", "),")"),S="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(p.join(", "),")");return o.createElement(o.Fragment,null,o.createElement("mask",{id:b},C),o.createElement("foreignObject",{x:0,y:0,width:m,height:m,mask:"url(#".concat(b,")")},o.createElement(De,{bg:S},o.createElement(De,{bg:c}))))}),ce=100,ve=function(t,r,n,a,s,i,l,u,d,m){var f=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,v=n/100*360*((360-i)/360),E=i===0?0:{bottom:0,top:180,left:90,right:-90}[l],$=(100-a)/100*r;d==="round"&&a!==100&&($+=m/2,$>=r&&($=r-.01));var C=ce/2;return{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(r,"px ").concat(t),strokeDashoffset:$+f,transform:"rotate(".concat(s+v+E,"deg)"),transformOrigin:"".concat(C,"px ").concat(C,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Hr=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function ze(e){var t=e??[];return Array.isArray(t)?t:[t]}var qr=function(t){var r=_e(_e({},Ar),t),n=r.id,a=r.prefixCls,s=r.steps,i=r.strokeWidth,l=r.trailWidth,u=r.gapDegree,d=u===void 0?0:u,m=r.gapPosition,f=r.trailColor,v=r.strokeLinecap,E=r.style,$=r.className,C=r.strokeColor,b=r.percent,h=qt(r,Hr),y=ce/2,p=zr(n),c="".concat(p,"-gradient"),S=y-i/2,w=Math.PI*2*S,O=d>0?90+d/2:-90,I=w*((360-d)/360),x=le(s)==="object"?s:{count:s,gap:2},g=x.count,N=x.gap,B=ze(b),W=ze(C),M=W.find(function(F){return F&&le(F)==="object"}),_=M&&le(M)==="object",k=_?"butt":v,z=ve(w,I,0,100,O,d,m,f,k,i),D=Wr(),P=function(){var H=0;return B.map(function(q,Y){var G=W[Y]||W[W.length-1],K=ve(w,I,H,q,O,d,m,G,k,i);return H+=q,o.createElement(Br,{key:Y,color:G,ptg:q,radius:S,prefixCls:a,gradientId:c,style:K,strokeLinecap:k,strokeWidth:i,gapDegree:d,ref:function(A){D[Y]=A},size:ce})}).reverse()},R=function(){var H=Math.round(g*(B[0]/100)),q=100/g,Y=0;return new Array(g).fill(null).map(function(G,K){var j=K<=H-1?W[0]:f,A=j&&le(j)==="object"?"url(#".concat(c,")"):void 0,T=ve(w,I,Y,q,O,d,m,j,"butt",i,N);return Y+=(I-T.strokeDashoffset+N)*100/I,o.createElement("circle",{key:K,className:"".concat(a,"-circle-path"),r:S,cx:y,cy:y,stroke:A,strokeWidth:i,opacity:1,style:T,ref:function(L){D[K]=L}})})};return o.createElement("svg",Ue({className:X("".concat(a,"-circle"),$),viewBox:"0 0 ".concat(ce," ").concat(ce),style:E,id:n,role:"presentation"},h),!g&&o.createElement("circle",{className:"".concat(a,"-circle-trail"),r:S,cx:y,cy:y,stroke:f,strokeLinecap:k,strokeWidth:l||i,style:z}),g?R():P())};function te(e){return!e||e<0?0:e>100?100:e}function me({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}const Xr=({percent:e,success:t,successPercent:r})=>{const n=te(me({success:t,successPercent:r}));return[n,te(te(e)-n)]},Kr=({success:e={},strokeColor:t})=>{const{strokeColor:r}=e;return[r||Ce.green,t||null]},ge=(e,t,r)=>{var n,a,s,i;let l=-1,u=-1;if(t==="step"){const d=r.steps,m=r.strokeWidth;typeof e=="string"||typeof e>"u"?(l=e==="small"?2:14,u=m??8):typeof e=="number"?[l,u]=[e,e]:[l=14,u=8]=Array.isArray(e)?e:[e.width,e.height],l*=d}else if(t==="line"){const d=r?.strokeWidth;typeof e=="string"||typeof e>"u"?u=d||(e==="small"?6:8):typeof e=="number"?[l,u]=[e,e]:[l=-1,u=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[l,u]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[l,u]=[e,e]:Array.isArray(e)&&(l=(a=(n=e[0])!==null&&n!==void 0?n:e[1])!==null&&a!==void 0?a:120,u=(i=(s=e[0])!==null&&s!==void 0?s:e[1])!==null&&i!==void 0?i:120));return[l,u]},Gr=3,Ur=e=>Gr/e*100,Qr=e=>{const{prefixCls:t,trailColor:r=null,strokeLinecap:n="round",gapPosition:a,gapDegree:s,width:i=120,type:l,children:u,success:d,size:m=i,steps:f}=e,[v,E]=ge(m,"circle");let{strokeWidth:$}=e;$===void 0&&($=Math.max(Ur(v),6));const C={width:v,height:E,fontSize:v*.15+6},b=o.useMemo(()=>{if(s||s===0)return s;if(l==="dashboard")return 75},[s,l]),h=Xr(e),y=a||l==="dashboard"&&"bottom"||void 0,p=Object.prototype.toString.call(e.strokeColor)==="[object Object]",c=Kr({success:d,strokeColor:e.strokeColor}),S=X(`${t}-inner`,{[`${t}-circle-gradient`]:p}),w=o.createElement(qr,{steps:f,percent:f?h[1]:h,strokeWidth:$,trailWidth:$,strokeColor:f?c[1]:c,strokeLinecap:n,trailColor:r,prefixCls:t,gapDegree:b,gapPosition:y}),O=v<=20,I=o.createElement("div",{className:S,style:C},w,!O&&u);return O?o.createElement(Qe,{title:u},I):I},fe="--progress-line-stroke-color",ct="--progress-percent",Be=e=>{const t=e?"100%":"-100%";return new Xt(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Yr=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},$e(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${fe})`]},height:"100%",width:`calc(1 / var(${ct}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${ie(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:Be(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:Be(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Zr=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{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}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Jr=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},en=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}},tn=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),rn=He("Progress",e=>{const t=e.calc(e.marginXXS).div(2).equal(),r=Xe(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Yr(r),Zr(r),Jr(r),en(r)]},tn);var nn=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const on=e=>{let t=[];return Object.keys(e).forEach(r=>{const n=Number.parseFloat(r.replace(/%/g,""));Number.isNaN(n)||t.push({key:n,value:e[r]})}),t=t.sort((r,n)=>r.key-n.key),t.map(({key:r,value:n})=>`${n} ${r}%`).join(", ")},an=(e,t)=>{const{from:r=Ce.blue,to:n=Ce.blue,direction:a=t==="rtl"?"to left":"to right"}=e,s=nn(e,["from","to","direction"]);if(Object.keys(s).length!==0){const l=on(s),u=`linear-gradient(${a}, ${l})`;return{background:u,[fe]:u}}const i=`linear-gradient(${a}, ${r}, ${n})`;return{background:i,[fe]:i}},sn=e=>{const{prefixCls:t,direction:r,percent:n,size:a,strokeWidth:s,strokeColor:i,strokeLinecap:l="round",children:u,trailColor:d=null,percentPosition:m,success:f}=e,{align:v,type:E}=m,$=i&&typeof i!="string"?an(i,r):{[fe]:i,background:i},C=l==="square"||l==="butt"?0:void 0,b=a??[-1,s||(a==="small"?6:8)],[h,y]=ge(b,"line",{strokeWidth:s}),p={backgroundColor:d||void 0,borderRadius:C},c=Object.assign(Object.assign({width:`${te(n)}%`,height:y,borderRadius:C},$),{[ct]:te(n)/100}),S=me(e),w={width:`${te(S)}%`,height:y,borderRadius:C,backgroundColor:f?.strokeColor},O={width:h<0?"100%":h},I=o.createElement("div",{className:`${t}-inner`,style:p},o.createElement("div",{className:X(`${t}-bg`,`${t}-bg-${E}`),style:c},E==="inner"&&u),S!==void 0&&o.createElement("div",{className:`${t}-success-bg`,style:w})),x=E==="outer"&&v==="start",g=E==="outer"&&v==="end";return E==="outer"&&v==="center"?o.createElement("div",{className:`${t}-layout-bottom`},I,u):o.createElement("div",{className:`${t}-outer`,style:O},x&&u,I,g&&u)},ln=e=>{const{size:t,steps:r,rounding:n=Math.round,percent:a=0,strokeWidth:s=8,strokeColor:i,trailColor:l=null,prefixCls:u,children:d}=e,m=n(r*(a/100)),v=t??[t==="small"?2:14,s],[E,$]=ge(v,"step",{steps:r,strokeWidth:s}),C=E/r,b=Array.from({length:r});for(let h=0;h<r;h++){const y=Array.isArray(i)?i[h]:i;b[h]=o.createElement("div",{key:h,className:X(`${u}-steps-item`,{[`${u}-steps-item-active`]:h<=m-1}),style:{backgroundColor:h<=m-1?y:l,width:C,height:$}})}return o.createElement("div",{className:`${u}-steps-outer`},b,d)};var cn=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const un=["normal","exception","active","success"],pn=o.forwardRef((e,t)=>{const{prefixCls:r,className:n,rootClassName:a,steps:s,strokeColor:i,percent:l=0,size:u="default",showInfo:d=!0,type:m="line",status:f,format:v,style:E,percentPosition:$={}}=e,C=cn(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:b="end",type:h="outer"}=$,y=Array.isArray(i)?i[0]:i,p=typeof i=="string"||Array.isArray(i)?i:void 0,c=o.useMemo(()=>{if(y){const P=typeof y=="string"?y:Object.values(y)[0];return new Kt(P).isLight()}return!1},[i]),S=o.useMemo(()=>{var P,R;const F=me(e);return Number.parseInt(F!==void 0?(P=F??0)===null||P===void 0?void 0:P.toString():(R=l??0)===null||R===void 0?void 0:R.toString(),10)},[l,e.success,e.successPercent]),w=o.useMemo(()=>!un.includes(f)&&S>=100?"success":f||"normal",[f,S]),{getPrefixCls:O,direction:I,progress:x}=o.useContext(Ee),g=O("progress",r),[N,B,W]=rn(g),M=m==="line",_=M&&!s,k=o.useMemo(()=>{if(!d)return null;const P=me(e);let R;const F=v||(q=>`${q}%`),H=M&&c&&h==="inner";return h==="inner"||v||w!=="exception"&&w!=="success"?R=F(te(l),te(P)):w==="exception"?R=M?o.createElement(Ye,null):o.createElement(Gt,null):w==="success"&&(R=M?o.createElement(Ze,null):o.createElement(Ut,null)),o.createElement("span",{className:X(`${g}-text`,{[`${g}-text-bright`]:H,[`${g}-text-${b}`]:_,[`${g}-text-${h}`]:_}),title:typeof R=="string"?R:void 0},R)},[d,l,S,w,m,g,v]);let z;m==="line"?z=s?o.createElement(ln,Object.assign({},e,{strokeColor:p,prefixCls:g,steps:typeof s=="object"?s.count:s}),k):o.createElement(sn,Object.assign({},e,{strokeColor:y,prefixCls:g,direction:I,percentPosition:{align:b,type:h}}),k):(m==="circle"||m==="dashboard")&&(z=o.createElement(Qr,Object.assign({},e,{strokeColor:y,prefixCls:g,progressStatus:w}),k));const D=X(g,`${g}-status-${w}`,{[`${g}-${m==="dashboard"&&"circle"||m}`]:m!=="line",[`${g}-inline-circle`]:m==="circle"&&ge(u,"circle")[0]<=20,[`${g}-line`]:_,[`${g}-line-align-${b}`]:_,[`${g}-line-position-${h}`]:_,[`${g}-steps`]:s,[`${g}-show-info`]:d,[`${g}-${u}`]:typeof u=="string",[`${g}-rtl`]:I==="rtl"},x?.className,n,a,B,W);return N(o.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},x?.style),E),className:D,role:"progressbar","aria-valuenow":S,"aria-valuemin":0,"aria-valuemax":100},Je(C,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),z))});function bn(){const e=Qt(),[t,r]=o.useState(!1),{data:n,isLoading:a,isError:s}=Yt({queryKey:Re.AUTH_STATUS,queryFn:()=>ke.getAuthStatus(),retry:!1,staleTime:0,refetchOnMount:!0,refetchOnWindowFocus:!1}),i=!s&&Zt(n),l=tr({mutationFn:d=>ke.loginWithToken(d),onSuccess:()=>{e.invalidateQueries({queryKey:Re.AUTH_STATUS}),r(!1)},onError:()=>{r(!1)}});return{authenticated:i,isLoading:a,isError:s,data:n,loginWithTokenAsync:async d=>{r(!0);try{await l.mutateAsync(d)}finally{r(!1)}},isLoggingInWithToken:t}}export{re as F,pn as P,wr as R,bn as u};
9
+ //# sourceMappingURL=useAuth-BfM9bg0I.js.map
@@ -1,4 +1,4 @@
1
- import{a2 as h,i as Z,n as G,h as H,o as ee,a3 as U,_ as j,a4 as re,a5 as se,a6 as ne,a7 as le,w as ce,a8 as de,p as ue,a9 as ge,r as M,D as fe,v as me,x as ye,A as _,aa as Ce,z as pe,ab as ve,C as he,ac as be,J as Ie,ad as xe,ae as W,af as $e,ag as J,I as Se,a as I,U as Q,u as Y,Q as R}from"./index-HJggy9SZ.js";import{u as B}from"./errorCodeTranslator-Xn_Z9qOh.js";import{u as V}from"./useErrorHandler-Bcb3l7ju.js";var ae=h.forwardRef(function(e,n){var a=e.prefixCls,t=e.forceRender,d=e.className,u=e.style,s=e.children,r=e.isActive,o=e.role,i=e.classNames,m=e.styles,g=h.useState(r||t),C=Z(g,2),c=C[0],f=C[1];return h.useEffect(function(){(t||r)&&f(!0)},[t,r]),c?h.createElement("div",{ref:n,className:G("".concat(a,"-content"),H(H({},"".concat(a,"-content-active"),r),"".concat(a,"-content-inactive"),!r),d),style:u,role:o},h.createElement("div",{className:G("".concat(a,"-content-box"),i?.body),style:m?.body},s)):null});ae.displayName="PanelContent";var we=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],te=h.forwardRef(function(e,n){var a=e.showArrow,t=a===void 0?!0:a,d=e.headerClass,u=e.isActive,s=e.onItemClick,r=e.forceRender,o=e.className,i=e.classNames,m=i===void 0?{}:i,g=e.styles,C=g===void 0?{}:g,c=e.prefixCls,f=e.collapsible,p=e.accordion,x=e.panelKey,y=e.extra,v=e.header,b=e.expandIcon,l=e.openMotion,w=e.destroyInactivePanel,$=e.children,A=ee(e,we),S=f==="disabled",P=y!=null&&typeof y!="boolean",N=H(H(H({onClick:function(){s?.(x)},onKeyDown:function(O){(O.key==="Enter"||O.keyCode===U.ENTER||O.which===U.ENTER)&&s?.(x)},role:p?"tab":"button"},"aria-expanded",u),"aria-disabled",S),"tabIndex",S?-1:0),k=typeof b=="function"?b(e):h.createElement("i",{className:"arrow"}),z=k&&h.createElement("div",j({className:"".concat(c,"-expand-icon")},["header","icon"].includes(f)?N:{}),k),T=G("".concat(c,"-item"),H(H({},"".concat(c,"-item-active"),u),"".concat(c,"-item-disabled"),S),o),D=G(d,"".concat(c,"-header"),H({},"".concat(c,"-collapsible-").concat(f),!!f),m.header),F=re({className:D,style:C.header},["header","icon"].includes(f)?{}:N);return h.createElement("div",j({},A,{ref:n,className:T}),h.createElement("div",F,t&&z,h.createElement("span",j({className:"".concat(c,"-header-text")},f==="header"?N:{}),v),P&&h.createElement("div",{className:"".concat(c,"-extra")},y)),h.createElement(se,j({visible:u,leavedClassName:"".concat(c,"-content-hidden")},l,{forceRender:r,removeOnLeave:w}),function(E,O){var L=E.className,q=E.style;return h.createElement(ae,{ref:O,prefixCls:c,className:L,classNames:m,style:q,styles:C,isActive:u,forceRender:r,role:p?"tabpanel":void 0},$)}))}),Pe=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Ne=function(n,a){var t=a.prefixCls,d=a.accordion,u=a.collapsible,s=a.destroyInactivePanel,r=a.onItemClick,o=a.activeKey,i=a.openMotion,m=a.expandIcon;return n.map(function(g,C){var c=g.children,f=g.label,p=g.key,x=g.collapsible,y=g.onItemClick,v=g.destroyInactivePanel,b=ee(g,Pe),l=String(p??C),w=x??u,$=v??s,A=function(N){w!=="disabled"&&(r(N),y?.(N))},S=!1;return d?S=o[0]===l:S=o.indexOf(l)>-1,h.createElement(te,j({},b,{prefixCls:t,key:l,panelKey:l,isActive:S,accordion:d,openMotion:i,expandIcon:m,header:f,collapsible:w,onItemClick:A,destroyInactivePanel:$}),c)})},Ae=function(n,a,t){if(!n)return null;var d=t.prefixCls,u=t.accordion,s=t.collapsible,r=t.destroyInactivePanel,o=t.onItemClick,i=t.activeKey,m=t.openMotion,g=t.expandIcon,C=n.key||String(a),c=n.props,f=c.header,p=c.headerClass,x=c.destroyInactivePanel,y=c.collapsible,v=c.onItemClick,b=!1;u?b=i[0]===C:b=i.indexOf(C)>-1;var l=y??s,w=function(S){l!=="disabled"&&(o(S),v?.(S))},$={key:C,panelKey:C,header:f,headerClass:p,isActive:b,prefixCls:d,destroyInactivePanel:x??r,openMotion:m,accordion:u,children:n.props.children,onItemClick:w,expandIcon:g,collapsible:l};return typeof n.type=="string"?n:(Object.keys($).forEach(function(A){typeof $[A]>"u"&&delete $[A]}),h.cloneElement(n,$))};function Fe(e,n,a){return Array.isArray(e)?Ne(e,a):ne(n).map(function(t,d){return Ae(t,d,a)})}function Ee(e){var n=e;if(!Array.isArray(n)){var a=ue(n);n=a==="number"||a==="string"?[n]:[]}return n.map(function(t){return String(t)})}var Oe=h.forwardRef(function(e,n){var a=e.prefixCls,t=a===void 0?"rc-collapse":a,d=e.destroyInactivePanel,u=d===void 0?!1:d,s=e.style,r=e.accordion,o=e.className,i=e.children,m=e.collapsible,g=e.openMotion,C=e.expandIcon,c=e.activeKey,f=e.defaultActiveKey,p=e.onChange,x=e.items,y=G(t,o),v=le([],{value:c,onChange:function(P){return p?.(P)},defaultValue:f,postState:Ee}),b=Z(v,2),l=b[0],w=b[1],$=function(P){return w(function(){if(r)return l[0]===P?[]:[P];var N=l.indexOf(P),k=N>-1;return k?l.filter(function(z){return z!==P}):[].concat(ge(l),[P])})};ce(!i,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var A=Fe(x,i,{prefixCls:t,accordion:r,openMotion:g,expandIcon:C,collapsible:m,destroyInactivePanel:u,onItemClick:$,activeKey:l});return h.createElement("div",j({ref:n,className:y,style:s,role:r?"tablist":void 0},de(e,{aria:!0,data:!0})),A)});const X=Object.assign(Oe,{Panel:te});X.Panel;const Me=M.forwardRef((e,n)=>{const{getPrefixCls:a}=M.useContext(fe),{prefixCls:t,className:d,showArrow:u=!0}=e,s=a("collapse",t),r=G({[`${s}-no-arrow`]:!u},d);return M.createElement(X.Panel,Object.assign({ref:n},e,{prefixCls:s,className:r}))}),Re=e=>{const{componentCls:n,contentBg:a,padding:t,headerBg:d,headerPadding:u,collapseHeaderPaddingSM:s,collapseHeaderPaddingLG:r,collapsePanelBorderRadius:o,lineWidth:i,lineType:m,colorBorder:g,colorText:C,colorTextHeading:c,colorTextDisabled:f,fontSizeLG:p,lineHeight:x,lineHeightLG:y,marginSM:v,paddingSM:b,paddingLG:l,paddingXS:w,motionDurationSlow:$,fontSizeIcon:A,contentPadding:S,fontHeight:P,fontHeightLG:N}=e,k=`${_(i)} ${m} ${g}`;return{[n]:Object.assign(Object.assign({},pe(e)),{backgroundColor:d,border:k,borderRadius:o,"&-rtl":{direction:"rtl"},[`& > ${n}-item`]:{borderBottom:k,"&:first-child":{[`
1
+ import{a2 as h,i as Z,n as G,h as H,o as ee,a3 as U,_ as j,a4 as re,a5 as se,a6 as ne,a7 as le,w as ce,a8 as de,p as ue,a9 as ge,r as M,D as fe,v as me,x as ye,A as _,aa as Ce,z as pe,ab as ve,C as he,ac as be,J as Ie,ad as xe,ae as W,af as $e,ag as J,I as Se,a as I,U as Q,u as Y,Q as R}from"./index-BtXc5-H2.js";import{u as B}from"./errorCodeTranslator-D5vahyqQ.js";import{u as V}from"./useErrorHandler-MJ8OxkB4.js";var ae=h.forwardRef(function(e,n){var a=e.prefixCls,t=e.forceRender,d=e.className,u=e.style,s=e.children,r=e.isActive,o=e.role,i=e.classNames,m=e.styles,g=h.useState(r||t),C=Z(g,2),c=C[0],f=C[1];return h.useEffect(function(){(t||r)&&f(!0)},[t,r]),c?h.createElement("div",{ref:n,className:G("".concat(a,"-content"),H(H({},"".concat(a,"-content-active"),r),"".concat(a,"-content-inactive"),!r),d),style:u,role:o},h.createElement("div",{className:G("".concat(a,"-content-box"),i?.body),style:m?.body},s)):null});ae.displayName="PanelContent";var we=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],te=h.forwardRef(function(e,n){var a=e.showArrow,t=a===void 0?!0:a,d=e.headerClass,u=e.isActive,s=e.onItemClick,r=e.forceRender,o=e.className,i=e.classNames,m=i===void 0?{}:i,g=e.styles,C=g===void 0?{}:g,c=e.prefixCls,f=e.collapsible,p=e.accordion,x=e.panelKey,y=e.extra,v=e.header,b=e.expandIcon,l=e.openMotion,w=e.destroyInactivePanel,$=e.children,A=ee(e,we),S=f==="disabled",P=y!=null&&typeof y!="boolean",N=H(H(H({onClick:function(){s?.(x)},onKeyDown:function(O){(O.key==="Enter"||O.keyCode===U.ENTER||O.which===U.ENTER)&&s?.(x)},role:p?"tab":"button"},"aria-expanded",u),"aria-disabled",S),"tabIndex",S?-1:0),k=typeof b=="function"?b(e):h.createElement("i",{className:"arrow"}),z=k&&h.createElement("div",j({className:"".concat(c,"-expand-icon")},["header","icon"].includes(f)?N:{}),k),T=G("".concat(c,"-item"),H(H({},"".concat(c,"-item-active"),u),"".concat(c,"-item-disabled"),S),o),D=G(d,"".concat(c,"-header"),H({},"".concat(c,"-collapsible-").concat(f),!!f),m.header),F=re({className:D,style:C.header},["header","icon"].includes(f)?{}:N);return h.createElement("div",j({},A,{ref:n,className:T}),h.createElement("div",F,t&&z,h.createElement("span",j({className:"".concat(c,"-header-text")},f==="header"?N:{}),v),P&&h.createElement("div",{className:"".concat(c,"-extra")},y)),h.createElement(se,j({visible:u,leavedClassName:"".concat(c,"-content-hidden")},l,{forceRender:r,removeOnLeave:w}),function(E,O){var L=E.className,q=E.style;return h.createElement(ae,{ref:O,prefixCls:c,className:L,classNames:m,style:q,styles:C,isActive:u,forceRender:r,role:p?"tabpanel":void 0},$)}))}),Pe=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Ne=function(n,a){var t=a.prefixCls,d=a.accordion,u=a.collapsible,s=a.destroyInactivePanel,r=a.onItemClick,o=a.activeKey,i=a.openMotion,m=a.expandIcon;return n.map(function(g,C){var c=g.children,f=g.label,p=g.key,x=g.collapsible,y=g.onItemClick,v=g.destroyInactivePanel,b=ee(g,Pe),l=String(p??C),w=x??u,$=v??s,A=function(N){w!=="disabled"&&(r(N),y?.(N))},S=!1;return d?S=o[0]===l:S=o.indexOf(l)>-1,h.createElement(te,j({},b,{prefixCls:t,key:l,panelKey:l,isActive:S,accordion:d,openMotion:i,expandIcon:m,header:f,collapsible:w,onItemClick:A,destroyInactivePanel:$}),c)})},Ae=function(n,a,t){if(!n)return null;var d=t.prefixCls,u=t.accordion,s=t.collapsible,r=t.destroyInactivePanel,o=t.onItemClick,i=t.activeKey,m=t.openMotion,g=t.expandIcon,C=n.key||String(a),c=n.props,f=c.header,p=c.headerClass,x=c.destroyInactivePanel,y=c.collapsible,v=c.onItemClick,b=!1;u?b=i[0]===C:b=i.indexOf(C)>-1;var l=y??s,w=function(S){l!=="disabled"&&(o(S),v?.(S))},$={key:C,panelKey:C,header:f,headerClass:p,isActive:b,prefixCls:d,destroyInactivePanel:x??r,openMotion:m,accordion:u,children:n.props.children,onItemClick:w,expandIcon:g,collapsible:l};return typeof n.type=="string"?n:(Object.keys($).forEach(function(A){typeof $[A]>"u"&&delete $[A]}),h.cloneElement(n,$))};function Fe(e,n,a){return Array.isArray(e)?Ne(e,a):ne(n).map(function(t,d){return Ae(t,d,a)})}function Ee(e){var n=e;if(!Array.isArray(n)){var a=ue(n);n=a==="number"||a==="string"?[n]:[]}return n.map(function(t){return String(t)})}var Oe=h.forwardRef(function(e,n){var a=e.prefixCls,t=a===void 0?"rc-collapse":a,d=e.destroyInactivePanel,u=d===void 0?!1:d,s=e.style,r=e.accordion,o=e.className,i=e.children,m=e.collapsible,g=e.openMotion,C=e.expandIcon,c=e.activeKey,f=e.defaultActiveKey,p=e.onChange,x=e.items,y=G(t,o),v=le([],{value:c,onChange:function(P){return p?.(P)},defaultValue:f,postState:Ee}),b=Z(v,2),l=b[0],w=b[1],$=function(P){return w(function(){if(r)return l[0]===P?[]:[P];var N=l.indexOf(P),k=N>-1;return k?l.filter(function(z){return z!==P}):[].concat(ge(l),[P])})};ce(!i,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var A=Fe(x,i,{prefixCls:t,accordion:r,openMotion:g,expandIcon:C,collapsible:m,destroyInactivePanel:u,onItemClick:$,activeKey:l});return h.createElement("div",j({ref:n,className:y,style:s,role:r?"tablist":void 0},de(e,{aria:!0,data:!0})),A)});const X=Object.assign(Oe,{Panel:te});X.Panel;const Me=M.forwardRef((e,n)=>{const{getPrefixCls:a}=M.useContext(fe),{prefixCls:t,className:d,showArrow:u=!0}=e,s=a("collapse",t),r=G({[`${s}-no-arrow`]:!u},d);return M.createElement(X.Panel,Object.assign({ref:n},e,{prefixCls:s,className:r}))}),Re=e=>{const{componentCls:n,contentBg:a,padding:t,headerBg:d,headerPadding:u,collapseHeaderPaddingSM:s,collapseHeaderPaddingLG:r,collapsePanelBorderRadius:o,lineWidth:i,lineType:m,colorBorder:g,colorText:C,colorTextHeading:c,colorTextDisabled:f,fontSizeLG:p,lineHeight:x,lineHeightLG:y,marginSM:v,paddingSM:b,paddingLG:l,paddingXS:w,motionDurationSlow:$,fontSizeIcon:A,contentPadding:S,fontHeight:P,fontHeightLG:N}=e,k=`${_(i)} ${m} ${g}`;return{[n]:Object.assign(Object.assign({},pe(e)),{backgroundColor:d,border:k,borderRadius:o,"&-rtl":{direction:"rtl"},[`& > ${n}-item`]:{borderBottom:k,"&:first-child":{[`
2
2
  &,
3
3
  & > ${n}-header`]:{borderRadius:`${_(o)} ${_(o)} 0 0`}},"&:last-child":{[`
4
4
  &,
@@ -6,4 +6,4 @@ import{a2 as h,i as Z,n as G,h as H,o as ee,a3 as U,_ as j,a4 as re,a5 as se,a6
6
6
  > ${n}-item:last-child,
7
7
  > ${n}-item:last-child ${n}-header
8
8
  `]:{borderRadius:0},[`> ${n}-item:last-child`]:{borderBottom:0},[`> ${n}-item > ${n}-content`]:{backgroundColor:d,borderTop:0},[`> ${n}-item > ${n}-content > ${n}-content-box`]:{padding:t}}}},ke=e=>{const{componentCls:n,paddingSM:a}=e;return{[`${n}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${n}-item`]:{borderBottom:0,[`> ${n}-content`]:{backgroundColor:"transparent",border:0,[`> ${n}-content-box`]:{paddingBlock:a}}}}}},He=e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:"transparent"}),Be=me("Collapse",e=>{const n=ye(e,{collapseHeaderPaddingSM:`${_(e.paddingXS)} ${_(e.paddingSM)}`,collapseHeaderPaddingLG:`${_(e.padding)} ${_(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[Re(n),Ke(n),ke(n),_e(n),Ce(n)]},He),Ge=M.forwardRef((e,n)=>{const{getPrefixCls:a,direction:t,expandIcon:d,className:u,style:s}=be("collapse"),{prefixCls:r,className:o,rootClassName:i,style:m,bordered:g=!0,ghost:C,size:c,expandIconPosition:f="start",children:p,destroyInactivePanel:x,destroyOnHidden:y,expandIcon:v}=e,b=Ie(F=>{var E;return(E=c??F)!==null&&E!==void 0?E:"middle"}),l=a("collapse",r),w=a(),[$,A,S]=Be(l),P=M.useMemo(()=>f==="left"?"start":f==="right"?"end":f,[f]),N=v??d,k=M.useCallback((F={})=>{const E=typeof N=="function"?N(F):M.createElement(xe,{rotate:F.isActive?t==="rtl"?-90:90:void 0,"aria-label":F.isActive?"expanded":"collapsed"});return W(E,()=>{var O;return{className:G((O=E.props)===null||O===void 0?void 0:O.className,`${l}-arrow`)}})},[N,l,t]),z=G(`${l}-icon-position-${P}`,{[`${l}-borderless`]:!g,[`${l}-rtl`]:t==="rtl",[`${l}-ghost`]:!!C,[`${l}-${b}`]:b!=="middle"},u,o,i,A,S),T=M.useMemo(()=>Object.assign(Object.assign({},$e(w)),{motionAppear:!1,leavedClassName:`${l}-content-hidden`}),[w,l]),D=M.useMemo(()=>p?ne(p).map((F,E)=>{var O,L;const q=F.props;if(q?.disabled){const ie=(O=F.key)!==null&&O!==void 0?O:String(E),oe=Object.assign(Object.assign({},J(F.props,["disabled"])),{key:ie,collapsible:(L=q.collapsible)!==null&&L!==void 0?L:"disabled"});return W(F,oe)}return F}):null,[p]);return $(M.createElement(X,Object.assign({ref:n,openMotion:T},J(e,["rootClassName"]),{expandIcon:k,prefixCls:l,className:z,style:Object.assign(Object.assign({},s),m),destroyInactivePanel:y??x}),D))}),De=Object.assign(Ge,{Panel:Me});var je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"},qe=function(n,a){return M.createElement(Se,j({},n,{ref:a,icon:je}))},Qe=M.forwardRef(qe);const K={async getConfig(){return(await I.getConfig()).data.data},async updateConfig(e){return(await I.updateConfig(e)).data.data},async validateConfig(e){return(await I.validateConfig(e)).data.data},async backupConfig(){return(await I.backupConfig()).data.data},async restoreConfig(e){return(await I.restoreConfig(e)).data.data},async getConfigHistory(){return(await I.getConfigHistory()).data.data},async saveConfigHistory(e,n,a){return{id:(await I.saveConfigHistory(e,n,a)).data.data.id,name:e,description:a??null,config:n,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),is_active:0}},async applyConfigHistory(e){await I.applyConfigHistory(e)},async deleteConfigHistory(e){await I.deleteConfigHistory(e)},async listConfigFiles(){return(await I.listConfigFiles()).data.data},async switchConfigFile(e){await I.switchConfigFile(e)},async importConfigFile(e,n){const t=(await I.importConfigFile(e,n)).data.data;return{filename:t.filename,path:t.path,pathRelative:t.pathRelative,modifiedTime:new Date().toISOString(),size:0,isActive:!1}},async deleteConfigFile(e){await I.deleteConfigFile(e)},async getConfigFileContent(e){return(await I.getConfigFileContent(e)).data.data},async updateConfigFileContent(e,n){await I.updateConfigFileContent(e,n)},async diagnoseConfig(){return(await I.diagnoseConfig()).data.data},async repairConfig(e=!0){return(await I.repairConfig(e)).data.data}};function Ye(){const e=Q(),{handleError:n}=V(),{data:a,isLoading:t,error:d,refetch:u}=Y({queryKey:R.CONFIG,queryFn:()=>K.getConfig()}),s=B({mutationFn:o=>K.updateConfig(o),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG})},onError:o=>n(o)}),r=B({mutationFn:o=>K.validateConfig(o),onError:o=>n(o)});return{config:a,isLoading:t,error:d,refetch:u,update:s.mutate,updateAsync:s.mutateAsync,isUpdating:s.isPending,validate:r.mutate,validateAsync:r.mutateAsync,isValidating:r.isPending,validationResult:r.data}}function Ve(){const e=Q(),{handleError:n}=V(),{data:a,isLoading:t,error:d,refetch:u}=Y({queryKey:R.CONFIG_FILES,queryFn:()=>K.listConfigFiles()}),s=B({mutationFn:i=>K.switchConfigFile(i),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_FILES}),e.invalidateQueries({queryKey:R.CONFIG})},onError:i=>n(i)}),r=B({mutationFn:({config:i,name:m})=>K.importConfigFile(i,m),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_FILES})},onError:i=>n(i)}),o=B({mutationFn:i=>K.deleteConfigFile(i),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_FILES})},onError:i=>n(i)});return{configFiles:a||[],isLoading:t,error:d,refetch:u,switchFile:s.mutate,switchFileAsync:s.mutateAsync,isSwitching:s.isPending,importFile:r.mutate,importFileAsync:r.mutateAsync,isImporting:r.isPending,deleteFile:o.mutate,deleteFileAsync:o.mutateAsync,isDeleting:o.isPending}}function Xe(){const e=Q(),{handleError:n}=V(),{data:a,isLoading:t,error:d,refetch:u}=Y({queryKey:R.CONFIG_HISTORY,queryFn:()=>K.getConfigHistory()}),s=B({mutationFn:({name:i,config:m,description:g})=>K.saveConfigHistory(i,m,g),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_HISTORY})},onError:i=>n(i)}),r=B({mutationFn:i=>K.applyConfigHistory(i),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_HISTORY}),e.invalidateQueries({queryKey:R.CONFIG})},onError:i=>n(i)}),o=B({mutationFn:i=>K.deleteConfigHistory(i),onSuccess:()=>{e.invalidateQueries({queryKey:R.CONFIG_HISTORY})},onError:i=>n(i)});return{history:a||[],isLoading:t,error:d,refetch:u,save:s.mutate,saveAsync:s.mutateAsync,isSaving:s.isPending,apply:r.mutate,applyAsync:r.mutateAsync,isApplying:r.isPending,delete:o.mutate,deleteAsync:o.mutateAsync,isDeleting:o.isPending}}export{De as C,Qe as R,Ve as a,Xe as b,K as c,Ye as u};
9
- //# sourceMappingURL=useConfig-BmhXnAiM.js.map
9
+ //# sourceMappingURL=useConfig-nFBmSW5k.js.map
@@ -1,2 +1,2 @@
1
- import{r as A,I as v,_ as O,a as r,U as S,u as D,Q as o}from"./index-HJggy9SZ.js";import{u as T}from"./errorCodeTranslator-Xn_Z9qOh.js";import{a as f,r as L}from"./socket-oqYz9cKb.js";import{u as g}from"./useErrorHandler-Bcb3l7ju.js";var E={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},q=function(t,a){return A.createElement(v,O({},t,{ref:a,icon:E}))},I=A.forwardRef(q);const c={async startDownload(e,t,a){return(await r.startDownload(e,t,a)).data.data},async stopDownload(e){await r.stopDownload(e)},async getDownloadStatus(e){return(await r.getDownloadStatus(e)).data.data},async getTaskLogs(e,t){return(await r.getTaskLogs(e,t)).data.data},async getDownloadHistory(e){return(await r.getDownloadHistory(e)).data.data},async runAllDownloads(e){return(await r.runAllDownloads(e)).data.data},async randomDownload(e){return(await r.randomDownload(e)).data.data},async getIncompleteTasks(){return(await r.getIncompleteTasks()).data.data},async resumeDownload(e,t){return(await r.resumeDownload(e,t)).data.data},async deleteIncompleteTask(e){await r.deleteIncompleteTask(e)},async deleteAllIncompleteTasks(){return(await r.deleteAllIncompleteTasks()).data.data},async deleteTaskHistory(e){return(await r.deleteTaskHistory(e)).data.data},async deleteAllTaskHistory(){return(await r.deleteAllTaskHistory()).data.data}};function Q(){const e=S(),{handleError:t}=g(),a=T({mutationFn:({targetId:n,config:u,configPaths:l})=>c.startDownload(n,u,l),onSuccess:()=>{e.invalidateQueries({queryKey:o.DOWNLOAD_STATUS()})},onError:n=>t(n)}),s=T({mutationFn:n=>c.stopDownload(n),onSuccess:()=>{e.invalidateQueries({queryKey:o.DOWNLOAD_STATUS()})},onError:n=>t(n)});return{start:a.mutate,startAsync:a.mutateAsync,isStarting:a.isPending,stop:s.mutate,stopAsync:s.mutateAsync,isStopping:s.isPending}}function N(e,t){const a=S(),{data:s,isLoading:n,error:u,refetch:l}=D({queryKey:o.DOWNLOAD_STATUS(e),queryFn:()=>c.getDownloadStatus(e),refetchInterval:t});return A.useEffect(()=>{const d=f(),y=()=>a.getQueryData(o.DOWNLOAD_STATUS(void 0))?.activeTask?.status??null,i=(...m)=>{const p=m[0];if(!p||p.kind!=="snapshot")return;const w=y(),k=p.status.activeTask;a.setQueryData(o.DOWNLOAD_STATUS(void 0),p.status),w==="running"&&k===null&&!p.status.hasActiveTask&&(a.invalidateQueries({queryKey:["stats"]}),a.invalidateQueries({queryKey:o.DOWNLOAD_HISTORY()}),a.invalidateQueries({queryKey:o.INCOMPLETE_TASKS}))};return d.on("download",i),()=>{d.off("download",i),L()}},[a,e]),{status:s,isLoading:n,error:u,refetch:l,hasActiveTask:s?.hasActiveTask??!1,activeTask:s?.activeTask,allTasks:s?.allTasks??[]}}function M(e,t,a){const{data:s,isLoading:n,error:u,refetch:l}=D({queryKey:o.DOWNLOAD_LOGS(e),queryFn:()=>c.getTaskLogs(e,t),enabled:!!e,refetchInterval:e&&a?a:!1});return{logs:s?.logs??[],isLoading:n,error:u,refetch:l}}function H(e){const{data:t,isLoading:a,error:s,refetch:n}=D({queryKey:o.DOWNLOAD_HISTORY(e),queryFn:()=>c.getDownloadHistory(e)});return{items:t?.items??[],total:t?.total??0,page:t?.page??1,limit:t?.limit??20,isLoading:a,error:s,refetch:n}}function P(){const e=S(),{handleError:t}=g(),{data:a,isLoading:s,error:n,refetch:u}=D({queryKey:o.INCOMPLETE_TASKS,queryFn:()=>c.getIncompleteTasks()}),l=T({mutationFn:({tag:i,type:m})=>c.resumeDownload(i,m),onSuccess:()=>{e.invalidateQueries({queryKey:o.INCOMPLETE_TASKS}),e.invalidateQueries({queryKey:o.DOWNLOAD_STATUS()})},onError:i=>t(i)}),d=T({mutationFn:i=>c.deleteIncompleteTask(i),onSuccess:()=>{e.invalidateQueries({queryKey:o.INCOMPLETE_TASKS})},onError:i=>t(i)}),y=T({mutationFn:()=>c.deleteAllIncompleteTasks(),onSuccess:()=>{e.invalidateQueries({queryKey:o.INCOMPLETE_TASKS})},onError:i=>t(i)});return{tasks:a?.tasks??[],isLoading:s,error:n,refetch:u,resume:l.mutate,resumeAsync:l.mutateAsync,isResuming:l.isPending,delete:d.mutate,deleteAsync:d.mutateAsync,isDeleting:d.isPending,deleteAll:y.mutate,deleteAllAsync:y.mutateAsync,isDeletingAll:y.isPending}}export{I as R,N as a,M as b,P as c,c as d,H as e,Q as u};
2
- //# sourceMappingURL=useDownload-DhuPPKqw.js.map
1
+ import{r as A,I as v,_ as O,a as r,U as S,u as D,Q as o}from"./index-BtXc5-H2.js";import{u as T}from"./errorCodeTranslator-D5vahyqQ.js";import{a as f,r as L}from"./socket-oqYz9cKb.js";import{u as g}from"./useErrorHandler-MJ8OxkB4.js";var E={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},q=function(t,a){return A.createElement(v,O({},t,{ref:a,icon:E}))},I=A.forwardRef(q);const c={async startDownload(e,t,a){return(await r.startDownload(e,t,a)).data.data},async stopDownload(e){await r.stopDownload(e)},async getDownloadStatus(e){return(await r.getDownloadStatus(e)).data.data},async getTaskLogs(e,t){return(await r.getTaskLogs(e,t)).data.data},async getDownloadHistory(e){return(await r.getDownloadHistory(e)).data.data},async runAllDownloads(e){return(await r.runAllDownloads(e)).data.data},async randomDownload(e){return(await r.randomDownload(e)).data.data},async getIncompleteTasks(){return(await r.getIncompleteTasks()).data.data},async resumeDownload(e,t){return(await r.resumeDownload(e,t)).data.data},async deleteIncompleteTask(e){await r.deleteIncompleteTask(e)},async deleteAllIncompleteTasks(){return(await r.deleteAllIncompleteTasks()).data.data},async deleteTaskHistory(e){return(await r.deleteTaskHistory(e)).data.data},async deleteAllTaskHistory(){return(await r.deleteAllTaskHistory()).data.data}};function Q(){const e=S(),{handleError:t}=g(),a=T({mutationFn:({targetId:n,config:u,configPaths:l})=>c.startDownload(n,u,l),onSuccess:()=>{e.invalidateQueries({queryKey:o.DOWNLOAD_STATUS()})},onError:n=>t(n)}),s=T({mutationFn:n=>c.stopDownload(n),onSuccess:()=>{e.invalidateQueries({queryKey:o.DOWNLOAD_STATUS()})},onError:n=>t(n)});return{start:a.mutate,startAsync:a.mutateAsync,isStarting:a.isPending,stop:s.mutate,stopAsync:s.mutateAsync,isStopping:s.isPending}}function N(e,t){const a=S(),{data:s,isLoading:n,error:u,refetch:l}=D({queryKey:o.DOWNLOAD_STATUS(e),queryFn:()=>c.getDownloadStatus(e),refetchInterval:t});return A.useEffect(()=>{const d=f(),y=()=>a.getQueryData(o.DOWNLOAD_STATUS(void 0))?.activeTask?.status??null,i=(...m)=>{const p=m[0];if(!p||p.kind!=="snapshot")return;const w=y(),k=p.status.activeTask;a.setQueryData(o.DOWNLOAD_STATUS(void 0),p.status),w==="running"&&k===null&&!p.status.hasActiveTask&&(a.invalidateQueries({queryKey:["stats"]}),a.invalidateQueries({queryKey:o.DOWNLOAD_HISTORY()}),a.invalidateQueries({queryKey:o.INCOMPLETE_TASKS}))};return d.on("download",i),()=>{d.off("download",i),L()}},[a,e]),{status:s,isLoading:n,error:u,refetch:l,hasActiveTask:s?.hasActiveTask??!1,activeTask:s?.activeTask,allTasks:s?.allTasks??[]}}function M(e,t,a){const{data:s,isLoading:n,error:u,refetch:l}=D({queryKey:o.DOWNLOAD_LOGS(e),queryFn:()=>c.getTaskLogs(e,t),enabled:!!e,refetchInterval:e&&a?a:!1});return{logs:s?.logs??[],isLoading:n,error:u,refetch:l}}function H(e){const{data:t,isLoading:a,error:s,refetch:n}=D({queryKey:o.DOWNLOAD_HISTORY(e),queryFn:()=>c.getDownloadHistory(e)});return{items:t?.items??[],total:t?.total??0,page:t?.page??1,limit:t?.limit??20,isLoading:a,error:s,refetch:n}}function P(){const e=S(),{handleError:t}=g(),{data:a,isLoading:s,error:n,refetch:u}=D({queryKey:o.INCOMPLETE_TASKS,queryFn:()=>c.getIncompleteTasks()}),l=T({mutationFn:({tag:i,type:m})=>c.resumeDownload(i,m),onSuccess:()=>{e.invalidateQueries({queryKey:o.INCOMPLETE_TASKS}),e.invalidateQueries({queryKey:o.DOWNLOAD_STATUS()})},onError:i=>t(i)}),d=T({mutationFn:i=>c.deleteIncompleteTask(i),onSuccess:()=>{e.invalidateQueries({queryKey:o.INCOMPLETE_TASKS})},onError:i=>t(i)}),y=T({mutationFn:()=>c.deleteAllIncompleteTasks(),onSuccess:()=>{e.invalidateQueries({queryKey:o.INCOMPLETE_TASKS})},onError:i=>t(i)});return{tasks:a?.tasks??[],isLoading:s,error:n,refetch:u,resume:l.mutate,resumeAsync:l.mutateAsync,isResuming:l.isPending,delete:d.mutate,deleteAsync:d.mutateAsync,isDeleting:d.isPending,deleteAll:y.mutate,deleteAllAsync:y.mutateAsync,isDeletingAll:y.isPending}}export{I as R,N as a,M as b,P as c,c as d,H as e,Q as u};
2
+ //# sourceMappingURL=useDownload-ChmDqdbc.js.map
@@ -1,2 +1,2 @@
1
- import{b as f,r as e,bj as m,V as b,s as n}from"./index-HJggy9SZ.js";import{t as g}from"./errorCodeTranslator-Xn_Z9qOh.js";function C(){const{t:o}=f(),t=e.useCallback((s,a)=>{if(a)return a;const r=g(s.code,o,s.params,s.message);return r||s.message||o("common.error.unknown")},[o]),c=e.useCallback((s,a)=>{const r=s instanceof m?s:b(s),d=t(r,a);return n.error(d),r},[t]),l=e.useCallback(s=>{n.success(s)},[]),u=e.useCallback(s=>{n.warning(s)},[]),i=e.useCallback(s=>{n.info(s)},[]);return{handleError:c,handleSuccess:l,handleWarning:u,handleInfo:i}}export{C as u};
2
- //# sourceMappingURL=useErrorHandler-Bcb3l7ju.js.map
1
+ import{b as f,r as e,b0 as m,V as b,s as n}from"./index-BtXc5-H2.js";import{t as g}from"./errorCodeTranslator-D5vahyqQ.js";function C(){const{t:o}=f(),t=e.useCallback((s,a)=>{if(a)return a;const r=g(s.code,o,s.params,s.message);return r||s.message||o("common.error.unknown")},[o]),c=e.useCallback((s,a)=>{const r=s instanceof m?s:b(s),d=t(r,a);return n.error(d),r},[t]),l=e.useCallback(s=>{n.success(s)},[]),u=e.useCallback(s=>{n.warning(s)},[]),i=e.useCallback(s=>{n.info(s)},[]);return{handleError:c,handleSuccess:l,handleWarning:u,handleInfo:i}}export{C as u};
2
+ //# sourceMappingURL=useErrorHandler-MJ8OxkB4.js.map
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>PixivFlow - WebUI</title>
8
- <script type="module" crossorigin src="./assets/index-HJggy9SZ.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-BtXc5-H2.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-DHwJxrFi.css">
10
10
  </head>
11
11
  <body>
@@ -1,2 +0,0 @@
1
- import{r as g,I as G,_ as X,b as C,j as e,d as fe,W as y,Y as oe,B as k,c as Q,Z as D,U as je,S as ye,s as f,Q as U,X as K,a as ae,u as Te}from"./index-HJggy9SZ.js";import{R as W,d as se,u as ke,a as Ce,b as Ie,c as ve}from"./useDownload-DhuPPKqw.js";import{R as re,C as Se,u as De}from"./useConfig-BmhXnAiM.js";import{C as O}from"./index-B4zZ11c-.js";import{R as be,C as H}from"./row-CQQO4x82.js";import{S as B}from"./index-D_qUS2GR.js";import{R as Z}from"./CheckCircleOutlined-BS_TxY3k.js";import{R as J}from"./CloseCircleOutlined-B45wvGw1.js";import{u as Re,P as Ae,F as E}from"./useAuth-4erTEEjT.js";import{T as R}from"./index-mHLzQpzS.js";import{f as b}from"./dateUtils-CEt5gAeU.js";import{D as I}from"./index-DpfbKoAX.js";import{T as F}from"./index-6mtxs9yc.js";import{M as Y}from"./index-NSEOZ6G5.js";import{R as V}from"./DeleteOutlined-ByQuZQbZ.js";import{F as de}from"./Table-CvqrzZX2.js";import{P as ne}from"./index-BlXTpFS3.js";import{R as $e}from"./ClearOutlined-uIvWLBII.js";import{e as v,t as S}from"./errorCodeTranslator-Xn_Z9qOh.js";import"./socket-oqYz9cKb.js";import"./useErrorHandler-Bcb3l7ju.js";import"./index-Cg2Wi2pt.js";var Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},Fe=function(p,m){return g.createElement(G,X({},p,{ref:m,icon:Me}))},q=g.forwardRef(Fe),ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"}}]},name:"redo",theme:"outlined"},Oe=function(p,m){return g.createElement(G,X({},p,{ref:m,icon:ze}))},Le=g.forwardRef(Oe),Pe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"},He=function(p,m){return g.createElement(G,X({},p,{ref:m,icon:Pe}))},z=g.forwardRef(He);const Be=({total:o,completed:p,failed:m,stopped:n})=>{const{t:l}=C();return e.jsx(O,{style:{marginBottom:16},children:e.jsxs(be,{gutter:16,children:[e.jsx(H,{span:6,children:e.jsx(B,{title:l("download.totalTasks"),value:o,prefix:e.jsx(fe,{})})}),e.jsx(H,{span:6,children:e.jsx(B,{title:l("download.completed"),value:p,valueStyle:{color:"#3f8600"},prefix:e.jsx(Z,{})})}),e.jsx(H,{span:6,children:e.jsx(B,{title:l("download.failed"),value:m,valueStyle:{color:"#cf1322"},prefix:e.jsx(J,{})})}),e.jsx(H,{span:6,children:e.jsx(B,{title:l("download.stopped"),value:n,valueStyle:{color:"#8c8c8c"},prefix:e.jsx(z,{})})})]})})},{Text:$}=R,Ee=({hasActiveTask:o,onStartClick:p,onRunAllClick:m,onStopClick:n,isStarting:l,isRunningAll:s,isStopping:d,storage:i,onRefreshConfig:u})=>{const{t}=C(),{authenticated:w}=Re(),r=!w,h=t("common.loginRequired"),a=i?.illustrationDirectory||(i?.downloadDirectory?`${i.downloadDirectory}/illustrations`:"./downloads/illustrations"),c=i?.novelDirectory||(i?.downloadDirectory?`${i.downloadDirectory}/novels`:"./downloads/novels");return e.jsxs(O,{title:e.jsxs(y,{children:[e.jsx(q,{}),e.jsx("span",{children:t("download.taskOperations")})]}),style:{marginBottom:16},children:[e.jsxs(y,{wrap:!0,children:[e.jsx(oe,{title:r?h:void 0,children:e.jsx(k,{type:"primary",size:"large",icon:e.jsx(re,{}),onClick:p,disabled:o||r,loading:l,children:t("download.startDownload")})}),e.jsx(oe,{title:r?h:void 0,children:e.jsx(k,{size:"large",icon:e.jsx(Q,{}),onClick:m,disabled:o||r,loading:s,children:t("download.downloadAll")})}),e.jsx(k,{danger:!0,size:"large",icon:e.jsx(z,{}),onClick:n,disabled:!o,loading:d,children:t("download.stopCurrent")})]}),o&&e.jsx(D,{message:t("download.hasActiveTask"),description:t("download.hasActiveTaskDesc"),type:"info",showIcon:!0,style:{marginTop:16}}),i&&e.jsx(D,{message:e.jsxs(y,{children:[e.jsx("span",{children:t("download.fileSavePath")}),u&&e.jsx(k,{type:"text",size:"small",icon:e.jsx(Q,{}),onClick:u,title:t("download.refreshPath")})]}),description:e.jsxs(y,{direction:"vertical",size:"small",style:{width:"100%"},children:[e.jsxs($,{children:[e.jsx($,{strong:!0,children:t("download.illustrationPath")}),a]}),e.jsxs($,{children:[e.jsx($,{strong:!0,children:t("download.novelPath")}),c]}),e.jsx($,{type:"secondary",style:{fontSize:"12px"},children:t("download.pathTip")})]}),type:"info",showIcon:!0,style:{marginTop:16}})]})},_e=({logs:o,isRunning:p=!1})=>{const{t:m}=C(),n=g.useRef(null);if(g.useEffect(()=>{n.current&&o.length>0&&n.current.scrollIntoView({behavior:"smooth"})},[o]),!o||o.length===0)return null;const l={error:"#ff4d4f",warn:"#faad14",info:"#1890ff",debug:"#8c8c8c"};return e.jsx("div",{style:{marginTop:16},children:e.jsx(Se,{items:[{key:"logs",label:e.jsxs(y,{children:[e.jsx(q,{}),e.jsxs("span",{children:[m("download.realtimeLogs")," (",o.length," ",m("download.entries"),")"]})]}),children:e.jsxs("div",{style:{maxHeight:"400px",overflowY:"auto",backgroundColor:"#1f1f1f",padding:"12px",borderRadius:"4px",fontFamily:"monospace",fontSize:"12px",lineHeight:"1.6"},children:[o.map((s,d)=>{const i=b(s.timestamp,{hour:"2-digit",minute:"2-digit",second:"2-digit"});return e.jsxs("div",{style:{marginBottom:"4px",color:l[s.level]||"#ffffff"},children:[e.jsxs("span",{style:{color:"#8c8c8c",marginRight:"8px"},children:["[",i,"]"]}),e.jsxs("span",{style:{color:l[s.level]||"#ffffff",marginRight:"8px",fontWeight:"bold"},children:["[",s.level.toUpperCase(),"]"]}),e.jsx("span",{children:s.message})]},d)}),e.jsx("div",{ref:n})]})}],defaultActiveKey:p?["logs"]:[]})})},{Text:N}=R,qe=({task:o,logs:p,onStop:m,isStopping:n})=>{const{t:l}=C(),s=i=>{const u={running:{color:"processing",icon:e.jsx(W,{}),text:l("download.statusRunning")},completed:{color:"success",icon:e.jsx(Z,{}),text:l("download.statusCompleted")},failed:{color:"error",icon:e.jsx(J,{}),text:l("download.statusFailed")},stopped:{color:"default",icon:e.jsx(z,{}),text:l("download.statusStopped")}},t=u[i]||u.running;return t?e.jsx(F,{color:t.color,icon:t.icon,children:t.text}):null},d=(i,u)=>{const t=new Date(i).getTime(),w=u?new Date(u).getTime():Date.now(),r=Math.floor((w-t)/1e3);if(r<60)return`${r} ${l("download.seconds")}`;if(r<3600){const h=Math.floor(r/60),a=r%60;return`${h} ${l("download.minutes")} ${a} ${l("download.seconds")}`}else{const h=Math.floor(r/3600),a=Math.floor(r%3600/60);return`${h} ${l("download.hours")} ${a} ${l("download.minutes")}`}};return e.jsxs(O,{title:e.jsxs(y,{children:[e.jsx(W,{}),e.jsx("span",{children:l("download.currentTask")})]}),style:{marginBottom:16},extra:e.jsx(k,{danger:!0,icon:e.jsx(z,{}),onClick:m,loading:n,children:l("download.stopTask")}),children:[e.jsxs(I,{column:2,bordered:!0,children:[e.jsx(I.Item,{label:l("download.taskId"),span:1,children:e.jsx(N,{code:!0,children:o.taskId})}),e.jsx(I.Item,{label:l("download.status"),span:1,children:s(o.status)}),e.jsx(I.Item,{label:l("download.startTime"),span:1,children:b(o.startTime)}),e.jsx(I.Item,{label:l("download.duration"),span:1,children:e.jsx(N,{strong:!0,children:d(new Date(o.startTime),o.endTime?new Date(o.endTime):void 0)})}),o.progress&&e.jsxs(I.Item,{label:l("download.progress"),span:2,children:[e.jsx(Ae,{percent:Math.round(o.progress.current/o.progress.total*100),status:o.status==="running"?"active":"success",format:()=>`${o.progress?.current||0} / ${o.progress?.total||0}`}),o.progress.message&&e.jsx(N,{type:"secondary",style:{display:"block",marginTop:8},children:o.progress.message})]}),o.endTime&&e.jsx(I.Item,{label:l("download.endTime"),span:2,children:b(o.endTime)}),o.error&&e.jsx(I.Item,{label:l("download.errorInfo"),span:2,children:e.jsx(D,{message:o.error,type:"error",showIcon:!0})})]}),p&&p.length>0&&e.jsx(_e,{logs:p,isRunning:o.status==="running"})]})},{Text:_}=R,Ke=({tasks:o,hasActiveTask:p,onRefresh:m,onResume:n,onDelete:l,onDeleteAll:s,isResuming:d,isDeleting:i,isDeletingAll:u})=>{const{t}=C();if(!o||o.length===0)return null;const w=[{title:t("download.tag"),dataIndex:"tag",key:"tag",width:150,render:r=>e.jsx(_,{strong:!0,children:r})},{title:t("download.type"),dataIndex:"type",key:"type",width:100,render:r=>e.jsx(F,{color:r==="illustration"?"blue":"purple",children:t(r==="illustration"?"download.typeIllustration":"download.typeNovel")})},{title:t("download.incompleteStatus"),dataIndex:"status",key:"status",width:120,render:r=>{const a={failed:{color:"error",text:t("download.statusFailed")},partial:{color:"warning",text:t("download.statusPartial")}}[r]||{color:"default",text:r};return e.jsx(F,{color:a.color,children:a.text})}},{title:t("download.errorMessage"),dataIndex:"message",key:"message",ellipsis:{showTitle:!1},width:300,render:r=>{if(!r)return e.jsx(_,{type:"secondary",children:"-"});const h=r.toLowerCase();let a=null;return h.includes("401")||h.includes("unauthorized")?a=t("download.error401"):h.includes("403")||h.includes("forbidden")?a=t("download.error403"):h.includes("timeout")||h.includes("timed out")?a=t("download.errorTimeout"):h.includes("failed after")&&(a=t("download.errorRetries")),e.jsxs("div",{children:[e.jsx(_,{type:"danger",ellipsis:{tooltip:r},children:r}),a&&e.jsx("div",{style:{marginTop:4},children:e.jsxs(_,{type:"secondary",style:{fontSize:"12px"},children:["💡 ",a]})})]})}},{title:t("download.executedAt"),dataIndex:"executedAt",key:"executedAt",width:180,render:r=>b(r)},{title:t("download.actions"),key:"action",width:150,fixed:"right",render:(r,h)=>e.jsxs(y,{children:[e.jsx(k,{type:"link",icon:e.jsx(Le,{}),onClick:()=>n(h.tag,h.type),disabled:p||d,loading:d,children:t("download.resumeDownload")}),e.jsx(k,{type:"link",danger:!0,icon:e.jsx(V,{}),onClick:()=>{Y.confirm({title:t("download.confirmDelete"),content:t("download.confirmDeleteDesc",{tag:h.tag,type:h.type==="illustration"?t("download.typeIllustration"):t("download.typeNovel")}),okText:t("common.delete"),okType:"danger",cancelText:t("common.cancel"),onOk:()=>l(h.id)})},disabled:i,loading:i,children:t("download.deleteTask")})]})}];return e.jsxs(O,{title:e.jsxs(y,{children:[e.jsx(q,{}),e.jsx("span",{children:t("download.incompleteTasks")})]}),style:{marginBottom:16},extra:e.jsxs(y,{children:[e.jsx(k,{size:"small",icon:e.jsx(Q,{}),onClick:m,children:t("download.refreshList")}),e.jsx(k,{size:"small",danger:!0,icon:e.jsx(V,{}),onClick:()=>{Y.confirm({title:t("download.confirmDeleteAll"),content:t("download.confirmDeleteAllDesc",{count:o.length}),okText:t("common.delete"),okType:"danger",cancelText:t("common.cancel"),onOk:s})},loading:u,disabled:u,children:t("download.deleteAll")})]}),children:[e.jsx(D,{message:t("download.incompleteTasksFound",{count:o.length}),description:t("download.incompleteTasksDesc"),type:"warning",showIcon:!0,style:{marginBottom:16}}),e.jsx(de,{columns:w,dataSource:o,rowKey:"id",pagination:{pageSize:10,showSizeChanger:!0,showTotal:r=>t("download.totalEntries",{total:r})},size:"small",scroll:{x:800}})]})},{Text:M}=R,Ne=({tasks:o,isLoading:p,calculateDuration:m})=>{const{t:n}=C(),l=je(),[s,d]=g.useState(null),[i,u]=g.useState(!1),t=async a=>{try{d(a),await se.deleteTaskHistory(a),f.success(n("download.deleteTaskHistorySuccess")),l.invalidateQueries({queryKey:U.DOWNLOAD_STATUS()})}catch(c){const x=c?.response?.data?.data?.message||c?.message||n("download.deleteTaskHistoryFailed");f.error(x)}finally{d(null)}},w=async()=>{try{u(!0);const a=await se.deleteAllTaskHistory();f.success(n("download.deleteAllTaskHistorySuccess",{count:a.deletedCount})),l.invalidateQueries({queryKey:U.DOWNLOAD_STATUS()})}catch(a){const c=a?.response?.data?.data?.message||a?.message||n("download.deleteAllTaskHistoryFailed");f.error(c)}finally{u(!1)}},r=a=>{const c={running:{color:"processing",icon:e.jsx(W,{}),text:n("download.statusRunning")},completed:{color:"success",icon:e.jsx(Z,{}),text:n("download.statusCompleted")},failed:{color:"error",icon:e.jsx(J,{}),text:n("download.statusFailed")},stopped:{color:"default",icon:e.jsx(z,{}),text:n("download.statusStopped")}},x=c[a]||c.running;return x?e.jsx(F,{color:x.color,icon:x.icon,children:x.text}):null},h=[{title:n("download.taskId"),dataIndex:"taskId",key:"taskId",width:120,render:a=>e.jsxs(M,{code:!0,children:[a.slice(0,8),"..."]})},{title:n("download.status"),dataIndex:"status",key:"status",width:100,render:a=>r(a)},{title:n("download.duration"),key:"duration",width:120,render:(a,c)=>m(new Date(c.startTime),c.endTime?new Date(c.endTime):void 0)},{title:n("download.startTime"),dataIndex:"startTime",key:"startTime",width:180,render:a=>b(a)},{title:n("download.endTime"),dataIndex:"endTime",key:"endTime",width:180,render:a=>b(a)},{title:n("download.errorInfo"),dataIndex:"error",key:"error",ellipsis:!0,render:a=>a?e.jsx(M,{type:"danger",ellipsis:{tooltip:a},children:a}):e.jsx(M,{type:"secondary",children:"-"})},{title:n("download.actions"),key:"actions",width:100,fixed:"right",render:(a,c)=>e.jsx(ne,{title:n("download.deleteTaskHistoryConfirm"),description:n("download.deleteTaskHistoryConfirmDesc",{taskId:c.taskId.slice(0,8)}),onConfirm:()=>t(c.taskId),okText:n("common.confirm"),cancelText:n("common.cancel"),okButtonProps:{danger:!0},children:e.jsx(k,{type:"link",danger:!0,size:"small",icon:e.jsx(V,{}),loading:s===c.taskId,disabled:c.status==="running",children:n("common.delete")})})}];return e.jsx(O,{title:e.jsxs(y,{children:[e.jsx(q,{}),e.jsx("span",{children:n("download.taskHistory")})]}),extra:o&&o.length>0?e.jsx(ne,{title:n("download.deleteAllTaskHistoryConfirm"),description:n("download.deleteAllTaskHistoryConfirmDesc",{count:o.length}),onConfirm:w,okText:n("common.confirm"),cancelText:n("common.cancel"),okButtonProps:{danger:!0},children:e.jsx(k,{danger:!0,size:"small",icon:e.jsx($e,{}),loading:i,children:n("download.deleteAll")})}):null,children:p?e.jsxs("div",{style:{textAlign:"center",padding:"40px 0"},children:[e.jsx(ye,{size:"large"}),e.jsx("div",{style:{marginTop:16},children:e.jsx(M,{type:"secondary",children:n("download.loadingHistory")})})]}):o&&o.length>0?e.jsx(de,{columns:h,dataSource:o,rowKey:"taskId",pagination:{pageSize:10,showSizeChanger:!0,showTotal:a=>n("download.taskRecords",{total:a}),pageSizeOptions:["10","20","50","100"]},size:"middle",scroll:{x:1e3}}):e.jsx("div",{style:{textAlign:"center",padding:"40px 0"},children:e.jsx(M,{type:"secondary",children:n("download.noHistory")})})})},{Text:le}=R,Qe=({open:o,onCancel:p,onFinish:m,isSubmitting:n,configFiles:l=[],targets:s=[]})=>{const{t:d}=C(),[i]=E.useForm(),u=()=>{i.resetFields(),p()};return e.jsxs(Y,{title:e.jsxs(y,{children:[e.jsx(re,{}),e.jsx("span",{children:d("download.startDownloadModal")})]}),open:o,onCancel:u,onOk:()=>i.submit(),confirmLoading:n,okText:d("common.start"),cancelText:d("common.cancel"),width:600,children:[e.jsx(D,{message:d("download.startDownloadTip"),description:d("download.startDownloadTipDesc"),type:"info",showIcon:!0,style:{marginBottom:24}}),e.jsxs(E,{form:i,onFinish:m,layout:"vertical",children:[e.jsx(E.Item,{name:"configPaths",label:d("download.selectConfigFiles"),tooltip:d("download.selectConfigFilesTooltip"),extra:d("download.selectConfigFilesExtra"),children:e.jsx(K,{mode:"multiple",placeholder:d("download.selectConfigFilesPlaceholder"),allowClear:!0,size:"large",showSearch:!0,filterOption:(t,w)=>w?.label?.toLowerCase().includes(t.toLowerCase())||!1,options:l.map(t=>({label:`${t.filename}${t.isActive?` (${d("config.activeConfig")})`:""}`,value:t.path}))})}),e.jsx(E.Item,{name:"targetId",label:d("download.selectTarget"),tooltip:d("download.selectTargetTooltip"),extra:d("download.selectTargetExtra"),children:e.jsx(K,{placeholder:d("download.selectTargetPlaceholder"),allowClear:!0,size:"large",showSearch:!0,filterOption:(t,w)=>{const r=w?.children;return(typeof r=="string"?r:String(r||"")).toLowerCase().includes(t.toLowerCase())},children:s.map((t,w)=>e.jsx(K.Option,{value:w.toString(),children:e.jsxs(y,{children:[e.jsx(F,{color:t.type==="illustration"?"blue":"purple",children:t.type==="illustration"?d("download.typeIllustration"):d("download.typeNovel")}),e.jsx(le,{strong:!0,children:t.tag||`Target ${w+1}`}),t.limit&&e.jsxs(le,{type:"secondary",children:["(",d("download.limit"),": ",t.limit," ",d("download.entries"),")"]})]})},w))})}),s.length===0&&e.jsx(D,{message:d("download.noTargetsFound"),description:d("download.noTargetsFoundDesc"),type:"warning",showIcon:!0})]})]})};function Ue(o,p,m,n,l){const{t:s}=C(),[d,i]=g.useState(!1),u=g.useCallback(async c=>{try{await o({targetId:c.targetId,configPaths:c.configPaths}),f.success(s("download.taskStarted")),i(!1)}catch(x){const{errorCode:j,message:T}=v(x);f.error(S(j,s,void 0,T||s("download.startFailed")))}},[o,s]),t=g.useCallback(async c=>{try{await p(c),f.success(s("download.taskStopped"))}catch(x){const{errorCode:j,message:T}=v(x);f.error(S(j,s,void 0,T||s("download.stopFailed")))}},[p,s]),w=g.useCallback(()=>{ae.runAllDownloads().then(()=>{f.success(s("download.allTargetsStarted"))}).catch(c=>{const{errorCode:x,message:j}=v(c);f.error(S(x,s,void 0,j||s("download.startFailed")))})},[s]),r=g.useCallback(async(c,x)=>{try{await m({tag:c,type:x}),f.success(s("download.taskResumedWithTag",{tag:c,type:s(x==="illustration"?"download.typeIllustration":"download.typeNovel")}))}catch(j){const{errorCode:T,message:A,params:L}=v(j);f.error(S(T,s,L,A||s("download.resumeFailed")))}},[m,s]),h=g.useCallback(async c=>{try{await n(c),f.success(s("download.incompleteTaskDeleted"))}catch(x){const{errorCode:j,message:T,params:A}=v(x);f.error(S(j,s,A,T||s("download.deleteFailed")))}},[n,s]),a=g.useCallback(async()=>{try{const x=(await l())?.deletedCount||0;x===0?f.info(s("download.noIncompleteTasks")):f.success(s("download.allIncompleteTasksDeleted",{count:x}))}catch(c){const{errorCode:x,message:j,params:T}=v(c);x?f.error(S(x,s,T,j||s("download.deleteAllFailed"))):f.error(j||s("download.deleteAllFailed")),console.error("Delete all incomplete tasks error:",c)}},[l,s]);return{showStartModal:d,setShowStartModal:i,handleStart:u,handleStop:t,handleRunAll:w,handleResume:r,handleDelete:h,handleDeleteAll:a}}function We(o){const{t:p}=C(),m=g.useMemo(()=>{const l=o||[],s=l.filter(u=>u.status==="completed").length,d=l.filter(u=>u.status==="failed").length,i=l.filter(u=>u.status==="stopped").length;return{total:l.length,completed:s,failed:d,stopped:i}},[o]),n=g.useCallback((l,s)=>{const d=new Date(l).getTime(),i=s?new Date(s).getTime():Date.now(),u=Math.floor((i-d)/1e3);if(u<60)return`${u} ${p("download.seconds")}`;if(u<3600){const t=Math.floor(u/60),w=u%60;return`${t} ${p("download.minutes")} ${w} ${p("download.seconds")}`}else{const t=Math.floor(u/3600),w=Math.floor(u%3600/60);return`${t} ${p("download.hours")} ${w} ${p("download.minutes")}`}},[p]);return{taskStats:m,calculateDuration:n}}const{Title:Ye,Paragraph:Ve}=R;function ft(){const{t:o}=C(),{startAsync:p,isStarting:m,stopAsync:n,isStopping:l}=ke(),{isLoading:s,hasActiveTask:d,activeTask:i,allTasks:u}=Ce(void 0,2e3),t=i?.taskId,{logs:w}=Ie(t,void 0,2e3),{tasks:r,refetch:h,resumeAsync:a,deleteAsync:c,deleteAllAsync:x,isResuming:j,isDeleting:T,isDeletingAll:A}=ve(),{config:L,refetch:ie}=De(),{data:ce}=Te({queryKey:U.CONFIG_FILES,queryFn:()=>ae.listConfigFiles()}),{showStartModal:ue,setShowStartModal:ee,handleStart:pe,handleStop:te,handleRunAll:me,handleResume:he,handleDelete:xe,handleDeleteAll:we}=Ue(p,n,a,c,x),{taskStats:P,calculateDuration:ge}=We(u);return e.jsxs("div",{children:[e.jsx(Ye,{level:2,children:o("download.title")}),e.jsx(Ve,{type:"secondary",style:{marginBottom:24},children:o("download.description")}),e.jsx(Be,{total:P.total,completed:P.completed,failed:P.failed,stopped:P.stopped}),e.jsx(Ee,{hasActiveTask:d,onStartClick:()=>ee(!0),onRunAllClick:me,onStopClick:()=>i?.taskId&&te(i.taskId),isStarting:m,isRunningAll:!1,isStopping:l,storage:L?.storage,onRefreshConfig:ie}),i&&e.jsx(qe,{task:i,logs:w,onStop:()=>i.taskId&&te(i.taskId),isStopping:l}),r&&r.length>0&&e.jsx(Ke,{tasks:r,hasActiveTask:d,onRefresh:h,onResume:he,onDelete:xe,onDeleteAll:we,isResuming:j,isDeleting:T,isDeletingAll:A}),e.jsx(Ne,{tasks:u||[],isLoading:s,calculateDuration:ge}),e.jsx(Qe,{open:ue,onCancel:()=>ee(!1),onFinish:pe,isSubmitting:m,configFiles:ce?.data?.data||[],targets:L?.targets||[]})]})}export{ft as default};
2
- //# sourceMappingURL=Download-DdswOGH7.js.map
@@ -1,20 +0,0 @@
1
- import{a2 as ne,n as P,r as i,v as lt,x as st,aK as wa,A as v,D as me,ag as ke,ac as _a,b4 as Ea,cc as Pa,cd as Oa,k as Ra,m as it,a3 as fe,t as qt,bW as Kt,bu as Xt,o as je,i as G,am as Ta,_ as ve,h as re,I as Ma,a4 as le,q as Ia,p as ct,ce as Na,cf as La,an as za,a9 as It,ap as et,aW as ja,a5 as Ba,l as Aa,a7 as Nt,aT as Ha,a6 as Da,au as Lt,z as dt,aA as ut,bp as Ut,ab as ot,E as Wa,aS as Ga,J as Yt,br as ka,b3 as ft,L as Va}from"./index-HJggy9SZ.js";const Fa=()=>ne.useReducer(e=>e+1,0),Ve=e=>{const{prefixCls:t,className:a,style:n,size:r,shape:o}=e,s=P({[`${t}-lg`]:r==="large",[`${t}-sm`]:r==="small"}),l=P({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),c=i.useMemo(()=>typeof r=="number"?{width:r,height:r,lineHeight:`${r}px`}:{},[r]);return i.createElement("span",{className:P(t,s,l,a),style:Object.assign(Object.assign({},c),n)})},qa=new wa("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Fe=e=>({height:e,lineHeight:v(e)}),Re=e=>Object.assign({width:e},Fe(e)),Ka=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:qa,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),tt=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},Fe(e)),Xa=e=>{const{skeletonAvatarCls:t,gradientFromColor:a,controlHeight:n,controlHeightLG:r,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:a},Re(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},Re(r)),[`${t}${t}-sm`]:Object.assign({},Re(o))}},Ua=e=>{const{controlHeight:t,borderRadiusSM:a,skeletonInputCls:n,controlHeightLG:r,controlHeightSM:o,gradientFromColor:s,calc:l}=e;return{[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:s,borderRadius:a},tt(t,l)),[`${n}-lg`]:Object.assign({},tt(r,l)),[`${n}-sm`]:Object.assign({},tt(o,l))}},zt=e=>Object.assign({width:e},Fe(e)),Ya=e=>{const{skeletonImageCls:t,imageSizeBase:a,gradientFromColor:n,borderRadiusSM:r,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:n,borderRadius:r},zt(o(a).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},zt(a)),{maxWidth:o(a).mul(4).equal(),maxHeight:o(a).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},at=(e,t,a)=>{const{skeletonButtonCls:n}=e;return{[`${a}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${a}${n}-round`]:{borderRadius:t}}},nt=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},Fe(e)),Ja=e=>{const{borderRadiusSM:t,skeletonButtonCls:a,controlHeight:n,controlHeightLG:r,controlHeightSM:o,gradientFromColor:s,calc:l}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:s,borderRadius:t,width:l(n).mul(2).equal(),minWidth:l(n).mul(2).equal()},nt(n,l))},at(e,n,a)),{[`${a}-lg`]:Object.assign({},nt(r,l))}),at(e,r,`${a}-lg`)),{[`${a}-sm`]:Object.assign({},nt(o,l))}),at(e,o,`${a}-sm`))},Qa=e=>{const{componentCls:t,skeletonAvatarCls:a,skeletonTitleCls:n,skeletonParagraphCls:r,skeletonButtonCls:o,skeletonInputCls:s,skeletonImageCls:l,controlHeight:c,controlHeightLG:d,controlHeightSM:f,gradientFromColor:u,padding:g,marginSM:y,borderRadius:B,titleHeight:O,blockRadius:S,paragraphLiHeight:b,controlHeightXS:p,paragraphMarginTop:T}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:g,verticalAlign:"top",[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:u},Re(c)),[`${a}-circle`]:{borderRadius:"50%"},[`${a}-lg`]:Object.assign({},Re(d)),[`${a}-sm`]:Object.assign({},Re(f))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:O,background:u,borderRadius:S,[`+ ${r}`]:{marginBlockStart:f}},[r]:{padding:0,"> li":{width:"100%",height:b,listStyle:"none",background:u,borderRadius:S,"+ li":{marginBlockStart:p}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${r} > li`]:{borderRadius:B}}},[`${t}-with-avatar ${t}-content`]:{[n]:{marginBlockStart:y,[`+ ${r}`]:{marginBlockStart:T}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Ja(e)),Xa(e)),Ua(e)),Ya(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[s]:{width:"100%"}},[`${t}${t}-active`]:{[`
2
- ${n},
3
- ${r} > li,
4
- ${a},
5
- ${o},
6
- ${s},
7
- ${l}
8
- `]:Object.assign({},Ka(e))}}},Za=e=>{const{colorFillContent:t,colorFill:a}=e,n=t,r=a;return{color:n,colorGradientEnd:r,gradientFromColor:n,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},Te=lt("Skeleton",e=>{const{componentCls:t,calc:a}=e,n=st(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:a(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return Qa(n)},Za,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),en=e=>{const{prefixCls:t,className:a,rootClassName:n,active:r,shape:o="circle",size:s="default"}=e,{getPrefixCls:l}=i.useContext(me),c=l("skeleton",t),[d,f,u]=Te(c),g=ke(e,["prefixCls","className"]),y=P(c,`${c}-element`,{[`${c}-active`]:r},a,n,f,u);return d(i.createElement("div",{className:y},i.createElement(Ve,Object.assign({prefixCls:`${c}-avatar`,shape:o,size:s},g))))},tn=e=>{const{prefixCls:t,className:a,rootClassName:n,active:r,block:o=!1,size:s="default"}=e,{getPrefixCls:l}=i.useContext(me),c=l("skeleton",t),[d,f,u]=Te(c),g=ke(e,["prefixCls"]),y=P(c,`${c}-element`,{[`${c}-active`]:r,[`${c}-block`]:o},a,n,f,u);return d(i.createElement("div",{className:y},i.createElement(Ve,Object.assign({prefixCls:`${c}-button`,size:s},g))))},an="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",nn=e=>{const{prefixCls:t,className:a,rootClassName:n,style:r,active:o}=e,{getPrefixCls:s}=i.useContext(me),l=s("skeleton",t),[c,d,f]=Te(l),u=P(l,`${l}-element`,{[`${l}-active`]:o},a,n,d,f);return c(i.createElement("div",{className:u},i.createElement("div",{className:P(`${l}-image`,a),style:r},i.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${l}-image-svg`},i.createElement("title",null,"Image placeholder"),i.createElement("path",{d:an,className:`${l}-image-path`})))))},rn=e=>{const{prefixCls:t,className:a,rootClassName:n,active:r,block:o,size:s="default"}=e,{getPrefixCls:l}=i.useContext(me),c=l("skeleton",t),[d,f,u]=Te(c),g=ke(e,["prefixCls"]),y=P(c,`${c}-element`,{[`${c}-active`]:r,[`${c}-block`]:o},a,n,f,u);return d(i.createElement("div",{className:y},i.createElement(Ve,Object.assign({prefixCls:`${c}-input`,size:s},g))))},on=e=>{const{prefixCls:t,className:a,rootClassName:n,style:r,active:o,children:s}=e,{getPrefixCls:l}=i.useContext(me),c=l("skeleton",t),[d,f,u]=Te(c),g=P(c,`${c}-element`,{[`${c}-active`]:o},f,a,n,u);return d(i.createElement("div",{className:g},i.createElement("div",{className:P(`${c}-image`,a),style:r},s)))},ln=(e,t)=>{const{width:a,rows:n=2}=t;if(Array.isArray(a))return a[e];if(n-1===e)return a},sn=e=>{const{prefixCls:t,className:a,style:n,rows:r=0}=e,o=Array.from({length:r}).map((s,l)=>i.createElement("li",{key:l,style:{width:ln(l,e)}}));return i.createElement("ul",{className:P(t,a),style:n},o)},cn=({prefixCls:e,className:t,width:a,style:n})=>i.createElement("h3",{className:P(e,t),style:Object.assign({width:a},n)});function rt(e){return e&&typeof e=="object"?e:{}}function dn(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function un(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function fn(e,t){const a={};return(!e||!t)&&(a.width="61%"),!e&&t?a.rows=3:a.rows=2,a}const Me=e=>{const{prefixCls:t,loading:a,className:n,rootClassName:r,style:o,children:s,avatar:l=!1,title:c=!0,paragraph:d=!0,active:f,round:u}=e,{getPrefixCls:g,direction:y,className:B,style:O}=_a("skeleton"),S=g("skeleton",t),[b,p,T]=Te(S);if(a||!("loading"in e)){const N=!!l,I=!!c,z=!!d;let k;if(N){const R=Object.assign(Object.assign({prefixCls:`${S}-avatar`},dn(I,z)),rt(l));k=i.createElement("div",{className:`${S}-header`},i.createElement(Ve,Object.assign({},R)))}let M;if(I||z){let R;if(I){const x=Object.assign(Object.assign({prefixCls:`${S}-title`},un(N,z)),rt(c));R=i.createElement(cn,Object.assign({},x))}let h;if(z){const x=Object.assign(Object.assign({prefixCls:`${S}-paragraph`},fn(N,I)),rt(d));h=i.createElement(sn,Object.assign({},x))}M=i.createElement("div",{className:`${S}-content`},R,h)}const w=P(S,{[`${S}-with-avatar`]:N,[`${S}-active`]:f,[`${S}-rtl`]:y==="rtl",[`${S}-round`]:u},B,n,r,p,T);return b(i.createElement("div",{className:w,style:Object.assign(Object.assign({},O),o)},k,M))}return s??null};Me.Button=tn;Me.Avatar=en;Me.Input=rn;Me.Image=nn;Me.Node=on;const Jt=["xxl","xl","lg","md","sm","xs"],vn=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),gn=e=>{const t=e,a=[].concat(Jt).reverse();return a.forEach((n,r)=>{const o=n.toUpperCase(),s=`screen${o}Min`,l=`screen${o}`;if(!(t[s]<=t[l]))throw new Error(`${s}<=${l} fails : !(${t[s]}<=${t[l]})`);if(r<a.length-1){const c=`screen${o}Max`;if(!(t[l]<=t[c]))throw new Error(`${l}<=${c} fails : !(${t[l]}<=${t[c]})`);const f=`screen${a[r+1].toUpperCase()}Min`;if(!(t[c]<=t[f]))throw new Error(`${c}<=${f} fails : !(${t[c]}<=${t[f]})`)}}),e},Er=(e,t)=>{if(t){for(const a of Jt)if(e[a]&&t?.[a]!==void 0)return t[a]}},bn=()=>{const[,e]=Ea(),t=vn(gn(e));return ne.useMemo(()=>{const a=new Map;let n=-1,r={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return r=o,a.forEach(s=>s(r)),a.size>=1},subscribe(o){return a.size||this.register(),n+=1,a.set(n,o),o(r),n},unsubscribe(o){a.delete(o),a.size||this.unregister()},register(){Object.entries(t).forEach(([o,s])=>{const l=({matches:d})=>{this.dispatch(Object.assign(Object.assign({},r),{[o]:d}))},c=window.matchMedia(s);Oa(c,l),this.matchHandlers[s]={mql:c,listener:l},l(c)})},unregister(){Object.values(t).forEach(o=>{const s=this.matchHandlers[o];Pa(s?.mql,s?.listener)}),a.clear()}}},[t])};function Pr(e=!0,t={}){const a=i.useRef(t),[,n]=Fa(),r=bn();return Ra(()=>{const o=r.subscribe(s=>{a.current=s,e&&n()});return()=>r.unsubscribe(o)},[]),a.current}var mn=fe.ESC,hn=fe.TAB;function pn(e){var t=e.visible,a=e.triggerRef,n=e.onVisibleChange,r=e.autoFocus,o=e.overlayRef,s=i.useRef(!1),l=function(){if(t){var u,g;(u=a.current)===null||u===void 0||(g=u.focus)===null||g===void 0||g.call(u),n?.(!1)}},c=function(){var u;return(u=o.current)!==null&&u!==void 0&&u.focus?(o.current.focus(),s.current=!0,!0):!1},d=function(u){switch(u.keyCode){case mn:l();break;case hn:{var g=!1;s.current||(g=c()),g?u.preventDefault():l();break}}};i.useEffect(function(){return t?(window.addEventListener("keydown",d),r&&it(c,3),function(){window.removeEventListener("keydown",d),s.current=!1}):function(){s.current=!1}},[t])}var $n=i.forwardRef(function(e,t){var a=e.overlay,n=e.arrow,r=e.prefixCls,o=i.useMemo(function(){var l;return typeof a=="function"?l=a():l=a,l},[a]),s=qt(t,Kt(o));return ne.createElement(ne.Fragment,null,n&&ne.createElement("div",{className:"".concat(r,"-arrow")}),ne.cloneElement(o,{ref:Xt(o)?s:void 0}))}),Ee={adjustX:1,adjustY:1},Pe=[0,0],yn={topLeft:{points:["bl","tl"],overflow:Ee,offset:[0,-4],targetOffset:Pe},top:{points:["bc","tc"],overflow:Ee,offset:[0,-4],targetOffset:Pe},topRight:{points:["br","tr"],overflow:Ee,offset:[0,-4],targetOffset:Pe},bottomLeft:{points:["tl","bl"],overflow:Ee,offset:[0,4],targetOffset:Pe},bottom:{points:["tc","bc"],overflow:Ee,offset:[0,4],targetOffset:Pe},bottomRight:{points:["tr","br"],overflow:Ee,offset:[0,4],targetOffset:Pe}},Sn=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Cn(e,t){var a,n=e.arrow,r=n===void 0?!1:n,o=e.prefixCls,s=o===void 0?"rc-dropdown":o,l=e.transitionName,c=e.animation,d=e.align,f=e.placement,u=f===void 0?"bottomLeft":f,g=e.placements,y=g===void 0?yn:g,B=e.getPopupContainer,O=e.showAction,S=e.hideAction,b=e.overlayClassName,p=e.overlayStyle,T=e.visible,N=e.trigger,I=N===void 0?["hover"]:N,z=e.autoFocus,k=e.overlay,M=e.children,w=e.onVisibleChange,R=je(e,Sn),h=ne.useState(),x=G(h,2),$=x[0],C=x[1],J="visible"in e?T:$,H=ne.useRef(null),V=ne.useRef(null),te=ne.useRef(null);ne.useImperativeHandle(t,function(){return H.current});var j=function(q){C(q),w?.(q)};pn({visible:J,triggerRef:te,onVisibleChange:j,autoFocus:z,overlayRef:V});var _=function(q){var Q=e.onOverlayClick;C(!1),Q&&Q(q)},ae=function(){return ne.createElement($n,{ref:V,overlay:k,prefixCls:s,arrow:r})},oe=function(){return typeof k=="function"?ae:ae()},E=function(){var q=e.minOverlayWidthMatchTrigger,Q=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?q:!Q},D=function(){var q=e.openClassName;return q!==void 0?q:"".concat(s,"-open")},Z=ne.cloneElement(M,{className:P((a=M.props)===null||a===void 0?void 0:a.className,J&&D()),ref:Xt(M)?qt(te,Kt(M)):void 0}),X=S;return!X&&I.indexOf("contextMenu")!==-1&&(X=["click"]),ne.createElement(Ta,ve({builtinPlacements:y},R,{prefixCls:s,ref:H,popupClassName:P(b,re({},"".concat(s,"-show-arrow"),r)),popupStyle:p,action:I,showAction:O,hideAction:X,popupPlacement:u,popupAlign:d,popupTransitionName:l,popupAnimation:c,popupVisible:J,stretch:E()?"minWidth":"",popup:oe(),onPopupVisibleChange:j,onPopupClick:_,getPopupContainer:B}),Z)}const xn=ne.forwardRef(Cn);var wn={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"},_n=function(t,a){return i.createElement(Ma,ve({},t,{ref:a,icon:wn}))},En=i.forwardRef(_n);const qe=i.createContext(null);var Pn=function(t){var a=t.activeTabOffset,n=t.horizontal,r=t.rtl,o=t.indicator,s=o===void 0?{}:o,l=s.size,c=s.align,d=c===void 0?"center":c,f=i.useState(),u=G(f,2),g=u[0],y=u[1],B=i.useRef(),O=ne.useCallback(function(b){return typeof l=="function"?l(b):typeof l=="number"?l:b},[l]);function S(){it.cancel(B.current)}return i.useEffect(function(){var b={};if(a)if(n){b.width=O(a.width);var p=r?"right":"left";d==="start"&&(b[p]=a[p]),d==="center"&&(b[p]=a[p]+a.width/2,b.transform=r?"translateX(50%)":"translateX(-50%)"),d==="end"&&(b[p]=a[p]+a.width,b.transform="translateX(-100%)")}else b.height=O(a.height),d==="start"&&(b.top=a.top),d==="center"&&(b.top=a.top+a.height/2,b.transform="translateY(-50%)"),d==="end"&&(b.top=a.top+a.height,b.transform="translateY(-100%)");return S(),B.current=it(function(){var T=g&&b&&Object.keys(b).every(function(N){var I=b[N],z=g[N];return typeof I=="number"&&typeof z=="number"?Math.round(I)===Math.round(z):I===z});T||y(b)}),S},[JSON.stringify(a),n,r,d,O]),{style:g}},jt={width:0,height:0,left:0,top:0};function On(e,t,a){return i.useMemo(function(){for(var n,r=new Map,o=t.get((n=e[0])===null||n===void 0?void 0:n.key)||jt,s=o.left+o.width,l=0;l<e.length;l+=1){var c=e[l].key,d=t.get(c);if(!d){var f;d=t.get((f=e[l-1])===null||f===void 0?void 0:f.key)||jt}var u=r.get(c)||le({},d);u.right=s-u.left-u.width,r.set(c,u)}return r},[e.map(function(n){return n.key}).join("_"),t,a])}function Bt(e,t){var a=i.useRef(e),n=i.useState({}),r=G(n,2),o=r[1];function s(l){var c=typeof l=="function"?l(a.current):l;c!==a.current&&t(c,a.current),a.current=c,o({})}return[a.current,s]}var Rn=.1,At=.01,Ge=20,Ht=Math.pow(.995,Ge);function Tn(e,t){var a=i.useState(),n=G(a,2),r=n[0],o=n[1],s=i.useState(0),l=G(s,2),c=l[0],d=l[1],f=i.useState(0),u=G(f,2),g=u[0],y=u[1],B=i.useState(),O=G(B,2),S=O[0],b=O[1],p=i.useRef();function T(w){var R=w.touches[0],h=R.screenX,x=R.screenY;o({x:h,y:x}),window.clearInterval(p.current)}function N(w){if(r){var R=w.touches[0],h=R.screenX,x=R.screenY;o({x:h,y:x});var $=h-r.x,C=x-r.y;t($,C);var J=Date.now();d(J),y(J-c),b({x:$,y:C})}}function I(){if(r&&(o(null),b(null),S)){var w=S.x/g,R=S.y/g,h=Math.abs(w),x=Math.abs(R);if(Math.max(h,x)<Rn)return;var $=w,C=R;p.current=window.setInterval(function(){if(Math.abs($)<At&&Math.abs(C)<At){window.clearInterval(p.current);return}$*=Ht,C*=Ht,t($*Ge,C*Ge)},Ge)}}var z=i.useRef();function k(w){var R=w.deltaX,h=w.deltaY,x=0,$=Math.abs(R),C=Math.abs(h);$===C?x=z.current==="x"?R:h:$>C?(x=R,z.current="x"):(x=h,z.current="y"),t(-x,-x)&&w.preventDefault()}var M=i.useRef(null);M.current={onTouchStart:T,onTouchMove:N,onTouchEnd:I,onWheel:k},i.useEffect(function(){function w($){M.current.onTouchStart($)}function R($){M.current.onTouchMove($)}function h($){M.current.onTouchEnd($)}function x($){M.current.onWheel($)}return document.addEventListener("touchmove",R,{passive:!1}),document.addEventListener("touchend",h,{passive:!0}),e.current.addEventListener("touchstart",w,{passive:!0}),e.current.addEventListener("wheel",x,{passive:!1}),function(){document.removeEventListener("touchmove",R),document.removeEventListener("touchend",h)}},[])}function Qt(e){var t=i.useState(0),a=G(t,2),n=a[0],r=a[1],o=i.useRef(0),s=i.useRef();return s.current=e,Ia(function(){var l;(l=s.current)===null||l===void 0||l.call(s)},[n]),function(){o.current===n&&(o.current+=1,r(o.current))}}function Mn(e){var t=i.useRef([]),a=i.useState({}),n=G(a,2),r=n[1],o=i.useRef(typeof e=="function"?e():e),s=Qt(function(){var c=o.current;t.current.forEach(function(d){c=d(c)}),t.current=[],o.current=c,r({})});function l(c){t.current.push(c),s()}return[o.current,l]}var Dt={width:0,height:0,left:0,top:0,right:0};function In(e,t,a,n,r,o,s){var l=s.tabs,c=s.tabPosition,d=s.rtl,f,u,g;return["top","bottom"].includes(c)?(f="width",u=d?"right":"left",g=Math.abs(a)):(f="height",u="top",g=-a),i.useMemo(function(){if(!l.length)return[0,0];for(var y=l.length,B=y,O=0;O<y;O+=1){var S=e.get(l[O].key)||Dt;if(Math.floor(S[u]+S[f])>Math.floor(g+t)){B=O-1;break}}for(var b=0,p=y-1;p>=0;p-=1){var T=e.get(l[p].key)||Dt;if(T[u]<g){b=p+1;break}}return b>B?[0,-1]:[b,B]},[e,t,n,r,o,g,c,l.map(function(y){return y.key}).join("_"),d])}function Wt(e){var t;return e instanceof Map?(t={},e.forEach(function(a,n){t[n]=a})):t=e,JSON.stringify(t)}var Nn="TABS_DQ";function Zt(e){return String(e).replace(/"/g,Nn)}function vt(e,t,a,n){return!(!a||n||e===!1||e===void 0&&(t===!1||t===null))}var ea=i.forwardRef(function(e,t){var a=e.prefixCls,n=e.editable,r=e.locale,o=e.style;return!n||n.showAdd===!1?null:i.createElement("button",{ref:t,type:"button",className:"".concat(a,"-nav-add"),style:o,"aria-label":r?.addAriaLabel||"Add tab",onClick:function(l){n.onEdit("add",{event:l})}},n.addIcon||"+")}),Gt=i.forwardRef(function(e,t){var a=e.position,n=e.prefixCls,r=e.extra;if(!r)return null;var o,s={};return ct(r)==="object"&&!i.isValidElement(r)?s=r:s.right=r,a==="right"&&(o=s.right),a==="left"&&(o=s.left),o?i.createElement("div",{className:"".concat(n,"-extra-content"),ref:t},o):null}),Ln=i.forwardRef(function(e,t){var a=e.prefixCls,n=e.id,r=e.tabs,o=e.locale,s=e.mobile,l=e.more,c=l===void 0?{}:l,d=e.style,f=e.className,u=e.editable,g=e.tabBarGutter,y=e.rtl,B=e.removeAriaLabel,O=e.onTabClick,S=e.getPopupContainer,b=e.popupClassName,p=i.useState(!1),T=G(p,2),N=T[0],I=T[1],z=i.useState(null),k=G(z,2),M=k[0],w=k[1],R=c.icon,h=R===void 0?"More":R,x="".concat(n,"-more-popup"),$="".concat(a,"-dropdown"),C=M!==null?"".concat(x,"-").concat(M):null,J=o?.dropdownAriaLabel;function H(E,D){E.preventDefault(),E.stopPropagation(),u.onEdit("remove",{key:D,event:E})}var V=i.createElement(Na,{onClick:function(D){var Z=D.key,X=D.domEvent;O(Z,X),I(!1)},prefixCls:"".concat($,"-menu"),id:x,tabIndex:-1,role:"listbox","aria-activedescendant":C,selectedKeys:[M],"aria-label":J!==void 0?J:"expanded dropdown"},r.map(function(E){var D=E.closable,Z=E.disabled,X=E.closeIcon,F=E.key,q=E.label,Q=vt(D,X,u,Z);return i.createElement(La,{key:F,id:"".concat(x,"-").concat(F),role:"option","aria-controls":n&&"".concat(n,"-panel-").concat(F),disabled:Z},i.createElement("span",null,q),Q&&i.createElement("button",{type:"button","aria-label":B||"remove",tabIndex:0,className:"".concat($,"-menu-item-remove"),onClick:function(se){se.stopPropagation(),H(se,F)}},X||u.removeIcon||"×"))}));function te(E){for(var D=r.filter(function(Q){return!Q.disabled}),Z=D.findIndex(function(Q){return Q.key===M})||0,X=D.length,F=0;F<X;F+=1){Z=(Z+E+X)%X;var q=D[Z];if(!q.disabled){w(q.key);return}}}function j(E){var D=E.which;if(!N){[fe.DOWN,fe.SPACE,fe.ENTER].includes(D)&&(I(!0),E.preventDefault());return}switch(D){case fe.UP:te(-1),E.preventDefault();break;case fe.DOWN:te(1),E.preventDefault();break;case fe.ESC:I(!1);break;case fe.SPACE:case fe.ENTER:M!==null&&O(M,E);break}}i.useEffect(function(){var E=document.getElementById(C);E&&E.scrollIntoView&&E.scrollIntoView(!1)},[M]),i.useEffect(function(){N||w(null)},[N]);var _=re({},y?"marginRight":"marginLeft",g);r.length||(_.visibility="hidden",_.order=1);var ae=P(re({},"".concat($,"-rtl"),y)),oe=s?null:i.createElement(xn,ve({prefixCls:$,overlay:V,visible:r.length?N:!1,onVisibleChange:I,overlayClassName:P(ae,b),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:S},c),i.createElement("button",{type:"button",className:"".concat(a,"-nav-more"),style:_,"aria-haspopup":"listbox","aria-controls":x,id:"".concat(n,"-more"),"aria-expanded":N,onKeyDown:j},h));return i.createElement("div",{className:P("".concat(a,"-nav-operations"),f),style:d,ref:t},oe,i.createElement(ea,{prefixCls:a,locale:o,editable:u}))});const zn=i.memo(Ln,function(e,t){return t.tabMoving});var jn=function(t){var a=t.prefixCls,n=t.id,r=t.active,o=t.focus,s=t.tab,l=s.key,c=s.label,d=s.disabled,f=s.closeIcon,u=s.icon,g=t.closable,y=t.renderWrapper,B=t.removeAriaLabel,O=t.editable,S=t.onClick,b=t.onFocus,p=t.onBlur,T=t.onKeyDown,N=t.onMouseDown,I=t.onMouseUp,z=t.style,k=t.tabCount,M=t.currentPosition,w="".concat(a,"-tab"),R=vt(g,f,O,d);function h(H){d||S(H)}function x(H){H.preventDefault(),H.stopPropagation(),O.onEdit("remove",{key:l,event:H})}var $=i.useMemo(function(){return u&&typeof c=="string"?i.createElement("span",null,c):c},[c,u]),C=i.useRef(null);i.useEffect(function(){o&&C.current&&C.current.focus()},[o]);var J=i.createElement("div",{key:l,"data-node-key":Zt(l),className:P(w,re(re(re(re({},"".concat(w,"-with-remove"),R),"".concat(w,"-active"),r),"".concat(w,"-disabled"),d),"".concat(w,"-focus"),o)),style:z,onClick:h},i.createElement("div",{ref:C,role:"tab","aria-selected":r,id:n&&"".concat(n,"-tab-").concat(l),className:"".concat(w,"-btn"),"aria-controls":n&&"".concat(n,"-panel-").concat(l),"aria-disabled":d,tabIndex:d?null:r?0:-1,onClick:function(V){V.stopPropagation(),h(V)},onKeyDown:T,onMouseDown:N,onMouseUp:I,onFocus:b,onBlur:p},o&&i.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"Tab ".concat(M," of ").concat(k)),u&&i.createElement("span",{className:"".concat(w,"-icon")},u),c&&$),R&&i.createElement("button",{type:"button",role:"tab","aria-label":B||"remove",tabIndex:r?0:-1,className:"".concat(w,"-remove"),onClick:function(V){V.stopPropagation(),x(V)}},f||O.removeIcon||"×"));return y?y(J):J},Bn=function(t,a){var n=t.offsetWidth,r=t.offsetHeight,o=t.offsetTop,s=t.offsetLeft,l=t.getBoundingClientRect(),c=l.width,d=l.height,f=l.left,u=l.top;return Math.abs(c-n)<1?[c,d,f-a.left,u-a.top]:[n,r,s,o]},Oe=function(t){var a=t.current||{},n=a.offsetWidth,r=n===void 0?0:n,o=a.offsetHeight,s=o===void 0?0:o;if(t.current){var l=t.current.getBoundingClientRect(),c=l.width,d=l.height;if(Math.abs(c-r)<1)return[c,d]}return[r,s]},We=function(t,a){return t[a?0:1]},kt=i.forwardRef(function(e,t){var a=e.className,n=e.style,r=e.id,o=e.animated,s=e.activeKey,l=e.rtl,c=e.extra,d=e.editable,f=e.locale,u=e.tabPosition,g=e.tabBarGutter,y=e.children,B=e.onTabClick,O=e.onTabScroll,S=e.indicator,b=i.useContext(qe),p=b.prefixCls,T=b.tabs,N=i.useRef(null),I=i.useRef(null),z=i.useRef(null),k=i.useRef(null),M=i.useRef(null),w=i.useRef(null),R=i.useRef(null),h=u==="top"||u==="bottom",x=Bt(0,function(A,m){h&&O&&O({direction:A>m?"left":"right"})}),$=G(x,2),C=$[0],J=$[1],H=Bt(0,function(A,m){!h&&O&&O({direction:A>m?"top":"bottom"})}),V=G(H,2),te=V[0],j=V[1],_=i.useState([0,0]),ae=G(_,2),oe=ae[0],E=ae[1],D=i.useState([0,0]),Z=G(D,2),X=Z[0],F=Z[1],q=i.useState([0,0]),Q=G(q,2),he=Q[0],se=Q[1],pe=i.useState([0,0]),$e=G(pe,2),W=$e[0],ce=$e[1],de=Mn(new Map),Ce=G(de,2),Ie=Ce[0],Ke=Ce[1],ee=On(T,Ie,X[0]),U=We(oe,h),ge=We(X,h),Ne=We(he,h),gt=We(W,h),bt=Math.floor(U)<Math.floor(ge+Ne),ue=bt?U-gt:U-Ne,ia="".concat(p,"-nav-operations-hidden"),ye=0,Se=0;h&&l?(ye=0,Se=Math.max(0,ge-ue)):(ye=Math.min(0,ue-ge),Se=0);function Xe(A){return A<ye?ye:A>Se?Se:A}var Ue=i.useRef(null),oa=i.useState(),mt=G(oa,2),Be=mt[0],ht=mt[1];function Ye(){ht(Date.now())}function Je(){Ue.current&&clearTimeout(Ue.current)}Tn(k,function(A,m){function L(K,Y){K(function(ie){var _e=Xe(ie+Y);return _e})}return bt?(h?L(J,A):L(j,m),Je(),Ye(),!0):!1}),i.useEffect(function(){return Je(),Be&&(Ue.current=setTimeout(function(){ht(0)},100)),Je},[Be]);var la=In(ee,ue,h?C:te,ge,Ne,gt,le(le({},e),{},{tabs:T})),pt=G(la,2),sa=pt[0],ca=pt[1],$t=za(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,m=ee.get(A)||{width:0,height:0,left:0,right:0,top:0};if(h){var L=C;l?m.right<C?L=m.right:m.right+m.width>C+ue&&(L=m.right+m.width-ue):m.left<-C?L=-m.left:m.left+m.width>-C+ue&&(L=-(m.left+m.width-ue)),j(0),J(Xe(L))}else{var K=te;m.top<-te?K=-m.top:m.top+m.height>-te+ue&&(K=-(m.top+m.height-ue)),J(0),j(Xe(K))}}),da=i.useState(),yt=G(da,2),xe=yt[0],Le=yt[1],ua=i.useState(!1),St=G(ua,2),fa=St[0],Ct=St[1],be=T.filter(function(A){return!A.disabled}).map(function(A){return A.key}),we=function(m){var L=be.indexOf(xe||s),K=be.length,Y=(L+m+K)%K,ie=be[Y];Le(ie)},xt=function(m,L){var K=be.indexOf(m),Y=T.find(function(_e){return _e.key===m}),ie=vt(Y?.closable,Y?.closeIcon,d,Y?.disabled);ie&&(L.preventDefault(),L.stopPropagation(),d.onEdit("remove",{key:m,event:L}),K===be.length-1?we(-1):we(1))},va=function(m,L){Ct(!0),L.button===1&&xt(m,L)},ga=function(m){var L=m.code,K=l&&h,Y=be[0],ie=be[be.length-1];switch(L){case"ArrowLeft":{h&&we(K?1:-1);break}case"ArrowRight":{h&&we(K?-1:1);break}case"ArrowUp":{m.preventDefault(),h||we(-1);break}case"ArrowDown":{m.preventDefault(),h||we(1);break}case"Home":{m.preventDefault(),Le(Y);break}case"End":{m.preventDefault(),Le(ie);break}case"Enter":case"Space":{m.preventDefault(),B(xe??s,m);break}case"Backspace":case"Delete":{xt(xe,m);break}}},Ae={};h?Ae[l?"marginRight":"marginLeft"]=g:Ae.marginTop=g;var wt=T.map(function(A,m){var L=A.key;return i.createElement(jn,{id:r,prefixCls:p,key:L,tab:A,style:m===0?void 0:Ae,closable:A.closable,editable:d,active:L===s,focus:L===xe,renderWrapper:y,removeAriaLabel:f?.removeAriaLabel,tabCount:be.length,currentPosition:m+1,onClick:function(Y){B(L,Y)},onKeyDown:ga,onFocus:function(){fa||Le(L),$t(L),Ye(),k.current&&(l||(k.current.scrollLeft=0),k.current.scrollTop=0)},onBlur:function(){Le(void 0)},onMouseDown:function(Y){return va(L,Y)},onMouseUp:function(){Ct(!1)}})}),_t=function(){return Ke(function(){var m,L=new Map,K=(m=M.current)===null||m===void 0?void 0:m.getBoundingClientRect();return T.forEach(function(Y){var ie,_e=Y.key,Mt=(ie=M.current)===null||ie===void 0?void 0:ie.querySelector('[data-node-key="'.concat(Zt(_e),'"]'));if(Mt){var $a=Bn(Mt,K),De=G($a,4),ya=De[0],Sa=De[1],Ca=De[2],xa=De[3];L.set(_e,{width:ya,height:Sa,left:Ca,top:xa})}}),L})};i.useEffect(function(){_t()},[T.map(function(A){return A.key}).join("_")]);var He=Qt(function(){var A=Oe(N),m=Oe(I),L=Oe(z);E([A[0]-m[0]-L[0],A[1]-m[1]-L[1]]);var K=Oe(R);se(K);var Y=Oe(w);ce(Y);var ie=Oe(M);F([ie[0]-K[0],ie[1]-K[1]]),_t()}),ba=T.slice(0,sa),ma=T.slice(ca+1),Et=[].concat(It(ba),It(ma)),Pt=ee.get(s),ha=Pn({activeTabOffset:Pt,horizontal:h,indicator:S,rtl:l}),pa=ha.style;i.useEffect(function(){$t()},[s,ye,Se,Wt(Pt),Wt(ee),h]),i.useEffect(function(){He()},[l]);var Ot=!!Et.length,ze="".concat(p,"-nav-wrap"),Qe,Ze,Rt,Tt;return h?l?(Ze=C>0,Qe=C!==Se):(Qe=C<0,Ze=C!==ye):(Rt=te<0,Tt=te!==ye),i.createElement(et,{onResize:He},i.createElement("div",{ref:ja(t,N),role:"tablist","aria-orientation":h?"horizontal":"vertical",className:P("".concat(p,"-nav"),a),style:n,onKeyDown:function(){Ye()}},i.createElement(Gt,{ref:I,position:"left",extra:c,prefixCls:p}),i.createElement(et,{onResize:He},i.createElement("div",{className:P(ze,re(re(re(re({},"".concat(ze,"-ping-left"),Qe),"".concat(ze,"-ping-right"),Ze),"".concat(ze,"-ping-top"),Rt),"".concat(ze,"-ping-bottom"),Tt)),ref:k},i.createElement(et,{onResize:He},i.createElement("div",{ref:M,className:"".concat(p,"-nav-list"),style:{transform:"translate(".concat(C,"px, ").concat(te,"px)"),transition:Be?"none":void 0}},wt,i.createElement(ea,{ref:R,prefixCls:p,locale:f,editable:d,style:le(le({},wt.length===0?void 0:Ae),{},{visibility:Ot?"hidden":null})}),i.createElement("div",{className:P("".concat(p,"-ink-bar"),re({},"".concat(p,"-ink-bar-animated"),o.inkBar)),style:pa}))))),i.createElement(zn,ve({},e,{removeAriaLabel:f?.removeAriaLabel,ref:w,prefixCls:p,tabs:Et,className:!Ot&&ia,tabMoving:!!Be})),i.createElement(Gt,{ref:z,position:"right",extra:c,prefixCls:p})))}),ta=i.forwardRef(function(e,t){var a=e.prefixCls,n=e.className,r=e.style,o=e.id,s=e.active,l=e.tabKey,c=e.children;return i.createElement("div",{id:o&&"".concat(o,"-panel-").concat(l),role:"tabpanel",tabIndex:s?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(l),"aria-hidden":!s,style:r,className:P(a,s&&"".concat(a,"-active"),n),ref:t},c)}),An=["renderTabBar"],Hn=["label","key"],Dn=function(t){var a=t.renderTabBar,n=je(t,An),r=i.useContext(qe),o=r.tabs;if(a){var s=le(le({},n),{},{panes:o.map(function(l){var c=l.label,d=l.key,f=je(l,Hn);return i.createElement(ta,ve({tab:c,key:d,tabKey:d},f))})});return a(s,kt)}return i.createElement(kt,n)},Wn=["key","forceRender","style","className","destroyInactiveTabPane"],Gn=function(t){var a=t.id,n=t.activeKey,r=t.animated,o=t.tabPosition,s=t.destroyInactiveTabPane,l=i.useContext(qe),c=l.prefixCls,d=l.tabs,f=r.tabPane,u="".concat(c,"-tabpane");return i.createElement("div",{className:P("".concat(c,"-content-holder"))},i.createElement("div",{className:P("".concat(c,"-content"),"".concat(c,"-content-").concat(o),re({},"".concat(c,"-content-animated"),f))},d.map(function(g){var y=g.key,B=g.forceRender,O=g.style,S=g.className,b=g.destroyInactiveTabPane,p=je(g,Wn),T=y===n;return i.createElement(Ba,ve({key:y,visible:T,forceRender:B,removeOnLeave:!!(s||b),leavedClassName:"".concat(u,"-hidden")},r.tabPaneMotion),function(N,I){var z=N.style,k=N.className;return i.createElement(ta,ve({},p,{prefixCls:u,id:a,tabKey:y,animated:f,active:T,style:le(le({},O),z),className:P(S,k),ref:I}))})})))};function kn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t=le({inkBar:!0},ct(e)==="object"?e:{}),t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var Vn=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],Vt=0,Fn=i.forwardRef(function(e,t){var a=e.id,n=e.prefixCls,r=n===void 0?"rc-tabs":n,o=e.className,s=e.items,l=e.direction,c=e.activeKey,d=e.defaultActiveKey,f=e.editable,u=e.animated,g=e.tabPosition,y=g===void 0?"top":g,B=e.tabBarGutter,O=e.tabBarStyle,S=e.tabBarExtraContent,b=e.locale,p=e.more,T=e.destroyInactiveTabPane,N=e.renderTabBar,I=e.onChange,z=e.onTabClick,k=e.onTabScroll,M=e.getPopupContainer,w=e.popupClassName,R=e.indicator,h=je(e,Vn),x=i.useMemo(function(){return(s||[]).filter(function(W){return W&&ct(W)==="object"&&"key"in W})},[s]),$=l==="rtl",C=kn(u),J=i.useState(!1),H=G(J,2),V=H[0],te=H[1];i.useEffect(function(){te(Aa())},[]);var j=Nt(function(){var W;return(W=x[0])===null||W===void 0?void 0:W.key},{value:c,defaultValue:d}),_=G(j,2),ae=_[0],oe=_[1],E=i.useState(function(){return x.findIndex(function(W){return W.key===ae})}),D=G(E,2),Z=D[0],X=D[1];i.useEffect(function(){var W=x.findIndex(function(de){return de.key===ae});if(W===-1){var ce;W=Math.max(0,Math.min(Z,x.length-1)),oe((ce=x[W])===null||ce===void 0?void 0:ce.key)}X(W)},[x.map(function(W){return W.key}).join("_"),ae,Z]);var F=Nt(null,{value:a}),q=G(F,2),Q=q[0],he=q[1];i.useEffect(function(){a||(he("rc-tabs-".concat(Vt)),Vt+=1)},[]);function se(W,ce){z?.(W,ce);var de=W!==ae;oe(W),de&&I?.(W)}var pe={id:Q,activeKey:ae,animated:C,tabPosition:y,rtl:$,mobile:V},$e=le(le({},pe),{},{editable:f,locale:b,more:p,tabBarGutter:B,onTabClick:se,onTabScroll:k,extra:S,style:O,panes:null,getPopupContainer:M,popupClassName:w,indicator:R});return i.createElement(qe.Provider,{value:{tabs:x,prefixCls:r}},i.createElement("div",ve({ref:t,id:a,className:P(r,"".concat(r,"-").concat(y),re(re(re({},"".concat(r,"-mobile"),V),"".concat(r,"-editable"),f),"".concat(r,"-rtl"),$),o)},h),i.createElement(Dn,ve({},$e,{renderTabBar:N})),i.createElement(Gn,ve({destroyInactiveTabPane:T},pe,{animated:C}))))});const qn={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Kn(e,t={inkBar:!0,tabPane:!1}){let a;return t===!1?a={inkBar:!1,tabPane:!1}:t===!0?a={inkBar:!0,tabPane:!0}:a=Object.assign({inkBar:!0},typeof t=="object"?t:{}),a.tabPane&&(a.tabPaneMotion=Object.assign(Object.assign({},qn),{motionName:Ha(e,"switch")})),a}var Xn=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]]);return a};function Un(e){return e.filter(t=>t)}function Yn(e,t){if(e)return e.map(n=>{var r;const o=(r=n.destroyOnHidden)!==null&&r!==void 0?r:n.destroyInactiveTabPane;return Object.assign(Object.assign({},n),{destroyInactiveTabPane:o})});const a=Da(t).map(n=>{if(i.isValidElement(n)){const{key:r,props:o}=n,s=o||{},{tab:l}=s,c=Xn(s,["tab"]);return Object.assign(Object.assign({key:String(r)},c),{label:l})}return null});return Un(a)}const Jn=e=>{const{componentCls:t,motionDurationSlow:a}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${a}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${a}`}}}}},[Lt(e,"slide-up"),Lt(e,"slide-down")]]},Qn=e=>{const{componentCls:t,tabsCardPadding:a,cardBg:n,cardGutter:r,colorBorderSecondary:o,itemSelectedColor:s}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:a,background:n,border:`${v(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:s,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Ut(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:v(r)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:v(r)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${v(e.borderRadiusLG)} 0 0 ${v(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},Zn=e=>{const{componentCls:t,itemHoverColor:a,dropdownEdgeChildVerticalPadding:n}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},dt(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${v(n)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},ut),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${v(e.paddingXXS)} ${v(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:a}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},er=e=>{const{componentCls:t,margin:a,colorBorderSecondary:n,horizontalMargin:r,verticalItemPadding:o,verticalItemMargin:s,calc:l}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:r,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${v(e.lineWidth)} ${e.lineType} ${n}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
9
- right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
10
- > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:a,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:l(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:s},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:v(l(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${v(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:l(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${v(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},tr=e=>{const{componentCls:t,cardPaddingSM:a,cardPaddingLG:n,cardHeightSM:r,cardHeightLG:o,horizontalItemPaddingSM:s,horizontalItemPaddingLG:l}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:l,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a},[`${t}-nav-add`]:{minWidth:r,minHeight:r}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${v(e.borderRadius)} ${v(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${v(e.borderRadius)} ${v(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${v(e.borderRadius)} ${v(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${v(e.borderRadius)} 0 0 ${v(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},ar=e=>{const{componentCls:t,itemActiveColor:a,itemHoverColor:n,iconCls:r,tabsHorizontalItemMargin:o,horizontalItemPadding:s,itemSelectedColor:l,itemColor:c}=e,d=`${t}-tab`;return{[d]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:s,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:a}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${d}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},ot(e)),"&:hover":{color:n},[`&${d}-active ${d}-btn`]:{color:l,textShadow:e.tabsActiveTextShadow},[`&${d}-focus ${d}-btn:focus-visible`]:Ut(e),[`&${d}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${d}-disabled ${d}-btn, &${d}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${d}-remove ${r}`]:{margin:0,verticalAlign:"middle"},[`${r}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${d} + ${d}`]:{margin:{_skip_check_:!0,value:o}}}},nr=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:a,iconCls:n,cardGutter:r,calc:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:a},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[n]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:v(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:v(e.marginXS)},marginLeft:{_skip_check_:!0,value:v(o(e.marginXXS).mul(-1).equal())},[n]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:r},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},rr=e=>{const{componentCls:t,tabsCardPadding:a,cardHeight:n,cardGutter:r,itemHoverColor:o,itemActiveColor:s,colorBorderSecondary:l}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},dt(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:a,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:Object.assign({minWidth:n,minHeight:n,marginLeft:{_skip_check_:!0,value:r},background:"transparent",border:`${v(e.lineWidth)} ${e.lineType} ${l}`,borderRadius:`${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:s}},ot(e,-3))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),ar(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},ot(e)),{"&-hidden":{display:"none"}})}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},ir=e=>{const{cardHeight:t,cardHeightSM:a,cardHeightLG:n,controlHeight:r,controlHeightLG:o}=e,s=t||o,l=a||r,c=n||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:s,cardHeightSM:l,cardHeightLG:c,cardPadding:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(l-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}},or=lt("Tabs",e=>{const t=st(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${v(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${v(e.horizontalItemGutter)}`});return[tr(t),nr(t),er(t),Zn(t),Qn(t),rr(t),Jn(t)]},ir),lr=()=>null;var sr=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]]);return a};const cr=i.forwardRef((e,t)=>{var a,n,r,o,s,l,c,d,f,u,g;const{type:y,className:B,rootClassName:O,size:S,onEdit:b,hideAdd:p,centered:T,addIcon:N,removeIcon:I,moreIcon:z,more:k,popupClassName:M,children:w,items:R,animated:h,style:x,indicatorSize:$,indicator:C,destroyInactiveTabPane:J,destroyOnHidden:H}=e,V=sr(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:te}=V,{direction:j,tabs:_,getPrefixCls:ae,getPopupContainer:oe}=i.useContext(me),E=ae("tabs",te),D=Wa(E),[Z,X,F]=or(E,D),q=i.useRef(null);i.useImperativeHandle(t,()=>({nativeElement:q.current}));let Q;y==="editable-card"&&(Q={onEdit:(de,{key:Ce,event:Ie})=>{b?.(de==="add"?Ie:Ce,de)},removeIcon:(a=I??_?.removeIcon)!==null&&a!==void 0?a:i.createElement(Ga,null),addIcon:(N??_?.addIcon)||i.createElement(En,null),showAdd:p!==!0});const he=ae(),se=Yt(S),pe=Yn(R,w),$e=Kn(E,h),W=Object.assign(Object.assign({},_?.style),x),ce={align:(n=C?.align)!==null&&n!==void 0?n:(r=_?.indicator)===null||r===void 0?void 0:r.align,size:(c=(s=(o=C?.size)!==null&&o!==void 0?o:$)!==null&&s!==void 0?s:(l=_?.indicator)===null||l===void 0?void 0:l.size)!==null&&c!==void 0?c:_?.indicatorSize};return Z(i.createElement(Fn,Object.assign({ref:q,direction:j,getPopupContainer:oe},V,{items:pe,className:P({[`${E}-${se}`]:se,[`${E}-card`]:["card","editable-card"].includes(y),[`${E}-editable-card`]:y==="editable-card",[`${E}-centered`]:T},_?.className,B,O,X,F,D),popupClassName:P(M,X,F,D),style:W,editable:Q,more:Object.assign({icon:(g=(u=(f=(d=_?.more)===null||d===void 0?void 0:d.icon)!==null&&f!==void 0?f:_?.moreIcon)!==null&&u!==void 0?u:z)!==null&&g!==void 0?g:i.createElement(ka,null),transitionName:`${he}-slide-up`},k),prefixCls:E,animated:$e,indicator:ce,destroyInactiveTabPane:H??J})))}),aa=cr;aa.TabPane=lr;var dr=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]]);return a};const na=e=>{var{prefixCls:t,className:a,hoverable:n=!0}=e,r=dr(e,["prefixCls","className","hoverable"]);const{getPrefixCls:o}=i.useContext(me),s=o("card",t),l=P(`${s}-grid`,a,{[`${s}-grid-hoverable`]:n});return i.createElement("div",Object.assign({},r,{className:l}))},ur=e=>{const{antCls:t,componentCls:a,headerHeight:n,headerPadding:r,tabsMarginBottom:o}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,marginBottom:-1,padding:`0 ${v(r)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${v(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)} 0 0`},ft()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},ut),{[`
11
- > ${a}-typography,
12
- > ${a}-typography-edit-content
13
- `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:o,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${v(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},fr=e=>{const{cardPaddingBase:t,colorBorderSecondary:a,cardShadow:n,lineWidth:r}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
14
- ${v(r)} 0 0 0 ${a},
15
- 0 ${v(r)} 0 0 ${a},
16
- ${v(r)} ${v(r)} 0 0 ${a},
17
- ${v(r)} 0 0 0 ${a} inset,
18
- 0 ${v(r)} 0 0 ${a} inset;
19
- `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:n}}},vr=e=>{const{componentCls:t,iconCls:a,actionsLiMargin:n,cardActionsIconSize:r,colorBorderSecondary:o,actionsBg:s}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:s,borderTop:`${v(e.lineWidth)} ${e.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)}`},ft()),{"& > li":{margin:n,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), > ${a}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:v(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${a}`]:{fontSize:r,lineHeight:v(e.calc(r).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${v(e.lineWidth)} ${e.lineType} ${o}`}}})},gr=e=>Object.assign(Object.assign({margin:`${v(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},ft()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},ut),"&-description":{color:e.colorTextDescription}}),br=e=>{const{componentCls:t,colorFillAlter:a,headerPadding:n,bodyPadding:r}=e;return{[`${t}-head`]:{padding:`0 ${v(n)}`,background:a,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${v(e.padding)} ${v(r)}`}}},mr=e=>{const{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}},hr=e=>{const{componentCls:t,cardShadow:a,cardHeadPadding:n,colorBorderSecondary:r,boxShadowTertiary:o,bodyPadding:s,extraColor:l}=e;return{[t]:Object.assign(Object.assign({},dt(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:o},[`${t}-head`]:ur(e),[`${t}-extra`]:{marginInlineStart:"auto",color:l,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:s,borderRadius:`0 0 ${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)}`},[`${t}-grid`]:fr(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:vr(e),[`${t}-meta`]:gr(e)}),[`${t}-bordered`]:{border:`${v(e.lineWidth)} ${e.lineType} ${r}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:a}},[`${t}-contain-grid`]:{borderRadius:`${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)} 0 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:n}}},[`${t}-type-inner`]:br(e),[`${t}-loading`]:mr(e),[`${t}-rtl`]:{direction:"rtl"}}},pr=e=>{const{componentCls:t,bodyPaddingSM:a,headerPaddingSM:n,headerHeightSM:r,headerFontSizeSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:r,padding:`0 ${v(n)}`,fontSize:o,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:a}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},$r=e=>{var t,a;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:(t=e.bodyPadding)!==null&&t!==void 0?t:e.paddingLG,headerPadding:(a=e.headerPadding)!==null&&a!==void 0?a:e.paddingLG}},yr=lt("Card",e=>{const t=st(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[hr(t),pr(t)]},$r);var Ft=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]]);return a};const Sr=e=>{const{actionClasses:t,actions:a=[],actionStyle:n}=e;return i.createElement("ul",{className:t,style:n},a.map((r,o)=>{const s=`action-${o}`;return i.createElement("li",{style:{width:`${100/a.length}%`},key:s},i.createElement("span",null,r))}))},Cr=i.forwardRef((e,t)=>{const{prefixCls:a,className:n,rootClassName:r,style:o,extra:s,headStyle:l={},bodyStyle:c={},title:d,loading:f,bordered:u,variant:g,size:y,type:B,cover:O,actions:S,tabList:b,children:p,activeTabKey:T,defaultActiveTabKey:N,tabBarExtraContent:I,hoverable:z,tabProps:k={},classNames:M,styles:w}=e,R=Ft(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:h,direction:x,card:$}=i.useContext(me),[C]=Va("card",g,u),J=ee=>{var U;(U=e.onTabChange)===null||U===void 0||U.call(e,ee)},H=ee=>{var U;return P((U=$?.classNames)===null||U===void 0?void 0:U[ee],M?.[ee])},V=ee=>{var U;return Object.assign(Object.assign({},(U=$?.styles)===null||U===void 0?void 0:U[ee]),w?.[ee])},te=i.useMemo(()=>{let ee=!1;return i.Children.forEach(p,U=>{U?.type===na&&(ee=!0)}),ee},[p]),j=h("card",a),[_,ae,oe]=yr(j),E=i.createElement(Me,{loading:!0,active:!0,paragraph:{rows:4},title:!1},p),D=T!==void 0,Z=Object.assign(Object.assign({},k),{[D?"activeKey":"defaultActiveKey"]:D?T:N,tabBarExtraContent:I});let X;const F=Yt(y),q=!F||F==="default"?"large":F,Q=b?i.createElement(aa,Object.assign({size:q},Z,{className:`${j}-head-tabs`,onChange:J,items:b.map(ee=>{var{tab:U}=ee,ge=Ft(ee,["tab"]);return Object.assign({label:U},ge)})})):null;if(d||s||Q){const ee=P(`${j}-head`,H("header")),U=P(`${j}-head-title`,H("title")),ge=P(`${j}-extra`,H("extra")),Ne=Object.assign(Object.assign({},l),V("header"));X=i.createElement("div",{className:ee,style:Ne},i.createElement("div",{className:`${j}-head-wrapper`},d&&i.createElement("div",{className:U,style:V("title")},d),s&&i.createElement("div",{className:ge,style:V("extra")},s)),Q)}const he=P(`${j}-cover`,H("cover")),se=O?i.createElement("div",{className:he,style:V("cover")},O):null,pe=P(`${j}-body`,H("body")),$e=Object.assign(Object.assign({},c),V("body")),W=i.createElement("div",{className:pe,style:$e},f?E:p),ce=P(`${j}-actions`,H("actions")),de=S?.length?i.createElement(Sr,{actionClasses:ce,actionStyle:V("actions"),actions:S}):null,Ce=ke(R,["onTabChange"]),Ie=P(j,$?.className,{[`${j}-loading`]:f,[`${j}-bordered`]:C!=="borderless",[`${j}-hoverable`]:z,[`${j}-contain-grid`]:te,[`${j}-contain-tabs`]:b?.length,[`${j}-${F}`]:F,[`${j}-type-${B}`]:!!B,[`${j}-rtl`]:x==="rtl"},n,r,ae,oe),Ke=Object.assign(Object.assign({},$?.style),o);return _(i.createElement("div",Object.assign({ref:t},Ce,{className:Ie,style:Ke}),X,se,W,de))});var xr=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]]);return a};const wr=e=>{const{prefixCls:t,className:a,avatar:n,title:r,description:o}=e,s=xr(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:l}=i.useContext(me),c=l("card",t),d=P(`${c}-meta`,a),f=n?i.createElement("div",{className:`${c}-meta-avatar`},n):null,u=r?i.createElement("div",{className:`${c}-meta-title`},r):null,g=o?i.createElement("div",{className:`${c}-meta-description`},o):null,y=u||g?i.createElement("div",{className:`${c}-meta-detail`},u,g):null;return i.createElement("div",Object.assign({},s,{className:d}),f,y)},ra=Cr;ra.Grid=na;ra.Meta=wr;export{ra as C,xn as D,En as R,Me as S,aa as T,Fa as a,Er as m,Jt as r,Pr as u};
20
- //# sourceMappingURL=index-B4zZ11c-.js.map