@band-app/server 0.19.1 → 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 (160) hide show
  1. package/dist/client/assets/{DockviewBrowserContainer-4SeBGy5m.js → DockviewBrowserContainer-CE6D36cE.js} +1 -1
  2. package/dist/client/assets/{DockviewTerminalContainer-DWva1wNl.js → DockviewTerminalContainer-CqH5m62N.js} +2 -2
  3. package/dist/client/assets/{TerminalPanel-CEmBYkjb.js → TerminalPanel-BCLbEfyo.js} +1 -1
  4. package/dist/client/assets/{_basePickBy-CV44VSwA.js → _basePickBy-CosPBGEe.js} +1 -1
  5. package/dist/client/assets/{_baseUniq-Bqa44Er5.js → _baseUniq-CNCpSB0P.js} +1 -1
  6. package/dist/client/assets/{arc-4rU3SEWf.js → arc-UDGCZidA.js} +1 -1
  7. package/dist/client/assets/{architectureDiagram-VXUJARFQ-CapSrTlr.js → architectureDiagram-VXUJARFQ-CeS1u1s5.js} +1 -1
  8. package/dist/client/assets/{blockDiagram-VD42YOAC-DnapbSnI.js → blockDiagram-VD42YOAC-DNtrsJ3_.js} +1 -1
  9. package/dist/client/assets/{c4Diagram-YG6GDRKO-9mZ9PPiM.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--rr32b4E.js → chunk-4BX2VUAB-6WG78h6_.js} +1 -1
  12. package/dist/client/assets/{chunk-55IACEB6-DfxuD1M3.js → chunk-55IACEB6-CivChWg7.js} +1 -1
  13. package/dist/client/assets/{chunk-B4BG7PRW-CxvnNatf.js → chunk-B4BG7PRW-BKLAk8Ng.js} +1 -1
  14. package/dist/client/assets/{chunk-DI55MBZ5-F51NTwRL.js → chunk-DI55MBZ5-B_cDZCba.js} +1 -1
  15. package/dist/client/assets/{chunk-FMBD7UC4-S03fYfOP.js → chunk-FMBD7UC4-CZgE72J_.js} +1 -1
  16. package/dist/client/assets/{chunk-QN33PNHL-BQWA4OqL.js → chunk-QN33PNHL-1qh6IGru.js} +1 -1
  17. package/dist/client/assets/{chunk-QZHKN3VN-DuLFP0og.js → chunk-QZHKN3VN-Cl_2nn9E.js} +1 -1
  18. package/dist/client/assets/{chunk-TZMSLE5B-BXGn_e4G.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/clone-DsvuocD4.js +1 -0
  22. package/dist/client/assets/{cose-bilkent-S5V4N54A-BD5JLmQ6.js → cose-bilkent-S5V4N54A-DCzND3wc.js} +1 -1
  23. package/dist/client/assets/{dagre-6UL2VRFP-jd9MqFa1.js → dagre-6UL2VRFP-phsFBB-e.js} +1 -1
  24. package/dist/client/assets/{diagram-PSM6KHXK-Bv0WGkj7.js → diagram-PSM6KHXK-C3SOO9R0.js} +1 -1
  25. package/dist/client/assets/{diagram-QEK2KX5R-oszH6q3s.js → diagram-QEK2KX5R-CAFBJ4hH.js} +1 -1
  26. package/dist/client/assets/{diagram-S2PKOQOG-D7rVDuLY.js → diagram-S2PKOQOG-Bpydud7g.js} +1 -1
  27. package/dist/client/assets/{erDiagram-Q2GNP2WA-BL9gntWo.js → erDiagram-Q2GNP2WA-Co4WhzwN.js} +1 -1
  28. package/dist/client/assets/{flowDiagram-NV44I4VS-1FCz1fgN.js → flowDiagram-NV44I4VS-BZA58aUI.js} +1 -1
  29. package/dist/client/assets/{ganttDiagram-JELNMOA3-DggjOINy.js → ganttDiagram-JELNMOA3--4j85sTO.js} +1 -1
  30. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-uoayvKXp.js → gitGraphDiagram-V2S2FVAM-6AH31Cb1.js} +1 -1
  31. package/dist/client/assets/{graph-CKeOhxc0.js → graph-7CJlwe2i.js} +1 -1
  32. package/dist/client/assets/{highlighted-body-B3W2YXNL-BfaZeU0X.js → highlighted-body-B3W2YXNL-D5Kact6h.js} +1 -1
  33. package/dist/client/assets/{index-bY8CiPGQ.js → index--MhpXyw4.js} +1 -1
  34. package/dist/client/assets/{index-BhrvrUs_.js → index-B2DcQ-ug.js} +1 -1
  35. package/dist/client/assets/{index-ChvBXbK8.js → index-B4wpLa0T.js} +1 -1
  36. package/dist/client/assets/{index-Doe-oMI1.js → index-B5R7cbs8.js} +1 -1
  37. package/dist/client/assets/{index-ro4XgOVe.js → index-BwJYeeov.js} +1 -1
  38. package/dist/client/assets/{index-kGHlsI7U.js → index-C4gIKOr_.js} +1 -1
  39. package/dist/client/assets/{index-CdwShVnF.js → index-CoRbY65h.js} +1 -1
  40. package/dist/client/assets/{index-SC22AP5M.js → index-Cp85A8y4.js} +1 -1
  41. package/dist/client/assets/{index-DTOEFzQN.js → index-CralkALm.js} +1 -1
  42. package/dist/client/assets/{index-BZW8u43a.js → index-Cv7YFrOV.js} +1 -1
  43. package/dist/client/assets/{index-DtoczokG.js → index-DCu6TAMf.js} +1 -1
  44. package/dist/client/assets/{index-BOdO7r_p.js → index-DMMKTe60.js} +1 -1
  45. package/dist/client/assets/{index-Ddvrjwlp.js → index-D_D2pxKM.js} +1 -1
  46. package/dist/client/assets/{index-Be24TlVT.js → index-DgEnNhJH.js} +1 -1
  47. package/dist/client/assets/{index-DsvlvI8i.js → index-Djl4xLSO.js} +1 -1
  48. package/dist/client/assets/{index-BmEmzTZO.js → index-Dn_GfMwq.js} +1 -1
  49. package/dist/client/assets/{index-BVhi8EPL.js → index-DnzvlwNY.js} +1 -1
  50. package/dist/client/assets/{index-Cx9QoFI1.js → index-pr8WXb_L.js} +1 -1
  51. package/dist/client/assets/{infoDiagram-HS3SLOUP-9HRNM_Iq.js → infoDiagram-HS3SLOUP-CeA337Zm.js} +1 -1
  52. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-BYEjH_SV.js → journeyDiagram-XKPGCS4Q-ujbs0LMd.js} +1 -1
  53. package/dist/client/assets/{kanban-definition-3W4ZIXB7-s6ZYKbvm.js → kanban-definition-3W4ZIXB7-ffQDH_Ro.js} +1 -1
  54. package/dist/client/assets/{layout-DlcfRJkl.js → layout-Bp2mKXuW.js} +1 -1
  55. package/dist/client/assets/{main-DsoPLGrb.css → main-BzKe6bG7.css} +1 -1
  56. package/dist/client/assets/{main-Ct1o5WmJ.js → main-axhmccT5.js} +271 -271
  57. package/dist/client/assets/{mindmap-definition-VGOIOE7T-CDeQcF1U.js → mindmap-definition-VGOIOE7T-ADZcbwuf.js} +1 -1
  58. package/dist/client/assets/{pieDiagram-ADFJNKIX-CWdMTKnD.js → pieDiagram-ADFJNKIX-BdG4-xDd.js} +1 -1
  59. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-C-Zcxmv2.js → quadrantDiagram-AYHSOK5B-DUtM9sRB.js} +1 -1
  60. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-B3JunJUh.js → requirementDiagram-UZGBJVZJ-Bb0HlfNx.js} +1 -1
  61. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-BRUxMlQD.js → sankeyDiagram-TZEHDZUN-DVCE_8pf.js} +1 -1
  62. package/dist/client/assets/{sequenceDiagram-WL72ISMW--nulyPWN.js → sequenceDiagram-WL72ISMW-CKQaWU-Q.js} +1 -1
  63. package/dist/client/assets/{square-terminal-xTmJg69x.js → square-terminal-BiJr_LVr.js} +1 -1
  64. package/dist/client/assets/{stateDiagram-FKZM4ZOC-DUZeZHou.js → stateDiagram-FKZM4ZOC-D0QXwVbV.js} +1 -1
  65. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-C3iyPGuZ.js +1 -0
  66. package/dist/client/assets/{timeline-definition-IT6M3QCI-DgsIAJxu.js → timeline-definition-IT6M3QCI-CUDKk5ha.js} +1 -1
  67. package/dist/client/assets/{treemap-GDKQZRPO-DzbbBVNz.js → treemap-GDKQZRPO-yUFqXQpQ.js} +1 -1
  68. package/dist/client/assets/{workspace._workspaceId-C2eftsxg.js → workspace._workspaceId-Bz0CuqC_.js} +1 -1
  69. package/dist/client/assets/{workspace._workspaceId-CX0zbe5I.js → workspace._workspaceId-DorcrnsD.js} +2 -2
  70. package/dist/client/assets/{xychartDiagram-PRI3JC2R-B11oaEXR.js → xychartDiagram-PRI3JC2R-Dju2LIYt.js} +1 -1
  71. package/dist/migrations/20260619184346_drop_tasks_max_turns/migration.sql +1 -0
  72. package/dist/migrations/20260619184346_drop_tasks_max_turns/snapshot.json +1157 -0
  73. package/dist/openapi.json +192 -48
  74. package/dist/server/assets/{DockviewBrowserContainer-BcfLe0jL.js → DockviewBrowserContainer-DaEHL7rU.js} +1 -1
  75. package/dist/server/assets/{DockviewTerminalContainer-zVckKR1x.js → DockviewTerminalContainer-QeRuw498.js} +3 -3
  76. package/dist/server/assets/{TerminalPanel-7JfdUecD.js → TerminalPanel-CIQVz_Z4.js} +1 -1
  77. package/dist/server/assets/{_basePickBy-3tZLkfZU.js → _basePickBy-Bgz-DXU9.js} +2 -2
  78. package/dist/server/assets/{_baseUniq-Dz_kdarY.js → _baseUniq-CevNURdU.js} +1 -1
  79. package/dist/server/assets/_tanstack-start-manifest_v-9Dn7fTyV.js +4 -0
  80. package/dist/server/assets/{arc-B7a2pVpn.js → arc-jD7cuYE0.js} +1 -1
  81. package/dist/server/assets/{architecture-7HQA4BMR-9XWqJEVf.js → architecture-7HQA4BMR-CH32HJV2.js} +6 -6
  82. package/dist/server/assets/{architectureDiagram-VXUJARFQ-Vt3dNClh.js → architectureDiagram-VXUJARFQ-DisnJPPo.js} +6 -6
  83. package/dist/server/assets/{blockDiagram-VD42YOAC-DR7gt_eL.js → blockDiagram-VD42YOAC-Djjy-jiv.js} +6 -6
  84. package/dist/server/assets/{c4Diagram-YG6GDRKO-DYC3sqOW.js → c4Diagram-YG6GDRKO-B12Oi-HH.js} +2 -2
  85. package/dist/server/assets/{channel-DzI1wGYl.js → channel-DFaIo-PG.js} +1 -1
  86. package/dist/server/assets/{chunk-4BX2VUAB-DVHBGPAd.js → chunk-4BX2VUAB-DHfsBptR.js} +1 -1
  87. package/dist/server/assets/{chunk-55IACEB6-BXeWT-V1.js → chunk-55IACEB6-jIjVbMix.js} +1 -1
  88. package/dist/server/assets/{chunk-B4BG7PRW-BngOdF6s.js → chunk-B4BG7PRW-CZ4z-SYy.js} +4 -4
  89. package/dist/server/assets/{chunk-DI55MBZ5-Co1ugmE2.js → chunk-DI55MBZ5-BAZeiYrT.js} +3 -3
  90. package/dist/server/assets/{chunk-FMBD7UC4-BSvY40K1.js → chunk-FMBD7UC4-CPlukapU.js} +1 -1
  91. package/dist/server/assets/{chunk-QN33PNHL-Bld2F-bV.js → chunk-QN33PNHL-BBEzEMyZ.js} +1 -1
  92. package/dist/server/assets/{chunk-QZHKN3VN-CbcRrDQ5.js → chunk-QZHKN3VN-BbJAuOLh.js} +1 -1
  93. package/dist/server/assets/{chunk-TZMSLE5B-FZqT6NRx.js → chunk-TZMSLE5B-DXQ0720e.js} +1 -1
  94. package/dist/server/assets/{classDiagram-v2-WZHVMYZB-CqTf3oAt.js → classDiagram-2ON5EDUG-Dd_NiCJt.js} +5 -5
  95. package/dist/server/assets/{classDiagram-2ON5EDUG-CqTf3oAt.js → classDiagram-v2-WZHVMYZB-Dd_NiCJt.js} +5 -5
  96. package/dist/server/assets/{clone-DFaP-n7G.js → clone-D2G5HtzD.js} +1 -1
  97. package/dist/server/assets/{cose-bilkent-S5V4N54A-Cm4DnyNk.js → cose-bilkent-S5V4N54A-D9MbA73U.js} +1 -1
  98. package/dist/server/assets/{dagre-6UL2VRFP-DWtR7ypz.js → dagre-6UL2VRFP-3X8TKKNF.js} +6 -6
  99. package/dist/server/assets/{diagram-PSM6KHXK-3K0tKsmi.js → diagram-PSM6KHXK-BifH8r_E.js} +7 -7
  100. package/dist/server/assets/{diagram-QEK2KX5R-C_GABXU2.js → diagram-QEK2KX5R-CpM2yo3A.js} +6 -6
  101. package/dist/server/assets/{diagram-S2PKOQOG-x_2H2okG.js → diagram-S2PKOQOG-Dem9oHxL.js} +6 -6
  102. package/dist/server/assets/{erDiagram-Q2GNP2WA-DYAuTF-e.js → erDiagram-Q2GNP2WA-Cv2t_qcc.js} +4 -4
  103. package/dist/server/assets/{flowDiagram-NV44I4VS-CMgKpatm.js → flowDiagram-NV44I4VS-DO9viNx6.js} +5 -5
  104. package/dist/server/assets/{ganttDiagram-JELNMOA3-BqUjIeN-.js → ganttDiagram-JELNMOA3-BQLkwHvs.js} +1 -1
  105. package/dist/server/assets/{gitGraph-G5XIXVHT-BOFl30qK.js → gitGraph-G5XIXVHT-Rf89GAs0.js} +6 -6
  106. package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-CSFtzM0S.js → gitGraphDiagram-V2S2FVAM-Cn1yq3PZ.js} +7 -7
  107. package/dist/server/assets/{graph-Da9wNyd4.js → graph-DdtTxequ.js} +2 -2
  108. package/dist/server/assets/{highlighted-body-B3W2YXNL-CSDiX8tu.js → highlighted-body-B3W2YXNL-DGIqRI0V.js} +1 -1
  109. package/dist/server/assets/{index-ZFp3vFxe.js → index-B7HiLzkZ.js} +3 -3
  110. package/dist/server/assets/{index-DwBbgNmR.js → index-Bd47fsM9.js} +5 -5
  111. package/dist/server/assets/{index-iQ9auLjI.js → index-C7aw98b-.js} +2 -2
  112. package/dist/server/assets/{index-CqNkm5pZ.js → index-CEu724dC.js} +2 -2
  113. package/dist/server/assets/{index-DkCUbYql.js → index-CN-GsVYc.js} +2 -2
  114. package/dist/server/assets/{index-CjJe7VSH.js → index-COXowzgf.js} +4 -4
  115. package/dist/server/assets/{index-CS2NcwnS.js → index-CSvLh_Yz.js} +2 -2
  116. package/dist/server/assets/{index-CrGR0Fcd.js → index-CVQ-l3zd.js} +2 -2
  117. package/dist/server/assets/{index-Av31QpwJ.js → index-CZSZYqEH.js} +2 -2
  118. package/dist/server/assets/{index-BXCk5sug.js → index-D0gkB7DS.js} +1 -1
  119. package/dist/server/assets/{index-BZPQn4AB.js → index-DF0W4io9.js} +3 -3
  120. package/dist/server/assets/{index-C-7KLTyL.js → index-DKFYHMSW.js} +2 -2
  121. package/dist/server/assets/{index-CFt-wi4p.js → index-IABw8d2w.js} +2 -2
  122. package/dist/server/assets/{index-DC0ng9YX.js → index-_XlsLUmp.js} +2 -2
  123. package/dist/server/assets/{index-B9YQ_ief.js → index-dA-FNez1.js} +5 -5
  124. package/dist/server/assets/{index-CFVkYUnG.js → index-eS7k7NKN.js} +2 -2
  125. package/dist/server/assets/{index-D9Pfuy6s.js → index-iwREUWd1.js} +2 -2
  126. package/dist/server/assets/{index-ki-c1Gyj.js → index-rDKMQzl_.js} +1 -1
  127. package/dist/server/assets/{info-VBDWY6EO-mGUaI27c.js → info-VBDWY6EO-DVBWXH0S.js} +6 -6
  128. package/dist/server/assets/{infoDiagram-HS3SLOUP-CMic1Hhh.js → infoDiagram-HS3SLOUP-Dn-PUlKq.js} +5 -5
  129. package/dist/server/assets/{journeyDiagram-XKPGCS4Q-CravZq_h.js → journeyDiagram-XKPGCS4Q-C1eLAzL9.js} +4 -4
  130. package/dist/server/assets/{kanban-definition-3W4ZIXB7-Ik9j3Xny.js → kanban-definition-3W4ZIXB7-DFHxxNcb.js} +2 -2
  131. package/dist/server/assets/{layout-DNctAx-v.js → layout-BEatsupl.js} +4 -4
  132. package/dist/server/assets/{mermaid-3ZIDBTTL-Bo2_mtnV.js → mermaid-3ZIDBTTL-8mt5O2g5.js} +1 -1
  133. package/dist/server/assets/{mermaid-parser.core-oaV6PZnA.js → mermaid-parser.core-BLOfHo-D.js} +11 -11
  134. package/dist/server/assets/{mindmap-definition-VGOIOE7T-DNTQXwUn.js → mindmap-definition-VGOIOE7T-B5_qScJU.js} +3 -3
  135. package/dist/server/assets/{packet-DYOGHKS2-Bm5PEDRe.js → packet-DYOGHKS2-DYeTXPnX.js} +6 -6
  136. package/dist/server/assets/{pie-VRWISCQL-BOs-4VKW.js → pie-VRWISCQL-BlyZBKB0.js} +6 -6
  137. package/dist/server/assets/{pieDiagram-ADFJNKIX-CEDLfCSy.js → pieDiagram-ADFJNKIX-CwWqz5Xf.js} +7 -7
  138. package/dist/server/assets/{quadrantDiagram-AYHSOK5B-CWfJcZnB.js → quadrantDiagram-AYHSOK5B-BZ8A8mON.js} +1 -1
  139. package/dist/server/assets/{radar-ZZBFDIW7-CMUO9a2O.js → radar-ZZBFDIW7-B60czbOE.js} +6 -6
  140. package/dist/server/assets/{requirementDiagram-UZGBJVZJ-0SINZ3cV.js → requirementDiagram-UZGBJVZJ-Cctcn3D4.js} +3 -3
  141. package/dist/server/assets/{router-PewB2VMR.js → router-V4X9DgJt.js} +2024 -313
  142. package/dist/server/assets/{sankeyDiagram-TZEHDZUN-U0rb6LX8.js → sankeyDiagram-TZEHDZUN-Bvyi-a8d.js} +1 -1
  143. package/dist/server/assets/{sequenceDiagram-WL72ISMW-BV5_vSVf.js → sequenceDiagram-WL72ISMW-C83rLE-r.js} +3 -3
  144. package/dist/server/assets/{square-terminal-DdT3sDE4.js → square-terminal-Dcy5Z6a4.js} +1 -1
  145. package/dist/server/assets/{stateDiagram-FKZM4ZOC-C3wAlRbY.js → stateDiagram-FKZM4ZOC-lfXNq0DS.js} +8 -8
  146. package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-BvzsTmR_.js → stateDiagram-v2-4FDKWEC3-BkZqIjkI.js} +4 -4
  147. package/dist/server/assets/{timeline-definition-IT6M3QCI-BwVTrWyj.js → timeline-definition-IT6M3QCI-CejT7_79.js} +2 -2
  148. package/dist/server/assets/{treemap-GDKQZRPO-Bohb153V.js → treemap-GDKQZRPO-Dvu1YI6l.js} +6 -6
  149. package/dist/server/assets/{workspace._workspaceId-BWs5oKO5.js → workspace._workspaceId-BpnCyMIU.js} +3 -3
  150. package/dist/server/assets/{workspace._workspaceId-DkyiAy0e.js → workspace._workspaceId-D20Q15rI.js} +1 -1
  151. package/dist/server/assets/{xychartDiagram-PRI3JC2R-XlYGoU4Z.js → xychartDiagram-PRI3JC2R-DmHHkA_A.js} +1 -1
  152. package/dist/server/server.js +2 -2
  153. package/dist/start-server.mjs +1583 -802
  154. package/package.json +5 -4
  155. package/dist/client/assets/channel-NIcS3uxn.js +0 -1
  156. package/dist/client/assets/classDiagram-2ON5EDUG-8p3oACYV.js +0 -1
  157. package/dist/client/assets/classDiagram-v2-WZHVMYZB-8p3oACYV.js +0 -1
  158. package/dist/client/assets/clone-Be31g1pc.js +0 -1
  159. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-nq3cGsuB.js +0 -1
  160. package/dist/server/assets/_tanstack-start-manifest_v-BBzH3QaA.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
  }
@@ -14966,12 +14973,22 @@ function ContextMenuPortal({ ...props }) {
14966
14973
  }
14967
14974
  function ContextMenuContent({
14968
14975
  className,
14976
+ onPointerDownCapture,
14977
+ onPointerUpCapture,
14969
14978
  ...props
14970
14979
  }) {
14971
14980
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Portal2$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
14972
14981
  Content2$4,
14973
14982
  {
14974
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
+ },
14975
14992
  className: cn$2(
14976
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",
14977
14994
  className
@@ -40651,53 +40668,53 @@ async function loadLanguage(lang) {
40651
40668
  try {
40652
40669
  switch (lang) {
40653
40670
  case "javascript":
40654
- return import("./index-Av31QpwJ.js").then((m2) => m2.javascript());
40671
+ return import("./index-CZSZYqEH.js").then((m2) => m2.javascript());
40655
40672
  case "jsx":
40656
- return import("./index-Av31QpwJ.js").then((m2) => m2.javascript({ jsx: true }));
40673
+ return import("./index-CZSZYqEH.js").then((m2) => m2.javascript({ jsx: true }));
40657
40674
  case "typescript":
40658
- return import("./index-Av31QpwJ.js").then(
40675
+ return import("./index-CZSZYqEH.js").then(
40659
40676
  (m2) => m2.javascript({ typescript: true })
40660
40677
  );
40661
40678
  case "tsx":
40662
- return import("./index-Av31QpwJ.js").then(
40679
+ return import("./index-CZSZYqEH.js").then(
40663
40680
  (m2) => m2.javascript({ jsx: true, typescript: true })
40664
40681
  );
40665
40682
  case "python":
40666
- return import("./index-DkCUbYql.js").then((m2) => m2.python());
40683
+ return import("./index-CN-GsVYc.js").then((m2) => m2.python());
40667
40684
  case "html":
40668
- return import("./index-CjJe7VSH.js").then((m2) => m2.html());
40685
+ return import("./index-COXowzgf.js").then((m2) => m2.html());
40669
40686
  case "css":
40670
- return import("./index-CFt-wi4p.js").then((m2) => m2.css());
40687
+ return import("./index-IABw8d2w.js").then((m2) => m2.css());
40671
40688
  case "scss":
40672
40689
  case "sass":
40673
- return import("./index-BZPQn4AB.js").then((m2) => m2.sass());
40690
+ return import("./index-DF0W4io9.js").then((m2) => m2.sass());
40674
40691
  case "less":
40675
- return import("./index-ZFp3vFxe.js").then((m2) => m2.less());
40692
+ return import("./index-B7HiLzkZ.js").then((m2) => m2.less());
40676
40693
  case "json":
40677
40694
  case "jsonc":
40678
- return import("./index-DC0ng9YX.js").then((m2) => m2.json());
40695
+ return import("./index-_XlsLUmp.js").then((m2) => m2.json());
40679
40696
  case "markdown":
40680
40697
  case "mdx":
40681
- return import("./index-DwBbgNmR.js").then((m2) => m2.markdown());
40698
+ return import("./index-Bd47fsM9.js").then((m2) => m2.markdown());
40682
40699
  case "xml":
40683
- return import("./index-D9Pfuy6s.js").then((m2) => m2.xml());
40700
+ return import("./index-iwREUWd1.js").then((m2) => m2.xml());
40684
40701
  case "yaml":
40685
- return import("./index-iQ9auLjI.js").then((m2) => m2.yaml());
40702
+ return import("./index-C7aw98b-.js").then((m2) => m2.yaml());
40686
40703
  case "sql":
40687
- return import("./index-C-7KLTyL.js").then((m2) => m2.sql());
40704
+ return import("./index-DKFYHMSW.js").then((m2) => m2.sql());
40688
40705
  case "rust":
40689
- return import("./index-CqNkm5pZ.js").then((m2) => m2.rust());
40706
+ return import("./index-CEu724dC.js").then((m2) => m2.rust());
40690
40707
  case "go":
40691
- return import("./index-CS2NcwnS.js").then((m2) => m2.go());
40708
+ return import("./index-CSvLh_Yz.js").then((m2) => m2.go());
40692
40709
  case "java":
40693
- return import("./index-CrGR0Fcd.js").then((m2) => m2.java());
40710
+ return import("./index-CVQ-l3zd.js").then((m2) => m2.java());
40694
40711
  case "kotlin":
40695
- return import("./index-CrGR0Fcd.js").then((m2) => m2.java());
40712
+ return import("./index-CVQ-l3zd.js").then((m2) => m2.java());
40696
40713
  case "c":
40697
40714
  case "cpp":
40698
- return import("./index-CFVkYUnG.js").then((m2) => m2.cpp());
40715
+ return import("./index-eS7k7NKN.js").then((m2) => m2.cpp());
40699
40716
  case "php":
40700
- return import("./index-B9YQ_ief.js").then((m2) => m2.php());
40717
+ return import("./index-dA-FNez1.js").then((m2) => m2.php());
40701
40718
  // Legacy modes via StreamLanguage
40702
40719
  case "bash":
40703
40720
  case "fish":
@@ -42429,10 +42446,10 @@ function getOwnerDocument(target) {
42429
42446
  }
42430
42447
  return document;
42431
42448
  }
42432
- const useIsomorphicLayoutEffect$2 = canUseDOM$1 ? reactExports.useLayoutEffect : reactExports.useEffect;
42449
+ const useIsomorphicLayoutEffect$3 = canUseDOM$1 ? reactExports.useLayoutEffect : reactExports.useEffect;
42433
42450
  function useEvent(handler) {
42434
42451
  const handlerRef = reactExports.useRef(handler);
42435
- useIsomorphicLayoutEffect$2(() => {
42452
+ useIsomorphicLayoutEffect$3(() => {
42436
42453
  handlerRef.current = handler;
42437
42454
  });
42438
42455
  return reactExports.useCallback(function() {
@@ -42460,7 +42477,7 @@ function useLatestValue(value, dependencies) {
42460
42477
  dependencies = [value];
42461
42478
  }
42462
42479
  const valueRef = reactExports.useRef(value);
42463
- useIsomorphicLayoutEffect$2(() => {
42480
+ useIsomorphicLayoutEffect$3(() => {
42464
42481
  if (valueRef.current !== value) {
42465
42482
  valueRef.current = value;
42466
42483
  }
@@ -44438,7 +44455,7 @@ function useRect(element2, measure, fallbackRect2) {
44438
44455
  const resizeObserver = useResizeObserver({
44439
44456
  callback: measureRect
44440
44457
  });
44441
- useIsomorphicLayoutEffect$2(() => {
44458
+ useIsomorphicLayoutEffect$3(() => {
44442
44459
  measureRect();
44443
44460
  if (element2) {
44444
44461
  resizeObserver == null ? void 0 : resizeObserver.observe(element2);
@@ -44612,7 +44629,7 @@ function useRects(elements, measure) {
44612
44629
  const resizeObserver = useResizeObserver({
44613
44630
  callback: measureRects
44614
44631
  });
44615
- useIsomorphicLayoutEffect$2(() => {
44632
+ useIsomorphicLayoutEffect$3(() => {
44616
44633
  resizeObserver == null ? void 0 : resizeObserver.disconnect();
44617
44634
  measureRects();
44618
44635
  elements.forEach((element2) => resizeObserver == null ? void 0 : resizeObserver.observe(element2));
@@ -44974,7 +44991,7 @@ function useLayoutShiftScrollCompensation(_ref2) {
44974
44991
  x: config2,
44975
44992
  y: config2
44976
44993
  } : config2;
44977
- useIsomorphicLayoutEffect$2(() => {
44994
+ useIsomorphicLayoutEffect$3(() => {
44978
44995
  const disabled = !x2 && !y4;
44979
44996
  if (disabled || !activeNode) {
44980
44997
  initialized.current = false;
@@ -45335,7 +45352,7 @@ const DndContext = /* @__PURE__ */ reactExports.memo(function DndContext2(_ref2)
45335
45352
  }, [draggableNodes, instantiateSensor]);
45336
45353
  const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);
45337
45354
  useSensorSetup(sensors);
45338
- useIsomorphicLayoutEffect$2(() => {
45355
+ useIsomorphicLayoutEffect$3(() => {
45339
45356
  if (activeNodeRect && status === Status.Initializing) {
45340
45357
  setStatus(Status.Initialized);
45341
45358
  }
@@ -45419,7 +45436,7 @@ const DndContext = /* @__PURE__ */ reactExports.memo(function DndContext2(_ref2)
45419
45436
  // eslint-disable-next-line react-hooks/exhaustive-deps
45420
45437
  [overId]
45421
45438
  );
45422
- useIsomorphicLayoutEffect$2(() => {
45439
+ useIsomorphicLayoutEffect$3(() => {
45423
45440
  sensorContext.current = {
45424
45441
  activatorEvent,
45425
45442
  active,
@@ -45546,7 +45563,7 @@ function useDraggable(_ref2) {
45546
45563
  const [activatorNode, setActivatorNodeRef] = useNodeRef();
45547
45564
  const listeners2 = useSyntheticListeners(activators, id28);
45548
45565
  const dataRef = useLatestValue(data);
45549
- useIsomorphicLayoutEffect$2(
45566
+ useIsomorphicLayoutEffect$3(
45550
45567
  () => {
45551
45568
  draggableNodes.set(id28, {
45552
45569
  id: id28,
@@ -45719,7 +45736,7 @@ function AnimationManager(_ref2) {
45719
45736
  if (!children2 && !clonedChildren && previousChildren) {
45720
45737
  setClonedChildren(previousChildren);
45721
45738
  }
45722
- useIsomorphicLayoutEffect$2(() => {
45739
+ useIsomorphicLayoutEffect$3(() => {
45723
45740
  if (!element2) {
45724
45741
  return;
45725
45742
  }
@@ -46219,7 +46236,7 @@ function SortableContext(_ref2) {
46219
46236
  const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);
46220
46237
  const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;
46221
46238
  const disabled = normalizeDisabled(disabledProp);
46222
- useIsomorphicLayoutEffect$2(() => {
46239
+ useIsomorphicLayoutEffect$3(() => {
46223
46240
  if (itemsHaveChanged && isDragging) {
46224
46241
  measureDroppableContainers(items);
46225
46242
  }
@@ -46300,7 +46317,7 @@ function useDerivedTransform(_ref2) {
46300
46317
  } = _ref2;
46301
46318
  const [derivedTransform, setDerivedtransform] = reactExports.useState(null);
46302
46319
  const previousIndex = reactExports.useRef(index2);
46303
- useIsomorphicLayoutEffect$2(() => {
46320
+ useIsomorphicLayoutEffect$3(() => {
46304
46321
  if (!disabled && index2 !== previousIndex.current && node2.current) {
46305
46322
  const initial = rect2.current;
46306
46323
  if (initial) {
@@ -46881,7 +46898,7 @@ const WorkspaceCard = reactExports.memo(function WorkspaceCard2({
46881
46898
  };
46882
46899
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
46883
46900
  /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ...containerProps, children: [
46884
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { children: [
46901
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { delayDuration: 800, children: [
46885
46902
  /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 min-w-0 overflow-hidden", children: [
46886
46903
  /* @__PURE__ */ jsxRuntimeExports.jsx(AgentStatusIndicator, { agent: status?.agent, isActive }),
46887
46904
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -46892,7 +46909,7 @@ const WorkspaceCard = reactExports.memo(function WorkspaceCard2({
46892
46909
  }
46893
46910
  )
46894
46911
  ] }) }),
46895
- /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "top", children: showProjectName ? worktree.path : worktree.branch })
46912
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "right", children: `${projectName}/${worktree.branch}` })
46896
46913
  ] }),
46897
46914
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "hidden @[10rem]:flex group-hover:flex items-center gap-2 shrink-0 ml-auto pl-2", children: [
46898
46915
  /* @__PURE__ */ jsxRuntimeExports.jsx(SetupStatusIndicator, { setup: setupStatus }),
@@ -46999,6 +47016,7 @@ function SortableProject({
46999
47016
  "div",
47000
47017
  {
47001
47018
  className: headerClassName,
47019
+ "data-testid": `project-list__project-header--${project.name}`,
47002
47020
  onClick: () => isPlain ? handlePlainOpen() : onToggleCollapse(project.name),
47003
47021
  children: [
47004
47022
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -47036,7 +47054,7 @@ function SortableProject({
47036
47054
  children: project.name
47037
47055
  }
47038
47056
  ) }),
47039
- /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "top", children: project.name })
47057
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "right", children: project.name })
47040
47058
  ] })
47041
47059
  ]
47042
47060
  }
@@ -47061,10 +47079,17 @@ function SortableProject({
47061
47079
  }
47062
47080
  ) }),
47063
47081
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
47064
- !isPlain && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => onToggleCollapse(project.name), children: [
47065
- /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: collapsed ? "" : "rotate-90" }),
47066
- collapsed ? "Expand" : "Collapse"
47067
- ] }),
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
+ ),
47068
47093
  labels.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuSub, { children: [
47069
47094
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuSubTrigger, { children: [
47070
47095
  /* @__PURE__ */ jsxRuntimeExports.jsx(Tag$1, { className: "size-4 mr-2" }),
@@ -47735,6 +47760,7 @@ const KNOWN_AGENTS = [
47735
47760
  { id: "opencode", type: "opencode", label: "OpenCode", defaultCommand: "opencode" }
47736
47761
  ];
47737
47762
  const MODEL_DEFAULT_SENTINEL = "__band_default__";
47763
+ const ID_DELIMITER = "";
47738
47764
  function formatCtxWindow$1(n2) {
47739
47765
  if (n2 >= 1e6) {
47740
47766
  const m2 = n2 / 1e6;
@@ -47743,6 +47769,18 @@ function formatCtxWindow$1(n2) {
47743
47769
  if (n2 >= 1e3) return `${Math.round(n2 / 1e3)}k`;
47744
47770
  return String(n2);
47745
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
+ }
47746
47784
  function SettingsPage({ open: open2, onOpenChange }) {
47747
47785
  const { settings } = useSettingsQuery();
47748
47786
  const updateSettingsMutation = useUpdateSettings();
@@ -47787,15 +47825,96 @@ function SettingsPage({ open: open2, onOpenChange }) {
47787
47825
  const [agentModels, setAgentModels] = reactExports.useState({});
47788
47826
  const [contextMeterEnabled, setContextMeterEnabled] = useExperimentalContextMeter();
47789
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
+ );
47790
47848
  reactExports.useEffect(() => {
47791
- if (!adapter2.listModels) return;
47792
- for (const agent of codingAgents) {
47793
- adapter2.listModels(agent.id).then((models) => {
47794
- 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
+ }
47795
47874
  }).catch(() => {
47796
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
+ }
47797
47884
  }
47798
- }, [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
+ );
47799
47918
  const isDirty = reactExports.useMemo(() => {
47800
47919
  if (worktreesDir !== (settings.worktreesDir ?? "")) return true;
47801
47920
  if (JSON.stringify(codingAgents) !== JSON.stringify(Array.isArray(settings.codingAgents) ? settings.codingAgents : []))
@@ -48224,7 +48343,11 @@ function SettingsPage({ open: open2, onOpenChange }) {
48224
48343
  /* @__PURE__ */ jsxRuntimeExports.jsx(Accordion, { type: "multiple", className: "w-full", children: KNOWN_AGENTS.map((known) => {
48225
48344
  const agent = codingAgents.find((a2) => a2.type === known.type);
48226
48345
  const enabled = !!agent;
48227
- 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;
48228
48351
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
48229
48352
  AccordionItem,
48230
48353
  {
@@ -48300,7 +48423,70 @@ function SettingsPage({ open: open2, onOpenChange }) {
48300
48423
  }
48301
48424
  )
48302
48425
  ] }),
48303
- 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: [
48304
48490
  /* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-xs text-muted-foreground", children: "Default model" }),
48305
48491
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
48306
48492
  Select,
@@ -63048,13 +63234,13 @@ const noop$5 = () => {
63048
63234
  const freezeIfAvailable = (obj) => {
63049
63235
  if (Object.freeze) Object.freeze(obj);
63050
63236
  };
63051
- function createInnerProxy(callback, path2, memo) {
63237
+ function createInnerProxy(callback, path2, memo2) {
63052
63238
  var _memo$cacheKey;
63053
63239
  const cacheKey = path2.join(".");
63054
- (_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, {
63055
63241
  get(_obj, key2) {
63056
63242
  if (typeof key2 !== "string" || key2 === "then") return void 0;
63057
- return createInnerProxy(callback, [...path2, key2], memo);
63243
+ return createInnerProxy(callback, [...path2, key2], memo2);
63058
63244
  },
63059
63245
  apply(_1, _2, args) {
63060
63246
  const lastOfPath = path2[path2.length - 1];
@@ -63075,7 +63261,7 @@ function createInnerProxy(callback, path2, memo) {
63075
63261
  return callback(opts);
63076
63262
  }
63077
63263
  }));
63078
- return memo[cacheKey];
63264
+ return memo2[cacheKey];
63079
63265
  }
63080
63266
  const createRecursiveProxy = (callback) => createInnerProxy(callback, [], emptyObject());
63081
63267
  const createFlatProxy = (callback) => {
@@ -64547,7 +64733,15 @@ class WebDashboardAdapter {
64547
64733
  }
64548
64734
  async listModels(agentId) {
64549
64735
  const data = await this.trpc.models.list.query({ agentId });
64550
- 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;
64551
64745
  }
64552
64746
  statusHandlers = /* @__PURE__ */ new Set();
64553
64747
  statusSubscription = null;
@@ -80430,6 +80624,18 @@ function applyMaximizedGroupToApi(api, desired) {
80430
80624
  if (next2.api.isMaximized()) return;
80431
80625
  next2.api.maximize();
80432
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
+ }
80433
80639
  const EDGE_GROUP_IDS$1 = {
80434
80640
  left: "edge-left",
80435
80641
  right: "edge-right",
@@ -108750,7 +108956,7 @@ var tn = f$5("block", "before:content-[counter(line)]", "before:inline-block", "
108750
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 });
108751
108957
  var Se$1 = reactExports.createContext({ code: "" }), de$2 = () => reactExports.useContext(Se$1);
108752
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 }) });
108753
- var cn = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-CSDiX8tu.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 }) => {
108754
108960
  let i2 = reactExports.useMemo(() => e3.replace(cn, ""), [e3]), c2 = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i2.split(`
108755
108961
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i2]);
108756
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 }) })] }) });
@@ -109072,7 +109278,7 @@ var Dt = ({ children: e3, className: t2, onDownload: o3, onError: n2 }) => {
109072
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] });
109073
109279
  };
109074
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 }) })] });
109075
- var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-Bo2_mtnV.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]+)/;
109076
109282
  function ke$1(e3, t2) {
109077
109283
  if (!(e3 != null && e3.position || t2 != null && t2.position)) return true;
109078
109284
  if (!(e3 != null && e3.position && (t2 != null && t2.position))) return false;
@@ -161243,12 +161449,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
161243
161449
  registerLayoutLoaders([
161244
161450
  {
161245
161451
  name: "dagre",
161246
- loader: /* @__PURE__ */ __name(async () => await import("./dagre-6UL2VRFP-DWtR7ypz.js"), "loader")
161452
+ loader: /* @__PURE__ */ __name(async () => await import("./dagre-6UL2VRFP-3X8TKKNF.js"), "loader")
161247
161453
  },
161248
161454
  ...[
161249
161455
  {
161250
161456
  name: "cose-bilkent",
161251
- loader: /* @__PURE__ */ __name(async () => await import("./cose-bilkent-S5V4N54A-Cm4DnyNk.js"), "loader")
161457
+ loader: /* @__PURE__ */ __name(async () => await import("./cose-bilkent-S5V4N54A-D9MbA73U.js"), "loader")
161252
161458
  }
161253
161459
  ]
161254
161460
  ]);
@@ -161687,7 +161893,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
161687
161893
  return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt);
161688
161894
  }, "detector");
161689
161895
  var loader = /* @__PURE__ */ __name(async () => {
161690
- const { diagram: diagram2 } = await import("./c4Diagram-YG6GDRKO-DYC3sqOW.js");
161896
+ const { diagram: diagram2 } = await import("./c4Diagram-YG6GDRKO-B12Oi-HH.js");
161691
161897
  return { id, diagram: diagram2 };
161692
161898
  }, "loader");
161693
161899
  var plugin = {
@@ -161704,7 +161910,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
161704
161910
  return /^\s*graph/.test(txt);
161705
161911
  }, "detector");
161706
161912
  var loader2 = /* @__PURE__ */ __name(async () => {
161707
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-CMgKpatm.js");
161913
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DO9viNx6.js");
161708
161914
  return { id: id2, diagram: diagram2 };
161709
161915
  }, "loader");
161710
161916
  var plugin2 = {
@@ -161727,7 +161933,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
161727
161933
  return /^\s*flowchart/.test(txt);
161728
161934
  }, "detector");
161729
161935
  var loader3 = /* @__PURE__ */ __name(async () => {
161730
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-CMgKpatm.js");
161936
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DO9viNx6.js");
161731
161937
  return { id: id3, diagram: diagram2 };
161732
161938
  }, "loader");
161733
161939
  var plugin3 = {
@@ -161741,7 +161947,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
161741
161947
  return /^\s*erDiagram/.test(txt);
161742
161948
  }, "detector");
161743
161949
  var loader4 = /* @__PURE__ */ __name(async () => {
161744
- const { diagram: diagram2 } = await import("./erDiagram-Q2GNP2WA-DYAuTF-e.js");
161950
+ const { diagram: diagram2 } = await import("./erDiagram-Q2GNP2WA-Cv2t_qcc.js");
161745
161951
  return { id: id4, diagram: diagram2 };
161746
161952
  }, "loader");
161747
161953
  var plugin4 = {
@@ -161755,7 +161961,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
161755
161961
  return /^\s*gitGraph/.test(txt);
161756
161962
  }, "detector");
161757
161963
  var loader5 = /* @__PURE__ */ __name(async () => {
161758
- const { diagram: diagram2 } = await import("./gitGraphDiagram-V2S2FVAM-CSFtzM0S.js");
161964
+ const { diagram: diagram2 } = await import("./gitGraphDiagram-V2S2FVAM-Cn1yq3PZ.js");
161759
161965
  return { id: id5, diagram: diagram2 };
161760
161966
  }, "loader");
161761
161967
  var plugin5 = {
@@ -161769,7 +161975,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
161769
161975
  return /^\s*gantt/.test(txt);
161770
161976
  }, "detector");
161771
161977
  var loader6 = /* @__PURE__ */ __name(async () => {
161772
- const { diagram: diagram2 } = await import("./ganttDiagram-JELNMOA3-BqUjIeN-.js");
161978
+ const { diagram: diagram2 } = await import("./ganttDiagram-JELNMOA3-BQLkwHvs.js");
161773
161979
  return { id: id6, diagram: diagram2 };
161774
161980
  }, "loader");
161775
161981
  var plugin6 = {
@@ -161783,7 +161989,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
161783
161989
  return /^\s*info/.test(txt);
161784
161990
  }, "detector");
161785
161991
  var loader7 = /* @__PURE__ */ __name(async () => {
161786
- const { diagram: diagram2 } = await import("./infoDiagram-HS3SLOUP-CMic1Hhh.js");
161992
+ const { diagram: diagram2 } = await import("./infoDiagram-HS3SLOUP-Dn-PUlKq.js");
161787
161993
  return { id: id7, diagram: diagram2 };
161788
161994
  }, "loader");
161789
161995
  var info = {
@@ -161796,7 +162002,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
161796
162002
  return /^\s*pie/.test(txt);
161797
162003
  }, "detector");
161798
162004
  var loader8 = /* @__PURE__ */ __name(async () => {
161799
- const { diagram: diagram2 } = await import("./pieDiagram-ADFJNKIX-CEDLfCSy.js");
162005
+ const { diagram: diagram2 } = await import("./pieDiagram-ADFJNKIX-CwWqz5Xf.js");
161800
162006
  return { id: id8, diagram: diagram2 };
161801
162007
  }, "loader");
161802
162008
  var pie = {
@@ -161809,7 +162015,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
161809
162015
  return /^\s*quadrantChart/.test(txt);
161810
162016
  }, "detector");
161811
162017
  var loader9 = /* @__PURE__ */ __name(async () => {
161812
- const { diagram: diagram2 } = await import("./quadrantDiagram-AYHSOK5B-CWfJcZnB.js");
162018
+ const { diagram: diagram2 } = await import("./quadrantDiagram-AYHSOK5B-BZ8A8mON.js");
161813
162019
  return { id: id9, diagram: diagram2 };
161814
162020
  }, "loader");
161815
162021
  var plugin7 = {
@@ -161823,7 +162029,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
161823
162029
  return /^\s*xychart(-beta)?/.test(txt);
161824
162030
  }, "detector");
161825
162031
  var loader10 = /* @__PURE__ */ __name(async () => {
161826
- const { diagram: diagram2 } = await import("./xychartDiagram-PRI3JC2R-XlYGoU4Z.js");
162032
+ const { diagram: diagram2 } = await import("./xychartDiagram-PRI3JC2R-DmHHkA_A.js");
161827
162033
  return { id: id10, diagram: diagram2 };
161828
162034
  }, "loader");
161829
162035
  var plugin8 = {
@@ -161837,7 +162043,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
161837
162043
  return /^\s*requirement(Diagram)?/.test(txt);
161838
162044
  }, "detector");
161839
162045
  var loader11 = /* @__PURE__ */ __name(async () => {
161840
- const { diagram: diagram2 } = await import("./requirementDiagram-UZGBJVZJ-0SINZ3cV.js");
162046
+ const { diagram: diagram2 } = await import("./requirementDiagram-UZGBJVZJ-Cctcn3D4.js");
161841
162047
  return { id: id11, diagram: diagram2 };
161842
162048
  }, "loader");
161843
162049
  var plugin9 = {
@@ -161851,7 +162057,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
161851
162057
  return /^\s*sequenceDiagram/.test(txt);
161852
162058
  }, "detector");
161853
162059
  var loader12 = /* @__PURE__ */ __name(async () => {
161854
- const { diagram: diagram2 } = await import("./sequenceDiagram-WL72ISMW-BV5_vSVf.js");
162060
+ const { diagram: diagram2 } = await import("./sequenceDiagram-WL72ISMW-C83rLE-r.js");
161855
162061
  return { id: id12, diagram: diagram2 };
161856
162062
  }, "loader");
161857
162063
  var plugin10 = {
@@ -161868,7 +162074,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
161868
162074
  return /^\s*classDiagram/.test(txt);
161869
162075
  }, "detector");
161870
162076
  var loader13 = /* @__PURE__ */ __name(async () => {
161871
- const { diagram: diagram2 } = await import("./classDiagram-2ON5EDUG-CqTf3oAt.js");
162077
+ const { diagram: diagram2 } = await import("./classDiagram-2ON5EDUG-Dd_NiCJt.js");
161872
162078
  return { id: id13, diagram: diagram2 };
161873
162079
  }, "loader");
161874
162080
  var plugin11 = {
@@ -161885,7 +162091,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
161885
162091
  return /^\s*classDiagram-v2/.test(txt);
161886
162092
  }, "detector");
161887
162093
  var loader14 = /* @__PURE__ */ __name(async () => {
161888
- const { diagram: diagram2 } = await import("./classDiagram-v2-WZHVMYZB-CqTf3oAt.js");
162094
+ const { diagram: diagram2 } = await import("./classDiagram-v2-WZHVMYZB-Dd_NiCJt.js");
161889
162095
  return { id: id14, diagram: diagram2 };
161890
162096
  }, "loader");
161891
162097
  var plugin12 = {
@@ -161902,7 +162108,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
161902
162108
  return /^\s*stateDiagram/.test(txt);
161903
162109
  }, "detector");
161904
162110
  var loader15 = /* @__PURE__ */ __name(async () => {
161905
- const { diagram: diagram2 } = await import("./stateDiagram-FKZM4ZOC-C3wAlRbY.js");
162111
+ const { diagram: diagram2 } = await import("./stateDiagram-FKZM4ZOC-lfXNq0DS.js");
161906
162112
  return { id: id15, diagram: diagram2 };
161907
162113
  }, "loader");
161908
162114
  var plugin13 = {
@@ -161922,7 +162128,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
161922
162128
  return false;
161923
162129
  }, "detector");
161924
162130
  var loader16 = /* @__PURE__ */ __name(async () => {
161925
- const { diagram: diagram2 } = await import("./stateDiagram-v2-4FDKWEC3-BvzsTmR_.js");
162131
+ const { diagram: diagram2 } = await import("./stateDiagram-v2-4FDKWEC3-BkZqIjkI.js");
161926
162132
  return { id: id16, diagram: diagram2 };
161927
162133
  }, "loader");
161928
162134
  var plugin14 = {
@@ -161936,7 +162142,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
161936
162142
  return /^\s*journey/.test(txt);
161937
162143
  }, "detector");
161938
162144
  var loader17 = /* @__PURE__ */ __name(async () => {
161939
- const { diagram: diagram2 } = await import("./journeyDiagram-XKPGCS4Q-CravZq_h.js");
162145
+ const { diagram: diagram2 } = await import("./journeyDiagram-XKPGCS4Q-C1eLAzL9.js");
161940
162146
  return { id: id17, diagram: diagram2 };
161941
162147
  }, "loader");
161942
162148
  var plugin15 = {
@@ -162003,7 +162209,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
162003
162209
  return false;
162004
162210
  }, "detector");
162005
162211
  var loader18 = /* @__PURE__ */ __name(async () => {
162006
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-CMgKpatm.js");
162212
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DO9viNx6.js");
162007
162213
  return { id: id18, diagram: diagram2 };
162008
162214
  }, "loader");
162009
162215
  var plugin16 = {
@@ -162017,7 +162223,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
162017
162223
  return /^\s*timeline/.test(txt);
162018
162224
  }, "detector");
162019
162225
  var loader19 = /* @__PURE__ */ __name(async () => {
162020
- const { diagram: diagram2 } = await import("./timeline-definition-IT6M3QCI-BwVTrWyj.js");
162226
+ const { diagram: diagram2 } = await import("./timeline-definition-IT6M3QCI-CejT7_79.js");
162021
162227
  return { id: id19, diagram: diagram2 };
162022
162228
  }, "loader");
162023
162229
  var plugin17 = {
@@ -162031,7 +162237,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
162031
162237
  return /^\s*mindmap/.test(txt);
162032
162238
  }, "detector");
162033
162239
  var loader20 = /* @__PURE__ */ __name(async () => {
162034
- const { diagram: diagram2 } = await import("./mindmap-definition-VGOIOE7T-DNTQXwUn.js");
162240
+ const { diagram: diagram2 } = await import("./mindmap-definition-VGOIOE7T-B5_qScJU.js");
162035
162241
  return { id: id20, diagram: diagram2 };
162036
162242
  }, "loader");
162037
162243
  var plugin18 = {
@@ -162045,7 +162251,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
162045
162251
  return /^\s*kanban/.test(txt);
162046
162252
  }, "detector");
162047
162253
  var loader21 = /* @__PURE__ */ __name(async () => {
162048
- const { diagram: diagram2 } = await import("./kanban-definition-3W4ZIXB7-Ik9j3Xny.js");
162254
+ const { diagram: diagram2 } = await import("./kanban-definition-3W4ZIXB7-DFHxxNcb.js");
162049
162255
  return { id: id21, diagram: diagram2 };
162050
162256
  }, "loader");
162051
162257
  var plugin19 = {
@@ -162059,7 +162265,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
162059
162265
  return /^\s*sankey(-beta)?/.test(txt);
162060
162266
  }, "detector");
162061
162267
  var loader22 = /* @__PURE__ */ __name(async () => {
162062
- const { diagram: diagram2 } = await import("./sankeyDiagram-TZEHDZUN-U0rb6LX8.js");
162268
+ const { diagram: diagram2 } = await import("./sankeyDiagram-TZEHDZUN-Bvyi-a8d.js");
162063
162269
  return { id: id22, diagram: diagram2 };
162064
162270
  }, "loader");
162065
162271
  var plugin20 = {
@@ -162073,7 +162279,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
162073
162279
  return /^\s*packet(-beta)?/.test(txt);
162074
162280
  }, "detector");
162075
162281
  var loader23 = /* @__PURE__ */ __name(async () => {
162076
- const { diagram: diagram2 } = await import("./diagram-S2PKOQOG-x_2H2okG.js");
162282
+ const { diagram: diagram2 } = await import("./diagram-S2PKOQOG-Dem9oHxL.js");
162077
162283
  return { id: id23, diagram: diagram2 };
162078
162284
  }, "loader");
162079
162285
  var packet = {
@@ -162086,7 +162292,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
162086
162292
  return /^\s*radar-beta/.test(txt);
162087
162293
  }, "detector");
162088
162294
  var loader24 = /* @__PURE__ */ __name(async () => {
162089
- const { diagram: diagram2 } = await import("./diagram-QEK2KX5R-C_GABXU2.js");
162295
+ const { diagram: diagram2 } = await import("./diagram-QEK2KX5R-CpM2yo3A.js");
162090
162296
  return { id: id24, diagram: diagram2 };
162091
162297
  }, "loader");
162092
162298
  var radar = {
@@ -162099,7 +162305,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
162099
162305
  return /^\s*block(-beta)?/.test(txt);
162100
162306
  }, "detector");
162101
162307
  var loader25 = /* @__PURE__ */ __name(async () => {
162102
- const { diagram: diagram2 } = await import("./blockDiagram-VD42YOAC-DR7gt_eL.js");
162308
+ const { diagram: diagram2 } = await import("./blockDiagram-VD42YOAC-Djjy-jiv.js");
162103
162309
  return { id: id25, diagram: diagram2 };
162104
162310
  }, "loader");
162105
162311
  var plugin21 = {
@@ -162113,7 +162319,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
162113
162319
  return /^\s*architecture/.test(txt);
162114
162320
  }, "detector");
162115
162321
  var loader26 = /* @__PURE__ */ __name(async () => {
162116
- const { diagram: diagram2 } = await import("./architectureDiagram-VXUJARFQ-Vt3dNClh.js");
162322
+ const { diagram: diagram2 } = await import("./architectureDiagram-VXUJARFQ-DisnJPPo.js");
162117
162323
  return { id: id26, diagram: diagram2 };
162118
162324
  }, "loader");
162119
162325
  var architecture = {
@@ -162127,7 +162333,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
162127
162333
  return /^\s*treemap/.test(txt);
162128
162334
  }, "detector");
162129
162335
  var loader27 = /* @__PURE__ */ __name(async () => {
162130
- const { diagram: diagram2 } = await import("./diagram-PSM6KHXK-3K0tKsmi.js");
162336
+ const { diagram: diagram2 } = await import("./diagram-PSM6KHXK-BifH8r_E.js");
162131
162337
  return { id: id27, diagram: diagram2 };
162132
162338
  }, "loader");
162133
162339
  var treemap = {
@@ -171436,7 +171642,7 @@ function mergeAnimations(...animations) {
171436
171642
  return instant ? "instant" : animationCache.get(key2);
171437
171643
  }
171438
171644
  const StickToBottomContext = reactExports.createContext(null);
171439
- const useIsomorphicLayoutEffect$1 = typeof window !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
171645
+ const useIsomorphicLayoutEffect$2 = typeof window !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
171440
171646
  function StickToBottom({ instance, children: children2, resize, initial, mass, damping, stiffness, targetScrollTop: currentTargetScrollTop, contextRef, ...props }) {
171441
171647
  const customTargetScrollTop = reactExports.useRef(null);
171442
171648
  const targetScrollTop = reactExports.useCallback((target, elements) => {
@@ -171476,7 +171682,7 @@ function StickToBottom({ instance, children: children2, resize, initial, mass, d
171476
171682
  state2
171477
171683
  ]);
171478
171684
  reactExports.useImperativeHandle(contextRef, () => context2, [context2]);
171479
- useIsomorphicLayoutEffect$1(() => {
171685
+ useIsomorphicLayoutEffect$2(() => {
171480
171686
  if (!scrollRef.current) {
171481
171687
  return;
171482
171688
  }
@@ -172605,6 +172811,7 @@ function TextPreview({ url, filename }) {
172605
172811
  const Message = ({ className, from: from2, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
172606
172812
  "div",
172607
172813
  {
172814
+ "data-testid": from2 === "user" ? "chat-pane__user-message" : "chat-pane__assistant-message",
172608
172815
  className: cn$2(
172609
172816
  "group flex w-full min-w-0 flex-col gap-2",
172610
172817
  from2 === "user" ? "is-user ml-auto max-w-[90%] justify-end" : "is-assistant",
@@ -173821,6 +174028,1466 @@ function useChatSubscription(opts) {
173821
174028
  cancel
173822
174029
  };
173823
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);
173824
175491
  const IN_PROGRESS_STATES = /* @__PURE__ */ new Set([
173825
175492
  "input-available",
173826
175493
  "input-streaming",
@@ -173872,18 +175539,18 @@ function ConversationSkeleton() {
173872
175539
  "aria-busy": "true",
173873
175540
  "aria-label": "Loading messages",
173874
175541
  children: [
173875
- /* @__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: [
173876
175543
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-48", className: "bg-foreground/10" }),
173877
175544
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-32", className: "bg-foreground/10" })
173878
175545
  ] }) }) }),
173879
- /* @__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: [
173880
175547
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-3/4" }),
173881
175548
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-full" }),
173882
175549
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-5/6" }),
173883
175550
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-2/3" })
173884
175551
  ] }) }) }),
173885
- /* @__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" }) }) }) }),
173886
- /* @__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: [
173887
175554
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-2/3" }),
173888
175555
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-4/5" }),
173889
175556
  /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonBar, { widthClass: "w-1/2" })
@@ -173917,6 +175584,29 @@ function ChatView({
173917
175584
  reactExports.useRef(null);
173918
175585
  const stickyContextRef = reactExports.useRef(null);
173919
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
+ }, []);
173920
175610
  reactExports.useEffect(() => {
173921
175611
  const wasHidden = prevVisibleRef.current === false;
173922
175612
  prevVisibleRef.current = visible;
@@ -174146,14 +175836,76 @@ function ChatView({
174146
175836
  }
174147
175837
  return map2;
174148
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
+ }, []);
174149
175900
  const getLastUserMessage = reactExports.useCallback(() => {
174150
- for (let i2 = messages.length - 1; i2 >= 0; i2--) {
174151
- if (messages[i2].role !== "user") continue;
174152
- 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();
174153
175905
  if (text2) return text2;
174154
175906
  }
174155
175907
  return void 0;
174156
- }, [messages]);
175908
+ }, []);
174157
175909
  return (
174158
175910
  // Scope every `band-file:` link clicked inside this chat to *this*
174159
175911
  // workspace — `dispatchOpenFile` reads the id from context, so a
@@ -174177,64 +175929,21 @@ function ChatView({
174177
175929
  description: "Send a message to start coding"
174178
175930
  }
174179
175931
  ),
174180
- (() => {
174181
- return messages.map((message, messageIndex) => {
174182
- const isLastMessage = messageIndex === messages.length - 1;
174183
- const isLastAssistant = message.role === "assistant" && isLastMessage;
174184
- const hasPendingInteractiveTool = isLastAssistant && message.parts.some(
174185
- (p2) => isToolUIPart(p2) && IN_PROGRESS_STATES.has(p2.state) && (getToolName(p2) === "AskUserQuestion" || getToolName(p2) === "ExitPlanMode")
174186
- );
174187
- const showThinking = isLastAssistant && isStreaming && !hasPendingInteractiveTool;
174188
- if (message.role !== "assistant") {
174189
- const userParts = groupMessageParts(message.parts);
174190
- if (userParts.length === 0) return null;
174191
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "user", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageContent, { children: userParts.map((segment) => {
174192
- if (segment.type === "text" && segment.part.type === "text" && segment.part.text.trim()) {
174193
- return /* @__PURE__ */ jsxRuntimeExports.jsx(MessageResponse, { children: segment.part.text }, `${message.id}-text-${segment.partIndex}`);
174194
- }
174195
- if (segment.type === "file") {
174196
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
174197
- MessageFilePart,
174198
- {
174199
- part: segment.part
174200
- },
174201
- `${message.id}-file-${segment.partIndex}`
174202
- );
174203
- }
174204
- return null;
174205
- }) }) }, message.id);
174206
- }
174207
- const visibleParts = message.parts.filter(
174208
- (p2) => p2.type === "text" && p2.text.trim() || p2.type === "file" || isToolUIPart(p2)
174209
- );
174210
- if (visibleParts.length === 0 && !showThinking) return null;
174211
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Message, { from: "assistant", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(MessageContent, { children: [
174212
- groupMessageParts(message.parts).map((segment) => {
174213
- if (segment.type === "text") {
174214
- const { part, partIndex } = segment;
174215
- if (part.type === "text" && part.text.trim()) {
174216
- return /* @__PURE__ */ jsxRuntimeExports.jsx(MessageResponse, { children: part.text }, `${message.id}-text-${partIndex}`);
174217
- }
174218
- return null;
174219
- }
174220
- if (segment.type === "file") {
174221
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
174222
- MessageFilePart,
174223
- {
174224
- part: segment.part
174225
- },
174226
- `${message.id}-file-${segment.partIndex}`
174227
- );
174228
- }
174229
- const item = toolPartToItem(segment.part);
174230
- if (isTaskTool(item.toolName)) return null;
174231
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ToolCall, { item }, `${message.id}-tool-${segment.partIndex}`);
174232
- }),
174233
- showThinking && /* @__PURE__ */ jsxRuntimeExports.jsx(ThinkingIndicator, {})
174234
- ] }) }, message.id);
174235
- });
174236
- })(),
174237
- 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, {}) }) }),
174238
175947
  queuedMessagesView.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
174239
175948
  DndContext,
174240
175949
  {
@@ -174499,11 +176208,13 @@ const MODEL_CONTEXT_WINDOWS = {
174499
176208
  "gemini-2.5-pro": 1e6,
174500
176209
  "gemini-2.5-flash": 1e6
174501
176210
  };
176211
+ const SORTED_MODEL_CONTEXT_ENTRIES = Object.entries(
176212
+ MODEL_CONTEXT_WINDOWS
176213
+ ).sort(([a2], [b2]) => b2.length - a2.length);
174502
176214
  function getContextWindow(model) {
174503
176215
  if (!model) return 2e5;
174504
176216
  if (MODEL_CONTEXT_WINDOWS[model]) return MODEL_CONTEXT_WINDOWS[model];
174505
- const entries2 = Object.entries(MODEL_CONTEXT_WINDOWS).sort(([a2], [b2]) => b2.length - a2.length);
174506
- for (const [key2, value] of entries2) {
176217
+ for (const [key2, value] of SORTED_MODEL_CONTEXT_ENTRIES) {
174507
176218
  if (model.startsWith(key2)) return value;
174508
176219
  }
174509
176220
  return 2e5;
@@ -175641,6 +177352,15 @@ function usePerWorkspaceState(workspaceId) {
175641
177352
  }
175642
177353
  const DEFAULT_MAX_CACHED_WORKSPACES = 3;
175643
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
+ };
175644
177364
  function MultiWorkspacePanelHost({ emptyState, children: children2 }) {
175645
177365
  const [cache, setCache] = reactExports.useState(/* @__PURE__ */ new Map());
175646
177366
  const pathname = useRouterState({ select: (s2) => s2.location.pathname });
@@ -175724,11 +177444,8 @@ function MultiWorkspacePanelHost({ emptyState, children: children2 }) {
175724
177444
  "div",
175725
177445
  {
175726
177446
  "data-testid": `workspace-panel-host__cached-entry--${workspaceId}`,
175727
- className: "absolute inset-0 transition-opacity duration-150 ease-out",
175728
- style: {
175729
- opacity: isActive ? 1 : 0,
175730
- pointerEvents: isActive ? void 0 : "none"
175731
- },
177447
+ className: "absolute inset-0",
177448
+ style: isActive ? ACTIVE_ENTRY_STYLE : HIDDEN_ENTRY_STYLE,
175732
177449
  children: children2(workspaceId, isActive)
175733
177450
  },
175734
177451
  workspaceId
@@ -199076,12 +200793,12 @@ const PANEL_SHORTCUTS = {
199076
200793
  browser: "⇧⌘B"
199077
200794
  };
199078
200795
  const DockviewTerminalContainer = reactExports.lazy(
199079
- () => import("./DockviewTerminalContainer-zVckKR1x.js").then((m2) => ({
200796
+ () => import("./DockviewTerminalContainer-QeRuw498.js").then((m2) => ({
199080
200797
  default: m2.DockviewTerminalContainer
199081
200798
  }))
199082
200799
  );
199083
200800
  const DockviewBrowserContainer = reactExports.lazy(
199084
- () => import("./DockviewBrowserContainer-BcfLe0jL.js").then((m2) => ({
200801
+ () => import("./DockviewBrowserContainer-DaEHL7rU.js").then((m2) => ({
199085
200802
  default: m2.DockviewBrowserContainer
199086
200803
  }))
199087
200804
  );
@@ -199963,6 +201680,9 @@ function SharedDockviewLayout() {
199963
201680
  lastStructureRef.current = getStructuralFingerprint(initJson);
199964
201681
  }
199965
201682
  const initialActiveState = loadActiveState(initialWorkspaceId);
201683
+ if (initialActiveState) {
201684
+ applyGroupActiveViewsToApi(event.api, initialActiveState);
201685
+ }
199966
201686
  if (initialActiveState?.maximizedGroup) {
199967
201687
  applyMaximizedGroupToApi(event.api, initialActiveState.maximizedGroup);
199968
201688
  }
@@ -200005,16 +201725,7 @@ function SharedDockviewLayout() {
200005
201725
  if (!api || !activeWorkspaceId) return;
200006
201726
  const activeState = loadActiveState(activeWorkspaceId);
200007
201727
  if (activeState) {
200008
- try {
200009
- for (const [_groupId, viewId] of Object.entries(activeState.groups)) {
200010
- const panel = api.getPanel(viewId);
200011
- if (!panel) continue;
200012
- if (panel.api.isActive) continue;
200013
- if (panel.group.panels.length <= 1) continue;
200014
- panel.api.setActive();
200015
- }
200016
- } catch {
200017
- }
201728
+ applyGroupActiveViewsToApi(api, activeState);
200018
201729
  }
200019
201730
  applyMaximizedGroupToApi(api, activeState?.maximizedGroup);
200020
201731
  }, [activeWorkspaceId]);
@@ -200615,12 +202326,12 @@ function RootLayout() {
200615
202326
  ] })
200616
202327
  ] });
200617
202328
  }
200618
- const $$splitComponentImporter$1 = () => import("./index-BXCk5sug.js");
202329
+ const $$splitComponentImporter$1 = () => import("./index-D0gkB7DS.js");
200619
202330
  const Route$1 = createFileRoute("/")({
200620
202331
  component: lazyRouteComponent($$splitComponentImporter$1, "component")
200621
202332
  });
200622
- const $$splitNotFoundComponentImporter = () => import("./workspace._workspaceId-DkyiAy0e.js");
200623
- const $$splitComponentImporter = () => import("./workspace._workspaceId-BWs5oKO5.js");
202333
+ const $$splitNotFoundComponentImporter = () => import("./workspace._workspaceId-D20Q15rI.js");
202334
+ const $$splitComponentImporter = () => import("./workspace._workspaceId-BpnCyMIU.js");
200624
202335
  const Route2 = createFileRoute("/workspace/$workspaceId")({
200625
202336
  component: lazyRouteComponent($$splitComponentImporter, "component"),
200626
202337
  // Bookmarks / shared links from before route unification (`/workspace/$id/changes`,