@band-app/server 0.19.0 → 0.20.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 (165) hide show
  1. package/dist/client/assets/{DockviewBrowserContainer-DZtIWqpD.js → DockviewBrowserContainer-CE6D36cE.js} +2 -2
  2. package/dist/client/assets/{DockviewTerminalContainer-CuCLFf9Q.js → DockviewTerminalContainer-CqH5m62N.js} +2 -2
  3. package/dist/client/assets/TerminalPanel-BCLbEfyo.js +5 -0
  4. package/dist/client/assets/{_basePickBy-CO9jQnZa.js → _basePickBy-CosPBGEe.js} +1 -1
  5. package/dist/client/assets/{_baseUniq-DGqwnf8z.js → _baseUniq-CNCpSB0P.js} +1 -1
  6. package/dist/client/assets/{arc-BMkYdJIp.js → arc-UDGCZidA.js} +1 -1
  7. package/dist/client/assets/{architectureDiagram-VXUJARFQ-CQCPK2yK.js → architectureDiagram-VXUJARFQ-CeS1u1s5.js} +1 -1
  8. package/dist/client/assets/{blockDiagram-VD42YOAC-DdR7KelQ.js → blockDiagram-VD42YOAC-DNtrsJ3_.js} +1 -1
  9. package/dist/client/assets/{c4Diagram-YG6GDRKO-R9AqKMUN.js → c4Diagram-YG6GDRKO-L-AKg5Ca.js} +1 -1
  10. package/dist/client/assets/channel-vYE3Ojmg.js +1 -0
  11. package/dist/client/assets/{chunk-4BX2VUAB-BnKGVCzE.js → chunk-4BX2VUAB-6WG78h6_.js} +1 -1
  12. package/dist/client/assets/{chunk-55IACEB6-By56kV4y.js → chunk-55IACEB6-CivChWg7.js} +1 -1
  13. package/dist/client/assets/{chunk-B4BG7PRW-Mdspuz8t.js → chunk-B4BG7PRW-BKLAk8Ng.js} +1 -1
  14. package/dist/client/assets/{chunk-DI55MBZ5-iyZEN5hA.js → chunk-DI55MBZ5-B_cDZCba.js} +1 -1
  15. package/dist/client/assets/{chunk-FMBD7UC4-DMP1kj21.js → chunk-FMBD7UC4-CZgE72J_.js} +1 -1
  16. package/dist/client/assets/{chunk-QN33PNHL-DcPxVAYl.js → chunk-QN33PNHL-1qh6IGru.js} +1 -1
  17. package/dist/client/assets/{chunk-QZHKN3VN-Bp7cG1_B.js → chunk-QZHKN3VN-Cl_2nn9E.js} +1 -1
  18. package/dist/client/assets/{chunk-TZMSLE5B-pNRrcxP_.js → chunk-TZMSLE5B-DpxKjqWA.js} +1 -1
  19. package/dist/client/assets/classDiagram-2ON5EDUG-xnvZA_6X.js +1 -0
  20. package/dist/client/assets/classDiagram-v2-WZHVMYZB-xnvZA_6X.js +1 -0
  21. package/dist/client/assets/clike-B9uivgTg.js +1 -0
  22. package/dist/client/assets/clone-DsvuocD4.js +1 -0
  23. package/dist/client/assets/{cose-bilkent-S5V4N54A-CSNWhuW5.js → cose-bilkent-S5V4N54A-DCzND3wc.js} +1 -1
  24. package/dist/client/assets/{dagre-6UL2VRFP-2AP9Vpxl.js → dagre-6UL2VRFP-phsFBB-e.js} +1 -1
  25. package/dist/client/assets/{diagram-PSM6KHXK-HtGU4kRc.js → diagram-PSM6KHXK-C3SOO9R0.js} +1 -1
  26. package/dist/client/assets/{diagram-QEK2KX5R-K2WsknJk.js → diagram-QEK2KX5R-CAFBJ4hH.js} +1 -1
  27. package/dist/client/assets/{diagram-S2PKOQOG-BDEONaZX.js → diagram-S2PKOQOG-Bpydud7g.js} +1 -1
  28. package/dist/client/assets/{erDiagram-Q2GNP2WA-CPBjK29N.js → erDiagram-Q2GNP2WA-Co4WhzwN.js} +1 -1
  29. package/dist/client/assets/{flowDiagram-NV44I4VS-Bxg-lsJi.js → flowDiagram-NV44I4VS-BZA58aUI.js} +1 -1
  30. package/dist/client/assets/{ganttDiagram-JELNMOA3-CfsLGU7a.js → ganttDiagram-JELNMOA3--4j85sTO.js} +3 -3
  31. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-DSZ8yygB.js → gitGraphDiagram-V2S2FVAM-6AH31Cb1.js} +1 -1
  32. package/dist/client/assets/{graph-CrcNy0Ae.js → graph-7CJlwe2i.js} +1 -1
  33. package/dist/client/assets/{highlighted-body-B3W2YXNL-CPmygcyP.js → highlighted-body-B3W2YXNL-D5Kact6h.js} +1 -1
  34. package/dist/client/assets/{index-DxYfeZ2E.js → index--MhpXyw4.js} +1 -1
  35. package/dist/client/assets/{index-BCP4tBa7.js → index-B2DcQ-ug.js} +1 -1
  36. package/dist/client/assets/{index-BsrQ2eX6.js → index-B4wpLa0T.js} +1 -1
  37. package/dist/client/assets/{index-uRf2_zL0.js → index-B5R7cbs8.js} +1 -1
  38. package/dist/client/assets/{index-CLRzbnfI.js → index-BwJYeeov.js} +1 -1
  39. package/dist/client/assets/{index-Crm271Ii.js → index-C4gIKOr_.js} +1 -1
  40. package/dist/client/assets/{index-BILlMvI9.js → index-CoRbY65h.js} +1 -1
  41. package/dist/client/assets/{index-BLRI8YiL.js → index-Cp85A8y4.js} +1 -1
  42. package/dist/client/assets/{index-ByaEwL4Q.js → index-CralkALm.js} +1 -1
  43. package/dist/client/assets/{index-CNLX1boT.js → index-Cv7YFrOV.js} +1 -1
  44. package/dist/client/assets/{index-CsHJ2Ff0.js → index-DCu6TAMf.js} +1 -1
  45. package/dist/client/assets/{index-CQixBiQh.js → index-DMMKTe60.js} +1 -1
  46. package/dist/client/assets/{index-Dw0-IJHh.js → index-D_D2pxKM.js} +1 -1
  47. package/dist/client/assets/{index-DPbyu5Yx.js → index-DgEnNhJH.js} +1 -1
  48. package/dist/client/assets/{index-CPlAHhxv.js → index-Djl4xLSO.js} +1 -1
  49. package/dist/client/assets/{index-J9vyzIxg.js → index-Dn_GfMwq.js} +1 -1
  50. package/dist/client/assets/{index-CUf8QFIy.js → index-DnzvlwNY.js} +1 -1
  51. package/dist/client/assets/{index-DiDm-B1D.js → index-pr8WXb_L.js} +1 -1
  52. package/dist/client/assets/{infoDiagram-HS3SLOUP-DznSvSTI.js → infoDiagram-HS3SLOUP-CeA337Zm.js} +1 -1
  53. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-CZi4YujP.js → journeyDiagram-XKPGCS4Q-ujbs0LMd.js} +1 -1
  54. package/dist/client/assets/{kanban-definition-3W4ZIXB7-X0OvmcRW.js → kanban-definition-3W4ZIXB7-ffQDH_Ro.js} +1 -1
  55. package/dist/client/assets/{layout-BvRrjwqG.js → layout-Bp2mKXuW.js} +1 -1
  56. package/dist/client/assets/main-BzKe6bG7.css +1 -0
  57. package/dist/client/assets/{main-jiI3VEaS.js → main-axhmccT5.js} +271 -271
  58. package/dist/client/assets/{mindmap-definition-VGOIOE7T-CQESwmPy.js → mindmap-definition-VGOIOE7T-ADZcbwuf.js} +1 -1
  59. package/dist/client/assets/{pieDiagram-ADFJNKIX-B28DXcFe.js → pieDiagram-ADFJNKIX-BdG4-xDd.js} +1 -1
  60. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-BFzNIbiV.js → quadrantDiagram-AYHSOK5B-DUtM9sRB.js} +1 -1
  61. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-DYMElT8I.js → requirementDiagram-UZGBJVZJ-Bb0HlfNx.js} +1 -1
  62. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-BWTESPW7.js → sankeyDiagram-TZEHDZUN-DVCE_8pf.js} +1 -1
  63. package/dist/client/assets/{sequenceDiagram-WL72ISMW-PLqAiKkw.js → sequenceDiagram-WL72ISMW-CKQaWU-Q.js} +1 -1
  64. package/dist/client/assets/{square-terminal-DqD2bbPR.js → square-terminal-BiJr_LVr.js} +1 -1
  65. package/dist/client/assets/{stateDiagram-FKZM4ZOC-BuoBLww9.js → stateDiagram-FKZM4ZOC-D0QXwVbV.js} +1 -1
  66. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-C3iyPGuZ.js +1 -0
  67. package/dist/client/assets/{timeline-definition-IT6M3QCI-gHz-ibEM.js → timeline-definition-IT6M3QCI-CUDKk5ha.js} +1 -1
  68. package/dist/client/assets/{treemap-GDKQZRPO-Df_3w7Ws.js → treemap-GDKQZRPO-yUFqXQpQ.js} +1 -1
  69. package/dist/client/assets/{workspace._workspaceId-rXFF_FK_.js → workspace._workspaceId-Bz0CuqC_.js} +1 -1
  70. package/dist/client/assets/workspace._workspaceId-DorcrnsD.js +2 -0
  71. package/dist/client/assets/{xychartDiagram-PRI3JC2R-Dtkqhnxi.js → xychartDiagram-PRI3JC2R-Dju2LIYt.js} +1 -1
  72. package/dist/migrations/20260619184346_drop_tasks_max_turns/migration.sql +1 -0
  73. package/dist/migrations/20260619184346_drop_tasks_max_turns/snapshot.json +1157 -0
  74. package/dist/openapi.json +192 -48
  75. package/dist/server/assets/{DockviewBrowserContainer-MBbRqrFN.js → DockviewBrowserContainer-DaEHL7rU.js} +1 -1
  76. package/dist/server/assets/{DockviewTerminalContainer-CbiPuY7W.js → DockviewTerminalContainer-QeRuw498.js} +3 -3
  77. package/dist/server/assets/{TerminalPanel-r3EgkGO2.js → TerminalPanel-CIQVz_Z4.js} +250 -143
  78. package/dist/server/assets/{_basePickBy-BYBSjWdr.js → _basePickBy-Bgz-DXU9.js} +2 -2
  79. package/dist/server/assets/{_baseUniq-BFd712qn.js → _baseUniq-CevNURdU.js} +1 -1
  80. package/dist/server/assets/_tanstack-start-manifest_v-9Dn7fTyV.js +4 -0
  81. package/dist/server/assets/{arc-BgLIk2km.js → arc-jD7cuYE0.js} +1 -1
  82. package/dist/server/assets/{architecture-7HQA4BMR-CNuGd6ji.js → architecture-7HQA4BMR-CH32HJV2.js} +6 -6
  83. package/dist/server/assets/{architectureDiagram-VXUJARFQ-CUWYpRdN.js → architectureDiagram-VXUJARFQ-DisnJPPo.js} +6 -6
  84. package/dist/server/assets/{blockDiagram-VD42YOAC-LC7jFY0y.js → blockDiagram-VD42YOAC-Djjy-jiv.js} +6 -6
  85. package/dist/server/assets/{c4Diagram-YG6GDRKO-xiCvsYEV.js → c4Diagram-YG6GDRKO-B12Oi-HH.js} +2 -2
  86. package/dist/server/assets/{channel-HTn7VGn7.js → channel-DFaIo-PG.js} +1 -1
  87. package/dist/server/assets/{chunk-4BX2VUAB-BddWsJMu.js → chunk-4BX2VUAB-DHfsBptR.js} +1 -1
  88. package/dist/server/assets/{chunk-55IACEB6-gS8ucPXk.js → chunk-55IACEB6-jIjVbMix.js} +1 -1
  89. package/dist/server/assets/{chunk-B4BG7PRW-CjE0PrHm.js → chunk-B4BG7PRW-CZ4z-SYy.js} +4 -4
  90. package/dist/server/assets/{chunk-DI55MBZ5-D4otQuhU.js → chunk-DI55MBZ5-BAZeiYrT.js} +3 -3
  91. package/dist/server/assets/{chunk-FMBD7UC4-BoFKStlk.js → chunk-FMBD7UC4-CPlukapU.js} +1 -1
  92. package/dist/server/assets/{chunk-QN33PNHL-9tTIFZTB.js → chunk-QN33PNHL-BBEzEMyZ.js} +1 -1
  93. package/dist/server/assets/{chunk-QZHKN3VN-CQD5IUAL.js → chunk-QZHKN3VN-BbJAuOLh.js} +1 -1
  94. package/dist/server/assets/{chunk-TZMSLE5B-jMi7C9xq.js → chunk-TZMSLE5B-DXQ0720e.js} +1 -1
  95. package/dist/server/assets/{classDiagram-v2-WZHVMYZB-BA0nXDYs.js → classDiagram-2ON5EDUG-Dd_NiCJt.js} +5 -5
  96. package/dist/server/assets/{classDiagram-2ON5EDUG-BA0nXDYs.js → classDiagram-v2-WZHVMYZB-Dd_NiCJt.js} +5 -5
  97. package/dist/server/assets/clike-xqXYL6ge.js +805 -0
  98. package/dist/server/assets/{clone-BxCmpdXf.js → clone-D2G5HtzD.js} +1 -1
  99. package/dist/server/assets/{cose-bilkent-S5V4N54A-CkINSUhh.js → cose-bilkent-S5V4N54A-D9MbA73U.js} +1 -1
  100. package/dist/server/assets/{dagre-6UL2VRFP-BqzGOyEx.js → dagre-6UL2VRFP-3X8TKKNF.js} +6 -6
  101. package/dist/server/assets/{diagram-PSM6KHXK-VebVrDpW.js → diagram-PSM6KHXK-BifH8r_E.js} +7 -7
  102. package/dist/server/assets/{diagram-QEK2KX5R-BvyHvb1q.js → diagram-QEK2KX5R-CpM2yo3A.js} +6 -6
  103. package/dist/server/assets/{diagram-S2PKOQOG-B8goNnsj.js → diagram-S2PKOQOG-Dem9oHxL.js} +6 -6
  104. package/dist/server/assets/{erDiagram-Q2GNP2WA-BcjilkRw.js → erDiagram-Q2GNP2WA-Cv2t_qcc.js} +4 -4
  105. package/dist/server/assets/{flowDiagram-NV44I4VS-DHAz3SxN.js → flowDiagram-NV44I4VS-DO9viNx6.js} +5 -5
  106. package/dist/server/assets/{ganttDiagram-JELNMOA3-52f5bTC2.js → ganttDiagram-JELNMOA3-BQLkwHvs.js} +1 -1
  107. package/dist/server/assets/{gitGraph-G5XIXVHT-Bgqr7JP3.js → gitGraph-G5XIXVHT-Rf89GAs0.js} +6 -6
  108. package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-FbdmGq-M.js → gitGraphDiagram-V2S2FVAM-Cn1yq3PZ.js} +7 -7
  109. package/dist/server/assets/{graph-DDmq4O_B.js → graph-DdtTxequ.js} +2 -2
  110. package/dist/server/assets/{highlighted-body-B3W2YXNL-CYHh4OgM.js → highlighted-body-B3W2YXNL-DGIqRI0V.js} +1 -1
  111. package/dist/server/assets/{index-C1uM7oUj.js → index-B7HiLzkZ.js} +3 -3
  112. package/dist/server/assets/{index-DIM8z75Y.js → index-Bd47fsM9.js} +5 -5
  113. package/dist/server/assets/{index-B9Uf27go.js → index-C7aw98b-.js} +2 -2
  114. package/dist/server/assets/{index-BpqPCP54.js → index-CEu724dC.js} +2 -2
  115. package/dist/server/assets/{index-BPkfrfUo.js → index-CN-GsVYc.js} +2 -2
  116. package/dist/server/assets/{index-C7DnXrUx.js → index-COXowzgf.js} +4 -4
  117. package/dist/server/assets/{index-DV0oV1aJ.js → index-CSvLh_Yz.js} +2 -2
  118. package/dist/server/assets/{index-B-aV-zvo.js → index-CVQ-l3zd.js} +2 -2
  119. package/dist/server/assets/{index-BJ-zYyy7.js → index-CZSZYqEH.js} +2 -2
  120. package/dist/server/assets/{index-b-ToRK86.js → index-D0gkB7DS.js} +1 -1
  121. package/dist/server/assets/{index-BqgyveYS.js → index-DF0W4io9.js} +3 -3
  122. package/dist/server/assets/{index-yImIxy9C.js → index-DKFYHMSW.js} +2 -2
  123. package/dist/server/assets/{index-ByjtLqv-.js → index-IABw8d2w.js} +2 -2
  124. package/dist/server/assets/{index-BLYKLsr8.js → index-_XlsLUmp.js} +2 -2
  125. package/dist/server/assets/{index-CbrgO9Py.js → index-dA-FNez1.js} +5 -5
  126. package/dist/server/assets/{index-Dh2e2-op.js → index-eS7k7NKN.js} +2 -2
  127. package/dist/server/assets/{index-CNXUBnWF.js → index-iwREUWd1.js} +2 -2
  128. package/dist/server/assets/{index-CN6Wkz5N.js → index-rDKMQzl_.js} +1 -1
  129. package/dist/server/assets/{info-VBDWY6EO-niG3bn42.js → info-VBDWY6EO-DVBWXH0S.js} +6 -6
  130. package/dist/server/assets/{infoDiagram-HS3SLOUP-C0ZcYc2V.js → infoDiagram-HS3SLOUP-Dn-PUlKq.js} +5 -5
  131. package/dist/server/assets/{journeyDiagram-XKPGCS4Q-DlzIOQ2Q.js → journeyDiagram-XKPGCS4Q-C1eLAzL9.js} +4 -4
  132. package/dist/server/assets/{kanban-definition-3W4ZIXB7-DVR-_Oli.js → kanban-definition-3W4ZIXB7-DFHxxNcb.js} +2 -2
  133. package/dist/server/assets/{layout-DrEsLnWz.js → layout-BEatsupl.js} +4 -4
  134. package/dist/server/assets/{mermaid-3ZIDBTTL-DSjx-3jg.js → mermaid-3ZIDBTTL-8mt5O2g5.js} +1 -1
  135. package/dist/server/assets/{mermaid-parser.core-BktN7pRz.js → mermaid-parser.core-BLOfHo-D.js} +11 -11
  136. package/dist/server/assets/{mindmap-definition-VGOIOE7T-C3p_lEUY.js → mindmap-definition-VGOIOE7T-B5_qScJU.js} +3 -3
  137. package/dist/server/assets/{packet-DYOGHKS2-BUqJsUFr.js → packet-DYOGHKS2-DYeTXPnX.js} +6 -6
  138. package/dist/server/assets/{pie-VRWISCQL-jcPaeZCL.js → pie-VRWISCQL-BlyZBKB0.js} +6 -6
  139. package/dist/server/assets/{pieDiagram-ADFJNKIX-BroIyG3N.js → pieDiagram-ADFJNKIX-CwWqz5Xf.js} +7 -7
  140. package/dist/server/assets/{quadrantDiagram-AYHSOK5B-DMH-yS8Y.js → quadrantDiagram-AYHSOK5B-BZ8A8mON.js} +1 -1
  141. package/dist/server/assets/{radar-ZZBFDIW7-C3KENTEn.js → radar-ZZBFDIW7-B60czbOE.js} +6 -6
  142. package/dist/server/assets/{requirementDiagram-UZGBJVZJ-BmwXQjqZ.js → requirementDiagram-UZGBJVZJ-Cctcn3D4.js} +3 -3
  143. package/dist/server/assets/{router-Cne-GWAI.js → router-V4X9DgJt.js} +2266 -506
  144. package/dist/server/assets/{sankeyDiagram-TZEHDZUN-BgYyRe28.js → sankeyDiagram-TZEHDZUN-Bvyi-a8d.js} +1 -1
  145. package/dist/server/assets/{sequenceDiagram-WL72ISMW-DKSZXEOM.js → sequenceDiagram-WL72ISMW-C83rLE-r.js} +3 -3
  146. package/dist/server/assets/{square-terminal-Dq10fSle.js → square-terminal-Dcy5Z6a4.js} +1 -1
  147. package/dist/server/assets/{stateDiagram-FKZM4ZOC-ByoaVX2u.js → stateDiagram-FKZM4ZOC-lfXNq0DS.js} +8 -8
  148. package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-BgkMjukC.js → stateDiagram-v2-4FDKWEC3-BkZqIjkI.js} +4 -4
  149. package/dist/server/assets/{timeline-definition-IT6M3QCI-ByMKy2X3.js → timeline-definition-IT6M3QCI-CejT7_79.js} +2 -2
  150. package/dist/server/assets/{treemap-GDKQZRPO-QFA03rde.js → treemap-GDKQZRPO-Dvu1YI6l.js} +6 -6
  151. package/dist/server/assets/{workspace._workspaceId-LFuKLA8U.js → workspace._workspaceId-BpnCyMIU.js} +11 -9
  152. package/dist/server/assets/{workspace._workspaceId-DfI3AStI.js → workspace._workspaceId-D20Q15rI.js} +1 -1
  153. package/dist/server/assets/{xychartDiagram-PRI3JC2R-DBO0yxoy.js → xychartDiagram-PRI3JC2R-DmHHkA_A.js} +1 -1
  154. package/dist/server/server.js +2 -2
  155. package/dist/start-server.mjs +1618 -806
  156. package/package.json +5 -4
  157. package/dist/client/assets/TerminalPanel-CDDGecbZ.js +0 -5
  158. package/dist/client/assets/channel-8nL7_R0T.js +0 -1
  159. package/dist/client/assets/classDiagram-2ON5EDUG-DC6mHowO.js +0 -1
  160. package/dist/client/assets/classDiagram-v2-WZHVMYZB-DC6mHowO.js +0 -1
  161. package/dist/client/assets/clone-DI4tbye2.js +0 -1
  162. package/dist/client/assets/main-DZa742Ns.css +0 -1
  163. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-Dtt72DXR.js +0 -1
  164. package/dist/client/assets/workspace._workspaceId-B4tmTDq0.js +0 -2
  165. package/dist/server/assets/_tanstack-start-manifest_v-DnlOZCmi.js +0 -4
@@ -1226,7 +1226,7 @@ const createLucideIcon = (iconName, iconNode) => {
1226
1226
  Component.displayName = toPascalCase(iconName);
1227
1227
  return Component;
1228
1228
  };
1229
- const __iconNode$1q = [
1229
+ const __iconNode$1r = [
1230
1230
  [
1231
1231
  "path",
1232
1232
  {
@@ -1235,45 +1235,45 @@ const __iconNode$1q = [
1235
1235
  }
1236
1236
  ]
1237
1237
  ];
1238
- const Activity = createLucideIcon("activity", __iconNode$1q);
1239
- const __iconNode$1p = [
1238
+ const Activity = createLucideIcon("activity", __iconNode$1r);
1239
+ const __iconNode$1q = [
1240
1240
  ["path", { d: "M12 17V3", key: "1cwfxf" }],
1241
1241
  ["path", { d: "m6 11 6 6 6-6", key: "12ii2o" }],
1242
1242
  ["path", { d: "M19 21H5", key: "150jfl" }]
1243
1243
  ];
1244
- const ArrowDownToLine = createLucideIcon("arrow-down-to-line", __iconNode$1p);
1245
- const __iconNode$1o = [
1244
+ const ArrowDownToLine = createLucideIcon("arrow-down-to-line", __iconNode$1q);
1245
+ const __iconNode$1p = [
1246
1246
  ["path", { d: "M12 5v14", key: "s699le" }],
1247
1247
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
1248
1248
  ];
1249
- const ArrowDown = createLucideIcon("arrow-down", __iconNode$1o);
1250
- const __iconNode$1n = [
1249
+ const ArrowDown = createLucideIcon("arrow-down", __iconNode$1p);
1250
+ const __iconNode$1o = [
1251
1251
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
1252
1252
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
1253
1253
  ];
1254
- const ArrowLeft = createLucideIcon("arrow-left", __iconNode$1n);
1255
- const __iconNode$1m = [
1254
+ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$1o);
1255
+ const __iconNode$1n = [
1256
1256
  ["path", { d: "M5 12h14", key: "1ays0h" }],
1257
1257
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
1258
1258
  ];
1259
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$1m);
1260
- const __iconNode$1l = [
1259
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$1n);
1260
+ const __iconNode$1m = [
1261
1261
  ["path", { d: "m18 9-6-6-6 6", key: "kcunyi" }],
1262
1262
  ["path", { d: "M12 3v14", key: "7cf3v8" }],
1263
1263
  ["path", { d: "M5 21h14", key: "11awu3" }]
1264
1264
  ];
1265
- const ArrowUpFromLine = createLucideIcon("arrow-up-from-line", __iconNode$1l);
1266
- const __iconNode$1k = [
1265
+ const ArrowUpFromLine = createLucideIcon("arrow-up-from-line", __iconNode$1m);
1266
+ const __iconNode$1l = [
1267
1267
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
1268
1268
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
1269
1269
  ];
1270
- const ArrowUp = createLucideIcon("arrow-up", __iconNode$1k);
1271
- const __iconNode$1j = [
1270
+ const ArrowUp = createLucideIcon("arrow-up", __iconNode$1l);
1271
+ const __iconNode$1k = [
1272
1272
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1273
1273
  ["path", { d: "M4.929 4.929 19.07 19.071", key: "196cmz" }]
1274
1274
  ];
1275
- const Ban = createLucideIcon("ban", __iconNode$1j);
1276
- const __iconNode$1i = [
1275
+ const Ban = createLucideIcon("ban", __iconNode$1k);
1276
+ const __iconNode$1j = [
1277
1277
  ["path", { d: "M12 8V4H8", key: "hb8ula" }],
1278
1278
  ["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
1279
1279
  ["path", { d: "M2 14h2", key: "vft8re" }],
@@ -1281,69 +1281,69 @@ const __iconNode$1i = [
1281
1281
  ["path", { d: "M15 13v2", key: "1xurst" }],
1282
1282
  ["path", { d: "M9 13v2", key: "rq6x2g" }]
1283
1283
  ];
1284
- const Bot = createLucideIcon("bot", __iconNode$1i);
1285
- const __iconNode$1h = [
1284
+ const Bot = createLucideIcon("bot", __iconNode$1j);
1285
+ const __iconNode$1i = [
1286
1286
  ["path", { d: "m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16", key: "d5nyq2" }],
1287
1287
  ["path", { d: "M22 9v7", key: "pvm9v3" }],
1288
1288
  ["path", { d: "M3.304 13h6.392", key: "1q3zxz" }],
1289
1289
  ["circle", { cx: "18.5", cy: "12.5", r: "3.5", key: "z97x68" }]
1290
1290
  ];
1291
- const CaseSensitive = createLucideIcon("case-sensitive", __iconNode$1h);
1292
- const __iconNode$1g = [
1291
+ const CaseSensitive = createLucideIcon("case-sensitive", __iconNode$1i);
1292
+ const __iconNode$1h = [
1293
1293
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
1294
1294
  ["path", { d: "M18 17V9", key: "2bz60n" }],
1295
1295
  ["path", { d: "M13 17V5", key: "1frdt8" }],
1296
1296
  ["path", { d: "M8 17v-3", key: "17ska0" }]
1297
1297
  ];
1298
- const ChartColumn = createLucideIcon("chart-column", __iconNode$1g);
1299
- const __iconNode$1f = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
1300
- const Check = createLucideIcon("check", __iconNode$1f);
1301
- const __iconNode$1e = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
1302
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$1e);
1303
- const __iconNode$1d = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
1304
- const ChevronLeft = createLucideIcon("chevron-left", __iconNode$1d);
1305
- const __iconNode$1c = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
1306
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$1c);
1307
- const __iconNode$1b = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
1308
- const ChevronUp = createLucideIcon("chevron-up", __iconNode$1b);
1309
- const __iconNode$1a = [
1298
+ const ChartColumn = createLucideIcon("chart-column", __iconNode$1h);
1299
+ const __iconNode$1g = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
1300
+ const Check = createLucideIcon("check", __iconNode$1g);
1301
+ const __iconNode$1f = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
1302
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$1f);
1303
+ const __iconNode$1e = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
1304
+ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$1e);
1305
+ const __iconNode$1d = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
1306
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$1d);
1307
+ const __iconNode$1c = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
1308
+ const ChevronUp = createLucideIcon("chevron-up", __iconNode$1c);
1309
+ const __iconNode$1b = [
1310
1310
  ["path", { d: "m7 20 5-5 5 5", key: "13a0gw" }],
1311
1311
  ["path", { d: "m7 4 5 5 5-5", key: "1kwcof" }]
1312
1312
  ];
1313
- const ChevronsDownUp = createLucideIcon("chevrons-down-up", __iconNode$1a);
1314
- const __iconNode$19 = [
1313
+ const ChevronsDownUp = createLucideIcon("chevrons-down-up", __iconNode$1b);
1314
+ const __iconNode$1a = [
1315
1315
  ["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
1316
1316
  ["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
1317
1317
  ];
1318
- const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$19);
1319
- const __iconNode$18 = [
1318
+ const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$1a);
1319
+ const __iconNode$19 = [
1320
1320
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1321
1321
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
1322
1322
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
1323
1323
  ];
1324
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$18);
1325
- const __iconNode$17 = [
1324
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$19);
1325
+ const __iconNode$18 = [
1326
1326
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1327
1327
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
1328
1328
  ];
1329
- const CircleCheck = createLucideIcon("circle-check", __iconNode$17);
1330
- const __iconNode$16 = [
1329
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$18);
1330
+ const __iconNode$17 = [
1331
1331
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1332
1332
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
1333
1333
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
1334
1334
  ];
1335
- const CircleX = createLucideIcon("circle-x", __iconNode$16);
1336
- const __iconNode$15 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
1337
- const Circle = createLucideIcon("circle", __iconNode$15);
1338
- const __iconNode$14 = [
1335
+ const CircleX = createLucideIcon("circle-x", __iconNode$17);
1336
+ const __iconNode$16 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
1337
+ const Circle = createLucideIcon("circle", __iconNode$16);
1338
+ const __iconNode$15 = [
1339
1339
  ["path", { d: "M11 14h10", key: "1w8e9d" }],
1340
1340
  ["path", { d: "M16 4h2a2 2 0 0 1 2 2v1.344", key: "1e62lh" }],
1341
1341
  ["path", { d: "m17 18 4-4-4-4", key: "z2g111" }],
1342
1342
  ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113", key: "bjbb7m" }],
1343
1343
  ["rect", { x: "8", y: "2", width: "8", height: "4", rx: "1", key: "ublpy" }]
1344
1344
  ];
1345
- const ClipboardPaste = createLucideIcon("clipboard-paste", __iconNode$14);
1346
- const __iconNode$13 = [
1345
+ const ClipboardPaste = createLucideIcon("clipboard-paste", __iconNode$15);
1346
+ const __iconNode$14 = [
1347
1347
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
1348
1348
  [
1349
1349
  "path",
@@ -1353,53 +1353,53 @@ const __iconNode$13 = [
1353
1353
  }
1354
1354
  ]
1355
1355
  ];
1356
- const Clipboard = createLucideIcon("clipboard", __iconNode$13);
1357
- const __iconNode$12 = [
1356
+ const Clipboard = createLucideIcon("clipboard", __iconNode$14);
1357
+ const __iconNode$13 = [
1358
1358
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1359
1359
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }]
1360
1360
  ];
1361
- const Clock = createLucideIcon("clock", __iconNode$12);
1362
- const __iconNode$11 = [
1361
+ const Clock = createLucideIcon("clock", __iconNode$13);
1362
+ const __iconNode$12 = [
1363
1363
  ["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
1364
1364
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
1365
1365
  ["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
1366
1366
  ];
1367
- const CodeXml = createLucideIcon("code-xml", __iconNode$11);
1368
- const __iconNode$10 = [
1367
+ const CodeXml = createLucideIcon("code-xml", __iconNode$12);
1368
+ const __iconNode$11 = [
1369
1369
  ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
1370
1370
  ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
1371
1371
  ];
1372
- const Code = createLucideIcon("code", __iconNode$10);
1373
- const __iconNode$$ = [
1372
+ const Code = createLucideIcon("code", __iconNode$11);
1373
+ const __iconNode$10 = [
1374
1374
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
1375
1375
  ["path", { d: "M12 3v18", key: "108xh3" }]
1376
1376
  ];
1377
- const Columns2 = createLucideIcon("columns-2", __iconNode$$);
1378
- const __iconNode$_ = [
1377
+ const Columns2 = createLucideIcon("columns-2", __iconNode$10);
1378
+ const __iconNode$$ = [
1379
1379
  [
1380
1380
  "path",
1381
1381
  { d: "M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3", key: "11bfej" }
1382
1382
  ]
1383
1383
  ];
1384
- const Command$1 = createLucideIcon("command", __iconNode$_);
1385
- const __iconNode$Z = [
1384
+ const Command$1 = createLucideIcon("command", __iconNode$$);
1385
+ const __iconNode$_ = [
1386
1386
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
1387
1387
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
1388
1388
  ];
1389
- const Copy = createLucideIcon("copy", __iconNode$Z);
1390
- const __iconNode$Y = [
1389
+ const Copy = createLucideIcon("copy", __iconNode$_);
1390
+ const __iconNode$Z = [
1391
1391
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
1392
1392
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
1393
1393
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
1394
1394
  ];
1395
- const Download = createLucideIcon("download", __iconNode$Y);
1396
- const __iconNode$X = [
1395
+ const Download = createLucideIcon("download", __iconNode$Z);
1396
+ const __iconNode$Y = [
1397
1397
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
1398
1398
  ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
1399
1399
  ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
1400
1400
  ];
1401
- const EllipsisVertical = createLucideIcon("ellipsis-vertical", __iconNode$X);
1402
- const __iconNode$W = [
1401
+ const EllipsisVertical = createLucideIcon("ellipsis-vertical", __iconNode$Y);
1402
+ const __iconNode$X = [
1403
1403
  ["path", { d: "m15 15 6 6", key: "1s409w" }],
1404
1404
  ["path", { d: "m15 9 6-6", key: "ko1vev" }],
1405
1405
  ["path", { d: "M21 16v5h-5", key: "1ck2sf" }],
@@ -1409,14 +1409,14 @@ const __iconNode$W = [
1409
1409
  ["path", { d: "M3 8V3h5", key: "1ln10m" }],
1410
1410
  ["path", { d: "M9 9 3 3", key: "v551iv" }]
1411
1411
  ];
1412
- const Expand = createLucideIcon("expand", __iconNode$W);
1413
- const __iconNode$V = [
1412
+ const Expand = createLucideIcon("expand", __iconNode$X);
1413
+ const __iconNode$W = [
1414
1414
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
1415
1415
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
1416
1416
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
1417
1417
  ];
1418
- const ExternalLink$1 = createLucideIcon("external-link", __iconNode$V);
1419
- const __iconNode$U = [
1418
+ const ExternalLink$1 = createLucideIcon("external-link", __iconNode$W);
1419
+ const __iconNode$V = [
1420
1420
  [
1421
1421
  "path",
1422
1422
  {
@@ -1426,8 +1426,8 @@ const __iconNode$U = [
1426
1426
  ],
1427
1427
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
1428
1428
  ];
1429
- const Eye = createLucideIcon("eye", __iconNode$U);
1430
- const __iconNode$T = [
1429
+ const Eye = createLucideIcon("eye", __iconNode$V);
1430
+ const __iconNode$U = [
1431
1431
  [
1432
1432
  "path",
1433
1433
  {
@@ -1438,8 +1438,8 @@ const __iconNode$T = [
1438
1438
  ["path", { d: "M12 9v4", key: "juzpu7" }],
1439
1439
  ["path", { d: "M12 17h.01", key: "p32p05" }]
1440
1440
  ];
1441
- const FileExclamationPoint = createLucideIcon("file-exclamation-point", __iconNode$T);
1442
- const __iconNode$S = [
1441
+ const FileExclamationPoint = createLucideIcon("file-exclamation-point", __iconNode$U);
1442
+ const __iconNode$T = [
1443
1443
  [
1444
1444
  "path",
1445
1445
  {
@@ -1451,8 +1451,8 @@ const __iconNode$S = [
1451
1451
  ["path", { d: "M2 15h10", key: "jfw4w8" }],
1452
1452
  ["path", { d: "m9 18 3-3-3-3", key: "112psh" }]
1453
1453
  ];
1454
- const FileInput = createLucideIcon("file-input", __iconNode$S);
1455
- const __iconNode$R = [
1454
+ const FileInput = createLucideIcon("file-input", __iconNode$T);
1455
+ const __iconNode$S = [
1456
1456
  [
1457
1457
  "path",
1458
1458
  {
@@ -1464,8 +1464,8 @@ const __iconNode$R = [
1464
1464
  ["path", { d: "M9 15h6", key: "cctwl0" }],
1465
1465
  ["path", { d: "M12 18v-6", key: "17g6i2" }]
1466
1466
  ];
1467
- const FilePlus = createLucideIcon("file-plus", __iconNode$R);
1468
- const __iconNode$Q = [
1467
+ const FilePlus = createLucideIcon("file-plus", __iconNode$S);
1468
+ const __iconNode$R = [
1469
1469
  [
1470
1470
  "path",
1471
1471
  {
@@ -1478,8 +1478,8 @@ const __iconNode$Q = [
1478
1478
  ["path", { d: "M16 13H8", key: "t4e002" }],
1479
1479
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
1480
1480
  ];
1481
- const FileText = createLucideIcon("file-text", __iconNode$Q);
1482
- const __iconNode$P = [
1481
+ const FileText = createLucideIcon("file-text", __iconNode$R);
1482
+ const __iconNode$Q = [
1483
1483
  [
1484
1484
  "path",
1485
1485
  {
@@ -1489,8 +1489,8 @@ const __iconNode$P = [
1489
1489
  ],
1490
1490
  ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
1491
1491
  ];
1492
- const File$1 = createLucideIcon("file", __iconNode$P);
1493
- const __iconNode$O = [
1492
+ const File$1 = createLucideIcon("file", __iconNode$Q);
1493
+ const __iconNode$P = [
1494
1494
  [
1495
1495
  "path",
1496
1496
  {
@@ -1499,8 +1499,8 @@ const __iconNode$O = [
1499
1499
  }
1500
1500
  ]
1501
1501
  ];
1502
- const FolderOpen = createLucideIcon("folder-open", __iconNode$O);
1503
- const __iconNode$N = [
1502
+ const FolderOpen = createLucideIcon("folder-open", __iconNode$P);
1503
+ const __iconNode$O = [
1504
1504
  ["path", { d: "M12 10v6", key: "1bos4e" }],
1505
1505
  ["path", { d: "M9 13h6", key: "1uhe8q" }],
1506
1506
  [
@@ -1511,8 +1511,8 @@ const __iconNode$N = [
1511
1511
  }
1512
1512
  ]
1513
1513
  ];
1514
- const FolderPlus = createLucideIcon("folder-plus", __iconNode$N);
1515
- const __iconNode$M = [
1514
+ const FolderPlus = createLucideIcon("folder-plus", __iconNode$O);
1515
+ const __iconNode$N = [
1516
1516
  [
1517
1517
  "path",
1518
1518
  {
@@ -1521,8 +1521,8 @@ const __iconNode$M = [
1521
1521
  }
1522
1522
  ]
1523
1523
  ];
1524
- const Folder = createLucideIcon("folder", __iconNode$M);
1525
- const __iconNode$L = [
1524
+ const Folder = createLucideIcon("folder", __iconNode$N);
1525
+ const __iconNode$M = [
1526
1526
  [
1527
1527
  "path",
1528
1528
  {
@@ -1535,39 +1535,39 @@ const __iconNode$L = [
1535
1535
  { d: "M3 8.268a2 2 0 0 0-1 1.738V19a2 2 0 0 0 2 2h11a2 2 0 0 0 1.732-1", key: "yxbcw3" }
1536
1536
  ]
1537
1537
  ];
1538
- const Folders = createLucideIcon("folders", __iconNode$L);
1539
- const __iconNode$K = [
1538
+ const Folders = createLucideIcon("folders", __iconNode$M);
1539
+ const __iconNode$L = [
1540
1540
  ["path", { d: "M15 6a9 9 0 0 0-9 9V3", key: "1cii5b" }],
1541
1541
  ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
1542
1542
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }]
1543
1543
  ];
1544
- const GitBranch = createLucideIcon("git-branch", __iconNode$K);
1545
- const __iconNode$J = [
1544
+ const GitBranch = createLucideIcon("git-branch", __iconNode$L);
1545
+ const __iconNode$K = [
1546
1546
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }],
1547
1547
  ["line", { x1: "3", x2: "9", y1: "12", y2: "12", key: "1dyftd" }],
1548
1548
  ["line", { x1: "15", x2: "21", y1: "12", y2: "12", key: "oup4p8" }]
1549
1549
  ];
1550
- const GitCommitHorizontal = createLucideIcon("git-commit-horizontal", __iconNode$J);
1551
- const __iconNode$I = [
1550
+ const GitCommitHorizontal = createLucideIcon("git-commit-horizontal", __iconNode$K);
1551
+ const __iconNode$J = [
1552
1552
  ["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }],
1553
1553
  ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
1554
1554
  ["path", { d: "M13 6h3a2 2 0 0 1 2 2v7", key: "1yeb86" }],
1555
1555
  ["path", { d: "M11 18H8a2 2 0 0 1-2-2V9", key: "19pyzm" }]
1556
1556
  ];
1557
- const GitCompare = createLucideIcon("git-compare", __iconNode$I);
1558
- const __iconNode$H = [
1557
+ const GitCompare = createLucideIcon("git-compare", __iconNode$J);
1558
+ const __iconNode$I = [
1559
1559
  ["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }],
1560
1560
  ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
1561
1561
  ["path", { d: "M6 21V9a9 9 0 0 0 9 9", key: "7kw0sc" }]
1562
1562
  ];
1563
- const GitMerge = createLucideIcon("git-merge", __iconNode$H);
1564
- const __iconNode$G = [
1563
+ const GitMerge = createLucideIcon("git-merge", __iconNode$I);
1564
+ const __iconNode$H = [
1565
1565
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1566
1566
  ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
1567
1567
  ["path", { d: "M2 12h20", key: "9i4pu4" }]
1568
1568
  ];
1569
- const Globe = createLucideIcon("globe", __iconNode$G);
1570
- const __iconNode$F = [
1569
+ const Globe = createLucideIcon("globe", __iconNode$H);
1570
+ const __iconNode$G = [
1571
1571
  ["circle", { cx: "12", cy: "9", r: "1", key: "124mty" }],
1572
1572
  ["circle", { cx: "19", cy: "9", r: "1", key: "1ruzo2" }],
1573
1573
  ["circle", { cx: "5", cy: "9", r: "1", key: "1a8b28" }],
@@ -1575,8 +1575,8 @@ const __iconNode$F = [
1575
1575
  ["circle", { cx: "19", cy: "15", r: "1", key: "1a92ep" }],
1576
1576
  ["circle", { cx: "5", cy: "15", r: "1", key: "5r1jwy" }]
1577
1577
  ];
1578
- const GripHorizontal = createLucideIcon("grip-horizontal", __iconNode$F);
1579
- const __iconNode$E = [
1578
+ const GripHorizontal = createLucideIcon("grip-horizontal", __iconNode$G);
1579
+ const __iconNode$F = [
1580
1580
  ["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }],
1581
1581
  ["path", { d: "M10.41 10.41a2 2 0 1 1-2.83-2.83", key: "1bzlo9" }],
1582
1582
  ["line", { x1: "13.5", x2: "6", y1: "13.5", y2: "21", key: "1q0aeu" }],
@@ -1590,31 +1590,31 @@ const __iconNode$E = [
1590
1590
  ],
1591
1591
  ["path", { d: "M21 15V5a2 2 0 0 0-2-2H9", key: "43el77" }]
1592
1592
  ];
1593
- const ImageOff = createLucideIcon("image-off", __iconNode$E);
1594
- const __iconNode$D = [
1593
+ const ImageOff = createLucideIcon("image-off", __iconNode$F);
1594
+ const __iconNode$E = [
1595
1595
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1596
1596
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
1597
1597
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
1598
1598
  ];
1599
- const Info$1 = createLucideIcon("info", __iconNode$D);
1600
- const __iconNode$C = [
1599
+ const Info$1 = createLucideIcon("info", __iconNode$E);
1600
+ const __iconNode$D = [
1601
1601
  ["path", { d: "M16 5H3", key: "m91uny" }],
1602
1602
  ["path", { d: "M11 12H3", key: "51ecnj" }],
1603
1603
  ["path", { d: "M16 19H3", key: "zzsher" }],
1604
1604
  ["path", { d: "M21 12h-6", key: "bt1uis" }]
1605
1605
  ];
1606
- const ListMinus = createLucideIcon("list-minus", __iconNode$C);
1607
- const __iconNode$B = [
1606
+ const ListMinus = createLucideIcon("list-minus", __iconNode$D);
1607
+ const __iconNode$C = [
1608
1608
  ["path", { d: "M13 5h8", key: "a7qcls" }],
1609
1609
  ["path", { d: "M13 12h8", key: "h98zly" }],
1610
1610
  ["path", { d: "M13 19h8", key: "c3s6r1" }],
1611
1611
  ["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
1612
1612
  ["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1", key: "cif1o7" }]
1613
1613
  ];
1614
- const ListTodo = createLucideIcon("list-todo", __iconNode$B);
1615
- const __iconNode$A = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
1616
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$A);
1617
- const __iconNode$z = [
1614
+ const ListTodo = createLucideIcon("list-todo", __iconNode$C);
1615
+ const __iconNode$B = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
1616
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$B);
1617
+ const __iconNode$A = [
1618
1618
  ["path", { d: "M12 2v4", key: "3427ic" }],
1619
1619
  ["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
1620
1620
  ["path", { d: "M18 12h4", key: "wj9ykh" }],
@@ -1624,21 +1624,21 @@ const __iconNode$z = [
1624
1624
  ["path", { d: "M2 12h4", key: "j09sii" }],
1625
1625
  ["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
1626
1626
  ];
1627
- const Loader = createLucideIcon("loader", __iconNode$z);
1628
- const __iconNode$y = [
1627
+ const Loader = createLucideIcon("loader", __iconNode$A);
1628
+ const __iconNode$z = [
1629
1629
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
1630
1630
  ["path", { d: "m21 3-7 7", key: "1l2asr" }],
1631
1631
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
1632
1632
  ["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
1633
1633
  ];
1634
- const Maximize2 = createLucideIcon("maximize-2", __iconNode$y);
1635
- const __iconNode$x = [
1634
+ const Maximize2 = createLucideIcon("maximize-2", __iconNode$z);
1635
+ const __iconNode$y = [
1636
1636
  ["path", { d: "M4 5h16", key: "1tepv9" }],
1637
1637
  ["path", { d: "M4 12h16", key: "1lakjw" }],
1638
1638
  ["path", { d: "M4 19h16", key: "1djgab" }]
1639
1639
  ];
1640
- const Menu$1 = createLucideIcon("menu", __iconNode$x);
1641
- const __iconNode$w = [
1640
+ const Menu$1 = createLucideIcon("menu", __iconNode$y);
1641
+ const __iconNode$x = [
1642
1642
  [
1643
1643
  "path",
1644
1644
  {
@@ -1647,25 +1647,25 @@ const __iconNode$w = [
1647
1647
  }
1648
1648
  ]
1649
1649
  ];
1650
- const MessageSquare = createLucideIcon("message-square", __iconNode$w);
1651
- const __iconNode$v = [
1650
+ const MessageSquare = createLucideIcon("message-square", __iconNode$x);
1651
+ const __iconNode$w = [
1652
1652
  ["path", { d: "m14 10 7-7", key: "oa77jy" }],
1653
1653
  ["path", { d: "M20 10h-6V4", key: "mjg0md" }],
1654
1654
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
1655
1655
  ["path", { d: "M4 14h6v6", key: "rmj7iw" }]
1656
1656
  ];
1657
- const Minimize2 = createLucideIcon("minimize-2", __iconNode$v);
1658
- const __iconNode$u = [
1657
+ const Minimize2 = createLucideIcon("minimize-2", __iconNode$w);
1658
+ const __iconNode$v = [
1659
1659
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
1660
1660
  ["path", { d: "M9 3v18", key: "fh3hqa" }]
1661
1661
  ];
1662
- const PanelLeft = createLucideIcon("panel-left", __iconNode$u);
1663
- const __iconNode$t = [
1662
+ const PanelLeft = createLucideIcon("panel-left", __iconNode$v);
1663
+ const __iconNode$u = [
1664
1664
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
1665
1665
  ["path", { d: "M3 9h18", key: "1pudct" }]
1666
1666
  ];
1667
- const PanelTop = createLucideIcon("panel-top", __iconNode$t);
1668
- const __iconNode$s = [
1667
+ const PanelTop = createLucideIcon("panel-top", __iconNode$u);
1668
+ const __iconNode$t = [
1669
1669
  [
1670
1670
  "path",
1671
1671
  {
@@ -1674,8 +1674,8 @@ const __iconNode$s = [
1674
1674
  }
1675
1675
  ]
1676
1676
  ];
1677
- const Paperclip = createLucideIcon("paperclip", __iconNode$s);
1678
- const __iconNode$r = [
1677
+ const Paperclip = createLucideIcon("paperclip", __iconNode$t);
1678
+ const __iconNode$s = [
1679
1679
  [
1680
1680
  "path",
1681
1681
  {
@@ -1685,8 +1685,8 @@ const __iconNode$r = [
1685
1685
  ],
1686
1686
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
1687
1687
  ];
1688
- const Pencil = createLucideIcon("pencil", __iconNode$r);
1689
- const __iconNode$q = [
1688
+ const Pencil = createLucideIcon("pencil", __iconNode$s);
1689
+ const __iconNode$r = [
1690
1690
  ["path", { d: "M12 17v5", key: "bb1du9" }],
1691
1691
  ["path", { d: "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89", key: "znwnzq" }],
1692
1692
  ["path", { d: "m2 2 20 20", key: "1ooewy" }],
@@ -1698,8 +1698,8 @@ const __iconNode$q = [
1698
1698
  }
1699
1699
  ]
1700
1700
  ];
1701
- const PinOff = createLucideIcon("pin-off", __iconNode$q);
1702
- const __iconNode$p = [
1701
+ const PinOff = createLucideIcon("pin-off", __iconNode$r);
1702
+ const __iconNode$q = [
1703
1703
  ["path", { d: "M12 17v5", key: "bb1du9" }],
1704
1704
  [
1705
1705
  "path",
@@ -1709,8 +1709,8 @@ const __iconNode$p = [
1709
1709
  }
1710
1710
  ]
1711
1711
  ];
1712
- const Pin = createLucideIcon("pin", __iconNode$p);
1713
- const __iconNode$o = [
1712
+ const Pin = createLucideIcon("pin", __iconNode$q);
1713
+ const __iconNode$p = [
1714
1714
  [
1715
1715
  "path",
1716
1716
  {
@@ -1719,12 +1719,19 @@ const __iconNode$o = [
1719
1719
  }
1720
1720
  ]
1721
1721
  ];
1722
- const Play = createLucideIcon("play", __iconNode$o);
1723
- const __iconNode$n = [
1722
+ const Play = createLucideIcon("play", __iconNode$p);
1723
+ const __iconNode$o = [
1724
1724
  ["path", { d: "M5 12h14", key: "1ays0h" }],
1725
1725
  ["path", { d: "M12 5v14", key: "s699le" }]
1726
1726
  ];
1727
- const Plus = createLucideIcon("plus", __iconNode$n);
1727
+ const Plus = createLucideIcon("plus", __iconNode$o);
1728
+ const __iconNode$n = [
1729
+ ["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
1730
+ ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
1731
+ ["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
1732
+ ["path", { d: "M16 16h5v5", key: "ccwih5" }]
1733
+ ];
1734
+ const RefreshCcw = createLucideIcon("refresh-ccw", __iconNode$n);
1728
1735
  const __iconNode$m = [
1729
1736
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
1730
1737
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
@@ -3395,7 +3402,7 @@ function useCallbackRef(initialValue, callback) {
3395
3402
  ref.callback = callback;
3396
3403
  return ref.facade;
3397
3404
  }
3398
- var useIsomorphicLayoutEffect$3 = typeof window !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
3405
+ var useIsomorphicLayoutEffect$4 = typeof window !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
3399
3406
  var currentValues = /* @__PURE__ */ new WeakMap();
3400
3407
  function useMergeRefs(refs, defaultValue2) {
3401
3408
  var callbackRef = useCallbackRef(null, function(newValue) {
@@ -3403,7 +3410,7 @@ function useMergeRefs(refs, defaultValue2) {
3403
3410
  return assignRef(ref, newValue);
3404
3411
  });
3405
3412
  });
3406
- useIsomorphicLayoutEffect$3(function() {
3413
+ useIsomorphicLayoutEffect$4(function() {
3407
3414
  var oldValue = currentValues.get(callbackRef);
3408
3415
  if (oldValue) {
3409
3416
  var prevRefs_1 = new Set(oldValue);
@@ -3789,10 +3796,10 @@ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
3789
3796
  break;
3790
3797
  }
3791
3798
  var _a3 = getScrollVariables(axis, target), position2 = _a3[0], scroll_1 = _a3[1], capacity = _a3[2];
3792
- var elementScroll = scroll_1 - capacity - directionFactor * position2;
3793
- if (position2 || elementScroll) {
3799
+ var elementScroll2 = scroll_1 - capacity - directionFactor * position2;
3800
+ if (position2 || elementScroll2) {
3794
3801
  if (elementCouldBeScrolled(axis, target)) {
3795
- availableScroll += elementScroll;
3802
+ availableScroll += elementScroll2;
3796
3803
  availableScrollTop += position2;
3797
3804
  }
3798
3805
  }
@@ -14763,12 +14770,13 @@ function DialogOverlay({
14763
14770
  }
14764
14771
  function DialogContent({
14765
14772
  className,
14773
+ overlayClassName,
14766
14774
  children: children2,
14767
14775
  showCloseButton = true,
14768
14776
  ...props
14769
14777
  }) {
14770
14778
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
14771
- /* @__PURE__ */ jsxRuntimeExports.jsx(DialogOverlay, {}),
14779
+ /* @__PURE__ */ jsxRuntimeExports.jsx(DialogOverlay, { className: overlayClassName }),
14772
14780
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
14773
14781
  Content$1,
14774
14782
  {
@@ -14965,12 +14973,22 @@ function ContextMenuPortal({ ...props }) {
14965
14973
  }
14966
14974
  function ContextMenuContent({
14967
14975
  className,
14976
+ onPointerDownCapture,
14977
+ onPointerUpCapture,
14968
14978
  ...props
14969
14979
  }) {
14970
14980
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Portal2$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
14971
14981
  Content2$4,
14972
14982
  {
14973
14983
  "data-slot": "context-menu-content",
14984
+ onPointerDownCapture: (event) => {
14985
+ onPointerDownCapture?.(event);
14986
+ if (event.button === 2) event.stopPropagation();
14987
+ },
14988
+ onPointerUpCapture: (event) => {
14989
+ onPointerUpCapture?.(event);
14990
+ if (event.button === 2) event.stopPropagation();
14991
+ },
14974
14992
  className: cn$2(
14975
14993
  "z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
14976
14994
  className
@@ -40650,53 +40668,53 @@ async function loadLanguage(lang) {
40650
40668
  try {
40651
40669
  switch (lang) {
40652
40670
  case "javascript":
40653
- return import("./index-BJ-zYyy7.js").then((m2) => m2.javascript());
40671
+ return import("./index-CZSZYqEH.js").then((m2) => m2.javascript());
40654
40672
  case "jsx":
40655
- return import("./index-BJ-zYyy7.js").then((m2) => m2.javascript({ jsx: true }));
40673
+ return import("./index-CZSZYqEH.js").then((m2) => m2.javascript({ jsx: true }));
40656
40674
  case "typescript":
40657
- return import("./index-BJ-zYyy7.js").then(
40675
+ return import("./index-CZSZYqEH.js").then(
40658
40676
  (m2) => m2.javascript({ typescript: true })
40659
40677
  );
40660
40678
  case "tsx":
40661
- return import("./index-BJ-zYyy7.js").then(
40679
+ return import("./index-CZSZYqEH.js").then(
40662
40680
  (m2) => m2.javascript({ jsx: true, typescript: true })
40663
40681
  );
40664
40682
  case "python":
40665
- return import("./index-BPkfrfUo.js").then((m2) => m2.python());
40683
+ return import("./index-CN-GsVYc.js").then((m2) => m2.python());
40666
40684
  case "html":
40667
- return import("./index-C7DnXrUx.js").then((m2) => m2.html());
40685
+ return import("./index-COXowzgf.js").then((m2) => m2.html());
40668
40686
  case "css":
40669
- return import("./index-ByjtLqv-.js").then((m2) => m2.css());
40687
+ return import("./index-IABw8d2w.js").then((m2) => m2.css());
40670
40688
  case "scss":
40671
40689
  case "sass":
40672
- return import("./index-BqgyveYS.js").then((m2) => m2.sass());
40690
+ return import("./index-DF0W4io9.js").then((m2) => m2.sass());
40673
40691
  case "less":
40674
- return import("./index-C1uM7oUj.js").then((m2) => m2.less());
40692
+ return import("./index-B7HiLzkZ.js").then((m2) => m2.less());
40675
40693
  case "json":
40676
40694
  case "jsonc":
40677
- return import("./index-BLYKLsr8.js").then((m2) => m2.json());
40695
+ return import("./index-_XlsLUmp.js").then((m2) => m2.json());
40678
40696
  case "markdown":
40679
40697
  case "mdx":
40680
- return import("./index-DIM8z75Y.js").then((m2) => m2.markdown());
40698
+ return import("./index-Bd47fsM9.js").then((m2) => m2.markdown());
40681
40699
  case "xml":
40682
- return import("./index-CNXUBnWF.js").then((m2) => m2.xml());
40700
+ return import("./index-iwREUWd1.js").then((m2) => m2.xml());
40683
40701
  case "yaml":
40684
- return import("./index-B9Uf27go.js").then((m2) => m2.yaml());
40702
+ return import("./index-C7aw98b-.js").then((m2) => m2.yaml());
40685
40703
  case "sql":
40686
- return import("./index-yImIxy9C.js").then((m2) => m2.sql());
40704
+ return import("./index-DKFYHMSW.js").then((m2) => m2.sql());
40687
40705
  case "rust":
40688
- return import("./index-BpqPCP54.js").then((m2) => m2.rust());
40706
+ return import("./index-CEu724dC.js").then((m2) => m2.rust());
40689
40707
  case "go":
40690
- return import("./index-DV0oV1aJ.js").then((m2) => m2.go());
40708
+ return import("./index-CSvLh_Yz.js").then((m2) => m2.go());
40691
40709
  case "java":
40692
- return import("./index-B-aV-zvo.js").then((m2) => m2.java());
40710
+ return import("./index-CVQ-l3zd.js").then((m2) => m2.java());
40693
40711
  case "kotlin":
40694
- return import("./index-B-aV-zvo.js").then((m2) => m2.java());
40712
+ return import("./index-CVQ-l3zd.js").then((m2) => m2.java());
40695
40713
  case "c":
40696
40714
  case "cpp":
40697
- return import("./index-Dh2e2-op.js").then((m2) => m2.cpp());
40715
+ return import("./index-eS7k7NKN.js").then((m2) => m2.cpp());
40698
40716
  case "php":
40699
- return import("./index-CbrgO9Py.js").then((m2) => m2.php());
40717
+ return import("./index-dA-FNez1.js").then((m2) => m2.php());
40700
40718
  // Legacy modes via StreamLanguage
40701
40719
  case "bash":
40702
40720
  case "fish":
@@ -40732,6 +40750,10 @@ async function loadLanguage(lang) {
40732
40750
  return import("./clojure-BhXMqnxz.js").then(
40733
40751
  ({ clojure }) => new LanguageSupport(StreamLanguage.define(clojure))
40734
40752
  );
40753
+ case "dart":
40754
+ return import("./clike-xqXYL6ge.js").then(
40755
+ ({ dart }) => new LanguageSupport(StreamLanguage.define(dart))
40756
+ );
40735
40757
  case "erlang":
40736
40758
  return import("./erlang-BO6gOnGA.js").then(
40737
40759
  ({ erlang }) => new LanguageSupport(StreamLanguage.define(erlang))
@@ -42424,10 +42446,10 @@ function getOwnerDocument(target) {
42424
42446
  }
42425
42447
  return document;
42426
42448
  }
42427
- const useIsomorphicLayoutEffect$2 = canUseDOM$1 ? reactExports.useLayoutEffect : reactExports.useEffect;
42449
+ const useIsomorphicLayoutEffect$3 = canUseDOM$1 ? reactExports.useLayoutEffect : reactExports.useEffect;
42428
42450
  function useEvent(handler) {
42429
42451
  const handlerRef = reactExports.useRef(handler);
42430
- useIsomorphicLayoutEffect$2(() => {
42452
+ useIsomorphicLayoutEffect$3(() => {
42431
42453
  handlerRef.current = handler;
42432
42454
  });
42433
42455
  return reactExports.useCallback(function() {
@@ -42455,7 +42477,7 @@ function useLatestValue(value, dependencies) {
42455
42477
  dependencies = [value];
42456
42478
  }
42457
42479
  const valueRef = reactExports.useRef(value);
42458
- useIsomorphicLayoutEffect$2(() => {
42480
+ useIsomorphicLayoutEffect$3(() => {
42459
42481
  if (valueRef.current !== value) {
42460
42482
  valueRef.current = value;
42461
42483
  }
@@ -44433,7 +44455,7 @@ function useRect(element2, measure, fallbackRect2) {
44433
44455
  const resizeObserver = useResizeObserver({
44434
44456
  callback: measureRect
44435
44457
  });
44436
- useIsomorphicLayoutEffect$2(() => {
44458
+ useIsomorphicLayoutEffect$3(() => {
44437
44459
  measureRect();
44438
44460
  if (element2) {
44439
44461
  resizeObserver == null ? void 0 : resizeObserver.observe(element2);
@@ -44607,7 +44629,7 @@ function useRects(elements, measure) {
44607
44629
  const resizeObserver = useResizeObserver({
44608
44630
  callback: measureRects
44609
44631
  });
44610
- useIsomorphicLayoutEffect$2(() => {
44632
+ useIsomorphicLayoutEffect$3(() => {
44611
44633
  resizeObserver == null ? void 0 : resizeObserver.disconnect();
44612
44634
  measureRects();
44613
44635
  elements.forEach((element2) => resizeObserver == null ? void 0 : resizeObserver.observe(element2));
@@ -44969,7 +44991,7 @@ function useLayoutShiftScrollCompensation(_ref2) {
44969
44991
  x: config2,
44970
44992
  y: config2
44971
44993
  } : config2;
44972
- useIsomorphicLayoutEffect$2(() => {
44994
+ useIsomorphicLayoutEffect$3(() => {
44973
44995
  const disabled = !x2 && !y4;
44974
44996
  if (disabled || !activeNode) {
44975
44997
  initialized.current = false;
@@ -45330,7 +45352,7 @@ const DndContext = /* @__PURE__ */ reactExports.memo(function DndContext2(_ref2)
45330
45352
  }, [draggableNodes, instantiateSensor]);
45331
45353
  const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);
45332
45354
  useSensorSetup(sensors);
45333
- useIsomorphicLayoutEffect$2(() => {
45355
+ useIsomorphicLayoutEffect$3(() => {
45334
45356
  if (activeNodeRect && status === Status.Initializing) {
45335
45357
  setStatus(Status.Initialized);
45336
45358
  }
@@ -45414,7 +45436,7 @@ const DndContext = /* @__PURE__ */ reactExports.memo(function DndContext2(_ref2)
45414
45436
  // eslint-disable-next-line react-hooks/exhaustive-deps
45415
45437
  [overId]
45416
45438
  );
45417
- useIsomorphicLayoutEffect$2(() => {
45439
+ useIsomorphicLayoutEffect$3(() => {
45418
45440
  sensorContext.current = {
45419
45441
  activatorEvent,
45420
45442
  active,
@@ -45541,7 +45563,7 @@ function useDraggable(_ref2) {
45541
45563
  const [activatorNode, setActivatorNodeRef] = useNodeRef();
45542
45564
  const listeners2 = useSyntheticListeners(activators, id28);
45543
45565
  const dataRef = useLatestValue(data);
45544
- useIsomorphicLayoutEffect$2(
45566
+ useIsomorphicLayoutEffect$3(
45545
45567
  () => {
45546
45568
  draggableNodes.set(id28, {
45547
45569
  id: id28,
@@ -45714,7 +45736,7 @@ function AnimationManager(_ref2) {
45714
45736
  if (!children2 && !clonedChildren && previousChildren) {
45715
45737
  setClonedChildren(previousChildren);
45716
45738
  }
45717
- useIsomorphicLayoutEffect$2(() => {
45739
+ useIsomorphicLayoutEffect$3(() => {
45718
45740
  if (!element2) {
45719
45741
  return;
45720
45742
  }
@@ -46214,7 +46236,7 @@ function SortableContext(_ref2) {
46214
46236
  const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);
46215
46237
  const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;
46216
46238
  const disabled = normalizeDisabled(disabledProp);
46217
- useIsomorphicLayoutEffect$2(() => {
46239
+ useIsomorphicLayoutEffect$3(() => {
46218
46240
  if (itemsHaveChanged && isDragging) {
46219
46241
  measureDroppableContainers(items);
46220
46242
  }
@@ -46295,7 +46317,7 @@ function useDerivedTransform(_ref2) {
46295
46317
  } = _ref2;
46296
46318
  const [derivedTransform, setDerivedtransform] = reactExports.useState(null);
46297
46319
  const previousIndex = reactExports.useRef(index2);
46298
- useIsomorphicLayoutEffect$2(() => {
46320
+ useIsomorphicLayoutEffect$3(() => {
46299
46321
  if (!disabled && index2 !== previousIndex.current && node2.current) {
46300
46322
  const initial = rect2.current;
46301
46323
  if (initial) {
@@ -46830,7 +46852,7 @@ const WorkspaceCard = reactExports.memo(function WorkspaceCard2({
46830
46852
  openWorkspace(workspaceId);
46831
46853
  }
46832
46854
  };
46833
- const className = `@container group flex flex-row items-center justify-between pl-3 pr-2 py-1 min-w-0 overflow-hidden cursor-pointer select-none transition-colors hover:bg-accent/50 ${isActive ? "bg-accent/50 border-l-2 border-l-primary" : ""} ${isFocused ? "ring-2 ring-inset ring-ring" : ""} ${href ? "no-underline text-inherit" : ""}`;
46855
+ const className = `@container group flex flex-row items-center justify-between pl-3 pr-2 py-1 min-h-9 min-w-0 overflow-hidden cursor-pointer select-none touch-manipulation transition-colors hover:bg-accent/50 [@media(pointer:coarse)]:min-h-11 [@media(pointer:coarse)]:py-2 ${isActive ? "border-l-2 border-l-primary" : ""} ${isFocused ? "ring-2 ring-inset ring-ring" : ""} ${href ? "no-underline text-inherit" : ""}`;
46834
46856
  const containerProps = {
46835
46857
  ref: cardRef,
46836
46858
  className,
@@ -46876,18 +46898,18 @@ const WorkspaceCard = reactExports.memo(function WorkspaceCard2({
46876
46898
  };
46877
46899
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
46878
46900
  /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ...containerProps, children: [
46879
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { children: [
46901
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { delayDuration: 800, children: [
46880
46902
  /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 min-w-0 overflow-hidden", children: [
46881
46903
  /* @__PURE__ */ jsxRuntimeExports.jsx(AgentStatusIndicator, { agent: status?.agent, isActive }),
46882
46904
  /* @__PURE__ */ jsxRuntimeExports.jsx(
46883
46905
  "span",
46884
46906
  {
46885
- className: `text-sm truncate ${isActive ? "font-semibold text-foreground" : "font-medium text-muted-foreground"}`,
46907
+ className: `text-sm truncate ${isActive ? "font-bold text-foreground" : "font-medium text-muted-foreground"}`,
46886
46908
  children: showProjectName ? `${projectName}/${worktree.branch}` : worktree.branch
46887
46909
  }
46888
46910
  )
46889
46911
  ] }) }),
46890
- /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "top", children: showProjectName ? worktree.path : worktree.branch })
46912
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "right", children: `${projectName}/${worktree.branch}` })
46891
46913
  ] }),
46892
46914
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "hidden @[10rem]:flex group-hover:flex items-center gap-2 shrink-0 ml-auto pl-2", children: [
46893
46915
  /* @__PURE__ */ jsxRuntimeExports.jsx(SetupStatusIndicator, { setup: setupStatus }),
@@ -46973,6 +46995,11 @@ function SortableProject({
46973
46995
  const plainHref = isPlain ? capabilities2.getWorkspaceHref?.(plainWorkspaceId) : void 0;
46974
46996
  const plainAgent = isPlain ? statuses.get(plainWorkspaceId)?.agent : void 0;
46975
46997
  const plainIsFocused = isPlain && workspaceIndexStart === focusedIndex;
46998
+ const activeWorkspaceId = useDashboardStore((s2) => s2.activeWorkspaceId);
46999
+ const gitHeaderIsActive = reactExports.useMemo(
47000
+ () => !isPlain && project.worktrees.some((wt2) => toWorkspaceId(project.name, wt2.branch) === activeWorkspaceId),
47001
+ [isPlain, project.worktrees, project.name, activeWorkspaceId]
47002
+ );
46976
47003
  const handlePlainOpen = () => {
46977
47004
  clearNeedsAttention(plainWorkspaceId);
46978
47005
  if (plainHref && capabilities2.navigate) {
@@ -46982,13 +47009,14 @@ function SortableProject({
46982
47009
  }
46983
47010
  };
46984
47011
  let workspaceIndex = workspaceIndexStart;
46985
- const headerClassName = isPlain ? `group flex items-center justify-between mb-0.5 pl-1 pr-1 py-1.5 min-w-0 overflow-hidden cursor-pointer select-none touch-pan-y transition-colors hover:bg-accent/50 ${plainIsActive ? "bg-accent/50 border-l-2 border-l-primary" : ""} ${plainIsFocused ? "ring-2 ring-inset ring-ring" : ""}` : "group flex items-center justify-between mb-0.5 pl-1 pr-0 select-none touch-pan-y";
47012
+ const headerClassName = isPlain ? `group flex items-center justify-between mb-0.5 pl-1 pr-1 py-1.5 min-w-0 overflow-hidden cursor-pointer select-none touch-pan-y transition-colors hover:bg-accent/50 [@media(pointer:coarse)]:min-h-11 [@media(pointer:coarse)]:py-2.5 ${plainIsActive ? "bg-primary/15 hover:bg-primary/15 border-l-2 border-l-primary" : ""} ${plainIsFocused ? "ring-2 ring-inset ring-ring" : ""}` : `group flex items-center justify-between mb-0.5 pl-1 pr-0 rounded select-none touch-pan-y transition-colors hover:bg-accent/50 [@media(pointer:coarse)]:min-h-11 ${gitHeaderIsActive ? "bg-primary/15 hover:bg-primary/15 border-l-2 border-l-primary" : ""}`;
46986
47013
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: setNodeRef, style: style2, className: "min-w-0 px-2", children: [
46987
47014
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
46988
47015
  /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
46989
47016
  "div",
46990
47017
  {
46991
47018
  className: headerClassName,
47019
+ "data-testid": `project-list__project-header--${project.name}`,
46992
47020
  onClick: () => isPlain ? handlePlainOpen() : onToggleCollapse(project.name),
46993
47021
  children: [
46994
47022
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -47007,16 +47035,26 @@ function SortableProject({
47007
47035
  // indicator's size-3 fallback would make plain headers
47008
47036
  // read as nested workspace cards (see #427 review).
47009
47037
  plainAgent && (plainAgent.status === "working" || plainAgent.status === "needs_attention") ? /* @__PURE__ */ jsxRuntimeExports.jsx(AgentStatusIndicator, { agent: plainAgent, isActive: plainIsActive }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Folder, { className: "size-4 shrink-0 text-muted-foreground" })
47010
- ) : collapsed ? /* @__PURE__ */ jsxRuntimeExports.jsx(Folder, { className: "size-4 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpen, { className: "size-4 shrink-0 text-muted-foreground" }),
47038
+ ) : collapsed ? /* @__PURE__ */ jsxRuntimeExports.jsx(
47039
+ Folder,
47040
+ {
47041
+ className: `size-4 shrink-0 ${gitHeaderIsActive ? "text-primary" : "text-muted-foreground"}`
47042
+ }
47043
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
47044
+ FolderOpen,
47045
+ {
47046
+ className: `size-4 shrink-0 ${gitHeaderIsActive ? "text-primary" : "text-muted-foreground"}`
47047
+ }
47048
+ ),
47011
47049
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { children: [
47012
47050
  /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
47013
47051
  "h2",
47014
47052
  {
47015
- className: `text-sm font-semibold truncate ${isPlain && plainIsActive ? "text-foreground" : "text-foreground/80"}`,
47053
+ className: `text-sm truncate ${isPlain && plainIsActive || gitHeaderIsActive ? "font-bold text-foreground" : "font-semibold text-foreground/80"}`,
47016
47054
  children: project.name
47017
47055
  }
47018
47056
  ) }),
47019
- /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "top", children: project.name })
47057
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "right", children: project.name })
47020
47058
  ] })
47021
47059
  ]
47022
47060
  }
@@ -47041,10 +47079,17 @@ function SortableProject({
47041
47079
  }
47042
47080
  ) }),
47043
47081
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
47044
- !isPlain && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => onToggleCollapse(project.name), children: [
47045
- /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: collapsed ? "" : "rotate-90" }),
47046
- collapsed ? "Expand" : "Collapse"
47047
- ] }),
47082
+ !isPlain && /* @__PURE__ */ jsxRuntimeExports.jsxs(
47083
+ ContextMenuItem,
47084
+ {
47085
+ "data-testid": "project-list__context-menu-item--collapse",
47086
+ onClick: () => onToggleCollapse(project.name),
47087
+ children: [
47088
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: collapsed ? "" : "rotate-90" }),
47089
+ collapsed ? "Expand" : "Collapse"
47090
+ ]
47091
+ }
47092
+ ),
47048
47093
  labels.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuSub, { children: [
47049
47094
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuSubTrigger, { children: [
47050
47095
  /* @__PURE__ */ jsxRuntimeExports.jsx(Tag$1, { className: "size-4 mr-2" }),
@@ -47093,7 +47138,11 @@ function SortableProject({
47093
47138
  ] })
47094
47139
  ] })
47095
47140
  ] }),
47096
- !isPlain && !collapsed && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-0.5 overflow-hidden", children: project.worktrees.length === 0 ? hasPinnedSiblings ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground px-4 py-2", children: "No workspaces yet" }) : project.worktrees.map((wt2) => {
47141
+ !isPlain && !collapsed && // `ml-3 border-l` draws a thin tree rail down the left of the branch
47142
+ // list so the workspaces read as children of the project header above,
47143
+ // not as sibling rows. The header sits at `pl-1`; the rail lands just
47144
+ // under its folder icon so the hierarchy is obvious at a glance.
47145
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-0.5 overflow-hidden ml-3 border-l border-border/50", children: project.worktrees.length === 0 ? hasPinnedSiblings ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground px-4 py-2", children: "No workspaces yet" }) : project.worktrees.map((wt2) => {
47097
47146
  const wsId = toWorkspaceId(project.name, wt2.branch);
47098
47147
  const currentIndex = workspaceIndex++;
47099
47148
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -47483,27 +47532,40 @@ function ProjectList({ labelFilter }) {
47483
47532
  onToggle: () => labelCollapse.toggle(groupKey)
47484
47533
  }
47485
47534
  )),
47486
- !groupCollapsed && group.projects.map((project) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
47487
- SortableProject,
47488
- {
47489
- project,
47490
- statuses,
47491
- branchStatuses,
47492
- setupStatuses,
47493
- removeProject: (name2) => removeProjectMutation.mutate(name2),
47494
- updateProjectLabel: (name2, label) => updateProjectLabelMutation.mutate({ name: name2, label }),
47495
- onPromoteToGit: setPromoteDialog,
47496
- labels,
47497
- setWorkspaceDialog,
47498
- onShowDeleteDialog: setDeleteDialog,
47499
- focusedIndex,
47500
- workspaceIndexStart: workspaceIndexMap.get(project.name) ?? 0,
47501
- collapsed: projectCollapse.isCollapsed(project.name),
47502
- onToggleCollapse: projectCollapse.toggle,
47503
- hasPinnedSiblings: projectsWithPinned.has(project.name),
47504
- onTogglePinned: togglePinned
47505
- }
47506
- ) }, project.name))
47535
+ !groupCollapsed && group.projects.map((project) => (
47536
+ // Thin divider between consecutive projects in a label
47537
+ // group (skipped on the first row, which sits flush under
47538
+ // the label header) so project blocks are visually
47539
+ // separated without a heavy border.
47540
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
47541
+ "div",
47542
+ {
47543
+ className: "border-border/40 pt-1 first:pt-0 not-first:border-t",
47544
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
47545
+ SortableProject,
47546
+ {
47547
+ project,
47548
+ statuses,
47549
+ branchStatuses,
47550
+ setupStatuses,
47551
+ removeProject: (name2) => removeProjectMutation.mutate(name2),
47552
+ updateProjectLabel: (name2, label) => updateProjectLabelMutation.mutate({ name: name2, label }),
47553
+ onPromoteToGit: setPromoteDialog,
47554
+ labels,
47555
+ setWorkspaceDialog,
47556
+ onShowDeleteDialog: setDeleteDialog,
47557
+ focusedIndex,
47558
+ workspaceIndexStart: workspaceIndexMap.get(project.name) ?? 0,
47559
+ collapsed: projectCollapse.isCollapsed(project.name),
47560
+ onToggleCollapse: projectCollapse.toggle,
47561
+ hasPinnedSiblings: projectsWithPinned.has(project.name),
47562
+ onTogglePinned: togglePinned
47563
+ }
47564
+ )
47565
+ },
47566
+ project.name
47567
+ )
47568
+ ))
47507
47569
  ] }, groupKey);
47508
47570
  }) }),
47509
47571
  /* @__PURE__ */ jsxRuntimeExports.jsx(DragOverlay, { dropAnimation: null, children: activeDragId ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 px-1 py-1 bg-background rounded shadow-lg border", children: [
@@ -47698,6 +47760,7 @@ const KNOWN_AGENTS = [
47698
47760
  { id: "opencode", type: "opencode", label: "OpenCode", defaultCommand: "opencode" }
47699
47761
  ];
47700
47762
  const MODEL_DEFAULT_SENTINEL = "__band_default__";
47763
+ const ID_DELIMITER = "";
47701
47764
  function formatCtxWindow$1(n2) {
47702
47765
  if (n2 >= 1e6) {
47703
47766
  const m2 = n2 / 1e6;
@@ -47706,6 +47769,18 @@ function formatCtxWindow$1(n2) {
47706
47769
  if (n2 >= 1e3) return `${Math.round(n2 / 1e3)}k`;
47707
47770
  return String(n2);
47708
47771
  }
47772
+ function formatLastRefreshed(epochMs) {
47773
+ const diff2 = Date.now() - epochMs;
47774
+ if (diff2 < 6e4) return "just now";
47775
+ if (diff2 < 60 * 6e4) return `${Math.round(diff2 / 6e4)}m ago`;
47776
+ if (diff2 < 24 * 60 * 6e4) return `${Math.round(diff2 / (60 * 6e4))}h ago`;
47777
+ if (diff2 < 48 * 60 * 6e4) return "yesterday";
47778
+ try {
47779
+ return new Date(epochMs).toLocaleDateString();
47780
+ } catch {
47781
+ return new Date(epochMs).toISOString();
47782
+ }
47783
+ }
47709
47784
  function SettingsPage({ open: open2, onOpenChange }) {
47710
47785
  const { settings } = useSettingsQuery();
47711
47786
  const updateSettingsMutation = useUpdateSettings();
@@ -47750,15 +47825,96 @@ function SettingsPage({ open: open2, onOpenChange }) {
47750
47825
  const [agentModels, setAgentModels] = reactExports.useState({});
47751
47826
  const [contextMeterEnabled, setContextMeterEnabled] = useExperimentalContextMeter();
47752
47827
  const adapter2 = useAdapter();
47828
+ const mergeAgentModels = reactExports.useCallback(
47829
+ (agentId, patch2) => setAgentModels((prev2) => ({
47830
+ ...prev2,
47831
+ [agentId]: {
47832
+ models: patch2.models ?? prev2[agentId]?.models ?? [],
47833
+ updatedAt: "updatedAt" in patch2 ? patch2.updatedAt : prev2[agentId]?.updatedAt,
47834
+ isRefreshing: patch2.isRefreshing ?? prev2[agentId]?.isRefreshing ?? false,
47835
+ error: "error" in patch2 ? patch2.error : prev2[agentId]?.error
47836
+ }
47837
+ })),
47838
+ []
47839
+ );
47840
+ const agentIdsKey = reactExports.useMemo(
47841
+ () => codingAgents.map((a2) => a2.id).join(ID_DELIMITER),
47842
+ [codingAgents]
47843
+ );
47844
+ const agentIds = reactExports.useMemo(
47845
+ () => agentIdsKey === "" ? [] : agentIdsKey.split(ID_DELIMITER),
47846
+ [agentIdsKey]
47847
+ );
47753
47848
  reactExports.useEffect(() => {
47754
- if (!adapter2.listModels) return;
47755
- for (const agent of codingAgents) {
47756
- adapter2.listModels(agent.id).then((models) => {
47757
- setAgentModels((prev2) => ({ ...prev2, [agent.type]: models }));
47849
+ setAgentModels((prev2) => {
47850
+ const allowed = new Set(agentIds);
47851
+ const next2 = {};
47852
+ let changed = false;
47853
+ for (const [id28, entry] of Object.entries(prev2)) {
47854
+ if (allowed.has(id28)) {
47855
+ next2[id28] = entry;
47856
+ } else {
47857
+ changed = true;
47858
+ }
47859
+ }
47860
+ return changed ? next2 : prev2;
47861
+ });
47862
+ let aborted2 = false;
47863
+ if (adapter2.listAllModels) {
47864
+ const allowed = new Set(agentIds);
47865
+ adapter2.listAllModels().then((data) => {
47866
+ if (aborted2) return;
47867
+ for (const entry of data.agents) {
47868
+ if (!allowed.has(entry.agentId)) continue;
47869
+ mergeAgentModels(entry.agentId, {
47870
+ models: entry.models,
47871
+ updatedAt: entry.updatedAt
47872
+ });
47873
+ }
47758
47874
  }).catch(() => {
47759
47875
  });
47876
+ } else {
47877
+ for (const id28 of agentIds) {
47878
+ adapter2.listModels?.(id28).then((data) => {
47879
+ if (aborted2) return;
47880
+ mergeAgentModels(id28, { models: data.models, updatedAt: data.updatedAt });
47881
+ }).catch(() => {
47882
+ });
47883
+ }
47760
47884
  }
47761
- }, [codingAgents, adapter2]);
47885
+ return () => {
47886
+ aborted2 = true;
47887
+ };
47888
+ }, [agentIds, adapter2, mergeAgentModels]);
47889
+ const handleRefreshModels = reactExports.useCallback(
47890
+ async (agentId) => {
47891
+ if (!adapter2.refreshModels) return;
47892
+ mergeAgentModels(agentId, { isRefreshing: true, error: void 0 });
47893
+ try {
47894
+ const data = await adapter2.refreshModels(agentId);
47895
+ const result = data.results.find((r2) => r2.agentId === agentId);
47896
+ if (result) {
47897
+ mergeAgentModels(agentId, {
47898
+ models: result.models,
47899
+ updatedAt: result.updatedAt,
47900
+ isRefreshing: false,
47901
+ error: result.error
47902
+ });
47903
+ } else {
47904
+ mergeAgentModels(agentId, {
47905
+ isRefreshing: false,
47906
+ error: `server returned no refresh result for ${agentId}`
47907
+ });
47908
+ }
47909
+ } catch (err) {
47910
+ mergeAgentModels(agentId, {
47911
+ isRefreshing: false,
47912
+ error: err instanceof Error ? err.message : String(err)
47913
+ });
47914
+ }
47915
+ },
47916
+ [adapter2, mergeAgentModels]
47917
+ );
47762
47918
  const isDirty = reactExports.useMemo(() => {
47763
47919
  if (worktreesDir !== (settings.worktreesDir ?? "")) return true;
47764
47920
  if (JSON.stringify(codingAgents) !== JSON.stringify(Array.isArray(settings.codingAgents) ? settings.codingAgents : []))
@@ -48187,7 +48343,11 @@ function SettingsPage({ open: open2, onOpenChange }) {
48187
48343
  /* @__PURE__ */ jsxRuntimeExports.jsx(Accordion, { type: "multiple", className: "w-full", children: KNOWN_AGENTS.map((known) => {
48188
48344
  const agent = codingAgents.find((a2) => a2.type === known.type);
48189
48345
  const enabled = !!agent;
48190
- const models = agentModels[known.type] ?? [];
48346
+ const modelState = agent ? agentModels[agent.id] : void 0;
48347
+ const models = modelState?.models ?? [];
48348
+ const isRefreshing = modelState?.isRefreshing ?? false;
48349
+ const updatedAt = modelState?.updatedAt;
48350
+ const refreshError = modelState?.error;
48191
48351
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
48192
48352
  AccordionItem,
48193
48353
  {
@@ -48263,7 +48423,70 @@ function SettingsPage({ open: open2, onOpenChange }) {
48263
48423
  }
48264
48424
  )
48265
48425
  ] }),
48266
- models.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
48426
+ agent && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
48427
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
48428
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Label$1, { className: "text-xs text-muted-foreground", children: [
48429
+ "Models ",
48430
+ models.length > 0 && `(${models.length})`
48431
+ ] }),
48432
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
48433
+ Button,
48434
+ {
48435
+ type: "button",
48436
+ variant: "ghost",
48437
+ size: "sm",
48438
+ className: "h-6 gap-1 px-2 text-xs",
48439
+ disabled: !enabled || isRefreshing,
48440
+ onClick: () => handleRefreshModels(agent.id),
48441
+ "aria-label": `Refresh models for ${known.label}`,
48442
+ "data-testid": `settings-page__refresh-models-${agent.id}`,
48443
+ children: [
48444
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
48445
+ RefreshCcw,
48446
+ {
48447
+ className: cn$2("size-3", isRefreshing && "animate-spin")
48448
+ }
48449
+ ),
48450
+ isRefreshing ? "Refreshing…" : "Refresh"
48451
+ ]
48452
+ }
48453
+ )
48454
+ ] }),
48455
+ models.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
48456
+ "ul",
48457
+ {
48458
+ className: "rounded-md border border-border bg-muted/30 px-2 py-1 text-xs",
48459
+ "data-testid": `settings-page__model-list-${agent.id}`,
48460
+ children: models.map((m2) => (
48461
+ // Two-line layout, mirroring the chat-pane
48462
+ // model dropdown (`ModelLine` in ChatView):
48463
+ // top row is name + optional context-window
48464
+ // pill, second row is the description.
48465
+ // Keeps Settings and the chat picker
48466
+ // visually consistent.
48467
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex flex-col items-start gap-0.5 py-1", children: [
48468
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "flex w-full items-baseline justify-between gap-2", children: [
48469
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: m2.name }),
48470
+ m2.contextWindow !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[10px] uppercase tabular-nums text-muted-foreground", children: [
48471
+ formatCtxWindow$1(m2.contextWindow),
48472
+ " ctx"
48473
+ ] })
48474
+ ] }),
48475
+ m2.description && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] text-muted-foreground", children: m2.description })
48476
+ ] }, m2.id)
48477
+ ))
48478
+ }
48479
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] text-muted-foreground", children: "No models cached yet — click Refresh." }),
48480
+ refreshError && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-[11px] text-destructive", children: [
48481
+ "Refresh failed: ",
48482
+ refreshError
48483
+ ] }),
48484
+ updatedAt !== void 0 && updatedAt > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-[10px] text-muted-foreground", children: [
48485
+ "Last refreshed ",
48486
+ formatLastRefreshed(updatedAt)
48487
+ ] })
48488
+ ] }),
48489
+ agent && models.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
48267
48490
  /* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-xs text-muted-foreground", children: "Default model" }),
48268
48491
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
48269
48492
  Select,
@@ -57929,63 +58152,73 @@ function WorkspacePickerDialog({ open: open2, onOpenChange }) {
57929
58152
  },
57930
58153
  [capabilities2, openWorkspace, clearNeedsAttention, onOpenChange]
57931
58154
  );
57932
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { className: "overflow-hidden p-0 sm:max-w-[520px]", showCloseButton: false, children: [
57933
- /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { className: "sr-only", children: [
57934
- /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: "Switch Workspace" }),
57935
- /* @__PURE__ */ jsxRuntimeExports.jsx(DialogDescription, { children: "Search workspaces by name, project, or branch" })
57936
- ] }),
57937
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Command, { shouldFilter: true, children: [
57938
- /* @__PURE__ */ jsxRuntimeExports.jsx(CommandInput, { placeholder: "Switch workspace...", value: query, onValueChange: setQuery }),
57939
- /* @__PURE__ */ jsxRuntimeExports.jsxs(CommandList, { className: "max-h-[360px]", children: [
57940
- /* @__PURE__ */ jsxRuntimeExports.jsx(CommandEmpty, { children: "No workspaces found." }),
57941
- sortedWorkspaces.map((entry) => {
57942
- const isActive = activeWorkspaceId === entry.workspaceId;
57943
- const pinnedNow = isPinned(entry.workspaceId);
57944
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
57945
- CommandItem,
57946
- {
57947
- value: `${entry.projectName} ${entry.branch}`,
57948
- onSelect: () => handleSelect(entry.workspaceId),
57949
- className: "group",
57950
- children: [
57951
- /* @__PURE__ */ jsxRuntimeExports.jsx(AgentStatusIndicator, { agent: entry.agent }),
57952
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-sm font-medium", children: [
57953
- entry.projectName,
57954
- "/",
57955
- entry.branch
57956
- ] }),
57957
- pinnedNow && /* @__PURE__ */ jsxRuntimeExports.jsx(Pin, { className: "size-3 -rotate-45 text-muted-foreground shrink-0" }),
57958
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
57959
- isActive && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: "current" }),
57960
- /* @__PURE__ */ jsxRuntimeExports.jsx(
57961
- "button",
57962
- {
57963
- type: "button",
57964
- "aria-label": pinnedNow ? "Unpin workspace" : "Pin workspace",
57965
- className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",
57966
- onMouseDown: (e3) => {
57967
- e3.preventDefault();
57968
- e3.stopPropagation();
57969
- togglePinned(entry.projectName, entry.branch, pinnedNow);
57970
- },
57971
- onClick: (e3) => {
57972
- if (e3.detail !== 0) return;
57973
- e3.preventDefault();
57974
- e3.stopPropagation();
57975
- togglePinned(entry.projectName, entry.branch, pinnedNow);
57976
- },
57977
- children: pinnedNow ? /* @__PURE__ */ jsxRuntimeExports.jsx(PinOff, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Pin, { className: "size-3.5" })
57978
- }
57979
- )
57980
- ] })
57981
- ]
57982
- },
57983
- entry.workspaceId
57984
- );
57985
- })
57986
- ] })
57987
- ] })
57988
- ] }) });
58155
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
58156
+ DialogContent,
58157
+ {
58158
+ className: "overflow-hidden border-0 bg-popover p-0 shadow-2xl sm:max-w-[520px]",
58159
+ overlayClassName: "backdrop-blur-sm",
58160
+ showCloseButton: false,
58161
+ "data-testid": "workspace-picker",
58162
+ onOpenAutoFocus: (e3) => {
58163
+ if (window.matchMedia("(pointer: coarse)").matches) e3.preventDefault();
58164
+ },
58165
+ children: [
58166
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { className: "sr-only", children: [
58167
+ /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: "Switch Workspace" }),
58168
+ /* @__PURE__ */ jsxRuntimeExports.jsx(DialogDescription, { children: "Search workspaces by name, project, or branch" })
58169
+ ] }),
58170
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Command, { shouldFilter: true, children: [
58171
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CommandInput, { placeholder: "Switch workspace...", value: query, onValueChange: setQuery }),
58172
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(CommandList, { className: "max-h-[360px]", children: [
58173
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CommandEmpty, { children: "No workspaces found." }),
58174
+ sortedWorkspaces.map((entry) => {
58175
+ const isActive = activeWorkspaceId === entry.workspaceId;
58176
+ const pinnedNow = isPinned(entry.workspaceId);
58177
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
58178
+ CommandItem,
58179
+ {
58180
+ value: `${entry.projectName} ${entry.branch}`,
58181
+ onSelect: () => handleSelect(entry.workspaceId),
58182
+ "data-testid": `workspace-picker__item--${entry.workspaceId}`,
58183
+ className: "group touch-manipulation [@media(pointer:coarse)]:min-h-11 [@media(pointer:coarse)]:gap-3",
58184
+ children: [
58185
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AgentStatusIndicator, { agent: entry.agent }),
58186
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-sm font-medium", children: [
58187
+ entry.projectName,
58188
+ "/",
58189
+ entry.branch
58190
+ ] }),
58191
+ pinnedNow && /* @__PURE__ */ jsxRuntimeExports.jsx(Pin, { className: "size-3 -rotate-45 text-muted-foreground shrink-0" }),
58192
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
58193
+ isActive && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: "current" }),
58194
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
58195
+ "button",
58196
+ {
58197
+ type: "button",
58198
+ "aria-label": pinnedNow ? "Unpin workspace" : "Pin workspace",
58199
+ "data-testid": `workspace-picker__pin--${entry.workspaceId}`,
58200
+ className: "inline-flex size-7 shrink-0 items-center justify-center rounded-md opacity-0 transition-opacity text-muted-foreground hover:text-foreground group-hover:opacity-100 focus:opacity-100 [@media(pointer:coarse)]:size-9 [@media(pointer:coarse)]:opacity-100",
58201
+ onPointerDown: (e3) => e3.stopPropagation(),
58202
+ onMouseDown: (e3) => e3.stopPropagation(),
58203
+ onClick: (e3) => {
58204
+ e3.preventDefault();
58205
+ e3.stopPropagation();
58206
+ togglePinned(entry.projectName, entry.branch, pinnedNow);
58207
+ },
58208
+ children: pinnedNow ? /* @__PURE__ */ jsxRuntimeExports.jsx(PinOff, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Pin, { className: "size-3.5" })
58209
+ }
58210
+ )
58211
+ ] })
58212
+ ]
58213
+ },
58214
+ entry.workspaceId
58215
+ );
58216
+ })
58217
+ ] })
58218
+ ] })
58219
+ ]
58220
+ }
58221
+ ) });
57989
58222
  }
57990
58223
  const MAX_HISTORY = 100;
57991
58224
  const LINE_PROXIMITY_THRESHOLD = 5;
@@ -63001,13 +63234,13 @@ const noop$5 = () => {
63001
63234
  const freezeIfAvailable = (obj) => {
63002
63235
  if (Object.freeze) Object.freeze(obj);
63003
63236
  };
63004
- function createInnerProxy(callback, path2, memo) {
63237
+ function createInnerProxy(callback, path2, memo2) {
63005
63238
  var _memo$cacheKey;
63006
63239
  const cacheKey = path2.join(".");
63007
- (_memo$cacheKey = memo[cacheKey]) !== null && _memo$cacheKey !== void 0 || (memo[cacheKey] = new Proxy(noop$5, {
63240
+ (_memo$cacheKey = memo2[cacheKey]) !== null && _memo$cacheKey !== void 0 || (memo2[cacheKey] = new Proxy(noop$5, {
63008
63241
  get(_obj, key2) {
63009
63242
  if (typeof key2 !== "string" || key2 === "then") return void 0;
63010
- return createInnerProxy(callback, [...path2, key2], memo);
63243
+ return createInnerProxy(callback, [...path2, key2], memo2);
63011
63244
  },
63012
63245
  apply(_1, _2, args) {
63013
63246
  const lastOfPath = path2[path2.length - 1];
@@ -63028,7 +63261,7 @@ function createInnerProxy(callback, path2, memo) {
63028
63261
  return callback(opts);
63029
63262
  }
63030
63263
  }));
63031
- return memo[cacheKey];
63264
+ return memo2[cacheKey];
63032
63265
  }
63033
63266
  const createRecursiveProxy = (callback) => createInnerProxy(callback, [], emptyObject());
63034
63267
  const createFlatProxy = (callback) => {
@@ -64500,7 +64733,15 @@ class WebDashboardAdapter {
64500
64733
  }
64501
64734
  async listModels(agentId) {
64502
64735
  const data = await this.trpc.models.list.query({ agentId });
64503
- return data.models;
64736
+ return data;
64737
+ }
64738
+ async listAllModels() {
64739
+ const data = await this.trpc.models.listAll.query();
64740
+ return data;
64741
+ }
64742
+ async refreshModels(agentId) {
64743
+ const data = await this.trpc.models.refresh.mutate({ agentId });
64744
+ return data;
64504
64745
  }
64505
64746
  statusHandlers = /* @__PURE__ */ new Set();
64506
64747
  statusSubscription = null;
@@ -80383,6 +80624,18 @@ function applyMaximizedGroupToApi(api, desired) {
80383
80624
  if (next2.api.isMaximized()) return;
80384
80625
  next2.api.maximize();
80385
80626
  }
80627
+ function applyGroupActiveViewsToApi(api, state2) {
80628
+ try {
80629
+ for (const viewId of Object.values(state2.groups)) {
80630
+ const panel = api.getPanel(viewId);
80631
+ if (!panel) continue;
80632
+ if (panel.api.isActive) continue;
80633
+ if (panel.group.panels.length <= 1) continue;
80634
+ panel.api.setActive();
80635
+ }
80636
+ } catch {
80637
+ }
80638
+ }
80386
80639
  const EDGE_GROUP_IDS$1 = {
80387
80640
  left: "edge-left",
80388
80641
  right: "edge-right",
@@ -108703,7 +108956,7 @@ var tn = f$5("block", "before:content-[counter(line)]", "before:inline-block", "
108703
108956
  var et$1 = ({ className: e3, language: t2, style: o3, isIncomplete: n2, ...s2 }) => jsxRuntimeExports.jsx("div", { className: f$5("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e3), "data-incomplete": n2 || void 0, "data-language": t2, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o3 }, ...s2 });
108704
108957
  var Se$1 = reactExports.createContext({ code: "" }), de$2 = () => reactExports.useContext(Se$1);
108705
108958
  var ot$1 = ({ language: e3 }) => jsxRuntimeExports.jsx("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e3, "data-streamdown": "code-block-header", children: jsxRuntimeExports.jsx("span", { className: "ml-1 font-mono lowercase", children: e3 }) });
108706
- var cn = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-CYHh4OgM.js").then((e3) => ({ default: e3.HighlightedCodeBlockBody }))), rt = ({ code: e3, language: t2, className: o3, children: n2, isIncomplete: s2 = false, ...r2 }) => {
108959
+ var cn = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-DGIqRI0V.js").then((e3) => ({ default: e3.HighlightedCodeBlockBody }))), rt = ({ code: e3, language: t2, className: o3, children: n2, isIncomplete: s2 = false, ...r2 }) => {
108707
108960
  let i2 = reactExports.useMemo(() => e3.replace(cn, ""), [e3]), c2 = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i2.split(`
108708
108961
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i2]);
108709
108962
  return jsxRuntimeExports.jsx(Se$1.Provider, { value: { code: e3 }, children: jsxRuntimeExports.jsxs(et$1, { isIncomplete: s2, language: t2, children: [jsxRuntimeExports.jsx(ot$1, { language: t2 }), n2 ? jsxRuntimeExports.jsx("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: n2 }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(Qe$1, { className: o3, language: t2, result: c2, ...r2 }), children: jsxRuntimeExports.jsx(dn, { className: o3, code: i2, language: t2, raw: c2, ...r2 }) })] }) });
@@ -109025,7 +109278,7 @@ var Dt = ({ children: e3, className: t2, onDownload: o3, onError: n2 }) => {
109025
109278
  }, []), jsxRuntimeExports.jsxs("div", { className: "relative", ref: i2, children: [jsxRuntimeExports.jsx("button", { className: f$5("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", t2), disabled: c2, onClick: () => r2(!s2), title: "Download table", type: "button", children: e3 != null ? e3 : jsxRuntimeExports.jsx(Z$2, { size: 14 }) }), s2 ? jsxRuntimeExports.jsxs("div", { className: "absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg", children: [jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("csv"), title: "Download table as CSV", type: "button", children: "CSV" }), jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("markdown"), title: "Download table as Markdown", type: "button", children: "Markdown" })] }) : null] });
109026
109279
  };
109027
109280
  var Vt = ({ children: e3, className: t2, showControls: o3, ...n2 }) => jsxRuntimeExports.jsxs("div", { className: "my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2", "data-streamdown": "table-wrapper", children: [o3 ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-1", children: [jsxRuntimeExports.jsx(Ht, {}), jsxRuntimeExports.jsx(Dt, {})] }) : null, jsxRuntimeExports.jsx("div", { className: "border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background", children: jsxRuntimeExports.jsx("table", { className: f$5("w-full divide-y divide-border", t2), "data-streamdown": "table", ...n2, children: e3 }) })] });
109028
- var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-DSjx-3jg.js").then((e3) => ({ default: e3.Mermaid }))), Kn = /language-([^\s]+)/;
109281
+ var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-8mt5O2g5.js").then((e3) => ({ default: e3.Mermaid }))), Kn = /language-([^\s]+)/;
109029
109282
  function ke$1(e3, t2) {
109030
109283
  if (!(e3 != null && e3.position || t2 != null && t2.position)) return true;
109031
109284
  if (!(e3 != null && e3.position && (t2 != null && t2.position))) return false;
@@ -161196,12 +161449,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
161196
161449
  registerLayoutLoaders([
161197
161450
  {
161198
161451
  name: "dagre",
161199
- loader: /* @__PURE__ */ __name(async () => await import("./dagre-6UL2VRFP-BqzGOyEx.js"), "loader")
161452
+ loader: /* @__PURE__ */ __name(async () => await import("./dagre-6UL2VRFP-3X8TKKNF.js"), "loader")
161200
161453
  },
161201
161454
  ...[
161202
161455
  {
161203
161456
  name: "cose-bilkent",
161204
- loader: /* @__PURE__ */ __name(async () => await import("./cose-bilkent-S5V4N54A-CkINSUhh.js"), "loader")
161457
+ loader: /* @__PURE__ */ __name(async () => await import("./cose-bilkent-S5V4N54A-D9MbA73U.js"), "loader")
161205
161458
  }
161206
161459
  ]
161207
161460
  ]);
@@ -161640,7 +161893,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
161640
161893
  return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt);
161641
161894
  }, "detector");
161642
161895
  var loader = /* @__PURE__ */ __name(async () => {
161643
- const { diagram: diagram2 } = await import("./c4Diagram-YG6GDRKO-xiCvsYEV.js");
161896
+ const { diagram: diagram2 } = await import("./c4Diagram-YG6GDRKO-B12Oi-HH.js");
161644
161897
  return { id, diagram: diagram2 };
161645
161898
  }, "loader");
161646
161899
  var plugin = {
@@ -161657,7 +161910,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
161657
161910
  return /^\s*graph/.test(txt);
161658
161911
  }, "detector");
161659
161912
  var loader2 = /* @__PURE__ */ __name(async () => {
161660
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DHAz3SxN.js");
161913
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DO9viNx6.js");
161661
161914
  return { id: id2, diagram: diagram2 };
161662
161915
  }, "loader");
161663
161916
  var plugin2 = {
@@ -161680,7 +161933,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
161680
161933
  return /^\s*flowchart/.test(txt);
161681
161934
  }, "detector");
161682
161935
  var loader3 = /* @__PURE__ */ __name(async () => {
161683
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DHAz3SxN.js");
161936
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DO9viNx6.js");
161684
161937
  return { id: id3, diagram: diagram2 };
161685
161938
  }, "loader");
161686
161939
  var plugin3 = {
@@ -161694,7 +161947,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
161694
161947
  return /^\s*erDiagram/.test(txt);
161695
161948
  }, "detector");
161696
161949
  var loader4 = /* @__PURE__ */ __name(async () => {
161697
- const { diagram: diagram2 } = await import("./erDiagram-Q2GNP2WA-BcjilkRw.js");
161950
+ const { diagram: diagram2 } = await import("./erDiagram-Q2GNP2WA-Cv2t_qcc.js");
161698
161951
  return { id: id4, diagram: diagram2 };
161699
161952
  }, "loader");
161700
161953
  var plugin4 = {
@@ -161708,7 +161961,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
161708
161961
  return /^\s*gitGraph/.test(txt);
161709
161962
  }, "detector");
161710
161963
  var loader5 = /* @__PURE__ */ __name(async () => {
161711
- const { diagram: diagram2 } = await import("./gitGraphDiagram-V2S2FVAM-FbdmGq-M.js");
161964
+ const { diagram: diagram2 } = await import("./gitGraphDiagram-V2S2FVAM-Cn1yq3PZ.js");
161712
161965
  return { id: id5, diagram: diagram2 };
161713
161966
  }, "loader");
161714
161967
  var plugin5 = {
@@ -161722,7 +161975,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
161722
161975
  return /^\s*gantt/.test(txt);
161723
161976
  }, "detector");
161724
161977
  var loader6 = /* @__PURE__ */ __name(async () => {
161725
- const { diagram: diagram2 } = await import("./ganttDiagram-JELNMOA3-52f5bTC2.js");
161978
+ const { diagram: diagram2 } = await import("./ganttDiagram-JELNMOA3-BQLkwHvs.js");
161726
161979
  return { id: id6, diagram: diagram2 };
161727
161980
  }, "loader");
161728
161981
  var plugin6 = {
@@ -161736,7 +161989,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
161736
161989
  return /^\s*info/.test(txt);
161737
161990
  }, "detector");
161738
161991
  var loader7 = /* @__PURE__ */ __name(async () => {
161739
- const { diagram: diagram2 } = await import("./infoDiagram-HS3SLOUP-C0ZcYc2V.js");
161992
+ const { diagram: diagram2 } = await import("./infoDiagram-HS3SLOUP-Dn-PUlKq.js");
161740
161993
  return { id: id7, diagram: diagram2 };
161741
161994
  }, "loader");
161742
161995
  var info = {
@@ -161749,7 +162002,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
161749
162002
  return /^\s*pie/.test(txt);
161750
162003
  }, "detector");
161751
162004
  var loader8 = /* @__PURE__ */ __name(async () => {
161752
- const { diagram: diagram2 } = await import("./pieDiagram-ADFJNKIX-BroIyG3N.js");
162005
+ const { diagram: diagram2 } = await import("./pieDiagram-ADFJNKIX-CwWqz5Xf.js");
161753
162006
  return { id: id8, diagram: diagram2 };
161754
162007
  }, "loader");
161755
162008
  var pie = {
@@ -161762,7 +162015,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
161762
162015
  return /^\s*quadrantChart/.test(txt);
161763
162016
  }, "detector");
161764
162017
  var loader9 = /* @__PURE__ */ __name(async () => {
161765
- const { diagram: diagram2 } = await import("./quadrantDiagram-AYHSOK5B-DMH-yS8Y.js");
162018
+ const { diagram: diagram2 } = await import("./quadrantDiagram-AYHSOK5B-BZ8A8mON.js");
161766
162019
  return { id: id9, diagram: diagram2 };
161767
162020
  }, "loader");
161768
162021
  var plugin7 = {
@@ -161776,7 +162029,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
161776
162029
  return /^\s*xychart(-beta)?/.test(txt);
161777
162030
  }, "detector");
161778
162031
  var loader10 = /* @__PURE__ */ __name(async () => {
161779
- const { diagram: diagram2 } = await import("./xychartDiagram-PRI3JC2R-DBO0yxoy.js");
162032
+ const { diagram: diagram2 } = await import("./xychartDiagram-PRI3JC2R-DmHHkA_A.js");
161780
162033
  return { id: id10, diagram: diagram2 };
161781
162034
  }, "loader");
161782
162035
  var plugin8 = {
@@ -161790,7 +162043,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
161790
162043
  return /^\s*requirement(Diagram)?/.test(txt);
161791
162044
  }, "detector");
161792
162045
  var loader11 = /* @__PURE__ */ __name(async () => {
161793
- const { diagram: diagram2 } = await import("./requirementDiagram-UZGBJVZJ-BmwXQjqZ.js");
162046
+ const { diagram: diagram2 } = await import("./requirementDiagram-UZGBJVZJ-Cctcn3D4.js");
161794
162047
  return { id: id11, diagram: diagram2 };
161795
162048
  }, "loader");
161796
162049
  var plugin9 = {
@@ -161804,7 +162057,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
161804
162057
  return /^\s*sequenceDiagram/.test(txt);
161805
162058
  }, "detector");
161806
162059
  var loader12 = /* @__PURE__ */ __name(async () => {
161807
- const { diagram: diagram2 } = await import("./sequenceDiagram-WL72ISMW-DKSZXEOM.js");
162060
+ const { diagram: diagram2 } = await import("./sequenceDiagram-WL72ISMW-C83rLE-r.js");
161808
162061
  return { id: id12, diagram: diagram2 };
161809
162062
  }, "loader");
161810
162063
  var plugin10 = {
@@ -161821,7 +162074,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
161821
162074
  return /^\s*classDiagram/.test(txt);
161822
162075
  }, "detector");
161823
162076
  var loader13 = /* @__PURE__ */ __name(async () => {
161824
- const { diagram: diagram2 } = await import("./classDiagram-2ON5EDUG-BA0nXDYs.js");
162077
+ const { diagram: diagram2 } = await import("./classDiagram-2ON5EDUG-Dd_NiCJt.js");
161825
162078
  return { id: id13, diagram: diagram2 };
161826
162079
  }, "loader");
161827
162080
  var plugin11 = {
@@ -161838,7 +162091,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
161838
162091
  return /^\s*classDiagram-v2/.test(txt);
161839
162092
  }, "detector");
161840
162093
  var loader14 = /* @__PURE__ */ __name(async () => {
161841
- const { diagram: diagram2 } = await import("./classDiagram-v2-WZHVMYZB-BA0nXDYs.js");
162094
+ const { diagram: diagram2 } = await import("./classDiagram-v2-WZHVMYZB-Dd_NiCJt.js");
161842
162095
  return { id: id14, diagram: diagram2 };
161843
162096
  }, "loader");
161844
162097
  var plugin12 = {
@@ -161855,7 +162108,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
161855
162108
  return /^\s*stateDiagram/.test(txt);
161856
162109
  }, "detector");
161857
162110
  var loader15 = /* @__PURE__ */ __name(async () => {
161858
- const { diagram: diagram2 } = await import("./stateDiagram-FKZM4ZOC-ByoaVX2u.js");
162111
+ const { diagram: diagram2 } = await import("./stateDiagram-FKZM4ZOC-lfXNq0DS.js");
161859
162112
  return { id: id15, diagram: diagram2 };
161860
162113
  }, "loader");
161861
162114
  var plugin13 = {
@@ -161875,7 +162128,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
161875
162128
  return false;
161876
162129
  }, "detector");
161877
162130
  var loader16 = /* @__PURE__ */ __name(async () => {
161878
- const { diagram: diagram2 } = await import("./stateDiagram-v2-4FDKWEC3-BgkMjukC.js");
162131
+ const { diagram: diagram2 } = await import("./stateDiagram-v2-4FDKWEC3-BkZqIjkI.js");
161879
162132
  return { id: id16, diagram: diagram2 };
161880
162133
  }, "loader");
161881
162134
  var plugin14 = {
@@ -161889,7 +162142,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
161889
162142
  return /^\s*journey/.test(txt);
161890
162143
  }, "detector");
161891
162144
  var loader17 = /* @__PURE__ */ __name(async () => {
161892
- const { diagram: diagram2 } = await import("./journeyDiagram-XKPGCS4Q-DlzIOQ2Q.js");
162145
+ const { diagram: diagram2 } = await import("./journeyDiagram-XKPGCS4Q-C1eLAzL9.js");
161893
162146
  return { id: id17, diagram: diagram2 };
161894
162147
  }, "loader");
161895
162148
  var plugin15 = {
@@ -161956,7 +162209,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
161956
162209
  return false;
161957
162210
  }, "detector");
161958
162211
  var loader18 = /* @__PURE__ */ __name(async () => {
161959
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DHAz3SxN.js");
162212
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DO9viNx6.js");
161960
162213
  return { id: id18, diagram: diagram2 };
161961
162214
  }, "loader");
161962
162215
  var plugin16 = {
@@ -161970,7 +162223,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
161970
162223
  return /^\s*timeline/.test(txt);
161971
162224
  }, "detector");
161972
162225
  var loader19 = /* @__PURE__ */ __name(async () => {
161973
- const { diagram: diagram2 } = await import("./timeline-definition-IT6M3QCI-ByMKy2X3.js");
162226
+ const { diagram: diagram2 } = await import("./timeline-definition-IT6M3QCI-CejT7_79.js");
161974
162227
  return { id: id19, diagram: diagram2 };
161975
162228
  }, "loader");
161976
162229
  var plugin17 = {
@@ -161984,7 +162237,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
161984
162237
  return /^\s*mindmap/.test(txt);
161985
162238
  }, "detector");
161986
162239
  var loader20 = /* @__PURE__ */ __name(async () => {
161987
- const { diagram: diagram2 } = await import("./mindmap-definition-VGOIOE7T-C3p_lEUY.js");
162240
+ const { diagram: diagram2 } = await import("./mindmap-definition-VGOIOE7T-B5_qScJU.js");
161988
162241
  return { id: id20, diagram: diagram2 };
161989
162242
  }, "loader");
161990
162243
  var plugin18 = {
@@ -161998,7 +162251,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
161998
162251
  return /^\s*kanban/.test(txt);
161999
162252
  }, "detector");
162000
162253
  var loader21 = /* @__PURE__ */ __name(async () => {
162001
- const { diagram: diagram2 } = await import("./kanban-definition-3W4ZIXB7-DVR-_Oli.js");
162254
+ const { diagram: diagram2 } = await import("./kanban-definition-3W4ZIXB7-DFHxxNcb.js");
162002
162255
  return { id: id21, diagram: diagram2 };
162003
162256
  }, "loader");
162004
162257
  var plugin19 = {
@@ -162012,7 +162265,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
162012
162265
  return /^\s*sankey(-beta)?/.test(txt);
162013
162266
  }, "detector");
162014
162267
  var loader22 = /* @__PURE__ */ __name(async () => {
162015
- const { diagram: diagram2 } = await import("./sankeyDiagram-TZEHDZUN-BgYyRe28.js");
162268
+ const { diagram: diagram2 } = await import("./sankeyDiagram-TZEHDZUN-Bvyi-a8d.js");
162016
162269
  return { id: id22, diagram: diagram2 };
162017
162270
  }, "loader");
162018
162271
  var plugin20 = {
@@ -162026,7 +162279,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
162026
162279
  return /^\s*packet(-beta)?/.test(txt);
162027
162280
  }, "detector");
162028
162281
  var loader23 = /* @__PURE__ */ __name(async () => {
162029
- const { diagram: diagram2 } = await import("./diagram-S2PKOQOG-B8goNnsj.js");
162282
+ const { diagram: diagram2 } = await import("./diagram-S2PKOQOG-Dem9oHxL.js");
162030
162283
  return { id: id23, diagram: diagram2 };
162031
162284
  }, "loader");
162032
162285
  var packet = {
@@ -162039,7 +162292,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
162039
162292
  return /^\s*radar-beta/.test(txt);
162040
162293
  }, "detector");
162041
162294
  var loader24 = /* @__PURE__ */ __name(async () => {
162042
- const { diagram: diagram2 } = await import("./diagram-QEK2KX5R-BvyHvb1q.js");
162295
+ const { diagram: diagram2 } = await import("./diagram-QEK2KX5R-CpM2yo3A.js");
162043
162296
  return { id: id24, diagram: diagram2 };
162044
162297
  }, "loader");
162045
162298
  var radar = {
@@ -162052,7 +162305,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
162052
162305
  return /^\s*block(-beta)?/.test(txt);
162053
162306
  }, "detector");
162054
162307
  var loader25 = /* @__PURE__ */ __name(async () => {
162055
- const { diagram: diagram2 } = await import("./blockDiagram-VD42YOAC-LC7jFY0y.js");
162308
+ const { diagram: diagram2 } = await import("./blockDiagram-VD42YOAC-Djjy-jiv.js");
162056
162309
  return { id: id25, diagram: diagram2 };
162057
162310
  }, "loader");
162058
162311
  var plugin21 = {
@@ -162066,7 +162319,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
162066
162319
  return /^\s*architecture/.test(txt);
162067
162320
  }, "detector");
162068
162321
  var loader26 = /* @__PURE__ */ __name(async () => {
162069
- const { diagram: diagram2 } = await import("./architectureDiagram-VXUJARFQ-CUWYpRdN.js");
162322
+ const { diagram: diagram2 } = await import("./architectureDiagram-VXUJARFQ-DisnJPPo.js");
162070
162323
  return { id: id26, diagram: diagram2 };
162071
162324
  }, "loader");
162072
162325
  var architecture = {
@@ -162080,7 +162333,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
162080
162333
  return /^\s*treemap/.test(txt);
162081
162334
  }, "detector");
162082
162335
  var loader27 = /* @__PURE__ */ __name(async () => {
162083
- const { diagram: diagram2 } = await import("./diagram-PSM6KHXK-VebVrDpW.js");
162336
+ const { diagram: diagram2 } = await import("./diagram-PSM6KHXK-BifH8r_E.js");
162084
162337
  return { id: id27, diagram: diagram2 };
162085
162338
  }, "loader");
162086
162339
  var treemap = {
@@ -171389,7 +171642,7 @@ function mergeAnimations(...animations) {
171389
171642
  return instant ? "instant" : animationCache.get(key2);
171390
171643
  }
171391
171644
  const StickToBottomContext = reactExports.createContext(null);
171392
- const useIsomorphicLayoutEffect$1 = typeof window !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
171645
+ const useIsomorphicLayoutEffect$2 = typeof window !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
171393
171646
  function StickToBottom({ instance, children: children2, resize, initial, mass, damping, stiffness, targetScrollTop: currentTargetScrollTop, contextRef, ...props }) {
171394
171647
  const customTargetScrollTop = reactExports.useRef(null);
171395
171648
  const targetScrollTop = reactExports.useCallback((target, elements) => {
@@ -171429,7 +171682,7 @@ function StickToBottom({ instance, children: children2, resize, initial, mass, d
171429
171682
  state2
171430
171683
  ]);
171431
171684
  reactExports.useImperativeHandle(contextRef, () => context2, [context2]);
171432
- useIsomorphicLayoutEffect$1(() => {
171685
+ useIsomorphicLayoutEffect$2(() => {
171433
171686
  if (!scrollRef.current) {
171434
171687
  return;
171435
171688
  }
@@ -172558,6 +172811,7 @@ function TextPreview({ url, filename }) {
172558
172811
  const Message = ({ className, from: from2, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
172559
172812
  "div",
172560
172813
  {
172814
+ "data-testid": from2 === "user" ? "chat-pane__user-message" : "chat-pane__assistant-message",
172561
172815
  className: cn$2(
172562
172816
  "group flex w-full min-w-0 flex-col gap-2",
172563
172817
  from2 === "user" ? "is-user ml-auto max-w-[90%] justify-end" : "is-assistant",
@@ -173774,6 +174028,1466 @@ function useChatSubscription(opts) {
173774
174028
  cancel
173775
174029
  };
173776
174030
  }
174031
+ function createLazyMeasurementsView(count2, flat, getItemKey) {
174032
+ const cache = new Array(count2);
174033
+ return new Proxy(cache, {
174034
+ get(target, prop, receiver) {
174035
+ if (typeof prop === "string") {
174036
+ const c2 = prop.charCodeAt(0);
174037
+ if (c2 >= 48 && c2 <= 57) {
174038
+ const i2 = +prop;
174039
+ if (Number.isInteger(i2) && i2 >= 0 && i2 < count2) {
174040
+ let v2 = target[i2];
174041
+ if (!v2) {
174042
+ const s2 = flat[i2 * 2];
174043
+ v2 = target[i2] = {
174044
+ index: i2,
174045
+ key: getItemKey(i2),
174046
+ start: s2,
174047
+ size: flat[i2 * 2 + 1],
174048
+ end: s2 + flat[i2 * 2 + 1],
174049
+ lane: 0
174050
+ };
174051
+ }
174052
+ return v2;
174053
+ }
174054
+ }
174055
+ if (prop === "length") return count2;
174056
+ }
174057
+ return Reflect.get(target, prop, receiver);
174058
+ }
174059
+ });
174060
+ }
174061
+ function memo(getDeps, fn2, opts) {
174062
+ let deps = opts.initialDeps ?? [];
174063
+ let result;
174064
+ let isInitial = true;
174065
+ function memoizedFunction() {
174066
+ const newDeps = getDeps();
174067
+ const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index2) => deps[index2] !== dep);
174068
+ if (!depsChanged) {
174069
+ return result;
174070
+ }
174071
+ deps = newDeps;
174072
+ result = fn2(...newDeps);
174073
+ if ((opts == null ? void 0 : opts.onChange) && !(isInitial && opts.skipInitialOnChange)) {
174074
+ opts.onChange(result);
174075
+ }
174076
+ isInitial = false;
174077
+ return result;
174078
+ }
174079
+ memoizedFunction.updateDeps = (newDeps) => {
174080
+ deps = newDeps;
174081
+ };
174082
+ return memoizedFunction;
174083
+ }
174084
+ function notUndefined(value, msg) {
174085
+ if (value === void 0) {
174086
+ throw new Error(`Unexpected undefined${""}`);
174087
+ } else {
174088
+ return value;
174089
+ }
174090
+ }
174091
+ const approxEqual = (a2, b2) => Math.abs(a2 - b2) < 1.01;
174092
+ const debounce$2 = (targetWindow, fn2, ms) => {
174093
+ let timeoutId2;
174094
+ return function(...args) {
174095
+ targetWindow.clearTimeout(timeoutId2);
174096
+ timeoutId2 = targetWindow.setTimeout(() => fn2.apply(this, args), ms);
174097
+ };
174098
+ };
174099
+ let _isIOSResult;
174100
+ const isIOSWebKit = () => {
174101
+ if (_isIOSResult !== void 0) return _isIOSResult;
174102
+ if (typeof navigator === "undefined") return _isIOSResult = false;
174103
+ if (/iP(hone|od|ad)/.test(navigator.userAgent)) return _isIOSResult = true;
174104
+ const mtp = navigator.maxTouchPoints;
174105
+ return _isIOSResult = navigator.platform === "MacIntel" && mtp !== void 0 && mtp > 0;
174106
+ };
174107
+ const getRect = (element2) => {
174108
+ const { offsetWidth, offsetHeight } = element2;
174109
+ return { width: offsetWidth, height: offsetHeight };
174110
+ };
174111
+ const defaultKeyExtractor = (index2) => index2;
174112
+ const defaultRangeExtractor = (range2) => {
174113
+ const start2 = Math.max(range2.startIndex - range2.overscan, 0);
174114
+ const end = Math.min(range2.endIndex + range2.overscan, range2.count - 1);
174115
+ const len = end - start2 + 1;
174116
+ const arr = new Array(len);
174117
+ for (let i2 = 0; i2 < len; i2++) {
174118
+ arr[i2] = start2 + i2;
174119
+ }
174120
+ return arr;
174121
+ };
174122
+ const observeElementRect = (instance, cb) => {
174123
+ const element2 = instance.scrollElement;
174124
+ if (!element2) {
174125
+ return;
174126
+ }
174127
+ const targetWindow = instance.targetWindow;
174128
+ if (!targetWindow) {
174129
+ return;
174130
+ }
174131
+ const handler = (rect2) => {
174132
+ const { width, height } = rect2;
174133
+ cb({ width: Math.round(width), height: Math.round(height) });
174134
+ };
174135
+ handler(getRect(element2));
174136
+ if (!targetWindow.ResizeObserver) {
174137
+ return () => {
174138
+ };
174139
+ }
174140
+ const observer = new targetWindow.ResizeObserver((entries2) => {
174141
+ const run2 = () => {
174142
+ const entry = entries2[0];
174143
+ if (entry == null ? void 0 : entry.borderBoxSize) {
174144
+ const box = entry.borderBoxSize[0];
174145
+ if (box) {
174146
+ handler({ width: box.inlineSize, height: box.blockSize });
174147
+ return;
174148
+ }
174149
+ }
174150
+ handler(getRect(element2));
174151
+ };
174152
+ instance.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run2) : run2();
174153
+ });
174154
+ observer.observe(element2, { box: "border-box" });
174155
+ return () => {
174156
+ observer.unobserve(element2);
174157
+ };
174158
+ };
174159
+ const addEventListenerOptions = {
174160
+ passive: true
174161
+ };
174162
+ const supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window;
174163
+ const observeOffset = (instance, cb, readOffset) => {
174164
+ const element2 = instance.scrollElement;
174165
+ if (!element2) {
174166
+ return;
174167
+ }
174168
+ const targetWindow = instance.targetWindow;
174169
+ if (!targetWindow) {
174170
+ return;
174171
+ }
174172
+ const registerScrollendEvent = instance.options.useScrollendEvent && supportsScrollend;
174173
+ let offset2 = 0;
174174
+ const fallback = registerScrollendEvent ? null : debounce$2(
174175
+ targetWindow,
174176
+ () => cb(offset2, false),
174177
+ instance.options.isScrollingResetDelay
174178
+ );
174179
+ const createHandler = (isScrolling) => () => {
174180
+ offset2 = readOffset(element2);
174181
+ fallback == null ? void 0 : fallback();
174182
+ cb(offset2, isScrolling);
174183
+ };
174184
+ const handler = createHandler(true);
174185
+ const endHandler = createHandler(false);
174186
+ element2.addEventListener("scroll", handler, addEventListenerOptions);
174187
+ if (registerScrollendEvent) {
174188
+ element2.addEventListener("scrollend", endHandler, addEventListenerOptions);
174189
+ }
174190
+ return () => {
174191
+ element2.removeEventListener("scroll", handler);
174192
+ if (registerScrollendEvent) {
174193
+ element2.removeEventListener("scrollend", endHandler);
174194
+ }
174195
+ };
174196
+ };
174197
+ const observeElementOffset = (instance, cb) => observeOffset(instance, cb, (el) => {
174198
+ const { horizontal, isRtl } = instance.options;
174199
+ return horizontal ? el.scrollLeft * (isRtl && -1 || 1) : el.scrollTop;
174200
+ });
174201
+ const measureElement = (element2, entry, instance) => {
174202
+ if (instance.options.useCachedMeasurements) {
174203
+ const index2 = instance.indexFromElement(element2);
174204
+ const key2 = instance.options.getItemKey(index2);
174205
+ return instance.itemSizeCache.get(key2) ?? instance.options.estimateSize(index2);
174206
+ }
174207
+ if (entry == null ? void 0 : entry.borderBoxSize) {
174208
+ const box = entry.borderBoxSize[0];
174209
+ if (box) {
174210
+ const size2 = Math.round(
174211
+ box[instance.options.horizontal ? "inlineSize" : "blockSize"]
174212
+ );
174213
+ return size2;
174214
+ }
174215
+ }
174216
+ if (!entry) {
174217
+ const index2 = instance.indexFromElement(element2);
174218
+ const key2 = instance.options.getItemKey(index2);
174219
+ const cachedSize = instance.itemSizeCache.get(key2);
174220
+ if (cachedSize !== void 0) {
174221
+ return cachedSize;
174222
+ }
174223
+ }
174224
+ return element2[instance.options.horizontal ? "offsetWidth" : "offsetHeight"];
174225
+ };
174226
+ const scrollWithAdjustments = (offset2, {
174227
+ adjustments = 0,
174228
+ behavior
174229
+ }, instance) => {
174230
+ var _a3, _b3;
174231
+ (_b3 = (_a3 = instance.scrollElement) == null ? void 0 : _a3.scrollTo) == null ? void 0 : _b3.call(_a3, {
174232
+ [instance.options.horizontal ? "left" : "top"]: offset2 + adjustments,
174233
+ behavior
174234
+ });
174235
+ };
174236
+ const elementScroll = scrollWithAdjustments;
174237
+ class Virtualizer {
174238
+ constructor(opts) {
174239
+ this.unsubs = [];
174240
+ this.scrollElement = null;
174241
+ this.targetWindow = null;
174242
+ this.isScrolling = false;
174243
+ this.scrollState = null;
174244
+ this.measurementsCache = [];
174245
+ this._flatMeasurements = null;
174246
+ this.itemSizeCache = /* @__PURE__ */ new Map();
174247
+ this.itemSizeCacheVersion = 0;
174248
+ this.laneAssignments = /* @__PURE__ */ new Map();
174249
+ this.pendingMin = null;
174250
+ this.prevLanes = void 0;
174251
+ this.lanesChangedFlag = false;
174252
+ this.lanesSettling = false;
174253
+ this.pendingScrollAnchor = null;
174254
+ this.scrollRect = null;
174255
+ this.scrollOffset = null;
174256
+ this.scrollDirection = null;
174257
+ this.scrollAdjustments = 0;
174258
+ this._iosDeferredAdjustment = 0;
174259
+ this._iosTouching = false;
174260
+ this._iosJustTouchEnded = false;
174261
+ this._iosTouchEndTimerId = null;
174262
+ this._intendedScrollOffset = null;
174263
+ this.elementsCache = /* @__PURE__ */ new Map();
174264
+ this.now = () => {
174265
+ var _a3, _b3, _c2;
174266
+ return ((_c2 = (_b3 = (_a3 = this.targetWindow) == null ? void 0 : _a3.performance) == null ? void 0 : _b3.now) == null ? void 0 : _c2.call(_b3)) ?? Date.now();
174267
+ };
174268
+ this.observer = /* @__PURE__ */ (() => {
174269
+ let _ro = null;
174270
+ const get2 = () => {
174271
+ if (_ro) {
174272
+ return _ro;
174273
+ }
174274
+ if (!this.targetWindow || !this.targetWindow.ResizeObserver) {
174275
+ return null;
174276
+ }
174277
+ return _ro = new this.targetWindow.ResizeObserver((entries2) => {
174278
+ entries2.forEach((entry) => {
174279
+ const run2 = () => {
174280
+ const node2 = entry.target;
174281
+ const index2 = this.indexFromElement(node2);
174282
+ if (!node2.isConnected) {
174283
+ this.observer.unobserve(node2);
174284
+ for (const [cacheKey, cachedNode] of this.elementsCache) {
174285
+ if (cachedNode === node2) {
174286
+ this.elementsCache.delete(cacheKey);
174287
+ break;
174288
+ }
174289
+ }
174290
+ return;
174291
+ }
174292
+ if (this.shouldMeasureDuringScroll(index2)) {
174293
+ this.resizeItem(
174294
+ index2,
174295
+ this.options.measureElement(node2, entry, this)
174296
+ );
174297
+ }
174298
+ };
174299
+ this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run2) : run2();
174300
+ });
174301
+ });
174302
+ };
174303
+ return {
174304
+ disconnect: () => {
174305
+ var _a3;
174306
+ (_a3 = get2()) == null ? void 0 : _a3.disconnect();
174307
+ _ro = null;
174308
+ },
174309
+ observe: (target) => {
174310
+ var _a3;
174311
+ return (_a3 = get2()) == null ? void 0 : _a3.observe(target, { box: "border-box" });
174312
+ },
174313
+ unobserve: (target) => {
174314
+ var _a3;
174315
+ return (_a3 = get2()) == null ? void 0 : _a3.unobserve(target);
174316
+ }
174317
+ };
174318
+ })();
174319
+ this.range = null;
174320
+ this.setOptions = (opts2) => {
174321
+ var _a3, _b3;
174322
+ const merged = {
174323
+ debug: false,
174324
+ initialOffset: 0,
174325
+ overscan: 1,
174326
+ paddingStart: 0,
174327
+ paddingEnd: 0,
174328
+ scrollPaddingStart: 0,
174329
+ scrollPaddingEnd: 0,
174330
+ horizontal: false,
174331
+ getItemKey: defaultKeyExtractor,
174332
+ rangeExtractor: defaultRangeExtractor,
174333
+ onChange: () => {
174334
+ },
174335
+ measureElement,
174336
+ initialRect: { width: 0, height: 0 },
174337
+ scrollMargin: 0,
174338
+ gap: 0,
174339
+ indexAttribute: "data-index",
174340
+ initialMeasurementsCache: [],
174341
+ lanes: 1,
174342
+ anchorTo: "start",
174343
+ followOnAppend: false,
174344
+ scrollEndThreshold: 1,
174345
+ isScrollingResetDelay: 150,
174346
+ enabled: true,
174347
+ isRtl: false,
174348
+ useScrollendEvent: false,
174349
+ useAnimationFrameWithResizeObserver: false,
174350
+ laneAssignmentMode: "estimate",
174351
+ useCachedMeasurements: false
174352
+ };
174353
+ for (const key2 in opts2) {
174354
+ const v2 = opts2[key2];
174355
+ if (v2 !== void 0) merged[key2] = v2;
174356
+ }
174357
+ const prevOptions = this.options;
174358
+ let anchor2 = null;
174359
+ let followOnAppend = null;
174360
+ let edgeKeysChanged = false;
174361
+ if (prevOptions !== void 0 && prevOptions.enabled && merged.enabled && merged.anchorTo === "end" && this.scrollElement !== null) {
174362
+ const prevCount = prevOptions.count;
174363
+ const nextCount = merged.count;
174364
+ const measurements = this.getMeasurements();
174365
+ const prevFirstKey = prevCount > 0 ? ((_a3 = measurements[0]) == null ? void 0 : _a3.key) ?? prevOptions.getItemKey(0) : null;
174366
+ const prevLastKey = prevCount > 0 ? ((_b3 = measurements[prevCount - 1]) == null ? void 0 : _b3.key) ?? prevOptions.getItemKey(prevCount - 1) : null;
174367
+ const didCountChange = nextCount !== prevCount;
174368
+ const didEdgeKeysChange = didCountChange || prevCount > 0 && nextCount > 0 && (merged.getItemKey(0) !== prevFirstKey || merged.getItemKey(nextCount - 1) !== prevLastKey);
174369
+ if (didEdgeKeysChange) {
174370
+ edgeKeysChanged = true;
174371
+ const item = prevCount > 0 ? this.getVirtualItemForOffset(this.getScrollOffset()) ?? measurements[0] : null;
174372
+ if (item) {
174373
+ anchor2 = [item.key, this.getScrollOffset() - item.start];
174374
+ }
174375
+ const behavior = merged.followOnAppend === true ? "auto" : merged.followOnAppend || null;
174376
+ if (behavior && nextCount > prevCount && this.isAtEnd(prevOptions.scrollEndThreshold) && (prevCount === 0 || merged.getItemKey(nextCount - 1) !== prevLastKey)) {
174377
+ followOnAppend = behavior;
174378
+ }
174379
+ }
174380
+ }
174381
+ this.options = merged;
174382
+ if (edgeKeysChanged) {
174383
+ this.pendingMin = 0;
174384
+ this.itemSizeCacheVersion++;
174385
+ }
174386
+ let anchorResolved = false;
174387
+ let anchorDelta = 0;
174388
+ if (anchor2 && this.scrollOffset !== null) {
174389
+ const [anchorKey, anchorOffset] = anchor2;
174390
+ const newMeasurements = this.getMeasurements();
174391
+ const { count: count2, getItemKey } = this.options;
174392
+ let idx = 0;
174393
+ while (idx < count2 && getItemKey(idx) !== anchorKey) {
174394
+ idx++;
174395
+ }
174396
+ if (idx < count2) {
174397
+ const anchorItem = newMeasurements[idx];
174398
+ if (anchorItem) {
174399
+ const newOffset = anchorItem.start + anchorOffset;
174400
+ if (newOffset !== this.scrollOffset) {
174401
+ anchorDelta = newOffset - this.scrollOffset;
174402
+ this.scrollOffset = newOffset;
174403
+ anchorResolved = true;
174404
+ }
174405
+ }
174406
+ }
174407
+ }
174408
+ if (anchorResolved || followOnAppend) {
174409
+ this.pendingScrollAnchor = [
174410
+ anchorResolved ? anchor2[0] : null,
174411
+ anchorResolved ? anchor2[1] : 0,
174412
+ followOnAppend,
174413
+ anchorDelta
174414
+ ];
174415
+ }
174416
+ };
174417
+ this.notify = (sync) => {
174418
+ var _a3, _b3;
174419
+ (_b3 = (_a3 = this.options).onChange) == null ? void 0 : _b3.call(_a3, this, sync);
174420
+ };
174421
+ this.maybeNotify = memo(
174422
+ () => {
174423
+ this.calculateRange();
174424
+ return [
174425
+ this.isScrolling,
174426
+ this.range ? this.range.startIndex : null,
174427
+ this.range ? this.range.endIndex : null
174428
+ ];
174429
+ },
174430
+ (isScrolling) => {
174431
+ this.notify(isScrolling);
174432
+ },
174433
+ {
174434
+ key: false,
174435
+ debug: () => this.options.debug,
174436
+ initialDeps: [
174437
+ this.isScrolling,
174438
+ this.range ? this.range.startIndex : null,
174439
+ this.range ? this.range.endIndex : null
174440
+ ]
174441
+ }
174442
+ );
174443
+ this.cleanup = () => {
174444
+ this.unsubs.filter(Boolean).forEach((d2) => d2());
174445
+ this.unsubs = [];
174446
+ this.observer.disconnect();
174447
+ if (this.rafId != null && this.targetWindow) {
174448
+ this.targetWindow.cancelAnimationFrame(this.rafId);
174449
+ this.rafId = null;
174450
+ }
174451
+ this.scrollState = null;
174452
+ this.scrollElement = null;
174453
+ this.targetWindow = null;
174454
+ };
174455
+ this._didMount = () => {
174456
+ return () => {
174457
+ this.cleanup();
174458
+ };
174459
+ };
174460
+ this._willUpdate = () => {
174461
+ var _a3;
174462
+ const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
174463
+ if (this.scrollElement !== scrollElement) {
174464
+ this.cleanup();
174465
+ if (!scrollElement) {
174466
+ this.maybeNotify();
174467
+ return;
174468
+ }
174469
+ this.scrollElement = scrollElement;
174470
+ if (this.scrollElement && "ownerDocument" in this.scrollElement) {
174471
+ this.targetWindow = this.scrollElement.ownerDocument.defaultView;
174472
+ } else {
174473
+ this.targetWindow = ((_a3 = this.scrollElement) == null ? void 0 : _a3.window) ?? null;
174474
+ }
174475
+ this.elementsCache.forEach((cached2) => {
174476
+ this.observer.observe(cached2);
174477
+ });
174478
+ this.unsubs.push(
174479
+ this.options.observeElementRect(this, (rect2) => {
174480
+ this.scrollRect = rect2;
174481
+ this.maybeNotify();
174482
+ })
174483
+ );
174484
+ this.unsubs.push(
174485
+ this.options.observeElementOffset(this, (offset2, isScrolling) => {
174486
+ if (this._intendedScrollOffset !== null && Math.abs(offset2 - this._intendedScrollOffset) < 1.5) {
174487
+ offset2 = this._intendedScrollOffset;
174488
+ }
174489
+ this._intendedScrollOffset = null;
174490
+ this.scrollAdjustments = 0;
174491
+ this.scrollDirection = isScrolling ? this.getScrollOffset() < offset2 ? "forward" : "backward" : null;
174492
+ this.scrollOffset = offset2;
174493
+ this.isScrolling = isScrolling;
174494
+ this._flushIosDeferredIfReady();
174495
+ if (this.scrollState) {
174496
+ this.scheduleScrollReconcile();
174497
+ }
174498
+ this.maybeNotify();
174499
+ })
174500
+ );
174501
+ if ("addEventListener" in this.scrollElement) {
174502
+ const scrollEl = this.scrollElement;
174503
+ const onTouchStart = () => {
174504
+ this._iosTouching = true;
174505
+ this._iosJustTouchEnded = false;
174506
+ if (this._iosTouchEndTimerId !== null && this.targetWindow != null) {
174507
+ this.targetWindow.clearTimeout(this._iosTouchEndTimerId);
174508
+ this._iosTouchEndTimerId = null;
174509
+ }
174510
+ };
174511
+ const onTouchEnd = () => {
174512
+ this._iosTouching = false;
174513
+ if (!isIOSWebKit() || this.targetWindow == null) {
174514
+ return;
174515
+ }
174516
+ this._iosJustTouchEnded = true;
174517
+ this._iosTouchEndTimerId = this.targetWindow.setTimeout(() => {
174518
+ this._iosJustTouchEnded = false;
174519
+ this._iosTouchEndTimerId = null;
174520
+ this._flushIosDeferredIfReady();
174521
+ }, 150);
174522
+ };
174523
+ scrollEl.addEventListener(
174524
+ "touchstart",
174525
+ onTouchStart,
174526
+ addEventListenerOptions
174527
+ );
174528
+ scrollEl.addEventListener(
174529
+ "touchend",
174530
+ onTouchEnd,
174531
+ addEventListenerOptions
174532
+ );
174533
+ this.unsubs.push(() => {
174534
+ scrollEl.removeEventListener("touchstart", onTouchStart);
174535
+ scrollEl.removeEventListener("touchend", onTouchEnd);
174536
+ if (this._iosTouchEndTimerId !== null && this.targetWindow != null) {
174537
+ this.targetWindow.clearTimeout(this._iosTouchEndTimerId);
174538
+ this._iosTouchEndTimerId = null;
174539
+ }
174540
+ });
174541
+ }
174542
+ this._scrollToOffset(this.getScrollOffset(), {
174543
+ adjustments: void 0,
174544
+ behavior: void 0
174545
+ });
174546
+ }
174547
+ const anchor2 = this.pendingScrollAnchor;
174548
+ this.pendingScrollAnchor = null;
174549
+ if (anchor2 && this.scrollElement && this.options.enabled) {
174550
+ const [key2, _offset, followOnAppend, anchorDelta] = anchor2;
174551
+ if (key2 !== null && !followOnAppend) {
174552
+ if (isIOSWebKit() && (this.isScrolling || this._iosTouching || this._iosJustTouchEnded)) {
174553
+ if (anchorDelta !== 0) {
174554
+ this._iosDeferredAdjustment += anchorDelta;
174555
+ }
174556
+ } else {
174557
+ this._scrollToOffset(this.getScrollOffset(), {
174558
+ adjustments: void 0,
174559
+ behavior: void 0
174560
+ });
174561
+ }
174562
+ }
174563
+ if (followOnAppend) {
174564
+ this.scrollToEnd({ behavior: followOnAppend });
174565
+ }
174566
+ }
174567
+ };
174568
+ this._flushIosDeferredIfReady = () => {
174569
+ if (this._iosDeferredAdjustment === 0) return;
174570
+ if (this.isScrolling) return;
174571
+ if (this._iosTouching) return;
174572
+ if (this._iosJustTouchEnded) return;
174573
+ const cur2 = this.getScrollOffset();
174574
+ const max2 = this.getMaxScrollOffset();
174575
+ if (cur2 < 0 || cur2 > max2) return;
174576
+ const delta = this._iosDeferredAdjustment;
174577
+ this._iosDeferredAdjustment = 0;
174578
+ this._scrollToOffset(cur2, {
174579
+ adjustments: this.scrollAdjustments += delta,
174580
+ behavior: void 0
174581
+ });
174582
+ };
174583
+ this.rafId = null;
174584
+ this.getSize = () => {
174585
+ if (!this.options.enabled) {
174586
+ this.scrollRect = null;
174587
+ return 0;
174588
+ }
174589
+ this.scrollRect = this.scrollRect ?? this.options.initialRect;
174590
+ return this.scrollRect[this.options.horizontal ? "width" : "height"];
174591
+ };
174592
+ this.getScrollOffset = () => {
174593
+ if (!this.options.enabled) {
174594
+ this.scrollOffset = null;
174595
+ return 0;
174596
+ }
174597
+ this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset === "function" ? this.options.initialOffset() : this.options.initialOffset);
174598
+ return this.scrollOffset;
174599
+ };
174600
+ this.getFurthestMeasurement = (measurements, index2) => {
174601
+ const furthestMeasurementsFound = /* @__PURE__ */ new Map();
174602
+ const furthestMeasurements = /* @__PURE__ */ new Map();
174603
+ for (let m2 = index2 - 1; m2 >= 0; m2--) {
174604
+ const measurement = measurements[m2];
174605
+ if (furthestMeasurementsFound.has(measurement.lane)) {
174606
+ continue;
174607
+ }
174608
+ const previousFurthestMeasurement = furthestMeasurements.get(
174609
+ measurement.lane
174610
+ );
174611
+ if (previousFurthestMeasurement == null || measurement.end > previousFurthestMeasurement.end) {
174612
+ furthestMeasurements.set(measurement.lane, measurement);
174613
+ } else if (measurement.end < previousFurthestMeasurement.end) {
174614
+ furthestMeasurementsFound.set(measurement.lane, true);
174615
+ }
174616
+ if (furthestMeasurementsFound.size === this.options.lanes) {
174617
+ break;
174618
+ }
174619
+ }
174620
+ return furthestMeasurements.size === this.options.lanes ? Array.from(furthestMeasurements.values()).sort((a2, b2) => {
174621
+ if (a2.end === b2.end) {
174622
+ return a2.index - b2.index;
174623
+ }
174624
+ return a2.end - b2.end;
174625
+ })[0] : void 0;
174626
+ };
174627
+ this.getMeasurementOptions = memo(
174628
+ () => [
174629
+ this.options.count,
174630
+ this.options.paddingStart,
174631
+ this.options.scrollMargin,
174632
+ this.options.getItemKey,
174633
+ this.options.enabled,
174634
+ this.options.lanes,
174635
+ this.options.laneAssignmentMode
174636
+ ],
174637
+ (count2, paddingStart, scrollMargin, getItemKey, enabled, lanes, laneAssignmentMode) => {
174638
+ const lanesChanged = this.prevLanes !== void 0 && this.prevLanes !== lanes;
174639
+ if (lanesChanged) {
174640
+ this.lanesChangedFlag = true;
174641
+ }
174642
+ this.prevLanes = lanes;
174643
+ this.pendingMin = null;
174644
+ return {
174645
+ count: count2,
174646
+ paddingStart,
174647
+ scrollMargin,
174648
+ getItemKey,
174649
+ enabled,
174650
+ lanes,
174651
+ laneAssignmentMode
174652
+ };
174653
+ },
174654
+ {
174655
+ key: false
174656
+ }
174657
+ );
174658
+ this.getMeasurements = memo(
174659
+ () => [this.getMeasurementOptions(), this.itemSizeCacheVersion],
174660
+ ({
174661
+ count: count2,
174662
+ paddingStart,
174663
+ scrollMargin,
174664
+ getItemKey,
174665
+ enabled,
174666
+ lanes,
174667
+ laneAssignmentMode
174668
+ }, _itemSizeCacheVersion) => {
174669
+ const itemSizeCache = this.itemSizeCache;
174670
+ if (!enabled) {
174671
+ this.measurementsCache = [];
174672
+ this.itemSizeCache.clear();
174673
+ this.laneAssignments.clear();
174674
+ return [];
174675
+ }
174676
+ if (this.laneAssignments.size > count2) {
174677
+ for (const index2 of this.laneAssignments.keys()) {
174678
+ if (index2 >= count2) {
174679
+ this.laneAssignments.delete(index2);
174680
+ }
174681
+ }
174682
+ }
174683
+ if (this.lanesChangedFlag) {
174684
+ this.lanesChangedFlag = false;
174685
+ this.lanesSettling = true;
174686
+ this.measurementsCache = [];
174687
+ this.itemSizeCache.clear();
174688
+ this.laneAssignments.clear();
174689
+ this.pendingMin = null;
174690
+ }
174691
+ if (this.measurementsCache.length === 0 && !this.lanesSettling) {
174692
+ this.measurementsCache = this.options.initialMeasurementsCache;
174693
+ this.measurementsCache.forEach((item) => {
174694
+ this.itemSizeCache.set(item.key, item.size);
174695
+ });
174696
+ }
174697
+ const min2 = this.lanesSettling ? 0 : this.pendingMin ?? 0;
174698
+ this.pendingMin = null;
174699
+ if (this.lanesSettling && this.measurementsCache.length === count2) {
174700
+ this.lanesSettling = false;
174701
+ }
174702
+ if (lanes === 1) {
174703
+ const gap = this.options.gap;
174704
+ const need = count2 * 2;
174705
+ let flat = this._flatMeasurements;
174706
+ if (!flat || flat.length < need) {
174707
+ const next2 = new Float64Array(need);
174708
+ if (flat && min2 > 0) next2.set(flat.subarray(0, min2 * 2));
174709
+ flat = next2;
174710
+ this._flatMeasurements = flat;
174711
+ }
174712
+ let runningStart;
174713
+ if (min2 === 0) {
174714
+ runningStart = paddingStart + scrollMargin;
174715
+ } else {
174716
+ const prevIdx = min2 - 1;
174717
+ runningStart = flat[prevIdx * 2] + flat[prevIdx * 2 + 1] + gap;
174718
+ }
174719
+ for (let i2 = min2; i2 < count2; i2++) {
174720
+ const key2 = getItemKey(i2);
174721
+ const measuredSize = itemSizeCache.get(key2);
174722
+ const size2 = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i2);
174723
+ flat[i2 * 2] = runningStart;
174724
+ flat[i2 * 2 + 1] = size2;
174725
+ runningStart += size2 + gap;
174726
+ }
174727
+ const view = createLazyMeasurementsView(count2, flat, getItemKey);
174728
+ this.measurementsCache = view;
174729
+ return view;
174730
+ }
174731
+ const measurements = this.measurementsCache.slice(0, min2);
174732
+ const laneLastIndex = new Array(lanes).fill(
174733
+ void 0
174734
+ );
174735
+ for (let m2 = 0; m2 < min2; m2++) {
174736
+ const item = measurements[m2];
174737
+ if (item) {
174738
+ laneLastIndex[item.lane] = m2;
174739
+ }
174740
+ }
174741
+ for (let i2 = min2; i2 < count2; i2++) {
174742
+ const key2 = getItemKey(i2);
174743
+ const cachedLane = this.laneAssignments.get(i2);
174744
+ let lane;
174745
+ let start2;
174746
+ const shouldCacheLane = laneAssignmentMode === "estimate" || itemSizeCache.has(key2);
174747
+ if (cachedLane !== void 0 && this.options.lanes > 1) {
174748
+ lane = cachedLane;
174749
+ const prevIndex = laneLastIndex[lane];
174750
+ const prevInLane = prevIndex !== void 0 ? measurements[prevIndex] : void 0;
174751
+ start2 = prevInLane ? prevInLane.end + this.options.gap : paddingStart + scrollMargin;
174752
+ } else {
174753
+ const furthestMeasurement = this.options.lanes === 1 ? measurements[i2 - 1] : this.getFurthestMeasurement(measurements, i2);
174754
+ start2 = furthestMeasurement ? furthestMeasurement.end + this.options.gap : paddingStart + scrollMargin;
174755
+ lane = furthestMeasurement ? furthestMeasurement.lane : i2 % this.options.lanes;
174756
+ if (this.options.lanes > 1 && shouldCacheLane) {
174757
+ this.laneAssignments.set(i2, lane);
174758
+ }
174759
+ }
174760
+ const measuredSize = itemSizeCache.get(key2);
174761
+ const size2 = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i2);
174762
+ const end = start2 + size2;
174763
+ measurements[i2] = {
174764
+ index: i2,
174765
+ start: start2,
174766
+ size: size2,
174767
+ end,
174768
+ key: key2,
174769
+ lane
174770
+ };
174771
+ laneLastIndex[lane] = i2;
174772
+ }
174773
+ this.measurementsCache = measurements;
174774
+ return measurements;
174775
+ },
174776
+ {
174777
+ key: false,
174778
+ debug: () => this.options.debug
174779
+ }
174780
+ );
174781
+ this.calculateRange = memo(
174782
+ () => [
174783
+ this.getMeasurements(),
174784
+ this.getSize(),
174785
+ this.getScrollOffset(),
174786
+ this.options.lanes
174787
+ ],
174788
+ (measurements, outerSize, scrollOffset, lanes) => {
174789
+ return this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({
174790
+ measurements,
174791
+ outerSize,
174792
+ scrollOffset,
174793
+ lanes,
174794
+ // Pass the typed array so binary search + forward-walk can
174795
+ // read start/end directly from Float64Array, skipping the
174796
+ // Proxy traps that materialize a full VirtualItem per probe.
174797
+ flat: lanes === 1 && this._flatMeasurements != null ? this._flatMeasurements : null
174798
+ }) : null;
174799
+ },
174800
+ {
174801
+ key: false,
174802
+ debug: () => this.options.debug
174803
+ }
174804
+ );
174805
+ this.getVirtualIndexes = memo(
174806
+ () => {
174807
+ let startIndex = null;
174808
+ let endIndex = null;
174809
+ const range2 = this.calculateRange();
174810
+ if (range2) {
174811
+ startIndex = range2.startIndex;
174812
+ endIndex = range2.endIndex;
174813
+ }
174814
+ this.maybeNotify.updateDeps([this.isScrolling, startIndex, endIndex]);
174815
+ return [
174816
+ this.options.rangeExtractor,
174817
+ this.options.overscan,
174818
+ this.options.count,
174819
+ startIndex,
174820
+ endIndex
174821
+ ];
174822
+ },
174823
+ (rangeExtractor, overscan, count2, startIndex, endIndex) => {
174824
+ return startIndex === null || endIndex === null ? [] : rangeExtractor({
174825
+ startIndex,
174826
+ endIndex,
174827
+ overscan,
174828
+ count: count2
174829
+ });
174830
+ },
174831
+ {
174832
+ key: false,
174833
+ debug: () => this.options.debug
174834
+ }
174835
+ );
174836
+ this.indexFromElement = (node2) => {
174837
+ const attributeName = this.options.indexAttribute;
174838
+ const indexStr = node2.getAttribute(attributeName);
174839
+ if (!indexStr) {
174840
+ console.warn(
174841
+ `Missing attribute name '${attributeName}={index}' on measured element.`
174842
+ );
174843
+ return -1;
174844
+ }
174845
+ return parseInt(indexStr, 10);
174846
+ };
174847
+ this.shouldMeasureDuringScroll = (index2) => {
174848
+ var _a3;
174849
+ if (!this.scrollState || this.scrollState.behavior !== "smooth") {
174850
+ return true;
174851
+ }
174852
+ const scrollIndex = this.scrollState.index ?? ((_a3 = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : _a3.index);
174853
+ if (scrollIndex !== void 0 && this.range) {
174854
+ const bufferSize = Math.max(
174855
+ this.options.overscan,
174856
+ Math.ceil((this.range.endIndex - this.range.startIndex) / 2)
174857
+ );
174858
+ const minIndex = Math.max(0, scrollIndex - bufferSize);
174859
+ const maxIndex = Math.min(
174860
+ this.options.count - 1,
174861
+ scrollIndex + bufferSize
174862
+ );
174863
+ return index2 >= minIndex && index2 <= maxIndex;
174864
+ }
174865
+ return true;
174866
+ };
174867
+ this.measureElement = (node2) => {
174868
+ if (!node2) {
174869
+ this.elementsCache.forEach((cached2, key22) => {
174870
+ if (!cached2.isConnected) {
174871
+ this.observer.unobserve(cached2);
174872
+ this.elementsCache.delete(key22);
174873
+ }
174874
+ });
174875
+ return;
174876
+ }
174877
+ const index2 = this.indexFromElement(node2);
174878
+ const key2 = this.options.getItemKey(index2);
174879
+ const prevNode = this.elementsCache.get(key2);
174880
+ if (prevNode !== node2) {
174881
+ if (prevNode) {
174882
+ this.observer.unobserve(prevNode);
174883
+ }
174884
+ this.observer.observe(node2);
174885
+ this.elementsCache.set(key2, node2);
174886
+ }
174887
+ if ((!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(index2)) {
174888
+ this.resizeItem(index2, this.options.measureElement(node2, void 0, this));
174889
+ }
174890
+ };
174891
+ this.resizeItem = (index2, size2) => {
174892
+ var _a3, _b3;
174893
+ if (index2 < 0 || index2 >= this.options.count) return;
174894
+ let cachedSize;
174895
+ let itemStart;
174896
+ let key2;
174897
+ const flat = this._flatMeasurements;
174898
+ if (this.options.lanes === 1 && flat !== null) {
174899
+ key2 = this.options.getItemKey(index2);
174900
+ itemStart = flat[index2 * 2];
174901
+ cachedSize = flat[index2 * 2 + 1];
174902
+ } else {
174903
+ const item = this.measurementsCache[index2];
174904
+ if (!item) return;
174905
+ key2 = item.key;
174906
+ itemStart = item.start;
174907
+ cachedSize = item.size;
174908
+ }
174909
+ const itemSize = this.itemSizeCache.get(key2) ?? cachedSize;
174910
+ const delta = size2 - itemSize;
174911
+ if (delta !== 0) {
174912
+ const wasAtEnd = this.options.anchorTo === "end" && ((_a3 = this.scrollState) == null ? void 0 : _a3.behavior) !== "smooth" && this.getVirtualDistanceFromEnd() <= this.options.scrollEndThreshold;
174913
+ const prevTotalSize = wasAtEnd ? this.getTotalSize() : 0;
174914
+ const shouldAdjustScroll = ((_b3 = this.scrollState) == null ? void 0 : _b3.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
174915
+ // The callback expects a VirtualItem; build one lazily only
174916
+ // when the consumer actually supplied a custom predicate.
174917
+ this.measurementsCache[index2] ?? {
174918
+ index: index2,
174919
+ key: key2,
174920
+ start: itemStart,
174921
+ size: cachedSize,
174922
+ end: itemStart + cachedSize,
174923
+ lane: 0
174924
+ },
174925
+ delta,
174926
+ this
174927
+ ) : (
174928
+ // Default: adjust when the resize is an above-viewport item.
174929
+ // First measurement (!has(key)): always adjust — the item
174930
+ // has never been sized, so the estimate→actual delta must
174931
+ // be compensated regardless of scroll direction.
174932
+ // Re-measurement (has(key)): skip during backward scroll
174933
+ // to avoid the "items jump while scrolling up" cascade.
174934
+ itemStart < this.getScrollOffset() + this.scrollAdjustments && (!this.itemSizeCache.has(key2) || this.scrollDirection !== "backward")
174935
+ ));
174936
+ if (this.pendingMin === null || index2 < this.pendingMin) {
174937
+ this.pendingMin = index2;
174938
+ }
174939
+ this.itemSizeCache.set(key2, size2);
174940
+ this.itemSizeCacheVersion++;
174941
+ if (wasAtEnd) {
174942
+ this.applyScrollAdjustment(this.getTotalSize() - prevTotalSize);
174943
+ } else if (shouldAdjustScroll) {
174944
+ this.applyScrollAdjustment(delta);
174945
+ }
174946
+ this.notify(false);
174947
+ }
174948
+ };
174949
+ this.getVirtualItems = memo(
174950
+ () => [this.getVirtualIndexes(), this.getMeasurements()],
174951
+ (indexes, measurements) => {
174952
+ const virtualItems = [];
174953
+ for (let k2 = 0, len = indexes.length; k2 < len; k2++) {
174954
+ const i2 = indexes[k2];
174955
+ const measurement = measurements[i2];
174956
+ virtualItems.push(measurement);
174957
+ }
174958
+ return virtualItems;
174959
+ },
174960
+ {
174961
+ key: false,
174962
+ debug: () => this.options.debug
174963
+ }
174964
+ );
174965
+ this.getVirtualItemForOffset = (offset2) => {
174966
+ const measurements = this.getMeasurements();
174967
+ if (measurements.length === 0) {
174968
+ return void 0;
174969
+ }
174970
+ const flat = this._flatMeasurements;
174971
+ const useFlat = this.options.lanes === 1 && flat != null;
174972
+ const idx = findNearestBinarySearch(
174973
+ 0,
174974
+ measurements.length - 1,
174975
+ useFlat ? (i2) => flat[i2 * 2] : (i2) => notUndefined(measurements[i2]).start,
174976
+ offset2
174977
+ );
174978
+ return notUndefined(measurements[idx]);
174979
+ };
174980
+ this.getMaxScrollOffset = () => {
174981
+ if (!this.scrollElement) return 0;
174982
+ if ("scrollHeight" in this.scrollElement) {
174983
+ return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight;
174984
+ } else {
174985
+ const doc2 = this.scrollElement.document.documentElement;
174986
+ return this.options.horizontal ? doc2.scrollWidth - this.scrollElement.innerWidth : doc2.scrollHeight - this.scrollElement.innerHeight;
174987
+ }
174988
+ };
174989
+ this.getVirtualDistanceFromEnd = () => {
174990
+ return Math.max(
174991
+ this.getTotalSize() - this.getSize() - this.getScrollOffset(),
174992
+ 0
174993
+ );
174994
+ };
174995
+ this.getDistanceFromEnd = () => {
174996
+ return Math.max(this.getMaxScrollOffset() - this.getScrollOffset(), 0);
174997
+ };
174998
+ this.isAtEnd = (threshold2 = this.options.scrollEndThreshold) => {
174999
+ return this.getDistanceFromEnd() <= threshold2;
175000
+ };
175001
+ this.getOffsetForAlignment = (toOffset, align, itemSize = 0) => {
175002
+ if (!this.scrollElement) return 0;
175003
+ const size2 = this.getSize();
175004
+ const scrollOffset = this.getScrollOffset();
175005
+ if (align === "auto") {
175006
+ align = toOffset >= scrollOffset + size2 ? "end" : "start";
175007
+ }
175008
+ if (align === "center") {
175009
+ toOffset += (itemSize - size2) / 2;
175010
+ } else if (align === "end") {
175011
+ toOffset -= size2;
175012
+ }
175013
+ const maxOffset2 = this.getMaxScrollOffset();
175014
+ return Math.max(Math.min(maxOffset2, toOffset), 0);
175015
+ };
175016
+ this.getOffsetForIndex = (index2, align = "auto") => {
175017
+ index2 = Math.max(0, Math.min(index2, this.options.count - 1));
175018
+ const size2 = this.getSize();
175019
+ const scrollOffset = this.getScrollOffset();
175020
+ const item = this.measurementsCache[index2];
175021
+ if (!item) return;
175022
+ if (align === "auto") {
175023
+ if (item.end >= scrollOffset + size2 - this.options.scrollPaddingEnd) {
175024
+ align = "end";
175025
+ } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {
175026
+ align = "start";
175027
+ } else {
175028
+ return [scrollOffset, align];
175029
+ }
175030
+ }
175031
+ if (align === "end" && index2 === this.options.count - 1) {
175032
+ return [this.getMaxScrollOffset(), align];
175033
+ }
175034
+ const toOffset = align === "end" ? item.end + this.options.scrollPaddingEnd : item.start - this.options.scrollPaddingStart;
175035
+ return [
175036
+ this.getOffsetForAlignment(toOffset, align, item.size),
175037
+ align
175038
+ ];
175039
+ };
175040
+ this.scrollToOffset = (toOffset, { align = "start", behavior = "auto" } = {}) => {
175041
+ const offset2 = this.getOffsetForAlignment(toOffset, align);
175042
+ const now2 = this.now();
175043
+ this.scrollState = {
175044
+ index: null,
175045
+ align,
175046
+ behavior,
175047
+ startedAt: now2,
175048
+ lastTargetOffset: offset2,
175049
+ stableFrames: 0
175050
+ };
175051
+ this._scrollToOffset(offset2, { adjustments: void 0, behavior });
175052
+ this.scheduleScrollReconcile();
175053
+ };
175054
+ this.scrollToIndex = (index2, {
175055
+ align: initialAlign = "auto",
175056
+ behavior = "auto"
175057
+ } = {}) => {
175058
+ index2 = Math.max(0, Math.min(index2, this.options.count - 1));
175059
+ const offsetInfo = this.getOffsetForIndex(index2, initialAlign);
175060
+ if (!offsetInfo) {
175061
+ return;
175062
+ }
175063
+ const [offset2, align] = offsetInfo;
175064
+ const now2 = this.now();
175065
+ this.scrollState = {
175066
+ index: index2,
175067
+ align,
175068
+ behavior,
175069
+ startedAt: now2,
175070
+ lastTargetOffset: offset2,
175071
+ stableFrames: 0
175072
+ };
175073
+ this._scrollToOffset(offset2, { adjustments: void 0, behavior });
175074
+ this.scheduleScrollReconcile();
175075
+ };
175076
+ this.scrollBy = (delta, { behavior = "auto" } = {}) => {
175077
+ const offset2 = this.getScrollOffset() + delta;
175078
+ const now2 = this.now();
175079
+ this.scrollState = {
175080
+ index: null,
175081
+ align: "start",
175082
+ behavior,
175083
+ startedAt: now2,
175084
+ lastTargetOffset: offset2,
175085
+ stableFrames: 0
175086
+ };
175087
+ this._scrollToOffset(offset2, { adjustments: void 0, behavior });
175088
+ this.scheduleScrollReconcile();
175089
+ };
175090
+ this.scrollToEnd = ({ behavior = "auto" } = {}) => {
175091
+ if (this.options.count > 0) {
175092
+ this.scrollToIndex(this.options.count - 1, {
175093
+ align: "end",
175094
+ behavior
175095
+ });
175096
+ return;
175097
+ }
175098
+ this.scrollToOffset(Math.max(this.getTotalSize() - this.getSize(), 0), {
175099
+ behavior
175100
+ });
175101
+ };
175102
+ this.getTotalSize = () => {
175103
+ var _a3;
175104
+ const measurements = this.getMeasurements();
175105
+ let end;
175106
+ if (measurements.length === 0) {
175107
+ end = this.options.paddingStart;
175108
+ } else if (this.options.lanes === 1) {
175109
+ const lastIdx = measurements.length - 1;
175110
+ const flat = this._flatMeasurements;
175111
+ if (flat != null) {
175112
+ end = flat[lastIdx * 2] + flat[lastIdx * 2 + 1];
175113
+ } else {
175114
+ end = ((_a3 = measurements[lastIdx]) == null ? void 0 : _a3.end) ?? 0;
175115
+ }
175116
+ } else {
175117
+ const endByLane = Array(this.options.lanes).fill(null);
175118
+ let endIndex = measurements.length - 1;
175119
+ while (endIndex >= 0 && endByLane.some((val) => val === null)) {
175120
+ const item = measurements[endIndex];
175121
+ if (endByLane[item.lane] === null) {
175122
+ endByLane[item.lane] = item.end;
175123
+ }
175124
+ endIndex--;
175125
+ }
175126
+ end = Math.max(...endByLane.filter((val) => val !== null));
175127
+ }
175128
+ return Math.max(
175129
+ end - this.options.scrollMargin + this.options.paddingEnd,
175130
+ 0
175131
+ );
175132
+ };
175133
+ this.takeSnapshot = () => {
175134
+ const snapshot = [];
175135
+ if (this.itemSizeCache.size === 0) return snapshot;
175136
+ const m2 = this.getMeasurements();
175137
+ for (const item of m2) {
175138
+ if (item && this.itemSizeCache.has(item.key)) {
175139
+ snapshot.push({
175140
+ index: item.index,
175141
+ key: item.key,
175142
+ start: item.start,
175143
+ size: item.size,
175144
+ end: item.end,
175145
+ lane: item.lane
175146
+ });
175147
+ }
175148
+ }
175149
+ return snapshot;
175150
+ };
175151
+ this._scrollToOffset = (offset2, {
175152
+ adjustments,
175153
+ behavior
175154
+ }) => {
175155
+ this._intendedScrollOffset = offset2 + (adjustments ?? 0);
175156
+ this.options.scrollToFn(offset2, { behavior, adjustments }, this);
175157
+ };
175158
+ this.measure = () => {
175159
+ this.pendingMin = null;
175160
+ this.itemSizeCache.clear();
175161
+ this.laneAssignments.clear();
175162
+ this.itemSizeCacheVersion++;
175163
+ this.notify(false);
175164
+ };
175165
+ this.setOptions(opts);
175166
+ }
175167
+ applyScrollAdjustment(delta, behavior) {
175168
+ if (delta === 0) return;
175169
+ if (isIOSWebKit() && (this.isScrolling || this._iosTouching || this._iosJustTouchEnded)) {
175170
+ this._iosDeferredAdjustment += delta;
175171
+ } else {
175172
+ this._scrollToOffset(this.getScrollOffset(), {
175173
+ adjustments: this.scrollAdjustments += delta,
175174
+ behavior
175175
+ });
175176
+ }
175177
+ }
175178
+ scheduleScrollReconcile() {
175179
+ if (!this.targetWindow) {
175180
+ this.scrollState = null;
175181
+ return;
175182
+ }
175183
+ if (this.rafId != null) return;
175184
+ this.rafId = this.targetWindow.requestAnimationFrame(() => {
175185
+ this.rafId = null;
175186
+ this.reconcileScroll();
175187
+ });
175188
+ }
175189
+ reconcileScroll() {
175190
+ if (!this.scrollState) return;
175191
+ const el = this.scrollElement;
175192
+ if (!el) return;
175193
+ const MAX_RECONCILE_MS = 5e3;
175194
+ if (this.now() - this.scrollState.startedAt > MAX_RECONCILE_MS) {
175195
+ this.scrollState = null;
175196
+ return;
175197
+ }
175198
+ const offsetInfo = this.scrollState.index != null ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align) : void 0;
175199
+ const targetOffset = offsetInfo ? offsetInfo[0] : this.scrollState.lastTargetOffset;
175200
+ const STABLE_FRAMES = 1;
175201
+ const targetChanged = targetOffset !== this.scrollState.lastTargetOffset;
175202
+ if (!targetChanged && approxEqual(targetOffset, this.getScrollOffset())) {
175203
+ this.scrollState.stableFrames++;
175204
+ if (this.scrollState.stableFrames >= STABLE_FRAMES) {
175205
+ if (this.getScrollOffset() !== targetOffset) {
175206
+ this._scrollToOffset(targetOffset, {
175207
+ adjustments: void 0,
175208
+ behavior: "auto"
175209
+ });
175210
+ }
175211
+ this.scrollState = null;
175212
+ return;
175213
+ }
175214
+ } else {
175215
+ this.scrollState.stableFrames = 0;
175216
+ if (targetChanged) {
175217
+ const viewport = this.getSize() || 600;
175218
+ const distance2 = Math.abs(targetOffset - this.getScrollOffset());
175219
+ const keepSmooth = this.scrollState.behavior === "smooth" && distance2 > viewport;
175220
+ this.scrollState.lastTargetOffset = targetOffset;
175221
+ if (!keepSmooth) {
175222
+ this.scrollState.behavior = "auto";
175223
+ }
175224
+ this._scrollToOffset(targetOffset, {
175225
+ adjustments: void 0,
175226
+ behavior: keepSmooth ? "smooth" : "auto"
175227
+ });
175228
+ }
175229
+ }
175230
+ this.scheduleScrollReconcile();
175231
+ }
175232
+ }
175233
+ const findNearestBinarySearch = (low, high, getCurrentValue, value) => {
175234
+ while (low <= high) {
175235
+ const middle = (low + high) / 2 | 0;
175236
+ const currentValue = getCurrentValue(middle);
175237
+ if (currentValue < value) {
175238
+ low = middle + 1;
175239
+ } else if (currentValue > value) {
175240
+ high = middle - 1;
175241
+ } else {
175242
+ return middle;
175243
+ }
175244
+ }
175245
+ if (low > 0) {
175246
+ return low - 1;
175247
+ } else {
175248
+ return 0;
175249
+ }
175250
+ };
175251
+ function calculateRange({
175252
+ measurements,
175253
+ outerSize,
175254
+ scrollOffset,
175255
+ lanes,
175256
+ flat
175257
+ }) {
175258
+ const lastIndex = measurements.length - 1;
175259
+ const getStart = flat ? (index2) => flat[index2 * 2] : (index2) => measurements[index2].start;
175260
+ const getEnd = flat ? (index2) => flat[index2 * 2] + flat[index2 * 2 + 1] : (index2) => measurements[index2].end;
175261
+ if (measurements.length <= lanes) {
175262
+ return {
175263
+ startIndex: 0,
175264
+ endIndex: lastIndex
175265
+ };
175266
+ }
175267
+ let startIndex = findNearestBinarySearch(0, lastIndex, getStart, scrollOffset);
175268
+ let endIndex = startIndex;
175269
+ if (lanes === 1) {
175270
+ while (endIndex < lastIndex && getEnd(endIndex) < scrollOffset + outerSize) {
175271
+ endIndex++;
175272
+ }
175273
+ } else if (lanes > 1) {
175274
+ const endPerLane = Array(lanes).fill(0);
175275
+ while (endIndex < lastIndex && endPerLane.some((pos) => pos < scrollOffset + outerSize)) {
175276
+ const item = measurements[endIndex];
175277
+ endPerLane[item.lane] = item.end;
175278
+ endIndex++;
175279
+ }
175280
+ const startPerLane = Array(lanes).fill(scrollOffset + outerSize);
175281
+ while (startIndex >= 0 && startPerLane.some((pos) => pos >= scrollOffset)) {
175282
+ const item = measurements[startIndex];
175283
+ startPerLane[item.lane] = item.start;
175284
+ startIndex--;
175285
+ }
175286
+ startIndex = Math.max(0, startIndex - startIndex % lanes);
175287
+ endIndex = Math.min(lastIndex, endIndex + (lanes - 1 - endIndex % lanes));
175288
+ }
175289
+ return { startIndex, endIndex };
175290
+ }
175291
+ const useIsomorphicLayoutEffect$1 = typeof document !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
175292
+ function useVirtualizerBase({
175293
+ useFlushSync = true,
175294
+ directDomUpdates = false,
175295
+ directDomUpdatesMode = "transform",
175296
+ ...options
175297
+ }) {
175298
+ const rerender = reactExports.useReducer((x2) => x2 + 1, 0)[1];
175299
+ const directRef = reactExports.useRef({
175300
+ enabled: directDomUpdates,
175301
+ mode: directDomUpdatesMode,
175302
+ container: null,
175303
+ lastSize: null,
175304
+ // Keyed by the element itself so a remounted node (same key, new DOM
175305
+ // node — e.g. when `enabled` is toggled off then on) is treated as fresh
175306
+ // and gets its style written.
175307
+ lastPositions: /* @__PURE__ */ new WeakMap(),
175308
+ prevRange: null
175309
+ });
175310
+ directRef.current.enabled = directDomUpdates;
175311
+ directRef.current.mode = directDomUpdatesMode;
175312
+ const applyDirectStyles = (instance2) => {
175313
+ const state2 = directRef.current;
175314
+ if (!state2.enabled || !state2.container) return;
175315
+ const totalSize = instance2.getTotalSize();
175316
+ if (totalSize !== state2.lastSize) {
175317
+ state2.lastSize = totalSize;
175318
+ const sizeAxis = instance2.options.horizontal ? "width" : "height";
175319
+ state2.container.style[sizeAxis] = `${totalSize}px`;
175320
+ }
175321
+ const horizontal = !!instance2.options.horizontal;
175322
+ const useTransform = state2.mode === "transform";
175323
+ const posAxis = horizontal ? "left" : "top";
175324
+ const scrollMargin = instance2.options.scrollMargin;
175325
+ const items = instance2.getVirtualItems();
175326
+ for (const item of items) {
175327
+ const next2 = item.start - scrollMargin;
175328
+ const el = instance2.elementsCache.get(item.key);
175329
+ if (!el) continue;
175330
+ if (state2.lastPositions.get(el) === next2) continue;
175331
+ state2.lastPositions.set(el, next2);
175332
+ if (useTransform) {
175333
+ el.style.transform = horizontal ? `translate3d(${next2}px, 0, 0)` : `translate3d(0, ${next2}px, 0)`;
175334
+ } else {
175335
+ el.style[posAxis] = `${next2}px`;
175336
+ }
175337
+ }
175338
+ };
175339
+ const resolvedOptions = {
175340
+ ...options,
175341
+ onChange: (instance2, sync) => {
175342
+ var _a3;
175343
+ const state2 = directRef.current;
175344
+ let shouldRerender = true;
175345
+ if (state2.enabled) {
175346
+ applyDirectStyles(instance2);
175347
+ const range2 = instance2.range;
175348
+ const prev2 = state2.prevRange;
175349
+ shouldRerender = !prev2 || prev2.isScrolling !== instance2.isScrolling || prev2.startIndex !== (range2 == null ? void 0 : range2.startIndex) || prev2.endIndex !== (range2 == null ? void 0 : range2.endIndex);
175350
+ if (shouldRerender) {
175351
+ state2.prevRange = range2 ? {
175352
+ startIndex: range2.startIndex,
175353
+ endIndex: range2.endIndex,
175354
+ isScrolling: instance2.isScrolling
175355
+ } : null;
175356
+ }
175357
+ }
175358
+ if (shouldRerender) {
175359
+ if (useFlushSync && sync) {
175360
+ reactDomExports.flushSync(rerender);
175361
+ } else {
175362
+ rerender();
175363
+ }
175364
+ }
175365
+ (_a3 = options.onChange) == null ? void 0 : _a3.call(options, instance2, sync);
175366
+ }
175367
+ };
175368
+ const [instance] = reactExports.useState(() => {
175369
+ const v2 = new Virtualizer(resolvedOptions);
175370
+ return Object.assign(v2, {
175371
+ containerRef: (node2) => {
175372
+ const state2 = directRef.current;
175373
+ state2.container = node2;
175374
+ state2.lastSize = null;
175375
+ if (node2 && state2.enabled) {
175376
+ const total = v2.getTotalSize();
175377
+ state2.lastSize = total;
175378
+ const axis = v2.options.horizontal ? "width" : "height";
175379
+ node2.style[axis] = `${total}px`;
175380
+ }
175381
+ }
175382
+ });
175383
+ });
175384
+ instance.setOptions(resolvedOptions);
175385
+ useIsomorphicLayoutEffect$1(() => {
175386
+ return instance._didMount();
175387
+ }, []);
175388
+ useIsomorphicLayoutEffect$1(() => {
175389
+ return instance._willUpdate();
175390
+ });
175391
+ useIsomorphicLayoutEffect$1(() => {
175392
+ applyDirectStyles(instance);
175393
+ });
175394
+ return instance;
175395
+ }
175396
+ function useVirtualizer(options) {
175397
+ return useVirtualizerBase({
175398
+ observeElementRect,
175399
+ observeElementOffset,
175400
+ scrollToFn: elementScroll,
175401
+ ...options
175402
+ });
175403
+ }
175404
+ function VirtualizedMessageList({
175405
+ items,
175406
+ getKey,
175407
+ renderItem,
175408
+ estimateSize = 220,
175409
+ overscan = 5
175410
+ }) {
175411
+ const { scrollRef } = useStickToBottomContext();
175412
+ const estimateSizeFn = reactExports.useCallback(() => estimateSize, [estimateSize]);
175413
+ const itemsRef = reactExports.useRef(items);
175414
+ itemsRef.current = items;
175415
+ const getItemKeyFn = reactExports.useCallback(
175416
+ (index2) => getKey(itemsRef.current[index2], index2),
175417
+ [getKey]
175418
+ );
175419
+ const getScrollElement = reactExports.useCallback(() => scrollRef.current, [scrollRef]);
175420
+ const virtualizer = useVirtualizer({
175421
+ count: items.length,
175422
+ getScrollElement,
175423
+ estimateSize: estimateSizeFn,
175424
+ overscan,
175425
+ // Stable key per item — important so React reuses the same DOM row
175426
+ // when items shift (e.g. a new message pushes earlier ones up).
175427
+ getItemKey: getItemKeyFn
175428
+ });
175429
+ const virtualItems = virtualizer.getVirtualItems();
175430
+ const totalSize = virtualizer.getTotalSize();
175431
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
175432
+ "div",
175433
+ {
175434
+ "data-testid": "chat-pane__virtual-list",
175435
+ style: {
175436
+ // Explicit total height so the parent flex container's
175437
+ // ResizeObserver (use-stick-to-bottom) sees growth and the
175438
+ // scrollbar shows the correct extent.
175439
+ height: `${totalSize}px`,
175440
+ width: "100%",
175441
+ position: "relative"
175442
+ },
175443
+ children: virtualItems.map((virtualRow) => {
175444
+ const item = items[virtualRow.index];
175445
+ const isLast = virtualRow.index === items.length - 1;
175446
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
175447
+ VirtualRow,
175448
+ {
175449
+ item,
175450
+ index: virtualRow.index,
175451
+ start: virtualRow.start,
175452
+ isLast,
175453
+ renderItem,
175454
+ measureRef: virtualizer.measureElement
175455
+ },
175456
+ virtualRow.key
175457
+ );
175458
+ })
175459
+ }
175460
+ );
175461
+ }
175462
+ function VirtualRowImpl({
175463
+ item,
175464
+ index: index2,
175465
+ start: start2,
175466
+ isLast,
175467
+ renderItem,
175468
+ measureRef
175469
+ }) {
175470
+ const content2 = renderItem(item, index2);
175471
+ const padding = content2 == null || isLast ? "" : "pb-4";
175472
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
175473
+ "div",
175474
+ {
175475
+ "data-index": index2,
175476
+ "data-testid": content2 == null ? void 0 : "chat-pane__message-row",
175477
+ ref: measureRef,
175478
+ style: {
175479
+ position: "absolute",
175480
+ top: 0,
175481
+ left: 0,
175482
+ width: "100%",
175483
+ transform: `translateY(${start2}px)`
175484
+ },
175485
+ className: padding,
175486
+ children: content2
175487
+ }
175488
+ );
175489
+ }
175490
+ const VirtualRow = reactExports.memo(VirtualRowImpl);
173777
175491
  const IN_PROGRESS_STATES = /* @__PURE__ */ new Set([
173778
175492
  "input-available",
173779
175493
  "input-streaming",
@@ -173825,18 +175539,18 @@ function ConversationSkeleton() {
173825
175539
  "aria-busy": "true",
173826
175540
  "aria-label": "Loading messages",
173827
175541
  children: [
173828
- /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "user", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 py-1", children: [
175542
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "user", "data-testid": void 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 py-1", children: [
173829
175543
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-48", className: "bg-foreground/10" }),
173830
175544
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-32", className: "bg-foreground/10" })
173831
175545
  ] }) }) }),
173832
- /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "assistant", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 pt-1", children: [
175546
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "assistant", "data-testid": void 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 pt-1", children: [
173833
175547
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-3/4" }),
173834
175548
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-full" }),
173835
175549
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-5/6" }),
173836
175550
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-2/3" })
173837
175551
  ] }) }) }),
173838
- /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "user", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-2 py-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-40", className: "bg-foreground/10" }) }) }) }),
173839
- /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "assistant", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 pt-1", children: [
175552
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "user", "data-testid": void 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-2 py-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-40", className: "bg-foreground/10" }) }) }) }),
175553
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "assistant", "data-testid": void 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 pt-1", children: [
173840
175554
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-2/3" }),
173841
175555
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-4/5" }),
173842
175556
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-1/2" })
@@ -173870,6 +175584,29 @@ function ChatView({
173870
175584
  reactExports.useRef(null);
173871
175585
  const stickyContextRef = reactExports.useRef(null);
173872
175586
  const prevVisibleRef = reactExports.useRef(visible);
175587
+ reactExports.useEffect(() => {
175588
+ let raf = 0;
175589
+ let attempts = 0;
175590
+ const attach = () => {
175591
+ attempts += 1;
175592
+ const el = stickyContextRef.current?.scrollRef?.current;
175593
+ if (el) {
175594
+ if (!el.dataset.testid) el.dataset.testid = "chat-pane__scroller";
175595
+ return;
175596
+ }
175597
+ if (attempts >= 10) {
175598
+ console.warn(
175599
+ "[ChatView] StickToBottom scrollRef did not resolve within 10 frames; chat-pane__scroller testid not attached"
175600
+ );
175601
+ return;
175602
+ }
175603
+ raf = requestAnimationFrame(attach);
175604
+ };
175605
+ attach();
175606
+ return () => {
175607
+ if (raf) cancelAnimationFrame(raf);
175608
+ };
175609
+ }, []);
173873
175610
  reactExports.useEffect(() => {
173874
175611
  const wasHidden = prevVisibleRef.current === false;
173875
175612
  prevVisibleRef.current = visible;
@@ -174099,14 +175836,76 @@ function ChatView({
174099
175836
  }
174100
175837
  return map2;
174101
175838
  }, [messages]);
175839
+ const getMessageKey = reactExports.useCallback((message) => message.id, []);
175840
+ const messagesRef = reactExports.useRef(messages);
175841
+ messagesRef.current = messages;
175842
+ const isStreamingRef = reactExports.useRef(isStreaming);
175843
+ isStreamingRef.current = isStreaming;
175844
+ const renderMessageItem = reactExports.useCallback((message, messageIndex) => {
175845
+ const currentMessages = messagesRef.current;
175846
+ const currentIsStreaming = isStreamingRef.current;
175847
+ const isLastMessage = messageIndex === currentMessages.length - 1;
175848
+ const isLastAssistant = message.role === "assistant" && isLastMessage;
175849
+ const hasPendingInteractiveTool = isLastAssistant && message.parts.some((p2) => {
175850
+ if (!isToolUIPart(p2) || !IN_PROGRESS_STATES.has(p2.state)) return false;
175851
+ const name2 = getToolName(p2);
175852
+ return name2 === "AskUserQuestion" || name2 === "ExitPlanMode";
175853
+ });
175854
+ const showThinking = isLastAssistant && currentIsStreaming && !hasPendingInteractiveTool;
175855
+ const segments = groupMessageParts(message.parts);
175856
+ if (message.role !== "assistant") {
175857
+ if (segments.length === 0) return null;
175858
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "user", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: segments.map((segment) => {
175859
+ if (segment.type === "text" && segment.part.type === "text" && segment.part.text.trim()) {
175860
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(MessageResponse, { children: segment.part.text }, `${message.id}-text-${segment.partIndex}`);
175861
+ }
175862
+ if (segment.type === "file") {
175863
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
175864
+ MessageFilePart,
175865
+ {
175866
+ part: segment.part
175867
+ },
175868
+ `${message.id}-file-${segment.partIndex}`
175869
+ );
175870
+ }
175871
+ return null;
175872
+ }) }) });
175873
+ }
175874
+ if (segments.length === 0 && !showThinking) return null;
175875
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "assistant", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(MessageContent, { children: [
175876
+ segments.map((segment) => {
175877
+ if (segment.type === "text") {
175878
+ const { part, partIndex } = segment;
175879
+ if (part.type === "text" && part.text.trim()) {
175880
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(MessageResponse, { children: part.text }, `${message.id}-text-${partIndex}`);
175881
+ }
175882
+ return null;
175883
+ }
175884
+ if (segment.type === "file") {
175885
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
175886
+ MessageFilePart,
175887
+ {
175888
+ part: segment.part
175889
+ },
175890
+ `${message.id}-file-${segment.partIndex}`
175891
+ );
175892
+ }
175893
+ const item = toolPartToItem(segment.part);
175894
+ if (isTaskTool(item.toolName)) return null;
175895
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ToolCall, { item }, `${message.id}-tool-${segment.partIndex}`);
175896
+ }),
175897
+ showThinking && /* @__PURE__ */ jsxRuntimeExports.jsx(ThinkingIndicator, {})
175898
+ ] }) });
175899
+ }, []);
174102
175900
  const getLastUserMessage = reactExports.useCallback(() => {
174103
- for (let i2 = messages.length - 1; i2 >= 0; i2--) {
174104
- if (messages[i2].role !== "user") continue;
174105
- const text2 = messages[i2].parts.filter((p2) => p2.type === "text").map((p2) => p2.text).join("\n").trim();
175901
+ const currentMessages = messagesRef.current;
175902
+ for (let i2 = currentMessages.length - 1; i2 >= 0; i2--) {
175903
+ if (currentMessages[i2].role !== "user") continue;
175904
+ const text2 = currentMessages[i2].parts.filter((p2) => p2.type === "text").map((p2) => p2.text).join("\n").trim();
174106
175905
  if (text2) return text2;
174107
175906
  }
174108
175907
  return void 0;
174109
- }, [messages]);
175908
+ }, []);
174110
175909
  return (
174111
175910
  // Scope every `band-file:` link clicked inside this chat to *this*
174112
175911
  // workspace — `dispatchOpenFile` reads the id from context, so a
@@ -174130,64 +175929,21 @@ function ChatView({
174130
175929
  description: "Send a message to start coding"
174131
175930
  }
174132
175931
  ),
174133
- (() => {
174134
- return messages.map((message, messageIndex) => {
174135
- const isLastMessage = messageIndex === messages.length - 1;
174136
- const isLastAssistant = message.role === "assistant" && isLastMessage;
174137
- const hasPendingInteractiveTool = isLastAssistant && message.parts.some(
174138
- (p2) => isToolUIPart(p2) && IN_PROGRESS_STATES.has(p2.state) && (getToolName(p2) === "AskUserQuestion" || getToolName(p2) === "ExitPlanMode")
174139
- );
174140
- const showThinking = isLastAssistant && isStreaming && !hasPendingInteractiveTool;
174141
- if (message.role !== "assistant") {
174142
- const userParts = groupMessageParts(message.parts);
174143
- if (userParts.length === 0) return null;
174144
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "user", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: userParts.map((segment) => {
174145
- if (segment.type === "text" && segment.part.type === "text" && segment.part.text.trim()) {
174146
- return /* @__PURE__ */ jsxRuntimeExports.jsx(MessageResponse, { children: segment.part.text }, `${message.id}-text-${segment.partIndex}`);
174147
- }
174148
- if (segment.type === "file") {
174149
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
174150
- MessageFilePart,
174151
- {
174152
- part: segment.part
174153
- },
174154
- `${message.id}-file-${segment.partIndex}`
174155
- );
174156
- }
174157
- return null;
174158
- }) }) }, message.id);
174159
- }
174160
- const visibleParts = message.parts.filter(
174161
- (p2) => p2.type === "text" && p2.text.trim() || p2.type === "file" || isToolUIPart(p2)
174162
- );
174163
- if (visibleParts.length === 0 && !showThinking) return null;
174164
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "assistant", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(MessageContent, { children: [
174165
- groupMessageParts(message.parts).map((segment) => {
174166
- if (segment.type === "text") {
174167
- const { part, partIndex } = segment;
174168
- if (part.type === "text" && part.text.trim()) {
174169
- return /* @__PURE__ */ jsxRuntimeExports.jsx(MessageResponse, { children: part.text }, `${message.id}-text-${partIndex}`);
174170
- }
174171
- return null;
174172
- }
174173
- if (segment.type === "file") {
174174
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
174175
- MessageFilePart,
174176
- {
174177
- part: segment.part
174178
- },
174179
- `${message.id}-file-${segment.partIndex}`
174180
- );
174181
- }
174182
- const item = toolPartToItem(segment.part);
174183
- if (isTaskTool(item.toolName)) return null;
174184
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ToolCall, { item }, `${message.id}-tool-${segment.partIndex}`);
174185
- }),
174186
- showThinking && /* @__PURE__ */ jsxRuntimeExports.jsx(ThinkingIndicator, {})
174187
- ] }) }, message.id);
174188
- });
174189
- })(),
174190
- isStreaming && (!messages.length || messages[messages.length - 1].role === "user") && /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "assistant", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThinkingIndicator, {}) }) }),
175932
+ messages.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
175933
+ VirtualizedMessageList,
175934
+ {
175935
+ items: messages,
175936
+ getKey: getMessageKey,
175937
+ renderItem: renderMessageItem
175938
+ }
175939
+ ),
175940
+ isStreaming && (!messages.length || messages[messages.length - 1].role === "user") && // No `chat-pane__assistant-message` testid on the
175941
+ // standalone thinking bubble — locators that target
175942
+ // assistant message bubbles should never pick up the
175943
+ // intermediate "agent is thinking" placeholder. The
175944
+ // dedicated `chat-pane__thinking-indicator` testid on
175945
+ // `ThinkingIndicator` is what tests use for this state.
175946
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "assistant", "data-testid": void 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThinkingIndicator, {}) }) }),
174191
175947
  queuedMessagesView.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
174192
175948
  DndContext,
174193
175949
  {
@@ -174452,11 +176208,13 @@ const MODEL_CONTEXT_WINDOWS = {
174452
176208
  "gemini-2.5-pro": 1e6,
174453
176209
  "gemini-2.5-flash": 1e6
174454
176210
  };
176211
+ const SORTED_MODEL_CONTEXT_ENTRIES = Object.entries(
176212
+ MODEL_CONTEXT_WINDOWS
176213
+ ).sort(([a2], [b2]) => b2.length - a2.length);
174455
176214
  function getContextWindow(model) {
174456
176215
  if (!model) return 2e5;
174457
176216
  if (MODEL_CONTEXT_WINDOWS[model]) return MODEL_CONTEXT_WINDOWS[model];
174458
- const entries2 = Object.entries(MODEL_CONTEXT_WINDOWS).sort(([a2], [b2]) => b2.length - a2.length);
174459
- for (const [key2, value] of entries2) {
176217
+ for (const [key2, value] of SORTED_MODEL_CONTEXT_ENTRIES) {
174460
176218
  if (model.startsWith(key2)) return value;
174461
176219
  }
174462
176220
  return 2e5;
@@ -175594,6 +177352,15 @@ function usePerWorkspaceState(workspaceId) {
175594
177352
  }
175595
177353
  const DEFAULT_MAX_CACHED_WORKSPACES = 3;
175596
177354
  const MIN_MAX_CACHED_WORKSPACES = 1;
177355
+ const ACTIVE_ENTRY_STYLE = {
177356
+ visibility: "visible",
177357
+ contentVisibility: "visible"
177358
+ };
177359
+ const HIDDEN_ENTRY_STYLE = {
177360
+ visibility: "hidden",
177361
+ contentVisibility: "hidden",
177362
+ pointerEvents: "none"
177363
+ };
175597
177364
  function MultiWorkspacePanelHost({ emptyState, children: children2 }) {
175598
177365
  const [cache, setCache] = reactExports.useState(/* @__PURE__ */ new Map());
175599
177366
  const pathname = useRouterState({ select: (s2) => s2.location.pathname });
@@ -175677,11 +177444,8 @@ function MultiWorkspacePanelHost({ emptyState, children: children2 }) {
175677
177444
  "div",
175678
177445
  {
175679
177446
  "data-testid": `workspace-panel-host__cached-entry--${workspaceId}`,
175680
- className: "absolute inset-0 transition-opacity duration-150 ease-out",
175681
- style: {
175682
- opacity: isActive ? 1 : 0,
175683
- pointerEvents: isActive ? void 0 : "none"
175684
- },
177447
+ className: "absolute inset-0",
177448
+ style: isActive ? ACTIVE_ENTRY_STYLE : HIDDEN_ENTRY_STYLE,
175685
177449
  children: children2(workspaceId, isActive)
175686
177450
  },
175687
177451
  workspaceId
@@ -199029,12 +200793,12 @@ const PANEL_SHORTCUTS = {
199029
200793
  browser: "⇧⌘B"
199030
200794
  };
199031
200795
  const DockviewTerminalContainer = reactExports.lazy(
199032
- () => import("./DockviewTerminalContainer-CbiPuY7W.js").then((m2) => ({
200796
+ () => import("./DockviewTerminalContainer-QeRuw498.js").then((m2) => ({
199033
200797
  default: m2.DockviewTerminalContainer
199034
200798
  }))
199035
200799
  );
199036
200800
  const DockviewBrowserContainer = reactExports.lazy(
199037
- () => import("./DockviewBrowserContainer-MBbRqrFN.js").then((m2) => ({
200801
+ () => import("./DockviewBrowserContainer-DaEHL7rU.js").then((m2) => ({
199038
200802
  default: m2.DockviewBrowserContainer
199039
200803
  }))
199040
200804
  );
@@ -199916,6 +201680,9 @@ function SharedDockviewLayout() {
199916
201680
  lastStructureRef.current = getStructuralFingerprint(initJson);
199917
201681
  }
199918
201682
  const initialActiveState = loadActiveState(initialWorkspaceId);
201683
+ if (initialActiveState) {
201684
+ applyGroupActiveViewsToApi(event.api, initialActiveState);
201685
+ }
199919
201686
  if (initialActiveState?.maximizedGroup) {
199920
201687
  applyMaximizedGroupToApi(event.api, initialActiveState.maximizedGroup);
199921
201688
  }
@@ -199958,16 +201725,7 @@ function SharedDockviewLayout() {
199958
201725
  if (!api || !activeWorkspaceId) return;
199959
201726
  const activeState = loadActiveState(activeWorkspaceId);
199960
201727
  if (activeState) {
199961
- try {
199962
- for (const [_groupId, viewId] of Object.entries(activeState.groups)) {
199963
- const panel = api.getPanel(viewId);
199964
- if (!panel) continue;
199965
- if (panel.api.isActive) continue;
199966
- if (panel.group.panels.length <= 1) continue;
199967
- panel.api.setActive();
199968
- }
199969
- } catch {
199970
- }
201728
+ applyGroupActiveViewsToApi(api, activeState);
199971
201729
  }
199972
201730
  applyMaximizedGroupToApi(api, activeState?.maximizedGroup);
199973
201731
  }, [activeWorkspaceId]);
@@ -200568,12 +202326,12 @@ function RootLayout() {
200568
202326
  ] })
200569
202327
  ] });
200570
202328
  }
200571
- const $$splitComponentImporter$1 = () => import("./index-b-ToRK86.js");
202329
+ const $$splitComponentImporter$1 = () => import("./index-D0gkB7DS.js");
200572
202330
  const Route$1 = createFileRoute("/")({
200573
202331
  component: lazyRouteComponent($$splitComponentImporter$1, "component")
200574
202332
  });
200575
- const $$splitNotFoundComponentImporter = () => import("./workspace._workspaceId-DfI3AStI.js");
200576
- const $$splitComponentImporter = () => import("./workspace._workspaceId-LFuKLA8U.js");
202333
+ const $$splitNotFoundComponentImporter = () => import("./workspace._workspaceId-D20Q15rI.js");
202334
+ const $$splitComponentImporter = () => import("./workspace._workspaceId-BpnCyMIU.js");
200577
202335
  const Route2 = createFileRoute("/workspace/$workspaceId")({
200578
202336
  component: lazyRouteComponent($$splitComponentImporter, "component"),
200579
202337
  // Bookmarks / shared links from before route unification (`/workspace/$id/changes`,
@@ -200709,7 +202467,7 @@ export {
200709
202467
  sin as ay,
200710
202468
  min as az,
200711
202469
  LRLanguage as b,
200712
- SearchFilesDialog as b$,
202470
+ QuickOpenDialog as b$,
200713
202471
  insertNode as b0,
200714
202472
  positionNode as b1,
200715
202473
  getLineFunctionsWithOffset as b2,
@@ -200744,9 +202502,9 @@ export {
200744
202502
  useNavigate as bV,
200745
202503
  DesktopDragRegion as bW,
200746
202504
  ArrowLeft as bX,
200747
- DiffView as bY,
200748
- CodeBrowserView as bZ,
200749
- QuickOpenDialog as b_,
202505
+ ChevronsUpDown as bY,
202506
+ DiffView as bZ,
202507
+ CodeBrowserView as b_,
200750
202508
  NodeWeakMap as ba,
200751
202509
  snippetCompletion as bb,
200752
202510
  Tag as bc,
@@ -200774,111 +202532,113 @@ export {
200774
202532
  isFunction$1 as by,
200775
202533
  isEmpty as bz,
200776
202534
  continuedIndent as c,
200777
- eq as c$,
200778
- useDiffTarget as c0,
200779
- useSettingsQuery as c1,
200780
- agentTypeSupportsSessionListing as c2,
200781
- ChatView as c3,
200782
- array$2 as c4,
200783
- ordinal as c5,
200784
- getUserDefinedConfig as c6,
200785
- ArrowRight as c7,
200786
- ArrowUp as c8,
200787
- ArrowDown as c9,
200788
- rgbConvert as cA,
200789
- define as cB,
200790
- extend$2 as cC,
200791
- Color as cD,
200792
- nogamma as cE,
200793
- hue as cF,
200794
- time$2 as cG,
200795
- min$1 as cH,
200796
- max$1 as cI,
200797
- dayjs2 as cJ,
200798
- timeFormat as cK,
200799
- timeMonth as cL,
200800
- timeSunday as cM,
200801
- timeSaturday as cN,
200802
- timeFriday as cO,
200803
- timeThursday as cP,
200804
- timeWednesday as cQ,
200805
- timeTuesday as cR,
200806
- timeMonday as cS,
200807
- timeDay as cT,
200808
- timeHour as cU,
200809
- timeMinute as cV,
200810
- second as cW,
200811
- millisecond as cX,
200812
- isObject$2 as cY,
200813
- isIterateeCall$1 as cZ,
200814
- keysIn as c_,
200815
- ClipboardPaste as ca,
200816
- getCurrentZoomLevel as cb,
200817
- openExternalUrl as cc,
200818
- subscribeToZoomChanges as cd,
200819
- SearchBar as ce,
200820
- ZOOM_CSS_VAR as cf,
200821
- getIconSVG as cg,
200822
- registerIconPacks as ch,
200823
- unknownIcon as ci,
200824
- invoke as cj,
200825
- listen as ck,
200826
- reactDomExports as cl,
200827
- Globe as cm,
200828
- Popover as cn,
200829
- PopoverTrigger as co,
200830
- PopoverContent as cp,
200831
- Search as cq,
200832
- Trash2 as cr,
200833
- DropdownMenu as cs,
200834
- DropdownMenuTrigger as ct,
200835
- ChevronDown as cu,
200836
- DropdownMenuContent as cv,
200837
- DropdownMenuItem as cw,
200838
- TriangleAlert as cx,
200839
- RotateCw as cy,
200840
- Rgb as cz,
202535
+ isIterateeCall$1 as c$,
202536
+ SearchFilesDialog as c0,
202537
+ WorkspacePickerDialog as c1,
202538
+ useDiffTarget as c2,
202539
+ useSettingsQuery as c3,
202540
+ agentTypeSupportsSessionListing as c4,
202541
+ ChatView as c5,
202542
+ array$2 as c6,
202543
+ ordinal as c7,
202544
+ getUserDefinedConfig as c8,
202545
+ getIconSVG as c9,
202546
+ RotateCw as cA,
202547
+ Rgb as cB,
202548
+ rgbConvert as cC,
202549
+ define as cD,
202550
+ extend$2 as cE,
202551
+ Color as cF,
202552
+ nogamma as cG,
202553
+ hue as cH,
202554
+ time$2 as cI,
202555
+ min$1 as cJ,
202556
+ max$1 as cK,
202557
+ dayjs2 as cL,
202558
+ timeFormat as cM,
202559
+ timeMonth as cN,
202560
+ timeSunday as cO,
202561
+ timeSaturday as cP,
202562
+ timeFriday as cQ,
202563
+ timeThursday as cR,
202564
+ timeWednesday as cS,
202565
+ timeTuesday as cT,
202566
+ timeMonday as cU,
202567
+ timeDay as cV,
202568
+ timeHour as cW,
202569
+ timeMinute as cX,
202570
+ second as cY,
202571
+ millisecond as cZ,
202572
+ isObject$2 as c_,
202573
+ registerIconPacks as ca,
202574
+ unknownIcon as cb,
202575
+ ArrowUp as cc,
202576
+ ArrowDown as cd,
202577
+ ArrowRight as ce,
202578
+ ClipboardPaste as cf,
202579
+ getCurrentZoomLevel as cg,
202580
+ openExternalUrl as ch,
202581
+ subscribeToZoomChanges as ci,
202582
+ SearchBar as cj,
202583
+ ZOOM_CSS_VAR as ck,
202584
+ invoke as cl,
202585
+ listen as cm,
202586
+ reactDomExports as cn,
202587
+ Globe as co,
202588
+ Popover as cp,
202589
+ PopoverTrigger as cq,
202590
+ PopoverContent as cr,
202591
+ Search as cs,
202592
+ Trash2 as ct,
202593
+ DropdownMenu as cu,
202594
+ DropdownMenuTrigger as cv,
202595
+ ChevronDown as cw,
202596
+ DropdownMenuContent as cx,
202597
+ DropdownMenuItem as cy,
202598
+ TriangleAlert as cz,
200841
202599
  foldInside as d,
200842
- isArrayLike$1 as d0,
200843
- isArray$1 as d1,
200844
- identity$1 as d2,
200845
- isIndex$1 as d3,
200846
- assignValue as d4,
200847
- format as d5,
200848
- styles2String as d6,
200849
- isLabelStyle as d7,
200850
- setToString as d8,
200851
- overRest as d9,
200852
- isLength$1 as dA,
200853
- Set$1 as dB,
200854
- createAssigner as dC,
200855
- isPrototype as dD,
200856
- router as dE,
200857
- baseFor as da,
200858
- baseAssignValue as db,
200859
- baseUnary as dc,
200860
- merge$1 as dd,
200861
- isObjectLike$1 as de,
200862
- baseGetTag as df,
200863
- Symbol$1 as dg,
200864
- arrayLikeKeys as dh,
200865
- baseKeys as di,
200866
- memoize as dj,
200867
- isArguments$1 as dk,
200868
- copyObject as dl,
200869
- getPrototype as dm,
200870
- cloneArrayBuffer as dn,
200871
- cloneTypedArray as dp,
200872
- getTag$1 as dq,
200873
- nodeUtil as dr,
200874
- copyArray as ds,
200875
- isBuffer$1 as dt,
200876
- cloneBuffer as du,
200877
- initCloneObject as dv,
200878
- Stack as dw,
200879
- MapCache as dx,
200880
- Uint8Array$1 as dy,
200881
- isTypedArray$1 as dz,
202600
+ keysIn as d0,
202601
+ eq as d1,
202602
+ isArrayLike$1 as d2,
202603
+ isArray$1 as d3,
202604
+ identity$1 as d4,
202605
+ isIndex$1 as d5,
202606
+ assignValue as d6,
202607
+ format as d7,
202608
+ styles2String as d8,
202609
+ isLabelStyle as d9,
202610
+ Uint8Array$1 as dA,
202611
+ isTypedArray$1 as dB,
202612
+ isLength$1 as dC,
202613
+ Set$1 as dD,
202614
+ createAssigner as dE,
202615
+ isPrototype as dF,
202616
+ router as dG,
202617
+ setToString as da,
202618
+ overRest as db,
202619
+ baseFor as dc,
202620
+ baseAssignValue as dd,
202621
+ baseUnary as de,
202622
+ merge$1 as df,
202623
+ isObjectLike$1 as dg,
202624
+ baseGetTag as dh,
202625
+ Symbol$1 as di,
202626
+ arrayLikeKeys as dj,
202627
+ baseKeys as dk,
202628
+ memoize as dl,
202629
+ isArguments$1 as dm,
202630
+ copyObject as dn,
202631
+ getPrototype as dp,
202632
+ cloneArrayBuffer as dq,
202633
+ cloneTypedArray as dr,
202634
+ getTag$1 as ds,
202635
+ nodeUtil as dt,
202636
+ copyArray as du,
202637
+ isBuffer$1 as dv,
202638
+ cloneBuffer as dw,
202639
+ initCloneObject as dx,
202640
+ Stack as dy,
202641
+ MapCache as dz,
200882
202642
  ifNotIn as e,
200883
202643
  foldNodeProp as f,
200884
202644
  completeFromList as g,