@ash-ai/dashboard 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/LICENSE +21 -0
  2. package/app/agents/page.tsx +408 -0
  3. package/app/analytics/page.tsx +226 -0
  4. package/app/globals.css +33 -0
  5. package/app/layout.tsx +38 -0
  6. package/app/logs/page.tsx +233 -0
  7. package/app/page.tsx +140 -0
  8. package/app/playground/page.tsx +44 -0
  9. package/app/queue/page.tsx +295 -0
  10. package/app/sessions/page.tsx +529 -0
  11. package/app/settings/api-keys/page.tsx +222 -0
  12. package/app/settings/credentials/page.tsx +250 -0
  13. package/components/nav.tsx +151 -0
  14. package/components/providers.tsx +18 -0
  15. package/components/ui/badge.tsx +43 -0
  16. package/components/ui/button.tsx +44 -0
  17. package/components/ui/card.tsx +43 -0
  18. package/components/ui/empty-state.tsx +20 -0
  19. package/components/ui/input.tsx +36 -0
  20. package/components/ui/select.tsx +50 -0
  21. package/components/ui/shimmer.tsx +53 -0
  22. package/lib/client.ts +41 -0
  23. package/lib/exports.ts +55 -0
  24. package/lib/hooks.ts +169 -0
  25. package/lib/utils.ts +44 -0
  26. package/next.config.ts +28 -0
  27. package/out/404/index.html +1 -0
  28. package/out/404.html +1 -0
  29. package/out/_next/static/J9asKIV7Gq221ygeAP958/_buildManifest.js +1 -0
  30. package/out/_next/static/J9asKIV7Gq221ygeAP958/_ssgManifest.js +1 -0
  31. package/out/_next/static/chunks/322-bab4df5c5188e993.js +1 -0
  32. package/out/_next/static/chunks/432-11ec8af7ccfbd019.js +1 -0
  33. package/out/_next/static/chunks/447.6d3368efa2d996b0.js +1 -0
  34. package/out/_next/static/chunks/513-c4683887323154aa.js +1 -0
  35. package/out/_next/static/chunks/522-cf174cf1bbbe9557.js +1 -0
  36. package/out/_next/static/chunks/53-b012ce05184a4754.js +1 -0
  37. package/out/_next/static/chunks/929-6faf1adeb65ee383.js +1 -0
  38. package/out/_next/static/chunks/app/_not-found/page-04f9d3958a76bc38.js +1 -0
  39. package/out/_next/static/chunks/app/agents/page-8d68e3019b4d7077.js +1 -0
  40. package/out/_next/static/chunks/app/analytics/page-6b725a46e9c48019.js +1 -0
  41. package/out/_next/static/chunks/app/layout-9cae773a790a15b2.js +1 -0
  42. package/out/_next/static/chunks/app/logs/page-2efd945345a44a0e.js +1 -0
  43. package/out/_next/static/chunks/app/page-06f62e11f9cd82d5.js +1 -0
  44. package/out/_next/static/chunks/app/playground/page-10d3461f118bfb21.js +1 -0
  45. package/out/_next/static/chunks/app/queue/page-38e79b84cbd59335.js +1 -0
  46. package/out/_next/static/chunks/app/sessions/page-2a67c9eddfac029e.js +1 -0
  47. package/out/_next/static/chunks/app/settings/api-keys/page-619682cf8a1c26eb.js +1 -0
  48. package/out/_next/static/chunks/app/settings/credentials/page-106d0ba4f12afe81.js +1 -0
  49. package/out/_next/static/chunks/b59f762a-cea625f74e98e0aa.js +1 -0
  50. package/out/_next/static/chunks/framework-5a02266cf144994c.js +1 -0
  51. package/out/_next/static/chunks/main-994a6af9cdcd7fb9.js +1 -0
  52. package/out/_next/static/chunks/main-app-5bcd4dcc44c4ae09.js +1 -0
  53. package/out/_next/static/chunks/pages/_app-9fd734050704698a.js +1 -0
  54. package/out/_next/static/chunks/pages/_error-310ed5880fd5d5e6.js +1 -0
  55. package/out/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  56. package/out/_next/static/chunks/webpack-a50a78a04aed446d.js +1 -0
  57. package/out/_next/static/css/4b2beada31dbc623.css +1 -0
  58. package/out/agents/index.html +1 -0
  59. package/out/agents/index.txt +22 -0
  60. package/out/analytics/index.html +1 -0
  61. package/out/analytics/index.txt +22 -0
  62. package/out/index.html +1 -0
  63. package/out/index.txt +22 -0
  64. package/out/logs/index.html +1 -0
  65. package/out/logs/index.txt +22 -0
  66. package/out/playground/index.html +1 -0
  67. package/out/playground/index.txt +22 -0
  68. package/out/queue/index.html +1 -0
  69. package/out/queue/index.txt +22 -0
  70. package/out/sessions/index.html +1 -0
  71. package/out/sessions/index.txt +22 -0
  72. package/out/settings/api-keys/index.html +1 -0
  73. package/out/settings/api-keys/index.txt +22 -0
  74. package/out/settings/credentials/index.html +1 -0
  75. package/out/settings/credentials/index.txt +22 -0
  76. package/package.json +40 -0
  77. package/postcss.config.mjs +7 -0
  78. package/tsconfig.json +27 -0
package/out/404.html ADDED
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><!--J9asKIV7Gq221ygeAP958--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/dashboard/_next/static/css/4b2beada31dbc623.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/dashboard/_next/static/chunks/webpack-a50a78a04aed446d.js"/><script src="/dashboard/_next/static/chunks/b59f762a-cea625f74e98e0aa.js" async=""></script><script src="/dashboard/_next/static/chunks/522-cf174cf1bbbe9557.js" async=""></script><script src="/dashboard/_next/static/chunks/main-app-5bcd4dcc44c4ae09.js" async=""></script><script src="/dashboard/_next/static/chunks/513-c4683887323154aa.js" async=""></script><script src="/dashboard/_next/static/chunks/53-b012ce05184a4754.js" async=""></script><script src="/dashboard/_next/static/chunks/322-bab4df5c5188e993.js" async=""></script><script src="/dashboard/_next/static/chunks/432-11ec8af7ccfbd019.js" async=""></script><script src="/dashboard/_next/static/chunks/929-6faf1adeb65ee383.js" async=""></script><script src="/dashboard/_next/static/chunks/app/layout-9cae773a790a15b2.js" async=""></script><link rel="preload" href="/dashboard/config.js" as="script"/><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Ash Dashboard</title><meta name="description" content="Manage agents, sessions, and monitor your Ash server"/><script>(self.__next_s=self.__next_s||[]).push(["/dashboard/config.js",{}])</script><script src="/dashboard/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="bg-[#0d1117] text-zinc-100 antialiased"><div hidden=""><!--$--><!--/$--></div><div class="flex min-h-screen"><nav class="fixed inset-y-0 left-0 z-50 w-64 flex flex-col border-r border-white/10 bg-[#0d1117]"><div class="flex h-16 items-center gap-3 px-5 border-b border-white/10"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-indigo-500"><span class="text-sm font-bold text-white">A</span></div><div class="min-w-0"><span class="text-white font-bold tracking-tight block">Ash</span><div class="flex items-center gap-1.5 text-white/40 text-xs font-mono"><span class="w-1.5 h-1.5 rounded-full bg-red-400"></span>OFFLINE</div></div></div><div class="flex-1 overflow-auto px-3 py-4 scrollbar-thin"><div class="space-y-0.5"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-dashboard h-4 w-4"><rect width="7" height="9" x="3" y="3" rx="1"></rect><rect width="7" height="5" x="14" y="3" rx="1"></rect><rect width="7" height="9" x="14" y="12" rx="1"></rect><rect width="7" height="5" x="3" y="16" rx="1"></rect></svg>Dashboard</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/playground/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code-xml h-4 w-4"><path d="m18 16 4-4-4-4"></path><path d="m6 8-4 4 4 4"></path><path d="m14.5 4-5 16"></path></svg>Playground</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/agents/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bot h-4 w-4"><path d="M12 8V4H8"></path><rect width="16" height="12" x="4" y="8" rx="2"></rect><path d="M2 14h2"></path><path d="M20 14h2"></path><path d="M15 13v2"></path><path d="M9 13v2"></path></svg>Agents</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/sessions/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-activity h-4 w-4"><path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"></path></svg>Sessions</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/logs/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-scroll-text h-4 w-4"><path d="M15 12h-5"></path><path d="M15 8h-5"></path><path d="M19 17V5a2 2 0 0 0-2-2H4"></path><path d="M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"></path></svg>Logs</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/analytics/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trending-up h-4 w-4"><polyline points="22 7 13.5 15.5 8.5 10.5 2 17"></polyline><polyline points="16 7 22 7 22 13"></polyline></svg>Analytics</a></div></div><div class="border-t border-white/10 px-3 py-3 space-y-0.5"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/settings/api-keys/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key h-4 w-4"><path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"></path><path d="m21 2-9.6 9.6"></path><circle cx="7.5" cy="15.5" r="5.5"></circle></svg>API Keys</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/settings/credentials/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lock h-4 w-4"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>Credentials</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/queue/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-list-ordered h-4 w-4"><path d="M10 12h11"></path><path d="M10 18h11"></path><path d="M10 6h11"></path><path d="M4 10h2"></path><path d="M4 6h1v4"></path><path d="M6 18H4c0-1 2-2 2-3s-1-1.5-2-1"></path></svg>Queue</a></div></nav><main class="min-w-0 flex-1 pl-64 overflow-y-auto overflow-x-hidden"><div class="mx-auto max-w-[1600px] px-6 pb-6 pt-8 sm:px-8 sm:pb-8 sm:pt-10"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></div></main></div><script src="/dashboard/_next/static/chunks/webpack-a50a78a04aed446d.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[9061,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"322\",\"static/chunks/322-bab4df5c5188e993.js\",\"432\",\"static/chunks/432-11ec8af7ccfbd019.js\",\"929\",\"static/chunks/929-6faf1adeb65ee383.js\",\"177\",\"static/chunks/app/layout-9cae773a790a15b2.js\"],\"\"]\n3:I[6412,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"322\",\"static/chunks/322-bab4df5c5188e993.js\",\"432\",\"static/chunks/432-11ec8af7ccfbd019.js\",\"929\",\"static/chunks/929-6faf1adeb65ee383.js\",\"177\",\"static/chunks/app/layout-9cae773a790a15b2.js\"],\"AshProvider\"]\n4:I[2553,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"322\",\"static/chunks/322-bab4df5c5188e993.js\",\"432\",\"static/chunks/432-11ec8af7ccfbd019.js\",\"929\",\"static/chunks/929-6faf1adeb65ee383.js\",\"177\",\"static/chunks/app/layout-9cae773a790a15b2.js\"],\"DashboardNav\"]\n5:I[2229,[],\"\"]\n6:I[1457,[],\"\"]\n7:I[1464,[],\"OutletBoundary\"]\n9:I[6673,[],\"AsyncMetadataOutlet\"]\nb:I[1464,[],\"ViewportBoundary\"]\nd:I[1464,[],\"MetadataBoundary\"]\ne:\"$Sreact.suspense\"\n10:I[5095,[],\"\"]\n:HL[\"/dashboard/_next/static/css/4b2beada31dbc623.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"J9asKIV7Gq221ygeAP958\",\"p\":\"/dashboard\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/dashboard/_next/static/css/4b2beada31dbc623.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"$L2\",null,{\"src\":\"/dashboard/config.js\",\"strategy\":\"beforeInteractive\"}]}],[\"$\",\"body\",null,{\"className\":\"bg-[#0d1117] text-zinc-100 antialiased\",\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"div\",null,{\"className\":\"flex min-h-screen\",\"children\":[[\"$\",\"$L4\",null,{}],[\"$\",\"main\",null,{\"className\":\"min-w-0 flex-1 pl-64 overflow-y-auto overflow-x-hidden\",\"children\":[\"$\",\"div\",null,{\"className\":\"mx-auto max-w-[1600px] px-6 pb-6 pt-8 sm:px-8 sm:pb-8 sm:pt-10\",\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L7\",null,{\"children\":[\"$L8\",[\"$\",\"$L9\",null,{\"promise\":\"$@a\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],null],[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$e\",null,{\"fallback\":null,\"children\":\"$Lf\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n8:null\n"])</script><script>self.__next_f.push([1,"a:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Ash Dashboard\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Manage agents, sessions, and monitor your Ash server\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"f:\"$a:metadata\"\n"])</script></body></html>
@@ -0,0 +1 @@
1
+ self.__BUILD_MANIFEST=function(e,r,t){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:10,errorRate:1e-4,numBits:192,numHashes:14,bitArray:[1,0,0,1,e,r,r,e,r,r,r,e,e,e,e,e,r,e,r,r,e,r,e,r,e,r,e,e,e,e,e,r,e,r,e,e,e,r,r,r,e,r,e,e,e,r,e,e,r,r,r,e,r,r,r,r,r,r,e,e,r,e,r,r,r,e,r,r,e,e,r,e,r,e,e,e,e,r,e,r,r,e,e,r,r,e,r,e,r,r,e,e,e,e,r,r,r,r,r,r,r,r,r,r,e,e,r,e,e,e,e,r,e,e,e,e,r,r,e,e,e,e,e,r,r,r,r,r,r,e,e,e,r,r,r,e,e,r,r,e,e,e,e,r,e,r,r,r,r,e,e,e,e,e,e,e,e,e,r,e,e,e,r,r,r,e,e,e,r,r,e,r,r,r,e,e,e,r,e,r,e,r,e,r,r,r,r,r,r,e,e,r]},__routerFilterDynamic:{numItems:r,errorRate:1e-4,numBits:r,numHashes:null,bitArray:[]},"/_error":["static/chunks/pages/_error-310ed5880fd5d5e6.js"],sortedPages:["/_app","/_error"]}}(1,0,1e-4),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -0,0 +1 @@
1
+ self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[322],{3:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8154).A)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},1135:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return u},formatWithValidation:function(){return i},urlObjectKeys:function(){return a}});let n=r(8520)._(r(6042)),o=/https?|ftp|gopher|file/;function u(e){let{auth:t,hostname:r}=e,u=e.protocol||"",a=e.pathname||"",i=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(n.urlQueryToSearchParams(l)));let f=e.search||l&&"?"+l||"";return u&&!u.endsWith(":")&&(u+=":"),e.slashes||(!u||o.test(u))&&!1!==c?(c="//"+(c||""),a&&"/"!==a[0]&&(a="/"+a)):c||(c=""),i&&"#"!==i[0]&&(i="#"+i),f&&"?"!==f[0]&&(f="?"+f),""+u+c+(a=a.replace(/[?#]/g,encodeURIComponent))+(f=f.replace("#","%23"))+i}let a=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function i(e){return u(e)}},5269:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return m},NormalizeError:function(){return y},PageNotFoundError:function(){return g},SP:function(){return p},ST:function(){return d},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return a},getURL:function(){return i},isAbsoluteUrl:function(){return u},isResSent:function(){return c},loadGetInitialProps:function(){return s},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return v}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),u=0;u<n;u++)o[u]=arguments[u];return r||(r=!0,t=e(...o)),t}}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>o.test(e);function a(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function i(){let{href:e}=window.location,t=a();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function c(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function s(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await s(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&c(r))return n;if(!n)throw Object.defineProperty(Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.'),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let p="undefined"!=typeof performance,d=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class y extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class m extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},6042:(e,t)=>{function r(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function n(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e))if(Array.isArray(o))for(let e of o)t.append(r,n(e));else t.set(r,n(o));return t}function u(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(let t of r){for(let r of t.keys())e.delete(r);for(let[r,n]of t.entries())e.append(r,n)}return e}Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{assign:function(){return u},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}})},6424:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=r(4166);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=u(e,n)),t&&(o.current=u(t,n))},[e,t])}function u(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8154:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(4166);let o=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var u={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:c="",children:f,iconNode:s,...p}=e;return(0,n.createElement)("svg",{ref:t,...u,width:a,height:a,stroke:r,strokeWidth:l?24*Number(i)/Number(a):i,className:o("lucide",c),...p},[...s.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(f)?f:[f]])}),i=(e,t)=>{let r=(0,n.forwardRef)((r,u)=>{let{className:i,...l}=r;return(0,n.createElement)(a,{ref:u,iconNode:t,className:o("lucide-".concat(e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),i),...l})});return r.displayName="".concat(e),r}},8945:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},8968:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return g},useLinkStatus:function(){return b}});let n=r(8520),o=r(534),u=n._(r(4166)),a=r(1135),i=r(5633),l=r(6424),c=r(5269),f=r(9891);r(2920);let s=r(5352),p=r(9522),d=r(7784);r(8945);let h=r(1339);function y(e){return"string"==typeof e?e:(0,a.formatUrl)(e)}function g(e){var t;let r,n,a,[g,b]=(0,u.useOptimistic)(s.IDLE_LINK_STATUS),v=(0,u.useRef)(null),{href:P,as:_,children:E,prefetch:O=null,passHref:j,replace:k,shallow:N,scroll:w,onClick:x,onMouseEnter:A,onTouchStart:C,legacyBehavior:S=!1,onNavigate:M,ref:T,unstable_dynamicOnHover:L,...R}=e;r=E,S&&("string"==typeof r||"number"==typeof r)&&(r=(0,o.jsx)("a",{children:r}));let I=u.default.useContext(i.AppRouterContext),U=!1!==O,F=!1!==O?null===(t=O)||"auto"===t?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,{href:D,as:B}=u.default.useMemo(()=>{let e=y(P);return{href:e,as:_?y(_):e}},[P,_]);S&&(n=u.default.Children.only(r));let K=S?n&&"object"==typeof n&&n.ref:T,z=u.default.useCallback(e=>(null!==I&&(v.current=(0,s.mountLinkInstance)(e,D,I,F,U,b)),()=>{v.current&&((0,s.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,s.unmountPrefetchableInstance)(e)}),[U,D,I,F,b]),W={ref:(0,l.useMergedRef)(z,K),onClick(e){S||"function"!=typeof x||x(e),S&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),I&&(e.defaultPrevented||function(e,t,r,n,o,a,i){let{nodeName:l}=e.currentTarget;if(!("A"===l.toUpperCase()&&function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||e.currentTarget.hasAttribute("download"))){if(!(0,p.isLocalURL)(t)){o&&(e.preventDefault(),location.replace(t));return}if(e.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}u.default.startTransition(()=>{(0,d.dispatchNavigateAction)(r||t,o?"replace":"push",null==a||a,n.current)})}}(e,D,B,v,k,w,M))},onMouseEnter(e){S||"function"!=typeof A||A(e),S&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),I&&U&&(0,s.onNavigationIntent)(e.currentTarget,!0===L)},onTouchStart:function(e){S||"function"!=typeof C||C(e),S&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),I&&U&&(0,s.onNavigationIntent)(e.currentTarget,!0===L)}};return(0,c.isAbsoluteUrl)(B)?W.href=B:S&&!j&&("a"!==n.type||"href"in n.props)||(W.href=(0,f.addBasePath)(B)),a=S?u.default.cloneElement(n,W):(0,o.jsx)("a",{...R,...W,children:r}),(0,o.jsx)(m.Provider,{value:g,children:a})}let m=(0,u.createContext)(s.IDLE_LINK_STATUS),b=()=>(0,u.useContext)(m);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9522:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return u}});let n=r(5269),o=r(2980);function u(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[432],{647:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8154).A)("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},2087:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8154).A)("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]])},4193:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8154).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},4195:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8154).A)("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},5689:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8154).A)("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]])},7413:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8154).A)("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]])},8530:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8154).A)("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]])},8785:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8154).A)("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]])},9061:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return m},handleClientScriptLoad:function(){return y},initScriptLoader:function(){return p}});let n=r(403),a=r(8520),l=r(534),i=n._(r(7763)),d=a._(r(4166)),c=r(9036),o=r(996),s=r(9232),u=new Map,f=new Set,h=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:a=null,dangerouslySetInnerHTML:l,children:d="",strategy:c="afterInteractive",onError:s,stylesheets:h}=e,y=r||t;if(y&&f.has(y))return;if(u.has(t)){f.add(y),u.get(t).then(n,s);return}let p=()=>{a&&a(),f.add(y)},k=document.createElement("script"),m=new Promise((e,t)=>{k.addEventListener("load",function(t){e(),n&&n.call(this,t),p()}),k.addEventListener("error",function(e){t(e)})}).catch(function(e){s&&s(e)});l?(k.innerHTML=l.__html||"",p()):d?(k.textContent="string"==typeof d?d:Array.isArray(d)?d.join(""):"",p()):t&&(k.src=t,u.set(t,m)),(0,o.setAttributesFromProps)(k,e),"worker"===c&&k.setAttribute("type","text/partytown"),k.setAttribute("data-nscript",c),h&&(e=>{if(i.default.preinit)return e.forEach(e=>{i.default.preinit(e,{as:"style"})});{let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}})(h),document.body.appendChild(k)};function y(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,s.requestIdleCallback)(()=>h(e))}):h(e)}function p(e){e.forEach(y),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");f.add(t)})}function k(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:a=null,strategy:o="afterInteractive",onError:u,stylesheets:y,...p}=e,{updateScripts:k,scripts:m,getIsSsr:g,appDir:_,nonce:b}=(0,d.useContext)(c.HeadManagerContext);b=p.nonce||b;let v=(0,d.useRef)(!1);(0,d.useEffect)(()=>{let e=t||r;v.current||(a&&e&&f.has(e)&&a(),v.current=!0)},[a,t,r]);let x=(0,d.useRef)(!1);if((0,d.useEffect)(()=>{if(!x.current){if("afterInteractive"===o)h(e);else"lazyOnload"===o&&("complete"===document.readyState?(0,s.requestIdleCallback)(()=>h(e)):window.addEventListener("load",()=>{(0,s.requestIdleCallback)(()=>h(e))}));x.current=!0}},[e,o]),("beforeInteractive"===o||"worker"===o)&&(k?(m[o]=(m[o]||[]).concat([{id:t,src:r,onLoad:n,onReady:a,onError:u,...p,nonce:b}]),k(m)):g&&g()?f.add(t||r):g&&!g()&&h({...e,nonce:b})),_){if(y&&y.forEach(e=>{i.default.preinit(e,{as:"style"})}),"beforeInteractive"===o)if(!r)return p.dangerouslySetInnerHTML&&(p.children=p.dangerouslySetInnerHTML.__html,delete p.dangerouslySetInnerHTML),(0,l.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...p,id:t}])+")"}});else return i.default.preload(r,p.integrity?{as:"script",integrity:p.integrity,nonce:b,crossOrigin:p.crossOrigin}:{as:"script",nonce:b,crossOrigin:p.crossOrigin}),(0,l.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r,{...p,id:t}])+")"}});"afterInteractive"===o&&r&&i.default.preload(r,p.integrity?{as:"script",integrity:p.integrity,nonce:b,crossOrigin:p.crossOrigin}:{as:"script",nonce:b,crossOrigin:p.crossOrigin})}return null}Object.defineProperty(k,"__nextScript",{value:!0});let m=k;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9197:(e,t,r)=>{var n=r(4841);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},9232:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cancelIdleCallback:function(){return n},requestIdleCallback:function(){return r}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[447],{6447:(e,t,s)=>{s.r(t),s.d(t,{BottomPanels:()=>em,Chat:()=>ea,ChatInput:()=>ei,ChatMessage:()=>er,ChatMessages:()=>el,FileBrowser:()=>eu,FileTree:()=>ex,Playground:()=>ev,PlaygroundHeader:()=>et,PlaygroundProvider:()=>y,SessionHistory:()=>eo,StatusIndicator:()=>ee,Terminal:()=>ed,ThinkingBlock:()=>es,ToolCallBlock:()=>en,buildFileTree:()=>d,cn:()=>a,formatBytes:()=>o,formatTime:()=>c,getFileLanguage:()=>m,isImageFile:()=>u,parseContentBlocks:()=>function e(t){let s=null;if("string"==typeof t)try{let n=JSON.parse(t);if(Array.isArray(n))s=n;else if(n&&"object"==typeof n)return e(h(n))}catch(e){return{text:t,toolCalls:[],thinking:[]}}else if(Array.isArray(t))s=t;else if(t&&"object"==typeof t)return e(h(t));if(!s)return{text:"string"==typeof t?t:"",toolCalls:[],thinking:[]};let n="",r=[],l=[];for(let e of s){let t=e;if("text"===t.type&&"string"==typeof t.text)n+=(n?"\n":"")+t.text;else if("tool_use"===t.type)r.push({id:t.id||"tool-".concat(r.length),name:t.name||"unknown",input:t.input,state:"completed"});else if("tool_result"===t.type){let e=r.find(e=>e.id===t.tool_use_id);if(e){var i;e.output=t.content,e.isError=null!=(i=t.is_error)&&i,e.state=t.is_error?"error":"completed"}}else if("thinking"===t.type){let e=t.thinking||t.text||"";e&&l.push(e)}}return{text:n,toolCalls:r,thinking:l}},useAgents:()=>g,useFileBrowser:()=>eg,useFileUpload:()=>j,useHealthCheck:()=>f,usePlaygroundChat:()=>p,usePlaygroundContext:()=>b,useSessions:()=>w,useTerminal:()=>ep});var n=s(6862),r=s(3690),l=s(4166),i=s(534);function a(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,r.QP)((0,n.$)(t))}function o(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(1))+" "+["B","KB","MB","GB"][t]}function c(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"})}function d(e){let t=[];for(let s of e){let e=s.path.split("/"),n=t;for(let t=0;t<e.length;t++){let r=e[t],l=t===e.length-1,i=e.slice(0,t+1).join("/"),a=n.find(e=>e.name===r&&!l===e.isDir);a||(a={name:r,path:i,isDir:!l,size:l?s.size:void 0,modifiedAt:l?s.modifiedAt:void 0,children:[]},n.push(a)),n=a.children}}return!function e(t){for(let s of(t.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)),t))s.children.length>0&&e(s.children)}(t),t}function h(e){if(e.message&&"object"==typeof e.message){let t=e.message;if(Array.isArray(t.content))return t.content}return Array.isArray(e.content)||"string"==typeof e.content?e.content:"string"==typeof e.result?e.result:""}var x=new Set(["png","jpg","jpeg","gif","svg","webp","ico"]);function u(e){var t;let s=null==(t=e.split(".").pop())?void 0:t.toLowerCase();return x.has(s||"")}function m(e){var t;return({ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",py:"python",rs:"rust",go:"go",rb:"ruby",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",md:"markdown",sh:"bash",bash:"bash",css:"css",html:"html",sql:"sql",xml:"xml"})[(null==(t=e.split(".").pop())?void 0:t.toLowerCase())||""]||"text"}function p(e){let{client:t,agentSlug:s,initialSessionId:n,onSessionStart:r,onError:i}=e,[a,o]=(0,l.useState)([]),[c,d]=(0,l.useState)(""),[h,x]=(0,l.useState)(!1),[u,m]=(0,l.useState)(!1),[p,g]=(0,l.useState)(null),[w,f]=(0,l.useState)(null!=n?n:null),[j,v]=(0,l.useState)([]),b=(0,l.useRef)(!1),y=(0,l.useCallback)(()=>{f(null),o([]),v([]),g(null)},[]),N=(0,l.useCallback)(async e=>{f(e),m(!0),g(null);try{let i=await t.listMessages(e),a=[];for(let e=0;e<i.length;e++){var s,n,r,l;let t,o=i[e],c="",d=[];try{t=JSON.parse(o.content)}catch(e){t=o.content}let h=t;if("assistant"===h.type&&Array.isArray(null==(s=h.message)?void 0:s.content))for(let e of h.message.content)"text"===e.type&&e.text?c+=(c?"\n":"")+e.text:"tool_use"===e.type&&d.push({id:e.id||"tool-".concat(d.length),name:e.name||"unknown",input:e.input,state:"completed"});if("user"===h.type&&h.tool_use_result){let e=h.tool_use_result,t=d.find(t=>t.id===e.tool_use_id)||(a.length>0?null==(n=a[a.length-1].toolCalls)?void 0:n.find(t=>t.id===e.tool_use_id):void 0);t&&(t.output=null!=(r=e.stdout)?r:e.content,t.isError=null!=(l=e.is_error)&&l,t.state=e.is_error?"error":"completed");continue}if("user"===h.type&&!h.tool_use_result){let t=Array.isArray(h.content)?h.content.filter(e=>"text"===e.type).map(e=>e.text).join("\n"):"string"==typeof h.content?h.content:"";t&&a.push({id:o.id||"msg-".concat(e),role:"user",content:t,timestamp:o.createdAt});continue}"result"===h.type&&"string"==typeof h.result&&(c=h.result),(c||d.length>0)&&a.push({id:o.id||"msg-".concat(e),role:"user"===o.role?"user":"assistant",content:c,toolCalls:d.length>0?d:void 0,timestamp:o.createdAt})}o(a)}catch(e){o([{id:"err",role:"system",content:"Failed to load session messages."}])}finally{m(!1)}},[t]),k=(0,l.useCallback)(async()=>{let e=c.trim(),n=j.filter(e=>!e.uploading);if(!e&&0===n.length||!s||b.current)return;let l=e;if(n.length>0){let e=n.map(e=>"[Attached file: ".concat(e.filename,"](").concat(e.url,")")).join("\n");l=l?"".concat(l,"\n\n").concat(e):e}let a=w;if(!a){x(!0),b.current=!0,g(null);try{a=(await t.createSession(s)).id,f(a),null==r||r(a)}catch(t){let e=t instanceof Error?t.message:"Failed to create session";g(e),null==i||i(e),x(!1),b.current=!1;return}}d(""),v([]);let h={id:"user-".concat(Date.now()),role:"user",content:l,timestamp:new Date().toISOString()};o(e=>[...e,h]),x(!0),b.current=!0;let u="assistant-".concat(Date.now());o(e=>[...e,{id:u,role:"assistant",content:"",isStreaming:!0}]);try{let e="",s=[];for await(let n of t.sendMessageStream(a,l,{includePartialMessages:!0})){var m,p,y;if("text_delta"===n.type){let t=n.data.delta||"";e+=t,o(t=>t.map(t=>t.id===u?{...t,content:e,toolCalls:[...s],isStreaming:!0}:t))}else if("tool_use"===n.type){let t=n.data,r={id:t.id||"tool-".concat(Date.now(),"-").concat(s.length),name:t.name||"unknown",input:t.input,state:"running"};s.push(r),o(t=>t.map(t=>t.id===u?{...t,content:e,toolCalls:[...s],isStreaming:!0}:t))}else if("tool_result"===n.type){let t=n.data,r=s.findIndex(e=>e.id===t.tool_use_id);-1!==r?s[r]={...s[r],output:t.content,isError:null!=(m=t.is_error)&&m,state:t.is_error?"error":"completed"}:s.push({id:t.tool_use_id||"result-".concat(Date.now()),name:"tool_result",input:void 0,output:t.content,isError:null!=(p=t.is_error)&&p,state:t.is_error?"error":"completed"}),o(t=>t.map(t=>t.id===u?{...t,content:e,toolCalls:[...s],isStreaming:!0}:t))}else if("turn_complete"===n.type||"done"===n.type){let t=n.data;for(let n of(!e&&t.result&&(e=t.result),s))("running"===n.state||"pending"===n.state)&&(n.state="completed");o(t=>t.map(t=>t.id===u?{...t,content:e||"(no response)",toolCalls:[...s],isStreaming:!1,timestamp:new Date().toISOString()}:t))}else if("message"===n.type){let t=n.data;if("assistant"===t.type&&Array.isArray(null==(y=t.message)?void 0:y.content)){let n="";for(let e of t.message.content)"text"===e.type&&e.text&&(n+=(n?"\n":"")+e.text);n&&(e=n,o(t=>t.map(t=>t.id===u?{...t,content:e,toolCalls:[...s],isStreaming:!0}:t)))}}else if("error"===n.type){let e=n.data.error||"Unknown error";o(t=>t.map(t=>t.id===u?{...t,role:"system",content:"Error: ".concat(e),isStreaming:!1}:t))}}if(e||s.length>0){for(let e of s)("running"===e.state||"pending"===e.state)&&(e.state="completed");o(t=>t.map(t=>t.id===u&&t.isStreaming?{...t,content:e||"(no response)",toolCalls:s.length>0?[...s]:void 0,isStreaming:!1,timestamp:new Date().toISOString()}:t))}}catch(t){let e=t instanceof Error?t.message:"Failed to send";o(t=>t.map(t=>t.id===u?{...t,role:"system",content:"Error: ".concat(e),isStreaming:!1}:t))}finally{x(!1),b.current=!1}},[c,j,w,s,t,r,i]);return{messages:a,input:c,setInput:d,sending:h,loading:u,error:p,sessionId:w,attachedFiles:j,setAttachedFiles:v,send:k,loadSession:N,startNewChat:y,setMessages:o}}function g(e){let{client:t}=e,[s,n]=(0,l.useState)([]),[r,i]=(0,l.useState)(!0),[a,o]=(0,l.useState)(null),c=async()=>{i(!0),o(null);try{let e=await t.listAgents();n(e)}catch(e){o(e instanceof Error?e.message:"Failed to fetch agents")}finally{i(!1)}};return(0,l.useEffect)(()=>{c()},[]),{agents:s,loading:r,error:a,refresh:c}}function w(e){let{client:t,agent:s,limit:n=20,enabled:r=!0}=e,[i,a]=(0,l.useState)([]),[o,c]=(0,l.useState)(!1),[d,h]=(0,l.useState)(null),x=(0,l.useCallback)(async()=>{c(!0),h(null);try{let e=await t.listSessions({agent:s,limit:n});a(e)}catch(e){h(e instanceof Error?e.message:"Failed to fetch sessions")}finally{c(!1)}},[t,s,n]);return(0,l.useEffect)(()=>{r&&x()},[r,x]),{sessions:i,loading:o,error:d,refresh:x}}function f(e){let{client:t}=e,[s,n]=(0,l.useState)(null),r=async()=>{try{await t.health(),n(!0)}catch(e){n(!1)}};return(0,l.useEffect)(()=>{r()},[]),{connected:s,refresh:r}}function j(e){let{client:t,onFilesChange:s,onError:n}=e;return{handleFileSelect:(0,l.useCallback)(async e=>{let r=e.target.files;if(r&&0!==r.length){for(let e of Array.from(r)){let r="uploading-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2));s(t=>[...t,{id:r,filename:e.name,url:"",uploading:!0}]);try{let n=await new Promise((t,s)=>{let n=new FileReader;n.onload=()=>{let e=n.result;t(e.split(",")[1])},n.onerror=()=>s(Error("Failed to read file")),n.readAsDataURL(e)}),l=await t.uploadFile({filename:e.name,content:n,mimeType:e.type||void 0,ttl:"24h"}),i=await t.getFileUrl(l.id);s(t=>t.map(t=>t.id===r?{id:l.id,filename:e.name,url:i,uploading:!1}:t))}catch(t){s(e=>e.filter(e=>e.id!==r)),null==n||n("Failed to upload ".concat(e.name))}}e.target.value=""}},[t,s,n]),removeFile:(0,l.useCallback)(e=>{s(t=>t.filter(t=>t.id!==e))},[s])}}var v=(0,l.createContext)(null);function b(){let e=(0,l.useContext)(v);if(!e)throw Error("usePlaygroundContext must be used within <PlaygroundProvider>");return e}function y(e){var t,s;let{client:n,defaultAgent:r,children:a}=e,[o,c]=(0,l.useState)(r||""),[d,h]=(0,l.useState)(!1),[x,u]=(0,l.useState)(!1),[m,b]=(0,l.useState)(!1),y=g({client:n}),N=f({client:n}),k=o||(null==(t=y.agents[0])?void 0:t.slug)||(null==(s=y.agents[0])?void 0:s.name)||"",C=p({client:n,agentSlug:k}),S=w({client:n,agent:k,enabled:d}),L=j({client:n,onFilesChange:C.setAttachedFiles,onError:e=>{C.setMessages(t=>[...t,{id:"err-".concat(Date.now()),role:"system",content:e}])}}),M=(0,l.useCallback)(e=>{c(e),C.startNewChat()},[C]);return(0,i.jsx)(v.Provider,{value:{client:n,chat:C,agents:y,sessions:S,health:N,fileUpload:L,selectedAgent:k,setSelectedAgent:M,showHistory:d,setShowHistory:h,terminalOpen:x,setTerminalOpen:u,filesOpen:m,setFilesOpen:b},children:a})}function N(e,t){return s=>{var n;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:null!=(n=null==t?void 0:t.viewBox)?n:"0 0 24 24",fill:(null==t?void 0:t.fill)?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...s,children:(0,i.jsx)("path",{d:e})})}}var k=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}),(0,i.jsx)("path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}),(0,i.jsx)("path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}),(0,i.jsx)("path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}),(0,i.jsx)("path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}),(0,i.jsx)("path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}),(0,i.jsx)("path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}),(0,i.jsx)("path",{d:"M6 18a4 4 0 0 1-1.967-.516"}),(0,i.jsx)("path",{d:"M19.967 17.484A4 4 0 0 1 18 18"})]}),C=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M12 8V4H8"}),(0,i.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,i.jsx)("path",{d:"M2 14h2"}),(0,i.jsx)("path",{d:"M20 14h2"}),(0,i.jsx)("path",{d:"M15 13v2"}),(0,i.jsx)("path",{d:"M9 13v2"})]}),S=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}),(0,i.jsx)("circle",{cx:"12",cy:"7",r:"4"})]}),L=N("m22 2-7 20-4-9-9-4Z M22 2 11 13"),M=e=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,i.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),F=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("polyline",{points:"4 17 10 11 4 5"}),(0,i.jsx)("line",{x1:"12",x2:"20",y1:"19",y2:"19"})]}),A=e=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,i.jsx)("path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"})}),B=e=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,i.jsx)("path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"})}),D=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),(0,i.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),(0,i.jsx)("path",{d:"M10 9H8"}),(0,i.jsx)("path",{d:"M16 13H8"}),(0,i.jsx)("path",{d:"M16 17H8"})]}),_=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),(0,i.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),(0,i.jsx)("path",{d:"m10 13-2 2 2 2"}),(0,i.jsx)("path",{d:"m14 17 2-2-2-2"})]}),E=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),(0,i.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),(0,i.jsx)("path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1"}),(0,i.jsx)("path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1"})]}),H=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),(0,i.jsx)("circle",{cx:"9",cy:"9",r:"2"}),(0,i.jsx)("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]}),W=e=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,i.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),I=N("m6 9 6 6 6-6"),T=N("m18 15-6-6-6 6"),P=N("m9 18 6-6-6-6"),R=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M5 12h14"}),(0,i.jsx)("path",{d:"M12 5v14"})]}),O=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M18 6 6 18"}),(0,i.jsx)("path",{d:"m6 6 12 12"})]}),V=N("m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"),U=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,i.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),Z=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M12 20h.01"}),(0,i.jsx)("path",{d:"M2 8.82a15 15 0 0 1 20 0"}),(0,i.jsx)("path",{d:"M5 12.859a10 10 0 0 1 14 0"}),(0,i.jsx)("path",{d:"M8.5 16.429a5 5 0 0 1 7 0"})]}),z=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M12 20h.01"}),(0,i.jsx)("path",{d:"M8.5 16.429a5 5 0 0 1 7 0"}),(0,i.jsx)("path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69"}),(0,i.jsx)("path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523"}),(0,i.jsx)("path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643"}),(0,i.jsx)("path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764"}),(0,i.jsx)("path",{d:"m2 2 20 20"})]}),J=e=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,i.jsx)("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),K=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,i.jsx)("path",{d:"m9 12 2 2 4-4"})]}),q=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,i.jsx)("path",{d:"m15 9-6 6"}),(0,i.jsx)("path",{d:"m9 9 6 6"})]}),G=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,i.jsx)("path",{d:"m21 21-4.3-4.3"})]}),Q=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M3 6h18"}),(0,i.jsx)("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),(0,i.jsx)("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}),(0,i.jsx)("line",{x1:"10",x2:"10",y1:"11",y2:"17"}),(0,i.jsx)("line",{x1:"14",x2:"14",y1:"11",y2:"17"})]}),Y=N("M12 5v14 m7-7-7 7-7-7"),$=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,i.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,i.jsx)("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]}),X=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),(0,i.jsx)("path",{d:"M21 3v5h-5"}),(0,i.jsx)("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),(0,i.jsx)("path",{d:"M8 16H3v5"})]});function ee(e){let{connected:t,className:s}=e;return null===t?null:(0,i.jsx)("div",{className:a("flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[10px] font-medium border",t?"bg-green-500/10 text-green-400 border-green-500/20":"bg-red-500/10 text-red-400 border-red-500/20",s),children:t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Z,{className:"h-3 w-3"})," Runtime connected"]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(z,{className:"h-3 w-3"})," Runtime disconnected"]})})}function et(e){let{agents:t,selectedAgent:s,onAgentChange:n,runtimeConnected:r,showHistory:l,onToggleHistory:o,sessionId:c,onNewChat:d,className:h}=e;return(0,i.jsxs)("div",{className:a("shrink-0 flex items-center justify-between border-b border-white/10 pb-3 mb-4",h),children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 text-xs font-medium text-white/40 uppercase tracking-wider",children:[(0,i.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-accent animate-pulse"}),"PLAYGROUND"]}),(0,i.jsxs)("select",{value:s,onChange:e=>n(e.target.value),className:"rounded-lg border border-white/10 bg-white/5 px-3 py-1.5 text-sm text-white focus:border-accent/50 focus:outline-none",children:[(0,i.jsx)("option",{value:"",disabled:!0,children:"Select agent..."}),t.map(e=>(0,i.jsx)("option",{value:e.slug||e.name,children:e.name},e.id))]}),(0,i.jsx)(ee,{connected:r})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)("button",{onClick:o,className:a("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-all",l?"bg-accent/10 text-accent border-accent/30":"bg-white/5 text-white/50 border-white/10 hover:bg-white/10"),children:[(0,i.jsx)(U,{className:"h-3 w-3"}),"History"]}),s&&(0,i.jsxs)("button",{onClick:d,className:a("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-all",c?"bg-white/5 text-white/50 border-white/10 hover:bg-white/10":"bg-accent/10 text-accent border-accent/30"),children:[(0,i.jsx)(R,{className:"h-3 w-3"}),"New Chat"]})]})]})}function es(e){let{thinking:t}=e,[s,n]=(0,l.useState)(!1),r=t.join("\n\n");return(0,i.jsxs)("div",{className:"my-2 rounded-lg border border-amber-500/20 bg-amber-500/[0.03] overflow-hidden",children:[(0,i.jsxs)("button",{onClick:()=>n(!s),className:"flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-amber-500/5 transition-colors",children:[(0,i.jsx)(k,{className:"h-3.5 w-3.5 shrink-0 text-amber-500/60"}),(0,i.jsx)("span",{className:"text-xs font-medium text-amber-400/70",children:"Thinking"}),(0,i.jsx)("span",{className:"ml-auto flex items-center gap-1.5",children:s?(0,i.jsx)(I,{className:"h-3 w-3 text-white/30"}):(0,i.jsx)(P,{className:"h-3 w-3 text-white/30"})})]}),s&&(0,i.jsx)("div",{className:"border-t border-amber-500/10 px-3 py-2",children:(0,i.jsx)("pre",{className:"whitespace-pre-wrap text-xs text-white/50 leading-relaxed max-h-96 overflow-y-auto",children:r})})]})}function en(e){let{tool:t}=e,[s,n]=(0,l.useState)(!1),r="running"===t.state||"pending"===t.state,o="error"===t.state,c="completed"===t.state;return(0,i.jsxs)("div",{className:"my-2 rounded-lg border border-white/10 bg-white/[0.03] overflow-hidden",children:[(0,i.jsxs)("button",{onClick:()=>n(!s),className:"flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-white/5 transition-colors",children:[(0,i.jsx)(J,{className:"h-3.5 w-3.5 shrink-0 text-white/40"}),(0,i.jsx)("span",{className:"text-xs font-medium text-white/70 truncate",children:t.name}),(0,i.jsxs)("span",{className:"ml-auto flex items-center gap-1.5",children:[r&&(0,i.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-blue-500/10 border border-blue-500/20 px-2 py-0.5 text-[10px] font-medium text-blue-400",children:[(0,i.jsx)(W,{className:"h-3 w-3 animate-spin"}),"Running"]}),c&&(0,i.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-green-500/10 border border-green-500/20 px-2 py-0.5 text-[10px] font-medium text-green-400",children:[(0,i.jsx)(K,{className:"h-3 w-3"}),"Done"]}),o&&(0,i.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-red-500/10 border border-red-500/20 px-2 py-0.5 text-[10px] font-medium text-red-400",children:[(0,i.jsx)(q,{className:"h-3 w-3"}),"Error"]}),s?(0,i.jsx)(I,{className:"h-3 w-3 text-white/30"}):(0,i.jsx)(P,{className:"h-3 w-3 text-white/30"})]})]}),s&&(0,i.jsxs)("div",{className:"border-t border-white/10 px-3 py-2 space-y-2",children:[null!=t.input&&(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"text-[10px] font-medium text-white/30 uppercase tracking-wider mb-1",children:"Input"}),(0,i.jsx)("pre",{className:"rounded-md bg-black/30 px-3 py-2 text-[11px] text-white/60 overflow-x-auto max-h-48 scrollbar-thin",children:"string"==typeof t.input?t.input:JSON.stringify(t.input,null,2)})]}),null!=t.output&&(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"text-[10px] font-medium text-white/30 uppercase tracking-wider mb-1",children:o?"Error":"Output"}),(0,i.jsx)("pre",{className:a("rounded-md px-3 py-2 text-[11px] overflow-x-auto max-h-64 scrollbar-thin",o?"bg-red-500/10 text-red-400":"bg-black/30 text-white/60"),children:"string"==typeof t.output?t.output:JSON.stringify(t.output,null,2)})]})]})]})}function er(e){var t;let{message:s}=e,n="user"===s.role;return"system"===s.role?(0,i.jsx)("div",{className:"flex justify-center",children:(0,i.jsx)("span",{className:"max-w-lg rounded-xl bg-red-500/10 border border-red-500/20 px-4 py-2 text-xs text-red-400",children:s.content})}):(0,i.jsxs)("div",{className:a("flex gap-3",n?"flex-row-reverse":"flex-row"),children:[(0,i.jsx)("div",{className:a("flex h-8 w-8 shrink-0 items-center justify-center rounded-full",n?"bg-accent/20":"bg-white/10"),children:n?(0,i.jsx)(S,{className:"h-4 w-4 text-accent"}):(0,i.jsx)(C,{className:"h-4 w-4 text-white/60"})}),(0,i.jsxs)("div",{className:a("max-w-[75%] rounded-2xl px-4 py-2.5",n?"bg-accent/10 border border-accent/20 text-white":"bg-white/5 border border-white/10 text-white/80"),children:[s.thinking&&s.thinking.length>0&&(0,i.jsx)(es,{thinking:s.thinking}),s.content&&(0,i.jsxs)("div",{className:"whitespace-pre-wrap text-sm leading-relaxed",children:[s.content,s.isStreaming&&!(null==(t=s.toolCalls)?void 0:t.some(e=>"running"===e.state))&&(0,i.jsx)("span",{className:"ml-1 inline-block h-4 w-0.5 animate-pulse bg-accent align-text-bottom"})]}),s.toolCalls&&s.toolCalls.length>0&&(0,i.jsxs)("div",{className:a(s.content&&"mt-2"),children:[s.toolCalls.map(e=>(0,i.jsx)(en,{tool:e},e.id)),s.isStreaming&&s.toolCalls.some(e=>"running"===e.state)&&(0,i.jsx)("span",{className:"ml-1 inline-block h-4 w-0.5 animate-pulse bg-accent align-text-bottom"})]}),s.isStreaming&&!s.content&&(!s.toolCalls||0===s.toolCalls.length)&&(0,i.jsx)("span",{className:"inline-block h-4 w-0.5 animate-pulse bg-accent align-text-bottom"}),s.timestamp&&(0,i.jsx)("div",{className:"mt-1 text-right text-xs text-white/30",children:c(s.timestamp)})]})]})}function el(e){let{messages:t,className:s}=e,n=(0,l.useRef)(null);return(0,l.useEffect)(()=>{n.current&&n.current.scrollTo({top:n.current.scrollHeight,behavior:"smooth"})},[t]),(0,i.jsx)("div",{ref:n,className:null!=s?s:"flex-1 overflow-auto p-4 space-y-3 scrollbar-thin",children:0===t.length?(0,i.jsxs)("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[(0,i.jsx)(M,{className:"mb-3 h-8 w-8 text-white/20"}),(0,i.jsx)("p",{className:"text-sm text-white/40",children:"No messages yet"}),(0,i.jsx)("p",{className:"mt-1 text-xs text-white/30",children:"Send a message to start the conversation"})]}):t.map(e=>(0,i.jsx)(er,{message:e},e.id))})}function ei(e){let{input:t,onInputChange:s,onSend:n,sending:r,disabled:o,placeholder:c="Send a message...",attachedFiles:d=[],onFileSelect:h,onRemoveFile:x,className:u}=e,m=(0,l.useRef)(null),p=(0,l.useRef)(null),g=d.filter(e=>!e.uploading),w=(t.trim()||g.length>0)&&!r&&!o;return(0,i.jsxs)("div",{className:a("shrink-0 border-t border-white/10 p-4",u),children:[d.length>0&&(0,i.jsx)("div",{className:"mb-2 flex flex-wrap gap-2",children:d.map(e=>(0,i.jsxs)("div",{className:a("flex items-center gap-1.5 rounded-lg border px-2.5 py-1 text-xs",e.uploading?"border-white/10 bg-white/5 text-white/40":"border-accent/20 bg-accent/5 text-accent"),children:[e.uploading?(0,i.jsx)(W,{className:"h-3 w-3 animate-spin"}):(0,i.jsx)(V,{className:"h-3 w-3"}),(0,i.jsx)("span",{className:"max-w-[180px] truncate",children:e.filename}),!e.uploading&&x&&(0,i.jsx)("button",{onClick:()=>x(e.id),className:"ml-0.5 rounded-full p-0.5 hover:bg-white/10 transition-colors",children:(0,i.jsx)(O,{className:"h-3 w-3"})})]},e.id))}),(0,i.jsxs)("div",{className:"flex items-end gap-3",children:[h&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("input",{ref:p,type:"file",multiple:!0,onChange:h,className:"hidden"}),(0,i.jsx)("button",{onClick:()=>{var e;return null==(e=p.current)?void 0:e.click()},disabled:r||o,className:a("flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border transition-colors","border-white/10 bg-white/5 text-white/40 hover:bg-white/10 hover:text-white/60",(r||o)&&"opacity-50 cursor-not-allowed"),title:"Attach files",children:(0,i.jsx)(V,{className:"h-4 w-4"})})]}),(0,i.jsx)("textarea",{ref:m,value:t,onChange:e=>{s(e.target.value);let t=e.target;t.style.height="auto",t.style.height=Math.min(t.scrollHeight,160)+"px"},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),n())},placeholder:c,rows:1,className:a("w-full resize-none rounded-xl border bg-white/5 px-4 py-3 text-sm text-white","border-white/10 placeholder:text-white/40","focus:border-accent/50 focus:outline-none focus:ring-0")}),(0,i.jsx)("button",{onClick:n,disabled:!w,className:a("flex h-11 w-11 shrink-0 items-center justify-center rounded-xl transition-colors",w?"bg-accent text-white hover:bg-accent/90":"bg-white/5 text-white/20 cursor-not-allowed"),children:r?(0,i.jsx)(W,{className:"h-4 w-4 animate-spin"}):(0,i.jsx)(L,{className:"h-4 w-4"})})]})]})}function ea(e){let{messages:t,input:s,onInputChange:n,onSend:r,sending:l,loading:o,error:c,isActive:d,agentName:h,attachedFiles:x,onFileSelect:u,onRemoveFile:m,className:p}=e;return(0,i.jsxs)("div",{className:a("flex flex-col overflow-hidden",p),children:[o?(0,i.jsxs)("div",{className:"flex flex-1 items-center justify-center",children:[(0,i.jsx)(W,{className:"mr-2 h-5 w-5 animate-spin text-white/40"}),(0,i.jsx)("span",{className:"text-sm text-white/50",children:"Loading session..."})]}):d?(0,i.jsx)(el,{messages:t}):(0,i.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center text-center px-8",children:[(0,i.jsx)("div",{className:"mb-4 flex h-16 w-16 items-center justify-center rounded-2xl bg-accent/10 border border-accent/20",children:(0,i.jsx)(M,{className:"h-8 w-8 text-accent"})}),(0,i.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Agent Playground"}),(0,i.jsx)("p",{className:"mt-2 max-w-md text-sm text-white/50",children:h?"Start a new conversation with ".concat(h,", or resume a past session from History."):"Select an agent above to get started."}),h&&(0,i.jsxs)("div",{className:"mt-4 inline-flex items-center gap-2 rounded-full bg-white/10 px-4 py-2 text-sm text-white/70",children:[(0,i.jsx)(C,{className:"h-4 w-4 text-accent"}),h]})]}),c&&(0,i.jsx)("div",{className:"shrink-0 mx-4 mb-2 rounded-xl border border-red-500/20 bg-red-500/10 px-4 py-2.5 text-sm text-red-400",children:c}),h&&(0,i.jsx)(ei,{input:s,onInputChange:n,onSend:r,sending:l,placeholder:d?"Send a message...":"Send a message to start a new session...",attachedFiles:x,onFileSelect:u,onRemoveFile:m})]})}function eo(e){let{sessions:t,activeSessionId:s,onSelectSession:n,className:r}=e;return(0,i.jsxs)("div",{className:a("w-64 shrink-0 rounded-lg border border-white/10 bg-white/[0.02] flex flex-col overflow-hidden",r),children:[(0,i.jsx)("div",{className:"px-3 py-2 border-b border-white/10 text-xs font-medium text-white/40 uppercase tracking-wider",children:"Recent Sessions"}),(0,i.jsx)("div",{className:"flex-1 overflow-auto scrollbar-thin",children:0===t.length?(0,i.jsx)("p",{className:"px-3 py-6 text-center text-xs text-white/30",children:"No sessions yet"}):t.map(e=>(0,i.jsxs)("button",{onClick:()=>n(e),className:a("w-full text-left px-3 py-2.5 border-b border-white/5 hover:bg-white/5 transition-colors",s===e.id&&"border-l-2 border-l-accent bg-accent/5"),children:[(0,i.jsx)("div",{className:"text-xs font-medium text-white truncate",children:e.agentName}),(0,i.jsxs)("div",{className:"text-[10px] text-white/30 mt-0.5",children:[e.createdAt?new Date(e.createdAt).toLocaleDateString():"No events",(0,i.jsx)("span",{className:"mx-1 text-white/15",children:"|"}),(0,i.jsx)("span",{className:a("active"===e.status?"text-green-400":"text-white/30"),children:e.status})]})]},e.id))})]})}var ec={stdout:"text-green-300",stderr:"text-red-400",system:"text-white/40"};function ed(e){let{logs:t,connected:s,onClear:n,className:r}=e,[o,c]=(0,l.useState)(""),[d,h]=(0,l.useState)(!1),[x,u]=(0,l.useState)(!0),m=(0,l.useRef)(null);(0,l.useEffect)(()=>{x&&m.current&&(m.current.scrollTop=m.current.scrollHeight)},[t,x]);let p=(0,l.useCallback)(()=>{if(!m.current)return;let{scrollTop:e,scrollHeight:t,clientHeight:s}=m.current;u(t-e-s<40)},[]),g=o?t.filter(e=>e.text.toLowerCase().includes(o.toLowerCase())):t;return(0,i.jsxs)("div",{className:a("flex flex-col bg-[#0d1117] rounded-lg border border-white/10 overflow-hidden",r),children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 border-b border-white/10 px-3 py-2 bg-[#161b22]",children:[(0,i.jsx)(F,{className:"h-3.5 w-3.5 text-white/50"}),(0,i.jsx)("span",{className:"text-xs font-medium text-white/60",children:"Terminal"}),(0,i.jsx)("div",{className:a("ml-1 flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium",!0===s?"text-green-400":!1===s?"text-red-400":"text-white/30"),children:!0===s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Z,{className:"h-2.5 w-2.5"})," Live"]}):!1===s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(z,{className:"h-2.5 w-2.5"})," Disconnected"]}):"Connecting..."}),(0,i.jsx)("div",{className:"flex-1"}),(0,i.jsxs)("span",{className:"text-[10px] text-white/30",children:[g.length.toLocaleString()," line",1!==g.length?"s":""]}),(0,i.jsx)("button",{onClick:()=>h(!d),className:a("rounded p-1 text-white/40 hover:bg-white/10 hover:text-white/70 transition-colors",d&&"bg-white/10 text-white/70"),title:"Toggle timestamps",children:(0,i.jsx)(U,{className:"h-3 w-3"})}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(G,{className:"absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-white/30"}),(0,i.jsx)("input",{type:"text",value:o,onChange:e=>c(e.target.value),placeholder:"Filter...",className:"h-6 w-32 rounded border border-white/10 bg-white/5 pl-7 pr-2 text-[11px] text-white placeholder:text-white/30 focus:border-white/20 focus:outline-none"})]}),!x&&(0,i.jsx)("button",{onClick:()=>{m.current&&(m.current.scrollTop=m.current.scrollHeight,u(!0))},className:"rounded p-1 text-white/40 hover:bg-white/10 hover:text-white/70 transition-colors",title:"Scroll to bottom",children:(0,i.jsx)(Y,{className:"h-3 w-3"})}),n&&(0,i.jsx)("button",{onClick:n,className:"rounded p-1 text-white/40 hover:bg-white/10 hover:text-white/70 transition-colors",title:"Clear",children:(0,i.jsx)(Q,{className:"h-3 w-3"})})]}),(0,i.jsx)("div",{ref:m,onScroll:p,className:"flex-1 overflow-auto p-3 font-mono text-xs leading-5 scrollbar-thin min-h-[120px]",children:0===g.length?(0,i.jsx)("div",{className:"flex h-full items-center justify-center text-white/20 text-xs",children:0===t.length?"Waiting for sandbox output...":"No matching lines"}):g.map((e,t)=>(0,i.jsxs)("div",{className:"flex hover:bg-white/5 rounded px-1 -mx-1",children:[d&&(0,i.jsx)("span",{className:"mr-3 shrink-0 select-none text-white/20",children:new Date(e.ts).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}),(0,i.jsx)("span",{className:a("whitespace-pre-wrap break-all",ec[e.level]||"text-white/60"),children:e.text})]},"".concat(e.index,"-").concat(t)))})]})}function eh(e){let{node:t,depth:s,selectedPath:n,expandedDirs:r,onSelectFile:l,onToggleDir:o}=e,c=r.has(t.path),d=n===t.path,h=t.isDir?c?A:B:function(e){var t;let s=null==(t=e.split(".").pop())?void 0:t.toLowerCase();return["ts","tsx","js","jsx","py","rs","go","rb","sh","bash"].includes(s||"")?_:["json","yaml","yml","toml"].includes(s||"")?E:["png","jpg","jpeg","gif","svg","webp","ico"].includes(s||"")?H:D}(t.name);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{onClick:()=>t.isDir?o(t.path):l(t.path),className:a("flex items-center gap-1.5 w-full text-left py-1 pr-2 text-xs transition-colors hover:bg-white/5",d&&!t.isDir&&"bg-accent/10 text-accent",!d&&"text-white/60"),style:{paddingLeft:"".concat(16*s+8,"px")},children:[t.isDir?c?(0,i.jsx)(I,{className:"h-3 w-3 shrink-0 text-white/30"}):(0,i.jsx)(P,{className:"h-3 w-3 shrink-0 text-white/30"}):(0,i.jsx)("span",{className:"w-3"}),(0,i.jsx)(h,{className:a("h-3.5 w-3.5 shrink-0",t.isDir?"text-accent":"text-white/40")}),(0,i.jsx)("span",{className:"truncate",children:t.name}),t.isDir&&t.children.length>0&&(0,i.jsx)("span",{className:"ml-auto text-[10px] text-white/20 shrink-0",children:t.children.length})]}),t.isDir&&c&&t.children.map(e=>(0,i.jsx)(eh,{node:e,depth:s+1,selectedPath:n,expandedDirs:r,onSelectFile:l,onToggleDir:o},e.path))]})}function ex(e){let{nodes:t,selectedPath:s,expandedDirs:n,onSelectFile:r,onToggleDir:l}=e;return(0,i.jsx)("div",{className:"overflow-y-auto scrollbar-thin",children:t.map(e=>(0,i.jsx)(eh,{node:e,depth:0,selectedPath:s,expandedDirs:n,onSelectFile:r,onToggleDir:l},e.path))})}function eu(e){let{files:t,source:s,loading:n,selectedPath:r,fileContent:c,fileLoading:h,fileError:x,expandedDirs:m,filter:p,onFilterChange:g,onSelectFile:w,onToggleDir:f,onRefresh:j,fileBaseUrl:v,className:b}=e,y=(0,l.useRef)(null);if(n)return(0,i.jsxs)("div",{className:a("flex items-center justify-center py-12",b),children:[(0,i.jsx)(W,{className:"mr-2 h-4 w-4 animate-spin text-white/40"}),(0,i.jsx)("span",{className:"text-sm text-white/50",children:"Loading files..."})]});if(0===t.length)return(0,i.jsxs)("div",{className:a("flex flex-col items-center justify-center py-12 text-center",b),children:[(0,i.jsx)(A,{className:"mb-3 h-10 w-10 text-white/20"}),(0,i.jsx)("p",{className:"text-sm font-medium text-white/50",children:"No files in workspace"}),(0,i.jsx)("p",{className:"mt-1 text-xs text-white/40",children:"Files created by the agent will appear here"})]});let N=d(p?t.filter(e=>e.path.toLowerCase().includes(p.toLowerCase())):t),k=t.find(e=>e.path===r),C=v&&r?"".concat(v,"/").concat(r):void 0;return(0,i.jsxs)("div",{className:a("flex flex-col h-full",b),children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 border-b border-white/10 px-3 py-2 shrink-0",children:[s&&(0,i.jsx)("span",{className:a("rounded-full px-2 py-0.5 text-[10px] font-medium border","sandbox"===s?"bg-green-500/10 text-green-400 border-green-500/20":"bg-white/5 text-white/40 border-white/10"),children:s}),(0,i.jsxs)("span",{className:"text-xs text-white/40",children:[t.length," files"]}),(0,i.jsx)("div",{className:"flex-1"}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(G,{className:"absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-white/30"}),(0,i.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Filter...",className:"w-40 rounded-md border border-white/10 bg-white/5 pl-7 pr-2 py-1 text-xs text-white placeholder:text-white/30 focus:border-accent/50 focus:outline-none"}),p&&(0,i.jsx)("button",{onClick:()=>g(""),className:"absolute right-1.5 top-1/2 -translate-y-1/2 text-white/30 hover:text-white",children:(0,i.jsx)(O,{className:"h-3 w-3"})})]}),(0,i.jsx)("button",{onClick:j,className:"rounded-md p-1 text-white/40 hover:bg-white/5 hover:text-white transition-colors",title:"Refresh",children:(0,i.jsx)(X,{className:"h-3.5 w-3.5"})})]}),(0,i.jsxs)("div",{className:"flex flex-1 min-h-0",children:[(0,i.jsx)("div",{className:"w-64 shrink-0 border-r border-white/10 overflow-y-auto scrollbar-thin",children:(0,i.jsx)(ex,{nodes:N,selectedPath:r,expandedDirs:m,onSelectFile:w,onToggleDir:f})}),(0,i.jsx)("div",{className:"flex-1 min-w-0 flex flex-col overflow-hidden",children:r?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex items-center justify-between border-b border-white/10 px-4 py-2 shrink-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,i.jsx)("span",{className:"font-mono text-xs text-white/60 truncate",children:r}),k&&(0,i.jsx)("span",{className:"text-[10px] text-white/30 shrink-0",children:o(k.size)})]}),C&&(0,i.jsx)("a",{href:C,download:!0,className:"rounded-md p-1.5 text-white/40 hover:bg-white/5 hover:text-white transition-colors shrink-0",title:"Download",children:(0,i.jsx)($,{className:"h-3.5 w-3.5"})})]}),(0,i.jsx)("div",{className:"flex-1 overflow-auto bg-[#0d1117]",children:h?(0,i.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,i.jsx)(W,{className:"mr-2 h-4 w-4 animate-spin text-white/40"}),(0,i.jsx)("span",{className:"text-xs text-white/50",children:"Loading..."})]}):x?(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center px-4",children:[(0,i.jsx)("p",{className:"text-xs text-white/40",children:x}),C&&(0,i.jsx)("a",{href:C,download:!0,className:"mt-2 text-xs text-accent hover:underline",children:"Download file"})]}):u(r)?(0,i.jsx)("div",{className:"flex items-center justify-center p-4",children:C&&(0,i.jsx)("img",{src:C,alt:r,className:"max-w-full max-h-[60vh] object-contain rounded"})}):(0,i.jsx)("pre",{ref:y,className:"p-4 text-xs font-mono text-white/70 leading-relaxed whitespace-pre-wrap break-words",children:c})})]}):(0,i.jsx)("div",{className:"flex flex-1 items-center justify-center text-center",children:(0,i.jsxs)("div",{children:[(0,i.jsx)(D,{className:"mx-auto mb-2 h-8 w-8 text-white/15"}),(0,i.jsx)("p",{className:"text-xs text-white/30",children:"Select a file to view its contents"})]})})})]})]})}function em(e){let{terminalOpen:t,onToggleTerminal:s,filesOpen:n,onToggleFiles:r,className:l}=e;return(0,i.jsxs)("div",{className:a("flex border-t border-white/10 bg-[#161b22] rounded-b-lg",l),children:[(0,i.jsxs)("button",{onClick:s,className:a("flex flex-1 items-center justify-center gap-1.5 py-1 text-[10px] font-medium transition-colors",t?"text-accent hover:text-accent/80":"text-white/40 hover:text-white/60 hover:bg-[#1c2128]"),children:[(0,i.jsx)(F,{className:"h-3 w-3"}),"Terminal",t?(0,i.jsx)(I,{className:"h-3 w-3"}):(0,i.jsx)(T,{className:"h-3 w-3"})]}),(0,i.jsx)("div",{className:"w-px bg-white/10"}),(0,i.jsxs)("button",{onClick:r,className:a("flex flex-1 items-center justify-center gap-1.5 py-1 text-[10px] font-medium transition-colors",n?"text-accent hover:text-accent/80":"text-white/40 hover:text-white/60 hover:bg-[#1c2128]"),children:[(0,i.jsx)(A,{className:"h-3 w-3"}),"Files",n?(0,i.jsx)(I,{className:"h-3 w-3"}):(0,i.jsx)(T,{className:"h-3 w-3"})]})]})}function ep(e){let{client:t,sessionId:s,historical:n,pollInterval:r=500}=e,[i,a]=(0,l.useState)([]),[o,c]=(0,l.useState)(null),d=(0,l.useRef)(-1),h=(0,l.useRef)(null),x=(0,l.useCallback)(async()=>{try{let e=d.current>=0?{after:d.current}:void 0,n=await t.getSessionLogs(s,e);c(!0),n.logs&&n.logs.length>0&&(a(e=>[...e,...n.logs]),d.current=n.logs[n.logs.length-1].index)}catch(e){c(!1)}},[t,s]);return(0,l.useEffect)(()=>{if(a([]),d.current=-1,c(null),x(),!n)return h.current=setInterval(x,r),()=>{h.current&&clearInterval(h.current)}},[s,n,r,x]),{logs:i,connected:o,clearLogs:(0,l.useCallback)(()=>{a([])},[])}}function eg(e){let{client:t,sessionId:s}=e,[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)(null),[o,c]=(0,l.useState)(!0),[d,h]=(0,l.useState)(null),[x,u]=(0,l.useState)(null),[m,p]=(0,l.useState)(!1),[g,w]=(0,l.useState)(null),[f,j]=(0,l.useState)(new Set),[v,b]=(0,l.useState)(""),y=(0,l.useCallback)(async()=>{c(!0);try{let e=await t.getSessionFiles(s);r(e.files||[]),a(e.source||null);let n=new Set;for(let t of e.files||[]){let e=t.path.split("/")[0];t.path.includes("/")&&n.add(e)}j(n)}catch(e){}finally{c(!1)}},[t,s]);return(0,l.useEffect)(()=>{y()},[y]),{files:n,source:i,loading:o,selectedPath:d,fileContent:x,fileLoading:m,fileError:g,expandedDirs:f,filter:v,setFilter:b,selectFile:(0,l.useCallback)(async e=>{var n;h(e),u(null),w(null);let r=null==(n=e.split(".").pop())?void 0:n.toLowerCase();if(!new Set(["png","jpg","jpeg","gif","svg","webp","ico"]).has(r||"")){p(!0);try{let n=await t.getSessionFile(s,e);u(n.content||"")}catch(e){w("Failed to load file content")}finally{p(!1)}}},[t,s]),toggleDir:(0,l.useCallback)(e=>{j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),refresh:y}}function ew(e){let{className:t}=e,{client:s,chat:n,agents:r,sessions:l,health:o,fileUpload:c,selectedAgent:d,setSelectedAgent:h,showHistory:x,setShowHistory:u,terminalOpen:m,setTerminalOpen:p,filesOpen:g,setFilesOpen:w}=b(),f=r.agents.find(e=>(e.slug||e.name)===d),j=null!==n.sessionId;return(0,i.jsxs)("div",{className:a("flex flex-col",t),children:[(0,i.jsx)(et,{agents:r.agents,selectedAgent:d,onAgentChange:h,runtimeConnected:o.connected,showHistory:x,onToggleHistory:()=>u(!x),sessionId:n.sessionId,onNewChat:n.startNewChat}),(0,i.jsxs)("div",{className:"flex flex-1 gap-4 min-h-0",children:[x&&(0,i.jsx)(eo,{sessions:l.sessions,activeSessionId:n.sessionId,onSelectSession:e=>{n.loadSession(e.id),u(!1)}}),(0,i.jsxs)("div",{className:"flex-1 flex flex-col min-w-0 gap-0",children:[(0,i.jsx)(ea,{messages:n.messages,input:n.input,onInputChange:n.setInput,onSend:n.send,sending:n.sending,loading:n.loading,error:n.error,isActive:j,agentName:null==f?void 0:f.name,attachedFiles:n.attachedFiles,onFileSelect:c.handleFileSelect,onRemoveFile:c.removeFile,className:a("rounded-lg border border-white/10 bg-white/[0.02]",m&&n.sessionId?"flex-1 min-h-0":"flex-1")}),n.sessionId&&(0,i.jsx)("div",{className:a("shrink-0 transition-all",m?"h-64":"h-0"),children:m&&(0,i.jsx)(ef,{client:s,sessionId:n.sessionId})}),n.sessionId&&(0,i.jsx)("div",{className:a("shrink-0 transition-all",g?"h-72":"h-0"),children:g&&(0,i.jsx)(ej,{client:s,sessionId:n.sessionId})}),n.sessionId&&(0,i.jsx)(em,{terminalOpen:m,onToggleTerminal:()=>p(!m),filesOpen:g,onToggleFiles:()=>w(!g)})]})]})]})}function ef(e){let{client:t,sessionId:s}=e,{logs:n,connected:r,clearLogs:l}=ep({client:t,sessionId:s});return(0,i.jsx)(ed,{logs:n,connected:r,onClear:l,className:"h-full rounded-t-none border-t-0"})}function ej(e){let{client:t,sessionId:s}=e,n=eg({client:t,sessionId:s});return(0,i.jsx)(eu,{files:n.files,source:n.source,loading:n.loading,selectedPath:n.selectedPath,fileContent:n.fileContent,fileLoading:n.fileLoading,fileError:n.fileError,expandedDirs:n.expandedDirs,filter:n.filter,onFilterChange:n.setFilter,onSelectFile:n.selectFile,onToggleDir:n.toggleDir,onRefresh:n.refresh,className:"h-full border-t border-white/10"})}function ev(e){let{client:t,defaultAgent:s,className:n}=e;return(0,i.jsx)(y,{client:t,defaultAgent:s,children:(0,i.jsx)(ew,{className:n})})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[513],{3690:(e,r,o)=>{o.d(r,{QP:()=>B});let t=(e,r)=>{if(0===e.length)return r.classGroupId;let o=e[0],n=r.nextPart.get(o),l=n?t(e.slice(1),n):void 0;if(l)return l;if(0===r.validators.length)return;let s=e.join("-");return r.validators.find(({validator:e})=>e(s))?.classGroupId},n=/^\[(.+)\]$/,l=(e,r,o,t)=>{e.forEach(e=>{if("string"==typeof e){(""===e?r:s(r,e)).classGroupId=o;return}if("function"==typeof e)return a(e)?void l(e(t),r,o,t):void r.validators.push({validator:e,classGroupId:o});Object.entries(e).forEach(([e,n])=>{l(n,s(r,e),o,t)})})},s=(e,r)=>{let o=e;return r.split("-").forEach(e=>{o.nextPart.has(e)||o.nextPart.set(e,{nextPart:new Map,validators:[]}),o=o.nextPart.get(e)}),o},a=e=>e.isThemeGetter,i=(e,r)=>r?e.map(([e,o])=>[e,o.map(e=>"string"==typeof e?r+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,o])=>[r+e,o])):e)]):e,d=e=>{if(e.length<=1)return e;let r=[],o=[];return e.forEach(e=>{"["===e[0]?(r.push(...o.sort(),e),o=[]):o.push(e)}),r.push(...o.sort()),r},c=/\s+/;function p(){let e,r,o=0,t="";for(;o<arguments.length;)(e=arguments[o++])&&(r=u(e))&&(t&&(t+=" "),t+=r);return t}let u=e=>{let r;if("string"==typeof e)return e;let o="";for(let t=0;t<e.length;t++)e[t]&&(r=u(e[t]))&&(o&&(o+=" "),o+=r);return o},b=e=>{let r=r=>r[e]||[];return r.isThemeGetter=!0,r},f=/^\[(?:([a-z-]+):)?(.+)\]$/i,m=/^\d+\/\d+$/,g=new Set(["px","full","screen"]),h=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,x=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,y=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,v=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,w=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,k=e=>j(e)||g.has(e)||m.test(e),z=e=>W(e,"length",T),j=e=>!!e&&!Number.isNaN(Number(e)),C=e=>W(e,"number",j),S=e=>!!e&&Number.isInteger(Number(e)),G=e=>e.endsWith("%")&&j(e.slice(0,-1)),P=e=>f.test(e),N=e=>h.test(e),E=new Set(["length","size","percentage"]),$=e=>W(e,E,q),M=e=>W(e,"position",q),I=new Set(["image","url"]),_=e=>W(e,I,Q),O=e=>W(e,"",A),R=()=>!0,W=(e,r,o)=>{let t=f.exec(e);return!!t&&(t[1]?"string"==typeof r?t[1]===r:r.has(t[1]):o(t[2]))},T=e=>x.test(e)&&!y.test(e),q=()=>!1,A=e=>v.test(e),Q=e=>w.test(e);Symbol.toStringTag;let B=function(e,...r){let o,s,a,u=function(d){let c;return s=(o={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let r=0,o=new Map,t=new Map,n=(n,l)=>{o.set(n,l),++r>e&&(r=0,t=o,o=new Map)};return{get(e){let r=o.get(e);return void 0!==r?r:void 0!==(r=t.get(e))?(n(e,r),r):void 0},set(e,r){o.has(e)?o.set(e,r):n(e,r)}}})((c=r.reduce((e,r)=>r(e),e())).cacheSize),parseClassName:(e=>{let{separator:r,experimentalParseClassName:o}=e,t=1===r.length,n=r[0],l=r.length,s=e=>{let o,s=[],a=0,i=0;for(let d=0;d<e.length;d++){let c=e[d];if(0===a){if(c===n&&(t||e.slice(d,d+l)===r)){s.push(e.slice(i,d)),i=d+l;continue}if("/"===c){o=d;continue}}"["===c?a++:"]"===c&&a--}let d=0===s.length?e:e.substring(i),c=d.startsWith("!"),p=c?d.substring(1):d;return{modifiers:s,hasImportantModifier:c,baseClassName:p,maybePostfixModifierPosition:o&&o>i?o-i:void 0}};return o?e=>o({className:e,parseClassName:s}):s})(c),...(e=>{let r=(e=>{let{theme:r,prefix:o}=e,t={nextPart:new Map,validators:[]};return i(Object.entries(e.classGroups),o).forEach(([e,o])=>{l(o,t,e,r)}),t})(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:e=>{let o=e.split("-");return""===o[0]&&1!==o.length&&o.shift(),t(o,r)||(e=>{if(n.test(e)){let r=n.exec(e)[1],o=r?.substring(0,r.indexOf(":"));if(o)return"arbitrary.."+o}})(e)},getConflictingClassGroupIds:(e,r)=>{let t=o[e]||[];return r&&s[e]?[...t,...s[e]]:t}}})(c)}).cache.get,a=o.cache.set,u=b,b(d)};function b(e){let r=s(e);if(r)return r;let t=((e,r)=>{let{parseClassName:o,getClassGroupId:t,getConflictingClassGroupIds:n}=r,l=[],s=e.trim().split(c),a="";for(let e=s.length-1;e>=0;e-=1){let r=s[e],{modifiers:i,hasImportantModifier:c,baseClassName:p,maybePostfixModifierPosition:u}=o(r),b=!!u,f=t(b?p.substring(0,u):p);if(!f){if(!b||!(f=t(p))){a=r+(a.length>0?" "+a:a);continue}b=!1}let m=d(i).join(":"),g=c?m+"!":m,h=g+f;if(l.includes(h))continue;l.push(h);let x=n(f,b);for(let e=0;e<x.length;++e){let r=x[e];l.push(g+r)}a=r+(a.length>0?" "+a:a)}return a})(e,o);return a(e,t),t}return function(){return u(p.apply(null,arguments))}}(()=>{let e=b("colors"),r=b("spacing"),o=b("blur"),t=b("brightness"),n=b("borderColor"),l=b("borderRadius"),s=b("borderSpacing"),a=b("borderWidth"),i=b("contrast"),d=b("grayscale"),c=b("hueRotate"),p=b("invert"),u=b("gap"),f=b("gradientColorStops"),m=b("gradientColorStopPositions"),g=b("inset"),h=b("margin"),x=b("opacity"),y=b("padding"),v=b("saturate"),w=b("scale"),E=b("sepia"),I=b("skew"),W=b("space"),T=b("translate"),q=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",P,r],B=()=>[P,r],D=()=>["",k,z],F=()=>["auto",j,P],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",P],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[j,P];return{cacheSize:500,separator:":",theme:{colors:[R],spacing:[k,z],blur:["none","",N,P],brightness:X(),borderColor:[e],borderRadius:["none","","full",N,P],borderSpacing:B(),borderWidth:D(),contrast:X(),grayscale:U(),hueRotate:X(),invert:U(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[G,z],inset:Q(),margin:Q(),opacity:X(),padding:B(),saturate:X(),scale:X(),sepia:U(),skew:X(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",P]}],container:["container"],columns:[{columns:[N]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...H(),P]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",S,P]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",P]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",S,P]}],"grid-cols":[{"grid-cols":[R]}],"col-start-end":[{col:["auto",{span:["full",S,P]},P]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[R]}],"row-start-end":[{row:["auto",{span:[S,P]},P]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",P]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",P]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",P,r]}],"min-w":[{"min-w":[P,r,"min","max","fit"]}],"max-w":[{"max-w":[P,r,"none","full","min","max","fit","prose",{screen:[N]},N]}],h:[{h:[P,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[P,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[P,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[P,r,"auto","min","max","fit"]}],"font-size":[{text:["base",N,z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",C]}],"font-family":[{font:[R]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",P]}],"line-clamp":[{"line-clamp":["none",j,C]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",k,P]}],"list-image":[{"list-image":["none",P]}],"list-style-type":[{list:["none","disc","decimal",P]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",k,z]}],"underline-offset":[{"underline-offset":["auto",k,P]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",P]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),M]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...J(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:J()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...J()]}],"outline-offset":[{"outline-offset":[k,P]}],"outline-w":[{outline:[k,z]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[k,z]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",N,O]}],"shadow-color":[{shadow:[R]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[t]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",N,P]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[p]}],saturate:[{saturate:[v]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[t]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",P]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",P]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",P]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[S,P]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",P]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",P]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",P]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[k,z,C]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}})},6862:(e,r,o)=>{o.d(r,{$:()=>t});function t(){for(var e,r,o=0,t="",n=arguments.length;o<n;o++)(e=arguments[o])&&(r=function e(r){var o,t,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var l=r.length;for(o=0;o<l;o++)r[o]&&(t=e(r[o]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}(e))&&(t&&(t+=" "),t+=r);return t}}}]);