@aintela/bi 0.2.4 → 0.2.5

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-B8Y5LoE4.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,101 @@ 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
+ backgroundPosition: "8px 8px"
1341
1311
  },
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
- ] })
1312
+ children: [
1313
+ 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(
1314
+ qi,
1315
+ {
1316
+ rowAwareResize: { defaultOn: !0 },
1317
+ onLayoutChange: M,
1318
+ onResizeStop: w,
1319
+ onDragStop: w,
1320
+ onDrop: Q,
1321
+ config: {},
1322
+ cols: { lg: 10, md: 8, sm: 4, xs: 4, xxs: 4 },
1323
+ breakpoints: { lg: 920, md: 600, sm: 400, xs: 400, xxs: 0 },
1324
+ rowHeight: 10,
1325
+ dragLocked: !1,
1326
+ zoomLevel: E,
1327
+ responsive: !1,
1328
+ maxRows: 200,
1329
+ rowMultiplier: 1,
1330
+ manualWidth: u,
1331
+ layouts: l,
1332
+ children: l.map((m) => {
1333
+ var D;
1334
+ return /* @__PURE__ */ t(
1335
+ Yi,
1336
+ {
1337
+ className: "llm-env-target llm-env-card llm-env-card-sketch-wrapper",
1338
+ "data-env-id": m.i,
1339
+ naked: g == "Naked",
1340
+ "data-env-key": m.i,
1341
+ "data-env-name": m.name ?? "",
1342
+ "data-env-kind": "sketch-card-wrapper",
1343
+ children: /* @__PURE__ */ t(
1344
+ At,
1345
+ {
1346
+ turnOpen: x ?? !1,
1347
+ todoItem: (D = d[m.i]) == null ? void 0 : D.todo,
1348
+ cellConfig: m,
1349
+ onDataEdit: I,
1350
+ onDelete: F,
1351
+ renderDescription: e.renderDescription
1352
+ }
1353
+ )
1354
+ },
1355
+ m.i
1356
+ );
1357
+ })
1358
+ },
1359
+ h
1360
+ ) }),
1361
+ u !== 0 && l.length == 0 && /* @__PURE__ */ t(
1362
+ j,
1363
+ {
1364
+ sx: /* @__PURE__ */ a((m) => ({
1365
+ background: "transparent",
1366
+ border: "none",
1367
+ textAlign: "left",
1368
+ padding: "6px 0",
1369
+ height: "100%",
1370
+ color: m.palette.text.secondary,
1371
+ fontFamily: m.typography.fontFamily,
1372
+ display: "inline-flex",
1373
+ width: "100%",
1374
+ justifyContent: "center",
1375
+ alignItems: "center",
1376
+ "&:hover": { color: m.palette.text.primary }
1377
+ }), "sx"),
1378
+ children: /* @__PURE__ */ b(se, { direction: "row", gap: 1, sx: { "&:hover": { cursor: "pointer" } }, onClick: /* @__PURE__ */ a(() => {
1379
+ var m;
1380
+ return (m = e.onAddCard) == null ? void 0 : m.call(e);
1381
+ }, "onClick"), children: [
1382
+ /* @__PURE__ */ t(j, { component: "span", sx: /* @__PURE__ */ a((m) => ({ color: m.palette.text.disabled }), "sx"), children: "↗" }),
1383
+ /* @__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" })
1384
+ ] })
1385
+ }
1386
+ )
1387
+ ]
1388
+ }
1389
+ )
1371
1390
  ] });
1372
1391
  });
1373
- ot.displayName = "DashboardPadSketch";
1374
- const Ia = [], za = [], De = /* @__PURE__ */ a((e) => {
1392
+ rt.displayName = "DashboardPadSketch";
1393
+ const za = [], Oa = [], ke = /* @__PURE__ */ a((e) => {
1375
1394
  const n = le(), i = e.maxWidth ?? 30;
1376
1395
  return /* @__PURE__ */ t(
1377
1396
  j,
@@ -1426,8 +1445,8 @@ const Ia = [], za = [], De = /* @__PURE__ */ a((e) => {
1426
1445
  ] })
1427
1446
  }
1428
1447
  );
1429
- }, "HoverButton"), Oa = it(we);
1430
- function Pa(e, n, i) {
1448
+ }, "HoverButton"), Pa = at(we);
1449
+ function $a(e, n, i) {
1431
1450
  const l = document.createElement("div");
1432
1451
  return l.style.cssText = [
1433
1452
  "display:flex",
@@ -1449,9 +1468,9 @@ function Pa(e, n, i) {
1449
1468
  "pointer-events:none"
1450
1469
  ].join(";"), l.innerHTML = `${n}<span>${i}</span>`, document.body.appendChild(l), l;
1451
1470
  }
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);
1471
+ a($a, "createDragPreview");
1472
+ const Rn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }) => {
1473
+ const l = le(), o = Ae(), [r, g] = N(!1), [h, x] = N(!1), d = ee(null), v = ee(null), s = ee(null);
1455
1474
  q(() => () => {
1456
1475
  var f;
1457
1476
  return (f = s.current) == null ? void 0 : f.remove();
@@ -1462,7 +1481,7 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1462
1481
  }, []), u = /* @__PURE__ */ a((f, y) => {
1463
1482
  const R = y ? { category: y.category, specificType: y.specificType, label: y.label } : { category: "Generic", specificType: "Generic", label: "Generic" };
1464
1483
  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");
1484
+ 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
1485
  s.current = P, f.dataTransfer.setDragImage(P, 0, 0);
1467
1486
  }, "handleDragStart"), p = /* @__PURE__ */ a((f) => {
1468
1487
  n(f.category, f.specificType, f.label), g(!1);
@@ -1489,19 +1508,19 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1489
1508
  "&:hover": { bgcolor: "action.hover" },
1490
1509
  "&:active": { cursor: "grabbing" }
1491
1510
  },
1492
- children: /* @__PURE__ */ t(Ai, { sx: { fontSize: 16 }, color: "secondary" })
1511
+ children: /* @__PURE__ */ t(Mi, { sx: { fontSize: 16 }, color: "secondary" })
1493
1512
  }
1494
1513
  ) }),
1495
1514
  /* @__PURE__ */ b(j, { sx: { position: "relative", display: "inline-flex", alignItems: "center" }, children: [
1496
1515
  /* @__PURE__ */ t(Ie, { title: "Add card", children: /* @__PURE__ */ t(
1497
- Ft,
1516
+ Nt,
1498
1517
  {
1499
1518
  className: "action-btn llm-env-target llm-env-dashboard-action",
1500
1519
  "data-env-id": "dashboardpad-add-card",
1501
1520
  variant: "outlined",
1502
1521
  size: "small",
1503
1522
  color: "secondary",
1504
- startIcon: /* @__PURE__ */ t(Mi, { sx: { m: 0.2, p: 0 } }),
1523
+ startIcon: /* @__PURE__ */ t(Ri, { sx: { m: 0.2, p: 0 } }),
1505
1524
  onClick: e,
1506
1525
  sx: { height: 28, fontSize: "0.7rem", pr: 1, gap: 0, minWidth: "80px", textTransform: "none", justifyContent: "left" },
1507
1526
  children: "Card"
@@ -1517,11 +1536,11 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1517
1536
  onClick: /* @__PURE__ */ a(() => g((f) => !f), "onClick"),
1518
1537
  sx: { position: "absolute", right: 0, height: 28, width: 20 },
1519
1538
  "aria-label": "Tipos de card",
1520
- children: /* @__PURE__ */ t(mt, { color: "secondary", sx: { fontSize: 18, mr: 0.5 } })
1539
+ children: /* @__PURE__ */ t(ft, { color: "secondary", sx: { fontSize: 18, mr: 0.5 } })
1521
1540
  }
1522
1541
  )
1523
1542
  ] }),
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) => {
1543
+ /* @__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
1544
  const L = o.category[y];
1526
1545
  return /* @__PURE__ */ b(j, { children: [
1527
1546
  H > 0 && /* @__PURE__ */ t(Ke, {}),
@@ -1531,7 +1550,7 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1531
1550
  ] }),
1532
1551
  R.map((P) => {
1533
1552
  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: [
1553
+ return /* @__PURE__ */ b($e, { onClick: /* @__PURE__ */ a(() => p(P), "onClick"), draggable: !0, onDragStart: /* @__PURE__ */ a((E) => u(E, P), "onDragStart"), onDragEnd: c, children: [
1535
1554
  /* @__PURE__ */ t(qe, { children: /* @__PURE__ */ t(_, { fontSize: "small" }) }),
1536
1555
  /* @__PURE__ */ t(Ye, { children: P.label })
1537
1556
  ] }, P.specificType);
@@ -1540,7 +1559,7 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1540
1559
  }) }) }) }) }), "children") }),
1541
1560
  i && /* @__PURE__ */ b(Te, { children: [
1542
1561
  /* @__PURE__ */ t(Ie, { title: "Add filter", children: /* @__PURE__ */ t(
1543
- Ft,
1562
+ Nt,
1544
1563
  {
1545
1564
  className: "action-btn llm-env-target llm-env-dashboard-action",
1546
1565
  "data-env-id": "dashboardpad-add-filter",
@@ -1548,17 +1567,17 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1548
1567
  variant: "outlined",
1549
1568
  size: "small",
1550
1569
  color: "secondary",
1551
- startIcon: /* @__PURE__ */ t(Ri, {}),
1552
- endIcon: /* @__PURE__ */ t(mt, {}),
1570
+ startIcon: /* @__PURE__ */ t(_i, {}),
1571
+ endIcon: /* @__PURE__ */ t(ft, {}),
1553
1572
  onClick: /* @__PURE__ */ a(() => x((f) => !f), "onClick"),
1554
1573
  sx: { height: 28, fontSize: "0.7rem", minWidth: 0, textTransform: "none" },
1555
1574
  children: "Filtro"
1556
1575
  }
1557
1576
  ) }),
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) => {
1577
+ /* @__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
1578
  const R = o.filterType[y.filterType];
1560
1579
  return /* @__PURE__ */ b(
1561
- Ee,
1580
+ $e,
1562
1581
  {
1563
1582
  onClick: /* @__PURE__ */ a(() => {
1564
1583
  i(y.filterType), x(!1);
@@ -1573,8 +1592,8 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1573
1592
  }) }) }) }) }), "children") })
1574
1593
  ] })
1575
1594
  ] });
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)}`, []);
1595
+ }, "ToolBox"), _n = /* @__PURE__ */ a((e) => {
1596
+ 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
1597
  q(() => {
1579
1598
  var A;
1580
1599
  if (e.turnOpen) return;
@@ -1584,22 +1603,22 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1584
1603
  const F = W(() => {
1585
1604
  const C = i.getState().dashboardDefinition;
1586
1605
  if (!C || !e.onCompose) return;
1587
- const A = bt(C);
1606
+ const A = vt(C);
1588
1607
  if (A) {
1589
1608
  c(A), setTimeout(() => c(void 0), 2e3);
1590
1609
  return;
1591
1610
  }
1592
1611
  e.onCompose(C);
1593
- }, [e.onCompose, i]), D = W((C) => {
1612
+ }, [e.onCompose, i]), k = W((C) => {
1594
1613
  var A;
1595
- K.current = C.id ?? null, bt(C), i.getState().updateDashboard(C), (A = e.onChange) == null || A.call(e, C);
1614
+ K.current = C.id ?? null, vt(C), i.getState().updateDashboard(C), (A = e.onChange) == null || A.call(e, C);
1596
1615
  }, [e.onChange, i]), z = W(async () => {
1597
1616
  var A;
1598
1617
  const C = i.getState().dashboardDefinition;
1599
1618
  if (!(!(C != null && C.id) || !n)) {
1600
1619
  p(!0);
1601
1620
  try {
1602
- await at(n, C), (A = e.onChange) == null || A.call(e, C);
1621
+ await ot(n, C), (A = e.onChange) == null || A.call(e, C);
1603
1622
  } catch (Y) {
1604
1623
  console.error("[@aintela/bi composer] Error saving dashboard:", Y);
1605
1624
  } finally {
@@ -1611,18 +1630,18 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1611
1630
  if (!n || !e.dashboardId || V.current || K.current === e.dashboardId) return;
1612
1631
  v(null), i.getState().updateDashboard(void 0);
1613
1632
  const C = n.getDashboard(e.dashboardId);
1614
- V.current = C, C.then((A) => D(Be(A))).catch((A) => v(String(A))).finally(() => {
1633
+ V.current = C, C.then((A) => k(Be(A))).catch((A) => v(String(A))).finally(() => {
1615
1634
  V.current = null;
1616
1635
  });
1617
- }, [D, n, e.dashboardId, i]);
1636
+ }, [k, n, e.dashboardId, i]);
1618
1637
  const I = W(async () => {
1619
1638
  if (n)
1620
1639
  try {
1621
- D(await Pt(n, e.sessionId));
1640
+ k(await $t(n, e.sessionId));
1622
1641
  } catch (C) {
1623
1642
  console.error("[@aintela/bi composer] Error creating new dashboard:", C);
1624
1643
  }
1625
- }, [D, n, e.sessionId]), U = W(() => {
1644
+ }, [k, n, e.sessionId]), U = W(() => {
1626
1645
  i.getState().refreshDashboard();
1627
1646
  }, [i]), J = W(async () => {
1628
1647
  const C = !f;
@@ -1640,16 +1659,16 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1640
1659
  if (!(!C.id || !n)) {
1641
1660
  y(!1);
1642
1661
  try {
1643
- D(Be(await n.getDashboard(C.id)));
1662
+ k(Be(await n.getDashboard(C.id)));
1644
1663
  } catch (A) {
1645
1664
  console.error("[@aintela/bi composer] Error loading dashboard:", A);
1646
1665
  }
1647
1666
  }
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");
1667
+ }, [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
1668
  return /* @__PURE__ */ b(se, { className: "bi-dashboard-pad", sx: { height: "100%", minHeight: 0 }, children: [
1650
1669
  /* @__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
1670
  !l && !d && /* @__PURE__ */ b(se, { direction: "row", gap: 1, alignItems: "center", children: [
1652
- /* @__PURE__ */ t(ft, { size: 16 }),
1671
+ /* @__PURE__ */ t(gt, { size: 16 }),
1653
1672
  /* @__PURE__ */ t(ie, { color: "text.secondary", children: "Carregando dashboard" })
1654
1673
  ] }),
1655
1674
  d && /* @__PURE__ */ b(ie, { color: "error", children: [
@@ -1657,9 +1676,9 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1657
1676
  d
1658
1677
  ] }),
1659
1678
  l && /* @__PURE__ */ b(Te, { children: [
1660
- e.onBack && /* @__PURE__ */ t(De, { onClick: e.onBack, icon: de("dashboard-pad-back", /* @__PURE__ */ t(Ni, {})), label: "Voltar" }),
1679
+ e.onBack && /* @__PURE__ */ t(ke, { onClick: e.onBack, icon: de("dashboard-pad-back", /* @__PURE__ */ t(Bi, {})), label: "Voltar" }),
1661
1680
  /* @__PURE__ */ b(
1662
- sn,
1681
+ dn,
1663
1682
  {
1664
1683
  value: r,
1665
1684
  exclusive: !0,
@@ -1670,11 +1689,11 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1670
1689
  sx: { height: 24, border: "0px", "& .Mui-selected": { border: `1px solid ${M.palette.divider}` } },
1671
1690
  children: [
1672
1691
  /* @__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 } }),
1692
+ /* @__PURE__ */ t(kt, { sx: { fontSize: 18 } }),
1674
1693
  /* @__PURE__ */ t(ie, { component: "span", sx: ge(r === "Sketch", 50), children: "Sketch" })
1675
1694
  ] }),
1676
1695
  /* @__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 } }),
1696
+ /* @__PURE__ */ t(Fi, { sx: { fontSize: 18 } }),
1678
1697
  /* @__PURE__ */ t(ie, { component: "span", sx: ge(r === "Generated", 70), children: "Dashboard" })
1679
1698
  ] })
1680
1699
  ]
@@ -1682,41 +1701,41 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1682
1701
  ),
1683
1702
  /* @__PURE__ */ t(Ke, { orientation: "vertical", flexItem: !0, sx: { mx: 1 } }),
1684
1703
  /* @__PURE__ */ t(j, { sx: { flex: 1, display: "flex", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ t(
1685
- Mn,
1704
+ Rn,
1686
1705
  {
1687
1706
  onAddGeneric: /* @__PURE__ */ a(() => {
1688
1707
  var C;
1689
- return (C = $.current) == null ? void 0 : C.addGenericCell();
1708
+ return (C = E.current) == null ? void 0 : C.addGenericCell();
1690
1709
  }, "onAddGeneric"),
1691
1710
  onAddTyped: /* @__PURE__ */ a((C, A, Y) => {
1692
1711
  var m;
1693
- return (m = $.current) == null ? void 0 : m.addTypedCell(C, A, Y);
1712
+ return (m = E.current) == null ? void 0 : m.addTypedCell(C, A, Y);
1694
1713
  }, "onAddTyped"),
1695
1714
  onAddFilter: /* @__PURE__ */ a((C) => {
1696
1715
  var A;
1697
- return (A = $.current) == null ? void 0 : A.handleAddFilter(C);
1716
+ return (A = E.current) == null ? void 0 : A.handleAddFilter(C);
1698
1717
  }, "onAddFilter")
1699
1718
  }
1700
1719
  ) }),
1701
1720
  /* @__PURE__ */ t(Ke, { orientation: "vertical", flexItem: !0, sx: { mx: 1 } }),
1702
1721
  /* @__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" }),
1722
+ n && /* @__PURE__ */ t(ke, { onClick: I, icon: de("dashboard-pad-new", /* @__PURE__ */ t(Hi, {})), label: "Novo" }),
1704
1723
  n && /* @__PURE__ */ t(
1705
- De,
1724
+ ke,
1706
1725
  {
1707
1726
  onClick: u ? void 0 : z,
1708
- icon: /* @__PURE__ */ a(() => u ? /* @__PURE__ */ t(ft, { size: 14 }) : de("dashboard-pad-save", /* @__PURE__ */ t(Hi, {})), "icon"),
1727
+ icon: /* @__PURE__ */ a(() => u ? /* @__PURE__ */ t(gt, { size: 14 }) : de("dashboard-pad-save", /* @__PURE__ */ t(Li, {})), "icon"),
1709
1728
  label: "Salvar"
1710
1729
  }
1711
1730
  ),
1712
- /* @__PURE__ */ t(De, { onClick: U, icon: de("dashboard-pad-refresh", /* @__PURE__ */ t(ln, {})), label: "Atualizar" }),
1731
+ /* @__PURE__ */ t(ke, { onClick: U, icon: de("dashboard-pad-refresh", /* @__PURE__ */ t(sn, {})), label: "Atualizar" }),
1713
1732
  n && ne && /* @__PURE__ */ t("div", { ref: _, children: /* @__PURE__ */ t(
1714
- De,
1733
+ ke,
1715
1734
  {
1716
1735
  onClick: J,
1717
1736
  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 } })
1737
+ /* @__PURE__ */ t(Ni, { sx: { fontSize: 18 } }),
1738
+ /* @__PURE__ */ t(ft, { sx: { fontSize: 14, ml: -0.25 } })
1720
1739
  ] }),
1721
1740
  label: "Abrir"
1722
1741
  }
@@ -1739,66 +1758,66 @@ const Mn = /* @__PURE__ */ a(({ onAddGeneric: e, onAddTyped: n, onAddFilter: i }
1739
1758
  },
1740
1759
  children: [
1741
1760
  /* @__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, {}))
1761
+ de("dashboard-pad-compose", /* @__PURE__ */ t(Gi, {}))
1743
1762
  ]
1744
1763
  }
1745
1764
  ) })
1746
1765
  ] })
1747
1766
  ] })
1748
1767
  ] }) }),
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") }),
1768
+ 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
1769
  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 }) })
1770
+ 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) }) }),
1771
+ /* @__PURE__ */ t("div", { style: { minHeight: "300px", flex: 1 }, children: /* @__PURE__ */ t(rt, { ref: E, renderId: w, headerExtra: e.headerExtra, renderDescription: e.renderDescription }) })
1753
1772
  ] }),
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) })
1773
+ 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
1774
  ] });
1756
1775
  }, "DashboardPad");
1757
- Rn.displayName = "DashboardPad";
1758
- const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1776
+ _n.displayName = "DashboardPad";
1777
+ const ht = 40, Ea = 100, Aa = 150, Fn = Tt((e, n) => {
1759
1778
  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;
1779
+ let k = w, z = 1;
1780
+ for (; r.some((I) => I.name === k && I.name !== F); )
1781
+ z += 1, k = `${w} (${z})`;
1782
+ return k;
1764
1783
  }, [r]), H = W((w) => {
1765
1784
  r.some((F) => F.name === w) && x(w);
1766
1785
  }, [r]), L = W((w, F) => {
1767
1786
  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;
1787
+ const k = R(F ?? o()), z = { id: ze(), name: k, contentType: w ?? i };
1788
+ return g((U) => [...U, z]), x(k), (I = e.onTabCreate) == null || I.call(e, z), k;
1770
1789
  }, [i, R, e.onTabCreate, o]), P = W((w) => {
1771
1790
  g((F) => {
1772
1791
  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);
1792
+ const k = F.findIndex((Q) => Q.name === w);
1793
+ if (k === -1) return F;
1794
+ const z = F[k], I = F.filter((Q) => Q.name !== w);
1776
1795
  if (I.length === 0) {
1777
1796
  const Q = { name: o(), contentType: i, id: ze() };
1778
1797
  return x(Q.name), (U = e.onTabClose) == null || U.call(e, z), [Q];
1779
1798
  }
1780
- return h === w && x(I[Math.min(D, I.length - 1)].name), (J = e.onTabClose) == null || J.call(e, z), I;
1799
+ return h === w && x(I[Math.min(k, I.length - 1)].name), (J = e.onTabClose) == null || J.call(e, z), I;
1781
1800
  });
1782
1801
  }, [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(() => {
1802
+ 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
1803
  var w;
1785
1804
  y && ((w = e.onTabChange) == null || w.call(e, y));
1786
1805
  }, [h]);
1787
1806
  const _ = /* @__PURE__ */ a((w) => {
1788
1807
  v(w.name), c(w.name);
1789
- }, "startRename"), $ = /* @__PURE__ */ a(() => {
1808
+ }, "startRename"), E = /* @__PURE__ */ a(() => {
1790
1809
  var F;
1791
1810
  if (!d) return;
1792
1811
  const w = s.trim();
1793
1812
  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);
1813
+ const k = R(w, d), z = d;
1814
+ g((U) => U.map((J) => J.name === d ? { ...J, name: k } : J)), h === d && x(k);
1796
1815
  const I = r.find((U) => U.name === d);
1797
- I && ((F = e.onTabRename) == null || F.call(e, { ...I, name: D }, z));
1816
+ I && ((F = e.onTabRename) == null || F.call(e, { ...I, name: k }, z));
1798
1817
  }
1799
1818
  v(null);
1800
1819
  }, "commitRename"), V = /* @__PURE__ */ a((w) => {
1801
- w.key === "Enter" ? $() : w.key === "Escape" && v(null);
1820
+ w.key === "Enter" ? E() : w.key === "Escape" && v(null);
1802
1821
  }, "handleRenameKeyDown");
1803
1822
  q(() => {
1804
1823
  d && f.current && (f.current.focus(), f.current.select());
@@ -1806,17 +1825,17 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1806
1825
  const K = /* @__PURE__ */ a((w) => {
1807
1826
  var F;
1808
1827
  (F = e.addMenuItems) != null && F.length ? p(w.currentTarget) : L();
1809
- }, "handleAddMenuOpen"), M = /* @__PURE__ */ t(Vi, { sx: { fontSize: 15, color: "text.secondary", flexShrink: 0 } });
1828
+ }, "handleAddMenuOpen"), M = /* @__PURE__ */ t(ji, { sx: { fontSize: 15, color: "text.secondary", flexShrink: 0 } });
1810
1829
  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: [
1830
+ /* @__PURE__ */ b(j, { sx: { display: "flex", alignItems: "center", borderBottom: "1px solid", borderColor: "divider", backgroundColor: "background.paper", minHeight: ht, maxHeight: ht, overflow: "hidden" }, children: [
1812
1831
  /* @__PURE__ */ t(j, { sx: { display: "flex", alignItems: "center", flex: 1, overflow: "auto", backgroundColor: "background.default", "&::-webkit-scrollbar": { height: 0 } }, children: r.map((w) => {
1813
1832
  var z;
1814
- const F = w.name === h, D = w.name === d;
1833
+ const F = w.name === h, k = w.name === d;
1815
1834
  return /* @__PURE__ */ b(
1816
1835
  j,
1817
1836
  {
1818
1837
  onClick: /* @__PURE__ */ a(() => {
1819
- D || x(w.name);
1838
+ k || x(w.name);
1820
1839
  }, "onClick"),
1821
1840
  onDoubleClick: /* @__PURE__ */ a(() => _(w), "onDoubleClick"),
1822
1841
  sx: /* @__PURE__ */ a((I) => ({
@@ -1824,8 +1843,8 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1824
1843
  alignItems: "center",
1825
1844
  gap: 0.5,
1826
1845
  minWidth: Ea,
1827
- maxWidth: $a,
1828
- height: pt,
1846
+ maxWidth: Aa,
1847
+ height: ht,
1829
1848
  px: 1.5,
1830
1849
  cursor: "pointer",
1831
1850
  userSelect: "none",
@@ -1837,13 +1856,13 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1837
1856
  }), "sx"),
1838
1857
  children: [
1839
1858
  ((z = e.renderTabIcon) == null ? void 0 : z.call(e, w)) ?? M,
1840
- D ? /* @__PURE__ */ t(
1841
- Ne,
1859
+ k ? /* @__PURE__ */ t(
1860
+ Fe,
1842
1861
  {
1843
1862
  inputRef: f,
1844
1863
  value: s,
1845
1864
  onChange: /* @__PURE__ */ a((I) => c(I.target.value), "onChange"),
1846
- onBlur: $,
1865
+ onBlur: E,
1847
1866
  onKeyDown: V,
1848
1867
  variant: "standard",
1849
1868
  size: "small",
@@ -1864,7 +1883,7 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1864
1883
  }, "onClick"),
1865
1884
  sx: { p: 0.2, opacity: F ? 0.7 : 0, "&:hover": { opacity: 1 }, transition: "opacity 0.15s" },
1866
1885
  "aria-label": "Fechar aba",
1867
- children: /* @__PURE__ */ t(Gi, { sx: { fontSize: 14 } })
1886
+ children: /* @__PURE__ */ t(Wi, { sx: { fontSize: 14 } })
1868
1887
  }
1869
1888
  )
1870
1889
  ]
@@ -1872,11 +1891,11 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1872
1891
  w.name
1873
1892
  );
1874
1893
  }) }),
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) => [
1894
+ /* @__PURE__ */ t(Pe, { size: "small", onClick: K, sx: { mx: 0.5, flexShrink: 0 }, title: "Adicionar aba", children: /* @__PURE__ */ t(Vi, { sx: { fontSize: 18 } }) }),
1895
+ 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
1896
  w.dividerBefore && /* @__PURE__ */ t(j, { component: "li", sx: { borderTop: "1px solid", borderColor: "divider" } }, `div-${F}`),
1878
1897
  /* @__PURE__ */ b(
1879
- Ee,
1898
+ $e,
1880
1899
  {
1881
1900
  onClick: /* @__PURE__ */ a(() => {
1882
1901
  L(w.contentType), p(null);
@@ -1894,8 +1913,8 @@ const pt = 40, Ea = 100, $a = 150, _n = wt((e, n) => {
1894
1913
  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
1914
  ] });
1896
1915
  });
1897
- _n.displayName = "DashboardPadEditor";
1898
- const Aa = /* @__PURE__ */ a(({
1916
+ Fn.displayName = "DashboardPadEditor";
1917
+ const Ma = /* @__PURE__ */ a(({
1899
1918
  orientation: e = "row",
1900
1919
  datasets: n,
1901
1920
  defaultTemplateDataset: i = "BI_TemplateModel",
@@ -1925,11 +1944,11 @@ const Aa = /* @__PURE__ */ a(({
1925
1944
  sx: u ? {} : { px: 1, py: 0.25, borderLeft: `1px solid ${h.palette.divider}` },
1926
1945
  children: [
1927
1946
  /* @__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" }),
1947
+ /* @__PURE__ */ t(yt, { size: "small", checked: d, onChange: s, "data-env-id": "dashboard-pad-dataset-parameterized" }),
1929
1948
  /* @__PURE__ */ t(ie, { variant: "body2", sx: { color: "text.secondary", whiteSpace: "nowrap", fontSize: u ? 11.5 : void 0 }, children: "DataSet Dinâmico" })
1930
1949
  ] }),
1931
1950
  d && /* @__PURE__ */ t(
1932
- Nt,
1951
+ Bt,
1933
1952
  {
1934
1953
  size: "small",
1935
1954
  value: v ?? "",
@@ -1941,14 +1960,14 @@ const Aa = /* @__PURE__ */ a(({
1941
1960
  var f;
1942
1961
  return p ? ((f = n.find((y) => y.dataSetId === p)) == null ? void 0 : f.name) ?? p : "Default…";
1943
1962
  }, "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: [
1963
+ 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
1964
  /* @__PURE__ */ t("span", { children: p.name }),
1946
1965
  p.isTemplate && /* @__PURE__ */ t(ie, { variant: "caption", sx: { color: "text.disabled" }, children: "(template)" })
1947
1966
  ] }) }, p.dataSetId))
1948
1967
  }
1949
1968
  ),
1950
1969
  l && /* @__PURE__ */ t(j, { sx: u ? {} : { borderLeft: `1px solid ${h.palette.divider}`, pl: 1 }, children: /* @__PURE__ */ t(
1951
- Nt,
1970
+ Bt,
1952
1971
  {
1953
1972
  size: "small",
1954
1973
  value: c,
@@ -1964,26 +1983,26 @@ const Aa = /* @__PURE__ */ a(({
1964
1983
  return ((f = l.find((y) => y.id === p)) == null ? void 0 : f.name) ?? "Agent…";
1965
1984
  }, "renderValue"),
1966
1985
  "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))
1986
+ children: l.map((p) => /* @__PURE__ */ t($e, { value: p.id, sx: { fontSize: "0.8rem" }, children: p.name }, p.id))
1968
1987
  }
1969
1988
  ) })
1970
1989
  ]
1971
1990
  }
1972
1991
  );
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: [
1992
+ }, "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
1993
  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;
1994
+ /* @__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}`)) })
1995
+ ] }) }), "ExamplePad"), lt = /* @__PURE__ */ a((e) => {
1996
+ const n = Ae(), i = e.specificType ?? "Generic", l = n.specificType[i] ?? n.specificType.Generic;
1978
1997
  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
1998
  /* @__PURE__ */ t(l, { fontSize: "small", sx: { float: "left", shapeOutside: "margin-box", mr: 0.5 } }),
1980
1999
  /* @__PURE__ */ t(ie, { sx: { fontSize: "14px" }, children: `[${e.name}] - ${e.description}` })
1981
2000
  ] });
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: [
2001
+ }, "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
2002
  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}`)) })
2003
+ /* @__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
2004
  ] }), "PrototypePad");
1986
- function Na(e, n, i, l, o) {
2005
+ function Ba(e, n, i, l, o) {
1987
2006
  if (l === void 0) return { size: e, height: n, card: i };
1988
2007
  const r = i;
1989
2008
  return o !== void 0 && typeof o != "string" ? { size: e, height: n, name: r, specificType: l, card: o } : {
@@ -1992,23 +2011,23 @@ function Na(e, n, i, l, o) {
1992
2011
  name: r,
1993
2012
  specificType: l,
1994
2013
  description: o,
1995
- card: /* @__PURE__ */ t(rt, { name: r, specificType: l, description: o })
2014
+ card: /* @__PURE__ */ t(lt, { name: r, specificType: l, description: o })
1996
2015
  };
1997
2016
  }
1998
- a(Na, "c");
1999
- const Ba = /* @__PURE__ */ a((e, n) => ({
2017
+ a(Ba, "c");
2018
+ const Ha = /* @__PURE__ */ a((e, n) => ({
2000
2019
  i: e,
2001
2020
  name: n,
2002
2021
  filterType: "DateRangePicker",
2003
2022
  mandatory: !0,
2004
2023
  parametersNames: [`${n}_inicio`, `${n}_fim`]
2005
- }), "dateRange"), Ha = /* @__PURE__ */ a((e, n, i = !1) => ({
2024
+ }), "dateRange"), La = /* @__PURE__ */ a((e, n, i = !1) => ({
2006
2025
  i: e,
2007
2026
  name: n,
2008
2027
  filterType: "DatePicker",
2009
2028
  mandatory: i,
2010
2029
  parametersNames: [n]
2011
- }), "datePicker"), La = /* @__PURE__ */ a((e, n, i = !0, l = !1) => ({
2030
+ }), "datePicker"), Ga = /* @__PURE__ */ a((e, n, i = !0, l = !1) => ({
2012
2031
  i: e,
2013
2032
  name: n,
2014
2033
  filterType: "AutoComplete",
@@ -2016,27 +2035,27 @@ const Ba = /* @__PURE__ */ a((e, n) => ({
2016
2035
  multipleSelection: i,
2017
2036
  parametersNames: [n]
2018
2037
  }), "autoComplete");
2019
- function Ga(e, n) {
2020
- const i = dn();
2038
+ function Wa(e, n) {
2039
+ const i = cn();
2021
2040
  q(() => {
2022
2041
  var l, o;
2023
2042
  n == "update" ? (l = i.updateDashboardPad) == null || l.call(i, e) : (o = i.createDashboardPad) == null || o.call(i, e);
2024
2043
  }, []);
2025
2044
  }
2026
- a(Ga, "useDashboardPad");
2027
- const Fn = {
2045
+ a(Wa, "useDashboardPad");
2046
+ const Nn = {
2028
2047
  visible: { opacity: 1, y: 0, transition: { duration: 0.18, ease: "easeOut" } },
2029
2048
  hidden: { opacity: 0, y: -12, transition: { duration: 0.18, ease: "easeOut" } }
2030
- }, Nn = {
2049
+ }, Bn = {
2031
2050
  hidden: { opacity: 0, x: 16, transition: { duration: 0.1, ease: "easeOut" } },
2032
2051
  visible: { opacity: 1, x: 0, transition: { duration: 0.32, ease: "easeOut", delay: 0.22 } }
2033
- }, Bn = { duration: 0.28, ease: "easeOut" }, Hn = {
2052
+ }, Hn = { duration: 0.28, ease: "easeOut" }, Ln = {
2034
2053
  visible: { opacity: 1, transition: { duration: 0.15 } },
2035
2054
  hidden: { opacity: 0, transition: { duration: 0.15 } }
2036
- }, Ln = {
2055
+ }, Gn = {
2037
2056
  hidden: { opacity: 0, transition: { duration: 0.15 } },
2038
2057
  visible: { opacity: 1, transition: { duration: 0.15 } }
2039
- }, Gn = { duration: 0.15, ease: "linear" }, Wn = {
2058
+ }, Wn = { duration: 0.15, ease: "linear" }, Vn = {
2040
2059
  kpi: { category: "Métrica", specificType: "MetricComparison" },
2041
2060
  line: { category: "Gráfico", specificType: "ChartLine" },
2042
2061
  bars: { category: "Gráfico", specificType: "ChartBarV" },
@@ -2044,16 +2063,16 @@ const Fn = {
2044
2063
  donut: { category: "Gráfico", specificType: "ChartDonut" },
2045
2064
  heatmap: { category: "Tabela", specificType: "TableHeatmap" }
2046
2065
  };
2047
- function Vn(e) {
2066
+ function jn(e) {
2048
2067
  return e.cells.map((n) => n.kind);
2049
2068
  }
2050
- a(Vn, "templateKinds");
2051
- function jn(e, n) {
2052
- const i = n ?? `${e.id}-${Date.now()}`;
2069
+ a(jn, "templateKinds");
2070
+ function Un(e, n) {
2071
+ const i = nt(n ?? `${e.id}-${Date.now()}`);
2053
2072
  return e.cells.map((l, o) => {
2054
- const r = Wn[l.kind];
2073
+ const r = Vn[l.kind];
2055
2074
  return {
2056
- i: `${i}-${o}`,
2075
+ i: `${i}_${o}`,
2057
2076
  x: l.x,
2058
2077
  y: l.y,
2059
2078
  w: l.w,
@@ -2066,8 +2085,8 @@ function jn(e, n) {
2066
2085
  };
2067
2086
  });
2068
2087
  }
2069
- a(jn, "seedFromTemplate");
2070
- const Mt = [
2088
+ a(Un, "seedFromTemplate");
2089
+ const Rt = [
2071
2090
  {
2072
2091
  id: "t1",
2073
2092
  name: "Visão executiva",
@@ -2117,7 +2136,7 @@ const Mt = [
2117
2136
  desc: "Comece do zero — adicione cards conforme pensa",
2118
2137
  cells: []
2119
2138
  }
2120
- ], Wa = Mt, Rt = Ct(null), Vo = /* @__PURE__ */ a(({ children: e }) => {
2139
+ ], Va = Rt, _t = wt(null), jo = /* @__PURE__ */ a(({ children: e }) => {
2121
2140
  const [n, i] = N([]), l = ee(null), [, o] = N(0), r = W((v) => {
2122
2141
  i((s) => {
2123
2142
  const c = v.at ?? Date.now(), u = { visible: !1, ...v, at: c }, p = s.findIndex((R) => R.id === v.id);
@@ -2134,14 +2153,14 @@ const Mt = [
2134
2153
  });
2135
2154
  }, []), x = W((v) => {
2136
2155
  l.current !== v && (l.current = v, o((s) => s + 1));
2137
- }, []), d = ve(
2156
+ }, []), d = Se(
2138
2157
  () => ({ items: n, register: r, unregister: g, setVisible: h, scrollerRef: l, setScroller: x }),
2139
2158
  [n, r, g, h, x]
2140
2159
  );
2141
- return /* @__PURE__ */ t(Rt.Provider, { value: d, children: e });
2160
+ return /* @__PURE__ */ t(_t.Provider, { value: d, children: e });
2142
2161
  }, "SessionVisualizationsProvider");
2143
- function Un() {
2144
- const e = Ae(Rt), n = W(
2162
+ function Kn() {
2163
+ const e = Ee(_t), n = W(
2145
2164
  (r) => {
2146
2165
  const g = e == null ? void 0 : e.scrollerRef.current, h = g == null ? void 0 : g.querySelector(`[data-viz="${CSS.escape(r)}"]`);
2147
2166
  if (!g || !h) return;
@@ -2149,13 +2168,13 @@ function Un() {
2149
2168
  g.scrollTo({ top: Math.max(0, x), behavior: "smooth" }), h.setAttribute("data-viz-focus", "true"), window.setTimeout(() => h.removeAttribute("data-viz-focus"), 2e3);
2150
2169
  },
2151
2170
  [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;
2171
+ ), 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
2172
  return { items: i, offscreen: l, scrollTo: n, setScroller: o };
2154
2173
  }
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;
2174
+ a(Kn, "useSessionVisualizations");
2175
+ const ja = [], Ua = /* @__PURE__ */ a(() => {
2176
+ }, "noop"), Ut = 0.6, Uo = /* @__PURE__ */ a(({ id: e, kind: n, title: i, group: l, preview: o, ready: r = !0, children: g }) => {
2177
+ 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
2178
  return q(() => {
2160
2179
  d == null || d({ id: e, kind: n, title: i, group: l, preview: o, ready: r });
2161
2180
  }, [e, n, i, l, r, d]), q(() => {
@@ -2166,11 +2185,11 @@ const Va = [], ja = /* @__PURE__ */ a(() => {
2166
2185
  if (!u || !s || typeof IntersectionObserver > "u") return;
2167
2186
  const p = new IntersectionObserver(
2168
2187
  (f) => {
2169
- for (const y of f) s(e, y.intersectionRatio >= jt);
2188
+ for (const y of f) s(e, y.intersectionRatio >= Ut);
2170
2189
  },
2171
2190
  // `root: null` would measure against the viewport, which is wrong inside a scrolling transcript —
2172
2191
  // it reports a card visible while it sits far below the pane's own fold.
2173
- { root: c, threshold: [0, jt, 1] }
2192
+ { root: c, threshold: [0, Ut, 1] }
2174
2193
  );
2175
2194
  return p.observe(u), () => p.disconnect();
2176
2195
  }, [e, c, s]), /* @__PURE__ */ t("div", { ref: x, "data-viz": e, children: g });
@@ -2186,7 +2205,7 @@ function ue(e) {
2186
2205
  };
2187
2206
  }
2188
2207
  a(ue, "resolveComposerSurfaces");
2189
- function Ua() {
2208
+ function Ka() {
2190
2209
  const e = /* @__PURE__ */ a(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }, "read"), [n, i] = N(e);
2191
2210
  return q(() => {
2192
2211
  if (typeof window > "u") return;
@@ -2194,8 +2213,8 @@ function Ua() {
2194
2213
  return window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
2195
2214
  }, []), n;
2196
2215
  }
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) => {
2216
+ a(Ka, "useWindowSize");
2217
+ 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
2218
  const n = le(), i = ue(n), l = he(), o = B((z) => {
2200
2219
  var I;
2201
2220
  return ((I = z.publishedDashboard) == null ? void 0 : I.jsFileName) ?? null;
@@ -2213,7 +2232,7 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2213
2232
  if (!r) return;
2214
2233
  const z = {}, I = /* @__PURE__ */ new Date(), U = new Date(I.getTime() - 1e3 * 3600 * 24 * 30);
2215
2234
  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)));
2235
+ 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
2236
  H(z);
2218
2237
  }, [r == null ? void 0 : r.filters, r]);
2219
2238
  const L = /* @__PURE__ */ a((z) => {
@@ -2223,7 +2242,7 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2223
2242
  q(() => {
2224
2243
  L(e.defaultCollapsed ?? !1);
2225
2244
  }, [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 } };
2245
+ 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
2246
  return /* @__PURE__ */ t(tt, { initial: !1, children: F && r && /* @__PURE__ */ b(
2228
2247
  re.aside,
2229
2248
  {
@@ -2235,7 +2254,7 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2235
2254
  children: [
2236
2255
  /* @__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
2256
  /* @__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 }) }),
2257
+ /* @__PURE__ */ t(S, { sx: { color: n.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 15 }) }),
2239
2258
  /* @__PURE__ */ t(X, { sx: { color: n.palette.text.primary, fontWeight: 500, fontSize: 12.5, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: d }),
2240
2259
  !f && /* @__PURE__ */ b(Te, { children: [
2241
2260
  /* @__PURE__ */ t(X, { sx: { color: n.palette.text.disabled, fontSize: 11, flexShrink: 0 }, children: "·" }),
@@ -2246,13 +2265,13 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2246
2265
  ] })
2247
2266
  ] }),
2248
2267
  /* @__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" } }) }) })
2268
+ /* @__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 } }) }) }),
2269
+ /* @__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 }) }) }),
2270
+ /* @__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
2271
  ] }),
2253
2272
  /* @__PURE__ */ b(S, { sx: { display: "inline-flex", height: "100%", width: "100%", minHeight: 0, overflow: "auto", backgroundColor: n.palette.background.default }, children: [
2254
2273
  x && !f && /* @__PURE__ */ t(
2255
- _e,
2274
+ Re,
2256
2275
  {
2257
2276
  dragLocked: !1,
2258
2277
  llmRenderCount: g + s,
@@ -2264,12 +2283,12 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2264
2283
  },
2265
2284
  x
2266
2285
  ),
2267
- x && f && /* @__PURE__ */ t(ci, { llmRenderCount: g + s, codeGeneration: h, dashboard: r, parameters: R }, x)
2286
+ x && f && /* @__PURE__ */ t(pi, { llmRenderCount: g + s, codeGeneration: h, dashboard: r, parameters: R }, x)
2268
2287
  ] })
2269
2288
  ] }),
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: [
2289
+ /* @__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
2290
  /* @__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 }) }),
2291
+ /* @__PURE__ */ t(S, { sx: { color: n.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 16 }) }),
2273
2292
  /* @__PURE__ */ t(X, { sx: { color: n.palette.text.primary, fontWeight: 500, fontSize: 13.5 }, children: d }),
2274
2293
  /* @__PURE__ */ t(X, { sx: { color: n.palette.text.disabled, fontSize: 12 }, children: "·" }),
2275
2294
  /* @__PURE__ */ b(X, { sx: { fontFamily: i.fontFamilyMono, color: n.palette.text.secondary, fontSize: 12 }, children: [
@@ -2278,18 +2297,18 @@ const Ut = /* @__PURE__ */ a((e) => e.toString().padStart(2, "0"), "pad2"), ht =
2278
2297
  v === 1 ? "card" : "cards"
2279
2298
  ] }),
2280
2299
  /* @__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 }) }) })
2300
+ /* @__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
2301
  ] }),
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) }) })
2302
+ /* @__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
2303
  ] })
2285
2304
  ]
2286
2305
  },
2287
2306
  "dashboard-side-panel"
2288
2307
  ) });
2289
2308
  }, "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) {
2309
+ qn.displayName = "DashboardSidePanel";
2310
+ 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");
2311
+ function qt(e, n) {
2293
2312
  const i = new Map(e.map((h) => [h.i, h])), l = new Map(n.map((h) => [h.i, h]));
2294
2313
  let o = 0, r = 0, g = 0;
2295
2314
  for (const [h, x] of i) {
@@ -2299,8 +2318,8 @@ function Kt(e, n) {
2299
2318
  for (const h of l.keys()) i.has(h) || r++;
2300
2319
  return { added: o, removed: r, modified: g };
2301
2320
  }
2302
- a(Kt, "diffById");
2303
- function qt(e, n, i) {
2321
+ a(qt, "diffById");
2322
+ function Yt(e, n, i) {
2304
2323
  return {
2305
2324
  background: n.raised,
2306
2325
  border: `1px solid ${e.palette.divider}`,
@@ -2321,9 +2340,9 @@ function qt(e, n, i) {
2321
2340
  "&:hover": i ? void 0 : { backgroundColor: n.hover }
2322
2341
  };
2323
2342
  }
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);
2343
+ a(Yt, "railActionPill");
2344
+ 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 }) => {
2345
+ const u = le(), p = ue(u), f = Ae(), [y, R] = N(null), [H, L] = N(null), P = ee(null), [_, E] = N(!1);
2327
2346
  q(() => {
2328
2347
  P.current && x && P.current.click();
2329
2348
  }, [x]);
@@ -2336,7 +2355,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2336
2355
  style: { flexShrink: 0, display: "flex", flexDirection: "column", borderRight: `1px solid ${p.borderSoft}`, backgroundColor: u.palette.background.paper, overflow: "hidden", minHeight: 0 },
2337
2356
  children: [
2338
2357
  /* @__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 }) }) }),
2358
+ /* @__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
2359
  !_ && /* @__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
2360
  ] }),
2342
2361
  !_ && /* @__PURE__ */ b(S, { sx: { flex: 1, minHeight: 0, overflowY: "auto", display: "flex", flexDirection: "column" }, children: [
@@ -2355,15 +2374,15 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2355
2374
  "data-env-id": "dashboardpad-add-card",
2356
2375
  "data-env-key": "dashboardpad-add-card-dropdown",
2357
2376
  className: "llm-env-target llm-env-dashboard-action",
2358
- sx: qt(u, p, e),
2377
+ sx: Yt(u, p, e),
2359
2378
  children: [
2360
- /* @__PURE__ */ t(yt, { size: 11 }),
2379
+ /* @__PURE__ */ t(bt, { size: 11 }),
2361
2380
  /* @__PURE__ */ t(S, { component: "span", children: "Card" })
2362
2381
  ]
2363
2382
  }
2364
2383
  ),
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 }),
2384
+ /* @__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: [
2385
+ /* @__PURE__ */ t(Xi, { size: 11 }),
2367
2386
  /* @__PURE__ */ t(S, { component: "span", children: "Filtro" })
2368
2387
  ] })
2369
2388
  ] }),
@@ -2372,7 +2391,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2372
2391
  "Filtros · ",
2373
2392
  d.length
2374
2393
  ] }),
2375
- d.map((w) => /* @__PURE__ */ t(At, { filter: w, onEdit: v, onDelete: s }, w.i))
2394
+ d.map((w) => /* @__PURE__ */ t(Mt, { filter: w, onEdit: v, onDelete: s }, w.i))
2376
2395
  ] }) : /* @__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
2396
  "Nenhum filtro ainda. Use ",
2378
2397
  /* @__PURE__ */ t("b", { children: "+ Filtro" }),
@@ -2381,7 +2400,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2381
2400
  /* @__PURE__ */ b(S, { sx: { ...V, borderBottom: "none", borderTop: `1px solid ${p.borderSoft}` }, children: [
2382
2401
  /* @__PURE__ */ t(We, { children: "Layout" }),
2383
2402
  /* @__PURE__ */ b(
2384
- aa,
2403
+ oa,
2385
2404
  {
2386
2405
  exclusive: !0,
2387
2406
  size: "small",
@@ -2405,8 +2424,8 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2405
2424
  }
2406
2425
  },
2407
2426
  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" })
2427
+ /* @__PURE__ */ t(Vt, { value: "Boxed", "data-env-id": "dashboard-pad-layout-boxed", children: "Boxed" }),
2428
+ /* @__PURE__ */ t(Vt, { value: "Naked", "data-env-id": "dashboard-pad-layout-naked", children: "Naked" })
2410
2429
  ]
2411
2430
  }
2412
2431
  )
@@ -2416,25 +2435,25 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2416
2435
  c
2417
2436
  ] })
2418
2437
  ] }),
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: [
2438
+ /* @__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
2439
  /* @__PURE__ */ b(
2421
- dt,
2440
+ ct,
2422
2441
  {
2423
2442
  onClick: /* @__PURE__ */ a(() => {
2424
2443
  r(), R(null);
2425
2444
  }, "onClick"),
2426
2445
  sx: K,
2427
2446
  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" })
2447
+ /* @__PURE__ */ t(st, { sx: { color: u.palette.primary.main, minWidth: 28 }, children: /* @__PURE__ */ t(bt, { size: 14 }) }),
2448
+ /* @__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
2449
  ]
2431
2450
  }
2432
2451
  ),
2433
- /* @__PURE__ */ t(Ht, { sx: { borderColor: p.borderSoft } }),
2434
- Object.entries(Ka).map(([w, F], D) => {
2452
+ /* @__PURE__ */ t(Lt, { sx: { borderColor: p.borderSoft } }),
2453
+ Object.entries(qa).map(([w, F], k) => {
2435
2454
  const z = f.category[w];
2436
2455
  return /* @__PURE__ */ b(S, { children: [
2437
- D > 0 && /* @__PURE__ */ t(Ht, { sx: { borderColor: p.borderSoft } }),
2456
+ k > 0 && /* @__PURE__ */ t(Lt, { sx: { borderColor: p.borderSoft } }),
2438
2457
  /* @__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
2458
  /* @__PURE__ */ t(z, { fontSize: "inherit" }),
2440
2459
  " ",
@@ -2443,15 +2462,15 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2443
2462
  F.map((I) => {
2444
2463
  const U = f.specificType[I.specificType];
2445
2464
  return /* @__PURE__ */ b(
2446
- dt,
2465
+ ct,
2447
2466
  {
2448
2467
  onClick: /* @__PURE__ */ a(() => {
2449
2468
  g(I.category, I.specificType), R(null);
2450
2469
  }, "onClick"),
2451
2470
  sx: K,
2452
2471
  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 })
2472
+ /* @__PURE__ */ t(st, { sx: { color: u.palette.text.secondary, minWidth: 28 }, children: /* @__PURE__ */ t(U, { fontSize: "small" }) }),
2473
+ /* @__PURE__ */ t(dt, { primaryTypographyProps: { fontSize: 12 }, children: I.label })
2455
2474
  ]
2456
2475
  },
2457
2476
  I.specificType
@@ -2460,18 +2479,18 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2460
2479
  ] }, w);
2461
2480
  })
2462
2481
  ] }) }),
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) => {
2482
+ /* @__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
2483
  const F = f.filterType[w.filterType];
2465
2484
  return /* @__PURE__ */ b(
2466
- dt,
2485
+ ct,
2467
2486
  {
2468
2487
  onClick: /* @__PURE__ */ a(() => {
2469
2488
  h(w.filterType), L(null);
2470
2489
  }, "onClick"),
2471
2490
  sx: K,
2472
2491
  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 })
2492
+ /* @__PURE__ */ t(st, { sx: { color: u.palette.text.secondary, minWidth: 28 }, children: /* @__PURE__ */ t(F, { fontSize: "small" }) }),
2493
+ /* @__PURE__ */ t(dt, { primaryTypographyProps: { fontSize: 12 }, children: w.label })
2475
2494
  ]
2476
2495
  },
2477
2496
  w.filterType
@@ -2481,7 +2500,7 @@ const Ya = /* @__PURE__ */ a(({ locked: e, name: n, onNameChange: i, layoutType:
2481
2500
  }
2482
2501
  );
2483
2502
  }, "LeftRail");
2484
- function Yn(e) {
2503
+ function Jn(e) {
2485
2504
  const [n, i] = N(!1), l = ee(!0);
2486
2505
  return q(() => {
2487
2506
  if (l.current) {
@@ -2493,8 +2512,8 @@ function Yn(e) {
2493
2512
  return () => window.clearTimeout(o);
2494
2513
  }, [e]), n;
2495
2514
  }
2496
- a(Yn, "usePulseTooltip");
2497
- const Jn = /* @__PURE__ */ a((e, n, i) => ({
2515
+ a(Jn, "usePulseTooltip");
2516
+ const Xn = /* @__PURE__ */ a((e, n, i) => ({
2498
2517
  initial: i > 0 ? { scale: 1.18, backgroundColor: e.palette.primary.main, borderColor: e.palette.primary.main } : !1,
2499
2518
  animate: { scale: 1, backgroundColor: n.raised, borderColor: e.palette.divider },
2500
2519
  transition: { duration: 2, ease: [0.22, 0.8, 0.32, 1] },
@@ -2515,7 +2534,7 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2515
2534
  color: e.palette.text.primary,
2516
2535
  transformOrigin: "center center"
2517
2536
  }
2518
- }), "chipMotionProps"), Xn = /* @__PURE__ */ a(({ cardCount: e, surfaces: n }) => /* @__PURE__ */ b(Te, { children: [
2537
+ }), "chipMotionProps"), Zn = /* @__PURE__ */ a(({ cardCount: e, surfaces: n }) => /* @__PURE__ */ b(Te, { children: [
2519
2538
  /* @__PURE__ */ t(S, { sx: /* @__PURE__ */ a((i) => ({ color: i.palette.primary.main, display: "inline-flex" }), "sx"), children: /* @__PURE__ */ t(Le, { size: 12 }) }),
2520
2539
  /* @__PURE__ */ t(S, { component: "span", sx: { fontWeight: 500 }, children: "Sketch" }),
2521
2540
  /* @__PURE__ */ t(S, { component: "span", sx: /* @__PURE__ */ a((i) => ({ color: i.palette.text.disabled }), "sx"), children: "·" }),
@@ -2524,8 +2543,8 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2524
2543
  " ",
2525
2544
  e === 1 ? "card" : "cards"
2526
2545
  ] })
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);
2546
+ ] }), "ChipHead"), Xa = /* @__PURE__ */ a(({ cardCount: e, expanded: n, locked: i, onToggle: l, pulseTick: o = 0 }) => {
2547
+ const r = le(), g = ue(r), h = Jn(o);
2529
2548
  return /* @__PURE__ */ t(
2530
2549
  ce,
2531
2550
  {
@@ -2537,8 +2556,8 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2537
2556
  disableHoverListener: !0,
2538
2557
  disableFocusListener: !0,
2539
2558
  disableTouchListener: !0,
2540
- children: /* @__PURE__ */ b(re.div, { ...Jn(r, g, o), children: [
2541
- /* @__PURE__ */ t(Xn, { cardCount: e, surfaces: g }),
2559
+ children: /* @__PURE__ */ b(re.div, { ...Xn(r, g, o), children: [
2560
+ /* @__PURE__ */ t(Zn, { cardCount: e, surfaces: g }),
2542
2561
  /* @__PURE__ */ t(ce, { title: n ? "Recolher sketch" : "Editar sketch", placement: "top", children: /* @__PURE__ */ t(
2543
2562
  S,
2544
2563
  {
@@ -2563,14 +2582,14 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2563
2582
  transition: "background-color 2s, border-color 2s",
2564
2583
  "&:hover": i ? void 0 : { backgroundColor: g.hover, borderColor: r.palette.primary.main }
2565
2584
  },
2566
- children: n ? /* @__PURE__ */ t(Le, { size: 13 }) : /* @__PURE__ */ t(oa, { sx: { fontSize: 14 } })
2585
+ children: n ? /* @__PURE__ */ t(Le, { size: 13 }) : /* @__PURE__ */ t(ra, { sx: { fontSize: 14 } })
2567
2586
  }
2568
2587
  ) })
2569
2588
  ] }, o + i.toString())
2570
2589
  }
2571
2590
  );
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;
2591
+ }, "SketchChip"), Za = /* @__PURE__ */ a(({ cardCount: e, locked: n, onCreate: i, pulseTick: l = 0 }) => {
2592
+ const o = le(), r = ue(o), g = Jn(l), h = n || !i;
2574
2593
  return /* @__PURE__ */ t(
2575
2594
  ce,
2576
2595
  {
@@ -2581,8 +2600,8 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2581
2600
  disableHoverListener: !0,
2582
2601
  disableFocusListener: !0,
2583
2602
  disableTouchListener: !0,
2584
- children: /* @__PURE__ */ b(re.div, { ...Jn(o, r, l), children: [
2585
- /* @__PURE__ */ t(Xn, { cardCount: e, surfaces: r }),
2603
+ children: /* @__PURE__ */ b(re.div, { ...Xn(o, r, l), children: [
2604
+ /* @__PURE__ */ t(Zn, { cardCount: e, surfaces: r }),
2586
2605
  /* @__PURE__ */ b(
2587
2606
  S,
2588
2607
  {
@@ -2610,7 +2629,7 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2610
2629
  "&:hover": h ? void 0 : { backgroundColor: r.hover, borderColor: o.palette.primary.main }
2611
2630
  },
2612
2631
  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 }) }),
2632
+ /* @__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
2633
  /* @__PURE__ */ t(S, { component: "span", sx: { fontWeight: 500 }, children: "Adicionar sketch" }),
2615
2634
  /* @__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
2635
  ]
@@ -2619,7 +2638,7 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2619
2638
  ] }, l)
2620
2639
  }
2621
2640
  );
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) => {
2641
+ }, "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
2642
  const s = he(), [c, u] = N(g);
2624
2643
  q(() => {
2625
2644
  u(g);
@@ -2639,23 +2658,23 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2639
2658
  }), P = B((T) => T.currentSessionId), _ = B((T) => {
2640
2659
  var O;
2641
2660
  return (O = T.dashboardDefinition) == null ? void 0 : O.filters;
2642
- }) ?? qa, $ = B((T) => {
2661
+ }) ?? Ya, E = B((T) => {
2643
2662
  var O;
2644
2663
  return ((O = T.dashboardDefinition) == null ? void 0 : O.layoutType) ?? "Boxed";
2645
2664
  }), V = B((T) => T.turnOpen), K = B((T) => {
2646
2665
  var O;
2647
2666
  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(() => {
2667
+ }), M = B((T) => T.dashboardDefinition), w = B((T) => T.lastSentDashboard), [F, k] = N(!1), z = Se(() => {
2649
2668
  if (!M && !w) return { hasAny: !1, text: null };
2650
2669
  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");
2670
+ 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
2671
  if (T.added + T.removed + T.modified + O.added + O.removed + O.modified === 0 && !ae && !fe) return { hasAny: !1, text: null };
2653
2672
  const pe = [];
2654
2673
  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
2674
  }, [M, w]), I = z.hasAny, U = z.text, J = !!y || H > 0 || L > 0, Q = /* @__PURE__ */ a(async (T) => {
2656
2675
  u(""), s.getState().commitForSend(), n && await n(T);
2657
2676
  }, "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);
2677
+ k(!0), setTimeout(() => k(!1), 1e3);
2659
2678
  }, "handleForceOpenCard"), ge = /* @__PURE__ */ a((T) => {
2660
2679
  const O = T.length === 0 ? "Untitled Dashboard" : T;
2661
2680
  s.getState().recordSketchChange("dashboard:name", `Renamed dashboard to '${O}'`), s.getState().updateDashboard({ name: O });
@@ -2670,37 +2689,37 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2670
2689
  }, "handleAddTypedCard"), m = /* @__PURE__ */ a((T) => {
2671
2690
  var O;
2672
2691
  return (O = p.current) == null ? void 0 : O.handleAddFilter(T);
2673
- }, "handleAddFilter"), k = /* @__PURE__ */ a((T) => {
2692
+ }, "handleAddFilter"), D = /* @__PURE__ */ a((T) => {
2674
2693
  var ae;
2675
2694
  const O = ((ae = s.getState().dashboardDefinition) == null ? void 0 : ae.filters) ?? [];
2676
2695
  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) => {
2696
+ }, "handleEditFilter"), $ = /* @__PURE__ */ a((T) => {
2678
2697
  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) });
2698
+ const O = ((fe = s.getState().dashboardDefinition) == null ? void 0 : fe.filters) ?? [], ae = O.find((Ce) => Ce.i === T);
2699
+ 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
2700
  }, "handleDeleteFilter"), G = /* @__PURE__ */ b(S, { sx: { display: "flex", flexDirection: "column" }, children: [
2682
2701
  /* @__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"),
2702
+ !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
2703
  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
2704
  /* @__PURE__ */ t(
2686
- Ya,
2705
+ Ja,
2687
2706
  {
2688
2707
  locked: V,
2689
2708
  name: R,
2690
2709
  onNameChange: ge,
2691
- layoutType: $,
2710
+ layoutType: E,
2692
2711
  onLayoutTypeChange: C,
2693
2712
  onAddGenericCard: A,
2694
2713
  onAddTypedCard: Y,
2695
2714
  onAddFilter: m,
2696
2715
  cardsOpened: F,
2697
2716
  filters: _,
2698
- onEditFilter: k,
2699
- onDeleteFilter: E,
2717
+ onEditFilter: D,
2718
+ onDeleteFilter: $,
2700
2719
  datasetControls: x
2701
2720
  }
2702
2721
  ),
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 }) })
2722
+ /* @__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
2723
  ] }) }, "sketch-expanded")
2705
2724
  ] }),
2706
2725
  J && /* @__PURE__ */ t(
@@ -2711,20 +2730,20 @@ const Jn = /* @__PURE__ */ a((e, n, i) => ({
2711
2730
  exit: { opacity: J ? 1 : 0, height: 0, display: "flex" },
2712
2731
  transition: { duration: 0.5, ease: "easeInOut" },
2713
2732
  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 }),
2733
+ /* @__PURE__ */ t(Xa, { cardCount: H, expanded: ne, locked: V, onToggle: /* @__PURE__ */ a(() => de(!ne), "onToggle"), pulseTick: f }),
2715
2734
  /* @__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
2735
  ] })
2717
2736
  },
2718
2737
  "filled-sketch"
2719
2738
  )
2720
- ] }), Z = ve(() => {
2721
- const T = "Será enviado junto com a mensagem", O = kt(K ?? void 0);
2739
+ ] }), Z = Se(() => {
2740
+ const T = "Será enviado junto com a mensagem", O = It(K ?? void 0);
2722
2741
  return O ? `${T}:
2723
2742
 
2724
2743
  ${O}` : T;
2725
2744
  }, [K]);
2726
2745
  return /* @__PURE__ */ t(
2727
- Yi,
2746
+ Ji,
2728
2747
  {
2729
2748
  ref: v,
2730
2749
  seedDraft: c,
@@ -2742,8 +2761,8 @@ ${O}` : T;
2742
2761
  P ?? "no-session"
2743
2762
  );
2744
2763
  });
2745
- Zn.displayName = "DrawablePrompt";
2746
- const Qn = He.memo(Zn), ei = [
2764
+ Qn.displayName = "DrawablePrompt";
2765
+ const ei = He.memo(Qn), ti = [
2747
2766
  {
2748
2767
  label: "Compare vendas e reservas por semana, focando em rotas internacionais",
2749
2768
  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 +2772,7 @@ const Qn = He.memo(Zn), ei = [
2753
2772
  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
2773
  }
2755
2774
  ];
2756
- function Za({ kinds: e, accent: n }) {
2775
+ function Qa({ kinds: e, accent: n }) {
2757
2776
  const i = le(), l = ue(i), o = n ? i.palette.primary.main : i.palette.text.disabled;
2758
2777
  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
2778
  S,
@@ -2780,14 +2799,14 @@ function Za({ kinds: e, accent: n }) {
2780
2799
  `Template${g}`
2781
2800
  )) });
2782
2801
  }
2783
- a(Za, "TemplatePreview");
2784
- function Qa(e) {
2802
+ a(Qa, "TemplatePreview");
2803
+ function eo(e) {
2785
2804
  if (!e) return "";
2786
2805
  const n = Date.now() - e, i = 6e4, l = 60 * i, o = 24 * l;
2787
2806
  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
2807
  }
2789
- a(Qa, "formatRelativeTime");
2790
- const _t = /* @__PURE__ */ a(({
2808
+ a(eo, "formatRelativeTime");
2809
+ const Ft = /* @__PURE__ */ a(({
2791
2810
  onDraftPromptChange: e,
2792
2811
  onApplyTemplate: n,
2793
2812
  composerSlot: i,
@@ -2795,8 +2814,8 @@ const _t = /* @__PURE__ */ a(({
2795
2814
  recentSessions: o,
2796
2815
  onSelectSession: r,
2797
2816
  onSearchAllSessions: g,
2798
- suggestions: h = ei,
2799
- templates: x = Mt
2817
+ suggestions: h = ti,
2818
+ templates: x = Rt
2800
2819
  }) => {
2801
2820
  const d = le(), v = ue(d), s = l ?? ((p) => p), c = {
2802
2821
  background: "transparent",
@@ -2848,7 +2867,7 @@ const _t = /* @__PURE__ */ a(({
2848
2867
  p.cardCount,
2849
2868
  " ",
2850
2869
  p.cardCount === 1 ? "card" : "cards",
2851
- p.updatedAt ? ` · ${Qa(p.updatedAt)}` : ""
2870
+ p.updatedAt ? ` · ${eo(p.updatedAt)}` : ""
2852
2871
  ] })
2853
2872
  ]
2854
2873
  },
@@ -2889,7 +2908,7 @@ const _t = /* @__PURE__ */ a(({
2889
2908
  "&:hover": { borderColor: d.palette.primary.main, transform: "translateY(-1px)" }
2890
2909
  },
2891
2910
  children: [
2892
- /* @__PURE__ */ t(Za, { kinds: Vn(p), accent: p.recommended }),
2911
+ /* @__PURE__ */ t(Qa, { kinds: jn(p), accent: p.recommended }),
2893
2912
  /* @__PURE__ */ b(S, { children: [
2894
2913
  /* @__PURE__ */ t(X, { sx: { fontSize: 12.5, color: d.palette.text.primary, fontWeight: 500 }, children: p.name }),
2895
2914
  /* @__PURE__ */ t(X, { sx: { fontSize: 10.5, color: d.palette.text.secondary, mt: 0.25, lineHeight: 1.4 }, children: p.desc }),
@@ -2904,33 +2923,33 @@ const _t = /* @__PURE__ */ a(({
2904
2923
  )
2905
2924
  ] });
2906
2925
  }, "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) {
2926
+ Ft.displayName = "EntryEmptyState";
2927
+ const oe = 6, Me = 12, Jt = 320, to = 220, Xt = 150, Zt = 3e3;
2928
+ function no(e, n, i, l) {
2910
2929
  const o = window.innerWidth, r = window.innerHeight, g = e && e !== "auto" ? [e] : ["bottom", "top", "right", "left"];
2911
2930
  for (const h of g) {
2912
2931
  let x = 0, d = 0;
2913
2932
  switch (h) {
2914
2933
  case "bottom":
2915
- x = n.top + n.height + oe + Re, d = n.left + n.width / 2 - i / 2;
2934
+ x = n.top + n.height + oe + Me, d = n.left + n.width / 2 - i / 2;
2916
2935
  break;
2917
2936
  case "top":
2918
- x = n.top - oe - Re - l, d = n.left + n.width / 2 - i / 2;
2937
+ x = n.top - oe - Me - l, d = n.left + n.width / 2 - i / 2;
2919
2938
  break;
2920
2939
  case "right":
2921
- x = n.top + n.height / 2 - l / 2, d = n.left + n.width + oe + Re;
2940
+ x = n.top + n.height / 2 - l / 2, d = n.left + n.width + oe + Me;
2922
2941
  break;
2923
2942
  case "left":
2924
- x = n.top + n.height / 2 - l / 2, d = n.left - oe - Re - i;
2943
+ x = n.top + n.height / 2 - l / 2, d = n.left - oe - Me - i;
2925
2944
  break;
2926
2945
  }
2927
2946
  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
2947
  }
2929
- return { top: n.top + n.height + Re, left: n.left, resolvedPlacement: "bottom" };
2948
+ return { top: n.top + n.height + Me, left: n.left, resolvedPlacement: "bottom" };
2930
2949
  }
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(() => {
2950
+ a(no, "computePlacement");
2951
+ const ni = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteraction: i = !1, onComplete: l, onDismiss: o, resolveElement: r = Pt }) => {
2952
+ 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
2953
  var w;
2935
2954
  if (!y) return;
2936
2955
  const M = r(y.target);
@@ -2943,8 +2962,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
2943
2962
  q(() => {
2944
2963
  if (!y) return;
2945
2964
  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());
2965
+ const k = /* @__PURE__ */ a(() => {
2966
+ 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
2967
  }, "giveUpOnStep"), z = /* @__PURE__ */ a(() => {
2949
2968
  var J;
2950
2969
  if (M) return;
@@ -2956,11 +2975,11 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
2956
2975
  return;
2957
2976
  }
2958
2977
  }
2959
- if (w += Jt, w >= Xt) {
2960
- D();
2978
+ if (w += Xt, w >= Zt) {
2979
+ k();
2961
2980
  return;
2962
2981
  }
2963
- F = window.setTimeout(z, Jt);
2982
+ F = window.setTimeout(z, Xt);
2964
2983
  }, "attempt");
2965
2984
  z();
2966
2985
  const I = /* @__PURE__ */ a(() => {
@@ -2986,14 +3005,14 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
2986
3005
  }, "onKey");
2987
3006
  return window.addEventListener("keydown", M), () => window.removeEventListener("keydown", M);
2988
3007
  }, [o, P, _]), !y || typeof document > "u") return null;
2989
- const $ = v ? `polygon(
3008
+ const E = v ? `polygon(
2990
3009
  0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%,
2991
3010
  ${v.left - oe}px ${v.top - oe}px,
2992
3011
  ${v.left + v.width + oe}px ${v.top - oe}px,
2993
3012
  ${v.left + v.width + oe}px ${v.top + v.height + oe}px,
2994
3013
  ${v.left - oe}px ${v.top + v.height + oe}px,
2995
3014
  ${v.left - oe}px ${v.top - oe}px
2996
- )` : void 0, V = v ? to(y.placement, v, c.width, c.height) : null, K = {
3015
+ )` : void 0, V = v ? no(y.placement, v, c.width, c.height) : null, K = {
2997
3016
  fontFamily: g.typography.fontFamily,
2998
3017
  fontSize: 11.5,
2999
3018
  fontWeight: 500,
@@ -3004,7 +3023,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3004
3023
  transition: "filter .12s, background-color .12s, border-color .12s",
3005
3024
  border: "1px solid transparent"
3006
3025
  };
3007
- return ra(
3026
+ return la(
3008
3027
  /* @__PURE__ */ b(S, { className: "llm-guide-overlay-root", sx: { position: "fixed", inset: 0, zIndex: 9999 }, children: [
3009
3028
  v && /* @__PURE__ */ t(
3010
3029
  S,
@@ -3013,8 +3032,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3013
3032
  sx: {
3014
3033
  position: "absolute",
3015
3034
  inset: 0,
3016
- backgroundColor: Ce(g.palette.common.black, n),
3017
- clipPath: $,
3035
+ backgroundColor: ve(g.palette.common.black, n),
3036
+ clipPath: E,
3018
3037
  transition: "clip-path 0.3s ease",
3019
3038
  pointerEvents: i ? "none" : "auto"
3020
3039
  }
@@ -3032,7 +3051,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3032
3051
  height: v.height + oe * 2,
3033
3052
  borderRadius: "6px",
3034
3053
  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)}`,
3054
+ boxShadow: `0 0 0 4px ${ve(g.palette.primary.main, 0.2)}, 0 8px 24px ${ve(g.palette.primary.main, 0.13)}`,
3036
3055
  transition: "all 0.3s ease",
3037
3056
  pointerEvents: "none"
3038
3057
  }
@@ -3046,8 +3065,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3046
3065
  position: "absolute",
3047
3066
  top: V.top,
3048
3067
  left: V.left,
3049
- maxWidth: Yt,
3050
- minWidth: eo,
3068
+ maxWidth: Jt,
3069
+ minWidth: to,
3051
3070
  p: 2,
3052
3071
  borderRadius: 1.5,
3053
3072
  backgroundColor: g.palette.background.paper,
@@ -3084,7 +3103,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3084
3103
  ] }),
3085
3104
  document.body
3086
3105
  );
3087
- }, "SpotlightOverlay"), no = "aintela-bi-composer", io = 2, ao = /* @__PURE__ */ a((e) => {
3106
+ }, "SpotlightOverlay"), io = "aintela-bi-composer", ao = 2, oo = /* @__PURE__ */ a((e) => {
3088
3107
  var ge;
3089
3108
  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
3109
  var A;
@@ -3092,7 +3111,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3092
3111
  }), s = B((C) => {
3093
3112
  var A;
3094
3113
  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);
3114
+ }), 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
3115
  q(() => {
3097
3116
  var A;
3098
3117
  const C = s == null ? void 0 : s.trim();
@@ -3103,9 +3122,9 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3103
3122
  }, [s]), q(() => {
3104
3123
  x.getState().currentSessionId !== n && x.getState().setCurrentSessionId(n);
3105
3124
  }, [n, x]), q(() => {
3106
- c && $(!1);
3125
+ c && E(!1);
3107
3126
  }, [c]), q(() => {
3108
- (v || void 0) !== R && $(!0), H(v ?? void 0);
3127
+ (v || void 0) !== R && E(!0), H(v ?? void 0);
3109
3128
  }, [v]), q(() => {
3110
3129
  var m;
3111
3130
  const C = x.getState().dashboardDefinition, A = (C == null ? void 0 : C.originalSessionId) ?? null;
@@ -3116,21 +3135,21 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3116
3135
  }
3117
3136
  let Y = !1;
3118
3137
  return (async () => {
3119
- var k;
3138
+ var D;
3120
3139
  try {
3121
- const E = await d.getDashboardBySession(i);
3140
+ const $ = await d.getDashboardBySession(i);
3122
3141
  if (Y) return;
3123
- if ((k = x.getState().dashboardDefinition) != null && k.id) {
3142
+ if ((D = x.getState().dashboardDefinition) != null && D.id) {
3124
3143
  K.current = i;
3125
3144
  return;
3126
3145
  }
3127
- if (!E) {
3146
+ if (!$) {
3128
3147
  console.warn("[@aintela/bi composer] no dashboard found for session", i), K.current = i;
3129
3148
  return;
3130
3149
  }
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);
3150
+ x.getState().loadDashboard(Be($)), K.current = i;
3151
+ } catch ($) {
3152
+ console.error("[@aintela/bi composer] failed to load dashboard for session", $);
3134
3153
  }
3135
3154
  })(), () => {
3136
3155
  Y = !0;
@@ -3138,7 +3157,7 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3138
3157
  }, [i, d, x]);
3139
3158
  const M = W(
3140
3159
  async (C) => {
3141
- var m, k, E, G;
3160
+ var m, D, $, G;
3142
3161
  const A = n;
3143
3162
  let Y = x.getState().dashboardDefinition;
3144
3163
  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 +3174,13 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3155
3174
  return;
3156
3175
  }
3157
3176
  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;
3177
+ 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
3178
  te && !te.layoutType && (te.layoutType = "Naked");
3160
- const T = await Pt(d, A, te), O = x.getState().dashboardDefinition;
3179
+ const T = await $t(d, A, te), O = x.getState().dashboardDefinition;
3161
3180
  x.getState().updateDashboard({
3162
3181
  ...T,
3163
3182
  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),
3183
+ cards: (te == null ? void 0 : te.cards) ?? (($ = O == null ? void 0 : O.cards) != null && $.length ? O.cards : T.cards),
3165
3184
  filters: (te == null ? void 0 : te.filters) ?? ((G = O == null ? void 0 : O.filters) != null && G.length ? O.filters : T.filters)
3166
3185
  }), p(!0);
3167
3186
  } catch (Z) {
@@ -3174,36 +3193,36 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3174
3193
  }, [M, p]), F = W(async (C) => {
3175
3194
  var A;
3176
3195
  await M(), await ((A = e.onBeforeSend) == null ? void 0 : A.call(e, C));
3177
- }, [M, e.onBeforeSend]), D = W((C) => {
3196
+ }, [M, e.onBeforeSend]), k = W((C) => {
3178
3197
  if (C.cells.length === 0) {
3179
3198
  o();
3180
3199
  return;
3181
3200
  }
3182
- M({ name: C.name, cards: jn(C), filters: [] });
3183
- }, [M, o]), { setScroller: z } = Un(), I = ee(null);
3201
+ M({ name: C.name, cards: Un(C), filters: [] });
3202
+ }, [M, o]), { setScroller: z } = Kn(), I = ee(null);
3184
3203
  q(() => {
3185
3204
  const C = I.current;
3186
3205
  if (!C) {
3187
3206
  z(null);
3188
3207
  return;
3189
3208
  }
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();
3209
+ const A = /* @__PURE__ */ a(() => [C, ...Array.from(C.querySelectorAll("*"))].reverse().find(($) => $.scrollHeight > $.clientHeight + 8 && /auto|scroll/.test(getComputedStyle($).overflowY)) ?? null, "find"), Y = A();
3191
3210
  if (Y) {
3192
3211
  z(Y);
3193
3212
  return;
3194
3213
  }
3195
3214
  if (typeof ResizeObserver > "u") return;
3196
3215
  const m = new ResizeObserver(() => {
3197
- const k = A();
3198
- k && (z(k), m.disconnect());
3216
+ const D = A();
3217
+ D && (z(D), m.disconnect());
3199
3218
  });
3200
3219
  return m.observe(C), () => m.disconnect();
3201
3220
  }, [l, z]);
3202
- const U = ia(), J = U ? Hn : Fn, Q = U ? Ln : Nn, ne = U ? Gn : Bn, de = W(
3221
+ const U = aa(), J = U ? Ln : Nn, Q = U ? Gn : Bn, ne = U ? Wn : Hn, de = W(
3203
3222
  (C, A) => /* @__PURE__ */ t(re.div, { variants: J, initial: "hidden", animate: "visible", exit: "hidden", children: C }, A),
3204
3223
  [J]
3205
- ), me = /* @__PURE__ */ a(() => /* @__PURE__ */ t(re.div, { layoutId: no, transition: ne, style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ t(
3206
- Qn,
3224
+ ), me = /* @__PURE__ */ a(() => /* @__PURE__ */ t(re.div, { layoutId: io, transition: ne, style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ t(
3225
+ ei,
3207
3226
  {
3208
3227
  onCreateSketch: w,
3209
3228
  onBeforeSend: F,
@@ -3218,10 +3237,10 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3218
3237
  }
3219
3238
  ) }), "renderPromptForBranch");
3220
3239
  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,
3240
+ Ft,
3222
3241
  {
3223
3242
  onDraftPromptChange: y,
3224
- onApplyTemplate: D,
3243
+ onApplyTemplate: k,
3225
3244
  composerSlot: me(),
3226
3245
  ambientWrapper: de,
3227
3246
  recentSessions: r,
@@ -3230,9 +3249,9 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3230
3249
  suggestions: e.suggestions,
3231
3250
  templates: e.templates
3232
3251
  }
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: [
3252
+ ) }, "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
3253
  /* @__PURE__ */ b(
3235
- Bt,
3254
+ Ht,
3236
3255
  {
3237
3256
  sx: {
3238
3257
  minWidth: "20%",
@@ -3251,10 +3270,10 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3251
3270
  ]
3252
3271
  }
3253
3272
  ),
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,
3273
+ 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
3274
  (ge = e.renderProgressPanel) == null ? void 0 : ge.call(e, { hasDashboard: V, dashboardCollapsed: L, turnOpen: c })
3256
3275
  ] }) }, "execution-layout") });
3257
- }, "ComposerInner"), ni = /* @__PURE__ */ a((e) => {
3276
+ }, "ComposerInner"), ii = /* @__PURE__ */ a((e) => {
3258
3277
  const n = he(), i = et(), l = ee(null);
3259
3278
  q(() => {
3260
3279
  const P = l.current;
@@ -3264,8 +3283,8 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3264
3283
  n.getState().setViewport({ width: V.width, height: V.height });
3265
3284
  }, "publish");
3266
3285
  _();
3267
- const $ = new ResizeObserver(_);
3268
- return $.observe(P), () => $.disconnect();
3286
+ const E = new ResizeObserver(_);
3287
+ return E.observe(P), () => E.disconnect();
3269
3288
  }, [n]);
3270
3289
  const [o, r] = N([]);
3271
3290
  q(() => {
@@ -3275,12 +3294,12 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3275
3294
  try {
3276
3295
  const _ = await i.listDashboards();
3277
3296
  if (P) return;
3278
- const $ = _.filter((V) => !!V.originalSessionId).map((V) => {
3297
+ const E = _.filter((V) => !!V.originalSessionId).map((V) => {
3279
3298
  var M;
3280
3299
  const K = V.updatedAt ? V.updatedAt instanceof Date ? V.updatedAt.getTime() : Date.parse(String(V.updatedAt)) : 0;
3281
3300
  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
3301
  });
3283
- $.sort((V, K) => (K.updatedAt ?? 0) - (V.updatedAt ?? 0)), r($.slice(0, io));
3302
+ E.sort((V, K) => (K.updatedAt ?? 0) - (V.updatedAt ?? 0)), r(E.slice(0, ao));
3284
3303
  } catch (_) {
3285
3304
  console.error("[@aintela/bi composer] failed to list dashboards", _);
3286
3305
  }
@@ -3295,49 +3314,49 @@ const ti = /* @__PURE__ */ a(({ steps: e, overlayOpacity: n = 0.6, allowInteract
3295
3314
  var _;
3296
3315
  return ((_ = P.dashboardDefinition) == null ? void 0 : _.id) ?? null;
3297
3316
  }), c = B((P) => {
3298
- var _, $;
3299
- return (($ = (_ = P.dashboardDefinition) == null ? void 0 : _.cards) == null ? void 0 : $.length) ?? 0;
3317
+ var _, E;
3318
+ return ((E = (_ = P.dashboardDefinition) == null ? void 0 : _.cards) == null ? void 0 : E.length) ?? 0;
3300
3319
  }), u = B((P) => {
3301
- var _, $;
3302
- return (($ = (_ = P.dashboardDefinition) == null ? void 0 : _.filters) == null ? void 0 : $.length) ?? 0;
3320
+ var _, E;
3321
+ return ((E = (_ = P.dashboardDefinition) == null ? void 0 : _.filters) == null ? void 0 : E.length) ?? 0;
3303
3322
  }), p = ee({ id: s, cards: c, filters: u, firstTime: !0 });
3304
3323
  q(() => {
3305
3324
  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);
3325
+ const P = p.current, _ = !P.id && !!s, E = P.cards === 0 && c > 0, V = P.filters === 0 && u > 0, K = P.firstTime;
3326
+ p.current = { id: s, cards: c, filters: u, firstTime: !1 }, !K && (_ || E || V) && n.getState().setSketchExpanded(!0);
3308
3327
  }, [s, c, u, h, n]);
3309
3328
  const f = B((P) => P.guideSteps), y = B((P) => P.guideOptions), R = B((P) => P.dismissGuide);
3310
3329
  q(() => {
3311
- f && f.length > 0 && vn(f) && n.getState().setSketchExpanded(!0);
3330
+ f && f.length > 0 && Sn(f) && n.getState().setSketchExpanded(!0);
3312
3331
  }, [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(() => {
3332
+ const H = Se(() => h ? "generating" : !x && !e.routeSessionId ? "empty" : d || v ? "done-dashboard" : "done-text", [h, x, d, v, e.routeSessionId]), L = W(() => {
3314
3333
  n.getState().setHasCompletedOnce(!0), n.getState().setSketchExpanded(!1);
3315
3334
  }, [n]);
3316
3335
  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 })
3336
+ /* @__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 }) }),
3337
+ 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
3338
  ] });
3320
3339
  }, "ComposerView");
3321
- ni.displayName = "ComposerView";
3322
- const St = 20, oo = 60;
3323
- function ro(e) {
3340
+ ii.displayName = "ComposerView";
3341
+ const Ct = 20, ro = 60;
3342
+ function lo(e) {
3324
3343
  for (const n of e.artifactData ?? [])
3325
3344
  if ((n == null ? void 0 : n.type) === "Dashboard" && n.id) return n.id;
3326
3345
  return null;
3327
3346
  }
3328
- a(ro, "detectProducedDashboardId");
3329
- function ii() {
3330
- const e = he(), n = In(), i = W((h) => {
3347
+ a(lo, "detectProducedDashboardId");
3348
+ function ai() {
3349
+ const e = he(), n = zn(), i = W((h) => {
3331
3350
  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
3351
+ 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) => ({
3352
+ ...E,
3353
+ widthPx: typeof E.w == "number" && p > 0 ? Math.round(p * E.w * 0.95) : void 0,
3354
+ heightPx: typeof E.h == "number" ? Math.round(E.h * Ct * 0.95) : void 0
3336
3355
  }));
3337
3356
  let y;
3338
3357
  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) ?? ""})`;
3358
+ 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) ` : "";
3359
+ y = V ?? `${w}${F}(${(E == null ? void 0 : E.layoutType) ?? ""})`;
3341
3360
  } catch {
3342
3361
  y = void 0;
3343
3362
  }
@@ -3353,13 +3372,13 @@ function ii() {
3353
3372
  chatBox: { heightPx: v, widthPx: c },
3354
3373
  dashboardPreviewBox: { heightPx: v, widthPx: s },
3355
3374
  dashboardVisualizationBox: { heightPx: v, widthPx: u },
3356
- gridRowHeightPixelsPerUnit: St,
3375
+ gridRowHeightPixelsPerUnit: Ct,
3357
3376
  gridColumnWidthPixelsPerUnit: p,
3358
3377
  gridColumnWidthPixelsPerUnitFullView: p
3359
3378
  },
3360
3379
  isDatasetParameterized: (d == null ? void 0 : d.isDatasetParameterized) ?? !1,
3361
3380
  defaultDatasetName: d == null ? void 0 : d.defaultDatasetName,
3362
- clientSideChanges: kt(d == null ? void 0 : d.clientSideChanges)
3381
+ clientSideChanges: It(d == null ? void 0 : d.clientSideChanges)
3363
3382
  };
3364
3383
  return d != null && d.clientSideChanges && Object.keys(d.clientSideChanges).length > 0 && e.getState().clearClientSideChanges(), { promptAsString: y ?? "", json: JSON.stringify(R) };
3365
3384
  }, [e]), l = W(() => {
@@ -3367,18 +3386,18 @@ function ii() {
3367
3386
  h.setTurnOpen(!0), h.dismissGuide(), h.setHasCompletedOnce(!1), h.setProducedDashboardId(null), h.setSketchExpanded(!1);
3368
3387
  }, [e]), o = W((h) => {
3369
3388
  const x = e.getState();
3370
- x.setProducedDashboardId(ro(h)), x.setHasCompletedOnce(!0), x.setTurnOpen(!1);
3389
+ x.setProducedDashboardId(lo(h)), x.setHasCompletedOnce(!0), x.setTurnOpen(!1);
3371
3390
  }, [e]), r = W((h, x) => e.getState().ingestToolEvent(h, x), [e]), g = W((h) => {
3372
3391
  e.getState().currentSessionId !== h && e.getState().setCurrentSessionId(h);
3373
3392
  }, [e]);
3374
- return ve(() => ({ onRenderPrompt: i, onTurnOpen: l, onTurnComplete: o, ingestToolEvent: r, setSessionId: g, environment: n }), [i, l, o, r, g, n]);
3393
+ return Se(() => ({ onRenderPrompt: i, onTurnOpen: l, onTurnComplete: o, ingestToolEvent: r, setSessionId: g, environment: n }), [i, l, o, r, g, n]);
3375
3394
  }
3376
- a(ii, "useComposerChatBridge");
3377
- const lo = /* @__PURE__ */ a(() => {
3378
- const e = ii(), n = Xi((l) => {
3395
+ a(ai, "useComposerChatBridge");
3396
+ const so = /* @__PURE__ */ a(() => {
3397
+ const e = ai(), n = Zi((l) => {
3379
3398
  var o;
3380
3399
  return ((o = l.session) == null ? void 0 : o.id) ?? null;
3381
- }), { eventBusService: i } = Zi();
3400
+ }), { eventBusService: i } = Qi();
3382
3401
  return q(() => {
3383
3402
  e.setSessionId(n);
3384
3403
  }, [n, e]), q(() => {
@@ -3390,19 +3409,19 @@ const lo = /* @__PURE__ */ a(() => {
3390
3409
  return (r = l.gatewayOffToolEvent) == null ? void 0 : r.call(l, o);
3391
3410
  };
3392
3411
  }, [i, e]), null;
3393
- }, "ComposerChatBinding"), Zt = {
3412
+ }, "ComposerChatBinding"), Qt = {
3394
3413
  metric: "KPI",
3395
3414
  chart: "GRÁFICO",
3396
3415
  table: "TABELA",
3397
3416
  iframe: "PAINEL",
3398
3417
  dashboard: "DASHBOARD"
3399
- }, so = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit" }), ai = /* @__PURE__ */ a(({
3418
+ }, co = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit" }), oi = /* @__PURE__ */ a(({
3400
3419
  width: e = 560,
3401
3420
  title: n = "Visualizações da sessão",
3402
3421
  footerAction: i,
3403
3422
  headerActions: l
3404
3423
  }) => {
3405
- const o = le(), r = ue(o), { items: g, offscreen: h, scrollTo: x } = Un(), d = ve(() => {
3424
+ const o = le(), r = ue(o), { items: g, offscreen: h, scrollTo: x } = Kn(), d = Se(() => {
3406
3425
  const s = /* @__PURE__ */ new Map();
3407
3426
  for (const c of h) {
3408
3427
  const u = c.group ?? "default", p = s.get(u);
@@ -3441,7 +3460,7 @@ const lo = /* @__PURE__ */ a(() => {
3441
3460
  X,
3442
3461
  {
3443
3462
  sx: { ...v, fontSize: 10, letterSpacing: "0.12em", textTransform: "uppercase", color: o.palette.text.disabled, mb: 1 },
3444
- children: so.format(s.at)
3463
+ children: co.format(s.at)
3445
3464
  }
3446
3465
  ),
3447
3466
  /* @__PURE__ */ t(S, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: s.items.map((c) => /* @__PURE__ */ b(
@@ -3483,11 +3502,11 @@ const lo = /* @__PURE__ */ a(() => {
3483
3502
  backgroundColor: r.hover,
3484
3503
  color: o.palette.text.secondary
3485
3504
  },
3486
- children: Zt[c.kind]
3505
+ children: Qt[c.kind]
3487
3506
  }
3488
3507
  ),
3489
3508
  /* @__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] }),
3509
+ /* @__PURE__ */ t(X, { sx: { fontSize: 12.5, fontWeight: 500, lineHeight: 1.35, overflow: "hidden", textOverflow: "ellipsis" }, children: c.title || Qt[c.kind] }),
3491
3510
  c.preview && /* @__PURE__ */ t(S, { sx: { mt: 0.75, maxHeight: 56, overflow: "hidden" }, children: c.preview }),
3492
3511
  !c.ready && /* @__PURE__ */ t(X, { sx: { ...v, fontSize: 10, color: o.palette.warning.main, mt: 0.5 }, children: "gerando…" })
3493
3512
  ] }),
@@ -3509,7 +3528,7 @@ const lo = /* @__PURE__ */ a(() => {
3509
3528
  display: "flex",
3510
3529
  alignItems: "center",
3511
3530
  gap: 1,
3512
- backgroundColor: Ce(o.palette.background.paper, 0.6)
3531
+ backgroundColor: ve(o.palette.background.paper, 0.6)
3513
3532
  },
3514
3533
  children: [
3515
3534
  /* @__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 +3541,8 @@ const lo = /* @__PURE__ */ a(() => {
3522
3541
  }
3523
3542
  );
3524
3543
  }, "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(
3544
+ oi.displayName = "SessionVisualizationsPanel";
3545
+ const po = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PURE__ */ t(ce, { title: e, placement: "top", children: /* @__PURE__ */ t(
3527
3546
  be,
3528
3547
  {
3529
3548
  size: "small",
@@ -3532,7 +3551,7 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
3532
3551
  sx: /* @__PURE__ */ a((l) => ({ width: 26, height: 26, borderRadius: "6px", border: `1px solid ${l.palette.divider}`, color: l.palette.text.secondary }), "sx"),
3533
3552
  children: i
3534
3553
  }
3535
- ) }), "SessionVisualizationsPanelButton"), po = "0 0 40%", oi = /* @__PURE__ */ a(() => {
3554
+ ) }), "SessionVisualizationsPanelButton"), ho = "0 0 40%", ri = /* @__PURE__ */ a(() => {
3536
3555
  const e = le(), n = ue(e), i = B((f) => {
3537
3556
  var y;
3538
3557
  return ((y = f.dashboardDefinition) == null ? void 0 : y.jsFileName) ?? null;
@@ -3589,7 +3608,7 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
3589
3608
  "&:hover": { backgroundColor: n.hover, borderColor: e.palette.primary.main }
3590
3609
  },
3591
3610
  children: [
3592
- /* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(ke, { size: 13 }) }),
3611
+ /* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 13 }) }),
3593
3612
  /* @__PURE__ */ t(S, { component: "span", sx: { fontWeight: 500 }, children: o }),
3594
3613
  p,
3595
3614
  /* @__PURE__ */ t(S, { component: "span", sx: { color: e.palette.text.disabled, mx: 0.25 }, children: "|" }),
@@ -3597,14 +3616,14 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
3597
3616
  ]
3598
3617
  }
3599
3618
  ) }) : /* @__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: [
3619
+ /* @__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
3620
  /* @__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 }) }),
3621
+ /* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 14 }) }),
3603
3622
  /* @__PURE__ */ t(X, { sx: { color: e.palette.text.primary, fontWeight: 500, fontSize: 12 }, children: o }),
3604
3623
  p,
3605
3624
  /* @__PURE__ */ t(S, { sx: { flex: 1 } }),
3606
3625
  /* @__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 }) }) })
3626
+ /* @__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
3627
  ] }),
3609
3628
  /* @__PURE__ */ t(tt, { children: s && /* @__PURE__ */ b(
3610
3629
  re.div,
@@ -3629,225 +3648,227 @@ const co = /* @__PURE__ */ a(({ label: e, onClick: n, children: i }) => /* @__PU
3629
3648
  fontWeight: 600,
3630
3649
  padding: "4px 10px 4px 8px",
3631
3650
  borderRadius: 999,
3632
- boxShadow: `0 4px 14px ${Ce(e.palette.primary.main, 0.35)}`
3651
+ boxShadow: `0 4px 14px ${ve(e.palette.primary.main, 0.35)}`
3633
3652
  },
3634
3653
  children: [
3635
- /* @__PURE__ */ t(ke, { size: 11 }),
3654
+ /* @__PURE__ */ t(De, { size: 11 }),
3636
3655
  "Dashboard pronto"
3637
3656
  ]
3638
3657
  }
3639
3658
  ) }),
3640
- /* @__PURE__ */ t(S, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(_e, { dashboardId: l }) })
3659
+ /* @__PURE__ */ t(S, { sx: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ t(Re, { dashboardId: l }) })
3641
3660
  ] }) }),
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: [
3661
+ /* @__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
3662
  /* @__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 }) }),
3663
+ /* @__PURE__ */ t(S, { sx: { color: e.palette.primary.main, display: "inline-flex" }, children: /* @__PURE__ */ t(De, { size: 16 }) }),
3645
3664
  /* @__PURE__ */ t(X, { sx: { color: e.palette.text.primary, fontWeight: 500, fontSize: 13.5 }, children: o }),
3646
3665
  p,
3647
3666
  /* @__PURE__ */ t(S, { sx: { flex: 1 } }),
3648
3667
  /* @__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
3668
  ] }),
3650
- /* @__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 }) })
3651
3670
  ] })
3652
3671
  ] });
3653
3672
  }, "DashboardPinInner");
3654
- oi.displayName = "DashboardPin";
3655
- const ho = He.memo(oi), Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3673
+ ri.displayName = "DashboardPin";
3674
+ const uo = He.memo(ri), Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3656
3675
  __proto__: null,
3657
3676
  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,
3677
+ CATEGORY_ICONS: On,
3678
+ COLOR_MAP: Pn,
3679
+ CardScketch: Sa,
3680
+ CardSketch: At,
3681
+ CardTypeIconsProvider: xa,
3682
+ ClonedComponent: Cn,
3683
+ ComposerChatBinding: so,
3684
+ ComposerProvider: ma,
3685
+ ComposerView: ii,
3686
+ DEFAULT_PAD_HEIGHT_PX: it,
3687
+ DRAFT_SAVE_DEBOUNCE_MS: kn,
3688
+ DashboardPad: _n,
3689
+ DashboardPadEditor: Fn,
3690
+ DashboardPadSketch: rt,
3691
+ DashboardPin: uo,
3692
+ DashboardSidePanel: Yn,
3693
+ DatasetParameterizationControls: Ma,
3694
+ DrawablePrompt: ei,
3676
3695
  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,
3696
+ EntryEmptyState: Ft,
3697
+ EnvironmentProvider: ta,
3698
+ ExampleCardSkath: Fa,
3699
+ ExampleCardSketch: lt,
3700
+ ExampleCardSketh: _a,
3701
+ ExamplePad: Ra,
3702
+ FILTER_TYPE_CATALOG: zt,
3703
+ FILTER_TYPE_ICONS: An,
3704
+ FilterSketch: Mt,
3705
+ GRID_ROW_HEIGHT_PX: Ct,
3687
3706
  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,
3707
+ HoverButton: ke,
3708
+ InertEnvironmentProvider: na,
3709
+ PAD_INTERNAL_CLASSES: bn,
3710
+ PAD_INTERNAL_IDS: yn,
3711
+ PrototypePad: Na,
3712
+ SPECIFIC_TYPE_ICONS: $n,
3694
3713
  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,
3714
+ STARTER_TEMPLATES: Va,
3715
+ SessionVisualizationsPanel: oi,
3716
+ SessionVisualizationsPanelButton: po,
3717
+ SpotlightOverlay: ni,
3718
+ TEMPLATE_KIND_TO_SKETCH: Vn,
3719
+ TextSketh: Ca,
3720
+ TitleSkath: wa,
3702
3721
  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,
3722
+ ToolBox: Rn,
3723
+ VIEWER_COMMIT_DEBOUNCE_MS: Tn,
3724
+ activityPanelVariants: Bn,
3725
+ activityPanelVariantsReduced: Gn,
3726
+ ambientVariants: Nn,
3727
+ ambientVariantsReduced: Ln,
3728
+ autoComplete: Ga,
3729
+ c: Ba,
3730
+ categoryPrefix: pa,
3731
+ composerLayoutTransition: Hn,
3732
+ composerLayoutTransitionReduced: Wn,
3733
+ createComposerStore: In,
3734
+ createDashboardDraft: $t,
3735
+ datePicker: La,
3736
+ dateRange: Ha,
3737
+ defaultCardTypeIcons: Mn,
3738
+ defaultComposerSuggestions: ti,
3739
+ defaultComposerTemplates: Rt,
3740
+ environmentFromStore: ga,
3722
3741
  fromUpsertResponse: Be,
3723
- groupCardCatalog: it,
3724
- guideStepsRequireSketch: vn,
3725
- isElementVisible: zt,
3726
- isSimplePadDefinition: hn,
3727
- joinClientSideChanges: kt,
3728
- padConfigToDashboard: pn,
3729
- pickBestElement: gn,
3742
+ groupCardCatalog: at,
3743
+ guideStepsRequireSketch: Sn,
3744
+ isElementVisible: Ot,
3745
+ isSimplePadDefinition: un,
3746
+ joinClientSideChanges: It,
3747
+ padConfigToDashboard: hn,
3748
+ pickBestElement: xn,
3730
3749
  randomId: ze,
3731
3750
  resolveComposerSurfaces: ue,
3732
3751
  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,
3752
+ resolveGuideElement: Pt,
3753
+ sanitizeToJsVariable: Ne,
3754
+ sanitizeToJsxComponentName: nt,
3755
+ seedFromTemplate: Un,
3756
+ sketchCardItemComparer: sa,
3757
+ sketchFilterComparer: da,
3758
+ targetSuggestsPadInternal: vn,
3759
+ templateKinds: jn,
3760
+ toDraftPayload: wn,
3761
+ toSelectorList: gn,
3762
+ upsertDashboardDraft: ot,
3763
+ useCardTypeIcons: Ae,
3744
3764
  useComposer: B,
3745
- useComposerChatBridge: ii,
3746
- useComposerEnvironment: In,
3765
+ useComposerChatBridge: ai,
3766
+ useComposerEnvironment: zn,
3747
3767
  useComposerStore: he,
3748
- useComposerStoreOptional: ma,
3749
- useDashboardPad: Ga,
3750
- useEnvironment: dn,
3751
- useEnvironmentOptional: na,
3752
- validateSketch: bt
3768
+ useComposerStoreOptional: fa,
3769
+ useDashboardPad: Wa,
3770
+ useEnvironment: cn,
3771
+ useEnvironmentOptional: ia,
3772
+ validateSketch: vt
3753
3773
  }, Symbol.toStringTag, { value: "Module" }));
3754
3774
  export {
3755
- La as $,
3756
- Fa as A,
3775
+ Ga as $,
3776
+ Na as A,
3757
3777
  En as B,
3758
3778
  we as C,
3759
- nt as D,
3779
+ it as D,
3760
3780
  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,
3781
+ zt as F,
3782
+ Ct as G,
3783
+ ke as H,
3784
+ Va as I,
3785
+ oi as J,
3786
+ po as K,
3787
+ jo as L,
3788
+ ni as M,
3789
+ Ca as N,
3790
+ wa as O,
3791
+ bn as P,
3772
3792
  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,
3793
+ Rn as R,
3794
+ $n as S,
3795
+ Vn as T,
3796
+ Ut as U,
3797
+ Tn as V,
3798
+ Uo as W,
3799
+ Bn as X,
3800
+ Gn as Y,
3801
+ Nn as Z,
3802
+ Ln as _,
3803
+ On as a,
3804
+ Ba as a0,
3805
+ pa as a1,
3806
+ Hn as a2,
3807
+ Wn as a3,
3808
+ In as a4,
3809
+ $t as a5,
3810
+ La as a6,
3811
+ Ha as a7,
3812
+ Mn as a8,
3813
+ ti as a9,
3814
+ ai as aA,
3815
+ zn as aB,
3816
+ he as aC,
3817
+ fa as aD,
3818
+ Wa as aE,
3819
+ Kn as aF,
3820
+ vt as aG,
3821
+ Ko as aH,
3822
+ Rt as aa,
3823
+ ga as ab,
3803
3824
  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,
3825
+ at as ad,
3826
+ Sn as ae,
3827
+ Ot as af,
3828
+ un as ag,
3829
+ It as ah,
3830
+ hn as ai,
3831
+ xn as aj,
3811
3832
  ze as ak,
3812
3833
  ue as al,
3813
3834
  Qe as am,
3814
- Ot as an,
3815
- $e as ao,
3816
- jn as ap,
3817
- la as aq,
3835
+ Pt as an,
3836
+ Ne as ao,
3837
+ nt as ap,
3838
+ Un as aq,
3818
3839
  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,
3840
+ da as as,
3841
+ vn as at,
3842
+ jn as au,
3843
+ wn as av,
3844
+ gn as aw,
3845
+ ot as ax,
3846
+ Ae as ay,
3847
+ B as az,
3848
+ Pn as b,
3849
+ Sa as c,
3850
+ At as d,
3851
+ xa as e,
3852
+ Cn as f,
3853
+ so as g,
3854
+ ma as h,
3855
+ ii as i,
3856
+ kn as j,
3857
+ _n as k,
3858
+ Fn as l,
3859
+ rt as m,
3860
+ uo as n,
3861
+ Yn as o,
3862
+ Ma as p,
3863
+ ei as q,
3864
+ Ft as r,
3865
+ Fa as s,
3866
+ lt as t,
3867
+ _a as u,
3868
+ Ra as v,
3869
+ An as w,
3870
+ Mt as x,
3850
3871
  Dn as y,
3851
- xn as z
3872
+ yn as z
3852
3873
  };
3853
- //# sourceMappingURL=index-DOfnLVhs.js.map
3874
+ //# sourceMappingURL=index-GTSBsgzP.js.map