@aintela/bi 0.2.4 → 0.2.6

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.
@@ -1,41 +1,46 @@
1
- var li = Object.defineProperty;
2
- var a = (e, n) => li(e, "name", { value: n, configurable: !0 });
1
+ var si = Object.defineProperty;
2
+ var a = (e, n) => si(e, "name", { value: n, configurable: !0 });
3
3
  import { jsx as t, jsxs as b, Fragment as Te } from "react/jsx-runtime";
4
- import He, { useState as N, useEffect as q, useContext as Ae, createContext as Ct, useMemo as ve, useRef as ee, forwardRef as wt, useCallback as W, useImperativeHandle as Qt } from "react";
5
- import { useStore as en } from "zustand";
6
- import { useShallow as si } from "zustand/react/shallow";
4
+ import He, { useState as N, useEffect as q, useContext as Ee, createContext as wt, useMemo as Se, useRef as ee, forwardRef as Tt, useCallback as W, useImperativeHandle as en } from "react";
5
+ import { useStore as tn } from "zustand";
6
+ import { useShallow as di } from "zustand/react/shallow";
7
7
  import { a as et } from "./BiClientProvider-CWJochvi.js";
8
- import { createStore as di } from "zustand/vanilla";
9
- import { C as Oe, S as _e, a as ci } from "./ScriptDashboardViewerVertical-CHIPRLen.js";
8
+ import { createStore as ci } from "zustand/vanilla";
9
+ import { C as Oe, S as Re, a as pi } from "./ScriptDashboardViewerVertical-Db2sFEEl.js";
10
10
  import S from "@mui/material/Box";
11
- import { SpeedOutlined as tn, GridViewOutlined as nn, MapOutlined as pi, BarChartOutlined as ut, TableChartOutlined as an, TagOutlined as on, DashboardOutlined as Tt, ManageSearchOutlined as hi, CalendarTodayOutlined as ui, DateRangeOutlined as mi, TimelineOutlined as fi, BubbleChartOutlined as gi, DonutLargeOutlined as xi, ScatterPlotOutlined as yi, PieChartOutlined as bi, MultilineChartOutlined as vi, StackedBarChartOutlined as Si, StackedLineChartOutlined as Ci, AreaChartOutlined as wi, AlignHorizontalLeftOutlined as Ti, ShowChartOutlined as Di, TableRowsOutlined as ki, HeatPumpOutlined as Ii, ViewColumnOutlined as zi, DeleteOutline as rn, CheckCircle as Oi, Pending as Pi, ViewQuiltOutlined as Ei, BorderClearOutlined as $i, DragIndicatorOutlined as Ai, AddOutlined as Mi, ArrowDropDownOutlined as mt, FilterListOutlined as Ri, PreviewRounded as _i, FolderOpenOutlined as Fi, ArrowBack as Ni, NoteAddOutlined as Bi, SaveOutlined as Hi, RefreshOutlined as ln, StartRounded as Li, Close as Gi, Add as Wi, InsertDriveFileOutlined as Vi, Fullscreen as ji } from "@mui/icons-material";
12
- import { Box as j, Stack as se, IconButton as Pe, CircularProgress as ft, Typography as ie, Popper as Ve, Grow as je, Paper as Fe, ClickAwayListener as Ue, MenuList as gt, Divider as Ke, MenuItem as Ee, ListItemIcon as qe, ListItemText as Ye, TextField as Ne, Tooltip as Ie, Switch as xt, ToggleButtonGroup as sn, ToggleButton as Je, Button as Ft, Menu as Ui, Select as Nt, Grid as Xe } from "@mui/material";
13
- import { alpha as Ce, useTheme as le } from "@mui/material/styles";
14
- import { e as Ki } from "./GridLayout-1gWuIKeZ.js";
15
- import { G as qi } from "./GridCardPlaceHolder-DVVT3pqn.js";
16
- import { useEnvironment as dn, DashboardIcon as ke, PanelIcon as Le, CloseIcon as Dt, PromptV2 as Yi, PlusIcon as yt, SearchIcon as Ji, useAiChatSessionStore as Xi, useAiChatServices as Zi, ChevronIcon as Qi, EnvironmentProvider as ea, InertEnvironmentProvider as ta, useEnvironmentOptional as na } from "@aintela/chat/components";
17
- import Bt from "@mui/material/Stack";
18
- import { AnimatePresence as tt, motion as re, useReducedMotion as ia } from "framer-motion";
19
- import cn from "@mui/material/Dialog";
11
+ import { SpeedOutlined as nn, GridViewOutlined as an, MapOutlined as hi, BarChartOutlined as mt, TableChartOutlined as on, TagOutlined as rn, DashboardOutlined as kt, ManageSearchOutlined as ui, CalendarTodayOutlined as mi, DateRangeOutlined as fi, TimelineOutlined as gi, BubbleChartOutlined as xi, DonutLargeOutlined as yi, ScatterPlotOutlined as bi, PieChartOutlined as vi, MultilineChartOutlined as Si, StackedBarChartOutlined as Ci, StackedLineChartOutlined as wi, AreaChartOutlined as Ti, AlignHorizontalLeftOutlined as ki, ShowChartOutlined as Di, TableRowsOutlined as Ii, HeatPumpOutlined as zi, ViewColumnOutlined as Oi, DeleteOutline as ln, CheckCircle as Pi, Pending as $i, ViewQuiltOutlined as Ei, BorderClearOutlined as Ai, DragIndicatorOutlined as Mi, AddOutlined as Ri, ArrowDropDownOutlined as ft, FilterListOutlined as _i, PreviewRounded as Fi, FolderOpenOutlined as Ni, ArrowBack as Bi, NoteAddOutlined as Hi, SaveOutlined as Li, RefreshOutlined as sn, StartRounded as Gi, Close as Wi, Add as Vi, InsertDriveFileOutlined as ji, Fullscreen as Ui } from "@mui/icons-material";
12
+ import { Box as j, Stack as se, IconButton as Pe, CircularProgress as gt, Typography as ie, Popper as Ve, Grow as je, Paper as _e, ClickAwayListener as Ue, MenuList as xt, Divider as Ke, MenuItem as $e, ListItemIcon as qe, ListItemText as Ye, TextField as Fe, Tooltip as Ie, Switch as yt, ToggleButtonGroup as dn, ToggleButton as Je, Button as Nt, Menu as Ki, Select as Bt, Grid as Xe } from "@mui/material";
13
+ import { alpha as ve, useTheme as le } from "@mui/material/styles";
14
+ import { e as qi } from "./GridLayout-BQcuPzng.js";
15
+ import { G as Yi } from "./GridCardPlaceHolder-DVVT3pqn.js";
16
+ import { useEnvironment as cn, DashboardIcon as De, PanelIcon as Le, CloseIcon as Dt, PromptV2 as Ji, PlusIcon as bt, SearchIcon as Xi, useAiChatSessionStore as Zi, useAiChatServices as Qi, ChevronIcon as ea, EnvironmentProvider as ta, InertEnvironmentProvider as na, useEnvironmentOptional as ia } from "@aintela/chat/components";
17
+ import Ht from "@mui/material/Stack";
18
+ import { AnimatePresence as tt, motion as re, useReducedMotion as aa } from "framer-motion";
19
+ import pn from "@mui/material/Dialog";
20
20
  import be from "@mui/material/IconButton";
21
21
  import ce from "@mui/material/Tooltip";
22
22
  import X from "@mui/material/Typography";
23
- import Ht from "@mui/material/Divider";
24
- import lt from "@mui/material/ListItemIcon";
25
- import st from "@mui/material/ListItemText";
26
- import dt from "@mui/material/MenuItem";
27
- import Lt from "@mui/material/MenuList";
28
- import Gt from "@mui/material/Popover";
29
- import Wt from "@mui/material/ToggleButton";
30
- import aa from "@mui/material/ToggleButtonGroup";
31
- import oa from "@mui/icons-material/EditOutlined";
32
- import { createPortal as ra } from "react-dom";
33
- function $e(e) {
23
+ import Lt from "@mui/material/Divider";
24
+ import st from "@mui/material/ListItemIcon";
25
+ import dt from "@mui/material/ListItemText";
26
+ import ct from "@mui/material/MenuItem";
27
+ import Gt from "@mui/material/MenuList";
28
+ import Wt from "@mui/material/Popover";
29
+ import Vt from "@mui/material/ToggleButton";
30
+ import oa from "@mui/material/ToggleButtonGroup";
31
+ import ra from "@mui/icons-material/EditOutlined";
32
+ import { createPortal as la } from "react-dom";
33
+ function Ne(e) {
34
34
  if (!(e != null && e.trim())) return "_";
35
35
  const n = e.normalize("NFD").replace(new RegExp("\\p{Mn}", "gu"), "").replace(new RegExp("(?<=[a-zA-Z0-9_$])[^a-zA-Z0-9_$]+([a-zA-Z_$])", "g"), (i, l) => l.toUpperCase()).replace(/[^a-zA-Z0-9_$]+/g, "");
36
36
  return n ? /^\d/.test(n) ? `_${n}` : n : "_";
37
37
  }
38
- a($e, "sanitizeToJsVariable");
38
+ a(Ne, "sanitizeToJsVariable");
39
+ function nt(e) {
40
+ const n = Ne(e);
41
+ return n.charAt(0).toUpperCase() + n.slice(1);
42
+ }
43
+ a(nt, "sanitizeToJsxComponentName");
39
44
  function ze() {
40
45
  const e = typeof globalThis.crypto < "u" ? globalThis.crypto : void 0;
41
46
  if (e && typeof e.randomUUID == "function") return e.randomUUID();
@@ -44,15 +49,15 @@ function ze() {
44
49
  return n;
45
50
  }
46
51
  a(ze, "randomId");
47
- const nt = 300;
48
- function kt(e) {
52
+ const it = 300;
53
+ function It(e) {
49
54
  if (!e) return;
50
55
  const n = Object.values(e).filter((i) => i && i.trim().length > 0);
51
56
  if (n.length !== 0)
52
57
  return n.map((i) => `- ${i}`).join(`
53
58
  `);
54
59
  }
55
- a(kt, "joinClientSideChanges");
60
+ a(It, "joinClientSideChanges");
56
61
  const we = [
57
62
  { label: "Métrica (Comparação)", category: "Métrica", specificType: "MetricComparison" },
58
63
  { label: "Tabela (Auto)", category: "Tabela", specificType: "TableAuto" },
@@ -74,19 +79,19 @@ const we = [
74
79
  { label: "Árvore (Distribuição)", category: "Árvore", specificType: "Treemap" },
75
80
  { label: "Medidor (Gauge)", category: "Medidor", specificType: "Gauge" }
76
81
  ];
77
- function it(e = we) {
82
+ function at(e = we) {
78
83
  return e.reduce((n, i) => {
79
84
  var l;
80
85
  return (n[l = i.category] ?? (n[l] = [])).push(i), n;
81
86
  }, {});
82
87
  }
83
- a(it, "groupCardCatalog");
84
- const It = [
88
+ a(at, "groupCardCatalog");
89
+ const zt = [
85
90
  { label: "Período (Date Range)", filterType: "DateRangePicker" },
86
91
  { label: "Data (Date Picker)", filterType: "DatePicker" },
87
92
  { label: "Auto Complete", filterType: "AutoComplete" }
88
- ], la = /* @__PURE__ */ a((e, n) => e.actionDescription == n.actionDescription && e.category == n.category && e.name == n.name && e.color == n.color && e.specificType == n.specificType, "sketchCardItemComparer"), sa = /* @__PURE__ */ a((e, n) => JSON.stringify(e) == JSON.stringify(n), "sketchFilterComparer");
89
- function bt(e) {
93
+ ], sa = /* @__PURE__ */ a((e, n) => e.actionDescription == n.actionDescription && e.category == n.category && e.name == n.name && e.color == n.color && e.specificType == n.specificType, "sketchCardItemComparer"), da = /* @__PURE__ */ a((e, n) => JSON.stringify(e) == JSON.stringify(n), "sketchFilterComparer");
94
+ function vt(e) {
90
95
  var o;
91
96
  const n = /* @__PURE__ */ new Set();
92
97
  let i = !1;
@@ -95,23 +100,23 @@ function bt(e) {
95
100
  let l = null;
96
101
  return i && (l = "Os nomes dos cards precisam ser únicos"), (((o = e.cards) == null ? void 0 : o.length) ?? 0) == 0 && (l = "Inclua pelo menos um card no rascunho"), l;
97
102
  }
98
- a(bt, "validateSketch");
99
- const da = 20;
100
- function pn(e) {
103
+ a(vt, "validateSketch");
104
+ const ca = 20;
105
+ function hn(e) {
101
106
  var g, h, x;
102
107
  const n = [];
103
108
  let i = 0, l = 0, o = 0, r = 0;
104
109
  for (const d of e.config) {
105
- const { size: v, height: s, card: c } = d, u = Math.max(1, Math.round((s ?? nt) / da));
110
+ const { size: v, height: s, card: c } = d, u = Math.max(1, Math.round((s ?? it) / ca));
106
111
  i + v > 12 && (i = 0, l += o, o = 0);
107
112
  let p = d.description, f = d.name, y = d.specificType, R = d.id, H;
108
113
  if (He.isValidElement(c)) {
109
114
  const L = c.props ?? {};
110
- p = p ?? L.description ?? "", f = f ?? L.name, R = R ?? L.id ?? $e(`${f ?? ""}${r}`), y = y ?? L.specificType, H = L.category ?? ((g = we.find((P) => P.specificType === y)) == null ? void 0 : g.category);
115
+ p = p ?? L.description ?? "", f = f ?? L.name, R = R ?? L.id ?? Ne(`${f ?? ""}${r}`), y = y ?? L.specificType, H = L.category ?? ((g = we.find((P) => P.specificType === y)) == null ? void 0 : g.category);
111
116
  } else {
112
117
  if (f === void 0 && y === void 0)
113
118
  continue;
114
- R = R ?? $e(`${f}${r}`), H = (h = we.find((L) => L.specificType === y)) == null ? void 0 : h.category;
119
+ R = R ?? Ne(`${f}${r}`), H = (h = we.find((L) => L.specificType === y)) == null ? void 0 : h.category;
115
120
  }
116
121
  n.push({
117
122
  i: R ?? "not_defined",
@@ -132,46 +137,46 @@ function pn(e) {
132
137
  filters: e.filters ?? []
133
138
  };
134
139
  }
135
- a(pn, "padConfigToDashboard");
136
- function hn(e) {
140
+ a(hn, "padConfigToDashboard");
141
+ function un(e) {
137
142
  return typeof e == "object" && e !== null && "config" in e && Array.isArray(e.config);
138
143
  }
139
- a(hn, "isSimplePadDefinition");
140
- function ca(e) {
144
+ a(un, "isSimplePadDefinition");
145
+ function pa(e) {
141
146
  return Oe[e] ?? Oe.Generic;
142
147
  }
143
- a(ca, "categoryPrefix");
148
+ a(pa, "categoryPrefix");
144
149
  const Ze = "llm-env-highlight-active";
145
- function un() {
150
+ function mn() {
146
151
  return typeof document > "u" ? null : document;
147
152
  }
148
- a(un, "defaultRoot");
149
- function Vt(e) {
153
+ a(mn, "defaultRoot");
154
+ function jt(e) {
150
155
  return typeof CSS < "u" && CSS.escape ? CSS.escape(e) : e.replace(/["\\]/g, "\\$&");
151
156
  }
152
- a(Vt, "escapeCssValue");
153
- function mn(e) {
157
+ a(jt, "escapeCssValue");
158
+ function fn(e) {
154
159
  return e.startsWith(".") || e.startsWith("#") || e.startsWith("[") || e.includes(" ") || e.includes(":") || e.includes(">");
155
160
  }
156
- a(mn, "looksLikeSelector");
157
- function fn(e) {
161
+ a(fn, "looksLikeSelector");
162
+ function gn(e) {
158
163
  var o, r, g;
159
164
  const n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ a((h) => {
160
- const x = Vt(h);
165
+ const x = jt(h);
161
166
  n.add(`[data-env-id="${x}"]`), n.add(`[data-env-key="${x}"]`), n.add(`[data-env-name="${x}"]`), n.add(`#${x}`), n.add(`.${x}`);
162
167
  }, "appendByIdentifier"), l = /* @__PURE__ */ a((h) => {
163
- h.split(/\s+/).map((x) => x.trim()).filter(Boolean).forEach((x) => n.add(`.${Vt(x)}`));
168
+ h.split(/\s+/).map((x) => x.trim()).filter(Boolean).forEach((x) => n.add(`.${jt(x)}`));
164
169
  }, "appendByClassName");
165
170
  if (typeof e == "string") {
166
171
  const h = e.trim();
167
- return h ? (mn(h) ? n.add(h) : i(h), [...n]) : [];
172
+ return h ? (fn(h) ? n.add(h) : i(h), [...n]) : [];
168
173
  }
169
174
  return (o = e.selector) != null && o.trim() && n.add(e.selector.trim()), (r = e.className) != null && r.trim() && l(e.className), (g = e.identifier) != null && g.trim() && i(e.identifier.trim()), [...n];
170
175
  }
171
- a(fn, "toSelectorList");
172
- function Qe(e, n = un()) {
176
+ a(gn, "toSelectorList");
177
+ function Qe(e, n = mn()) {
173
178
  if (!n) return { selectors: [], elements: [] };
174
- const i = fn(e), l = /* @__PURE__ */ new Set();
179
+ const i = gn(e), l = /* @__PURE__ */ new Set();
175
180
  return i.forEach((o) => {
176
181
  try {
177
182
  n.querySelectorAll(o).forEach((r) => l.add(r));
@@ -181,59 +186,59 @@ function Qe(e, n = un()) {
181
186
  }), { selectors: i, elements: [...l] };
182
187
  }
183
188
  a(Qe, "resolveEnvironmentElements");
184
- function zt(e) {
189
+ function Ot(e) {
185
190
  const n = e.getBoundingClientRect();
186
191
  if (!(n.width > 0 && n.height > 0)) return !1;
187
192
  if (typeof window > "u" || !window.getComputedStyle) return !0;
188
193
  const i = window.getComputedStyle(e);
189
194
  return i.display !== "none" && i.visibility !== "hidden";
190
195
  }
191
- a(zt, "isElementVisible");
192
- function gn(e, n = !1) {
196
+ a(Ot, "isElementVisible");
197
+ function xn(e, n = !1) {
193
198
  if (e.length === 0) return null;
194
199
  if (n) return e[0];
195
- for (const i of e) if (zt(i)) return i;
200
+ for (const i of e) if (Ot(i)) return i;
196
201
  return e[0];
197
202
  }
198
- a(gn, "pickBestElement");
199
- function Ot(e, n = un()) {
203
+ a(xn, "pickBestElement");
204
+ function Pt(e, n = mn()) {
200
205
  const { elements: i } = Qe(e, n);
201
- for (const l of i) if (zt(l)) return l;
206
+ for (const l of i) if (Ot(l)) return l;
202
207
  return null;
203
208
  }
204
- a(Ot, "resolveGuideElement");
205
- const xn = /* @__PURE__ */ new Set([
209
+ a(Pt, "resolveGuideElement");
210
+ const yn = /* @__PURE__ */ new Set([
206
211
  "dashboardpad-add-card",
207
212
  "dashboardpad-add-card-dropdown",
208
213
  "dashboardpad-add-filter",
209
214
  "dashboard-pad-layout-toggle",
210
215
  "dashboard-pad-layout-boxed",
211
216
  "dashboard-pad-layout-naked"
212
- ]), yn = /* @__PURE__ */ new Set([
217
+ ]), bn = /* @__PURE__ */ new Set([
213
218
  "llm-env-card",
214
219
  "llm-env-filter",
215
220
  "llm-env-layout-toggle",
216
221
  "llm-env-card-sketch",
217
222
  "llm-env-card-sketch-wrapper",
218
223
  "llm-env-filter-sketch"
219
- ]), pa = /^[0-9a-fA-F]{8,}(-[0-9a-fA-F]{4,})+$/;
220
- function bn(e) {
224
+ ]), ha = /^[0-9a-fA-F]{8,}(-[0-9a-fA-F]{4,})+$/;
225
+ function vn(e) {
221
226
  const n = /* @__PURE__ */ a((l) => {
222
227
  const o = l.trim();
223
- return o ? xn.has(o) ? !0 : pa.test(o) : !1;
224
- }, "checkId"), i = /* @__PURE__ */ a((l) => l.split(/\s+/).filter(Boolean).some((o) => yn.has(o)), "checkClass");
228
+ return o ? yn.has(o) ? !0 : ha.test(o) : !1;
229
+ }, "checkId"), i = /* @__PURE__ */ a((l) => l.split(/\s+/).filter(Boolean).some((o) => bn.has(o)), "checkClass");
225
230
  if (typeof e == "string") {
226
231
  const l = e.trim();
227
- return mn(l) ? !1 : n(l);
232
+ return fn(l) ? !1 : n(l);
228
233
  }
229
234
  return !!(e.identifier && n(e.identifier) || e.className && i(e.className));
230
235
  }
231
- a(bn, "targetSuggestsPadInternal");
232
- function vn(e) {
233
- return e.some((n) => bn(n.target));
236
+ a(vn, "targetSuggestsPadInternal");
237
+ function Sn(e) {
238
+ return e.some((n) => vn(n.target));
234
239
  }
235
- a(vn, "guideStepsRequireSketch");
236
- const Sn = /* @__PURE__ */ a(({ entry: e, onHover: n }) => {
240
+ a(Sn, "guideStepsRequireSketch");
241
+ const Cn = /* @__PURE__ */ a(({ entry: e, onHover: n }) => {
237
242
  var i;
238
243
  return /* @__PURE__ */ t(
239
244
  S,
@@ -254,7 +259,7 @@ const Sn = /* @__PURE__ */ a(({ entry: e, onHover: n }) => {
254
259
  }
255
260
  );
256
261
  }, "ClonedComponent");
257
- function Cn(e) {
262
+ function wn(e) {
258
263
  const {
259
264
  cards: n,
260
265
  filters: i,
@@ -287,7 +292,7 @@ function Cn(e) {
287
292
  }
288
293
  };
289
294
  }
290
- a(Cn, "toDraftPayload");
295
+ a(wn, "toDraftPayload");
291
296
  function Be(e) {
292
297
  const n = e ?? {}, i = n.draft ?? n.committed;
293
298
  return {
@@ -305,13 +310,13 @@ function Be(e) {
305
310
  };
306
311
  }
307
312
  a(Be, "fromUpsertResponse");
308
- async function at(e, n) {
309
- const i = await e.upsertDashboard(Cn(n));
313
+ async function ot(e, n) {
314
+ const i = await e.upsertDashboard(wn(n));
310
315
  return Be(i);
311
316
  }
312
- a(at, "upsertDashboardDraft");
313
- async function Pt(e, n, i) {
314
- return at(e, {
317
+ a(ot, "upsertDashboardDraft");
318
+ async function $t(e, n, i) {
319
+ return ot(e, {
315
320
  name: (i == null ? void 0 : i.name) ?? "Sem título",
316
321
  filters: (i == null ? void 0 : i.filters) ?? [],
317
322
  cards: (i == null ? void 0 : i.cards) ?? [],
@@ -320,15 +325,15 @@ async function Pt(e, n, i) {
320
325
  originalSessionId: n
321
326
  });
322
327
  }
323
- a(Pt, "createDashboardDraft");
324
- const wn = 3e3, Tn = 800, Dn = 500, ha = 1800;
325
- function kn(e = {}) {
326
- const n = e.viewerCommitDebounceMs ?? wn, i = e.draftSaveDebounceMs ?? Tn, l = e.onDraftSaveError ?? ((o) => console.warn("[@aintela/bi composer] draft save failed:", o));
327
- return di()((o, r) => {
328
+ a($t, "createDashboardDraft");
329
+ const Tn = 3e3, kn = 800, Dn = 500, ua = 1800;
330
+ function In(e = {}) {
331
+ const n = e.viewerCommitDebounceMs ?? Tn, i = e.draftSaveDebounceMs ?? kn, l = e.onDraftSaveError ?? ((o) => console.warn("[@aintela/bi composer] draft save failed:", o));
332
+ return ci()((o, r) => {
328
333
  const g = /* @__PURE__ */ a(async () => {
329
334
  const s = r()._client, c = r().dashboardDefinition;
330
335
  if (!s || !(c != null && c.id) || !c.originalSessionId) return;
331
- const u = at(s, c).then(() => {
336
+ const u = ot(s, c).then(() => {
332
337
  }).catch(l);
333
338
  o({ _draftSavePromise: u }), await u, o((p) => p._draftSavePromise === u ? { _draftSavePromise: null } : {});
334
339
  }, "_saveDraft"), h = /* @__PURE__ */ a(() => {
@@ -357,7 +362,7 @@ function kn(e = {}) {
357
362
  const c = r().dashboardDefinition, u = r().currentSessionId || null, p = r().turnOpen, f = s.id;
358
363
  if (!p && (c != null && c.id) && f && c.id === f && (((H = c.cards) == null ? void 0 : H.length) ?? 0) > 0)
359
364
  return;
360
- const y = hn(s) ? pn(s) : { ...s };
365
+ const y = un(s) ? hn(s) : { ...s };
361
366
  y.originalSessionId = u;
362
367
  const R = {
363
368
  ...c,
@@ -494,13 +499,13 @@ function kn(e = {}) {
494
499
  setProducedDashboardId: /* @__PURE__ */ a((s) => o({ producedDashboardId: s }), "setProducedDashboardId"),
495
500
  setViewport: /* @__PURE__ */ a((s) => o((c) => c.viewport.width === s.width && c.viewport.height === s.height ? {} : { viewport: s }), "setViewport"),
496
501
  highlightComponent: /* @__PURE__ */ a((s, c) => {
497
- const u = (c == null ? void 0 : c.durationMs) ?? ha, { elements: p } = Qe(s);
502
+ const u = (c == null ? void 0 : c.durationMs) ?? ua, { elements: p } = Qe(s);
498
503
  return p.length === 0 ? 0 : (p.forEach((f, y) => {
499
504
  f.classList.add(Ze), setTimeout(() => f.classList.remove(Ze), u), y === 0 && (c != null && c.scrollIntoView) && typeof f.scrollIntoView == "function" && f.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });
500
505
  }), p.length);
501
506
  }, "highlightComponent"),
502
507
  cloneComponent: /* @__PURE__ */ a((s, c) => {
503
- const { selectors: u, elements: p } = Qe(s), f = gn(p, (c == null ? void 0 : c.includeHidden) ?? !1);
508
+ const { selectors: u, elements: p } = Qe(s), f = xn(p, (c == null ? void 0 : c.includeHidden) ?? !1);
504
509
  if (!f) return null;
505
510
  const y = f.getBoundingClientRect(), R = {
506
511
  id: ze(),
@@ -516,7 +521,7 @@ function kn(e = {}) {
516
521
  html: R.html,
517
522
  source: f
518
523
  };
519
- return H.component = /* @__PURE__ */ t(Sn, { entry: H, onHover: /* @__PURE__ */ a((L) => r().highlightComponent(L), "onHover") }), H;
524
+ return H.component = /* @__PURE__ */ t(Cn, { entry: H, onHover: /* @__PURE__ */ a((L) => r().highlightComponent(L), "onHover") }), H;
520
525
  }, "cloneComponent"),
521
526
  createDashboardPad: /* @__PURE__ */ a((s) => {
522
527
  v(s);
@@ -598,34 +603,34 @@ function kn(e = {}) {
598
603
  };
599
604
  });
600
605
  }
601
- a(kn, "createComposerStore");
602
- const Et = Ct(null), ua = /* @__PURE__ */ a(({ client: e, store: n, children: i, ...l }) => {
603
- const o = et(), r = e === void 0 ? o : e, [g] = N(() => n ?? kn({ ...l, client: r }));
606
+ a(In, "createComposerStore");
607
+ const Et = wt(null), ma = /* @__PURE__ */ a(({ client: e, store: n, children: i, ...l }) => {
608
+ const o = et(), r = e === void 0 ? o : e, [g] = N(() => n ?? In({ ...l, client: r }));
604
609
  return q(() => {
605
610
  g.getState()._client !== r && g.getState().setClient(r);
606
611
  }, [g, r]), /* @__PURE__ */ t(Et.Provider, { value: g, children: i });
607
612
  }, "ComposerProvider");
608
613
  function he() {
609
- const e = Ae(Et);
614
+ const e = Ee(Et);
610
615
  if (!e)
611
616
  throw new Error("[@aintela/bi] No composer store in scope. Wrap the composer surface in <ComposerProvider>.");
612
617
  return e;
613
618
  }
614
619
  a(he, "useComposerStore");
615
- function ma() {
616
- return Ae(Et);
620
+ function fa() {
621
+ return Ee(Et);
617
622
  }
618
- a(ma, "useComposerStoreOptional");
623
+ a(fa, "useComposerStoreOptional");
619
624
  function B(e) {
620
625
  const n = he();
621
- return en(n, e ?? ((i) => i));
626
+ return tn(n, e ?? ((i) => i));
622
627
  }
623
628
  a(B, "useComposer");
624
- function In() {
629
+ function zn() {
625
630
  const e = he();
626
- return en(
631
+ return tn(
627
632
  e,
628
- si((n) => ({
633
+ di((n) => ({
629
634
  highlightComponent: n.highlightComponent,
630
635
  cloneComponent: n.cloneComponent,
631
636
  createDashboardPad: n.createDashboardPad,
@@ -636,8 +641,8 @@ function In() {
636
641
  }))
637
642
  );
638
643
  }
639
- a(In, "useComposerEnvironment");
640
- function fa(e) {
644
+ a(zn, "useComposerEnvironment");
645
+ function ga(e) {
641
646
  const n = e.getState();
642
647
  return {
643
648
  highlightComponent: n.highlightComponent,
@@ -649,16 +654,16 @@ function fa(e) {
649
654
  dismissGuide: n.dismissGuide
650
655
  };
651
656
  }
652
- a(fa, "environmentFromStore");
653
- const zn = {
654
- Generic: Tt,
655
- Métrica: on,
656
- Tabela: an,
657
- Gráfico: ut,
658
- Mapa: pi,
659
- Árvore: nn,
660
- Medidor: tn
661
- }, On = {
657
+ a(ga, "environmentFromStore");
658
+ const On = {
659
+ Generic: kt,
660
+ Métrica: rn,
661
+ Tabela: on,
662
+ Gráfico: mt,
663
+ Mapa: hi,
664
+ Árvore: an,
665
+ Medidor: nn
666
+ }, Pn = {
662
667
  Generic: "info",
663
668
  Métrica: "kpi",
664
669
  Tabela: "table",
@@ -666,28 +671,28 @@ const zn = {
666
671
  Mapa: "map",
667
672
  Árvore: "chart",
668
673
  Medidor: "chart"
669
- }, Pn = {
670
- Generic: Tt,
671
- MetricComparison: on,
672
- TableAuto: an,
673
- TableBars: zi,
674
- TableHeatmap: Ii,
675
- TableLarge: ki,
676
- ChartAuto: ut,
674
+ }, $n = {
675
+ Generic: kt,
676
+ MetricComparison: rn,
677
+ TableAuto: on,
678
+ TableBars: Oi,
679
+ TableHeatmap: zi,
680
+ TableLarge: Ii,
681
+ ChartAuto: mt,
677
682
  ChartLine: Di,
678
- ChartBarH: Ti,
679
- ChartBarV: ut,
680
- ChartArea: wi,
681
- ChartStackedArea: Ci,
682
- ChartStackedBar: Si,
683
- ChartCombo: vi,
684
- ChartPie: bi,
685
- Scatter: yi,
686
- ChartDonut: xi,
687
- MapBubbles: gi,
688
- MapConnections: fi,
689
- Treemap: nn,
690
- Gauge: tn
683
+ ChartBarH: ki,
684
+ ChartBarV: mt,
685
+ ChartArea: Ti,
686
+ ChartStackedArea: wi,
687
+ ChartStackedBar: Ci,
688
+ ChartCombo: Si,
689
+ ChartPie: vi,
690
+ Scatter: bi,
691
+ ChartDonut: yi,
692
+ MapBubbles: xi,
693
+ MapConnections: gi,
694
+ Treemap: an,
695
+ Gauge: nn
691
696
  }, En = {
692
697
  Generic: "DashboardOutlined",
693
698
  MetricComparison: "TagOutlined",
@@ -710,16 +715,16 @@ const zn = {
710
715
  MapConnections: "TimelineOutlined",
711
716
  Treemap: "GridViewOutlined",
712
717
  Gauge: "SpeedOutlined"
713
- }, $n = {
714
- DateRangePicker: mi,
715
- DatePicker: ui,
716
- AutoComplete: hi
717
718
  }, An = {
718
- category: zn,
719
- specificType: Pn,
720
- filterType: $n
721
- }, vt = Ct(An), ga = /* @__PURE__ */ a(({ icons: e, children: n }) => {
722
- const i = Ae(vt), l = ve(
719
+ DateRangePicker: fi,
720
+ DatePicker: mi,
721
+ AutoComplete: ui
722
+ }, Mn = {
723
+ category: On,
724
+ specificType: $n,
725
+ filterType: An
726
+ }, St = wt(Mn), xa = /* @__PURE__ */ a(({ icons: e, children: n }) => {
727
+ const i = Ee(St), l = Se(
723
728
  () => ({
724
729
  category: { ...i.category, ...e.category ?? {} },
725
730
  specificType: { ...i.specificType, ...e.specificType ?? {} },
@@ -727,14 +732,14 @@ const zn = {
727
732
  }),
728
733
  [i, e]
729
734
  );
730
- return /* @__PURE__ */ t(vt.Provider, { value: l, children: n });
735
+ return /* @__PURE__ */ t(St.Provider, { value: l, children: n });
731
736
  }, "CardTypeIconsProvider");
732
- function Me() {
733
- return Ae(vt);
737
+ function Ae() {
738
+ return Ee(St);
734
739
  }
735
- a(Me, "useCardTypeIcons");
736
- const xa = 60, ya = it(we);
737
- function ba(e) {
740
+ a(Ae, "useCardTypeIcons");
741
+ const ya = 60, ba = at(we);
742
+ function va(e) {
738
743
  const [n, i] = N(0);
739
744
  return q(() => {
740
745
  const l = e.current;
@@ -745,38 +750,38 @@ function ba(e) {
745
750
  return r.observe(l), () => r.disconnect();
746
751
  }, [e]), n;
747
752
  }
748
- a(ba, "useElementHeight");
749
- const $t = /* @__PURE__ */ a((e) => {
753
+ a(va, "useElementHeight");
754
+ const At = /* @__PURE__ */ a((e) => {
750
755
  var F;
751
- const n = Me(), [i, l] = N(e.cellConfig.name ?? "[Card Name]"), [o, r] = N(e.cellConfig.actionDescription ?? "[Card Description]"), [g, h] = N(!1), [x, d] = N(e.cellConfig), [v, s] = N(!1), [c, u] = N(!1), p = ee(null), f = ee(null), y = ee(null), R = ba(y), H = e.cellConfig.specificType ?? "Generic", L = e.cellConfig.category ?? "Generic", P = n.specificType[H] ?? n.specificType.Generic;
756
+ const n = Ae(), [i, l] = N(e.cellConfig.name ?? "[Card Name]"), [o, r] = N(e.cellConfig.actionDescription ?? "[Card Description]"), [g, h] = N(!1), [x, d] = N(e.cellConfig), [v, s] = N(!1), [c, u] = N(!1), p = ee(null), f = ee(null), y = ee(null), R = va(y), H = e.cellConfig.specificType ?? "Generic", L = e.cellConfig.category ?? "Generic", P = n.specificType[H] ?? n.specificType.Generic;
752
757
  q(() => {
753
758
  d(e.cellConfig);
754
759
  }, [e.cellConfig]), q(() => {
755
- const D = setTimeout(() => {
760
+ const k = setTimeout(() => {
756
761
  if (!p.current) return;
757
762
  let z = p.current.getElementsByTagName("input").item(0);
758
763
  z || (z = p.current.getElementsByTagName("textarea").item(0)), z && (z.focus(), z.selectionStart = 0, z.selectionEnd = z.value.length);
759
764
  }, 50);
760
- return () => clearTimeout(D);
765
+ return () => clearTimeout(k);
761
766
  }, [g, v]);
762
- const _ = /* @__PURE__ */ a((D) => {
763
- (!D.shiftKey && D.key === "Enter" || D.key === "Escape") && (s(!1), h(!1), e.onDataEdit(x));
764
- }, "handleKeyPress"), $ = /* @__PURE__ */ a((D, z) => {
767
+ const _ = /* @__PURE__ */ a((k) => {
768
+ (!k.shiftKey && k.key === "Enter" || k.key === "Escape") && (s(!1), h(!1), e.onDataEdit(x));
769
+ }, "handleKeyPress"), E = /* @__PURE__ */ a((k, z) => {
765
770
  const I = z.target.value;
766
- if (D === l && $e(I).length > xa) return;
767
- D(I);
771
+ if (k === l && Ne(I).length > ya) return;
772
+ k(I);
768
773
  const U = { ...e.cellConfig };
769
- D === l ? U.name = I : U.actionDescription = I, d(U);
770
- }, "handleChange"), V = /* @__PURE__ */ a((D, z) => {
774
+ k === l ? U.name = I : U.actionDescription = I, d(U);
775
+ }, "handleChange"), V = /* @__PURE__ */ a((k, z) => {
771
776
  u(!1);
772
- const I = { ...e.cellConfig, category: D, specificType: z };
773
- I.muiIconName = En[z], I.color = On[D];
774
- const U = Oe[D];
777
+ const I = { ...e.cellConfig, category: k, specificType: z };
778
+ I.muiIconName = En[z], I.color = Pn[k];
779
+ const U = Oe[k];
775
780
  (!I.name || I.name.startsWith("[Card") || Object.values(Oe).some((J) => {
776
781
  var Q;
777
782
  return (Q = I.name) == null ? void 0 : Q.match(new RegExp(`^${J}\\d+$`));
778
783
  })) && (I.name = U, l(U)), e.onDataEdit(I);
779
- }, "handleTypeChange"), K = (F = e.todoItem) == null ? void 0 : F.status, M = { onMouseDown: /* @__PURE__ */ a((D) => D.stopPropagation(), "onMouseDown"), onTouchStart: /* @__PURE__ */ a((D) => D.stopPropagation(), "onTouchStart") }, w = e.renderDescription ?? ((D) => /* @__PURE__ */ t("span", { style: { whiteSpace: "pre-wrap" }, children: D }));
784
+ }, "handleTypeChange"), K = (F = e.todoItem) == null ? void 0 : F.status, M = { onMouseDown: /* @__PURE__ */ a((k) => k.stopPropagation(), "onMouseDown"), onTouchStart: /* @__PURE__ */ a((k) => k.stopPropagation(), "onTouchStart") }, w = e.renderDescription ?? ((k) => /* @__PURE__ */ t("span", { style: { whiteSpace: "pre-wrap" }, children: k }));
780
785
  return /* @__PURE__ */ b(
781
786
  j,
782
787
  {
@@ -807,13 +812,13 @@ const $t = /* @__PURE__ */ a((e) => {
807
812
  }
808
813
  ),
809
814
  /* @__PURE__ */ t(j, { sx: { position: "absolute", top: "15px", right: "-5px", display: "flex", gap: 0, zIndex: 2 }, children: /* @__PURE__ */ t(se, { ...M, children: /* @__PURE__ */ t(Pe, { size: "small", onClick: /* @__PURE__ */ a(() => {
810
- var D;
811
- return (D = e.onDelete) == null ? void 0 : D.call(e, e.cellConfig.i);
812
- }, "onClick"), "aria-label": "Remover card", children: /* @__PURE__ */ t(rn, { fontSize: "small" }) }) }) }),
815
+ var k;
816
+ return (k = e.onDelete) == null ? void 0 : k.call(e, e.cellConfig.i);
817
+ }, "onClick"), "aria-label": "Remover card", children: /* @__PURE__ */ t(ln, { fontSize: "small" }) }) }) }),
813
818
  e.todoItem && e.turnOpen && /* @__PURE__ */ b(
814
819
  j,
815
820
  {
816
- sx: /* @__PURE__ */ a((D) => ({
821
+ sx: /* @__PURE__ */ a((k) => ({
817
822
  position: "absolute",
818
823
  display: "flex",
819
824
  alignItems: "center",
@@ -825,11 +830,11 @@ const $t = /* @__PURE__ */ a((e) => {
825
830
  gap: 2,
826
831
  py: 0.4,
827
832
  borderRadius: "10px",
828
- backgroundColor: Ce(D.palette.common.black, 0.4),
833
+ backgroundColor: ve(k.palette.common.black, 0.4),
829
834
  opacity: K == "completed" ? 0.6 : 1
830
835
  }), "sx"),
831
836
  children: [
832
- /* @__PURE__ */ t(j, { sx: { mt: "1px", flexShrink: 0, color: K == "completed" ? "success.main" : K === "in_progress" ? "primary.main" : "text.disabled" }, children: K == "completed" ? /* @__PURE__ */ t(Oi, { sx: { fontSize: "0.95rem" } }) : K === "in_progress" ? /* @__PURE__ */ t(Pi, { sx: { fontSize: "0.95rem" } }) : /* @__PURE__ */ t(ft, { size: 20, sx: { fontSize: "0.95rem" } }) }),
837
+ /* @__PURE__ */ t(j, { sx: { mt: "1px", flexShrink: 0, color: K == "completed" ? "success.main" : K === "in_progress" ? "primary.main" : "text.disabled" }, children: K == "completed" ? /* @__PURE__ */ t(Pi, { sx: { fontSize: "0.95rem" } }) : K === "in_progress" ? /* @__PURE__ */ t($i, { sx: { fontSize: "0.95rem" } }) : /* @__PURE__ */ t(gt, { size: 20, sx: { fontSize: "0.95rem" } }) }),
833
838
  /* @__PURE__ */ b(j, { sx: { textAlign: "left" }, children: [
834
839
  /* @__PURE__ */ t(ie, { variant: "caption", sx: { display: "block", fontSize: "0.78rem", lineHeight: 1.3, textDecoration: K === "completed" ? "line-through" : "none" }, children: e.todoItem.label }),
835
840
  e.todoItem.detail && /* @__PURE__ */ t(ie, { variant: "caption", sx: { display: "block", fontSize: "0.7rem", color: "text.secondary", lineHeight: 1.3 }, children: e.todoItem.detail })
@@ -837,7 +842,7 @@ const $t = /* @__PURE__ */ a((e) => {
837
842
  ]
838
843
  }
839
844
  ),
840
- /* @__PURE__ */ t(Ve, { open: c, anchorEl: f.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: D }) => /* @__PURE__ */ t(je, { ...D, children: /* @__PURE__ */ t(Fe, { elevation: 8, sx: { maxHeight: 380, overflow: "auto", minWidth: 240 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => u(!1), "onClickAway"), children: /* @__PURE__ */ t(gt, { dense: !0, children: Object.entries(ya).map(([z, I], U) => {
845
+ /* @__PURE__ */ t(Ve, { open: c, anchorEl: f.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: k }) => /* @__PURE__ */ t(je, { ...k, children: /* @__PURE__ */ t(_e, { elevation: 8, sx: { maxHeight: 380, overflow: "auto", minWidth: 240 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => u(!1), "onClickAway"), children: /* @__PURE__ */ t(xt, { dense: !0, children: Object.entries(ba).map(([z, I], U) => {
841
846
  const J = n.category[z];
842
847
  return /* @__PURE__ */ b(j, { children: [
843
848
  U > 0 && /* @__PURE__ */ t(Ke, {}),
@@ -847,7 +852,7 @@ const $t = /* @__PURE__ */ a((e) => {
847
852
  ] }),
848
853
  I.map((Q) => {
849
854
  const ne = n.specificType[Q.specificType];
850
- return /* @__PURE__ */ b(Ee, { selected: Q.specificType === H, onClick: /* @__PURE__ */ a(() => V(Q.category, Q.specificType), "onClick"), children: [
855
+ return /* @__PURE__ */ b($e, { selected: Q.specificType === H, onClick: /* @__PURE__ */ a(() => V(Q.category, Q.specificType), "onClick"), children: [
851
856
  /* @__PURE__ */ t(qe, { children: /* @__PURE__ */ t(ne, { fontSize: "small" }) }),
852
857
  /* @__PURE__ */ t(Ye, { children: Q.label })
853
858
  ] }, Q.specificType);
@@ -861,7 +866,7 @@ const $t = /* @__PURE__ */ a((e) => {
861
866
  ...M,
862
867
  ref: f,
863
868
  size: "small",
864
- onClick: /* @__PURE__ */ a(() => u((D) => !D), "onClick"),
869
+ onClick: /* @__PURE__ */ a(() => u((k) => !k), "onClick"),
865
870
  title: `Tipo: ${L} / ${H}`,
866
871
  sx: { color: "primary.main", mr: 0 },
867
872
  children: /* @__PURE__ */ t(P, { fontSize: "small" })
@@ -879,20 +884,20 @@ const $t = /* @__PURE__ */ a((e) => {
879
884
  }
880
885
  ),
881
886
  g && /* @__PURE__ */ t(
882
- Ne,
887
+ Fe,
883
888
  {
884
889
  size: "small",
885
890
  ref: p,
886
891
  ...M,
887
- onChange: /* @__PURE__ */ a((D) => $(l, D), "onChange"),
888
- onBlur: /* @__PURE__ */ a((D) => $(l, D), "onBlur"),
892
+ onChange: /* @__PURE__ */ a((k) => E(l, k), "onChange"),
893
+ onBlur: /* @__PURE__ */ a((k) => E(l, k), "onBlur"),
889
894
  onKeyDown: _,
890
895
  value: i,
891
- sx: /* @__PURE__ */ a((D) => ({
896
+ sx: /* @__PURE__ */ a((k) => ({
892
897
  fontSize: "0.75rem",
893
898
  width: "82%",
894
899
  "& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline": { border: "0px" },
895
- "& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": { border: "0px", pl: 3, p: 0, backgroundColor: Ce(D.palette.text.primary, 0.08) }
900
+ "& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": { border: "0px", pl: 3, p: 0, backgroundColor: ve(k.palette.text.primary, 0.08) }
896
901
  }), "sx"),
897
902
  slotProps: {
898
903
  root: { style: { padding: "2px 0px 0px 0px", border: "0px" } },
@@ -914,7 +919,7 @@ const $t = /* @__PURE__ */ a((e) => {
914
919
  }
915
920
  ),
916
921
  v && /* @__PURE__ */ t(
917
- Ne,
922
+ Fe,
918
923
  {
919
924
  slotProps: {
920
925
  root: { style: { padding: "0px", border: "0px" } },
@@ -922,17 +927,17 @@ const $t = /* @__PURE__ */ a((e) => {
922
927
  },
923
928
  multiline: !0,
924
929
  ref: p,
925
- sx: /* @__PURE__ */ a((D) => ({
930
+ sx: /* @__PURE__ */ a((k) => ({
926
931
  minHeight: "100%",
927
932
  alignContent: "start",
928
933
  width: "92%",
929
934
  "& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline": { border: "0px" },
930
- "& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": { border: "0px", backgroundColor: Ce(D.palette.text.primary, 0.08) }
935
+ "& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": { border: "0px", backgroundColor: ve(k.palette.text.primary, 0.08) }
931
936
  }), "sx"),
932
- onChange: /* @__PURE__ */ a((D) => {
933
- D.stopPropagation(), $(r, D);
937
+ onChange: /* @__PURE__ */ a((k) => {
938
+ k.stopPropagation(), E(r, k);
934
939
  }, "onChange"),
935
- onBlur: /* @__PURE__ */ a((D) => $(r, D), "onBlur"),
940
+ onBlur: /* @__PURE__ */ a((k) => E(r, k), "onBlur"),
936
941
  onKeyDown: _,
937
942
  value: o
938
943
  }
@@ -941,8 +946,8 @@ const $t = /* @__PURE__ */ a((e) => {
941
946
  ]
942
947
  }
943
948
  );
944
- }, "CardSketch"), va = $t, At = /* @__PURE__ */ a(({ filter: e, onEdit: n, onDelete: i }) => {
945
- const [l, o] = N(!1), [r, g] = N(e.name), h = ee(null), x = Me().filterType[e.filterType];
949
+ }, "CardSketch"), Sa = At, Mt = /* @__PURE__ */ a(({ filter: e, onEdit: n, onDelete: i }) => {
950
+ const [l, o] = N(!1), [r, g] = N(e.name), h = ee(null), x = Ae().filterType[e.filterType];
946
951
  q(() => {
947
952
  l && h.current && (h.current.focus(), h.current.select());
948
953
  }, [l]), q(() => {
@@ -978,7 +983,7 @@ const $t = /* @__PURE__ */ a((e) => {
978
983
  children: [
979
984
  /* @__PURE__ */ t(x, { sx: { fontSize: 16, color: "primary.main", flexShrink: 0 } }),
980
985
  l ? /* @__PURE__ */ t(
981
- Ne,
986
+ Fe,
982
987
  {
983
988
  inputRef: h,
984
989
  value: r,
@@ -1013,7 +1018,7 @@ const $t = /* @__PURE__ */ a((e) => {
1013
1018
  e.filterType !== "AutoComplete" && /* @__PURE__ */ t(Ie, { title: e.mandatory ? "Mandatory filter" : "Optional filter", arrow: !0, children: /* @__PURE__ */ b(j, { sx: { display: "inline-flex", alignItems: "center", gap: 0 }, children: [
1014
1019
  /* @__PURE__ */ t(ie, { variant: "caption", sx: { fontSize: "0.6rem", color: "text.secondary", minWidth: "55px", whiteSpace: "nowrap" }, children: e.mandatory ? "Obrigatório" : "Opcional" }),
1015
1020
  /* @__PURE__ */ t(
1016
- xt,
1021
+ yt,
1017
1022
  {
1018
1023
  size: "small",
1019
1024
  checked: e.mandatory,
@@ -1025,7 +1030,7 @@ const $t = /* @__PURE__ */ a((e) => {
1025
1030
  e.filterType === "AutoComplete" && /* @__PURE__ */ t(Ie, { title: e.multipleSelection ? "Multiple selection" : "Single selection", arrow: !0, children: /* @__PURE__ */ b(j, { sx: { display: "inline-flex", alignItems: "center", gap: 0 }, children: [
1026
1031
  /* @__PURE__ */ t(ie, { variant: "caption", sx: { fontSize: "0.6rem", color: "text.secondary", whiteSpace: "wrap", minWidth: "43px" }, children: e.multipleSelection ? "Multiple" : "Single" }),
1027
1032
  /* @__PURE__ */ t(
1028
- xt,
1033
+ yt,
1029
1034
  {
1030
1035
  size: "small",
1031
1036
  checked: e.multipleSelection ?? !1,
@@ -1034,7 +1039,7 @@ const $t = /* @__PURE__ */ a((e) => {
1034
1039
  }
1035
1040
  )
1036
1041
  ] }) }),
1037
- /* @__PURE__ */ t(Pe, { size: "small", onClick: /* @__PURE__ */ a(() => i(e.i), "onClick"), sx: { p: 0.2, ml: "auto" }, "aria-label": "Remover filtro", children: /* @__PURE__ */ t(rn, { sx: { fontSize: 14 } }) })
1042
+ /* @__PURE__ */ t(Pe, { size: "small", onClick: /* @__PURE__ */ a(() => i(e.i), "onClick"), sx: { p: 0.2, ml: "auto" }, "aria-label": "Remover filtro", children: /* @__PURE__ */ t(ln, { sx: { fontSize: 14 } }) })
1038
1043
  ]
1039
1044
  }
1040
1045
  );
@@ -1061,7 +1066,7 @@ const $t = /* @__PURE__ */ a((e) => {
1061
1066
  width: "100%"
1062
1067
  }), "sx"),
1063
1068
  children: n ? /* @__PURE__ */ t(
1064
- Ne,
1069
+ Fe,
1065
1070
  {
1066
1071
  inputRef: r,
1067
1072
  value: l,
@@ -1113,7 +1118,7 @@ const $t = /* @__PURE__ */ a((e) => {
1113
1118
  )
1114
1119
  }
1115
1120
  );
1116
- }, "TitleSketch"), Sa = Ge, Ca = Ge, wa = { Large: 4, Desktop: 4, Tablet: 4, Mobile: 4 }, Ta = { Large: 12, Desktop: 12, Tablet: 12, Mobile: 12 }, ct = 6;
1121
+ }, "TitleSketch"), Ca = Ge, wa = Ge, Ta = { Large: 4, Desktop: 4, Tablet: 4, Mobile: 4 }, ka = { Large: 12, Desktop: 12, Tablet: 12, Mobile: 12 }, pt = 6;
1117
1122
  function Da(e, n, i = 0) {
1118
1123
  const [l, o] = N(i);
1119
1124
  return q(() => {
@@ -1127,79 +1132,79 @@ function Da(e, n, i = 0) {
1127
1132
  }, [e, n]), l;
1128
1133
  }
1129
1134
  a(Da, "useContainerWidth");
1130
- const ka = /* @__PURE__ */ a((e) => {
1135
+ const Ia = /* @__PURE__ */ a((e) => {
1131
1136
  const n = Math.round(Date.now() * Math.pow(10, -6));
1132
- return `${$e(e)}_${n}`;
1133
- }, "makeNameUnique"), ot = wt((e, n) => {
1137
+ return `${nt(e)}_${n}`;
1138
+ }, "makeNameUnique"), rt = Tt((e, n) => {
1134
1139
  const i = he(), l = B((m) => {
1135
- var k;
1136
- return (k = m.dashboardDefinition) == null ? void 0 : k.cards;
1137
- }) ?? Ia, o = B((m) => {
1138
- var k;
1139
- return (k = m.dashboardDefinition) == null ? void 0 : k.filters;
1140
- }) ?? za, r = B((m) => {
1141
- var k;
1142
- return ((k = m.dashboardDefinition) == null ? void 0 : k.name) ?? "";
1140
+ var D;
1141
+ return (D = m.dashboardDefinition) == null ? void 0 : D.cards;
1142
+ }) ?? za, o = B((m) => {
1143
+ var D;
1144
+ return (D = m.dashboardDefinition) == null ? void 0 : D.filters;
1145
+ }) ?? Oa, r = B((m) => {
1146
+ var D;
1147
+ return ((D = m.dashboardDefinition) == null ? void 0 : D.name) ?? "";
1143
1148
  }), g = B((m) => {
1144
- var k;
1145
- return ((k = m.dashboardDefinition) == null ? void 0 : k.layoutType) ?? "Boxed";
1149
+ var D;
1150
+ return ((D = m.dashboardDefinition) == null ? void 0 : D.layoutType) ?? "Boxed";
1146
1151
  }), h = B((m) => {
1147
- var k;
1148
- return (k = m.dashboardDefinition) == null ? void 0 : k.id;
1149
- }), x = B((m) => m.turnOpen), d = B((m) => m.todosByCardKey), [v, s] = N([]), c = ee(null), u = Da(c, e.renderId), [p, f] = N(null), [y, R] = N(0), H = ee({}), L = ee(0), P = ee(void 0), _ = le(), $ = e.zoomLevel ?? 0.8, V = W((m, k) => {
1150
- k && (i.getState().recordSketchChange("dashboard:layoutType", `Set layout type to ${k}`), i.getState().updateDashboard({ layoutType: k }));
1152
+ var D;
1153
+ return (D = m.dashboardDefinition) == null ? void 0 : D.id;
1154
+ }), x = B((m) => m.turnOpen), d = B((m) => m.todosByCardKey), [v, s] = N([]), c = ee(null), u = Da(c, e.renderId), [p, f] = N(null), [y, R] = N(0), H = ee({}), L = ee(0), P = ee(void 0), _ = le(), E = e.zoomLevel ?? 0.8, V = W((m, D) => {
1155
+ D && (i.getState().recordSketchChange("dashboard:layoutType", `Set layout type to ${D}`), i.getState().updateDashboard({ layoutType: D }));
1151
1156
  }, [i]);
1152
1157
  q(() => {
1153
1158
  if (h === P.current || (P.current = h, !h)) return;
1154
- const m = i.getState().dashboardDefinition, k = (m == null ? void 0 : m.cards) ?? [];
1155
- H.current = {}, k.forEach((E) => {
1156
- const G = Oe[E.category ?? "Generic"];
1159
+ const m = i.getState().dashboardDefinition, D = (m == null ? void 0 : m.cards) ?? [];
1160
+ H.current = {}, D.forEach(($) => {
1161
+ const G = Oe[$.category ?? "Generic"];
1157
1162
  H.current[G] = (H.current[G] ?? 0) + 1;
1158
- }), L.current = ((m == null ? void 0 : m.filters) ?? []).length, s(k);
1163
+ }), L.current = ((m == null ? void 0 : m.filters) ?? []).length, s(D);
1159
1164
  }, [h, i]);
1160
1165
  const K = W((m) => {
1161
- const k = Oe[m], E = (H.current[k] ?? 0) + 1;
1162
- return H.current[k] = E, ka(`${k}${E}`);
1163
- }, []), M = W((m, k) => {
1166
+ const D = Oe[m], $ = (H.current[D] ?? 0) + 1;
1167
+ return H.current[D] = $, Ia(`${D}${$}`);
1168
+ }, []), M = W((m, D) => {
1164
1169
  s(m);
1165
- }, []), w = W((m, k, E) => {
1170
+ }, []), w = W((m, D, $) => {
1166
1171
  var pe;
1167
- if (!k || !E) return;
1172
+ if (!D || !$) return;
1168
1173
  const G = ((pe = i.getState().dashboardDefinition) == null ? void 0 : pe.cards) ?? [];
1169
1174
  let Z = !1;
1170
1175
  const te = G.map((xe) => {
1171
- const ye = m.find((ri) => ri.i === xe.i);
1176
+ const ye = m.find((li) => li.i === xe.i);
1172
1177
  return ye && (xe.w !== ye.w || xe.h !== ye.h || xe.x !== ye.x || xe.y !== ye.y) ? (Z = !0, { ...xe, w: ye.w, h: ye.h, x: ye.x, y: ye.y }) : xe;
1173
1178
  });
1174
1179
  if (!Z) return;
1175
- const T = G.find((xe) => xe.i === E.i), O = (T == null ? void 0 : T.name) ?? E.i, ae = k.w !== E.w || k.h !== E.h, fe = k.x !== E.x || k.y !== E.y, Se = `card:${E.i}:layout`;
1176
- ae && fe ? i.getState().recordSketchChange(Se, `Resized and moved card '${O}' to (w:${E.w}, h:${E.h}, x:${E.x}, y:${E.y})`) : ae ? i.getState().recordSketchChange(Se, `Resized card '${O}' to (w:${E.w}, h:${E.h})`) : fe && i.getState().recordSketchChange(Se, `Moved card '${O}' to (x:${E.x}, y:${E.y})`), i.getState().updateDashboard({ cards: te });
1180
+ const T = G.find((xe) => xe.i === $.i), O = (T == null ? void 0 : T.name) ?? $.i, ae = D.w !== $.w || D.h !== $.h, fe = D.x !== $.x || D.y !== $.y, Ce = `card:${$.i}:layout`;
1181
+ ae && fe ? i.getState().recordSketchChange(Ce, `Resized and moved card '${O}' to (w:${$.w}, h:${$.h}, x:${$.x}, y:${$.y})`) : ae ? i.getState().recordSketchChange(Ce, `Resized card '${O}' to (w:${$.w}, h:${$.h})`) : fe && i.getState().recordSketchChange(Ce, `Moved card '${O}' to (x:${$.x}, y:${$.y})`), i.getState().updateDashboard({ cards: te });
1177
1182
  }, [i]), F = W((m) => {
1178
1183
  var G;
1179
- const k = ((G = i.getState().dashboardDefinition) == null ? void 0 : G.cards) ?? [], E = k.find((Z) => Z.i === m);
1180
- i.getState().recordSketchChange(`card:${m}:delete`, `Deleted card '${(E == null ? void 0 : E.name) ?? m}'`), i.getState().updateDashboard({ cards: k.filter((Z) => Z.i !== m) });
1181
- }, [i]), D = W((m = "Generic", k = "Generic") => {
1182
- const E = K(m);
1184
+ const D = ((G = i.getState().dashboardDefinition) == null ? void 0 : G.cards) ?? [], $ = D.find((Z) => Z.i === m);
1185
+ i.getState().recordSketchChange(`card:${m}:delete`, `Deleted card '${($ == null ? void 0 : $.name) ?? m}'`), i.getState().updateDashboard({ cards: D.filter((Z) => Z.i !== m) });
1186
+ }, [i]), k = W((m = "Generic", D = "Generic") => {
1187
+ const $ = K(m);
1183
1188
  return {
1184
- i: $e(E),
1185
- h: ct,
1189
+ i: nt($),
1190
+ h: pt,
1186
1191
  w: y,
1187
1192
  y: 1 / 0,
1188
1193
  x: 0,
1189
1194
  isDraggable: void 0,
1190
1195
  isResizable: !0,
1191
1196
  category: m,
1192
- specificType: k,
1193
- name: E
1197
+ specificType: D,
1198
+ name: $
1194
1199
  };
1195
1200
  }, [y, K]), z = W((m) => {
1196
- const k = m.length === 0 ? "Untitled Dashboard" : m;
1197
- i.getState().recordSketchChange("dashboard:name", `Renamed dashboard to '${k}'`), i.getState().updateDashboard({ name: k });
1201
+ const D = m.length === 0 ? "Untitled Dashboard" : m;
1202
+ i.getState().recordSketchChange("dashboard:name", `Renamed dashboard to '${D}'`), i.getState().updateDashboard({ name: D });
1198
1203
  }, [i]), I = W((m) => {
1199
1204
  var T;
1200
- const k = ((T = i.getState().dashboardDefinition) == null ? void 0 : T.cards) ?? [], E = v.find((O) => O.i === m.i), G = k.find((O) => O.i === m.i), Z = k.map((O) => O.i !== m.i ? O : {
1205
+ const D = ((T = i.getState().dashboardDefinition) == null ? void 0 : T.cards) ?? [], $ = v.find((O) => O.i === m.i), G = D.find((O) => O.i === m.i), Z = D.map((O) => O.i !== m.i ? O : {
1201
1206
  ...O,
1202
- ...E ? { w: E.w, h: E.h, x: E.x, y: E.y } : {},
1207
+ ...$ ? { w: $.w, h: $.h, x: $.x, y: $.y } : {},
1203
1208
  name: m.name,
1204
1209
  actionDescription: m.actionDescription,
1205
1210
  category: m.category,
@@ -1208,50 +1213,50 @@ const ka = /* @__PURE__ */ a((e) => {
1208
1213
  }), te = [];
1209
1214
  G && (G.name !== m.name && te.push(`name → '${m.name}'`), G.actionDescription !== m.actionDescription && te.push("description"), G.category !== m.category && te.push(`category → '${m.category}'`), G.specificType !== m.specificType && te.push(`type → '${m.specificType}'`), G.muiIconName !== m.muiIconName && te.push("icon")), te.length > 0 && i.getState().recordSketchChange(`card:${m.i}:edit`, `Edited card '${(G == null ? void 0 : G.name) ?? m.name}' (${te.join(", ")})`), i.getState().updateDashboard({ cards: Z });
1210
1215
  }, [v, i]), U = W(() => {
1211
- const m = p ? Ta[p] : 10, k = v.length > 0 ? v[v.length - 1] : null;
1212
- let E = 0, G = 0;
1213
- return k && (G = k.y, k.x + k.w > m - y ? (G += 1, E = 0) : E = k.x + k.w), { x: E, y: G };
1214
- }, [p, v, y]), J = W((m, k) => {
1216
+ const m = p ? ka[p] : 10, D = v.length > 0 ? v[v.length - 1] : null;
1217
+ let $ = 0, G = 0;
1218
+ return D && (G = D.y, D.x + D.w > m - y ? (G += 1, $ = 0) : $ = D.x + D.w), { x: $, y: G };
1219
+ }, [p, v, y]), J = W((m, D) => {
1215
1220
  var G;
1216
- const E = ((G = i.getState().dashboardDefinition) == null ? void 0 : G.cards) ?? [];
1217
- i.getState().recordSketchChange(`card:${m.i}:add`, k), i.getState().updateDashboard({ cards: [...E, m] });
1218
- }, [i]), Q = W((m, k) => {
1219
- const E = (m == null ? void 0 : m.category) ?? "Generic", G = (m == null ? void 0 : m.specificType) ?? "Generic", Z = D(E, G);
1220
- Z.actionDescription = m == null ? void 0 : m.description, k && (Z.h = ct, Z.w = y, Z.y = k.y, Z.x = k.x), J(Z, `Added card '${Z.name}' (category: ${E}, type: ${G})`);
1221
- }, [D, y, J]), ne = W(() => {
1221
+ const $ = ((G = i.getState().dashboardDefinition) == null ? void 0 : G.cards) ?? [];
1222
+ i.getState().recordSketchChange(`card:${m.i}:add`, D), i.getState().updateDashboard({ cards: [...$, m] });
1223
+ }, [i]), Q = W((m, D) => {
1224
+ const $ = (m == null ? void 0 : m.category) ?? "Generic", G = (m == null ? void 0 : m.specificType) ?? "Generic", Z = k($, G);
1225
+ Z.actionDescription = m == null ? void 0 : m.description, D && (Z.h = pt, Z.w = y, Z.y = D.y, Z.x = D.x), J(Z, `Added card '${Z.name}' (category: ${$}, type: ${G})`);
1226
+ }, [k, y, J]), ne = W(() => {
1222
1227
  if (y === 0) return;
1223
- const m = D("Generic", "Generic"), k = U();
1224
- m.x = k.x, m.y = k.y, J(m, `Added card '${m.name}'`);
1225
- }, [y, D, U, J]), de = W((m, k, E) => {
1226
- const G = D(m, k), Z = U();
1227
- G.x = Z.x, G.y = Z.y, G.w = y, G.h = ct, J(G, `Added card '${G.name}' (category: ${m}, type: ${k})`);
1228
- }, [y, D, U, J]);
1228
+ const m = k("Generic", "Generic"), D = U();
1229
+ m.x = D.x, m.y = D.y, J(m, `Added card '${m.name}'`);
1230
+ }, [y, k, U, J]), de = W((m, D, $) => {
1231
+ const G = k(m, D), Z = U();
1232
+ G.x = Z.x, G.y = Z.y, G.w = y, G.h = pt, J(G, `Added card '${G.name}' (category: ${m}, type: ${D})`);
1233
+ }, [y, k, U, J]);
1229
1234
  q(() => {
1230
1235
  if (u == 0) return;
1231
1236
  let m = "Desktop";
1232
- u >= 920 && (m = "Large"), u < 920 && (m = "Desktop"), u < 750 && (m = "Tablet"), u < 600 && (m = "Mobile"), f(m), R(wa[m]);
1237
+ u >= 920 && (m = "Large"), u < 920 && (m = "Desktop"), u < 750 && (m = "Tablet"), u < 600 && (m = "Mobile"), f(m), R(Ta[m]);
1233
1238
  }, [u]);
1234
1239
  const me = W((m) => {
1235
1240
  var T;
1236
1241
  L.current += 1;
1237
- const k = `Filter${L.current}`;
1238
- let E = !1;
1239
- m == "DateRangePicker" && (E = !0);
1240
- const G = ze(), Z = { i: G, name: k, filterType: m, mandatory: E, multipleSelection: !0 }, te = ((T = i.getState().dashboardDefinition) == null ? void 0 : T.filters) ?? [];
1242
+ const D = `Filter${L.current}`;
1243
+ let $ = !1;
1244
+ m == "DateRangePicker" && ($ = !0);
1245
+ const G = ze(), Z = { i: G, name: D, filterType: m, mandatory: $, multipleSelection: !0 }, te = ((T = i.getState().dashboardDefinition) == null ? void 0 : T.filters) ?? [];
1241
1246
  i.getState().recordSketchChange(`filter:${G}:add`, `Added filter '${Z.name}' (type: ${m})`), i.getState().updateDashboard({ filters: [...te, Z] });
1242
1247
  }, [i]), ge = W((m) => {
1243
- var E;
1244
- const k = ((E = i.getState().dashboardDefinition) == null ? void 0 : E.filters) ?? [];
1248
+ var $;
1249
+ const D = (($ = i.getState().dashboardDefinition) == null ? void 0 : $.filters) ?? [];
1245
1250
  i.getState().recordSketchChange(
1246
1251
  `filter:${m.i}:edit`,
1247
1252
  `Edited filter '${m.name}' - ${m.mandatory ? "Mandatório" : "Opcional"} - ${m.multipleSelection ? "MultipleSelection" : "SingleValue"}`
1248
- ), i.getState().updateDashboard({ filters: k.map((G) => G.i === m.i ? { ...m } : G) });
1253
+ ), i.getState().updateDashboard({ filters: D.map((G) => G.i === m.i ? { ...m } : G) });
1249
1254
  }, [i]), C = W((m) => {
1250
1255
  var G;
1251
- const k = ((G = i.getState().dashboardDefinition) == null ? void 0 : G.filters) ?? [], E = k.find((Z) => Z.i === m);
1252
- i.getState().recordSketchChange(`filter:${m}:delete`, `Deleted filter '${(E == null ? void 0 : E.name) ?? m}'`), i.getState().updateDashboard({ filters: k.filter((Z) => Z.i !== m) });
1256
+ const D = ((G = i.getState().dashboardDefinition) == null ? void 0 : G.filters) ?? [], $ = D.find((Z) => Z.i === m);
1257
+ i.getState().recordSketchChange(`filter:${m}:delete`, `Deleted filter '${($ == null ? void 0 : $.name) ?? m}'`), i.getState().updateDashboard({ filters: D.filter((Z) => Z.i !== m) });
1253
1258
  }, [i]);
1254
- Qt(n, () => ({ addGenericCell: ne, addTypedCell: de, handleAddFilter: me }), [ne, de, me]);
1259
+ en(n, () => ({ addGenericCell: ne, addTypedCell: de, handleAddFilter: me }), [ne, de, me]);
1255
1260
  const A = /* @__PURE__ */ a((m) => ({ border: m ? "0px" : `1px solid ${_.palette.divider}`, px: 1, py: 0, gap: 0.5, textTransform: "none" }), "toggleSx"), Y = /* @__PURE__ */ a((m) => ({
1256
1261
  fontSize: "0.75rem",
1257
1262
  lineHeight: 1,
@@ -1267,7 +1272,7 @@ const ka = /* @__PURE__ */ a((e) => {
1267
1272
  /* @__PURE__ */ b(j, { sx: { position: "relative", display: "inline-flex", width: "25%", gap: 1, top: -2, justifyContent: "center", alignItems: "center" }, children: [
1268
1273
  /* @__PURE__ */ t(ie, { component: "span", sx: { color: "text.secondary" }, children: "Layout:" }),
1269
1274
  /* @__PURE__ */ b(
1270
- sn,
1275
+ dn,
1271
1276
  {
1272
1277
  value: g,
1273
1278
  exclusive: !0,
@@ -1282,7 +1287,7 @@ const ka = /* @__PURE__ */ a((e) => {
1282
1287
  /* @__PURE__ */ t(ie, { component: "span", sx: Y(g === "Boxed"), children: "Boxed" })
1283
1288
  ] }),
1284
1289
  /* @__PURE__ */ b(Je, { value: "Naked", "data-env-id": "dashboard-pad-layout-naked", sx: A(g === "Naked"), children: [
1285
- /* @__PURE__ */ t($i, { sx: { fontSize: 18 } }),
1290
+ /* @__PURE__ */ t(Ai, { sx: { fontSize: 18 } }),
1286
1291
  /* @__PURE__ */ t(ie, { component: "span", sx: Y(g === "Naked"), children: "Naked" })
1287
1292
  ] })
1288
1293
  ]
@@ -1291,87 +1296,111 @@ const ka = /* @__PURE__ */ a((e) => {
1291
1296
  e.headerExtra
1292
1297
  ] })
1293
1298
  ] }),
1294
- o.length > 0 && !e.hideFiltersInSketch && /* @__PURE__ */ t(j, { sx: { display: "inline-flex", justifyContent: "flex-end", flexWrap: "wrap", gap: 1, pt: 0.5, pb: 0, pr: 1, pl: 1, borderBottom: `1px solid ${_.palette.divider}` }, children: o.map((m) => /* @__PURE__ */ t(At, { filter: m, onEdit: ge, onDelete: C }, m.i)) }),
1295
- /* @__PURE__ */ b("div", { style: { maxHeight: "100%", height: "100%", overflow: "auto" }, children: [
1296
- u !== 0 && l.length > 0 && /* @__PURE__ */ t("div", { style: { display: "inline-flex", flex: 1, alignItems: "center", justifyContent: "center", paddingBottom: e.hideInternalHeader ? "50px" : "80px", overflow: "auto", width: "100%" }, children: /* @__PURE__ */ t(
1297
- Ki,
1298
- {
1299
- rowAwareResize: { defaultOn: !0 },
1300
- onLayoutChange: M,
1301
- onResizeStop: w,
1302
- onDragStop: w,
1303
- onDrop: Q,
1304
- config: {},
1305
- cols: { lg: 10, md: 8, sm: 4, xs: 4, xxs: 4 },
1306
- breakpoints: { lg: 920, md: 600, sm: 400, xs: 400, xxs: 0 },
1307
- rowHeight: 10,
1308
- dragLocked: !1,
1309
- zoomLevel: $,
1310
- responsive: !1,
1311
- maxRows: 200,
1312
- rowMultiplier: 1,
1313
- manualWidth: u,
1314
- layouts: l,
1315
- children: l.map((m) => {
1316
- var k;
1317
- return /* @__PURE__ */ t(
1318
- qi,
1319
- {
1320
- className: "llm-env-target llm-env-card llm-env-card-sketch-wrapper",
1321
- "data-env-id": m.i,
1322
- naked: g == "Naked",
1323
- "data-env-key": m.i,
1324
- "data-env-name": m.name ?? "",
1325
- "data-env-kind": "sketch-card-wrapper",
1326
- children: /* @__PURE__ */ t(
1327
- $t,
1328
- {
1329
- turnOpen: x ?? !1,
1330
- todoItem: (k = d[m.i]) == null ? void 0 : k.todo,
1331
- cellConfig: m,
1332
- onDataEdit: I,
1333
- onDelete: F,
1334
- renderDescription: e.renderDescription
1335
- }
1336
- )
1337
- },
1338
- m.i
1339
- );
1340
- })
1299
+ o.length > 0 && !e.hideFiltersInSketch && /* @__PURE__ */ t(j, { sx: { display: "inline-flex", justifyContent: "flex-end", flexWrap: "wrap", gap: 1, pt: 0.5, pb: 0, pr: 1, pl: 1, borderBottom: `1px solid ${_.palette.divider}` }, children: o.map((m) => /* @__PURE__ */ t(Mt, { filter: m, onEdit: ge, onDelete: C }, m.i)) }),
1300
+ /* @__PURE__ */ b(
1301
+ "div",
1302
+ {
1303
+ style: {
1304
+ maxHeight: "100%",
1305
+ height: "100%",
1306
+ overflow: "auto",
1307
+ backgroundColor: _.palette.action.hover,
1308
+ backgroundImage: `radial-gradient(${ve(_.palette.text.primary, 0.14)} 1px, transparent 1px)`,
1309
+ backgroundSize: "16px 16px",
1310
+ // Half a step, so the first dot is not sliced by the edge.
1311
+ backgroundPosition: "8px 8px",
1312
+ // The canvas is INSET from the container's rounded edge — flush, the dot field ran
1313
+ // straight into the border and the pad read as a textured panel rather than a surface
1314
+ // with something on it.
1315
+ padding: "12px",
1316
+ boxSizing: "border-box"
1341
1317
  },
1342
- h
1343
- ) }),
1344
- u !== 0 && l.length == 0 && /* @__PURE__ */ t(
1345
- j,
1346
- {
1347
- sx: /* @__PURE__ */ a((m) => ({
1348
- background: "transparent",
1349
- border: "none",
1350
- textAlign: "left",
1351
- padding: "6px 0",
1352
- height: "100%",
1353
- color: m.palette.text.secondary,
1354
- fontFamily: m.typography.fontFamily,
1355
- display: "inline-flex",
1356
- width: "100%",
1357
- justifyContent: "center",
1358
- alignItems: "center",
1359
- "&:hover": { color: m.palette.text.primary }
1360
- }), "sx"),
1361
- children: /* @__PURE__ */ b(se, { direction: "row", gap: 1, sx: { "&:hover": { cursor: "pointer" } }, onClick: /* @__PURE__ */ a(() => {
1362
- var m;
1363
- return (m = e.onAddCard) == null ? void 0 : m.call(e);
1364
- }, "onClick"), children: [
1365
- /* @__PURE__ */ t(j, { component: "span", sx: /* @__PURE__ */ a((m) => ({ color: m.palette.text.disabled }), "sx"), children: "↗" }),
1366
- /* @__PURE__ */ t(ie, { sx: /* @__PURE__ */ a((m) => ({ fontSize: 20, fontWeight: 600, color: m.palette.text.primary, margin: 0, lineHeight: 1.2, letterSpacing: -0.4 }), "sx"), children: "Clique aqui para adicionar um novo card" })
1367
- ] })
1368
- }
1369
- )
1370
- ] })
1318
+ children: [
1319
+ u !== 0 && l.length > 0 && /* @__PURE__ */ t("div", { style: { display: "inline-flex", flex: 1, alignItems: "center", justifyContent: "center", paddingBottom: e.hideInternalHeader ? "50px" : "80px", overflow: "auto", width: "100%" }, children: /* @__PURE__ */ t(
1320
+ qi,
1321
+ {
1322
+ rowAwareResize: { defaultOn: !0 },
1323
+ onLayoutChange: M,
1324
+ onResizeStop: w,
1325
+ onDragStop: w,
1326
+ onDrop: Q,
1327
+ config: {},
1328
+ cols: { lg: 10, md: 8, sm: 4, xs: 4, xxs: 4 },
1329
+ breakpoints: { lg: 920, md: 600, sm: 400, xs: 400, xxs: 0 },
1330
+ rowHeight: 10,
1331
+ dragLocked: !1,
1332
+ zoomLevel: E,
1333
+ responsive: !1,
1334
+ maxRows: 200,
1335
+ rowMultiplier: 1,
1336
+ manualWidth: u,
1337
+ layouts: l,
1338
+ children: l.map((m) => {
1339
+ var D;
1340
+ return /* @__PURE__ */ t(
1341
+ Yi,
1342
+ {
1343
+ className: "llm-env-target llm-env-card llm-env-card-sketch-wrapper",
1344
+ "data-env-id": m.i,
1345
+ naked: g == "Naked",
1346
+ "data-env-key": m.i,
1347
+ "data-env-name": m.name ?? "",
1348
+ "data-env-kind": "sketch-card-wrapper",
1349
+ children: /* @__PURE__ */ t(
1350
+ At,
1351
+ {
1352
+ turnOpen: x ?? !1,
1353
+ todoItem: (D = d[m.i]) == null ? void 0 : D.todo,
1354
+ cellConfig: m,
1355
+ onDataEdit: I,
1356
+ onDelete: F,
1357
+ renderDescription: e.renderDescription
1358
+ }
1359
+ )
1360
+ },
1361
+ m.i
1362
+ );
1363
+ })
1364
+ },
1365
+ h
1366
+ ) }),
1367
+ u !== 0 && l.length == 0 && /* @__PURE__ */ t(
1368
+ j,
1369
+ {
1370
+ sx: /* @__PURE__ */ a((m) => ({
1371
+ background: "transparent",
1372
+ border: "none",
1373
+ textAlign: "left",
1374
+ // NOT `height: '100%'` with `alignItems: 'center'`, which is what it was: the
1375
+ // canvas fills the pad, so centring floated the call to action in the middle of a
1376
+ // tall empty field with a dead band above it. An empty pad should say "start here"
1377
+ // at the top, near the controls, not halfway down.
1378
+ paddingTop: "28px",
1379
+ paddingBottom: "6px",
1380
+ color: m.palette.text.secondary,
1381
+ fontFamily: m.typography.fontFamily,
1382
+ display: "inline-flex",
1383
+ width: "100%",
1384
+ justifyContent: "center",
1385
+ alignItems: "flex-start",
1386
+ "&:hover": { color: m.palette.text.primary }
1387
+ }), "sx"),
1388
+ children: /* @__PURE__ */ b(se, { direction: "row", gap: 1, sx: { "&:hover": { cursor: "pointer" } }, onClick: /* @__PURE__ */ a(() => {
1389
+ var m;
1390
+ return (m = e.onAddCard) == null ? void 0 : m.call(e);
1391
+ }, "onClick"), children: [
1392
+ /* @__PURE__ */ t(j, { component: "span", sx: /* @__PURE__ */ a((m) => ({ color: m.palette.text.disabled }), "sx"), children: "↗" }),
1393
+ /* @__PURE__ */ t(ie, { sx: /* @__PURE__ */ a((m) => ({ fontSize: 20, fontWeight: 600, color: m.palette.text.primary, margin: 0, lineHeight: 1.2, letterSpacing: -0.4 }), "sx"), children: "Clique aqui para adicionar um novo card" })
1394
+ ] })
1395
+ }
1396
+ )
1397
+ ]
1398
+ }
1399
+ )
1371
1400
  ] });
1372
1401
  });
1373
- ot.displayName = "DashboardPadSketch";
1374
- const Ia = [], za = [], De = /* @__PURE__ */ a((e) => {
1402
+ rt.displayName = "DashboardPadSketch";
1403
+ const za = [], Oa = [], ke = /* @__PURE__ */ a((e) => {
1375
1404
  const n = le(), i = e.maxWidth ?? 30;
1376
1405
  return /* @__PURE__ */ t(
1377
1406
  j,
@@ -1426,8 +1455,8 @@ const Ia = [], za = [], De = /* @__PURE__ */ a((e) => {
1426
1455
  ] })
1427
1456
  }
1428
1457
  );
1429
- }, "HoverButton"), Oa = it(we);
1430
- function Pa(e, n, i) {
1458
+ }, "HoverButton"), Pa = at(we);
1459
+ function $a(e, n, i) {
1431
1460
  const l = document.createElement("div");
1432
1461
  return l.style.cssText = [
1433
1462
  "display:flex",
@@ -1449,9 +1478,9 @@ function Pa(e, n, i) {
1449
1478
  "pointer-events:none"
1450
1479
  ].join(";"), l.innerHTML = `${n}<span>${i}</span>`, document.body.appendChild(l), l;
1451
1480
  }
1452
- a(Pa, "createDragPreview");
1453
- const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }) => {
1454
- const l = le(), o = Me(), [r, g] = N(!1), [h, x] = N(!1), d = ee(null), v = ee(null), s = ee(null);
1481
+ a($a, "createDragPreview");
1482
+ const Rn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }) => {
1483
+ const l = le(), o = Ae(), [r, g] = N(!1), [h, x] = N(!1), d = ee(null), v = ee(null), s = ee(null);
1455
1484
  q(() => () => {
1456
1485
  var f;
1457
1486
  return (f = s.current) == null ? void 0 : f.remove();
@@ -1462,7 +1491,7 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1462
1491
  }, []), u = /* @__PURE__ */ a((f, y) => {
1463
1492
  const R = y ? { category: y.category, specificType: y.specificType, label: y.label } : { category: "Generic", specificType: "Generic", label: "Generic" };
1464
1493
  f.dataTransfer.setData("text/json", JSON.stringify(R)), f.dataTransfer.effectAllowed = "copy", c();
1465
- const H = f.currentTarget.querySelector("svg"), L = H ? H.outerHTML.replace(/width="[^"]*"/, 'width="18"').replace(/height="[^"]*"/, 'height="18"') : "", P = Pa(l, L, (y == null ? void 0 : y.label) ?? "Generic");
1494
+ const H = f.currentTarget.querySelector("svg"), L = H ? H.outerHTML.replace(/width="[^"]*"/, 'width="18"').replace(/height="[^"]*"/, 'height="18"') : "", P = $a(l, L, (y == null ? void 0 : y.label) ?? "Generic");
1466
1495
  s.current = P, f.dataTransfer.setDragImage(P, 0, 0);
1467
1496
  }, "handleDragStart"), p = /* @__PURE__ */ a((f) => {
1468
1497
  n(f.category, f.specificType, f.label), g(!1);
@@ -1489,19 +1518,19 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1489
1518
  "&:hover": { bgcolor: "action.hover" },
1490
1519
  "&:active": { cursor: "grabbing" }
1491
1520
  },
1492
- children: /* @__PURE__ */ t(Ai, { sx: { fontSize: 16 }, color: "secondary" })
1521
+ children: /* @__PURE__ */ t(Mi, { sx: { fontSize: 16 }, color: "secondary" })
1493
1522
  }
1494
1523
  ) }),
1495
1524
  /* @__PURE__ */ b(j, { sx: { position: "relative", display: "inline-flex", alignItems: "center" }, children: [
1496
1525
  /* @__PURE__ */ t(Ie, { title: "Add card", children: /* @__PURE__ */ t(
1497
- Ft,
1526
+ Nt,
1498
1527
  {
1499
1528
  className: "action-btn llm-env-target llm-env-dashboard-action",
1500
1529
  "data-env-id": "dashboardpad-add-card",
1501
1530
  variant: "outlined",
1502
1531
  size: "small",
1503
1532
  color: "secondary",
1504
- startIcon: /* @__PURE__ */ t(Mi, { sx: { m: 0.2, p: 0 } }),
1533
+ startIcon: /* @__PURE__ */ t(Ri, { sx: { m: 0.2, p: 0 } }),
1505
1534
  onClick: e,
1506
1535
  sx: { height: 28, fontSize: "0.7rem", pr: 1, gap: 0, minWidth: "80px", textTransform: "none", justifyContent: "left" },
1507
1536
  children: "Card"
@@ -1517,11 +1546,11 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1517
1546
  onClick: /* @__PURE__ */ a(() => g((f) => !f), "onClick"),
1518
1547
  sx: { position: "absolute", right: 0, height: 28, width: 20 },
1519
1548
  "aria-label": "Tipos de card",
1520
- children: /* @__PURE__ */ t(mt, { color: "secondary", sx: { fontSize: 18, mr: 0.5 } })
1549
+ children: /* @__PURE__ */ t(ft, { color: "secondary", sx: { fontSize: 18, mr: 0.5 } })
1521
1550
  }
1522
1551
  )
1523
1552
  ] }),
1524
- /* @__PURE__ */ t(Ve, { open: r, anchorEl: d.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: f }) => /* @__PURE__ */ t(je, { ...f, children: /* @__PURE__ */ t(Fe, { elevation: 8, sx: { maxHeight: 420, overflow: "auto", minWidth: 260 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => g(!1), "onClickAway"), children: /* @__PURE__ */ t(gt, { dense: !0, children: Object.entries(Oa).map(([y, R], H) => {
1553
+ /* @__PURE__ */ t(Ve, { open: r, anchorEl: d.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: f }) => /* @__PURE__ */ t(je, { ...f, children: /* @__PURE__ */ t(_e, { elevation: 8, sx: { maxHeight: 420, overflow: "auto", minWidth: 260 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => g(!1), "onClickAway"), children: /* @__PURE__ */ t(xt, { dense: !0, children: Object.entries(Pa).map(([y, R], H) => {
1525
1554
  const L = o.category[y];
1526
1555
  return /* @__PURE__ */ b(j, { children: [
1527
1556
  H > 0 && /* @__PURE__ */ t(Ke, {}),
@@ -1531,7 +1560,7 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1531
1560
  ] }),
1532
1561
  R.map((P) => {
1533
1562
  const _ = o.specificType[P.specificType];
1534
- return /* @__PURE__ */ b(Ee, { onClick: /* @__PURE__ */ a(() => p(P), "onClick"), draggable: !0, onDragStart: /* @__PURE__ */ a(($) => u($, P), "onDragStart"), onDragEnd: c, children: [
1563
+ return /* @__PURE__ */ b($e, { onClick: /* @__PURE__ */ a(() => p(P), "onClick"), draggable: !0, onDragStart: /* @__PURE__ */ a((E) => u(E, P), "onDragStart"), onDragEnd: c, children: [
1535
1564
  /* @__PURE__ */ t(qe, { children: /* @__PURE__ */ t(_, { fontSize: "small" }) }),
1536
1565
  /* @__PURE__ */ t(Ye, { children: P.label })
1537
1566
  ] }, P.specificType);
@@ -1540,7 +1569,7 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1540
1569
  }) }) }) }) }), "children") }),
1541
1570
  i && /* @__PURE__ */ b(Te, { children: [
1542
1571
  /* @__PURE__ */ t(Ie, { title: "Add filter", children: /* @__PURE__ */ t(
1543
- Ft,
1572
+ Nt,
1544
1573
  {
1545
1574
  className: "action-btn llm-env-target llm-env-dashboard-action",
1546
1575
  "data-env-id": "dashboardpad-add-filter",
@@ -1548,17 +1577,17 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1548
1577
  variant: "outlined",
1549
1578
  size: "small",
1550
1579
  color: "secondary",
1551
- startIcon: /* @__PURE__ */ t(Ri, {}),
1552
- endIcon: /* @__PURE__ */ t(mt, {}),
1580
+ startIcon: /* @__PURE__ */ t(_i, {}),
1581
+ endIcon: /* @__PURE__ */ t(ft, {}),
1553
1582
  onClick: /* @__PURE__ */ a(() => x((f) => !f), "onClick"),
1554
1583
  sx: { height: 28, fontSize: "0.7rem", minWidth: 0, textTransform: "none" },
1555
1584
  children: "Filtro"
1556
1585
  }
1557
1586
  ) }),
1558
- /* @__PURE__ */ t(Ve, { open: h, anchorEl: v.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: f }) => /* @__PURE__ */ t(je, { ...f, children: /* @__PURE__ */ t(Fe, { elevation: 8, sx: { minWidth: 220 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => x(!1), "onClickAway"), children: /* @__PURE__ */ t(gt, { dense: !0, children: It.map((y) => {
1587
+ /* @__PURE__ */ t(Ve, { open: h, anchorEl: v.current, placement: "bottom-start", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: f }) => /* @__PURE__ */ t(je, { ...f, children: /* @__PURE__ */ t(_e, { elevation: 8, sx: { minWidth: 220 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => x(!1), "onClickAway"), children: /* @__PURE__ */ t(xt, { dense: !0, children: zt.map((y) => {
1559
1588
  const R = o.filterType[y.filterType];
1560
1589
  return /* @__PURE__ */ b(
1561
- Ee,
1590
+ $e,
1562
1591
  {
1563
1592
  onClick: /* @__PURE__ */ a(() => {
1564
1593
  i(y.filterType), x(!1);
@@ -1573,8 +1602,8 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1573
1602
  }) }) }) }) }), "children") })
1574
1603
  ] })
1575
1604
  ] });
1576
- }, "ToolBox"), Rn = /* @__PURE__ */ a((e) => {
1577
- const n = et(), i = he(), l = B((C) => C.dashboardDefinition), o = B((C) => C.publishedDashboard), r = B((C) => C.viewType), g = B((C) => C.renderGeneration), h = B((C) => C.llmCounter), x = (l == null ? void 0 : l.id) ?? null, [d, v] = N(null), [s, c] = N(), [u, p] = N(!1), [f, y] = N(!1), [R, H] = N(null), [L, P] = N(!1), _ = ee(null), $ = ee(null), V = ee(null), K = ee(null), M = le(), w = ve(() => `pad-${Math.random().toString(36).slice(2)}`, []);
1605
+ }, "ToolBox"), _n = /* @__PURE__ */ a((e) => {
1606
+ const n = et(), i = he(), l = B((C) => C.dashboardDefinition), o = B((C) => C.publishedDashboard), r = B((C) => C.viewType), g = B((C) => C.renderGeneration), h = B((C) => C.llmCounter), x = (l == null ? void 0 : l.id) ?? null, [d, v] = N(null), [s, c] = N(), [u, p] = N(!1), [f, y] = N(!1), [R, H] = N(null), [L, P] = N(!1), _ = ee(null), E = ee(null), V = ee(null), K = ee(null), M = le(), w = Se(() => `pad-${Math.random().toString(36).slice(2)}`, []);
1578
1607
  q(() => {
1579
1608
  var A;
1580
1609
  if (e.turnOpen) return;
@@ -1584,22 +1613,22 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1584
1613
  const F = W(() => {
1585
1614
  const C = i.getState().dashboardDefinition;
1586
1615
  if (!C || !e.onCompose) return;
1587
- const A = bt(C);
1616
+ const A = vt(C);
1588
1617
  if (A) {
1589
1618
  c(A), setTimeout(() => c(void 0), 2e3);
1590
1619
  return;
1591
1620
  }
1592
1621
  e.onCompose(C);
1593
- }, [e.onCompose, i]), D = W((C) => {
1622
+ }, [e.onCompose, i]), k = W((C) => {
1594
1623
  var A;
1595
- K.current = C.id ?? null, bt(C), i.getState().updateDashboard(C), (A = e.onChange) == null || A.call(e, C);
1624
+ K.current = C.id ?? null, vt(C), i.getState().updateDashboard(C), (A = e.onChange) == null || A.call(e, C);
1596
1625
  }, [e.onChange, i]), z = W(async () => {
1597
1626
  var A;
1598
1627
  const C = i.getState().dashboardDefinition;
1599
1628
  if (!(!(C != null && C.id) || !n)) {
1600
1629
  p(!0);
1601
1630
  try {
1602
- await at(n, C), (A = e.onChange) == null || A.call(e, C);
1631
+ await ot(n, C), (A = e.onChange) == null || A.call(e, C);
1603
1632
  } catch (Y) {
1604
1633
  console.error("[@aintela/bi composer] Error saving dashboard:", Y);
1605
1634
  } finally {
@@ -1611,18 +1640,18 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1611
1640
  if (!n || !e.dashboardId || V.current || K.current === e.dashboardId) return;
1612
1641
  v(null), i.getState().updateDashboard(void 0);
1613
1642
  const C = n.getDashboard(e.dashboardId);
1614
- V.current = C, C.then((A) => D(Be(A))).catch((A) => v(String(A))).finally(() => {
1643
+ V.current = C, C.then((A) => k(Be(A))).catch((A) => v(String(A))).finally(() => {
1615
1644
  V.current = null;
1616
1645
  });
1617
- }, [D, n, e.dashboardId, i]);
1646
+ }, [k, n, e.dashboardId, i]);
1618
1647
  const I = W(async () => {
1619
1648
  if (n)
1620
1649
  try {
1621
- D(await Pt(n, e.sessionId));
1650
+ k(await $t(n, e.sessionId));
1622
1651
  } catch (C) {
1623
1652
  console.error("[@aintela/bi composer] Error creating new dashboard:", C);
1624
1653
  }
1625
- }, [D, n, e.sessionId]), U = W(() => {
1654
+ }, [k, n, e.sessionId]), U = W(() => {
1626
1655
  i.getState().refreshDashboard();
1627
1656
  }, [i]), J = W(async () => {
1628
1657
  const C = !f;
@@ -1640,16 +1669,16 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1640
1669
  if (!(!C.id || !n)) {
1641
1670
  y(!1);
1642
1671
  try {
1643
- D(Be(await n.getDashboard(C.id)));
1672
+ k(Be(await n.getDashboard(C.id)));
1644
1673
  } catch (A) {
1645
1674
  console.error("[@aintela/bi composer] Error loading dashboard:", A);
1646
1675
  }
1647
1676
  }
1648
- }, [D, n]), ne = e.renderDashboardPicker, de = /* @__PURE__ */ a((C, A) => He.cloneElement(A, { className: "llm-env-target llm-env-dashboard-action", "data-env-id": C, sx: { fontSize: 18 } }), "envIcon"), me = /* @__PURE__ */ a((C) => ({ border: C ? "0px" : `1px solid ${M.palette.divider}`, px: 1, py: 0, gap: 0.5, textTransform: "none" }), "viewToggleSx"), ge = /* @__PURE__ */ a((C, A) => ({ fontSize: "0.7rem", lineHeight: 1, maxWidth: C ? A : 0, overflow: "hidden", opacity: C ? 1 : 0, whiteSpace: "nowrap", transition: "max-width 0.25s ease, opacity 0.2s ease" }), "viewLabelSx");
1677
+ }, [k, n]), ne = e.renderDashboardPicker, de = /* @__PURE__ */ a((C, A) => He.cloneElement(A, { className: "llm-env-target llm-env-dashboard-action", "data-env-id": C, sx: { fontSize: 18 } }), "envIcon"), me = /* @__PURE__ */ a((C) => ({ border: C ? "0px" : `1px solid ${M.palette.divider}`, px: 1, py: 0, gap: 0.5, textTransform: "none" }), "viewToggleSx"), ge = /* @__PURE__ */ a((C, A) => ({ fontSize: "0.7rem", lineHeight: 1, maxWidth: C ? A : 0, overflow: "hidden", opacity: C ? 1 : 0, whiteSpace: "nowrap", transition: "max-width 0.25s ease, opacity 0.2s ease" }), "viewLabelSx");
1649
1678
  return /* @__PURE__ */ b(se, { className: "bi-dashboard-pad", sx: { height: "100%", minHeight: 0 }, children: [
1650
1679
  /* @__PURE__ */ t(j, { sx: { display: "flex", py: 0.5, backgroundColor: M.palette.background.paper, borderBottom: `1px solid ${M.palette.divider}`, px: 1 }, children: /* @__PURE__ */ b(se, { direction: "row", gap: 0.5, sx: { alignItems: "center", width: "100%", px: 1 }, children: [
1651
1680
  !l && !d && /* @__PURE__ */ b(se, { direction: "row", gap: 1, alignItems: "center", children: [
1652
- /* @__PURE__ */ t(ft, { size: 16 }),
1681
+ /* @__PURE__ */ t(gt, { size: 16 }),
1653
1682
  /* @__PURE__ */ t(ie, { color: "text.secondary", children: "Carregando dashboard" })
1654
1683
  ] }),
1655
1684
  d && /* @__PURE__ */ b(ie, { color: "error", children: [
@@ -1657,9 +1686,9 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1657
1686
  d
1658
1687
  ] }),
1659
1688
  l && /* @__PURE__ */ b(Te, { children: [
1660
- e.onBack && /* @__PURE__ */ t(De, { onClick: e.onBack, icon: de("dashboard-pad-back", /* @__PURE__ */ t(Ni, {})), label: "Voltar" }),
1689
+ e.onBack && /* @__PURE__ */ t(ke, { onClick: e.onBack, icon: de("dashboard-pad-back", /* @__PURE__ */ t(Bi, {})), label: "Voltar" }),
1661
1690
  /* @__PURE__ */ b(
1662
- sn,
1691
+ dn,
1663
1692
  {
1664
1693
  value: r,
1665
1694
  exclusive: !0,
@@ -1670,11 +1699,11 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1670
1699
  sx: { height: 24, border: "0px", "& .Mui-selected": { border: `1px solid ${M.palette.divider}` } },
1671
1700
  children: [
1672
1701
  /* @__PURE__ */ b(Je, { value: "Sketch", className: "llm-env-target llm-env-action-sketch", "data-env-id": "dashboard-pad-view-sketch", sx: me(r == "Sketch"), children: [
1673
- /* @__PURE__ */ t(Tt, { sx: { fontSize: 18 } }),
1702
+ /* @__PURE__ */ t(kt, { sx: { fontSize: 18 } }),
1674
1703
  /* @__PURE__ */ t(ie, { component: "span", sx: ge(r === "Sketch", 50), children: "Sketch" })
1675
1704
  ] }),
1676
1705
  /* @__PURE__ */ b(Je, { value: "Generated", className: "llm-env-target llm-env-action-generated", "data-env-id": "dashboard-pad-view-generated", sx: me(r == "Generated"), children: [
1677
- /* @__PURE__ */ t(_i, { sx: { fontSize: 18 } }),
1706
+ /* @__PURE__ */ t(Fi, { sx: { fontSize: 18 } }),
1678
1707
  /* @__PURE__ */ t(ie, { component: "span", sx: ge(r === "Generated", 70), children: "Dashboard" })
1679
1708
  ] })
1680
1709
  ]
@@ -1682,41 +1711,41 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1682
1711
  ),
1683
1712
  /* @__PURE__ */ t(Ke, { orientation: "vertical", flexItem: !0, sx: { mx: 1 } }),
1684
1713
  /* @__PURE__ */ t(j, { sx: { flex: 1, display: "flex", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ t(
1685
- Mn,
1714
+ Rn,
1686
1715
  {
1687
1716
  onAddGeneric: /* @__PURE__ */ a(() => {
1688
1717
  var C;
1689
- return (C = $.current) == null ? void 0 : C.addGenericCell();
1718
+ return (C = E.current) == null ? void 0 : C.addGenericCell();
1690
1719
  }, "onAddGeneric"),
1691
1720
  onAddTyped: /* @__PURE__ */ a((C, A, Y) => {
1692
1721
  var m;
1693
- return (m = $.current) == null ? void 0 : m.addTypedCell(C, A, Y);
1722
+ return (m = E.current) == null ? void 0 : m.addTypedCell(C, A, Y);
1694
1723
  }, "onAddTyped"),
1695
1724
  onAddFilter: /* @__PURE__ */ a((C) => {
1696
1725
  var A;
1697
- return (A = $.current) == null ? void 0 : A.handleAddFilter(C);
1726
+ return (A = E.current) == null ? void 0 : A.handleAddFilter(C);
1698
1727
  }, "onAddFilter")
1699
1728
  }
1700
1729
  ) }),
1701
1730
  /* @__PURE__ */ t(Ke, { orientation: "vertical", flexItem: !0, sx: { mx: 1 } }),
1702
1731
  /* @__PURE__ */ b(se, { direction: "row", gap: 0.25, alignItems: "center", children: [
1703
- n && /* @__PURE__ */ t(De, { onClick: I, icon: de("dashboard-pad-new", /* @__PURE__ */ t(Bi, {})), label: "Novo" }),
1732
+ n && /* @__PURE__ */ t(ke, { onClick: I, icon: de("dashboard-pad-new", /* @__PURE__ */ t(Hi, {})), label: "Novo" }),
1704
1733
  n && /* @__PURE__ */ t(
1705
- De,
1734
+ ke,
1706
1735
  {
1707
1736
  onClick: u ? void 0 : z,
1708
- icon: /* @__PURE__ */ a(() => u ? /* @__PURE__ */ t(ft, { size: 14 }) : de("dashboard-pad-save", /* @__PURE__ */ t(Hi, {})), "icon"),
1737
+ icon: /* @__PURE__ */ a(() => u ? /* @__PURE__ */ t(gt, { size: 14 }) : de("dashboard-pad-save", /* @__PURE__ */ t(Li, {})), "icon"),
1709
1738
  label: "Salvar"
1710
1739
  }
1711
1740
  ),
1712
- /* @__PURE__ */ t(De, { onClick: U, icon: de("dashboard-pad-refresh", /* @__PURE__ */ t(ln, {})), label: "Atualizar" }),
1741
+ /* @__PURE__ */ t(ke, { onClick: U, icon: de("dashboard-pad-refresh", /* @__PURE__ */ t(sn, {})), label: "Atualizar" }),
1713
1742
  n && ne && /* @__PURE__ */ t("div", { ref: _, children: /* @__PURE__ */ t(
1714
- De,
1743
+ ke,
1715
1744
  {
1716
1745
  onClick: J,
1717
1746
  icon: /* @__PURE__ */ b(se, { direction: "row", alignItems: "center", "data-env-id": "dashboard-pad-load", className: "llm-env-target llm-env-dashboard-action", children: [
1718
- /* @__PURE__ */ t(Fi, { sx: { fontSize: 18 } }),
1719
- /* @__PURE__ */ t(mt, { sx: { fontSize: 14, ml: -0.25 } })
1747
+ /* @__PURE__ */ t(Ni, { sx: { fontSize: 18 } }),
1748
+ /* @__PURE__ */ t(ft, { sx: { fontSize: 14, ml: -0.25 } })
1720
1749
  ] }),
1721
1750
  label: "Abrir"
1722
1751
  }
@@ -1739,66 +1768,66 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1739
1768
  },
1740
1769
  children: [
1741
1770
  /* @__PURE__ */ t(ie, { component: "span", sx: { whiteSpace: "nowrap", fontSize: "0.7rem", lineHeight: 1, mr: 1 }, children: "Compose" }),
1742
- de("dashboard-pad-compose", /* @__PURE__ */ t(Li, {}))
1771
+ de("dashboard-pad-compose", /* @__PURE__ */ t(Gi, {}))
1743
1772
  ]
1744
1773
  }
1745
1774
  ) })
1746
1775
  ] })
1747
1776
  ] })
1748
1777
  ] }) }),
1749
- ne && /* @__PURE__ */ t(Ve, { open: f, anchorEl: _.current, placement: "bottom-end", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: C }) => /* @__PURE__ */ t(je, { ...C, children: /* @__PURE__ */ t(Fe, { elevation: 8, sx: { overflow: "hidden", minWidth: 320, maxWidth: 380 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => y(!1), "onClickAway"), children: /* @__PURE__ */ t(j, { sx: { width: 360, maxWidth: "100%", height: 420 }, children: ne({ hierarchy: R, loading: L, selectedDashboardId: x, onSelect: /* @__PURE__ */ a((A) => void Q(A), "onSelect") }) }) }) }) }), "children") }),
1778
+ ne && /* @__PURE__ */ t(Ve, { open: f, anchorEl: _.current, placement: "bottom-end", transition: !0, sx: { zIndex: 1300 }, children: /* @__PURE__ */ a(({ TransitionProps: C }) => /* @__PURE__ */ t(je, { ...C, children: /* @__PURE__ */ t(_e, { elevation: 8, sx: { overflow: "hidden", minWidth: 320, maxWidth: 380 }, children: /* @__PURE__ */ t(Ue, { onClickAway: /* @__PURE__ */ a(() => y(!1), "onClickAway"), children: /* @__PURE__ */ t(j, { sx: { width: 360, maxWidth: "100%", height: 420 }, children: ne({ hierarchy: R, loading: L, selectedDashboardId: x, onSelect: /* @__PURE__ */ a((A) => void Q(A), "onSelect") }) }) }) }) }), "children") }),
1750
1779
  r == "Sketch" && /* @__PURE__ */ b(se, { sx: { flex: 1, minHeight: 0 }, children: [
1751
- e.showDebug && /* @__PURE__ */ t(Fe, { variant: "outlined", sx: { maxHeight: 200, p: 1, overflow: "auto", "& pre": { bgcolor: "background.default", p: 1, borderRadius: 1, overflow: "auto", fontSize: 11, m: 0 } }, children: /* @__PURE__ */ t("pre", { children: JSON.stringify(l, void 0, 2) }) }),
1752
- /* @__PURE__ */ t("div", { style: { minHeight: "300px", flex: 1 }, children: /* @__PURE__ */ t(ot, { ref: $, renderId: w, headerExtra: e.headerExtra, renderDescription: e.renderDescription }) })
1780
+ e.showDebug && /* @__PURE__ */ t(_e, { variant: "outlined", sx: { maxHeight: 200, p: 1, overflow: "auto", "& pre": { bgcolor: "background.default", p: 1, borderRadius: 1, overflow: "auto", fontSize: 11, m: 0 } }, children: /* @__PURE__ */ t("pre", { children: JSON.stringify(l, void 0, 2) }) }),
1781
+ /* @__PURE__ */ t("div", { style: { minHeight: "300px", flex: 1 }, children: /* @__PURE__ */ t(rt, { ref: E, renderId: w, headerExtra: e.headerExtra, renderDescription: e.renderDescription }) })
1753
1782
  ] }),
1754
- r == "Generated" && (o == null ? void 0 : o.id) && /* @__PURE__ */ t(j, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(_e, { dashboard: o, codeGeneration: g, llmRenderCount: h, dragLocked: !1, editable: !0, onLayoutCommit: /* @__PURE__ */ a(() => i.getState().commitDashboardLayout(), "onLayoutCommit") }, o.id) })
1783
+ r == "Generated" && (o == null ? void 0 : o.id) && /* @__PURE__ */ t(j, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(Re, { dashboard: o, codeGeneration: g, llmRenderCount: h, dragLocked: !1, editable: !0, onLayoutCommit: /* @__PURE__ */ a(() => i.getState().commitDashboardLayout(), "onLayoutCommit") }, o.id) })
1755
1784
  ] });
1756
1785
  }, "DashboardPad");
1757
- Rn.displayName = "DashboardPad";
1758
- const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1786
+ _n.displayName = "DashboardPad";
1787
+ const ht = 40, Ea = 100, Aa = 150, Fn = Tt((e, n) => {
1759
1788
  const i = e.defaultContentType ?? "default", l = ee(0), o = W(() => (l.current += 1, `Untitled-${l.current}`), []), [r, g] = N(() => e.tabs ?? [{ name: o(), contentType: i, id: ze() }]), [h, x] = N(() => r[0].name), [d, v] = N(null), [s, c] = N(""), [u, p] = N(null), f = ee(null), y = r.find((w) => w.name === h) ?? r[0] ?? null, R = W((w, F) => {
1760
- let D = w, z = 1;
1761
- for (; r.some((I) => I.name === D && I.name !== F); )
1762
- z += 1, D = `${w} (${z})`;
1763
- return D;
1789
+ let k = w, z = 1;
1790
+ for (; r.some((I) => I.name === k && I.name !== F); )
1791
+ z += 1, k = `${w} (${z})`;
1792
+ return k;
1764
1793
  }, [r]), H = W((w) => {
1765
1794
  r.some((F) => F.name === w) && x(w);
1766
1795
  }, [r]), L = W((w, F) => {
1767
1796
  var I;
1768
- const D = R(F ?? o()), z = { id: ze(), name: D, contentType: w ?? i };
1769
- return g((U) => [...U, z]), x(D), (I = e.onTabCreate) == null || I.call(e, z), D;
1797
+ const k = R(F ?? o()), z = { id: ze(), name: k, contentType: w ?? i };
1798
+ return g((U) => [...U, z]), x(k), (I = e.onTabCreate) == null || I.call(e, z), k;
1770
1799
  }, [i, R, e.onTabCreate, o]), P = W((w) => {
1771
1800
  g((F) => {
1772
1801
  var U, J;
1773
- const D = F.findIndex((Q) => Q.name === w);
1774
- if (D === -1) return F;
1775
- const z = F[D], I = F.filter((Q) => Q.name !== w);
1802
+ const k = F.findIndex((Q) => Q.name === w);
1803
+ if (k === -1) return F;
1804
+ const z = F[k], I = F.filter((Q) => Q.name !== w);
1776
1805
  if (I.length === 0) {
1777
1806
  const Q = { name: o(), contentType: i, id: ze() };
1778
1807
  return x(Q.name), (U = e.onTabClose) == null || U.call(e, z), [Q];
1779
1808
  }
1780
- return h === w && x(I[Math.min(D, I.length - 1)].name), (J = e.onTabClose) == null || J.call(e, z), I;
1809
+ return h === w && x(I[Math.min(k, I.length - 1)].name), (J = e.onTabClose) == null || J.call(e, z), I;
1781
1810
  });
1782
1811
  }, [h, i, e.onTabClose, o]);
1783
- Qt(n, () => ({ focusTab: H, createTab: L, closeTab: P, getActiveTab: /* @__PURE__ */ a(() => y, "getActiveTab"), getTabs: /* @__PURE__ */ a(() => r, "getTabs") }), [H, L, P, y, r]), q(() => {
1812
+ en(n, () => ({ focusTab: H, createTab: L, closeTab: P, getActiveTab: /* @__PURE__ */ a(() => y, "getActiveTab"), getTabs: /* @__PURE__ */ a(() => r, "getTabs") }), [H, L, P, y, r]), q(() => {
1784
1813
  var w;
1785
1814
  y && ((w = e.onTabChange) == null || w.call(e, y));
1786
1815
  }, [h]);
1787
1816
  const _ = /* @__PURE__ */ a((w) => {
1788
1817
  v(w.name), c(w.name);
1789
- }, "startRename"), $ = /* @__PURE__ */ a(() => {
1818
+ }, "startRename"), E = /* @__PURE__ */ a(() => {
1790
1819
  var F;
1791
1820
  if (!d) return;
1792
1821
  const w = s.trim();
1793
1822
  if (w && w !== d) {
1794
- const D = R(w, d), z = d;
1795
- g((U) => U.map((J) => J.name === d ? { ...J, name: D } : J)), h === d && x(D);
1823
+ const k = R(w, d), z = d;
1824
+ g((U) => U.map((J) => J.name === d ? { ...J, name: k } : J)), h === d && x(k);
1796
1825
  const I = r.find((U) => U.name === d);
1797
- I && ((F = e.onTabRename) == null || F.call(e, { ...I, name: D }, z));
1826
+ I && ((F = e.onTabRename) == null || F.call(e, { ...I, name: k }, z));
1798
1827
  }
1799
1828
  v(null);
1800
1829
  }, "commitRename"), V = /* @__PURE__ */ a((w) => {
1801
- w.key === "Enter" ? $() : w.key === "Escape" && v(null);
1830
+ w.key === "Enter" ? E() : w.key === "Escape" && v(null);
1802
1831
  }, "handleRenameKeyDown");
1803
1832
  q(() => {
1804
1833
  d && f.current && (f.current.focus(), f.current.select());
@@ -1806,17 +1835,17 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1806
1835
  const K = /* @__PURE__ */ a((w) => {
1807
1836
  var F;
1808
1837
  (F = e.addMenuItems) != null && F.length ? p(w.currentTarget) : L();
1809
- }, "handleAddMenuOpen"), M = /* @__PURE__ */ t(Vi, { sx: { fontSize: 15, color: "text.secondary", flexShrink: 0 } });
1838
+ }, "handleAddMenuOpen"), M = /* @__PURE__ */ t(ji, { sx: { fontSize: 15, color: "text.secondary", flexShrink: 0 } });
1810
1839
  return /* @__PURE__ */ b(j, { sx: { display: "flex", flexDirection: "column", height: "100%", overflow: "hidden" }, children: [
1811
- /* @__PURE__ */ b(j, { sx: { display: "flex", alignItems: "center", borderBottom: "1px solid", borderColor: "divider", backgroundColor: "background.paper", minHeight: pt, maxHeight: pt, overflow: "hidden" }, children: [
1840
+ /* @__PURE__ */ b(j, { sx: { display: "flex", alignItems: "center", borderBottom: "1px solid", borderColor: "divider", backgroundColor: "background.paper", minHeight: ht, maxHeight: ht, overflow: "hidden" }, children: [
1812
1841
  /* @__PURE__ */ t(j, { sx: { display: "flex", alignItems: "center", flex: 1, overflow: "auto", backgroundColor: "background.default", "&::-webkit-scrollbar": { height: 0 } }, children: r.map((w) => {
1813
1842
  var z;
1814
- const F = w.name === h, D = w.name === d;
1843
+ const F = w.name === h, k = w.name === d;
1815
1844
  return /* @__PURE__ */ b(
1816
1845
  j,
1817
1846
  {
1818
1847
  onClick: /* @__PURE__ */ a(() => {
1819
- D || x(w.name);
1848
+ k || x(w.name);
1820
1849
  }, "onClick"),
1821
1850
  onDoubleClick: /* @__PURE__ */ a(() => _(w), "onDoubleClick"),
1822
1851
  sx: /* @__PURE__ */ a((I) => ({
@@ -1824,8 +1853,8 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1824
1853
  alignItems: "center",
1825
1854
  gap: 0.5,
1826
1855
  minWidth: Ea,
1827
- maxWidth: $a,
1828
- height: pt,
1856
+ maxWidth: Aa,
1857
+ height: ht,
1829
1858
  px: 1.5,
1830
1859
  cursor: "pointer",
1831
1860
  userSelect: "none",
@@ -1837,13 +1866,13 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1837
1866
  }), "sx"),
1838
1867
  children: [
1839
1868
  ((z = e.renderTabIcon) == null ? void 0 : z.call(e, w)) ?? M,
1840
- D ? /* @__PURE__ */ t(
1841
- Ne,
1869
+ k ? /* @__PURE__ */ t(
1870
+ Fe,
1842
1871
  {
1843
1872
  inputRef: f,
1844
1873
  value: s,
1845
1874
  onChange: /* @__PURE__ */ a((I) => c(I.target.value), "onChange"),
1846
- onBlur: $,
1875
+ onBlur: E,
1847
1876
  onKeyDown: V,
1848
1877
  variant: "standard",
1849
1878
  size: "small",
@@ -1864,7 +1893,7 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1864
1893
  }, "onClick"),
1865
1894
  sx: { p: 0.2, opacity: F ? 0.7 : 0, "&:hover": { opacity: 1 }, transition: "opacity 0.15s" },
1866
1895
  "aria-label": "Fechar aba",
1867
- children: /* @__PURE__ */ t(Gi, { sx: { fontSize: 14 } })
1896
+ children: /* @__PURE__ */ t(Wi, { sx: { fontSize: 14 } })
1868
1897
  }
1869
1898
  )
1870
1899
  ]
@@ -1872,11 +1901,11 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1872
1901
  w.name
1873
1902
  );
1874
1903
  }) }),
1875
- /* @__PURE__ */ t(Pe, { size: "small", onClick: K, sx: { mx: 0.5, flexShrink: 0 }, title: "Adicionar aba", children: /* @__PURE__ */ t(Wi, { sx: { fontSize: 18 } }) }),
1876
- e.addMenuItems && /* @__PURE__ */ t(Ui, { anchorEl: u, open: !!u, onClose: /* @__PURE__ */ a(() => p(null), "onClose"), anchorOrigin: { vertical: "bottom", horizontal: "left" }, transformOrigin: { vertical: "top", horizontal: "left" }, children: e.addMenuItems.map((w, F) => [
1904
+ /* @__PURE__ */ t(Pe, { size: "small", onClick: K, sx: { mx: 0.5, flexShrink: 0 }, title: "Adicionar aba", children: /* @__PURE__ */ t(Vi, { sx: { fontSize: 18 } }) }),
1905
+ e.addMenuItems && /* @__PURE__ */ t(Ki, { anchorEl: u, open: !!u, onClose: /* @__PURE__ */ a(() => p(null), "onClose"), anchorOrigin: { vertical: "bottom", horizontal: "left" }, transformOrigin: { vertical: "top", horizontal: "left" }, children: e.addMenuItems.map((w, F) => [
1877
1906
  w.dividerBefore && /* @__PURE__ */ t(j, { component: "li", sx: { borderTop: "1px solid", borderColor: "divider" } }, `div-${F}`),
1878
1907
  /* @__PURE__ */ b(
1879
- Ee,
1908
+ $e,
1880
1909
  {
1881
1910
  onClick: /* @__PURE__ */ a(() => {
1882
1911
  L(w.contentType), p(null);
@@ -1894,8 +1923,8 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1894
1923
  r.map((w) => /* @__PURE__ */ t(j, { sx: { flex: 1, overflow: "auto", pr: 0, display: w.name === h ? "flex" : "none", flexDirection: "column" }, children: e.renderContent(w) }, w.id))
1895
1924
  ] });
1896
1925
  });
1897
- _n.displayName = "DashboardPadEditor";
1898
- const Aa = /* @__PURE__ */ a(({
1926
+ Fn.displayName = "DashboardPadEditor";
1927
+ const Ma = /* @__PURE__ */ a(({
1899
1928
  orientation: e = "row",
1900
1929
  datasets: n,
1901
1930
  defaultTemplateDataset: i = "BI_TemplateModel",
@@ -1925,11 +1954,11 @@ const Aa = /* @__PURE__ */ a(({
1925
1954
  sx: u ? {} : { px: 1, py: 0.25, borderLeft: `1px solid ${h.palette.divider}` },
1926
1955
  children: [
1927
1956
  /* @__PURE__ */ b(se, { direction: "row", alignItems: "center", gap: 0.5, children: [
1928
- /* @__PURE__ */ t(xt, { size: "small", checked: d, onChange: s, "data-env-id": "dashboard-pad-dataset-parameterized" }),
1957
+ /* @__PURE__ */ t(yt, { size: "small", checked: d, onChange: s, "data-env-id": "dashboard-pad-dataset-parameterized" }),
1929
1958
  /* @__PURE__ */ t(ie, { variant: "body2", sx: { color: "text.secondary", whiteSpace: "nowrap", fontSize: u ? 11.5 : void 0 }, children: "DataSet Dinâmico" })
1930
1959
  ] }),
1931
1960
  d && /* @__PURE__ */ t(
1932
- Nt,
1961
+ Bt,
1933
1962
  {
1934
1963
  size: "small",
1935
1964
  value: v ?? "",
@@ -1941,14 +1970,14 @@ const Aa = /* @__PURE__ */ a(({
1941
1970
  var f;
1942
1971
  return p ? ((f = n.find((y) => y.dataSetId === p)) == null ? void 0 : f.name) ?? p : "Default…";
1943
1972
  }, "renderValue"),
1944
- children: n.map((p) => /* @__PURE__ */ t(Ee, { value: p.dataSetId, sx: { fontSize: "0.8rem" }, children: /* @__PURE__ */ b(j, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
1973
+ children: n.map((p) => /* @__PURE__ */ t($e, { value: p.dataSetId, sx: { fontSize: "0.8rem" }, children: /* @__PURE__ */ b(j, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
1945
1974
  /* @__PURE__ */ t("span", { children: p.name }),
1946
1975
  p.isTemplate && /* @__PURE__ */ t(ie, { variant: "caption", sx: { color: "text.disabled" }, children: "(template)" })
1947
1976
  ] }) }, p.dataSetId))
1948
1977
  }
1949
1978
  ),
1950
1979
  l && /* @__PURE__ */ t(j, { sx: u ? {} : { borderLeft: `1px solid ${h.palette.divider}`, pl: 1 }, children: /* @__PURE__ */ t(
1951
- Nt,
1980
+ Bt,
1952
1981
  {
1953
1982
  size: "small",
1954
1983
  value: c,
@@ -1964,26 +1993,26 @@ const Aa = /* @__PURE__ */ a(({
1964
1993
  return ((f = l.find((y) => y.id === p)) == null ? void 0 : f.name) ?? "Agent…";
1965
1994
  }, "renderValue"),
1966
1995
  "data-env-id": "dashboard-pad-agent-picker",
1967
- children: l.map((p) => /* @__PURE__ */ t(Ee, { value: p.id, sx: { fontSize: "0.8rem" }, children: p.name }, p.id))
1996
+ children: l.map((p) => /* @__PURE__ */ t($e, { value: p.id, sx: { fontSize: "0.8rem" }, children: p.name }, p.id))
1968
1997
  }
1969
1998
  ) })
1970
1999
  ]
1971
2000
  }
1972
2001
  );
1973
- }, "DatasetParameterizationControls"), Ma = /* @__PURE__ */ a(({ backgroundColor: e, zoom: n = 0.7, width: i = "80%", title: l, config: o }) => /* @__PURE__ */ t(j, { sx: /* @__PURE__ */ a((r) => ({ display: "inline-flex", justifyContent: "left", width: "100%", border: `1px solid ${r.palette.divider}`, borderRadius: "10px", p: 2, maxHeight: "500px", overflow: "auto" }), "sx"), children: /* @__PURE__ */ b(se, { gap: 2, sx: /* @__PURE__ */ a((r) => ({ p: 1, borderRadius: 2, backgroundColor: e ?? r.palette.background.paper, width: i, zoom: n }), "sx"), children: [
2002
+ }, "DatasetParameterizationControls"), Ra = /* @__PURE__ */ a(({ backgroundColor: e, zoom: n = 0.7, width: i = "80%", title: l, config: o }) => /* @__PURE__ */ t(j, { sx: /* @__PURE__ */ a((r) => ({ display: "inline-flex", justifyContent: "left", width: "100%", border: `1px solid ${r.palette.divider}`, borderRadius: "10px", p: 2, maxHeight: "500px", overflow: "auto" }), "sx"), children: /* @__PURE__ */ b(se, { gap: 2, sx: /* @__PURE__ */ a((r) => ({ p: 1, borderRadius: 2, backgroundColor: e ?? r.palette.background.paper, width: i, zoom: n }), "sx"), children: [
1974
2003
  l && /* @__PURE__ */ t(ie, { variant: "body1", children: l }),
1975
- /* @__PURE__ */ t(Xe, { container: !0, spacing: 1, children: o.map((r, g) => /* @__PURE__ */ t(Xe, { size: r.size, maxHeight: 300, children: /* @__PURE__ */ t(j, { sx: { width: "100%", height: r.specificType == "Gauge" || r.specificType == "MetricComparison" ? "100px" : `${Math.max(r.height ?? 0, nt)}px` }, children: r.card }) }, `example-pad-card-${g}`)) })
1976
- ] }) }), "ExamplePad"), rt = /* @__PURE__ */ a((e) => {
1977
- const n = Me(), i = e.specificType ?? "Generic", l = n.specificType[i] ?? n.specificType.Generic;
2004
+ /* @__PURE__ */ t(Xe, { container: !0, spacing: 1, children: o.map((r, g) => /* @__PURE__ */ t(Xe, { size: r.size, maxHeight: 300, children: /* @__PURE__ */ t(j, { sx: { width: "100%", height: r.specificType == "Gauge" || r.specificType == "MetricComparison" ? "100px" : `${Math.max(r.height ?? 0, it)}px` }, children: r.card }) }, `example-pad-card-${g}`)) })
2005
+ ] }) }), "ExamplePad"), lt = /* @__PURE__ */ a((e) => {
2006
+ const n = Ae(), i = e.specificType ?? "Generic", l = n.specificType[i] ?? n.specificType.Generic;
1978
2007
  return /* @__PURE__ */ b(j, { sx: { ...e.sx, width: "100%", height: "100%", p: 1, gap: 0.2, textAlign: "justify" }, className: "react-grid-placeholder-example", children: [
1979
2008
  /* @__PURE__ */ t(l, { fontSize: "small", sx: { float: "left", shapeOutside: "margin-box", mr: 0.5 } }),
1980
2009
  /* @__PURE__ */ t(ie, { sx: { fontSize: "14px" }, children: `[${e.name}] - ${e.description}` })
1981
2010
  ] });
1982
- }, "ExampleCardSketch"), Ra = rt, _a = rt, Fa = /* @__PURE__ */ a(({ backgroundColor: e, zoom: n = 0.8, width: i = "100%", title: l, config: o }) => /* @__PURE__ */ b(se, { gap: 2, sx: /* @__PURE__ */ a((r) => ({ p: 1, borderRadius: 2, backgroundColor: e ?? r.palette.background.paper, width: i, maxHeight: "1400px" }), "sx"), children: [
2011
+ }, "ExampleCardSketch"), _a = lt, Fa = lt, Na = /* @__PURE__ */ a(({ backgroundColor: e, zoom: n = 0.8, width: i = "100%", title: l, config: o }) => /* @__PURE__ */ b(se, { gap: 2, sx: /* @__PURE__ */ a((r) => ({ p: 1, borderRadius: 2, backgroundColor: e ?? r.palette.background.paper, width: i, maxHeight: "1400px" }), "sx"), children: [
1983
2012
  l && /* @__PURE__ */ t(ie, { variant: "body1", children: l }),
1984
- /* @__PURE__ */ t(Xe, { container: !0, spacing: 1, sx: { zoom: n }, children: o.map((r, g) => /* @__PURE__ */ t(Xe, { size: r.size, children: /* @__PURE__ */ t(j, { sx: { width: "100%", height: r.height ?? nt, "& > *": { width: "100%", maxHeight: "500px" } }, children: r.card }) }, `prototype-pad-card-${g}`)) })
2013
+ /* @__PURE__ */ t(Xe, { container: !0, spacing: 1, sx: { zoom: n }, children: o.map((r, g) => /* @__PURE__ */ t(Xe, { size: r.size, children: /* @__PURE__ */ t(j, { sx: { width: "100%", height: r.height ?? it, "& > *": { width: "100%", maxHeight: "500px" } }, children: r.card }) }, `prototype-pad-card-${g}`)) })
1985
2014
  ] }), "PrototypePad");
1986
- function Na(e, n, i, l, o) {
2015
+ function Ba(e, n, i, l, o) {
1987
2016
  if (l === void 0) return { size: e, height: n, card: i };
1988
2017
  const r = i;
1989
2018
  return o !== void 0 && typeof o != "string" ? { size: e, height: n, name: r, specificType: l, card: o } : {
@@ -1992,23 +2021,23 @@ function Na(e, n, i, l, o) {
1992
2021
  name: r,
1993
2022
  specificType: l,
1994
2023
  description: o,
1995
- card: /* @__PURE__ */ t(rt, { name: r, specificType: l, description: o })
2024
+ card: /* @__PURE__ */ t(lt, { name: r, specificType: l, description: o })
1996
2025
  };
1997
2026
  }
1998
- a(Na, "c");
1999
- const Ba = /* @__PURE__ */ a((e, n) => ({
2027
+ a(Ba, "c");
2028
+ const Ha = /* @__PURE__ */ a((e, n) => ({
2000
2029
  i: e,
2001
2030
  name: n,
2002
2031
  filterType: "DateRangePicker",
2003
2032
  mandatory: !0,
2004
2033
  parametersNames: [`${n}_inicio`, `${n}_fim`]
2005
- }), "dateRange"), Ha = /* @__PURE__ */ a((e, n, i = !1) => ({
2034
+ }), "dateRange"), La = /* @__PURE__ */ a((e, n, i = !1) => ({
2006
2035
  i: e,
2007
2036
  name: n,
2008
2037
  filterType: "DatePicker",
2009
2038
  mandatory: i,
2010
2039
  parametersNames: [n]
2011
- }), "datePicker"), La = /* @__PURE__ */ a((e, n, i = !0, l = !1) => ({
2040
+ }), "datePicker"), Ga = /* @__PURE__ */ a((e, n, i = !0, l = !1) => ({
2012
2041
  i: e,
2013
2042
  name: n,
2014
2043
  filterType: "AutoComplete",
@@ -2016,27 +2045,27 @@ const Ba = /* @__PURE__ */ a((e, n) => ({
2016
2045
  multipleSelection: i,
2017
2046
  parametersNames: [n]
2018
2047
  }), "autoComplete");
2019
- function Ga(e, n) {
2020
- const i = dn();
2048
+ function Wa(e, n) {
2049
+ const i = cn();
2021
2050
  q(() => {
2022
2051
  var l, o;
2023
2052
  n == "update" ? (l = i.updateDashboardPad) == null || l.call(i, e) : (o = i.createDashboardPad) == null || o.call(i, e);
2024
2053
  }, []);
2025
2054
  }
2026
- a(Ga, "useDashboardPad");
2027
- const Fn = {
2055
+ a(Wa, "useDashboardPad");
2056
+ const Nn = {
2028
2057
  visible: { opacity: 1, y: 0, transition: { duration: 0.18, ease: "easeOut" } },
2029
2058
  hidden: { opacity: 0, y: -12, transition: { duration: 0.18, ease: "easeOut" } }
2030
- }, Nn = {
2059
+ }, Bn = {
2031
2060
  hidden: { opacity: 0, x: 16, transition: { duration: 0.1, ease: "easeOut" } },
2032
2061
  visible: { opacity: 1, x: 0, transition: { duration: 0.32, ease: "easeOut", delay: 0.22 } }
2033
- }, Bn = { duration: 0.28, ease: "easeOut" }, Hn = {
2062
+ }, Hn = { duration: 0.28, ease: "easeOut" }, Ln = {
2034
2063
  visible: { opacity: 1, transition: { duration: 0.15 } },
2035
2064
  hidden: { opacity: 0, transition: { duration: 0.15 } }
2036
- }, Ln = {
2065
+ }, Gn = {
2037
2066
  hidden: { opacity: 0, transition: { duration: 0.15 } },
2038
2067
  visible: { opacity: 1, transition: { duration: 0.15 } }
2039
- }, Gn = { duration: 0.15, ease: "linear" }, Wn = {
2068
+ }, Wn = { duration: 0.15, ease: "linear" }, Vn = {
2040
2069
  kpi: { category: "Métrica", specificType: "MetricComparison" },
2041
2070
  line: { category: "Gráfico", specificType: "ChartLine" },
2042
2071
  bars: { category: "Gráfico", specificType: "ChartBarV" },
@@ -2044,16 +2073,16 @@ const Fn = {
2044
2073
  donut: { category: "Gráfico", specificType: "ChartDonut" },
2045
2074
  heatmap: { category: "Tabela", specificType: "TableHeatmap" }
2046
2075
  };
2047
- function Vn(e) {
2076
+ function jn(e) {
2048
2077
  return e.cells.map((n) => n.kind);
2049
2078
  }
2050
- a(Vn, "templateKinds");
2051
- function jn(e, n) {
2052
- const i = n ?? `${e.id}-${Date.now()}`;
2079
+ a(jn, "templateKinds");
2080
+ function Un(e, n) {
2081
+ const i = nt(n ?? `${e.id}-${Date.now()}`);
2053
2082
  return e.cells.map((l, o) => {
2054
- const r = Wn[l.kind];
2083
+ const r = Vn[l.kind];
2055
2084
  return {
2056
- i: `${i}-${o}`,
2085
+ i: `${i}_${o}`,
2057
2086
  x: l.x,
2058
2087
  y: l.y,
2059
2088
  w: l.w,
@@ -2066,8 +2095,8 @@ function jn(e, n) {
2066
2095
  };
2067
2096
  });
2068
2097
  }
2069
- a(jn, "seedFromTemplate");
2070
- const Mt = [
2098
+ a(Un, "seedFromTemplate");
2099
+ const Rt = [
2071
2100
  {
2072
2101
  id: "t1",
2073
2102
  name: "Visão executiva",
@@ -2117,7 +2146,7 @@ const Mt = [
2117
2146
  desc: "Comece do zero — adicione cards conforme pensa",
2118
2147
  cells: []
2119
2148
  }
2120
- ], Wa = Mt, Rt = Ct(null), Vo = /* @__PURE__ */ a(({ children: e }) => {
2149
+ ], Va = Rt, _t = wt(null), jo = /* @__PURE__ */ a(({ children: e }) => {
2121
2150
  const [n, i] = N([]), l = ee(null), [, o] = N(0), r = W((v) => {
2122
2151
  i((s) => {
2123
2152
  const c = v.at ?? Date.now(), u = { visible: !1, ...v, at: c }, p = s.findIndex((R) => R.id === v.id);
@@ -2134,14 +2163,14 @@ const Mt = [
2134
2163
  });
2135
2164
  }, []), x = W((v) => {
2136
2165
  l.current !== v && (l.current = v, o((s) => s + 1));
2137
- }, []), d = ve(
2166
+ }, []), d = Se(
2138
2167
  () => ({ items: n, register: r, unregister: g, setVisible: h, scrollerRef: l, setScroller: x }),
2139
2168
  [n, r, g, h, x]
2140
2169
  );
2141
- return /* @__PURE__ */ t(Rt.Provider, { value: d, children: e });
2170
+ return /* @__PURE__ */ t(_t.Provider, { value: d, children: e });
2142
2171
  }, "SessionVisualizationsProvider");
2143
- function Un() {
2144
- const e = Ae(Rt), n = W(
2172
+ function Kn() {
2173
+ const e = Ee(_t), n = W(
2145
2174
  (r) => {
2146
2175
  const g = e == null ? void 0 : e.scrollerRef.current, h = g == null ? void 0 : g.querySelector(`[data-viz="${CSS.escape(r)}"]`);
2147
2176
  if (!g || !h) return;
@@ -2149,13 +2178,13 @@ function Un() {
2149
2178
  g.scrollTo({ top: Math.max(0, x), behavior: "smooth" }), h.setAttribute("data-viz-focus", "true"), window.setTimeout(() => h.removeAttribute("data-viz-focus"), 2e3);
2150
2179
  },
2151
2180
  [e]
2152
- ), i = (e == null ? void 0 : e.items) ?? Va, l = ve(() => i.filter((r) => !r.visible), [i]), o = (e == null ? void 0 : e.setScroller) ?? ja;
2181
+ ), i = (e == null ? void 0 : e.items) ?? ja, l = Se(() => i.filter((r) => !r.visible), [i]), o = (e == null ? void 0 : e.setScroller) ?? Ua;
2153
2182
  return { items: i, offscreen: l, scrollTo: n, setScroller: o };
2154
2183
  }
2155
- a(Un, "useSessionVisualizations");
2156
- const Va = [], ja = /* @__PURE__ */ a(() => {
2157
- }, "noop"), jt = 0.6, jo = /* @__PURE__ */ a(({ id: e, kind: n, title: i, group: l, preview: o, ready: r = !0, children: g }) => {
2158
- const h = Ae(Rt), x = ee(null), d = h == null ? void 0 : h.register, v = h == null ? void 0 : h.unregister, s = h == null ? void 0 : h.setVisible, c = (h == null ? void 0 : h.scrollerRef.current) ?? null;
2184
+ a(Kn, "useSessionVisualizations");
2185
+ const ja = [], Ua = /* @__PURE__ */ a(() => {
2186
+ }, "noop"), Ut = 0.6, Uo = /* @__PURE__ */ a(({ id: e, kind: n, title: i, group: l, preview: o, ready: r = !0, children: g }) => {
2187
+ const h = Ee(_t), x = ee(null), d = h == null ? void 0 : h.register, v = h == null ? void 0 : h.unregister, s = h == null ? void 0 : h.setVisible, c = (h == null ? void 0 : h.scrollerRef.current) ?? null;
2159
2188
  return q(() => {
2160
2189
  d == null || d({ id: e, kind: n, title: i, group: l, preview: o, ready: r });
2161
2190
  }, [e, n, i, l, r, d]), q(() => {
@@ -2166,11 +2195,11 @@ const Va = [], ja = /* @__PURE__ */ a(() => {
2166
2195
  if (!u || !s || typeof IntersectionObserver > "u") return;
2167
2196
  const p = new IntersectionObserver(
2168
2197
  (f) => {
2169
- for (const y of f) s(e, y.intersectionRatio >= jt);
2198
+ for (const y of f) s(e, y.intersectionRatio >= Ut);
2170
2199
  },
2171
2200
  // `root: null` would measure against the viewport, which is wrong inside a scrolling transcript —
2172
2201
  // it reports a card visible while it sits far below the pane's own fold.
2173
- { root: c, threshold: [0, jt, 1] }
2202
+ { root: c, threshold: [0, Ut, 1] }
2174
2203
  );
2175
2204
  return p.observe(u), () => p.disconnect();
2176
2205
  }, [e, c, s]), /* @__PURE__ */ t("div", { ref: x, "data-viz": e, children: g });
@@ -2186,7 +2215,7 @@ function ue(e) {
2186
2215
  };
2187
2216
  }
2188
2217
  a(ue, "resolveComposerSurfaces");
2189
- function Ua() {
2218
+ function Ka() {
2190
2219
  const e = /* @__PURE__ */ a(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }, "read"), [n, i] = N(e);
2191
2220
  return q(() => {
2192
2221
  if (typeof window > "u") return;
@@ -2194,8 +2223,8 @@ function Ua() {
2194
2223
  return window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
2195
2224
  }, []), n;
2196
2225
  }
2197
- a(Ua, "useWindowSize");
2198
- const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht = /* @__PURE__ */ a((e) => `${e.getFullYear()}-${Ut(e.getMonth() + 1)}-${Ut(e.getDate())}`, "isoDate"), Kn = /* @__PURE__ */ a((e) => {
2226
+ a(Ka, "useWindowSize");
2227
+ const Kt = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ut = /* @__PURE__ */ a((e) => `${e.getFullYear()}-${Kt(e.getMonth() + 1)}-${Kt(e.getDate())}`, "isoDate"), qn = /* @__PURE__ */ a((e) => {
2199
2228
  const n = le(), i = ue(n), l = he(), o = B((z) => {
2200
2229
  var I;
2201
2230
  return ((I = z.publishedDashboard) == null ? void 0 : I.jsFileName) ?? null;
@@ -2213,7 +2242,7 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2213
2242
  if (!r) return;
2214
2243
  const z = {}, I = /* @__PURE__ */ new Date(), U = new Date(I.getTime() - 1e3 * 3600 * 24 * 30);
2215
2244
  for (const J of r.filters ?? [])
2216
- J.mandatory && (J.filterType == "DateRangePicker" ? (z[`${J.name}_inicio`] = ht(U), z[`${J.name}_fim`] = ht(I)) : J.filterType == "DatePicker" && (z[J.name] = ht(I)));
2245
+ J.mandatory && (J.filterType == "DateRangePicker" ? (z[`${J.name}_inicio`] = ut(U), z[`${J.name}_fim`] = ut(I)) : J.filterType == "DatePicker" && (z[J.name] = ut(I)));
2217
2246
  H(z);
2218
2247
  }, [r == null ? void 0 : r.filters, r]);
2219
2248
  const L = /* @__PURE__ */ a((z) => {
@@ -2223,7 +2252,7 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2223
2252
  q(() => {
2224
2253
  L(e.defaultCollapsed ?? !1);
2225
2254
  }, [e.defaultCollapsed]);
2226
- const P = f ? "25%" : e.width, { width: _, height: $ } = Ua(), V = _ > $ ? 1.7 : 1, K = $ > _ ? 1.7 : 1, M = Math.min(_, $) * V, w = Math.min(_, $) * K, F = !!o, D = { color: n.palette.text.secondary, p: 0.5, "&:hover": { color: n.palette.text.primary, backgroundColor: i.hover } };
2255
+ const P = f ? "25%" : e.width, { width: _, height: E } = Ka(), V = _ > E ? 1.7 : 1, K = E > _ ? 1.7 : 1, M = Math.min(_, E) * V, w = Math.min(_, E) * K, F = !!o, k = { color: n.palette.text.secondary, p: 0.5, "&:hover": { color: n.palette.text.primary, backgroundColor: i.hover } };
2227
2256
  return /* @__PURE__ */ t(tt, { initial: !1, children: F && r && /* @__PURE__ */ b(
2228
2257
  re.aside,
2229
2258
  {
@@ -2235,7 +2264,7 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2235
2264
  children: [
2236
2265
  /* @__PURE__ */ b(re.div, { initial: { opacity: 0, y: 6 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.28, delay: 0.08, ease: "easeOut" }, style: { display: "inline-flex", flexDirection: "column", minHeight: 0, position: "relative", height: "100%" }, children: [
2237
2266
  /* @__PURE__ */ b(S, { sx: { display: "inline-flex", alignItems: "center", width: "100%", gap: 1, px: 1.75, py: 1.25, borderBottom: `1px solid ${n.palette.divider}`, backgroundColor: n.palette.background.paper }, children: [
2238
- /* @__PURE__ */ t(S, { sx: { color: n.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(ke, { size: 15 }) }),
2267
+ /* @__PURE__ */ t(S, { sx: { color: n.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 15 }) }),
2239
2268
  /* @__PURE__ */ t(X, { sx: { color: n.palette.text.primary, fontWeight: 500, fontSize: 12.5, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: d }),
2240
2269
  !f && /* @__PURE__ */ b(Te, { children: [
2241
2270
  /* @__PURE__ */ t(X, { sx: { color: n.palette.text.disabled, fontSize: 11, flexShrink: 0 }, children: "·" }),
@@ -2246,13 +2275,13 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2246
2275
  ] })
2247
2276
  ] }),
2248
2277
  /* @__PURE__ */ t(S, { sx: { flex: 1 } }),
2249
- /* @__PURE__ */ t(ce, { title: "Atualizar dados (ignora cache)", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => c((z) => z + 1), "onClick"), sx: D, "aria-label": "Atualizar dados", children: /* @__PURE__ */ t(ln, { sx: { fontSize: 18 } }) }) }),
2250
- /* @__PURE__ */ t(ce, { title: f ? "Expandir" : "Diminuir", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => L(!f), "onClick"), sx: D, "aria-label": f ? "Expandir" : "Diminuir", children: /* @__PURE__ */ t(Le, { size: 14 }) }) }),
2251
- /* @__PURE__ */ t(ce, { title: "Tela cheia", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => p(!0), "onClick"), sx: D, "aria-label": "Abrir em tela cheia", children: /* @__PURE__ */ t(ji, { sx: { fontSize: "18px" } }) }) })
2278
+ /* @__PURE__ */ t(ce, { title: "Atualizar dados (ignora cache)", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => c((z) => z + 1), "onClick"), sx: k, "aria-label": "Atualizar dados", children: /* @__PURE__ */ t(sn, { sx: { fontSize: 18 } }) }) }),
2279
+ /* @__PURE__ */ t(ce, { title: f ? "Expandir" : "Diminuir", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => L(!f), "onClick"), sx: k, "aria-label": f ? "Expandir" : "Diminuir", children: /* @__PURE__ */ t(Le, { size: 14 }) }) }),
2280
+ /* @__PURE__ */ t(ce, { title: "Tela cheia", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => p(!0), "onClick"), sx: k, "aria-label": "Abrir em tela cheia", children: /* @__PURE__ */ t(Ui, { sx: { fontSize: "18px" } }) }) })
2252
2281
  ] }),
2253
2282
  /* @__PURE__ */ b(S, { sx: { display: "inline-flex", height: "100%", width: "100%", minHeight: 0, overflow: "auto", backgroundColor: n.palette.background.default }, children: [
2254
2283
  x && !f && /* @__PURE__ */ t(
2255
- _e,
2284
+ Re,
2256
2285
  {
2257
2286
  dragLocked: !1,
2258
2287
  llmRenderCount: g + s,
@@ -2264,12 +2293,12 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2264
2293
  },
2265
2294
  x
2266
2295
  ),
2267
- x && f && /* @__PURE__ */ t(ci, { llmRenderCount: g + s, codeGeneration: h, dashboard: r, parameters: R }, x)
2296
+ x && f && /* @__PURE__ */ t(pi, { llmRenderCount: g + s, codeGeneration: h, dashboard: r, parameters: R }, x)
2268
2297
  ] })
2269
2298
  ] }),
2270
- /* @__PURE__ */ b(cn, { open: u, onClose: /* @__PURE__ */ a(() => p(!1), "onClose"), maxWidth: !1, fullScreen: !0, slotProps: { paper: { sx: { backgroundColor: n.palette.background.default, backgroundImage: "none", color: n.palette.text.primary } } }, children: [
2299
+ /* @__PURE__ */ b(pn, { open: u, onClose: /* @__PURE__ */ a(() => p(!1), "onClose"), maxWidth: !1, fullScreen: !0, slotProps: { paper: { sx: { backgroundColor: n.palette.background.default, backgroundImage: "none", color: n.palette.text.primary } } }, children: [
2271
2300
  /* @__PURE__ */ b(S, { sx: { display: "flex", alignItems: "center", gap: 1, px: 2, py: 1.25, borderBottom: `1px solid ${n.palette.divider}`, backgroundColor: n.palette.background.paper, flexShrink: 0 }, children: [
2272
- /* @__PURE__ */ t(S, { sx: { color: n.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(ke, { size: 16 }) }),
2301
+ /* @__PURE__ */ t(S, { sx: { color: n.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 16 }) }),
2273
2302
  /* @__PURE__ */ t(X, { sx: { color: n.palette.text.primary, fontWeight: 500, fontSize: 13.5 }, children: d }),
2274
2303
  /* @__PURE__ */ t(X, { sx: { color: n.palette.text.disabled, fontSize: 12 }, children: "·" }),
2275
2304
  /* @__PURE__ */ b(X, { sx: { fontFamily: i.fontFamilyMono, color: n.palette.text.secondary, fontSize: 12 }, children: [
@@ -2278,18 +2307,18 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2278
2307
  v === 1 ? "card" : "cards"
2279
2308
  ] }),
2280
2309
  /* @__PURE__ */ t(S, { sx: { flex: 1 } }),
2281
- /* @__PURE__ */ t(ce, { title: "Fechar", placement: "left", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => p(!1), "onClick"), sx: { ...D, p: 0.75 }, "aria-label": "Fechar", children: /* @__PURE__ */ t(Dt, { size: 14 }) }) })
2310
+ /* @__PURE__ */ t(ce, { title: "Fechar", placement: "left", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => p(!1), "onClick"), sx: { ...k, p: 0.75 }, "aria-label": "Fechar", children: /* @__PURE__ */ t(Dt, { size: 14 }) }) })
2282
2311
  ] }),
2283
- /* @__PURE__ */ t(S, { sx: { width: "100%", justifyContent: "center", display: "inline-flex" }, children: /* @__PURE__ */ t(S, { sx: { minHeight: 0, overflow: "hidden", width: M, height: w, backgroundColor: n.palette.background.default }, children: x && /* @__PURE__ */ t(_e, { dragLocked: !1, llmRenderCount: g, codeGeneration: h, dashboard: r }, x) }) })
2312
+ /* @__PURE__ */ t(S, { sx: { width: "100%", justifyContent: "center", display: "inline-flex" }, children: /* @__PURE__ */ t(S, { sx: { minHeight: 0, overflow: "hidden", width: M, height: w, backgroundColor: n.palette.background.default }, children: x && /* @__PURE__ */ t(Re, { dragLocked: !1, llmRenderCount: g, codeGeneration: h, dashboard: r }, x) }) })
2284
2313
  ] })
2285
2314
  ]
2286
2315
  },
2287
2316
  "dashboard-side-panel"
2288
2317
  ) });
2289
2318
  }, "DashboardSidePanelInner");
2290
- Kn.displayName = "DashboardSidePanel";
2291
- const qn = He.memo(Kn), Ka = it(we), qa = [], We = /* @__PURE__ */ a(({ children: e }) => /* @__PURE__ */ t(X, { sx: /* @__PURE__ */ a((n) => ({ fontSize: 9.5, color: n.palette.text.disabled, textTransform: "uppercase", letterSpacing: 0.6, fontWeight: 500, lineHeight: 1.6 }), "sx"), children: e }), "RailSectionLabel");
2292
- function Kt(e, n) {
2319
+ qn.displayName = "DashboardSidePanel";
2320
+ const Yn = He.memo(qn), qa = at(we), Ya = [], We = /* @__PURE__ */ a(({ children: e }) => /* @__PURE__ */ t(X, { sx: /* @__PURE__ */ a((n) => ({ fontSize: 9.5, color: n.palette.text.disabled, textTransform: "uppercase", letterSpacing: 0.6, fontWeight: 500, lineHeight: 1.6 }), "sx"), children: e }), "RailSectionLabel");
2321
+ function qt(e, n) {
2293
2322
  const i = new Map(e.map((h) => [h.i, h])), l = new Map(n.map((h) => [h.i, h]));
2294
2323
  let o = 0, r = 0, g = 0;
2295
2324
  for (const [h, x] of i) {
@@ -2299,8 +2328,8 @@ function Kt(e, n) {
2299
2328
  for (const h of l.keys()) i.has(h) || r++;
2300
2329
  return { added: o, removed: r, modified: g };
2301
2330
  }
2302
- a(Kt, "diffById");
2303
- function qt(e, n, i) {
2331
+ a(qt, "diffById");
2332
+ function Yt(e, n, i) {
2304
2333
  return {
2305
2334
  background: n.raised,
2306
2335
  border: `1px solid ${e.palette.divider}`,
@@ -2321,9 +2350,9 @@ function qt(e, n, i) {
2321
2350
  "&:hover": i ? void 0 : { backgroundColor: n.hover }
2322
2351
  };
2323
2352
  }
2324
- a(qt, "railActionPill");
2325
- const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType: l, onLayoutTypeChange: o, onAddGenericCard: r, onAddTypedCard: g, onAddFilter: h, cardsOpened: x, filters: d, onEditFilter: v, onDeleteFilter: s, datasetControls: c }) => {
2326
- const u = le(), p = ue(u), f = Me(), [y, R] = N(null), [H, L] = N(null), P = ee(null), [_, $] = N(!1);
2353
+ a(Yt, "railActionPill");
2354
+ const Ja = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType: l, onLayoutTypeChange: o, onAddGenericCard: r, onAddTypedCard: g, onAddFilter: h, cardsOpened: x, filters: d, onEditFilter: v, onDeleteFilter: s, datasetControls: c }) => {
2355
+ const u = le(), p = ue(u), f = Ae(), [y, R] = N(null), [H, L] = N(null), P = ee(null), [_, E] = N(!1);
2327
2356
  q(() => {
2328
2357
  P.current && x && P.current.click();
2329
2358
  }, [x]);
@@ -2336,7 +2365,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2336
2365
  style: { flexShrink: 0, display: "flex", flexDirection: "column", borderRight: `1px solid ${p.borderSoft}`, backgroundColor: u.palette.background.paper, overflow: "hidden", minHeight: 0 },
2337
2366
  children: [
2338
2367
  /* @__PURE__ */ b(S, { sx: { flexShrink: 0, display: "flex", alignItems: "center", gap: 0.625, pl: 1, pr: 1, py: 1.5, borderBottom: `1px solid ${p.borderSoft}` }, children: [
2339
- /* @__PURE__ */ t(ce, { title: _ ? "Expandir painel" : "Recolher painel", placement: "right", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => $((w) => !w), "onClick"), sx: { color: u.palette.text.primary, p: 0.5, flexShrink: 0, "&:hover": { color: u.palette.primary.main } }, "aria-label": _ ? "Expandir painel" : "Recolher painel", children: /* @__PURE__ */ t(Le, { size: 13 }) }) }),
2368
+ /* @__PURE__ */ t(ce, { title: _ ? "Expandir painel" : "Recolher painel", placement: "right", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => E((w) => !w), "onClick"), sx: { color: u.palette.text.primary, p: 0.5, flexShrink: 0, "&:hover": { color: u.palette.primary.main } }, "aria-label": _ ? "Expandir painel" : "Recolher painel", children: /* @__PURE__ */ t(Le, { size: 13 }) }) }),
2340
2369
  !_ && /* @__PURE__ */ t(X, { sx: { color: u.palette.text.primary, fontWeight: 500, fontSize: 11.5, lineHeight: 1.2, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: "Desenhe seu prompt" })
2341
2370
  ] }),
2342
2371
  !_ && /* @__PURE__ */ b(S, { sx: { flex: 1, minHeight: 0, overflowY: "auto", display: "flex", flexDirection: "column" }, children: [
@@ -2355,15 +2384,15 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2355
2384
  "data-env-id": "dashboardpad-add-card",
2356
2385
  "data-env-key": "dashboardpad-add-card-dropdown",
2357
2386
  className: "llm-env-target llm-env-dashboard-action",
2358
- sx: qt(u, p, e),
2387
+ sx: Yt(u, p, e),
2359
2388
  children: [
2360
- /* @__PURE__ */ t(yt, { size: 11 }),
2389
+ /* @__PURE__ */ t(bt, { size: 11 }),
2361
2390
  /* @__PURE__ */ t(S, { component: "span", children: "Card" })
2362
2391
  ]
2363
2392
  }
2364
2393
  ),
2365
- /* @__PURE__ */ b(S, { component: "button", onClick: /* @__PURE__ */ a((w) => L(w.currentTarget), "onClick"), disabled: e, "data-env-id": "dashboardpad-add-filter", className: "llm-env-target llm-env-dashboard-action", sx: qt(u, p, e), children: [
2366
- /* @__PURE__ */ t(Ji, { size: 11 }),
2394
+ /* @__PURE__ */ b(S, { component: "button", onClick: /* @__PURE__ */ a((w) => L(w.currentTarget), "onClick"), disabled: e, "data-env-id": "dashboardpad-add-filter", className: "llm-env-target llm-env-dashboard-action", sx: Yt(u, p, e), children: [
2395
+ /* @__PURE__ */ t(Xi, { size: 11 }),
2367
2396
  /* @__PURE__ */ t(S, { component: "span", children: "Filtro" })
2368
2397
  ] })
2369
2398
  ] }),
@@ -2372,7 +2401,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2372
2401
  "Filtros · ",
2373
2402
  d.length
2374
2403
  ] }),
2375
- d.map((w) => /* @__PURE__ */ t(At, { filter: w, onEdit: v, onDelete: s }, w.i))
2404
+ d.map((w) => /* @__PURE__ */ t(Mt, { filter: w, onEdit: v, onDelete: s }, w.i))
2376
2405
  ] }) : /* @__PURE__ */ t(S, { sx: { p: 1, display: "flex", alignItems: "flex-start" }, children: /* @__PURE__ */ b(X, { sx: { fontSize: 10, color: u.palette.text.disabled, fontStyle: "italic", lineHeight: 1.4 }, children: [
2377
2406
  "Nenhum filtro ainda. Use ",
2378
2407
  /* @__PURE__ */ t("b", { children: "+ Filtro" }),
@@ -2381,7 +2410,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2381
2410
  /* @__PURE__ */ b(S, { sx: { ...V, borderBottom: "none", borderTop: `1px solid ${p.borderSoft}` }, children: [
2382
2411
  /* @__PURE__ */ t(We, { children: "Layout" }),
2383
2412
  /* @__PURE__ */ b(
2384
- aa,
2413
+ oa,
2385
2414
  {
2386
2415
  exclusive: !0,
2387
2416
  size: "small",
@@ -2405,8 +2434,8 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2405
2434
  }
2406
2435
  },
2407
2436
  children: [
2408
- /* @__PURE__ */ t(Wt, { value: "Boxed", "data-env-id": "dashboard-pad-layout-boxed", children: "Boxed" }),
2409
- /* @__PURE__ */ t(Wt, { value: "Naked", "data-env-id": "dashboard-pad-layout-naked", children: "Naked" })
2437
+ /* @__PURE__ */ t(Vt, { value: "Boxed", "data-env-id": "dashboard-pad-layout-boxed", children: "Boxed" }),
2438
+ /* @__PURE__ */ t(Vt, { value: "Naked", "data-env-id": "dashboard-pad-layout-naked", children: "Naked" })
2410
2439
  ]
2411
2440
  }
2412
2441
  )
@@ -2416,25 +2445,25 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2416
2445
  c
2417
2446
  ] })
2418
2447
  ] }),
2419
- /* @__PURE__ */ t(Gt, { open: !!y, anchorEl: y, onClose: /* @__PURE__ */ a(() => R(null), "onClose"), anchorOrigin: { vertical: "top", horizontal: "right" }, transformOrigin: { vertical: "top", horizontal: "left" }, slotProps: { paper: { sx: M } }, children: /* @__PURE__ */ b(Lt, { dense: !0, children: [
2448
+ /* @__PURE__ */ t(Wt, { open: !!y, anchorEl: y, onClose: /* @__PURE__ */ a(() => R(null), "onClose"), anchorOrigin: { vertical: "top", horizontal: "right" }, transformOrigin: { vertical: "top", horizontal: "left" }, slotProps: { paper: { sx: M } }, children: /* @__PURE__ */ b(Gt, { dense: !0, children: [
2420
2449
  /* @__PURE__ */ b(
2421
- dt,
2450
+ ct,
2422
2451
  {
2423
2452
  onClick: /* @__PURE__ */ a(() => {
2424
2453
  r(), R(null);
2425
2454
  }, "onClick"),
2426
2455
  sx: K,
2427
2456
  children: [
2428
- /* @__PURE__ */ t(lt, { sx: { color: u.palette.primary.main, minWidth: 28 }, children: /* @__PURE__ */ t(yt, { size: 14 }) }),
2429
- /* @__PURE__ */ t(st, { primaryTypographyProps: { fontSize: 12, fontWeight: 500 }, secondaryTypographyProps: { fontSize: 10.5, color: u.palette.text.disabled }, primary: "Genérico", secondary: "Card sem tipo definido — você ou o agente preenche depois" })
2457
+ /* @__PURE__ */ t(st, { sx: { color: u.palette.primary.main, minWidth: 28 }, children: /* @__PURE__ */ t(bt, { size: 14 }) }),
2458
+ /* @__PURE__ */ t(dt, { primaryTypographyProps: { fontSize: 12, fontWeight: 500 }, secondaryTypographyProps: { fontSize: 10.5, color: u.palette.text.disabled }, primary: "Genérico", secondary: "Card sem tipo definido — você ou o agente preenche depois" })
2430
2459
  ]
2431
2460
  }
2432
2461
  ),
2433
- /* @__PURE__ */ t(Ht, { sx: { borderColor: p.borderSoft } }),
2434
- Object.entries(Ka).map(([w, F], D) => {
2462
+ /* @__PURE__ */ t(Lt, { sx: { borderColor: p.borderSoft } }),
2463
+ Object.entries(qa).map(([w, F], k) => {
2435
2464
  const z = f.category[w];
2436
2465
  return /* @__PURE__ */ b(S, { children: [
2437
- D > 0 && /* @__PURE__ */ t(Ht, { sx: { borderColor: p.borderSoft } }),
2466
+ k > 0 && /* @__PURE__ */ t(Lt, { sx: { borderColor: p.borderSoft } }),
2438
2467
  /* @__PURE__ */ b(X, { sx: { px: 2, pt: 1, pb: 0.5, fontSize: 10, textTransform: "uppercase", letterSpacing: 0.6, color: u.palette.text.disabled, display: "flex", alignItems: "center", gap: 0.5 }, children: [
2439
2468
  /* @__PURE__ */ t(z, { fontSize: "inherit" }),
2440
2469
  " ",
@@ -2443,15 +2472,15 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2443
2472
  F.map((I) => {
2444
2473
  const U = f.specificType[I.specificType];
2445
2474
  return /* @__PURE__ */ b(
2446
- dt,
2475
+ ct,
2447
2476
  {
2448
2477
  onClick: /* @__PURE__ */ a(() => {
2449
2478
  g(I.category, I.specificType), R(null);
2450
2479
  }, "onClick"),
2451
2480
  sx: K,
2452
2481
  children: [
2453
- /* @__PURE__ */ t(lt, { sx: { color: u.palette.text.secondary, minWidth: 28 }, children: /* @__PURE__ */ t(U, { fontSize: "small" }) }),
2454
- /* @__PURE__ */ t(st, { primaryTypographyProps: { fontSize: 12 }, children: I.label })
2482
+ /* @__PURE__ */ t(st, { sx: { color: u.palette.text.secondary, minWidth: 28 }, children: /* @__PURE__ */ t(U, { fontSize: "small" }) }),
2483
+ /* @__PURE__ */ t(dt, { primaryTypographyProps: { fontSize: 12 }, children: I.label })
2455
2484
  ]
2456
2485
  },
2457
2486
  I.specificType
@@ -2460,18 +2489,18 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2460
2489
  ] }, w);
2461
2490
  })
2462
2491
  ] }) }),
2463
- /* @__PURE__ */ t(Gt, { open: !!H, anchorEl: H, onClose: /* @__PURE__ */ a(() => L(null), "onClose"), anchorOrigin: { vertical: "top", horizontal: "right" }, transformOrigin: { vertical: "top", horizontal: "left" }, slotProps: { paper: { sx: { ...M, minWidth: 220, maxHeight: void 0 } } }, children: /* @__PURE__ */ t(Lt, { dense: !0, children: It.map((w) => {
2492
+ /* @__PURE__ */ t(Wt, { open: !!H, anchorEl: H, onClose: /* @__PURE__ */ a(() => L(null), "onClose"), anchorOrigin: { vertical: "top", horizontal: "right" }, transformOrigin: { vertical: "top", horizontal: "left" }, slotProps: { paper: { sx: { ...M, minWidth: 220, maxHeight: void 0 } } }, children: /* @__PURE__ */ t(Gt, { dense: !0, children: zt.map((w) => {
2464
2493
  const F = f.filterType[w.filterType];
2465
2494
  return /* @__PURE__ */ b(
2466
- dt,
2495
+ ct,
2467
2496
  {
2468
2497
  onClick: /* @__PURE__ */ a(() => {
2469
2498
  h(w.filterType), L(null);
2470
2499
  }, "onClick"),
2471
2500
  sx: K,
2472
2501
  children: [
2473
- /* @__PURE__ */ t(lt, { sx: { color: u.palette.text.secondary, minWidth: 28 }, children: /* @__PURE__ */ t(F, { fontSize: "small" }) }),
2474
- /* @__PURE__ */ t(st, { primaryTypographyProps: { fontSize: 12 }, children: w.label })
2502
+ /* @__PURE__ */ t(st, { sx: { color: u.palette.text.secondary, minWidth: 28 }, children: /* @__PURE__ */ t(F, { fontSize: "small" }) }),
2503
+ /* @__PURE__ */ t(dt, { primaryTypographyProps: { fontSize: 12 }, children: w.label })
2475
2504
  ]
2476
2505
  },
2477
2506
  w.filterType
@@ -2481,7 +2510,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2481
2510
  }
2482
2511
  );
2483
2512
  }, "LeftRail");
2484
- function Yn(e) {
2513
+ function Jn(e) {
2485
2514
  const [n, i] = N(!1), l = ee(!0);
2486
2515
  return q(() => {
2487
2516
  if (l.current) {
@@ -2493,8 +2522,8 @@ function Yn(e) {
2493
2522
  return () => window.clearTimeout(o);
2494
2523
  }, [e]), n;
2495
2524
  }
2496
- a(Yn, "usePulseTooltip");
2497
- const Jn = /* @__PURE__ */ a((e, n, i) => ({
2525
+ a(Jn, "usePulseTooltip");
2526
+ const Xn = /* @__PURE__ */ a((e, n, i) => ({
2498
2527
  initial: i > 0 ? { scale: 1.18, backgroundColor: e.palette.primary.main, borderColor: e.palette.primary.main } : !1,
2499
2528
  animate: { scale: 1, backgroundColor: n.raised, borderColor: e.palette.divider },
2500
2529
  transition: { duration: 2, ease: [0.22, 0.8, 0.32, 1] },
@@ -2515,7 +2544,7 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2515
2544
  color: e.palette.text.primary,
2516
2545
  transformOrigin: "center center"
2517
2546
  }
2518
- }), "chipMotionProps"), Xn = /* @__PURE__ */ a(({ cardCount: e, surfaces: n }) => /* @__PURE__ */ b(Te, { children: [
2547
+ }), "chipMotionProps"), Zn = /* @__PURE__ */ a(({ cardCount: e, surfaces: n }) => /* @__PURE__ */ b(Te, { children: [
2519
2548
  /* @__PURE__ */ t(S, { sx: /* @__PURE__ */ a((i) => ({ color: i.palette.primary.main, display: "inline-flex" }), "sx"), children: /* @__PURE__ */ t(Le, { size: 12 }) }),
2520
2549
  /* @__PURE__ */ t(S, { component: "span", sx: { fontWeight: 500 }, children: "Sketch" }),
2521
2550
  /* @__PURE__ */ t(S, { component: "span", sx: /* @__PURE__ */ a((i) => ({ color: i.palette.text.disabled }), "sx"), children: "·" }),
@@ -2524,8 +2553,8 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2524
2553
  " ",
2525
2554
  e === 1 ? "card" : "cards"
2526
2555
  ] })
2527
- ] }), "ChipHead"), Ja = /* @__PURE__ */ a(({ cardCount: e, expanded: n, locked: i, onToggle: l, pulseTick: o = 0 }) => {
2528
- const r = le(), g = ue(r), h = Yn(o);
2556
+ ] }), "ChipHead"), Xa = /* @__PURE__ */ a(({ cardCount: e, expanded: n, locked: i, onToggle: l, pulseTick: o = 0 }) => {
2557
+ const r = le(), g = ue(r), h = Jn(o);
2529
2558
  return /* @__PURE__ */ t(
2530
2559
  ce,
2531
2560
  {
@@ -2537,8 +2566,8 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2537
2566
  disableHoverListener: !0,
2538
2567
  disableFocusListener: !0,
2539
2568
  disableTouchListener: !0,
2540
- children: /* @__PURE__ */ b(re.div, { ...Jn(r, g, o), children: [
2541
- /* @__PURE__ */ t(Xn, { cardCount: e, surfaces: g }),
2569
+ children: /* @__PURE__ */ b(re.div, { ...Xn(r, g, o), children: [
2570
+ /* @__PURE__ */ t(Zn, { cardCount: e, surfaces: g }),
2542
2571
  /* @__PURE__ */ t(ce, { title: n ? "Recolher sketch" : "Editar sketch", placement: "top", children: /* @__PURE__ */ t(
2543
2572
  S,
2544
2573
  {
@@ -2563,14 +2592,14 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2563
2592
  transition: "background-color 2s, border-color 2s",
2564
2593
  "&:hover": i ? void 0 : { backgroundColor: g.hover, borderColor: r.palette.primary.main }
2565
2594
  },
2566
- children: n ? /* @__PURE__ */ t(Le, { size: 13 }) : /* @__PURE__ */ t(oa, { sx: { fontSize: 14 } })
2595
+ children: n ? /* @__PURE__ */ t(Le, { size: 13 }) : /* @__PURE__ */ t(ra, { sx: { fontSize: 14 } })
2567
2596
  }
2568
2597
  ) })
2569
2598
  ] }, o + i.toString())
2570
2599
  }
2571
2600
  );
2572
- }, "SketchChip"), Xa = /* @__PURE__ */ a(({ cardCount: e, locked: n, onCreate: i, pulseTick: l = 0 }) => {
2573
- const o = le(), r = ue(o), g = Yn(l), h = n || !i;
2601
+ }, "SketchChip"), Za = /* @__PURE__ */ a(({ cardCount: e, locked: n, onCreate: i, pulseTick: l = 0 }) => {
2602
+ const o = le(), r = ue(o), g = Jn(l), h = n || !i;
2574
2603
  return /* @__PURE__ */ t(
2575
2604
  ce,
2576
2605
  {
@@ -2581,8 +2610,8 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2581
2610
  disableHoverListener: !0,
2582
2611
  disableFocusListener: !0,
2583
2612
  disableTouchListener: !0,
2584
- children: /* @__PURE__ */ b(re.div, { ...Jn(o, r, l), children: [
2585
- /* @__PURE__ */ t(Xn, { cardCount: e, surfaces: r }),
2613
+ children: /* @__PURE__ */ b(re.div, { ...Xn(o, r, l), children: [
2614
+ /* @__PURE__ */ t(Zn, { cardCount: e, surfaces: r }),
2586
2615
  /* @__PURE__ */ b(
2587
2616
  S,
2588
2617
  {
@@ -2610,7 +2639,7 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2610
2639
  "&:hover": h ? void 0 : { backgroundColor: r.hover, borderColor: o.palette.primary.main }
2611
2640
  },
2612
2641
  children: [
2613
- /* @__PURE__ */ t(S, { sx: { color: o.palette.primary.main, display: "inline-flex", backgroundColor: o.palette.background.default, borderRadius: 999, p: 0.25, border: `1px solid ${r.borderSoft}` }, children: /* @__PURE__ */ t(yt, { size: 11 }) }),
2642
+ /* @__PURE__ */ t(S, { sx: { color: o.palette.primary.main, display: "inline-flex", backgroundColor: o.palette.background.default, borderRadius: 999, p: 0.25, border: `1px solid ${r.borderSoft}` }, children: /* @__PURE__ */ t(bt, { size: 11 }) }),
2614
2643
  /* @__PURE__ */ t(S, { component: "span", sx: { fontWeight: 500 }, children: "Adicionar sketch" }),
2615
2644
  /* @__PURE__ */ t(S, { component: "span", sx: { color: o.palette.text.disabled, fontFamily: r.fontFamilyMono, fontSize: 10.5 }, children: "desenhe o layout antes de pedir" })
2616
2645
  ]
@@ -2619,7 +2648,7 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2619
2648
  ] }, l)
2620
2649
  }
2621
2650
  );
2622
- }, "AddSketchChip"), Zn = wt(({ onCreateSketch: e, onBeforeSend: n, sketchExpanded: i, bottomSlot: l, zoomLevel: o, onSketchExpandedChange: r, seedDraft: g, compact: h, datasetControls: x, renderDescription: d }, v) => {
2651
+ }, "AddSketchChip"), Qn = Tt(({ onCreateSketch: e, onBeforeSend: n, sketchExpanded: i, bottomSlot: l, zoomLevel: o, onSketchExpandedChange: r, seedDraft: g, compact: h, datasetControls: x, renderDescription: d }, v) => {
2623
2652
  const s = he(), [c, u] = N(g);
2624
2653
  q(() => {
2625
2654
  u(g);
@@ -2639,23 +2668,23 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2639
2668
  }), P = B((T) => T.currentSessionId), _ = B((T) => {
2640
2669
  var O;
2641
2670
  return (O = T.dashboardDefinition) == null ? void 0 : O.filters;
2642
- }) ?? qa, $ = B((T) => {
2671
+ }) ?? Ya, E = B((T) => {
2643
2672
  var O;
2644
2673
  return ((O = T.dashboardDefinition) == null ? void 0 : O.layoutType) ?? "Boxed";
2645
2674
  }), V = B((T) => T.turnOpen), K = B((T) => {
2646
2675
  var O;
2647
2676
  return ((O = T.dashboardDefinition) == null ? void 0 : O.clientSideChanges) ?? null;
2648
- }), M = B((T) => T.dashboardDefinition), w = B((T) => T.lastSentDashboard), [F, D] = N(!1), z = ve(() => {
2677
+ }), M = B((T) => T.dashboardDefinition), w = B((T) => T.lastSentDashboard), [F, k] = N(!1), z = Se(() => {
2649
2678
  if (!M && !w) return { hasAny: !1, text: null };
2650
2679
  if (!M || !w) return { hasAny: !0, text: "Sketch alterado" };
2651
- const T = Kt(M.cards ?? [], w.cards ?? []), O = Kt(M.filters ?? [], w.filters ?? []), ae = (M.name ?? "") !== (w.name ?? ""), fe = (M.layoutType ?? "Boxed") !== (w.layoutType ?? "Boxed");
2680
+ const T = qt(M.cards ?? [], w.cards ?? []), O = qt(M.filters ?? [], w.filters ?? []), ae = (M.name ?? "") !== (w.name ?? ""), fe = (M.layoutType ?? "Boxed") !== (w.layoutType ?? "Boxed");
2652
2681
  if (T.added + T.removed + T.modified + O.added + O.removed + O.modified === 0 && !ae && !fe) return { hasAny: !1, text: null };
2653
2682
  const pe = [];
2654
2683
  return T.added && pe.push(`+${T.added} ${T.added === 1 ? "card" : "cards"}`), T.removed && pe.push(`-${T.removed} ${T.removed === 1 ? "card" : "cards"}`), T.modified && pe.push(`${T.modified} ${T.modified === 1 ? "card alterado" : "cards alterados"}`), O.added && pe.push(`+${O.added} ${O.added === 1 ? "filtro" : "filtros"}`), O.removed && pe.push(`-${O.removed} ${O.removed === 1 ? "filtro" : "filtros"}`), O.modified && pe.push(`${O.modified} ${O.modified === 1 ? "filtro alterado" : "filtros alterados"}`), pe.length === 0 && pe.push("Sketch alterado"), { hasAny: !0, text: pe.join(" · ") };
2655
2684
  }, [M, w]), I = z.hasAny, U = z.text, J = !!y || H > 0 || L > 0, Q = /* @__PURE__ */ a(async (T) => {
2656
2685
  u(""), s.getState().commitForSend(), n && await n(T);
2657
2686
  }, "handleOnBefore"), ne = i ?? !1, de = /* @__PURE__ */ a((T) => r == null ? void 0 : r(T), "setSketchExpanded"), me = /* @__PURE__ */ a(() => {
2658
- D(!0), setTimeout(() => D(!1), 1e3);
2687
+ k(!0), setTimeout(() => k(!1), 1e3);
2659
2688
  }, "handleForceOpenCard"), ge = /* @__PURE__ */ a((T) => {
2660
2689
  const O = T.length === 0 ? "Untitled Dashboard" : T;
2661
2690
  s.getState().recordSketchChange("dashboard:name", `Renamed dashboard to '${O}'`), s.getState().updateDashboard({ name: O });
@@ -2670,37 +2699,37 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2670
2699
  }, "handleAddTypedCard"), m = /* @__PURE__ */ a((T) => {
2671
2700
  var O;
2672
2701
  return (O = p.current) == null ? void 0 : O.handleAddFilter(T);
2673
- }, "handleAddFilter"), k = /* @__PURE__ */ a((T) => {
2702
+ }, "handleAddFilter"), D = /* @__PURE__ */ a((T) => {
2674
2703
  var ae;
2675
2704
  const O = ((ae = s.getState().dashboardDefinition) == null ? void 0 : ae.filters) ?? [];
2676
2705
  s.getState().recordSketchChange(`filter:${T.i}:edit`, `Edited filter '${T.name}'`), s.getState().updateDashboard({ filters: O.map((fe) => fe.i === T.i ? { ...T } : fe) });
2677
- }, "handleEditFilter"), E = /* @__PURE__ */ a((T) => {
2706
+ }, "handleEditFilter"), $ = /* @__PURE__ */ a((T) => {
2678
2707
  var fe;
2679
- const O = ((fe = s.getState().dashboardDefinition) == null ? void 0 : fe.filters) ?? [], ae = O.find((Se) => Se.i === T);
2680
- s.getState().recordSketchChange(`filter:${T}:delete`, `Deleted filter '${(ae == null ? void 0 : ae.name) ?? T}'`), s.getState().updateDashboard({ filters: O.filter((Se) => Se.i !== T) });
2708
+ const O = ((fe = s.getState().dashboardDefinition) == null ? void 0 : fe.filters) ?? [], ae = O.find((Ce) => Ce.i === T);
2709
+ s.getState().recordSketchChange(`filter:${T}:delete`, `Deleted filter '${(ae == null ? void 0 : ae.name) ?? T}'`), s.getState().updateDashboard({ filters: O.filter((Ce) => Ce.i !== T) });
2681
2710
  }, "handleDeleteFilter"), G = /* @__PURE__ */ b(S, { sx: { display: "flex", flexDirection: "column" }, children: [
2682
2711
  /* @__PURE__ */ b(tt, { mode: "wait", initial: !1, children: [
2683
- !J && !ne && /* @__PURE__ */ t(re.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.18, ease: "easeOut" }, children: /* @__PURE__ */ t(S, { sx: { px: 1.25, py: 1, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ t(Xa, { onCreate: e, locked: V, cardCount: H, pulseTick: f }) }) }, "add-sketch"),
2712
+ !J && !ne && /* @__PURE__ */ t(re.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.18, ease: "easeOut" }, children: /* @__PURE__ */ t(S, { sx: { px: 1.25, py: 1, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ t(Za, { onCreate: e, locked: V, cardCount: H, pulseTick: f }) }) }, "add-sketch"),
2684
2713
  ne && /* @__PURE__ */ t(re.div, { style: { overflow: "hidden" }, initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.25, ease: "easeOut" }, children: /* @__PURE__ */ b(S, { sx: /* @__PURE__ */ a((T) => ({ flexShrink: 0, height: "min(50vh, 300px)", minHeight: 280, display: "flex", flexDirection: "row", overflow: "auto", background: T.palette.background.default }), "sx"), children: [
2685
2714
  /* @__PURE__ */ t(
2686
- Ya,
2715
+ Ja,
2687
2716
  {
2688
2717
  locked: V,
2689
2718
  name: R,
2690
2719
  onNameChange: ge,
2691
- layoutType: $,
2720
+ layoutType: E,
2692
2721
  onLayoutTypeChange: C,
2693
2722
  onAddGenericCard: A,
2694
2723
  onAddTypedCard: Y,
2695
2724
  onAddFilter: m,
2696
2725
  cardsOpened: F,
2697
2726
  filters: _,
2698
- onEditFilter: k,
2699
- onDeleteFilter: E,
2727
+ onEditFilter: D,
2728
+ onDeleteFilter: $,
2700
2729
  datasetControls: x
2701
2730
  }
2702
2731
  ),
2703
- /* @__PURE__ */ t(S, { sx: { flex: 1, pt: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ t(ot, { ref: p, zoomLevel: o, onAddCard: me, renderId: "composer-pad", hideInternalHeader: !0, hideFiltersInSketch: !0, renderDescription: d }) })
2732
+ /* @__PURE__ */ t(S, { sx: { flex: 1, pt: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ t(rt, { ref: p, zoomLevel: o, onAddCard: me, renderId: "composer-pad", hideInternalHeader: !0, hideFiltersInSketch: !0, renderDescription: d }) })
2704
2733
  ] }) }, "sketch-expanded")
2705
2734
  ] }),
2706
2735
  J && /* @__PURE__ */ t(
@@ -2711,20 +2740,20 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2711
2740
  exit: { opacity: J ? 1 : 0, height: 0, display: "flex" },
2712
2741
  transition: { duration: 0.5, ease: "easeInOut" },
2713
2742
  children: /* @__PURE__ */ b(S, { sx: { display: "flex", alignItems: "center", gap: 1, px: 1.25, py: 0.875 }, children: [
2714
- /* @__PURE__ */ t(Ja, { cardCount: H, expanded: ne, locked: V, onToggle: /* @__PURE__ */ a(() => de(!ne), "onToggle"), pulseTick: f }),
2743
+ /* @__PURE__ */ t(Xa, { cardCount: H, expanded: ne, locked: V, onToggle: /* @__PURE__ */ a(() => de(!ne), "onToggle"), pulseTick: f }),
2715
2744
  /* @__PURE__ */ t(X, { sx: /* @__PURE__ */ a((T) => ({ color: T.palette.text.primary, fontWeight: 500, fontSize: 11.5, lineHeight: 1.2, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }), "sx"), children: R })
2716
2745
  ] })
2717
2746
  },
2718
2747
  "filled-sketch"
2719
2748
  )
2720
- ] }), Z = ve(() => {
2721
- const T = "Será enviado junto com a mensagem", O = kt(K ?? void 0);
2749
+ ] }), Z = Se(() => {
2750
+ const T = "Será enviado junto com a mensagem", O = It(K ?? void 0);
2722
2751
  return O ? `${T}:
2723
2752
 
2724
2753
  ${O}` : T;
2725
2754
  }, [K]);
2726
2755
  return /* @__PURE__ */ t(
2727
- Yi,
2756
+ Ji,
2728
2757
  {
2729
2758
  ref: v,
2730
2759
  seedDraft: c,
@@ -2742,8 +2771,8 @@ ${O}` : T;
2742
2771
  P ?? "no-session"
2743
2772
  );
2744
2773
  });
2745
- Zn.displayName = "DrawablePrompt";
2746
- const Qn = He.memo(Zn), ei = [
2774
+ Qn.displayName = "DrawablePrompt";
2775
+ const ei = He.memo(Qn), ti = [
2747
2776
  {
2748
2777
  label: "Compare vendas e reservas por semana, focando em rotas internacionais",
2749
2778
  prompt: "Crie uma sugestão de dashboard de vendas e reservas por semana, focando em rotas nacionais. Envie um rascunho pronto para carregar na minha interface."
@@ -2753,7 +2782,7 @@ const Qn = He.memo(Zn), ei = [
2753
2782
  prompt: "Me ajude a entender como o Dashboard Composer funciona. Apresente os tipos de gráficos e depois envie um guia ao vivo, do passo a passo da interface"
2754
2783
  }
2755
2784
  ];
2756
- function Za({ kinds: e, accent: n }) {
2785
+ function Qa({ kinds: e, accent: n }) {
2757
2786
  const i = le(), l = ue(i), o = n ? i.palette.primary.main : i.palette.text.disabled;
2758
2787
  return e.length === 0 ? /* @__PURE__ */ t(S, { sx: { width: "100%", height: 56, display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 0.375 }, children: Array.from({ length: 6 }).map((r, g) => /* @__PURE__ */ t(S, { sx: { background: i.palette.background.default, border: `1px dashed ${l.borderSoft}`, borderRadius: 0.5 } }, g)) }) : /* @__PURE__ */ t(S, { sx: { width: "100%", height: 56, display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 0.375 }, children: e.slice(0, 6).map((r, g) => /* @__PURE__ */ b(
2759
2788
  S,
@@ -2780,14 +2809,14 @@ function Za({ kinds: e, accent: n }) {
2780
2809
  `Template${g}`
2781
2810
  )) });
2782
2811
  }
2783
- a(Za, "TemplatePreview");
2784
- function Qa(e) {
2812
+ a(Qa, "TemplatePreview");
2813
+ function eo(e) {
2785
2814
  if (!e) return "";
2786
2815
  const n = Date.now() - e, i = 6e4, l = 60 * i, o = 24 * l;
2787
2816
  return n < i ? "agora" : n < l ? `${Math.floor(n / i)}m` : n < o ? `${Math.floor(n / l)}h` : n < 7 * o ? `${Math.floor(n / o)}d` : `${Math.floor(n / (7 * o))}sem`;
2788
2817
  }
2789
- a(Qa, "formatRelativeTime");
2790
- const _t = /* @__PURE__ */ a(({
2818
+ a(eo, "formatRelativeTime");
2819
+ const Ft = /* @__PURE__ */ a(({
2791
2820
  onDraftPromptChange: e,
2792
2821
  onApplyTemplate: n,
2793
2822
  composerSlot: i,
@@ -2795,8 +2824,8 @@ const _t = /* @__PURE__ */ a(({
2795
2824
  recentSessions: o,
2796
2825
  onSelectSession: r,
2797
2826
  onSearchAllSessions: g,
2798
- suggestions: h = ei,
2799
- templates: x = Mt
2827
+ suggestions: h = ti,
2828
+ templates: x = Rt
2800
2829
  }) => {
2801
2830
  const d = le(), v = ue(d), s = l ?? ((p) => p), c = {
2802
2831
  background: "transparent",
@@ -2848,7 +2877,7 @@ const _t = /* @__PURE__ */ a(({
2848
2877
  p.cardCount,
2849
2878
  " ",
2850
2879
  p.cardCount === 1 ? "card" : "cards",
2851
- p.updatedAt ? ` · ${Qa(p.updatedAt)}` : ""
2880
+ p.updatedAt ? ` · ${eo(p.updatedAt)}` : ""
2852
2881
  ] })
2853
2882
  ]
2854
2883
  },
@@ -2889,7 +2918,7 @@ const _t = /* @__PURE__ */ a(({
2889
2918
  "&:hover": { borderColor: d.palette.primary.main, transform: "translateY(-1px)" }
2890
2919
  },
2891
2920
  children: [
2892
- /* @__PURE__ */ t(Za, { kinds: Vn(p), accent: p.recommended }),
2921
+ /* @__PURE__ */ t(Qa, { kinds: jn(p), accent: p.recommended }),
2893
2922
  /* @__PURE__ */ b(S, { children: [
2894
2923
  /* @__PURE__ */ t(X, { sx: { fontSize: 12.5, color: d.palette.text.primary, fontWeight: 500 }, children: p.name }),
2895
2924
  /* @__PURE__ */ t(X, { sx: { fontSize: 10.5, color: d.palette.text.secondary, mt: 0.25, lineHeight: 1.4 }, children: p.desc }),
@@ -2904,33 +2933,33 @@ const _t = /* @__PURE__ */ a(({
2904
2933
  )
2905
2934
  ] });
2906
2935
  }, "EntryEmptyState");
2907
- _t.displayName = "EntryEmptyState";
2908
- const oe = 6, Re = 12, Yt = 320, eo = 220, Jt = 150, Xt = 3e3;
2909
- function to(e, n, i, l) {
2936
+ Ft.displayName = "EntryEmptyState";
2937
+ const oe = 6, Me = 12, Jt = 320, to = 220, Xt = 150, Zt = 3e3;
2938
+ function no(e, n, i, l) {
2910
2939
  const o = window.innerWidth, r = window.innerHeight, g = e && e !== "auto" ? [e] : ["bottom", "top", "right", "left"];
2911
2940
  for (const h of g) {
2912
2941
  let x = 0, d = 0;
2913
2942
  switch (h) {
2914
2943
  case "bottom":
2915
- x = n.top + n.height + oe + Re, d = n.left + n.width / 2 - i / 2;
2944
+ x = n.top + n.height + oe + Me, d = n.left + n.width / 2 - i / 2;
2916
2945
  break;
2917
2946
  case "top":
2918
- x = n.top - oe - Re - l, d = n.left + n.width / 2 - i / 2;
2947
+ x = n.top - oe - Me - l, d = n.left + n.width / 2 - i / 2;
2919
2948
  break;
2920
2949
  case "right":
2921
- x = n.top + n.height / 2 - l / 2, d = n.left + n.width + oe + Re;
2950
+ x = n.top + n.height / 2 - l / 2, d = n.left + n.width + oe + Me;
2922
2951
  break;
2923
2952
  case "left":
2924
- x = n.top + n.height / 2 - l / 2, d = n.left - oe - Re - i;
2953
+ x = n.top + n.height / 2 - l / 2, d = n.left - oe - Me - i;
2925
2954
  break;
2926
2955
  }
2927
2956
  if (d = Math.max(8, Math.min(d, o - i - 8)), x = Math.max(8, Math.min(x, r - l - 8)), x >= 0 && x + l <= r && d >= 0 && d + i <= o || h === g[g.length - 1]) return { top: x, left: d, resolvedPlacement: h };
2928
2957
  }
2929
- return { top: n.top + n.height + Re, left: n.left, resolvedPlacement: "bottom" };
2958
+ return { top: n.top + n.height + Me, left: n.left, resolvedPlacement: "bottom" };
2930
2959
  }
2931
- a(to, "computePlacement");
2932
- const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteraction: i = !1, onComplete: l, onDismiss: o, resolveElement: r = Ot }) => {
2933
- const g = le(), h = ue(g), [x, d] = N(0), [v, s] = N(null), [c, u] = N({ width: Yt, height: 120 }), p = ee(null), f = ee(0), y = e[x], R = x === 0, H = x === e.length - 1, L = W(() => {
2960
+ a(no, "computePlacement");
2961
+ const ni = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteraction: i = !1, onComplete: l, onDismiss: o, resolveElement: r = Pt }) => {
2962
+ const g = le(), h = ue(g), [x, d] = N(0), [v, s] = N(null), [c, u] = N({ width: Jt, height: 120 }), p = ee(null), f = ee(0), y = e[x], R = x === 0, H = x === e.length - 1, L = W(() => {
2934
2963
  var w;
2935
2964
  if (!y) return;
2936
2965
  const M = r(y.target);
@@ -2943,8 +2972,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
2943
2972
  q(() => {
2944
2973
  if (!y) return;
2945
2974
  let M = !1, w = 0, F;
2946
- const D = /* @__PURE__ */ a(() => {
2947
- console.warn(`[@aintela/bi SpotlightOverlay] Step ${x + 1}/${e.length} could not resolve its target within ${Xt} ms; skipping.`, { target: y.target, title: y.title }), x < e.length - 1 ? d((U) => U + 1) : (console.warn("[@aintela/bi SpotlightOverlay] All steps failed to resolve; dismissing tour."), o());
2975
+ const k = /* @__PURE__ */ a(() => {
2976
+ console.warn(`[@aintela/bi SpotlightOverlay] Step ${x + 1}/${e.length} could not resolve its target within ${Zt} ms; skipping.`, { target: y.target, title: y.title }), x < e.length - 1 ? d((U) => U + 1) : (console.warn("[@aintela/bi SpotlightOverlay] All steps failed to resolve; dismissing tour."), o());
2948
2977
  }, "giveUpOnStep"), z = /* @__PURE__ */ a(() => {
2949
2978
  var J;
2950
2979
  if (M) return;
@@ -2956,11 +2985,11 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
2956
2985
  return;
2957
2986
  }
2958
2987
  }
2959
- if (w += Jt, w >= Xt) {
2960
- D();
2988
+ if (w += Xt, w >= Zt) {
2989
+ k();
2961
2990
  return;
2962
2991
  }
2963
- F = window.setTimeout(z, Jt);
2992
+ F = window.setTimeout(z, Xt);
2964
2993
  }, "attempt");
2965
2994
  z();
2966
2995
  const I = /* @__PURE__ */ a(() => {
@@ -2986,14 +3015,14 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
2986
3015
  }, "onKey");
2987
3016
  return window.addEventListener("keydown", M), () => window.removeEventListener("keydown", M);
2988
3017
  }, [o, P, _]), !y || typeof document > "u") return null;
2989
- const $ = v ? `polygon(
3018
+ const E = v ? `polygon(
2990
3019
  0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%,
2991
3020
  ${v.left - oe}px ${v.top - oe}px,
2992
3021
  ${v.left + v.width + oe}px ${v.top - oe}px,
2993
3022
  ${v.left + v.width + oe}px ${v.top + v.height + oe}px,
2994
3023
  ${v.left - oe}px ${v.top + v.height + oe}px,
2995
3024
  ${v.left - oe}px ${v.top - oe}px
2996
- )` : void 0, V = v ? to(y.placement, v, c.width, c.height) : null, K = {
3025
+ )` : void 0, V = v ? no(y.placement, v, c.width, c.height) : null, K = {
2997
3026
  fontFamily: g.typography.fontFamily,
2998
3027
  fontSize: 11.5,
2999
3028
  fontWeight: 500,
@@ -3004,7 +3033,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3004
3033
  transition: "filter .12s, background-color .12s, border-color .12s",
3005
3034
  border: "1px solid transparent"
3006
3035
  };
3007
- return ra(
3036
+ return la(
3008
3037
  /* @__PURE__ */ b(S, { className: "llm-guide-overlay-root", sx: { position: "fixed", inset: 0, zIndex: 9999 }, children: [
3009
3038
  v && /* @__PURE__ */ t(
3010
3039
  S,
@@ -3013,8 +3042,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3013
3042
  sx: {
3014
3043
  position: "absolute",
3015
3044
  inset: 0,
3016
- backgroundColor: Ce(g.palette.common.black, n),
3017
- clipPath: $,
3045
+ backgroundColor: ve(g.palette.common.black, n),
3046
+ clipPath: E,
3018
3047
  transition: "clip-path 0.3s ease",
3019
3048
  pointerEvents: i ? "none" : "auto"
3020
3049
  }
@@ -3032,7 +3061,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3032
3061
  height: v.height + oe * 2,
3033
3062
  borderRadius: "6px",
3034
3063
  border: `2px solid ${g.palette.primary.main}`,
3035
- boxShadow: `0 0 0 4px ${Ce(g.palette.primary.main, 0.2)}, 0 8px 24px ${Ce(g.palette.primary.main, 0.13)}`,
3064
+ boxShadow: `0 0 0 4px ${ve(g.palette.primary.main, 0.2)}, 0 8px 24px ${ve(g.palette.primary.main, 0.13)}`,
3036
3065
  transition: "all 0.3s ease",
3037
3066
  pointerEvents: "none"
3038
3067
  }
@@ -3046,8 +3075,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3046
3075
  position: "absolute",
3047
3076
  top: V.top,
3048
3077
  left: V.left,
3049
- maxWidth: Yt,
3050
- minWidth: eo,
3078
+ maxWidth: Jt,
3079
+ minWidth: to,
3051
3080
  p: 2,
3052
3081
  borderRadius: 1.5,
3053
3082
  backgroundColor: g.palette.background.paper,
@@ -3084,7 +3113,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3084
3113
  ] }),
3085
3114
  document.body
3086
3115
  );
3087
- }, "SpotlightOverlay"), no = "aintela-bi-composer", io = 2, ao = /* @__PURE__ */ a((e) => {
3116
+ }, "SpotlightOverlay"), io = "aintela-bi-composer", ao = 2, oo = /* @__PURE__ */ a((e) => {
3088
3117
  var ge;
3089
3118
  const { sessionId: n = null, routeSessionId: i, composerMode: l, onForceExecutionMode: o, recentSessionsResolved: r } = e, g = le(), h = ue(g), x = he(), d = et(), v = B((C) => {
3090
3119
  var A;
@@ -3092,7 +3121,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3092
3121
  }), s = B((C) => {
3093
3122
  var A;
3094
3123
  return ((A = C.dashboardDefinition) == null ? void 0 : A.name) ?? null;
3095
- }), c = B((C) => C.turnOpen), u = B((C) => C.sketchExpanded), p = W((C) => x.getState().setSketchExpanded(C), [x]), [f, y] = N(""), [R, H] = N(void 0), [L, P] = N(!1), [_, $] = N(!1), V = v !== null, K = ee(null);
3124
+ }), c = B((C) => C.turnOpen), u = B((C) => C.sketchExpanded), p = W((C) => x.getState().setSketchExpanded(C), [x]), [f, y] = N(""), [R, H] = N(void 0), [L, P] = N(!1), [_, E] = N(!1), V = v !== null, K = ee(null);
3096
3125
  q(() => {
3097
3126
  var A;
3098
3127
  const C = s == null ? void 0 : s.trim();
@@ -3103,9 +3132,9 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3103
3132
  }, [s]), q(() => {
3104
3133
  x.getState().currentSessionId !== n && x.getState().setCurrentSessionId(n);
3105
3134
  }, [n, x]), q(() => {
3106
- c && $(!1);
3135
+ c && E(!1);
3107
3136
  }, [c]), q(() => {
3108
- (v || void 0) !== R && $(!0), H(v ?? void 0);
3137
+ (v || void 0) !== R && E(!0), H(v ?? void 0);
3109
3138
  }, [v]), q(() => {
3110
3139
  var m;
3111
3140
  const C = x.getState().dashboardDefinition, A = (C == null ? void 0 : C.originalSessionId) ?? null;
@@ -3116,21 +3145,21 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3116
3145
  }
3117
3146
  let Y = !1;
3118
3147
  return (async () => {
3119
- var k;
3148
+ var D;
3120
3149
  try {
3121
- const E = await d.getDashboardBySession(i);
3150
+ const $ = await d.getDashboardBySession(i);
3122
3151
  if (Y) return;
3123
- if ((k = x.getState().dashboardDefinition) != null && k.id) {
3152
+ if ((D = x.getState().dashboardDefinition) != null && D.id) {
3124
3153
  K.current = i;
3125
3154
  return;
3126
3155
  }
3127
- if (!E) {
3156
+ if (!$) {
3128
3157
  console.warn("[@aintela/bi composer] no dashboard found for session", i), K.current = i;
3129
3158
  return;
3130
3159
  }
3131
- x.getState().loadDashboard(Be(E)), K.current = i;
3132
- } catch (E) {
3133
- console.error("[@aintela/bi composer] failed to load dashboard for session", E);
3160
+ x.getState().loadDashboard(Be($)), K.current = i;
3161
+ } catch ($) {
3162
+ console.error("[@aintela/bi composer] failed to load dashboard for session", $);
3134
3163
  }
3135
3164
  })(), () => {
3136
3165
  Y = !0;
@@ -3138,7 +3167,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3138
3167
  }, [i, d, x]);
3139
3168
  const M = W(
3140
3169
  async (C) => {
3141
- var m, k, E, G;
3170
+ var m, D, $, G;
3142
3171
  const A = n;
3143
3172
  let Y = x.getState().dashboardDefinition;
3144
3173
  if (Y != null && Y.id && Y.originalSessionId && Y.originalSessionId !== A && Y.originalSessionId !== i && (x.getState().updateDashboard(void 0), Y = x.getState().dashboardDefinition), Y != null && Y.id) {
@@ -3155,13 +3184,13 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3155
3184
  return;
3156
3185
  }
3157
3186
  try {
3158
- const Z = !C && Y && ((((m = Y.cards) == null ? void 0 : m.length) ?? 0) > 0 || (((k = Y.filters) == null ? void 0 : k.length) ?? 0) > 0) ? { name: Y.name, cards: Y.cards, filters: Y.filters, layoutType: Y.layoutType } : void 0, te = C ?? Z;
3187
+ const Z = !C && Y && ((((m = Y.cards) == null ? void 0 : m.length) ?? 0) > 0 || (((D = Y.filters) == null ? void 0 : D.length) ?? 0) > 0) ? { name: Y.name, cards: Y.cards, filters: Y.filters, layoutType: Y.layoutType } : void 0, te = C ?? Z;
3159
3188
  te && !te.layoutType && (te.layoutType = "Naked");
3160
- const T = await Pt(d, A, te), O = x.getState().dashboardDefinition;
3189
+ const T = await $t(d, A, te), O = x.getState().dashboardDefinition;
3161
3190
  x.getState().updateDashboard({
3162
3191
  ...T,
3163
3192
  name: (te == null ? void 0 : te.name) ?? (O == null ? void 0 : O.name) ?? T.name,
3164
- cards: (te == null ? void 0 : te.cards) ?? ((E = O == null ? void 0 : O.cards) != null && E.length ? O.cards : T.cards),
3193
+ cards: (te == null ? void 0 : te.cards) ?? (($ = O == null ? void 0 : O.cards) != null && $.length ? O.cards : T.cards),
3165
3194
  filters: (te == null ? void 0 : te.filters) ?? ((G = O == null ? void 0 : O.filters) != null && G.length ? O.filters : T.filters)
3166
3195
  }), p(!0);
3167
3196
  } catch (Z) {
@@ -3174,36 +3203,36 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3174
3203
  }, [M, p]), F = W(async (C) => {
3175
3204
  var A;
3176
3205
  await M(), await ((A = e.onBeforeSend) == null ? void 0 : A.call(e, C));
3177
- }, [M, e.onBeforeSend]), D = W((C) => {
3206
+ }, [M, e.onBeforeSend]), k = W((C) => {
3178
3207
  if (C.cells.length === 0) {
3179
3208
  o();
3180
3209
  return;
3181
3210
  }
3182
- M({ name: C.name, cards: jn(C), filters: [] });
3183
- }, [M, o]), { setScroller: z } = Un(), I = ee(null);
3211
+ M({ name: C.name, cards: Un(C), filters: [] });
3212
+ }, [M, o]), { setScroller: z } = Kn(), I = ee(null);
3184
3213
  q(() => {
3185
3214
  const C = I.current;
3186
3215
  if (!C) {
3187
3216
  z(null);
3188
3217
  return;
3189
3218
  }
3190
- const A = /* @__PURE__ */ a(() => [C, ...Array.from(C.querySelectorAll("*"))].reverse().find((E) => E.scrollHeight > E.clientHeight + 8 && /auto|scroll/.test(getComputedStyle(E).overflowY)) ?? null, "find"), Y = A();
3219
+ const A = /* @__PURE__ */ a(() => [C, ...Array.from(C.querySelectorAll("*"))].reverse().find(($) => $.scrollHeight > $.clientHeight + 8 && /auto|scroll/.test(getComputedStyle($).overflowY)) ?? null, "find"), Y = A();
3191
3220
  if (Y) {
3192
3221
  z(Y);
3193
3222
  return;
3194
3223
  }
3195
3224
  if (typeof ResizeObserver > "u") return;
3196
3225
  const m = new ResizeObserver(() => {
3197
- const k = A();
3198
- k && (z(k), m.disconnect());
3226
+ const D = A();
3227
+ D && (z(D), m.disconnect());
3199
3228
  });
3200
3229
  return m.observe(C), () => m.disconnect();
3201
3230
  }, [l, z]);
3202
- const U = ia(), J = U ? Hn : Fn, Q = U ? Ln : Nn, ne = U ? Gn : Bn, de = W(
3231
+ const U = aa(), J = U ? Ln : Nn, Q = U ? Gn : Bn, ne = U ? Wn : Hn, de = W(
3203
3232
  (C, A) => /* @__PURE__ */ t(re.div, { variants: J, initial: "hidden", animate: "visible", exit: "hidden", children: C }, A),
3204
3233
  [J]
3205
- ), me = /* @__PURE__ */ a(() => /* @__PURE__ */ t(re.div, { layoutId: no, transition: ne, style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ t(
3206
- Qn,
3234
+ ), me = /* @__PURE__ */ a(() => /* @__PURE__ */ t(re.div, { layoutId: io, transition: ne, style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ t(
3235
+ ei,
3207
3236
  {
3208
3237
  onCreateSketch: w,
3209
3238
  onBeforeSend: F,
@@ -3218,10 +3247,10 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3218
3247
  }
3219
3248
  ) }), "renderPromptForBranch");
3220
3249
  return /* @__PURE__ */ t(tt, { mode: "popLayout", initial: !1, children: l === "empty" ? /* @__PURE__ */ t(re.div, { initial: { opacity: 1 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2, ease: "easeOut" }, style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ t(
3221
- _t,
3250
+ Ft,
3222
3251
  {
3223
3252
  onDraftPromptChange: y,
3224
- onApplyTemplate: D,
3253
+ onApplyTemplate: k,
3225
3254
  composerSlot: me(),
3226
3255
  ambientWrapper: de,
3227
3256
  recentSessions: r,
@@ -3230,9 +3259,9 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3230
3259
  suggestions: e.suggestions,
3231
3260
  templates: e.templates
3232
3261
  }
3233
- ) }, "empty-layout") : /* @__PURE__ */ t(re.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2, ease: "easeOut" }, style: { minHeight: 0, width: "100%", height: "100%", display: "flex", background: g.palette.background.default }, children: /* @__PURE__ */ b(Bt, { direction: "row", sx: { display: "inline-flex", width: "100%", height: "100%", flexWrap: "nowrap" }, children: [
3262
+ ) }, "empty-layout") : /* @__PURE__ */ t(re.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2, ease: "easeOut" }, style: { minHeight: 0, width: "100%", height: "100%", display: "flex", background: g.palette.background.default }, children: /* @__PURE__ */ b(Ht, { direction: "row", sx: { display: "inline-flex", width: "100%", height: "100%", flexWrap: "nowrap" }, children: [
3234
3263
  /* @__PURE__ */ b(
3235
- Bt,
3264
+ Ht,
3236
3265
  {
3237
3266
  sx: {
3238
3267
  minWidth: "20%",
@@ -3251,10 +3280,10 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3251
3280
  ]
3252
3281
  }
3253
3282
  ),
3254
- e.sidePanel === void 0 ? /* @__PURE__ */ t(qn, { width: e.sidePanelWidth ?? "70%", defaultCollapsed: !_, onCollapseChange: P }) : typeof e.sidePanel == "function" ? e.sidePanel({ hasDashboard: V, turnOpen: c }) : e.sidePanel,
3283
+ e.sidePanel === void 0 ? /* @__PURE__ */ t(Yn, { width: e.sidePanelWidth ?? "70%", defaultCollapsed: !_, onCollapseChange: P }) : typeof e.sidePanel == "function" ? e.sidePanel({ hasDashboard: V, turnOpen: c }) : e.sidePanel,
3255
3284
  (ge = e.renderProgressPanel) == null ? void 0 : ge.call(e, { hasDashboard: V, dashboardCollapsed: L, turnOpen: c })
3256
3285
  ] }) }, "execution-layout") });
3257
- }, "ComposerInner"), ni = /* @__PURE__ */ a((e) => {
3286
+ }, "ComposerInner"), ii = /* @__PURE__ */ a((e) => {
3258
3287
  const n = he(), i = et(), l = ee(null);
3259
3288
  q(() => {
3260
3289
  const P = l.current;
@@ -3264,8 +3293,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3264
3293
  n.getState().setViewport({ width: V.width, height: V.height });
3265
3294
  }, "publish");
3266
3295
  _();
3267
- const $ = new ResizeObserver(_);
3268
- return $.observe(P), () => $.disconnect();
3296
+ const E = new ResizeObserver(_);
3297
+ return E.observe(P), () => E.disconnect();
3269
3298
  }, [n]);
3270
3299
  const [o, r] = N([]);
3271
3300
  q(() => {
@@ -3275,12 +3304,12 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3275
3304
  try {
3276
3305
  const _ = await i.listDashboards();
3277
3306
  if (P) return;
3278
- const $ = _.filter((V) => !!V.originalSessionId).map((V) => {
3307
+ const E = _.filter((V) => !!V.originalSessionId).map((V) => {
3279
3308
  var M;
3280
3309
  const K = V.updatedAt ? V.updatedAt instanceof Date ? V.updatedAt.getTime() : Date.parse(String(V.updatedAt)) : 0;
3281
3310
  return { sessionId: V.originalSessionId, name: V.name || "Dashboard", cardCount: ((M = V.cards) == null ? void 0 : M.length) ?? 0, updatedAt: Number.isFinite(K) ? K : 0 };
3282
3311
  });
3283
- $.sort((V, K) => (K.updatedAt ?? 0) - (V.updatedAt ?? 0)), r($.slice(0, io));
3312
+ E.sort((V, K) => (K.updatedAt ?? 0) - (V.updatedAt ?? 0)), r(E.slice(0, ao));
3284
3313
  } catch (_) {
3285
3314
  console.error("[@aintela/bi composer] failed to list dashboards", _);
3286
3315
  }
@@ -3295,49 +3324,49 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3295
3324
  var _;
3296
3325
  return ((_ = P.dashboardDefinition) == null ? void 0 : _.id) ?? null;
3297
3326
  }), c = B((P) => {
3298
- var _, $;
3299
- return (($ = (_ = P.dashboardDefinition) == null ? void 0 : _.cards) == null ? void 0 : $.length) ?? 0;
3327
+ var _, E;
3328
+ return ((E = (_ = P.dashboardDefinition) == null ? void 0 : _.cards) == null ? void 0 : E.length) ?? 0;
3300
3329
  }), u = B((P) => {
3301
- var _, $;
3302
- return (($ = (_ = P.dashboardDefinition) == null ? void 0 : _.filters) == null ? void 0 : $.length) ?? 0;
3330
+ var _, E;
3331
+ return ((E = (_ = P.dashboardDefinition) == null ? void 0 : _.filters) == null ? void 0 : E.length) ?? 0;
3303
3332
  }), p = ee({ id: s, cards: c, filters: u, firstTime: !0 });
3304
3333
  q(() => {
3305
3334
  if (h) return;
3306
- const P = p.current, _ = !P.id && !!s, $ = P.cards === 0 && c > 0, V = P.filters === 0 && u > 0, K = P.firstTime;
3307
- p.current = { id: s, cards: c, filters: u, firstTime: !1 }, !K && (_ || $ || V) && n.getState().setSketchExpanded(!0);
3335
+ const P = p.current, _ = !P.id && !!s, E = P.cards === 0 && c > 0, V = P.filters === 0 && u > 0, K = P.firstTime;
3336
+ p.current = { id: s, cards: c, filters: u, firstTime: !1 }, !K && (_ || E || V) && n.getState().setSketchExpanded(!0);
3308
3337
  }, [s, c, u, h, n]);
3309
3338
  const f = B((P) => P.guideSteps), y = B((P) => P.guideOptions), R = B((P) => P.dismissGuide);
3310
3339
  q(() => {
3311
- f && f.length > 0 && vn(f) && n.getState().setSketchExpanded(!0);
3340
+ f && f.length > 0 && Sn(f) && n.getState().setSketchExpanded(!0);
3312
3341
  }, [f, n]);
3313
- const H = ve(() => h ? "generating" : !x && !e.routeSessionId ? "empty" : d || v ? "done-dashboard" : "done-text", [h, x, d, v, e.routeSessionId]), L = W(() => {
3342
+ const H = Se(() => h ? "generating" : !x && !e.routeSessionId ? "empty" : d || v ? "done-dashboard" : "done-text", [h, x, d, v, e.routeSessionId]), L = W(() => {
3314
3343
  n.getState().setHasCompletedOnce(!0), n.getState().setSketchExpanded(!1);
3315
3344
  }, [n]);
3316
3345
  return /* @__PURE__ */ b(Te, { children: [
3317
- /* @__PURE__ */ t("div", { className: "bi-composer-root", ref: l, style: { display: "inherit", height: "100%" }, children: /* @__PURE__ */ t(ao, { ...e, composerMode: H, onForceExecutionMode: L, recentSessionsResolved: g }) }),
3318
- f && f.length > 0 && /* @__PURE__ */ t(ti, { steps: f, overlayOpacity: y == null ? void 0 : y.overlayOpacity, allowInteraction: y == null ? void 0 : y.allowInteraction, onComplete: y == null ? void 0 : y.onComplete, onDismiss: R, resolveElement: e.resolveGuideElement ?? Ot })
3346
+ /* @__PURE__ */ t("div", { className: "bi-composer-root", ref: l, style: { display: "inherit", height: "100%" }, children: /* @__PURE__ */ t(oo, { ...e, composerMode: H, onForceExecutionMode: L, recentSessionsResolved: g }) }),
3347
+ f && f.length > 0 && /* @__PURE__ */ t(ni, { steps: f, overlayOpacity: y == null ? void 0 : y.overlayOpacity, allowInteraction: y == null ? void 0 : y.allowInteraction, onComplete: y == null ? void 0 : y.onComplete, onDismiss: R, resolveElement: e.resolveGuideElement ?? Pt })
3319
3348
  ] });
3320
3349
  }, "ComposerView");
3321
- ni.displayName = "ComposerView";
3322
- const St = 20, oo = 60;
3323
- function ro(e) {
3350
+ ii.displayName = "ComposerView";
3351
+ const Ct = 20, ro = 60;
3352
+ function lo(e) {
3324
3353
  for (const n of e.artifactData ?? [])
3325
3354
  if ((n == null ? void 0 : n.type) === "Dashboard" && n.id) return n.id;
3326
3355
  return null;
3327
3356
  }
3328
- a(ro, "detectProducedDashboardId");
3329
- function ii() {
3330
- const e = he(), n = In(), i = W((h) => {
3357
+ a(lo, "detectProducedDashboardId");
3358
+ function ai() {
3359
+ const e = he(), n = zn(), i = W((h) => {
3331
3360
  var H, L, P, _;
3332
- const { viewport: x, dashboardDefinition: d } = e.getState(), v = Math.round(x.height), s = x.width === 0 ? 0 : Math.round(x.width / 2 - oo), c = s, u = Math.round(1080 * 0.9), p = Math.round(u / 12), f = ((d == null ? void 0 : d.cards) ?? []).map(($) => ({
3333
- ...$,
3334
- widthPx: typeof $.w == "number" && p > 0 ? Math.round(p * $.w * 0.95) : void 0,
3335
- heightPx: typeof $.h == "number" ? Math.round($.h * St * 0.95) : void 0
3361
+ const { viewport: x, dashboardDefinition: d } = e.getState(), v = Math.round(x.height), s = x.width === 0 ? 0 : Math.round(x.width / 2 - ro), c = s, u = Math.round(1080 * 0.9), p = Math.round(u / 12), f = ((d == null ? void 0 : d.cards) ?? []).map((E) => ({
3362
+ ...E,
3363
+ widthPx: typeof E.w == "number" && p > 0 ? Math.round(p * E.w * 0.95) : void 0,
3364
+ heightPx: typeof E.h == "number" ? Math.round(E.h * Ct * 0.95) : void 0
3336
3365
  }));
3337
3366
  let y;
3338
3367
  try {
3339
- const $ = JSON.parse(h), V = (((L = (H = $ == null ? void 0 : $.userPrompt) == null ? void 0 : H.trim()) == null ? void 0 : L.length) ?? 0) > 0 ? $.userPrompt : void 0, K = ((P = $ == null ? void 0 : $.cards) == null ? void 0 : P.length) ?? 0, M = ((_ = $ == null ? void 0 : $.filters) == null ? void 0 : _.length) ?? 0, w = K > 0 ? `${K} card(s) ` : "", F = M > 0 ? ` - ${M} filter(s) ` : "";
3340
- y = V ?? `${w}${F}(${($ == null ? void 0 : $.layoutType) ?? ""})`;
3368
+ const E = JSON.parse(h), V = (((L = (H = E == null ? void 0 : E.userPrompt) == null ? void 0 : H.trim()) == null ? void 0 : L.length) ?? 0) > 0 ? E.userPrompt : void 0, K = ((P = E == null ? void 0 : E.cards) == null ? void 0 : P.length) ?? 0, M = ((_ = E == null ? void 0 : E.filters) == null ? void 0 : _.length) ?? 0, w = K > 0 ? `${K} card(s) ` : "", F = M > 0 ? ` - ${M} filter(s) ` : "";
3369
+ y = V ?? `${w}${F}(${(E == null ? void 0 : E.layoutType) ?? ""})`;
3341
3370
  } catch {
3342
3371
  y = void 0;
3343
3372
  }
@@ -3353,13 +3382,13 @@ function ii() {
3353
3382
  chatBox: { heightPx: v, widthPx: c },
3354
3383
  dashboardPreviewBox: { heightPx: v, widthPx: s },
3355
3384
  dashboardVisualizationBox: { heightPx: v, widthPx: u },
3356
- gridRowHeightPixelsPerUnit: St,
3385
+ gridRowHeightPixelsPerUnit: Ct,
3357
3386
  gridColumnWidthPixelsPerUnit: p,
3358
3387
  gridColumnWidthPixelsPerUnitFullView: p
3359
3388
  },
3360
3389
  isDatasetParameterized: (d == null ? void 0 : d.isDatasetParameterized) ?? !1,
3361
3390
  defaultDatasetName: d == null ? void 0 : d.defaultDatasetName,
3362
- clientSideChanges: kt(d == null ? void 0 : d.clientSideChanges)
3391
+ clientSideChanges: It(d == null ? void 0 : d.clientSideChanges)
3363
3392
  };
3364
3393
  return d != null && d.clientSideChanges && Object.keys(d.clientSideChanges).length > 0 && e.getState().clearClientSideChanges(), { promptAsString: y ?? "", json: JSON.stringify(R) };
3365
3394
  }, [e]), l = W(() => {
@@ -3367,18 +3396,18 @@ function ii() {
3367
3396
  h.setTurnOpen(!0), h.dismissGuide(), h.setHasCompletedOnce(!1), h.setProducedDashboardId(null), h.setSketchExpanded(!1);
3368
3397
  }, [e]), o = W((h) => {
3369
3398
  const x = e.getState();
3370
- x.setProducedDashboardId(ro(h)), x.setHasCompletedOnce(!0), x.setTurnOpen(!1);
3399
+ x.setProducedDashboardId(lo(h)), x.setHasCompletedOnce(!0), x.setTurnOpen(!1);
3371
3400
  }, [e]), r = W((h, x) => e.getState().ingestToolEvent(h, x), [e]), g = W((h) => {
3372
3401
  e.getState().currentSessionId !== h && e.getState().setCurrentSessionId(h);
3373
3402
  }, [e]);
3374
- return ve(() => ({ onRenderPrompt: i, onTurnOpen: l, onTurnComplete: o, ingestToolEvent: r, setSessionId: g, environment: n }), [i, l, o, r, g, n]);
3403
+ return Se(() => ({ onRenderPrompt: i, onTurnOpen: l, onTurnComplete: o, ingestToolEvent: r, setSessionId: g, environment: n }), [i, l, o, r, g, n]);
3375
3404
  }
3376
- a(ii, "useComposerChatBridge");
3377
- const lo = /* @__PURE__ */ a(() => {
3378
- const e = ii(), n = Xi((l) => {
3405
+ a(ai, "useComposerChatBridge");
3406
+ const so = /* @__PURE__ */ a(() => {
3407
+ const e = ai(), n = Zi((l) => {
3379
3408
  var o;
3380
3409
  return ((o = l.session) == null ? void 0 : o.id) ?? null;
3381
- }), { eventBusService: i } = Zi();
3410
+ }), { eventBusService: i } = Qi();
3382
3411
  return q(() => {
3383
3412
  e.setSessionId(n);
3384
3413
  }, [n, e]), q(() => {
@@ -3390,19 +3419,19 @@ const lo = /* @__PURE__ */ a(() => {
3390
3419
  return (r = l.gatewayOffToolEvent) == null ? void 0 : r.call(l, o);
3391
3420
  };
3392
3421
  }, [i, e]), null;
3393
- }, "ComposerChatBinding"), Zt = {
3422
+ }, "ComposerChatBinding"), Qt = {
3394
3423
  metric: "KPI",
3395
3424
  chart: "GRÁFICO",
3396
3425
  table: "TABELA",
3397
3426
  iframe: "PAINEL",
3398
3427
  dashboard: "DASHBOARD"
3399
- }, so = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit" }), ai = /* @__PURE__ */ a(({
3428
+ }, co = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit" }), oi = /* @__PURE__ */ a(({
3400
3429
  width: e = 560,
3401
3430
  title: n = "Visualizações da sessão",
3402
3431
  footerAction: i,
3403
3432
  headerActions: l
3404
3433
  }) => {
3405
- const o = le(), r = ue(o), { items: g, offscreen: h, scrollTo: x } = Un(), d = ve(() => {
3434
+ const o = le(), r = ue(o), { items: g, offscreen: h, scrollTo: x } = Kn(), d = Se(() => {
3406
3435
  const s = /* @__PURE__ */ new Map();
3407
3436
  for (const c of h) {
3408
3437
  const u = c.group ?? "default", p = s.get(u);
@@ -3441,7 +3470,7 @@ const lo = /* @__PURE__ */ a(() => {
3441
3470
  X,
3442
3471
  {
3443
3472
  sx: { ...v, fontSize: 10, letterSpacing: "0.12em", textTransform: "uppercase", color: o.palette.text.disabled, mb: 1 },
3444
- children: so.format(s.at)
3473
+ children: co.format(s.at)
3445
3474
  }
3446
3475
  ),
3447
3476
  /* @__PURE__ */ t(S, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: s.items.map((c) => /* @__PURE__ */ b(
@@ -3483,11 +3512,11 @@ const lo = /* @__PURE__ */ a(() => {
3483
3512
  backgroundColor: r.hover,
3484
3513
  color: o.palette.text.secondary
3485
3514
  },
3486
- children: Zt[c.kind]
3515
+ children: Qt[c.kind]
3487
3516
  }
3488
3517
  ),
3489
3518
  /* @__PURE__ */ b(S, { sx: { minWidth: 0 }, children: [
3490
- /* @__PURE__ */ t(X, { sx: { fontSize: 12.5, fontWeight: 500, lineHeight: 1.35, overflow: "hidden", textOverflow: "ellipsis" }, children: c.title || Zt[c.kind] }),
3519
+ /* @__PURE__ */ t(X, { sx: { fontSize: 12.5, fontWeight: 500, lineHeight: 1.35, overflow: "hidden", textOverflow: "ellipsis" }, children: c.title || Qt[c.kind] }),
3491
3520
  c.preview && /* @__PURE__ */ t(S, { sx: { mt: 0.75, maxHeight: 56, overflow: "hidden" }, children: c.preview }),
3492
3521
  !c.ready && /* @__PURE__ */ t(X, { sx: { ...v, fontSize: 10, color: o.palette.warning.main, mt: 0.5 }, children: "gerando…" })
3493
3522
  ] }),
@@ -3509,7 +3538,7 @@ const lo = /* @__PURE__ */ a(() => {
3509
3538
  display: "flex",
3510
3539
  alignItems: "center",
3511
3540
  gap: 1,
3512
- backgroundColor: Ce(o.palette.background.paper, 0.6)
3541
+ backgroundColor: ve(o.palette.background.paper, 0.6)
3513
3542
  },
3514
3543
  children: [
3515
3544
  /* @__PURE__ */ t(X, { sx: { ...v, fontSize: 10, letterSpacing: "0.08em", textTransform: "uppercase", color: o.palette.text.disabled }, children: "clique para rolar o chat até a visualização" }),
@@ -3522,8 +3551,8 @@ const lo = /* @__PURE__ */ a(() => {
3522
3551
  }
3523
3552
  );
3524
3553
  }, "SessionVisualizationsPanel");
3525
- ai.displayName = "SessionVisualizationsPanel";
3526
- const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PURE__ */ t(ce, { title: e, placement: "top", children: /* @__PURE__ */ t(
3554
+ oi.displayName = "SessionVisualizationsPanel";
3555
+ const po = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PURE__ */ t(ce, { title: e, placement: "top", children: /* @__PURE__ */ t(
3527
3556
  be,
3528
3557
  {
3529
3558
  size: "small",
@@ -3532,7 +3561,7 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
3532
3561
  sx: /* @__PURE__ */ a((l) => ({ width: 26, height: 26, borderRadius: "6px", border: `1px solid ${l.palette.divider}`, color: l.palette.text.secondary }), "sx"),
3533
3562
  children: i
3534
3563
  }
3535
- ) }), "SessionVisualizationsPanelButton"), po = "0 0 40%", oi = /* @__PURE__ */ a(() => {
3564
+ ) }), "SessionVisualizationsPanelButton"), ho = "0 0 40%", ri = /* @__PURE__ */ a(() => {
3536
3565
  const e = le(), n = ue(e), i = B((f) => {
3537
3566
  var y;
3538
3567
  return ((y = f.dashboardDefinition) == null ? void 0 : y.jsFileName) ?? null;
@@ -3589,7 +3618,7 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
3589
3618
  "&:hover": { backgroundColor: n.hover, borderColor: e.palette.primary.main }
3590
3619
  },
3591
3620
  children: [
3592
- /* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(ke, { size: 13 }) }),
3621
+ /* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 13 }) }),
3593
3622
  /* @__PURE__ */ t(S, { component: "span", sx: { fontWeight: 500 }, children: o }),
3594
3623
  p,
3595
3624
  /* @__PURE__ */ t(S, { component: "span", sx: { color: e.palette.text.disabled, mx: 0.25 }, children: "|" }),
@@ -3597,14 +3626,14 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
3597
3626
  ]
3598
3627
  }
3599
3628
  ) }) : /* @__PURE__ */ b(Te, { children: [
3600
- /* @__PURE__ */ t(re.div, { initial: { opacity: 0, y: -8, scaleY: 0.96 }, animate: { opacity: 1, y: 0, scaleY: 1 }, transition: { duration: 0.32, ease: [0.22, 0.8, 0.32, 1] }, style: { transformOrigin: "top center", flex: po, minHeight: 200, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ b(S, { sx: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column", borderBottom: `1px solid ${n.borderSoft}`, backgroundColor: e.palette.background.default, overflow: "hidden", position: "relative" }, children: [
3629
+ /* @__PURE__ */ t(re.div, { initial: { opacity: 0, y: -8, scaleY: 0.96 }, animate: { opacity: 1, y: 0, scaleY: 1 }, transition: { duration: 0.32, ease: [0.22, 0.8, 0.32, 1] }, style: { transformOrigin: "top center", flex: ho, minHeight: 200, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ b(S, { sx: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column", borderBottom: `1px solid ${n.borderSoft}`, backgroundColor: e.palette.background.default, overflow: "hidden", position: "relative" }, children: [
3601
3630
  /* @__PURE__ */ b(S, { sx: { display: "flex", alignItems: "center", gap: 1, px: 1.5, py: 0.875, borderBottom: `1px solid ${n.borderSoft}`, backgroundColor: e.palette.background.paper, flexShrink: 0 }, children: [
3602
- /* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(ke, { size: 14 }) }),
3631
+ /* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 14 }) }),
3603
3632
  /* @__PURE__ */ t(X, { sx: { color: e.palette.text.primary, fontWeight: 500, fontSize: 12 }, children: o }),
3604
3633
  p,
3605
3634
  /* @__PURE__ */ t(S, { sx: { flex: 1 } }),
3606
3635
  /* @__PURE__ */ t(ce, { title: "Tela cheia", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => d(!0), "onClick"), sx: u, "aria-label": "Abrir em tela cheia", children: /* @__PURE__ */ t(Le, { size: 13 }) }) }),
3607
- /* @__PURE__ */ t(ce, { title: "Minimizar", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => h("minimized"), "onClick"), sx: { ...u, transform: "rotate(180deg)" }, "aria-label": "Minimizar", children: /* @__PURE__ */ t(Qi, { size: 13 }) }) })
3636
+ /* @__PURE__ */ t(ce, { title: "Minimizar", placement: "top", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => h("minimized"), "onClick"), sx: { ...u, transform: "rotate(180deg)" }, "aria-label": "Minimizar", children: /* @__PURE__ */ t(ea, { size: 13 }) }) })
3608
3637
  ] }),
3609
3638
  /* @__PURE__ */ t(tt, { children: s && /* @__PURE__ */ b(
3610
3639
  re.div,
@@ -3629,225 +3658,227 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
3629
3658
  fontWeight: 600,
3630
3659
  padding: "4px 10px 4px 8px",
3631
3660
  borderRadius: 999,
3632
- boxShadow: `0 4px 14px ${Ce(e.palette.primary.main, 0.35)}`
3661
+ boxShadow: `0 4px 14px ${ve(e.palette.primary.main, 0.35)}`
3633
3662
  },
3634
3663
  children: [
3635
- /* @__PURE__ */ t(ke, { size: 11 }),
3664
+ /* @__PURE__ */ t(De, { size: 11 }),
3636
3665
  "Dashboard pronto"
3637
3666
  ]
3638
3667
  }
3639
3668
  ) }),
3640
- /* @__PURE__ */ t(S, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(_e, { dashboardId: l }) })
3669
+ /* @__PURE__ */ t(S, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(Re, { dashboardId: l }) })
3641
3670
  ] }) }),
3642
- /* @__PURE__ */ b(cn, { open: x, onClose: /* @__PURE__ */ a(() => d(!1), "onClose"), maxWidth: !1, fullScreen: !0, slotProps: { paper: { sx: { backgroundColor: e.palette.background.default, backgroundImage: "none", color: e.palette.text.primary } } }, children: [
3671
+ /* @__PURE__ */ b(pn, { open: x, onClose: /* @__PURE__ */ a(() => d(!1), "onClose"), maxWidth: !1, fullScreen: !0, slotProps: { paper: { sx: { backgroundColor: e.palette.background.default, backgroundImage: "none", color: e.palette.text.primary } } }, children: [
3643
3672
  /* @__PURE__ */ b(S, { sx: { display: "flex", alignItems: "center", gap: 1, px: 2, py: 1.25, borderBottom: `1px solid ${e.palette.divider}`, backgroundColor: e.palette.background.paper, flexShrink: 0 }, children: [
3644
- /* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(ke, { size: 16 }) }),
3673
+ /* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 16 }) }),
3645
3674
  /* @__PURE__ */ t(X, { sx: { color: e.palette.text.primary, fontWeight: 500, fontSize: 13.5 }, children: o }),
3646
3675
  p,
3647
3676
  /* @__PURE__ */ t(S, { sx: { flex: 1 } }),
3648
3677
  /* @__PURE__ */ t(ce, { title: "Fechar", placement: "left", children: /* @__PURE__ */ t(be, { size: "small", onClick: /* @__PURE__ */ a(() => d(!1), "onClick"), sx: { ...u, p: 0.75 }, "aria-label": "Fechar", children: /* @__PURE__ */ t(Dt, { size: 14 }) }) })
3649
3678
  ] }),
3650
- /* @__PURE__ */ t(S, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(_e, { dashboardId: l }) })
3679
+ /* @__PURE__ */ t(S, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(Re, { dashboardId: l }) })
3651
3680
  ] })
3652
3681
  ] });
3653
3682
  }, "DashboardPinInner");
3654
- oi.displayName = "DashboardPin";
3655
- const ho = He.memo(oi), Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3683
+ ri.displayName = "DashboardPin";
3684
+ const uo = He.memo(ri), Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3656
3685
  __proto__: null,
3657
3686
  CARD_TYPE_CATALOG: we,
3658
- CATEGORY_ICONS: zn,
3659
- COLOR_MAP: On,
3660
- CardScketch: va,
3661
- CardSketch: $t,
3662
- CardTypeIconsProvider: ga,
3663
- ClonedComponent: Sn,
3664
- ComposerChatBinding: lo,
3665
- ComposerProvider: ua,
3666
- ComposerView: ni,
3667
- DEFAULT_PAD_HEIGHT_PX: nt,
3668
- DRAFT_SAVE_DEBOUNCE_MS: Tn,
3669
- DashboardPad: Rn,
3670
- DashboardPadEditor: _n,
3671
- DashboardPadSketch: ot,
3672
- DashboardPin: ho,
3673
- DashboardSidePanel: qn,
3674
- DatasetParameterizationControls: Aa,
3675
- DrawablePrompt: Qn,
3687
+ CATEGORY_ICONS: On,
3688
+ COLOR_MAP: Pn,
3689
+ CardScketch: Sa,
3690
+ CardSketch: At,
3691
+ CardTypeIconsProvider: xa,
3692
+ ClonedComponent: Cn,
3693
+ ComposerChatBinding: so,
3694
+ ComposerProvider: ma,
3695
+ ComposerView: ii,
3696
+ DEFAULT_PAD_HEIGHT_PX: it,
3697
+ DRAFT_SAVE_DEBOUNCE_MS: kn,
3698
+ DashboardPad: _n,
3699
+ DashboardPadEditor: Fn,
3700
+ DashboardPadSketch: rt,
3701
+ DashboardPin: uo,
3702
+ DashboardSidePanel: Yn,
3703
+ DatasetParameterizationControls: Ma,
3704
+ DrawablePrompt: ei,
3676
3705
  ENV_HIGHLIGHT_CLASS: Ze,
3677
- EntryEmptyState: _t,
3678
- EnvironmentProvider: ea,
3679
- ExampleCardSkath: _a,
3680
- ExampleCardSketch: rt,
3681
- ExampleCardSketh: Ra,
3682
- ExamplePad: Ma,
3683
- FILTER_TYPE_CATALOG: It,
3684
- FILTER_TYPE_ICONS: $n,
3685
- FilterSketch: At,
3686
- GRID_ROW_HEIGHT_PX: St,
3706
+ EntryEmptyState: Ft,
3707
+ EnvironmentProvider: ta,
3708
+ ExampleCardSkath: Fa,
3709
+ ExampleCardSketch: lt,
3710
+ ExampleCardSketh: _a,
3711
+ ExamplePad: Ra,
3712
+ FILTER_TYPE_CATALOG: zt,
3713
+ FILTER_TYPE_ICONS: An,
3714
+ FilterSketch: Mt,
3715
+ GRID_ROW_HEIGHT_PX: Ct,
3687
3716
  GUIDE_SHOW_DELAY_MS: Dn,
3688
- HoverButton: De,
3689
- InertEnvironmentProvider: ta,
3690
- PAD_INTERNAL_CLASSES: yn,
3691
- PAD_INTERNAL_IDS: xn,
3692
- PrototypePad: Fa,
3693
- SPECIFIC_TYPE_ICONS: Pn,
3717
+ HoverButton: ke,
3718
+ InertEnvironmentProvider: na,
3719
+ PAD_INTERNAL_CLASSES: bn,
3720
+ PAD_INTERNAL_IDS: yn,
3721
+ PrototypePad: Na,
3722
+ SPECIFIC_TYPE_ICONS: $n,
3694
3723
  SPECIFIC_TYPE_ICON_NAMES: En,
3695
- STARTER_TEMPLATES: Wa,
3696
- SessionVisualizationsPanel: ai,
3697
- SessionVisualizationsPanelButton: co,
3698
- SpotlightOverlay: ti,
3699
- TEMPLATE_KIND_TO_SKETCH: Wn,
3700
- TextSketh: Sa,
3701
- TitleSkath: Ca,
3724
+ STARTER_TEMPLATES: Va,
3725
+ SessionVisualizationsPanel: oi,
3726
+ SessionVisualizationsPanelButton: po,
3727
+ SpotlightOverlay: ni,
3728
+ TEMPLATE_KIND_TO_SKETCH: Vn,
3729
+ TextSketh: Ca,
3730
+ TitleSkath: wa,
3702
3731
  TitleSketch: Ge,
3703
- ToolBox: Mn,
3704
- VIEWER_COMMIT_DEBOUNCE_MS: wn,
3705
- activityPanelVariants: Nn,
3706
- activityPanelVariantsReduced: Ln,
3707
- ambientVariants: Fn,
3708
- ambientVariantsReduced: Hn,
3709
- autoComplete: La,
3710
- c: Na,
3711
- categoryPrefix: ca,
3712
- composerLayoutTransition: Bn,
3713
- composerLayoutTransitionReduced: Gn,
3714
- createComposerStore: kn,
3715
- createDashboardDraft: Pt,
3716
- datePicker: Ha,
3717
- dateRange: Ba,
3718
- defaultCardTypeIcons: An,
3719
- defaultComposerSuggestions: ei,
3720
- defaultComposerTemplates: Mt,
3721
- environmentFromStore: fa,
3732
+ ToolBox: Rn,
3733
+ VIEWER_COMMIT_DEBOUNCE_MS: Tn,
3734
+ activityPanelVariants: Bn,
3735
+ activityPanelVariantsReduced: Gn,
3736
+ ambientVariants: Nn,
3737
+ ambientVariantsReduced: Ln,
3738
+ autoComplete: Ga,
3739
+ c: Ba,
3740
+ categoryPrefix: pa,
3741
+ composerLayoutTransition: Hn,
3742
+ composerLayoutTransitionReduced: Wn,
3743
+ createComposerStore: In,
3744
+ createDashboardDraft: $t,
3745
+ datePicker: La,
3746
+ dateRange: Ha,
3747
+ defaultCardTypeIcons: Mn,
3748
+ defaultComposerSuggestions: ti,
3749
+ defaultComposerTemplates: Rt,
3750
+ environmentFromStore: ga,
3722
3751
  fromUpsertResponse: Be,
3723
- groupCardCatalog: it,
3724
- guideStepsRequireSketch: vn,
3725
- isElementVisible: zt,
3726
- isSimplePadDefinition: hn,
3727
- joinClientSideChanges: kt,
3728
- padConfigToDashboard: pn,
3729
- pickBestElement: gn,
3752
+ groupCardCatalog: at,
3753
+ guideStepsRequireSketch: Sn,
3754
+ isElementVisible: Ot,
3755
+ isSimplePadDefinition: un,
3756
+ joinClientSideChanges: It,
3757
+ padConfigToDashboard: hn,
3758
+ pickBestElement: xn,
3730
3759
  randomId: ze,
3731
3760
  resolveComposerSurfaces: ue,
3732
3761
  resolveEnvironmentElements: Qe,
3733
- resolveGuideElement: Ot,
3734
- sanitizeToJsVariable: $e,
3735
- seedFromTemplate: jn,
3736
- sketchCardItemComparer: la,
3737
- sketchFilterComparer: sa,
3738
- targetSuggestsPadInternal: bn,
3739
- templateKinds: Vn,
3740
- toDraftPayload: Cn,
3741
- toSelectorList: fn,
3742
- upsertDashboardDraft: at,
3743
- useCardTypeIcons: Me,
3762
+ resolveGuideElement: Pt,
3763
+ sanitizeToJsVariable: Ne,
3764
+ sanitizeToJsxComponentName: nt,
3765
+ seedFromTemplate: Un,
3766
+ sketchCardItemComparer: sa,
3767
+ sketchFilterComparer: da,
3768
+ targetSuggestsPadInternal: vn,
3769
+ templateKinds: jn,
3770
+ toDraftPayload: wn,
3771
+ toSelectorList: gn,
3772
+ upsertDashboardDraft: ot,
3773
+ useCardTypeIcons: Ae,
3744
3774
  useComposer: B,
3745
- useComposerChatBridge: ii,
3746
- useComposerEnvironment: In,
3775
+ useComposerChatBridge: ai,
3776
+ useComposerEnvironment: zn,
3747
3777
  useComposerStore: he,
3748
- useComposerStoreOptional: ma,
3749
- useDashboardPad: Ga,
3750
- useEnvironment: dn,
3751
- useEnvironmentOptional: na,
3752
- validateSketch: bt
3778
+ useComposerStoreOptional: fa,
3779
+ useDashboardPad: Wa,
3780
+ useEnvironment: cn,
3781
+ useEnvironmentOptional: ia,
3782
+ validateSketch: vt
3753
3783
  }, Symbol.toStringTag, { value: "Module" }));
3754
3784
  export {
3755
- La as $,
3756
- Fa as A,
3785
+ Ga as $,
3786
+ Na as A,
3757
3787
  En as B,
3758
3788
  we as C,
3759
- nt as D,
3789
+ it as D,
3760
3790
  Ze as E,
3761
- It as F,
3762
- St as G,
3763
- De as H,
3764
- Wa as I,
3765
- ai as J,
3766
- co as K,
3767
- Vo as L,
3768
- ti as M,
3769
- Sa as N,
3770
- Ca as O,
3771
- yn as P,
3791
+ zt as F,
3792
+ Ct as G,
3793
+ ke as H,
3794
+ Va as I,
3795
+ oi as J,
3796
+ po as K,
3797
+ jo as L,
3798
+ ni as M,
3799
+ Ca as N,
3800
+ wa as O,
3801
+ bn as P,
3772
3802
  Ge as Q,
3773
- Mn as R,
3774
- Pn as S,
3775
- Wn as T,
3776
- jt as U,
3777
- wn as V,
3778
- jo as W,
3779
- Nn as X,
3780
- Ln as Y,
3781
- Fn as Z,
3782
- Hn as _,
3783
- zn as a,
3784
- Na as a0,
3785
- ca as a1,
3786
- Bn as a2,
3787
- Gn as a3,
3788
- kn as a4,
3789
- Pt as a5,
3790
- Ha as a6,
3791
- Ba as a7,
3792
- An as a8,
3793
- ei as a9,
3794
- In as aA,
3795
- he as aB,
3796
- ma as aC,
3797
- Ga as aD,
3798
- Un as aE,
3799
- bt as aF,
3800
- Uo as aG,
3801
- Mt as aa,
3802
- fa as ab,
3803
+ Rn as R,
3804
+ $n as S,
3805
+ Vn as T,
3806
+ Ut as U,
3807
+ Tn as V,
3808
+ Uo as W,
3809
+ Bn as X,
3810
+ Gn as Y,
3811
+ Nn as Z,
3812
+ Ln as _,
3813
+ On as a,
3814
+ Ba as a0,
3815
+ pa as a1,
3816
+ Hn as a2,
3817
+ Wn as a3,
3818
+ In as a4,
3819
+ $t as a5,
3820
+ La as a6,
3821
+ Ha as a7,
3822
+ Mn as a8,
3823
+ ti as a9,
3824
+ ai as aA,
3825
+ zn as aB,
3826
+ he as aC,
3827
+ fa as aD,
3828
+ Wa as aE,
3829
+ Kn as aF,
3830
+ vt as aG,
3831
+ Ko as aH,
3832
+ Rt as aa,
3833
+ ga as ab,
3803
3834
  Be as ac,
3804
- it as ad,
3805
- vn as ae,
3806
- zt as af,
3807
- hn as ag,
3808
- kt as ah,
3809
- pn as ai,
3810
- gn as aj,
3835
+ at as ad,
3836
+ Sn as ae,
3837
+ Ot as af,
3838
+ un as ag,
3839
+ It as ah,
3840
+ hn as ai,
3841
+ xn as aj,
3811
3842
  ze as ak,
3812
3843
  ue as al,
3813
3844
  Qe as am,
3814
- Ot as an,
3815
- $e as ao,
3816
- jn as ap,
3817
- la as aq,
3845
+ Pt as an,
3846
+ Ne as ao,
3847
+ nt as ap,
3848
+ Un as aq,
3818
3849
  sa as ar,
3819
- bn as as,
3820
- Vn as at,
3821
- Cn as au,
3822
- fn as av,
3823
- at as aw,
3824
- Me as ax,
3825
- B as ay,
3826
- ii as az,
3827
- On as b,
3828
- va as c,
3829
- $t as d,
3830
- ga as e,
3831
- Sn as f,
3832
- lo as g,
3833
- ua as h,
3834
- ni as i,
3835
- Tn as j,
3836
- Rn as k,
3837
- _n as l,
3838
- ot as m,
3839
- ho as n,
3840
- qn as o,
3841
- Aa as p,
3842
- Qn as q,
3843
- _t as r,
3844
- _a as s,
3845
- rt as t,
3846
- Ra as u,
3847
- Ma as v,
3848
- $n as w,
3849
- At as x,
3850
+ da as as,
3851
+ vn as at,
3852
+ jn as au,
3853
+ wn as av,
3854
+ gn as aw,
3855
+ ot as ax,
3856
+ Ae as ay,
3857
+ B as az,
3858
+ Pn as b,
3859
+ Sa as c,
3860
+ At as d,
3861
+ xa as e,
3862
+ Cn as f,
3863
+ so as g,
3864
+ ma as h,
3865
+ ii as i,
3866
+ kn as j,
3867
+ _n as k,
3868
+ Fn as l,
3869
+ rt as m,
3870
+ uo as n,
3871
+ Yn as o,
3872
+ Ma as p,
3873
+ ei as q,
3874
+ Ft as r,
3875
+ Fa as s,
3876
+ lt as t,
3877
+ _a as u,
3878
+ Ra as v,
3879
+ An as w,
3880
+ Mt as x,
3850
3881
  Dn as y,
3851
- xn as z
3882
+ yn as z
3852
3883
  };
3853
- //# sourceMappingURL=index-DOfnLVhs.js.map
3884
+ //# sourceMappingURL=index-DrS3V1Ke.js.map