dorkos 0.131.0 → 0.132.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 (334) hide show
  1. package/dist/bin/cli.js +324 -251
  2. package/dist/browser/fresh-verifier.mjs +13 -13
  3. package/dist/browser/native/darwin-supervisor-worker.mjs +3 -3
  4. package/dist/browser/native/package-manifest.json +1 -1
  5. package/dist/browser/source-manifest.json +1 -1
  6. package/dist/client/assets/{AboutPage-BZ2LLJ0k.js → AboutPage-Co7dVF9Z.js} +1 -1
  7. package/dist/client/assets/{ActivityErrorState-BnqAwUiy.js → ActivityErrorState-BrTkXZ6h.js} +1 -1
  8. package/dist/client/assets/{ActivityPage-BlZKrSVo.js → ActivityPage-Vk3zC2wX.js} +1 -1
  9. package/dist/client/assets/{ActivityRow-Ch8HxQ2m.js → ActivityRow-D_zqfTtI.js} +1 -1
  10. package/dist/client/assets/{AdapterIcon-CfocFMw-.js → AdapterIcon-Ba90gZtO.js} +1 -1
  11. package/dist/client/assets/{AdapterSetupWizard-Dtjx1Oad.js → AdapterSetupWizard-CzlKjgS0.js} +2 -2
  12. package/dist/client/assets/{AgentOptionRow-BGRvUeF7.js → AgentOptionRow-YsNMoqxA.js} +1 -1
  13. package/dist/client/assets/{AgentPicker-BcURPZQp.js → AgentPicker-Chtkpz5v.js} +1 -1
  14. package/dist/client/assets/{AgentRequestCard-kNq5A_IN.js → AgentRequestCard-BSvTh8P0.js} +1 -1
  15. package/dist/client/assets/{AppearancePage-Cd-k7dcc.js → AppearancePage-DQXsbxwz.js} +1 -1
  16. package/dist/client/assets/ApplyToOverridesDialog-Dz4dRYKs.js +1 -0
  17. package/dist/client/assets/{AttentionSignalRow-QY8AIjf9.js → AttentionSignalRow-D9Gs4fQW.js} +1 -1
  18. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-Cgkvajbw.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-frMjE1fG.js} +3 -3
  19. package/dist/client/assets/BindingDialog-CMbJI0MX.js +1 -0
  20. package/dist/client/assets/{BlintzCanvas-CMzZnmWK.js → BlintzCanvas-Dz8rAsfT.js} +3 -3
  21. package/dist/client/assets/{CanvasCsvContent-uxMaHePf.js → CanvasCsvContent-FMSGU_ae.js} +4 -4
  22. package/dist/client/assets/CanvasFileContent-CecxcpLI.js +2 -0
  23. package/dist/client/assets/CanvasModel3dContent-C66rrYY-.js +2 -0
  24. package/dist/client/assets/{ChannelComposer-BAg0a29Q.js → ChannelComposer-EZk2JgmU.js} +12 -17
  25. package/dist/client/assets/{ChatAppsOff-DD28V0vX.js → ChatAppsOff-CM043XGQ.js} +2 -2
  26. package/dist/client/assets/{CodeMirrorDiff-CyoduBgM.js → CodeMirrorDiff-CCnDdKmg.js} +1 -1
  27. package/dist/client/assets/{CodeMirrorEditor-DGccoZ8Q.js → CodeMirrorEditor-Ct5GtLSd.js} +1 -1
  28. package/dist/client/assets/{CommitmentList-DOvfnyDA.js → CommitmentList-BXbIFc4Y.js} +1 -1
  29. package/dist/client/assets/{CommitmentsPage-D81vxHUk.js → CommitmentsPage-CMKLXfbr.js} +1 -1
  30. package/dist/client/assets/{ComputerResourceView-Dk98shko.js → ComputerResourceView-dXV2M5eB.js} +1 -1
  31. package/dist/client/assets/{ComputerViewer-Broprz4q.js → ComputerViewer-4Aq0_cCL.js} +1 -1
  32. package/dist/client/assets/{ConnectionAccessLists-C_qLz8GJ.js → ConnectionAccessLists-DfIlofzc.js} +1 -1
  33. package/dist/client/assets/{ConnectionsPage-CmGgGmDO.js → ConnectionsPage-Ck4qQt1-.js} +2 -2
  34. package/dist/client/assets/{ConventionPage-BxWLIUUC.js → ConventionPage-z4phQYn0.js} +2 -2
  35. package/dist/client/assets/{ExtensionPageRoute-CyfIRaGs.js → ExtensionPageRoute-5chyBxxz.js} +2 -2
  36. package/dist/client/assets/{FeatureDisabledState-By2dhVpu.js → FeatureDisabledState-DrNY_0RT.js} +1 -1
  37. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-B6wKQpLR.js → FloatingTanStackRouterDevtools-CqogiFob-BeWxYbjO.js} +1 -1
  38. package/dist/client/assets/{ForwardConsentHost-kDdpyBgA.js → ForwardConsentHost-BVh663l5.js} +1 -1
  39. package/dist/client/assets/HandlePage-0fA-Trcw.js +1 -0
  40. package/dist/client/assets/{HeartbeatPage-CMj1SS30.js → HeartbeatPage-CByO3lLO.js} +1 -1
  41. package/dist/client/assets/{KeyEntry-Ctc1zp2J.js → KeyEntry-Z5hKKbef.js} +1 -1
  42. package/dist/client/assets/{LexicalField-7zd4B8f1.js → LexicalField-C6xJGRPF.js} +2 -2
  43. package/dist/client/assets/{ManagesPage-BG1TIMP3.js → ManagesPage-CgicR4Kd.js} +1 -1
  44. package/dist/client/assets/{Marketplace-C9r4jRJf.js → Marketplace-vLgSIgdn.js} +4 -4
  45. package/dist/client/assets/{MarketplaceSourcesView-C01Cdrge.js → MarketplaceSourcesView-Dth8Z9u3.js} +1 -1
  46. package/dist/client/assets/{McpAppFrame-Dm7MqOhc.js → McpAppFrame-DAPJUxUi.js} +2 -2
  47. package/dist/client/assets/{McpSigninBody-CsXP_7lE.js → McpSigninBody-D4j1GIhT.js} +1 -1
  48. package/dist/client/assets/{Model3dViewer-DOl8ZkrU.js → Model3dViewer-BqErc378.js} +1 -1
  49. package/dist/client/assets/NamePage-BI35-ZiO.js +1 -0
  50. package/dist/client/assets/{NewDirectMessageMenu-Dj-Qw8zA.js → NewDirectMessageMenu-BC7MdqUz.js} +1 -1
  51. package/dist/client/assets/{NotificationsPage-UExs4YE2.js → NotificationsPage-DsO88sso.js} +1 -1
  52. package/dist/client/assets/{OpenMeshSwitch-Dx3M3wwS.js → OpenMeshSwitch-Bv623x0o.js} +2 -2
  53. package/dist/client/assets/{OperatorIdentityForm-Bz5570RF.js → OperatorIdentityForm-C1knkmdh.js} +1 -1
  54. package/dist/client/assets/PermissionHistory-BaQShYqE.js +1 -0
  55. package/dist/client/assets/PermissionsPage-C74Pvkwc.js +1 -0
  56. package/dist/client/assets/{PersonalityPopover-Do-k_Hhw.js → PersonalityPopover-CD0qi79s.js} +1 -1
  57. package/dist/client/assets/PhotoPage-DE7tKzAB.js +1 -0
  58. package/dist/client/assets/{PreviewRefusedNotice-B-yyzQZP.js → PreviewRefusedNotice-BtTsn6IU.js} +1 -1
  59. package/dist/client/assets/{ProfileFields-DiarOK2y.js → ProfileFields-qnjDsdIB.js} +1 -1
  60. package/dist/client/assets/{ProfilePanelContainer-33Xkwoc3.js → ProfilePanelContainer-B01W49_v.js} +1 -1
  61. package/dist/client/assets/{ProfileRolePicker-BI6T4hj8.js → ProfileRolePicker-LcLX20fO.js} +1 -1
  62. package/dist/client/assets/{PromptSuggestionChips-v5MScpZF.js → PromptSuggestionChips-Cxa-xTMn.js} +1 -1
  63. package/dist/client/assets/{ReportsToPopover-BALADuTO.js → ReportsToPopover-ukRxHNsk.js} +1 -1
  64. package/dist/client/assets/{RoomSurface-BatV7gf5.js → RoomSurface-CwlU4Lns.js} +1 -1
  65. package/dist/client/assets/{RoomsPage-DCCC3Dst.js → RoomsPage-CRJ7tbt0.js} +1 -1
  66. package/dist/client/assets/{RunsOnPopover-C7hMPyrb.js → RunsOnPopover-Bn1F_tCT.js} +1 -1
  67. package/dist/client/assets/{RuntimeConnectFlow-Dc5a8dlJ.js → RuntimeConnectFlow-Ddm_TBWI.js} +1 -1
  68. package/dist/client/assets/{RuntimeSetupDialog-w90VGjJ4.js → RuntimeSetupDialog-BcDt-BYK.js} +1 -1
  69. package/dist/client/assets/{SeenDevices-BIMmbMWC.js → SeenDevices-mpu0OgjB.js} +3 -3
  70. package/dist/client/assets/{SessionsPage-0lwvSYHB.js → SessionsPage-Dp_iQdpc.js} +1 -1
  71. package/dist/client/assets/{SettingsDialog-CrP6JzPg.js → SettingsDialog-TNI6sYo5.js} +4 -4
  72. package/dist/client/assets/{SkillsPage-BDgKWTfe.js → SkillsPage-k-7ycbOg.js} +1 -1
  73. package/dist/client/assets/TaskDialogWrapper-Bfp5pa_r.js +1 -0
  74. package/dist/client/assets/{TasksEmptyState-RkUEEU2r.js → TasksEmptyState-BlGELISr.js} +2 -2
  75. package/dist/client/assets/{TasksPage-DjGbMGvn.js → TasksPage-BRVvjSR1.js} +1 -1
  76. package/dist/client/assets/{TeamComputerEntry-B_sM9Fik.js → TeamComputerEntry-RQBXj6_l.js} +1 -1
  77. package/dist/client/assets/{ToolsPage-CeETRCd8.js → ToolsPage-D1seB8vW.js} +2 -2
  78. package/dist/client/assets/{TopologyGraph-CnpH2NjE.js → TopologyGraph-DdWrS7dp.js} +3 -3
  79. package/dist/client/assets/{TourHost-BQHrS47S.js → TourHost-DmcHWh9X.js} +1 -1
  80. package/dist/client/assets/{UnlinkDialog-DOQLeNx4.js → UnlinkDialog-FQzgYxPM.js} +1 -1
  81. package/dist/client/assets/{UnreadDivider-DhyK6uGG.js → UnreadDivider-DPMhdEbw.js} +1 -1
  82. package/dist/client/assets/{WidgetErrorCard-Bwlfu514.js → WidgetErrorCard-B477vOv2.js} +6 -6
  83. package/dist/client/assets/{WithheldExtensionsNotice-BDc-CM2t.js → WithheldExtensionsNotice-BQnkJvgb.js} +1 -1
  84. package/dist/client/assets/{WorkQueuePage-iO_DO1YK.js → WorkQueuePage-CwlR32Dy.js} +1 -1
  85. package/dist/client/assets/WorkView-J0V1k1Q7.js +51 -0
  86. package/dist/client/assets/_shell-B8mHdyV6.js +80 -0
  87. package/dist/client/assets/{_shell._home-BWi5YPaR.js → _shell._home-CadWLlSU.js} +1 -1
  88. package/dist/client/assets/{_shell._home.activity-BU1NIGb7.js → _shell._home.activity-Cmy3lakH.js} +1 -1
  89. package/dist/client/assets/_shell._home.index-eR2x0FUG.js +3 -0
  90. package/dist/client/assets/_shell._home.tasks-4Vkj6L-V.js +1 -0
  91. package/dist/client/assets/{_shell._home.workspaces-wbnqJ58w.js → _shell._home.workspaces-fYlBcaoi.js} +1 -1
  92. package/dist/client/assets/{_shell.channels-D1KdvWZF.js → _shell.channels-nErO_7xf.js} +2 -2
  93. package/dist/client/assets/_shell.connections-C9URqim3.js +1 -0
  94. package/dist/client/assets/{_shell.feedback-requests-DzHWC1fJ.js → _shell.feedback-requests-DJxcMS1O.js} +2 -2
  95. package/dist/client/assets/_shell.marketplace-CNUtNewz.js +1 -0
  96. package/dist/client/assets/_shell.marketplace_.sources-Cku_p8cg.js +1 -0
  97. package/dist/client/assets/_shell.session-B990EEo5.js +1 -0
  98. package/dist/client/assets/{_shell.team-BMNSUpQQ.js → _shell.team-CXbQysNY.js} +4 -4
  99. package/dist/client/assets/_shell.threads-CDEyGRL3.js +1 -0
  100. package/dist/client/assets/_shell.todos-8uEPusJV.js +6 -0
  101. package/dist/client/assets/_shell.x._extensionId-DXp9Wa0V.js +1 -0
  102. package/dist/client/assets/_shell.x._extensionId_._-DXp9Wa0V.js +1 -0
  103. package/dist/client/assets/{abnfDiagram-WEYOIA3C-Co2k29JX.js → abnfDiagram-WEYOIA3C-C4khI9rY.js} +1 -1
  104. package/dist/client/assets/{access-copy-D6BUySpp.js → access-copy-w5gryYsO.js} +1 -1
  105. package/dist/client/assets/{arc-DLZZpkuJ.js → arc-fvrOAWql.js} +1 -1
  106. package/dist/client/assets/{architectureDiagram-ZHVYKT53-ClS9xqK5.js → architectureDiagram-ZHVYKT53-CNH5Fhq_.js} +1 -1
  107. package/dist/client/assets/{banner-B8iMuXCP.js → banner-CBw5pFjQ.js} +2 -2
  108. package/dist/client/assets/{blockDiagram-RJAE7QA3-DheoOELu.js → blockDiagram-RJAE7QA3-BxP4ZQri.js} +1 -1
  109. package/dist/client/assets/{c4Diagram-XDPPPE54-VWWZJ5x4.js → c4Diagram-XDPPPE54-BhBYlCWz.js} +1 -1
  110. package/dist/client/assets/channel-splVtfTe.js +1 -0
  111. package/dist/client/assets/{chunk-2E7WHVMD-BqPLJVkv.js → chunk-2E7WHVMD-COA0yYP4.js} +1 -1
  112. package/dist/client/assets/{chunk-2Q5K7J3B-DZn6OnKe.js → chunk-2Q5K7J3B-BbmrmCrP.js} +1 -1
  113. package/dist/client/assets/{chunk-4EMNKR2T-Dl9Poajp.js → chunk-4EMNKR2T-CzA2mZv9.js} +1 -1
  114. package/dist/client/assets/{chunk-55XCU76K-RoKuZPUc.js → chunk-55XCU76K-DJ2x-ilD.js} +1 -1
  115. package/dist/client/assets/{chunk-5VM5RSS4-DV_1XHtU.js → chunk-5VM5RSS4-BxznGj8M.js} +1 -1
  116. package/dist/client/assets/{chunk-JWPE2WC7-B_IuS45y.js → chunk-JWPE2WC7-DHb10Lbd.js} +1 -1
  117. package/dist/client/assets/{chunk-VQ5W62QI-DkLNi45x.js → chunk-VQ5W62QI-C7cjQxzr.js} +1 -1
  118. package/dist/client/assets/{chunk-XXDRQBXY-ISM-1Dpw.js → chunk-XXDRQBXY-M7RrmKQv.js} +1 -1
  119. package/dist/client/assets/{chunk-ZCHMQSOR-MKaLMW8o.js → chunk-ZCHMQSOR-BZxPNYte.js} +2 -2
  120. package/dist/client/assets/{classDiagram-v2-4MYWR3UA-CIWuu4ht.js → classDiagram-v2-4MYWR3UA-vt1g5HlO.js} +1 -1
  121. package/dist/client/assets/{command-CxGYZKco.js → command-DU2-hlOP.js} +1 -1
  122. package/dist/client/assets/{copy-button-DjAoGwds.js → copy-button-BodCVufV.js} +1 -1
  123. package/dist/client/assets/{cose-bilkent-JH36ORCC-HiCifRyi.js → cose-bilkent-JH36ORCC-Cd27g-Yx.js} +1 -1
  124. package/dist/client/assets/{cpu-DHHTTvp_.js → cpu-BXE_D43d.js} +1 -1
  125. package/dist/client/assets/{cynefin-EF2NZ3EQ-DjJGZrPz.js → cynefin-EF2NZ3EQ-BnCAgdfS.js} +1 -1
  126. package/dist/client/assets/{cynefinDiagram-WF24UDRP-DE2NdiJ2.js → cynefinDiagram-WF24UDRP-eIO4xQHB.js} +1 -1
  127. package/dist/client/assets/{dagre-NK4GIZVX-C6gDOD26.js → dagre-NK4GIZVX-Bvd_3Cqy.js} +1 -1
  128. package/dist/client/assets/{detail-row-CjwI1iuc.js → detail-row-BvEUzVxe.js} +1 -1
  129. package/dist/client/assets/{diagram-CBK3MWTC-38LckcsL.js → diagram-CBK3MWTC-BGqDA_bh.js} +1 -1
  130. package/dist/client/assets/{diagram-I5XIIV2D--8L6D9Ra.js → diagram-I5XIIV2D-BXhbpnrE.js} +1 -1
  131. package/dist/client/assets/{diagram-ODIL2UCW-DGC2Inhd.js → diagram-ODIL2UCW-C4hWeQZn.js} +1 -1
  132. package/dist/client/assets/{diagram-PFBEJUXE-BDHp0AyR.js → diagram-PFBEJUXE-DIEuwCdA.js} +1 -1
  133. package/dist/client/assets/{diagram-RJA3I4VV-uBatJYPi.js → diagram-RJA3I4VV-C36ghYx6.js} +1 -1
  134. package/dist/client/assets/{diagram-TYUNFSNR-C8e1EH9X.js → diagram-TYUNFSNR-CSC9FLO6.js} +1 -1
  135. package/dist/client/assets/{ebnfDiagram-V4P3TTPT-DimRzU5B.js → ebnfDiagram-V4P3TTPT-DuOLfVHI.js} +1 -1
  136. package/dist/client/assets/{elk-QONTBCTQ-Dz6_Y2-G.js → elk-QONTBCTQ-NvLhZqkG.js} +1 -1
  137. package/dist/client/assets/{empty-state-saV209Il.js → empty-state-B316LEXY.js} +1 -1
  138. package/dist/client/assets/{erDiagram-KYQIGQAA-JeuTF8w6.js → erDiagram-KYQIGQAA-BcTRY9y8.js} +1 -1
  139. package/dist/client/assets/{execution-config-ClQZyDs9.js → execution-config-D9vIc46b.js} +1 -1
  140. package/dist/client/assets/{file-BIF-4ARS.js → file-C_57RCIQ.js} +1 -1
  141. package/dist/client/assets/{file-exclamation-point-DxadH2b-.js → file-exclamation-point-C7C2dM_w.js} +1 -1
  142. package/dist/client/assets/{file-text-C_NPIQr4.js → file-text-CS9s0qOe.js} +1 -1
  143. package/dist/client/assets/{find-latest-widget-fence-CXai_zs0.js → find-latest-widget-fence-D_FwbHep.js} +4 -4
  144. package/dist/client/assets/{flowDiagram-IUGLLWBU-9FHDdK4j.js → flowDiagram-IUGLLWBU-DxQ31Egh.js} +1 -1
  145. package/dist/client/assets/{form-D3VdAYl4.js → form-Cf49Z6eU.js} +1 -1
  146. package/dist/client/assets/{format-cron-BqRDcFZM.js → format-cron-Dlp0mfqz.js} +1 -1
  147. package/dist/client/assets/{ganttDiagram-R7GPNTJY-CLMuXlHt.js → ganttDiagram-R7GPNTJY-Bxwm173A.js} +1 -1
  148. package/dist/client/assets/{git-branch-Df7a5_fb.js → git-branch-DpByNz2U.js} +1 -1
  149. package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-sE7Rlpr6.js → gitGraphDiagram-PDYL7XHY-DH8AQ76t.js} +1 -1
  150. package/dist/client/assets/{graph-iNVyFhBQ.js → graph-BGzqfhJw.js} +1 -1
  151. package/dist/client/assets/{heart-BHMhDZ0K.js → heart-DKWg_e72.js} +1 -1
  152. package/dist/client/assets/{highlighted-body-KPVGNVTW-VvvsrJbu.js → highlighted-body-KPVGNVTW-Dd_spScF.js} +1 -1
  153. package/dist/client/assets/{image-lightbox-CGEIRguA.js → image-lightbox-BtsV24zH.js} +1 -1
  154. package/dist/client/assets/{image-off-C5-TmSq8.js → image-off-Czqq8ai8.js} +1 -1
  155. package/dist/client/assets/{index-C3zS0ghJ.js → index-B401rtXR.js} +1 -1
  156. package/dist/client/assets/{index-WeLoaNzW.js → index-BGKWKxfR.js} +1 -1
  157. package/dist/client/assets/{index-DFkofTx1.js → index-BQulbvlk.js} +1 -1
  158. package/dist/client/assets/{index-Y6BDhuGt.js → index-BTB5QRQx.js} +1 -1
  159. package/dist/client/assets/index-BYTLOFNS.js +1061 -0
  160. package/dist/client/assets/{index-CLsoFUml.js → index-B_KMn9ji.js} +1 -1
  161. package/dist/client/assets/{index-Cudi8rs6.js → index-BapT4bjy.js} +1 -1
  162. package/dist/client/assets/index-BbPg1hpf.css +1 -0
  163. package/dist/client/assets/{index-BK5QrGfQ.js → index-BhIDM_HP.js} +1 -1
  164. package/dist/client/assets/{index-CExh9cKN.js → index-BmckK_5Q.js} +1 -1
  165. package/dist/client/assets/{index-BxFLHNLg.js → index-BxNcjL67.js} +1 -1
  166. package/dist/client/assets/{index-LPrq0pOA.js → index-CHGNCEc4.js} +1 -1
  167. package/dist/client/assets/{index-Bzm9YMbr.js → index-CIokV9hG.js} +1 -1
  168. package/dist/client/assets/index-CUDsA_8O.js +1 -0
  169. package/dist/client/assets/{index-DMwivStD.js → index-CWBtIScD.js} +2 -2
  170. package/dist/client/assets/{index-YZbu9tke.js → index-CX4nMOaI.js} +1 -1
  171. package/dist/client/assets/index-CaYgHnra.js +1 -0
  172. package/dist/client/assets/{index-D9bEy8X-.js → index-CpxbjS0M.js} +1 -1
  173. package/dist/client/assets/{index-Ci_J5Q-6.js → index-D0k8LoLP.js} +1 -1
  174. package/dist/client/assets/{index-BMLCfTba.js → index-D2gKRr6f.js} +1 -1
  175. package/dist/client/assets/index-D6jG1-Mw.js +1 -0
  176. package/dist/client/assets/{index-Bd0PAkxf.js → index-DCFKleTS.js} +1 -1
  177. package/dist/client/assets/{index-k67dvyau.js → index-DG-iZ_7U.js} +1 -1
  178. package/dist/client/assets/{index-CgWzzIbx.js → index-DGKwWSrJ.js} +1 -1
  179. package/dist/client/assets/{index-BLUUshO9.js → index-DHFIAKQc.js} +1 -1
  180. package/dist/client/assets/{index-CTgUh4p3.js → index-DNkWdNSz.js} +1 -1
  181. package/dist/client/assets/{index-DWZ5M321.js → index-DOFLQqXn.js} +1 -1
  182. package/dist/client/assets/index-DOZg4xUY.js +1 -0
  183. package/dist/client/assets/{index-BgRYuqWs.js → index-DQ9MUhkA.js} +1 -1
  184. package/dist/client/assets/{index-B0FHRkHM.js → index-DXA-11hB.js} +2 -2
  185. package/dist/client/assets/{index-BgdYXP8E.js → index-DcUcciFs.js} +3 -3
  186. package/dist/client/assets/{index-Dw-4S640.js → index-Deupek6J.js} +1 -1
  187. package/dist/client/assets/index-DrbZanni.js +1 -0
  188. package/dist/client/assets/{index-264YDu-W.js → index-DwAhtrb9.js} +1 -1
  189. package/dist/client/assets/{index-DEvpdTo6.js → index-EB7hJHJY.js} +1 -1
  190. package/dist/client/assets/{index-C_0JoCV6.js → index-GAcHtPZc.js} +1 -1
  191. package/dist/client/assets/{index-ClyRhxV_.js → index-GZP3iUOG.js} +1 -1
  192. package/dist/client/assets/{index-Dpu2CORc.js → index-JLySVSjV.js} +1 -1
  193. package/dist/client/assets/{index-DRtg_sGG.js → index-MCPJOxb7.js} +1 -1
  194. package/dist/client/assets/{index-D_bAtIJZ.js → index-N77XDvrM.js} +1 -1
  195. package/dist/client/assets/{index-B8I1k-z9.js → index-O9UP2ojb.js} +1 -1
  196. package/dist/client/assets/{index-DYVNSRDk.js → index-aSuMCzNN.js} +1 -1
  197. package/dist/client/assets/{index-BZTLFzJp.js → index-sbmgxCMU.js} +1 -1
  198. package/dist/client/assets/{index-Di-MIFQG.js → index-vEujcopz.js} +3 -3
  199. package/dist/client/assets/{index.esm-CYmalBux.js → index.esm-B0kiCgAP.js} +1 -1
  200. package/dist/client/assets/{infoDiagram-MVDRKAX5-0aR9wjgO.js → infoDiagram-MVDRKAX5-CFgHv4Dm.js} +1 -1
  201. package/dist/client/assets/{inline-code-DyTKSC5b.js → inline-code-B3u1dOXm.js} +1 -1
  202. package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-D1lN8x2t.js → ishikawaDiagram-HPEHV2GE-BWRvdwNW.js} +1 -1
  203. package/dist/client/assets/{journeyDiagram-BOSHW7O7-CkXITXiJ.js → journeyDiagram-BOSHW7O7-6zzUqSAS.js} +1 -1
  204. package/dist/client/assets/{kanban-definition-FNSA4HC5-ge33IiSq.js → kanban-definition-FNSA4HC5-CCCFKXnc.js} +1 -1
  205. package/dist/client/assets/{layers-Bx3K7OUm.js → layers-Dbd-86dV.js} +1 -1
  206. package/dist/client/assets/{lightbulb-C5LvXkvM.js → lightbulb-C15x7OEZ.js} +1 -1
  207. package/dist/client/assets/{link-2-Bj0_Zkvr.js → link-2-D1CRDxXB.js} +1 -1
  208. package/dist/client/assets/{list-runtime-types-VNj1C8TB.js → list-runtime-types-Cyl4h4lV.js} +1 -1
  209. package/dist/client/assets/{markdown-content-BRaPEOC7.js → markdown-content-C1i_dR6j.js} +1 -1
  210. package/dist/client/assets/{mention-pill-B_MiJWfo.js → mention-pill-DoQBb5VU.js} +1 -1
  211. package/dist/client/assets/{mermaid.core-B2hil_4a.js → mermaid.core-BaDCR0nn.js} +4 -4
  212. package/dist/client/assets/{message-square-off-T33FHpr7.js → message-square-off-CwB3fRn1.js} +1 -1
  213. package/dist/client/assets/{mindmap-definition-6OY57UG3-Bu_Ia4Xz.js → mindmap-definition-6OY57UG3-B6g2CNRv.js} +1 -1
  214. package/dist/client/assets/{more-details-oDazWBxm.js → more-details-DNp6DH8i.js} +1 -1
  215. package/dist/client/assets/{owner-notice-VepbAQhj.js → owner-notice-P8INt5DW.js} +1 -1
  216. package/dist/client/assets/{package-DBsl3ao5.js → package-DHEY3aDq.js} +1 -1
  217. package/dist/client/assets/{page-container-Bkarym6m.js → page-container-BwHVHvGF.js} +1 -1
  218. package/dist/client/assets/{pane-resize-handle-gBlb5k1v.js → pane-resize-handle-BetBV5qX.js} +1 -1
  219. package/dist/client/assets/{paperclip-BeFttiUK.js → paperclip-DYgUORd3.js} +1 -1
  220. package/dist/client/assets/{path-input-NY_yCBHb.js → path-input-DpN1vJO-.js} +1 -1
  221. package/dist/client/assets/{pegDiagram-ECIUJNBX-0KmJlW0E.js → pegDiagram-ECIUJNBX-Db7P43aK.js} +1 -1
  222. package/dist/client/assets/{pieDiagram-GNMPY74T-IjeZXicv.js → pieDiagram-GNMPY74T-Cz1jeviu.js} +1 -1
  223. package/dist/client/assets/{plug-CTqOZ7cA.js → plug-C5hngNbe.js} +1 -1
  224. package/dist/client/assets/{primer-trigger-CjaGrT2u.js → primer-trigger-Bb7X-l3r.js} +2 -2
  225. package/dist/client/assets/{profile-errors-B8XkL2Rp.js → profile-errors-OMPgeYKJ.js} +1 -1
  226. package/dist/client/assets/{progress-Cr-4myw6.js → progress-CNm_pBbE.js} +1 -1
  227. package/dist/client/assets/{quadrantDiagram-D57K4MC3-CP6kLJKa.js → quadrantDiagram-D57K4MC3-PD02f4Da.js} +1 -1
  228. package/dist/client/assets/{query-error-state-DvhY-YKM.js → query-error-state-BdmBV0DG.js} +1 -1
  229. package/dist/client/assets/{radio-CmDmmJy6.js → radio-BmjH89ml.js} +1 -1
  230. package/dist/client/assets/{railroadDiagram-Y72NRBL7-Bcto__oE.js → railroadDiagram-Y72NRBL7-x1K1Xrsr.js} +1 -1
  231. package/dist/client/assets/registry-3K4FIIyI.js +39 -0
  232. package/dist/client/assets/registry-DNYPNSm5.js +1 -0
  233. package/dist/client/assets/{relay-trace-schemas-ZLR1S8ft.js → relay-trace-schemas-CctfRKB2.js} +2 -2
  234. package/dist/client/assets/{repeat-DVTM8et8.js → repeat-CK_sumJP.js} +1 -1
  235. package/dist/client/assets/{requirementDiagram-EQYSW5RA-DNJrds3m.js → requirementDiagram-EQYSW5RA-BM-pntyA.js} +1 -1
  236. package/dist/client/assets/{room-files-source-9Wdtc-bG.js → room-files-source-CKjJxFRA.js} +2 -2
  237. package/dist/client/assets/{rotate-ccw-clock-qJSWqifh.js → rotate-ccw-clock-DzVWecfL.js} +1 -1
  238. package/dist/client/assets/{rotate-cw-uoeBxIeM.js → rotate-cw-CpuoCwEK.js} +1 -1
  239. package/dist/client/assets/{sankeyDiagram-SY24JHO5-DNlU7xGI.js → sankeyDiagram-SY24JHO5-ByCX1rfW.js} +1 -1
  240. package/dist/client/assets/{scroll-area-B1d3NfEn.js → scroll-area-BO7uDl4z.js} +1 -1
  241. package/dist/client/assets/{sequenceDiagram-BLEHNHQU-CRk71coF.js → sequenceDiagram-BLEHNHQU-BPB2hLY6.js} +1 -1
  242. package/dist/client/assets/{shield-x-BpQmg1qz.js → shield-x-DknrRQrV.js} +1 -1
  243. package/dist/client/assets/{signed-in-CTmJ3OqM.js → signed-in-DdaXcjzY.js} +1 -1
  244. package/dist/client/assets/{sizeCapture-INFHLROL-cihX3QNq.js → sizeCapture-INFHLROL-DRe6LanJ.js} +1 -1
  245. package/dist/client/assets/{soul-file-BwiyiI5v.js → soul-file-CPL6-cba.js} +1 -1
  246. package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-BAwwRsnH.js → stateDiagram-v2-A6IESKWZ-DZA18t3o.js} +1 -1
  247. package/dist/client/assets/{swimlanes-B3ENRKFQ-CpDB6CUC.js → swimlanes-B3ENRKFQ-DRX2o4k2.js} +1 -1
  248. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-D5hU--1Q.js +8 -0
  249. package/dist/client/assets/{table-dWrfPeX-.js → table-BrvyPoEL.js} +1 -1
  250. package/dist/client/assets/{tabs-D4txthOi.js → tabs-BmbzJhKE.js} +1 -1
  251. package/dist/client/assets/{timeline-definition-JXYKGLGB-RDrKgCoU.js → timeline-definition-JXYKGLGB-BL2C4v8r.js} +1 -1
  252. package/dist/client/assets/trust-dial-tuMHO5Ug.js +11 -0
  253. package/dist/client/assets/{trust-posture-atZIh8tf.js → trust-posture-9cC08pk5.js} +1 -1
  254. package/dist/client/assets/{unplug-CnevV4yX.js → unplug-B8oONuTT.js} +1 -1
  255. package/dist/client/assets/{unverified-catalog-notice-BQwT36FA.js → unverified-catalog-notice-ofL4eYQH.js} +1 -1
  256. package/dist/client/assets/{use-bindings-CltfjAWW.js → use-bindings-DVKWBz4y.js} +1 -1
  257. package/dist/client/assets/{use-composer-prefs-D-Zlt6z2.js → use-composer-prefs-DWFqxtm6.js} +1 -1
  258. package/dist/client/assets/{use-connector-management-C3CLnOOt.js → use-connector-management-B_RvwV0T.js} +1 -1
  259. package/dist/client/assets/{use-deep-link-scroll-DQlz-scx.js → use-deep-link-scroll-Cahio5D0.js} +1 -1
  260. package/dist/client/assets/{use-delete-binding-D73CLm_7.js → use-delete-binding-DHiPJq9D.js} +1 -1
  261. package/dist/client/assets/{use-dev-links-BqVFsMKU.js → use-dev-links-Cunzy9gq.js} +1 -1
  262. package/dist/client/assets/use-direct-message-panel-CPyyrU4P.js +1 -0
  263. package/dist/client/assets/{use-external-adapter-catalog-DrnksH0t.js → use-external-adapter-catalog-l9RzI0W5.js} +1 -1
  264. package/dist/client/assets/{use-filter-state-D4i-hDOk.js → use-filter-state-DKALQgO9.js} +2 -2
  265. package/dist/client/assets/{use-full-activity-feed-DdDsRg8s.js → use-full-activity-feed-B7miUwr2.js} +1 -1
  266. package/dist/client/assets/use-is-below-desktop-DSwl4xyH.js +1 -0
  267. package/dist/client/assets/{use-mesh-topology-B7aLtPkZ.js → use-mesh-topology-Y9Cdja0F.js} +1 -1
  268. package/dist/client/assets/{use-mounted-ref-DSSTCJfY.js → use-mounted-ref-Bb8zNmgI.js} +1 -1
  269. package/dist/client/assets/{use-notification-prefs-DaF3kwmq.js → use-notification-prefs-DoZgirjS.js} +1 -1
  270. package/dist/client/assets/use-pending-read-DC4hUOFi.js +1 -0
  271. package/dist/client/assets/{use-personality-commit-D5b90JPX.js → use-personality-commit-CDMLIF8s.js} +1 -1
  272. package/dist/client/assets/{use-promo-activation-CPAOQpfe.js → use-promo-activation-XWY3OSoy.js} +2 -2
  273. package/dist/client/assets/{use-promo-dismissals-Bx1gz1R1.js → use-promo-dismissals-Bg7cJFb8.js} +1 -1
  274. package/dist/client/assets/{use-pulse-freshness-DeulB37O.js → use-pulse-freshness-B4nO2ugg.js} +1 -1
  275. package/dist/client/assets/{use-room-follow-claim-Dwke6RFQ.js → use-room-follow-claim-CpOIUcG7.js} +1 -1
  276. package/dist/client/assets/{use-room-sessions-iepVrIMm.js → use-room-sessions-BeiAMSkk.js} +1 -1
  277. package/dist/client/assets/{use-roving-tab-list-pCPKNQKv.js → use-roving-tab-list-HB0egh1C.js} +1 -1
  278. package/dist/client/assets/{use-session-canvas-BvvO-_V1.js → use-session-canvas-Cc04zSW3.js} +6 -6
  279. package/dist/client/assets/{use-status-budget-Bs7MMriS.js → use-status-budget-GIeJAyM1.js} +2 -2
  280. package/dist/client/assets/{use-todos-C-eREuDS.js → use-todos-Bq9I1_Md.js} +1 -1
  281. package/dist/client/assets/{use-transform-lj3TkjYO.js → use-transform-DEFDL9dO.js} +1 -1
  282. package/dist/client/assets/{use-unclaimed-chats-BF3-0jHC.js → use-unclaimed-chats-BzDzgx9Q.js} +1 -1
  283. package/dist/client/assets/use-update-config-Bt7fMLqS.js +1 -0
  284. package/dist/client/assets/{useMutationState-B_x_4f2K.js → useMutationState-Bffa43_B.js} +1 -1
  285. package/dist/client/assets/{usecaseDiagram-WPOLBNNX-DBsRYa4J.js → usecaseDiagram-WPOLBNNX-BoYu8koq.js} +1 -1
  286. package/dist/client/assets/{vennDiagram-Q3Y3IDCW-rFAXvcQI.js → vennDiagram-Q3Y3IDCW-U4E5RDf5.js} +1 -1
  287. package/dist/client/assets/{wardleyDiagram-IVAIDKWA-bI0JZkO3.js → wardleyDiagram-IVAIDKWA-DYWCkm0g.js} +1 -1
  288. package/dist/client/assets/{xychartDiagram-4URNHDU4-DZUd8iln.js → xychartDiagram-4URNHDU4-DMf6UlJg.js} +1 -1
  289. package/dist/client/assets/zap-BmeuEI5X.js +6 -0
  290. package/dist/client/index.html +2 -2
  291. package/dist/drizzle/20261104060919_package_approval_request.sql +1 -0
  292. package/dist/drizzle/meta/20261104060919_snapshot.json +14889 -0
  293. package/dist/drizzle/meta/_journal.json +7 -0
  294. package/dist/server/index.js +30881 -29909
  295. package/dist/server/index.js.map +2 -2
  296. package/package.json +7 -7
  297. package/dist/client/assets/ApplyToOverridesDialog-DE9VVQCA.js +0 -1
  298. package/dist/client/assets/BindingDialog-C_yflKOE.js +0 -1
  299. package/dist/client/assets/CanvasFileContent-C3ZKszxn.js +0 -2
  300. package/dist/client/assets/CanvasModel3dContent-CsNUuaj6.js +0 -2
  301. package/dist/client/assets/HandlePage-vsG04kBg.js +0 -1
  302. package/dist/client/assets/NamePage-DdX2yQ5f.js +0 -1
  303. package/dist/client/assets/PermissionHistory-Bhl2kr1R.js +0 -1
  304. package/dist/client/assets/PermissionsPage-DUbenFkt.js +0 -1
  305. package/dist/client/assets/PhotoPage-CExABoHA.js +0 -1
  306. package/dist/client/assets/TaskDialogWrapper-BVb8gAr0.js +0 -1
  307. package/dist/client/assets/WorkView-BDk_vwu3.js +0 -51
  308. package/dist/client/assets/_shell-CMNFxZKJ.js +0 -80
  309. package/dist/client/assets/_shell._home.index-BjR-d3_s.js +0 -3
  310. package/dist/client/assets/_shell._home.tasks-CqURPMQD.js +0 -1
  311. package/dist/client/assets/_shell.connections-D3gJrBTQ.js +0 -1
  312. package/dist/client/assets/_shell.marketplace-HdefWdN_.js +0 -1
  313. package/dist/client/assets/_shell.marketplace_.sources-wAZKfDQF.js +0 -1
  314. package/dist/client/assets/_shell.session-C0utZeSI.js +0 -1
  315. package/dist/client/assets/_shell.threads-TvzYRNMt.js +0 -1
  316. package/dist/client/assets/_shell.todos-sOFmsIPE.js +0 -6
  317. package/dist/client/assets/_shell.x._extensionId-DiEQZIvl.js +0 -1
  318. package/dist/client/assets/_shell.x._extensionId_._-DiEQZIvl.js +0 -1
  319. package/dist/client/assets/channel-B0WiEIVe.js +0 -1
  320. package/dist/client/assets/index-BwTGkJbK.js +0 -1071
  321. package/dist/client/assets/index-CCHGVclj.js +0 -1
  322. package/dist/client/assets/index-CiUmx-i3.js +0 -1
  323. package/dist/client/assets/index-Dd4JoHFP.js +0 -1
  324. package/dist/client/assets/index-DlmGvYpy.js +0 -1
  325. package/dist/client/assets/index-EXJsA5kw.js +0 -1
  326. package/dist/client/assets/index-MpS13vhQ.css +0 -1
  327. package/dist/client/assets/registry-BQTcAm5U.js +0 -39
  328. package/dist/client/assets/registry-HencHRXy.js +0 -1
  329. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-nJfOIWYW.js +0 -8
  330. package/dist/client/assets/use-direct-message-panel-B3qfpDjY.js +0 -1
  331. package/dist/client/assets/use-is-below-desktop-BXHT3oPL.js +0 -1
  332. package/dist/client/assets/use-local-browser-DDWknHZE.js +0 -1
  333. package/dist/client/assets/use-pending-read-uvmEJ7H9.js +0 -1
  334. package/dist/client/assets/use-update-config-D-OGlXGR.js +0 -1
@@ -1,4 +1,4 @@
1
- var tt=Object.defineProperty;var nt=(e,n,s)=>n in e?tt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s;var Y=(e,n,s)=>nt(e,typeof n!="symbol"?n+"":n,s);import{O as A,a5 as D,kB as st,r as h,aN as at,kC as ue,aL as rt,j as t,iR as W,kD as ot,g as Z,kE as ee,kF as te,G as O,kG as it,k8 as lt,X as ct,kH as dt,B as b,ek as ut,_ as L,aR as mt,kI as ht,a6 as ne,a7 as se,a8 as K,a2 as ye,hx as pt,hy as ft,x as xt,bz as be,bA as we,bB as je,bD as ke,ba as gt,fT as vt,kJ as yt,kK as bt,ke as wt,kL as jt,kM as kt,kN as me,J as Nt,hd as Ne,a_ as k,gC as Ct,gI as Rt,kO as Et,dS as he,kP as Tt,kQ as At,kR as Dt}from"./index-BwTGkJbK.js";import{u as _t}from"./use-roving-tab-list-pCPKNQKv.js";import{F as Ce,i as It,c as St,d as pe,e as Ot,R as zt,C as Re}from"./use-session-canvas-BvvO-_V1.js";import{f as xs,g as gs,h as vs,b as ys,j as bs}from"./use-session-canvas-BvvO-_V1.js";import{A as Mt}from"./McpAppFrame-Dm7MqOhc.js";import{F as Ut}from"./file-BIF-4ARS.js";import{F as Ee}from"./file-text-C_NPIQr4.js";import{R as Lt}from"./rotate-cw-uoeBxIeM.js";import{a as $t}from"./use-room-follow-claim-Dwke6RFQ.js";import{D as F}from"./detail-row-CjwI1iuc.js";import{R as Ft}from"./rotate-ccw-clock-qJSWqifh.js";import{c as Pt,F as Ht}from"./room-files-source-9Wdtc-bG.js";import"./query-keys-DeYqUDia.js";import"./index.esm-CYmalBux.js";import"./WidgetErrorCard-Bwlfu514.js";import"./index-Ci_J5Q-6.js";import"./progress-Cr-4myw6.js";import"./markdown-content-BRaPEOC7.js";import"./table-dWrfPeX-.js";import"./package-DBsl3ao5.js";import"./heart-BHMhDZ0K.js";import"./git-branch-Df7a5_fb.js";import"./more-details-oDazWBxm.js";import"./copy-button-DjAoGwds.js";import"./file-exclamation-point-DxadH2b-.js";/**
1
+ var tt=Object.defineProperty;var nt=(e,n,s)=>n in e?tt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s;var Y=(e,n,s)=>nt(e,typeof n!="symbol"?n+"":n,s);import{O as A,a5 as D,kC as st,r as h,aN as at,kD as ue,aL as rt,j as t,ir as W,kE as ot,g as Z,kF as ee,kG as te,G as O,kH as it,k9 as lt,X as ct,kI as dt,B as b,ej as ut,_ as L,aR as mt,kJ as ht,a6 as ne,a7 as se,a8 as K,a2 as ye,eH as pt,eI as ft,x as xt,by as be,bz as we,bA as je,bC as ke,b9 as gt,f_ as vt,kK as yt,kL as bt,kf as wt,kM as jt,kN as kt,kO as me,J as Nt,hf as Ne,aZ as k,gL as Ct,gR as Rt,kP as Et,dR as he,kQ as Tt,kR as At,kS as Dt}from"./index-BYTLOFNS.js";import{u as _t}from"./use-roving-tab-list-HB0egh1C.js";import{F as Ce,i as It,c as St,d as pe,e as Ot,R as zt,C as Re}from"./use-session-canvas-Cc04zSW3.js";import{f as gs,g as vs,h as ys,b as bs,j as ws}from"./use-session-canvas-Cc04zSW3.js";import{A as Mt}from"./McpAppFrame-DAPJUxUi.js";import{F as Ut}from"./file-C_57RCIQ.js";import{F as Ee}from"./file-text-CS9s0qOe.js";import{R as Lt}from"./rotate-cw-CpuoCwEK.js";import{a as $t}from"./use-room-follow-claim-CpOIUcG7.js";import{D as F}from"./detail-row-BvEUzVxe.js";import{R as Ft}from"./rotate-ccw-clock-DzVWecfL.js";import{c as Pt,F as Ht}from"./room-files-source-CKjJxFRA.js";import"./query-keys-DeYqUDia.js";import"./index.esm-B0kiCgAP.js";import"./WidgetErrorCard-B477vOv2.js";import"./index-D0k8LoLP.js";import"./progress-CNm_pBbE.js";import"./markdown-content-C1i_dR6j.js";import"./table-BrvyPoEL.js";import"./zap-BmeuEI5X.js";import"./package-DHEY3aDq.js";import"./heart-DKWg_e72.js";import"./git-branch-DpByNz2U.js";import"./more-details-DNp6DH8i.js";import"./copy-button-BodCVufV.js";import"./file-exclamation-point-C7C2dM_w.js";/**
2
2
  * @license lucide-react v1.48.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -40,4 +40,4 @@ var tt=Object.defineProperty;var nt=(e,n,s)=>n in e?tt(e,n,{enumerable:!0,config
40
40
  * See the LICENSE file in the root directory of this source tree.
41
41
  */const Me={name:"waypoints",size:24,node:[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]]};Me.node;const qt=A(Me);function Qt(e){const n=D(),{roomId:s,viewerAuthorId:r,documentId:l,url:m,readScrollY:o,subscribe:i}=e,a=st(s,r),g=h.useRef({roomId:s,documentId:l,url:m,readScrollY:o});g.current={roomId:s,documentId:l,url:m,readScrollY:o};const p=h.useRef(null),d=h.useRef(0);h.useEffect(()=>{if(!a||s===null||l===null)return;const x=()=>{p.current=null,d.current=Date.now();const w=g.current;if(w.roomId===null||w.documentId===null)return;const E=w.roomId,I={documentId:w.documentId,...w.url!==void 0?{url:w.url}:{},...w.readScrollY?{scrollY:Math.max(0,Math.round(w.readScrollY()))}:{}};n.publishRoomView(E,I).then(z=>{!z.followed&&r!==null&&rt.getState().noteNobodyFollowing(E,r)}).catch(()=>{})},y=()=>{if(p.current!==null)return;const w=Date.now()-d.current;if(w>=ue){x();return}p.current=setTimeout(x,ue-w)};y();const c=i==null?void 0:i(y),R=setInterval(y,at);return()=>{clearInterval(R),c==null||c()}},[n,a,s,r,l,m,i]),h.useEffect(()=>()=>{p.current!==null&&clearTimeout(p.current)},[])}const Jt={url:W,markdown:Ee,json:De,image:Vt,pdf:Ut,widget:ot,mcp_app:Mt,file:Ce,model3d:Gt,audio:Bt,video:Wt,csv:Yt,browser:W,diff:Kt},Xt="after:absolute after:inset-x-0 after:-inset-y-2 md:after:hidden";function ae(e){return e==="browser"?"browser-panel":"canvas-panel"}const Zt={canvas:"Open canvas documents",browser:"Open browser pages"};function re(e){return`canvas-tab-${e}`}const en=3;function tn(e){const n=e.map(r=>r.displayName);if(n.length===0)return null;if(n.length===1)return`${n[0]} is looking at this.`;if(n.length===2)return`${n[0]} and ${n[1]} are looking at this.`;const s=n.length-2;return`${n[0]}, ${n[1]} and ${s} ${s===1?"other":"others"} are looking at this.`}function nn({watchers:e}){const n=tn(e);if(n===null)return null;const s=e.slice(0,en),r=e.length-s.length;return t.jsxs(t.Fragment,{children:[t.jsxs("span",{"data-slot":"canvas-tab-watchers","aria-hidden":!0,className:"flex shrink-0 -space-x-1",children:[s.map(l=>t.jsx(Z,{size:"xs",className:"ring-background text-3xs size-3.5 ring-1",kind:l.kind,color:l.color??te(l.id),emoji:l.emoji,imageUrl:l.imageUrl,badge:null,fallback:ee(l.displayName)},l.id)),r>0&&t.jsxs("span",{className:"bg-muted text-muted-foreground ring-background text-3xs flex size-3.5 shrink-0 items-center justify-center rounded-full ring-1",children:["+",r]})]}),t.jsx("span",{className:"sr-only",children:n})]})}function Ue({view:e,documents:n,activeDocumentId:s,onActivate:r,onClose:l,onPin:m}){const o=ae(e),{getTabProps:i}=_t({orderedIds:n.map(a=>a.id),activeId:s,onActivate:a=>r(a),onClose:a=>l(a),getFallbackFocus:()=>document.getElementById(o)});return n.length===0?null:t.jsx("div",{role:"tablist","aria-label":Zt[e],className:"flex items-stretch gap-1 overflow-x-auto border-b px-2 py-1",children:n.map(a=>{const g=Jt[a.contentType],p=a.id===s,d=a.author;return t.jsxs("div",{role:"presentation",className:"group relative flex shrink-0",children:[t.jsxs("button",{type:"button",role:"tab","aria-selected":p,id:re(a.id),"aria-controls":p?o:void 0,...i(a.id),className:O("focus-ring flex items-center gap-1.5 rounded-md py-3 pl-2 text-xs transition-colors md:py-1",m?"pr-12":"pr-7",p?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[d&&t.jsx(Z,{"aria-hidden":!0,size:"xs",className:"text-3xs size-3.5 shrink-0",kind:d.kind,color:d.color??te(d.id),emoji:d.emoji,imageUrl:d.imageUrl,badge:null,fallback:ee(d.displayName)}),t.jsx(g,{className:"size-3.5 shrink-0"}),t.jsx("span",{className:"max-w-40 truncate font-medium",children:a.sourceLabel}),a.watchers&&a.watchers.length>0&&t.jsx(nn,{watchers:a.watchers}),a.unread&&t.jsx("span",{"data-slot":"canvas-tab-unread","aria-hidden":!0,className:"bg-primary size-1.5 shrink-0 rounded-full"})]}),m&&t.jsx("button",{type:"button",tabIndex:-1,onClick:()=>m(a.id,!a.pinned),"aria-label":a.pinned?`Unpin ${a.sourceLabel}`:`Pin ${a.sourceLabel}`,className:O("focus-ring hover:bg-background/80 absolute top-1/2 right-6 -translate-y-1/2 rounded-sm p-1.5 transition-opacity md:p-0.5",a.pinned?"opacity-100":"opacity-0 group-hover:opacity-60"),children:a.pinned?t.jsx(it,{className:"size-3"}):t.jsx(lt,{className:"size-3"})}),t.jsx("button",{type:"button",tabIndex:-1,onClick:()=>l(a.id),"aria-label":`Close ${a.sourceLabel}`,className:O("focus-ring hover:bg-background/80 absolute top-1/2 right-1 -translate-y-1/2 rounded-sm p-1.5 opacity-60 transition-opacity group-hover:opacity-100 md:p-0.5",Xt),children:t.jsx(ct,{className:"size-3"})})]},a.id)})})}function sn({error:e,onRetry:n}){const s=dt(e);return t.jsxs("div",{className:"text-muted-foreground flex h-full flex-col items-center justify-center gap-3 p-8 text-center",children:[t.jsx("p",{children:"This tab hit a problem"}),s?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"text-sm",children:"The app may have updated. Reloading usually fixes it."}),t.jsx(b,{type:"button",size:"sm",onClick:()=>window.location.reload(),children:"Reload DorkOS"})]}):t.jsxs(b,{type:"button",variant:"outline",size:"sm",onClick:n,children:[t.jsx(Lt,{className:"size-4"}),"Try again"]})]})}class Le extends h.Component{constructor(){super(...arguments);Y(this,"state",{error:null,retryKey:0});Y(this,"handleRetry",()=>{this.setState(s=>({error:null,retryKey:s.retryKey+1}))})}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,r){console.error(`[Canvas] Document viewer error (${this.props.documentId}):`,s,r)}render(){const{error:s,retryKey:r}=this.state;return s?t.jsx(sn,{error:s,onRetry:this.handleRetry}):t.jsx(h.Fragment,{children:this.props.children},r)}}function an({onReload:e,onKeepMine:n}){return t.jsxs("div",{role:"status",className:"border-border/60 bg-muted/40 mx-2 mt-2 space-y-2 rounded-md border px-3 py-2 text-sm",children:[t.jsx("p",{children:"Your agent changed this while you were editing. Your edit is safe."}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsx(b,{type:"button",variant:"outline",size:"sm",onClick:e,children:"Reload"}),t.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:n,children:"Keep mine"})]}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Reload shows its version and ends your edit. Keep mine discards it."})]})}const rn={canvas:{heading:"A blank canvas",blurb:"Your agent can show documents, data and files here.",actions:[{icon:Ee,label:"Markdown",description:"Render a document",action:()=>({type:"markdown",content:`# Untitled
42
42
 
43
- Start writing…`,title:"Document"})},{icon:De,label:"JSON",description:"Inspect structured data",action:()=>({type:"json",data:{message:"Your data here"},title:"JSON data"})}]},browser:{heading:"No page open",blurb:"This tab shows web pages: your files, dev servers, or sites from your agent.",actions:[{icon:W,label:"Web page",description:"Open a page, then type any address",action:()=>({type:"url",url:ht.site,title:"Web Page"})}]}};function q(e,n,s,r){return e.split("").reduce((m,o)=>m+o.charCodeAt(0),0)*(n+1)*7%(r-s)+s}function $e({view:e,onAction:n}){const s=ut(),r=h.useId(),l=rn[e],m=h.useMemo(()=>Array.from({length:6},(o,i)=>({x:q(r,i*3,10,90),y:q(r,i*3+1,10,80),size:q(r,i*3+2,24,56),delay:i*.4})),[r]);return t.jsxs("div",{className:"relative flex h-full flex-col items-center justify-center overflow-hidden px-6",children:[!s&&m.map((o,i)=>t.jsx(L.div,{className:"border-border/40 absolute rounded-lg border",style:{left:`${o.x}%`,top:`${o.y}%`,width:o.size,height:o.size},initial:{opacity:0,scale:.6,rotate:-10},animate:{opacity:[0,.15,.08,.15],scale:[.6,1,.9,1],rotate:[-10,0,5,0]},transition:{duration:8,delay:o.delay,repeat:1/0,repeatType:"reverse",ease:"easeInOut"}},i)),t.jsxs(L.div,{className:"relative z-10 flex max-w-sm flex-col items-center gap-6 text-center",initial:s?!1:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},children:[t.jsx(L.div,{className:"bg-muted/50 text-muted-foreground flex size-14 items-center justify-center rounded-2xl",initial:s?!1:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.3,delay:.1},children:e==="browser"?t.jsx(W,{className:"size-7"}):t.jsx(mt,{className:"size-7"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h2",{className:"text-lg font-semibold tracking-tight",children:l.heading}),t.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:[l.blurb,t.jsx("br",{}),"Or pick a starting point below."]})]}),t.jsx(L.div,{className:"mt-2 flex w-full flex-col gap-2",initial:"hidden",animate:"visible",variants:s?{}:{visible:{transition:{staggerChildren:.08,delayChildren:.25}}},children:l.actions.map(({icon:o,label:i,description:a,action:g})=>t.jsxs(L.button,{variants:s?{}:{hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},transition:{duration:.25},className:"border-border hover:bg-accent/50 flex items-center gap-3 rounded-lg border px-4 py-3 text-left transition-colors",onClick:()=>n(g()),children:[t.jsx(o,{className:"text-muted-foreground size-4 shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("span",{className:"text-sm font-medium",children:i}),t.jsx("span",{className:"text-muted-foreground ml-2 text-xs",children:a})]})]},i))})]})]})}const Fe=[{value:"hour",label:"1 hour",ms:36e5},{value:"day",label:"1 day",ms:864e5},{value:"week",label:"1 week",ms:6048e5}];function fe(e,n=Date.now()){const s=Fe.find(r=>r.value===e).ms;return new Date(Math.ceil((n+s)/6e4)*6e4).toISOString()}const on=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});function B(e){return on.format(new Date(e))}function $(e){switch(e.kind){case"log":return"Kept on this document";case"room":return e.agentName?`To ${e.agentName} in this room`:"To this room";case"owner":return e.agentName?`To ${e.agentName}`:"To the agent that opened this";case"agent":return e.agentName?`To ${e.agentName}`:"To an agent that’s gone"}}const ln={no_grant:"Off",granted:"On",waiting:"Waiting for you",suspended:"Paused",revoked:"Turned off",expired:"Ended"};function Pe(e){return ln[e]}function cn(e){const n=e.grant;switch(e.state){case"granted":return n!=null&&n.expiresAt?`Until ${B(n.expiresAt)}`:"On";case"waiting":return"An agent asked for this route.";case"suspended":return"The route or its app changed. Allow it again.";case"revoked":return n!=null&&n.revokedAt?`Turned off ${B(n.revokedAt)}`:"Turned off";case"expired":return n!=null&&n.expiresAt?`Ended ${B(n.expiresAt)}`:"Ended";case"no_grant":return e.needsPerson?"Needs your approval to start work.":"Off until someone allows it."}}function He(e){const n=`${e.turnsPerHour} ${e.turnsPerHour===1?"turn":"turns"} an hour`,s=`${e.eventsPerMinute} ${e.eventsPerMinute===1?"event":"events"} a minute`;return`${n} · ${s}`}function Ge(e){return`${Pe(e.state)}: ${$(e.destination)}`}function dn(e){const n=e==null?void 0:e.code;return typeof n=="string"&&mn.has(n)}function un(e){return{on:e.filter(n=>n.state==="granted").length,waiting:e.filter(n=>n.state==="waiting").length}}const P="This route changed. Review it again.",mn=new Set(["ROUTE_CHANGED","GRANT_BINDING_CHANGED","DECLARATION_HASH_MISMATCH","MANIFEST_CHANGED"]),H="Only a signed-in person can change routes.",xe={ROUTE_CHANGED:P,GRANT_BINDING_CHANGED:P,DECLARATION_HASH_MISMATCH:P,MANIFEST_CHANGED:P,ROUTE_UNDECLARED:"This document no longer declares that route.",ROUTE_ALREADY_ON:"This route is already on.",ROUTE_ALREADY_GRANTED:"This route is already on.",APPROVAL_NOT_RECORDED:"Couldn’t record the approval. Nothing was allowed.",TARGET_UNAVAILABLE:"The agent for this route isn’t available.",TARGET_IDENTITY_MISMATCH:"The agent for this route isn’t available.",TARGET_SCOPE_MISMATCH:"The agent for this route isn’t available.",ROOM_ROUTE_UNAVAILABLE:"This room can’t take events right now.",ORIGIN_AUTHORITY_LOST:"The agent that opened this isn’t available.",GRANT_EXPIRED:"That end time has passed. Pick another.",AGENT_CANNOT_DECIDE:H,REQUESTER_CANNOT_DECIDE:H,PERSON_REQUIRED:H,operator_cookie_required:H,AUTH_REQUIRED:"Sign in to change routes."};function Q(e){const n=e==null?void 0:e.code;return typeof n=="string"&&xe[n]?xe[n]:e instanceof TypeError?"Couldn’t reach DorkOS. Check your connection.":"Couldn’t change this route. Try again."}const J=e=>["canvas-doc-routes",e];function hn(e,n){const s=D();return ne({queryKey:J(e),queryFn:()=>s.getCanvasDocRoutes(e),retry:!1,networkMode:"always",staleTime:5e3,refetchInterval:n?15e3:6e4})}function pn(e,n,s){const r=D();return ne({queryKey:["canvas-doc-route-review",e,n,s],queryFn:()=>r.reviewCanvasDocRoute(e,n,{expiresAt:s}),enabled:s!==null,retry:!1,networkMode:"always",staleTime:1/0,gcTime:0})}function Be(e){const n=D(),s=se(),r=o=>{s.setQueryData(J(e),i=>i&&{...i,routes:i.routes.map(a=>a.id===o.route.id?o.route:a)}),s.invalidateQueries({queryKey:J(e)})},l=K({mutationFn:o=>n.approveCanvasDocRoute(e,o.routeId,{expiresAt:o.expiresAt,reviewHash:o.reviewHash}),networkMode:"always",onSuccess:r}),m=K({mutationFn:o=>n.revokeCanvasDocRoute(e,o.routeId),networkMode:"always",onSuccess:r});return{approve:l,revoke:m}}function fn(e){return window.addEventListener("online",e),window.addEventListener("offline",e),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",e)}}function xn(){return h.useSyncExternalStore(fn,()=>navigator.onLine,()=>!0)}const gn={no_grant:"neutral",granted:"success",waiting:"warning",suspended:"warning",revoked:"neutral",expired:"neutral"};function vn({documentId:e,route:n,online:s,onDone:r,onAnnounce:l}){const m=h.useId(),[o,i]=h.useState("day"),[a,g]=h.useState(()=>fe("day")),p=pn(e,n.id,a),{approve:d}=Be(e),x=p.data,y=()=>{x&&d.mutate({routeId:n.id,expiresAt:x.expiresAt,reviewHash:x.reviewHash},{onSuccess:c=>{l(Ge(c.route)),r()},onError:c=>{dn(c)&&p.refetch()}})};return t.jsxs("section",{"aria-labelledby":m,"data-testid":`doc-route-review-${n.id}`,className:"bg-background space-y-3 rounded-md p-3",children:[t.jsx("h4",{id:m,className:"text-sm font-medium",children:"Allow this route?"}),t.jsx(pt,{"aria-label":"How long",value:o,onValueChange:c=>{i(c),g(fe(c))},children:Fe.map(c=>t.jsx(ft,{value:c.value,children:c.label},c.value))}),t.jsx("div",{className:"min-h-20 space-y-1.5 text-xs",children:x?t.jsxs(t.Fragment,{children:[t.jsx(F,{label:"Goes to",align:"start",wrap:!0,children:$(x.destination)}),t.jsx(F,{label:"Events",align:"start",wrap:!0,children:t.jsx("code",{className:"font-mono",children:x.allowedTypes.join(", ")})}),t.jsx(F,{label:"Limits",align:"start",wrap:!0,children:He(x.limits)}),t.jsx(F,{label:"Ends",align:"start",wrap:!0,children:B(x.expiresAt)})]}):p.isError?t.jsx("p",{role:"alert",className:"text-destructive",children:Q(p.error)}):t.jsxs("p",{className:"text-muted-foreground flex items-center gap-2",children:[t.jsx(xt,{size:"xs"}),"Checking details…"]})}),d.isError&&t.jsx("p",{role:"alert",className:"text-destructive text-xs",children:Q(d.error)}),t.jsxs("div",{className:"flex justify-end gap-2",children:[p.isError&&t.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>void p.refetch(),children:"Try again"}),t.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:r,children:"Cancel"}),t.jsx(b,{type:"button",size:"sm","data-testid":`doc-route-allow-${n.id}`,disabled:!x||p.isFetching||!s||d.isPending,onClick:y,children:d.isPending?"Allowing…":"Allow route"})]})]})}function yn({documentId:e,route:n,online:s,onAnnounce:r}){const[l,m]=h.useState(!1),{revoke:o}=Be(e),i=n.state==="granted"&&n.grant!==null,a=()=>{o.mutate({routeId:n.id},{onSuccess:g=>r(Ge(g.route))})};return t.jsxs("li",{"data-testid":`doc-route-${n.id}`,"data-state":n.state,className:"bg-muted/40 space-y-2 rounded-md p-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-2",children:[t.jsxs("div",{className:"min-w-0 space-y-0.5",children:[t.jsx("p",{className:"truncate text-sm font-medium",title:$(n.destination),children:$(n.destination)}),t.jsxs("p",{className:"text-muted-foreground truncate text-xs",children:[t.jsx("code",{className:"font-mono",children:n.on})," · ",n.id]})]}),t.jsx(ye,{shape:"pill",variant:"outline",size:"xs",tone:gn[n.state],"data-testid":`doc-route-state-${n.id}`,className:"shrink-0",children:Pe(n.state)})]}),t.jsx("p",{className:"text-muted-foreground text-xs",children:cn(n)}),i&&n.grant&&t.jsx("p",{className:"text-muted-foreground text-xs",children:He(n.grant.limits)}),o.isError&&t.jsx("p",{role:"alert",className:"text-destructive text-xs",children:Q(o.error)}),l?t.jsx(vn,{documentId:e,route:n,online:s,onAnnounce:r,onDone:()=>m(!1)}):t.jsx("div",{className:"flex justify-end",children:i?t.jsx(b,{type:"button",variant:"outline",size:"sm","data-testid":`doc-route-turn-off-${n.id}`,disabled:!s||o.isPending,onClick:a,children:o.isPending?"Turning off…":"Turn off"}):t.jsx(b,{type:"button",variant:"outline",size:"sm","data-testid":`doc-route-review-button-${n.id}`,disabled:!s,onClick:()=>m(!0),children:"Review"})})]})}function bn(e){return e==="expired"?"Never started":"May have run"}function wn(e){return e==="expired"?"It waited a day and never started.":"It reached the agent, but its result is unknown."}function jn(e){switch(e.replay){case"ready":return null;case"no_grant":return"This route is off. Allow it to run this again.";case"route_changed":return"The route changed, so this can’t run again.";case"inputs_gone":return"Some of its events are no longer kept.";case"still_running":return"It may still be running. Check back once it stops.";case"route_busy":return e.status==="in_doubt"?"Newer work is waiting behind this. Clear it to continue.":"Newer work is waiting on this route. Try again after it runs."}}function kn(e){return`${e} ${e===1?"event":"events"}`}function Nn(e){return`${e} to review`}const G="Only a signed-in person can change this.",ge="This work changed. The list is up to date now.",ve={WORK_ALREADY_REVIEWED:"This was already run again or cleared.",WORK_STILL_RUNNING:"It may still be running. Try again once it stops.",WORK_NOT_FOUND:ge,WORK_NOT_REVIEWABLE:ge,CONFIRM_REPEAT_REQUIRED:"Confirm before running this again.",GRANT_REQUIRED:"This route is off. Allow it first.",GRANT_REVOKED:"This route is off. Allow it first.",GRANT_EXPIRED:"This route’s approval ended. Allow it again first.",MANIFEST_CHANGED:"The document’s app changed. Allow the route again.",ROUTE_CHANGED:"The route changed, so this can’t run again.",INPUTS_GONE:"Some of its events are no longer kept.",ROUTE_BUSY:"Newer work is waiting on this route.",AGENT_CANNOT_DECIDE:G,REQUESTER_CANNOT_DECIDE:G,PERSON_REQUIRED:G,operator_cookie_required:G,AUTH_REQUIRED:"Sign in to change this."};function Cn(e){const n=e==null?void 0:e.code;return typeof n=="string"&&ve[n]?ve[n]:e instanceof TypeError?"Couldn’t reach DorkOS. Check your connection.":"Couldn’t change this work. Try again."}const X=e=>["canvas-doc-work",e];function Rn(e,n,s){const r=D();return ne({queryKey:X(e),queryFn:()=>r.getCanvasDocWork(e),enabled:n,retry:!1,networkMode:"always",staleTime:5e3,refetchInterval:s?15e3:6e4})}function En(e){const n=D(),s=se(),r=i=>s.setQueryData(X(e),a=>a&&{...a,items:a.items.filter(g=>g.batchId!==i.batchId)}),l=()=>void s.invalidateQueries({queryKey:X(e)}),m=K({mutationFn:i=>n.replayCanvasDocWork(e,i.batchId,i.confirmRepeat?{confirmRepeat:!0}:{}),networkMode:"always",onSuccess:r,onSettled:l}),o=K({mutationFn:i=>n.clearCanvasDocWork(e,i.batchId),networkMode:"always",onSuccess:r,onSettled:l});return{replay:m,clear:o}}function Tn({documentId:e,item:n,route:s,online:r,onAnnounce:l}){const[m,o]=h.useState(!1),[i,a]=h.useState(null),g=h.useRef(null),p=h.useRef(null),{replay:d,clear:x}=En(e),y=d.isPending||x.isPending,c=n.replay==="still_running",R=jn(n),w=s?$(s.destination):n.routeId,E=n.status==="in_doubt",I=d.error??x.error;h.useEffect(()=>{var C,T;i==="cancel"&&((C=g.current)==null||C.focus()),i==="replay"&&((T=p.current)==null||T.focus())},[i,m]);const z=()=>{o(!0),a("cancel")},V=()=>{o(!1),a("replay")},N=C=>{x.reset(),d.mutate({batchId:n.batchId,...C?{confirmRepeat:C}:{}},{onSuccess:()=>l(`Running again: ${w}`)})},_=()=>{d.reset(),x.mutate({batchId:n.batchId},{onSuccess:()=>l(`Cleared: ${w}`)})};return t.jsxs("li",{"data-testid":`doc-work-${n.batchId}`,"data-status":n.status,className:"bg-muted/40 space-y-2 rounded-md p-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-2",children:[t.jsxs("div",{className:"min-w-0 space-y-0.5",children:[t.jsx("p",{className:"truncate text-sm font-medium",title:w,children:w}),t.jsxs("p",{className:"text-muted-foreground truncate text-xs",children:[kn(n.eventCount)," · ",gt(n.since)]})]}),t.jsx(ye,{shape:"pill",variant:"outline",size:"xs",tone:E?"warning":"neutral",className:"shrink-0",children:bn(n.status)})]}),t.jsx("p",{className:"text-muted-foreground text-xs",children:wn(n.status)}),R&&t.jsx("p",{"data-testid":`doc-work-blocked-${n.batchId}`,className:"text-muted-foreground text-xs",children:R}),I&&t.jsx("p",{role:"alert",className:"text-destructive text-xs",children:Cn(I)}),m?t.jsxs("div",{"data-testid":`doc-work-confirm-${n.batchId}`,className:"bg-background space-y-2 rounded-md p-3",children:[t.jsx("p",{className:"text-sm font-medium",children:"Run this again?"}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"It may repeat what the agent already did."}),t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx(b,{ref:g,type:"button",variant:"ghost",size:"sm",onClick:V,children:"Cancel"}),t.jsx(b,{type:"button",size:"sm","data-testid":`doc-work-confirm-replay-${n.batchId}`,disabled:!r||y,onClick:()=>N(!0),children:d.isPending?"Starting…":"Run again"})]})]}):t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx(b,{type:"button",variant:"ghost",size:"sm","data-testid":`doc-work-clear-${n.batchId}`,disabled:!r||y||c,onClick:_,children:x.isPending?"Clearing…":"Clear"}),t.jsx(b,{ref:p,type:"button",variant:"outline",size:"sm","data-testid":`doc-work-replay-${n.batchId}`,disabled:!r||y||R!==null,onClick:()=>E?z():N(),children:d.isPending?"Starting…":"Run again"})]})]})}function An({documentId:e,routes:n,online:s}){var y;const[r,l]=h.useState(!1),[m,o]=h.useState(""),i=Rn(e,n.length>0,r),a=h.useCallback(c=>o(c),[]),g=((y=i.data)==null?void 0:y.items)??[],p=t.jsx("p",{"aria-live":"polite",className:"sr-only",children:m});if(g.length===0)return p;const d=Nn(g.length),x=g.some(c=>c.status==="in_doubt");return t.jsxs(t.Fragment,{children:[p,t.jsxs(be,{open:r,onOpenChange:l,modal:!0,fullHeight:!0,children:[t.jsx(we,{asChild:!0,children:t.jsxs(b,{type:"button",variant:"ghost",size:"sm","data-testid":"doc-work-trigger","aria-label":`Unfinished work: ${d}`,className:"h-6 gap-1.5 px-1.5",children:[t.jsx(Ft,{className:"size-3.5"}),t.jsxs("span",{className:O("flex items-center gap-1",x?"text-status-warning-fg":"text-muted-foreground"),children:[x&&t.jsx("span",{"aria-hidden":!0,className:"bg-status-warning size-1.5 rounded-full"}),d]})]})}),t.jsxs(je,{align:"end","aria-label":"Unfinished work","data-testid":"doc-work-panel",className:"flex max-h-[min(70vh,36rem)] w-[min(24rem,calc(100vw-2rem))] flex-col gap-3 overflow-y-auto p-3",children:[t.jsx(ke,{children:"Unfinished work"}),t.jsxs("div",{className:"space-y-1",children:[t.jsx("h3",{className:"hidden text-sm font-medium md:block",children:"Unfinished work"}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Nothing runs again until you choose."})]}),!s&&t.jsx("p",{className:"bg-status-warning-bg text-status-warning-fg rounded-md px-2 py-1.5 text-xs",children:"Offline. Changes wait until you reconnect."}),i.isError&&t.jsxs("div",{role:"alert",className:"flex items-center justify-between gap-2 text-xs",children:[t.jsx("span",{className:"text-destructive",children:"Couldn’t refresh this list."}),t.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>void i.refetch(),children:"Try again"})]}),t.jsx("ul",{className:"space-y-2","aria-label":"Work to review",children:g.map(c=>t.jsx(Tn,{documentId:e,item:c,route:n.find(R=>R.id===c.routeId),online:s,onAnnounce:a},c.batchId))})]})]})]})}function Dn(e,n){return n>0?`${n} waiting`:e>0?`${e} on`:"Off"}function We({documentId:e}){var x;const[n,s]=h.useState(!1),[r,l]=h.useState(""),m=xn(),o=hn(e,n),i=h.useCallback(y=>l(y),[]),a=((x=o.data)==null?void 0:x.routes)??[];if(a.length===0)return null;const{on:g,waiting:p}=un(a),d=Dn(g,p);return t.jsxs("div",{"data-testid":"doc-routes-bar",className:"text-muted-foreground flex items-center justify-end gap-1 border-b px-3 py-1 text-xs",children:[t.jsx(An,{documentId:e,routes:a,online:m}),t.jsxs(be,{open:n,onOpenChange:s,modal:!0,fullHeight:!0,children:[t.jsx(we,{asChild:!0,children:t.jsxs(b,{type:"button",variant:"ghost",size:"sm","data-testid":"doc-routes-trigger","aria-label":`Event routes: ${d}`,className:"h-6 gap-1.5 px-1.5",children:[t.jsx(qt,{className:"size-3.5"}),"Routes",t.jsxs("span",{className:O("flex items-center gap-1",p>0?"text-status-warning-fg":"text-muted-foreground"),children:[p>0&&t.jsx("span",{"aria-hidden":!0,className:"bg-status-warning size-1.5 rounded-full"}),d]})]})}),t.jsxs(je,{align:"end","aria-label":"Event routes","data-testid":"doc-routes-panel",className:"flex max-h-[min(70vh,36rem)] w-[min(24rem,calc(100vw-2rem))] flex-col gap-3 overflow-y-auto p-3",children:[t.jsx(ke,{children:"Event routes"}),t.jsxs("div",{className:"space-y-1",children:[t.jsx("h3",{className:"hidden text-sm font-medium md:block",children:"Event routes"}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"A route does nothing until it’s allowed."})]}),!m&&t.jsx("p",{"data-testid":"doc-routes-offline",className:"bg-status-warning-bg text-status-warning-fg rounded-md px-2 py-1.5 text-xs",children:"Offline. Changes wait until you reconnect."}),o.isError&&t.jsxs("div",{role:"alert",className:"flex items-center justify-between gap-2 text-xs",children:[t.jsx("span",{className:"text-destructive",children:"Couldn’t refresh routes."}),t.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>void o.refetch(),children:"Try again"})]}),t.jsx("ul",{className:"space-y-2","aria-label":"Declared routes",children:a.map(y=>t.jsx(yn,{documentId:e,route:y,online:m,onAnnounce:i},y.id))}),t.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:r})]})]})]})}function _n({sourceLabel:e,people:n,following:s,onFollow:r,onStopFollowing:l,onDiscuss:m,discussing:o=!1}){const i=n.find(a=>a.id===s)??null;return e===void 0&&n.length===0&&m===void 0?null:t.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 border-b px-3 py-1 text-xs",children:[e!==void 0&&t.jsx("span",{className:"min-w-0 flex-1 truncate",children:e}),e===void 0&&t.jsx("span",{className:"flex-1"}),m&&t.jsxs(b,{type:"button",variant:"ghost",size:"sm",className:"h-6 gap-1 px-1.5",disabled:o,onClick:m,children:[t.jsx(vt,{className:"size-3.5"}),"Discuss"]}),n.length>0&&t.jsxs(yt,{children:[t.jsx(bt,{asChild:!0,children:t.jsxs(b,{type:"button",variant:"ghost",size:"sm",className:O("h-6 gap-1 px-1.5",i&&"text-foreground"),children:[t.jsx(wt,{className:"size-3.5"}),i?`Following ${i.displayName}`:"Follow"]})}),t.jsxs(jt,{align:"end",children:[t.jsx(kt,{children:"Follow somebody’s browser"}),n.map(a=>t.jsxs(me,{onSelect:()=>a.id===s?l():r(a.id),children:[t.jsx(Z,{"aria-hidden":!0,size:"xs",className:"size-4 shrink-0 text-[9px]",kind:a.kind,color:a.color??te(a.id),emoji:a.emoji,imageUrl:a.imageUrl,badge:null,fallback:ee(a.displayName)}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.displayName}),a.id===s&&t.jsx(Nt,{className:"size-3.5 shrink-0"})]},a.id)),i&&t.jsx(me,{onSelect:l,children:"Stop following"})]})]})]})}function In({roomId:e,document:n,reading:s}){const r=D(),l=se(),[m,o]=h.useState(null),i=h.useMemo(()=>Pt({transport:r,queryClient:l,roomId:e}),[r,l,e]);return t.jsxs("div",{className:"flex h-full items-start justify-center p-6",children:[t.jsxs("div",{className:"bg-card shadow-soft w-full max-w-md space-y-3 rounded-lg border p-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ce,{className:"text-muted-foreground size-4 shrink-0"}),t.jsx("span",{className:"truncate text-sm font-medium",children:n.title||s.sourcePath})]}),t.jsx("p",{className:"text-muted-foreground font-mono text-xs break-all",children:s.sourcePath}),s.kind==="elsewhere"?t.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s.sentence}):t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:"A room file. Each save is recorded with your name."}),t.jsx(b,{type:"button",size:"sm",onClick:()=>o(s.sourcePath),children:"Open file"})]})]}),s.kind==="room-file"&&t.jsx(Ht,{source:i,path:m,onClose:()=>o(null)})]})}const Sn=["image","pdf","audio","video","csv","model3d"];function On(e){return/^(https?:|data:)/.test(e)||It(e)}function zn(e){if(e.type==="file"||e.type==="diff")return e.sourcePath;if(e.type==="markdown")return e.sourcePath??null;if(Sn.includes(e.type)){const n=e.src;return On(n)?null:n}return null}function Mn(e){return e.type==="file"||e.type==="diff"||e.type==="markdown"}function Un(e){const n=/^(?:in )?(.+?)['’]s /.exec(e.sourceLabel??"");return(n==null?void 0:n[1])??"another member"}function Ln(e){const n=zn(e.content);if(n===null)return{kind:"inline"};if(e.treeKind==="room-main"||e.treeKind===void 0)return Mn(e.content)?{kind:"room-file",sourcePath:n}:{kind:"elsewhere",sourcePath:n,sentence:"This file is in the room’s files. Open it from Files in the Room tab."};if(e.content.type==="diff"&&e.treeKind==="worktree"&&typeof e.aheadOfMain=="number"&&e.aheadOfMain>0)return{kind:"worktree-diff",sourcePath:n,content:e.content};if(e.content.type==="markdown")return{kind:"inline"};const s=Un(e);return{kind:"elsewhere",sourcePath:n,sentence:`${s.charAt(0).toUpperCase()}${s.slice(1)}’s project isn’t open to you. Ask them to share it, or open your copy.`}}function $n(e){return e.title||e.contentType}function Fn({roomId:e,document:n,onUpdate:s}){const r=Ln(n);return r.kind==="worktree-diff"?t.jsx(At,{roomId:e,content:r.content,documentId:n.id,authorId:n.authorId}):r.kind!=="inline"?t.jsx(In,{roomId:e,document:n,reading:r}):n.content.type==="markdown"?t.jsx(zt,{roomId:e,document:n,content:n.content,onSave:s}):t.jsx(Re,{documentId:n.id,content:n.content,onContentChange:()=>{}})}function Ke({roomId:e,view:n}){var le;const s=Ne(),r=k(u=>u.roomCanvasDocuments[e]),l=k(u=>{var f;return((f=u.roomCanvasActive[e])==null?void 0:f[n])??null}),m=k(u=>{var f;return(f=u.roomCanvasUnread[e])==null?void 0:f[n]}),o=k(u=>u.activateRoomCanvasDocument),i=k(u=>u.clearRoomCanvasUnread),a=k(u=>u.roomCanvasPresence[e]),g=St(e),p=Ct(e),d=D(),x=((le=p.data)==null?void 0:le.viewerAuthorId)??null,y=k(u=>u.roomCanvasEditing[e]??null),c=Rt(u=>u.openThread),[R,w]=h.useState(!1),E=n==="browser"?e:null,{following:I,follow:z,stop:V}=$t(E),N=Et(E),_=h.useRef(null),C=h.useCallback(async(u,f)=>{try{return await f(),!0}catch(M){return he.error(u,{description:pe(M)}),!1}},[]),T=h.useMemo(()=>Tt(r??[],n),[r,n]),j=T.find(u=>u.id===l)??null,oe=(m==null?void 0:m.length)??0;h.useEffect(()=>{oe>0&&i(e,n)},[oe,i,e,n]);const Ye=h.useMemo(()=>{var ce;const u=new Map(((ce=p.data)==null?void 0:ce.members.map(v=>[v.author.id,v.author]))??[]),f=v=>({id:v.id,displayName:v.displayName,kind:v.kind,...v.emoji?{emoji:v.emoji}:{},...v.color?{color:v.color}:{},...v.imageUrl?{imageUrl:v.imageUrl}:{}}),M=new Map;for(const[v,U]of Object.entries(a??{})){if(v===x)continue;const S=u.get(v);if(!S)continue;const de=M.get(U);de?de.push(f(S)):M.set(U,[f(S)])}return T.map(v=>{const U=u.get(v.authorId),S=M.get(v.id);return{id:v.id,sourceLabel:$n(v),contentType:v.content.type,pinned:v.pinned,unread:(m==null?void 0:m.includes(v.id))??!1,...U?{author:f(U)}:{},...S?{watchers:S}:{}}})},[T,p.data,m,a,x]);Ot(e,(j==null?void 0:j.id)??null);const qe=h.useMemo(()=>{var u;return(((u=p.data)==null?void 0:u.members)??[]).map(f=>f.author).filter(f=>f.kind==="human"&&f.id!==x).map(f=>({id:f.id,displayName:f.displayName,kind:f.kind,emoji:f.emoji,color:f.color,imageUrl:f.imageUrl}))},[p.data,x]),Qe=k(u=>{if(l===null)return;const f=u.browserHistories[l];return f?f.stack[f.cursor]:void 0}),Je=h.useCallback(()=>{var u;return((u=_.current)==null?void 0:u.scrollTop)??0},[]),Xe=h.useCallback(u=>{const f=_.current;return f?(f.addEventListener("scroll",u,{passive:!0}),()=>f.removeEventListener("scroll",u)):()=>{}},[]);Qt({roomId:E,viewerAuthorId:x,documentId:l,url:Qe,readScrollY:Je,subscribe:Xe});const ie=h.useMemo(()=>T.map(u=>u.id).join("\0"),[T]);h.useEffect(()=>{if(!(N===null||y!==null)&&ie.split("\0").includes(N.documentId)){if(N.documentId!==l){o(e,N.documentId);return}N.scrollY!==void 0&&_.current&&(_.current.scrollTop=N.scrollY)}},[N,y,l,ie,o,e]);const Ze=h.useCallback(()=>{j!==null&&(w(!0),d.discussCanvasDocument(e,j.id).then(u=>c(e,u.threadRootEntryId,!1)).catch(u=>{he.error("Couldn’t start a discussion.",{description:pe(u)})}).finally(()=>w(!1)))},[j,d,e,c]),et=ae(n);return t.jsxs(t.Fragment,{children:[!s&&t.jsx(Ue,{view:n,documents:Ye,activeDocumentId:l,onActivate:u=>o(e,u),onClose:u=>void C("Couldn’t take that off the canvas.",()=>g.close(u)),onPin:(u,f)=>void C(f?"Couldn’t pin that.":"Couldn’t unpin that.",()=>g.pin(u,f))}),t.jsx(_n,{sourceLabel:j==null?void 0:j.sourceLabel,people:n==="browser"?qe:[],following:I,onFollow:z,onStopFollowing:V,onDiscuss:j===null?void 0:Ze,discussing:R}),j&&t.jsx(We,{documentId:j.id},j.id),t.jsx("div",{id:et,ref:_,tabIndex:-1,className:"min-h-0 flex-1 overflow-auto focus-visible:outline-none",...!s&&j?{role:"tabpanel","aria-labelledby":re(j.id)}:{},children:j?t.jsx(Le,{documentId:j.id,children:t.jsx(Fn,{roomId:e,document:j,onUpdate:(u,f)=>C("Couldn’t save that for the room.",()=>g.update(u,f))})},j.id):t.jsx($e,{view:n,onAction:u=>void C("Couldn’t put that on the canvas.",()=>g.open(u))})})]})}function Ve({view:e}){const n=Ne(),s=k(c=>c.openDocuments),r=k(c=>e==="browser"?c.activeBrowserDocumentId:c.activeCanvasDocumentId),l=k(c=>c.activateCanvasDocument),m=k(c=>c.closeCanvasDocument),o=k(c=>c.setDocumentContent),i=k(c=>c.openCanvasDocument),a=k(c=>c.applyHeldUpdate),g=k(c=>c.discardHeldUpdate),p=Dt(s,e),d=p.find(c=>c.id===r)??null,x=p.map(c=>({id:c.id,sourceLabel:c.sourceLabel,contentType:c.content.type})),y=ae(e);return t.jsxs(t.Fragment,{children:[!n&&t.jsx(Ue,{view:e,documents:x,activeDocumentId:r,onActivate:l,onClose:m}),d&&t.jsx(We,{documentId:d.id},d.id),(d==null?void 0:d.heldUpdate)&&t.jsx(an,{onReload:()=>a(d.id),onKeepMine:()=>g(d.id)}),t.jsx("div",{id:y,tabIndex:-1,className:"min-h-0 flex-1 overflow-auto focus-visible:outline-none",...!n&&d?{role:"tabpanel","aria-labelledby":re(d.id)}:{},children:d?t.jsx(Le,{documentId:d.id,children:t.jsx(Re,{documentId:d.id,content:d.content,onContentChange:c=>o(d.id,c)})},d.id):t.jsx($e,{view:e,onAction:i})})]})}function ms(){const e=k(n=>n.roomCanvasLiveRoomId);return t.jsx("div",{"data-slot":"canvas",className:"flex h-full flex-col overflow-hidden",children:e?t.jsx(Ke,{roomId:e,view:"canvas"}):t.jsx(Ve,{view:"canvas"})})}function hs(){const e=k(n=>n.roomCanvasLiveRoomId);return t.jsx("div",{"data-slot":"browser",className:"flex h-full flex-col overflow-hidden",children:e?t.jsx(Ke,{roomId:e,view:"browser"}):t.jsx(Ve,{view:"browser"})})}export{hs as BrowserContent,ms as CanvasContent,xs as CanvasWidgetContent,gs as resetSessionCanvasImport,vs as useDevtoolsBridge,ys as useDocChannel,bs as useSessionCanvas};
43
+ Start writing…`,title:"Document"})},{icon:De,label:"JSON",description:"Inspect structured data",action:()=>({type:"json",data:{message:"Your data here"},title:"JSON data"})}]},browser:{heading:"No page open",blurb:"This tab shows web pages: your files, dev servers, or sites from your agent.",actions:[{icon:W,label:"Web page",description:"Open a page, then type any address",action:()=>({type:"url",url:ht.site,title:"Web Page"})}]}};function q(e,n,s,r){return e.split("").reduce((m,o)=>m+o.charCodeAt(0),0)*(n+1)*7%(r-s)+s}function $e({view:e,onAction:n}){const s=ut(),r=h.useId(),l=rn[e],m=h.useMemo(()=>Array.from({length:6},(o,i)=>({x:q(r,i*3,10,90),y:q(r,i*3+1,10,80),size:q(r,i*3+2,24,56),delay:i*.4})),[r]);return t.jsxs("div",{className:"relative flex h-full flex-col items-center justify-center overflow-hidden px-6",children:[!s&&m.map((o,i)=>t.jsx(L.div,{className:"border-border/40 absolute rounded-lg border",style:{left:`${o.x}%`,top:`${o.y}%`,width:o.size,height:o.size},initial:{opacity:0,scale:.6,rotate:-10},animate:{opacity:[0,.15,.08,.15],scale:[.6,1,.9,1],rotate:[-10,0,5,0]},transition:{duration:8,delay:o.delay,repeat:1/0,repeatType:"reverse",ease:"easeInOut"}},i)),t.jsxs(L.div,{className:"relative z-10 flex max-w-sm flex-col items-center gap-6 text-center",initial:s?!1:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},children:[t.jsx(L.div,{className:"bg-muted/50 text-muted-foreground flex size-14 items-center justify-center rounded-2xl",initial:s?!1:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.3,delay:.1},children:e==="browser"?t.jsx(W,{className:"size-7"}):t.jsx(mt,{className:"size-7"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h2",{className:"text-lg font-semibold tracking-tight",children:l.heading}),t.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:[l.blurb,t.jsx("br",{}),"Or pick a starting point below."]})]}),t.jsx(L.div,{className:"mt-2 flex w-full flex-col gap-2",initial:"hidden",animate:"visible",variants:s?{}:{visible:{transition:{staggerChildren:.08,delayChildren:.25}}},children:l.actions.map(({icon:o,label:i,description:a,action:g})=>t.jsxs(L.button,{variants:s?{}:{hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},transition:{duration:.25},className:"border-border hover:bg-accent/50 flex items-center gap-3 rounded-lg border px-4 py-3 text-left transition-colors",onClick:()=>n(g()),children:[t.jsx(o,{className:"text-muted-foreground size-4 shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("span",{className:"text-sm font-medium",children:i}),t.jsx("span",{className:"text-muted-foreground ml-2 text-xs",children:a})]})]},i))})]})]})}const Fe=[{value:"hour",label:"1 hour",ms:36e5},{value:"day",label:"1 day",ms:864e5},{value:"week",label:"1 week",ms:6048e5}];function fe(e,n=Date.now()){const s=Fe.find(r=>r.value===e).ms;return new Date(Math.ceil((n+s)/6e4)*6e4).toISOString()}const on=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});function B(e){return on.format(new Date(e))}function $(e){switch(e.kind){case"log":return"Kept on this document";case"room":return e.agentName?`To ${e.agentName} in this room`:"To this room";case"owner":return e.agentName?`To ${e.agentName}`:"To the agent that opened this";case"agent":return e.agentName?`To ${e.agentName}`:"To an agent that’s gone"}}const ln={no_grant:"Off",granted:"On",waiting:"Waiting for you",suspended:"Paused",revoked:"Turned off",expired:"Ended"};function Pe(e){return ln[e]}function cn(e){const n=e.grant;switch(e.state){case"granted":return n!=null&&n.expiresAt?`Until ${B(n.expiresAt)}`:"On";case"waiting":return"An agent asked for this route.";case"suspended":return"The route or its app changed. Allow it again.";case"revoked":return n!=null&&n.revokedAt?`Turned off ${B(n.revokedAt)}`:"Turned off";case"expired":return n!=null&&n.expiresAt?`Ended ${B(n.expiresAt)}`:"Ended";case"no_grant":return e.needsPerson?"Needs your approval to start work.":"Off until someone allows it."}}function He(e){const n=`${e.turnsPerHour} ${e.turnsPerHour===1?"turn":"turns"} an hour`,s=`${e.eventsPerMinute} ${e.eventsPerMinute===1?"event":"events"} a minute`;return`${n} · ${s}`}function Ge(e){return`${Pe(e.state)}: ${$(e.destination)}`}function dn(e){const n=e==null?void 0:e.code;return typeof n=="string"&&mn.has(n)}function un(e){return{on:e.filter(n=>n.state==="granted").length,waiting:e.filter(n=>n.state==="waiting").length}}const P="This route changed. Review it again.",mn=new Set(["ROUTE_CHANGED","GRANT_BINDING_CHANGED","DECLARATION_HASH_MISMATCH","MANIFEST_CHANGED"]),H="Only a signed-in person can change routes.",xe={ROUTE_CHANGED:P,GRANT_BINDING_CHANGED:P,DECLARATION_HASH_MISMATCH:P,MANIFEST_CHANGED:P,ROUTE_UNDECLARED:"This document no longer declares that route.",ROUTE_ALREADY_ON:"This route is already on.",ROUTE_ALREADY_GRANTED:"This route is already on.",APPROVAL_NOT_RECORDED:"Couldn’t record the approval. Nothing was allowed.",TARGET_UNAVAILABLE:"The agent for this route isn’t available.",TARGET_IDENTITY_MISMATCH:"The agent for this route isn’t available.",TARGET_SCOPE_MISMATCH:"The agent for this route isn’t available.",ROOM_ROUTE_UNAVAILABLE:"This room can’t take events right now.",ORIGIN_AUTHORITY_LOST:"The agent that opened this isn’t available.",GRANT_EXPIRED:"That end time has passed. Pick another.",AGENT_CANNOT_DECIDE:H,REQUESTER_CANNOT_DECIDE:H,PERSON_REQUIRED:H,operator_cookie_required:H,AUTH_REQUIRED:"Sign in to change routes."};function Q(e){const n=e==null?void 0:e.code;return typeof n=="string"&&xe[n]?xe[n]:e instanceof TypeError?"Couldn’t reach DorkOS. Check your connection.":"Couldn’t change this route. Try again."}const J=e=>["canvas-doc-routes",e];function hn(e,n){const s=D();return ne({queryKey:J(e),queryFn:()=>s.getCanvasDocRoutes(e),retry:!1,networkMode:"always",staleTime:5e3,refetchInterval:n?15e3:6e4})}function pn(e,n,s){const r=D();return ne({queryKey:["canvas-doc-route-review",e,n,s],queryFn:()=>r.reviewCanvasDocRoute(e,n,{expiresAt:s}),enabled:s!==null,retry:!1,networkMode:"always",staleTime:1/0,gcTime:0})}function Be(e){const n=D(),s=se(),r=o=>{s.setQueryData(J(e),i=>i&&{...i,routes:i.routes.map(a=>a.id===o.route.id?o.route:a)}),s.invalidateQueries({queryKey:J(e)})},l=K({mutationFn:o=>n.approveCanvasDocRoute(e,o.routeId,{expiresAt:o.expiresAt,reviewHash:o.reviewHash}),networkMode:"always",onSuccess:r}),m=K({mutationFn:o=>n.revokeCanvasDocRoute(e,o.routeId),networkMode:"always",onSuccess:r});return{approve:l,revoke:m}}function fn(e){return window.addEventListener("online",e),window.addEventListener("offline",e),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",e)}}function xn(){return h.useSyncExternalStore(fn,()=>navigator.onLine,()=>!0)}const gn={no_grant:"neutral",granted:"success",waiting:"warning",suspended:"warning",revoked:"neutral",expired:"neutral"};function vn({documentId:e,route:n,online:s,onDone:r,onAnnounce:l}){const m=h.useId(),[o,i]=h.useState("day"),[a,g]=h.useState(()=>fe("day")),p=pn(e,n.id,a),{approve:d}=Be(e),x=p.data,y=()=>{x&&d.mutate({routeId:n.id,expiresAt:x.expiresAt,reviewHash:x.reviewHash},{onSuccess:c=>{l(Ge(c.route)),r()},onError:c=>{dn(c)&&p.refetch()}})};return t.jsxs("section",{"aria-labelledby":m,"data-testid":`doc-route-review-${n.id}`,className:"bg-background space-y-3 rounded-md p-3",children:[t.jsx("h4",{id:m,className:"text-sm font-medium",children:"Allow this route?"}),t.jsx(pt,{"aria-label":"How long",value:o,onValueChange:c=>{i(c),g(fe(c))},children:Fe.map(c=>t.jsx(ft,{value:c.value,children:c.label},c.value))}),t.jsx("div",{className:"min-h-20 space-y-1.5 text-xs",children:x?t.jsxs(t.Fragment,{children:[t.jsx(F,{label:"Goes to",align:"start",wrap:!0,children:$(x.destination)}),t.jsx(F,{label:"Events",align:"start",wrap:!0,children:t.jsx("code",{className:"font-mono",children:x.allowedTypes.join(", ")})}),t.jsx(F,{label:"Limits",align:"start",wrap:!0,children:He(x.limits)}),t.jsx(F,{label:"Ends",align:"start",wrap:!0,children:B(x.expiresAt)})]}):p.isError?t.jsx("p",{role:"alert",className:"text-destructive",children:Q(p.error)}):t.jsxs("p",{className:"text-muted-foreground flex items-center gap-2",children:[t.jsx(xt,{size:"xs"}),"Checking details…"]})}),d.isError&&t.jsx("p",{role:"alert",className:"text-destructive text-xs",children:Q(d.error)}),t.jsxs("div",{className:"flex justify-end gap-2",children:[p.isError&&t.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>void p.refetch(),children:"Try again"}),t.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:r,children:"Cancel"}),t.jsx(b,{type:"button",size:"sm","data-testid":`doc-route-allow-${n.id}`,disabled:!x||p.isFetching||!s||d.isPending,onClick:y,children:d.isPending?"Allowing…":"Allow route"})]})]})}function yn({documentId:e,route:n,online:s,onAnnounce:r}){const[l,m]=h.useState(!1),{revoke:o}=Be(e),i=n.state==="granted"&&n.grant!==null,a=()=>{o.mutate({routeId:n.id},{onSuccess:g=>r(Ge(g.route))})};return t.jsxs("li",{"data-testid":`doc-route-${n.id}`,"data-state":n.state,className:"bg-muted/40 space-y-2 rounded-md p-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-2",children:[t.jsxs("div",{className:"min-w-0 space-y-0.5",children:[t.jsx("p",{className:"truncate text-sm font-medium",title:$(n.destination),children:$(n.destination)}),t.jsxs("p",{className:"text-muted-foreground truncate text-xs",children:[t.jsx("code",{className:"font-mono",children:n.on})," · ",n.id]})]}),t.jsx(ye,{shape:"pill",variant:"outline",size:"xs",tone:gn[n.state],"data-testid":`doc-route-state-${n.id}`,className:"shrink-0",children:Pe(n.state)})]}),t.jsx("p",{className:"text-muted-foreground text-xs",children:cn(n)}),i&&n.grant&&t.jsx("p",{className:"text-muted-foreground text-xs",children:He(n.grant.limits)}),o.isError&&t.jsx("p",{role:"alert",className:"text-destructive text-xs",children:Q(o.error)}),l?t.jsx(vn,{documentId:e,route:n,online:s,onAnnounce:r,onDone:()=>m(!1)}):t.jsx("div",{className:"flex justify-end",children:i?t.jsx(b,{type:"button",variant:"outline",size:"sm","data-testid":`doc-route-turn-off-${n.id}`,disabled:!s||o.isPending,onClick:a,children:o.isPending?"Turning off…":"Turn off"}):t.jsx(b,{type:"button",variant:"outline",size:"sm","data-testid":`doc-route-review-button-${n.id}`,disabled:!s,onClick:()=>m(!0),children:"Review"})})]})}function bn(e){return e==="expired"?"Never started":"May have run"}function wn(e){return e==="expired"?"It waited a day and never started.":"It reached the agent, but its result is unknown."}function jn(e){switch(e.replay){case"ready":return null;case"no_grant":return"This route is off. Allow it to run this again.";case"route_changed":return"The route changed, so this can’t run again.";case"inputs_gone":return"Some of its events are no longer kept.";case"still_running":return"It may still be running. Check back once it stops.";case"route_busy":return e.status==="in_doubt"?"Newer work is waiting behind this. Clear it to continue.":"Newer work is waiting on this route. Try again after it runs."}}function kn(e){return`${e} ${e===1?"event":"events"}`}function Nn(e){return`${e} to review`}const G="Only a signed-in person can change this.",ge="This work changed. The list is up to date now.",ve={WORK_ALREADY_REVIEWED:"This was already run again or cleared.",WORK_STILL_RUNNING:"It may still be running. Try again once it stops.",WORK_NOT_FOUND:ge,WORK_NOT_REVIEWABLE:ge,CONFIRM_REPEAT_REQUIRED:"Confirm before running this again.",GRANT_REQUIRED:"This route is off. Allow it first.",GRANT_REVOKED:"This route is off. Allow it first.",GRANT_EXPIRED:"This route’s approval ended. Allow it again first.",MANIFEST_CHANGED:"The document’s app changed. Allow the route again.",ROUTE_CHANGED:"The route changed, so this can’t run again.",INPUTS_GONE:"Some of its events are no longer kept.",ROUTE_BUSY:"Newer work is waiting on this route.",AGENT_CANNOT_DECIDE:G,REQUESTER_CANNOT_DECIDE:G,PERSON_REQUIRED:G,operator_cookie_required:G,AUTH_REQUIRED:"Sign in to change this."};function Cn(e){const n=e==null?void 0:e.code;return typeof n=="string"&&ve[n]?ve[n]:e instanceof TypeError?"Couldn’t reach DorkOS. Check your connection.":"Couldn’t change this work. Try again."}const X=e=>["canvas-doc-work",e];function Rn(e,n,s){const r=D();return ne({queryKey:X(e),queryFn:()=>r.getCanvasDocWork(e),enabled:n,retry:!1,networkMode:"always",staleTime:5e3,refetchInterval:s?15e3:6e4})}function En(e){const n=D(),s=se(),r=i=>s.setQueryData(X(e),a=>a&&{...a,items:a.items.filter(g=>g.batchId!==i.batchId)}),l=()=>void s.invalidateQueries({queryKey:X(e)}),m=K({mutationFn:i=>n.replayCanvasDocWork(e,i.batchId,i.confirmRepeat?{confirmRepeat:!0}:{}),networkMode:"always",onSuccess:r,onSettled:l}),o=K({mutationFn:i=>n.clearCanvasDocWork(e,i.batchId),networkMode:"always",onSuccess:r,onSettled:l});return{replay:m,clear:o}}function Tn({documentId:e,item:n,route:s,online:r,onAnnounce:l}){const[m,o]=h.useState(!1),[i,a]=h.useState(null),g=h.useRef(null),p=h.useRef(null),{replay:d,clear:x}=En(e),y=d.isPending||x.isPending,c=n.replay==="still_running",R=jn(n),w=s?$(s.destination):n.routeId,E=n.status==="in_doubt",I=d.error??x.error;h.useEffect(()=>{var C,T;i==="cancel"&&((C=g.current)==null||C.focus()),i==="replay"&&((T=p.current)==null||T.focus())},[i,m]);const z=()=>{o(!0),a("cancel")},V=()=>{o(!1),a("replay")},N=C=>{x.reset(),d.mutate({batchId:n.batchId,...C?{confirmRepeat:C}:{}},{onSuccess:()=>l(`Running again: ${w}`)})},_=()=>{d.reset(),x.mutate({batchId:n.batchId},{onSuccess:()=>l(`Cleared: ${w}`)})};return t.jsxs("li",{"data-testid":`doc-work-${n.batchId}`,"data-status":n.status,className:"bg-muted/40 space-y-2 rounded-md p-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-2",children:[t.jsxs("div",{className:"min-w-0 space-y-0.5",children:[t.jsx("p",{className:"truncate text-sm font-medium",title:w,children:w}),t.jsxs("p",{className:"text-muted-foreground truncate text-xs",children:[kn(n.eventCount)," · ",gt(n.since)]})]}),t.jsx(ye,{shape:"pill",variant:"outline",size:"xs",tone:E?"warning":"neutral",className:"shrink-0",children:bn(n.status)})]}),t.jsx("p",{className:"text-muted-foreground text-xs",children:wn(n.status)}),R&&t.jsx("p",{"data-testid":`doc-work-blocked-${n.batchId}`,className:"text-muted-foreground text-xs",children:R}),I&&t.jsx("p",{role:"alert",className:"text-destructive text-xs",children:Cn(I)}),m?t.jsxs("div",{"data-testid":`doc-work-confirm-${n.batchId}`,className:"bg-background space-y-2 rounded-md p-3",children:[t.jsx("p",{className:"text-sm font-medium",children:"Run this again?"}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"It may repeat what the agent already did."}),t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx(b,{ref:g,type:"button",variant:"ghost",size:"sm",onClick:V,children:"Cancel"}),t.jsx(b,{type:"button",size:"sm","data-testid":`doc-work-confirm-replay-${n.batchId}`,disabled:!r||y,onClick:()=>N(!0),children:d.isPending?"Starting…":"Run again"})]})]}):t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx(b,{type:"button",variant:"ghost",size:"sm","data-testid":`doc-work-clear-${n.batchId}`,disabled:!r||y||c,onClick:_,children:x.isPending?"Clearing…":"Clear"}),t.jsx(b,{ref:p,type:"button",variant:"outline",size:"sm","data-testid":`doc-work-replay-${n.batchId}`,disabled:!r||y||R!==null,onClick:()=>E?z():N(),children:d.isPending?"Starting…":"Run again"})]})]})}function An({documentId:e,routes:n,online:s}){var y;const[r,l]=h.useState(!1),[m,o]=h.useState(""),i=Rn(e,n.length>0,r),a=h.useCallback(c=>o(c),[]),g=((y=i.data)==null?void 0:y.items)??[],p=t.jsx("p",{"aria-live":"polite",className:"sr-only",children:m});if(g.length===0)return p;const d=Nn(g.length),x=g.some(c=>c.status==="in_doubt");return t.jsxs(t.Fragment,{children:[p,t.jsxs(be,{open:r,onOpenChange:l,modal:!0,fullHeight:!0,children:[t.jsx(we,{asChild:!0,children:t.jsxs(b,{type:"button",variant:"ghost",size:"sm","data-testid":"doc-work-trigger","aria-label":`Unfinished work: ${d}`,className:"h-6 gap-1.5 px-1.5",children:[t.jsx(Ft,{className:"size-3.5"}),t.jsxs("span",{className:O("flex items-center gap-1",x?"text-status-warning-fg":"text-muted-foreground"),children:[x&&t.jsx("span",{"aria-hidden":!0,className:"bg-status-warning size-1.5 rounded-full"}),d]})]})}),t.jsxs(je,{align:"end","aria-label":"Unfinished work","data-testid":"doc-work-panel",className:"flex max-h-[min(70vh,36rem)] w-[min(24rem,calc(100vw-2rem))] flex-col gap-3 overflow-y-auto p-3",children:[t.jsx(ke,{children:"Unfinished work"}),t.jsxs("div",{className:"space-y-1",children:[t.jsx("h3",{className:"hidden text-sm font-medium md:block",children:"Unfinished work"}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Nothing runs again until you choose."})]}),!s&&t.jsx("p",{className:"bg-status-warning-bg text-status-warning-fg rounded-md px-2 py-1.5 text-xs",children:"Offline. Changes wait until you reconnect."}),i.isError&&t.jsxs("div",{role:"alert",className:"flex items-center justify-between gap-2 text-xs",children:[t.jsx("span",{className:"text-destructive",children:"Couldn’t refresh this list."}),t.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>void i.refetch(),children:"Try again"})]}),t.jsx("ul",{className:"space-y-2","aria-label":"Work to review",children:g.map(c=>t.jsx(Tn,{documentId:e,item:c,route:n.find(R=>R.id===c.routeId),online:s,onAnnounce:a},c.batchId))})]})]})]})}function Dn(e,n){return n>0?`${n} waiting`:e>0?`${e} on`:"Off"}function We({documentId:e}){var x;const[n,s]=h.useState(!1),[r,l]=h.useState(""),m=xn(),o=hn(e,n),i=h.useCallback(y=>l(y),[]),a=((x=o.data)==null?void 0:x.routes)??[];if(a.length===0)return null;const{on:g,waiting:p}=un(a),d=Dn(g,p);return t.jsxs("div",{"data-testid":"doc-routes-bar",className:"text-muted-foreground flex items-center justify-end gap-1 border-b px-3 py-1 text-xs",children:[t.jsx(An,{documentId:e,routes:a,online:m}),t.jsxs(be,{open:n,onOpenChange:s,modal:!0,fullHeight:!0,children:[t.jsx(we,{asChild:!0,children:t.jsxs(b,{type:"button",variant:"ghost",size:"sm","data-testid":"doc-routes-trigger","aria-label":`Event routes: ${d}`,className:"h-6 gap-1.5 px-1.5",children:[t.jsx(qt,{className:"size-3.5"}),"Routes",t.jsxs("span",{className:O("flex items-center gap-1",p>0?"text-status-warning-fg":"text-muted-foreground"),children:[p>0&&t.jsx("span",{"aria-hidden":!0,className:"bg-status-warning size-1.5 rounded-full"}),d]})]})}),t.jsxs(je,{align:"end","aria-label":"Event routes","data-testid":"doc-routes-panel",className:"flex max-h-[min(70vh,36rem)] w-[min(24rem,calc(100vw-2rem))] flex-col gap-3 overflow-y-auto p-3",children:[t.jsx(ke,{children:"Event routes"}),t.jsxs("div",{className:"space-y-1",children:[t.jsx("h3",{className:"hidden text-sm font-medium md:block",children:"Event routes"}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"A route does nothing until it’s allowed."})]}),!m&&t.jsx("p",{"data-testid":"doc-routes-offline",className:"bg-status-warning-bg text-status-warning-fg rounded-md px-2 py-1.5 text-xs",children:"Offline. Changes wait until you reconnect."}),o.isError&&t.jsxs("div",{role:"alert",className:"flex items-center justify-between gap-2 text-xs",children:[t.jsx("span",{className:"text-destructive",children:"Couldn’t refresh routes."}),t.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>void o.refetch(),children:"Try again"})]}),t.jsx("ul",{className:"space-y-2","aria-label":"Declared routes",children:a.map(y=>t.jsx(yn,{documentId:e,route:y,online:m,onAnnounce:i},y.id))}),t.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:r})]})]})]})}function _n({sourceLabel:e,people:n,following:s,onFollow:r,onStopFollowing:l,onDiscuss:m,discussing:o=!1}){const i=n.find(a=>a.id===s)??null;return e===void 0&&n.length===0&&m===void 0?null:t.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 border-b px-3 py-1 text-xs",children:[e!==void 0&&t.jsx("span",{className:"min-w-0 flex-1 truncate",children:e}),e===void 0&&t.jsx("span",{className:"flex-1"}),m&&t.jsxs(b,{type:"button",variant:"ghost",size:"sm",className:"h-6 gap-1 px-1.5",disabled:o,onClick:m,children:[t.jsx(vt,{className:"size-3.5"}),"Discuss"]}),n.length>0&&t.jsxs(yt,{children:[t.jsx(bt,{asChild:!0,children:t.jsxs(b,{type:"button",variant:"ghost",size:"sm",className:O("h-6 gap-1 px-1.5",i&&"text-foreground"),children:[t.jsx(wt,{className:"size-3.5"}),i?`Following ${i.displayName}`:"Follow"]})}),t.jsxs(jt,{align:"end",children:[t.jsx(kt,{children:"Follow somebody’s browser"}),n.map(a=>t.jsxs(me,{onSelect:()=>a.id===s?l():r(a.id),children:[t.jsx(Z,{"aria-hidden":!0,size:"xs",className:"size-4 shrink-0 text-[9px]",kind:a.kind,color:a.color??te(a.id),emoji:a.emoji,imageUrl:a.imageUrl,badge:null,fallback:ee(a.displayName)}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.displayName}),a.id===s&&t.jsx(Nt,{className:"size-3.5 shrink-0"})]},a.id)),i&&t.jsx(me,{onSelect:l,children:"Stop following"})]})]})]})}function In({roomId:e,document:n,reading:s}){const r=D(),l=se(),[m,o]=h.useState(null),i=h.useMemo(()=>Pt({transport:r,queryClient:l,roomId:e}),[r,l,e]);return t.jsxs("div",{className:"flex h-full items-start justify-center p-6",children:[t.jsxs("div",{className:"bg-card shadow-soft w-full max-w-md space-y-3 rounded-lg border p-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ce,{className:"text-muted-foreground size-4 shrink-0"}),t.jsx("span",{className:"truncate text-sm font-medium",children:n.title||s.sourcePath})]}),t.jsx("p",{className:"text-muted-foreground font-mono text-xs break-all",children:s.sourcePath}),s.kind==="elsewhere"?t.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s.sentence}):t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:"A room file. Each save is recorded with your name."}),t.jsx(b,{type:"button",size:"sm",onClick:()=>o(s.sourcePath),children:"Open file"})]})]}),s.kind==="room-file"&&t.jsx(Ht,{source:i,path:m,onClose:()=>o(null)})]})}const Sn=["image","pdf","audio","video","csv","model3d"];function On(e){return/^(https?:|data:)/.test(e)||It(e)}function zn(e){if(e.type==="file"||e.type==="diff")return e.sourcePath;if(e.type==="markdown")return e.sourcePath??null;if(Sn.includes(e.type)){const n=e.src;return On(n)?null:n}return null}function Mn(e){return e.type==="file"||e.type==="diff"||e.type==="markdown"}function Un(e){const n=/^(?:in )?(.+?)['’]s /.exec(e.sourceLabel??"");return(n==null?void 0:n[1])??"another member"}function Ln(e){const n=zn(e.content);if(n===null)return{kind:"inline"};if(e.treeKind==="room-main"||e.treeKind===void 0)return Mn(e.content)?{kind:"room-file",sourcePath:n}:{kind:"elsewhere",sourcePath:n,sentence:"This file is in the room’s files. Open it from Files in the Room tab."};if(e.content.type==="diff"&&e.treeKind==="worktree"&&typeof e.aheadOfMain=="number"&&e.aheadOfMain>0)return{kind:"worktree-diff",sourcePath:n,content:e.content};if(e.content.type==="markdown")return{kind:"inline"};const s=Un(e);return{kind:"elsewhere",sourcePath:n,sentence:`${s.charAt(0).toUpperCase()}${s.slice(1)}’s project isn’t open to you. Ask them to share it, or open your copy.`}}function $n(e){return e.title||e.contentType}function Fn({roomId:e,document:n,onUpdate:s}){const r=Ln(n);return r.kind==="worktree-diff"?t.jsx(At,{roomId:e,content:r.content,documentId:n.id,authorId:n.authorId}):r.kind!=="inline"?t.jsx(In,{roomId:e,document:n,reading:r}):n.content.type==="markdown"?t.jsx(zt,{roomId:e,document:n,content:n.content,onSave:s}):t.jsx(Re,{documentId:n.id,content:n.content,onContentChange:()=>{}})}function Ke({roomId:e,view:n}){var le;const s=Ne(),r=k(u=>u.roomCanvasDocuments[e]),l=k(u=>{var f;return((f=u.roomCanvasActive[e])==null?void 0:f[n])??null}),m=k(u=>{var f;return(f=u.roomCanvasUnread[e])==null?void 0:f[n]}),o=k(u=>u.activateRoomCanvasDocument),i=k(u=>u.clearRoomCanvasUnread),a=k(u=>u.roomCanvasPresence[e]),g=St(e),p=Ct(e),d=D(),x=((le=p.data)==null?void 0:le.viewerAuthorId)??null,y=k(u=>u.roomCanvasEditing[e]??null),c=Rt(u=>u.openThread),[R,w]=h.useState(!1),E=n==="browser"?e:null,{following:I,follow:z,stop:V}=$t(E),N=Et(E),_=h.useRef(null),C=h.useCallback(async(u,f)=>{try{return await f(),!0}catch(M){return he.error(u,{description:pe(M)}),!1}},[]),T=h.useMemo(()=>Tt(r??[],n),[r,n]),j=T.find(u=>u.id===l)??null,oe=(m==null?void 0:m.length)??0;h.useEffect(()=>{oe>0&&i(e,n)},[oe,i,e,n]);const Ye=h.useMemo(()=>{var ce;const u=new Map(((ce=p.data)==null?void 0:ce.members.map(v=>[v.author.id,v.author]))??[]),f=v=>({id:v.id,displayName:v.displayName,kind:v.kind,...v.emoji?{emoji:v.emoji}:{},...v.color?{color:v.color}:{},...v.imageUrl?{imageUrl:v.imageUrl}:{}}),M=new Map;for(const[v,U]of Object.entries(a??{})){if(v===x)continue;const S=u.get(v);if(!S)continue;const de=M.get(U);de?de.push(f(S)):M.set(U,[f(S)])}return T.map(v=>{const U=u.get(v.authorId),S=M.get(v.id);return{id:v.id,sourceLabel:$n(v),contentType:v.content.type,pinned:v.pinned,unread:(m==null?void 0:m.includes(v.id))??!1,...U?{author:f(U)}:{},...S?{watchers:S}:{}}})},[T,p.data,m,a,x]);Ot(e,(j==null?void 0:j.id)??null);const qe=h.useMemo(()=>{var u;return(((u=p.data)==null?void 0:u.members)??[]).map(f=>f.author).filter(f=>f.kind==="human"&&f.id!==x).map(f=>({id:f.id,displayName:f.displayName,kind:f.kind,emoji:f.emoji,color:f.color,imageUrl:f.imageUrl}))},[p.data,x]),Qe=k(u=>{if(l===null)return;const f=u.browserHistories[l];return f?f.stack[f.cursor]:void 0}),Je=h.useCallback(()=>{var u;return((u=_.current)==null?void 0:u.scrollTop)??0},[]),Xe=h.useCallback(u=>{const f=_.current;return f?(f.addEventListener("scroll",u,{passive:!0}),()=>f.removeEventListener("scroll",u)):()=>{}},[]);Qt({roomId:E,viewerAuthorId:x,documentId:l,url:Qe,readScrollY:Je,subscribe:Xe});const ie=h.useMemo(()=>T.map(u=>u.id).join("\0"),[T]);h.useEffect(()=>{if(!(N===null||y!==null)&&ie.split("\0").includes(N.documentId)){if(N.documentId!==l){o(e,N.documentId);return}N.scrollY!==void 0&&_.current&&(_.current.scrollTop=N.scrollY)}},[N,y,l,ie,o,e]);const Ze=h.useCallback(()=>{j!==null&&(w(!0),d.discussCanvasDocument(e,j.id).then(u=>c(e,u.threadRootEntryId,!1)).catch(u=>{he.error("Couldn’t start a discussion.",{description:pe(u)})}).finally(()=>w(!1)))},[j,d,e,c]),et=ae(n);return t.jsxs(t.Fragment,{children:[!s&&t.jsx(Ue,{view:n,documents:Ye,activeDocumentId:l,onActivate:u=>o(e,u),onClose:u=>void C("Couldn’t take that off the canvas.",()=>g.close(u)),onPin:(u,f)=>void C(f?"Couldn’t pin that.":"Couldn’t unpin that.",()=>g.pin(u,f))}),t.jsx(_n,{sourceLabel:j==null?void 0:j.sourceLabel,people:n==="browser"?qe:[],following:I,onFollow:z,onStopFollowing:V,onDiscuss:j===null?void 0:Ze,discussing:R}),j&&t.jsx(We,{documentId:j.id},j.id),t.jsx("div",{id:et,ref:_,tabIndex:-1,className:"min-h-0 flex-1 overflow-auto focus-visible:outline-none",...!s&&j?{role:"tabpanel","aria-labelledby":re(j.id)}:{},children:j?t.jsx(Le,{documentId:j.id,children:t.jsx(Fn,{roomId:e,document:j,onUpdate:(u,f)=>C("Couldn’t save that for the room.",()=>g.update(u,f))})},j.id):t.jsx($e,{view:n,onAction:u=>void C("Couldn’t put that on the canvas.",()=>g.open(u))})})]})}function Ve({view:e}){const n=Ne(),s=k(c=>c.openDocuments),r=k(c=>e==="browser"?c.activeBrowserDocumentId:c.activeCanvasDocumentId),l=k(c=>c.activateCanvasDocument),m=k(c=>c.closeCanvasDocument),o=k(c=>c.setDocumentContent),i=k(c=>c.openCanvasDocument),a=k(c=>c.applyHeldUpdate),g=k(c=>c.discardHeldUpdate),p=Dt(s,e),d=p.find(c=>c.id===r)??null,x=p.map(c=>({id:c.id,sourceLabel:c.sourceLabel,contentType:c.content.type})),y=ae(e);return t.jsxs(t.Fragment,{children:[!n&&t.jsx(Ue,{view:e,documents:x,activeDocumentId:r,onActivate:l,onClose:m}),d&&t.jsx(We,{documentId:d.id},d.id),(d==null?void 0:d.heldUpdate)&&t.jsx(an,{onReload:()=>a(d.id),onKeepMine:()=>g(d.id)}),t.jsx("div",{id:y,tabIndex:-1,className:"min-h-0 flex-1 overflow-auto focus-visible:outline-none",...!n&&d?{role:"tabpanel","aria-labelledby":re(d.id)}:{},children:d?t.jsx(Le,{documentId:d.id,children:t.jsx(Re,{documentId:d.id,content:d.content,onContentChange:c=>o(d.id,c)})},d.id):t.jsx($e,{view:e,onAction:i})})]})}function hs(){const e=k(n=>n.roomCanvasLiveRoomId);return t.jsx("div",{"data-slot":"canvas",className:"flex h-full flex-col overflow-hidden",children:e?t.jsx(Ke,{roomId:e,view:"canvas"}):t.jsx(Ve,{view:"canvas"})})}function ps(){const e=k(n=>n.roomCanvasLiveRoomId);return t.jsx("div",{"data-slot":"browser",className:"flex h-full flex-col overflow-hidden",children:e?t.jsx(Ke,{roomId:e,view:"browser"}):t.jsx(Ve,{view:"browser"})})}export{ps as BrowserContent,hs as CanvasContent,gs as CanvasWidgetContent,vs as resetSessionCanvasImport,ys as useDevtoolsBridge,bs as useDocChannel,ws as useSessionCanvas};
@@ -1 +1 @@
1
- import{E as f,j as p,a as x,p as X,e as y,L as h,s as G,t as Q,i as Z,k as S,f as b}from"./index-Di-MIFQG.js";import{html as j}from"./index-DYVNSRDk.js";import{L as V,E as c}from"./index-BLUUshO9.js";import"./index-BwTGkJbK.js";import"./index-CTgUh4p3.js";import"./index-Bd0PAkxf.js";const W=1,k=2,w=3,v=180,R=4,_=181,E=5,z=182,U=6;function D(O){return O>=65&&O<=90||O>=97&&O<=122}const F=new c(O=>{let a=O.pos;for(;;){let{next:r}=O;if(r<0)break;if(r==123){let n=O.peek(1);if(n==123){if(O.pos>a)break;O.acceptToken(W,2);return}else if(n==37){if(O.pos>a)break;let $=2,i=2;for(;;){let e=O.peek($);if(e==32||e==10)++$;else if(e==35)for(++$;;){let t=O.peek($);if(t<0||t==10)break;$++}else if(e==45&&i==2)i=++$;else{let t=e==101&&O.peek($+1)==110&&O.peek($+2)==100;O.acceptToken(t?w:k,i);return}}}}if(O.advance(),r==10)break}O.pos>a&&O.acceptToken(v)});function u(O,a,r){return new c(n=>{let $=n.pos;for(;;){let{next:i}=n;if(i==123&&n.peek(1)==37){let e=2;for(;;e++){let o=n.peek(e);if(o!=32&&o!=10)break}let t="";for(;;e++){let o=n.peek(e);if(!D(o))break;t+=String.fromCharCode(o)}if(t==O){if(n.pos>$)break;n.acceptToken(r,2);break}}else if(i<0)break;if(n.advance(),i==10)break}n.pos>$&&n.acceptToken(a)})}const C=u("endcomment",z,E),Y=u("endraw",_,R),N=new c(O=>{if(O.next==35){for(O.advance();!(O.next==10||O.next<0||(O.next==37||O.next==125)&&O.peek(1)==125);)O.advance();O.acceptToken(U)}}),I={__proto__:null,contains:34,or:38,and:38,true:52,false:52,empty:54,forloop:57,tablerowloop:59,continue:61,in:131,with:197,for:199,as:201,if:237,endif:241,unless:247,endunless:251,elsif:255,else:259,case:265,endcase:269,when:273,endfor:281,tablerow:287,endtablerow:291,break:295,cycle:301,echo:305,render:309,include:313,assign:317,capture:323,endcapture:327,increment:331,decrement:335},L={__proto__:null,if:86,endif:90,elsif:94,else:98,unless:104,endunless:108,case:114,endcase:118,when:122,for:128,endfor:138,tablerow:144,endtablerow:148,break:152,continue:156,cycle:160,comment:166,endcomment:172,raw:178,endraw:184,echo:188,render:192,include:204,assign:208,capture:214,endcapture:218,increment:222,decrement:226,liquid:230},H=V.deserialize({version:14,states:"KtQYOPOOOOOP'#F{'#F{OeOaO'#CdOsQhO'#CfO!bQxO'#DSO#{OPO'#DVO$ZOPO'#D`O$iOPO'#DeO$wOPO'#DlO%VOPO'#DtO%eOSO'#EPO%jOQO'#EVO%oOPO'#EiOOOP'#Ge'#GeOOOP'#G]'#G]OOOP'#Fz'#FzQYOPOOOOOP-E9y-E9yOOQW'#Cg'#CgO&cQ!jO,59QO&jQ!jO'#G^OsQhO'#CtOOQW'#Gb'#GbOOQW'#Gc'#GcOOQW'#Gd'#GdOOQW'#G^'#G^OOOP,59n,59nO)YQhO,59nOsQhO,59rOsQhO,59vO)dQhO,59xOsQhO,59{OsQhO,5:QOsQhO,5:UO!]QhO,5:XO!]QhO,5:aO)iQhO,5:eO)nQhO,5:gO)sQhO,5:iO)xQhO,5:lO)}QhO,5:rOsQhO,5:wOsQhO,5:yOsQhO,5;POsQhO,5;ROsQhO,5;UOsQhO,5;YOsQhO,5;[O+^QhO,5;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cm#z!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#|!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$O!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$Q!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$S!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$U!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT&a$V&cm$X!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$Z!Q#d#g#n#r#u$V$^%q%v%|&S&X&c",nodeNames:"⚠ {{ {% {% {% {% InlineComment Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression contains CompareOp LogicOp AssignmentExpression AssignOp ) ( RangeExpression .. BooleanLiteral empty forloop tablerowloop continue StringLiteral NumberLiteral Filter | FilterName : , Tag TagName %} IfDirective Tag if EndTag endif Tag elsif Tag else UnlessDirective Tag unless EndTag endunless CaseDirective Tag case EndTag endcase Tag when ForDirective Tag for in Parameter ParameterName EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag continue Tag cycle Comment Tag comment CommentText EndTag endcomment RawDirective Tag raw RawText EndTag endraw Tag echo Tag render RenderParameter with for as Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement Tag liquid IfDirective Tag if EndTag endif UnlessDirective Tag unless EndTag endunless Tag elsif Tag else CaseDirective Tag case EndTag endcase Tag when ForDirective Tag EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag Tag cycle Tag echo Tag render Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement",maxTerm:220,nodeProps:[["closedBy",1,"}}",-4,2,3,4,5,"%}",23,")"],["openedBy",9,"{{",22,"(",40,"{%"],["group",-13,11,12,15,16,20,24,26,27,28,29,30,31,32,"Expression"]],skippedNodes:[0,6],repeatNodeCount:11,tokenData:")e~RmXY!|YZ!|]^!|pq!|qr#_rs#juv$[wx$gxy%Syz%X{|%^|}&x}!O&}!O!P'Z!Q![&g![!]'k!^!_'p!_!`'x!`!a'p!c!}(Q!}#O(y#P#Q)O#R#S(Q#T#o(Q#p#q)T#q#r)Y%W;'S(Q;'S;:j(s<%lO(Q~#RS%O~XY!|YZ!|]^!|pq!|~#bP!_!`#e~#jOb~~#mUOY#jZr#jrs$Ps;'S#j;'S;=`$U<%lO#j~$UOo~~$XP;=`<%l#j~$_P#q#r$b~$gOx~~$jUOY$gZw$gwx$Px;'S$g;'S;=`$|<%lO$g~%PP;=`<%l$g~%XOg~~%^Of~P%aQ!O!P%g!Q![&gP%jP!Q![%mP%rRpP!Q![%m!g!h%{#X#Y%{P&OR{|&X}!O&X!Q![&_P&[P!Q![&_P&dPpP!Q![&_P&lSpP!O!P%g!Q![&g!g!h%{#X#Y%{~&}Ou~~'QRuv$[!O!P%g!Q![&g~'`Q]S!O!P'f!Q![%m~'kOi~~'pOt~~'uPb~!_!`#e~'}Pe~!_!`#e_(ZW^WwQ%RT}!O(Q!Q![(Q!c!}(Q#R#S(Q#T#o(Q%W;'S(Q;'S;:j(s<%lO(Q_(vP;=`<%l(Q~)OO%T~~)TO%S~~)YOr~~)]P#q#r)`~)eOX~",tokenizers:[F,Y,C,N,0,1,2,3],topRules:{Template:[0,7]},dynamicPrecedences:{190:1,191:1,192:1,194:1,195:1,196:1,197:1,199:1,200:1,201:1,202:1,203:1,204:1,205:1,206:1,207:1,208:1,209:1,210:1,211:1,212:1,213:1,214:1,215:1,216:1,217:1,218:1,219:1,220:1},specialized:[{term:187,get:O=>I[O]||-1},{term:39,get:O=>L[O]||-1}],tokenPrec:0});function l(O,a){return O.split(" ").map(r=>({label:r,type:a}))}const P=l("abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where","function"),m=l("cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include","keyword"),T=l("empty forloop tablerowloop in with as","keyword"),A=l("first index index0 last length rindex","property"),B=l("col col0 col_first col_last first index index0 last length rindex rindex0 row","property");function M(O){var a;let{state:r,pos:n}=O,$=y(r).resolveInner(n,-1).enterUnfinishedNodesBefore(n),i=((a=$.childBefore(n))===null||a===void 0?void 0:a.name)||$.name;if($.name=="FilterName")return{type:"filter",node:$};if(O.explicit&&i=="|")return{type:"filter"};if($.name=="TagName")return{type:"tag",node:$};if(O.explicit&&i=="{%")return{type:"tag"};if($.name=="PropertyName"&&$.parent.name=="MemberExpression")return{type:"property",node:$,target:$.parent};if($.name=="."&&$.parent.name=="MemberExpression")return{type:"property",target:$.parent};if($.name=="MemberExpression"&&i==".")return{type:"property",target:$};if($.name=="VariableName")return{type:"expression",from:$.from};let e=O.matchBefore(/[\w\u00c0-\uffff]+$/);return e?{type:"expression",from:e.from}:O.explicit&&$.name!="CommentText"&&$.name!="StringLiteral"&&$.name!="NumberLiteral"&&$.name!="InlineComment"?{type:"expression"}:null}function K(O,a,r,n){let $=[];for(;;){let i=a.getChild("Expression");if(!i)return[];if(i.name=="VariableName"||i.name=="forloop"||i.name=="tablerowloop"){let e=O.sliceDoc(i.from,i.to);if(e=="forloop")return $.length?[]:A;if(e=="tablerowloop")return $.length?[]:B;$.unshift(e);break}else if(i.name=="MemberExpression"){let e=i.getChild("PropertyName");e&&$.unshift(O.sliceDoc(e.from,e.to)),a=i}else if(i.name=="SubscriptExpression"){let e=i.getChildren("Expression")[1];$.unshift((e==null?void 0:e.name)=="StringLiteral"?O.sliceDoc(e.from+1,e.to-1):"[]"),a=i}else return[]}return n?n($,O,r):[]}function J(O={}){let a=O.filters?O.filters.concat(P):P,r=O.tags?O.tags.concat(m):m,n=O.variables?O.variables.concat(T):T,{properties:$}=O;return i=>{var e;let t=M(i);if(!t)return null;let o=(e=t.from)!==null&&e!==void 0?e:t.node?t.node.from:i.pos,s;return t.type=="filter"?s=a:t.type=="tag"?s=r:t.type=="expression"?s=n:s=K(i.state,t.target,i,$),s.length?{options:s,from:o,validFor:/^[\w\u00c0-\uffff]*$/}:null}}const OO=f.inputHandler.of((O,a,r,n)=>n!="%"||a!=r||O.state.doc.sliceString(a-1,r+1)!="{}"?!1:(O.dispatch(O.state.changeByRange($=>({changes:{from:$.from,to:$.to,insert:"%%"},range:p.cursor($.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function d(O){return a=>{let r=O.test(a.textAfter);return a.lineIndent(a.node.from)+(r?0:a.unit)}}const $O=h.define({name:"liquid",parser:H.configure({props:[G({"cycle comment endcomment raw endraw echo increment decrement liquid in with as":Q.keyword,"empty forloop tablerowloop":Q.atom,"if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue":Q.controlKeyword,"assign capture endcapture":Q.definitionKeyword,contains:Q.operatorKeyword,"render include":Q.moduleKeyword,VariableName:Q.variableName,TagName:Q.tagName,FilterName:Q.function(Q.variableName),PropertyName:Q.propertyName,CompareOp:Q.compareOperator,AssignOp:Q.definitionOperator,LogicOp:Q.logicOperator,NumberLiteral:Q.number,StringLiteral:Q.string,BooleanLiteral:Q.bool,InlineComment:Q.lineComment,CommentText:Q.blockComment,"{% %} {{ }}":Q.brace,"[ ]":Q.bracket,"( )":Q.paren,".":Q.derefOperator,", .. : |":Q.punctuation}),Z.add({Tag:S({closing:"%}"}),"UnlessDirective ForDirective TablerowDirective CaptureDirective":d(/^\s*(\{%-?\s*)?end\w/),IfDirective:d(/^\s*(\{%-?\s*)?(endif|else|elsif)\b/),CaseDirective:d(/^\s*(\{%-?\s*)?(endcase|when)\b/)}),b.add({"UnlessDirective ForDirective TablerowDirective CaptureDirective IfDirective CaseDirective RawDirective Comment"(O){let a=O.firstChild,r=O.lastChild;return!a||a.name!="Tag"?null:{from:a.to,to:r.name=="EndTag"?r.from:O.to}}})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*{%-?\s*(?:end|elsif|else|when|)$/}}),q=j();function g(O){return $O.configure({wrap:X(a=>a.type.isTop?{parser:O.parser,overlay:r=>r.name=="Text"||r.name=="RawText"}:null)},"liquid")}const aO=g(q.language);function oO(O={}){let a=O.base||q,r=a.language==q.language?aO:g(a.language);return new x(r,[a.support,r.data.of({autocomplete:J(O)}),a.language.data.of({closeBrackets:{brackets:["{"]}}),OO])}export{OO as closePercentBrace,oO as liquid,J as liquidCompletionSource,aO as liquidLanguage};
1
+ import{E as f,j as p,a as x,p as X,e as y,L as h,s as G,t as Q,i as Z,k as S,f as b}from"./index-vEujcopz.js";import{html as j}from"./index-aSuMCzNN.js";import{L as V,E as c}from"./index-DHFIAKQc.js";import"./index-BYTLOFNS.js";import"./index-DNkWdNSz.js";import"./index-DCFKleTS.js";const W=1,k=2,w=3,v=180,R=4,_=181,E=5,z=182,U=6;function D(O){return O>=65&&O<=90||O>=97&&O<=122}const F=new c(O=>{let a=O.pos;for(;;){let{next:r}=O;if(r<0)break;if(r==123){let n=O.peek(1);if(n==123){if(O.pos>a)break;O.acceptToken(W,2);return}else if(n==37){if(O.pos>a)break;let $=2,i=2;for(;;){let e=O.peek($);if(e==32||e==10)++$;else if(e==35)for(++$;;){let t=O.peek($);if(t<0||t==10)break;$++}else if(e==45&&i==2)i=++$;else{let t=e==101&&O.peek($+1)==110&&O.peek($+2)==100;O.acceptToken(t?w:k,i);return}}}}if(O.advance(),r==10)break}O.pos>a&&O.acceptToken(v)});function u(O,a,r){return new c(n=>{let $=n.pos;for(;;){let{next:i}=n;if(i==123&&n.peek(1)==37){let e=2;for(;;e++){let o=n.peek(e);if(o!=32&&o!=10)break}let t="";for(;;e++){let o=n.peek(e);if(!D(o))break;t+=String.fromCharCode(o)}if(t==O){if(n.pos>$)break;n.acceptToken(r,2);break}}else if(i<0)break;if(n.advance(),i==10)break}n.pos>$&&n.acceptToken(a)})}const C=u("endcomment",z,E),Y=u("endraw",_,R),N=new c(O=>{if(O.next==35){for(O.advance();!(O.next==10||O.next<0||(O.next==37||O.next==125)&&O.peek(1)==125);)O.advance();O.acceptToken(U)}}),I={__proto__:null,contains:34,or:38,and:38,true:52,false:52,empty:54,forloop:57,tablerowloop:59,continue:61,in:131,with:197,for:199,as:201,if:237,endif:241,unless:247,endunless:251,elsif:255,else:259,case:265,endcase:269,when:273,endfor:281,tablerow:287,endtablerow:291,break:295,cycle:301,echo:305,render:309,include:313,assign:317,capture:323,endcapture:327,increment:331,decrement:335},L={__proto__:null,if:86,endif:90,elsif:94,else:98,unless:104,endunless:108,case:114,endcase:118,when:122,for:128,endfor:138,tablerow:144,endtablerow:148,break:152,continue:156,cycle:160,comment:166,endcomment:172,raw:178,endraw:184,echo:188,render:192,include:204,assign:208,capture:214,endcapture:218,increment:222,decrement:226,liquid:230},H=V.deserialize({version:14,states:"KtQYOPOOOOOP'#F{'#F{OeOaO'#CdOsQhO'#CfO!bQxO'#DSO#{OPO'#DVO$ZOPO'#D`O$iOPO'#DeO$wOPO'#DlO%VOPO'#DtO%eOSO'#EPO%jOQO'#EVO%oOPO'#EiOOOP'#Ge'#GeOOOP'#G]'#G]OOOP'#Fz'#FzQYOPOOOOOP-E9y-E9yOOQW'#Cg'#CgO&cQ!jO,59QO&jQ!jO'#G^OsQhO'#CtOOQW'#Gb'#GbOOQW'#Gc'#GcOOQW'#Gd'#GdOOQW'#G^'#G^OOOP,59n,59nO)YQhO,59nOsQhO,59rOsQhO,59vO)dQhO,59xOsQhO,59{OsQhO,5:QOsQhO,5:UO!]QhO,5:XO!]QhO,5:aO)iQhO,5:eO)nQhO,5:gO)sQhO,5:iO)xQhO,5:lO)}QhO,5:rOsQhO,5:wOsQhO,5:yOsQhO,5;POsQhO,5;ROsQhO,5;UOsQhO,5;YOsQhO,5;[O+^QhO,5;^O+eOPO'#CdOOOP,59q,59qO#{OPO,59qO+sQxO'#DYOOOP,59z,59zO$ZOPO,59zO+xQxO'#DcOOOP,5:P,5:PO$iOPO,5:PO+}QxO'#DhOOOP,5:W,5:WO$wOPO,5:WO,SQxO'#D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!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$U!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT&a$V&cm$X!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$Z!Q#d#g#n#r#u$V$^%q%v%|&S&X&c",nodeNames:"⚠ {{ {% {% {% {% InlineComment Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression contains CompareOp LogicOp AssignmentExpression AssignOp ) ( RangeExpression .. BooleanLiteral empty forloop tablerowloop continue StringLiteral NumberLiteral Filter | FilterName : , Tag TagName %} IfDirective Tag if EndTag endif Tag elsif Tag else UnlessDirective Tag unless EndTag endunless CaseDirective Tag case EndTag endcase Tag when ForDirective Tag for in Parameter ParameterName EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag continue Tag cycle Comment Tag comment CommentText EndTag endcomment RawDirective Tag raw RawText EndTag endraw Tag echo Tag render RenderParameter with for as Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement Tag liquid IfDirective Tag if EndTag endif UnlessDirective Tag unless EndTag endunless Tag elsif Tag else CaseDirective Tag case EndTag endcase Tag when ForDirective Tag EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag Tag cycle Tag echo Tag render Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement",maxTerm:220,nodeProps:[["closedBy",1,"}}",-4,2,3,4,5,"%}",23,")"],["openedBy",9,"{{",22,"(",40,"{%"],["group",-13,11,12,15,16,20,24,26,27,28,29,30,31,32,"Expression"]],skippedNodes:[0,6],repeatNodeCount:11,tokenData:")e~RmXY!|YZ!|]^!|pq!|qr#_rs#juv$[wx$gxy%Syz%X{|%^|}&x}!O&}!O!P'Z!Q![&g![!]'k!^!_'p!_!`'x!`!a'p!c!}(Q!}#O(y#P#Q)O#R#S(Q#T#o(Q#p#q)T#q#r)Y%W;'S(Q;'S;:j(s<%lO(Q~#RS%O~XY!|YZ!|]^!|pq!|~#bP!_!`#e~#jOb~~#mUOY#jZr#jrs$Ps;'S#j;'S;=`$U<%lO#j~$UOo~~$XP;=`<%l#j~$_P#q#r$b~$gOx~~$jUOY$gZw$gwx$Px;'S$g;'S;=`$|<%lO$g~%PP;=`<%l$g~%XOg~~%^Of~P%aQ!O!P%g!Q![&gP%jP!Q![%mP%rRpP!Q![%m!g!h%{#X#Y%{P&OR{|&X}!O&X!Q![&_P&[P!Q![&_P&dPpP!Q![&_P&lSpP!O!P%g!Q![&g!g!h%{#X#Y%{~&}Ou~~'QRuv$[!O!P%g!Q![&g~'`Q]S!O!P'f!Q![%m~'kOi~~'pOt~~'uPb~!_!`#e~'}Pe~!_!`#e_(ZW^WwQ%RT}!O(Q!Q![(Q!c!}(Q#R#S(Q#T#o(Q%W;'S(Q;'S;:j(s<%lO(Q_(vP;=`<%l(Q~)OO%T~~)TO%S~~)YOr~~)]P#q#r)`~)eOX~",tokenizers:[F,Y,C,N,0,1,2,3],topRules:{Template:[0,7]},dynamicPrecedences:{190:1,191:1,192:1,194:1,195:1,196:1,197:1,199:1,200:1,201:1,202:1,203:1,204:1,205:1,206:1,207:1,208:1,209:1,210:1,211:1,212:1,213:1,214:1,215:1,216:1,217:1,218:1,219:1,220:1},specialized:[{term:187,get:O=>I[O]||-1},{term:39,get:O=>L[O]||-1}],tokenPrec:0});function l(O,a){return O.split(" ").map(r=>({label:r,type:a}))}const P=l("abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where","function"),m=l("cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include","keyword"),T=l("empty forloop tablerowloop in with as","keyword"),A=l("first index index0 last length rindex","property"),B=l("col col0 col_first col_last first index index0 last length rindex rindex0 row","property");function M(O){var a;let{state:r,pos:n}=O,$=y(r).resolveInner(n,-1).enterUnfinishedNodesBefore(n),i=((a=$.childBefore(n))===null||a===void 0?void 0:a.name)||$.name;if($.name=="FilterName")return{type:"filter",node:$};if(O.explicit&&i=="|")return{type:"filter"};if($.name=="TagName")return{type:"tag",node:$};if(O.explicit&&i=="{%")return{type:"tag"};if($.name=="PropertyName"&&$.parent.name=="MemberExpression")return{type:"property",node:$,target:$.parent};if($.name=="."&&$.parent.name=="MemberExpression")return{type:"property",target:$.parent};if($.name=="MemberExpression"&&i==".")return{type:"property",target:$};if($.name=="VariableName")return{type:"expression",from:$.from};let e=O.matchBefore(/[\w\u00c0-\uffff]+$/);return e?{type:"expression",from:e.from}:O.explicit&&$.name!="CommentText"&&$.name!="StringLiteral"&&$.name!="NumberLiteral"&&$.name!="InlineComment"?{type:"expression"}:null}function K(O,a,r,n){let $=[];for(;;){let i=a.getChild("Expression");if(!i)return[];if(i.name=="VariableName"||i.name=="forloop"||i.name=="tablerowloop"){let e=O.sliceDoc(i.from,i.to);if(e=="forloop")return $.length?[]:A;if(e=="tablerowloop")return $.length?[]:B;$.unshift(e);break}else if(i.name=="MemberExpression"){let e=i.getChild("PropertyName");e&&$.unshift(O.sliceDoc(e.from,e.to)),a=i}else if(i.name=="SubscriptExpression"){let e=i.getChildren("Expression")[1];$.unshift((e==null?void 0:e.name)=="StringLiteral"?O.sliceDoc(e.from+1,e.to-1):"[]"),a=i}else return[]}return n?n($,O,r):[]}function J(O={}){let a=O.filters?O.filters.concat(P):P,r=O.tags?O.tags.concat(m):m,n=O.variables?O.variables.concat(T):T,{properties:$}=O;return i=>{var e;let t=M(i);if(!t)return null;let o=(e=t.from)!==null&&e!==void 0?e:t.node?t.node.from:i.pos,s;return t.type=="filter"?s=a:t.type=="tag"?s=r:t.type=="expression"?s=n:s=K(i.state,t.target,i,$),s.length?{options:s,from:o,validFor:/^[\w\u00c0-\uffff]*$/}:null}}const OO=f.inputHandler.of((O,a,r,n)=>n!="%"||a!=r||O.state.doc.sliceString(a-1,r+1)!="{}"?!1:(O.dispatch(O.state.changeByRange($=>({changes:{from:$.from,to:$.to,insert:"%%"},range:p.cursor($.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function d(O){return a=>{let r=O.test(a.textAfter);return a.lineIndent(a.node.from)+(r?0:a.unit)}}const $O=h.define({name:"liquid",parser:H.configure({props:[G({"cycle comment endcomment raw endraw echo increment decrement liquid in with as":Q.keyword,"empty forloop tablerowloop":Q.atom,"if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue":Q.controlKeyword,"assign capture endcapture":Q.definitionKeyword,contains:Q.operatorKeyword,"render include":Q.moduleKeyword,VariableName:Q.variableName,TagName:Q.tagName,FilterName:Q.function(Q.variableName),PropertyName:Q.propertyName,CompareOp:Q.compareOperator,AssignOp:Q.definitionOperator,LogicOp:Q.logicOperator,NumberLiteral:Q.number,StringLiteral:Q.string,BooleanLiteral:Q.bool,InlineComment:Q.lineComment,CommentText:Q.blockComment,"{% %} {{ }}":Q.brace,"[ ]":Q.bracket,"( )":Q.paren,".":Q.derefOperator,", .. : |":Q.punctuation}),Z.add({Tag:S({closing:"%}"}),"UnlessDirective ForDirective TablerowDirective CaptureDirective":d(/^\s*(\{%-?\s*)?end\w/),IfDirective:d(/^\s*(\{%-?\s*)?(endif|else|elsif)\b/),CaseDirective:d(/^\s*(\{%-?\s*)?(endcase|when)\b/)}),b.add({"UnlessDirective ForDirective TablerowDirective CaptureDirective IfDirective CaseDirective RawDirective Comment"(O){let a=O.firstChild,r=O.lastChild;return!a||a.name!="Tag"?null:{from:a.to,to:r.name=="EndTag"?r.from:O.to}}})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*{%-?\s*(?:end|elsif|else|when|)$/}}),q=j();function g(O){return $O.configure({wrap:X(a=>a.type.isTop?{parser:O.parser,overlay:r=>r.name=="Text"||r.name=="RawText"}:null)},"liquid")}const aO=g(q.language);function oO(O={}){let a=O.base||q,r=a.language==q.language?aO:g(a.language);return new x(r,[a.support,r.data.of({autocomplete:J(O)}),a.language.data.of({closeBrackets:{brackets:["{"]}}),OO])}export{OO as closePercentBrace,oO as liquid,J as liquidCompletionSource,aO as liquidLanguage};
@@ -0,0 +1 @@
1
+ import{C as d,a as x,c as h,U as p}from"./use-status-budget-GIeJAyM1.js";import{A as ge,b as je,d as Se,e as be,G as ve,M as ke,f as Ne,P as Ce,g as Ie,R as we,h as Pe,S as Me,i as ye,j as Re,k as Ae,l as Te,W as De,m as Ue,n as Ee,o as Ge,p as Le,q as Oe,r as $e,s as Be,t as qe,u as Fe,v as ze,w as _e,x as He,y as Qe,z as Ve,B as Ke,D as We}from"./use-status-budget-GIeJAyM1.js";import{cz as f,j as s,l as g,B as j,cr as S,cB as b,aZ as v,cC as k,G as N,cD as C,cE as I,r as c,cF as w,a2 as P}from"./index-BYTLOFNS.js";import{cG as Ze,cH as Xe,cI as Ye,cJ as es,cK as ss,cL as ts,cM as ns,cN as as,cO as os,cP as rs,cQ as is,cR as ls,cS as cs,cT as us,cU as ms,cV as ds}from"./index-BYTLOFNS.js";import{D as t}from"./detail-row-BvEUzVxe.js";import{f as M}from"./format-duration-BCr6uzby.js";import{r as y}from"./composer-insert-BpyATrmR.js";import{S as R}from"./ConnectionAccessLists-DfIlofzc.js";import{f as r}from"./format-tokens-DymkROvy.js";import{a as hs}from"./format-tokens-DymkROvy.js";import"./git-branch-DpByNz2U.js";import"./trust-dial-tuMHO5Ug.js";import"./zap-BmeuEI5X.js";import"./use-update-config-Bt7fMLqS.js";import"./settings-for-runtime-BoOa-ZFG.js";import"./RuntimeSetupDialog-BcDt-BYK.js";import"./inline-code-B3u1dOXm.js";import"./list-runtime-types-Cyl4h4lV.js";import"./RuntimeConnectFlow-Ddm_TBWI.js";import"./copy-button-BodCVufV.js";import"./useMutationState-Bffa43_B.js";import"./runtime-connect-Dn0T5YWv.js";import"./unverified-catalog-notice-ofL4eYQH.js";import"./layers-Dbd-86dV.js";import"./cpu-BXE_D43d.js";import"./access-copy-w5gryYsO.js";import"./query-error-state-BdmBV0DG.js";import"./empty-state-B316LEXY.js";const A="I need access to another service. Ask me which service and actions you need, then request only that access.";function T({sessionId:e}){const a=f(),o=s.jsx(j,{variant:"secondary",size:"sm","data-testid":`ask-agent-for-connection-${e}`,onClick:()=>y(A),children:"Ask your agent"});return s.jsx(R,{sessionId:e,onManage:()=>void a({...g.connections()}),emptyAction:o,footer:s.jsx("div",{className:"pt-1",children:o})})}const D=1e3;function he(){const[e]=S(),a=b(e??""),o=v(n=>n.rightPanelOpen);return e?s.jsx(U,{diagnostics:a,live:o,connectors:s.jsx(T,{sessionId:e})}):s.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-6 text-center text-xs",children:"Open a chat to inspect it."})}function U({diagnostics:e,live:a=!0,connectors:o}){return s.jsxs("div",{"data-slot":"session-inspector",className:"flex h-full min-w-0 flex-col gap-4 overflow-y-auto p-3",children:[s.jsx(E,{diagnostics:e,live:a}),s.jsx(G,{diagnostics:e}),s.jsx(L,{diagnostics:e}),s.jsx(O,{diagnostics:e}),o,s.jsxs("div",{className:"mt-auto pt-2",children:[s.jsx(k,{className:"mb-2"}),s.jsx(d,{diagnostics:e,className:"w-full justify-center"})]})]})}function E({diagnostics:e,live:a}){const o=F(e.lastEventAt,a),n=x[e.connectionState];return s.jsxs(l,{label:"Live",children:[s.jsx(t,{label:"Live updates",children:s.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[s.jsx("span",{"aria-hidden":!0,className:N("inline-block size-1.5 rounded-full",n.color,n.tasks&&"animate-breath")}),n.shortLabel]})}),s.jsx(t,{label:"Turn",children:$(e)}),s.jsx(t,{label:"Last event",children:e.lastEventSeq===0?"none yet":`seq ${e.lastEventSeq}`}),s.jsx(t,{label:"Resumed from",children:e.snapshotCursor===null?"not hydrated":`cursor ${e.snapshotCursor}`}),s.jsx(t,{label:"Last update",children:o===null?"—":`${M(o)} ago`}),s.jsx(t,{label:"Queued messages",children:String(e.queueDepth)})]})}function G({diagnostics:e}){return s.jsxs(l,{label:"Resolved",children:[s.jsx(t,{label:"Directory",wrap:!0,children:e.cwd??"—"}),s.jsx(t,{label:"Git",children:q(e.git)}),s.jsx(t,{label:"Runs on",children:e.runtime??"—"}),s.jsx(t,{label:"Model",wrap:!0,children:e.model??"—"}),e.selectedModel!==null&&e.selectedModel!==e.model&&s.jsx(t,{label:"Model selected",children:e.selectedModel}),s.jsx(t,{label:"Effort",children:e.effort??"—"}),s.jsx(t,{label:"Fast mode",children:e.fastMode?"on":"off"}),s.jsx(t,{label:"Permissions",children:e.permissionMode}),s.jsx(t,{label:"Chat ID",wrap:!0,children:e.sessionId}),s.jsx(t,{label:"DorkOS version",children:e.clientVersion??"—"})]})}function L({diagnostics:e}){var o;const a=(((o=e.contextUsage)==null?void 0:o.categories)??[]).filter(n=>n.tokens>0).sort((n,i)=>i.tokens-n.tokens);return s.jsxs(l,{label:"Usage",children:[s.jsx(t,{label:"Context",children:e.contextPercent===null?"—":`${e.contextPercent}% full`}),e.contextUsage&&s.jsxs(t,{label:"Tokens",children:[r(e.contextUsage.totalTokens)," / ",r(e.contextUsage.maxTokens)]}),a.map(n=>s.jsx(t,{label:n.name,indent:!0,swatch:n.color,"data-testid":`context-category-${n.name}`,children:r(n.tokens)},n.name)),e.cache===null?s.jsx(t,{label:"Cache",children:"nothing cached yet"}):s.jsxs(s.Fragment,{children:[s.jsx(t,{label:"Cache hit",children:`${h(e.cache)}%`}),s.jsx(t,{label:"Cache read",indent:!0,children:r(e.cache.readTokens)}),s.jsx(t,{label:"Cache written",indent:!0,children:r(e.cache.creationTokens)})]}),e.usage!==null&&C(e.usage)?s.jsx("div",{className:"pt-1",children:s.jsx(p,{usage:e.usage})}):s.jsx(t,{label:"Usage & cost",children:"no usage reported"})]})}function O({diagnostics:e}){const{running:a,finished:o}=I(e.activeSubagents);return s.jsxs(l,{label:"Subagents",children:[s.jsx(t,{label:"Running",children:B(a.length,e.runningSubagentCount)}),a.map(n=>s.jsx(u,{subagent:n},n.taskId)),o.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(t,{label:"Finished this turn",children:String(o.length)}),o.map(n=>s.jsx(u,{subagent:n},n.taskId))]}),s.jsx(t,{label:"Available",children:e.subagents.length===0?"none":e.subagents.map(n=>n.name).join(", ")})]})}function u({subagent:e}){return s.jsxs("div",{"data-testid":`active-subagent-${e.taskId}`,"data-status":e.status,className:"space-y-0.5 py-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(w,{className:"text-muted-foreground size-3.5 shrink-0","aria-hidden":!0}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.description??e.taskId}),s.jsx(P,{size:"xs",variant:"secondary",className:"shrink-0",children:e.status})]}),s.jsxs("p",{className:"text-muted-foreground text-3xs pl-5 leading-tight",children:[e.toolUses??0," tool",e.toolUses===1?"":"s",e.lastToolName?` · last ${e.lastToolName}`:""]})]})}function l({label:e,children:a}){return s.jsxs("section",{className:"min-w-0",children:[s.jsx("h3",{className:"text-muted-foreground px-1 pb-1 text-xs font-medium tracking-wide uppercase",children:e}),s.jsx("div",{className:"space-y-1 px-1 text-xs",children:a})]})}function $(e){return e.triggerPending?"sending":e.streaming?"streaming":e.lifecycle??"not hydrated"}function B(e,a){const o=e===0?"none":String(e);return a===null||a===e?o:`${o} · server says ${a}`}function q(e){return e.state==="unknown"?"—":e.state==="no-repo"?"no repo":e.dirty?`${e.branch} · changed`:`${e.branch} · clean`}function F(e,a){const[o,n]=c.useState(()=>Date.now());return c.useEffect(()=>{if(e===null||!a)return;const i=()=>n(Date.now());i();const m=setInterval(i,D);return()=>clearInterval(m)},[e,a]),e===null?null:Math.max(0,o-e)}export{Ze as AccountBadge,Xe as AccountBadgeView,Ye as AccountItem,es as AccountMenuRow,ss as AccountPopover,ts as AccountTrigger,ge as AutoModeConfirmDialog,je as ConnectionItem,Se as ContextItem,be as CwdItem,ve as GitStatusItem,ke as MakeDefaultStopLine,Ne as ModelConfigPopover,Ce as PermissionModeItem,Ie as PlanModeItem,we as ReadOnlyModeNotice,Pe as RuntimeItem,he as SessionInspector,Me as SessionPopover,U as SessionReadout,ye as StatusLine,Re as SubagentsItem,Ae as UsageRevealPopover,Te as UsageStatusItem,De as WifiTurnCapPill,ns as accountChipPromotion,Ue as applyStatusBudget,as as canOfferContinue,os as chipToneFor,Ee as evaluateExtensionStatusItems,hs as formatCost,Ge as formatDiagnostics,Le as gitPromotionState,C as hasRenderableUsage,rs as isGitStatusOk,Oe as isPhoneDensity,$e as isUsageAbsorbed,I as partitionSubagents,Be as resolveStatusBudget,qe as selectPromotedItems,is as showsStaleMark,Fe as statusModelLabel,ze as useExtensionStatusItems,ls as useGitStatus,_e as useMakeDefaultStop,He as useReadOnlyModeHint,cs as useResolvedSessionRuntime,us as useRuntimeChip,ms as useSessionAccount,b as useSessionDiagnostics,ds as useSessionPermissionPicker,Qe as useSessionPopoverShortcut,Ve as useStatusBarPins,Ke as useStatusBudget,We as useStatusUsage};
@@ -1,4 +1,4 @@
1
- import{P as st,g as Z,h as v,X as it,N as Ee,s as Ie,T as H,p as ot,t as m,e as F,j as P,Y as z,a as fe,o as at,Z as lt,E as ht,_ as ft,$ as ut,a0 as dt,U as pt,a1 as ct,q as mt,f as Me,i as gt,a2 as kt,m as ue,a3 as Lt}from"./index-Di-MIFQG.js";import{html as bt,htmlCompletionSource as wt}from"./index-DYVNSRDk.js";import"./index-BwTGkJbK.js";import"./index-BLUUshO9.js";import"./index-CTgUh4p3.js";import"./index-Bd0PAkxf.js";class _{static create(e,r,n,s,i){let o=s+(s<<8)+e+(r<<4)|0;return new _(e,r,n,o,i,[],[])}constructor(e,r,n,s,i,o,a){this.type=e,this.value=r,this.from=n,this.hash=s,this.end=i,this.children=o,this.positions=a,this.hashProp=[[v.contextHash,s]]}addChild(e,r){e.prop(v.contextHash)!=this.hash&&(e=new H(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new H(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(s,i,o)=>new H(Z.none,s,i,o,this.hashProp)})}}var u;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(u||(u={}));class St{constructor(e,r){this.start=e,this.content=r,this.marks=[],this.parsers=[]}}class Ct{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return O(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,r=0,n=0){for(let s=r;s<e;s++)n+=this.text.charCodeAt(s)==9?4-n%4:1;return n}findColumn(e){let r=0;for(let n=0;r<this.text.length&&n<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return r}scrub(){if(!this.baseIndent)return this.text;let e="";for(let r=0;r<this.basePos;r++)e+=" ";return e+this.text.slice(this.basePos)}}function de(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==u.OrderedList?oe:ie)(r,e,!1);return n>0&&(t.type!=u.BulletList||se(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}const He={[u.Blockquote](t,e,r){return r.next!=62?!1:(r.markers.push(k(u.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(A(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0)},[u.ListItem](t,e,r){return r.indent<r.baseIndent+t.value&&r.next>-1?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[u.OrderedList]:de,[u.BulletList]:de,[u.Document](){return!0}};function A(t){return t==32||t==9||t==10||t==13}function O(t,e=0){for(;e<t.length&&A(t.charCodeAt(e));)e++;return e}function pe(t,e,r){for(;e>r&&A(t.charCodeAt(e-1));)e--;return e}function Pe(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function ve(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function se(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let s=t.pos+1;s<t.text.length;s++){let i=t.text.charCodeAt(s);if(i==t.next)n++;else if(!A(i))return-1}return r&&t.next==45&&Re(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(De.SetextHeading)>-1||n<3?-1:1}function Ne(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function ie(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||A(t.text.charCodeAt(t.pos+1)))&&(!r||Ne(e,u.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function oe(t,e,r){let n=t.pos,s=t.next;for(;s>=48&&s<=57;){n++;if(n==t.text.length)return-1;s=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||s!=46&&s!=41||n<t.text.length-1&&!A(t.text.charCodeAt(n+1))||r&&!Ne(e,u.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function ye(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let r=e-t.pos;return r>6?-1:r}function Re(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&A(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}const W=/^[ \t]*$/,Oe=/-->/,Te=/\?>/,ee=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Oe],[/^\s*<\?/,Te],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,W],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,W]];function ze(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let s=0,i=ee.length-(r?1:0);s<i;s++)if(ee[s][0].test(n))return s;return-1}function ce(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.countIndent(t.skipSpace(e),e,r);return n>=r+5?r+1:n}function x(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==u.CodeText?t[n].to=r:t.push(k(u.CodeText,e,r))}const $={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),s=t.lineStart+n,i=t.lineStart+e.text.length,o=[],a=[];for(x(o,s,i);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){x(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<r)break;{if(a.length){for(let h of a)h.type==u.CodeText?x(o,h.from,h.to):o.push(h);a=[]}x(o,t.lineStart-1,t.lineStart);for(let h of e.markers)o.push(h);i=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<i&&x(o,l,i)}}return a.length&&(a=a.filter(l=>l.type!=u.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-s).finish(u.CodeBlock,i-s),s),!0},FencedCode(t,e){let r=Pe(e);if(r<0)return!1;let n=t.lineStart+e.pos,s=e.next,i=r-e.pos,o=e.skipSpace(r),a=pe(e.text,e.text.length,o),l=[k(u.CodeMark,n,n+i)];o<a&&l.push(k(u.CodeInfo,t.lineStart+o,t.lineStart+a));for(let h=!0,f=!0,p=!1;t.nextLine()&&e.depth>=t.stack.length;h=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==s;)d++;if(d-e.pos>=i&&e.skipSpace(d)==e.text.length){for(let c of e.markers)l.push(c);f&&p&&x(l,t.lineStart-1,t.lineStart),l.push(k(u.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{p=!0,h||(x(l,t.lineStart-1,t.lineStart),f=!1);for(let g of e.markers)l.push(g);let c=t.lineStart+e.basePos,L=t.lineStart+e.text.length;c<L&&(x(l,c,L),f=!1)}}return t.addNode(t.buffer.writeElements(l,-n).finish(u.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=ve(e);return r<0?!1:(t.startContext(u.Blockquote,e.pos),t.addNode(u.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(se(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode(u.HorizontalRule,r),!0},BulletList(t,e){let r=ie(e,t,!1);if(r<0)return!1;t.block.type!=u.BulletList&&t.startContext(u.BulletList,e.basePos,e.next);let n=ce(e,e.pos+1);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},OrderedList(t,e){let r=oe(e,t,!1);if(r<0)return!1;t.block.type!=u.OrderedList&&t.startContext(u.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=ce(e,e.pos+r);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},ATXHeading(t,e){let r=ye(e);if(r<0)return!1;let n=e.pos,s=t.lineStart+n,i=pe(e.text,e.text.length,n),o=i;for(;o>n&&e.text.charCodeAt(o-1)==e.next;)o--;(o==i||o==n||!A(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(u.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,o),s+r+1),-s);o<e.text.length&&a.write(u.HeaderMark,o-n,i-n);let l=a.finish(u.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,s),!0},HTMLBlock(t,e){let r=ze(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,s=ee[r][1],i=[],o=s!=W;for(;!s.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let h of e.markers)i.push(h)}o&&t.nextLine();let a=s==Oe?u.CommentBlock:s==Te?u.ProcessingInstructionBlock:u.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(i,-n).finish(a,l-n),n),!0},SetextHeading:void 0};class At{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,r,n){if(this.stage==-1)return!1;let s=n.content+`
1
+ import{P as st,g as Z,h as v,X as it,N as Ee,s as Ie,T as H,p as ot,t as m,e as F,j as P,Y as z,a as fe,o as at,Z as lt,E as ht,_ as ft,$ as ut,a0 as dt,U as pt,a1 as ct,q as mt,f as Me,i as gt,a2 as kt,m as ue,a3 as Lt}from"./index-vEujcopz.js";import{html as bt,htmlCompletionSource as wt}from"./index-aSuMCzNN.js";import"./index-BYTLOFNS.js";import"./index-DHFIAKQc.js";import"./index-DNkWdNSz.js";import"./index-DCFKleTS.js";class _{static create(e,r,n,s,i){let o=s+(s<<8)+e+(r<<4)|0;return new _(e,r,n,o,i,[],[])}constructor(e,r,n,s,i,o,a){this.type=e,this.value=r,this.from=n,this.hash=s,this.end=i,this.children=o,this.positions=a,this.hashProp=[[v.contextHash,s]]}addChild(e,r){e.prop(v.contextHash)!=this.hash&&(e=new H(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new H(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(s,i,o)=>new H(Z.none,s,i,o,this.hashProp)})}}var u;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(u||(u={}));class St{constructor(e,r){this.start=e,this.content=r,this.marks=[],this.parsers=[]}}class Ct{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return O(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,r=0,n=0){for(let s=r;s<e;s++)n+=this.text.charCodeAt(s)==9?4-n%4:1;return n}findColumn(e){let r=0;for(let n=0;r<this.text.length&&n<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return r}scrub(){if(!this.baseIndent)return this.text;let e="";for(let r=0;r<this.basePos;r++)e+=" ";return e+this.text.slice(this.basePos)}}function de(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==u.OrderedList?oe:ie)(r,e,!1);return n>0&&(t.type!=u.BulletList||se(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}const He={[u.Blockquote](t,e,r){return r.next!=62?!1:(r.markers.push(k(u.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(A(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0)},[u.ListItem](t,e,r){return r.indent<r.baseIndent+t.value&&r.next>-1?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[u.OrderedList]:de,[u.BulletList]:de,[u.Document](){return!0}};function A(t){return t==32||t==9||t==10||t==13}function O(t,e=0){for(;e<t.length&&A(t.charCodeAt(e));)e++;return e}function pe(t,e,r){for(;e>r&&A(t.charCodeAt(e-1));)e--;return e}function Pe(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function ve(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function se(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let s=t.pos+1;s<t.text.length;s++){let i=t.text.charCodeAt(s);if(i==t.next)n++;else if(!A(i))return-1}return r&&t.next==45&&Re(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(De.SetextHeading)>-1||n<3?-1:1}function Ne(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function ie(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||A(t.text.charCodeAt(t.pos+1)))&&(!r||Ne(e,u.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function oe(t,e,r){let n=t.pos,s=t.next;for(;s>=48&&s<=57;){n++;if(n==t.text.length)return-1;s=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||s!=46&&s!=41||n<t.text.length-1&&!A(t.text.charCodeAt(n+1))||r&&!Ne(e,u.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function ye(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let r=e-t.pos;return r>6?-1:r}function Re(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&A(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}const W=/^[ \t]*$/,Oe=/-->/,Te=/\?>/,ee=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Oe],[/^\s*<\?/,Te],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,W],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,W]];function ze(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let s=0,i=ee.length-(r?1:0);s<i;s++)if(ee[s][0].test(n))return s;return-1}function ce(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.countIndent(t.skipSpace(e),e,r);return n>=r+5?r+1:n}function x(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==u.CodeText?t[n].to=r:t.push(k(u.CodeText,e,r))}const $={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),s=t.lineStart+n,i=t.lineStart+e.text.length,o=[],a=[];for(x(o,s,i);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){x(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<r)break;{if(a.length){for(let h of a)h.type==u.CodeText?x(o,h.from,h.to):o.push(h);a=[]}x(o,t.lineStart-1,t.lineStart);for(let h of e.markers)o.push(h);i=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<i&&x(o,l,i)}}return a.length&&(a=a.filter(l=>l.type!=u.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-s).finish(u.CodeBlock,i-s),s),!0},FencedCode(t,e){let r=Pe(e);if(r<0)return!1;let n=t.lineStart+e.pos,s=e.next,i=r-e.pos,o=e.skipSpace(r),a=pe(e.text,e.text.length,o),l=[k(u.CodeMark,n,n+i)];o<a&&l.push(k(u.CodeInfo,t.lineStart+o,t.lineStart+a));for(let h=!0,f=!0,p=!1;t.nextLine()&&e.depth>=t.stack.length;h=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==s;)d++;if(d-e.pos>=i&&e.skipSpace(d)==e.text.length){for(let c of e.markers)l.push(c);f&&p&&x(l,t.lineStart-1,t.lineStart),l.push(k(u.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{p=!0,h||(x(l,t.lineStart-1,t.lineStart),f=!1);for(let g of e.markers)l.push(g);let c=t.lineStart+e.basePos,L=t.lineStart+e.text.length;c<L&&(x(l,c,L),f=!1)}}return t.addNode(t.buffer.writeElements(l,-n).finish(u.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=ve(e);return r<0?!1:(t.startContext(u.Blockquote,e.pos),t.addNode(u.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(se(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode(u.HorizontalRule,r),!0},BulletList(t,e){let r=ie(e,t,!1);if(r<0)return!1;t.block.type!=u.BulletList&&t.startContext(u.BulletList,e.basePos,e.next);let n=ce(e,e.pos+1);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},OrderedList(t,e){let r=oe(e,t,!1);if(r<0)return!1;t.block.type!=u.OrderedList&&t.startContext(u.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=ce(e,e.pos+r);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},ATXHeading(t,e){let r=ye(e);if(r<0)return!1;let n=e.pos,s=t.lineStart+n,i=pe(e.text,e.text.length,n),o=i;for(;o>n&&e.text.charCodeAt(o-1)==e.next;)o--;(o==i||o==n||!A(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(u.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,o),s+r+1),-s);o<e.text.length&&a.write(u.HeaderMark,o-n,i-n);let l=a.finish(u.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,s),!0},HTMLBlock(t,e){let r=ze(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,s=ee[r][1],i=[],o=s!=W;for(;!s.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let h of e.markers)i.push(h)}o&&t.nextLine();let a=s==Oe?u.CommentBlock:s==Te?u.ProcessingInstructionBlock:u.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(i,-n).finish(a,l-n),n),!0},SetextHeading:void 0};class At{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,r,n){if(this.stage==-1)return!1;let s=n.content+`
2
2
  `+r.scrub(),i=this.advance(s);return i>-1&&i<s.length?this.complete(e,n,i):!1}finish(e,r){return(this.stage==2||this.stage==3)&&O(r.content,this.pos)==r.content.length?this.complete(e,r,r.content.length):!1}complete(e,r,n){return e.addLeafElement(r,k(u.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Qe(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(k(u.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(qe(e,O(e,this.pos),this.start)))return-1}else if(this.stage==2){let r=O(e,this.pos),n=0;if(r>this.pos){let s=Ze(e,r,this.start);if(s){let i=V(e,s.to-this.start);i>0&&(this.nextStage(s),n=i)}}return n||(n=V(e,this.pos)),n>0&&n<e.length?n:-1}else return V(e,this.pos)}}}function V(t,e){for(;e<t.length;e++){let r=t.charCodeAt(e);if(r==10)break;if(!A(r))return-1}return e}class xt{nextLine(e,r,n){let s=r.depth<e.stack.length?-1:Re(r),i=r.next;if(s<0)return!1;let o=k(u.HeaderMark,e.lineStart+r.pos,e.lineStart+s);return e.nextLine(),e.addLeafElement(n,k(i==61?u.SetextHeading1:u.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),o])),!0}finish(){return!1}}const De={LinkReference(t,e){return e.content.charCodeAt(0)==91?new At(e):null},SetextHeading(){return new xt}},Bt=[(t,e)=>ye(e)>=0,(t,e)=>Pe(e)>=0,(t,e)=>ve(e)>=0,(t,e)=>ie(e,t,!0)>=0,(t,e)=>oe(e,t,!0)>=0,(t,e)=>se(e,t,!0)>=0,(t,e)=>ze(e,t,!0)>=0],Et={text:"",end:0};class It{constructor(e,r,n,s){this.parser=e,this.input=r,this.ranges=s,this.line=new Ct,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=s[s.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=s[0].from,this.block=_.create(u.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new Pt(n,r):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let s=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!s||e.markers[n].from<s.end);){let i=e.markers[n++];this.addNode(i.type,i.from,i.to)}if(!s)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let s=n(this,e);if(s!=!1){if(s==!0)return null;e.forward();continue e}}break}let r=new St(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let s=n(this,r);s&&r.parsers.push(s)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,r))break e}for(let n of r.parsers)if(n.nextLine(this,e,r))return null;r.content+=`
3
3
  `+e.scrub();for(let n of e.markers)r.marks.push(n)}return this.finishLeaf(r),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let r=this.fragments.takeNodes(this);return r?(this.absoluteLineStart+=r,this.lineStart=Ve(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let r=Et;if(r.end=e,e>=this.to)r.text="";else if(r.text=this.lineChunkAt(e),r.end+=r.text.length,this.ranges.length>1){let n=this.absoluteLineStart,s=this.rangeI;for(;this.ranges[s].to<r.end;){s++;let i=this.ranges[s].from,o=this.lineChunkAt(i);r.end=i+o.length,r.text=r.text.slice(0,this.ranges[s-1].to-n)+o,n=r.end-r.text.length}}return r}readLine(){let{line:e}=this,{text:r,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(r);e.depth<this.stack.length;e.depth++){let s=this.stack[e.depth],i=this.parser.skipContextMarkup[s.type];if(!i)throw new Error("Unhandled block context "+u[s.type]);let o=this.line.markers.length;if(!i(s,this,e)){this.line.markers.length>o&&(s.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let r=this.input.chunk(e),n;if(this.input.lineChunks)n=r==`
4
4
  `?"":r;else{let s=r.indexOf(`
@@ -1 +1 @@
1
- import{j6 as ft,j7 as mt,j8 as pt,j9 as ht,ja as dt,jb as st,jc as rt,jd as gt,je as yt,jf as At,jg as St,jh as Et,ji as jt,jj as vt,jk as Vt,jl as Mt,jm as Dt,jn as Tt,jo as B,jp as bt,jq as Ot,fr as xt,jr as wt}from"./index-BwTGkJbK.js";const Ft=(e,t,n)=>{const i=t-e;return((n-e)%i+i)%i+e};function at(e,t){return ft(e)?e[Ft(0,e.length,t)]:e}class Gt{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let i=0;i<this.animations.length;i++)this.animations[i][t]=n}attachTimeline(t){const n=this.animations.map(i=>i.attachTimeline(t));return()=>{n.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return tt(this.animations,"duration")}get iterationDuration(){return tt(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function tt(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i][t];s!==null&&s>n&&(n=s)}return n}class It extends Gt{then(t,n){return this.finished.finally(t).then(()=>{})}}function Kt(e,t){return e in t}class Ct extends mt{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(Kt(n,t)){const i=t[n];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return pt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function R(e){return typeof e=="object"&&!Array.isArray(e)}function ot(e,t,n,i){return e==null?[]:typeof e=="string"&&R(t)?ht(e,n,i):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(s=>s!=null):[e]}function Nt(e,t,n){return e*(t+1)+n*t}function et(e,t,n,i){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):i.get(t)??e}function Bt(e,t,n){for(let i=0;i<e.length;i++){const s=e[i];s.at>t&&s.at<n&&(st(e,s),i--)}}function Lt(e,t,n,i,s,c){Bt(e,s,c);for(let r=0;r<t.length;r++)e.push({value:t[r],at:dt(s,c,i[r]),easing:at(n,r)})}function Pt(e,t,n=0){const i=t+1+t*n;for(let s=0;s<e.length;s++)e[s]=e[s]/i}function Rt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const Wt="easeInOut",kt=20;function _t(e,{defaultTransition:t={},...n}={},i,s){const c=t.duration||.3,r=new Map,u=new Map,l={},m=new Map;let d=0,o=0,g=0;for(let y=0;y<e.length;y++){const A=e[y];if(typeof A=="string"){m.set(A,o);continue}else if(!Array.isArray(A)){m.set(A.name,et(o,A.at,d,m));continue}let[D,S,f={}]=A;f.at!==void 0&&(o=et(o,f.at,d,m));let p=0;const b=(j,O,V,T=0,F=0)=>{const a=qt(j),{delay:G=0,times:E=gt(a),type:L=t.type||"keyframes",repeat:I,repeatType:P,repeatDelay:W=0,...ut}=O;let{ease:v=t.ease||"easeOut",duration:h}=O;const k=typeof G=="function"?G(T,F):G,_=a.length,q=Et(L)?L:s==null?void 0:s[L||"keyframes"];if(_<=2&&q){let x=100;if(_===2&&Ht(a)){const K=a[1]-a[0];x=Math.abs(K)}const w={...t,...ut};h!==void 0&&(w.duration=jt(h));const N=yt(w,x,q);v=N.ease,h=N.duration}h??(h=c);const z=o+k;E.length===1&&E[0]===0&&(E[1]=1);const U=E.length-a.length;if(U>0&&At(E,U),a.length===1&&a.unshift(null),I&&I<kt){const x=h>0?W/h:0;h=Nt(h,I,W);const w=[...a],N=[...E];v=Array.isArray(v)?[...v]:[v];const K=[...v],X=P==="reverse"||P==="mirror";let J=w,Q=K;X&&(J=[...w].reverse(),P==="reverse"&&(Q=[...K].reverse().map(M=>typeof M=="function"?St(M):M)));for(let M=0;M<I;M++){const Y=X&&M%2===0,Z=Y?J:w,ct=Y?Q:K,$=(M+1)*(1+x);x>0&&(a.push(a[a.length-1]),E.push($),v.push("linear")),a.push(...Z);for(let C=0;C<Z.length;C++)E.push(N[C]+$),v.push(C===0?"linear":at(ct,C-1))}Pt(E,I,x)}const H=z+h;Lt(V,a,v,E,z,H),p=Math.max(k+h,p),g=Math.max(H,g)};if(rt(D)){const j=nt(D,u);b(S,f,it("default",j))}else{const j=ot(D,S,i,l),O=j.length;for(let V=0;V<O;V++){S=S,f=f;const T=j[V],F=nt(T,u);for(const a in S)b(S[a],zt(f,a),it(a,F),V,O)}}d=o,o+=p}return u.forEach((y,A)=>{for(const D in y){const S=y[D];S.sort(Rt);const f=[],p=[],b=[];for(let T=0;T<S.length;T++){const{at:F,value:a,easing:G}=S[T];f.push(a),p.push(vt(0,g,F)),b.push(G||"easeOut")}p[0]!==0&&(p.unshift(0),f.unshift(f[0]),b.unshift(Wt)),p[p.length-1]!==1&&(p.push(1),f.push(null)),r.has(A)||r.set(A,{keyframes:{},transition:{}});const j=r.get(A);j.keyframes[D]=f;const{type:O,...V}=t;j.transition[D]={...V,duration:g,ease:b,times:p,...n}}}),r}function nt(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function it(e,t){return t[e]||(t[e]=[]),t[e]}function qt(e){return Array.isArray(e)?e:[e]}function zt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const Ut=e=>typeof e=="number",Ht=e=>e.every(Ut);function Xt(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Vt(e)&&!Mt(e)?new Dt(t):new Tt(t);n.mount(e),B.set(e,n)}function Jt(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Ct(t);n.mount(e),B.set(e,n)}function Qt(e,t){return rt(e)||typeof e=="number"||typeof e=="string"&&!R(t)}function lt(e,t,n,i){const s=[];if(Qt(e,t))s.push(bt(e,R(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return s;const c=ot(e,t,i),r=c.length;for(let u=0;u<r;u++){const l=c[u],m=l instanceof Element?Xt:Jt;B.has(l)||m(l);const d=B.get(l),o={...n};"delay"in o&&typeof o.delay=="function"&&(o.delay=o.delay(u,r)),s.push(...Ot(d,{...t,transition:o},{}))}}return s}function Yt(e,t,n){const i=[],s=e.map(r=>{if(Array.isArray(r)&&typeof r[0]=="function"){const u=r[0],l=xt(0);return l.on("change",u),r.length===1?[l,[0,1]]:r.length===2?[l,[0,1],r[1]]:[l,r[1],r[2]]}return r});return _t(s,t,n,{spring:wt}).forEach(({keyframes:r,transition:u},l)=>{i.push(...lt(l,r,u))}),i}function Zt(e){return Array.isArray(e)&&e.some(Array.isArray)}function $t(e={}){const{scope:t,reduceMotion:n,skipAnimations:i}=e;function s(c,r,u){let l=[],m;const d={};if(n!==void 0&&(d.reduceMotion=n),i!==void 0&&(d.skipAnimations=i),Zt(c)){const{onComplete:g,...y}=r||{};typeof g=="function"&&(m=g),l=Yt(c,{...d,...y},t)}else{const{onComplete:g,...y}=u||{};typeof g=="function"&&(m=g),l=lt(c,r,{...d,...y},t)}const o=new It(l);return m&&o.finished.then(m),t&&(t.animations.push(o),o.finished.then(()=>{st(t.animations,o)})),o}return s}const ee=$t();export{ee as a};
1
+ import{j7 as ft,j8 as mt,j9 as pt,ja as ht,jb as dt,jc as st,jd as rt,je as gt,jf as yt,jg as At,jh as St,ji as Et,jj as jt,jk as vt,jl as Vt,jm as Mt,jn as Dt,jo as Tt,jp as B,jq as bt,jr as Ot,fy as xt,js as wt}from"./index-BYTLOFNS.js";const Ft=(e,t,n)=>{const i=t-e;return((n-e)%i+i)%i+e};function at(e,t){return ft(e)?e[Ft(0,e.length,t)]:e}class Gt{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let i=0;i<this.animations.length;i++)this.animations[i][t]=n}attachTimeline(t){const n=this.animations.map(i=>i.attachTimeline(t));return()=>{n.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return tt(this.animations,"duration")}get iterationDuration(){return tt(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function tt(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i][t];s!==null&&s>n&&(n=s)}return n}class It extends Gt{then(t,n){return this.finished.finally(t).then(()=>{})}}function Kt(e,t){return e in t}class Ct extends mt{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(Kt(n,t)){const i=t[n];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return pt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function R(e){return typeof e=="object"&&!Array.isArray(e)}function ot(e,t,n,i){return e==null?[]:typeof e=="string"&&R(t)?ht(e,n,i):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(s=>s!=null):[e]}function Nt(e,t,n){return e*(t+1)+n*t}function et(e,t,n,i){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):i.get(t)??e}function Bt(e,t,n){for(let i=0;i<e.length;i++){const s=e[i];s.at>t&&s.at<n&&(st(e,s),i--)}}function Lt(e,t,n,i,s,c){Bt(e,s,c);for(let r=0;r<t.length;r++)e.push({value:t[r],at:dt(s,c,i[r]),easing:at(n,r)})}function Pt(e,t,n=0){const i=t+1+t*n;for(let s=0;s<e.length;s++)e[s]=e[s]/i}function Rt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const Wt="easeInOut",kt=20;function _t(e,{defaultTransition:t={},...n}={},i,s){const c=t.duration||.3,r=new Map,u=new Map,l={},m=new Map;let d=0,o=0,g=0;for(let y=0;y<e.length;y++){const A=e[y];if(typeof A=="string"){m.set(A,o);continue}else if(!Array.isArray(A)){m.set(A.name,et(o,A.at,d,m));continue}let[D,S,f={}]=A;f.at!==void 0&&(o=et(o,f.at,d,m));let p=0;const b=(j,O,V,T=0,F=0)=>{const a=qt(j),{delay:G=0,times:E=gt(a),type:L=t.type||"keyframes",repeat:I,repeatType:P,repeatDelay:W=0,...ut}=O;let{ease:v=t.ease||"easeOut",duration:h}=O;const k=typeof G=="function"?G(T,F):G,_=a.length,q=Et(L)?L:s==null?void 0:s[L||"keyframes"];if(_<=2&&q){let x=100;if(_===2&&Ht(a)){const K=a[1]-a[0];x=Math.abs(K)}const w={...t,...ut};h!==void 0&&(w.duration=jt(h));const N=yt(w,x,q);v=N.ease,h=N.duration}h??(h=c);const z=o+k;E.length===1&&E[0]===0&&(E[1]=1);const U=E.length-a.length;if(U>0&&At(E,U),a.length===1&&a.unshift(null),I&&I<kt){const x=h>0?W/h:0;h=Nt(h,I,W);const w=[...a],N=[...E];v=Array.isArray(v)?[...v]:[v];const K=[...v],X=P==="reverse"||P==="mirror";let J=w,Q=K;X&&(J=[...w].reverse(),P==="reverse"&&(Q=[...K].reverse().map(M=>typeof M=="function"?St(M):M)));for(let M=0;M<I;M++){const Y=X&&M%2===0,Z=Y?J:w,ct=Y?Q:K,$=(M+1)*(1+x);x>0&&(a.push(a[a.length-1]),E.push($),v.push("linear")),a.push(...Z);for(let C=0;C<Z.length;C++)E.push(N[C]+$),v.push(C===0?"linear":at(ct,C-1))}Pt(E,I,x)}const H=z+h;Lt(V,a,v,E,z,H),p=Math.max(k+h,p),g=Math.max(H,g)};if(rt(D)){const j=nt(D,u);b(S,f,it("default",j))}else{const j=ot(D,S,i,l),O=j.length;for(let V=0;V<O;V++){S=S,f=f;const T=j[V],F=nt(T,u);for(const a in S)b(S[a],zt(f,a),it(a,F),V,O)}}d=o,o+=p}return u.forEach((y,A)=>{for(const D in y){const S=y[D];S.sort(Rt);const f=[],p=[],b=[];for(let T=0;T<S.length;T++){const{at:F,value:a,easing:G}=S[T];f.push(a),p.push(vt(0,g,F)),b.push(G||"easeOut")}p[0]!==0&&(p.unshift(0),f.unshift(f[0]),b.unshift(Wt)),p[p.length-1]!==1&&(p.push(1),f.push(null)),r.has(A)||r.set(A,{keyframes:{},transition:{}});const j=r.get(A);j.keyframes[D]=f;const{type:O,...V}=t;j.transition[D]={...V,duration:g,ease:b,times:p,...n}}}),r}function nt(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function it(e,t){return t[e]||(t[e]=[]),t[e]}function qt(e){return Array.isArray(e)?e:[e]}function zt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const Ut=e=>typeof e=="number",Ht=e=>e.every(Ut);function Xt(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Vt(e)&&!Mt(e)?new Dt(t):new Tt(t);n.mount(e),B.set(e,n)}function Jt(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Ct(t);n.mount(e),B.set(e,n)}function Qt(e,t){return rt(e)||typeof e=="number"||typeof e=="string"&&!R(t)}function lt(e,t,n,i){const s=[];if(Qt(e,t))s.push(bt(e,R(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return s;const c=ot(e,t,i),r=c.length;for(let u=0;u<r;u++){const l=c[u],m=l instanceof Element?Xt:Jt;B.has(l)||m(l);const d=B.get(l),o={...n};"delay"in o&&typeof o.delay=="function"&&(o.delay=o.delay(u,r)),s.push(...Ot(d,{...t,transition:o},{}))}}return s}function Yt(e,t,n){const i=[],s=e.map(r=>{if(Array.isArray(r)&&typeof r[0]=="function"){const u=r[0],l=xt(0);return l.on("change",u),r.length===1?[l,[0,1]]:r.length===2?[l,[0,1],r[1]]:[l,r[1],r[2]]}return r});return _t(s,t,n,{spring:wt}).forEach(({keyframes:r,transition:u},l)=>{i.push(...lt(l,r,u))}),i}function Zt(e){return Array.isArray(e)&&e.some(Array.isArray)}function $t(e={}){const{scope:t,reduceMotion:n,skipAnimations:i}=e;function s(c,r,u){let l=[],m;const d={};if(n!==void 0&&(d.reduceMotion=n),i!==void 0&&(d.skipAnimations=i),Zt(c)){const{onComplete:g,...y}=r||{};typeof g=="function"&&(m=g),l=Yt(c,{...d,...y},t)}else{const{onComplete:g,...y}=u||{};typeof g=="function"&&(m=g),l=lt(c,r,{...d,...y},t)}const o=new It(l);return m&&o.finished.then(m),t&&(t.animations.push(o),o.finished.then(()=>{st(t.animations,o)})),o}return s}const ee=$t();export{ee as a};
@@ -1 +1 @@
1
- import{L as g,a as P,p as l,s as q,t as r}from"./index-Di-MIFQG.js";import{html as c}from"./index-DYVNSRDk.js";import{javascriptLanguage as i}from"./index-Bd0PAkxf.js";import{L as R,E as p}from"./index-BLUUshO9.js";import"./index-BwTGkJbK.js";import"./index-CTgUh4p3.js";const b=1,m=33,$=34,v=35,x=36,W=new p(O=>{let t=O.pos;for(;;){if(O.next==10){O.advance();break}else if(O.next==123&&O.peek(1)==123||O.next<0)break;O.advance()}O.pos>t&&O.acceptToken(b)});function n(O,t,a){return new p(e=>{let u=e.pos;for(;e.next!=O&&e.next>=0&&(a||e.next!=38&&(e.next!=123||e.peek(1)!=123));)e.advance();e.pos>u&&e.acceptToken(t)})}const d=n(39,m,!1),f=n(34,$,!1),C=n(39,v,!0),T=n(34,x,!0),A=R.deserialize({version:14,states:"(jOVOqOOOeQpOOOvO!bO'#CaOOOP'#Cx'#CxQVOqOOO!OQpO'#CfO!WQpO'#ClO!]QpO'#CrO!bQpO'#CsOOQO'#Cv'#CvQ!gQpOOQ!lQpOOQ!qQpOOOOOV,58{,58{O!vOpO,58{OOOP-E6v-E6vO!{QpO,59QO#TQpO,59QOOQO,59W,59WO#YQpO,59^OOQO,59_,59_O#_QpOOO#_QpOOO#gQpOOOOOV1G.g1G.gO#oQpO'#CyO#tQpO1G.lOOQO1G.l1G.lO#|QpO1G.lOOQO1G.x1G.xO$UO`O'#DUO$ZOWO'#DUOOQO'#Co'#CoQOQpOOOOQO'#Cu'#CuO$`OtO'#CwO$qOrO'#CwOOQO,59e,59eOOQO-E6w-E6wOOQO7+$W7+$WO%SQpO7+$WO%[QpO7+$WOOOO'#Cp'#CpO%aOpO,59pOOOO'#Cq'#CqO%fOpO,59pOOOS'#Cz'#CzO%kOtO,59cOOQO,59c,59cOOOQ'#C{'#C{O%|OrO,59cO&_QpO<<GrOOQO<<Gr<<GrOOQO1G/[1G/[OOOS-E6x-E6xOOQO1G.}1G.}OOOQ-E6y-E6yOOQOAN=^AN=^",stateData:"&d~OvOS~OPROSQOVROWRO~OZTO[XO^VOaUOhWO~OR]OU^O~O[`O^aO~O[bO~O[cO~O[dO~ObeO~ObfO~ObgO~ORhO~O]kOwiO~O[lO~O_mO~OynOzoO~OysOztO~O[uO~O]wOwiO~O_yOwiO~OtzO~Os|O~OSQOV!OOW!OOr!OOy!QO~OSQOV!ROW!ROq!ROz!QO~O_!TOwiO~O]!UO~Oy!VO~Oz!VO~OSQOV!OOW!OOr!OOy!XO~OSQOV!ROW!ROq!ROz!XO~O]!ZO~O",goto:"#dyPPPPPzPPPP!WPPPPP!WPP!Z!^!a!d!dP!g!j!m!p!v#Q#WPPPPPPPP#^SROSS!Os!PT!Rt!SRYPRqeR{nR}oRZPRqfR[PRqgQSOR_SQj`SvjxRxlQ!PsR!W!PQ!StR!Y!SQpeRrf",nodeNames:"⚠ Text Content }} {{ Interpolation InterpolationContent Entity InvalidEntity Attribute BoundAttributeName [ Identifier ] ( ) ReferenceName # Is ExpressionAttributeValue AttributeInterpolation AttributeInterpolation EventName DirectiveName * StatementAttributeValue AttributeName AttributeValue",maxTerm:42,nodeProps:[["openedBy",3,"{{",15,"("],["closedBy",4,"}}",14,")"],["isolate",-4,5,19,25,27,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"0r~RyOX#rXY$mYZ$mZ]#r]^$m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W#r;'S#r;'S;=`$g<%lO#rR-zTUQbPO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.bTZPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.xT]PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/^VUQO#o#r#o#p/s#p#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/zTSPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#r~0^TO#q#r#q#r0m#r;'S#r;'S;=`$g<%lO#r~0rOR~",tokenizers:[W,d,f,C,T,0,1],topRules:{Content:[0,2],Attribute:[1,9]},tokenPrec:0}),V=i.parser.configure({top:"SingleExpression"}),Q=A.configure({props:[q({Text:r.content,Is:r.definitionOperator,AttributeName:r.attributeName,"AttributeValue ExpressionAttributeValue StatementAttributeValue":r.attributeValue,Entity:r.character,InvalidEntity:r.invalid,"BoundAttributeName/Identifier":r.attributeName,"EventName/Identifier":r.special(r.attributeName),"ReferenceName/Identifier":r.variableName,"DirectiveName/Identifier":r.keyword,"{{ }}":r.brace,"( )":r.paren,"[ ]":r.bracket,"# '*'":r.punctuation})]}),o={parser:V},w={parser:i.parser},U=Q.configure({wrap:l((O,t)=>O.name=="InterpolationContent"?o:null)}),y=Q.configure({wrap:l((O,t)=>{var a;return O.name=="InterpolationContent"?o:O.name!="AttributeInterpolation"?null:((a=O.node.parent)===null||a===void 0?void 0:a.name)=="StatementAttributeValue"?w:o}),top:"Attribute"}),E={parser:U},N={parser:y},s=c({selfClosingTags:!0});function S(O){return O.configure({wrap:l(z)},"angular")}const k=S(s.language);function z(O,t){switch(O.name){case"Attribute":return/^[*#(\[]|\{\{/.test(t.read(O.from,O.to))?N:null;case"Text":return E}return null}function j(O={}){let t=s;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof g))throw new RangeError("The base option must be the result of calling html(...)");t=O.base}return new P(t.language==s.language?k:S(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/})])}export{j as angular,k as angularLanguage};
1
+ import{L as g,a as P,p as l,s as q,t as r}from"./index-vEujcopz.js";import{html as c}from"./index-aSuMCzNN.js";import{javascriptLanguage as i}from"./index-DCFKleTS.js";import{L as R,E as p}from"./index-DHFIAKQc.js";import"./index-BYTLOFNS.js";import"./index-DNkWdNSz.js";const b=1,m=33,$=34,v=35,x=36,W=new p(O=>{let t=O.pos;for(;;){if(O.next==10){O.advance();break}else if(O.next==123&&O.peek(1)==123||O.next<0)break;O.advance()}O.pos>t&&O.acceptToken(b)});function n(O,t,a){return new p(e=>{let u=e.pos;for(;e.next!=O&&e.next>=0&&(a||e.next!=38&&(e.next!=123||e.peek(1)!=123));)e.advance();e.pos>u&&e.acceptToken(t)})}const d=n(39,m,!1),f=n(34,$,!1),C=n(39,v,!0),T=n(34,x,!0),A=R.deserialize({version:14,states:"(jOVOqOOOeQpOOOvO!bO'#CaOOOP'#Cx'#CxQVOqOOO!OQpO'#CfO!WQpO'#ClO!]QpO'#CrO!bQpO'#CsOOQO'#Cv'#CvQ!gQpOOQ!lQpOOQ!qQpOOOOOV,58{,58{O!vOpO,58{OOOP-E6v-E6vO!{QpO,59QO#TQpO,59QOOQO,59W,59WO#YQpO,59^OOQO,59_,59_O#_QpOOO#_QpOOO#gQpOOOOOV1G.g1G.gO#oQpO'#CyO#tQpO1G.lOOQO1G.l1G.lO#|QpO1G.lOOQO1G.x1G.xO$UO`O'#DUO$ZOWO'#DUOOQO'#Co'#CoQOQpOOOOQO'#Cu'#CuO$`OtO'#CwO$qOrO'#CwOOQO,59e,59eOOQO-E6w-E6wOOQO7+$W7+$WO%SQpO7+$WO%[QpO7+$WOOOO'#Cp'#CpO%aOpO,59pOOOO'#Cq'#CqO%fOpO,59pOOOS'#Cz'#CzO%kOtO,59cOOQO,59c,59cOOOQ'#C{'#C{O%|OrO,59cO&_QpO<<GrOOQO<<Gr<<GrOOQO1G/[1G/[OOOS-E6x-E6xOOQO1G.}1G.}OOOQ-E6y-E6yOOQOAN=^AN=^",stateData:"&d~OvOS~OPROSQOVROWRO~OZTO[XO^VOaUOhWO~OR]OU^O~O[`O^aO~O[bO~O[cO~O[dO~ObeO~ObfO~ObgO~ORhO~O]kOwiO~O[lO~O_mO~OynOzoO~OysOztO~O[uO~O]wOwiO~O_yOwiO~OtzO~Os|O~OSQOV!OOW!OOr!OOy!QO~OSQOV!ROW!ROq!ROz!QO~O_!TOwiO~O]!UO~Oy!VO~Oz!VO~OSQOV!OOW!OOr!OOy!XO~OSQOV!ROW!ROq!ROz!XO~O]!ZO~O",goto:"#dyPPPPPzPPPP!WPPPPP!WPP!Z!^!a!d!dP!g!j!m!p!v#Q#WPPPPPPPP#^SROSS!Os!PT!Rt!SRYPRqeR{nR}oRZPRqfR[PRqgQSOR_SQj`SvjxRxlQ!PsR!W!PQ!StR!Y!SQpeRrf",nodeNames:"⚠ Text Content }} {{ Interpolation InterpolationContent Entity InvalidEntity Attribute BoundAttributeName [ Identifier ] ( ) ReferenceName # Is ExpressionAttributeValue AttributeInterpolation AttributeInterpolation EventName DirectiveName * StatementAttributeValue AttributeName AttributeValue",maxTerm:42,nodeProps:[["openedBy",3,"{{",15,"("],["closedBy",4,"}}",14,")"],["isolate",-4,5,19,25,27,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"0r~RyOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mqr#rrs%jst&Qtv#rvw&hwx)zxy*byz*xz{+`{}#r}!O+v!O!P-]!P!Q#r!Q![+v![!]+v!]!_#r!_!`-s!`!c#r!c!}+v!}#O.Z#O#P#r#P#Q.q#Q#R#r#R#S+v#S#T#r#T#o+v#o#p/X#p#q#r#q#r0Z#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vQ#wTUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rQ$ZSO#q#r#r;'S#r;'S;=`$g<%lO#rQ$jP;=`<%l#rR$t[UQvPOX#rXY$mYZ$mZ]#r]^$m^p#rpq$m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okenPrec:0}),V=i.parser.configure({top:"SingleExpression"}),Q=A.configure({props:[q({Text:r.content,Is:r.definitionOperator,AttributeName:r.attributeName,"AttributeValue ExpressionAttributeValue StatementAttributeValue":r.attributeValue,Entity:r.character,InvalidEntity:r.invalid,"BoundAttributeName/Identifier":r.attributeName,"EventName/Identifier":r.special(r.attributeName),"ReferenceName/Identifier":r.variableName,"DirectiveName/Identifier":r.keyword,"{{ }}":r.brace,"( )":r.paren,"[ ]":r.bracket,"# '*'":r.punctuation})]}),o={parser:V},w={parser:i.parser},U=Q.configure({wrap:l((O,t)=>O.name=="InterpolationContent"?o:null)}),y=Q.configure({wrap:l((O,t)=>{var a;return O.name=="InterpolationContent"?o:O.name!="AttributeInterpolation"?null:((a=O.node.parent)===null||a===void 0?void 0:a.name)=="StatementAttributeValue"?w:o}),top:"Attribute"}),E={parser:U},N={parser:y},s=c({selfClosingTags:!0});function S(O){return O.configure({wrap:l(z)},"angular")}const k=S(s.language);function z(O,t){switch(O.name){case"Attribute":return/^[*#(\[]|\{\{/.test(t.read(O.from,O.to))?N:null;case"Text":return E}return null}function j(O={}){let t=s;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof g))throw new RangeError("The base option must be the result of calling html(...)");t=O.base}return new P(t.language==s.language?k:S(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/})])}export{j as angular,k as angularLanguage};
@@ -0,0 +1 @@
1
+ import{m as M,s as k,W as x}from"./WorkView-J0V1k1Q7.js";import{a as Js,b as se,c as ee,S as te,d as oe,u as re}from"./WorkView-J0V1k1Q7.js";import{a5 as w,a7 as P,r as m,a6 as T,aV as h,j as c,cW as A,cX as _,cY as b,cZ as v,c_ as C,aZ as N,h as R,s as j}from"./index-BYTLOFNS.js";import{u as I}from"./use-room-sessions-BeiAMSkk.js";import{u as L}from"./use-direct-message-panel-CPyyrU4P.js";import"./registry-3K4FIIyI.js";import"./WidgetErrorCard-B477vOv2.js";import"./PromptSuggestionChips-Cxa-xTMn.js";import"./primer-trigger-Bb7X-l3r.js";import"./use-is-below-desktop-DSwl4xyH.js";import"./use-notification-prefs-DoZgirjS.js";import"./use-status-budget-GIeJAyM1.js";import"./git-branch-DpByNz2U.js";import"./trust-dial-tuMHO5Ug.js";import"./zap-BmeuEI5X.js";import"./use-update-config-Bt7fMLqS.js";import"./settings-for-runtime-BoOa-ZFG.js";import"./RuntimeSetupDialog-BcDt-BYK.js";import"./inline-code-B3u1dOXm.js";import"./list-runtime-types-Cyl4h4lV.js";import"./RuntimeConnectFlow-Ddm_TBWI.js";import"./copy-button-BodCVufV.js";import"./useMutationState-Bffa43_B.js";import"./runtime-connect-Dn0T5YWv.js";import"./unverified-catalog-notice-ofL4eYQH.js";import"./format-tokens-DymkROvy.js";import"./layers-Dbd-86dV.js";import"./detail-row-BvEUzVxe.js";import"./cpu-BXE_D43d.js";import"./banner-CBw5pFjQ.js";import"./UnreadDivider-DPMhdEbw.js";import"./composer-insert-BpyATrmR.js";import"./use-composer-prefs-DWFqxtm6.js";import"./McpAppFrame-DAPJUxUi.js";import"./more-details-DNp6DH8i.js";import"./find-latest-widget-fence-D_FwbHep.js";import"./file-C_57RCIQ.js";import"./use-session-canvas-Cc04zSW3.js";import"./rotate-cw-CpuoCwEK.js";import"./query-keys-DeYqUDia.js";import"./index.esm-B0kiCgAP.js";import"./file-text-CS9s0qOe.js";import"./shield-x-DknrRQrV.js";import"./McpSigninBody-D4j1GIhT.js";import"./image-off-Czqq8ai8.js";import"./format-duration-BCr6uzby.js";import"./use-connector-management-B_RvwV0T.js";import"./AgentRequestCard-BSvTh8P0.js";import"./access-copy-w5gryYsO.js";import"./query-error-state-BdmBV0DG.js";import"./empty-state-B316LEXY.js";import"./use-bindings-DVKWBz4y.js";import"./connection-copy--MA7AN04.js";import"./KeyEntry-Z5hKKbef.js";import"./use-todos-Bq9I1_Md.js";import"./file-drag-GDx2qhdk.js";import"./paperclip-DYgUORd3.js";import"./index-CIokV9hG.js";import"./markdown-content-C1i_dR6j.js";import"./use-transform-DEFDL9dO.js";import"./index-D0k8LoLP.js";import"./progress-CNm_pBbE.js";import"./table-BrvyPoEL.js";import"./package-DHEY3aDq.js";import"./heart-DKWg_e72.js";const W=[];function q(s,t){const o=w(),i=P(),n=m.useRef(t);m.useEffect(()=>{const r=n.current&&!t;n.current=t,r&&s!==null&&i.invalidateQueries({queryKey:["session-readout",s]})},[t,s,i]);const e=T({queryKey:["session-readout",s],queryFn:async()=>M((await o.getMessages(s)).messages),enabled:s!==null,staleTime:h.MESSAGE_STALE_TIME_MS,refetchInterval:t?h.ACTIVE_TAB_REFETCH_MS:!1});return{messages:e.data??W,isLoading:s!==null&&e.isLoading,isError:e.isError}}function Xs(){const s=L();return(s==null?void 0:s.kind)==="pending"?null:(s==null?void 0:s.kind)==="one-to-one"?c.jsx(D,{sessionId:s.sessionId,agentPath:s.agentPath,showSessions:s.showSessions}):(s==null?void 0:s.kind)==="group"?c.jsx(O,{roomId:s.roomId,members:s.members,working:s.working,showSessions:s.showSessions}):c.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-6 text-center text-xs",children:"Open a DM to see its work."})}function D({sessionId:s,agentPath:t,showSessions:o}){const i=A(s),{messages:n}=_(s),e=m.useMemo(()=>k(i,n),[i,n]),r=b(s)==="streaming",{name:l}=v(t),{openSessionView:d}=C();return c.jsx(x,{sessionId:s,messages:e,agentName:l,showSessions:o,onOpenSession:d,working:r})}function O({roomId:s,members:t,working:o,showSessions:i}){var g,E;const n=N(u=>u.explicitAgentPath),e=t.find(u=>u.agentPath===n)??null,r=I(s,{enabled:e!==null}),{refetch:l}=r,d=m.useRef(o);m.useEffect(()=>{d.current!==o&&(d.current=o,l())},[o,l]);const a=e===null?null:((E=(g=r.data)==null?void 0:g.bindings.find(u=>u.authorId===e.authorId))==null?void 0:E.sessionId)??null,S=q(a,o),f=R(),y=m.useCallback(()=>{a!==null&&f&&f(j({session:a}))},[f,a]);let p=null;return e===null?p="Pick a member above.":r.isError||S.isError?p="Couldn’t load these steps.":r.isPending||S.isLoading?p="Loading steps…":a===null&&(p=`${e.displayName} hasn’t worked in this DM yet.`),c.jsx(x,{sessionId:a,messages:S.messages,agentName:(e==null?void 0:e.displayName)??null,showSessions:i,onOpenSession:y,notice:p})}export{Js as SESSION_CAPABILITIES,se as SessionComposer,ee as SessionMessage,te as SessionPage,oe as SessionTranscript,Xs as WorkPanel,re as useSessionTarget};