agentstudio 0.3.1 → 0.3.2

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 (1366) hide show
  1. package/README.md +24 -176
  2. package/bin/agentstudio.d.ts +3 -0
  3. package/bin/agentstudio.d.ts.map +1 -0
  4. package/bin/agentstudio.js +427 -0
  5. package/bin/agentstudio.js.map +1 -0
  6. package/bin/serviceManager.d.ts +16 -0
  7. package/bin/serviceManager.d.ts.map +1 -0
  8. package/bin/serviceManager.js +434 -0
  9. package/bin/serviceManager.js.map +1 -0
  10. package/config/index.d.ts +74 -0
  11. package/config/index.d.ts.map +1 -0
  12. package/config/index.js +166 -0
  13. package/config/index.js.map +1 -0
  14. package/config/paths.d.ts +81 -0
  15. package/config/paths.d.ts.map +1 -0
  16. package/config/paths.js +98 -0
  17. package/config/paths.js.map +1 -0
  18. package/config/sdkConfig.d.ts +62 -0
  19. package/config/sdkConfig.d.ts.map +1 -0
  20. package/config/sdkConfig.js +157 -0
  21. package/config/sdkConfig.js.map +1 -0
  22. package/index.d.ts +4 -0
  23. package/index.d.ts.map +1 -0
  24. package/index.js +428 -0
  25. package/index.js.map +1 -0
  26. package/jobs/taskTimeoutMonitor.d.ts +25 -0
  27. package/jobs/taskTimeoutMonitor.d.ts.map +1 -0
  28. package/jobs/taskTimeoutMonitor.js +94 -0
  29. package/jobs/taskTimeoutMonitor.js.map +1 -0
  30. package/middleware/a2aAuth.d.ts +38 -0
  31. package/middleware/a2aAuth.d.ts.map +1 -0
  32. package/middleware/a2aAuth.js +134 -0
  33. package/middleware/a2aAuth.js.map +1 -0
  34. package/middleware/auth.d.ts +9 -0
  35. package/middleware/auth.d.ts.map +1 -0
  36. package/middleware/auth.js +35 -0
  37. package/middleware/auth.js.map +1 -0
  38. package/middleware/httpsOnly.d.ts +75 -0
  39. package/middleware/httpsOnly.d.ts.map +1 -0
  40. package/middleware/httpsOnly.js +189 -0
  41. package/middleware/httpsOnly.js.map +1 -0
  42. package/middleware/rateLimiting.d.ts +37 -0
  43. package/middleware/rateLimiting.d.ts.map +1 -0
  44. package/middleware/rateLimiting.js +118 -0
  45. package/middleware/rateLimiting.js.map +1 -0
  46. package/package.json +49 -38
  47. package/public/assets/AgentsPage-ChTeSZQM.js +10 -0
  48. package/public/assets/Button-Bd_ElvlE.js +1 -0
  49. package/public/assets/ChatPage-4A05aP3x.js +471 -0
  50. package/public/assets/ChatPage-BvQmXfcP.css +1 -0
  51. package/public/assets/CommandForm-C8RL-p7h.js +7 -0
  52. package/public/assets/CommandsPage-BMqBL5Ss.js +1 -0
  53. package/public/assets/DashboardPage-C13k8VA6.js +1 -0
  54. package/public/assets/FileBrowser-BbQchc_7.js +6 -0
  55. package/public/assets/FileExplorer-DFQ7ynXa.js +1 -0
  56. package/public/assets/GeneralSettingsPage-D1tdeoEo.js +1 -0
  57. package/public/assets/LandingPage-B4lDvIdq.js +1 -0
  58. package/public/assets/LoginPage-BZckHH8M.js +16 -0
  59. package/public/assets/McpAdminSettingsPage-KVRY0MqF.js +7 -0
  60. package/public/assets/McpPage-DztfuUC4.js +20 -0
  61. package/public/assets/MemorySettingsPage-Cn-HSyWt.js +1 -0
  62. package/public/assets/PluginsPage-BGWVTQOf.js +1 -0
  63. package/public/assets/ProjectSelector-GmS-1-C-.js +1 -0
  64. package/public/assets/ProjectsPage-v58WHxJc.js +21 -0
  65. package/public/assets/ScheduledTasksPage-DKG8bjzx.js +1 -0
  66. package/public/assets/SettingsLayout-_m4X7JF9.js +1 -0
  67. package/public/assets/SkillsPage-CZAxG8SU.js +18 -0
  68. package/public/assets/SubagentForm-CSRBsxUE.js +7 -0
  69. package/public/assets/SubagentsPage-DW0COnVY.js +1 -0
  70. package/public/assets/SystemInfoPage-ogvHiOrs.js +1 -0
  71. package/public/assets/TelemetrySettingsPage-r9NhMxSu.js +1 -0
  72. package/public/assets/ToastTestPage-DJBKYs9_.js +1 -0
  73. package/public/assets/ToolsList-Ci2lqPin.js +1 -0
  74. package/public/assets/UnifiedToolSelector-CKjY_qjS.js +1 -0
  75. package/public/assets/VersionSettingsPage-DTIgBhQ_.js +5 -0
  76. package/public/assets/WebSocketTunnelPage-C3mRJxS2.js +1 -0
  77. package/public/assets/_basePickBy-BTSO2Pkt.js +1 -0
  78. package/public/assets/_baseUniq-D89fR3NG.js +1 -0
  79. package/public/assets/agents-DG431Wop.js +1 -0
  80. package/public/assets/agents-DwCY2K8p.css +1 -0
  81. package/public/assets/arc-XgUOTLxV.js +1 -0
  82. package/public/assets/architectureDiagram-VXUJARFQ-DrSsIdf2.js +36 -0
  83. package/public/assets/blockDiagram-VD42YOAC-DnsJI7gJ.js +122 -0
  84. package/public/assets/c4Diagram-YG6GDRKO-Dcw9Cs9G.js +10 -0
  85. package/public/assets/channel-CUQXq8tY.js +1 -0
  86. package/public/assets/chunk-4BX2VUAB-CuAIZ2Cr.js +1 -0
  87. package/public/assets/chunk-55IACEB6-CO5u6wMx.js +1 -0
  88. package/public/assets/chunk-B4BG7PRW-C4JF4UyZ.js +165 -0
  89. package/public/assets/chunk-DI55MBZ5-bfTEspLo.js +220 -0
  90. package/public/assets/chunk-FMBD7UC4-BN14QGw5.js +15 -0
  91. package/public/assets/chunk-QN33PNHL-xWN6BqD9.js +1 -0
  92. package/public/assets/chunk-QZHKN3VN-5-grYB4H.js +1 -0
  93. package/public/assets/chunk-TZMSLE5B-C2vW6017.js +1 -0
  94. package/public/assets/classDiagram-2ON5EDUG-Ivmc_BXS.js +1 -0
  95. package/public/assets/classDiagram-v2-WZHVMYZB-Ivmc_BXS.js +1 -0
  96. package/public/assets/clone-DTBJjony.js +1 -0
  97. package/public/assets/cose-bilkent-S5V4N54A-D4tCdQ5W.js +1 -0
  98. package/public/assets/cytoscape.esm-DtBltrT8.js +331 -0
  99. package/public/assets/dagre-6UL2VRFP-BGaPpMOL.js +4 -0
  100. package/public/assets/data-structures-C0h9Oap1.js +27 -0
  101. package/public/assets/dateFormat-CXa8VnEC.js +1 -0
  102. package/public/assets/defaultLocale-C4B-KCzX.js +1 -0
  103. package/public/assets/diagram-PSM6KHXK-B5MJHcOR.js +24 -0
  104. package/public/assets/diagram-QEK2KX5R-W49QXse-.js +43 -0
  105. package/public/assets/diagram-S2PKOQOG-J_VMf6C2.js +24 -0
  106. package/public/assets/erDiagram-Q2GNP2WA-CgK8jP0L.js +60 -0
  107. package/public/assets/flowDiagram-NV44I4VS-CXavqXYu.js +162 -0
  108. package/public/assets/ganttDiagram-LVOFAZNH-DdA4uXow.js +267 -0
  109. package/public/assets/gitGraphDiagram-NY62KEGX-BHeHA2_6.js +65 -0
  110. package/public/assets/graph-CkRZhtax.js +1 -0
  111. package/public/assets/index-BgR-BTTw.css +1 -0
  112. package/public/assets/index-UPEozv-J.js +297 -0
  113. package/public/assets/infoDiagram-F6ZHWCRC-Cefi13nY.js +2 -0
  114. package/public/assets/init-Gi6I4Gst.js +1 -0
  115. package/public/assets/journeyDiagram-XKPGCS4Q-CAfRMHa8.js +139 -0
  116. package/public/assets/kanban-definition-3W4ZIXB7-DW5IlHJE.js +89 -0
  117. package/public/assets/katex-qrhCpa0F.js +261 -0
  118. package/public/assets/layout-nYP7m9RV.js +1 -0
  119. package/public/assets/linear--koZbfLt.js +1 -0
  120. package/public/assets/mindmap-definition-VGOIOE7T-BIt3RkSU.js +68 -0
  121. package/public/assets/monaco-editor-DHKm5-VF.js +19 -0
  122. package/public/assets/ordinal-Cboi1Yqb.js +1 -0
  123. package/public/assets/pieDiagram-ADFJNKIX-Dgv5DD0S.js +30 -0
  124. package/public/assets/quadrantDiagram-AYHSOK5B-BDAI4LQZ.js +7 -0
  125. package/public/assets/requirementDiagram-UZGBJVZJ-BtlBBsGB.js +64 -0
  126. package/public/assets/sankeyDiagram-TZEHDZUN-C5CTA-m2.js +10 -0
  127. package/public/assets/sequenceDiagram-WL72ISMW-Zxi4nOIv.js +145 -0
  128. package/public/assets/stateDiagram-FKZM4ZOC-XoPlf0Vy.js +1 -0
  129. package/public/assets/stateDiagram-v2-4FDKWEC3-r4Duovdx.js +1 -0
  130. package/public/assets/syntax-highlighting-CnREyncB.js +24 -0
  131. package/public/assets/table-BWrnBcPF.js +1 -0
  132. package/public/assets/timeline-definition-IT6M3QCI-UHDY1Jjf.js +61 -0
  133. package/public/assets/tools-C0JOzoE_.js +1 -0
  134. package/public/assets/treemap-KMMF4GRG-CBW5iWMJ.js +128 -0
  135. package/public/assets/ui-components-CRCmgMKc.js +646 -0
  136. package/public/assets/useAgents-Bp5Ry-Dk.js +2 -0
  137. package/public/assets/useClaudeVersions-DYM2HCGW.js +1 -0
  138. package/public/assets/useCommands-B0s3JzZs.js +1 -0
  139. package/public/assets/useProjects-DuCnMeYt.js +1 -0
  140. package/public/assets/useSessions-EknKfdIv.js +1 -0
  141. package/public/assets/xychartDiagram-PRI3JC2R-C2ylYAJK.js +7 -0
  142. package/public/index.html +70 -0
  143. package/routes/__tests__/a2a.integration.test.d.ts +11 -0
  144. package/routes/__tests__/a2a.integration.test.d.ts.map +1 -0
  145. package/routes/__tests__/a2a.integration.test.js +314 -0
  146. package/routes/__tests__/a2a.integration.test.js.map +1 -0
  147. package/routes/__tests__/a2a.test.d.ts +6 -0
  148. package/routes/__tests__/a2a.test.d.ts.map +1 -0
  149. package/routes/__tests__/a2a.test.js +622 -0
  150. package/routes/__tests__/a2a.test.js.map +1 -0
  151. package/routes/__tests__/agents.test.d.ts +6 -0
  152. package/routes/__tests__/agents.test.d.ts.map +1 -0
  153. package/routes/__tests__/agents.test.js +315 -0
  154. package/routes/__tests__/agents.test.js.map +1 -0
  155. package/routes/__tests__/sessions.test.d.ts +7 -0
  156. package/routes/__tests__/sessions.test.d.ts.map +1 -0
  157. package/routes/__tests__/sessions.test.js +330 -0
  158. package/routes/__tests__/sessions.test.js.map +1 -0
  159. package/routes/a2a.d.ts +18 -0
  160. package/routes/a2a.d.ts.map +1 -0
  161. package/routes/a2a.js +718 -0
  162. package/routes/a2a.js.map +1 -0
  163. package/routes/a2a.streaming.test.d.ts +2 -0
  164. package/routes/a2a.streaming.test.d.ts.map +1 -0
  165. package/routes/a2a.streaming.test.js +167 -0
  166. package/routes/a2a.streaming.test.js.map +1 -0
  167. package/routes/a2aManagement.d.ts +21 -0
  168. package/routes/a2aManagement.d.ts.map +1 -0
  169. package/routes/a2aManagement.js +466 -0
  170. package/routes/a2aManagement.js.map +1 -0
  171. package/routes/agents.d.ts +4 -0
  172. package/routes/agents.d.ts.map +1 -0
  173. package/routes/agents.js +1026 -0
  174. package/routes/agents.js.map +1 -0
  175. package/routes/auth.d.ts +4 -0
  176. package/routes/auth.d.ts.map +1 -0
  177. package/routes/auth.js +135 -0
  178. package/routes/auth.js.map +1 -0
  179. package/routes/cloudflareTunnel.d.ts +4 -0
  180. package/routes/cloudflareTunnel.d.ts.map +1 -0
  181. package/routes/cloudflareTunnel.js +250 -0
  182. package/routes/cloudflareTunnel.js.map +1 -0
  183. package/routes/commands.d.ts +4 -0
  184. package/routes/commands.d.ts.map +1 -0
  185. package/routes/commands.js +481 -0
  186. package/routes/commands.js.map +1 -0
  187. package/routes/config.d.ts +4 -0
  188. package/routes/config.d.ts.map +1 -0
  189. package/routes/config.js +211 -0
  190. package/routes/config.js.map +1 -0
  191. package/routes/files.d.ts +4 -0
  192. package/routes/files.d.ts.map +1 -0
  193. package/routes/files.js +361 -0
  194. package/routes/files.js.map +1 -0
  195. package/routes/mcp.d.ts +26 -0
  196. package/routes/mcp.d.ts.map +1 -0
  197. package/routes/mcp.js +795 -0
  198. package/routes/mcp.js.map +1 -0
  199. package/routes/mcpAdmin.d.ts +16 -0
  200. package/routes/mcpAdmin.d.ts.map +1 -0
  201. package/routes/mcpAdmin.js +308 -0
  202. package/routes/mcpAdmin.js.map +1 -0
  203. package/routes/mcpAdminManagement.d.ts +17 -0
  204. package/routes/mcpAdminManagement.d.ts.map +1 -0
  205. package/routes/mcpAdminManagement.js +345 -0
  206. package/routes/mcpAdminManagement.js.map +1 -0
  207. package/routes/media.d.ts +5 -0
  208. package/routes/media.d.ts.map +1 -0
  209. package/routes/media.js +127 -0
  210. package/routes/media.js.map +1 -0
  211. package/routes/mediaAuth.d.ts +8 -0
  212. package/routes/mediaAuth.d.ts.map +1 -0
  213. package/routes/mediaAuth.js +136 -0
  214. package/routes/mediaAuth.js.map +1 -0
  215. package/routes/network.d.ts +9 -0
  216. package/routes/network.d.ts.map +1 -0
  217. package/routes/network.js +60 -0
  218. package/routes/network.js.map +1 -0
  219. package/routes/plugins.d.ts +4 -0
  220. package/routes/plugins.d.ts.map +1 -0
  221. package/routes/plugins.js +339 -0
  222. package/routes/plugins.js.map +1 -0
  223. package/routes/projects.d.ts +4 -0
  224. package/routes/projects.d.ts.map +1 -0
  225. package/routes/projects.js +1000 -0
  226. package/routes/projects.js.map +1 -0
  227. package/routes/scheduledTasks.d.ts +9 -0
  228. package/routes/scheduledTasks.d.ts.map +1 -0
  229. package/routes/scheduledTasks.js +386 -0
  230. package/routes/scheduledTasks.js.map +1 -0
  231. package/routes/sessions.d.ts +4 -0
  232. package/routes/sessions.d.ts.map +1 -0
  233. package/routes/sessions.js +966 -0
  234. package/routes/sessions.js.map +1 -0
  235. package/routes/settings.d.ts +4 -0
  236. package/routes/settings.d.ts.map +1 -0
  237. package/routes/settings.js +500 -0
  238. package/routes/settings.js.map +1 -0
  239. package/routes/skills.d.ts +4 -0
  240. package/routes/skills.d.ts.map +1 -0
  241. package/routes/skills.js +272 -0
  242. package/routes/skills.js.map +1 -0
  243. package/routes/slack.d.ts +10 -0
  244. package/routes/slack.d.ts.map +1 -0
  245. package/routes/slack.js +189 -0
  246. package/routes/slack.js.map +1 -0
  247. package/routes/slides.d.ts +4 -0
  248. package/routes/slides.d.ts.map +1 -0
  249. package/routes/slides.js +148 -0
  250. package/routes/slides.js.map +1 -0
  251. package/routes/subagents.d.ts +4 -0
  252. package/routes/subagents.d.ts.map +1 -0
  253. package/routes/subagents.js +333 -0
  254. package/routes/subagents.js.map +1 -0
  255. package/routes/taskExecutor.d.ts +9 -0
  256. package/routes/taskExecutor.d.ts.map +1 -0
  257. package/routes/taskExecutor.js +224 -0
  258. package/routes/taskExecutor.js.map +1 -0
  259. package/routes/tunnel.d.ts +10 -0
  260. package/routes/tunnel.d.ts.map +1 -0
  261. package/routes/tunnel.js +296 -0
  262. package/routes/tunnel.js.map +1 -0
  263. package/routes/version.d.ts +4 -0
  264. package/routes/version.d.ts.map +1 -0
  265. package/routes/version.js +222 -0
  266. package/routes/version.js.map +1 -0
  267. package/schemas/a2a.d.ts +946 -0
  268. package/schemas/a2a.d.ts.map +1 -0
  269. package/schemas/a2a.js +316 -0
  270. package/schemas/a2a.js.map +1 -0
  271. package/scripts/postinstall.js +10 -0
  272. package/services/__tests__/pluginInstaller.test.d.ts +5 -0
  273. package/services/__tests__/pluginInstaller.test.d.ts.map +1 -0
  274. package/services/__tests__/pluginInstaller.test.js +290 -0
  275. package/services/__tests__/pluginInstaller.test.js.map +1 -0
  276. package/services/__tests__/pluginParser.test.d.ts +5 -0
  277. package/services/__tests__/pluginParser.test.d.ts.map +1 -0
  278. package/services/__tests__/pluginParser.test.js +272 -0
  279. package/services/__tests__/pluginParser.test.js.map +1 -0
  280. package/services/__tests__/pluginPaths.test.d.ts +5 -0
  281. package/services/__tests__/pluginPaths.test.d.ts.map +1 -0
  282. package/services/__tests__/pluginPaths.test.js +221 -0
  283. package/services/__tests__/pluginPaths.test.js.map +1 -0
  284. package/services/__tests__/pluginScanner.test.d.ts +5 -0
  285. package/services/__tests__/pluginScanner.test.d.ts.map +1 -0
  286. package/services/__tests__/pluginScanner.test.js +272 -0
  287. package/services/__tests__/pluginScanner.test.js.map +1 -0
  288. package/services/__tests__/pluginSymlink.test.d.ts +5 -0
  289. package/services/__tests__/pluginSymlink.test.d.ts.map +1 -0
  290. package/services/__tests__/pluginSymlink.test.js +318 -0
  291. package/services/__tests__/pluginSymlink.test.js.map +1 -0
  292. package/services/__tests__/projectMetadataStorage.test.d.ts +5 -0
  293. package/services/__tests__/projectMetadataStorage.test.d.ts.map +1 -0
  294. package/services/__tests__/projectMetadataStorage.test.js +154 -0
  295. package/services/__tests__/projectMetadataStorage.test.js.map +1 -0
  296. package/services/__tests__/sessionConcurrency.test.d.ts +7 -0
  297. package/services/__tests__/sessionConcurrency.test.d.ts.map +1 -0
  298. package/services/__tests__/sessionConcurrency.test.js +110 -0
  299. package/services/__tests__/sessionConcurrency.test.js.map +1 -0
  300. package/services/__tests__/slackAIService.test.d.ts +5 -0
  301. package/services/__tests__/slackAIService.test.d.ts.map +1 -0
  302. package/services/__tests__/slackAIService.test.js +479 -0
  303. package/services/__tests__/slackAIService.test.js.map +1 -0
  304. package/services/__tests__/slackThreadMapper.test.d.ts +5 -0
  305. package/services/__tests__/slackThreadMapper.test.d.ts.map +1 -0
  306. package/services/__tests__/slackThreadMapper.test.js +194 -0
  307. package/services/__tests__/slackThreadMapper.test.js.map +1 -0
  308. package/services/a2a/__tests__/a2aClientTool.integration.test.d.ts +6 -0
  309. package/services/a2a/__tests__/a2aClientTool.integration.test.d.ts.map +1 -0
  310. package/services/a2a/__tests__/a2aClientTool.integration.test.js +264 -0
  311. package/services/a2a/__tests__/a2aClientTool.integration.test.js.map +1 -0
  312. package/services/a2a/__tests__/a2aClientTool.test.d.ts +6 -0
  313. package/services/a2a/__tests__/a2aClientTool.test.d.ts.map +1 -0
  314. package/services/a2a/__tests__/a2aClientTool.test.js +592 -0
  315. package/services/a2a/__tests__/a2aClientTool.test.js.map +1 -0
  316. package/services/a2a/__tests__/a2aConfigService.test.d.ts +6 -0
  317. package/services/a2a/__tests__/a2aConfigService.test.d.ts.map +1 -0
  318. package/services/a2a/__tests__/a2aConfigService.test.js +431 -0
  319. package/services/a2a/__tests__/a2aConfigService.test.js.map +1 -0
  320. package/services/a2a/__tests__/a2aConfigServicePath.test.d.ts +2 -0
  321. package/services/a2a/__tests__/a2aConfigServicePath.test.d.ts.map +1 -0
  322. package/services/a2a/__tests__/a2aConfigServicePath.test.js +49 -0
  323. package/services/a2a/__tests__/a2aConfigServicePath.test.js.map +1 -0
  324. package/services/a2a/__tests__/a2aSdkMcp.test.d.ts +10 -0
  325. package/services/a2a/__tests__/a2aSdkMcp.test.d.ts.map +1 -0
  326. package/services/a2a/__tests__/a2aSdkMcp.test.js +239 -0
  327. package/services/a2a/__tests__/a2aSdkMcp.test.js.map +1 -0
  328. package/services/a2a/__tests__/agentCardService.test.d.ts +6 -0
  329. package/services/a2a/__tests__/agentCardService.test.d.ts.map +1 -0
  330. package/services/a2a/__tests__/agentCardService.test.js +292 -0
  331. package/services/a2a/__tests__/agentCardService.test.js.map +1 -0
  332. package/services/a2a/__tests__/apiKeyService.test.d.ts +6 -0
  333. package/services/a2a/__tests__/apiKeyService.test.d.ts.map +1 -0
  334. package/services/a2a/__tests__/apiKeyService.test.js +284 -0
  335. package/services/a2a/__tests__/apiKeyService.test.js.map +1 -0
  336. package/services/a2a/__tests__/buildQueryOptionsIntegration.test.d.ts +2 -0
  337. package/services/a2a/__tests__/buildQueryOptionsIntegration.test.d.ts.map +1 -0
  338. package/services/a2a/__tests__/buildQueryOptionsIntegration.test.js +70 -0
  339. package/services/a2a/__tests__/buildQueryOptionsIntegration.test.js.map +1 -0
  340. package/services/a2a/__tests__/dynamic_config_verification.test.d.ts +2 -0
  341. package/services/a2a/__tests__/dynamic_config_verification.test.d.ts.map +1 -0
  342. package/services/a2a/__tests__/dynamic_config_verification.test.js +67 -0
  343. package/services/a2a/__tests__/dynamic_config_verification.test.js.map +1 -0
  344. package/services/a2a/__tests__/integrateA2AMcpServer.test.d.ts +2 -0
  345. package/services/a2a/__tests__/integrateA2AMcpServer.test.d.ts.map +1 -0
  346. package/services/a2a/__tests__/integrateA2AMcpServer.test.js +112 -0
  347. package/services/a2a/__tests__/integrateA2AMcpServer.test.js.map +1 -0
  348. package/services/a2a/__tests__/taskManager.integration.test.d.ts +7 -0
  349. package/services/a2a/__tests__/taskManager.integration.test.d.ts.map +1 -0
  350. package/services/a2a/__tests__/taskManager.integration.test.js +346 -0
  351. package/services/a2a/__tests__/taskManager.integration.test.js.map +1 -0
  352. package/services/a2a/__tests__/taskManager.test.d.ts +7 -0
  353. package/services/a2a/__tests__/taskManager.test.d.ts.map +1 -0
  354. package/services/a2a/__tests__/taskManager.test.js +423 -0
  355. package/services/a2a/__tests__/taskManager.test.js.map +1 -0
  356. package/services/a2a/__tests__/webhookService.test.d.ts +6 -0
  357. package/services/a2a/__tests__/webhookService.test.d.ts.map +1 -0
  358. package/services/a2a/__tests__/webhookService.test.js +196 -0
  359. package/services/a2a/__tests__/webhookService.test.js.map +1 -0
  360. package/services/a2a/a2aClientTool.d.ts +73 -0
  361. package/services/a2a/a2aClientTool.d.ts.map +1 -0
  362. package/services/a2a/a2aClientTool.js +595 -0
  363. package/services/a2a/a2aClientTool.js.map +1 -0
  364. package/services/a2a/a2aConfigService.d.ts +50 -0
  365. package/services/a2a/a2aConfigService.d.ts.map +1 -0
  366. package/services/a2a/a2aConfigService.js +187 -0
  367. package/services/a2a/a2aConfigService.js.map +1 -0
  368. package/services/a2a/a2aHistoryService.d.ts +32 -0
  369. package/services/a2a/a2aHistoryService.d.ts.map +1 -0
  370. package/services/a2a/a2aHistoryService.js +108 -0
  371. package/services/a2a/a2aHistoryService.js.map +1 -0
  372. package/services/a2a/a2aIntegration.d.ts +10 -0
  373. package/services/a2a/a2aIntegration.d.ts.map +1 -0
  374. package/services/a2a/a2aIntegration.js +42 -0
  375. package/services/a2a/a2aIntegration.js.map +1 -0
  376. package/services/a2a/a2aQueryService.d.ts +71 -0
  377. package/services/a2a/a2aQueryService.d.ts.map +1 -0
  378. package/services/a2a/a2aQueryService.js +209 -0
  379. package/services/a2a/a2aQueryService.js.map +1 -0
  380. package/services/a2a/a2aSdkMcp.d.ts +52 -0
  381. package/services/a2a/a2aSdkMcp.d.ts.map +1 -0
  382. package/services/a2a/a2aSdkMcp.js +188 -0
  383. package/services/a2a/a2aSdkMcp.js.map +1 -0
  384. package/services/a2a/a2aStreamEvents.d.ts +94 -0
  385. package/services/a2a/a2aStreamEvents.d.ts.map +1 -0
  386. package/services/a2a/a2aStreamEvents.js +92 -0
  387. package/services/a2a/a2aStreamEvents.js.map +1 -0
  388. package/services/a2a/agentCardService.d.ts +34 -0
  389. package/services/a2a/agentCardService.d.ts.map +1 -0
  390. package/services/a2a/agentCardService.js +228 -0
  391. package/services/a2a/agentCardService.js.map +1 -0
  392. package/services/a2a/agentMappingService.d.ts +53 -0
  393. package/services/a2a/agentMappingService.d.ts.map +1 -0
  394. package/services/a2a/agentMappingService.js +185 -0
  395. package/services/a2a/agentMappingService.js.map +1 -0
  396. package/services/a2a/apiKeyService.d.ts +101 -0
  397. package/services/a2a/apiKeyService.d.ts.map +1 -0
  398. package/services/a2a/apiKeyService.js +314 -0
  399. package/services/a2a/apiKeyService.js.map +1 -0
  400. package/services/a2a/taskCleanup.d.ts +30 -0
  401. package/services/a2a/taskCleanup.d.ts.map +1 -0
  402. package/services/a2a/taskCleanup.js +184 -0
  403. package/services/a2a/taskCleanup.js.map +1 -0
  404. package/services/a2a/taskManager.d.ts +87 -0
  405. package/services/a2a/taskManager.d.ts.map +1 -0
  406. package/services/a2a/taskManager.js +265 -0
  407. package/services/a2a/taskManager.js.map +1 -0
  408. package/services/a2a/webhookService.d.ts +30 -0
  409. package/services/a2a/webhookService.d.ts.map +1 -0
  410. package/services/a2a/webhookService.js +113 -0
  411. package/services/a2a/webhookService.js.map +1 -0
  412. package/services/agentStorage.d.ts +27 -0
  413. package/services/agentStorage.d.ts.map +1 -0
  414. package/services/agentStorage.js +487 -0
  415. package/services/agentStorage.js.map +1 -0
  416. package/services/askUserQuestion/askUserQuestionIntegration.d.ts +24 -0
  417. package/services/askUserQuestion/askUserQuestionIntegration.d.ts.map +1 -0
  418. package/services/askUserQuestion/askUserQuestionIntegration.js +52 -0
  419. package/services/askUserQuestion/askUserQuestionIntegration.js.map +1 -0
  420. package/services/askUserQuestion/askUserQuestionMcp.d.ts +103 -0
  421. package/services/askUserQuestion/askUserQuestionMcp.d.ts.map +1 -0
  422. package/services/askUserQuestion/askUserQuestionMcp.js +129 -0
  423. package/services/askUserQuestion/askUserQuestionMcp.js.map +1 -0
  424. package/services/askUserQuestion/index.d.ts +13 -0
  425. package/services/askUserQuestion/index.d.ts.map +1 -0
  426. package/services/askUserQuestion/index.js +35 -0
  427. package/services/askUserQuestion/index.js.map +1 -0
  428. package/services/askUserQuestion/init.d.ts +17 -0
  429. package/services/askUserQuestion/init.d.ts.map +1 -0
  430. package/services/askUserQuestion/init.js +47 -0
  431. package/services/askUserQuestion/init.js.map +1 -0
  432. package/services/askUserQuestion/notificationChannel.d.ts +97 -0
  433. package/services/askUserQuestion/notificationChannel.d.ts.map +1 -0
  434. package/services/askUserQuestion/notificationChannel.js +147 -0
  435. package/services/askUserQuestion/notificationChannel.js.map +1 -0
  436. package/services/askUserQuestion/slackNotificationChannel.d.ts +35 -0
  437. package/services/askUserQuestion/slackNotificationChannel.d.ts.map +1 -0
  438. package/services/askUserQuestion/slackNotificationChannel.js +129 -0
  439. package/services/askUserQuestion/slackNotificationChannel.js.map +1 -0
  440. package/services/askUserQuestion/sseNotificationChannel.d.ts +36 -0
  441. package/services/askUserQuestion/sseNotificationChannel.d.ts.map +1 -0
  442. package/services/askUserQuestion/sseNotificationChannel.js +88 -0
  443. package/services/askUserQuestion/sseNotificationChannel.js.map +1 -0
  444. package/services/askUserQuestion/userInputRegistry.d.ts +107 -0
  445. package/services/askUserQuestion/userInputRegistry.d.ts.map +1 -0
  446. package/services/askUserQuestion/userInputRegistry.js +253 -0
  447. package/services/askUserQuestion/userInputRegistry.js.map +1 -0
  448. package/services/claudeSession.d.ts +113 -0
  449. package/services/claudeSession.d.ts.map +1 -0
  450. package/services/claudeSession.js +375 -0
  451. package/services/claudeSession.js.map +1 -0
  452. package/services/claudeVersionStorage.d.ts +20 -0
  453. package/services/claudeVersionStorage.d.ts.map +1 -0
  454. package/services/claudeVersionStorage.js +331 -0
  455. package/services/claudeVersionStorage.js.map +1 -0
  456. package/services/mcpAdmin/__tests__/adminApiKeyService.test.d.ts +5 -0
  457. package/services/mcpAdmin/__tests__/adminApiKeyService.test.d.ts.map +1 -0
  458. package/services/mcpAdmin/__tests__/adminApiKeyService.test.js +289 -0
  459. package/services/mcpAdmin/__tests__/adminApiKeyService.test.js.map +1 -0
  460. package/services/mcpAdmin/__tests__/mcpAdminRoutes.test.d.ts +5 -0
  461. package/services/mcpAdmin/__tests__/mcpAdminRoutes.test.d.ts.map +1 -0
  462. package/services/mcpAdmin/__tests__/mcpAdminRoutes.test.js +345 -0
  463. package/services/mcpAdmin/__tests__/mcpAdminRoutes.test.js.map +1 -0
  464. package/services/mcpAdmin/__tests__/mcpAdminServer.test.d.ts +5 -0
  465. package/services/mcpAdmin/__tests__/mcpAdminServer.test.d.ts.map +1 -0
  466. package/services/mcpAdmin/__tests__/mcpAdminServer.test.js +453 -0
  467. package/services/mcpAdmin/__tests__/mcpAdminServer.test.js.map +1 -0
  468. package/services/mcpAdmin/__tests__/providerTools.test.d.ts +7 -0
  469. package/services/mcpAdmin/__tests__/providerTools.test.d.ts.map +1 -0
  470. package/services/mcpAdmin/__tests__/providerTools.test.js +258 -0
  471. package/services/mcpAdmin/__tests__/providerTools.test.js.map +1 -0
  472. package/services/mcpAdmin/__tests__/tools.test.d.ts +5 -0
  473. package/services/mcpAdmin/__tests__/tools.test.d.ts.map +1 -0
  474. package/services/mcpAdmin/__tests__/tools.test.js +389 -0
  475. package/services/mcpAdmin/__tests__/tools.test.js.map +1 -0
  476. package/services/mcpAdmin/adminApiKeyService.d.ts +61 -0
  477. package/services/mcpAdmin/adminApiKeyService.d.ts.map +1 -0
  478. package/services/mcpAdmin/adminApiKeyService.js +270 -0
  479. package/services/mcpAdmin/adminApiKeyService.js.map +1 -0
  480. package/services/mcpAdmin/index.d.ts +10 -0
  481. package/services/mcpAdmin/index.d.ts.map +1 -0
  482. package/services/mcpAdmin/index.js +43 -0
  483. package/services/mcpAdmin/index.js.map +1 -0
  484. package/services/mcpAdmin/mcpAdminServer.d.ts +76 -0
  485. package/services/mcpAdmin/mcpAdminServer.d.ts.map +1 -0
  486. package/services/mcpAdmin/mcpAdminServer.js +243 -0
  487. package/services/mcpAdmin/mcpAdminServer.js.map +1 -0
  488. package/services/mcpAdmin/tools/agentTools.d.ts +27 -0
  489. package/services/mcpAdmin/tools/agentTools.d.ts.map +1 -0
  490. package/services/mcpAdmin/tools/agentTools.js +352 -0
  491. package/services/mcpAdmin/tools/agentTools.js.map +1 -0
  492. package/services/mcpAdmin/tools/index.d.ts +16 -0
  493. package/services/mcpAdmin/tools/index.d.ts.map +1 -0
  494. package/services/mcpAdmin/tools/index.js +34 -0
  495. package/services/mcpAdmin/tools/index.js.map +1 -0
  496. package/services/mcpAdmin/tools/mcpServerTools.d.ts +27 -0
  497. package/services/mcpAdmin/tools/mcpServerTools.d.ts.map +1 -0
  498. package/services/mcpAdmin/tools/mcpServerTools.js +334 -0
  499. package/services/mcpAdmin/tools/mcpServerTools.js.map +1 -0
  500. package/services/mcpAdmin/tools/projectTools.d.ts +27 -0
  501. package/services/mcpAdmin/tools/projectTools.d.ts.map +1 -0
  502. package/services/mcpAdmin/tools/projectTools.js +382 -0
  503. package/services/mcpAdmin/tools/projectTools.js.map +1 -0
  504. package/services/mcpAdmin/tools/providerTools.d.ts +40 -0
  505. package/services/mcpAdmin/tools/providerTools.d.ts.map +1 -0
  506. package/services/mcpAdmin/tools/providerTools.js +581 -0
  507. package/services/mcpAdmin/tools/providerTools.js.map +1 -0
  508. package/services/mcpAdmin/tools/systemTools.d.ts +23 -0
  509. package/services/mcpAdmin/tools/systemTools.d.ts.map +1 -0
  510. package/services/mcpAdmin/tools/systemTools.js +241 -0
  511. package/services/mcpAdmin/tools/systemTools.js.map +1 -0
  512. package/services/mcpAdmin/types.d.ts +124 -0
  513. package/services/mcpAdmin/types.d.ts.map +1 -0
  514. package/services/mcpAdmin/types.js +18 -0
  515. package/services/mcpAdmin/types.js.map +1 -0
  516. package/services/messageQueue.d.ts +31 -0
  517. package/services/messageQueue.d.ts.map +1 -0
  518. package/services/messageQueue.js +80 -0
  519. package/services/messageQueue.js.map +1 -0
  520. package/services/pluginInstaller.d.ts +58 -0
  521. package/services/pluginInstaller.d.ts.map +1 -0
  522. package/services/pluginInstaller.js +321 -0
  523. package/services/pluginInstaller.js.map +1 -0
  524. package/services/pluginParser.d.ts +45 -0
  525. package/services/pluginParser.d.ts.map +1 -0
  526. package/services/pluginParser.js +437 -0
  527. package/services/pluginParser.js.map +1 -0
  528. package/services/pluginPaths.d.ts +83 -0
  529. package/services/pluginPaths.d.ts.map +1 -0
  530. package/services/pluginPaths.js +277 -0
  531. package/services/pluginPaths.js.map +1 -0
  532. package/services/pluginScanner.d.ts +36 -0
  533. package/services/pluginScanner.d.ts.map +1 -0
  534. package/services/pluginScanner.js +251 -0
  535. package/services/pluginScanner.js.map +1 -0
  536. package/services/pluginSymlink.d.ts +54 -0
  537. package/services/pluginSymlink.d.ts.map +1 -0
  538. package/services/pluginSymlink.js +223 -0
  539. package/services/pluginSymlink.js.map +1 -0
  540. package/services/projectMetadataStorage.d.ts +121 -0
  541. package/services/projectMetadataStorage.d.ts.map +1 -0
  542. package/services/projectMetadataStorage.js +810 -0
  543. package/services/projectMetadataStorage.js.map +1 -0
  544. package/services/scheduledTaskStorage.d.ts +63 -0
  545. package/services/scheduledTaskStorage.d.ts.map +1 -0
  546. package/services/scheduledTaskStorage.js +351 -0
  547. package/services/scheduledTaskStorage.js.map +1 -0
  548. package/services/schedulerService.d.ts +91 -0
  549. package/services/schedulerService.d.ts.map +1 -0
  550. package/services/schedulerService.js +590 -0
  551. package/services/schedulerService.js.map +1 -0
  552. package/services/sessionManager.d.ts +176 -0
  553. package/services/sessionManager.d.ts.map +1 -0
  554. package/services/sessionManager.js +646 -0
  555. package/services/sessionManager.js.map +1 -0
  556. package/services/skillStorage.d.ts +60 -0
  557. package/services/skillStorage.d.ts.map +1 -0
  558. package/services/skillStorage.js +399 -0
  559. package/services/skillStorage.js.map +1 -0
  560. package/services/slackAIService.d.ts +81 -0
  561. package/services/slackAIService.d.ts.map +1 -0
  562. package/services/slackAIService.js +1137 -0
  563. package/services/slackAIService.js.map +1 -0
  564. package/services/slackClient.d.ts +46 -0
  565. package/services/slackClient.d.ts.map +1 -0
  566. package/services/slackClient.js +85 -0
  567. package/services/slackClient.js.map +1 -0
  568. package/services/slackSessionLock.d.ts +79 -0
  569. package/services/slackSessionLock.d.ts.map +1 -0
  570. package/services/slackSessionLock.js +353 -0
  571. package/services/slackSessionLock.js.map +1 -0
  572. package/services/slackThreadMapper.d.ts +57 -0
  573. package/services/slackThreadMapper.d.ts.map +1 -0
  574. package/services/slackThreadMapper.js +140 -0
  575. package/services/slackThreadMapper.js.map +1 -0
  576. package/services/taskExecutor/BuiltinExecutor.d.ts +44 -0
  577. package/services/taskExecutor/BuiltinExecutor.d.ts.map +1 -0
  578. package/services/taskExecutor/BuiltinExecutor.js +513 -0
  579. package/services/taskExecutor/BuiltinExecutor.js.map +1 -0
  580. package/services/taskExecutor/__tests__/a2a-tasks.test.d.ts +7 -0
  581. package/services/taskExecutor/__tests__/a2a-tasks.test.d.ts.map +1 -0
  582. package/services/taskExecutor/__tests__/a2a-tasks.test.js +328 -0
  583. package/services/taskExecutor/__tests__/a2a-tasks.test.js.map +1 -0
  584. package/services/taskExecutor/__tests__/e2e-workflows.test.d.ts +7 -0
  585. package/services/taskExecutor/__tests__/e2e-workflows.test.d.ts.map +1 -0
  586. package/services/taskExecutor/__tests__/e2e-workflows.test.js +446 -0
  587. package/services/taskExecutor/__tests__/e2e-workflows.test.js.map +1 -0
  588. package/services/taskExecutor/__tests__/error-handling.test.d.ts +7 -0
  589. package/services/taskExecutor/__tests__/error-handling.test.d.ts.map +1 -0
  590. package/services/taskExecutor/__tests__/error-handling.test.js +387 -0
  591. package/services/taskExecutor/__tests__/error-handling.test.js.map +1 -0
  592. package/services/taskExecutor/__tests__/stress.test.d.ts +7 -0
  593. package/services/taskExecutor/__tests__/stress.test.d.ts.map +1 -0
  594. package/services/taskExecutor/__tests__/stress.test.js +329 -0
  595. package/services/taskExecutor/__tests__/stress.test.js.map +1 -0
  596. package/services/taskExecutor/__tests__/taskExecutor.integration.test.d.ts +7 -0
  597. package/services/taskExecutor/__tests__/taskExecutor.integration.test.d.ts.map +1 -0
  598. package/services/taskExecutor/__tests__/taskExecutor.integration.test.js +205 -0
  599. package/services/taskExecutor/__tests__/taskExecutor.integration.test.js.map +1 -0
  600. package/services/taskExecutor/__tests__/timeout-cancellation.test.d.ts +7 -0
  601. package/services/taskExecutor/__tests__/timeout-cancellation.test.d.ts.map +1 -0
  602. package/services/taskExecutor/__tests__/timeout-cancellation.test.js +319 -0
  603. package/services/taskExecutor/__tests__/timeout-cancellation.test.js.map +1 -0
  604. package/services/taskExecutor/index.d.ts +40 -0
  605. package/services/taskExecutor/index.d.ts.map +1 -0
  606. package/services/taskExecutor/index.js +166 -0
  607. package/services/taskExecutor/index.js.map +1 -0
  608. package/services/taskExecutor/taskWorker.d.ts +11 -0
  609. package/services/taskExecutor/taskWorker.d.ts.map +1 -0
  610. package/services/taskExecutor/taskWorker.js +171 -0
  611. package/services/taskExecutor/taskWorker.js.map +1 -0
  612. package/services/taskExecutor/types.d.ts +145 -0
  613. package/services/taskExecutor/types.d.ts.map +1 -0
  614. package/services/taskExecutor/types.js +9 -0
  615. package/services/taskExecutor/types.js.map +1 -0
  616. package/services/telemetry.d.ts +40 -0
  617. package/services/telemetry.d.ts.map +1 -0
  618. package/services/telemetry.js +245 -0
  619. package/services/telemetry.js.map +1 -0
  620. package/services/tunnelService.d.ts +165 -0
  621. package/services/tunnelService.d.ts.map +1 -0
  622. package/services/tunnelService.js +493 -0
  623. package/services/tunnelService.js.map +1 -0
  624. package/types/a2a.d.ts +293 -0
  625. package/types/a2a.d.ts.map +1 -0
  626. package/types/a2a.js +23 -0
  627. package/types/a2a.js.map +1 -0
  628. package/types/agents.d.ts +94 -0
  629. package/types/agents.d.ts.map +1 -0
  630. package/types/agents.js +45 -0
  631. package/types/agents.js.map +1 -0
  632. package/types/claude-history.d.ts +62 -0
  633. package/types/claude-history.d.ts.map +1 -0
  634. package/types/claude-history.js +4 -0
  635. package/types/claude-history.js.map +1 -0
  636. package/types/claude-versions.d.ts +36 -0
  637. package/types/claude-versions.d.ts.map +1 -0
  638. package/types/claude-versions.js +3 -0
  639. package/types/claude-versions.js.map +1 -0
  640. package/types/commands.d.ts +50 -0
  641. package/types/commands.d.ts.map +1 -0
  642. package/types/commands.js +23 -0
  643. package/types/commands.js.map +1 -0
  644. package/types/plugins.d.ts +144 -0
  645. package/types/plugins.d.ts.map +1 -0
  646. package/types/plugins.js +8 -0
  647. package/types/plugins.js.map +1 -0
  648. package/types/projects.d.ts +46 -0
  649. package/types/projects.d.ts.map +1 -0
  650. package/types/projects.js +4 -0
  651. package/types/projects.js.map +1 -0
  652. package/types/scheduledTasks.d.ts +168 -0
  653. package/types/scheduledTasks.d.ts.map +1 -0
  654. package/types/scheduledTasks.js +17 -0
  655. package/types/scheduledTasks.js.map +1 -0
  656. package/types/skills.d.ts +91 -0
  657. package/types/skills.d.ts.map +1 -0
  658. package/types/skills.js +6 -0
  659. package/types/skills.js.map +1 -0
  660. package/types/slack.d.ts +97 -0
  661. package/types/slack.d.ts.map +1 -0
  662. package/types/slack.js +8 -0
  663. package/types/slack.js.map +1 -0
  664. package/types/streaming.d.ts +12 -0
  665. package/types/streaming.d.ts.map +1 -0
  666. package/types/streaming.js +8 -0
  667. package/types/streaming.js.map +1 -0
  668. package/types/subagents.d.ts +26 -0
  669. package/types/subagents.d.ts.map +1 -0
  670. package/types/subagents.js +3 -0
  671. package/types/subagents.js.map +1 -0
  672. package/utils/__tests__/claudeUtils.test.d.ts +5 -0
  673. package/utils/__tests__/claudeUtils.test.d.ts.map +1 -0
  674. package/utils/__tests__/claudeUtils.test.js +283 -0
  675. package/utils/__tests__/claudeUtils.test.js.map +1 -0
  676. package/utils/__tests__/configResolver.test.d.ts +7 -0
  677. package/utils/__tests__/configResolver.test.d.ts.map +1 -0
  678. package/utils/__tests__/configResolver.test.js +211 -0
  679. package/utils/__tests__/configResolver.test.js.map +1 -0
  680. package/utils/__tests__/sessionUtils.test.d.ts +5 -0
  681. package/utils/__tests__/sessionUtils.test.d.ts.map +1 -0
  682. package/utils/__tests__/sessionUtils.test.js +296 -0
  683. package/utils/__tests__/sessionUtils.test.js.map +1 -0
  684. package/utils/agentCardCache.d.ts +93 -0
  685. package/utils/agentCardCache.d.ts.map +1 -0
  686. package/utils/agentCardCache.js +212 -0
  687. package/utils/agentCardCache.js.map +1 -0
  688. package/utils/claudeUtils.d.ts +55 -0
  689. package/utils/claudeUtils.d.ts.map +1 -0
  690. package/utils/claudeUtils.js +355 -0
  691. package/utils/claudeUtils.js.map +1 -0
  692. package/utils/configResolver.d.ts +57 -0
  693. package/utils/configResolver.d.ts.map +1 -0
  694. package/utils/configResolver.js +130 -0
  695. package/utils/configResolver.js.map +1 -0
  696. package/utils/fileUtils.d.ts +2 -0
  697. package/utils/fileUtils.d.ts.map +1 -0
  698. package/utils/fileUtils.js +11 -0
  699. package/utils/fileUtils.js.map +1 -0
  700. package/utils/jwt.d.ts +30 -0
  701. package/utils/jwt.d.ts.map +1 -0
  702. package/utils/jwt.js +95 -0
  703. package/utils/jwt.js.map +1 -0
  704. package/utils/networkUtils.d.ts +25 -0
  705. package/utils/networkUtils.d.ts.map +1 -0
  706. package/utils/networkUtils.js +65 -0
  707. package/utils/networkUtils.js.map +1 -0
  708. package/utils/sessionUtils.d.ts +67 -0
  709. package/utils/sessionUtils.d.ts.map +1 -0
  710. package/utils/sessionUtils.js +296 -0
  711. package/utils/sessionUtils.js.map +1 -0
  712. package/.dockerignore +0 -53
  713. package/.mcp.json +0 -8
  714. package/CLAUDE.md +0 -359
  715. package/DOCKER.md +0 -270
  716. package/Dockerfile +0 -42
  717. package/JSONL_TOOLS_README.md +0 -301
  718. package/LICENSE +0 -603
  719. package/QUICKSTART.md +0 -253
  720. package/README.zh-CN.md +0 -200
  721. package/SOLUTION_SUMMARY.md +0 -249
  722. package/backend/comprehensive-session-check.js +0 -142
  723. package/backend/debug-sessions.js +0 -60
  724. package/backend/docs/chat-clean-1.svg +0 -1
  725. package/backend/docs/chat-clean.md +0 -60
  726. package/backend/docs/chat-comprehensive-1.svg +0 -1
  727. package/backend/docs/chat-comprehensive.md +0 -166
  728. package/backend/docs/chat_api_sequence_diagram.md +0 -58
  729. package/backend/docs/command-detection-logic.md +0 -306
  730. package/backend/docs/command-detection-sequence.md +0 -186
  731. package/backend/eslint.config.js +0 -25
  732. package/backend/package.json +0 -103
  733. package/backend/scripts/README.md +0 -156
  734. package/backend/scripts/fix-project-names.js +0 -113
  735. package/backend/scripts/migrate-projects.js +0 -159
  736. package/backend/src/bin/agentstudio.ts +0 -318
  737. package/backend/src/bin/serviceManager.ts +0 -469
  738. package/backend/src/config/index.ts +0 -184
  739. package/backend/src/config/paths.ts +0 -105
  740. package/backend/src/config/sdkConfig.ts +0 -126
  741. package/backend/src/index.ts +0 -434
  742. package/backend/src/jobs/taskTimeoutMonitor.ts +0 -106
  743. package/backend/src/middleware/a2aAuth.ts +0 -159
  744. package/backend/src/middleware/auth.ts +0 -39
  745. package/backend/src/middleware/httpsOnly.ts +0 -205
  746. package/backend/src/middleware/rateLimiting.ts +0 -130
  747. package/backend/src/routes/__tests__/a2a.integration.test.ts +0 -377
  748. package/backend/src/routes/__tests__/a2a.test.ts +0 -677
  749. package/backend/src/routes/__tests__/agents.test.ts +0 -327
  750. package/backend/src/routes/__tests__/sessions.test.ts +0 -345
  751. package/backend/src/routes/a2a.streaming.test.ts +0 -185
  752. package/backend/src/routes/a2a.ts +0 -840
  753. package/backend/src/routes/a2aManagement.ts +0 -545
  754. package/backend/src/routes/agents.ts +0 -1176
  755. package/backend/src/routes/auth.ts +0 -151
  756. package/backend/src/routes/cloudflareTunnel.ts +0 -306
  757. package/backend/src/routes/commands.ts +0 -524
  758. package/backend/src/routes/config.ts +0 -193
  759. package/backend/src/routes/files.ts +0 -375
  760. package/backend/src/routes/mcp.ts +0 -866
  761. package/backend/src/routes/mcpAdmin.ts +0 -369
  762. package/backend/src/routes/mcpAdminManagement.ts +0 -338
  763. package/backend/src/routes/media.ts +0 -140
  764. package/backend/src/routes/mediaAuth.ts +0 -150
  765. package/backend/src/routes/network.ts +0 -68
  766. package/backend/src/routes/plugins.ts +0 -368
  767. package/backend/src/routes/projects.ts +0 -1100
  768. package/backend/src/routes/scheduledTasks.ts +0 -442
  769. package/backend/src/routes/sessions.ts +0 -1054
  770. package/backend/src/routes/settings.ts +0 -552
  771. package/backend/src/routes/skills.ts +0 -319
  772. package/backend/src/routes/slack.ts +0 -193
  773. package/backend/src/routes/slides.ts +0 -166
  774. package/backend/src/routes/subagents.ts +0 -366
  775. package/backend/src/routes/taskExecutor.ts +0 -243
  776. package/backend/src/routes/tunnel.ts +0 -317
  777. package/backend/src/routes/version.ts +0 -239
  778. package/backend/src/schemas/a2a.ts +0 -352
  779. package/backend/src/services/__tests__/pluginInstaller.test.ts +0 -316
  780. package/backend/src/services/__tests__/pluginParser.test.ts +0 -285
  781. package/backend/src/services/__tests__/pluginPaths.test.ts +0 -212
  782. package/backend/src/services/__tests__/pluginScanner.test.ts +0 -287
  783. package/backend/src/services/__tests__/pluginSymlink.test.ts +0 -340
  784. package/backend/src/services/__tests__/projectMetadataStorage.test.ts +0 -158
  785. package/backend/src/services/__tests__/sessionConcurrency.test.ts +0 -132
  786. package/backend/src/services/__tests__/slackAIService.test.ts +0 -561
  787. package/backend/src/services/__tests__/slackThreadMapper.test.ts +0 -228
  788. package/backend/src/services/a2a/__tests__/a2aClientTool.integration.test.ts +0 -347
  789. package/backend/src/services/a2a/__tests__/a2aClientTool.test.ts +0 -710
  790. package/backend/src/services/a2a/__tests__/a2aConfigService.test.ts +0 -526
  791. package/backend/src/services/a2a/__tests__/a2aConfigServicePath.test.ts +0 -55
  792. package/backend/src/services/a2a/__tests__/a2aSdkMcp.test.ts +0 -254
  793. package/backend/src/services/a2a/__tests__/agentCardService.test.ts +0 -357
  794. package/backend/src/services/a2a/__tests__/apiKeyService.test.ts +0 -378
  795. package/backend/src/services/a2a/__tests__/buildQueryOptionsIntegration.test.ts +0 -41
  796. package/backend/src/services/a2a/__tests__/dynamic_config_verification.test.ts +0 -71
  797. package/backend/src/services/a2a/__tests__/integrateA2AMcpServer.test.ts +0 -97
  798. package/backend/src/services/a2a/__tests__/taskManager.integration.test.ts +0 -417
  799. package/backend/src/services/a2a/__tests__/taskManager.test.ts +0 -511
  800. package/backend/src/services/a2a/__tests__/webhookService.test.ts +0 -258
  801. package/backend/src/services/a2a/a2aClientTool.ts +0 -723
  802. package/backend/src/services/a2a/a2aConfigService.ts +0 -194
  803. package/backend/src/services/a2a/a2aHistoryService.ts +0 -111
  804. package/backend/src/services/a2a/a2aIntegration.ts +0 -40
  805. package/backend/src/services/a2a/a2aQueryService.ts +0 -275
  806. package/backend/src/services/a2a/a2aSdkMcp.ts +0 -208
  807. package/backend/src/services/a2a/a2aStreamEvents.ts +0 -166
  808. package/backend/src/services/a2a/agentCardService.ts +0 -256
  809. package/backend/src/services/a2a/agentMappingService.ts +0 -202
  810. package/backend/src/services/a2a/apiKeyService.ts +0 -361
  811. package/backend/src/services/a2a/taskCleanup.ts +0 -199
  812. package/backend/src/services/a2a/taskManager.ts +0 -327
  813. package/backend/src/services/a2a/webhookService.ts +0 -161
  814. package/backend/src/services/agentStorage.ts +0 -506
  815. package/backend/src/services/askUserQuestion/askUserQuestionIntegration.ts +0 -68
  816. package/backend/src/services/askUserQuestion/askUserQuestionMcp.ts +0 -173
  817. package/backend/src/services/askUserQuestion/index.ts +0 -48
  818. package/backend/src/services/askUserQuestion/init.ts +0 -53
  819. package/backend/src/services/askUserQuestion/notificationChannel.ts +0 -218
  820. package/backend/src/services/askUserQuestion/slackNotificationChannel.ts +0 -150
  821. package/backend/src/services/askUserQuestion/sseNotificationChannel.ts +0 -102
  822. package/backend/src/services/askUserQuestion/userInputRegistry.ts +0 -307
  823. package/backend/src/services/claudeSession.ts +0 -421
  824. package/backend/src/services/claudeVersionStorage.ts +0 -389
  825. package/backend/src/services/mcpAdmin/__tests__/adminApiKeyService.test.ts +0 -385
  826. package/backend/src/services/mcpAdmin/__tests__/mcpAdminRoutes.test.ts +0 -356
  827. package/backend/src/services/mcpAdmin/__tests__/mcpAdminServer.test.ts +0 -541
  828. package/backend/src/services/mcpAdmin/__tests__/providerTools.test.ts +0 -347
  829. package/backend/src/services/mcpAdmin/__tests__/tools.test.ts +0 -463
  830. package/backend/src/services/mcpAdmin/adminApiKeyService.ts +0 -329
  831. package/backend/src/services/mcpAdmin/index.ts +0 -19
  832. package/backend/src/services/mcpAdmin/mcpAdminServer.ts +0 -318
  833. package/backend/src/services/mcpAdmin/tools/agentTools.ts +0 -390
  834. package/backend/src/services/mcpAdmin/tools/index.ts +0 -29
  835. package/backend/src/services/mcpAdmin/tools/mcpServerTools.ts +0 -368
  836. package/backend/src/services/mcpAdmin/tools/projectTools.ts +0 -415
  837. package/backend/src/services/mcpAdmin/tools/providerTools.ts +0 -649
  838. package/backend/src/services/mcpAdmin/tools/systemTools.ts +0 -254
  839. package/backend/src/services/mcpAdmin/types.ts +0 -155
  840. package/backend/src/services/messageQueue.ts +0 -80
  841. package/backend/src/services/pluginInstaller.ts +0 -329
  842. package/backend/src/services/pluginParser.ts +0 -441
  843. package/backend/src/services/pluginPaths.ts +0 -270
  844. package/backend/src/services/pluginScanner.ts +0 -245
  845. package/backend/src/services/pluginSymlink.ts +0 -241
  846. package/backend/src/services/projectMetadataStorage.ts +0 -871
  847. package/backend/src/services/scheduledTaskStorage.ts +0 -377
  848. package/backend/src/services/schedulerService.ts +0 -668
  849. package/backend/src/services/sessionManager.ts +0 -738
  850. package/backend/src/services/skillStorage.ts +0 -521
  851. package/backend/src/services/slackAIService.ts +0 -1395
  852. package/backend/src/services/slackClient.ts +0 -110
  853. package/backend/src/services/slackSessionLock.ts +0 -364
  854. package/backend/src/services/slackThreadMapper.ts +0 -170
  855. package/backend/src/services/taskExecutor/BuiltinExecutor.ts +0 -611
  856. package/backend/src/services/taskExecutor/__tests__/a2a-tasks.test.ts +0 -382
  857. package/backend/src/services/taskExecutor/__tests__/e2e-workflows.test.ts +0 -528
  858. package/backend/src/services/taskExecutor/__tests__/error-handling.test.ts +0 -458
  859. package/backend/src/services/taskExecutor/__tests__/stress.test.ts +0 -400
  860. package/backend/src/services/taskExecutor/__tests__/taskExecutor.integration.test.ts +0 -240
  861. package/backend/src/services/taskExecutor/__tests__/timeout-cancellation.test.ts +0 -384
  862. package/backend/src/services/taskExecutor/index.ts +0 -168
  863. package/backend/src/services/taskExecutor/taskWorker.ts +0 -222
  864. package/backend/src/services/taskExecutor/types.ts +0 -179
  865. package/backend/src/services/telemetry.ts +0 -234
  866. package/backend/src/services/tunnelService.ts +0 -614
  867. package/backend/src/types/a2a.ts +0 -372
  868. package/backend/src/types/agents.ts +0 -161
  869. package/backend/src/types/claude-history.ts +0 -81
  870. package/backend/src/types/claude-versions.ts +0 -39
  871. package/backend/src/types/commands.ts +0 -63
  872. package/backend/src/types/plugins.ts +0 -157
  873. package/backend/src/types/projects.ts +0 -64
  874. package/backend/src/types/scheduledTasks.ts +0 -214
  875. package/backend/src/types/skills.ts +0 -130
  876. package/backend/src/types/slack.ts +0 -112
  877. package/backend/src/types/streaming.ts +0 -13
  878. package/backend/src/types/subagents.ts +0 -29
  879. package/backend/src/utils/__tests__/claudeUtils.test.ts +0 -312
  880. package/backend/src/utils/__tests__/configResolver.test.ts +0 -255
  881. package/backend/src/utils/__tests__/sessionUtils.test.ts +0 -384
  882. package/backend/src/utils/agentCardCache.ts +0 -245
  883. package/backend/src/utils/claudeUtils.ts +0 -377
  884. package/backend/src/utils/configResolver.ts +0 -175
  885. package/backend/src/utils/fileUtils.ts +0 -5
  886. package/backend/src/utils/jwt.ts +0 -104
  887. package/backend/src/utils/networkUtils.ts +0 -68
  888. package/backend/src/utils/sessionUtils.ts +0 -303
  889. package/backend/tsconfig.json +0 -25
  890. package/backend/vitest.config.ts +0 -29
  891. package/docker-compose.traefik.yml +0 -59
  892. package/docker-compose.yml +0 -38
  893. package/docker-entrypoint.sh +0 -30
  894. package/docs/CLOUDFLARE_TUNNEL.md +0 -233
  895. package/docs/CLOUDFLARE_TUNNEL_ARCHITECTURE.md +0 -406
  896. package/docs/LAVS-IMPLEMENTATION.md +0 -1973
  897. package/docs/LAVS-SPEC.md +0 -951
  898. package/docs/QUICK_START_CLOUDFLARE_TUNNEL.md +0 -304
  899. package/docs/SCHEDULER_CONTROL.md +0 -142
  900. package/docs/SCHEDULER_STATUS_DISPLAY.md +0 -86
  901. package/docs/USER_MANUAL.md +0 -1726
  902. package/docs/USER_MANUAL_EN.md +0 -1408
  903. package/docs/VERSION_COMPATIBILITY.md +0 -616
  904. package/docs/api/a2a-endpoints.md +0 -891
  905. package/docs/guides/unified-task-executor-summary.md +0 -365
  906. package/docs/guides/unified-task-executor.md +0 -304
  907. package/docs/screenshots/01-homepage.png +0 -0
  908. package/docs/screenshots/02-dashboard.png +0 -0
  909. package/docs/screenshots/03-projects.png +0 -0
  910. package/docs/screenshots/04-agents.png +0 -0
  911. package/docs/screenshots/05-mcp-services.png +0 -0
  912. package/docs/screenshots/06-commands.png +0 -0
  913. package/docs/screenshots/07-chat.png +0 -0
  914. package/docs/screenshots/08-skills.png +0 -0
  915. package/docs/screenshots/09-settings.png +0 -0
  916. package/docs/screenshots/10-suppliers.png +0 -0
  917. package/docs/screenshots/11-plugins.png +0 -0
  918. package/docs/screenshots/agent-create-dialog.png +0 -0
  919. package/docs/screenshots/agent-edit-dialog.png +0 -0
  920. package/docs/screenshots/agent-list-overview.png +0 -0
  921. package/docs/screenshots/agent-tools-selection.png +0 -0
  922. package/docs/screenshots/agents-management.png +0 -0
  923. package/docs/screenshots/auto-compacted-session.png +0 -0
  924. package/docs/screenshots/chat-interface.png +0 -0
  925. package/docs/screenshots/chat-session-debug.png +0 -0
  926. package/docs/screenshots/chat-session-history.png +0 -0
  927. package/docs/screenshots/chat-tools-selection.png +0 -0
  928. package/docs/screenshots/commands-create-dialog.png +0 -0
  929. package/docs/screenshots/commands-overview.png +0 -0
  930. package/docs/screenshots/create-project-dialog.png +0 -0
  931. package/docs/screenshots/dashboard-overview.png +0 -0
  932. package/docs/screenshots/file-browser-interface.png +0 -0
  933. package/docs/screenshots/import-project-dialog.png +0 -0
  934. package/docs/screenshots/mcp-add-service-dialog.png +0 -0
  935. package/docs/screenshots/mcp-admin-settings.png +0 -0
  936. package/docs/screenshots/mcp-import-claude-code.png +0 -0
  937. package/docs/screenshots/mcp-list-overview.png +0 -0
  938. package/docs/screenshots/mcp-services-page.png +0 -0
  939. package/docs/screenshots/password-management-modal.png +0 -0
  940. package/docs/screenshots/plugins-add-market.png +0 -0
  941. package/docs/screenshots/plugins-browse.png +0 -0
  942. package/docs/screenshots/plugins-overview.png +0 -0
  943. package/docs/screenshots/ppt-editor-chat-interface.png +0 -0
  944. package/docs/screenshots/project-commands-dialog.png +0 -0
  945. package/docs/screenshots/project-list-overview.png +0 -0
  946. package/docs/screenshots/project-memory-dialog.png +0 -0
  947. package/docs/screenshots/project-settings-dialog.png +0 -0
  948. package/docs/screenshots/project-subagent-dialog.png +0 -0
  949. package/docs/screenshots/projects-management.png +0 -0
  950. package/docs/screenshots/projects-overview.png +0 -0
  951. package/docs/screenshots/scheduled-tasks-create-dialog.png +0 -0
  952. package/docs/screenshots/scheduled-tasks-execution-history.png +0 -0
  953. package/docs/screenshots/scheduled-tasks-overview.png +0 -0
  954. package/docs/screenshots/session-display-issue.png +0 -0
  955. package/docs/screenshots/session-messages-fix.png +0 -0
  956. package/docs/screenshots/session-messages-loaded.png +0 -0
  957. package/docs/screenshots/settings-general.png +0 -0
  958. package/docs/screenshots/settings-memory.png +0 -0
  959. package/docs/screenshots/skills-create-dialog.png +0 -0
  960. package/docs/screenshots/skills-list-overview.png +0 -0
  961. package/docs/screenshots/skills-view-detail.png +0 -0
  962. package/docs/screenshots/slide-preview-after-fix.png +0 -0
  963. package/docs/screenshots/storybook-basetool-full.png +0 -0
  964. package/docs/screenshots/storybook-fixed.png +0 -0
  965. package/docs/screenshots/storybook-tasktool.png +0 -0
  966. package/docs/screenshots/supplier-add-dialog.png +0 -0
  967. package/docs/screenshots/supplier-edit-dialog.png +0 -0
  968. package/docs/screenshots/suppliers-overview.png +0 -0
  969. package/docs/screenshots/telemetry-settings.png +0 -0
  970. package/docs/screenshots/version-management-page.png +0 -0
  971. package/docs-site/.vitepress/cache/deps/@theme_index.js +0 -275
  972. package/docs-site/.vitepress/cache/deps/@theme_index.js.map +0 -7
  973. package/docs-site/.vitepress/cache/deps/_metadata.json +0 -58
  974. package/docs-site/.vitepress/cache/deps/chunk-CN42XFKG.js +0 -12824
  975. package/docs-site/.vitepress/cache/deps/chunk-CN42XFKG.js.map +0 -7
  976. package/docs-site/.vitepress/cache/deps/chunk-Y3A3J5YD.js +0 -9719
  977. package/docs-site/.vitepress/cache/deps/chunk-Y3A3J5YD.js.map +0 -7
  978. package/docs-site/.vitepress/cache/deps/package.json +0 -3
  979. package/docs-site/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -4505
  980. package/docs-site/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -7
  981. package/docs-site/.vitepress/cache/deps/vitepress___@vueuse_core.js +0 -583
  982. package/docs-site/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +0 -7
  983. package/docs-site/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js +0 -1352
  984. package/docs-site/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js.map +0 -7
  985. package/docs-site/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js +0 -1665
  986. package/docs-site/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js.map +0 -7
  987. package/docs-site/.vitepress/cache/deps/vitepress___minisearch.js +0 -1813
  988. package/docs-site/.vitepress/cache/deps/vitepress___minisearch.js.map +0 -7
  989. package/docs-site/.vitepress/cache/deps/vue.js +0 -347
  990. package/docs-site/.vitepress/cache/deps/vue.js.map +0 -7
  991. package/docs-site/src/.vitepress/cache/deps/_metadata.json +0 -52
  992. package/docs-site/src/.vitepress/cache/deps/chunk-CN42XFKG.js +0 -12824
  993. package/docs-site/src/.vitepress/cache/deps/chunk-CN42XFKG.js.map +0 -7
  994. package/docs-site/src/.vitepress/cache/deps/chunk-Y3A3J5YD.js +0 -9719
  995. package/docs-site/src/.vitepress/cache/deps/chunk-Y3A3J5YD.js.map +0 -7
  996. package/docs-site/src/.vitepress/cache/deps/package.json +0 -3
  997. package/docs-site/src/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -4505
  998. package/docs-site/src/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -7
  999. package/docs-site/src/.vitepress/cache/deps/vitepress___@vueuse_core.js +0 -583
  1000. package/docs-site/src/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +0 -7
  1001. package/docs-site/src/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js +0 -1352
  1002. package/docs-site/src/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js.map +0 -7
  1003. package/docs-site/src/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js +0 -1665
  1004. package/docs-site/src/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js.map +0 -7
  1005. package/docs-site/src/.vitepress/cache/deps/vitepress___minisearch.js +0 -1813
  1006. package/docs-site/src/.vitepress/cache/deps/vitepress___minisearch.js.map +0 -7
  1007. package/docs-site/src/.vitepress/cache/deps/vue.js +0 -347
  1008. package/docs-site/src/.vitepress/cache/deps/vue.js.map +0 -7
  1009. package/frontend/.storybook/main.ts +0 -22
  1010. package/frontend/.storybook/preview.ts +0 -27
  1011. package/frontend/.storybook/vitest.setup.ts +0 -7
  1012. package/frontend/README.md +0 -69
  1013. package/frontend/components.json +0 -17
  1014. package/frontend/eslint.config.js +0 -26
  1015. package/frontend/index.html +0 -62
  1016. package/frontend/package-lock.json +0 -7922
  1017. package/frontend/package.json +0 -90
  1018. package/frontend/pnpm-lock.yaml +0 -4714
  1019. package/frontend/postcss.config.js +0 -6
  1020. package/frontend/scripts/extract-chinese.js +0 -146
  1021. package/frontend/src/App.css +0 -42
  1022. package/frontend/src/App.tsx +0 -201
  1023. package/frontend/src/__tests__/smoke.test.tsx +0 -15
  1024. package/frontend/src/agents/README.md +0 -136
  1025. package/frontend/src/agents/chat/index.ts +0 -17
  1026. package/frontend/src/agents/registry.ts +0 -22
  1027. package/frontend/src/agents/slides/components/SlidePreview.tsx +0 -287
  1028. package/frontend/src/agents/slides/components/SlidePreviewPanel.tsx +0 -120
  1029. package/frontend/src/agents/slides/hooks/useSlides.ts +0 -245
  1030. package/frontend/src/agents/slides/index.ts +0 -17
  1031. package/frontend/src/agents/slides/stores/useSlidesStore.ts +0 -56
  1032. package/frontend/src/agents/types.ts +0 -18
  1033. package/frontend/src/api/skills.ts +0 -184
  1034. package/frontend/src/assets/react.svg +0 -1
  1035. package/frontend/src/components/AgentChatPanel.tsx +0 -901
  1036. package/frontend/src/components/ApiSettingsModal.tsx +0 -267
  1037. package/frontend/src/components/BackendOnboardingWizard.tsx +0 -255
  1038. package/frontend/src/components/BackendServiceSwitcher.tsx +0 -356
  1039. package/frontend/src/components/CSVPreview.tsx +0 -465
  1040. package/frontend/src/components/ChatMessageRenderer.tsx +0 -279
  1041. package/frontend/src/components/CommandForm.tsx +0 -560
  1042. package/frontend/src/components/CommandSelector.tsx +0 -218
  1043. package/frontend/src/components/CompactSummary.tsx +0 -52
  1044. package/frontend/src/components/ConfirmDialog.tsx +0 -69
  1045. package/frontend/src/components/DiffViewer.css +0 -78
  1046. package/frontend/src/components/DiffViewer.tsx +0 -89
  1047. package/frontend/src/components/EnvVarsConfig.tsx +0 -113
  1048. package/frontend/src/components/ErrorBoundary.tsx +0 -100
  1049. package/frontend/src/components/ErrorMessage.tsx +0 -197
  1050. package/frontend/src/components/FileBrowser.tsx +0 -480
  1051. package/frontend/src/components/FileContentViewer.tsx +0 -155
  1052. package/frontend/src/components/FileExplorer/FileIcon.tsx +0 -32
  1053. package/frontend/src/components/FileExplorer/FilePreview.tsx +0 -130
  1054. package/frontend/src/components/FileExplorer/FileTabs.tsx +0 -104
  1055. package/frontend/src/components/FileExplorer/FileTreeToolbar.tsx +0 -30
  1056. package/frontend/src/components/FileExplorer/ImagePreview.tsx +0 -86
  1057. package/frontend/src/components/FileExplorer/REFACTOR_SUMMARY.md +0 -117
  1058. package/frontend/src/components/FileExplorer/TabDropdown.tsx +0 -59
  1059. package/frontend/src/components/FileExplorer/TreeNode.tsx +0 -73
  1060. package/frontend/src/components/FileExplorer/constants.ts +0 -16
  1061. package/frontend/src/components/FileExplorer/fileTypes.ts +0 -156
  1062. package/frontend/src/components/FileExplorer/hooks/index.ts +0 -2
  1063. package/frontend/src/components/FileExplorer/hooks/useFileTabs.ts +0 -120
  1064. package/frontend/src/components/FileExplorer/hooks/useLazyFileTree.ts +0 -260
  1065. package/frontend/src/components/FileExplorer/index.ts +0 -15
  1066. package/frontend/src/components/FileExplorer.tsx +0 -1124
  1067. package/frontend/src/components/FloatingToggle.tsx +0 -66
  1068. package/frontend/src/components/ImagePreview.tsx +0 -369
  1069. package/frontend/src/components/JSONLPreview.tsx +0 -421
  1070. package/frontend/src/components/LanguageSwitcher.tsx +0 -32
  1071. package/frontend/src/components/Layout.tsx +0 -57
  1072. package/frontend/src/components/MarkdownMessage.tsx +0 -136
  1073. package/frontend/src/components/McpStatusModal.tsx +0 -272
  1074. package/frontend/src/components/MermaidDiagram.tsx +0 -423
  1075. package/frontend/src/components/MobileChatInput.tsx +0 -158
  1076. package/frontend/src/components/MobileChatToolbar.tsx +0 -164
  1077. package/frontend/src/components/MobileNavigation.tsx +0 -101
  1078. package/frontend/src/components/MobileSettingsModal.tsx +0 -272
  1079. package/frontend/src/components/MobileSidebar.tsx +0 -56
  1080. package/frontend/src/components/PanelToggle.tsx +0 -69
  1081. package/frontend/src/components/ProjectA2AModal.tsx +0 -1430
  1082. package/frontend/src/components/ProjectCommandsModal.tsx +0 -453
  1083. package/frontend/src/components/ProjectMemoryModal.tsx +0 -178
  1084. package/frontend/src/components/ProjectSelector.tsx +0 -498
  1085. package/frontend/src/components/ProjectSettingsModal.tsx +0 -210
  1086. package/frontend/src/components/ProjectSubAgentsModal.tsx +0 -421
  1087. package/frontend/src/components/ProjectTable.tsx +0 -387
  1088. package/frontend/src/components/ProtectedRoute.tsx +0 -123
  1089. package/frontend/src/components/RecentActivity.tsx +0 -145
  1090. package/frontend/src/components/ResponsiveTable.tsx +0 -164
  1091. package/frontend/src/components/RightPanelHeader.tsx +0 -87
  1092. package/frontend/src/components/RightPanelWrapper.tsx +0 -74
  1093. package/frontend/src/components/ScheduledTaskEditor.tsx +0 -718
  1094. package/frontend/src/components/ServiceManagementModal.tsx +0 -794
  1095. package/frontend/src/components/ServiceStatusIndicator.tsx +0 -334
  1096. package/frontend/src/components/SessionsDashboard.tsx +0 -295
  1097. package/frontend/src/components/SessionsDropdown.tsx +0 -168
  1098. package/frontend/src/components/SettingsDropdown.tsx +0 -236
  1099. package/frontend/src/components/SettingsLayout.tsx +0 -16
  1100. package/frontend/src/components/Sidebar.tsx +0 -283
  1101. package/frontend/src/components/SplitLayout.tsx +0 -261
  1102. package/frontend/src/components/SubagentForm.tsx +0 -468
  1103. package/frontend/src/components/SwipeActions.tsx +0 -413
  1104. package/frontend/src/components/SystemPromptEditor.tsx +0 -126
  1105. package/frontend/src/components/TaskExecutionHistory.tsx +0 -373
  1106. package/frontend/src/components/TelemetryProvider.tsx +0 -157
  1107. package/frontend/src/components/ToolUsage.tsx +0 -34
  1108. package/frontend/src/components/ToolsList.tsx +0 -86
  1109. package/frontend/src/components/UnifiedToolSelector.tsx +0 -508
  1110. package/frontend/src/components/UpdateNotification.tsx +0 -105
  1111. package/frontend/src/components/agentChat/AgentChatInput.tsx +0 -249
  1112. package/frontend/src/components/agentChat/AgentChatMobileInput.tsx +0 -266
  1113. package/frontend/src/components/agentChat/AgentCommandSelector.tsx +0 -226
  1114. package/frontend/src/components/agentChat/AgentInputArea.tsx +0 -573
  1115. package/frontend/src/components/agentChat/ChatMessageList.tsx +0 -125
  1116. package/frontend/src/components/agentChat/index.ts +0 -7
  1117. package/frontend/src/components/onboarding/BackendDetectingStep.tsx +0 -42
  1118. package/frontend/src/components/onboarding/BackendFoundStep.tsx +0 -75
  1119. package/frontend/src/components/onboarding/BackendNotFoundStep.tsx +0 -249
  1120. package/frontend/src/components/onboarding/OnboardingCompleteStep.tsx +0 -90
  1121. package/frontend/src/components/onboarding/WelcomeStep.tsx +0 -93
  1122. package/frontend/src/components/plugins/AddMarketplaceModal.tsx +0 -186
  1123. package/frontend/src/components/plugins/BrowsePluginsTab.tsx +0 -262
  1124. package/frontend/src/components/plugins/InstalledPluginsTab.tsx +0 -246
  1125. package/frontend/src/components/plugins/MarketplacesTab.tsx +0 -168
  1126. package/frontend/src/components/plugins/PluginDetailModal.tsx +0 -307
  1127. package/frontend/src/components/settings/version/ClaudeVersionForm.tsx +0 -266
  1128. package/frontend/src/components/settings/version/ClaudeVersionList.tsx +0 -61
  1129. package/frontend/src/components/settings/version/EnvironmentVariablesSection.tsx +0 -173
  1130. package/frontend/src/components/settings/version/ModelConfigSection.tsx +0 -129
  1131. package/frontend/src/components/settings/version/VersionListItem.tsx +0 -133
  1132. package/frontend/src/components/settings/version/VersionTemplateSelector.tsx +0 -53
  1133. package/frontend/src/components/skills/CreateSkillModal.tsx +0 -702
  1134. package/frontend/src/components/skills/SkillDetailModal.tsx +0 -180
  1135. package/frontend/src/components/skills/SkillFileBrowserModal.tsx +0 -67
  1136. package/frontend/src/components/skills/SkillPreview.tsx +0 -150
  1137. package/frontend/src/components/skills/SkillsPage.tsx +0 -329
  1138. package/frontend/src/components/skills/index.ts +0 -4
  1139. package/frontend/src/components/tools/A2ACallTool.tsx +0 -733
  1140. package/frontend/src/components/tools/AskUserQuestionTool.stories.tsx +0 -223
  1141. package/frontend/src/components/tools/AskUserQuestionTool.tsx +0 -546
  1142. package/frontend/src/components/tools/BaseToolComponent.stories.tsx +0 -316
  1143. package/frontend/src/components/tools/BaseToolComponent.tsx +0 -226
  1144. package/frontend/src/components/tools/BashOutputTool.stories.tsx +0 -106
  1145. package/frontend/src/components/tools/BashOutputTool.tsx +0 -198
  1146. package/frontend/src/components/tools/BashTool.stories.tsx +0 -163
  1147. package/frontend/src/components/tools/BashTool.tsx +0 -80
  1148. package/frontend/src/components/tools/EditTool.stories.tsx +0 -109
  1149. package/frontend/src/components/tools/EditTool.tsx +0 -60
  1150. package/frontend/src/components/tools/ExitPlanModeTool.stories.tsx +0 -118
  1151. package/frontend/src/components/tools/ExitPlanModeTool.tsx +0 -34
  1152. package/frontend/src/components/tools/GlobTool.stories.tsx +0 -122
  1153. package/frontend/src/components/tools/GlobTool.tsx +0 -50
  1154. package/frontend/src/components/tools/GrepTool.stories.tsx +0 -125
  1155. package/frontend/src/components/tools/GrepTool.tsx +0 -87
  1156. package/frontend/src/components/tools/KillBashTool.stories.tsx +0 -120
  1157. package/frontend/src/components/tools/KillBashTool.tsx +0 -112
  1158. package/frontend/src/components/tools/LSTool.stories.tsx +0 -132
  1159. package/frontend/src/components/tools/LSTool.tsx +0 -41
  1160. package/frontend/src/components/tools/ListMcpResourcesTool.stories.tsx +0 -125
  1161. package/frontend/src/components/tools/ListMcpResourcesTool.tsx +0 -84
  1162. package/frontend/src/components/tools/McpTool.stories.tsx +0 -140
  1163. package/frontend/src/components/tools/McpTool.tsx +0 -266
  1164. package/frontend/src/components/tools/MultiEditTool.stories.tsx +0 -127
  1165. package/frontend/src/components/tools/MultiEditTool.tsx +0 -59
  1166. package/frontend/src/components/tools/NotebookEditTool.stories.tsx +0 -137
  1167. package/frontend/src/components/tools/NotebookEditTool.tsx +0 -57
  1168. package/frontend/src/components/tools/NotebookReadTool.stories.tsx +0 -134
  1169. package/frontend/src/components/tools/NotebookReadTool.tsx +0 -25
  1170. package/frontend/src/components/tools/README.md +0 -677
  1171. package/frontend/src/components/tools/ReadMcpResourceTool.stories.tsx +0 -125
  1172. package/frontend/src/components/tools/ReadMcpResourceTool.tsx +0 -126
  1173. package/frontend/src/components/tools/ReadTool.stories.tsx +0 -116
  1174. package/frontend/src/components/tools/ReadTool.tsx +0 -37
  1175. package/frontend/src/components/tools/SkillTool.tsx +0 -91
  1176. package/frontend/src/components/tools/SubAgentMessageFlow.tsx +0 -172
  1177. package/frontend/src/components/tools/TaskTool.stories.tsx +0 -483
  1178. package/frontend/src/components/tools/TaskTool.tsx +0 -199
  1179. package/frontend/src/components/tools/TimeMachineTool.stories.tsx +0 -254
  1180. package/frontend/src/components/tools/TimeMachineTool.tsx +0 -126
  1181. package/frontend/src/components/tools/TodoWriteTool.stories.tsx +0 -128
  1182. package/frontend/src/components/tools/TodoWriteTool.tsx +0 -74
  1183. package/frontend/src/components/tools/ToolRenderer.stories.tsx +0 -460
  1184. package/frontend/src/components/tools/ToolRenderer.tsx +0 -147
  1185. package/frontend/src/components/tools/WebFetchTool.stories.tsx +0 -114
  1186. package/frontend/src/components/tools/WebFetchTool.tsx +0 -50
  1187. package/frontend/src/components/tools/WebSearchTool.stories.tsx +0 -124
  1188. package/frontend/src/components/tools/WebSearchTool.tsx +0 -67
  1189. package/frontend/src/components/tools/WriteTool.stories.tsx +0 -115
  1190. package/frontend/src/components/tools/WriteTool.tsx +0 -41
  1191. package/frontend/src/components/tools/__mocks__/toolTestData.ts +0 -557
  1192. package/frontend/src/components/tools/customMcpTools.tsx +0 -17
  1193. package/frontend/src/components/tools/index.stories.tsx +0 -107
  1194. package/frontend/src/components/tools/index.ts +0 -24
  1195. package/frontend/src/components/tools/mcpUtils.ts +0 -27
  1196. package/frontend/src/components/tools/sdk-types.ts +0 -327
  1197. package/frontend/src/components/tools/types.ts +0 -218
  1198. package/frontend/src/components/ui/Button.tsx +0 -39
  1199. package/frontend/src/components/ui/Input.tsx +0 -24
  1200. package/frontend/src/components/ui/Textarea.tsx +0 -23
  1201. package/frontend/src/components/ui/VersionInfo.tsx +0 -116
  1202. package/frontend/src/components/ui/dialog.tsx +0 -90
  1203. package/frontend/src/components/ui/index.ts +0 -4
  1204. package/frontend/src/components/ui/label.tsx +0 -19
  1205. package/frontend/src/components/ui/select.tsx +0 -121
  1206. package/frontend/src/components/ui/table.tsx +0 -117
  1207. package/frontend/src/components/ui/tabs.tsx +0 -124
  1208. package/frontend/src/components/ui/toast.tsx +0 -127
  1209. package/frontend/src/components/ui/toaster.tsx +0 -33
  1210. package/frontend/src/contexts/MobileContext.tsx +0 -109
  1211. package/frontend/src/hooks/__tests__/useAIStreamHandler.test.ts +0 -1198
  1212. package/frontend/src/hooks/agentChat/index.ts +0 -10
  1213. package/frontend/src/hooks/agentChat/useAIStreamHandler.ts +0 -1594
  1214. package/frontend/src/hooks/agentChat/useClaudeVersionManager.ts +0 -99
  1215. package/frontend/src/hooks/agentChat/useCommandCompletion.ts +0 -253
  1216. package/frontend/src/hooks/agentChat/useImageUpload.ts +0 -176
  1217. package/frontend/src/hooks/agentChat/useMessageSender.ts +0 -391
  1218. package/frontend/src/hooks/agentChat/useScrollManagement.ts +0 -66
  1219. package/frontend/src/hooks/agentChat/useSessionManager.ts +0 -110
  1220. package/frontend/src/hooks/agentChat/useToolSelector.ts +0 -82
  1221. package/frontend/src/hooks/agentChat/useUIState.ts +0 -103
  1222. package/frontend/src/hooks/index.ts +0 -3
  1223. package/frontend/src/hooks/use-toast.ts +0 -194
  1224. package/frontend/src/hooks/useA2AConfig.ts +0 -224
  1225. package/frontend/src/hooks/useA2AManagement.ts +0 -456
  1226. package/frontend/src/hooks/useAI.ts +0 -264
  1227. package/frontend/src/hooks/useAgents.ts +0 -411
  1228. package/frontend/src/hooks/useApiBase.ts +0 -31
  1229. package/frontend/src/hooks/useAuth.ts +0 -454
  1230. package/frontend/src/hooks/useBackendServices.ts +0 -58
  1231. package/frontend/src/hooks/useClaudeVersions.ts +0 -128
  1232. package/frontend/src/hooks/useCommands.ts +0 -312
  1233. package/frontend/src/hooks/useDashboardStats.ts +0 -61
  1234. package/frontend/src/hooks/useFileSystem.ts +0 -349
  1235. package/frontend/src/hooks/useFiles.ts +0 -80
  1236. package/frontend/src/hooks/useMarketplaces.ts +0 -120
  1237. package/frontend/src/hooks/useMobile.tsx +0 -110
  1238. package/frontend/src/hooks/usePlugins.ts +0 -239
  1239. package/frontend/src/hooks/useProjects.ts +0 -45
  1240. package/frontend/src/hooks/useResponsiveSettings.tsx +0 -22
  1241. package/frontend/src/hooks/useScheduledTasks.ts +0 -483
  1242. package/frontend/src/hooks/useSessionHeartbeat.ts +0 -173
  1243. package/frontend/src/hooks/useSessionHeartbeatOnSuccess.ts +0 -80
  1244. package/frontend/src/hooks/useSessions.ts +0 -96
  1245. package/frontend/src/hooks/useSkills.ts +0 -197
  1246. package/frontend/src/hooks/useSubagents.ts +0 -274
  1247. package/frontend/src/hooks/useTabNotification.ts +0 -155
  1248. package/frontend/src/hooks/useVersionCheck.ts +0 -164
  1249. package/frontend/src/i18n/index.ts +0 -66
  1250. package/frontend/src/i18n/locales/en-US/agents.json +0 -85
  1251. package/frontend/src/i18n/locales/en-US/common.json +0 -155
  1252. package/frontend/src/i18n/locales/en-US/components.json +0 -1197
  1253. package/frontend/src/i18n/locales/en-US/errors.json +0 -56
  1254. package/frontend/src/i18n/locales/en-US/home.json +0 -27
  1255. package/frontend/src/i18n/locales/en-US/onboarding.json +0 -122
  1256. package/frontend/src/i18n/locales/en-US/pages.json +0 -1409
  1257. package/frontend/src/i18n/locales/en-US/skills.json +0 -120
  1258. package/frontend/src/i18n/locales/zh-CN/agents.json +0 -85
  1259. package/frontend/src/i18n/locales/zh-CN/common.json +0 -155
  1260. package/frontend/src/i18n/locales/zh-CN/components.json +0 -1199
  1261. package/frontend/src/i18n/locales/zh-CN/errors.json +0 -56
  1262. package/frontend/src/i18n/locales/zh-CN/home.json +0 -27
  1263. package/frontend/src/i18n/locales/zh-CN/onboarding.json +0 -122
  1264. package/frontend/src/i18n/locales/zh-CN/pages.json +0 -1540
  1265. package/frontend/src/i18n/locales/zh-CN/pages.json.tmp +0 -0
  1266. package/frontend/src/i18n/locales/zh-CN/pages_new.json +0 -0
  1267. package/frontend/src/i18n/locales/zh-CN/skills.json +0 -120
  1268. package/frontend/src/i18n/types.ts +0 -19
  1269. package/frontend/src/index.css +0 -112
  1270. package/frontend/src/lib/authFetch.ts +0 -183
  1271. package/frontend/src/lib/config.ts +0 -120
  1272. package/frontend/src/lib/utils.ts +0 -6
  1273. package/frontend/src/main.tsx +0 -13
  1274. package/frontend/src/pages/AgentsPage.tsx +0 -781
  1275. package/frontend/src/pages/AnalyticsPage.tsx +0 -363
  1276. package/frontend/src/pages/ChatPage.tsx +0 -286
  1277. package/frontend/src/pages/CommandsPage.tsx +0 -445
  1278. package/frontend/src/pages/DashboardPage.tsx +0 -519
  1279. package/frontend/src/pages/HomePage.tsx +0 -223
  1280. package/frontend/src/pages/LandingPage.tsx +0 -607
  1281. package/frontend/src/pages/LoginPage.tsx +0 -510
  1282. package/frontend/src/pages/McpPage.tsx +0 -1049
  1283. package/frontend/src/pages/PluginsPage.tsx +0 -98
  1284. package/frontend/src/pages/ProjectSettings/A2AConfigTab.tsx +0 -468
  1285. package/frontend/src/pages/ProjectsPage.tsx +0 -818
  1286. package/frontend/src/pages/ScheduledTasksPage.tsx +0 -574
  1287. package/frontend/src/pages/SkillsPage.tsx +0 -6
  1288. package/frontend/src/pages/ToastTestPage.tsx +0 -33
  1289. package/frontend/src/pages/index.ts +0 -3
  1290. package/frontend/src/pages/settings/ApiSettingsPage.tsx +0 -240
  1291. package/frontend/src/pages/settings/CloudflareTunnelPage.tsx +0 -730
  1292. package/frontend/src/pages/settings/GeneralSettingsPage.tsx +0 -456
  1293. package/frontend/src/pages/settings/McpAdminSettingsPage.tsx +0 -1088
  1294. package/frontend/src/pages/settings/MemorySettingsPage.tsx +0 -153
  1295. package/frontend/src/pages/settings/SubagentsPage.tsx +0 -412
  1296. package/frontend/src/pages/settings/SystemInfoPage.tsx +0 -268
  1297. package/frontend/src/pages/settings/TelemetrySettingsPage.tsx +0 -175
  1298. package/frontend/src/pages/settings/VersionSettingsPage.tsx +0 -366
  1299. package/frontend/src/pages/settings/WebSocketTunnelPage.tsx +0 -1578
  1300. package/frontend/src/stores/authStore.ts +0 -99
  1301. package/frontend/src/stores/useAgentStore.ts +0 -426
  1302. package/frontend/src/stores/useSubAgentStore.ts +0 -207
  1303. package/frontend/src/styles/mobile.css +0 -156
  1304. package/frontend/src/test/setup.ts +0 -64
  1305. package/frontend/src/types/agents.ts +0 -109
  1306. package/frontend/src/types/backendServices.ts +0 -20
  1307. package/frontend/src/types/claude-versions.ts +0 -45
  1308. package/frontend/src/types/commands.ts +0 -63
  1309. package/frontend/src/types/index.ts +0 -171
  1310. package/frontend/src/types/plugins.ts +0 -128
  1311. package/frontend/src/types/scheduledTasks.ts +0 -140
  1312. package/frontend/src/types/skills.ts +0 -161
  1313. package/frontend/src/types/subagents.ts +0 -48
  1314. package/frontend/src/types/versionTemplates.ts +0 -270
  1315. package/frontend/src/utils/authHelpers.ts +0 -89
  1316. package/frontend/src/utils/backendServiceStorage.ts +0 -100
  1317. package/frontend/src/utils/commandFormatter.ts +0 -100
  1318. package/frontend/src/utils/commandGenerator.ts +0 -72
  1319. package/frontend/src/utils/commandHandler.ts +0 -205
  1320. package/frontend/src/utils/dateFormat.ts +0 -35
  1321. package/frontend/src/utils/eventBus.ts +0 -53
  1322. package/frontend/src/utils/index.ts +0 -34
  1323. package/frontend/src/utils/onboardingStorage.ts +0 -40
  1324. package/frontend/src/utils/smartNavigation.ts +0 -244
  1325. package/frontend/src/utils/streamReader.ts +0 -32
  1326. package/frontend/src/utils/systemCommands.ts +0 -49
  1327. package/frontend/src/utils/tabManager.ts +0 -816
  1328. package/frontend/src/utils/toast.ts +0 -49
  1329. package/frontend/src/utils/toolMapping.ts +0 -83
  1330. package/frontend/src/vite-env.d.ts +0 -3
  1331. package/frontend/tailwind.config.js +0 -119
  1332. package/frontend/tsconfig.app.json +0 -33
  1333. package/frontend/tsconfig.json +0 -7
  1334. package/frontend/tsconfig.node.json +0 -25
  1335. package/frontend/vite.config.ts +0 -73
  1336. package/frontend/vitest.config.ts +0 -39
  1337. package/frontend/vitest.shims.d.ts +0 -1
  1338. package/nginx.conf +0 -153
  1339. package/pnpm-workspace.yaml +0 -3
  1340. package/scripts/API_KEY_GENERATION_README.md +0 -181
  1341. package/scripts/README-nginx.md +0 -327
  1342. package/scripts/README.md +0 -259
  1343. package/scripts/build-complete.js +0 -98
  1344. package/scripts/build-npm.js +0 -251
  1345. package/scripts/check-system.sh +0 -153
  1346. package/scripts/cloudflare_tunnel.py +0 -292
  1347. package/scripts/deploy-feature.sh +0 -265
  1348. package/scripts/generate-api-key.ts +0 -59
  1349. package/scripts/install-linux.sh +0 -1507
  1350. package/scripts/install-macos.sh +0 -1194
  1351. package/scripts/remote-install.sh +0 -244
  1352. package/scripts/remove-feature.sh +0 -214
  1353. package/scripts/remove.sh +0 -390
  1354. package/scripts/requirements.txt +0 -1
  1355. package/scripts/restore.sh +0 -331
  1356. package/scripts/setup-nginx-ssl.sh +0 -242
  1357. package/scripts/setup_nginx.sh +0 -110
  1358. package/scripts/windows-install-simple.bat +0 -277
  1359. package/scripts/windows-install.ps1 +0 -620
  1360. package/tsconfig.json +0 -30
  1361. package/vercel.json +0 -44
  1362. /package/{frontend/public → public}/cc-studio.png +0 -0
  1363. /package/{frontend/public → public}/screenshot-chat.png +0 -0
  1364. /package/{frontend/public → public}/screenshot-mcp.png +0 -0
  1365. /package/{frontend/public → public}/vite.svg +0 -0
  1366. /package/{frontend/public → public}/wechat-qr-code.png +0 -0
@@ -0,0 +1,4 @@
1
+ import{_ as w,aw as F,ax as Y,ay as _,az as H,l as r,c as V,aA as z,aB as U,ai as $,an as q,aj as P,ah as K,aC as Q,aD as W,aE as Z}from"./ChatPage-4A05aP3x.js";import{G as B}from"./graph-CkRZhtax.js";import{l as I}from"./layout-nYP7m9RV.js";import{i as b}from"./_baseUniq-D89fR3NG.js";import{c as L}from"./clone-DTBJjony.js";import{m as A}from"./_basePickBy-BTSO2Pkt.js";import"./data-structures-C0h9Oap1.js";import"./monaco-editor-DHKm5-VF.js";import"./syntax-highlighting-CnREyncB.js";import"./agents-DG431Wop.js";import"./tools-C0JOzoE_.js";import"./ui-components-CRCmgMKc.js";import"./useAgents-Bp5Ry-Dk.js";import"./useSessions-EknKfdIv.js";import"./index-UPEozv-J.js";import"./useCommands-B0s3JzZs.js";import"./useClaudeVersions-DYM2HCGW.js";import"./FileExplorer-DFQ7ynXa.js";import"./UnifiedToolSelector-CKjY_qjS.js";import"./FileBrowser-BbQchc_7.js";import"./ProjectSelector-GmS-1-C-.js";function p(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return b(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),a=e.parent(t),s={v:t};return b(n)||(s.value=n),b(a)||(s.parent=a),s})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),a={v:t.v,w:t.w};return b(t.name)||(a.name=t.name),b(n)||(a.value=n),a})}var d=new Map,X=new Map,J=new Map,te=w(()=>{X.clear(),J.clear(),d.clear()},"clear"),D=w((e,t)=>{const n=X.get(t)||[];return r.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),ie=w((e,t)=>{const n=X.get(t)||[];return r.info("Descendants of ",t," is ",n),r.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(r.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=w((e,t,n,a)=>{r.warn("Copying children of ",e,"root",a,"data",t.node(e),a);const s=t.children(e)||[];e!==a&&s.push(e),r.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)G(o,t,n,a);else{const l=t.node(o);r.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(r.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(r.debug("Setting parent",o,e),n.setParent(o,e)):(r.info("In copy ",e,"root",a,"data",t.node(e),a),r.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));const u=t.edges(o);r.debug("Copying Edges",u),u.forEach(c=>{r.info("Edge",c);const m=t.edge(c.v,c.w,c.name);r.info("Edge data",m,a);try{ie(c,a)?(r.info("Copying as ",c.v,c.w,m,c.name),n.setEdge(c.v,c.w,m,c.name),r.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):r.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",a," clusterId:",e)}catch(h){r.error(h)}})}r.debug("Removing node",o),t.removeNode(o)})},"copy"),R=w((e,t)=>{const n=t.children(e);let a=[...n];for(const s of n)J.set(s,e),a=[...a,...R(s,t)];return a},"extractDescendants"),re=w((e,t,n)=>{const a=e.edges().filter(c=>c.v===t||c.w===t),s=e.edges().filter(c=>c.v===n||c.w===n),o=a.map(c=>({v:c.v===t?n:c.v,w:c.w===t?t:c.w})),l=s.map(c=>({v:c.v,w:c.w}));return o.filter(c=>l.some(m=>c.v===m.v&&c.w===m.w))},"findCommonEdges"),C=w((e,t,n)=>{const a=t.children(e);if(r.trace("Searching children of id ",e,a),a.length<1)return e;let s;for(const o of a){const l=C(o,t,n),u=re(t,n,l);if(l)if(u.length>0)s=l;else return l}return s},"findNonClusterChild"),k=w(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,"getAnchorId"),se=w((e,t)=>{if(!e||t>10){r.debug("Opting out, no graph ");return}else r.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(r.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),X.set(n,R(n,e)),d.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),s=e.edges();a.length>0?(r.debug("Cluster identified",n,X),s.forEach(o=>{const l=D(o.v,n),u=D(o.w,n);l^u&&(r.warn("Edge: ",o," leaves cluster ",n),r.warn("Descendants of XXX ",n,": ",X.get(n)),d.get(n).externalConnections=!0)})):r.debug("Not a cluster ",n,X)});for(let n of d.keys()){const a=d.get(n).id,s=e.parent(a);s!==n&&d.has(s)&&!d.get(s).externalConnections&&(d.get(n).id=s)}e.edges().forEach(function(n){const a=e.edge(n);r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let s=n.v,o=n.w;if(r.warn("Fix XXX",d,"ids:",n.v,n.w,"Translating: ",d.get(n.v)," --- ",d.get(n.w)),d.get(n.v)||d.get(n.w)){if(r.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),s=k(n.v),o=k(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v){const l=e.parent(s);d.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);d.get(l).externalConnections=!0,a.toCluster=n.w}r.warn("Fix Replacing with XXX",s,o,n.name),e.setEdge(s,o,a,n.name)}}),r.warn("Adjusted Graph",p(e)),T(e,0),r.trace(d)},"adjustClustersAndEdges"),T=w((e,t)=>{if(r.warn("extractor - ",t,p(e),e.children("D")),t>10){r.error("Bailing out");return}let n=e.nodes(),a=!1;for(const s of n){const o=e.children(s);a=a||o.length>0}if(!a){r.debug("Done, no node has children",e.nodes());return}r.debug("Nodes = ",n,t);for(const s of n)if(r.debug("Extracting node",s,d,d.has(s)&&!d.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!d.has(s))r.debug("Not a cluster",s,t);else if(!d.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){r.warn("Cluster without external connections, without a parent and with children",s,t);let l=e.graph().rankdir==="TB"?"LR":"TB";d.get(s)?.clusterData?.dir&&(l=d.get(s).clusterData.dir,r.warn("Fixing dir",d.get(s).clusterData.dir,l));const u=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});r.warn("Old graph before copy",p(e)),G(s,e,u,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:d.get(s).clusterData,label:d.get(s).label,graph:u}),r.warn("New graph after copy node: (",s,")",p(u)),r.debug("Old graph after copy",p(e))}else r.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!d.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),r.debug(d);n=e.nodes(),r.warn("New list of nodes",n);for(const s of n){const o=e.node(s);r.warn(" Now next level",s,o),o?.clusterNode&&T(o.graph,t+1)}},"extractor"),M=w((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{const s=e.children(a),o=M(e,s);n=[...n,...o]}),n},"sorter"),oe=w(e=>M(e,e.children()),"sortNodesByHierarchy"),j=w(async(e,t,n,a,s,o)=>{r.warn("Graph in recursive render:XAX",p(t),s);const l=t.graph().rankdir;r.trace("Dir in recursive render - dir:",l);const u=e.insert("g").attr("class","root");t.nodes()?r.info("Recursive render XXX",t.nodes()):r.info("No nodes found for",t),t.edges().length>0&&r.info("Recursive edges",t.edge(t.edges()[0]));const c=u.insert("g").attr("class","clusters"),m=u.insert("g").attr("class","edgePaths"),h=u.insert("g").attr("class","edgeLabels"),v=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){const i=t.node(f);if(s!==void 0){const g=JSON.parse(JSON.stringify(s.clusterData));r.trace(`Setting data for parent cluster XXX
2
+ Node.id = `,f,`
3
+ data=`,g.height,`
4
+ Parent cluster`,s.height),t.setNode(s.id,g),t.parent(f)||(r.trace("Setting parent",f,s.id),t.setParent(f,s.id,g))}if(r.info("(Insert) Node XXX"+f+": "+JSON.stringify(t.node(f))),i?.clusterNode){r.info("Cluster identified XBX",f,i.width,t.node(f));const{ranksep:g,nodesep:E}=t.graph();i.graph.setGraph({...i.graph.graph(),ranksep:g+25,nodesep:E});const N=await j(v,i.graph,n,a,t.node(f),o),x=N.elem;z(i,x),i.diff=N.diff||0,r.info("New compound node after recursive render XAX",f,"width",i.width,"height",i.height),U(x,i)}else t.children(f).length>0?(r.trace("Cluster - the non recursive path XBX",f,i.id,i,i.width,"Graph:",t),r.trace(C(i.id,t)),d.set(i.id,{id:C(i.id,t),node:i})):(r.trace("Node - the non recursive path XAX",f,v,t.node(f),l),await $(v,t.node(f),{config:o,dir:l}))})),await w(async()=>{const f=t.edges().map(async function(i){const g=t.edge(i.v,i.w,i.name);r.info("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),r.info("Edge "+i.v+" -> "+i.w+": ",i," ",JSON.stringify(t.edge(i))),r.info("Fix",d,"ids:",i.v,i.w,"Translating: ",d.get(i.v),d.get(i.w)),await Z(h,g)});await Promise.all(f)},"processEdges")(),r.info("Graph before layout:",JSON.stringify(p(t))),r.info("############################################# XXX"),r.info("### Layout ### XXX"),r.info("############################################# XXX"),I(t),r.info("Graph after layout:",JSON.stringify(p(t)));let O=0,{subGraphTitleTotalMargin:S}=q(o);return await Promise.all(oe(t).map(async function(f){const i=t.node(f);if(r.info("Position XBX => "+f+": ("+i.x,","+i.y,") width: ",i.width," height: ",i.height),i?.clusterNode)i.y+=S,r.info("A tainted cluster node XBX1",f,i.id,i.width,i.height,i.x,i.y,t.parent(f)),d.get(i.id).node=i,P(i);else if(t.children(f).length>0){r.info("A pure cluster node XBX1",f,i.id,i.x,i.y,i.width,i.height,t.parent(f)),i.height+=S,t.node(i.parentId);const g=i?.padding/2||0,E=i?.labelBBox?.height||0,N=E-g||0;r.debug("OffsetY",N,"labelHeight",E,"halfPadding",g),await K(c,i),d.get(i.id).node=i}else{const g=t.node(i.parentId);i.y+=S/2,r.info("A regular node XBX1 - using the padding",i.id,"parent",i.parentId,i.width,i.height,i.x,i.y,"offsetY",i.offsetY,"parent",g,g?.offsetY,i),P(i)}})),t.edges().forEach(function(f){const i=t.edge(f);r.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(i),i),i.points.forEach(x=>x.y+=S/2);const g=t.node(f.v);var E=t.node(f.w);const N=Q(m,i,d,n,g,E,a);W(i,N)}),t.nodes().forEach(function(f){const i=t.node(f);r.info(f,i.type,i.diff),i.isGroup&&(O=i.diff)}),r.warn("Returning from recursive render XAX",u,O),{elem:u,diff:O}},"recursiveRender"),Oe=w(async(e,t)=>{const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=t.select("g");F(a,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(o=>{n.setNode(o.id,{...o}),o.parentId&&n.setParent(o.id,o.parentId)}),r.debug("Edges:",e.edges),e.edges.forEach(o=>{if(o.start===o.end){const l=o.start,u=l+"---"+l+"---1",c=l+"---"+l+"---2",m=n.node(l);n.setNode(u,{domId:u,id:u,parentId:m.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(u,m.parentId),n.setNode(c,{domId:c,id:c,parentId:m.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(c,m.parentId);const h=structuredClone(o),v=structuredClone(o),y=structuredClone(o);h.label="",h.arrowTypeEnd="none",h.id=l+"-cyclic-special-1",v.arrowTypeStart="none",v.arrowTypeEnd="none",v.id=l+"-cyclic-special-mid",y.label="",m.isGroup&&(h.fromCluster=l,y.toCluster=l),y.id=l+"-cyclic-special-2",y.arrowTypeStart="none",n.setEdge(l,u,h,l+"-cyclic-special-0"),n.setEdge(u,c,v,l+"-cyclic-special-1"),n.setEdge(c,l,y,l+"-cyc<lic-special-2")}else n.setEdge(o.start,o.end,{...o},o.id)}),r.warn("Graph at first:",JSON.stringify(p(n))),se(n),r.warn("Graph after XAX:",JSON.stringify(p(n)));const s=V();await j(a,n,e.type,e.diagramId,void 0,s)},"render");export{Oe as render};
@@ -0,0 +1,27 @@
1
+ import{a as sn,r as p,W as sr,g as un}from"./monaco-editor-DHKm5-VF.js";import{_ as ln,a as cn,b as lt}from"./syntax-highlighting-CnREyncB.js";var Ce={exports:{}},Q={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var ct;function fn(){if(ct)return Q;ct=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:t,type:n,key:a,ref:i!==void 0?i:null,props:o}}return Q.Fragment=e,Q.jsx=r,Q.jsxs=r,Q}var ft;function dn(){return ft||(ft=1,Ce.exports=fn()),Ce.exports}var O=dn(),Ee={exports:{}},_e={};/**
10
+ * @license React
11
+ * use-sync-external-store-shim.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var dt;function hn(){if(dt)return _e;dt=1;var t=sn();function e(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,i=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function u(h,y){var m=y(),b=n({inst:{value:m,getSnapshot:y}}),l=b[0].inst,d=b[1];return o(function(){l.value=m,l.getSnapshot=y,s(l)&&d({inst:l})},[h,m,y]),i(function(){return s(l)&&d({inst:l}),h(function(){s(l)&&d({inst:l})})},[h]),a(m),m}function s(h){var y=h.getSnapshot;h=h.value;try{var m=y();return!r(h,m)}catch{return!0}}function c(h,y){return y()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:u;return _e.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:f,_e}var ht;function gn(){return ht||(ht=1,Ee.exports=hn()),Ee.exports}var pn=gn();const ur=p.createContext(null);function R(){const t=p.useContext(ur);if(t===null)throw new Error("No Tree Api Provided");return t}const lr=p.createContext(null);function vn(){const t=p.useContext(lr);if(t===null)throw new Error("Provide a NodesContext");return t}const cr=p.createContext(null);function yn(){const t=p.useContext(cr);if(t===null)throw new Error("Provide a DnDContext");return t}const fr=p.createContext(0);function dr(){p.useContext(fr)}function ce(t,e,r){return Math.max(Math.min(t,r),e)}function hr(t){return t&&t.isLeaf}function gr(t){return t&&t.isInternal&&!t.isOpen}function pr(t){var e;return t&&t.isOpen&&!(!((e=t.children)===null||e===void 0)&&e.length)}const vr=(t,e)=>{let r=t;for(;r;){if(r.id===e.id)return!0;r=r.parent}return!1},yr=t=>{if(!t.parent)throw Error("Node does not have a parent");return t.parent.children.findIndex(e=>e.id===t.id)};function mn(){}function Je(t,e){if(!t)return null;if(t.id===e)return t;if(t.children)for(let r of t.children){const n=Je(r,e);if(n)return n}return null}function ve(t,e){if(e(t),t.children)for(let r of t.children)ve(r,e)}function mr(t){const e=Sr(t);let r;for(let n=0;n<e.length;++n)if(e[n]===t){r=bn(e,n);break}r?.focus()}function br(t){const e=Sr(t);let r;for(let n=0;n<e.length;++n)if(e[n]===t){r=Sn(e,n);break}r?.focus()}function bn(t,e){return e+1<t.length?t[e+1]:t[0]}function Sn(t,e){return e-1>=0?t[e-1]:t[t.length-1]}function Sr(t){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(e=>e===t||!t.contains(e))}function te(t,e){return typeof e=="boolean"?e:typeof e=="string"?t[e]:e(t)}function Or(t){return t===null?null:U(t)}function U(t){return typeof t=="string"?t:t.id}function On(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}function Ir(t,...e){if(t)return t(...e)}function Dr(t){return new Promise((e,r)=>{let n=0;function i(){n+=1,n===100&&r(),t()?e():setTimeout(i,10)}i()})}function Tr(t){var e,r;const n=t.focusedNode;return n?n.isOpen?0:n.parent?n.childIndex+1:0:(r=(e=t.root.children)===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0}function wr(t){const e=t.focusedNode;return e?e.isOpen?e.id:e.parent&&!e.parent.isRoot?e.parent.id:null:null}const In=Object.freeze(Object.defineProperty({__proto__:null,access:te,bound:ce,dfs:Je,focusNextElement:mr,focusPrevElement:br,getInsertIndex:Tr,getInsertParentId:wr,identify:U,identifyNull:Or,indexOf:yr,isClosed:gr,isDescendant:vr,isItem:hr,isOpenWithEmptyChildren:pr,mergeRefs:On,noop:mn,safeRun:Ir,waitFor:Dr,walk:ve},Symbol.toStringTag,{value:"Module"})),Dn={display:"flex",alignItems:"center",zIndex:1},Tn={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},wn={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},Cn=sr.memo(function({top:e,left:r,indent:n}){const i={position:"absolute",pointerEvents:"none",top:e-2+"px",left:r+"px",right:n+"px"};return O.jsxs("div",{style:Object.assign(Object.assign({},Dn),i),children:[O.jsx("div",{style:Object.assign({},wn)}),O.jsx("div",{style:Object.assign({},Tn)})]})});function En({node:t,attrs:e,innerRef:r,children:n}){return O.jsx("div",Object.assign({},e,{ref:r,onFocus:i=>i.stopPropagation(),onClick:t.handleClick,children:n}))}function _n(t){return O.jsxs("div",{ref:t.dragHandle,style:t.style,children:[O.jsx("span",{onClick:e=>{e.stopPropagation(),t.node.toggle()},children:t.node.isLeaf?"🌳":t.node.isOpen?"🗁":"🗀"})," ",t.node.isEditing?O.jsx(Pn,Object.assign({},t)):O.jsx(xn,Object.assign({},t))]})}function xn(t){return O.jsx(O.Fragment,{children:O.jsx("span",{children:t.node.data.name})})}function Pn({node:t}){const e=p.useRef();return p.useEffect(()=>{var r,n;(r=e.current)===null||r===void 0||r.focus(),(n=e.current)===null||n===void 0||n.select()},[]),O.jsx("input",{ref:e,defaultValue:t.data.name,onBlur:()=>t.reset(),onKeyDown:r=>{var n;r.key==="Escape"&&t.reset(),r.key==="Enter"&&t.submit(((n=e.current)===null||n===void 0?void 0:n.value)||"")}})}function xe(t){return{type:"EDIT",id:t}}function Nn(t={id:null},e){return e.type==="EDIT"?Object.assign(Object.assign({},t),{id:e.id}):t}function q(t){return{type:"FOCUS",id:t}}function Rn(){return{type:"TREE_BLUR"}}function kn(t={id:null,treeFocused:!1},e){return e.type==="FOCUS"?Object.assign(Object.assign({},t),{id:e.id,treeFocused:!0}):e.type==="TREE_BLUR"?Object.assign(Object.assign({},t),{treeFocused:!1}):t}class ye{constructor(e){this.handleClick=r=>{r.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():r.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===ne}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var e;return this.isSelected&&!(!((e=this.prev)===null||e===void 0)&&e.isSelected)}get isSelectedEnd(){var e;return this.isSelected&&!(!((e=this.next)===null||e===void 0)&&e.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var e,r;const n=this.childIndex;return(r=(e=this.parent)===null||e===void 0?void 0:e.children[n+1])!==null&&r!==void 0?r:null}isAncestorOf(e){if(!e)return!1;let r=e;for(;r;){if(r.id===this.id)return!0;r=r.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new ye(Object.assign({},this))}edit(){return this.tree.edit(this)}}const ne="__REACT_ARBORIST_INTERNAL_ROOT__";function gt(t){var e;function r(o,a,u){const s=t.accessId(o),c=new ye({tree:t,data:o,level:a,parent:u,id:s,children:null,isDraggable:t.isDraggable(o),rowIndex:null}),f=t.accessChildren(o);return f&&(c.children=f.map(h=>r(h,a+1,c))),c}const n=new ye({tree:t,id:ne,data:{id:ne},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null}),i=(e=t.props.data)!==null&&e!==void 0?e:[];return n.children=i.map(o=>r(o,0,n)),n}const qe={open(t,e){return{type:"VISIBILITY_OPEN",id:t,filtered:e}},close(t,e){return{type:"VISIBILITY_CLOSE",id:t,filtered:e}},toggle(t,e){return{type:"VISIBILITY_TOGGLE",id:t,filtered:e}},clear(t){return{type:"VISIBILITY_CLEAR",filtered:t}}};function pt(t={},e){if(e.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},t),{[e.id]:!0});if(e.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},t),{[e.id]:!1});if(e.type==="VISIBILITY_TOGGLE"){const r=t[e.id];return Object.assign(Object.assign({},t),{[e.id]:!r})}else return e.type==="VISIBILITY_CLEAR"?{}:t}function An(t={filtered:{},unfiltered:{}},e){return e.type.startsWith("VISIBILITY")?e.filtered?Object.assign(Object.assign({},t),{filtered:pt(t.filtered,e)}):Object.assign(Object.assign({},t),{unfiltered:pt(t.unfiltered,e)}):t}const K=t=>{var e;return{nodes:{open:{filtered:{},unfiltered:(e=t?.initialOpenState)!==null&&e!==void 0?e:{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}},$={clear:()=>({type:"SELECTION_CLEAR"}),only:t=>({type:"SELECTION_ONLY",id:U(t)}),add:t=>({type:"SELECTION_ADD",ids:(Array.isArray(t)?t:[t]).map(U)}),remove:t=>({type:"SELECTION_REMOVE",ids:(Array.isArray(t)?t:[t]).map(U)}),set:t=>Object.assign({type:"SELECTION_SET"},t),mostRecent:t=>({type:"SELECTION_MOST_RECENT",id:t===null?null:U(t)}),anchor:t=>({type:"SELECTION_ANCHOR",id:t===null?null:U(t)})};function Mn(t=K().nodes.selection,e){const r=t.ids;switch(e.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},t),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},t),{ids:new Set([e.id])});case"SELECTION_ADD":return e.ids.length===0?t:(e.ids.forEach(n=>r.add(n)),Object.assign(Object.assign({},t),{ids:new Set(r)}));case"SELECTION_REMOVE":return e.ids.length===0?t:(e.ids.forEach(n=>r.delete(n)),Object.assign(Object.assign({},t),{ids:new Set(r)}));case"SELECTION_SET":return Object.assign(Object.assign({},t),{ids:e.ids,mostRecent:e.mostRecent,anchor:e.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},t),{mostRecent:e.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},t),{anchor:e.id});default:return t}}const X={cursor(t){return{type:"DND_CURSOR",cursor:t}},dragStart(t,e){return{type:"DND_DRAG_START",id:t,dragIds:e}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(t,e){return{type:"DND_HOVERING",parentId:t,index:e}}};function jn(t=K().dnd,e){switch(e.type){case"DND_CURSOR":return Object.assign(Object.assign({},t),{cursor:e.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},t),{dragId:e.id,dragIds:e.dragIds});case"DND_DRAG_END":return K().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},t),{parentId:e.parentId,index:e.index});default:return t}}const $n={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},Ln=t=>{if(!t)return{display:"none"};const{x:e,y:r}=t;return{transform:`translate(${e}px, ${r}px)`}},Fn=t=>{if(!t)return{display:"none"};const{x:e,y:r}=t;return{transform:`translate(${e+10}px, ${r+10}px)`}};function Cr({offset:t,mouse:e,id:r,dragIds:n,isDragging:i}){return O.jsxs(Hn,{isDragging:i,children:[O.jsx(Un,{offset:t,children:O.jsx(Bn,{id:r,dragIds:n})}),O.jsx(zn,{mouse:e,count:n.length})]})}const Hn=p.memo(function(e){return e.isDragging?O.jsx("div",{style:$n,children:e.children}):null});function Un(t){return O.jsx("div",{className:"row preview",style:Ln(t.offset),children:t.children})}function zn(t){const{count:e,mouse:r}=t;return e>1?O.jsx("div",{className:"selected-count",style:Fn(r),children:e}):null}const Bn=p.memo(function(e){const r=R(),n=r.get(e.id);return n?O.jsx(r.renderNode,{preview:!0,node:n,style:{paddingLeft:n.level*r.indent,opacity:.2,background:"transparent"},tree:r}):null});function qn(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ln(t,e)}var vt=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function Wn(t,e){return!!(t===e||vt(t)&&vt(e))}function Vn(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!Wn(t[r],e[r]))return!1;return!0}function Pe(t,e){e===void 0&&(e=Vn);var r,n=[],i,o=!1;function a(){for(var u=[],s=0;s<arguments.length;s++)u[s]=arguments[s];return o&&r===this&&e(u,n)||(i=t.apply(this,u),o=!0,r=this,n=u),i}return a}var Gn=typeof performance=="object"&&typeof performance.now=="function",yt=Gn?function(){return performance.now()}:function(){return Date.now()};function mt(t){cancelAnimationFrame(t.id)}function Yn(t,e){var r=yt();function n(){yt()-r>=e?t.call(null):i.id=requestAnimationFrame(n)}var i={id:requestAnimationFrame(n)};return i}var Ne=-1;function bt(t){if(t===void 0&&(t=!1),Ne===-1||t){var e=document.createElement("div"),r=e.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(e),Ne=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return Ne}var W=null;function St(t){if(t===void 0&&(t=!1),W===null||t){var e=document.createElement("div"),r=e.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",e.appendChild(n),document.body.appendChild(e),e.scrollLeft>0?W="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?W="negative":W="positive-ascending"),document.body.removeChild(e),W}return W}var Kn=150,Xn=function(e,r){return e};function Jn(t){var e,r=t.getItemOffset,n=t.getEstimatedTotalSize,i=t.getItemSize,o=t.getOffsetForIndexAndAlignment,a=t.getStartIndexForOffset,u=t.getStopIndexForStartIndex,s=t.initInstanceProps,c=t.shouldResetStyleCacheOnItemSizeChange,f=t.validateProps;return e=(function(h){qn(y,h);function y(b){var l;return l=h.call(this,b)||this,l._instanceProps=s(l.props,lt(l)),l._outerRef=void 0,l._resetIsScrollingTimeoutId=null,l.state={instance:lt(l),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof l.props.initialScrollOffset=="number"?l.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},l._callOnItemsRendered=void 0,l._callOnItemsRendered=Pe(function(d,g,v,S){return l.props.onItemsRendered({overscanStartIndex:d,overscanStopIndex:g,visibleStartIndex:v,visibleStopIndex:S})}),l._callOnScroll=void 0,l._callOnScroll=Pe(function(d,g,v){return l.props.onScroll({scrollDirection:d,scrollOffset:g,scrollUpdateWasRequested:v})}),l._getItemStyle=void 0,l._getItemStyle=function(d){var g=l.props,v=g.direction,S=g.itemSize,w=g.layout,D=l._getItemStyleCache(c&&S,c&&w,c&&v),C;if(D.hasOwnProperty(d))C=D[d];else{var E=r(l.props,d,l._instanceProps),N=i(l.props,d,l._instanceProps),j=v==="horizontal"||w==="horizontal",ie=v==="rtl",oe=j?E:0;D[d]=C={position:"absolute",left:ie?void 0:oe,right:ie?oe:void 0,top:j?0:E,height:j?"100%":N,width:j?N:"100%"}}return C},l._getItemStyleCache=void 0,l._getItemStyleCache=Pe(function(d,g,v){return{}}),l._onScrollHorizontal=function(d){var g=d.currentTarget,v=g.clientWidth,S=g.scrollLeft,w=g.scrollWidth;l.setState(function(D){if(D.scrollOffset===S)return null;var C=l.props.direction,E=S;if(C==="rtl")switch(St()){case"negative":E=-S;break;case"positive-descending":E=w-v-S;break}return E=Math.max(0,Math.min(E,w-v)),{isScrolling:!0,scrollDirection:D.scrollOffset<E?"forward":"backward",scrollOffset:E,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._onScrollVertical=function(d){var g=d.currentTarget,v=g.clientHeight,S=g.scrollHeight,w=g.scrollTop;l.setState(function(D){if(D.scrollOffset===w)return null;var C=Math.max(0,Math.min(w,S-v));return{isScrolling:!0,scrollDirection:D.scrollOffset<C?"forward":"backward",scrollOffset:C,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._outerRefSetter=function(d){var g=l.props.outerRef;l._outerRef=d,typeof g=="function"?g(d):g!=null&&typeof g=="object"&&g.hasOwnProperty("current")&&(g.current=d)},l._resetIsScrollingDebounced=function(){l._resetIsScrollingTimeoutId!==null&&mt(l._resetIsScrollingTimeoutId),l._resetIsScrollingTimeoutId=Yn(l._resetIsScrolling,Kn)},l._resetIsScrolling=function(){l._resetIsScrollingTimeoutId=null,l.setState({isScrolling:!1},function(){l._getItemStyleCache(-1,null)})},l}y.getDerivedStateFromProps=function(l,d){return Qn(l,d),f(l),null};var m=y.prototype;return m.scrollTo=function(l){l=Math.max(0,l),this.setState(function(d){return d.scrollOffset===l?null:{scrollDirection:d.scrollOffset<l?"forward":"backward",scrollOffset:l,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},m.scrollToItem=function(l,d){d===void 0&&(d="auto");var g=this.props,v=g.itemCount,S=g.layout,w=this.state.scrollOffset;l=Math.max(0,Math.min(l,v-1));var D=0;if(this._outerRef){var C=this._outerRef;S==="vertical"?D=C.scrollWidth>C.clientWidth?bt():0:D=C.scrollHeight>C.clientHeight?bt():0}this.scrollTo(o(this.props,l,d,w,this._instanceProps,D))},m.componentDidMount=function(){var l=this.props,d=l.direction,g=l.initialScrollOffset,v=l.layout;if(typeof g=="number"&&this._outerRef!=null){var S=this._outerRef;d==="horizontal"||v==="horizontal"?S.scrollLeft=g:S.scrollTop=g}this._callPropsCallbacks()},m.componentDidUpdate=function(){var l=this.props,d=l.direction,g=l.layout,v=this.state,S=v.scrollOffset,w=v.scrollUpdateWasRequested;if(w&&this._outerRef!=null){var D=this._outerRef;if(d==="horizontal"||g==="horizontal")if(d==="rtl")switch(St()){case"negative":D.scrollLeft=-S;break;case"positive-ascending":D.scrollLeft=S;break;default:var C=D.clientWidth,E=D.scrollWidth;D.scrollLeft=E-C-S;break}else D.scrollLeft=S;else D.scrollTop=S}this._callPropsCallbacks()},m.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&mt(this._resetIsScrollingTimeoutId)},m.render=function(){var l=this.props,d=l.children,g=l.className,v=l.direction,S=l.height,w=l.innerRef,D=l.innerElementType,C=l.innerTagName,E=l.itemCount,N=l.itemData,j=l.itemKey,ie=j===void 0?Xn:j,oe=l.layout,Qr=l.outerElementType,Zr=l.outerTagName,en=l.style,tn=l.useIsScrolling,rn=l.width,ot=this.state.isScrolling,we=v==="horizontal"||oe==="horizontal",nn=we?this._onScrollHorizontal:this._onScrollVertical,at=this._getRangeToRender(),on=at[0],an=at[1],st=[];if(E>0)for(var J=on;J<=an;J++)st.push(p.createElement(d,{data:N,key:ie(J,N),index:J,isScrolling:tn?ot:void 0,style:this._getItemStyle(J)}));var ut=n(this.props,this._instanceProps);return p.createElement(Qr||Zr||"div",{className:g,onScroll:nn,ref:this._outerRefSetter,style:cn({position:"relative",height:S,width:rn,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:v},en)},p.createElement(D||C||"div",{children:st,ref:w,style:{height:we?"100%":ut,pointerEvents:ot?"none":void 0,width:we?ut:"100%"}}))},m._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var l=this.props.itemCount;if(l>0){var d=this._getRangeToRender(),g=d[0],v=d[1],S=d[2],w=d[3];this._callOnItemsRendered(g,v,S,w)}}if(typeof this.props.onScroll=="function"){var D=this.state,C=D.scrollDirection,E=D.scrollOffset,N=D.scrollUpdateWasRequested;this._callOnScroll(C,E,N)}},m._getRangeToRender=function(){var l=this.props,d=l.itemCount,g=l.overscanCount,v=this.state,S=v.isScrolling,w=v.scrollDirection,D=v.scrollOffset;if(d===0)return[0,0,0,0];var C=a(this.props,D,this._instanceProps),E=u(this.props,C,D,this._instanceProps),N=!S||w==="backward"?Math.max(1,g):1,j=!S||w==="forward"?Math.max(1,g):1;return[Math.max(0,C-N),Math.max(0,Math.min(d-1,E+j)),C,E]},y})(p.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var Qn=function(e,r){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,r.instance},Zn=Jn({getItemOffset:function(e,r){var n=e.itemSize;return r*n},getItemSize:function(e,r){var n=e.itemSize;return n},getEstimatedTotalSize:function(e){var r=e.itemCount,n=e.itemSize;return n*r},getOffsetForIndexAndAlignment:function(e,r,n,i,o,a){var u=e.direction,s=e.height,c=e.itemCount,f=e.itemSize,h=e.layout,y=e.width,m=u==="horizontal"||h==="horizontal",b=m?y:s,l=Math.max(0,c*f-b),d=Math.min(l,r*f),g=Math.max(0,r*f-b+f+a);switch(n==="smart"&&(i>=g-b&&i<=d+b?n="auto":n="center"),n){case"start":return d;case"end":return g;case"center":{var v=Math.round(g+(d-g)/2);return v<Math.ceil(b/2)?0:v>l+Math.floor(b/2)?l:v}case"auto":default:return i>=g&&i<=d?i:i<g?g:d}},getStartIndexForOffset:function(e,r){var n=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(r/i)))},getStopIndexForStartIndex:function(e,r,n){var i=e.direction,o=e.height,a=e.itemCount,u=e.itemSize,s=e.layout,c=e.width,f=i==="horizontal"||s==="horizontal",h=r*u,y=f?c:o,m=Math.ceil((y+n-h)/u);return Math.max(0,Math.min(a-1,r+m-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function ei(){var t,e;const r=R(),i=yn().cursor;if(!i||i.type!=="line")return null;const o=r.indent,a=r.rowHeight*i.index+((e=(t=r.props.padding)!==null&&t!==void 0?t:r.props.paddingTop)!==null&&e!==void 0?e:0),u=o*i.level,s=r.renderCursor;return O.jsx(s,{top:a,left:u,indent:o})}var ti=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const ri=p.forwardRef(function(e,r){const{children:n}=e,i=ti(e,["children"]),o=R();return O.jsxs("div",Object.assign({ref:r},i,{onClick:a=>{a.currentTarget===a.target&&o.deselectAll()},children:[O.jsx(ni,{}),n]}))}),ni=()=>{const t=R();return O.jsx("div",{style:{height:t.visibleNodes.length*t.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:O.jsx(ei,{})})};var ii=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const oi=p.forwardRef(function(e,r){var n,i,o,a,{style:u}=e,s=ii(e,["style"]);const c=R(),f=(i=(n=c.props.padding)!==null&&n!==void 0?n:c.props.paddingTop)!==null&&i!==void 0?i:0,h=(a=(o=c.props.padding)!==null&&o!==void 0?o:c.props.paddingBottom)!==null&&a!==void 0?a:0;return O.jsx("div",Object.assign({ref:r,style:Object.assign(Object.assign({},u),{height:`${parseFloat(u.height)+f+h}px`})},s))});var Er=p.createContext({dragDropManager:void 0}),M;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(M||(M={}));function I(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];if(!t){var o;if(e===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;o=new Error(e.replace(/%s/g,function(){return n[a++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var Qe="dnd-core/INIT_COORDS",Se="dnd-core/BEGIN_DRAG",Ze="dnd-core/PUBLISH_DRAG_SOURCE",Oe="dnd-core/HOVER",Ie="dnd-core/DROP",De="dnd-core/END_DRAG";function Ot(t,e){return{type:Qe,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}function fe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fe=function(r){return typeof r}:fe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fe(t)}function ai(t,e,r){return e.split(".").reduce(function(n,i){return n&&n[i]?n[i]:r||null},t)}function si(t,e){return t.filter(function(r){return r!==e})}function _r(t){return fe(t)==="object"}function ui(t,e){var r=new Map,n=function(a){r.set(a,r.has(a)?r.get(a)+1:1)};t.forEach(n),e.forEach(n);var i=[];return r.forEach(function(o,a){o===1&&i.push(a)}),i}function li(t,e){return t.filter(function(r){return e.indexOf(r)>-1})}var ci={type:Qe,payload:{clientOffset:null,sourceClientOffset:null}};function fi(t){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},i=n.publishSource,o=i===void 0?!0:i,a=n.clientOffset,u=n.getSourceClientOffset,s=t.getMonitor(),c=t.getRegistry();t.dispatch(Ot(a)),di(r,s,c);var f=pi(r,s);if(f===null){t.dispatch(ci);return}var h=null;if(a){if(!u)throw new Error("getSourceClientOffset must be defined");hi(u),h=u(f)}t.dispatch(Ot(a,h));var y=c.getSource(f),m=y.beginDrag(s,f);if(m!=null){gi(m),c.pinSource(f);var b=c.getSourceType(f);return{type:Se,payload:{itemType:b,item:m,sourceId:f,clientOffset:a||null,sourceClientOffset:h||null,isSourcePublic:!!o}}}}}function di(t,e,r){I(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(n){I(r.getSource(n),"Expected sourceIds to be registered.")})}function hi(t){I(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function gi(t){I(_r(t),"Item must be an object.")}function pi(t,e){for(var r=null,n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}function vi(t){return function(){var r=t.getMonitor();if(r.isDragging())return{type:Ze}}}function We(t,e){return e===null?t===null:Array.isArray(t)?t.some(function(r){return r===e}):t===e}function yi(t){return function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.clientOffset;mi(r);var o=r.slice(0),a=t.getMonitor(),u=t.getRegistry();bi(o,a,u);var s=a.getItemType();return Si(o,u,s),Oi(o,a,u),{type:Oe,payload:{targetIds:o,clientOffset:i||null}}}}function mi(t){I(Array.isArray(t),"Expected targetIds to be an array.")}function bi(t,e,r){I(e.isDragging(),"Cannot call hover while not dragging."),I(!e.didDrop(),"Cannot call hover after drop.");for(var n=0;n<t.length;n++){var i=t[n];I(t.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");var o=r.getTarget(i);I(o,"Expected targetIds to be registered.")}}function Si(t,e,r){for(var n=t.length-1;n>=0;n--){var i=t[n],o=e.getTargetType(i);We(o,r)||t.splice(n,1)}}function Oi(t,e,r){t.forEach(function(n){var i=r.getTarget(n);i.hover(e,n)})}function It(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Dt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?It(Object(r),!0).forEach(function(n){Ii(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):It(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ii(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Di(t){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.getMonitor(),i=t.getRegistry();Ti(n);var o=Ei(n);o.forEach(function(a,u){var s=wi(a,u,i,n),c={type:Ie,payload:{dropResult:Dt(Dt({},r),s)}};t.dispatch(c)})}}function Ti(t){I(t.isDragging(),"Cannot call drop while not dragging."),I(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function wi(t,e,r,n){var i=r.getTarget(t),o=i?i.drop(n,t):void 0;return Ci(o),typeof o>"u"&&(o=e===0?{}:n.getDropResult()),o}function Ci(t){I(typeof t>"u"||_r(t),"Drop result must either be an object or undefined.")}function Ei(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function _i(t){return function(){var r=t.getMonitor(),n=t.getRegistry();xi(r);var i=r.getSourceId();if(i!=null){var o=n.getSource(i,!0);o.endDrag(r,i),n.unpinSource()}return{type:De}}}function xi(t){I(t.isDragging(),"Cannot call endDrag while not dragging.")}function Pi(t){return{beginDrag:fi(t),publishDragSource:vi(t),hover:yi(t),drop:Di(t),endDrag:_i(t)}}function Ni(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ri(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ki(t,e,r){return e&&Ri(t.prototype,e),t}function Z(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ai=(function(){function t(e,r){var n=this;Ni(this,t),Z(this,"store",void 0),Z(this,"monitor",void 0),Z(this,"backend",void 0),Z(this,"isSetUp",!1),Z(this,"handleRefCountChange",function(){var i=n.store.getState().refCount>0;n.backend&&(i&&!n.isSetUp?(n.backend.setup(),n.isSetUp=!0):!i&&n.isSetUp&&(n.backend.teardown(),n.isSetUp=!1))}),this.store=e,this.monitor=r,e.subscribe(this.handleRefCountChange)}return ki(t,[{key:"receiveBackend",value:function(r){this.backend=r}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var r=this,n=this.store.dispatch;function i(a){return function(){for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];var f=a.apply(r,s);typeof f<"u"&&n(f)}}var o=Pi(this);return Object.keys(o).reduce(function(a,u){var s=o[u];return a[u]=i(s),a},{})}},{key:"dispatch",value:function(r){this.store.dispatch(r)}}]),t})();function k(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Tt=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),wt=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ct={INIT:"@@redux/INIT"+wt(),REPLACE:"@@redux/REPLACE"+wt()};function Mi(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function xr(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(k(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(k(1));return r(xr)(t,e)}if(typeof t!="function")throw new Error(k(2));var i=t,o=e,a=[],u=a,s=!1;function c(){u===a&&(u=a.slice())}function f(){if(s)throw new Error(k(3));return o}function h(l){if(typeof l!="function")throw new Error(k(4));if(s)throw new Error(k(5));var d=!0;return c(),u.push(l),function(){if(d){if(s)throw new Error(k(6));d=!1,c();var v=u.indexOf(l);u.splice(v,1),a=null}}}function y(l){if(!Mi(l))throw new Error(k(7));if(typeof l.type>"u")throw new Error(k(8));if(s)throw new Error(k(9));try{s=!0,o=i(o,l)}finally{s=!1}for(var d=a=u,g=0;g<d.length;g++){var v=d[g];v()}return l}function m(l){if(typeof l!="function")throw new Error(k(10));i=l,y({type:Ct.REPLACE})}function b(){var l,d=h;return l={subscribe:function(v){if(typeof v!="object"||v===null)throw new Error(k(11));function S(){v.next&&v.next(f())}S();var w=d(S);return{unsubscribe:w}}},l[Tt]=function(){return this},l}return y({type:Ct.INIT}),n={dispatch:y,subscribe:h,getState:f,replaceReducer:m},n[Tt]=b,n}var ji=function(e,r){return e===r};function $i(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function Li(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ji;if(t.length!==e.length)return!1;for(var n=0;n<t.length;++n)if(!r(t[n],e[n]))return!1;return!0}function Et(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function _t(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Et(Object(r),!0).forEach(function(n){Fi(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Et(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Fi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Hi(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xt,e=arguments.length>1?arguments[1]:void 0,r=e.payload;switch(e.type){case Qe:case Se:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Oe:return $i(t.clientOffset,r.clientOffset)?t:_t(_t({},t),{},{clientOffset:r.clientOffset});case De:case Ie:return xt;default:return t}}var et="dnd-core/ADD_SOURCE",tt="dnd-core/ADD_TARGET",rt="dnd-core/REMOVE_SOURCE",Te="dnd-core/REMOVE_TARGET";function Ui(t){return{type:et,payload:{sourceId:t}}}function zi(t){return{type:tt,payload:{targetId:t}}}function Bi(t){return{type:rt,payload:{sourceId:t}}}function qi(t){return{type:Te,payload:{targetId:t}}}function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function A(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pt(Object(r),!0).forEach(function(n){Wi(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Vi={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Gi(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vi,e=arguments.length>1?arguments[1]:void 0,r=e.payload;switch(e.type){case Se:return A(A({},t),{},{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case Ze:return A(A({},t),{},{isSourcePublic:!0});case Oe:return A(A({},t),{},{targetIds:r.targetIds});case Te:return t.targetIds.indexOf(r.targetId)===-1?t:A(A({},t),{},{targetIds:si(t.targetIds,r.targetId)});case Ie:return A(A({},t),{},{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case De:return A(A({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Yi(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case et:case tt:return t+1;case rt:case Te:return t-1;default:return t}}var me=[],nt=[];me.__IS_NONE__=!0;nt.__IS_ALL__=!0;function Ki(t,e){if(t===me)return!1;if(t===nt||typeof e>"u")return!0;var r=li(e,t);return r.length>0}function Xi(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Oe:break;case et:case tt:case Te:case rt:return me;case Se:case Ze:case De:case Ie:default:return nt}var e=t.payload,r=e.targetIds,n=r===void 0?[]:r,i=e.prevTargetIds,o=i===void 0?[]:i,a=ui(n,o),u=a.length>0||!Li(n,o);if(!u)return me;var s=o[o.length-1],c=n[n.length-1];return s!==c&&(s&&a.push(s),c&&a.push(c)),a}function Ji(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t+1}function Nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Rt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nt(Object(r),!0).forEach(function(n){Qi(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Qi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zi(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:Xi(t.dirtyHandlerIds,{type:e.type,payload:Rt(Rt({},e.payload),{},{prevTargetIds:ai(t,"dragOperation.targetIds",[])})}),dragOffset:Hi(t.dragOffset,e),refCount:Yi(t.refCount,e),dragOperation:Gi(t.dragOperation,e),stateId:Ji(t.stateId)}}function eo(t,e){return{x:t.x+e.x,y:t.y+e.y}}function Pr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function to(t){var e=t.clientOffset,r=t.initialClientOffset,n=t.initialSourceClientOffset;return!e||!r||!n?null:Pr(eo(e,n),r)}function ro(t){var e=t.clientOffset,r=t.initialClientOffset;return!e||!r?null:Pr(e,r)}function no(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function io(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function oo(t,e,r){return e&&io(t.prototype,e),t}function kt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ao=(function(){function t(e,r){no(this,t),kt(this,"store",void 0),kt(this,"registry",void 0),this.store=e,this.registry=r}return oo(t,[{key:"subscribeToStateChange",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},o=i.handlerIds;I(typeof r=="function","listener must be a function."),I(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var a=this.store.getState().stateId,u=function(){var c=n.store.getState(),f=c.stateId;try{var h=f===a||f===a+1&&!Ki(c.dirtyHandlerIds,o);h||r()}finally{a=f}};return this.store.subscribe(u)}},{key:"subscribeToOffsetChange",value:function(r){var n=this;I(typeof r=="function","listener must be a function.");var i=this.store.getState().dragOffset,o=function(){var u=n.store.getState().dragOffset;u!==i&&(i=u,r())};return this.store.subscribe(o)}},{key:"canDragSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r);return I(n,"Expected to find a valid source. sourceId=".concat(r)),this.isDragging()?!1:n.canDrag(this,r)}},{key:"canDropOnTarget",value:function(r){if(!r)return!1;var n=this.registry.getTarget(r);if(I(n,"Expected to find a valid target. targetId=".concat(r)),!this.isDragging()||this.didDrop())return!1;var i=this.registry.getTargetType(r),o=this.getItemType();return We(i,o)&&n.canDrop(this,r)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r,!0);if(I(n,"Expected to find a valid source. sourceId=".concat(r)),!this.isDragging()||!this.isSourcePublic())return!1;var i=this.registry.getSourceType(r),o=this.getItemType();return i!==o?!1:n.isDragging(this,r)}},{key:"isOverTarget",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!r)return!1;var i=n.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(r),a=this.getItemType();if(a&&!We(o,a))return!1;var u=this.getTargetIds();if(!u.length)return!1;var s=u.indexOf(r);return i?s===u.length-1:s>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return to(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return ro(this.store.getState().dragOffset)}}]),t})(),so=0;function uo(){return so++}function de(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?de=function(r){return typeof r}:de=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},de(t)}function lo(t){I(typeof t.canDrag=="function","Expected canDrag to be a function."),I(typeof t.beginDrag=="function","Expected beginDrag to be a function."),I(typeof t.endDrag=="function","Expected endDrag to be a function.")}function co(t){I(typeof t.canDrop=="function","Expected canDrop to be a function."),I(typeof t.hover=="function","Expected hover to be a function."),I(typeof t.drop=="function","Expected beginDrag to be a function.")}function Ve(t,e){if(e&&Array.isArray(t)){t.forEach(function(r){return Ve(r,!1)});return}I(typeof t=="string"||de(t)==="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const At=typeof global<"u"?global:self,Nr=At.MutationObserver||At.WebKitMutationObserver;function Rr(t){return function(){const r=setTimeout(i,0),n=setInterval(i,50);function i(){clearTimeout(r),clearInterval(n),t()}}}function fo(t){let e=1;const r=new Nr(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}const ho=typeof Nr=="function"?fo:Rr;class go{enqueueTask(e){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const r=this.index;if(this.index++,e[r].call(),this.index>this.capacity){for(let n=0,i=e.length-this.index;n<i;n++)e[n]=e[n+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=ho(this.flush),this.requestErrorThrow=Rr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class po{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,r){this.onError=e,this.release=r,this.task=null}}class vo{create(e){const r=this.freeTasks,n=r.length?r.pop():new po(this.onError,i=>r[r.length]=i);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}const kr=new go,yo=new vo(kr.registerPendingError);function mo(t){kr.enqueueTask(yo.create(t))}function bo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function So(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Oo(t,e,r){return e&&So(t.prototype,e),t}function V(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Io(t,e){return Co(t)||wo(t,e)||To(t,e)||Do()}function Do(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function To(t,e){if(t){if(typeof t=="string")return Mt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mt(t,e)}}function Mt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function wo(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,u;try{for(r=r.call(t);!(i=(a=r.next()).done)&&(n.push(a.value),!(e&&n.length===e));i=!0);}catch(s){o=!0,u=s}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function Co(t){if(Array.isArray(t))return t}function Eo(t){var e=uo().toString();switch(t){case M.SOURCE:return"S".concat(e);case M.TARGET:return"T".concat(e);default:throw new Error("Unknown Handler Role: ".concat(t))}}function jt(t){switch(t[0]){case"S":return M.SOURCE;case"T":return M.TARGET;default:I(!1,"Cannot parse handler ID: ".concat(t))}}function $t(t,e){var r=t.entries(),n=!1;do{var i=r.next(),o=i.done,a=Io(i.value,2),u=a[1];if(u===e)return!0;n=!!o}while(!n);return!1}var _o=(function(){function t(e){bo(this,t),V(this,"types",new Map),V(this,"dragSources",new Map),V(this,"dropTargets",new Map),V(this,"pinnedSourceId",null),V(this,"pinnedSource",null),V(this,"store",void 0),this.store=e}return Oo(t,[{key:"addSource",value:function(r,n){Ve(r),lo(n);var i=this.addHandler(M.SOURCE,r,n);return this.store.dispatch(Ui(i)),i}},{key:"addTarget",value:function(r,n){Ve(r,!0),co(n);var i=this.addHandler(M.TARGET,r,n);return this.store.dispatch(zi(i)),i}},{key:"containsHandler",value:function(r){return $t(this.dragSources,r)||$t(this.dropTargets,r)}},{key:"getSource",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;I(this.isSourceId(r),"Expected a valid source ID.");var i=n&&r===this.pinnedSourceId,o=i?this.pinnedSource:this.dragSources.get(r);return o}},{key:"getTarget",value:function(r){return I(this.isTargetId(r),"Expected a valid target ID."),this.dropTargets.get(r)}},{key:"getSourceType",value:function(r){return I(this.isSourceId(r),"Expected a valid source ID."),this.types.get(r)}},{key:"getTargetType",value:function(r){return I(this.isTargetId(r),"Expected a valid target ID."),this.types.get(r)}},{key:"isSourceId",value:function(r){var n=jt(r);return n===M.SOURCE}},{key:"isTargetId",value:function(r){var n=jt(r);return n===M.TARGET}},{key:"removeSource",value:function(r){var n=this;I(this.getSource(r),"Expected an existing source."),this.store.dispatch(Bi(r)),mo(function(){n.dragSources.delete(r),n.types.delete(r)})}},{key:"removeTarget",value:function(r){I(this.getTarget(r),"Expected an existing target."),this.store.dispatch(qi(r)),this.dropTargets.delete(r),this.types.delete(r)}},{key:"pinSource",value:function(r){var n=this.getSource(r);I(n,"Expected an existing source."),this.pinnedSourceId=r,this.pinnedSource=n}},{key:"unpinSource",value:function(){I(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(r,n,i){var o=Eo(r);return this.types.set(o,n),r===M.SOURCE?this.dragSources.set(o,i):r===M.TARGET&&this.dropTargets.set(o,i),o}}]),t})();function xo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=Po(n),o=new ao(i,new _o(i)),a=new Ai(i,o),u=t(a,e,r);return a.receiveBackend(u),a}function Po(t){var e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return xr(Zi,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}var No=["children"];function Ro(t,e){return jo(t)||Mo(t,e)||Ao(t,e)||ko()}function ko(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ao(t,e){if(t){if(typeof t=="string")return Lt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lt(t,e)}}function Lt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Mo(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,u;try{for(r=r.call(t);!(i=(a=r.next()).done)&&(n.push(a.value),!(e&&n.length===e));i=!0);}catch(s){o=!0,u=s}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function jo(t){if(Array.isArray(t))return t}function $o(t,e){if(t==null)return{};var r=Lo(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Lo(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var Ft=0,he=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),Fo=p.memo(function(e){var r=e.children,n=$o(e,No),i=Ho(n),o=Ro(i,2),a=o[0],u=o[1];return p.useEffect(function(){if(u){var s=Ar();return++Ft,function(){--Ft===0&&(s[he]=null)}}},[]),O.jsx(Er.Provider,Object.assign({value:a},{children:r}),void 0)});function Ho(t){if("manager"in t){var e={dragDropManager:t.manager};return[e,!1]}var r=Uo(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[r,n]}function Uo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=e;return i[he]||(i[he]={dragDropManager:xo(t,e,r,n)}),i[he]}function Ar(){return typeof global<"u"?global:window}function zo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function qo(t,e,r){return e&&Bo(t.prototype,e),t}function Ht(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Re=!1,ke=!1,Wo=(function(){function t(e){zo(this,t),Ht(this,"internalMonitor",void 0),Ht(this,"sourceId",null),this.internalMonitor=e.getMonitor()}return qo(t,[{key:"receiveHandlerId",value:function(r){this.sourceId=r}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){I(!Re,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Re=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Re=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;I(!ke,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ke=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{ke=!1}}},{key:"subscribeToStateChange",value:function(r,n){return this.internalMonitor.subscribeToStateChange(r,n)}},{key:"isDraggingSource",value:function(r){return this.internalMonitor.isDraggingSource(r)}},{key:"isOverTarget",value:function(r,n){return this.internalMonitor.isOverTarget(r,n)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(r){return this.internalMonitor.subscribeToOffsetChange(r)}},{key:"canDragSource",value:function(r){return this.internalMonitor.canDragSource(r)}},{key:"canDropOnTarget",value:function(r){return this.internalMonitor.canDropOnTarget(r)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t})();function Vo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Go(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Yo(t,e,r){return e&&Go(t.prototype,e),t}function Ut(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ae=!1,Ko=(function(){function t(e){Vo(this,t),Ut(this,"internalMonitor",void 0),Ut(this,"targetId",null),this.internalMonitor=e.getMonitor()}return Yo(t,[{key:"receiveHandlerId",value:function(r){this.targetId=r}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(r,n){return this.internalMonitor.subscribeToStateChange(r,n)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;I(!Ae,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Ae=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ae=!1}}},{key:"isOver",value:function(r){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,r):!1}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t})();function Xo(t){if(typeof t.type!="string"){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function Jo(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!p.isValidElement(e)){var n=e;return t(n,r),n}var i=e;Xo(i);var o=r?function(a){return t(a,r)}:t;return Qo(i,o)}}function Mr(t){var e={};return Object.keys(t).forEach(function(r){var n=t[r];if(r.endsWith("Ref"))e[r]=t[r];else{var i=Jo(n);e[r]=function(){return i}}}),e}function zt(t,e){typeof t=="function"?t(e):t.current=e}function Qo(t,e){var r=t.ref;return I(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?p.cloneElement(t,{ref:function(i){zt(r,i),zt(e,i)}}):p.cloneElement(t,{ref:e})}function ge(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ge=function(r){return typeof r}:ge=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ge(t)}function Ge(t){return t!==null&&ge(t)==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ye(t,e,r,n){var i=void 0;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(e),s=0;s<o.length;s++){var c=o[s];if(!u(c))return!1;var f=t[c],h=e[c];if(i=void 0,i===!1||i===void 0&&f!==h)return!1}return!0}function Zo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ea(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ta(t,e,r){return e&&ea(t.prototype,e),t}function x(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ra=(function(){function t(e){var r=this;Zo(this,t),x(this,"hooks",Mr({dragSource:function(i,o){r.clearDragSource(),r.dragSourceOptions=o||null,Ge(i)?r.dragSourceRef=i:r.dragSourceNode=i,r.reconnectDragSource()},dragPreview:function(i,o){r.clearDragPreview(),r.dragPreviewOptions=o||null,Ge(i)?r.dragPreviewRef=i:r.dragPreviewNode=i,r.reconnectDragPreview()}})),x(this,"handlerId",null),x(this,"dragSourceRef",null),x(this,"dragSourceNode",void 0),x(this,"dragSourceOptionsInternal",null),x(this,"dragSourceUnsubscribe",void 0),x(this,"dragPreviewRef",null),x(this,"dragPreviewNode",void 0),x(this,"dragPreviewOptionsInternal",null),x(this,"dragPreviewUnsubscribe",void 0),x(this,"lastConnectedHandlerId",null),x(this,"lastConnectedDragSource",null),x(this,"lastConnectedDragSourceOptions",null),x(this,"lastConnectedDragPreview",null),x(this,"lastConnectedDragPreviewOptions",null),x(this,"backend",void 0),this.backend=e}return ta(t,[{key:"receiveHandlerId",value:function(r){this.handlerId!==r&&(this.handlerId=r,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(r){this.dragSourceOptionsInternal=r}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(r){this.dragPreviewOptionsInternal=r}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var r=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(n&&this.disconnectDragSource(),!!this.handlerId){if(!r){this.lastConnectedDragSource=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=r,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,r,this.dragSourceOptions))}}},{key:"reconnectDragPreview",value:function(){var r=this.dragPreview,n=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!r){this.lastConnectedDragPreview=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=r,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,r,this.dragPreviewOptions))}}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!Ye(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!Ye(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),t})();function na(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ia(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function oa(t,e,r){return e&&ia(t.prototype,e),t}function F(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var aa=(function(){function t(e){var r=this;na(this,t),F(this,"hooks",Mr({dropTarget:function(i,o){r.clearDropTarget(),r.dropTargetOptions=o,Ge(i)?r.dropTargetRef=i:r.dropTargetNode=i,r.reconnect()}})),F(this,"handlerId",null),F(this,"dropTargetRef",null),F(this,"dropTargetNode",void 0),F(this,"dropTargetOptionsInternal",null),F(this,"unsubscribeDropTarget",void 0),F(this,"lastConnectedHandlerId",null),F(this,"lastConnectedDropTarget",null),F(this,"lastConnectedDropTargetOptions",null),F(this,"backend",void 0),this.backend=e}return oa(t,[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var r=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();r&&this.disconnectDropTarget();var n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}},{key:"receiveHandlerId",value:function(r){r!==this.handlerId&&(this.handlerId=r,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(r){this.dropTargetOptionsInternal=r}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!Ye(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),t})();function sa(t,e,r){var n=r.getRegistry(),i=n.addTarget(t,e);return[i,function(){return n.removeTarget(i)}]}function ua(t,e,r){var n=r.getRegistry(),i=n.addSource(t,e);return[i,function(){return n.removeSource(i)}]}var z=typeof window<"u"?p.useLayoutEffect:p.useEffect;function pe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pe=function(r){return typeof r}:pe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},pe(t)}function la(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ca(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function fa(t,e,r){return e&&ca(t.prototype,e),t}function Me(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var da=(function(){function t(e,r,n){la(this,t),Me(this,"spec",void 0),Me(this,"monitor",void 0),Me(this,"connector",void 0),this.spec=e,this.monitor=r,this.connector=n}return fa(t,[{key:"beginDrag",value:function(){var r,n=this.spec,i=this.monitor,o=null;return pe(n.item)==="object"?o=n.item:typeof n.item=="function"?o=n.item(i):o={},(r=o)!==null&&r!==void 0?r:null}},{key:"canDrag",value:function(){var r=this.spec,n=this.monitor;return typeof r.canDrag=="boolean"?r.canDrag:typeof r.canDrag=="function"?r.canDrag(n):!0}},{key:"isDragging",value:function(r,n){var i=this.spec,o=this.monitor,a=i.isDragging;return a?a(o):n===r.getSourceId()}},{key:"endDrag",value:function(){var r=this.spec,n=this.monitor,i=this.connector,o=r.end;o&&o(n.getItem(),n),i.reconnect()}}]),t})();function ha(t,e,r){var n=p.useMemo(function(){return new da(t,e,r)},[e,r]);return p.useEffect(function(){n.spec=t},[t]),n}function B(){var t=p.useContext(Er),e=t.dragDropManager;return I(e!=null,"Expected drag drop context"),e}function ga(t){return p.useMemo(function(){var e=t.type;return I(e!=null,"spec.type must be defined"),e},[t])}function pa(t,e){return ba(t)||ma(t,e)||ya(t,e)||va()}function va(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ya(t,e){if(t){if(typeof t=="string")return Bt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bt(t,e)}}function Bt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ma(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,u;try{for(r=r.call(t);!(i=(a=r.next()).done)&&(n.push(a.value),!(e&&n.length===e));i=!0);}catch(s){o=!0,u=s}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function ba(t){if(Array.isArray(t))return t}function Sa(t,e,r){var n=B(),i=ha(t,e,r),o=ga(t);z(function(){if(o!=null){var u=ua(o,i,n),s=pa(u,2),c=s[0],f=s[1];return e.receiveHandlerId(c),r.receiveHandlerId(c),f}},[n,e,r,i,o])}function Oa(t){return wa(t)||Ta(t)||Da(t)||Ia()}function Ia(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Da(t,e){if(t){if(typeof t=="string")return Ke(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ke(t,e)}}function Ta(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function wa(t){if(Array.isArray(t))return Ke(t)}function Ke(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jr(t,e){var r=Oa(e||[]);return e==null&&typeof t!="function"&&r.push(t),p.useMemo(function(){return typeof t=="function"?t():t},r)}function Ca(){var t=B();return p.useMemo(function(){return new Wo(t)},[t])}function Ea(t,e){var r=B(),n=p.useMemo(function(){return new ra(r.getBackend())},[r]);return z(function(){return n.dragSourceOptions=t||null,n.reconnect(),function(){return n.disconnectDragSource()}},[n,t]),z(function(){return n.dragPreviewOptions=e||null,n.reconnect(),function(){return n.disconnectDragPreview()}},[n,e]),n}var je,qt;function _a(){return qt||(qt=1,je=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}),je}var xa=_a();const Pa=un(xa);function Na(t,e){return Ma(t)||Aa(t,e)||ka(t,e)||Ra()}function Ra(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ka(t,e){if(t){if(typeof t=="string")return Wt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wt(t,e)}}function Wt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Aa(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,u;try{for(r=r.call(t);!(i=(a=r.next()).done)&&(n.push(a.value),!(e&&n.length===e));i=!0);}catch(s){o=!0,u=s}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function Ma(t){if(Array.isArray(t))return t}function $r(t,e,r){var n=p.useState(function(){return e(t)}),i=Na(n,2),o=i[0],a=i[1],u=p.useCallback(function(){var s=e(t);Pa(o,s)||(a(s),r&&r())},[o,t,r]);return z(u),[o,u]}function ja(t,e){return Ha(t)||Fa(t,e)||La(t,e)||$a()}function $a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
23
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function La(t,e){if(t){if(typeof t=="string")return Vt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vt(t,e)}}function Vt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Fa(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,u;try{for(r=r.call(t);!(i=(a=r.next()).done)&&(n.push(a.value),!(e&&n.length===e));i=!0);}catch(s){o=!0,u=s}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function Ha(t){if(Array.isArray(t))return t}function Ua(t,e,r){var n=$r(t,e,r),i=ja(n,2),o=i[0],a=i[1];return z(function(){var s=t.getHandlerId();if(s!=null)return t.subscribeToStateChange(a,{handlerIds:[s]})},[t,a]),o}function Lr(t,e,r){return Ua(e,t||function(){return{}},function(){return r.reconnect()})}function za(t){return p.useMemo(function(){return t.hooks.dragSource()},[t])}function Ba(t){return p.useMemo(function(){return t.hooks.dragPreview()},[t])}function qa(t,e){var r=jr(t,e);I(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");var n=Ca(),i=Ea(r.options,r.previewOptions);return Sa(r,n,i),[Lr(r.collect,n,i),za(i),Ba(i)]}function Wa(t){var e=t.accept;return p.useMemo(function(){return I(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]},[e])}function Va(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ga(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ya(t,e,r){return e&&Ga(t.prototype,e),t}function Gt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ka=(function(){function t(e,r){Va(this,t),Gt(this,"spec",void 0),Gt(this,"monitor",void 0),this.spec=e,this.monitor=r}return Ya(t,[{key:"canDrop",value:function(){var r=this.spec,n=this.monitor;return r.canDrop?r.canDrop(n.getItem(),n):!0}},{key:"hover",value:function(){var r=this.spec,n=this.monitor;r.hover&&r.hover(n.getItem(),n)}},{key:"drop",value:function(){var r=this.spec,n=this.monitor;if(r.drop)return r.drop(n.getItem(),n)}}]),t})();function Xa(t,e){var r=p.useMemo(function(){return new Ka(t,e)},[e]);return p.useEffect(function(){r.spec=t},[t]),r}function Ja(t,e){return ts(t)||es(t,e)||Za(t,e)||Qa()}function Qa(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
24
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Za(t,e){if(t){if(typeof t=="string")return Yt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yt(t,e)}}function Yt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function es(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,u;try{for(r=r.call(t);!(i=(a=r.next()).done)&&(n.push(a.value),!(e&&n.length===e));i=!0);}catch(s){o=!0,u=s}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function ts(t){if(Array.isArray(t))return t}function rs(t,e,r){var n=B(),i=Xa(t,e),o=Wa(t);z(function(){var u=sa(o,i,n),s=Ja(u,2),c=s[0],f=s[1];return e.receiveHandlerId(c),r.receiveHandlerId(c),f},[n,e,i,r,o.map(function(a){return a.toString()}).join("|")])}function ns(){var t=B();return p.useMemo(function(){return new Ko(t)},[t])}function is(t){var e=B(),r=p.useMemo(function(){return new aa(e.getBackend())},[e]);return z(function(){return r.dropTargetOptions=t||null,r.reconnect(),function(){return r.disconnectDropTarget()}},[t]),r}function os(t){return p.useMemo(function(){return t.hooks.dropTarget()},[t])}function Fr(t,e){var r=jr(t,e),n=ns(),i=is(r.options);return rs(r,n,i),[Lr(r.collect,n,i),os(i)]}function as(t,e){return cs(t)||ls(t,e)||us(t,e)||ss()}function ss(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
25
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function us(t,e){if(t){if(typeof t=="string")return Kt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kt(t,e)}}function Kt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ls(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,u;try{for(r=r.call(t);!(i=(a=r.next()).done)&&(n.push(a.value),!(e&&n.length===e));i=!0);}catch(s){o=!0,u=s}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function cs(t){if(Array.isArray(t))return t}function fs(t){var e=B(),r=e.getMonitor(),n=$r(r,t),i=as(n,2),o=i[0],a=i[1];return p.useEffect(function(){return r.subscribeToOffsetChange(a)}),p.useEffect(function(){return r.subscribeToStateChange(a)}),o}function Hr(t){var e=null,r=function(){return e==null&&(e=t()),e};return r}function ds(t,e){return t.filter(function(r){return r!==e})}function hs(t,e){var r=new Set,n=function(a){return r.add(a)};t.forEach(n),e.forEach(n);var i=[];return r.forEach(function(o){return i.push(o)}),i}function gs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ps(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vs(t,e,r){return e&&ps(t.prototype,e),t}function Xt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ys=(function(){function t(e){gs(this,t),Xt(this,"entered",[]),Xt(this,"isNodeInDocument",void 0),this.isNodeInDocument=e}return vs(t,[{key:"enter",value:function(r){var n=this,i=this.entered.length,o=function(u){return n.isNodeInDocument(u)&&(!u.contains||u.contains(r))};return this.entered=hs(this.entered.filter(o),[r]),i===0&&this.entered.length>0}},{key:"leave",value:function(r){var n=this.entered.length;return this.entered=ds(this.entered.filter(this.isNodeInDocument),r),n>0&&this.entered.length===0}},{key:"reset",value:function(){this.entered=[]}}]),t})(),ms=Hr(function(){return/firefox/i.test(navigator.userAgent)}),Ur=Hr(function(){return!!window.safari});function bs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ss(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Os(t,e,r){return e&&Ss(t.prototype,e),t}function ee(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Jt=(function(){function t(e,r){bs(this,t),ee(this,"xs",void 0),ee(this,"ys",void 0),ee(this,"c1s",void 0),ee(this,"c2s",void 0),ee(this,"c3s",void 0);for(var n=e.length,i=[],o=0;o<n;o++)i.push(o);i.sort(function(N,j){return e[N]<e[j]?-1:1});for(var a=[],u=[],s,c,f=0;f<n-1;f++)s=e[f+1]-e[f],c=r[f+1]-r[f],a.push(s),u.push(c/s);for(var h=[u[0]],y=0;y<a.length-1;y++){var m=u[y],b=u[y+1];if(m*b<=0)h.push(0);else{s=a[y];var l=a[y+1],d=s+l;h.push(3*d/((d+l)/m+(d+s)/b))}}h.push(u[u.length-1]);for(var g=[],v=[],S,w=0;w<h.length-1;w++){S=u[w];var D=h[w],C=1/a[w],E=D+h[w+1]-S-S;g.push((S-D-E)*C),v.push(E*C*C)}this.xs=e,this.ys=r,this.c1s=h,this.c2s=g,this.c3s=v}return Os(t,[{key:"interpolate",value:function(r){var n=this.xs,i=this.ys,o=this.c1s,a=this.c2s,u=this.c3s,s=n.length-1;if(r===n[s])return i[s];for(var c=0,f=u.length-1,h;c<=f;){h=Math.floor(.5*(c+f));var y=n[h];if(y<r)c=h+1;else if(y>r)f=h-1;else return i[h]}s=Math.max(0,f);var m=r-n[s],b=m*m;return i[s]+o[s]*m+a[s]*b+u[s]*m*b}}]),t})(),Is=1;function zr(t){var e=t.nodeType===Is?t:t.parentElement;if(!e)return null;var r=e.getBoundingClientRect(),n=r.top,i=r.left;return{x:i,y:n}}function ae(t){return{x:t.clientX,y:t.clientY}}function Ds(t){var e;return t.nodeName==="IMG"&&(ms()||!((e=document.documentElement)!==null&&e!==void 0&&e.contains(t)))}function Ts(t,e,r,n){var i=t?e.width:r,o=t?e.height:n;return Ur()&&t&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function ws(t,e,r,n,i){var o=Ds(e),a=o?t:e,u=zr(a),s={x:r.x-u.x,y:r.y-u.y},c=t.offsetWidth,f=t.offsetHeight,h=n.anchorX,y=n.anchorY,m=Ts(o,e,c,f),b=m.dragPreviewWidth,l=m.dragPreviewHeight,d=function(){var E=new Jt([0,.5,1],[s.y,s.y/f*l,s.y+l-f]),N=E.interpolate(y);return Ur()&&o&&(N+=(window.devicePixelRatio-1)*l),N},g=function(){var E=new Jt([0,.5,1],[s.x,s.x/c*b,s.x+b-c]);return E.interpolate(h)},v=i.offsetX,S=i.offsetY,w=v===0||v,D=S===0||S;return{x:w?v:g(),y:D?S:d()}}var Br="__NATIVE_FILE__",qr="__NATIVE_URL__",Wr="__NATIVE_TEXT__",Vr="__NATIVE_HTML__";const Qt=Object.freeze(Object.defineProperty({__proto__:null,FILE:Br,HTML:Vr,TEXT:Wr,URL:qr},Symbol.toStringTag,{value:"Module"}));function $e(t,e,r){var n=e.reduce(function(i,o){return i||t.getData(o)},"");return n??r}var G;function se(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Xe=(G={},se(G,Br,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),se(G,Vr,{exposeProperties:{html:function(e,r){return $e(e,r,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),se(G,qr,{exposeProperties:{urls:function(e,r){return $e(e,r,"").split(`
26
+ `)},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),se(G,Wr,{exposeProperties:{text:function(e,r){return $e(e,r,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),G);function Cs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Es(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _s(t,e,r){return e&&Es(t.prototype,e),t}function Zt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xs=(function(){function t(e){Cs(this,t),Zt(this,"item",void 0),Zt(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}return _s(t,[{key:"initializeExposedProperties",value:function(){var r=this;Object.keys(this.config.exposeProperties).forEach(function(n){Object.defineProperty(r.item,n,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "`.concat(n,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(r){var n=this;if(r){var i={};Object.keys(this.config.exposeProperties).forEach(function(o){i[o]={value:n.config.exposeProperties[o](r,n.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,i)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(r,n){return n===r.getSourceId()}},{key:"endDrag",value:function(){}}]),t})();function Ps(t,e){var r=new xs(Xe[t]);return r.loadDataTransfer(e),r}function Le(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(Xe).filter(function(r){var n=Xe[r].matchesTypes;return n.some(function(i){return e.indexOf(i)>-1})})[0]||null}function Ns(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ks(t,e,r){return e&&Rs(t.prototype,e),t}function Fe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var As=(function(){function t(e,r){Ns(this,t),Fe(this,"ownerDocument",null),Fe(this,"globalContext",void 0),Fe(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=r}return ks(t,[{key:"window",get:function(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}},{key:"document",get:function(){var r;return(r=this.globalContext)!==null&&r!==void 0&&r.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var r;return((r=this.optionsArgs)===null||r===void 0?void 0:r.rootElement)||this.window}}]),t})();function er(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function tr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?er(Object(r),!0).forEach(function(n){T(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):er(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ms(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function js(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $s(t,e,r){return e&&js(t.prototype,e),t}function T(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ls=(function(){function t(e,r,n){var i=this;Ms(this,t),T(this,"options",void 0),T(this,"actions",void 0),T(this,"monitor",void 0),T(this,"registry",void 0),T(this,"enterLeaveCounter",void 0),T(this,"sourcePreviewNodes",new Map),T(this,"sourcePreviewNodeOptions",new Map),T(this,"sourceNodes",new Map),T(this,"sourceNodeOptions",new Map),T(this,"dragStartSourceIds",null),T(this,"dropTargetIds",[]),T(this,"dragEnterTargetIds",[]),T(this,"currentNativeSource",null),T(this,"currentNativeHandle",null),T(this,"currentDragSourceNode",null),T(this,"altKeyPressed",!1),T(this,"mouseMoveTimeoutTimer",null),T(this,"asyncEndDragFrameId",null),T(this,"dragOverTargetIds",null),T(this,"lastClientOffset",null),T(this,"hoverRafId",null),T(this,"getSourceClientOffset",function(o){var a=i.sourceNodes.get(o);return a&&zr(a)||null}),T(this,"endDragNativeItem",function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.currentNativeHandle&&i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)}),T(this,"isNodeInDocument",function(o){return!!(o&&i.document&&i.document.body&&i.document.body.contains(o))}),T(this,"endDragIfSourceWasRemovedFromDOM",function(){var o=i.currentDragSourceNode;o==null||i.isNodeInDocument(o)||i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),T(this,"handleTopDragStartCapture",function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]}),T(this,"handleTopDragStart",function(o){if(!o.defaultPrevented){var a=i.dragStartSourceIds;i.dragStartSourceIds=null;var u=ae(o);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:u});var s=o.dataTransfer,c=Le(s);if(i.monitor.isDragging()){if(s&&typeof s.setDragImage=="function"){var f=i.monitor.getSourceId(),h=i.sourceNodes.get(f),y=i.sourcePreviewNodes.get(f)||h;if(y){var m=i.getCurrentSourcePreviewNodeOptions(),b=m.anchorX,l=m.anchorY,d=m.offsetX,g=m.offsetY,v={anchorX:b,anchorY:l},S={offsetX:d,offsetY:g},w=ws(h,y,u,v,S);s.setDragImage(y,w.x,w.y)}}try{s?.setData("application/json",{})}catch{}i.setCurrentDragSourceNode(o.target);var D=i.getCurrentSourcePreviewNodeOptions(),C=D.captureDraggingState;C?i.actions.publishDragSource():setTimeout(function(){return i.actions.publishDragSource()},0)}else if(c)i.beginDragNativeItem(c);else{if(s&&!s.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}}}),T(this,"handleTopDragEndCapture",function(){i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),T(this,"handleTopDragEnterCapture",function(o){i.dragEnterTargetIds=[];var a=i.enterLeaveCounter.enter(o.target);if(!(!a||i.monitor.isDragging())){var u=o.dataTransfer,s=Le(u);s&&i.beginDragNativeItem(s,u)}}),T(this,"handleTopDragEnter",function(o){var a=i.dragEnterTargetIds;if(i.dragEnterTargetIds=[],!!i.monitor.isDragging()){i.altKeyPressed=o.altKey,a.length>0&&i.actions.hover(a,{clientOffset:ae(o)});var u=a.some(function(s){return i.monitor.canDropOnTarget(s)});u&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect()))}}),T(this,"handleTopDragOverCapture",function(){i.dragOverTargetIds=[]}),T(this,"handleTopDragOver",function(o){var a=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}i.altKeyPressed=o.altKey,i.lastClientOffset=ae(o),i.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(i.hoverRafId=requestAnimationFrame(function(){i.monitor.isDragging()&&i.actions.hover(a||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null}));var u=(a||[]).some(function(s){return i.monitor.canDropOnTarget(s)});u?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))}),T(this,"handleTopDragLeaveCapture",function(o){i.isDraggingNativeItem()&&o.preventDefault();var a=i.enterLeaveCounter.leave(o.target);a&&i.isDraggingNativeItem()&&setTimeout(function(){return i.endDragNativeItem()},0)}),T(this,"handleTopDropCapture",function(o){if(i.dropTargetIds=[],i.isDraggingNativeItem()){var a;o.preventDefault(),(a=i.currentNativeSource)===null||a===void 0||a.loadDataTransfer(o.dataTransfer)}else Le(o.dataTransfer)&&o.preventDefault();i.enterLeaveCounter.reset()}),T(this,"handleTopDrop",function(o){var a=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(a,{clientOffset:ae(o)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()}),T(this,"handleSelectStart",function(o){var a=o.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(o.preventDefault(),a.dragDrop()))}),this.options=new As(r,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new ys(this.isNodeInDocument)}return $s(t,[{key:"profile",value:function(){var r,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((r=this.dragStartSourceIds)===null||r===void 0?void 0:r.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var r=this.rootElement;if(r!==void 0){if(r.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");r.__isReactDndBackendSetUp=!0,this.addEventListeners(r)}}},{key:"teardown",value:function(){var r=this.rootElement;if(r!==void 0&&(r.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}},{key:"connectDragPreview",value:function(r,n,i){var o=this;return this.sourcePreviewNodeOptions.set(r,i),this.sourcePreviewNodes.set(r,n),function(){o.sourcePreviewNodes.delete(r),o.sourcePreviewNodeOptions.delete(r)}}},{key:"connectDragSource",value:function(r,n,i){var o=this;this.sourceNodes.set(r,n),this.sourceNodeOptions.set(r,i);var a=function(c){return o.handleDragStart(c,r)},u=function(c){return o.handleSelectStart(c)};return n.setAttribute("draggable","true"),n.addEventListener("dragstart",a),n.addEventListener("selectstart",u),function(){o.sourceNodes.delete(r),o.sourceNodeOptions.delete(r),n.removeEventListener("dragstart",a),n.removeEventListener("selectstart",u),n.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(r,n){var i=this,o=function(c){return i.handleDragEnter(c,r)},a=function(c){return i.handleDragOver(c,r)},u=function(c){return i.handleDrop(c,r)};return n.addEventListener("dragenter",o),n.addEventListener("dragover",a),n.addEventListener("drop",u),function(){n.removeEventListener("dragenter",o),n.removeEventListener("dragover",a),n.removeEventListener("drop",u)}}},{key:"addEventListeners",value:function(r){r.addEventListener&&(r.addEventListener("dragstart",this.handleTopDragStart),r.addEventListener("dragstart",this.handleTopDragStartCapture,!0),r.addEventListener("dragend",this.handleTopDragEndCapture,!0),r.addEventListener("dragenter",this.handleTopDragEnter),r.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),r.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),r.addEventListener("dragover",this.handleTopDragOver),r.addEventListener("dragover",this.handleTopDragOverCapture,!0),r.addEventListener("drop",this.handleTopDrop),r.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(r){r.removeEventListener&&(r.removeEventListener("dragstart",this.handleTopDragStart),r.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),r.removeEventListener("dragend",this.handleTopDragEndCapture,!0),r.removeEventListener("dragenter",this.handleTopDragEnter),r.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),r.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),r.removeEventListener("dragover",this.handleTopDragOver),r.removeEventListener("dragover",this.handleTopDragOverCapture,!0),r.removeEventListener("drop",this.handleTopDrop),r.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var r=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(r);return tr({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var r=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(r);return tr({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}},{key:"isDraggingNativeItem",value:function(){var r=this.monitor.getItemType();return Object.keys(Qt).some(function(n){return Qt[n]===r})}},{key:"beginDragNativeItem",value:function(r,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=Ps(r,n),this.currentNativeHandle=this.registry.addSource(r,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(r){var n=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=r;var i=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){var o;return(o=n.rootElement)===null||o===void 0?void 0:o.addEventListener("mousemove",n.endDragIfSourceWasRemovedFromDOM,!0)},i)}},{key:"clearCurrentDragSourceNode",value:function(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var r;(r=this.window)===null||r===void 0||r.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}},{key:"handleDragStart",value:function(r,n){r.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}},{key:"handleDragEnter",value:function(r,n){this.dragEnterTargetIds.unshift(n)}},{key:"handleDragOver",value:function(r,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}},{key:"handleDrop",value:function(r,n){this.dropTargetIds.unshift(n)}}]),t})(),ue;function Fs(){return ue||(ue=new Image,ue.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),ue}var Hs=function(e,r,n){return new Ls(e,r,n)};function Us(t){const e=R(),r=e.selectedIds,[n,i,o]=qa(()=>({canDrag:()=>t.isDraggable,type:"NODE",item:()=>{const a=e.isSelected(t.id)?Array.from(r):[t.id];return e.dispatch(X.dragStart(t.id,a)),{id:t.id,dragIds:a}},end:()=>{e.hideCursor(),e.dispatch(X.dragEnd())}}),[r,t]);return p.useEffect(()=>{o(Fs())},[o]),i}function zs(t,e){const r=t.getBoundingClientRect(),n=e.x-Math.round(r.x),i=e.y-Math.round(r.y),o=r.height,a=i<o/2,u=!a,s=o/4,c=i>s&&i<o-s;return{x:n,inTopHalf:a,inBottomHalf:u,inMiddle:c,atTop:!c&&a,atBottom:!c&&u}}function Bs(t,e,r,n){return t?t.isInternal?n.atTop?[e,t]:n.inMiddle?[t,t]:[t,r]:n.inTopHalf?[e,t]:[t,r]:[e,null]}function le(t,e){return{parentId:t||null,index:e}}function Y(t,e){return{type:"line",index:t,level:e}}function qs(t){return{type:"highlight",id:t}}function He(t,e){var r;let n=t;for(;n.parent&&n.level>e;)n=n.parent;const i=((r=n.parent)===null||r===void 0?void 0:r.id)||null,o=yr(n)+1;return{parentId:i,index:o}}function Gr(t){var e;const r=zs(t.element,t.offset),n=t.indent,i=Math.round(Math.max(0,r.x-n)/n),{node:o,nextNode:a,prevNode:u}=t,[s,c]=Bs(o,u,a,r);if(o&&o.isInternal&&r.inMiddle)return{drop:le(o.id,null),cursor:qs(o.id)};if(!s)return{drop:le((e=c?.parent)===null||e===void 0?void 0:e.id,0),cursor:Y(0,0)};if(hr(s)){const f=ce(i,c?.level||0,s.level);return{drop:He(s,f),cursor:Y(s.rowIndex+1,f)}}if(gr(s)){const f=ce(i,c?.level||0,s.level);return{drop:He(s,f),cursor:Y(s.rowIndex+1,f)}}if(pr(s)){const f=ce(i,0,s.level+1);return f>s.level?{drop:le(s.id,0),cursor:Y(s.rowIndex+1,f)}:{drop:He(s,f),cursor:Y(s.rowIndex+1,f)}}return{drop:le(s?.id,0),cursor:Y(s.rowIndex+1,s.level+1)}}function Ws(t,e){const r=R(),[n,i]=Fr(()=>({accept:"NODE",canDrop:()=>r.canDrop(),hover:(o,a)=>{const u=a.getClientOffset();if(!t.current||!u)return;const{cursor:s,drop:c}=Gr({element:t.current,offset:u,indent:r.indent,node:e,prevNode:e.prev,nextNode:e.next});c&&r.dispatch(X.hovering(c.parentId,c.index)),a.canDrop()?s&&r.showCursor(s):r.hideCursor()},drop:(o,a)=>{if(!a.canDrop())return null;let{parentId:u,index:s,dragIds:c}=r.state.dnd;Ir(r.props.onMove,{dragIds:c,parentId:u===ne?null:u,index:s===null?0:s,dragNodes:r.dragNodes,parentNode:r.get(u)}),r.open(u)}}),[e,t.current,r.props]);return i}function Vs(t){const e=R(),r=e.at(t);if(!r)throw new Error(`Could not find node for index: ${t}`);return p.useMemo(()=>{const n=r.clone();return e.visibleNodes[t]=n,n},[...Object.values(r.state),r])}const Gs=sr.memo(function({index:e,style:r}){dr(),vn();const n=R(),i=Vs(e),o=p.useRef(null),a=Us(i),u=Ws(o,i),s=p.useCallback(l=>{o.current=l,u(l)},[u]),c=n.indent*i.level,f=p.useMemo(()=>({paddingLeft:c}),[c]),h=p.useMemo(()=>{var l,d;return Object.assign(Object.assign({},r),{top:parseFloat(r.top)+((d=(l=n.props.padding)!==null&&l!==void 0?l:n.props.paddingTop)!==null&&d!==void 0?d:0)})},[r,n.props.padding,n.props.paddingTop]),y={role:"treeitem","aria-level":i.level+1,"aria-selected":i.isSelected,"aria-expanded":i.isOpen,style:h,tabIndex:-1,className:n.props.rowClassName};p.useEffect(()=>{var l;!i.isEditing&&i.isFocused&&((l=o.current)===null||l===void 0||l.focus({preventScroll:!0}))},[i.isEditing,i.isFocused,o.current]);const m=n.renderNode,b=n.renderRow;return O.jsx(b,{node:i,innerRef:s,attrs:y,children:O.jsx(m,{node:i,tree:n,style:f,dragHandle:a})})});let Ue="",rr=null;function Yr(){dr();const t=R();return O.jsx("div",{role:"tree",style:{height:t.height,width:t.width,minHeight:0,minWidth:0},onContextMenu:t.props.onContextMenu,onClick:t.props.onClick,tabIndex:0,onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||t.onFocus()},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||t.onBlur()},onKeyDown:e=>{var r;if(t.isEditing)return;if(e.key==="Backspace"){if(!t.props.onDelete)return;const i=Array.from(t.selectedIds);if(i.length>1){let o=t.mostRecentNode;for(;o&&o.isSelected;)o=o.nextSibling;o||(o=t.lastNode),t.focus(o,{scroll:!1}),t.delete(Array.from(i))}else{const o=t.focusedNode;if(o){const a=o.nextSibling,u=o.parent;t.focus(a||u,{scroll:!1}),t.delete(o)}}return}if(e.key==="Tab"&&!e.shiftKey){e.preventDefault(),mr(e.currentTarget);return}if(e.key==="Tab"&&e.shiftKey){e.preventDefault(),br(e.currentTarget);return}if(e.key==="ArrowDown"){e.preventDefault();const i=t.nextNode;if(e.metaKey){t.select(t.focusedNode),t.activate(t.focusedNode);return}else if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.firstNode);return}}if(e.key==="ArrowUp"){e.preventDefault();const i=t.prevNode;if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.lastNode);return}}if(e.key==="ArrowRight"){const i=t.focusedNode;if(!i)return;i.isInternal&&i.isOpen?t.focus(t.nextNode):i.isInternal&&t.open(i.id);return}if(e.key==="ArrowLeft"){const i=t.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?t.close(i.id):!((r=i.parent)===null||r===void 0)&&r.isRoot||t.focus(i.parent);return}if(e.key==="a"&&e.metaKey&&!t.props.disableMultiSelection){e.preventDefault(),t.selectAll();return}if(e.key==="a"&&!e.metaKey&&t.props.onCreate){t.createLeaf();return}if(e.key==="A"&&!e.metaKey){if(!t.props.onCreate)return;t.createInternal();return}if(e.key==="Home"){e.preventDefault(),t.focus(t.firstNode);return}if(e.key==="End"){e.preventDefault(),t.focus(t.lastNode);return}if(e.key==="Enter"){const i=t.focusedNode;if(!i||!i.isEditable||!t.props.onRename)return;setTimeout(()=>{i&&t.edit(i)});return}if(e.key===" "){e.preventDefault();const i=t.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(e.key==="*"){const i=t.focusedNode;if(!i)return;t.openSiblings(i);return}if(e.key==="PageUp"){e.preventDefault(),t.pageUp();return}e.key==="PageDown"&&(e.preventDefault(),t.pageDown()),clearTimeout(rr),Ue+=e.key,rr=setTimeout(()=>{Ue=""},600);const n=t.visibleNodes.find(i=>{const o=i.data.name;return typeof o=="string"?o.toLowerCase().startsWith(Ue):!1});n&&t.focus(n.id)},children:O.jsx(Zn,{className:t.props.className,outerRef:t.listEl,itemCount:t.visibleNodes.length,height:t.height,width:t.width,itemSize:t.rowHeight,overscanCount:t.overscanCount,itemKey:e=>{var r;return((r=t.visibleNodes[e])===null||r===void 0?void 0:r.id)||e},outerElementType:ri,innerElementType:oi,onScroll:t.props.onScroll,onItemsRendered:t.onItemsRendered.bind(t),ref:t.list,children:Gs})})}function nr(t){return t.isFiltered?Ks(t.root,t.isMatch.bind(t)):Ys(t.root)}function Ys(t){const e=[];function r(n){var i;n.level>=0&&e.push(n),n.isOpen&&((i=n.children)===null||i===void 0||i.forEach(r))}return r(t),e.forEach(Kr),e}function Ks(t,e){const r={},n=[];function i(a){if(!a.isRoot&&e(a)){r[a.id]=!0;let s=a.parent;for(;s;)r[s.id]=!0,s=s.parent}if(a.children)for(let s of a.children)i(s)}function o(a){var u;a.level>=0&&r[a.id]&&n.push(a),a.isOpen&&((u=a.children)===null||u===void 0||u.forEach(o))}return i(t),o(t),n.forEach(Kr),n}function Kr(t,e){t.rowIndex=e}const ir=t=>t.reduce((e,r,n)=>(e[r.id]=n,e),{});var ze=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(f){try{c(n.next(f))}catch(h){a(h)}}function s(f){try{c(n.throw(f))}catch(h){a(h)}}function c(f){f.done?o(f.value):i(f.value).then(u,s)}c((n=n.apply(t,e||[])).next())})};const{safeRun:_,identify:H,identifyNull:L}=In;class re{constructor(e,r,n,i){this.store=e,this.props=r,this.list=n,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=gt(this),this.visibleNodes=nr(this),this.idToIndex=ir(this.visibleNodes)}update(e){this.props=e,this.root=gt(this),this.visibleNodes=nr(this),this.idToIndex=ir(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){var e;return(e=this.props.width)!==null&&e!==void 0?e:300}get height(){var e;return(e=this.props.height)!==null&&e!==void 0?e:500}get indent(){var e;return(e=this.props.indent)!==null&&e!==void 0?e:24}get rowHeight(){var e;return(e=this.props.rowHeight)!==null&&e!==void 0?e:24}get overscanCount(){var e;return(e=this.props.overscanCount)!==null&&e!==void 0?e:1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){var e;const r=(e=this.props.searchMatch)!==null&&e!==void 0?e:((n,i)=>JSON.stringify(Object.values(n.data)).toLocaleLowerCase().includes(i.toLocaleLowerCase()));return n=>r(n,this.searchTerm)}accessChildren(e){var r;const n=this.props.childrenAccessor||"children";return(r=te(e,n))!==null&&r!==void 0?r:null}accessId(e){const r=this.props.idAccessor||"id",n=te(e,r);if(!n)throw new Error("Data must contain an 'id' property or props.idAccessor must return a string");return n}get firstNode(){var e;return(e=this.visibleNodes[0])!==null&&e!==void 0?e:null}get lastNode(){var e;return(e=this.visibleNodes[this.visibleNodes.length-1])!==null&&e!==void 0?e:null}get focusedNode(){var e;return(e=this.get(this.state.nodes.focus.id))!==null&&e!==void 0?e:null}get mostRecentNode(){var e;return(e=this.get(this.state.nodes.selection.mostRecent))!==null&&e!==void 0?e:null}get nextNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e+1)}get prevNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,r){var n;if(e===null||r===null)return[];const i=(n=this.indexOf(e))!==null&&n!==void 0?n:0,o=this.indexOf(r);if(o===null)return[];const a=Math.min(i,o),u=Math.max(i,o);return this.visibleNodes.slice(a,u+1)}indexOf(e){const r=Or(e);return r?this.idToIndex[r]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return ze(this,arguments,void 0,function*(e={}){var r,n;const i=e.parentId===void 0?wr(this):e.parentId,o=(r=e.index)!==null&&r!==void 0?r:Tr(this),a=(n=e.type)!==null&&n!==void 0?n:"leaf",u=yield _(this.props.onCreate,{type:a,parentId:i,index:o,parentNode:this.get(i)});u&&(this.focus(u),setTimeout(()=>{this.edit(u).then(()=>{this.select(u),this.activate(u)})}))})}delete(e){return ze(this,void 0,void 0,function*(){if(!e)return;const n=(Array.isArray(e)?e:[e]).map(H),i=n.map(o=>this.get(o)).filter(o=>!!o);yield _(this.props.onDelete,{nodes:i,ids:n})})}edit(e){const r=H(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(r),this.dispatch(xe(r)),new Promise(n=>{re.editPromise=n})}submit(e,r){return ze(this,void 0,void 0,function*(){if(!e)return;const n=H(e);yield _(this.props.onRename,{id:n,name:r,node:this.get(n)}),this.dispatch(xe(null)),this.resolveEdit({cancelled:!1,value:r}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(xe(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){const r=this.get(L(e));r&&_(this.props.onActivate,r)}resolveEdit(e){const r=re.editPromise;r&&r(e),re.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let r of Array.from(this.selectedIds)){const n=this.get(r);n&&e.push(n)}return e}focus(e,r={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(q(H(e))),r.scroll!==!1&&this.scrollTo(e),this.focusedNode&&_(this.props.onFocus,this.focusedNode)))}pageUp(){var e,r;const n=this.visibleStartIndex,o=this.visibleStopIndex-n;let a=(r=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&r!==void 0?r:0;a>n?a=n:a=Math.max(n-o,0),this.focus(this.at(a))}pageDown(){var e,r;const n=this.visibleStartIndex,i=this.visibleStopIndex,o=i-n;let a=(r=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&r!==void 0?r:0;a<i?a=i:a=Math.min(a+o,this.visibleNodes.length-1),this.focus(this.at(a))}select(e,r={}){if(!e)return;const n=r.focus!==!1,i=H(e);n&&this.dispatch(q(i)),this.dispatch($.only(i)),this.dispatch($.anchor(i)),this.dispatch($.mostRecent(i)),this.scrollTo(i,r.align),this.focusedNode&&n&&_(this.props.onFocus,this.focusedNode),_(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;const r=H(e);this.dispatch($.remove(r)),_(this.props.onSelect,this.selectedNodes)}selectMulti(e){const r=this.get(L(e));r&&(this.dispatch(q(r.id)),this.dispatch($.add(r.id)),this.dispatch($.anchor(r.id)),this.dispatch($.mostRecent(r.id)),this.scrollTo(r),this.focusedNode&&_(this.props.onFocus,this.focusedNode),_(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;const r=H(e),{anchor:n,mostRecent:i}=this.state.nodes.selection;this.dispatch(q(r)),this.dispatch($.remove(this.nodesBetween(n,i))),this.dispatch($.add(this.nodesBetween(n,L(r)))),this.dispatch($.mostRecent(r)),this.scrollTo(r),this.focusedNode&&_(this.props.onFocus,this.focusedNode),_(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),_(this.props.onSelect,this.selectedNodes)}selectAll(){var e;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(q((e=this.lastNode)===null||e===void 0?void 0:e.id)),this.focusedNode&&_(this.props.onFocus,this.focusedNode),_(this.props.onSelect,this.selectedNodes)}setSelection(e){var r;const n=new Set((r=e.ids)===null||r===void 0?void 0:r.map(H)),i=L(e.anchor),o=L(e.mostRecent);this.dispatch($.set({ids:n,anchor:i,mostRecent:o})),_(this.props.onSelect,this.selectedNodes)}get cursorParentId(){const{cursor:e}=this.state.dnd;switch(e.type){case"highlight":return e.id;default:return null}}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(e=>this.get(e)).filter(e=>!!e)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){var e;if(this.isFiltered)return!1;const r=(e=this.get(this.state.dnd.parentId))!==null&&e!==void 0?e:this.root,n=this.dragNodes,i=this.props.disableDrop;for(const o of n)if(!o||!r||o.isInternal&&vr(r,o))return!1;return typeof i=="function"?!i({parentNode:r,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof i=="string"?!r.data[i]:typeof i=="boolean"?!i:!0}hideCursor(){this.dispatch(X.cursor({type:"none"}))}showCursor(e){this.dispatch(X.cursor(e))}open(e){const r=L(e);r&&(this.isOpen(r)||(this.dispatch(qe.open(r,this.isFiltered)),_(this.props.onToggle,r)))}close(e){const r=L(e);r&&this.isOpen(r)&&(this.dispatch(qe.close(r,this.isFiltered)),_(this.props.onToggle,r))}toggle(e){const r=L(e);if(r)return this.isOpen(r)?this.close(r):this.open(r)}openParents(e){const r=L(e);if(!r)return;const n=Je(this.root,r);let i=n?.parent;for(;i;)this.open(i.id),i=i.parent}openSiblings(e){const r=e.parent;if(!r)this.toggle(e.id);else if(r.children){const n=e.isOpen;for(let i of r.children)i.isInternal&&(n?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){ve(this.root,e=>{e.isInternal&&e.open()})}closeAll(){ve(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,r="smart"){if(!e)return;const n=H(e);return this.openParents(n),Dr(()=>n in this.idToIndex).then(()=>{var i;const o=this.idToIndex[n];o!==void 0&&((i=this.list.current)===null||i===void 0||i.scrollToItem(o,r))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var e;return!!(!((e=this.props.searchTerm)===null||e===void 0)&&e.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return e?this.state.nodes.selection.ids.has(e):!1}isOpen(e){var r,n,i;if(!e)return!1;if(e===ne)return!0;const o=(r=this.props.openByDefault)!==null&&r!==void 0?r:!0;return this.isFiltered?(n=this.state.nodes.open.filtered[e])!==null&&n!==void 0?n:!0:(i=this.state.nodes.open.unfiltered[e])!==null&&i!==void 0?i:o}isEditable(e){const r=this.props.disableEdit||(()=>!1);return!te(e,r)}isDraggable(e){const r=this.props.disableDrag||(()=>!1);return!te(e,r)}isDragging(e){const r=L(e);return r?this.state.nodes.drag.id===r:!1}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){const r=L(e);if(!r)return!1;const{destinationParentId:n,destinationIndex:i}=this.state.nodes.drag;return r===n&&i===null}onFocus(){const e=this.focusedNode||this.firstNode;e&&this.dispatch(q(e.id))}onBlur(){this.dispatch(Rn())}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||Yr}get renderRow(){return this.props.renderRow||En}get renderNode(){return this.props.children||_n}get renderDragPreview(){return this.props.renderDragPreview||Cr}get renderCursor(){return this.props.renderCursor||Cn}}function P(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Xs=typeof Symbol=="function"&&Symbol.observable||"@@observable",or=Xs,Be=()=>Math.random().toString(36).substring(7).split("").join("."),Js={INIT:`@@redux/INIT${Be()}`,REPLACE:`@@redux/REPLACE${Be()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Be()}`},be=Js;function Qs(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Xr(t,e,r){if(typeof t!="function")throw new Error(P(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(P(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(P(1));return r(Xr)(t,e)}let n=t,i=e,o=new Map,a=o,u=0,s=!1;function c(){a===o&&(a=new Map,o.forEach((d,g)=>{a.set(g,d)}))}function f(){if(s)throw new Error(P(3));return i}function h(d){if(typeof d!="function")throw new Error(P(4));if(s)throw new Error(P(5));let g=!0;c();const v=u++;return a.set(v,d),function(){if(g){if(s)throw new Error(P(6));g=!1,c(),a.delete(v),o=null}}}function y(d){if(!Qs(d))throw new Error(P(7));if(typeof d.type>"u")throw new Error(P(8));if(typeof d.type!="string")throw new Error(P(17));if(s)throw new Error(P(9));try{s=!0,i=n(i,d)}finally{s=!1}return(o=a).forEach(v=>{v()}),d}function m(d){if(typeof d!="function")throw new Error(P(10));n=d,y({type:be.REPLACE})}function b(){const d=h;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(P(11));function v(){const w=g;w.next&&w.next(f())}return v(),{unsubscribe:d(v)}},[or](){return this}}}return y({type:be.INIT}),{dispatch:y,subscribe:h,getState:f,replaceReducer:m,[or]:b}}function Zs(t){Object.keys(t).forEach(e=>{const r=t[e];if(typeof r(void 0,{type:be.INIT})>"u")throw new Error(P(12));if(typeof r(void 0,{type:be.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(P(13))})}function ar(t){const e=Object.keys(t),r={};for(let o=0;o<e.length;o++){const a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}const n=Object.keys(r);let i;try{Zs(r)}catch(o){i=o}return function(a={},u){if(i)throw i;let s=!1;const c={};for(let f=0;f<n.length;f++){const h=n[f],y=r[h],m=a[h],b=y(m,u);if(typeof b>"u")throw u&&u.type,new Error(P(14));c[h]=b,s=s||b!==m}return s=s||n.length!==Object.keys(a).length,s?c:a}}function eu(t=K().nodes.drag,e){switch(e.type){case"DND_DRAG_START":return Object.assign(Object.assign({},t),{id:e.id,selectedIds:e.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},t),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return e.parentId!==t.destinationParentId||e.index!=t.destinationIndex?Object.assign(Object.assign({},t),{destinationParentId:e.parentId,destinationIndex:e.index}):t;default:return t}}const tu=ar({nodes:ar({focus:kn,edit:Nn,open:An,selection:Mn,drag:eu}),dnd:jn}),ru=K();function nu({treeProps:t,imperativeHandle:e,children:r}){const n=p.useRef(null),i=p.useRef(null),o=p.useRef(Xr(tu,K(t))),a=pn.useSyncExternalStore(o.current.subscribe,o.current.getState,()=>ru),u=p.useMemo(()=>new re(o.current,t,n,i),[]),s=p.useRef(0);return p.useMemo(()=>{s.current+=1,u.update(t)},[...Object.values(t),a.nodes.open]),p.useImperativeHandle(e,()=>u),p.useEffect(()=>{u.props.selection?u.select(u.props.selection,{focus:!1}):u.deselectAll()},[u.props.selection]),p.useEffect(()=>{u.props.searchTerm||o.current.dispatch(qe.clear(!0))},[u.props.searchTerm]),O.jsx(ur.Provider,{value:u,children:O.jsx(fr.Provider,{value:s.current,children:O.jsx(lr.Provider,{value:a.nodes,children:O.jsx(cr.Provider,{value:a.dnd,children:O.jsx(Fo,Object.assign({backend:Hs,options:{rootElement:u.props.dndRootElement||void 0}},t.dndManager&&{manager:t.dndManager},{children:r}))})})})})}function iu(){const t=R(),[,e]=Fr(()=>({accept:"NODE",canDrop:(r,n)=>n.isOver({shallow:!0})?t.canDrop():!1,hover:(r,n)=>{if(!n.isOver({shallow:!0}))return;const i=n.getClientOffset();if(!t.listEl.current||!i)return;const{cursor:o,drop:a}=Gr({element:t.listEl.current,offset:i,indent:t.indent,node:null,prevNode:t.visibleNodes[t.visibleNodes.length-1],nextNode:null});a&&t.dispatch(X.hovering(a.parentId,a.index)),n.canDrop()?o&&t.showCursor(o):t.hideCursor()}}),[t]);e(t.listEl)}function ou(t){return iu(),t.children}function au(){const e=R().props.renderContainer||Yr;return O.jsx(O.Fragment,{children:O.jsx(e,{})})}function su(){const t=R(),{offset:e,mouse:r,item:n,isDragging:i}=fs(a=>({offset:a.getSourceClientOffset(),mouse:a.getClientOffset(),item:a.getItem(),isDragging:a.isDragging()})),o=t.props.renderDragPreview||Cr;return O.jsx(o,{offset:e,mouse:r,id:n?.id||null,dragIds:n?.dragIds||[],isDragging:i})}class uu{constructor(e){this.root=lu(e)}get data(){var e,r;return(r=(e=this.root.children)===null||e===void 0?void 0:e.map(n=>n.data))!==null&&r!==void 0?r:[]}create(e){const r=e.parentId?this.find(e.parentId):this.root;if(!r)return null;r.addChild(e.data,e.index)}move(e){const r=this.find(e.id),n=e.parentId?this.find(e.parentId):this.root;!r||!n||(n.addChild(r.data,e.index),r.drop())}update(e){const r=this.find(e.id);r&&r.update(e.changes)}drop(e){const r=this.find(e.id);r&&r.drop()}find(e,r=this.root){if(!r)return null;if(r.id===e)return r;if(r.children){for(let n of r.children){const i=this.find(e,n);if(i)return i}return null}return null}}function lu(t){const e=new Jr({id:"ROOT"},null);return e.children=t.map(r=>it(r,e)),e}function it(t,e){const r=new Jr(t,e);return t.children&&(r.children=t.children.map(n=>it(n,r))),r}class Jr{constructor(e,r){this.data=e,this.parent=r,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,r){var n,i;const o=it(e,this);this.children=(n=this.children)!==null&&n!==void 0?n:[],this.children.splice(r,0,o),this.data.children=(i=this.data.children)!==null&&i!==void 0?i:[],this.data.children.splice(r,0,e)}removeChild(e){var r,n;(r=this.children)===null||r===void 0||r.splice(e,1),(n=this.data.children)===null||n===void 0||n.splice(e,1)}update(e){if(this.hasParent()){const r=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),r),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}}let cu=0;function fu(t){const[e,r]=p.useState(t),n=p.useMemo(()=>new uu(e),[e]);return[e,{onMove:c=>{for(const f of c.dragIds)n.move({id:f,parentId:c.parentId,index:c.index});r(n.data)},onRename:({name:c,id:f})=>{n.update({id:f,changes:{name:c}}),r(n.data)},onCreate:({parentId:c,index:f,type:h})=>{const y={id:`simple-tree-id-${cu++}`,name:""};return h==="internal"&&(y.children=[]),n.create({parentId:c,index:f,data:y}),r(n.data),y},onDelete:c=>{c.ids.forEach(f=>n.drop({id:f})),r(n.data)}}]}function du(t){if(t.initialData&&t.data)throw new Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(t.initialData&&(t.onCreate||t.onDelete||t.onMove||t.onRename))throw new Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
27
+ Use the data prop if you want to provide your own handlers.`);if(t.initialData){const[e,r]=fu(t.initialData);return Object.assign(Object.assign(Object.assign({},t),r),{data:e})}else return t}function hu(t,e){const r=du(t);return O.jsxs(nu,{treeProps:r,imperativeHandle:e,children:[O.jsx(ou,{children:O.jsx(au,{})}),O.jsx(su,{})]})}const vu=p.forwardRef(hu);export{vu as T,O as j};
@@ -0,0 +1 @@
1
+ const o=r=>{const e=new Date(r),t=Math.floor((new Date().getTime()-e.getTime())/(1e3*60*60));return t<1?"刚刚":t<24?`${t}小时前`:t<48?"昨天":t<168?`${Math.floor(t/24)}天前`:e.toLocaleDateString("zh-CN")};export{o as f};
@@ -0,0 +1 @@
1
+ function H(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function j(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,i=n.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+n.slice(e+1)]}function J(n){return n=j(Math.abs(n)),n?n[1]:NaN}function K(n,t){return function(e,i){for(var o=e.length,f=[],c=0,u=n[0],p=0;o>0&&u>0&&(p+u+1>i&&(u=Math.max(1,i-p)),f.push(e.substring(o-=u,o+u)),!((p+=u+1)>i));)u=n[c=(c+1)%n.length];return f.reverse().join(t)}}function Q(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var V=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function N(n){if(!(t=V.exec(n)))throw new Error("invalid format: "+n);var t;return new $({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}N.prototype=$.prototype;function $(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}$.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function W(n){n:for(var t=n.length,e=1,i=-1,o;e<t;++e)switch(n[e]){case".":i=o=e;break;case"0":i===0&&(i=e),o=e;break;default:if(!+n[e])break n;i>0&&(i=0);break}return i>0?n.slice(0,i)+n.slice(o+1):n}var U;function _(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1],f=o-(U=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,c=i.length;return f===c?i:f>c?i+new Array(f-c+1).join("0"):f>0?i.slice(0,f)+"."+i.slice(f):"0."+new Array(1-f).join("0")+j(n,Math.max(0,t+f-1))[0]}function G(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}const I={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:H,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>G(n*100,t),r:G,s:_,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function X(n){return n}var O=Array.prototype.map,R=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function v(n){var t=n.grouping===void 0||n.thousands===void 0?X:K(O.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",i=n.currency===void 0?"":n.currency[1]+"",o=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?X:Q(O.call(n.numerals,String)),c=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",p=n.nan===void 0?"NaN":n.nan+"";function F(a){a=N(a);var x=a.fill,M=a.align,m=a.sign,w=a.symbol,l=a.zero,S=a.width,E=a.comma,g=a.precision,L=a.trim,d=a.type;d==="n"?(E=!0,d="g"):I[d]||(g===void 0&&(g=12),L=!0,d="g"),(l||x==="0"&&M==="=")&&(l=!0,x="0",M="=");var Z=w==="$"?e:w==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",q=w==="$"?i:/[%p]/.test(d)?c:"",T=I[d],B=/[defgprs%]/.test(d);g=g===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(r){var y=Z,h=q,b,D,k;if(d==="c")h=T(r)+h,r="";else{r=+r;var P=r<0||1/r<0;if(r=isNaN(r)?p:T(Math.abs(r),g),L&&(r=W(r)),P&&+r==0&&m!=="+"&&(P=!1),y=(P?m==="("?m:u:m==="-"||m==="("?"":m)+y,h=(d==="s"?R[8+U/3]:"")+h+(P&&m==="("?")":""),B){for(b=-1,D=r.length;++b<D;)if(k=r.charCodeAt(b),48>k||k>57){h=(k===46?o+r.slice(b+1):r.slice(b))+h,r=r.slice(0,b);break}}}E&&!l&&(r=t(r,1/0));var z=y.length+r.length+h.length,s=z<S?new Array(S-z+1).join(x):"";switch(E&&l&&(r=t(s+r,s.length?S-h.length:1/0),s=""),M){case"<":r=y+r+h+s;break;case"=":r=y+s+r+h;break;case"^":r=s.slice(0,z=s.length>>1)+y+r+h+s.slice(z);break;default:r=s+y+r+h;break}return f(r)}return C.toString=function(){return a+""},C}function Y(a,x){var M=F((a=N(a),a.type="f",a)),m=Math.max(-8,Math.min(8,Math.floor(J(x)/3)))*3,w=Math.pow(10,-m),l=R[8+m/3];return function(S){return M(w*S)+l}}return{format:F,formatPrefix:Y}}var A,nn,tn;rn({thousands:",",grouping:[3],currency:["$",""]});function rn(n){return A=v(n),nn=A.format,tn=A.formatPrefix,A}export{tn as a,nn as b,J as e,N as f};
@@ -0,0 +1,24 @@
1
+ import{_ as w,D as te,E as ae,H as de,e as he,l as K,aZ as P,d as Y,b as ue,a as fe,p as me,q as ge,g as ye,s as Se,F as ve,a_ as xe,y as be}from"./ChatPage-4A05aP3x.js";import{s as we}from"./chunk-QN33PNHL-xWN6BqD9.js";import{p as Ce}from"./chunk-4BX2VUAB-CuAIZ2Cr.js";import{p as Te}from"./treemap-KMMF4GRG-CBW5iWMJ.js";import{b as O}from"./defaultLocale-C4B-KCzX.js";import{o as J}from"./ordinal-Cboi1Yqb.js";import"./data-structures-C0h9Oap1.js";import"./monaco-editor-DHKm5-VF.js";import"./syntax-highlighting-CnREyncB.js";import"./agents-DG431Wop.js";import"./tools-C0JOzoE_.js";import"./ui-components-CRCmgMKc.js";import"./useAgents-Bp5Ry-Dk.js";import"./useSessions-EknKfdIv.js";import"./index-UPEozv-J.js";import"./useCommands-B0s3JzZs.js";import"./useClaudeVersions-DYM2HCGW.js";import"./FileExplorer-DFQ7ynXa.js";import"./UnifiedToolSelector-CKjY_qjS.js";import"./FileBrowser-BbQchc_7.js";import"./ProjectSelector-GmS-1-C-.js";import"./_baseUniq-D89fR3NG.js";import"./_basePickBy-BTSO2Pkt.js";import"./clone-DTBJjony.js";import"./init-Gi6I4Gst.js";function Le(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function $e(){return this.eachAfter(Le)}function Ae(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Fe(t,a){for(var l=this,n=[l],o,s,p=-1;l=n.pop();)if(t.call(a,l,++p,this),o=l.children)for(s=o.length-1;s>=0;--s)n.push(o[s]);return this}function ke(t,a){for(var l=this,n=[l],o=[],s,p,d,m=-1;l=n.pop();)if(o.push(l),s=l.children)for(p=0,d=s.length;p<d;++p)n.push(s[p]);for(;l=o.pop();)t.call(a,l,++m,this);return this}function Ne(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Me(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,o=n&&n.length;--o>=0;)l+=n[o].value;a.value=l})}function _e(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=Ve(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var o=n.length;t!==l;)n.splice(o,0,t),t=t.parent;return n}function Ve(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),o=null;for(t=l.pop(),a=n.pop();t===a;)o=t,t=l.pop(),a=n.pop();return o}function De(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Pe(){return Array.from(this)}function Be(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ee(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Re(){var t=this,a,l=[t],n,o,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(o=0,s=n.length;o<s;++o)l.push(n[o]);while(l.length)}function Q(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ie)):a===void 0&&(a=He);for(var l=new Z(t),n,o=[l],s,p,d,m;n=o.pop();)if((p=a(n.data))&&(m=(p=Array.from(p)).length))for(n.children=p,d=m-1;d>=0;--d)o.push(s=p[d]=new Z(p[d])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(qe)}function We(){return Q(this).eachBefore(Oe)}function He(t){return t.children}function Ie(t){return Array.isArray(t)?t[1]:null}function Oe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qe(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=Q.prototype={constructor:Z,count:$e,each:Ae,eachAfter:ke,eachBefore:Fe,find:Ne,sum:Me,sort:_e,path:ze,ancestors:De,descendants:Pe,leaves:Be,links:Ee,copy:We,[Symbol.iterator]:Re};function Ge(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function Xe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,o){for(var s=t.children,p,d=-1,m=s.length,c=t.value&&(n-a)/t.value;++d<m;)p=s[d],p.y0=l,p.y1=o,p.x0=a,p.x1=a+=p.value*c}function Ye(t,a,l,n,o){for(var s=t.children,p,d=-1,m=s.length,c=t.value&&(o-l)/t.value;++d<m;)p=s[d],p.x0=a,p.x1=n,p.y0=l,p.y1=l+=p.value*c}var Ze=(1+Math.sqrt(5))/2;function Ue(t,a,l,n,o,s){for(var p=[],d=a.children,m,c,h=0,b=0,r=d.length,x,S,v=a.value,u,g,N,k,V,R,M;h<r;){x=o-l,S=s-n;do u=d[b++].value;while(!u&&b<r);for(g=N=u,R=Math.max(S/x,x/S)/(v*t),M=u*u*R,V=Math.max(N/M,M/g);b<r;++b){if(u+=c=d[b].value,c<g&&(g=c),c>N&&(N=c),M=u*u*R,k=Math.max(N/M,M/g),k>V){u-=c;break}V=k}p.push(m={value:u,dice:x<S,children:d.slice(h,b)}),m.dice?je(m,l,n,o,v?n+=S*u/v:s):Ye(m,l,n,v?l+=x*u/v:o,s),v-=u,h=b}return p}const Je=(function t(a){function l(n,o,s,p,d){Ue(a,n,o,s,p,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(Ze);function Ke(){var t=Je,a=!1,l=1,n=1,o=[0],s=q,p=q,d=q,m=q,c=q;function h(r){return r.x0=r.y0=0,r.x1=l,r.y1=n,r.eachBefore(b),o=[0],a&&r.eachBefore(Xe),r}function b(r){var x=o[r.depth],S=r.x0+x,v=r.y0+x,u=r.x1-x,g=r.y1-x;u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),r.x0=S,r.y0=v,r.x1=u,r.y1=g,r.children&&(x=o[r.depth+1]=s(r)/2,S+=c(r)-x,v+=p(r)-x,u-=d(r)-x,g-=m(r)-x,u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),t(r,S,v,u,g))}return h.round=function(r){return arguments.length?(a=!!r,h):a},h.size=function(r){return arguments.length?(l=+r[0],n=+r[1],h):[l,n]},h.tile=function(r){return arguments.length?(t=Ge(r),h):t},h.padding=function(r){return arguments.length?h.paddingInner(r).paddingOuter(r):h.paddingInner()},h.paddingInner=function(r){return arguments.length?(s=typeof r=="function"?r:G(+r),h):s},h.paddingOuter=function(r){return arguments.length?h.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r):h.paddingTop()},h.paddingTop=function(r){return arguments.length?(p=typeof r=="function"?r:G(+r),h):p},h.paddingRight=function(r){return arguments.length?(d=typeof r=="function"?r:G(+r),h):d},h.paddingBottom=function(r){return arguments.length?(m=typeof r=="function"?r:G(+r),h):m},h.paddingLeft=function(r){return arguments.length?(c=typeof r=="function"?r:G(+r),h):c},h}var E,ne=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=me,this.getDiagramTitle=ge,this.getAccDescription=ye,this.setAccDescription=Se}getNodes(){return this.nodes}getConfig(){const a=ve,l=ae();return te({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},o=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");o&&o.forEach(s=>{xe(s)&&(n?.textStyles?n.textStyles.push(s):n.textStyles=[s]),n?.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){be(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(E,"TreeMapDB"),E);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const o={name:n.name,children:n.type==="Leaf"?void 0:[]};for(o.classSelector=n?.classSelector,n?.cssCompiledStyles&&(o.cssCompiledStyles=[n.cssCompiledStyles]),n.type==="Leaf"&&n.value!==void 0&&(o.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(o);else{const s=l[l.length-1].node;s.children?s.children.push(o):s.children=[o]}n.type!=="Leaf"&&l.push({node:o,level:n.level})}),a}w(le,"buildHierarchy");var Qe=w((t,a)=>{Ce(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const p=s.item;if(!p)continue;const d=s.indent?parseInt(s.indent):0,m=et(p),c=p.classSelector?a.getStylesForClass(p.classSelector):[],h=c.length>0?c.join(";"):void 0,b={level:d,name:m,type:p.$type,value:p.value,classSelector:p.classSelector,cssCompiledStyles:h};l.push(b)}const n=le(l),o=w((s,p)=>{for(const d of s)a.addNode(d,p),d.children&&d.children.length>0&&o(d.children,p+1)},"addNodesRecursively");o(n,0)},"populate"),et=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{try{const l=await Te("treemap",t);K.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Qe(l,n)}catch(a){throw K.error("Error parsing treemap:",a),a}},"parse")},tt=10,B=10,X=25,at=w((t,a,l,n)=>{const o=n.db,s=o.getConfig(),p=s.padding??tt,d=o.getDiagramTitle(),m=o.getRoot(),{themeVariables:c}=ae();if(!m)return;const h=d?30:0,b=de(a),r=s.nodeWidth?s.nodeWidth*B:960,x=s.nodeHeight?s.nodeHeight*B:500,S=r,v=x+h;b.attr("viewBox",`0 0 ${S} ${v}`),he(b,v,S,s.useMaxWidth);let u;try{const e=s.valueFormat||",";if(e==="$0,0")u=w(i=>"$"+O(",")(i),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const i=/\.\d+/.exec(e),f=i?i[0]:"";u=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const i=e.substring(1);u=w(f=>"$"+O(i||"")(f),"valueFormat")}else u=O(e)}catch(e){K.error("Error creating format function:",e),u=O(",")}const g=J().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=J().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),k=J().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${h})`).attr("class","treemapContainer"),R=Q(m).sum(e=>e.value??0).sort((e,i)=>(i.value??0)-(e.value??0)),ee=Ke().size([r,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(p).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(R),se=ee.descendants().filter(e=>e.children&&e.children.length>0),W=V.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,i)=>`treemapSection section${i}`).attr("fill",e=>g(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const i=P({cssCompiledStyles:e.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const i=Y(this),f=e.data.name;i.text(f);const C=e.x1-e.x0,L=6;let $;s.showValues!==!1&&e.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=i.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){i.text("..."),y.getComputedTextLength()>A&&i.text("");break}if(i.text(T+"..."),y.getComputedTextLength()<=A)break}}}),s.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?u(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const ie=ee.leaves(),j=V.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,i)=>`treemapNode treemapLeafGroup leaf${i}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,i)=>`clip-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const i="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,i)=>`url(#clip-${a}-${i})`).text(e=>e.data.name).each(function(e){const i=Y(this),f=e.x1-e.x0,C=e.y1-e.y0,L=i.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){i.style("display","none");return}let y=parseInt(i.style("font-size"),10);const _=8,F=28,T=.6,z=6,H=2;for(;L.getComputedTextLength()>D&&y>_;)y--,i.style("font-size",`${y}px`);let I=Math.max(z,Math.min(F,Math.round(y*T))),U=y+H+I;for(;U>A&&y>_&&(y--,I=Math.max(z,Math.min(F,Math.round(y*T))),!(I<z&&y===_));)i.style("font-size",`${y}px`),U=y+H+I;i.style("font-size",`${y}px`),(L.getComputedTextLength()>D||y<_||A<y)&&i.style("display","none")}),s.showValues!==!1&&j.append("text").attr("class","treemapValue").attr("x",i=>(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(i.data.name)+";",C=P({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const z=(i.y1-i.y0)/2+$/2+_;f.attr("y",z);const H=i.x1-i.x0,ce=i.y1-i.y0-4,pe=H-8;f.node().getComputedTextLength()>pe||z+F>ce||F<y?f.style("display","none"):f.style("display",null)});const oe=s.diagramPadding??8;we(b,oe,"flowchart",s?.useMaxWidth||!1)},"draw"),nt=w(function(t,a){return a.db.getClasses()},"getClasses"),lt={draw:at,getClasses:nt},rt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},st=w(({treemap:t}={})=>{const a=te(rt,t);return`
2
+ .treemapNode.section {
3
+ stroke: ${a.sectionStrokeColor};
4
+ stroke-width: ${a.sectionStrokeWidth};
5
+ fill: ${a.sectionFillColor};
6
+ }
7
+ .treemapNode.leaf {
8
+ stroke: ${a.leafStrokeColor};
9
+ stroke-width: ${a.leafStrokeWidth};
10
+ fill: ${a.leafFillColor};
11
+ }
12
+ .treemapLabel {
13
+ fill: ${a.labelColor};
14
+ font-size: ${a.labelFontSize};
15
+ }
16
+ .treemapValue {
17
+ fill: ${a.valueColor};
18
+ font-size: ${a.valueFontSize};
19
+ }
20
+ .treemapTitle {
21
+ fill: ${a.titleColor};
22
+ font-size: ${a.titleFontSize};
23
+ }
24
+ `},"getStyles"),it=st,Vt={parser:re,get db(){return new ne},renderer:lt,styles:it};export{Vt as diagram};
@@ -0,0 +1,43 @@
1
+ import{_ as l,s as k,g as R,q as E,p as F,a as I,b as _,H as D,y as G,D as f,E as C,F as P,l as z,K as H}from"./ChatPage-4A05aP3x.js";import{p as V}from"./chunk-4BX2VUAB-CuAIZ2Cr.js";import{p as W}from"./treemap-KMMF4GRG-CBW5iWMJ.js";import"./data-structures-C0h9Oap1.js";import"./monaco-editor-DHKm5-VF.js";import"./syntax-highlighting-CnREyncB.js";import"./agents-DG431Wop.js";import"./tools-C0JOzoE_.js";import"./ui-components-CRCmgMKc.js";import"./useAgents-Bp5Ry-Dk.js";import"./useSessions-EknKfdIv.js";import"./index-UPEozv-J.js";import"./useCommands-B0s3JzZs.js";import"./useClaudeVersions-DYM2HCGW.js";import"./FileExplorer-DFQ7ynXa.js";import"./UnifiedToolSelector-CKjY_qjS.js";import"./FileBrowser-BbQchc_7.js";import"./ProjectSelector-GmS-1-C-.js";import"./_baseUniq-D89fR3NG.js";import"./_basePickBy-BTSO2Pkt.js";import"./clone-DTBJjony.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:h},g=structuredClone(w),B=P.radar,j=l(()=>f({...B,...C().radar}),"getConfig"),b=l(()=>g.axes,"getAxes"),q=l(()=>g.curves,"getCurves"),K=l(()=>g.options,"getOptions"),N=l(a=>{g.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),U=l(a=>{g.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:X(t.entries)}))},"setCurves"),X=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),Y=l(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});g.options={showLegend:t.showLegend?.value??h.showLegend,ticks:t.ticks?.value??h.ticks,max:t.max?.value??h.max,min:t.min?.value??h.min,graticule:t.graticule?.value??h.graticule}},"setOptions"),Z=l(()=>{G(),g=structuredClone(w)},"clear"),$={getAxes:b,getCurves:q,getOptions:K,setAxes:N,setCurves:U,setOptions:Y,getConfig:j,clear:Z,setAccTitle:_,getAccTitle:I,setDiagramTitle:F,getDiagramTitle:E,getAccDescription:R,setAccDescription:k},J=l(a=>{V(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),Q={parse:l(async a=>{const t=await W("radar",a);z.debug(t),J(t)},"parse")},tt=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),m=D(t),p=et(m,c),u=n.max??Math.max(...i.map(y=>Math.max(...y.entries))),x=n.min,v=Math.min(c.width,c.height)/2;at(p,o,v,n.ticks,n.graticule),rt(p,o,v,c),M(p,o,i,x,u,n.graticule,c),T(p,i,n.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),et=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return a.attr("viewbox",`0 0 ${e} ${r}`).attr("width",e).attr("height",r),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),at=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o<r;o++){const i=e*(o+1)/r;a.append("circle").attr("r",i).attr("class","radarGraticule")}else if(s==="polygon"){const o=t.length;for(let i=0;i<r;i++){const n=e*(i+1)/r,c=t.map((d,m)=>{const p=2*m*Math.PI/o-Math.PI/2,u=n*Math.cos(p),x=n*Math.sin(p);return`${u},${x}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),rt=l((a,t,e,r)=>{const s=t.length;for(let o=0;o<s;o++){const i=t[o].label,n=2*o*Math.PI/s-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(n)).attr("y2",e*r.axisScaleFactor*Math.sin(n)).attr("class","radarAxisLine"),a.append("text").text(i).attr("x",e*r.axisLabelFactor*Math.cos(n)).attr("y",e*r.axisLabelFactor*Math.sin(n)).attr("class","radarAxisLabel")}},"drawAxes");function M(a,t,e,r,s,o,i){const n=t.length,c=Math.min(i.width,i.height)/2;e.forEach((d,m)=>{if(d.entries.length!==n)return;const p=d.entries.map((u,x)=>{const v=2*Math.PI*x/n-Math.PI/2,y=A(u,r,s,c),O=y*Math.cos(v),S=y*Math.sin(v);return{x:O,y:S}});o==="circle"?a.append("path").attr("d",L(p,i.curveTension)).attr("class",`radarCurve-${m}`):o==="polygon"&&a.append("polygon").attr("points",p.map(u=>`${u.x},${u.y}`).join(" ")).attr("class",`radarCurve-${m}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const o=a[(s-1+e)%e],i=a[s],n=a[(s+1)%e],c=a[(s+2)%e],d={x:i.x+(n.x-o.x)*t,y:i.y+(n.y-o.y)*t},m={x:n.x-(c.x-i.x)*t,y:n.y-(c.y-i.y)*t};r+=` C${d.x},${d.y} ${m.x},${m.y} ${n.x},${n.y}`}return`${r} Z`}l(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,i=20;t.forEach((n,c)=>{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var st={draw:tt},nt=l((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
2
+ .radarCurve-${r} {
3
+ color: ${s};
4
+ fill: ${s};
5
+ fill-opacity: ${t.curveOpacity};
6
+ stroke: ${s};
7
+ stroke-width: ${t.curveStrokeWidth};
8
+ }
9
+ .radarLegendBox-${r} {
10
+ fill: ${s};
11
+ fill-opacity: ${t.curveOpacity};
12
+ stroke: ${s};
13
+ }
14
+ `}return e},"genIndexStyles"),ot=l(a=>{const t=H(),e=C(),r=f(t,e.themeVariables),s=f(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),it=l(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=ot(a);return`
15
+ .radarTitle {
16
+ font-size: ${t.fontSize};
17
+ color: ${t.titleColor};
18
+ dominant-baseline: hanging;
19
+ text-anchor: middle;
20
+ }
21
+ .radarAxisLine {
22
+ stroke: ${e.axisColor};
23
+ stroke-width: ${e.axisStrokeWidth};
24
+ }
25
+ .radarAxisLabel {
26
+ dominant-baseline: middle;
27
+ text-anchor: middle;
28
+ font-size: ${e.axisLabelFontSize}px;
29
+ color: ${e.axisColor};
30
+ }
31
+ .radarGraticule {
32
+ fill: ${e.graticuleColor};
33
+ fill-opacity: ${e.graticuleOpacity};
34
+ stroke: ${e.graticuleColor};
35
+ stroke-width: ${e.graticuleStrokeWidth};
36
+ }
37
+ .radarLegendText {
38
+ text-anchor: start;
39
+ font-size: ${e.legendFontSize}px;
40
+ dominant-baseline: hanging;
41
+ }
42
+ ${nt(t,e)}
43
+ `},"styles"),St={parser:Q,db:$,renderer:st,styles:it};export{St as diagram};
@@ -0,0 +1,24 @@
1
+ import{_ as f,D as u,H as B,e as C,l as w,b as S,a as D,p as T,q as E,g as F,s as P,E as z,F as A,y as W}from"./ChatPage-4A05aP3x.js";import{p as _}from"./chunk-4BX2VUAB-CuAIZ2Cr.js";import{p as N}from"./treemap-KMMF4GRG-CBW5iWMJ.js";import"./data-structures-C0h9Oap1.js";import"./monaco-editor-DHKm5-VF.js";import"./syntax-highlighting-CnREyncB.js";import"./agents-DG431Wop.js";import"./tools-C0JOzoE_.js";import"./ui-components-CRCmgMKc.js";import"./useAgents-Bp5Ry-Dk.js";import"./useSessions-EknKfdIv.js";import"./index-UPEozv-J.js";import"./useCommands-B0s3JzZs.js";import"./useClaudeVersions-DYM2HCGW.js";import"./FileExplorer-DFQ7ynXa.js";import"./UnifiedToolSelector-CKjY_qjS.js";import"./FileBrowser-BbQchc_7.js";import"./ProjectSelector-GmS-1-C-.js";import"./_baseUniq-D89fR3NG.js";import"./_basePickBy-BTSO2Pkt.js";import"./clone-DTBJjony.js";var L=A.packet,b,v=(b=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=F,this.setAccDescription=P}getConfig(){const t=u({...L,...z().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},f(b,"PacketDB"),b),M=1e4,Y=f((e,t)=>{_(e,t);let r=-1,o=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:s,bits:p,label:c}of e.blocks){if(a!==void 0&&s!==void 0&&s<a)throw new Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${r+1}.`);if(p===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(s??=a+(p??1)-1,p??=s-a+1,r=s,w.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&t.getPacket().length<M;){const[d,i]=H({start:a,end:s,bits:p,label:c},n,l);if(o.push(d),d.end+1===n*l&&(t.pushWord(o),o=[],n++),!i)break;({start:a,end:s,bits:p,label:c}=i)}}t.pushWord(o)},"populate"),H=f((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const o=t*r-1,n=t*r;return[{start:e.start,end:o,label:e.label,bits:o-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:f(async e=>{const t=await N("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,r)},"parse")},I=f((e,t,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:s,bitWidth:p,bitsPerRow:c}=l,d=n.getPacket(),i=n.getDiagramTitle(),h=a+s,g=h*(d.length+1)-(i?0:a),m=p*c+2,k=B(t);k.attr("viewbox",`0 0 ${m} ${g}`),C(k,g,m,l.useMaxWidth);for(const[y,$]of d.entries())O(k,$,y,l);k.append("text").text(i).attr("x",m/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=f((e,t,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:s,showBits:p})=>{const c=e.append("g"),d=r*(o+l)+l;for(const i of t){const h=i.start%s*a+1,g=(i.end-i.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",d).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",d+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(i.label),!p)continue;const m=i.end===i.start,k=d-2;c.append("text").attr("x",h+(m?g/2:0)).attr("y",k).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",m?"middle":"start").text(i.start),m||c.append("text").attr("x",h+g).attr("y",k).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(i.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=f(({packet:e}={})=>{const t=u(q,e);return`
2
+ .packetByte {
3
+ font-size: ${t.byteFontSize};
4
+ }
5
+ .packetByte.start {
6
+ fill: ${t.startByteColor};
7
+ }
8
+ .packetByte.end {
9
+ fill: ${t.endByteColor};
10
+ }
11
+ .packetLabel {
12
+ fill: ${t.labelColor};
13
+ font-size: ${t.labelFontSize};
14
+ }
15
+ .packetTitle {
16
+ fill: ${t.titleColor};
17
+ font-size: ${t.titleFontSize};
18
+ }
19
+ .packetBlock {
20
+ stroke: ${t.blockStrokeColor};
21
+ stroke-width: ${t.blockStrokeWidth};
22
+ fill: ${t.blockFillColor};
23
+ }
24
+ `},"styles"),ht={parser:x,get db(){return new v},renderer:j,styles:G};export{ht as diagram};