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,2 +1,2 @@
1
- import{r as c,I as $,_ as H,s as n,U as Y,Q as R,a as O,b as A,ai as X,u as _,bK as D,j as e,W as K,Z as P,B as N,bL as Z,c as ee,S as te}from"./index-HJggy9SZ.js";import{e as U,t as q}from"./errorCodeTranslator-Xn_Z9qOh.js";import{u as ne,F as C}from"./useAuth-4erTEEjT.js";import{C as oe}from"./index-B4zZ11c-.js";import{T as W}from"./index-mHLzQpzS.js";import{R as z}from"./CheckCircleOutlined-BS_TxY3k.js";import{S as re,R as ie}from"./ThunderboltOutlined-DhgtXoNM.js";import{R as M}from"./index-Cg2Wi2pt.js";import{I as se}from"./index-DiwSYMD5.js";import{D as G}from"./index-D4mbR-Vx.js";import"./row-CQQO4x82.js";var ae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5l-41.1 41.1-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-65.3 65.3a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.06 304.06 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644c-60.9 0-118.2-23.7-161.2-66.8-43.1-43-66.8-100.3-66.8-161.2 0-60.9 23.7-118.2 66.8-161.2 43-43.1 100.3-66.8 161.2-66.8 60.9 0 118.2 23.7 161.2 66.8 43.1 43 66.8 100.3 66.8 161.2 0 60.9-23.7 118.2-66.8 161.2z"}}]},name:"key",theme:"outlined"},le=function(r,l){return c.createElement($,H({},r,{ref:l,icon:ae}))},V=c.forwardRef(le),ce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z"}}]},name:"rocket",theme:"outlined"},ge=function(r,l){return c.createElement($,H({},r,{ref:l,icon:ce}))},de=c.forwardRef(ge),ue={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"},fe=function(r,l){return c.createElement($,H({},r,{ref:l,icon:ue}))},Q=c.forwardRef(fe);const he=600*1e3;function pe({enabled:t,onAuthenticated:r,refetchAuthStatus:l,isAuthenticated:i}){const s=c.useRef(null),o=c.useRef(null),a=c.useCallback(()=>{s.current&&(clearInterval(s.current),s.current=null),o.current=null},[]);return c.useEffect(()=>(t?(o.current||(o.current=Date.now(),console.log("[LoginPolling] Starting polling for interactive login...")),s.current||(s.current=setInterval(async()=>{try{if(o.current&&Date.now()-o.current>he){console.log("[LoginPolling] Polling timeout reached, stopping..."),a(),n.warning("登录超时,请重试");return}console.log("[LoginPolling] Polling auth status...");const h=await l();i(h)&&(console.log("[LoginPolling] Authentication detected via polling!"),a(),r())}catch(h){console.error("[LoginPolling] Polling error:",h)}},2e3))):a(),()=>{a()}),[t,l,i,r,a]),{stopPolling:a}}function me({onLoginSuccess:t,refetchAuthStatus:r,isAuthenticated:l,startPolling:i,stopPolling:s}){const o=Y(),a=c.useRef(!1),h=c.useCallback(async()=>{s(),a.current=!1,n.loading({content:"✅ 登录成功,正在验证登录状态...",key:"login-success",duration:0}),o.invalidateQueries({queryKey:R.AUTH_STATUS}),o.invalidateQueries({queryKey:R.CONFIG}),await new Promise(u=>setTimeout(u,1e3));let f=!1;const p=3;for(let u=0;u<p;u++)try{const b=await r();if(console.log(`[InteractiveLogin] Auth status check (attempt ${u+1}/${p}):`,b),l(b)){f=!0,console.log("[InteractiveLogin] Authentication confirmed");break}u<p-1&&await new Promise(x=>setTimeout(x,500))}catch(b){console.error(`[InteractiveLogin] Auth status check error (attempt ${u+1}/${p}):`,b),u<p-1&&await new Promise(x=>setTimeout(x,500))}n.destroy("login-success"),f?(console.log("[InteractiveLogin] Authentication confirmed, navigating to dashboard..."),n.success("✅ 登录成功!正在跳转到 Dashboard...",2),await new Promise(u=>setTimeout(u,800)),window.location.href="/dashboard"):(console.warn("[InteractiveLogin] Auth status not confirmed after retries"),n.warning('登录状态验证失败,请手动刷新页面或点击"检查登录状态"按钮',4)),t?.()},[s,o,r,l,t]);c.useEffect(()=>{if(!(typeof window<"u"&&window.electron)||!window.electron?.onLoginSuccess)return;console.log("[InteractiveLogin] Registering IPC event listeners for Electron login...");const p=async g=>{console.log("[InteractiveLogin] Received login-success event from Electron:",g);try{s(),a.current=!1,g.refreshToken?(console.log("[InteractiveLogin] RefreshToken received from Electron"),n.loading({content:"✅ 已获取授权码,正在交换 Token...",key:"login-progress",duration:0}),await new Promise(d=>setTimeout(d,500)),n.loading({content:"✅ Token 交换成功,正在保存到后端配置...",key:"login-progress",duration:0}),await new Promise(d=>setTimeout(d,1e3)),n.loading({content:"✅ Token 已保存,正在验证登录状态...",key:"login-progress",duration:0})):n.loading({content:"✅ 登录成功,正在验证登录状态...",key:"login-progress",duration:0}),o.invalidateQueries({queryKey:R.AUTH_STATUS}),o.invalidateQueries({queryKey:R.CONFIG}),await new Promise(d=>setTimeout(d,1e3));let m=!1;const I=3;for(let d=0;d<I;d++)try{const T=await r();if(console.log(`[InteractiveLogin] Auth status check (attempt ${d+1}/${I}):`,T),l(T)){m=!0,console.log("[InteractiveLogin] Authentication confirmed");break}d<I-1&&await new Promise(E=>setTimeout(E,500))}catch(T){console.error(`[InteractiveLogin] Auth status check error (attempt ${d+1}/${I}):`,T),d<I-1&&await new Promise(E=>setTimeout(E,500))}n.destroy("login-progress"),m?(console.log("[InteractiveLogin] Authentication confirmed, navigating to dashboard..."),n.success("✅ 登录成功!正在跳转到 Dashboard...",2),await new Promise(d=>setTimeout(d,800)),window.location.href="/dashboard"):g.refreshToken?(console.warn("[InteractiveLogin] Has token but auth status not confirmed, attempting navigation..."),n.warning("登录状态验证失败,但将尝试跳转...",3),await new Promise(d=>setTimeout(d,1e3)),window.location.href="/dashboard"):(console.error("[InteractiveLogin] Authentication not confirmed after retries"),n.warning('登录成功,但状态验证失败。请手动刷新页面或点击"检查登录状态"按钮。',4))}catch(m){const I=m instanceof Error?m.message:"未知错误";console.error("[InteractiveLogin] Error handling login-success event:",m),n.destroy("login-progress"),n.error("处理登录成功事件时出错: "+I,4)}},u=g=>{console.error("[InteractiveLogin] Received login-error event from Electron:",g),s(),a.current=!1;const m=g.message||"未知错误";n.error("登录失败: "+m,4)},b=window.electron.onLoginSuccess(p),x=window.electron.onLoginError(u);return()=>{console.log("[InteractiveLogin] Cleaning up IPC event listeners..."),b&&typeof b=="function"&&b(),x&&typeof x=="function"&&x()}},[o,r,l,s]);const k=c.useCallback(async f=>{if(typeof window<"u"&&window.electron&&window.electron?.openLoginWindow){console.log("[InteractiveLogin] Using Electron system browser login...");try{n.info("正在打开系统浏览器进行登录...",3),a.current=!0,i();const g=await window.electron.openLoginWindow();if(!g.success){if(g.cancelled){s(),a.current=!1,n.info("登录已取消",2);return}throw new Error(g.error||"无法打开登录窗口")}console.log("[InteractiveLogin] Login window opened, waiting for login-success or login-error event..."),n.info("请在浏览器中完成登录,系统会自动检测登录状态...",5)}catch(g){const m=g instanceof Error?g.message:"未知错误";console.error("[InteractiveLogin] Failed to open Electron login window:",g),n.error("无法打开登录窗口: "+m,4),s(),a.current=!1}return}const u="",b="",x=f?.data?.data?.network?.proxy?.enabled?f.data.data.network.proxy:void 0;s(),a.current=!0,i(),console.log("[InteractiveLogin] Starting interactive login via backend API, polling will begin...");try{await O.login(u,b,!1,x)}catch(g){const m=g;if(m?.code==="ECONNABORTED"||m?.message?.includes("timeout")){console.log("[InteractiveLogin] Interactive login API timeout, but continuing to poll for status..."),n.info("正在等待浏览器登录完成,系统会自动检测登录状态...",5);return}s(),a.current=!1;const d=m?.message||(g instanceof Error?g.message:"未知错误");throw new Error(d)}},[i,s]),S=c.useCallback(async()=>{try{n.loading({content:"正在检查登录状态...",key:"checkStatus",duration:0});const f=await r();n.destroy("checkStatus"),l(f)?(n.success("✅ 已登录,正在跳转...",2),h()):(n.info("尚未登录,请完成浏览器中的登录流程。系统会自动检测登录状态。",4),a.current||(a.current=!0,i()))}catch(f){n.destroy("checkStatus");const p=f instanceof Error?f.message:"未知错误";n.error("检查登录状态失败: "+p,4),console.error("[InteractiveLogin] Manual status check error:",f)}},[r,l,h,i]);return{handleInteractiveLogin:k,handleCheckStatus:S,isActive:a.current}}function xe(){const{t}=A(),r=X(),[l,i]=c.useState("interactive"),[s,o]=c.useState(0),[a,h]=c.useState(!1),{data:k,isLoading:S,refetch:f}=_({queryKey:R.AUTH_STATUS,queryFn:()=>O.getAuthStatus(),retry:!1,staleTime:0,refetchOnMount:!0,refetchInterval:!1}),{data:p}=_({queryKey:R.CONFIG,queryFn:()=>O.getConfig()}),{loginWithTokenAsync:u,isLoggingInWithToken:b}=ne(),x=c.useCallback(j=>{const v=D(j);return console.log("[Login] Auth check:",{authenticated:v,response:j}),v},[D]),g=c.useCallback(async()=>{h(!1),o(2),n.loading({content:"✅ 登录成功,正在验证登录状态...",key:"login-success",duration:0}),await new Promise(y=>setTimeout(y,1e3));let j=!1;const v=3;for(let y=0;y<v;y++)try{const w=await f();if(console.log(`[Login] Auth status check (attempt ${y+1}/${v}):`,w),x(w)){j=!0,console.log("[Login] Authentication confirmed");break}y<v-1&&await new Promise(L=>setTimeout(L,500))}catch(w){console.error(`[Login] Auth status check error (attempt ${y+1}/${v}):`,w),y<v-1&&await new Promise(L=>setTimeout(L,500))}n.destroy("login-success"),j?(console.log("[Login] Authentication confirmed, navigating to dashboard..."),n.success("✅ 登录成功!正在跳转到 Dashboard...",2),await new Promise(y=>setTimeout(y,800)),window.location.href="/dashboard"):(console.warn("[Login] Auth status not confirmed after retries"),n.warning('登录状态验证失败,请手动刷新页面或点击"检查登录状态"按钮',4))},[f,x]),m=c.useCallback(()=>{h(!0)},[]),I=c.useCallback(()=>{h(!1)},[]),d=c.useCallback(async()=>await f(),[f]);pe({enabled:a,onAuthenticated:()=>{g()},refetchAuthStatus:d,isAuthenticated:x});const{handleInteractiveLogin:T,handleCheckStatus:E}=me({onLoginSuccess:()=>o(2),refetchAuthStatus:d,isAuthenticated:x,startPolling:m,stopPolling:I}),J=c.useCallback(async j=>{if(o(1),l==="token"){const v=j?.refreshToken;if(!v||v.trim()===""){n.error("请输入 refreshToken"),o(0);return}try{await u(v.trim()),g()}catch(y){const{errorCode:w,message:L}=U(y);o(0);const B=typeof L=="string"?L:typeof L=="object"&&L!==null?JSON.stringify(L):String(L||t("AUTH_LOGIN_FAILED"));w?n.error(q(w,t,void 0,B||t("AUTH_LOGIN_FAILED"))):n.error(B||t("AUTH_LOGIN_FAILED"))}return}try{await T(p)}catch(v){const{errorCode:y,message:w}=U(v);o(0);const L=typeof w=="string"?w:typeof w=="object"&&w!==null?JSON.stringify(w):String(w||t("AUTH_LOGIN_FAILED"));y?n.error(q(y,t,void 0,L||t("AUTH_LOGIN_FAILED"))):n.error(L||t("AUTH_LOGIN_FAILED"))}},[l,u,g,T,p,t]);return{loginMode:l,loginStep:s,isLoggingIn:a||s===1,isLoggingInWithToken:b,authStatusLoading:S,authStatus:k,isAuthenticated:x,setLoginMode:i,handleLogin:J,handleCheckStatus:E,navigate:r}}function ye({children:t}){return e.jsxs("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",padding:"20px",position:"relative",overflow:"hidden"},children:[e.jsx("div",{style:{position:"absolute",top:"-10%",right:"-5%",width:"500px",height:"500px",borderRadius:"50%",background:"rgba(255, 255, 255, 0.1)",filter:"blur(60px)"}}),e.jsx("div",{style:{position:"absolute",bottom:"-10%",left:"-5%",width:"400px",height:"400px",borderRadius:"50%",background:"rgba(255, 255, 255, 0.1)",filter:"blur(60px)"}}),e.jsx(oe,{style:{width:"100%",maxWidth:480,boxShadow:"0 20px 60px rgba(0,0,0,0.3)",borderRadius:"16px",position:"relative",zIndex:1},children:t})]})}const{Title:ve,Text:we}=W;function Le(){const{t}=A();return e.jsxs("div",{style:{textAlign:"center",marginBottom:8},children:[e.jsx("div",{style:{width:"80px",height:"80px",margin:"0 auto 16px",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",borderRadius:"20px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 8px 16px rgba(102, 126, 234, 0.4)"},children:e.jsx(de,{style:{fontSize:"40px",color:"white"}})}),e.jsx(ve,{level:2,style:{margin:"0 0 8px 0",fontSize:"28px",fontWeight:700},children:"PixivFlow"}),e.jsx(we,{type:"secondary",style:{fontSize:"15px"},children:t("login.subtitle")})]})}const{Text:F}=W;function be(){const{t}=A();return e.jsx("div",{style:{background:"linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%)",padding:"16px",borderRadius:"12px",marginBottom:8},children:e.jsxs(K,{direction:"vertical",size:"small",style:{width:"100%"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx(z,{style:{color:"#52c41a",fontSize:"16px"}}),e.jsx(F,{style:{fontSize:"13px"},children:t("login.featureSecure")})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx(z,{style:{color:"#52c41a",fontSize:"16px"}}),e.jsx(F,{style:{fontSize:"13px"},children:t("login.featureSave")})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx(z,{style:{color:"#52c41a",fontSize:"16px"}}),e.jsx(F,{style:{fontSize:"13px"},children:t("login.featureMulti")})]})]})})}function Ie({current:t}){const{t:r}=A();return e.jsx(re,{current:t,size:"small",items:[{title:r("login.stepMode"),icon:e.jsx(Q,{})},{title:r("login.stepAuth"),icon:e.jsx(ie,{})},{title:r("login.stepDone"),icon:e.jsx(z,{})}],style:{marginBottom:8}})}function ke({value:t,onChange:r,onResetFields:l}){const{t:i}=A();return e.jsxs(e.Fragment,{children:[e.jsx(C.Item,{label:e.jsx("span",{style:{fontSize:"15px",fontWeight:600},children:i("login.loginMode")}),style:{marginBottom:20},children:e.jsxs(M.Group,{value:t,onChange:s=>{r(s.target.value),setTimeout(()=>{l()},0)},buttonStyle:"solid",style:{width:"100%",display:"flex",flexWrap:"wrap",gap:"8px"},children:[e.jsxs(M.Button,{value:"interactive",style:{flex:1,minWidth:"120px",textAlign:"center",height:"48px",lineHeight:"48px",fontSize:"14px",fontWeight:500},children:[e.jsx(Q,{})," ",i("login.loginModeInteractive")]}),e.jsxs(M.Button,{value:"token",style:{flex:1,minWidth:"120px",textAlign:"center",height:"48px",lineHeight:"48px",fontSize:"14px",fontWeight:500},children:[e.jsx(V,{})," ",i("login.loginModeToken")]})]})}),t==="interactive"&&e.jsx(P,{message:e.jsx("span",{style:{fontWeight:600},children:i("login.loginModeInteractive")}),description:e.jsxs("div",{style:{fontSize:"13px"},children:[e.jsx("div",{style:{marginBottom:8},children:i("login.loginModeInteractiveDesc")}),e.jsx("div",{style:{padding:"8px 12px",background:"rgba(24, 144, 255, 0.1)",borderRadius:"6px",borderLeft:"3px solid #1890ff"},children:i("login.browserWindowNote")})]}),type:"info",showIcon:!0,style:{marginBottom:20}}),t==="token"&&e.jsx(P,{message:e.jsx("span",{style:{fontWeight:600},children:i("login.loginModeToken")}),description:e.jsxs("div",{style:{fontSize:"13px"},children:[e.jsx("div",{style:{marginBottom:8},children:i("login.loginModeTokenDesc")}),e.jsxs("div",{style:{padding:"8px 12px",background:"rgba(82, 196, 26, 0.1)",borderRadius:"6px",borderLeft:"3px solid #52c41a"},children:[e.jsx("strong",{children:i("login.loginModeTokenTipLabel")}),i("login.loginModeTokenTip")]})]}),type:"success",showIcon:!0,style:{marginBottom:20}})]})}function je({loginMode:t,isLoggingIn:r,isLoggingInWithToken:l,onLogin:i,onCheckStatus:s}){const{t:o}=A(),[a]=C.useForm(),h=r||l,k=()=>{t==="token"?a.validateFields(["refreshToken"]).then(()=>{const S=a.getFieldsValue();i(S)}).catch(()=>{}):i()};return e.jsxs(C,{form:a,name:"login",onFinish:k,layout:"vertical",size:"large",autoComplete:"off",children:[t==="token"&&e.jsx(C.Item,{name:"refreshToken",label:e.jsxs("span",{style:{fontSize:"14px",fontWeight:500},children:[e.jsx(V,{style:{marginRight:8}})," Refresh Token"]}),rules:[{required:!0,message:o("login.tokenRequired")},{min:10,message:o("login.tokenInvalid")}],children:e.jsx(se.TextArea,{placeholder:o("login.tokenPlaceholder"),autoSize:{minRows:3,maxRows:6},style:{fontSize:"14px",fontFamily:"monospace"}})}),e.jsx(C.Item,{style:{marginBottom:16},children:e.jsx(N,{type:"primary",htmlType:"button",block:!0,icon:e.jsx(Z,{}),loading:h,size:"large",onClick:k,style:{height:"48px",fontSize:"16px",fontWeight:600,borderRadius:"8px",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",border:"none",boxShadow:"0 4px 12px rgba(102, 126, 234, 0.4)"},children:o(h?"login.loggingIn":"login.loginButton")})}),h&&e.jsx(P,{message:e.jsx("span",{style:{fontWeight:600},children:o("login.processing")}),description:e.jsx("div",{style:{fontSize:"13px",lineHeight:"1.6"},children:t==="interactive"?e.jsxs("div",{children:[e.jsx("div",{style:{marginBottom:12,color:"rgba(0, 0, 0, 0.65)"},children:o("login.processingInteractiveDesc")}),s&&e.jsxs("div",{style:{padding:"12px",background:"rgba(24, 144, 255, 0.08)",borderRadius:"8px",borderLeft:"3px solid #1890ff",marginTop:12},children:[e.jsxs("div",{style:{marginBottom:10,color:"rgba(0, 0, 0, 0.65)"},children:[e.jsx("strong",{style:{color:"#1890ff"},children:o("login.tipLabel")}),o("login.checkStatusHint")]}),e.jsx(N,{type:"primary",size:"small",icon:e.jsx(ee,{}),onClick:s,style:{width:"100%",height:"32px",borderRadius:"6px"},children:o("login.checkStatus")})]})]}):t==="token"?e.jsx("div",{style:{color:"rgba(0, 0, 0, 0.65)"},children:o("login.verifying")}):null}),type:"info",showIcon:!0,style:{marginTop:0,borderRadius:"8px"}})]})}const{Paragraph:Se}=W;function We(){const{t}=A(),{loginMode:r,loginStep:l,isLoggingIn:i,isLoggingInWithToken:s,authStatusLoading:o,authStatus:a,isAuthenticated:h,setLoginMode:k,handleLogin:S,handleCheckStatus:f,navigate:p}=xe();return c.useEffect(()=>{!o&&h(a)&&p("/dashboard",{replace:!0})},[o,a,p,h]),o?e.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"},children:e.jsx(te,{size:"large"})}):e.jsx(ye,{children:e.jsxs(K,{direction:"vertical",size:"large",style:{width:"100%"},children:[e.jsx(Le,{}),(i||s)&&e.jsx(Ie,{current:l}),!i&&!s&&e.jsx(be,{}),e.jsx(G,{style:{margin:"8px 0"}}),e.jsx(ke,{value:r,onChange:k,onResetFields:()=>{const u=document.querySelector('form[name="login"]');u&&u.reset()}}),e.jsx(je,{loginMode:r,isLoggingIn:i,isLoggingInWithToken:s,onLogin:S,onCheckStatus:f}),e.jsx(G,{style:{margin:"8px 0"}}),e.jsx("div",{style:{textAlign:"center"},children:e.jsx(Se,{type:"secondary",style:{fontSize:"12px",margin:"0 0 12px 0",lineHeight:"1.6"},children:t("login.note")})})]})})}export{We as default};
2
- //# sourceMappingURL=index-ZRYuscJf.js.map
1
+ import{r as c,I as $,_ as H,s as n,U as Y,Q as R,a as O,b as A,ai as X,u as _,bK as D,j as e,W as K,Z as P,B as N,bL as Z,c as ee,S as te}from"./index-BtXc5-H2.js";import{e as U,t as q}from"./errorCodeTranslator-D5vahyqQ.js";import{u as ne,F as C}from"./useAuth-BfM9bg0I.js";import{C as oe}from"./index-Cfg0ICF_.js";import{T as W}from"./index-xZubvNRw.js";import{R as z}from"./CheckCircleOutlined-DXxMdP08.js";import{S as re,R as ie}from"./ThunderboltOutlined-BlHGTLpd.js";import{R as M}from"./index-CZXbP5HB.js";import{I as se}from"./index-B84Vd9_M.js";import{D as G}from"./index-D8iUeVsP.js";import"./row-DaMDSIar.js";var ae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5l-41.1 41.1-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-65.3 65.3a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.06 304.06 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644c-60.9 0-118.2-23.7-161.2-66.8-43.1-43-66.8-100.3-66.8-161.2 0-60.9 23.7-118.2 66.8-161.2 43-43.1 100.3-66.8 161.2-66.8 60.9 0 118.2 23.7 161.2 66.8 43.1 43 66.8 100.3 66.8 161.2 0 60.9-23.7 118.2-66.8 161.2z"}}]},name:"key",theme:"outlined"},le=function(r,l){return c.createElement($,H({},r,{ref:l,icon:ae}))},V=c.forwardRef(le),ce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z"}}]},name:"rocket",theme:"outlined"},ge=function(r,l){return c.createElement($,H({},r,{ref:l,icon:ce}))},de=c.forwardRef(ge),ue={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"},fe=function(r,l){return c.createElement($,H({},r,{ref:l,icon:ue}))},Q=c.forwardRef(fe);const he=600*1e3;function pe({enabled:t,onAuthenticated:r,refetchAuthStatus:l,isAuthenticated:i}){const s=c.useRef(null),o=c.useRef(null),a=c.useCallback(()=>{s.current&&(clearInterval(s.current),s.current=null),o.current=null},[]);return c.useEffect(()=>(t?(o.current||(o.current=Date.now(),console.log("[LoginPolling] Starting polling for interactive login...")),s.current||(s.current=setInterval(async()=>{try{if(o.current&&Date.now()-o.current>he){console.log("[LoginPolling] Polling timeout reached, stopping..."),a(),n.warning("登录超时,请重试");return}console.log("[LoginPolling] Polling auth status...");const h=await l();i(h)&&(console.log("[LoginPolling] Authentication detected via polling!"),a(),r())}catch(h){console.error("[LoginPolling] Polling error:",h)}},2e3))):a(),()=>{a()}),[t,l,i,r,a]),{stopPolling:a}}function me({onLoginSuccess:t,refetchAuthStatus:r,isAuthenticated:l,startPolling:i,stopPolling:s}){const o=Y(),a=c.useRef(!1),h=c.useCallback(async()=>{s(),a.current=!1,n.loading({content:"✅ 登录成功,正在验证登录状态...",key:"login-success",duration:0}),o.invalidateQueries({queryKey:R.AUTH_STATUS}),o.invalidateQueries({queryKey:R.CONFIG}),await new Promise(u=>setTimeout(u,1e3));let f=!1;const p=3;for(let u=0;u<p;u++)try{const b=await r();if(console.log(`[InteractiveLogin] Auth status check (attempt ${u+1}/${p}):`,b),l(b)){f=!0,console.log("[InteractiveLogin] Authentication confirmed");break}u<p-1&&await new Promise(x=>setTimeout(x,500))}catch(b){console.error(`[InteractiveLogin] Auth status check error (attempt ${u+1}/${p}):`,b),u<p-1&&await new Promise(x=>setTimeout(x,500))}n.destroy("login-success"),f?(console.log("[InteractiveLogin] Authentication confirmed, navigating to dashboard..."),n.success("✅ 登录成功!正在跳转到 Dashboard...",2),await new Promise(u=>setTimeout(u,800)),window.location.href="/dashboard"):(console.warn("[InteractiveLogin] Auth status not confirmed after retries"),n.warning('登录状态验证失败,请手动刷新页面或点击"检查登录状态"按钮',4)),t?.()},[s,o,r,l,t]);c.useEffect(()=>{if(!(typeof window<"u"&&window.electron)||!window.electron?.onLoginSuccess)return;console.log("[InteractiveLogin] Registering IPC event listeners for Electron login...");const p=async g=>{console.log("[InteractiveLogin] Received login-success event from Electron:",g);try{s(),a.current=!1,g.refreshToken?(console.log("[InteractiveLogin] RefreshToken received from Electron"),n.loading({content:"✅ 已获取授权码,正在交换 Token...",key:"login-progress",duration:0}),await new Promise(d=>setTimeout(d,500)),n.loading({content:"✅ Token 交换成功,正在保存到后端配置...",key:"login-progress",duration:0}),await new Promise(d=>setTimeout(d,1e3)),n.loading({content:"✅ Token 已保存,正在验证登录状态...",key:"login-progress",duration:0})):n.loading({content:"✅ 登录成功,正在验证登录状态...",key:"login-progress",duration:0}),o.invalidateQueries({queryKey:R.AUTH_STATUS}),o.invalidateQueries({queryKey:R.CONFIG}),await new Promise(d=>setTimeout(d,1e3));let m=!1;const I=3;for(let d=0;d<I;d++)try{const T=await r();if(console.log(`[InteractiveLogin] Auth status check (attempt ${d+1}/${I}):`,T),l(T)){m=!0,console.log("[InteractiveLogin] Authentication confirmed");break}d<I-1&&await new Promise(E=>setTimeout(E,500))}catch(T){console.error(`[InteractiveLogin] Auth status check error (attempt ${d+1}/${I}):`,T),d<I-1&&await new Promise(E=>setTimeout(E,500))}n.destroy("login-progress"),m?(console.log("[InteractiveLogin] Authentication confirmed, navigating to dashboard..."),n.success("✅ 登录成功!正在跳转到 Dashboard...",2),await new Promise(d=>setTimeout(d,800)),window.location.href="/dashboard"):g.refreshToken?(console.warn("[InteractiveLogin] Has token but auth status not confirmed, attempting navigation..."),n.warning("登录状态验证失败,但将尝试跳转...",3),await new Promise(d=>setTimeout(d,1e3)),window.location.href="/dashboard"):(console.error("[InteractiveLogin] Authentication not confirmed after retries"),n.warning('登录成功,但状态验证失败。请手动刷新页面或点击"检查登录状态"按钮。',4))}catch(m){const I=m instanceof Error?m.message:"未知错误";console.error("[InteractiveLogin] Error handling login-success event:",m),n.destroy("login-progress"),n.error("处理登录成功事件时出错: "+I,4)}},u=g=>{console.error("[InteractiveLogin] Received login-error event from Electron:",g),s(),a.current=!1;const m=g.message||"未知错误";n.error("登录失败: "+m,4)},b=window.electron.onLoginSuccess(p),x=window.electron.onLoginError(u);return()=>{console.log("[InteractiveLogin] Cleaning up IPC event listeners..."),b&&typeof b=="function"&&b(),x&&typeof x=="function"&&x()}},[o,r,l,s]);const k=c.useCallback(async f=>{if(typeof window<"u"&&window.electron&&window.electron?.openLoginWindow){console.log("[InteractiveLogin] Using Electron system browser login...");try{n.info("正在打开系统浏览器进行登录...",3),a.current=!0,i();const g=await window.electron.openLoginWindow();if(!g.success){if(g.cancelled){s(),a.current=!1,n.info("登录已取消",2);return}throw new Error(g.error||"无法打开登录窗口")}console.log("[InteractiveLogin] Login window opened, waiting for login-success or login-error event..."),n.info("请在浏览器中完成登录,系统会自动检测登录状态...",5)}catch(g){const m=g instanceof Error?g.message:"未知错误";console.error("[InteractiveLogin] Failed to open Electron login window:",g),n.error("无法打开登录窗口: "+m,4),s(),a.current=!1}return}const u="",b="",x=f?.data?.data?.network?.proxy?.enabled?f.data.data.network.proxy:void 0;s(),a.current=!0,i(),console.log("[InteractiveLogin] Starting interactive login via backend API, polling will begin...");try{await O.login(u,b,!1,x)}catch(g){const m=g;if(m?.code==="ECONNABORTED"||m?.message?.includes("timeout")){console.log("[InteractiveLogin] Interactive login API timeout, but continuing to poll for status..."),n.info("正在等待浏览器登录完成,系统会自动检测登录状态...",5);return}s(),a.current=!1;const d=m?.message||(g instanceof Error?g.message:"未知错误");throw new Error(d)}},[i,s]),S=c.useCallback(async()=>{try{n.loading({content:"正在检查登录状态...",key:"checkStatus",duration:0});const f=await r();n.destroy("checkStatus"),l(f)?(n.success("✅ 已登录,正在跳转...",2),h()):(n.info("尚未登录,请完成浏览器中的登录流程。系统会自动检测登录状态。",4),a.current||(a.current=!0,i()))}catch(f){n.destroy("checkStatus");const p=f instanceof Error?f.message:"未知错误";n.error("检查登录状态失败: "+p,4),console.error("[InteractiveLogin] Manual status check error:",f)}},[r,l,h,i]);return{handleInteractiveLogin:k,handleCheckStatus:S,isActive:a.current}}function xe(){const{t}=A(),r=X(),[l,i]=c.useState("interactive"),[s,o]=c.useState(0),[a,h]=c.useState(!1),{data:k,isLoading:S,refetch:f}=_({queryKey:R.AUTH_STATUS,queryFn:()=>O.getAuthStatus(),retry:!1,staleTime:0,refetchOnMount:!0,refetchInterval:!1}),{data:p}=_({queryKey:R.CONFIG,queryFn:()=>O.getConfig()}),{loginWithTokenAsync:u,isLoggingInWithToken:b}=ne(),x=c.useCallback(j=>{const v=D(j);return console.log("[Login] Auth check:",{authenticated:v,response:j}),v},[D]),g=c.useCallback(async()=>{h(!1),o(2),n.loading({content:"✅ 登录成功,正在验证登录状态...",key:"login-success",duration:0}),await new Promise(y=>setTimeout(y,1e3));let j=!1;const v=3;for(let y=0;y<v;y++)try{const w=await f();if(console.log(`[Login] Auth status check (attempt ${y+1}/${v}):`,w),x(w)){j=!0,console.log("[Login] Authentication confirmed");break}y<v-1&&await new Promise(L=>setTimeout(L,500))}catch(w){console.error(`[Login] Auth status check error (attempt ${y+1}/${v}):`,w),y<v-1&&await new Promise(L=>setTimeout(L,500))}n.destroy("login-success"),j?(console.log("[Login] Authentication confirmed, navigating to dashboard..."),n.success("✅ 登录成功!正在跳转到 Dashboard...",2),await new Promise(y=>setTimeout(y,800)),window.location.href="/dashboard"):(console.warn("[Login] Auth status not confirmed after retries"),n.warning('登录状态验证失败,请手动刷新页面或点击"检查登录状态"按钮',4))},[f,x]),m=c.useCallback(()=>{h(!0)},[]),I=c.useCallback(()=>{h(!1)},[]),d=c.useCallback(async()=>await f(),[f]);pe({enabled:a,onAuthenticated:()=>{g()},refetchAuthStatus:d,isAuthenticated:x});const{handleInteractiveLogin:T,handleCheckStatus:E}=me({onLoginSuccess:()=>o(2),refetchAuthStatus:d,isAuthenticated:x,startPolling:m,stopPolling:I}),J=c.useCallback(async j=>{if(o(1),l==="token"){const v=j?.refreshToken;if(!v||v.trim()===""){n.error("请输入 refreshToken"),o(0);return}try{await u(v.trim()),g()}catch(y){const{errorCode:w,message:L}=U(y);o(0);const B=typeof L=="string"?L:typeof L=="object"&&L!==null?JSON.stringify(L):String(L||t("AUTH_LOGIN_FAILED"));w?n.error(q(w,t,void 0,B||t("AUTH_LOGIN_FAILED"))):n.error(B||t("AUTH_LOGIN_FAILED"))}return}try{await T(p)}catch(v){const{errorCode:y,message:w}=U(v);o(0);const L=typeof w=="string"?w:typeof w=="object"&&w!==null?JSON.stringify(w):String(w||t("AUTH_LOGIN_FAILED"));y?n.error(q(y,t,void 0,L||t("AUTH_LOGIN_FAILED"))):n.error(L||t("AUTH_LOGIN_FAILED"))}},[l,u,g,T,p,t]);return{loginMode:l,loginStep:s,isLoggingIn:a||s===1,isLoggingInWithToken:b,authStatusLoading:S,authStatus:k,isAuthenticated:x,setLoginMode:i,handleLogin:J,handleCheckStatus:E,navigate:r}}function ye({children:t}){return e.jsxs("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",padding:"20px",position:"relative",overflow:"hidden"},children:[e.jsx("div",{style:{position:"absolute",top:"-10%",right:"-5%",width:"500px",height:"500px",borderRadius:"50%",background:"rgba(255, 255, 255, 0.1)",filter:"blur(60px)"}}),e.jsx("div",{style:{position:"absolute",bottom:"-10%",left:"-5%",width:"400px",height:"400px",borderRadius:"50%",background:"rgba(255, 255, 255, 0.1)",filter:"blur(60px)"}}),e.jsx(oe,{style:{width:"100%",maxWidth:480,boxShadow:"0 20px 60px rgba(0,0,0,0.3)",borderRadius:"16px",position:"relative",zIndex:1},children:t})]})}const{Title:ve,Text:we}=W;function Le(){const{t}=A();return e.jsxs("div",{style:{textAlign:"center",marginBottom:8},children:[e.jsx("div",{style:{width:"80px",height:"80px",margin:"0 auto 16px",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",borderRadius:"20px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 8px 16px rgba(102, 126, 234, 0.4)"},children:e.jsx(de,{style:{fontSize:"40px",color:"white"}})}),e.jsx(ve,{level:2,style:{margin:"0 0 8px 0",fontSize:"28px",fontWeight:700},children:"PixivFlow"}),e.jsx(we,{type:"secondary",style:{fontSize:"15px"},children:t("login.subtitle")})]})}const{Text:F}=W;function be(){const{t}=A();return e.jsx("div",{style:{background:"linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%)",padding:"16px",borderRadius:"12px",marginBottom:8},children:e.jsxs(K,{direction:"vertical",size:"small",style:{width:"100%"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx(z,{style:{color:"#52c41a",fontSize:"16px"}}),e.jsx(F,{style:{fontSize:"13px"},children:t("login.featureSecure")})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx(z,{style:{color:"#52c41a",fontSize:"16px"}}),e.jsx(F,{style:{fontSize:"13px"},children:t("login.featureSave")})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx(z,{style:{color:"#52c41a",fontSize:"16px"}}),e.jsx(F,{style:{fontSize:"13px"},children:t("login.featureMulti")})]})]})})}function Ie({current:t}){const{t:r}=A();return e.jsx(re,{current:t,size:"small",items:[{title:r("login.stepMode"),icon:e.jsx(Q,{})},{title:r("login.stepAuth"),icon:e.jsx(ie,{})},{title:r("login.stepDone"),icon:e.jsx(z,{})}],style:{marginBottom:8}})}function ke({value:t,onChange:r,onResetFields:l}){const{t:i}=A();return e.jsxs(e.Fragment,{children:[e.jsx(C.Item,{label:e.jsx("span",{style:{fontSize:"15px",fontWeight:600},children:i("login.loginMode")}),style:{marginBottom:20},children:e.jsxs(M.Group,{value:t,onChange:s=>{r(s.target.value),setTimeout(()=>{l()},0)},buttonStyle:"solid",style:{width:"100%",display:"flex",flexWrap:"wrap",gap:"8px"},children:[e.jsxs(M.Button,{value:"interactive",style:{flex:1,minWidth:"120px",textAlign:"center",height:"48px",lineHeight:"48px",fontSize:"14px",fontWeight:500},children:[e.jsx(Q,{})," ",i("login.loginModeInteractive")]}),e.jsxs(M.Button,{value:"token",style:{flex:1,minWidth:"120px",textAlign:"center",height:"48px",lineHeight:"48px",fontSize:"14px",fontWeight:500},children:[e.jsx(V,{})," ",i("login.loginModeToken")]})]})}),t==="interactive"&&e.jsx(P,{message:e.jsx("span",{style:{fontWeight:600},children:i("login.loginModeInteractive")}),description:e.jsxs("div",{style:{fontSize:"13px"},children:[e.jsx("div",{style:{marginBottom:8},children:i("login.loginModeInteractiveDesc")}),e.jsx("div",{style:{padding:"8px 12px",background:"rgba(24, 144, 255, 0.1)",borderRadius:"6px",borderLeft:"3px solid #1890ff"},children:i("login.browserWindowNote")})]}),type:"info",showIcon:!0,style:{marginBottom:20}}),t==="token"&&e.jsx(P,{message:e.jsx("span",{style:{fontWeight:600},children:i("login.loginModeToken")}),description:e.jsxs("div",{style:{fontSize:"13px"},children:[e.jsx("div",{style:{marginBottom:8},children:i("login.loginModeTokenDesc")}),e.jsxs("div",{style:{padding:"8px 12px",background:"rgba(82, 196, 26, 0.1)",borderRadius:"6px",borderLeft:"3px solid #52c41a"},children:[e.jsx("strong",{children:i("login.loginModeTokenTipLabel")}),i("login.loginModeTokenTip")]})]}),type:"success",showIcon:!0,style:{marginBottom:20}})]})}function je({loginMode:t,isLoggingIn:r,isLoggingInWithToken:l,onLogin:i,onCheckStatus:s}){const{t:o}=A(),[a]=C.useForm(),h=r||l,k=()=>{t==="token"?a.validateFields(["refreshToken"]).then(()=>{const S=a.getFieldsValue();i(S)}).catch(()=>{}):i()};return e.jsxs(C,{form:a,name:"login",onFinish:k,layout:"vertical",size:"large",autoComplete:"off",children:[t==="token"&&e.jsx(C.Item,{name:"refreshToken",label:e.jsxs("span",{style:{fontSize:"14px",fontWeight:500},children:[e.jsx(V,{style:{marginRight:8}})," Refresh Token"]}),rules:[{required:!0,message:o("login.tokenRequired")},{min:10,message:o("login.tokenInvalid")}],children:e.jsx(se.TextArea,{placeholder:o("login.tokenPlaceholder"),autoSize:{minRows:3,maxRows:6},style:{fontSize:"14px",fontFamily:"monospace"}})}),e.jsx(C.Item,{style:{marginBottom:16},children:e.jsx(N,{type:"primary",htmlType:"button",block:!0,icon:e.jsx(Z,{}),loading:h,size:"large",onClick:k,style:{height:"48px",fontSize:"16px",fontWeight:600,borderRadius:"8px",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",border:"none",boxShadow:"0 4px 12px rgba(102, 126, 234, 0.4)"},children:o(h?"login.loggingIn":"login.loginButton")})}),h&&e.jsx(P,{message:e.jsx("span",{style:{fontWeight:600},children:o("login.processing")}),description:e.jsx("div",{style:{fontSize:"13px",lineHeight:"1.6"},children:t==="interactive"?e.jsxs("div",{children:[e.jsx("div",{style:{marginBottom:12,color:"rgba(0, 0, 0, 0.65)"},children:o("login.processingInteractiveDesc")}),s&&e.jsxs("div",{style:{padding:"12px",background:"rgba(24, 144, 255, 0.08)",borderRadius:"8px",borderLeft:"3px solid #1890ff",marginTop:12},children:[e.jsxs("div",{style:{marginBottom:10,color:"rgba(0, 0, 0, 0.65)"},children:[e.jsx("strong",{style:{color:"#1890ff"},children:o("login.tipLabel")}),o("login.checkStatusHint")]}),e.jsx(N,{type:"primary",size:"small",icon:e.jsx(ee,{}),onClick:s,style:{width:"100%",height:"32px",borderRadius:"6px"},children:o("login.checkStatus")})]})]}):t==="token"?e.jsx("div",{style:{color:"rgba(0, 0, 0, 0.65)"},children:o("login.verifying")}):null}),type:"info",showIcon:!0,style:{marginTop:0,borderRadius:"8px"}})]})}const{Paragraph:Se}=W;function We(){const{t}=A(),{loginMode:r,loginStep:l,isLoggingIn:i,isLoggingInWithToken:s,authStatusLoading:o,authStatus:a,isAuthenticated:h,setLoginMode:k,handleLogin:S,handleCheckStatus:f,navigate:p}=xe();return c.useEffect(()=>{!o&&h(a)&&p("/dashboard",{replace:!0})},[o,a,p,h]),o?e.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"},children:e.jsx(te,{size:"large"})}):e.jsx(ye,{children:e.jsxs(K,{direction:"vertical",size:"large",style:{width:"100%"},children:[e.jsx(Le,{}),(i||s)&&e.jsx(Ie,{current:l}),!i&&!s&&e.jsx(be,{}),e.jsx(G,{style:{margin:"8px 0"}}),e.jsx(ke,{value:r,onChange:k,onResetFields:()=>{const u=document.querySelector('form[name="login"]');u&&u.reset()}}),e.jsx(je,{loginMode:r,isLoggingIn:i,isLoggingInWithToken:s,onLogin:S,onCheckStatus:f}),e.jsx(G,{style:{margin:"8px 0"}}),e.jsx("div",{style:{textAlign:"center"},children:e.jsx(Se,{type:"secondary",style:{fontSize:"12px",margin:"0 0 12px 0",lineHeight:"1.6"},children:t("login.note")})})]})})}export{We as default};
2
+ //# sourceMappingURL=index-CFWcxkyB.js.map
@@ -1,2 +1,2 @@
1
- import{a2 as V,r as a,a6 as U,n as $,v as J,x as q,z as K,A as v,aA as Q,ac as Y,J as Z}from"./index-HJggy9SZ.js";import{m as T,u as k}from"./index-B4zZ11c-.js";const ee={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},M=V.createContext({});var te=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(i[n[l]]=e[n[l]]);return i};const ne=e=>U(e).map(t=>Object.assign(Object.assign({},t?.props),{key:t.key}));function le(e,t,i){const n=a.useMemo(()=>t||ne(i),[t,i]);return a.useMemo(()=>n.map(r=>{var{span:s}=r,p=te(r,["span"]);return s==="filled"?Object.assign(Object.assign({},p),{filled:!0}):Object.assign(Object.assign({},p),{span:typeof s=="number"?s:T(e,s)})}),[n,e])}var ie=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(i[n[l]]=e[n[l]]);return i};function ae(e,t){let i=[],n=[],l=!1,r=0;return e.filter(s=>s).forEach(s=>{const{filled:p}=s,g=ie(s,["filled"]);if(p){n.push(g),i.push(n),n=[],r=0;return}const u=t-r;r+=s.span||1,r>=t?(r>t?(l=!0,n.push(Object.assign(Object.assign({},g),{span:u}))):n.push(g),i.push(n),n=[],r=0):n.push(g)}),n.length>0&&i.push(n),i=i.map(s=>{const p=s.reduce((g,u)=>g+(u.span||1),0);if(p<t){const g=s[s.length-1];return g.span=t-(p-(g.span||1)),s}return s}),[i,l]}const se=(e,t)=>{const[i,n]=a.useMemo(()=>ae(t,e),[t,e]);return i},oe=({children:e})=>e;function R(e){return e!=null}const B=e=>{const{itemPrefixCls:t,component:i,span:n,className:l,style:r,labelStyle:s,contentStyle:p,bordered:g,label:u,content:d,colon:C,type:j,styles:m}=e,y=i,o=a.useContext(M),{classNames:b}=o;return g?a.createElement(y,{className:$({[`${t}-item-label`]:j==="label",[`${t}-item-content`]:j==="content",[`${b?.label}`]:j==="label",[`${b?.content}`]:j==="content"},l),style:r,colSpan:n},R(u)&&a.createElement("span",{style:Object.assign(Object.assign({},s),m?.label)},u),R(d)&&a.createElement("span",{style:Object.assign(Object.assign({},s),m?.content)},d)):a.createElement(y,{className:$(`${t}-item`,l),style:r,colSpan:n},a.createElement("div",{className:`${t}-item-container`},(u||u===0)&&a.createElement("span",{className:$(`${t}-item-label`,b?.label,{[`${t}-item-no-colon`]:!C}),style:Object.assign(Object.assign({},s),m?.label)},u),(d||d===0)&&a.createElement("span",{className:$(`${t}-item-content`,b?.content),style:Object.assign(Object.assign({},p),m?.content)},d)))};function z(e,{colon:t,prefixCls:i,bordered:n},{component:l,type:r,showLabel:s,showContent:p,labelStyle:g,contentStyle:u,styles:d}){return e.map(({label:C,children:j,prefixCls:m=i,className:y,style:o,labelStyle:b,contentStyle:c,span:N=1,key:S,styles:f},E)=>typeof l=="string"?a.createElement(B,{key:`${r}-${S||E}`,className:y,style:o,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},g),d?.label),b),f?.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},u),d?.content),c),f?.content)},span:N,colon:t,component:l,itemPrefixCls:m,bordered:n,label:s?C:null,content:p?j:null,type:r}):[a.createElement(B,{key:`label-${S||E}`,className:y,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},g),d?.label),o),b),f?.label),span:1,colon:t,component:l[0],itemPrefixCls:m,bordered:n,label:C,type:"label"}),a.createElement(B,{key:`content-${S||E}`,className:y,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u),d?.content),o),c),f?.content),span:N*2-1,component:l[1],itemPrefixCls:m,bordered:n,content:j,type:"content"})])}const re=e=>{const t=a.useContext(M),{prefixCls:i,vertical:n,row:l,index:r,bordered:s}=e;return n?a.createElement(a.Fragment,null,a.createElement("tr",{key:`label-${r}`,className:`${i}-row`},z(l,e,Object.assign({component:"th",type:"label",showLabel:!0},t))),a.createElement("tr",{key:`content-${r}`,className:`${i}-row`},z(l,e,Object.assign({component:"td",type:"content",showContent:!0},t)))):a.createElement("tr",{key:r,className:`${i}-row`},z(l,e,Object.assign({component:s?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},t)))},ce=e=>{const{componentCls:t,labelBg:i}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${v(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${v(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${v(e.padding)} ${v(e.paddingLG)}`,borderInlineEnd:`${v(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:i,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${v(e.paddingSM)} ${v(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${v(e.paddingXS)} ${v(e.padding)}`}}}}}},de=e=>{const{componentCls:t,extraColor:i,itemPaddingBottom:n,itemPaddingEnd:l,colonMarginRight:r,colonMarginLeft:s,titleMarginBottom:p}=e;return{[t]:Object.assign(Object.assign(Object.assign({},K(e)),ce(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:p},[`${t}-title`]:Object.assign(Object.assign({},Q),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:i,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:n,paddingInlineEnd:l},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${v(s)} ${v(r)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}},me=e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}),be=J("Descriptions",e=>{const t=q(e,{});return de(t)},me);var ge=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(i[n[l]]=e[n[l]]);return i};const pe=e=>{const{prefixCls:t,title:i,extra:n,column:l,colon:r=!0,bordered:s,layout:p,children:g,className:u,rootClassName:d,style:C,size:j,labelStyle:m,contentStyle:y,styles:o,items:b,classNames:c}=e,N=ge(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:S,direction:f,className:E,style:_,classNames:h,styles:x}=Y("descriptions"),O=S("descriptions",t),I=k(),A=a.useMemo(()=>{var w;return typeof l=="number"?l:(w=T(I,Object.assign(Object.assign({},ee),l)))!==null&&w!==void 0?w:3},[I,l]),H=le(I,b,g),P=Z(j),W=se(A,H),[D,G,X]=be(O),F=a.useMemo(()=>({labelStyle:m,contentStyle:y,styles:{content:Object.assign(Object.assign({},x.content),o?.content),label:Object.assign(Object.assign({},x.label),o?.label)},classNames:{label:$(h.label,c?.label),content:$(h.content,c?.content)}}),[m,y,o,c,h,x]);return D(a.createElement(M.Provider,{value:F},a.createElement("div",Object.assign({className:$(O,E,h.root,c?.root,{[`${O}-${P}`]:P&&P!=="default",[`${O}-bordered`]:!!s,[`${O}-rtl`]:f==="rtl"},u,d,G,X),style:Object.assign(Object.assign(Object.assign(Object.assign({},_),x.root),o?.root),C)},N),(i||n)&&a.createElement("div",{className:$(`${O}-header`,h.header,c?.header),style:Object.assign(Object.assign({},x.header),o?.header)},i&&a.createElement("div",{className:$(`${O}-title`,h.title,c?.title),style:Object.assign(Object.assign({},x.title),o?.title)},i),n&&a.createElement("div",{className:$(`${O}-extra`,h.extra,c?.extra),style:Object.assign(Object.assign({},x.extra),o?.extra)},n)),a.createElement("div",{className:`${O}-view`},a.createElement("table",null,a.createElement("tbody",null,W.map((w,L)=>a.createElement(re,{key:L,index:L,colon:r,prefixCls:O,vertical:p==="vertical",bordered:s,row:w}))))))))};pe.Item=oe;export{pe as D};
2
- //# sourceMappingURL=index-DpfbKoAX.js.map
1
+ import{a2 as V,r as a,a6 as U,n as $,v as J,x as q,z as K,A as v,aA as Q,ac as Y,J as Z}from"./index-BtXc5-H2.js";import{m as T,u as k}from"./index-Cfg0ICF_.js";const ee={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},M=V.createContext({});var te=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(i[n[l]]=e[n[l]]);return i};const ne=e=>U(e).map(t=>Object.assign(Object.assign({},t?.props),{key:t.key}));function le(e,t,i){const n=a.useMemo(()=>t||ne(i),[t,i]);return a.useMemo(()=>n.map(r=>{var{span:s}=r,p=te(r,["span"]);return s==="filled"?Object.assign(Object.assign({},p),{filled:!0}):Object.assign(Object.assign({},p),{span:typeof s=="number"?s:T(e,s)})}),[n,e])}var ie=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(i[n[l]]=e[n[l]]);return i};function ae(e,t){let i=[],n=[],l=!1,r=0;return e.filter(s=>s).forEach(s=>{const{filled:p}=s,g=ie(s,["filled"]);if(p){n.push(g),i.push(n),n=[],r=0;return}const u=t-r;r+=s.span||1,r>=t?(r>t?(l=!0,n.push(Object.assign(Object.assign({},g),{span:u}))):n.push(g),i.push(n),n=[],r=0):n.push(g)}),n.length>0&&i.push(n),i=i.map(s=>{const p=s.reduce((g,u)=>g+(u.span||1),0);if(p<t){const g=s[s.length-1];return g.span=t-(p-(g.span||1)),s}return s}),[i,l]}const se=(e,t)=>{const[i,n]=a.useMemo(()=>ae(t,e),[t,e]);return i},oe=({children:e})=>e;function R(e){return e!=null}const B=e=>{const{itemPrefixCls:t,component:i,span:n,className:l,style:r,labelStyle:s,contentStyle:p,bordered:g,label:u,content:d,colon:C,type:j,styles:m}=e,y=i,o=a.useContext(M),{classNames:b}=o;return g?a.createElement(y,{className:$({[`${t}-item-label`]:j==="label",[`${t}-item-content`]:j==="content",[`${b?.label}`]:j==="label",[`${b?.content}`]:j==="content"},l),style:r,colSpan:n},R(u)&&a.createElement("span",{style:Object.assign(Object.assign({},s),m?.label)},u),R(d)&&a.createElement("span",{style:Object.assign(Object.assign({},s),m?.content)},d)):a.createElement(y,{className:$(`${t}-item`,l),style:r,colSpan:n},a.createElement("div",{className:`${t}-item-container`},(u||u===0)&&a.createElement("span",{className:$(`${t}-item-label`,b?.label,{[`${t}-item-no-colon`]:!C}),style:Object.assign(Object.assign({},s),m?.label)},u),(d||d===0)&&a.createElement("span",{className:$(`${t}-item-content`,b?.content),style:Object.assign(Object.assign({},p),m?.content)},d)))};function z(e,{colon:t,prefixCls:i,bordered:n},{component:l,type:r,showLabel:s,showContent:p,labelStyle:g,contentStyle:u,styles:d}){return e.map(({label:C,children:j,prefixCls:m=i,className:y,style:o,labelStyle:b,contentStyle:c,span:N=1,key:S,styles:f},E)=>typeof l=="string"?a.createElement(B,{key:`${r}-${S||E}`,className:y,style:o,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},g),d?.label),b),f?.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},u),d?.content),c),f?.content)},span:N,colon:t,component:l,itemPrefixCls:m,bordered:n,label:s?C:null,content:p?j:null,type:r}):[a.createElement(B,{key:`label-${S||E}`,className:y,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},g),d?.label),o),b),f?.label),span:1,colon:t,component:l[0],itemPrefixCls:m,bordered:n,label:C,type:"label"}),a.createElement(B,{key:`content-${S||E}`,className:y,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u),d?.content),o),c),f?.content),span:N*2-1,component:l[1],itemPrefixCls:m,bordered:n,content:j,type:"content"})])}const re=e=>{const t=a.useContext(M),{prefixCls:i,vertical:n,row:l,index:r,bordered:s}=e;return n?a.createElement(a.Fragment,null,a.createElement("tr",{key:`label-${r}`,className:`${i}-row`},z(l,e,Object.assign({component:"th",type:"label",showLabel:!0},t))),a.createElement("tr",{key:`content-${r}`,className:`${i}-row`},z(l,e,Object.assign({component:"td",type:"content",showContent:!0},t)))):a.createElement("tr",{key:r,className:`${i}-row`},z(l,e,Object.assign({component:s?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},t)))},ce=e=>{const{componentCls:t,labelBg:i}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${v(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${v(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${v(e.padding)} ${v(e.paddingLG)}`,borderInlineEnd:`${v(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:i,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${v(e.paddingSM)} ${v(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${v(e.paddingXS)} ${v(e.padding)}`}}}}}},de=e=>{const{componentCls:t,extraColor:i,itemPaddingBottom:n,itemPaddingEnd:l,colonMarginRight:r,colonMarginLeft:s,titleMarginBottom:p}=e;return{[t]:Object.assign(Object.assign(Object.assign({},K(e)),ce(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:p},[`${t}-title`]:Object.assign(Object.assign({},Q),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:i,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:n,paddingInlineEnd:l},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${v(s)} ${v(r)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}},me=e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}),be=J("Descriptions",e=>{const t=q(e,{});return de(t)},me);var ge=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(i[n[l]]=e[n[l]]);return i};const pe=e=>{const{prefixCls:t,title:i,extra:n,column:l,colon:r=!0,bordered:s,layout:p,children:g,className:u,rootClassName:d,style:C,size:j,labelStyle:m,contentStyle:y,styles:o,items:b,classNames:c}=e,N=ge(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:S,direction:f,className:E,style:_,classNames:h,styles:x}=Y("descriptions"),O=S("descriptions",t),I=k(),A=a.useMemo(()=>{var w;return typeof l=="number"?l:(w=T(I,Object.assign(Object.assign({},ee),l)))!==null&&w!==void 0?w:3},[I,l]),H=le(I,b,g),P=Z(j),W=se(A,H),[D,G,X]=be(O),F=a.useMemo(()=>({labelStyle:m,contentStyle:y,styles:{content:Object.assign(Object.assign({},x.content),o?.content),label:Object.assign(Object.assign({},x.label),o?.label)},classNames:{label:$(h.label,c?.label),content:$(h.content,c?.content)}}),[m,y,o,c,h,x]);return D(a.createElement(M.Provider,{value:F},a.createElement("div",Object.assign({className:$(O,E,h.root,c?.root,{[`${O}-${P}`]:P&&P!=="default",[`${O}-bordered`]:!!s,[`${O}-rtl`]:f==="rtl"},u,d,G,X),style:Object.assign(Object.assign(Object.assign(Object.assign({},_),x.root),o?.root),C)},N),(i||n)&&a.createElement("div",{className:$(`${O}-header`,h.header,c?.header),style:Object.assign(Object.assign({},x.header),o?.header)},i&&a.createElement("div",{className:$(`${O}-title`,h.title,c?.title),style:Object.assign(Object.assign({},x.title),o?.title)},i),n&&a.createElement("div",{className:$(`${O}-extra`,h.extra,c?.extra),style:Object.assign(Object.assign({},x.extra),o?.extra)},n)),a.createElement("div",{className:`${O}-view`},a.createElement("table",null,a.createElement("tbody",null,W.map((w,L)=>a.createElement(re,{key:L,index:L,colon:r,prefixCls:O,vertical:p==="vertical",bordered:s,row:w}))))))))};pe.Item=oe;export{pe as D};
2
+ //# sourceMappingURL=index-CZ44NQeD.js.map
@@ -1,3 +1,3 @@
1
- import{r as s,o as we,a7 as pe,i as $e,n as Z,h as de,_ as Re,a4 as ce,a2 as Ie,m as ue,v as Ee,x as Oe,A as L,z as re,bp as me,D as le,t as Be,H as Ce,E as ve,K as Pe,aM as _e,bq as Ne,ca as Me,by as je,aX as De,J as Te,a8 as ze}from"./index-HJggy9SZ.js";const fe=e=>typeof e=="object"&&e!=null&&e.nodeType===1,be=(e,r)=>(!r||e!=="hidden")&&e!=="visible"&&e!=="clip",Q=(e,r)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return be(n.overflowY,r)||be(n.overflowX,r)||(o=>{const t=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(o);return!!t&&(t.clientHeight<o.scrollHeight||t.clientWidth<o.scrollWidth)})(e)}return!1},U=(e,r,n,o,t,l,i,a)=>l<e&&i>r||l>e&&i<r?0:l<=e&&a<=n||i>=r&&a>=n?l-e-o:i>r&&a<n||l<e&&a>n?i-r+t:0,Fe=e=>{const r=e.parentElement;return r??(e.getRootNode().host||null)},ge=(e,r)=>{var n,o,t,l;if(typeof document>"u")return[];const{scrollMode:i,block:a,inline:d,boundary:I,skipOverflowHiddenElements:B}=r,$=typeof I=="function"?I:N=>N!==I;if(!fe(e))throw new TypeError("Invalid target");const E=document.scrollingElement||document.documentElement,x=[];let h=e;for(;fe(h)&&$(h);){if(h=Fe(h),h===E){x.push(h);break}h!=null&&h===document.body&&Q(h)&&!Q(document.documentElement)||h!=null&&Q(h,B)&&x.push(h)}const b=(o=(n=window.visualViewport)==null?void 0:n.width)!=null?o:innerWidth,g=(l=(t=window.visualViewport)==null?void 0:t.height)!=null?l:innerHeight,{scrollX:S,scrollY:k}=window,{height:C,width:w,top:R,right:p,bottom:_,left:f}=e.getBoundingClientRect(),{top:O,right:P,bottom:v,left:M}=(N=>{const c=window.getComputedStyle(N);return{top:parseFloat(c.scrollMarginTop)||0,right:parseFloat(c.scrollMarginRight)||0,bottom:parseFloat(c.scrollMarginBottom)||0,left:parseFloat(c.scrollMarginLeft)||0}})(e);let y=a==="start"||a==="nearest"?R-O:a==="end"?_+v:R+C/2-O+v,u=d==="center"?f+w/2-M+P:d==="end"?p+P:f-M;const D=[];for(let N=0;N<x.length;N++){const c=x[N],{height:j,width:F,top:W,right:A,bottom:q,left:m}=c.getBoundingClientRect();if(i==="if-needed"&&R>=0&&f>=0&&_<=g&&p<=b&&(c===E&&!Q(c)||R>=W&&_<=q&&f>=m&&p<=A))return D;const V=getComputedStyle(c),H=parseInt(V.borderLeftWidth,10),G=parseInt(V.borderTopWidth,10),X=parseInt(V.borderRightWidth,10),Y=parseInt(V.borderBottomWidth,10);let T=0,z=0;const J="offsetWidth"in c?c.offsetWidth-c.clientWidth-H-X:0,K="offsetHeight"in c?c.offsetHeight-c.clientHeight-G-Y:0,te="offsetWidth"in c?c.offsetWidth===0?0:F/c.offsetWidth:0,oe="offsetHeight"in c?c.offsetHeight===0?0:j/c.offsetHeight:0;if(E===c)T=a==="start"?y:a==="end"?y-g:a==="nearest"?U(k,k+g,g,G,Y,k+y,k+y+C,C):y-g/2,z=d==="start"?u:d==="center"?u-b/2:d==="end"?u-b:U(S,S+b,b,H,X,S+u,S+u+w,w),T=Math.max(0,T+k),z=Math.max(0,z+S);else{T=a==="start"?y-W-G:a==="end"?y-q+Y+K:a==="nearest"?U(W,q,j,G,Y+K,y,y+C,C):y-(W+j/2)+K/2,z=d==="start"?u-m-H:d==="center"?u-(m+F/2)+J/2:d==="end"?u-A+X+J:U(m,A,F,H,X+J,u,u+w,w);const{scrollLeft:ae,scrollTop:se}=c;T=oe===0?0:Math.max(0,Math.min(se+T/oe,c.scrollHeight-j/oe+K)),z=te===0?0:Math.max(0,Math.min(ae+z/te,c.scrollWidth-F/te+J)),y+=se-T,u+=ae-z}D.push({el:c,top:T,left:z})}return D},We=e=>e===!1?{block:"end",inline:"nearest"}:(r=>r===Object(r)&&Object.keys(r).length!==0)(e)?e:{block:"start",inline:"nearest"};function He(e,r){if(!e.isConnected||!(t=>{let l=t;for(;l&&l.parentNode;){if(l.parentNode===document)return!0;l=l.parentNode instanceof ShadowRoot?l.parentNode.host:l.parentNode}return!1})(e))return;const n=(t=>{const l=window.getComputedStyle(t);return{top:parseFloat(l.scrollMarginTop)||0,right:parseFloat(l.scrollMarginRight)||0,bottom:parseFloat(l.scrollMarginBottom)||0,left:parseFloat(l.scrollMarginLeft)||0}})(e);if((t=>typeof t=="object"&&typeof t.behavior=="function")(r))return r.behavior(ge(e,r));const o=typeof r=="boolean"||r==null?void 0:r.behavior;for(const{el:t,top:l,left:i}of ge(e,We(r))){const a=l-n.top+n.bottom,d=i-n.left+n.right;t.scroll({top:a,left:d,behavior:o})}}const ye=s.createContext(null),Le=ye.Provider,Se=s.createContext(null),Ve=Se.Provider;var Ae=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],qe=s.forwardRef(function(e,r){var n=e.prefixCls,o=n===void 0?"rc-checkbox":n,t=e.className,l=e.style,i=e.checked,a=e.disabled,d=e.defaultChecked,I=d===void 0?!1:d,B=e.type,$=B===void 0?"checkbox":B,E=e.title,x=e.onChange,h=we(e,Ae),b=s.useRef(null),g=s.useRef(null),S=pe(I,{value:i}),k=$e(S,2),C=k[0],w=k[1];s.useImperativeHandle(r,function(){return{focus:function(f){var O;(O=b.current)===null||O===void 0||O.focus(f)},blur:function(){var f;(f=b.current)===null||f===void 0||f.blur()},input:b.current,nativeElement:g.current}});var R=Z(o,t,de(de({},"".concat(o,"-checked"),C),"".concat(o,"-disabled"),a)),p=function(f){a||("checked"in e||w(f.target.checked),x?.({target:ce(ce({},e),{},{type:$,checked:f.target.checked}),stopPropagation:function(){f.stopPropagation()},preventDefault:function(){f.preventDefault()},nativeEvent:f.nativeEvent}))};return s.createElement("span",{className:R,title:E,style:l,ref:g},s.createElement("input",Re({},h,{className:"".concat(o,"-input"),ref:b,onChange:p,disabled:a,checked:!!C,type:$})),s.createElement("span",{className:"".concat(o,"-inner")}))});function Ge(e){const r=Ie.useRef(null),n=()=>{ue.cancel(r.current),r.current=null};return[()=>{n(),r.current=ue(()=>{r.current=null})},l=>{r.current&&(l.stopPropagation(),n()),e?.(l)}]}const Xe=e=>{const{componentCls:r,antCls:n}=e,o=`${r}-group`;return{[o]:Object.assign(Object.assign({},re(e)),{display:"inline-block",fontSize:0,[`&${o}-rtl`]:{direction:"rtl"},[`&${o}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},Ye=e=>{const{componentCls:r,wrapperMarginInlineEnd:n,colorPrimary:o,radioSize:t,motionDurationSlow:l,motionDurationMid:i,motionEaseInOutCirc:a,colorBgContainer:d,colorBorder:I,lineWidth:B,colorBgContainerDisabled:$,colorTextDisabled:E,paddingXS:x,dotColorDisabled:h,lineType:b,radioColor:g,radioBgColor:S,calc:k}=e,C=`${r}-inner`,R=k(t).sub(k(4).mul(2)),p=k(1).mul(t).equal({unit:!0});return{[`${r}-wrapper`]:Object.assign(Object.assign({},re(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${r}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${r}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${L(B)} ${b} ${o}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[r]:Object.assign(Object.assign({},re(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${r}-wrapper:hover &,
1
+ import{r as s,o as we,a7 as pe,i as $e,n as Z,h as de,_ as Re,a4 as ce,a2 as Ie,m as ue,v as Ee,x as Oe,A as L,z as re,bp as me,D as le,t as Be,H as Ce,E as ve,K as Pe,aM as _e,bq as Ne,ca as Me,by as je,b4 as De,J as Te,a8 as ze}from"./index-BtXc5-H2.js";const fe=e=>typeof e=="object"&&e!=null&&e.nodeType===1,be=(e,r)=>(!r||e!=="hidden")&&e!=="visible"&&e!=="clip",Q=(e,r)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return be(n.overflowY,r)||be(n.overflowX,r)||(o=>{const t=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(o);return!!t&&(t.clientHeight<o.scrollHeight||t.clientWidth<o.scrollWidth)})(e)}return!1},U=(e,r,n,o,t,l,i,a)=>l<e&&i>r||l>e&&i<r?0:l<=e&&a<=n||i>=r&&a>=n?l-e-o:i>r&&a<n||l<e&&a>n?i-r+t:0,Fe=e=>{const r=e.parentElement;return r??(e.getRootNode().host||null)},ge=(e,r)=>{var n,o,t,l;if(typeof document>"u")return[];const{scrollMode:i,block:a,inline:d,boundary:I,skipOverflowHiddenElements:B}=r,$=typeof I=="function"?I:N=>N!==I;if(!fe(e))throw new TypeError("Invalid target");const E=document.scrollingElement||document.documentElement,x=[];let h=e;for(;fe(h)&&$(h);){if(h=Fe(h),h===E){x.push(h);break}h!=null&&h===document.body&&Q(h)&&!Q(document.documentElement)||h!=null&&Q(h,B)&&x.push(h)}const b=(o=(n=window.visualViewport)==null?void 0:n.width)!=null?o:innerWidth,g=(l=(t=window.visualViewport)==null?void 0:t.height)!=null?l:innerHeight,{scrollX:S,scrollY:k}=window,{height:C,width:w,top:R,right:p,bottom:_,left:f}=e.getBoundingClientRect(),{top:O,right:P,bottom:v,left:M}=(N=>{const c=window.getComputedStyle(N);return{top:parseFloat(c.scrollMarginTop)||0,right:parseFloat(c.scrollMarginRight)||0,bottom:parseFloat(c.scrollMarginBottom)||0,left:parseFloat(c.scrollMarginLeft)||0}})(e);let y=a==="start"||a==="nearest"?R-O:a==="end"?_+v:R+C/2-O+v,u=d==="center"?f+w/2-M+P:d==="end"?p+P:f-M;const D=[];for(let N=0;N<x.length;N++){const c=x[N],{height:j,width:F,top:W,right:A,bottom:q,left:m}=c.getBoundingClientRect();if(i==="if-needed"&&R>=0&&f>=0&&_<=g&&p<=b&&(c===E&&!Q(c)||R>=W&&_<=q&&f>=m&&p<=A))return D;const V=getComputedStyle(c),H=parseInt(V.borderLeftWidth,10),G=parseInt(V.borderTopWidth,10),X=parseInt(V.borderRightWidth,10),Y=parseInt(V.borderBottomWidth,10);let T=0,z=0;const J="offsetWidth"in c?c.offsetWidth-c.clientWidth-H-X:0,K="offsetHeight"in c?c.offsetHeight-c.clientHeight-G-Y:0,te="offsetWidth"in c?c.offsetWidth===0?0:F/c.offsetWidth:0,oe="offsetHeight"in c?c.offsetHeight===0?0:j/c.offsetHeight:0;if(E===c)T=a==="start"?y:a==="end"?y-g:a==="nearest"?U(k,k+g,g,G,Y,k+y,k+y+C,C):y-g/2,z=d==="start"?u:d==="center"?u-b/2:d==="end"?u-b:U(S,S+b,b,H,X,S+u,S+u+w,w),T=Math.max(0,T+k),z=Math.max(0,z+S);else{T=a==="start"?y-W-G:a==="end"?y-q+Y+K:a==="nearest"?U(W,q,j,G,Y+K,y,y+C,C):y-(W+j/2)+K/2,z=d==="start"?u-m-H:d==="center"?u-(m+F/2)+J/2:d==="end"?u-A+X+J:U(m,A,F,H,X+J,u,u+w,w);const{scrollLeft:ae,scrollTop:se}=c;T=oe===0?0:Math.max(0,Math.min(se+T/oe,c.scrollHeight-j/oe+K)),z=te===0?0:Math.max(0,Math.min(ae+z/te,c.scrollWidth-F/te+J)),y+=se-T,u+=ae-z}D.push({el:c,top:T,left:z})}return D},We=e=>e===!1?{block:"end",inline:"nearest"}:(r=>r===Object(r)&&Object.keys(r).length!==0)(e)?e:{block:"start",inline:"nearest"};function He(e,r){if(!e.isConnected||!(t=>{let l=t;for(;l&&l.parentNode;){if(l.parentNode===document)return!0;l=l.parentNode instanceof ShadowRoot?l.parentNode.host:l.parentNode}return!1})(e))return;const n=(t=>{const l=window.getComputedStyle(t);return{top:parseFloat(l.scrollMarginTop)||0,right:parseFloat(l.scrollMarginRight)||0,bottom:parseFloat(l.scrollMarginBottom)||0,left:parseFloat(l.scrollMarginLeft)||0}})(e);if((t=>typeof t=="object"&&typeof t.behavior=="function")(r))return r.behavior(ge(e,r));const o=typeof r=="boolean"||r==null?void 0:r.behavior;for(const{el:t,top:l,left:i}of ge(e,We(r))){const a=l-n.top+n.bottom,d=i-n.left+n.right;t.scroll({top:a,left:d,behavior:o})}}const ye=s.createContext(null),Le=ye.Provider,Se=s.createContext(null),Ve=Se.Provider;var Ae=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],qe=s.forwardRef(function(e,r){var n=e.prefixCls,o=n===void 0?"rc-checkbox":n,t=e.className,l=e.style,i=e.checked,a=e.disabled,d=e.defaultChecked,I=d===void 0?!1:d,B=e.type,$=B===void 0?"checkbox":B,E=e.title,x=e.onChange,h=we(e,Ae),b=s.useRef(null),g=s.useRef(null),S=pe(I,{value:i}),k=$e(S,2),C=k[0],w=k[1];s.useImperativeHandle(r,function(){return{focus:function(f){var O;(O=b.current)===null||O===void 0||O.focus(f)},blur:function(){var f;(f=b.current)===null||f===void 0||f.blur()},input:b.current,nativeElement:g.current}});var R=Z(o,t,de(de({},"".concat(o,"-checked"),C),"".concat(o,"-disabled"),a)),p=function(f){a||("checked"in e||w(f.target.checked),x?.({target:ce(ce({},e),{},{type:$,checked:f.target.checked}),stopPropagation:function(){f.stopPropagation()},preventDefault:function(){f.preventDefault()},nativeEvent:f.nativeEvent}))};return s.createElement("span",{className:R,title:E,style:l,ref:g},s.createElement("input",Re({},h,{className:"".concat(o,"-input"),ref:b,onChange:p,disabled:a,checked:!!C,type:$})),s.createElement("span",{className:"".concat(o,"-inner")}))});function Ge(e){const r=Ie.useRef(null),n=()=>{ue.cancel(r.current),r.current=null};return[()=>{n(),r.current=ue(()=>{r.current=null})},l=>{r.current&&(l.stopPropagation(),n()),e?.(l)}]}const Xe=e=>{const{componentCls:r,antCls:n}=e,o=`${r}-group`;return{[o]:Object.assign(Object.assign({},re(e)),{display:"inline-block",fontSize:0,[`&${o}-rtl`]:{direction:"rtl"},[`&${o}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},Ye=e=>{const{componentCls:r,wrapperMarginInlineEnd:n,colorPrimary:o,radioSize:t,motionDurationSlow:l,motionDurationMid:i,motionEaseInOutCirc:a,colorBgContainer:d,colorBorder:I,lineWidth:B,colorBgContainerDisabled:$,colorTextDisabled:E,paddingXS:x,dotColorDisabled:h,lineType:b,radioColor:g,radioBgColor:S,calc:k}=e,C=`${r}-inner`,R=k(t).sub(k(4).mul(2)),p=k(1).mul(t).equal({unit:!0});return{[`${r}-wrapper`]:Object.assign(Object.assign({},re(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${r}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${r}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${L(B)} ${b} ${o}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[r]:Object.assign(Object.assign({},re(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${r}-wrapper:hover &,
2
2
  &:hover ${C}`]:{borderColor:o},[`${r}-input:focus-visible + ${C}`]:me(e),[`${r}:hover::after, ${r}-wrapper:hover &::after`]:{visibility:"visible"},[`${r}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:p,height:p,marginBlockStart:k(1).mul(t).div(-2).equal({unit:!0}),marginInlineStart:k(1).mul(t).div(-2).equal({unit:!0}),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:p,transform:"scale(0)",opacity:0,transition:`all ${l} ${a}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:p,height:p,backgroundColor:d,borderColor:I,borderStyle:"solid",borderWidth:B,borderRadius:"50%",transition:`all ${i}`},[`${r}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${r}-checked`]:{[C]:{borderColor:o,backgroundColor:S,"&::after":{transform:`scale(${e.calc(e.dotSize).div(t).equal()})`,opacity:1,transition:`all ${l} ${a}`}}},[`${r}-disabled`]:{cursor:"not-allowed",[C]:{backgroundColor:$,borderColor:I,cursor:"not-allowed","&::after":{backgroundColor:h}},[`${r}-input`]:{cursor:"not-allowed"},[`${r}-disabled + span`]:{color:E,cursor:"not-allowed"},[`&${r}-checked`]:{[C]:{"&::after":{transform:`scale(${k(R).div(t).equal()})`}}}},[`span${r} + *`]:{paddingInlineStart:x,paddingInlineEnd:x}})}},Je=e=>{const{buttonColor:r,controlHeight:n,componentCls:o,lineWidth:t,lineType:l,colorBorder:i,motionDurationMid:a,buttonPaddingInline:d,fontSize:I,buttonBg:B,fontSizeLG:$,controlHeightLG:E,controlHeightSM:x,paddingXS:h,borderRadius:b,borderRadiusSM:g,borderRadiusLG:S,buttonCheckedBg:k,buttonSolidCheckedColor:C,colorTextDisabled:w,colorBgContainerDisabled:R,buttonCheckedBgDisabled:p,buttonCheckedColorDisabled:_,colorPrimary:f,colorPrimaryHover:O,colorPrimaryActive:P,buttonSolidCheckedBg:v,buttonSolidCheckedHoverBg:M,buttonSolidCheckedActiveBg:y,calc:u}=e;return{[`${o}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:d,paddingBlock:0,color:r,fontSize:I,lineHeight:L(u(n).sub(u(t).mul(2)).equal()),background:B,border:`${L(t)} ${l} ${i}`,borderBlockStartWidth:u(t).add(.02).equal(),borderInlineEndWidth:t,cursor:"pointer",transition:[`color ${a}`,`background ${a}`,`box-shadow ${a}`].join(","),a:{color:r},[`> ${o}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:u(t).mul(-1).equal()},"&:first-child":{borderInlineStart:`${L(t)} ${l} ${i}`,borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b},"&:first-child:last-child":{borderRadius:b},[`${o}-group-large &`]:{height:E,fontSize:$,lineHeight:L(u(E).sub(u(t).mul(2)).equal()),"&:first-child":{borderStartStartRadius:S,borderEndStartRadius:S},"&:last-child":{borderStartEndRadius:S,borderEndEndRadius:S}},[`${o}-group-small &`]:{height:x,paddingInline:u(h).sub(t).equal(),paddingBlock:0,lineHeight:L(u(x).sub(u(t).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:"relative",color:f},"&:has(:focus-visible)":me(e),[`${o}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${o}-button-wrapper-disabled)`]:{zIndex:1,color:f,background:k,borderColor:f,"&::before":{backgroundColor:f},"&:first-child":{borderColor:f},"&:hover":{color:O,borderColor:O,"&::before":{backgroundColor:O}},"&:active":{color:P,borderColor:P,"&::before":{backgroundColor:P}}},[`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]:{color:C,background:v,borderColor:v,"&:hover":{color:C,background:M,borderColor:M},"&:active":{color:C,background:y,borderColor:y}},"&-disabled":{color:w,backgroundColor:R,borderColor:i,cursor:"not-allowed","&:first-child, &:hover":{color:w,backgroundColor:R,borderColor:i}},[`&-disabled${o}-button-wrapper-checked`]:{color:_,backgroundColor:p,borderColor:i,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},Ke=e=>{const{wireframe:r,padding:n,marginXS:o,lineWidth:t,fontSizeLG:l,colorText:i,colorBgContainer:a,colorTextDisabled:d,controlItemBgActiveDisabled:I,colorTextLightSolid:B,colorPrimary:$,colorPrimaryHover:E,colorPrimaryActive:x,colorWhite:h}=e,b=4,g=l,S=r?g-b*2:g-(b+t)*2;return{radioSize:g,dotSize:S,dotColorDisabled:d,buttonSolidCheckedColor:B,buttonSolidCheckedBg:$,buttonSolidCheckedHoverBg:E,buttonSolidCheckedActiveBg:x,buttonBg:a,buttonCheckedBg:a,buttonColor:i,buttonCheckedBgDisabled:I,buttonCheckedColorDisabled:d,buttonPaddingInline:n-t,wrapperMarginInlineEnd:o,radioColor:r?$:h,radioBgColor:r?a:$}},ke=Ee("Radio",e=>{const{controlOutline:r,controlOutlineWidth:n}=e,o=`0 0 0 ${L(n)} ${r}`,l=Oe(e,{radioFocusShadow:o,radioButtonFocusShadow:o});return[Xe(l),Ye(l),Je(l)]},Ke,{unitless:{radioSize:!0,dotSize:!0}});var Qe=function(e,r){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,o=Object.getOwnPropertySymbols(e);t<o.length;t++)r.indexOf(o[t])<0&&Object.prototype.propertyIsEnumerable.call(e,o[t])&&(n[o[t]]=e[o[t]]);return n};const Ue=(e,r)=>{var n,o;const t=s.useContext(ye),l=s.useContext(Se),{getPrefixCls:i,direction:a,radio:d}=s.useContext(le),I=s.useRef(null),B=Be(r,I),{isFormItemInput:$}=s.useContext(Ce),E=N=>{var c,j;(c=e.onChange)===null||c===void 0||c.call(e,N),(j=t?.onChange)===null||j===void 0||j.call(t,N)},{prefixCls:x,className:h,rootClassName:b,children:g,style:S,title:k}=e,C=Qe(e,["prefixCls","className","rootClassName","children","style","title"]),w=i("radio",x),R=(t?.optionType||l)==="button",p=R?`${w}-button`:w,_=ve(w),[f,O,P]=ke(w,_),v=Object.assign({},C),M=s.useContext(Pe);t&&(v.name=t.name,v.onChange=E,v.checked=e.value===t.value,v.disabled=(n=v.disabled)!==null&&n!==void 0?n:t.disabled),v.disabled=(o=v.disabled)!==null&&o!==void 0?o:M;const y=Z(`${p}-wrapper`,{[`${p}-wrapper-checked`]:v.checked,[`${p}-wrapper-disabled`]:v.disabled,[`${p}-wrapper-rtl`]:a==="rtl",[`${p}-wrapper-in-form-item`]:$,[`${p}-wrapper-block`]:!!t?.block},d?.className,h,b,O,P,_),[u,D]=Ge(v.onClick);return f(s.createElement(_e,{component:"Radio",disabled:v.disabled},s.createElement("label",{className:y,style:Object.assign(Object.assign({},d?.style),S),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:k,onClick:u},s.createElement(qe,Object.assign({},v,{className:Z(v.className,{[Ne]:!R}),type:"radio",prefixCls:p,ref:B,onClick:D})),g!==void 0?s.createElement("span",{className:`${p}-label`},g):null)))},ee=s.forwardRef(Ue),Ze=["parentNode"],et="form_item";function xe(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function tt(e,r){if(!e.length)return;const n=e.join("_");return r?`${r}_${n}`:Ze.includes(n)?`${et}_${n}`:n}function dt(e,r,n,o,t,l){let i=o;return l!==void 0?i=l:n.validating?i="validating":e.length?i="error":r.length?i="warning":(n.touched||t&&n.validated)&&(i="success"),i}var ot=function(e,r){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,o=Object.getOwnPropertySymbols(e);t<o.length;t++)r.indexOf(o[t])<0&&Object.prototype.propertyIsEnumerable.call(e,o[t])&&(n[o[t]]=e[o[t]]);return n};function ne(e){return xe(e).join("_")}function he(e,r){const n=r.getFieldInstance(e),o=je(n);if(o)return o;const t=tt(xe(e),r.__INTERNAL__.name);if(t)return document.getElementById(t)}function ct(e){const[r]=Me(),n=s.useRef({}),o=s.useMemo(()=>e??Object.assign(Object.assign({},r),{__INTERNAL__:{itemRef:t=>l=>{const i=ne(t);l?n.current[i]=l:delete n.current[i]}},scrollToField:(t,l={})=>{const{focus:i}=l,a=ot(l,["focus"]),d=he(t,o);d&&(He(d,Object.assign({scrollMode:"if-needed",block:"nearest"},a)),i&&o.focusField(t))},focusField:t=>{var l,i;const a=o.getFieldInstance(t);typeof a?.focus=="function"?a.focus():(i=(l=he(t,o))===null||l===void 0?void 0:l.focus)===null||i===void 0||i.call(l)},getFieldInstance:t=>{const l=ne(t);return n.current[l]}}),[e,r]);return[o]}const rt=s.forwardRef((e,r)=>{const{getPrefixCls:n,direction:o}=s.useContext(le),{name:t}=s.useContext(Ce),l=De(ne(t)),{prefixCls:i,className:a,rootClassName:d,options:I,buttonStyle:B="outline",disabled:$,children:E,size:x,style:h,id:b,optionType:g,name:S=l,defaultValue:k,value:C,block:w=!1,onChange:R,onMouseEnter:p,onMouseLeave:_,onFocus:f,onBlur:O}=e,[P,v]=pe(k,{value:C}),M=s.useCallback(m=>{const V=P,H=m.target.value;"value"in e||v(H),H!==V&&R?.(m)},[P,v,R]),y=n("radio",i),u=`${y}-group`,D=ve(y),[N,c,j]=ke(y,D);let F=E;I&&I.length>0&&(F=I.map(m=>typeof m=="string"||typeof m=="number"?s.createElement(ee,{key:m.toString(),prefixCls:y,disabled:$,value:m,checked:P===m},m):s.createElement(ee,{key:`radio-group-value-options-${m.value}`,prefixCls:y,disabled:m.disabled||$,value:m.value,checked:P===m.value,title:m.title,style:m.style,className:m.className,id:m.id,required:m.required},m.label)));const W=Te(x),A=Z(u,`${u}-${B}`,{[`${u}-${W}`]:W,[`${u}-rtl`]:o==="rtl",[`${u}-block`]:w},a,d,c,j,D),q=s.useMemo(()=>({onChange:M,value:P,disabled:$,name:S,optionType:g,block:w}),[M,P,$,S,g,w]);return N(s.createElement("div",Object.assign({},ze(e,{aria:!0,data:!0}),{className:A,style:h,onMouseEnter:p,onMouseLeave:_,onFocus:f,onBlur:O,id:b,ref:r}),s.createElement(Le,{value:q},F)))}),nt=s.memo(rt);var lt=function(e,r){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,o=Object.getOwnPropertySymbols(e);t<o.length;t++)r.indexOf(o[t])<0&&Object.prototype.propertyIsEnumerable.call(e,o[t])&&(n[o[t]]=e[o[t]]);return n};const it=(e,r)=>{const{getPrefixCls:n}=s.useContext(le),{prefixCls:o}=e,t=lt(e,["prefixCls"]),l=n("radio",o);return s.createElement(Ve,{value:"button"},s.createElement(ee,Object.assign({prefixCls:l},t,{type:"radio",ref:r})))},at=s.forwardRef(it),ie=ee;ie.Button=at;ie.Group=nt;ie.__ANT_RADIO=!0;export{qe as C,ie as R,ct as a,tt as b,dt as g,xe as t,Ge as u};
3
- //# sourceMappingURL=index-Cg2Wi2pt.js.map
3
+ //# sourceMappingURL=index-CZXbP5HB.js.map
@@ -1,4 +1,4 @@
1
- import{aD as vt,a2 as o,aS as Ft,a8 as ft,bc as Jt,r as l,I as ht,_ as ee,i as Te,a3 as Q,n as M,h as q,a7 as rt,p as Xt,a4 as Ut,v as Ct,x as St,z as $t,A as h,bp as at,ab as Gt,b2 as Le,b4 as Qt,ac as Yt,J as Zt,bH as kt,aR as ot,ad as lt,X as en,F as tn,D as yt,aJ as nn,ag as rn,aL as an,bI as on,aM as ln,bJ as cn}from"./index-HJggy9SZ.js";import{u as sn}from"./index-B4zZ11c-.js";import{a as un,i as dn,g as mn,n as gn,o as pn,p as bn}from"./index-mHLzQpzS.js";function ct(...e){const t={};return e.forEach(i=>{i&&Object.keys(i).forEach(n=>{i[n]!==void 0&&(t[n]=i[n])})}),t}function st(e){if(!e)return;const{closable:t,closeIcon:i}=e;return{closable:t,closeIcon:i}}function ut(e){const{closable:t,closeIcon:i}=e||{};return o.useMemo(()=>{if(!t&&(t===!1||i===!1||i===null))return!1;if(t===void 0&&i===void 0)return null;let n={closeIcon:typeof i!="boolean"&&i!==null?i:void 0};return t&&typeof t=="object"&&(n=Object.assign(Object.assign({},n),t)),n},[t,i])}const vn={},fn=(e,t,i=vn)=>{const n=ut(e),r=ut(t),[p]=vt("global",Jt.global),v=typeof n!="boolean"?!!n?.disabled:!1,b=o.useMemo(()=>Object.assign({closeIcon:o.createElement(Ft,null)},i),[i]),d=o.useMemo(()=>n===!1?!1:n?ct(b,r,n):r===!1?!1:r?ct(b,r):b.closable?b:!1,[n,r,b]);return o.useMemo(()=>{var $,x;if(d===!1)return[!1,null,v,{}];const{closeIconRender:s}=b,{closeIcon:C}=d;let f=C;const P=ft(d,!0);return f!=null&&(s&&(f=s(C)),f=o.isValidElement(f)?o.cloneElement(f,Object.assign(Object.assign(Object.assign({},f.props),{"aria-label":(x=($=f.props)===null||$===void 0?void 0:$["aria-label"])!==null&&x!==void 0?x:p.close}),P)):o.createElement("span",Object.assign({"aria-label":p.close},P),f)),[!0,f,v,P]},[v,p.close,d,b])};var hn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},Cn=function(t,i){return l.createElement(ht,ee({},t,{ref:i,icon:hn}))},dt=l.forwardRef(Cn),Sn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},$n=function(t,i){return l.createElement(ht,ee({},t,{ref:i,icon:Sn}))},mt=l.forwardRef($n),yn={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},xn=[10,20,50,100],zn=function(t){var i=t.pageSizeOptions,n=i===void 0?xn:i,r=t.locale,p=t.changeSize,v=t.pageSize,b=t.goButton,d=t.quickGo,$=t.rootPrefixCls,x=t.disabled,s=t.buildOptionText,C=t.showSizeChanger,f=t.sizeChangerRender,P=o.useState(""),I=Te(P,2),y=I[0],E=I[1],_=function(){return!y||Number.isNaN(y)?void 0:Number(y)},D=typeof s=="function"?s:function(g){return"".concat(g," ").concat(r.items_per_page)},Y=function(S){E(S.target.value)},m=function(S){b||y===""||(E(""),!(S.relatedTarget&&(S.relatedTarget.className.indexOf("".concat($,"-item-link"))>=0||S.relatedTarget.className.indexOf("".concat($,"-item"))>=0))&&d?.(_()))},w=function(S){y!==""&&(S.keyCode===Q.ENTER||S.type==="click")&&(E(""),d?.(_()))},N=function(){return n.some(function(S){return S.toString()===v.toString()})?n:n.concat([v]).sort(function(S,L){var Z=Number.isNaN(Number(S))?0:Number(S),F=Number.isNaN(Number(L))?0:Number(L);return Z-F})},j="".concat($,"-options");if(!C&&!d)return null;var K=null,A=null,J=null;return C&&f&&(K=f({disabled:x,size:v,onSizeChange:function(S){p?.(Number(S))},"aria-label":r.page_size,className:"".concat(j,"-size-changer"),options:N().map(function(g){return{label:D(g),value:g}})})),d&&(b&&(J=typeof b=="boolean"?o.createElement("button",{type:"button",onClick:w,onKeyUp:w,disabled:x,className:"".concat(j,"-quick-jumper-button")},r.jump_to_confirm):o.createElement("span",{onClick:w,onKeyUp:w},b)),A=o.createElement("div",{className:"".concat(j,"-quick-jumper")},r.jump_to,o.createElement("input",{disabled:x,type:"text",value:y,onChange:Y,onKeyUp:w,onBlur:m,"aria-label":r.page}),r.page,J)),o.createElement("li",{className:j},K,A)},he=function(t){var i=t.rootPrefixCls,n=t.page,r=t.active,p=t.className,v=t.showTitle,b=t.onClick,d=t.onKeyPress,$=t.itemRender,x="".concat(i,"-item"),s=M(x,"".concat(x,"-").concat(n),q(q({},"".concat(x,"-active"),r),"".concat(x,"-disabled"),!n),p),C=function(){b(n)},f=function(y){d(y,b,n)},P=$(n,"page",o.createElement("a",{rel:"nofollow"},n));return P?o.createElement("li",{title:v?String(n):null,className:s,onClick:C,onKeyDown:f,tabIndex:0},P):null},In=function(t,i,n){return n};function gt(){}function pt(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function ae(e,t,i){var n=typeof e>"u"?t:e;return Math.floor((i-1)/n)+1}var Pn=function(t){var i=t.prefixCls,n=i===void 0?"rc-pagination":i,r=t.selectPrefixCls,p=r===void 0?"rc-select":r,v=t.className,b=t.current,d=t.defaultCurrent,$=d===void 0?1:d,x=t.total,s=x===void 0?0:x,C=t.pageSize,f=t.defaultPageSize,P=f===void 0?10:f,I=t.onChange,y=I===void 0?gt:I,E=t.hideOnSinglePage,_=t.align,D=t.showPrevNextJumpers,Y=D===void 0?!0:D,m=t.showQuickJumper,w=t.showLessItems,N=t.showTitle,j=N===void 0?!0:N,K=t.onShowSizeChange,A=K===void 0?gt:K,J=t.locale,g=J===void 0?yn:J,S=t.style,L=t.totalBoundaryShowSizeChanger,Z=L===void 0?50:L,F=t.disabled,H=t.simple,R=t.showTotal,oe=t.showSizeChanger,W=oe===void 0?s>Z:oe,le=t.sizeChangerRender,te=t.pageSizeOptions,Ce=t.itemRender,ne=Ce===void 0?In:Ce,Se=t.jumpPrevIcon,X=t.jumpNextIcon,ie=t.prevIcon,ue=t.nextIcon,de=o.useRef(null),re=rt(10,{value:C,defaultValue:P}),$e=Te(re,2),B=$e[0],ye=$e[1],Me=rt(1,{value:b,defaultValue:$,postState:function(u){return Math.max(1,Math.min(u,ae(void 0,B,s)))}}),ce=Te(Me,2),c=ce[0],U=ce[1],_e=o.useState(c),qe=Te(_e,2),se=qe[0],xe=qe[1];l.useEffect(function(){xe(c)},[c]);var Ke=Math.max(1,c-(w?3:5)),Fe=Math.min(ae(void 0,B,s),c+(w?3:5));function ze(a,u){var z=a||o.createElement("button",{type:"button","aria-label":u,className:"".concat(n,"-item-link")});return typeof a=="function"&&(z=o.createElement(a,Ut({},t))),z}function Je(a){var u=a.target.value,z=ae(void 0,B,s),k;return u===""?k=u:Number.isNaN(Number(u))?k=se:u>=z?k=z:k=Number(u),k}function Pt(a){return pt(a)&&a!==c&&pt(s)&&s>0}var Nt=s>B?m:!1;function Ot(a){(a.keyCode===Q.UP||a.keyCode===Q.DOWN)&&a.preventDefault()}function Xe(a){var u=Je(a);switch(u!==se&&xe(u),a.keyCode){case Q.ENTER:V(u);break;case Q.UP:V(u-1);break;case Q.DOWN:V(u+1);break}}function Et(a){V(Je(a))}function jt(a){var u=ae(a,B,s),z=c>u&&u!==0?u:c;ye(a),xe(z),A?.(c,a),U(z),y?.(z,a)}function V(a){if(Pt(a)&&!F){var u=ae(void 0,B,s),z=a;return a>u?z=u:a<1&&(z=1),z!==se&&xe(z),U(z),y?.(z,B),z}return c}var Ie=c>1,Pe=c<ae(void 0,B,s);function Ue(){Ie&&V(c-1)}function Ge(){Pe&&V(c+1)}function Qe(){V(Ke)}function Ye(){V(Fe)}function me(a,u){if(a.key==="Enter"||a.charCode===Q.ENTER||a.keyCode===Q.ENTER){for(var z=arguments.length,k=new Array(z>2?z-2:0),Be=2;Be<z;Be++)k[Be-2]=arguments[Be];u.apply(void 0,k)}}function Bt(a){me(a,Ue)}function wt(a){me(a,Ge)}function Tt(a){me(a,Qe)}function Mt(a){me(a,Ye)}function _t(a){var u=ne(a,"prev",ze(ie,"prev page"));return o.isValidElement(u)?o.cloneElement(u,{disabled:!Ie}):u}function Ht(a){var u=ne(a,"next",ze(ue,"next page"));return o.isValidElement(u)?o.cloneElement(u,{disabled:!Pe}):u}function Ne(a){(a.type==="click"||a.keyCode===Q.ENTER)&&V(se)}var Ze=null,Rt=ft(t,{aria:!0,data:!0}),Dt=R&&o.createElement("li",{className:"".concat(n,"-total-text")},R(s,[s===0?0:(c-1)*B+1,c*B>s?s:c*B])),ke=null,O=ae(void 0,B,s);if(E&&s<=B)return null;var T=[],ge={rootPrefixCls:n,onClick:V,onKeyPress:me,showTitle:j,itemRender:ne,page:-1},At=c-1>0?c-1:0,Lt=c+1<O?c+1:O,Oe=m&&m.goButton,Wt=Xt(H)==="object"?H.readOnly:!H,pe=Oe,et=null;H&&(Oe&&(typeof Oe=="boolean"?pe=o.createElement("button",{type:"button",onClick:Ne,onKeyUp:Ne},g.jump_to_confirm):pe=o.createElement("span",{onClick:Ne,onKeyUp:Ne},Oe),pe=o.createElement("li",{title:j?"".concat(g.jump_to).concat(c,"/").concat(O):null,className:"".concat(n,"-simple-pager")},pe)),et=o.createElement("li",{title:j?"".concat(c,"/").concat(O):null,className:"".concat(n,"-simple-pager")},Wt?se:o.createElement("input",{type:"text","aria-label":g.jump_to,value:se,disabled:F,onKeyDown:Ot,onKeyUp:Xe,onChange:Xe,onBlur:Et,size:3}),o.createElement("span",{className:"".concat(n,"-slash")},"/"),O));var G=w?1:2;if(O<=3+G*2){O||T.push(o.createElement(he,ee({},ge,{key:"noPager",page:1,className:"".concat(n,"-item-disabled")})));for(var be=1;be<=O;be+=1)T.push(o.createElement(he,ee({},ge,{key:be,page:be,active:c===be})))}else{var Vt=w?g.prev_3:g.prev_5,qt=w?g.next_3:g.next_5,tt=ne(Ke,"jump-prev",ze(Se,"prev page")),nt=ne(Fe,"jump-next",ze(X,"next page"));Y&&(Ze=tt?o.createElement("li",{title:j?Vt:null,key:"prev",onClick:Qe,tabIndex:0,onKeyDown:Tt,className:M("".concat(n,"-jump-prev"),q({},"".concat(n,"-jump-prev-custom-icon"),!!Se))},tt):null,ke=nt?o.createElement("li",{title:j?qt:null,key:"next",onClick:Ye,tabIndex:0,onKeyDown:Mt,className:M("".concat(n,"-jump-next"),q({},"".concat(n,"-jump-next-custom-icon"),!!X))},nt):null);var He=Math.max(1,c-G),Re=Math.min(c+G,O);c-1<=G&&(Re=1+G*2),O-c<=G&&(He=O-G*2);for(var ve=He;ve<=Re;ve+=1)T.push(o.createElement(he,ee({},ge,{key:ve,page:ve,active:c===ve})));if(c-1>=G*2&&c!==3&&(T[0]=o.cloneElement(T[0],{className:M("".concat(n,"-item-after-jump-prev"),T[0].props.className)}),T.unshift(Ze)),O-c>=G*2&&c!==O-2){var it=T[T.length-1];T[T.length-1]=o.cloneElement(it,{className:M("".concat(n,"-item-before-jump-next"),it.props.className)}),T.push(ke)}He!==1&&T.unshift(o.createElement(he,ee({},ge,{key:1,page:1}))),Re!==O&&T.push(o.createElement(he,ee({},ge,{key:O,page:O})))}var Ee=_t(At);if(Ee){var De=!Ie||!O;Ee=o.createElement("li",{title:j?g.prev_page:null,onClick:Ue,tabIndex:De?null:0,onKeyDown:Bt,className:M("".concat(n,"-prev"),q({},"".concat(n,"-disabled"),De)),"aria-disabled":De},Ee)}var je=Ht(Lt);if(je){var fe,Ae;H?(fe=!Pe,Ae=Ie?0:null):(fe=!Pe||!O,Ae=fe?null:0),je=o.createElement("li",{title:j?g.next_page:null,onClick:Ge,tabIndex:Ae,onKeyDown:wt,className:M("".concat(n,"-next"),q({},"".concat(n,"-disabled"),fe)),"aria-disabled":fe},je)}var Kt=M(n,v,q(q(q(q(q({},"".concat(n,"-start"),_==="start"),"".concat(n,"-center"),_==="center"),"".concat(n,"-end"),_==="end"),"".concat(n,"-simple"),H),"".concat(n,"-disabled"),F));return o.createElement("ul",ee({className:Kt,style:S,ref:de},Rt),Dt,Ee,H?et:T,je,o.createElement(zn,{locale:g,rootPrefixCls:n,disabled:F,selectPrefixCls:p,changeSize:jt,pageSize:B,pageSizeOptions:te,quickGo:Nt?V:null,goButton:pe,showSizeChanger:W,sizeChangerRender:le}))};const Nn=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},On=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:h(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:h(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:h(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
1
+ import{aD as vt,a2 as o,aS as Ft,a8 as ft,a$ as Jt,r as l,I as ht,_ as ee,i as Te,a3 as Q,n as M,h as q,a7 as rt,p as Xt,a4 as Ut,v as Ct,x as St,z as $t,A as h,bp as at,ab as Gt,ba as Le,bc as Qt,ac as Yt,J as Zt,bH as kt,aR as ot,ad as lt,X as en,F as tn,D as yt,aJ as nn,ag as rn,aL as an,bI as on,aM as ln,bJ as cn}from"./index-BtXc5-H2.js";import{u as sn}from"./index-Cfg0ICF_.js";import{a as un,i as dn,g as mn,n as gn,o as pn,p as bn}from"./index-xZubvNRw.js";function ct(...e){const t={};return e.forEach(i=>{i&&Object.keys(i).forEach(n=>{i[n]!==void 0&&(t[n]=i[n])})}),t}function st(e){if(!e)return;const{closable:t,closeIcon:i}=e;return{closable:t,closeIcon:i}}function ut(e){const{closable:t,closeIcon:i}=e||{};return o.useMemo(()=>{if(!t&&(t===!1||i===!1||i===null))return!1;if(t===void 0&&i===void 0)return null;let n={closeIcon:typeof i!="boolean"&&i!==null?i:void 0};return t&&typeof t=="object"&&(n=Object.assign(Object.assign({},n),t)),n},[t,i])}const vn={},fn=(e,t,i=vn)=>{const n=ut(e),r=ut(t),[p]=vt("global",Jt.global),v=typeof n!="boolean"?!!n?.disabled:!1,b=o.useMemo(()=>Object.assign({closeIcon:o.createElement(Ft,null)},i),[i]),d=o.useMemo(()=>n===!1?!1:n?ct(b,r,n):r===!1?!1:r?ct(b,r):b.closable?b:!1,[n,r,b]);return o.useMemo(()=>{var $,x;if(d===!1)return[!1,null,v,{}];const{closeIconRender:s}=b,{closeIcon:C}=d;let f=C;const P=ft(d,!0);return f!=null&&(s&&(f=s(C)),f=o.isValidElement(f)?o.cloneElement(f,Object.assign(Object.assign(Object.assign({},f.props),{"aria-label":(x=($=f.props)===null||$===void 0?void 0:$["aria-label"])!==null&&x!==void 0?x:p.close}),P)):o.createElement("span",Object.assign({"aria-label":p.close},P),f)),[!0,f,v,P]},[v,p.close,d,b])};var hn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},Cn=function(t,i){return l.createElement(ht,ee({},t,{ref:i,icon:hn}))},dt=l.forwardRef(Cn),Sn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},$n=function(t,i){return l.createElement(ht,ee({},t,{ref:i,icon:Sn}))},mt=l.forwardRef($n),yn={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},xn=[10,20,50,100],zn=function(t){var i=t.pageSizeOptions,n=i===void 0?xn:i,r=t.locale,p=t.changeSize,v=t.pageSize,b=t.goButton,d=t.quickGo,$=t.rootPrefixCls,x=t.disabled,s=t.buildOptionText,C=t.showSizeChanger,f=t.sizeChangerRender,P=o.useState(""),I=Te(P,2),y=I[0],E=I[1],_=function(){return!y||Number.isNaN(y)?void 0:Number(y)},D=typeof s=="function"?s:function(g){return"".concat(g," ").concat(r.items_per_page)},Y=function(S){E(S.target.value)},m=function(S){b||y===""||(E(""),!(S.relatedTarget&&(S.relatedTarget.className.indexOf("".concat($,"-item-link"))>=0||S.relatedTarget.className.indexOf("".concat($,"-item"))>=0))&&d?.(_()))},w=function(S){y!==""&&(S.keyCode===Q.ENTER||S.type==="click")&&(E(""),d?.(_()))},N=function(){return n.some(function(S){return S.toString()===v.toString()})?n:n.concat([v]).sort(function(S,L){var Z=Number.isNaN(Number(S))?0:Number(S),F=Number.isNaN(Number(L))?0:Number(L);return Z-F})},j="".concat($,"-options");if(!C&&!d)return null;var K=null,A=null,J=null;return C&&f&&(K=f({disabled:x,size:v,onSizeChange:function(S){p?.(Number(S))},"aria-label":r.page_size,className:"".concat(j,"-size-changer"),options:N().map(function(g){return{label:D(g),value:g}})})),d&&(b&&(J=typeof b=="boolean"?o.createElement("button",{type:"button",onClick:w,onKeyUp:w,disabled:x,className:"".concat(j,"-quick-jumper-button")},r.jump_to_confirm):o.createElement("span",{onClick:w,onKeyUp:w},b)),A=o.createElement("div",{className:"".concat(j,"-quick-jumper")},r.jump_to,o.createElement("input",{disabled:x,type:"text",value:y,onChange:Y,onKeyUp:w,onBlur:m,"aria-label":r.page}),r.page,J)),o.createElement("li",{className:j},K,A)},he=function(t){var i=t.rootPrefixCls,n=t.page,r=t.active,p=t.className,v=t.showTitle,b=t.onClick,d=t.onKeyPress,$=t.itemRender,x="".concat(i,"-item"),s=M(x,"".concat(x,"-").concat(n),q(q({},"".concat(x,"-active"),r),"".concat(x,"-disabled"),!n),p),C=function(){b(n)},f=function(y){d(y,b,n)},P=$(n,"page",o.createElement("a",{rel:"nofollow"},n));return P?o.createElement("li",{title:v?String(n):null,className:s,onClick:C,onKeyDown:f,tabIndex:0},P):null},In=function(t,i,n){return n};function gt(){}function pt(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function ae(e,t,i){var n=typeof e>"u"?t:e;return Math.floor((i-1)/n)+1}var Pn=function(t){var i=t.prefixCls,n=i===void 0?"rc-pagination":i,r=t.selectPrefixCls,p=r===void 0?"rc-select":r,v=t.className,b=t.current,d=t.defaultCurrent,$=d===void 0?1:d,x=t.total,s=x===void 0?0:x,C=t.pageSize,f=t.defaultPageSize,P=f===void 0?10:f,I=t.onChange,y=I===void 0?gt:I,E=t.hideOnSinglePage,_=t.align,D=t.showPrevNextJumpers,Y=D===void 0?!0:D,m=t.showQuickJumper,w=t.showLessItems,N=t.showTitle,j=N===void 0?!0:N,K=t.onShowSizeChange,A=K===void 0?gt:K,J=t.locale,g=J===void 0?yn:J,S=t.style,L=t.totalBoundaryShowSizeChanger,Z=L===void 0?50:L,F=t.disabled,H=t.simple,R=t.showTotal,oe=t.showSizeChanger,W=oe===void 0?s>Z:oe,le=t.sizeChangerRender,te=t.pageSizeOptions,Ce=t.itemRender,ne=Ce===void 0?In:Ce,Se=t.jumpPrevIcon,X=t.jumpNextIcon,ie=t.prevIcon,ue=t.nextIcon,de=o.useRef(null),re=rt(10,{value:C,defaultValue:P}),$e=Te(re,2),B=$e[0],ye=$e[1],Me=rt(1,{value:b,defaultValue:$,postState:function(u){return Math.max(1,Math.min(u,ae(void 0,B,s)))}}),ce=Te(Me,2),c=ce[0],U=ce[1],_e=o.useState(c),qe=Te(_e,2),se=qe[0],xe=qe[1];l.useEffect(function(){xe(c)},[c]);var Ke=Math.max(1,c-(w?3:5)),Fe=Math.min(ae(void 0,B,s),c+(w?3:5));function ze(a,u){var z=a||o.createElement("button",{type:"button","aria-label":u,className:"".concat(n,"-item-link")});return typeof a=="function"&&(z=o.createElement(a,Ut({},t))),z}function Je(a){var u=a.target.value,z=ae(void 0,B,s),k;return u===""?k=u:Number.isNaN(Number(u))?k=se:u>=z?k=z:k=Number(u),k}function Pt(a){return pt(a)&&a!==c&&pt(s)&&s>0}var Nt=s>B?m:!1;function Ot(a){(a.keyCode===Q.UP||a.keyCode===Q.DOWN)&&a.preventDefault()}function Xe(a){var u=Je(a);switch(u!==se&&xe(u),a.keyCode){case Q.ENTER:V(u);break;case Q.UP:V(u-1);break;case Q.DOWN:V(u+1);break}}function Et(a){V(Je(a))}function jt(a){var u=ae(a,B,s),z=c>u&&u!==0?u:c;ye(a),xe(z),A?.(c,a),U(z),y?.(z,a)}function V(a){if(Pt(a)&&!F){var u=ae(void 0,B,s),z=a;return a>u?z=u:a<1&&(z=1),z!==se&&xe(z),U(z),y?.(z,B),z}return c}var Ie=c>1,Pe=c<ae(void 0,B,s);function Ue(){Ie&&V(c-1)}function Ge(){Pe&&V(c+1)}function Qe(){V(Ke)}function Ye(){V(Fe)}function me(a,u){if(a.key==="Enter"||a.charCode===Q.ENTER||a.keyCode===Q.ENTER){for(var z=arguments.length,k=new Array(z>2?z-2:0),Be=2;Be<z;Be++)k[Be-2]=arguments[Be];u.apply(void 0,k)}}function Bt(a){me(a,Ue)}function wt(a){me(a,Ge)}function Tt(a){me(a,Qe)}function Mt(a){me(a,Ye)}function _t(a){var u=ne(a,"prev",ze(ie,"prev page"));return o.isValidElement(u)?o.cloneElement(u,{disabled:!Ie}):u}function Ht(a){var u=ne(a,"next",ze(ue,"next page"));return o.isValidElement(u)?o.cloneElement(u,{disabled:!Pe}):u}function Ne(a){(a.type==="click"||a.keyCode===Q.ENTER)&&V(se)}var Ze=null,Rt=ft(t,{aria:!0,data:!0}),Dt=R&&o.createElement("li",{className:"".concat(n,"-total-text")},R(s,[s===0?0:(c-1)*B+1,c*B>s?s:c*B])),ke=null,O=ae(void 0,B,s);if(E&&s<=B)return null;var T=[],ge={rootPrefixCls:n,onClick:V,onKeyPress:me,showTitle:j,itemRender:ne,page:-1},At=c-1>0?c-1:0,Lt=c+1<O?c+1:O,Oe=m&&m.goButton,Wt=Xt(H)==="object"?H.readOnly:!H,pe=Oe,et=null;H&&(Oe&&(typeof Oe=="boolean"?pe=o.createElement("button",{type:"button",onClick:Ne,onKeyUp:Ne},g.jump_to_confirm):pe=o.createElement("span",{onClick:Ne,onKeyUp:Ne},Oe),pe=o.createElement("li",{title:j?"".concat(g.jump_to).concat(c,"/").concat(O):null,className:"".concat(n,"-simple-pager")},pe)),et=o.createElement("li",{title:j?"".concat(c,"/").concat(O):null,className:"".concat(n,"-simple-pager")},Wt?se:o.createElement("input",{type:"text","aria-label":g.jump_to,value:se,disabled:F,onKeyDown:Ot,onKeyUp:Xe,onChange:Xe,onBlur:Et,size:3}),o.createElement("span",{className:"".concat(n,"-slash")},"/"),O));var G=w?1:2;if(O<=3+G*2){O||T.push(o.createElement(he,ee({},ge,{key:"noPager",page:1,className:"".concat(n,"-item-disabled")})));for(var be=1;be<=O;be+=1)T.push(o.createElement(he,ee({},ge,{key:be,page:be,active:c===be})))}else{var Vt=w?g.prev_3:g.prev_5,qt=w?g.next_3:g.next_5,tt=ne(Ke,"jump-prev",ze(Se,"prev page")),nt=ne(Fe,"jump-next",ze(X,"next page"));Y&&(Ze=tt?o.createElement("li",{title:j?Vt:null,key:"prev",onClick:Qe,tabIndex:0,onKeyDown:Tt,className:M("".concat(n,"-jump-prev"),q({},"".concat(n,"-jump-prev-custom-icon"),!!Se))},tt):null,ke=nt?o.createElement("li",{title:j?qt:null,key:"next",onClick:Ye,tabIndex:0,onKeyDown:Mt,className:M("".concat(n,"-jump-next"),q({},"".concat(n,"-jump-next-custom-icon"),!!X))},nt):null);var He=Math.max(1,c-G),Re=Math.min(c+G,O);c-1<=G&&(Re=1+G*2),O-c<=G&&(He=O-G*2);for(var ve=He;ve<=Re;ve+=1)T.push(o.createElement(he,ee({},ge,{key:ve,page:ve,active:c===ve})));if(c-1>=G*2&&c!==3&&(T[0]=o.cloneElement(T[0],{className:M("".concat(n,"-item-after-jump-prev"),T[0].props.className)}),T.unshift(Ze)),O-c>=G*2&&c!==O-2){var it=T[T.length-1];T[T.length-1]=o.cloneElement(it,{className:M("".concat(n,"-item-before-jump-next"),it.props.className)}),T.push(ke)}He!==1&&T.unshift(o.createElement(he,ee({},ge,{key:1,page:1}))),Re!==O&&T.push(o.createElement(he,ee({},ge,{key:O,page:O})))}var Ee=_t(At);if(Ee){var De=!Ie||!O;Ee=o.createElement("li",{title:j?g.prev_page:null,onClick:Ue,tabIndex:De?null:0,onKeyDown:Bt,className:M("".concat(n,"-prev"),q({},"".concat(n,"-disabled"),De)),"aria-disabled":De},Ee)}var je=Ht(Lt);if(je){var fe,Ae;H?(fe=!Pe,Ae=Ie?0:null):(fe=!Pe||!O,Ae=fe?null:0),je=o.createElement("li",{title:j?g.next_page:null,onClick:Ge,tabIndex:Ae,onKeyDown:wt,className:M("".concat(n,"-next"),q({},"".concat(n,"-disabled"),fe)),"aria-disabled":fe},je)}var Kt=M(n,v,q(q(q(q(q({},"".concat(n,"-start"),_==="start"),"".concat(n,"-center"),_==="center"),"".concat(n,"-end"),_==="end"),"".concat(n,"-simple"),H),"".concat(n,"-disabled"),F));return o.createElement("ul",ee({className:Kt,style:S,ref:de},Rt),Dt,Ee,H?et:T,je,o.createElement(zn,{locale:g,rootPrefixCls:n,disabled:F,selectPrefixCls:p,changeSize:jt,pageSize:B,pageSizeOptions:te,quickGo:Nt?V:null,goButton:pe,showSizeChanger:W,sizeChangerRender:le}))};const Nn=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},On=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:h(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:h(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:h(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
2
2
  &${t}-mini ${t}-prev ${t}-item-link,
3
3
  &${t}-mini ${t}-next ${t}-item-link
4
4
  `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:h(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:h(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:h(e.itemSizeSM),input:Object.assign(Object.assign({},bn(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},En=e=>{const{componentCls:t}=e;return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:h(e.itemSize),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:h(e.itemSize)}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${h(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${h(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${h(e.inputOutlineOffset)} 0 ${h(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-mini`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSizeSM,lineHeight:h(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:h(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},jn=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
@@ -11,4 +11,4 @@ import{aD as vt,a2 as o,aS as Ft,a8 as ft,bc as Jt,r as l,I as ht,_ as ee,i as T
11
11
  ${t}-jump-prev,
12
12
  ${t}-jump-next
13
13
  `]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:h(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${h(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:h(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},mn(e)),gn(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},pn(e)),width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},Bn=e=>{const{componentCls:t}=e;return{[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:h(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${h(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${h(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},wn=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$t(e)),{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:h(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),Bn(e)),jn(e)),En(e)),On(e)),Nn(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},Tn=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},Gt(e)),[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":Object.assign({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},at(e))},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:at(e)}}}},xt=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},dn(e)),zt=e=>St(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},un(e)),Mn=Ct("Pagination",e=>{const t=zt(e);return[wn(t),Tn(t)]},xt),_n=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${h(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},Hn=Le(["Pagination","bordered"],e=>{const t=zt(e);return _n(t)},xt);function bt(e){return l.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[!0,e]:[void 0,void 0],[e])}var Rn=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[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])&&(i[n[r]]=e[n[r]]);return i};const Yn=e=>{const{align:t,prefixCls:i,selectPrefixCls:n,className:r,rootClassName:p,style:v,size:b,locale:d,responsive:$,showSizeChanger:x,selectComponentClass:s,pageSizeOptions:C}=e,f=Rn(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:P}=sn($),[,I]=Qt(),{getPrefixCls:y,direction:E,showSizeChanger:_,className:D,style:Y}=Yt("pagination"),m=y("pagination",i),[w,N,j]=Mn(m),K=Zt(b),A=K==="small"||!!(P&&!K&&$),[J]=vt("Pagination",kt),g=Object.assign(Object.assign({},J),d),[S,L]=bt(x),[Z,F]=bt(_),H=S??Z,R=L??F,oe=s||en,W=l.useMemo(()=>C?C.map(X=>Number(X)):void 0,[C]),le=X=>{var ie;const{disabled:ue,size:de,onSizeChange:re,"aria-label":$e,className:B,options:ye}=X,{className:Me,onChange:ce}=R||{},c=(ie=ye.find(U=>String(U.value)===String(de)))===null||ie===void 0?void 0:ie.value;return l.createElement(oe,Object.assign({disabled:ue,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:U=>U.parentNode,"aria-label":$e,options:ye},R,{value:c,onChange:(U,_e)=>{re?.(U),ce?.(U,_e)},size:A?"small":"middle",className:M(B,Me)}))},te=l.useMemo(()=>{const X=l.createElement("span",{className:`${m}-item-ellipsis`},"•••"),ie=l.createElement("button",{className:`${m}-item-link`,type:"button",tabIndex:-1},E==="rtl"?l.createElement(lt,null):l.createElement(ot,null)),ue=l.createElement("button",{className:`${m}-item-link`,type:"button",tabIndex:-1},E==="rtl"?l.createElement(ot,null):l.createElement(lt,null)),de=l.createElement("a",{className:`${m}-item-link`},l.createElement("div",{className:`${m}-item-container`},E==="rtl"?l.createElement(mt,{className:`${m}-item-link-icon`}):l.createElement(dt,{className:`${m}-item-link-icon`}),X)),re=l.createElement("a",{className:`${m}-item-link`},l.createElement("div",{className:`${m}-item-container`},E==="rtl"?l.createElement(dt,{className:`${m}-item-link-icon`}):l.createElement(mt,{className:`${m}-item-link-icon`}),X));return{prevIcon:ie,nextIcon:ue,jumpPrevIcon:de,jumpNextIcon:re}},[E,m]),Ce=y("select",n),ne=M({[`${m}-${t}`]:!!t,[`${m}-mini`]:A,[`${m}-rtl`]:E==="rtl",[`${m}-bordered`]:I.wireframe},D,r,p,N,j),Se=Object.assign(Object.assign({},Y),v);return w(l.createElement(l.Fragment,null,I.wireframe&&l.createElement(Hn,{prefixCls:m}),l.createElement(Pn,Object.assign({},te,f,{style:Se,prefixCls:m,selectPrefixCls:Ce,className:ne,locale:g,pageSizeOptions:W,showSizeChanger:H,sizeChangerRender:le}))))},Dn=e=>{const{paddingXXS:t,lineWidth:i,tagPaddingHorizontal:n,componentCls:r,calc:p}=e,v=p(n).sub(i).equal(),b=p(t).sub(i).equal();return{[r]:Object.assign(Object.assign({},$t(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:v,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${h(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${r}-close-icon`]:{marginInlineStart:b,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:v}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},We=e=>{const{lineWidth:t,fontSizeIcon:i,calc:n}=e,r=e.fontSizeSM;return St(e,{tagFontSize:r,tagLineHeight:h(n(e.lineHeightSM).mul(r).equal()),tagIconSize:n(i).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},Ve=e=>({defaultBg:new tn(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),It=Ct("Tag",e=>{const t=We(e);return Dn(t)},Ve);var An=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[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])&&(i[n[r]]=e[n[r]]);return i};const Ln=l.forwardRef((e,t)=>{const{prefixCls:i,style:n,className:r,checked:p,children:v,icon:b,onChange:d,onClick:$}=e,x=An(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:s,tag:C}=l.useContext(yt),f=D=>{d?.(!p),$?.(D)},P=s("tag",i),[I,y,E]=It(P),_=M(P,`${P}-checkable`,{[`${P}-checkable-checked`]:p},C?.className,r,y,E);return I(l.createElement("span",Object.assign({},x,{ref:t,style:Object.assign(Object.assign({},n),C?.style),className:_,onClick:f}),b,l.createElement("span",null,v)))}),Wn=e=>nn(e,(t,{textColor:i,lightBorderColor:n,lightColor:r,darkColor:p})=>({[`${e.componentCls}${e.componentCls}-${t}`]:{color:i,background:r,borderColor:n,"&-inverse":{color:e.colorTextLightSolid,background:p,borderColor:p},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}})),Vn=Le(["Tag","preset"],e=>{const t=We(e);return Wn(t)},Ve);function qn(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const we=(e,t,i)=>{const n=qn(i);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${i}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},Kn=Le(["Tag","status"],e=>{const t=We(e);return[we(t,"success","Success"),we(t,"processing","Info"),we(t,"error","Error"),we(t,"warning","Warning")]},Ve);var Fn=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[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])&&(i[n[r]]=e[n[r]]);return i};const Jn=l.forwardRef((e,t)=>{const{prefixCls:i,className:n,rootClassName:r,style:p,children:v,icon:b,color:d,onClose:$,bordered:x=!0,visible:s}=e,C=Fn(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:f,direction:P,tag:I}=l.useContext(yt),[y,E]=l.useState(!0),_=rn(C,["closeIcon","closable"]);l.useEffect(()=>{s!==void 0&&E(s)},[s]);const D=an(d),Y=on(d),m=D||Y,w=Object.assign(Object.assign({backgroundColor:d&&!m?d:void 0},I?.style),p),N=f("tag",i),[j,K,A]=It(N),J=M(N,I?.className,{[`${N}-${d}`]:m,[`${N}-has-color`]:d&&!m,[`${N}-hidden`]:!y,[`${N}-rtl`]:P==="rtl",[`${N}-borderless`]:!x},n,r,K,A),g=R=>{R.stopPropagation(),$?.(R),!R.defaultPrevented&&E(!1)},[,S]=fn(st(e),st(I),{closable:!1,closeIconRender:R=>{const oe=l.createElement("span",{className:`${N}-close-icon`,onClick:g},R);return cn(R,oe,W=>({onClick:le=>{var te;(te=W?.onClick)===null||te===void 0||te.call(W,le),g(le)},className:M(W?.className,`${N}-close-icon`)}))}}),L=typeof C.onClick=="function"||v&&v.type==="a",Z=b||null,F=Z?l.createElement(l.Fragment,null,Z,v&&l.createElement("span",null,v)):v,H=l.createElement("span",Object.assign({},_,{ref:t,className:J,style:w}),F,S,D&&l.createElement(Vn,{key:"preset",prefixCls:N}),Y&&l.createElement(Kn,{key:"status",prefixCls:N}));return j(L?l.createElement(ln,{component:"Tag"},H):H)}),Xn=Jn;Xn.CheckableTag=Ln;export{Yn as P,Xn as T,ct as m,st as p,fn as u};
14
- //# sourceMappingURL=index-6mtxs9yc.js.map
14
+ //# sourceMappingURL=index-CZlT-55J.js.map
@@ -0,0 +1,20 @@
1
+ import{a2 as ne,n as O,r as i,v as Be,x as Ve,aK as _a,A as v,D as be,ag as Fe,ac as Ea,bc as Oa,cc as Pa,cd as Ra,k as Ta,m as lt,a3 as fe,t as Kt,bW as Xt,bu as Ut,o as ze,i as W,am as Ma,_ as ve,h as re,I as Ia,a4 as le,q as Na,p as dt,ce as La,cf as ja,an as za,a9 as Nt,ap as at,b3 as Ba,a5 as Ha,l as Aa,a7 as Lt,aT as Da,a6 as Ga,au as jt,z as ut,aA as ft,bp as Yt,ab as st,E as Wa,aS as ka,J as Jt,br as Va,bb as vt,L as Fa}from"./index-BtXc5-H2.js";const qa=()=>ne.useReducer(e=>e+1,0),qe=e=>{const{prefixCls:t,className:a,style:n,size:r,shape:o}=e,l=O({[`${t}-lg`]:r==="large",[`${t}-sm`]:r==="small"}),s=O({[`${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:O(t,l,s,a),style:Object.assign(Object.assign({},c),n)})},Ka=new _a("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Ke=e=>({height:e,lineHeight:v(e)}),Re=e=>Object.assign({width:e},Ke(e)),Xa=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Ka,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),nt=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},Ke(e)),Ua=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))}},Ya=e=>{const{controlHeight:t,borderRadiusSM:a,skeletonInputCls:n,controlHeightLG:r,controlHeightSM:o,gradientFromColor:l,calc:s}=e;return{[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:l,borderRadius:a},nt(t,s)),[`${n}-lg`]:Object.assign({},nt(r,s)),[`${n}-sm`]:Object.assign({},nt(o,s))}},zt=e=>Object.assign({width:e},Ke(e)),Ja=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%"}}},rt=(e,t,a)=>{const{skeletonButtonCls:n}=e;return{[`${a}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${a}${n}-round`]:{borderRadius:t}}},it=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},Ke(e)),Qa=e=>{const{borderRadiusSM:t,skeletonButtonCls:a,controlHeight:n,controlHeightLG:r,controlHeightSM:o,gradientFromColor:l,calc:s}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:l,borderRadius:t,width:s(n).mul(2).equal(),minWidth:s(n).mul(2).equal()},it(n,s))},rt(e,n,a)),{[`${a}-lg`]:Object.assign({},it(r,s))}),rt(e,r,`${a}-lg`)),{[`${a}-sm`]:Object.assign({},it(o,s))}),rt(e,o,`${a}-sm`))},Za=e=>{const{componentCls:t,skeletonAvatarCls:a,skeletonTitleCls:n,skeletonParagraphCls:r,skeletonButtonCls:o,skeletonInputCls:l,skeletonImageCls:s,controlHeight:c,controlHeightLG:d,controlHeightSM:f,gradientFromColor:u,padding:g,marginSM:y,borderRadius:B,titleHeight:P,blockRadius:S,paragraphLiHeight:m,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:P,background:u,borderRadius:S,[`+ ${r}`]:{marginBlockStart:f}},[r]:{padding:0,"> li":{width:"100%",height:m,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"},Qa(e)),Ua(e)),Ya(e)),Ja(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[l]:{width:"100%"}},[`${t}${t}-active`]:{[`
2
+ ${n},
3
+ ${r} > li,
4
+ ${a},
5
+ ${o},
6
+ ${l},
7
+ ${s}
8
+ `]:Object.assign({},Xa(e))}}},en=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=Be("Skeleton",e=>{const{componentCls:t,calc:a}=e,n=Ve(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 Za(n)},en,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),tn=e=>{const{prefixCls:t,className:a,rootClassName:n,active:r,shape:o="circle",size:l="default"}=e,{getPrefixCls:s}=i.useContext(be),c=s("skeleton",t),[d,f,u]=Te(c),g=Fe(e,["prefixCls","className"]),y=O(c,`${c}-element`,{[`${c}-active`]:r},a,n,f,u);return d(i.createElement("div",{className:y},i.createElement(qe,Object.assign({prefixCls:`${c}-avatar`,shape:o,size:l},g))))},an=e=>{const{prefixCls:t,className:a,rootClassName:n,active:r,block:o=!1,size:l="default"}=e,{getPrefixCls:s}=i.useContext(be),c=s("skeleton",t),[d,f,u]=Te(c),g=Fe(e,["prefixCls"]),y=O(c,`${c}-element`,{[`${c}-active`]:r,[`${c}-block`]:o},a,n,f,u);return d(i.createElement("div",{className:y},i.createElement(qe,Object.assign({prefixCls:`${c}-button`,size:l},g))))},nn="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",rn=e=>{const{prefixCls:t,className:a,rootClassName:n,style:r,active:o}=e,{getPrefixCls:l}=i.useContext(be),s=l("skeleton",t),[c,d,f]=Te(s),u=O(s,`${s}-element`,{[`${s}-active`]:o},a,n,d,f);return c(i.createElement("div",{className:u},i.createElement("div",{className:O(`${s}-image`,a),style:r},i.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},i.createElement("title",null,"Image placeholder"),i.createElement("path",{d:nn,className:`${s}-image-path`})))))},on=e=>{const{prefixCls:t,className:a,rootClassName:n,active:r,block:o,size:l="default"}=e,{getPrefixCls:s}=i.useContext(be),c=s("skeleton",t),[d,f,u]=Te(c),g=Fe(e,["prefixCls"]),y=O(c,`${c}-element`,{[`${c}-active`]:r,[`${c}-block`]:o},a,n,f,u);return d(i.createElement("div",{className:y},i.createElement(qe,Object.assign({prefixCls:`${c}-input`,size:l},g))))},ln=e=>{const{prefixCls:t,className:a,rootClassName:n,style:r,active:o,children:l}=e,{getPrefixCls:s}=i.useContext(be),c=s("skeleton",t),[d,f,u]=Te(c),g=O(c,`${c}-element`,{[`${c}-active`]:o},f,a,n,u);return d(i.createElement("div",{className:g},i.createElement("div",{className:O(`${c}-image`,a),style:r},l)))},sn=(e,t)=>{const{width:a,rows:n=2}=t;if(Array.isArray(a))return a[e];if(n-1===e)return a},cn=e=>{const{prefixCls:t,className:a,style:n,rows:r=0}=e,o=Array.from({length:r}).map((l,s)=>i.createElement("li",{key:s,style:{width:sn(s,e)}}));return i.createElement("ul",{className:O(t,a),style:n},o)},dn=({prefixCls:e,className:t,width:a,style:n})=>i.createElement("h3",{className:O(e,t),style:Object.assign({width:a},n)});function ot(e){return e&&typeof e=="object"?e:{}}function un(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function fn(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function vn(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:l,avatar:s=!1,title:c=!0,paragraph:d=!0,active:f,round:u}=e,{getPrefixCls:g,direction:y,className:B,style:P}=Ea("skeleton"),S=g("skeleton",t),[m,p,T]=Te(S);if(a||!("loading"in e)){const N=!!s,I=!!c,j=!!d;let k;if(N){const R=Object.assign(Object.assign({prefixCls:`${S}-avatar`},un(I,j)),ot(s));k=i.createElement("div",{className:`${S}-header`},i.createElement(qe,Object.assign({},R)))}let M;if(I||j){let R;if(I){const x=Object.assign(Object.assign({prefixCls:`${S}-title`},fn(N,j)),ot(c));R=i.createElement(dn,Object.assign({},x))}let h;if(j){const x=Object.assign(Object.assign({prefixCls:`${S}-paragraph`},vn(N,I)),ot(d));h=i.createElement(cn,Object.assign({},x))}M=i.createElement("div",{className:`${S}-content`},R,h)}const w=O(S,{[`${S}-with-avatar`]:N,[`${S}-active`]:f,[`${S}-rtl`]:y==="rtl",[`${S}-round`]:u},B,n,r,p,T);return m(i.createElement("div",{className:w,style:Object.assign(Object.assign({},P),o)},k,M))}return l??null};Me.Button=an;Me.Avatar=tn;Me.Input=on;Me.Image=rn;Me.Node=ln;const gn=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},mn=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},bn=(e,t)=>{const{prefixCls:a,componentCls:n,gridColumns:r}=e,o={};for(let l=r;l>=0;l--)l===0?(o[`${n}${t}-${l}`]={display:"none"},o[`${n}-push-${l}`]={insetInlineStart:"auto"},o[`${n}-pull-${l}`]={insetInlineEnd:"auto"},o[`${n}${t}-push-${l}`]={insetInlineStart:"auto"},o[`${n}${t}-pull-${l}`]={insetInlineEnd:"auto"},o[`${n}${t}-offset-${l}`]={marginInlineStart:0},o[`${n}${t}-order-${l}`]={order:0}):(o[`${n}${t}-${l}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${l/r*100}%`,maxWidth:`${l/r*100}%`}],o[`${n}${t}-push-${l}`]={insetInlineStart:`${l/r*100}%`},o[`${n}${t}-pull-${l}`]={insetInlineEnd:`${l/r*100}%`},o[`${n}${t}-offset-${l}`]={marginInlineStart:`${l/r*100}%`},o[`${n}${t}-order-${l}`]={order:l});return o[`${n}${t}-flex`]={flex:`var(--${a}${t}-flex)`},o},ct=(e,t)=>bn(e,t),hn=(e,t,a)=>({[`@media (min-width: ${v(t)})`]:Object.assign({},ct(e,a))}),pn=()=>({}),$n=()=>({}),Lr=Be("Grid",gn,pn),yn=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin}),jr=Be("Grid",e=>{const t=Ve(e,{gridColumns:24}),a=yn(t);return delete a.xs,[mn(t),ct(t,""),ct(t,"-xs"),Object.keys(a).map(n=>hn(t,a[n],`-${n}`)).reduce((n,r)=>Object.assign(Object.assign({},n),r),{})]},$n),Qt=["xxl","xl","lg","md","sm","xs"],Sn=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)`}),Cn=e=>{const t=e,a=[].concat(Qt).reverse();return a.forEach((n,r)=>{const o=n.toUpperCase(),l=`screen${o}Min`,s=`screen${o}`;if(!(t[l]<=t[s]))throw new Error(`${l}<=${s} fails : !(${t[l]}<=${t[s]})`);if(r<a.length-1){const c=`screen${o}Max`;if(!(t[s]<=t[c]))throw new Error(`${s}<=${c} fails : !(${t[s]}<=${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},zr=(e,t)=>{if(t){for(const a of Qt)if(e[a]&&t?.[a]!==void 0)return t[a]}},xn=()=>{const[,e]=Oa(),t=Sn(Cn(e));return ne.useMemo(()=>{const a=new Map;let n=-1,r={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return r=o,a.forEach(l=>l(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,l])=>{const s=({matches:d})=>{this.dispatch(Object.assign(Object.assign({},r),{[o]:d}))},c=window.matchMedia(l);Ra(c,s),this.matchHandlers[l]={mql:c,listener:s},s(c)})},unregister(){Object.values(t).forEach(o=>{const l=this.matchHandlers[o];Pa(l?.mql,l?.listener)}),a.clear()}}},[t])};function Br(e=!0,t={}){const a=i.useRef(t),[,n]=qa(),r=xn();return Ta(()=>{const o=r.subscribe(l=>{a.current=l,e&&n()});return()=>r.unsubscribe(o)},[]),a.current}var wn=fe.ESC,_n=fe.TAB;function En(e){var t=e.visible,a=e.triggerRef,n=e.onVisibleChange,r=e.autoFocus,o=e.overlayRef,l=i.useRef(!1),s=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(),l.current=!0,!0):!1},d=function(u){switch(u.keyCode){case wn:s();break;case _n:{var g=!1;l.current||(g=c()),g?u.preventDefault():s();break}}};i.useEffect(function(){return t?(window.addEventListener("keydown",d),r&&lt(c,3),function(){window.removeEventListener("keydown",d),l.current=!1}):function(){l.current=!1}},[t])}var On=i.forwardRef(function(e,t){var a=e.overlay,n=e.arrow,r=e.prefixCls,o=i.useMemo(function(){var s;return typeof a=="function"?s=a():s=a,s},[a]),l=Kt(t,Xt(o));return ne.createElement(ne.Fragment,null,n&&ne.createElement("div",{className:"".concat(r,"-arrow")}),ne.cloneElement(o,{ref:Ut(o)?l:void 0}))}),Ee={adjustX:1,adjustY:1},Oe=[0,0],Pn={topLeft:{points:["bl","tl"],overflow:Ee,offset:[0,-4],targetOffset:Oe},top:{points:["bc","tc"],overflow:Ee,offset:[0,-4],targetOffset:Oe},topRight:{points:["br","tr"],overflow:Ee,offset:[0,-4],targetOffset:Oe},bottomLeft:{points:["tl","bl"],overflow:Ee,offset:[0,4],targetOffset:Oe},bottom:{points:["tc","bc"],overflow:Ee,offset:[0,4],targetOffset:Oe},bottomRight:{points:["tr","br"],overflow:Ee,offset:[0,4],targetOffset:Oe}},Rn=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Tn(e,t){var a,n=e.arrow,r=n===void 0?!1:n,o=e.prefixCls,l=o===void 0?"rc-dropdown":o,s=e.transitionName,c=e.animation,d=e.align,f=e.placement,u=f===void 0?"bottomLeft":f,g=e.placements,y=g===void 0?Pn:g,B=e.getPopupContainer,P=e.showAction,S=e.hideAction,m=e.overlayClassName,p=e.overlayStyle,T=e.visible,N=e.trigger,I=N===void 0?["hover"]:N,j=e.autoFocus,k=e.overlay,M=e.children,w=e.onVisibleChange,R=ze(e,Rn),h=ne.useState(),x=W(h,2),$=x[0],C=x[1],J="visible"in e?T:$,A=ne.useRef(null),V=ne.useRef(null),te=ne.useRef(null);ne.useImperativeHandle(t,function(){return A.current});var z=function(q){C(q),w?.(q)};En({visible:J,triggerRef:te,onVisibleChange:z,autoFocus:j,overlayRef:V});var _=function(q){var Q=e.onOverlayClick;C(!1),Q&&Q(q)},ae=function(){return ne.createElement(On,{ref:V,overlay:k,prefixCls:l,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(l,"-open")},Z=ne.cloneElement(M,{className:O((a=M.props)===null||a===void 0?void 0:a.className,J&&D()),ref:Ut(M)?Kt(te,Xt(M)):void 0}),X=S;return!X&&I.indexOf("contextMenu")!==-1&&(X=["click"]),ne.createElement(Ma,ve({builtinPlacements:y},R,{prefixCls:l,ref:A,popupClassName:O(m,re({},"".concat(l,"-show-arrow"),r)),popupStyle:p,action:I,showAction:P,hideAction:X,popupPlacement:u,popupAlign:d,popupTransitionName:s,popupAnimation:c,popupVisible:J,stretch:E()?"minWidth":"",popup:oe(),onPopupVisibleChange:z,onPopupClick:_,getPopupContainer:B}),Z)}const Mn=ne.forwardRef(Tn);var In={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"},Nn=function(t,a){return i.createElement(Ia,ve({},t,{ref:a,icon:In}))},Ln=i.forwardRef(Nn);const Xe=i.createContext(null);var jn=function(t){var a=t.activeTabOffset,n=t.horizontal,r=t.rtl,o=t.indicator,l=o===void 0?{}:o,s=l.size,c=l.align,d=c===void 0?"center":c,f=i.useState(),u=W(f,2),g=u[0],y=u[1],B=i.useRef(),P=ne.useCallback(function(m){return typeof s=="function"?s(m):typeof s=="number"?s:m},[s]);function S(){lt.cancel(B.current)}return i.useEffect(function(){var m={};if(a)if(n){m.width=P(a.width);var p=r?"right":"left";d==="start"&&(m[p]=a[p]),d==="center"&&(m[p]=a[p]+a.width/2,m.transform=r?"translateX(50%)":"translateX(-50%)"),d==="end"&&(m[p]=a[p]+a.width,m.transform="translateX(-100%)")}else m.height=P(a.height),d==="start"&&(m.top=a.top),d==="center"&&(m.top=a.top+a.height/2,m.transform="translateY(-50%)"),d==="end"&&(m.top=a.top+a.height,m.transform="translateY(-100%)");return S(),B.current=lt(function(){var T=g&&m&&Object.keys(m).every(function(N){var I=m[N],j=g[N];return typeof I=="number"&&typeof j=="number"?Math.round(I)===Math.round(j):I===j});T||y(m)}),S},[JSON.stringify(a),n,r,d,P]),{style:g}},Bt={width:0,height:0,left:0,top:0};function zn(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)||Bt,l=o.left+o.width,s=0;s<e.length;s+=1){var c=e[s].key,d=t.get(c);if(!d){var f;d=t.get((f=e[s-1])===null||f===void 0?void 0:f.key)||Bt}var u=r.get(c)||le({},d);u.right=l-u.left-u.width,r.set(c,u)}return r},[e.map(function(n){return n.key}).join("_"),t,a])}function Ht(e,t){var a=i.useRef(e),n=i.useState({}),r=W(n,2),o=r[1];function l(s){var c=typeof s=="function"?s(a.current):s;c!==a.current&&t(c,a.current),a.current=c,o({})}return[a.current,l]}var Bn=.1,At=.01,ke=20,Dt=Math.pow(.995,ke);function Hn(e,t){var a=i.useState(),n=W(a,2),r=n[0],o=n[1],l=i.useState(0),s=W(l,2),c=s[0],d=s[1],f=i.useState(0),u=W(f,2),g=u[0],y=u[1],B=i.useState(),P=W(B,2),S=P[0],m=P[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),m({x:$,y:C})}}function I(){if(r&&(o(null),m(null),S)){var w=S.x/g,R=S.y/g,h=Math.abs(w),x=Math.abs(R);if(Math.max(h,x)<Bn)return;var $=w,C=R;p.current=window.setInterval(function(){if(Math.abs($)<At&&Math.abs(C)<At){window.clearInterval(p.current);return}$*=Dt,C*=Dt,t($*ke,C*ke)},ke)}}var j=i.useRef();function k(w){var R=w.deltaX,h=w.deltaY,x=0,$=Math.abs(R),C=Math.abs(h);$===C?x=j.current==="x"?R:h:$>C?(x=R,j.current="x"):(x=h,j.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 Zt(e){var t=i.useState(0),a=W(t,2),n=a[0],r=a[1],o=i.useRef(0),l=i.useRef();return l.current=e,Na(function(){var s;(s=l.current)===null||s===void 0||s.call(l)},[n]),function(){o.current===n&&(o.current+=1,r(o.current))}}function An(e){var t=i.useRef([]),a=i.useState({}),n=W(a,2),r=n[1],o=i.useRef(typeof e=="function"?e():e),l=Zt(function(){var c=o.current;t.current.forEach(function(d){c=d(c)}),t.current=[],o.current=c,r({})});function s(c){t.current.push(c),l()}return[o.current,s]}var Gt={width:0,height:0,left:0,top:0,right:0};function Dn(e,t,a,n,r,o,l){var s=l.tabs,c=l.tabPosition,d=l.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(!s.length)return[0,0];for(var y=s.length,B=y,P=0;P<y;P+=1){var S=e.get(s[P].key)||Gt;if(Math.floor(S[u]+S[f])>Math.floor(g+t)){B=P-1;break}}for(var m=0,p=y-1;p>=0;p-=1){var T=e.get(s[p].key)||Gt;if(T[u]<g){m=p+1;break}}return m>B?[0,-1]:[m,B]},[e,t,n,r,o,g,c,s.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 Gn="TABS_DQ";function ea(e){return String(e).replace(/"/g,Gn)}function gt(e,t,a,n){return!(!a||n||e===!1||e===void 0&&(t===!1||t===null))}var ta=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(s){n.onEdit("add",{event:s})}},n.addIcon||"+")}),kt=i.forwardRef(function(e,t){var a=e.position,n=e.prefixCls,r=e.extra;if(!r)return null;var o,l={};return dt(r)==="object"&&!i.isValidElement(r)?l=r:l.right=r,a==="right"&&(o=l.right),a==="left"&&(o=l.left),o?i.createElement("div",{className:"".concat(n,"-extra-content"),ref:t},o):null}),Wn=i.forwardRef(function(e,t){var a=e.prefixCls,n=e.id,r=e.tabs,o=e.locale,l=e.mobile,s=e.more,c=s===void 0?{}:s,d=e.style,f=e.className,u=e.editable,g=e.tabBarGutter,y=e.rtl,B=e.removeAriaLabel,P=e.onTabClick,S=e.getPopupContainer,m=e.popupClassName,p=i.useState(!1),T=W(p,2),N=T[0],I=T[1],j=i.useState(null),k=W(j,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 A(E,D){E.preventDefault(),E.stopPropagation(),u.onEdit("remove",{key:D,event:E})}var V=i.createElement(La,{onClick:function(D){var Z=D.key,X=D.domEvent;P(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=gt(D,X,u,Z);return i.createElement(ja,{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(),A(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 z(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&&P(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=O(re({},"".concat($,"-rtl"),y)),oe=l?null:i.createElement(Mn,ve({prefixCls:$,overlay:V,visible:r.length?N:!1,onVisibleChange:I,overlayClassName:O(ae,m),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:z},h));return i.createElement("div",{className:O("".concat(a,"-nav-operations"),f),style:d,ref:t},oe,i.createElement(ta,{prefixCls:a,locale:o,editable:u}))});const kn=i.memo(Wn,function(e,t){return t.tabMoving});var Vn=function(t){var a=t.prefixCls,n=t.id,r=t.active,o=t.focus,l=t.tab,s=l.key,c=l.label,d=l.disabled,f=l.closeIcon,u=l.icon,g=t.closable,y=t.renderWrapper,B=t.removeAriaLabel,P=t.editable,S=t.onClick,m=t.onFocus,p=t.onBlur,T=t.onKeyDown,N=t.onMouseDown,I=t.onMouseUp,j=t.style,k=t.tabCount,M=t.currentPosition,w="".concat(a,"-tab"),R=gt(g,f,P,d);function h(A){d||S(A)}function x(A){A.preventDefault(),A.stopPropagation(),P.onEdit("remove",{key:s,event:A})}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:s,"data-node-key":ea(s),className:O(w,re(re(re(re({},"".concat(w,"-with-remove"),R),"".concat(w,"-active"),r),"".concat(w,"-disabled"),d),"".concat(w,"-focus"),o)),style:j,onClick:h},i.createElement("div",{ref:C,role:"tab","aria-selected":r,id:n&&"".concat(n,"-tab-").concat(s),className:"".concat(w,"-btn"),"aria-controls":n&&"".concat(n,"-panel-").concat(s),"aria-disabled":d,tabIndex:d?null:r?0:-1,onClick:function(V){V.stopPropagation(),h(V)},onKeyDown:T,onMouseDown:N,onMouseUp:I,onFocus:m,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||P.removeIcon||"×"));return y?y(J):J},Fn=function(t,a){var n=t.offsetWidth,r=t.offsetHeight,o=t.offsetTop,l=t.offsetLeft,s=t.getBoundingClientRect(),c=s.width,d=s.height,f=s.left,u=s.top;return Math.abs(c-n)<1?[c,d,f-a.left,u-a.top]:[n,r,l,o]},Pe=function(t){var a=t.current||{},n=a.offsetWidth,r=n===void 0?0:n,o=a.offsetHeight,l=o===void 0?0:o;if(t.current){var s=t.current.getBoundingClientRect(),c=s.width,d=s.height;if(Math.abs(c-r)<1)return[c,d]}return[r,l]},We=function(t,a){return t[a?0:1]},Vt=i.forwardRef(function(e,t){var a=e.className,n=e.style,r=e.id,o=e.animated,l=e.activeKey,s=e.rtl,c=e.extra,d=e.editable,f=e.locale,u=e.tabPosition,g=e.tabBarGutter,y=e.children,B=e.onTabClick,P=e.onTabScroll,S=e.indicator,m=i.useContext(Xe),p=m.prefixCls,T=m.tabs,N=i.useRef(null),I=i.useRef(null),j=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=Ht(0,function(H,b){h&&P&&P({direction:H>b?"left":"right"})}),$=W(x,2),C=$[0],J=$[1],A=Ht(0,function(H,b){!h&&P&&P({direction:H>b?"top":"bottom"})}),V=W(A,2),te=V[0],z=V[1],_=i.useState([0,0]),ae=W(_,2),oe=ae[0],E=ae[1],D=i.useState([0,0]),Z=W(D,2),X=Z[0],F=Z[1],q=i.useState([0,0]),Q=W(q,2),he=Q[0],se=Q[1],pe=i.useState([0,0]),$e=W(pe,2),G=$e[0],ce=$e[1],de=An(new Map),Ce=W(de,2),Ie=Ce[0],Ue=Ce[1],ee=zn(T,Ie,X[0]),U=We(oe,h),ge=We(X,h),Ne=We(he,h),mt=We(G,h),bt=Math.floor(U)<Math.floor(ge+Ne),ue=bt?U-mt:U-Ne,oa="".concat(p,"-nav-operations-hidden"),ye=0,Se=0;h&&s?(ye=0,Se=Math.max(0,ge-ue)):(ye=Math.min(0,ue-ge),Se=0);function Ye(H){return H<ye?ye:H>Se?Se:H}var Je=i.useRef(null),la=i.useState(),ht=W(la,2),He=ht[0],pt=ht[1];function Qe(){pt(Date.now())}function Ze(){Je.current&&clearTimeout(Je.current)}Hn(k,function(H,b){function L(K,Y){K(function(ie){var _e=Ye(ie+Y);return _e})}return bt?(h?L(J,H):L(z,b),Ze(),Qe(),!0):!1}),i.useEffect(function(){return Ze(),He&&(Je.current=setTimeout(function(){pt(0)},100)),Ze},[He]);var sa=Dn(ee,ue,h?C:te,ge,Ne,mt,le(le({},e),{},{tabs:T})),$t=W(sa,2),ca=$t[0],da=$t[1],yt=za(function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l,b=ee.get(H)||{width:0,height:0,left:0,right:0,top:0};if(h){var L=C;s?b.right<C?L=b.right:b.right+b.width>C+ue&&(L=b.right+b.width-ue):b.left<-C?L=-b.left:b.left+b.width>-C+ue&&(L=-(b.left+b.width-ue)),z(0),J(Ye(L))}else{var K=te;b.top<-te?K=-b.top:b.top+b.height>-te+ue&&(K=-(b.top+b.height-ue)),J(0),z(Ye(K))}}),ua=i.useState(),St=W(ua,2),xe=St[0],Le=St[1],fa=i.useState(!1),Ct=W(fa,2),va=Ct[0],xt=Ct[1],me=T.filter(function(H){return!H.disabled}).map(function(H){return H.key}),we=function(b){var L=me.indexOf(xe||l),K=me.length,Y=(L+b+K)%K,ie=me[Y];Le(ie)},wt=function(b,L){var K=me.indexOf(b),Y=T.find(function(_e){return _e.key===b}),ie=gt(Y?.closable,Y?.closeIcon,d,Y?.disabled);ie&&(L.preventDefault(),L.stopPropagation(),d.onEdit("remove",{key:b,event:L}),K===me.length-1?we(-1):we(1))},ga=function(b,L){xt(!0),L.button===1&&wt(b,L)},ma=function(b){var L=b.code,K=s&&h,Y=me[0],ie=me[me.length-1];switch(L){case"ArrowLeft":{h&&we(K?1:-1);break}case"ArrowRight":{h&&we(K?-1:1);break}case"ArrowUp":{b.preventDefault(),h||we(-1);break}case"ArrowDown":{b.preventDefault(),h||we(1);break}case"Home":{b.preventDefault(),Le(Y);break}case"End":{b.preventDefault(),Le(ie);break}case"Enter":case"Space":{b.preventDefault(),B(xe??l,b);break}case"Backspace":case"Delete":{wt(xe,b);break}}},Ae={};h?Ae[s?"marginRight":"marginLeft"]=g:Ae.marginTop=g;var _t=T.map(function(H,b){var L=H.key;return i.createElement(Vn,{id:r,prefixCls:p,key:L,tab:H,style:b===0?void 0:Ae,closable:H.closable,editable:d,active:L===l,focus:L===xe,renderWrapper:y,removeAriaLabel:f?.removeAriaLabel,tabCount:me.length,currentPosition:b+1,onClick:function(Y){B(L,Y)},onKeyDown:ma,onFocus:function(){va||Le(L),yt(L),Qe(),k.current&&(s||(k.current.scrollLeft=0),k.current.scrollTop=0)},onBlur:function(){Le(void 0)},onMouseDown:function(Y){return ga(L,Y)},onMouseUp:function(){xt(!1)}})}),Et=function(){return Ue(function(){var b,L=new Map,K=(b=M.current)===null||b===void 0?void 0:b.getBoundingClientRect();return T.forEach(function(Y){var ie,_e=Y.key,It=(ie=M.current)===null||ie===void 0?void 0:ie.querySelector('[data-node-key="'.concat(ea(_e),'"]'));if(It){var ya=Fn(It,K),Ge=W(ya,4),Sa=Ge[0],Ca=Ge[1],xa=Ge[2],wa=Ge[3];L.set(_e,{width:Sa,height:Ca,left:xa,top:wa})}}),L})};i.useEffect(function(){Et()},[T.map(function(H){return H.key}).join("_")]);var De=Zt(function(){var H=Pe(N),b=Pe(I),L=Pe(j);E([H[0]-b[0]-L[0],H[1]-b[1]-L[1]]);var K=Pe(R);se(K);var Y=Pe(w);ce(Y);var ie=Pe(M);F([ie[0]-K[0],ie[1]-K[1]]),Et()}),ba=T.slice(0,ca),ha=T.slice(da+1),Ot=[].concat(Nt(ba),Nt(ha)),Pt=ee.get(l),pa=jn({activeTabOffset:Pt,horizontal:h,indicator:S,rtl:s}),$a=pa.style;i.useEffect(function(){yt()},[l,ye,Se,Wt(Pt),Wt(ee),h]),i.useEffect(function(){De()},[s]);var Rt=!!Ot.length,je="".concat(p,"-nav-wrap"),et,tt,Tt,Mt;return h?s?(tt=C>0,et=C!==Se):(et=C<0,tt=C!==ye):(Tt=te<0,Mt=te!==ye),i.createElement(at,{onResize:De},i.createElement("div",{ref:Ba(t,N),role:"tablist","aria-orientation":h?"horizontal":"vertical",className:O("".concat(p,"-nav"),a),style:n,onKeyDown:function(){Qe()}},i.createElement(kt,{ref:I,position:"left",extra:c,prefixCls:p}),i.createElement(at,{onResize:De},i.createElement("div",{className:O(je,re(re(re(re({},"".concat(je,"-ping-left"),et),"".concat(je,"-ping-right"),tt),"".concat(je,"-ping-top"),Tt),"".concat(je,"-ping-bottom"),Mt)),ref:k},i.createElement(at,{onResize:De},i.createElement("div",{ref:M,className:"".concat(p,"-nav-list"),style:{transform:"translate(".concat(C,"px, ").concat(te,"px)"),transition:He?"none":void 0}},_t,i.createElement(ta,{ref:R,prefixCls:p,locale:f,editable:d,style:le(le({},_t.length===0?void 0:Ae),{},{visibility:Rt?"hidden":null})}),i.createElement("div",{className:O("".concat(p,"-ink-bar"),re({},"".concat(p,"-ink-bar-animated"),o.inkBar)),style:$a}))))),i.createElement(kn,ve({},e,{removeAriaLabel:f?.removeAriaLabel,ref:w,prefixCls:p,tabs:Ot,className:!Rt&&oa,tabMoving:!!He})),i.createElement(kt,{ref:j,position:"right",extra:c,prefixCls:p})))}),aa=i.forwardRef(function(e,t){var a=e.prefixCls,n=e.className,r=e.style,o=e.id,l=e.active,s=e.tabKey,c=e.children;return i.createElement("div",{id:o&&"".concat(o,"-panel-").concat(s),role:"tabpanel",tabIndex:l?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(s),"aria-hidden":!l,style:r,className:O(a,l&&"".concat(a,"-active"),n),ref:t},c)}),qn=["renderTabBar"],Kn=["label","key"],Xn=function(t){var a=t.renderTabBar,n=ze(t,qn),r=i.useContext(Xe),o=r.tabs;if(a){var l=le(le({},n),{},{panes:o.map(function(s){var c=s.label,d=s.key,f=ze(s,Kn);return i.createElement(aa,ve({tab:c,key:d,tabKey:d},f))})});return a(l,Vt)}return i.createElement(Vt,n)},Un=["key","forceRender","style","className","destroyInactiveTabPane"],Yn=function(t){var a=t.id,n=t.activeKey,r=t.animated,o=t.tabPosition,l=t.destroyInactiveTabPane,s=i.useContext(Xe),c=s.prefixCls,d=s.tabs,f=r.tabPane,u="".concat(c,"-tabpane");return i.createElement("div",{className:O("".concat(c,"-content-holder"))},i.createElement("div",{className:O("".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,P=g.style,S=g.className,m=g.destroyInactiveTabPane,p=ze(g,Un),T=y===n;return i.createElement(Ha,ve({key:y,visible:T,forceRender:B,removeOnLeave:!!(l||m),leavedClassName:"".concat(u,"-hidden")},r.tabPaneMotion),function(N,I){var j=N.style,k=N.className;return i.createElement(aa,ve({},p,{prefixCls:u,id:a,tabKey:y,animated:f,active:T,style:le(le({},P),j),className:O(S,k),ref:I}))})})))};function Jn(){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},dt(e)==="object"?e:{}),t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var Qn=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],Ft=0,Zn=i.forwardRef(function(e,t){var a=e.id,n=e.prefixCls,r=n===void 0?"rc-tabs":n,o=e.className,l=e.items,s=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,P=e.tabBarStyle,S=e.tabBarExtraContent,m=e.locale,p=e.more,T=e.destroyInactiveTabPane,N=e.renderTabBar,I=e.onChange,j=e.onTabClick,k=e.onTabScroll,M=e.getPopupContainer,w=e.popupClassName,R=e.indicator,h=ze(e,Qn),x=i.useMemo(function(){return(l||[]).filter(function(G){return G&&dt(G)==="object"&&"key"in G})},[l]),$=s==="rtl",C=Jn(u),J=i.useState(!1),A=W(J,2),V=A[0],te=A[1];i.useEffect(function(){te(Aa())},[]);var z=Lt(function(){var G;return(G=x[0])===null||G===void 0?void 0:G.key},{value:c,defaultValue:d}),_=W(z,2),ae=_[0],oe=_[1],E=i.useState(function(){return x.findIndex(function(G){return G.key===ae})}),D=W(E,2),Z=D[0],X=D[1];i.useEffect(function(){var G=x.findIndex(function(de){return de.key===ae});if(G===-1){var ce;G=Math.max(0,Math.min(Z,x.length-1)),oe((ce=x[G])===null||ce===void 0?void 0:ce.key)}X(G)},[x.map(function(G){return G.key}).join("_"),ae,Z]);var F=Lt(null,{value:a}),q=W(F,2),Q=q[0],he=q[1];i.useEffect(function(){a||(he("rc-tabs-".concat(Ft)),Ft+=1)},[]);function se(G,ce){j?.(G,ce);var de=G!==ae;oe(G),de&&I?.(G)}var pe={id:Q,activeKey:ae,animated:C,tabPosition:y,rtl:$,mobile:V},$e=le(le({},pe),{},{editable:f,locale:m,more:p,tabBarGutter:B,onTabClick:se,onTabScroll:k,extra:S,style:P,panes:null,getPopupContainer:M,popupClassName:w,indicator:R});return i.createElement(Xe.Provider,{value:{tabs:x,prefixCls:r}},i.createElement("div",ve({ref:t,id:a,className:O(r,"".concat(r,"-").concat(y),re(re(re({},"".concat(r,"-mobile"),V),"".concat(r,"-editable"),f),"".concat(r,"-rtl"),$),o)},h),i.createElement(Xn,ve({},$e,{renderTabBar:N})),i.createElement(Yn,ve({destroyInactiveTabPane:T},pe,{animated:C}))))});const er={motionAppear:!1,motionEnter:!0,motionLeave:!0};function tr(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({},er),{motionName:Da(e,"switch")})),a}var ar=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 nr(e){return e.filter(t=>t)}function rr(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=Ga(t).map(n=>{if(i.isValidElement(n)){const{key:r,props:o}=n,l=o||{},{tab:s}=l,c=ar(l,["tab"]);return Object.assign(Object.assign({key:String(r)},c),{label:s})}return null});return nr(a)}const ir=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}`}}}}},[jt(e,"slide-up"),jt(e,"slide-down")]]},or=e=>{const{componentCls:t,tabsCardPadding:a,cardBg:n,cardGutter:r,colorBorderSecondary:o,itemSelectedColor:l}=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:l,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Yt(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}}}}}}},lr=e=>{const{componentCls:t,itemHoverColor:a,dropdownEdgeChildVerticalPadding:n}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},ut(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({},ft),{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"}}})}})}},sr=e=>{const{componentCls:t,margin:a,colorBorderSecondary:n,horizontalMargin:r,verticalItemPadding:o,verticalItemMargin:l,calc:s}=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:s(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:l},[`${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(s(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:s(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}}}}}},cr=e=>{const{componentCls:t,cardPaddingSM:a,cardPaddingLG:n,cardHeightSM:r,cardHeightLG:o,horizontalItemPaddingSM:l,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:l,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,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}}}}}},dr=e=>{const{componentCls:t,itemActiveColor:a,itemHoverColor:n,iconCls:r,tabsHorizontalItemMargin:o,horizontalItemPadding:l,itemSelectedColor:s,itemColor:c}=e,d=`${t}-tab`;return{[d]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:l,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}},st(e)),"&:hover":{color:n},[`&${d}-active ${d}-btn`]:{color:s,textShadow:e.tabsActiveTextShadow},[`&${d}-focus ${d}-btn:focus-visible`]:Yt(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}}}},ur=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"}}}}},fr=e=>{const{componentCls:t,tabsCardPadding:a,cardHeight:n,cardGutter:r,itemHoverColor:o,itemActiveColor:l,colorBorderSecondary:s}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},ut(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} ${s}`,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:l}},st(e,-3))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),dr(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},st(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"}}}}}},vr=e=>{const{cardHeight:t,cardHeightSM:a,cardHeightLG:n,controlHeight:r,controlHeightLG:o}=e,l=t||o,s=a||r,c=n||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:l,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(l-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-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}},gr=Be("Tabs",e=>{const t=Ve(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[cr(t),ur(t),sr(t),lr(t),or(t),fr(t),ir(t)]},vr),mr=()=>null;var br=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 hr=i.forwardRef((e,t)=>{var a,n,r,o,l,s,c,d,f,u,g;const{type:y,className:B,rootClassName:P,size:S,onEdit:m,hideAdd:p,centered:T,addIcon:N,removeIcon:I,moreIcon:j,more:k,popupClassName:M,children:w,items:R,animated:h,style:x,indicatorSize:$,indicator:C,destroyInactiveTabPane:J,destroyOnHidden:A}=e,V=br(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:z,tabs:_,getPrefixCls:ae,getPopupContainer:oe}=i.useContext(be),E=ae("tabs",te),D=Wa(E),[Z,X,F]=gr(E,D),q=i.useRef(null);i.useImperativeHandle(t,()=>({nativeElement:q.current}));let Q;y==="editable-card"&&(Q={onEdit:(de,{key:Ce,event:Ie})=>{m?.(de==="add"?Ie:Ce,de)},removeIcon:(a=I??_?.removeIcon)!==null&&a!==void 0?a:i.createElement(ka,null),addIcon:(N??_?.addIcon)||i.createElement(Ln,null),showAdd:p!==!0});const he=ae(),se=Jt(S),pe=rr(R,w),$e=tr(E,h),G=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=(l=(o=C?.size)!==null&&o!==void 0?o:$)!==null&&l!==void 0?l:(s=_?.indicator)===null||s===void 0?void 0:s.size)!==null&&c!==void 0?c:_?.indicatorSize};return Z(i.createElement(Zn,Object.assign({ref:q,direction:z,getPopupContainer:oe},V,{items:pe,className:O({[`${E}-${se}`]:se,[`${E}-card`]:["card","editable-card"].includes(y),[`${E}-editable-card`]:y==="editable-card",[`${E}-centered`]:T},_?.className,B,P,X,F,D),popupClassName:O(M,X,F,D),style:G,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:j)!==null&&g!==void 0?g:i.createElement(Va,null),transitionName:`${he}-slide-up`},k),prefixCls:E,animated:$e,indicator:ce,destroyInactiveTabPane:A??J})))}),na=hr;na.TabPane=mr;var pr=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 ra=e=>{var{prefixCls:t,className:a,hoverable:n=!0}=e,r=pr(e,["prefixCls","className","hoverable"]);const{getPrefixCls:o}=i.useContext(be),l=o("card",t),s=O(`${l}-grid`,a,{[`${l}-grid-hoverable`]:n});return i.createElement("div",Object.assign({},r,{className:s}))},$r=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`},vt()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},ft),{[`
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}`}}})},yr=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}}},Sr=e=>{const{componentCls:t,iconCls:a,actionsLiMargin:n,cardActionsIconSize:r,colorBorderSecondary:o,actionsBg:l}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:l,borderTop:`${v(e.lineWidth)} ${e.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)}`},vt()),{"& > 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}`}}})},Cr=e=>Object.assign(Object.assign({margin:`${v(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},vt()),{"&-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},ft),"&-description":{color:e.colorTextDescription}}),xr=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)}`}}},wr=e=>{const{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}},_r=e=>{const{componentCls:t,cardShadow:a,cardHeadPadding:n,colorBorderSecondary:r,boxShadowTertiary:o,bodyPadding:l,extraColor:s}=e;return{[t]:Object.assign(Object.assign({},ut(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:o},[`${t}-head`]:$r(e),[`${t}-extra`]:{marginInlineStart:"auto",color:s,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:l,borderRadius:`0 0 ${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)}`},[`${t}-grid`]:yr(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${v(e.borderRadiusLG)} ${v(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:Sr(e),[`${t}-meta`]:Cr(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`]:xr(e),[`${t}-loading`]:wr(e),[`${t}-rtl`]:{direction:"rtl"}}},Er=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"}}}}},Or=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}},Pr=Be("Card",e=>{const t=Ve(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[_r(t),Er(t)]},Or);var qt=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 Rr=e=>{const{actionClasses:t,actions:a=[],actionStyle:n}=e;return i.createElement("ul",{className:t,style:n},a.map((r,o)=>{const l=`action-${o}`;return i.createElement("li",{style:{width:`${100/a.length}%`},key:l},i.createElement("span",null,r))}))},Tr=i.forwardRef((e,t)=>{const{prefixCls:a,className:n,rootClassName:r,style:o,extra:l,headStyle:s={},bodyStyle:c={},title:d,loading:f,bordered:u,variant:g,size:y,type:B,cover:P,actions:S,tabList:m,children:p,activeTabKey:T,defaultActiveTabKey:N,tabBarExtraContent:I,hoverable:j,tabProps:k={},classNames:M,styles:w}=e,R=qt(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(be),[C]=Fa("card",g,u),J=ee=>{var U;(U=e.onTabChange)===null||U===void 0||U.call(e,ee)},A=ee=>{var U;return O((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===ra&&(ee=!0)}),ee},[p]),z=h("card",a),[_,ae,oe]=Pr(z),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=Jt(y),q=!F||F==="default"?"large":F,Q=m?i.createElement(na,Object.assign({size:q},Z,{className:`${z}-head-tabs`,onChange:J,items:m.map(ee=>{var{tab:U}=ee,ge=qt(ee,["tab"]);return Object.assign({label:U},ge)})})):null;if(d||l||Q){const ee=O(`${z}-head`,A("header")),U=O(`${z}-head-title`,A("title")),ge=O(`${z}-extra`,A("extra")),Ne=Object.assign(Object.assign({},s),V("header"));X=i.createElement("div",{className:ee,style:Ne},i.createElement("div",{className:`${z}-head-wrapper`},d&&i.createElement("div",{className:U,style:V("title")},d),l&&i.createElement("div",{className:ge,style:V("extra")},l)),Q)}const he=O(`${z}-cover`,A("cover")),se=P?i.createElement("div",{className:he,style:V("cover")},P):null,pe=O(`${z}-body`,A("body")),$e=Object.assign(Object.assign({},c),V("body")),G=i.createElement("div",{className:pe,style:$e},f?E:p),ce=O(`${z}-actions`,A("actions")),de=S?.length?i.createElement(Rr,{actionClasses:ce,actionStyle:V("actions"),actions:S}):null,Ce=Fe(R,["onTabChange"]),Ie=O(z,$?.className,{[`${z}-loading`]:f,[`${z}-bordered`]:C!=="borderless",[`${z}-hoverable`]:j,[`${z}-contain-grid`]:te,[`${z}-contain-tabs`]:m?.length,[`${z}-${F}`]:F,[`${z}-type-${B}`]:!!B,[`${z}-rtl`]:x==="rtl"},n,r,ae,oe),Ue=Object.assign(Object.assign({},$?.style),o);return _(i.createElement("div",Object.assign({ref:t},Ce,{className:Ie,style:Ue}),X,se,G,de))});var Mr=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 Ir=e=>{const{prefixCls:t,className:a,avatar:n,title:r,description:o}=e,l=Mr(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:s}=i.useContext(be),c=s("card",t),d=O(`${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({},l,{className:d}),f,y)},ia=Tr;ia.Grid=ra;ia.Meta=Ir;export{ia as C,Mn as D,Ln as R,Me as S,na as T,qa as a,jr as b,Lr as c,yn as g,zr as m,Qt as r,Br as u};
20
+ //# sourceMappingURL=index-Cfg0ICF_.js.map
@@ -1,2 +1,2 @@
1
- import{r,v as F,x as H,z as I,ac as _,n as L,a8 as B,an as U,m as O,ae as V}from"./index-HJggy9SZ.js";import{S as X}from"./index-B4zZ11c-.js";const A=t=>{const{value:n,formatter:o,precision:e,decimalSeparator:a,groupSeparator:u="",prefixCls:i}=t;let c;if(typeof o=="function")c=o(n);else{const s=String(n),f=s.match(/^(-?)(\d*)(\.(\d+))?$/);if(!f||s==="-")c=s;else{const d=f[1];let p=f[2]||"0",m=f[4]||"";p=p.replace(/\B(?=(\d{3})+(?!\d))/g,u),typeof e=="number"&&(m=m.padEnd(e,"0").slice(0,e>0?e:0)),m&&(m=`${a}${m}`),c=[r.createElement("span",{key:"int",className:`${i}-content-value-int`},d,p),m&&r.createElement("span",{key:"decimal",className:`${i}-content-value-decimal`},m)]}}return r.createElement("span",{className:`${i}-content-value`},c)},Y=t=>{const{componentCls:n,marginXXS:o,padding:e,colorTextDescription:a,titleFontSize:u,colorTextHeading:i,contentFontSize:c,fontFamily:s}=t;return{[n]:Object.assign(Object.assign({},I(t)),{[`${n}-title`]:{marginBottom:o,color:a,fontSize:u},[`${n}-skeleton`]:{paddingTop:e},[`${n}-content`]:{color:i,fontSize:c,fontFamily:s,[`${n}-content-value`]:{display:"inline-block",direction:"ltr"},[`${n}-content-prefix, ${n}-content-suffix`]:{display:"inline-block"},[`${n}-content-prefix`]:{marginInlineEnd:o},[`${n}-content-suffix`]:{marginInlineStart:o}}})}},q=t=>{const{fontSizeHeading3:n,fontSize:o}=t;return{titleFontSize:o,contentFontSize:n}},G=F("Statistic",t=>{const n=H(t,{});return Y(n)},q);var J=function(t,n){var o={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(o[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,e=Object.getOwnPropertySymbols(t);a<e.length;a++)n.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(t,e[a])&&(o[e[a]]=t[e[a]]);return o};const y=r.forwardRef((t,n)=>{const{prefixCls:o,className:e,rootClassName:a,style:u,valueStyle:i,value:c=0,title:s,valueRender:f,prefix:d,suffix:p,loading:m=!1,formatter:l,precision:g,decimalSeparator:S=".",groupSeparator:w=",",onMouseEnter:$,onMouseLeave:C}=t,h=J(t,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:N,direction:j,className:T,style:k}=_("statistic"),v=N("statistic",o),[z,R,P]=G(v),x=r.createElement(A,{decimalSeparator:S,groupSeparator:w,prefixCls:v,formatter:l,precision:g,value:c}),D=L(v,{[`${v}-rtl`]:j==="rtl"},T,e,a,R,P),b=r.useRef(null);r.useImperativeHandle(n,()=>({nativeElement:b.current}));const M=B(h,{aria:!0,data:!0});return z(r.createElement("div",Object.assign({},M,{ref:b,className:D,style:Object.assign(Object.assign({},k),u),onMouseEnter:$,onMouseLeave:C}),s&&r.createElement("div",{className:`${v}-title`},s),r.createElement(X,{paragraph:!1,loading:m,className:`${v}-skeleton`,active:!0},r.createElement("div",{style:i,className:`${v}-content`},d&&r.createElement("span",{className:`${v}-content-prefix`},d),f?f(x):x,p&&r.createElement("span",{className:`${v}-content-suffix`},p)))))}),K=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function Q(t,n){let o=t;const e=/\[[^\]]*]/g,a=(n.match(e)||[]).map(s=>s.slice(1,-1)),u=n.replace(e,"[]"),i=K.reduce((s,[f,d])=>{if(s.includes(f)){const p=Math.floor(o/d);return o-=p*d,s.replace(new RegExp(`${f}+`,"g"),m=>{const l=m.length;return p.toString().padStart(l,"0")})}return s},u);let c=0;return i.replace(e,()=>{const s=a[c];return c+=1,s})}function W(t,n,o){const{format:e=""}=n,a=new Date(t).getTime(),u=Date.now(),i=Math.max(o?a-u:u-a,0);return Q(i,e)}var Z=function(t,n){var o={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(o[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,e=Object.getOwnPropertySymbols(t);a<e.length;a++)n.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(t,e[a])&&(o[e[a]]=t[e[a]]);return o};function ee(t){return new Date(t).getTime()}const E=t=>{const{value:n,format:o="HH:mm:ss",onChange:e,onFinish:a,type:u}=t,i=Z(t,["value","format","onChange","onFinish","type"]),c=u==="countdown",[s,f]=r.useState(null),d=U(()=>{const l=Date.now(),g=ee(n);f({});const S=c?g-l:l-g;return e?.(S),c&&g<l?(a?.(),!1):!0});r.useEffect(()=>{let l;const g=()=>O.cancel(l),S=()=>{l=O(()=>{d()&&S()})};return S(),g},[n,c]),r.useEffect(()=>{f({})},[]);const p=(l,g)=>s?W(l,Object.assign(Object.assign({},g),{format:o}),c):"-",m=l=>V(l,{title:void 0});return r.createElement(y,Object.assign({},i,{value:n,valueRender:m,formatter:p}))},te=t=>r.createElement(E,Object.assign({},t,{type:"countdown"})),ne=r.memo(te);y.Timer=E;y.Countdown=ne;export{y as S};
2
- //# sourceMappingURL=index-D_qUS2GR.js.map
1
+ import{r,v as F,x as H,z as I,ac as _,n as L,a8 as B,an as U,m as O,ae as V}from"./index-BtXc5-H2.js";import{S as X}from"./index-Cfg0ICF_.js";const A=t=>{const{value:n,formatter:o,precision:e,decimalSeparator:a,groupSeparator:u="",prefixCls:i}=t;let c;if(typeof o=="function")c=o(n);else{const s=String(n),f=s.match(/^(-?)(\d*)(\.(\d+))?$/);if(!f||s==="-")c=s;else{const d=f[1];let p=f[2]||"0",m=f[4]||"";p=p.replace(/\B(?=(\d{3})+(?!\d))/g,u),typeof e=="number"&&(m=m.padEnd(e,"0").slice(0,e>0?e:0)),m&&(m=`${a}${m}`),c=[r.createElement("span",{key:"int",className:`${i}-content-value-int`},d,p),m&&r.createElement("span",{key:"decimal",className:`${i}-content-value-decimal`},m)]}}return r.createElement("span",{className:`${i}-content-value`},c)},Y=t=>{const{componentCls:n,marginXXS:o,padding:e,colorTextDescription:a,titleFontSize:u,colorTextHeading:i,contentFontSize:c,fontFamily:s}=t;return{[n]:Object.assign(Object.assign({},I(t)),{[`${n}-title`]:{marginBottom:o,color:a,fontSize:u},[`${n}-skeleton`]:{paddingTop:e},[`${n}-content`]:{color:i,fontSize:c,fontFamily:s,[`${n}-content-value`]:{display:"inline-block",direction:"ltr"},[`${n}-content-prefix, ${n}-content-suffix`]:{display:"inline-block"},[`${n}-content-prefix`]:{marginInlineEnd:o},[`${n}-content-suffix`]:{marginInlineStart:o}}})}},q=t=>{const{fontSizeHeading3:n,fontSize:o}=t;return{titleFontSize:o,contentFontSize:n}},G=F("Statistic",t=>{const n=H(t,{});return Y(n)},q);var J=function(t,n){var o={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(o[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,e=Object.getOwnPropertySymbols(t);a<e.length;a++)n.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(t,e[a])&&(o[e[a]]=t[e[a]]);return o};const y=r.forwardRef((t,n)=>{const{prefixCls:o,className:e,rootClassName:a,style:u,valueStyle:i,value:c=0,title:s,valueRender:f,prefix:d,suffix:p,loading:m=!1,formatter:l,precision:g,decimalSeparator:S=".",groupSeparator:w=",",onMouseEnter:$,onMouseLeave:C}=t,h=J(t,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:N,direction:j,className:T,style:k}=_("statistic"),v=N("statistic",o),[z,R,P]=G(v),x=r.createElement(A,{decimalSeparator:S,groupSeparator:w,prefixCls:v,formatter:l,precision:g,value:c}),D=L(v,{[`${v}-rtl`]:j==="rtl"},T,e,a,R,P),b=r.useRef(null);r.useImperativeHandle(n,()=>({nativeElement:b.current}));const M=B(h,{aria:!0,data:!0});return z(r.createElement("div",Object.assign({},M,{ref:b,className:D,style:Object.assign(Object.assign({},k),u),onMouseEnter:$,onMouseLeave:C}),s&&r.createElement("div",{className:`${v}-title`},s),r.createElement(X,{paragraph:!1,loading:m,className:`${v}-skeleton`,active:!0},r.createElement("div",{style:i,className:`${v}-content`},d&&r.createElement("span",{className:`${v}-content-prefix`},d),f?f(x):x,p&&r.createElement("span",{className:`${v}-content-suffix`},p)))))}),K=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function Q(t,n){let o=t;const e=/\[[^\]]*]/g,a=(n.match(e)||[]).map(s=>s.slice(1,-1)),u=n.replace(e,"[]"),i=K.reduce((s,[f,d])=>{if(s.includes(f)){const p=Math.floor(o/d);return o-=p*d,s.replace(new RegExp(`${f}+`,"g"),m=>{const l=m.length;return p.toString().padStart(l,"0")})}return s},u);let c=0;return i.replace(e,()=>{const s=a[c];return c+=1,s})}function W(t,n,o){const{format:e=""}=n,a=new Date(t).getTime(),u=Date.now(),i=Math.max(o?a-u:u-a,0);return Q(i,e)}var Z=function(t,n){var o={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(o[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,e=Object.getOwnPropertySymbols(t);a<e.length;a++)n.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(t,e[a])&&(o[e[a]]=t[e[a]]);return o};function ee(t){return new Date(t).getTime()}const E=t=>{const{value:n,format:o="HH:mm:ss",onChange:e,onFinish:a,type:u}=t,i=Z(t,["value","format","onChange","onFinish","type"]),c=u==="countdown",[s,f]=r.useState(null),d=U(()=>{const l=Date.now(),g=ee(n);f({});const S=c?g-l:l-g;return e?.(S),c&&g<l?(a?.(),!1):!0});r.useEffect(()=>{let l;const g=()=>O.cancel(l),S=()=>{l=O(()=>{d()&&S()})};return S(),g},[n,c]),r.useEffect(()=>{f({})},[]);const p=(l,g)=>s?W(l,Object.assign(Object.assign({},g),{format:o}),c):"-",m=l=>V(l,{title:void 0});return r.createElement(y,Object.assign({},i,{value:n,valueRender:m,formatter:p}))},te=t=>r.createElement(E,Object.assign({},t,{type:"countdown"})),ne=r.memo(te);y.Timer=E;y.Countdown=ne;export{y as S};
2
+ //# sourceMappingURL=index-D1KRxkVR.js.map