@openscout/scout 0.2.105 → 0.2.107

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 (575) hide show
  1. package/README.md +26 -0
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/chat.mjs +23 -1
  5. package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +1 -0
  6. package/dist/client/assets/{AddProjectForm-CHNJ4NnS.js → AddProjectForm-CusDRiVO.js} +1 -1
  7. package/dist/client/assets/{AdventureEvidence-B4mEvXeD.js → AdventureEvidence-CyegKk1V.js} +1 -1
  8. package/dist/client/assets/{AdventureReader-ZsBDQITY.js → AdventureReader-X-hbTOi0.js} +1 -1
  9. package/dist/client/assets/{AdventureScenery-DSxDlqG1.js → AdventureScenery-LPXSVP67.js} +1 -1
  10. package/dist/client/assets/AgentAdventures-BAgxdOF8.js +1 -0
  11. package/dist/client/assets/AgentAvatar-CrP1eXxk.js +1 -0
  12. package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +1 -0
  13. package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +1 -0
  14. package/dist/client/assets/{AgentDetailCard-MIEBKw_S.js → AgentDetailCard-DtHT3sCo.js} +1 -1
  15. package/dist/client/assets/AgentFloorView-DH4jiDgw.js +1 -0
  16. package/dist/client/assets/{AgentFloorWorld-BTqwmK5G.js → AgentFloorWorld-CjoIa6jA.js} +1 -1
  17. package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +1 -0
  18. package/dist/client/assets/{AgentLaneCard-C4rKLLdT.js → AgentLaneCard-BaZ2g-f8.js} +1 -1
  19. package/dist/client/assets/{AgentLaneChrome-fGC-ZrJS.js → AgentLaneChrome-TF1SlJSc.js} +1 -1
  20. package/dist/client/assets/{AgentLaneDetailSheet-BTF4_th9.js → AgentLaneDetailSheet-EzEPsn3g.js} +1 -1
  21. package/dist/client/assets/{AgentLaneSummaryResize-DgSeA_vS.js → AgentLaneSummaryResize-dpp7YvrX.js} +1 -1
  22. package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +1 -0
  23. package/dist/client/assets/{AgentLanesPreflight-CcS23wij.js → AgentLanesPreflight-Ry-aqDTr.js} +1 -1
  24. package/dist/client/assets/AgentLanesView-BJi9xXz6.js +2 -0
  25. package/dist/client/assets/{AgentLiveActions-6Kfr1uOT.js → AgentLiveActions-CfTupTEl.js} +1 -1
  26. package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +1 -0
  27. package/dist/client/assets/AgentSessions-B1gOhDBf.js +6 -0
  28. package/dist/client/assets/AgentsConsole-RXGqRvcb.js +1 -0
  29. package/dist/client/assets/AgentsScreen-ChwMBs11.js +1 -0
  30. package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +1 -0
  31. package/dist/client/assets/{AstronautSuit-D67fIBdR.js → AstronautSuit-Cchnc4Ug.js} +1 -1
  32. package/dist/client/assets/{AtopView-Ck30FbzG.js → AtopView-gkEp4y__.js} +1 -1
  33. package/dist/client/assets/{BackToPicker-CkBhGRlD.js → BackToPicker-CUkjnoVk.js} +1 -1
  34. package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +1 -0
  35. package/dist/client/assets/{BriefingsScreen-DTxYMr3a.js → BriefingsScreen-B1HlBMGZ.js} +1 -1
  36. package/dist/client/assets/{BrokerMetadataPanel-crirZCdo.js → BrokerMetadataPanel-Dk242Yh_.js} +1 -1
  37. package/dist/client/assets/BrokerScreen-DwOF6bMA.js +8 -0
  38. package/dist/client/assets/{Canvas-CRP0KjKb.js → Canvas-X9pVSkw3.js} +1 -1
  39. package/dist/client/assets/{CastPicker-ZPomvOf-.js → CastPicker-BXUtPAGC.js} +1 -1
  40. package/dist/client/assets/ChannelComposer-DoK7IDGa.js +1 -0
  41. package/dist/client/assets/ChannelSidebar-e9DOPulb.js +1 -0
  42. package/dist/client/assets/{CharacterFamilyPreview-ckVkecDO.js → CharacterFamilyPreview-DMfw7UM_.js} +1 -1
  43. package/dist/client/assets/{ChatAvatar-DKBsbOqk.js → ChatAvatar-C3a_o5Hj.js} +1 -1
  44. package/dist/client/assets/ChatBits-CsvxbToF.js +1 -0
  45. package/dist/client/assets/{ChatCollapsedStrip-Co0NmqOO.js → ChatCollapsedStrip-FEmQ_G9J.js} +1 -1
  46. package/dist/client/assets/ChatRichInput-DhtwFxQE.js +31 -0
  47. package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +1 -0
  48. package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +1 -0
  49. package/dist/client/assets/ChatSpaceTheme-3wLZGsvT.css +1 -0
  50. package/dist/client/assets/ChatSpaceTheme-CUH8bTZc.js +1 -0
  51. package/dist/client/assets/{CodeDiffPane-D-iv28LJ.js → CodeDiffPane-DuQRwpgK.js} +1 -1
  52. package/dist/client/assets/{CodeProjectPicker-CZ3gDdiT.js → CodeProjectPicker-ZQ6gSBpg.js} +1 -1
  53. package/dist/client/assets/{CodeScreen-CSC-zbP9.js → CodeScreen-BXyKeL5T.js} +1 -1
  54. package/dist/client/assets/{CommsCanvas-DdNAwjGW.js → CommsCanvas-THp0r_U8.js} +1 -1
  55. package/dist/client/assets/{CommsDeck-mGWY7Ivi.js → CommsDeck-BVmSMV2V.js} +1 -1
  56. package/dist/client/assets/{CommsFlowGraph-voDD9M5R.js → CommsFlowGraph-DxoOaLF_.js} +1 -1
  57. package/dist/client/assets/{CommsFlowMap-C33sgD48.js → CommsFlowMap-Vi8ziCPg.js} +1 -1
  58. package/dist/client/assets/{CommsSelection-BL8aYD7z.js → CommsSelection-BUoRbu9o.js} +1 -1
  59. package/dist/client/assets/ComposerAttachments-DW0AIb8k.js +1 -0
  60. package/dist/client/assets/ConversationComposer-CUQyArlk.js +1 -0
  61. package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +1 -0
  62. package/dist/client/assets/ConversationHeader-C-ZWscKj.js +1 -0
  63. package/dist/client/assets/{ConversationPanels-6pprBpmq.js → ConversationPanels-D9oC0xG5.js} +2 -2
  64. package/dist/client/assets/ConversationScreen-9MlMnEo4.css +1 -0
  65. package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +2 -0
  66. package/dist/client/assets/ConversationStatus--IPm2nGh.js +1 -0
  67. package/dist/client/assets/{CrewAvatar-D0c9z5Qr.css → CrewAvatar-BnIPIn_Z.css} +1 -1
  68. package/dist/client/assets/CrewAvatar-kTznzqcO.js +1 -0
  69. package/dist/client/assets/{CrewSprite-Dp9KBBGY.js → CrewSprite-Dhryjx2c.js} +1 -1
  70. package/dist/client/assets/CrewStage-vdO0qm3D.js +1 -0
  71. package/dist/client/assets/CrewWorkspaces-DCBzAAS4.js +1 -0
  72. package/dist/client/assets/{DataTable-av71ehJV.js → DataTable-aH-jCyDq.js} +1 -1
  73. package/dist/client/assets/{DispatchAftermath-CcYGUB10.js → DispatchAftermath-66uQAorV.js} +1 -1
  74. package/dist/client/assets/{DocumentFocusViewer-DlMiEALb.js → DocumentFocusViewer-DJr0v0D_.js} +1 -1
  75. package/dist/client/assets/{EmbeddableSurfacesLab-CTkO_tQR.js → EmbeddableSurfacesLab-BBa70EhJ.js} +1 -1
  76. package/dist/client/assets/{EmptyState-CYUwYyAW.js → EmptyState-CZlrHXy-.js} +1 -1
  77. package/dist/client/assets/{FileViewerPane-Cxhixtks.js → FileViewerPane-BAO6mtjD.js} +1 -1
  78. package/dist/client/assets/FleetRollCallHud-C5q2567n.js +1 -0
  79. package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +1 -0
  80. package/dist/client/assets/{FloorContextSheet-Vj_wVZq1.js → FloorContextSheet-2_NVPQor.js} +1 -1
  81. package/dist/client/assets/{FloorExchangePanel-CjHSDXad.js → FloorExchangePanel-BU1pPu8K.js} +1 -1
  82. package/dist/client/assets/{FloorMessagePasses-BG4ebnX5.js → FloorMessagePasses-cLW2UGNP.js} +1 -1
  83. package/dist/client/assets/{FloorReplay-BoYaGY9t.js → FloorReplay-VFzA6Kxc.js} +1 -1
  84. package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +1 -0
  85. package/dist/client/assets/{FloorSavedWork-jbtRs-YE.js → FloorSavedWork-BeHDejWz.js} +1 -1
  86. package/dist/client/assets/FloorTacticalHUD-CO-iiFpb.js +1 -0
  87. package/dist/client/assets/{FollowScreen-CupyOgt4.js → FollowScreen-CFfkIbc6.js} +1 -1
  88. package/dist/client/assets/HarnessMark-C4naWc16.js +1 -0
  89. package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +1 -0
  90. package/dist/client/assets/{HerdrSession-Dcm3vf9U.js → HerdrSession-_t7yM8vX.js} +2 -2
  91. package/dist/client/assets/{HomeHero-pIZtE1cC.js → HomeHero-DouPyNmz.js} +1 -1
  92. package/dist/client/assets/{HostAdvisorView-Dv5meXo2.js → HostAdvisorView-CnM1i8hW.js} +1 -1
  93. package/dist/client/assets/InviteLandingScreen-CEjG2E34.js +1 -0
  94. package/dist/client/assets/InviteSheet-CwxZtWCl.js +1 -0
  95. package/dist/client/assets/{JumpPalette-BmiSOEmp.js → JumpPalette-O1aJE9gR.js} +1 -1
  96. package/dist/client/assets/{KnowledgeSearchInspector-B8yiM524.js → KnowledgeSearchInspector-32n9baT-.js} +1 -1
  97. package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +1 -0
  98. package/dist/client/assets/{LaneToolHoverCard-D2cnTeUd.js → LaneToolHoverCard-CJa110yk.js} +1 -1
  99. package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +1 -0
  100. package/dist/client/assets/{LaneTraceEventFocus-BLhVHwff.js → LaneTraceEventFocus-TbrNHRj_.js} +1 -1
  101. package/dist/client/assets/{MeshCanvas-BR25OBTJ.js → MeshCanvas-DWZHYh1A.js} +2 -2
  102. package/dist/client/assets/{MeshCanvasMinimap-ClVolr4-.js → MeshCanvasMinimap-iswYFpIb.js} +1 -1
  103. package/dist/client/assets/MeshScreen-8nAzQVbm.js +1 -0
  104. package/dist/client/assets/{MeshTopologyView-BT3ke2D1.js → MeshTopologyView-BVvtqI8q.js} +2 -2
  105. package/dist/client/assets/MessageEmbeds-ksPazAKH.js +1 -0
  106. package/dist/client/assets/MessagesScreen-C3WB4T21.js +1 -0
  107. package/dist/client/assets/{MissionContextRail-CafjuseK.js → MissionContextRail-D62-Wis8.js} +1 -1
  108. package/dist/client/assets/MissionControlView-B9cNPXvl.js +1 -0
  109. package/dist/client/assets/{MissionFocusOverlay-nhy3hkxQ.js → MissionFocusOverlay-C1zys3Jv.js} +1 -1
  110. package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +1 -0
  111. package/dist/client/assets/{MissionLogPane-DiUf3vWW.js → MissionLogPane-B19lYSY9.js} +1 -1
  112. package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +1 -0
  113. package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +1 -0
  114. package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +1 -0
  115. package/dist/client/assets/{NewAgentModal-BQ2wQ5gp.js → NewAgentModal-Bh-L-emz.js} +1 -1
  116. package/dist/client/assets/NewChatComposer-C97-iTMK.js +19 -0
  117. package/dist/client/assets/{NewChatOrigin-C8ROO4ps.js → NewChatOrigin-DFbF_XvR.js} +1 -1
  118. package/dist/client/assets/{NodeDetailPanel-BNTqYC7m.js → NodeDetailPanel-CElOEpCh.js} +1 -1
  119. package/dist/client/assets/{NodeMenu-CcOeFRCB.js → NodeMenu-B-jjHf1c.js} +1 -1
  120. package/dist/client/assets/ObserveEmbedScreen-B7Qt69Ms.js +2 -0
  121. package/dist/client/assets/{ObserveTextFlow-CC5mnngm.js → ObserveTextFlow-PFnG_10h.js} +2 -2
  122. package/dist/client/assets/{ObservedTopologyPanel-DF6tRZL_.js → ObservedTopologyPanel-CUTIoLZJ.js} +1 -1
  123. package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +31 -0
  124. package/dist/client/assets/OpsAgentsView-DajlX8LO.js +1 -0
  125. package/dist/client/assets/OpsScreen-jVcaBKGi.js +1 -0
  126. package/dist/client/assets/OpsSubnav-BOOYShHE.js +1 -0
  127. package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +1 -0
  128. package/dist/client/assets/{ProjectAgentProfileBar-C8z22pJ2.js → ProjectAgentProfileBar-DHuMKJj-.js} +1 -1
  129. package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +1 -0
  130. package/dist/client/assets/ProjectsInbox-B8zYE4vP.css +1 -0
  131. package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +2 -0
  132. package/dist/client/assets/ProjectsRail-CDWocin_.js +1 -0
  133. package/dist/client/assets/ProjectsScreen-B_CJycqW.js +1 -0
  134. package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +1 -0
  135. package/dist/client/assets/Provider-C35yu29I.js +5 -0
  136. package/dist/client/assets/{RailRow-DUPqXMZh.js → RailRow-BjmWK420.js} +1 -1
  137. package/dist/client/assets/RawSessionsTable-DzT90hWu.js +1 -0
  138. package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +16 -0
  139. package/dist/client/assets/{RenderedWorkerSprite-C8fxndAh.js → RenderedWorkerSprite-Dhlyg89J.js} +1 -1
  140. package/dist/client/assets/{ReplayClock-DUVJjrIu.js → ReplayClock-348f17bW.js} +1 -1
  141. package/dist/client/assets/{ReplayLog-Bek1Vc4W.js → ReplayLog-CBnAM3ui.js} +1 -1
  142. package/dist/client/assets/{ReplayOutpost-DlRg3172.js → ReplayOutpost-DyRPfNFx.js} +1 -1
  143. package/dist/client/assets/{RepoDiffEmbedScreen-CVUMnt6A.js → RepoDiffEmbedScreen-BWxvRDrS.js} +1 -1
  144. package/dist/client/assets/{RepoDiffPageScreen-D9-s5PyB.js → RepoDiffPageScreen-DN94irmY.js} +1 -1
  145. package/dist/client/assets/{RepoDiffViewer-D7FN-oyY.js → RepoDiffViewer-_4JVXBIW.js} +1 -1
  146. package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +2 -0
  147. package/dist/client/assets/{ReposScreen-BQ7HO1om.js → ReposScreen-uMCpt0e9.js} +2 -2
  148. package/dist/client/assets/{RiggedWorkerCharacter-CJMWlvV-.js → RiggedWorkerCharacter-q6QRc7_o.js} +1 -1
  149. package/dist/client/assets/{SageModelStudio-B526NSnw.js → SageModelStudio-CNDhZhgD.js} +1 -1
  150. package/dist/client/assets/{ScoutDeckSurface-ChkvGyEW.js → ScoutDeckSurface-CUaU4R6T.js} +1 -1
  151. package/dist/client/assets/{ScoutSurface-6g1f5chk.js → ScoutSurface-3_25USO_.js} +1 -1
  152. package/dist/client/assets/{ScoutbotFxLab-BuwBdnPf.js → ScoutbotFxLab-CRqhYe0a.js} +1 -1
  153. package/dist/client/assets/{SecondaryNav-Bs-_VwTC.js → SecondaryNav-D7dbV2qo.js} +1 -1
  154. package/dist/client/assets/SessionContextStrip-CXfs9hUD.js +1 -0
  155. package/dist/client/assets/SessionContextStrip-DAIXwtHd.css +1 -0
  156. package/dist/client/assets/{SessionEmbedScreen-C2wf35-P.js → SessionEmbedScreen-D0zFmou-.js} +1 -1
  157. package/dist/client/assets/SessionHopMenu-E6VJZrE0.js +1 -0
  158. package/dist/client/assets/{SessionObserve-B64YsYhy.js → SessionObserve-DXxBvejJ.js} +9 -9
  159. package/dist/client/assets/SessionObserveEvidence-Cuj_KHxR.js +1 -0
  160. package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +1 -0
  161. package/dist/client/assets/SessionsScreen-BLIRkohT.js +1 -0
  162. package/dist/client/assets/SettingsDrawer-juCpnbH6.js +3 -0
  163. package/dist/client/assets/SettingsScreen-BtGzE2-O.js +1 -0
  164. package/dist/client/assets/{SharedFloorCharacter-V04kD5T9.js → SharedFloorCharacter-DNEiaOUh.js} +1 -1
  165. package/dist/client/assets/SharedWorkFloor-0rqtdF-n.css +1 -0
  166. package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +2 -0
  167. package/dist/client/assets/{ShikiPane-XwFI-pCp.js → ShikiPane-CRtTYkMj.js} +1 -1
  168. package/dist/client/assets/{SlidePanel-BMpkXai_.js → SlidePanel-_CHAQdOa.js} +1 -1
  169. package/dist/client/assets/SpaceSwitcher-BLgSCf_T.js +1 -0
  170. package/dist/client/assets/{SpriteAvatar-aHeF4ZQZ.js → SpriteAvatar-CpZWf54-.js} +1 -1
  171. package/dist/client/assets/{SproutActionSprite-DI5N3gOj.js → SproutActionSprite-BSiTS4en.js} +1 -1
  172. package/dist/client/assets/{StatusPill-Dw4LP7wu.js → StatusPill-2gCP6H7A.js} +1 -1
  173. package/dist/client/assets/{TailView-BofjmUMJ.js → TailView-CYSijNTy.js} +2 -2
  174. package/dist/client/assets/Terminal-Bi97yb5s.js +4 -0
  175. package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +1 -0
  176. package/dist/client/assets/{TerminalHeaderMount-CwbQhXcI.js → TerminalHeaderMount-Cq4OD_xN.js} +1 -1
  177. package/dist/client/assets/{TerminalRelay--qOBwnbR.js → TerminalRelay-DrikpUSJ.js} +3 -3
  178. package/dist/client/assets/{TextDocumentSurface-BK6Qy41F.js → TextDocumentSurface-D52m7Vd8.js} +1 -1
  179. package/dist/client/assets/{TmuxPeek-DpUT9Tpc.js → TmuxPeek-CXFeweMg.js} +1 -1
  180. package/dist/client/assets/VoiceControlWell-DF3bjcYA.js +1 -0
  181. package/dist/client/assets/VoicePathDiagram-CmpHWfO-.js +1 -0
  182. package/dist/client/assets/{VoicePermissionsPanel-D35fOnQj.js → VoicePermissionsPanel-Ok2nfxHw.js} +1 -1
  183. package/dist/client/assets/VoiceTurnDetails-wAByRaNB.js +8 -0
  184. package/dist/client/assets/VoiceTurnStage-edoJalLV.js +1 -0
  185. package/dist/client/assets/VoiceTurnView-D-8g5E4r.js +1 -0
  186. package/dist/client/assets/WorkDetailScreen-zQkNVy2F.js +5 -0
  187. package/dist/client/assets/{WorkFilesViewer-t8AEyx3Q.js → WorkFilesViewer-vNt01sDd.js} +1 -1
  188. package/dist/client/assets/{WorkRunView-_mhG_FR2.js → WorkRunView-BDkR7Edq.js} +1 -1
  189. package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +1 -0
  190. package/dist/client/assets/{WorldCharacter-BRrj3MQN.js → WorldCharacter-CIIlutQq.js} +1 -1
  191. package/dist/client/assets/WorldMinimap-B6HNgcDe.js +1 -0
  192. package/dist/client/assets/{WorldSky-D-RJzSa6.js → WorldSky-Jm2Z6dfW.js} +1 -1
  193. package/dist/client/assets/{activity-BJqFrZyB.js → activity-CIlFrfPJ.js} +1 -1
  194. package/dist/client/assets/{addon-fit-CHohcvS3.js → addon-fit-dFpj9Kfq.js} +1 -1
  195. package/dist/client/assets/{addon-webgl-CaRy2x2b.js → addon-webgl-BFCGRtGh.js} +1 -1
  196. package/dist/client/assets/{agent-essentials-bKWYOZaH.js → agent-essentials-BGGvT5G6.js} +1 -1
  197. package/dist/client/assets/{agent-master-model-C-KdOFDK.js → agent-master-model-Bk_yuUXJ.js} +1 -1
  198. package/dist/client/assets/{agent-specialization-BplZUa_0.js → agent-specialization-DDc7mLCW.js} +1 -1
  199. package/dist/client/assets/agents-screen-BYakbO50.css +1 -0
  200. package/dist/client/assets/{arc.es-CubLvQ4W.js → arc.es-C1SQHJ3k.js} +1 -1
  201. package/dist/client/assets/{arrow-left-DFfKAq0d.js → arrow-left-MVUKauwQ.js} +1 -1
  202. package/dist/client/assets/{arrow-right-DmAWnyAH.js → arrow-right-Bp-FpE5V.js} +1 -1
  203. package/dist/client/assets/{arrow-up-right-B0aLKiyF.js → arrow-up-right-BPedAgxO.js} +1 -1
  204. package/dist/client/assets/{book-open-BL9qvhEI.js → book-open-CV98WMSp.js} +1 -1
  205. package/dist/client/assets/{bot-BhAVbcCA.js → bot-B4zLQ4IN.js} +1 -1
  206. package/dist/client/assets/chat-api-DSJMBYoT.js +2 -0
  207. package/dist/client/assets/chat-message-markup-91DIry6R.js +1 -0
  208. package/dist/client/assets/chat-space-model-aW3Fd8_U.js +4 -0
  209. package/dist/client/assets/chat-transport-DNS5CB2I.js +1 -0
  210. package/dist/client/assets/{check-g7D7-c1J.js → check-lrJ3a73a.js} +1 -1
  211. package/dist/client/assets/{chevron-down-CDzRQQGl.js → chevron-down-l1mrh5S9.js} +1 -1
  212. package/dist/client/assets/{chevron-right-DKGTLiqc.js → chevron-right-DrfqcerI.js} +1 -1
  213. package/dist/client/assets/{chevron-up-DX7R6KY2.js → chevron-up-CETZJzjV.js} +1 -1
  214. package/dist/client/assets/{chunk-HRAB3GC3-Dvk_QpRq.js → chunk-HRAB3GC3-DbVLgbWX.js} +1 -1
  215. package/dist/client/assets/{clock-CQb4FeMf.js → clock-BV1aqPkK.js} +1 -1
  216. package/dist/client/assets/{code-xml-Cmadr3pQ.js → code-xml-BhcNbLWU.js} +1 -1
  217. package/dist/client/assets/{coffee-ljG1_krY.js → coffee-D7EAOdCk.js} +1 -1
  218. package/dist/client/assets/{compass-CvzkzkIh.js → compass-63TUaz5_.js} +1 -1
  219. package/dist/client/assets/content-B1lgE8qr.js +1 -0
  220. package/dist/client/assets/content-B5l11YyQ.js +1 -0
  221. package/dist/client/assets/content-BNZOZEpX.js +1 -0
  222. package/dist/client/assets/content-BRIxP155.js +1 -0
  223. package/dist/client/assets/content-BWd8gt8L.js +1 -0
  224. package/dist/client/assets/content-BfwS2jAK.js +1 -0
  225. package/dist/client/assets/content-C4p43_eT.js +1 -0
  226. package/dist/client/assets/content-CdYfaoDV.js +1 -0
  227. package/dist/client/assets/content-CzldLxw0.js +1 -0
  228. package/dist/client/assets/content-D-olnc4U.js +1 -0
  229. package/dist/client/assets/content-DTioimq4.js +1 -0
  230. package/dist/client/assets/content-LOebm3_d.js +1 -0
  231. package/dist/client/assets/{content-CKJ9zb7Z.js → content-nGlEZhUI.js} +1 -1
  232. package/dist/client/assets/{content-D1Ze_FG9.js → content-oyzDM-LK.js} +1 -1
  233. package/dist/client/assets/content-x1PHxED7.js +1 -0
  234. package/dist/client/assets/content-zX3ZY3T9.js +1 -0
  235. package/dist/client/assets/{conversation-icons-CIRaxmid.js → conversation-icons-Tqba2d56.js} +1 -1
  236. package/dist/client/assets/conversation-model-FxDeWlle.js +1 -0
  237. package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +1 -0
  238. package/dist/client/assets/conversations-DoAAO6kA.js +1 -0
  239. package/dist/client/assets/{copy-BGOC1tJB.js → copy-xKeM5ZtU.js} +1 -1
  240. package/dist/client/assets/{cpu-Q6nrHFTN.js → cpu-BOTa_WLr.js} +1 -1
  241. package/dist/client/assets/{createLucideIcon-ChvMq-zl.js → createLucideIcon-zZ8Hx7er.js} +1 -1
  242. package/dist/client/assets/ctx-panel-BC8fpcWJ.css +1 -0
  243. package/dist/client/assets/direct-voice-BbLPuJ04.js +2 -0
  244. package/dist/client/assets/direct-voice-DbO7CSv_.css +1 -0
  245. package/dist/client/assets/discover-DJFxyV1k.js +2 -0
  246. package/dist/client/assets/embed-entry-Lyvu0Kfc.js +2 -0
  247. package/dist/client/assets/{external-link-BVccgH0n.js → external-link-CUObqmgX.js} +1 -1
  248. package/dist/client/assets/{eye-CsGfEVR6.js → eye-LrO-cXQt.js} +1 -1
  249. package/dist/client/assets/{file-code-corner-Be6da5l3.js → file-code-corner-CsU7jJpu.js} +1 -1
  250. package/dist/client/assets/{file-text-DP6txVW-.js → file-text-CnISiiw6.js} +1 -1
  251. package/dist/client/assets/{flag-DAFE2wZ5.js → flag-C4wl8z2-.js} +1 -1
  252. package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +1 -0
  253. package/dist/client/assets/{folder-B_S7gBVr.js → folder-D5prSkzz.js} +1 -1
  254. package/dist/client/assets/{gauge-DQCGlE3o.js → gauge-D9_5iJEm.js} +1 -1
  255. package/dist/client/assets/{gestures-CofqY4Km.js → gestures-QZub3Ot9.js} +1 -1
  256. package/dist/client/assets/{git-branch-DcUCsWdJ.js → git-branch-B0_fPLO7.js} +1 -1
  257. package/dist/client/assets/{go-shortcuts-KQy-ZOpV.js → go-shortcuts-DicR7sUf.js} +1 -1
  258. package/dist/client/assets/home-moving-signal-rpMhsOJB.js +1 -0
  259. package/dist/client/assets/home-now-card-ByE6Umcx.js +1 -0
  260. package/dist/client/assets/{home-now-card-nano-CvU8B61b.js → home-now-card-nano-B5Dv3-pb.js} +1 -1
  261. package/dist/client/assets/hooks-_eCZZPsR.js +2 -0
  262. package/dist/client/assets/index-724SdE6r.js +1 -0
  263. package/dist/client/assets/{index-kkXUq-zf.js → index-CHD0qcfL.js} +1 -1
  264. package/dist/client/assets/index-CN4rBB_s.css +1 -0
  265. package/dist/client/assets/index-D1d98iYf.js +1 -0
  266. package/dist/client/assets/{index-DReVb7jZ.js → index-EsrkGBcv.js} +8 -8
  267. package/dist/client/assets/index-gGHPA-By.js +1 -0
  268. package/dist/client/assets/{inspector-panel-CLU7wjnT.js → inspector-panel-BkgUDn6G.js} +2 -2
  269. package/dist/client/assets/{keyboard-nav-CJXPaHXj.js → keyboard-nav-DDHegDbx.js} +1 -1
  270. package/dist/client/assets/{lane-roster-store-Ch9t6lb0.js → lane-roster-store-D-RSWjb-.js} +1 -1
  271. package/dist/client/assets/{layers-BOwyWodP.js → layers-C8PDiMul.js} +1 -1
  272. package/dist/client/assets/{layout-grid-B36Qsh0y.js → layout-grid-Cor2frzj.js} +1 -1
  273. package/dist/client/assets/left-Bn5X7x2o.js +2 -0
  274. package/dist/client/assets/left-BqS0fYX1.js +1 -0
  275. package/dist/client/assets/left-CTCeeeD3.js +1 -0
  276. package/dist/client/assets/left-DhtVPVux.js +1 -0
  277. package/dist/client/assets/left-K39b-Wvx.js +2 -0
  278. package/dist/client/assets/left-KGmueNPt.js +1 -0
  279. package/dist/client/assets/left-P_GOYB-s.js +1 -0
  280. package/dist/client/assets/left-advisor-B0N47De2.js +1 -0
  281. package/dist/client/assets/left-agents-CsSNc51Y.js +1 -0
  282. package/dist/client/assets/left-default-BlO5LP2T.js +1 -0
  283. package/dist/client/assets/left-lanes-C4PhaJE6.js +1 -0
  284. package/dist/client/assets/left-mission-BjTE5vPa.js +1 -0
  285. package/dist/client/assets/library-CkWNPHRp.js +1 -0
  286. package/dist/client/assets/{loader-circle-DNUsuPWz.js → loader-circle-OvccU82H.js} +1 -1
  287. package/dist/client/assets/{local-agents-I40PawYA.js → local-agents-BqnoxJrq.js} +1 -1
  288. package/dist/client/assets/log-in-7SnYqW5w.js +1 -0
  289. package/dist/client/assets/{machine-children-CdhNzDF0.js → machine-children-DxcqCLmd.js} +1 -1
  290. package/dist/client/assets/media-blobs-Bi8pxr1u.js +1 -0
  291. package/dist/client/assets/{mentions-Ck_Vjnyp.js → mentions-ByUvhS-v.js} +1 -1
  292. package/dist/client/assets/{mesh-ops-DSlvHp-D.js → mesh-ops-CiZ8xSAx.js} +1 -1
  293. package/dist/client/assets/{mesh-view-store-C1-mdP3P.js → mesh-view-store-DZvJC4KU.js} +1 -1
  294. package/dist/client/assets/{message-circle-cI5_A5mj.js → message-circle-CxRVKNE-.js} +1 -1
  295. package/dist/client/assets/message-markup-BQW5jdJw.js +15 -0
  296. package/dist/client/assets/message-markup-Zwo3t4cI.js +1 -0
  297. package/dist/client/assets/{message-square-CJW4WRlo.js → message-square-BxesYglW.js} +1 -1
  298. package/dist/client/assets/mission-control-model-BpJHDV5D.js +1 -0
  299. package/dist/client/assets/{mission-control-store-p_cboAm4.js → mission-control-store-elEEsIvb.js} +1 -1
  300. package/dist/client/assets/{mission-wall-DOuGOxQy.js → mission-wall-CAo4BKfa.js} +1 -1
  301. package/dist/client/assets/{monitor-C7_cHlkC.js → monitor-DTTYEb73.js} +1 -1
  302. package/dist/client/assets/{nav-destinations-CU_euC-Q.js → nav-destinations-uorRqFxf.js} +1 -1
  303. package/dist/client/assets/{observe-CtS0l3zu.js → observe-BJqERJVj.js} +1 -1
  304. package/dist/client/assets/{page-status-DwFR4wSw.js → page-status-BswZLqvA.js} +1 -1
  305. package/dist/client/assets/{panel-right-qP17MwMl.js → panel-right-Bv7sP_fc.js} +1 -1
  306. package/dist/client/assets/paperclip-BjcuP_Hx.js +1 -0
  307. package/dist/client/assets/{pause-B_hliKuR.js → pause-C2XTlkjs.js} +1 -1
  308. package/dist/client/assets/{persistent-state-BUsTTZFE.js → persistent-state-KRk_yb0q.js} +1 -1
  309. package/dist/client/assets/{pin-Oi4qHR6M.js → pin-C2mFOV1l.js} +1 -1
  310. package/dist/client/assets/{play-CVeRmqLH.js → play-FT6K3It1.js} +1 -1
  311. package/dist/client/assets/{plus-D5NLH_fM.js → plus-DFDDeGKu.js} +1 -1
  312. package/dist/client/assets/profile-DTmzN16I.js +1 -0
  313. package/dist/client/assets/{projects-inbox-CfwxCTdN.js → projects-inbox-C0FUCv_p.js} +1 -1
  314. package/dist/client/assets/projects-inbox-ColX6lpx.css +1 -0
  315. package/dist/client/assets/{provider-DwmCoSlc.js → provider-Dojd8quC.js} +1 -1
  316. package/dist/client/assets/{proxy-DgzP27W8.js → proxy-AJsmwA6h.js} +1 -1
  317. package/dist/client/assets/{radio-Cas2qg1D.js → radio-DRoOZsws.js} +1 -1
  318. package/dist/client/assets/{refresh-cw-IcD2lPoT.js → refresh-cw-BmVr7sCD.js} +1 -1
  319. package/dist/client/assets/resolve-panes-pbY1fCWi.js +1 -0
  320. package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +1 -0
  321. package/dist/client/assets/right-49kO-6nD.js +1 -0
  322. package/dist/client/assets/right-APtItA8A.js +1 -0
  323. package/dist/client/assets/right-BJwhPqtn.js +1 -0
  324. package/dist/client/assets/right-BPqrf4ek.js +1 -0
  325. package/dist/client/assets/right-D7djOy6K.js +1 -0
  326. package/dist/client/assets/right-DKOUCRob.js +1 -0
  327. package/dist/client/assets/right-DMNrVzg7.js +1 -0
  328. package/dist/client/assets/{right-cjPTwPXS.js → right-DWPVB-nK.js} +1 -1
  329. package/dist/client/assets/right-DppeMCy4.js +1 -0
  330. package/dist/client/assets/right-GAL5Mw1v.js +1 -0
  331. package/dist/client/assets/{rocket-DAqYvu8I.js → rocket-CGl4RTV7.js} +1 -1
  332. package/dist/client/assets/router-DCtl8wqb.js +1 -0
  333. package/dist/client/assets/runtime-picker-DXu2bOTh.js +1 -0
  334. package/dist/client/assets/{scope-views-Dl3ml9OZ.js → scope-views-RUWwCVAr.js} +1 -1
  335. package/dist/client/assets/scout-voice-CZx60X6E.js +1 -0
  336. package/dist/client/assets/{scoutbot-markdown-DwvGQOWo.js → scoutbot-markdown-BKEBSbG0.js} +1 -1
  337. package/dist/client/assets/{scroll-text-B0tKI9Sg.js → scroll-text-DNjxhyO2.js} +1 -1
  338. package/dist/client/assets/{search-UsM-9-_W.js → search-DT42oyRW.js} +1 -1
  339. package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +1 -0
  340. package/dist/client/assets/{selection-bridge-OTS2iFkt.js → selection-bridge-x3wFUjxj.js} +1 -1
  341. package/dist/client/assets/{send-horizontal-BlQsRK6C.js → send-horizontal-CH0-fbZE.js} +1 -1
  342. package/dist/client/assets/{send-to-agent-session-C1mgqdow.js → send-to-agent-session-DoKCDBJ4.js} +1 -1
  343. package/dist/client/assets/{server-DBlPW0Mp.js → server-QfsgMLk1.js} +1 -1
  344. package/dist/client/assets/{session-catalog-CnpZMB7C.js → session-catalog-CvSdPHPe.js} +1 -1
  345. package/dist/client/assets/session-recap-lanes-D-eVJnpY.js +1 -0
  346. package/dist/client/assets/session-recap-queue-41l2XVkI.js +1 -0
  347. package/dist/client/assets/{session-table-CGkfG5Yd.js → session-table-L-pns6Zl.js} +1 -1
  348. package/dist/client/assets/{sessions-view-Bge4XZ4I.js → sessions-view-Dc-QAa7O.js} +1 -1
  349. package/dist/client/assets/{settings-C69Zjrpq.js → settings-BVh7kldq.js} +1 -1
  350. package/dist/client/assets/{sliders-horizontal-6bzeod7c.js → sliders-horizontal-782VC_yy.js} +1 -1
  351. package/dist/client/assets/{sparkles-Cc5lPZRv.js → sparkles-BjHq_DNK.js} +1 -1
  352. package/dist/client/assets/{sse-A8AyLH0g.js → sse-BCPRocpq.js} +1 -1
  353. package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +1 -0
  354. package/dist/client/assets/{tail-events-C4WdhVeK.js → tail-events-d0yAYxR0.js} +1 -1
  355. package/dist/client/assets/{terminal-DMZjX1es.js → terminal-hQKQygcf.js} +1 -1
  356. package/dist/client/assets/{terminal-relay-mO89dX-Y.js → terminal-relay-Bxs1hp-j.js} +1 -1
  357. package/dist/client/assets/{terminal-takeover-CZZsnPzj.js → terminal-takeover-Ay5C2c-M.js} +1 -1
  358. package/dist/client/assets/theme-vars-DNK0nn3k.js +1 -0
  359. package/dist/client/assets/triangle-alert-CHoRGdVO.js +1 -0
  360. package/dist/client/assets/{use-beside-D3cJpA5p.js → use-beside-DoRC1nt0.js} +1 -1
  361. package/dist/client/assets/{use-conversation-list-D5EnpVba.js → use-conversation-list-CY4JciOV.js} +1 -1
  362. package/dist/client/assets/{use-fleet-active-asks-D_QOmjg5.js → use-fleet-active-asks-CymmXWH4.js} +1 -1
  363. package/dist/client/assets/{use-mesh-node-state-3V3ADQ-G.js → use-mesh-node-state-BvaqtODo.js} +1 -1
  364. package/dist/client/assets/{use-mesh-ops-items-DI9GKWlF.js → use-mesh-ops-items-BSYaqH_0.js} +1 -1
  365. package/dist/client/assets/{use-reduced-motion-CiaZHMnk.js → use-reduced-motion-3gMYZNIp.js} +1 -1
  366. package/dist/client/assets/{use-scout-dev-flags-CkdAHlDR.js → use-scout-dev-flags-DS_pYYQd.js} +1 -1
  367. package/dist/client/assets/{useAgentHoverCard-A3QGXqIy.js → useAgentHoverCard-BANmpjMh.js} +1 -1
  368. package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +1 -0
  369. package/dist/client/assets/{useEmbedHeadline-atkQVfGw.js → useEmbedHeadline-D6pJRxUg.js} +1 -1
  370. package/dist/client/assets/usePersistentState-B8lP7TRb.js +1 -0
  371. package/dist/client/assets/{usePierreRuntime-DTvcwISe.js → usePierreRuntime-BAQdiN0L.js} +1 -1
  372. package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +1 -0
  373. package/dist/client/assets/{users-RLK3P5U4.js → users-BUjx36gx.js} +1 -1
  374. package/dist/client/assets/voice-paths-CJUuBPh3.css +1 -0
  375. package/dist/client/assets/voice-turn-DftA0iIb.css +1 -0
  376. package/dist/client/assets/voice-turn-ledger-BMZxlSjg.js +1 -0
  377. package/dist/client/assets/{wrench-B4maQJai.js → wrench-DR0i5BU7.js} +1 -1
  378. package/dist/client/assets/{x-rlMdRqJF.js → x-DAehov0E.js} +1 -1
  379. package/dist/client/assets/{xterm-B1zHHOLQ.js → xterm-BXQiLVnI.js} +1 -1
  380. package/dist/client/assets/{zap-B4X0OrEw.js → zap-CEjZNZbI.js} +1 -1
  381. package/dist/client/crew/sheets/eye-plate-v1/look-down-left.webp +0 -0
  382. package/dist/client/crew/sheets/eye-plate-v1/look-down-right.webp +0 -0
  383. package/dist/client/crew/sheets/eye-plate-v1/look-down.webp +0 -0
  384. package/dist/client/crew/sheets/eye-plate-v1/look-up-left.webp +0 -0
  385. package/dist/client/crew/sheets/eye-plate-v1/look-up-right.webp +0 -0
  386. package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
  387. package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
  388. package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
  389. package/dist/client/crew/sheets/sprout/look-down-left.webp +0 -0
  390. package/dist/client/crew/sheets/sprout/look-down-right.webp +0 -0
  391. package/dist/client/crew/sheets/sprout/look-down.webp +0 -0
  392. package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
  393. package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
  394. package/dist/client/crew/sheets/sprout/look-up-left.webp +0 -0
  395. package/dist/client/crew/sheets/sprout/look-up-right.webp +0 -0
  396. package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
  397. package/dist/client/index.html +2 -2
  398. package/dist/drizzle/0020_message_reactions.sql +11 -0
  399. package/dist/drizzle/meta/_journal.json +7 -0
  400. package/dist/main.mjs +542 -150
  401. package/dist/node/main.mjs +131 -17
  402. package/dist/pairing-runtime-controller.mjs +375 -78
  403. package/dist/runtime/base-daemon.mjs +98 -5
  404. package/dist/runtime/broker-daemon.mjs +1879 -1198
  405. package/dist/runtime/broker-process-manager.mjs +96 -3
  406. package/dist/runtime/mesh-discover.mjs +96 -3
  407. package/dist/scout-control-plane-web.mjs +4817 -1616
  408. package/dist/update-helper.mjs +211 -39
  409. package/package.json +5 -3
  410. package/server.json +31 -0
  411. package/dist/client/assets/ActivityScreen-CcDdQTBK.js +0 -1
  412. package/dist/client/assets/AgentAdventures-BxrYq_2v.js +0 -1
  413. package/dist/client/assets/AgentAvatar-NZOqcsB2.js +0 -1
  414. package/dist/client/assets/AgentConfigurationScreen-BhD1PEAM.js +0 -1
  415. package/dist/client/assets/AgentDefinitionsWorkspace-BqS6MXqF.js +0 -1
  416. package/dist/client/assets/AgentFloorView-A0dDRlRV.js +0 -1
  417. package/dist/client/assets/AgentInfoScreen-DuaN0sgE.js +0 -1
  418. package/dist/client/assets/AgentLanesEmbedScreen-CeNiaZ9_.js +0 -1
  419. package/dist/client/assets/AgentLanesView-WZhEDBFE.js +0 -2
  420. package/dist/client/assets/AgentMasterScreen-DUDUTAnU.js +0 -1
  421. package/dist/client/assets/AgentSessions-CO1WGa8Z.js +0 -6
  422. package/dist/client/assets/AgentsConsole-BQOWkj35.js +0 -1
  423. package/dist/client/assets/AgentsScreen-BMNAj1PH.js +0 -1
  424. package/dist/client/assets/AgentsSubnav-CeHhuzyM.js +0 -1
  425. package/dist/client/assets/BriefingDetailScreen-yZG8_m4h.js +0 -1
  426. package/dist/client/assets/BrokerScreen-CT37VQiL.js +0 -8
  427. package/dist/client/assets/ChannelComposer-BVItWlEz.js +0 -1
  428. package/dist/client/assets/ChannelSidebar-B-2spawY.js +0 -1
  429. package/dist/client/assets/ChatBits-CLJ71hTY.js +0 -1
  430. package/dist/client/assets/ChatRightPanel-pKQtkAgl.js +0 -1
  431. package/dist/client/assets/ChatSpaceSurface-NrLwdPkE.js +0 -1
  432. package/dist/client/assets/ChatSpaceTheme-BPMgPdVK.css +0 -1
  433. package/dist/client/assets/ChatSpaceTheme-D37Jk7bl.js +0 -1
  434. package/dist/client/assets/ConversationComposer-DNcn5U6D.js +0 -1
  435. package/dist/client/assets/ConversationFeedRows-RnYSa7Io.js +0 -1
  436. package/dist/client/assets/ConversationHeader-Y9TEJxP_.js +0 -1
  437. package/dist/client/assets/ConversationScreen-Brfas2y0.css +0 -1
  438. package/dist/client/assets/ConversationScreen-tpj4cqWs.js +0 -2
  439. package/dist/client/assets/ConversationStatus-Cv-7hErW.js +0 -1
  440. package/dist/client/assets/CrewAvatar-zgzC3cbU.js +0 -1
  441. package/dist/client/assets/CrewWorkspaces-K2jcyLec.js +0 -1
  442. package/dist/client/assets/FlightObserveScreen-CvzhzuWc.js +0 -1
  443. package/dist/client/assets/FloorResourcesSheet-_Iy5UqgY.js +0 -1
  444. package/dist/client/assets/FloorTacticalHUD-BhyOqlL5.js +0 -1
  445. package/dist/client/assets/HarnessMark-DSvM_H7H.js +0 -1
  446. package/dist/client/assets/HarnessesScreen-DyjqbZ4k.js +0 -1
  447. package/dist/client/assets/InviteLandingScreen-xZQ2na1z.js +0 -1
  448. package/dist/client/assets/InviteSheet--5Zjct25.js +0 -1
  449. package/dist/client/assets/KnowledgeSearchScreen-BPqAjHnH.js +0 -1
  450. package/dist/client/assets/LaneTraceDetailSheet-jl4XQmEx.js +0 -1
  451. package/dist/client/assets/MeshScreen-BW1dMFWF.js +0 -1
  452. package/dist/client/assets/MessagesScreen-CtNMfIvC.js +0 -1
  453. package/dist/client/assets/MissionControlView-BjPOViGY.js +0 -1
  454. package/dist/client/assets/MissionLeftAgentRow-Dms0DBjO.js +0 -1
  455. package/dist/client/assets/NativeAreaScreen-BQSTo8As.js +0 -1
  456. package/dist/client/assets/NativeAreaScreen-Brix6xDB.js +0 -1
  457. package/dist/client/assets/NativeAreaScreen-D7HyQNlM.js +0 -1
  458. package/dist/client/assets/NewChatComposer-BEXS8vV6.js +0 -19
  459. package/dist/client/assets/ObserveEmbedScreen-Dh30EjAQ.js +0 -2
  460. package/dist/client/assets/OpenScoutAppShell-D9pgw36i.js +0 -31
  461. package/dist/client/assets/OpsAgentsView-D3rM0udq.js +0 -1
  462. package/dist/client/assets/OpsScreen-DySeNQ1V.js +0 -1
  463. package/dist/client/assets/OpsSubnav-C9E0r3GZ.js +0 -1
  464. package/dist/client/assets/ProjectAgentProfile-FUav75j2.js +0 -1
  465. package/dist/client/assets/ProjectAgentProfileHero-BLK0EwMg.js +0 -1
  466. package/dist/client/assets/ProjectsInbox-DfCXReZK.js +0 -2
  467. package/dist/client/assets/ProjectsRail-CELVubfJ.js +0 -1
  468. package/dist/client/assets/ProjectsScreen-DMw4TLKy.js +0 -1
  469. package/dist/client/assets/ProjectsThreadAside-D1Sh4fnX.js +0 -1
  470. package/dist/client/assets/Provider-CNZluAZb.js +0 -5
  471. package/dist/client/assets/RailToggle-BwmY70B8.js +0 -1
  472. package/dist/client/assets/RawSessionsTable-6OVJq0JZ.js +0 -1
  473. package/dist/client/assets/RealtimeVoiceScreen-D41TYY0x.js +0 -9
  474. package/dist/client/assets/RepoDiffViewerLazy-BpMR7tlx.js +0 -2
  475. package/dist/client/assets/SessionObserveEvidence-CS1aQBpQ.js +0 -1
  476. package/dist/client/assets/SessionRefScreen-DURV0MpF.js +0 -1
  477. package/dist/client/assets/SessionsScreen-D71ZR-8t.js +0 -1
  478. package/dist/client/assets/SettingsDrawer-Nz98oBVl.js +0 -3
  479. package/dist/client/assets/SettingsScreen-CYBHal6y.js +0 -1
  480. package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +0 -1
  481. package/dist/client/assets/SharedWorkFloor-C0xxW4SN.js +0 -2
  482. package/dist/client/assets/SpaceSwitcher-BfeIf-ad.js +0 -1
  483. package/dist/client/assets/Terminal-jIqnIZZ6.js +0 -4
  484. package/dist/client/assets/TerminalEmbedScreen-3XsjuySR.js +0 -1
  485. package/dist/client/assets/WorkDetailScreen-Bcf_yHhU.js +0 -5
  486. package/dist/client/assets/WorldActorTalk-CKerDikx.js +0 -1
  487. package/dist/client/assets/WorldMinimap-DOptgrc4.js +0 -1
  488. package/dist/client/assets/agent-autocomplete-C7xwIcwd.css +0 -1
  489. package/dist/client/assets/agent-autocomplete-_u9o5EZu.js +0 -2
  490. package/dist/client/assets/agents-screen-BMu6PpRY.css +0 -1
  491. package/dist/client/assets/at-sign-DM7xeppo.js +0 -1
  492. package/dist/client/assets/chat-api-BPVC0asu.js +0 -1
  493. package/dist/client/assets/chat-space-model-B6Jg2CY4.js +0 -4
  494. package/dist/client/assets/content-0AXa0klu.js +0 -1
  495. package/dist/client/assets/content-BEyJ19Lx.js +0 -1
  496. package/dist/client/assets/content-BN5weWKW.js +0 -1
  497. package/dist/client/assets/content-BNokkm7C.js +0 -1
  498. package/dist/client/assets/content-BV4PUM9q.js +0 -1
  499. package/dist/client/assets/content-BxUPlcx5.js +0 -1
  500. package/dist/client/assets/content-CIC5sku8.js +0 -1
  501. package/dist/client/assets/content-CdkTyxqk.js +0 -1
  502. package/dist/client/assets/content-CnhhSCZq.js +0 -1
  503. package/dist/client/assets/content-DY3F9Vfr.js +0 -1
  504. package/dist/client/assets/content-DrKBYpcb.js +0 -1
  505. package/dist/client/assets/content-LSStQYj5.js +0 -1
  506. package/dist/client/assets/content-YvU-D0hF.js +0 -1
  507. package/dist/client/assets/content-oKQMyVnH.js +0 -1
  508. package/dist/client/assets/conversation-model-m8HhzroS.js +0 -1
  509. package/dist/client/assets/conversation-motion-features-D9PxLoDt.js +0 -1
  510. package/dist/client/assets/conversations-Cbg9h_Af.js +0 -1
  511. package/dist/client/assets/ctx-panel-F05jXK4Q.css +0 -1
  512. package/dist/client/assets/discover-DlwbftpC.js +0 -2
  513. package/dist/client/assets/embed-entry-c0lwtjBG.js +0 -2
  514. package/dist/client/assets/home-moving-signal-BIHUGNfI.js +0 -1
  515. package/dist/client/assets/home-now-card-CaLgZze2.js +0 -1
  516. package/dist/client/assets/hooks-DaUOREpP.js +0 -2
  517. package/dist/client/assets/index-CGbs0SBm.css +0 -1
  518. package/dist/client/assets/index-CbqBwfIW.js +0 -1
  519. package/dist/client/assets/index-CyPMl7Up.js +0 -1
  520. package/dist/client/assets/index-PQpJveGO.js +0 -1
  521. package/dist/client/assets/left-0vBrvrBG.js +0 -2
  522. package/dist/client/assets/left-C6SyaqlJ.js +0 -1
  523. package/dist/client/assets/left-CTuXysZR.js +0 -2
  524. package/dist/client/assets/left-Cc6s4DT2.js +0 -1
  525. package/dist/client/assets/left-DF5caiyh.js +0 -1
  526. package/dist/client/assets/left-DgT4tWCx.js +0 -1
  527. package/dist/client/assets/left-R0wppTTr.js +0 -1
  528. package/dist/client/assets/left-advisor-C-kt8V28.js +0 -1
  529. package/dist/client/assets/left-agents-thnBO156.js +0 -1
  530. package/dist/client/assets/left-default-CT42fnpF.js +0 -1
  531. package/dist/client/assets/left-lanes-CSmZgciK.js +0 -1
  532. package/dist/client/assets/left-mission-C86x6i9h.js +0 -1
  533. package/dist/client/assets/library-DdhYL_9v.js +0 -1
  534. package/dist/client/assets/message-markup-6Tgo4qFJ.js +0 -15
  535. package/dist/client/assets/mission-control-model-C30vU1Fe.js +0 -1
  536. package/dist/client/assets/profile-BegEUmB7.js +0 -1
  537. package/dist/client/assets/projects-inbox-CKPLZN8s.css +0 -1
  538. package/dist/client/assets/resolve-panes-pfZTezKo.js +0 -1
  539. package/dist/client/assets/resolve-sidebar-context-D5ksvrb_.js +0 -1
  540. package/dist/client/assets/right-BDaCJ0CF.js +0 -1
  541. package/dist/client/assets/right-BP6lXRFS.js +0 -1
  542. package/dist/client/assets/right-Cb1VCrdj.js +0 -1
  543. package/dist/client/assets/right-CeFaxfBo.js +0 -1
  544. package/dist/client/assets/right-Ck2SrYCj.js +0 -1
  545. package/dist/client/assets/right-D-uv5YfF.js +0 -1
  546. package/dist/client/assets/right-DJMSICky.js +0 -1
  547. package/dist/client/assets/right-Dnljs8ah.js +0 -1
  548. package/dist/client/assets/right-SdCSF8PP.js +0 -1
  549. package/dist/client/assets/router-C-MF5-mb.js +0 -1
  550. package/dist/client/assets/runtime-picker-C_AVYF63.js +0 -1
  551. package/dist/client/assets/scout-voice-CqAyfblr.js +0 -1
  552. package/dist/client/assets/secondaryNavConfig-DzNHk6IH.js +0 -1
  553. package/dist/client/assets/system-surfaces-redesign-DKFg4GB5.css +0 -1
  554. package/dist/client/assets/useContentSecondaryNav-DrL_nkCZ.js +0 -1
  555. package/dist/client/assets/usePersistentState-Y8XwSTg-.js +0 -1
  556. package/dist/drizzle/meta/0000_snapshot.json +0 -4575
  557. package/dist/drizzle/meta/0001_snapshot.json +0 -4624
  558. package/dist/drizzle/meta/0002_snapshot.json +0 -4631
  559. package/dist/drizzle/meta/0003_snapshot.json +0 -4952
  560. package/dist/drizzle/meta/0004_snapshot.json +0 -5235
  561. package/dist/drizzle/meta/0005_snapshot.json +0 -5599
  562. package/dist/drizzle/meta/0006_snapshot.json +0 -5606
  563. package/dist/drizzle/meta/0007_snapshot.json +0 -5767
  564. package/dist/drizzle/meta/0008_snapshot.json +0 -5774
  565. package/dist/drizzle/meta/0009_snapshot.json +0 -6262
  566. package/dist/drizzle/meta/0010_snapshot.json +0 -6286
  567. package/dist/drizzle/meta/0011_snapshot.json +0 -6337
  568. package/dist/drizzle/meta/0012_snapshot.json +0 -6458
  569. package/dist/drizzle/meta/0013_snapshot.json +0 -6465
  570. package/dist/drizzle/meta/0014_snapshot.json +0 -6503
  571. package/dist/drizzle/meta/0015_snapshot.json +0 -6596
  572. package/dist/drizzle/meta/0016_snapshot.json +0 -6611
  573. package/dist/drizzle/meta/0017_snapshot.json +0 -6785
  574. package/dist/drizzle/meta/0018_snapshot.json +0 -6804
  575. package/dist/drizzle/meta/0019_snapshot.json +0 -6804
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/scss-D5BDwBP9.js","assets/css-CLj8gQPS.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/ruby-B13GW9FM.js","assets/sql-CRqJ_cUM.js","assets/typescript-BPQ3VLAy.js","assets/jsx-g9-lgVsj.js","assets/tsx-COt5Ahok.js","assets/cpp-DIPi6g--.js","assets/c-BIGW1oBm.js","assets/shellscript-Yzrsuije.js","assets/yaml-Buea-lGh.js"])))=>i.map(i=>d[i]);
2
- import{r as X,j as J,_ as C}from"./index-DReVb7jZ.js";var R=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Rn(t){return tt(t)}function tt(t){return Array.isArray(t)?An(t):t instanceof RegExp?t:typeof t=="object"?En(t):t}function An(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=tt(t[n]);return e}function En(t){let e={};for(let n in t)e[n]=tt(t[n]);return e}function Mt(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function Bt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Bt(t.substring(0,t.length-1)):t.substr(~e+1)}var Oe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,le=class{static hasCaptures(t){return t===null?!1:(Oe.lastIndex=0,Oe.test(t))}static replaceCaptures(t,e,n){return t.replace(Oe,(r,s,o,i)=>{let l=n[parseInt(s||o,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Dt(t,e){return t<e?-1:t>e?1:0}function Gt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let o=Dt(t[s],e[s]);if(o!==0)return o}return 0}return n-r}function ut(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function jt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},pe=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Ln(t),e)}static createFromParsedTheme(t,e){return In(t,e)}_cachedMatchRoot=new $t(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(s=>Tn(t.parent,s.parentScopes));return r?new Ut(r.fontStyle,r.foreground,r.background):null}},Me=class fe{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new fe(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new fe(n,e[r]);return n}push(e){return new fe(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Tn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}for(;t&&!Pn(t.scopeName,r);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Pn(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Ut=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Ln(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,o=e.length;s<o;s++){let i=e[s];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let h=i.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let h=i.settings.fontStyle.split(" ");for(let p=0,f=h.length;p<f;p++)switch(h[p]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof i.settings.foreground=="string"&&ut(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&ut(i.settings.background)&&(u=i.settings.background);for(let h=0,p=l.length;h<p;h++){let d=l[h].trim().split(" "),S=d[d.length-1],y=null;d.length>1&&(y=d.slice(0,d.length-1),y.reverse()),n[r++]=new xn(S,y,s,a,c,u)}}return n}var xn=class{constructor(t,e,n,r,s,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}},I=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(I||{});function In(t,e){t.sort((a,c)=>{let u=Dt(a.scope,c.scope);return u!==0||(u=Gt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(s=a.background)}let o=new Nn(e),i=new Ut(n,o.getId(r),o.getId(s)),l=new Mn(new Fe(0,null,-1,0,0),[]);for(let a=0,c=t.length;a<c;a++){let u=t[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new pe(o,i,l)}var Nn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},On=Object.freeze([]),Fe=class Ft{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,o){this.scopeDepth=e,this.parentScopes=n||On,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new Ft(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Mn=class We{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=n.parentScopes.length);){const o=n.parentScopes[s].length-e.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,o;if(r===-1?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(We._cmpBySpecificity),n}insert(e,n,r,s,o,i){if(n===""){this._doInsertHere(e,r,s,o,i);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new We(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,s,o,i)}_doInsertHere(e,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(e,r,s,o);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(Gt(a.parentScopes,n)===0){a.acceptOverwrite(e,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,n,r,s,o))}},z=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=B.getLanguageId(e),r=B.getTokenType(e),s=B.getFontStyle(e),o=B.getForeground(e),i=B.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:o,background:i})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,o,i,l){let a=B.getLanguageId(e),c=B.getTokenType(e),u=B.containsBalancedBrackets(e)?1:0,h=B.getFontStyle(e),p=B.getForeground(e),f=B.getBackground(e);return n!==0&&(a=n),r!==8&&(c=r),s!==null&&(u=s?1:0),o!==-1&&(h=o),i!==0&&(p=i),l!==0&&(f=l),(a<<0|c<<8|u<<10|h<<11|p<<15|f<<24)>>>0}};function ge(t,e){const n=[],r=Bn(t);let s=r.next();for(;s!==null;){let a=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=i();if(n.push({matcher:c,priority:a}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();const a=o();return c=>!!a&&!a(c)}if(s==="("){s=r.next();const a=l();return s===")"&&(s=r.next()),a}if(ht(s)){const a=[];do a.push(s),s=r.next();while(ht(s));return c=>e(a,c)}return null}function i(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(h=>h(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=i()}return u=>a.some(h=>h(u))}}function ht(t){return!!t&&!!t.match(/[\w\.:]+/)}function Bn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function Wt(t){typeof t.dispose=="function"&&t.dispose()}var te=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Dn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Gn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},jn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Gn;for(const n of t)$n(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof te){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function $n(t,e,n,r){const s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof te?de({baseGrammar:o,selfGrammar:s},r):ze(t.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);const i=n.injections(t.scopeName);if(i)for(const l of i)r.add(new te(l))}function ze(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];me([r],e,n)}}function de(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&me(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&me(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function me(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const s=r.repository?Mt({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&me(r.patterns,{...e,repository:s},n);const o=r.include;if(!o)continue;const i=zt(o);switch(i.kind){case 0:de({...e,selfGrammar:e.baseGrammar},n);break;case 1:de(e,n);break;case 2:ze(i.ruleName,{...e,repository:s},n);break;case 3:case 4:const l=i.scopeName===e.selfGrammar.scopeName?e.selfGrammar:i.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:s};i.kind===4?ze(i.ruleName,a,n):de(a,n)}else i.kind===4?n.add(new Dn(i.scopeName,i.ruleName)):n.add(new te(i.scopeName));break}}}var Un=class{kind=0},Fn=class{kind=1},Wn=class{constructor(t){this.ruleName=t}kind=2},zn=class{constructor(t){this.scopeName=t}kind=3},Hn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function zt(t){if(t==="$base")return new Un;if(t==="$self")return new Fn;const e=t.indexOf("#");if(e===-1)return new zn(t);if(e===0)return new Wn(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new Hn(n,r)}}var Vn=/\\(\d+)/,ft=/\\(\d+)/g,qn=-1,Ht=-2;var oe=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=le.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=le.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Bt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:le.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:le.replaceCaptures(this._contentName,t,e)}},Kn=class extends oe{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Yn=class extends oe{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null),this._match=new ne(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},dt=class extends oe{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},He=class extends oe{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,o,i,l,a,c){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this._end=new ne(i||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},_e=class extends oe{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,o,i,l,a){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new ne(i,Ht),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},Vt=class x{static createCaptureRule(e,n,r,s,o){return e.registerRule(i=>new Kn(n,i,r,s,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new Yn(e.$vscodeTextmateLocation,e.id,e.name,e.match,x._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=Mt({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new dt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,x._compilePatterns(o,n,r))}return e.while?new _e(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,x._compileCaptures(e.whileCaptures||e.captures,n,r),x._compilePatterns(e.patterns,n,r)):new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,x._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,x._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let s=[];if(e){let o=0;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>o&&(o=l)}for(let i=0;i<=o;i++)s[i]=null;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;e[i].patterns&&(a=x.getCompiledRuleId(e[i],n,r)),s[l]=x.createCaptureRule(n,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,a)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let o=0,i=e.length;o<i;o++){const l=e[o];let a=-1;if(l.include){const c=zt(l.include);switch(c.kind){case 0:case 1:a=x.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=x.getCompiledRuleId(u,n,r));break;case 3:case 4:const h=c.scopeName,p=c.kind===4?c.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(p){let d=f.repository[p];d&&(a=x.getCompiledRuleId(d,n,f.repository))}else a=x.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else a=x.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof dt||c instanceof He||c instanceof _e)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(a)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},ne=class qt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let s=0,o=[],i=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(o.push(e.substring(s,l)),o.push("$(?!\\n)(?<!\\n)"),s=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,s===0?this.source=e:(o.push(e.substring(s,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Vn.test(this.source):this.hasBackReferences=!1}clone(){return new qt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(s=>e.substring(s.start,s.end));return ft.lastIndex=0,this.source.replace(ft,(s,o)=>jt(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],o,i,l,a;for(o=0,i=this.source.length;o<i;o++)l=this.source.charAt(o),e[o]=l,n[o]=l,r[o]=l,s[o]=l,l==="\\"&&o+1<i&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="￿",n[o+1]="￿",r[o+1]="A",s[o+1]="A"):a==="G"?(e[o+1]="￿",n[o+1]="G",r[o+1]="￿",s[o+1]="G"):(e[o+1]=a,n[o+1]=a,r[o+1]=a,s[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new pt(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(s=>s.resolveAnchors(e,n));return new pt(t,r,this._items.map(s=>s.ruleId))}},pt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
2
+ import{r as X,j as J,_ as C}from"./index-EsrkGBcv.js";var R=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Rn(t){return tt(t)}function tt(t){return Array.isArray(t)?An(t):t instanceof RegExp?t:typeof t=="object"?En(t):t}function An(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=tt(t[n]);return e}function En(t){let e={};for(let n in t)e[n]=tt(t[n]);return e}function Mt(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function Bt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Bt(t.substring(0,t.length-1)):t.substr(~e+1)}var Oe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,le=class{static hasCaptures(t){return t===null?!1:(Oe.lastIndex=0,Oe.test(t))}static replaceCaptures(t,e,n){return t.replace(Oe,(r,s,o,i)=>{let l=n[parseInt(s||o,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Dt(t,e){return t<e?-1:t>e?1:0}function Gt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let o=Dt(t[s],e[s]);if(o!==0)return o}return 0}return n-r}function ut(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function jt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},pe=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Ln(t),e)}static createFromParsedTheme(t,e){return In(t,e)}_cachedMatchRoot=new $t(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(s=>Tn(t.parent,s.parentScopes));return r?new Ut(r.fontStyle,r.foreground,r.background):null}},Me=class fe{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new fe(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new fe(n,e[r]);return n}push(e){return new fe(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Tn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}for(;t&&!Pn(t.scopeName,r);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Pn(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Ut=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Ln(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,o=e.length;s<o;s++){let i=e[s];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let h=i.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let h=i.settings.fontStyle.split(" ");for(let p=0,f=h.length;p<f;p++)switch(h[p]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof i.settings.foreground=="string"&&ut(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&ut(i.settings.background)&&(u=i.settings.background);for(let h=0,p=l.length;h<p;h++){let d=l[h].trim().split(" "),S=d[d.length-1],y=null;d.length>1&&(y=d.slice(0,d.length-1),y.reverse()),n[r++]=new xn(S,y,s,a,c,u)}}return n}var xn=class{constructor(t,e,n,r,s,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}},I=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(I||{});function In(t,e){t.sort((a,c)=>{let u=Dt(a.scope,c.scope);return u!==0||(u=Gt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(s=a.background)}let o=new Nn(e),i=new Ut(n,o.getId(r),o.getId(s)),l=new Mn(new Fe(0,null,-1,0,0),[]);for(let a=0,c=t.length;a<c;a++){let u=t[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new pe(o,i,l)}var Nn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},On=Object.freeze([]),Fe=class Ft{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,o){this.scopeDepth=e,this.parentScopes=n||On,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new Ft(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Mn=class We{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=n.parentScopes.length);){const o=n.parentScopes[s].length-e.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,o;if(r===-1?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(We._cmpBySpecificity),n}insert(e,n,r,s,o,i){if(n===""){this._doInsertHere(e,r,s,o,i);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new We(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,s,o,i)}_doInsertHere(e,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(e,r,s,o);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(Gt(a.parentScopes,n)===0){a.acceptOverwrite(e,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,n,r,s,o))}},z=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=B.getLanguageId(e),r=B.getTokenType(e),s=B.getFontStyle(e),o=B.getForeground(e),i=B.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:o,background:i})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,o,i,l){let a=B.getLanguageId(e),c=B.getTokenType(e),u=B.containsBalancedBrackets(e)?1:0,h=B.getFontStyle(e),p=B.getForeground(e),f=B.getBackground(e);return n!==0&&(a=n),r!==8&&(c=r),s!==null&&(u=s?1:0),o!==-1&&(h=o),i!==0&&(p=i),l!==0&&(f=l),(a<<0|c<<8|u<<10|h<<11|p<<15|f<<24)>>>0}};function ge(t,e){const n=[],r=Bn(t);let s=r.next();for(;s!==null;){let a=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=i();if(n.push({matcher:c,priority:a}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();const a=o();return c=>!!a&&!a(c)}if(s==="("){s=r.next();const a=l();return s===")"&&(s=r.next()),a}if(ht(s)){const a=[];do a.push(s),s=r.next();while(ht(s));return c=>e(a,c)}return null}function i(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(h=>h(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=i()}return u=>a.some(h=>h(u))}}function ht(t){return!!t&&!!t.match(/[\w\.:]+/)}function Bn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function Wt(t){typeof t.dispose=="function"&&t.dispose()}var te=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Dn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Gn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},jn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Gn;for(const n of t)$n(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof te){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function $n(t,e,n,r){const s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof te?de({baseGrammar:o,selfGrammar:s},r):ze(t.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);const i=n.injections(t.scopeName);if(i)for(const l of i)r.add(new te(l))}function ze(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];me([r],e,n)}}function de(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&me(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&me(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function me(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const s=r.repository?Mt({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&me(r.patterns,{...e,repository:s},n);const o=r.include;if(!o)continue;const i=zt(o);switch(i.kind){case 0:de({...e,selfGrammar:e.baseGrammar},n);break;case 1:de(e,n);break;case 2:ze(i.ruleName,{...e,repository:s},n);break;case 3:case 4:const l=i.scopeName===e.selfGrammar.scopeName?e.selfGrammar:i.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:s};i.kind===4?ze(i.ruleName,a,n):de(a,n)}else i.kind===4?n.add(new Dn(i.scopeName,i.ruleName)):n.add(new te(i.scopeName));break}}}var Un=class{kind=0},Fn=class{kind=1},Wn=class{constructor(t){this.ruleName=t}kind=2},zn=class{constructor(t){this.scopeName=t}kind=3},Hn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function zt(t){if(t==="$base")return new Un;if(t==="$self")return new Fn;const e=t.indexOf("#");if(e===-1)return new zn(t);if(e===0)return new Wn(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new Hn(n,r)}}var Vn=/\\(\d+)/,ft=/\\(\d+)/g,qn=-1,Ht=-2;var oe=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=le.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=le.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Bt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:le.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:le.replaceCaptures(this._contentName,t,e)}},Kn=class extends oe{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Yn=class extends oe{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null),this._match=new ne(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},dt=class extends oe{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},He=class extends oe{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,o,i,l,a,c){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this._end=new ne(i||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},_e=class extends oe{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,o,i,l,a){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new ne(i,Ht),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},Vt=class x{static createCaptureRule(e,n,r,s,o){return e.registerRule(i=>new Kn(n,i,r,s,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new Yn(e.$vscodeTextmateLocation,e.id,e.name,e.match,x._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=Mt({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new dt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,x._compilePatterns(o,n,r))}return e.while?new _e(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,x._compileCaptures(e.whileCaptures||e.captures,n,r),x._compilePatterns(e.patterns,n,r)):new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,x._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,x._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let s=[];if(e){let o=0;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>o&&(o=l)}for(let i=0;i<=o;i++)s[i]=null;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;e[i].patterns&&(a=x.getCompiledRuleId(e[i],n,r)),s[l]=x.createCaptureRule(n,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,a)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let o=0,i=e.length;o<i;o++){const l=e[o];let a=-1;if(l.include){const c=zt(l.include);switch(c.kind){case 0:case 1:a=x.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=x.getCompiledRuleId(u,n,r));break;case 3:case 4:const h=c.scopeName,p=c.kind===4?c.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(p){let d=f.repository[p];d&&(a=x.getCompiledRuleId(d,n,f.repository))}else a=x.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else a=x.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof dt||c instanceof He||c instanceof _e)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(a)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},ne=class qt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let s=0,o=[],i=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(o.push(e.substring(s,l)),o.push("$(?!\\n)(?<!\\n)"),s=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,s===0?this.source=e:(o.push(e.substring(s,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Vn.test(this.source):this.hasBackReferences=!1}clone(){return new qt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(s=>e.substring(s.start,s.end));return ft.lastIndex=0,this.source.replace(ft,(s,o)=>jt(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],o,i,l,a;for(o=0,i=this.source.length;o<i;o++)l=this.source.charAt(o),e[o]=l,n[o]=l,r[o]=l,s[o]=l,l==="\\"&&o+1<i&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="￿",n[o+1]="￿",r[o+1]="A",s[o+1]="A"):a==="G"?(e[o+1]="￿",n[o+1]="G",r[o+1]="￿",s[o+1]="G"):(e[o+1]=a,n[o+1]=a,r[o+1]=a,s[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new pt(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(s=>s.resolveAnchors(e,n));return new pt(t,r,this._items.map(s=>s.ruleId))}},pt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
3
3
  `)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Be=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Xn=class Ve{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Be(e,8),this._embeddedLanguagesMatcher=new Jn(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Ve._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Be(0,0);_getBasicScopeAttributes=new $t(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Be(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Ve.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Jn=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>jt(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},gt=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Kt(t,e,n,r,s,o,i,l){const a=e.content.length;let c=!1,u=-1;if(i){const f=Qn(t,e,n,r,s,o);s=f.stack,r=f.linePos,n=f.isFirstLine,u=f.anchorPosition}const h=Date.now();for(;!c;){if(l!==0&&Date.now()-h>l)return new gt(s,!0);p()}return new gt(s,!1);function p(){const f=Zn(t,e,n,r,s,u);if(!f){o.produce(s,a),c=!0;return}const d=f.captureIndices,S=f.matchedRuleId,y=d&&d.length>0?d[0].end>r:!1;if(S===qn){const _=s.getRule(t);o.produce(s,d[0].start),s=s.withContentNameScopesList(s.nameScopesList),Z(t,e,n,s,o,_.endCaptures,d),o.produce(s,d[0].end);const m=s;if(s=s.parent,u=m.getAnchorPos(),!y&&m.getEnterPos()===r){s=m,o.produce(s,a),c=!0;return}}else{const _=t.getRule(S);o.produce(s,d[0].start);const m=s,b=_.getName(e.content,d),k=s.contentNameScopesList.pushAttributed(b,t);if(s=s.push(S,r,u,d[0].end===a,null,k,k),_ instanceof He){const E=_;Z(t,e,n,s,o,E.beginCaptures,d),o.produce(s,d[0].end),u=d[0].end;const N=E.getContentName(e.content,d),$=k.pushAttributed(N,t);if(s=s.withContentNameScopesList($),E.endHasBackReferences&&(s=s.withEndRule(E.getEndWithResolvedBackReferences(e.content,d))),!y&&m.hasSameRuleAs(s)){s=s.pop(),o.produce(s,a),c=!0;return}}else if(_ instanceof _e){const E=_;Z(t,e,n,s,o,E.beginCaptures,d),o.produce(s,d[0].end),u=d[0].end;const N=E.getContentName(e.content,d),$=k.pushAttributed(N,t);if(s=s.withContentNameScopesList($),E.whileHasBackReferences&&(s=s.withEndRule(E.getWhileWithResolvedBackReferences(e.content,d))),!y&&m.hasSameRuleAs(s)){s=s.pop(),o.produce(s,a),c=!0;return}}else if(Z(t,e,n,s,o,_.captures,d),o.produce(s,d[0].end),s=s.pop(),!y){s=s.safePop(),o.produce(s,a),c=!0;return}}d[0].end>r&&(r=d[0].end,n=!1)}}function Qn(t,e,n,r,s,o){let i=s.beginRuleCapturedEOL?0:-1;const l=[];for(let a=s;a;a=a.pop()){const c=a.getRule(t);c instanceof _e&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=nr(a.rule,t,a.stack.endRule,n,r===i),h=c.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==Ht){s=a.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(o.produce(a.stack,h.captureIndices[0].start),Z(t,e,n,a.stack,o,a.rule.whileCaptures,h.captureIndices),o.produce(a.stack,h.captureIndices[0].end),i=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,n=!1))}else{s=a.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:i,isFirstLine:n}}function Zn(t,e,n,r,s,o){const i=er(t,e,n,r,s,o),l=t.getInjections();if(l.length===0)return i;const a=tr(l,t,e,n,r,s,o);if(!a)return i;if(!i)return a;const c=i.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:i}function er(t,e,n,r,s,o){const i=s.getRule(t),{ruleScanner:l,findOptions:a}=Yt(i,t,s.endRule,n,r===o),c=l.findNextMatchSync(e,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function tr(t,e,n,r,s,o,i){let l=Number.MAX_VALUE,a=null,c,u=0;const h=o.contentNameScopesList.getScopeNames();for(let p=0,f=t.length;p<f;p++){const d=t[p];if(!d.matcher(h))continue;const S=e.getRule(d.ruleId),{ruleScanner:y,findOptions:_}=Yt(S,e,null,r,s===i),m=y.findNextMatchSync(n,s,_);if(!m)continue;const b=m.captureIndices[0].start;if(!(b>=l)&&(l=b,a=m.captureIndices,c=m.ruleId,u=d.priority,l===s))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function Yt(t,e,n,r,s){return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function nr(t,e,n,r,s){return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function Z(t,e,n,r,s,o,i){if(o.length===0)return;const l=e.content,a=Math.min(o.length,i.length),c=[],u=i[0].end;for(let h=0;h<a;h++){const p=o[h];if(p===null)continue;const f=i[h];if(f.length===0)continue;if(f.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=f.start;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?s.produceFromScopes(c[c.length-1].scopes,f.start):s.produce(r,f.start),p.retokenizeCapturedWithRuleId){const S=p.getName(l,i),y=r.contentNameScopesList.pushAttributed(S,t),_=p.getContentName(l,i),m=y.pushAttributed(_,t),b=r.push(p.retokenizeCapturedWithRuleId,f.start,-1,!1,null,y,m),k=t.createOnigString(l.substring(0,f.end));Kt(t,k,n&&f.start===0,f.start,b,s,!1,0),Wt(k);continue}const d=p.getName(l,i);if(d!==null){const y=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(d,t);c.push(new rr(y,f.end))}}for(;c.length>0;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var rr=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function sr(t,e,n,r,s,o,i,l){return new ir(t,e,n,r,s,o,i,l)}function mt(t,e,n,r,s){const o=ge(e,ye),i=Vt.getCompiledRuleId(n,r,s.repository);for(const l of o)t.push({debugSelector:e,matcher:l.matcher,ruleId:i,grammar:s,priority:l.priority})}function ye(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let s=n;s<e.length;s++)if(or(e[s],r))return n=s+1,!0;return!1})}function or(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var ir=class{constructor(t,e,n,r,s,o,i,l){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new Xn(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=_t(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const a of Object.keys(s)){const c=ge(a,ye);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const s=r.injections;if(s)for(let i in s)mt(e,i,s[i],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(i=>{const l=this.getExternalGrammar(i);if(l){const a=l.injectionSelector;a&&mt(e,a,l,this,l)}})}return e.sort((s,o)=>s.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=_t(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Vt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===qe.NULL){s=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=z.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),p=this.getRule(this._rootId).getName(null,null);let f;p?f=ee.createRootAndLookUpScopeName(p,h,this):f=ee.createRoot("unknown",h),e=new qe(null,this._rootId,-1,-1,!1,null,f,f)}else s=!1,e.reset();t=t+`
4
4
  `;const o=this.createOnigString(t),i=o.content.length,l=new lr(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Kt(this,o,s,0,e,l,!0,r);return Wt(o),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function _t(t,e){return t=Rn(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var ee=class D{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(const o of n)s=Me.push(s,o.scopeNames),r=new D(r,s,o.encodedTokenAttributes);return r}static createRoot(e,n){return new D(null,new Me(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const s=r.getMetadataForScope(e),o=new Me(null,e),i=r.themeProvider.themeMatch(o),l=D.mergeAttributes(n,s,i);return new D(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return D.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,o=0,i=0;return r!==null&&(s=r.fontStyle,o=r.foregroundId,i=r.backgroundId),z.set(e,n.languageId,n.tokenType,null,s,o,i)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return D._pushAttributed(this,e,n);const r=e.split(/ /g);let s=this;for(const o of r)s=D._pushAttributed(s,o,n);return s}static _pushAttributed(e,n,r){const s=r.getMetadataForScope(n),o=e.scopePath.push(n),i=r.themeProvider.themeMatch(o),l=D.mergeAttributes(e.tokenAttributes,s,i);return new D(e,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},qe=class F{constructor(e,n,r,s,o,i,l,a){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new F(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:F._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?ee.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){F._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,s,o,i,l){return new F(this,e,n,r,s,o,i,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new F(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const r=ee.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new F(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ee.fromExtension(r,n.contentNameScopesList))}},ar=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ge(n,ye).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>ge(n,ye).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},lr=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=t?.getScopeNames()??[];for(const i of this._tokenTypeOverrides)i.matcher(o)&&(r=z.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(r=z.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},cr=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,sr(t,o,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},ur=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new cr(pe.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(pe.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,r){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,n,r){return this._loadGrammar(e,n,r.embeddedLanguages,r.tokenTypes,new ar(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,s,o){const i=new jn(this._syncRegistry,e);for(;i.Q.length>0;)i.Q.map(l=>this._loadSingleGrammar(l.scopeName)),i.processQueue();return this._grammarForScopeName(e,n,r,s,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(e,n=[],r=0,s=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,s)}_grammarForScopeName(e,n=0,r=null,s=null,o=null){return this._syncRegistry.grammarForScopeName(e,n,r,s,o)}},Ke=qe.NULL;function be(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(const[s,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?n[s]=o:s===r&&Object.assign(n,o);return n}function U(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function hr(t){return Array.isArray(t)?t:[t]}async function Xt(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function ke(t){return!t||["plaintext","txt","text","plain"].includes(t)}function fr(t){return t==="ansi"||ke(t)}function Re(t){return t==="none"}function dr(t){return Re(t)}const pr=/(\r?\n)/g;function Ae(t,e=!1){if(t.length===0)return[["",0]];const n=t.split(pr);let r=0;const s=[];for(let o=0;o<n.length;o+=2){const i=e?n[o]+(n[o+1]||""):n[o];s.push([i,r]),r+=n[o].length,r+=n[o+1]?.length||0}return s}const yt={light:"#333333",dark:"#bbbbbb"},bt={light:"#fffffe",dark:"#1e1e1e"},St="__shiki_resolved";function nt(t){if(t?.[St])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){const l=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;l?.settings?.foreground&&(r=l.settings.foreground),l?.settings?.background&&(n=l.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?yt.light:yt.dark),n||(n=e.type==="light"?bt.light:bt.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0;const o=new Map;function i(l){if(o.has(l))return o.get(l);s+=1;const a=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?i(l):(o.set(l,a),a)}e.settings=e.settings.map(l=>{const a=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),c=l.settings?.background&&!l.settings.background.startsWith("#");if(!a&&!c)return l;const u={...l,settings:{...l.settings}};if(a){const h=i(l.settings.foreground);e.colorReplacements[h]=l.settings.foreground,u.settings.foreground=h}if(c){const h=i(l.settings.background);e.colorReplacements[h]=l.settings.background,u.settings.background=h}return u});for(const l of Object.keys(e.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!e.colors[l]?.startsWith("#")){const a=i(e.colors[l]);e.colorReplacements[a]=e.colors[l],e.colors[l]=a}return Object.defineProperty(e,St,{enumerable:!1,writable:!1,value:!0}),e}async function Jt(t){return[...new Set((await Promise.all(t.filter(e=>!fr(e)).map(async e=>await Xt(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Qt(t){return(await Promise.all(t.map(async e=>dr(e)?null:nt(await Xt(e))))).filter(e=>!!e)}function Zt(t,e){if(!e)return t;if(e[t]){const n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new R(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var gr=class extends ur{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=nt(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=pe.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=Zt(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,e.size)for(const s of e)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const r of t)this.resolveEmbeddedLanguages(r);const e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){const r=e.filter(([s,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(i=>n.map(([l])=>l).includes(i)):!1).filter(s=>!n.includes(s));throw new R(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[r,s]of e)this._resolver.addLanguage(s);for(const[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const e=t.embeddedLanguages??t.embeddedLangs;if(e)for(const n of e)this._langGraph.set(n,this._langMap.get(n))}},mr=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)})}getInjections(t){const e=t.split(".");let n=[];for(let r=1;r<=e.length;r++){const s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}};let Q=0;function _r(t){Q+=1,t.warnings!==!1&&Q>=10&&Q%10===0&&console.warn(`[Shiki] ${Q} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new R("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(nt),s=new gr(new mr(t.engine,n),r,n,t.langAlias);let o;function i(m){return Zt(m,t.langAlias)}function l(m){y();const b=s.getGrammar(typeof m=="string"?m:m.name);if(!b)throw new R(`Language \`${m}\` not found, you may need to load it first`);return b}function a(m){if(m==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const b=s.getTheme(m);if(!b)throw new R(`Theme \`${m}\` not found, you may need to load it first`);return b}function c(m){y();const b=a(m);return o!==m&&(s.setTheme(b),o=m),{theme:b,colorMap:s.getColorMap()}}function u(){return y(),s.getLoadedThemes()}function h(){return y(),s.getLoadedLanguages()}function p(...m){y(),s.loadLanguages(m.flat(1))}async function f(...m){return p(await Jt(m))}function d(...m){y();for(const b of m.flat(1))s.loadTheme(b)}async function S(...m){return y(),d(await Qt(m))}function y(){if(e)throw new R("Shiki instance has been disposed")}function _(){e||(e=!0,s.dispose(),Q-=1)}return{setTheme:c,getTheme:a,getLanguage:l,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:i,loadLanguage:f,loadLanguageSync:p,loadTheme:S,loadThemeSync:d,dispose:_,[Symbol.dispose]:_}}async function yr(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,r]=await Promise.all([Qt(t.themes||[]),Jt(t.langs||[]),t.engine]);return _r({...t,themes:e,langs:n,engine:r})}const en=new WeakMap;function Ee(t,e){en.set(t,e)}function se(t){return en.get(t)}var Te=class tn{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new tn(Object.fromEntries(hr(n).map(r=>[r,Ke])),e)}constructor(...e){if(e.length===2){const[n,r]=e;this.lang=r,this._stacks=n}else{const[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return br(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function br(t){const e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);const o=s?.nameScopesList?.scopeName;o&&e.push(o),s.parent&&r(s.parent)}return r(t),e}function Sr(t,e){if(!(t instanceof Te))throw new R("Invalid grammar state");return t.getInternalStack(e)}const wr=/,/,Cr=/ /;function nn(t,e,n={}){const{theme:r=t.getLoadedThemes()[0]}=n;if(ke(t.resolveLangAlias(n.lang||"text"))||Re(r))return Ae(e).map(l=>[{content:l[0],offset:l[1]}]);const{theme:s,colorMap:o}=t.setTheme(r),i=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new R(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(s.name))throw new R(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return kr(e,i,s,o,n)}function vr(...t){if(t.length===2)return se(t[1]);const[e,n,r={}]=t,{lang:s="text",theme:o=e.getLoadedThemes()[0]}=r;if(ke(s)||Re(o))throw new R("Plain language does not have grammar state");if(s==="ansi")throw new R("ANSI language does not have grammar state");const{theme:i,colorMap:l}=e.setTheme(o),a=e.getLanguage(s);return new Te(rt(n,a,i,l,r).stateStack,a.name,i.name)}function kr(t,e,n,r,s){const o=rt(t,e,n,r,s),i=new Te(o.stateStack,e.name,n.name);return Ee(o.tokens,i),o.tokens}function rt(t,e,n,r,s){const o=be(n,s),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:l=500,includeExplanation:a=!1}=s,c=Ae(t);let u=s.grammarState?Sr(s.grammarState,n.name)??Ke:s.grammarContextCode!=null?rt(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ke,h=[];const p=[];for(let f=0,d=c.length;f<d;f++){const[S,y]=c[f];if(S===""){h=[],p.push([]);continue}if(i>0&&S.length>=i){h=[],p.push([{content:S,offset:y,color:"",fontStyle:0}]);continue}let _,m,b;a&&a!=="tokenType"&&(_=e.tokenizeLine(S,u,l),m=_.tokens,b=0);const k=e.tokenizeLine2(S,u,l),E=k.tokens.length/2;for(let N=0;N<E;N++){const $=k.tokens[2*N],xe=N+1<E?k.tokens[2*N+2]:S.length;if($===xe)continue;const Ie=k.tokens[2*N+1],vn=U(r[z.getForeground(Ie)],o),kn=z.getFontStyle(Ie),ae={content:S.substring($,xe),offset:y+$,color:vn,fontStyle:kn};if(a==="tokenType")ae.type=z.getTokenType(Ie);else if(a){const lt=[];if(a!=="scopeName")for(const j of n.settings){let V;switch(typeof j.scope){case"string":V=j.scope.split(wr).map(Ne=>Ne.trim());break;case"object":V=j.scope;break;default:continue}lt.push({settings:j,selectors:V.map(Ne=>Ne.split(Cr))})}ae.explanation=[];let ct=0;for(;$+ct<xe;){const j=m[b],V=S.substring(j.startIndex,j.endIndex);ct+=V.length,ae.explanation.push({content:V,scopes:a==="scopeName"?Rr(j.scopes):Ar(lt,j.scopes)}),b+=1}}h.push(ae)}p.push(h),h=[],u=k.ruleStack}return{tokens:p,stateStack:u}}function Rr(t){return t.map(e=>({scopeName:e}))}function Ar(t,e){const n=[];for(let r=0,s=e.length;r<s;r++){const o=e[r];n[r]={scopeName:o,themeMatches:Tr(t,o,e.slice(0,r))}}return n}function wt(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Er(t,e,n){if(!wt(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;for(;r>=0&&s>=0;)wt(t[r],n[s])&&(r-=1),s-=1;return r===-1}function Tr(t,e,n){const r=[];for(const{selectors:s,settings:o}of t)for(const i of s)if(Er(i,e,n)){r.push(o);break}return r}function rn(t,e,n,r=nn){const s=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),o=s.map(c=>{const u=r(t,e,{...n,theme:c.theme});return{tokens:u,state:se(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),i=Pr(...o.map(c=>c.tokens)),l=i[0].map((c,u)=>c.map((h,p)=>{const f={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=h.explanation),i.forEach((d,S)=>{const{content:y,explanation:_,offset:m,...b}=d[u][p];f.variants[s[S].color]=b}),f})),a=o[0].state?new Te(Object.fromEntries(o.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),o[0].state.lang):void 0;return a&&Ee(l,a),l}function Pr(...t){const e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){const s=t.map(a=>a[r]),o=e.map(()=>[]);e.forEach((a,c)=>a.push(o[c]));const i=s.map(()=>0),l=s.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<n;c++){const u=l[c];u.content.length===a?(o[c].push(u),i[c]+=1,l[c]=s[c][i[c]]):(o[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return e}const Lr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class ie{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}ie.prototype.normal={};ie.prototype.property={};ie.prototype.space=void 0;function sn(t,e){const n={},r={};for(const s of t)Object.assign(n,s.property),Object.assign(r,s.normal);return new ie(n,r,e)}function Ye(t){return t.toLowerCase()}class O{constructor(e,n){this.attribute=n,this.property=e}}O.prototype.attribute="";O.prototype.booleanish=!1;O.prototype.boolean=!1;O.prototype.commaOrSpaceSeparated=!1;O.prototype.commaSeparated=!1;O.prototype.defined=!1;O.prototype.mustUseProperty=!1;O.prototype.number=!1;O.prototype.overloadedBoolean=!1;O.prototype.property="";O.prototype.spaceSeparated=!1;O.prototype.space=void 0;let xr=0;const w=H(),A=H(),Xe=H(),g=H(),v=H(),q=H(),M=H();function H(){return 2**++xr}const Je=Object.freeze(Object.defineProperty({__proto__:null,boolean:w,booleanish:A,commaOrSpaceSeparated:M,commaSeparated:q,number:g,overloadedBoolean:Xe,spaceSeparated:v},Symbol.toStringTag,{value:"Module"})),De=Object.keys(Je);class st extends O{constructor(e,n,r,s){let o=-1;if(super(e,n),Ct(this,"space",s),typeof r=="number")for(;++o<De.length;){const i=De[o];Ct(this,De[o],(r&Je[i])===Je[i])}}}st.prototype.defined=!0;function Ct(t,e,n){n&&(t[e]=n)}function Y(t){const e={},n={};for(const[r,s]of Object.entries(t.properties)){const o=new st(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[Ye(r)]=r,n[Ye(o.attribute)]=r}return new ie(e,n,t.space)}const on=Y({properties:{ariaActiveDescendant:null,ariaAtomic:A,ariaAutoComplete:null,ariaBusy:A,ariaChecked:A,ariaColCount:g,ariaColIndex:g,ariaColSpan:g,ariaControls:v,ariaCurrent:null,ariaDescribedBy:v,ariaDetails:null,ariaDisabled:A,ariaDropEffect:v,ariaErrorMessage:null,ariaExpanded:A,ariaFlowTo:v,ariaGrabbed:A,ariaHasPopup:null,ariaHidden:A,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:v,ariaLevel:g,ariaLive:null,ariaModal:A,ariaMultiLine:A,ariaMultiSelectable:A,ariaOrientation:null,ariaOwns:v,ariaPlaceholder:null,ariaPosInSet:g,ariaPressed:A,ariaReadOnly:A,ariaRelevant:null,ariaRequired:A,ariaRoleDescription:v,ariaRowCount:g,ariaRowIndex:g,ariaRowSpan:g,ariaSelected:A,ariaSetSize:g,ariaSort:null,ariaValueMax:g,ariaValueMin:g,ariaValueNow:g,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function an(t,e){return e in t?t[e]:e}function ln(t,e){return an(t,e.toLowerCase())}const Ir=Y({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:q,acceptCharset:v,accessKey:v,action:null,allow:null,allowFullScreen:w,allowPaymentRequest:w,allowUserMedia:w,alt:null,as:null,async:w,autoCapitalize:null,autoComplete:v,autoFocus:w,autoPlay:w,blocking:v,capture:null,charSet:null,checked:w,cite:null,className:v,cols:g,colSpan:null,content:null,contentEditable:A,controls:w,controlsList:v,coords:g|q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:w,defer:w,dir:null,dirName:null,disabled:w,download:Xe,draggable:A,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:w,formTarget:null,headers:v,height:g,hidden:Xe,high:g,href:null,hrefLang:null,htmlFor:v,httpEquiv:v,id:null,imageSizes:null,imageSrcSet:null,inert:w,inputMode:null,integrity:null,is:null,isMap:w,itemId:null,itemProp:v,itemRef:v,itemScope:w,itemType:v,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:w,low:g,manifest:null,max:null,maxLength:g,media:null,method:null,min:null,minLength:g,multiple:w,muted:w,name:null,nonce:null,noModule:w,noValidate:w,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:w,optimum:g,pattern:null,ping:v,placeholder:null,playsInline:w,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:w,referrerPolicy:null,rel:v,required:w,reversed:w,rows:g,rowSpan:g,sandbox:v,scope:null,scoped:w,seamless:w,selected:w,shadowRootClonable:w,shadowRootDelegatesFocus:w,shadowRootMode:null,shape:null,size:g,sizes:null,slot:null,span:g,spellCheck:A,src:null,srcDoc:null,srcLang:null,srcSet:null,start:g,step:null,style:null,tabIndex:g,target:null,title:null,translate:null,type:null,typeMustMatch:w,useMap:null,value:A,width:g,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:v,axis:null,background:null,bgColor:null,border:g,borderColor:null,bottomMargin:g,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:w,declare:w,event:null,face:null,frame:null,frameBorder:null,hSpace:g,leftMargin:g,link:null,longDesc:null,lowSrc:null,marginHeight:g,marginWidth:g,noResize:w,noHref:w,noShade:w,noWrap:w,object:null,profile:null,prompt:null,rev:null,rightMargin:g,rules:null,scheme:null,scrolling:A,standby:null,summary:null,text:null,topMargin:g,valueType:null,version:null,vAlign:null,vLink:null,vSpace:g,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:w,disableRemotePlayback:w,prefix:null,property:null,results:g,security:null,unselectable:null},space:"html",transform:ln}),Nr=Y({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:M,accentHeight:g,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:g,amplitude:g,arabicForm:null,ascent:g,attributeName:null,attributeType:null,azimuth:g,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:g,by:null,calcMode:null,capHeight:g,className:v,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:g,diffuseConstant:g,direction:null,display:null,dur:null,divisor:g,dominantBaseline:null,download:w,dx:null,dy:null,edgeMode:null,editable:null,elevation:g,enableBackground:null,end:null,event:null,exponent:g,externalResourcesRequired:null,fill:null,fillOpacity:g,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:q,g2:q,glyphName:q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:g,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:g,horizOriginX:g,horizOriginY:g,id:null,ideographic:g,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:g,k:g,k1:g,k2:g,k3:g,k4:g,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:g,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:g,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:g,overlineThickness:g,paintOrder:null,panose1:null,path:null,pathLength:g,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:v,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:g,pointsAtY:g,pointsAtZ:g,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:g,specularExponent:g,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:g,strikethroughThickness:g,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:g,strokeOpacity:g,strokeWidth:null,style:null,surfaceScale:g,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:g,tableValues:null,target:null,targetX:g,targetY:g,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:g,underlineThickness:g,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:g,values:null,vAlphabetic:g,vMathematical:g,vectorEffect:null,vHanging:g,vIdeographic:g,version:null,vertAdvY:g,vertOriginX:g,vertOriginY:g,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:g,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:an}),cn=Y({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),un=Y({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ln}),hn=Y({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),Or=/[A-Z]/g,vt=/-[a-z]/g,Mr=/^data[-\w.:]+$/i;function Br(t,e){const n=Ye(e);let r=e,s=O;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Mr.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(vt,Gr);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!vt.test(o)){let i=o.replace(Or,Dr);i.charAt(0)!=="-"&&(i="-"+i),e="data"+i}}s=st}return new s(r,e)}function Dr(t){return"-"+t.toLowerCase()}function Gr(t){return t.charAt(1).toUpperCase()}const jr=sn([on,Ir,cn,un,hn],"html"),fn=sn([on,Nr,cn,un,hn],"svg"),kt={}.hasOwnProperty;function $r(t,e){const n=e||{};function r(s,...o){let i=r.invalid;const l=r.handlers;if(s&&kt.call(s,t)){const a=String(s[t]);i=kt.call(l,a)?l[a]:r.unknown}if(i)return i.call(this,s,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ur=/["&'<>`]/g,Fr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Wr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,zr=/[|\\{}()[\]^$+*?.]/g,Rt=new WeakMap;function Hr(t,e){if(t=t.replace(e.subset?Vr(e.subset):Ur,r),e.subset||e.escapeOnly)return t;return t.replace(Fr,n).replace(Wr,r);function n(s,o,i){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),e)}function r(s,o,i){return e.format(s.charCodeAt(0),i.charCodeAt(o+1),e)}}function Vr(t){let e=Rt.get(t);return e||(e=qr(t),Rt.set(t,e)),e}function qr(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(zr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Kr=/[\dA-Fa-f]/;function Yr(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Kr.test(String.fromCharCode(e))?r:r+";"}const Xr=/\d/;function Jr(t,e,n){const r="&#"+String(t);return n&&e&&!Xr.test(String.fromCharCode(e))?r:r+";"}const Qr=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ge={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Zr=["cent","copy","divide","gt","lt","not","para","times"],dn={}.hasOwnProperty,Qe={};let ce;for(ce in Ge)dn.call(Ge,ce)&&(Qe[Ge[ce]]=ce);const es=/[^\dA-Za-z]/;function ts(t,e,n,r){const s=String.fromCharCode(t);if(dn.call(Qe,s)){const o=Qe[s],i="&"+o;return n&&Qr.includes(o)&&!Zr.includes(o)&&(!r||e&&e!==61&&es.test(String.fromCharCode(e)))?i:i+";"}return""}function ns(t,e,n){let r=Yr(t,e,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=ts(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){const o=Jr(t,e,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function K(t,e){return Hr(t,Object.assign({format:ns},e))}const rs=/^>|^->|<!--|-->|--!>|<!-$/g,ss=[">"],os=["<",">"];function is(t,e,n,r){return r.settings.bogusComments?"<?"+K(t.value,Object.assign({},r.settings.characterReferences,{subset:ss}))+">":"<!--"+t.value.replace(rs,s)+"-->";function s(o){return K(o,Object.assign({},r.settings.characterReferences,{subset:os}))}}function as(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function At(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(e);for(;s!==-1;)r++,s=n.indexOf(e,s+e.length);return r}function ls(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function cs(t){return t.join(" ").trim()}const us=/[ \t\n\f\r]/g;function ot(t){return typeof t=="object"?t.type==="text"?Et(t.value):!1:Et(t)}function Et(t){return t.replace(us,"")===""}const P=gn(1),pn=gn(-1),hs=[];function gn(t){return e;function e(n,r,s){const o=n?n.children:hs;let i=(r||0)+t,l=o[i];if(!s)for(;l&&ot(l);)i+=t,l=o[i];return l}}const fs={}.hasOwnProperty;function mn(t){return e;function e(n,r,s){return fs.call(t,n.tagName)&&t[n.tagName](n,r,s)}}const it=mn({body:ps,caption:je,colgroup:je,dd:ys,dt:_s,head:je,html:ds,li:ms,optgroup:bs,option:Ss,p:gs,rp:Tt,rt:Tt,tbody:Cs,td:Pt,tfoot:vs,th:Pt,thead:ws,tr:ks});function je(t,e,n){const r=P(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&ot(r.value.charAt(0)))}function ds(t,e,n){const r=P(n,e);return!r||r.type!=="comment"}function ps(t,e,n){const r=P(n,e);return!r||r.type!=="comment"}function gs(t,e,n){const r=P(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ms(t,e,n){const r=P(n,e);return!r||r.type==="element"&&r.tagName==="li"}function _s(t,e,n){const r=P(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ys(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Tt(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function bs(t,e,n){const r=P(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Ss(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function ws(t,e,n){const r=P(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Cs(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function vs(t,e,n){return!P(n,e)}function ks(t,e,n){const r=P(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Pt(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Rs=mn({body:Ts,colgroup:Ps,head:Es,html:As,tbody:Ls});function As(t){const e=P(t,-1);return!e||e.type!=="comment"}function Es(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function Ts(t){const e=P(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&ot(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Ps(t,e,n){const r=pn(n,e),s=P(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&it(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function Ls(t,e,n){const r=pn(n,e),s=P(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&it(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const ue={name:[[`
5
5
  \f\r &/=>`.split(""),`
@@ -1 +1 @@
1
- import{r as s,j as w}from"./index-DReVb7jZ.js";const K=e=>e==="right"?"railOccupantRight":"railOccupantBottom";function N(e,n,r,l){s.useEffect(()=>{if(!r||typeof window>"u"||typeof document>"u")return;const d=K(e),o=document.body.dataset[d];document.body.dataset[d]=n,window.dispatchEvent(new CustomEvent("hudson:rail:claim",{detail:{owner:n,side:e}})),o&&o!==n&&window.dispatchEvent(new CustomEvent("hudson:rail:preempted",{detail:{owner:o,side:e,by:n}}));const m=f=>{const a=f.detail;a&&a.side===e&&a.owner!==n&&l?.()},v=f=>{const a=f.detail;a&&a.side===e&&a.owner===n&&l?.()};return window.addEventListener("hudson:rail:claim",m),window.addEventListener("hudson:rail:preempted",v),()=>{window.removeEventListener("hudson:rail:claim",m),window.removeEventListener("hudson:rail:preempted",v),document.body.dataset[d]===n&&delete document.body.dataset[d],window.dispatchEvent(new CustomEvent("hudson:rail:release",{detail:{owner:n,side:e}}))}},[e,n,r,l])}const k=620,B=360,$=280,H=900,X=720;function q(e,n,r,l){if(typeof window>"u")return n;try{const d=window.localStorage.getItem(e);if(d==null)return n;const o=Number(d);return Number.isFinite(o)?Math.min(l,Math.max(r,o)):n}catch{return n}}const z=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(", ");function P({open:e,onClose:n,side:r="right",owner:l,defaultSize:d,minSize:o=$,maxSize:m,resizable:v=!1,backdrop:f=!0,scrollLock:a=!1,focusTrap:A=!1,ariaLabel:_,className:F,layer:j="default",children:C}){const I=d??(r==="right"?k:B),h=m??(r==="right"?H:X),y=`slidepanel.size.${l}.${r}`,[E,L]=s.useState(()=>q(y,I,o,h)),S=s.useRef(E);S.current=E;const[g,R]=s.useState(!1),b=s.useRef(null),D=s.useRef(null),p=s.useCallback(()=>n(),[n]);N(r,l,e,p),s.useEffect(()=>{if(!e)return;const t=i=>{i.key==="Escape"&&(i.preventDefault(),p())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,p]),s.useEffect(()=>{if(!e||!a)return;const t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e,a]),s.useEffect(()=>{if(!e)return;D.current=document.activeElement;const t=b.current;return t?((t.querySelector(z)??t).focus(),()=>{D.current?.focus?.()}):void 0},[e]),s.useEffect(()=>{if(!g)return;const t=u=>{if(r==="right"){const c=window.innerWidth-u.clientX;L(Math.min(h,Math.max(o,c)))}else{const c=window.innerHeight-u.clientY;L(Math.min(h,Math.max(o,c)))}},i=()=>{R(!1);try{window.localStorage.setItem(y,String(S.current))}catch{}};return window.addEventListener("pointermove",t),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",i),()=>{window.removeEventListener("pointermove",t),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",i)}},[g,r,o,h,y]);const O=t=>{if(!A||t.key!=="Tab")return;const i=b.current;if(!i)return;const u=Array.from(i.querySelectorAll(z));if(u.length===0){t.preventDefault(),i.focus();return}const c=u[0],T=u[u.length-1],x=document.activeElement;t.shiftKey?(x===c||!i.contains(x))&&(t.preventDefault(),T.focus()):x===T&&(t.preventDefault(),c.focus())};if(!e)return null;const U=r==="right"?{width:E}:{height:E},M=j==="elevated";return w.jsxs(w.Fragment,{children:[f&&w.jsx("div",{className:`s-slide-backdrop${M?" s-slide-backdrop--elevated":""}`,"data-side":r,onClick:p,"aria-hidden":"true"}),w.jsxs("aside",{ref:b,className:["s-slide",`s-slide--${r}`,g?"s-slide--resizing":"",M?"s-slide--elevated":"",F].filter(Boolean).join(" "),role:"dialog","aria-modal":"true","aria-label":_,tabIndex:-1,onKeyDown:O,style:U,children:[v&&w.jsx("div",{className:`s-slide-resize s-slide-resize--${r}`,onPointerDown:t=>{t.preventDefault(),R(!0)},role:"separator","aria-orientation":r==="right"?"vertical":"horizontal","aria-label":"Resize panel"}),C]})]})}export{P as S};
1
+ import{r as s,j as w}from"./index-EsrkGBcv.js";const K=e=>e==="right"?"railOccupantRight":"railOccupantBottom";function N(e,n,r,l){s.useEffect(()=>{if(!r||typeof window>"u"||typeof document>"u")return;const d=K(e),o=document.body.dataset[d];document.body.dataset[d]=n,window.dispatchEvent(new CustomEvent("hudson:rail:claim",{detail:{owner:n,side:e}})),o&&o!==n&&window.dispatchEvent(new CustomEvent("hudson:rail:preempted",{detail:{owner:o,side:e,by:n}}));const m=f=>{const a=f.detail;a&&a.side===e&&a.owner!==n&&l?.()},v=f=>{const a=f.detail;a&&a.side===e&&a.owner===n&&l?.()};return window.addEventListener("hudson:rail:claim",m),window.addEventListener("hudson:rail:preempted",v),()=>{window.removeEventListener("hudson:rail:claim",m),window.removeEventListener("hudson:rail:preempted",v),document.body.dataset[d]===n&&delete document.body.dataset[d],window.dispatchEvent(new CustomEvent("hudson:rail:release",{detail:{owner:n,side:e}}))}},[e,n,r,l])}const k=620,B=360,$=280,H=900,X=720;function q(e,n,r,l){if(typeof window>"u")return n;try{const d=window.localStorage.getItem(e);if(d==null)return n;const o=Number(d);return Number.isFinite(o)?Math.min(l,Math.max(r,o)):n}catch{return n}}const z=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(", ");function P({open:e,onClose:n,side:r="right",owner:l,defaultSize:d,minSize:o=$,maxSize:m,resizable:v=!1,backdrop:f=!0,scrollLock:a=!1,focusTrap:A=!1,ariaLabel:_,className:F,layer:j="default",children:C}){const I=d??(r==="right"?k:B),h=m??(r==="right"?H:X),y=`slidepanel.size.${l}.${r}`,[E,L]=s.useState(()=>q(y,I,o,h)),S=s.useRef(E);S.current=E;const[g,R]=s.useState(!1),b=s.useRef(null),D=s.useRef(null),p=s.useCallback(()=>n(),[n]);N(r,l,e,p),s.useEffect(()=>{if(!e)return;const t=i=>{i.key==="Escape"&&(i.preventDefault(),p())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,p]),s.useEffect(()=>{if(!e||!a)return;const t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e,a]),s.useEffect(()=>{if(!e)return;D.current=document.activeElement;const t=b.current;return t?((t.querySelector(z)??t).focus(),()=>{D.current?.focus?.()}):void 0},[e]),s.useEffect(()=>{if(!g)return;const t=u=>{if(r==="right"){const c=window.innerWidth-u.clientX;L(Math.min(h,Math.max(o,c)))}else{const c=window.innerHeight-u.clientY;L(Math.min(h,Math.max(o,c)))}},i=()=>{R(!1);try{window.localStorage.setItem(y,String(S.current))}catch{}};return window.addEventListener("pointermove",t),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",i),()=>{window.removeEventListener("pointermove",t),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",i)}},[g,r,o,h,y]);const O=t=>{if(!A||t.key!=="Tab")return;const i=b.current;if(!i)return;const u=Array.from(i.querySelectorAll(z));if(u.length===0){t.preventDefault(),i.focus();return}const c=u[0],T=u[u.length-1],x=document.activeElement;t.shiftKey?(x===c||!i.contains(x))&&(t.preventDefault(),T.focus()):x===T&&(t.preventDefault(),c.focus())};if(!e)return null;const U=r==="right"?{width:E}:{height:E},M=j==="elevated";return w.jsxs(w.Fragment,{children:[f&&w.jsx("div",{className:`s-slide-backdrop${M?" s-slide-backdrop--elevated":""}`,"data-side":r,onClick:p,"aria-hidden":"true"}),w.jsxs("aside",{ref:b,className:["s-slide",`s-slide--${r}`,g?"s-slide--resizing":"",M?"s-slide--elevated":"",F].filter(Boolean).join(" "),role:"dialog","aria-modal":"true","aria-label":_,tabIndex:-1,onKeyDown:O,style:U,children:[v&&w.jsx("div",{className:`s-slide-resize s-slide-resize--${r}`,onPointerDown:t=>{t.preventDefault(),R(!0)},role:"separator","aria-orientation":r==="right"?"vertical":"horizontal","aria-label":"Resize panel"}),C]})]})}export{P as S};
@@ -0,0 +1 @@
1
+ import{r as a,j as t}from"./index-EsrkGBcv.js";import{u as T}from"./chat-transport-DNS5CB2I.js";import"./chat-api-DSJMBYoT.js";import"./api-DSqpVKC7.js";function L(l){return l.trim().slice(0,1).toUpperCase()||"?"}function G({spaces:l,activeSlug:D,canCreate:x,railed:S,onSelect:F,onCreate:j,onDelete:N,onExpandRail:K}){const y=T(),[n,c]=a.useState(!1),[R,u]=a.useState(!1),[o,v]=a.useState(""),[f,C]=a.useState(""),[i,h]=a.useState(!1),[w,m]=a.useState(null),[k,d]=a.useState(!1),b=a.useRef(null),s=l.find(e=>e.slug===D)??l[0]??null;a.useEffect(()=>{n||d(!1)},[n]),a.useEffect(()=>{if(!n)return;const e=p=>{const E=p.target;E instanceof Node&&b.current?.contains(E)||c(!1)};return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[n]);const g=a.useCallback(async()=>{const e=o.trim();if(!(!e||i)){h(!0),m(null);try{await j({title:e,channel:f.trim()}),v(""),C(""),u(!1),c(!1)}catch(p){m(p instanceof Error?p.message:"That space could not be created.")}finally{h(!1)}}},[i,f,j,o]);if(!s)return null;if(S)return t.jsx("div",{className:"chat-space-switch","data-railed":"true",ref:b,children:t.jsx("button",{type:"button",className:"chat-rail-row chat-space-rail","aria-label":`${s.title} — switch space`,title:s.title,onClick:()=>K(),children:t.jsx("span",{className:"chat-rail-glyph",children:L(s.title)})})});const r=l.length>1||x;return t.jsxs("div",{className:"chat-space-switch",ref:b,children:[t.jsxs("button",{type:"button",className:"chat-space-current","aria-expanded":r?n:void 0,"aria-haspopup":r?"menu":void 0,disabled:!r,onClick:()=>r&&c(e=>!e),onKeyDown:e=>{e.key==="Escape"&&n&&(e.preventDefault(),e.stopPropagation(),c(!1))},children:[t.jsx("span",{className:"chat-space-name",children:s.title}),r?t.jsx("span",{className:"chat-space-caret","aria-hidden":"true",children:n?"⌄":"⌃"}):null]}),n?t.jsxs("div",{className:"chat-space-menu",role:"menu","aria-label":"Spaces",children:[l.map(e=>t.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e.slug===s.slug,className:"chat-space-menu-item","data-active":e.slug===s.slug,onClick:()=>{c(!1),e.slug!==s.slug&&F(e.slug)},children:[t.jsx("span",{className:"chat-space-menu-name",children:e.title}),e.channelCount===void 0?null:t.jsx("span",{className:"label-sm chat-space-menu-count",children:e.channelCount})]},e.slug)),x?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"chat-space-menu-rule"}),R?t.jsxs("div",{className:"chat-create-form",children:[t.jsx("input",{className:"chat-input",value:o,autoFocus:!0,placeholder:"Space name","aria-label":"Space name",onChange:e=>v(e.target.value),onKeyDown:e=>{e.key==="Enter"?(e.preventDefault(),g()):e.key==="Escape"&&(e.preventDefault(),u(!1))}}),y.namedFirstChannel?t.jsx("input",{className:"chat-input",value:f,placeholder:"First channel (general)","aria-label":"First channel",onChange:e=>C(e.target.value),onKeyDown:e=>{e.key==="Enter"&&(e.preventDefault(),g())}}):null,w?t.jsx("p",{className:"chat-space-error",children:w}):null,t.jsxs("div",{className:"chat-create-actions",children:[t.jsx("button",{type:"button",className:"btn btn--sm",disabled:i||!o.trim(),onClick:()=>{g()},children:i?"Creating…":"Create"}),t.jsx("button",{type:"button",className:"btn btn--ghost btn--sm",onClick:()=>u(!1),children:"Cancel"})]})]}):t.jsx("button",{type:"button",className:"chat-space-menu-item chat-space-menu-new",onClick:()=>u(!0),children:"+ New space"})]}):null,N&&y.spaceDelete?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"chat-space-menu-rule"}),t.jsx("button",{type:"button",className:"chat-space-menu-item chat-space-menu-danger",disabled:i,onClick:()=>{if(!k){d(!0);return}h(!0),m(null),N(s.slug).then(()=>{d(!1),c(!1)}).catch(e=>{d(!1),m(e instanceof Error?e.message:"That space could not be deleted.")}).finally(()=>h(!1))},children:k?`Delete ${s.title} and everything in it`:"Delete this space"})]}):null]}):null]})}export{G as SpaceSwitcher};
@@ -1 +1 @@
1
- import{H as T,r as _,s as H,j as l}from"./index-DReVb7jZ.js";import{n as M}from"./agent-state-DDhnFEEP.js";const N=7,e=10,R=N*e;function D({name:i,size:n,hue:x,tone:p,salt:t,spectrum:s,tile:h=!1,glow:a,corner:d,cornerPulse:m,className:g,title:f}){const u=_.useMemo(()=>H(i,{hue:x,salt:t,spectrum:s,tone:p}),[i,x,t,s,p?.l,p?.c]),b=a??(n!=null&&n>=40),y={position:"relative",display:"inline-grid",placeItems:"center",...n!=null?{width:n,height:n}:{width:"100%",height:"100%"},borderRadius:h?"26%":void 0,background:h?u.palette.soft:void 0,boxSizing:"border-box"};return l.jsxs("span",{className:g,style:y,title:f,children:[l.jsx(C,{sprite:u,glow:b,inset:h}),d&&l.jsx("span",{"aria-hidden":!0,style:{position:"absolute",right:"-4%",bottom:"-4%",width:"28%",height:"28%",minWidth:6,minHeight:6,borderRadius:"999px",background:d,boxShadow:m?`0 0 0 2px var(--scout-chrome-surface, var(--hud-bg, #000)), 0 0 0 4px color-mix(in oklab, ${d} 32%, transparent)`:"0 0 0 2px var(--scout-chrome-surface, var(--hud-bg, #000))"}})]})}function C({sprite:i,glow:n=!1,inset:x=!1}){const{cells:p,palette:t}=i,s=e*.07,h=e*.2,a=e*.24,d=.05,m=.085,g=p.length,f=c=>{const o=g>1?c/(g-1):0;return{d:d-(d+m)*o,t:o}},u=c=>Math.max(.06,Math.min(.97,c)),b=c=>{const{d:o,t:r}=f(c);return`oklch(${u(t.bodyL+o)} ${t.bodyC+r*.012} ${t.hue})`},S=c=>{const{d:o,t:r}=f(c);return`oklch(${u(t.accentL+o)} ${t.accentC+r*.012} ${t.accentHue})`},y=[n?`drop-shadow(0 1px 3.5px color-mix(in oklab, ${t.glow} 68%, transparent))`:null,`drop-shadow(0 0.35px 0.5px oklch(0.16 0.04 ${t.hue} / 0.55))`].filter(Boolean).join(" ");return l.jsx("svg",{viewBox:`0 0 ${R} ${R}`,shapeRendering:"geometricPrecision",style:{display:"block",width:x?"72%":"100%",height:"auto",aspectRatio:"1 / 1",overflow:"visible",filter:y},children:p.flatMap((c,o)=>c.map((r,k)=>{if(r==="off")return null;const w=k*e,v=o*e,$=`${o}-${k}`;if(r==="eye"){const j=w+e/2,E=v+e*.52;return l.jsxs("g",{className:"sprite-cell sprite-cell--eye",children:[l.jsx("rect",{x:w+s,y:v+s,width:e-s*2,height:e-s*2,rx:h,fill:t.sclera}),l.jsx("circle",{cx:j,cy:E,r:a,fill:t.ink}),l.jsx("ellipse",{cx:j-a*.33,cy:E-a*.36,rx:a*.34,ry:a*.34,fill:t.sclera,opacity:.9})]},$)}const A=r==="accent"?S(o):r==="mouth"?t.ink:b(o),I=r==="accent"?"sprite-cell sprite-cell--accent":"sprite-cell";return l.jsx("rect",{className:I,x:w+s,y:v+s,width:e-s*2,height:e-s*2,rx:h,fill:A},$)}))})}const L={in_turn:{l:.75,c:.16},in_flight:{l:.72,c:.14},needs_attention:{l:.78,c:.16},callable:{l:.73,c:.13},blocked:{l:.5,c:.02}};function F(i){const n=i.harness?.trim().toLowerCase();return{hue:n?T[n]:void 0,tone:L[M(i.state??null)]}}export{D as S,F as a};
1
+ import{H as T,r as _,s as H,j as l}from"./index-EsrkGBcv.js";import{n as M}from"./agent-state-DDhnFEEP.js";const N=7,e=10,R=N*e;function D({name:i,size:n,hue:x,tone:p,salt:t,spectrum:s,tile:h=!1,glow:a,corner:d,cornerPulse:m,className:g,title:f}){const u=_.useMemo(()=>H(i,{hue:x,salt:t,spectrum:s,tone:p}),[i,x,t,s,p?.l,p?.c]),b=a??(n!=null&&n>=40),y={position:"relative",display:"inline-grid",placeItems:"center",...n!=null?{width:n,height:n}:{width:"100%",height:"100%"},borderRadius:h?"26%":void 0,background:h?u.palette.soft:void 0,boxSizing:"border-box"};return l.jsxs("span",{className:g,style:y,title:f,children:[l.jsx(C,{sprite:u,glow:b,inset:h}),d&&l.jsx("span",{"aria-hidden":!0,style:{position:"absolute",right:"-4%",bottom:"-4%",width:"28%",height:"28%",minWidth:6,minHeight:6,borderRadius:"999px",background:d,boxShadow:m?`0 0 0 2px var(--scout-chrome-surface, var(--hud-bg, #000)), 0 0 0 4px color-mix(in oklab, ${d} 32%, transparent)`:"0 0 0 2px var(--scout-chrome-surface, var(--hud-bg, #000))"}})]})}function C({sprite:i,glow:n=!1,inset:x=!1}){const{cells:p,palette:t}=i,s=e*.07,h=e*.2,a=e*.24,d=.05,m=.085,g=p.length,f=c=>{const o=g>1?c/(g-1):0;return{d:d-(d+m)*o,t:o}},u=c=>Math.max(.06,Math.min(.97,c)),b=c=>{const{d:o,t:r}=f(c);return`oklch(${u(t.bodyL+o)} ${t.bodyC+r*.012} ${t.hue})`},S=c=>{const{d:o,t:r}=f(c);return`oklch(${u(t.accentL+o)} ${t.accentC+r*.012} ${t.accentHue})`},y=[n?`drop-shadow(0 1px 3.5px color-mix(in oklab, ${t.glow} 68%, transparent))`:null,`drop-shadow(0 0.35px 0.5px oklch(0.16 0.04 ${t.hue} / 0.55))`].filter(Boolean).join(" ");return l.jsx("svg",{viewBox:`0 0 ${R} ${R}`,shapeRendering:"geometricPrecision",style:{display:"block",width:x?"72%":"100%",height:"auto",aspectRatio:"1 / 1",overflow:"visible",filter:y},children:p.flatMap((c,o)=>c.map((r,k)=>{if(r==="off")return null;const w=k*e,v=o*e,$=`${o}-${k}`;if(r==="eye"){const j=w+e/2,E=v+e*.52;return l.jsxs("g",{className:"sprite-cell sprite-cell--eye",children:[l.jsx("rect",{x:w+s,y:v+s,width:e-s*2,height:e-s*2,rx:h,fill:t.sclera}),l.jsx("circle",{cx:j,cy:E,r:a,fill:t.ink}),l.jsx("ellipse",{cx:j-a*.33,cy:E-a*.36,rx:a*.34,ry:a*.34,fill:t.sclera,opacity:.9})]},$)}const A=r==="accent"?S(o):r==="mouth"?t.ink:b(o),I=r==="accent"?"sprite-cell sprite-cell--accent":"sprite-cell";return l.jsx("rect",{className:I,x:w+s,y:v+s,width:e-s*2,height:e-s*2,rx:h,fill:A},$)}))})}const L={in_turn:{l:.75,c:.16},in_flight:{l:.72,c:.14},needs_attention:{l:.78,c:.16},callable:{l:.73,c:.13},blocked:{l:.5,c:.02}};function F(i){const n=i.harness?.trim().toLowerCase();return{hue:n?T[n]:void 0,tone:L[M(i.state??null)]}}export{D as S,F as a};
@@ -1 +1 @@
1
- import{r as t,j as u}from"./index-DReVb7jZ.js";/* empty css */const U="/assets/sprout-actions-proof-v1-BzUdc812.png",_=["run","jump","land","idle"],$={run:130,jump:130,land:65,idle:650},y=[0,323,627,950,1262],S=[0,330,610,892,1246],A=[[[85,43,283,312],[75,46,252,316],[39,44,243,314],[44,43,223,316]],[[99,16,258,264],[72,12,232,261],[44,11,230,261],[30,16,204,264]],[[94,14,264,265],[60,34,238,265],[61,5,217,267],[44,3,200,265]],[[91,8,249,289],[73,8,228,289],[61,8,220,288],[41,10,198,289]]];function H({action:n="idle",size:o=128,paused:l=!1,playbackRate:m=1}){const i=t.useRef(null),[c,f]=t.useState(0),[h,I]=t.useState(!0),[p,L]=t.useState(()=>typeof document<"u"&&document.hidden),[w,M]=t.useState(()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches);t.useEffect(()=>{if(!i.current)return;const r=new IntersectionObserver(([R])=>I(R.isIntersecting));r.observe(i.current);const s=window.matchMedia("(prefers-reduced-motion: reduce)"),E=()=>M(s.matches),j=()=>L(document.hidden);return s.addEventListener("change",E),document.addEventListener("visibilitychange",j),()=>{r.disconnect(),s.removeEventListener("change",E),document.removeEventListener("visibilitychange",j)}},[]),t.useEffect(()=>{f(0)},[n]),t.useEffect(()=>{if(l||!h||p||w)return;const r=window.setInterval(()=>f(s=>n==="jump"||n==="land"?Math.min(3,s+1):(s+1)%4),$[n]/Math.max(.25,m));return()=>window.clearInterval(r)},[n,l,h,p,w,m]);const d=_.indexOf(n),v=y[c],g=S[d],x=y[c+1]-v,b=S[d+1]-g,e=o/300,a=A[d][c],N=(x/2-(a[0]+a[2])/2)*e,O=(b-a[3])*e;return u.jsx("span",{ref:i,className:"sprout-action-sprite","aria-hidden":"true",style:{width:o,height:o},children:u.jsx("span",{className:"sprout-action-sprite__crop",style:{width:x*e,height:b*e,transform:`translate(${N}px, ${O}px)`},children:u.jsx("img",{src:U,alt:"",draggable:!1,style:{width:1262*e,height:1246*e,left:-v*e,top:-g*e}})})})}export{H as S};
1
+ import{r as t,j as u}from"./index-EsrkGBcv.js";/* empty css */const U="/assets/sprout-actions-proof-v1-BzUdc812.png",_=["run","jump","land","idle"],$={run:130,jump:130,land:65,idle:650},y=[0,323,627,950,1262],S=[0,330,610,892,1246],A=[[[85,43,283,312],[75,46,252,316],[39,44,243,314],[44,43,223,316]],[[99,16,258,264],[72,12,232,261],[44,11,230,261],[30,16,204,264]],[[94,14,264,265],[60,34,238,265],[61,5,217,267],[44,3,200,265]],[[91,8,249,289],[73,8,228,289],[61,8,220,288],[41,10,198,289]]];function H({action:n="idle",size:o=128,paused:l=!1,playbackRate:m=1}){const i=t.useRef(null),[c,f]=t.useState(0),[h,I]=t.useState(!0),[p,L]=t.useState(()=>typeof document<"u"&&document.hidden),[w,M]=t.useState(()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches);t.useEffect(()=>{if(!i.current)return;const r=new IntersectionObserver(([R])=>I(R.isIntersecting));r.observe(i.current);const s=window.matchMedia("(prefers-reduced-motion: reduce)"),E=()=>M(s.matches),j=()=>L(document.hidden);return s.addEventListener("change",E),document.addEventListener("visibilitychange",j),()=>{r.disconnect(),s.removeEventListener("change",E),document.removeEventListener("visibilitychange",j)}},[]),t.useEffect(()=>{f(0)},[n]),t.useEffect(()=>{if(l||!h||p||w)return;const r=window.setInterval(()=>f(s=>n==="jump"||n==="land"?Math.min(3,s+1):(s+1)%4),$[n]/Math.max(.25,m));return()=>window.clearInterval(r)},[n,l,h,p,w,m]);const d=_.indexOf(n),v=y[c],g=S[d],x=y[c+1]-v,b=S[d+1]-g,e=o/300,a=A[d][c],N=(x/2-(a[0]+a[2])/2)*e,O=(b-a[3])*e;return u.jsx("span",{ref:i,className:"sprout-action-sprite","aria-hidden":"true",style:{width:o,height:o},children:u.jsx("span",{className:"sprout-action-sprite__crop",style:{width:x*e,height:b*e,transform:`translate(${N}px, ${O}px)`},children:u.jsx("img",{src:U,alt:"",draggable:!1,style:{width:1262*e,height:1246*e,left:-v*e,top:-g*e}})})})}export{H as S};
@@ -1 +1 @@
1
- import{j as n}from"./index-DReVb7jZ.js";import{t as r,a as e}from"./status-tone-BM_zuRy1.js";function f({tone:s,children:t,variant:o="chip",className:i,title:a}){const l=o==="pill"?"s-pill":"sys-chip",p=o==="pill"?`s-pill-${r(s)}`:`sys-chip-${e(s)}`,c=i?`${l} ${p} ${i}`:`${l} ${p}`;return n.jsx("span",{className:c,title:a,children:t})}export{f as S};
1
+ import{j as n}from"./index-EsrkGBcv.js";import{t as r,a as e}from"./status-tone-BM_zuRy1.js";function f({tone:s,children:t,variant:o="chip",className:i,title:a}){const l=o==="pill"?"s-pill":"sys-chip",p=o==="pill"?`s-pill-${r(s)}`:`sys-chip-${e(s)}`,c=i?`${l} ${p} ${i}`:`${l} ${p}`;return n.jsx("span",{className:c,title:a,children:t})}export{f as S};
@@ -1,2 +1,2 @@
1
- import{r as c,j as e}from"./index-DReVb7jZ.js";import{S as ps}from"./SlidePanel-BMpkXai_.js";import{H as A,h as $}from"./HarnessMark-DSvM_H7H.js";import{a as Q}from"./api-DSqpVKC7.js";import{d as ms,n as hs}from"./time-Dhsh_2EG.js";import{i as fs,c as js,s as es,T as ts,d as as}from"./tail-display-DHSNmvor.js";import{u as xs}from"./tail-events-C4WdhVeK.js";import{o as ys}from"./openContent-C6XO6kr5.js";import{u as gs}from"./Provider-CNZluAZb.js";import"./lane-edit-display-BjdT9oZl.js";import"./index-BWHgHrtv.js";import"./provider-DwmCoSlc.js";import"./router-C-MF5-mb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-A8AyLH0g.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-BEXS8vV6.js";import"./runtime-picker-C_AVYF63.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./createLucideIcon-ChvMq-zl.js";import"./conversation-model-m8HhzroS.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./NewChatOrigin-C8ROO4ps.js";import"./keyboard-nav-CJXPaHXj.js";import"./x-rlMdRqJF.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";import"./file-text-DP6txVW-.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";const Z=5e3,bs=500,ks=3e4,rs="openscout:tail-display-mode",E={"scout-managed":"scout","hudson-managed":"hudson",unattributed:"native"},ls={"scout-managed":"sc","hudson-managed":"hu",unattributed:"na"};function Ns(s){return s?.trim().toLowerCase()||"unknown"}function ws(s,t){const r=new Map,o=s?.transcripts?.length?s.transcripts:s?.processes.length?s.processes:t;for(const l of o){const i=Ns(l.source);r.set(i,(r.get(i)??0)+1)}return[...r.entries()].map(([l,i])=>({source:l,count:i})).sort((l,i)=>i.count-l.count||l.source.localeCompare(i.source))}function Ss(s){return ms(s,{milliseconds:!0})||"—"}function $s(s,t,r=1){return`${s.id}:${s.ts}:${r}:${t}`}function Es(){try{const s=sessionStorage.getItem(rs);if(s==="work"||s==="all")return s}catch{}return"work"}const Is=/\b(error|failed|failure|exception|panic|timeout|timed out|refused|crash|fatal|non[- ]?zero|exit(?:ed)? with code [1-9])\b/i,Ts=/\b(warn(?:ing)?|deprecated|retry|rate limit|rate-limited|blocked|skipped|interrupted|aborted|stale|conflict|permission denied|denied)\b/i;function is(s){const t=s.replace(/[_-]+/g," ");return Is.test(t)?"error":Ts.test(t)?"warn":null}function v(s){return!(s==null||s===!1||typeof s=="string"&&!s.trim())}function Y(s,t=0){if(s==null||t>4||typeof s=="string"||typeof s!="object")return null;if(Array.isArray(s)){let o=null;for(const l of s.slice(0,40)){const i=Y(l,t+1);if(i==="error")return"error";o??=i}return o}let r=null;for(const[o,l]of Object.entries(s).slice(0,80)){const i=o.toLowerCase();if((i==="is_error"||i==="failed")&&l===!0||i==="error"&&v(l))return"error";if((i==="warning"||i==="warn")&&v(l)&&(r="warn"),typeof l=="string"&&(i==="level"||i==="severity"||i==="status"||i==="type"||i==="subtype")){const d=is(l);if(d==="error")return"error";r??=d}const m=Y(l,t+1);if(m==="error")return"error";r??=m}return r}function ns(s){const t=Y(s.raw);if(t==="error")return"error";if(s.kind==="tool-result"||s.kind==="system"||s.kind==="other"){const r=is(s.summary);return r==="error"?"error":t??r}return t}function Cs(s,t){return t==="all"?!0:t==="warn-plus"?s!=null:s==="error"}function Ls(s){switch(s){case"errors-only":return"errors";case"warn-plus":return"warnings or errors";case"all":return"all session events"}}function _s(s,t,r=null,o="all"){if(!t)return!0;const l=E[s.harness],i=r==="error"?"error failed failure issue":r==="warn"?"warn warning issue":"",d=(o==="context"?[s.project,s.cwd,s.sessionId,s.source,s.harness,l,i]:[s.summary,s.project,s.cwd,s.sessionId,s.source,s.harness,l,i]).join(" ").toLowerCase(),u=t.toLowerCase().split("|").map(p=>p.trim()).filter(Boolean);return u.length===0?!0:u.some(p=>d.includes(p))}function Rs(s){try{return JSON.stringify(s,null,2)??""}catch{return String(s)}}function Ds(s){return[["time",P(s.ts)],["kind",s.kind],["project",s.project],["cwd",s.cwd||"—"],["session",s.sessionId||"—"],["source",$(s.source)],["origin",E[s.harness]],["pid",s.parentPid!=null?`${s.pid} <- ${s.parentPid}`:String(s.pid)]].map(([r,o])=>`${r}: ${o}`).join(`
2
- `)}function Ms(s){const t=$(s.source),r=E[s.harness],o=Rs(s.raw??s),l=[{label:"Time",value:P(s.ts)},{label:"Kind",value:s.kind},{label:"Project",value:s.project},{label:"Cwd",value:s.cwd||"—"},{label:"Session",value:s.sessionId||"—"},{label:"Source",value:t},{label:"Origin",value:r},{label:"Pid",value:s.parentPid!=null?`${s.pid} <- ${s.parentPid}`:String(s.pid)}];return{source:"tail",focus:"item",title:`${s.kind} · ${t}`,meta:`${P(s.ts)} · ${s.project} · ${es(s.sessionId)}`,body:s.summary,metadata:l,copy:[{label:"Copy message",value:s.summary},{label:"Copy metadata",value:Ds(s)},{label:"Copy raw",value:o}],action:s.sessionId?{label:"Open session",route:{view:"sessions",sessionId:s.sessionId}}:null}}function ss(s){if(typeof window>"u")return;const t=window;t.scoutOpsDetailSnapshot=s,window.dispatchEvent(new CustomEvent("scout:ops-detail",{detail:s}))}function Me({navigate:s,initialFilter:t,variant:r="tail",chrome:o="full",filterLabel:l,filterScope:i="all"}={}){const{route:m}=gs(),d=r==="issues",u=o==="embedded",[p,f]=c.useState([]),[b,os]=c.useState(null),[y,I]=c.useState(t??""),[O,T]=c.useState(!!t&&!u),[j,H]=c.useState("warn-plus"),[x,B]=c.useState(!1),[w,z]=c.useState(0),[k,J]=c.useState(null),[g,U]=c.useState(Es),C=c.useRef(null),N=c.useRef(null),cs=c.useRef(!0),us=c.useCallback(a=>{f(n=>n.length>=Z?[...n.slice(n.length-Z+1),a]:[...n,a])},[]);xs(us),c.useEffect(()=>{I(t??""),T(!!t&&!u)},[u,t]),c.useEffect(()=>{try{sessionStorage.setItem(rs,g)}catch{}},[g]),c.useEffect(()=>{let a=!1;return(async()=>{try{const n=new URLSearchParams({limit:String(bs)});(u||t)&&n.set("transcripts","true");const h=await Q(`/api/tail/recent?${n.toString()}`);a||f(h.events??[])}catch{}})(),()=>{a=!0}},[u,t]),c.useEffect(()=>{if(!u)return ss(k?Ms(k):null),()=>ss(null)},[u,k]);const K=c.useCallback(async()=>{try{const a=await Q("/api/tail/discover");os(a)}catch{}},[]);c.useEffect(()=>{K();const a=setInterval(()=>{K()},ks);return()=>clearInterval(a)},[K]);const L=c.useMemo(()=>p.map(a=>({event:a,severity:ns(a)})),[p]),V=c.useMemo(()=>{let a=0,n=0;for(const h of L)h.severity==="error"&&n++,h.severity==="warn"&&a++;return{warn:a,error:n,total:a+n}},[L]),G=c.useMemo(()=>L.filter(({event:a,severity:n})=>d&&!Cs(n,j)?!1:_s(a,y,n,i)),[L,y,i,j,d]),S=c.useMemo(()=>{const a=G.filter(({event:n})=>g==="all"||!fs(n));return js(a.map(n=>({event:n.event,meta:n.severity})))},[g,G]);c.useLayoutEffect(()=>{const a=C.current;if(a){if(x){z(n=>n+1);return}a.scrollTop=a.scrollHeight}},[S,x]);const ds=c.useCallback(()=>{const a=C.current;if(!a)return;const h=a.scrollHeight-a.scrollTop-a.clientHeight<24;cs.current=h,h?(B(!1),z(0)):x||B(!0)},[x]),W=c.useCallback(a=>{I(a),T(!0),requestAnimationFrame(()=>N.current?.focus())},[]),q=c.useCallback(a=>{!a||!s||ys(s,{view:"sessions",sessionId:a},{returnTo:m})},[s,m]),_=c.useCallback(()=>{const a=C.current;a&&(a.scrollTop=a.scrollHeight,B(!1),z(0))},[]);c.useEffect(()=>{if(u)return;const a=n=>{const h=n.target,D=h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||(h?.isContentEditable??!1);if(n.key==="/"&&!D){n.preventDefault(),T(!0),requestAnimationFrame(()=>N.current?.focus());return}if(n.key==="Escape"&&O&&document.activeElement===N.current){n.preventDefault(),T(!1),N.current?.blur(),I("");return}(n.key==="g"||n.key==="G")&&!D&&(n.preventDefault(),_())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[u,O,_]);const R=b?.totals?.transcripts??b?.transcripts?.length??0,X=c.useMemo(()=>ws(b,p),[b,p]);return e.jsxs("div",{className:`s-tail s-tail--${o}`,children:[e.jsxs("div",{className:`s-tail-status${d?" s-tail-status--issues":""}`,children:[e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--metrics",children:[e.jsx("span",{className:`s-tail-live-dot${x?" s-tail-live-dot--paused":""}`,"aria-hidden":"true"}),e.jsx("span",{className:`s-tail-status-state${x?" s-tail-status-state--paused":""}`,children:x?"paused":"live"})]}),!d&&e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--display",children:[e.jsx("span",{className:"s-tail-status-key",children:"view"}),e.jsxs("span",{className:"s-tail-issue-filter",role:"group","aria-label":"Tail display mode",children:[e.jsx("button",{type:"button",className:`s-tail-issue-filter-btn${g==="work"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>U("work"),"aria-pressed":g==="work",children:"work"}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${g==="all"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>U("all"),"aria-pressed":g==="all",children:["all:",G.length]})]})]}),d&&e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--issues",children:[e.jsx("span",{className:"s-tail-status-key",children:"flt"}),e.jsxs("span",{className:"s-tail-issue-filter",role:"group","aria-label":"Alert severity filter",children:[e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="errors-only"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("errors-only"),"aria-pressed":j==="errors-only",children:["err:",V.error]}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="warn-plus"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("warn-plus"),"aria-pressed":j==="warn-plus",children:["wrn+:",V.total]}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="all"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("all"),"aria-pressed":j==="all",children:["all:",p.length]})]})]}),e.jsx("span",{className:"s-tail-status-spacer"}),e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--harnesses",children:[e.jsx("span",{className:"s-tail-status-key",children:"src"}),e.jsx("span",{className:"s-tail-status-inline",children:X.length>0?X.slice(0,4).map(a=>e.jsxs("span",{className:"s-tail-status-src",children:[e.jsx(A,{harness:a.source,size:10,title:null}),e.jsxs("span",{children:[$(a.source),":",a.count]})]},a.source)):e.jsx("span",{className:"s-tail-status-src",children:"—"})})]}),y&&u&&e.jsxs("span",{className:"s-tail-status-filter",title:y,children:["q=",l??"filtered"]})]}),O&&e.jsxs("div",{className:"s-tail-filter",children:[e.jsx("span",{className:"s-tail-filter-prompt",children:"/"}),e.jsx("input",{ref:N,className:"s-tail-filter-input",value:y,placeholder:"substring across summary · project · session",onChange:a=>I(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),N.current?.blur())},autoFocus:!0,spellCheck:!1}),e.jsx("span",{className:"s-tail-filter-hint",children:"esc to clear"})]}),e.jsxs("div",{className:"s-tail-body",ref:C,onScroll:ds,children:[S.length===0?e.jsxs("div",{className:"s-tail-empty",children:[e.jsxs("span",{className:"s-tail-empty-title",children:[d?"No alert events":"Waiting for events",e.jsx("span",{className:"s-tail-empty-cursor","aria-hidden":"true"})]}),e.jsx("span",{className:"s-tail-empty-body",children:y?u?e.jsxs(e.Fragment,{children:["no events match ",e.jsx("strong",{children:l??"this work filter"})]}):e.jsxs(e.Fragment,{children:["no events match filter ",e.jsx("strong",{children:y})]}):d?e.jsxs(e.Fragment,{children:["no ",Ls(j)," in the buffered session tail"]}):R?e.jsxs(e.Fragment,{children:["watching ",R," transcript",R===1?"":"s"," · no events yet"]}):e.jsx(e.Fragment,{children:"agent tool calls, messages, and system events stream here"})}),!R&&!y&&e.jsxs("span",{className:"s-tail-empty-hint",children:["Start a session to see traffic",e.jsx("span",{className:"s-tail-empty-hint-sep",children:" · "}),e.jsx("code",{children:"scout watch --tail"})]})]}):S.map(({event:a,repeatCount:n,meta:h},D)=>e.jsx(As,{event:a,repeatCount:n,issueSeverity:h,selected:k===a,onSelect:J,onProjectClick:W,onSessionClick:q},$s(a,D,n))),x&&w>0&&e.jsxs("div",{className:"s-tail-divider",onClick:_,onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),_())},role:"button",tabIndex:0,"aria-label":`Resume live tail · ${w} new`,children:["── paused · ",w," new · click or press G to jump back to live ──"]})]}),u?e.jsxs("div",{className:"s-tail-keys s-tail-keys--embedded",children:[e.jsxs("span",{children:[S.length," / ",p.length," lines buffered"]}),x&&w>0&&e.jsxs("span",{children:[w," new"]})]}):e.jsxs("div",{className:"s-tail-keys",children:[e.jsxs("span",{children:[e.jsx("kbd",{children:"j"}),e.jsx("kbd",{children:"k"})," scroll"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"/"})," filter"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"G"})," live"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"esc"})," clr"]}),e.jsx("span",{className:"s-tail-keys-spacer"}),e.jsxs("span",{children:[S.length,"/",p.length," buf"]})]}),u&&k&&e.jsx(Ps,{event:k,onClose:()=>J(null),onProjectClick:W,onSessionClick:q})]})}function As({event:s,repeatCount:t=1,issueSeverity:r,selected:o,onSelect:l,onProjectClick:i,onSessionClick:m}){const d=E[s.harness],u=$(s.source),p=r?` s-tail-row--issue s-tail-row--issue-${r}`:"";return e.jsxs("div",{className:`s-tail-row s-tail-row--${s.kind}${p}${o?" s-tail-row--selected":""}`,role:"button",tabIndex:0,onClick:()=>l(s),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),l(s))},children:[e.jsx("span",{className:"s-tail-cell-time",children:Ss(s.ts)}),e.jsxs("span",{className:"s-tail-token s-tail-token--harness",title:`source: ${u}`,children:[e.jsx(A,{harness:s.source,size:11,title:null}),e.jsx("span",{className:"s-tail-harness-label",children:u})]}),e.jsx("span",{className:"s-tail-token s-tail-token--origin",title:`origin: ${d}`,children:ls[s.harness]}),e.jsxs("span",{className:"s-tail-cell-context",children:[e.jsx(F,{className:"s-tail-link s-tail-link--project",onClick:i?()=>i(s.project):void 0,title:`Filter to ${s.project}`,children:s.project}),e.jsx("span",{className:"s-tail-sep",children:"/"}),e.jsx(F,{className:"s-tail-link s-tail-link--session",onClick:m&&s.sessionId?()=>m(s.sessionId):void 0,title:s.sessionId?`Open session ${s.sessionId}`:void 0,children:es(s.sessionId)}),e.jsx("span",{className:"s-tail-sep",children:":"}),e.jsx("span",{className:"s-tail-cell-pid",title:s.pid>0?`pid ${s.pid}`:"file-backed log",children:s.pid>0?s.pid:"log"})]}),e.jsxs("span",{className:"s-tail-kind",title:s.kind,children:[e.jsx("span",{className:`s-tail-glyph s-tail-glyph--${s.kind}`,children:ts[s.kind]}),e.jsx("span",{className:"s-tail-kind-label",children:as[s.kind]})]}),e.jsxs("span",{className:"s-tail-summary",children:[r==="error"?"✕ ":r==="warn"?"△ ":null,s.summary,t>1?e.jsxs("span",{className:"s-tail-repeat",title:`${t} identical events collapsed`,children:[" ","×",t]}):null]})]})}function F({className:s,onClick:t,title:r,children:o}){return t?e.jsx("span",{className:`${s} s-tail-link--active`,role:"link",tabIndex:0,title:r,onClick:l=>{l.stopPropagation(),t()},onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),l.stopPropagation(),t())},children:o}):e.jsx("span",{className:s,title:r,children:o})}function P(s){const t=hs(s);if(t===null)return"—";const r=new Date(t),o=r.getFullYear(),l=String(r.getMonth()+1).padStart(2,"0"),i=String(r.getDate()).padStart(2,"0"),m=String(r.getHours()).padStart(2,"0"),d=String(r.getMinutes()).padStart(2,"0"),u=String(r.getSeconds()).padStart(2,"0"),p=String(r.getMilliseconds()).padStart(3,"0");return`${o}-${l}-${i} ${m}:${d}:${u}.${p}`}function M(s){return(JSON.stringify(s,null,2)??"undefined").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/("(?:\\.|[^"\\])*"\s*:)|("(?:\\.|[^"\\])*")|\b(true|false|null)\b|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g,(o,l,i,m,d)=>l?`<span class="s-tail-jk">${l}</span>`:i?`<span class="s-tail-js">${i}</span>`:m?`<span class="s-tail-jl">${m}</span>`:d?`<span class="s-tail-jn">${d}</span>`:o)}function Fs(s){if(!s||typeof s!="object")return null;const t=s,o=t.message?.content??t.content;return Array.isArray(o)?o:typeof o=="string"?[{type:"text",text:o}]:null}function Ps({event:s,onClose:t,onProjectClick:r,onSessionClick:o}){const[l,i]=c.useState(!0),m=E[s.harness],d=$(s.source),u=ns(s),p=Fs(s.raw);return e.jsxs(ps,{open:!0,onClose:t,side:"right",owner:"openscout.tail",resizable:!0,defaultSize:620,minSize:400,maxSize:960,ariaLabel:"Tail event detail",children:[e.jsxs("div",{className:"s-slide-header s-tail-sheet-header",children:[e.jsx("span",{className:`s-tail-glyph s-tail-glyph--${s.kind}`,children:ts[s.kind]}),e.jsx("span",{className:"s-tail-sheet-kind",children:as[s.kind]}),u&&e.jsx("span",{className:`s-tail-token s-tail-token--issue-${u}`,children:u==="error"?"✕":"△"}),e.jsxs("span",{className:"s-tail-token s-tail-token--harness",children:[e.jsx(A,{harness:s.source,size:12,title:null}),e.jsx("span",{className:"s-tail-harness-label",children:d})]}),e.jsx("span",{className:"s-tail-token s-tail-token--origin",title:`origin: ${m}`,children:ls[s.harness]}),e.jsx("span",{className:"s-slide-spacer"}),e.jsx("span",{className:"s-tail-sheet-time",children:P(s.ts)}),e.jsx("button",{type:"button",className:"s-slide-close",onClick:t,"aria-label":"Close",children:"×"})]}),e.jsxs("div",{className:"s-slide-body s-tail-sheet-body",children:[e.jsx("section",{className:"s-tail-sheet-section",children:e.jsxs("div",{className:"s-tail-sheet-grid",children:[e.jsx("span",{className:"s-tail-sheet-key",children:"project"}),e.jsx("span",{className:"s-tail-sheet-val",children:e.jsx(F,{className:"s-tail-link s-tail-link--project",onClick:r?()=>r(s.project):void 0,title:`Filter to ${s.project}`,children:s.project})}),e.jsx("span",{className:"s-tail-sheet-key",children:"cwd"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:s.cwd||"—"}),e.jsx("span",{className:"s-tail-sheet-key",children:"session"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:e.jsx(F,{className:"s-tail-link s-tail-link--session",onClick:o&&s.sessionId?()=>o(s.sessionId):void 0,title:s.sessionId?`Open session ${s.sessionId}`:void 0,children:s.sessionId||"—"})}),e.jsx("span",{className:"s-tail-sheet-key",children:"harness"}),e.jsxs("span",{className:"s-tail-sheet-val s-tail-sheet-val--harness",children:[e.jsx(A,{harness:s.source,size:13,title:null}),e.jsx("span",{children:d})]}),e.jsx("span",{className:"s-tail-sheet-key",children:"origin"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:m}),e.jsx("span",{className:"s-tail-sheet-key",children:"pid"}),e.jsxs("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:[s.pid,s.parentPid!=null?` ← ${s.parentPid}`:""]})]})}),e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsx("h4",{className:"s-tail-sheet-h",children:"summary"}),e.jsx("div",{className:"s-tail-sheet-summary",children:s.summary})]}),p&&p.length>0&&e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsx("h4",{className:"s-tail-sheet-h",children:"content"}),p.map((f,b)=>e.jsx(Os,{block:f},b))]}),e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsxs("button",{type:"button",className:"s-tail-sheet-toggle",onClick:()=>i(f=>!f),children:[l?"▾":"▸"," raw event"]}),l&&e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(s.raw??s)}})]})]})]})}function Os({block:s}){if(s.type==="text"){const t=s.text??"";return e.jsx("div",{className:"s-tail-sheet-text",children:t})}if(s.type==="tool_use"){const t=s;return e.jsxs("div",{className:"s-tail-sheet-block s-tail-sheet-block--tool",children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--tool",children:"*"}),e.jsx("span",{className:"s-tail-sheet-block-title",children:t.name??"tool_use"})]}),e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(t.input??{})}})]})}if(s.type==="tool_result"){const t=s,r=typeof t.content=="string";return e.jsxs("div",{className:`s-tail-sheet-block s-tail-sheet-block--tool-result${t.is_error?" s-tail-sheet-block--err":""}`,children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--tool-result",children:"="}),e.jsxs("span",{className:"s-tail-sheet-block-title",children:["tool_result",t.is_error?" · error":""]})]}),r?e.jsx("pre",{className:"s-tail-sheet-pre",children:t.content}):e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(t.content??{})}})]})}return e.jsxs("div",{className:"s-tail-sheet-block",children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--other",children:"·"}),e.jsx("span",{className:"s-tail-sheet-block-title",children:s.type})]}),e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(s)}})]})}export{Me as TailView};
1
+ import{r as c,j as e}from"./index-EsrkGBcv.js";import{S as ps}from"./SlidePanel-_CHAQdOa.js";import{H as A,h as $}from"./HarnessMark-C4naWc16.js";import{a as Q}from"./api-DSqpVKC7.js";import{d as ms,n as hs}from"./time-Dhsh_2EG.js";import{i as fs,c as js,s as es,T as ts,d as as}from"./tail-display-DHSNmvor.js";import{u as xs}from"./tail-events-d0yAYxR0.js";import{o as ys}from"./openContent-C6XO6kr5.js";import{u as gs}from"./Provider-C35yu29I.js";import"./lane-edit-display-BjdT9oZl.js";import"./index-BWHgHrtv.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";const Z=5e3,bs=500,ks=3e4,rs="openscout:tail-display-mode",E={"scout-managed":"scout","hudson-managed":"hudson",unattributed:"native"},ls={"scout-managed":"sc","hudson-managed":"hu",unattributed:"na"};function Ns(s){return s?.trim().toLowerCase()||"unknown"}function ws(s,t){const r=new Map,o=s?.transcripts?.length?s.transcripts:s?.processes.length?s.processes:t;for(const l of o){const i=Ns(l.source);r.set(i,(r.get(i)??0)+1)}return[...r.entries()].map(([l,i])=>({source:l,count:i})).sort((l,i)=>i.count-l.count||l.source.localeCompare(i.source))}function Ss(s){return ms(s,{milliseconds:!0})||"—"}function $s(s,t,r=1){return`${s.id}:${s.ts}:${r}:${t}`}function Es(){try{const s=sessionStorage.getItem(rs);if(s==="work"||s==="all")return s}catch{}return"work"}const Is=/\b(error|failed|failure|exception|panic|timeout|timed out|refused|crash|fatal|non[- ]?zero|exit(?:ed)? with code [1-9])\b/i,Ts=/\b(warn(?:ing)?|deprecated|retry|rate limit|rate-limited|blocked|skipped|interrupted|aborted|stale|conflict|permission denied|denied)\b/i;function is(s){const t=s.replace(/[_-]+/g," ");return Is.test(t)?"error":Ts.test(t)?"warn":null}function v(s){return!(s==null||s===!1||typeof s=="string"&&!s.trim())}function Y(s,t=0){if(s==null||t>4||typeof s=="string"||typeof s!="object")return null;if(Array.isArray(s)){let o=null;for(const l of s.slice(0,40)){const i=Y(l,t+1);if(i==="error")return"error";o??=i}return o}let r=null;for(const[o,l]of Object.entries(s).slice(0,80)){const i=o.toLowerCase();if((i==="is_error"||i==="failed")&&l===!0||i==="error"&&v(l))return"error";if((i==="warning"||i==="warn")&&v(l)&&(r="warn"),typeof l=="string"&&(i==="level"||i==="severity"||i==="status"||i==="type"||i==="subtype")){const d=is(l);if(d==="error")return"error";r??=d}const m=Y(l,t+1);if(m==="error")return"error";r??=m}return r}function ns(s){const t=Y(s.raw);if(t==="error")return"error";if(s.kind==="tool-result"||s.kind==="system"||s.kind==="other"){const r=is(s.summary);return r==="error"?"error":t??r}return t}function Cs(s,t){return t==="all"?!0:t==="warn-plus"?s!=null:s==="error"}function Ls(s){switch(s){case"errors-only":return"errors";case"warn-plus":return"warnings or errors";case"all":return"all session events"}}function _s(s,t,r=null,o="all"){if(!t)return!0;const l=E[s.harness],i=r==="error"?"error failed failure issue":r==="warn"?"warn warning issue":"",d=(o==="context"?[s.project,s.cwd,s.sessionId,s.source,s.harness,l,i]:[s.summary,s.project,s.cwd,s.sessionId,s.source,s.harness,l,i]).join(" ").toLowerCase(),u=t.toLowerCase().split("|").map(p=>p.trim()).filter(Boolean);return u.length===0?!0:u.some(p=>d.includes(p))}function Rs(s){try{return JSON.stringify(s,null,2)??""}catch{return String(s)}}function Ds(s){return[["time",P(s.ts)],["kind",s.kind],["project",s.project],["cwd",s.cwd||"—"],["session",s.sessionId||"—"],["source",$(s.source)],["origin",E[s.harness]],["pid",s.parentPid!=null?`${s.pid} <- ${s.parentPid}`:String(s.pid)]].map(([r,o])=>`${r}: ${o}`).join(`
2
+ `)}function Ms(s){const t=$(s.source),r=E[s.harness],o=Rs(s.raw??s),l=[{label:"Time",value:P(s.ts)},{label:"Kind",value:s.kind},{label:"Project",value:s.project},{label:"Cwd",value:s.cwd||"—"},{label:"Session",value:s.sessionId||"—"},{label:"Source",value:t},{label:"Origin",value:r},{label:"Pid",value:s.parentPid!=null?`${s.pid} <- ${s.parentPid}`:String(s.pid)}];return{source:"tail",focus:"item",title:`${s.kind} · ${t}`,meta:`${P(s.ts)} · ${s.project} · ${es(s.sessionId)}`,body:s.summary,metadata:l,copy:[{label:"Copy message",value:s.summary},{label:"Copy metadata",value:Ds(s)},{label:"Copy raw",value:o}],action:s.sessionId?{label:"Open session",route:{view:"sessions",sessionId:s.sessionId}}:null}}function ss(s){if(typeof window>"u")return;const t=window;t.scoutOpsDetailSnapshot=s,window.dispatchEvent(new CustomEvent("scout:ops-detail",{detail:s}))}function Pe({navigate:s,initialFilter:t,variant:r="tail",chrome:o="full",filterLabel:l,filterScope:i="all"}={}){const{route:m}=gs(),d=r==="issues",u=o==="embedded",[p,f]=c.useState([]),[b,os]=c.useState(null),[y,I]=c.useState(t??""),[O,T]=c.useState(!!t&&!u),[j,H]=c.useState("warn-plus"),[x,B]=c.useState(!1),[w,z]=c.useState(0),[k,J]=c.useState(null),[g,U]=c.useState(Es),C=c.useRef(null),N=c.useRef(null),cs=c.useRef(!0),us=c.useCallback(a=>{f(n=>n.length>=Z?[...n.slice(n.length-Z+1),a]:[...n,a])},[]);xs(us),c.useEffect(()=>{I(t??""),T(!!t&&!u)},[u,t]),c.useEffect(()=>{try{sessionStorage.setItem(rs,g)}catch{}},[g]),c.useEffect(()=>{let a=!1;return(async()=>{try{const n=new URLSearchParams({limit:String(bs)});(u||t)&&n.set("transcripts","true");const h=await Q(`/api/tail/recent?${n.toString()}`);a||f(h.events??[])}catch{}})(),()=>{a=!0}},[u,t]),c.useEffect(()=>{if(!u)return ss(k?Ms(k):null),()=>ss(null)},[u,k]);const K=c.useCallback(async()=>{try{const a=await Q("/api/tail/discover");os(a)}catch{}},[]);c.useEffect(()=>{K();const a=setInterval(()=>{K()},ks);return()=>clearInterval(a)},[K]);const L=c.useMemo(()=>p.map(a=>({event:a,severity:ns(a)})),[p]),V=c.useMemo(()=>{let a=0,n=0;for(const h of L)h.severity==="error"&&n++,h.severity==="warn"&&a++;return{warn:a,error:n,total:a+n}},[L]),G=c.useMemo(()=>L.filter(({event:a,severity:n})=>d&&!Cs(n,j)?!1:_s(a,y,n,i)),[L,y,i,j,d]),S=c.useMemo(()=>{const a=G.filter(({event:n})=>g==="all"||!fs(n));return js(a.map(n=>({event:n.event,meta:n.severity})))},[g,G]);c.useLayoutEffect(()=>{const a=C.current;if(a){if(x){z(n=>n+1);return}a.scrollTop=a.scrollHeight}},[S,x]);const ds=c.useCallback(()=>{const a=C.current;if(!a)return;const h=a.scrollHeight-a.scrollTop-a.clientHeight<24;cs.current=h,h?(B(!1),z(0)):x||B(!0)},[x]),W=c.useCallback(a=>{I(a),T(!0),requestAnimationFrame(()=>N.current?.focus())},[]),q=c.useCallback(a=>{!a||!s||ys(s,{view:"sessions",sessionId:a},{returnTo:m})},[s,m]),_=c.useCallback(()=>{const a=C.current;a&&(a.scrollTop=a.scrollHeight,B(!1),z(0))},[]);c.useEffect(()=>{if(u)return;const a=n=>{const h=n.target,D=h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||(h?.isContentEditable??!1);if(n.key==="/"&&!D){n.preventDefault(),T(!0),requestAnimationFrame(()=>N.current?.focus());return}if(n.key==="Escape"&&O&&document.activeElement===N.current){n.preventDefault(),T(!1),N.current?.blur(),I("");return}(n.key==="g"||n.key==="G")&&!D&&(n.preventDefault(),_())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[u,O,_]);const R=b?.totals?.transcripts??b?.transcripts?.length??0,X=c.useMemo(()=>ws(b,p),[b,p]);return e.jsxs("div",{className:`s-tail s-tail--${o}`,children:[e.jsxs("div",{className:`s-tail-status${d?" s-tail-status--issues":""}`,children:[e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--metrics",children:[e.jsx("span",{className:`s-tail-live-dot${x?" s-tail-live-dot--paused":""}`,"aria-hidden":"true"}),e.jsx("span",{className:`s-tail-status-state${x?" s-tail-status-state--paused":""}`,children:x?"paused":"live"})]}),!d&&e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--display",children:[e.jsx("span",{className:"s-tail-status-key",children:"view"}),e.jsxs("span",{className:"s-tail-issue-filter",role:"group","aria-label":"Tail display mode",children:[e.jsx("button",{type:"button",className:`s-tail-issue-filter-btn${g==="work"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>U("work"),"aria-pressed":g==="work",children:"work"}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${g==="all"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>U("all"),"aria-pressed":g==="all",children:["all:",G.length]})]})]}),d&&e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--issues",children:[e.jsx("span",{className:"s-tail-status-key",children:"flt"}),e.jsxs("span",{className:"s-tail-issue-filter",role:"group","aria-label":"Alert severity filter",children:[e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="errors-only"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("errors-only"),"aria-pressed":j==="errors-only",children:["err:",V.error]}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="warn-plus"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("warn-plus"),"aria-pressed":j==="warn-plus",children:["wrn+:",V.total]}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="all"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("all"),"aria-pressed":j==="all",children:["all:",p.length]})]})]}),e.jsx("span",{className:"s-tail-status-spacer"}),e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--harnesses",children:[e.jsx("span",{className:"s-tail-status-key",children:"src"}),e.jsx("span",{className:"s-tail-status-inline",children:X.length>0?X.slice(0,4).map(a=>e.jsxs("span",{className:"s-tail-status-src",children:[e.jsx(A,{harness:a.source,size:10,title:null}),e.jsxs("span",{children:[$(a.source),":",a.count]})]},a.source)):e.jsx("span",{className:"s-tail-status-src",children:"—"})})]}),y&&u&&e.jsxs("span",{className:"s-tail-status-filter",title:y,children:["q=",l??"filtered"]})]}),O&&e.jsxs("div",{className:"s-tail-filter",children:[e.jsx("span",{className:"s-tail-filter-prompt",children:"/"}),e.jsx("input",{ref:N,className:"s-tail-filter-input",value:y,placeholder:"substring across summary · project · session",onChange:a=>I(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),N.current?.blur())},autoFocus:!0,spellCheck:!1}),e.jsx("span",{className:"s-tail-filter-hint",children:"esc to clear"})]}),e.jsxs("div",{className:"s-tail-body",ref:C,onScroll:ds,children:[S.length===0?e.jsxs("div",{className:"s-tail-empty",children:[e.jsxs("span",{className:"s-tail-empty-title",children:[d?"No alert events":"Waiting for events",e.jsx("span",{className:"s-tail-empty-cursor","aria-hidden":"true"})]}),e.jsx("span",{className:"s-tail-empty-body",children:y?u?e.jsxs(e.Fragment,{children:["no events match ",e.jsx("strong",{children:l??"this work filter"})]}):e.jsxs(e.Fragment,{children:["no events match filter ",e.jsx("strong",{children:y})]}):d?e.jsxs(e.Fragment,{children:["no ",Ls(j)," in the buffered session tail"]}):R?e.jsxs(e.Fragment,{children:["watching ",R," transcript",R===1?"":"s"," · no events yet"]}):e.jsx(e.Fragment,{children:"agent tool calls, messages, and system events stream here"})}),!R&&!y&&e.jsxs("span",{className:"s-tail-empty-hint",children:["Start a session to see traffic",e.jsx("span",{className:"s-tail-empty-hint-sep",children:" · "}),e.jsx("code",{children:"scout watch --tail"})]})]}):S.map(({event:a,repeatCount:n,meta:h},D)=>e.jsx(As,{event:a,repeatCount:n,issueSeverity:h,selected:k===a,onSelect:J,onProjectClick:W,onSessionClick:q},$s(a,D,n))),x&&w>0&&e.jsxs("div",{className:"s-tail-divider",onClick:_,onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),_())},role:"button",tabIndex:0,"aria-label":`Resume live tail · ${w} new`,children:["── paused · ",w," new · click or press G to jump back to live ──"]})]}),u?e.jsxs("div",{className:"s-tail-keys s-tail-keys--embedded",children:[e.jsxs("span",{children:[S.length," / ",p.length," lines buffered"]}),x&&w>0&&e.jsxs("span",{children:[w," new"]})]}):e.jsxs("div",{className:"s-tail-keys",children:[e.jsxs("span",{children:[e.jsx("kbd",{children:"j"}),e.jsx("kbd",{children:"k"})," scroll"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"/"})," filter"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"G"})," live"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"esc"})," clr"]}),e.jsx("span",{className:"s-tail-keys-spacer"}),e.jsxs("span",{children:[S.length,"/",p.length," buf"]})]}),u&&k&&e.jsx(Ps,{event:k,onClose:()=>J(null),onProjectClick:W,onSessionClick:q})]})}function As({event:s,repeatCount:t=1,issueSeverity:r,selected:o,onSelect:l,onProjectClick:i,onSessionClick:m}){const d=E[s.harness],u=$(s.source),p=r?` s-tail-row--issue s-tail-row--issue-${r}`:"";return e.jsxs("div",{className:`s-tail-row s-tail-row--${s.kind}${p}${o?" s-tail-row--selected":""}`,role:"button",tabIndex:0,onClick:()=>l(s),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),l(s))},children:[e.jsx("span",{className:"s-tail-cell-time",children:Ss(s.ts)}),e.jsxs("span",{className:"s-tail-token s-tail-token--harness",title:`source: ${u}`,children:[e.jsx(A,{harness:s.source,size:11,title:null}),e.jsx("span",{className:"s-tail-harness-label",children:u})]}),e.jsx("span",{className:"s-tail-token s-tail-token--origin",title:`origin: ${d}`,children:ls[s.harness]}),e.jsxs("span",{className:"s-tail-cell-context",children:[e.jsx(F,{className:"s-tail-link s-tail-link--project",onClick:i?()=>i(s.project):void 0,title:`Filter to ${s.project}`,children:s.project}),e.jsx("span",{className:"s-tail-sep",children:"/"}),e.jsx(F,{className:"s-tail-link s-tail-link--session",onClick:m&&s.sessionId?()=>m(s.sessionId):void 0,title:s.sessionId?`Open session ${s.sessionId}`:void 0,children:es(s.sessionId)}),e.jsx("span",{className:"s-tail-sep",children:":"}),e.jsx("span",{className:"s-tail-cell-pid",title:s.pid>0?`pid ${s.pid}`:"file-backed log",children:s.pid>0?s.pid:"log"})]}),e.jsxs("span",{className:"s-tail-kind",title:s.kind,children:[e.jsx("span",{className:`s-tail-glyph s-tail-glyph--${s.kind}`,children:ts[s.kind]}),e.jsx("span",{className:"s-tail-kind-label",children:as[s.kind]})]}),e.jsxs("span",{className:"s-tail-summary",children:[r==="error"?"✕ ":r==="warn"?"△ ":null,s.summary,t>1?e.jsxs("span",{className:"s-tail-repeat",title:`${t} identical events collapsed`,children:[" ","×",t]}):null]})]})}function F({className:s,onClick:t,title:r,children:o}){return t?e.jsx("span",{className:`${s} s-tail-link--active`,role:"link",tabIndex:0,title:r,onClick:l=>{l.stopPropagation(),t()},onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),l.stopPropagation(),t())},children:o}):e.jsx("span",{className:s,title:r,children:o})}function P(s){const t=hs(s);if(t===null)return"—";const r=new Date(t),o=r.getFullYear(),l=String(r.getMonth()+1).padStart(2,"0"),i=String(r.getDate()).padStart(2,"0"),m=String(r.getHours()).padStart(2,"0"),d=String(r.getMinutes()).padStart(2,"0"),u=String(r.getSeconds()).padStart(2,"0"),p=String(r.getMilliseconds()).padStart(3,"0");return`${o}-${l}-${i} ${m}:${d}:${u}.${p}`}function M(s){return(JSON.stringify(s,null,2)??"undefined").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/("(?:\\.|[^"\\])*"\s*:)|("(?:\\.|[^"\\])*")|\b(true|false|null)\b|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g,(o,l,i,m,d)=>l?`<span class="s-tail-jk">${l}</span>`:i?`<span class="s-tail-js">${i}</span>`:m?`<span class="s-tail-jl">${m}</span>`:d?`<span class="s-tail-jn">${d}</span>`:o)}function Fs(s){if(!s||typeof s!="object")return null;const t=s,o=t.message?.content??t.content;return Array.isArray(o)?o:typeof o=="string"?[{type:"text",text:o}]:null}function Ps({event:s,onClose:t,onProjectClick:r,onSessionClick:o}){const[l,i]=c.useState(!0),m=E[s.harness],d=$(s.source),u=ns(s),p=Fs(s.raw);return e.jsxs(ps,{open:!0,onClose:t,side:"right",owner:"openscout.tail",resizable:!0,defaultSize:620,minSize:400,maxSize:960,ariaLabel:"Tail event detail",children:[e.jsxs("div",{className:"s-slide-header s-tail-sheet-header",children:[e.jsx("span",{className:`s-tail-glyph s-tail-glyph--${s.kind}`,children:ts[s.kind]}),e.jsx("span",{className:"s-tail-sheet-kind",children:as[s.kind]}),u&&e.jsx("span",{className:`s-tail-token s-tail-token--issue-${u}`,children:u==="error"?"✕":"△"}),e.jsxs("span",{className:"s-tail-token s-tail-token--harness",children:[e.jsx(A,{harness:s.source,size:12,title:null}),e.jsx("span",{className:"s-tail-harness-label",children:d})]}),e.jsx("span",{className:"s-tail-token s-tail-token--origin",title:`origin: ${m}`,children:ls[s.harness]}),e.jsx("span",{className:"s-slide-spacer"}),e.jsx("span",{className:"s-tail-sheet-time",children:P(s.ts)}),e.jsx("button",{type:"button",className:"s-slide-close",onClick:t,"aria-label":"Close",children:"×"})]}),e.jsxs("div",{className:"s-slide-body s-tail-sheet-body",children:[e.jsx("section",{className:"s-tail-sheet-section",children:e.jsxs("div",{className:"s-tail-sheet-grid",children:[e.jsx("span",{className:"s-tail-sheet-key",children:"project"}),e.jsx("span",{className:"s-tail-sheet-val",children:e.jsx(F,{className:"s-tail-link s-tail-link--project",onClick:r?()=>r(s.project):void 0,title:`Filter to ${s.project}`,children:s.project})}),e.jsx("span",{className:"s-tail-sheet-key",children:"cwd"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:s.cwd||"—"}),e.jsx("span",{className:"s-tail-sheet-key",children:"session"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:e.jsx(F,{className:"s-tail-link s-tail-link--session",onClick:o&&s.sessionId?()=>o(s.sessionId):void 0,title:s.sessionId?`Open session ${s.sessionId}`:void 0,children:s.sessionId||"—"})}),e.jsx("span",{className:"s-tail-sheet-key",children:"harness"}),e.jsxs("span",{className:"s-tail-sheet-val s-tail-sheet-val--harness",children:[e.jsx(A,{harness:s.source,size:13,title:null}),e.jsx("span",{children:d})]}),e.jsx("span",{className:"s-tail-sheet-key",children:"origin"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:m}),e.jsx("span",{className:"s-tail-sheet-key",children:"pid"}),e.jsxs("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:[s.pid,s.parentPid!=null?` ← ${s.parentPid}`:""]})]})}),e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsx("h4",{className:"s-tail-sheet-h",children:"summary"}),e.jsx("div",{className:"s-tail-sheet-summary",children:s.summary})]}),p&&p.length>0&&e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsx("h4",{className:"s-tail-sheet-h",children:"content"}),p.map((f,b)=>e.jsx(Os,{block:f},b))]}),e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsxs("button",{type:"button",className:"s-tail-sheet-toggle",onClick:()=>i(f=>!f),children:[l?"▾":"▸"," raw event"]}),l&&e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(s.raw??s)}})]})]})]})}function Os({block:s}){if(s.type==="text"){const t=s.text??"";return e.jsx("div",{className:"s-tail-sheet-text",children:t})}if(s.type==="tool_use"){const t=s;return e.jsxs("div",{className:"s-tail-sheet-block s-tail-sheet-block--tool",children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--tool",children:"*"}),e.jsx("span",{className:"s-tail-sheet-block-title",children:t.name??"tool_use"})]}),e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(t.input??{})}})]})}if(s.type==="tool_result"){const t=s,r=typeof t.content=="string";return e.jsxs("div",{className:`s-tail-sheet-block s-tail-sheet-block--tool-result${t.is_error?" s-tail-sheet-block--err":""}`,children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--tool-result",children:"="}),e.jsxs("span",{className:"s-tail-sheet-block-title",children:["tool_result",t.is_error?" · error":""]})]}),r?e.jsx("pre",{className:"s-tail-sheet-pre",children:t.content}):e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(t.content??{})}})]})}return e.jsxs("div",{className:"s-tail-sheet-block",children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--other",children:"·"}),e.jsx("span",{className:"s-tail-sheet-block-title",children:s.type})]}),e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(s)}})]})}export{Pe as TailView};