@carto/ps-react-ui 4.11.3 → 4.12.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 (103) hide show
  1. package/dist/chat.js +962 -733
  2. package/dist/chat.js.map +1 -1
  3. package/dist/csv-item-hH_Gt7ur.js +32 -0
  4. package/dist/csv-item-hH_Gt7ur.js.map +1 -0
  5. package/dist/{echart-BMPpj7n_.js → echart-Bdvbfx9s.js} +2 -2
  6. package/dist/echart-Bdvbfx9s.js.map +1 -0
  7. package/dist/{option-builders-F-c9ELi1.js → option-builders-DPeoyQaM.js} +41 -33
  8. package/dist/option-builders-DPeoyQaM.js.map +1 -0
  9. package/dist/png-item-9dNbB37T.js +57 -0
  10. package/dist/png-item-9dNbB37T.js.map +1 -0
  11. package/dist/table-B3ZWWhJt.js +383 -0
  12. package/dist/table-B3ZWWhJt.js.map +1 -0
  13. package/dist/types/chat/containers/chat-footer.d.ts +1 -1
  14. package/dist/types/chat/containers/styles.d.ts +79 -12
  15. package/dist/types/chat/index.d.ts +1 -1
  16. package/dist/types/chat/types.d.ts +21 -0
  17. package/dist/types/chat/use-typewriter.d.ts +5 -3
  18. package/dist/types/widgets/utils/chart-config/index.d.ts +1 -1
  19. package/dist/types/widgets-v2/actions/download/constants.d.ts +12 -0
  20. package/dist/types/widgets-v2/actions/download/csv-item.d.ts +38 -0
  21. package/dist/types/widgets-v2/actions/download/icons.d.ts +6 -0
  22. package/dist/types/widgets-v2/actions/download/index.d.ts +3 -1
  23. package/dist/types/widgets-v2/actions/index.d.ts +1 -1
  24. package/dist/types/widgets-v2/pie/skeleton.d.ts +9 -0
  25. package/dist/widgets/bar.js +1 -1
  26. package/dist/widgets/histogram.js +1 -1
  27. package/dist/widgets/pie.js +1 -1
  28. package/dist/widgets/scatterplot.js +5 -5
  29. package/dist/widgets/timeseries.js +1 -1
  30. package/dist/widgets/utils.js +1 -1
  31. package/dist/widgets-v2/actions.js +40 -36
  32. package/dist/widgets-v2/actions.js.map +1 -1
  33. package/dist/widgets-v2/bar.js +69 -76
  34. package/dist/widgets-v2/bar.js.map +1 -1
  35. package/dist/widgets-v2/category.js +50 -55
  36. package/dist/widgets-v2/category.js.map +1 -1
  37. package/dist/widgets-v2/echart.js +1 -1
  38. package/dist/widgets-v2/formula.js +37 -43
  39. package/dist/widgets-v2/formula.js.map +1 -1
  40. package/dist/widgets-v2/histogram.js +141 -147
  41. package/dist/widgets-v2/histogram.js.map +1 -1
  42. package/dist/widgets-v2/markdown.js +18 -17
  43. package/dist/widgets-v2/markdown.js.map +1 -1
  44. package/dist/widgets-v2/pie.js +174 -126
  45. package/dist/widgets-v2/pie.js.map +1 -1
  46. package/dist/widgets-v2/scatterplot.js +156 -166
  47. package/dist/widgets-v2/scatterplot.js.map +1 -1
  48. package/dist/widgets-v2/spread.js +36 -41
  49. package/dist/widgets-v2/spread.js.map +1 -1
  50. package/dist/widgets-v2/table.js +46 -55
  51. package/dist/widgets-v2/table.js.map +1 -1
  52. package/dist/widgets-v2/timeseries.js +83 -89
  53. package/dist/widgets-v2/timeseries.js.map +1 -1
  54. package/dist/widgets-v2.js +3 -3
  55. package/package.json +1 -1
  56. package/src/chat/bubbles/styles.ts +5 -1
  57. package/src/chat/containers/chat-content.tsx +4 -1
  58. package/src/chat/containers/chat-footer.test.tsx +59 -0
  59. package/src/chat/containers/chat-footer.tsx +124 -36
  60. package/src/chat/containers/styles.ts +107 -16
  61. package/src/chat/feedback/styles.ts +11 -4
  62. package/src/chat/index.ts +1 -0
  63. package/src/chat/types.ts +22 -0
  64. package/src/chat/use-typewriter.ts +32 -24
  65. package/src/widgets/utils/chart-config/index.ts +1 -0
  66. package/src/widgets/utils/chart-config/option-builders.test.ts +34 -0
  67. package/src/widgets/utils/chart-config/option-builders.ts +21 -0
  68. package/src/widgets-v2/actions/download/constants.ts +14 -0
  69. package/src/widgets-v2/actions/download/csv-item.test.tsx +77 -0
  70. package/src/widgets-v2/actions/download/csv-item.tsx +71 -0
  71. package/src/widgets-v2/actions/download/icons.tsx +10 -1
  72. package/src/widgets-v2/actions/download/index.ts +3 -1
  73. package/src/widgets-v2/actions/download/png-item.tsx +2 -1
  74. package/src/widgets-v2/actions/index.ts +5 -0
  75. package/src/widgets-v2/bar/download.tsx +16 -22
  76. package/src/widgets-v2/bar/options.ts +3 -2
  77. package/src/widgets-v2/category/download.test.ts +9 -0
  78. package/src/widgets-v2/category/download.ts +16 -20
  79. package/src/widgets-v2/echart/edge-label-clamp.ts +7 -4
  80. package/src/widgets-v2/formula/download.tsx +23 -29
  81. package/src/widgets-v2/histogram/download.ts +22 -26
  82. package/src/widgets-v2/histogram/options.ts +3 -2
  83. package/src/widgets-v2/markdown/{download.ts → download.tsx} +5 -2
  84. package/src/widgets-v2/pie/download.ts +16 -20
  85. package/src/widgets-v2/pie/skeleton.test.tsx +6 -3
  86. package/src/widgets-v2/pie/skeleton.tsx +69 -7
  87. package/src/widgets-v2/scatterplot/download.ts +16 -20
  88. package/src/widgets-v2/scatterplot/options.ts +3 -6
  89. package/src/widgets-v2/spread/download.ts +23 -27
  90. package/src/widgets-v2/table/download.test.ts +10 -0
  91. package/src/widgets-v2/table/download.ts +11 -15
  92. package/src/widgets-v2/table/helpers.test.ts +19 -0
  93. package/src/widgets-v2/table/helpers.ts +7 -12
  94. package/src/widgets-v2/timeseries/download.ts +36 -40
  95. package/src/widgets-v2/timeseries/options.ts +3 -2
  96. package/dist/echart-BMPpj7n_.js.map +0 -1
  97. package/dist/option-builders-F-c9ELi1.js.map +0 -1
  98. package/dist/png-item-BE9uEqlD.js +0 -45
  99. package/dist/png-item-BE9uEqlD.js.map +0 -1
  100. package/dist/table-C9IMbTr0.js +0 -385
  101. package/dist/table-C9IMbTr0.js.map +0 -1
  102. package/dist/types/chat/feedback/styles.d.ts +0 -211
  103. package/dist/types/widgets/utils/chart-config/option-builders.d.ts +0 -124
package/dist/chat.js CHANGED
@@ -1,50 +1,68 @@
1
- import { useRef as X, useState as N, useEffect as Z, forwardRef as ve, useImperativeHandle as Te } from "react";
2
- import { jsx as c, jsxs as k, Fragment as we } from "react/jsx-runtime";
3
- import { c as W } from "react/compiler-runtime";
4
- import { styled as ae, Typography as A, Box as C, Link as ke, ButtonBase as Se, Fab as Ae, IconButton as H, FilledInput as _e, FormHelperText as Ie, FormControl as Ee, DialogTitle as Le, DialogContent as $e, Dialog as Re, Tooltip as De, Button as ie, Collapse as se, CircularProgress as Be } from "@mui/material";
5
- import { ErrorOutline as he, ArrowUpward as Fe, KeyboardArrowDown as We, Close as ge, StopCircleOutlined as ze, ArrowUpwardOutlined as Me, ThumbUp as Oe, ThumbUpOutlined as He, ThumbDown as Pe, ThumbDownOutlined as Ve, ArrowRight as xe, Error as je, CheckCircle as Ue, ChevronRight as Ne } from "@mui/icons-material";
1
+ import { c as P } from "react/compiler-runtime";
2
+ import { useState as te, useRef as ne, useEffect as re, forwardRef as we, useImperativeHandle as Te } from "react";
3
+ import { jsx as a, jsxs as S, Fragment as he } from "react/jsx-runtime";
4
+ import { styled as ae, Typography as z, Box as v, Link as ke, ButtonBase as _e, Fab as Ae, IconButton as oe, Button as le, Menu as Ie, MenuItem as Le, InputBase as $e, FormHelperText as Ee, FormControl as Re, DialogTitle as Be, DialogContent as De, Dialog as Me, Tooltip as ze, Collapse as se, CircularProgress as We } from "@mui/material";
5
+ import { ErrorOutline as ge, ArrowUpward as Fe, KeyboardArrowDown as xe, Close as be, StopCircleOutlined as Oe, ArrowUpwardOutlined as He, ThumbUp as Pe, ThumbUpOutlined as Ve, ThumbDown as je, ThumbDownOutlined as Ue, ArrowRight as ye, Error as Ne, CheckCircle as Ge, ChevronRight as Xe } from "@mui/icons-material";
6
6
  import { keyframes as ce } from "@mui/material/styles";
7
- import { C as Ge } from "./copy-button-DGL1tyli.js";
8
- import { OpenDiagonallyRight as Xe, McpTool as Ye } from "@carto/meridian-ds/custom-icons";
9
- const Q = 768, _t = 300, It = 100, Ke = 126;
10
- function Et(t, e = {}) {
11
- const {
12
- speed: n = 500,
13
- skipAnimation: r = !1
14
- } = e, l = X(r), [o, d] = N(() => l.current ? t.length : 0);
15
- return Z(() => {
16
- if (l.current) {
17
- d(t.length);
7
+ import { C as Ke } from "./copy-button-DGL1tyli.js";
8
+ import { OpenDiagonallyRight as Ye, McpTool as qe } from "@carto/meridian-ds/custom-icons";
9
+ const ie = 768, $t = 300, Et = 100, Je = 126;
10
+ function Rt(t, e) {
11
+ const o = P(17);
12
+ let n;
13
+ o[0] !== e ? (n = e === void 0 ? {} : e, o[0] = e, o[1] = n) : n = o[1];
14
+ const i = n, {
15
+ speed: r,
16
+ skipAnimation: u
17
+ } = i, s = r === void 0 ? 500 : r, l = u === void 0 ? !1 : u;
18
+ let c;
19
+ o[2] !== t || o[3] !== l ? (c = () => l ? t.length : 0, o[2] = t, o[3] = l, o[4] = c) : c = o[4];
20
+ const [f, m] = te(c), h = ne(f);
21
+ let b, p;
22
+ o[5] !== t || o[6] !== l || o[7] !== s ? (b = () => {
23
+ if (l || h.current >= t.length)
18
24
  return;
25
+ const y = 1e3 / s;
26
+ let C, w = null;
27
+ function _(L) {
28
+ w = w ?? L;
29
+ const $ = Math.floor((L - w) / y);
30
+ if ($ > 0) {
31
+ w = L;
32
+ const A = Math.min(h.current + $, t.length);
33
+ if (h.current = A, m(A), A >= t.length)
34
+ return;
35
+ }
36
+ C = requestAnimationFrame(_);
19
37
  }
20
- if (o >= t.length)
21
- return;
22
- const s = 1e3 / n;
23
- let i, a = null;
24
- function p(m) {
25
- a ??= m;
26
- const g = m - a, x = Math.floor(g / s);
27
- x > 0 && (a = m, d((h) => Math.min(h + x, t.length))), i = requestAnimationFrame(p);
28
- }
29
- return i = requestAnimationFrame(p), () => cancelAnimationFrame(i);
30
- }, [t, o, n]), {
31
- displayedText: t.slice(0, o),
32
- isTyping: o < t.length
33
- };
38
+ return C = requestAnimationFrame(_), () => cancelAnimationFrame(C);
39
+ }, p = [t, s, l], o[5] = t, o[6] = l, o[7] = s, o[8] = b, o[9] = p) : (b = o[8], p = o[9]), re(b, p);
40
+ let g;
41
+ o[10] !== f || o[11] !== t || o[12] !== l ? (g = l ? t : t.slice(0, f), o[10] = f, o[11] = t, o[12] = l, o[13] = g) : g = o[13];
42
+ const d = !l && f < t.length;
43
+ let x;
44
+ return o[14] !== g || o[15] !== d ? (x = {
45
+ displayedText: g,
46
+ isTyping: d
47
+ }, o[14] = g, o[15] = d, o[16] = x) : x = o[16], x;
34
48
  }
35
- const be = ae(A)(() => ({
49
+ const Ce = ae(z)(() => ({
36
50
  whiteSpace: "pre-wrap",
37
51
  overflowX: "clip",
38
52
  overflowWrap: "break-word",
39
53
  maxWidth: "100%"
40
54
  }));
41
- be.displayName = "ChatMessageOverflow";
42
- const O = {
55
+ Ce.displayName = "ChatMessageOverflow";
56
+ const ee = {
43
57
  agentMessageContainer: (t) => ({
58
+ ...t.typography.body2,
44
59
  width: "100%",
45
60
  display: "flex",
46
61
  flexDirection: "column",
47
62
  alignItems: "flex-start",
63
+ // Separate the stacked turn blocks (tools → answer text → actions) per the
64
+ // Figma "Chat Turn" spec (gap-8).
65
+ gap: t.spacing(1),
48
66
  paddingRight: t.spacing(4),
49
67
  "& + .PsChat--agent-message": {
50
68
  marginTop: t.spacing(1)
@@ -131,7 +149,7 @@ const O = {
131
149
  }) => `1px solid ${t.divider}`,
132
150
  backgroundColor: ({
133
151
  palette: t
134
- }) => t.background.default,
152
+ }) => t.background.paper,
135
153
  color: ({
136
154
  palette: t
137
155
  }) => t.text.primary,
@@ -231,125 +249,125 @@ const O = {
231
249
  }
232
250
  }
233
251
  };
234
- function Lt(t) {
235
- const e = W(11), {
236
- children: n,
237
- muted: r,
238
- topContext: l,
239
- sx: o
240
- } = t, d = r === void 0 ? !1 : r;
252
+ function Bt(t) {
253
+ const e = P(11), {
254
+ children: o,
255
+ muted: n,
256
+ topContext: i,
257
+ sx: r
258
+ } = t, u = n === void 0 ? !1 : n;
241
259
  let s;
242
- e[0] !== l ? (s = l && /* @__PURE__ */ c(C, { sx: O.userMessageTop, children: l }), e[0] = l, e[1] = s) : s = e[1];
243
- const i = d ? O.muted : void 0;
244
- let a;
245
- e[2] !== o || e[3] !== i ? (a = {
246
- ...O.userMessage,
247
- ...i,
248
- ...o
249
- }, e[2] = o, e[3] = i, e[4] = a) : a = e[4];
250
- let p;
251
- e[5] !== n || e[6] !== a ? (p = /* @__PURE__ */ c(be, { className: "PsChat--user-message-inner", variant: "body2", sx: a, children: n }), e[5] = n, e[6] = a, e[7] = p) : p = e[7];
260
+ e[0] !== i ? (s = i && /* @__PURE__ */ a(v, { sx: ee.userMessageTop, children: i }), e[0] = i, e[1] = s) : s = e[1];
261
+ const l = u ? ee.muted : void 0;
262
+ let c;
263
+ e[2] !== r || e[3] !== l ? (c = {
264
+ ...ee.userMessage,
265
+ ...l,
266
+ ...r
267
+ }, e[2] = r, e[3] = l, e[4] = c) : c = e[4];
268
+ let f;
269
+ e[5] !== o || e[6] !== c ? (f = /* @__PURE__ */ a(Ce, { className: "PsChat--user-message-inner", variant: "body2", sx: c, children: o }), e[5] = o, e[6] = c, e[7] = f) : f = e[7];
252
270
  let m;
253
- return e[8] !== s || e[9] !== p ? (m = /* @__PURE__ */ k(C, { className: "PsChat--user-message", sx: O.userMessageContainer, children: [
271
+ return e[8] !== s || e[9] !== f ? (m = /* @__PURE__ */ S(v, { className: "PsChat--user-message", sx: ee.userMessageContainer, children: [
254
272
  s,
255
- p
256
- ] }), e[8] = s, e[9] = p, e[10] = m) : m = e[10], m;
273
+ f
274
+ ] }), e[8] = s, e[9] = f, e[10] = m) : m = e[10], m;
257
275
  }
258
- const qe = (t) => {
259
- const e = W(6);
260
- let n, r;
276
+ const Qe = (t) => {
277
+ const e = P(6);
278
+ let o, n;
261
279
  e[0] !== t ? ({
262
- className: n,
263
- ...r
264
- } = t, e[0] = t, e[1] = n, e[2] = r) : (n = e[1], r = e[2]);
265
- const l = `PsChat--agent-message ${n ?? ""}`;
266
- let o;
267
- return e[3] !== r || e[4] !== l ? (o = /* @__PURE__ */ c(C, { className: l, ...r }), e[3] = r, e[4] = l, e[5] = o) : o = e[5], o;
268
- }, Je = ae(qe)(({
280
+ className: o,
281
+ ...n
282
+ } = t, e[0] = t, e[1] = o, e[2] = n) : (o = e[1], n = e[2]);
283
+ const i = `PsChat--agent-message ${o ?? ""}`;
284
+ let r;
285
+ return e[3] !== n || e[4] !== i ? (r = /* @__PURE__ */ a(v, { className: i, ...n }), e[3] = n, e[4] = i, e[5] = r) : r = e[5], r;
286
+ }, Ze = ae(Qe)(({
269
287
  theme: t
270
- }) => O.agentMessageContainer(t));
271
- Je.displayName = "ChatAgentMessage";
272
- function $t(t) {
273
- const e = W(13), {
274
- errors: n,
275
- icon: r,
276
- actions: l,
277
- sx: o
288
+ }) => ee.agentMessageContainer(t));
289
+ Ze.displayName = "ChatAgentMessage";
290
+ function Dt(t) {
291
+ const e = P(13), {
292
+ errors: o,
293
+ icon: n,
294
+ actions: i,
295
+ sx: r
278
296
  } = t;
279
- let d;
280
- e[0] !== o ? (d = {
281
- ...O.errorMessage,
282
- ...o
283
- }, e[0] = o, e[1] = d) : d = e[1];
297
+ let u;
298
+ e[0] !== r ? (u = {
299
+ ...ee.errorMessage,
300
+ ...r
301
+ }, e[0] = r, e[1] = u) : u = e[1];
284
302
  let s;
285
- e[2] !== r ? (s = r ?? /* @__PURE__ */ c(he, { fontSize: "medium", color: "error" }), e[2] = r, e[3] = s) : s = e[3];
286
- let i;
287
- e[4] !== n ? (i = n.map(Ze), e[4] = n, e[5] = i) : i = e[5];
288
- let a;
289
- e[6] !== l ? (a = l?.length ? /* @__PURE__ */ c(C, { sx: O.errorActions, children: (l ?? []).map(Qe) }) : null, e[6] = l, e[7] = a) : a = e[7];
290
- let p;
291
- return e[8] !== d || e[9] !== s || e[10] !== i || e[11] !== a ? (p = /* @__PURE__ */ k(C, { sx: d, children: [
303
+ e[2] !== n ? (s = n ?? /* @__PURE__ */ a(ge, { fontSize: "medium", color: "error" }), e[2] = n, e[3] = s) : s = e[3];
304
+ let l;
305
+ e[4] !== o ? (l = o.map(tt), e[4] = o, e[5] = l) : l = e[5];
306
+ let c;
307
+ e[6] !== i ? (c = i?.length ? /* @__PURE__ */ a(v, { sx: ee.errorActions, children: (i ?? []).map(et) }) : null, e[6] = i, e[7] = c) : c = e[7];
308
+ let f;
309
+ return e[8] !== u || e[9] !== s || e[10] !== l || e[11] !== c ? (f = /* @__PURE__ */ S(v, { sx: u, children: [
292
310
  s,
293
- i,
294
- a
295
- ] }), e[8] = d, e[9] = s, e[10] = i, e[11] = a, e[12] = p) : p = e[12], p;
311
+ l,
312
+ c
313
+ ] }), e[8] = u, e[9] = s, e[10] = l, e[11] = c, e[12] = f) : f = e[12], f;
296
314
  }
297
- function Qe(t, e) {
298
- return /* @__PURE__ */ k("span", { children: [
299
- e > 0 && /* @__PURE__ */ c(A, { component: "span", variant: "body2", sx: O.errorActionSeparator, children: "·" }),
300
- /* @__PURE__ */ c(ke, { component: "button", variant: "body2", onClick: t.onClick, sx: O.errorAction, children: t.label })
315
+ function et(t, e) {
316
+ return /* @__PURE__ */ S("span", { children: [
317
+ e > 0 && /* @__PURE__ */ a(z, { component: "span", variant: "body2", sx: ee.errorActionSeparator, children: "·" }),
318
+ /* @__PURE__ */ a(ke, { component: "button", variant: "body2", onClick: t.onClick, sx: ee.errorAction, children: t.label })
301
319
  ] }, e);
302
320
  }
303
- function Ze(t, e) {
304
- return /* @__PURE__ */ c(A, { variant: "subtitle2", color: "error.relatedDark", children: t }, e);
321
+ function tt(t, e) {
322
+ return /* @__PURE__ */ a(z, { variant: "subtitle2", color: "error.relatedDark", children: t }, e);
305
323
  }
306
- function et(t) {
307
- const e = W(17);
308
- let n, r, l, o;
324
+ function ot(t) {
325
+ const e = P(17);
326
+ let o, n, i, r;
309
327
  e[0] !== t ? ({
310
- label: r,
311
- color: n,
312
- sx: o,
313
- ...l
314
- } = t, e[0] = t, e[1] = n, e[2] = r, e[3] = l, e[4] = o) : (n = e[1], r = e[2], l = e[3], o = e[4]);
315
- let d;
316
- e[5] !== n ? (d = n ? {
317
- backgroundColor: n
318
- } : void 0, e[5] = n, e[6] = d) : d = e[6];
328
+ label: n,
329
+ color: o,
330
+ sx: r,
331
+ ...i
332
+ } = t, e[0] = t, e[1] = o, e[2] = n, e[3] = i, e[4] = r) : (o = e[1], n = e[2], i = e[3], r = e[4]);
333
+ let u;
334
+ e[5] !== o ? (u = o ? {
335
+ backgroundColor: o
336
+ } : void 0, e[5] = o, e[6] = u) : u = e[6];
319
337
  let s;
320
- e[7] !== o || e[8] !== d ? (s = {
321
- ...O.suggestionButton,
322
- ...d,
323
- ...o
324
- }, e[7] = o, e[8] = d, e[9] = s) : s = e[9];
325
- let i;
326
- e[10] !== r ? (i = /* @__PURE__ */ c(A, { color: "inherit", variant: "body2", children: r }), e[10] = r, e[11] = i) : i = e[11];
327
- let a;
328
- e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ c(Fe, {}), e[12] = a) : a = e[12];
329
- let p;
330
- return e[13] !== l || e[14] !== s || e[15] !== i ? (p = /* @__PURE__ */ k(Se, { sx: s, ...l, children: [
331
- i,
332
- a
333
- ] }), e[13] = l, e[14] = s, e[15] = i, e[16] = p) : p = e[16], p;
338
+ e[7] !== r || e[8] !== u ? (s = {
339
+ ...ee.suggestionButton,
340
+ ...u,
341
+ ...r
342
+ }, e[7] = r, e[8] = u, e[9] = s) : s = e[9];
343
+ let l;
344
+ e[10] !== n ? (l = /* @__PURE__ */ a(z, { color: "inherit", variant: "body2", children: n }), e[10] = n, e[11] = l) : l = e[11];
345
+ let c;
346
+ e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ a(Fe, {}), e[12] = c) : c = e[12];
347
+ let f;
348
+ return e[13] !== i || e[14] !== s || e[15] !== l ? (f = /* @__PURE__ */ S(_e, { sx: s, ...i, children: [
349
+ l,
350
+ c
351
+ ] }), e[13] = i, e[14] = s, e[15] = l, e[16] = f) : f = e[16], f;
334
352
  }
335
- const tt = ce`
353
+ const nt = ce`
336
354
  0% {
337
355
  background-position: 150% 0;
338
356
  }
339
357
  100% {
340
358
  background-position: -50% 0;
341
359
  }
342
- `, nt = ce`
360
+ `, rt = ce`
343
361
  0% { transform: scale(0.68); opacity: 0.7; }
344
362
  40% { transform: scale(1); opacity: 1; }
345
363
  80% { transform: scale(0.6); opacity: 0.65; }
346
364
  100% { transform: scale(0.68); opacity: 0.7; }
347
- `, ot = ce`
365
+ `, lt = ce`
348
366
  0% { transform: scale(1); }
349
367
  40% { transform: scale(0.75); }
350
368
  80% { transform: scale(1.125); }
351
369
  100% { transform: scale(1); }
352
- `, w = {
370
+ `, T = {
353
371
  thinking: {
354
372
  display: "flex",
355
373
  alignItems: "center",
@@ -368,7 +386,7 @@ const tt = ce`
368
386
  backgroundClip: "text",
369
387
  WebkitBackgroundClip: "text",
370
388
  WebkitTextFillColor: "transparent",
371
- animation: `${tt} 2s ease-in-out infinite`,
389
+ animation: `${nt} 2s ease-in-out infinite`,
372
390
  animationDuration: "2s"
373
391
  },
374
392
  loader: {
@@ -386,7 +404,7 @@ const tt = ce`
386
404
  backgroundColor: ({
387
405
  palette: t
388
406
  }) => t.action.disabled,
389
- animation: `${nt} 1s ease-in-out infinite`
407
+ animation: `${rt} 1s ease-in-out infinite`
390
408
  },
391
409
  loaderInnerCircle: {
392
410
  position: "absolute",
@@ -396,7 +414,7 @@ const tt = ce`
396
414
  backgroundColor: ({
397
415
  palette: t
398
416
  }) => t.text.primary,
399
- animation: `${ot} 1s ease-in-out infinite`
417
+ animation: `${lt} 1s ease-in-out infinite`
400
418
  },
401
419
  // --- Tool Trace styles ---
402
420
  traceHeader: {
@@ -492,8 +510,15 @@ const tt = ce`
492
510
  backgroundColor: ({
493
511
  palette: t
494
512
  }) => t.background.default,
495
- fontSize: "0.75rem",
496
- fontFamily: "monospace",
513
+ fontFamily: ({
514
+ typography: t
515
+ }) => t.code3?.fontFamily ?? t.code1?.fontFamily ?? "monospace",
516
+ fontSize: ({
517
+ typography: t
518
+ }) => t.code3?.fontSize ?? "0.75rem",
519
+ lineHeight: ({
520
+ typography: t
521
+ }) => t.code3?.lineHeight ?? 1.333,
497
522
  whiteSpace: "pre-wrap",
498
523
  wordBreak: "break-word",
499
524
  overflowY: "auto"
@@ -549,8 +574,12 @@ const tt = ce`
549
574
  palette: t,
550
575
  spacing: e
551
576
  }) => `linear-gradient(to right, ${t.action.hover} calc(${e(1)} + 3em), ${t.background.default} calc(${e(1)} + 3em))`,
552
- fontFamily: "monospace",
553
- fontSize: "0.8125rem",
577
+ fontFamily: ({
578
+ typography: t
579
+ }) => t.code3?.fontFamily ?? t.code1?.fontFamily ?? "monospace",
580
+ fontSize: ({
581
+ typography: t
582
+ }) => t.code3?.fontSize ?? "0.75rem",
554
583
  whiteSpace: "pre-wrap",
555
584
  wordBreak: "break-word",
556
585
  lineHeight: 1.6,
@@ -630,58 +659,58 @@ const tt = ce`
630
659
  }
631
660
  }
632
661
  };
633
- function rt(t) {
634
- const e = W(6), {
635
- children: n,
636
- duration: r,
637
- sx: l
638
- } = t, o = n === void 0 ? "Thinking..." : n, s = `${(r === void 0 ? 2e3 : r) / 1e3}s`;
639
- let i;
640
- e[0] !== s || e[1] !== l ? (i = {
641
- ...w.thinking,
662
+ function it(t) {
663
+ const e = P(6), {
664
+ children: o,
665
+ duration: n,
666
+ sx: i
667
+ } = t, r = o === void 0 ? "Thinking..." : o, s = `${(n === void 0 ? 2e3 : n) / 1e3}s`;
668
+ let l;
669
+ e[0] !== s || e[1] !== i ? (l = {
670
+ ...T.thinking,
642
671
  animationDuration: s,
643
- ...l
644
- }, e[0] = s, e[1] = l, e[2] = i) : i = e[2];
645
- let a;
646
- return e[3] !== o || e[4] !== i ? (a = /* @__PURE__ */ c(A, { variant: "body2", sx: i, children: o }), e[3] = o, e[4] = i, e[5] = a) : a = e[5], a;
672
+ ...i
673
+ }, e[0] = s, e[1] = i, e[2] = l) : l = e[2];
674
+ let c;
675
+ return e[3] !== r || e[4] !== l ? (c = /* @__PURE__ */ a(z, { variant: "body2", sx: l, children: r }), e[3] = r, e[4] = l, e[5] = c) : c = e[5], c;
647
676
  }
648
- function Rt(t) {
649
- const e = W(16), {
650
- size: n,
651
- labels: r,
652
- sx: l
653
- } = t, o = n === void 0 ? 24 : n;
654
- let d;
655
- e[0] !== r ? (d = r === void 0 ? {} : r, e[0] = r, e[1] = d) : d = e[1];
656
- const i = d.loading ?? "Loading";
657
- let a;
658
- e[2] !== o || e[3] !== l ? (a = {
659
- ...w.loader,
660
- width: o,
661
- height: o,
662
- ...l
663
- }, e[2] = o, e[3] = l, e[4] = a) : a = e[4];
664
- const p = o * 0.75, m = o * 0.75;
665
- let g;
666
- e[5] !== p || e[6] !== m ? (g = /* @__PURE__ */ c(C, { component: "span", sx: {
667
- ...w.loaderOuterCircle,
668
- width: p,
669
- height: m
670
- } }), e[5] = p, e[6] = m, e[7] = g) : g = e[7];
671
- const x = o * 0.32, h = o * 0.32;
677
+ function Mt(t) {
678
+ const e = P(16), {
679
+ size: o,
680
+ labels: n,
681
+ sx: i
682
+ } = t, r = o === void 0 ? 24 : o;
672
683
  let u;
673
- e[8] !== h || e[9] !== x ? (u = /* @__PURE__ */ c(C, { component: "span", sx: {
674
- ...w.loaderInnerCircle,
675
- width: x,
676
- height: h
677
- } }), e[8] = h, e[9] = x, e[10] = u) : u = e[10];
678
- let f;
679
- return e[11] !== u || e[12] !== i || e[13] !== a || e[14] !== g ? (f = /* @__PURE__ */ k(C, { role: "status", "aria-busy": !0, "aria-label": i, sx: a, children: [
680
- g,
681
- u
682
- ] }), e[11] = u, e[12] = i, e[13] = a, e[14] = g, e[15] = f) : f = e[15], f;
684
+ e[0] !== n ? (u = n === void 0 ? {} : n, e[0] = n, e[1] = u) : u = e[1];
685
+ const l = u.loading ?? "Loading";
686
+ let c;
687
+ e[2] !== r || e[3] !== i ? (c = {
688
+ ...T.loader,
689
+ width: r,
690
+ height: r,
691
+ ...i
692
+ }, e[2] = r, e[3] = i, e[4] = c) : c = e[4];
693
+ const f = r * 0.75, m = r * 0.75;
694
+ let h;
695
+ e[5] !== f || e[6] !== m ? (h = /* @__PURE__ */ a(v, { component: "span", sx: {
696
+ ...T.loaderOuterCircle,
697
+ width: f,
698
+ height: m
699
+ } }), e[5] = f, e[6] = m, e[7] = h) : h = e[7];
700
+ const b = r * 0.32, p = r * 0.32;
701
+ let g;
702
+ e[8] !== p || e[9] !== b ? (g = /* @__PURE__ */ a(v, { component: "span", sx: {
703
+ ...T.loaderInnerCircle,
704
+ width: b,
705
+ height: p
706
+ } }), e[8] = p, e[9] = b, e[10] = g) : g = e[10];
707
+ let d;
708
+ return e[11] !== g || e[12] !== l || e[13] !== c || e[14] !== h ? (d = /* @__PURE__ */ S(v, { role: "status", "aria-busy": !0, "aria-label": l, sx: c, children: [
709
+ h,
710
+ g
711
+ ] }), e[11] = g, e[12] = l, e[13] = c, e[14] = h, e[15] = d) : d = e[15], d;
683
712
  }
684
- const z = {
713
+ const H = {
685
714
  header: {
686
715
  display: "flex",
687
716
  alignItems: "center",
@@ -709,27 +738,146 @@ const z = {
709
738
  footerWrapper: {
710
739
  padding: ({
711
740
  spacing: t
712
- }) => t(1),
713
- position: "relative"
714
- },
715
- footerCorner: {
716
- position: "absolute",
717
- bottom: "38px",
718
- right: `max(16px, calc(50% - ${Q / 2}px + 6px))`,
719
- margin: "0 auto"
741
+ }) => t(1)
720
742
  },
721
- footer: {
722
- maxWidth: Q,
743
+ /**
744
+ * Rounded input box, matching the reference ChatFooter. A two-column grid:
745
+ * main column (input + optional slots) | send button, bottom-aligned so it
746
+ * stays at the end as the input grows. NO vertical padding — the textarea's own
747
+ * padding sets the ~32px single-line height, so the box hugs the input.
748
+ */
749
+ footerBox: {
750
+ maxWidth: ie,
751
+ width: "100%",
723
752
  margin: "0 auto",
724
- "&.MuiFilledInput-root.MuiInputBase-multiline.MuiInputBase-sizeSmall textarea": {
753
+ display: "grid",
754
+ gridTemplateColumns: "1fr auto",
755
+ alignItems: "end",
756
+ columnGap: ({
757
+ spacing: t
758
+ }) => t(0.5),
759
+ backgroundColor: ({
760
+ palette: t
761
+ }) => t.default?.background ?? "rgba(44, 48, 50, 0.04)",
762
+ borderRadius: ({
763
+ spacing: t
764
+ }) => t(0.5),
765
+ paddingInline: ({
766
+ spacing: t
767
+ }) => t(0.5)
768
+ },
769
+ /** Main grid area: input stacked above the (optional) slots row. */
770
+ footerMain: {
771
+ minWidth: 0,
772
+ display: "flex",
773
+ flexDirection: "column",
774
+ gap: ({
775
+ spacing: t
776
+ }) => t(0.5)
777
+ },
778
+ /**
779
+ * Send-button grid area, bottom-aligned (matches the reference flex-end row) so
780
+ * the button stays at the bottom as the input grows. The small bottom padding
781
+ * keeps it off the box edge — in the single-line state it reads as vertically
782
+ * centered (4px top / 4px bottom around the 24px button in the 32px row).
783
+ */
784
+ footerSend: {
785
+ alignSelf: "end",
786
+ paddingBottom: ({
787
+ spacing: t
788
+ }) => t(0.5),
789
+ "& .MuiIconButton-root": {
790
+ padding: ({
791
+ spacing: t
792
+ }) => t(0.5)
793
+ }
794
+ },
795
+ /** The chrome-less multiline input (no underline / no filled affordance). */
796
+ footerInput: {
797
+ width: "100%",
798
+ typography: "body2",
799
+ // The Meridian theme styles multiline InputBase as a tall "comment field"
800
+ // (min-height: 96px on the root, 12px/14px textarea padding). Override both to
801
+ // get the compact chat field: kill the root min-height and use the reference's
802
+ // 6px/10px padding — both need !important to beat the theme override. Height
803
+ // then comes from MUI's TextareaAutosize (minRows=1/maxRows=8): one line
804
+ // (~32px) → grows → scrolls.
805
+ //
806
+ // TextareaAutosize renders a hidden shadow <textarea> (it carries
807
+ // `aria-hidden="true"`, the same class, and an inline `padding: 0`) to measure
808
+ // the content height; MUI then applies that height to the visible input. Getting
809
+ // the compact ~32px single line right needs the two rules below split apart:
810
+ //
811
+ // • Font metrics (size/line-height/letter-spacing) go on BOTH textareas. The
812
+ // shadow measures with its own CSS, so if it isn't pinned to body2 it
813
+ // measures at the default ~24px line-height and the box ends up too tall.
814
+ // • Padding goes on the VISIBLE input ONLY (`:not([aria-hidden])`). A
815
+ // `!important` padding that also hit the shadow would clobber its measurement
816
+ // `padding: 0`, double-counting the padding (~44px instead of 32px).
817
+ //
818
+ // `!important` is required on both to beat the Meridian theme's tall
819
+ // "comment field" multiline overrides (12px/14px padding, larger metrics); the
820
+ // root `min-height: 0` kills that theme's 96px min-height.
821
+ minHeight: "0 !important",
822
+ "& textarea": {
823
+ fontSize: ({
824
+ typography: t
825
+ }) => `${t.body2.fontSize} !important`,
826
+ lineHeight: ({
827
+ typography: t
828
+ }) => `${t.body2.lineHeight} !important`,
829
+ letterSpacing: ({
830
+ typography: t
831
+ }) => `${t.body2.letterSpacing} !important`
832
+ },
833
+ "& textarea:not([aria-hidden])": {
725
834
  resize: "none",
726
- maxHeight: "10em",
727
- overflowY: "auto !important",
728
- paddingRight: ({
835
+ padding: ({
729
836
  spacing: t
730
- }) => t(5)
837
+ }) => `${t(0.75, 1.25)} !important`
731
838
  }
732
839
  },
840
+ /**
841
+ * Slots row under the input: start slot + model selector + end slot. The left
842
+ * padding lines the row's content up with the input text above it: the input
843
+ * text is inset ~12px from the box edge (InputBase root padding + the textarea's
844
+ * 10px left padding) while the model-selector text button only insets ~8px, so a
845
+ * 4px indent here makes the slot label share the placeholder's left edge instead
846
+ * of sitting further out.
847
+ */
848
+ footerSlots: {
849
+ display: "flex",
850
+ alignItems: "center",
851
+ gap: ({
852
+ spacing: t
853
+ }) => t(0.5),
854
+ minWidth: 0,
855
+ flexWrap: "wrap",
856
+ paddingLeft: ({
857
+ spacing: t
858
+ }) => t(0.5),
859
+ paddingBottom: ({
860
+ spacing: t
861
+ }) => t(0.5)
862
+ },
863
+ modelSelector: {
864
+ textTransform: "none",
865
+ color: ({
866
+ palette: t
867
+ }) => t.text.secondary,
868
+ maxWidth: "100%",
869
+ minWidth: 0,
870
+ "& .MuiButton-endIcon": {
871
+ marginLeft: ({
872
+ spacing: t
873
+ }) => t(0.25)
874
+ }
875
+ },
876
+ modelSelectorLabel: {
877
+ overflow: "hidden",
878
+ textOverflow: "ellipsis",
879
+ whiteSpace: "nowrap"
880
+ },
733
881
  footerCaption: {
734
882
  textAlign: "center"
735
883
  },
@@ -738,11 +886,11 @@ const z = {
738
886
  flex: 1,
739
887
  position: "relative",
740
888
  mx: "auto",
741
- maxWidth: Q,
889
+ maxWidth: ie,
742
890
  width: "100%",
743
891
  maxHeight: "100%",
744
892
  pt: 1,
745
- pb: 2,
893
+ pb: 3,
746
894
  px: 2,
747
895
  display: "flex",
748
896
  flexDirection: "column",
@@ -777,7 +925,7 @@ const z = {
777
925
  spacing: t
778
926
  }) => t(3),
779
927
  textAlign: "center",
780
- maxWidth: Q,
928
+ maxWidth: ie,
781
929
  margin: "0 auto"
782
930
  },
783
931
  starterItems: {
@@ -790,164 +938,245 @@ const z = {
790
938
  starterItemsTwoCol: {
791
939
  gridTemplateColumns: "repeat(2, 1fr)"
792
940
  }
793
- }, lt = 32, it = ve(function({
794
- children: e,
795
- autoScroll: n = !0,
796
- labels: r = {},
797
- sx: l
798
- }, o) {
799
- const d = X(null), s = X(null), i = X(null), [a, p] = N(!0), [m, g] = N(!0), x = () => {
800
- d.current?.scrollTo({
801
- top: d.current.scrollHeight,
941
+ }, st = 32, at = we(function(e, o) {
942
+ const n = P(34), {
943
+ children: i,
944
+ autoScroll: r,
945
+ labels: u,
946
+ sx: s
947
+ } = e, l = r === void 0 ? !0 : r;
948
+ let c;
949
+ n[0] !== u ? (c = u === void 0 ? {} : u, n[0] = u, n[1] = c) : c = n[1];
950
+ const f = c, m = ne(null), h = ne(null), b = ne(null), [p, g] = te(!0), [d, x] = te(!0);
951
+ let y;
952
+ n[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = () => {
953
+ m.current?.scrollTo({
954
+ top: m.current.scrollHeight,
802
955
  behavior: "smooth"
803
956
  });
804
- }, h = () => {
805
- d.current?.scrollTo({
957
+ }, n[2] = y) : y = n[2];
958
+ const C = y;
959
+ let w;
960
+ n[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = () => {
961
+ m.current?.scrollTo({
806
962
  top: 0,
807
963
  behavior: "smooth"
808
964
  });
809
- };
810
- return Te(o, () => ({
811
- scrollToBottom: x,
812
- scrollToTop: h,
813
- isAtBottom: m,
814
- isAtTop: a
815
- }), [m, a]), Z(() => {
816
- const u = d.current, f = s.current, b = i.current;
817
- if (!u || !f || !b) return;
818
- const v = new IntersectionObserver(([T]) => p(T?.isIntersecting ?? !0), {
819
- root: u
820
- }), y = new IntersectionObserver(([T]) => g(T?.isIntersecting ?? !0), {
821
- root: u
965
+ }, n[3] = w) : w = n[3];
966
+ const _ = w;
967
+ let L, $;
968
+ n[4] !== d || n[5] !== p ? (L = () => ({
969
+ scrollToBottom: C,
970
+ scrollToTop: _,
971
+ isAtBottom: d,
972
+ isAtTop: p
973
+ }), $ = [d, p], n[4] = d, n[5] = p, n[6] = L, n[7] = $) : (L = n[6], $ = n[7]), Te(o, L, $);
974
+ let A, M;
975
+ n[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = () => {
976
+ const I = m.current, F = h.current, W = b.current;
977
+ if (!I || !F || !W)
978
+ return;
979
+ const X = new IntersectionObserver((k) => {
980
+ const [E] = k;
981
+ return g(E?.isIntersecting ?? !0);
982
+ }, {
983
+ root: I
984
+ }), N = new IntersectionObserver((k) => {
985
+ const [E] = k;
986
+ return x(E?.isIntersecting ?? !0);
987
+ }, {
988
+ root: I
822
989
  });
823
- return v.observe(f), y.observe(b), () => {
824
- v.disconnect(), y.disconnect();
990
+ return X.observe(F), N.observe(W), () => {
991
+ X.disconnect(), N.disconnect();
825
992
  };
826
- }, []), Z(() => {
827
- if (!n) return;
828
- const u = d.current;
829
- if (!u) return;
830
- let f = u.scrollHeight, b = null;
831
- const v = () => {
832
- b = null;
833
- const T = u.scrollHeight;
834
- if (T > f) {
835
- const S = T - f;
836
- T - u.scrollTop - u.clientHeight <= S + lt && u.scrollTo({
837
- top: T,
993
+ }, M = [], n[8] = A, n[9] = M) : (A = n[8], M = n[9]), re(A, M);
994
+ let R, O;
995
+ n[10] !== l ? (R = () => {
996
+ if (!l)
997
+ return;
998
+ const I = m.current;
999
+ if (!I)
1000
+ return;
1001
+ let F = I.scrollHeight, W = null;
1002
+ const X = () => {
1003
+ W = null;
1004
+ const k = I.scrollHeight;
1005
+ if (k > F) {
1006
+ const E = k - F;
1007
+ k - I.scrollTop - I.clientHeight <= E + st && I.scrollTo({
1008
+ top: k,
838
1009
  behavior: "smooth"
839
1010
  });
840
1011
  }
841
- f = T;
842
- }, y = new MutationObserver(() => {
843
- b ??= requestAnimationFrame(v);
1012
+ F = k;
1013
+ }, N = new MutationObserver(() => {
1014
+ W = W ?? requestAnimationFrame(X);
844
1015
  });
845
- return y.observe(u, {
1016
+ return N.observe(I, {
846
1017
  childList: !0,
847
1018
  subtree: !0,
848
1019
  characterData: !0
849
1020
  }), () => {
850
- y.disconnect(), b !== null && cancelAnimationFrame(b);
1021
+ N.disconnect(), W !== null && cancelAnimationFrame(W);
851
1022
  };
852
- }, [n]), /* @__PURE__ */ k(C, { ref: d, sx: {
853
- ...z.content,
854
- borderTopColor: ({
855
- palette: u
856
- }) => a ? "transparent" : u.divider,
857
- borderBottomColor: ({
858
- palette: u
859
- }) => m ? "transparent" : u.divider,
860
- ...l
861
- }, children: [
862
- /* @__PURE__ */ c(C, { ref: s, sx: z.sentinel, "aria-hidden": !0 }),
863
- e,
864
- /* @__PURE__ */ c(C, { ref: i, sx: z.sentinel, "aria-hidden": !0 }),
865
- /* @__PURE__ */ c(C, { sx: z.jumpToLatestWrapper, children: /* @__PURE__ */ c(Ae, { size: "small", onClick: x, "aria-label": r.jumpToLatest ?? "Jump to latest", sx: {
866
- ...z.jumpToLatest,
867
- opacity: m ? 0 : 1,
868
- pointerEvents: m ? "none" : "auto"
869
- }, children: /* @__PURE__ */ c(We, {}) }) })
870
- ] });
1023
+ }, O = [l], n[10] = l, n[11] = R, n[12] = O) : (R = n[11], O = n[12]), re(R, O);
1024
+ let B;
1025
+ n[13] !== p ? (B = (I) => {
1026
+ const {
1027
+ palette: F
1028
+ } = I;
1029
+ return p ? "transparent" : F.divider;
1030
+ }, n[13] = p, n[14] = B) : B = n[14];
1031
+ let D;
1032
+ n[15] !== d ? (D = (I) => {
1033
+ const {
1034
+ palette: F
1035
+ } = I;
1036
+ return d ? "transparent" : F.divider;
1037
+ }, n[15] = d, n[16] = D) : D = n[16];
1038
+ let j;
1039
+ n[17] !== s || n[18] !== B || n[19] !== D ? (j = {
1040
+ ...H.content,
1041
+ borderTopColor: B,
1042
+ borderBottomColor: D,
1043
+ ...s
1044
+ }, n[17] = s, n[18] = B, n[19] = D, n[20] = j) : j = n[20];
1045
+ let K;
1046
+ n[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (K = /* @__PURE__ */ a(v, { ref: h, sx: H.sentinel, "aria-hidden": !0 }), n[21] = K) : K = n[21];
1047
+ let G;
1048
+ n[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (G = /* @__PURE__ */ a(v, { ref: b, sx: H.sentinel, "aria-hidden": !0 }), n[22] = G) : G = n[22];
1049
+ const J = f.jumpToLatest ?? "Jump to latest", Q = d ? 0 : 1, Z = d ? "none" : "auto";
1050
+ let U;
1051
+ n[23] !== Q || n[24] !== Z ? (U = {
1052
+ ...H.jumpToLatest,
1053
+ opacity: Q,
1054
+ pointerEvents: Z
1055
+ }, n[23] = Q, n[24] = Z, n[25] = U) : U = n[25];
1056
+ let Y;
1057
+ n[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Y = /* @__PURE__ */ a(xe, {}), n[26] = Y) : Y = n[26];
1058
+ let q;
1059
+ n[27] !== J || n[28] !== U ? (q = /* @__PURE__ */ a(v, { sx: H.jumpToLatestWrapper, children: /* @__PURE__ */ a(Ae, { size: "small", onClick: C, "aria-label": J, sx: U, children: Y }) }), n[27] = J, n[28] = U, n[29] = q) : q = n[29];
1060
+ let V;
1061
+ return n[30] !== i || n[31] !== j || n[32] !== q ? (V = /* @__PURE__ */ S(v, { ref: m, sx: j, children: [
1062
+ K,
1063
+ i,
1064
+ G,
1065
+ q
1066
+ ] }), n[30] = i, n[31] = j, n[32] = q, n[33] = V) : V = n[33], V;
871
1067
  });
872
- it.displayName = "ChatContent";
873
- function Dt(t) {
874
- const e = W(14), {
875
- leftSlot: n,
876
- title: r,
877
- rightSlot: l,
878
- onClose: o,
879
- sx: d
1068
+ at.displayName = "ChatContent";
1069
+ function zt(t) {
1070
+ const e = P(14), {
1071
+ leftSlot: o,
1072
+ title: n,
1073
+ rightSlot: i,
1074
+ onClose: r,
1075
+ sx: u
880
1076
  } = t;
881
1077
  let s;
882
- e[0] !== d ? (s = {
883
- ...z.header,
884
- ...d
885
- }, e[0] = d, e[1] = s) : s = e[1];
886
- let i;
887
- e[2] !== r ? (i = /* @__PURE__ */ c(A, { variant: "subtitle2", sx: z.headerTitle, children: r }), e[2] = r, e[3] = i) : i = e[3];
888
- let a;
889
- e[4] !== o ? (a = o && /* @__PURE__ */ c(H, { size: "medium", onClick: o, "aria-label": "Close", children: /* @__PURE__ */ c(ge, {}) }), e[4] = o, e[5] = a) : a = e[5];
890
- let p;
891
- e[6] !== l || e[7] !== a ? (p = /* @__PURE__ */ k(C, { sx: z.headerActions, children: [
892
- l,
893
- a
894
- ] }), e[6] = l, e[7] = a, e[8] = p) : p = e[8];
895
- let m;
896
- return e[9] !== n || e[10] !== s || e[11] !== i || e[12] !== p ? (m = /* @__PURE__ */ k(C, { sx: s, children: [
897
- n,
1078
+ e[0] !== u ? (s = {
1079
+ ...H.header,
1080
+ ...u
1081
+ }, e[0] = u, e[1] = s) : s = e[1];
1082
+ let l;
1083
+ e[2] !== n ? (l = /* @__PURE__ */ a(z, { variant: "subtitle2", sx: H.headerTitle, children: n }), e[2] = n, e[3] = l) : l = e[3];
1084
+ let c;
1085
+ e[4] !== r ? (c = r && /* @__PURE__ */ a(oe, { size: "medium", onClick: r, "aria-label": "Close", children: /* @__PURE__ */ a(be, {}) }), e[4] = r, e[5] = c) : c = e[5];
1086
+ let f;
1087
+ e[6] !== i || e[7] !== c ? (f = /* @__PURE__ */ S(v, { sx: H.headerActions, children: [
898
1088
  i,
899
- p
900
- ] }), e[9] = n, e[10] = s, e[11] = i, e[12] = p, e[13] = m) : m = e[13], m;
1089
+ c
1090
+ ] }), e[6] = i, e[7] = c, e[8] = f) : f = e[8];
1091
+ let m;
1092
+ return e[9] !== o || e[10] !== s || e[11] !== l || e[12] !== f ? (m = /* @__PURE__ */ S(v, { sx: s, children: [
1093
+ o,
1094
+ l,
1095
+ f
1096
+ ] }), e[9] = o, e[10] = s, e[11] = l, e[12] = f, e[13] = m) : m = e[13], m;
901
1097
  }
902
- const st = "Responses are AI generated. Please verify key information.";
903
- function Bt(t) {
904
- const e = W(35), {
905
- value: n,
906
- onChange: r,
907
- onSend: l,
908
- onStop: o,
909
- isGenerating: d,
1098
+ const ct = "Responses are AI-generated. Please verify key information.";
1099
+ function Wt(t) {
1100
+ const e = P(58), {
1101
+ value: o,
1102
+ onChange: n,
1103
+ onSend: i,
1104
+ onStop: r,
1105
+ isGenerating: u,
910
1106
  disabled: s,
911
- placeholder: i,
912
- labels: a,
913
- caption: p,
914
- sx: m
915
- } = t, g = d === void 0 ? !1 : d, x = s === void 0 ? !1 : s, h = i === void 0 ? "Type a message..." : i;
916
- let u;
917
- e[0] !== a ? (u = a === void 0 ? {} : a, e[0] = a, e[1] = u) : u = e[1];
918
- const f = u, b = p === void 0 ? st : p;
919
- let v;
920
- e[2] !== x || e[3] !== g || e[4] !== n ? (v = n.trim() && !x && !g, e[2] = x, e[3] = g, e[4] = n, e[5] = v) : v = e[5];
921
- const y = v;
922
- let T;
923
- e[6] !== y || e[7] !== l ? (T = (M) => {
924
- M.key === "Enter" && !M.shiftKey && (M.preventDefault(), y && l());
925
- }, e[6] = y, e[7] = l, e[8] = T) : T = e[8];
926
- const S = T;
927
- let _;
928
- e[9] !== m ? (_ = {
929
- ...z.footerWrapper,
930
- ...m
931
- }, e[9] = m, e[10] = _) : _ = e[10];
932
- let E;
933
- e[11] !== r ? (E = (M) => r(M.target.value), e[11] = r, e[12] = E) : E = e[12];
934
- const L = x || g;
935
- let $;
936
- e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
937
- minHeight: 0
938
- }, e[13] = $) : $ = e[13];
939
- let I;
940
- e[14] !== S || e[15] !== h || e[16] !== E || e[17] !== L || e[18] !== n ? (I = /* @__PURE__ */ c(_e, { multiline: !0, value: n, onChange: E, onKeyDown: S, placeholder: h, disabled: L, sx: z.footer, style: $, fullWidth: !0, size: "small" }), e[14] = S, e[15] = h, e[16] = E, e[17] = L, e[18] = n, e[19] = I) : I = e[19];
941
- let B;
942
- e[20] !== y || e[21] !== x || e[22] !== g || e[23] !== f.send || e[24] !== f.stop || e[25] !== l || e[26] !== o ? (B = /* @__PURE__ */ c(C, { sx: z.footerCorner, children: g && o ? /* @__PURE__ */ c(H, { size: "small", onClick: o, disabled: x, "aria-label": f.stop ?? "Stop", children: /* @__PURE__ */ c(ze, {}) }) : /* @__PURE__ */ c(H, { size: "small", variant: "contained", onClick: l, disabled: !y, "aria-label": f.send ?? "Send", children: /* @__PURE__ */ c(Me, {}) }) }), e[20] = y, e[21] = x, e[22] = g, e[23] = f.send, e[24] = f.stop, e[25] = l, e[26] = o, e[27] = B) : B = e[27];
943
- let R;
944
- e[28] !== b ? (R = b ? /* @__PURE__ */ c(Ie, { sx: z.footerCaption, children: b }) : null, e[28] = b, e[29] = R) : R = e[29];
1107
+ placeholder: l,
1108
+ labels: c,
1109
+ caption: f,
1110
+ models: m,
1111
+ selectedModel: h,
1112
+ onModelChange: b,
1113
+ startToolbarSlot: p,
1114
+ endToolbarSlot: g,
1115
+ sx: d
1116
+ } = t, x = u === void 0 ? !1 : u, y = s === void 0 ? !1 : s, C = l === void 0 ? "Type a message..." : l;
1117
+ let w;
1118
+ e[0] !== c ? (w = c === void 0 ? {} : c, e[0] = c, e[1] = w) : w = e[1];
1119
+ const _ = w, L = f === void 0 ? ct : f, [$, A] = te(null);
1120
+ let M;
1121
+ e[2] !== y || e[3] !== x || e[4] !== o ? (M = o.trim() && !y && !x, e[2] = y, e[3] = x, e[4] = o, e[5] = M) : M = e[5];
1122
+ const R = M, O = (m?.length ?? 0) > 1, B = _.model ?? "Select model";
945
1123
  let D;
946
- return e[30] !== I || e[31] !== B || e[32] !== R || e[33] !== _ ? (D = /* @__PURE__ */ k(Ee, { fullWidth: !0, sx: _, children: [
947
- I,
948
- B,
949
- R
950
- ] }), e[30] = I, e[31] = B, e[32] = R, e[33] = _, e[34] = D) : D = e[34], D;
1124
+ e[6] !== B || e[7] !== m || e[8] !== h ? (D = m?.find((E) => E.value === h)?.label ?? (h && h.length > 0 ? h : B), e[6] = B, e[7] = m, e[8] = h, e[9] = D) : D = e[9];
1125
+ const j = D, K = O || !!p || !!g;
1126
+ let G;
1127
+ e[10] !== R || e[11] !== i ? (G = (E) => {
1128
+ E.key === "Enter" && !E.shiftKey && (E.preventDefault(), R && i());
1129
+ }, e[10] = R, e[11] = i, e[12] = G) : G = e[12];
1130
+ const J = G;
1131
+ let Q;
1132
+ e[13] !== R || e[14] !== y || e[15] !== x || e[16] !== _.send || e[17] !== _.stop || e[18] !== i || e[19] !== r ? (Q = x && r ? /* @__PURE__ */ a(oe, { size: "small", onClick: r, disabled: y, "aria-label": _.stop ?? "Stop", children: /* @__PURE__ */ a(Oe, {}) }) : /* @__PURE__ */ a(oe, { size: "small", variant: "contained", color: "primary", onClick: i, disabled: !R, "aria-label": _.send ?? "Send", children: /* @__PURE__ */ a(He, {}) }), e[13] = R, e[14] = y, e[15] = x, e[16] = _.send, e[17] = _.stop, e[18] = i, e[19] = r, e[20] = Q) : Q = e[20];
1133
+ const Z = Q;
1134
+ let U;
1135
+ e[21] !== d ? (U = {
1136
+ ...H.footerWrapper,
1137
+ ...d
1138
+ }, e[21] = d, e[22] = U) : U = e[22];
1139
+ let Y;
1140
+ e[23] !== n ? (Y = (E) => n(E.target.value), e[23] = n, e[24] = Y) : Y = e[24];
1141
+ const q = y || x;
1142
+ let V;
1143
+ e[25] !== J || e[26] !== C || e[27] !== Y || e[28] !== q || e[29] !== o ? (V = /* @__PURE__ */ a($e, { multiline: !0, minRows: 1, maxRows: 8, value: o, onChange: Y, onKeyDown: J, placeholder: C, disabled: q, sx: H.footerInput }), e[25] = J, e[26] = C, e[27] = Y, e[28] = q, e[29] = o, e[30] = V) : V = e[30];
1144
+ let I;
1145
+ e[31] !== y || e[32] !== g || e[33] !== K || e[34] !== x || e[35] !== $ || e[36] !== B || e[37] !== m || e[38] !== b || e[39] !== j || e[40] !== h || e[41] !== O || e[42] !== p ? (I = K && /* @__PURE__ */ S(v, { sx: H.footerSlots, children: [
1146
+ p,
1147
+ O && /* @__PURE__ */ S(he, { children: [
1148
+ /* @__PURE__ */ a(le, { size: "small", variant: "text", color: "inherit", disabled: y || x, onClick: (E) => A(E.currentTarget), "aria-label": B, "aria-haspopup": "menu", "aria-expanded": $ ? "true" : void 0, endIcon: /* @__PURE__ */ a(xe, {}), sx: H.modelSelector, children: /* @__PURE__ */ a(z, { variant: "caption", component: "span", color: "inherit", sx: H.modelSelectorLabel, children: j }) }),
1149
+ /* @__PURE__ */ a(Ie, { anchorEl: $, open: !!$, onClose: () => A(null), variant: "menu", elevation: 8, anchorOrigin: {
1150
+ vertical: "top",
1151
+ horizontal: "left"
1152
+ }, transformOrigin: {
1153
+ vertical: "bottom",
1154
+ horizontal: "left"
1155
+ }, children: m?.map((E) => /* @__PURE__ */ a(Le, { selected: E.value === h, onClick: () => {
1156
+ b?.(E.value), A(null);
1157
+ }, children: E.label }, E.value)) })
1158
+ ] }),
1159
+ g
1160
+ ] }), e[31] = y, e[32] = g, e[33] = K, e[34] = x, e[35] = $, e[36] = B, e[37] = m, e[38] = b, e[39] = j, e[40] = h, e[41] = O, e[42] = p, e[43] = I) : I = e[43];
1161
+ let F;
1162
+ e[44] !== V || e[45] !== I ? (F = /* @__PURE__ */ S(v, { sx: H.footerMain, children: [
1163
+ V,
1164
+ I
1165
+ ] }), e[44] = V, e[45] = I, e[46] = F) : F = e[46];
1166
+ let W;
1167
+ e[47] !== Z ? (W = /* @__PURE__ */ a(v, { sx: H.footerSend, children: Z }), e[47] = Z, e[48] = W) : W = e[48];
1168
+ let X;
1169
+ e[49] !== F || e[50] !== W ? (X = /* @__PURE__ */ S(v, { sx: H.footerBox, children: [
1170
+ F,
1171
+ W
1172
+ ] }), e[49] = F, e[50] = W, e[51] = X) : X = e[51];
1173
+ let N;
1174
+ e[52] !== L ? (N = L ? /* @__PURE__ */ a(Ee, { sx: H.footerCaption, children: L }) : null, e[52] = L, e[53] = N) : N = e[53];
1175
+ let k;
1176
+ return e[54] !== U || e[55] !== X || e[56] !== N ? (k = /* @__PURE__ */ S(Re, { fullWidth: !0, sx: U, children: [
1177
+ X,
1178
+ N
1179
+ ] }), e[54] = U, e[55] = X, e[56] = N, e[57] = k) : k = e[57], k;
951
1180
  }
952
1181
  const de = [
953
1182
  "#C9DB7440",
@@ -960,46 +1189,46 @@ const de = [
960
1189
  // pastel yellow
961
1190
  ];
962
1191
  function Ft(t) {
963
- const e = W(40), {
964
- icon: n,
965
- title: r,
966
- description: l,
967
- items: o,
968
- size: d,
1192
+ const e = P(40), {
1193
+ icon: o,
1194
+ title: n,
1195
+ description: i,
1196
+ items: r,
1197
+ size: u,
969
1198
  onSelect: s,
970
- sx: i
971
- } = t, a = d === void 0 ? "small" : d;
972
- let p, m, g, x, h, u, f, b;
973
- if (e[0] !== l || e[1] !== n || e[2] !== o || e[3] !== s || e[4] !== a || e[5] !== i || e[6] !== r) {
974
- const T = o.map(at);
975
- m = C;
976
- const S = a === "small" ? 1 : 2;
977
- e[15] !== i || e[16] !== S ? (h = {
978
- ...z.starter,
979
- gap: S,
980
- ...i
981
- }, e[15] = i, e[16] = S, e[17] = h) : h = e[17], u = n, e[18] !== a || e[19] !== r ? (f = r && /* @__PURE__ */ c(A, { variant: a === "small" ? "h6" : "h5", children: r }), e[18] = a, e[19] = r, e[20] = f) : f = e[20], e[21] !== l || e[22] !== a ? (b = l && /* @__PURE__ */ c(A, { variant: a === "small" ? "body2" : "body1", color: "text.secondary", children: l }), e[21] = l, e[22] = a, e[23] = b) : b = e[23], p = C;
982
- const _ = a === "small" ? 1 : 2, E = o.length > 2 ? z.starterItemsTwoCol : void 0;
983
- e[24] !== E || e[25] !== _ ? (g = {
984
- ...z.starterItems,
1199
+ sx: l
1200
+ } = t, c = u === void 0 ? "small" : u;
1201
+ let f, m, h, b, p, g, d, x;
1202
+ if (e[0] !== i || e[1] !== o || e[2] !== r || e[3] !== s || e[4] !== c || e[5] !== l || e[6] !== n) {
1203
+ const w = r.map(dt);
1204
+ m = v;
1205
+ const _ = c === "small" ? 1 : 2;
1206
+ e[15] !== l || e[16] !== _ ? (p = {
1207
+ ...H.starter,
985
1208
  gap: _,
986
- ...E
987
- }, e[24] = E, e[25] = _, e[26] = g) : g = e[26];
988
- let L;
989
- e[27] !== s ? (L = ($, I) => /* @__PURE__ */ c(et, { label: $.label, onClick: () => s?.($.label), color: $.color }, I), e[27] = s, e[28] = L) : L = e[28], x = T.map(L), e[0] = l, e[1] = n, e[2] = o, e[3] = s, e[4] = a, e[5] = i, e[6] = r, e[7] = p, e[8] = m, e[9] = g, e[10] = x, e[11] = h, e[12] = u, e[13] = f, e[14] = b;
1209
+ ...l
1210
+ }, e[15] = l, e[16] = _, e[17] = p) : p = e[17], g = o, e[18] !== c || e[19] !== n ? (d = n && /* @__PURE__ */ a(z, { variant: c === "small" ? "h6" : "h5", children: n }), e[18] = c, e[19] = n, e[20] = d) : d = e[20], e[21] !== i || e[22] !== c ? (x = i && /* @__PURE__ */ a(z, { variant: c === "small" ? "body2" : "body1", color: "text.secondary", children: i }), e[21] = i, e[22] = c, e[23] = x) : x = e[23], f = v;
1211
+ const L = c === "small" ? 1 : 2, $ = r.length > 2 ? H.starterItemsTwoCol : void 0;
1212
+ e[24] !== $ || e[25] !== L ? (h = {
1213
+ ...H.starterItems,
1214
+ gap: L,
1215
+ ...$
1216
+ }, e[24] = $, e[25] = L, e[26] = h) : h = e[26];
1217
+ let A;
1218
+ e[27] !== s ? (A = (M, R) => /* @__PURE__ */ a(ot, { label: M.label, onClick: () => s?.(M.label), color: M.color }, R), e[27] = s, e[28] = A) : A = e[28], b = w.map(A), e[0] = i, e[1] = o, e[2] = r, e[3] = s, e[4] = c, e[5] = l, e[6] = n, e[7] = f, e[8] = m, e[9] = h, e[10] = b, e[11] = p, e[12] = g, e[13] = d, e[14] = x;
990
1219
  } else
991
- p = e[7], m = e[8], g = e[9], x = e[10], h = e[11], u = e[12], f = e[13], b = e[14];
992
- let v;
993
- e[29] !== p || e[30] !== g || e[31] !== x ? (v = /* @__PURE__ */ c(p, { sx: g, children: x }), e[29] = p, e[30] = g, e[31] = x, e[32] = v) : v = e[32];
1220
+ f = e[7], m = e[8], h = e[9], b = e[10], p = e[11], g = e[12], d = e[13], x = e[14];
994
1221
  let y;
995
- return e[33] !== m || e[34] !== h || e[35] !== u || e[36] !== f || e[37] !== b || e[38] !== v ? (y = /* @__PURE__ */ k(m, { sx: h, children: [
996
- u,
997
- f,
998
- b,
999
- v
1000
- ] }), e[33] = m, e[34] = h, e[35] = u, e[36] = f, e[37] = b, e[38] = v, e[39] = y) : y = e[39], y;
1222
+ e[29] !== f || e[30] !== h || e[31] !== b ? (y = /* @__PURE__ */ a(f, { sx: h, children: b }), e[29] = f, e[30] = h, e[31] = b, e[32] = y) : y = e[32];
1223
+ let C;
1224
+ return e[33] !== m || e[34] !== p || e[35] !== g || e[36] !== d || e[37] !== x || e[38] !== y ? (C = /* @__PURE__ */ S(m, { sx: p, children: [
1225
+ g,
1226
+ d,
1227
+ x,
1228
+ y
1229
+ ] }), e[33] = m, e[34] = p, e[35] = g, e[36] = d, e[37] = x, e[38] = y, e[39] = C) : C = e[39], C;
1001
1230
  }
1002
- function at(t, e) {
1231
+ function dt(t, e) {
1003
1232
  return typeof t == "string" ? {
1004
1233
  label: t,
1005
1234
  color: de[e]
@@ -1008,500 +1237,500 @@ function at(t, e) {
1008
1237
  color: t.color ?? de[e]
1009
1238
  };
1010
1239
  }
1011
- const Wt = ae(C)(({
1240
+ const Ot = ae(v)(({
1012
1241
  theme: t
1013
1242
  }) => ({
1014
1243
  display: "flex",
1015
1244
  alignItems: "center",
1016
1245
  gap: t.spacing(0.5)
1017
1246
  }));
1018
- function zt(t) {
1019
- const e = W(25), {
1020
- rating: n,
1021
- onRatingChange: r,
1022
- labels: l
1247
+ function Ht(t) {
1248
+ const e = P(25), {
1249
+ rating: o,
1250
+ onRatingChange: n,
1251
+ labels: i
1023
1252
  } = t;
1024
- let o;
1025
- e[0] !== l ? (o = l === void 0 ? {} : l, e[0] = l, e[1] = o) : o = e[1];
1026
- const d = o;
1253
+ let r;
1254
+ e[0] !== i ? (r = i === void 0 ? {} : i, e[0] = i, e[1] = r) : r = e[1];
1255
+ const u = r;
1027
1256
  let s;
1028
- e[2] !== r || e[3] !== n ? (s = () => r?.(n === "up" ? null : "up"), e[2] = r, e[3] = n, e[4] = s) : s = e[4];
1029
- const i = d.thumbUp ?? "Thumbs up", a = n === "up" ? "primary" : void 0;
1030
- let p;
1031
- e[5] !== n ? (p = n === "up" ? /* @__PURE__ */ c(Oe, { fontSize: "small" }) : /* @__PURE__ */ c(He, { fontSize: "small" }), e[5] = n, e[6] = p) : p = e[6];
1257
+ e[2] !== n || e[3] !== o ? (s = () => n?.(o === "up" ? null : "up"), e[2] = n, e[3] = o, e[4] = s) : s = e[4];
1258
+ const l = u.thumbUp ?? "Thumbs up", c = o === "up" ? "primary" : void 0;
1259
+ let f;
1260
+ e[5] !== o ? (f = o === "up" ? /* @__PURE__ */ a(Pe, { fontSize: "small" }) : /* @__PURE__ */ a(Ve, { fontSize: "small" }), e[5] = o, e[6] = f) : f = e[6];
1032
1261
  let m;
1033
- e[7] !== s || e[8] !== i || e[9] !== a || e[10] !== p ? (m = /* @__PURE__ */ c(H, { size: "small", onClick: s, "aria-label": i, color: a, children: p }), e[7] = s, e[8] = i, e[9] = a, e[10] = p, e[11] = m) : m = e[11];
1262
+ e[7] !== s || e[8] !== l || e[9] !== c || e[10] !== f ? (m = /* @__PURE__ */ a(oe, { size: "small", onClick: s, "aria-label": l, color: c, children: f }), e[7] = s, e[8] = l, e[9] = c, e[10] = f, e[11] = m) : m = e[11];
1263
+ let h;
1264
+ e[12] !== n || e[13] !== o ? (h = () => n?.(o === "down" ? null : "down"), e[12] = n, e[13] = o, e[14] = h) : h = e[14];
1265
+ const b = u.thumbDown ?? "Thumbs down", p = o === "down" ? "primary" : void 0;
1034
1266
  let g;
1035
- e[12] !== r || e[13] !== n ? (g = () => r?.(n === "down" ? null : "down"), e[12] = r, e[13] = n, e[14] = g) : g = e[14];
1036
- const x = d.thumbDown ?? "Thumbs down", h = n === "down" ? "primary" : void 0;
1037
- let u;
1038
- e[15] !== n ? (u = n === "down" ? /* @__PURE__ */ c(Pe, { fontSize: "small" }) : /* @__PURE__ */ c(Ve, { fontSize: "small" }), e[15] = n, e[16] = u) : u = e[16];
1039
- let f;
1040
- e[17] !== h || e[18] !== u || e[19] !== g || e[20] !== x ? (f = /* @__PURE__ */ c(H, { size: "small", onClick: g, "aria-label": x, color: h, children: u }), e[17] = h, e[18] = u, e[19] = g, e[20] = x, e[21] = f) : f = e[21];
1041
- let b;
1042
- return e[22] !== f || e[23] !== m ? (b = /* @__PURE__ */ k(we, { children: [
1267
+ e[15] !== o ? (g = o === "down" ? /* @__PURE__ */ a(je, { fontSize: "small" }) : /* @__PURE__ */ a(Ue, { fontSize: "small" }), e[15] = o, e[16] = g) : g = e[16];
1268
+ let d;
1269
+ e[17] !== p || e[18] !== g || e[19] !== h || e[20] !== b ? (d = /* @__PURE__ */ a(oe, { size: "small", onClick: h, "aria-label": b, color: p, children: g }), e[17] = p, e[18] = g, e[19] = h, e[20] = b, e[21] = d) : d = e[21];
1270
+ let x;
1271
+ return e[22] !== d || e[23] !== m ? (x = /* @__PURE__ */ S(he, { children: [
1043
1272
  m,
1044
- f
1045
- ] }), e[22] = f, e[23] = m, e[24] = b) : b = e[24], b;
1273
+ d
1274
+ ] }), e[22] = d, e[23] = m, e[24] = x) : x = e[24], x;
1046
1275
  }
1047
- const ct = /^-?\d/;
1048
- function dt(t) {
1276
+ const ut = /^-?\d/;
1277
+ function ft(t) {
1049
1278
  const e = [];
1050
- let n = 0, r;
1051
- const l = /* @__PURE__ */ new Set(), o = /("(?:[^"\\]|\\.)*")\s*:/g;
1052
- let d;
1053
- for (; (d = o.exec(t)) !== null; )
1054
- l.add(d.index);
1279
+ let o = 0, n;
1280
+ const i = /* @__PURE__ */ new Set(), r = /("(?:[^"\\]|\\.)*")\s*:/g;
1281
+ let u;
1282
+ for (; (u = r.exec(t)) !== null; )
1283
+ i.add(u.index);
1055
1284
  const s = (
1056
1285
  // eslint-disable-next-line no-useless-escape
1057
1286
  /"(?:[^"\\]|\\.)*"|\b(?:true|false)\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|[{}\[\]:,]/g
1058
1287
  );
1059
- for (; (r = s.exec(t)) !== null; ) {
1060
- r.index > n && e.push(t.slice(n, r.index));
1061
- const i = r[0];
1062
- i.startsWith('"') ? l.has(r.index) ? e.push({
1288
+ for (; (n = s.exec(t)) !== null; ) {
1289
+ n.index > o && e.push(t.slice(o, n.index));
1290
+ const l = n[0];
1291
+ l.startsWith('"') ? i.has(n.index) ? e.push({
1063
1292
  type: "key",
1064
- value: i
1293
+ value: l
1065
1294
  }) : e.push({
1066
1295
  type: "string",
1067
- value: i
1068
- }) : ct.test(i) ? e.push({
1296
+ value: l
1297
+ }) : ut.test(l) ? e.push({
1069
1298
  type: "number",
1070
- value: i
1071
- }) : i === "true" || i === "false" ? e.push({
1299
+ value: l
1300
+ }) : l === "true" || l === "false" ? e.push({
1072
1301
  type: "boolean",
1073
- value: i
1074
- }) : i === "null" ? e.push({
1302
+ value: l
1303
+ }) : l === "null" ? e.push({
1075
1304
  type: "null",
1076
- value: i
1305
+ value: l
1077
1306
  }) : e.push({
1078
1307
  type: "punctuation",
1079
- value: i
1080
- }), n = r.index + i.length;
1308
+ value: l
1309
+ }), o = n.index + l.length;
1081
1310
  }
1082
- return n < t.length && e.push(t.slice(n)), e;
1311
+ return o < t.length && e.push(t.slice(o)), e;
1083
1312
  }
1084
- function ut(t) {
1085
- const e = W(24), {
1086
- open: n,
1087
- onClose: r,
1088
- title: l,
1089
- content: o
1313
+ function pt(t) {
1314
+ const e = P(24), {
1315
+ open: o,
1316
+ onClose: n,
1317
+ title: i,
1318
+ content: r
1090
1319
  } = t;
1091
- let d;
1092
- e[0] !== o ? (d = o.split(`
1093
- `).map(mt), e[0] = o, e[1] = d) : d = e[1];
1094
- const s = d;
1095
- let i;
1096
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
1097
- sx: w.fullViewPaper
1098
- }, e[2] = i) : i = e[2];
1099
- let a;
1100
- e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = {
1320
+ let u;
1321
+ e[0] !== r ? (u = r.split(`
1322
+ `).map(gt), e[0] = r, e[1] = u) : u = e[1];
1323
+ const s = u;
1324
+ let l;
1325
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = {
1326
+ sx: T.fullViewPaper
1327
+ }, e[2] = l) : l = e[2];
1328
+ let c;
1329
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = {
1101
1330
  display: "flex",
1102
1331
  alignItems: "center",
1103
1332
  gap: 0.5
1104
- }, e[3] = a) : a = e[3];
1105
- let p;
1106
- e[4] !== o ? (p = /* @__PURE__ */ c(Ge, { copyText: o, "aria-label": "Copy content" }), e[4] = o, e[5] = p) : p = e[5];
1333
+ }, e[3] = c) : c = e[3];
1334
+ let f;
1335
+ e[4] !== r ? (f = /* @__PURE__ */ a(Ke, { copyText: r, "aria-label": "Copy content" }), e[4] = r, e[5] = f) : f = e[5];
1107
1336
  let m;
1108
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ c(ge, {}), e[6] = m) : m = e[6];
1337
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ a(be, {}), e[6] = m) : m = e[6];
1338
+ let h;
1339
+ e[7] !== n ? (h = /* @__PURE__ */ a(oe, { onClick: n, "aria-label": "close", children: m }), e[7] = n, e[8] = h) : h = e[8];
1340
+ let b;
1341
+ e[9] !== f || e[10] !== h ? (b = /* @__PURE__ */ S(v, { sx: c, children: [
1342
+ f,
1343
+ h
1344
+ ] }), e[9] = f, e[10] = h, e[11] = b) : b = e[11];
1345
+ let p;
1346
+ e[12] !== b || e[13] !== i ? (p = /* @__PURE__ */ S(Be, { sx: T.fullViewTitle, children: [
1347
+ i,
1348
+ b
1349
+ ] }), e[12] = b, e[13] = i, e[14] = p) : p = e[14];
1109
1350
  let g;
1110
- e[7] !== r ? (g = /* @__PURE__ */ c(H, { onClick: r, "aria-label": "close", children: m }), e[7] = r, e[8] = g) : g = e[8];
1351
+ e[15] !== s ? (g = s.map(mt), e[15] = s, e[16] = g) : g = e[16];
1352
+ let d;
1353
+ e[17] !== g ? (d = /* @__PURE__ */ a(De, { sx: T.fullViewDialogContent, children: /* @__PURE__ */ a(v, { component: "pre", sx: T.fullViewPre, children: g }) }), e[17] = g, e[18] = d) : d = e[18];
1111
1354
  let x;
1112
- e[9] !== p || e[10] !== g ? (x = /* @__PURE__ */ k(C, { sx: a, children: [
1355
+ return e[19] !== n || e[20] !== o || e[21] !== d || e[22] !== p ? (x = /* @__PURE__ */ S(Me, { open: o, onClose: n, sx: T.fullViewDialog, PaperProps: l, fullScreen: !0, children: [
1113
1356
  p,
1114
- g
1115
- ] }), e[9] = p, e[10] = g, e[11] = x) : x = e[11];
1116
- let h;
1117
- e[12] !== x || e[13] !== l ? (h = /* @__PURE__ */ k(Le, { sx: w.fullViewTitle, children: [
1118
- l,
1119
- x
1120
- ] }), e[12] = x, e[13] = l, e[14] = h) : h = e[14];
1121
- let u;
1122
- e[15] !== s ? (u = s.map(ft), e[15] = s, e[16] = u) : u = e[16];
1123
- let f;
1124
- e[17] !== u ? (f = /* @__PURE__ */ c($e, { sx: w.fullViewDialogContent, children: /* @__PURE__ */ c(C, { component: "pre", sx: w.fullViewPre, children: u }) }), e[17] = u, e[18] = f) : f = e[18];
1125
- let b;
1126
- return e[19] !== r || e[20] !== n || e[21] !== f || e[22] !== h ? (b = /* @__PURE__ */ k(Re, { open: n, onClose: r, sx: w.fullViewDialog, PaperProps: i, fullScreen: !0, children: [
1127
- h,
1128
- f
1129
- ] }), e[19] = r, e[20] = n, e[21] = f, e[22] = h, e[23] = b) : b = e[23], b;
1357
+ d
1358
+ ] }), e[19] = n, e[20] = o, e[21] = d, e[22] = p, e[23] = x) : x = e[23], x;
1130
1359
  }
1131
- function ft(t, e) {
1132
- return /* @__PURE__ */ k(C, { component: "span", sx: w.fullViewLine, children: [
1133
- t.map(pt),
1360
+ function mt(t, e) {
1361
+ return /* @__PURE__ */ S(v, { component: "span", sx: T.fullViewLine, children: [
1362
+ t.map(ht),
1134
1363
  `
1135
1364
  `
1136
1365
  ] }, e);
1137
1366
  }
1138
- function pt(t, e) {
1139
- return typeof t == "string" ? t : /* @__PURE__ */ c(C, { component: "span", sx: w[`syntaxToken_${t.type}`], children: t.value }, e);
1367
+ function ht(t, e) {
1368
+ return typeof t == "string" ? t : /* @__PURE__ */ a(v, { component: "span", sx: T[`syntaxToken_${t.type}`], children: t.value }, e);
1140
1369
  }
1141
- function mt(t) {
1142
- return dt(t);
1370
+ function gt(t) {
1371
+ return ft(t);
1143
1372
  }
1144
1373
  function ue(t) {
1145
- const e = W(28), {
1146
- content: n,
1147
- title: r,
1148
- isError: l,
1149
- labels: o,
1150
- sx: d
1151
- } = t, s = r === void 0 ? "" : r, i = l === void 0 ? !1 : l;
1152
- let a;
1153
- e[0] !== o ? (a = o === void 0 ? {} : o, e[0] = o, e[1] = a) : a = e[1];
1154
- const p = a, m = X(null), [g, x] = N(!1), [h, u] = N(!1);
1155
- let f;
1156
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = () => {
1374
+ const e = P(28), {
1375
+ content: o,
1376
+ title: n,
1377
+ isError: i,
1378
+ labels: r,
1379
+ sx: u
1380
+ } = t, s = n === void 0 ? "" : n, l = i === void 0 ? !1 : i;
1381
+ let c;
1382
+ e[0] !== r ? (c = r === void 0 ? {} : r, e[0] = r, e[1] = c) : c = e[1];
1383
+ const f = c, m = ne(null), [h, b] = te(!1), [p, g] = te(!1);
1384
+ let d;
1385
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = () => {
1157
1386
  const D = m.current;
1158
- D && x(D.scrollHeight > D.clientHeight);
1159
- }, e[2] = f) : f = e[2];
1160
- const b = f;
1161
- let v;
1162
- e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = () => {
1163
- b();
1387
+ D && b(D.scrollHeight > D.clientHeight);
1388
+ }, e[2] = d) : d = e[2];
1389
+ const x = d;
1390
+ let y;
1391
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = () => {
1392
+ x();
1164
1393
  const D = m.current;
1165
1394
  if (!D)
1166
1395
  return;
1167
- const M = new ResizeObserver(b);
1168
- return M.observe(D), () => M.disconnect();
1169
- }, e[3] = v) : v = e[3];
1170
- let y;
1171
- e[4] !== n ? (y = [b, n], e[4] = n, e[5] = y) : y = e[5], Z(v, y);
1172
- const T = p.fullView ?? "Full view";
1173
- let S;
1174
- e[6] !== d ? (S = {
1175
- ...w.codeArea,
1176
- ...d
1177
- }, e[6] = d, e[7] = S) : S = e[7];
1396
+ const j = new ResizeObserver(x);
1397
+ return j.observe(D), () => j.disconnect();
1398
+ }, e[3] = y) : y = e[3];
1399
+ let C;
1400
+ e[4] !== o ? (C = [x, o], e[4] = o, e[5] = C) : C = e[5], re(y, C);
1401
+ const w = f.fullView ?? "Full view";
1178
1402
  let _;
1179
- e[8] !== i ? (_ = i ? w.codeAreaPreError : {}, e[8] = i, e[9] = _) : _ = e[9];
1180
- let E;
1181
- e[10] !== _ ? (E = {
1182
- ...w.codeAreaPre,
1183
- maxHeight: Ke,
1184
- ..._
1185
- }, e[10] = _, e[11] = E) : E = e[11];
1403
+ e[6] !== u ? (_ = {
1404
+ ...T.codeArea,
1405
+ ...u
1406
+ }, e[6] = u, e[7] = _) : _ = e[7];
1186
1407
  let L;
1187
- e[12] !== n || e[13] !== E ? (L = /* @__PURE__ */ c(C, { component: "pre", ref: m, sx: E, children: n }), e[12] = n, e[13] = E, e[14] = L) : L = e[14];
1408
+ e[8] !== l ? (L = l ? T.codeAreaPreError : {}, e[8] = l, e[9] = L) : L = e[9];
1188
1409
  let $;
1189
- e[15] !== T || e[16] !== g ? ($ = g && /* @__PURE__ */ c(De, { title: T, children: /* @__PURE__ */ c(H, { size: "small", onClick: () => u(!0), sx: w.codeAreaFullViewButton, children: /* @__PURE__ */ c(Xe, {}) }) }), e[15] = T, e[16] = g, e[17] = $) : $ = e[17];
1190
- let I;
1191
- e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = () => u(!1), e[18] = I) : I = e[18];
1192
- let B;
1193
- e[19] !== n || e[20] !== h || e[21] !== s ? (B = /* @__PURE__ */ c(ut, { open: h, onClose: I, title: s, content: n }), e[19] = n, e[20] = h, e[21] = s, e[22] = B) : B = e[22];
1410
+ e[10] !== L ? ($ = {
1411
+ ...T.codeAreaPre,
1412
+ maxHeight: Je,
1413
+ ...L
1414
+ }, e[10] = L, e[11] = $) : $ = e[11];
1415
+ let A;
1416
+ e[12] !== o || e[13] !== $ ? (A = /* @__PURE__ */ a(v, { component: "pre", ref: m, sx: $, children: o }), e[12] = o, e[13] = $, e[14] = A) : A = e[14];
1417
+ let M;
1418
+ e[15] !== w || e[16] !== h ? (M = h && /* @__PURE__ */ a(ze, { title: w, children: /* @__PURE__ */ a(oe, { size: "small", onClick: () => g(!0), sx: T.codeAreaFullViewButton, children: /* @__PURE__ */ a(Ye, {}) }) }), e[15] = w, e[16] = h, e[17] = M) : M = e[17];
1194
1419
  let R;
1195
- return e[23] !== L || e[24] !== $ || e[25] !== B || e[26] !== S ? (R = /* @__PURE__ */ k(C, { sx: S, children: [
1196
- L,
1197
- $,
1198
- B
1199
- ] }), e[23] = L, e[24] = $, e[25] = B, e[26] = S, e[27] = R) : R = e[27], R;
1420
+ e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = () => g(!1), e[18] = R) : R = e[18];
1421
+ let O;
1422
+ e[19] !== o || e[20] !== p || e[21] !== s ? (O = /* @__PURE__ */ a(pt, { open: p, onClose: R, title: s, content: o }), e[19] = o, e[20] = p, e[21] = s, e[22] = O) : O = e[22];
1423
+ let B;
1424
+ return e[23] !== A || e[24] !== M || e[25] !== O || e[26] !== _ ? (B = /* @__PURE__ */ S(v, { sx: _, children: [
1425
+ A,
1426
+ M,
1427
+ O
1428
+ ] }), e[23] = A, e[24] = M, e[25] = O, e[26] = _, e[27] = B) : B = e[27], B;
1200
1429
  }
1201
1430
  function fe(t) {
1202
1431
  const e = t.replace(/_/g, " ");
1203
1432
  return e.charAt(0).toUpperCase() + e.slice(1);
1204
1433
  }
1205
- function ye(t) {
1434
+ function ve(t) {
1206
1435
  return t.status === "running" ? t.runningLabel ?? fe(t.name) : t.label ?? fe(t.name);
1207
1436
  }
1208
- function ht(t) {
1209
- const e = W(9), {
1210
- status: n,
1211
- labels: r
1437
+ function xt(t) {
1438
+ const e = P(9), {
1439
+ status: o,
1440
+ labels: n
1212
1441
  } = t;
1213
- switch (n) {
1442
+ switch (o) {
1214
1443
  case "complete": {
1215
- let l;
1216
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = {
1444
+ let i;
1445
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
1217
1446
  display: "flex",
1218
1447
  alignItems: "center",
1219
1448
  gap: 0.5
1220
- }, e[0] = l) : l = e[0];
1221
- let o;
1222
- e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ c(Ue, { sx: {
1449
+ }, e[0] = i) : i = e[0];
1450
+ let r;
1451
+ e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ a(Ge, { sx: {
1223
1452
  fontSize: 12
1224
- }, color: "success" }), e[1] = o) : o = e[1];
1225
- const d = r?.success ?? "Success";
1453
+ }, color: "success" }), e[1] = r) : r = e[1];
1454
+ const u = n?.success ?? "Success";
1226
1455
  let s;
1227
- return e[2] !== d ? (s = /* @__PURE__ */ k(C, { sx: l, children: [
1228
- o,
1229
- /* @__PURE__ */ c(A, { variant: "caption", children: d })
1230
- ] }), e[2] = d, e[3] = s) : s = e[3], s;
1456
+ return e[2] !== u ? (s = /* @__PURE__ */ S(v, { sx: i, children: [
1457
+ r,
1458
+ /* @__PURE__ */ a(z, { variant: "caption", children: u })
1459
+ ] }), e[2] = u, e[3] = s) : s = e[3], s;
1231
1460
  }
1232
1461
  case "error": {
1233
- let l;
1234
- e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = {
1462
+ let i;
1463
+ e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
1235
1464
  display: "flex",
1236
1465
  alignItems: "center",
1237
1466
  gap: 0.5
1238
- }, e[4] = l) : l = e[4];
1239
- let o;
1240
- e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ c(je, { sx: {
1467
+ }, e[4] = i) : i = e[4];
1468
+ let r;
1469
+ e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ a(Ne, { sx: {
1241
1470
  fontSize: 12
1242
- }, color: "error" }), e[5] = o) : o = e[5];
1243
- const d = r?.error ?? "Error";
1471
+ }, color: "error" }), e[5] = r) : r = e[5];
1472
+ const u = n?.error ?? "Error";
1244
1473
  let s;
1245
- return e[6] !== d ? (s = /* @__PURE__ */ k(C, { sx: l, children: [
1246
- o,
1247
- /* @__PURE__ */ c(A, { variant: "code3", children: d })
1248
- ] }), e[6] = d, e[7] = s) : s = e[7], s;
1474
+ return e[6] !== u ? (s = /* @__PURE__ */ S(v, { sx: i, children: [
1475
+ r,
1476
+ /* @__PURE__ */ a(z, { variant: "code3", children: u })
1477
+ ] }), e[6] = u, e[7] = s) : s = e[7], s;
1249
1478
  }
1250
1479
  case "running": {
1251
- let l;
1252
- return e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ c(Be, { size: 14 }), e[8] = l) : l = e[8], l;
1480
+ let i;
1481
+ return e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ a(We, { size: 14 }), e[8] = i) : i = e[8], i;
1253
1482
  }
1254
1483
  default:
1255
1484
  return null;
1256
1485
  }
1257
1486
  }
1258
- function Ce(t) {
1259
- const e = W(33), {
1260
- tool: n,
1261
- labels: r
1487
+ function Se(t) {
1488
+ const e = P(33), {
1489
+ tool: o,
1490
+ labels: n
1262
1491
  } = t;
1263
- let l;
1264
- e[0] !== r ? (l = r === void 0 ? {} : r, e[0] = r, e[1] = l) : l = e[1];
1265
- const o = l, d = n.status === "error", s = o.toolExecuted ?? "Tool executed", i = o.reference ?? "Reference:", a = o.duration ?? "Duration:", p = o.status ?? "Status:", m = o.inputArguments ?? "Input arguments:", g = o.output ?? "Output:";
1266
- let x;
1267
- e[2] !== i || e[3] !== n.reference ? (x = n.reference && /* @__PURE__ */ k(C, { sx: w.traceField, children: [
1268
- /* @__PURE__ */ c(A, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceFieldLabel, children: i }),
1269
- /* @__PURE__ */ k(C, { sx: w.traceReference, children: [
1270
- /* @__PURE__ */ c(Ye, { color: "success" }),
1271
- /* @__PURE__ */ c(A, { variant: "code3", fontWeight: 600, children: n.reference })
1492
+ let i;
1493
+ e[0] !== n ? (i = n === void 0 ? {} : n, e[0] = n, e[1] = i) : i = e[1];
1494
+ const r = i, u = o.status === "error", s = r.toolExecuted ?? "Tool executed", l = r.reference ?? "Reference:", c = r.duration ?? "Duration:", f = r.status ?? "Status:", m = r.inputArguments ?? "Input arguments:", h = r.output ?? "Output:";
1495
+ let b;
1496
+ e[2] !== l || e[3] !== o.reference ? (b = o.reference && /* @__PURE__ */ S(v, { sx: T.traceField, children: [
1497
+ /* @__PURE__ */ a(z, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: T.traceFieldLabel, children: l }),
1498
+ /* @__PURE__ */ S(v, { sx: T.traceReference, children: [
1499
+ /* @__PURE__ */ a(qe, { color: "success" }),
1500
+ /* @__PURE__ */ a(z, { variant: "code3", fontWeight: 600, children: o.reference })
1272
1501
  ] })
1273
- ] }), e[2] = i, e[3] = n.reference, e[4] = x) : x = e[4];
1274
- let h;
1275
- e[5] !== a || e[6] !== n.duration ? (h = n.duration != null && /* @__PURE__ */ k(C, { sx: w.traceField, children: [
1276
- /* @__PURE__ */ c(A, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceFieldLabel, children: a }),
1277
- /* @__PURE__ */ k(A, { variant: "code3", children: [
1278
- n.duration,
1502
+ ] }), e[2] = l, e[3] = o.reference, e[4] = b) : b = e[4];
1503
+ let p;
1504
+ e[5] !== c || e[6] !== o.duration ? (p = o.duration != null && /* @__PURE__ */ S(v, { sx: T.traceField, children: [
1505
+ /* @__PURE__ */ a(z, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: T.traceFieldLabel, children: c }),
1506
+ /* @__PURE__ */ S(z, { variant: "code3", children: [
1507
+ o.duration,
1279
1508
  "s"
1280
1509
  ] })
1281
- ] }), e[5] = a, e[6] = n.duration, e[7] = h) : h = e[7];
1282
- let u;
1283
- e[8] !== p ? (u = /* @__PURE__ */ c(A, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceFieldLabel, children: p }), e[8] = p, e[9] = u) : u = e[9];
1284
- let f;
1285
- e[10] !== o || e[11] !== n.status ? (f = /* @__PURE__ */ c(ht, { status: n.status, labels: o }), e[10] = o, e[11] = n.status, e[12] = f) : f = e[12];
1286
- let b;
1287
- e[13] !== u || e[14] !== f ? (b = /* @__PURE__ */ k(C, { sx: w.traceField, children: [
1288
- u,
1289
- f
1290
- ] }), e[13] = u, e[14] = f, e[15] = b) : b = e[15];
1291
- let v;
1292
- e[16] !== m || e[17] !== d || e[18] !== n.inputArguments || e[19] !== n.output || e[20] !== s ? (v = n.inputArguments && /* @__PURE__ */ k(C, { children: [
1293
- /* @__PURE__ */ c(A, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceField, children: m }),
1294
- /* @__PURE__ */ c(ue, { sx: {
1295
- mt: 0.5,
1296
- mb: n.output ? 1.5 : 0
1297
- }, content: n.inputArguments, title: `${s}: ${m}`, isError: d })
1298
- ] }), e[16] = m, e[17] = d, e[18] = n.inputArguments, e[19] = n.output, e[20] = s, e[21] = v) : v = e[21];
1510
+ ] }), e[5] = c, e[6] = o.duration, e[7] = p) : p = e[7];
1511
+ let g;
1512
+ e[8] !== f ? (g = /* @__PURE__ */ a(z, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: T.traceFieldLabel, children: f }), e[8] = f, e[9] = g) : g = e[9];
1513
+ let d;
1514
+ e[10] !== r || e[11] !== o.status ? (d = /* @__PURE__ */ a(xt, { status: o.status, labels: r }), e[10] = r, e[11] = o.status, e[12] = d) : d = e[12];
1515
+ let x;
1516
+ e[13] !== g || e[14] !== d ? (x = /* @__PURE__ */ S(v, { sx: T.traceField, children: [
1517
+ g,
1518
+ d
1519
+ ] }), e[13] = g, e[14] = d, e[15] = x) : x = e[15];
1299
1520
  let y;
1300
- e[22] !== d || e[23] !== g || e[24] !== n.output || e[25] !== s ? (y = n.output && /* @__PURE__ */ k(C, { children: [
1301
- /* @__PURE__ */ c(A, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceField, children: g }),
1302
- /* @__PURE__ */ c(ue, { sx: {
1521
+ e[16] !== m || e[17] !== u || e[18] !== o.inputArguments || e[19] !== o.output || e[20] !== s ? (y = o.inputArguments && /* @__PURE__ */ S(v, { children: [
1522
+ /* @__PURE__ */ a(z, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: T.traceField, children: m }),
1523
+ /* @__PURE__ */ a(ue, { sx: {
1524
+ mt: 0.5,
1525
+ mb: o.output ? 1.5 : 0
1526
+ }, content: o.inputArguments, title: `${s}: ${m}`, isError: u })
1527
+ ] }), e[16] = m, e[17] = u, e[18] = o.inputArguments, e[19] = o.output, e[20] = s, e[21] = y) : y = e[21];
1528
+ let C;
1529
+ e[22] !== u || e[23] !== h || e[24] !== o.output || e[25] !== s ? (C = o.output && /* @__PURE__ */ S(v, { children: [
1530
+ /* @__PURE__ */ a(z, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: T.traceField, children: h }),
1531
+ /* @__PURE__ */ a(ue, { sx: {
1303
1532
  mt: 0.5
1304
- }, content: n.output, title: `${s}: ${g}`, isError: d })
1305
- ] }), e[22] = d, e[23] = g, e[24] = n.output, e[25] = s, e[26] = y) : y = e[26];
1306
- let T;
1307
- return e[27] !== x || e[28] !== h || e[29] !== b || e[30] !== v || e[31] !== y ? (T = /* @__PURE__ */ k(C, { children: [
1308
- x,
1309
- h,
1533
+ }, content: o.output, title: `${s}: ${h}`, isError: u })
1534
+ ] }), e[22] = u, e[23] = h, e[24] = o.output, e[25] = s, e[26] = C) : C = e[26];
1535
+ let w;
1536
+ return e[27] !== b || e[28] !== p || e[29] !== x || e[30] !== y || e[31] !== C ? (w = /* @__PURE__ */ S(v, { children: [
1310
1537
  b,
1311
- v,
1312
- y
1313
- ] }), e[27] = x, e[28] = h, e[29] = b, e[30] = v, e[31] = y, e[32] = T) : T = e[32], T;
1538
+ p,
1539
+ x,
1540
+ y,
1541
+ C
1542
+ ] }), e[27] = b, e[28] = p, e[29] = x, e[30] = y, e[31] = C, e[32] = w) : w = e[32], w;
1314
1543
  }
1315
1544
  function pe(t) {
1316
- const e = W(29), {
1317
- tool: n,
1318
- expanded: r,
1319
- onExpandedChange: l,
1320
- labels: o,
1321
- sx: d
1545
+ const e = P(29), {
1546
+ tool: o,
1547
+ expanded: n,
1548
+ onExpandedChange: i,
1549
+ labels: r,
1550
+ sx: u
1322
1551
  } = t;
1323
1552
  let s;
1324
- e[0] !== o ? (s = o === void 0 ? {} : o, e[0] = o, e[1] = s) : s = e[1];
1325
- const i = s, a = n.status === "running", p = i.toolExecuted ?? "Tool executed";
1326
- if (a) {
1327
- let y;
1328
- e[2] !== n ? (y = ye(n), e[2] = n, e[3] = y) : y = e[3];
1329
- let T;
1330
- return e[4] !== y ? (T = /* @__PURE__ */ c(rt, { children: y }), e[4] = y, e[5] = T) : T = e[5], T;
1553
+ e[0] !== r ? (s = r === void 0 ? {} : r, e[0] = r, e[1] = s) : s = e[1];
1554
+ const l = s, c = o.status === "running", f = l.toolExecuted ?? "Tool executed";
1555
+ if (c) {
1556
+ let C;
1557
+ e[2] !== o ? (C = ve(o), e[2] = o, e[3] = C) : C = e[3];
1558
+ let w;
1559
+ return e[4] !== C ? (w = /* @__PURE__ */ a(it, { children: C }), e[4] = C, e[5] = w) : w = e[5], w;
1331
1560
  }
1332
1561
  let m;
1333
- e[6] !== r || e[7] !== l ? (m = () => l?.(!r), e[6] = r, e[7] = l, e[8] = m) : m = e[8];
1334
- let g;
1335
- e[9] !== p ? (g = /* @__PURE__ */ c(A, { variant: "caption", fontWeight: 600, color: "text.secondary", children: p }), e[9] = p, e[10] = g) : g = e[10];
1336
- const x = r ? "rotate(90deg)" : "rotate(0deg)";
1562
+ e[6] !== n || e[7] !== i ? (m = () => i?.(!n), e[6] = n, e[7] = i, e[8] = m) : m = e[8];
1337
1563
  let h;
1338
- e[11] !== x ? (h = /* @__PURE__ */ c(xe, { sx: {
1339
- ...w.traceChevron,
1340
- transform: x
1341
- } }), e[11] = x, e[12] = h) : h = e[12];
1342
- let u;
1343
- e[13] !== r || e[14] !== m || e[15] !== g || e[16] !== h ? (u = /* @__PURE__ */ k(ie, { size: "small", variant: "text", onClick: m, "aria-expanded": r, sx: w.traceHeader, children: [
1564
+ e[9] !== f ? (h = /* @__PURE__ */ a(z, { variant: "caption", fontWeight: 600, color: "text.secondary", children: f }), e[9] = f, e[10] = h) : h = e[10];
1565
+ const b = n ? "rotate(90deg)" : "rotate(0deg)";
1566
+ let p;
1567
+ e[11] !== b ? (p = /* @__PURE__ */ a(ye, { sx: {
1568
+ ...T.traceChevron,
1569
+ transform: b
1570
+ } }), e[11] = b, e[12] = p) : p = e[12];
1571
+ let g;
1572
+ e[13] !== n || e[14] !== m || e[15] !== h || e[16] !== p ? (g = /* @__PURE__ */ S(le, { size: "small", variant: "text", onClick: m, "aria-expanded": n, sx: T.traceHeader, children: [
1573
+ h,
1574
+ p
1575
+ ] }), e[13] = n, e[14] = m, e[15] = h, e[16] = p, e[17] = g) : g = e[17];
1576
+ let d;
1577
+ e[18] !== l || e[19] !== o ? (d = /* @__PURE__ */ a(v, { sx: T.traceDetailsWrapper, children: /* @__PURE__ */ a(Se, { tool: o, labels: l }) }), e[18] = l, e[19] = o, e[20] = d) : d = e[20];
1578
+ let x;
1579
+ e[21] !== n || e[22] !== d ? (x = /* @__PURE__ */ a(se, { in: n, unmountOnExit: !0, children: d }), e[21] = n, e[22] = d, e[23] = x) : x = e[23];
1580
+ let y;
1581
+ return e[24] !== u || e[25] !== g || e[26] !== x || e[27] !== o.name ? (y = /* @__PURE__ */ S(v, { width: "100%", sx: u, "data-tool": o.name, className: "PsChat--tool-trace", children: [
1344
1582
  g,
1345
- h
1346
- ] }), e[13] = r, e[14] = m, e[15] = g, e[16] = h, e[17] = u) : u = e[17];
1347
- let f;
1348
- e[18] !== i || e[19] !== n ? (f = /* @__PURE__ */ c(C, { sx: w.traceDetailsWrapper, children: /* @__PURE__ */ c(Ce, { tool: n, labels: i }) }), e[18] = i, e[19] = n, e[20] = f) : f = e[20];
1349
- let b;
1350
- e[21] !== r || e[22] !== f ? (b = /* @__PURE__ */ c(se, { in: r, unmountOnExit: !0, children: f }), e[21] = r, e[22] = f, e[23] = b) : b = e[23];
1351
- let v;
1352
- return e[24] !== d || e[25] !== u || e[26] !== b || e[27] !== n.name ? (v = /* @__PURE__ */ k(C, { width: "100%", sx: d, "data-tool": n.name, className: "PsChat--tool-trace", children: [
1353
- u,
1354
- b
1355
- ] }), e[24] = d, e[25] = u, e[26] = b, e[27] = n.name, e[28] = v) : v = e[28], v;
1583
+ x
1584
+ ] }), e[24] = u, e[25] = g, e[26] = x, e[27] = o.name, e[28] = y) : y = e[28], y;
1356
1585
  }
1357
1586
  function me(t, e) {
1358
- const n = W(5), [r, l] = N(t);
1587
+ const o = P(5), [n, i] = te(t);
1359
1588
  if (e) {
1360
- let o;
1361
- return n[0] !== e || n[1] !== t ? (o = [t, e], n[0] = e, n[1] = t, n[2] = o) : o = n[2], o;
1589
+ let r;
1590
+ return o[0] !== e || o[1] !== t ? (r = [t, e], o[0] = e, o[1] = t, o[2] = r) : r = o[2], r;
1362
1591
  } else {
1363
- let o;
1364
- return n[3] !== r ? (o = [r, l], n[3] = r, n[4] = o) : o = n[4], o;
1592
+ let r;
1593
+ return o[3] !== n ? (r = [n, i], o[3] = n, o[4] = r) : r = o[4], r;
1365
1594
  }
1366
1595
  }
1367
- function Mt(t) {
1368
- const e = W(61), {
1369
- tools: n,
1370
- expanded: r,
1371
- onExpandedChange: l,
1372
- expandedTools: o,
1373
- onToolExpandedChange: d,
1596
+ function Pt(t) {
1597
+ const e = P(61), {
1598
+ tools: o,
1599
+ expanded: n,
1600
+ onExpandedChange: i,
1601
+ expandedTools: r,
1602
+ onToolExpandedChange: u,
1374
1603
  labels: s,
1375
- sx: i
1376
- } = t, a = r === void 0 ? !1 : r;
1377
- let p;
1378
- e[0] !== o ? (p = o === void 0 ? {} : o, e[0] = o, e[1] = p) : p = e[1];
1379
- const m = p;
1380
- let g;
1381
- e[2] !== s ? (g = s === void 0 ? {} : s, e[2] = s, e[3] = g) : g = e[3];
1382
- const x = g, [h, u] = me(a, l), [f, b] = me(m, d);
1383
- let v;
1384
- e[4] !== n ? (v = n.filter(bt), e[4] = n, e[5] = v) : v = e[5];
1385
- const y = v.length;
1386
- let T, S;
1387
- if (e[6] !== h || e[7] !== f || e[8] !== x || e[9] !== y || e[10] !== u || e[11] !== b || e[12] !== i || e[13] !== n) {
1388
- S = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
1604
+ sx: l
1605
+ } = t, c = n === void 0 ? !1 : n;
1606
+ let f;
1607
+ e[0] !== r ? (f = r === void 0 ? {} : r, e[0] = r, e[1] = f) : f = e[1];
1608
+ const m = f;
1609
+ let h;
1610
+ e[2] !== s ? (h = s === void 0 ? {} : s, e[2] = s, e[3] = h) : h = e[3];
1611
+ const b = h, [p, g] = me(c, i), [d, x] = me(m, u);
1612
+ let y;
1613
+ e[4] !== o ? (y = o.filter(Ct), e[4] = o, e[5] = y) : y = e[5];
1614
+ const C = y.length;
1615
+ let w, _;
1616
+ if (e[6] !== p || e[7] !== d || e[8] !== b || e[9] !== C || e[10] !== g || e[11] !== x || e[12] !== l || e[13] !== o) {
1617
+ _ = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
1389
1618
  e: {
1390
- const _ = n.filter(xt), E = n.filter(gt), L = x.toolsUsed ?? "tools used", $ = x.error ?? "Error";
1391
- if (n.length === 1) {
1392
- let F;
1393
- e[16] !== h || e[17] !== x || e[18] !== u || e[19] !== i || e[20] !== n[0] ? (F = /* @__PURE__ */ c(pe, { tool: n[0], expanded: h, onExpandedChange: u, labels: x, sx: i }), e[16] = h, e[17] = x, e[18] = u, e[19] = i, e[20] = n[0], e[21] = F) : F = e[21], S = F;
1619
+ const L = o.filter(yt), $ = o.filter(bt), A = b.toolsUsed ?? "tools used", M = b.error ?? "Error";
1620
+ if (o.length === 1) {
1621
+ let k;
1622
+ e[16] !== p || e[17] !== b || e[18] !== g || e[19] !== l || e[20] !== o[0] ? (k = /* @__PURE__ */ a(pe, { tool: o[0], expanded: p, onExpandedChange: g, labels: b, sx: l }), e[16] = p, e[17] = b, e[18] = g, e[19] = l, e[20] = o[0], e[21] = k) : k = e[21], _ = k;
1394
1623
  break e;
1395
1624
  }
1396
- let I;
1397
- e[22] !== h || e[23] !== u ? (I = () => u(!h), e[22] = h, e[23] = u, e[24] = I) : I = e[24];
1398
- const B = y > 0 ? 0.5 : 0;
1399
1625
  let R;
1400
- e[25] !== B ? (R = {
1401
- ...w.traceHeader,
1402
- pr: B
1403
- }, e[25] = B, e[26] = R) : R = e[26];
1626
+ e[22] !== p || e[23] !== g ? (R = () => g(!p), e[22] = p, e[23] = g, e[24] = R) : R = e[24];
1627
+ const O = C > 0 ? 0.5 : 0;
1628
+ let B;
1629
+ e[25] !== O ? (B = {
1630
+ ...T.traceHeader,
1631
+ pr: O
1632
+ }, e[25] = O, e[26] = B) : B = e[26];
1404
1633
  let D;
1405
- e[27] !== n.length || e[28] !== L ? (D = /* @__PURE__ */ k(A, { variant: "caption", fontWeight: 600, color: "text.secondary", children: [
1406
- n.length,
1634
+ e[27] !== o.length || e[28] !== A ? (D = /* @__PURE__ */ S(z, { variant: "caption", fontWeight: 600, color: "text.secondary", children: [
1635
+ o.length,
1407
1636
  " ",
1408
- L
1409
- ] }), e[27] = n.length, e[28] = L, e[29] = D) : D = e[29];
1410
- const M = h ? "rotate(90deg)" : "rotate(0deg)";
1411
- let P;
1412
- e[30] !== M ? (P = /* @__PURE__ */ c(xe, { sx: {
1413
- ...w.traceChevron,
1414
- transform: M
1415
- } }), e[30] = M, e[31] = P) : P = e[31];
1416
- let V;
1417
- e[32] !== y ? (V = y > 0 && /* @__PURE__ */ k(A, { variant: "code3", sx: w.errorBadge, children: [
1418
- y,
1419
- /* @__PURE__ */ c(he, { sx: {
1637
+ A
1638
+ ] }), e[27] = o.length, e[28] = A, e[29] = D) : D = e[29];
1639
+ const j = p ? "rotate(90deg)" : "rotate(0deg)";
1640
+ let K;
1641
+ e[30] !== j ? (K = /* @__PURE__ */ a(ye, { sx: {
1642
+ ...T.traceChevron,
1643
+ transform: j
1644
+ } }), e[30] = j, e[31] = K) : K = e[31];
1645
+ let G;
1646
+ e[32] !== C ? (G = C > 0 && /* @__PURE__ */ S(z, { variant: "code3", sx: T.errorBadge, children: [
1647
+ C,
1648
+ /* @__PURE__ */ a(ge, { sx: {
1420
1649
  fontSize: 12
1421
1650
  }, color: "error" })
1422
- ] }), e[32] = y, e[33] = V) : V = e[33];
1423
- let Y;
1424
- e[34] !== h || e[35] !== R || e[36] !== D || e[37] !== P || e[38] !== V || e[39] !== I ? (Y = /* @__PURE__ */ k(ie, { size: "small", variant: "text", onClick: I, "aria-expanded": h, sx: R, children: [
1651
+ ] }), e[32] = C, e[33] = G) : G = e[33];
1652
+ let J;
1653
+ e[34] !== p || e[35] !== B || e[36] !== D || e[37] !== K || e[38] !== G || e[39] !== R ? (J = /* @__PURE__ */ S(le, { size: "small", variant: "text", onClick: R, "aria-expanded": p, sx: B, children: [
1425
1654
  D,
1426
- P,
1427
- V
1428
- ] }), e[34] = h, e[35] = R, e[36] = D, e[37] = P, e[38] = V, e[39] = I, e[40] = Y) : Y = e[40];
1429
- const ee = se, te = h, ne = !0, oe = C, re = "ul";
1430
- let j;
1431
- e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (j = {
1432
- ...w.traceDetailsWrapper,
1655
+ K,
1656
+ G
1657
+ ] }), e[34] = p, e[35] = B, e[36] = D, e[37] = K, e[38] = G, e[39] = R, e[40] = J) : J = e[40];
1658
+ const Q = se, Z = p, U = !0, Y = v, q = "ul";
1659
+ let V;
1660
+ e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (V = {
1661
+ ...T.traceDetailsWrapper,
1433
1662
  p: 0,
1434
1663
  listStyle: "none"
1435
- }, e[41] = j) : j = e[41];
1436
- let K;
1437
- e[42] !== $ || e[43] !== f || e[44] !== x || e[45] !== b ? (K = (F) => {
1438
- const G = f[F.id] ?? !1;
1439
- return /* @__PURE__ */ k(C, { component: "li", sx: w.groupListItem, "aria-expanded": G, children: [
1440
- /* @__PURE__ */ k(ie, { variant: "text", color: "inherit", fullWidth: !0, onClick: () => b({
1441
- ...f,
1442
- [F.id]: !G
1443
- }), "aria-expanded": G, sx: w.groupHeader, children: [
1444
- /* @__PURE__ */ c(A, { flexGrow: 1, flexShrink: 0, variant: "caption", color: "text.secondary", children: ye(F) }),
1445
- F.status === "error" && /* @__PURE__ */ c(A, { variant: "code3", color: "error.main", children: $ }),
1446
- /* @__PURE__ */ c(Ne, { sx: {
1447
- ...w.traceChevron,
1448
- transform: G ? "rotate(90deg)" : "rotate(0deg)"
1664
+ }, e[41] = V) : V = e[41];
1665
+ let I;
1666
+ e[42] !== M || e[43] !== d || e[44] !== b || e[45] !== x ? (I = (k) => {
1667
+ const E = d[k.id] ?? !1;
1668
+ return /* @__PURE__ */ S(v, { component: "li", sx: T.groupListItem, "aria-expanded": E, children: [
1669
+ /* @__PURE__ */ S(le, { variant: "text", color: "inherit", fullWidth: !0, onClick: () => x({
1670
+ ...d,
1671
+ [k.id]: !E
1672
+ }), "aria-expanded": E, sx: T.groupHeader, children: [
1673
+ /* @__PURE__ */ a(z, { flexGrow: 1, flexShrink: 0, variant: "caption", color: "text.secondary", children: ve(k) }),
1674
+ k.status === "error" && /* @__PURE__ */ a(z, { variant: "code3", color: "error.main", children: M }),
1675
+ /* @__PURE__ */ a(Xe, { sx: {
1676
+ ...T.traceChevron,
1677
+ transform: E ? "rotate(90deg)" : "rotate(0deg)"
1449
1678
  } })
1450
1679
  ] }),
1451
- /* @__PURE__ */ c(se, { in: G, unmountOnExit: !0, children: /* @__PURE__ */ c(C, { px: 1.5, py: 1, children: /* @__PURE__ */ c(Ce, { tool: F, labels: x }) }) })
1452
- ] }, F.id);
1453
- }, e[42] = $, e[43] = f, e[44] = x, e[45] = b, e[46] = K) : K = e[46];
1454
- const le = E.map(K);
1455
- let U;
1456
- e[47] !== oe || e[48] !== re || e[49] !== j || e[50] !== le ? (U = /* @__PURE__ */ c(oe, { component: re, sx: j, children: le }), e[47] = oe, e[48] = re, e[49] = j, e[50] = le, e[51] = U) : U = e[51];
1457
- let q;
1458
- e[52] !== ee || e[53] !== te || e[54] !== ne || e[55] !== U ? (q = /* @__PURE__ */ c(ee, { in: te, unmountOnExit: ne, children: U }), e[52] = ee, e[53] = te, e[54] = ne, e[55] = U, e[56] = q) : q = e[56];
1459
- let J;
1460
- e[57] !== f || e[58] !== x || e[59] !== b ? (J = (F) => /* @__PURE__ */ c(pe, { tool: F, labels: x, expanded: f[F.id], onExpandedChange: () => b({
1461
- ...f,
1462
- [F.id]: !f[F.id]
1463
- }) }, F.id), e[57] = f, e[58] = x, e[59] = b, e[60] = J) : J = e[60], T = /* @__PURE__ */ k(C, { width: "100%", sx: i, className: "PsChat--tool-group", children: [
1464
- Y,
1465
- q,
1466
- _.map(J)
1680
+ /* @__PURE__ */ a(se, { in: E, unmountOnExit: !0, children: /* @__PURE__ */ a(v, { px: 1.5, py: 1, children: /* @__PURE__ */ a(Se, { tool: k, labels: b }) }) })
1681
+ ] }, k.id);
1682
+ }, e[42] = M, e[43] = d, e[44] = b, e[45] = x, e[46] = I) : I = e[46];
1683
+ const F = $.map(I);
1684
+ let W;
1685
+ e[47] !== Y || e[48] !== q || e[49] !== V || e[50] !== F ? (W = /* @__PURE__ */ a(Y, { component: q, sx: V, children: F }), e[47] = Y, e[48] = q, e[49] = V, e[50] = F, e[51] = W) : W = e[51];
1686
+ let X;
1687
+ e[52] !== Q || e[53] !== Z || e[54] !== U || e[55] !== W ? (X = /* @__PURE__ */ a(Q, { in: Z, unmountOnExit: U, children: W }), e[52] = Q, e[53] = Z, e[54] = U, e[55] = W, e[56] = X) : X = e[56];
1688
+ let N;
1689
+ e[57] !== d || e[58] !== b || e[59] !== x ? (N = (k) => /* @__PURE__ */ a(pe, { tool: k, labels: b, expanded: d[k.id], onExpandedChange: () => x({
1690
+ ...d,
1691
+ [k.id]: !d[k.id]
1692
+ }) }, k.id), e[57] = d, e[58] = b, e[59] = x, e[60] = N) : N = e[60], w = /* @__PURE__ */ S(v, { width: "100%", sx: l, className: "PsChat--tool-group", children: [
1693
+ J,
1694
+ X,
1695
+ L.map(N)
1467
1696
  ] });
1468
1697
  }
1469
- e[6] = h, e[7] = f, e[8] = x, e[9] = y, e[10] = u, e[11] = b, e[12] = i, e[13] = n, e[14] = T, e[15] = S;
1698
+ e[6] = p, e[7] = d, e[8] = b, e[9] = C, e[10] = g, e[11] = x, e[12] = l, e[13] = o, e[14] = w, e[15] = _;
1470
1699
  } else
1471
- T = e[14], S = e[15];
1472
- return S !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel") ? S : T;
1700
+ w = e[14], _ = e[15];
1701
+ return _ !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel") ? _ : w;
1473
1702
  }
1474
- function gt(t) {
1703
+ function bt(t) {
1475
1704
  return t.status !== "running";
1476
1705
  }
1477
- function xt(t) {
1706
+ function yt(t) {
1478
1707
  return t.status === "running";
1479
1708
  }
1480
- function bt(t) {
1709
+ function Ct(t) {
1481
1710
  return t.status === "error";
1482
1711
  }
1483
1712
  export {
1484
- It as CHAT_DIVIDER_DELAY,
1485
- Q as CHAT_MAX_WIDTH,
1486
- _t as CHAT_SCROLL_DELAY,
1487
- Ke as CHAT_TOOL_CODE_AREA_MAX_HEIGHT,
1488
- Wt as ChatActionsContainer,
1489
- Je as ChatAgentMessage,
1490
- it as ChatContent,
1491
- $t as ChatErrorMessage,
1492
- Bt as ChatFooter,
1493
- Dt as ChatHeader,
1494
- Rt as ChatLoader,
1495
- be as ChatMessageOverflow,
1496
- zt as ChatRatingAction,
1713
+ Et as CHAT_DIVIDER_DELAY,
1714
+ ie as CHAT_MAX_WIDTH,
1715
+ $t as CHAT_SCROLL_DELAY,
1716
+ Je as CHAT_TOOL_CODE_AREA_MAX_HEIGHT,
1717
+ Ot as ChatActionsContainer,
1718
+ Ze as ChatAgentMessage,
1719
+ at as ChatContent,
1720
+ Dt as ChatErrorMessage,
1721
+ Wt as ChatFooter,
1722
+ zt as ChatHeader,
1723
+ Mt as ChatLoader,
1724
+ Ce as ChatMessageOverflow,
1725
+ Ht as ChatRatingAction,
1497
1726
  Ft as ChatStarter,
1498
- et as ChatSuggestionButton,
1499
- rt as ChatThinking,
1727
+ ot as ChatSuggestionButton,
1728
+ it as ChatThinking,
1500
1729
  ue as ChatToolCodeArea,
1501
- ut as ChatToolFullViewDialog,
1502
- Mt as ChatToolGroup,
1730
+ pt as ChatToolFullViewDialog,
1731
+ Pt as ChatToolGroup,
1503
1732
  pe as ChatToolTrace,
1504
- Lt as ChatUserMessage,
1505
- Et as useTypewriter
1733
+ Bt as ChatUserMessage,
1734
+ Rt as useTypewriter
1506
1735
  };
1507
1736
  //# sourceMappingURL=chat.js.map