@ashlr/hub 3.13.0 → 3.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (625) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/dist/authority-surface.json +204 -124
  3. package/dist/build-identity.json +2 -2
  4. package/dist/cli/authority.js +112 -18
  5. package/dist/cli/authority.js.map +1 -1
  6. package/dist/cli/comms.d.ts +33 -19
  7. package/dist/cli/comms.js +128 -151
  8. package/dist/cli/comms.js.map +1 -1
  9. package/dist/cli/completions.js +1 -1
  10. package/dist/cli/completions.js.map +1 -1
  11. package/dist/cli/daemon.js +29 -0
  12. package/dist/cli/daemon.js.map +1 -1
  13. package/dist/cli/director.d.ts +8 -12
  14. package/dist/cli/director.js +17 -52
  15. package/dist/cli/director.js.map +1 -1
  16. package/dist/cli/fleet.js +4 -1
  17. package/dist/cli/fleet.js.map +1 -1
  18. package/dist/cli/help.js +1 -0
  19. package/dist/cli/help.js.map +1 -1
  20. package/dist/cli/leader.d.ts +27 -3
  21. package/dist/cli/leader.js +253 -4
  22. package/dist/cli/leader.js.map +1 -1
  23. package/dist/core/authority/server-enforcement.d.ts +110 -0
  24. package/dist/core/authority/server-enforcement.js +260 -0
  25. package/dist/core/authority/server-enforcement.js.map +1 -0
  26. package/dist/core/authority/standing-grant.d.ts +24 -4
  27. package/dist/core/authority/standing-grant.js +19 -3
  28. package/dist/core/authority/standing-grant.js.map +1 -1
  29. package/dist/core/cloud/timeline.js +13 -7
  30. package/dist/core/cloud/timeline.js.map +1 -1
  31. package/dist/core/comms/change-digest.d.ts +130 -0
  32. package/dist/core/comms/change-digest.js +451 -0
  33. package/dist/core/comms/change-digest.js.map +1 -0
  34. package/dist/core/comms/director-prompt.d.ts +4 -5
  35. package/dist/core/comms/director-prompt.js +4 -71
  36. package/dist/core/comms/director-prompt.js.map +1 -1
  37. package/dist/core/comms/director.d.ts +24 -61
  38. package/dist/core/comms/director.js +29 -382
  39. package/dist/core/comms/director.js.map +1 -1
  40. package/dist/core/comms/dispatch.d.ts +37 -12
  41. package/dist/core/comms/dispatch.js +244 -177
  42. package/dist/core/comms/dispatch.js.map +1 -1
  43. package/dist/core/comms/elon-dialogue.d.ts +23 -15
  44. package/dist/core/comms/elon-dialogue.js +36 -307
  45. package/dist/core/comms/elon-dialogue.js.map +1 -1
  46. package/dist/core/comms/fleet-pulse.js +4 -7
  47. package/dist/core/comms/fleet-pulse.js.map +1 -1
  48. package/dist/core/comms/handlers.d.ts +10 -6
  49. package/dist/core/comms/handlers.js +14 -48
  50. package/dist/core/comms/handlers.js.map +1 -1
  51. package/dist/core/comms/migrations.d.ts +47 -0
  52. package/dist/core/comms/migrations.js +125 -0
  53. package/dist/core/comms/migrations.js.map +1 -0
  54. package/dist/core/comms/requests.d.ts +32 -5
  55. package/dist/core/comms/requests.js +101 -5
  56. package/dist/core/comms/requests.js.map +1 -1
  57. package/dist/core/comms/telegram-channel.d.ts +104 -0
  58. package/dist/core/comms/telegram-channel.js +622 -0
  59. package/dist/core/comms/telegram-channel.js.map +1 -0
  60. package/dist/core/comms/telegram-thread-map.d.ts +56 -0
  61. package/dist/core/comms/telegram-thread-map.js +144 -0
  62. package/dist/core/comms/telegram-thread-map.js.map +1 -0
  63. package/dist/core/daemon/capacity-publisher.d.ts +8 -1
  64. package/dist/core/daemon/capacity-publisher.js +40 -2
  65. package/dist/core/daemon/capacity-publisher.js.map +1 -1
  66. package/dist/core/daemon/loop.js +18 -4
  67. package/dist/core/daemon/loop.js.map +1 -1
  68. package/dist/core/daemon/tick-deadline.d.ts +44 -0
  69. package/dist/core/daemon/tick-deadline.js +83 -0
  70. package/dist/core/daemon/tick-deadline.js.map +1 -0
  71. package/dist/core/daemon/tick-hooks.d.ts +7 -0
  72. package/dist/core/daemon/tick-hooks.js.map +1 -1
  73. package/dist/core/daemon/tick-progress.d.ts +39 -0
  74. package/dist/core/daemon/tick-progress.js +194 -0
  75. package/dist/core/daemon/tick-progress.js.map +1 -0
  76. package/dist/core/dashboard.js +3 -1
  77. package/dist/core/dashboard.js.map +1 -1
  78. package/dist/core/fleet/fleet-merge-state.d.ts +6 -0
  79. package/dist/core/fleet/fleet-merge-state.js.map +1 -1
  80. package/dist/core/fleet/host-merge.d.ts +9 -0
  81. package/dist/core/fleet/host-merge.js +13 -2
  82. package/dist/core/fleet/host-merge.js.map +1 -1
  83. package/dist/core/fleet/merge-gates.d.ts +13 -0
  84. package/dist/core/fleet/merge-gates.js +14 -0
  85. package/dist/core/fleet/merge-gates.js.map +1 -1
  86. package/dist/core/fleet/mirrors.d.ts +162 -6
  87. package/dist/core/fleet/mirrors.js +1051 -49
  88. package/dist/core/fleet/mirrors.js.map +1 -1
  89. package/dist/core/fleet/standing-merge-pass.d.ts +8 -0
  90. package/dist/core/fleet/standing-merge-pass.js +72 -1
  91. package/dist/core/fleet/standing-merge-pass.js.map +1 -1
  92. package/dist/core/fleet/status.d.ts +17 -0
  93. package/dist/core/fleet/status.js +22 -0
  94. package/dist/core/fleet/status.js.map +1 -1
  95. package/dist/core/fleet/tick-hooks-live.d.ts +1 -1
  96. package/dist/core/fleet/tick-hooks-live.js +13 -3
  97. package/dist/core/fleet/tick-hooks-live.js.map +1 -1
  98. package/dist/core/git.d.ts +17 -0
  99. package/dist/core/git.js +124 -25
  100. package/dist/core/git.js.map +1 -1
  101. package/dist/core/goals/open-goals.d.ts +47 -0
  102. package/dist/core/goals/open-goals.js +33 -0
  103. package/dist/core/goals/open-goals.js.map +1 -0
  104. package/dist/core/inbox/merge.d.ts +5 -0
  105. package/dist/core/inbox/merge.js +58 -2
  106. package/dist/core/inbox/merge.js.map +1 -1
  107. package/dist/core/integrations/locus.d.ts +28 -0
  108. package/dist/core/integrations/locus.js +155 -30
  109. package/dist/core/integrations/locus.js.map +1 -1
  110. package/dist/core/integrations/telegram-format.d.ts +40 -0
  111. package/dist/core/integrations/telegram-format.js +123 -0
  112. package/dist/core/integrations/telegram-format.js.map +1 -0
  113. package/dist/core/integrations/telegram.d.ts +60 -4
  114. package/dist/core/integrations/telegram.js +161 -28
  115. package/dist/core/integrations/telegram.js.map +1 -1
  116. package/dist/core/mcp-registry.d.ts +12 -0
  117. package/dist/core/mcp-registry.js +70 -0
  118. package/dist/core/mcp-registry.js.map +1 -1
  119. package/dist/core/observability/rollup.d.ts +12 -10
  120. package/dist/core/observability/rollup.js +44 -17
  121. package/dist/core/observability/rollup.js.map +1 -1
  122. package/dist/core/resources/connection-monitor.d.ts +9 -0
  123. package/dist/core/resources/connection-monitor.js +19 -9
  124. package/dist/core/resources/connection-monitor.js.map +1 -1
  125. package/dist/core/resources/quota-refresh-lease.d.ts +17 -0
  126. package/dist/core/resources/quota-refresh-lease.js +34 -1
  127. package/dist/core/resources/quota-refresh-lease.js.map +1 -1
  128. package/dist/core/routing/budget-api.d.ts +7 -1
  129. package/dist/core/routing/budget-api.js +56 -2
  130. package/dist/core/routing/budget-api.js.map +1 -1
  131. package/dist/core/routing/readiness-types.d.ts +82 -0
  132. package/dist/core/routing/readiness-types.js +23 -0
  133. package/dist/core/routing/readiness-types.js.map +1 -0
  134. package/dist/core/routing/readiness.d.ts +103 -0
  135. package/dist/core/routing/readiness.js +480 -0
  136. package/dist/core/routing/readiness.js.map +1 -0
  137. package/dist/core/sandbox/confine.js +22 -1
  138. package/dist/core/sandbox/confine.js.map +1 -1
  139. package/dist/core/sandbox/policy.d.ts +23 -0
  140. package/dist/core/sandbox/policy.js +100 -0
  141. package/dist/core/sandbox/policy.js.map +1 -1
  142. package/dist/core/types.d.ts +13 -0
  143. package/dist/core/types.js.map +1 -1
  144. package/dist/core/universe/builtins/preparation/manifest.json +1 -1
  145. package/dist/core/universe/builtins/preparation/preparation-bridge.mjs +1204 -939
  146. package/dist/core/universe/builtins/preparation/preparation-verification-fixtures.mjs +1319 -1054
  147. package/dist/core/usage/frontier-usage.d.ts +20 -2
  148. package/dist/core/usage/frontier-usage.js +75 -17
  149. package/dist/core/usage/frontier-usage.js.map +1 -1
  150. package/dist/core/verse/accounts.d.ts +45 -0
  151. package/dist/core/verse/accounts.js +246 -17
  152. package/dist/core/verse/accounts.js.map +1 -1
  153. package/dist/core/verse/apps-api.js +23 -11
  154. package/dist/core/verse/apps-api.js.map +1 -1
  155. package/dist/core/verse/apps.d.ts +11 -9
  156. package/dist/core/verse/apps.js +2 -2
  157. package/dist/core/verse/apps.js.map +1 -1
  158. package/dist/core/verse/authority-api.d.ts +8 -2
  159. package/dist/core/verse/authority-api.js +40 -5
  160. package/dist/core/verse/authority-api.js.map +1 -1
  161. package/dist/core/verse/autonomy-ladder.d.ts +172 -0
  162. package/dist/core/verse/autonomy-ladder.js +251 -0
  163. package/dist/core/verse/autonomy-ladder.js.map +1 -0
  164. package/dist/core/verse/context-fit.js +7 -5
  165. package/dist/core/verse/context-fit.js.map +1 -1
  166. package/dist/core/verse/control-api.d.ts +23 -1
  167. package/dist/core/verse/control-api.js +117 -10
  168. package/dist/core/verse/control-api.js.map +1 -1
  169. package/dist/core/verse/fleet-live-api.js +13 -5
  170. package/dist/core/verse/fleet-live-api.js.map +1 -1
  171. package/dist/core/verse/folder-io.d.ts +50 -0
  172. package/dist/core/verse/folder-io.js +142 -0
  173. package/dist/core/verse/folder-io.js.map +1 -0
  174. package/dist/core/verse/git-api.js +5 -4
  175. package/dist/core/verse/git-api.js.map +1 -1
  176. package/dist/core/verse/git-ops.d.ts +10 -1
  177. package/dist/core/verse/git-ops.js +18 -2
  178. package/dist/core/verse/git-ops.js.map +1 -1
  179. package/dist/core/verse/github-api.d.ts +1 -1
  180. package/dist/core/verse/github-api.js +5 -4
  181. package/dist/core/verse/github-api.js.map +1 -1
  182. package/dist/core/verse/github-repo.js +118 -14
  183. package/dist/core/verse/github-repo.js.map +1 -1
  184. package/dist/core/verse/leader-api.d.ts +5 -4
  185. package/dist/core/verse/leader-api.js +237 -10
  186. package/dist/core/verse/leader-api.js.map +1 -1
  187. package/dist/core/verse/local-models.d.ts +10 -0
  188. package/dist/core/verse/local-models.js +10 -1
  189. package/dist/core/verse/local-models.js.map +1 -1
  190. package/dist/core/verse/login-path.d.ts +73 -0
  191. package/dist/core/verse/login-path.js +123 -14
  192. package/dist/core/verse/login-path.js.map +1 -1
  193. package/dist/core/verse/mcp-control-api.js +4 -4
  194. package/dist/core/verse/mcp-control-api.js.map +1 -1
  195. package/dist/core/verse/mcp-scope.d.ts +22 -0
  196. package/dist/core/verse/mcp-scope.js +41 -1
  197. package/dist/core/verse/mcp-scope.js.map +1 -1
  198. package/dist/core/verse/mcp-seat-view.d.ts +10 -0
  199. package/dist/core/verse/mcp-seat-view.js +30 -4
  200. package/dist/core/verse/mcp-seat-view.js.map +1 -1
  201. package/dist/core/verse/overnight-api.js +20 -2
  202. package/dist/core/verse/overnight-api.js.map +1 -1
  203. package/dist/core/verse/path-guard.d.ts +24 -0
  204. package/dist/core/verse/path-guard.js +91 -22
  205. package/dist/core/verse/path-guard.js.map +1 -1
  206. package/dist/core/verse/preview-api.js +22 -0
  207. package/dist/core/verse/preview-api.js.map +1 -1
  208. package/dist/core/verse/projects.d.ts +21 -0
  209. package/dist/core/verse/projects.js +82 -0
  210. package/dist/core/verse/projects.js.map +1 -1
  211. package/dist/core/verse/session-controls-api.js +5 -3
  212. package/dist/core/verse/session-controls-api.js.map +1 -1
  213. package/dist/core/verse/session-handoff.d.ts +26 -0
  214. package/dist/core/verse/session-handoff.js +90 -12
  215. package/dist/core/verse/session-handoff.js.map +1 -1
  216. package/dist/core/verse/terminal-api.js +7 -4
  217. package/dist/core/verse/terminal-api.js.map +1 -1
  218. package/dist/core/verse/terminal.js +9 -5
  219. package/dist/core/verse/terminal.js.map +1 -1
  220. package/dist/core/verse/verse-api.js +81 -27
  221. package/dist/core/verse/verse-api.js.map +1 -1
  222. package/dist/core/verse/workspaces.d.ts +51 -0
  223. package/dist/core/verse/workspaces.js +177 -47
  224. package/dist/core/verse/workspaces.js.map +1 -1
  225. package/dist/core/vision/leader-apply.d.ts +40 -0
  226. package/dist/core/vision/leader-apply.js +101 -30
  227. package/dist/core/vision/leader-apply.js.map +1 -1
  228. package/dist/core/vision/leader-cadence.d.ts +114 -0
  229. package/dist/core/vision/leader-cadence.js +127 -0
  230. package/dist/core/vision/leader-cadence.js.map +1 -0
  231. package/dist/core/vision/leader-goal-evidence.d.ts +25 -0
  232. package/dist/core/vision/leader-goal-evidence.js +36 -0
  233. package/dist/core/vision/leader-goal-evidence.js.map +1 -0
  234. package/dist/core/vision/leader-health.d.ts +53 -0
  235. package/dist/core/vision/leader-health.js +92 -0
  236. package/dist/core/vision/leader-health.js.map +1 -0
  237. package/dist/core/vision/leader-operator.d.ts +176 -0
  238. package/dist/core/vision/leader-operator.js +355 -0
  239. package/dist/core/vision/leader-operator.js.map +1 -0
  240. package/dist/core/vision/leader-run-chain.d.ts +41 -0
  241. package/dist/core/vision/leader-run-chain.js +54 -0
  242. package/dist/core/vision/leader-run-chain.js.map +1 -0
  243. package/dist/core/vision/leader-seat-plan.d.ts +68 -0
  244. package/dist/core/vision/leader-seat-plan.js +93 -0
  245. package/dist/core/vision/leader-seat-plan.js.map +1 -0
  246. package/dist/core/vision/leader-seat.d.ts +71 -5
  247. package/dist/core/vision/leader-seat.js +235 -33
  248. package/dist/core/vision/leader-seat.js.map +1 -1
  249. package/dist/core/vision/leader-thread-types.d.ts +104 -0
  250. package/dist/core/vision/leader-thread-types.js +9 -0
  251. package/dist/core/vision/leader-thread-types.js.map +1 -0
  252. package/dist/core/vision/leader-thread.d.ts +138 -0
  253. package/dist/core/vision/leader-thread.js +926 -0
  254. package/dist/core/vision/leader-thread.js.map +1 -0
  255. package/dist/core/vision/leader-types.d.ts +75 -1
  256. package/dist/core/vision/leader.d.ts +88 -18
  257. package/dist/core/vision/leader.js +269 -69
  258. package/dist/core/vision/leader.js.map +1 -1
  259. package/dist/core/web/public/next/assets/{ActionMenu-Dwjk6rUQ.js → ActionMenu-CIiX2X8w.js} +2 -2
  260. package/dist/core/web/public/next/assets/{ActionMenu-Dwjk6rUQ.js.map → ActionMenu-CIiX2X8w.js.map} +1 -1
  261. package/dist/core/web/public/next/assets/Advanced-DHsysoIL.js +2 -0
  262. package/dist/core/web/public/next/assets/{Advanced-cVYTAsfB.js.map → Advanced-DHsysoIL.js.map} +1 -1
  263. package/dist/core/web/public/next/assets/{App-IsaWDsdF.js → App-CMeAocmW.js} +5 -5
  264. package/dist/core/web/public/next/assets/{App-IsaWDsdF.js.map → App-CMeAocmW.js.map} +1 -1
  265. package/dist/core/web/public/next/assets/AppsSection-DISYnMnc.js +2 -0
  266. package/dist/core/web/public/next/assets/{AppsSection-DDqeSrty.js.map → AppsSection-DISYnMnc.js.map} +1 -1
  267. package/dist/core/web/public/next/assets/AreaTrend-DK2Y2TbZ.js +2 -0
  268. package/dist/core/web/public/next/assets/AreaTrend-DK2Y2TbZ.js.map +1 -0
  269. package/dist/core/web/public/next/assets/{AutonomyOffState-CpFYS3tQ.js → AutonomyOffState-CEPSZToP.js} +3 -3
  270. package/dist/core/web/public/next/assets/{AutonomyOffState-CpFYS3tQ.js.map → AutonomyOffState-CEPSZToP.js.map} +1 -1
  271. package/dist/core/web/public/next/assets/AutonomySection-DWc3ciAD.js +2 -0
  272. package/dist/core/web/public/next/assets/{AutonomySection-Dwn8UtOy.js.map → AutonomySection-DWc3ciAD.js.map} +1 -1
  273. package/dist/core/web/public/next/assets/AutonomyStatus-CYaHjJ9U.js +2 -0
  274. package/dist/core/web/public/next/assets/AutonomyStatus-CYaHjJ9U.js.map +1 -0
  275. package/dist/core/web/public/next/assets/{BranchBar-ISZ7xUCj.js → BranchBar-BxhdiIpx.js} +2 -2
  276. package/dist/core/web/public/next/assets/{BranchBar-ISZ7xUCj.js.map → BranchBar-BxhdiIpx.js.map} +1 -1
  277. package/dist/core/web/public/next/assets/{BudgetControl-BARVp-En.js → BudgetControl-C-0KhjRS.js} +2 -2
  278. package/dist/core/web/public/next/assets/{BudgetControl-BARVp-En.js.map → BudgetControl-C-0KhjRS.js.map} +1 -1
  279. package/dist/core/web/public/next/assets/{Button-DtE0rlWD.js → Button-D90dzI_o.js} +2 -2
  280. package/dist/core/web/public/next/assets/{Button-DtE0rlWD.js.map → Button-D90dzI_o.js.map} +1 -1
  281. package/dist/core/web/public/next/assets/{CapacityStrip-DKbKA_Aa.js → CapacityStrip-qKDBC65C.js} +2 -2
  282. package/dist/core/web/public/next/assets/{CapacityStrip-DKbKA_Aa.js.map → CapacityStrip-qKDBC65C.js.map} +1 -1
  283. package/dist/core/web/public/next/assets/ChartFrame-DY-GVUb3.js +2 -0
  284. package/dist/core/web/public/next/assets/ChartFrame-DY-GVUb3.js.map +1 -0
  285. package/dist/core/web/public/next/assets/ChartFrame-DyjmyV8N.css +1 -0
  286. package/dist/core/web/public/next/assets/ChatSection-DlT4QU6a.js +3 -0
  287. package/dist/core/web/public/next/assets/{ChatSection-C9myY4ei.js.map → ChatSection-DlT4QU6a.js.map} +1 -1
  288. package/dist/core/web/public/next/assets/{CloudBudgetForm-CvjK4Oh6.js → CloudBudgetForm-BrNun_Yu.js} +2 -2
  289. package/dist/core/web/public/next/assets/{CloudBudgetForm-CvjK4Oh6.js.map → CloudBudgetForm-BrNun_Yu.js.map} +1 -1
  290. package/dist/core/web/public/next/assets/CommandPalette-C5lDDKN0.js +2 -0
  291. package/dist/core/web/public/next/assets/CommandPalette-C5lDDKN0.js.map +1 -0
  292. package/dist/core/web/public/next/assets/CommandSection-B0xuU-yZ.css +1 -0
  293. package/dist/core/web/public/next/assets/CommandSection-DXFvPgKp.js +3 -0
  294. package/dist/core/web/public/next/assets/CommandSection-DXFvPgKp.js.map +1 -0
  295. package/dist/core/web/public/next/assets/{ConfirmDialog-CLUhzaBj.js → ConfirmDialog-BR4nZQ2D.js} +2 -2
  296. package/dist/core/web/public/next/assets/{ConfirmDialog-CLUhzaBj.js.map → ConfirmDialog-BR4nZQ2D.js.map} +1 -1
  297. package/dist/core/web/public/next/assets/{DeleteChatDialog-C_eDhV8b.js → DeleteChatDialog-BCfP12GH.js} +2 -2
  298. package/dist/core/web/public/next/assets/{DeleteChatDialog-C_eDhV8b.js.map → DeleteChatDialog-BCfP12GH.js.map} +1 -1
  299. package/dist/core/web/public/next/assets/{Dialog-BRd_B9OE.js → Dialog-D3msQlCj.js} +2 -2
  300. package/dist/core/web/public/next/assets/{Dialog-BRd_B9OE.js.map → Dialog-D3msQlCj.js.map} +1 -1
  301. package/dist/core/web/public/next/assets/{DiffPane-Cpr9soB2.js → DiffPane-Ix6hvXlY.js} +2 -2
  302. package/dist/core/web/public/next/assets/{DiffPane-Cpr9soB2.js.map → DiffPane-Ix6hvXlY.js.map} +1 -1
  303. package/dist/core/web/public/next/assets/{DiffViewer-CNwd0W3Q.js → DiffViewer-C4WKsCIe.js} +2 -2
  304. package/dist/core/web/public/next/assets/{DiffViewer-CNwd0W3Q.js.map → DiffViewer-C4WKsCIe.js.map} +1 -1
  305. package/dist/core/web/public/next/assets/DockHost-aWP7liri.js +2 -0
  306. package/dist/core/web/public/next/assets/{DockHost-BcEq2qaS.js.map → DockHost-aWP7liri.js.map} +1 -1
  307. package/dist/core/web/public/next/assets/{EmptyState-DsN1H6MC.js → EmptyState-D2IRy3Cg.js} +2 -2
  308. package/dist/core/web/public/next/assets/{EmptyState-DsN1H6MC.js.map → EmptyState-D2IRy3Cg.js.map} +1 -1
  309. package/dist/core/web/public/next/assets/{Epistemic-fycQTBRO.js → Epistemic-DMr18muX.js} +2 -2
  310. package/dist/core/web/public/next/assets/{Epistemic-fycQTBRO.js.map → Epistemic-DMr18muX.js.map} +1 -1
  311. package/dist/core/web/public/next/assets/{EvidenceTimeline-sCCAdnBK.js → EvidenceTimeline-DXmmz6Fi.js} +2 -2
  312. package/dist/core/web/public/next/assets/{EvidenceTimeline-sCCAdnBK.js.map → EvidenceTimeline-DXmmz6Fi.js.map} +1 -1
  313. package/dist/core/web/public/next/assets/FleetSection-BfplcwFU.js +3 -0
  314. package/dist/core/web/public/next/assets/FleetSection-BfplcwFU.js.map +1 -0
  315. package/dist/core/web/public/next/assets/Funnel-Dh2yVHws.js +2 -0
  316. package/dist/core/web/public/next/assets/Funnel-Dh2yVHws.js.map +1 -0
  317. package/dist/core/web/public/next/assets/{GearTray-CpDt0xwj.js → GearTray-Dt-ee32-.js} +2 -2
  318. package/dist/core/web/public/next/assets/{GearTray-CpDt0xwj.js.map → GearTray-Dt-ee32-.js.map} +1 -1
  319. package/dist/core/web/public/next/assets/GrowthSection-P9EUfGeA.js +2 -0
  320. package/dist/core/web/public/next/assets/{GrowthSection-BvZezOsX.js.map → GrowthSection-P9EUfGeA.js.map} +1 -1
  321. package/dist/core/web/public/next/assets/{HandoffDialog-B1G6gQyk.js → HandoffDialog-CLJQLe7M.js} +2 -2
  322. package/dist/core/web/public/next/assets/{HandoffDialog-B1G6gQyk.js.map → HandoffDialog-CLJQLe7M.js.map} +1 -1
  323. package/dist/core/web/public/next/assets/{Input-CI0yBHmn.js → Input-D_KRJA9V.js} +2 -2
  324. package/dist/core/web/public/next/assets/{Input-CI0yBHmn.js.map → Input-D_KRJA9V.js.map} +1 -1
  325. package/dist/core/web/public/next/assets/LeaderCard-D-7DlJuR.js +2 -0
  326. package/dist/core/web/public/next/assets/LeaderCard-D-7DlJuR.js.map +1 -0
  327. package/dist/core/web/public/next/assets/LeaderCard-DNsbLwY3.css +1 -0
  328. package/dist/core/web/public/next/assets/LeaderConversation-DGZjWI-E.js +2 -0
  329. package/dist/core/web/public/next/assets/LeaderConversation-DGZjWI-E.js.map +1 -0
  330. package/dist/core/web/public/next/assets/LeaderConversation-DPHUTq6W.css +1 -0
  331. package/dist/core/web/public/next/assets/MatrixHeatmap-C7BCG2d7.js +2 -0
  332. package/dist/core/web/public/next/assets/MatrixHeatmap-C7BCG2d7.js.map +1 -0
  333. package/dist/core/web/public/next/assets/McpSection-DGbRcyv8.js +2 -0
  334. package/dist/core/web/public/next/assets/{McpSection-nuXer4K-.js.map → McpSection-DGbRcyv8.js.map} +1 -1
  335. package/dist/core/web/public/next/assets/{MessageMarkdown-BCe4TsXk.js → MessageMarkdown-DFvk06qG.js} +3 -3
  336. package/dist/core/web/public/next/assets/{MessageMarkdown-BCe4TsXk.js.map → MessageMarkdown-DFvk06qG.js.map} +1 -1
  337. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-DL3LU5kL.js → MessageMarkdownRenderer-BAv4oEUf.js} +2 -2
  338. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-DL3LU5kL.js.map → MessageMarkdownRenderer-BAv4oEUf.js.map} +1 -1
  339. package/dist/core/web/public/next/assets/{Meter-b69LM0mU.js → Meter-CMj-VafN.js} +2 -2
  340. package/dist/core/web/public/next/assets/{Meter-b69LM0mU.js.map → Meter-CMj-VafN.js.map} +1 -1
  341. package/dist/core/web/public/next/assets/MindSection-C6kLPIjt.js +3 -0
  342. package/dist/core/web/public/next/assets/MindSection-C6kLPIjt.js.map +1 -0
  343. package/dist/core/web/public/next/assets/{MutationTokenDialog-Bm34BNVV.js → MutationTokenDialog-DbnO8aYi.js} +2 -2
  344. package/dist/core/web/public/next/assets/{MutationTokenDialog-Bm34BNVV.js.map → MutationTokenDialog-DbnO8aYi.js.map} +1 -1
  345. package/dist/core/web/public/next/assets/NeedsYouDrawer-crsiX-Nc.js +3 -0
  346. package/dist/core/web/public/next/assets/NeedsYouDrawer-crsiX-Nc.js.map +1 -0
  347. package/dist/core/web/public/next/assets/{NeedsYouList-D5Kk549g.js → NeedsYouList-CCsijdWt.js} +2 -2
  348. package/dist/core/web/public/next/assets/{NeedsYouList-D5Kk549g.js.map → NeedsYouList-CCsijdWt.js.map} +1 -1
  349. package/dist/core/web/public/next/assets/NewChatDialog-BlCHtOIr.js +3 -0
  350. package/dist/core/web/public/next/assets/{NewChatDialog-BqFTWgHU.js.map → NewChatDialog-BlCHtOIr.js.map} +1 -1
  351. package/dist/core/web/public/next/assets/{OnboardingFlow-DcDsguAM.js → OnboardingFlow-Cy9BA9eR.js} +3 -3
  352. package/dist/core/web/public/next/assets/{OnboardingFlow-DcDsguAM.js.map → OnboardingFlow-Cy9BA9eR.js.map} +1 -1
  353. package/dist/core/web/public/next/assets/OnboardingGate-BXpNFoLt.js +3 -0
  354. package/dist/core/web/public/next/assets/{OnboardingGate-BZafM1Vf.js.map → OnboardingGate-BXpNFoLt.js.map} +1 -1
  355. package/dist/core/web/public/next/assets/PreviewPane-COid5A0f.js +2 -0
  356. package/dist/core/web/public/next/assets/{PreviewPane-zT3gK9TD.js.map → PreviewPane-COid5A0f.js.map} +1 -1
  357. package/dist/core/web/public/next/assets/{ProviderLogo-AwHn2sKm.js → ProviderLogo-Cq-CYIwT.js} +2 -2
  358. package/dist/core/web/public/next/assets/{ProviderLogo-AwHn2sKm.js.map → ProviderLogo-Cq-CYIwT.js.map} +1 -1
  359. package/dist/core/web/public/next/assets/{RailStatus-xHrovWvI.js → RailStatus-Co5UB6We.js} +2 -2
  360. package/dist/core/web/public/next/assets/{RailStatus-xHrovWvI.js.map → RailStatus-Co5UB6We.js.map} +1 -1
  361. package/dist/core/web/public/next/assets/{RefreshIndicator-SEFZlMB2.js → RefreshIndicator-DO9ibnSq.js} +2 -2
  362. package/dist/core/web/public/next/assets/{RefreshIndicator-SEFZlMB2.js.map → RefreshIndicator-DO9ibnSq.js.map} +1 -1
  363. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-Dr2WRgkq.js +7 -0
  364. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-CAxPQ4sZ.js.map → ResourcePoolConsoleApp-Dr2WRgkq.js.map} +1 -1
  365. package/dist/core/web/public/next/assets/ResourcesChrome-CwMnbqI1.js +3 -0
  366. package/dist/core/web/public/next/assets/ResourcesChrome-CwMnbqI1.js.map +1 -0
  367. package/dist/core/web/public/next/assets/ResourcesDrawer-B_Xp_JNc.js +2 -0
  368. package/dist/core/web/public/next/assets/ResourcesDrawer-B_Xp_JNc.js.map +1 -0
  369. package/dist/core/web/public/next/assets/ResourcesDrawer-DrGoO8KG.css +1 -0
  370. package/dist/core/web/public/next/assets/{RouteErrorBoundary-C8WGiixc.js → RouteErrorBoundary-SkNhhUbt.js} +2 -2
  371. package/dist/core/web/public/next/assets/{RouteErrorBoundary-C8WGiixc.js.map → RouteErrorBoundary-SkNhhUbt.js.map} +1 -1
  372. package/dist/core/web/public/next/assets/{RunInCloudAction-1-IPLYhf.js → RunInCloudAction-BXPlZwJQ.js} +2 -2
  373. package/dist/core/web/public/next/assets/{RunInCloudAction-1-IPLYhf.js.map → RunInCloudAction-BXPlZwJQ.js.map} +1 -1
  374. package/dist/core/web/public/next/assets/{SeatSelector-DpwNiX8F.js → SeatSelector-J5R3zDkB.js} +3 -3
  375. package/dist/core/web/public/next/assets/{SeatSelector-DpwNiX8F.js.map → SeatSelector-J5R3zDkB.js.map} +1 -1
  376. package/dist/core/web/public/next/assets/{Segmented-Wt1ATod9.js → Segmented-CGh_-tBb.js} +2 -2
  377. package/dist/core/web/public/next/assets/{Segmented-Wt1ATod9.js.map → Segmented-CGh_-tBb.js.map} +1 -1
  378. package/dist/core/web/public/next/assets/{Select-By-V9lMc.js → Select-CWnmUzs3.js} +2 -2
  379. package/dist/core/web/public/next/assets/{Select-By-V9lMc.js.map → Select-CWnmUzs3.js.map} +1 -1
  380. package/dist/core/web/public/next/assets/{SessionGate-WROS02tK.js → SessionGate-sp4KsnUo.js} +2 -2
  381. package/dist/core/web/public/next/assets/{SessionGate-WROS02tK.js.map → SessionGate-sp4KsnUo.js.map} +1 -1
  382. package/dist/core/web/public/next/assets/{SessionInsightChip-DNUcruwp.js → SessionInsightChip-DLFAzdbi.js} +2 -2
  383. package/dist/core/web/public/next/assets/{SessionInsightChip-DNUcruwp.js.map → SessionInsightChip-DLFAzdbi.js.map} +1 -1
  384. package/dist/core/web/public/next/assets/{SessionSearch-UHtt7a8f.js → SessionSearch-DbFjwR1h.js} +2 -2
  385. package/dist/core/web/public/next/assets/{SessionSearch-UHtt7a8f.js.map → SessionSearch-DbFjwR1h.js.map} +1 -1
  386. package/dist/core/web/public/next/assets/{SettingsSection-Bf74l0Gj.js → SettingsSection-Ch23msJ5.js} +2 -2
  387. package/dist/core/web/public/next/assets/SettingsSection-Ch23msJ5.js.map +1 -0
  388. package/dist/core/web/public/next/assets/{SetupChecklist-CzpEcfOl.js → SetupChecklist-Bd76MBAR.js} +2 -2
  389. package/dist/core/web/public/next/assets/{SetupChecklist-CzpEcfOl.js.map → SetupChecklist-Bd76MBAR.js.map} +1 -1
  390. package/dist/core/web/public/next/assets/ShadowDecisions-C5RAY91f.js +3 -0
  391. package/dist/core/web/public/next/assets/ShadowDecisions-C5RAY91f.js.map +1 -0
  392. package/dist/core/web/public/next/assets/{Sheet-HkBOBMTT.js → Sheet-BZ2AG4Eo.js} +2 -2
  393. package/dist/core/web/public/next/assets/{Sheet-HkBOBMTT.js.map → Sheet-BZ2AG4Eo.js.map} +1 -1
  394. package/dist/core/web/public/next/assets/{ShortcutsOverlay-DiigiT8H.js → ShortcutsOverlay-C8n8y3zf.js} +2 -2
  395. package/dist/core/web/public/next/assets/{ShortcutsOverlay-DiigiT8H.js.map → ShortcutsOverlay-C8n8y3zf.js.map} +1 -1
  396. package/dist/core/web/public/next/assets/Sidebar-DN--cPYN.js +3 -0
  397. package/dist/core/web/public/next/assets/{Sidebar-C9YtBYVZ.js.map → Sidebar-DN--cPYN.js.map} +1 -1
  398. package/dist/core/web/public/next/assets/{Slider-DaEDws-b.js → Slider-KVoJLDD6.js} +2 -2
  399. package/dist/core/web/public/next/assets/{Slider-DaEDws-b.js.map → Slider-KVoJLDD6.js.map} +1 -1
  400. package/dist/core/web/public/next/assets/StatTile-C4KgjltA.js +2 -0
  401. package/dist/core/web/public/next/assets/StatTile-C4KgjltA.js.map +1 -0
  402. package/dist/core/web/public/next/assets/StatTile-CNCqDoPO.css +1 -0
  403. package/dist/core/web/public/next/assets/{StatusBadge-CXG3iNL4.js → StatusBadge-CXsYqmdU.js} +2 -2
  404. package/dist/core/web/public/next/assets/{StatusBadge-CXG3iNL4.js.map → StatusBadge-CXsYqmdU.js.map} +1 -1
  405. package/dist/core/web/public/next/assets/StepBand-BMtVOFpK.js +2 -0
  406. package/dist/core/web/public/next/assets/StepBand-BMtVOFpK.js.map +1 -0
  407. package/dist/core/web/public/next/assets/{Surface-5bNA08tK.js → Surface-BfDmQcKe.js} +2 -2
  408. package/dist/core/web/public/next/assets/{Surface-5bNA08tK.js.map → Surface-BfDmQcKe.js.map} +1 -1
  409. package/dist/core/web/public/next/assets/Swimlane-B9Exxekk.js +2 -0
  410. package/dist/core/web/public/next/assets/Swimlane-B9Exxekk.js.map +1 -0
  411. package/dist/core/web/public/next/assets/Swimlane-Bf4Rjoy9.css +1 -0
  412. package/dist/core/web/public/next/assets/{Switch-BmCzfFnu.js → Switch-9NtO_6Lj.js} +2 -2
  413. package/dist/core/web/public/next/assets/{Switch-BmCzfFnu.js.map → Switch-9NtO_6Lj.js.map} +1 -1
  414. package/dist/core/web/public/next/assets/{Tag-WSUIaMVy.js → Tag-DscCRFcN.js} +2 -2
  415. package/dist/core/web/public/next/assets/{Tag-WSUIaMVy.js.map → Tag-DscCRFcN.js.map} +1 -1
  416. package/dist/core/web/public/next/assets/{TerminalPane-BVFgYX6K.js → TerminalPane-B668-DJW.js} +5 -5
  417. package/dist/core/web/public/next/assets/{TerminalPane-BVFgYX6K.js.map → TerminalPane-B668-DJW.js.map} +1 -1
  418. package/dist/core/web/public/next/assets/UniverseConsoleApp-BUV_brY7.js +2 -0
  419. package/dist/core/web/public/next/assets/{UniverseConsoleApp-BpphLqoz.js.map → UniverseConsoleApp-BUV_brY7.js.map} +1 -1
  420. package/dist/core/web/public/next/assets/{UniverseView-DbpbSMwO.js → UniverseView-DG70zH0W.js} +4 -4
  421. package/dist/core/web/public/next/assets/{UniverseView-DbpbSMwO.js.map → UniverseView-DG70zH0W.js.map} +1 -1
  422. package/dist/core/web/public/next/assets/UsageSection-DY7uOTm1.js +3 -0
  423. package/dist/core/web/public/next/assets/UsageSection-DY7uOTm1.js.map +1 -0
  424. package/dist/core/web/public/next/assets/VerseConsoleApp-CWU6R3By.js +3 -0
  425. package/dist/core/web/public/next/assets/VerseConsoleApp-CWU6R3By.js.map +1 -0
  426. package/dist/core/web/public/next/assets/Workspace-D1nP9BhD.js +10 -0
  427. package/dist/core/web/public/next/assets/{Workspace-RXy0pqp6.js.map → Workspace-D1nP9BhD.js.map} +1 -1
  428. package/dist/core/web/public/next/assets/actions-CY-PjpGc.js +2 -0
  429. package/dist/core/web/public/next/assets/{actions-BZTidCXZ.js.map → actions-CY-PjpGc.js.map} +1 -1
  430. package/dist/core/web/public/next/assets/actions-DkWhhWIg.css +1 -0
  431. package/dist/core/web/public/next/assets/{apps-model-CHO133qt.js → apps-model-Du02KhAf.js} +2 -2
  432. package/dist/core/web/public/next/assets/{apps-model-CHO133qt.js.map → apps-model-Du02KhAf.js.map} +1 -1
  433. package/dist/core/web/public/next/assets/{authority-model-8NeAEwAF.js → authority-model-79SeuKlJ.js} +2 -2
  434. package/dist/core/web/public/next/assets/{authority-model-8NeAEwAF.js.map → authority-model-79SeuKlJ.js.map} +1 -1
  435. package/dist/core/web/public/next/assets/autonomy-ladder-BGWmZzP7.css +1 -0
  436. package/dist/core/web/public/next/assets/autonomy-ladder.module-ArDv4bkr.js +2 -0
  437. package/dist/core/web/public/next/assets/autonomy-ladder.module-ArDv4bkr.js.map +1 -0
  438. package/dist/core/web/public/next/assets/budget-queries-D8QV5XtH.js +2 -0
  439. package/dist/core/web/public/next/assets/{budget-queries-DFF-3ICg.js.map → budget-queries-D8QV5XtH.js.map} +1 -1
  440. package/dist/core/web/public/next/assets/{capacity-strip-model-5ViUgUlP.js → capacity-strip-model-BwZ1ZbkU.js} +2 -2
  441. package/dist/core/web/public/next/assets/{capacity-strip-model-5ViUgUlP.js.map → capacity-strip-model-BwZ1ZbkU.js.map} +1 -1
  442. package/dist/core/web/public/next/assets/charts-BZ50mZD_.js +2 -0
  443. package/dist/core/web/public/next/assets/charts-BZ50mZD_.js.map +1 -0
  444. package/dist/core/web/public/next/assets/charts-ClCB18la.css +1 -0
  445. package/dist/core/web/public/next/assets/{cloud-model-CfRydq8N.js → cloud-model-BDivRMqv.js} +2 -2
  446. package/dist/core/web/public/next/assets/{cloud-model-CfRydq8N.js.map → cloud-model-BDivRMqv.js.map} +1 -1
  447. package/dist/core/web/public/next/assets/{cloud-queries-DmptbjS8.js → cloud-queries-BPQQ5_pJ.js} +2 -2
  448. package/dist/core/web/public/next/assets/{cloud-queries-DmptbjS8.js.map → cloud-queries-BPQQ5_pJ.js.map} +1 -1
  449. package/dist/core/web/public/next/assets/{colors-BZ3a9wFf.js → colors-DvK0wMHH.js} +2 -2
  450. package/dist/core/web/public/next/assets/{colors-BZ3a9wFf.js.map → colors-DvK0wMHH.js.map} +1 -1
  451. package/dist/core/web/public/next/assets/{command-catalog-ffCAijVY.js → command-catalog-BIntSa9l.js} +2 -2
  452. package/dist/core/web/public/next/assets/command-catalog-BIntSa9l.js.map +1 -0
  453. package/dist/core/web/public/next/assets/{context-model-CDeyP0cA.js → context-model-Br8t9jgG.js} +2 -2
  454. package/dist/core/web/public/next/assets/{context-model-CDeyP0cA.js.map → context-model-Br8t9jgG.js.map} +1 -1
  455. package/dist/core/web/public/next/assets/{context-model-Bb15chFt.js → context-model-CokrgEUq.js} +3 -3
  456. package/dist/core/web/public/next/assets/{context-model-Bb15chFt.js.map → context-model-CokrgEUq.js.map} +1 -1
  457. package/dist/core/web/public/next/assets/context-queries-eL3caKVG.js +2 -0
  458. package/dist/core/web/public/next/assets/{context-queries-_9bFWb9v.js.map → context-queries-eL3caKVG.js.map} +1 -1
  459. package/dist/core/web/public/next/assets/{control-queries-CXtmZZH6.js → control-queries-B9K-wmcB.js} +2 -2
  460. package/dist/core/web/public/next/assets/{control-queries-CXtmZZH6.js.map → control-queries-B9K-wmcB.js.map} +1 -1
  461. package/dist/core/web/public/next/assets/{copy-setup-BIp0iaiZ.js → copy-setup-XMgCC5f8.js} +2 -2
  462. package/dist/core/web/public/next/assets/{copy-setup-BIp0iaiZ.js.map → copy-setup-XMgCC5f8.js.map} +1 -1
  463. package/dist/core/web/public/next/assets/{dock-icons-Cc43W7r4.js → dock-icons-BJ6ZqB2t.js} +2 -2
  464. package/dist/core/web/public/next/assets/{dock-icons-Cc43W7r4.js.map → dock-icons-BJ6ZqB2t.js.map} +1 -1
  465. package/dist/core/web/public/next/assets/{fleet-model-DOK8ZtEt.js → fleet-model-BvDR3gjp.js} +2 -2
  466. package/dist/core/web/public/next/assets/{fleet-model-DOK8ZtEt.js.map → fleet-model-BvDR3gjp.js.map} +1 -1
  467. package/dist/core/web/public/next/assets/{fleet-queries-BeEAqD6y.js → fleet-queries-W2UFVMZJ.js} +2 -2
  468. package/dist/core/web/public/next/assets/{fleet-queries-BeEAqD6y.js.map → fleet-queries-W2UFVMZJ.js.map} +1 -1
  469. package/dist/core/web/public/next/assets/{focus-trap-ChZ5EFfM.js → focus-trap-CtI1SlMX.js} +2 -2
  470. package/dist/core/web/public/next/assets/{focus-trap-ChZ5EFfM.js.map → focus-trap-CtI1SlMX.js.map} +1 -1
  471. package/dist/core/web/public/next/assets/{format-BmH2yWL6.js → format-CH4g_sl1.js} +2 -2
  472. package/dist/core/web/public/next/assets/{format-BmH2yWL6.js.map → format-CH4g_sl1.js.map} +1 -1
  473. package/dist/core/web/public/next/assets/{format-DKrNjdwD.js → format-D7nBg2bn.js} +2 -2
  474. package/dist/core/web/public/next/assets/{format-DKrNjdwD.js.map → format-D7nBg2bn.js.map} +1 -1
  475. package/dist/core/web/public/next/assets/{git-model-BFwAVbxF.js → git-model-Dnkd1TnK.js} +2 -2
  476. package/dist/core/web/public/next/assets/{git-model-BFwAVbxF.js.map → git-model-Dnkd1TnK.js.map} +1 -1
  477. package/dist/core/web/public/next/assets/global-CMNW_dqn.js +2 -0
  478. package/dist/core/web/public/next/assets/{global-y_exIyAP.js.map → global-CMNW_dqn.js.map} +1 -1
  479. package/dist/core/web/public/next/assets/guarded-runners-YeAc9wLQ.js +2 -0
  480. package/dist/core/web/public/next/assets/{guarded-runners-Cd4POBtI.js.map → guarded-runners-YeAc9wLQ.js.map} +1 -1
  481. package/dist/core/web/public/next/assets/{icons-CygCEFWs.js → icons-D1sYbCTQ.js} +2 -2
  482. package/dist/core/web/public/next/assets/{icons-CygCEFWs.js.map → icons-D1sYbCTQ.js.map} +1 -1
  483. package/dist/core/web/public/next/assets/{index-CyK31YRm.js → index-DZ-UQ7v8.js} +3 -3
  484. package/dist/core/web/public/next/assets/{index-CyK31YRm.js.map → index-DZ-UQ7v8.js.map} +1 -1
  485. package/dist/core/web/public/next/assets/leader-focus-BjeJv7CW.js +2 -0
  486. package/dist/core/web/public/next/assets/leader-focus-BjeJv7CW.js.map +1 -0
  487. package/dist/core/web/public/next/assets/leader-thread-types-CDb-VPPO.js +2 -0
  488. package/dist/core/web/public/next/assets/leader-thread-types-CDb-VPPO.js.map +1 -0
  489. package/dist/core/web/public/next/assets/{live-model-D7hilYFk.js → live-model-D_32RAOR.js} +2 -2
  490. package/dist/core/web/public/next/assets/{live-model-D7hilYFk.js.map → live-model-D_32RAOR.js.map} +1 -1
  491. package/dist/core/web/public/next/assets/{mind.module-B15k0Y9q.js → mind.module-7hA92hRg.js} +2 -2
  492. package/dist/core/web/public/next/assets/{mind.module-B15k0Y9q.js.map → mind.module-7hA92hRg.js.map} +1 -1
  493. package/dist/core/web/public/next/assets/mutations-DQPbFdRJ.js +2 -0
  494. package/dist/core/web/public/next/assets/{mutations-CWlxEMEm.js.map → mutations-DQPbFdRJ.js.map} +1 -1
  495. package/dist/core/web/public/next/assets/{nav-mimleI0R.js → nav-0dOYe2rJ.js} +2 -2
  496. package/dist/core/web/public/next/assets/{nav-mimleI0R.js.map → nav-0dOYe2rJ.js.map} +1 -1
  497. package/dist/core/web/public/next/assets/{overnight-queries-DJ4mZKSj.js → overnight-queries-C4wOnFtE.js} +2 -2
  498. package/dist/core/web/public/next/assets/{overnight-queries-DJ4mZKSj.js.map → overnight-queries-C4wOnFtE.js.map} +1 -1
  499. package/dist/core/web/public/next/assets/primitives-2A5Eq8FQ.js +1 -0
  500. package/dist/core/web/public/next/assets/{queries-Bw1McHTj.js → queries-BTXWdZzU.js} +2 -2
  501. package/dist/core/web/public/next/assets/{queries-Bw1McHTj.js.map → queries-BTXWdZzU.js.map} +1 -1
  502. package/dist/core/web/public/next/assets/{reasoning-pref-KkhI_5-j.js → reasoning-pref-Ca6lN6x_.js} +2 -2
  503. package/dist/core/web/public/next/assets/{reasoning-pref-KkhI_5-j.js.map → reasoning-pref-Ca6lN6x_.js.map} +1 -1
  504. package/dist/core/web/public/next/assets/{reveal-anchor-CCCx_kfT.js → reveal-anchor-DfNLgK_I.js} +2 -2
  505. package/dist/core/web/public/next/assets/{reveal-anchor-CCCx_kfT.js.map → reveal-anchor-DfNLgK_I.js.map} +1 -1
  506. package/dist/core/web/public/next/assets/seat-subscription-C5uPHBsN.js +2 -0
  507. package/dist/core/web/public/next/assets/{seat-subscription-BhUUz7VL.js.map → seat-subscription-C5uPHBsN.js.map} +1 -1
  508. package/dist/core/web/public/next/assets/{sidebar-model-Dcd437cf.js → sidebar-model-CLCdqwkR.js} +2 -2
  509. package/dist/core/web/public/next/assets/{sidebar-model-Dcd437cf.js.map → sidebar-model-CLCdqwkR.js.map} +1 -1
  510. package/dist/core/web/public/next/assets/{slots-BL_J5mmV.js → slots-C-qBeu-8.js} +3 -3
  511. package/dist/core/web/public/next/assets/{slots-BL_J5mmV.js.map → slots-C-qBeu-8.js.map} +1 -1
  512. package/dist/core/web/public/next/assets/{surface-data-C3UAQ4QX.js → surface-data-Dj71tdD-.js} +2 -2
  513. package/dist/core/web/public/next/assets/{surface-data-C3UAQ4QX.js.map → surface-data-Dj71tdD-.js.map} +1 -1
  514. package/dist/core/web/public/next/assets/surface-prefetch-B0WdJOJG.js +2 -0
  515. package/dist/core/web/public/next/assets/surface-prefetch-B0WdJOJG.js.map +1 -0
  516. package/dist/core/web/public/next/assets/{tasks-model-CzHvclVm.js → tasks-model-O8yR5YXp.js} +2 -2
  517. package/dist/core/web/public/next/assets/{tasks-model-CzHvclVm.js.map → tasks-model-O8yR5YXp.js.map} +1 -1
  518. package/dist/core/web/public/next/assets/{terminal-icons-BwgQTQP0.js → terminal-icons-CoRZq9iO.js} +2 -2
  519. package/dist/core/web/public/next/assets/{terminal-icons-BwgQTQP0.js.map → terminal-icons-CoRZq9iO.js.map} +1 -1
  520. package/dist/core/web/public/next/assets/thread-data-DQB_g66d.js +2 -0
  521. package/dist/core/web/public/next/assets/thread-data-DQB_g66d.js.map +1 -0
  522. package/dist/core/web/public/next/assets/{usage-queries-pXxvy54x.js → usage-queries-AdjEyEtn.js} +2 -2
  523. package/dist/core/web/public/next/assets/{usage-queries-pXxvy54x.js.map → usage-queries-AdjEyEtn.js.map} +1 -1
  524. package/dist/core/web/public/next/assets/{use-guarded-action-EgVWjM5c.js → use-guarded-action-CuuMHeDX.js} +2 -2
  525. package/dist/core/web/public/next/assets/{use-guarded-action-EgVWjM5c.js.map → use-guarded-action-CuuMHeDX.js.map} +1 -1
  526. package/dist/core/web/public/next/assets/{use-ticker-BoqFxRFG.js → use-ticker-BBcp02SZ.js} +2 -2
  527. package/dist/core/web/public/next/assets/{use-ticker-BoqFxRFG.js.map → use-ticker-BBcp02SZ.js.map} +1 -1
  528. package/dist/core/web/public/next/assets/{use-token-gate-DSNIIpI6.js → use-token-gate-CbXVYQYI.js} +2 -2
  529. package/dist/core/web/public/next/assets/{use-token-gate-DSNIIpI6.js.map → use-token-gate-CbXVYQYI.js.map} +1 -1
  530. package/dist/core/web/public/next/assets/{useOnboarding-Bk0VnkxQ.js → useOnboarding-C_Fpe_sH.js} +2 -2
  531. package/dist/core/web/public/next/assets/{useOnboarding-Bk0VnkxQ.js.map → useOnboarding-C_Fpe_sH.js.map} +1 -1
  532. package/dist/core/web/public/next/assets/{useSeatsRefresh-q7Id9RcW.js → useSeatsRefresh-Co1CnxLc.js} +2 -2
  533. package/dist/core/web/public/next/assets/{useSeatsRefresh-q7Id9RcW.js.map → useSeatsRefresh-Co1CnxLc.js.map} +1 -1
  534. package/dist/core/web/public/next/assets/{useVerseTranscript-CqH51rt9.js → useVerseTranscript-DgbigUlV.js} +2 -2
  535. package/dist/core/web/public/next/assets/{useVerseTranscript-CqH51rt9.js.map → useVerseTranscript-DgbigUlV.js.map} +1 -1
  536. package/dist/core/web/public/next/assets/{verse-icons-DsG1dOQx.js → verse-icons-S56hIiXS.js} +2 -2
  537. package/dist/core/web/public/next/assets/{verse-icons-DsG1dOQx.js.map → verse-icons-S56hIiXS.js.map} +1 -1
  538. package/dist/core/web/public/next/assets/verse-model-DAVevkNe.js +2 -0
  539. package/dist/core/web/public/next/assets/{verse-model-JTuvRBVK.js.map → verse-model-DAVevkNe.js.map} +1 -1
  540. package/dist/core/web/public/next/assets/{warmup-Bv1RumVq.js → warmup-B_RAtNZ_.js} +3 -3
  541. package/dist/core/web/public/next/assets/{warmup-Bv1RumVq.js.map → warmup-B_RAtNZ_.js.map} +1 -1
  542. package/dist/core/web/public/next/assets/{why-seat-model-Cau8qG6O.js → why-seat-model-M_r0wX3b.js} +2 -2
  543. package/dist/core/web/public/next/assets/{why-seat-model-Cau8qG6O.js.map → why-seat-model-M_r0wX3b.js.map} +1 -1
  544. package/dist/core/web/public/next/assets/{workspace-model-D-SLfads.js → workspace-model-dji5-Al3.js} +2 -2
  545. package/dist/core/web/public/next/assets/{workspace-model-D-SLfads.js.map → workspace-model-dji5-Al3.js.map} +1 -1
  546. package/dist/core/web/public/next/index.html +1 -1
  547. package/dist/core/web/read-projection-worker.js +2 -1
  548. package/dist/core/web/read-projection-worker.js.map +1 -1
  549. package/dist/core/web/read-projections.d.ts +3 -0
  550. package/dist/core/web/read-projections.js +2 -2
  551. package/dist/core/web/read-projections.js.map +1 -1
  552. package/dist/core/web/visibility.js +3 -4
  553. package/dist/core/web/visibility.js.map +1 -1
  554. package/dist/release-dependency-inventory.json +1 -1
  555. package/package.json +3 -2
  556. package/dist/core/web/public/next/assets/Advanced-cVYTAsfB.js +0 -2
  557. package/dist/core/web/public/next/assets/AppsSection-DDqeSrty.js +0 -2
  558. package/dist/core/web/public/next/assets/AreaTrend-C32rUaxm.js +0 -2
  559. package/dist/core/web/public/next/assets/AreaTrend-C32rUaxm.js.map +0 -1
  560. package/dist/core/web/public/next/assets/AutonomySection-Dwn8UtOy.js +0 -2
  561. package/dist/core/web/public/next/assets/ChartFrame-BVuBe6RP.css +0 -1
  562. package/dist/core/web/public/next/assets/ChartFrame-DK_BDXCt.js +0 -2
  563. package/dist/core/web/public/next/assets/ChartFrame-DK_BDXCt.js.map +0 -1
  564. package/dist/core/web/public/next/assets/ChatSection-C9myY4ei.js +0 -3
  565. package/dist/core/web/public/next/assets/CommandPalette-DzPsth0u.js +0 -2
  566. package/dist/core/web/public/next/assets/CommandPalette-DzPsth0u.js.map +0 -1
  567. package/dist/core/web/public/next/assets/CommandSection-Brp73iox.js +0 -3
  568. package/dist/core/web/public/next/assets/CommandSection-Brp73iox.js.map +0 -1
  569. package/dist/core/web/public/next/assets/CommandSection-CvAVd1w4.css +0 -1
  570. package/dist/core/web/public/next/assets/DockHost-BcEq2qaS.js +0 -2
  571. package/dist/core/web/public/next/assets/FleetSection-BG8iGraG.js +0 -3
  572. package/dist/core/web/public/next/assets/FleetSection-BG8iGraG.js.map +0 -1
  573. package/dist/core/web/public/next/assets/Funnel-B88_wpA4.js +0 -2
  574. package/dist/core/web/public/next/assets/Funnel-B88_wpA4.js.map +0 -1
  575. package/dist/core/web/public/next/assets/GrowthSection-BvZezOsX.js +0 -2
  576. package/dist/core/web/public/next/assets/LeaderCard-BxxiEg4e.js +0 -2
  577. package/dist/core/web/public/next/assets/LeaderCard-BxxiEg4e.js.map +0 -1
  578. package/dist/core/web/public/next/assets/MatrixHeatmap-iPFEU2Tv.js +0 -2
  579. package/dist/core/web/public/next/assets/MatrixHeatmap-iPFEU2Tv.js.map +0 -1
  580. package/dist/core/web/public/next/assets/McpSection-nuXer4K-.js +0 -2
  581. package/dist/core/web/public/next/assets/MindSection-Dc5v5rH3.js +0 -2
  582. package/dist/core/web/public/next/assets/MindSection-Dc5v5rH3.js.map +0 -1
  583. package/dist/core/web/public/next/assets/NeedsYouDrawer-N1cWJjpz.js +0 -3
  584. package/dist/core/web/public/next/assets/NeedsYouDrawer-N1cWJjpz.js.map +0 -1
  585. package/dist/core/web/public/next/assets/NewChatDialog-BqFTWgHU.js +0 -3
  586. package/dist/core/web/public/next/assets/OnboardingGate-BZafM1Vf.js +0 -3
  587. package/dist/core/web/public/next/assets/PreviewPane-zT3gK9TD.js +0 -2
  588. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-CAxPQ4sZ.js +0 -7
  589. package/dist/core/web/public/next/assets/ResourcesChrome-BnhnEdJe.js +0 -3
  590. package/dist/core/web/public/next/assets/ResourcesChrome-BnhnEdJe.js.map +0 -1
  591. package/dist/core/web/public/next/assets/ResourcesDrawer-BAFGodny.js +0 -2
  592. package/dist/core/web/public/next/assets/ResourcesDrawer-BAFGodny.js.map +0 -1
  593. package/dist/core/web/public/next/assets/ResourcesDrawer-BCFJ2Uq8.css +0 -1
  594. package/dist/core/web/public/next/assets/SettingsSection-Bf74l0Gj.js.map +0 -1
  595. package/dist/core/web/public/next/assets/Sidebar-C9YtBYVZ.js +0 -3
  596. package/dist/core/web/public/next/assets/StatTile-BuLMsJMx.css +0 -1
  597. package/dist/core/web/public/next/assets/StatTile-CTX41O6y.js +0 -2
  598. package/dist/core/web/public/next/assets/StatTile-CTX41O6y.js.map +0 -1
  599. package/dist/core/web/public/next/assets/StepBand-jJTqYIdX.js +0 -2
  600. package/dist/core/web/public/next/assets/StepBand-jJTqYIdX.js.map +0 -1
  601. package/dist/core/web/public/next/assets/Swimlane-LrslsGxw.js +0 -2
  602. package/dist/core/web/public/next/assets/Swimlane-LrslsGxw.js.map +0 -1
  603. package/dist/core/web/public/next/assets/Swimlane-o6_Zsrnr.css +0 -1
  604. package/dist/core/web/public/next/assets/UniverseConsoleApp-BpphLqoz.js +0 -2
  605. package/dist/core/web/public/next/assets/UsageSection-CUlaKtws.js +0 -3
  606. package/dist/core/web/public/next/assets/UsageSection-CUlaKtws.js.map +0 -1
  607. package/dist/core/web/public/next/assets/VerseConsoleApp-DXDv1aOi.js +0 -3
  608. package/dist/core/web/public/next/assets/VerseConsoleApp-DXDv1aOi.js.map +0 -1
  609. package/dist/core/web/public/next/assets/Workspace-RXy0pqp6.js +0 -10
  610. package/dist/core/web/public/next/assets/actions-BZTidCXZ.js +0 -2
  611. package/dist/core/web/public/next/assets/actions-BmIf9avl.css +0 -1
  612. package/dist/core/web/public/next/assets/budget-queries-DFF-3ICg.js +0 -2
  613. package/dist/core/web/public/next/assets/charts-CzxWrZn7.js +0 -2
  614. package/dist/core/web/public/next/assets/charts-CzxWrZn7.js.map +0 -1
  615. package/dist/core/web/public/next/assets/charts-DhKTrQLw.css +0 -1
  616. package/dist/core/web/public/next/assets/command-catalog-ffCAijVY.js.map +0 -1
  617. package/dist/core/web/public/next/assets/context-queries-_9bFWb9v.js +0 -2
  618. package/dist/core/web/public/next/assets/global-y_exIyAP.js +0 -2
  619. package/dist/core/web/public/next/assets/guarded-runners-Cd4POBtI.js +0 -2
  620. package/dist/core/web/public/next/assets/mutations-CWlxEMEm.js +0 -2
  621. package/dist/core/web/public/next/assets/primitives-DMijqcu0.js +0 -1
  622. package/dist/core/web/public/next/assets/seat-subscription-BhUUz7VL.js +0 -2
  623. package/dist/core/web/public/next/assets/surface-prefetch-BXKjPsV5.js +0 -2
  624. package/dist/core/web/public/next/assets/surface-prefetch-BXKjPsV5.js.map +0 -1
  625. package/dist/core/web/public/next/assets/verse-model-JTuvRBVK.js +0 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartFrame-DY-GVUb3.js","names":[],"sources":["../../../../../../src/web-ui/components/charts/chart-tokens.css","../../../../../../src/web-ui/components/charts/plot.module.css","../../../../../../src/web-ui/components/charts/ChartParts.tsx","../../../../../../src/web-ui/components/charts/chart-math.ts","../../../../../../src/web-ui/components/charts/motion.ts","../../../../../../src/web-ui/components/charts/useChartWidth.ts","../../../../../../src/web-ui/components/charts/useTextScale.ts","../../../../../../src/web-ui/components/charts/TableView.module.css","../../../../../../src/web-ui/components/charts/TableView.tsx","../../../../../../src/web-ui/components/charts/ChartFrame.module.css","../../../../../../src/web-ui/components/charts/ChartFrame.tsx"],"sourcesContent":["/**\n * components/charts/chart-tokens.css — chart-only aliases over the design\n * tokens (owner: unit C0, with colors.ts; the chart components are C7's).\n * Every value below is `var(--existing-token)`, never a hex: the raw values\n * and their light/dark variants live in design/tokens.css, so theming is\n * inherited and can never drift out of sync with the rest of the app.\n *\n * V3.10 COLOUR ROLES (SPEC-310C §6), one meaning per hue:\n *\n * QUANTITY — `--chart-seq-1..7`, the fixed azure ramp at 214°\n * (tokens.css --data-seq-*). Every magnitude — heat cells, a single\n * nominal series, gauge fills, the positive diverging pole — is azure.\n * It is NEVER the accent: the accent is interaction-only and the\n * operator can drag it to any hue, which used to re-colour every chart\n * (tokens-310.test.ts fails if a data token here points at --accent-*).\n *\n * CATEGORICAL — `--chart-series-1..6` (tokens.css --data-cat-*). Six\n * identity inks chosen to avoid every engine, status and quantity hue,\n * with the validator scores recorded in tokens.css. Order is identity,\n * never rank: a series keeps its slot even when others are filtered out.\n * A seventh series goes to `--chart-neutral` (\"Other\") — colors.ts never\n * cycles, because a repeated colour would say two series are one.\n *\n * UNKNOWN — gray, drawn as a 45° HATCH with an outline, never a solid\n * fill on a data ramp (a solid gray would read as \"zero\" or \"neutral\").\n * `--chart-unknown-hatch` for CSS fills; colors.ts UNKNOWN_HATCH for SVG.\n *\n * QUEUED / PARKED — a neutral OUTLINE with no fill (Fleet Gantt, Swimlane).\n *\n * ENGINES — identity only, and only in charts that show nothing else\n * (runs by engine, usage bars); passed explicitly via colors.ts\n * engineColor(), never picked by index.\n *\n * STATUS — unchanged; always travels with a text label.\n *\n * Mandatory secondary encoding (direct or legend labels, and the TableView\n * twin every chart has) stays in place whatever the palette scores — colour\n * is never the only carrier of meaning.\n */\n:root {\n /* Categorical identity (fixed order; see tokens.css for the derivation). */\n --chart-series-1: var(--data-cat-1); /* steel */\n --chart-series-2: var(--data-cat-2); /* olive */\n --chart-series-3: var(--data-cat-3); /* wine */\n --chart-series-4: var(--data-cat-4); /* purple */\n --chart-series-5: var(--data-cat-5); /* green */\n --chart-series-6: var(--data-cat-6); /* pink */\n\n /* Overflow \"Other\" bucket — never part of the identity rotation above. */\n --chart-neutral: var(--status-neutral-solid);\n\n /* Quantity: the fixed azure ramp, low → high. */\n --chart-seq-1: var(--data-seq-1);\n --chart-seq-2: var(--data-seq-2);\n --chart-seq-3: var(--data-seq-3);\n --chart-seq-4: var(--data-seq-4);\n --chart-seq-5: var(--data-seq-5);\n --chart-seq-6: var(--data-seq-6);\n --chart-seq-7: var(--data-seq-7);\n\n /* The single hue for magnitude and for one nominal series (one series\n needs no legend box — it takes this colour and a direct label). */\n --chart-sequential: var(--chart-seq-5);\n --chart-sequential-soft: var(--chart-seq-3);\n\n /* Diverging pair around a neutral midpoint: azure reads \"up / better\",\n danger reads \"down / worse\" (ForestPlot effect sizes, deltas). */\n --chart-diverging-pos: var(--chart-seq-5);\n --chart-diverging-neg: var(--status-danger-solid);\n --chart-diverging-mid: var(--border-strong);\n\n /* Unknown: gray, hatched at 45°, outlined. */\n --chart-unknown: var(--status-unknown-solid);\n --chart-unknown-hatch: repeating-linear-gradient(135deg, var(--chart-unknown) 0 1px, transparent 1px 5px);\n\n /* Queued / parked: an outline, no fill. */\n --chart-queued-outline: var(--status-neutral-solid);\n\n /* Chart chrome — hairline grid/axis, one step off the surface. */\n --chart-grid: var(--border-subtle);\n --chart-axis: var(--border-strong);\n --chart-surface: var(--bg-surface);\n --chart-tooltip-bg: var(--bg-surface-raised);\n --chart-tooltip-border: var(--border-default);\n\n /* Heat (CalendarHeatmap, MatrixHeatmap): four steps of the quantity ramp.\n Step 0 is a TRUE ZERO; \"no data\" is the unknown hatch or an outlined\n empty cell, never a colour on this ramp. */\n --chart-heat-0: var(--chart-grid);\n --chart-heat-1: var(--chart-seq-2);\n --chart-heat-2: var(--chart-seq-3);\n --chart-heat-3: var(--chart-seq-5);\n --chart-heat-4: var(--chart-seq-7);\n\n /* Gauge/meter track: the lightest step of the fill's own ramp. */\n --chart-track: var(--chart-seq-1);\n\n /* Ink for a number printed on a NEAR-surface quantity cell (colors.ts\n quantityInk, steps 1–4). The END of the gray ramp, not --text-primary:\n the two are the same #09090b in light, but in dark --text-primary is\n #f4f4f5, which measured 4.49:1 on --chart-seq-4 (rgb 31 110 214) — just\n under AA for 12 px digits. --gray-950 flips to #fafafa there: 4.72:1.\n Asserted per step and theme in charts/chart-contrast.test.ts. */\n --chart-quantity-ink: var(--gray-950);\n}\n","/* Shared plot chrome for the V3.10 charts: recessive hairline grid/axes,\n text in text tokens (never the series colour), one tooltip style. */\n.plotWrap {\n position: relative;\n width: 100%;\n min-width: 0;\n}\n\n.svg {\n display: block;\n overflow: visible;\n max-width: 100%;\n /* Every number drawn in a plot — ticks, direct labels, funnel counts —\n aligns digit for digit (inherited by each <text>). */\n font-variant-numeric: tabular-nums;\n}\n\n.grid {\n stroke: var(--chart-grid);\n stroke-width: 1;\n shape-rendering: crispEdges;\n}\n\n.axis {\n stroke: var(--chart-axis);\n stroke-width: 1;\n shape-rendering: crispEdges;\n}\n\n.tick {\n font-family: var(--font-ui);\n font-size: var(--text-xs-size);\n fill: var(--text-tertiary);\n font-variant-numeric: tabular-nums;\n}\n\n.label {\n font-family: var(--font-ui);\n font-size: var(--text-xs-size);\n fill: var(--text-secondary);\n}\n\n.labelStrong {\n font-family: var(--font-ui);\n font-size: var(--text-xs-size);\n font-weight: var(--font-weight-medium);\n fill: var(--text-primary);\n}\n\n.line {\n fill: none;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.wash {\n stroke: none;\n opacity: 0.1;\n}\n\n.reference {\n fill: none;\n stroke: var(--text-tertiary);\n stroke-width: 1;\n stroke-dasharray: 4 3;\n}\n\n.projection {\n fill: none;\n stroke-width: 2;\n stroke-dasharray: 5 4;\n stroke-linecap: round;\n}\n\n.marker {\n stroke: var(--chart-surface);\n stroke-width: 2;\n}\n\n.crosshair {\n stroke: var(--chart-axis);\n stroke-width: 1;\n shape-rendering: crispEdges;\n pointer-events: none;\n}\n\n/* The gradient wash under a line (fill is url(#AreaGradient)). */\n.area {\n stroke: none;\n}\n\n/* The hovered / focused column's slot, behind its bars (BarStack). */\n.hoverBand {\n fill: var(--bg-hover);\n pointer-events: none;\n}\n\n/* BurnDown: the reserve kept for interactive use, as a band from empty up\n to the reserve line — the region autonomy must stay out of, not just a\n line to squint at. The line and its label still carry the meaning. */\n.reserveBand {\n fill: var(--status-warning-bg);\n pointer-events: none;\n}\n\n/* \"Now\" on a time window: a quiet dashed rule with its label. */\n.now {\n stroke: var(--text-tertiary);\n stroke-width: 1;\n stroke-dasharray: 2 3;\n shape-rendering: crispEdges;\n pointer-events: none;\n}\n\n/* The last reading's dot: a ring of surface around the series ink. */\n.endDot {\n stroke: var(--chart-surface);\n stroke-width: 2;\n}\n\n.hit {\n fill: transparent;\n cursor: default;\n}\n\n.hit:focus {\n outline: none;\n}\n\n.hit:focus-visible {\n stroke: var(--border-focus);\n stroke-width: 2;\n}\n\n.focusable:focus {\n outline: none;\n}\n\n.focusable:focus-visible {\n outline: 2px solid var(--border-focus);\n outline-offset: 2px;\n border-radius: var(--radius-sm);\n}\n\n.track {\n fill: var(--chart-track);\n}\n\n/* V3.10.1 — the empty part of a bar that is a share of something (Funnel):\n NEUTRAL, because the azure --chart-track reads as \"a little\" — at zero a\n whole row of it read as 100%. It is the app's empty-meter token, not the\n heat-0 hairline gray it first borrowed: that measured 1.18:1 / 1.14:1 on\n the card, so a zero stage was blank space and a bar's length had nothing\n to be read against. --meter-track is 1.83:1 light / 2.06:1 dark (the\n floor tokens.css holds an empty meter to) while the azure fill stays\n 2.66:1 / 2.50:1 against it — a 3:1 track would cut that data edge to\n ~1.6:1, and each stage's count and rate are printed beside its bar.\n Asserted in charts/chart-contrast.test.ts. */\n.trackEmpty {\n fill: var(--meter-track);\n}\n\n.noData {\n fill: none;\n stroke: var(--chart-grid);\n stroke-width: 1;\n stroke-dasharray: 2 2;\n}\n\n.tooltip {\n position: absolute;\n z-index: var(--z-dropdown);\n pointer-events: none;\n transform: translate(-50%, calc(-100% - 8px));\n min-width: 140px;\n padding: var(--space-2) var(--space-3);\n border: 1px solid var(--chart-tooltip-border);\n border-radius: var(--radius-md);\n background: var(--chart-tooltip-bg);\n box-shadow: var(--shadow-menu);\n color: var(--text-primary);\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n /* Opacity only: `transform` is the positioning. The duration token\n collapses to 1 ms under reduced motion. */\n animation: chart-tooltip-in var(--duration-fast) var(--ease-decelerate);\n}\n\n/* Beside the crosshair, inside the plot (ChartParts tooltipSide). */\n.tooltipRight {\n transform: translate(12px, 0);\n}\n\n.tooltipLeft {\n transform: translate(calc(-100% - 12px), 0);\n}\n\n@keyframes chart-tooltip-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n.tooltipTitle {\n color: var(--text-tertiary);\n font-weight: var(--font-weight-medium);\n margin-bottom: var(--space-1);\n}\n\n.tooltipRow {\n display: flex;\n align-items: center;\n gap: var(--space-2);\n min-height: calc(var(--text-xs-line) + 2px);\n}\n\n.tooltipLabel {\n color: var(--text-secondary);\n}\n\n/* A summary row (Total): a hairline above, the label at full ink. */\n.tooltipTotal {\n margin-top: var(--space-1);\n padding-top: var(--space-1);\n border-top: 1px solid var(--border-subtle);\n}\n\n.tooltipTotal .tooltipLabel {\n color: var(--text-primary);\n font-weight: var(--font-weight-medium);\n}\n\n.tooltipKey {\n width: 8px;\n height: 8px;\n border-radius: 2px;\n flex: none;\n}\n\n/* A line series' key: the stroke it is drawn with, not a filled square. */\n.tooltipKeyLine {\n width: 10px;\n height: 2px;\n border-radius: 1px;\n flex: none;\n}\n\n.tooltipValue {\n margin-left: auto;\n padding-left: var(--space-3);\n font-weight: var(--font-weight-semibold);\n font-variant-numeric: tabular-nums;\n}\n\n.tooltipMuted {\n color: var(--text-tertiary);\n font-style: italic;\n}\n\n.legend {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-1) var(--space-3);\n margin: var(--space-2) 0 0;\n padding: 0;\n list-style: none;\n font-size: var(--text-xs-size);\n color: var(--text-secondary);\n}\n\n.legendItem {\n display: inline-flex;\n align-items: center;\n gap: var(--space-1);\n}\n\n.swatch {\n width: 10px;\n height: 10px;\n border-radius: 2px;\n flex: none;\n}\n\n.swatchLine {\n width: 12px;\n height: 2px;\n flex: none;\n}\n\n.swatchEmpty {\n width: 10px;\n height: 10px;\n border-radius: 2px;\n flex: none;\n border: 1px dashed var(--chart-axis);\n}\n\n.note {\n margin: var(--space-2) 0 0;\n font-size: var(--text-xs-size);\n color: var(--text-tertiary);\n}\n\n.srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n/* ---------------------------------------------------------------------------\n Entrance (verse-visual-quality) — once, on mount, never on hover or refetch.\n Keyed off the plot wrapper's data-motion=\"enter\", which motion.ts only\n writes when neither Settings (data-motion=\"reduce\" on <html>) nor the OS\n asks for reduced motion. Durations are the motion tokens, so they also\n collapse to ~1 ms under reduced motion (the entrance is three times the\n slow token: long enough to read as a line being drawn); the media block\n below is the same\n two-trigger guard as the skeleton shimmer in design/global.css.\n ------------------------------------------------------------------------- */\n\n/* A solid line draws itself left to right (the path carries pathLength=1). */\n[data-motion='enter'] .draw {\n animation: chart-draw calc(var(--duration-slow) * 3) var(--ease-decelerate) both;\n}\n\n/* A wash, a band or a label fades up just behind the line. */\n[data-motion='enter'] .fadeIn {\n animation: chart-fade calc(var(--duration-slow) * 3) var(--ease-standard) both;\n animation-delay: var(--duration-fast);\n}\n\n/* Columns rise from the baseline, staggered by --chart-i (their index). */\n[data-motion='enter'] .rise {\n transform-box: fill-box;\n transform-origin: 50% 100%;\n animation: chart-rise calc(var(--duration-slow) * 3) var(--ease-decelerate) both;\n animation-delay: calc(var(--chart-i, 0) * var(--duration-instant) / 5);\n}\n\n/* Horizontal bars (Funnel stages) grow from their start edge. */\n[data-motion='enter'] .grow {\n transform-box: fill-box;\n transform-origin: 0 50%;\n animation: chart-grow calc(var(--duration-slow) * 3) var(--ease-decelerate) both;\n animation-delay: calc(var(--chart-i, 0) * var(--duration-instant) / 2);\n}\n\n@keyframes chart-draw {\n /* 1.02, not 1: at exactly 1 a round cap still paints a dot at the start. */\n from {\n stroke-dasharray: 1 1;\n stroke-dashoffset: 1.02;\n }\n to {\n stroke-dasharray: 1 1;\n stroke-dashoffset: 0;\n }\n}\n\n@keyframes chart-fade {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes chart-rise {\n from {\n transform: scaleY(0);\n }\n to {\n transform: scaleY(1);\n }\n}\n\n@keyframes chart-grow {\n from {\n transform: scaleX(0);\n }\n to {\n transform: scaleX(1);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n :global(:root:not([data-motion='full'])) .draw,\n :global(:root:not([data-motion='full'])) .fadeIn,\n :global(:root:not([data-motion='full'])) .rise,\n :global(:root:not([data-motion='full'])) .grow,\n :global(:root:not([data-motion='full'])) .tooltip,\n :global(:root:not([data-motion='full'])) .skeleton {\n animation: none;\n }\n}\n\n:global(:root[data-motion='reduce']) .draw,\n:global(:root[data-motion='reduce']) .fadeIn,\n:global(:root[data-motion='reduce']) .rise,\n:global(:root[data-motion='reduce']) .grow,\n:global(:root[data-motion='reduce']) .tooltip,\n:global(:root[data-motion='reduce']) .skeleton {\n animation: none;\n}\n\n/* ---------------------------------------------------------------------------\n Loading skeleton (ChartParts ChartSkeleton) — the final chart's outline in\n the neutral hover tint, breathing slowly; static under reduced motion.\n ------------------------------------------------------------------------- */\n.skeleton {\n display: block;\n animation: chart-skeleton-pulse 1.6s var(--ease-standard) infinite;\n}\n\n.skeletonMark {\n fill: var(--bg-active);\n}\n\n.skeletonTrack {\n fill: var(--bg-hover);\n}\n\n.skeletonGrid {\n stroke: var(--chart-grid);\n stroke-width: 1;\n vector-effect: non-scaling-stroke;\n shape-rendering: crispEdges;\n}\n\n@keyframes chart-skeleton-pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.55;\n }\n}\n\n/* V3.10 — engine monogram beside a lane label (EngineTick). */\n.monogram {\n font-family: var(--font-display);\n font-size: var(--text-2xs-size);\n font-weight: var(--font-weight-semibold);\n fill: var(--text-secondary);\n /* 3.11.1: the tick draws a provider mark (nested svg, currentColor). */\n color: var(--text-secondary);\n}\n\n/* V3.10 — an unknown mark: hatch fill (set inline via url(#id)) + outline. */\n.unknownMark {\n stroke: var(--chart-unknown);\n stroke-width: 1;\n}\n\n/* A swatch in a legend that stands for \"unknown / not measured\". */\n.swatchHatch {\n width: 10px;\n height: 10px;\n border-radius: 2px;\n flex: none;\n border: 1px solid var(--chart-unknown);\n background: var(--chart-unknown-hatch);\n}\n\n/* Text laid over the plot (reference labels): a surface-coloured halo keeps it\n legible where it crosses a line, in both themes. */\n.halo {\n paint-order: stroke;\n stroke: var(--chart-surface);\n stroke-width: 3px;\n stroke-linejoin: round;\n}\n","/**\n * components/charts/ChartParts.tsx — small shared pieces of the V3.10 charts:\n * the legend list, the tooltip, the unknown hatch, the engine tick, the area\n * gradient and the shaped loading skeleton.\n * Identity is never colour alone: every swatch sits beside its text label,\n * and text always wears text tokens.\n */\nimport type { ReactNode } from 'react';\nimport { UNKNOWN_HATCH, engineColor, type ChartEngine } from './colors.js';\nimport plot from './plot.module.css';\nimport { ProviderLogo } from '../primitives/ProviderLogo.js';\n\nexport interface ChartLegendItem {\n label: string;\n color?: string;\n /** `hatch` = the unknown texture (not measured), never a colour. */\n kind?: 'swatch' | 'line' | 'empty' | 'hatch';\n}\n\n/** Renders nothing for fewer than `min` items (a lone series is named by the title). */\nexport function ChartLegend({ items, min = 2 }: { items: ChartLegendItem[]; min?: number }): ReactNode {\n if (items.length < min) return null;\n return (\n <ul className={plot.legend}>\n {items.map((item) => (\n <li key={item.label} className={plot.legendItem}>\n <span\n aria-hidden=\"true\"\n className={\n item.kind === 'line' ? plot.swatchLine : item.kind === 'empty' ? plot.swatchEmpty : item.kind === 'hatch' ? plot.swatchHatch : plot.swatch\n }\n style={item.kind === 'empty' || item.kind === 'hatch' ? undefined : { background: item.color }}\n />\n {item.label}\n </li>\n ))}\n </ul>\n );\n}\n\nexport interface TooltipRow {\n key: string;\n label: string;\n value: string | null;\n color?: string;\n /** The key's shape: a short stroke for a line series, a square for a filled mark (default). */\n kind?: 'line' | 'swatch';\n /** A summary row (Total): set apart by a hairline above it. */\n total?: boolean;\n}\n\n/**\n * Positioned in the plot's own pixel space (the plot wrapper is\n * position:relative). `left` is clamped by the caller so it never overflows.\n * The title is the exact moment or category (local time on a time axis —\n * format.ts tooltipTimeFormatter); values are the exact figures, never the\n * axis's rounded tick. Presentation only: the same text reaches a screen\n * reader through each chart's live region, and the Table twin.\n */\nexport function ChartTooltip({\n left,\n top,\n title,\n rows,\n side,\n}: {\n left: number;\n top: number;\n title: string;\n rows: TooltipRow[];\n /**\n * Beside the crosshair instead of centred above the mark: `right` / `left`\n * of `left`, top-aligned at `top` INSIDE the plot (tooltipSide picks one).\n * A time series uses this so the tooltip never covers the card's title or\n * the point being read, and is never clipped by a scrolling container.\n */\n side?: 'left' | 'right';\n}) {\n const cls = side === 'right' ? `${plot.tooltip} ${plot.tooltipRight}` : side === 'left' ? `${plot.tooltip} ${plot.tooltipLeft}` : plot.tooltip;\n return (\n <div className={cls} style={{ left, top }} role=\"presentation\" data-chart-tooltip={side ?? 'above'}>\n <div className={plot.tooltipTitle}>{title}</div>\n {rows.map((row) => (\n <div key={row.key} className={row.total ? `${plot.tooltipRow} ${plot.tooltipTotal}` : plot.tooltipRow}>\n {row.color ? (\n <span\n className={row.kind === 'line' ? plot.tooltipKeyLine : plot.tooltipKey}\n style={{ background: row.color }}\n aria-hidden=\"true\"\n />\n ) : null}\n <span className={plot.tooltipLabel}>{row.label}</span>\n {row.value === null ? (\n <span className={`${plot.tooltipValue} ${plot.tooltipMuted}`}>no data</span>\n ) : (\n <span className={plot.tooltipValue}>{row.value}</span>\n )}\n </div>\n ))}\n </div>\n );\n}\n\n/** Estimated width of a tooltip, for choosing its side (it grows with its rows' text). */\nconst TOOLTIP_EST_W = 172;\nconst TOOLTIP_GAP = 12;\n\n/**\n * Which side of the crosshair at `x` a tooltip fits on in a `width`-wide plot:\n * right while it fits, else left, else undefined (centred above, clamped).\n */\nexport function tooltipSide(x: number, width: number, estimate = TOOLTIP_EST_W): 'left' | 'right' | undefined {\n if (x + TOOLTIP_GAP + estimate <= width) return 'right';\n if (x - TOOLTIP_GAP - estimate >= 0) return 'left';\n return undefined;\n}\n\n/** Keep a centred tooltip inside [margin, width - margin]. */\nexport function clampTooltipLeft(x: number, width: number, margin = 70): number {\n return Math.min(Math.max(x, Math.min(margin, width / 2)), Math.max(width - margin, width / 2));\n}\n\n// ---------------------------------------------------------------------------\n// Unknown hatch (V3.10) — one <pattern> per chart instance\n// ---------------------------------------------------------------------------\n\n/**\n * The 45° unknown hatch as an SVG <pattern>. Render it inside the chart's own\n * <svg><defs> with an id from `hatchPatternId(useId())` (colors.ts) — ids are\n * document-global, so a shared literal id would let one chart's unmount blank\n * another's hatch — then fill unknown marks with `url(#id)` and outline them\n * with CHART_UNKNOWN. Texture, not hue, is what separates \"not measured\" from\n * a low value, so it survives colour-blindness and greyscale print.\n */\nexport function HatchPattern({ id }: { id: string }) {\n const { size, angle, strokeWidth, stroke } = UNKNOWN_HATCH;\n return (\n <pattern id={id} width={size} height={size} patternUnits=\"userSpaceOnUse\" patternTransform={`rotate(${angle})`}>\n <line x1={0} y1={0} x2={0} y2={size} stroke={stroke} strokeWidth={strokeWidth} />\n </pattern>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Engine identity (V3.10) — a 2px tick plus a one-letter monogram\n// ---------------------------------------------------------------------------\n\nconst ENGINE_LETTER: Readonly<Record<ChartEngine, string>> = { claude: 'C', codex: 'X', grok: 'G', local: 'L' };\n\n/** The monogram letter for an engine (mirrors workbench-types ENGINE_MONOGRAM; charts stay core-free). */\nexport function engineLetter(engine: ChartEngine): string {\n return ENGINE_LETTER[engine];\n}\n\n/**\n * SVG engine mark for a lane label: the 2px identity tick and the provider's\n * mark (3.11.1, ProviderLogo). The engine's NAME still travels in the lane's\n * spoken summary and the table — the mark is a glance aid only.\n */\nexport function EngineTick({ engine, x, y, height }: { engine: ChartEngine; x: number; y: number; height: number }) {\n return (\n <g data-engine={engine} aria-hidden=\"true\">\n <rect x={x} y={y} width={2} height={height} rx={1} fill={engineColor(engine)} />\n <ProviderLogo engine={engine} x={x + 5} y={y + height / 2 - 6} size={12} className={plot.monogram} />\n </g>\n );\n}\n\n/** A quiet ⋯ glyph (three dots), currentColor, 16px. */\nexport function MoreGlyph() {\n return (\n <svg width={16} height={16} viewBox=\"0 0 16 16\" aria-hidden=\"true\" focusable=\"false\">\n <circle cx={3.5} cy={8} r={1.4} fill=\"currentColor\" />\n <circle cx={8} cy={8} r={1.4} fill=\"currentColor\" />\n <circle cx={12.5} cy={8} r={1.4} fill=\"currentColor\" />\n </svg>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Area gradient (verse-visual-quality)\n// ---------------------------------------------------------------------------\n\n/**\n * The wash under a line: the series' own ink fading from `from` opacity at\n * the top of the plot to nothing at the baseline. Replaces the flat 10%\n * wash: the line stays the strongest mark (it IS the data) while the fill\n * still says \"area = volume\", and it reads the same in both themes because\n * the stop colour is the series token itself. Render once per series inside\n * the chart's own <defs>, with an id from `gradientId(useId(), key)` —\n * document-global ids, same reason as the hatch.\n *\n * `userSpaceOnUse`, pinned to the plot's top and baseline rather than each\n * path's bounding box: two series then fade on ONE scale, so a small series\n * is not painted as darkly as a large one.\n */\nexport function AreaGradient({ id, color, top, bottom, from = 0.22 }: { id: string; color: string; top: number; bottom: number; from?: number }) {\n return (\n <linearGradient id={id} gradientUnits=\"userSpaceOnUse\" x1={0} x2={0} y1={top} y2={bottom} data-area-gradient=\"\">\n <stop offset=\"0%\" style={{ stopColor: color, stopOpacity: from }} />\n <stop offset=\"65%\" style={{ stopColor: color, stopOpacity: from * 0.3 }} />\n <stop offset=\"100%\" style={{ stopColor: color, stopOpacity: 0 }} />\n </linearGradient>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Loading skeletons (verse-visual-quality)\n// ---------------------------------------------------------------------------\n\n/** The outline a loading chart holds, so the card does not jump when data lands. */\nexport type ChartSkeletonShape = 'line' | 'bars' | 'lanes' | 'funnel' | 'heat' | 'gauge';\n\n/* Deterministic placeholder \"data\" — never random, so a skeleton is the same\n on every render and in every test. */\nconst SKELETON_BARS = [0.42, 0.58, 0.35, 0.7, 0.52, 0.8, 0.46, 0.64, 0.55, 0.74, 0.5, 0.62];\nconst SKELETON_LINE = [0.55, 0.6, 0.48, 0.52, 0.4, 0.46, 0.36, 0.42, 0.3, 0.34, 0.28];\nconst SKELETON_W = 600;\n\nfunction skeletonBody(shape: ChartSkeletonShape, H: number): ReactNode {\n const W = SKELETON_W;\n const grid = [0.25, 0.5, 0.75].map((f) => (\n <line key={`g${f}`} className={plot.skeletonGrid} x1={0} x2={W} y1={H * f} y2={H * f} />\n ));\n switch (shape) {\n case 'bars': {\n const slot = W / SKELETON_BARS.length;\n return (\n <>\n {grid}\n {SKELETON_BARS.map((f, i) => (\n <rect key={i} className={plot.skeletonMark} x={i * slot + slot * 0.25} width={slot * 0.5} y={H - H * f * 0.9} height={H * f * 0.9} rx={3} />\n ))}\n </>\n );\n }\n case 'lanes': {\n const rows = Math.max(2, Math.min(6, Math.floor(H / 32)));\n const rowH = H / rows;\n return Array.from({ length: rows }, (_, i) => (\n <g key={i}>\n <rect className={plot.skeletonMark} x={0} y={i * rowH + rowH * 0.3} width={90} height={rowH * 0.4} rx={3} />\n <rect className={plot.skeletonMark} x={130 + ((i * 97) % 180)} y={i * rowH + rowH * 0.25} width={120 + ((i * 53) % 200)} height={rowH * 0.5} rx={3} />\n </g>\n ));\n }\n case 'funnel': {\n const rows = 5;\n const rowH = H / rows;\n return Array.from({ length: rows }, (_, i) => (\n <g key={i}>\n <rect className={plot.skeletonTrack} x={140} y={i * rowH + rowH * 0.2} width={W - 240} height={rowH * 0.6} rx={4} />\n <rect className={plot.skeletonMark} x={140} y={i * rowH + rowH * 0.2} width={(W - 240) * (1 - i * 0.18)} height={rowH * 0.6} rx={4} />\n </g>\n ));\n }\n case 'heat': {\n const cols = 20;\n const rows = 7;\n const cw = W / cols;\n const ch = H / rows;\n return Array.from({ length: cols * rows }, (_, i) => (\n <rect\n key={i}\n className={(i * 7) % 5 === 0 ? plot.skeletonMark : plot.skeletonTrack}\n x={(i % cols) * cw + 1.5}\n y={Math.floor(i / cols) * ch + 1.5}\n width={cw - 3}\n height={ch - 3}\n rx={2}\n />\n ));\n }\n case 'gauge':\n return <circle className={plot.skeletonMark} cx={W / 2} cy={H / 2} r={H / 2} />;\n case 'line':\n default: {\n const step = W / (SKELETON_LINE.length - 1);\n const top = SKELETON_LINE.map((f, i) => `${i === 0 ? 'M' : 'L'}${i * step},${H * f}`).join(' ');\n return (\n <>\n {grid}\n <path className={plot.skeletonMark} d={`${top} L${W},${H} L0,${H} Z`} />\n </>\n );\n }\n }\n}\n\n/**\n * A placeholder in the final chart's shape and height — gridlines where the\n * gridlines will be, columns where columns will be, lanes where lanes will\n * be — in the neutral hover tint, with a slow pulse that stops under reduced\n * motion. Presentation only (aria-hidden): ChartFrame announces \"Loading…\".\n */\nexport function ChartSkeleton({ shape = 'line', height = 200 }: { shape?: ChartSkeletonShape; height?: number }) {\n const H = Math.max(48, height);\n return (\n <svg\n className={plot.skeleton}\n data-chart-skeleton={shape}\n width=\"100%\"\n height={H}\n viewBox={`0 0 ${SKELETON_W} ${H}`}\n preserveAspectRatio={shape === 'gauge' ? 'xMidYMid meet' : 'none'}\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n {skeletonBody(shape, H)}\n </svg>\n );\n}\n","/**\n * components/charts/chart-math.ts — the pure geometry and statistics behind\n * the V3.10 chart kit (AreaTrend, BarStack, Swimlane, Funnel, CalendarHeatmap,\n * BurnDown, Gauge). No React, no DOM: every function here is unit tested\n * directly, so a chart component is only layout glue around numbers that are\n * already proven.\n *\n * Honesty rule shared with types.ts: `null` is UNKNOWN and is never coerced to\n * 0 by anything in this file. Functions that need a number skip nulls and say\n * so in their return value.\n */\nimport { formatTick, tickUnit } from './format.js';\n\n// ---------------------------------------------------------------------------\n// Scales and ticks\n// ---------------------------------------------------------------------------\n\nexport interface NiceTickOptions {\n /**\n * The data are whole counts: ticks land on integers only (a max of 1 run\n * gives 0 and 1, never 0 / 0.25 / 0.5 / 0.75 / 1 of a run).\n */\n integer?: boolean;\n /**\n * Never step finer than this (pass a power of ten). axisTicks raises it\n * one decade at a time to reach a resolution a caller's formatter can\n * print — 0.01 for a two-decimal \"$\" formatter — before it ever resorts\n * to integer ticks.\n */\n minStep?: number;\n}\n\n/**\n * \"Nice\" axis ticks: a step of 1, 2 or 5 × 10^n (and 25 × 10^n from 25 up)\n * chosen so there are about `count` intervals, starting at or below `min`\n * and ending at or above `max`. Clean numbers (0 / 250 / 500), never\n * 0 / 233.3 / 466.7.\n *\n * V3.10.1: a 2.5 step is only taken where it stays a whole number (25, 250,\n * …). 0.25 or 2.5 needs one more decimal than its magnitude, and every\n * one-decimal formatter in the app printed a 0–1 axis as\n * \"0 / 0.3 / 0.5 / 0.8 / 1\" — 0.2 steps say the same thing in clean numbers.\n */\nexport function niceTicks(min: number, max: number, count = 4, opts: NiceTickOptions = {}): number[] {\n if (!Number.isFinite(min) || !Number.isFinite(max)) return [0];\n if (max < min) [min, max] = [max, min];\n if (max === min) {\n if (max === 0) return [0, 1];\n const pad = Math.abs(max) * 0.5;\n return niceTicks(Math.min(0, min - pad), max + pad, count, opts);\n }\n const rawStep = (max - min) / Math.max(1, count);\n const magnitude = 10 ** Math.floor(Math.log10(rawStep));\n const residual = rawStep / magnitude;\n const allowQuarter = magnitude >= 10;\n const nice = residual <= 1 ? 1 : residual <= 2 ? 2 : residual <= 2.5 ? (allowQuarter ? 2.5 : 2) : residual <= 5 ? 5 : 10;\n let step = nice * magnitude;\n if (opts.integer && step < 1) step = 1;\n if (opts.minStep !== undefined && Number.isFinite(opts.minStep) && step < opts.minStep) step = opts.minStep;\n const start = Math.floor(min / step) * step;\n const end = Math.ceil(max / step) * step;\n const n = Math.round((end - start) / step);\n // Round away float drift (0.1 + 0.2) so labels stay clean; index-based so\n // the error never accumulates across a long axis.\n const decimals = Math.max(0, -Math.floor(Math.log10(step)) + 1);\n const ticks: number[] = [];\n for (let i = 0; i <= n; i++) ticks.push(Number((start + i * step).toFixed(decimals)) || 0);\n return ticks;\n}\n\n/** True when every value is a whole number — counts, not measurements. */\nexport function allIntegers(values: ReadonlyArray<number>): boolean {\n return values.every((v) => Number.isInteger(v));\n}\n\n/**\n * Does a caller's tick formatter print these ticks honestly? A formatter\n * that rounds (`${Math.round(v)}%`, one decimal, \"13K\") can print two ticks\n * the same, or print 0.25 as \"0.3\". Each label's first number must equal\n * its tick up to a power-of-ten unit change (50 % of 0.5, 12.5K of 12500);\n * labels with no number in them are taken at their word.\n */\nexport function labelsFaithful(ticks: ReadonlyArray<number>, labels: ReadonlyArray<string>): boolean {\n if (new Set(labels).size !== labels.length) return false;\n return ticks.every((tick, i) => {\n if (tick === 0) return true;\n const match = /\\d[\\d,]*(?:\\.\\d+)?/.exec(labels[i] ?? '');\n if (!match) return true;\n const shown = Number(match[0].replace(/,/g, ''));\n if (!Number.isFinite(shown) || shown === 0) return false;\n const ratio = shown / Math.abs(tick);\n const unit = 10 ** Math.round(Math.log10(ratio));\n return Math.abs(ratio / unit - 1) < 1e-6;\n });\n}\n\nexport interface AxisTicks {\n ticks: number[];\n labels: string[];\n step: number;\n}\n\n/**\n * Ticks AND their labels for a numeric axis. With no `format` the labels\n * take their precision from the step and share ONE unit, chosen from the\n * largest tick (format.ts tickUnit / formatTick). With a caller's `format`\n * (units: \"%\", \"$\", \"pts\") the ticks are coarsened until that formatter\n * prints every one of them faithfully — never a rounded label on a precise\n * tick.\n *\n * Coarsening order (V3.10.1 review): fewer ticks at the same resolution,\n * then one decade coarser at a time, and integer ticks only as the last\n * resort. Jumping straight to integers put a day of spend under half a cent\n * on a $0.00–$1.00 axis (the line drawn ~0.6 px off the baseline, reading as\n * a flat zero) when a $0.01 step prints faithfully.\n */\nexport function axisTicks(\n min: number,\n max: number,\n opts: { count?: number; integer?: boolean; format?: (v: number) => string } = {},\n): AxisTicks {\n const count = Math.max(1, opts.count ?? 4);\n const integer = opts.integer === true;\n const format = opts.format;\n const build = (c: number, asInteger: boolean, minStep?: number): AxisTicks => {\n const ticks = niceTicks(min, max, c, { integer: asInteger, minStep });\n const step = ticks.length > 1 ? ticks[1]! - ticks[0]! : 1;\n // One argument only: formatPercent(v, digits) must never get an index.\n if (format) return { ticks, labels: ticks.map((t) => format(t)), step };\n const unit = tickUnit(ticks, step);\n return { ticks, labels: ticks.map((t) => formatTick(t, step, unit)), step };\n };\n const first = build(count, integer);\n if (!opts.format || labelsFaithful(first.ticks, first.labels)) return first;\n if (!Number.isFinite(min) || !Number.isFinite(max) || !(first.step > 0)) return first;\n const faithfulAt = (asInteger: boolean, minStep?: number): AxisTicks | null => {\n for (let c = count; c >= 1; c--) {\n const candidate = build(c, asInteger, minStep);\n if (labelsFaithful(candidate.ticks, candidate.labels)) return candidate;\n }\n return null;\n };\n const sameResolution = faithfulAt(integer);\n if (sameResolution) return sameResolution;\n // One decade coarser at a time, up to ten times the data's own extent (a\n // step past that only draws the data flatter; the integer pass follows).\n const extent = Math.max(Math.abs(min), Math.abs(max), 1);\n for (let decade = Math.floor(Math.log10(first.step)) + 1; 10 ** decade <= extent * 10; decade++) {\n const coarser = faithfulAt(integer, Number((10 ** decade).toPrecision(1)));\n if (coarser) return coarser;\n }\n return faithfulAt(true) ?? first;\n}\n\n/**\n * What a formatter's \"%\" means: 100 when it prints 50 as \"50%\" (values are\n * percent points), 1 when it prints 0.5 as \"50%\" (values are fractions),\n * null when it is not a percent formatter at all.\n */\nexport function percentScale(format: (v: number) => string): 100 | 1 | null {\n const asPercent = (v: number): number | null => {\n const s = format(v).trim();\n if (!s.endsWith('%')) return null;\n const n = Number(s.slice(0, -1).replace(/[,\\s+]/g, ''));\n return Number.isFinite(n) ? n : null;\n };\n if (asPercent(50) === 50) return 100;\n if (asPercent(0.5) === 50) return 1;\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Time domains (V3.10.1)\n// ---------------------------------------------------------------------------\n\n/**\n * 2000-01-01T00:00:00Z. On a time axis anything earlier — 0 from a null\n * timestamp, a NaN from a failed parse — is a leak, not data: it drew an\n * axis starting \"Dec 31\" (1969, in the viewer's zone) on the live Verse.\n */\nexport const MIN_PLAUSIBLE_TIME = 946_684_800_000;\n\nexport function isPlausibleTime(ms: number): boolean {\n return Number.isFinite(ms) && ms >= MIN_PLAUSIBLE_TIME;\n}\n\n/**\n * An x axis is a time axis when any of its values is a plausible epoch-ms\n * timestamp. Small ordinals (0, 1, 2 — an index axis) are not, and keep\n * every finite value.\n */\nexport function isTimeAxis(xs: ReadonlyArray<number>): boolean {\n return xs.some(isPlausibleTime);\n}\n\n/** A filter for x values: on a time axis only plausible timestamps, otherwise any finite value. */\nexport function xKeeper(xs: ReadonlyArray<number>): (x: number) => boolean {\n return isTimeAxis(xs) ? isPlausibleTime : Number.isFinite;\n}\n\n/**\n * The narrowest time domain a chart draws: 10 minutes. A burst of readings\n * a few seconds apart used to stretch across the full width with three\n * identical time labels stacked on each other; widened, it sits as the\n * short cluster it is, on an axis whose ends read as two different times.\n */\nexport const MIN_TIME_SPAN_MS = 10 * 60_000;\n\n/**\n * Widen [min, max] to at least `minSpan`, around its middle ('center') or\n * keeping its right edge ('end' — for axes that end at now or a reset).\n */\nexport function ensureSpan(min: number, max: number, minSpan: number, align: 'center' | 'end' = 'center'): [number, number] {\n if (max < min) [min, max] = [max, min];\n if (max - min >= minSpan) return [min, max];\n if (align === 'end') return [max - minSpan, max];\n const mid = (min + max) / 2;\n return [mid - minSpan / 2, mid + minSpan / 2];\n}\n\n// ---------------------------------------------------------------------------\n// Label layout (V3.10.1): collision-free axis labels and dodged end labels\n// ---------------------------------------------------------------------------\n\n/**\n * Estimated advance of one label character at the DEFAULT display size:\n * --text-xs-size (12 px) × 0.6, the UI sans's average advance at medium\n * weight, rounded up so estimates err wide rather than letting two labels\n * touch.\n *\n * --text-xs-size is `12px * var(--ui-text-scale)`, and Appearance → Display\n * size sets that multiplier to 1.125 (Large) or 1.25 (XLarge). A chart must\n * budget at the size the text really renders — labelCharPx(useTextScale()) —\n * or the layout accepts a pair of 15 px labels as if they were 12 px ones\n * and prints them over each other (V3.10.1 review).\n */\nexport const LABEL_CHAR_PX = 12 * 0.6;\n\n/** A usable display text multiplier: anything non-finite or non-positive is the default, 1. */\nexport function validTextScale(textScale: number): number {\n return Number.isFinite(textScale) && textScale > 0 ? textScale : 1;\n}\n\n/** LABEL_CHAR_PX at a display text scale (1 Default, 1.125 Large, 1.25 XLarge). */\nexport function labelCharPx(textScale = 1): number {\n return LABEL_CHAR_PX * validTextScale(textScale);\n}\n\nexport function estimateTextWidth(text: string, charPx = LABEL_CHAR_PX): number {\n return text.length * charPx;\n}\n\n/**\n * Per-character budget of the y-axis tick gutters at 12 px — a shade under\n * LABEL_CHAR_PX because tick labels are mostly tabular digits.\n */\nconst TICK_CHAR_PX = 7;\n\n/**\n * Left gutter for right-aligned y tick labels: the widest label plus 10 px,\n * clamped to [floor, cap]. The per-character budget AND the cap scale with\n * the display text size (the cap was chosen for 12 px text); the floor is a\n * minimum, not a fit, and does not.\n */\nexport function tickGutter(labels: ReadonlyArray<string>, floor: number, cap: number, textScale = 1): number {\n const s = validTextScale(textScale);\n const widest = Math.max(0, ...labels.map((l) => l.length));\n return Math.min(cap * s, Math.max(floor, widest * TICK_CHAR_PX * s + 10));\n}\n\nexport type LabelAnchor = 'start' | 'middle' | 'end';\n\nexport interface AxisLabelSpec {\n key: string;\n /** Where the label points. */\n x: number;\n /** How it would like to hang off `x`. */\n anchor: LabelAnchor;\n /** Higher survives a collision: a marker / reset > the end > the start > interior ticks. */\n priority: number;\n /** The label at each detail level, most detailed first; the last entry repeats for deeper levels. */\n variants: ReadonlyArray<string>;\n /**\n * Required labels (the ends, markers) decide how far down the detail\n * ladder the axis goes; optional ones (interior ticks) are simply dropped\n * when they collide.\n */\n required?: boolean;\n}\n\nexport interface PlacedAxisLabel {\n key: string;\n text: string;\n x: number;\n anchor: LabelAnchor;\n}\n\nexport interface AxisLabelBounds {\n /** Leftmost / rightmost extent a label may occupy. */\n min: number;\n max: number;\n /** Minimum clear space between two labels. */\n gap?: number;\n charPx?: number;\n}\n\nfunction placeLevel(specs: ReadonlyArray<AxisLabelSpec>, level: number, bounds: AxisLabelBounds): PlacedAxisLabel[] {\n const gap = bounds.gap ?? 8;\n const order = specs.map((s, i) => ({ s, i })).sort((a, b) => b.s.priority - a.s.priority || a.i - b.i);\n const boxes: { left: number; right: number; text: string; i: number; label: PlacedAxisLabel }[] = [];\n for (const { s, i } of order) {\n const text = s.variants[Math.min(level, s.variants.length - 1)] ?? '';\n if (!text) continue;\n const w = estimateTextWidth(text, bounds.charPx);\n if (w > bounds.max - bounds.min) continue;\n let left = s.anchor === 'start' ? s.x : s.anchor === 'end' ? s.x - w : s.x - w / 2;\n let x = s.x;\n let anchor: LabelAnchor = s.anchor;\n // Keep the label inside the axis: pinned to an edge, it hangs off that edge.\n if (left < bounds.min) {\n left = bounds.min;\n x = bounds.min;\n anchor = 'start';\n } else if (left + w > bounds.max) {\n left = bounds.max - w;\n x = bounds.max;\n anchor = 'end';\n }\n const right = left + w;\n // Two labels that say the same thing are one label too many, wherever they sit.\n const clash = boxes.some((b) => b.text === text || (left < b.right + gap && b.left < right + gap));\n if (clash) continue;\n boxes.push({ left, right, text, i, label: { key: s.key, text, x, anchor } });\n }\n return boxes.sort((a, b) => a.i - b.i).map((b) => b.label);\n}\n\n/**\n * Lay out one axis's labels so none overlap. Every label at a level uses\n * the same rung of its detail ladder; the chosen level is the most detailed\n * one that places as many REQUIRED labels as any level can. Within a level,\n * higher priority wins a collision and the loser is dropped — so a tight\n * burn-down keeps \"Resets Sep 25\" and shortens or drops the start, rather\n * than printing the two over each other.\n */\nexport function layoutAxisLabels(specs: ReadonlyArray<AxisLabelSpec>, bounds: AxisLabelBounds): PlacedAxisLabel[] {\n if (specs.length === 0) return [];\n const levels = Math.max(1, ...specs.map((s) => s.variants.length));\n const requiredKeys = new Set(specs.filter((s) => s.required !== false).map((s) => s.key));\n let best: PlacedAxisLabel[] = [];\n let bestScore = -1;\n for (let level = 0; level < levels; level++) {\n const placed = placeLevel(specs, level, bounds);\n const score = placed.filter((p) => requiredKeys.has(p.key)).length;\n if (score > bestScore) {\n best = placed;\n bestScore = score;\n }\n if (bestScore === requiredKeys.size) break;\n }\n return best;\n}\n\n/**\n * Spread direct labels (end-of-line series names) vertically so none\n * overlaps: labels closer than `gap` merge into a cluster centred on their\n * own targets, clamped inside [top, bottom]. Returns each key's y, or null\n * when they cannot all fit — the caller then falls back to the legend\n * alone rather than drawing labels over each other. Ties keep input order.\n */\nexport function dodgeLabels(\n items: ReadonlyArray<{ key: string; y: number }>,\n gap: number,\n top: number,\n bottom: number,\n): Map<string, number> | null {\n if (items.length === 0) return new Map();\n if ((items.length - 1) * gap > bottom - top + 1e-9) return null;\n const sorted = items.map((it, i) => ({ ...it, i })).sort((a, b) => a.y - b.y || a.i - b.i);\n interface Cluster { members: typeof sorted; top: number }\n const place = (members: typeof sorted): Cluster => {\n const mean = members.reduce((s, m) => s + m.y, 0) / members.length;\n const extent = (members.length - 1) * gap;\n return { members, top: clamp(mean - extent / 2, top, bottom - extent) };\n };\n let clusters: Cluster[] = sorted.map((m) => place([m]));\n for (let merged = true; merged; ) {\n merged = false;\n for (let i = 0; i + 1 < clusters.length; i++) {\n const a = clusters[i]!;\n const b = clusters[i + 1]!;\n if (a.top + a.members.length * gap > b.top + 1e-9) {\n clusters = [...clusters.slice(0, i), place([...a.members, ...b.members]), ...clusters.slice(i + 2)];\n merged = true;\n break;\n }\n }\n }\n const out = new Map<string, number>();\n for (const c of clusters) c.members.forEach((m, k) => out.set(m.key, c.top + k * gap));\n return out;\n}\n\n/** Linear map from [d0, d1] to [r0, r1]; a zero-width domain maps to the range midpoint. */\nexport function linearScale(d0: number, d1: number, r0: number, r1: number): (v: number) => number {\n const span = d1 - d0;\n if (span === 0) return () => (r0 + r1) / 2;\n return (v: number) => r0 + ((v - d0) / span) * (r1 - r0);\n}\n\n/** Evenly thinned indexes so at most `max` labels are drawn, always keeping the last one. */\nexport function thinIndexes(length: number, max: number): number[] {\n if (length <= 0) return [];\n if (max <= 1) return [length - 1];\n if (length <= max) return Array.from({ length }, (_, i) => i);\n const step = Math.ceil((length - 1) / (max - 1));\n const out: number[] = [];\n for (let i = length - 1; i >= 0; i -= step) out.push(i);\n return out.reverse();\n}\n\n/** Clamp to [lo, hi]. */\nexport function clamp(v: number, lo: number, hi: number): number {\n return Math.min(hi, Math.max(lo, v));\n}\n\n// ---------------------------------------------------------------------------\n// Runs (null-aware line segments)\n// ---------------------------------------------------------------------------\n\nexport interface XY {\n x: number;\n y: number;\n}\n\n/** Split a series at nulls so a gap renders as a break, never as a dip to zero. */\nexport function splitRuns(points: ReadonlyArray<{ x: number; y: number | null }>): XY[][] {\n const runs: XY[][] = [];\n let current: XY[] = [];\n for (const p of points) {\n if (p.y === null || !Number.isFinite(p.y)) {\n if (current.length) runs.push(current);\n current = [];\n continue;\n }\n current.push({ x: p.x, y: p.y });\n }\n if (current.length) runs.push(current);\n return runs;\n}\n\nexport function linePath(run: ReadonlyArray<XY>): string {\n return run.map((p, i) => `${i === 0 ? 'M' : 'L'}${round(p.x)},${round(p.y)}`).join(' ');\n}\n\n/** Closed area under (or between) a run and a baseline run of equal length. */\nexport function areaPath(top: ReadonlyArray<XY>, bottom: ReadonlyArray<XY>): string {\n if (top.length === 0) return '';\n const back = [...bottom].reverse();\n return `${linePath(top)} ${back.map((p) => `L${round(p.x)},${round(p.y)}`).join(' ')} Z`;\n}\n\nexport function round(v: number): number {\n return Math.round(v * 10) / 10;\n}\n\n/**\n * A 1 px hairline's coordinate, snapped to the pixel grid: a 1 px stroke\n * centred on an integer straddles two device pixels and paints as a blurry\n * 2 px gray; centred on a half pixel it fills exactly one. Used for every\n * gridline, axis and crosshair so they stay crisp at any measured size.\n */\nexport function crisp(v: number): number {\n return Math.floor(v) + 0.5;\n}\n\n// ---------------------------------------------------------------------------\n// Monotone curves (visual polish that cannot lie)\n// ---------------------------------------------------------------------------\n\n/** One cubic Bézier segment: start, two control points, end. */\nexport interface CurveSegment {\n from: XY;\n c1: XY;\n c2: XY;\n to: XY;\n}\n\nfunction sign(v: number): number {\n return v < 0 ? -1 : 1;\n}\n\n/** Tangent at p1 from its two neighbours (Steffen / Fritsch–Carlson, as d3's curveMonotoneX). */\nfunction interiorTangent(p0: XY, p1: XY, p2: XY): number {\n const h0 = p1.x - p0.x;\n const h1 = p2.x - p1.x;\n if (h0 === 0 || h1 === 0) return 0;\n const s0 = (p1.y - p0.y) / h0;\n const s1 = (p2.y - p1.y) / h1;\n const p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n/** Tangent at an end point, from its one neighbour and that neighbour's tangent. */\nfunction endTangent(p0: XY, p1: XY, t: number): number {\n const h = p1.x - p0.x;\n return h ? (3 * (p1.y - p0.y) / h - t) / 2 : t;\n}\n\n/**\n * A monotone cubic through every point of a run (x ascending). WHY this curve\n * and not a Catmull-Rom or basis spline: it passes EXACTLY through each\n * reading and never overshoots between two of them — a segment's y always\n * stays inside [y(i), y(i+1)] — so smoothing can never invent a peak, a dip\n * below zero, or a crossing of the reserve line that the data does not have.\n * Two points are a straight segment; one point has no segments.\n */\nexport function monotoneSegments(run: ReadonlyArray<XY>): CurveSegment[] {\n const n = run.length;\n if (n < 2) return [];\n if (n === 2) {\n const [a, b] = [run[0]!, run[1]!];\n return [{ from: a, c1: { x: a.x + (b.x - a.x) / 3, y: a.y + (b.y - a.y) / 3 }, c2: { x: b.x - (b.x - a.x) / 3, y: b.y - (b.y - a.y) / 3 }, to: b }];\n }\n const t: number[] = new Array(n).fill(0);\n for (let i = 1; i < n - 1; i++) t[i] = interiorTangent(run[i - 1]!, run[i]!, run[i + 1]!);\n t[0] = endTangent(run[0]!, run[1]!, t[1]!);\n t[n - 1] = endTangent(run[n - 1]!, run[n - 2]!, t[n - 2]!);\n const out: CurveSegment[] = [];\n for (let i = 0; i < n - 1; i++) {\n const a = run[i]!;\n const b = run[i + 1]!;\n const dx = (b.x - a.x) / 3;\n out.push({ from: a, c1: { x: a.x + dx, y: a.y + dx * t[i]! }, c2: { x: b.x - dx, y: b.y - dx * t[i + 1]! }, to: b });\n }\n return out;\n}\n\nfunction pt(p: XY): string {\n return `${round(p.x)},${round(p.y)}`;\n}\n\n/** SVG path of the monotone curve through `run` (a lone point is just its M). */\nexport function smoothPath(run: ReadonlyArray<XY>): string {\n if (run.length === 0) return '';\n return `M${pt(run[0]!)}` + monotoneSegments(run).map((s) => ` C${pt(s.c1)} ${pt(s.c2)} ${pt(s.to)}`).join('');\n}\n\n/**\n * Closed area between a curved top run and a curved bottom run of equal x\n * (a stacked layer's base is the layer below's top, so both edges use the\n * SAME curve and adjacent layers meet without a sliver). The bottom is walked\n * backwards by reversing each segment exactly — end, swapped controls, start.\n */\nexport function smoothAreaPath(top: ReadonlyArray<XY>, bottom: ReadonlyArray<XY>): string {\n if (top.length === 0) return '';\n const back = monotoneSegments(bottom).reverse();\n const tail = back.length\n ? `L${pt(back[0]!.to)}` + back.map((s) => ` C${pt(s.c2)} ${pt(s.c1)} ${pt(s.from)}`).join('')\n : bottom.length ? `L${pt(bottom[0]!)}` : '';\n return `${smoothPath(top)} ${tail} Z`;\n}\n\n// ---------------------------------------------------------------------------\n// Stacking\n// ---------------------------------------------------------------------------\n\nexport interface StackSegment {\n /** Segment index in the caller's segment list. */\n index: number;\n value: number;\n y0: number;\n y1: number;\n}\n\nexport interface StackedColumn {\n segments: StackSegment[];\n /** Sum of known values. */\n total: number;\n /** True when at least one segment value is null (the total is a lower bound). */\n incomplete: boolean;\n /** True when every segment value is null (nothing is known). */\n unknown: boolean;\n}\n\n/** Stack one column's values bottom-up. Nulls are skipped and flagged, zeros take no height. */\nexport function stackColumn(values: ReadonlyArray<number | null>): StackedColumn {\n let acc = 0;\n let incomplete = false;\n let known = 0;\n const segments: StackSegment[] = [];\n values.forEach((value, index) => {\n if (value === null || !Number.isFinite(value)) {\n incomplete = true;\n return;\n }\n known++;\n const v = Math.max(0, value);\n if (v > 0) segments.push({ index, value: v, y0: acc, y1: acc + v });\n acc += v;\n });\n return { segments, total: acc, incomplete, unknown: known === 0 && values.length > 0 };\n}\n\n// ---------------------------------------------------------------------------\n// Rounded-end bars (4 px data end, square at the baseline)\n// ---------------------------------------------------------------------------\n\n/**\n * Path for a vertical bar whose TOP corners are rounded by `r` (the data end)\n * and whose bottom sits square on the baseline. `r` shrinks for short bars so\n * the corners never cross.\n */\nexport function roundedTopBar(x: number, y: number, w: number, h: number, r = 4): string {\n if (h <= 0 || w <= 0) return '';\n const rr = Math.max(0, Math.min(r, w / 2, h));\n return [\n `M${round(x)},${round(y + h)}`,\n `L${round(x)},${round(y + rr)}`,\n `Q${round(x)},${round(y)} ${round(x + rr)},${round(y)}`,\n `L${round(x + w - rr)},${round(y)}`,\n `Q${round(x + w)},${round(y)} ${round(x + w)},${round(y + rr)}`,\n `L${round(x + w)},${round(y + h)}`,\n 'Z',\n ].join(' ');\n}\n\n/** Horizontal twin: RIGHT corners rounded (the data end), left square on the baseline. */\nexport function roundedRightBar(x: number, y: number, w: number, h: number, r = 4): string {\n if (h <= 0 || w <= 0) return '';\n const rr = Math.max(0, Math.min(r, h / 2, w));\n return [\n `M${round(x)},${round(y)}`,\n `L${round(x + w - rr)},${round(y)}`,\n `Q${round(x + w)},${round(y)} ${round(x + w)},${round(y + rr)}`,\n `L${round(x + w)},${round(y + h - rr)}`,\n `Q${round(x + w)},${round(y + h)} ${round(x + w - rr)},${round(y + h)}`,\n `L${round(x)},${round(y + h)}`,\n 'Z',\n ].join(' ');\n}\n\n// ---------------------------------------------------------------------------\n// Funnel\n// ---------------------------------------------------------------------------\n\nexport interface FunnelStep {\n value: number | null;\n /** Share of the FIRST stage (0..1), null when either side is unknown or the first is 0. */\n ofFirst: number | null;\n /** Share of the PREVIOUS stage (0..1), null for the first stage or when unknown. */\n ofPrevious: number | null;\n}\n\nexport function funnelSteps(values: ReadonlyArray<number | null>): FunnelStep[] {\n const first = values[0] ?? null;\n return values.map((value, i) => {\n const previous = i > 0 ? values[i - 1] ?? null : null;\n return {\n value,\n ofFirst: value !== null && first !== null && first > 0 ? value / first : null,\n ofPrevious: i > 0 && value !== null && previous !== null && previous > 0 ? value / previous : null,\n };\n });\n}\n\n// ---------------------------------------------------------------------------\n// Calendar heatmap\n// ---------------------------------------------------------------------------\n\nexport interface CalendarCell {\n day: string;\n value: number | null;\n /** Column (week index from the first rendered week). */\n week: number;\n /** Row, 0 = weekStart. */\n weekday: number;\n /** True for days before the first datum / after the last (padding cells). */\n outside: boolean;\n}\n\nexport interface CalendarGrid {\n cells: CalendarCell[];\n weeks: number;\n /** Week index where each month first appears, for the month labels. */\n months: { week: number; label: string }[];\n}\n\nconst MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\nfunction utcDayMs(day: string): number | null {\n if (!/^\\d{4}-\\d{2}-\\d{2}$/.test(day)) return null;\n const ms = Date.parse(`${day}T00:00:00Z`);\n return Number.isFinite(ms) && new Date(ms).toISOString().slice(0, 10) === day ? ms : null;\n}\n\n/**\n * Lay out consecutive days on a weeks × weekdays grid. Input days may be\n * sparse or unordered; missing days in the span become `value: null`\n * (unknown), never 0. `weekStart` 1 = Monday (ISO), 0 = Sunday.\n */\nexport function calendarGrid(\n days: ReadonlyArray<{ day: string; value: number | null }>,\n weekStart: 0 | 1 = 1,\n): CalendarGrid {\n const byDay = new Map<string, number | null>();\n let minMs = Infinity;\n let maxMs = -Infinity;\n for (const d of days) {\n const ms = utcDayMs(d.day);\n // A pre-2000 day is a null/zero date that leaked through, not a datum —\n // one would stretch the grid back to 1970.\n if (ms === null || ms < MIN_PLAUSIBLE_TIME) continue;\n byDay.set(d.day, d.value);\n minMs = Math.min(minMs, ms);\n maxMs = Math.max(maxMs, ms);\n }\n if (!Number.isFinite(minMs)) return { cells: [], weeks: 0, months: [] };\n const DAY = 86_400_000;\n const firstWeekday = (new Date(minMs).getUTCDay() - weekStart + 7) % 7;\n const gridStart = minMs - firstWeekday * DAY;\n const lastWeekday = (new Date(maxMs).getUTCDay() - weekStart + 7) % 7;\n const gridEnd = maxMs + (6 - lastWeekday) * DAY;\n const cells: CalendarCell[] = [];\n const months: { week: number; label: string }[] = [];\n let lastMonth = -1;\n for (let ms = gridStart, i = 0; ms <= gridEnd; ms += DAY, i++) {\n const day = new Date(ms).toISOString().slice(0, 10);\n const week = Math.floor(i / 7);\n const weekday = i % 7;\n const outside = ms < minMs || ms > maxMs;\n cells.push({ day, value: outside ? null : byDay.has(day) ? byDay.get(day)! : null, week, weekday, outside });\n const month = new Date(ms).getUTCMonth();\n // First rendered week of each month; the component drops a label that\n // would collide with the previous one.\n if (!outside && month !== lastMonth) {\n months.push({ week, label: MONTHS[month]! });\n lastMonth = month;\n }\n }\n return { cells, weeks: Math.floor((gridEnd - gridStart) / DAY / 7) + 1, months };\n}\n\n/**\n * Bucket a value into 0..steps for a sequential ramp: 0 is reserved for a\n * true zero, 1..steps split (0, max] evenly. null → null (unknown).\n */\nexport function heatBucket(value: number | null, max: number, steps = 4): number | null {\n if (value === null || !Number.isFinite(value)) return null;\n if (value <= 0 || max <= 0) return 0;\n return clamp(Math.ceil((value / max) * steps), 1, steps);\n}\n\n// ---------------------------------------------------------------------------\n// Burn-down projection\n// ---------------------------------------------------------------------------\n\nexport interface BurnPoint {\n t: number;\n remaining: number | null;\n}\n\nexport interface BurnProjection {\n /** Units per millisecond (negative while burning). Null with fewer than two known points. */\n slopePerMs: number | null;\n /** When the projection crosses 0, if it does before `resetAt`. */\n exhaustAt: number | null;\n /** When it crosses `reserve`, if a reserve is set and it does before `resetAt`. */\n reserveAt: number | null;\n /** Projected remaining at reset (clamped at 0), or null when there is no slope. */\n remainingAtReset: number | null;\n /** The last known point the projection starts from. */\n from: { t: number; remaining: number } | null;\n}\n\n/**\n * Least-squares slope over the most recent `window` known points, projected\n * forward from the last known point. A flat or rising series never\n * \"exhausts\". Pure: the caller supplies `resetAt`.\n *\n * `resetAt` null (or non-finite) is an UNKNOWN reset: nothing is projected\n * forward — there is no moment to project to — so only a line the window\n * has ALREADY crossed is reported, and remainingAtReset is null. (An\n * epoch-0 reset used to fail every `at <= resetAt` check and come back as\n * \"no crossing, current remaining at reset\": a green verdict for a seat\n * burning 10%/h.)\n */\nexport function projectBurnDown(\n points: ReadonlyArray<BurnPoint>,\n resetAtIn: number | null,\n opts: { window?: number; reserve?: number | null } = {},\n): BurnProjection {\n const resetAt = resetAtIn !== null && Number.isFinite(resetAtIn) ? resetAtIn : null;\n const known = points\n .filter((p): p is { t: number; remaining: number } => p.remaining !== null && Number.isFinite(p.remaining) && Number.isFinite(p.t))\n .sort((a, b) => a.t - b.t);\n const from = known.length ? known[known.length - 1]! : null;\n const recent = known.slice(-(opts.window ?? 6));\n if (!from || recent.length < 2) {\n return { slopePerMs: null, exhaustAt: null, reserveAt: null, remainingAtReset: null, from };\n }\n const n = recent.length;\n const meanT = recent.reduce((s, p) => s + p.t, 0) / n;\n const meanR = recent.reduce((s, p) => s + p.remaining, 0) / n;\n let num = 0;\n let den = 0;\n for (const p of recent) {\n num += (p.t - meanT) * (p.remaining - meanR);\n den += (p.t - meanT) ** 2;\n }\n const slope = den === 0 ? 0 : num / den;\n const crossing = (level: number): number | null => {\n if (from.remaining <= level) return from.t;\n if (slope >= 0 || resetAt === null) return null;\n const at = from.t + (level - from.remaining) / slope;\n return at <= resetAt ? at : null;\n };\n const reserve = opts.reserve ?? null;\n return {\n slopePerMs: slope,\n exhaustAt: crossing(0),\n reserveAt: reserve === null ? null : crossing(reserve),\n remainingAtReset: resetAt === null ? null : Math.max(0, from.remaining + slope * Math.max(0, resetAt - from.t)),\n from,\n };\n}\n\n// ---------------------------------------------------------------------------\n// Gauge arcs\n// ---------------------------------------------------------------------------\n\n/** Point on a circle; angle in radians, 0 = +x axis, measured counter-clockwise (SVG y flipped). */\nexport function polar(cx: number, cy: number, r: number, angle: number): XY {\n return { x: cx + r * Math.cos(angle), y: cy - r * Math.sin(angle) };\n}\n\n/**\n * SVG arc for a 180° gauge from fraction `f0` to `f1` (0 = left end, 1 =\n * right end, sweeping over the top). Fractions are clamped to [0, 1].\n */\nexport function gaugeArc(cx: number, cy: number, r: number, f0: number, f1: number): string {\n const a = clamp(f0, 0, 1);\n const b = clamp(f1, 0, 1);\n if (b <= a) return '';\n const start = polar(cx, cy, r, Math.PI * (1 - a));\n const end = polar(cx, cy, r, Math.PI * (1 - b));\n // A 180° gauge never needs the large-arc flag (the span is at most π).\n return `M${round(start.x)},${round(start.y)} A${r},${r} 0 0 1 ${round(end.x)},${round(end.y)}`;\n}\n\nexport type GaugeSeverity = 'ok' | 'warn' | 'danger' | 'unknown';\n\nexport function gaugeSeverity(value: number | null, warn: number, danger: number): GaugeSeverity {\n if (value === null || !Number.isFinite(value)) return 'unknown';\n if (value >= danger) return 'danger';\n if (value >= warn) return 'warn';\n return 'ok';\n}\n","/**\n * components/charts/motion.ts — whether a chart may play its entrance (a line\n * drawing itself in, columns rising, a wash fading up).\n *\n * The same two triggers as the duration tokens (design/tokens.css) and the\n * skeleton shimmer (design/global.css), resolved once at mount:\n *\n * - `data-motion=\"reduce\"` on <html> (Settings → Reduce motion) → static;\n * - `data-motion=\"full\"` (Settings explicitly asked for motion) → animate,\n * whatever the OS says;\n * - otherwise the OS `prefers-reduced-motion: reduce` → static.\n *\n * The chart writes the answer to its plot wrapper as `data-motion=\"enter\" |\n * \"static\"`, and plot.module.css keys every entrance animation off\n * `[data-motion='enter']` — so a reduced-motion reader gets a plot that is\n * simply THERE, and the DOM says which one they got (charts/motion.test.tsx).\n * The durations also read var(--duration-*), which collapse to 1 ms under\n * reduced motion — a second, CSS-only guard if the attribute were ever lost.\n *\n * Entrance only: a hover, a refetch or a 7d → 30d switch never replays it\n * (the SVG elements persist; only their geometry changes).\n */\nimport { useState } from 'react';\n\nexport type ChartMotion = 'enter' | 'static';\n\nexport function prefersReducedMotion(): boolean {\n if (typeof document !== 'undefined') {\n const pref = document.documentElement.getAttribute('data-motion');\n if (pref === 'reduce') return true;\n if (pref === 'full') return false;\n }\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return false;\n try {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n } catch {\n return false;\n }\n}\n\n/** Resolved once per chart mount — an entrance is a one-time event, not a subscription. */\nexport function useChartMotion(): ChartMotion {\n const [motion] = useState<ChartMotion>(() => (prefersReducedMotion() ? 'static' : 'enter'));\n return motion;\n}\n","/**\n * components/charts/useChartWidth.ts — the measured pixel width of a chart's\n * container, so the V3.10 charts draw at their REAL size (text stays 12 px at\n * 375 px wide) instead of scaling a fixed viewBox down until labels are\n * unreadable. Falls back to `fallback` until measured (jsdom, SSR, first paint).\n */\nimport { useLayoutEffect, useState, type RefObject } from 'react';\n\n/** Narrowest width any chart lays itself out for (a 375 px phone minus padding). */\nexport const MIN_CHART_WIDTH = 280;\n\nexport function useChartWidth(ref: RefObject<HTMLElement | null>, fixed: number | undefined, fallback = 640): number {\n const [measured, setMeasured] = useState<number | null>(null);\n // WHY track the node: a chart whose frame starts in a non-ready state\n // (loading / empty / dark) mounts its plot — and so this ref — LATER than\n // the hook. An effect keyed only on the ref object never re-ran, so every\n // chart that first rendered \"Loading…\" stayed at the 640 px fallback and\n // was scaled down by CSS (V3.10 fix, found in the 1440 harness).\n const [node, setNode] = useState<HTMLElement | null>(null);\n // Runs after every render on purpose (ref.current is not a dependency React\n // can see); the equality guard makes it settle in one pass, never a loop.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(() => {\n if (ref.current !== node) setNode(ref.current);\n });\n useLayoutEffect(() => {\n if (fixed !== undefined) return undefined;\n const el = node;\n if (!el) return undefined;\n const read = (): void => {\n const w = Math.floor(el.getBoundingClientRect().width);\n // 0 means \"not laid out yet\" (hidden tab, jsdom) — keep the fallback.\n if (w > 0) setMeasured((prev) => (prev === w ? prev : w));\n };\n read();\n if (typeof ResizeObserver === 'undefined') return undefined;\n // rAF-coalesced: a drag-resize fires many entries per frame.\n let frame = 0;\n const observer = new ResizeObserver(() => {\n cancelAnimationFrame(frame);\n frame = requestAnimationFrame(read);\n });\n observer.observe(el);\n return () => {\n cancelAnimationFrame(frame);\n observer.disconnect();\n };\n }, [node, fixed]);\n return Math.max(MIN_CHART_WIDTH, fixed ?? measured ?? fallback);\n}\n","/**\n * components/charts/useTextScale.ts — the operator's Display size, as the\n * multiplier every type token carries: --ui-text-scale is 1 at Default,\n * 1.125 at Large and 1.25 at XLarge (clamped back to 1.125 for XLarge under\n * 1100 px — see the [data-ui-scale] blocks in design/tokens.css).\n *\n * Charts lay labels out from WIDTH ESTIMATES (chart-math layoutAxisLabels,\n * dodgeLabels, tickGutter) written for 12 px text. This is what they\n * multiply those estimates by, so the no-overlap guarantee holds at the size\n * the labels actually render instead of only at Default (V3.10.1 review:\n * at XLarge a weekly burn-down's start and reset labels overprinted).\n *\n * Read from <html>, where data/appearance-store.ts sets data-ui-scale and\n * tokens.css resolves --ui-text-scale. ONE shared subscription for every\n * chart on screen — a MutationObserver for the setting and a resize\n * listener for the narrow-window clamp (a media query) — not one per chart.\n */\nimport { useSyncExternalStore } from 'react';\nimport { validTextScale } from './chart-math.js';\n\n/** --ui-text-scale as computed on `root` (default <html>); 1 when unset or unreadable. */\nexport function readTextScale(root: Element | null = typeof document === 'undefined' ? null : document.documentElement): number {\n if (!root || typeof getComputedStyle !== 'function') return 1;\n return validTextScale(Number.parseFloat(getComputedStyle(root).getPropertyValue('--ui-text-scale')));\n}\n\nconst listeners = new Set<() => void>();\nlet current: number | null = null;\nlet stopWatching: (() => void) | null = null;\n\nfunction refresh(): void {\n const next = readTextScale();\n if (next === current) return;\n current = next;\n for (const listener of listeners) listener();\n}\n\nfunction watch(): () => void {\n current = readTextScale();\n const root = document.documentElement;\n // `style` as well as the attribute: an inline --ui-text-scale is the same\n // setting, and the check is one computed-style read per mutation batch.\n const observer = typeof MutationObserver === 'undefined' ? null : new MutationObserver(refresh);\n observer?.observe(root, { attributes: true, attributeFilter: ['data-ui-scale', 'style'] });\n const raf = typeof requestAnimationFrame === 'function';\n let frame = 0;\n const onResize = (): void => {\n if (!raf) return refresh();\n cancelAnimationFrame(frame);\n frame = requestAnimationFrame(refresh);\n };\n window.addEventListener('resize', onResize);\n return () => {\n observer?.disconnect();\n if (raf) cancelAnimationFrame(frame);\n window.removeEventListener('resize', onResize);\n };\n}\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener);\n if (listeners.size === 1 && typeof document !== 'undefined') stopWatching = watch();\n return () => {\n listeners.delete(listener);\n if (listeners.size > 0) return;\n stopWatching?.();\n stopWatching = null;\n current = null;\n };\n}\n\nfunction getSnapshot(): number {\n return current ?? readTextScale();\n}\n\n/** The display text multiplier; re-renders the caller when the operator changes Display size. */\nexport function useTextScale(): number {\n return useSyncExternalStore(subscribe, getSnapshot, () => 1);\n}\n",".table {\n width: 100%;\n border-collapse: collapse;\n font-size: var(--text-xs-size);\n}\n\n.table th,\n.table td {\n text-align: left;\n padding: var(--space-1) var(--space-2);\n border-bottom: 1px solid var(--border-subtle);\n}\n\n.table th {\n color: var(--text-tertiary);\n font-weight: var(--font-weight-medium);\n text-transform: uppercase;\n letter-spacing: 0.04em;\n font-size: var(--text-xs-size);\n}\n\n.numeric {\n text-align: right;\n font-variant-numeric: tabular-nums;\n}\n\n.empty {\n color: var(--text-tertiary);\n text-align: center;\n}\n","/**\n * components/charts/TableView.tsx — the WCAG-clean accessibility twin every\n * chart should ship (dataviz skill: \"no table view / color-only encoding on\n * a continuous scale\" is an anti-pattern). Every value a chart's tooltip or\n * direct label shows must also be reachable here without hovering anything.\n */\nimport type { ReactNode } from 'react';\nimport styles from './TableView.module.css';\n\nexport interface TableColumn<T> {\n key: string;\n label: string;\n numeric?: boolean;\n render: (row: T) => ReactNode;\n}\n\nexport function TableView<T>({\n caption,\n columns,\n rows,\n rowKey,\n emptyMessage = 'No rows.',\n}: {\n caption: string;\n columns: TableColumn<T>[];\n rows: T[];\n rowKey: (row: T, index: number) => string;\n /** Shown as a single full-width row when `rows` is empty (V3.10). */\n emptyMessage?: string;\n}) {\n return (\n <table className={styles.table}>\n <caption className=\"visually-hidden\">{caption}</caption>\n <thead>\n <tr>\n {columns.map((c) => (\n <th key={c.key} scope=\"col\" className={c.numeric ? styles.numeric : undefined}>\n {c.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.length === 0 ? (\n <tr>\n <td colSpan={Math.max(1, columns.length)} className={styles.empty}>\n {emptyMessage}\n </td>\n </tr>\n ) : null}\n {rows.map((row, i) => (\n <tr key={rowKey(row, i)}>\n {columns.map((c) => (\n <td key={c.key} className={c.numeric ? styles.numeric : undefined}>\n {c.render(row)}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n",".frame {\n margin: 0;\n min-width: 0;\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-lg);\n background: var(--bg-surface);\n /* V3.10: 16px (12px compact density) — the card-pad token follows density. */\n padding: var(--card-pad, var(--space-4));\n}\n\n.header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--space-3);\n /* Never wrap: the actions (and the ⋯ view menu) stay in the head beside the\n title at every width; a long description wraps inside .heading instead of\n pushing the menu below the caption (audit 16). */\n flex-wrap: nowrap;\n margin-bottom: var(--space-3);\n}\n\n.actions {\n display: inline-flex;\n align-items: center;\n gap: var(--space-2);\n flex: none;\n margin-left: auto;\n}\n\n.menuWrap {\n position: relative;\n display: inline-flex;\n}\n\n/* The ⋯ button: quiet until hovered or focused, but always a real control. */\n.more {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: calc(var(--control-h-xs, 20px) + 4px);\n height: calc(var(--control-h-xs, 20px) + 4px);\n padding: 0;\n border: 1px solid transparent;\n border-radius: var(--radius-sm);\n background: transparent;\n color: var(--text-tertiary);\n cursor: pointer;\n transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);\n}\n\n.more:hover,\n.more[aria-expanded='true'] {\n background: var(--bg-hover);\n color: var(--text-primary);\n}\n\n.more:focus-visible {\n outline: 2px solid var(--border-focus);\n outline-offset: 1px;\n}\n\n.menu {\n position: absolute;\n top: calc(100% + var(--space-1));\n right: 0;\n z-index: var(--z-dropdown);\n display: flex;\n flex-direction: column;\n min-width: 176px;\n padding: var(--space-1);\n border: 1px solid var(--border-default);\n border-radius: var(--radius-md);\n background: var(--bg-surface-raised);\n box-shadow: var(--shadow-menu);\n}\n\n.menuItem {\n display: flex;\n align-items: center;\n gap: var(--space-2);\n padding: var(--space-1) var(--space-2);\n border: 0;\n border-radius: var(--radius-sm);\n background: transparent;\n color: var(--text-primary);\n font: inherit;\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n text-align: left;\n cursor: pointer;\n}\n\n.menuItem:hover,\n.menuItem:focus-visible {\n background: var(--bg-hover);\n outline: none;\n}\n\n.check {\n width: 1em;\n color: var(--text-secondary);\n}\n\n.hint {\n margin-left: auto;\n padding: 0 var(--space-1);\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-xs, 3px);\n color: var(--text-tertiary);\n font-family: var(--font-mono);\n font-size: var(--text-2xs-size);\n}\n\n.heading {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n gap: 2px;\n min-width: 0;\n}\n\n.title {\n font-size: var(--text-sm-size);\n font-weight: var(--font-weight-semibold);\n color: var(--text-primary);\n}\n\n.description {\n font-size: var(--text-xs-size);\n color: var(--text-tertiary);\n}\n\n.plot {\n position: relative;\n width: 100%;\n min-width: 0;\n}\n\n.table {\n max-height: 360px;\n overflow: auto;\n}\n\n.caveat {\n margin: 0 0 var(--space-3);\n padding: var(--space-2) var(--space-3);\n border-radius: var(--radius-md);\n background: var(--status-unknown-bg);\n color: var(--status-unknown-fg);\n font-size: var(--text-xs-size);\n line-height: var(--text-sm-line);\n}\n\n.state {\n margin: 0;\n padding: var(--space-6) var(--space-3);\n text-align: center;\n color: var(--text-tertiary);\n font-size: var(--text-sm-size);\n}\n\n/* The loading skeleton sits exactly where the plot will. */\n.loading {\n position: relative;\n width: 100%;\n min-width: 0;\n}\n\n.dark {\n display: flex;\n flex-direction: column;\n gap: var(--space-1);\n align-items: center;\n}\n\n.darkTitle {\n margin: 0;\n color: var(--text-secondary);\n font-weight: var(--font-weight-semibold);\n}\n\n.darkBody {\n margin: 0;\n font-size: var(--text-xs-size);\n max-width: 44ch;\n}\n\n.unknown {\n color: var(--status-unknown-fg);\n}\n","/**\n * components/charts/ChartFrame.tsx — the shell every V3.10 chart renders in:\n * title + description, an honest caveat, the Table twin (the WCAG-clean view,\n * reachable without hovering anything), and the designed non-ready states. A\n * chart never draws empty axes: it says what the emptiness means.\n *\n * loading — the previous render is held when there is one (no skeleton\n * flash on refetch); otherwise a skeleton in the chart's own\n * shape and height (`skeleton`), so the card does not jump\n * when the data lands, announced as \"Loading…\".\n * empty — \"No runs in this window.\" A genuine, known zero.\n * dark — \"Fleet dark since Sep 1\": nothing has happened since a date.\n * unknown — the source could not be read. Never drawn as zeros.\n *\n * V3.10 (SPEC-310C §6 \"Table toggle: moves into ⋯\"): the Chart | Table\n * segmented control used to sit beside every title — noise on a KPI-sized\n * card, and it wrapped against long titles (\"Memo hit rate\"). It is now a\n * quiet ⋯ menu button (still a real, labelled button: the table stays one\n * Tab + Enter away) plus the `T` key anywhere inside the card, which is the\n * `chart.table` command in routes/verse/shell/command-catalog.ts. The key is\n * matched here directly rather than through the catalog so this shared kit\n * (also used by the legacy console) never imports a route module; the chart\n * tests assert the two stay the same key.\n */\nimport { useCallback, useEffect, useId, useRef, useState, type KeyboardEvent, type ReactNode } from 'react';\nimport { ChartSkeleton, MoreGlyph, type ChartSkeletonShape } from './ChartParts.js';\nimport { formatDayLabel, formatTimeLabel } from './format.js';\nimport './chart-tokens.css';\nimport styles from './ChartFrame.module.css';\n\nexport type ChartStatus =\n | { kind: 'ready' }\n | { kind: 'loading' }\n | { kind: 'empty'; message?: string }\n | { kind: 'dark'; since: string; subject?: string; detail?: string }\n | { kind: 'unknown'; reason?: string };\n\nexport type ChartView = 'chart' | 'table';\n\n/** The key that flips a focused chart card between plot and table (catalog `chart.table`). */\nexport const CHART_TABLE_KEY = 't';\n\nexport interface ChartFrameProps {\n title: string;\n description?: string;\n caveat?: string;\n status?: ChartStatus;\n /** Start on the table (e.g. a screen-reader-first surface, or a matrix at 375 px). */\n defaultView?: ChartView;\n /** Hide the view menu (only for a chart that already IS its numbers). */\n hideToggle?: boolean;\n /** Extra header controls (a facet picker), rendered before the ⋯ menu. */\n actions?: ReactNode;\n /** The plot. */\n children: ReactNode;\n table: ReactNode;\n /** Rendered under the plot in chart view (legends, notes). */\n footer?: ReactNode;\n /** The loading placeholder's outline — the chart's own shape (default: line). */\n skeleton?: ChartSkeletonShape;\n /** The loading placeholder's height in px — the plot's own height. */\n skeletonHeight?: number;\n}\n\n/**\n * \"Sep 1\" from a YYYY-MM-DD calendar day (printed as written) or an ISO\n * instant (its day in the VIEWER's zone). The instant used to be cut to its\n * UTC date, so fleet history's `darkSince` — an ISO instant — read \"dark\n * since Sep 26\" on a Sep 25 evening anywhere west of UTC.\n */\nexport function sinceLabel(since: string): string {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(since)) return formatDayLabel(since);\n const ms = Date.parse(since);\n return Number.isFinite(ms) ? formatTimeLabel(ms) : formatDayLabel(since.slice(0, 10));\n}\n\nfunction StatusMessage({\n status,\n skeleton,\n skeletonHeight,\n}: {\n status: Exclude<ChartStatus, { kind: 'ready' }>;\n skeleton?: ChartSkeletonShape;\n skeletonHeight?: number;\n}): ReactNode {\n switch (status.kind) {\n case 'loading':\n return (\n <div className={styles.loading} role=\"status\" aria-busy=\"true\">\n <ChartSkeleton shape={skeleton} height={skeletonHeight} />\n <span className=\"visually-hidden\">Loading…</span>\n </div>\n );\n case 'empty':\n return <p className={styles.state}>{status.message ?? 'Nothing happened in this window.'}</p>;\n case 'dark':\n return (\n <div className={`${styles.state} ${styles.dark}`}>\n <p className={styles.darkTitle}>\n {status.subject ?? 'Fleet'} dark since {sinceLabel(status.since)}\n </p>\n <p className={styles.darkBody}>{status.detail ?? 'No runs or proposals have been recorded since then.'}</p>\n </div>\n );\n case 'unknown':\n return (\n <p className={`${styles.state} ${styles.unknown}`} role=\"note\">\n Unknown — {status.reason ?? 'the data source could not be read.'} Nothing is shown rather than a guess.\n </p>\n );\n }\n}\n\n/** True when a key press is typing into a field — never steal it for the T shortcut. */\nfunction isEditableTarget(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n const tag = target.tagName;\n return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || target.isContentEditable;\n}\n\nconst VIEW_ITEMS: ReadonlyArray<{ view: ChartView; label: string; hint: string | null }> = [\n { view: 'chart', label: 'Show as chart', hint: null },\n { view: 'table', label: 'Show as table', hint: 'T' },\n];\n\n/**\n * The ⋯ menu: a menu button (WAI-ARIA menu-button pattern) with two\n * menuitemradio entries. Arrow keys move, Enter / Space pick, Escape and Tab\n * close; focus returns to the button on every close so the keyboard user is\n * never dropped at the top of the document.\n */\nfunction ViewMenu({ title, view, onPick }: { title: string; view: ChartView; onPick: (view: ChartView) => void }) {\n const [open, setOpen] = useState(false);\n const [active, setActive] = useState(0);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const menuRef = useRef<HTMLDivElement>(null);\n const menuId = useId();\n\n const close = useCallback((refocus: boolean) => {\n setOpen(false);\n if (refocus) buttonRef.current?.focus();\n }, []);\n\n useEffect(() => {\n if (!open) return undefined;\n const onDown = (e: PointerEvent): void => {\n const t = e.target as Node | null;\n if (t && (menuRef.current?.contains(t) || buttonRef.current?.contains(t))) return;\n setOpen(false);\n };\n document.addEventListener('pointerdown', onDown);\n return () => document.removeEventListener('pointerdown', onDown);\n }, [open]);\n\n useEffect(() => {\n if (!open) return;\n menuRef.current?.querySelectorAll<HTMLElement>('[role=\"menuitemradio\"]')[active]?.focus();\n }, [open, active]);\n\n function openAt(index: number): void {\n setActive(index);\n setOpen(true);\n }\n\n function onButtonKey(e: KeyboardEvent<HTMLButtonElement>): void {\n if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n e.preventDefault();\n openAt(e.key === 'ArrowUp' ? VIEW_ITEMS.length - 1 : 0);\n }\n }\n\n function onMenuKey(e: KeyboardEvent<HTMLDivElement>): void {\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n setActive((a) => (a + 1) % VIEW_ITEMS.length);\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n setActive((a) => (a - 1 + VIEW_ITEMS.length) % VIEW_ITEMS.length);\n } else if (e.key === 'Home') {\n e.preventDefault();\n setActive(0);\n } else if (e.key === 'End') {\n e.preventDefault();\n setActive(VIEW_ITEMS.length - 1);\n } else if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n close(true);\n } else if (e.key === 'Tab') {\n close(false);\n }\n }\n\n return (\n <span className={styles.menuWrap}>\n <button\n ref={buttonRef}\n type=\"button\"\n className={styles.more}\n aria-label={`${title}: view options`}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={open ? menuId : undefined}\n title=\"View options (T toggles the table)\"\n onClick={() => (open ? close(false) : openAt(Math.max(0, VIEW_ITEMS.findIndex((i) => i.view === view))))}\n onKeyDown={onButtonKey}\n >\n <MoreGlyph />\n </button>\n {open ? (\n <div ref={menuRef} id={menuId} role=\"menu\" aria-label={`${title} view`} className={styles.menu} onKeyDown={onMenuKey}>\n {VIEW_ITEMS.map((item, i) => (\n <button\n key={item.view}\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={view === item.view}\n tabIndex={i === active ? 0 : -1}\n className={styles.menuItem}\n onClick={() => {\n onPick(item.view);\n close(true);\n }}\n >\n <span className={styles.check} aria-hidden=\"true\">{view === item.view ? '✓' : ''}</span>\n <span>{item.label}</span>\n {item.hint ? <kbd className={styles.hint}>{item.hint}</kbd> : null}\n </button>\n ))}\n </div>\n ) : null}\n </span>\n );\n}\n\nexport function ChartFrame({\n title,\n description,\n caveat,\n status = { kind: 'ready' },\n defaultView = 'chart',\n hideToggle = false,\n actions,\n children,\n table,\n footer,\n skeleton,\n skeletonHeight,\n}: ChartFrameProps) {\n const [view, setView] = useState<ChartView>(defaultView);\n const titleId = useId();\n const ready = status.kind === 'ready';\n const canToggle = ready && !hideToggle;\n\n function onKeyDown(e: KeyboardEvent<HTMLElement>): void {\n if (!canToggle || e.defaultPrevented) return;\n if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return;\n if (e.key.toLowerCase() !== CHART_TABLE_KEY || isEditableTarget(e.target)) return;\n e.preventDefault();\n setView((v) => (v === 'chart' ? 'table' : 'chart'));\n }\n\n return (\n <figure className={styles.frame} aria-labelledby={titleId} data-chart-card=\"\" data-view={view} onKeyDown={onKeyDown}>\n <figcaption className={styles.header}>\n <span className={styles.heading}>\n <span id={titleId} className={styles.title}>{title}</span>\n {description ? <span className={styles.description}>{description}</span> : null}\n </span>\n {actions || canToggle ? (\n <span className={styles.actions}>\n {actions}\n {canToggle ? <ViewMenu title={title} view={view} onPick={setView} /> : null}\n </span>\n ) : null}\n </figcaption>\n {caveat ? (\n <p className={styles.caveat} role=\"note\">\n {caveat}\n </p>\n ) : null}\n {!ready ? (\n <StatusMessage status={status} skeleton={skeleton} skeletonHeight={skeletonHeight} />\n ) : view === 'table' ? (\n <div className={styles.table}>{table}</div>\n ) : (\n <>\n <div className={styles.plot}>{children}</div>\n {footer}\n </>\n )}\n </figure>\n );\n}\n"],"mappings":"6iEEoBA,SAAgB,EAAY,CAAE,QAAO,MAAM,GAA4D,CAErG,OADI,EAAM,OAAS,EAAY,MAE7B,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAW,EAAK,OACjB,SAAA,EAAM,IAAK,IACV,EAAA,EAAA,KAAA,CAAC,KAAD,CAAqB,UAAW,EAAK,WAArC,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,OAAD,CACE,cAAY,OACZ,UACE,EAAK,OAAS,OAAS,EAAK,WAAa,EAAK,OAAS,QAAU,EAAK,YAAc,EAAK,OAAS,QAAU,EAAK,YAAc,EAAK,OAEtI,MAAO,EAAK,OAAS,SAAW,EAAK,OAAS,QAAU,IAAA,GAAY,CAAE,WAAY,EAAK,KAAM,CAC9F,CAAA,EACA,EAAK,KACJ,CATK,EAAA,EAAK,KASV,CACL,CACC,CAAA,CAER,CAqBA,SAAgB,EAAa,CAC3B,OACA,MACA,QACA,OACA,QAaC,CACD,IAAM,EAAM,IAAS,QAAU,GAAG,EAAK,QAAQ,GAAG,EAAK,eAAiB,IAAS,OAAS,GAAG,EAAK,QAAQ,GAAG,EAAK,cAAgB,EAAK,QACvI,OACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAK,MAAO,CAAE,OAAM,KAAI,EAAG,KAAK,eAAe,qBAAoB,GAAQ,QAA3F,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAK,aAAe,SAAA,CAAW,CAAA,EAC9C,EAAK,IAAK,IACT,EA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ShF,GAEZ"}
@@ -0,0 +1 @@
1
+ :root{--chart-series-1:var(--data-cat-1);--chart-series-2:var(--data-cat-2);--chart-series-3:var(--data-cat-3);--chart-series-4:var(--data-cat-4);--chart-series-5:var(--data-cat-5);--chart-series-6:var(--data-cat-6);--chart-neutral:var(--status-neutral-solid);--chart-seq-1:var(--data-seq-1);--chart-seq-2:var(--data-seq-2);--chart-seq-3:var(--data-seq-3);--chart-seq-4:var(--data-seq-4);--chart-seq-5:var(--data-seq-5);--chart-seq-6:var(--data-seq-6);--chart-seq-7:var(--data-seq-7);--chart-sequential:var(--chart-seq-5);--chart-sequential-soft:var(--chart-seq-3);--chart-diverging-pos:var(--chart-seq-5);--chart-diverging-neg:var(--status-danger-solid);--chart-diverging-mid:var(--border-strong);--chart-unknown:var(--status-unknown-solid);--chart-unknown-hatch:repeating-linear-gradient(135deg, var(--chart-unknown) 0 1px, transparent 1px 5px);--chart-queued-outline:var(--status-neutral-solid);--chart-grid:var(--border-subtle);--chart-axis:var(--border-strong);--chart-surface:var(--bg-surface);--chart-tooltip-bg:var(--bg-surface-raised);--chart-tooltip-border:var(--border-default);--chart-heat-0:var(--chart-grid);--chart-heat-1:var(--chart-seq-2);--chart-heat-2:var(--chart-seq-3);--chart-heat-3:var(--chart-seq-5);--chart-heat-4:var(--chart-seq-7);--chart-track:var(--chart-seq-1);--chart-quantity-ink:var(--gray-950)}._plotWrap_sf833_3{width:100%;min-width:0;position:relative}._svg_sf833_9{font-variant-numeric:tabular-nums;max-width:100%;display:block;overflow:visible}._grid_sf833_18{stroke:var(--chart-grid);stroke-width:1px;shape-rendering:crispedges}._axis_sf833_24{stroke:var(--chart-axis);stroke-width:1px;shape-rendering:crispedges}._tick_sf833_30{font-family:var(--font-ui);font-size:var(--text-xs-size);fill:var(--text-tertiary);font-variant-numeric:tabular-nums}._label_sf833_37{font-family:var(--font-ui);font-size:var(--text-xs-size);fill:var(--text-secondary)}._labelStrong_sf833_43{font-family:var(--font-ui);font-size:var(--text-xs-size);font-weight:var(--font-weight-medium);fill:var(--text-primary)}._line_sf833_50{fill:none;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round}._wash_sf833_57{stroke:none;opacity:.1}._reference_sf833_62{fill:none;stroke:var(--text-tertiary);stroke-width:1px;stroke-dasharray:4 3}._projection_sf833_69{fill:none;stroke-width:2px;stroke-dasharray:5 4;stroke-linecap:round}._marker_sf833_76{stroke:var(--chart-surface);stroke-width:2px}._crosshair_sf833_81{stroke:var(--chart-axis);stroke-width:1px;shape-rendering:crispedges;pointer-events:none}._area_sf833_89{stroke:none}._hoverBand_sf833_94{fill:var(--bg-hover);pointer-events:none}._reserveBand_sf833_102{fill:var(--status-warning-bg);pointer-events:none}._now_sf833_108{stroke:var(--text-tertiary);stroke-width:1px;stroke-dasharray:2 3;shape-rendering:crispedges;pointer-events:none}._endDot_sf833_117{stroke:var(--chart-surface);stroke-width:2px}._hit_sf833_122{fill:#0000;cursor:default}._hit_sf833_122:focus{outline:none}._hit_sf833_122:focus-visible{stroke:var(--border-focus);stroke-width:2px}._focusable_sf833_136:focus{outline:none}._focusable_sf833_136:focus-visible{outline:2px solid var(--border-focus);outline-offset:2px;border-radius:var(--radius-sm)}._track_sf833_146{fill:var(--chart-track)}._trackEmpty_sf833_160{fill:var(--meter-track)}._noData_sf833_164{fill:none;stroke:var(--chart-grid);stroke-width:1px;stroke-dasharray:2 2}._tooltip_sf833_171{z-index:var(--z-dropdown);pointer-events:none;min-width:140px;padding:var(--space-2) var(--space-3);border:1px solid var(--chart-tooltip-border);border-radius:var(--radius-md);background:var(--chart-tooltip-bg);box-shadow:var(--shadow-menu);color:var(--text-primary);font-size:var(--text-xs-size);line-height:var(--text-xs-line);font-variant-numeric:tabular-nums;white-space:nowrap;animation:_chart-tooltip-in_sf833_1 var(--duration-fast) var(--ease-decelerate);position:absolute;transform:translate(-50%,calc(-100% - 8px))}._tooltipRight_sf833_193{transform:translate(12px)}._tooltipLeft_sf833_197{transform:translate(calc(-100% - 12px))}@keyframes _chart-tooltip-in_sf833_1{0%{opacity:0}to{opacity:1}}._tooltipTitle_sf833_210{color:var(--text-tertiary);font-weight:var(--font-weight-medium);margin-bottom:var(--space-1)}._tooltipRow_sf833_216{align-items:center;gap:var(--space-2);min-height:calc(var(--text-xs-line) + 2px);display:flex}._tooltipLabel_sf833_223{color:var(--text-secondary)}._tooltipTotal_sf833_228{margin-top:var(--space-1);padding-top:var(--space-1);border-top:1px solid var(--border-subtle)}._tooltipTotal_sf833_228 ._tooltipLabel_sf833_223{color:var(--text-primary);font-weight:var(--font-weight-medium)}._tooltipKey_sf833_239{border-radius:2px;flex:none;width:8px;height:8px}._tooltipKeyLine_sf833_247{border-radius:1px;flex:none;width:10px;height:2px}._tooltipValue_sf833_254{padding-left:var(--space-3);font-weight:var(--font-weight-semibold);font-variant-numeric:tabular-nums;margin-left:auto}._tooltipMuted_sf833_261{color:var(--text-tertiary);font-style:italic}._legend_sf833_266{gap:var(--space-1) var(--space-3);margin:var(--space-2) 0 0;font-size:var(--text-xs-size);color:var(--text-secondary);flex-wrap:wrap;padding:0;list-style:none;display:flex}._legendItem_sf833_277{align-items:center;gap:var(--space-1);display:inline-flex}._swatch_sf833_283{border-radius:2px;flex:none;width:10px;height:10px}._swatchLine_sf833_290{flex:none;width:12px;height:2px}._swatchEmpty_sf833_296{border:1px dashed var(--chart-axis);border-radius:2px;flex:none;width:10px;height:10px}._note_sf833_304{margin:var(--space-2) 0 0;font-size:var(--text-xs-size);color:var(--text-tertiary)}._srOnly_sf833_310{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}[data-motion=enter] ._draw_sf833_334{animation:_chart-draw_sf833_1 calc(var(--duration-slow) * 3) var(--ease-decelerate) both}[data-motion=enter] ._fadeIn_sf833_339{animation:_chart-fade_sf833_1 calc(var(--duration-slow) * 3) var(--ease-standard) both;animation-delay:var(--duration-fast)}[data-motion=enter] ._rise_sf833_345{transform-box:fill-box;transform-origin:50% 100%;animation:_chart-rise_sf833_1 calc(var(--duration-slow) * 3) var(--ease-decelerate) both;animation-delay:calc(var(--chart-i,0) * var(--duration-instant) / 5)}[data-motion=enter] ._grow_sf833_353{transform-box:fill-box;transform-origin:0;animation:_chart-grow_sf833_1 calc(var(--duration-slow) * 3) var(--ease-decelerate) both;animation-delay:calc(var(--chart-i,0) * var(--duration-instant) / 2)}@keyframes _chart-draw_sf833_1{0%{stroke-dasharray:1 1;stroke-dashoffset:1.02px}to{stroke-dasharray:1 1;stroke-dashoffset:0}}@keyframes _chart-fade_sf833_1{0%{opacity:0}to{opacity:1}}@keyframes _chart-rise_sf833_1{0%{transform:scaleY(0)}to{transform:scaleY(1)}}@keyframes _chart-grow_sf833_1{0%{transform:scaleX(0)}to{transform:scaleX(1)}}@media (prefers-reduced-motion:reduce){:root:not([data-motion=full]) ._draw_sf833_334,:root:not([data-motion=full]) ._fadeIn_sf833_339,:root:not([data-motion=full]) ._rise_sf833_345,:root:not([data-motion=full]) ._grow_sf833_353,:root:not([data-motion=full]) ._tooltip_sf833_171,:root:not([data-motion=full]) ._skeleton_sf833_405{animation:none}}:root[data-motion=reduce] ._draw_sf833_334,:root[data-motion=reduce] ._fadeIn_sf833_339,:root[data-motion=reduce] ._rise_sf833_345,:root[data-motion=reduce] ._grow_sf833_353,:root[data-motion=reduce] ._tooltip_sf833_171,:root[data-motion=reduce] ._skeleton_sf833_405{animation:none}._skeleton_sf833_405{animation:_chart-skeleton-pulse_sf833_1 1.6s var(--ease-standard) infinite;display:block}._skeletonMark_sf833_428{fill:var(--bg-active)}._skeletonTrack_sf833_432{fill:var(--bg-hover)}._skeletonGrid_sf833_436{stroke:var(--chart-grid);stroke-width:1px;vector-effect:non-scaling-stroke;shape-rendering:crispedges}@keyframes _chart-skeleton-pulse_sf833_1{0%,to{opacity:1}50%{opacity:.55}}._monogram_sf833_454{font-family:var(--font-display);font-size:var(--text-2xs-size);font-weight:var(--font-weight-semibold);fill:var(--text-secondary);color:var(--text-secondary)}._unknownMark_sf833_464{stroke:var(--chart-unknown);stroke-width:1px}._swatchHatch_sf833_470{border:1px solid var(--chart-unknown);background:var(--chart-unknown-hatch);border-radius:2px;flex:none;width:10px;height:10px}._halo_sf833_481{paint-order:stroke;stroke:var(--chart-surface);stroke-width:3px;stroke-linejoin:round}._table_x2yvy_1{border-collapse:collapse;width:100%;font-size:var(--text-xs-size)}._table_x2yvy_1 th,._table_x2yvy_1 td{text-align:left;padding:var(--space-1) var(--space-2);border-bottom:1px solid var(--border-subtle)}._table_x2yvy_1 th{color:var(--text-tertiary);font-weight:var(--font-weight-medium);text-transform:uppercase;letter-spacing:.04em;font-size:var(--text-xs-size)}._numeric_x2yvy_22{text-align:right;font-variant-numeric:tabular-nums}._empty_x2yvy_27{color:var(--text-tertiary);text-align:center}._frame_4uyc2_1{border:1px solid var(--border-subtle);border-radius:var(--radius-lg);background:var(--bg-surface);min-width:0;padding:var(--card-pad,var(--space-4));margin:0}._header_4uyc2_11{justify-content:space-between;align-items:flex-start;gap:var(--space-3);margin-bottom:var(--space-3);flex-wrap:nowrap;display:flex}._actions_4uyc2_23{align-items:center;gap:var(--space-2);flex:none;margin-left:auto;display:inline-flex}._menuWrap_4uyc2_31{display:inline-flex;position:relative}._more_4uyc2_37{width:calc(var(--control-h-xs,20px) + 4px);height:calc(var(--control-h-xs,20px) + 4px);border-radius:var(--radius-sm);color:var(--text-tertiary);cursor:pointer;transition:background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);background:0 0;border:1px solid #0000;justify-content:center;align-items:center;padding:0;display:inline-flex}._more_4uyc2_37:hover,._more_4uyc2_37[aria-expanded=true]{background:var(--bg-hover);color:var(--text-primary)}._more_4uyc2_37:focus-visible{outline:2px solid var(--border-focus);outline-offset:1px}._menu_4uyc2_31{top:calc(100% + var(--space-1));z-index:var(--z-dropdown);min-width:176px;padding:var(--space-1);border:1px solid var(--border-default);border-radius:var(--radius-md);background:var(--bg-surface-raised);box-shadow:var(--shadow-menu);flex-direction:column;display:flex;position:absolute;right:0}._menuItem_4uyc2_78{align-items:center;gap:var(--space-2);padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);color:var(--text-primary);font:inherit;font-size:var(--text-xs-size);line-height:var(--text-xs-line);text-align:left;cursor:pointer;background:0 0;border:0;display:flex}._menuItem_4uyc2_78:hover,._menuItem_4uyc2_78:focus-visible{background:var(--bg-hover);outline:none}._check_4uyc2_100{width:1em;color:var(--text-secondary)}._hint_4uyc2_105{padding:0 var(--space-1);border:1px solid var(--border-subtle);border-radius:var(--radius-xs,3px);color:var(--text-tertiary);font-family:var(--font-mono);font-size:var(--text-2xs-size);margin-left:auto}._heading_4uyc2_17{flex-direction:column;flex:auto;gap:2px;min-width:0;display:flex}._title_4uyc2_123{font-size:var(--text-sm-size);font-weight:var(--font-weight-semibold);color:var(--text-primary)}._description_4uyc2_129{font-size:var(--text-xs-size);color:var(--text-tertiary)}._plot_4uyc2_134{width:100%;min-width:0;position:relative}._table_4uyc2_140{max-height:360px;overflow:auto}._caveat_4uyc2_145{margin:0 0 var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);background:var(--status-unknown-bg);color:var(--status-unknown-fg);font-size:var(--text-xs-size);line-height:var(--text-sm-line)}._state_4uyc2_155{padding:var(--space-6) var(--space-3);text-align:center;color:var(--text-tertiary);font-size:var(--text-sm-size);margin:0}._loading_4uyc2_164{width:100%;min-width:0;position:relative}._dark_4uyc2_170{gap:var(--space-1);flex-direction:column;align-items:center;display:flex}._darkTitle_4uyc2_177{color:var(--text-secondary);font-weight:var(--font-weight-semibold);margin:0}._darkBody_4uyc2_183{font-size:var(--text-xs-size);max-width:44ch;margin:0}._unknown_4uyc2_189{color:var(--status-unknown-fg)}
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DockHost-aWP7liri.js","assets/MutationTokenDialog-DbnO8aYi.js","assets/Dialog-D3msQlCj.js","assets/focus-trap-CtI1SlMX.js","assets/ProviderLogo-Cq-CYIwT.js","assets/verse-model-DAVevkNe.js","assets/format-CH4g_sl1.js","assets/format-D7nBg2bn.js","assets/context-queries-eL3caKVG.js","assets/context-model-Br8t9jgG.js","assets/context-model-CokrgEUq.js","assets/workspace-model-dji5-Al3.js","assets/ActionMenu-CIiX2X8w.js","assets/tool-semantics-GX8ScuSH.js","assets/line-diff-B5Eonif2.js","assets/dock-icons-BJ6ZqB2t.js","assets/command-catalog-BIntSa9l.js","assets/tasks-model-O8yR5YXp.js","assets/sidebar-model-CLCdqwkR.js","assets/use-token-gate-CbXVYQYI.js","assets/EmptyState-D2IRy3Cg.js","assets/slots-C-qBeu-8.js","assets/Button-D90dzI_o.js","assets/useVerseTranscript-DgbigUlV.js","assets/Switch-9NtO_6Lj.js","assets/context.module-BijAfoJw.js","assets/global-BlI2BYa1.css","assets/Dialog-tQ8kFulD.css","assets/MutationTokenDialog-CrfJ0PdD.css","assets/RouteErrorBoundary-DdxhTdZ6.css","assets/VerseConsoleApp-Cxqr-3qc.css","assets/ActionMenu-DPjsLU1g.css","assets/dock-icons-1w9hA2-h.css","assets/EmptyState-B3YUPGaa.css","assets/Button-DrnKsvnQ.css","assets/Switch-CU044EaE.css","assets/context-DiToyj6s.css","assets/DockHost-B4RaYOET.css","assets/NewChatDialog-BlCHtOIr.js","assets/Segmented-CGh_-tBb.js","assets/git-model-Dnkd1TnK.js","assets/SeatSelector-J5R3zDkB.js","assets/seat-subscription-C5uPHBsN.js","assets/Composer.module-C8U73KdQ.js","assets/CapacityStrip-qKDBC65C.js","assets/Tag-DscCRFcN.js","assets/budget-queries-D8QV5XtH.js","assets/capacity-strip-model-BwZ1ZbkU.js","assets/useSeatsRefresh-Co1CnxLc.js","assets/folder-picker-C8zo3A56.js","assets/Segmented-BnjHbKzH.css","assets/Composer-ByzxOJK6.css","assets/Tag-D0rAEciH.css","assets/CapacityStrip-Cc28CyWk.css","assets/NewChatDialog-yyQpA9p_.css","assets/Workspace-D1nP9BhD.js","assets/highlight-CMCZK9jW.js","assets/DiffViewer-C4WKsCIe.js","assets/MessageMarkdown-DFvk06qG.js","assets/icons-D1sYbCTQ.js","assets/verse-icons-S56hIiXS.js","assets/reasoning-pref-Ca6lN6x_.js","assets/Meter-CMj-VafN.js","assets/DiffViewer-C8HHTnVE.css","assets/MessageMarkdown-Cgh5f1-Q.css","assets/Meter-CYt9KpM0.css","assets/Workspace-Dwri2jFJ.css","assets/Sidebar-DN--cPYN.js","assets/RefreshIndicator-DO9ibnSq.js","assets/RefreshIndicator-CVv22U_j.css","assets/Sidebar-BRc1vGDF.css","assets/DeleteChatDialog-BCfP12GH.js","assets/turn-files-BPHQzYuH.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,c as t,n,s as r,t as i}from"./index-DZ-UQ7v8.js";import{D as a,L as o,T as s,_ as c,d as l,g as u,h as d,i as f,k as p,m as ee,o as te,s as m}from"./global-CMNW_dqn.js";import{r as ne}from"./RouteErrorBoundary-SkNhhUbt.js";import{C as re,Ct as ie,Dt as ae,E as oe,H as h,L as se,N as ce,Nt as g,Ot as le,Pt as _,R as ue,S as de,St as fe,T as pe,Tt as me,Y as he,_t as ge,a as _e,b as v,bn as ve,c as ye,d as be,et as xe,f as y,ft as Se,h as Ce,i as we,it as Te,lt as Ee,m as De,o as Oe,p as ke,st as Ae,u as b,ut as x,v as je,w as Me,wt as Ne}from"./VerseConsoleApp-CWU6R3By.js";import{a as Pe,c as Fe,d as S,f as Ie,i as C,l as Le,m as Re,n as ze,r as Be,s as Ve,t as He,u as Ue}from"./verse-store-DNVRuiJL.js";var w=t(e(),1),T=new Map;function We(e,t){return T.set(e,t),()=>{T.get(e)===t&&T.delete(e)}}function Ge(e,t){let n=t.replace(/\s+$/,``);return e.trim()?`${e.replace(/\s+$/,``)}\n\n${n}`:n}function E(e=document){let t=e.querySelector(`textarea[aria-label="Message"]`);return t instanceof HTMLTextAreaElement?t:null}function Ke(e,t){if(!t.trim())return!1;let n=T.get(e);if(n)return n(t),!0;let r=E();if(!r||r.disabled)return!1;let i=Ge(r.value,t),a=Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,`value`)?.set;a?a.call(r,i):r.value=i,r.dispatchEvent(new Event(`input`,{bubbles:!0})),r.focus();let o=r.value.length;try{r.setSelectionRange(o,o)}catch{}return!0}function D(e){return`verse-session-roots:${e}`}var qe={key:`verse-session-roots:none`,fetch:async()=>null};function Je(e){return e?[e.projectPath,...(e.extraRoots??[]).filter(t=>t!==e.projectPath)]:[]}function Ye(e){let t=e?.id??null,n=(0,w.useMemo)(()=>t?{key:D(t),fetch:e=>be(t,e)}:qe,[t]),r=d(n),i=u(n),a=e?.turnCount??0,o=(0,w.useRef)({id:t,turns:a});(0,w.useEffect)(()=>{let e=o.current;o.current={id:t,turns:a},e.id===t&&e.turns!==a&&t&&i()},[t,a,i]);let s=r.data??null,c=s!==null&&Array.isArray(s.roots)?s:null,l=(0,w.useMemo)(()=>Je(e),[e?.projectPath,e?.extraRoots]),f=(0,w.useMemo)(()=>{if(!c||c.roots.length===0)return l;let e=c.roots.filter(e=>e.primary).map(e=>e.path),t=c.roots.filter(e=>!e.primary).map(e=>e.path);return[...e,...t]},[c,l]),p=c?.roots.find(e=>e.primary)??c?.roots[0]??null;return{data:c,error:r.status===`error`?r.error?.message??`could not read this chat’s folders`:null,roots:f,branch:p?.git?.branch??null}}var O=new Set;function k(e){return O.add(e),()=>O.delete(e)}function A(e){let t=!1;for(let n of[...O])n(e)&&(t=!0);return t}var j=new Set;function M(e){return j.add(e),()=>j.delete(e)}function Xe(){let e=!1;for(let t of[...j])t()&&(e=!0);return e}var N=new Set;function Ze(e){return N.add(e),()=>N.delete(e)}function Qe(e){let t=!1;for(let n of[...N])n(e)&&(t=!0);return t}var P=n(),F=[`user-message`,`turn-started`,`text-delta`,`assistant-message`,`thinking`,`tool-use`,`tool-result`,`usage`,`turn-done`,`error`,`cancelled`,`compaction`,`context`,`thinking-delta`,`thinking-progress`,`progress`,`status`,`recovered`,`history-truncated`];function I(e){return Math.min(1e3*2**e,15e3)}var L=e=>e===null||typeof e==`number`&&Number.isFinite(e)&&e>=0;function $e(e){return e.type===`context`?typeof e.contextTokens==`number`&&Number.isFinite(e.contextTokens)&&e.contextTokens>=0&&typeof e.exact==`boolean`&&L(e.contextWindow)&&(e.autoCompactAt===void 0||L(e.autoCompactAt)):e.type!==`compaction`||(e.trigger===`auto`||e.trigger===`manual`)&&L(e.preTokens)&&L(e.postTokens)&&L(e.durationMs)}var R=e=>e===void 0||typeof e==`number`&&Number.isFinite(e)&&e>=0;function et(e){switch(e.type){case`thinking-delta`:return typeof e.text==`string`;case`thinking-progress`:return e.estimatedTokens!==void 0&&R(e.estimatedTokens);case`progress`:return(e.phase===`thinking`||e.phase===`tool`||e.phase===`writing`||e.phase===`waiting`)&&typeof e.elapsedMs==`number`&&Number.isFinite(e.elapsedMs)&&e.elapsedMs>=0&&(e.tool===void 0||typeof e.tool==`string`)&&R(e.outTokens)&&R(e.tokPerSec);case`status`:return(e.kind===`retry`||e.kind===`preflight`||e.kind===`watchdog`)&&typeof e.message==`string`;case`history-truncated`:return typeof e.droppedBefore==`number`&&Number.isFinite(e.droppedBefore);default:return!0}}function tt(e){try{let t=JSON.parse(e);if(!t||typeof t!=`object`)return null;let n=t;return typeof n.seq!=`number`||typeof n.type!=`string`||!$e(t)||!et(t)?null:t}catch{return null}}var nt=`verse-sessions`;function rt(e=!0){return`/api/events?${e?`topics=${nt}&`:``}client=${encodeURIComponent(p())}`}var it=!1;function at(){let e=null,t=null,n=0,r=!1,i=!1,o=()=>{if(r||typeof EventSource>`u`||a().phase!==`authenticated`)return;let s=!it&&!i,c=new EventSource(rt(s),{withCredentials:!0}),l=!1;e=c,c.onopen=()=>{l=!0,n=0,i&&=(it=!0,!1)},c.addEventListener(`verse-sessions`,()=>y()),c.onerror=()=>{if(c.close(),e===c&&(e=null),!(r||a().phase!==`authenticated`)){if(!l&&s){i=!0,o();return}i=!1,t=setTimeout(()=>{t=null,n+=1,o()},I(n))}}};return o(),()=>{r=!0,t&&clearTimeout(t),t=null,e?.close(),e=null}}var ot=9e4,st=250;function ct(e,t){let n=Number.isSafeInteger(t)&&t>0?`after=${t}&`:``;return`${Me(e,`/events`)}?${n}client=${encodeURIComponent(p())}`}function lt(e){return Math.min(1e3*2**e,15e3)}function ut(){return globalThis.IS_REACT_ACT_ENVIRONMENT===!0}var dt=e=>{let t=!1,n=()=>{t||(t=!0,r!==null&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(r),clearTimeout(i),e())},r=(typeof document>`u`||document.visibilityState!==`hidden`)&&typeof requestAnimationFrame==`function`?requestAnimationFrame(n):null,i=setTimeout(n,r===null?0:st);return()=>{t=!0,r!==null&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(r),clearTimeout(i)}};function ft(e){return ut()?(e(),null):dt(e)}var pt=class{sessionId;queue=[];cancel=null;scheduled=!1;constructor(e){this.sessionId=e}push(e){if(this.queue.push(e),this.scheduled)return;this.scheduled=!0;let t=ft(()=>this.flush());this.scheduled&&(this.cancel=t)}flush(){if(this.scheduled=!1,this.cancel?.(),this.cancel=null,this.queue.length===0)return;let e=this.queue;this.queue=[],He(this.sessionId,e).settled&&y()}drop(){this.scheduled=!1,this.cancel?.(),this.cancel=null,this.queue=[]}},z=!1,B=0;function mt(e){let t=null,n=null,r=0,i=!1,o=!1,s=new pt(e),c=()=>{if(i||typeof EventSource>`u`||a().phase!==`authenticated`)return;S(e,r===0?`connecting`:`reconnecting`);let l=z||o?0:Pe(e).lastSeq,u=new EventSource(ct(e,l),{withCredentials:!0}),d=!1;t=u,u.onopen=()=>{d=!0,r=0,o&&=(z=!0,!1),S(e,`open`)};for(let e of F)u.addEventListener(e,e=>{if(t!==u)return;let n=tt(e.data);n&&s.push(n)});u.onerror=f=>{if(!(typeof MessageEvent<`u`&&f instanceof MessageEvent)&&(s.flush(),!i)){if(typeof u.readyState==`number`&&u.readyState===B){S(e,`reconnecting`);return}if(u.close(),t===u&&(t=null),S(e,`reconnecting`),a().phase===`authenticated`){if(!d&&l>0&&!o){o=!0,c();return}o=!1,n=setTimeout(()=>{n=null,r+=1,c()},lt(r))}}}},l=()=>{n&&clearTimeout(n),n=null,t?.close(),t=null};return c(),{close(){i||(i=!0,l(),s.flush(),s.drop(),S(e,`closed`))},restart(){i||(l(),s.flush(),r=0,c())}}}var V=new Map;function H(e){let t=V.get(e);t&&(V.delete(e),t.idleTimer&&clearTimeout(t.idleTimer),t.stream.close())}function ht(){let e=[...V.entries()].filter(([,e])=>e.refs===0).sort((e,t)=>e[1].releasedAt-t[1].releasedAt);for(;e.length>1;)H(e.shift()[0])}function gt(e){let t=V.get(e);t?(t.refs+=1,t.idleTimer&&clearTimeout(t.idleTimer),t.idleTimer=null):(t={stream:mt(e),refs:1,idleTimer:null,releasedAt:0},V.set(e,t));let n=t,r=!1;return()=>{r||(r=!0,V.get(e)===n&&(--n.refs,!(n.refs>0)&&(n.releasedAt=Date.now(),n.idleTimer=setTimeout(()=>{V.get(e)===n&&n.refs===0&&H(e)},ot),ht())))}}function _t(){for(let e of[...V.keys()])H(e)}Re(e=>{e.kind===`reset`?_t():H(e.sessionId)});function vt(e,t={}){let n=new AbortController,r=null,i=!1,a=()=>{i||r||(r=gt(e))},o=Pe(e);return t.reload!==!0&&o.loaded&&o.loadError===null?a():(t.reload&&V.get(e)?.stream.restart(),b(e,n.signal).then(t=>{n.signal.aborted||(Ve(e,t.session,t.events),a())}).catch(t=>{n.signal.aborted||Fe(e,t instanceof Error?t.message:`Could not load this chat.`)})),()=>{i=!0,n.abort(),r?.(),r=null}}var U=()=>()=>{};function W(e){return(0,w.useCallback)(t=>e?Ie(e,t):U(),[e])}function yt(e,t=0){let n=W(e),r=(0,w.useSyncExternalStore)(n,()=>C(e),()=>C(e)),i=(0,w.useRef)({sessionId:null,reload:t});return(0,w.useEffect)(()=>{let n=i.current;if(i.current={sessionId:e,reload:t},e)return vt(e,{reload:n.sessionId===e&&n.reload!==t})},[e,t]),r}function G(e){let t=W(e);return(0,w.useSyncExternalStore)(t,()=>Be(e),()=>Be(e))}var bt=5e3,K=new Map,xt=new Set;function St(e){return xt.add(e),()=>xt.delete(e)}function Ct(){return K}function wt(e,t){if(!((K.get(e)??-1)>=t)){K=new Map(K).set(e,t);for(let e of[...xt])e();ke(e,t)}}function Tt(){return(0,w.useSyncExternalStore)(St,Ct,Ct)}function Et(){let e=d(v,{freshMs:4500}),t=d(re),n=u(v),r=(0,w.useCallback)(()=>n(),[n]);se(r,bt);let i=Tt();return{activity:e.data??null,meta:t.data??null,metaError:t.status===`error`?l(t.error):null,localSeen:i}}var q={sidebar:{min:220,max:420,def:264},resources:{min:240,max:520,def:320}},Dt=1,Ot=`ashlr.verse.panels.v1`,kt=`ashlr.verse.ui.v2`,At={containerWidth:0,sidebarVisible:!0,resourcesVisible:!0};function J(e,t){let n=q[e],r=Number(t);return!Number.isFinite(r)||r<=0?n.def:Math.max(n.min,Math.min(n.max,Math.round(r)))}function jt(e,t){let n=J(`sidebar`,e.sidebar),r=J(`resources`,e.resources);if(!Number.isFinite(t.containerWidth)||t.containerWidth<=0)return{sidebar:n,resources:r};let i=(t.sidebarVisible?Dt:0)+(t.resourcesVisible?Dt:0),a=t.containerWidth-480-i,o=(t.sidebarVisible?n:0)+(t.resourcesVisible?r:0)-a;if(o<=0)return{sidebar:n,resources:r};if(t.resourcesVisible){let e=Math.min(o,r-q.resources.min);r-=e,o-=e}if(o>0&&t.sidebarVisible){let e=Math.min(o,n-q.sidebar.min);n-=e}return{sidebar:n,resources:r}}function Mt(){return{sidebar:q.sidebar.def,resources:q.resources.def}}function Nt(e){if(e===null||e===``)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t,r=n.sidebar??n.sidebarWidth,i=n.resources??n.resourcesWidth;return r===void 0&&i===void 0?null:{sidebar:J(`sidebar`,r),resources:J(`resources`,i)}}function Pt(){try{return Nt(localStorage.getItem(Ot))||(Nt(localStorage.getItem(kt))??Mt())}catch{return Mt()}}function Ft(e){try{localStorage.setItem(Ot,JSON.stringify({sidebar:e.sidebar,resources:e.resources}))}catch{}}var Y=Pt(),X=At,Z={desired:Y,effective:jt(Y,X)},It=new Set;function Lt(e,t){return e.sidebar===t.sidebar&&e.resources===t.resources}function Rt(){let e=jt(Y,X);if(!(Lt(Z.desired,Y)&&Lt(Z.effective,e))){Z={desired:Y,effective:e};for(let e of It)e()}}function zt(e){return It.add(e),()=>{It.delete(e)}}function Bt(){return Z}function Vt(e){(X.containerWidth!==e.containerWidth||X.sidebarVisible!==e.sidebarVisible||X.resourcesVisible!==e.resourcesVisible)&&(X=e,Rt())}function Ht(e){Lt(Y,e)||(Y=e,Ft(Y),Rt())}function Q(e,t){Ht({...Y,[e]:J(e,t)})}function Ut(e,t){Q(e,Z.effective[e]+t)}function Wt(e){Q(e,q[e].def)}function Gt(){return(0,w.useSyncExternalStore)(zt,Bt,Bt)}var Kt=`verseResizing`;function qt(e){try{e?document.body.dataset[Kt]=`true`:delete document.body.dataset[Kt]}catch{}}function Jt({side:e,label:t,className:n}){let r=Gt(),i=q[e],a=r.effective[e],o=(0,w.useRef)(null),[s,c]=(0,w.useState)(!1),l=(0,w.useCallback)(()=>{o.current&&(o.current=null,c(!1),qt(!1))},[]),u=(0,w.useCallback)(e=>{if(e.button===0){e.preventDefault(),o.current={pointerId:e.pointerId,originX:e.clientX,startWidth:a},c(!0),qt(!0);try{e.currentTarget.setPointerCapture?.(e.pointerId)}catch{}}},[a]);(0,w.useEffect)(()=>{if(!s)return;let t=t=>{let n=o.current;if(!n||t.pointerId!==n.pointerId)return;let r=t.clientX-n.originX;Q(e,e===`sidebar`?n.startWidth+r:n.startWidth-r)},n=e=>{let t=o.current;t&&e.pointerId!==t.pointerId||l()},r=t=>{let n=o.current;n&&t.key===`Escape`&&(Q(e,n.startWidth),l())},i=()=>l();return window.addEventListener(`pointermove`,t),window.addEventListener(`pointerup`,n),window.addEventListener(`pointercancel`,n),window.addEventListener(`keydown`,r),window.addEventListener(`blur`,i),()=>{window.removeEventListener(`pointermove`,t),window.removeEventListener(`pointerup`,n),window.removeEventListener(`pointercancel`,n),window.removeEventListener(`keydown`,r),window.removeEventListener(`blur`,i),qt(!1)}},[s,e,l]);let d=(0,w.useCallback)(t=>{let n=t.shiftKey?64:16,r=e===`sidebar`?1:-1;switch(t.key){case`ArrowRight`:Ut(e,n*r);break;case`ArrowLeft`:Ut(e,-n*r);break;case`Home`:Q(e,i.min);break;case`End`:Q(e,i.max);break;case`Enter`:Wt(e);break;default:return}t.preventDefault()},[e,i.min,i.max]);return(0,P.jsx)(`div`,{className:n,"data-verse-resizer":e,"data-dragging":s?`true`:void 0,role:`separator`,"aria-orientation":`vertical`,"aria-label":t,"aria-valuemin":i.min,"aria-valuemax":i.max,"aria-valuenow":a,"aria-valuetext":`${a} pixels`,tabIndex:0,onPointerDown:u,onPointerUp:l,onPointerCancel:l,onLostPointerCapture:l,onKeyDown:d,onDoubleClick:()=>Wt(e)})}var $={chat:`_chat_14h0e_13`,main:`_main_14h0e_36`,banner:`_banner_14h0e_46`,bannerWarn:`_bannerWarn_14h0e_47`,resize:`_resize_14h0e_90`,scrim:`_scrim_14h0e_11`,dialogActions:`_dialogActions_14h0e_157`,sidebarSkeleton:`_sidebarSkeleton_14h0e_167`,workspaceSkeleton:`_workspaceSkeleton_14h0e_175`,skeletonHeader:`_skeletonHeader_14h0e_181`,skeletonBody:`_skeletonBody_14h0e_189`,skeletonComposer:`_skeletonComposer_14h0e_199`},Yt=r({ChatSection:()=>bn,describeChatError:()=>gn,preloadChatSurface:()=>dn}),Xt=(0,w.lazy)(()=>i(()=>import(`./DockHost-aWP7liri.js`).then(e=>({default:e.DockHost})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]))),Zt=(0,w.lazy)(()=>i(()=>import(`./NewChatDialog-BlCHtOIr.js`).then(e=>({default:e.NewChatDialog})),__vite__mapDeps([38,2,3,5,39,8,6,7,40,9,41,42,43,44,4,45,46,47,10,48,11,49,26,27,29,30,50,51,52,53,54]))),Qt=g(()=>i(()=>import(`./Workspace-D1nP9BhD.js`).then(e=>e.Workspace),__vite__mapDeps([55,3,2,1,4,56,57,58,5,6,7,8,42,43,46,47,10,48,22,12,13,14,15,59,60,16,17,18,61,19,21,20,23,62,26,27,28,63,29,30,64,51,34,31,32,33,65,66]))),$t=Qt.Slot,en=g(()=>i(()=>import(`./Sidebar-DN--cPYN.js`).then(e=>e.Sidebar),__vite__mapDeps([67,2,3,68,5,42,6,7,11,49,22,12,15,13,14,18,60,59,16,26,27,69,29,30,34,31,32,70]))),tn=en.Slot,nn=g(()=>i(()=>import(`./DeleteChatDialog-BCfP12GH.js`).then(e=>e.DeleteChatDialog),__vite__mapDeps([71,2,3,22,27,34]))),rn=nn.Slot,an=g(()=>i(()=>import(`./MutationTokenDialog-DbnO8aYi.js`).then(e=>e.n).then(e=>e.MutationTokenDialog),__vite__mapDeps([1,2,3,26,27,28]))),on=an.Slot,sn=_(()=>Promise.all([i(()=>import(`./tasks-model-O8yR5YXp.js`),__vite__mapDeps([17,5,13,14,18,26,29,30])),i(()=>import(`./turn-files-BPHQzYuH.js`),__vite__mapDeps([72,13,14]))]).then(([e,t])=>({otherRunningChats:e.otherRunningChats,lastTurnFiles:t.lastTurnFiles}))),cn=_(()=>i(()=>import(`./verse-model-DAVevkNe.js`).then(e=>e.E).then(e=>({firstRunnableModel:e.firstRunnableModel,seatById:e.seatById})),__vite__mapDeps([5,26,29,30]))),ln=[],un=[];function dn(){return Promise.all([Qt.ready(),en.ready(),nn.ready(),an.ready(),sn.ready(),cn.ready()])}function fn(){return(0,P.jsx)(`nav`,{className:$.sidebarSkeleton,"aria-busy":`true`,"aria-label":`Loading chat list`,children:[64,82,58,76,70].map(e=>(0,P.jsx)(f,{width:`${e}%`},e))})}function pn(){return(0,P.jsxs)(`div`,{className:$.workspaceSkeleton,role:`status`,"aria-label":`Loading chat`,children:[(0,P.jsx)(`div`,{className:$.skeletonHeader,children:(0,P.jsx)(f,{width:`32%`})}),(0,P.jsxs)(`div`,{className:$.skeletonBody,children:[(0,P.jsx)(f,{width:`72%`}),(0,P.jsx)(f,{width:`88%`}),(0,P.jsx)(f,{width:`64%`})]}),(0,P.jsx)(`div`,{className:$.skeletonComposer,children:(0,P.jsx)(f,{width:`100%`})})]})}var mn=`ashlr.verse.selected.v1`;function hn(){try{return localStorage.getItem(mn)}catch{return null}}function gn(e){return e instanceof m?"This server was started without dispatch — run `ashlr verse` to chat.":e instanceof te?e.code===`VERSE_MODEL_UNAVAILABLE`?`${(e.detail??`This chat's model cannot run on its seat.`).replace(/\.?$/,`.`)} Continue in a fresh chat on a model this seat can run, or re-pin the seat's CLI (\`ashlr resources profile repin\`).`:e.status===409&&(e.code===null||e.code===`VERSE_SESSION_BUSY`)?`A turn is already running in this chat. Stop it first.`:e.status===413?`That message is too large (64 KB max).`:e.status===401?`Mutation token was rejected. Unlock again with the token ashlr verse printed.`:e.detail??e.message:e instanceof Error?e.message:`Something went wrong.`}function _n(){let[e,t]=(0,w.useState)(()=>typeof window>`u`?1440:window.innerWidth||1440);return(0,w.useEffect)(()=>{let e=()=>t(window.innerWidth||1440);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function vn(){requestAnimationFrame(()=>{document.querySelector(`textarea[aria-label="Message"]`)?.focus()})}function yn(e){return e instanceof Element&&e.closest(`[role="dialog"], [role="menu"], [role="listbox"], [aria-modal="true"]`)!==null}function bn(){let e=d(de),t=d(pe),n=c(pe),r=c(de),i=ee(),a=ne(),l=ce(),u=ue(),f=Ne(),p=Et(),te=_n(),[m,re]=(0,w.useState)(hn),[se,g]=(0,w.useState)(``),[_,v]=(0,w.useState)({open:!1}),[be,y]=(0,w.useState)(!1),[ke,b]=(0,w.useState)(null),[Me,Pe]=(0,w.useState)(0),[Fe,S]=(0,w.useState)({open:!1,reason:``}),[Ie,C]=(0,w.useState)(null),[Re,Be]=(0,w.useState)(null),[Ve,He]=(0,w.useState)(0),T=(0,w.useRef)(null),We=(0,w.useRef)(null),Ge=Gt(),E=(0,w.useMemo)(()=>e.data?.seats??[],[e.data]),D=(0,w.useMemo)(()=>e.data?.projects??[],[e.data]),qe=d(oe),Je=(0,w.useMemo)(()=>qe.data?.workspaces??[],[qe.data]),O=e.data?.dispatchEnabled??!0,k=yt(m,Me),A=Ye(k.session),j=(0,w.useMemo)(()=>{let n=t.data??e.data?.sessions??[];if(!k.session)return n;let r=k.session;return n.some(e=>e.id===r.id)?n.map(e=>e.id===r.id?r:e):[r,...n]},[t.data,e.data,k.session]),M=(0,w.useCallback)(e=>{re(e);try{e?localStorage.setItem(mn,e):localStorage.removeItem(mn)}catch{}},[]);(0,w.useEffect)(()=>{m&&t.data&&!t.data.some(e=>e.id===m)&&!k.session&&M(null)},[m,t.data,k.session,M]),(0,w.useEffect)(()=>at(),[]);let N=(0,w.useRef)(m);(0,w.useEffect)(()=>{Ae(m),N.current!==m&&(N.current=m,Se())},[m]);let Ze=k.session?.turnCount??null;(0,w.useEffect)(()=>{u&&m&&Ze!==null&&(typeof document>`u`||document.visibilityState!==`hidden`)&&wt(m,Ze)},[u,m,Ze]);let F=(0,w.useCallback)((e,t)=>i.hasHold?t():new Promise((n,r)=>{T.current={run:()=>{t().then(n,r)},cancel:()=>n(null)},S({open:!0,reason:e})}),[i.hasHold]),I=(0,w.useCallback)(e=>{e instanceof we||a.show(gn(e),`danger`)},[a]),L=(0,w.useCallback)((e={})=>{b(null);let t=k.session,n=e.projectPath===void 0?t?.projectPath??null:e.projectPath,r=t&&n===t.projectPath?{seatId:t.seatId,model:t.model}:null,i=e.seat??r??xe(n);v({open:!0,projectPath:n,seat:i})},[k.session]),$e=(0,w.useCallback)(async e=>{await F(`Starting a chat spawns an agent process for this project.`,async()=>{y(!0),b(null);try{let t=await Oe(e);Te(t.projectPath,{seatId:t.seatId,model:t.model}),Le(t.id,t),v({open:!1}),M(t.id),a.show(`Started “${t.title}”`,`success`)}catch(e){b(gn(e))}finally{y(!1)}})},[F,M,a]),R=(0,w.useCallback)(async e=>{let t=m;return t?await F(`Sending a message runs the agent against this project.`,async()=>{Ue(t,`running`);try{let n=await Ce(t,e);return Le(t,n.session,n.turnId),!0}catch(e){return Ue(t,`idle`),I(e),!1}})===!0:!1},[m,F,I]),et=(0,w.useCallback)((e=m)=>{e&&F(`Stopping the running turn.`,async()=>{try{await _e(e)}catch(e){I(e)}})},[m,F,I]),tt=(0,w.useCallback)(async(e,t)=>await F(`Renaming a chat.`,async()=>{try{let n=await De(e,t);return Le(e,n),!0}catch(e){return I(e),!1}})===!0,[F,I]),nt=(0,w.useCallback)(async e=>await F(`Deleting a chat removes its transcript from disk.`,async()=>{try{return await ye(e),ze(e),o(e),e===m&&M(null),a.show(`Chat deleted.`,`neutral`),!0}catch(e){return I(e),!1}})===!0,[F,I,M,a,m]),rt=(0,w.useCallback)((e,t,n)=>{F(n,async()=>{try{await je(e,t)}catch(e){I(e)}})},[F,I]),it=(0,w.useCallback)(e=>{let t=k.session;t&&(L({projectPath:t.projectPath,seat:e}),a.show(`Chats are bound to one seat — starting a new chat on the same project.`,`neutral`))},[k.session,L,a]),ot=(0,w.useCallback)(e=>{let t=j.find(t=>t.id===e)??null;t&&Be(t)},[j]),st=(0,w.useCallback)(e=>{e!==m&&M(e),C(e)},[m,M]),ct=(0,w.useCallback)(e=>{M(e),window.matchMedia?.(`(max-width: 760px)`)?.matches===!0&&x(!0)},[M]),lt=(0,w.useCallback)(()=>x(!l.sidebarCollapsed),[l.sidebarCollapsed]),ut=f.state.open&&(f.state.active===`terminal`||f.state.splitWith===`terminal`),dt=(0,w.useCallback)(()=>{ut?ie(`terminal`):ge({})},[ut]),ft=(0,w.useCallback)(()=>ge({newTab:!0}),[]),pt=(0,w.useRef)(0),z=cn.useLoaded();(0,w.useEffect)(()=>{let e=l.command;if(e&&e.nonce!==pt.current&&(e.name!==`new-chat`||z)){switch(pt.current=e.nonce,e.name){case`open-session`:e.sessionId&&M(e.sessionId);break;case`focus-composer`:vn();break;case`new-chat`:{let{seatById:t,firstRunnableModel:n}=z,r=e.seatId?t(E,e.seatId):void 0,i=xe(e.projectPath??null),a=r?i?.seatId===r.id?i.model:n(r)?.id:void 0;L({...e.projectPath===void 0?{}:{projectPath:e.projectPath},...r&&a?{seat:{seatId:r.id,model:a}}:{}});break}}he()}},[l.command,L,E,M,z]);let B=new Map([[`chat.sidebar`,lt],[`chat.find`,()=>Xe()],[`chat.turn-prev`,()=>Qe(-1)],[`chat.turn-next`,()=>Qe(1)],[`dock.toggle`,fe],[`dock.terminal`,dt],[`dock.terminal-new`,ft],[`dock.preview`,()=>ie(`preview`)],[`dock.diff`,()=>ie(`diff`)]]);h(`chat.sidebar`,B.get(`chat.sidebar`)),h(`chat.find`,B.get(`chat.find`)),h(`chat.turn-prev`,B.get(`chat.turn-prev`)),h(`chat.turn-next`,B.get(`chat.turn-next`)),h(`dock.toggle`,B.get(`dock.toggle`)),h(`dock.terminal`,B.get(`dock.terminal`)),h(`dock.terminal-new`,B.get(`dock.terminal-new`)),h(`dock.preview`,B.get(`dock.preview`)),h(`dock.diff`,B.get(`dock.diff`));let mt=(0,w.useRef)(B);mt.current=B,(0,w.useEffect)(()=>{if(!u)return;let e=e=>{if(e.defaultPrevented||yn(e.target))return;let t=ve(e,[`chat`]);if(!t||t.scope!==`chat`||t.id===`chat.find`||t.id===`chat.turn-prev`||t.id===`chat.turn-next`)return;let n=mt.current.get(t.id);n&&(e.preventDefault(),n())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[u]);let V=e.data?!e.data.dispatchEnabled:!1,H=l.sidebarCollapsed,ht=le(te),gt=f.state.open&&f.state.tabs.length>0,_t=gt&&ht===`column`,vt=H?0:q.sidebar.min,U=_t?Math.max(me.minWidth,Math.min(ae(f.state.width,te),Ve>0?Ve-480-vt:1/0)):0;(0,w.useEffect)(()=>{let e=We.current;if(!e)return;let t=()=>{He(e.clientWidth),Vt({containerWidth:Math.max(0,e.clientWidth-U),sidebarVisible:!H,resourcesVisible:!1})};t();let n=typeof ResizeObserver==`function`?new ResizeObserver(t):null;return n?.observe(e),window.addEventListener(`resize`,t),()=>{n?.disconnect(),window.removeEventListener(`resize`,t)}},[H,U]);let W={"--verse-sidebar-width":`${Ge.effective.sidebar}px`,"--verse-dock-width":`${U}px`},G=sn.useLoaded(),bt=(0,w.useMemo)(()=>G?G.otherRunningChats(j,p.activity,m):ln,[G,j,p.activity,m]),K=(0,w.useMemo)(()=>G?G.lastTurnFiles(k.events,A.roots):un,[G,A.roots,k.events]),xt={setPinned:(e,t)=>rt(e,{pinned:t},t?`Pinning a chat.`:`Unpinning a chat.`),setArchived:(e,t)=>rt(e,{archived:t},t?`Archiving a chat.`:`Unarchiving a chat.`),rename:tt,handoff:st,requestDelete:ot,dispatchEnabled:O};return(0,P.jsxs)(`div`,{ref:We,className:$.chat,style:W,"data-sidebar":H?`collapsed`:`open`,"data-dock":_t?`open`:`closed`,children:[(0,P.jsx)(w.Suspense,{fallback:(0,P.jsx)(fn,{}),children:(0,P.jsx)(tn,{sessions:j,sessionsStatus:t.status,sessionsError:t.error?.message??null,projects:D,seats:E,selectedId:m,query:se,onQuery:g,onSelect:ct,onNew:()=>L(),onRetry:()=>{n(),r()},onCollapse:()=>x(!0),onDisconnect:()=>{s()},activity:p.activity,meta:p.meta,metaError:p.metaError,localSeen:p.localSeen,actions:xt})}),H?null:(0,P.jsx)(Jt,{side:`sidebar`,label:`Resize chat list`,className:$.resize}),(0,P.jsx)(`button`,{type:`button`,className:$.scrim,"aria-label":`Close chat list`,tabIndex:-1,onClick:()=>x(!0)}),(0,P.jsxs)(`div`,{className:$.main,children:[e.status===`error`&&!e.data?(0,P.jsxs)(`div`,{role:`alert`,className:$.banner,children:[(0,P.jsx)(`span`,{children:e.error?.message??`Could not load Verse.`}),(0,P.jsx)(`button`,{type:`button`,onClick:r,children:`Retry`})]}):V?(0,P.jsxs)(`div`,{role:`status`,className:$.bannerWarn,children:[`Read-only: this server was started without dispatch. Run `,(0,P.jsx)(`code`,{children:`ashlr verse`}),` to send messages.`]}):null,(0,P.jsx)(w.Suspense,{fallback:(0,P.jsx)(pn,{}),children:(0,P.jsx)($t,{view:k,seats:E,projects:D,dispatchEnabled:O,locked:!i.hasHold,hasAnySessions:j.length>0,onSend:R,onStop:()=>et(),onRename:e=>m?tt(m,e):Promise.resolve(!1),onRequestDelete:()=>{m&&ot(m)},onSeatChange:it,onNew:()=>L(),onRetry:()=>Pe(e=>e+1),sidebarCollapsed:H,onToggleSidebar:()=>x(!H),onOpenSession:M,handoffOpen:Ie!==null&&Ie===m,onHandoffOpenChange:e=>C(e?m:null),otherRunning:bt})})]}),gt?(0,P.jsx)(w.Suspense,{fallback:null,children:(0,P.jsx)(Xt,{presentation:ht,windowWidth:te,columnWidth:U,session:k.session,seats:E,events:k.events,roots:A.roots,rootsData:A.data,rootsError:A.error,turnFiles:K,otherRunning:bt,dispatchEnabled:O,onOpenSession:M,onHandoff:e=>C(e),onOpenAccounts:()=>Ee(`apps`),onSendToChat:e=>{(!m||!Ke(m,e))&&a.show(`Open a chat to send this to it.`,`neutral`)},onAddToMessage:e=>{(!m||!Ke(m,e))&&a.show(`Open a chat to add this to its message.`,`neutral`)}})}):null,_.open?(0,P.jsx)(w.Suspense,{fallback:null,children:(0,P.jsx)(Zt,{open:!0,onClose:()=>v({open:!1}),projects:D,seats:E,workspaces:Je,initialProjectPath:_.projectPath??null,initialSeat:_.seat??null,busy:be,error:ke,onCreate:$e,runMutation:F})}):null,(0,P.jsxs)(w.Suspense,{fallback:null,children:[(0,P.jsx)(rn,{target:Re,onClose:()=>Be(null),onDelete:nt,actionsClassName:$.dialogActions}),(0,P.jsx)(on,{open:Fe.open,reason:Fe.reason,tokenLabel:`Mutation token`,tokenHelp:`the mutation token ashlr verse printed`,onClose:()=>{S({open:!1,reason:``});let e=T.current;e&&setTimeout(()=>{T.current===e&&(T.current=null,e.cancel())},0)},onUnlocked:()=>{let e=T.current;T.current=null,e?.run()}})]})]})}export{bn as ChatSection,k as a,Ye as c,gn as describeChatError,M as i,Ge as l,W as n,Ze as o,dn as preloadChatSurface,G as r,A as s,Yt as t,We as u};
3
+ //# sourceMappingURL=ChatSection-DlT4QU6a.js.map