@agentuity/workbench 0.0.86 → 0.0.88

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 (271) hide show
  1. package/dist/components/App.d.ts.map +1 -1
  2. package/dist/components/App.js +18 -2
  3. package/dist/components/App.js.map +1 -1
  4. package/dist/components/ai-elements/code-block.d.ts +3 -3
  5. package/dist/components/ai-elements/code-block.d.ts.map +1 -1
  6. package/dist/components/ai-elements/code-block.js +29 -7
  7. package/dist/components/ai-elements/code-block.js.map +1 -1
  8. package/dist/components/internal/Chat.d.ts +3 -2
  9. package/dist/components/internal/Chat.d.ts.map +1 -1
  10. package/dist/components/internal/Chat.js +23 -24
  11. package/dist/components/internal/Chat.js.map +1 -1
  12. package/dist/components/internal/InputSection.d.ts +3 -2
  13. package/dist/components/internal/InputSection.d.ts.map +1 -1
  14. package/dist/components/internal/InputSection.js +68 -6
  15. package/dist/components/internal/InputSection.js.map +1 -1
  16. package/dist/components/internal/MonacoJsonEditor.d.ts +3 -1
  17. package/dist/components/internal/MonacoJsonEditor.d.ts.map +1 -1
  18. package/dist/components/internal/MonacoJsonEditor.js +41 -57
  19. package/dist/components/internal/MonacoJsonEditor.js.map +1 -1
  20. package/dist/components/internal/Schema.d.ts +1 -2
  21. package/dist/components/internal/Schema.d.ts.map +1 -1
  22. package/dist/components/internal/Schema.js +2 -3
  23. package/dist/components/internal/Schema.js.map +1 -1
  24. package/dist/components/internal/WorkbenchProvider.d.ts.map +1 -1
  25. package/dist/components/internal/WorkbenchProvider.js +55 -8
  26. package/dist/components/internal/WorkbenchProvider.js.map +1 -1
  27. package/dist/components/ui/button.d.ts +1 -1
  28. package/dist/components/ui/input-group.js +2 -2
  29. package/dist/components/ui/input-group.js.map +1 -1
  30. package/dist/components/ui/input.d.ts.map +1 -1
  31. package/dist/components/ui/input.js +1 -1
  32. package/dist/components/ui/input.js.map +1 -1
  33. package/dist/index.d.ts +3 -5
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +4 -6
  36. package/dist/index.js.map +1 -1
  37. package/dist/{styles.css → standalone.css} +206 -1554
  38. package/package.json +29 -29
  39. package/src/{styles.css → base.css} +36 -52
  40. package/src/components/App.tsx +41 -5
  41. package/src/components/ai-elements/code-block.tsx +42 -10
  42. package/src/components/internal/Chat.tsx +112 -119
  43. package/src/components/internal/InputSection.tsx +79 -9
  44. package/src/components/internal/MonacoJsonEditor.tsx +59 -65
  45. package/src/components/internal/Schema.tsx +74 -86
  46. package/src/components/internal/WorkbenchProvider.tsx +69 -10
  47. package/src/components/ui/input-group.tsx +2 -2
  48. package/src/components/ui/input.tsx +2 -3
  49. package/src/index.ts +5 -14
  50. package/src/integration.css +15 -0
  51. package/src/standalone.css +25 -0
  52. package/dist/components/ConnectionStatus.d.ts +0 -7
  53. package/dist/components/ConnectionStatus.d.ts.map +0 -1
  54. package/dist/components/ConnectionStatus.js +0 -52
  55. package/dist/components/ConnectionStatus.js.map +0 -1
  56. package/dist/components/Inline.d.ts +0 -10
  57. package/dist/components/Inline.d.ts.map +0 -1
  58. package/dist/components/Inline.js +0 -11
  59. package/dist/components/Inline.js.map +0 -1
  60. package/dist/components/ai-elements/artifact.d.ts +0 -24
  61. package/dist/components/ai-elements/artifact.d.ts.map +0 -1
  62. package/dist/components/ai-elements/artifact.js +0 -21
  63. package/dist/components/ai-elements/artifact.js.map +0 -1
  64. package/dist/components/ai-elements/branch.d.ts +0 -21
  65. package/dist/components/ai-elements/branch.d.ts.map +0 -1
  66. package/dist/components/ai-elements/branch.js +0 -71
  67. package/dist/components/ai-elements/branch.js.map +0 -1
  68. package/dist/components/ai-elements/canvas.d.ts +0 -9
  69. package/dist/components/ai-elements/canvas.d.ts.map +0 -1
  70. package/dist/components/ai-elements/canvas.js +0 -6
  71. package/dist/components/ai-elements/canvas.js.map +0 -1
  72. package/dist/components/ai-elements/chain-of-thought.d.ts +0 -30
  73. package/dist/components/ai-elements/chain-of-thought.d.ts.map +0 -1
  74. package/dist/components/ai-elements/chain-of-thought.js +0 -52
  75. package/dist/components/ai-elements/chain-of-thought.js.map +0 -1
  76. package/dist/components/ai-elements/confirmation.d.ts +0 -27
  77. package/dist/components/ai-elements/confirmation.d.ts.map +0 -1
  78. package/dist/components/ai-elements/confirmation.js +0 -57
  79. package/dist/components/ai-elements/confirmation.js.map +0 -1
  80. package/dist/components/ai-elements/connection.d.ts +0 -3
  81. package/dist/components/ai-elements/connection.d.ts.map +0 -1
  82. package/dist/components/ai-elements/connection.js +0 -4
  83. package/dist/components/ai-elements/connection.js.map +0 -1
  84. package/dist/components/ai-elements/context.d.ts +0 -33
  85. package/dist/components/ai-elements/context.d.ts.map +0 -1
  86. package/dist/components/ai-elements/context.js +0 -167
  87. package/dist/components/ai-elements/context.js.map +0 -1
  88. package/dist/components/ai-elements/controls.d.ts +0 -5
  89. package/dist/components/ai-elements/controls.d.ts.map +0 -1
  90. package/dist/components/ai-elements/controls.js +0 -6
  91. package/dist/components/ai-elements/controls.js.map +0 -1
  92. package/dist/components/ai-elements/edge.d.ts +0 -6
  93. package/dist/components/ai-elements/edge.d.ts.map +0 -1
  94. package/dist/components/ai-elements/edge.js +0 -83
  95. package/dist/components/ai-elements/edge.js.map +0 -1
  96. package/dist/components/ai-elements/image.d.ts +0 -7
  97. package/dist/components/ai-elements/image.d.ts.map +0 -1
  98. package/dist/components/ai-elements/image.js +0 -4
  99. package/dist/components/ai-elements/image.js.map +0 -1
  100. package/dist/components/ai-elements/inline-citation.d.ts +0 -39
  101. package/dist/components/ai-elements/inline-citation.d.ts.map +0 -1
  102. package/dist/components/ai-elements/inline-citation.js +0 -62
  103. package/dist/components/ai-elements/inline-citation.js.map +0 -1
  104. package/dist/components/ai-elements/loader.d.ts +0 -6
  105. package/dist/components/ai-elements/loader.d.ts.map +0 -1
  106. package/dist/components/ai-elements/loader.js +0 -5
  107. package/dist/components/ai-elements/loader.js.map +0 -1
  108. package/dist/components/ai-elements/node.d.ts +0 -22
  109. package/dist/components/ai-elements/node.d.ts.map +0 -1
  110. package/dist/components/ai-elements/node.js +0 -12
  111. package/dist/components/ai-elements/node.js.map +0 -1
  112. package/dist/components/ai-elements/open-in-chat.d.ts +0 -29
  113. package/dist/components/ai-elements/open-in-chat.d.ts.map +0 -1
  114. package/dist/components/ai-elements/open-in-chat.js +0 -97
  115. package/dist/components/ai-elements/open-in-chat.js.map +0 -1
  116. package/dist/components/ai-elements/panel.d.ts +0 -6
  117. package/dist/components/ai-elements/panel.d.ts.map +0 -1
  118. package/dist/components/ai-elements/panel.js +0 -5
  119. package/dist/components/ai-elements/panel.js.map +0 -1
  120. package/dist/components/ai-elements/plan.d.ts +0 -26
  121. package/dist/components/ai-elements/plan.d.ts.map +0 -1
  122. package/dist/components/ai-elements/plan.js +0 -32
  123. package/dist/components/ai-elements/plan.js.map +0 -1
  124. package/dist/components/ai-elements/queue.d.ts +0 -62
  125. package/dist/components/ai-elements/queue.d.ts.map +0 -1
  126. package/dist/components/ai-elements/queue.js +0 -25
  127. package/dist/components/ai-elements/queue.js.map +0 -1
  128. package/dist/components/ai-elements/reasoning.d.ts +0 -17
  129. package/dist/components/ai-elements/reasoning.d.ts.map +0 -1
  130. package/dist/components/ai-elements/reasoning.js +0 -77
  131. package/dist/components/ai-elements/reasoning.js.map +0 -1
  132. package/dist/components/ai-elements/response.d.ts +0 -6
  133. package/dist/components/ai-elements/response.d.ts.map +0 -1
  134. package/dist/components/ai-elements/response.js +0 -8
  135. package/dist/components/ai-elements/response.js.map +0 -1
  136. package/dist/components/ai-elements/sources.d.ts +0 -13
  137. package/dist/components/ai-elements/sources.d.ts.map +0 -1
  138. package/dist/components/ai-elements/sources.js +0 -10
  139. package/dist/components/ai-elements/sources.js.map +0 -1
  140. package/dist/components/ai-elements/suggestion.d.ts +0 -11
  141. package/dist/components/ai-elements/suggestion.d.ts.map +0 -1
  142. package/dist/components/ai-elements/suggestion.js +0 -13
  143. package/dist/components/ai-elements/suggestion.js.map +0 -1
  144. package/dist/components/ai-elements/task.d.ts +0 -15
  145. package/dist/components/ai-elements/task.d.ts.map +0 -1
  146. package/dist/components/ai-elements/task.js +0 -11
  147. package/dist/components/ai-elements/task.js.map +0 -1
  148. package/dist/components/ai-elements/tool.d.ts +0 -24
  149. package/dist/components/ai-elements/tool.d.ts.map +0 -1
  150. package/dist/components/ai-elements/tool.js +0 -47
  151. package/dist/components/ai-elements/tool.js.map +0 -1
  152. package/dist/components/ai-elements/toolbar.d.ts +0 -6
  153. package/dist/components/ai-elements/toolbar.d.ts.map +0 -1
  154. package/dist/components/ai-elements/toolbar.js +0 -5
  155. package/dist/components/ai-elements/toolbar.js.map +0 -1
  156. package/dist/components/ai-elements/web-preview.d.ts +0 -35
  157. package/dist/components/ai-elements/web-preview.d.ts.map +0 -1
  158. package/dist/components/ai-elements/web-preview.js +0 -63
  159. package/dist/components/ai-elements/web-preview.js.map +0 -1
  160. package/dist/components/ui/alert.d.ts +0 -10
  161. package/dist/components/ui/alert.d.ts.map +0 -1
  162. package/dist/components/ui/alert.js +0 -25
  163. package/dist/components/ui/alert.js.map +0 -1
  164. package/dist/components/ui/badge.d.ts +0 -10
  165. package/dist/components/ui/badge.d.ts.map +0 -1
  166. package/dist/components/ui/badge.js +0 -23
  167. package/dist/components/ui/badge.js.map +0 -1
  168. package/dist/components/ui/card.d.ts +0 -10
  169. package/dist/components/ui/card.d.ts.map +0 -1
  170. package/dist/components/ui/card.js +0 -25
  171. package/dist/components/ui/card.js.map +0 -1
  172. package/dist/components/ui/carousel.d.ts +0 -20
  173. package/dist/components/ui/carousel.d.ts.map +0 -1
  174. package/dist/components/ui/carousel.js +0 -92
  175. package/dist/components/ui/carousel.js.map +0 -1
  176. package/dist/components/ui/checkbox.d.ts +0 -5
  177. package/dist/components/ui/checkbox.d.ts.map +0 -1
  178. package/dist/components/ui/checkbox.js +0 -9
  179. package/dist/components/ui/checkbox.js.map +0 -1
  180. package/dist/components/ui/collapsible.d.ts +0 -6
  181. package/dist/components/ui/collapsible.d.ts.map +0 -1
  182. package/dist/components/ui/collapsible.js +0 -14
  183. package/dist/components/ui/collapsible.js.map +0 -1
  184. package/dist/components/ui/field.d.ts +0 -25
  185. package/dist/components/ui/field.d.ts.map +0 -1
  186. package/dist/components/ui/field.js +0 -74
  187. package/dist/components/ui/field.js.map +0 -1
  188. package/dist/components/ui/form.d.ts +0 -25
  189. package/dist/components/ui/form.d.ts.map +0 -1
  190. package/dist/components/ui/form.js +0 -58
  191. package/dist/components/ui/form.js.map +0 -1
  192. package/dist/components/ui/label.d.ts +0 -5
  193. package/dist/components/ui/label.d.ts.map +0 -1
  194. package/dist/components/ui/label.js +0 -9
  195. package/dist/components/ui/label.js.map +0 -1
  196. package/dist/components/ui/progress.d.ts +0 -5
  197. package/dist/components/ui/progress.d.ts.map +0 -1
  198. package/dist/components/ui/progress.js +0 -9
  199. package/dist/components/ui/progress.js.map +0 -1
  200. package/dist/components/ui/separator.d.ts +0 -5
  201. package/dist/components/ui/separator.d.ts.map +0 -1
  202. package/dist/components/ui/separator.js +0 -9
  203. package/dist/components/ui/separator.js.map +0 -1
  204. package/dist/components/ui/switch.d.ts +0 -5
  205. package/dist/components/ui/switch.d.ts.map +0 -1
  206. package/dist/components/ui/switch.js +0 -8
  207. package/dist/components/ui/switch.js.map +0 -1
  208. package/dist/components/ui/tabs.d.ts +0 -8
  209. package/dist/components/ui/tabs.d.ts.map +0 -1
  210. package/dist/components/ui/tabs.js +0 -17
  211. package/dist/components/ui/tabs.js.map +0 -1
  212. package/dist/components/ui/toggle.d.ts +0 -10
  213. package/dist/components/ui/toggle.d.ts.map +0 -1
  214. package/dist/components/ui/toggle.js +0 -26
  215. package/dist/components/ui/toggle.js.map +0 -1
  216. package/dist/components.d.ts +0 -12
  217. package/dist/components.d.ts.map +0 -1
  218. package/dist/components.js +0 -13
  219. package/dist/components.js.map +0 -1
  220. package/dist/hooks/index.d.ts +0 -7
  221. package/dist/hooks/index.d.ts.map +0 -1
  222. package/dist/hooks/index.js +0 -5
  223. package/dist/hooks/index.js.map +0 -1
  224. package/dist/hooks/useWorkbenchSchemas.d.ts +0 -56
  225. package/dist/hooks/useWorkbenchSchemas.d.ts.map +0 -1
  226. package/dist/hooks/useWorkbenchSchemas.js +0 -63
  227. package/dist/hooks/useWorkbenchSchemas.js.map +0 -1
  228. package/src/components/ConnectionStatus.tsx +0 -67
  229. package/src/components/Inline.tsx +0 -16
  230. package/src/components/ai-elements/artifact.tsx +0 -118
  231. package/src/components/ai-elements/branch.tsx +0 -187
  232. package/src/components/ai-elements/canvas.tsx +0 -24
  233. package/src/components/ai-elements/chain-of-thought.tsx +0 -198
  234. package/src/components/ai-elements/confirmation.tsx +0 -119
  235. package/src/components/ai-elements/connection.tsx +0 -16
  236. package/src/components/ai-elements/context.tsx +0 -357
  237. package/src/components/ai-elements/controls.tsx +0 -18
  238. package/src/components/ai-elements/edge.tsx +0 -131
  239. package/src/components/ai-elements/image.tsx +0 -16
  240. package/src/components/ai-elements/inline-citation.tsx +0 -246
  241. package/src/components/ai-elements/loader.tsx +0 -88
  242. package/src/components/ai-elements/node.tsx +0 -66
  243. package/src/components/ai-elements/open-in-chat.tsx +0 -333
  244. package/src/components/ai-elements/panel.tsx +0 -12
  245. package/src/components/ai-elements/plan.tsx +0 -123
  246. package/src/components/ai-elements/queue.tsx +0 -231
  247. package/src/components/ai-elements/reasoning.tsx +0 -163
  248. package/src/components/ai-elements/response.tsx +0 -19
  249. package/src/components/ai-elements/sources.tsx +0 -53
  250. package/src/components/ai-elements/suggestion.tsx +0 -47
  251. package/src/components/ai-elements/task.tsx +0 -64
  252. package/src/components/ai-elements/tool.tsx +0 -136
  253. package/src/components/ai-elements/toolbar.tsx +0 -13
  254. package/src/components/ai-elements/web-preview.tsx +0 -238
  255. package/src/components/ui/alert.tsx +0 -60
  256. package/src/components/ui/badge.tsx +0 -40
  257. package/src/components/ui/card.tsx +0 -41
  258. package/src/components/ui/carousel.tsx +0 -234
  259. package/src/components/ui/checkbox.tsx +0 -27
  260. package/src/components/ui/collapsible.tsx +0 -21
  261. package/src/components/ui/field.tsx +0 -234
  262. package/src/components/ui/form.tsx +0 -154
  263. package/src/components/ui/label.tsx +0 -21
  264. package/src/components/ui/progress.tsx +0 -28
  265. package/src/components/ui/separator.tsx +0 -28
  266. package/src/components/ui/switch.tsx +0 -26
  267. package/src/components/ui/tabs.tsx +0 -52
  268. package/src/components/ui/toggle.tsx +0 -44
  269. package/src/components.tsx +0 -29
  270. package/src/hooks/index.ts +0 -20
  271. package/src/hooks/useWorkbenchSchemas.ts +0 -69
package/src/index.ts CHANGED
@@ -1,20 +1,11 @@
1
1
  // Export types
2
2
  export type { WorkbenchInstance } from './types';
3
3
 
4
- // Export UI components
5
- export { Button } from './components/ui/button';
6
- export {
7
- Card,
8
- CardHeader,
9
- CardTitle,
10
- CardDescription,
11
- CardContent,
12
- CardFooter,
13
- } from './components/ui/card';
14
- export { Input } from './components/ui/input';
15
-
16
4
  // Export components
17
5
  export { default as App } from './components/App';
18
- export { default as Inline } from './components/Inline';
19
- export { MonacoJsonEditor } from './components/internal/MonacoJsonEditor';
6
+ export { Chat } from './components/internal/Chat';
7
+ export { Schema } from './components/internal/Schema';
8
+ export { WorkbenchProvider, useWorkbench } from './components/internal/WorkbenchProvider';
9
+
10
+ // Export workbench functions
20
11
  export { createWorkbench } from './workbench';
@@ -0,0 +1,15 @@
1
+ /* Integration version - no Tailwind import, processed by app's Tailwind */
2
+ /* This file should be imported in the app's CSS file (e.g., globals.css) */
3
+ /* The app must have Tailwind imported before importing this file */
4
+
5
+ @import './base.css';
6
+
7
+ /* Tell Tailwind to scan workbench components for class names */
8
+ /* Note: The path below is relative to this CSS file's location in the package */
9
+ @source "./**/*.{ts,tsx}";
10
+
11
+ /* Workbench base styles */
12
+ /* Using @layer workbench-base with lower priority than app's base layer */
13
+ @layer workbench-base {
14
+ /* No global styles - workbench components use explicit classes */
15
+ }
@@ -0,0 +1,25 @@
1
+ /* Standalone version - includes Tailwind and all styles for standalone workbench */
2
+ @import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100..900&family=Geist:wght@100..900&display=block');
3
+ @import './base.css';
4
+ @import 'tailwindcss';
5
+ @plugin "tailwindcss-animate";
6
+ @variant dark (&:is(.dark *));
7
+
8
+ @layer base {
9
+ html,
10
+ body {
11
+ @apply h-full w-full m-0 p-0;
12
+ }
13
+
14
+ :root {
15
+ @apply font-sans;
16
+ }
17
+
18
+ * {
19
+ @apply border-border outline-ring/50;
20
+ }
21
+
22
+ #root {
23
+ @apply w-full h-full relative flex flex-col m-0 bg-background text-foreground;
24
+ }
25
+ }
@@ -1,7 +0,0 @@
1
- import type { ConnectionStatus as ConnectionStatusType } from '../types/config';
2
- interface ConnectionStatusProps {
3
- status: ConnectionStatusType;
4
- }
5
- export declare function ConnectionStatus({ status }: ConnectionStatusProps): import("react/jsx-runtime").JSX.Element | null;
6
- export {};
7
- //# sourceMappingURL=ConnectionStatus.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConnectionStatus.d.ts","sourceRoot":"","sources":["../../src/components/ConnectionStatus.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEhF,UAAU,qBAAqB;IAC9B,MAAM,EAAE,oBAAoB,CAAC;CAC7B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE,qBAAqB,kDA2DjE"}
@@ -1,52 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function ConnectionStatus({ status }) {
3
- if (status === 'connected') {
4
- return null; // Don't show anything when connected normally
5
- }
6
- const getStatusConfig = (status) => {
7
- switch (status) {
8
- case 'restarting':
9
- return {
10
- text: 'Server restarting...',
11
- bgColor: 'bg-amber-100',
12
- textColor: 'text-amber-800',
13
- borderColor: 'border-amber-200',
14
- icon: '🔄',
15
- };
16
- case 'disconnected':
17
- return {
18
- text: 'Disconnected from server',
19
- bgColor: 'bg-red-100',
20
- textColor: 'text-red-800',
21
- borderColor: 'border-red-200',
22
- icon: '⚠️',
23
- };
24
- case 'connected':
25
- return {
26
- text: 'Connected',
27
- bgColor: 'bg-green-100',
28
- textColor: 'text-green-800',
29
- borderColor: 'border-green-200',
30
- icon: '✅',
31
- };
32
- default:
33
- return {
34
- text: 'Unknown status',
35
- bgColor: 'bg-gray-100',
36
- textColor: 'text-gray-800',
37
- borderColor: 'border-gray-200',
38
- icon: '❓',
39
- };
40
- }
41
- };
42
- const config = getStatusConfig(status);
43
- return (_jsxs("div", { className: `
44
- fixed top-0 left-0 right-0 z-50
45
- px-4 py-2
46
- ${config.bgColor} ${config.textColor} ${config.borderColor}
47
- border-b
48
- text-center text-sm font-medium
49
- transition-all duration-200 ease-in-out
50
- `, children: [_jsx("span", { className: "mr-2", children: config.icon }), config.text] }));
51
- }
52
- //# sourceMappingURL=ConnectionStatus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConnectionStatus.js","sourceRoot":"","sources":["../../src/components/ConnectionStatus.tsx"],"names":[],"mappings":";AAOA,MAAM,UAAU,gBAAgB,CAAC,EAAE,MAAM,EAAyB;IACjE,IAAI,MAAM,KAAK,WAAW,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC,CAAC,8CAA8C;IAC5D,CAAC;IAED,MAAM,eAAe,GAAG,CAAC,MAA4B,EAAE,EAAE;QACxD,QAAQ,MAAM,EAAE,CAAC;YAChB,KAAK,YAAY;gBAChB,OAAO;oBACN,IAAI,EAAE,sBAAsB;oBAC5B,OAAO,EAAE,cAAc;oBACvB,SAAS,EAAE,gBAAgB;oBAC3B,WAAW,EAAE,kBAAkB;oBAC/B,IAAI,EAAE,IAAI;iBACV,CAAC;YACH,KAAK,cAAc;gBAClB,OAAO;oBACN,IAAI,EAAE,0BAA0B;oBAChC,OAAO,EAAE,YAAY;oBACrB,SAAS,EAAE,cAAc;oBACzB,WAAW,EAAE,gBAAgB;oBAC7B,IAAI,EAAE,IAAI;iBACV,CAAC;YACH,KAAK,WAAW;gBACf,OAAO;oBACN,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,cAAc;oBACvB,SAAS,EAAE,gBAAgB;oBAC3B,WAAW,EAAE,kBAAkB;oBAC/B,IAAI,EAAE,GAAG;iBACT,CAAC;YACH;gBACC,OAAO;oBACN,IAAI,EAAE,gBAAgB;oBACtB,OAAO,EAAE,aAAa;oBACtB,SAAS,EAAE,eAAe;oBAC1B,WAAW,EAAE,iBAAiB;oBAC9B,IAAI,EAAE,GAAG;iBACT,CAAC;QACJ,CAAC;IACF,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IAEvC,OAAO,CACN,eACC,SAAS,EAAE;;;MAGR,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,WAAW;;;;IAI1D,aAED,eAAM,SAAS,EAAC,MAAM,YAAE,MAAM,CAAC,IAAI,GAAQ,EAC1C,MAAM,CAAC,IAAI,IACP,CACN,CAAC;AACH,CAAC"}
@@ -1,10 +0,0 @@
1
- export interface InlineProps {
2
- className?: string;
3
- }
4
- /**
5
- * Inline component - just the chat area
6
- * Must be used within WorkbenchProvider
7
- */
8
- export declare function Inline({ className }: InlineProps): import("react/jsx-runtime").JSX.Element;
9
- export default Inline;
10
- //# sourceMappingURL=Inline.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Inline.d.ts","sourceRoot":"","sources":["../../src/components/Inline.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,WAAW,2CAEhD;AAED,eAAe,MAAM,CAAC"}
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Chat } from './internal/Chat';
3
- /**
4
- * Inline component - just the chat area
5
- * Must be used within WorkbenchProvider
6
- */
7
- export function Inline({ className }) {
8
- return _jsx(Chat, { className: className });
9
- }
10
- export default Inline;
11
- //# sourceMappingURL=Inline.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Inline.js","sourceRoot":"","sources":["../../src/components/Inline.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAMvC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,EAAE,SAAS,EAAe;IAChD,OAAO,KAAC,IAAI,IAAC,SAAS,EAAE,SAAS,GAAI,CAAC;AACvC,CAAC;AAED,eAAe,MAAM,CAAC"}
@@ -1,24 +0,0 @@
1
- import { Button } from '../ui/button';
2
- import { type LucideIcon } from 'lucide-react';
3
- import type { ComponentProps, HTMLAttributes } from 'react';
4
- export type ArtifactProps = HTMLAttributes<HTMLDivElement>;
5
- export declare const Artifact: ({ className, ...props }: ArtifactProps) => import("react/jsx-runtime").JSX.Element;
6
- export type ArtifactHeaderProps = HTMLAttributes<HTMLDivElement>;
7
- export declare const ArtifactHeader: ({ className, ...props }: ArtifactHeaderProps) => import("react/jsx-runtime").JSX.Element;
8
- export type ArtifactCloseProps = ComponentProps<typeof Button>;
9
- export declare const ArtifactClose: ({ className, children, size, variant, ...props }: ArtifactCloseProps) => import("react/jsx-runtime").JSX.Element;
10
- export type ArtifactTitleProps = HTMLAttributes<HTMLParagraphElement>;
11
- export declare const ArtifactTitle: ({ className, ...props }: ArtifactTitleProps) => import("react/jsx-runtime").JSX.Element;
12
- export type ArtifactDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
13
- export declare const ArtifactDescription: ({ className, ...props }: ArtifactDescriptionProps) => import("react/jsx-runtime").JSX.Element;
14
- export type ArtifactActionsProps = HTMLAttributes<HTMLDivElement>;
15
- export declare const ArtifactActions: ({ className, ...props }: ArtifactActionsProps) => import("react/jsx-runtime").JSX.Element;
16
- export type ArtifactActionProps = ComponentProps<typeof Button> & {
17
- tooltip?: string;
18
- label?: string;
19
- icon?: LucideIcon;
20
- };
21
- export declare const ArtifactAction: ({ tooltip, label, icon: Icon, children, className, size, variant, ...props }: ArtifactActionProps) => import("react/jsx-runtime").JSX.Element;
22
- export type ArtifactContentProps = HTMLAttributes<HTMLDivElement>;
23
- export declare const ArtifactContent: ({ className, ...props }: ArtifactContentProps) => import("react/jsx-runtime").JSX.Element;
24
- //# sourceMappingURL=artifact.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/artifact.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,KAAK,UAAU,EAAS,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5D,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAE3D,eAAO,MAAM,QAAQ,GAAI,yBAAyB,aAAa,4CAQ9D,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEjE,eAAO,MAAM,cAAc,GAAI,yBAAyB,mBAAmB,4CAK1E,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAE/D,eAAO,MAAM,aAAa,GAAI,kDAM3B,kBAAkB,4CAWpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAEtE,eAAO,MAAM,aAAa,GAAI,yBAAyB,kBAAkB,4CAExE,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAE5E,eAAO,MAAM,mBAAmB,GAAI,yBAAyB,wBAAwB,4CAEpF,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAElE,eAAO,MAAM,eAAe,GAAI,yBAAyB,oBAAoB,4CAE5E,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,8EAS5B,mBAAmB,4CA4BrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAElE,eAAO,MAAM,eAAe,GAAI,yBAAyB,oBAAoB,4CAE5E,CAAC"}
@@ -1,21 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Button } from '../ui/button';
4
- import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/tooltip';
5
- import { cn } from '../../lib/utils';
6
- import { XIcon } from 'lucide-react';
7
- export const Artifact = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm', className), ...props }));
8
- export const ArtifactHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex items-center justify-between border-b bg-muted/50 px-4 py-3', className), ...props }));
9
- export const ArtifactClose = ({ className, children, size = 'sm', variant = 'ghost', ...props }) => (_jsxs(Button, { className: cn('size-8 p-0 text-muted-foreground hover:text-foreground', className), size: size, type: "button", variant: variant, ...props, children: [children ?? _jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }));
10
- export const ArtifactTitle = ({ className, ...props }) => (_jsx("p", { className: cn('font-medium text-foreground text-sm', className), ...props }));
11
- export const ArtifactDescription = ({ className, ...props }) => (_jsx("p", { className: cn('text-muted-foreground text-sm', className), ...props }));
12
- export const ArtifactActions = ({ className, ...props }) => (_jsx("div", { className: cn('flex items-center gap-1', className), ...props }));
13
- export const ArtifactAction = ({ tooltip, label, icon: Icon, children, className, size = 'sm', variant = 'ghost', ...props }) => {
14
- const button = (_jsxs(Button, { className: cn('size-8 p-0 text-muted-foreground hover:text-foreground', className), size: size, type: "button", variant: variant, ...props, children: [Icon ? _jsx(Icon, { className: "size-4" }) : children, _jsx("span", { className: "sr-only", children: label || tooltip })] }));
15
- if (tooltip) {
16
- return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: button }), _jsx(TooltipContent, { children: _jsx("p", { children: tooltip }) })] }) }));
17
- }
18
- return button;
19
- };
20
- export const ArtifactContent = ({ className, ...props }) => (_jsx("div", { className: cn('flex-1 overflow-auto p-4', className), ...props }));
21
- //# sourceMappingURL=artifact.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"artifact.js","sourceRoot":"","sources":["../../../src/components/ai-elements/artifact.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAmB,KAAK,EAAE,MAAM,cAAc,CAAC;AAKtD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiB,EAAE,EAAE,CAAC,CACnE,cACC,SAAS,EAAE,EAAE,CACZ,yEAAyE,EACzE,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AAIF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAuB,EAAE,EAAE,CAAC,CAC/E,cACC,SAAS,EAAE,EAAE,CAAC,kEAAkE,EAAE,SAAS,CAAC,KACxF,KAAK,GACR,CACF,CAAC;AAIF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,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AAE,SAAS,CAAC,EAClF,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,KACZ,KAAK,aAER,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,EAC9C,eAAM,SAAS,EAAC,SAAS,YAAE,KAAK,IAAI,OAAO,GAAQ,IAC3C,CACT,CAAC;IAEF,IAAI,OAAO,EAAE,CAAC;QACb,OAAO,CACN,KAAC,eAAe,cACf,MAAC,OAAO,eACP,KAAC,cAAc,IAAC,OAAO,kBAAE,MAAM,GAAkB,EACjD,KAAC,cAAc,cACd,sBAAI,OAAO,GAAK,GACA,IACR,GACO,CAClB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwB,EAAE,EAAE,CAAC,CACjF,cAAK,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACxE,CAAC"}
@@ -1,21 +0,0 @@
1
- import { Button } from '../ui/button';
2
- import type { UIMessage } from 'ai';
3
- import type { ComponentProps, HTMLAttributes } from 'react';
4
- export type BranchProps = HTMLAttributes<HTMLDivElement> & {
5
- defaultBranch?: number;
6
- onBranchChange?: (branchIndex: number) => void;
7
- };
8
- export declare const Branch: ({ defaultBranch, onBranchChange, className, ...props }: BranchProps) => import("react/jsx-runtime").JSX.Element;
9
- export type BranchMessagesProps = HTMLAttributes<HTMLDivElement>;
10
- export declare const BranchMessages: ({ children, ...props }: BranchMessagesProps) => import("react/jsx-runtime").JSX.Element[];
11
- export type BranchSelectorProps = HTMLAttributes<HTMLDivElement> & {
12
- from: UIMessage['role'];
13
- };
14
- export declare const BranchSelector: ({ className, from, ...props }: BranchSelectorProps) => import("react/jsx-runtime").JSX.Element | null;
15
- export type BranchPreviousProps = ComponentProps<typeof Button>;
16
- export declare const BranchPrevious: ({ className, children, ...props }: BranchPreviousProps) => import("react/jsx-runtime").JSX.Element;
17
- export type BranchNextProps = ComponentProps<typeof Button>;
18
- export declare const BranchNext: ({ className, children, ...props }: BranchNextProps) => import("react/jsx-runtime").JSX.Element;
19
- export type BranchPageProps = HTMLAttributes<HTMLSpanElement>;
20
- export declare const BranchPage: ({ className, ...props }: BranchPageProps) => import("react/jsx-runtime").JSX.Element;
21
- //# sourceMappingURL=branch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/branch.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEpC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAgB,MAAM,OAAO,CAAC;AAwB1E,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,wDAA4D,WAAW,4CAiC7F,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEjE,eAAO,MAAM,cAAc,GAAI,wBAAwB,mBAAmB,8CAuBzE,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAClE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,+BAA+B,mBAAmB,mDAkBhF,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,cAAc,GAAI,mCAAmC,mBAAmB,4CAsBpF,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAE5D,eAAO,MAAM,UAAU,GAAI,mCAAmC,eAAe,4CAsB5E,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,UAAU,GAAI,yBAAyB,eAAe,4CAWlE,CAAC"}
@@ -1,71 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Button } from '../ui/button';
4
- import { cn } from '../../lib/utils';
5
- import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
6
- import { createContext, useContext, useEffect, useState } from 'react';
7
- const BranchContext = createContext(null);
8
- const useBranch = () => {
9
- const context = useContext(BranchContext);
10
- if (!context) {
11
- throw new Error('Branch components must be used within Branch');
12
- }
13
- return context;
14
- };
15
- export const Branch = ({ defaultBranch = 0, onBranchChange, className, ...props }) => {
16
- const [currentBranch, setCurrentBranch] = useState(defaultBranch);
17
- const [branches, setBranches] = useState([]);
18
- const handleBranchChange = (newBranch) => {
19
- setCurrentBranch(newBranch);
20
- onBranchChange?.(newBranch);
21
- };
22
- const goToPrevious = () => {
23
- const newBranch = currentBranch > 0 ? currentBranch - 1 : branches.length - 1;
24
- handleBranchChange(newBranch);
25
- };
26
- const goToNext = () => {
27
- const newBranch = currentBranch < branches.length - 1 ? currentBranch + 1 : 0;
28
- handleBranchChange(newBranch);
29
- };
30
- const contextValue = {
31
- currentBranch,
32
- totalBranches: branches.length,
33
- goToPrevious,
34
- goToNext,
35
- branches,
36
- setBranches,
37
- };
38
- return (_jsx(BranchContext.Provider, { value: contextValue, children: _jsx("div", { className: cn('grid w-full gap-2 [&>div]:pb-0', className), ...props }) }));
39
- };
40
- export const BranchMessages = ({ children, ...props }) => {
41
- const { currentBranch, setBranches, branches } = useBranch();
42
- const childrenArray = Array.isArray(children) ? children : [children];
43
- // Use useEffect to update branches when they change
44
- useEffect(() => {
45
- if (branches.length !== childrenArray.length) {
46
- setBranches(childrenArray);
47
- }
48
- }, [childrenArray, branches, setBranches]);
49
- return childrenArray.map((branch, index) => (_jsx("div", { className: cn('grid gap-2 overflow-hidden [&>div]:pb-0', index === currentBranch ? 'block' : 'hidden'), ...props, children: branch }, branch.key)));
50
- };
51
- export const BranchSelector = ({ className, from, ...props }) => {
52
- const { totalBranches } = useBranch();
53
- // Don't render if there's only one branch
54
- if (totalBranches <= 1) {
55
- return null;
56
- }
57
- return (_jsx("div", { className: cn('flex items-center gap-2 self-end px-10', from === 'assistant' ? 'justify-start' : 'justify-end', className), ...props }));
58
- };
59
- export const BranchPrevious = ({ className, children, ...props }) => {
60
- const { goToPrevious, totalBranches } = useBranch();
61
- return (_jsx(Button, { "aria-label": "Previous branch", className: cn('size-7 shrink-0 rounded-full text-muted-foreground transition-colors', 'hover:bg-accent hover:text-foreground', 'disabled:pointer-events-none disabled:opacity-50', className), disabled: totalBranches <= 1, onClick: goToPrevious, size: "icon", type: "button", variant: "ghost", ...props, children: children ?? _jsx(ChevronLeftIcon, { size: 14 }) }));
62
- };
63
- export const BranchNext = ({ className, children, ...props }) => {
64
- const { goToNext, totalBranches } = useBranch();
65
- return (_jsx(Button, { "aria-label": "Next branch", className: cn('size-7 shrink-0 rounded-full text-muted-foreground transition-colors', 'hover:bg-accent hover:text-foreground', 'disabled:pointer-events-none disabled:opacity-50', className), disabled: totalBranches <= 1, onClick: goToNext, size: "icon", type: "button", variant: "ghost", ...props, children: children ?? _jsx(ChevronRightIcon, { size: 14 }) }));
66
- };
67
- export const BranchPage = ({ className, ...props }) => {
68
- const { currentBranch, totalBranches } = useBranch();
69
- return (_jsxs("span", { className: cn('font-medium text-muted-foreground text-xs tabular-nums', className), ...props, children: [currentBranch + 1, " of ", totalBranches] }));
70
- };
71
- //# sourceMappingURL=branch.js.map
@@ -1 +0,0 @@
1
- {"version":3,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S,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB,EAAE,EAAE;IAChF,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,CAAC;IAEhD,OAAO,CACN,KAAC,MAAM,kBACK,aAAa,EACxB,SAAS,EAAE,EAAE,CACZ,sEAAsE,EACtE,uCAAuC,EACvC,kDAAkD,EAClD,SAAS,CACT,EACD,QAAQ,EAAE,aAAa,IAAI,CAAC,EAC5B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,OAAO,KACX,KAAK,YAER,QAAQ,IAAI,KAAC,gBAAgB,IAAC,IAAI,EAAE,EAAE,GAAI,GACnC,CACT,CAAC;AACH,CAAC,CAAC;AAIF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAmB,EAAE,EAAE;IACtE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,CAAC;IAErD,OAAO,CACN,gBACC,SAAS,EAAE,EAAE,CAAC,wDAAwD,EAAE,SAAS,CAAC,KAC9E,KAAK,aAER,aAAa,GAAG,CAAC,UAAM,aAAa,IAC/B,CACP,CAAC;AACH,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- import { type ReactFlowProps } from '@xyflow/react';
2
- import type { ReactNode } from 'react';
3
- import '@xyflow/react/dist/style.css';
4
- type CanvasProps = ReactFlowProps & {
5
- children?: ReactNode;
6
- };
7
- export declare const Canvas: ({ children, ...props }: CanvasProps) => import("react/jsx-runtime").JSX.Element;
8
- export {};
9
- //# sourceMappingURL=canvas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,8BAA8B,CAAC;AAGtC,KAAK,WAAW,GAAG,cAAc,GAAG;IACnC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,wBAAwB,WAAW,4CAczD,CAAC"}
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Background, ReactFlow } from '@xyflow/react';
3
- import '@xyflow/react/dist/style.css';
4
- import { Controls } from './controls';
5
- export const Canvas = ({ children, ...props }) => (_jsxs(ReactFlow, { deleteKeyCode: ['Backspace', 'Delete'], fitView: true, panOnDrag: false, panOnScroll: true, selectionOnDrag: true, zoomOnDoubleClick: false, ...props, children: [_jsx(Background, { bgColor: "var(--sidebar)" }), _jsx(Controls, {}), children] }));
6
- //# sourceMappingURL=canvas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"canvas.js","sourceRoot":"","sources":["../../../src/components/ai-elements/canvas.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAuB,MAAM,eAAe,CAAC;AAE3E,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAMtC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAe,EAAE,EAAE,CAAC,CAC9D,MAAC,SAAS,IACT,aAAa,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,EACtC,OAAO,QACP,SAAS,EAAE,KAAK,EAChB,WAAW,QACX,eAAe,EAAE,IAAI,EACrB,iBAAiB,EAAE,KAAK,KACpB,KAAK,aAET,KAAC,UAAU,IAAC,OAAO,EAAC,gBAAgB,GAAG,EACvC,KAAC,QAAQ,KAAG,EACX,QAAQ,IACE,CACZ,CAAC"}
@@ -1,30 +0,0 @@
1
- import { Badge } from '../ui/badge';
2
- import { CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
3
- import { type LucideIcon } from 'lucide-react';
4
- import type { ComponentProps } from 'react';
5
- export type ChainOfThoughtProps = ComponentProps<'div'> & {
6
- open?: boolean;
7
- defaultOpen?: boolean;
8
- onOpenChange?: (open: boolean) => void;
9
- };
10
- export declare const ChainOfThought: import("react").MemoExoticComponent<({ className, open, defaultOpen, onOpenChange, children, ...props }: ChainOfThoughtProps) => import("react/jsx-runtime").JSX.Element>;
11
- export type ChainOfThoughtHeaderProps = ComponentProps<typeof CollapsibleTrigger>;
12
- export declare const ChainOfThoughtHeader: import("react").MemoExoticComponent<({ className, children, ...props }: ChainOfThoughtHeaderProps) => import("react/jsx-runtime").JSX.Element>;
13
- export type ChainOfThoughtStepProps = ComponentProps<'div'> & {
14
- icon?: LucideIcon;
15
- label: string;
16
- description?: string;
17
- status?: 'complete' | 'active' | 'pending';
18
- };
19
- export declare const ChainOfThoughtStep: import("react").MemoExoticComponent<({ className, icon: Icon, label, description, status, children, ...props }: ChainOfThoughtStepProps) => import("react/jsx-runtime").JSX.Element>;
20
- export type ChainOfThoughtSearchResultsProps = ComponentProps<'div'>;
21
- export declare const ChainOfThoughtSearchResults: import("react").MemoExoticComponent<({ className, ...props }: ChainOfThoughtSearchResultsProps) => import("react/jsx-runtime").JSX.Element>;
22
- export type ChainOfThoughtSearchResultProps = ComponentProps<typeof Badge>;
23
- export declare const ChainOfThoughtSearchResult: import("react").MemoExoticComponent<({ className, children, ...props }: ChainOfThoughtSearchResultProps) => import("react/jsx-runtime").JSX.Element>;
24
- export type ChainOfThoughtContentProps = ComponentProps<typeof CollapsibleContent>;
25
- export declare const ChainOfThoughtContent: import("react").MemoExoticComponent<({ className, children, ...props }: ChainOfThoughtContentProps) => import("react/jsx-runtime").JSX.Element>;
26
- export type ChainOfThoughtImageProps = ComponentProps<'div'> & {
27
- caption?: string;
28
- };
29
- export declare const ChainOfThoughtImage: import("react").MemoExoticComponent<({ className, children, caption, ...props }: ChainOfThoughtImageProps) => import("react/jsx-runtime").JSX.Element>;
30
- //# sourceMappingURL=chain-of-thought.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chain-of-thought.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/chain-of-thought.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAe,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAExF,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAkB5C,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACzD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,cAAc,2GAQvB,mBAAmB,6CAiBtB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAElF,eAAO,MAAM,oBAAoB,0EACI,yBAAyB,6CAqB7D,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,kBAAkB,kHAS3B,uBAAuB,6CA6B1B,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAErE,eAAO,MAAM,2BAA2B,gEACb,gCAAgC,6CAG1D,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;AAE3E,eAAO,MAAM,0BAA0B,0EACF,+BAA+B,6CASnE,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEnF,eAAO,MAAM,qBAAqB,0EACG,0BAA0B,6CAkB9D,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,mBAAmB,mFACc,wBAAwB,6CAQrE,CAAC"}
@@ -1,52 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useControllableState } from '@radix-ui/react-use-controllable-state';
4
- import { Badge } from '../ui/badge';
5
- import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
6
- import { cn } from '../../lib/utils';
7
- import { BrainIcon, ChevronDownIcon, DotIcon } from 'lucide-react';
8
- import { createContext, memo, useContext, useMemo } from 'react';
9
- const ChainOfThoughtContext = createContext(null);
10
- const useChainOfThought = () => {
11
- const context = useContext(ChainOfThoughtContext);
12
- if (!context) {
13
- throw new Error('ChainOfThought components must be used within ChainOfThought');
14
- }
15
- return context;
16
- };
17
- export const ChainOfThought = memo(({ className, open, defaultOpen = false, onOpenChange, children, ...props }) => {
18
- const [isOpen, setIsOpen] = useControllableState({
19
- prop: open,
20
- defaultProp: defaultOpen,
21
- onChange: onOpenChange,
22
- });
23
- const chainOfThoughtContext = useMemo(() => ({ isOpen, setIsOpen }), [isOpen, setIsOpen]);
24
- return (_jsx(ChainOfThoughtContext.Provider, { value: chainOfThoughtContext, children: _jsx("div", { className: cn('not-prose max-w-prose space-y-4', className), ...props, children: children }) }));
25
- });
26
- export const ChainOfThoughtHeader = memo(({ className, children, ...props }) => {
27
- const { isOpen, setIsOpen } = useChainOfThought();
28
- return (_jsx(Collapsible, { onOpenChange: setIsOpen, open: isOpen, children: _jsxs(CollapsibleTrigger, { className: cn('flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground', className), ...props, children: [_jsx(BrainIcon, { className: "size-4" }), _jsx("span", { className: "flex-1 text-left", children: children ?? 'Chain of Thought' }), _jsx(ChevronDownIcon, { className: cn('size-4 transition-transform', isOpen ? 'rotate-180' : 'rotate-0') })] }) }));
29
- });
30
- export const ChainOfThoughtStep = memo(({ className, icon: Icon = DotIcon, label, description, status = 'complete', children, ...props }) => {
31
- const statusStyles = {
32
- complete: 'text-muted-foreground',
33
- active: 'text-foreground',
34
- pending: 'text-muted-foreground/50',
35
- };
36
- return (_jsxs("div", { className: cn('flex gap-2 text-sm', statusStyles[status], 'fade-in-0 slide-in-from-top-2 animate-in', className), ...props, children: [_jsxs("div", { className: "relative mt-0.5", children: [_jsx(Icon, { className: "size-4" }), _jsx("div", { className: "-mx-px absolute top-7 bottom-0 left-1/2 w-px bg-border" })] }), _jsxs("div", { className: "flex-1 space-y-2", children: [_jsx("div", { children: label }), description && _jsx("div", { className: "text-muted-foreground text-xs", children: description }), children] })] }));
37
- });
38
- export const ChainOfThoughtSearchResults = memo(({ className, ...props }) => (_jsx("div", { className: cn('flex items-center gap-2', className), ...props })));
39
- export const ChainOfThoughtSearchResult = memo(({ className, children, ...props }) => (_jsx(Badge, { className: cn('gap-1 px-2 py-0.5 font-normal text-xs', className), variant: "secondary", ...props, children: children })));
40
- export const ChainOfThoughtContent = memo(({ className, children, ...props }) => {
41
- const { isOpen } = useChainOfThought();
42
- return (_jsx(Collapsible, { open: isOpen, children: _jsx(CollapsibleContent, { className: cn('mt-2 space-y-3', 'data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in', className), ...props, children: children }) }));
43
- });
44
- export const ChainOfThoughtImage = memo(({ className, children, caption, ...props }) => (_jsxs("div", { className: cn('mt-2 space-y-2', className), ...props, children: [_jsx("div", { className: "relative flex max-h-[22rem] items-center justify-center overflow-hidden rounded-lg bg-muted p-3", children: children }), caption && _jsx("p", { className: "text-muted-foreground text-xs", children: caption })] })));
45
- ChainOfThought.displayName = 'ChainOfThought';
46
- ChainOfThoughtHeader.displayName = 'ChainOfThoughtHeader';
47
- ChainOfThoughtStep.displayName = 'ChainOfThoughtStep';
48
- ChainOfThoughtSearchResults.displayName = 'ChainOfThoughtSearchResults';
49
- ChainOfThoughtSearchResult.displayName = 'ChainOfThoughtSearchResult';
50
- ChainOfThoughtContent.displayName = 'ChainOfThoughtContent';
51
- ChainOfThoughtImage.displayName = 'ChainOfThoughtImage';
52
- //# sourceMappingURL=chain-of-thought.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chain-of-thought.js","sourceRoot":"","sources":["../../../src/components/ai-elements/chain-of-thought.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAmB,MAAM,cAAc,CAAC;AAEpF,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAOjE,MAAM,qBAAqB,GAAG,aAAa,CAAoC,IAAI,CAAC,CAAC;AAErF,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC9B,MAAM,OAAO,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAClD,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAC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2
- import { Button } from '../ui/button';
3
- import { type ComponentProps, type ReactNode } from 'react';
4
- export type ConfirmationProps = ComponentProps<typeof Alert> & {
5
- approval?: any;
6
- state: any;
7
- };
8
- export declare const Confirmation: ({ className, approval, state, ...props }: ConfirmationProps) => import("react/jsx-runtime").JSX.Element | null;
9
- export type ConfirmationTitleProps = ComponentProps<typeof AlertDescription>;
10
- export declare const ConfirmationTitle: ({ className, ...props }: ConfirmationTitleProps) => import("react/jsx-runtime").JSX.Element;
11
- export type ConfirmationRequestProps = {
12
- children?: ReactNode;
13
- };
14
- export declare const ConfirmationRequest: ({ children }: ConfirmationRequestProps) => ReactNode;
15
- export type ConfirmationAcceptedProps = {
16
- children?: ReactNode;
17
- };
18
- export declare const ConfirmationAccepted: ({ children }: ConfirmationAcceptedProps) => ReactNode;
19
- export type ConfirmationRejectedProps = {
20
- children?: ReactNode;
21
- };
22
- export declare const ConfirmationRejected: ({ children }: ConfirmationRejectedProps) => ReactNode;
23
- export type ConfirmationActionsProps = ComponentProps<'div'>;
24
- export declare const ConfirmationActions: ({ className, ...props }: ConfirmationActionsProps) => import("react/jsx-runtime").JSX.Element | null;
25
- export type ConfirmationActionProps = ComponentProps<typeof Button>;
26
- export declare const ConfirmationAction: (props: ConfirmationActionProps) => import("react/jsx-runtime").JSX.Element;
27
- //# sourceMappingURL=confirmation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"confirmation.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/confirmation.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,KAAK,cAAc,EAAiB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAmBvF,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,GAAG;IAC9D,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,0CAA0C,iBAAiB,mDAUvF,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE7E,eAAO,MAAM,iBAAiB,GAAI,yBAAyB,sBAAsB,4CAEhF,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,cAAc,wBAAwB,cASzE,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,cAAc,yBAAyB,cAY3E,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,cAAc,yBAAyB,cAY3E,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE7D,eAAO,MAAM,mBAAmB,GAAI,yBAAyB,wBAAwB,mDAWpF,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB,GAAI,OAAO,uBAAuB,4CAEhE,CAAC"}
@@ -1,57 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Alert, AlertDescription } from '../ui/alert';
4
- import { Button } from '../ui/button';
5
- import { cn } from '../../lib/utils';
6
- import { createContext, useContext } from 'react';
7
- const ConfirmationContext = createContext(null);
8
- const useConfirmation = () => {
9
- const context = useContext(ConfirmationContext);
10
- if (!context) {
11
- throw new Error('Confirmation components must be used within Confirmation');
12
- }
13
- return context;
14
- };
15
- export const Confirmation = ({ className, approval, state, ...props }) => {
16
- if (!approval || state === 'input-streaming' || state === 'input-available') {
17
- return null;
18
- }
19
- return (_jsx(ConfirmationContext.Provider, { value: { approval, state }, children: _jsx(Alert, { className: cn('flex flex-col gap-2', className), ...props }) }));
20
- };
21
- export const ConfirmationTitle = ({ className, ...props }) => (_jsx(AlertDescription, { className: cn('inline', className), ...props }));
22
- export const ConfirmationRequest = ({ children }) => {
23
- const { state } = useConfirmation();
24
- // Only show when approval is requested
25
- if (state !== 'approval-requested') {
26
- return null;
27
- }
28
- return children;
29
- };
30
- export const ConfirmationAccepted = ({ children }) => {
31
- const { approval, state } = useConfirmation();
32
- // Only show when approved and in response states
33
- if (!approval?.approved ||
34
- (state !== 'approval-responded' && state !== 'output-denied' && state !== 'output-available')) {
35
- return null;
36
- }
37
- return children;
38
- };
39
- export const ConfirmationRejected = ({ children }) => {
40
- const { approval, state } = useConfirmation();
41
- // Only show when rejected and in response states
42
- if (approval?.approved !== false ||
43
- (state !== 'approval-responded' && state !== 'output-denied' && state !== 'output-available')) {
44
- return null;
45
- }
46
- return children;
47
- };
48
- export const ConfirmationActions = ({ className, ...props }) => {
49
- const { state } = useConfirmation();
50
- // Only show when approval is requested
51
- if (state !== 'approval-requested') {
52
- return null;
53
- }
54
- return (_jsx("div", { className: cn('flex items-center justify-end gap-2 self-end', className), ...props }));
55
- };
56
- export const ConfirmationAction = (props) => (_jsx(Button, { className: "h-8 px-3 text-sm", type: "button", ...props }));
57
- //# sourceMappingURL=confirmation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"confirmation.js","sourceRoot":"","sources":["../../../src/components/ai-elements/confirmation.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAuB,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E,CAAC,CACrE,KAAC,MAAM,IAAC,SAAS,EAAC,kBAAkB,EAAC,IAAI,EAAC,QAAQ,KAAK,KAAK,GAAI,CAChE,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { ConnectionLineComponent } from '@xyflow/react';
2
- export declare const Connection: ConnectionLineComponent;
3
- //# sourceMappingURL=connection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/connection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAI7D,eAAO,MAAM,UAAU,EAAE,uBAWxB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- const HALF = 0.5;
3
- export const Connection = ({ fromX, fromY, toX, toY }) => (_jsxs("g", { children: [_jsx("path", { className: "animated", d: `M${fromX},${fromY} C ${fromX + (toX - fromX) * HALF},${fromY} ${fromX + (toX - fromX) * HALF},${toY} ${toX},${toY}`, fill: "none", stroke: "var(--color-ring)", strokeWidth: 1 }), _jsx("circle", { cx: toX, cy: toY, fill: "#fff", r: 3, stroke: "var(--color-ring)", strokeWidth: 1 })] }));
4
- //# sourceMappingURL=connection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../src/components/ai-elements/connection.tsx"],"names":[],"mappings":";AAEA,MAAM,IAAI,GAAG,GAAG,CAAC;AAEjB,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAClF,wBACC,eACC,SAAS,EAAC,UAAU,EACpB,CAAC,EAAE,IAAI,KAAK,IAAI,KAAK,MAAM,KAAK,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,IAAI,IAAI,KAAK,IAAI,KAAK,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,IAAI,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,EAAE,EACvH,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,mBAAmB,EAC1B,WAAW,EAAE,CAAC,GACb,EACF,iBAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAC,MAAM,EAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAC,mBAAmB,EAAC,WAAW,EAAE,CAAC,GAAI,IACtF,CACJ,CAAC"}