@truefoundry/trueforge 0.179.1 → 0.180.0-rc.1

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 (227) hide show
  1. package/dist/_frontend/assets/{AgentCodeSnippets-GX5MTZLF-D1o4DvyC.js → AgentCodeSnippets-KJETGNKQ-DnLvvpR_.js} +1 -1
  2. package/dist/_frontend/assets/AgentCodeSnippets-KJETGNKQ-DnLvvpR_.js.br +0 -0
  3. package/dist/_frontend/assets/AgentCodeSnippets-KJETGNKQ-DnLvvpR_.js.gz +0 -0
  4. package/dist/_frontend/assets/{AgentMetricChart-MMZYPKVN-8E4ELOjM.js → AgentMetricChart-WVOTRK46-BdnyQ_oy.js} +1 -1
  5. package/dist/_frontend/assets/AgentMetricChart-WVOTRK46-BdnyQ_oy.js.br +0 -0
  6. package/dist/_frontend/assets/AgentMetricChart-WVOTRK46-BdnyQ_oy.js.gz +0 -0
  7. package/dist/_frontend/assets/{AgentOverview-OBBGSUOK-D0-uAThW.js → AgentOverview-JQQP6DDA-CfAWTQzb.js} +1 -1
  8. package/dist/_frontend/assets/AgentOverview-JQQP6DDA-CfAWTQzb.js.br +0 -0
  9. package/dist/_frontend/assets/AgentOverview-JQQP6DDA-CfAWTQzb.js.gz +0 -0
  10. package/dist/_frontend/assets/{AgentSessionEventTimeline-ZBW3AIU2-BjA4oeYw.js → AgentSessionEventTimeline-J3AD4KFZ-rb89dfgl.js} +1 -1
  11. package/dist/_frontend/assets/AgentSessionEventTimeline-J3AD4KFZ-rb89dfgl.js.br +0 -0
  12. package/dist/_frontend/assets/AgentSessionEventTimeline-J3AD4KFZ-rb89dfgl.js.gz +0 -0
  13. package/dist/_frontend/assets/{AgentSessionEventTimelineChart-VQNS2G4D-o3La8fse.js → AgentSessionEventTimelineChart-KQE3BNJP-DhfBHfpK.js} +1 -1
  14. package/dist/_frontend/assets/AgentSessionEventTimelineChart-KQE3BNJP-DhfBHfpK.js.br +0 -0
  15. package/dist/_frontend/assets/AgentSessionEventTimelineChart-KQE3BNJP-DhfBHfpK.js.gz +0 -0
  16. package/dist/_frontend/assets/AgentSessions-SD3U74MM-C7AvihJc.js +1 -0
  17. package/dist/_frontend/assets/AgentSessions-SD3U74MM-C7AvihJc.js.br +0 -0
  18. package/dist/_frontend/assets/AgentSessions-SD3U74MM-C7AvihJc.js.gz +0 -0
  19. package/dist/_frontend/assets/{ConnectorSettings-XXE32AUQ-Bi01homi.js → ConnectorSettings-73EOLURL-D0T099Hf.js} +1 -1
  20. package/dist/_frontend/assets/ConnectorSettings-73EOLURL-D0T099Hf.js.br +0 -0
  21. package/dist/_frontend/assets/ConnectorSettings-73EOLURL-D0T099Hf.js.gz +0 -0
  22. package/dist/_frontend/assets/{DockLayout-YSSOMIEK-S7QeeWVV.js → DockLayout-FPKAUN4P-CtsN7Dlz.js} +1 -1
  23. package/dist/_frontend/assets/DrawerLayout-WP7MROGW-DBvy2qrx.js +2 -0
  24. package/dist/_frontend/assets/DrawerLayout-WP7MROGW-DBvy2qrx.js.br +0 -0
  25. package/dist/_frontend/assets/DrawerLayout-WP7MROGW-DBvy2qrx.js.gz +0 -0
  26. package/dist/_frontend/assets/{EnvironmentsPage-OXKHJMOO-C-t7Dp_i.js → EnvironmentsPage-FCDIVAKH-Crq_Zjm_.js} +2 -2
  27. package/dist/_frontend/assets/EnvironmentsPage-FCDIVAKH-Crq_Zjm_.js.br +0 -0
  28. package/dist/_frontend/assets/EnvironmentsPage-FCDIVAKH-Crq_Zjm_.js.gz +0 -0
  29. package/dist/_frontend/assets/{ModelSettings-J5QDA4OJ-1_KW1bju.js → ModelSettings-O2PPI7KP-B-pD-nIV.js} +1 -1
  30. package/dist/_frontend/assets/ModelSettings-O2PPI7KP-B-pD-nIV.js.br +0 -0
  31. package/dist/_frontend/assets/ModelSettings-O2PPI7KP-B-pD-nIV.js.gz +0 -0
  32. package/dist/_frontend/assets/{SandboxSettings-Y3NPODM5-CD9DUFxP.js → SandboxSettings-RA2QQA2U-BZ1p6y_g.js} +1 -1
  33. package/dist/_frontend/assets/SandboxSettings-RA2QQA2U-BZ1p6y_g.js.br +0 -0
  34. package/dist/_frontend/assets/SandboxSettings-RA2QQA2U-BZ1p6y_g.js.gz +0 -0
  35. package/dist/_frontend/assets/{SchedulesPage-HLHAOIS6-BcDOMjiM.js → SchedulesPage-YFIJGKZO-BbTOcGO5.js} +1 -1
  36. package/dist/_frontend/assets/SchedulesPage-YFIJGKZO-BbTOcGO5.js.br +0 -0
  37. package/dist/_frontend/assets/SchedulesPage-YFIJGKZO-BbTOcGO5.js.gz +0 -0
  38. package/dist/_frontend/assets/{SettingsBuilder-CVPLV5HY-D0lac3y-.js → SettingsBuilder-MZNSGTCG-DW5WrGhz.js} +2 -2
  39. package/dist/_frontend/assets/SettingsBuilder-MZNSGTCG-DW5WrGhz.js.br +0 -0
  40. package/dist/_frontend/assets/SettingsBuilder-MZNSGTCG-DW5WrGhz.js.gz +0 -0
  41. package/dist/_frontend/assets/ShellRouteSync-VORG6HSK-DlG8FUO5.js +1 -0
  42. package/dist/_frontend/assets/ShellRouteSync-VORG6HSK-DlG8FUO5.js.br +0 -0
  43. package/dist/_frontend/assets/ShellRouteSync-VORG6HSK-DlG8FUO5.js.gz +0 -0
  44. package/dist/_frontend/assets/SidebarLayout-2ZSKQ46M-DO6rRES5.js +2 -0
  45. package/dist/_frontend/assets/SidebarLayout-2ZSKQ46M-DO6rRES5.js.br +0 -0
  46. package/dist/_frontend/assets/SidebarLayout-2ZSKQ46M-DO6rRES5.js.gz +0 -0
  47. package/dist/_frontend/assets/{SkillSettings-6I63TUL7-D4s5Ticy.js → SkillSettings-EE4BYHMX-DhNcJrAy.js} +1 -1
  48. package/dist/_frontend/assets/SkillSettings-EE4BYHMX-DhNcJrAy.js.br +0 -0
  49. package/dist/_frontend/assets/SkillSettings-EE4BYHMX-DhNcJrAy.js.gz +0 -0
  50. package/dist/_frontend/assets/{TrueForgeUIWithRouter-SZT3KVCD-BMJaD7KT.js → TrueForgeUIWithRouter-IF7PNLNK-C3mp2pw1.js} +1 -1
  51. package/dist/_frontend/assets/{WebSearchSettings-SUBJH2C5-DL7KJKp-.js → WebSearchSettings-6L5OSPPU-CKnmuR-J.js} +1 -1
  52. package/dist/_frontend/assets/WebSearchSettings-6L5OSPPU-CKnmuR-J.js.br +0 -0
  53. package/dist/_frontend/assets/WebSearchSettings-6L5OSPPU-CKnmuR-J.js.gz +0 -0
  54. package/dist/_frontend/assets/{WidgetLayout-Q3F3UWN3-BQaDzdhk.js → WidgetLayout-IBJNY7CF-D3Hdd9b-.js} +1 -1
  55. package/dist/_frontend/assets/WidgetLayout-IBJNY7CF-D3Hdd9b-.js.br +0 -0
  56. package/dist/_frontend/assets/WidgetLayout-IBJNY7CF-D3Hdd9b-.js.gz +0 -0
  57. package/dist/_frontend/assets/{chunk-GSAVSNGR-BJhfT2HB.js → chunk-2UUABLZI-Dls_33ja.js} +1 -1
  58. package/dist/_frontend/assets/chunk-KIRLJDZF-D5aQQ46r.js +2 -0
  59. package/dist/_frontend/assets/chunk-KIRLJDZF-D5aQQ46r.js.br +0 -0
  60. package/dist/_frontend/assets/chunk-KIRLJDZF-D5aQQ46r.js.gz +0 -0
  61. package/dist/_frontend/assets/chunk-MTB32EHM-CWUHnCTs.js +1 -0
  62. package/dist/_frontend/assets/chunk-MTB32EHM-CWUHnCTs.js.br +0 -0
  63. package/dist/_frontend/assets/chunk-MTB32EHM-CWUHnCTs.js.gz +0 -0
  64. package/dist/_frontend/assets/{chunk-OB3PAWPO-WTBtRmxH.js → chunk-OB3PAWPO-dRLyZPUL.js} +1 -1
  65. package/dist/_frontend/assets/chunk-OB3PAWPO-dRLyZPUL.js.br +0 -0
  66. package/dist/_frontend/assets/chunk-OB3PAWPO-dRLyZPUL.js.gz +0 -0
  67. package/dist/_frontend/assets/{chunk-ICZTJLTU-CSBYGLaq.js → chunk-WG6NEBF3-D6-L7Ege.js} +1 -1
  68. package/dist/_frontend/assets/chunk-WG6NEBF3-D6-L7Ege.js.br +0 -0
  69. package/dist/_frontend/assets/chunk-WG6NEBF3-D6-L7Ege.js.gz +0 -0
  70. package/dist/_frontend/assets/{cssMode-BnrOGoXe.js → cssMode-B1pKERIR.js} +1 -1
  71. package/dist/_frontend/assets/cssMode-B1pKERIR.js.br +0 -0
  72. package/dist/_frontend/assets/cssMode-B1pKERIR.js.gz +0 -0
  73. package/dist/_frontend/assets/{freemarker2-Cu2qkLE9.js → freemarker2-D558YrVo.js} +1 -1
  74. package/dist/_frontend/assets/freemarker2-D558YrVo.js.br +0 -0
  75. package/dist/_frontend/assets/freemarker2-D558YrVo.js.gz +0 -0
  76. package/dist/_frontend/assets/{handlebars-qoIGMfY0.js → handlebars-DjToD8O0.js} +1 -1
  77. package/dist/_frontend/assets/handlebars-DjToD8O0.js.br +0 -0
  78. package/dist/_frontend/assets/handlebars-DjToD8O0.js.gz +0 -0
  79. package/dist/_frontend/assets/{html-jIKazNfg.js → html-Bj1OwSpp.js} +1 -1
  80. package/dist/_frontend/assets/html-Bj1OwSpp.js.br +0 -0
  81. package/dist/_frontend/assets/html-Bj1OwSpp.js.gz +0 -0
  82. package/dist/_frontend/assets/{htmlMode-M1ZSzZKt.js → htmlMode-1Un8e6H0.js} +1 -1
  83. package/dist/_frontend/assets/htmlMode-1Un8e6H0.js.br +0 -0
  84. package/dist/_frontend/assets/htmlMode-1Un8e6H0.js.gz +0 -0
  85. package/dist/_frontend/assets/{index-4r7-LeFK.js → index-BvbVkgsP.js} +1 -1
  86. package/dist/_frontend/assets/index-BvbVkgsP.js.br +0 -0
  87. package/dist/_frontend/assets/index-BvbVkgsP.js.gz +0 -0
  88. package/dist/_frontend/assets/{index-BJsGMvc-.js → index-Cq_o2Abd.js} +244 -244
  89. package/dist/_frontend/assets/index-Cq_o2Abd.js.br +0 -0
  90. package/dist/_frontend/assets/index-Cq_o2Abd.js.gz +0 -0
  91. package/dist/_frontend/assets/{index-YbpMGQU0.js → index-skbT0X6M.js} +3 -3
  92. package/dist/_frontend/assets/index-skbT0X6M.js.br +0 -0
  93. package/dist/_frontend/assets/index-skbT0X6M.js.gz +0 -0
  94. package/dist/_frontend/assets/{javascript-X_qdyURb.js → javascript-C0aMIA2x.js} +1 -1
  95. package/dist/_frontend/assets/{jsonMode-CT04G6VA.js → jsonMode-BGQys1IY.js} +1 -1
  96. package/dist/_frontend/assets/jsonMode-BGQys1IY.js.br +0 -0
  97. package/dist/_frontend/assets/jsonMode-BGQys1IY.js.gz +0 -0
  98. package/dist/_frontend/assets/{liquid-B2a653EE.js → liquid-BJfOa52w.js} +1 -1
  99. package/dist/_frontend/assets/liquid-BJfOa52w.js.br +0 -0
  100. package/dist/_frontend/assets/liquid-BJfOa52w.js.gz +0 -0
  101. package/dist/_frontend/assets/{lspLanguageFeatures-mffTaZGc.js → lspLanguageFeatures-BPXxuQUC.js} +1 -1
  102. package/dist/_frontend/assets/lspLanguageFeatures-BPXxuQUC.js.br +0 -0
  103. package/dist/_frontend/assets/lspLanguageFeatures-BPXxuQUC.js.gz +0 -0
  104. package/dist/_frontend/assets/{mdx-DN_e2xx5.js → mdx-DEftgzGF.js} +1 -1
  105. package/dist/_frontend/assets/mdx-DEftgzGF.js.br +0 -0
  106. package/dist/_frontend/assets/mdx-DEftgzGF.js.gz +0 -0
  107. package/dist/_frontend/assets/{python-CMZDwpP1.js → python-B9hN9eL0.js} +1 -1
  108. package/dist/_frontend/assets/python-B9hN9eL0.js.br +0 -0
  109. package/dist/_frontend/assets/python-B9hN9eL0.js.gz +0 -0
  110. package/dist/_frontend/assets/{razor-CJvSmNFI.js → razor-B_YBri1R.js} +1 -1
  111. package/dist/_frontend/assets/razor-B_YBri1R.js.br +0 -0
  112. package/dist/_frontend/assets/razor-B_YBri1R.js.gz +0 -0
  113. package/dist/_frontend/assets/{tsMode-ZJxciJ2G.js → tsMode-DmXjhObM.js} +1 -1
  114. package/dist/_frontend/assets/tsMode-DmXjhObM.js.br +0 -0
  115. package/dist/_frontend/assets/tsMode-DmXjhObM.js.gz +0 -0
  116. package/dist/_frontend/assets/{typescript-DS4oUy9B.js → typescript-CzGhzNVJ.js} +1 -1
  117. package/dist/_frontend/assets/typescript-CzGhzNVJ.js.br +0 -0
  118. package/dist/_frontend/assets/typescript-CzGhzNVJ.js.gz +0 -0
  119. package/dist/_frontend/assets/{workers-DPKHJxKo.js → workers-CKeuqANe.js} +1 -1
  120. package/dist/_frontend/assets/workers-CKeuqANe.js.br +0 -0
  121. package/dist/_frontend/assets/workers-CKeuqANe.js.gz +0 -0
  122. package/dist/_frontend/assets/{xml-BJmCYv7o.js → xml-BejVXqNL.js} +1 -1
  123. package/dist/_frontend/assets/xml-BejVXqNL.js.br +0 -0
  124. package/dist/_frontend/assets/xml-BejVXqNL.js.gz +0 -0
  125. package/dist/_frontend/assets/{yaml-DzYUCVsV.js → yaml-DThQJB0u.js} +1 -1
  126. package/dist/_frontend/assets/yaml-DThQJB0u.js.br +0 -0
  127. package/dist/_frontend/assets/yaml-DThQJB0u.js.gz +0 -0
  128. package/dist/_frontend/index.html +1 -1
  129. package/dist/cli.js.map +1 -1
  130. package/dist/controller-main.js +27 -5
  131. package/dist/controller-main.js.map +1 -1
  132. package/dist/main.js +442 -259
  133. package/dist/main.js.map +1 -1
  134. package/dist/postgres/migrations/20261009_000001_model_message_model_backfill.js +94 -0
  135. package/dist/postgres/migrations/20261009_000001_model_message_model_backfill.js.map +1 -0
  136. package/dist/sqlite/migrations/20261009_000001_model_message_model_backfill.js +91 -0
  137. package/dist/sqlite/migrations/20261009_000001_model_message_model_backfill.js.map +1 -0
  138. package/package.json +5 -3
  139. package/dist/_frontend/assets/AgentCodeSnippets-GX5MTZLF-D1o4DvyC.js.br +0 -0
  140. package/dist/_frontend/assets/AgentCodeSnippets-GX5MTZLF-D1o4DvyC.js.gz +0 -0
  141. package/dist/_frontend/assets/AgentMetricChart-MMZYPKVN-8E4ELOjM.js.br +0 -0
  142. package/dist/_frontend/assets/AgentMetricChart-MMZYPKVN-8E4ELOjM.js.gz +0 -0
  143. package/dist/_frontend/assets/AgentOverview-OBBGSUOK-D0-uAThW.js.br +0 -0
  144. package/dist/_frontend/assets/AgentOverview-OBBGSUOK-D0-uAThW.js.gz +0 -0
  145. package/dist/_frontend/assets/AgentSessionEventTimeline-ZBW3AIU2-BjA4oeYw.js.br +0 -0
  146. package/dist/_frontend/assets/AgentSessionEventTimeline-ZBW3AIU2-BjA4oeYw.js.gz +0 -0
  147. package/dist/_frontend/assets/AgentSessionEventTimelineChart-VQNS2G4D-o3La8fse.js.br +0 -0
  148. package/dist/_frontend/assets/AgentSessionEventTimelineChart-VQNS2G4D-o3La8fse.js.gz +0 -0
  149. package/dist/_frontend/assets/AgentSessions-OB32CD3H-BvEB36Q4.js +0 -1
  150. package/dist/_frontend/assets/AgentSessions-OB32CD3H-BvEB36Q4.js.br +0 -0
  151. package/dist/_frontend/assets/AgentSessions-OB32CD3H-BvEB36Q4.js.gz +0 -0
  152. package/dist/_frontend/assets/ConnectorSettings-XXE32AUQ-Bi01homi.js.br +0 -0
  153. package/dist/_frontend/assets/ConnectorSettings-XXE32AUQ-Bi01homi.js.gz +0 -0
  154. package/dist/_frontend/assets/DrawerLayout-T6U5AGG7-BQoBVjqu.js +0 -2
  155. package/dist/_frontend/assets/DrawerLayout-T6U5AGG7-BQoBVjqu.js.br +0 -0
  156. package/dist/_frontend/assets/DrawerLayout-T6U5AGG7-BQoBVjqu.js.gz +0 -0
  157. package/dist/_frontend/assets/EnvironmentsPage-OXKHJMOO-C-t7Dp_i.js.br +0 -0
  158. package/dist/_frontend/assets/EnvironmentsPage-OXKHJMOO-C-t7Dp_i.js.gz +0 -0
  159. package/dist/_frontend/assets/ModelSettings-J5QDA4OJ-1_KW1bju.js.br +0 -0
  160. package/dist/_frontend/assets/ModelSettings-J5QDA4OJ-1_KW1bju.js.gz +0 -0
  161. package/dist/_frontend/assets/SandboxSettings-Y3NPODM5-CD9DUFxP.js.br +0 -0
  162. package/dist/_frontend/assets/SandboxSettings-Y3NPODM5-CD9DUFxP.js.gz +0 -0
  163. package/dist/_frontend/assets/SchedulesPage-HLHAOIS6-BcDOMjiM.js.br +0 -0
  164. package/dist/_frontend/assets/SchedulesPage-HLHAOIS6-BcDOMjiM.js.gz +0 -0
  165. package/dist/_frontend/assets/SettingsBuilder-CVPLV5HY-D0lac3y-.js.br +0 -0
  166. package/dist/_frontend/assets/SettingsBuilder-CVPLV5HY-D0lac3y-.js.gz +0 -0
  167. package/dist/_frontend/assets/ShellRouteSync-XIPKA3OH-ByKCgD91.js +0 -1
  168. package/dist/_frontend/assets/ShellRouteSync-XIPKA3OH-ByKCgD91.js.br +0 -0
  169. package/dist/_frontend/assets/ShellRouteSync-XIPKA3OH-ByKCgD91.js.gz +0 -0
  170. package/dist/_frontend/assets/SidebarLayout-LHIKWYLB-DgTk6yLL.js +0 -2
  171. package/dist/_frontend/assets/SidebarLayout-LHIKWYLB-DgTk6yLL.js.br +0 -0
  172. package/dist/_frontend/assets/SidebarLayout-LHIKWYLB-DgTk6yLL.js.gz +0 -0
  173. package/dist/_frontend/assets/SkillSettings-6I63TUL7-D4s5Ticy.js.br +0 -0
  174. package/dist/_frontend/assets/SkillSettings-6I63TUL7-D4s5Ticy.js.gz +0 -0
  175. package/dist/_frontend/assets/WebSearchSettings-SUBJH2C5-DL7KJKp-.js.br +0 -0
  176. package/dist/_frontend/assets/WebSearchSettings-SUBJH2C5-DL7KJKp-.js.gz +0 -0
  177. package/dist/_frontend/assets/WidgetLayout-Q3F3UWN3-BQaDzdhk.js.br +0 -0
  178. package/dist/_frontend/assets/WidgetLayout-Q3F3UWN3-BQaDzdhk.js.gz +0 -0
  179. package/dist/_frontend/assets/chunk-BZ2EOR5X-BgN-bqzz.js +0 -1
  180. package/dist/_frontend/assets/chunk-ICZTJLTU-CSBYGLaq.js.br +0 -0
  181. package/dist/_frontend/assets/chunk-ICZTJLTU-CSBYGLaq.js.gz +0 -0
  182. package/dist/_frontend/assets/chunk-NYCSPKHJ-BXKEzm55.js +0 -1
  183. package/dist/_frontend/assets/chunk-NYCSPKHJ-BXKEzm55.js.br +0 -0
  184. package/dist/_frontend/assets/chunk-NYCSPKHJ-BXKEzm55.js.gz +0 -0
  185. package/dist/_frontend/assets/chunk-OB3PAWPO-WTBtRmxH.js.br +0 -0
  186. package/dist/_frontend/assets/chunk-OB3PAWPO-WTBtRmxH.js.gz +0 -0
  187. package/dist/_frontend/assets/chunk-OD7JCND5-BlwWGx2k.js +0 -2
  188. package/dist/_frontend/assets/chunk-OD7JCND5-BlwWGx2k.js.br +0 -0
  189. package/dist/_frontend/assets/chunk-OD7JCND5-BlwWGx2k.js.gz +0 -0
  190. package/dist/_frontend/assets/cssMode-BnrOGoXe.js.br +0 -0
  191. package/dist/_frontend/assets/cssMode-BnrOGoXe.js.gz +0 -0
  192. package/dist/_frontend/assets/freemarker2-Cu2qkLE9.js.br +0 -0
  193. package/dist/_frontend/assets/freemarker2-Cu2qkLE9.js.gz +0 -0
  194. package/dist/_frontend/assets/handlebars-qoIGMfY0.js.br +0 -0
  195. package/dist/_frontend/assets/handlebars-qoIGMfY0.js.gz +0 -0
  196. package/dist/_frontend/assets/html-jIKazNfg.js.br +0 -0
  197. package/dist/_frontend/assets/html-jIKazNfg.js.gz +0 -0
  198. package/dist/_frontend/assets/htmlMode-M1ZSzZKt.js.br +0 -0
  199. package/dist/_frontend/assets/htmlMode-M1ZSzZKt.js.gz +0 -0
  200. package/dist/_frontend/assets/index-4r7-LeFK.js.br +0 -0
  201. package/dist/_frontend/assets/index-4r7-LeFK.js.gz +0 -0
  202. package/dist/_frontend/assets/index-BJsGMvc-.js.br +0 -0
  203. package/dist/_frontend/assets/index-BJsGMvc-.js.gz +0 -0
  204. package/dist/_frontend/assets/index-YbpMGQU0.js.br +0 -0
  205. package/dist/_frontend/assets/index-YbpMGQU0.js.gz +0 -0
  206. package/dist/_frontend/assets/jsonMode-CT04G6VA.js.br +0 -0
  207. package/dist/_frontend/assets/jsonMode-CT04G6VA.js.gz +0 -0
  208. package/dist/_frontend/assets/liquid-B2a653EE.js.br +0 -0
  209. package/dist/_frontend/assets/liquid-B2a653EE.js.gz +0 -0
  210. package/dist/_frontend/assets/lspLanguageFeatures-mffTaZGc.js.br +0 -0
  211. package/dist/_frontend/assets/lspLanguageFeatures-mffTaZGc.js.gz +0 -0
  212. package/dist/_frontend/assets/mdx-DN_e2xx5.js.br +0 -0
  213. package/dist/_frontend/assets/mdx-DN_e2xx5.js.gz +0 -0
  214. package/dist/_frontend/assets/python-CMZDwpP1.js.br +0 -0
  215. package/dist/_frontend/assets/python-CMZDwpP1.js.gz +0 -0
  216. package/dist/_frontend/assets/razor-CJvSmNFI.js.br +0 -0
  217. package/dist/_frontend/assets/razor-CJvSmNFI.js.gz +0 -0
  218. package/dist/_frontend/assets/tsMode-ZJxciJ2G.js.br +0 -0
  219. package/dist/_frontend/assets/tsMode-ZJxciJ2G.js.gz +0 -0
  220. package/dist/_frontend/assets/typescript-DS4oUy9B.js.br +0 -0
  221. package/dist/_frontend/assets/typescript-DS4oUy9B.js.gz +0 -0
  222. package/dist/_frontend/assets/workers-DPKHJxKo.js.br +0 -0
  223. package/dist/_frontend/assets/workers-DPKHJxKo.js.gz +0 -0
  224. package/dist/_frontend/assets/xml-BJmCYv7o.js.br +0 -0
  225. package/dist/_frontend/assets/xml-BJmCYv7o.js.gz +0 -0
  226. package/dist/_frontend/assets/yaml-DzYUCVsV.js.br +0 -0
  227. package/dist/_frontend/assets/yaml-DzYUCVsV.js.gz +0 -0
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SettingsBuilder-MZNSGTCG-DW5WrGhz.js","./index-Cq_o2Abd.js","./index-B01pXqvC.css","./SchedulesPage-YFIJGKZO-BbTOcGO5.js","./chunk-WG6NEBF3-D6-L7Ege.js","./EnvironmentsPage-FCDIVAKH-Crq_Zjm_.js"])))=>i.map(i=>d[i]);
2
+ import{c1 as _,c2 as Zt,u as X,j as r,c3 as en,r as m,be as P,c4 as We,c5 as tn,c6 as Xe,c7 as Ye,c8 as qe,c9 as Je,ca as Qe,cb as Q,cc as nn,cd as R,ce as rn,cf as sn,cg as on,ch as an,ci as cn,cj as ln,ck as un,cl as dn,cm as Ie,cn as mn,co as fn,cp as me,cq as pn,cr as hn,cs as xn,ct as Ze,cu as ke,cv as fe,cw as je,cx as ae,cy as Me,cz as Se,cA as Ce,cB as Be,k as et,V as tt,b as ne,d as C,W as gn,cC as vn,g as K,U as bn,cD as wn,al as le,bL as ue,cE as Fe,cF as yn,c as Le,b3 as nt,cG as In,$ as jn,ak as Ke,I as V,y as Mn,f as te,cH as rt,cI as Sn,cJ as Cn,cK as $e,b7 as Ln,as as Tn,a2 as ze,s as st,cL as Nn,P as Rn,cM as Pn,S as ge,D as En,cN as ot,cO as at,bq as Dn,_ as Te,cP as An,bU as _n}from"./index-Cq_o2Abd.js";import{A as On,N as kn,T as Bn,S as it}from"./chunk-MTB32EHM-CWUHnCTs.js";const Ne=n=>{const e=_(8),{index:t,archived:s,children:a}=n;let i;e[0]!==s||e[1]!==t?(i=Zt({source:"threads",query:{type:"index",index:t,archived:s},get:u=>u.threads().item({index:t,archived:s})}),e[0]=s,e[1]=t,e[2]=i):i=e[2];let o;e[3]!==i?(o={threadListItem:i},e[3]=i,e[4]=o):o=e[4];const l=X(o);let d;return e[5]!==l||e[6]!==a?(d=r.jsx(en,{value:l,children:a}),e[5]=l,e[6]=a,e[7]=d):d=e[7],d},ct=m.memo(n=>{const e=_(6),{index:t,archived:s,components:a}=n,i=s===void 0?!1:s,o=a.ThreadListItem;let l;e[0]!==o?(l=r.jsx(o,{}),e[0]=o,e[1]=l):l=e[1];let d;return e[2]!==i||e[3]!==t||e[4]!==l?(d=r.jsx(Ne,{index:t,archived:i,children:l}),e[2]=i,e[3]=t,e[4]=l,e[5]=d):d=e[5],d},(n,e)=>n.index===e.index&&n.archived===e.archived&&n.components.ThreadListItem===e.components.ThreadListItem);ct.displayName="ThreadListPrimitive.ItemByIndex";const Ge=({archived:n,children:e})=>{const t=P(s=>n?s.threads.archivedThreadIds.length:s.threads.threadIds.length);return We(()=>Array.from({length:t},(s,a)=>r.jsx(Ne,{index:a,archived:n,children:r.jsx(tn,{getItemState:i=>i.threads().item({index:a,archived:n}).getState(),children:i=>e({get threadListItem(){return i()}})})},a)),[t,n,e])},lt=n=>{const e=_(8),{archived:t,components:s,children:a}=n,i=t===void 0?!1:t;if(s){const l=s.ThreadListItem;let d;e[0]!==l?(d=()=>r.jsx(l,{}),e[0]=l,e[1]=d):d=e[1];let u;return e[2]!==i||e[3]!==d?(u=r.jsx(Ge,{archived:i,children:d}),e[2]=i,e[3]=d,e[4]=u):u=e[4],u}let o;return e[5]!==i||e[6]!==a?(o=r.jsx(Ge,{archived:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o};lt.displayName="ThreadListPrimitive.Items";const ut=n=>{const e=_(2),{fallback:t}=n,s=P(Fn)||t;let a;return e[0]!==s?(a=r.jsx(r.Fragment,{children:s}),e[0]=s,e[1]=a):a=e[1],a};ut.displayName="ThreadListItemPrimitive.Title";function Fn(n){return n.threadListItem.title}const Kn=()=>{const n=_(4),e=X();let t;n[0]!==e?(t=()=>{e.threadListItem().archive()},n[0]=e,n[1]=t):t=n[1];const s=t;let a;return n[2]!==s?(a={archive:s},n[2]=s,n[3]=a):a=n[3],a},$n=()=>{const n=_(4),e=X();let t;n[0]!==e?(t=()=>{e.threadListItem().delete()},n[0]=e,n[1]=t):t=n[1];const s=t;let a;return n[2]!==s?(a={delete:s},n[2]=s,n[3]=a):a=n[3],a},zn=()=>{const n=_(4),e=X();let t;n[0]!==e?(t=()=>{e.threadListItem().unarchive()},n[0]=e,n[1]=t):t=n[1];const s=t;let a;return n[2]!==s?(a={unarchive:s},n[2]=s,n[3]=a):a=n[3],a},Gn=()=>{const n=_(4),e=X();let t;n[0]!==e?(t=()=>{e.threadListItem().switchTo()},n[0]=e,n[1]=t):t=n[1];const s=t;let a;return n[2]!==s?(a={switchTo:s},n[2]=s,n[3]=a):a=n[3],a},Hn=()=>{const n=_(4),e=X();let t;n[0]!==e?(t=()=>{e.threads().switchToNewThread()},n[0]=e,n[1]=t):t=n[1];const s=t;let a;return n[2]!==s?(a={switchToNewThread:s},n[2]=s,n[3]=a):a=n[3],a},Un=()=>{const n=_(5),e=X(),t=P(Vn);let s;n[0]!==e?(s=()=>{e.threads().loadMore()},n[0]=e,n[1]=s):s=n[1];const a=s;let i;return n[2]!==t||n[3]!==a?(i={loadMore:a,disabled:t},n[2]=t,n[3]=a,n[4]=i):i=n[4],i};function Vn(n){return!n.threads.hasMore||n.threads.isLoading||n.threads.isLoadingMore}var Wn=Object.defineProperty,L=(n,e)=>Wn(n,"name",{value:e,configurable:!0}),Xn=["Enter"," "],Yn=["ArrowDown","PageUp","Home"],dt=["ArrowUp","PageDown","End"],qn=[...Yn,...dt],pe="Menu",[be,Jn,Qn]=Je(pe),[Z,mt]=Xe(pe,[Qn,Ye,qe]),Re=Ye(),ft=qe(),[Zn,ie]=Z(pe),[er,Pe]=Z(pe),tr=L(n=>{const{__scopeMenu:e,open:t=!1,children:s,dir:a,onOpenChange:i,modal:o=!0}=n,l=Re(e),[d,u]=m.useState(null),c=m.useRef(!1),f=fn(i),h=me(a);return m.useEffect(()=>{const p=L(()=>{c.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},"handleKeyDown"),v=L(()=>c.current=!1,"handlePointer");return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),m.useEffect(()=>{if(!t)return;const p=L(()=>f(!1),"handleBlur");return window.addEventListener("blur",p),()=>window.removeEventListener("blur",p)},[t,f]),r.jsx(pn,{...l,children:r.jsx(Zn,{scope:e,open:t,onOpenChange:f,content:d,onContentChange:u,children:r.jsx(er,{scope:e,onClose:m.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:c,dir:h,modal:o,children:s})})})},"Menu"),nr=m.forwardRef(L(function(e,t){const{__scopeMenu:s,...a}=e,i=Re(s);return r.jsx(hn,{...i,...a,ref:t})},"MenuAnchor")),pt="MenuPortal",[rr,sr]=Z(pt,{forceMount:void 0}),or=L(n=>{const{__scopeMenu:e,forceMount:t,children:s,container:a}=n,i=ie(pt,e);return r.jsx(rr,{scope:e,forceMount:t,children:r.jsx(Qe,{present:t||i.open,children:r.jsx(xn,{asChild:!0,container:a,children:s})})})},"MenuPortal"),J="MenuContent",[ar,ht]=Z(J),ir=m.forwardRef(L(function(e,t){const s=sr(J,e.__scopeMenu),{forceMount:a=s.forceMount,...i}=e,o=ie(J,e.__scopeMenu),l=Pe(J,e.__scopeMenu);return r.jsx(be.Provider,{scope:e.__scopeMenu,children:r.jsx(Qe,{present:a||o.open,children:r.jsx(be.Slot,{scope:e.__scopeMenu,children:l.modal?r.jsx(cr,{...i,ref:t}):r.jsx(lr,{...i,ref:t})})})})},"MenuContent")),cr=m.forwardRef(L(function(e,t){const s=ie(J,e.__scopeMenu),a=m.useRef(null),i=Q(t,a);return m.useEffect(()=>{const o=a.current;if(o)return nn(o)},[]),r.jsx(xt,{...e,ref:i,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentModal")),lr=m.forwardRef(L(function(e,t){const s=ie(J,e.__scopeMenu);return r.jsx(xt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentNonModal")),ur=mn("MenuContent.ScrollLock"),xt=m.forwardRef(L(function(e,t){const{__scopeMenu:s,loop:a=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:d,onEntryFocus:u,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:v,disableOutsideScroll:x,...b}=e,S=ie(J,s),y=Pe(J,s),j=Re(s),O=ft(s),E=Jn(s),[k,B]=m.useState(null),N=m.useRef(null),M=Q(t,N,S.onContentChange),T=m.useRef(0),D=m.useRef(""),W=m.useRef(0),I=m.useRef(null),F=m.useRef("right"),G=m.useRef(0),H=x?sn:m.Fragment,U=x?{as:ur,allowPinchZoom:!0}:void 0,w=L(g=>{var ee,_e;const A=D.current+g,z=E().filter(Y=>!Y.disabled),q=document.activeElement,he=(ee=z.find(Y=>Y.ref.current===q))==null?void 0:ee.textValue,xe=z.map(Y=>Y.textValue),Ae=yt(xe,A,he),oe=(_e=z.find(Y=>Y.textValue===Ae))==null?void 0:_e.ref.current;L((function Y(Oe){D.current=Oe,window.clearTimeout(T.current),Oe!==""&&(T.current=window.setTimeout(()=>Y(""),1e3))}),"updateSearch")(A),oe&&setTimeout(()=>oe.focus())},"handleTypeaheadSearch");m.useEffect(()=>()=>window.clearTimeout(T.current),[]),rn();const $=m.useCallback(g=>{var z,q;return F.current===((z=I.current)==null?void 0:z.side)&&jt(g,(q=I.current)==null?void 0:q.area)},[]);return r.jsx(ar,{scope:s,searchRef:D,onItemEnter:m.useCallback(g=>{$(g)&&g.preventDefault()},[$]),onItemLeave:m.useCallback(g=>{var A;$(g)||((A=N.current)==null||A.focus(),B(null))},[$]),onTriggerLeave:m.useCallback(g=>{$(g)&&g.preventDefault()},[$]),pointerGraceTimerRef:W,onPointerGraceIntentChange:m.useCallback(g=>{I.current=g},[]),children:r.jsx(H,{...U,children:r.jsx(on,{asChild:!0,trapped:i,onMountAutoFocus:R(o,g=>{var A;g.preventDefault(),(A=N.current)==null||A.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:r.jsx(an,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:v,children:r.jsx(cn,{asChild:!0,...O,dir:y.dir,orientation:"vertical",loop:a,currentTabStopId:k,onCurrentTabStopIdChange:B,onEntryFocus:R(u,g=>{y.isUsingKeyboardRef.current||g.preventDefault()}),preventScrollOnEntryFocus:!0,children:r.jsx(ln,{role:"menu","aria-orientation":"vertical","data-state":gt(S.open),"data-radix-menu-content":"",dir:y.dir,...j,...b,ref:M,style:{outline:"none",...b.style},onKeyDown:R(b.onKeyDown,g=>{const z=g.target.closest("[data-radix-menu-content]")===g.currentTarget,q=g.ctrlKey||g.altKey||g.metaKey,he=g.key.length===1;z&&(g.key==="Tab"&&g.preventDefault(),!q&&he&&w(g.key));const xe=N.current;if(g.target!==xe||!qn.includes(g.key))return;g.preventDefault();const oe=E().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);dt.includes(g.key)&&oe.reverse(),bt(oe)}),onBlur:R(e.onBlur,g=>{g.currentTarget.contains(g.target)||(window.clearTimeout(T.current),D.current="")}),onPointerMove:R(e.onPointerMove,de(g=>{const A=g.target,z=G.current!==g.clientX;if(g.currentTarget.contains(A)&&z){const q=g.clientX>G.current?"right":"left";F.current=q,G.current=g.clientX}}))})})})})})})},"MenuContentImpl")),we="MenuItem",He="menu.itemSelect",dr=m.forwardRef(L(function(e,t){const{disabled:s=!1,onSelect:a,...i}=e,o=m.useRef(null),l=Pe(we,e.__scopeMenu),d=ht(we,e.__scopeMenu),u=Q(t,o),c=m.useRef(!1),f=L(()=>{const h=o.current;if(!s&&h){const p=new CustomEvent(He,{bubbles:!0,cancelable:!0});h.addEventListener(He,v=>a==null?void 0:a(v),{once:!0}),un(h,p),p.defaultPrevented?c.current=!1:l.onClose()}},"handleSelect");return r.jsx(mr,{...i,ref:u,disabled:s,onClick:R(e.onClick,f),onPointerDown:h=>{var p;(p=e.onPointerDown)==null||p.call(e,h),c.current=!0},onPointerUp:R(e.onPointerUp,h=>{var p;c.current||(p=h.currentTarget)==null||p.click()}),onKeyDown:R(e.onKeyDown,h=>{s||h.target!==h.currentTarget||d.searchRef.current!==""&&h.key===" "||Xn.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})},"MenuItem")),mr=m.forwardRef(L(function(e,t){const{__scopeMenu:s,disabled:a=!1,textValue:i,...o}=e,l=ht(we,s),d=ft(s),u=m.useRef(null),c=Q(t,u),[f,h]=m.useState(!1),[p,v]=m.useState("");return m.useEffect(()=>{const x=u.current;x&&v((x.textContent??"").trim())},[o.children]),r.jsx(be.ItemSlot,{scope:s,disabled:a,textValue:i??p,children:r.jsx(dn,{asChild:!0,...d,focusable:!a,children:r.jsx(Ie.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...o,ref:c,onPointerMove:R(e.onPointerMove,de(x=>{a?l.onItemLeave(x):(l.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,de(x=>l.onItemLeave(x))),onFocus:R(e.onFocus,()=>h(!0)),onBlur:R(e.onBlur,()=>h(!1))})})})},"MenuItemImpl")),fr="MenuRadioGroup",[Is,js]=Z(fr,{value:void 0,onValueChange:L(()=>{},"onValueChange")}),pr="MenuItemIndicator",[Ms,Ss]=Z(pr,{checked:!1}),hr=m.forwardRef(L(function(e,t){const{__scopeMenu:s,...a}=e;return r.jsx(Ie.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})},"MenuSeparator")),xr="MenuSub",[Cs,Ls]=Z(xr);function gt(n){return n?"open":"closed"}L(gt,"getOpenState");function vt(n){return n==="indeterminate"}L(vt,"isIndeterminate");function gr(n){return vt(n)?"indeterminate":n?"checked":"unchecked"}L(gr,"getCheckedState");function bt(n){const e=document.activeElement;for(const t of n)if(t===e||(t.focus(),document.activeElement!==e))return}L(bt,"focusFirst");function wt(n,e){return n.map((t,s)=>n[(e+s)%n.length])}L(wt,"wrapArray");function yt(n,e,t){const a=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let o=wt(n,Math.max(i,0));a.length===1&&(o=o.filter(u=>u!==t));const d=o.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return d!==t?d:void 0}L(yt,"getNextMatch");function It(n,e){const{x:t,y:s}=n;let a=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const l=e[i],d=e[o],u=l.x,c=l.y,f=d.x,h=d.y;c>s!=h>s&&t<(f-u)*(s-c)/(h-c)+u&&(a=!a)}return a}L(It,"isPointInPolygon");function jt(n,e){if(!e)return!1;const t={x:n.clientX,y:n.clientY};return It(t,e)}L(jt,"isPointerInGraceArea");function de(n){return e=>e.pointerType==="mouse"?n(e):void 0}L(de,"whenMouse");var vr=tr,br=nr,wr=or,yr=ir,Ir=dr,jr=hr,Mr=Object.defineProperty,re=(n,e)=>Mr(n,"name",{value:e,configurable:!0}),Ee="DropdownMenu",[Sr,Mt]=Xe(Ee,[mt]),se=mt(),[Cr,St]=Sr(Ee),Ct=re(n=>{const{__scopeDropdownMenu:e,children:t,dir:s,open:a,defaultOpen:i,onOpenChange:o,modal:l=!0}=n,d=se(e),u=m.useRef(null),[c,f]=Ze({prop:a,defaultProp:i??!1,onChange:o,caller:Ee});return r.jsx(Cr,{scope:e,triggerId:ke(),triggerRef:u,contentId:ke(),open:c,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(h=>!h),[f]),modal:l,children:r.jsx(vr,{...d,open:c,onOpenChange:f,dir:s,modal:l,children:t})})},"DropdownMenu"),Lr="DropdownMenuTrigger",Lt=m.forwardRef(re(function(e,t){const{__scopeDropdownMenu:s,disabled:a=!1,...i}=e,o=St(Lr,s),l=se(s),d=Q(t,o.triggerRef);return r.jsx(br,{asChild:!0,...l,children:r.jsx(Ie.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...i,ref:d,onPointerDown:R(e.onPointerDown,u=>{!a&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:R(e.onKeyDown,u=>{a||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),Tt=re(n=>{const{__scopeDropdownMenu:e,...t}=n,s=se(e);return r.jsx(wr,{...s,...t})},"DropdownMenuPortal"),Tr="DropdownMenuContent",Nt=m.forwardRef(re(function(e,t){const{__scopeDropdownMenu:s,...a}=e,i=St(Tr,s),o=se(s),l=m.useRef(!1);return r.jsx(yr,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...a,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,d=>{var u;l.current||(u=i.triggerRef.current)==null||u.focus(),l.current=!1,d.preventDefault()}),onInteractOutside:R(e.onInteractOutside,d=>{const u=d.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0,f=u.button===2||c;(!i.modal||f)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),Rt=m.forwardRef(re(function(e,t){const{__scopeDropdownMenu:s,...a}=e,i=se(s);return r.jsx(Ir,{...i,...a,ref:t})},"DropdownMenuItem")),Pt=m.forwardRef(re(function(e,t){const{__scopeDropdownMenu:s,...a}=e,i=se(s);return r.jsx(jr,{...i,...a,ref:t})},"DropdownMenuSeparator")),Et=Ct,Dt=Lt,Nr=Tt,At=Nt,_t=Rt,Ot=Pt;const Rr=Object.freeze(Object.defineProperty({__proto__:null,Content:At,DropdownMenu:Ct,DropdownMenuContent:Nt,DropdownMenuItem:Rt,DropdownMenuPortal:Tt,DropdownMenuSeparator:Pt,DropdownMenuTrigger:Lt,Item:_t,Portal:Nr,Root:Et,Separator:Ot,Trigger:Dt,createDropdownMenuScope:Mt},Symbol.toStringTag,{value:"Module"})),Pr=fe(Dt),Er=fe(At),Dr=fe(_t),Ar=fe(Ot),kt=m.forwardRef((n,e)=>{const t=_(15);let s,a,i;t[0]!==n?({onClick:a,disabled:s,...i}=n,t[0]=n,t[1]=s,t[2]=a,t[3]=i):(s=t[1],a=t[2],i=t[3]);const o=P(_r),{switchToNewThread:l}=Hn();let d;t[4]!==o?(d=o?{"data-active":"true","aria-current":"true"}:null,t[4]=o,t[5]=d):d=t[5];let u;t[6]!==a||t[7]!==l?(u=R(a,l),t[6]=a,t[7]=l,t[8]=u):u=t[8];let c;return t[9]!==s||t[10]!==e||t[11]!==i||t[12]!==d||t[13]!==u?(c=r.jsx(je.button,{type:"button",...d,...i,ref:e,disabled:s,onClick:u}),t[9]=s,t[10]=e,t[11]=i,t[12]=d,t[13]=u,t[14]=c):c=t[14],c});kt.displayName="ThreadListPrimitive.New";function _r(n){return n.threads.newThreadId===n.threads.mainThreadId}const Or=()=>{const{loadMore:n,disabled:e}=Un();return e?null:n},kr=ae("ThreadListPrimitive.LoadMore",Or),[Br,Fr]=Je("ThreadList"),ye=Br,Bt=Se(null),Kr=Bt.Provider,De=()=>Me(Bt),Ft=m.forwardRef((n,e)=>{const t=_(3);let s;return t[0]!==n||t[1]!==e?(s=r.jsx(ye.Provider,{scope:void 0,children:r.jsx(ye.Slot,{scope:void 0,children:r.jsx(je.div,{...n,ref:e})})}),t[0]=n,t[1]=e,t[2]=s):s=t[2],s});Ft.displayName="ThreadListPrimitive.Root";var $r=Ce({ItemByIndex:()=>ct,Items:()=>lt,LoadMore:()=>kr,New:()=>kt,Root:()=>Ft});const Kt=m.forwardRef((n,e)=>{const t=P(u=>u.threads.mainThreadId===u.threadListItem.id),s=Be(null),a=Be(null),i=We(()=>({triggerRef:s,moreRef:a}),[]),o=Fr(void 0),l=me(),d=u=>{const c=l==="rtl"?"ArrowLeft":"ArrowRight",f=l==="rtl"?"ArrowRight":"ArrowLeft",h=s.current,p=a.current;if(h&&u.target===h)if(u.key==="ArrowDown"||u.key==="ArrowUp"){const v=o().map(b=>b.ref.current).filter(b=>b!==null),x=v[v.indexOf(h)+(u.key==="ArrowDown"?1:-1)];x&&(x.focus(),u.preventDefault())}else u.key===c&&p&&(p.focus(),u.preventDefault());else p&&u.target===p&&u.key===f&&(h==null||h.focus(),u.preventDefault())};return r.jsx(Kr,{value:i,children:r.jsx(je.div,{...t?{"data-active":"true","aria-current":"true"}:null,...n,onKeyDown:R(n.onKeyDown,d),ref:e})})});Kt.displayName="ThreadListItemPrimitive.Root";const zr=()=>{const{archive:n}=Kn();return n},Gr=ae("ThreadListItemPrimitive.Archive",zr),Hr=()=>{const{unarchive:n}=zn();return n},Ur=ae("ThreadListItemPrimitive.Unarchive",Hr),Vr=()=>{const{delete:n}=$n();return n},Wr=ae("ThreadListItemPrimitive.Delete",Vr),Xr=()=>{const{switchTo:n}=Gn();return n},Yr=ae("ThreadListItemPrimitive.Trigger",Xr),$t=m.forwardRef((n,e)=>{var i;const t=_(3),s=Q(e,(i=De())==null?void 0:i.triggerRef);let a;return t[0]!==n||t[1]!==s?(a=r.jsx(ye.ItemSlot,{scope:void 0,children:r.jsx(Yr,{...n,ref:s})}),t[0]=n,t[1]=s,t[2]=a):a=t[2],a});$t.displayName="ThreadListItemPrimitive.Trigger";var zt=Ce({Archive:()=>Gr,Delete:()=>Wr,Root:()=>Kt,Title:()=>ut,Trigger:()=>$t,Unarchive:()=>Ur});const ce=Mt(),Gt=Se(()=>{}),Ht=()=>Me(Gt),Ut=Se(!1),Vt=()=>Me(Ut),Wt=n=>{const e=_(26);let t,s,a,i,o,l,d;e[0]!==n?({__scopeThreadListItemMore:t,open:o,defaultOpen:s,onOpenChange:i,sharedFocusGroup:d,modal:a,...l}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=o,e[6]=l,e[7]=d):(t=e[1],s=e[2],a=e[3],i=e[4],o=e[5],l=e[6],d=e[7]);const u=d===void 0?!1:d,c=u?!1:a??!0,f=ce(t),h=s??!1;let p;e[8]!==i?(p=i?{onChange:i}:{},e[8]=i,e[9]=p):p=e[9];let v;e[10]!==o||e[11]!==h||e[12]!==p?(v={prop:o,defaultProp:h,caller:"ThreadListItemMorePrimitive.Root",...p},e[10]=o,e[11]=h,e[12]=p,e[13]=v):v=e[13];const[x,b]=Ze(v);let S;e[14]!==c||e[15]!==x||e[16]!==l||e[17]!==f||e[18]!==b?(S=r.jsx(Et,{...f,...l,modal:c,open:x,onOpenChange:b}),e[14]=c,e[15]=x,e[16]=l,e[17]=f,e[18]=b,e[19]=S):S=e[19];let y;e[20]!==b||e[21]!==S?(y=r.jsx(Gt.Provider,{value:b,children:S}),e[20]=b,e[21]=S,e[22]=y):y=e[22];let j;return e[23]!==u||e[24]!==y?(j=r.jsx(Ut.Provider,{value:u,children:y}),e[23]=u,e[24]=y,e[25]=j):j=e[25],j};Wt.displayName="ThreadListItemMorePrimitive.Root";const Xt=m.forwardRef((n,e)=>{const t=_(10),{__scopeThreadListItemMore:s,...a}=n,i=ce(s),o=De(),l=Ht(),d=Vt(),u=Q(e,o==null?void 0:o.moreRef),c=me()==="rtl"?"ArrowLeft":"ArrowRight",f=Pr;let h;t[0]!==c||t[1]!==l||t[2]!==d?(h=x=>{!d||x.key!==c||(x.preventDefault(),l(!0))},t[0]=c,t[1]=l,t[2]=d,t[3]=h):h=t[3];const p=R(a.onKeyDown,h);let v;return t[4]!==f||t[5]!==u||t[6]!==a||t[7]!==i||t[8]!==p?(v=r.jsx(f,{...i,...a,onKeyDown:p,ref:u}),t[4]=f,t[5]=u,t[6]=a,t[7]=i,t[8]=p,t[9]=v):v=t[9],v});Xt.displayName="ThreadListItemMorePrimitive.Trigger";const Yt=m.forwardRef((n,e)=>{const t=_(21),{__scopeThreadListItemMore:s,portalProps:a,sideOffset:i,...o}=n,l=i===void 0?4:i,d=ce(s),u=Ht(),c=De(),f=Vt(),h=me()==="rtl"?"ArrowRight":"ArrowLeft",p=Rr,v=Er;let x;t[0]!==h||t[1]!==(c==null?void 0:c.moreRef)||t[2]!==u||t[3]!==f?(x=E=>{var k;!f||E.key!==h||(E.preventDefault(),u(!1),(k=c==null?void 0:c.moreRef.current)==null||k.focus())},t[0]=h,t[1]=c==null?void 0:c.moreRef,t[2]=u,t[3]=f,t[4]=x):x=t[4];const b=R(o.onKeyDown,x);let S;t[5]!==(c==null?void 0:c.moreRef)||t[6]!==f?(S=()=>{var E;f&&((E=c==null?void 0:c.moreRef.current)==null||E.focus())},t[5]=c==null?void 0:c.moreRef,t[6]=f,t[7]=S):S=t[7];const y=R(o.onEscapeKeyDown,S);let j;t[8]!==v||t[9]!==e||t[10]!==o||t[11]!==d||t[12]!==l||t[13]!==b||t[14]!==y?(j=r.jsx(v,{...d,...o,onKeyDown:b,onEscapeKeyDown:y,ref:e,sideOffset:l}),t[8]=v,t[9]=e,t[10]=o,t[11]=d,t[12]=l,t[13]=b,t[14]=y,t[15]=j):j=t[15];let O;return t[16]!==a||t[17]!==d||t[18]!==p.Portal||t[19]!==j?(O=r.jsx(p.Portal,{...d,...a,children:j}),t[16]=a,t[17]=d,t[18]=p.Portal,t[19]=j,t[20]=O):O=t[20],O});Yt.displayName="ThreadListItemMorePrimitive.Content";const qt=m.forwardRef((n,e)=>{const t=_(7);let s,a;t[0]!==n?({__scopeThreadListItemMore:s,...a}=n,t[0]=n,t[1]=s,t[2]=a):(s=t[1],a=t[2]);const i=ce(s);let o;return t[3]!==e||t[4]!==a||t[5]!==i?(o=r.jsx(Dr,{...i,...a,ref:e}),t[3]=e,t[4]=a,t[5]=i,t[6]=o):o=t[6],o});qt.displayName="ThreadListItemMorePrimitive.Item";const Jt=m.forwardRef((n,e)=>{const t=_(7);let s,a;t[0]!==n?({__scopeThreadListItemMore:s,...a}=n,t[0]=n,t[1]=s,t[2]=a):(s=t[1],a=t[2]);const i=ce(s);let o;return t[3]!==e||t[4]!==a||t[5]!==i?(o=r.jsx(Ar,{...i,...a,ref:e}),t[3]=e,t[4]=a,t[5]=i,t[6]=o):o=t[6],o});Jt.displayName="ThreadListItemMorePrimitive.Separator";var ve=Ce({Content:()=>Yt,Item:()=>qt,Root:()=>Wt,Separator:()=>Jt,Trigger:()=>Xt});function qr(){const n=ne(),e=et(),t=Le(),s=nt(),a=t||s,[i,o]=m.useState(!1),[l,d]=m.useState(""),[u,c]=m.useState(null),f=m.useRef(null),h=m.useRef(null),p=m.useId(),v=(n==null?void 0:n.isLibraryEnabled)===!0&&e!=null,x=(n==null?void 0:n.historyAgentFilter)??null;m.useEffect(()=>{i||d("")},[i]);const{agents:b,isInitialLoading:S,isSearching:y,loadingMore:j,hasMore:O,listRef:E,sentinelRef:k}=In({enabled:i&&v,query:l});if(m.useLayoutEffect(()=>{if(!i||a){c(null);return}const M=()=>{var D;const T=(D=f.current)==null?void 0:D.getBoundingClientRect();T&&c({top:T.top,left:T.right+4})};return M(),window.addEventListener("resize",M),window.addEventListener("scroll",M,!0),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,!0)}},[i,a]),m.useEffect(()=>{if(!i||a)return;const M=T=>{var W,I;const D=T.target;(W=f.current)!=null&&W.contains(D)||(I=h.current)!=null&&I.contains(D)||o(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[i,a]),!v)return null;const B=M=>{(n==null?void 0:n.isComposerEnabled)===!0?n.openDraft():n==null||n.openLibraryHome(),n==null||n.setHistoryAgentFilter(M),o(!1)},N=r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"p-1",onMouseDown:M=>M.stopPropagation(),children:[r.jsx(jn,{query:l,setQuery:d,placeholder:"Search agents"}),y?r.jsx("p",{className:"text-text-secondary px-1 pt-1 text-[11px]",role:"status",children:"Searching…"}):null]}),r.jsxs("div",{ref:E,className:K("mt-1 overflow-y-auto",a?"min-h-0 flex-1 px-1 pb-2":"min-h-48 max-h-64"),children:[l.trim()===""?r.jsxs(Ke,{className:K("justify-between",x==null&&"bg-dropdown-selected-item-bg text-dropdown-selected-item-text"),onClick:()=>B(null),children:["All chats",x==null?r.jsx(V,{name:"check",className:"size-3.5 shrink-0"}):null]}):null,S?r.jsx("p",{className:"px-2 py-3 text-center text-xs text-text-secondary",children:"Loading…"}):b.length===0?r.jsx("p",{className:"text-text-secondary px-2 py-6 text-center text-xs",role:"status",children:l.trim()?`No agents match "${l.trim()}".`:"No agents yet."}):r.jsxs(r.Fragment,{children:[b.map(M=>{const T=Mn(M),D=(x==null?void 0:x.agentId)===T;return r.jsxs(Ke,{className:K("justify-between gap-2 text-left",D&&"bg-dropdown-selected-item-bg text-dropdown-selected-item-text"),onClick:()=>B({agentId:T,agentName:M.name,intent:"history"}),children:[r.jsx("span",{className:"min-w-0 truncate",children:M.name}),D?r.jsx(V,{name:"check",className:"size-3.5 shrink-0"}):null]},T)}),O?r.jsx("div",{ref:k,className:"flex h-6 shrink-0 items-center justify-center","aria-hidden":!0,children:j?r.jsx("span",{className:"text-text-secondary text-[11px]",role:"status",children:"Loading more…"}):null}):null]})]})]});return r.jsxs("div",{className:"relative shrink-0",children:[r.jsxs("button",{ref:f,type:"button","aria-label":x!=null?`Filter chat history by agent (${x.agentName})`:"Filter chat history by agent","aria-haspopup":a?"dialog":"menu","aria-expanded":i,"aria-controls":i?p:void 0,title:"Filter by agent",className:te({variant:"ghost",size:"icon",className:K("relative size-7 shrink-0 text-text-secondary hover:bg-ghost-button-hover hover:text-ghost-button-text",x!=null&&"text-text-primary")}),onClick:()=>o(M=>!M),children:[r.jsx(V,{name:"funnel",className:"size-3.5"}),x!=null?r.jsx("span",{className:"bg-primary-button-bg absolute top-1 right-1 size-1.5 rounded-full","aria-hidden":!0,"data-testid":"history-filter-active-dot"}):null]}),a&&i?r.jsx(rt,{open:!0,onOpenChange:o,id:p,"aria-label":"Filter agents",children:r.jsx("div",{className:"flex min-h-0 flex-1 flex-col p-2",role:"menu",children:N})}):null,!a&&i&&u!=null?Sn.createPortal(r.jsx("div",{ref:h,id:p,role:"menu","aria-label":"Filter agents",style:{top:u.top,left:u.left},className:"aui-popup-enter font-sans-flex fixed z-50 w-56 rounded-md border border-border bg-card-bg p-1 text-text-primary shadow-md",children:N}),Cn(f.current)):null]})}function Jr({open:n,initialTitle:e,saving:t=!1,onOpenChange:s,onSave:a}){const[i,o]=m.useState(e),l=m.useRef(null);m.useEffect(()=>{n&&o(e)},[n,e]),m.useEffect(()=>{if(!n)return;const p=l.current;p!=null&&(p.focus(),p.select())},[n]);const d=i.trim(),c=d.length>0&&d.length<=$e&&!t,f=()=>{c&&a(d)},h=p=>{t||s(p)};return r.jsx(Ln,{open:n,onOpenChange:h,title:"Rename session",contentSized:!0,"aria-label":"Rename session",footer:r.jsxs("div",{className:"flex items-center justify-end gap-2",children:[r.jsx(ze.Secondary,{type:"button",disabled:t,onClick:()=>h(!1),children:"Cancel"}),r.jsx(ze.Primary,{type:"button",disabled:!c,onClick:f,children:"Save"})]}),children:r.jsx("div",{className:"px-5 py-4",children:r.jsx("input",{ref:l,"aria-label":"Session title",value:i,readOnly:t,maxLength:$e,className:Tn("h-9"),onChange:p=>o(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),f())}})})})}var Qr="flex w-full cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium outline-none transition-colors hover:bg-ghost-button-hover focus:bg-ghost-button-hover data-[highlighted]:bg-ghost-button-hover",Zr="flex w-full cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-failure-bg outline-none transition-colors hover:bg-failure-bg/12 hover:text-failure-bg focus:bg-failure-bg/12 focus:text-failure-bg data-[highlighted]:bg-failure-bg/12 data-[highlighted]:text-failure-bg";function es({canRename:n,renameDisabled:e,canDelete:t,deleteDisabled:s,onRename:a,onDelete:i}){const o=C("PermissionGuard"),l=nt(),d=Le(),[u,c]=m.useState(!1),[f,h]=m.useState(),p=d||l,v=m.useCallback(y=>{const j=y==null?void 0:y.closest(".aui-theme-root");h(j instanceof HTMLElement?j:void 0)},[]),x=te({variant:"ghost",size:"icon",className:"size-7 shrink-0 text-text-secondary hover:bg-transparent hover:text-text-primary"}),b=n?r.jsx(o,{allowed:!e,children:r.jsxs("button",{type:"button",className:Qr,disabled:e,onClick:()=>{e||(c(!1),a())},children:[r.jsx(V,{name:"pencil",className:"size-3.5"}),"Rename"]})}):null,S=t?r.jsx(o,{allowed:!s,children:r.jsxs(zt.Delete,{className:Zr,onClick:()=>{s||(c(!1),i())},children:[r.jsx(V,{name:"trash",className:"size-3.5"}),"Delete"]})}):null;return p?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button","aria-label":"Session actions",title:"Session actions","aria-haspopup":"dialog","aria-expanded":u,className:x,onClick:()=>c(!0),children:r.jsx(V,{name:"ellipsis",className:"size-3.5"})}),u?r.jsx(rt,{open:!0,onOpenChange:c,"aria-label":"Session actions",children:r.jsxs("div",{className:"flex flex-col gap-1 p-2 *:w-full",role:"menu",children:[b,S]})}):null]}):r.jsxs(ve.Root,{sharedFocusGroup:!0,children:[r.jsx(ve.Trigger,{ref:v,"aria-label":"Session actions",title:"Session actions",className:x,children:r.jsx(V,{name:"ellipsis",className:"size-3.5"})}),r.jsxs(ve.Content,{portalProps:{container:f},align:"end",sideOffset:4,className:"aui-popup-enter font-sans-flex z-50 min-w-32 rounded-md border border-border bg-card-bg p-1 text-text-primary shadow-md *:w-full",children:[b,S]})]})}function ts({onThreadOpen:n,canRenameSession:e,canDeleteSession:t,canManageResource:s,canDeleteResource:a}){const i=X(),o=ne(),l=tt(),d=bn(),u=C("ThreadListRow"),c=P(I=>I.threadListItem.id),f=P(I=>I.threadListItem.remoteId),h=P(I=>I.threadListItem.title),p=P(I=>I.threadListItem.lastMessageAt),v=P(I=>I.threadListItem.custom),x=P(I=>I.threads.mainThreadId),b=wn(v),S=e&&f!=null,y=t&&f!=null,j=S||y,O=f!=null&&!s(f),E=f!=null&&!a(f),k=(o==null?void 0:o.libraryOpen)===!0||(o==null?void 0:o.sessionsOpen)===!0||(o==null?void 0:o.schedulesOpen)===!0||(o==null?void 0:o.environmentsOpen)===!0,[B,N]=m.useState(!1),[M,T]=m.useState(!1),D=h??"New Chat",W=async I=>{if(I===(h??"").trim()){N(!1);return}T(!0);try{await i.threadListItem().rename(I),l(le.Session.RENAMED,ue(void 0,{sessionId:f,agentName:b})),N(!1)}catch(F){d==null||d.showError(F)}finally{T(!1)}};return r.jsxs(zt.Root,{className:"min-w-0",children:[r.jsx(u,{title:D,active:c===x&&!k,agentName:b,lastMessageAt:p,onSelect:()=>{l(le.Session.SELECTED,ue({is_mutable:Fe(v)},{sessionId:f,agentName:b})),n==null||n(),o==null||o.setSettingsOpen(!1),o==null||o.setLibraryOpen(!1),o==null||o.setSessionsOpen(!1),o==null||o.setSchedulesOpen(!1),o==null||o.setEnvironmentsOpen(!1);const I=Fe(v),F=!I&&(o==null?void 0:o.mode.status)==="active"&&!o.mode.isMutable&&(b==null?o.mode.agentName==null&&o.mode.agentId==null:o.mode.agentName===b||o.mode.agentId===b),G=yn({sessionMutable:I,shellMutable:(o==null?void 0:o.mode.status)==="active"&&o.mode.isMutable,...(o==null?void 0:o.mode.status)==="active"&&o.mode.isMutable?{shellAgentName:o.mode.agentName,shellAgentId:o.mode.agentId}:{},remoteId:f,pendingSessionId:o==null?void 0:o.pendingSessionId});if((F||G)&&f!=null&&(o==null?void 0:o.sessionAccessError)==null){Promise.resolve(i.threads().switchToThread(c)).catch(()=>{});return}if(f!=null){o==null||o.openHistorySession({sessionId:f,isMutable:I,...b!=null?{agentName:b}:{}});return}Promise.resolve(i.threads().switchToThread(c)).catch(()=>{})},actions:j?r.jsx(es,{canRename:S,renameDisabled:O,canDelete:y,deleteDisabled:E,onRename:()=>N(!0),onDelete:()=>{l(le.Session.DELETED,ue(void 0,{sessionId:f,agentName:b}))}}):void 0}),r.jsx(Jr,{open:B,initialTitle:h??"",saving:M,onOpenChange:N,onSave:I=>{W(I)}})]})}function ns(n){const e=P(s=>s.threads.threadIds),t=P(s=>s.threads.threadItems);return m.useMemo(()=>{const s=vn({threadIds:e,threadItems:t});if(n==="default")return s;const a=new Map;for(const i of t)a.set(i.id,i),i.remoteId!=null&&a.set(i.remoteId,i);return s.filter(i=>{const o=e[i];if(o===void 0)return!1;const l=a.get(o);return(l==null?void 0:l.remoteId)!=null})},[e,t,n])}function rs(n){return n==="recent-history"||n==="mobile-drawer"}function ss({indices:n,onThreadOpen:e,canRenameSession:t,canDeleteSession:s,canManageResource:a,canDeleteResource:i}){const o=P(l=>l.threads.threadIds);return r.jsx(r.Fragment,{children:n.map(l=>{const d=o[l]??String(l);return r.jsx(Ne,{index:l,archived:!1,children:r.jsx(ts,{onThreadOpen:e,canRenameSession:t,canDeleteSession:s,canManageResource:a,canDeleteResource:i})},d)})})}var os="aui_thread-list-viewport",as=80;function is({children:n,viewportRef:e,hideScrollbar:t}){var d;const s=ne(),a=P(u=>u.threadListItem.remoteId),i=(d=s==null?void 0:s.historyAgentFilter)==null?void 0:d.intent,o=(s==null?void 0:s.isLibraryEnabled)===!0&&i!=="try-agent"&&(i==="history"||s.mode.status!=="active"||s.mode.isMutable||s.pendingSessionId!=null||a!=null),l=(s==null?void 0:s.historyAgentFilter)==null?"Chat History":`Chats for ${s.historyAgentFilter.agentName}`;return r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[r.jsxs("div",{className:"flex shrink-0 items-center gap-1 px-1 py-1",children:[r.jsx("h2",{className:"min-w-0 flex-1 truncate px-1.5 py-1 text-sm font-medium text-text-secondary",children:l}),o?r.jsx(qr,{}):null]}),r.jsx("div",{ref:e,"data-slot":os,className:K("flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto",t&&"aui-scrollbar-hidden"),children:n})]})}function Qt({onThreadOpen:n,variant:e="default"}={}){const t=X(),s=et(),a=tt(),i=P(w=>w.threads.isLoading),o=P(w=>w.threads.isLoadingMore),l=P(w=>w.threads.hasMore),d=P(w=>w.threads.threadIds),u=P(w=>w.threads.threadItems),c=ne(),f=C("ThreadListShell"),h=C("ThreadListNewButton"),p=C("AgentsLibraryButton"),v=C("SessionsBrowserButton"),x=C("SchedulesButton"),b=C("EnvironmentsButton"),S=C("ThreadListRowSkeleton"),y=C("ThreadListEmptyState"),j=ns(e),O=m.useRef(null),E=m.useRef(l),k=m.useRef(t);E.current=l,k.current=t;const B=(c==null?void 0:c.isNewChatEnabled)!==!1,N=(c==null?void 0:c.mode.status)==="idle",M=rs(e),T=e==="mobile-drawer",D=typeof(s==null?void 0:s.renameSession)=="function",W=typeof(s==null?void 0:s.deleteSession)=="function",I=m.useMemo(()=>u.flatMap(w=>w.remoteId==null?[]:[w.remoteId]),[u]),{allows:F}=gn({resourceType:"session",resourceIds:I});m.useEffect(()=>{if(N||i||o)return;const w=O.current;if(!w)return;let $=!1;const g=()=>{if($||!E.current||w.clientHeight<=0)return;const z=w.scrollHeight-w.scrollTop-w.clientHeight;w.scrollHeight>w.clientHeight&&z>as||k.current.threads().loadMore()};w.addEventListener("scroll",g,{passive:!0});const A=typeof ResizeObserver>"u"?void 0:new ResizeObserver(()=>g());return A?A.observe(w):window.addEventListener("resize",g),g(),()=>{$=!0,w.removeEventListener("scroll",g),A==null||A.disconnect(),A||window.removeEventListener("resize",g)}},[l,N,i,o,d.length]);const G=()=>{if(a(le.Session.NEW,ue({is_composer_enabled:(c==null?void 0:c.isComposerEnabled)===!0},{...(c==null?void 0:c.mode.status)==="active"?{agentId:c.mode.agentId,agentName:c.mode.agentName}:{}})),n==null||n(),c==null||c.setLibraryOpen(!1),c==null||c.setSessionsOpen(!1),c!=null&&c.isComposerEnabled){c.openDraft();return}c==null||c.setSettingsOpen(!1),c==null||c.setSchedulesOpen(!1),c==null||c.setEnvironmentsOpen(!1),Promise.resolve(t.threads().switchToNewThread()).catch(()=>{})};let H;N?H=r.jsx(y,{message:M?"No recent chats":void 0}):i?H=r.jsx(S,{}):j.length===0?H=r.jsx(y,{message:M?"No recent chats":void 0}):H=r.jsx($r.Root,{className:"flex min-h-0 flex-col gap-0.5",children:r.jsx(ss,{indices:j,onThreadOpen:n,canRenameSession:D,canDeleteSession:W,canManageResource:w=>F(w,"MANAGE"),canDeleteResource:w=>F(w,"DELETE")})});const U=e==="recent-history"?null:r.jsxs("div",{className:"flex flex-col gap-1",children:[B?r.jsx(h,{onClick:G}):null,r.jsx("div",{className:"contents",onClick:()=>{T&&(n==null||n())},children:r.jsx(p,{})}),T?null:r.jsxs(r.Fragment,{children:[r.jsx(v,{}),r.jsx(x,{}),r.jsx(b,{})]})]});return r.jsx(f,{header:U,children:r.jsxs(is,{viewportRef:O,hideScrollbar:M,children:[H,!N&&l?r.jsx("div",{className:"h-4 shrink-0","aria-hidden":!0}):null]})})}var cs=m.lazy(()=>Te(()=>import("./SettingsBuilder-MZNSGTCG-DW5WrGhz.js"),__vite__mapDeps([0,1,2]),import.meta.url)),ls=m.lazy(()=>Te(()=>import("./SchedulesPage-YFIJGKZO-BbTOcGO5.js"),__vite__mapDeps([3,4,1,2]),import.meta.url).then(n=>({default:n.SchedulesPage}))),us=m.lazy(()=>Te(()=>import("./EnvironmentsPage-FCDIVAKH-Crq_Zjm_.js"),__vite__mapDeps([5,4,1,2]),import.meta.url).then(n=>({default:n.EnvironmentsPage}))),ds="h-5 w-5 max-w-40 shrink-0 object-contain",ms="h-5 max-w-40 shrink-0 object-contain",fs="w-20",ps="w-80",Ue=K(_n,"text-sidebar-text"),Ve="bg-primary-button-bg font-medium text-primary-button-text hover:bg-primary-button-hover hover:text-primary-button-text";function hs({overlayOpen:n,mode:e}){return!n&&(e==null?void 0:e.status)==="active"&&!e.isCreateAgent}function xs(){return Dn().presentation==="full"?null:r.jsx("aside",{"aria-label":"Recent chats",className:"hidden min-h-0 w-64 shrink-0 border-r border-border bg-sidebar-bg md:flex",children:r.jsx(Qt,{variant:"recent-history"})})}function gs(){var p;const n=X(),e=ne(),t=C("AgentsLibraryButton"),s=C("SessionsBrowserButton"),a=C("SchedulesButton"),i=C("EnvironmentsButton"),o=(e==null?void 0:e.isNewChatEnabled)!==!1,l=(e==null?void 0:e.settingsOpen)===!0||(e==null?void 0:e.libraryOpen)===!0||(e==null?void 0:e.sessionsOpen)===!0||(e==null?void 0:e.schedulesOpen)===!0||(e==null?void 0:e.environmentsOpen)===!0,d=e==null?void 0:e.mode,u=!l&&(d==null?void 0:d.status)==="active"&&!d.isCreateAgent&&((p=e==null?void 0:e.historyAgentFilter)==null?void 0:p.intent)!=="try-agent",c=!l&&d!=null&&st(d),f=()=>{if(e==null||e.setLibraryOpen(!1),e==null||e.setSessionsOpen(!1),e!=null&&e.isComposerEnabled){e.openDraft();return}e==null||e.setSettingsOpen(!1),e==null||e.setSchedulesOpen(!1),e==null||e.setEnvironmentsOpen(!1),Promise.resolve(n.threads().switchToNewThread()).catch(()=>{})},h=()=>{e==null||e.setLibraryOpen(!1),e==null||e.setSessionsOpen(!1),e!=null&&e.isComposerEnabled&&e.openAgentBuilder()};return r.jsxs("nav",{className:"flex min-h-0 flex-1 flex-col items-center gap-1 p-1","aria-label":"Sidebar",children:[o?r.jsxs("button",{type:"button","aria-label":"Start new chat",title:"New chat","aria-current":u?"page":void 0,className:te({variant:"ghost",className:K(Ue,u&&Ve)}),onClick:f,children:[r.jsx(V,{name:"square-pen",size:14}),r.jsx("span",{className:"text-center",children:"New Chat"})]}):null,o&&(e!=null&&e.isComposerEnabled)?r.jsxs("button",{type:"button","aria-label":"Start new agent",title:"New Agent","aria-current":c?"page":void 0,className:te({variant:"ghost",className:K(Ue,c&&Ve)}),onClick:h,children:[r.jsx(V,{name:"agent-2",size:14}),r.jsx("span",{className:"text-center whitespace-nowrap",children:"Build Agent"})]}):null,r.jsx(t,{compact:!0}),r.jsx(s,{compact:!0}),r.jsx(a,{compact:!0}),r.jsx(i,{compact:!0})]})}function vs({className:n,railRef:e,...t}){const s=ot(),a=at(s),i=C("BrandLogo"),o=C("UserAvatar");return r.jsxs("aside",{ref:e,className:K(fs,"flex min-h-0 shrink-0 flex-col border-r border-border bg-sidebar-bg",n),...t,children:[r.jsx("div",{className:"flex h-14 w-full shrink-0 items-center justify-center text-text-primary",children:r.jsx(i,{variant:a.collapsedVariant,className:ds})}),r.jsx(gs,{}),r.jsxs("footer",{className:"flex shrink-0 flex-col items-center border-border p-2",children:[r.jsx(it,{labeled:!0,className:"flex-col"}),r.jsx(o,{labeled:!0,className:"mt-2 py-1.5"})]})]})}function bs({drawerRef:n,onClose:e}){const t=ot(),s=at(t),a=An(),i=C("BrandLogo"),o=C("UserAvatar");return r.jsxs("aside",{ref:n,role:"dialog","aria-label":"Navigation",tabIndex:-1,className:K(ps,"absolute inset-y-0 left-0 z-10 flex min-h-0 flex-col border-r border-border bg-sidebar-bg shadow-lg outline-none md:hidden"),children:[r.jsxs("div",{className:"flex h-14 w-full shrink-0 items-center gap-2 border-b border-border px-3 text-text-primary",children:[r.jsx(i,{variant:s.expandedVariant,className:ms}),s.showTitle&&a!=null?r.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:a}):r.jsx("span",{className:"min-w-0 flex-1"}),r.jsx("button",{type:"button","aria-label":"Close navigation",className:te({variant:"ghost",size:"icon"}),onClick:e,children:r.jsx(V,{name:"xmark"})})]}),r.jsx("div",{className:"min-h-0 flex-1",children:r.jsx(Qt,{variant:"mobile-drawer",onThreadOpen:e})}),r.jsxs("footer",{className:"flex shrink-0 items-center justify-around gap-1 border-t border-border p-2 text-sidebar-text",children:[r.jsx(it,{labeled:!0,onAction:e,className:"contents"}),r.jsx(o,{labeled:!0})]})]})}function Ts({className:n}){const e=ne(),t=Le(),s=C("AgentDetailsPage"),a=C("AgentsLibrary"),i=C("SessionsPage"),o=C("ShareChatButton"),l=C("ResetAgentBuilderButton"),d=C("ClearChatButton"),u=C("SaveAgentButton"),c=C("SelectAgentEmptyState"),[f,h]=m.useState(!1),p=m.useRef(null),v=m.useRef(null),x=m.useRef(null),b=m.useRef(!1),S=(e==null?void 0:e.mode.status)==="idle",y=(e==null?void 0:e.settingsOpen)===!0,j=(e==null?void 0:e.libraryOpen)===!0,O=j&&(e==null?void 0:e.libraryAgentId)==null,E=(e==null?void 0:e.sessionsOpen)===!0,k=(e==null?void 0:e.schedulesOpen)===!0,B=(e==null?void 0:e.environmentsOpen)===!0,N=y||j||E||k||B,M=e!=null&&st(e.mode),T=t&&(E||k||B||M&&!y&&!j),D=M&&!N&&!t,W=hs({overlayOpen:N,mode:e==null?void 0:e.mode}),I=Nn(),F=t&&(y||O),G=()=>h(!1),H=r.jsx("button",{ref:p,type:"button","aria-label":"Navigation","aria-expanded":f,className:K(te({variant:"ghost",size:"icon"}),"md:hidden"),onClick:()=>h(!0),children:r.jsx(V,{name:"panel-left"})});return m.useEffect(()=>{if(!f)return;const U=w=>{w.key==="Escape"&&(w.stopImmediatePropagation(),h(!1))};return window.addEventListener("keydown",U,!0),()=>window.removeEventListener("keydown",U,!0)},[f]),m.useEffect(()=>{var w,$;const U=x.current;if(f){b.current=!0,U&&(U.inert=!0),(w=v.current)==null||w.focus();return}b.current&&(U&&(U.inert=!1),($=p.current)==null||$.focus(),b.current=!1)},[f]),r.jsxs("div",{className:K("relative flex h-full min-h-0 w-full min-w-0",n),children:[r.jsx(vs,{className:"hidden md:flex"}),D?r.jsx("aside",{role:"dialog","aria-label":"Agent Config",className:"absolute inset-y-0 left-0 z-20 w-full max-w-sm border-r border-border shadow-xl md:static md:z-auto md:max-w-140 md:flex-1 md:shadow-none 2xl:max-w-150",children:r.jsx(On,{})}):null,r.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col bg-primary-bg",children:[F?null:r.jsx(Rn,{className:K("bg-topbar-bg",(N||S||!I||T)&&"md:hidden"),start:H,title:!N&&!T?r.jsx(kn,{}):null,end:!N&&!T?r.jsxs(r.Fragment,{children:[r.jsx(l,{}),r.jsx(o,{}),r.jsx(d,{}),r.jsx(u,{})]}):null}),r.jsx(Pn,{children:r.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[W?r.jsx(xs,{}):null,r.jsx("div",{ref:x,className:"min-h-0 min-w-0 flex-1",children:y?r.jsx(m.Suspense,{fallback:r.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[r.jsx(ge,{size:28,className:"text-text-primary"}),r.jsx("span",{className:"sr-only",children:"Loading"})]}),children:r.jsx(cs,{...F?{headerStart:H}:{}})}):T?r.jsx(En,{}):E?r.jsx(i,{}):j&&(e==null?void 0:e.libraryAgentId)!=null?r.jsx(s,{agentId:e.libraryAgentId},e.libraryAgentId):j?r.jsx(a,{onSelectAgent:G,...F?{headerStart:H}:{}}):k?r.jsx(m.Suspense,{fallback:r.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[r.jsx(ge,{size:28,className:"text-text-primary"}),r.jsx("span",{className:"sr-only",children:"Loading"})]}),children:r.jsx(ls,{})}):B?r.jsx(m.Suspense,{fallback:r.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[r.jsx(ge,{size:28,className:"text-text-primary"}),r.jsx("span",{className:"sr-only",children:"Loading"})]}),children:r.jsx(us,{})}):S?r.jsx(c,{}):r.jsx(Bn,{})})]})})]}),f?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button","aria-label":"Close navigation backdrop",className:"absolute inset-0 z-[9] cursor-pointer bg-[var(--overlay)] md:hidden",onClick:G}),r.jsx(bs,{drawerRef:v,onClose:G})]}):null]})}export{Ts as SidebarLayout};
@@ -1 +1 @@
1
- import{C as W}from"./chunk-GSAVSNGR-BJhfT2HB.js";import{b5 as J,t as V,U as X,r as l,W as q,j as e,$ as Y,a2 as L,I as U,b7 as Z,as as y,al as _}from"./index-BJsGMvc-.js";var ee=({open:s,onOpenChange:c,onImport:d,busy:p=!1,error:S})=>{const[i,N]=l.useState(""),[m,C]=l.useState(""),[n,j]=l.useState(""),[u,x]=l.useState(""),[b,h]=l.useState(""),o=()=>{N(""),C(""),j(""),x(""),h("")},v=()=>{o(),c(!1)},f=async a=>{if(a.preventDefault(),!(!i.trim()||!m.trim()||!n.trim()||!u.trim()||!b.trim()||p))try{await d({name:i.trim(),description:m.trim(),repoURL:n.trim(),path:u.trim(),ref:b.trim()}),v()}catch{}},E=!!(i.trim()&&m.trim()&&n.trim()&&u.trim()&&b.trim())&&!p;return e.jsx(Z,{open:s,onOpenChange:a=>{a||v()},title:"Import from GitHub",description:"Import a skill from a SKILL.md file in a GitHub repository.",headerIcon:e.jsx("span",{className:"flex size-11 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary",children:e.jsx(U,{name:"github",className:"size-5"})}),contentSized:!0,className:"md:max-w-2xl",children:e.jsx("form",{onSubmit:a=>void f(a),children:e.jsxs("div",{className:"space-y-5 px-5 py-5 md:px-6",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"skill-name",className:"mb-2 block text-sm font-semibold text-text-primary",children:"Name"}),e.jsx("input",{id:"skill-name",value:i,onChange:a=>{N(a.target.value)},placeholder:"release-notes",autoFocus:!0,required:!0,className:y("h-11")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"skill-description",className:"mb-2 block text-sm font-semibold text-text-primary",children:"Description"}),e.jsx("textarea",{id:"skill-description",value:m,onChange:a=>{C(a.target.value)},placeholder:"Generate release notes from merged pull requests",required:!0,rows:3,className:y("resize-y py-2.5")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"skill-repo-url",className:"mb-2 block text-sm font-semibold text-text-primary",children:"Repository URL"}),e.jsx("input",{id:"skill-repo-url",type:"url",value:n,onChange:a=>{j(a.target.value)},placeholder:"https://github.com/org/repo",required:!0,className:y("h-11")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"skill-path",className:"mb-2 block text-sm font-semibold text-text-primary",children:"Folder containing the SKILL.md"}),e.jsx("input",{id:"skill-path",value:u,onChange:a=>{x(a.target.value)},placeholder:"skills/release-notes",required:!0,className:y("h-11")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"skill-ref",className:"mb-2 block text-sm font-semibold text-text-primary",children:"Branch"}),e.jsx("input",{id:"skill-ref",value:b,onChange:a=>{h(a.target.value)},placeholder:"main",required:!0,className:y("h-11")})]}),e.jsxs("div",{className:"space-y-3",children:[S?e.jsx("p",{className:"text-failure-bg text-sm",children:S}):null,e.jsx(L.Primary,{type:"submit",disabled:!E,className:"w-full",children:"Import"})]})]})})})},te=ee,B=(s,c,d)=>!s||c.toLowerCase().includes(s)||d.toLowerCase().includes(s),se=s=>"catalogId"in s;function le(s){return typeof s=="object"&&s!==null&&Reflect.get(s,"statusCode")===424}var ae=()=>{const{skillCatalog:s}=J(),c=V(),d=X(),[p,S]=l.useState(""),[i,N]=l.useState([]),[m,C]=l.useState([]),[n,j]=l.useState(!0),[u,x]=l.useState(null),[b,h]=l.useState(null),[o,v]=l.useState(!1),[f,E]=l.useState(!1),[a,G]=l.useState(!1),[D,F]=l.useState(null),[P,I]=l.useState(null),M=l.useCallback(async()=>{if(s){j(!0),x(null);try{const[t,r]=await Promise.all([s.listSkills(),s.getSkillCatalog()]);N(t),C(r)}catch(t){x(q(t,"Failed to load skills"))}finally{j(!1)}}},[s]);l.useEffect(()=>{M()},[M]);const k=p.trim().toLowerCase(),w=l.useMemo(()=>i.filter(t=>B(k,t.name,t.description)),[i,k]),R=l.useMemo(()=>{const t=new Set(i.flatMap(r=>se(r)?[r.catalogId]:[]));return m.filter(r=>!t.has(r.id)&&B(k,r.name,r.description))},[m,i,k]),z=async(t,r=x)=>{v(!0),x(null);try{await t(),await M()}catch(g){throw le(g)&&E(!0),r(q(g,"Request failed")),g}finally{v(!1)}};if(!s)return e.jsx("p",{className:"text-sm text-text-secondary",children:"Skills catalog is not available."});const T=t=>{z(async()=>{await s.createSkill({catalogId:t.id,name:t.name,description:t.description,repoURL:t.repoURL,path:t.path,ref:t.ref}),d(_.Settings.SKILL_IMPORTED,{skill_name:t.name})}).catch(()=>{})},$=()=>{o||(F(null),I(null))},K=t=>{const r=s.deleteSkill;r&&(I(null),z(async()=>{await r({id:t.id}),d(_.Settings.SKILL_DELETED,{skill_name:t.name}),F(null)},I).catch(()=>{}))},H=async t=>{h(null),await z(async()=>{await s.createSkill(t)},h),setTimeout(()=>{c==null||c.showSuccess({title:`${t.name} imported`}),d(_.Settings.SKILL_IMPORTED,{skill_name:t.name})},0)},O=({key:t,name:r,description:g,action:Q})=>e.jsxs("article",{className:"flex min-h-16 items-center gap-3 border-b border-border p-3 last:border-b-0",children:[e.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg","aria-hidden":!0,children:e.jsx(U,{name:"lightbulb",className:"size-4.5 text-text-primary"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h5",{className:"truncate text-sm font-medium text-text-primary",children:r}),g?e.jsx("p",{className:"mt-0.5 truncate text-sm text-text-secondary",children:g}):null]}),Q]},t),A=w.length>0||R.length>0;return e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"text-xl font-semibold tracking-tight text-text-primary",children:"Skills"}),e.jsx("p",{className:"mt-1 text-sm text-text-secondary",children:"Use built-in skills or import custom skills from GitHub."}),u?e.jsx("p",{className:"mt-3 rounded-md border border-failure-bg/30 bg-failure-bg/10 px-3 py-2 text-sm text-failure-bg",children:u}):null,e.jsxs("div",{className:"mt-4 flex min-h-0 flex-1 flex-col gap-3",children:[e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx(Y,{query:p,setQuery:S,placeholder:"Search skills"})}),e.jsxs(L.Secondary,{type:"button",className:"shrink-0",disabled:o||f,onClick:()=>{h(null),G(!0)},children:[e.jsx(U,{name:"github",className:"size-4"}),"Import from GitHub"]})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-5 overflow-y-auto pb-1",children:[n?e.jsx("p",{className:"py-8 text-center text-sm text-text-secondary",children:"Loading…"}):null,!n&&w.length>0?e.jsxs("section",{"aria-labelledby":"enabled-skills-heading",children:[e.jsxs("h4",{id:"enabled-skills-heading",className:"mb-2 text-[0.8125rem] font-semibold uppercase text-text-secondary",children:["Enabled · ",w.length]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:w.map(t=>O({key:t.id,name:t.name,description:t.description,action:s.deleteSkill?e.jsx(L.Secondary,{size:"small",type:"button",disabled:o||f,"aria-label":`Remove ${t.name}`,onClick:()=>{I(null),F(t)},children:"Remove"}):null}))})]}):null,!n&&R.length>0?e.jsxs("section",{"aria-labelledby":"available-skills-heading",children:[e.jsxs("h4",{id:"available-skills-heading",className:"mb-2 text-[0.8125rem] font-semibold uppercase text-text-secondary",children:["Available · ",R.length]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:R.map(t=>O({key:t.id,name:t.name,description:t.description,action:e.jsx(L.Secondary,{size:"small",type:"button",disabled:o||f,"aria-label":`Enable ${t.name}`,onClick:()=>{T(t)},children:"Enable"})}))})]}):null,!n&&!A?e.jsx("div",{className:"flex flex-1 items-center justify-center rounded-xl border border-dashed border-border p-8 text-center text-sm text-text-secondary",children:k?`No skills match “${p.trim()}”.`:"No skills yet."}):null]})]}),D?e.jsx(W,{title:"Remove skill?",description:`“${D.name}” will no longer be available to your agents.`,busy:o,error:P,onCancel:$,onConfirm:()=>{K(D)}}):null,e.jsx(te,{open:a,onOpenChange:t=>{G(t),t||h(null)},onImport:H,busy:o||f,error:b})]})},ne=ae;export{ne as default};
1
+ import{C as V}from"./chunk-2UUABLZI-Dls_33ja.js";import{b5 as J,U as W,V as X,r as l,w as q,j as e,$ as Y,a2 as L,I as U,b7 as Z,as as y,al as _}from"./index-Cq_o2Abd.js";var ee=({open:s,onOpenChange:c,onImport:d,busy:p=!1,error:S})=>{const[i,N]=l.useState(""),[m,C]=l.useState(""),[n,j]=l.useState(""),[u,x]=l.useState(""),[b,h]=l.useState(""),o=()=>{N(""),C(""),j(""),x(""),h("")},v=()=>{o(),c(!1)},f=async a=>{if(a.preventDefault(),!(!i.trim()||!m.trim()||!n.trim()||!u.trim()||!b.trim()||p))try{await d({name:i.trim(),description:m.trim(),repoURL:n.trim(),path:u.trim(),ref:b.trim()}),v()}catch{}},E=!!(i.trim()&&m.trim()&&n.trim()&&u.trim()&&b.trim())&&!p;return e.jsx(Z,{open:s,onOpenChange:a=>{a||v()},title:"Import from GitHub",description:"Import a skill from a SKILL.md file in a GitHub repository.",headerIcon:e.jsx("span",{className:"flex size-11 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary",children:e.jsx(U,{name:"github",className:"size-5"})}),contentSized:!0,className:"md:max-w-2xl",children:e.jsx("form",{onSubmit:a=>void f(a),children:e.jsxs("div",{className:"space-y-5 px-5 py-5 md:px-6",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"skill-name",className:"mb-2 block text-sm font-semibold text-text-primary",children:"Name"}),e.jsx("input",{id:"skill-name",value:i,onChange:a=>{N(a.target.value)},placeholder:"release-notes",autoFocus:!0,required:!0,className:y("h-11")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"skill-description",className:"mb-2 block text-sm font-semibold text-text-primary",children:"Description"}),e.jsx("textarea",{id:"skill-description",value:m,onChange:a=>{C(a.target.value)},placeholder:"Generate release notes from merged pull requests",required:!0,rows:3,className:y("resize-y py-2.5")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"skill-repo-url",className:"mb-2 block text-sm font-semibold text-text-primary",children:"Repository URL"}),e.jsx("input",{id:"skill-repo-url",type:"url",value:n,onChange:a=>{j(a.target.value)},placeholder:"https://github.com/org/repo",required:!0,className:y("h-11")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"skill-path",className:"mb-2 block text-sm font-semibold text-text-primary",children:"Folder containing the SKILL.md"}),e.jsx("input",{id:"skill-path",value:u,onChange:a=>{x(a.target.value)},placeholder:"skills/release-notes",required:!0,className:y("h-11")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"skill-ref",className:"mb-2 block text-sm font-semibold text-text-primary",children:"Branch"}),e.jsx("input",{id:"skill-ref",value:b,onChange:a=>{h(a.target.value)},placeholder:"main",required:!0,className:y("h-11")})]}),e.jsxs("div",{className:"space-y-3",children:[S?e.jsx("p",{className:"text-failure-bg text-sm",children:S}):null,e.jsx(L.Primary,{type:"submit",disabled:!E,className:"w-full",children:"Import"})]})]})})})},te=ee,B=(s,c,d)=>!s||c.toLowerCase().includes(s)||d.toLowerCase().includes(s),se=s=>"catalogId"in s;function le(s){return typeof s=="object"&&s!==null&&Reflect.get(s,"statusCode")===424}var ae=()=>{const{skillCatalog:s}=J(),c=W(),d=X(),[p,S]=l.useState(""),[i,N]=l.useState([]),[m,C]=l.useState([]),[n,j]=l.useState(!0),[u,x]=l.useState(null),[b,h]=l.useState(null),[o,v]=l.useState(!1),[f,E]=l.useState(!1),[a,G]=l.useState(!1),[D,F]=l.useState(null),[P,w]=l.useState(null),M=l.useCallback(async()=>{if(s){j(!0),x(null);try{const[t,r]=await Promise.all([s.listSkills(),s.getSkillCatalog()]);N(t),C(r)}catch(t){x(q(t,"Failed to load skills"))}finally{j(!1)}}},[s]);l.useEffect(()=>{M()},[M]);const k=p.trim().toLowerCase(),I=l.useMemo(()=>i.filter(t=>B(k,t.name,t.description)),[i,k]),R=l.useMemo(()=>{const t=new Set(i.flatMap(r=>se(r)?[r.catalogId]:[]));return m.filter(r=>!t.has(r.id)&&B(k,r.name,r.description))},[m,i,k]),z=async(t,r=x)=>{v(!0),x(null);try{await t(),await M()}catch(g){throw le(g)&&E(!0),r(q(g,"Request failed")),g}finally{v(!1)}};if(!s)return e.jsx("p",{className:"text-sm text-text-secondary",children:"Skills catalog is not available."});const T=t=>{z(async()=>{await s.createSkill({catalogId:t.id,name:t.name,description:t.description,repoURL:t.repoURL,path:t.path,ref:t.ref}),d(_.Settings.SKILL_IMPORTED,{skill_name:t.name})}).catch(()=>{})},$=()=>{o||(F(null),w(null))},K=t=>{const r=s.deleteSkill;r&&(w(null),z(async()=>{await r({id:t.id}),d(_.Settings.SKILL_DELETED,{skill_name:t.name}),F(null)},w).catch(()=>{}))},H=async t=>{h(null),await z(async()=>{await s.createSkill(t)},h),setTimeout(()=>{c==null||c.showSuccess({title:`${t.name} imported`}),d(_.Settings.SKILL_IMPORTED,{skill_name:t.name})},0)},O=({key:t,name:r,description:g,action:Q})=>e.jsxs("article",{className:"flex min-h-16 items-center gap-3 border-b border-border p-3 last:border-b-0",children:[e.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg","aria-hidden":!0,children:e.jsx(U,{name:"lightbulb",className:"size-4.5 text-text-primary"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h5",{className:"truncate text-sm font-medium text-text-primary",children:r}),g?e.jsx("p",{className:"mt-0.5 truncate text-sm text-text-secondary",children:g}):null]}),Q]},t),A=I.length>0||R.length>0;return e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"text-xl font-semibold tracking-tight text-text-primary",children:"Skills"}),e.jsx("p",{className:"mt-1 text-sm text-text-secondary",children:"Use built-in skills or import custom skills from GitHub."}),u?e.jsx("p",{className:"mt-3 rounded-md border border-failure-bg/30 bg-failure-bg/10 px-3 py-2 text-sm text-failure-bg",children:u}):null,e.jsxs("div",{className:"mt-4 flex min-h-0 flex-1 flex-col gap-3",children:[e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx(Y,{query:p,setQuery:S,placeholder:"Search skills"})}),e.jsxs(L.Secondary,{type:"button",className:"shrink-0",disabled:o||f,onClick:()=>{h(null),G(!0)},children:[e.jsx(U,{name:"github",className:"size-4"}),"Import from GitHub"]})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-5 overflow-y-auto pb-1",children:[n?e.jsx("p",{className:"py-8 text-center text-sm text-text-secondary",children:"Loading…"}):null,!n&&I.length>0?e.jsxs("section",{"aria-labelledby":"enabled-skills-heading",children:[e.jsxs("h4",{id:"enabled-skills-heading",className:"mb-2 text-[0.8125rem] font-semibold uppercase text-text-secondary",children:["Enabled · ",I.length]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:I.map(t=>O({key:t.id,name:t.name,description:t.description,action:s.deleteSkill?e.jsx(L.Secondary,{size:"small",type:"button",disabled:o||f,"aria-label":`Remove ${t.name}`,onClick:()=>{w(null),F(t)},children:"Remove"}):null}))})]}):null,!n&&R.length>0?e.jsxs("section",{"aria-labelledby":"available-skills-heading",children:[e.jsxs("h4",{id:"available-skills-heading",className:"mb-2 text-[0.8125rem] font-semibold uppercase text-text-secondary",children:["Available · ",R.length]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:R.map(t=>O({key:t.id,name:t.name,description:t.description,action:e.jsx(L.Secondary,{size:"small",type:"button",disabled:o||f,"aria-label":`Enable ${t.name}`,onClick:()=>{T(t)},children:"Enable"})}))})]}):null,!n&&!A?e.jsx("div",{className:"flex flex-1 items-center justify-center rounded-xl border border-dashed border-border p-8 text-center text-sm text-text-secondary",children:k?`No skills match “${p.trim()}”.`:"No skills yet."}):null]})]}),D?e.jsx(V,{title:"Remove skill?",description:`“${D.name}” will no longer be available to your agents.`,busy:o,error:P,onCancel:$,onConfirm:()=>{K(D)}}):null,e.jsx(te,{open:a,onOpenChange:t=>{G(t),t||h(null)},onImport:H,busy:o||f,error:b})]})},ne=ae;export{ne as default};
@@ -1 +1 @@
1
- import{r as t,a,j as o,T as n}from"./index-BJsGMvc-.js";import{B as u}from"./chunk-OB3PAWPO-WTBtRmxH.js";function l({routes:e,...s}){const r=t.useMemo(()=>a(e),[e]);return o.jsx(u,{basename:r.basename||void 0,children:o.jsx(n,{...s,resolvedRoutes:r})})}export{l as TrueForgeUIWithRouter};
1
+ import{r as t,a,j as o,T as n}from"./index-Cq_o2Abd.js";import{B as u}from"./chunk-OB3PAWPO-dRLyZPUL.js";function l({routes:e,...s}){const r=t.useMemo(()=>a(e),[e]);return o.jsx(u,{basename:r.basename||void 0,children:o.jsx(n,{...s,resolvedRoutes:r})})}export{l as TrueForgeUIWithRouter};
@@ -1 +1 @@
1
- import{b5 as U,t as B,U as O,r as t,W as A,j as e,I as P,a2 as I,b7 as D,al as z,as as T}from"./index-BJsGMvc-.js";var V=T("h-11 shadow-sm"),L=({open:r,onOpenChange:l,onSave:b,title:c,description:N,requireApiKey:d=!0,busy:p=!1,error:f})=>{const[h,u]=t.useState(""),m=()=>{u("")};t.useEffect(()=>{r&&u("")},[r]);const w=a=>{a||m(),l(a)},n=h.trim(),x=!d||!!n,g=async a=>{if(a.preventDefault(),!(!x||p))try{await b({apiKey:n}),m(),l(!1)}catch{}};return e.jsx(D,{open:r,onOpenChange:w,title:c,description:N,contentSized:!0,headerIcon:e.jsx("span",{className:"flex size-11 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(P,{name:"search",className:"size-6"})}),children:e.jsxs("form",{className:"flex flex-col overflow-y-auto p-5 md:p-6",onSubmit:g,children:[e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"web-search-api-key",className:"mb-1.5 block text-sm font-medium text-text-primary",children:["API key",d?null:e.jsx("span",{className:"font-normal text-text-secondary",children:" (optional)"})]}),e.jsx("input",{id:"web-search-api-key",type:"password",required:d,value:h,onChange:a=>{u(a.target.value)},placeholder:d?"Parallel API key":"Leave blank to keep existing",autoFocus:!0,className:V})]})}),e.jsxs("div",{className:"mt-6 space-y-3",children:[f?e.jsx("p",{className:"text-failure-bg text-sm",children:f}):null,e.jsx(I.Primary,{type:"submit",size:"large",disabled:!x||p,className:"w-full shrink-0",children:"Save"})]})]})})},M=L,$=()=>{const{webSearchCatalog:r}=U(),l=B(),b=O(),[c,N]=t.useState([]),[d,p]=t.useState([]),[f,h]=t.useState(!0),[u,m]=t.useState(null),[w,n]=t.useState(null),[x,g]=t.useState(!1),[a,y]=t.useState(null),[o,v]=t.useState(null),S=t.useCallback(async({quiet:s=!1}={})=>{if(r){s||h(!0),m(null);try{const[i,j]=await Promise.all([r.listWebSearchProviders(),r.getWebSearchProviderCatalog()]);N(i),p(j)}catch(i){m(A(i,"Failed to load web search providers"))}finally{s||h(!1)}}},[r]);t.useEffect(()=>{S()},[S]);const C=c.length>0,k=t.useMemo(()=>{if(C)return[];const s=new Set(c.map(i=>i.catalogId));return d.filter(i=>!s.has(i.id))},[d,c,C]);if(!r)return e.jsx("p",{className:"text-sm text-text-secondary",children:"Web search provider catalog is not available."});const W=async(s,i=m)=>{g(!0),m(null);try{await s(),await S({quiet:!0})}catch(j){throw i(A(j,"Request failed")),j}finally{g(!1)}},_=async s=>{a&&(n(null),await W(async()=>{await r.createWebSearchProvider({catalogId:a.id,name:a.name,type:a.type,apiKey:s.apiKey})},n),y(null),setTimeout(()=>{l==null||l.showSuccess({title:`${a.name} configured`}),b(z.Settings.WEB_SEARCH_PROVIDER_SAVED,{provider_name:a.name,mode:"create"})},0))},F=async s=>{o&&(n(null),await W(async()=>{await r.updateWebSearchProvider({id:o.id,...s.apiKey?{apiKey:s.apiKey}:{}})},n),v(null),setTimeout(()=>{l==null||l.showSuccess({title:`${o.name} updated`}),b(z.Settings.WEB_SEARCH_PROVIDER_SAVED,{provider_name:o.name,mode:"update"})},0))},R=a!=null||o!=null,E=o!=null,K=o?`Update ${o.name}`:a?`Configure ${a.name}`:"Configure web search provider";return e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"text-xl font-semibold tracking-tight text-text-primary",children:"Web search"}),e.jsx("p",{className:"mt-1 text-sm text-text-secondary",children:"Configure a provider so agents can search the web. Only one can be active at a time."}),u?e.jsx("p",{className:"mt-3 rounded-md border border-failure-bg/30 bg-failure-bg/10 px-3 py-2 text-sm text-failure-bg",children:u}):null,e.jsx("div",{className:"mt-4 flex-1 overflow-y-auto",children:f?e.jsx("p",{className:"text-sm text-text-secondary",children:"Loading web search providers…"}):e.jsxs("div",{className:"space-y-6",children:[c.length>0?e.jsxs("section",{children:[e.jsxs("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",children:["Configured · ",c.length]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:c.map(s=>e.jsxs("article",{className:"flex flex-col gap-3 border-b border-border p-3 last:border-b-0 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(P,{name:"search",className:"size-4.5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h5",{className:"truncate text-sm font-medium text-text-primary",children:s.name}),e.jsx("p",{className:"truncate text-xs text-text-secondary",children:"Parallel web search"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2.5 sm:justify-end",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm font-medium text-success-bg",children:[e.jsx("span",{className:"size-2 rounded-full bg-success-bg","aria-hidden":!0}),"Connected"]}),e.jsx(I.Secondary,{size:"small",type:"button",disabled:x,onClick:()=>{n(null),y(null),v(s)},children:"Update"})]})]},s.id))})]}):null,C?null:e.jsxs("section",{children:[e.jsxs("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",children:["Available · ",k.length]}),k.length===0?e.jsx("p",{className:"text-sm text-text-secondary",children:d.length>0?"All catalog providers are configured.":"No web search providers in the catalog."}):e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:k.map(s=>e.jsxs("article",{className:"flex flex-col gap-3 border-b border-border p-3 last:border-b-0 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(P,{name:"search",className:"size-4.5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h5",{className:"truncate text-sm font-medium text-text-primary",children:s.name}),e.jsx("p",{className:"truncate text-xs text-text-secondary",children:"Parallel web search"})]})]}),e.jsx(I.Secondary,{type:"button",disabled:x,onClick:()=>{n(null),v(null),y(s)},children:"Configure"})]},s.id))})]})]})}),e.jsx(M,{open:R,onOpenChange:s=>{s||(n(null),y(null),v(null))},onSave:E?F:_,title:K,description:E?"Update this web search provider. Leave API key blank to keep the existing key.":"Configure this web search provider. API key is never stored in the catalog.",requireApiKey:!E,busy:x,error:w})]})},q=$;export{q as default};
1
+ import{b5 as U,U as B,V as O,r as t,w as A,j as e,I as P,a2 as I,b7 as V,al as z,as as D}from"./index-Cq_o2Abd.js";var T=D("h-11 shadow-sm"),L=({open:r,onOpenChange:l,onSave:b,title:c,description:w,requireApiKey:d=!0,busy:p=!1,error:f})=>{const[h,u]=t.useState(""),m=()=>{u("")};t.useEffect(()=>{r&&u("")},[r]);const N=a=>{a||m(),l(a)},n=h.trim(),x=!d||!!n,g=async a=>{if(a.preventDefault(),!(!x||p))try{await b({apiKey:n}),m(),l(!1)}catch{}};return e.jsx(V,{open:r,onOpenChange:N,title:c,description:w,contentSized:!0,headerIcon:e.jsx("span",{className:"flex size-11 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(P,{name:"search",className:"size-6"})}),children:e.jsxs("form",{className:"flex flex-col overflow-y-auto p-5 md:p-6",onSubmit:g,children:[e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"web-search-api-key",className:"mb-1.5 block text-sm font-medium text-text-primary",children:["API key",d?null:e.jsx("span",{className:"font-normal text-text-secondary",children:" (optional)"})]}),e.jsx("input",{id:"web-search-api-key",type:"password",required:d,value:h,onChange:a=>{u(a.target.value)},placeholder:d?"Parallel API key":"Leave blank to keep existing",autoFocus:!0,className:T})]})}),e.jsxs("div",{className:"mt-6 space-y-3",children:[f?e.jsx("p",{className:"text-failure-bg text-sm",children:f}):null,e.jsx(I.Primary,{type:"submit",size:"large",disabled:!x||p,className:"w-full shrink-0",children:"Save"})]})]})})},M=L,$=()=>{const{webSearchCatalog:r}=U(),l=B(),b=O(),[c,w]=t.useState([]),[d,p]=t.useState([]),[f,h]=t.useState(!0),[u,m]=t.useState(null),[N,n]=t.useState(null),[x,g]=t.useState(!1),[a,y]=t.useState(null),[o,v]=t.useState(null),S=t.useCallback(async({quiet:s=!1}={})=>{if(r){s||h(!0),m(null);try{const[i,j]=await Promise.all([r.listWebSearchProviders(),r.getWebSearchProviderCatalog()]);w(i),p(j)}catch(i){m(A(i,"Failed to load web search providers"))}finally{s||h(!1)}}},[r]);t.useEffect(()=>{S()},[S]);const C=c.length>0,k=t.useMemo(()=>{if(C)return[];const s=new Set(c.map(i=>i.catalogId));return d.filter(i=>!s.has(i.id))},[d,c,C]);if(!r)return e.jsx("p",{className:"text-sm text-text-secondary",children:"Web search provider catalog is not available."});const W=async(s,i=m)=>{g(!0),m(null);try{await s(),await S({quiet:!0})}catch(j){throw i(A(j,"Request failed")),j}finally{g(!1)}},_=async s=>{a&&(n(null),await W(async()=>{await r.createWebSearchProvider({catalogId:a.id,name:a.name,type:a.type,apiKey:s.apiKey})},n),y(null),setTimeout(()=>{l==null||l.showSuccess({title:`${a.name} configured`}),b(z.Settings.WEB_SEARCH_PROVIDER_SAVED,{provider_name:a.name,mode:"create"})},0))},F=async s=>{o&&(n(null),await W(async()=>{await r.updateWebSearchProvider({id:o.id,...s.apiKey?{apiKey:s.apiKey}:{}})},n),v(null),setTimeout(()=>{l==null||l.showSuccess({title:`${o.name} updated`}),b(z.Settings.WEB_SEARCH_PROVIDER_SAVED,{provider_name:o.name,mode:"update"})},0))},R=a!=null||o!=null,E=o!=null,K=o?`Update ${o.name}`:a?`Configure ${a.name}`:"Configure web search provider";return e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"text-xl font-semibold tracking-tight text-text-primary",children:"Web search"}),e.jsx("p",{className:"mt-1 text-sm text-text-secondary",children:"Configure a provider so agents can search the web. Only one can be active at a time."}),u?e.jsx("p",{className:"mt-3 rounded-md border border-failure-bg/30 bg-failure-bg/10 px-3 py-2 text-sm text-failure-bg",children:u}):null,e.jsx("div",{className:"mt-4 flex-1 overflow-y-auto",children:f?e.jsx("p",{className:"text-sm text-text-secondary",children:"Loading web search providers…"}):e.jsxs("div",{className:"space-y-6",children:[c.length>0?e.jsxs("section",{children:[e.jsxs("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",children:["Configured · ",c.length]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:c.map(s=>e.jsxs("article",{className:"flex flex-col gap-3 border-b border-border p-3 last:border-b-0 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(P,{name:"search",className:"size-4.5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h5",{className:"truncate text-sm font-medium text-text-primary",children:s.name}),e.jsx("p",{className:"truncate text-xs text-text-secondary",children:"Parallel web search"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2.5 sm:justify-end",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm font-medium text-success-bg",children:[e.jsx("span",{className:"size-2 rounded-full bg-success-bg","aria-hidden":!0}),"Connected"]}),e.jsx(I.Secondary,{size:"small",type:"button",disabled:x,onClick:()=>{n(null),y(null),v(s)},children:"Update"})]})]},s.id))})]}):null,C?null:e.jsxs("section",{children:[e.jsxs("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",children:["Available · ",k.length]}),k.length===0?e.jsx("p",{className:"text-sm text-text-secondary",children:d.length>0?"All catalog providers are configured.":"No web search providers in the catalog."}):e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card-bg",children:k.map(s=>e.jsxs("article",{className:"flex flex-col gap-3 border-b border-border p-3 last:border-b-0 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary-bg text-text-primary","aria-hidden":!0,children:e.jsx(P,{name:"search",className:"size-4.5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h5",{className:"truncate text-sm font-medium text-text-primary",children:s.name}),e.jsx("p",{className:"truncate text-xs text-text-secondary",children:"Parallel web search"})]})]}),e.jsx(I.Secondary,{type:"button",disabled:x,onClick:()=>{n(null),v(null),y(s)},children:"Configure"})]},s.id))})]})]})}),e.jsx(M,{open:R,onOpenChange:s=>{s||(n(null),y(null),v(null))},onSave:E?F:_,title:K,description:E?"Update this web search provider. Leave API key blank to keep the existing key.":"Configure this web search provider. API key is never stored in the catalog.",requireApiKey:!E,busy:x,error:N})]})},q=$;export{q as default};
@@ -1 +1 @@
1
- import{S as m}from"./chunk-OD7JCND5-BlwWGx2k.js";import{d as x,h as f,r,j as e,C as p,I as b,f as h,g as v}from"./index-BJsGMvc-.js";import"./chunk-NYCSPKHJ-BXKEzm55.js";function j({className:u}){const d=x("BrandLogo"),{open:a,setOpen:n}=f(),l=r.useRef(null),s=r.useRef(null),i=r.useRef(!1);return r.useEffect(()=>{if(!a)return;const t=o=>{var c;o.key==="Escape"&&!((c=s.current)!=null&&c.querySelector("dialog[open]"))&&n(!1)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[a,n]),r.useEffect(()=>{var t,o;if(a){i.current=!0,(t=s.current)==null||t.focus();return}i.current&&((o=l.current)==null||o.focus(),i.current=!1)},[a]),e.jsxs("div",{className:v("pointer-events-none relative h-full min-h-0 w-full",u),children:[a?e.jsx("div",{ref:s,"data-aui-compact-layout":!0,className:"pointer-events-auto absolute right-[max(1.25rem,env(safe-area-inset-right,0px))] bottom-[calc(5.25rem+env(safe-area-inset-bottom,0px))] z-[19] flex h-[min(560px,calc(100%-6.5rem-env(safe-area-inset-bottom,0px)))] max-h-[calc(100%-6.5rem)] w-[min(380px,calc(100%-2.5rem))] flex-col overflow-hidden rounded-xl border border-border bg-primary-bg shadow-[0_16px_48px_color-mix(in_oklab,var(--shadow-color)_14%,transparent)] outline-none",role:"dialog","aria-modal":!0,"aria-label":"Chat",tabIndex:-1,children:e.jsx(p,{children:e.jsx(m,{threadHeaderEnd:e.jsx("button",{type:"button","aria-label":"Close",title:"Close",className:h({variant:"ghost",size:"icon"}),onClick:()=>n(!1),children:e.jsx(b,{name:"xmark"})})})})}):null,e.jsx("button",{ref:l,type:"button",className:"pointer-events-auto absolute right-[max(1.25rem,env(safe-area-inset-right,0px))] bottom-[max(1.25rem,env(safe-area-inset-bottom,0px))] z-20 flex size-14 cursor-pointer items-center justify-center rounded-full text-sm font-medium shadow-[0_8px_24px_color-mix(in_oklab,var(--primary-button-bg)_45%,transparent)]",style:{backgroundColor:"var(--primary-button-bg)",color:"var(--primary-button-text)"},"aria-expanded":a,"aria-label":a?"Close chat":"Open chat",onClick:()=>n(t=>!t),children:a?e.jsx("span",{"aria-hidden":!0,className:"text-xl leading-none",children:"×"}):e.jsx(d,{variant:"icon",className:"size-6"})})]})}export{j as WidgetLayout};
1
+ import{S as m}from"./chunk-KIRLJDZF-D5aQQ46r.js";import{d as x,h as f,r,j as e,C as p,I as b,f as h,g as v}from"./index-Cq_o2Abd.js";import"./chunk-MTB32EHM-CWUHnCTs.js";function j({className:u}){const d=x("BrandLogo"),{open:a,setOpen:n}=f(),l=r.useRef(null),s=r.useRef(null),i=r.useRef(!1);return r.useEffect(()=>{if(!a)return;const t=o=>{var c;o.key==="Escape"&&!((c=s.current)!=null&&c.querySelector("dialog[open]"))&&n(!1)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[a,n]),r.useEffect(()=>{var t,o;if(a){i.current=!0,(t=s.current)==null||t.focus();return}i.current&&((o=l.current)==null||o.focus(),i.current=!1)},[a]),e.jsxs("div",{className:v("pointer-events-none relative h-full min-h-0 w-full",u),children:[a?e.jsx("div",{ref:s,"data-aui-compact-layout":!0,className:"pointer-events-auto absolute right-[max(1.25rem,env(safe-area-inset-right,0px))] bottom-[calc(5.25rem+env(safe-area-inset-bottom,0px))] z-[19] flex h-[min(560px,calc(100%-6.5rem-env(safe-area-inset-bottom,0px)))] max-h-[calc(100%-6.5rem)] w-[min(380px,calc(100%-2.5rem))] flex-col overflow-hidden rounded-xl border border-border bg-primary-bg shadow-[0_16px_48px_color-mix(in_oklab,var(--shadow-color)_14%,transparent)] outline-none",role:"dialog","aria-modal":!0,"aria-label":"Chat",tabIndex:-1,children:e.jsx(p,{children:e.jsx(m,{threadHeaderEnd:e.jsx("button",{type:"button","aria-label":"Close",title:"Close",className:h({variant:"ghost",size:"icon"}),onClick:()=>n(!1),children:e.jsx(b,{name:"xmark"})})})})}):null,e.jsx("button",{ref:l,type:"button",className:"pointer-events-auto absolute right-[max(1.25rem,env(safe-area-inset-right,0px))] bottom-[max(1.25rem,env(safe-area-inset-bottom,0px))] z-20 flex size-14 cursor-pointer items-center justify-center rounded-full text-sm font-medium shadow-[0_8px_24px_color-mix(in_oklab,var(--primary-button-bg)_45%,transparent)]",style:{backgroundColor:"var(--primary-button-bg)",color:"var(--primary-button-text)"},"aria-expanded":a,"aria-label":a?"Close chat":"Open chat",onClick:()=>n(t=>!t),children:a?e.jsx("span",{"aria-hidden":!0,className:"text-xl leading-none",children:"×"}):e.jsx(d,{variant:"icon",className:"size-6"})})]})}export{j as WidgetLayout};
@@ -1 +1 @@
1
- import{j as e,ad as m,ae as u,af as h,ag as j,ah as g,a2 as n}from"./index-BJsGMvc-.js";function p(a){return a.replace(/\?$/,"").replace(/^Remove /i,"Can't remove ")}var f=({title:a,description:o,confirmLabel:c="Remove",busy:i=!1,error:l=null,onCancel:t,onConfirm:d})=>{const s=l!=null&&l!=="",r=s?p(a):a;return e.jsxs(m,{open:!0,onOpenChange:x=>{x||t()},"aria-label":r,className:"max-w-md",children:[e.jsx(u,{children:e.jsxs(h,{children:[e.jsx(j,{children:r}),s?e.jsx("p",{role:"alert",className:"text-sm text-failure-bg",children:l}):e.jsx("p",{className:"text-sm text-text-secondary",children:o})]})}),e.jsx(g,{children:s?e.jsx(n.Secondary,{type:"button",onClick:t,children:"Close"}):e.jsxs(e.Fragment,{children:[e.jsx(n.Secondary,{type:"button",disabled:i,onClick:t,children:"Cancel"}),e.jsx(n.Destructive,{type:"button",disabled:i,onClick:d,children:c})]})})]})},C=f;export{C};
1
+ import{j as e,ad as m,ae as u,af as h,ag as j,ah as g,a2 as n}from"./index-Cq_o2Abd.js";function p(a){return a.replace(/\?$/,"").replace(/^Remove /i,"Can't remove ")}var f=({title:a,description:o,confirmLabel:c="Remove",busy:i=!1,error:l=null,onCancel:t,onConfirm:d})=>{const s=l!=null&&l!=="",r=s?p(a):a;return e.jsxs(m,{open:!0,onOpenChange:x=>{x||t()},"aria-label":r,className:"max-w-md",children:[e.jsx(u,{children:e.jsxs(h,{children:[e.jsx(j,{children:r}),s?e.jsx("p",{role:"alert",className:"text-sm text-failure-bg",children:l}):e.jsx("p",{className:"text-sm text-text-secondary",children:o})]})}),e.jsx(g,{children:s?e.jsx(n.Secondary,{type:"button",onClick:t,children:"Close"}):e.jsxs(e.Fragment,{children:[e.jsx(n.Secondary,{type:"button",disabled:i,onClick:t,children:"Cancel"}),e.jsx(n.Destructive,{type:"button",disabled:i,onClick:d,children:c})]})})]})},C=f;export{C};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SettingsBuilder-MZNSGTCG-DW5WrGhz.js","./index-Cq_o2Abd.js","./index-B01pXqvC.css","./SchedulesPage-YFIJGKZO-BbTOcGO5.js","./chunk-WG6NEBF3-D6-L7Ege.js","./EnvironmentsPage-FCDIVAKH-Crq_Zjm_.js"])))=>i.map(i=>d[i]);
2
+ import{u as P,b as B,d as t,e as L,r as a,j as s,S as c,P as z,I as l,f as d,g as I,_ as u}from"./index-Cq_o2Abd.js";import{N as T,T as k,S as D,A as R}from"./chunk-MTB32EHM-CWUHnCTs.js";var V=a.lazy(()=>u(()=>import("./SettingsBuilder-MZNSGTCG-DW5WrGhz.js"),__vite__mapDeps([0,1,2]),import.meta.url)),F=a.lazy(()=>u(()=>import("./SchedulesPage-YFIJGKZO-BbTOcGO5.js"),__vite__mapDeps([3,4,1,2]),import.meta.url).then(n=>({default:n.SchedulesPage}))),H=a.lazy(()=>u(()=>import("./EnvironmentsPage-FCDIVAKH-Crq_Zjm_.js"),__vite__mapDeps([5,4,1,2]),import.meta.url).then(n=>({default:n.EnvironmentsPage})));function M({className:n,threadHeaderEnd:j}){const r=P(),e=B(),f=t("ClearChatButton"),g=t("ResetAgentBuilderButton"),v=t("AgentDetailsPage"),b=t("AgentsLibrary"),h=t("SessionsPage"),N=t("ShareChatButton"),y=t("SaveAgentButton"),A=t("SelectAgentEmptyState"),S=t("UserAvatar"),i=(e==null?void 0:e.mode.status)==="idle",C=(e==null?void 0:e.settingsOpen)===!0,o=(e==null?void 0:e.libraryOpen)===!0,O=(e==null?void 0:e.sessionsOpen)===!0,m=(e==null?void 0:e.schedulesOpen)===!0,x=(e==null?void 0:e.environmentsOpen)===!0,w=L(),p=(e==null?void 0:e.isNewChatEnabled)!==!1;a.useEffect(()=>{i||Promise.resolve(r.threads().switchToNewThread()).catch(()=>{})},[r,i]);const E=()=>{if(e==null||e.setLibraryOpen(!1),e==null||e.setSessionsOpen(!1),e!=null&&e.isComposerEnabled){e.openDraft();return}e==null||e.setSettingsOpen(!1),e==null||e.setSchedulesOpen(!1),e==null||e.setEnvironmentsOpen(!1),Promise.resolve(r.threads().switchToNewThread()).catch(()=>{})},_=()=>{e==null||e.setLibraryOpen(!1),e==null||e.setSessionsOpen(!1),e!=null&&e.isComposerEnabled&&e.openAgentBuilder()};return s.jsxs("div",{className:I("relative flex h-full min-h-0 flex-col",n),children:[C?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(a.Suspense,{fallback:s.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[s.jsx(c,{size:28,className:"text-text-primary"}),s.jsx("span",{className:"sr-only",children:"Loading"})]}),children:s.jsx(V,{})})}):O?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(h,{})}):o&&(e==null?void 0:e.libraryAgentId)!=null?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(v,{agentId:e.libraryAgentId},e.libraryAgentId)}):o?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(b,{})}):m?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(a.Suspense,{fallback:s.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[s.jsx(c,{size:28,className:"text-text-primary"}),s.jsx("span",{className:"sr-only",children:"Loading"})]}),children:s.jsx(F,{})})}):x?s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(a.Suspense,{fallback:s.jsxs("div",{className:"flex h-full items-center justify-center",role:"status","aria-live":"polite","aria-busy":"true",children:[s.jsx(c,{size:28,className:"text-text-primary"}),s.jsx("span",{className:"sr-only",children:"Loading"})]}),children:s.jsx(H,{})})}):s.jsxs(s.Fragment,{children:[s.jsx(z,{start:s.jsxs(s.Fragment,{children:[p&&!w?s.jsx("button",{type:"button","aria-label":"New Chat",title:"New Chat",className:d({variant:"ghost",size:"icon"}),onClick:E,children:s.jsx(l,{name:"square-pen"})}):null,p&&(e!=null&&e.isComposerEnabled)?s.jsx("button",{type:"button","aria-label":"New Agent",title:"New Agent",className:d({variant:"ghost",size:"icon"}),onClick:_,children:s.jsx(l,{name:"agent-2"})}):null]}),title:s.jsx(T,{}),end:s.jsxs(s.Fragment,{children:[s.jsx(g,{}),s.jsx(N,{}),s.jsx(f,{}),s.jsx(y,{}),j]})}),s.jsx("div",{className:"min-h-0 flex-1",children:i?s.jsx(A,{}):s.jsx(k,{})})]}),s.jsxs("footer",{className:"flex shrink-0 items-center justify-between border-t border-border px-2 py-1.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[o||m||x?s.jsxs("button",{type:"button",className:d({variant:"ghost",size:"small"}),onClick:()=>{e==null||e.setLibraryOpen(!1),e==null||e.setSchedulesOpen(!1),e==null||e.setEnvironmentsOpen(!1)},children:[s.jsx(l,{name:"arrow-left"}),"Back to chat"]}):null,s.jsx(S,{})]}),s.jsx(D,{},"shell-actions")]}),e!=null&&e.agentConfigOpen?s.jsx("aside",{role:"dialog","aria-label":"Agent Config",className:"absolute inset-0 z-20 border-l border-border shadow-xl",children:s.jsx(R,{showClose:!0})}):null]})}export{M as S};
@@ -0,0 +1 @@
1
+ import{b as F,j as t,a4 as me,r as m,bd as fe,d as b,be as A,bf as he,bg as pe,bh as ge,bi as xe,bj as B,bk as J,k as ne,u as se,bl as U,bm as be,bn as ve,bo as Ce,bp as Se,bq as je,b3 as we,c as ye,U as oe,br as ke,bs as Y,bt as re,bu as ae,bv as Ie,l as ie,V as X,bw as Q,al as T,bx as $,am as Ae,by as Me,bz as Re,bA as Ee,bB as Ne,bC as P,a2 as Z,bD as Te,bE as Pe,bF as De,bG as Le,bb as Oe,ar as le,bH as _e,bI as ce,bJ as Fe,bK as Ue,bL as H,bM as Be,bN as He,bO as Ve,bP as We,i as ze,W as qe,p as ue,s as Qe,bQ as Ke,bR as Ge,bS as Je,bT as Ye,I as W,f as K,g as _,bU as G,bV as Xe,O as $e,bW as Ze}from"./index-Cq_o2Abd.js";function et(){var g;const{pending:s}=re(),e=_e(),[n,a]=m.useState({approvalId:null,index:0}),o=m.useRef(null),c=s.length,u=n.approvalId==null?-1:s.findIndex(h=>h.approvalId===n.approvalId),i=u>=0?u:c===0?0:Math.min(n.index,c-1),r=(g=s[i])==null?void 0:g.approvalId;m.useEffect(()=>{const h=r??null;n.approvalId===h&&n.index===i||a({approvalId:h,index:i})},[r,i,n.approvalId,n.index]),m.useEffect(()=>{if(r==null||e==null){r==null&&(o.current=null);return}o.current!==r&&(o.current=r,e.focus(r))},[r,e]);const l=m.useCallback(()=>{var v;const h=Math.max(0,i-1);a({approvalId:((v=s[h])==null?void 0:v.approvalId)??null,index:h})},[s,i]),f=m.useCallback(()=>{var v;const h=Math.min(Math.max(c-1,0),i+1);a({approvalId:((v=s[h])==null?void 0:v.approvalId)??null,index:h})},[c,s,i]),p=m.useCallback(()=>{r==null||e==null||e.focus(r)},[r,e]);return{count:c,index:i,canPrev:i>0,canNext:i<c-1,goPrev:l,goNext:f,focusCurrent:p}}function tt(){const s=b("ApprovalNavBanner"),{count:e,index:n,canPrev:a,canNext:o,goPrev:c,goNext:u,focusCurrent:i}=et();return e===0?null:t.jsx(s,{total:e,current:n+1,canPrev:a,canNext:o,onPrev:c,onNext:u,onFocusCurrent:i})}var O={radioValue:"",custom:""};function nt({disabled:s=!1}){const e=b("AskUserPrompt"),{pending:n,respond:a}=Y(),o=X(),c=U(),u=n[0],i=m.useMemo(()=>u==null?[]:[{id:u.toolCallId,question:u.question??"Answer required",options:u.options??[]}],[u]),[r,l]=m.useState(0),[f,p]=m.useState({});m.useEffect(()=>{l(0),p({})},[u==null?void 0:u.toolCallId]);const g=Math.min(r,Math.max(i.length-1,0)),h=i[g],v=h==null?O:f[h.id]??O,S=m.useCallback(y=>{const k=f[y]??O;return k.radioValue===Q?k.custom.trim():k.radioValue.trim()},[f]),x=m.useMemo(()=>i.every(y=>S(y.id)),[S,i]),j=v.radioValue===Q?v.custom.trim():v.radioValue.trim(),w=c||s||h==null||j.length===0,I=w||!x,R=m.useCallback((y,k)=>{p(E=>({...E,[y]:{...E[y]??O,...k}}))},[]),M=m.useCallback(()=>{if(s||u==null||!x)return;const y=S(u.toolCallId);if(!y)return;const k=f[u.toolCallId]??O;o(T.AskUser.SUBMITTED,{tool_call_id:u.toolCallId,question_count:i.length,is_custom_option:k.radioValue===Q}),a({toolCallId:u.toolCallId,content:y})},[x,f,s,S,u,i.length,a,o]);return u==null||h==null?null:t.jsx(e,{questions:i,readOnly:c||s,currentQuestion:h,currentQuestionIndex:g,currentAnswer:v,totalQuestions:i.length,isMultiQuestion:i.length>1,isLastQuestion:g===i.length-1,allQuestionsAnswered:x,isSubmitDisabled:w,isSubmitAllDisabled:I,onCurrentQuestionIndexChange:l,onCurrentAnswerChange:R,onSubmit:M})}function st(s){var a,o,c;const e=s.thread.messages,n=e[e.length-1];return(n==null?void 0:n.role)!=="assistant"||((a=n.status)==null?void 0:a.type)!=="requires-action"?!1:((c=(o=n.metadata)==null?void 0:o.custom)==null?void 0:c.pendingMcpAuth)===!0}function ot(){const s=A(st),{pending:e}=Y(),{pending:n}=re(),a=ae();if(s)return{kind:"mcp"};const o=e[0];if(o!=null){const c=o.toolName;return c!=null&&(a==null?void 0:a[c])!=null?{kind:"custom",toolName:c}:{kind:"ask-user"}}return n.length>0?{kind:"approval"}:{kind:"compose"}}function rt({disabled:s=!1}){const e=ae(),{pending:n,respond:a}=Y(),o=U(),c=n[0],u=m.useCallback(r=>{if(s||c==null)return;const l=r.trim();l&&a({toolCallId:c.toolCallId,content:l})},[s,c,a]);if(c==null||c.toolName==null)return null;const i=e==null?void 0:e[c.toolName];return i==null?null:t.jsx(i,{args:c.args??{},disabled:o||s,onSubmit:u})}function at({servers:s,onContinue:e,readOnly:n}){const a=b("McpAuthPrompt"),{handleAuthorize:o}=Oe(),{refreshConnectors:c}=le(),[u,i]=m.useState(()=>new Set),r=m.useRef(u),[l,f]=m.useState(!1),p=m.useRef(!1),g=m.useRef(0);m.useEffect(()=>()=>{g.current+=1},[]);const h=()=>{n||p.current||(p.current=!0,f(!0),e().catch(()=>{p.current=!1,f(!1)}))},v=S=>{const x=g.current;o(S,j=>{if(x!==g.current||!j)return;const w=new Set([...r.current,S]);r.current=w,i(w),c(),s.every(I=>w.has(I.id))&&h()})};return t.jsx(a,{servers:s,connectedServerIds:u,continueLoading:l,onConnect:v,onContinue:h,readOnly:n})}function it({disabled:s=!1}){const e=b("McpAuthPrompt"),{pending:n,resume:a}=Ie(),o=U(),c=ie();if(!n)return null;if(c){const i=JSON.stringify(n.mcpServers.map(r=>r.id));return t.jsx(at,{servers:n.mcpServers,onContinue:a,readOnly:o||s},i)}const u=i=>{const r=n.mcpServers.find(l=>l.id===i);r!=null&&r.authUrl&&window.open(r.authUrl,"_blank","noopener,noreferrer")};return t.jsx(e,{servers:n.mcpServers,onConnect:u,onContinue:()=>{s||a()},readOnly:o||s})}function lt(s){var n;const e=s.items;if(e.length>0){const a=[];let o=0;for(const c of Array.from(e)){if(c.kind!=="file")continue;const u=((n=c.webkitGetAsEntry)==null?void 0:n.call(c))??null;if((u==null?void 0:u.isDirectory)===!0){o+=1;continue}const i=c.getAsFile();i!=null&&a.push(i)}return{files:a,rejectedDirectoryCount:o}}return{files:Array.from(s.files),rejectedDirectoryCount:0}}function ct({disabled:s,hasText:e,hasAttachments:n,requiresModel:a,hasModel:o}){return!s&&(e||n)&&(!a||o)}function ee({placeholder:s,connectedToBanner:e=!1}){var D,L;const n=b("ComposerShell"),a=se(),o=F(),c=X(),u=A(d=>d.threadListItem.remoteId),i=A(d=>d.composer.text.trim().length>0),r=A(d=>d.composer.attachments.length),l=r>0,f=i||l,{agentSpec:p}=ce(),g=o==null||o.mode.status==="active"&&o.mode.isMutable,h=!!((L=(D=p==null?void 0:p.model)==null?void 0:D.name)!=null&&L.trim()),{isBusy:v,send:S,resetBusy:x}=Fe(),j=J(),w=Ue(),I=oe(),R=m.useRef(null),M=!j,y=ct({disabled:M,hasText:i,hasAttachments:l,requiresModel:g,hasModel:h}),k=(o==null?void 0:o.mode.status)==="active"?{agentId:o.mode.agentId,agentName:o.mode.agentName}:{},E=()=>{var d;y&&(c(T.Message.SENT,H({has_text:i,has_attachments:l,attachment_count:r,requires_model:g,model:(d=p==null?void 0:p.model)==null?void 0:d.name},{sessionId:u,...k})),S(()=>a.composer().send()))},z=d=>{d.key!=="Enter"||d.shiftKey||d.nativeEvent.isComposing||y&&(d.preventDefault(),E())};return t.jsxs(t.Fragment,{children:[t.jsx("input",{ref:R,type:"file",multiple:!0,hidden:!0,onChange:d=>{const C=d.target.files;if(C){c(T.Attachment.PICKED,H({file_count:C.length},{sessionId:u,...k}));for(const N of C)a.composer().addAttachment(N).catch(q=>{I==null||I.showError(q)})}d.target.value=""}}),t.jsx(P.AttachmentDropzone,{disabled:M,"data-slot":"aui_composer-attachment-dropzone",className:"w-full rounded-[0.75rem] transition-[box-shadow] data-[dragging=true]:ring-focus-ring/20 data-[dragging=true]:ring-3",onDropCapture:d=>{if(M)return;const C=d.dataTransfer;if(C==null)return;const{files:N,rejectedDirectoryCount:q}=lt(C);q>0&&(I==null||I.showError(new Error("Folders cannot be attached. Attach individual files instead."))),N.length!==0&&c(T.Attachment.PICKED,H({file_count:N.length},{sessionId:u,...k}))},children:t.jsx(P.Root,{"data-slot":"aui_composer-root",className:"w-full",onSubmit:d=>{d.preventDefault(),E()},children:t.jsx(n,{className:e?"rounded-t-none border-t-0 focus-within:ring-0":void 0,attachments:t.jsx(Be,{}),input:t.jsx(P.Input,{"data-slot":"aui_composer-input",placeholder:s,disabled:M,submitMode:"enter",onKeyDown:z,"aria-label":"Message input",className:"text-text-primary placeholder:text-text-secondary/80 max-h-[10lh] min-h-10 w-full resize-none overflow-y-auto rounded-lg border-none bg-transparent px-1 py-1 text-base leading-normal shadow-none outline-none disabled:cursor-not-allowed"}),disabled:M,canSubmit:y,hasContent:f,isRunning:v,onSubmit:E,onCancel:j?()=>{c(T.Message.CANCELLED,H(void 0,{sessionId:u,...k})),x(),w()}:void 0,onAttach:j?()=>{var d;return(d=R.current)==null?void 0:d.click()}:void 0})})})]})}function V({placeholder:s,connectedToBanner:e=!1}){const n=F(),a=b("ComposerLeftSection"),o=b("ComposerRightSection"),c=$("ComposerLeftSection"),u=$("ComposerRightSection"),i=b("DraftComposerLeftSection"),r=b("DraftComposerRightSection");return(n==null?void 0:n.mode.status)==="active"&&n.mode.isMutable?t.jsx(Ae,{children:t.jsx(Me,{overrides:{ComposerLeftSection:c?i:a,ComposerRightSection:u?r:o},children:t.jsx(ee,{placeholder:s,connectedToBanner:e})})}):t.jsx(ee,{placeholder:s,connectedToBanner:e})}function ut({placeholder:s="Ask anything... (Shift+Enter for new line)"}){const e=ot(),n=J(),a=e.kind==="mcp"?t.jsx(it,{disabled:!n}):e.kind==="custom"?t.jsx(rt,{disabled:!n}):e.kind==="ask-user"?t.jsx(nt,{disabled:!n}):e.kind==="approval"?t.jsx(tt,{}):null;return a==null?t.jsx(V,{placeholder:s}):e.kind==="approval"?t.jsxs("div",{"data-slot":"aui_composer-pause","data-pause-kind":e.kind,className:"flex w-full flex-col",children:[a,t.jsx(V,{placeholder:s,connectedToBanner:!0})]}):e.kind==="mcp"?t.jsxs("div",{"data-slot":"aui_composer-pause","data-pause-kind":e.kind,className:"relative flex w-full flex-col",children:[t.jsx("div",{className:"pb-2",children:a}),t.jsx("div",{className:"relative z-10 -mt-3",children:t.jsx(V,{placeholder:s})})]}):t.jsxs("div",{"data-slot":"aui_composer-pause","data-pause-kind":e.kind,className:"flex w-full flex-col",children:[a,t.jsx("div",{className:"relative z-10 -mt-1",children:t.jsx(V,{placeholder:s})})]})}var dt=200,te='[data-slot="aui_thread-viewport"]';function mt(){const s=b("HistoryLoader"),{hasOlderHistory:e,isLoadingOlderHistory:n,loadOlderHistory:a}=be(),[o,c]=m.useState(null),u=m.useRef(!1),i=m.useCallback(async()=>{if(u.current)return;u.current=!0;const r=(o==null?void 0:o.closest(te))??null,l=(r==null?void 0:r.scrollHeight)??0,f=(r==null?void 0:r.scrollTop)??0;try{await a(),requestAnimationFrame(()=>{if(r==null)return;const p=r.scrollHeight-l;p>0&&r.scrollTo({top:f+p,behavior:"instant"})})}catch{}finally{u.current=!1}},[o,a]);return m.useEffect(()=>{if(o==null||!e)return;const r=o.closest(te),l=new IntersectionObserver(f=>{f.some(p=>p.isIntersecting)&&i()},{root:r,rootMargin:`${dt}px 0px 0px 0px`});return l.observe(o),()=>l.disconnect()},[o,e,i]),e?t.jsx(s,{ref:c,isLoading:n}):null}function ft(){const s=b("ResumeUnavailable");return Se()?t.jsx(s,{}):null}function ht(){return A(e=>{var n;return(((n=e.message.attachments)==null?void 0:n.length)??0)>0})?t.jsx("div",{className:"pointer-events-none mb-2 opacity-90",children:t.jsx(He,{})}):null}function pt(){const s=b("UserMessageEdit"),e=b("MessageTimestamp"),n=U(),a=J(),o=A(r=>r.message.createdAt),{cancel:c,disabled:u}=Re(),{disabled:i}=Ee();return t.jsx(Ne.Root,{"data-role":"user",children:t.jsx(P.Root,{"data-slot":"aui_user-edit-composer-root",className:"fade-in slide-in-from-bottom-1 animate-in flex w-full justify-end px-2 duration-150",children:t.jsx(s,{timestamp:t.jsx(e,{createdAt:o}),attachments:t.jsx(ht,{}),input:t.jsx("div",{className:"mt-1 rounded border border-border bg-secondary-bg p-2 text-text-primary",children:t.jsx(P.Input,{"data-slot":"aui_user-edit-input",disabled:n||!a,submitMode:"enter","aria-label":"Edit message",className:"max-h-32 min-h-10 w-full resize-none border-none bg-transparent p-0 text-base leading-[1.34] outline-none focus:shadow-none"})}),footer:t.jsxs("div",{className:"flex items-center justify-end gap-2",children:[t.jsx(Z.Secondary,{type:"button",disabled:u,onClick:c,children:"Cancel"}),t.jsx(P.Send,{asChild:!0,children:t.jsx(Z.Primary,{type:"submit",disabled:i||n||!a,children:"Save & Rerun"})})]})})})})}function gt(){const s=ne(),e=se(),n=A(i=>i.threadListItem.remoteId),a=A(i=>i.threadListItem.title),o=U(),c=m.useRef(!1),u=m.useRef(void 0);m.useEffect(()=>{u.current=void 0},[n]),m.useEffect(()=>{const i=c.current&&!o;if(c.current=o,!i||s==null||n==null||u.current===n)return;if(a!=null&&a.trim()!==""){u.current=n;return}let r=!1;return s.getSession({sessionId:n}).then(l=>{if(r)return;const f=typeof l.title=="string"?l.title.trim():"";if(f.length!==0)return u.current=n,e.threadListItem().rename(f)}).catch(()=>{}),()=>{r=!0}},[e,o,n,s,a])}var de="trueforge.file-preview-width";function xt(){try{const s=sessionStorage.getItem(de);if(s==null)return null;const e=Number(s);return Number.isFinite(e)?e:null}catch{return null}}function bt(s){try{sessionStorage.setItem(de,String(Math.round(s)))}catch{}}function vt(){const s=je(),e=b("FilePreviewPanel"),n=we(),a=ye(),o=oe(),[c,u]=m.useState(0),[i,r]=m.useState(!1),[l,f]=m.useState(xt),p=ke(s.target,c),g=s.target,h=s.presentation==="full"?"full":n||a?"overlay":"side";if(m.useLayoutEffect(()=>{var w;if(g==null||h!=="side")return;const x=((w=document.querySelector('[data-slot="aui_file-preview-row"]'))==null?void 0:w.getBoundingClientRect().width)??0;if(x<=0)return;const j=l==null?Te(x):Pe({requested:l,rowWidth:x});(l==null||Math.abs(j-l)>1)&&f(j)},[h,g,l]),g==null)return null;const v=p.view.status==="error",S=()=>{i||(r(!0),(async()=>{try{const x=p.blob??await g.load();De(x,Le(g.path))}catch(x){o!=null?o.showError(x):console.error("Failed to download sandbox file",x)}finally{r(!1)}})())};return t.jsx(e,{name:g.name,placement:h,view:p.view,onClose:s.close,onDownload:S,onEnterFullPage:()=>s.setPresentation("full"),onExitFullPage:()=>s.setPresentation("panel"),downloadBusy:i,...h==="side"&&l!=null?{widthPx:l}:{},...h==="side"?{onWidthChange:x=>{f(x),bt(x)}}:{},...v?{onRetry:()=>u(x=>x+1)}:{}})}function Ct({children:s}){return t.jsx("div",{className:"animate-in fade-in slide-in-from-bottom-1 fill-mode-both duration-200",children:s})}function St({isEditing:s}){return A(n=>n.message.role)==="user"?s?t.jsx(pt,{}):t.jsx(ve,{}):t.jsx(Ce,{})}function jt({composer:s}){m.useEffect(()=>{fe()},[]),gt();const e=F(),n=b("WelcomeScreen"),a=b("MessageListSkeleton"),o=b("ScrollToBottomButton"),c=b("MessageGroup"),u=b("ThreadComposerAreaShell"),i=b("ThreadRootShell"),r=b("ThreadViewportShell"),l=A(he),f=A(g=>g.thread.isLoading),p=(e==null?void 0:e.mode.status)==="active"?e.mode.agentName!=null&&e.mode.agentName.length>0?e.mode.agentName:e.mode.isMutable&&e.mode.isCreateAgent?"Start building a new Agent":void 0:void 0;return t.jsx(pe,{children:t.jsx(ge,{children:t.jsx(xe,{children:t.jsx(B.Root,{asChild:!0,children:t.jsx(i,{children:t.jsxs("div",{"data-slot":"aui_file-preview-row",className:"relative flex min-h-0 w-full min-w-0 flex-1",children:[t.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[t.jsx(B.Viewport,{asChild:!0,autoScroll:!0,children:t.jsxs(r,{isEmpty:l,children:[l&&t.jsx(n,{heading:p}),l&&!f&&s,f?t.jsx(a,{}):!l&&t.jsxs(t.Fragment,{children:[t.jsx(mt,{}),t.jsxs(c,{children:[t.jsx(B.Messages,{children:({message:g})=>t.jsx(Ct,{children:t.jsx(St,{isEditing:g.role==="user"&&g.composer.isEditing})})}),t.jsx(ft,{})]})]})]})}),!f&&!l&&t.jsxs(u,{isEmpty:l,children:[t.jsx(B.ScrollToBottom,{asChild:!0,children:t.jsx(o,{})}),s]})]}),t.jsx(vt,{})]})})})})})})}function yt(){const s=F();return(s==null?void 0:s.sessionAccessError)!=null?t.jsx(me,{title:"Unable to load session",description:s.sessionAccessError,className:"bg-primary-bg"}):t.jsx(jt,{composer:t.jsx(ut,{})})}function kt({className:s}){const e=Xe(),n=A(c=>c.threadListItem.title);if(e===null)return null;const a=(n==null?void 0:n.trim())??"",o=e.allowThreadTitle&&a.length>0?a:e.name;return t.jsxs("h1",{className:_("flex min-w-0 items-center gap-1.5",Ze,s),children:[t.jsx("span",{className:"truncate",title:o,children:o}),e.isEditing?t.jsx($e,{content:"Try changes here, then choose Update agent to save.",side:"bottom",children:t.jsxs("span",{className:"border-warning-bg/40 bg-warning-bg/10 text-warning-bg inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium",children:[t.jsx(W,{name:"pencil",className:"size-3"}),"Editing"]})}):null]})}function It({className:s,labeled:e=!1,onAction:n}){const a=F(),o=X(),c=ie(),u=ue(),{mode:i,setTheme:r}=Je(),l=b("ShellActionsActionSlot"),f=i==="dark",p=f?"Light":"Dark",g=Ye({catalog:c,capabilities:u}),h="hover:bg-secondary-button-hover hover:text-ghost-button-text";return t.jsxs("div",{className:_("flex shrink-0 items-center gap-1",e?"w-full flex-col items-center gap-1 text-sidebar-text":"text-text-primary",s),children:[t.jsxs("a",{href:"https://trueforge.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",title:"Documentation",className:K({variant:"ghost",size:e?void 0:"icon",className:_(h,e&&G)}),onClick:()=>n==null?void 0:n(),children:[t.jsx(W,{name:"book-open",size:e?14:void 0}),e?t.jsx("span",{className:"text-center",children:"Docs"}):null]}),t.jsxs("button",{type:"button","aria-label":f?"Switch to light theme":"Switch to dark theme",title:f?"Light theme":"Dark theme",className:K({variant:"ghost",size:e?void 0:"icon",className:_(h,e&&G)}),onClick:()=>{r(f?"light":"dark"),n==null||n()},children:[t.jsx(W,{name:f?"sun":"moon",size:e?14:void 0}),e?t.jsx("span",{className:"text-center",children:p}):null]}),a!=null&&g?t.jsxs("button",{type:"button","aria-label":"Settings",title:"Settings","aria-expanded":a.settingsOpen,"aria-current":a.settingsOpen?"page":void 0,className:K({variant:"ghost",size:e?void 0:"icon",className:_(h,e&&G,a.settingsOpen&&"bg-primary-button-bg font-medium text-primary-button-text hover:bg-primary-button-hover hover:text-primary-button-text")}),onClick:()=>{a.settingsOpen||o(T.Settings.OPENED),a.setSettingsOpen(!0),n==null||n()},children:[t.jsx(W,{name:"settings",size:e?14:void 0}),e?t.jsx("span",{className:"text-center",children:"Settings"}):null]}):null,t.jsx(l,{})]})}function At({showClose:s=!1}){var D,L;const{agentSpec:e}=ce(),n=Ve(),a=We(),o=ze(),c=o.mode.status==="active"?o.mode.agentId:void 0,{allows:u}=qe({resourceType:"agent",resourceIds:c==null?[]:[c]}),i=u(c,"MANAGE"),r=ne(),l=ue(),f=le(),p=b("AgentConfigPanel"),g=b("AgentConfigEditors"),[h,v]=m.useState(null),S=Qe(o.mode),{draft:x,flush:j}=Ke(),w=m.useCallback(()=>{j(),a(),o.setAgentConfigOpen(!1)},[a,j,o]);m.useEffect(()=>{S&&f.ensureLoaded()},[f,S]),m.useEffect(()=>{i||v(null)},[i]),m.useEffect(()=>{if(!s||!o.agentConfigOpen)return;const d=C=>{!C.defaultPrevented&&C.key==="Escape"&&h===null&&document.querySelector("dialog[open]")===null&&w()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[w,h,o.agentConfigOpen,s]);const I=m.useRef({flushAgentSpec:a,flushInstructions:j});I.current={flushAgentSpec:a,flushInstructions:j},m.useEffect(()=>()=>{const{flushAgentSpec:d,flushInstructions:C}=I.current;C();try{d()}catch{}},[]);const R=m.useCallback(({next:d,instructions:C})=>{var N;if(i){if(d.skills&&d.skills.length>0&&(l==null?void 0:l.sandbox.enabled)===!0){n==null||n({...d,instructions:C||void 0,config:{...d.config,sandbox:{...(N=d.config)==null?void 0:N.sandbox,enabled:!0}}});return}n==null||n({...d,instructions:C||void 0})}},[i,l==null?void 0:l.sandbox.enabled,n]),M=m.useCallback(d=>{R({next:d,instructions:x})},[R,x]),y=m.useCallback(d=>{e!==null&&R({next:Ge({spec:e,messages:d.messages}),instructions:d.instructions})},[e,R]),k=m.useCallback(async d=>(r==null?void 0:r.getMcpTools)===void 0?[]:r.getMcpTools({connectorId:d}),[r]),E=m.useCallback(async d=>{var C;return(C=r==null?void 0:r.getMcpConnector)==null?void 0:C.call(r,{connectorId:d})},[r]);if(!S||e===null||s&&!o.agentConfigOpen)return null;const z=f.models.find(d=>d.name===e.model.name);return t.jsxs(t.Fragment,{children:[t.jsx(p,{spec:e,model:z,models:f.models,modelsLoading:f.loading,modelsError:f.error,skills:f.skills,skillsAvailable:(l==null?void 0:l.skill.enabled)===!0,webSearchAvailable:((D=l==null?void 0:l.webSearch)==null?void 0:D.enabled)===!0,instructions:x,onOpenEditor:d=>{i&&v(d)},onChange:M,disabled:!i,onClose:s?w:void 0}),t.jsx(g,{editor:h,spec:e,models:f.models,connectors:f.connectors,skills:f.skills,loading:f.loading,error:f.error,skillsDisabled:(l==null?void 0:l.skill.enabled)!==!0,sandboxAvailable:(l==null?void 0:l.sandbox.enabled)===!0,webSearchAvailable:((L=l==null?void 0:l.webSearch)==null?void 0:L.enabled)===!0,instructions:x,onInstructionsSave:y,...(r==null?void 0:r.getMcpConnector)===void 0?{}:{loadMcpConnector:E},loadMcpTools:k,onRefreshConnectors:f.refreshConnectors,onChange:M,onClose:()=>v(null)})]})}export{At as A,kt as N,It as S,yt as T};
@@ -1,4 +1,4 @@
1
- import{r as i}from"./index-BJsGMvc-.js";/**
1
+ import{r as i}from"./index-Cq_o2Abd.js";/**
2
2
  * react-router v7.18.4
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
@@ -1 +1 @@
1
- import{aC as o,j as t,g as s}from"./index-BJsGMvc-.js";var u={default:"border-border bg-card-bg text-text-primary",success:"border-success-bg/30 bg-success-bg/10 text-success-bg",info:"border-primary-button-bg/30 bg-primary-button-bg/10 text-primary-button-bg",warning:"border-warning-bg/40 bg-warning-bg/10 text-warning-bg",destructive:"border-failure-bg/30 bg-failure-bg/10 text-failure-bg",outline:"border-border bg-transparent text-text-secondary"},l={default:"bg-text-secondary",success:"bg-success-bg",info:"bg-primary-button-bg",warning:"bg-warning-bg",destructive:"bg-failure-bg",outline:"bg-text-secondary"},c={rounded:"rounded-sm",pill:"rounded-full"},x={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-0.5 text-xs"},m=o.forwardRef(({className:n,variant:e="default",shape:r="rounded",size:a="sm",dot:b=!1,children:d,...g},i)=>t.jsxs("span",{ref:i,"data-slot":"badge","data-variant":e,"data-shape":r,"data-size":a,className:s("inline-flex items-center gap-1.5 border font-medium leading-normal",u[e],c[r],x[a],n),...g,children:[b?t.jsx("span",{className:s("size-1.5 shrink-0 rounded-full",l[e]),"aria-hidden":!0}):null,d]}));m.displayName="Badge";export{m as B};
1
+ import{aC as o,j as t,g as s}from"./index-Cq_o2Abd.js";var u={default:"border-border bg-card-bg text-text-primary",success:"border-success-bg/30 bg-success-bg/10 text-success-bg",info:"border-primary-button-bg/30 bg-primary-button-bg/10 text-primary-button-bg",warning:"border-warning-bg/40 bg-warning-bg/10 text-warning-bg",destructive:"border-failure-bg/30 bg-failure-bg/10 text-failure-bg",outline:"border-border bg-transparent text-text-secondary"},l={default:"bg-text-secondary",success:"bg-success-bg",info:"bg-primary-button-bg",warning:"bg-warning-bg",destructive:"bg-failure-bg",outline:"bg-text-secondary"},c={rounded:"rounded-sm",pill:"rounded-full"},x={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-0.5 text-xs"},m=o.forwardRef(({className:n,variant:e="default",shape:r="rounded",size:a="sm",dot:b=!1,children:d,...g},i)=>t.jsxs("span",{ref:i,"data-slot":"badge","data-variant":e,"data-shape":r,"data-size":a,className:s("inline-flex items-center gap-1.5 border font-medium leading-normal",u[e],c[r],x[a],n),...g,children:[b?t.jsx("span",{className:s("size-1.5 shrink-0 rounded-full",l[e]),"aria-hidden":!0}):null,d]}));m.displayName="Badge";export{m as B};
@@ -1 +1 @@
1
- import{c as h}from"./workers-DPKHJxKo.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as C}from"./lspLanguageFeatures-mffTaZGc.js";import{h as U,i as y,j as T,t as x,k as O}from"./lspLanguageFeatures-mffTaZGc.js";import{l as s}from"./index-YbpMGQU0.js";import"./index-BJsGMvc-.js";const I=120*1e3;class A{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL(""+new URL("css.worker-CH7Os8C2.js",import.meta.url).href,import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function E(o){const n=[],e=[],a=new A(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new C(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,U as DocumentLinkAdapter,C as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,A as WorkerManager,y as fromPosition,T as fromRange,E as setupMode,x as toRange,O as toTextEdit};
1
+ import{c as h}from"./workers-CKeuqANe.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as C}from"./lspLanguageFeatures-BPXxuQUC.js";import{h as U,i as y,j as T,t as x,k as O}from"./lspLanguageFeatures-BPXxuQUC.js";import{l as s}from"./index-skbT0X6M.js";import"./index-Cq_o2Abd.js";const I=120*1e3;class A{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL(""+new URL("css.worker-CH7Os8C2.js",import.meta.url).href,import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function E(o){const n=[],e=[],a=new A(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new C(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,U as DocumentLinkAdapter,C as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,A as WorkerManager,y as fromPosition,T as fromRange,E as setupMode,x as toRange,O as toTextEdit};
@@ -1,3 +1,3 @@
1
- import{l as c}from"./index-YbpMGQU0.js";import"./index-BJsGMvc-.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:`
1
+ import{l as c}from"./index-skbT0X6M.js";import"./index-Cq_o2Abd.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:`
2
2
  \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${d.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function g(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:`
3
3
  \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function _(t,n){const i=`_${t.id}_${n.id}`,e=u=>u.replace(/__id__/g,i),o=u=>{const m=u.source.replace(/__id__/g,i);return new RegExp(m,u.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/&lt;=|&gt;=|\\lte|\\lt|&lt;|\\gte|\\gt|&gt;|&amp;&amp;|\\and|-&gt;|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","-&gt;"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function A(t){const n=_(r,t),i=_(a,t),e=_(F,t);return{...n,...i,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,...i.tokenizer,...e.tokenizer}}}const x={conf:l(r),language:_(r,k)},$={conf:l(a),language:_(a,k)},E={conf:l(r),language:_(r,p)},B={conf:l(a),language:_(a,p)},D={conf:g(),language:A(k)},C={conf:g(),language:A(p)};export{E as TagAngleInterpolationBracket,x as TagAngleInterpolationDollar,C as TagAutoInterpolationBracket,D as TagAutoInterpolationDollar,B as TagBracketInterpolationBracket,$ as TagBracketInterpolationDollar};
@@ -1 +1 @@
1
- import{l as e}from"./index-YbpMGQU0.js";import"./index-BJsGMvc-.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@commentHtml"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],doctype:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{m as conf,r as language};
1
+ import{l as e}from"./index-skbT0X6M.js";import"./index-Cq_o2Abd.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@commentHtml"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],doctype:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{m as conf,r as language};
@@ -1 +1 @@
1
- import{l as e}from"./index-YbpMGQU0.js";import"./index-BJsGMvc-.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},o={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{r as conf,o as language};
1
+ import{l as e}from"./index-skbT0X6M.js";import"./index-Cq_o2Abd.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},o={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{r as conf,o as language};
@@ -1 +1 @@
1
- import{c as D}from"./workers-DPKHJxKo.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as f,C as R}from"./lspLanguageFeatures-mffTaZGc.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-mffTaZGc.js";import{l as t}from"./index-YbpMGQU0.js";import"./index-BJsGMvc-.js";const I=120*1e3;class _{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL(""+new URL("html.worker-DTgyLzoY.js",import.meta.url).href,import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function W(i){const n=new _(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new f(e)))}function F(i){const n=[],e=[],r=new _(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new f(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,f as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,_ as WorkerManager,x as fromPosition,M as fromRange,F as setupMode,W as setupMode1,j as toRange,O as toTextEdit};
1
+ import{c as D}from"./workers-CKeuqANe.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as f,C as R}from"./lspLanguageFeatures-BPXxuQUC.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-BPXxuQUC.js";import{l as t}from"./index-skbT0X6M.js";import"./index-Cq_o2Abd.js";const I=120*1e3;class _{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL(""+new URL("html.worker-DTgyLzoY.js",import.meta.url).href,import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function W(i){const n=new _(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new f(e)))}function F(i){const n=[],e=[],r=new _(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new f(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,f as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,_ as WorkerManager,x as fromPosition,M as fromRange,F as setupMode,W as setupMode1,j as toRange,O as toTextEdit};