agent-tower 0.7.4-beta.0 → 0.7.4

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 (218) hide show
  1. package/dist/mcp/tools/tasks.js +3 -3
  2. package/dist/mcp/tools/tasks.js.map +1 -1
  3. package/dist/mcp/types.js +2 -2
  4. package/dist/mcp/types.js.map +1 -1
  5. package/dist/prompts/task-handoff.d.ts.map +1 -1
  6. package/dist/prompts/task-handoff.js +2 -1
  7. package/dist/prompts/task-handoff.js.map +1 -1
  8. package/dist/routes/__tests__/sessions-runtime.test.js +2 -0
  9. package/dist/routes/__tests__/sessions-runtime.test.js.map +1 -1
  10. package/dist/routes/__tests__/tasks.test.js +41 -0
  11. package/dist/routes/__tests__/tasks.test.js.map +1 -1
  12. package/dist/routes/__tests__/workspace-history.test.d.ts +2 -0
  13. package/dist/routes/__tests__/workspace-history.test.d.ts.map +1 -0
  14. package/dist/routes/__tests__/workspace-history.test.js +174 -0
  15. package/dist/routes/__tests__/workspace-history.test.js.map +1 -0
  16. package/dist/routes/sessions.d.ts.map +1 -1
  17. package/dist/routes/sessions.js +10 -0
  18. package/dist/routes/sessions.js.map +1 -1
  19. package/dist/routes/tasks.d.ts.map +1 -1
  20. package/dist/routes/tasks.js +8 -0
  21. package/dist/routes/tasks.js.map +1 -1
  22. package/dist/runtime/__tests__/cli-driver-lifecycle.test.js +84 -0
  23. package/dist/runtime/__tests__/cli-driver-lifecycle.test.js.map +1 -1
  24. package/dist/runtime/cli-driver.js +11 -8
  25. package/dist/runtime/cli-driver.js.map +1 -1
  26. package/dist/services/__tests__/task.service.test.js +128 -13
  27. package/dist/services/__tests__/task.service.test.js.map +1 -1
  28. package/dist/services/__tests__/workspace.service.test.js +64 -5
  29. package/dist/services/__tests__/workspace.service.test.js.map +1 -1
  30. package/dist/services/message-delivery.service.d.ts +1 -0
  31. package/dist/services/message-delivery.service.d.ts.map +1 -1
  32. package/dist/services/session-manager.d.ts +4 -0
  33. package/dist/services/session-manager.d.ts.map +1 -1
  34. package/dist/services/session-manager.js +3 -1
  35. package/dist/services/session-manager.js.map +1 -1
  36. package/dist/services/session-resource-cleanup.d.ts +5 -0
  37. package/dist/services/session-resource-cleanup.d.ts.map +1 -1
  38. package/dist/services/session-resource-cleanup.js +7 -0
  39. package/dist/services/session-resource-cleanup.js.map +1 -1
  40. package/dist/services/task-cleanup.service.d.ts +2 -0
  41. package/dist/services/task-cleanup.service.d.ts.map +1 -1
  42. package/dist/services/task-cleanup.service.js +4 -0
  43. package/dist/services/task-cleanup.service.js.map +1 -1
  44. package/dist/services/task-display-state.d.ts +10 -0
  45. package/dist/services/task-display-state.d.ts.map +1 -0
  46. package/dist/services/task-display-state.js +45 -0
  47. package/dist/services/task-display-state.js.map +1 -0
  48. package/dist/services/task.service.d.ts +20 -1
  49. package/dist/services/task.service.d.ts.map +1 -1
  50. package/dist/services/task.service.js +134 -101
  51. package/dist/services/task.service.js.map +1 -1
  52. package/dist/services/workspace.service.d.ts +10 -7
  53. package/dist/services/workspace.service.d.ts.map +1 -1
  54. package/dist/services/workspace.service.js +160 -88
  55. package/dist/services/workspace.service.js.map +1 -1
  56. package/dist/web/assets/{AgentDemoPage-JXetlNBf.js → AgentDemoPage-D9bIiALx.js} +1 -1
  57. package/dist/web/assets/{AgentEnvironmentSettingsPage-CdYyUCwJ.js → AgentEnvironmentSettingsPage-BE0RC6fR.js} +1 -1
  58. package/dist/web/assets/{AttachmentPreview-DMS-PM-1.js → AttachmentPreview-TPd4gdfb.js} +2 -2
  59. package/dist/web/assets/{BranchSelect-BAq4L2ZS.js → BranchSelect-Kv3M1YhZ.js} +1 -1
  60. package/dist/web/assets/{BrandLogo--kWXXJtZ.js → BrandLogo-fR2lCwEo.js} +1 -1
  61. package/dist/web/assets/{ConversationPage-CvC4RyB5.js → ConversationPage-BZiMHI9T.js} +1 -1
  62. package/dist/web/assets/{CreateTaskInput-DjVxCAfc.js → CreateTaskInput-TcZpjBe-.js} +1 -1
  63. package/dist/web/assets/{DemoPage-cDVTGOp8.js → DemoPage-DwpThe16.js} +1 -1
  64. package/dist/web/assets/{DesignSystemPage-BI54IkKi.js → DesignSystemPage-DH9_cygJ.js} +1 -1
  65. package/dist/web/assets/{ExecutionPermissionSelector-f1UYIm1z.js → ExecutionPermissionSelector-C-akTOVg.js} +1 -1
  66. package/dist/web/assets/{GeneralSettingsPage-C0yto6C_.js → GeneralSettingsPage-v2w1eofz.js} +1 -1
  67. package/dist/web/assets/{LoadingPreviewPage-BiJSaHUi.js → LoadingPreviewPage-pgk3PWM9.js} +1 -1
  68. package/dist/web/assets/{McpSettingsPage-BbHwZtyj.js → McpSettingsPage-w1DOlY5V.js} +1 -1
  69. package/dist/web/assets/{MemberAvatar-BLezO3vS.js → MemberAvatar-CJtylxwu.js} +1 -1
  70. package/dist/web/assets/MobileTaskDetail-D5Czlr2O.js +3 -0
  71. package/dist/web/assets/{NotificationSettingsPage-CiKoL2Kv.js → NotificationSettingsPage-CkLg4WvT.js} +1 -1
  72. package/dist/web/assets/{ProfileSettingsPage-DCB48cPS.js → ProfileSettingsPage-B3yzbY1V.js} +1 -1
  73. package/dist/web/assets/ProjectKanbanPage-CuGSLvrU.js +14 -0
  74. package/dist/web/assets/{ProjectSettingsPage-COvIVq1h.js → ProjectSettingsPage-DoklOfna.js} +1 -1
  75. package/dist/web/assets/{ProviderSettingsPage-CPuJcZDg.js → ProviderSettingsPage-Cm0hbX5n.js} +2 -2
  76. package/dist/web/assets/{SettingsMasterDetail-Cv7YaRJB.js → SettingsMasterDetail-CGCUalkW.js} +1 -1
  77. package/dist/web/assets/TaskDetail-BiZbuXcE.js +1 -0
  78. package/dist/web/assets/{TaskHandoffPanel-CxH3Mgyd.js → TaskHandoffPanel-CJahUKNo.js} +24 -24
  79. package/dist/web/assets/{TeamSettingsPage-D-XDefNd.js → TeamSettingsPage-CyppRTaY.js} +1 -1
  80. package/dist/web/assets/{TranslationSettingsPage-BPHI-SZW.js → TranslationSettingsPage-BoQXEZmn.js} +1 -1
  81. package/dist/web/assets/{arc-CC81aLuf.js → arc-5NPBSbiL.js} +1 -1
  82. package/dist/web/assets/{architectureDiagram-3BPJPVTR-DL08XGaN.js → architectureDiagram-3BPJPVTR-CqPT-IsX.js} +1 -1
  83. package/dist/web/assets/{at-sign-DYPIlD6D.js → at-sign-Cf39WHCg.js} +1 -1
  84. package/dist/web/assets/{blockDiagram-GPEHLZMM-B4IW5WxI.js → blockDiagram-GPEHLZMM-BN-1z9KN.js} +1 -1
  85. package/dist/web/assets/{c4Diagram-AAUBKEIU-Cj4d_FqK.js → c4Diagram-AAUBKEIU-CkeLbmQp.js} +1 -1
  86. package/dist/web/assets/channel-CDkuQ_7m.js +1 -0
  87. package/dist/web/assets/check-yNWhPvMH.js +1 -0
  88. package/dist/web/assets/{chevron-down-DNhYsNAt.js → chevron-down-Ct7FZbKm.js} +1 -1
  89. package/dist/web/assets/{chevron-up-CjrLieBR.js → chevron-up-ARFlXMyO.js} +1 -1
  90. package/dist/web/assets/{chip-Cf92J-pQ.js → chip-BV_1-tIb.js} +1 -1
  91. package/dist/web/assets/{chunk-2J33WTMH-DeCj8QSD.js → chunk-2J33WTMH-CWR7tRuT.js} +1 -1
  92. package/dist/web/assets/{chunk-4BX2VUAB-k-6rzQmQ.js → chunk-4BX2VUAB-CAulp4D5.js} +1 -1
  93. package/dist/web/assets/{chunk-55IACEB6-qMTCQ5bX.js → chunk-55IACEB6-DqkKXsbD.js} +1 -1
  94. package/dist/web/assets/{chunk-727SXJPM-CMnu18d1.js → chunk-727SXJPM-B19m45Sq.js} +1 -1
  95. package/dist/web/assets/{chunk-AQP2D5EJ-C0mFbUMn.js → chunk-AQP2D5EJ-CuODwkza.js} +1 -1
  96. package/dist/web/assets/{chunk-FMBD7UC4-u6-_M137.js → chunk-FMBD7UC4-CbUAjtCT.js} +1 -1
  97. package/dist/web/assets/{chunk-ND2GUHAM-DHrIE_8H.js → chunk-ND2GUHAM-C54VxArl.js} +1 -1
  98. package/dist/web/assets/{chunk-QZHKN3VN-aTyC0wZq.js → chunk-QZHKN3VN-D54Uw5fD.js} +1 -1
  99. package/dist/web/assets/classDiagram-4FO5ZUOK-eHY73FGu.js +1 -0
  100. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-eHY73FGu.js +1 -0
  101. package/dist/web/assets/{code-block-OCS4YCEC-CBIOQOMH.js → code-block-OCS4YCEC-CtAySD1h.js} +1 -1
  102. package/dist/web/assets/{confirm-dialog-DWeBZLJW.js → confirm-dialog-CCjHVFTv.js} +1 -1
  103. package/dist/web/assets/{content-JM9E1MeD.js → content-DZozZbBD.js} +2 -2
  104. package/dist/web/assets/{copy-D0gl9kF8.js → copy-C-jvx2et.js} +1 -1
  105. package/dist/web/assets/{cose-bilkent-S5V4N54A-xLyliSgU.js → cose-bilkent-S5V4N54A-BaB2EVcU.js} +1 -1
  106. package/dist/web/assets/{cssMode-DO5UnQ64.js → cssMode-wd7JR1S4.js} +1 -1
  107. package/dist/web/assets/{dagre-BM42HDAG-CbNpoO2d.js → dagre-BM42HDAG-C2j1Y8pO.js} +1 -1
  108. package/dist/web/assets/{diagram-2AECGRRQ-CG3hKxAX.js → diagram-2AECGRRQ-CF-EvpV9.js} +1 -1
  109. package/dist/web/assets/{diagram-5GNKFQAL-mQu9M28s.js → diagram-5GNKFQAL-rBNso835.js} +1 -1
  110. package/dist/web/assets/{diagram-KO2AKTUF-BSeEp_Uw.js → diagram-KO2AKTUF-6NW-oos1.js} +1 -1
  111. package/dist/web/assets/{diagram-LMA3HP47-D6yRdao-.js → diagram-LMA3HP47-DTfRxRLT.js} +1 -1
  112. package/dist/web/assets/{diagram-OG6HWLK6-BUBUW9wD.js → diagram-OG6HWLK6-CS4Ae-hD.js} +1 -1
  113. package/dist/web/assets/{dialog-D1lkhqVL.js → dialog-DV4wfpNU.js} +1 -1
  114. package/dist/web/assets/{erDiagram-TEJ5UH35-BQSZgRqq.js → erDiagram-TEJ5UH35-Dw9QQctN.js} +1 -1
  115. package/dist/web/assets/{file-BijjwxRR.js → file-Btui_I8Z.js} +1 -1
  116. package/dist/web/assets/{flowDiagram-I6XJVG4X-D-eqyr5Y.js → flowDiagram-I6XJVG4X-BGZ9q86S.js} +1 -1
  117. package/dist/web/assets/{folder-picker-Czxm0_S9.js → folder-picker-DiR-8Qdl.js} +1 -1
  118. package/dist/web/assets/{freemarker2-B4RvEa_U.js → freemarker2-yVWXzD3l.js} +1 -1
  119. package/dist/web/assets/{ganttDiagram-6RSMTGT7-BWGkCt_x.js → ganttDiagram-6RSMTGT7-CkGun0no.js} +1 -1
  120. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-DGVc49pR.js → gitGraphDiagram-PVQCEYII-Bz3oiYvi.js} +1 -1
  121. package/dist/web/assets/{globe-Ce01-45x.js → globe-DAFqpAcW.js} +1 -1
  122. package/dist/web/assets/{handlebars-oyT7drqS.js → handlebars-BPf0z6eN.js} +1 -1
  123. package/dist/web/assets/{html-CxxWf2Qk.js → html-HCTCjfUg.js} +1 -1
  124. package/dist/web/assets/{htmlMode-RfAHh5Jj.js → htmlMode-BDkbsknt.js} +1 -1
  125. package/dist/web/assets/index-408ws6FY.css +1 -0
  126. package/dist/web/assets/{index-Dh-tgeaL.js → index-B8xoIIa6.js} +4 -4
  127. package/dist/web/assets/{index-T38iVLEb.js → index-BMcLxIvZ.js} +1 -1
  128. package/dist/web/assets/{index-DWrSDMX2.js → index-BPqjxXmH.js} +1 -1
  129. package/dist/web/assets/index-BszkzNS4.js +122 -0
  130. package/dist/web/assets/{index-DyJfPc4O.js → index-DgUtx9rV.js} +1 -1
  131. package/dist/web/assets/{index-Pt4TsHjm.js → index-DkSPjZm4.js} +1 -1
  132. package/dist/web/assets/{index-hpHE1jXY.js → index-DuM6iAxG.js} +1 -1
  133. package/dist/web/assets/{index-BMZFF1UJ.js → index-GuczxPxb.js} +1 -1
  134. package/dist/web/assets/{index-Disv1kQS.js → index-lZLy5rkr.js} +1 -1
  135. package/dist/web/assets/{infoDiagram-5YYISTIA-DLPs3dV_.js → infoDiagram-5YYISTIA-DYFufUYC.js} +1 -1
  136. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-d_OrnwDY.js → ishikawaDiagram-YF4QCWOH-IOkrKRwu.js} +1 -1
  137. package/dist/web/assets/javascript-DKmxrNeR.js +1 -0
  138. package/dist/web/assets/{journeyDiagram-JHISSGLW-EtU1st_0.js → journeyDiagram-JHISSGLW-Btl3yxne.js} +1 -1
  139. package/dist/web/assets/{jsonMode-Bqh5vIxx.js → jsonMode-DJPdvFcw.js} +1 -1
  140. package/dist/web/assets/{kanban-definition-UN3LZRKU-ZWzUnsFK.js → kanban-definition-UN3LZRKU-CDryhPbA.js} +1 -1
  141. package/dist/web/assets/{kbd-IjDGsZ2B.js → kbd-8RRRm9jd.js} +1 -1
  142. package/dist/web/assets/{key-round-CbnAuUxp.js → key-round-wojrCrDP.js} +1 -1
  143. package/dist/web/assets/{layers-Pdy9vZ6K.js → layers-BH_LL4b8.js} +1 -1
  144. package/dist/web/assets/{linear-D7n23wcA.js → linear-BLuwKHze.js} +1 -1
  145. package/dist/web/assets/{link-Bl1ZbjFh.js → link-jWQOSQOQ.js} +1 -1
  146. package/dist/web/assets/{liquid-Ds47iVLN.js → liquid-1y-xg637.js} +1 -1
  147. package/dist/web/assets/{lspLanguageFeatures-Dcch3bsp.js → lspLanguageFeatures-cYkILdCn.js} +1 -1
  148. package/dist/web/assets/{mdx-CM7ky-2B.js → mdx-CRg4Q6aP.js} +1 -1
  149. package/dist/web/assets/{menu-DubntFHq.js → menu-CMqbaDni.js} +1 -1
  150. package/dist/web/assets/{mermaid-NOHMQCX5-nBsnjgeU.js → mermaid-NOHMQCX5-CYeAhOl-.js} +4 -4
  151. package/dist/web/assets/{message-square-BE-pW0m_.js → message-square-DykJ2lWP.js} +1 -1
  152. package/dist/web/assets/{mindmap-definition-RKZ34NQL-ClHORNTt.js → mindmap-definition-RKZ34NQL-B5wtw1Rv.js} +1 -1
  153. package/dist/web/assets/{modal-CHLtZWvx.js → modal-BwOwTzij.js} +1 -1
  154. package/dist/web/assets/{monaco-BbAmalE2.js → monaco-CcHqpOKe.js} +3 -3
  155. package/dist/web/assets/{nav-row-DH7rNq1V.js → nav-row-BmtdNLxR.js} +1 -1
  156. package/dist/web/assets/{paperclip-YP3Bk1lI.js → paperclip-C4t49vX2.js} +1 -1
  157. package/dist/web/assets/{pencil-BFDuhbtW.js → pencil-BQ5_raiB.js} +1 -1
  158. package/dist/web/assets/{people-DEeNaaLt.js → people-Dr0v8HK0.js} +1 -1
  159. package/dist/web/assets/{pieDiagram-4H26LBE5-BUOaKIyP.js → pieDiagram-4H26LBE5-BZ3VoaNI.js} +1 -1
  160. package/dist/web/assets/{popover-CUmBEXxL.js → popover-CTqvKqTR.js} +1 -1
  161. package/dist/web/assets/{python-BODTtU6m.js → python-Huq_acyd.js} +1 -1
  162. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-Caezg-U2.js → quadrantDiagram-W4KKPZXB-C6ArHmnG.js} +1 -1
  163. package/dist/web/assets/{razor-CHm8DY1p.js → razor-Clc87Ivb.js} +1 -1
  164. package/dist/web/assets/{requirementDiagram-4Y6WPE33-BtdP3Ka6.js → requirementDiagram-4Y6WPE33-DiLzBRQP.js} +1 -1
  165. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-Bv74oA-n.js → sankeyDiagram-5OEKKPKP-QlYYd7IZ.js} +1 -1
  166. package/dist/web/assets/{search-ClmOQd4H.js → search-CMIAPUEt.js} +1 -1
  167. package/dist/web/assets/{select-CYtYPr-c.js → select-Bg7NI8i0.js} +1 -1
  168. package/dist/web/assets/{select-BB7QG08o.js → select-DqB7YF38.js} +1 -1
  169. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-DuNPl-dg.js → sequenceDiagram-3UESZ5HK-COKEtqc0.js} +1 -1
  170. package/dist/web/assets/{server-bEB_DY55.js → server-D7knl8H9.js} +1 -1
  171. package/dist/web/assets/{stateDiagram-AJRCARHV-B72HAgBJ.js → stateDiagram-AJRCARHV-1RZZZdOe.js} +1 -1
  172. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-CCLmVs34.js +1 -0
  173. package/dist/web/assets/{textarea-BqYPvoO-.js → textarea-BCY2J2ca.js} +1 -1
  174. package/dist/web/assets/{timeline-definition-PNZ67QCA-DTmHUgmQ.js → timeline-definition-PNZ67QCA-IJl1LY6J.js} +1 -1
  175. package/dist/web/assets/{toggles-a5fkwT_D.js → toggles-C4LmZwyo.js} +1 -1
  176. package/dist/web/assets/{tooltip-DuyJMci9.js → tooltip-Cirpotu3.js} +1 -1
  177. package/dist/web/assets/{track-DCjyrv3n.js → track-Cv7h6oaE.js} +1 -1
  178. package/dist/web/assets/{trash-2-CIyBqaVy.js → trash-2-BEOQ1ICJ.js} +1 -1
  179. package/dist/web/assets/{tsMode-C1UXAkMh.js → tsMode-CHIbCBQc.js} +1 -1
  180. package/dist/web/assets/{typescript-Biht2wHb.js → typescript-CScj0bbb.js} +1 -1
  181. package/dist/web/assets/{upload-D05XS5-G.js → upload-tLVD0xMT.js} +1 -1
  182. package/dist/web/assets/{use-profiles-CrWTyz1G.js → use-profiles-TkoP4Yw9.js} +1 -1
  183. package/dist/web/assets/{use-providers-Dv1Nk6s7.js → use-providers-Bz6YNiYj.js} +1 -1
  184. package/dist/web/assets/{use-translation-settings-CcUnipVO.js → use-translation-settings-CCpQNS30.js} +1 -1
  185. package/dist/web/assets/{useNormalizedLogs-D9W1cT4R.js → useNormalizedLogs-Bstb98cF.js} +1 -1
  186. package/dist/web/assets/{useTokenUsage-CZ5mDshD.js → useTokenUsage-D7SEwXb0.js} +1 -1
  187. package/dist/web/assets/{vennDiagram-CIIHVFJN-ByoNydXe.js → vennDiagram-CIIHVFJN-DzVayy4U.js} +1 -1
  188. package/dist/web/assets/{wardley-L42UT6IY-BqdMkOLl.js → wardley-L42UT6IY-CULSKh55.js} +1 -1
  189. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-AO22HrEF.js → wardleyDiagram-YWT4CUSO-C5_h3lAA.js} +1 -1
  190. package/dist/web/assets/{xml-NLGqNFDv.js → xml-XuycSwh6.js} +1 -1
  191. package/dist/web/assets/{xychartDiagram-2RQKCTM6-vzPgjgqW.js → xychartDiagram-2RQKCTM6-F65naXcR.js} +1 -1
  192. package/dist/web/assets/{yaml-AWlGS_Ig.js → yaml-BWm159lw.js} +1 -1
  193. package/dist/web/index.html +2 -2
  194. package/node_modules/@agent-tower/shared/dist/index.d.ts +1 -0
  195. package/node_modules/@agent-tower/shared/dist/index.d.ts.map +1 -1
  196. package/node_modules/@agent-tower/shared/dist/index.js +1 -0
  197. package/node_modules/@agent-tower/shared/dist/index.js.map +1 -1
  198. package/node_modules/@agent-tower/shared/dist/task-hierarchy.d.ts +17 -0
  199. package/node_modules/@agent-tower/shared/dist/task-hierarchy.d.ts.map +1 -0
  200. package/node_modules/@agent-tower/shared/dist/task-hierarchy.js +12 -0
  201. package/node_modules/@agent-tower/shared/dist/task-hierarchy.js.map +1 -0
  202. package/node_modules/@agent-tower/shared/dist/types.d.ts +20 -4
  203. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
  204. package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
  205. package/package.json +1 -1
  206. package/prisma/migrations/20261027000000_preserve_workspace_history/migration.sql +2 -0
  207. package/prisma/schema.prisma +2 -0
  208. package/dist/web/assets/MobileTaskDetail-M_Kke9rL.js +0 -3
  209. package/dist/web/assets/ProjectKanbanPage-soDqevjQ.js +0 -12
  210. package/dist/web/assets/TaskDetail-CqhPxvg3.js +0 -1
  211. package/dist/web/assets/channel-CUa8oyzC.js +0 -1
  212. package/dist/web/assets/check-DaZqOL8l.js +0 -1
  213. package/dist/web/assets/classDiagram-4FO5ZUOK-BAx111NO.js +0 -1
  214. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BAx111NO.js +0 -1
  215. package/dist/web/assets/index-BN53vGxp.css +0 -1
  216. package/dist/web/assets/index-Cc3qXMhU.js +0 -122
  217. package/dist/web/assets/javascript-BNXtViSL.js +0 -1
  218. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Bu3l_CgB.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as W,r as C,v as pa,j as e,y as he,P as fe,x as ts,C as ga,w as Vr,z as Hr,a8 as fa,a9 as _t,a4 as ja,ae as Ns,bB as ba,aD as va,bz as Na,b9 as qr,bC as Gs,aV as Rs,aw as Yr,ax as Ws,b8 as Xr,X as ya,a2 as zt,s as wa,aP as Dt,l as x,bD as bs,bE as Qr,aA as ve,bF as T,bG as ue,av as ka,bd as Rt,bH as Ve,u as as,a6 as Q,M as pe,bI as X,bJ as Z,bK as Zr,bL as xe,bM as Ie,bN as ys,bO as Me,bP as Us,bQ as Sa,bR as ws,bS as It,bT as Le,bU as Ca,bV as te,bW as Ts,bX as Ta,a5 as A,bY as Is,bZ as Ma,bk as Ae,b_ as Aa,b$ as at,aR as Ls,aj as Se,c0 as Ce,c1 as ns,c2 as Pe,c3 as ne,bc as He,bl as Jr,c4 as el,c5 as Ea,c6 as Ps,c7 as _a,c8 as sl,c9 as za,ca as Da,a_ as tl,bf as al,cb as nl,cc as Ra,K as rl,cd as ll,ce as il,cf as ol,aG as dl,cg as cl,b4 as $,bo as re,ay as Te,ba as $s,_ as le,ch as xl,ci as ml,cj as nt,ck as ul,bp as sa,N as ta}from"./index-Cc3qXMhU.js";import{E as Ia,S as La,I as J,a as ps,B as hl}from"./BrandLogo--kWXXJtZ.js";import{c as Je,l as ge,T as de,n as es,a as Lt,b as Pt,d as rt,e as Pa,q as Os,f as pl,g as gl}from"./track-DCjyrv3n.js";import{F as lt,u as Ks,d as Vs,e as $e,I as Ne,P as $a,f as fl,c as it,b as Oa,a as Fa,S as ot,g as $t}from"./popover-CUmBEXxL.js";import{H as jl,C as Ba,G as bl,P as Ga,b as Ot,c as Ms,d as As,e as vl,f as ae,g as cs,h as Nl,i as We,F as yl,j as Ft,T as Wa,k as Ua,l as wl,r as kl,a as Ka}from"./content-JM9E1MeD.js";import{K as Sl}from"./key-round-CbnAuUxp.js";import{G as Cl,R as Tl,T as Ml,P as Al,C as El,L as _l,f as zl,g as Dl,I as Rl,h as Va,i as Ha,j as Es,k as Il,l as qa,m as Ya,M as Xa,n as Ll,b as Qa,o as Pl,p as _s,c as Za,d as Ja,e as xs,q as dt,r as en,s as sn,t as tn,a as an}from"./menu-DubntFHq.js";import{G as $l}from"./globe-Ce01-45x.js";import{S as Ol}from"./server-bEB_DY55.js";import{F as nn,t as ct,T as Qe}from"./tooltip-DuyJMci9.js";import{L as Fl}from"./link-Bl1ZbjFh.js";import{P as rn}from"./paperclip-YP3Bk1lI.js";import{U as Bl}from"./upload-D05XS5-G.js";import{C as rs}from"./check-DaZqOL8l.js";import{C as Fs}from"./copy-D0gl9kF8.js";import{T as ss,P as vs}from"./trash-2-CIyBqaVy.js";import{P as ln}from"./pencil-BFDuhbtW.js";import{C as Bt}from"./chevron-down-DNhYsNAt.js";import{S as on}from"./search-ClmOQd4H.js";import{M as Gl}from"./message-square-BE-pW0m_.js";import{L as dn}from"./layers-Pdy9vZ6K.js";import{F as cn,C as xt,T as xn}from"./chip-Cf92J-pQ.js";import{S as qe,N as be,b as Wl,a as mn,c as un}from"./nav-row-DH7rNq1V.js";import{a as Ye,K as Ee}from"./kbd-IjDGsZ2B.js";import{c as hn,S as mt}from"./select-CYtYPr-c.js";import{c as Ul,u as pn}from"./index-BMZFF1UJ.js";import{u as Kl}from"./index-T38iVLEb.js";import{u as Vl}from"./index-Disv1kQS.js";import{R as Hl,I as ql,c as gn}from"./index-hpHE1jXY.js";import{d as Gt,M as fn,a as jn,b as Wt,c as Ut,f as bn,g as ut,e as ht}from"./menu-styles-DWynpVVz.js";import{C as ye,R as vn,S as Nn}from"./toggles-a5fkwT_D.js";import{C as yn,D as wn,b as pt,a as kn,c as Sn}from"./dialog-D1lkhqVL.js";import{A as ie,a as Cn,M as gt}from"./people-DEeNaaLt.js";import"./index-DyJfPc4O.js";import"./index-DWrSDMX2.js";import"./file-BijjwxRR.js";import"./index-Pt4TsHjm.js";const Yl=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Tn=W("activity",Yl);const Xl=[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]],Ql=W("app-window",Xl);const Zl=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Jl=W("archive",Zl);const ei=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Mn=W("arrow-up-down",ei);const si=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Kt=W("arrow-up-right",si);const ti=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],ai=W("book-open",ti);const ni=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],ri=W("bug",ni);const li=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],An=W("calendar-days",li);const ii=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],En=W("chart-column",ii);const oi=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ft=W("clock",oi);const di=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],ci=W("columns-3",di);const xi=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],mi=W("file-diff",xi);const ui=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],Vt=W("flag",ui);const hi=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Ht=W("git-merge",hi);const pi=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],_n=W("git-pull-request",pi);const gi=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],fi=W("grip-vertical",gi);const ji=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],bi=W("house",ji);const vi=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],zn=W("inbox",vi);const Ni=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],yi=W("layout-grid",Ni);const wi=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],Dn=W("list-filter",wi);const ki=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Si=W("lock",ki);const Ci=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ti=W("log-out",Ci);const Mi=[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]],Ai=W("mouse-pointer-2",Mi);const Ei=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],_i=W("pin",Ei);const zi=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],Di=W("plug",zi);const Ri=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Ue=W("rotate-cw",Ri);const Ii=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],Li=W("rows-3",Ii);const Pi=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],$i=W("sparkles",Pi);const Oi=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],gs=W("square-terminal",Oi);const Fi=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Bi=W("star",Fi);const Gi=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],Rn=W("table-2",Gi);const Wi=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Ui=W("target",Wi);const Ki=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Vi=W("user",Ki);const Hi=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],qi=W("workflow",Hi);var In=["PageUp","PageDown"],Ln=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Pn={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ls="Slider",[jt,Yi,Xi]=Ul(ls),[$n]=ga(ls,[Xi]),[Qi,Hs]=$n(ls),On=C.forwardRef((s,t)=>{const{name:a,min:n=0,max:r=100,step:l=1,orientation:i="horizontal",disabled:c=!1,minStepsBetweenThumbs:m=0,defaultValue:u=[n],value:o,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:v=!1,form:h,...b}=s,w=C.useRef(new Set),g=C.useRef(0),N=i==="horizontal"?Zi:Ji,[j=[],z]=pa({prop:o,defaultProp:u,onChange:y=>{[...w.current][g.current]?.focus(),d(y)}}),L=C.useRef(j);function U(y){const F=no(j,y);G(y,F)}function P(y){G(y,g.current)}function B(){const y=L.current[g.current];j[g.current]!==y&&f(j)}function G(y,F,{commit:R}={commit:!1}){const I=oo(l),M=co(Math.round((y-n)/l)*l+n,I),E=hn(M,[n,r]);z((O=[])=>{const q=to(O,E,F);if(io(q,m*l)){g.current=q.indexOf(E);const k=String(q)!==String(O);return k&&R&&f(q),k?q:O}else return O})}return e.jsx(Qi,{scope:s.__scopeSlider,name:a,disabled:c,min:n,max:r,valueIndexToChangeRef:g,thumbs:w.current,values:j,orientation:i,form:h,children:e.jsx(jt.Provider,{scope:s.__scopeSlider,children:e.jsx(jt.Slot,{scope:s.__scopeSlider,children:e.jsx(N,{"aria-disabled":c,"data-disabled":c?"":void 0,...b,ref:t,onPointerDown:he(b.onPointerDown,()=>{c||(L.current=j)}),min:n,max:r,inverted:v,onSlideStart:c?void 0:U,onSlideMove:c?void 0:P,onSlideEnd:c?void 0:B,onHomeKeyDown:()=>!c&&G(n,0,{commit:!0}),onEndKeyDown:()=>!c&&G(r,j.length-1,{commit:!0}),onStepKeyDown:({event:y,direction:F})=>{if(!c){const M=In.includes(y.key)||y.shiftKey&&Ln.includes(y.key)?10:1,E=g.current,O=j[E],q=l*M*F;G(O+q,E,{commit:!0})}}})})})})});On.displayName=ls;var[Fn,Bn]=$n(ls,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Zi=C.forwardRef((s,t)=>{const{min:a,max:n,dir:r,inverted:l,onSlideStart:i,onSlideMove:c,onSlideEnd:m,onStepKeyDown:u,...o}=s,[d,f]=C.useState(null),v=ts(t,N=>f(N)),h=C.useRef(void 0),b=pn(r),w=b==="ltr",g=w&&!l||!w&&l;function S(N){const j=h.current||d.getBoundingClientRect(),z=[0,j.width],U=qt(z,g?[a,n]:[n,a]);return h.current=j,U(N-j.left)}return e.jsx(Fn,{scope:s.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:e.jsx(Gn,{dir:b,"data-orientation":"horizontal",...o,ref:v,style:{...o.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:N=>{const j=S(N.clientX);i?.(j)},onSlideMove:N=>{const j=S(N.clientX);c?.(j)},onSlideEnd:()=>{h.current=void 0,m?.()},onStepKeyDown:N=>{const z=Pn[g?"from-left":"from-right"].includes(N.key);u?.({event:N,direction:z?-1:1})}})})}),Ji=C.forwardRef((s,t)=>{const{min:a,max:n,inverted:r,onSlideStart:l,onSlideMove:i,onSlideEnd:c,onStepKeyDown:m,...u}=s,o=C.useRef(null),d=ts(t,o),f=C.useRef(void 0),v=!r;function h(b){const w=f.current||o.current.getBoundingClientRect(),g=[0,w.height],N=qt(g,v?[n,a]:[a,n]);return f.current=w,N(b-w.top)}return e.jsx(Fn,{scope:s.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:e.jsx(Gn,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const w=h(b.clientY);l?.(w)},onSlideMove:b=>{const w=h(b.clientY);i?.(w)},onSlideEnd:()=>{f.current=void 0,c?.()},onStepKeyDown:b=>{const g=Pn[v?"from-bottom":"from-top"].includes(b.key);m?.({event:b,direction:g?-1:1})}})})}),Gn=C.forwardRef((s,t)=>{const{__scopeSlider:a,onSlideStart:n,onSlideMove:r,onSlideEnd:l,onHomeKeyDown:i,onEndKeyDown:c,onStepKeyDown:m,...u}=s,o=Hs(ls,a);return e.jsx(fe.span,{...u,ref:t,onKeyDown:he(s.onKeyDown,d=>{d.key==="Home"?(i(d),d.preventDefault()):d.key==="End"?(c(d),d.preventDefault()):In.concat(Ln).includes(d.key)&&(m(d),d.preventDefault())}),onPointerDown:he(s.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),o.thumbs.has(f)?f.focus():n(d)}),onPointerMove:he(s.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&r(d)}),onPointerUp:he(s.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),l(d))})})}),Wn="SliderTrack",Un=C.forwardRef((s,t)=>{const{__scopeSlider:a,...n}=s,r=Hs(Wn,a);return e.jsx(fe.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...n,ref:t})});Un.displayName=Wn;var bt="SliderRange",Kn=C.forwardRef((s,t)=>{const{__scopeSlider:a,...n}=s,r=Hs(bt,a),l=Bn(bt,a),i=C.useRef(null),c=ts(t,i),m=r.values.length,u=r.values.map(f=>qn(f,r.min,r.max)),o=m>1?Math.min(...u):0,d=100-Math.max(...u);return e.jsx(fe.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...n,ref:c,style:{...s.style,[l.startEdge]:o+"%",[l.endEdge]:d+"%"}})});Kn.displayName=bt;var vt="SliderThumb",Vn=C.forwardRef((s,t)=>{const a=Yi(s.__scopeSlider),[n,r]=C.useState(null),l=ts(t,c=>r(c)),i=C.useMemo(()=>n?a().findIndex(c=>c.ref.current===n):-1,[a,n]);return e.jsx(eo,{...s,ref:l,index:i})}),eo=C.forwardRef((s,t)=>{const{__scopeSlider:a,index:n,name:r,...l}=s,i=Hs(vt,a),c=Bn(vt,a),[m,u]=C.useState(null),o=ts(t,S=>u(S)),d=m?i.form||!!m.closest("form"):!0,f=Vl(m),v=i.values[n],h=v===void 0?0:qn(v,i.min,i.max),b=ao(n,i.values.length),w=f?.[c.size],g=w?ro(w,h,c.direction):0;return C.useEffect(()=>{if(m)return i.thumbs.add(m),()=>{i.thumbs.delete(m)}},[m,i.thumbs]),e.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${h}% + ${g}px)`},children:[e.jsx(jt.ItemSlot,{scope:s.__scopeSlider,children:e.jsx(fe.span,{role:"slider","aria-label":s["aria-label"]||b,"aria-valuemin":i.min,"aria-valuenow":v,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...l,ref:o,style:v===void 0?{display:"none"}:s.style,onFocus:he(s.onFocus,()=>{i.valueIndexToChangeRef.current=n})})}),d&&e.jsx(Hn,{name:r??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:v},n)]})});Vn.displayName=vt;var so="RadioBubbleInput",Hn=C.forwardRef(({__scopeSlider:s,value:t,...a},n)=>{const r=C.useRef(null),l=ts(r,n),i=Kl(t);return C.useEffect(()=>{const c=r.current;if(!c)return;const m=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(m,"value").set;if(i!==t&&o){const d=new Event("input",{bubbles:!0});o.call(c,t),c.dispatchEvent(d)}},[i,t]),e.jsx(fe.input,{style:{display:"none"},...a,ref:l,defaultValue:t})});Hn.displayName=so;function to(s=[],t,a){const n=[...s];return n[a]=t,n.sort((r,l)=>r-l)}function qn(s,t,a){const l=100/(a-t)*(s-t);return hn(l,[0,100])}function ao(s,t){return t>2?`Value ${s+1} of ${t}`:t===2?["Minimum","Maximum"][s]:void 0}function no(s,t){if(s.length===1)return 0;const a=s.map(r=>Math.abs(r-t)),n=Math.min(...a);return a.indexOf(n)}function ro(s,t,a){const n=s/2,l=qt([0,50],[0,n]);return(n-l(t)*a)*a}function lo(s){return s.slice(0,-1).map((t,a)=>s[a+1]-t)}function io(s,t){if(t>0){const a=lo(s);return Math.min(...a)>=t}return!0}function qt(s,t){return a=>{if(s[0]===s[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(s[1]-s[0]);return t[0]+n*(a-s[0])}}function oo(s){return(String(s).split(".")[1]||"").length}function co(s,t){const a=Math.pow(10,t);return Math.round(s*a)/a}var xo=On,mo=Un,uo=Kn,ho=Vn,qs="Tabs",[po]=ga(qs,[gn]),Yn=gn(),[go,Yt]=po(qs),Xn=C.forwardRef((s,t)=>{const{__scopeTabs:a,value:n,onValueChange:r,defaultValue:l,orientation:i="horizontal",dir:c,activationMode:m="automatic",...u}=s,o=pn(c),[d,f]=pa({prop:n,onChange:r,defaultProp:l??"",caller:qs});return e.jsx(go,{scope:a,baseId:Vr(),value:d,onValueChange:f,orientation:i,dir:o,activationMode:m,children:e.jsx(fe.div,{dir:o,"data-orientation":i,...u,ref:t})})});Xn.displayName=qs;var Qn="TabsList",Zn=C.forwardRef((s,t)=>{const{__scopeTabs:a,loop:n=!0,...r}=s,l=Yt(Qn,a),i=Yn(a);return e.jsx(Hl,{asChild:!0,...i,orientation:l.orientation,dir:l.dir,loop:n,children:e.jsx(fe.div,{role:"tablist","aria-orientation":l.orientation,...r,ref:t})})});Zn.displayName=Qn;var Jn="TabsTrigger",er=C.forwardRef((s,t)=>{const{__scopeTabs:a,value:n,disabled:r=!1,...l}=s,i=Yt(Jn,a),c=Yn(a),m=ar(i.baseId,n),u=nr(i.baseId,n),o=n===i.value;return e.jsx(ql,{asChild:!0,...c,focusable:!r,active:o,children:e.jsx(fe.button,{type:"button",role:"tab","aria-selected":o,"aria-controls":u,"data-state":o?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:m,...l,ref:t,onMouseDown:he(s.onMouseDown,d=>{!r&&d.button===0&&d.ctrlKey===!1?i.onValueChange(n):d.preventDefault()}),onKeyDown:he(s.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(n)}),onFocus:he(s.onFocus,()=>{const d=i.activationMode!=="manual";!o&&!r&&d&&i.onValueChange(n)})})})});er.displayName=Jn;var sr="TabsContent",tr=C.forwardRef((s,t)=>{const{__scopeTabs:a,value:n,forceMount:r,children:l,...i}=s,c=Yt(sr,a),m=ar(c.baseId,n),u=nr(c.baseId,n),o=n===c.value,d=C.useRef(o);return C.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),e.jsx(Hr,{present:r||o,children:({present:f})=>e.jsx(fe.div,{"data-state":o?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":m,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...s.style,animationDuration:d.current?"0s":void 0},children:f&&l})})});tr.displayName=sr;function ar(s,t){return`${s}-trigger-${t}`}function nr(s,t){return`${s}-content-${t}`}var fo=Xn,jo=Zn,bo=er,vo=tr;function we(s,t){return new Date(s.getFullYear(),s.getMonth(),s.getDate()+t)}const Ys={home:bi,project:lt,projectNew:cn,allProjects:dn,taskNew:La,conversation:Gl,search:on,settings:Dt,back:wa,external:Kt,chevron:zt,expand:Bt,more:Ia,app:Ql,add:vs,edit:ln,delete:ss,copy:Fs,check:rs,close:ya,refresh:Ue,download:Xr,upload:Bl,attach:rn,send:Ws,stop:Yr,run:Ga,filter:Dn,sort:Mn,drag:fi,link:Fl,logout:Ti,branch:Rs,commit:bl,merge:Ht,pullRequest:_n,diff:mi,file:nn,code:Ba,terminal:gs,server:Ol,tunnel:$l,agent:Gs,runtime:qr,ai:$i,tokens:Cl,mcp:Di,permission:Na,lock:Si,secret:Sl,team:va,user:Vi,bug:ri,info:ba,warning:Ns,error:ja,success:_t,time:ft,history:jl,calendar:An,notification:fa,pin:_i,target:Ui,milestone:Vt,activity:Tn,board:yi,chart:En,table:Rn,docs:ai,inbox:zn,workflow:qi,archive:Jl,favorite:Bi},Bs={xs:12,sm:14,md:16,lg:18,xl:20},rr=[{title:"导航",names:["home","project","projectNew","allProjects","taskNew","conversation","search","settings","back","external","chevron","expand","more","app"]},{title:"操作",names:["add","edit","delete","copy","check","close","refresh","download","upload","attach","send","stop","run","filter","sort","drag","link","logout"]},{title:"开发",names:["branch","commit","merge","pullRequest","diff","file","code","terminal","server","tunnel","agent","runtime","ai","tokens","mcp","permission","lock","secret","team","user","bug"]},{title:"信息",names:["info","warning","error","success","time","history","calendar","notification","pin","target","milestone","activity","board","chart","table","docs","inbox","workflow","archive","favorite"]}];function se({name:s,size:t="md",strokeWidth:a,className:n,...r}){const l=Ys[s],i=typeof t=="number"?t:Bs[t],c=!!r["aria-label"];return e.jsx(l,{size:i,strokeWidth:a??(i>=24?1.5:2),"aria-hidden":c?void 0:!0,role:c?"img":void 0,className:x("shrink-0",n),...r})}function fs({icon:s,title:t,description:a,action:n,variant:r="plain",size:l="md",className:i}){return e.jsxs("div",{"data-slot":"empty-state",className:x("flex flex-col items-center justify-center text-center",l==="md"?"px-6 py-10":"px-4 py-6",r==="dashed"&&"rounded-xl border border-dashed border-border bg-foreground/[0.015]",i),children:[s&&e.jsx("div",{"aria-hidden":"true",className:x("mb-3 text-muted-foreground/40",l==="md"?"[&_svg]:size-9 [&_svg]:stroke-[1.5]":"[&_svg]:size-7 [&_svg]:stroke-[1.5]"),children:s}),t&&e.jsx("p",{className:x("font-medium text-foreground",l==="md"?"text-sm":"text-[13px]"),children:t}),a&&e.jsx("p",{className:x("max-w-xs text-muted-foreground",l==="md"?"text-[13px]":"text-xs",t&&"mt-1"),children:a}),n&&e.jsx("div",{className:"mt-4 flex items-center gap-2",children:n})]})}function Re({tone:s="success",pulse:t=!0,label:a,className:n}){return e.jsxs("span",{role:a?"status":void 0,"aria-label":a,"aria-hidden":a?void 0:!0,className:x("relative inline-flex size-2 shrink-0",n),children:[t&&e.jsx("span",{className:x("absolute inline-flex size-full rounded-full opacity-60 motion-safe:animate-ping",bs[s])}),e.jsx("span",{className:x("relative inline-flex size-2 rounded-full",bs[s])})]})}function lr({text:s,className:t}){return e.jsxs("span",{className:x("inline-flex text-sm",t),children:[e.jsx("span",{className:"sr-only",children:s}),e.jsx("span",{className:"agent-thinking-shimmer","aria-hidden":"true",children:Array.from(s).map((a,n)=>e.jsx("span",{className:"agent-thinking-char",style:{animationDelay:`${n*45}ms`},children:a},`${a}-${n}`))})]})}function ir({className:s}){return e.jsxs("span",{className:x("active-work-dots",s),"aria-hidden":"true",children:[e.jsx("span",{children:"."}),e.jsx("span",{className:"active-work-dots__second",children:"."}),e.jsx("span",{className:"active-work-dots__third",children:"."})]})}function Xe({external:s=!1,asChild:t=!1,className:a,children:n,...r}){return t?e.jsx(Qr,{className:ct(a),...r,children:n}):e.jsxs("a",{className:ct(a),...s?{target:"_blank",rel:"noopener noreferrer"}:null,...r,children:[n,s&&e.jsx(Kt,{"aria-hidden":"true",className:"ml-0.5 inline size-[0.9em] align-[-0.1em]"})]})}function Nt({value:s,defaultValue:t,onValueChange:a,onValueCommit:n,min:r=0,max:l=100,step:i=1,disabled:c,marks:m,className:u,...o}){const[d,f]=Ks({value:s,defaultValue:t??[r],onChange:a}),v=l-r||1,h=d.length>1?Math.min(...d):r,b=Math.max(...d);return e.jsxs(xo,{value:d,onValueChange:f,onValueCommit:n,min:r,max:l,step:i,disabled:c,className:x("relative flex h-5 w-full touch-none select-none items-center data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",u),children:[e.jsxs(mo,{className:"relative h-1 w-full grow rounded-full bg-foreground/10",children:[e.jsx(uo,{className:"absolute h-full rounded-full bg-primary"}),m?.map(w=>e.jsx("span",{"aria-hidden":"true",className:x("absolute top-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full",w>=h&&w<=b?"bg-primary":"bg-foreground/20"),style:{left:`${(w-r)/v*100}%`}},w))]}),d.map((w,g)=>e.jsx(ho,{"aria-label":o["aria-label"],className:"block size-4 rounded-full border-4 border-primary bg-background shadow-raised transition-[transform,box-shadow] duration-150 hover:scale-110 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring/30 motion-reduce:transition-none"},g))]})}const or=fo;function dr({className:s,...t}){return e.jsx(jo,{className:x("flex h-9 items-stretch gap-5 border-b border-border/60",s),...t})}function ms({className:s,count:t,icon:a,children:n,...r}){return e.jsxs(bo,{className:x("relative -mb-px inline-flex items-center gap-1.5 whitespace-nowrap border-b-2 border-transparent px-0.5 text-[13px] font-medium text-muted-foreground transition-colors","hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/60 disabled:pointer-events-none disabled:opacity-40","data-[state=active]:border-foreground data-[state=active]:text-foreground [&_svg]:size-3.5",s),...r,children:[a,n,t!==void 0&&e.jsx("span",{className:"text-[11px] font-normal tabular-nums text-muted-foreground",children:t})]})}function zs({className:s,...t}){return e.jsx(vo,{className:x("pt-4 outline-none",s),...t})}const No={sm:"w-48",md:"w-60",lg:"w-80"};function ce({options:s,value:t,defaultValue:a,onValueChange:n,icon:r,placeholder:l,showMenuLabel:i=!1,disabled:c,menuWidth:m="md",className:u,...o}){const[d,f]=Ks({value:t,defaultValue:a??"",onChange:n}),v=s.find(b=>b.value===d),h=o["aria-label"];return e.jsxs(Tl,{children:[e.jsxs(Ml,{disabled:c,"aria-label":`${h}: ${v?.label??l??""}`,className:x("group inline-flex h-7 max-w-full items-center gap-1.5 rounded-md px-2 text-xs font-medium transition-colors","hover:bg-accent data-[state=open]:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:pointer-events-none disabled:opacity-40",v?"text-foreground/80":"text-muted-foreground",u),children:[(r??v?.icon)&&e.jsx("span",{className:"flex shrink-0 text-muted-foreground [&_svg]:size-3.5",children:r??v?.icon}),e.jsx("span",{className:"max-w-[120px] truncate",children:v?.label??l}),e.jsx(Bt,{"aria-hidden":"true",className:"size-3 shrink-0 text-muted-foreground transition-transform duration-150 group-data-[state=open]:rotate-180"})]}),e.jsx(Al,{children:e.jsxs(El,{align:"start",sideOffset:6,collisionPadding:8,className:x(Ut,"max-h-[min(60vh,320px)] max-w-[calc(100vw-2rem)] overflow-y-auto origin-(--radix-dropdown-menu-content-transform-origin)",No[m]),children:[i&&e.jsx(_l,{className:Gt,children:h}),e.jsx(zl,{value:d,onValueChange:f,children:s.map(b=>e.jsxs(Dl,{value:b.value,disabled:b.disabled,className:x(Wt,jn,"group/item items-start data-[disabled]:opacity-50"),children:[b.icon&&e.jsx("span",{className:"mt-0.5 flex shrink-0 text-muted-foreground [&_svg]:size-3.5",children:b.icon}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block truncate group-data-[state=checked]/item:font-medium group-data-[state=checked]/item:text-foreground",children:b.label}),b.description&&e.jsx("span",{className:"mt-0.5 block whitespace-normal text-xs leading-[18px] text-muted-foreground",children:b.description})]}),e.jsx(Rl,{className:x(fn,"top-2"),children:e.jsx(rs,{className:"size-3.5"})})]},b.value))})]})})]})}function cr({value:s,defaultValue:t="",onValueChange:a,onSubmit:n,placeholder:r,submitLabel:l,submitHint:i,submitting:c=!1,pendingLabel:m,disabled:u=!1,toolbarStart:o,toolbarEnd:d,footer:f,autoFocus:v,className:h,...b}){const[w,g]=Ks({value:s,defaultValue:t,onChange:a}),S=w.trim().length>0&&!u&&!c,N=()=>{S&&n?.(w)};return e.jsxs("div",{"data-slot":"composer",className:x("w-full",h),children:[e.jsxs("div",{className:x("relative rounded-xl border border-border bg-background shadow-raised transition-colors duration-200","hover:border-ring/40 focus-within:border-ring/60",c&&"opacity-80"),children:[e.jsx("textarea",{value:w,onChange:j=>g(j.target.value),onKeyDown:j=>{j.key==="Enter"&&!j.shiftKey&&!j.nativeEvent.isComposing&&(j.preventDefault(),N())},placeholder:r,"aria-label":b["aria-label"]??r,disabled:u||c,autoFocus:v,rows:1,className:"block w-full resize-none border-none bg-transparent px-4 pb-2 pt-4 text-[15px] leading-relaxed text-foreground placeholder:text-muted-foreground/80 focus:outline-none disabled:cursor-not-allowed",style:{minHeight:76,maxHeight:220,fieldSizing:"content"}}),e.jsxs("div",{className:"flex items-center justify-between gap-2 px-2 pb-2 pt-1",children:[e.jsx("div",{className:"flex min-w-0 items-center gap-1",children:o}),e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[c&&m&&e.jsx(ve,{size:"sm",label:m,className:"text-xs"}),d,S&&i&&e.jsxs("span",{className:"hidden select-none items-center gap-1 text-xs text-muted-foreground sm:inline-flex",children:[e.jsx(Ye,{children:"⏎"}),i]}),e.jsx("button",{type:"button",onClick:N,disabled:!S,"aria-label":l,title:l,className:x("flex size-8 items-center justify-center rounded-lg transition-all duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1",S?"bg-primary text-primary-foreground shadow-raised hover:bg-primary/90":"cursor-not-allowed bg-muted text-muted-foreground/40"),children:e.jsx(Ws,{size:16,strokeWidth:2.5,"aria-hidden":"true"})})]})]})]}),f&&e.jsx("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5 px-0.5",children:f})]})}function yt({className:s,children:t,...a}){const n=C.Children.toArray(t);return e.jsx("nav",{"aria-label":"Breadcrumb",className:x("flex min-w-0 items-center",s),...a,children:n.map((r,l)=>e.jsxs(C.Fragment,{children:[l>0&&e.jsx("span",{"aria-hidden":"true",className:"mx-1.5 select-none text-muted-foreground/40",children:"/"}),r]},l))})}function Ke({icon:s,menu:t=!1,current:a=!1,className:n,children:r,type:l,...i}){return e.jsxs("button",{type:l??"button","aria-current":a?"page":void 0,className:x("group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 text-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 data-[state=open]:bg-accent",a?"font-medium text-foreground/90":"text-muted-foreground hover:text-foreground",n),...i,children:[s&&e.jsx("span",{className:"flex shrink-0 [&_svg]:size-3.5",children:s}),e.jsx("span",{className:"max-w-[200px] truncate",children:r}),t&&e.jsx(Bt,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground/70 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}function xr({status:s,index:t}){return e.jsx("span",{"aria-hidden":"true",className:x("relative z-[1] flex size-6 shrink-0 items-center justify-center rounded-full text-[11px] font-semibold tabular-nums",s==="done"&&"bg-primary text-primary-foreground",s==="current"&&"bg-background text-foreground ring-[1.5px] ring-inset ring-foreground",s==="upcoming"&&"bg-background text-muted-foreground ring-1 ring-inset ring-border"),children:s==="done"?e.jsx(rs,{className:"size-3.5",strokeWidth:2.5}):t+1})}function mr({steps:s,current:t,className:a}){return e.jsx("ol",{className:x("flex w-full items-start",a),children:s.map((n,r)=>{const l=r<t?"done":r===t?"current":"upcoming",i=r===s.length-1;return e.jsxs("li",{"aria-current":l==="current"?"step":void 0,className:x("flex min-w-0 items-start gap-2.5",!i&&"flex-1"),children:[e.jsx(xr,{status:l,index:r}),e.jsxs("div",{className:"min-w-0 pt-0.5",children:[e.jsx("div",{className:x("truncate text-[13px] leading-5",l==="upcoming"?"text-muted-foreground":"font-medium text-foreground"),children:n.title}),n.description&&e.jsx("div",{className:"truncate text-xs leading-[18px] text-muted-foreground",children:n.description})]}),!i&&e.jsx("span",{"aria-hidden":"true",className:x("mx-2 mt-3 h-px min-w-6 flex-1",r<t?"bg-foreground":"bg-border")})]},r)})})}function ur({steps:s,className:t}){return e.jsx("ol",{className:x("flex flex-col",t),children:s.map((a,n)=>{const r=a.status??"upcoming",l=n===s.length-1;return e.jsxs("li",{"aria-current":r==="current"?"step":void 0,className:"relative flex gap-3 pb-5 last:pb-0",children:[!l&&e.jsx("span",{"aria-hidden":"true",className:x("absolute left-3 top-7 bottom-1 w-px -translate-x-1/2",r==="done"?"bg-foreground":"bg-border")}),e.jsx(xr,{status:r,index:n}),e.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[e.jsx("div",{className:x("text-sm leading-5",r==="upcoming"?"text-foreground/80":"font-medium text-foreground"),children:a.title}),a.description&&e.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:a.description}),a.content&&e.jsx("div",{className:"mt-2.5",children:a.content})]})]},n)})})}function Xs({swatch:s="solid",color:t=T.ink}){switch(s){case"hatch":return e.jsx("span",{"aria-hidden":"true",className:"hatch size-2.5 shrink-0 rounded-[2px] bg-viz-0",style:{color:t===T.ink?T.plan:t}});case"line":return e.jsx("span",{"aria-hidden":"true",className:"h-0.5 w-3 shrink-0 rounded-full",style:{background:t}});case"dashed":return e.jsx("svg",{"aria-hidden":"true",width:"14",height:"2",className:"shrink-0",children:e.jsx("line",{x1:"0",y1:"1",x2:"14",y2:"1",stroke:t,strokeWidth:"2",strokeDasharray:"3 2"})});case"dot":return e.jsx("span",{"aria-hidden":"true",className:"size-2 shrink-0 rounded-full",style:{background:t}});case"outline":return e.jsx("span",{"aria-hidden":"true",className:"size-2.5 shrink-0 rounded-[2px]",style:{boxShadow:`inset 0 0 0 1px ${t}`}});default:return e.jsx("span",{"aria-hidden":"true",className:"size-2.5 shrink-0 rounded-[2px]",style:{background:t}})}}function ke({items:s,className:t}){return e.jsx("ul",{className:x("flex flex-wrap items-center gap-x-3.5 gap-y-1 text-xs text-muted-foreground",t),children:s.map((a,n)=>e.jsxs("li",{className:"inline-flex items-center gap-1.5",children:[e.jsx(Xs,{swatch:a.swatch,color:a.color}),e.jsx("span",{children:a.label}),a.value!==void 0&&e.jsx("span",{className:"font-medium tabular-nums text-foreground/80",children:a.value})]},n))})}function oe({value:s,format:t="percent",goodWhen:a="up",period:n,size:r="sm",className:l}){const i=s>0?"up":s<0?"down":"flat",c=i==="flat"||a==="none"?"neutral":i===a?"success":"danger",m=Math.abs(s),u=t==="percent"?`${Number.isInteger(m*100)?(m*100).toFixed(0):(m*100).toFixed(1)}%`:ue(m),o=i==="down"?ka:Ws;return e.jsxs("span",{className:x("inline-flex items-center gap-1 whitespace-nowrap",r==="sm"?"text-xs":"text-[13px]",l),children:[e.jsxs("span",{className:x("inline-flex items-center gap-0.5 font-medium tabular-nums",a==="none"&&i!=="flat"?"text-foreground/80":Rt[c]),children:[i!=="flat"&&e.jsx(o,{"aria-hidden":"true",className:r==="sm"?"size-3":"size-3.5",strokeWidth:2.5}),e.jsx("span",{className:"sr-only",children:i==="up"?"+":i==="down"?"−":""}),u]}),n&&e.jsx("span",{className:"text-muted-foreground",children:n})]})}function _e({value:s,size:t=64,thickness:a,expected:n,tone:r="ink",children:l,className:i,...c}){const m=a??Math.max(3,Math.round(t/14)),u=(t-m)/2,o=2*Math.PI*u,d=Je(s,0,1),f=r==="ink"?T.ink:Ve[r],v=Math.round(d*100),h=t/2,b=n!==void 0?Je(n,0,1)*Math.PI*2:null;return e.jsxs("div",{role:"img","aria-label":c["aria-label"]??`${v}%`,className:x("relative inline-flex shrink-0 items-center justify-center",i),style:{width:t,height:t},children:[e.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"-rotate-90","aria-hidden":"true",children:[e.jsx("circle",{cx:h,cy:h,r:u,fill:"none",stroke:r==="ink"?T.empty:`color-mix(in oklab, ${f} 15%, transparent)`,strokeWidth:m}),d>0&&e.jsx("circle",{cx:h,cy:h,r:u,fill:"none",stroke:f,strokeWidth:m,strokeLinecap:"round",strokeDasharray:o,strokeDashoffset:o*(1-d),className:"transition-[stroke-dashoffset] duration-700 ease-enter motion-reduce:transition-none"}),b!==null&&e.jsx("line",{x1:h+(u-m)*Math.cos(b),y1:h+(u-m)*Math.sin(b),x2:h+(u+m)*Math.cos(b),y2:h+(u+m)*Math.sin(b),stroke:T.text,strokeOpacity:.6,strokeWidth:2,strokeLinecap:"round"})]}),e.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:l??e.jsxs("span",{className:x("font-semibold tracking-tight text-foreground",t>=88?"text-2xl":t>=60?"text-[15px]":"text-[11px]"),children:[v,e.jsx("span",{className:x("font-medium text-muted-foreground",t>=88?"text-sm":"text-[0.7em]"),children:"%"})]})})]})}function Xt({values:s,width:t=96,height:a=28,area:n=!1,showLast:r=!0,baseline:l,tone:i="ink",className:c,...m}){const u=Vs("spark");if(s.length<2)return null;const o=3,d=l!==void 0?[...s,l]:s,f=Math.min(...d),v=Math.max(...d),h=ge([0,s.length-1],[o,t-o]),b=ge([f,v===f?f+1:v],[a-o,o]),w=s.map((z,L)=>[h(L),b(z)]),g=w.map(([z,L],U)=>`${U===0?"M":"L"}${z.toFixed(1)},${L.toFixed(1)}`).join(""),S=i==="ink"?T.ink:T.context,[N,j]=w[w.length-1];return e.jsxs("svg",{width:t,height:a,viewBox:`0 0 ${t} ${a}`,role:"img","aria-label":m["aria-label"],"aria-hidden":m["aria-label"]?void 0:!0,className:x("shrink-0 overflow-visible",c),children:[n&&e.jsxs(e.Fragment,{children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:u,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:S,stopOpacity:.12}),e.jsx("stop",{offset:"100%",stopColor:S,stopOpacity:0})]})}),e.jsx("path",{d:`${g}L${N.toFixed(1)},${a}L${w[0][0].toFixed(1)},${a}Z`,fill:`url(#${u})`})]}),l!==void 0&&e.jsx("line",{x1:o,x2:t-o,y1:b(l),y2:b(l),stroke:T.axis,strokeWidth:1,strokeDasharray:"2 2"}),e.jsx("path",{d:g,fill:"none",stroke:S,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),r&&e.jsx("circle",{cx:N,cy:j,r:2.5,fill:S,stroke:T.surface,strokeWidth:1.5})]})}const yo={todo:"bg-background ring-1 ring-inset ring-foreground/30",doing:"ring-1 ring-inset ring-viz-6 bg-[linear-gradient(135deg,transparent_50%,var(--viz-6)_50%)]",done:"bg-viz-6",late:"hatch bg-destructive/10 text-destructive/70 ring-1 ring-inset ring-destructive/60",cancelled:"ring-1 ring-inset ring-foreground/20 bg-[linear-gradient(to_top_right,transparent_calc(50%-0.5px),var(--muted-foreground)_calc(50%-0.5px),var(--muted-foreground)_calc(50%+0.5px),transparent_calc(50%+0.5px))]"};function wt({state:s,size:t="md",label:a,className:n}){return e.jsx("span",{role:a?"img":void 0,"aria-label":a,"aria-hidden":a?void 0:!0,className:x("inline-block shrink-0 rounded-[3px]",t==="md"?"size-3":"size-2.5",yo[s],n)})}const wo={"not-started":{label:"Not started",tone:"neutral",variant:"soft"},"on-track":{label:"On track",tone:"neutral",variant:"outline"},ahead:{label:"Ahead",tone:"success",variant:"dot"},"at-risk":{label:"At risk",tone:"warning",variant:"dot"},"off-track":{label:"Off track",tone:"danger",variant:"soft"},done:{label:"Done",tone:"success",variant:"soft"}};function Qt({health:s,label:t,className:a}){const{t:n}=as(),r=wo[s];return e.jsx(Q,{tone:r.tone,variant:r.variant,icon:s==="done"?e.jsx(rs,{strokeWidth:3}):void 0,className:a,children:t??n(r.label)})}function hr(s,t){for(const a of s)a.children?.length&&(t.add(a.id),hr(a.children,t));return t}function pr({nodes:s,depth:t,expanded:a,toggle:n}){const{t:r}=as();return e.jsx("ul",{role:t===0?"tree":"group",className:x(t>0&&"ml-[11px]"),children:s.map(l=>{const i=!!l.children?.length,c=a.has(l.id);return e.jsxs("li",{role:"treeitem","aria-expanded":i?c:void 0,className:x("relative",t>0&&["pl-4","before:absolute before:left-0 before:top-0 before:h-full before:w-px before:bg-viz-axis last:before:h-3.5","after:absolute after:left-0 after:top-3.5 after:h-px after:w-3 after:bg-viz-axis"]),children:[e.jsxs("div",{className:"flex h-7 items-center gap-1.5",children:[i?e.jsx("button",{type:"button",onClick:()=>n(l.id),"aria-label":r(c?"Collapse":"Expand"),className:"-ml-0.5 flex size-[18px] shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:e.jsx(zt,{"aria-hidden":"true",className:x("size-3 transition-transform duration-150",c&&"rotate-90")})}):e.jsx("span",{"aria-hidden":"true",className:"flex size-[18px] shrink-0 items-center justify-center",children:e.jsx("span",{className:"size-1 rounded-full bg-foreground/30"})}),l.icon&&e.jsx("span",{className:"flex shrink-0 text-muted-foreground [&_svg]:size-3.5",children:l.icon}),e.jsx("span",{className:x("min-w-0 truncate text-[13px]",t===0?"font-medium text-foreground":"text-foreground/85"),children:l.label}),pe(l.meta)&&e.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:l.meta}),e.jsx("span",{className:"flex-1"}),l.progress!==void 0&&e.jsx(de,{value:l.progress,size:"xs",className:"w-14 shrink-0 sm:w-20"}),(l.value!==void 0||l.progress!==void 0)&&e.jsx("span",{className:"w-9 shrink-0 text-right text-[11px] tabular-nums text-muted-foreground",children:l.value??X(l.progress??0)})]}),i&&c&&l.children&&e.jsx(pr,{nodes:l.children,depth:t+1,expanded:a,toggle:n})]},l.id)})})}function gr({nodes:s,defaultCollapsed:t=[],className:a}){const[n,r]=C.useState(()=>{const i=hr(s,new Set);return t.forEach(c=>i.delete(c)),i}),l=i=>{r(c=>{const m=new Set(c);return m.has(i)?m.delete(i):m.add(i),m})};return e.jsx("div",{className:a,children:e.jsx(pr,{nodes:s,depth:0,expanded:n,toggle:l})})}function Ze({title:s,subtitle:t,legend:a,actions:n,table:r,footnote:l,bare:i=!1,className:c,children:m}){const{t:u}=as(),o=C.useId(),[d,f]=C.useState("chart");return e.jsxs("figure",{"aria-labelledby":o,className:x("flex min-w-0 flex-col",!i&&"rounded-xl border border-border/70 bg-background p-4",c),children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{id:o,className:"text-[13px] font-semibold leading-5 text-foreground",children:s}),t&&e.jsx("div",{className:"mt-0.5 text-xs leading-[18px] text-muted-foreground",children:t})]}),(n||r)&&e.jsxs("div",{className:"-mr-1 -mt-0.5 flex shrink-0 items-center gap-1",children:[n,r&&e.jsx(J,{size:"xs",label:u(d==="chart"?"Table":"Chart"),"aria-pressed":d==="table",onClick:()=>f(v=>v==="chart"?"table":"chart"),children:d==="chart"?e.jsx(Rn,{}):e.jsx(En,{})})]})]}),a&&d==="chart"&&e.jsx("div",{className:"mt-2",children:a}),e.jsx("div",{className:"mt-3 min-w-0",children:d==="table"&&r?e.jsx(ko,{data:r}):m}),l&&e.jsx("figcaption",{className:"mt-3 text-xs leading-5 text-muted-foreground",children:l})]})}function ko({data:s}){return e.jsx("div",{className:"max-h-72 overflow-auto scrollbar-app-thin",children:e.jsxs("table",{className:"w-full border-collapse text-xs",children:[e.jsx("thead",{className:"sticky top-0 bg-background",children:e.jsx("tr",{className:"border-b border-border/60",children:s.columns.map(t=>e.jsx("th",{scope:"col",className:x("h-7 px-2 font-medium text-muted-foreground first:pl-0 last:pr-0",t.align==="right"?"text-right":"text-left"),children:t.header},t.key))})}),e.jsx("tbody",{children:s.rows.map((t,a)=>e.jsx("tr",{className:"border-b border-border/40 last:border-0",children:s.columns.map(n=>e.jsx("td",{className:x("h-7 px-2 text-foreground/85 first:pl-0 last:pr-0",n.align==="right"?"text-right tabular-nums":"text-left"),children:t[n.key]},n.key))},a))})]})})}function Oe({x:s,y:t,containerWidth:a,containerHeight:n,title:r,rows:l,footer:i}){const c=s>a*.62,m=28+l.length*20+(i?24:0),u=n?Je(t-16,0,Math.max(0,n-m)):t;return e.jsxs("div",{"aria-hidden":"true",className:"pointer-events-none absolute z-10 min-w-[120px] max-w-[240px] rounded-lg border border-border bg-popover px-2.5 py-2 text-xs shadow-popover",style:{top:u,...c?{right:a-s+12}:{left:s+12}},children:[r&&e.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:r}),e.jsx("div",{className:"space-y-1",children:l.map((o,d)=>e.jsxs("div",{className:"flex items-center gap-2 whitespace-nowrap",children:[e.jsx(Xs,{swatch:o.swatch??"line",color:o.color??T.ink}),e.jsx("span",{className:"font-semibold tabular-nums text-foreground",children:o.value}),e.jsx("span",{className:"truncate text-muted-foreground",children:o.label})]},d))}),i&&e.jsx("div",{className:"mt-1.5 border-t border-border/60 pt-1.5 text-xs text-muted-foreground",children:i})]})}function So({id:s,color:t=T.plan,background:a=T.empty}){return e.jsxs("pattern",{id:s,width:"5",height:"5",patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)",children:[e.jsx("rect",{width:"5",height:"5",fill:a}),e.jsx("line",{x1:"0",y1:"0",x2:"0",y2:"5",stroke:t,strokeWidth:"1.2"})]})}function Qs({ticks:s,y:t,left:a,right:n,format:r}){return e.jsx("g",{children:s.map(l=>e.jsxs("g",{children:[e.jsx("line",{x1:a,x2:n,y1:Z(t(l)),y2:Z(t(l)),stroke:l===0?T.axis:T.grid,strokeWidth:1}),e.jsx("text",{x:a-8,y:t(l),dy:"0.32em",textAnchor:"end",className:"fill-muted-foreground text-[11px] tabular-nums",children:r(l)})]},l))})}function Zt({labels:s,x:t,y:a,width:n,minGap:r=44,activeIndex:l}){const i=Zr(s.length,n,r,l);return e.jsx("g",{children:s.map((c,m)=>i.has(m)&&e.jsx("text",{x:t(m),y:a,textAnchor:"middle",className:x("text-[11px] tabular-nums",l===m?"fill-foreground font-medium":"fill-muted-foreground"),children:c},m))})}function ks({children:s}){return e.jsx("div",{className:"sr-only","aria-live":"polite",children:s})}function is({height:s}){return e.jsx("div",{"aria-hidden":"true",style:{height:s}})}function fr(s){let t="",a=!1;for(const n of s){if(!n){a=!1;continue}t+=`${a?"L":"M"}${n[0].toFixed(1)},${n[1].toFixed(1)}`,a=!0}return t}function Co(s,t){const a=[];let n=[];for(const r of s)r?n.push(r):n.length&&(a.push(n),n=[]);return n.length&&a.push(n),a.filter(r=>r.length>1).map(r=>`${fr(r)}L${r[r.length-1][0].toFixed(1)},${t}L${r[0][0].toFixed(1)},${t}Z`)}function To(s){for(let t=s.length-1;t>=0;t--)if(s[t]!==null&&Number.isFinite(s[t]))return t;return-1}function jr({labels:s,series:t,height:a=220,formatValue:n=xe,marker:r,baseline:l,endLabels:i=!0,className:c,...m}){const[u,o]=$e(),[d,f]=C.useState(null),v=Vs("line-area"),h=s.length,b=t.flatMap(k=>k.values.filter(_=>_!==null&&Number.isFinite(_))),w=es(l?[...b,l.value]:b,{count:4}),g=r?24:14,N=Math.max(0,a-g-26),j=ge([w.min,w.max],[g+N,g]),z=t.map(k=>To(k.values)),L=t.map((k,_)=>z[_]>=0?n(k.values[z[_]]):""),U=t.map((k,_)=>z[_]>=0?j(k.values[z[_]]):null).filter(k=>k!==null).sort((k,_)=>k-_),P=U.some((k,_)=>_>0&&k-U[_-1]<14),B=i&&t.length<=4&&!P,G=Ie(w.ticks.map(n)),y=B?Ie(t.map((k,_)=>`${L[_]} ${k.label}`))+6:12,F=Math.max(0,o-G-y),R=k=>G+(h<=1?F/2:k/(h-1)*F),I=t.map(k=>k.values.map((_,K)=>_===null||!Number.isFinite(_)?null:[R(K),j(_)])),M=j(Math.max(w.min,0)),E=k=>{const _=k.currentTarget.getBoundingClientRect(),K=(k.clientX-_.left)/Math.max(1,_.width);f(Je(Math.round(K*(h-1)),0,Math.max(0,h-1)))},O=k=>{const _=Us(k.key,d,h);_!==void 0&&(k.preventDefault(),f(_))},q=(k,_)=>{const K=k.values[_];return K==null?"—":n(K)};return e.jsxs("div",{ref:u,className:x("relative w-full",c),children:[o===0?e.jsx(is,{height:a}):e.jsx("div",{role:"img","aria-label":m["aria-label"],tabIndex:0,onKeyDown:O,onBlur:()=>f(null),className:ys,children:e.jsxs("svg",{width:o,height:a,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:v,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:T.ink,stopOpacity:.1}),e.jsx("stop",{offset:"100%",stopColor:T.ink,stopOpacity:.01})]})}),e.jsx(Qs,{ticks:w.ticks,y:j,left:G,right:G+F,format:n}),l&&e.jsxs("g",{children:[e.jsx("line",{x1:G,x2:G+F,y1:Z(j(l.value)),y2:Z(j(l.value)),stroke:"var(--viz-4)",strokeWidth:1,strokeDasharray:"4 3"}),e.jsxs("text",{x:G+F,y:j(l.value)-5,textAnchor:"end",className:"fill-muted-foreground text-[11px] tabular-nums",children:[l.label," ",n(l.value)]})]}),t.map((k,_)=>k.area&&Co(I[_],M).map((K,Fe)=>e.jsx("path",{d:K,fill:`url(#${v})`},`${k.id}-area-${Fe}`))),t.map((k,_)=>{const K=k.variant??"ink";return e.jsx("path",{d:fr(I[_]),fill:"none",stroke:Me[K],strokeWidth:2,strokeDasharray:K==="plan"?"5 4":void 0,strokeLinecap:"round",strokeLinejoin:"round"},k.id)}),r&&r.index>=0&&r.index<h&&e.jsxs("g",{children:[e.jsx("line",{x1:Z(R(r.index)),x2:Z(R(r.index)),y1:g,y2:g+N,stroke:T.text,strokeOpacity:.35,strokeWidth:1}),e.jsx("rect",{x:R(r.index)-(r.label.length*11+10)/2,y:g-20,width:r.label.length*11+10,height:16,rx:4,fill:T.text}),e.jsx("text",{x:R(r.index),y:g-8,textAnchor:"middle",className:"fill-background text-[11px] font-medium",children:r.label})]}),t.map((k,_)=>{const K=k.variant??"ink",Fe=z[_];if(Fe<0)return null;const[Be,os]=I[_][Fe];return e.jsxs("g",{children:[K!=="plan"&&e.jsx("circle",{cx:Be,cy:os,r:4,fill:Me[K],stroke:T.surface,strokeWidth:2}),B&&e.jsxs("text",{x:Be+9,y:os,dy:"0.32em",className:"text-[11px] tabular-nums",children:[e.jsx("tspan",{className:"fill-foreground font-semibold",children:L[_]}),e.jsx("tspan",{dx:4,className:"fill-muted-foreground",children:k.label})]})]},`${k.id}-end`)}),d!==null&&e.jsxs("g",{children:[e.jsx("line",{x1:Z(R(d)),x2:Z(R(d)),y1:g,y2:g+N,stroke:T.axis,strokeWidth:1}),t.map((k,_)=>{const K=I[_][d];return K?e.jsx("circle",{cx:K[0],cy:K[1],r:4,fill:Me[k.variant??"ink"],stroke:T.surface,strokeWidth:2},k.id):null})]}),e.jsx(Zt,{labels:s,x:R,y:a-8,width:F,activeIndex:d}),e.jsx("rect",{x:G,y:g,width:F,height:N,fill:"transparent",onPointerMove:E,onPointerLeave:()=>f(null)})]})}),d!==null&&o>0&&e.jsx(Oe,{x:R(d),y:g+4,containerWidth:o,containerHeight:a,title:s[d],rows:t.map(k=>({label:k.label,value:q(k,d),color:Me[k.variant??"ink"],swatch:k.variant==="plan"?"dashed":"line"}))}),e.jsx(ks,{children:d!==null?`${s[d]}:${t.map(k=>`${k.label} ${q(k,d)}`).join(",")}`:""})]})}const us=2,br=24;function vr(s){const[t,a]=C.useState(null);return{active:t,setActive:a,handleKeyDown:r=>{const l=Us(r.key,t,s);l!==void 0&&(r.preventDefault(),a(l))}}}function Nr({labels:s,series:t,height:a=220,formatValue:n=xe,highlightIndex:r,baseline:l,className:i,...c}){const[m,u]=$e(),{active:o,setActive:d,handleKeyDown:f}=vr(s.length),v=Vs("bar-hatch"),h=s.length,b=t.flatMap(E=>E.values),w=es(l?[...b,l.value]:b,{count:4}),g=18,S=26,N=Ie(w.ticks.map(n)),j=Math.max(0,u-N-8),z=Math.max(0,a-g-S),L=ge([w.min,w.max],[g+z,g]),U=L(Math.max(0,w.min)),P=Pt(h,N,N+j,{paddingInner:.35,paddingOuter:.2}),B=Math.max(2,Math.min(br,(P.bandwidth-us*(t.length-1))/Math.max(1,t.length))),G=B*t.length+us*(t.length-1),y=r===void 0?h-1:r,F=(E="ink")=>E==="plan"?`url(#${v})`:E==="context"?T.context:T.ink,R=(E,O)=>P.center(E)-G/2+O*(B+us),I=E=>Math.min(...t.map(O=>L(Math.max(0,O.values[E]??0)))),M=(()=>{if(y===null||y<0||y>=h)return null;const E=Math.max(0,t.findIndex(K=>(K.variant??"ink")==="ink")),O=t[E]?.values[y]??0,q=n(O),k=L(Math.max(0,O)),_=Sa(q)<=B+us*2||k<=I(y);return{text:q,x:_?R(y,E)+B/2:P.center(y),y:(_?k:I(y))-6}})();return e.jsxs("div",{ref:m,className:x("relative w-full",i),onPointerLeave:()=>d(null),children:[u===0?e.jsx(is,{height:a}):e.jsx("div",{role:"img","aria-label":c["aria-label"],tabIndex:0,onKeyDown:f,onBlur:()=>d(null),className:ys,children:e.jsxs("svg",{width:u,height:a,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx("defs",{children:e.jsx(So,{id:v})}),e.jsx(Qs,{ticks:w.ticks,y:L,left:N,right:N+j,format:n}),s.map((E,O)=>e.jsxs("g",{opacity:o!==null&&o!==O?.4:1,className:"transition-opacity duration-150",children:[t.map((q,k)=>{const _=q.values[O]??0,K=L(Math.max(0,_));return e.jsx("path",{d:Lt(R(O,k),K,B,U-K,4),fill:F(q.variant)},q.id)}),M&&y===O&&e.jsx("text",{x:M.x,y:M.y,textAnchor:"middle",className:"fill-foreground text-[11px] font-semibold tabular-nums",children:M.text})]},E+O)),l&&e.jsxs("g",{children:[e.jsx("line",{x1:N,x2:N+j,y1:Z(L(l.value)),y2:Z(L(l.value)),stroke:"var(--viz-4)",strokeWidth:1,strokeDasharray:"4 3"}),e.jsxs("text",{x:N+j,y:L(l.value)-5,textAnchor:"end",className:"fill-muted-foreground text-[11px] tabular-nums",children:[l.label," ",n(l.value)]})]}),e.jsx(Zt,{labels:s,x:P.center,y:a-8,width:j,minGap:36,activeIndex:o}),s.map((E,O)=>e.jsx("rect",{x:P.center(O)-P.step/2,y:g,width:P.step,height:z,fill:"transparent",onPointerEnter:()=>d(O)},`hit-${E}-${O}`))]})}),o!==null&&u>0&&e.jsx(Oe,{x:P.center(o)+G/2,y:I(o),containerWidth:u,containerHeight:a,title:s[o],rows:t.map(E=>({label:E.label,value:n(E.values[o]??0),color:E.variant==="context"?T.context:T.ink,swatch:E.variant==="plan"?"hatch":"solid"}))}),e.jsx(ks,{children:o!==null?`${s[o]}:${t.map(E=>`${E.label} ${n(E.values[o]??0)}`).join(",")}`:""})]})}function yr({labels:s,segments:t,data:a,colors:n,height:r=220,formatValue:l=xe,highlightIndex:i,className:c,...m}){const{t:u}=as(),[o,d]=$e(),{active:f,setActive:v,handleKeyDown:h}=vr(s.length),b=s.length,w=n??ws(t.length),g=a.map(R=>R.reduce((I,M)=>I+M,0)),S=es(g,{count:4}),N=18,j=26,z=Ie(S.ticks.map(l)),L=Math.max(0,d-z-8),U=Math.max(0,r-N-j),P=ge([S.min,S.max],[N+U,N]),B=Pt(b,z,z+L,{paddingInner:.4,paddingOuter:.2}),G=Math.max(2,Math.min(br,B.bandwidth)),y=i===void 0?b-1:i,F=s.map((R,I)=>{const M=a[I]??[],E=[];let O=0,q=-1;for(let k=0;k<M.length;k++)M[k]>0&&(q=k);for(let k=0;k<M.length;k++){const _=M[k];if(_<=0)continue;const K=P(O),Fe=O===0;O+=_;const Be=P(O),os=Fe?K:K-us;os-Be>0&&E.push({segmentIndex:k,top:Be,height:os-Be,rounded:k===q})}return{key:`${R}-${I}`,index:I,x:B.center(I)-G/2,parts:E}});return e.jsxs("div",{ref:o,className:x("relative w-full",c),onPointerLeave:()=>v(null),children:[d===0?e.jsx(is,{height:r}):e.jsx("div",{role:"img","aria-label":m["aria-label"],tabIndex:0,onKeyDown:h,onBlur:()=>v(null),className:ys,children:e.jsxs("svg",{width:d,height:r,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx(Qs,{ticks:S.ticks,y:P,left:z,right:z+L,format:l}),F.map(R=>e.jsxs("g",{opacity:f!==null&&f!==R.index?.4:1,className:"transition-opacity duration-150",children:[R.parts.map(I=>I.rounded?e.jsx("path",{d:Lt(R.x,I.top,G,I.height,4),fill:w[I.segmentIndex]},I.segmentIndex):e.jsx("rect",{x:R.x,y:I.top,width:G,height:I.height,fill:w[I.segmentIndex]},I.segmentIndex)),y===R.index&&e.jsx("text",{x:B.center(R.index),y:P(g[R.index])-6,textAnchor:"middle",className:"fill-foreground text-[11px] font-semibold tabular-nums",children:l(g[R.index])})]},R.key)),e.jsx(Zt,{labels:s,x:B.center,y:r-8,width:L,minGap:36,activeIndex:f}),s.map((R,I)=>e.jsx("rect",{x:B.center(I)-B.step/2,y:N,width:B.step,height:U,fill:"transparent",onPointerEnter:()=>v(I)},`hit-${R}-${I}`))]})}),f!==null&&d>0&&e.jsx(Oe,{x:B.center(f)+G/2,y:P(g[f]),containerWidth:d,containerHeight:r,title:s[f],rows:t.map((R,I)=>({label:R.label,value:l(a[f]?.[I]??0),color:w[I],swatch:"solid"})).reverse(),footer:`${u("Total")} ${l(g[f])}`}),e.jsx(ks,{children:f!==null?`${s[f]}:${t.map((R,I)=>`${R.label} ${l(a[f]?.[I]??0)}`).join(",")}`:""})]})}const aa=15;function na(s){return s.start===0?0:(s.end-s.start)/Math.abs(s.start)}function wr({items:s,startLabel:t,endLabel:a,height:n=240,formatValue:r=xe,formatChange:l,className:i,...c}){const[m,u]=$e(),[o,d]=C.useState(null),f=M=>l?l(M):It(na(M)),v=s.map(M=>`${M.label} ${r(M.start)}`),h=s.map(M=>`${r(M.end)} ${M.label} ${f(M)}`),b=Math.min(Ie(v),u*.3),w=Math.min(Ie(h),u*.4),g=b+6,S=Math.max(g+40,u-w-6),N=30,j=12,z=s.flatMap(M=>[M.start,M.end]),L=Math.min(...z),U=Math.max(...z),P=(U-L||1)*.06,B=ge([L-P,U+P],[n-j,N]),G=rt(s.map(M=>B(M.start)),aa,[N,n-j]),y=rt(s.map(M=>B(M.end)),aa,[N,n-j]),F=M=>o!==null?o===M:!!s[M].emphasis,R=s.map((M,E)=>E).sort((M,E)=>Number(F(M))-Number(F(E))),I=M=>{const E=Us(M.key,o,s.length,"y");E!==void 0&&(M.preventDefault(),d(E))};return e.jsxs("div",{ref:m,className:x("relative w-full",i),children:[u===0?e.jsx(is,{height:n}):e.jsx("div",{role:"img","aria-label":c["aria-label"],tabIndex:0,onKeyDown:I,onBlur:()=>d(null),className:ys,children:e.jsxs("svg",{width:u,height:n,className:"block overflow-visible","aria-hidden":"true",onPointerLeave:()=>d(null),children:[e.jsx("text",{x:g,y:12,textAnchor:"middle",className:"fill-muted-foreground text-[11px]",children:t}),e.jsx("text",{x:S,y:12,textAnchor:"middle",className:"fill-muted-foreground text-[11px]",children:a}),e.jsx("line",{x1:Z(g),x2:Z(g),y1:N-8,y2:n-j+4,stroke:T.grid}),e.jsx("line",{x1:Z(S),x2:Z(S),y1:N-8,y2:n-j+4,stroke:T.grid}),R.map(M=>{const E=s[M],O=F(M),q=O?T.ink:T.context,k=B(E.start),_=B(E.end),K=na(E);return e.jsxs("g",{onPointerEnter:()=>d(M),children:[e.jsx("line",{x1:g,y1:k,x2:S,y2:_,stroke:"transparent",strokeWidth:14}),e.jsx("line",{x1:g,y1:k,x2:S,y2:_,stroke:q,strokeWidth:O?2:1.5,strokeLinecap:"round"}),e.jsx("circle",{cx:g,cy:k,r:O?4:3,fill:q,stroke:T.surface,strokeWidth:2}),e.jsx("circle",{cx:S,cy:_,r:O?4:3,fill:q,stroke:T.surface,strokeWidth:2}),Math.abs(G[M]-k)>1.5&&e.jsx("line",{x1:g-5,y1:k,x2:g-9,y2:G[M],stroke:T.axis}),e.jsxs("text",{x:g-11,y:G[M],dy:"0.32em",textAnchor:"end",className:"text-[11px] tabular-nums",children:[e.jsx("tspan",{className:O?"fill-foreground font-medium":"fill-muted-foreground",children:E.label}),e.jsx("tspan",{dx:4,className:O?"fill-foreground font-semibold":"fill-muted-foreground",children:r(E.start)})]}),Math.abs(y[M]-_)>1.5&&e.jsx("line",{x1:S+5,y1:_,x2:S+9,y2:y[M],stroke:T.axis}),e.jsxs("text",{x:S+11,y:y[M],dy:"0.32em",className:"text-[11px] tabular-nums",children:[e.jsx("tspan",{className:O?"fill-foreground font-semibold":"fill-muted-foreground",children:r(E.end)}),e.jsx("tspan",{dx:4,className:O?"fill-foreground font-medium":"fill-muted-foreground",children:E.label}),e.jsx("tspan",{dx:4,className:x(O?K>0?"fill-success-ink":K<0?"fill-destructive-ink":"fill-muted-foreground":"fill-muted-foreground"),children:f(E)})]})]},E.id)})]})}),o!==null&&u>0&&e.jsx(Oe,{x:S,y:B(s[o].end),containerWidth:u,containerHeight:n,title:s[o].label,rows:[{label:t,value:r(s[o].start),color:T.context},{label:a,value:r(s[o].end),color:T.ink}],footer:f(s[o])}),e.jsx(ks,{children:o!==null?`${s[o].label}:${t} ${r(s[o].start)},${a} ${r(s[o].end)},${f(s[o])}`:""})]})}function kt({segments:s,size:t=136,thickness:a=14,centerValue:n,centerLabel:r,formatValue:l=xe,className:i,...c}){const[m,u]=C.useState(null),o=s.reduce((j,z)=>j+z.value,0),d=ws(s.length),f=j=>s[j].color??d[j],v=t/2,h=t/2,b=h-a,w=s.length>1?2/(h-a/2):0,g=[];let S=0;for(let j=0;j<s.length;j++){const z=o>0?s[j].value/o*Math.PI*2:0,L=S+w/2,U=S+z-w/2;S+=z,g.push({index:j,d:U>L?Pa(v,v,h,b,L,U):""})}const N=m!==null?s[m]:null;return e.jsxs("div",{className:x("flex flex-wrap items-center gap-x-6 gap-y-4",i),children:[e.jsxs("div",{className:"relative shrink-0",style:{width:t,height:t},children:[e.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,role:"img","aria-label":c["aria-label"],onPointerLeave:()=>u(null),children:[e.jsx("circle",{cx:v,cy:v,r:h-a/2,fill:"none",stroke:T.empty,strokeWidth:a,opacity:o>0?0:1}),g.map(j=>j.d&&e.jsx("path",{d:j.d,fill:f(j.index),opacity:m!==null&&m!==j.index?.3:1,className:"transition-opacity duration-150",onPointerEnter:()=>u(j.index)},s[j.index].id))]}),e.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center text-center",children:[e.jsx("span",{className:"text-[22px] font-semibold leading-7 tracking-tight text-foreground",children:N?l(N.value):n??l(o)}),e.jsx("span",{className:"max-w-[80%] truncate text-xs leading-[18px] text-muted-foreground",children:N?`${N.label} · ${X(o?N.value/o:0)}`:r})]})]}),e.jsx("table",{className:"min-w-[160px] flex-1 border-collapse text-xs",children:e.jsx("tbody",{children:s.map((j,z)=>e.jsxs("tr",{onPointerEnter:()=>u(z),onPointerLeave:()=>u(null),className:x("transition-opacity duration-150",m!==null&&m!==z&&"opacity-40"),children:[e.jsx("td",{className:"h-7 w-4 pr-2",children:e.jsx(Xs,{color:f(z)})}),e.jsx("td",{className:"h-7 truncate pr-3 text-foreground/85",children:j.label}),e.jsx("td",{className:"h-7 pr-3 text-right font-medium tabular-nums text-foreground",children:l(j.value)}),e.jsx("td",{className:"h-7 w-10 text-right tabular-nums text-muted-foreground",children:X(o?j.value/o:0)})]},j.id))})})]})}function kr({value:s,secondary:t=0,cellSize:a=10,className:n,...r}){const l=Math.round(Math.min(1,Math.max(0,s))*100),i=Math.min(100-l,Math.round(Math.max(0,t)*100));return e.jsx("div",{role:"img","aria-label":r["aria-label"],className:x("grid w-max grid-cols-10 gap-[2px]",n),children:Array.from({length:100}).map((c,m)=>e.jsx("span",{"aria-hidden":"true",className:x("rounded-[2px]",m<l?"bg-viz-6":m<l+i?"hatch bg-viz-0 text-viz-3":"bg-viz-0"),style:{width:a,height:a}},m))})}function Sr({items:s,formatValue:t=xe,max:a,showRank:n=!0,className:r,...l}){const[i,c]=C.useState(null),m=a??Math.max(1,...s.map(u=>u.value));return e.jsx("ol",{"aria-label":l["aria-label"],className:x("flex flex-col",r),onPointerLeave:()=>c(null),children:s.map((u,o)=>e.jsxs("li",{onPointerEnter:()=>c(u.id),className:x("grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 py-1.5 transition-opacity duration-150",!n&&"grid-cols-[minmax(0,1fr)_auto]",i!==null&&i!==u.id&&"opacity-45"),children:[n&&e.jsx("span",{className:x("w-5 text-[11px] font-semibold tabular-nums",o<3?"text-foreground":"text-muted-foreground"),children:String(o+1).padStart(2,"0")}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[u.icon&&e.jsx("span",{className:"flex shrink-0 [&_svg]:size-3.5",children:u.icon}),e.jsx("span",{className:"truncate text-[13px] text-foreground/90",children:u.label}),pe(u.meta)&&e.jsx("span",{className:"shrink-0 truncate text-[11px] text-muted-foreground",children:u.meta})]}),e.jsx("div",{className:"mt-1 h-1.5 w-full",children:e.jsx("div",{className:"h-full rounded-r-[3px] bg-viz-6 transition-[width] duration-500 ease-enter motion-reduce:transition-none",style:{width:`max(2px, ${u.value/m*100}%)`}})})]}),e.jsx("span",{className:"text-right text-[13px] font-semibold tabular-nums text-foreground",children:t(u.value)})]},u.id))})}function Cr({stages:s,formatValue:t=xe,className:a,...n}){const r=s[0]?.value||1,l=Math.max(1,...s.map(u=>u.value)),i=ws(s.length).slice().reverse(),c=s.map((u,o)=>o===0?1:s[o-1].value?u.value/s[o-1].value:0),m=c.slice(1).reduce((u,o,d)=>o<c[u+1]?d:u,0)+1;return e.jsx("div",{role:"img","aria-label":n["aria-label"],className:x("flex flex-col",a),children:s.map((u,o)=>{const d=u.value/l,f=o<s.length-1?s[o+1].value/l:d;return e.jsxs("div",{children:[e.jsxs("div",{className:"grid grid-cols-[5.5rem_minmax(0,1fr)_4.5rem] items-center gap-3",children:[e.jsx("span",{className:"truncate text-xs text-foreground/85",children:u.label}),e.jsx("div",{className:"flex h-6 justify-center",children:e.jsx("div",{className:"h-full rounded-[4px]",style:{width:`${d*100}%`,background:i[o]}})}),e.jsxs("span",{className:"text-right",children:[e.jsx("span",{className:"block text-[13px] font-semibold leading-4 tabular-nums text-foreground",children:t(u.value)}),e.jsx("span",{className:"block text-[11px] leading-[14px] tabular-nums text-muted-foreground",children:X(u.value/r)})]})]}),o<s.length-1&&e.jsxs("div",{className:"grid grid-cols-[5.5rem_minmax(0,1fr)_4.5rem] items-center gap-3",children:[e.jsx("span",{}),e.jsxs("div",{className:"relative flex h-5 items-center justify-center",children:[e.jsx("svg",{viewBox:"0 0 100 10",preserveAspectRatio:"none",className:"absolute inset-0 size-full","aria-hidden":"true",children:e.jsx("polygon",{points:`${50-d*50},0 ${50+d*50},0 ${50+f*50},10 ${50-f*50},10`,fill:T.empty})}),e.jsxs("span",{className:x("relative text-[11px] leading-none tabular-nums",o+1===m?"font-medium text-warning-ink":"text-foreground/70"),children:["↓ ",X(c[o+1])]})]}),e.jsx("span",{})]})]},u.id)})})}function Mo(s){return s>=4?"text-white":"text-foreground/80"}function St({steps:s=[0,1,3,4,6],className:t}){const{t:a}=as();return e.jsxs("span",{className:x("inline-flex items-center gap-1.5 text-xs text-muted-foreground",t),children:[a("Less"),e.jsx("span",{className:"flex gap-[2px]","aria-hidden":"true",children:s.map(n=>e.jsx("span",{className:"size-2.5 rounded-[2px]",style:{background:Le[n]}},n))}),a("More")]})}function Tr({rows:s,columns:t,data:a,corner:n,formatValue:r=xe,max:l,showValues:i=!0,className:c,...m}){const u=l??Math.max(1,...a.flat());return e.jsx("div",{className:x("overflow-x-auto scrollbar-app-thin",c),children:e.jsxs("table",{"aria-label":m["aria-label"],className:"border-separate border-spacing-[2px] text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"pr-2 text-left font-normal text-muted-foreground",children:n}),t.map(o=>e.jsx("th",{scope:"col",className:"h-6 min-w-9 px-1 text-center font-normal text-muted-foreground",children:o},o))]})}),e.jsx("tbody",{children:s.map((o,d)=>{const{name:f,label:v}=typeof o=="string"?{name:o,label:o}:o;return e.jsxs("tr",{children:[e.jsx("th",{scope:"row",className:"whitespace-nowrap pr-2 text-left font-normal text-foreground/85",children:e.jsx("span",{className:"block max-w-40 truncate",children:v??f})}),t.map((h,b)=>{const w=a[d]?.[b]??0,g=Os(w,u,7);return e.jsx("td",{title:`${f} · ${h}:${r(w)}`,className:x("h-7 min-w-9 rounded-[3px] px-1 text-center tabular-nums transition-shadow hover:ring-2 hover:ring-foreground/70",Mo(g)),style:{background:Le[g]},children:i?r(w):e.jsx("span",{className:"sr-only",children:r(w)})},h)})]},d)})})]})})}const Ss=[0,1,3,4,6];function Mr({start:s,values:t,describe:a,locale:n,className:r,...l}){const[i,c]=$e(),[m,u]=C.useState(null),o=(s.getDay()+6)%7,d=Math.ceil((t.length+o)/7),f=22,v=2,h=Je(Math.floor((c-f)/d)-v,6,13),b=h+v,w=16,g=w+b*7,S=Math.max(1,...t),N=new Intl.DateTimeFormat(n,{month:"short"}),j=new Intl.DateTimeFormat(n,{weekday:"narrow"}),z=P=>we(s,P),L=[];for(let P=0;P<t.length;P++){const B=z(P);if(B.getDate()===1){const G=Math.floor((P+o)/7);(!L.length||G-L[L.length-1].week>=3)&&L.push({week:G,label:N.format(B)})}}const U=we(s,-o);return e.jsxs("div",{ref:i,className:x("relative w-full",r),onPointerLeave:()=>u(null),children:[c===0?e.jsx(is,{height:g}):e.jsxs("svg",{width:f+d*b,height:g,role:"img","aria-label":l["aria-label"],className:"block",children:[L.map(P=>e.jsx("text",{x:f+P.week*b,y:10,className:"fill-muted-foreground text-[11px]",children:P.label},P.week)),[0,2,4].map(P=>e.jsx("text",{x:0,y:w+P*b+h/2,dy:"0.32em",className:"fill-muted-foreground text-[11px]",children:j.format(we(U,P))},P)),t.map((P,B)=>{const G=B+o,y=Math.floor(G/7),F=G%7,R=Ss[Os(P,S,Ss.length)],I=f+y*b,M=w+F*b;return e.jsx("rect",{x:I,y:M,width:h,height:h,rx:2,fill:Le[R],stroke:m?.index===B?T.text:"none",strokeWidth:1.5,onPointerEnter:()=>u({x:I+h,y:M,index:B})},B)})]}),m&&c>0&&e.jsx(Oe,{x:m.x,y:m.y,containerWidth:c,containerHeight:g,rows:[{label:a?a(z(m.index),t[m.index]):z(m.index).toLocaleDateString(n),value:t[m.index],swatch:"solid",color:Le[Ss[Os(t[m.index],S,Ss.length)]]}]})]})}function Ar({points:s,xLabel:t,yLabel:a,height:n=240,formatX:r=xe,formatY:l=xe,className:i,...c}){const[m,u]=$e(),[o,d]=C.useState(null),f=es(s.map(y=>y.x),{count:5}),v=es(s.map(y=>y.y),{count:4}),h=Ie(v.ticks.map(l)),b=18,w=36,S=Math.max(0,u-h-12),N=Math.max(0,n-b-w),j=ge([f.min,f.max],[h,h+S]),z=ge([v.min,v.max],[b+N,b]),L=s.some(y=>y.emphasis),U=s.find(y=>y.id===o),P=[...s].sort((y,F)=>+!!y.emphasis-+!!F.emphasis),B=[...s].sort((y,F)=>y.x-F.x||y.y-F.y),G=y=>{const F=B.findIndex(I=>I.id===o),R=Us(y.key,F===-1?null:F,B.length);R!==void 0&&(y.preventDefault(),d(B[R].id))};return e.jsxs("div",{ref:m,className:x("relative w-full",i),onPointerLeave:()=>d(null),children:[u===0?e.jsx(is,{height:n}):e.jsx("div",{role:"img","aria-label":c["aria-label"],tabIndex:0,onKeyDown:G,onBlur:()=>d(null),className:ys,children:e.jsxs("svg",{width:u,height:n,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx(Qs,{ticks:v.ticks,y:z,left:h,right:h+S,format:l}),f.ticks.map(y=>e.jsxs("g",{children:[e.jsx("line",{x1:Z(j(y)),x2:Z(j(y)),y1:b,y2:b+N,stroke:y===f.min?T.axis:T.grid}),e.jsx("text",{x:j(y),y:b+N+16,textAnchor:"middle",className:"fill-muted-foreground text-[11px] tabular-nums",children:r(y)})]},y)),e.jsxs("text",{x:h+S,y:n-2,textAnchor:"end",className:"fill-muted-foreground text-[11px]",children:[t," →"]}),e.jsxs("text",{x:h,y:b-6,textAnchor:"start",className:"fill-muted-foreground text-[11px]",children:["↑ ",a]}),P.map(y=>{const F=!L||y.emphasis||y.id===o;return e.jsxs("g",{onPointerEnter:()=>d(y.id),children:[e.jsx("circle",{cx:j(y.x),cy:z(y.y),r:12,fill:"transparent"}),e.jsx("circle",{cx:j(y.x),cy:z(y.y),r:y.id===o?5:4,fill:F?T.ink:T.context,stroke:T.surface,strokeWidth:2})]},y.id)}),P.map(y=>{if(!y.emphasis||!y.label)return null;const F=j(y.x),R=F+9+Sa(y.label)>h+S;return e.jsx("text",{x:R?F-9:F+9,y:z(y.y)+4,textAnchor:R?"end":"start",stroke:T.surface,strokeWidth:3,strokeLinejoin:"round",paintOrder:"stroke",className:"pointer-events-none fill-foreground text-[11px]",children:y.label},`label-${y.id}`)})]})}),U&&u>0&&e.jsx(Oe,{x:j(U.x),y:z(U.y),containerWidth:u,containerHeight:n,title:U.label,rows:[{label:t,value:r(U.x),swatch:"dot"},{label:a,value:l(U.y),swatch:"dot"}]}),e.jsx(ks,{children:U?`${U.label?`${U.label}:`:""}${t} ${r(U.x)},${a} ${l(U.y)}`:""})]})}function Er({tasks:s,start:t,days:a,today:n,locale:r,className:l,...i}){const{t:c}=as(),m=h=>`${h/a*100}%`,u=[],o=[],d=new Intl.DateTimeFormat(r,{month:"short"});for(let h=0;h<a;h++){const b=we(t,h);b.getDay()===1&&u.push(h),(h===0||b.getDate()===1)&&o.push({day:h,label:d.format(b)})}const f=n!==void 0&&n>=0&&n<a,v=f&&e.jsx("span",{"aria-hidden":"true",className:"absolute inset-y-0 w-px bg-foreground/50",style:{left:m(n+.5)}});return e.jsxs("div",{role:"table","aria-label":i["aria-label"],className:x("text-xs",l),children:[e.jsxs("div",{role:"row",className:"grid grid-cols-[minmax(7rem,9rem)_minmax(0,1fr)] border-b border-border/60",children:[e.jsx("div",{role:"columnheader",className:"h-8"}),e.jsxs("div",{role:"columnheader",className:"relative h-8",children:[o.map(h=>e.jsx("span",{className:"absolute top-1 text-[11px] font-medium text-foreground/80",style:{left:m(h.day)},children:h.label},h.day)),u.map(h=>e.jsx("span",{className:"absolute bottom-0.5 -translate-x-1/2 text-[11px] tabular-nums text-muted-foreground",style:{left:m(h)},children:we(t,h).getDate()},h)),f&&e.jsx("span",{className:"absolute -bottom-px z-[1] -translate-x-1/2 rounded bg-foreground px-1 py-px text-[11px] font-medium leading-[13px] text-background",style:{left:m(n+.5)},children:c("Today")})]})]}),s.map(h=>{const b=Math.min(1,Math.max(0,h.progress)),w=f&&h.end<n&&b<1,g=(h.end+1)/a>.86;return e.jsxs("div",{role:"row",className:"group grid grid-cols-[minmax(7rem,9rem)_minmax(0,1fr)]",children:[e.jsxs("div",{role:"rowheader",className:"flex min-w-0 flex-col justify-center py-1.5 pr-3",children:[e.jsx("span",{className:"truncate text-xs text-foreground/90",children:h.label}),h.meta&&e.jsx("span",{className:"truncate text-xs text-muted-foreground",children:h.meta})]}),e.jsxs("div",{role:"cell",className:"relative h-11 transition-colors group-hover:bg-foreground/[0.02]",children:[u.map(S=>e.jsx("span",{"aria-hidden":"true",className:"absolute inset-y-0 w-px bg-viz-grid",style:{left:m(S)}},S)),v,e.jsxs("div",{title:`${h.label} · ${X(b)}`,className:"absolute top-1/2 flex h-2.5 -translate-y-1/2 overflow-hidden rounded-[3px]",style:{left:m(h.start),width:m(h.end-h.start+1)},children:[e.jsx("span",{className:"h-full bg-viz-6",style:{width:`${b*100}%`}}),e.jsx("span",{className:x("hatch h-full flex-1",w?"bg-destructive/10 text-destructive/60":"bg-viz-0 text-viz-3")})]}),e.jsx("span",{className:x("absolute top-1/2 -translate-y-1/2 whitespace-nowrap text-[11px] tabular-nums",w?"font-medium text-destructive-ink":"text-muted-foreground"),style:g?{right:`calc(${(1-h.start/a)*100}% + 6px)`}:{left:`calc(${m(h.end+1)} + 6px)`},children:X(b)})]})]},h.id)})]})}function Ao(s){return`${s.getFullYear()}-${String(s.getMonth()+1).padStart(2,"0")}-${String(s.getDate()).padStart(2,"0")}`}function _r({year:s,month:t,events:a,today:n,locale:r,maxPerDay:l=2,className:i}){const m=(new Date(s,t,1).getDay()+6)%7,u=new Date(s,t,1-m),o=new Intl.DateTimeFormat(r,{weekday:"short"}),d=new Map;for(const v of a){const h=d.get(v.date)??[];h.push(v),d.set(v.date,h)}const f=Array.from({length:42},(v,h)=>new Date(u.getFullYear(),u.getMonth(),u.getDate()+h));return e.jsxs("div",{className:x("overflow-hidden rounded-lg border border-border/70",i),children:[e.jsx("div",{className:"grid grid-cols-7 border-b border-border/60 bg-foreground/[0.015]",children:f.slice(0,7).map(v=>e.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:o.format(v)},v.getDay()))}),e.jsx("div",{className:"grid grid-cols-7",children:f.map((v,h)=>{const b=Ao(v),w=v.getMonth()===t,g=b===n,S=d.get(b)??[];return e.jsxs("div",{className:x("min-h-[84px] border-border/60 p-1.5",h%7!==6&&"border-r",h<35&&"border-b",!w&&"bg-foreground/[0.015]"),children:[e.jsx("span",{className:x("inline-flex size-5 items-center justify-center rounded-full text-[11px] tabular-nums",g?"bg-primary font-semibold text-primary-foreground":w?"text-foreground/80":"text-muted-foreground"),children:v.getDate()}),e.jsxs("ul",{className:"mt-1 space-y-0.5",children:[S.slice(0,l).map(N=>e.jsxs("li",{className:x("flex min-w-0 items-center gap-1 text-xs leading-[18px]",!w&&"opacity-50"),children:[e.jsx("span",{"aria-hidden":"true",className:x("h-2.5 w-0.5 shrink-0 rounded-full",N.tone?bs[N.tone]:"bg-viz-6")}),N.time&&e.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:N.time}),e.jsx("span",{className:"truncate text-foreground/85",children:N.title})]},N.id)),S.length>l&&e.jsxs("li",{className:"pl-1.5 text-[11px] leading-4 text-muted-foreground",children:["+",S.length-l]})]})]},b)})})]})}const Eo={none:"",sm:"px-3 pb-3",md:"px-4 pb-4"};function _o({title:s,description:t,actions:a,footer:n,variant:r="plain",padding:l="md",className:i,children:c,...m}){const u=!!(s||a);return e.jsxs("section",{"data-slot":"panel",className:x("flex min-w-0 flex-col rounded-xl border",r==="plain"?"border-border/70 bg-background":"border-border/60 bg-muted/40",i),...m,children:[u&&e.jsxs("header",{className:x("flex items-start justify-between gap-3 pb-2.5 pt-3.5",l==="sm"?"px-3":"px-4"),children:[e.jsxs("div",{className:"min-w-0",children:[s&&e.jsx("h3",{className:"truncate text-[13px] font-semibold leading-5 text-foreground",children:s}),t&&e.jsx("p",{className:"mt-0.5 text-xs leading-[18px] text-muted-foreground",children:t})]}),a&&e.jsx("div",{className:"-mr-1 -mt-0.5 flex shrink-0 items-center gap-1",children:a})]}),e.jsx("div",{className:x("min-w-0 flex-1",Eo[l],!u&&l!=="none"&&(l==="sm"?"pt-3":"pt-4")),children:c}),n&&e.jsx("footer",{className:"border-t border-border/60 px-4 py-2.5 text-xs text-muted-foreground",children:n})]})}function hs({label:s,value:t,unit:a,icon:n,delta:r,trend:l,footnote:i,className:c}){return e.jsxs("div",{className:x("flex min-w-0 flex-col gap-1 bg-background p-4",c),children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground [&_svg]:size-3.5",children:[n,e.jsx("span",{className:"truncate",children:s})]}),e.jsxs("div",{className:"flex items-end justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 items-baseline gap-1",children:[e.jsx("span",{className:"truncate text-[26px] font-semibold leading-8 tracking-tight text-foreground",children:t}),pe(a)&&e.jsx("span",{className:"shrink-0 text-[13px] text-muted-foreground",children:a})]}),l&&e.jsx(Xt,{values:l,area:!0,width:76,height:28,className:"mb-1"})]}),(r||i)&&e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r&&e.jsx(oe,{...r}),i&&e.jsx("span",{className:"truncate text-xs text-muted-foreground",children:i})]})]})}function zr({className:s,...t}){return e.jsx("div",{className:x("grid gap-px overflow-hidden rounded-xl border border-border/70 bg-border/60 sm:grid-cols-2 xl:grid-cols-4",s),...t})}function Dr({value:s,unit:t,label:a,delta:n,caption:r,className:l}){return e.jsxs("div",{className:x("flex flex-col gap-1.5",l),children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:a}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-[56px] font-semibold leading-none tracking-tight text-foreground",children:s}),pe(t)&&e.jsx("span",{className:"text-xl font-medium text-muted-foreground",children:t})]}),(n||r)&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n&&e.jsx(oe,{size:"md",...n}),pe(r)&&e.jsx("span",{className:"text-xs text-muted-foreground",children:r})]})]})}function Ds({label:s,value:t,max:a,formatValue:n=c=>ue(c,{compact:!0}),warningAt:r=.7,dangerAt:l=.9,className:i}){const c=a>0?t/a:0,m=c>=l?"danger":c>=r?"warning":"ink";return e.jsxs("div",{className:x("flex flex-col gap-1.5",i),children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3 text-xs",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-1 text-foreground/85",children:[m!=="ink"&&e.jsx(Ns,{"aria-hidden":"true",className:x("size-3 shrink-0",m==="danger"?"text-destructive":"text-warning")}),e.jsx("span",{className:"truncate",children:s})]}),e.jsxs("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:[n(t)," / ",n(a),e.jsx("span",{className:x("ml-1.5 font-medium",m==="danger"?"text-destructive-ink":m==="warning"?"text-warning-ink":"text-foreground/80"),children:X(c)})]})]}),e.jsx(de,{value:t,max:a,tone:m,"aria-label":typeof s=="string"?s:void 0})]})}function Ct({code:s,title:t,meta:a,health:n,progress:r,keyResults:l,className:i}){return e.jsxs("article",{className:x("rounded-xl border border-border/70 bg-background p-4",i),children:[e.jsxs("header",{className:"flex items-start gap-3",children:[e.jsx(_e,{value:r,size:44,thickness:4}),e.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[s&&e.jsx("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:s}),e.jsx("h4",{className:"truncate text-sm font-semibold leading-5 text-foreground",children:t})]}),pe(a)&&e.jsx("p",{className:"truncate text-xs leading-[18px] text-muted-foreground",children:a})]}),n&&e.jsx(Qt,{health:n,className:"mt-0.5"})]}),e.jsx("ul",{className:"mt-3 flex flex-col gap-2.5",children:l.map(c=>e.jsxs("li",{children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[c.code&&e.jsx("span",{className:"w-7 shrink-0 font-mono text-[10px] text-muted-foreground",children:c.code}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground/85",children:c.title}),pe(c.current)&&e.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:c.current}),e.jsx("span",{className:"w-9 shrink-0 text-right text-xs font-semibold tabular-nums text-foreground",children:X(c.progress)})]}),e.jsx(de,{value:c.progress,expected:c.expected,size:"xs",className:x("mt-1.5",c.code&&"ml-9 w-[calc(100%-2.25rem)]")})]},c.id))})]})}function ra(s,t){if(t.sortValue)return t.sortValue(s);const a=s[t.key];return typeof a=="number"||typeof a=="string"?a:""}function Rr({columns:s,rows:t,rowKey:a,density:n="compact",defaultSort:r,selectedKey:l,onRowClick:i,loading:c=!1,empty:m,caption:u,className:o}){const[d,f]=C.useState(r??null),v=(()=>{if(!d)return t;const g=s.find(N=>N.key===d.key);if(!g)return t;const S=d.direction==="asc"?1:-1;return[...t].sort((N,j)=>{const z=ra(N,g),L=ra(j,g);return typeof z=="number"&&typeof L=="number"?(z-L)*S:String(z).localeCompare(String(L),void 0,{numeric:!0})*S})})(),h=g=>{f(S=>!S||S.key!==g?{key:g,direction:"desc"}:S.direction==="desc"?{key:g,direction:"asc"}:null)},b=n==="compact"?"h-9":"h-11",w=g=>g.numeric||g.align==="right"?"text-right":g.align==="center"?"text-center":"text-left";return e.jsx("div",{className:x("overflow-x-auto scrollbar-app-thin",o),children:e.jsxs("table",{className:"w-full border-collapse text-[13px]",children:[u&&e.jsx("caption",{className:"sr-only",children:u}),e.jsx("thead",{children:e.jsx("tr",{className:"border-b border-border/70",children:s.map(g=>{const S=d?.key===g.key,N=S?d?.direction==="asc"?Ws:ka:Mn;return e.jsx("th",{scope:"col",style:g.width?{width:g.width}:void 0,"aria-sort":S?d?.direction==="asc"?"ascending":"descending":void 0,className:x("h-8 whitespace-nowrap px-3 text-xs font-medium text-muted-foreground first:pl-2 last:pr-2",w(g)),children:g.sortable?e.jsxs("button",{type:"button",onClick:()=>h(g.key),className:x("group inline-flex items-center gap-1 rounded transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",(g.numeric||g.align==="right")&&"flex-row-reverse",S&&"text-foreground"),children:[g.header,e.jsx(N,{"aria-hidden":"true",className:x("size-3",S?"opacity-100":"opacity-0 group-hover:opacity-60 group-focus-visible:opacity-60")})]}):g.header},g.key)})})}),e.jsx("tbody",{children:c?Array.from({length:4}).map((g,S)=>e.jsx("tr",{className:"border-b border-border/40",children:s.map(N=>e.jsx("td",{className:x(b,"px-3 first:pl-2 last:pr-2"),children:e.jsx(qe,{className:x("h-2.5",N.numeric?"ml-auto w-10":"w-3/4")})},N.key))},S)):v.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:s.length,className:"py-2",children:m})}):v.map(g=>{const S=a(g),N=l===S;return e.jsx("tr",{"aria-selected":i?N:void 0,tabIndex:i?0:void 0,onClick:i?()=>i(g):void 0,onKeyDown:i?j=>{j.key==="Enter"&&i(g)}:void 0,className:x("border-b border-border/40 transition-colors last:border-0",i&&"cursor-pointer outline-none focus-visible:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/60",N?"bg-accent":"hover:bg-accent/60"),children:s.map(j=>e.jsx("td",{className:x(b,"px-3 text-foreground/85 first:pl-2 last:pr-2",w(j),j.numeric&&"tabular-nums"),children:j.render?j.render(g):String(g[j.key]??"")},j.key))},S)})})]})})}function zo({status:s}){return e.jsxs("span",{"aria-hidden":"true",className:x("flex size-5 shrink-0 items-center justify-center rounded-md",s==="done"&&"bg-primary text-primary-foreground",s==="current"&&"bg-background ring-[1.5px] ring-inset ring-foreground",s==="upcoming"&&"bg-background ring-1 ring-inset ring-border",s==="blocked"&&"bg-destructive/10 text-destructive ring-1 ring-inset ring-destructive/50"),children:[s==="done"&&e.jsx(rs,{className:"size-3",strokeWidth:3}),s==="current"&&e.jsx("span",{className:"size-1.5 rounded-full bg-foreground"}),s==="blocked"&&e.jsx(Ns,{className:"size-3"})]})}function Tt({steps:s,className:t}){return e.jsx("div",{className:x("overflow-x-auto scrollbar-app-thin pb-1",t),children:e.jsx("ol",{className:"flex min-w-max",children:s.map((a,n)=>{const r=n===s.length-1;return e.jsxs("li",{"aria-current":a.status==="current"?"step":void 0,className:x("flex min-w-[128px] flex-col gap-2",!r&&"flex-1 pr-3"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(zo,{status:a.status}),!r&&e.jsx("span",{"aria-hidden":"true",className:x("h-px flex-1",a.status==="done"?"bg-foreground":"bg-border")})]}),e.jsxs("div",{className:"min-w-0 pr-2",children:[e.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:String(n+1).padStart(2,"0")}),e.jsx("div",{className:x("text-[13px] leading-5",a.status==="upcoming"?"text-foreground/70":"font-medium text-foreground"),children:a.title}),(a.owner||a.time)&&e.jsxs("div",{className:"text-xs leading-[18px] text-muted-foreground",children:[a.owner,a.owner&&a.time&&" · ",a.time]})]})]},a.id)})})})}function Ir({node:s}){return e.jsxs("li",{children:[e.jsxs("div",{className:x("relative flex min-w-[92px] max-w-[148px] flex-col items-center gap-0.5 rounded-lg bg-background px-2.5 py-1.5 text-center shadow-raised ring-1",s.active?"ring-foreground/70":"ring-border/80"),children:[s.status&&e.jsx("span",{className:"absolute right-1.5 top-1.5",children:s.status}),s.icon&&e.jsx("span",{className:"flex text-muted-foreground [&_img]:size-4 [&_svg]:size-4",children:s.icon}),e.jsx("span",{className:"max-w-full truncate text-xs font-medium text-foreground",children:s.title}),pe(s.subtitle)&&e.jsx("span",{className:"max-w-full truncate text-[11px] text-muted-foreground",children:s.subtitle})]}),s.children?.length?e.jsx("ul",{children:s.children.map(t=>e.jsx(Ir,{node:t},t.id))}):null]})}function Lr({root:s,className:t}){return e.jsx("div",{className:x("overflow-x-auto scrollbar-app-thin pb-1",t),children:e.jsx("ul",{className:"ds-org-tree min-w-max",children:e.jsx(Ir,{node:s})})})}const Do=Object.freeze(Object.defineProperty({__proto__:null,ActivityFeed:Ca,AgentMark:te,Avatar:ie,AvatarGroup:Cn,Badge:Q,BarChart:Nr,BranchTag:Ts,Breadcrumb:yt,BreadcrumbItem:Ke,Bulletin:Ta,Button:A,CalendarHeatmap:Mr,ChartFrame:Ze,ChartTooltip:Oe,Checkbox:ye,Chip:xt,ChipSelect:ce,CodeBlock:Ot,CommitItem:Ms,Composer:cr,ConfirmDialog:yn,ContextMenu:Va,ContextMenuContent:Ha,ContextMenuItem:Es,ContextMenuLabel:Il,ContextMenuSeparator:qa,ContextMenuTrigger:Ya,CopyButton:As,CountBadge:Is,DataTable:Rr,DeadlineList:Ma,Delta:oe,Dialog:wn,DialogClose:pt,DialogContent:kn,DialogTrigger:Sn,DiffStat:Ae,DonutChart:kt,EmptyState:fs,FILE_CHANGE_TONE:vl,Field:ae,FileChip:cs,FileGlyph:Nl,FileRow:We,FileStatusBadge:yl,FunnelChart:Cr,GanttChart:Er,HealthBadge:Qt,HeatTable:Tr,HeroFigure:Dr,ICON_GROUPS:rr,ICON_SIZE:Bs,Icon:se,IconButton:J,Input:Ne,Kbd:Ye,KbdGroup:Ee,Leaderboard:Aa,Legend:ke,LegendSwatchMark:Xs,LineChart:jr,LiveDot:Re,MENU_INDICATOR:fn,MENU_ITEM:Wt,MENU_ITEM_CHECKABLE:jn,MENU_ITEM_DANGER:bn,MENU_LABEL:Gt,MENU_SEPARATOR:ut,MENU_SHORTCUT:ht,MENU_SURFACE:Ut,MOTION:at,Menu:Xa,MenuCheckboxItem:Ll,MenuContent:Qa,MenuGroup:Pl,MenuItem:_s,MenuLabel:Za,MenuRadioGroup:Ja,MenuRadioItem:xs,MenuSeparator:dt,MenuSub:en,MenuSubContent:sn,MenuSubTrigger:tn,MenuTrigger:an,MessageBubble:gt,Meter:Ds,MonthCalendar:_r,NavGroup:Ls,NavRow:be,NavRowLink:Wl,Notice:Se,ObjectiveCard:Ct,Panel:_o,Popover:$a,PopoverAnchor:fl,PopoverClose:it,PopoverContent:Oa,PopoverTrigger:Fa,PriorityTag:Ce,ProcessSteps:Tt,ProjectDot:ns,ProjectTag:Pe,PromptBlock:Ft,RadioGroup:vn,RankedBars:Sr,RelativeTime:ne,Ring:_e,SERIES_COLOR:Me,STATUS_MARK:Ve,ScaleLegend:St,ScatterChart:Ar,SearchField:ot,Segmented:ps,Select:mt,Skeleton:qe,SkeletonRows:mn,SkeletonText:un,Slider:Nt,SlopeChart:wr,Sparkline:Xt,Spinner:ve,StackedBarChart:yr,StatGroup:zr,StatTile:hs,StateSquare:wt,StepList:ur,Stepper:mr,Switch:Nn,TONE_DOT:bs,TONE_INK:Rt,TONE_MARK:He,TONE_SOFT:Jr,TONE_SOLID:el,Tabs:or,TabsContent:zs,TabsList:dr,TabsTrigger:ms,Tag:xn,TaskRow:Ea,TaskStatusBadge:Ps,TaskStatusGroup:_a,TaskStatusIcon:sl,TerminalBlock:Wa,TextLink:Xe,Textarea:Ua,ThinkingText:lr,Timeline:za,TodoList:Da,TodoStateIcon:tl,Tooltip:Qe,TopologyTree:Lr,Track:de,TreeList:gr,VIZ:T,VIZ_RAMP:Le,WaffleChart:kr,WorkingDots:ir,addDays:we,arcPath:Pa,bandLayout:Pt,barPath:pl,buttonClassName:al,clamp:Je,columnPath:Lt,dodge:rt,fileChangeTone:wl,formatNumber:ue,formatPercent:X,formatRelativeTime:nl,formatSignedNumber:Ra,formatSignedPercent:It,hasNode:pe,icons:Ys,linearScale:ge,navRowClassName:rl,niceDomain:es,niceStep:gl,ordinalRamp:ll,projectDotClass:il,quantize:Os,readTerminalTheme:kl,shortenProjectName:ol,stackColors:ws,textLinkClassName:ct,useControllableState:Ks,useElementWidth:$e,useFieldControl:dl,useNow:cl,usePrefersReducedMotion:$t,useSvgId:Vs},Symbol.toStringTag,{value:"Module"})),Pr=[{title:"基础",sections:[{id:"principles",title:"原则",en:"Principles"},{id:"color",title:"颜色",en:"Color"},{id:"typography",title:"文字",en:"Typography"},{id:"layout",title:"间距、圆角与层级",en:"Space & Elevation"},{id:"icons",title:"图标",en:"Icons"},{id:"agents",title:"Agent 标志",en:"Agent Logos"},{id:"motion",title:"动效",en:"Motion"}]},{title:"组件",sections:[{id:"status",title:"状态",en:"Status"},{id:"actions",title:"操作",en:"Actions"},{id:"inputs",title:"输入",en:"Inputs"},{id:"overlays",title:"浮层",en:"Overlays"},{id:"navigation",title:"导航",en:"Navigation"},{id:"business",title:"业务组件",en:"Agent Tower"}]},{title:"展示组件",sections:[{id:"viz-principles",title:"展示原则",en:"Display Principles"},{id:"marks",title:"画法",en:"Marks"},{id:"goals",title:"目标",en:"Goals"},{id:"numbers",title:"数字",en:"Numbers"},{id:"trends",title:"趋势与对比",en:"Trend & Comparison"},{id:"composition",title:"构成与分布",en:"Composition"},{id:"lists",title:"清单",en:"Lists"},{id:"tables",title:"表格",en:"Tables"},{id:"schedule",title:"流程与排期",en:"Process & Schedule"},{id:"people",title:"人与内容",en:"People & Content"}]}],ze=Pr.flatMap(s=>s.sections);function Ro(s){return String(ze.findIndex(t=>t.id===s)+1).padStart(2,"0")}const $r=C.createContext("");function Y({id:s,description:t,columns:a=2,children:n}){const r=ze.find(i=>i.id===s),l=Ro(s);return e.jsxs("section",{id:s,"data-ds-section":"","aria-labelledby":`${s}-title`,className:"scroll-mt-8 [counter-reset:ds-specimen]",children:[e.jsxs("header",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:[e.jsx("span",{className:"tabular-nums text-foreground/80",children:l}),e.jsx("span",{"aria-hidden":"true",className:"h-px w-5 bg-border"}),e.jsx("span",{className:"uppercase",children:r?.en})]}),e.jsx("h2",{id:`${s}-title`,className:"mt-2.5 text-[22px] font-semibold leading-[30px] tracking-tight text-foreground",children:r?.title??s}),t&&e.jsx("p",{className:"mt-2 max-w-3xl text-sm leading-6 text-muted-foreground",children:t})]}),e.jsx($r.Provider,{value:l,children:e.jsx("div",{className:x("grid grid-cols-1 gap-5",a===2&&"xl:grid-cols-2",a===3&&"lg:grid-cols-2 2xl:grid-cols-3"),children:n})})]})}function Js({index:s,title:t,description:a}){return e.jsxs("div",{className:"pt-4",children:[e.jsxs("div",{className:"flex items-center gap-3 text-[11px] font-medium text-muted-foreground",children:[e.jsxs("span",{className:"font-mono tracking-wide",children:["PART ",s]}),e.jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-border/70"})]}),e.jsx("p",{className:"mt-3 text-[26px] font-medium leading-snug tracking-tight text-foreground",children:t}),a&&e.jsx("p",{className:"mt-1 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:a})]})}function p({name:s,title:t,description:a,span:n=1,dos:r,donts:l,canvas:i="plain",bodyClassName:c,className:m,children:u}){const o=C.useContext($r),d=!!(r?.length||l?.length);return e.jsxs("article",{className:x("flex min-w-0 flex-col overflow-hidden rounded-xl border border-border/60 bg-background [counter-increment:ds-specimen]",n===2&&"xl:col-span-2",n===3&&"lg:col-span-2 2xl:col-span-3",m),children:[e.jsxs("header",{className:x("px-6 pt-5",i==="chrome"?"pb-5":"pb-1"),children:[e.jsxs("div",{className:"flex min-w-0 items-baseline gap-2",children:[e.jsx("h3",{className:"min-w-0 truncate text-sm font-semibold text-foreground",children:t??s}),t&&e.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-muted-foreground",children:s}),e.jsxs("span",{className:"ml-auto shrink-0 pl-2 font-mono text-[11px] tabular-nums text-muted-foreground/50",children:[o,".",e.jsx("span",{className:"before:content-[counter(ds-specimen)]"})]})]}),a&&e.jsx("p",{className:"mt-1.5 max-w-3xl text-[13px] leading-[22px] text-muted-foreground",children:a})]}),e.jsx("div",{className:x("min-w-0 flex-1 px-6 pb-6",i==="chrome"?"bg-sidebar pt-6":"pt-5",c),children:u}),d&&e.jsxs("footer",{className:"grid gap-x-8 gap-y-2.5 border-t border-border/50 px-6 py-4 sm:grid-cols-2",children:[r?.length?e.jsx(la,{kind:"do",rules:r}):null,l?.length?e.jsx(la,{kind:"dont",rules:l}):null]})]})}function la({kind:s,rules:t}){const a=s==="do"?rs:ya;return e.jsx("ul",{className:"flex flex-col gap-1.5","aria-label":s==="do"?"推荐":"避免",children:t.map((n,r)=>e.jsxs("li",{className:"flex gap-2 text-xs leading-5 text-muted-foreground",children:[e.jsx(a,{"aria-hidden":"true",className:x("mt-1 size-3 shrink-0",s==="do"?"text-success/80":"text-destructive/70"),strokeWidth:2.5}),e.jsx("span",{children:n})]},r))})}function D({label:s,className:t,children:a}){return e.jsxs("div",{className:x("flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center sm:gap-4",t),children:[s!==void 0&&e.jsx("span",{className:"w-20 shrink-0 text-xs text-muted-foreground",children:s}),e.jsx("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:a})]})}function V({className:s,children:t}){return e.jsx("p",{className:x("text-xs leading-5 text-muted-foreground",s),children:t})}function De({className:s,children:t}){return e.jsx("code",{className:x("rounded bg-foreground/[0.05] px-1 py-px font-mono text-[11px] text-foreground/80",s),children:t})}const Io=new Date(2026,9,14),H=new Date(2026,9,14,15,30).getTime(),Mt=6e4,At=60*Mt,ia=24*At;function Or(s){let t=s>>>0;const a=()=>{t=t+1831565813>>>0;let n=t;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296};return{next:a,between:(n,r)=>n+a()*(r-n),int:(n,r)=>Math.floor(n+a()*(r-n+1))}}const ee=[{name:"agent-tower",color:"text-indigo-600"},{name:"docs-site",color:"text-emerald-600"},{name:"desktop-shell",color:"text-rose-600"},{name:"payment-gateway-service",color:"text-amber-600"}],Lo=["text-indigo-600","text-emerald-600","text-rose-600","text-amber-600","text-cyan-600","text-violet-600","text-teal-600","text-pink-600"],js=[{id:"task-1",title:"重塑左侧任务面板样式与交互",status:Te.Review,priority:re.HIGH,project:ee[0],updatedAt:H-4*Mt,agent:$.CLAUDE_CODE,minutes:48,additions:412,deletions:187},{id:"task-2",title:"修复 Claude 会话自动结束及停止时进程树清理超时",status:Te.Running,priority:re.URGENT,project:ee[0],updatedAt:H-12*Mt,agent:$.CODEX,minutes:23,additions:96,deletions:41},{id:"task-3",title:"文档站接入全文搜索",status:Te.Pending,priority:re.NORMAL,project:ee[1],updatedAt:H-3*At,agent:$.GEMINI_CLI,minutes:0,additions:0,deletions:0},{id:"task-4",title:"桌面端窗口控制按钮适配 Windows",status:Te.Done,priority:re.LOW,project:ee[2],updatedAt:H-2*ia,agent:$.CURSOR_AGENT,minutes:31,additions:58,deletions:12},{id:"task-5",title:"回调验签迁移到新密钥",status:Te.Cancelled,priority:re.NORMAL,project:ee[3],updatedAt:H-9*ia,agent:$.QWEN_CODE,minutes:6,additions:4,deletions:4},{id:"task-6",title:"三档执行权限适配与审批闭环",status:Te.Done,priority:re.HIGH,project:ee[0],updatedAt:H-26*At,agent:$.CLAUDE_CODE,minutes:74,additions:865,deletions:233}],Fr=Array.from({length:14},(s,t)=>`10/${t+1}`),Zs=[14,17,9,6,19,22,21,24,26,12,10,27,30,33],Jt=[12,13,8,5,15,16,18,17,19,9,8,18,20,21],ea=["W37","W38","W39","W40","W41","W42"],Br=[32,41,38,45,52,36],Gr=[40,40,45,45,50,50],Et=[{id:"lt10",label:"10 分钟内"},{id:"10to30",label:"10–30 分钟"},{id:"30to60",label:"30–60 分钟"},{id:"gt60",label:"1 小时以上"}],Po=[[18,22,9,4],[20,25,11,5],[16,27,14,6],[22,30,12,7],[25,33,15,6],[14,19,8,3]],Wr=[{id:"claude",label:"Claude Code",start:.62,end:.74,emphasis:!0},{id:"codex",label:"Codex",start:.58,end:.61},{id:"cursor",label:"Cursor Agent",start:.55,end:.6},{id:"gemini",label:"Gemini CLI",start:.49,end:.47},{id:"qwen",label:"Qwen Code",start:.41,end:.5}],et=[{id:"claude",agent:$.CLAUDE_CODE,value:486},{id:"codex",agent:$.CODEX,value:312},{id:"gemini",agent:$.GEMINI_CLI,value:158},{id:"cursor",agent:$.CURSOR_AGENT,value:97},{id:"qwen",agent:$.QWEN_CODE,value:41}],$o=[{id:"created",label:"创建",value:1284},{id:"started",label:"启动 Agent",value:1102},{id:"review",label:"提交审查",value:864},{id:"merged",label:"合并",value:701}],Oo=(()=>{const s=Or(7);return[...Array.from({length:42},(a,n)=>{const r=Math.round(s.between(3,85)),l=Math.max(8,Math.round(r*s.between(5.5,9.5)+s.between(-60,60)));return{id:`s${n}`,x:r,y:l}}),{id:"outlier-1",x:88,y:64,label:"卡在依赖安装",emphasis:!0},{id:"outlier-2",x:14,y:940,label:"批量格式化",emphasis:!0}]})(),Fo=["周一","周二","周三","周四","周五","周六","周日"],Bo=[[24,31,28,35,29,6,3],[8,11,9,14,12,2,0],[5,7,12,9,6,1,1],[13,10,15,11,18,4,2]],Ur=we(Io,-181),oa=(()=>{const s=Or(42);return Array.from({length:182},(t,a)=>{const r=we(Ur,a).getDay(),l=r===0||r===6,i=.6+a/182*.8;return s.next()<(l?.45:.06)?0:Math.round((l?s.between(0,4):s.between(2,14))*i)})})(),Go=new Date(2026,9,5),Wo=[{id:"g1",label:"需求与设计",meta:"shitian",start:0,end:4,progress:1},{id:"g2",label:"组件库",meta:"Claude Code",start:3,end:13,progress:.8},{id:"g3",label:"展示页",meta:"Claude Code",start:8,end:16,progress:.45},{id:"g4",label:"主页迁移",meta:"Codex",start:14,end:22,progress:0},{id:"g5",label:"回归测试",meta:"Gemini CLI",start:20,end:25,progress:0},{id:"g6",label:"发布 v1.3",meta:"shitian",start:26,end:27,progress:0}],Uo=[{id:"e1",date:"2026-10-02",title:"迭代周会",time:"10:00"},{id:"e2",date:"2026-10-09",title:"v1.2 发布",tone:"success"},{id:"e3",date:"2026-10-12",title:"迭代周会",time:"10:00"},{id:"e4",date:"2026-10-14",title:"设计评审",time:"14:00"},{id:"e5",date:"2026-10-14",title:"组件库提测"},{id:"e6",date:"2026-10-14",title:"TeamRun 演示",time:"17:00"},{id:"e7",date:"2026-10-16",title:"隧道证书到期",tone:"danger"},{id:"e8",date:"2026-10-21",title:"主页迁移截止",tone:"warning"},{id:"e9",date:"2026-10-28",title:"v1.3 发布"}],Ko={columns:[{key:"day",header:"日期"},{key:"current",header:"本期",align:"right"},{key:"previous",header:"上期",align:"right"}],rows:Fr.map((s,t)=>({day:s,current:Zs[t],previous:Jt[t]}))},Vo={columns:[{key:"week",header:"周"},{key:"actual",header:"实际",align:"right"},{key:"plan",header:"计划",align:"right"}],rows:ea.map((s,t)=>({week:s,actual:Br[t],plan:Gr[t]}))},Ho={columns:[{key:"agent",header:"Agent"},{key:"start",header:"9 月",align:"right"},{key:"end",header:"10 月",align:"right"}],rows:Wr.map(s=>({agent:s.label,start:X(s.start),end:X(s.end)}))};function qo(){return e.jsxs(Y,{id:"trends",description:"随时间变化用折线(连续)或柱图(分期);两期之间谁变了用斜率图。主系列墨色,对比系列灰色,计划与目标用虚线或斜纹。",children:[e.jsx(p,{name:"LineChart",title:"折线图",description:"2px 线,悬停出现十字线与数值卡;竖线标出发布日,虚线是目标。方向键可逐点移动。",span:2,dos:["每张图都能切到表格(右上角按钮)——数值不能只靠悬停读到"],donts:["双 Y 轴","超过 3 条线:拆成小多图或改用表格"],bodyClassName:"p-0",children:e.jsx(Ze,{bare:!0,className:"p-5",title:"每日完成任务",subtitle:"10 月 1 日 – 14 日 · 个",legend:e.jsx(ke,{items:[{label:"本期",swatch:"line",color:Me.ink},{label:"上期(按星期对齐)",swatch:"line",color:Me.context}]}),table:Ko,footnote:"周末明显回落;v1.2 发布后,完成量连续 3 个工作日高于目标线。",children:e.jsx(jr,{"aria-label":"每日完成任务,本期与上期对比",labels:Fr,series:[{id:"current",label:"本期",values:Zs,area:!0},{id:"previous",label:"上期",values:Jt,variant:"context"}],marker:{index:8,label:"v1.2 发布"},baseline:{value:25,label:"目标"}})})}),e.jsx(p,{name:"BarChart",title:"柱图",description:"柱宽封顶 24px,4px 数据端圆角;计划用斜纹并排。只在最后一组柱顶标数。",bodyClassName:"p-0",children:e.jsx(Ze,{bare:!0,className:"p-5",title:"每周合并的 PR",subtitle:"实际 vs 计划 · 个",legend:e.jsx(ke,{items:[{label:"实际",swatch:"solid",color:T.ink},{label:"计划",swatch:"hatch",color:T.plan}]}),table:Vo,footnote:"W42 截至周三,距本周计划还差 14 个。",children:e.jsx(Nr,{"aria-label":"每周合并的 PR,实际与计划",labels:ea,series:[{id:"actual",label:"实际",values:Br},{id:"plan",label:"计划",values:Gr,variant:"plan"}]})})}),e.jsx(p,{name:"SlopeChart",title:"斜率图",description:"两个时间点之间谁升谁降:主角墨色加粗,其余为灰色背景线;端点标签相撞时自动错开。",bodyClassName:"p-0",children:e.jsx(Ze,{bare:!0,className:"p-5",title:"一次通过审查的比例",subtitle:"9 月 → 10 月 · 按 Agent",table:Ho,children:e.jsx(wr,{"aria-label":"各 Agent 一次通过审查比例的变化",items:Wr,startLabel:"9 月",endLabel:"10 月",formatValue:s=>X(s),formatChange:s=>`${Ra(Math.round((s.end-s.start)*100))} pt`})})})]})}const Yo=ws(Et.length),Xo=[{id:"done",label:"已完成",value:412,color:Ve.success},{id:"running",label:"运行中",value:38,color:Ve.info},{id:"review",label:"待审查",value:21,color:Ve.warning},{id:"pending",label:"待开始",value:64,color:Ve.neutral}];function Qo(){const s=et.reduce((t,a)=>t+a.value,0);return e.jsxs(Y,{id:"composition",description:"构成用堆叠柱、环图、方格图;分布用排行条、漏斗、散点。类别默认用墨阶由深到浅;只有当类别本身就是状态时才用状态色。",children:[e.jsx(p,{name:"StackedBarChart",title:"堆叠柱",description:"看构成随时间的变化。分段之间 2px 白缝,最深的一段放在最下面;只标最后一根的合计。",bodyClassName:"p-0",children:e.jsx(Ze,{bare:!0,className:"p-5",title:"任务耗时分布",subtitle:"按周 · 个",legend:e.jsx(ke,{items:Et.map((t,a)=>({label:t.label,swatch:"solid",color:Yo[a]}))}),children:e.jsx(yr,{"aria-label":"每周任务耗时分布",labels:ea,segments:Et,data:Po})})}),e.jsxs(p,{name:"DonutChart",title:"环图",description:"部分与整体,不超过 5 段。中心放合计,悬停某段时换成该段的值;右侧数值表同时也是图例。",donts:["超过 5 段——把小的合并成「其他」","用环图比较两期——改用柱图"],children:[e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(kt,{"aria-label":"任务状态构成",segments:Xo,centerLabel:"个任务"}),e.jsx(kt,{"aria-label":"各 Agent 会话占比",segments:et.map(t=>({id:t.id,label:$s(t.agent),value:t.value})),centerLabel:"次会话",size:120,thickness:12})]}),e.jsx(V,{className:"mt-3",children:"上:类别就是状态,用状态色;下:普通类别,用墨阶由深到浅。"})]}),e.jsx(p,{name:"WaffleChart",title:"方格图",description:"一个比例的直观版:100 格,实心是完成,斜纹是进行中。",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[e.jsx(kr,{"aria-label":"迭代完成 62%,进行中 14%",value:.62,secondary:.14,cellSize:12}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[26px] font-semibold leading-8 tracking-tight text-foreground",children:"62%"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"迭代任务已完成"})]}),e.jsx(ke,{className:"flex-col items-start gap-1.5",items:[{label:"已完成",swatch:"solid",color:T.ink,value:"62"},{label:"进行中",swatch:"hatch",color:T.plan,value:"14"},{label:"未开始",swatch:"solid",color:T.empty,value:"24"}]})]})]})}),e.jsx(p,{name:"RankedBars",title:"排行条",description:"谁多谁少:按值降序,前三名序号加深;条长相对最大值。",children:e.jsx(Sr,{"aria-label":"近 30 天各 Agent 会话数",items:et.map(t=>({id:t.id,label:$s(t.agent),value:t.value,meta:X(t.value/s),icon:e.jsx(le,{agentType:t.agent,className:"size-4"})}))})}),e.jsx(p,{name:"FunnelChart",title:"漏斗",description:"逐级转化:每级右侧是占首级的比例,级间是转化率;流失最大的一级用警告色标出。",children:e.jsx(Cr,{"aria-label":"任务从创建到合并的转化",stages:$o,formatValue:t=>ue(t)})}),e.jsx(p,{name:"ScatterChart",title:"散点图",description:"两个量有没有关系:点是灰的,需要注意的离群点用墨色并直接标注。",bodyClassName:"p-0",children:e.jsx(Ze,{bare:!0,className:"p-5",title:"会话时长与改动行数",subtitle:"近 30 天 · 每个点是一次会话",footnote:"两个离群点:一次卡在依赖安装(时长长、改动少),一次是批量格式化(时长短、改动多)。",children:e.jsx(Ar,{"aria-label":"会话时长与改动行数的关系",points:Oo,xLabel:"会话时长(分钟)",yLabel:"改动行数",height:260})})})]})}const da=[{tone:"neutral",label:"草稿"},{tone:"info",label:"运行中"},{tone:"success",label:"已合并"},{tone:"warning",label:"待审查"},{tone:"danger",label:"失败"}],Zo=[{variant:"dot",label:"dot 圆点"},{variant:"soft",label:"soft 浅底"},{variant:"outline",label:"outline 描边"},{variant:"solid",label:"solid 实底"}];function Jo(){const[s,t]=C.useState(!0);return e.jsxs(Y,{id:"status",description:"状态反馈从安静到醒目排成一列:圆点 → 浅底徽章 → 提示条 → 实底。越需要用户处理,越往后取。",children:[e.jsxs(p,{name:"Badge",title:"徽章",description:"一两个字的状态或属性。文字永远用 *-ink;没有状态含义的标签一律 neutral。",span:2,dos:["状态列表首选 dot:最安静,颜色只占 6px","solid 每屏至多一处,留给最需要注意的那一个"],donts:["用徽章给分类、Agent、项目上色","徽章里放超过 6 个字的句子"],children:[e.jsx("div",{className:"overflow-x-auto scrollbar-app-thin",children:e.jsxs("div",{className:"grid min-w-[560px] grid-cols-[96px_repeat(5,minmax(0,1fr))] items-center gap-x-3 gap-y-3",children:[e.jsx("span",{}),da.map(a=>e.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:a.tone},a.tone)),Zo.map(a=>e.jsxs("div",{className:"contents",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:a.label}),da.map(n=>e.jsx("span",{children:e.jsx(Q,{tone:n.tone,variant:a.variant,children:n.label})},n.tone))]},a.variant))]})}),e.jsxs("div",{className:"mt-5 flex flex-wrap items-center gap-x-6 gap-y-3 border-t border-border/50 pt-4",children:[e.jsxs(D,{label:"尺寸",children:[e.jsx(Q,{size:"sm",tone:"info",children:"sm 18"}),e.jsx(Q,{tone:"info",children:"md 20"})]}),e.jsxs(D,{label:"形状",children:[e.jsx(Q,{shape:"tag",size:"sm",className:"font-semibold",children:"P1"}),e.jsx(Q,{shape:"tag",size:"sm",tone:"danger",className:"font-semibold",children:"P0"}),e.jsx(Q,{shape:"tag",variant:"outline",children:"v1.3"})]})]})]}),e.jsxs(p,{name:"CountBadge",title:"计数",description:"分组标题、导航行右侧的数量:默认是安静的灰字,只有需要介入时才上色。",canvas:"chrome",children:[e.jsx("div",{className:"flex max-w-xs flex-col gap-1",children:[{label:"待审查",count:3,tone:"warning"},{label:"运行中",count:2,tone:"neutral"},{label:"已完成",count:128,tone:"neutral"}].map(a=>e.jsxs("div",{className:"flex h-7 items-center rounded-md px-2 text-xs font-medium text-muted-foreground",children:[a.label,e.jsx(Is,{count:a.count,max:99,tone:a.tone,className:"ml-auto"})]},a.label))}),e.jsx(V,{className:"mt-3",children:"超过上限显示 99+;只有「待审查」这类需要你动手的计数用 warning。"})]}),e.jsx(p,{name:"Spinner",title:"转圈",description:"只用于「正在发生、时长未知」的短等待。有结构的内容用骨架,有进度的用进度条。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(D,{label:"尺寸",children:[e.jsx(ve,{size:"xs"}),e.jsx(ve,{size:"sm"}),e.jsx(ve,{size:"md"}),e.jsx(ve,{size:"lg"})]}),e.jsx(D,{label:"带说明",children:e.jsx(ve,{label:"正在读取文件"})}),e.jsxs(D,{label:"按钮内",children:[e.jsx(A,{loading:!0,children:"保存中"}),e.jsx(A,{variant:"primary",loading:!0,children:"创建中"})]})]})}),e.jsx(p,{name:"Notice",title:"提示条",description:"一段需要读到、但不打断操作的说明。颜色只给图标,正文保持墨色。状态栏、侧栏这类紧凑面板用 sm 尺寸(最后一条)。",span:2,donts:["用提示条报告需要立刻处理的错误——那是对话框或 Toast 的事","整段彩色正文"],children:e.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[e.jsx(Se,{tone:"info",title:"工作区正在准备",children:"正在复制 .env 与 node_modules,完成后 Agent 会自动开始。"}),e.jsx(Se,{tone:"success",title:"已合并到 main",children:"分支 feat/design-system 已删除,工作树已清理。"}),e.jsx(Se,{tone:"warning",title:"自动同意(完全访问)",action:e.jsx(A,{size:"xs",variant:"link",children:"了解风险"}),children:"Agent 可以不经确认执行任意命令和网络请求。"}),s?e.jsx(Se,{tone:"danger",title:"合并冲突",onDismiss:()=>t(!1),children:"src/index.css 有 2 处冲突,解决后才能继续合并。"}):e.jsx("div",{className:"flex items-center justify-center rounded-lg border border-dashed border-border text-xs text-muted-foreground",children:e.jsx(A,{size:"xs",variant:"ghost",onClick:()=>t(!0),children:"恢复示例"})}),e.jsx(Se,{className:"lg:col-span-2",children:"修改在新运行实例启动时生效,运行中的会话保留启动时的权限。"}),e.jsx(Se,{size:"sm",tone:"warning",className:"lg:col-span-2",children:"3 个本地改动未处理,需要先整理后再继续。"})]})}),e.jsx(p,{name:"EmptyState",title:"空状态",description:"说清楚「为什么是空的、下一步做什么」:图标浅灰细描边,一句话,至多一个主操作。",children:e.jsx(fs,{icon:e.jsx(zn,{}),title:"还没有任务",description:"在上方输入框描述一件事,Agent 会在独立的工作树里完成它。",action:e.jsxs(A,{variant:"primary",size:"sm",children:[e.jsx(vs,{}),"新建任务"]}),className:"py-6"})}),e.jsx(p,{name:"EmptyState · dashed",title:"面板内空状态",description:"嵌在面板、列表、拖放区里时用虚线框 + 小号。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(fs,{variant:"dashed",size:"sm",icon:e.jsx(cn,{}),title:"没有变更文件",description:"Agent 修改文件后会出现在这里"}),e.jsx(fs,{variant:"dashed",size:"sm",description:"拖入文件或粘贴截图作为附件"})]})}),e.jsx(p,{name:"Skeleton",title:"骨架",description:"首次加载有固定结构的内容时使用,几何与真实内容一致,加载完不跳动。",span:2,donts:["刷新已有数据时闪骨架——保留旧内容,降低不透明度即可"],children:e.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[e.jsxs("div",{children:[e.jsx(V,{className:"mb-2",children:"列表行(与 32px 侧栏行同几何)"}),e.jsx(mn,{rows:4})]}),e.jsxs("div",{children:[e.jsx(V,{className:"mb-2",children:"段落"}),e.jsx(un,{lines:4})]}),e.jsxs("div",{children:[e.jsx(V,{className:"mb-2",children:"卡片"}),e.jsxs("div",{className:"rounded-xl border border-border/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(qe,{className:"size-8"}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(qe,{className:"h-2.5 w-2/3"}),e.jsx(qe,{className:"h-2 w-1/3"})]})]}),e.jsx(qe,{className:"mt-4 h-16 w-full rounded-lg"})]})]})]})})]})}const ca=["xs","sm","md","lg","xl"];function ed(){return e.jsxs(Y,{id:"actions",description:"按钮按强调程度分五种:primary 只给这一屏最重要的一件事,其余从 secondary 往下取。危险操作只换语气,不新增形状。",children:[e.jsx(p,{name:"Button",title:"按钮",description:"默认 secondary(描边白卡),高度 32px 与侧栏行对齐。",span:2,dos:["一屏一个 primary;对话框里主按钮放最右","文案写动作本身:「创建任务」「合并」,而不是「确定」"],donts:["两个 primary 并排","用 danger 表达普通的取消或关闭"],children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs(D,{label:"primary",children:[e.jsxs(A,{variant:"primary",children:[e.jsx(Ga,{}),"开始"]}),e.jsx(A,{variant:"primary",children:"创建任务"}),e.jsx(A,{variant:"primary",loading:!0,children:"创建中"}),e.jsx(A,{variant:"primary",disabled:!0,children:"开始"})]}),e.jsxs(D,{label:"secondary",children:[e.jsxs(A,{children:[e.jsx(vs,{}),"新建项目"]}),e.jsx(A,{children:"导入"}),e.jsx(A,{disabled:!0,children:"导入"})]}),e.jsxs(D,{label:"ghost",children:[e.jsxs(A,{variant:"ghost",children:[e.jsx(gs,{}),"打开终端"]}),e.jsx(A,{variant:"ghost",children:"取消"})]}),e.jsxs(D,{label:"soft",children:[e.jsxs(A,{variant:"soft",children:[e.jsx(Ue,{}),"重试"]}),e.jsx(A,{variant:"soft",children:"更多选项"})]}),e.jsxs(D,{label:"link",children:[e.jsx(A,{variant:"link",children:"查看文档"}),e.jsxs(A,{variant:"link",children:["了解执行权限",e.jsx(Kt,{})]})]}),e.jsxs(D,{label:"danger",children:[e.jsxs(A,{variant:"primary",tone:"danger",children:[e.jsx(ss,{}),"删除项目"]}),e.jsx(A,{tone:"danger",children:"终止会话"}),e.jsx(A,{variant:"ghost",tone:"danger",children:"移除"}),e.jsx(A,{variant:"soft",tone:"danger",children:"放弃更改"})]}),e.jsx(D,{label:"尺寸",children:ca.map(s=>e.jsx(A,{size:s,variant:s==="xl"?"primary":"secondary",children:s},s))})]})}),e.jsx(p,{name:"TextLink",title:"文字链接",description:"句子里的链接:墨色加灰下划线,悬停时下划线加深。跟着句子折行、继承字号,长网址可以断开。单独的「查看文档」用 Button 的 link。",dos:["站外链接加 external:新标签页打开,文字后跟 ↗","Markdown 渲染器、路由 Link 用 textLinkClassName()"],donts:["用蓝色标链接:蓝色只表示运行中和信息","链接文字写「这里」「点击」:写清去哪,如「执行权限说明」"],children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("p",{className:"text-sm leading-[22px] text-foreground/90",children:["任务完成后进入待审查,合并前可以在",e.jsx(Xe,{href:"#actions",children:"变更视图"}),"里逐个文件确认;接入方式见",e.jsx(Xe,{href:"https://github.com/agent-tower/core",external:!0,children:"项目仓库"}),"。"]}),e.jsxs("p",{className:"text-xs leading-5 text-muted-foreground",children:["说明文字里的链接同样是墨色,比周围的灰字深一档:",e.jsx(Xe,{href:"#actions",children:"查看全部快捷键"})]}),e.jsxs("p",{className:"max-w-xs text-[13px] leading-5 text-foreground/90",children:["长网址在任意位置断开:",e.jsx(Xe,{href:"https://github.com/agent-tower/core/blob/main/packages/web/src/design-system/README.md",external:!0,children:"github.com/agent-tower/core/blob/main/packages/web/src/design-system/README.md"})]})]})}),e.jsx(p,{name:"IconButton",title:"图标按钮",description:"工具栏、行尾操作、关闭。默认 ghost:灰色图标,悬停才浮出底色。必须有读屏名称。",dos:["含义不自明的图标外包 Tooltip"],children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(D,{label:"ghost",children:ca.map(s=>e.jsx(J,{size:s,label:`设置(${s})`,children:e.jsx(Dt,{})},s))}),e.jsxs(D,{label:"secondary",children:[e.jsx(J,{variant:"secondary",label:"刷新",children:e.jsx(Ue,{})}),e.jsx(J,{variant:"secondary",size:"sm",label:"新建",children:e.jsx(vs,{})}),e.jsx(J,{variant:"secondary",tone:"danger",label:"删除",children:e.jsx(ss,{})})]}),e.jsxs(D,{label:"带提示",children:[e.jsx(Qe,{content:"打开终端",shortcut:["⌃","`"],children:e.jsx(J,{label:"打开终端",showTitle:!1,children:e.jsx(gs,{})})}),e.jsx(Qe,{content:"刷新",children:e.jsx(J,{label:"刷新",showTitle:!1,children:e.jsx(Ue,{})})}),e.jsx(J,{label:"加载中",loading:!0,children:e.jsx(Ue,{})})]})]})}),e.jsx(p,{name:"CopyButton",title:"复制",description:"点击后对勾 1.6 秒,文案同步变「已复制」,读屏同样播报。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(D,{label:"图标",children:e.jsxs("span",{className:"flex items-center gap-1 font-mono text-xs text-foreground/80",children:["8721b9c",e.jsx(As,{value:"8721b9c",size:"xs"})]})}),e.jsxs(D,{label:"图标 + 文字",children:[e.jsx(As,{value:"pnpm --filter web build",display:"text",variant:"secondary"}),e.jsx(As,{value:"feat/design-system",display:"text",label:"复制分支名"})]})]})}),e.jsx(p,{name:"Kbd",title:"按键",description:"快捷键提示:单键、组合键;在深色 Tooltip 里用反色版本。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs(D,{label:"单键",children:[e.jsx(Ye,{children:"⏎"}),e.jsx(Ye,{children:"Esc"}),e.jsx(Ye,{children:"⌘"}),e.jsx(Ye,{children:"Tab"})]}),e.jsxs(D,{label:"组合",children:[e.jsx(Ee,{keys:["⌘","K"]}),e.jsx(Ee,{keys:["Ctrl","Enter"],separator:"+"}),e.jsx(Ee,{keys:["⇧","⏎"]})]}),e.jsx(D,{label:"反色",children:e.jsxs("span",{className:"flex items-center gap-2 rounded-lg bg-inverse px-2.5 py-1.5 text-xs text-inverse-foreground",children:["搜索任务",e.jsx(Ee,{keys:["⌘","K"],inverse:!0})]})})]})}),e.jsx(p,{name:"Toolbar",title:"工具栏",description:"一组图标按钮 + 一个文字按钮;同一工具栏里所有控件同高(28px)。",canvas:"chrome",children:e.jsxs("div",{className:"flex items-center gap-1 rounded-lg bg-background p-1 shadow-raised ring-1 ring-border/70",children:[e.jsx(J,{size:"sm",label:"刷新",children:e.jsx(Ue,{})}),e.jsx(J,{size:"sm",label:"打开终端",children:e.jsx(gs,{})}),e.jsx("span",{"aria-hidden":"true",className:"mx-1 h-4 w-px bg-border"}),e.jsx(A,{size:"sm",variant:"ghost",children:"提交"}),e.jsx(A,{size:"sm",variant:"primary",className:"ml-auto",children:"合并"})]})})]})}function Ge({title:s,art:t,children:a}){return e.jsxs("article",{className:"flex min-w-0 flex-col overflow-hidden rounded-xl border border-border/60 bg-background",children:[e.jsx("div",{"aria-hidden":"true",className:"flex h-36 items-center justify-center border-b border-border/50 bg-foreground/[0.015] px-6",children:t}),e.jsxs("div",{className:"px-5 pb-5 pt-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:s}),e.jsx("p",{className:"mt-1.5 text-[13px] leading-[22px] text-muted-foreground",children:a})]})]})}function me({title:s,meta:t=!1,active:a=!1,hovered:n=!1,status:r}){return e.jsxs("div",{className:x("flex h-6 items-center gap-1.5 rounded-[5px] px-1.5",a&&"bg-background shadow-raised ring-1 ring-border/80",n&&"bg-accent"),children:[r??e.jsx("span",{className:"size-2 shrink-0 rounded-full ring-[1.5px] ring-inset ring-foreground/30"}),e.jsx("span",{className:x("h-1.5 rounded-full",a?"bg-foreground/80":"bg-foreground/45",s)}),t&&e.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[e.jsx("span",{className:"h-2.5 w-7 rounded-[3px] bg-foreground/[0.07]"}),e.jsx("span",{className:"h-1.5 w-3.5 rounded-full bg-foreground/20"})]}),n&&e.jsx(Ai,{className:"ml-auto size-3 text-foreground/60"})]})}function sd(){return e.jsxs(Y,{id:"principles",columns:3,description:"全部规则都从现有主页长出来:浅灰外框里放一座白色内容岛,Charcoal 墨色做主角,颜色只留给状态与项目身份。遇到规范没覆盖的情况,按这六条推理。",children:[e.jsx(Ge,{title:"灰框白岛",art:e.jsxs("div",{className:"flex h-24 w-full max-w-[220px] flex-col rounded-lg bg-sidebar ring-1 ring-border",children:[e.jsxs("div",{className:"flex h-4 shrink-0 items-center gap-1 px-2",children:[e.jsx("span",{className:"h-1.5 w-6 rounded-full bg-foreground/80"}),e.jsx("span",{className:"h-1 w-8 rounded-full bg-foreground/15"})]}),e.jsxs("div",{className:"flex min-h-0 flex-1 gap-1.5 px-1.5 pb-1.5",children:[e.jsxs("div",{className:"flex w-14 flex-col gap-1 pt-1",children:[e.jsx("span",{className:"h-2 rounded-[3px] bg-foreground/10"}),e.jsx("span",{className:"h-2.5 rounded-[3px] bg-background shadow-raised ring-1 ring-border/80"}),e.jsx("span",{className:"h-2 rounded-[3px] bg-foreground/10"}),e.jsx("span",{className:"h-2 rounded-[3px] bg-foreground/10"})]}),e.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-1.5 rounded-md border border-border/60 bg-background",children:[e.jsx("span",{className:"h-1.5 w-16 rounded-full bg-foreground/70"}),e.jsx("span",{className:"h-5 w-20 rounded-[4px] ring-1 ring-border"})]})]})]}),children:"界面分两层:浅灰外框(顶栏、侧栏)承载导航,白色内容岛承载正在处理的对象。层级靠底色和 1px 细边区分,不靠阴影堆叠。"}),e.jsx(Ge,{title:"标题优先",art:e.jsxs("div",{className:"w-full max-w-[240px] space-y-0.5 rounded-lg bg-sidebar p-1.5 ring-1 ring-border/70",children:[e.jsx(me,{title:"w-[44%]",meta:!0}),e.jsx(me,{title:"w-[72%]",hovered:!0}),e.jsx(me,{title:"w-[36%]",meta:!0})]}),children:"列表行里标题拥有最大宽度。元信息(项目、时间)必须紧凑,悬停或键盘聚焦时整体让位;宁可截短元信息,也不截短标题。"}),e.jsx(Ge,{title:"墨色为主",art:e.jsxs("div",{className:"flex items-end gap-4",children:[e.jsx("span",{className:"flex h-7 items-center rounded-md bg-primary px-3 text-[11px] font-medium text-primary-foreground shadow-raised",children:"开始"}),e.jsx("span",{className:"relative mb-1.5 h-4 w-7 rounded-full bg-primary",children:e.jsx("span",{className:"absolute right-0.5 top-0.5 size-3 rounded-full bg-background"})}),e.jsx("span",{className:"flex h-12 items-end gap-1",children:[.45,.7,.55,1].map((s,t)=>e.jsx("span",{className:"w-2.5 rounded-t-[2px] bg-viz-6",style:{height:`${s*100}%`}},t))})]}),children:"Charcoal 是唯一的主色:主按钮、选中、开关、图表主系列都用它。蓝色只表示「运行中 / 信息」,不再作品牌色。"}),e.jsx(Ge,{title:"颜色只给状态",art:e.jsxs("div",{className:"w-full max-w-[220px] space-y-0.5 rounded-lg bg-background p-1.5 ring-1 ring-border/70",children:[e.jsx(me,{title:"w-[50%]"}),e.jsx(me,{title:"w-[40%]",status:e.jsx(Ns,{className:"size-2.5 shrink-0 text-warning",strokeWidth:2.5})}),e.jsx(me,{title:"w-[58%]"}),e.jsx("div",{className:"flex justify-end px-1.5 pt-0.5",children:e.jsx("span",{className:"rounded-full bg-warning/10 px-1.5 py-px text-[10px] font-medium text-warning-ink",children:"待审查 1"})})]}),children:"颜色是稀缺资源,只表达需要注意的状态(运行中、待审查、失败)和项目身份。没有状态含义的东西一律用灰阶,状态也永远配图标或文字。"}),e.jsx(Ge,{title:"浮起 = 正在打开",art:e.jsxs("div",{className:"flex w-full max-w-[220px] flex-col gap-2 rounded-lg bg-sidebar p-2 ring-1 ring-border/70",children:[e.jsxs("div",{className:"inline-flex gap-0.5 self-start rounded-md bg-foreground/[0.05] p-0.5",children:[e.jsx("span",{className:"rounded-[5px] bg-background px-2 py-0.5 text-[10px] font-medium text-foreground shadow-raised ring-1 ring-border/80",children:"列表"}),e.jsx("span",{className:"px-2 py-0.5 text-[10px] text-foreground/60",children:"看板"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(me,{title:"w-[46%]"}),e.jsx(me,{title:"w-[60%]",active:!0}),e.jsx(me,{title:"w-[38%]"})]})]}),children:"白卡浮在灰底上,表示「这一项正在右侧展示」:侧栏选中行、分段控件的选中段是同一种材质,只表达这一个意思。"}),e.jsx(Ge,{title:"动效只解释变化",art:e.jsxs("div",{className:"relative h-20 w-44",children:[e.jsx("span",{className:"absolute inset-x-6 top-7 h-10 rounded-lg bg-background opacity-30 ring-1 ring-border/60"}),e.jsx("span",{className:"absolute inset-x-3 top-3.5 h-10 rounded-lg bg-background opacity-60 ring-1 ring-border/70"}),e.jsxs("span",{className:"absolute inset-x-0 top-0 flex h-10 items-center gap-2 rounded-lg bg-background px-3 shadow-raised ring-1 ring-border/80",children:[e.jsx("span",{className:"size-2 rounded-full bg-info"}),e.jsx("span",{className:"h-1.5 w-16 rounded-full bg-foreground/60"})]}),e.jsx("span",{className:"absolute inset-x-0 bottom-0 text-center font-mono text-[11px] text-muted-foreground",children:"250ms · ease-enter"})]}),children:"动效说明「什么变了」:新内容上浮淡入,状态切换 150ms 完成,不做装饰性循环。开启「减少动态效果」时只保留必要的进行中提示。"})]})}const td=[{name:"外框",token:"--sidebar",hex:"#F9FAFB",value:"var(--sidebar)",usage:"顶栏、侧栏、页面底色"},{name:"内容岛",token:"--background",hex:"#FFFFFF",value:"var(--background)",usage:"内容岛、卡片、输入框、菜单"},{name:"悬停",token:"--accent",hex:"#F3F4F6",value:"var(--accent)",usage:"行悬停、ghost 按钮"},{name:"浅灰底",token:"foreground / 5%",hex:"≈ #F4F4F4",value:"color-mix(in oklab, var(--foreground) 5%, var(--background))",usage:"分段轨道、标签、代码、头像"},{name:"反色",token:"--inverse",hex:"#191F25",value:"var(--inverse)",usage:"Tooltip、Toast 等浮在内容上的小面"},{name:"终端",token:"--terminal",hex:"#1E1E1E",value:"var(--terminal)",usage:"终端与日志:唯一常驻深色面"}];function ad({name:s,token:t,hex:a,value:n,usage:r}){return e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"h-14 rounded-lg ring-1 ring-inset ring-black/[0.07]",style:{background:n}}),e.jsxs("div",{className:"mt-2 flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-foreground",children:s}),e.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:a})]}),e.jsx("div",{className:"truncate font-mono text-[11px] text-muted-foreground",children:t}),e.jsx("p",{className:"mt-1 text-xs leading-[18px] text-muted-foreground",children:r})]})}const nd=[{name:"正文",className:"text-foreground",token:"foreground",ratio:16.5,usage:"标题、正文、选中项"},{name:"次要正文",className:"text-foreground/80",token:"foreground / 80%",ratio:8.6,usage:"列表行、菜单项、未选中的值"},{name:"弱正文",className:"text-foreground/70",token:"foreground / 70%",ratio:6.1,usage:"浅灰底上的标签文字(neutral ink)"},{name:"说明",className:"text-muted-foreground",token:"muted-foreground",ratio:4.85,usage:"元信息、时间、计数、表头:白底上最浅的可读文字"},{name:"占位",className:"text-muted-foreground/70",token:"muted-foreground / 70%",ratio:2.75,usage:"只用于占位符与禁用态,不承载信息"}],rd=[{tone:"info",name:"信息",meaning:"运行中、提示",icon:ba,base:"--info",ink:"--info-ink",baseRatio:5.17,inkRatio:6.31},{tone:"success",name:"成功",meaning:"已完成、已合并、在线",icon:_t,base:"--success",ink:"--success-ink",baseRatio:3.3,inkRatio:5.64},{tone:"warning",name:"警告",meaning:"待审查、临近截止、需要确认",icon:Ns,base:"--warning",ink:"--warning-ink",baseRatio:3.18,inkRatio:5.78},{tone:"danger",name:"危险",meaning:"失败、逾期、删除",icon:ja,base:"--destructive",ink:"--destructive-ink",baseRatio:4.83,inkRatio:6.38}],ld=[{token:"--terminal",preview:e.jsx("span",{className:"size-full bg-terminal"}),usage:"终端正文和日志;选中的标签、行也用它"},{token:"--terminal-chrome",preview:e.jsx("span",{className:"size-full bg-terminal-chrome"}),usage:"标签栏、标题栏、侧列表"},{token:"--terminal-accent",preview:e.jsx("span",{className:"size-full bg-terminal-chrome",children:e.jsx("span",{className:"block size-full bg-terminal-accent"})}),usage:"悬停:6% 白,叠在哪一层上都成立"},{token:"--terminal-border",preview:e.jsx("span",{className:"size-full p-1.5",children:e.jsx("span",{className:"block size-full rounded border border-terminal-border"})}),usage:"分隔线、描边:8% 白"},{token:"--terminal-foreground",preview:e.jsx("span",{className:"text-xs font-medium text-terminal-foreground",children:"Aa"}),usage:"正文、选中项的文字"},{token:"--terminal-muted-foreground",preview:e.jsx("span",{className:"text-xs font-medium text-terminal-muted-foreground",children:"Aa"}),usage:"标签、表头、次要信息(标签栏悬停态上仍 ≥ 4.5:1)"}],id=[{name:"red",className:"bg-terminal-red",usage:"失败"},{name:"green",className:"bg-terminal-green",usage:"成功"},{name:"yellow",className:"bg-terminal-yellow",usage:"警告"},{name:"blue",className:"bg-terminal-blue",usage:"运行中"},{name:"magenta",className:"bg-terminal-magenta",usage:"程序输出"},{name:"cyan",className:"bg-terminal-cyan",usage:"程序输出"},{name:"bright-black",className:"bg-terminal-bright-black",usage:"提示符"}];function st({state:s,dot:t,children:a}){return e.jsxs("span",{className:x("flex h-8 items-center gap-2 rounded-t-md px-3 font-mono text-xs",s==="selected"&&"bg-terminal text-terminal-foreground",s==="hover"&&"bg-terminal-accent text-terminal-muted-foreground",s==="idle"&&"text-terminal-muted-foreground"),children:[e.jsx("span",{className:x("size-1.5 rounded-full",t)}),a]})}const od=[{hex:"#EFF0F3",ratio:"1.14",usage:"零值 / 空格"},{hex:"#CED1D6",ratio:"1.53",usage:"量级 1"},{hex:"#A0A5AC",ratio:"2.48",usage:"对比 · 序数起点"},{hex:"#7B8189",ratio:"3.94",usage:"计划斜纹"},{hex:"#555B63",ratio:"6.82",usage:"量级 4"},{hex:"#333940",ratio:"11.7",usage:"量级 5"},{hex:"#191F25",ratio:"16.7",usage:"主数据"}];function dd(){return e.jsxs(Y,{id:"color",description:"中性色全部带一点冷蓝(色相 255–264),与 Charcoal 主色同源。所有颜色都是 CSS 变量(src/index.css),组件里只写语义类名,不写色值。",children:[e.jsx(p,{name:"Surface",title:"表面",description:"从外到内:外框 → 内容岛 → 悬停 / 浅灰底。深色只出现在反色小面和终端。",span:2,children:e.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",children:td.map(s=>e.jsx(ad,{...s},s.name))})}),e.jsx(p,{name:"Ink",title:"文字墨阶",description:"文字只有这几档;对比度按白底计算。",dos:["正文类文字至少 4.5:1;muted-foreground 是白底上最浅的可读文字"],donts:["用透明度再调浅说明文字(muted/80 只有 3.3:1)"],children:e.jsx("div",{className:"flex flex-col divide-y divide-border/50",children:nd.map(s=>e.jsxs("div",{className:"flex items-center gap-3 py-2 first:pt-0 last:pb-0",children:[e.jsx("span",{className:x("w-28 shrink-0 text-sm",s.className),children:"任务看板 Aa 128"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"text-xs font-medium text-foreground",children:[s.name," ",e.jsx(De,{className:"ml-1",children:s.token})]}),e.jsx("div",{className:"text-xs leading-[18px] text-muted-foreground",children:s.usage})]}),s.ratio>=4.5?e.jsxs(Q,{variant:"outline",size:"sm",className:"tabular-nums",children:[s.ratio,":1"]}):e.jsxs(Q,{tone:"warning",size:"sm",className:"tabular-nums",children:[s.ratio,":1"]})]},s.token))})}),e.jsx(p,{name:"Line",title:"线与焦点",description:"边框 1px;焦点是边框加深为中性灰,不引入彩色描边。",children:e.jsx("div",{className:"grid grid-cols-2 gap-4",children:[{label:"分隔线、卡片",token:"--border",className:"border border-border"},{label:"内容岛描边",token:"border / 50%",className:"border border-border/50"},{label:"悬停加深",token:"ring / 50%",className:"border border-ring/50"},{label:"焦点",token:"--ring",className:"border border-ring ring-2 ring-ring/30"}].map(s=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:x("h-12 rounded-lg bg-background",s.className)}),e.jsx("div",{className:"mt-2 text-xs font-medium text-foreground",children:s.label}),e.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:s.token})]},s.token))})}),e.jsx(p,{name:"Status",title:"状态色",description:"每个状态两档:基础色给图标、圆点、图形;*-ink 给文字和实底。基础色作文字时绿、橙只有约 3.2:1。",span:2,dos:["状态同时用图标或文字表达,色弱用户也能区分","文字、数字、实底按钮一律用 *-ink"],donts:["用状态色装饰没有状态含义的东西(分类、Agent、图表系列)","整段彩色正文:颜色只给图标,正文保持墨色"],children:e.jsx("div",{className:"overflow-x-auto scrollbar-app-thin",children:e.jsxs("table",{className:"w-full min-w-[640px] border-collapse text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border/70 text-xs text-muted-foreground",children:[e.jsx("th",{scope:"col",className:"h-8 pr-3 font-medium",children:"语义"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"标记(基础色)"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"文字(ink)"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"浅底"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"实底"}),e.jsx("th",{scope:"col",className:"h-8 pl-3 text-right font-medium",children:"对比度 基础 / ink"})]})}),e.jsx("tbody",{children:rd.map(s=>{const t=s.icon;return e.jsxs("tr",{className:"border-b border-border/40 last:border-0",children:[e.jsxs("td",{className:"py-2.5 pr-3",children:[e.jsx("div",{className:"text-[13px] font-medium text-foreground",children:s.name}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s.meaning})]}),e.jsx("td",{className:"px-3",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(t,{"aria-hidden":"true",className:x("size-4",He[s.tone])}),e.jsx("span",{className:x("size-2 rounded-full",bs[s.tone])}),e.jsx(De,{children:s.base})]})}),e.jsxs("td",{className:"px-3",children:[e.jsx("span",{className:x("text-[13px] font-medium",Rt[s.tone]),children:"+12 · 3 天"}),e.jsx(De,{className:"ml-2",children:s.ink})]}),e.jsx("td",{className:"px-3",children:e.jsx(Q,{tone:s.tone,children:s.meaning.split("、")[0]})}),e.jsx("td",{className:"px-3",children:e.jsx(Q,{tone:s.tone,variant:"solid",children:s.meaning.split("、")[0]})}),e.jsxs("td",{className:"pl-3 text-right font-mono text-[11px] tabular-nums text-muted-foreground",children:[e.jsx("span",{className:s.baseRatio<4.5?"text-warning-ink":void 0,children:s.baseRatio.toFixed(2)})," / ",e.jsx("span",{className:"text-foreground/80",children:s.inkRatio.toFixed(2)})]})]},s.tone)})})]})})}),e.jsxs(p,{name:"Project",title:"项目标识色",description:"8 色按项目名哈希分配(components/task/adapters.ts)。项目色只出现在圆点和项目标签上。",donts:["用项目色做大面积底色或按钮色"],children:[e.jsx("div",{className:"grid grid-cols-4 gap-x-4 gap-y-3",children:Lo.map(s=>e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(ns,{color:s,className:"size-2.5"}),e.jsx("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:s.replace("text-","")})]},s))}),e.jsx("div",{className:"mt-5 flex flex-wrap items-center gap-2",children:ee.map(s=>e.jsx(Pe,{name:s.name,color:s.color},s.name))}),e.jsx(V,{className:"mt-2",children:"项目标签:文字从项目色渐变到灰,长名自动截短(payment-gateway-service → payment..)。"})]}),e.jsxs(p,{name:"Viz ink",title:"图表墨阶",description:"图表只用一种颜色的深浅:主数据墨色、对比用灰、计划用斜纹。序数(漏斗、分桶)只取 2–6 档。",dos:["数值越大越深;零值用最浅的 0 档而不是留白"],donts:["给类别分配彩虹色——超过 5 类就合并成「其他」或改用表格"],children:[e.jsx("div",{className:"flex h-10 overflow-hidden rounded-lg ring-1 ring-inset ring-black/[0.05]",children:Le.map(s=>e.jsx("div",{className:"flex-1",style:{background:s}},s))}),e.jsx("div",{className:"mt-2 grid grid-cols-7 gap-1.5",children:od.map((s,t)=>e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"font-mono text-[11px] text-foreground/80",children:["viz-",t]}),e.jsxs("div",{className:"font-mono text-[11px] tabular-nums text-muted-foreground",children:[s.ratio,":1"]}),e.jsx("div",{className:"mt-0.5 text-xs leading-[18px] text-muted-foreground",children:s.usage})]},s.hex))}),e.jsx(ke,{className:"mt-4",items:[{label:"实际",swatch:"solid",color:T.ink},{label:"上期 / 对比",swatch:"solid",color:T.context},{label:"计划 / 剩余",swatch:"hatch",color:T.plan},{label:"目标",swatch:"dashed",color:T.ink}]})]}),e.jsx(p,{name:"Terminal",title:"终端色",description:e.jsxs(e.Fragment,{children:["终端是全站唯一的常驻深色面,配色沿用 VS Code Dark。界面层(标签栏、分隔线、悬停)和程序输出(ANSI 色)都是 ",e.jsx(De,{className:"whitespace-nowrap",children:"--terminal-*"})," 变量。"]}),span:2,dos:["选中的标签、行用 bg-terminal:和终端正文同一种材质,表示「打开的就是它」","xterm 用 readTerminalTheme() 取色;终端里的状态点用 ANSI 色"],donts:["终端以外出现深色面;终端里弹出的菜单也用普通的浅色 Menu / Popover","在代码里另抄一份终端色值"],children:e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{"aria-hidden":"true",className:"overflow-hidden rounded-lg bg-terminal",children:[e.jsxs("div",{className:"flex items-end gap-0.5 bg-terminal-chrome px-1.5 pt-1.5",children:[e.jsx(st,{state:"selected",dot:"bg-terminal-green",children:"pnpm dev"}),e.jsx(st,{state:"hover",dot:"bg-terminal-blue",children:"vitest"}),e.jsx(st,{state:"idle",dot:"bg-terminal-red",children:"build"}),e.jsx("span",{className:"mb-2 ml-auto h-4 w-px bg-terminal-border"}),e.jsx("span",{className:"mb-1 flex size-7 items-center justify-center rounded-md text-terminal-muted-foreground",children:e.jsx(vs,{className:"size-3.5"})})]}),e.jsxs("div",{className:"p-3 font-mono text-xs leading-5",children:[e.jsxs("div",{className:"text-terminal-foreground",children:[e.jsx("span",{className:"text-terminal-bright-black",children:"$ "}),"pnpm dev"]}),e.jsx("div",{className:"text-terminal-bright-black",children:"> vite --host"}),e.jsx("div",{className:"text-terminal-green",children:"VITE v7.1.3 ready in 412 ms"}),e.jsxs("div",{className:"text-terminal-foreground",children:["Local: ",e.jsx("span",{className:"text-terminal-cyan",children:"http://localhost:5173/"})]}),e.jsx("div",{className:"text-terminal-yellow",children:"(!) Port 5173 is in use, trying another one…"})]})]}),e.jsx(V,{className:"mt-2",children:"选中的标签和下面的终端连成一片;中间是悬停态,右边是未选中。"}),e.jsx("div",{className:"mt-5 grid grid-cols-4 gap-x-3 gap-y-3",children:id.map(s=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"flex h-7 items-center justify-center rounded-md bg-terminal",children:e.jsx("span",{className:x("size-2.5 rounded-full",s.className)})}),e.jsx("div",{className:"mt-1 truncate font-mono text-[11px] text-foreground/80",children:s.name}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s.usage})]},s.name))})]}),e.jsx("div",{className:"min-w-0",children:e.jsx("div",{className:"flex flex-col divide-y divide-border/50",children:ld.map(s=>e.jsxs("div",{className:"flex items-center gap-3 py-2 first:pt-0",children:[e.jsx("span",{className:"flex h-7 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md bg-terminal",children:s.preview}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate font-mono text-[11px] text-foreground/80",children:s.token}),e.jsx("div",{className:"text-xs leading-[18px] text-muted-foreground",children:s.usage})]})]},s.token))})})]})})]})}const cd=[{spec:"26 / 36 · 500",className:"text-[26px] leading-9 font-medium tracking-tight",sample:"你需要在 agent-tower 中做点什么?",usage:"首屏标题,每屏至多一个"},{spec:"22 / 30 · 600",className:"text-[22px] leading-[30px] font-semibold tracking-tight",sample:"项目设置",usage:"页面与章节标题"},{spec:"15 / 24 · 400",className:"text-[15px] leading-6",sample:"把左侧任务面板改成紧凑的两行布局",usage:"输入卡正文"},{spec:"14 / 22 · 400",className:"text-sm leading-[22px]",sample:"重塑左侧任务面板样式与交互",usage:"正文、侧栏行(默认字号)"},{spec:"13 / 20 · 400",className:"text-[13px] leading-5",sample:"在新标签页中打开 · 复制分支名",usage:"菜单项、按钮、表格、样张说明"},{spec:"12 / 18 · 500",className:"text-xs leading-[18px] font-medium",sample:"待审查 · 运行中 · 已完成",usage:"徽章、表头、字段说明(中文最小)"},{spec:"11 / 16 · 400",className:"text-[11px] leading-4 tabular-nums",sample:"12:04 · 1,284 · +412 −187 · ⌘K",usage:"单行数字:时间、计数、刻度"},{spec:"10 / 12 · 500",className:"text-[10px] leading-3 font-medium",sample:"P0 · KR1 · W42",usage:"拉丁编号、头像缩写(最小)"}];function xd(){return e.jsxs(Y,{id:"typography",description:"系统字体栈,不加载网络字体。字号以 14px 为正文基准;中文最小 12px、行高不低于 1.5 倍,11px 和 10px 只留给数字与编号;字重只用 400 / 500 / 600。",children:[e.jsx(p,{name:"Type scale",title:"字号阶梯",span:2,dos:["同一区域最多三档字号;层级优先用字重和颜色拉开","中文句子至少 12px、行高 1.5 倍以上:小字省下的空间不值得读者眯眼"],donts:["用 10–11px 写中文说明——11px 只给数字,10px 只给编号","700 以上的字重和全大写中文"],children:e.jsx("div",{className:"flex flex-col divide-y divide-border/50",children:cd.map(s=>e.jsxs("div",{className:"grid grid-cols-1 items-baseline gap-1 py-3 first:pt-0 last:pb-0 md:grid-cols-[112px_minmax(0,1fr)_240px] md:gap-6",children:[e.jsx("span",{className:"font-mono text-[11px] tabular-nums text-muted-foreground",children:s.spec}),e.jsx("span",{className:x("min-w-0 truncate text-foreground",s.className),children:s.sample}),e.jsx("span",{className:"text-xs text-muted-foreground",children:s.usage})]},s.spec))})}),e.jsx(p,{name:"Family",title:"字体",description:"正文用系统无衬线;代码、分支、哈希、路径用等宽。",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Sans · ui-sans-serif, system-ui"}),e.jsx("p",{className:"mt-1 text-[15px] text-foreground",children:"Agent Tower 让多个 AI Agent 并行工作"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Mono · ui-monospace, SFMono-Regular, Menlo"}),e.jsx("p",{className:"mt-1 font-mono text-[13px] text-foreground",children:"feat/design-system · 8721b9c · src/index.css"})]})]})}),e.jsxs(p,{name:"Numerals",title:"数字",description:"会变化或需要上下对齐的数字一律 tabular-nums;千分位用逗号,大数用紧凑写法。",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:"比例数字(默认)"}),["1,111","8,888","4,701"].map(s=>e.jsx("div",{className:"text-right text-lg font-semibold text-foreground",children:s},s))]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:"等宽数字 tabular-nums"}),["1,111","8,888","4,701"].map(s=>e.jsx("div",{className:"text-right text-lg font-semibold tabular-nums text-foreground",children:s},s))]})]}),e.jsx(V,{className:"mt-3",children:"紧凑写法:1,284 · 12.9K · 1.28M;负号用「−」(U+2212),与加号同宽。"})]})]})}const md=[{px:2,usage:"图表分段间隙、头像叠放描边"},{px:4,usage:"紧凑的图标与文字、标签内边距"},{px:6,usage:"胶囊内图标与文字"},{px:8,usage:"侧栏外边距 · 行内边距 · 内容岛外边距"},{px:10,usage:"行内图标与标题"},{px:12,usage:"卡片内元素、表单字段之间"},{px:16,usage:"卡片内边距、卡片之间"},{px:24,usage:"区块之间"},{px:32,usage:"宽屏页面内边距"},{px:48,usage:"章节之间"}],ud=[{size:"xs",px:24,usage:"行内操作、图表工具"},{size:"sm",px:28,usage:"胶囊、工具栏、分段"},{size:"md",px:32,usage:"默认:与侧栏行同高"},{size:"lg",px:36,usage:"表单输入、对话框按钮"},{size:"xl",px:44,usage:"首屏 CTA、触屏行"}],hd=[{label:"4",token:"rounded",className:"rounded",usage:"标签、键帽、优先级、数据端"},{label:"6",token:"rounded-sm",className:"rounded-sm",usage:"气泡收尖的那个角"},{label:"8",token:"rounded-md",className:"rounded-md",usage:"侧栏行、按钮、菜单项"},{label:"10",token:"rounded-lg",className:"rounded-lg",usage:"菜单、输入框、代码块、提示条"},{label:"14",token:"rounded-xl",className:"rounded-xl",usage:"内容岛、卡片、输入卡、对话框"},{label:"∞",token:"rounded-full",className:"rounded-full",usage:"胶囊、徽章、头像、开关"}],pd=[{name:"平面",token:"border",className:"border border-border/70",usage:"内容岛、卡片:只有 1px 边"},{name:"浮起",token:"shadow-raised",className:"shadow-raised ring-1 ring-border/80",usage:"选中行、按钮、开关滑块"},{name:"弹出",token:"shadow-popover",className:"shadow-popover ring-1 ring-border/60",usage:"菜单、下拉、气泡卡"},{name:"覆盖",token:"shadow-overlay",className:"shadow-overlay ring-1 ring-border/60",usage:"对话框、拖拽中的行"}];function gd(){return e.jsxs(Y,{id:"layout",description:"4px 网格;控件高度、圆角、阴影各只有一组固定档位。新组件先从这里取值,取不到再讨论要不要加档。",children:[e.jsx(p,{name:"Spacing",title:"间距",description:"4px 网格,2 / 6 / 10 只用于组件内部的细调。",children:e.jsx("div",{className:"flex flex-col gap-2",children:md.map(s=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-6 shrink-0 text-right font-mono text-[11px] tabular-nums text-foreground/80",children:s.px}),e.jsx("span",{className:"w-12 shrink-0",children:e.jsx("span",{className:"block h-2 rounded-[2px] bg-viz-6",style:{width:s.px}})}),e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:s.usage})]},s.px))})}),e.jsx(p,{name:"Control height",title:"控件高度",description:"五档高度对应按钮的 xs–xl;同一行里的控件必须同高。",children:e.jsx("div",{className:"flex flex-col gap-3",children:ud.map(s=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-6 shrink-0 text-right font-mono text-[11px] tabular-nums text-foreground/80",children:s.px}),e.jsx("span",{className:"w-24 shrink-0",children:e.jsxs(A,{size:s.size,children:["按钮 ",s.size]})}),e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:s.usage})]},s.size))})}),e.jsx(p,{name:"Radius",title:"圆角",description:"由 --radius(10px)派生;外层容器的圆角 ≥ 内层:内容岛 14 → 输入框 10 → 行 8。",children:e.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-5 sm:grid-cols-3",children:hd.map(s=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:x("size-14 border border-foreground/25 bg-foreground/[0.03]",s.className)}),e.jsxs("div",{className:"mt-2.5 flex min-w-0 items-baseline gap-1.5 font-mono text-[11px]",children:[e.jsx("span",{className:"text-foreground/80",children:s.label}),e.jsx("span",{className:"truncate text-muted-foreground",children:s.token})]}),e.jsx("p",{className:"mt-0.5 text-xs leading-[18px] text-muted-foreground",children:s.usage})]},s.token))})}),e.jsx(p,{name:"Elevation",title:"层级",description:"四档,越高越少见。阴影都很淡,层级主要靠白在灰上。",canvas:"chrome",children:e.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:pd.map(s=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:x("h-16 rounded-lg bg-background",s.className)}),e.jsx("div",{className:"mt-2.5 text-xs font-medium text-foreground",children:s.name}),e.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:s.token}),e.jsx("p",{className:"mt-1 text-xs leading-[18px] text-muted-foreground",children:s.usage})]},s.token))})}),e.jsx(p,{name:"App shell",title:"页面骨架",description:"主页的三段式:48px 顶栏 · 可拖拽侧栏(默认 400,260–600)· 内容岛(右下各留 8px,圆角 14,描边 border/50)。",span:2,children:e.jsxs("div",{className:"relative mx-auto flex h-56 max-w-3xl flex-col overflow-hidden rounded-lg bg-sidebar ring-1 ring-border",children:[e.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-2 px-3",children:[e.jsx("span",{className:"h-2 w-14 rounded-full bg-foreground/80"}),e.jsx("span",{className:"h-1.5 w-16 rounded-full bg-foreground/20"}),e.jsx("span",{className:"ml-auto h-4 w-4 rounded-[4px] bg-foreground/10"}),e.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:"顶栏 48"})]}),e.jsxs("div",{className:"flex min-h-0 flex-1",children:[e.jsxs("div",{className:"flex w-[34%] shrink-0 flex-col gap-1 px-2 py-1",children:[e.jsx("span",{className:"mb-1 h-6 rounded-md bg-background shadow-raised ring-1 ring-border/80"}),e.jsx("span",{className:"h-1.5 w-10 rounded-full bg-foreground/20"}),[62,48,70,40].map((s,t)=>e.jsxs("span",{className:x("flex h-5 items-center gap-1.5 rounded-[5px] px-1.5",t===1&&"bg-background shadow-raised ring-1 ring-border/80"),children:[e.jsx("span",{className:"size-2 rounded-full ring-[1.5px] ring-inset ring-foreground/30"}),e.jsx("span",{className:"h-1.5 rounded-full bg-foreground/40",style:{width:`${s}%`}})]},t)),e.jsx("span",{className:"mt-auto font-mono text-[11px] text-muted-foreground",children:"侧栏 400(260–600)"})]}),e.jsx("div",{className:"w-1 shrink-0"}),e.jsxs("div",{className:"mb-2 mr-2 flex min-w-0 flex-1 flex-col items-center justify-center gap-2 rounded-xl border border-border/50 bg-background",children:[e.jsx("span",{className:"h-2 w-40 max-w-[70%] rounded-full bg-foreground/70"}),e.jsx("span",{className:"h-12 w-64 max-w-[80%] rounded-xl border border-border shadow-raised"}),e.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:"内容岛 · rounded-xl · mb-2 mr-2"})]})]})]})})]})}const fd={xs:"折叠箭头、行内小标记",sm:"胶囊、菜单项、按钮 sm",md:"列表行、按钮(默认)",lg:"工具栏",xl:"强调、标题旁"};function jd(){const s=Object.keys(Ys).length;return e.jsxs(Y,{id:"icons",description:`lucide 线性图标,按语义注册,共 ${s} 个。业务代码写 <Icon name="delete" />,不直接引入图标组件——换一个图标只改注册表一处。`,children:[e.jsx(p,{name:"Icon",title:"语义图标",span:2,dos:["按含义取图标(delete、branch),同一含义全站只用一个图标","图标独立承载含义时提供 aria-label 或 Tooltip"],donts:["同一个动作在不同页面用不同图标","给普通图标上色:图标颜色跟随文字,只有状态图标有颜色"],children:e.jsx("div",{className:"space-y-5",children:rr.map(t=>e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-baseline gap-2 text-xs font-medium text-foreground",children:[t.title,e.jsx("span",{className:"text-[11px] font-normal tabular-nums text-muted-foreground",children:t.names.length})]}),e.jsx("div",{className:"grid grid-cols-4 gap-1 sm:grid-cols-6 lg:grid-cols-8 xl:grid-cols-10 2xl:grid-cols-11",children:t.names.map(a=>e.jsxs("div",{title:a,className:"flex min-w-0 flex-col items-center gap-1.5 rounded-lg px-1 py-3 text-foreground/80 transition-colors hover:bg-accent hover:text-foreground",children:[e.jsx(se,{name:a}),e.jsx("span",{className:"max-w-full truncate font-mono text-[11px] text-muted-foreground",children:a})]},a))})]},t.title))})}),e.jsx(p,{name:"Size",title:"尺寸与描边",description:"五档尺寸;24px 以上(空状态插图)描边降到 1.5,避免显得笨重。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[Object.keys(Bs).map(t=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex w-8 shrink-0 justify-center text-foreground",children:e.jsx(se,{name:"agent",size:t})}),e.jsxs("span",{className:"w-14 shrink-0 font-mono text-[11px] text-foreground/80",children:[t," · ",Bs[t]]}),e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:fd[t]})]},t)),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex w-8 shrink-0 justify-center text-muted-foreground/60",children:e.jsx(se,{name:"inbox",size:32})}),e.jsx("span",{className:"w-14 shrink-0 font-mono text-[11px] text-foreground/80",children:"32 · 1.5"}),e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:"空状态插图(浅灰、细描边)"})]})]})}),e.jsx(p,{name:"Tint",title:"图标颜色",description:"默认是说明灰,悬停跟随文字变深;状态图标是唯一有颜色的图标。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(D,{label:"默认",children:e.jsxs("span",{className:"flex items-center gap-2 text-sm text-foreground/80",children:[e.jsx(se,{name:"project",className:"text-muted-foreground"}),"agent-tower"]})}),e.jsx(D,{label:"悬停 / 选中",children:e.jsxs("span",{className:"flex items-center gap-2 text-sm text-foreground",children:[e.jsx(se,{name:"project"}),"agent-tower"]})}),e.jsxs(D,{label:"状态",children:[e.jsx(se,{name:"success",className:He.success,"aria-label":"成功"}),e.jsx(se,{name:"warning",className:He.warning,"aria-label":"警告"}),e.jsx(se,{name:"error",className:He.danger,"aria-label":"错误"}),e.jsx(se,{name:"info",className:He.info,"aria-label":"信息"})]}),e.jsx(D,{label:"禁用",children:e.jsxs("span",{className:"flex items-center gap-2 text-sm text-foreground/40",children:[e.jsx(se,{name:"lock"}),"只读项目"]})})]})})]})}function bd(){const s=Object.values(ml);return e.jsxs(Y,{id:"agents",description:"Agent 靠官方 logo 区分身份,不分配颜色。没有 logo 或加载失败时退回通用芯片图标,名称照常显示。",children:[e.jsx(p,{name:"AgentLogo",title:"标志墙",span:2,donts:["给 Agent 分配主题色,或把 logo 重新着色"],children:e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-6",children:[s.map(t=>e.jsxs("div",{className:"flex min-w-0 flex-col items-center gap-2 rounded-lg border border-border/60 px-2 py-4",children:[e.jsx(le,{agentType:t.agentType,className:"size-8"}),e.jsx("span",{className:"max-w-full truncate text-xs font-medium text-foreground",children:t.label}),e.jsx("span",{className:"max-w-full truncate font-mono text-[11px] text-muted-foreground",children:t.logoSrc?t.agentType:"无 logo · 回退"})]},t.agentType)),e.jsxs("div",{className:"flex min-w-0 flex-col items-center gap-2 rounded-lg border border-dashed border-border px-2 py-4",children:[e.jsx(le,{agentType:null,className:"size-8"}),e.jsx("span",{className:"text-xs font-medium text-foreground",children:"未知 Agent"}),e.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:"fallback"})]})]})}),e.jsx(p,{name:"AgentMark",title:"标识 + 名称",description:"三档尺寸;只放 logo 时名称进入读屏文本和悬停提示。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(D,{label:"sm · 14",children:[e.jsx(te,{agentType:$.CLAUDE_CODE,size:"sm"}),e.jsx(te,{agentType:$.CODEX,size:"sm"})]}),e.jsxs(D,{label:"md · 16",children:[e.jsx(te,{agentType:$.CLAUDE_CODE}),e.jsx(te,{agentType:$.GEMINI_CLI})]}),e.jsx(D,{label:"lg · 20",children:e.jsx(te,{agentType:$.CURSOR_AGENT,size:"lg"})}),e.jsxs(D,{label:"仅 logo",children:[e.jsx(te,{agentType:$.CLAUDE_CODE,showLabel:!1}),e.jsx(te,{agentType:$.CODEX,showLabel:!1}),e.jsx(te,{agentType:$.QWEN_CODE,showLabel:!1})]})]})}),e.jsxs(p,{name:"In context",title:"在界面里",description:"输入卡下方的胶囊选择器:平时是一行灰字,悬停才浮出底色。",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx(ce,{"aria-label":"Agent",defaultValue:$.CLAUDE_CODE,menuWidth:"md",options:s.slice(0,6).map(t=>({value:t.agentType,label:t.label,icon:e.jsx(le,{agentType:t.agentType,className:"size-3.5"})}))}),e.jsx(ce,{"aria-label":"工作区",defaultValue:"worktree",menuWidth:"lg",options:[{value:"worktree",label:"新建工作树",description:"在独立分支上工作,不影响主目录"},{value:"local",label:"本地目录",description:"直接修改项目目录"}]})]}),e.jsx(V,{className:"mt-3",children:"点开试试:菜单与选择框同材质,选中项右侧对勾,可带一行说明。"})]})]})}const vd=[{name:"ease-enter",curve:at.easeEnter,points:[.16,1,.3,1],usage:"进入、展开、数值增长"},{name:"ease-move",curve:at.easeMove,points:[.2,0,0,1],usage:"位移、拖拽归位、面板滑动"},{name:"linear",curve:"linear",points:[0,0,1,1],usage:"只用于循环:转圈、扫光"}],Nd=[{ms:100,usage:"悬停变色"},{ms:150,usage:"开关、复选、分段切换、按钮"},{ms:200,usage:"折叠展开、元信息收起"},{ms:250,usage:"列表新增行(taskSlideIn)"},{ms:500,usage:"首屏标题上浮(fadeInUp)、进度增长"},{ms:700,usage:"环形进度"}];function yd({points:s}){const[t,a,n,r]=s,l=36;return e.jsxs("svg",{viewBox:`-2 -2 ${l+4} ${l+4}`,className:"size-10 shrink-0","aria-hidden":"true",children:[e.jsx("rect",{x:"0",y:"0",width:l,height:l,rx:"3",fill:"none",stroke:"var(--viz-grid)"}),e.jsx("path",{d:`M0 ${l} C ${t*l} ${l-a*l} ${n*l} ${l-r*l} ${l} 0`,fill:"none",stroke:"var(--viz-6)",strokeWidth:"2",strokeLinecap:"round"})]})}function wd(){const s=$t(),[t,a]=C.useState(!1);return e.jsxs("div",{className:"flex flex-col gap-3",children:[vd.map(n=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(yd,{points:n.points}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx(De,{children:n.name}),e.jsx("span",{className:"truncate text-xs text-muted-foreground",children:n.usage})]}),e.jsx("div",{className:"relative mt-1.5 h-5 rounded-full bg-foreground/[0.05]",children:e.jsx("span",{className:"absolute top-0.5 size-4 rounded-full bg-primary shadow-raised",style:{left:t?"calc(100% - 18px)":"2px",transition:s?"none":`left 600ms ${n.curve}`}})})]})]},n.name)),e.jsx("div",{children:e.jsx(A,{size:"sm",onClick:()=>a(n=>!n),children:"播放"})})]})}const xa=["接入飞书通知","优化终端滚动性能","补充 MCP 工具文档","修复隧道断线重连","项目设置支持快捷命令"];function kd(){const[s,t]=C.useState(0),[a,n]=C.useState([{id:0,title:"重塑左侧任务面板样式与交互"},{id:-1,title:"修复会话自动结束"}]),r=()=>{n(l=>{const i=(l[0]?.id??0)+1;return[{id:i,title:xa[(i-1)%xa.length]},...l].slice(0,4)})};return e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"flex h-40 flex-col items-center justify-center rounded-lg bg-sidebar",children:e.jsxs("div",{className:"flex animate-[fadeInUp_0.5s_cubic-bezier(0.16,1,0.3,1)] flex-col items-center",children:[e.jsx("p",{className:"text-[17px] font-medium tracking-tight text-foreground",children:"你需要做点什么?"}),e.jsx("div",{className:"mt-3 h-10 w-52 rounded-xl border border-border bg-background shadow-raised"})]},s)}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx(V,{children:"首屏 fadeInUp · 500ms · 上浮 10px"}),e.jsx(A,{size:"xs",variant:"ghost",onClick:()=>t(l=>l+1),children:"重播"})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"h-40 overflow-hidden rounded-lg bg-sidebar p-1.5",children:a.map(l=>e.jsxs("div",{className:"animate-task-enter flex h-8 items-center gap-2.5 rounded-md px-2 text-sm text-foreground/80",children:[e.jsx("span",{className:"size-3.5 shrink-0 rounded-full ring-[1.5px] ring-inset ring-foreground/30"}),e.jsx("span",{className:"truncate",children:l.title})]},l.id))}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx(V,{children:"新增行 taskSlideIn · 250ms · 下落 6px"}),e.jsx(A,{size:"xs",variant:"ghost",onClick:r,children:"新增任务"})]})]})]})}function Sd(){const[s,t]=C.useState(!1),[a,n]=C.useState(0);return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{type:"button","aria-pressed":s,"aria-label":s?"标记为未完成":"完成任务",onClick:()=>{t(r=>!r),n(r=>r+1)},className:"relative flex size-10 shrink-0 items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[s&&e.jsx("span",{"aria-hidden":"true",className:"ds-ring-burst absolute inset-1 rounded-full ring-2 ring-success"},`burst-${a}`),e.jsx("span",{className:x("flex size-6 items-center justify-center rounded-full transition-colors duration-150",s?"bg-success text-white":"ring-[1.5px] ring-inset ring-foreground/30 hover:ring-foreground/50"),children:s&&e.jsx("svg",{viewBox:"0 0 16 16",className:"size-3.5","aria-hidden":"true",children:e.jsx("path",{className:"ds-check-draw",d:"M3.5 8.5l3 3 6-7",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})},`check-${a}`)})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:x("truncate text-sm transition-colors duration-150",s?"text-muted-foreground line-through":"text-foreground"),children:"修复会话自动结束"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"点圆圈完成:对勾描绘 + 一次光环"})]})]})}function Cd(){const[s,t]=C.useState(.35);return e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(_e,{value:s,size:72,expected:.6,"aria-label":"迭代进度"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-2.5",children:[e.jsx(de,{value:s,expected:.6,size:"md","aria-label":"迭代进度"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(A,{size:"xs",onClick:()=>t(a=>Math.min(1,Math.round((a+.15)*100)/100)),children:"推进 15%"}),e.jsx(A,{size:"xs",variant:"ghost",onClick:()=>t(.35),children:"重置"})]})]})]})}function Td(){return e.jsxs(Y,{id:"motion",description:"动效只做三件事:交代新内容从哪来、确认状态变了、表明事情还在进行。所有循环动画都有减少动态效果的降级。",children:[e.jsx(p,{name:"Easing",title:"缓动",description:"界面过渡只用两条曲线,循环才用 linear。",dos:["进入用 ease-enter,位移用 ease-move"],donts:["弹跳、回弹曲线——工具界面不需要「俏皮」"],children:e.jsx(wd,{})}),e.jsx(p,{name:"Duration",title:"时长",description:"越小的变化越快;界面过渡不超过 500ms。",children:e.jsx("div",{className:"flex flex-col gap-2",children:Nd.map(s=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] tabular-nums text-foreground/80",children:[s.ms,"ms"]}),e.jsx("span",{className:"w-28 shrink-0",children:e.jsx("span",{className:"block h-1.5 rounded-full bg-viz-6",style:{width:`${s.ms/700*100}%`}})}),e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:s.usage})]},s.ms))})}),e.jsx(p,{name:"Enter",title:"进入",description:"新内容从它「来的方向」出现:首屏向上浮起,列表新行从上方落下。",span:2,children:e.jsx(kd,{})}),e.jsx(p,{name:"Celebrate",title:"完成时刻",description:"只在用户亲手完成一件事时出现一次,不循环、不放礼花。",children:e.jsx(Sd,{})}),e.jsx(p,{name:"Momentum",title:"进度增长",description:"数值变化时从旧值长到新值(500–700ms),竖线是此刻应到的位置。",children:e.jsx(Cd,{})}),e.jsx(p,{name:"Live",title:"进行中",description:"循环动画只给「正在发生」的事。",donts:["给静止的内容加呼吸、漂浮等装饰性循环"],children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(D,{label:"在线 / 运行",children:[e.jsxs("span",{className:"flex items-center gap-2 text-[13px] text-foreground/80",children:[e.jsx(Re,{label:"在线"}),"隧道已连接"]}),e.jsxs("span",{className:"flex items-center gap-2 text-[13px] text-foreground/80",children:[e.jsx(Re,{tone:"info"}),"Claude Code 运行中"]})]}),e.jsx(D,{label:"思考",children:e.jsx(lr,{text:"正在思考",className:"text-[13px]"})}),e.jsx(D,{label:"处理中",children:e.jsxs("span",{className:"text-[13px] text-muted-foreground",children:["正在创建工作区",e.jsx(ir,{})]})}),e.jsx(D,{label:"短等待",children:e.jsx(ve,{label:"正在读取文件"})})]})}),e.jsx(p,{name:"Brand",title:"品牌加载",description:"首屏加载(FullscreenLoading):Charcoal 标志缓慢呼吸,2s 一个周期。",children:e.jsx("div",{className:"flex h-28 items-center justify-center rounded-lg bg-background",children:e.jsx(xl,{})})})]})}const ma=["低","中","高","极高"],ua=[{value:"ask",label:"请求批准",description:"遵循原生审批规则,已允许的操作可以直接执行。"},{value:"sandbox",label:"自动同意(沙箱)",description:"使用原生沙箱与自动审阅,部分操作仍可能请求批准。"},{value:"full",label:"自动同意(完全访问)",description:"关闭可配置沙箱,上游强制规则仍然生效。"}],Kr=[...[$.CLAUDE_CODE,$.CODEX,$.GEMINI_CLI].map(s=>({value:s,label:$s(s),icon:e.jsx(le,{agentType:s,className:"size-3.5"})})),{value:$.CURSOR_AGENT,label:$s($.CURSOR_AGENT),icon:e.jsx(le,{agentType:$.CURSOR_AGENT,className:"size-3.5"}),description:"未检测到 cursor-agent 命令",disabled:!0}];function Md(){const[s,t]=C.useState([4]),[a,n]=C.useState([2]);return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-baseline justify-between text-[13px]",children:[e.jsx("span",{className:"font-medium text-foreground",children:"并发会话上限"}),e.jsxs("span",{className:"tabular-nums text-foreground/80",children:[s[0]," 个"]})]}),e.jsx(Nt,{value:s,onValueChange:t,min:1,max:10,"aria-label":"并发会话上限"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-baseline justify-between text-[13px]",children:[e.jsx("span",{className:"font-medium text-foreground",children:"推理强度"}),e.jsx("span",{className:"text-foreground/80",children:ma[a[0]]})]}),e.jsx(Nt,{value:a,onValueChange:n,min:0,max:3,step:1,marks:[0,1,2,3],"aria-label":"推理强度"}),e.jsx("div",{className:"mt-1.5 flex justify-between text-xs text-muted-foreground",children:ma.map(r=>e.jsx("span",{children:r},r))})]})]})}function Ad(){const[s,t]=C.useState(["agent-tower"]),[a,n]=C.useState(["design-system.png","tokens.css","TaskList.tsx"]),r=l=>t(i=>i.includes(l)?i.filter(c=>c!==l):[...i,l]);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.jsx(xt,{selected:s.length===0,onClick:()=>t([]),children:"全部项目"}),ee.slice(0,3).map((l,i)=>e.jsx(xt,{selected:s.includes(l.name),onClick:()=>r(l.name),icon:e.jsx(ns,{color:l.color}),count:[24,7,3][i],children:l.name},l.name))]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[a.map(l=>e.jsx(xn,{icon:e.jsx(nn,{}),onRemove:()=>n(i=>i.filter(c=>c!==l)),children:l},l)),a.length===0&&e.jsx(A,{size:"xs",variant:"ghost",onClick:()=>n(["design-system.png","tokens.css","TaskList.tsx"]),children:"恢复示例"})]})]})}function Ed(){const[s,t]=C.useState(!1),a=C.useRef(null),n=()=>{t(!0),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>t(!1),1800)};return e.jsxs("div",{className:"mx-auto flex max-w-2xl flex-col items-center py-4",children:[e.jsx("h3",{className:"mb-6 text-center text-[26px] font-medium leading-snug tracking-tight text-foreground",children:"你需要在 agent-tower 中做点什么?"}),e.jsx(cr,{placeholder:"描述一个任务,Agent 会在独立工作树里完成它",defaultValue:"把左侧任务面板改成紧凑的两行布局",submitLabel:"创建并启动",submitHint:"创建并启动",submitting:s,pendingLabel:"正在创建工作区…",onSubmit:n,toolbarStart:e.jsx(J,{size:"sm",label:"添加附件",children:e.jsx(rn,{})}),footer:e.jsxs(e.Fragment,{children:[e.jsx(ce,{"aria-label":"项目",defaultValue:"agent-tower",options:ee.map(r=>({value:r.name,label:r.name,icon:e.jsx(ns,{color:r.color})}))}),e.jsx(ce,{"aria-label":"Agent",defaultValue:$.CLAUDE_CODE,options:Kr}),e.jsx(ce,{"aria-label":"工作区",defaultValue:"worktree",icon:e.jsx(Rs,{}),menuWidth:"lg",options:[{value:"worktree",label:"新建工作树",description:"在独立分支上工作,不影响主目录"},{value:"local",label:"本地目录",description:"直接修改项目目录,适合一次性小改动"}]})]})})]})}function _d(){const[s,t]=C.useState("先读 TaskList.tsx 与 sidebar-styles.ts,保持 32px 行高;元信息悬停时收起。");return e.jsxs(Y,{id:"inputs",description:"输入控件共用一个外壳:白底、1px 边框、10px 圆角。焦点 = 边框加深为中性灰;错误 = 红边框 + 字段下方一行红字,不弹窗、不清空输入。",children:[e.jsx(p,{name:"Field · Input",title:"字段与输入框",description:"标签在上、说明在下;Field 自动把 id、说明、错误态接到内部控件上。",span:2,dos:["错误信息说清楚怎么改:「目录不是 Git 仓库」而不是「输入有误」"],donts:["用占位符代替标签","输入时就报错——等失焦或提交时再校验"],children:e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsx(ae,{label:"项目名称",required:!0,description:"用于侧栏与任务标签,可随时修改",children:e.jsx(Ne,{defaultValue:"agent-tower"})}),e.jsx(ae,{label:"仓库路径",error:"这个目录不是 Git 仓库,初始化后才能使用工作树",children:e.jsx(Ne,{defaultValue:"/Users/shitian/Work/notes",prefix:e.jsx(Ka,{})})}),e.jsx(ae,{label:"开发端口",description:"留空则按项目自动分配",children:e.jsx(Ne,{placeholder:"5173",inputMode:"numeric",suffix:e.jsx("span",{className:"text-xs",children:"端口"})})}),e.jsx(ae,{label:"分支前缀",counter:"7 / 24",children:e.jsx(Ne,{size:"sm",defaultValue:"feat/ds"})}),e.jsx(ae,{label:"默认分支",description:"只读:由仓库决定",children:e.jsx(Ne,{disabled:!0,defaultValue:"main"})})]})}),e.jsx(p,{name:"Textarea",title:"多行输入",description:"Prompt、脚本、说明文字;可随内容增高。",children:e.jsx(ae,{label:"任务说明",counter:`${s.length} / 500`,children:e.jsx(Ua,{autoResize:!0,minRows:3,maxRows:6,value:s,onChange:a=>t(a.target.value.slice(0,500))})})}),e.jsx(p,{name:"SearchField",title:"搜索",description:"放大镜前缀;有内容时出现清除按钮,Esc 同样清空。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(ot,{placeholder:"搜索任务",shortcut:["⌘","K"],"aria-label":"搜索任务"}),e.jsx(ot,{size:"sm",defaultValue:"design",placeholder:"筛选文件","aria-label":"筛选文件"})]})}),e.jsx(p,{name:"Select",title:"选择框",description:"5 个以上互斥选项时用;更少时用分段或单选,全部可见更快。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ae,{label:"Provider",children:e.jsx(mt,{defaultValue:"anthropic",options:[{value:"anthropic",label:"Anthropic 官方",description:"使用 Claude Code 自带的登录"},{value:"bedrock",label:"AWS Bedrock",description:"按 AWS 账号计费"},{value:"vertex",label:"Google Vertex AI"},{value:"proxy",label:"自定义代理",description:"兼容 Anthropic API 的网关"},{value:"disabled",label:"OpenRouter",description:"尚未配置密钥",disabled:!0}]})}),e.jsx(ae,{label:"目标分支",children:e.jsx(mt,{size:"sm",placeholder:"选择分支",options:["main","develop","release/1.3","feat/design-system","fix/session-timeout"].map(a=>({value:a,label:a,icon:e.jsx(Rs,{})}))})})]})}),e.jsx(p,{name:"Slider",title:"滑块",description:"连续或分档取值;精确数值必须同时以文字显示。",children:e.jsx(Md,{})}),e.jsx(p,{name:"Segmented",title:"分段选择",description:"2–5 个互斥选项、切换后原地刷新内容。选中段是浮起的白卡。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ps,{"aria-label":"视图",defaultValue:"list",options:[{value:"list",label:"列表",icon:e.jsx(Li,{})},{value:"board",label:"看板",icon:e.jsx(ci,{})},{value:"calendar",label:"日历",icon:e.jsx(An,{})}]}),e.jsx(ps,{"aria-label":"任务状态",defaultValue:"all",options:[{value:"all",label:"全部",count:24},{value:"running",label:"运行中",count:3},{value:"review",label:"待审查",count:2}]}),e.jsx(ps,{"aria-label":"时间范围",size:"sm",defaultValue:"30",options:[{value:"7",label:"7 天"},{value:"30",label:"30 天"},{value:"90",label:"90 天"}]})]})}),e.jsx(p,{name:"Tabs",title:"标签页",description:"同一对象的不同面,切换整块内容区。下划线式,切换时字重不变、不抖动。",children:e.jsxs(or,{defaultValue:"changes",children:[e.jsxs(dr,{children:[e.jsx(ms,{value:"conversation",children:"对话"}),e.jsx(ms,{value:"changes",count:12,children:"变更"}),e.jsx(ms,{value:"terminal",children:"终端"}),e.jsx(ms,{value:"preview",disabled:!0,children:"预览"})]}),e.jsx(zs,{value:"conversation",children:e.jsx(V,{children:"与 Agent 的对话记录。"})}),e.jsx(zs,{value:"changes",children:e.jsx(V,{children:"12 个文件有改动,+412 −187。"})}),e.jsx(zs,{value:"terminal",children:e.jsx(V,{children:"工作区终端。"})})]})}),e.jsx(p,{name:"Chip · Tag",title:"筛选胶囊与标签",description:"胶囊是可切换的筛选条件,选中为 Charcoal 实心;标签是已添加的条目,可移除。",children:e.jsx(Ad,{})}),e.jsxs(p,{name:"ChipSelect",title:"胶囊选择器",description:"输入卡下方、工具栏里的轻量参数:平时只是灰字 + 图标,悬停才浮出底色;点开是单选菜单。",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(D,{label:"已选",children:[e.jsx(ce,{"aria-label":"Agent",defaultValue:$.CLAUDE_CODE,options:Kr}),e.jsx(ce,{"aria-label":"执行权限",icon:e.jsx(Na,{}),defaultValue:"ask",menuWidth:"lg",showMenuLabel:!0,options:ua})]}),e.jsx(D,{label:"未选",children:e.jsx(ce,{"aria-label":"目标分支",icon:e.jsx(Rs,{}),placeholder:"选择分支",options:["main","release/1.3","feat/design-system"].map(a=>({value:a,label:a}))})}),e.jsx(D,{label:"禁用",children:e.jsx(ce,{"aria-label":"Provider",disabled:!0,defaultValue:"official",options:[{value:"official",label:"Anthropic 官方"}]})})]}),e.jsx(V,{className:"mt-4",children:'不可用的选项留在菜单里并写明原因(点开 Agent 看 Cursor Agent);带说明的选项用宽菜单 menuWidth="lg"。'})]}),e.jsx(p,{name:"Switch · Checkbox · Radio",title:"开关、复选与单选",description:"开关立即生效;复选框用于需要提交的选择;单选用于 2–5 个需要读说明才能选的互斥项。",span:2,children:e.jsxs("div",{className:"grid gap-8 lg:grid-cols-3",children:[e.jsx("div",{className:"flex flex-col divide-y divide-border/50",children:[{label:"任务完成时发送系统通知",checked:!0},{label:"自动生成提交信息",checked:!1},{label:"合并后删除工作树",checked:!0,disabled:!0}].map(a=>e.jsxs("label",{className:x("flex items-center justify-between gap-4 py-2.5 first:pt-0",a.disabled&&"opacity-50"),children:[e.jsx("span",{className:"text-[13px] text-foreground",children:a.label}),e.jsx(Nn,{defaultChecked:a.checked,disabled:a.disabled,"aria-label":a.label})]},a.label))}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(ye,{defaultChecked:!0,label:"合并后删除分支"}),e.jsx(ye,{label:"推送前运行测试",description:"在工作树里执行 pnpm test,失败则中止推送"}),e.jsx(ye,{checked:"indeterminate",label:"选中 3 / 5 个文件"}),e.jsx(ye,{disabled:!0,label:"签名提交(未配置 GPG)"})]}),e.jsx(vn,{"aria-label":"执行权限",defaultValue:"ask",options:ua})]})}),e.jsx(p,{name:"Composer",title:"输入卡",description:"主页的「一句话发起任务」:Enter 提交、Shift+Enter 换行,输入法组字时不提交。参数用卡片下方的胶囊,不塞进卡片里。",span:2,children:e.jsx(Ed,{})})]})}function ds({icon:s,trailing:t,tone:a="neutral",highlighted:n=!1,children:r}){return e.jsxs("div",{className:x(Wt,a==="danger"&&bn,n&&"bg-accent text-foreground"),children:[e.jsx("span",{className:x("flex shrink-0",a==="danger"?"text-current":"text-muted-foreground"),children:s}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:r}),t]})}function zd(){return e.jsxs("div",{className:x(Ut,"w-60"),role:"presentation",children:[e.jsx("div",{className:Gt,children:"任务"}),e.jsx(ds,{icon:e.jsx(nt,{}),trailing:e.jsx("span",{className:ht,children:"⌘⏎"}),children:"在新标签页打开"}),e.jsx(ds,{icon:e.jsx(Fs,{}),highlighted:!0,children:"复制分支名"}),e.jsx(ds,{icon:e.jsx(ln,{}),trailing:e.jsx("span",{className:ht,children:"F2"}),children:"重命名"}),e.jsx("div",{className:ut}),e.jsx(ds,{icon:e.jsx(Vt,{}),trailing:e.jsx(zt,{className:"ml-auto size-3.5 text-muted-foreground"}),children:"优先级"}),e.jsx("div",{className:ut}),e.jsx(ds,{icon:e.jsx(ss,{}),tone:"danger",children:"删除任务"})]})}function ha(){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"状态"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(ye,{defaultChecked:!0,label:"运行中"}),e.jsx(ye,{defaultChecked:!0,label:"待审查"}),e.jsx(ye,{label:"已完成"})]})]})}function Dd(){const[s,t]=C.useState(!1),[a,n]=C.useState(!1),r=C.useRef(null),l=()=>{n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n(!1),t(!1)},1200)};return e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(wn,{children:[e.jsx(Sn,{asChild:!0,children:e.jsx(A,{children:"新建项目"})}),e.jsx(kn,{title:"新建项目",description:"选择一个 Git 仓库,Agent 会在它的工作树里完成任务。",footer:e.jsxs(e.Fragment,{children:[e.jsx(pt,{asChild:!0,children:e.jsx(A,{variant:"ghost",children:"取消"})}),e.jsx(pt,{asChild:!0,children:e.jsx(A,{variant:"primary",children:"创建项目"})})]}),children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ae,{label:"项目名称",required:!0,children:e.jsx(Ne,{defaultValue:"agent-tower"})}),e.jsx(ae,{label:"仓库路径",description:"必须是 Git 仓库的根目录",children:e.jsx(Ne,{defaultValue:"~/Work/agent-tower",prefix:e.jsx(Ka,{})})})]})})]}),e.jsx(A,{tone:"danger",onClick:()=>t(!0),children:"删除项目…"}),e.jsx(yn,{open:s,onOpenChange:t,tone:"danger",title:"删除项目 agent-tower?",description:"项目下的 24 个任务与工作树会一起删除,仓库本身不受影响。删除后无法恢复。",confirmLabel:"删除项目",cancelLabel:"取消",loading:a,onConfirm:l})]})}function Rd(){const[s,t]=C.useState("high");return e.jsxs(Y,{id:"overlays",description:"浮层共用一种材质:白底、1px 边框、popover 阴影、10px 圆角。由轻到重:Tooltip → 菜单 → 气泡面板 → 对话框。",children:[e.jsx(p,{name:"Menu",title:"菜单",description:"条目 13px、8px 圆角;图标在左、快捷键在右,危险操作放最后并用分隔线隔开。",canvas:"chrome",dos:["菜单文案用动词开头:「复制分支名」","危险项放最后,前面加分隔线"],donts:["在菜单里放表单——那是气泡面板的事"],children:e.jsxs("div",{className:"flex flex-wrap items-start gap-6",children:[e.jsx(zd,{}),e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsx(V,{children:"可交互版本:"}),e.jsxs(Xa,{children:[e.jsx(an,{asChild:!0,children:e.jsx(A,{size:"sm",children:"任务操作"})}),e.jsxs(Qa,{className:"w-56",children:[e.jsx(Za,{children:"任务"}),e.jsx(_s,{icon:e.jsx(nt,{}),shortcut:"⌘⏎",children:"在新标签页打开"}),e.jsx(_s,{icon:e.jsx(Fs,{}),children:"复制分支名"}),e.jsx(dt,{}),e.jsxs(en,{children:[e.jsx(tn,{icon:e.jsx(Vt,{}),children:"优先级"}),e.jsx(sn,{children:e.jsxs(Ja,{value:s,onValueChange:t,children:[e.jsx(xs,{value:"urgent",children:"P0 紧急"}),e.jsx(xs,{value:"high",children:"P1 高"}),e.jsx(xs,{value:"normal",children:"P2 普通"}),e.jsx(xs,{value:"low",children:"P3 低"})]})})]}),e.jsx(dt,{}),e.jsx(_s,{icon:e.jsx(ss,{}),tone:"danger",children:"删除任务"})]})]}),e.jsxs(Va,{children:[e.jsx(Ya,{className:"flex h-20 w-44 items-center justify-center rounded-lg border border-dashed border-border bg-background text-xs text-muted-foreground",children:"在这里右键"}),e.jsxs(Ha,{className:"w-48",children:[e.jsx(Es,{icon:e.jsx(Fs,{}),children:"复制路径"}),e.jsx(Es,{icon:e.jsx(nt,{}),children:"在编辑器中打开"}),e.jsx(qa,{}),e.jsx(Es,{icon:e.jsx(ss,{}),tone:"danger",children:"删除文件"})]})]})]})]})}),e.jsx(p,{name:"Tooltip",title:"悬停提示",description:"深色反色面、无箭头,只放补充信息;键盘聚焦同样出现。",donts:["把必须知道的信息只藏在 Tooltip 里"],children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("span",{className:"flex max-w-[260px] items-center gap-2 rounded-lg bg-inverse px-2.5 py-1.5 text-xs leading-relaxed text-inverse-foreground shadow-popover",children:["搜索任务",e.jsx(Ee,{keys:["⌘","K"],inverse:!0})]}),e.jsx("span",{className:"max-w-[220px] rounded-lg bg-inverse px-2.5 py-1.5 text-xs leading-relaxed text-inverse-foreground shadow-popover",children:"修复 Claude 会话自动结束及停止时进程树清理超时"})]}),e.jsxs(D,{label:"悬停试试",children:[e.jsx(Qe,{content:"刷新状态",children:e.jsx(A,{size:"sm",variant:"ghost",children:"刷新"})}),e.jsx(Qe,{content:"新建任务",shortcut:["⌘","N"],children:e.jsx(A,{size:"sm",children:"新建"})}),e.jsx(Qe,{content:"下方显示",side:"bottom",children:e.jsx(A,{size:"sm",variant:"ghost",children:"下方"})})]})]})}),e.jsxs(p,{name:"Popover",title:"气泡面板",description:"小表单、筛选器、详情预览:比菜单内容多,又不值得开对话框。",canvas:"chrome",children:[e.jsxs("div",{className:"flex flex-wrap items-start gap-6",children:[e.jsxs("div",{className:"w-64 rounded-lg border border-border bg-popover p-3 text-sm text-popover-foreground shadow-popover",role:"presentation",children:[e.jsx(ha,{}),e.jsxs("div",{className:"mt-3 flex justify-end gap-1.5 border-t border-border/60 pt-3",children:[e.jsx(A,{size:"sm",variant:"ghost",children:"重置"}),e.jsx(A,{size:"sm",variant:"primary",children:"应用"})]})]}),e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsx(V,{children:"可交互版本:"}),e.jsxs($a,{children:[e.jsx(Fa,{asChild:!0,children:e.jsxs(A,{size:"sm",children:[e.jsx(Dn,{}),"筛选"]})}),e.jsxs(Oa,{className:"w-64",children:[e.jsx(ha,{}),e.jsxs("div",{className:"mt-3 flex justify-end gap-1.5 border-t border-border/60 pt-3",children:[e.jsx(it,{asChild:!0,children:e.jsx(A,{size:"sm",variant:"ghost",children:"重置"})}),e.jsx(it,{asChild:!0,children:e.jsx(A,{size:"sm",variant:"primary",children:"应用"})})]})]})]})]})]}),e.jsx(V,{className:"mt-4",children:"与菜单同材质,内边距 12px;底部操作区与对话框一致,主按钮在右。"})]}),e.jsxs(p,{name:"Dialog",title:"对话框",description:"需要专注完成的一件事。遮罩 20% 黑,面板 14px 圆角;Esc 或点遮罩关闭,焦点在关闭后归还。",dos:["确认框写清后果:「删除后无法恢复」","主按钮写动作本身:「删除项目」"],donts:["对话框里再开对话框"],children:[e.jsxs("div",{className:"mb-4 overflow-hidden rounded-xl border border-border bg-background shadow-overlay",children:[e.jsxs("div",{className:"px-4 pb-2 pt-4",children:[e.jsx("div",{className:"text-[15px] font-semibold text-foreground",children:"删除项目 agent-tower?"}),e.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:"项目下的 24 个任务与工作树会一起删除。删除后无法恢复。"})]}),e.jsxs("div",{className:"flex justify-end gap-2 border-t border-border/60 bg-foreground/[0.015] px-4 py-2.5",children:[e.jsx(A,{size:"sm",variant:"ghost",children:"取消"}),e.jsx(A,{size:"sm",variant:"primary",tone:"danger",children:"删除项目"})]})]}),e.jsx(Dd,{})]})]})}const tt=6e4,Id=[{id:"todo-1",title:"审查「重塑左侧任务面板」的改动",state:"doing",tag:e.jsx(Pe,{name:"agent-tower",color:"text-indigo-600"}),due:{label:"今天",tone:"warning"}},{id:"todo-2",title:"续期隧道证书",state:"todo",tag:e.jsx(Pe,{name:"desktop-shell",color:"text-rose-600"}),due:{label:"逾期 1 天",tone:"danger"}},{id:"todo-3",title:"给 TeamRun 写拓扑模板说明",state:"todo",due:{label:"10/17"}},{id:"todo-4",title:"合并 v1.2 发布分支",state:"done",due:{label:"10/09"}},{id:"todo-5",title:"迁移旧的 Provider 配置",state:"cancelled"}];function Ld(){const[s,t]=C.useState(Id),a=n=>{t(r=>r.map(l=>l.id===n?{...l,state:l.state==="done"?"todo":"done"}:l))};return e.jsx(Da,{items:s,onToggle:a})}function je({agentType:s}){return e.jsx("span",{className:"flex size-6 items-center justify-center rounded-full bg-background ring-1 ring-border",children:e.jsx(le,{agentType:s,className:"size-3.5"})})}function Pd(){return e.jsxs(Y,{id:"lists",description:"清单是最常见的展示形式:每行一件事,状态在左、元信息在右。行间 1px 细线,悬停浅灰;只有临近或逾期的日期才上色。",children:[e.jsx(p,{name:"TodoList",title:"待办",description:"状态图标与任务状态同一套,可点击切换完成;顶部是各状态计数。逾期红、今天到期橙,其余日期灰。",children:e.jsx(Ld,{})}),e.jsx(p,{name:"Timeline",title:"日程",description:"按天分组的时间线:起止时间对齐成列,竖条表示时长,进行中的一项竖条变黑。",children:e.jsx(za,{groups:[{id:"today",title:"今天",caption:"10 月 14 日 周三",entries:[{id:"tl-1",time:"09:30",endTime:"10:00",title:"站会",meta:"线上 · 6 人"},{id:"tl-2",time:"10:00",endTime:"12:00",title:"Claude Code:重塑任务面板",tag:e.jsx(Q,{size:"sm",variant:"dot",tone:"success",children:"已完成"})},{id:"tl-3",time:"14:00",endTime:"15:00",title:"设计评审:组件库",meta:"会议室 3"},{id:"tl-4",time:"15:00",endTime:"16:30",title:"TeamRun:设计系统展示页",active:!0,tag:e.jsx(Re,{tone:"info",label:"进行中"})},{id:"tl-5",time:"17:00",title:"TeamRun 演示"}]},{id:"tomorrow",title:"明天",caption:"10 月 15 日 周四",entries:[{id:"tl-6",time:"10:00",endTime:"11:00",title:"迭代周会",meta:"线上"}]}]})}),e.jsx(p,{name:"ActivityFeed",title:"动态",description:"谁在什么时候做了什么。主语加粗,时间右对齐,附加内容缩进在下方。",children:e.jsx(Ca,{entries:[{id:"act-1",avatar:e.jsx(je,{agentType:$.CLAUDE_CODE}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"Claude Code"})," 提交了 3 个文件"]}),time:"4 分钟",detail:e.jsx("span",{className:"font-mono text-[11px]",children:"feat(web): 重塑左侧任务面板样式与交互"})},{id:"act-2",avatar:e.jsx(ie,{name:"林夏",size:"sm"}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"林夏"})," 把任务移到了「待审查」"]}),time:"12 分钟"},{id:"act-3",avatar:e.jsx(je,{agentType:$.CODEX}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"Codex"})," 开始执行「修复会话自动结束」"]}),time:"25 分钟"},{id:"act-4",avatar:e.jsx("span",{className:"flex size-6 items-center justify-center rounded-full bg-foreground/[0.06] text-muted-foreground",children:e.jsx(Ht,{className:"size-3.5","aria-hidden":"true"})}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"周远"})," 合并了 feat/approval-loop"]}),time:"1 小时",detail:e.jsx(Ae,{additions:865,deletions:233})}]})}),e.jsx(p,{name:"DeadlineList",title:"到期提醒",description:"大号天数先抓住视线:逾期红、3 天内橙、其余墨色——越紧急越醒目。",children:e.jsx(Ma,{items:[{id:"dl-1",days:-2,title:"隧道证书续期",meta:"desktop-shell · 运维"},{id:"dl-2",days:0,title:"组件库提测",meta:"设计系统 v1"},{id:"dl-3",days:2,title:"回复设计评审意见",meta:"设计系统 v1"},{id:"dl-4",days:7,title:"主页迁移",meta:"agent-tower"}]})}),e.jsxs(p,{name:"Leaderboard",title:"排行榜",description:"前三名序号加深;名次变化用小箭头,不用奖牌和彩色。",children:[e.jsx(Aa,{entries:[{id:"lb-1",name:"Claude Code",avatar:e.jsx(je,{agentType:$.CLAUDE_CODE}),meta:"486 次会话",value:"74%",change:1},{id:"lb-2",name:"Codex",avatar:e.jsx(je,{agentType:$.CODEX}),meta:"312 次会话",value:"61%",change:-1},{id:"lb-3",name:"Cursor Agent",avatar:e.jsx(je,{agentType:$.CURSOR_AGENT}),meta:"97 次会话",value:"60%",change:2},{id:"lb-4",name:"Qwen Code",avatar:e.jsx(je,{agentType:$.QWEN_CODE}),meta:"41 次会话",value:"50%"},{id:"lb-5",name:"Gemini CLI",avatar:e.jsx(je,{agentType:$.GEMINI_CLI}),meta:"158 次会话",value:"47%",change:-2}]}),e.jsx(V,{className:"mt-2",children:"一次通过审查的比例 · 10 月"})]}),e.jsx(p,{name:"Bulletin",title:"公告",description:"日期块 + 标题 + 一两行正文;类型徽章只用 neutral,维护这类需要注意的才上色。",children:e.jsx(Ta,{locale:"zh-CN",items:[{id:"bl-1",date:new Date(2026,9,14),title:"设计系统 v1 上线",body:"组件、设计规范与扩展规则都在 /design-system,新页面请从这里取组件。",badge:e.jsx(Q,{size:"sm",children:"公告"})},{id:"bl-2",date:new Date(2026,9,12),title:"隧道服务维护",body:"10 月 16 日 02:00–03:00 远程访问不可用,本地使用不受影响。",badge:e.jsx(Q,{size:"sm",tone:"warning",children:"维护"})},{id:"bl-3",date:new Date(2026,9,9),title:"v1.2:三档执行权限",body:"请求批准、自动同意(沙箱)、自动同意(完全访问)。",badge:e.jsx(Q,{size:"sm",children:"更新"}),meta:"发布说明"}]})})]})}const $d=[{key:"title",header:"任务",render:s=>e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-foreground",children:s.title}),e.jsx(Pe,{name:s.project.name,color:s.project.color})]})},{key:"status",header:"状态",width:"96px",render:s=>e.jsx(Ps,{status:s.status})},{key:"agent",header:"Agent",width:"136px",render:s=>e.jsx(te,{agentType:s.agent,size:"sm"})},{key:"minutes",header:"耗时",width:"80px",numeric:!0,sortable:!0,render:s=>s.minutes?`${s.minutes} 分钟`:"—"},{key:"changes",header:"改动",width:"112px",numeric:!0,sortable:!0,sortValue:s=>s.additions+s.deletions,render:s=>e.jsx(Ae,{additions:s.additions,deletions:s.deletions})},{key:"updatedAt",header:"更新",width:"80px",numeric:!0,sortable:!0,render:s=>e.jsx(ne,{value:s.updatedAt,now:H,className:"text-xs"})}];function Od(){const[s,t]=C.useState("data"),[a,n]=C.useState(js[0].id);return e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(ps,{"aria-label":"表格状态",size:"sm",value:s,onValueChange:t,options:[{value:"data",label:"数据"},{value:"loading",label:"首次加载"},{value:"empty",label:"无结果"}]}),e.jsx(Rr,{caption:"最近的任务",columns:$d,rows:s==="empty"?[]:js,rowKey:r=>r.id,loading:s==="loading",defaultSort:{key:"updatedAt",direction:"desc"},selectedKey:a,onRowClick:r=>n(r.id),empty:e.jsx(fs,{size:"sm",icon:e.jsx(on,{}),title:"没有匹配的任务",description:"换个关键词,或清除筛选条件"})})]})}function Fd(){return e.jsxs(Y,{id:"tables",description:"需要逐行比较、排序时用表格。表头 12px 灰字,行高 36px,数字列右对齐等宽;状态列用图标 + 文字。热力表用墨阶表示强弱,格内仍写数字。",children:[e.jsx(p,{name:"DataTable",title:"数据表",description:"可排序的列悬停才显示排序箭头;可点击的行支持 Enter 打开,选中行浅灰底。",span:2,dos:["刷新时保留旧数据,骨架只用于首次加载","空结果给出下一步:「换个关键词」"],donts:["斑马纹和竖线网格——行间细线就够了","数字列左对齐"],children:e.jsx(Od,{})}),e.jsxs(p,{name:"HeatTable",title:"热力表",description:"两个维度交叉的强弱:颜色帮助扫视,数字负责精确,打印和色弱同样可读。",children:[e.jsx(Tr,{"aria-label":"各项目按星期的任务数",corner:"项目",rows:ee.map(s=>({name:s.name,label:e.jsxs(e.Fragment,{children:[e.jsx(ns,{color:s.color,className:"mr-1.5 inline-block align-[1px]"}),s.name]})})),columns:Fo,data:Bo}),e.jsx(St,{className:"mt-3"})]}),e.jsxs(p,{name:"CalendarHeatmap",title:"日历热力",description:"每天的活跃度:周为列、星期为行,5 档墨阶;悬停看具体日期和数值。",children:[e.jsx(Mr,{"aria-label":"近 26 周每日会话数",start:Ur,values:oa,locale:"zh-CN",describe:(s,t)=>`${s.getMonth()+1} 月 ${s.getDate()} 日 · ${t} 次会话`}),e.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[e.jsxs(V,{children:["近 26 周 · 共 ",oa.reduce((s,t)=>s+t,0).toLocaleString("zh-CN")," 次会话"]}),e.jsx(St,{})]})]})]})}function Bd(){return e.jsxs(Y,{id:"schedule",description:"流程回答「走到哪一步了、卡在哪」,排期回答「什么时候、谁在做」。都用「今天」竖线做参照,受阻和逾期是唯一的彩色。",children:[e.jsx(p,{name:"ProcessSteps",title:"流程步骤",description:"任务生命周期 / SOP:已完成的连线变黑,当前步骤黑框,受阻的步骤用红色——整条流程唯一需要处理的地方。",span:2,children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(Tt,{steps:[{id:"p1",title:"创建任务",owner:"林夏",time:"09:12",status:"done"},{id:"p2",title:"准备工作区",owner:"自动",time:"09:13",status:"done"},{id:"p3",title:"Agent 执行",owner:"Claude Code",time:"48 分钟",status:"done"},{id:"p4",title:"代码审查",owner:"林夏",time:"进行中",status:"current"},{id:"p5",title:"合并",status:"upcoming"}]}),e.jsx(Tt,{steps:[{id:"q1",title:"创建任务",owner:"周远",time:"昨天",status:"done"},{id:"q2",title:"准备工作区",owner:"自动",time:"依赖安装失败",status:"blocked"},{id:"q3",title:"Agent 执行",status:"upcoming"},{id:"q4",title:"代码审查",status:"upcoming"},{id:"q5",title:"合并",status:"upcoming"}]})]})}),e.jsx(p,{name:"TopologyTree",title:"拓扑树",description:"TeamRun 团队结构:自上而下的层级,节点是小白卡,当前关注的节点加深描边。",span:2,canvas:"chrome",children:e.jsx(Lr,{root:{id:"lead",title:"Lead",subtitle:"Claude Code · 拆解与汇总",icon:e.jsx(le,{agentType:$.CLAUDE_CODE}),status:e.jsx(Re,{tone:"info",label:"运行中"}),children:[{id:"planner",title:"Planner",subtitle:"Codex",icon:e.jsx(le,{agentType:$.CODEX})},{id:"coder",title:"Coder",subtitle:"2 个实例",icon:e.jsx(Ba,{}),active:!0,children:[{id:"coder-a",title:"Coder A",subtitle:"组件库",icon:e.jsx(le,{agentType:$.CLAUDE_CODE}),status:e.jsx(Re,{tone:"info",label:"运行中"})},{id:"coder-b",title:"Coder B",subtitle:"展示页",icon:e.jsx(le,{agentType:$.GEMINI_CLI}),status:e.jsx(Re,{tone:"info",label:"运行中"})}]},{id:"reviewer",title:"Reviewer",subtitle:"Codex · 等待中",icon:e.jsx(Gs,{})}]}})}),e.jsx(p,{name:"GanttChart",title:"甘特图",description:"横条是起止,墨色部分是已完成的比例,斜纹是剩余;竖线是今天。条外写负责人,不靠颜色区分人。",span:2,children:e.jsx(Er,{"aria-label":"v1.3 里程碑排期",tasks:Wo,start:Go,days:28,today:9,locale:"zh-CN"})}),e.jsx(p,{name:"MonthCalendar",title:"月历",description:"一个月的事件:今天是黑底日期;只有带状态含义的事件(到期、维护)才上色,超出的折叠成「+N」。",span:2,children:e.jsx(_r,{year:2026,month:9,today:"2026-10-14",events:Uo,locale:"zh-CN"})})]})}const Gd=[{name:"林夏"},{name:"周远"},{name:"陈默"},{name:"Alex Kim"},{name:"王若"},{name:"Sam Lee"}],Wd=`export function navRowClassName(active: boolean, className?: string) {
1
+ import{c as W,r as C,v as pa,j as e,y as he,P as fe,x as ts,C as ga,w as Vr,z as Hr,a8 as fa,a9 as _t,a4 as ja,ae as Ns,bF as ba,aE as va,bD as Na,ba as qr,bG as Gs,aW as Rs,ax as Yr,ay as Ws,b9 as Xr,X as ya,a2 as zt,s as wa,aQ as Dt,l as x,bH as bs,bI as Qr,aB as ve,bJ as T,bK as ue,aw as ka,be as Rt,bL as Ve,u as as,a6 as Q,M as pe,bM as X,bN as Z,bO as Zr,bP as xe,bQ as Ie,bR as ys,bS as Me,bT as Us,bU as Sa,bV as ws,bW as It,bX as Le,bY as Ca,bZ as te,b_ as Ts,b$ as Ta,a5 as A,c0 as Is,c1 as Ma,bl as Ae,c2 as Aa,c3 as at,aS as Ls,aj as Se,c4 as Ce,c5 as ns,c6 as Pe,c7 as ne,bd as He,bm as Jr,c8 as el,c9 as Ea,ca as Ps,cb as _a,cc as sl,cd as za,ce as Da,a$ as tl,bg as al,cf as nl,cg as Ra,K as rl,ch as ll,ci as il,cj as ol,aH as dl,ck as cl,b5 as $,bq as re,az as Te,bb as $s,_ as le,cl as xl,cm as ml,cn as nt,co as ul,br as sa,N as ta}from"./index-BszkzNS4.js";import{E as Ia,S as La,I as J,a as ps,B as hl}from"./BrandLogo-fR2lCwEo.js";import{c as Je,l as ge,T as de,n as es,a as Lt,b as Pt,d as rt,e as Pa,q as Os,f as pl,g as gl}from"./track-Cv7h6oaE.js";import{F as lt,u as Ks,d as Vs,e as $e,I as Ne,P as $a,f as fl,c as it,b as Oa,a as Fa,S as ot,g as $t}from"./popover-CTqvKqTR.js";import{H as jl,C as Ba,G as bl,P as Ga,b as Ot,c as Ms,d as As,e as vl,f as ae,g as cs,h as Nl,i as We,F as yl,j as Ft,T as Wa,k as Ua,l as wl,r as kl,a as Ka}from"./content-DZozZbBD.js";import{K as Sl}from"./key-round-wojrCrDP.js";import{G as Cl,R as Tl,T as Ml,P as Al,C as El,L as _l,f as zl,g as Dl,I as Rl,h as Va,i as Ha,j as Es,k as Il,l as qa,m as Ya,M as Xa,n as Ll,b as Qa,o as Pl,p as _s,c as Za,d as Ja,e as xs,q as dt,r as en,s as sn,t as tn,a as an}from"./menu-CMqbaDni.js";import{G as $l}from"./globe-DAFqpAcW.js";import{S as Ol}from"./server-D7knl8H9.js";import{F as nn,t as ct,T as Qe}from"./tooltip-Cirpotu3.js";import{L as Fl}from"./link-jWQOSQOQ.js";import{P as rn}from"./paperclip-C4t49vX2.js";import{U as Bl}from"./upload-tLVD0xMT.js";import{C as rs}from"./check-yNWhPvMH.js";import{C as Fs}from"./copy-C-jvx2et.js";import{T as ss,P as vs}from"./trash-2-BEOQ1ICJ.js";import{P as ln}from"./pencil-BQ5_raiB.js";import{C as Bt}from"./chevron-down-Ct7FZbKm.js";import{S as on}from"./search-CMIAPUEt.js";import{M as Gl}from"./message-square-DykJ2lWP.js";import{L as dn}from"./layers-BH_LL4b8.js";import{F as cn,C as xt,T as xn}from"./chip-BV_1-tIb.js";import{S as qe,N as be,b as Wl,a as mn,c as un}from"./nav-row-BmtdNLxR.js";import{a as Ye,K as Ee}from"./kbd-8RRRm9jd.js";import{c as hn,S as mt}from"./select-Bg7NI8i0.js";import{c as Ul,u as pn}from"./index-GuczxPxb.js";import{u as Kl}from"./index-BMcLxIvZ.js";import{u as Vl}from"./index-lZLy5rkr.js";import{R as Hl,I as ql,c as gn}from"./index-DuM6iAxG.js";import{d as Gt,M as fn,a as jn,b as Wt,c as Ut,f as bn,g as ut,e as ht}from"./menu-styles-DWynpVVz.js";import{C as ye,R as vn,S as Nn}from"./toggles-C4LmZwyo.js";import{C as yn,D as wn,b as pt,a as kn,c as Sn}from"./dialog-DV4wfpNU.js";import{A as ie,a as Cn,M as gt}from"./people-Dr0v8HK0.js";import"./index-DgUtx9rV.js";import"./index-BPqjxXmH.js";import"./file-Btui_I8Z.js";import"./index-DkSPjZm4.js";const Yl=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Tn=W("activity",Yl);const Xl=[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]],Ql=W("app-window",Xl);const Zl=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Jl=W("archive",Zl);const ei=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Mn=W("arrow-up-down",ei);const si=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Kt=W("arrow-up-right",si);const ti=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],ai=W("book-open",ti);const ni=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],ri=W("bug",ni);const li=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],An=W("calendar-days",li);const ii=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],En=W("chart-column",ii);const oi=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ft=W("clock",oi);const di=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],ci=W("columns-3",di);const xi=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],mi=W("file-diff",xi);const ui=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],Vt=W("flag",ui);const hi=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Ht=W("git-merge",hi);const pi=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],_n=W("git-pull-request",pi);const gi=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],fi=W("grip-vertical",gi);const ji=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],bi=W("house",ji);const vi=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],zn=W("inbox",vi);const Ni=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],yi=W("layout-grid",Ni);const wi=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],Dn=W("list-filter",wi);const ki=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Si=W("lock",ki);const Ci=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ti=W("log-out",Ci);const Mi=[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]],Ai=W("mouse-pointer-2",Mi);const Ei=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],_i=W("pin",Ei);const zi=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],Di=W("plug",zi);const Ri=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Ue=W("rotate-cw",Ri);const Ii=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],Li=W("rows-3",Ii);const Pi=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],$i=W("sparkles",Pi);const Oi=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],gs=W("square-terminal",Oi);const Fi=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Bi=W("star",Fi);const Gi=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],Rn=W("table-2",Gi);const Wi=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Ui=W("target",Wi);const Ki=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Vi=W("user",Ki);const Hi=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],qi=W("workflow",Hi);var In=["PageUp","PageDown"],Ln=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Pn={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ls="Slider",[jt,Yi,Xi]=Ul(ls),[$n]=ga(ls,[Xi]),[Qi,Hs]=$n(ls),On=C.forwardRef((s,t)=>{const{name:a,min:n=0,max:r=100,step:l=1,orientation:i="horizontal",disabled:c=!1,minStepsBetweenThumbs:m=0,defaultValue:u=[n],value:o,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:v=!1,form:h,...b}=s,w=C.useRef(new Set),g=C.useRef(0),N=i==="horizontal"?Zi:Ji,[j=[],z]=pa({prop:o,defaultProp:u,onChange:y=>{[...w.current][g.current]?.focus(),d(y)}}),L=C.useRef(j);function U(y){const F=no(j,y);G(y,F)}function P(y){G(y,g.current)}function B(){const y=L.current[g.current];j[g.current]!==y&&f(j)}function G(y,F,{commit:R}={commit:!1}){const I=oo(l),M=co(Math.round((y-n)/l)*l+n,I),E=hn(M,[n,r]);z((O=[])=>{const q=to(O,E,F);if(io(q,m*l)){g.current=q.indexOf(E);const k=String(q)!==String(O);return k&&R&&f(q),k?q:O}else return O})}return e.jsx(Qi,{scope:s.__scopeSlider,name:a,disabled:c,min:n,max:r,valueIndexToChangeRef:g,thumbs:w.current,values:j,orientation:i,form:h,children:e.jsx(jt.Provider,{scope:s.__scopeSlider,children:e.jsx(jt.Slot,{scope:s.__scopeSlider,children:e.jsx(N,{"aria-disabled":c,"data-disabled":c?"":void 0,...b,ref:t,onPointerDown:he(b.onPointerDown,()=>{c||(L.current=j)}),min:n,max:r,inverted:v,onSlideStart:c?void 0:U,onSlideMove:c?void 0:P,onSlideEnd:c?void 0:B,onHomeKeyDown:()=>!c&&G(n,0,{commit:!0}),onEndKeyDown:()=>!c&&G(r,j.length-1,{commit:!0}),onStepKeyDown:({event:y,direction:F})=>{if(!c){const M=In.includes(y.key)||y.shiftKey&&Ln.includes(y.key)?10:1,E=g.current,O=j[E],q=l*M*F;G(O+q,E,{commit:!0})}}})})})})});On.displayName=ls;var[Fn,Bn]=$n(ls,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Zi=C.forwardRef((s,t)=>{const{min:a,max:n,dir:r,inverted:l,onSlideStart:i,onSlideMove:c,onSlideEnd:m,onStepKeyDown:u,...o}=s,[d,f]=C.useState(null),v=ts(t,N=>f(N)),h=C.useRef(void 0),b=pn(r),w=b==="ltr",g=w&&!l||!w&&l;function S(N){const j=h.current||d.getBoundingClientRect(),z=[0,j.width],U=qt(z,g?[a,n]:[n,a]);return h.current=j,U(N-j.left)}return e.jsx(Fn,{scope:s.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:e.jsx(Gn,{dir:b,"data-orientation":"horizontal",...o,ref:v,style:{...o.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:N=>{const j=S(N.clientX);i?.(j)},onSlideMove:N=>{const j=S(N.clientX);c?.(j)},onSlideEnd:()=>{h.current=void 0,m?.()},onStepKeyDown:N=>{const z=Pn[g?"from-left":"from-right"].includes(N.key);u?.({event:N,direction:z?-1:1})}})})}),Ji=C.forwardRef((s,t)=>{const{min:a,max:n,inverted:r,onSlideStart:l,onSlideMove:i,onSlideEnd:c,onStepKeyDown:m,...u}=s,o=C.useRef(null),d=ts(t,o),f=C.useRef(void 0),v=!r;function h(b){const w=f.current||o.current.getBoundingClientRect(),g=[0,w.height],N=qt(g,v?[n,a]:[a,n]);return f.current=w,N(b-w.top)}return e.jsx(Fn,{scope:s.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:e.jsx(Gn,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const w=h(b.clientY);l?.(w)},onSlideMove:b=>{const w=h(b.clientY);i?.(w)},onSlideEnd:()=>{f.current=void 0,c?.()},onStepKeyDown:b=>{const g=Pn[v?"from-bottom":"from-top"].includes(b.key);m?.({event:b,direction:g?-1:1})}})})}),Gn=C.forwardRef((s,t)=>{const{__scopeSlider:a,onSlideStart:n,onSlideMove:r,onSlideEnd:l,onHomeKeyDown:i,onEndKeyDown:c,onStepKeyDown:m,...u}=s,o=Hs(ls,a);return e.jsx(fe.span,{...u,ref:t,onKeyDown:he(s.onKeyDown,d=>{d.key==="Home"?(i(d),d.preventDefault()):d.key==="End"?(c(d),d.preventDefault()):In.concat(Ln).includes(d.key)&&(m(d),d.preventDefault())}),onPointerDown:he(s.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),o.thumbs.has(f)?f.focus():n(d)}),onPointerMove:he(s.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&r(d)}),onPointerUp:he(s.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),l(d))})})}),Wn="SliderTrack",Un=C.forwardRef((s,t)=>{const{__scopeSlider:a,...n}=s,r=Hs(Wn,a);return e.jsx(fe.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...n,ref:t})});Un.displayName=Wn;var bt="SliderRange",Kn=C.forwardRef((s,t)=>{const{__scopeSlider:a,...n}=s,r=Hs(bt,a),l=Bn(bt,a),i=C.useRef(null),c=ts(t,i),m=r.values.length,u=r.values.map(f=>qn(f,r.min,r.max)),o=m>1?Math.min(...u):0,d=100-Math.max(...u);return e.jsx(fe.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...n,ref:c,style:{...s.style,[l.startEdge]:o+"%",[l.endEdge]:d+"%"}})});Kn.displayName=bt;var vt="SliderThumb",Vn=C.forwardRef((s,t)=>{const a=Yi(s.__scopeSlider),[n,r]=C.useState(null),l=ts(t,c=>r(c)),i=C.useMemo(()=>n?a().findIndex(c=>c.ref.current===n):-1,[a,n]);return e.jsx(eo,{...s,ref:l,index:i})}),eo=C.forwardRef((s,t)=>{const{__scopeSlider:a,index:n,name:r,...l}=s,i=Hs(vt,a),c=Bn(vt,a),[m,u]=C.useState(null),o=ts(t,S=>u(S)),d=m?i.form||!!m.closest("form"):!0,f=Vl(m),v=i.values[n],h=v===void 0?0:qn(v,i.min,i.max),b=ao(n,i.values.length),w=f?.[c.size],g=w?ro(w,h,c.direction):0;return C.useEffect(()=>{if(m)return i.thumbs.add(m),()=>{i.thumbs.delete(m)}},[m,i.thumbs]),e.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${h}% + ${g}px)`},children:[e.jsx(jt.ItemSlot,{scope:s.__scopeSlider,children:e.jsx(fe.span,{role:"slider","aria-label":s["aria-label"]||b,"aria-valuemin":i.min,"aria-valuenow":v,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...l,ref:o,style:v===void 0?{display:"none"}:s.style,onFocus:he(s.onFocus,()=>{i.valueIndexToChangeRef.current=n})})}),d&&e.jsx(Hn,{name:r??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:v},n)]})});Vn.displayName=vt;var so="RadioBubbleInput",Hn=C.forwardRef(({__scopeSlider:s,value:t,...a},n)=>{const r=C.useRef(null),l=ts(r,n),i=Kl(t);return C.useEffect(()=>{const c=r.current;if(!c)return;const m=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(m,"value").set;if(i!==t&&o){const d=new Event("input",{bubbles:!0});o.call(c,t),c.dispatchEvent(d)}},[i,t]),e.jsx(fe.input,{style:{display:"none"},...a,ref:l,defaultValue:t})});Hn.displayName=so;function to(s=[],t,a){const n=[...s];return n[a]=t,n.sort((r,l)=>r-l)}function qn(s,t,a){const l=100/(a-t)*(s-t);return hn(l,[0,100])}function ao(s,t){return t>2?`Value ${s+1} of ${t}`:t===2?["Minimum","Maximum"][s]:void 0}function no(s,t){if(s.length===1)return 0;const a=s.map(r=>Math.abs(r-t)),n=Math.min(...a);return a.indexOf(n)}function ro(s,t,a){const n=s/2,l=qt([0,50],[0,n]);return(n-l(t)*a)*a}function lo(s){return s.slice(0,-1).map((t,a)=>s[a+1]-t)}function io(s,t){if(t>0){const a=lo(s);return Math.min(...a)>=t}return!0}function qt(s,t){return a=>{if(s[0]===s[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(s[1]-s[0]);return t[0]+n*(a-s[0])}}function oo(s){return(String(s).split(".")[1]||"").length}function co(s,t){const a=Math.pow(10,t);return Math.round(s*a)/a}var xo=On,mo=Un,uo=Kn,ho=Vn,qs="Tabs",[po]=ga(qs,[gn]),Yn=gn(),[go,Yt]=po(qs),Xn=C.forwardRef((s,t)=>{const{__scopeTabs:a,value:n,onValueChange:r,defaultValue:l,orientation:i="horizontal",dir:c,activationMode:m="automatic",...u}=s,o=pn(c),[d,f]=pa({prop:n,onChange:r,defaultProp:l??"",caller:qs});return e.jsx(go,{scope:a,baseId:Vr(),value:d,onValueChange:f,orientation:i,dir:o,activationMode:m,children:e.jsx(fe.div,{dir:o,"data-orientation":i,...u,ref:t})})});Xn.displayName=qs;var Qn="TabsList",Zn=C.forwardRef((s,t)=>{const{__scopeTabs:a,loop:n=!0,...r}=s,l=Yt(Qn,a),i=Yn(a);return e.jsx(Hl,{asChild:!0,...i,orientation:l.orientation,dir:l.dir,loop:n,children:e.jsx(fe.div,{role:"tablist","aria-orientation":l.orientation,...r,ref:t})})});Zn.displayName=Qn;var Jn="TabsTrigger",er=C.forwardRef((s,t)=>{const{__scopeTabs:a,value:n,disabled:r=!1,...l}=s,i=Yt(Jn,a),c=Yn(a),m=ar(i.baseId,n),u=nr(i.baseId,n),o=n===i.value;return e.jsx(ql,{asChild:!0,...c,focusable:!r,active:o,children:e.jsx(fe.button,{type:"button",role:"tab","aria-selected":o,"aria-controls":u,"data-state":o?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:m,...l,ref:t,onMouseDown:he(s.onMouseDown,d=>{!r&&d.button===0&&d.ctrlKey===!1?i.onValueChange(n):d.preventDefault()}),onKeyDown:he(s.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(n)}),onFocus:he(s.onFocus,()=>{const d=i.activationMode!=="manual";!o&&!r&&d&&i.onValueChange(n)})})})});er.displayName=Jn;var sr="TabsContent",tr=C.forwardRef((s,t)=>{const{__scopeTabs:a,value:n,forceMount:r,children:l,...i}=s,c=Yt(sr,a),m=ar(c.baseId,n),u=nr(c.baseId,n),o=n===c.value,d=C.useRef(o);return C.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),e.jsx(Hr,{present:r||o,children:({present:f})=>e.jsx(fe.div,{"data-state":o?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":m,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...s.style,animationDuration:d.current?"0s":void 0},children:f&&l})})});tr.displayName=sr;function ar(s,t){return`${s}-trigger-${t}`}function nr(s,t){return`${s}-content-${t}`}var fo=Xn,jo=Zn,bo=er,vo=tr;function we(s,t){return new Date(s.getFullYear(),s.getMonth(),s.getDate()+t)}const Ys={home:bi,project:lt,projectNew:cn,allProjects:dn,taskNew:La,conversation:Gl,search:on,settings:Dt,back:wa,external:Kt,chevron:zt,expand:Bt,more:Ia,app:Ql,add:vs,edit:ln,delete:ss,copy:Fs,check:rs,close:ya,refresh:Ue,download:Xr,upload:Bl,attach:rn,send:Ws,stop:Yr,run:Ga,filter:Dn,sort:Mn,drag:fi,link:Fl,logout:Ti,branch:Rs,commit:bl,merge:Ht,pullRequest:_n,diff:mi,file:nn,code:Ba,terminal:gs,server:Ol,tunnel:$l,agent:Gs,runtime:qr,ai:$i,tokens:Cl,mcp:Di,permission:Na,lock:Si,secret:Sl,team:va,user:Vi,bug:ri,info:ba,warning:Ns,error:ja,success:_t,time:ft,history:jl,calendar:An,notification:fa,pin:_i,target:Ui,milestone:Vt,activity:Tn,board:yi,chart:En,table:Rn,docs:ai,inbox:zn,workflow:qi,archive:Jl,favorite:Bi},Bs={xs:12,sm:14,md:16,lg:18,xl:20},rr=[{title:"导航",names:["home","project","projectNew","allProjects","taskNew","conversation","search","settings","back","external","chevron","expand","more","app"]},{title:"操作",names:["add","edit","delete","copy","check","close","refresh","download","upload","attach","send","stop","run","filter","sort","drag","link","logout"]},{title:"开发",names:["branch","commit","merge","pullRequest","diff","file","code","terminal","server","tunnel","agent","runtime","ai","tokens","mcp","permission","lock","secret","team","user","bug"]},{title:"信息",names:["info","warning","error","success","time","history","calendar","notification","pin","target","milestone","activity","board","chart","table","docs","inbox","workflow","archive","favorite"]}];function se({name:s,size:t="md",strokeWidth:a,className:n,...r}){const l=Ys[s],i=typeof t=="number"?t:Bs[t],c=!!r["aria-label"];return e.jsx(l,{size:i,strokeWidth:a??(i>=24?1.5:2),"aria-hidden":c?void 0:!0,role:c?"img":void 0,className:x("shrink-0",n),...r})}function fs({icon:s,title:t,description:a,action:n,variant:r="plain",size:l="md",className:i}){return e.jsxs("div",{"data-slot":"empty-state",className:x("flex flex-col items-center justify-center text-center",l==="md"?"px-6 py-10":"px-4 py-6",r==="dashed"&&"rounded-xl border border-dashed border-border bg-foreground/[0.015]",i),children:[s&&e.jsx("div",{"aria-hidden":"true",className:x("mb-3 text-muted-foreground/40",l==="md"?"[&_svg]:size-9 [&_svg]:stroke-[1.5]":"[&_svg]:size-7 [&_svg]:stroke-[1.5]"),children:s}),t&&e.jsx("p",{className:x("font-medium text-foreground",l==="md"?"text-sm":"text-[13px]"),children:t}),a&&e.jsx("p",{className:x("max-w-xs text-muted-foreground",l==="md"?"text-[13px]":"text-xs",t&&"mt-1"),children:a}),n&&e.jsx("div",{className:"mt-4 flex items-center gap-2",children:n})]})}function Re({tone:s="success",pulse:t=!0,label:a,className:n}){return e.jsxs("span",{role:a?"status":void 0,"aria-label":a,"aria-hidden":a?void 0:!0,className:x("relative inline-flex size-2 shrink-0",n),children:[t&&e.jsx("span",{className:x("absolute inline-flex size-full rounded-full opacity-60 motion-safe:animate-ping",bs[s])}),e.jsx("span",{className:x("relative inline-flex size-2 rounded-full",bs[s])})]})}function lr({text:s,className:t}){return e.jsxs("span",{className:x("inline-flex text-sm",t),children:[e.jsx("span",{className:"sr-only",children:s}),e.jsx("span",{className:"agent-thinking-shimmer","aria-hidden":"true",children:Array.from(s).map((a,n)=>e.jsx("span",{className:"agent-thinking-char",style:{animationDelay:`${n*45}ms`},children:a},`${a}-${n}`))})]})}function ir({className:s}){return e.jsxs("span",{className:x("active-work-dots",s),"aria-hidden":"true",children:[e.jsx("span",{children:"."}),e.jsx("span",{className:"active-work-dots__second",children:"."}),e.jsx("span",{className:"active-work-dots__third",children:"."})]})}function Xe({external:s=!1,asChild:t=!1,className:a,children:n,...r}){return t?e.jsx(Qr,{className:ct(a),...r,children:n}):e.jsxs("a",{className:ct(a),...s?{target:"_blank",rel:"noopener noreferrer"}:null,...r,children:[n,s&&e.jsx(Kt,{"aria-hidden":"true",className:"ml-0.5 inline size-[0.9em] align-[-0.1em]"})]})}function Nt({value:s,defaultValue:t,onValueChange:a,onValueCommit:n,min:r=0,max:l=100,step:i=1,disabled:c,marks:m,className:u,...o}){const[d,f]=Ks({value:s,defaultValue:t??[r],onChange:a}),v=l-r||1,h=d.length>1?Math.min(...d):r,b=Math.max(...d);return e.jsxs(xo,{value:d,onValueChange:f,onValueCommit:n,min:r,max:l,step:i,disabled:c,className:x("relative flex h-5 w-full touch-none select-none items-center data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",u),children:[e.jsxs(mo,{className:"relative h-1 w-full grow rounded-full bg-foreground/10",children:[e.jsx(uo,{className:"absolute h-full rounded-full bg-primary"}),m?.map(w=>e.jsx("span",{"aria-hidden":"true",className:x("absolute top-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full",w>=h&&w<=b?"bg-primary":"bg-foreground/20"),style:{left:`${(w-r)/v*100}%`}},w))]}),d.map((w,g)=>e.jsx(ho,{"aria-label":o["aria-label"],className:"block size-4 rounded-full border-4 border-primary bg-background shadow-raised transition-[transform,box-shadow] duration-150 hover:scale-110 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring/30 motion-reduce:transition-none"},g))]})}const or=fo;function dr({className:s,...t}){return e.jsx(jo,{className:x("flex h-9 items-stretch gap-5 border-b border-border/60",s),...t})}function ms({className:s,count:t,icon:a,children:n,...r}){return e.jsxs(bo,{className:x("relative -mb-px inline-flex items-center gap-1.5 whitespace-nowrap border-b-2 border-transparent px-0.5 text-[13px] font-medium text-muted-foreground transition-colors","hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/60 disabled:pointer-events-none disabled:opacity-40","data-[state=active]:border-foreground data-[state=active]:text-foreground [&_svg]:size-3.5",s),...r,children:[a,n,t!==void 0&&e.jsx("span",{className:"text-[11px] font-normal tabular-nums text-muted-foreground",children:t})]})}function zs({className:s,...t}){return e.jsx(vo,{className:x("pt-4 outline-none",s),...t})}const No={sm:"w-48",md:"w-60",lg:"w-80"};function ce({options:s,value:t,defaultValue:a,onValueChange:n,icon:r,placeholder:l,showMenuLabel:i=!1,disabled:c,menuWidth:m="md",className:u,...o}){const[d,f]=Ks({value:t,defaultValue:a??"",onChange:n}),v=s.find(b=>b.value===d),h=o["aria-label"];return e.jsxs(Tl,{children:[e.jsxs(Ml,{disabled:c,"aria-label":`${h}: ${v?.label??l??""}`,className:x("group inline-flex h-7 max-w-full items-center gap-1.5 rounded-md px-2 text-xs font-medium transition-colors","hover:bg-accent data-[state=open]:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:pointer-events-none disabled:opacity-40",v?"text-foreground/80":"text-muted-foreground",u),children:[(r??v?.icon)&&e.jsx("span",{className:"flex shrink-0 text-muted-foreground [&_svg]:size-3.5",children:r??v?.icon}),e.jsx("span",{className:"max-w-[120px] truncate",children:v?.label??l}),e.jsx(Bt,{"aria-hidden":"true",className:"size-3 shrink-0 text-muted-foreground transition-transform duration-150 group-data-[state=open]:rotate-180"})]}),e.jsx(Al,{children:e.jsxs(El,{align:"start",sideOffset:6,collisionPadding:8,className:x(Ut,"max-h-[min(60vh,320px)] max-w-[calc(100vw-2rem)] overflow-y-auto origin-(--radix-dropdown-menu-content-transform-origin)",No[m]),children:[i&&e.jsx(_l,{className:Gt,children:h}),e.jsx(zl,{value:d,onValueChange:f,children:s.map(b=>e.jsxs(Dl,{value:b.value,disabled:b.disabled,className:x(Wt,jn,"group/item items-start data-[disabled]:opacity-50"),children:[b.icon&&e.jsx("span",{className:"mt-0.5 flex shrink-0 text-muted-foreground [&_svg]:size-3.5",children:b.icon}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block truncate group-data-[state=checked]/item:font-medium group-data-[state=checked]/item:text-foreground",children:b.label}),b.description&&e.jsx("span",{className:"mt-0.5 block whitespace-normal text-xs leading-[18px] text-muted-foreground",children:b.description})]}),e.jsx(Rl,{className:x(fn,"top-2"),children:e.jsx(rs,{className:"size-3.5"})})]},b.value))})]})})]})}function cr({value:s,defaultValue:t="",onValueChange:a,onSubmit:n,placeholder:r,submitLabel:l,submitHint:i,submitting:c=!1,pendingLabel:m,disabled:u=!1,toolbarStart:o,toolbarEnd:d,footer:f,autoFocus:v,className:h,...b}){const[w,g]=Ks({value:s,defaultValue:t,onChange:a}),S=w.trim().length>0&&!u&&!c,N=()=>{S&&n?.(w)};return e.jsxs("div",{"data-slot":"composer",className:x("w-full",h),children:[e.jsxs("div",{className:x("relative rounded-xl border border-border bg-background shadow-raised transition-colors duration-200","hover:border-ring/40 focus-within:border-ring/60",c&&"opacity-80"),children:[e.jsx("textarea",{value:w,onChange:j=>g(j.target.value),onKeyDown:j=>{j.key==="Enter"&&!j.shiftKey&&!j.nativeEvent.isComposing&&(j.preventDefault(),N())},placeholder:r,"aria-label":b["aria-label"]??r,disabled:u||c,autoFocus:v,rows:1,className:"block w-full resize-none border-none bg-transparent px-4 pb-2 pt-4 text-[15px] leading-relaxed text-foreground placeholder:text-muted-foreground/80 focus:outline-none disabled:cursor-not-allowed",style:{minHeight:76,maxHeight:220,fieldSizing:"content"}}),e.jsxs("div",{className:"flex items-center justify-between gap-2 px-2 pb-2 pt-1",children:[e.jsx("div",{className:"flex min-w-0 items-center gap-1",children:o}),e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[c&&m&&e.jsx(ve,{size:"sm",label:m,className:"text-xs"}),d,S&&i&&e.jsxs("span",{className:"hidden select-none items-center gap-1 text-xs text-muted-foreground sm:inline-flex",children:[e.jsx(Ye,{children:"⏎"}),i]}),e.jsx("button",{type:"button",onClick:N,disabled:!S,"aria-label":l,title:l,className:x("flex size-8 items-center justify-center rounded-lg transition-all duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1",S?"bg-primary text-primary-foreground shadow-raised hover:bg-primary/90":"cursor-not-allowed bg-muted text-muted-foreground/40"),children:e.jsx(Ws,{size:16,strokeWidth:2.5,"aria-hidden":"true"})})]})]})]}),f&&e.jsx("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5 px-0.5",children:f})]})}function yt({className:s,children:t,...a}){const n=C.Children.toArray(t);return e.jsx("nav",{"aria-label":"Breadcrumb",className:x("flex min-w-0 items-center",s),...a,children:n.map((r,l)=>e.jsxs(C.Fragment,{children:[l>0&&e.jsx("span",{"aria-hidden":"true",className:"mx-1.5 select-none text-muted-foreground/40",children:"/"}),r]},l))})}function Ke({icon:s,menu:t=!1,current:a=!1,className:n,children:r,type:l,...i}){return e.jsxs("button",{type:l??"button","aria-current":a?"page":void 0,className:x("group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 text-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 data-[state=open]:bg-accent",a?"font-medium text-foreground/90":"text-muted-foreground hover:text-foreground",n),...i,children:[s&&e.jsx("span",{className:"flex shrink-0 [&_svg]:size-3.5",children:s}),e.jsx("span",{className:"max-w-[200px] truncate",children:r}),t&&e.jsx(Bt,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground/70 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}function xr({status:s,index:t}){return e.jsx("span",{"aria-hidden":"true",className:x("relative z-[1] flex size-6 shrink-0 items-center justify-center rounded-full text-[11px] font-semibold tabular-nums",s==="done"&&"bg-primary text-primary-foreground",s==="current"&&"bg-background text-foreground ring-[1.5px] ring-inset ring-foreground",s==="upcoming"&&"bg-background text-muted-foreground ring-1 ring-inset ring-border"),children:s==="done"?e.jsx(rs,{className:"size-3.5",strokeWidth:2.5}):t+1})}function mr({steps:s,current:t,className:a}){return e.jsx("ol",{className:x("flex w-full items-start",a),children:s.map((n,r)=>{const l=r<t?"done":r===t?"current":"upcoming",i=r===s.length-1;return e.jsxs("li",{"aria-current":l==="current"?"step":void 0,className:x("flex min-w-0 items-start gap-2.5",!i&&"flex-1"),children:[e.jsx(xr,{status:l,index:r}),e.jsxs("div",{className:"min-w-0 pt-0.5",children:[e.jsx("div",{className:x("truncate text-[13px] leading-5",l==="upcoming"?"text-muted-foreground":"font-medium text-foreground"),children:n.title}),n.description&&e.jsx("div",{className:"truncate text-xs leading-[18px] text-muted-foreground",children:n.description})]}),!i&&e.jsx("span",{"aria-hidden":"true",className:x("mx-2 mt-3 h-px min-w-6 flex-1",r<t?"bg-foreground":"bg-border")})]},r)})})}function ur({steps:s,className:t}){return e.jsx("ol",{className:x("flex flex-col",t),children:s.map((a,n)=>{const r=a.status??"upcoming",l=n===s.length-1;return e.jsxs("li",{"aria-current":r==="current"?"step":void 0,className:"relative flex gap-3 pb-5 last:pb-0",children:[!l&&e.jsx("span",{"aria-hidden":"true",className:x("absolute left-3 top-7 bottom-1 w-px -translate-x-1/2",r==="done"?"bg-foreground":"bg-border")}),e.jsx(xr,{status:r,index:n}),e.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[e.jsx("div",{className:x("text-sm leading-5",r==="upcoming"?"text-foreground/80":"font-medium text-foreground"),children:a.title}),a.description&&e.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:a.description}),a.content&&e.jsx("div",{className:"mt-2.5",children:a.content})]})]},n)})})}function Xs({swatch:s="solid",color:t=T.ink}){switch(s){case"hatch":return e.jsx("span",{"aria-hidden":"true",className:"hatch size-2.5 shrink-0 rounded-[2px] bg-viz-0",style:{color:t===T.ink?T.plan:t}});case"line":return e.jsx("span",{"aria-hidden":"true",className:"h-0.5 w-3 shrink-0 rounded-full",style:{background:t}});case"dashed":return e.jsx("svg",{"aria-hidden":"true",width:"14",height:"2",className:"shrink-0",children:e.jsx("line",{x1:"0",y1:"1",x2:"14",y2:"1",stroke:t,strokeWidth:"2",strokeDasharray:"3 2"})});case"dot":return e.jsx("span",{"aria-hidden":"true",className:"size-2 shrink-0 rounded-full",style:{background:t}});case"outline":return e.jsx("span",{"aria-hidden":"true",className:"size-2.5 shrink-0 rounded-[2px]",style:{boxShadow:`inset 0 0 0 1px ${t}`}});default:return e.jsx("span",{"aria-hidden":"true",className:"size-2.5 shrink-0 rounded-[2px]",style:{background:t}})}}function ke({items:s,className:t}){return e.jsx("ul",{className:x("flex flex-wrap items-center gap-x-3.5 gap-y-1 text-xs text-muted-foreground",t),children:s.map((a,n)=>e.jsxs("li",{className:"inline-flex items-center gap-1.5",children:[e.jsx(Xs,{swatch:a.swatch,color:a.color}),e.jsx("span",{children:a.label}),a.value!==void 0&&e.jsx("span",{className:"font-medium tabular-nums text-foreground/80",children:a.value})]},n))})}function oe({value:s,format:t="percent",goodWhen:a="up",period:n,size:r="sm",className:l}){const i=s>0?"up":s<0?"down":"flat",c=i==="flat"||a==="none"?"neutral":i===a?"success":"danger",m=Math.abs(s),u=t==="percent"?`${Number.isInteger(m*100)?(m*100).toFixed(0):(m*100).toFixed(1)}%`:ue(m),o=i==="down"?ka:Ws;return e.jsxs("span",{className:x("inline-flex items-center gap-1 whitespace-nowrap",r==="sm"?"text-xs":"text-[13px]",l),children:[e.jsxs("span",{className:x("inline-flex items-center gap-0.5 font-medium tabular-nums",a==="none"&&i!=="flat"?"text-foreground/80":Rt[c]),children:[i!=="flat"&&e.jsx(o,{"aria-hidden":"true",className:r==="sm"?"size-3":"size-3.5",strokeWidth:2.5}),e.jsx("span",{className:"sr-only",children:i==="up"?"+":i==="down"?"−":""}),u]}),n&&e.jsx("span",{className:"text-muted-foreground",children:n})]})}function _e({value:s,size:t=64,thickness:a,expected:n,tone:r="ink",children:l,className:i,...c}){const m=a??Math.max(3,Math.round(t/14)),u=(t-m)/2,o=2*Math.PI*u,d=Je(s,0,1),f=r==="ink"?T.ink:Ve[r],v=Math.round(d*100),h=t/2,b=n!==void 0?Je(n,0,1)*Math.PI*2:null;return e.jsxs("div",{role:"img","aria-label":c["aria-label"]??`${v}%`,className:x("relative inline-flex shrink-0 items-center justify-center",i),style:{width:t,height:t},children:[e.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"-rotate-90","aria-hidden":"true",children:[e.jsx("circle",{cx:h,cy:h,r:u,fill:"none",stroke:r==="ink"?T.empty:`color-mix(in oklab, ${f} 15%, transparent)`,strokeWidth:m}),d>0&&e.jsx("circle",{cx:h,cy:h,r:u,fill:"none",stroke:f,strokeWidth:m,strokeLinecap:"round",strokeDasharray:o,strokeDashoffset:o*(1-d),className:"transition-[stroke-dashoffset] duration-700 ease-enter motion-reduce:transition-none"}),b!==null&&e.jsx("line",{x1:h+(u-m)*Math.cos(b),y1:h+(u-m)*Math.sin(b),x2:h+(u+m)*Math.cos(b),y2:h+(u+m)*Math.sin(b),stroke:T.text,strokeOpacity:.6,strokeWidth:2,strokeLinecap:"round"})]}),e.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:l??e.jsxs("span",{className:x("font-semibold tracking-tight text-foreground",t>=88?"text-2xl":t>=60?"text-[15px]":"text-[11px]"),children:[v,e.jsx("span",{className:x("font-medium text-muted-foreground",t>=88?"text-sm":"text-[0.7em]"),children:"%"})]})})]})}function Xt({values:s,width:t=96,height:a=28,area:n=!1,showLast:r=!0,baseline:l,tone:i="ink",className:c,...m}){const u=Vs("spark");if(s.length<2)return null;const o=3,d=l!==void 0?[...s,l]:s,f=Math.min(...d),v=Math.max(...d),h=ge([0,s.length-1],[o,t-o]),b=ge([f,v===f?f+1:v],[a-o,o]),w=s.map((z,L)=>[h(L),b(z)]),g=w.map(([z,L],U)=>`${U===0?"M":"L"}${z.toFixed(1)},${L.toFixed(1)}`).join(""),S=i==="ink"?T.ink:T.context,[N,j]=w[w.length-1];return e.jsxs("svg",{width:t,height:a,viewBox:`0 0 ${t} ${a}`,role:"img","aria-label":m["aria-label"],"aria-hidden":m["aria-label"]?void 0:!0,className:x("shrink-0 overflow-visible",c),children:[n&&e.jsxs(e.Fragment,{children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:u,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:S,stopOpacity:.12}),e.jsx("stop",{offset:"100%",stopColor:S,stopOpacity:0})]})}),e.jsx("path",{d:`${g}L${N.toFixed(1)},${a}L${w[0][0].toFixed(1)},${a}Z`,fill:`url(#${u})`})]}),l!==void 0&&e.jsx("line",{x1:o,x2:t-o,y1:b(l),y2:b(l),stroke:T.axis,strokeWidth:1,strokeDasharray:"2 2"}),e.jsx("path",{d:g,fill:"none",stroke:S,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),r&&e.jsx("circle",{cx:N,cy:j,r:2.5,fill:S,stroke:T.surface,strokeWidth:1.5})]})}const yo={todo:"bg-background ring-1 ring-inset ring-foreground/30",doing:"ring-1 ring-inset ring-viz-6 bg-[linear-gradient(135deg,transparent_50%,var(--viz-6)_50%)]",done:"bg-viz-6",late:"hatch bg-destructive/10 text-destructive/70 ring-1 ring-inset ring-destructive/60",cancelled:"ring-1 ring-inset ring-foreground/20 bg-[linear-gradient(to_top_right,transparent_calc(50%-0.5px),var(--muted-foreground)_calc(50%-0.5px),var(--muted-foreground)_calc(50%+0.5px),transparent_calc(50%+0.5px))]"};function wt({state:s,size:t="md",label:a,className:n}){return e.jsx("span",{role:a?"img":void 0,"aria-label":a,"aria-hidden":a?void 0:!0,className:x("inline-block shrink-0 rounded-[3px]",t==="md"?"size-3":"size-2.5",yo[s],n)})}const wo={"not-started":{label:"Not started",tone:"neutral",variant:"soft"},"on-track":{label:"On track",tone:"neutral",variant:"outline"},ahead:{label:"Ahead",tone:"success",variant:"dot"},"at-risk":{label:"At risk",tone:"warning",variant:"dot"},"off-track":{label:"Off track",tone:"danger",variant:"soft"},done:{label:"Done",tone:"success",variant:"soft"}};function Qt({health:s,label:t,className:a}){const{t:n}=as(),r=wo[s];return e.jsx(Q,{tone:r.tone,variant:r.variant,icon:s==="done"?e.jsx(rs,{strokeWidth:3}):void 0,className:a,children:t??n(r.label)})}function hr(s,t){for(const a of s)a.children?.length&&(t.add(a.id),hr(a.children,t));return t}function pr({nodes:s,depth:t,expanded:a,toggle:n}){const{t:r}=as();return e.jsx("ul",{role:t===0?"tree":"group",className:x(t>0&&"ml-[11px]"),children:s.map(l=>{const i=!!l.children?.length,c=a.has(l.id);return e.jsxs("li",{role:"treeitem","aria-expanded":i?c:void 0,className:x("relative",t>0&&["pl-4","before:absolute before:left-0 before:top-0 before:h-full before:w-px before:bg-viz-axis last:before:h-3.5","after:absolute after:left-0 after:top-3.5 after:h-px after:w-3 after:bg-viz-axis"]),children:[e.jsxs("div",{className:"flex h-7 items-center gap-1.5",children:[i?e.jsx("button",{type:"button",onClick:()=>n(l.id),"aria-label":r(c?"Collapse":"Expand"),className:"-ml-0.5 flex size-[18px] shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:e.jsx(zt,{"aria-hidden":"true",className:x("size-3 transition-transform duration-150",c&&"rotate-90")})}):e.jsx("span",{"aria-hidden":"true",className:"flex size-[18px] shrink-0 items-center justify-center",children:e.jsx("span",{className:"size-1 rounded-full bg-foreground/30"})}),l.icon&&e.jsx("span",{className:"flex shrink-0 text-muted-foreground [&_svg]:size-3.5",children:l.icon}),e.jsx("span",{className:x("min-w-0 truncate text-[13px]",t===0?"font-medium text-foreground":"text-foreground/85"),children:l.label}),pe(l.meta)&&e.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:l.meta}),e.jsx("span",{className:"flex-1"}),l.progress!==void 0&&e.jsx(de,{value:l.progress,size:"xs",className:"w-14 shrink-0 sm:w-20"}),(l.value!==void 0||l.progress!==void 0)&&e.jsx("span",{className:"w-9 shrink-0 text-right text-[11px] tabular-nums text-muted-foreground",children:l.value??X(l.progress??0)})]}),i&&c&&l.children&&e.jsx(pr,{nodes:l.children,depth:t+1,expanded:a,toggle:n})]},l.id)})})}function gr({nodes:s,defaultCollapsed:t=[],className:a}){const[n,r]=C.useState(()=>{const i=hr(s,new Set);return t.forEach(c=>i.delete(c)),i}),l=i=>{r(c=>{const m=new Set(c);return m.has(i)?m.delete(i):m.add(i),m})};return e.jsx("div",{className:a,children:e.jsx(pr,{nodes:s,depth:0,expanded:n,toggle:l})})}function Ze({title:s,subtitle:t,legend:a,actions:n,table:r,footnote:l,bare:i=!1,className:c,children:m}){const{t:u}=as(),o=C.useId(),[d,f]=C.useState("chart");return e.jsxs("figure",{"aria-labelledby":o,className:x("flex min-w-0 flex-col",!i&&"rounded-xl border border-border/70 bg-background p-4",c),children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{id:o,className:"text-[13px] font-semibold leading-5 text-foreground",children:s}),t&&e.jsx("div",{className:"mt-0.5 text-xs leading-[18px] text-muted-foreground",children:t})]}),(n||r)&&e.jsxs("div",{className:"-mr-1 -mt-0.5 flex shrink-0 items-center gap-1",children:[n,r&&e.jsx(J,{size:"xs",label:u(d==="chart"?"Table":"Chart"),"aria-pressed":d==="table",onClick:()=>f(v=>v==="chart"?"table":"chart"),children:d==="chart"?e.jsx(Rn,{}):e.jsx(En,{})})]})]}),a&&d==="chart"&&e.jsx("div",{className:"mt-2",children:a}),e.jsx("div",{className:"mt-3 min-w-0",children:d==="table"&&r?e.jsx(ko,{data:r}):m}),l&&e.jsx("figcaption",{className:"mt-3 text-xs leading-5 text-muted-foreground",children:l})]})}function ko({data:s}){return e.jsx("div",{className:"max-h-72 overflow-auto scrollbar-app-thin",children:e.jsxs("table",{className:"w-full border-collapse text-xs",children:[e.jsx("thead",{className:"sticky top-0 bg-background",children:e.jsx("tr",{className:"border-b border-border/60",children:s.columns.map(t=>e.jsx("th",{scope:"col",className:x("h-7 px-2 font-medium text-muted-foreground first:pl-0 last:pr-0",t.align==="right"?"text-right":"text-left"),children:t.header},t.key))})}),e.jsx("tbody",{children:s.rows.map((t,a)=>e.jsx("tr",{className:"border-b border-border/40 last:border-0",children:s.columns.map(n=>e.jsx("td",{className:x("h-7 px-2 text-foreground/85 first:pl-0 last:pr-0",n.align==="right"?"text-right tabular-nums":"text-left"),children:t[n.key]},n.key))},a))})]})})}function Oe({x:s,y:t,containerWidth:a,containerHeight:n,title:r,rows:l,footer:i}){const c=s>a*.62,m=28+l.length*20+(i?24:0),u=n?Je(t-16,0,Math.max(0,n-m)):t;return e.jsxs("div",{"aria-hidden":"true",className:"pointer-events-none absolute z-10 min-w-[120px] max-w-[240px] rounded-lg border border-border bg-popover px-2.5 py-2 text-xs shadow-popover",style:{top:u,...c?{right:a-s+12}:{left:s+12}},children:[r&&e.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:r}),e.jsx("div",{className:"space-y-1",children:l.map((o,d)=>e.jsxs("div",{className:"flex items-center gap-2 whitespace-nowrap",children:[e.jsx(Xs,{swatch:o.swatch??"line",color:o.color??T.ink}),e.jsx("span",{className:"font-semibold tabular-nums text-foreground",children:o.value}),e.jsx("span",{className:"truncate text-muted-foreground",children:o.label})]},d))}),i&&e.jsx("div",{className:"mt-1.5 border-t border-border/60 pt-1.5 text-xs text-muted-foreground",children:i})]})}function So({id:s,color:t=T.plan,background:a=T.empty}){return e.jsxs("pattern",{id:s,width:"5",height:"5",patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)",children:[e.jsx("rect",{width:"5",height:"5",fill:a}),e.jsx("line",{x1:"0",y1:"0",x2:"0",y2:"5",stroke:t,strokeWidth:"1.2"})]})}function Qs({ticks:s,y:t,left:a,right:n,format:r}){return e.jsx("g",{children:s.map(l=>e.jsxs("g",{children:[e.jsx("line",{x1:a,x2:n,y1:Z(t(l)),y2:Z(t(l)),stroke:l===0?T.axis:T.grid,strokeWidth:1}),e.jsx("text",{x:a-8,y:t(l),dy:"0.32em",textAnchor:"end",className:"fill-muted-foreground text-[11px] tabular-nums",children:r(l)})]},l))})}function Zt({labels:s,x:t,y:a,width:n,minGap:r=44,activeIndex:l}){const i=Zr(s.length,n,r,l);return e.jsx("g",{children:s.map((c,m)=>i.has(m)&&e.jsx("text",{x:t(m),y:a,textAnchor:"middle",className:x("text-[11px] tabular-nums",l===m?"fill-foreground font-medium":"fill-muted-foreground"),children:c},m))})}function ks({children:s}){return e.jsx("div",{className:"sr-only","aria-live":"polite",children:s})}function is({height:s}){return e.jsx("div",{"aria-hidden":"true",style:{height:s}})}function fr(s){let t="",a=!1;for(const n of s){if(!n){a=!1;continue}t+=`${a?"L":"M"}${n[0].toFixed(1)},${n[1].toFixed(1)}`,a=!0}return t}function Co(s,t){const a=[];let n=[];for(const r of s)r?n.push(r):n.length&&(a.push(n),n=[]);return n.length&&a.push(n),a.filter(r=>r.length>1).map(r=>`${fr(r)}L${r[r.length-1][0].toFixed(1)},${t}L${r[0][0].toFixed(1)},${t}Z`)}function To(s){for(let t=s.length-1;t>=0;t--)if(s[t]!==null&&Number.isFinite(s[t]))return t;return-1}function jr({labels:s,series:t,height:a=220,formatValue:n=xe,marker:r,baseline:l,endLabels:i=!0,className:c,...m}){const[u,o]=$e(),[d,f]=C.useState(null),v=Vs("line-area"),h=s.length,b=t.flatMap(k=>k.values.filter(_=>_!==null&&Number.isFinite(_))),w=es(l?[...b,l.value]:b,{count:4}),g=r?24:14,N=Math.max(0,a-g-26),j=ge([w.min,w.max],[g+N,g]),z=t.map(k=>To(k.values)),L=t.map((k,_)=>z[_]>=0?n(k.values[z[_]]):""),U=t.map((k,_)=>z[_]>=0?j(k.values[z[_]]):null).filter(k=>k!==null).sort((k,_)=>k-_),P=U.some((k,_)=>_>0&&k-U[_-1]<14),B=i&&t.length<=4&&!P,G=Ie(w.ticks.map(n)),y=B?Ie(t.map((k,_)=>`${L[_]} ${k.label}`))+6:12,F=Math.max(0,o-G-y),R=k=>G+(h<=1?F/2:k/(h-1)*F),I=t.map(k=>k.values.map((_,K)=>_===null||!Number.isFinite(_)?null:[R(K),j(_)])),M=j(Math.max(w.min,0)),E=k=>{const _=k.currentTarget.getBoundingClientRect(),K=(k.clientX-_.left)/Math.max(1,_.width);f(Je(Math.round(K*(h-1)),0,Math.max(0,h-1)))},O=k=>{const _=Us(k.key,d,h);_!==void 0&&(k.preventDefault(),f(_))},q=(k,_)=>{const K=k.values[_];return K==null?"—":n(K)};return e.jsxs("div",{ref:u,className:x("relative w-full",c),children:[o===0?e.jsx(is,{height:a}):e.jsx("div",{role:"img","aria-label":m["aria-label"],tabIndex:0,onKeyDown:O,onBlur:()=>f(null),className:ys,children:e.jsxs("svg",{width:o,height:a,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:v,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:T.ink,stopOpacity:.1}),e.jsx("stop",{offset:"100%",stopColor:T.ink,stopOpacity:.01})]})}),e.jsx(Qs,{ticks:w.ticks,y:j,left:G,right:G+F,format:n}),l&&e.jsxs("g",{children:[e.jsx("line",{x1:G,x2:G+F,y1:Z(j(l.value)),y2:Z(j(l.value)),stroke:"var(--viz-4)",strokeWidth:1,strokeDasharray:"4 3"}),e.jsxs("text",{x:G+F,y:j(l.value)-5,textAnchor:"end",className:"fill-muted-foreground text-[11px] tabular-nums",children:[l.label," ",n(l.value)]})]}),t.map((k,_)=>k.area&&Co(I[_],M).map((K,Fe)=>e.jsx("path",{d:K,fill:`url(#${v})`},`${k.id}-area-${Fe}`))),t.map((k,_)=>{const K=k.variant??"ink";return e.jsx("path",{d:fr(I[_]),fill:"none",stroke:Me[K],strokeWidth:2,strokeDasharray:K==="plan"?"5 4":void 0,strokeLinecap:"round",strokeLinejoin:"round"},k.id)}),r&&r.index>=0&&r.index<h&&e.jsxs("g",{children:[e.jsx("line",{x1:Z(R(r.index)),x2:Z(R(r.index)),y1:g,y2:g+N,stroke:T.text,strokeOpacity:.35,strokeWidth:1}),e.jsx("rect",{x:R(r.index)-(r.label.length*11+10)/2,y:g-20,width:r.label.length*11+10,height:16,rx:4,fill:T.text}),e.jsx("text",{x:R(r.index),y:g-8,textAnchor:"middle",className:"fill-background text-[11px] font-medium",children:r.label})]}),t.map((k,_)=>{const K=k.variant??"ink",Fe=z[_];if(Fe<0)return null;const[Be,os]=I[_][Fe];return e.jsxs("g",{children:[K!=="plan"&&e.jsx("circle",{cx:Be,cy:os,r:4,fill:Me[K],stroke:T.surface,strokeWidth:2}),B&&e.jsxs("text",{x:Be+9,y:os,dy:"0.32em",className:"text-[11px] tabular-nums",children:[e.jsx("tspan",{className:"fill-foreground font-semibold",children:L[_]}),e.jsx("tspan",{dx:4,className:"fill-muted-foreground",children:k.label})]})]},`${k.id}-end`)}),d!==null&&e.jsxs("g",{children:[e.jsx("line",{x1:Z(R(d)),x2:Z(R(d)),y1:g,y2:g+N,stroke:T.axis,strokeWidth:1}),t.map((k,_)=>{const K=I[_][d];return K?e.jsx("circle",{cx:K[0],cy:K[1],r:4,fill:Me[k.variant??"ink"],stroke:T.surface,strokeWidth:2},k.id):null})]}),e.jsx(Zt,{labels:s,x:R,y:a-8,width:F,activeIndex:d}),e.jsx("rect",{x:G,y:g,width:F,height:N,fill:"transparent",onPointerMove:E,onPointerLeave:()=>f(null)})]})}),d!==null&&o>0&&e.jsx(Oe,{x:R(d),y:g+4,containerWidth:o,containerHeight:a,title:s[d],rows:t.map(k=>({label:k.label,value:q(k,d),color:Me[k.variant??"ink"],swatch:k.variant==="plan"?"dashed":"line"}))}),e.jsx(ks,{children:d!==null?`${s[d]}:${t.map(k=>`${k.label} ${q(k,d)}`).join(",")}`:""})]})}const us=2,br=24;function vr(s){const[t,a]=C.useState(null);return{active:t,setActive:a,handleKeyDown:r=>{const l=Us(r.key,t,s);l!==void 0&&(r.preventDefault(),a(l))}}}function Nr({labels:s,series:t,height:a=220,formatValue:n=xe,highlightIndex:r,baseline:l,className:i,...c}){const[m,u]=$e(),{active:o,setActive:d,handleKeyDown:f}=vr(s.length),v=Vs("bar-hatch"),h=s.length,b=t.flatMap(E=>E.values),w=es(l?[...b,l.value]:b,{count:4}),g=18,S=26,N=Ie(w.ticks.map(n)),j=Math.max(0,u-N-8),z=Math.max(0,a-g-S),L=ge([w.min,w.max],[g+z,g]),U=L(Math.max(0,w.min)),P=Pt(h,N,N+j,{paddingInner:.35,paddingOuter:.2}),B=Math.max(2,Math.min(br,(P.bandwidth-us*(t.length-1))/Math.max(1,t.length))),G=B*t.length+us*(t.length-1),y=r===void 0?h-1:r,F=(E="ink")=>E==="plan"?`url(#${v})`:E==="context"?T.context:T.ink,R=(E,O)=>P.center(E)-G/2+O*(B+us),I=E=>Math.min(...t.map(O=>L(Math.max(0,O.values[E]??0)))),M=(()=>{if(y===null||y<0||y>=h)return null;const E=Math.max(0,t.findIndex(K=>(K.variant??"ink")==="ink")),O=t[E]?.values[y]??0,q=n(O),k=L(Math.max(0,O)),_=Sa(q)<=B+us*2||k<=I(y);return{text:q,x:_?R(y,E)+B/2:P.center(y),y:(_?k:I(y))-6}})();return e.jsxs("div",{ref:m,className:x("relative w-full",i),onPointerLeave:()=>d(null),children:[u===0?e.jsx(is,{height:a}):e.jsx("div",{role:"img","aria-label":c["aria-label"],tabIndex:0,onKeyDown:f,onBlur:()=>d(null),className:ys,children:e.jsxs("svg",{width:u,height:a,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx("defs",{children:e.jsx(So,{id:v})}),e.jsx(Qs,{ticks:w.ticks,y:L,left:N,right:N+j,format:n}),s.map((E,O)=>e.jsxs("g",{opacity:o!==null&&o!==O?.4:1,className:"transition-opacity duration-150",children:[t.map((q,k)=>{const _=q.values[O]??0,K=L(Math.max(0,_));return e.jsx("path",{d:Lt(R(O,k),K,B,U-K,4),fill:F(q.variant)},q.id)}),M&&y===O&&e.jsx("text",{x:M.x,y:M.y,textAnchor:"middle",className:"fill-foreground text-[11px] font-semibold tabular-nums",children:M.text})]},E+O)),l&&e.jsxs("g",{children:[e.jsx("line",{x1:N,x2:N+j,y1:Z(L(l.value)),y2:Z(L(l.value)),stroke:"var(--viz-4)",strokeWidth:1,strokeDasharray:"4 3"}),e.jsxs("text",{x:N+j,y:L(l.value)-5,textAnchor:"end",className:"fill-muted-foreground text-[11px] tabular-nums",children:[l.label," ",n(l.value)]})]}),e.jsx(Zt,{labels:s,x:P.center,y:a-8,width:j,minGap:36,activeIndex:o}),s.map((E,O)=>e.jsx("rect",{x:P.center(O)-P.step/2,y:g,width:P.step,height:z,fill:"transparent",onPointerEnter:()=>d(O)},`hit-${E}-${O}`))]})}),o!==null&&u>0&&e.jsx(Oe,{x:P.center(o)+G/2,y:I(o),containerWidth:u,containerHeight:a,title:s[o],rows:t.map(E=>({label:E.label,value:n(E.values[o]??0),color:E.variant==="context"?T.context:T.ink,swatch:E.variant==="plan"?"hatch":"solid"}))}),e.jsx(ks,{children:o!==null?`${s[o]}:${t.map(E=>`${E.label} ${n(E.values[o]??0)}`).join(",")}`:""})]})}function yr({labels:s,segments:t,data:a,colors:n,height:r=220,formatValue:l=xe,highlightIndex:i,className:c,...m}){const{t:u}=as(),[o,d]=$e(),{active:f,setActive:v,handleKeyDown:h}=vr(s.length),b=s.length,w=n??ws(t.length),g=a.map(R=>R.reduce((I,M)=>I+M,0)),S=es(g,{count:4}),N=18,j=26,z=Ie(S.ticks.map(l)),L=Math.max(0,d-z-8),U=Math.max(0,r-N-j),P=ge([S.min,S.max],[N+U,N]),B=Pt(b,z,z+L,{paddingInner:.4,paddingOuter:.2}),G=Math.max(2,Math.min(br,B.bandwidth)),y=i===void 0?b-1:i,F=s.map((R,I)=>{const M=a[I]??[],E=[];let O=0,q=-1;for(let k=0;k<M.length;k++)M[k]>0&&(q=k);for(let k=0;k<M.length;k++){const _=M[k];if(_<=0)continue;const K=P(O),Fe=O===0;O+=_;const Be=P(O),os=Fe?K:K-us;os-Be>0&&E.push({segmentIndex:k,top:Be,height:os-Be,rounded:k===q})}return{key:`${R}-${I}`,index:I,x:B.center(I)-G/2,parts:E}});return e.jsxs("div",{ref:o,className:x("relative w-full",c),onPointerLeave:()=>v(null),children:[d===0?e.jsx(is,{height:r}):e.jsx("div",{role:"img","aria-label":m["aria-label"],tabIndex:0,onKeyDown:h,onBlur:()=>v(null),className:ys,children:e.jsxs("svg",{width:d,height:r,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx(Qs,{ticks:S.ticks,y:P,left:z,right:z+L,format:l}),F.map(R=>e.jsxs("g",{opacity:f!==null&&f!==R.index?.4:1,className:"transition-opacity duration-150",children:[R.parts.map(I=>I.rounded?e.jsx("path",{d:Lt(R.x,I.top,G,I.height,4),fill:w[I.segmentIndex]},I.segmentIndex):e.jsx("rect",{x:R.x,y:I.top,width:G,height:I.height,fill:w[I.segmentIndex]},I.segmentIndex)),y===R.index&&e.jsx("text",{x:B.center(R.index),y:P(g[R.index])-6,textAnchor:"middle",className:"fill-foreground text-[11px] font-semibold tabular-nums",children:l(g[R.index])})]},R.key)),e.jsx(Zt,{labels:s,x:B.center,y:r-8,width:L,minGap:36,activeIndex:f}),s.map((R,I)=>e.jsx("rect",{x:B.center(I)-B.step/2,y:N,width:B.step,height:U,fill:"transparent",onPointerEnter:()=>v(I)},`hit-${R}-${I}`))]})}),f!==null&&d>0&&e.jsx(Oe,{x:B.center(f)+G/2,y:P(g[f]),containerWidth:d,containerHeight:r,title:s[f],rows:t.map((R,I)=>({label:R.label,value:l(a[f]?.[I]??0),color:w[I],swatch:"solid"})).reverse(),footer:`${u("Total")} ${l(g[f])}`}),e.jsx(ks,{children:f!==null?`${s[f]}:${t.map((R,I)=>`${R.label} ${l(a[f]?.[I]??0)}`).join(",")}`:""})]})}const aa=15;function na(s){return s.start===0?0:(s.end-s.start)/Math.abs(s.start)}function wr({items:s,startLabel:t,endLabel:a,height:n=240,formatValue:r=xe,formatChange:l,className:i,...c}){const[m,u]=$e(),[o,d]=C.useState(null),f=M=>l?l(M):It(na(M)),v=s.map(M=>`${M.label} ${r(M.start)}`),h=s.map(M=>`${r(M.end)} ${M.label} ${f(M)}`),b=Math.min(Ie(v),u*.3),w=Math.min(Ie(h),u*.4),g=b+6,S=Math.max(g+40,u-w-6),N=30,j=12,z=s.flatMap(M=>[M.start,M.end]),L=Math.min(...z),U=Math.max(...z),P=(U-L||1)*.06,B=ge([L-P,U+P],[n-j,N]),G=rt(s.map(M=>B(M.start)),aa,[N,n-j]),y=rt(s.map(M=>B(M.end)),aa,[N,n-j]),F=M=>o!==null?o===M:!!s[M].emphasis,R=s.map((M,E)=>E).sort((M,E)=>Number(F(M))-Number(F(E))),I=M=>{const E=Us(M.key,o,s.length,"y");E!==void 0&&(M.preventDefault(),d(E))};return e.jsxs("div",{ref:m,className:x("relative w-full",i),children:[u===0?e.jsx(is,{height:n}):e.jsx("div",{role:"img","aria-label":c["aria-label"],tabIndex:0,onKeyDown:I,onBlur:()=>d(null),className:ys,children:e.jsxs("svg",{width:u,height:n,className:"block overflow-visible","aria-hidden":"true",onPointerLeave:()=>d(null),children:[e.jsx("text",{x:g,y:12,textAnchor:"middle",className:"fill-muted-foreground text-[11px]",children:t}),e.jsx("text",{x:S,y:12,textAnchor:"middle",className:"fill-muted-foreground text-[11px]",children:a}),e.jsx("line",{x1:Z(g),x2:Z(g),y1:N-8,y2:n-j+4,stroke:T.grid}),e.jsx("line",{x1:Z(S),x2:Z(S),y1:N-8,y2:n-j+4,stroke:T.grid}),R.map(M=>{const E=s[M],O=F(M),q=O?T.ink:T.context,k=B(E.start),_=B(E.end),K=na(E);return e.jsxs("g",{onPointerEnter:()=>d(M),children:[e.jsx("line",{x1:g,y1:k,x2:S,y2:_,stroke:"transparent",strokeWidth:14}),e.jsx("line",{x1:g,y1:k,x2:S,y2:_,stroke:q,strokeWidth:O?2:1.5,strokeLinecap:"round"}),e.jsx("circle",{cx:g,cy:k,r:O?4:3,fill:q,stroke:T.surface,strokeWidth:2}),e.jsx("circle",{cx:S,cy:_,r:O?4:3,fill:q,stroke:T.surface,strokeWidth:2}),Math.abs(G[M]-k)>1.5&&e.jsx("line",{x1:g-5,y1:k,x2:g-9,y2:G[M],stroke:T.axis}),e.jsxs("text",{x:g-11,y:G[M],dy:"0.32em",textAnchor:"end",className:"text-[11px] tabular-nums",children:[e.jsx("tspan",{className:O?"fill-foreground font-medium":"fill-muted-foreground",children:E.label}),e.jsx("tspan",{dx:4,className:O?"fill-foreground font-semibold":"fill-muted-foreground",children:r(E.start)})]}),Math.abs(y[M]-_)>1.5&&e.jsx("line",{x1:S+5,y1:_,x2:S+9,y2:y[M],stroke:T.axis}),e.jsxs("text",{x:S+11,y:y[M],dy:"0.32em",className:"text-[11px] tabular-nums",children:[e.jsx("tspan",{className:O?"fill-foreground font-semibold":"fill-muted-foreground",children:r(E.end)}),e.jsx("tspan",{dx:4,className:O?"fill-foreground font-medium":"fill-muted-foreground",children:E.label}),e.jsx("tspan",{dx:4,className:x(O?K>0?"fill-success-ink":K<0?"fill-destructive-ink":"fill-muted-foreground":"fill-muted-foreground"),children:f(E)})]})]},E.id)})]})}),o!==null&&u>0&&e.jsx(Oe,{x:S,y:B(s[o].end),containerWidth:u,containerHeight:n,title:s[o].label,rows:[{label:t,value:r(s[o].start),color:T.context},{label:a,value:r(s[o].end),color:T.ink}],footer:f(s[o])}),e.jsx(ks,{children:o!==null?`${s[o].label}:${t} ${r(s[o].start)},${a} ${r(s[o].end)},${f(s[o])}`:""})]})}function kt({segments:s,size:t=136,thickness:a=14,centerValue:n,centerLabel:r,formatValue:l=xe,className:i,...c}){const[m,u]=C.useState(null),o=s.reduce((j,z)=>j+z.value,0),d=ws(s.length),f=j=>s[j].color??d[j],v=t/2,h=t/2,b=h-a,w=s.length>1?2/(h-a/2):0,g=[];let S=0;for(let j=0;j<s.length;j++){const z=o>0?s[j].value/o*Math.PI*2:0,L=S+w/2,U=S+z-w/2;S+=z,g.push({index:j,d:U>L?Pa(v,v,h,b,L,U):""})}const N=m!==null?s[m]:null;return e.jsxs("div",{className:x("flex flex-wrap items-center gap-x-6 gap-y-4",i),children:[e.jsxs("div",{className:"relative shrink-0",style:{width:t,height:t},children:[e.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,role:"img","aria-label":c["aria-label"],onPointerLeave:()=>u(null),children:[e.jsx("circle",{cx:v,cy:v,r:h-a/2,fill:"none",stroke:T.empty,strokeWidth:a,opacity:o>0?0:1}),g.map(j=>j.d&&e.jsx("path",{d:j.d,fill:f(j.index),opacity:m!==null&&m!==j.index?.3:1,className:"transition-opacity duration-150",onPointerEnter:()=>u(j.index)},s[j.index].id))]}),e.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center text-center",children:[e.jsx("span",{className:"text-[22px] font-semibold leading-7 tracking-tight text-foreground",children:N?l(N.value):n??l(o)}),e.jsx("span",{className:"max-w-[80%] truncate text-xs leading-[18px] text-muted-foreground",children:N?`${N.label} · ${X(o?N.value/o:0)}`:r})]})]}),e.jsx("table",{className:"min-w-[160px] flex-1 border-collapse text-xs",children:e.jsx("tbody",{children:s.map((j,z)=>e.jsxs("tr",{onPointerEnter:()=>u(z),onPointerLeave:()=>u(null),className:x("transition-opacity duration-150",m!==null&&m!==z&&"opacity-40"),children:[e.jsx("td",{className:"h-7 w-4 pr-2",children:e.jsx(Xs,{color:f(z)})}),e.jsx("td",{className:"h-7 truncate pr-3 text-foreground/85",children:j.label}),e.jsx("td",{className:"h-7 pr-3 text-right font-medium tabular-nums text-foreground",children:l(j.value)}),e.jsx("td",{className:"h-7 w-10 text-right tabular-nums text-muted-foreground",children:X(o?j.value/o:0)})]},j.id))})})]})}function kr({value:s,secondary:t=0,cellSize:a=10,className:n,...r}){const l=Math.round(Math.min(1,Math.max(0,s))*100),i=Math.min(100-l,Math.round(Math.max(0,t)*100));return e.jsx("div",{role:"img","aria-label":r["aria-label"],className:x("grid w-max grid-cols-10 gap-[2px]",n),children:Array.from({length:100}).map((c,m)=>e.jsx("span",{"aria-hidden":"true",className:x("rounded-[2px]",m<l?"bg-viz-6":m<l+i?"hatch bg-viz-0 text-viz-3":"bg-viz-0"),style:{width:a,height:a}},m))})}function Sr({items:s,formatValue:t=xe,max:a,showRank:n=!0,className:r,...l}){const[i,c]=C.useState(null),m=a??Math.max(1,...s.map(u=>u.value));return e.jsx("ol",{"aria-label":l["aria-label"],className:x("flex flex-col",r),onPointerLeave:()=>c(null),children:s.map((u,o)=>e.jsxs("li",{onPointerEnter:()=>c(u.id),className:x("grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 py-1.5 transition-opacity duration-150",!n&&"grid-cols-[minmax(0,1fr)_auto]",i!==null&&i!==u.id&&"opacity-45"),children:[n&&e.jsx("span",{className:x("w-5 text-[11px] font-semibold tabular-nums",o<3?"text-foreground":"text-muted-foreground"),children:String(o+1).padStart(2,"0")}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[u.icon&&e.jsx("span",{className:"flex shrink-0 [&_svg]:size-3.5",children:u.icon}),e.jsx("span",{className:"truncate text-[13px] text-foreground/90",children:u.label}),pe(u.meta)&&e.jsx("span",{className:"shrink-0 truncate text-[11px] text-muted-foreground",children:u.meta})]}),e.jsx("div",{className:"mt-1 h-1.5 w-full",children:e.jsx("div",{className:"h-full rounded-r-[3px] bg-viz-6 transition-[width] duration-500 ease-enter motion-reduce:transition-none",style:{width:`max(2px, ${u.value/m*100}%)`}})})]}),e.jsx("span",{className:"text-right text-[13px] font-semibold tabular-nums text-foreground",children:t(u.value)})]},u.id))})}function Cr({stages:s,formatValue:t=xe,className:a,...n}){const r=s[0]?.value||1,l=Math.max(1,...s.map(u=>u.value)),i=ws(s.length).slice().reverse(),c=s.map((u,o)=>o===0?1:s[o-1].value?u.value/s[o-1].value:0),m=c.slice(1).reduce((u,o,d)=>o<c[u+1]?d:u,0)+1;return e.jsx("div",{role:"img","aria-label":n["aria-label"],className:x("flex flex-col",a),children:s.map((u,o)=>{const d=u.value/l,f=o<s.length-1?s[o+1].value/l:d;return e.jsxs("div",{children:[e.jsxs("div",{className:"grid grid-cols-[5.5rem_minmax(0,1fr)_4.5rem] items-center gap-3",children:[e.jsx("span",{className:"truncate text-xs text-foreground/85",children:u.label}),e.jsx("div",{className:"flex h-6 justify-center",children:e.jsx("div",{className:"h-full rounded-[4px]",style:{width:`${d*100}%`,background:i[o]}})}),e.jsxs("span",{className:"text-right",children:[e.jsx("span",{className:"block text-[13px] font-semibold leading-4 tabular-nums text-foreground",children:t(u.value)}),e.jsx("span",{className:"block text-[11px] leading-[14px] tabular-nums text-muted-foreground",children:X(u.value/r)})]})]}),o<s.length-1&&e.jsxs("div",{className:"grid grid-cols-[5.5rem_minmax(0,1fr)_4.5rem] items-center gap-3",children:[e.jsx("span",{}),e.jsxs("div",{className:"relative flex h-5 items-center justify-center",children:[e.jsx("svg",{viewBox:"0 0 100 10",preserveAspectRatio:"none",className:"absolute inset-0 size-full","aria-hidden":"true",children:e.jsx("polygon",{points:`${50-d*50},0 ${50+d*50},0 ${50+f*50},10 ${50-f*50},10`,fill:T.empty})}),e.jsxs("span",{className:x("relative text-[11px] leading-none tabular-nums",o+1===m?"font-medium text-warning-ink":"text-foreground/70"),children:["↓ ",X(c[o+1])]})]}),e.jsx("span",{})]})]},u.id)})})}function Mo(s){return s>=4?"text-white":"text-foreground/80"}function St({steps:s=[0,1,3,4,6],className:t}){const{t:a}=as();return e.jsxs("span",{className:x("inline-flex items-center gap-1.5 text-xs text-muted-foreground",t),children:[a("Less"),e.jsx("span",{className:"flex gap-[2px]","aria-hidden":"true",children:s.map(n=>e.jsx("span",{className:"size-2.5 rounded-[2px]",style:{background:Le[n]}},n))}),a("More")]})}function Tr({rows:s,columns:t,data:a,corner:n,formatValue:r=xe,max:l,showValues:i=!0,className:c,...m}){const u=l??Math.max(1,...a.flat());return e.jsx("div",{className:x("overflow-x-auto scrollbar-app-thin",c),children:e.jsxs("table",{"aria-label":m["aria-label"],className:"border-separate border-spacing-[2px] text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"pr-2 text-left font-normal text-muted-foreground",children:n}),t.map(o=>e.jsx("th",{scope:"col",className:"h-6 min-w-9 px-1 text-center font-normal text-muted-foreground",children:o},o))]})}),e.jsx("tbody",{children:s.map((o,d)=>{const{name:f,label:v}=typeof o=="string"?{name:o,label:o}:o;return e.jsxs("tr",{children:[e.jsx("th",{scope:"row",className:"whitespace-nowrap pr-2 text-left font-normal text-foreground/85",children:e.jsx("span",{className:"block max-w-40 truncate",children:v??f})}),t.map((h,b)=>{const w=a[d]?.[b]??0,g=Os(w,u,7);return e.jsx("td",{title:`${f} · ${h}:${r(w)}`,className:x("h-7 min-w-9 rounded-[3px] px-1 text-center tabular-nums transition-shadow hover:ring-2 hover:ring-foreground/70",Mo(g)),style:{background:Le[g]},children:i?r(w):e.jsx("span",{className:"sr-only",children:r(w)})},h)})]},d)})})]})})}const Ss=[0,1,3,4,6];function Mr({start:s,values:t,describe:a,locale:n,className:r,...l}){const[i,c]=$e(),[m,u]=C.useState(null),o=(s.getDay()+6)%7,d=Math.ceil((t.length+o)/7),f=22,v=2,h=Je(Math.floor((c-f)/d)-v,6,13),b=h+v,w=16,g=w+b*7,S=Math.max(1,...t),N=new Intl.DateTimeFormat(n,{month:"short"}),j=new Intl.DateTimeFormat(n,{weekday:"narrow"}),z=P=>we(s,P),L=[];for(let P=0;P<t.length;P++){const B=z(P);if(B.getDate()===1){const G=Math.floor((P+o)/7);(!L.length||G-L[L.length-1].week>=3)&&L.push({week:G,label:N.format(B)})}}const U=we(s,-o);return e.jsxs("div",{ref:i,className:x("relative w-full",r),onPointerLeave:()=>u(null),children:[c===0?e.jsx(is,{height:g}):e.jsxs("svg",{width:f+d*b,height:g,role:"img","aria-label":l["aria-label"],className:"block",children:[L.map(P=>e.jsx("text",{x:f+P.week*b,y:10,className:"fill-muted-foreground text-[11px]",children:P.label},P.week)),[0,2,4].map(P=>e.jsx("text",{x:0,y:w+P*b+h/2,dy:"0.32em",className:"fill-muted-foreground text-[11px]",children:j.format(we(U,P))},P)),t.map((P,B)=>{const G=B+o,y=Math.floor(G/7),F=G%7,R=Ss[Os(P,S,Ss.length)],I=f+y*b,M=w+F*b;return e.jsx("rect",{x:I,y:M,width:h,height:h,rx:2,fill:Le[R],stroke:m?.index===B?T.text:"none",strokeWidth:1.5,onPointerEnter:()=>u({x:I+h,y:M,index:B})},B)})]}),m&&c>0&&e.jsx(Oe,{x:m.x,y:m.y,containerWidth:c,containerHeight:g,rows:[{label:a?a(z(m.index),t[m.index]):z(m.index).toLocaleDateString(n),value:t[m.index],swatch:"solid",color:Le[Ss[Os(t[m.index],S,Ss.length)]]}]})]})}function Ar({points:s,xLabel:t,yLabel:a,height:n=240,formatX:r=xe,formatY:l=xe,className:i,...c}){const[m,u]=$e(),[o,d]=C.useState(null),f=es(s.map(y=>y.x),{count:5}),v=es(s.map(y=>y.y),{count:4}),h=Ie(v.ticks.map(l)),b=18,w=36,S=Math.max(0,u-h-12),N=Math.max(0,n-b-w),j=ge([f.min,f.max],[h,h+S]),z=ge([v.min,v.max],[b+N,b]),L=s.some(y=>y.emphasis),U=s.find(y=>y.id===o),P=[...s].sort((y,F)=>+!!y.emphasis-+!!F.emphasis),B=[...s].sort((y,F)=>y.x-F.x||y.y-F.y),G=y=>{const F=B.findIndex(I=>I.id===o),R=Us(y.key,F===-1?null:F,B.length);R!==void 0&&(y.preventDefault(),d(B[R].id))};return e.jsxs("div",{ref:m,className:x("relative w-full",i),onPointerLeave:()=>d(null),children:[u===0?e.jsx(is,{height:n}):e.jsx("div",{role:"img","aria-label":c["aria-label"],tabIndex:0,onKeyDown:G,onBlur:()=>d(null),className:ys,children:e.jsxs("svg",{width:u,height:n,className:"block overflow-visible","aria-hidden":"true",children:[e.jsx(Qs,{ticks:v.ticks,y:z,left:h,right:h+S,format:l}),f.ticks.map(y=>e.jsxs("g",{children:[e.jsx("line",{x1:Z(j(y)),x2:Z(j(y)),y1:b,y2:b+N,stroke:y===f.min?T.axis:T.grid}),e.jsx("text",{x:j(y),y:b+N+16,textAnchor:"middle",className:"fill-muted-foreground text-[11px] tabular-nums",children:r(y)})]},y)),e.jsxs("text",{x:h+S,y:n-2,textAnchor:"end",className:"fill-muted-foreground text-[11px]",children:[t," →"]}),e.jsxs("text",{x:h,y:b-6,textAnchor:"start",className:"fill-muted-foreground text-[11px]",children:["↑ ",a]}),P.map(y=>{const F=!L||y.emphasis||y.id===o;return e.jsxs("g",{onPointerEnter:()=>d(y.id),children:[e.jsx("circle",{cx:j(y.x),cy:z(y.y),r:12,fill:"transparent"}),e.jsx("circle",{cx:j(y.x),cy:z(y.y),r:y.id===o?5:4,fill:F?T.ink:T.context,stroke:T.surface,strokeWidth:2})]},y.id)}),P.map(y=>{if(!y.emphasis||!y.label)return null;const F=j(y.x),R=F+9+Sa(y.label)>h+S;return e.jsx("text",{x:R?F-9:F+9,y:z(y.y)+4,textAnchor:R?"end":"start",stroke:T.surface,strokeWidth:3,strokeLinejoin:"round",paintOrder:"stroke",className:"pointer-events-none fill-foreground text-[11px]",children:y.label},`label-${y.id}`)})]})}),U&&u>0&&e.jsx(Oe,{x:j(U.x),y:z(U.y),containerWidth:u,containerHeight:n,title:U.label,rows:[{label:t,value:r(U.x),swatch:"dot"},{label:a,value:l(U.y),swatch:"dot"}]}),e.jsx(ks,{children:U?`${U.label?`${U.label}:`:""}${t} ${r(U.x)},${a} ${l(U.y)}`:""})]})}function Er({tasks:s,start:t,days:a,today:n,locale:r,className:l,...i}){const{t:c}=as(),m=h=>`${h/a*100}%`,u=[],o=[],d=new Intl.DateTimeFormat(r,{month:"short"});for(let h=0;h<a;h++){const b=we(t,h);b.getDay()===1&&u.push(h),(h===0||b.getDate()===1)&&o.push({day:h,label:d.format(b)})}const f=n!==void 0&&n>=0&&n<a,v=f&&e.jsx("span",{"aria-hidden":"true",className:"absolute inset-y-0 w-px bg-foreground/50",style:{left:m(n+.5)}});return e.jsxs("div",{role:"table","aria-label":i["aria-label"],className:x("text-xs",l),children:[e.jsxs("div",{role:"row",className:"grid grid-cols-[minmax(7rem,9rem)_minmax(0,1fr)] border-b border-border/60",children:[e.jsx("div",{role:"columnheader",className:"h-8"}),e.jsxs("div",{role:"columnheader",className:"relative h-8",children:[o.map(h=>e.jsx("span",{className:"absolute top-1 text-[11px] font-medium text-foreground/80",style:{left:m(h.day)},children:h.label},h.day)),u.map(h=>e.jsx("span",{className:"absolute bottom-0.5 -translate-x-1/2 text-[11px] tabular-nums text-muted-foreground",style:{left:m(h)},children:we(t,h).getDate()},h)),f&&e.jsx("span",{className:"absolute -bottom-px z-[1] -translate-x-1/2 rounded bg-foreground px-1 py-px text-[11px] font-medium leading-[13px] text-background",style:{left:m(n+.5)},children:c("Today")})]})]}),s.map(h=>{const b=Math.min(1,Math.max(0,h.progress)),w=f&&h.end<n&&b<1,g=(h.end+1)/a>.86;return e.jsxs("div",{role:"row",className:"group grid grid-cols-[minmax(7rem,9rem)_minmax(0,1fr)]",children:[e.jsxs("div",{role:"rowheader",className:"flex min-w-0 flex-col justify-center py-1.5 pr-3",children:[e.jsx("span",{className:"truncate text-xs text-foreground/90",children:h.label}),h.meta&&e.jsx("span",{className:"truncate text-xs text-muted-foreground",children:h.meta})]}),e.jsxs("div",{role:"cell",className:"relative h-11 transition-colors group-hover:bg-foreground/[0.02]",children:[u.map(S=>e.jsx("span",{"aria-hidden":"true",className:"absolute inset-y-0 w-px bg-viz-grid",style:{left:m(S)}},S)),v,e.jsxs("div",{title:`${h.label} · ${X(b)}`,className:"absolute top-1/2 flex h-2.5 -translate-y-1/2 overflow-hidden rounded-[3px]",style:{left:m(h.start),width:m(h.end-h.start+1)},children:[e.jsx("span",{className:"h-full bg-viz-6",style:{width:`${b*100}%`}}),e.jsx("span",{className:x("hatch h-full flex-1",w?"bg-destructive/10 text-destructive/60":"bg-viz-0 text-viz-3")})]}),e.jsx("span",{className:x("absolute top-1/2 -translate-y-1/2 whitespace-nowrap text-[11px] tabular-nums",w?"font-medium text-destructive-ink":"text-muted-foreground"),style:g?{right:`calc(${(1-h.start/a)*100}% + 6px)`}:{left:`calc(${m(h.end+1)} + 6px)`},children:X(b)})]})]},h.id)})]})}function Ao(s){return`${s.getFullYear()}-${String(s.getMonth()+1).padStart(2,"0")}-${String(s.getDate()).padStart(2,"0")}`}function _r({year:s,month:t,events:a,today:n,locale:r,maxPerDay:l=2,className:i}){const m=(new Date(s,t,1).getDay()+6)%7,u=new Date(s,t,1-m),o=new Intl.DateTimeFormat(r,{weekday:"short"}),d=new Map;for(const v of a){const h=d.get(v.date)??[];h.push(v),d.set(v.date,h)}const f=Array.from({length:42},(v,h)=>new Date(u.getFullYear(),u.getMonth(),u.getDate()+h));return e.jsxs("div",{className:x("overflow-hidden rounded-lg border border-border/70",i),children:[e.jsx("div",{className:"grid grid-cols-7 border-b border-border/60 bg-foreground/[0.015]",children:f.slice(0,7).map(v=>e.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:o.format(v)},v.getDay()))}),e.jsx("div",{className:"grid grid-cols-7",children:f.map((v,h)=>{const b=Ao(v),w=v.getMonth()===t,g=b===n,S=d.get(b)??[];return e.jsxs("div",{className:x("min-h-[84px] border-border/60 p-1.5",h%7!==6&&"border-r",h<35&&"border-b",!w&&"bg-foreground/[0.015]"),children:[e.jsx("span",{className:x("inline-flex size-5 items-center justify-center rounded-full text-[11px] tabular-nums",g?"bg-primary font-semibold text-primary-foreground":w?"text-foreground/80":"text-muted-foreground"),children:v.getDate()}),e.jsxs("ul",{className:"mt-1 space-y-0.5",children:[S.slice(0,l).map(N=>e.jsxs("li",{className:x("flex min-w-0 items-center gap-1 text-xs leading-[18px]",!w&&"opacity-50"),children:[e.jsx("span",{"aria-hidden":"true",className:x("h-2.5 w-0.5 shrink-0 rounded-full",N.tone?bs[N.tone]:"bg-viz-6")}),N.time&&e.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:N.time}),e.jsx("span",{className:"truncate text-foreground/85",children:N.title})]},N.id)),S.length>l&&e.jsxs("li",{className:"pl-1.5 text-[11px] leading-4 text-muted-foreground",children:["+",S.length-l]})]})]},b)})})]})}const Eo={none:"",sm:"px-3 pb-3",md:"px-4 pb-4"};function _o({title:s,description:t,actions:a,footer:n,variant:r="plain",padding:l="md",className:i,children:c,...m}){const u=!!(s||a);return e.jsxs("section",{"data-slot":"panel",className:x("flex min-w-0 flex-col rounded-xl border",r==="plain"?"border-border/70 bg-background":"border-border/60 bg-muted/40",i),...m,children:[u&&e.jsxs("header",{className:x("flex items-start justify-between gap-3 pb-2.5 pt-3.5",l==="sm"?"px-3":"px-4"),children:[e.jsxs("div",{className:"min-w-0",children:[s&&e.jsx("h3",{className:"truncate text-[13px] font-semibold leading-5 text-foreground",children:s}),t&&e.jsx("p",{className:"mt-0.5 text-xs leading-[18px] text-muted-foreground",children:t})]}),a&&e.jsx("div",{className:"-mr-1 -mt-0.5 flex shrink-0 items-center gap-1",children:a})]}),e.jsx("div",{className:x("min-w-0 flex-1",Eo[l],!u&&l!=="none"&&(l==="sm"?"pt-3":"pt-4")),children:c}),n&&e.jsx("footer",{className:"border-t border-border/60 px-4 py-2.5 text-xs text-muted-foreground",children:n})]})}function hs({label:s,value:t,unit:a,icon:n,delta:r,trend:l,footnote:i,className:c}){return e.jsxs("div",{className:x("flex min-w-0 flex-col gap-1 bg-background p-4",c),children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground [&_svg]:size-3.5",children:[n,e.jsx("span",{className:"truncate",children:s})]}),e.jsxs("div",{className:"flex items-end justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 items-baseline gap-1",children:[e.jsx("span",{className:"truncate text-[26px] font-semibold leading-8 tracking-tight text-foreground",children:t}),pe(a)&&e.jsx("span",{className:"shrink-0 text-[13px] text-muted-foreground",children:a})]}),l&&e.jsx(Xt,{values:l,area:!0,width:76,height:28,className:"mb-1"})]}),(r||i)&&e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r&&e.jsx(oe,{...r}),i&&e.jsx("span",{className:"truncate text-xs text-muted-foreground",children:i})]})]})}function zr({className:s,...t}){return e.jsx("div",{className:x("grid gap-px overflow-hidden rounded-xl border border-border/70 bg-border/60 sm:grid-cols-2 xl:grid-cols-4",s),...t})}function Dr({value:s,unit:t,label:a,delta:n,caption:r,className:l}){return e.jsxs("div",{className:x("flex flex-col gap-1.5",l),children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:a}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-[56px] font-semibold leading-none tracking-tight text-foreground",children:s}),pe(t)&&e.jsx("span",{className:"text-xl font-medium text-muted-foreground",children:t})]}),(n||r)&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n&&e.jsx(oe,{size:"md",...n}),pe(r)&&e.jsx("span",{className:"text-xs text-muted-foreground",children:r})]})]})}function Ds({label:s,value:t,max:a,formatValue:n=c=>ue(c,{compact:!0}),warningAt:r=.7,dangerAt:l=.9,className:i}){const c=a>0?t/a:0,m=c>=l?"danger":c>=r?"warning":"ink";return e.jsxs("div",{className:x("flex flex-col gap-1.5",i),children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3 text-xs",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-1 text-foreground/85",children:[m!=="ink"&&e.jsx(Ns,{"aria-hidden":"true",className:x("size-3 shrink-0",m==="danger"?"text-destructive":"text-warning")}),e.jsx("span",{className:"truncate",children:s})]}),e.jsxs("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:[n(t)," / ",n(a),e.jsx("span",{className:x("ml-1.5 font-medium",m==="danger"?"text-destructive-ink":m==="warning"?"text-warning-ink":"text-foreground/80"),children:X(c)})]})]}),e.jsx(de,{value:t,max:a,tone:m,"aria-label":typeof s=="string"?s:void 0})]})}function Ct({code:s,title:t,meta:a,health:n,progress:r,keyResults:l,className:i}){return e.jsxs("article",{className:x("rounded-xl border border-border/70 bg-background p-4",i),children:[e.jsxs("header",{className:"flex items-start gap-3",children:[e.jsx(_e,{value:r,size:44,thickness:4}),e.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[s&&e.jsx("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:s}),e.jsx("h4",{className:"truncate text-sm font-semibold leading-5 text-foreground",children:t})]}),pe(a)&&e.jsx("p",{className:"truncate text-xs leading-[18px] text-muted-foreground",children:a})]}),n&&e.jsx(Qt,{health:n,className:"mt-0.5"})]}),e.jsx("ul",{className:"mt-3 flex flex-col gap-2.5",children:l.map(c=>e.jsxs("li",{children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[c.code&&e.jsx("span",{className:"w-7 shrink-0 font-mono text-[10px] text-muted-foreground",children:c.code}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground/85",children:c.title}),pe(c.current)&&e.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:c.current}),e.jsx("span",{className:"w-9 shrink-0 text-right text-xs font-semibold tabular-nums text-foreground",children:X(c.progress)})]}),e.jsx(de,{value:c.progress,expected:c.expected,size:"xs",className:x("mt-1.5",c.code&&"ml-9 w-[calc(100%-2.25rem)]")})]},c.id))})]})}function ra(s,t){if(t.sortValue)return t.sortValue(s);const a=s[t.key];return typeof a=="number"||typeof a=="string"?a:""}function Rr({columns:s,rows:t,rowKey:a,density:n="compact",defaultSort:r,selectedKey:l,onRowClick:i,loading:c=!1,empty:m,caption:u,className:o}){const[d,f]=C.useState(r??null),v=(()=>{if(!d)return t;const g=s.find(N=>N.key===d.key);if(!g)return t;const S=d.direction==="asc"?1:-1;return[...t].sort((N,j)=>{const z=ra(N,g),L=ra(j,g);return typeof z=="number"&&typeof L=="number"?(z-L)*S:String(z).localeCompare(String(L),void 0,{numeric:!0})*S})})(),h=g=>{f(S=>!S||S.key!==g?{key:g,direction:"desc"}:S.direction==="desc"?{key:g,direction:"asc"}:null)},b=n==="compact"?"h-9":"h-11",w=g=>g.numeric||g.align==="right"?"text-right":g.align==="center"?"text-center":"text-left";return e.jsx("div",{className:x("overflow-x-auto scrollbar-app-thin",o),children:e.jsxs("table",{className:"w-full border-collapse text-[13px]",children:[u&&e.jsx("caption",{className:"sr-only",children:u}),e.jsx("thead",{children:e.jsx("tr",{className:"border-b border-border/70",children:s.map(g=>{const S=d?.key===g.key,N=S?d?.direction==="asc"?Ws:ka:Mn;return e.jsx("th",{scope:"col",style:g.width?{width:g.width}:void 0,"aria-sort":S?d?.direction==="asc"?"ascending":"descending":void 0,className:x("h-8 whitespace-nowrap px-3 text-xs font-medium text-muted-foreground first:pl-2 last:pr-2",w(g)),children:g.sortable?e.jsxs("button",{type:"button",onClick:()=>h(g.key),className:x("group inline-flex items-center gap-1 rounded transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",(g.numeric||g.align==="right")&&"flex-row-reverse",S&&"text-foreground"),children:[g.header,e.jsx(N,{"aria-hidden":"true",className:x("size-3",S?"opacity-100":"opacity-0 group-hover:opacity-60 group-focus-visible:opacity-60")})]}):g.header},g.key)})})}),e.jsx("tbody",{children:c?Array.from({length:4}).map((g,S)=>e.jsx("tr",{className:"border-b border-border/40",children:s.map(N=>e.jsx("td",{className:x(b,"px-3 first:pl-2 last:pr-2"),children:e.jsx(qe,{className:x("h-2.5",N.numeric?"ml-auto w-10":"w-3/4")})},N.key))},S)):v.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:s.length,className:"py-2",children:m})}):v.map(g=>{const S=a(g),N=l===S;return e.jsx("tr",{"aria-selected":i?N:void 0,tabIndex:i?0:void 0,onClick:i?()=>i(g):void 0,onKeyDown:i?j=>{j.key==="Enter"&&i(g)}:void 0,className:x("border-b border-border/40 transition-colors last:border-0",i&&"cursor-pointer outline-none focus-visible:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/60",N?"bg-accent":"hover:bg-accent/60"),children:s.map(j=>e.jsx("td",{className:x(b,"px-3 text-foreground/85 first:pl-2 last:pr-2",w(j),j.numeric&&"tabular-nums"),children:j.render?j.render(g):String(g[j.key]??"")},j.key))},S)})})]})})}function zo({status:s}){return e.jsxs("span",{"aria-hidden":"true",className:x("flex size-5 shrink-0 items-center justify-center rounded-md",s==="done"&&"bg-primary text-primary-foreground",s==="current"&&"bg-background ring-[1.5px] ring-inset ring-foreground",s==="upcoming"&&"bg-background ring-1 ring-inset ring-border",s==="blocked"&&"bg-destructive/10 text-destructive ring-1 ring-inset ring-destructive/50"),children:[s==="done"&&e.jsx(rs,{className:"size-3",strokeWidth:3}),s==="current"&&e.jsx("span",{className:"size-1.5 rounded-full bg-foreground"}),s==="blocked"&&e.jsx(Ns,{className:"size-3"})]})}function Tt({steps:s,className:t}){return e.jsx("div",{className:x("overflow-x-auto scrollbar-app-thin pb-1",t),children:e.jsx("ol",{className:"flex min-w-max",children:s.map((a,n)=>{const r=n===s.length-1;return e.jsxs("li",{"aria-current":a.status==="current"?"step":void 0,className:x("flex min-w-[128px] flex-col gap-2",!r&&"flex-1 pr-3"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(zo,{status:a.status}),!r&&e.jsx("span",{"aria-hidden":"true",className:x("h-px flex-1",a.status==="done"?"bg-foreground":"bg-border")})]}),e.jsxs("div",{className:"min-w-0 pr-2",children:[e.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:String(n+1).padStart(2,"0")}),e.jsx("div",{className:x("text-[13px] leading-5",a.status==="upcoming"?"text-foreground/70":"font-medium text-foreground"),children:a.title}),(a.owner||a.time)&&e.jsxs("div",{className:"text-xs leading-[18px] text-muted-foreground",children:[a.owner,a.owner&&a.time&&" · ",a.time]})]})]},a.id)})})})}function Ir({node:s}){return e.jsxs("li",{children:[e.jsxs("div",{className:x("relative flex min-w-[92px] max-w-[148px] flex-col items-center gap-0.5 rounded-lg bg-background px-2.5 py-1.5 text-center shadow-raised ring-1",s.active?"ring-foreground/70":"ring-border/80"),children:[s.status&&e.jsx("span",{className:"absolute right-1.5 top-1.5",children:s.status}),s.icon&&e.jsx("span",{className:"flex text-muted-foreground [&_img]:size-4 [&_svg]:size-4",children:s.icon}),e.jsx("span",{className:"max-w-full truncate text-xs font-medium text-foreground",children:s.title}),pe(s.subtitle)&&e.jsx("span",{className:"max-w-full truncate text-[11px] text-muted-foreground",children:s.subtitle})]}),s.children?.length?e.jsx("ul",{children:s.children.map(t=>e.jsx(Ir,{node:t},t.id))}):null]})}function Lr({root:s,className:t}){return e.jsx("div",{className:x("overflow-x-auto scrollbar-app-thin pb-1",t),children:e.jsx("ul",{className:"ds-org-tree min-w-max",children:e.jsx(Ir,{node:s})})})}const Do=Object.freeze(Object.defineProperty({__proto__:null,ActivityFeed:Ca,AgentMark:te,Avatar:ie,AvatarGroup:Cn,Badge:Q,BarChart:Nr,BranchTag:Ts,Breadcrumb:yt,BreadcrumbItem:Ke,Bulletin:Ta,Button:A,CalendarHeatmap:Mr,ChartFrame:Ze,ChartTooltip:Oe,Checkbox:ye,Chip:xt,ChipSelect:ce,CodeBlock:Ot,CommitItem:Ms,Composer:cr,ConfirmDialog:yn,ContextMenu:Va,ContextMenuContent:Ha,ContextMenuItem:Es,ContextMenuLabel:Il,ContextMenuSeparator:qa,ContextMenuTrigger:Ya,CopyButton:As,CountBadge:Is,DataTable:Rr,DeadlineList:Ma,Delta:oe,Dialog:wn,DialogClose:pt,DialogContent:kn,DialogTrigger:Sn,DiffStat:Ae,DonutChart:kt,EmptyState:fs,FILE_CHANGE_TONE:vl,Field:ae,FileChip:cs,FileGlyph:Nl,FileRow:We,FileStatusBadge:yl,FunnelChart:Cr,GanttChart:Er,HealthBadge:Qt,HeatTable:Tr,HeroFigure:Dr,ICON_GROUPS:rr,ICON_SIZE:Bs,Icon:se,IconButton:J,Input:Ne,Kbd:Ye,KbdGroup:Ee,Leaderboard:Aa,Legend:ke,LegendSwatchMark:Xs,LineChart:jr,LiveDot:Re,MENU_INDICATOR:fn,MENU_ITEM:Wt,MENU_ITEM_CHECKABLE:jn,MENU_ITEM_DANGER:bn,MENU_LABEL:Gt,MENU_SEPARATOR:ut,MENU_SHORTCUT:ht,MENU_SURFACE:Ut,MOTION:at,Menu:Xa,MenuCheckboxItem:Ll,MenuContent:Qa,MenuGroup:Pl,MenuItem:_s,MenuLabel:Za,MenuRadioGroup:Ja,MenuRadioItem:xs,MenuSeparator:dt,MenuSub:en,MenuSubContent:sn,MenuSubTrigger:tn,MenuTrigger:an,MessageBubble:gt,Meter:Ds,MonthCalendar:_r,NavGroup:Ls,NavRow:be,NavRowLink:Wl,Notice:Se,ObjectiveCard:Ct,Panel:_o,Popover:$a,PopoverAnchor:fl,PopoverClose:it,PopoverContent:Oa,PopoverTrigger:Fa,PriorityTag:Ce,ProcessSteps:Tt,ProjectDot:ns,ProjectTag:Pe,PromptBlock:Ft,RadioGroup:vn,RankedBars:Sr,RelativeTime:ne,Ring:_e,SERIES_COLOR:Me,STATUS_MARK:Ve,ScaleLegend:St,ScatterChart:Ar,SearchField:ot,Segmented:ps,Select:mt,Skeleton:qe,SkeletonRows:mn,SkeletonText:un,Slider:Nt,SlopeChart:wr,Sparkline:Xt,Spinner:ve,StackedBarChart:yr,StatGroup:zr,StatTile:hs,StateSquare:wt,StepList:ur,Stepper:mr,Switch:Nn,TONE_DOT:bs,TONE_INK:Rt,TONE_MARK:He,TONE_SOFT:Jr,TONE_SOLID:el,Tabs:or,TabsContent:zs,TabsList:dr,TabsTrigger:ms,Tag:xn,TaskRow:Ea,TaskStatusBadge:Ps,TaskStatusGroup:_a,TaskStatusIcon:sl,TerminalBlock:Wa,TextLink:Xe,Textarea:Ua,ThinkingText:lr,Timeline:za,TodoList:Da,TodoStateIcon:tl,Tooltip:Qe,TopologyTree:Lr,Track:de,TreeList:gr,VIZ:T,VIZ_RAMP:Le,WaffleChart:kr,WorkingDots:ir,addDays:we,arcPath:Pa,bandLayout:Pt,barPath:pl,buttonClassName:al,clamp:Je,columnPath:Lt,dodge:rt,fileChangeTone:wl,formatNumber:ue,formatPercent:X,formatRelativeTime:nl,formatSignedNumber:Ra,formatSignedPercent:It,hasNode:pe,icons:Ys,linearScale:ge,navRowClassName:rl,niceDomain:es,niceStep:gl,ordinalRamp:ll,projectDotClass:il,quantize:Os,readTerminalTheme:kl,shortenProjectName:ol,stackColors:ws,textLinkClassName:ct,useControllableState:Ks,useElementWidth:$e,useFieldControl:dl,useNow:cl,usePrefersReducedMotion:$t,useSvgId:Vs},Symbol.toStringTag,{value:"Module"})),Pr=[{title:"基础",sections:[{id:"principles",title:"原则",en:"Principles"},{id:"color",title:"颜色",en:"Color"},{id:"typography",title:"文字",en:"Typography"},{id:"layout",title:"间距、圆角与层级",en:"Space & Elevation"},{id:"icons",title:"图标",en:"Icons"},{id:"agents",title:"Agent 标志",en:"Agent Logos"},{id:"motion",title:"动效",en:"Motion"}]},{title:"组件",sections:[{id:"status",title:"状态",en:"Status"},{id:"actions",title:"操作",en:"Actions"},{id:"inputs",title:"输入",en:"Inputs"},{id:"overlays",title:"浮层",en:"Overlays"},{id:"navigation",title:"导航",en:"Navigation"},{id:"business",title:"业务组件",en:"Agent Tower"}]},{title:"展示组件",sections:[{id:"viz-principles",title:"展示原则",en:"Display Principles"},{id:"marks",title:"画法",en:"Marks"},{id:"goals",title:"目标",en:"Goals"},{id:"numbers",title:"数字",en:"Numbers"},{id:"trends",title:"趋势与对比",en:"Trend & Comparison"},{id:"composition",title:"构成与分布",en:"Composition"},{id:"lists",title:"清单",en:"Lists"},{id:"tables",title:"表格",en:"Tables"},{id:"schedule",title:"流程与排期",en:"Process & Schedule"},{id:"people",title:"人与内容",en:"People & Content"}]}],ze=Pr.flatMap(s=>s.sections);function Ro(s){return String(ze.findIndex(t=>t.id===s)+1).padStart(2,"0")}const $r=C.createContext("");function Y({id:s,description:t,columns:a=2,children:n}){const r=ze.find(i=>i.id===s),l=Ro(s);return e.jsxs("section",{id:s,"data-ds-section":"","aria-labelledby":`${s}-title`,className:"scroll-mt-8 [counter-reset:ds-specimen]",children:[e.jsxs("header",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:[e.jsx("span",{className:"tabular-nums text-foreground/80",children:l}),e.jsx("span",{"aria-hidden":"true",className:"h-px w-5 bg-border"}),e.jsx("span",{className:"uppercase",children:r?.en})]}),e.jsx("h2",{id:`${s}-title`,className:"mt-2.5 text-[22px] font-semibold leading-[30px] tracking-tight text-foreground",children:r?.title??s}),t&&e.jsx("p",{className:"mt-2 max-w-3xl text-sm leading-6 text-muted-foreground",children:t})]}),e.jsx($r.Provider,{value:l,children:e.jsx("div",{className:x("grid grid-cols-1 gap-5",a===2&&"xl:grid-cols-2",a===3&&"lg:grid-cols-2 2xl:grid-cols-3"),children:n})})]})}function Js({index:s,title:t,description:a}){return e.jsxs("div",{className:"pt-4",children:[e.jsxs("div",{className:"flex items-center gap-3 text-[11px] font-medium text-muted-foreground",children:[e.jsxs("span",{className:"font-mono tracking-wide",children:["PART ",s]}),e.jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-border/70"})]}),e.jsx("p",{className:"mt-3 text-[26px] font-medium leading-snug tracking-tight text-foreground",children:t}),a&&e.jsx("p",{className:"mt-1 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:a})]})}function p({name:s,title:t,description:a,span:n=1,dos:r,donts:l,canvas:i="plain",bodyClassName:c,className:m,children:u}){const o=C.useContext($r),d=!!(r?.length||l?.length);return e.jsxs("article",{className:x("flex min-w-0 flex-col overflow-hidden rounded-xl border border-border/60 bg-background [counter-increment:ds-specimen]",n===2&&"xl:col-span-2",n===3&&"lg:col-span-2 2xl:col-span-3",m),children:[e.jsxs("header",{className:x("px-6 pt-5",i==="chrome"?"pb-5":"pb-1"),children:[e.jsxs("div",{className:"flex min-w-0 items-baseline gap-2",children:[e.jsx("h3",{className:"min-w-0 truncate text-sm font-semibold text-foreground",children:t??s}),t&&e.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-muted-foreground",children:s}),e.jsxs("span",{className:"ml-auto shrink-0 pl-2 font-mono text-[11px] tabular-nums text-muted-foreground/50",children:[o,".",e.jsx("span",{className:"before:content-[counter(ds-specimen)]"})]})]}),a&&e.jsx("p",{className:"mt-1.5 max-w-3xl text-[13px] leading-[22px] text-muted-foreground",children:a})]}),e.jsx("div",{className:x("min-w-0 flex-1 px-6 pb-6",i==="chrome"?"bg-sidebar pt-6":"pt-5",c),children:u}),d&&e.jsxs("footer",{className:"grid gap-x-8 gap-y-2.5 border-t border-border/50 px-6 py-4 sm:grid-cols-2",children:[r?.length?e.jsx(la,{kind:"do",rules:r}):null,l?.length?e.jsx(la,{kind:"dont",rules:l}):null]})]})}function la({kind:s,rules:t}){const a=s==="do"?rs:ya;return e.jsx("ul",{className:"flex flex-col gap-1.5","aria-label":s==="do"?"推荐":"避免",children:t.map((n,r)=>e.jsxs("li",{className:"flex gap-2 text-xs leading-5 text-muted-foreground",children:[e.jsx(a,{"aria-hidden":"true",className:x("mt-1 size-3 shrink-0",s==="do"?"text-success/80":"text-destructive/70"),strokeWidth:2.5}),e.jsx("span",{children:n})]},r))})}function D({label:s,className:t,children:a}){return e.jsxs("div",{className:x("flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center sm:gap-4",t),children:[s!==void 0&&e.jsx("span",{className:"w-20 shrink-0 text-xs text-muted-foreground",children:s}),e.jsx("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:a})]})}function V({className:s,children:t}){return e.jsx("p",{className:x("text-xs leading-5 text-muted-foreground",s),children:t})}function De({className:s,children:t}){return e.jsx("code",{className:x("rounded bg-foreground/[0.05] px-1 py-px font-mono text-[11px] text-foreground/80",s),children:t})}const Io=new Date(2026,9,14),H=new Date(2026,9,14,15,30).getTime(),Mt=6e4,At=60*Mt,ia=24*At;function Or(s){let t=s>>>0;const a=()=>{t=t+1831565813>>>0;let n=t;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296};return{next:a,between:(n,r)=>n+a()*(r-n),int:(n,r)=>Math.floor(n+a()*(r-n+1))}}const ee=[{name:"agent-tower",color:"text-indigo-600"},{name:"docs-site",color:"text-emerald-600"},{name:"desktop-shell",color:"text-rose-600"},{name:"payment-gateway-service",color:"text-amber-600"}],Lo=["text-indigo-600","text-emerald-600","text-rose-600","text-amber-600","text-cyan-600","text-violet-600","text-teal-600","text-pink-600"],js=[{id:"task-1",title:"重塑左侧任务面板样式与交互",status:Te.Review,priority:re.HIGH,project:ee[0],updatedAt:H-4*Mt,agent:$.CLAUDE_CODE,minutes:48,additions:412,deletions:187},{id:"task-2",title:"修复 Claude 会话自动结束及停止时进程树清理超时",status:Te.Running,priority:re.URGENT,project:ee[0],updatedAt:H-12*Mt,agent:$.CODEX,minutes:23,additions:96,deletions:41},{id:"task-3",title:"文档站接入全文搜索",status:Te.Pending,priority:re.NORMAL,project:ee[1],updatedAt:H-3*At,agent:$.GEMINI_CLI,minutes:0,additions:0,deletions:0},{id:"task-4",title:"桌面端窗口控制按钮适配 Windows",status:Te.Done,priority:re.LOW,project:ee[2],updatedAt:H-2*ia,agent:$.CURSOR_AGENT,minutes:31,additions:58,deletions:12},{id:"task-5",title:"回调验签迁移到新密钥",status:Te.Cancelled,priority:re.NORMAL,project:ee[3],updatedAt:H-9*ia,agent:$.QWEN_CODE,minutes:6,additions:4,deletions:4},{id:"task-6",title:"三档执行权限适配与审批闭环",status:Te.Done,priority:re.HIGH,project:ee[0],updatedAt:H-26*At,agent:$.CLAUDE_CODE,minutes:74,additions:865,deletions:233}],Fr=Array.from({length:14},(s,t)=>`10/${t+1}`),Zs=[14,17,9,6,19,22,21,24,26,12,10,27,30,33],Jt=[12,13,8,5,15,16,18,17,19,9,8,18,20,21],ea=["W37","W38","W39","W40","W41","W42"],Br=[32,41,38,45,52,36],Gr=[40,40,45,45,50,50],Et=[{id:"lt10",label:"10 分钟内"},{id:"10to30",label:"10–30 分钟"},{id:"30to60",label:"30–60 分钟"},{id:"gt60",label:"1 小时以上"}],Po=[[18,22,9,4],[20,25,11,5],[16,27,14,6],[22,30,12,7],[25,33,15,6],[14,19,8,3]],Wr=[{id:"claude",label:"Claude Code",start:.62,end:.74,emphasis:!0},{id:"codex",label:"Codex",start:.58,end:.61},{id:"cursor",label:"Cursor Agent",start:.55,end:.6},{id:"gemini",label:"Gemini CLI",start:.49,end:.47},{id:"qwen",label:"Qwen Code",start:.41,end:.5}],et=[{id:"claude",agent:$.CLAUDE_CODE,value:486},{id:"codex",agent:$.CODEX,value:312},{id:"gemini",agent:$.GEMINI_CLI,value:158},{id:"cursor",agent:$.CURSOR_AGENT,value:97},{id:"qwen",agent:$.QWEN_CODE,value:41}],$o=[{id:"created",label:"创建",value:1284},{id:"started",label:"启动 Agent",value:1102},{id:"review",label:"提交审查",value:864},{id:"merged",label:"合并",value:701}],Oo=(()=>{const s=Or(7);return[...Array.from({length:42},(a,n)=>{const r=Math.round(s.between(3,85)),l=Math.max(8,Math.round(r*s.between(5.5,9.5)+s.between(-60,60)));return{id:`s${n}`,x:r,y:l}}),{id:"outlier-1",x:88,y:64,label:"卡在依赖安装",emphasis:!0},{id:"outlier-2",x:14,y:940,label:"批量格式化",emphasis:!0}]})(),Fo=["周一","周二","周三","周四","周五","周六","周日"],Bo=[[24,31,28,35,29,6,3],[8,11,9,14,12,2,0],[5,7,12,9,6,1,1],[13,10,15,11,18,4,2]],Ur=we(Io,-181),oa=(()=>{const s=Or(42);return Array.from({length:182},(t,a)=>{const r=we(Ur,a).getDay(),l=r===0||r===6,i=.6+a/182*.8;return s.next()<(l?.45:.06)?0:Math.round((l?s.between(0,4):s.between(2,14))*i)})})(),Go=new Date(2026,9,5),Wo=[{id:"g1",label:"需求与设计",meta:"shitian",start:0,end:4,progress:1},{id:"g2",label:"组件库",meta:"Claude Code",start:3,end:13,progress:.8},{id:"g3",label:"展示页",meta:"Claude Code",start:8,end:16,progress:.45},{id:"g4",label:"主页迁移",meta:"Codex",start:14,end:22,progress:0},{id:"g5",label:"回归测试",meta:"Gemini CLI",start:20,end:25,progress:0},{id:"g6",label:"发布 v1.3",meta:"shitian",start:26,end:27,progress:0}],Uo=[{id:"e1",date:"2026-10-02",title:"迭代周会",time:"10:00"},{id:"e2",date:"2026-10-09",title:"v1.2 发布",tone:"success"},{id:"e3",date:"2026-10-12",title:"迭代周会",time:"10:00"},{id:"e4",date:"2026-10-14",title:"设计评审",time:"14:00"},{id:"e5",date:"2026-10-14",title:"组件库提测"},{id:"e6",date:"2026-10-14",title:"TeamRun 演示",time:"17:00"},{id:"e7",date:"2026-10-16",title:"隧道证书到期",tone:"danger"},{id:"e8",date:"2026-10-21",title:"主页迁移截止",tone:"warning"},{id:"e9",date:"2026-10-28",title:"v1.3 发布"}],Ko={columns:[{key:"day",header:"日期"},{key:"current",header:"本期",align:"right"},{key:"previous",header:"上期",align:"right"}],rows:Fr.map((s,t)=>({day:s,current:Zs[t],previous:Jt[t]}))},Vo={columns:[{key:"week",header:"周"},{key:"actual",header:"实际",align:"right"},{key:"plan",header:"计划",align:"right"}],rows:ea.map((s,t)=>({week:s,actual:Br[t],plan:Gr[t]}))},Ho={columns:[{key:"agent",header:"Agent"},{key:"start",header:"9 月",align:"right"},{key:"end",header:"10 月",align:"right"}],rows:Wr.map(s=>({agent:s.label,start:X(s.start),end:X(s.end)}))};function qo(){return e.jsxs(Y,{id:"trends",description:"随时间变化用折线(连续)或柱图(分期);两期之间谁变了用斜率图。主系列墨色,对比系列灰色,计划与目标用虚线或斜纹。",children:[e.jsx(p,{name:"LineChart",title:"折线图",description:"2px 线,悬停出现十字线与数值卡;竖线标出发布日,虚线是目标。方向键可逐点移动。",span:2,dos:["每张图都能切到表格(右上角按钮)——数值不能只靠悬停读到"],donts:["双 Y 轴","超过 3 条线:拆成小多图或改用表格"],bodyClassName:"p-0",children:e.jsx(Ze,{bare:!0,className:"p-5",title:"每日完成任务",subtitle:"10 月 1 日 – 14 日 · 个",legend:e.jsx(ke,{items:[{label:"本期",swatch:"line",color:Me.ink},{label:"上期(按星期对齐)",swatch:"line",color:Me.context}]}),table:Ko,footnote:"周末明显回落;v1.2 发布后,完成量连续 3 个工作日高于目标线。",children:e.jsx(jr,{"aria-label":"每日完成任务,本期与上期对比",labels:Fr,series:[{id:"current",label:"本期",values:Zs,area:!0},{id:"previous",label:"上期",values:Jt,variant:"context"}],marker:{index:8,label:"v1.2 发布"},baseline:{value:25,label:"目标"}})})}),e.jsx(p,{name:"BarChart",title:"柱图",description:"柱宽封顶 24px,4px 数据端圆角;计划用斜纹并排。只在最后一组柱顶标数。",bodyClassName:"p-0",children:e.jsx(Ze,{bare:!0,className:"p-5",title:"每周合并的 PR",subtitle:"实际 vs 计划 · 个",legend:e.jsx(ke,{items:[{label:"实际",swatch:"solid",color:T.ink},{label:"计划",swatch:"hatch",color:T.plan}]}),table:Vo,footnote:"W42 截至周三,距本周计划还差 14 个。",children:e.jsx(Nr,{"aria-label":"每周合并的 PR,实际与计划",labels:ea,series:[{id:"actual",label:"实际",values:Br},{id:"plan",label:"计划",values:Gr,variant:"plan"}]})})}),e.jsx(p,{name:"SlopeChart",title:"斜率图",description:"两个时间点之间谁升谁降:主角墨色加粗,其余为灰色背景线;端点标签相撞时自动错开。",bodyClassName:"p-0",children:e.jsx(Ze,{bare:!0,className:"p-5",title:"一次通过审查的比例",subtitle:"9 月 → 10 月 · 按 Agent",table:Ho,children:e.jsx(wr,{"aria-label":"各 Agent 一次通过审查比例的变化",items:Wr,startLabel:"9 月",endLabel:"10 月",formatValue:s=>X(s),formatChange:s=>`${Ra(Math.round((s.end-s.start)*100))} pt`})})})]})}const Yo=ws(Et.length),Xo=[{id:"done",label:"已完成",value:412,color:Ve.success},{id:"running",label:"运行中",value:38,color:Ve.info},{id:"review",label:"待审查",value:21,color:Ve.warning},{id:"pending",label:"待开始",value:64,color:Ve.neutral}];function Qo(){const s=et.reduce((t,a)=>t+a.value,0);return e.jsxs(Y,{id:"composition",description:"构成用堆叠柱、环图、方格图;分布用排行条、漏斗、散点。类别默认用墨阶由深到浅;只有当类别本身就是状态时才用状态色。",children:[e.jsx(p,{name:"StackedBarChart",title:"堆叠柱",description:"看构成随时间的变化。分段之间 2px 白缝,最深的一段放在最下面;只标最后一根的合计。",bodyClassName:"p-0",children:e.jsx(Ze,{bare:!0,className:"p-5",title:"任务耗时分布",subtitle:"按周 · 个",legend:e.jsx(ke,{items:Et.map((t,a)=>({label:t.label,swatch:"solid",color:Yo[a]}))}),children:e.jsx(yr,{"aria-label":"每周任务耗时分布",labels:ea,segments:Et,data:Po})})}),e.jsxs(p,{name:"DonutChart",title:"环图",description:"部分与整体,不超过 5 段。中心放合计,悬停某段时换成该段的值;右侧数值表同时也是图例。",donts:["超过 5 段——把小的合并成「其他」","用环图比较两期——改用柱图"],children:[e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(kt,{"aria-label":"任务状态构成",segments:Xo,centerLabel:"个任务"}),e.jsx(kt,{"aria-label":"各 Agent 会话占比",segments:et.map(t=>({id:t.id,label:$s(t.agent),value:t.value})),centerLabel:"次会话",size:120,thickness:12})]}),e.jsx(V,{className:"mt-3",children:"上:类别就是状态,用状态色;下:普通类别,用墨阶由深到浅。"})]}),e.jsx(p,{name:"WaffleChart",title:"方格图",description:"一个比例的直观版:100 格,实心是完成,斜纹是进行中。",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[e.jsx(kr,{"aria-label":"迭代完成 62%,进行中 14%",value:.62,secondary:.14,cellSize:12}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[26px] font-semibold leading-8 tracking-tight text-foreground",children:"62%"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"迭代任务已完成"})]}),e.jsx(ke,{className:"flex-col items-start gap-1.5",items:[{label:"已完成",swatch:"solid",color:T.ink,value:"62"},{label:"进行中",swatch:"hatch",color:T.plan,value:"14"},{label:"未开始",swatch:"solid",color:T.empty,value:"24"}]})]})]})}),e.jsx(p,{name:"RankedBars",title:"排行条",description:"谁多谁少:按值降序,前三名序号加深;条长相对最大值。",children:e.jsx(Sr,{"aria-label":"近 30 天各 Agent 会话数",items:et.map(t=>({id:t.id,label:$s(t.agent),value:t.value,meta:X(t.value/s),icon:e.jsx(le,{agentType:t.agent,className:"size-4"})}))})}),e.jsx(p,{name:"FunnelChart",title:"漏斗",description:"逐级转化:每级右侧是占首级的比例,级间是转化率;流失最大的一级用警告色标出。",children:e.jsx(Cr,{"aria-label":"任务从创建到合并的转化",stages:$o,formatValue:t=>ue(t)})}),e.jsx(p,{name:"ScatterChart",title:"散点图",description:"两个量有没有关系:点是灰的,需要注意的离群点用墨色并直接标注。",bodyClassName:"p-0",children:e.jsx(Ze,{bare:!0,className:"p-5",title:"会话时长与改动行数",subtitle:"近 30 天 · 每个点是一次会话",footnote:"两个离群点:一次卡在依赖安装(时长长、改动少),一次是批量格式化(时长短、改动多)。",children:e.jsx(Ar,{"aria-label":"会话时长与改动行数的关系",points:Oo,xLabel:"会话时长(分钟)",yLabel:"改动行数",height:260})})})]})}const da=[{tone:"neutral",label:"草稿"},{tone:"info",label:"运行中"},{tone:"success",label:"已合并"},{tone:"warning",label:"待审查"},{tone:"danger",label:"失败"}],Zo=[{variant:"dot",label:"dot 圆点"},{variant:"soft",label:"soft 浅底"},{variant:"outline",label:"outline 描边"},{variant:"solid",label:"solid 实底"}];function Jo(){const[s,t]=C.useState(!0);return e.jsxs(Y,{id:"status",description:"状态反馈从安静到醒目排成一列:圆点 → 浅底徽章 → 提示条 → 实底。越需要用户处理,越往后取。",children:[e.jsxs(p,{name:"Badge",title:"徽章",description:"一两个字的状态或属性。文字永远用 *-ink;没有状态含义的标签一律 neutral。",span:2,dos:["状态列表首选 dot:最安静,颜色只占 6px","solid 每屏至多一处,留给最需要注意的那一个"],donts:["用徽章给分类、Agent、项目上色","徽章里放超过 6 个字的句子"],children:[e.jsx("div",{className:"overflow-x-auto scrollbar-app-thin",children:e.jsxs("div",{className:"grid min-w-[560px] grid-cols-[96px_repeat(5,minmax(0,1fr))] items-center gap-x-3 gap-y-3",children:[e.jsx("span",{}),da.map(a=>e.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:a.tone},a.tone)),Zo.map(a=>e.jsxs("div",{className:"contents",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:a.label}),da.map(n=>e.jsx("span",{children:e.jsx(Q,{tone:n.tone,variant:a.variant,children:n.label})},n.tone))]},a.variant))]})}),e.jsxs("div",{className:"mt-5 flex flex-wrap items-center gap-x-6 gap-y-3 border-t border-border/50 pt-4",children:[e.jsxs(D,{label:"尺寸",children:[e.jsx(Q,{size:"sm",tone:"info",children:"sm 18"}),e.jsx(Q,{tone:"info",children:"md 20"})]}),e.jsxs(D,{label:"形状",children:[e.jsx(Q,{shape:"tag",size:"sm",className:"font-semibold",children:"P1"}),e.jsx(Q,{shape:"tag",size:"sm",tone:"danger",className:"font-semibold",children:"P0"}),e.jsx(Q,{shape:"tag",variant:"outline",children:"v1.3"})]})]})]}),e.jsxs(p,{name:"CountBadge",title:"计数",description:"分组标题、导航行右侧的数量:默认是安静的灰字,只有需要介入时才上色。",canvas:"chrome",children:[e.jsx("div",{className:"flex max-w-xs flex-col gap-1",children:[{label:"待审查",count:3,tone:"warning"},{label:"运行中",count:2,tone:"neutral"},{label:"已完成",count:128,tone:"neutral"}].map(a=>e.jsxs("div",{className:"flex h-7 items-center rounded-md px-2 text-xs font-medium text-muted-foreground",children:[a.label,e.jsx(Is,{count:a.count,max:99,tone:a.tone,className:"ml-auto"})]},a.label))}),e.jsx(V,{className:"mt-3",children:"超过上限显示 99+;只有「待审查」这类需要你动手的计数用 warning。"})]}),e.jsx(p,{name:"Spinner",title:"转圈",description:"只用于「正在发生、时长未知」的短等待。有结构的内容用骨架,有进度的用进度条。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(D,{label:"尺寸",children:[e.jsx(ve,{size:"xs"}),e.jsx(ve,{size:"sm"}),e.jsx(ve,{size:"md"}),e.jsx(ve,{size:"lg"})]}),e.jsx(D,{label:"带说明",children:e.jsx(ve,{label:"正在读取文件"})}),e.jsxs(D,{label:"按钮内",children:[e.jsx(A,{loading:!0,children:"保存中"}),e.jsx(A,{variant:"primary",loading:!0,children:"创建中"})]})]})}),e.jsx(p,{name:"Notice",title:"提示条",description:"一段需要读到、但不打断操作的说明。颜色只给图标,正文保持墨色。状态栏、侧栏这类紧凑面板用 sm 尺寸(最后一条)。",span:2,donts:["用提示条报告需要立刻处理的错误——那是对话框或 Toast 的事","整段彩色正文"],children:e.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[e.jsx(Se,{tone:"info",title:"工作区正在准备",children:"正在复制 .env 与 node_modules,完成后 Agent 会自动开始。"}),e.jsx(Se,{tone:"success",title:"已合并到 main",children:"分支 feat/design-system 已删除,工作树已清理。"}),e.jsx(Se,{tone:"warning",title:"自动同意(完全访问)",action:e.jsx(A,{size:"xs",variant:"link",children:"了解风险"}),children:"Agent 可以不经确认执行任意命令和网络请求。"}),s?e.jsx(Se,{tone:"danger",title:"合并冲突",onDismiss:()=>t(!1),children:"src/index.css 有 2 处冲突,解决后才能继续合并。"}):e.jsx("div",{className:"flex items-center justify-center rounded-lg border border-dashed border-border text-xs text-muted-foreground",children:e.jsx(A,{size:"xs",variant:"ghost",onClick:()=>t(!0),children:"恢复示例"})}),e.jsx(Se,{className:"lg:col-span-2",children:"修改在新运行实例启动时生效,运行中的会话保留启动时的权限。"}),e.jsx(Se,{size:"sm",tone:"warning",className:"lg:col-span-2",children:"3 个本地改动未处理,需要先整理后再继续。"})]})}),e.jsx(p,{name:"EmptyState",title:"空状态",description:"说清楚「为什么是空的、下一步做什么」:图标浅灰细描边,一句话,至多一个主操作。",children:e.jsx(fs,{icon:e.jsx(zn,{}),title:"还没有任务",description:"在上方输入框描述一件事,Agent 会在独立的工作树里完成它。",action:e.jsxs(A,{variant:"primary",size:"sm",children:[e.jsx(vs,{}),"新建任务"]}),className:"py-6"})}),e.jsx(p,{name:"EmptyState · dashed",title:"面板内空状态",description:"嵌在面板、列表、拖放区里时用虚线框 + 小号。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(fs,{variant:"dashed",size:"sm",icon:e.jsx(cn,{}),title:"没有变更文件",description:"Agent 修改文件后会出现在这里"}),e.jsx(fs,{variant:"dashed",size:"sm",description:"拖入文件或粘贴截图作为附件"})]})}),e.jsx(p,{name:"Skeleton",title:"骨架",description:"首次加载有固定结构的内容时使用,几何与真实内容一致,加载完不跳动。",span:2,donts:["刷新已有数据时闪骨架——保留旧内容,降低不透明度即可"],children:e.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[e.jsxs("div",{children:[e.jsx(V,{className:"mb-2",children:"列表行(与 32px 侧栏行同几何)"}),e.jsx(mn,{rows:4})]}),e.jsxs("div",{children:[e.jsx(V,{className:"mb-2",children:"段落"}),e.jsx(un,{lines:4})]}),e.jsxs("div",{children:[e.jsx(V,{className:"mb-2",children:"卡片"}),e.jsxs("div",{className:"rounded-xl border border-border/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(qe,{className:"size-8"}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(qe,{className:"h-2.5 w-2/3"}),e.jsx(qe,{className:"h-2 w-1/3"})]})]}),e.jsx(qe,{className:"mt-4 h-16 w-full rounded-lg"})]})]})]})})]})}const ca=["xs","sm","md","lg","xl"];function ed(){return e.jsxs(Y,{id:"actions",description:"按钮按强调程度分五种:primary 只给这一屏最重要的一件事,其余从 secondary 往下取。危险操作只换语气,不新增形状。",children:[e.jsx(p,{name:"Button",title:"按钮",description:"默认 secondary(描边白卡),高度 32px 与侧栏行对齐。",span:2,dos:["一屏一个 primary;对话框里主按钮放最右","文案写动作本身:「创建任务」「合并」,而不是「确定」"],donts:["两个 primary 并排","用 danger 表达普通的取消或关闭"],children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs(D,{label:"primary",children:[e.jsxs(A,{variant:"primary",children:[e.jsx(Ga,{}),"开始"]}),e.jsx(A,{variant:"primary",children:"创建任务"}),e.jsx(A,{variant:"primary",loading:!0,children:"创建中"}),e.jsx(A,{variant:"primary",disabled:!0,children:"开始"})]}),e.jsxs(D,{label:"secondary",children:[e.jsxs(A,{children:[e.jsx(vs,{}),"新建项目"]}),e.jsx(A,{children:"导入"}),e.jsx(A,{disabled:!0,children:"导入"})]}),e.jsxs(D,{label:"ghost",children:[e.jsxs(A,{variant:"ghost",children:[e.jsx(gs,{}),"打开终端"]}),e.jsx(A,{variant:"ghost",children:"取消"})]}),e.jsxs(D,{label:"soft",children:[e.jsxs(A,{variant:"soft",children:[e.jsx(Ue,{}),"重试"]}),e.jsx(A,{variant:"soft",children:"更多选项"})]}),e.jsxs(D,{label:"link",children:[e.jsx(A,{variant:"link",children:"查看文档"}),e.jsxs(A,{variant:"link",children:["了解执行权限",e.jsx(Kt,{})]})]}),e.jsxs(D,{label:"danger",children:[e.jsxs(A,{variant:"primary",tone:"danger",children:[e.jsx(ss,{}),"删除项目"]}),e.jsx(A,{tone:"danger",children:"终止会话"}),e.jsx(A,{variant:"ghost",tone:"danger",children:"移除"}),e.jsx(A,{variant:"soft",tone:"danger",children:"放弃更改"})]}),e.jsx(D,{label:"尺寸",children:ca.map(s=>e.jsx(A,{size:s,variant:s==="xl"?"primary":"secondary",children:s},s))})]})}),e.jsx(p,{name:"TextLink",title:"文字链接",description:"句子里的链接:墨色加灰下划线,悬停时下划线加深。跟着句子折行、继承字号,长网址可以断开。单独的「查看文档」用 Button 的 link。",dos:["站外链接加 external:新标签页打开,文字后跟 ↗","Markdown 渲染器、路由 Link 用 textLinkClassName()"],donts:["用蓝色标链接:蓝色只表示运行中和信息","链接文字写「这里」「点击」:写清去哪,如「执行权限说明」"],children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("p",{className:"text-sm leading-[22px] text-foreground/90",children:["任务完成后进入待审查,合并前可以在",e.jsx(Xe,{href:"#actions",children:"变更视图"}),"里逐个文件确认;接入方式见",e.jsx(Xe,{href:"https://github.com/agent-tower/core",external:!0,children:"项目仓库"}),"。"]}),e.jsxs("p",{className:"text-xs leading-5 text-muted-foreground",children:["说明文字里的链接同样是墨色,比周围的灰字深一档:",e.jsx(Xe,{href:"#actions",children:"查看全部快捷键"})]}),e.jsxs("p",{className:"max-w-xs text-[13px] leading-5 text-foreground/90",children:["长网址在任意位置断开:",e.jsx(Xe,{href:"https://github.com/agent-tower/core/blob/main/packages/web/src/design-system/README.md",external:!0,children:"github.com/agent-tower/core/blob/main/packages/web/src/design-system/README.md"})]})]})}),e.jsx(p,{name:"IconButton",title:"图标按钮",description:"工具栏、行尾操作、关闭。默认 ghost:灰色图标,悬停才浮出底色。必须有读屏名称。",dos:["含义不自明的图标外包 Tooltip"],children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(D,{label:"ghost",children:ca.map(s=>e.jsx(J,{size:s,label:`设置(${s})`,children:e.jsx(Dt,{})},s))}),e.jsxs(D,{label:"secondary",children:[e.jsx(J,{variant:"secondary",label:"刷新",children:e.jsx(Ue,{})}),e.jsx(J,{variant:"secondary",size:"sm",label:"新建",children:e.jsx(vs,{})}),e.jsx(J,{variant:"secondary",tone:"danger",label:"删除",children:e.jsx(ss,{})})]}),e.jsxs(D,{label:"带提示",children:[e.jsx(Qe,{content:"打开终端",shortcut:["⌃","`"],children:e.jsx(J,{label:"打开终端",showTitle:!1,children:e.jsx(gs,{})})}),e.jsx(Qe,{content:"刷新",children:e.jsx(J,{label:"刷新",showTitle:!1,children:e.jsx(Ue,{})})}),e.jsx(J,{label:"加载中",loading:!0,children:e.jsx(Ue,{})})]})]})}),e.jsx(p,{name:"CopyButton",title:"复制",description:"点击后对勾 1.6 秒,文案同步变「已复制」,读屏同样播报。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(D,{label:"图标",children:e.jsxs("span",{className:"flex items-center gap-1 font-mono text-xs text-foreground/80",children:["8721b9c",e.jsx(As,{value:"8721b9c",size:"xs"})]})}),e.jsxs(D,{label:"图标 + 文字",children:[e.jsx(As,{value:"pnpm --filter web build",display:"text",variant:"secondary"}),e.jsx(As,{value:"feat/design-system",display:"text",label:"复制分支名"})]})]})}),e.jsx(p,{name:"Kbd",title:"按键",description:"快捷键提示:单键、组合键;在深色 Tooltip 里用反色版本。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs(D,{label:"单键",children:[e.jsx(Ye,{children:"⏎"}),e.jsx(Ye,{children:"Esc"}),e.jsx(Ye,{children:"⌘"}),e.jsx(Ye,{children:"Tab"})]}),e.jsxs(D,{label:"组合",children:[e.jsx(Ee,{keys:["⌘","K"]}),e.jsx(Ee,{keys:["Ctrl","Enter"],separator:"+"}),e.jsx(Ee,{keys:["⇧","⏎"]})]}),e.jsx(D,{label:"反色",children:e.jsxs("span",{className:"flex items-center gap-2 rounded-lg bg-inverse px-2.5 py-1.5 text-xs text-inverse-foreground",children:["搜索任务",e.jsx(Ee,{keys:["⌘","K"],inverse:!0})]})})]})}),e.jsx(p,{name:"Toolbar",title:"工具栏",description:"一组图标按钮 + 一个文字按钮;同一工具栏里所有控件同高(28px)。",canvas:"chrome",children:e.jsxs("div",{className:"flex items-center gap-1 rounded-lg bg-background p-1 shadow-raised ring-1 ring-border/70",children:[e.jsx(J,{size:"sm",label:"刷新",children:e.jsx(Ue,{})}),e.jsx(J,{size:"sm",label:"打开终端",children:e.jsx(gs,{})}),e.jsx("span",{"aria-hidden":"true",className:"mx-1 h-4 w-px bg-border"}),e.jsx(A,{size:"sm",variant:"ghost",children:"提交"}),e.jsx(A,{size:"sm",variant:"primary",className:"ml-auto",children:"合并"})]})})]})}function Ge({title:s,art:t,children:a}){return e.jsxs("article",{className:"flex min-w-0 flex-col overflow-hidden rounded-xl border border-border/60 bg-background",children:[e.jsx("div",{"aria-hidden":"true",className:"flex h-36 items-center justify-center border-b border-border/50 bg-foreground/[0.015] px-6",children:t}),e.jsxs("div",{className:"px-5 pb-5 pt-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:s}),e.jsx("p",{className:"mt-1.5 text-[13px] leading-[22px] text-muted-foreground",children:a})]})]})}function me({title:s,meta:t=!1,active:a=!1,hovered:n=!1,status:r}){return e.jsxs("div",{className:x("flex h-6 items-center gap-1.5 rounded-[5px] px-1.5",a&&"bg-background shadow-raised ring-1 ring-border/80",n&&"bg-accent"),children:[r??e.jsx("span",{className:"size-2 shrink-0 rounded-full ring-[1.5px] ring-inset ring-foreground/30"}),e.jsx("span",{className:x("h-1.5 rounded-full",a?"bg-foreground/80":"bg-foreground/45",s)}),t&&e.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[e.jsx("span",{className:"h-2.5 w-7 rounded-[3px] bg-foreground/[0.07]"}),e.jsx("span",{className:"h-1.5 w-3.5 rounded-full bg-foreground/20"})]}),n&&e.jsx(Ai,{className:"ml-auto size-3 text-foreground/60"})]})}function sd(){return e.jsxs(Y,{id:"principles",columns:3,description:"全部规则都从现有主页长出来:浅灰外框里放一座白色内容岛,Charcoal 墨色做主角,颜色只留给状态与项目身份。遇到规范没覆盖的情况,按这六条推理。",children:[e.jsx(Ge,{title:"灰框白岛",art:e.jsxs("div",{className:"flex h-24 w-full max-w-[220px] flex-col rounded-lg bg-sidebar ring-1 ring-border",children:[e.jsxs("div",{className:"flex h-4 shrink-0 items-center gap-1 px-2",children:[e.jsx("span",{className:"h-1.5 w-6 rounded-full bg-foreground/80"}),e.jsx("span",{className:"h-1 w-8 rounded-full bg-foreground/15"})]}),e.jsxs("div",{className:"flex min-h-0 flex-1 gap-1.5 px-1.5 pb-1.5",children:[e.jsxs("div",{className:"flex w-14 flex-col gap-1 pt-1",children:[e.jsx("span",{className:"h-2 rounded-[3px] bg-foreground/10"}),e.jsx("span",{className:"h-2.5 rounded-[3px] bg-background shadow-raised ring-1 ring-border/80"}),e.jsx("span",{className:"h-2 rounded-[3px] bg-foreground/10"}),e.jsx("span",{className:"h-2 rounded-[3px] bg-foreground/10"})]}),e.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-1.5 rounded-md border border-border/60 bg-background",children:[e.jsx("span",{className:"h-1.5 w-16 rounded-full bg-foreground/70"}),e.jsx("span",{className:"h-5 w-20 rounded-[4px] ring-1 ring-border"})]})]})]}),children:"界面分两层:浅灰外框(顶栏、侧栏)承载导航,白色内容岛承载正在处理的对象。层级靠底色和 1px 细边区分,不靠阴影堆叠。"}),e.jsx(Ge,{title:"标题优先",art:e.jsxs("div",{className:"w-full max-w-[240px] space-y-0.5 rounded-lg bg-sidebar p-1.5 ring-1 ring-border/70",children:[e.jsx(me,{title:"w-[44%]",meta:!0}),e.jsx(me,{title:"w-[72%]",hovered:!0}),e.jsx(me,{title:"w-[36%]",meta:!0})]}),children:"列表行里标题拥有最大宽度。元信息(项目、时间)必须紧凑,悬停或键盘聚焦时整体让位;宁可截短元信息,也不截短标题。"}),e.jsx(Ge,{title:"墨色为主",art:e.jsxs("div",{className:"flex items-end gap-4",children:[e.jsx("span",{className:"flex h-7 items-center rounded-md bg-primary px-3 text-[11px] font-medium text-primary-foreground shadow-raised",children:"开始"}),e.jsx("span",{className:"relative mb-1.5 h-4 w-7 rounded-full bg-primary",children:e.jsx("span",{className:"absolute right-0.5 top-0.5 size-3 rounded-full bg-background"})}),e.jsx("span",{className:"flex h-12 items-end gap-1",children:[.45,.7,.55,1].map((s,t)=>e.jsx("span",{className:"w-2.5 rounded-t-[2px] bg-viz-6",style:{height:`${s*100}%`}},t))})]}),children:"Charcoal 是唯一的主色:主按钮、选中、开关、图表主系列都用它。蓝色只表示「运行中 / 信息」,不再作品牌色。"}),e.jsx(Ge,{title:"颜色只给状态",art:e.jsxs("div",{className:"w-full max-w-[220px] space-y-0.5 rounded-lg bg-background p-1.5 ring-1 ring-border/70",children:[e.jsx(me,{title:"w-[50%]"}),e.jsx(me,{title:"w-[40%]",status:e.jsx(Ns,{className:"size-2.5 shrink-0 text-warning",strokeWidth:2.5})}),e.jsx(me,{title:"w-[58%]"}),e.jsx("div",{className:"flex justify-end px-1.5 pt-0.5",children:e.jsx("span",{className:"rounded-full bg-warning/10 px-1.5 py-px text-[10px] font-medium text-warning-ink",children:"待审查 1"})})]}),children:"颜色是稀缺资源,只表达需要注意的状态(运行中、待审查、失败)和项目身份。没有状态含义的东西一律用灰阶,状态也永远配图标或文字。"}),e.jsx(Ge,{title:"浮起 = 正在打开",art:e.jsxs("div",{className:"flex w-full max-w-[220px] flex-col gap-2 rounded-lg bg-sidebar p-2 ring-1 ring-border/70",children:[e.jsxs("div",{className:"inline-flex gap-0.5 self-start rounded-md bg-foreground/[0.05] p-0.5",children:[e.jsx("span",{className:"rounded-[5px] bg-background px-2 py-0.5 text-[10px] font-medium text-foreground shadow-raised ring-1 ring-border/80",children:"列表"}),e.jsx("span",{className:"px-2 py-0.5 text-[10px] text-foreground/60",children:"看板"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(me,{title:"w-[46%]"}),e.jsx(me,{title:"w-[60%]",active:!0}),e.jsx(me,{title:"w-[38%]"})]})]}),children:"白卡浮在灰底上,表示「这一项正在右侧展示」:侧栏选中行、分段控件的选中段是同一种材质,只表达这一个意思。"}),e.jsx(Ge,{title:"动效只解释变化",art:e.jsxs("div",{className:"relative h-20 w-44",children:[e.jsx("span",{className:"absolute inset-x-6 top-7 h-10 rounded-lg bg-background opacity-30 ring-1 ring-border/60"}),e.jsx("span",{className:"absolute inset-x-3 top-3.5 h-10 rounded-lg bg-background opacity-60 ring-1 ring-border/70"}),e.jsxs("span",{className:"absolute inset-x-0 top-0 flex h-10 items-center gap-2 rounded-lg bg-background px-3 shadow-raised ring-1 ring-border/80",children:[e.jsx("span",{className:"size-2 rounded-full bg-info"}),e.jsx("span",{className:"h-1.5 w-16 rounded-full bg-foreground/60"})]}),e.jsx("span",{className:"absolute inset-x-0 bottom-0 text-center font-mono text-[11px] text-muted-foreground",children:"250ms · ease-enter"})]}),children:"动效说明「什么变了」:新内容上浮淡入,状态切换 150ms 完成,不做装饰性循环。开启「减少动态效果」时只保留必要的进行中提示。"})]})}const td=[{name:"外框",token:"--sidebar",hex:"#F9FAFB",value:"var(--sidebar)",usage:"顶栏、侧栏、页面底色"},{name:"内容岛",token:"--background",hex:"#FFFFFF",value:"var(--background)",usage:"内容岛、卡片、输入框、菜单"},{name:"悬停",token:"--accent",hex:"#F3F4F6",value:"var(--accent)",usage:"行悬停、ghost 按钮"},{name:"浅灰底",token:"foreground / 5%",hex:"≈ #F4F4F4",value:"color-mix(in oklab, var(--foreground) 5%, var(--background))",usage:"分段轨道、标签、代码、头像"},{name:"反色",token:"--inverse",hex:"#191F25",value:"var(--inverse)",usage:"Tooltip、Toast 等浮在内容上的小面"},{name:"终端",token:"--terminal",hex:"#1E1E1E",value:"var(--terminal)",usage:"终端与日志:唯一常驻深色面"}];function ad({name:s,token:t,hex:a,value:n,usage:r}){return e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"h-14 rounded-lg ring-1 ring-inset ring-black/[0.07]",style:{background:n}}),e.jsxs("div",{className:"mt-2 flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-foreground",children:s}),e.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:a})]}),e.jsx("div",{className:"truncate font-mono text-[11px] text-muted-foreground",children:t}),e.jsx("p",{className:"mt-1 text-xs leading-[18px] text-muted-foreground",children:r})]})}const nd=[{name:"正文",className:"text-foreground",token:"foreground",ratio:16.5,usage:"标题、正文、选中项"},{name:"次要正文",className:"text-foreground/80",token:"foreground / 80%",ratio:8.6,usage:"列表行、菜单项、未选中的值"},{name:"弱正文",className:"text-foreground/70",token:"foreground / 70%",ratio:6.1,usage:"浅灰底上的标签文字(neutral ink)"},{name:"说明",className:"text-muted-foreground",token:"muted-foreground",ratio:4.85,usage:"元信息、时间、计数、表头:白底上最浅的可读文字"},{name:"占位",className:"text-muted-foreground/70",token:"muted-foreground / 70%",ratio:2.75,usage:"只用于占位符与禁用态,不承载信息"}],rd=[{tone:"info",name:"信息",meaning:"运行中、提示",icon:ba,base:"--info",ink:"--info-ink",baseRatio:5.17,inkRatio:6.31},{tone:"success",name:"成功",meaning:"已完成、已合并、在线",icon:_t,base:"--success",ink:"--success-ink",baseRatio:3.3,inkRatio:5.64},{tone:"warning",name:"警告",meaning:"待审查、临近截止、需要确认",icon:Ns,base:"--warning",ink:"--warning-ink",baseRatio:3.18,inkRatio:5.78},{tone:"danger",name:"危险",meaning:"失败、逾期、删除",icon:ja,base:"--destructive",ink:"--destructive-ink",baseRatio:4.83,inkRatio:6.38}],ld=[{token:"--terminal",preview:e.jsx("span",{className:"size-full bg-terminal"}),usage:"终端正文和日志;选中的标签、行也用它"},{token:"--terminal-chrome",preview:e.jsx("span",{className:"size-full bg-terminal-chrome"}),usage:"标签栏、标题栏、侧列表"},{token:"--terminal-accent",preview:e.jsx("span",{className:"size-full bg-terminal-chrome",children:e.jsx("span",{className:"block size-full bg-terminal-accent"})}),usage:"悬停:6% 白,叠在哪一层上都成立"},{token:"--terminal-border",preview:e.jsx("span",{className:"size-full p-1.5",children:e.jsx("span",{className:"block size-full rounded border border-terminal-border"})}),usage:"分隔线、描边:8% 白"},{token:"--terminal-foreground",preview:e.jsx("span",{className:"text-xs font-medium text-terminal-foreground",children:"Aa"}),usage:"正文、选中项的文字"},{token:"--terminal-muted-foreground",preview:e.jsx("span",{className:"text-xs font-medium text-terminal-muted-foreground",children:"Aa"}),usage:"标签、表头、次要信息(标签栏悬停态上仍 ≥ 4.5:1)"}],id=[{name:"red",className:"bg-terminal-red",usage:"失败"},{name:"green",className:"bg-terminal-green",usage:"成功"},{name:"yellow",className:"bg-terminal-yellow",usage:"警告"},{name:"blue",className:"bg-terminal-blue",usage:"运行中"},{name:"magenta",className:"bg-terminal-magenta",usage:"程序输出"},{name:"cyan",className:"bg-terminal-cyan",usage:"程序输出"},{name:"bright-black",className:"bg-terminal-bright-black",usage:"提示符"}];function st({state:s,dot:t,children:a}){return e.jsxs("span",{className:x("flex h-8 items-center gap-2 rounded-t-md px-3 font-mono text-xs",s==="selected"&&"bg-terminal text-terminal-foreground",s==="hover"&&"bg-terminal-accent text-terminal-muted-foreground",s==="idle"&&"text-terminal-muted-foreground"),children:[e.jsx("span",{className:x("size-1.5 rounded-full",t)}),a]})}const od=[{hex:"#EFF0F3",ratio:"1.14",usage:"零值 / 空格"},{hex:"#CED1D6",ratio:"1.53",usage:"量级 1"},{hex:"#A0A5AC",ratio:"2.48",usage:"对比 · 序数起点"},{hex:"#7B8189",ratio:"3.94",usage:"计划斜纹"},{hex:"#555B63",ratio:"6.82",usage:"量级 4"},{hex:"#333940",ratio:"11.7",usage:"量级 5"},{hex:"#191F25",ratio:"16.7",usage:"主数据"}];function dd(){return e.jsxs(Y,{id:"color",description:"中性色全部带一点冷蓝(色相 255–264),与 Charcoal 主色同源。所有颜色都是 CSS 变量(src/index.css),组件里只写语义类名,不写色值。",children:[e.jsx(p,{name:"Surface",title:"表面",description:"从外到内:外框 → 内容岛 → 悬停 / 浅灰底。深色只出现在反色小面和终端。",span:2,children:e.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-6",children:td.map(s=>e.jsx(ad,{...s},s.name))})}),e.jsx(p,{name:"Ink",title:"文字墨阶",description:"文字只有这几档;对比度按白底计算。",dos:["正文类文字至少 4.5:1;muted-foreground 是白底上最浅的可读文字"],donts:["用透明度再调浅说明文字(muted/80 只有 3.3:1)"],children:e.jsx("div",{className:"flex flex-col divide-y divide-border/50",children:nd.map(s=>e.jsxs("div",{className:"flex items-center gap-3 py-2 first:pt-0 last:pb-0",children:[e.jsx("span",{className:x("w-28 shrink-0 text-sm",s.className),children:"任务看板 Aa 128"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"text-xs font-medium text-foreground",children:[s.name," ",e.jsx(De,{className:"ml-1",children:s.token})]}),e.jsx("div",{className:"text-xs leading-[18px] text-muted-foreground",children:s.usage})]}),s.ratio>=4.5?e.jsxs(Q,{variant:"outline",size:"sm",className:"tabular-nums",children:[s.ratio,":1"]}):e.jsxs(Q,{tone:"warning",size:"sm",className:"tabular-nums",children:[s.ratio,":1"]})]},s.token))})}),e.jsx(p,{name:"Line",title:"线与焦点",description:"边框 1px;焦点是边框加深为中性灰,不引入彩色描边。",children:e.jsx("div",{className:"grid grid-cols-2 gap-4",children:[{label:"分隔线、卡片",token:"--border",className:"border border-border"},{label:"内容岛描边",token:"border / 50%",className:"border border-border/50"},{label:"悬停加深",token:"ring / 50%",className:"border border-ring/50"},{label:"焦点",token:"--ring",className:"border border-ring ring-2 ring-ring/30"}].map(s=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:x("h-12 rounded-lg bg-background",s.className)}),e.jsx("div",{className:"mt-2 text-xs font-medium text-foreground",children:s.label}),e.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:s.token})]},s.token))})}),e.jsx(p,{name:"Status",title:"状态色",description:"每个状态两档:基础色给图标、圆点、图形;*-ink 给文字和实底。基础色作文字时绿、橙只有约 3.2:1。",span:2,dos:["状态同时用图标或文字表达,色弱用户也能区分","文字、数字、实底按钮一律用 *-ink"],donts:["用状态色装饰没有状态含义的东西(分类、Agent、图表系列)","整段彩色正文:颜色只给图标,正文保持墨色"],children:e.jsx("div",{className:"overflow-x-auto scrollbar-app-thin",children:e.jsxs("table",{className:"w-full min-w-[640px] border-collapse text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border/70 text-xs text-muted-foreground",children:[e.jsx("th",{scope:"col",className:"h-8 pr-3 font-medium",children:"语义"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"标记(基础色)"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"文字(ink)"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"浅底"}),e.jsx("th",{scope:"col",className:"h-8 px-3 font-medium",children:"实底"}),e.jsx("th",{scope:"col",className:"h-8 pl-3 text-right font-medium",children:"对比度 基础 / ink"})]})}),e.jsx("tbody",{children:rd.map(s=>{const t=s.icon;return e.jsxs("tr",{className:"border-b border-border/40 last:border-0",children:[e.jsxs("td",{className:"py-2.5 pr-3",children:[e.jsx("div",{className:"text-[13px] font-medium text-foreground",children:s.name}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s.meaning})]}),e.jsx("td",{className:"px-3",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(t,{"aria-hidden":"true",className:x("size-4",He[s.tone])}),e.jsx("span",{className:x("size-2 rounded-full",bs[s.tone])}),e.jsx(De,{children:s.base})]})}),e.jsxs("td",{className:"px-3",children:[e.jsx("span",{className:x("text-[13px] font-medium",Rt[s.tone]),children:"+12 · 3 天"}),e.jsx(De,{className:"ml-2",children:s.ink})]}),e.jsx("td",{className:"px-3",children:e.jsx(Q,{tone:s.tone,children:s.meaning.split("、")[0]})}),e.jsx("td",{className:"px-3",children:e.jsx(Q,{tone:s.tone,variant:"solid",children:s.meaning.split("、")[0]})}),e.jsxs("td",{className:"pl-3 text-right font-mono text-[11px] tabular-nums text-muted-foreground",children:[e.jsx("span",{className:s.baseRatio<4.5?"text-warning-ink":void 0,children:s.baseRatio.toFixed(2)})," / ",e.jsx("span",{className:"text-foreground/80",children:s.inkRatio.toFixed(2)})]})]},s.tone)})})]})})}),e.jsxs(p,{name:"Project",title:"项目标识色",description:"8 色按项目名哈希分配(components/task/adapters.ts)。项目色只出现在圆点和项目标签上。",donts:["用项目色做大面积底色或按钮色"],children:[e.jsx("div",{className:"grid grid-cols-4 gap-x-4 gap-y-3",children:Lo.map(s=>e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(ns,{color:s,className:"size-2.5"}),e.jsx("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:s.replace("text-","")})]},s))}),e.jsx("div",{className:"mt-5 flex flex-wrap items-center gap-2",children:ee.map(s=>e.jsx(Pe,{name:s.name,color:s.color},s.name))}),e.jsx(V,{className:"mt-2",children:"项目标签:文字从项目色渐变到灰,长名自动截短(payment-gateway-service → payment..)。"})]}),e.jsxs(p,{name:"Viz ink",title:"图表墨阶",description:"图表只用一种颜色的深浅:主数据墨色、对比用灰、计划用斜纹。序数(漏斗、分桶)只取 2–6 档。",dos:["数值越大越深;零值用最浅的 0 档而不是留白"],donts:["给类别分配彩虹色——超过 5 类就合并成「其他」或改用表格"],children:[e.jsx("div",{className:"flex h-10 overflow-hidden rounded-lg ring-1 ring-inset ring-black/[0.05]",children:Le.map(s=>e.jsx("div",{className:"flex-1",style:{background:s}},s))}),e.jsx("div",{className:"mt-2 grid grid-cols-7 gap-1.5",children:od.map((s,t)=>e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"font-mono text-[11px] text-foreground/80",children:["viz-",t]}),e.jsxs("div",{className:"font-mono text-[11px] tabular-nums text-muted-foreground",children:[s.ratio,":1"]}),e.jsx("div",{className:"mt-0.5 text-xs leading-[18px] text-muted-foreground",children:s.usage})]},s.hex))}),e.jsx(ke,{className:"mt-4",items:[{label:"实际",swatch:"solid",color:T.ink},{label:"上期 / 对比",swatch:"solid",color:T.context},{label:"计划 / 剩余",swatch:"hatch",color:T.plan},{label:"目标",swatch:"dashed",color:T.ink}]})]}),e.jsx(p,{name:"Terminal",title:"终端色",description:e.jsxs(e.Fragment,{children:["终端是全站唯一的常驻深色面,配色沿用 VS Code Dark。界面层(标签栏、分隔线、悬停)和程序输出(ANSI 色)都是 ",e.jsx(De,{className:"whitespace-nowrap",children:"--terminal-*"})," 变量。"]}),span:2,dos:["选中的标签、行用 bg-terminal:和终端正文同一种材质,表示「打开的就是它」","xterm 用 readTerminalTheme() 取色;终端里的状态点用 ANSI 色"],donts:["终端以外出现深色面;终端里弹出的菜单也用普通的浅色 Menu / Popover","在代码里另抄一份终端色值"],children:e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{"aria-hidden":"true",className:"overflow-hidden rounded-lg bg-terminal",children:[e.jsxs("div",{className:"flex items-end gap-0.5 bg-terminal-chrome px-1.5 pt-1.5",children:[e.jsx(st,{state:"selected",dot:"bg-terminal-green",children:"pnpm dev"}),e.jsx(st,{state:"hover",dot:"bg-terminal-blue",children:"vitest"}),e.jsx(st,{state:"idle",dot:"bg-terminal-red",children:"build"}),e.jsx("span",{className:"mb-2 ml-auto h-4 w-px bg-terminal-border"}),e.jsx("span",{className:"mb-1 flex size-7 items-center justify-center rounded-md text-terminal-muted-foreground",children:e.jsx(vs,{className:"size-3.5"})})]}),e.jsxs("div",{className:"p-3 font-mono text-xs leading-5",children:[e.jsxs("div",{className:"text-terminal-foreground",children:[e.jsx("span",{className:"text-terminal-bright-black",children:"$ "}),"pnpm dev"]}),e.jsx("div",{className:"text-terminal-bright-black",children:"> vite --host"}),e.jsx("div",{className:"text-terminal-green",children:"VITE v7.1.3 ready in 412 ms"}),e.jsxs("div",{className:"text-terminal-foreground",children:["Local: ",e.jsx("span",{className:"text-terminal-cyan",children:"http://localhost:5173/"})]}),e.jsx("div",{className:"text-terminal-yellow",children:"(!) Port 5173 is in use, trying another one…"})]})]}),e.jsx(V,{className:"mt-2",children:"选中的标签和下面的终端连成一片;中间是悬停态,右边是未选中。"}),e.jsx("div",{className:"mt-5 grid grid-cols-4 gap-x-3 gap-y-3",children:id.map(s=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"flex h-7 items-center justify-center rounded-md bg-terminal",children:e.jsx("span",{className:x("size-2.5 rounded-full",s.className)})}),e.jsx("div",{className:"mt-1 truncate font-mono text-[11px] text-foreground/80",children:s.name}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s.usage})]},s.name))})]}),e.jsx("div",{className:"min-w-0",children:e.jsx("div",{className:"flex flex-col divide-y divide-border/50",children:ld.map(s=>e.jsxs("div",{className:"flex items-center gap-3 py-2 first:pt-0",children:[e.jsx("span",{className:"flex h-7 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md bg-terminal",children:s.preview}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate font-mono text-[11px] text-foreground/80",children:s.token}),e.jsx("div",{className:"text-xs leading-[18px] text-muted-foreground",children:s.usage})]})]},s.token))})})]})})]})}const cd=[{spec:"26 / 36 · 500",className:"text-[26px] leading-9 font-medium tracking-tight",sample:"你需要在 agent-tower 中做点什么?",usage:"首屏标题,每屏至多一个"},{spec:"22 / 30 · 600",className:"text-[22px] leading-[30px] font-semibold tracking-tight",sample:"项目设置",usage:"页面与章节标题"},{spec:"15 / 24 · 400",className:"text-[15px] leading-6",sample:"把左侧任务面板改成紧凑的两行布局",usage:"输入卡正文"},{spec:"14 / 22 · 400",className:"text-sm leading-[22px]",sample:"重塑左侧任务面板样式与交互",usage:"正文、侧栏行(默认字号)"},{spec:"13 / 20 · 400",className:"text-[13px] leading-5",sample:"在新标签页中打开 · 复制分支名",usage:"菜单项、按钮、表格、样张说明"},{spec:"12 / 18 · 500",className:"text-xs leading-[18px] font-medium",sample:"待审查 · 运行中 · 已完成",usage:"徽章、表头、字段说明(中文最小)"},{spec:"11 / 16 · 400",className:"text-[11px] leading-4 tabular-nums",sample:"12:04 · 1,284 · +412 −187 · ⌘K",usage:"单行数字:时间、计数、刻度"},{spec:"10 / 12 · 500",className:"text-[10px] leading-3 font-medium",sample:"P0 · KR1 · W42",usage:"拉丁编号、头像缩写(最小)"}];function xd(){return e.jsxs(Y,{id:"typography",description:"系统字体栈,不加载网络字体。字号以 14px 为正文基准;中文最小 12px、行高不低于 1.5 倍,11px 和 10px 只留给数字与编号;字重只用 400 / 500 / 600。",children:[e.jsx(p,{name:"Type scale",title:"字号阶梯",span:2,dos:["同一区域最多三档字号;层级优先用字重和颜色拉开","中文句子至少 12px、行高 1.5 倍以上:小字省下的空间不值得读者眯眼"],donts:["用 10–11px 写中文说明——11px 只给数字,10px 只给编号","700 以上的字重和全大写中文"],children:e.jsx("div",{className:"flex flex-col divide-y divide-border/50",children:cd.map(s=>e.jsxs("div",{className:"grid grid-cols-1 items-baseline gap-1 py-3 first:pt-0 last:pb-0 md:grid-cols-[112px_minmax(0,1fr)_240px] md:gap-6",children:[e.jsx("span",{className:"font-mono text-[11px] tabular-nums text-muted-foreground",children:s.spec}),e.jsx("span",{className:x("min-w-0 truncate text-foreground",s.className),children:s.sample}),e.jsx("span",{className:"text-xs text-muted-foreground",children:s.usage})]},s.spec))})}),e.jsx(p,{name:"Family",title:"字体",description:"正文用系统无衬线;代码、分支、哈希、路径用等宽。",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Sans · ui-sans-serif, system-ui"}),e.jsx("p",{className:"mt-1 text-[15px] text-foreground",children:"Agent Tower 让多个 AI Agent 并行工作"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Mono · ui-monospace, SFMono-Regular, Menlo"}),e.jsx("p",{className:"mt-1 font-mono text-[13px] text-foreground",children:"feat/design-system · 8721b9c · src/index.css"})]})]})}),e.jsxs(p,{name:"Numerals",title:"数字",description:"会变化或需要上下对齐的数字一律 tabular-nums;千分位用逗号,大数用紧凑写法。",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:"比例数字(默认)"}),["1,111","8,888","4,701"].map(s=>e.jsx("div",{className:"text-right text-lg font-semibold text-foreground",children:s},s))]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:"等宽数字 tabular-nums"}),["1,111","8,888","4,701"].map(s=>e.jsx("div",{className:"text-right text-lg font-semibold tabular-nums text-foreground",children:s},s))]})]}),e.jsx(V,{className:"mt-3",children:"紧凑写法:1,284 · 12.9K · 1.28M;负号用「−」(U+2212),与加号同宽。"})]})]})}const md=[{px:2,usage:"图表分段间隙、头像叠放描边"},{px:4,usage:"紧凑的图标与文字、标签内边距"},{px:6,usage:"胶囊内图标与文字"},{px:8,usage:"侧栏外边距 · 行内边距 · 内容岛外边距"},{px:10,usage:"行内图标与标题"},{px:12,usage:"卡片内元素、表单字段之间"},{px:16,usage:"卡片内边距、卡片之间"},{px:24,usage:"区块之间"},{px:32,usage:"宽屏页面内边距"},{px:48,usage:"章节之间"}],ud=[{size:"xs",px:24,usage:"行内操作、图表工具"},{size:"sm",px:28,usage:"胶囊、工具栏、分段"},{size:"md",px:32,usage:"默认:与侧栏行同高"},{size:"lg",px:36,usage:"表单输入、对话框按钮"},{size:"xl",px:44,usage:"首屏 CTA、触屏行"}],hd=[{label:"4",token:"rounded",className:"rounded",usage:"标签、键帽、优先级、数据端"},{label:"6",token:"rounded-sm",className:"rounded-sm",usage:"气泡收尖的那个角"},{label:"8",token:"rounded-md",className:"rounded-md",usage:"侧栏行、按钮、菜单项"},{label:"10",token:"rounded-lg",className:"rounded-lg",usage:"菜单、输入框、代码块、提示条"},{label:"14",token:"rounded-xl",className:"rounded-xl",usage:"内容岛、卡片、输入卡、对话框"},{label:"∞",token:"rounded-full",className:"rounded-full",usage:"胶囊、徽章、头像、开关"}],pd=[{name:"平面",token:"border",className:"border border-border/70",usage:"内容岛、卡片:只有 1px 边"},{name:"浮起",token:"shadow-raised",className:"shadow-raised ring-1 ring-border/80",usage:"选中行、按钮、开关滑块"},{name:"弹出",token:"shadow-popover",className:"shadow-popover ring-1 ring-border/60",usage:"菜单、下拉、气泡卡"},{name:"覆盖",token:"shadow-overlay",className:"shadow-overlay ring-1 ring-border/60",usage:"对话框、拖拽中的行"}];function gd(){return e.jsxs(Y,{id:"layout",description:"4px 网格;控件高度、圆角、阴影各只有一组固定档位。新组件先从这里取值,取不到再讨论要不要加档。",children:[e.jsx(p,{name:"Spacing",title:"间距",description:"4px 网格,2 / 6 / 10 只用于组件内部的细调。",children:e.jsx("div",{className:"flex flex-col gap-2",children:md.map(s=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-6 shrink-0 text-right font-mono text-[11px] tabular-nums text-foreground/80",children:s.px}),e.jsx("span",{className:"w-12 shrink-0",children:e.jsx("span",{className:"block h-2 rounded-[2px] bg-viz-6",style:{width:s.px}})}),e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:s.usage})]},s.px))})}),e.jsx(p,{name:"Control height",title:"控件高度",description:"五档高度对应按钮的 xs–xl;同一行里的控件必须同高。",children:e.jsx("div",{className:"flex flex-col gap-3",children:ud.map(s=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-6 shrink-0 text-right font-mono text-[11px] tabular-nums text-foreground/80",children:s.px}),e.jsx("span",{className:"w-24 shrink-0",children:e.jsxs(A,{size:s.size,children:["按钮 ",s.size]})}),e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:s.usage})]},s.size))})}),e.jsx(p,{name:"Radius",title:"圆角",description:"由 --radius(10px)派生;外层容器的圆角 ≥ 内层:内容岛 14 → 输入框 10 → 行 8。",children:e.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-5 sm:grid-cols-3",children:hd.map(s=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:x("size-14 border border-foreground/25 bg-foreground/[0.03]",s.className)}),e.jsxs("div",{className:"mt-2.5 flex min-w-0 items-baseline gap-1.5 font-mono text-[11px]",children:[e.jsx("span",{className:"text-foreground/80",children:s.label}),e.jsx("span",{className:"truncate text-muted-foreground",children:s.token})]}),e.jsx("p",{className:"mt-0.5 text-xs leading-[18px] text-muted-foreground",children:s.usage})]},s.token))})}),e.jsx(p,{name:"Elevation",title:"层级",description:"四档,越高越少见。阴影都很淡,层级主要靠白在灰上。",canvas:"chrome",children:e.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:pd.map(s=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:x("h-16 rounded-lg bg-background",s.className)}),e.jsx("div",{className:"mt-2.5 text-xs font-medium text-foreground",children:s.name}),e.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:s.token}),e.jsx("p",{className:"mt-1 text-xs leading-[18px] text-muted-foreground",children:s.usage})]},s.token))})}),e.jsx(p,{name:"App shell",title:"页面骨架",description:"主页的三段式:48px 顶栏 · 可拖拽侧栏(默认 400,260–600)· 内容岛(右下各留 8px,圆角 14,描边 border/50)。",span:2,children:e.jsxs("div",{className:"relative mx-auto flex h-56 max-w-3xl flex-col overflow-hidden rounded-lg bg-sidebar ring-1 ring-border",children:[e.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-2 px-3",children:[e.jsx("span",{className:"h-2 w-14 rounded-full bg-foreground/80"}),e.jsx("span",{className:"h-1.5 w-16 rounded-full bg-foreground/20"}),e.jsx("span",{className:"ml-auto h-4 w-4 rounded-[4px] bg-foreground/10"}),e.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:"顶栏 48"})]}),e.jsxs("div",{className:"flex min-h-0 flex-1",children:[e.jsxs("div",{className:"flex w-[34%] shrink-0 flex-col gap-1 px-2 py-1",children:[e.jsx("span",{className:"mb-1 h-6 rounded-md bg-background shadow-raised ring-1 ring-border/80"}),e.jsx("span",{className:"h-1.5 w-10 rounded-full bg-foreground/20"}),[62,48,70,40].map((s,t)=>e.jsxs("span",{className:x("flex h-5 items-center gap-1.5 rounded-[5px] px-1.5",t===1&&"bg-background shadow-raised ring-1 ring-border/80"),children:[e.jsx("span",{className:"size-2 rounded-full ring-[1.5px] ring-inset ring-foreground/30"}),e.jsx("span",{className:"h-1.5 rounded-full bg-foreground/40",style:{width:`${s}%`}})]},t)),e.jsx("span",{className:"mt-auto font-mono text-[11px] text-muted-foreground",children:"侧栏 400(260–600)"})]}),e.jsx("div",{className:"w-1 shrink-0"}),e.jsxs("div",{className:"mb-2 mr-2 flex min-w-0 flex-1 flex-col items-center justify-center gap-2 rounded-xl border border-border/50 bg-background",children:[e.jsx("span",{className:"h-2 w-40 max-w-[70%] rounded-full bg-foreground/70"}),e.jsx("span",{className:"h-12 w-64 max-w-[80%] rounded-xl border border-border shadow-raised"}),e.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:"内容岛 · rounded-xl · mb-2 mr-2"})]})]})]})})]})}const fd={xs:"折叠箭头、行内小标记",sm:"胶囊、菜单项、按钮 sm",md:"列表行、按钮(默认)",lg:"工具栏",xl:"强调、标题旁"};function jd(){const s=Object.keys(Ys).length;return e.jsxs(Y,{id:"icons",description:`lucide 线性图标,按语义注册,共 ${s} 个。业务代码写 <Icon name="delete" />,不直接引入图标组件——换一个图标只改注册表一处。`,children:[e.jsx(p,{name:"Icon",title:"语义图标",span:2,dos:["按含义取图标(delete、branch),同一含义全站只用一个图标","图标独立承载含义时提供 aria-label 或 Tooltip"],donts:["同一个动作在不同页面用不同图标","给普通图标上色:图标颜色跟随文字,只有状态图标有颜色"],children:e.jsx("div",{className:"space-y-5",children:rr.map(t=>e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-baseline gap-2 text-xs font-medium text-foreground",children:[t.title,e.jsx("span",{className:"text-[11px] font-normal tabular-nums text-muted-foreground",children:t.names.length})]}),e.jsx("div",{className:"grid grid-cols-4 gap-1 sm:grid-cols-6 lg:grid-cols-8 xl:grid-cols-10 2xl:grid-cols-11",children:t.names.map(a=>e.jsxs("div",{title:a,className:"flex min-w-0 flex-col items-center gap-1.5 rounded-lg px-1 py-3 text-foreground/80 transition-colors hover:bg-accent hover:text-foreground",children:[e.jsx(se,{name:a}),e.jsx("span",{className:"max-w-full truncate font-mono text-[11px] text-muted-foreground",children:a})]},a))})]},t.title))})}),e.jsx(p,{name:"Size",title:"尺寸与描边",description:"五档尺寸;24px 以上(空状态插图)描边降到 1.5,避免显得笨重。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[Object.keys(Bs).map(t=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex w-8 shrink-0 justify-center text-foreground",children:e.jsx(se,{name:"agent",size:t})}),e.jsxs("span",{className:"w-14 shrink-0 font-mono text-[11px] text-foreground/80",children:[t," · ",Bs[t]]}),e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:fd[t]})]},t)),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex w-8 shrink-0 justify-center text-muted-foreground/60",children:e.jsx(se,{name:"inbox",size:32})}),e.jsx("span",{className:"w-14 shrink-0 font-mono text-[11px] text-foreground/80",children:"32 · 1.5"}),e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:"空状态插图(浅灰、细描边)"})]})]})}),e.jsx(p,{name:"Tint",title:"图标颜色",description:"默认是说明灰,悬停跟随文字变深;状态图标是唯一有颜色的图标。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(D,{label:"默认",children:e.jsxs("span",{className:"flex items-center gap-2 text-sm text-foreground/80",children:[e.jsx(se,{name:"project",className:"text-muted-foreground"}),"agent-tower"]})}),e.jsx(D,{label:"悬停 / 选中",children:e.jsxs("span",{className:"flex items-center gap-2 text-sm text-foreground",children:[e.jsx(se,{name:"project"}),"agent-tower"]})}),e.jsxs(D,{label:"状态",children:[e.jsx(se,{name:"success",className:He.success,"aria-label":"成功"}),e.jsx(se,{name:"warning",className:He.warning,"aria-label":"警告"}),e.jsx(se,{name:"error",className:He.danger,"aria-label":"错误"}),e.jsx(se,{name:"info",className:He.info,"aria-label":"信息"})]}),e.jsx(D,{label:"禁用",children:e.jsxs("span",{className:"flex items-center gap-2 text-sm text-foreground/40",children:[e.jsx(se,{name:"lock"}),"只读项目"]})})]})})]})}function bd(){const s=Object.values(ml);return e.jsxs(Y,{id:"agents",description:"Agent 靠官方 logo 区分身份,不分配颜色。没有 logo 或加载失败时退回通用芯片图标,名称照常显示。",children:[e.jsx(p,{name:"AgentLogo",title:"标志墙",span:2,donts:["给 Agent 分配主题色,或把 logo 重新着色"],children:e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-6",children:[s.map(t=>e.jsxs("div",{className:"flex min-w-0 flex-col items-center gap-2 rounded-lg border border-border/60 px-2 py-4",children:[e.jsx(le,{agentType:t.agentType,className:"size-8"}),e.jsx("span",{className:"max-w-full truncate text-xs font-medium text-foreground",children:t.label}),e.jsx("span",{className:"max-w-full truncate font-mono text-[11px] text-muted-foreground",children:t.logoSrc?t.agentType:"无 logo · 回退"})]},t.agentType)),e.jsxs("div",{className:"flex min-w-0 flex-col items-center gap-2 rounded-lg border border-dashed border-border px-2 py-4",children:[e.jsx(le,{agentType:null,className:"size-8"}),e.jsx("span",{className:"text-xs font-medium text-foreground",children:"未知 Agent"}),e.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:"fallback"})]})]})}),e.jsx(p,{name:"AgentMark",title:"标识 + 名称",description:"三档尺寸;只放 logo 时名称进入读屏文本和悬停提示。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(D,{label:"sm · 14",children:[e.jsx(te,{agentType:$.CLAUDE_CODE,size:"sm"}),e.jsx(te,{agentType:$.CODEX,size:"sm"})]}),e.jsxs(D,{label:"md · 16",children:[e.jsx(te,{agentType:$.CLAUDE_CODE}),e.jsx(te,{agentType:$.GEMINI_CLI})]}),e.jsx(D,{label:"lg · 20",children:e.jsx(te,{agentType:$.CURSOR_AGENT,size:"lg"})}),e.jsxs(D,{label:"仅 logo",children:[e.jsx(te,{agentType:$.CLAUDE_CODE,showLabel:!1}),e.jsx(te,{agentType:$.CODEX,showLabel:!1}),e.jsx(te,{agentType:$.QWEN_CODE,showLabel:!1})]})]})}),e.jsxs(p,{name:"In context",title:"在界面里",description:"输入卡下方的胶囊选择器:平时是一行灰字,悬停才浮出底色。",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx(ce,{"aria-label":"Agent",defaultValue:$.CLAUDE_CODE,menuWidth:"md",options:s.slice(0,6).map(t=>({value:t.agentType,label:t.label,icon:e.jsx(le,{agentType:t.agentType,className:"size-3.5"})}))}),e.jsx(ce,{"aria-label":"工作区",defaultValue:"worktree",menuWidth:"lg",options:[{value:"worktree",label:"新建工作树",description:"在独立分支上工作,不影响主目录"},{value:"local",label:"本地目录",description:"直接修改项目目录"}]})]}),e.jsx(V,{className:"mt-3",children:"点开试试:菜单与选择框同材质,选中项右侧对勾,可带一行说明。"})]})]})}const vd=[{name:"ease-enter",curve:at.easeEnter,points:[.16,1,.3,1],usage:"进入、展开、数值增长"},{name:"ease-move",curve:at.easeMove,points:[.2,0,0,1],usage:"位移、拖拽归位、面板滑动"},{name:"linear",curve:"linear",points:[0,0,1,1],usage:"只用于循环:转圈、扫光"}],Nd=[{ms:100,usage:"悬停变色"},{ms:150,usage:"开关、复选、分段切换、按钮"},{ms:200,usage:"折叠展开、元信息收起"},{ms:250,usage:"列表新增行(taskSlideIn)"},{ms:500,usage:"首屏标题上浮(fadeInUp)、进度增长"},{ms:700,usage:"环形进度"}];function yd({points:s}){const[t,a,n,r]=s,l=36;return e.jsxs("svg",{viewBox:`-2 -2 ${l+4} ${l+4}`,className:"size-10 shrink-0","aria-hidden":"true",children:[e.jsx("rect",{x:"0",y:"0",width:l,height:l,rx:"3",fill:"none",stroke:"var(--viz-grid)"}),e.jsx("path",{d:`M0 ${l} C ${t*l} ${l-a*l} ${n*l} ${l-r*l} ${l} 0`,fill:"none",stroke:"var(--viz-6)",strokeWidth:"2",strokeLinecap:"round"})]})}function wd(){const s=$t(),[t,a]=C.useState(!1);return e.jsxs("div",{className:"flex flex-col gap-3",children:[vd.map(n=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(yd,{points:n.points}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx(De,{children:n.name}),e.jsx("span",{className:"truncate text-xs text-muted-foreground",children:n.usage})]}),e.jsx("div",{className:"relative mt-1.5 h-5 rounded-full bg-foreground/[0.05]",children:e.jsx("span",{className:"absolute top-0.5 size-4 rounded-full bg-primary shadow-raised",style:{left:t?"calc(100% - 18px)":"2px",transition:s?"none":`left 600ms ${n.curve}`}})})]})]},n.name)),e.jsx("div",{children:e.jsx(A,{size:"sm",onClick:()=>a(n=>!n),children:"播放"})})]})}const xa=["接入飞书通知","优化终端滚动性能","补充 MCP 工具文档","修复隧道断线重连","项目设置支持快捷命令"];function kd(){const[s,t]=C.useState(0),[a,n]=C.useState([{id:0,title:"重塑左侧任务面板样式与交互"},{id:-1,title:"修复会话自动结束"}]),r=()=>{n(l=>{const i=(l[0]?.id??0)+1;return[{id:i,title:xa[(i-1)%xa.length]},...l].slice(0,4)})};return e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"flex h-40 flex-col items-center justify-center rounded-lg bg-sidebar",children:e.jsxs("div",{className:"flex animate-[fadeInUp_0.5s_cubic-bezier(0.16,1,0.3,1)] flex-col items-center",children:[e.jsx("p",{className:"text-[17px] font-medium tracking-tight text-foreground",children:"你需要做点什么?"}),e.jsx("div",{className:"mt-3 h-10 w-52 rounded-xl border border-border bg-background shadow-raised"})]},s)}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx(V,{children:"首屏 fadeInUp · 500ms · 上浮 10px"}),e.jsx(A,{size:"xs",variant:"ghost",onClick:()=>t(l=>l+1),children:"重播"})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"h-40 overflow-hidden rounded-lg bg-sidebar p-1.5",children:a.map(l=>e.jsxs("div",{className:"animate-task-enter flex h-8 items-center gap-2.5 rounded-md px-2 text-sm text-foreground/80",children:[e.jsx("span",{className:"size-3.5 shrink-0 rounded-full ring-[1.5px] ring-inset ring-foreground/30"}),e.jsx("span",{className:"truncate",children:l.title})]},l.id))}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx(V,{children:"新增行 taskSlideIn · 250ms · 下落 6px"}),e.jsx(A,{size:"xs",variant:"ghost",onClick:r,children:"新增任务"})]})]})]})}function Sd(){const[s,t]=C.useState(!1),[a,n]=C.useState(0);return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{type:"button","aria-pressed":s,"aria-label":s?"标记为未完成":"完成任务",onClick:()=>{t(r=>!r),n(r=>r+1)},className:"relative flex size-10 shrink-0 items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[s&&e.jsx("span",{"aria-hidden":"true",className:"ds-ring-burst absolute inset-1 rounded-full ring-2 ring-success"},`burst-${a}`),e.jsx("span",{className:x("flex size-6 items-center justify-center rounded-full transition-colors duration-150",s?"bg-success text-white":"ring-[1.5px] ring-inset ring-foreground/30 hover:ring-foreground/50"),children:s&&e.jsx("svg",{viewBox:"0 0 16 16",className:"size-3.5","aria-hidden":"true",children:e.jsx("path",{className:"ds-check-draw",d:"M3.5 8.5l3 3 6-7",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})},`check-${a}`)})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:x("truncate text-sm transition-colors duration-150",s?"text-muted-foreground line-through":"text-foreground"),children:"修复会话自动结束"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"点圆圈完成:对勾描绘 + 一次光环"})]})]})}function Cd(){const[s,t]=C.useState(.35);return e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(_e,{value:s,size:72,expected:.6,"aria-label":"迭代进度"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-2.5",children:[e.jsx(de,{value:s,expected:.6,size:"md","aria-label":"迭代进度"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(A,{size:"xs",onClick:()=>t(a=>Math.min(1,Math.round((a+.15)*100)/100)),children:"推进 15%"}),e.jsx(A,{size:"xs",variant:"ghost",onClick:()=>t(.35),children:"重置"})]})]})]})}function Td(){return e.jsxs(Y,{id:"motion",description:"动效只做三件事:交代新内容从哪来、确认状态变了、表明事情还在进行。所有循环动画都有减少动态效果的降级。",children:[e.jsx(p,{name:"Easing",title:"缓动",description:"界面过渡只用两条曲线,循环才用 linear。",dos:["进入用 ease-enter,位移用 ease-move"],donts:["弹跳、回弹曲线——工具界面不需要「俏皮」"],children:e.jsx(wd,{})}),e.jsx(p,{name:"Duration",title:"时长",description:"越小的变化越快;界面过渡不超过 500ms。",children:e.jsx("div",{className:"flex flex-col gap-2",children:Nd.map(s=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] tabular-nums text-foreground/80",children:[s.ms,"ms"]}),e.jsx("span",{className:"w-28 shrink-0",children:e.jsx("span",{className:"block h-1.5 rounded-full bg-viz-6",style:{width:`${s.ms/700*100}%`}})}),e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:s.usage})]},s.ms))})}),e.jsx(p,{name:"Enter",title:"进入",description:"新内容从它「来的方向」出现:首屏向上浮起,列表新行从上方落下。",span:2,children:e.jsx(kd,{})}),e.jsx(p,{name:"Celebrate",title:"完成时刻",description:"只在用户亲手完成一件事时出现一次,不循环、不放礼花。",children:e.jsx(Sd,{})}),e.jsx(p,{name:"Momentum",title:"进度增长",description:"数值变化时从旧值长到新值(500–700ms),竖线是此刻应到的位置。",children:e.jsx(Cd,{})}),e.jsx(p,{name:"Live",title:"进行中",description:"循环动画只给「正在发生」的事。",donts:["给静止的内容加呼吸、漂浮等装饰性循环"],children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(D,{label:"在线 / 运行",children:[e.jsxs("span",{className:"flex items-center gap-2 text-[13px] text-foreground/80",children:[e.jsx(Re,{label:"在线"}),"隧道已连接"]}),e.jsxs("span",{className:"flex items-center gap-2 text-[13px] text-foreground/80",children:[e.jsx(Re,{tone:"info"}),"Claude Code 运行中"]})]}),e.jsx(D,{label:"思考",children:e.jsx(lr,{text:"正在思考",className:"text-[13px]"})}),e.jsx(D,{label:"处理中",children:e.jsxs("span",{className:"text-[13px] text-muted-foreground",children:["正在创建工作区",e.jsx(ir,{})]})}),e.jsx(D,{label:"短等待",children:e.jsx(ve,{label:"正在读取文件"})})]})}),e.jsx(p,{name:"Brand",title:"品牌加载",description:"首屏加载(FullscreenLoading):Charcoal 标志缓慢呼吸,2s 一个周期。",children:e.jsx("div",{className:"flex h-28 items-center justify-center rounded-lg bg-background",children:e.jsx(xl,{})})})]})}const ma=["低","中","高","极高"],ua=[{value:"ask",label:"请求批准",description:"遵循原生审批规则,已允许的操作可以直接执行。"},{value:"sandbox",label:"自动同意(沙箱)",description:"使用原生沙箱与自动审阅,部分操作仍可能请求批准。"},{value:"full",label:"自动同意(完全访问)",description:"关闭可配置沙箱,上游强制规则仍然生效。"}],Kr=[...[$.CLAUDE_CODE,$.CODEX,$.GEMINI_CLI].map(s=>({value:s,label:$s(s),icon:e.jsx(le,{agentType:s,className:"size-3.5"})})),{value:$.CURSOR_AGENT,label:$s($.CURSOR_AGENT),icon:e.jsx(le,{agentType:$.CURSOR_AGENT,className:"size-3.5"}),description:"未检测到 cursor-agent 命令",disabled:!0}];function Md(){const[s,t]=C.useState([4]),[a,n]=C.useState([2]);return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-baseline justify-between text-[13px]",children:[e.jsx("span",{className:"font-medium text-foreground",children:"并发会话上限"}),e.jsxs("span",{className:"tabular-nums text-foreground/80",children:[s[0]," 个"]})]}),e.jsx(Nt,{value:s,onValueChange:t,min:1,max:10,"aria-label":"并发会话上限"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-baseline justify-between text-[13px]",children:[e.jsx("span",{className:"font-medium text-foreground",children:"推理强度"}),e.jsx("span",{className:"text-foreground/80",children:ma[a[0]]})]}),e.jsx(Nt,{value:a,onValueChange:n,min:0,max:3,step:1,marks:[0,1,2,3],"aria-label":"推理强度"}),e.jsx("div",{className:"mt-1.5 flex justify-between text-xs text-muted-foreground",children:ma.map(r=>e.jsx("span",{children:r},r))})]})]})}function Ad(){const[s,t]=C.useState(["agent-tower"]),[a,n]=C.useState(["design-system.png","tokens.css","TaskList.tsx"]),r=l=>t(i=>i.includes(l)?i.filter(c=>c!==l):[...i,l]);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.jsx(xt,{selected:s.length===0,onClick:()=>t([]),children:"全部项目"}),ee.slice(0,3).map((l,i)=>e.jsx(xt,{selected:s.includes(l.name),onClick:()=>r(l.name),icon:e.jsx(ns,{color:l.color}),count:[24,7,3][i],children:l.name},l.name))]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[a.map(l=>e.jsx(xn,{icon:e.jsx(nn,{}),onRemove:()=>n(i=>i.filter(c=>c!==l)),children:l},l)),a.length===0&&e.jsx(A,{size:"xs",variant:"ghost",onClick:()=>n(["design-system.png","tokens.css","TaskList.tsx"]),children:"恢复示例"})]})]})}function Ed(){const[s,t]=C.useState(!1),a=C.useRef(null),n=()=>{t(!0),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>t(!1),1800)};return e.jsxs("div",{className:"mx-auto flex max-w-2xl flex-col items-center py-4",children:[e.jsx("h3",{className:"mb-6 text-center text-[26px] font-medium leading-snug tracking-tight text-foreground",children:"你需要在 agent-tower 中做点什么?"}),e.jsx(cr,{placeholder:"描述一个任务,Agent 会在独立工作树里完成它",defaultValue:"把左侧任务面板改成紧凑的两行布局",submitLabel:"创建并启动",submitHint:"创建并启动",submitting:s,pendingLabel:"正在创建工作区…",onSubmit:n,toolbarStart:e.jsx(J,{size:"sm",label:"添加附件",children:e.jsx(rn,{})}),footer:e.jsxs(e.Fragment,{children:[e.jsx(ce,{"aria-label":"项目",defaultValue:"agent-tower",options:ee.map(r=>({value:r.name,label:r.name,icon:e.jsx(ns,{color:r.color})}))}),e.jsx(ce,{"aria-label":"Agent",defaultValue:$.CLAUDE_CODE,options:Kr}),e.jsx(ce,{"aria-label":"工作区",defaultValue:"worktree",icon:e.jsx(Rs,{}),menuWidth:"lg",options:[{value:"worktree",label:"新建工作树",description:"在独立分支上工作,不影响主目录"},{value:"local",label:"本地目录",description:"直接修改项目目录,适合一次性小改动"}]})]})})]})}function _d(){const[s,t]=C.useState("先读 TaskList.tsx 与 sidebar-styles.ts,保持 32px 行高;元信息悬停时收起。");return e.jsxs(Y,{id:"inputs",description:"输入控件共用一个外壳:白底、1px 边框、10px 圆角。焦点 = 边框加深为中性灰;错误 = 红边框 + 字段下方一行红字,不弹窗、不清空输入。",children:[e.jsx(p,{name:"Field · Input",title:"字段与输入框",description:"标签在上、说明在下;Field 自动把 id、说明、错误态接到内部控件上。",span:2,dos:["错误信息说清楚怎么改:「目录不是 Git 仓库」而不是「输入有误」"],donts:["用占位符代替标签","输入时就报错——等失焦或提交时再校验"],children:e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsx(ae,{label:"项目名称",required:!0,description:"用于侧栏与任务标签,可随时修改",children:e.jsx(Ne,{defaultValue:"agent-tower"})}),e.jsx(ae,{label:"仓库路径",error:"这个目录不是 Git 仓库,初始化后才能使用工作树",children:e.jsx(Ne,{defaultValue:"/Users/shitian/Work/notes",prefix:e.jsx(Ka,{})})}),e.jsx(ae,{label:"开发端口",description:"留空则按项目自动分配",children:e.jsx(Ne,{placeholder:"5173",inputMode:"numeric",suffix:e.jsx("span",{className:"text-xs",children:"端口"})})}),e.jsx(ae,{label:"分支前缀",counter:"7 / 24",children:e.jsx(Ne,{size:"sm",defaultValue:"feat/ds"})}),e.jsx(ae,{label:"默认分支",description:"只读:由仓库决定",children:e.jsx(Ne,{disabled:!0,defaultValue:"main"})})]})}),e.jsx(p,{name:"Textarea",title:"多行输入",description:"Prompt、脚本、说明文字;可随内容增高。",children:e.jsx(ae,{label:"任务说明",counter:`${s.length} / 500`,children:e.jsx(Ua,{autoResize:!0,minRows:3,maxRows:6,value:s,onChange:a=>t(a.target.value.slice(0,500))})})}),e.jsx(p,{name:"SearchField",title:"搜索",description:"放大镜前缀;有内容时出现清除按钮,Esc 同样清空。",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(ot,{placeholder:"搜索任务",shortcut:["⌘","K"],"aria-label":"搜索任务"}),e.jsx(ot,{size:"sm",defaultValue:"design",placeholder:"筛选文件","aria-label":"筛选文件"})]})}),e.jsx(p,{name:"Select",title:"选择框",description:"5 个以上互斥选项时用;更少时用分段或单选,全部可见更快。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ae,{label:"Provider",children:e.jsx(mt,{defaultValue:"anthropic",options:[{value:"anthropic",label:"Anthropic 官方",description:"使用 Claude Code 自带的登录"},{value:"bedrock",label:"AWS Bedrock",description:"按 AWS 账号计费"},{value:"vertex",label:"Google Vertex AI"},{value:"proxy",label:"自定义代理",description:"兼容 Anthropic API 的网关"},{value:"disabled",label:"OpenRouter",description:"尚未配置密钥",disabled:!0}]})}),e.jsx(ae,{label:"目标分支",children:e.jsx(mt,{size:"sm",placeholder:"选择分支",options:["main","develop","release/1.3","feat/design-system","fix/session-timeout"].map(a=>({value:a,label:a,icon:e.jsx(Rs,{})}))})})]})}),e.jsx(p,{name:"Slider",title:"滑块",description:"连续或分档取值;精确数值必须同时以文字显示。",children:e.jsx(Md,{})}),e.jsx(p,{name:"Segmented",title:"分段选择",description:"2–5 个互斥选项、切换后原地刷新内容。选中段是浮起的白卡。",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ps,{"aria-label":"视图",defaultValue:"list",options:[{value:"list",label:"列表",icon:e.jsx(Li,{})},{value:"board",label:"看板",icon:e.jsx(ci,{})},{value:"calendar",label:"日历",icon:e.jsx(An,{})}]}),e.jsx(ps,{"aria-label":"任务状态",defaultValue:"all",options:[{value:"all",label:"全部",count:24},{value:"running",label:"运行中",count:3},{value:"review",label:"待审查",count:2}]}),e.jsx(ps,{"aria-label":"时间范围",size:"sm",defaultValue:"30",options:[{value:"7",label:"7 天"},{value:"30",label:"30 天"},{value:"90",label:"90 天"}]})]})}),e.jsx(p,{name:"Tabs",title:"标签页",description:"同一对象的不同面,切换整块内容区。下划线式,切换时字重不变、不抖动。",children:e.jsxs(or,{defaultValue:"changes",children:[e.jsxs(dr,{children:[e.jsx(ms,{value:"conversation",children:"对话"}),e.jsx(ms,{value:"changes",count:12,children:"变更"}),e.jsx(ms,{value:"terminal",children:"终端"}),e.jsx(ms,{value:"preview",disabled:!0,children:"预览"})]}),e.jsx(zs,{value:"conversation",children:e.jsx(V,{children:"与 Agent 的对话记录。"})}),e.jsx(zs,{value:"changes",children:e.jsx(V,{children:"12 个文件有改动,+412 −187。"})}),e.jsx(zs,{value:"terminal",children:e.jsx(V,{children:"工作区终端。"})})]})}),e.jsx(p,{name:"Chip · Tag",title:"筛选胶囊与标签",description:"胶囊是可切换的筛选条件,选中为 Charcoal 实心;标签是已添加的条目,可移除。",children:e.jsx(Ad,{})}),e.jsxs(p,{name:"ChipSelect",title:"胶囊选择器",description:"输入卡下方、工具栏里的轻量参数:平时只是灰字 + 图标,悬停才浮出底色;点开是单选菜单。",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(D,{label:"已选",children:[e.jsx(ce,{"aria-label":"Agent",defaultValue:$.CLAUDE_CODE,options:Kr}),e.jsx(ce,{"aria-label":"执行权限",icon:e.jsx(Na,{}),defaultValue:"ask",menuWidth:"lg",showMenuLabel:!0,options:ua})]}),e.jsx(D,{label:"未选",children:e.jsx(ce,{"aria-label":"目标分支",icon:e.jsx(Rs,{}),placeholder:"选择分支",options:["main","release/1.3","feat/design-system"].map(a=>({value:a,label:a}))})}),e.jsx(D,{label:"禁用",children:e.jsx(ce,{"aria-label":"Provider",disabled:!0,defaultValue:"official",options:[{value:"official",label:"Anthropic 官方"}]})})]}),e.jsx(V,{className:"mt-4",children:'不可用的选项留在菜单里并写明原因(点开 Agent 看 Cursor Agent);带说明的选项用宽菜单 menuWidth="lg"。'})]}),e.jsx(p,{name:"Switch · Checkbox · Radio",title:"开关、复选与单选",description:"开关立即生效;复选框用于需要提交的选择;单选用于 2–5 个需要读说明才能选的互斥项。",span:2,children:e.jsxs("div",{className:"grid gap-8 lg:grid-cols-3",children:[e.jsx("div",{className:"flex flex-col divide-y divide-border/50",children:[{label:"任务完成时发送系统通知",checked:!0},{label:"自动生成提交信息",checked:!1},{label:"合并后删除工作树",checked:!0,disabled:!0}].map(a=>e.jsxs("label",{className:x("flex items-center justify-between gap-4 py-2.5 first:pt-0",a.disabled&&"opacity-50"),children:[e.jsx("span",{className:"text-[13px] text-foreground",children:a.label}),e.jsx(Nn,{defaultChecked:a.checked,disabled:a.disabled,"aria-label":a.label})]},a.label))}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(ye,{defaultChecked:!0,label:"合并后删除分支"}),e.jsx(ye,{label:"推送前运行测试",description:"在工作树里执行 pnpm test,失败则中止推送"}),e.jsx(ye,{checked:"indeterminate",label:"选中 3 / 5 个文件"}),e.jsx(ye,{disabled:!0,label:"签名提交(未配置 GPG)"})]}),e.jsx(vn,{"aria-label":"执行权限",defaultValue:"ask",options:ua})]})}),e.jsx(p,{name:"Composer",title:"输入卡",description:"主页的「一句话发起任务」:Enter 提交、Shift+Enter 换行,输入法组字时不提交。参数用卡片下方的胶囊,不塞进卡片里。",span:2,children:e.jsx(Ed,{})})]})}function ds({icon:s,trailing:t,tone:a="neutral",highlighted:n=!1,children:r}){return e.jsxs("div",{className:x(Wt,a==="danger"&&bn,n&&"bg-accent text-foreground"),children:[e.jsx("span",{className:x("flex shrink-0",a==="danger"?"text-current":"text-muted-foreground"),children:s}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:r}),t]})}function zd(){return e.jsxs("div",{className:x(Ut,"w-60"),role:"presentation",children:[e.jsx("div",{className:Gt,children:"任务"}),e.jsx(ds,{icon:e.jsx(nt,{}),trailing:e.jsx("span",{className:ht,children:"⌘⏎"}),children:"在新标签页打开"}),e.jsx(ds,{icon:e.jsx(Fs,{}),highlighted:!0,children:"复制分支名"}),e.jsx(ds,{icon:e.jsx(ln,{}),trailing:e.jsx("span",{className:ht,children:"F2"}),children:"重命名"}),e.jsx("div",{className:ut}),e.jsx(ds,{icon:e.jsx(Vt,{}),trailing:e.jsx(zt,{className:"ml-auto size-3.5 text-muted-foreground"}),children:"优先级"}),e.jsx("div",{className:ut}),e.jsx(ds,{icon:e.jsx(ss,{}),tone:"danger",children:"删除任务"})]})}function ha(){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"状态"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(ye,{defaultChecked:!0,label:"运行中"}),e.jsx(ye,{defaultChecked:!0,label:"待审查"}),e.jsx(ye,{label:"已完成"})]})]})}function Dd(){const[s,t]=C.useState(!1),[a,n]=C.useState(!1),r=C.useRef(null),l=()=>{n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n(!1),t(!1)},1200)};return e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(wn,{children:[e.jsx(Sn,{asChild:!0,children:e.jsx(A,{children:"新建项目"})}),e.jsx(kn,{title:"新建项目",description:"选择一个 Git 仓库,Agent 会在它的工作树里完成任务。",footer:e.jsxs(e.Fragment,{children:[e.jsx(pt,{asChild:!0,children:e.jsx(A,{variant:"ghost",children:"取消"})}),e.jsx(pt,{asChild:!0,children:e.jsx(A,{variant:"primary",children:"创建项目"})})]}),children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ae,{label:"项目名称",required:!0,children:e.jsx(Ne,{defaultValue:"agent-tower"})}),e.jsx(ae,{label:"仓库路径",description:"必须是 Git 仓库的根目录",children:e.jsx(Ne,{defaultValue:"~/Work/agent-tower",prefix:e.jsx(Ka,{})})})]})})]}),e.jsx(A,{tone:"danger",onClick:()=>t(!0),children:"删除项目…"}),e.jsx(yn,{open:s,onOpenChange:t,tone:"danger",title:"删除项目 agent-tower?",description:"项目下的 24 个任务与工作树会一起删除,仓库本身不受影响。删除后无法恢复。",confirmLabel:"删除项目",cancelLabel:"取消",loading:a,onConfirm:l})]})}function Rd(){const[s,t]=C.useState("high");return e.jsxs(Y,{id:"overlays",description:"浮层共用一种材质:白底、1px 边框、popover 阴影、10px 圆角。由轻到重:Tooltip → 菜单 → 气泡面板 → 对话框。",children:[e.jsx(p,{name:"Menu",title:"菜单",description:"条目 13px、8px 圆角;图标在左、快捷键在右,危险操作放最后并用分隔线隔开。",canvas:"chrome",dos:["菜单文案用动词开头:「复制分支名」","危险项放最后,前面加分隔线"],donts:["在菜单里放表单——那是气泡面板的事"],children:e.jsxs("div",{className:"flex flex-wrap items-start gap-6",children:[e.jsx(zd,{}),e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsx(V,{children:"可交互版本:"}),e.jsxs(Xa,{children:[e.jsx(an,{asChild:!0,children:e.jsx(A,{size:"sm",children:"任务操作"})}),e.jsxs(Qa,{className:"w-56",children:[e.jsx(Za,{children:"任务"}),e.jsx(_s,{icon:e.jsx(nt,{}),shortcut:"⌘⏎",children:"在新标签页打开"}),e.jsx(_s,{icon:e.jsx(Fs,{}),children:"复制分支名"}),e.jsx(dt,{}),e.jsxs(en,{children:[e.jsx(tn,{icon:e.jsx(Vt,{}),children:"优先级"}),e.jsx(sn,{children:e.jsxs(Ja,{value:s,onValueChange:t,children:[e.jsx(xs,{value:"urgent",children:"P0 紧急"}),e.jsx(xs,{value:"high",children:"P1 高"}),e.jsx(xs,{value:"normal",children:"P2 普通"}),e.jsx(xs,{value:"low",children:"P3 低"})]})})]}),e.jsx(dt,{}),e.jsx(_s,{icon:e.jsx(ss,{}),tone:"danger",children:"删除任务"})]})]}),e.jsxs(Va,{children:[e.jsx(Ya,{className:"flex h-20 w-44 items-center justify-center rounded-lg border border-dashed border-border bg-background text-xs text-muted-foreground",children:"在这里右键"}),e.jsxs(Ha,{className:"w-48",children:[e.jsx(Es,{icon:e.jsx(Fs,{}),children:"复制路径"}),e.jsx(Es,{icon:e.jsx(nt,{}),children:"在编辑器中打开"}),e.jsx(qa,{}),e.jsx(Es,{icon:e.jsx(ss,{}),tone:"danger",children:"删除文件"})]})]})]})]})}),e.jsx(p,{name:"Tooltip",title:"悬停提示",description:"深色反色面、无箭头,只放补充信息;键盘聚焦同样出现。",donts:["把必须知道的信息只藏在 Tooltip 里"],children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("span",{className:"flex max-w-[260px] items-center gap-2 rounded-lg bg-inverse px-2.5 py-1.5 text-xs leading-relaxed text-inverse-foreground shadow-popover",children:["搜索任务",e.jsx(Ee,{keys:["⌘","K"],inverse:!0})]}),e.jsx("span",{className:"max-w-[220px] rounded-lg bg-inverse px-2.5 py-1.5 text-xs leading-relaxed text-inverse-foreground shadow-popover",children:"修复 Claude 会话自动结束及停止时进程树清理超时"})]}),e.jsxs(D,{label:"悬停试试",children:[e.jsx(Qe,{content:"刷新状态",children:e.jsx(A,{size:"sm",variant:"ghost",children:"刷新"})}),e.jsx(Qe,{content:"新建任务",shortcut:["⌘","N"],children:e.jsx(A,{size:"sm",children:"新建"})}),e.jsx(Qe,{content:"下方显示",side:"bottom",children:e.jsx(A,{size:"sm",variant:"ghost",children:"下方"})})]})]})}),e.jsxs(p,{name:"Popover",title:"气泡面板",description:"小表单、筛选器、详情预览:比菜单内容多,又不值得开对话框。",canvas:"chrome",children:[e.jsxs("div",{className:"flex flex-wrap items-start gap-6",children:[e.jsxs("div",{className:"w-64 rounded-lg border border-border bg-popover p-3 text-sm text-popover-foreground shadow-popover",role:"presentation",children:[e.jsx(ha,{}),e.jsxs("div",{className:"mt-3 flex justify-end gap-1.5 border-t border-border/60 pt-3",children:[e.jsx(A,{size:"sm",variant:"ghost",children:"重置"}),e.jsx(A,{size:"sm",variant:"primary",children:"应用"})]})]}),e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsx(V,{children:"可交互版本:"}),e.jsxs($a,{children:[e.jsx(Fa,{asChild:!0,children:e.jsxs(A,{size:"sm",children:[e.jsx(Dn,{}),"筛选"]})}),e.jsxs(Oa,{className:"w-64",children:[e.jsx(ha,{}),e.jsxs("div",{className:"mt-3 flex justify-end gap-1.5 border-t border-border/60 pt-3",children:[e.jsx(it,{asChild:!0,children:e.jsx(A,{size:"sm",variant:"ghost",children:"重置"})}),e.jsx(it,{asChild:!0,children:e.jsx(A,{size:"sm",variant:"primary",children:"应用"})})]})]})]})]})]}),e.jsx(V,{className:"mt-4",children:"与菜单同材质,内边距 12px;底部操作区与对话框一致,主按钮在右。"})]}),e.jsxs(p,{name:"Dialog",title:"对话框",description:"需要专注完成的一件事。遮罩 20% 黑,面板 14px 圆角;Esc 或点遮罩关闭,焦点在关闭后归还。",dos:["确认框写清后果:「删除后无法恢复」","主按钮写动作本身:「删除项目」"],donts:["对话框里再开对话框"],children:[e.jsxs("div",{className:"mb-4 overflow-hidden rounded-xl border border-border bg-background shadow-overlay",children:[e.jsxs("div",{className:"px-4 pb-2 pt-4",children:[e.jsx("div",{className:"text-[15px] font-semibold text-foreground",children:"删除项目 agent-tower?"}),e.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:"项目下的 24 个任务与工作树会一起删除。删除后无法恢复。"})]}),e.jsxs("div",{className:"flex justify-end gap-2 border-t border-border/60 bg-foreground/[0.015] px-4 py-2.5",children:[e.jsx(A,{size:"sm",variant:"ghost",children:"取消"}),e.jsx(A,{size:"sm",variant:"primary",tone:"danger",children:"删除项目"})]})]}),e.jsx(Dd,{})]})]})}const tt=6e4,Id=[{id:"todo-1",title:"审查「重塑左侧任务面板」的改动",state:"doing",tag:e.jsx(Pe,{name:"agent-tower",color:"text-indigo-600"}),due:{label:"今天",tone:"warning"}},{id:"todo-2",title:"续期隧道证书",state:"todo",tag:e.jsx(Pe,{name:"desktop-shell",color:"text-rose-600"}),due:{label:"逾期 1 天",tone:"danger"}},{id:"todo-3",title:"给 TeamRun 写拓扑模板说明",state:"todo",due:{label:"10/17"}},{id:"todo-4",title:"合并 v1.2 发布分支",state:"done",due:{label:"10/09"}},{id:"todo-5",title:"迁移旧的 Provider 配置",state:"cancelled"}];function Ld(){const[s,t]=C.useState(Id),a=n=>{t(r=>r.map(l=>l.id===n?{...l,state:l.state==="done"?"todo":"done"}:l))};return e.jsx(Da,{items:s,onToggle:a})}function je({agentType:s}){return e.jsx("span",{className:"flex size-6 items-center justify-center rounded-full bg-background ring-1 ring-border",children:e.jsx(le,{agentType:s,className:"size-3.5"})})}function Pd(){return e.jsxs(Y,{id:"lists",description:"清单是最常见的展示形式:每行一件事,状态在左、元信息在右。行间 1px 细线,悬停浅灰;只有临近或逾期的日期才上色。",children:[e.jsx(p,{name:"TodoList",title:"待办",description:"状态图标与任务状态同一套,可点击切换完成;顶部是各状态计数。逾期红、今天到期橙,其余日期灰。",children:e.jsx(Ld,{})}),e.jsx(p,{name:"Timeline",title:"日程",description:"按天分组的时间线:起止时间对齐成列,竖条表示时长,进行中的一项竖条变黑。",children:e.jsx(za,{groups:[{id:"today",title:"今天",caption:"10 月 14 日 周三",entries:[{id:"tl-1",time:"09:30",endTime:"10:00",title:"站会",meta:"线上 · 6 人"},{id:"tl-2",time:"10:00",endTime:"12:00",title:"Claude Code:重塑任务面板",tag:e.jsx(Q,{size:"sm",variant:"dot",tone:"success",children:"已完成"})},{id:"tl-3",time:"14:00",endTime:"15:00",title:"设计评审:组件库",meta:"会议室 3"},{id:"tl-4",time:"15:00",endTime:"16:30",title:"TeamRun:设计系统展示页",active:!0,tag:e.jsx(Re,{tone:"info",label:"进行中"})},{id:"tl-5",time:"17:00",title:"TeamRun 演示"}]},{id:"tomorrow",title:"明天",caption:"10 月 15 日 周四",entries:[{id:"tl-6",time:"10:00",endTime:"11:00",title:"迭代周会",meta:"线上"}]}]})}),e.jsx(p,{name:"ActivityFeed",title:"动态",description:"谁在什么时候做了什么。主语加粗,时间右对齐,附加内容缩进在下方。",children:e.jsx(Ca,{entries:[{id:"act-1",avatar:e.jsx(je,{agentType:$.CLAUDE_CODE}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"Claude Code"})," 提交了 3 个文件"]}),time:"4 分钟",detail:e.jsx("span",{className:"font-mono text-[11px]",children:"feat(web): 重塑左侧任务面板样式与交互"})},{id:"act-2",avatar:e.jsx(ie,{name:"林夏",size:"sm"}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"林夏"})," 把任务移到了「待审查」"]}),time:"12 分钟"},{id:"act-3",avatar:e.jsx(je,{agentType:$.CODEX}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"Codex"})," 开始执行「修复会话自动结束」"]}),time:"25 分钟"},{id:"act-4",avatar:e.jsx("span",{className:"flex size-6 items-center justify-center rounded-full bg-foreground/[0.06] text-muted-foreground",children:e.jsx(Ht,{className:"size-3.5","aria-hidden":"true"})}),text:e.jsxs(e.Fragment,{children:[e.jsx("b",{className:"font-medium text-foreground",children:"周远"})," 合并了 feat/approval-loop"]}),time:"1 小时",detail:e.jsx(Ae,{additions:865,deletions:233})}]})}),e.jsx(p,{name:"DeadlineList",title:"到期提醒",description:"大号天数先抓住视线:逾期红、3 天内橙、其余墨色——越紧急越醒目。",children:e.jsx(Ma,{items:[{id:"dl-1",days:-2,title:"隧道证书续期",meta:"desktop-shell · 运维"},{id:"dl-2",days:0,title:"组件库提测",meta:"设计系统 v1"},{id:"dl-3",days:2,title:"回复设计评审意见",meta:"设计系统 v1"},{id:"dl-4",days:7,title:"主页迁移",meta:"agent-tower"}]})}),e.jsxs(p,{name:"Leaderboard",title:"排行榜",description:"前三名序号加深;名次变化用小箭头,不用奖牌和彩色。",children:[e.jsx(Aa,{entries:[{id:"lb-1",name:"Claude Code",avatar:e.jsx(je,{agentType:$.CLAUDE_CODE}),meta:"486 次会话",value:"74%",change:1},{id:"lb-2",name:"Codex",avatar:e.jsx(je,{agentType:$.CODEX}),meta:"312 次会话",value:"61%",change:-1},{id:"lb-3",name:"Cursor Agent",avatar:e.jsx(je,{agentType:$.CURSOR_AGENT}),meta:"97 次会话",value:"60%",change:2},{id:"lb-4",name:"Qwen Code",avatar:e.jsx(je,{agentType:$.QWEN_CODE}),meta:"41 次会话",value:"50%"},{id:"lb-5",name:"Gemini CLI",avatar:e.jsx(je,{agentType:$.GEMINI_CLI}),meta:"158 次会话",value:"47%",change:-2}]}),e.jsx(V,{className:"mt-2",children:"一次通过审查的比例 · 10 月"})]}),e.jsx(p,{name:"Bulletin",title:"公告",description:"日期块 + 标题 + 一两行正文;类型徽章只用 neutral,维护这类需要注意的才上色。",children:e.jsx(Ta,{locale:"zh-CN",items:[{id:"bl-1",date:new Date(2026,9,14),title:"设计系统 v1 上线",body:"组件、设计规范与扩展规则都在 /design-system,新页面请从这里取组件。",badge:e.jsx(Q,{size:"sm",children:"公告"})},{id:"bl-2",date:new Date(2026,9,12),title:"隧道服务维护",body:"10 月 16 日 02:00–03:00 远程访问不可用,本地使用不受影响。",badge:e.jsx(Q,{size:"sm",tone:"warning",children:"维护"})},{id:"bl-3",date:new Date(2026,9,9),title:"v1.2:三档执行权限",body:"请求批准、自动同意(沙箱)、自动同意(完全访问)。",badge:e.jsx(Q,{size:"sm",children:"更新"}),meta:"发布说明"}]})})]})}const $d=[{key:"title",header:"任务",render:s=>e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-foreground",children:s.title}),e.jsx(Pe,{name:s.project.name,color:s.project.color})]})},{key:"status",header:"状态",width:"96px",render:s=>e.jsx(Ps,{status:s.status})},{key:"agent",header:"Agent",width:"136px",render:s=>e.jsx(te,{agentType:s.agent,size:"sm"})},{key:"minutes",header:"耗时",width:"80px",numeric:!0,sortable:!0,render:s=>s.minutes?`${s.minutes} 分钟`:"—"},{key:"changes",header:"改动",width:"112px",numeric:!0,sortable:!0,sortValue:s=>s.additions+s.deletions,render:s=>e.jsx(Ae,{additions:s.additions,deletions:s.deletions})},{key:"updatedAt",header:"更新",width:"80px",numeric:!0,sortable:!0,render:s=>e.jsx(ne,{value:s.updatedAt,now:H,className:"text-xs"})}];function Od(){const[s,t]=C.useState("data"),[a,n]=C.useState(js[0].id);return e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(ps,{"aria-label":"表格状态",size:"sm",value:s,onValueChange:t,options:[{value:"data",label:"数据"},{value:"loading",label:"首次加载"},{value:"empty",label:"无结果"}]}),e.jsx(Rr,{caption:"最近的任务",columns:$d,rows:s==="empty"?[]:js,rowKey:r=>r.id,loading:s==="loading",defaultSort:{key:"updatedAt",direction:"desc"},selectedKey:a,onRowClick:r=>n(r.id),empty:e.jsx(fs,{size:"sm",icon:e.jsx(on,{}),title:"没有匹配的任务",description:"换个关键词,或清除筛选条件"})})]})}function Fd(){return e.jsxs(Y,{id:"tables",description:"需要逐行比较、排序时用表格。表头 12px 灰字,行高 36px,数字列右对齐等宽;状态列用图标 + 文字。热力表用墨阶表示强弱,格内仍写数字。",children:[e.jsx(p,{name:"DataTable",title:"数据表",description:"可排序的列悬停才显示排序箭头;可点击的行支持 Enter 打开,选中行浅灰底。",span:2,dos:["刷新时保留旧数据,骨架只用于首次加载","空结果给出下一步:「换个关键词」"],donts:["斑马纹和竖线网格——行间细线就够了","数字列左对齐"],children:e.jsx(Od,{})}),e.jsxs(p,{name:"HeatTable",title:"热力表",description:"两个维度交叉的强弱:颜色帮助扫视,数字负责精确,打印和色弱同样可读。",children:[e.jsx(Tr,{"aria-label":"各项目按星期的任务数",corner:"项目",rows:ee.map(s=>({name:s.name,label:e.jsxs(e.Fragment,{children:[e.jsx(ns,{color:s.color,className:"mr-1.5 inline-block align-[1px]"}),s.name]})})),columns:Fo,data:Bo}),e.jsx(St,{className:"mt-3"})]}),e.jsxs(p,{name:"CalendarHeatmap",title:"日历热力",description:"每天的活跃度:周为列、星期为行,5 档墨阶;悬停看具体日期和数值。",children:[e.jsx(Mr,{"aria-label":"近 26 周每日会话数",start:Ur,values:oa,locale:"zh-CN",describe:(s,t)=>`${s.getMonth()+1} 月 ${s.getDate()} 日 · ${t} 次会话`}),e.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[e.jsxs(V,{children:["近 26 周 · 共 ",oa.reduce((s,t)=>s+t,0).toLocaleString("zh-CN")," 次会话"]}),e.jsx(St,{})]})]})]})}function Bd(){return e.jsxs(Y,{id:"schedule",description:"流程回答「走到哪一步了、卡在哪」,排期回答「什么时候、谁在做」。都用「今天」竖线做参照,受阻和逾期是唯一的彩色。",children:[e.jsx(p,{name:"ProcessSteps",title:"流程步骤",description:"任务生命周期 / SOP:已完成的连线变黑,当前步骤黑框,受阻的步骤用红色——整条流程唯一需要处理的地方。",span:2,children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(Tt,{steps:[{id:"p1",title:"创建任务",owner:"林夏",time:"09:12",status:"done"},{id:"p2",title:"准备工作区",owner:"自动",time:"09:13",status:"done"},{id:"p3",title:"Agent 执行",owner:"Claude Code",time:"48 分钟",status:"done"},{id:"p4",title:"代码审查",owner:"林夏",time:"进行中",status:"current"},{id:"p5",title:"合并",status:"upcoming"}]}),e.jsx(Tt,{steps:[{id:"q1",title:"创建任务",owner:"周远",time:"昨天",status:"done"},{id:"q2",title:"准备工作区",owner:"自动",time:"依赖安装失败",status:"blocked"},{id:"q3",title:"Agent 执行",status:"upcoming"},{id:"q4",title:"代码审查",status:"upcoming"},{id:"q5",title:"合并",status:"upcoming"}]})]})}),e.jsx(p,{name:"TopologyTree",title:"拓扑树",description:"TeamRun 团队结构:自上而下的层级,节点是小白卡,当前关注的节点加深描边。",span:2,canvas:"chrome",children:e.jsx(Lr,{root:{id:"lead",title:"Lead",subtitle:"Claude Code · 拆解与汇总",icon:e.jsx(le,{agentType:$.CLAUDE_CODE}),status:e.jsx(Re,{tone:"info",label:"运行中"}),children:[{id:"planner",title:"Planner",subtitle:"Codex",icon:e.jsx(le,{agentType:$.CODEX})},{id:"coder",title:"Coder",subtitle:"2 个实例",icon:e.jsx(Ba,{}),active:!0,children:[{id:"coder-a",title:"Coder A",subtitle:"组件库",icon:e.jsx(le,{agentType:$.CLAUDE_CODE}),status:e.jsx(Re,{tone:"info",label:"运行中"})},{id:"coder-b",title:"Coder B",subtitle:"展示页",icon:e.jsx(le,{agentType:$.GEMINI_CLI}),status:e.jsx(Re,{tone:"info",label:"运行中"})}]},{id:"reviewer",title:"Reviewer",subtitle:"Codex · 等待中",icon:e.jsx(Gs,{})}]}})}),e.jsx(p,{name:"GanttChart",title:"甘特图",description:"横条是起止,墨色部分是已完成的比例,斜纹是剩余;竖线是今天。条外写负责人,不靠颜色区分人。",span:2,children:e.jsx(Er,{"aria-label":"v1.3 里程碑排期",tasks:Wo,start:Go,days:28,today:9,locale:"zh-CN"})}),e.jsx(p,{name:"MonthCalendar",title:"月历",description:"一个月的事件:今天是黑底日期;只有带状态含义的事件(到期、维护)才上色,超出的折叠成「+N」。",span:2,children:e.jsx(_r,{year:2026,month:9,today:"2026-10-14",events:Uo,locale:"zh-CN"})})]})}const Gd=[{name:"林夏"},{name:"周远"},{name:"陈默"},{name:"Alex Kim"},{name:"王若"},{name:"Sam Lee"}],Wd=`export function navRowClassName(active: boolean, className?: string) {
2
2
  return cn(
3
3
  'flex h-8 w-full min-w-0 items-center gap-2.5 rounded-md px-2 text-sm',
4
4
  active