drizzle-cube 0.4.22 → 0.4.24

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 (37) hide show
  1. package/dist/adapters/express/index.cjs +1 -1
  2. package/dist/adapters/express/index.js +2 -2
  3. package/dist/adapters/fastify/index.cjs +1 -1
  4. package/dist/adapters/fastify/index.js +2 -2
  5. package/dist/adapters/{handler-9Rdn7zM2.js → handler-BV2_dul8.js} +2 -2
  6. package/dist/adapters/{handler-B-tEntiU.cjs → handler-LMRPeTNJ.cjs} +2 -2
  7. package/dist/adapters/hono/index.cjs +6 -6
  8. package/dist/adapters/hono/index.d.ts +13 -6
  9. package/dist/adapters/hono/index.js +65 -65
  10. package/dist/{server/index-CFEJ62GJ.js → adapters/index-C3PskWTr.js} +209 -193
  11. package/dist/{server/index-BIMhF5KZ.cjs → adapters/index-ht4NPca9.cjs} +11 -11
  12. package/dist/adapters/{mcp-transport-m1X1GtwG.js → mcp-transport-B6ZudTSk.js} +7 -0
  13. package/dist/adapters/{mcp-transport-8u9G5oNa.cjs → mcp-transport-DCiSGtp1.cjs} +1 -1
  14. package/dist/adapters/nextjs/index.cjs +2 -2
  15. package/dist/adapters/nextjs/index.js +2 -2
  16. package/dist/adapters/{openai-mLo2MCat.cjs → openai-BvA6eLs8.cjs} +1 -1
  17. package/dist/adapters/{openai-CUSRuKTk.js → openai-mcE24du8.js} +1 -1
  18. package/dist/client/chunks/{analysis-builder-DVrv9Q4n.js → analysis-builder-KeTsXp1G.js} +141 -141
  19. package/dist/client/chunks/{analysis-builder-DVrv9Q4n.js.map → analysis-builder-KeTsXp1G.js.map} +1 -1
  20. package/dist/client/chunks/{analysis-builder-shared-CrENEvEk.js → analysis-builder-shared-KSvGUzx6.js} +2 -2
  21. package/dist/client/chunks/{analysis-builder-shared-CrENEvEk.js.map → analysis-builder-shared-KSvGUzx6.js.map} +1 -1
  22. package/dist/client/chunks/{components-GzooQM5J.js → components-Dz6XHgnZ.js} +49 -49
  23. package/dist/client/chunks/{components-GzooQM5J.js.map → components-Dz6XHgnZ.js.map} +1 -1
  24. package/dist/client/components/AgenticNotebook/NotebookCanvas.d.ts +4 -1
  25. package/dist/client/components/AgenticNotebook/NotebookPortletBlock.d.ts +2 -0
  26. package/dist/client/components.js +3 -3
  27. package/dist/client/index.js +678 -672
  28. package/dist/client/index.js.map +1 -1
  29. package/dist/client-bundle-stats.html +1 -1
  30. package/dist/{adapters/index-CFEJ62GJ.js → server/index-C3PskWTr.js} +209 -193
  31. package/dist/{adapters/index-BIMhF5KZ.cjs → server/index-ht4NPca9.cjs} +11 -11
  32. package/dist/server/index.cjs +2 -2
  33. package/dist/server/index.d.ts +5 -0
  34. package/dist/server/index.js +8 -1
  35. package/dist/server/{openai-mLo2MCat.cjs → openai-BvA6eLs8.cjs} +1 -1
  36. package/dist/server/{openai-CUSRuKTk.js → openai-mcE24du8.js} +1 -1
  37. package/package.json +1 -1
@@ -1,27 +1,27 @@
1
- import { D as ve, A as Ce, e as we, P as Ne } from "./chunks/components-GzooQM5J.js";
2
- import { i as Lt, a as Pt, C as Qt, h as Ft, g as _t, b as Vt, j as jt, f as Ut, d as Ot, M as $t, c as qt, n as Kt, T as zt, R as Wt, Q as Jt, O as Xt, S as Yt, V as Gt, I as Ht, H as Zt, K as es, W as ts, G as ss, J as cs, X as rs, L as ns, N as as, U as os, Y as ds, Z as ls, z as is, q as us, x as ms, t as hs, s as fs, w as ps, p as gs, v as bs, o as xs, r as ys, y as vs, u as Cs, k as ws, l as Ns, m as ks, F as Ss, E as Ts, B as Ds } from "./chunks/components-GzooQM5J.js";
3
- import { jsx as e, jsxs as u, Fragment as ne } from "react/jsx-runtime";
4
- import Y, { useRef as g, createContext as ke, useContext as Se, useState as j, useCallback as f, useEffect as V } from "react";
5
- import { e as Te, f as De, h as Ae, s as Ie, i as de } from "./chunks/vendor-B2EH3V58.js";
6
- import { a as B, b as Me } from "./chunks/icons-DFJw-2HU.js";
7
- import { D as Is, i as Ms, c as Es, f as Rs, h as Bs, g as Ls, r as Ps, e as Qs, s as Fs } from "./chunks/icons-DFJw-2HU.js";
8
- import { Q as Ee } from "./chunks/chart-markdown-Du4Z2iqK.js";
9
- import { f as Re } from "./chunks/providers-CCw8Kjlc.js";
10
- import { h as Vs, a as js, S as Us, e as Os, d as $s, i as qs, b as Ks, g as zs, u as Ws, j as Js, c as Xs, w as Ys } from "./chunks/providers-CCw8Kjlc.js";
11
- import { L as me } from "./chunks/charts-core-B4Rbfdcn.js";
12
- import { u as Hs } from "./chunks/charts-core-B4Rbfdcn.js";
13
- import { useNotebookLayout as Be } from "./hooks.js";
14
- import { L as ec, g as tc, c as sc, b as cc, i as rc, p as nc, a as ac } from "./chunks/charts-loader-DbrwgvCK.js";
15
- import { E as dc, a as lc, p as ic, q as uc, m as mc, l as hc, r as fc, C as pc, D as gc, o as bc, B as xc, n as yc, w as vc, t as Cc, d as wc, f as Nc, s as kc, e as Sc, i as Tc, c as Dc, h as Ac, g as Ic, u as Mc, b as Ec, y as Rc, A as Bc, x as Lc, k as Pc, v as Qc, z as Fc, j as _c } from "./chunks/analysis-builder-shared-CrENEvEk.js";
16
- import { u as jc } from "./chunks/chart-bubble-ZfNe8t5k.js";
17
- import { c as Oc, f as $c } from "./chunks/index-CApFCBF9.js";
18
- import { f as Kc, d as zc, n as Wc, j as Jc, l as Xc, k as Yc, i as Gc, m as Hc, h as Zc, g as er, u as tr, u as sr, e as cr, b as rr, a as nr, v as ar } from "./chunks/useDirtyStateTracking-CjhwBXRw.js";
19
- import { c as dr, b as lr, f as ir, g as ur, a as mr, i as hr, t as fr } from "./chunks/funnel-utils-CyonoNeC.js";
20
- import { T as gr, c as br, g as xr, a as yr, i as vr, r as Cr, s as wr, b as Nr, w as kr } from "./chunks/theme-Dp3hFed1.js";
21
- import { d as Tr, b as Dr, u as Ar, e as Ir, c as Mr, a as Er } from "./chunks/useExplainAI-IiW55BaQ.js";
22
- import { i as Br, a as Lr } from "./chunks/flow-utils-CjQZG5qq.js";
23
- import { h as Qr } from "./chunks/syntaxHighlighting-DAMSW_A6.js";
24
- const he = () => ({
1
+ import { D as ve, A as Ce, e as we, g as Ne, P as ke } from "./chunks/components-Dz6XHgnZ.js";
2
+ import { j as Lt, a as Qt, C as Ft, i as _t, h as Vt, b as jt, k as Ut, f as Ot, d as $t, M as qt, c as Kt, o as zt, U as Wt, S as Jt, R as Xt, Q as Yt, T as Gt, W as Ht, J as Zt, I as es, L as ts, X as ss, H as cs, K as rs, Y as ns, N as as, O as os, V as ds, Z as ls, _ as is, B as us, r as ms, y as hs, v as fs, s as ps, x as gs, q as bs, w as xs, p as ys, t as vs, z as Cs, u as ws, l as Ns, m as ks, n as Ss, G as Ts, F as Ds, E as As } from "./chunks/components-Dz6XHgnZ.js";
3
+ import { jsx as e, jsxs as u, Fragment as ae } from "react/jsx-runtime";
4
+ import G, { useRef as x, createContext as Se, useContext as Te, useState as _, useCallback as p, useEffect as F } from "react";
5
+ import { e as De, f as Ae, h as Ie, s as Me, i as le } from "./chunks/vendor-B2EH3V58.js";
6
+ import { a as M, b as Ee } from "./chunks/icons-DFJw-2HU.js";
7
+ import { D as Ms, i as Es, c as Rs, f as Bs, h as Ps, g as Ls, r as Qs, e as Fs, s as _s } from "./chunks/icons-DFJw-2HU.js";
8
+ import { Q as Re } from "./chunks/chart-markdown-Du4Z2iqK.js";
9
+ import { f as Be } from "./chunks/providers-CCw8Kjlc.js";
10
+ import { h as js, a as Us, S as Os, e as $s, d as qs, i as Ks, b as zs, g as Ws, u as Js, j as Xs, c as Ys, w as Gs } from "./chunks/providers-CCw8Kjlc.js";
11
+ import { L as he } from "./chunks/charts-core-B4Rbfdcn.js";
12
+ import { u as Zs } from "./chunks/charts-core-B4Rbfdcn.js";
13
+ import { useNotebookLayout as Pe } from "./hooks.js";
14
+ import { L as tc, g as sc, c as cc, b as rc, i as nc, p as ac, a as oc } from "./chunks/charts-loader-DbrwgvCK.js";
15
+ import { E as lc, a as ic, p as uc, q as mc, m as hc, l as fc, r as pc, C as gc, D as bc, o as xc, B as yc, n as vc, w as Cc, t as wc, d as Nc, f as kc, s as Sc, e as Tc, i as Dc, c as Ac, h as Ic, g as Mc, u as Ec, b as Rc, y as Bc, A as Pc, x as Lc, k as Qc, v as Fc, z as _c, j as Vc } from "./chunks/analysis-builder-shared-KSvGUzx6.js";
16
+ import { u as Uc } from "./chunks/chart-bubble-ZfNe8t5k.js";
17
+ import { c as $c, f as qc } from "./chunks/index-CApFCBF9.js";
18
+ import { f as zc, d as Wc, n as Jc, j as Xc, l as Yc, k as Gc, i as Hc, m as Zc, h as er, g as tr, u as sr, u as cr, e as rr, b as nr, a as ar, v as or } from "./chunks/useDirtyStateTracking-CjhwBXRw.js";
19
+ import { c as lr, b as ir, f as ur, g as mr, a as hr, i as fr, t as pr } from "./chunks/funnel-utils-CyonoNeC.js";
20
+ import { T as br, c as xr, g as yr, a as vr, i as Cr, r as wr, s as Nr, b as kr, w as Sr } from "./chunks/theme-Dp3hFed1.js";
21
+ import { d as Dr, b as Ar, u as Ir, e as Mr, c as Er, a as Rr } from "./chunks/useExplainAI-IiW55BaQ.js";
22
+ import { i as Pr, a as Lr } from "./chunks/flow-utils-CjQZG5qq.js";
23
+ import { h as Fr } from "./chunks/syntaxHighlighting-DAMSW_A6.js";
24
+ const fe = () => ({
25
25
  blocks: [],
26
26
  messages: [],
27
27
  isStreaming: !1,
@@ -31,54 +31,54 @@ const he = () => ({
31
31
  function Le(t, s) {
32
32
  return {
33
33
  // Block actions
34
- addBlock: (c) => t((a) => ({
35
- blocks: [...a.blocks, c]
34
+ addBlock: (c) => t((n) => ({
35
+ blocks: [...n.blocks, c]
36
36
  })),
37
- removeBlock: (c) => t((a) => ({
38
- blocks: a.blocks.filter((n) => n.id !== c)
37
+ removeBlock: (c) => t((n) => ({
38
+ blocks: n.blocks.filter((a) => a.id !== c)
39
39
  })),
40
- moveBlock: (c, a) => t((n) => {
41
- const r = n.blocks.findIndex((d) => d.id === c);
40
+ moveBlock: (c, n) => t((a) => {
41
+ const r = a.blocks.findIndex((l) => l.id === c);
42
42
  if (r === -1) return {};
43
- if (a === "up" && r === 0) return {};
44
- if (a === "down" && r === n.blocks.length - 1) return {};
45
- const o = [...n.blocks], l = a === "up" ? r - 1 : r + 1;
46
- return [o[r], o[l]] = [o[l], o[r]], { blocks: o };
43
+ if (n === "up" && r === 0) return {};
44
+ if (n === "down" && r === a.blocks.length - 1) return {};
45
+ const o = [...a.blocks], i = n === "up" ? r - 1 : r + 1;
46
+ return [o[r], o[i]] = [o[i], o[r]], { blocks: o };
47
47
  }),
48
- updateBlock: (c, a) => t((n) => ({
49
- blocks: n.blocks.map(
50
- (r) => r.id === c && r.type === "portlet" ? { ...r, ...a } : r
48
+ updateBlock: (c, n) => t((a) => ({
49
+ blocks: a.blocks.map(
50
+ (r) => r.id === c && r.type === "portlet" ? { ...r, ...n } : r
51
51
  )
52
52
  })),
53
53
  // Chat actions
54
- addMessage: (c) => t((a) => ({
55
- messages: [...a.messages, c]
54
+ addMessage: (c) => t((n) => ({
55
+ messages: [...n.messages, c]
56
56
  })),
57
- appendToLastAssistantMessage: (c) => t((a) => {
58
- const n = [...a.messages], r = n[n.length - 1];
59
- return r && r.role === "assistant" && (n[n.length - 1] = {
57
+ appendToLastAssistantMessage: (c) => t((n) => {
58
+ const a = [...n.messages], r = a[a.length - 1];
59
+ return r && r.role === "assistant" && (a[a.length - 1] = {
60
60
  ...r,
61
61
  content: r.content + c
62
- }), { messages: n };
62
+ }), { messages: a };
63
63
  }),
64
- setLastAssistantError: (c) => t((a) => {
65
- const n = [...a.messages], r = n[n.length - 1];
66
- return r && r.role === "assistant" && (n[n.length - 1] = { ...r, error: c }), { messages: n };
64
+ setLastAssistantError: (c) => t((n) => {
65
+ const a = [...n.messages], r = a[a.length - 1];
66
+ return r && r.role === "assistant" && (a[a.length - 1] = { ...r, error: c }), { messages: a };
67
67
  }),
68
- addToolCallToLastAssistant: (c) => t((a) => {
69
- const n = [...a.messages], r = n[n.length - 1];
70
- return r && r.role === "assistant" && (n[n.length - 1] = {
68
+ addToolCallToLastAssistant: (c) => t((n) => {
69
+ const a = [...n.messages], r = a[a.length - 1];
70
+ return r && r.role === "assistant" && (a[a.length - 1] = {
71
71
  ...r,
72
72
  toolCalls: [...r.toolCalls || [], c]
73
- }), { messages: n };
73
+ }), { messages: a };
74
74
  }),
75
- updateLastToolCall: (c) => t((a) => {
76
- const n = [...a.messages], r = n[n.length - 1];
75
+ updateLastToolCall: (c) => t((n) => {
76
+ const a = [...n.messages], r = a[a.length - 1];
77
77
  if (r?.role === "assistant" && r.toolCalls?.length) {
78
- const o = [...r.toolCalls], l = c.id ? o.findIndex((d) => d.id === c.id) : o.length - 1;
79
- l !== -1 && (o[l] = { ...o[l], ...c }, n[n.length - 1] = { ...r, toolCalls: o });
78
+ const o = [...r.toolCalls], i = c.id ? o.findIndex((l) => l.id === c.id) : o.length - 1;
79
+ i !== -1 && (o[i] = { ...o[i], ...c }, a[a.length - 1] = { ...r, toolCalls: o });
80
80
  }
81
- return { messages: n };
81
+ return { messages: a };
82
82
  }),
83
83
  // Session/UI actions
84
84
  setIsStreaming: (c) => t({ isStreaming: c }),
@@ -97,14 +97,14 @@ function Le(t, s) {
97
97
  messages: c.messages || []
98
98
  }),
99
99
  // Reset
100
- reset: () => t(he())
100
+ reset: () => t(fe())
101
101
  };
102
102
  }
103
- function Pe() {
104
- const t = he();
105
- return De()(
106
- Ae(
107
- Ie((s, c) => ({
103
+ function Qe() {
104
+ const t = fe();
105
+ return Ae()(
106
+ Ie(
107
+ Me((s, c) => ({
108
108
  ...t,
109
109
  ...Le(s, c)
110
110
  })),
@@ -112,29 +112,29 @@ function Pe() {
112
112
  )
113
113
  );
114
114
  }
115
- const fe = ke(null);
116
- function Qe({
115
+ const pe = Se(null);
116
+ function Fe({
117
117
  children: t,
118
118
  initialConfig: s
119
119
  }) {
120
- const c = g(null);
120
+ const c = x(null);
121
121
  if (!c.current) {
122
- const a = Pe();
123
- s && a.getState().load(s), c.current = a;
122
+ const n = Qe();
123
+ s && n.getState().load(s), c.current = n;
124
124
  }
125
- return /* @__PURE__ */ e(fe.Provider, { value: c.current, children: t });
125
+ return /* @__PURE__ */ e(pe.Provider, { value: c.current, children: t });
126
126
  }
127
- function P(t) {
128
- const s = Se(fe);
127
+ function B(t) {
128
+ const s = Te(pe);
129
129
  if (!s)
130
130
  throw new Error("useNotebookStore must be used within NotebookStoreProvider");
131
- return Te(s, t);
131
+ return De(s, t);
132
132
  }
133
- const Fe = (t) => t.blocks, St = (t) => t.messages, Tt = (t) => t.isStreaming, Dt = (t) => t.sessionId, At = (t) => t.inputValue, _e = (t) => ({
133
+ const _e = (t) => t.blocks, Tt = (t) => t.messages, Dt = (t) => t.isStreaming, At = (t) => t.sessionId, It = (t) => t.inputValue, Ve = (t) => ({
134
134
  messages: t.messages,
135
135
  isStreaming: t.isStreaming,
136
136
  inputValue: t.inputValue
137
- }), Ve = (t) => ({
137
+ }), je = (t) => ({
138
138
  addMessage: t.addMessage,
139
139
  appendToLastAssistantMessage: t.appendToLastAssistantMessage,
140
140
  setLastAssistantError: t.setLastAssistantError,
@@ -143,74 +143,75 @@ const Fe = (t) => t.blocks, St = (t) => t.messages, Tt = (t) => t.isStreaming, D
143
143
  setIsStreaming: t.setIsStreaming,
144
144
  setInputValue: t.setInputValue,
145
145
  setSessionId: t.setSessionId
146
- }), je = (t) => ({
146
+ }), Ue = (t) => ({
147
147
  addBlock: t.addBlock,
148
148
  removeBlock: t.removeBlock,
149
149
  moveBlock: t.moveBlock,
150
150
  updateBlock: t.updateBlock
151
- }), ce = { width: "16px", height: "16px", color: "currentColor" }, Ue = B("chevronUp"), Oe = B("chevronDown"), $e = B("edit"), qe = B("delete"), Ke = Y.memo(function({
151
+ }), re = { width: "16px", height: "16px", color: "currentColor" }, Oe = M("chevronUp"), $e = M("chevronDown"), qe = M("edit"), Ke = M("delete"), ze = G.memo(function({
152
152
  block: s,
153
- onRemove: c,
153
+ colorPalette: c,
154
+ onRemove: n,
154
155
  onMoveUp: a,
155
- onMoveDown: n,
156
- onEdit: r,
157
- isFirst: o,
156
+ onMoveDown: r,
157
+ onEdit: o,
158
+ isFirst: i,
158
159
  isLast: l
159
160
  }) {
160
- const [d, T] = j(null), w = f((A) => {
161
- T(A);
161
+ const [y, N] = _(null), S = p((v) => {
162
+ N(v);
162
163
  }, []);
163
164
  return /* @__PURE__ */ u("div", { className: "dc:relative dc:mb-4 bg-dc-surface dc:border border-dc-border dc:rounded-lg dc:flex dc:flex-col", children: [
164
165
  /* @__PURE__ */ u("div", { className: "dc:flex dc:items-center dc:justify-between dc:px-3 dc:py-1.5 dc:border-b border-dc-border dc:shrink-0 bg-dc-surface-secondary dc:rounded-t-lg", children: [
165
166
  /* @__PURE__ */ u("div", { className: "dc:flex dc:items-center dc:gap-2 dc:flex-1 dc:min-w-0", children: [
166
167
  /* @__PURE__ */ e("h3", { className: "dc:font-semibold dc:text-sm text-dc-text dc:truncate", children: s.title || "Untitled" }),
167
- d && /* @__PURE__ */ e(
168
+ y && /* @__PURE__ */ e(
168
169
  ve,
169
170
  {
170
- chartConfig: d.chartConfig,
171
- displayConfig: d.displayConfig,
172
- queryObject: d.queryObject,
173
- data: d.data,
174
- chartType: d.chartType,
175
- cacheInfo: d.cacheInfo ?? void 0
171
+ chartConfig: y.chartConfig,
172
+ displayConfig: y.displayConfig,
173
+ queryObject: y.queryObject,
174
+ data: y.data,
175
+ chartType: y.chartType,
176
+ cacheInfo: y.cacheInfo ?? void 0
176
177
  }
177
178
  )
178
179
  ] }),
179
180
  /* @__PURE__ */ u("div", { className: "dc:flex dc:items-center dc:gap-1 dc:shrink-0 dc:ml-4 dc:-mr-2", children: [
180
- !o && /* @__PURE__ */ e(
181
+ !i && /* @__PURE__ */ e(
181
182
  "button",
182
183
  {
183
184
  onClick: () => a(s.id),
184
185
  className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
185
186
  title: "Move up",
186
- children: /* @__PURE__ */ e(Ue, { style: ce })
187
+ children: /* @__PURE__ */ e(Oe, { style: re })
187
188
  }
188
189
  ),
189
190
  !l && /* @__PURE__ */ e(
190
191
  "button",
191
192
  {
192
- onClick: () => n(s.id),
193
+ onClick: () => r(s.id),
193
194
  className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
194
195
  title: "Move down",
195
- children: /* @__PURE__ */ e(Oe, { style: ce })
196
+ children: /* @__PURE__ */ e($e, { style: re })
196
197
  }
197
198
  ),
198
199
  /* @__PURE__ */ e(
199
200
  "button",
200
201
  {
201
- onClick: () => r(s),
202
+ onClick: () => o(s),
202
203
  className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
203
204
  title: "Edit visualization",
204
- children: /* @__PURE__ */ e($e, { style: ce })
205
+ children: /* @__PURE__ */ e(qe, { style: re })
205
206
  }
206
207
  ),
207
208
  /* @__PURE__ */ e(
208
209
  "button",
209
210
  {
210
- onClick: () => c(s.id),
211
+ onClick: () => n(s.id),
211
212
  className: "dc:p-1 dc:mr-0.5 dc:bg-transparent dc:border-none dc:rounded-sm dc:cursor-pointer dc:hover:bg-dc-danger-bg text-dc-danger dc:transition-colors",
212
213
  title: "Remove",
213
- children: /* @__PURE__ */ e(qe, { style: ce })
214
+ children: /* @__PURE__ */ e(Ke, { style: re })
214
215
  }
215
216
  )
216
217
  ] })
@@ -222,17 +223,18 @@ const Fe = (t) => t.blocks, St = (t) => t.messages, Tt = (t) => t.isStreaming, D
222
223
  chartType: s.chartType,
223
224
  chartConfig: s.chartConfig,
224
225
  displayConfig: s.displayConfig,
226
+ colorPalette: c,
225
227
  height: 400,
226
228
  eagerLoad: !0,
227
- onDebugDataReady: w
229
+ onDebugDataReady: S
228
230
  }
229
231
  ) })
230
232
  ] });
231
- }), re = { width: "16px", height: "16px", color: "currentColor" }, ze = B("documentText"), We = B("chevronUp"), Je = B("chevronDown"), Xe = B("delete");
232
- function Ye({ children: t, ...s }) {
233
+ }), ne = { width: "16px", height: "16px", color: "currentColor" }, We = M("documentText"), Je = M("chevronUp"), Xe = M("chevronDown"), Ye = M("delete");
234
+ function Ge({ children: t, ...s }) {
233
235
  return /* @__PURE__ */ e("div", { className: "dc:overflow-x-auto dc:my-2", children: /* @__PURE__ */ e("table", { ...s, children: t }) });
234
236
  }
235
- const Ge = {
237
+ const He = {
236
238
  overrides: {
237
239
  h1: { props: { className: "dc:text-lg dc:font-bold text-dc-text dc:mb-2 dc:mt-3" } },
238
240
  h2: { props: { className: "dc:text-base dc:font-semibold text-dc-text dc:mb-2 dc:mt-3" } },
@@ -247,43 +249,43 @@ const Ge = {
247
249
  li: { props: { className: "dc:text-sm text-dc-text" } },
248
250
  hr: { props: { className: "dc:my-3 border-dc-border" } },
249
251
  blockquote: { props: { className: "dc:border-l-4 border-dc-accent dc:pl-3 dc:my-2 dc:italic text-dc-text-secondary dc:text-sm" } },
250
- table: { component: Ye, props: { className: "dc:w-full dc:border-collapse dc:text-sm" } },
252
+ table: { component: Ge, props: { className: "dc:w-full dc:border-collapse dc:text-sm" } },
251
253
  thead: { props: { className: "bg-dc-surface-secondary" } },
252
254
  th: { props: { className: "dc:px-3 dc:py-2 dc:text-left dc:font-semibold dc:text-xs text-dc-text-secondary dc:uppercase dc:tracking-wider border-dc-border dc:border-b" } },
253
255
  td: { props: { className: "dc:px-3 dc:py-2 dc:text-sm text-dc-text border-dc-border dc:border-b" } },
254
256
  tr: { props: { className: "dc:hover:opacity-80" } }
255
257
  }
256
- }, He = Y.memo(function({
258
+ }, Ze = G.memo(function({
257
259
  block: s,
258
260
  onRemove: c,
259
- onMoveUp: a,
260
- onMoveDown: n,
261
+ onMoveUp: n,
262
+ onMoveDown: a,
261
263
  isFirst: r,
262
264
  isLast: o
263
265
  }) {
264
266
  return /* @__PURE__ */ u("div", { className: "dc:relative dc:mb-4 bg-dc-surface dc:border border-dc-border dc:rounded-lg dc:flex dc:flex-col", children: [
265
267
  /* @__PURE__ */ u("div", { className: "dc:flex dc:items-center dc:justify-between dc:px-3 dc:py-1.5 dc:border-b border-dc-border dc:shrink-0 bg-dc-surface-secondary dc:rounded-t-lg", children: [
266
268
  /* @__PURE__ */ u("div", { className: "dc:flex dc:items-center dc:gap-2 dc:flex-1 dc:min-w-0", children: [
267
- /* @__PURE__ */ e(ze, { style: re }),
269
+ /* @__PURE__ */ e(We, { style: ne }),
268
270
  /* @__PURE__ */ e("h3", { className: "dc:font-semibold dc:text-sm text-dc-text dc:truncate", children: s.title || "Markdown" })
269
271
  ] }),
270
272
  /* @__PURE__ */ u("div", { className: "dc:flex dc:items-center dc:gap-1 dc:shrink-0 dc:ml-4 dc:-mr-2", children: [
271
273
  !r && /* @__PURE__ */ e(
272
274
  "button",
273
275
  {
274
- onClick: () => a(s.id),
276
+ onClick: () => n(s.id),
275
277
  className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
276
278
  title: "Move up",
277
- children: /* @__PURE__ */ e(We, { style: re })
279
+ children: /* @__PURE__ */ e(Je, { style: ne })
278
280
  }
279
281
  ),
280
282
  !o && /* @__PURE__ */ e(
281
283
  "button",
282
284
  {
283
- onClick: () => n(s.id),
285
+ onClick: () => a(s.id),
284
286
  className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
285
287
  title: "Move down",
286
- children: /* @__PURE__ */ e(Je, { style: re })
288
+ children: /* @__PURE__ */ e(Xe, { style: ne })
287
289
  }
288
290
  ),
289
291
  /* @__PURE__ */ e(
@@ -292,78 +294,80 @@ const Ge = {
292
294
  onClick: () => c(s.id),
293
295
  className: "dc:p-1 dc:mr-0.5 dc:bg-transparent dc:border-none dc:rounded-sm dc:cursor-pointer dc:hover:bg-dc-danger-bg text-dc-danger dc:transition-colors",
294
296
  title: "Remove",
295
- children: /* @__PURE__ */ e(Xe, { style: re })
297
+ children: /* @__PURE__ */ e(Ye, { style: ne })
296
298
  }
297
299
  )
298
300
  ] })
299
301
  ] }),
300
- /* @__PURE__ */ e("div", { className: "dc:p-4 dc:min-w-0 dc:overflow-hidden", children: /* @__PURE__ */ e(Ee, { options: Ge, children: s.content }) })
302
+ /* @__PURE__ */ e("div", { className: "dc:p-4 dc:min-w-0 dc:overflow-hidden", children: /* @__PURE__ */ e(Re, { options: He, children: s.content }) })
301
303
  ] });
302
- }), ue = Y.memo(function() {
303
- const s = P(Fe), { removeBlock: c, moveBlock: a, updateBlock: n } = P(de(je)), r = g(null), [o, l] = j(null), d = g(s.length);
304
- V(() => {
305
- s.length > d.current && r.current?.scrollIntoView({ behavior: "smooth" }), d.current = s.length;
306
- }, [s.length]);
307
- const T = f((p) => c(p), [c]), w = f((p) => a(p, "up"), [a]), A = f((p) => a(p, "down"), [a]), v = f((p) => l(p), []), I = f((p) => {
308
- if (!o) return;
309
- const D = we(p), { analysisConfig: k } = D;
310
- if (k) {
311
- const b = k.charts[k.analysisType];
312
- n(o.id, {
313
- title: p.title,
314
- query: JSON.stringify(k.query),
315
- chartType: b?.chartType || "bar",
316
- chartConfig: b?.chartConfig,
317
- displayConfig: b?.displayConfig
304
+ }), me = G.memo(function({ colorPalette: s }) {
305
+ const c = s ?? Ne(), n = B(_e), { removeBlock: a, moveBlock: r, updateBlock: o } = B(le(Ue)), i = x(null), [l, y] = _(null), N = x(n.length);
306
+ F(() => {
307
+ n.length > N.current && i.current?.scrollIntoView({ behavior: "smooth" }), N.current = n.length;
308
+ }, [n.length]);
309
+ const S = p((g) => a(g), [a]), v = p((g) => r(g, "up"), [r]), k = p((g) => r(g, "down"), [r]), O = p((g) => y(g), []), R = p((g) => {
310
+ if (!l) return;
311
+ const A = we(g), { analysisConfig: d } = A;
312
+ if (d) {
313
+ const m = d.charts[d.analysisType];
314
+ o(l.id, {
315
+ title: g.title,
316
+ query: JSON.stringify(d.query),
317
+ chartType: m?.chartType || "bar",
318
+ chartConfig: m?.chartConfig,
319
+ displayConfig: m?.displayConfig
318
320
  });
319
321
  }
320
- l(null);
321
- }, [o, n]);
322
- return s.length === 0 ? /* @__PURE__ */ e("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full", children: /* @__PURE__ */ u("div", { className: "dc:text-center dc:max-w-sm dc:px-6", children: [
322
+ y(null);
323
+ }, [l, o]);
324
+ return n.length === 0 ? /* @__PURE__ */ e("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full", children: /* @__PURE__ */ u("div", { className: "dc:text-center dc:max-w-sm dc:px-6", children: [
323
325
  /* @__PURE__ */ e("h3", { className: "dc:text-base dc:font-semibold text-dc-text dc:mb-2", children: "Your notebook is empty" }),
324
326
  /* @__PURE__ */ e("p", { className: "dc:text-sm text-dc-text-secondary", children: "Ask the AI assistant a question about your data. Charts and insights will appear here as the assistant analyzes your data." })
325
327
  ] }) }) : /* @__PURE__ */ u("div", { className: "dc:h-full dc:overflow-y-auto dc:p-4", children: [
326
- s.map((p, D) => {
327
- const k = D === 0, b = D === s.length - 1;
328
- return p.type === "portlet" ? /* @__PURE__ */ e(
329
- Ke,
328
+ n.map((g, A) => {
329
+ const d = A === 0, m = A === n.length - 1;
330
+ return g.type === "portlet" ? /* @__PURE__ */ e(
331
+ ze,
330
332
  {
331
- block: p,
332
- onRemove: T,
333
- onMoveUp: w,
334
- onMoveDown: A,
335
- onEdit: v,
336
- isFirst: k,
337
- isLast: b
333
+ block: g,
334
+ colorPalette: c,
335
+ onRemove: S,
336
+ onMoveUp: v,
337
+ onMoveDown: k,
338
+ onEdit: O,
339
+ isFirst: d,
340
+ isLast: m
338
341
  },
339
- p.id
340
- ) : p.type === "markdown" ? /* @__PURE__ */ e(
341
- He,
342
+ g.id
343
+ ) : g.type === "markdown" ? /* @__PURE__ */ e(
344
+ Ze,
342
345
  {
343
- block: p,
344
- onRemove: T,
345
- onMoveUp: w,
346
- onMoveDown: A,
347
- isFirst: k,
348
- isLast: b
346
+ block: g,
347
+ onRemove: S,
348
+ onMoveUp: v,
349
+ onMoveDown: k,
350
+ isFirst: d,
351
+ isLast: m
349
352
  },
350
- p.id
353
+ g.id
351
354
  ) : null;
352
355
  }),
353
- /* @__PURE__ */ e("div", { ref: r }),
356
+ /* @__PURE__ */ e("div", { ref: i }),
354
357
  /* @__PURE__ */ e(
355
- Ne,
358
+ ke,
356
359
  {
357
- isOpen: !!o,
358
- onClose: () => l(null),
359
- onSave: I,
360
- portlet: o ? {
361
- id: o.id,
362
- title: o.title,
363
- query: o.query,
364
- chartType: o.chartType,
365
- chartConfig: o.chartConfig,
366
- displayConfig: o.displayConfig,
360
+ isOpen: !!l,
361
+ onClose: () => y(null),
362
+ onSave: R,
363
+ colorPalette: c,
364
+ portlet: l ? {
365
+ id: l.id,
366
+ title: l.title,
367
+ query: l.query,
368
+ chartType: l.chartType,
369
+ chartConfig: l.chartConfig,
370
+ displayConfig: l.displayConfig,
367
371
  w: 5,
368
372
  h: 4,
369
373
  x: 0,
@@ -375,7 +379,7 @@ const Ge = {
375
379
  )
376
380
  ] });
377
381
  });
378
- function Ze(t) {
382
+ function et(t) {
379
383
  if (t.startsWith("{") || t.includes('"type":"error"'))
380
384
  try {
381
385
  const s = JSON.parse(t.replace(/^Error:\s*/, "")), c = s.error?.type || s.type || "";
@@ -394,166 +398,166 @@ function Ze(t) {
394
398
  }
395
399
  return t;
396
400
  }
397
- function et(t) {
398
- const { agentEndpoint: s, agentApiKey: c, agentProvider: a, agentModel: n, agentProviderEndpoint: r } = t, { cubeApi: o } = Re(), l = g(null), [d, T] = j(!1), w = g(t);
399
- w.current = t;
400
- const A = f(async (I, p, D) => {
401
- function k(i) {
402
- const x = w.current;
403
- switch (i.type) {
401
+ function tt(t) {
402
+ const { agentEndpoint: s, agentApiKey: c, agentProvider: n, agentModel: a, agentProviderEndpoint: r } = t, { cubeApi: o } = Be(), i = x(null), [l, y] = _(!1), N = x(t);
403
+ N.current = t;
404
+ const S = p(async (k, O, R) => {
405
+ function g(d) {
406
+ const m = N.current;
407
+ switch (d.type) {
404
408
  case "text_delta":
405
- x.onTextDelta(i.data);
409
+ m.onTextDelta(d.data);
406
410
  break;
407
411
  case "tool_use_start":
408
- x.onToolStart(i.data.id, i.data.name, i.data.input);
412
+ m.onToolStart(d.data.id, d.data.name, d.data.input);
409
413
  break;
410
414
  case "tool_use_result":
411
- x.onToolResult(i.data.id, i.data.name, i.data.result, i.data.isError);
415
+ m.onToolResult(d.data.id, d.data.name, d.data.result, d.data.isError);
412
416
  break;
413
417
  case "add_portlet":
414
- x.onAddPortlet({
415
- ...i.data,
418
+ m.onAddPortlet({
419
+ ...d.data,
416
420
  type: "portlet"
417
421
  });
418
422
  break;
419
423
  case "add_markdown":
420
- x.onAddMarkdown({
421
- ...i.data,
424
+ m.onAddMarkdown({
425
+ ...d.data,
422
426
  type: "markdown"
423
427
  });
424
428
  break;
425
429
  case "dashboard_saved":
426
- x.onDashboardSaved?.(i.data);
430
+ m.onDashboardSaved?.(d.data);
427
431
  break;
428
432
  case "turn_complete":
429
- x.onTurnComplete?.();
433
+ m.onTurnComplete?.();
430
434
  break;
431
435
  case "done":
432
- x.onDone(i.data.sessionId, i.data.traceId);
436
+ m.onDone(d.data.sessionId, d.data.traceId);
433
437
  break;
434
438
  case "error":
435
- x.onError(i.data.message);
439
+ m.onError(d.data.message);
436
440
  break;
437
441
  }
438
442
  }
439
- l.current && l.current.abort();
440
- const b = new AbortController();
441
- l.current = b, T(!0);
443
+ i.current && i.current.abort();
444
+ const A = new AbortController();
445
+ i.current = A, y(!0);
442
446
  try {
443
- const i = o.apiUrl || "/cubejs-api/v1", x = s || `${i}/agent/chat`, y = {
447
+ const d = o.apiUrl || "/cubejs-api/v1", m = s || `${d}/agent/chat`, b = {
444
448
  "Content-Type": "application/json",
445
449
  ...o.headers
446
450
  };
447
- c && (y["X-Agent-Api-Key"] = c), a && (y["X-Agent-Provider"] = a), n && (y["X-Agent-Model"] = n), r && (y["X-Agent-Provider-Endpoint"] = r);
448
- const S = await fetch(x, {
451
+ c && (b["X-Agent-Api-Key"] = c), n && (b["X-Agent-Provider"] = n), a && (b["X-Agent-Model"] = a), r && (b["X-Agent-Provider-Endpoint"] = r);
452
+ const T = await fetch(m, {
449
453
  method: "POST",
450
- headers: y,
454
+ headers: b,
451
455
  credentials: o.credentials ?? "include",
452
456
  body: JSON.stringify({
453
- message: I,
454
- ...p ? { sessionId: p } : {},
455
- ...D && D.length > 0 ? { history: D } : {}
457
+ message: k,
458
+ ...O ? { sessionId: O } : {},
459
+ ...R && R.length > 0 ? { history: R } : {}
456
460
  }),
457
- signal: b.signal
461
+ signal: A.signal
458
462
  });
459
- if (!S.ok) {
460
- const M = await S.json().catch(() => ({}));
461
- throw new Error(M.error || `Agent request failed: ${S.status}`);
463
+ if (!T.ok) {
464
+ const L = await T.json().catch(() => ({}));
465
+ throw new Error(L.error || `Agent request failed: ${T.status}`);
462
466
  }
463
- if (!S.body)
467
+ if (!T.body)
464
468
  throw new Error("No response body received");
465
- const W = S.body.getReader(), U = new TextDecoder();
466
- let Q = "";
469
+ const K = T.body.getReader(), $ = new TextDecoder();
470
+ let P = "";
467
471
  for (; ; ) {
468
- const { done: M, value: C } = await W.read();
469
- if (M) break;
470
- Q += U.decode(C, { stream: !0 });
471
- const E = Q.split(`
472
+ const { done: L, value: E } = await K.read();
473
+ if (L) break;
474
+ P += $.decode(E, { stream: !0 });
475
+ const C = P.split(`
472
476
 
473
477
  `);
474
- Q = E.pop() || "";
475
- for (const N of E) {
476
- const L = N.trim().split(`
478
+ P = C.pop() || "";
479
+ for (const w of C) {
480
+ const I = w.trim().split(`
477
481
  `);
478
- for (const q of L)
479
- if (q.startsWith("data: "))
482
+ for (const V of I)
483
+ if (V.startsWith("data: "))
480
484
  try {
481
- const K = JSON.parse(q.slice(6));
482
- k(K);
485
+ const W = JSON.parse(V.slice(6));
486
+ g(W);
483
487
  } catch {
484
488
  }
485
489
  }
486
490
  }
487
- if (Q.trim()) {
488
- const M = Q.trim().split(`
491
+ if (P.trim()) {
492
+ const L = P.trim().split(`
489
493
  `);
490
- for (const C of M)
491
- if (C.startsWith("data: "))
494
+ for (const E of L)
495
+ if (E.startsWith("data: "))
492
496
  try {
493
- const E = JSON.parse(C.slice(6));
494
- k(E);
497
+ const C = JSON.parse(E.slice(6));
498
+ g(C);
495
499
  } catch {
496
500
  }
497
501
  }
498
- } catch (i) {
499
- if (i.name !== "AbortError") {
500
- const x = i instanceof Error ? i.message : "Stream failed";
501
- w.current.onError(Ze(x));
502
+ } catch (d) {
503
+ if (d.name !== "AbortError") {
504
+ const m = d instanceof Error ? d.message : "Stream failed";
505
+ N.current.onError(et(m));
502
506
  }
503
507
  } finally {
504
- T(!1), l.current = null;
508
+ y(!1), i.current = null;
505
509
  }
506
- }, [o, s, c, a, n, r]), v = f(() => {
507
- l.current && (l.current.abort(), l.current = null, T(!1));
510
+ }, [o, s, c, n, a, r]), v = p(() => {
511
+ i.current && (i.current.abort(), i.current = null, y(!1));
508
512
  }, []);
509
513
  return {
510
- sendMessage: A,
511
- isStreaming: d,
514
+ sendMessage: S,
515
+ isStreaming: l,
512
516
  abort: v
513
517
  };
514
518
  }
515
- function tt(t) {
519
+ function st(t) {
516
520
  const s = [];
517
- let c = t, a = 0;
521
+ let c = t, n = 0;
518
522
  for (; c; ) {
519
- const n = c.match(/^(.*?)`([^`]+)`(.*)$/);
520
- if (n) {
521
- const [, o, l, d] = n;
522
- o && s.push(/* @__PURE__ */ e("span", { children: o }, a++)), s.push(
523
- /* @__PURE__ */ e("code", { className: "dc:px-1 dc:py-0.5 dc:rounded dc:text-xs bg-dc-surface dc:font-mono", children: l }, a++)
524
- ), c = d;
523
+ const a = c.match(/^(.*?)`([^`]+)`(.*)$/);
524
+ if (a) {
525
+ const [, o, i, l] = a;
526
+ o && s.push(/* @__PURE__ */ e("span", { children: o }, n++)), s.push(
527
+ /* @__PURE__ */ e("code", { className: "dc:px-1 dc:py-0.5 dc:rounded dc:text-xs bg-dc-surface dc:font-mono", children: i }, n++)
528
+ ), c = l;
525
529
  continue;
526
530
  }
527
531
  const r = c.match(/^(.*?)\*\*([^*]+)\*\*(.*)$/);
528
532
  if (r) {
529
- const [, o, l, d] = r;
530
- o && s.push(/* @__PURE__ */ e("span", { children: o }, a++)), s.push(/* @__PURE__ */ e("strong", { className: "dc:font-semibold", children: l }, a++)), c = d;
533
+ const [, o, i, l] = r;
534
+ o && s.push(/* @__PURE__ */ e("span", { children: o }, n++)), s.push(/* @__PURE__ */ e("strong", { className: "dc:font-semibold", children: i }, n++)), c = l;
531
535
  continue;
532
536
  }
533
- s.push(/* @__PURE__ */ e("span", { children: c }, a));
537
+ s.push(/* @__PURE__ */ e("span", { children: c }, n));
534
538
  break;
535
539
  }
536
540
  return s;
537
541
  }
538
- const st = {
542
+ const ct = {
539
543
  discover_cubes: "Discovering cubes",
540
544
  get_cube_metadata: "Reading metadata",
541
545
  execute_query: "Executing query",
542
546
  add_portlet: "Adding visualization",
543
547
  add_markdown: "Adding explanation"
544
548
  };
545
- function ct({ toolCall: t, loadingComponent: s }) {
546
- const [c, a] = j(!1), n = st[t.name] || t.name, r = t.status === "running";
549
+ function rt({ toolCall: t, loadingComponent: s }) {
550
+ const [c, n] = _(!1), a = ct[t.name] || t.name, r = t.status === "running";
547
551
  return /* @__PURE__ */ u("div", { className: "dc:my-1 dc:text-xs", children: [
548
552
  /* @__PURE__ */ u(
549
553
  "button",
550
554
  {
551
- onClick: () => a(!c),
555
+ onClick: () => n(!c),
552
556
  className: "dc:flex dc:items-center dc:gap-1.5 text-dc-text-secondary dc:hover:opacity-80 dc:transition-opacity",
553
557
  children: [
554
- r ? s ? /* @__PURE__ */ e("span", { className: "dc:inline-flex dc:items-center dc:justify-center dc:h-3 dc:w-3", children: s }) : /* @__PURE__ */ e(me, { size: "xs" }) : /* @__PURE__ */ e("span", { className: "dc:text-xs", children: t.status === "error" ? "✗" : "✓" }),
558
+ r ? s ? /* @__PURE__ */ e("span", { className: "dc:inline-flex dc:items-center dc:justify-center dc:h-3 dc:w-3", children: s }) : /* @__PURE__ */ e(he, { size: "xs" }) : /* @__PURE__ */ e("span", { className: "dc:text-xs", children: t.status === "error" ? "✗" : "✓" }),
555
559
  /* @__PURE__ */ u("span", { children: [
556
- n,
560
+ a,
557
561
  r ? "..." : ""
558
562
  ] }),
559
563
  !r && /* @__PURE__ */ e("span", { className: "dc:text-[10px] dc:opacity-60", children: c ? "▲" : "▼" })
@@ -563,63 +567,63 @@ function ct({ toolCall: t, loadingComponent: s }) {
563
567
  c && t.result != null && /* @__PURE__ */ e("pre", { className: "dc:mt-1 dc:p-2 dc:rounded dc:text-[11px] dc:overflow-x-auto dc:max-h-32 dc:overflow-y-auto bg-dc-surface-secondary text-dc-text-secondary", children: typeof t.result == "string" ? t.result : JSON.stringify(t.result, null, 2) })
564
568
  ] });
565
569
  }
566
- const rt = {
570
+ const nt = {
567
571
  animation: "dc-msg-in 100ms ease-out"
568
- }, nt = Y.memo(function({ message: s, loadingComponent: c }) {
569
- const a = s.role === "user", n = !!s.content?.trim(), r = !!s.error, o = s.toolCalls && s.toolCalls.length > 0;
570
- return !a && !n && !r && !o ? null : /* @__PURE__ */ e(
572
+ }, at = G.memo(function({ message: s, loadingComponent: c }) {
573
+ const n = s.role === "user", a = !!s.content?.trim(), r = !!s.error, o = s.toolCalls && s.toolCalls.length > 0;
574
+ return !n && !a && !r && !o ? null : /* @__PURE__ */ e(
571
575
  "div",
572
576
  {
573
- className: `dc:flex dc:mb-3 ${a ? "dc:justify-end" : "dc:justify-start"}`,
574
- style: rt,
577
+ className: `dc:flex dc:mb-3 ${n ? "dc:justify-end" : "dc:justify-start"}`,
578
+ style: nt,
575
579
  children: /* @__PURE__ */ u(
576
580
  "div",
577
581
  {
578
- className: `dc:max-w-[85%] dc:rounded-lg dc:px-3 dc:py-2 dc:text-sm ${a ? "bg-dc-accent text-dc-accent-text dc:rounded-br-sm" : r && !n ? "bg-dc-warning-bg text-dc-text dc:rounded-bl-sm" : "bg-dc-surface-secondary text-dc-text dc:rounded-bl-sm"}`,
582
+ className: `dc:max-w-[85%] dc:rounded-lg dc:px-3 dc:py-2 dc:text-sm ${n ? "bg-dc-accent text-dc-accent-text dc:rounded-br-sm" : r && !a ? "bg-dc-warning-bg text-dc-text dc:rounded-bl-sm" : "bg-dc-surface-secondary text-dc-text dc:rounded-bl-sm"}`,
579
583
  children: [
580
- n && /* @__PURE__ */ e("div", { className: "dc:whitespace-pre-wrap dc:break-words", children: a ? s.content : tt(s.content) }),
581
- r && /* @__PURE__ */ u("div", { className: `dc:flex dc:items-start dc:gap-2 ${n ? "dc:mt-2 dc:pt-2 dc:border-t dc:border-current dc:border-opacity-10" : ""}`, children: [
584
+ a && /* @__PURE__ */ e("div", { className: "dc:whitespace-pre-wrap dc:break-words", children: n ? s.content : st(s.content) }),
585
+ r && /* @__PURE__ */ u("div", { className: `dc:flex dc:items-start dc:gap-2 ${a ? "dc:mt-2 dc:pt-2 dc:border-t dc:border-current dc:border-opacity-10" : ""}`, children: [
582
586
  /* @__PURE__ */ e("span", { className: "dc:text-base dc:leading-none dc:mt-0.5 text-dc-warning dc:flex-shrink-0", children: "⚠" }),
583
587
  /* @__PURE__ */ e("span", { className: "text-dc-text-secondary", children: s.error })
584
588
  ] }),
585
- o && /* @__PURE__ */ e("div", { className: n || r ? "dc:mt-1 dc:border-t dc:border-current dc:border-opacity-10 dc:pt-1" : "", children: s.toolCalls.map((l, d) => /* @__PURE__ */ e(ct, { toolCall: l, loadingComponent: c }, l.id || d)) })
589
+ o && /* @__PURE__ */ e("div", { className: a || r ? "dc:mt-1 dc:border-t dc:border-current dc:border-opacity-10 dc:pt-1" : "", children: s.toolCalls.map((i, l) => /* @__PURE__ */ e(rt, { toolCall: i, loadingComponent: c }, i.id || l)) })
586
590
  ]
587
591
  }
588
592
  )
589
593
  }
590
594
  );
591
- }), at = Y.memo(function({
595
+ }), ot = G.memo(function({
592
596
  value: s,
593
597
  onChange: c,
594
- onSend: a,
595
- onStop: n,
598
+ onSend: n,
599
+ onStop: a,
596
600
  onContinue: r,
597
601
  isStreaming: o = !1,
598
- showContinue: l = !1,
599
- disabled: d = !1,
600
- placeholder: T = "Ask about your data..."
602
+ showContinue: i = !1,
603
+ disabled: l = !1,
604
+ placeholder: y = "Ask about your data..."
601
605
  }) {
602
- const w = g(null);
603
- V(() => {
604
- const v = w.current;
606
+ const N = x(null);
607
+ F(() => {
608
+ const v = N.current;
605
609
  v && (v.style.height = "auto", v.style.height = `${Math.min(v.scrollHeight, 150)}px`);
606
610
  }, [s]);
607
- const A = f(
611
+ const S = p(
608
612
  (v) => {
609
- v.key === "Enter" && !v.shiftKey && (v.preventDefault(), !d && s.trim() && a());
613
+ v.key === "Enter" && !v.shiftKey && (v.preventDefault(), !l && s.trim() && n());
610
614
  },
611
- [d, s, a]
615
+ [l, s, n]
612
616
  );
613
617
  return /* @__PURE__ */ u("div", { className: "dc:flex dc:gap-2 dc:items-end dc:p-3 border-dc-border dc:border-t", children: [
614
618
  /* @__PURE__ */ e(
615
619
  "textarea",
616
620
  {
617
- ref: w,
621
+ ref: N,
618
622
  value: s,
619
623
  onChange: (v) => c(v.target.value),
620
- onKeyDown: A,
621
- placeholder: T,
622
- disabled: d,
624
+ onKeyDown: S,
625
+ placeholder: y,
626
+ disabled: l,
623
627
  rows: 1,
624
628
  className: "dc:flex-1 dc:resize-none dc:rounded-lg dc:px-3 dc:py-2 dc:text-sm bg-dc-surface-secondary text-dc-text border-dc-border dc:border dc:outline-none dc:focus:ring-1 focus:ring-dc-accent dc:disabled:opacity-50"
625
629
  }
@@ -627,16 +631,16 @@ const rt = {
627
631
  o ? /* @__PURE__ */ e(
628
632
  "button",
629
633
  {
630
- onClick: n,
634
+ onClick: a,
631
635
  className: "dc:px-4 dc:py-2 dc:rounded-lg dc:text-sm dc:font-medium dc:transition-colors text-dc-error border-dc-border dc:border dc:hover:opacity-80 dc:shrink-0",
632
636
  children: "Stop"
633
637
  }
634
- ) : /* @__PURE__ */ u(ne, { children: [
635
- l && !s.trim() && /* @__PURE__ */ e(
638
+ ) : /* @__PURE__ */ u(ae, { children: [
639
+ i && !s.trim() && /* @__PURE__ */ e(
636
640
  "button",
637
641
  {
638
642
  onClick: () => {
639
- r?.(), w.current?.focus();
643
+ r?.(), N.current?.focus();
640
644
  },
641
645
  className: "dc:px-4 dc:py-2 dc:rounded-lg dc:text-sm dc:font-medium dc:transition-colors border-dc-border dc:border text-dc-text-secondary dc:hover:opacity-80 dc:shrink-0",
642
646
  children: "Continue"
@@ -645,133 +649,133 @@ const rt = {
645
649
  /* @__PURE__ */ e(
646
650
  "button",
647
651
  {
648
- onClick: a,
649
- disabled: d || !s.trim(),
652
+ onClick: n,
653
+ disabled: l || !s.trim(),
650
654
  className: "dc:px-4 dc:py-2 dc:rounded-lg dc:text-sm dc:font-medium dc:transition-colors bg-dc-accent text-dc-accent-text dc:hover:opacity-90 dc:disabled:opacity-40 dc:disabled:cursor-not-allowed dc:shrink-0",
651
655
  children: "Send"
652
656
  }
653
657
  )
654
658
  ] })
655
659
  ] });
656
- }), ot = B("thumbUp"), dt = B("thumbDown"), lt = Y.memo(function({
660
+ }), dt = M("thumbUp"), lt = M("thumbDown"), it = G.memo(function({
657
661
  agentEndpoint: s,
658
662
  agentApiKey: c,
659
- agentProvider: a,
660
- agentModel: n,
663
+ agentProvider: n,
664
+ agentModel: a,
661
665
  agentProviderEndpoint: r,
662
666
  onClear: o,
663
- onDashboardSaved: l,
664
- onScore: d,
665
- loadingComponent: T,
666
- initialPrompt: w
667
+ onDashboardSaved: i,
668
+ onScore: l,
669
+ loadingComponent: y,
670
+ initialPrompt: N
667
671
  }) {
668
- const A = g(null), v = g(!1), [I, p] = j(null), [D, k] = j(/* @__PURE__ */ new Set()), [b, i] = j(!1), x = g(!1), { messages: y, isStreaming: S, inputValue: W } = P(de(_e)), {
669
- addMessage: U,
670
- appendToLastAssistantMessage: Q,
671
- setLastAssistantError: M,
672
- addToolCallToLastAssistant: C,
673
- updateLastToolCall: E,
674
- setIsStreaming: N,
675
- setInputValue: L,
676
- setSessionId: q
677
- } = P(de(Ve)), K = P((m) => m.sessionId), J = P((m) => m.addBlock), H = P((m) => m.reset), R = P((m) => m.blocks.filter((_) => _.type === "portlet").length), X = g(y);
678
- X.current = y;
679
- const O = g(S);
680
- O.current = S;
681
- const G = g(K);
682
- G.current = K;
683
- const z = f(() => {
684
- x.current && (x.current = !1, U({
672
+ const S = x(null), v = x(!1), [k, O] = _(null), [R, g] = _(/* @__PURE__ */ new Set()), [A, d] = _(!1), m = x(!1), { messages: b, isStreaming: T, inputValue: K } = B(le(Ve)), {
673
+ addMessage: $,
674
+ appendToLastAssistantMessage: P,
675
+ setLastAssistantError: L,
676
+ addToolCallToLastAssistant: E,
677
+ updateLastToolCall: C,
678
+ setIsStreaming: w,
679
+ setInputValue: I,
680
+ setSessionId: V
681
+ } = B(le(je)), W = B((h) => h.sessionId), z = B((h) => h.addBlock), H = B((h) => h.reset), Z = B((h) => h.blocks.filter((Q) => Q.type === "portlet").length), D = x(b);
682
+ D.current = b;
683
+ const J = x(T);
684
+ J.current = T;
685
+ const j = x(W);
686
+ j.current = W;
687
+ const U = p(() => {
688
+ m.current && (m.current = !1, $({
685
689
  id: `msg-${Date.now()}`,
686
690
  role: "assistant",
687
691
  content: "",
688
692
  toolCalls: [],
689
693
  timestamp: Date.now()
690
694
  }));
691
- }, [U]), te = g(y.length);
692
- V(() => {
693
- y.length > te.current && A.current?.scrollIntoView({ behavior: "smooth" }), te.current = y.length;
694
- }, [y]), V(() => {
695
- b && A.current?.scrollIntoView({ behavior: "smooth" });
696
- }, [b]);
697
- const { sendMessage: Z, abort: h } = et({
695
+ }, [$]), ee = x(b.length);
696
+ F(() => {
697
+ b.length > ee.current && S.current?.scrollIntoView({ behavior: "smooth" }), ee.current = b.length;
698
+ }, [b]), F(() => {
699
+ A && S.current?.scrollIntoView({ behavior: "smooth" });
700
+ }, [A]);
701
+ const { sendMessage: te, abort: X } = tt({
698
702
  agentEndpoint: s,
699
703
  agentApiKey: c,
700
- agentProvider: a,
701
- agentModel: n,
704
+ agentProvider: n,
705
+ agentModel: a,
702
706
  agentProviderEndpoint: r,
703
- onTextDelta: f((m) => {
704
- i(!1), z(), Q(m);
705
- }, [z, Q]),
706
- onToolStart: f((m, _, $) => {
707
- i(!1), z(), C({ id: m, name: _, input: $, status: "running" });
708
- }, [z, C]),
709
- onToolResult: f((m, _, $, ye) => {
710
- E({ id: m, status: ye ? "error" : "complete", result: $ });
711
- }, [E]),
712
- onAddPortlet: f((m) => {
713
- J(m);
714
- }, [J]),
715
- onAddMarkdown: f((m) => {
716
- J(m);
717
- }, [J]),
718
- onDashboardSaved: l,
719
- onTurnComplete: f(() => {
720
- x.current = !0, i(!0);
707
+ onTextDelta: p((h) => {
708
+ d(!1), U(), P(h);
709
+ }, [U, P]),
710
+ onToolStart: p((h, Q, q) => {
711
+ d(!1), U(), E({ id: h, name: Q, input: q, status: "running" });
712
+ }, [U, E]),
713
+ onToolResult: p((h, Q, q, ye) => {
714
+ C({ id: h, status: ye ? "error" : "complete", result: q });
715
+ }, [C]),
716
+ onAddPortlet: p((h) => {
717
+ z(h);
718
+ }, [z]),
719
+ onAddMarkdown: p((h) => {
720
+ z(h);
721
+ }, [z]),
722
+ onDashboardSaved: i,
723
+ onTurnComplete: p(() => {
724
+ m.current = !0, d(!0);
721
725
  }, []),
722
- onDone: f((m, _) => {
723
- x.current = !1, q(m), N(!1), i(!1), _ && p(_);
724
- }, [q, N]),
725
- onError: f((m) => {
726
- i(!1), z(), M(m), N(!1);
727
- }, [z, M, N])
728
- }), F = f((m) => {
729
- if (!m || O.current) return;
730
- x.current = !1;
731
- const _ = X.current.map(($) => ({
732
- role: $.role,
733
- content: $.content,
734
- ...$.toolCalls && $.toolCalls.length > 0 ? { toolCalls: $.toolCalls } : {}
726
+ onDone: p((h, Q) => {
727
+ m.current = !1, V(h), w(!1), d(!1), Q && O(Q);
728
+ }, [V, w]),
729
+ onError: p((h) => {
730
+ d(!1), U(), L(h), w(!1);
731
+ }, [U, L, w])
732
+ }), f = p((h) => {
733
+ if (!h || J.current) return;
734
+ m.current = !1;
735
+ const Q = D.current.map((q) => ({
736
+ role: q.role,
737
+ content: q.content,
738
+ ...q.toolCalls && q.toolCalls.length > 0 ? { toolCalls: q.toolCalls } : {}
735
739
  }));
736
- U({
740
+ $({
737
741
  id: `msg-${Date.now()}`,
738
742
  role: "user",
739
- content: m,
743
+ content: h,
740
744
  timestamp: Date.now()
741
- }), U({
745
+ }), $({
742
746
  id: `msg-${Date.now() + 1}`,
743
747
  role: "assistant",
744
748
  content: "",
745
749
  toolCalls: [],
746
750
  timestamp: Date.now()
747
- }), L(""), N(!0), i(!0), Z(m, G.current, _);
748
- }, [U, L, N, Z]);
749
- V(() => {
750
- if (w && !v.current && y.length === 0) {
751
+ }), I(""), w(!0), d(!0), te(h, j.current, Q);
752
+ }, [$, I, w, te]);
753
+ F(() => {
754
+ if (N && !v.current && b.length === 0) {
751
755
  v.current = !0;
752
- const m = setTimeout(() => F(w), 100);
756
+ const h = setTimeout(() => f(N), 100);
753
757
  return () => {
754
- clearTimeout(m), v.current = !1;
758
+ clearTimeout(h), v.current = !1;
755
759
  };
756
760
  }
757
- }, [w, y.length, F]);
758
- const ee = g(W);
759
- ee.current = W;
760
- const ae = f(() => {
761
- F(ee.current.trim());
762
- }, [F]), se = f(() => {
763
- h(), N(!1);
764
- }, [h, N]), oe = f(() => {
765
- L("");
766
- }, [L]), pe = f(() => {
767
- h(), N(!1), i(!1), H(), p(null), k(/* @__PURE__ */ new Set()), o?.();
768
- }, [h, N, H, o]), ge = f(() => {
769
- F(
761
+ }, [N, b.length, f]);
762
+ const Y = x(K);
763
+ Y.current = K;
764
+ const se = p(() => {
765
+ f(Y.current.trim());
766
+ }, [f]), oe = p(() => {
767
+ X(), w(!1);
768
+ }, [X, w]), ce = p(() => {
769
+ I("");
770
+ }, [I]), de = p(() => {
771
+ X(), w(!1), d(!1), H(), O(null), g(/* @__PURE__ */ new Set()), o?.();
772
+ }, [X, w, H, o]), ge = p(() => {
773
+ f(
770
774
  "Save the current notebook as a dashboard with a professional layout, section headers, and appropriate filters."
771
775
  );
772
- }, [F]), le = f((m) => {
773
- !I || !d || (d({ traceId: I, value: m }), k((_) => new Set(_).add(I)));
774
- }, [I, d]), be = !!l && !S && R > 0 && y.length > 0, xe = !!d && !S && I && y.length > 0 && !D.has(I), ie = I ? D.has(I) : !1;
776
+ }, [f]), ie = p((h) => {
777
+ !k || !l || (l({ traceId: k, value: h }), g((Q) => new Set(Q).add(k)));
778
+ }, [k, l]), be = !!i && !T && Z > 0 && b.length > 0, xe = !!l && !T && k && b.length > 0 && !R.has(k), ue = k ? R.has(k) : !1;
775
779
  return /* @__PURE__ */ u("div", { className: "dc:flex dc:flex-col dc:h-full bg-dc-surface", children: [
776
780
  /* @__PURE__ */ u("div", { className: "dc:flex dc:items-center dc:justify-between dc:px-4 dc:py-3 border-dc-border dc:border-b", children: [
777
781
  /* @__PURE__ */ e("h3", { className: "dc:text-sm dc:font-semibold text-dc-text", children: "AI Assistant" }),
@@ -785,11 +789,11 @@ const rt = {
785
789
  children: "Save as Dashboard"
786
790
  }
787
791
  ),
788
- y.length > 0 && /* @__PURE__ */ e(
792
+ b.length > 0 && /* @__PURE__ */ e(
789
793
  "button",
790
794
  {
791
- onClick: pe,
792
- disabled: S,
795
+ onClick: de,
796
+ disabled: T,
793
797
  className: "dc:text-xs dc:px-2 dc:py-1 dc:rounded text-dc-text-secondary dc:hover:opacity-80 dc:disabled:opacity-40",
794
798
  title: "Clear notebook and chat",
795
799
  children: "Clear"
@@ -798,25 +802,25 @@ const rt = {
798
802
  ] })
799
803
  ] }),
800
804
  /* @__PURE__ */ u("div", { className: "dc:flex-1 dc:overflow-y-auto dc:px-4 dc:py-3", children: [
801
- y.length === 0 ? /* @__PURE__ */ e(ut, {}) : y.map((m) => /* @__PURE__ */ e(
802
- nt,
805
+ b.length === 0 ? /* @__PURE__ */ e(mt, {}) : b.map((h) => /* @__PURE__ */ e(
806
+ at,
803
807
  {
804
- message: m,
805
- loadingComponent: T
808
+ message: h,
809
+ loadingComponent: y
806
810
  },
807
- m.id
811
+ h.id
808
812
  )),
809
- b && /* @__PURE__ */ e(it, { loadingComponent: T }),
810
- (xe || ie) && /* @__PURE__ */ e("div", { className: "dc:flex dc:items-center dc:justify-center dc:gap-3 dc:py-4 dc:mt-2", children: ie ? /* @__PURE__ */ e("span", { className: "dc:text-sm text-dc-text-secondary", children: "Thanks for your feedback!" }) : /* @__PURE__ */ u(ne, { children: [
813
+ A && /* @__PURE__ */ e(ut, { loadingComponent: y }),
814
+ (xe || ue) && /* @__PURE__ */ e("div", { className: "dc:flex dc:items-center dc:justify-center dc:gap-3 dc:py-4 dc:mt-2", children: ue ? /* @__PURE__ */ e("span", { className: "dc:text-sm text-dc-text-secondary", children: "Thanks for your feedback!" }) : /* @__PURE__ */ u(ae, { children: [
811
815
  /* @__PURE__ */ e("span", { className: "dc:text-sm text-dc-text-secondary", children: "Was this helpful?" }),
812
816
  /* @__PURE__ */ u("div", { className: "dc:flex dc:items-center dc:gap-2", children: [
813
817
  /* @__PURE__ */ u(
814
818
  "button",
815
819
  {
816
- onClick: () => le(1),
820
+ onClick: () => ie(1),
817
821
  className: "dc:flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:rounded-lg dc:text-sm dc:font-medium border-dc-border dc:border text-dc-success hover:bg-dc-success-bg dc:transition-colors bg-dc-surface dc:cursor-pointer",
818
822
  children: [
819
- /* @__PURE__ */ e(ot, { className: "dc:w-4 dc:h-4" }),
823
+ /* @__PURE__ */ e(dt, { className: "dc:w-4 dc:h-4" }),
820
824
  "Yes"
821
825
  ]
822
826
  }
@@ -824,46 +828,46 @@ const rt = {
824
828
  /* @__PURE__ */ u(
825
829
  "button",
826
830
  {
827
- onClick: () => le(0),
831
+ onClick: () => ie(0),
828
832
  className: "dc:flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:rounded-lg dc:text-sm dc:font-medium border-dc-border dc:border text-dc-error hover:bg-dc-danger-bg dc:transition-colors bg-dc-surface dc:cursor-pointer",
829
833
  children: [
830
- /* @__PURE__ */ e(dt, { className: "dc:w-4 dc:h-4" }),
834
+ /* @__PURE__ */ e(lt, { className: "dc:w-4 dc:h-4" }),
831
835
  "No"
832
836
  ]
833
837
  }
834
838
  )
835
839
  ] })
836
840
  ] }) }),
837
- /* @__PURE__ */ e("div", { ref: A })
841
+ /* @__PURE__ */ e("div", { ref: S })
838
842
  ] }),
839
843
  /* @__PURE__ */ e(
840
- at,
844
+ ot,
841
845
  {
842
- value: W,
843
- onChange: L,
844
- onSend: ae,
845
- onStop: se,
846
- onContinue: oe,
847
- isStreaming: S,
848
- showContinue: !S && y.length > 0
846
+ value: K,
847
+ onChange: I,
848
+ onSend: se,
849
+ onStop: oe,
850
+ onContinue: ce,
851
+ isStreaming: T,
852
+ showContinue: !T && b.length > 0
849
853
  }
850
854
  )
851
855
  ] });
852
856
  });
853
- function it({ loadingComponent: t }) {
857
+ function ut({ loadingComponent: t }) {
854
858
  return /* @__PURE__ */ e(
855
859
  "div",
856
860
  {
857
861
  className: "dc:flex dc:mb-3 dc:justify-start",
858
862
  style: { animation: "dc-msg-in 100ms ease-out" },
859
863
  children: /* @__PURE__ */ u("div", { className: "dc:rounded-lg dc:px-3 dc:py-2 dc:text-sm bg-dc-surface-secondary text-dc-text-secondary dc:rounded-bl-sm dc:flex dc:items-center dc:gap-2", children: [
860
- t ? /* @__PURE__ */ e("span", { className: "dc:inline-flex dc:items-center dc:justify-center dc:h-4 dc:w-4", children: t }) : /* @__PURE__ */ e(me, { size: "xs" }),
864
+ t ? /* @__PURE__ */ e("span", { className: "dc:inline-flex dc:items-center dc:justify-center dc:h-4 dc:w-4", children: t }) : /* @__PURE__ */ e(he, { size: "xs" }),
861
865
  /* @__PURE__ */ e("span", { children: "Thinking..." })
862
866
  ] })
863
867
  }
864
868
  );
865
869
  }
866
- function ut() {
870
+ function mt() {
867
871
  return /* @__PURE__ */ e("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full", children: /* @__PURE__ */ u("div", { className: "dc:text-center dc:max-w-xs", children: [
868
872
  /* @__PURE__ */ e("div", { className: "dc:text-lg dc:font-semibold text-dc-text dc:mb-2", children: "Data Analysis Assistant" }),
869
873
  /* @__PURE__ */ e("p", { className: "dc:text-sm text-dc-text-secondary dc:mb-4", children: "Ask me about your data and I'll create visualizations and insights." }),
@@ -874,23 +878,23 @@ function ut() {
874
878
  ] })
875
879
  ] }) });
876
880
  }
877
- function mt({
881
+ function ht({
878
882
  blocks: t,
879
883
  pulsingBlockId: s,
880
884
  nudge: c,
881
- onExpand: a
885
+ onExpand: n
882
886
  }) {
883
- const n = B("bookOpen"), r = B("documentText");
887
+ const a = M("bookOpen"), r = M("documentText");
884
888
  return /* @__PURE__ */ u(
885
889
  "button",
886
890
  {
887
891
  type: "button",
888
- onClick: a,
892
+ onClick: n,
889
893
  className: "dc:h-full dc:flex-shrink-0 dc:flex dc:flex-col dc:items-center dc:pt-3 dc:gap-2 bg-dc-surface border-dc-border dc:border-r dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
890
894
  style: c ? { animation: "dc-strip-nudge 0.8s ease-in-out 2", width: 48 } : { width: 48 },
891
895
  title: "Expand notebook",
892
896
  children: [
893
- /* @__PURE__ */ e(n, { className: "dc:w-5 dc:h-5 text-dc-text-muted" }),
897
+ /* @__PURE__ */ e(a, { className: "dc:w-5 dc:h-5 text-dc-text-muted" }),
894
898
  /* @__PURE__ */ e(
895
899
  "div",
896
900
  {
@@ -904,15 +908,15 @@ function mt({
904
908
  children: "No blocks"
905
909
  }
906
910
  ) : t.map((o) => {
907
- const l = o.id === s;
908
- let d;
909
- return o.type === "portlet" ? d = Me(o.chartType) : d = r, /* @__PURE__ */ e(
911
+ const i = o.id === s;
912
+ let l;
913
+ return o.type === "portlet" ? l = Ee(o.chartType) : l = r, /* @__PURE__ */ e(
910
914
  "div",
911
915
  {
912
916
  className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded",
913
- style: l ? { animation: "dc-icon-pulse 0.6s ease-in-out 3" } : void 0,
917
+ style: i ? { animation: "dc-icon-pulse 0.6s ease-in-out 3" } : void 0,
914
918
  title: o.type === "portlet" ? o.title : o.title || "Markdown",
915
- children: /* @__PURE__ */ e(d, { className: "dc:w-4 dc:h-4 text-dc-text-muted" })
919
+ children: /* @__PURE__ */ e(l, { className: "dc:w-4 dc:h-4 text-dc-text-muted" })
916
920
  },
917
921
  o.id
918
922
  );
@@ -923,8 +927,8 @@ function mt({
923
927
  }
924
928
  );
925
929
  }
926
- function ht({ onExpand: t }) {
927
- const s = B("sparkles");
930
+ function ft({ onExpand: t }) {
931
+ const s = M("sparkles");
928
932
  return /* @__PURE__ */ u(
929
933
  "button",
930
934
  {
@@ -946,140 +950,141 @@ function ht({ onExpand: t }) {
946
950
  }
947
951
  );
948
952
  }
949
- function ft({
953
+ function pt({
950
954
  agentEndpoint: t,
951
955
  agentApiKey: s,
952
956
  agentProvider: c,
953
- agentModel: a,
954
- agentProviderEndpoint: n,
957
+ agentModel: n,
958
+ agentProviderEndpoint: a,
955
959
  onSave: r,
956
960
  onDirtyStateChange: o,
957
- onDashboardSaved: l,
958
- onScore: d,
959
- loadingComponent: T,
960
- className: w,
961
- initialPrompt: A
961
+ onDashboardSaved: i,
962
+ onScore: l,
963
+ colorPalette: y,
964
+ loadingComponent: N,
965
+ className: S,
966
+ initialPrompt: v
962
967
  }) {
963
- const [v, I] = j(60), p = g(null), D = g(!1), { containerRef: k, layoutMode: b } = Be(), [i, x] = j("chat"), [y, S] = j(null), [W, U] = j(!1), Q = g(b), M = P((h) => h.blocks), C = M.length, E = P((h) => h.messages.length), N = P((h) => h.isStreaming), L = P((h) => h.save);
964
- V(() => {
965
- Q.current === "narrow" && b === "wide" && x("chat"), Q.current = b;
966
- }, [b]);
967
- const q = g(C);
968
- V(() => {
969
- if (b === "narrow" && i === "chat" && C > q.current) {
970
- const h = M[M.length - 1];
971
- if (h) {
972
- S(h.id);
973
- const F = setTimeout(() => S(null), 2e3);
974
- return () => clearTimeout(F);
968
+ const [k, O] = _(60), R = x(null), g = x(!1), { containerRef: A, layoutMode: d } = Pe(), [m, b] = _("chat"), [T, K] = _(null), [$, P] = _(!1), L = x(d), E = B((f) => f.blocks), C = E.length, w = B((f) => f.messages.length), I = B((f) => f.isStreaming), V = B((f) => f.save);
969
+ F(() => {
970
+ L.current === "narrow" && d === "wide" && b("chat"), L.current = d;
971
+ }, [d]);
972
+ const W = x(C);
973
+ F(() => {
974
+ if (d === "narrow" && m === "chat" && C > W.current) {
975
+ const f = E[E.length - 1];
976
+ if (f) {
977
+ K(f.id);
978
+ const Y = setTimeout(() => K(null), 2e3);
979
+ return () => clearTimeout(Y);
975
980
  }
976
981
  }
977
- q.current = C;
978
- }, [C, M, b, i]);
979
- const K = g(!1);
980
- V(() => {
981
- if (N)
982
- K.current = !0;
983
- else if (K.current && b === "narrow" && i === "chat" && C > 0) {
984
- K.current = !1, U(!0);
985
- const h = setTimeout(() => U(!1), 1700);
986
- return () => clearTimeout(h);
982
+ W.current = C;
983
+ }, [C, E, d, m]);
984
+ const z = x(!1);
985
+ F(() => {
986
+ if (I)
987
+ z.current = !0;
988
+ else if (z.current && d === "narrow" && m === "chat" && C > 0) {
989
+ z.current = !1, P(!0);
990
+ const f = setTimeout(() => P(!1), 1700);
991
+ return () => clearTimeout(f);
987
992
  }
988
- }, [N, b, i, C]);
989
- const J = f(
990
- (h) => {
991
- k(h), p.current = h;
993
+ }, [I, d, m, C]);
994
+ const H = p(
995
+ (f) => {
996
+ A(f), R.current = f;
992
997
  },
993
- [k]
994
- ), H = g({ blockCount: C, msgCount: E });
995
- V(() => {
996
- const h = C !== H.current.blockCount || E !== H.current.msgCount;
997
- o?.(h);
998
- }, [C, E, o]);
999
- const R = g(), X = g(!1), O = g(r);
1000
- O.current = r;
1001
- const G = g(C > 0 || E > 0);
1002
- V(() => {
1003
- if ((C > 0 || E > 0) && (G.current = !0), !(!O.current || !G.current)) {
1004
- if (N) {
1005
- X.current = !0, R.current && clearTimeout(R.current);
998
+ [A]
999
+ ), Z = x({ blockCount: C, msgCount: w });
1000
+ F(() => {
1001
+ const f = C !== Z.current.blockCount || w !== Z.current.msgCount;
1002
+ o?.(f);
1003
+ }, [C, w, o]);
1004
+ const D = x(), J = x(!1), j = x(r);
1005
+ j.current = r;
1006
+ const U = x(C > 0 || w > 0);
1007
+ F(() => {
1008
+ if ((C > 0 || w > 0) && (U.current = !0), !(!j.current || !U.current)) {
1009
+ if (I) {
1010
+ J.current = !0, D.current && clearTimeout(D.current);
1006
1011
  return;
1007
1012
  }
1008
- return R.current && clearTimeout(R.current), R.current = setTimeout(() => {
1009
- X.current = !1;
1010
- const h = L();
1011
- O.current?.(h);
1013
+ return D.current && clearTimeout(D.current), D.current = setTimeout(() => {
1014
+ J.current = !1;
1015
+ const f = V();
1016
+ j.current?.(f);
1012
1017
  }, 1e3), () => {
1013
- R.current && clearTimeout(R.current);
1018
+ D.current && clearTimeout(D.current);
1014
1019
  };
1015
1020
  }
1016
- }, [C, E, N, L]), V(() => {
1017
- !N && X.current && O.current && G.current && (R.current && clearTimeout(R.current), R.current = setTimeout(() => {
1018
- X.current = !1;
1019
- const h = L();
1020
- O.current?.(h);
1021
+ }, [C, w, I, V]), F(() => {
1022
+ !I && J.current && j.current && U.current && (D.current && clearTimeout(D.current), D.current = setTimeout(() => {
1023
+ J.current = !1;
1024
+ const f = V();
1025
+ j.current?.(f);
1021
1026
  }, 1e3));
1022
- }, [N, L]);
1023
- const z = f(() => {
1024
- O.current && (R.current && clearTimeout(R.current), O.current({ blocks: [], messages: [] }));
1025
- }, []), te = f((h) => {
1026
- h.preventDefault(), D.current = !0;
1027
- const F = (ae) => {
1028
- if (!D.current || !p.current) return;
1029
- const se = p.current.getBoundingClientRect(), oe = (ae.clientX - se.left) / se.width * 100;
1030
- I(Math.min(Math.max(oe, 30), 80));
1031
- }, ee = () => {
1032
- D.current = !1, document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", ee);
1027
+ }, [I, V]);
1028
+ const ee = p(() => {
1029
+ j.current && (D.current && clearTimeout(D.current), j.current({ blocks: [], messages: [] }));
1030
+ }, []), te = p((f) => {
1031
+ f.preventDefault(), g.current = !0;
1032
+ const Y = (oe) => {
1033
+ if (!g.current || !R.current) return;
1034
+ const ce = R.current.getBoundingClientRect(), de = (oe.clientX - ce.left) / ce.width * 100;
1035
+ O(Math.min(Math.max(de, 30), 80));
1036
+ }, se = () => {
1037
+ g.current = !1, document.removeEventListener("mousemove", Y), document.removeEventListener("mouseup", se);
1033
1038
  };
1034
- document.addEventListener("mousemove", F), document.addEventListener("mouseup", ee);
1035
- }, []), Z = /* @__PURE__ */ e(
1036
- lt,
1039
+ document.addEventListener("mousemove", Y), document.addEventListener("mouseup", se);
1040
+ }, []), X = /* @__PURE__ */ e(
1041
+ it,
1037
1042
  {
1038
1043
  agentEndpoint: t,
1039
1044
  agentApiKey: s,
1040
1045
  agentProvider: c,
1041
- agentModel: a,
1042
- agentProviderEndpoint: n,
1043
- onClear: z,
1044
- onDashboardSaved: l,
1045
- onScore: d,
1046
- loadingComponent: T,
1047
- initialPrompt: A
1046
+ agentModel: n,
1047
+ agentProviderEndpoint: a,
1048
+ onClear: ee,
1049
+ onDashboardSaved: i,
1050
+ onScore: l,
1051
+ loadingComponent: N,
1052
+ initialPrompt: v
1048
1053
  }
1049
1054
  );
1050
- return b === "narrow" ? /* @__PURE__ */ e(
1055
+ return d === "narrow" ? /* @__PURE__ */ e(
1051
1056
  "div",
1052
1057
  {
1053
- ref: J,
1054
- className: `dc:flex dc:h-full dc:w-full dc:overflow-hidden bg-dc-surface-secondary ${w || ""}`,
1055
- children: i === "chat" ? /* @__PURE__ */ u(ne, { children: [
1058
+ ref: H,
1059
+ className: `dc:flex dc:h-full dc:w-full dc:overflow-hidden bg-dc-surface-secondary ${S || ""}`,
1060
+ children: m === "chat" ? /* @__PURE__ */ u(ae, { children: [
1056
1061
  /* @__PURE__ */ e(
1057
- mt,
1062
+ ht,
1058
1063
  {
1059
- blocks: M,
1060
- pulsingBlockId: y,
1061
- nudge: W,
1062
- onExpand: () => x("notebook")
1064
+ blocks: E,
1065
+ pulsingBlockId: T,
1066
+ nudge: $,
1067
+ onExpand: () => b("notebook")
1063
1068
  }
1064
1069
  ),
1065
- /* @__PURE__ */ e("div", { className: "dc:h-full dc:overflow-hidden dc:flex-1", children: Z })
1066
- ] }) : /* @__PURE__ */ u(ne, { children: [
1067
- /* @__PURE__ */ e("div", { className: "dc:h-full dc:overflow-hidden dc:flex-1", children: /* @__PURE__ */ e(ue, {}) }),
1068
- /* @__PURE__ */ e(ht, { onExpand: () => x("chat") })
1070
+ /* @__PURE__ */ e("div", { className: "dc:h-full dc:overflow-hidden dc:flex-1", children: X })
1071
+ ] }) : /* @__PURE__ */ u(ae, { children: [
1072
+ /* @__PURE__ */ e("div", { className: "dc:h-full dc:overflow-hidden dc:flex-1", children: /* @__PURE__ */ e(me, { colorPalette: y }) }),
1073
+ /* @__PURE__ */ e(ft, { onExpand: () => b("chat") })
1069
1074
  ] })
1070
1075
  }
1071
1076
  ) : /* @__PURE__ */ u(
1072
1077
  "div",
1073
1078
  {
1074
- ref: J,
1075
- className: `dc:flex dc:h-full dc:w-full dc:overflow-hidden bg-dc-surface-secondary ${w || ""}`,
1079
+ ref: H,
1080
+ className: `dc:flex dc:h-full dc:w-full dc:overflow-hidden bg-dc-surface-secondary ${S || ""}`,
1076
1081
  children: [
1077
1082
  /* @__PURE__ */ e(
1078
1083
  "div",
1079
1084
  {
1080
1085
  className: "dc:h-full dc:overflow-hidden",
1081
- style: { width: `${v}%` },
1082
- children: /* @__PURE__ */ e(ue, {})
1086
+ style: { width: `${k}%` },
1087
+ children: /* @__PURE__ */ e(me, { colorPalette: y })
1083
1088
  }
1084
1089
  ),
1085
1090
  /* @__PURE__ */ e(
@@ -1093,25 +1098,26 @@ function ft({
1093
1098
  "div",
1094
1099
  {
1095
1100
  className: "dc:h-full dc:overflow-hidden",
1096
- style: { width: `${100 - v}%` },
1097
- children: Z
1101
+ style: { width: `${100 - k}%` },
1102
+ children: X
1098
1103
  }
1099
1104
  )
1100
1105
  ]
1101
1106
  }
1102
1107
  );
1103
1108
  }
1104
- const It = Y.memo(function({
1109
+ const Mt = G.memo(function({
1105
1110
  config: s,
1106
- ...c
1111
+ colorPalette: c,
1112
+ ...n
1107
1113
  }) {
1108
- return /* @__PURE__ */ e(Qe, { initialConfig: s, children: /* @__PURE__ */ e(ft, { ...c }) });
1114
+ return /* @__PURE__ */ e(Fe, { initialConfig: s, children: /* @__PURE__ */ e(pt, { ...n, colorPalette: c }) });
1109
1115
  });
1110
- function Mt() {
1116
+ function Et() {
1111
1117
  return /* @__PURE__ */ e("div", { children: "Analytics Page - Coming in Phase 4" });
1112
1118
  }
1113
- const pt = B("segment");
1114
- function Et({
1119
+ const gt = M("segment");
1120
+ function Rt({
1115
1121
  className: t = ""
1116
1122
  }) {
1117
1123
  return /* @__PURE__ */ e(
@@ -1120,7 +1126,7 @@ function Et({
1120
1126
  className: `dc:flex dc:items-center dc:justify-center bg-dc-bg-secondary ${t}`,
1121
1127
  children: /* @__PURE__ */ u("div", { className: "dc:text-center", children: [
1122
1128
  /* @__PURE__ */ e(
1123
- pt,
1129
+ gt,
1124
1130
  {
1125
1131
  className: "dc:w-8 dc:h-8 dc:mx-auto dc:mb-2 text-dc-text-muted dc:opacity-50"
1126
1132
  }
@@ -1131,178 +1137,178 @@ function Et({
1131
1137
  );
1132
1138
  }
1133
1139
  export {
1134
- It as AgenticNotebook,
1140
+ Mt as AgenticNotebook,
1135
1141
  Lt as AnalysisBuilder,
1136
- Pt as AnalyticsDashboard,
1137
- Mt as AnalyticsPage,
1142
+ Qt as AnalyticsDashboard,
1143
+ Et as AnalyticsPage,
1138
1144
  Ce as AnalyticsPortlet,
1139
- Qt as ChartErrorBoundary,
1140
- Ft as ConfirmModal,
1141
- Vs as CubeClient,
1142
- js as CubeProvider,
1143
- Is as DEFAULT_ICONS,
1144
- _t as DashboardEditModal,
1145
- Vt as DashboardGrid,
1146
- jt as DashboardStoreProvider,
1147
- Et as DashboardThumbnailPlaceholder,
1148
- Ut as DrillBreadcrumb,
1149
- Ot as DrillMenu,
1150
- dc as ExecutionPlanPanel,
1151
- lc as ExplainAIPanel,
1152
- ec as LazyChart,
1153
- me as LoadingIndicator,
1154
- $t as Modal,
1155
- Qe as NotebookStoreProvider,
1156
- Ne as PortletAnalysisModal,
1157
- qt as PortletContainer,
1158
- Us as ScrollContainerProvider,
1159
- gr as THEME_PRESETS,
1160
- br as applyTheme,
1161
- dr as buildFunnelConfigFromQueries,
1162
- lr as buildServerFunnelQuery,
1163
- Os as captureThumbnail,
1164
- ic as compressAndEncode,
1165
- $s as createCubeClient,
1166
- Oc as createDashboardLayout,
1167
- Kt as createDashboardStore,
1168
- zt as createDefaultConfig,
1169
- Wt as createDefaultFlowConfig,
1170
- Jt as createDefaultFunnelConfig,
1171
- Xt as createDefaultQueryConfig,
1172
- Yt as createDefaultRetentionConfig,
1173
- Gt as createDefaultWorkspace,
1174
- Tr as createExplainQueryKey,
1175
- Kc as createFlowQueryKey,
1176
- zc as createFunnelQueryKey,
1177
- Pe as createNotebookStore,
1178
- uc as decodeAndDecompress,
1179
- mc as detectAsymmetricDateRanges,
1180
- hc as detectMeasureCollisions,
1181
- $c as formatChartData,
1182
- ir as formatDuration,
1183
- Wc as generateQueryLabel,
1184
- fc as generateShareUrl,
1185
- pc as getAvailableBindingKeyDimensions,
1186
- tc as getAvailableChartTypes,
1187
- ur as getBindingKeyField,
1188
- gc as getBindingKeyLabel,
1189
- Me as getChartTypeIcon,
1190
- Jc as getCombinedFields,
1191
- mr as getCubeNameFromQuery,
1192
- Ms as getFieldTypeIcon,
1193
- B as getIcon,
1194
- Es as getIconData,
1195
- Rs as getIconRegistry,
1196
- Bs as getIconsByCategory,
1145
+ Ft as ChartErrorBoundary,
1146
+ _t as ConfirmModal,
1147
+ js as CubeClient,
1148
+ Us as CubeProvider,
1149
+ Ms as DEFAULT_ICONS,
1150
+ Vt as DashboardEditModal,
1151
+ jt as DashboardGrid,
1152
+ Ut as DashboardStoreProvider,
1153
+ Rt as DashboardThumbnailPlaceholder,
1154
+ Ot as DrillBreadcrumb,
1155
+ $t as DrillMenu,
1156
+ lc as ExecutionPlanPanel,
1157
+ ic as ExplainAIPanel,
1158
+ tc as LazyChart,
1159
+ he as LoadingIndicator,
1160
+ qt as Modal,
1161
+ Fe as NotebookStoreProvider,
1162
+ ke as PortletAnalysisModal,
1163
+ Kt as PortletContainer,
1164
+ Os as ScrollContainerProvider,
1165
+ br as THEME_PRESETS,
1166
+ xr as applyTheme,
1167
+ lr as buildFunnelConfigFromQueries,
1168
+ ir as buildServerFunnelQuery,
1169
+ $s as captureThumbnail,
1170
+ uc as compressAndEncode,
1171
+ qs as createCubeClient,
1172
+ $c as createDashboardLayout,
1173
+ zt as createDashboardStore,
1174
+ Wt as createDefaultConfig,
1175
+ Jt as createDefaultFlowConfig,
1176
+ Xt as createDefaultFunnelConfig,
1177
+ Yt as createDefaultQueryConfig,
1178
+ Gt as createDefaultRetentionConfig,
1179
+ Ht as createDefaultWorkspace,
1180
+ Dr as createExplainQueryKey,
1181
+ zc as createFlowQueryKey,
1182
+ Wc as createFunnelQueryKey,
1183
+ Qe as createNotebookStore,
1184
+ mc as decodeAndDecompress,
1185
+ hc as detectAsymmetricDateRanges,
1186
+ fc as detectMeasureCollisions,
1187
+ qc as formatChartData,
1188
+ ur as formatDuration,
1189
+ Jc as generateQueryLabel,
1190
+ pc as generateShareUrl,
1191
+ gc as getAvailableBindingKeyDimensions,
1192
+ sc as getAvailableChartTypes,
1193
+ mr as getBindingKeyField,
1194
+ bc as getBindingKeyLabel,
1195
+ Ee as getChartTypeIcon,
1196
+ Xc as getCombinedFields,
1197
+ hr as getCubeNameFromQuery,
1198
+ Es as getFieldTypeIcon,
1199
+ M as getIcon,
1200
+ Rs as getIconData,
1201
+ Bs as getIconRegistry,
1202
+ Ps as getIconsByCategory,
1197
1203
  Ls as getMeasureTypeIcon,
1198
- Xc as getQueryIndices,
1199
- Yc as getQueryLabels,
1200
- xr as getTheme,
1201
- yr as getThemeVariable,
1202
- sc as getUnavailableChartTypes,
1203
- bc as getValidationSummary,
1204
- Qr as highlightCodeBlocks,
1205
- cc as isChartTypeAvailable,
1206
- vr as isDarkMode,
1207
- Ht as isFlowConfig,
1208
- Zt as isFunnelConfig,
1209
- hr as isFunnelData,
1210
- xc as isMinimumFunnelConfigValid,
1211
- es as isMultiQuery,
1212
- ts as isMultiQueryConfig,
1213
- Gc as isMultiQueryData,
1214
- yc as isMultiQueryValid,
1215
- ss as isQueryConfig,
1216
- cs as isRetentionConfig,
1217
- Br as isSankeyData,
1204
+ Yc as getQueryIndices,
1205
+ Gc as getQueryLabels,
1206
+ yr as getTheme,
1207
+ vr as getThemeVariable,
1208
+ cc as getUnavailableChartTypes,
1209
+ xc as getValidationSummary,
1210
+ Fr as highlightCodeBlocks,
1211
+ rc as isChartTypeAvailable,
1212
+ Cr as isDarkMode,
1213
+ Zt as isFlowConfig,
1214
+ es as isFunnelConfig,
1215
+ fr as isFunnelData,
1216
+ yc as isMinimumFunnelConfigValid,
1217
+ ts as isMultiQuery,
1218
+ ss as isMultiQueryConfig,
1219
+ Hc as isMultiQueryData,
1220
+ vc as isMultiQueryValid,
1221
+ cs as isQueryConfig,
1222
+ rs as isRetentionConfig,
1223
+ Pr as isSankeyData,
1218
1224
  Lr as isServerFlowQuery,
1219
- rs as isServerFunnelQuery,
1220
- vc as isShareableSize,
1221
- ns as isSingleQuery,
1222
- qs as isThumbnailCaptureAvailable,
1223
- as as isValidAnalysisConfig,
1224
- os as isValidAnalysisWorkspace,
1225
- rc as isValidChartType,
1226
- Hc as mergeQueryResults,
1227
- Zc as mergeResultsByKey,
1228
- er as mergeResultsConcat,
1229
- ds as migrateConfig,
1230
- ls as migrateLegacyPortlet,
1231
- Cc as parseShareUrl,
1232
- nc as preloadChart,
1233
- ac as preloadCharts,
1234
- Ps as registerIcons,
1235
- Qs as resetIcons,
1236
- Cr as resetTheme,
1237
- is as selectAllActions,
1238
- je as selectBlockActions,
1239
- Fe as selectBlocks,
1240
- wc as selectBreakdowns,
1241
- Nc as selectChartConfig,
1242
- Ve as selectChatActions,
1243
- _e as selectChatState,
1244
- kc as selectCurrentState,
1245
- us as selectDebugData,
1246
- ms as selectDebugDataActions,
1247
- hs as selectEditModeActions,
1248
- fs as selectEditModeState,
1249
- Sc as selectFilters,
1250
- Tc as selectFunnelState,
1251
- At as selectInputValue,
1252
- Tt as selectIsStreaming,
1253
- ps as selectLayoutActions,
1254
- gs as selectLayoutState,
1255
- St as selectMessages,
1256
- Dc as selectMetrics,
1257
- bs as selectModalActions,
1258
- xs as selectModalState,
1259
- Ac as selectMultiQueryState,
1260
- ys as selectPortletDebugData,
1261
- Dt as selectSessionId,
1262
- vs as selectThumbnailDirty,
1263
- Ic as selectUIState,
1264
- Fs as setIcon,
1265
- wr as setTheme,
1266
- Nr as setThemeVariable,
1267
- fr as transformServerFunnelResult,
1268
- et as useAgentChat,
1269
- Mc as useAnalysisBuilder,
1270
- Ec as useAnalysisBuilderStore,
1271
- Re as useCubeApi,
1272
- Ks as useCubeContext,
1273
- zs as useCubeFeatures,
1274
- Hs as useCubeFieldLabel,
1275
- tr as useCubeLoadQuery,
1276
- Ws as useCubeMeta,
1277
- Js as useCubeMetaQuery,
1278
- sr as useCubeQuery,
1279
- Cs as useDashboard,
1280
- ws as useDashboardStore,
1281
- Ns as useDashboardStoreApi,
1282
- ks as useDashboardStoreOptional,
1283
- Ss as useDrillInteraction,
1284
- Dr as useDryRunQueries,
1285
- Ar as useDryRunQuery,
1286
- Ts as useElementVisibility,
1287
- Ir as useExplainAI,
1288
- Mr as useExplainQuery,
1289
- cr as useFlowQuery,
1290
- rr as useFunnelQuery,
1291
- nr as useMultiCubeLoadQuery,
1292
- Er as useMultiDryRunQueries,
1293
- P as useNotebookStore,
1294
- Xs as useScrollContainer,
1295
- Ds as useScrollDetection,
1296
- jc as useTheme,
1297
- Rc as validateBindingKeyExists,
1298
- Bc as validateBindingKeyForSteps,
1225
+ ns as isServerFunnelQuery,
1226
+ Cc as isShareableSize,
1227
+ as as isSingleQuery,
1228
+ Ks as isThumbnailCaptureAvailable,
1229
+ os as isValidAnalysisConfig,
1230
+ ds as isValidAnalysisWorkspace,
1231
+ nc as isValidChartType,
1232
+ Zc as mergeQueryResults,
1233
+ er as mergeResultsByKey,
1234
+ tr as mergeResultsConcat,
1235
+ ls as migrateConfig,
1236
+ is as migrateLegacyPortlet,
1237
+ wc as parseShareUrl,
1238
+ ac as preloadChart,
1239
+ oc as preloadCharts,
1240
+ Qs as registerIcons,
1241
+ Fs as resetIcons,
1242
+ wr as resetTheme,
1243
+ us as selectAllActions,
1244
+ Ue as selectBlockActions,
1245
+ _e as selectBlocks,
1246
+ Nc as selectBreakdowns,
1247
+ kc as selectChartConfig,
1248
+ je as selectChatActions,
1249
+ Ve as selectChatState,
1250
+ Sc as selectCurrentState,
1251
+ ms as selectDebugData,
1252
+ hs as selectDebugDataActions,
1253
+ fs as selectEditModeActions,
1254
+ ps as selectEditModeState,
1255
+ Tc as selectFilters,
1256
+ Dc as selectFunnelState,
1257
+ It as selectInputValue,
1258
+ Dt as selectIsStreaming,
1259
+ gs as selectLayoutActions,
1260
+ bs as selectLayoutState,
1261
+ Tt as selectMessages,
1262
+ Ac as selectMetrics,
1263
+ xs as selectModalActions,
1264
+ ys as selectModalState,
1265
+ Ic as selectMultiQueryState,
1266
+ vs as selectPortletDebugData,
1267
+ At as selectSessionId,
1268
+ Cs as selectThumbnailDirty,
1269
+ Mc as selectUIState,
1270
+ _s as setIcon,
1271
+ Nr as setTheme,
1272
+ kr as setThemeVariable,
1273
+ pr as transformServerFunnelResult,
1274
+ tt as useAgentChat,
1275
+ Ec as useAnalysisBuilder,
1276
+ Rc as useAnalysisBuilderStore,
1277
+ Be as useCubeApi,
1278
+ zs as useCubeContext,
1279
+ Ws as useCubeFeatures,
1280
+ Zs as useCubeFieldLabel,
1281
+ sr as useCubeLoadQuery,
1282
+ Js as useCubeMeta,
1283
+ Xs as useCubeMetaQuery,
1284
+ cr as useCubeQuery,
1285
+ ws as useDashboard,
1286
+ Ns as useDashboardStore,
1287
+ ks as useDashboardStoreApi,
1288
+ Ss as useDashboardStoreOptional,
1289
+ Ts as useDrillInteraction,
1290
+ Ar as useDryRunQueries,
1291
+ Ir as useDryRunQuery,
1292
+ Ds as useElementVisibility,
1293
+ Mr as useExplainAI,
1294
+ Er as useExplainQuery,
1295
+ rr as useFlowQuery,
1296
+ nr as useFunnelQuery,
1297
+ ar as useMultiCubeLoadQuery,
1298
+ Rr as useMultiDryRunQueries,
1299
+ B as useNotebookStore,
1300
+ Ys as useScrollContainer,
1301
+ As as useScrollDetection,
1302
+ Uc as useTheme,
1303
+ Bc as validateBindingKeyExists,
1304
+ Pc as validateBindingKeyForSteps,
1299
1305
  Lc as validateFunnelConfig,
1300
- ar as validateMergeKey,
1301
- Pc as validateMergeKeys,
1302
- Qc as validateMultiQueryConfig,
1303
- Fc as validateStepQueries,
1304
- _c as validateTimeDimensionAlignment,
1305
- Ys as warnIfScreenshotLibMissing,
1306
- kr as watchThemeChanges
1306
+ or as validateMergeKey,
1307
+ Qc as validateMergeKeys,
1308
+ Fc as validateMultiQueryConfig,
1309
+ _c as validateStepQueries,
1310
+ Vc as validateTimeDimensionAlignment,
1311
+ Gs as warnIfScreenshotLibMissing,
1312
+ Sr as watchThemeChanges
1307
1313
  };
1308
1314
  //# sourceMappingURL=index.js.map