react-semaphor 0.0.3774 → 0.0.3776

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,6 +1,6 @@
1
- import { c as H, x as ks, y as w, z as Ze, A as Oe, B as e, H as zs, J as Os, K as T, p as Xe, M as Is, N as Ts, Q as Ms, R as Ds, V as U, W as he, Y as ha, Z as Fs, _ as Ls, $ as Es, a0 as ma, a1 as xa, a2 as it, a3 as ea, a4 as Y, a5 as Je, i as ot, a6 as m, a7 as ct, a8 as dt, P as pa, F as fa, a9 as We, aa as Ke, ab as ga, ac as ut, ad as ja, ae as ge, af as je, ag as be, ah as ve, ai as we, aj as ye, ak as ee, al as Vs, am as As, an as qs, ao as ba, ap as va, aq as pe, ar as ht, as as mt, at as ya, au as xt, C as pt, av as ft, aw as Na, ax as Ne, ay as gt, az as _e, aA as Ns, aB as Me, aC as Re, aD as ke, aE as jt, aF as bt, aG as sa, aH as vt, X as ds, aI as yt, aJ as Nt, aK as Ct, aL as St, aM as vs, l as wt, aN as kt, aO as zt, aP as Fe, aQ as oe, aR as Ca, aS as Ot, aT as us, aU as It, aV as Tt, aW as Cs, o as Mt, a as Dt, aX as ls, aY as Se, aZ as rs, a_ as Ft, a$ as Lt, b0 as Et, b1 as Vt, b2 as ys, b3 as At, b4 as aa, b5 as qt, b6 as ta, b7 as Rt, b8 as _t, b9 as Ht, ba as Pt, bb as Sa, bc as $t, bd as Rs, be as wa, bf as Bt, bg as Ut, bh as as, bi as Gt, bj as Jt, bk as ka, bl as Wt, u as Kt, bm as Qt, bn as Zt, s as Xt, bo as hs, bp as za, bq as Ce, br as Oa, bs as Ia, bt as ts, bu as ns, bv as Yt, bw as en, bx as sn, by as ms, bz as xs, bA as ps, bB as an, I as tn, bC as nn, bD as ln, bE as rn, bF as on, E as cn, bG as fs, bH as De, f as dn, bI as Be, bJ as _s, bK as Ta, bL as un, bM as hn, bN as is, bO as mn, bP as xn, bQ as pn, bR as fn, bS as na, bT as la, bU as Ma, bV as gn, bW as jn, bX as bn, bY as vn, bZ as yn, b_ as Nn, b$ as Cn, c0 as Sn, c1 as Le, c2 as Q, c3 as Z, c4 as Hs, c5 as X, c6 as wn, c7 as Da, c8 as kn, c9 as zn, ca as On, cb as In, cc as Tn, cd as Mn, ce as Dn, cf as Fn, cg as Ln } from "./index-Cc3W8Y_E.js";
2
- import * as ra from "react";
3
- import ze, { useState as R, useMemo as Ss, useEffect as ne, useRef as Ue, useCallback as Fa, Suspense as En } from "react";
1
+ import { c as H, x as ks, y as w, z as Ze, A as Oe, B as e, H as zs, J as Os, K as T, p as Xe, M as Is, N as Ts, Q as Ms, R as Ds, V as U, W as he, Y as ht, Z as Fs, _ as Ls, $ as Es, a0 as mt, a1 as xt, a2 as ia, a3 as et, a4 as Y, a5 as Je, i as oa, a6 as m, a7 as ca, a8 as da, P as pt, F as ft, a9 as We, aa as Ke, ab as gt, ac as ua, ad as jt, ae as ge, af as je, ag as be, ah as ve, ai as we, aj as ye, ak as ee, al as Vs, am as As, an as qs, ao as bt, ap as vt, aq as pe, ar as ha, as as ma, at as yt, au as xa, C as pa, av as fa, aw as Nt, ax as Ne, ay as ga, az as _e, aA as Ns, aB as Me, aC as Re, aD as ke, aE as ja, aF as ba, aG as st, aH as va, X as ds, aI as ya, aJ as Na, aK as Ca, aL as Sa, aM as vs, l as wa, aN as ka, aO as za, aP as Fe, aQ as oe, aR as Ct, aS as Oa, aT as us, aU as Ia, aV as Ta, aW as Cs, o as Ma, a as Da, aX as ls, aY as Se, aZ as rs, a_ as Fa, a$ as La, b0 as Ea, b1 as Va, b2 as ys, b3 as Aa, b4 as tt, b5 as qa, b6 as at, b7 as Ra, b8 as _a, b9 as Ha, ba as Pa, bb as St, bc as $a, bd as Rs, be as wt, bf as Ba, bg as Ua, bh as ts, bi as Ga, bj as Ja, bk as kt, bl as Wa, u as Ka, bm as Qa, bn as Za, s as Xa, bo as hs, bp as zt, bq as Ce, br as Ot, bs as It, bt as as, bu as ns, bv as Ya, bw as en, bx as ms, by as xs, bz as ps, bA as sn, I as tn, bB as an, bC as nn, bD as ln, bE as rn, E as on, bF as fs, bG as De, f as cn, bH as Be, bI as _s, bJ as Tt, bK as dn, bL as un, bM as is, bN as hn, bO as mn, bP as xn, bQ as pn, bR as nt, bS as lt, bT as Mt, bU as fn, bV as gn, bW as jn, bX as bn, bY as vn, bZ as yn, b_ as Nn, b$ as Cn, c0 as Le, c1 as Q, c2 as Z, c3 as Hs, c4 as X, c5 as Sn, c6 as Dt, c7 as wn, c8 as kn, c9 as zn, ca as On, cb as In, cc as Tn, cd as Mn, ce as Dn, cf as Fn } from "./index-D-NXpiDV.js";
2
+ import * as rt from "react";
3
+ import ze, { useState as R, useMemo as Ss, useEffect as ne, useRef as Ue, useCallback as Ft, Suspense as Ln } from "react";
4
4
  import "react-dom";
5
5
  /**
6
6
  * @license lucide-react v0.453.0 - ISC
@@ -8,7 +8,7 @@ import "react-dom";
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
10
  */
11
- const Vn = H("Box", [
11
+ const En = H("Box", [
12
12
  [
13
13
  "path",
14
14
  {
@@ -25,7 +25,7 @@ const Vn = H("Box", [
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
27
  */
28
- const An = H("Braces", [
28
+ const Vn = H("Braces", [
29
29
  [
30
30
  "path",
31
31
  { d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1", key: "ezmyqa" }
@@ -44,7 +44,7 @@ const An = H("Braces", [
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */
47
- const qn = H("ChartArea", [
47
+ const An = H("ChartArea", [
48
48
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
49
49
  [
50
50
  "path",
@@ -82,7 +82,7 @@ const $s = H("ChartLine", [
82
82
  * This source code is licensed under the ISC license.
83
83
  * See the LICENSE file in the root directory of this source tree.
84
84
  */
85
- const La = H("ChartNoAxesGantt", [
85
+ const Lt = H("ChartNoAxesGantt", [
86
86
  ["path", { d: "M8 6h10", key: "9lnwnk" }],
87
87
  ["path", { d: "M6 12h9", key: "1g9pqf" }],
88
88
  ["path", { d: "M11 18h7", key: "c8dzvl" }]
@@ -93,7 +93,7 @@ const La = H("ChartNoAxesGantt", [
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
95
  */
96
- const Ea = H("ChartPie", [
96
+ const Et = H("ChartPie", [
97
97
  [
98
98
  "path",
99
99
  {
@@ -109,7 +109,7 @@ const Ea = H("ChartPie", [
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
111
  */
112
- const Va = H("ChartScatter", [
112
+ const Vt = H("ChartScatter", [
113
113
  ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }],
114
114
  ["circle", { cx: "18.5", cy: "5.5", r: ".5", fill: "currentColor", key: "lysivs" }],
115
115
  ["circle", { cx: "11.5", cy: "11.5", r: ".5", fill: "currentColor", key: "byv1b8" }],
@@ -123,7 +123,7 @@ const Va = H("ChartScatter", [
123
123
  * This source code is licensed under the ISC license.
124
124
  * See the LICENSE file in the root directory of this source tree.
125
125
  */
126
- const Rn = H("CircleX", [
126
+ const qn = H("CircleX", [
127
127
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
128
128
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
129
129
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -134,7 +134,7 @@ const Rn = H("CircleX", [
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
136
  */
137
- const _n = H("CopyPlus", [
137
+ const Rn = H("CopyPlus", [
138
138
  ["line", { x1: "15", x2: "15", y1: "12", y2: "18", key: "1p7wdc" }],
139
139
  ["line", { x1: "12", x2: "18", y1: "15", y2: "15", key: "1nscbv" }],
140
140
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
@@ -146,7 +146,7 @@ const _n = H("CopyPlus", [
146
146
  * This source code is licensed under the ISC license.
147
147
  * See the LICENSE file in the root directory of this source tree.
148
148
  */
149
- const Hn = H("Database", [
149
+ const _n = H("Database", [
150
150
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
151
151
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
152
152
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
@@ -168,7 +168,7 @@ const Bs = H("EllipsisVertical", [
168
168
  * This source code is licensed under the ISC license.
169
169
  * See the LICENSE file in the root directory of this source tree.
170
170
  */
171
- const Pn = H("Eraser", [
171
+ const Hn = H("Eraser", [
172
172
  [
173
173
  "path",
174
174
  {
@@ -185,7 +185,7 @@ const Pn = H("Eraser", [
185
185
  * This source code is licensed under the ISC license.
186
186
  * See the LICENSE file in the root directory of this source tree.
187
187
  */
188
- const $n = H("EyeClosed", [
188
+ const Pn = H("EyeClosed", [
189
189
  ["path", { d: "m15 18-.722-3.25", key: "1j64jw" }],
190
190
  ["path", { d: "M2 8a10.645 10.645 0 0 0 20 0", key: "1e7gxb" }],
191
191
  ["path", { d: "m20 15-1.726-2.05", key: "1cnuld" }],
@@ -198,7 +198,7 @@ const $n = H("EyeClosed", [
198
198
  * This source code is licensed under the ISC license.
199
199
  * See the LICENSE file in the root directory of this source tree.
200
200
  */
201
- const Bn = H("FileJson2", [
201
+ const $n = H("FileJson2", [
202
202
  ["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
203
203
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
204
204
  [
@@ -216,7 +216,7 @@ const Bn = H("FileJson2", [
216
216
  * This source code is licensed under the ISC license.
217
217
  * See the LICENSE file in the root directory of this source tree.
218
218
  */
219
- const Un = H("Glasses", [
219
+ const Bn = H("Glasses", [
220
220
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
221
221
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
222
222
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -229,7 +229,7 @@ const Un = H("Glasses", [
229
229
  * This source code is licensed under the ISC license.
230
230
  * See the LICENSE file in the root directory of this source tree.
231
231
  */
232
- const Gn = H("Hammer", [
232
+ const Un = H("Hammer", [
233
233
  ["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
234
234
  ["path", { d: "m18 15 4-4", key: "16gjal" }],
235
235
  [
@@ -246,7 +246,7 @@ const Gn = H("Hammer", [
246
246
  * This source code is licensed under the ISC license.
247
247
  * See the LICENSE file in the root directory of this source tree.
248
248
  */
249
- const Jn = H("Hash", [
249
+ const Gn = H("Hash", [
250
250
  ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
251
251
  ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
252
252
  ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
@@ -258,7 +258,7 @@ const Jn = H("Hash", [
258
258
  * This source code is licensed under the ISC license.
259
259
  * See the LICENSE file in the root directory of this source tree.
260
260
  */
261
- const Wn = H("House", [
261
+ const Jn = H("House", [
262
262
  ["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
263
263
  [
264
264
  "path",
@@ -274,7 +274,7 @@ const Wn = H("House", [
274
274
  * This source code is licensed under the ISC license.
275
275
  * See the LICENSE file in the root directory of this source tree.
276
276
  */
277
- const Kn = H("ListEnd", [
277
+ const Wn = H("ListEnd", [
278
278
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
279
279
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
280
280
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -287,7 +287,7 @@ const Kn = H("ListEnd", [
287
287
  * This source code is licensed under the ISC license.
288
288
  * See the LICENSE file in the root directory of this source tree.
289
289
  */
290
- const Qn = H("ListStart", [
290
+ const Kn = H("ListStart", [
291
291
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
292
292
  ["path", { d: "M16 18H3", key: "12xzn7" }],
293
293
  ["path", { d: "M10 6H3", key: "lf8lx7" }],
@@ -300,7 +300,7 @@ const Qn = H("ListStart", [
300
300
  * This source code is licensed under the ISC license.
301
301
  * See the LICENSE file in the root directory of this source tree.
302
302
  */
303
- const Zn = H("ListX", [
303
+ const Qn = H("ListX", [
304
304
  ["path", { d: "M11 12H3", key: "51ecnj" }],
305
305
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
306
306
  ["path", { d: "M16 18H3", key: "12xzn7" }],
@@ -322,7 +322,7 @@ const Qe = H("LoaderCircle", [
322
322
  * This source code is licensed under the ISC license.
323
323
  * See the LICENSE file in the root directory of this source tree.
324
324
  */
325
- const Aa = H("Map", [
325
+ const At = H("Map", [
326
326
  [
327
327
  "path",
328
328
  {
@@ -339,7 +339,7 @@ const Aa = H("Map", [
339
339
  * This source code is licensed under the ISC license.
340
340
  * See the LICENSE file in the root directory of this source tree.
341
341
  */
342
- const Xn = H("MessageSquareMore", [
342
+ const Zn = H("MessageSquareMore", [
343
343
  ["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }],
344
344
  ["path", { d: "M8 10h.01", key: "19clt8" }],
345
345
  ["path", { d: "M12 10h.01", key: "1nrarc" }],
@@ -351,7 +351,7 @@ const Xn = H("MessageSquareMore", [
351
351
  * This source code is licensed under the ISC license.
352
352
  * See the LICENSE file in the root directory of this source tree.
353
353
  */
354
- const Yn = H("Network", [
354
+ const Xn = H("Network", [
355
355
  ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
356
356
  ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
357
357
  ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
@@ -364,7 +364,7 @@ const Yn = H("Network", [
364
364
  * This source code is licensed under the ISC license.
365
365
  * See the LICENSE file in the root directory of this source tree.
366
366
  */
367
- const el = H("Plug2", [
367
+ const Yn = H("Plug2", [
368
368
  ["path", { d: "M9 2v6", key: "17ngun" }],
369
369
  ["path", { d: "M15 2v6", key: "s7yy2p" }],
370
370
  ["path", { d: "M12 17v5", key: "bb1du9" }],
@@ -377,7 +377,7 @@ const el = H("Plug2", [
377
377
  * This source code is licensed under the ISC license.
378
378
  * See the LICENSE file in the root directory of this source tree.
379
379
  */
380
- const sl = H("RefreshCw", [
380
+ const el = H("RefreshCw", [
381
381
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
382
382
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
383
383
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
@@ -389,7 +389,7 @@ const sl = H("RefreshCw", [
389
389
  * This source code is licensed under the ISC license.
390
390
  * See the LICENSE file in the root directory of this source tree.
391
391
  */
392
- const al = H("Save", [
392
+ const sl = H("Save", [
393
393
  [
394
394
  "path",
395
395
  {
@@ -406,7 +406,7 @@ const al = H("Save", [
406
406
  * This source code is licensed under the ISC license.
407
407
  * See the LICENSE file in the root directory of this source tree.
408
408
  */
409
- const qa = H("Shapes", [
409
+ const qt = H("Shapes", [
410
410
  [
411
411
  "path",
412
412
  {
@@ -440,7 +440,7 @@ const tl = H("ShieldQuestion", [
440
440
  * This source code is licensed under the ISC license.
441
441
  * See the LICENSE file in the root directory of this source tree.
442
442
  */
443
- const nl = H("Sigma", [
443
+ const al = H("Sigma", [
444
444
  [
445
445
  "path",
446
446
  {
@@ -455,7 +455,7 @@ const nl = H("Sigma", [
455
455
  * This source code is licensed under the ISC license.
456
456
  * See the LICENSE file in the root directory of this source tree.
457
457
  */
458
- const ll = H("SwatchBook", [
458
+ const nl = H("SwatchBook", [
459
459
  ["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z", key: "1ldrpk" }],
460
460
  ["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7", key: "11i5po" }],
461
461
  ["path", { d: "M 7 17h.01", key: "1euzgo" }],
@@ -485,7 +485,7 @@ const Us = H("Table", [
485
485
  * This source code is licensed under the ISC license.
486
486
  * See the LICENSE file in the root directory of this source tree.
487
487
  */
488
- const rl = H("Tag", [
488
+ const ll = H("Tag", [
489
489
  [
490
490
  "path",
491
491
  {
@@ -501,7 +501,7 @@ const rl = H("Tag", [
501
501
  * This source code is licensed under the ISC license.
502
502
  * See the LICENSE file in the root directory of this source tree.
503
503
  */
504
- const il = H("TicketX", [
504
+ const rl = H("TicketX", [
505
505
  [
506
506
  "path",
507
507
  {
@@ -518,7 +518,7 @@ const il = H("TicketX", [
518
518
  * This source code is licensed under the ISC license.
519
519
  * See the LICENSE file in the root directory of this source tree.
520
520
  */
521
- const ol = H("ToggleLeft", [
521
+ const il = H("ToggleLeft", [
522
522
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
523
523
  ["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
524
524
  ]);
@@ -533,15 +533,25 @@ const Gs = H("Type", [
533
533
  ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
534
534
  ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
535
535
  ]);
536
- function Ra(s) {
537
- var t;
536
+ async function ol(s) {
537
+ try {
538
+ const a = await fetch(`${s}/manifest.json`);
539
+ if (!a.ok)
540
+ throw new Error(`Failed to fetch manifest: ${a.statusText}`);
541
+ return await a.json();
542
+ } catch (a) {
543
+ throw console.error("Error loading manifest:", a), a;
544
+ }
545
+ }
546
+ function Rt(s) {
547
+ var a;
538
548
  return {
539
549
  ...s,
540
- sheets: (t = s == null ? void 0 : s.sheets) == null ? void 0 : t.map((a) => {
550
+ sheets: (a = s == null ? void 0 : s.sheets) == null ? void 0 : a.map((t) => {
541
551
  var n;
542
552
  return {
543
- ...a,
544
- frames: (n = a.frames) == null ? void 0 : n.map((l) => {
553
+ ...t,
554
+ frames: (n = t.frames) == null ? void 0 : n.map((l) => {
545
555
  var r;
546
556
  return {
547
557
  ...l,
@@ -553,15 +563,15 @@ function Ra(s) {
553
563
  };
554
564
  }
555
565
  function cl(s) {
556
- var t, a, n, l;
566
+ var a, t, n, l;
557
567
  return {
558
568
  ...s,
559
569
  cfg: {
560
570
  ...s.cfg,
561
571
  data: {
562
- ...(t = s.cfg) == null ? void 0 : t.data,
572
+ ...(a = s.cfg) == null ? void 0 : a.data,
563
573
  labels: [],
564
- datasets: (l = (n = (a = s.cfg) == null ? void 0 : a.data) == null ? void 0 : n.datasets) == null ? void 0 : l.map((r) => ({
574
+ datasets: (l = (n = (t = s.cfg) == null ? void 0 : t.data) == null ? void 0 : n.datasets) == null ? void 0 : l.map((r) => ({
565
575
  ...r,
566
576
  data: []
567
577
  }))
@@ -573,36 +583,36 @@ function cl(s) {
573
583
  };
574
584
  }
575
585
  function dl(s) {
576
- var t, a;
586
+ var a, t;
577
587
  return s ? {
578
588
  ...s,
579
589
  data: {
580
590
  ...s == null ? void 0 : s.data,
581
591
  labels: [],
582
- datasets: (a = (t = s == null ? void 0 : s.data) == null ? void 0 : t.datasets) == null ? void 0 : a.map((n) => ({
592
+ datasets: (t = (a = s == null ? void 0 : s.data) == null ? void 0 : a.datasets) == null ? void 0 : t.map((n) => ({
583
593
  ...n,
584
594
  data: []
585
595
  }))
586
596
  }
587
597
  } : null;
588
598
  }
589
- async function ul(s, t, a, n) {
599
+ async function ul(s, a, t, n) {
590
600
  if (!n)
591
601
  return null;
592
- const l = JSON.stringify(t);
602
+ const l = JSON.stringify(a);
593
603
  return await ks("https://semaphor.cloud/api/v1/lens", n, {
594
604
  name: s,
595
605
  template: l,
596
- filterValues: a,
606
+ filterValues: t,
597
607
  operation: "create"
598
608
  });
599
609
  }
600
- async function ws(s, t) {
601
- if (!t)
610
+ async function ws(s, a) {
611
+ if (!a)
602
612
  return null;
603
- const { id: a, template: n, filterValues: l, isDefault: r, shared: i } = s;
604
- return await ks("https://semaphor.cloud/api/v1/lens", t, {
605
- lensId: a,
613
+ const { id: t, template: n, filterValues: l, isDefault: r, shared: i } = s;
614
+ return await ks("https://semaphor.cloud/api/v1/lens", a, {
615
+ lensId: t,
606
616
  template: n,
607
617
  filterValues: l,
608
618
  isDefault: r,
@@ -610,17 +620,17 @@ async function ws(s, t) {
610
620
  operation: "update"
611
621
  });
612
622
  }
613
- async function hl(s, t) {
614
- return t ? await ks("https://semaphor.cloud/api/v1/lens", t, {
623
+ async function hl(s, a) {
624
+ return a ? await ks("https://semaphor.cloud/api/v1/lens", a, {
615
625
  operation: "delete",
616
626
  lensId: s
617
627
  }) : null;
618
628
  }
619
629
  function ml() {
620
- const [s, t] = R(""), [a, n] = R(!1), l = w((f) => f.lenses), { setLenses: r, setSelectedLensId: i } = Ze(), [o, c] = R(!1), [u, x] = R(!1), j = w((f) => f.dashboard), b = w((f) => f.filterValues), { authToken: d } = Oe();
630
+ const [s, a] = R(""), [t, n] = R(!1), l = w((f) => f.lenses), { setLenses: r, setSelectedLensId: i } = Ze(), [o, c] = R(!1), [u, x] = R(!1), j = w((f) => f.dashboard), b = w((f) => f.filterValues), { authToken: d } = Oe();
621
631
  async function p() {
622
632
  c(!0);
623
- const f = Ra(
633
+ const f = Rt(
624
634
  j
625
635
  ), S = await ul(
626
636
  s,
@@ -655,15 +665,15 @@ function ml() {
655
665
  {
656
666
  value: s,
657
667
  onChange: (f) => {
658
- t(f.target.value);
668
+ a(f.target.value);
659
669
  },
660
670
  id: "name",
661
671
  className: "col-span-7 focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
662
672
  }
663
673
  )
664
674
  ] }) }),
665
- a && /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
666
- /* @__PURE__ */ e.jsx(ha, { children: /* @__PURE__ */ e.jsx(
675
+ t && /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
676
+ /* @__PURE__ */ e.jsx(ht, { children: /* @__PURE__ */ e.jsx(
667
677
  T,
668
678
  {
669
679
  size: "sm",
@@ -678,18 +688,18 @@ function ml() {
678
688
  ] });
679
689
  }
680
690
  function xl() {
681
- const [s, t] = R(!1), a = w((x) => x.lenses), n = w((x) => x.selectedLensId), { setLenses: l, setSelectedLensId: r } = Ze(), { authToken: i } = Oe();
691
+ const [s, a] = R(!1), t = w((x) => x.lenses), n = w((x) => x.selectedLensId), { setLenses: l, setSelectedLensId: r } = Ze(), { authToken: i } = Oe();
682
692
  async function o(x) {
683
693
  r(x);
684
694
  }
685
695
  async function c(x) {
686
696
  if (await hl(x, i == null ? void 0 : i.accessToken)) {
687
- const b = a == null ? void 0 : a.filter((d) => d.id !== x);
697
+ const b = t == null ? void 0 : t.filter((d) => d.id !== x);
688
698
  l(b || []), r("original");
689
699
  }
690
700
  }
691
701
  async function u(x) {
692
- const j = a == null ? void 0 : a.map((p) => p.id === x.id ? {
702
+ const j = t == null ? void 0 : t.map((p) => p.id === x.id ? {
693
703
  ...p,
694
704
  isDefault: !x.isDefault
695
705
  } : {
@@ -702,7 +712,7 @@ function xl() {
702
712
  isDefault: !x.isDefault
703
713
  };
704
714
  await ws(b, i == null ? void 0 : i.accessToken);
705
- const d = a == null ? void 0 : a.find((p) => p.isDefault);
715
+ const d = t == null ? void 0 : t.find((p) => p.isDefault);
706
716
  if (d && d.id !== x.id) {
707
717
  const p = {
708
718
  ...d,
@@ -711,20 +721,20 @@ function xl() {
711
721
  await ws(p, i == null ? void 0 : i.accessToken);
712
722
  }
713
723
  }
714
- return /* @__PURE__ */ e.jsxs(Fs, { open: s, onOpenChange: t, children: [
715
- /* @__PURE__ */ e.jsx(Ls, { asChild: !0, children: /* @__PURE__ */ e.jsx(T, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(Un, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
724
+ return /* @__PURE__ */ e.jsxs(Fs, { open: s, onOpenChange: a, children: [
725
+ /* @__PURE__ */ e.jsx(Ls, { asChild: !0, children: /* @__PURE__ */ e.jsx(T, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(Bn, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
716
726
  /* @__PURE__ */ e.jsxs(Es, { align: "end", className: "w-60", children: [
717
- /* @__PURE__ */ e.jsx(ma, { className: "px-3", children: "Lenses" }),
718
- /* @__PURE__ */ e.jsx(xa, {}),
727
+ /* @__PURE__ */ e.jsx(mt, { className: "px-3", children: "Lenses" }),
728
+ /* @__PURE__ */ e.jsx(xt, {}),
719
729
  /* @__PURE__ */ e.jsxs(
720
- it,
730
+ ia,
721
731
  {
722
732
  value: n,
723
733
  onValueChange: o,
724
734
  children: [
725
- /* @__PURE__ */ e.jsx(ea, { value: "original", children: "Original" }),
726
- a == null ? void 0 : a.map((x) => /* @__PURE__ */ e.jsxs(
727
- ea,
735
+ /* @__PURE__ */ e.jsx(et, { value: "original", children: "Original" }),
736
+ t == null ? void 0 : t.map((x) => /* @__PURE__ */ e.jsxs(
737
+ et,
728
738
  {
729
739
  className: "group flex justify-between gap-2",
730
740
  value: x.id,
@@ -732,7 +742,7 @@ function xl() {
732
742
  /* @__PURE__ */ e.jsx("p", { children: x.name }),
733
743
  /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-3", children: [
734
744
  /* @__PURE__ */ e.jsx(
735
- Wn,
745
+ Jn,
736
746
  {
737
747
  onClick: (j) => {
738
748
  j.preventDefault(), u(x);
@@ -770,11 +780,11 @@ function xl() {
770
780
  }
771
781
  async function pl() {
772
782
  var d;
773
- const s = w.getState().authToken, t = w.getState().theme, a = w.getState().filterValues, n = (d = w.getState().dashboard) == null ? void 0 : d.title, l = w.getState().isDownloadingPdf, r = w.getState().selectedSheetId;
783
+ const s = w.getState().authToken, a = w.getState().theme, t = w.getState().filterValues, n = (d = w.getState().dashboard) == null ? void 0 : d.title, l = w.getState().isDownloadingPdf, r = w.getState().selectedSheetId;
774
784
  if (l)
775
785
  return;
776
786
  const i = new URLSearchParams();
777
- i.set("token", (s == null ? void 0 : s.accessToken) || ""), i.set("theme", t || "light"), i.set("filterValues", JSON.stringify(a)), i.set("selectedSheetId", r || "");
787
+ i.set("token", (s == null ? void 0 : s.accessToken) || ""), i.set("theme", a || "light"), i.set("filterValues", JSON.stringify(t)), i.set("selectedSheetId", r || "");
778
788
  const o = `https://semaphor.cloud/api/v1/generate-pdf?params=${encodeURIComponent(i.toString())}`;
779
789
  w.setState({ isDownloadingPdf: !0 });
780
790
  const x = (await (await fetch(o, {
@@ -790,12 +800,12 @@ async function pl() {
790
800
  function fl({
791
801
  iconClassName: s
792
802
  }) {
793
- const { authToken: t } = Oe();
803
+ const { authToken: a } = Oe();
794
804
  w((l) => {
795
805
  var r;
796
806
  return (r = l.dashboard) == null ? void 0 : r.title;
797
807
  }), w((l) => l.theme), w((l) => l.filterValues);
798
- const a = w((l) => l.isDownloadingPdf);
808
+ const t = w((l) => l.isDownloadingPdf);
799
809
  async function n() {
800
810
  await pl();
801
811
  }
@@ -806,8 +816,8 @@ function fl({
806
816
  className: "group h-7 p-2",
807
817
  size: "sm",
808
818
  onClick: n,
809
- children: a ? /* @__PURE__ */ e.jsx(Qe, { className: Y("size-3.5 animate-spin", s) }) : /* @__PURE__ */ e.jsx(
810
- ot,
819
+ children: t ? /* @__PURE__ */ e.jsx(Qe, { className: Y("size-3.5 animate-spin", s) }) : /* @__PURE__ */ e.jsx(
820
+ oa,
811
821
  {
812
822
  className: Y("size-3.5", s),
813
823
  strokeWidth: 1.5
@@ -819,7 +829,7 @@ function fl({
819
829
  function gl() {
820
830
  const { authToken: s } = Oe();
821
831
  w((h) => h.theme);
822
- const t = w((h) => h.lenses), a = w((h) => h.selectedLensId), n = t == null ? void 0 : t.find((h) => h.id === a), l = w((h) => h.dashboard);
832
+ const a = w((h) => h.lenses), t = w((h) => h.selectedLensId), n = a == null ? void 0 : a.find((h) => h.id === t), l = w((h) => h.dashboard);
823
833
  w((h) => h.selectedSheetId);
824
834
  const r = w(
825
835
  (h) => h.isDashboardEditing
@@ -834,7 +844,7 @@ function gl() {
834
844
  ), { addFrame: p, setSelectedFrameId: f } = w(
835
845
  (h) => h.actions
836
846
  ), { getSelectedSheet: S, setIsDashboardEditing: v, setShowDashboardJSON: F } = w((h) => h.actions), L = S(), { tenantId: y, endUserId: z } = Ss(
837
- () => ct(s == null ? void 0 : s.accessToken),
847
+ () => ca(s == null ? void 0 : s.accessToken),
838
848
  [s == null ? void 0 : s.accessToken]
839
849
  ), M = Ss(() => y || z, [y, z]), V = () => {
840
850
  if (!r || !L) return;
@@ -864,8 +874,8 @@ function gl() {
864
874
  v(!0);
865
875
  };
866
876
  async function P() {
867
- if (c(!0), !a || !n) return;
868
- const h = Ra(
877
+ if (c(!0), !t || !n) return;
878
+ const h = Rt(
869
879
  l
870
880
  ), g = JSON.stringify(h), O = {
871
881
  ...n,
@@ -882,7 +892,7 @@ function gl() {
882
892
  children: [
883
893
  !x && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ e.jsx(U, { children: n == null ? void 0 : n.name }) }),
884
894
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
885
- /* @__PURE__ */ e.jsx("button", { onClick: dt, children: /* @__PURE__ */ e.jsx(il, { className: "h-4 w-4", strokeWidth: 1.5 }) }),
895
+ /* @__PURE__ */ e.jsx("button", { onClick: da, children: /* @__PURE__ */ e.jsx(rl, { className: "h-4 w-4", strokeWidth: 1.5 }) }),
886
896
  /* @__PURE__ */ e.jsx(fl, {}),
887
897
  r && !x && M && /* @__PURE__ */ e.jsx(ml, {}),
888
898
  !x && M && /* @__PURE__ */ e.jsx(xl, {}),
@@ -907,7 +917,7 @@ function gl() {
907
917
  className: "h-7 p-2",
908
918
  onClick: E,
909
919
  size: "sm",
910
- children: /* @__PURE__ */ e.jsx(pa, { className: "h-4 w-4", strokeWidth: 1.5 })
920
+ children: /* @__PURE__ */ e.jsx(pt, { className: "h-4 w-4", strokeWidth: 1.5 })
911
921
  }
912
922
  ),
913
923
  r && !x && /* @__PURE__ */ e.jsx(
@@ -931,7 +941,7 @@ function gl() {
931
941
  disabled: o,
932
942
  onClick: P,
933
943
  size: "sm",
934
- children: /* @__PURE__ */ e.jsx(al, { className: "h-4 w-4", strokeWidth: 1.5 })
944
+ children: /* @__PURE__ */ e.jsx(sl, { className: "h-4 w-4", strokeWidth: 1.5 })
935
945
  }
936
946
  ),
937
947
  !j && !x && r && /* @__PURE__ */ e.jsx(
@@ -941,7 +951,7 @@ function gl() {
941
951
  variant: "ghost",
942
952
  onClick: () => d(!0),
943
953
  size: "sm",
944
- children: /* @__PURE__ */ e.jsx(fa, { className: "h-4 w-4", strokeWidth: 1.5 })
954
+ children: /* @__PURE__ */ e.jsx(ft, { className: "h-4 w-4", strokeWidth: 1.5 })
945
955
  }
946
956
  ),
947
957
  !x && r && !1,
@@ -953,8 +963,8 @@ function gl() {
953
963
  }
954
964
  function $e({
955
965
  title: s,
956
- items: t,
957
- value: a,
966
+ items: a,
967
+ value: t,
958
968
  isLoading: n,
959
969
  isError: l,
960
970
  refetch: r,
@@ -965,23 +975,23 @@ function $e({
965
975
  showIcon: x = !0,
966
976
  disabled: j = !1
967
977
  }) {
968
- const b = n ? "Loading..." : l ? "Error" : a;
978
+ const b = n ? "Loading..." : l ? "Error" : t;
969
979
  function d() {
970
980
  if (s === "Connection")
971
- return /* @__PURE__ */ e.jsx(el, { className: "size-4 rotate-90" });
981
+ return /* @__PURE__ */ e.jsx(Yn, { className: "size-4 rotate-90" });
972
982
  if (s === "Database")
973
- return /* @__PURE__ */ e.jsx(Hn, { className: "size-4" });
983
+ return /* @__PURE__ */ e.jsx(_n, { className: "size-4" });
974
984
  if (s === "Schema")
975
- return /* @__PURE__ */ e.jsx(Yn, { className: "size-4" });
985
+ return /* @__PURE__ */ e.jsx(Xn, { className: "size-4" });
976
986
  if (s === "Table")
977
987
  return /* @__PURE__ */ e.jsx(Us, { className: "size-4" });
978
988
  if (s === "Model")
979
- return /* @__PURE__ */ e.jsx(Vn, { className: "size-4" });
989
+ return /* @__PURE__ */ e.jsx(En, { className: "size-4" });
980
990
  }
981
991
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
982
- x && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: i ? /* @__PURE__ */ e.jsxs(ga, { children: [
983
- /* @__PURE__ */ e.jsx(ut, { children: d() }),
984
- /* @__PURE__ */ e.jsx(ja, { className: "text-xs", align: "start", children: i })
992
+ x && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: i ? /* @__PURE__ */ e.jsxs(gt, { children: [
993
+ /* @__PURE__ */ e.jsx(ua, { children: d() }),
994
+ /* @__PURE__ */ e.jsx(jt, { className: "text-xs", align: "start", children: i })
985
995
  ] }) : d() }),
986
996
  /* @__PURE__ */ e.jsxs(ge, { disabled: j, value: b, onValueChange: o, children: [
987
997
  /* @__PURE__ */ e.jsx(
@@ -1003,7 +1013,7 @@ function $e({
1003
1013
  n ? /* @__PURE__ */ e.jsx(ye, { children: "Loading..." }) : /* @__PURE__ */ e.jsxs(ye, { className: "flex items-center justify-between gap-2", children: [
1004
1014
  s,
1005
1015
  /* @__PURE__ */ e.jsx(
1006
- sl,
1016
+ el,
1007
1017
  {
1008
1018
  className: "mr-1 size-3 cursor-pointer text-muted-foreground hover:text-foreground",
1009
1019
  onClick: r
@@ -1012,7 +1022,7 @@ function $e({
1012
1022
  ] }),
1013
1023
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1014
1024
  c && /* @__PURE__ */ e.jsx(ee, { value: "none", children: "None" }, "none"),
1015
- t && t.map((p, f) => /* @__PURE__ */ e.jsx(ee, { value: p.id, children: p.name }, f))
1025
+ a && a.map((p, f) => /* @__PURE__ */ e.jsx(ee, { value: p.id, children: p.name }, f))
1016
1026
  ] }),
1017
1027
  (n || l) && /* @__PURE__ */ e.jsx(ee, { value: b, children: b })
1018
1028
  ] }) })
@@ -1020,25 +1030,25 @@ function $e({
1020
1030
  ] });
1021
1031
  }
1022
1032
  function jl({ column: s }) {
1023
- const [t, a] = R(!1), n = m((p) => p.selectedTableName), l = m(
1033
+ const [a, t] = R(!1), n = m((p) => p.selectedTableName), l = m(
1024
1034
  (p) => p.selectedSchemaName
1025
1035
  ), r = m(
1026
1036
  (p) => p.selectedDatamodelId
1027
1037
  ), i = m((p) => p.sqlGen), { modelItems: o, connectionType: c } = Ee(), u = m((p) => p.actions.setSqlGen), x = m((p) => p.actions.setCardSql), j = m((p) => p.actions.setRunSql);
1028
1038
  function b(p, f) {
1029
1039
  var L;
1030
- const S = ba(p, i, f), v = (L = o == null ? void 0 : o.find(
1040
+ const S = bt(p, i, f), v = (L = o == null ? void 0 : o.find(
1031
1041
  (y) => y.id === r
1032
1042
  )) == null ? void 0 : L.name;
1033
1043
  u(S);
1034
- const F = va(
1044
+ const F = vt(
1035
1045
  S,
1036
1046
  pe(l || ""),
1037
1047
  pe(n),
1038
1048
  v,
1039
1049
  c
1040
1050
  );
1041
- F && (x(F), j(!0)), a(!1);
1051
+ F && (x(F), j(!0)), t(!1);
1042
1052
  }
1043
1053
  function d() {
1044
1054
  return /* @__PURE__ */ e.jsxs("ul", { className: "text-xs", children: [
@@ -1084,7 +1094,7 @@ function jl({ column: s }) {
1084
1094
  )
1085
1095
  ] });
1086
1096
  }
1087
- return /* @__PURE__ */ e.jsxs(Vs, { openDelay: 0, open: t, onOpenChange: a, children: [
1097
+ return /* @__PURE__ */ e.jsxs(Vs, { openDelay: 0, open: a, onOpenChange: t, children: [
1088
1098
  /* @__PURE__ */ e.jsx(As, { asChild: !0, children: /* @__PURE__ */ e.jsx(Bs, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
1089
1099
  /* @__PURE__ */ e.jsx(
1090
1100
  qs,
@@ -1096,16 +1106,16 @@ function jl({ column: s }) {
1096
1106
  )
1097
1107
  ] });
1098
1108
  }
1099
- function _a({ column: s }) {
1100
- return /* @__PURE__ */ e.jsxs(ga, { children: [
1101
- /* @__PURE__ */ e.jsx(ht, { asChild: !0, children: mt(s.data_type) ? /* @__PURE__ */ e.jsx(Gs, { className: "size-3" }) : ya(s.data_type) ? /* @__PURE__ */ e.jsx(Jn, { className: "size-3" }) : xt(s.data_type) ? /* @__PURE__ */ e.jsx(pt, { className: "size-3" }) : ft(s.data_type) ? /* @__PURE__ */ e.jsx(ol, { className: "size-3" }) : s.data_type.toLowerCase() === "json" ? /* @__PURE__ */ e.jsx(An, { className: "size-3" }) : /* @__PURE__ */ e.jsx(tl, { className: "size-3" }) }),
1102
- /* @__PURE__ */ e.jsx(ja, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
1109
+ function _t({ column: s }) {
1110
+ return /* @__PURE__ */ e.jsxs(gt, { children: [
1111
+ /* @__PURE__ */ e.jsx(ha, { asChild: !0, children: ma(s.data_type) ? /* @__PURE__ */ e.jsx(Gs, { className: "size-3" }) : yt(s.data_type) ? /* @__PURE__ */ e.jsx(Gn, { className: "size-3" }) : xa(s.data_type) ? /* @__PURE__ */ e.jsx(pa, { className: "size-3" }) : fa(s.data_type) ? /* @__PURE__ */ e.jsx(il, { className: "size-3" }) : s.data_type.toLowerCase() === "json" ? /* @__PURE__ */ e.jsx(Vn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(tl, { className: "size-3" }) }),
1112
+ /* @__PURE__ */ e.jsx(jt, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
1103
1113
  ] });
1104
1114
  }
1105
1115
  function bl({
1106
1116
  schemaName: s,
1107
- tableName: t,
1108
- columns: a,
1117
+ tableName: a,
1118
+ columns: t,
1109
1119
  status: n
1110
1120
  }) {
1111
1121
  const l = m((h) => h.sqlGen), r = m(
@@ -1123,14 +1133,14 @@ function bl({
1123
1133
  ), v = m((h) => h.actions.setCardSql), { connectionType: F, modelItems: L, selectedDatamodelName: y } = Ee();
1124
1134
  function z(h) {
1125
1135
  var A;
1126
- const g = ba(h, l);
1136
+ const g = bt(h, l);
1127
1137
  f(g);
1128
1138
  const O = (A = L == null ? void 0 : L.find(
1129
1139
  (B) => B.id === u
1130
- )) == null ? void 0 : A.name, N = va(
1140
+ )) == null ? void 0 : A.name, N = vt(
1131
1141
  g,
1132
1142
  pe(s),
1133
- pe(t),
1143
+ pe(a),
1134
1144
  O,
1135
1145
  F
1136
1146
  );
@@ -1167,7 +1177,7 @@ function bl({
1167
1177
  function E() {
1168
1178
  const h = Ns({
1169
1179
  schemaName: s,
1170
- tableName: t,
1180
+ tableName: a,
1171
1181
  modelName: y,
1172
1182
  connectionType: F
1173
1183
  });
@@ -1178,7 +1188,7 @@ function bl({
1178
1188
  function P() {
1179
1189
  const h = Ns({
1180
1190
  schemaName: s,
1181
- tableName: t,
1191
+ tableName: a,
1182
1192
  modelName: y,
1183
1193
  connectionType: F
1184
1194
  });
@@ -1187,7 +1197,7 @@ function bl({
1187
1197
  return /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-4 px-4", children: [
1188
1198
  /* @__PURE__ */ e.jsxs("div", { className: "mx-2 flex items-center justify-center gap-2", children: [
1189
1199
  /* @__PURE__ */ e.jsxs(
1190
- Na,
1200
+ Nt,
1191
1201
  {
1192
1202
  title: `${M() ? "Remove from" : "Add to"} Assistant Scope`,
1193
1203
  pressed: M(),
@@ -1219,7 +1229,7 @@ function bl({
1219
1229
  variant: "secondary",
1220
1230
  className: "flex",
1221
1231
  children: [
1222
- n !== "Success" ? /* @__PURE__ */ e.jsx(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(ll, { className: "mr-2 size-4" }),
1232
+ n !== "Success" ? /* @__PURE__ */ e.jsx(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(nl, { className: "mr-2 size-4" }),
1223
1233
  "Top 10"
1224
1234
  ]
1225
1235
  }
@@ -1233,7 +1243,7 @@ function bl({
1233
1243
  variant: "secondary",
1234
1244
  className: "w-full",
1235
1245
  children: [
1236
- n !== "Success" ? /* @__PURE__ */ e.jsx(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(nl, { className: "mr-2 size-4" }),
1246
+ n !== "Success" ? /* @__PURE__ */ e.jsx(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(al, { className: "mr-2 size-4" }),
1237
1247
  "Count"
1238
1248
  ]
1239
1249
  }
@@ -1244,19 +1254,19 @@ function bl({
1244
1254
  {
1245
1255
  className: "flex-1 basis-0 border-b border-t border-muted py-3",
1246
1256
  children: [
1247
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-1", children: a == null ? void 0 : a.map((h) => /* @__PURE__ */ e.jsxs(
1257
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-1", children: t == null ? void 0 : t.map((h) => /* @__PURE__ */ e.jsxs(
1248
1258
  "div",
1249
1259
  {
1250
1260
  onClick: () => z(h),
1251
1261
  className: Y(
1252
1262
  "group mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-1 text-sm transition-colors hover:bg-muted/50",
1253
1263
  {
1254
- "border border-dashed border-muted-foreground bg-muted": gt(h, l)
1264
+ "border border-dashed border-muted-foreground bg-muted": ga(h, l)
1255
1265
  }
1256
1266
  ),
1257
1267
  children: [
1258
1268
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
1259
- /* @__PURE__ */ e.jsx(_a, { column: h }),
1269
+ /* @__PURE__ */ e.jsx(_t, { column: h }),
1260
1270
  /* @__PURE__ */ e.jsx("span", { children: h.column_name })
1261
1271
  ] }),
1262
1272
  /* @__PURE__ */ e.jsx(
@@ -1264,7 +1274,7 @@ function bl({
1264
1274
  {
1265
1275
  onClick: (g) => g.stopPropagation(),
1266
1276
  className: "flex items-center justify-end",
1267
- children: ya(h.data_type) && /* @__PURE__ */ e.jsx(jl, { column: h })
1277
+ children: yt(h.data_type) && /* @__PURE__ */ e.jsx(jl, { column: h })
1268
1278
  }
1269
1279
  )
1270
1280
  ]
@@ -1278,9 +1288,9 @@ function bl({
1278
1288
  )
1279
1289
  ] });
1280
1290
  }
1281
- function Ee(s, t) {
1291
+ function Ee(s, a) {
1282
1292
  var Ws, Ks, Qs, Zs, Xs, Ys;
1283
- let a = Ss(() => [], []);
1293
+ let t = Ss(() => [], []);
1284
1294
  const n = Oe().authToken || s, l = m(
1285
1295
  (C) => C.selectedConnectionId
1286
1296
  ), r = m(
@@ -1381,7 +1391,7 @@ function Ee(s, t) {
1381
1391
  }), {
1382
1392
  data: D,
1383
1393
  isLoading: re,
1384
- isFetching: ae,
1394
+ isFetching: te,
1385
1395
  isError: ce,
1386
1396
  refetch: ie
1387
1397
  } = Me({
@@ -1406,7 +1416,7 @@ function Ee(s, t) {
1406
1416
  isLoading: k,
1407
1417
  isFetching: _,
1408
1418
  isError: $,
1409
- refetch: te
1419
+ refetch: ae
1410
1420
  } = Me({
1411
1421
  queryKey: [
1412
1422
  "columns",
@@ -1438,8 +1448,8 @@ function Ee(s, t) {
1438
1448
  // && currentConnection?.type !== 'API', // Only fetch if connectionId, database, and table is present
1439
1449
  });
1440
1450
  ne(() => {
1441
- u(a);
1442
- }, [se, u, a]), ne(() => {
1451
+ u(t);
1452
+ }, [se, u, t]), ne(() => {
1443
1453
  (g === "S3" || g === "API") && (b(""), d(""), j(""), g === "API" && p("api"));
1444
1454
  }, [
1445
1455
  g,
@@ -1461,10 +1471,10 @@ function Ee(s, t) {
1461
1471
  function Te(C) {
1462
1472
  j(C === "none" ? "" : C), C !== "none" && C !== "" && b("");
1463
1473
  }
1464
- N && ((Ks = N == null ? void 0 : N.databases) == null ? void 0 : Ks.length) > 0, W && ((Qs = W == null ? void 0 : W.schemas) == null ? void 0 : Qs.length) > 0, se && ((Zs = se == null ? void 0 : se.columns) == null ? void 0 : Zs.length) > 0 && (a = se.columns.map((C) => ({
1474
+ N && ((Ks = N == null ? void 0 : N.databases) == null ? void 0 : Ks.length) > 0, W && ((Qs = W == null ? void 0 : W.schemas) == null ? void 0 : Qs.length) > 0, se && ((Zs = se == null ? void 0 : se.columns) == null ? void 0 : Zs.length) > 0 && (t = se.columns.map((C) => ({
1465
1475
  ...C,
1466
1476
  data_type: C.data_type.toLowerCase()
1467
- }))), J && (a = []), ($ || z) && (a = []);
1477
+ }))), J && (t = []), ($ || z) && (t = []);
1468
1478
  const me = L == null ? void 0 : L.connections.map(
1469
1479
  (C) => ({
1470
1480
  id: C.id,
@@ -1483,7 +1493,7 @@ function Ee(s, t) {
1483
1493
  })), bs = D == null ? void 0 : D.tables.map((C) => ({
1484
1494
  id: C.table_name,
1485
1495
  name: C.table_name
1486
- })), rt = (Ys = V == null ? void 0 : V.datamodels.find(
1496
+ })), ra = (Ys = V == null ? void 0 : V.datamodels.find(
1487
1497
  (C) => C.id === r
1488
1498
  )) == null ? void 0 : Ys.name;
1489
1499
  return {
@@ -1492,7 +1502,7 @@ function Ee(s, t) {
1492
1502
  isConnectionsError: z,
1493
1503
  modelItems: Pe,
1494
1504
  selectedDatamodelId: r,
1495
- selectedDatamodelName: rt,
1505
+ selectedDatamodelName: ra,
1496
1506
  isModelsLoading: E,
1497
1507
  isModelsError: P,
1498
1508
  databaseItems: js,
@@ -1502,9 +1512,9 @@ function Ee(s, t) {
1502
1512
  isSchemaLoadingOrFetching: le || ue,
1503
1513
  isSchemaError: G,
1504
1514
  tableItems: bs,
1505
- isTableLoadingOrFetching: re || ae,
1515
+ isTableLoadingOrFetching: re || te,
1506
1516
  isTableError: ce,
1507
- columns: a,
1517
+ columns: t,
1508
1518
  isColumnsLoadingOrFetching: k || _,
1509
1519
  isColumnsError: $,
1510
1520
  isNonDbConnection: O,
@@ -1516,20 +1526,20 @@ function Ee(s, t) {
1516
1526
  refetchDatabases: K,
1517
1527
  refetchSchemas: q,
1518
1528
  refetchTables: ie,
1519
- refetchColumns: te,
1529
+ refetchColumns: ae,
1520
1530
  handleConnectionChange: de,
1521
1531
  handleDatamodelChange: Te,
1522
1532
  handleDatabaseChange: I,
1523
1533
  handleSchemaChange: Ie
1524
1534
  };
1525
1535
  }
1526
- function Ha({
1536
+ function Ht({
1527
1537
  ColumnsComponent: s
1528
1538
  }) {
1529
1539
  var _;
1530
- const t = m(
1540
+ const a = m(
1531
1541
  ($) => $.selectedConnectionId
1532
- ), a = m(
1542
+ ), t = m(
1533
1543
  ($) => $.selectedDatamodelId
1534
1544
  ), n = m(
1535
1545
  ($) => $.selectedDatabaseName
@@ -1585,9 +1595,9 @@ function Ha({
1585
1595
  function re() {
1586
1596
  window.location.href = "mailto:support@semaphor.cloud?subject=Help&body=I need help with...";
1587
1597
  }
1588
- function ae() {
1589
- if (!t || P === "S3" || P === "API") return null;
1590
- if (!a || a === "none")
1598
+ function te() {
1599
+ if (!a || P === "S3" || P === "API") return null;
1600
+ if (!t || t === "none")
1591
1601
  return /* @__PURE__ */ e.jsx(
1592
1602
  $e,
1593
1603
  {
@@ -1603,7 +1613,7 @@ function Ha({
1603
1613
  );
1604
1614
  }
1605
1615
  function ce() {
1606
- if (t && !h && (!n || n === "none") && (!a || a === "none"))
1616
+ if (a && !h && (!n || n === "none") && (!t || t === "none"))
1607
1617
  return /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3", children: [
1608
1618
  /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(ke, {}) }),
1609
1619
  /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(U, { children: "OR" }) }),
@@ -1611,7 +1621,7 @@ function Ha({
1611
1621
  ] });
1612
1622
  }
1613
1623
  function ie() {
1614
- if (!t || P === "S3" || P === "API") return null;
1624
+ if (!a || P === "S3" || P === "API") return null;
1615
1625
  if (!n || n === "none")
1616
1626
  return /* @__PURE__ */ e.jsx(
1617
1627
  $e,
@@ -1622,13 +1632,13 @@ function Ha({
1622
1632
  isError: S,
1623
1633
  isLoading: p,
1624
1634
  items: c,
1625
- value: a || "",
1635
+ value: t || "",
1626
1636
  title: "Model"
1627
1637
  }
1628
1638
  );
1629
1639
  }
1630
1640
  function se() {
1631
- return !t || P === "S3" || P === "API" || !n || n === "none" ? null : /* @__PURE__ */ e.jsx(
1641
+ return !a || P === "S3" || P === "API" || !n || n === "none" ? null : /* @__PURE__ */ e.jsx(
1632
1642
  $e,
1633
1643
  {
1634
1644
  refetch: N,
@@ -1643,8 +1653,8 @@ function Ha({
1643
1653
  }
1644
1654
  function k() {
1645
1655
  function $() {
1646
- let te = !1;
1647
- return P === "API" ? (te = !1, te) : ((P === "S3" || t && n && n !== "none" && l) && (te = !0), te);
1656
+ let ae = !1;
1657
+ return P === "API" ? (ae = !1, ae) : ((P === "S3" || a && n && n !== "none" && l) && (ae = !0), ae);
1648
1658
  }
1649
1659
  return $() ? /* @__PURE__ */ e.jsx(
1650
1660
  $e,
@@ -1667,16 +1677,16 @@ function Ha({
1667
1677
  refetch: J,
1668
1678
  items: o,
1669
1679
  title: "Connection",
1670
- value: t || "",
1680
+ value: a || "",
1671
1681
  onChange: K,
1672
1682
  isLoading: d,
1673
1683
  isError: f,
1674
1684
  connectionTooltip: ((_ = o == null ? void 0 : o.find(
1675
- ($) => $.id === t
1685
+ ($) => $.id === a
1676
1686
  )) == null ? void 0 : _.type) || ""
1677
1687
  }
1678
1688
  ),
1679
- ae(),
1689
+ te(),
1680
1690
  ce(),
1681
1691
  ie(),
1682
1692
  se(),
@@ -1691,7 +1701,7 @@ function Ha({
1691
1701
  variant: "secondary",
1692
1702
  className: "w-full",
1693
1703
  children: [
1694
- /* @__PURE__ */ e.jsx(Xn, { className: "mr-2 size-4" }),
1704
+ /* @__PURE__ */ e.jsx(Zn, { className: "mr-2 size-4" }),
1695
1705
  "Help"
1696
1706
  ]
1697
1707
  }
@@ -1699,15 +1709,15 @@ function Ha({
1699
1709
  ] });
1700
1710
  }
1701
1711
  function vl(s) {
1702
- const t = s.toUpperCase().indexOf("WHERE"), a = s.toUpperCase().indexOf("GROUP BY"), n = s.toUpperCase().indexOf("LIMIT"), l = s.toUpperCase().indexOf("ORDER BY");
1712
+ const a = s.toUpperCase().indexOf("WHERE"), t = s.toUpperCase().indexOf("GROUP BY"), n = s.toUpperCase().indexOf("LIMIT"), l = s.toUpperCase().indexOf("ORDER BY");
1703
1713
  let r = s.length;
1704
- if (l !== -1 && (r = l), n !== -1 && n < r && (r = n), t !== -1) {
1705
- const i = s.substring(0, t), o = s.substring(t);
1714
+ if (l !== -1 && (r = l), n !== -1 && n < r && (r = n), a !== -1) {
1715
+ const i = s.substring(0, a), o = s.substring(a);
1706
1716
  return `${i} {{ filters | where }} AND ${o.substring(
1707
1717
  6
1708
1718
  )}`;
1709
- } else if (a !== -1) {
1710
- const i = s.substring(0, a), o = s.substring(a);
1719
+ } else if (t !== -1) {
1720
+ const i = s.substring(0, t), o = s.substring(t);
1711
1721
  return `${i} {{ filters | where }} ${o}`;
1712
1722
  } else {
1713
1723
  const i = s.substring(0, r), o = s.substring(r);
@@ -1716,12 +1726,12 @@ function vl(s) {
1716
1726
  }
1717
1727
  function yl({
1718
1728
  error: s,
1719
- setShowAIDialog: t,
1720
- setUserInputforAI: a,
1729
+ setShowAIDialog: a,
1730
+ setUserInputforAI: t,
1721
1731
  setTriggerAIRun: n
1722
1732
  }) {
1723
1733
  return /* @__PURE__ */ e.jsxs(Vs, { openDelay: 0, children: [
1724
- /* @__PURE__ */ e.jsx(As, { asChild: !0, children: /* @__PURE__ */ e.jsx(T, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(Rn, { className: "h-4 w-4 text-red-500" }) }) }),
1734
+ /* @__PURE__ */ e.jsx(As, { asChild: !0, children: /* @__PURE__ */ e.jsx(T, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(qn, { className: "h-4 w-4 text-red-500" }) }) }),
1725
1735
  /* @__PURE__ */ e.jsx(
1726
1736
  qs,
1727
1737
  {
@@ -1733,12 +1743,12 @@ function yl({
1733
1743
  T,
1734
1744
  {
1735
1745
  onClick: () => {
1736
- t(!0), a(s), n(!0);
1746
+ a(!0), t(s), n(!0);
1737
1747
  },
1738
1748
  size: "sm",
1739
1749
  variant: "outline",
1740
1750
  children: [
1741
- /* @__PURE__ */ e.jsx(Gn, { className: "mr-2 h-4 w-4" }),
1751
+ /* @__PURE__ */ e.jsx(Un, { className: "mr-2 h-4 w-4" }),
1742
1752
  "Debug with AI"
1743
1753
  ]
1744
1754
  }
@@ -1750,8 +1760,8 @@ function yl({
1750
1760
  }
1751
1761
  function Nl({
1752
1762
  userInput: s,
1753
- triggerAIRun: t,
1754
- setTriggerAIRun: a,
1763
+ triggerAIRun: a,
1764
+ setTriggerAIRun: t,
1755
1765
  open: n,
1756
1766
  setOpen: l
1757
1767
  }) {
@@ -1781,7 +1791,7 @@ function Nl({
1781
1791
  handleInputChange: J,
1782
1792
  handleSubmit: K,
1783
1793
  stop: W
1784
- } = jt({
1794
+ } = ja({
1785
1795
  api: "https://semaphor.cloud/api/v1/assistant",
1786
1796
  headers: {
1787
1797
  Authorization: `Bearer ${d == null ? void 0 : d.accessToken}`
@@ -1797,16 +1807,16 @@ function Nl({
1797
1807
  }
1798
1808
  });
1799
1809
  ne(() => {
1800
- t && s && (J({
1810
+ a && s && (J({
1801
1811
  target: { value: s }
1802
1812
  }), setTimeout(() => {
1803
- K(), a(!1);
1813
+ K(), t(!1);
1804
1814
  }, 100));
1805
1815
  }, [
1806
- t,
1816
+ a,
1807
1817
  K,
1808
1818
  s,
1809
- a,
1819
+ t,
1810
1820
  J
1811
1821
  ]);
1812
1822
  const le = Ue(n);
@@ -1830,7 +1840,7 @@ function Nl({
1830
1840
  } : k);
1831
1841
  }
1832
1842
  function G(k) {
1833
- const _ = bt(o, k);
1843
+ const _ = ba(o, k);
1834
1844
  re(_);
1835
1845
  }
1836
1846
  async function q({
@@ -1876,7 +1886,7 @@ function Nl({
1876
1886
  }
1877
1887
  ]);
1878
1888
  }
1879
- function ae() {
1889
+ function te() {
1880
1890
  const k = {
1881
1891
  databaseName: L || "",
1882
1892
  schemaName: M || "",
@@ -1884,7 +1894,7 @@ function Nl({
1884
1894
  datamodelName: E || "",
1885
1895
  connectionId: z || "",
1886
1896
  connectionType: P || ""
1887
- }, _ = sa([...o, k]);
1897
+ }, _ = st([...o, k]);
1888
1898
  re(_);
1889
1899
  }
1890
1900
  function ce() {
@@ -1895,17 +1905,17 @@ function Nl({
1895
1905
  datamodelName: E || "",
1896
1906
  connectionId: z || "",
1897
1907
  connectionType: P || ""
1898
- }, _ = vt(
1908
+ }, _ = va(
1899
1909
  [...V || [], ...o],
1900
1910
  k
1901
1911
  );
1902
1912
  if (console.log("isInScope", _), !_ || o.length === 0) {
1903
- const $ = sa([
1913
+ const $ = st([
1904
1914
  ...V || [],
1905
1915
  ...o,
1906
1916
  k
1907
1917
  ]).filter(
1908
- (te) => te.connectionId === k.connectionId
1918
+ (ae) => ae.connectionId === k.connectionId
1909
1919
  );
1910
1920
  re($);
1911
1921
  }
@@ -1923,7 +1933,7 @@ function Nl({
1923
1933
  isLoading: se,
1924
1934
  handleRun: ie,
1925
1935
  handleOpenDialogAndSetScope: ce,
1926
- handleAddCurrentTableToScope: ae,
1936
+ handleAddCurrentTableToScope: te,
1927
1937
  removeFromCurrentSelections: G,
1928
1938
  currentScope: o,
1929
1939
  setCurrentScope: c,
@@ -1940,8 +1950,8 @@ function Nl({
1940
1950
  const Cl = !1;
1941
1951
  function Sl({
1942
1952
  open: s,
1943
- setOpen: t,
1944
- userInput: a,
1953
+ setOpen: a,
1954
+ userInput: t,
1945
1955
  triggerAIRun: n,
1946
1956
  setTriggerAIRun: l
1947
1957
  }) {
@@ -1966,18 +1976,18 @@ function Sl({
1966
1976
  toolStatus: O,
1967
1977
  llmUsage: N
1968
1978
  } = Nl({
1969
- userInput: a,
1979
+ userInput: t,
1970
1980
  triggerAIRun: n,
1971
1981
  setTriggerAIRun: l,
1972
1982
  open: s,
1973
- setOpen: t
1983
+ setOpen: a
1974
1984
  });
1975
1985
  function A() {
1976
1986
  return /* @__PURE__ */ e.jsxs(Fs, { children: [
1977
1987
  /* @__PURE__ */ e.jsx(Ls, { children: /* @__PURE__ */ e.jsx(Bs, { className: "size-3.5 text-muted-foreground/70 hover:text-muted-foreground" }) }),
1978
1988
  /* @__PURE__ */ e.jsxs(Es, { align: "end", children: [
1979
- /* @__PURE__ */ e.jsx(ma, { children: "Options" }),
1980
- /* @__PURE__ */ e.jsx(xa, {}),
1989
+ /* @__PURE__ */ e.jsx(mt, { children: "Options" }),
1990
+ /* @__PURE__ */ e.jsx(xt, {}),
1981
1991
  /* @__PURE__ */ e.jsx(
1982
1992
  vs,
1983
1993
  {
@@ -2005,7 +2015,7 @@ function Sl({
2005
2015
  ] })
2006
2016
  ] });
2007
2017
  }
2008
- return /* @__PURE__ */ e.jsxs(zs, { open: s, onOpenChange: t, children: [
2018
+ return /* @__PURE__ */ e.jsxs(zs, { open: s, onOpenChange: a, children: [
2009
2019
  /* @__PURE__ */ e.jsx(Os, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2010
2020
  T,
2011
2021
  {
@@ -2088,7 +2098,7 @@ function Sl({
2088
2098
  className: "h-[625px] w-full overflow-auto border-t border-t-muted",
2089
2099
  children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 py-2 pr-3", role: "messages", children: [
2090
2100
  /* @__PURE__ */ e.jsx(
2091
- yt,
2101
+ ya,
2092
2102
  {
2093
2103
  messages: j,
2094
2104
  showTools: o,
@@ -2097,9 +2107,9 @@ function Sl({
2097
2107
  }
2098
2108
  ),
2099
2109
  /* @__PURE__ */ e.jsx(
2100
- Nt,
2110
+ Na,
2101
2111
  {
2102
- status: Ct(g, O),
2112
+ status: Ca(g, O),
2103
2113
  isLoading: f
2104
2114
  }
2105
2115
  )
@@ -2107,7 +2117,7 @@ function Sl({
2107
2117
  }
2108
2118
  ),
2109
2119
  /* @__PURE__ */ e.jsx(
2110
- St,
2120
+ Sa,
2111
2121
  {
2112
2122
  stop: h,
2113
2123
  ref: V,
@@ -2131,120 +2141,120 @@ function Sl({
2131
2141
  ] })
2132
2142
  ] });
2133
2143
  }
2134
- var Pa = {
2144
+ var Pt = {
2135
2145
  color: void 0,
2136
2146
  size: void 0,
2137
2147
  className: void 0,
2138
2148
  style: void 0,
2139
2149
  attr: void 0
2140
- }, ia = ze.createContext && /* @__PURE__ */ ze.createContext(Pa), wl = ["attr", "size", "title"];
2141
- function kl(s, t) {
2150
+ }, it = ze.createContext && /* @__PURE__ */ ze.createContext(Pt), wl = ["attr", "size", "title"];
2151
+ function kl(s, a) {
2142
2152
  if (s == null) return {};
2143
- var a = zl(s, t), n, l;
2153
+ var t = zl(s, a), n, l;
2144
2154
  if (Object.getOwnPropertySymbols) {
2145
2155
  var r = Object.getOwnPropertySymbols(s);
2146
2156
  for (l = 0; l < r.length; l++)
2147
- n = r[l], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(s, n) && (a[n] = s[n]);
2157
+ n = r[l], !(a.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(s, n) && (t[n] = s[n]);
2148
2158
  }
2149
- return a;
2159
+ return t;
2150
2160
  }
2151
- function zl(s, t) {
2161
+ function zl(s, a) {
2152
2162
  if (s == null) return {};
2153
- var a = {};
2163
+ var t = {};
2154
2164
  for (var n in s)
2155
2165
  if (Object.prototype.hasOwnProperty.call(s, n)) {
2156
- if (t.indexOf(n) >= 0) continue;
2157
- a[n] = s[n];
2166
+ if (a.indexOf(n) >= 0) continue;
2167
+ t[n] = s[n];
2158
2168
  }
2159
- return a;
2169
+ return t;
2160
2170
  }
2161
2171
  function os() {
2162
2172
  return os = Object.assign ? Object.assign.bind() : function(s) {
2163
- for (var t = 1; t < arguments.length; t++) {
2164
- var a = arguments[t];
2165
- for (var n in a)
2166
- Object.prototype.hasOwnProperty.call(a, n) && (s[n] = a[n]);
2173
+ for (var a = 1; a < arguments.length; a++) {
2174
+ var t = arguments[a];
2175
+ for (var n in t)
2176
+ Object.prototype.hasOwnProperty.call(t, n) && (s[n] = t[n]);
2167
2177
  }
2168
2178
  return s;
2169
2179
  }, os.apply(this, arguments);
2170
2180
  }
2171
- function oa(s, t) {
2172
- var a = Object.keys(s);
2181
+ function ot(s, a) {
2182
+ var t = Object.keys(s);
2173
2183
  if (Object.getOwnPropertySymbols) {
2174
2184
  var n = Object.getOwnPropertySymbols(s);
2175
- t && (n = n.filter(function(l) {
2185
+ a && (n = n.filter(function(l) {
2176
2186
  return Object.getOwnPropertyDescriptor(s, l).enumerable;
2177
- })), a.push.apply(a, n);
2187
+ })), t.push.apply(t, n);
2178
2188
  }
2179
- return a;
2189
+ return t;
2180
2190
  }
2181
2191
  function cs(s) {
2182
- for (var t = 1; t < arguments.length; t++) {
2183
- var a = arguments[t] != null ? arguments[t] : {};
2184
- t % 2 ? oa(Object(a), !0).forEach(function(n) {
2185
- Ol(s, n, a[n]);
2186
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(a)) : oa(Object(a)).forEach(function(n) {
2187
- Object.defineProperty(s, n, Object.getOwnPropertyDescriptor(a, n));
2192
+ for (var a = 1; a < arguments.length; a++) {
2193
+ var t = arguments[a] != null ? arguments[a] : {};
2194
+ a % 2 ? ot(Object(t), !0).forEach(function(n) {
2195
+ Ol(s, n, t[n]);
2196
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(t)) : ot(Object(t)).forEach(function(n) {
2197
+ Object.defineProperty(s, n, Object.getOwnPropertyDescriptor(t, n));
2188
2198
  });
2189
2199
  }
2190
2200
  return s;
2191
2201
  }
2192
- function Ol(s, t, a) {
2193
- return t = Il(t), t in s ? Object.defineProperty(s, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[t] = a, s;
2202
+ function Ol(s, a, t) {
2203
+ return a = Il(a), a in s ? Object.defineProperty(s, a, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : s[a] = t, s;
2194
2204
  }
2195
2205
  function Il(s) {
2196
- var t = Tl(s, "string");
2197
- return typeof t == "symbol" ? t : t + "";
2206
+ var a = Tl(s, "string");
2207
+ return typeof a == "symbol" ? a : a + "";
2198
2208
  }
2199
- function Tl(s, t) {
2209
+ function Tl(s, a) {
2200
2210
  if (typeof s != "object" || !s) return s;
2201
- var a = s[Symbol.toPrimitive];
2202
- if (a !== void 0) {
2203
- var n = a.call(s, t);
2211
+ var t = s[Symbol.toPrimitive];
2212
+ if (t !== void 0) {
2213
+ var n = t.call(s, a);
2204
2214
  if (typeof n != "object") return n;
2205
2215
  throw new TypeError("@@toPrimitive must return a primitive value.");
2206
2216
  }
2207
- return (t === "string" ? String : Number)(s);
2217
+ return (a === "string" ? String : Number)(s);
2208
2218
  }
2209
- function $a(s) {
2210
- return s && s.map((t, a) => /* @__PURE__ */ ze.createElement(t.tag, cs({
2211
- key: a
2212
- }, t.attr), $a(t.child)));
2219
+ function $t(s) {
2220
+ return s && s.map((a, t) => /* @__PURE__ */ ze.createElement(a.tag, cs({
2221
+ key: t
2222
+ }, a.attr), $t(a.child)));
2213
2223
  }
2214
2224
  function xe(s) {
2215
- return (t) => /* @__PURE__ */ ze.createElement(Ml, os({
2225
+ return (a) => /* @__PURE__ */ ze.createElement(Ml, os({
2216
2226
  attr: cs({}, s.attr)
2217
- }, t), $a(s.child));
2227
+ }, a), $t(s.child));
2218
2228
  }
2219
2229
  function Ml(s) {
2220
- var t = (a) => {
2230
+ var a = (t) => {
2221
2231
  var {
2222
2232
  attr: n,
2223
2233
  size: l,
2224
2234
  title: r
2225
- } = s, i = kl(s, wl), o = l || a.size || "1em", c;
2226
- return a.className && (c = a.className), s.className && (c = (c ? c + " " : "") + s.className), /* @__PURE__ */ ze.createElement("svg", os({
2235
+ } = s, i = kl(s, wl), o = l || t.size || "1em", c;
2236
+ return t.className && (c = t.className), s.className && (c = (c ? c + " " : "") + s.className), /* @__PURE__ */ ze.createElement("svg", os({
2227
2237
  stroke: "currentColor",
2228
2238
  fill: "currentColor",
2229
2239
  strokeWidth: "0"
2230
- }, a.attr, n, i, {
2240
+ }, t.attr, n, i, {
2231
2241
  className: c,
2232
2242
  style: cs(cs({
2233
- color: s.color || a.color
2234
- }, a.style), s.style),
2243
+ color: s.color || t.color
2244
+ }, t.style), s.style),
2235
2245
  height: o,
2236
2246
  width: o,
2237
2247
  xmlns: "http://www.w3.org/2000/svg"
2238
2248
  }), r && /* @__PURE__ */ ze.createElement("title", null, r), s.children);
2239
2249
  };
2240
- return ia !== void 0 ? /* @__PURE__ */ ze.createElement(ia.Consumer, null, (a) => t(a)) : t(Pa);
2250
+ return it !== void 0 ? /* @__PURE__ */ ze.createElement(it.Consumer, null, (t) => a(t)) : a(Pt);
2241
2251
  }
2242
2252
  function Dl(s) {
2243
2253
  return xe({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(s);
2244
2254
  }
2245
2255
  function Fl({ sql: s }) {
2246
2256
  return /* @__PURE__ */ e.jsxs(Vs, { children: [
2247
- /* @__PURE__ */ e.jsx(As, { asChild: !0, children: /* @__PURE__ */ e.jsx(T, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(wt, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2257
+ /* @__PURE__ */ e.jsx(As, { asChild: !0, children: /* @__PURE__ */ e.jsx(T, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(wa, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2248
2258
  /* @__PURE__ */ e.jsx(
2249
2259
  qs,
2250
2260
  {
@@ -2258,10 +2268,10 @@ function Fl({ sql: s }) {
2258
2268
  )
2259
2269
  ] });
2260
2270
  }
2261
- function Ba(s) {
2262
- const { theme: t } = kt(), a = w((f) => f.theme), n = m((f) => f.frame), l = m((f) => f.card), r = m((f) => f.activeTabCardId), i = zt(), { refetch: o } = Fe(l), { updateCardTab: c, setRunSql: u } = oe(), x = Ue(), j = Ue({}), b = n.cards.find((f) => f.id === r), d = Fa(() => {
2271
+ function Bt(s) {
2272
+ const { theme: a } = ka(), t = w((f) => f.theme), n = m((f) => f.frame), l = m((f) => f.card), r = m((f) => f.activeTabCardId), i = za(), { refetch: o } = Fe(l), { updateCardTab: c, setRunSql: u } = oe(), x = Ue(), j = Ue({}), b = n.cards.find((f) => f.id === r), d = Ft(() => {
2263
2273
  let f = "";
2264
- return s === "python" && (f = (b == null ? void 0 : b.python) || Ca), s === "sql" && (f = (b == null ? void 0 : b.sql) || ""), f;
2274
+ return s === "python" && (f = (b == null ? void 0 : b.python) || Ct), s === "sql" && (f = (b == null ? void 0 : b.sql) || ""), f;
2265
2275
  }, [s, b]);
2266
2276
  ne(() => {
2267
2277
  if (r && l.id && l.id !== r) {
@@ -2287,21 +2297,21 @@ function Ba(s) {
2287
2297
  d
2288
2298
  ]), ne(() => {
2289
2299
  if (!i) return;
2290
- const f = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", S = a === "system" ? f : a;
2300
+ const f = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", S = t === "system" ? f : t;
2291
2301
  i.editor.defineTheme("default", {
2292
2302
  // base: theme === 'light' ? 'hc-light' : 'vs-dark',
2293
2303
  base: S === "light" ? "vs" : "vs-dark",
2294
2304
  inherit: !0,
2295
2305
  rules: [],
2296
2306
  colors: {
2297
- "editor.background": S === "light" ? "#ffffff" : Ot("240 10% 10%")
2307
+ "editor.background": S === "light" ? "#ffffff" : Oa("240 10% 10%")
2298
2308
  // 'editor.background':
2299
2309
  // activeTheme === 'light'
2300
2310
  // ? '#ffffff'
2301
2311
  // : getCssVariableValue('--semaphor-background'),
2302
2312
  }
2303
2313
  }), i.editor.setTheme("default");
2304
- }, [t, a, i]), ne(() => {
2314
+ }, [a, t, i]), ne(() => {
2305
2315
  const f = x.current;
2306
2316
  f && i && l && f.addCommand(
2307
2317
  i.KeyMod.Shift | i.KeyCode.Enter,
@@ -2320,9 +2330,9 @@ function Ba(s) {
2320
2330
  return { handleEditorDidMount: p };
2321
2331
  }
2322
2332
  function Ll() {
2323
- const s = m((i) => i.card.sql), t = m((i) => i.sqlGen), { setCardSql: a, setSqlGen: n } = oe(), { handleEditorDidMount: l } = Ba("sql");
2333
+ const s = m((i) => i.card.sql), a = m((i) => i.sqlGen), { setCardSql: t, setSqlGen: n } = oe(), { handleEditorDidMount: l } = Bt("sql");
2324
2334
  function r(i) {
2325
- a(i), It(t) || n({});
2335
+ t(i), Ia(a) || n({});
2326
2336
  }
2327
2337
  return /* @__PURE__ */ e.jsx(
2328
2338
  us,
@@ -2349,9 +2359,9 @@ function Ll() {
2349
2359
  );
2350
2360
  }
2351
2361
  function El() {
2352
- const s = m((l) => l.card.python), { setCardPython: t } = oe(), { handleEditorDidMount: a } = Ba("python");
2362
+ const s = m((l) => l.card.python), { setCardPython: a } = oe(), { handleEditorDidMount: t } = Bt("python");
2353
2363
  function n(l) {
2354
- t(l);
2364
+ a(l);
2355
2365
  }
2356
2366
  return /* @__PURE__ */ e.jsx(
2357
2367
  us,
@@ -2359,7 +2369,7 @@ function El() {
2359
2369
  className: "pt-3",
2360
2370
  theme: "default",
2361
2371
  onChange: n,
2362
- value: s || Ca,
2372
+ value: s || Ct,
2363
2373
  options: {
2364
2374
  minimap: {
2365
2375
  enabled: !1
@@ -2373,15 +2383,15 @@ function El() {
2373
2383
  renderLineHighlight: "none"
2374
2384
  },
2375
2385
  defaultLanguage: "python",
2376
- onMount: a
2386
+ onMount: t
2377
2387
  }
2378
2388
  );
2379
2389
  }
2380
2390
  function Vl() {
2381
- const s = w((r) => r.dashboard.filters), t = w((r) => r.filterValues), a = w((r) => r.selectedSheetId), n = s == null ? void 0 : s.filter(
2382
- (r) => r.sheetId === a || !r.sheetId
2383
- ), l = t == null ? void 0 : t.filter(
2384
- (r) => (n == null ? void 0 : n.some((i) => i.id === r.filterId)) || r.filterId.endsWith(a)
2391
+ const s = w((r) => r.dashboard.filters), a = w((r) => r.filterValues), t = w((r) => r.selectedSheetId), n = s == null ? void 0 : s.filter(
2392
+ (r) => r.sheetId === t || !r.sheetId
2393
+ ), l = a == null ? void 0 : a.filter(
2394
+ (r) => (n == null ? void 0 : n.some((i) => i.id === r.filterId)) || r.filterId.endsWith(t)
2385
2395
  );
2386
2396
  return /* @__PURE__ */ e.jsx(
2387
2397
  us,
@@ -2410,10 +2420,10 @@ function Vl() {
2410
2420
  }
2411
2421
  function Al() {
2412
2422
  var Ie;
2413
- const [s, t] = R({
2423
+ const [s, a] = R({
2414
2424
  queryKey: [],
2415
2425
  queryData: null
2416
- }), a = Tt(), [n, l] = R(!1), [r, i] = R(!1), [o, c] = R(!1), [u, x] = R(""), [j, b] = R(!1), d = m((I) => I.frame), p = m((I) => I.card), f = m((I) => I.isShowingVisual), S = m(
2426
+ }), t = Ta(), [n, l] = R(!1), [r, i] = R(!1), [o, c] = R(!1), [u, x] = R(""), [j, b] = R(!1), d = m((I) => I.frame), p = m((I) => I.card), f = m((I) => I.isShowingVisual), S = m(
2417
2427
  (I) => I.selectedConnectionId
2418
2428
  ), v = m(
2419
2429
  (I) => I.selectedDatabaseName
@@ -2440,7 +2450,7 @@ function Al() {
2440
2450
  isLoading: q,
2441
2451
  isFetching: D,
2442
2452
  isSuccess: re,
2443
- isError: ae,
2453
+ isError: te,
2444
2454
  error: ce,
2445
2455
  queryKey: ie,
2446
2456
  refetch: se
@@ -2454,27 +2464,27 @@ function Al() {
2454
2464
  E(I);
2455
2465
  }
2456
2466
  }, [G, E, h]), ne(() => {
2457
- (q || D) && ue(!0), (ae || re) && ue(!1), ae && (E([]), h(""));
2467
+ (q || D) && ue(!0), (te || re) && ue(!1), te && (E([]), h(""));
2458
2468
  }, [
2459
2469
  q,
2460
2470
  D,
2461
2471
  G,
2462
2472
  h,
2463
- ae,
2473
+ te,
2464
2474
  re,
2465
2475
  ue,
2466
2476
  E,
2467
2477
  // setQueryError,
2468
2478
  ce
2469
2479
  ]), ne(() => {
2470
- K && (a.getQueryData(ie) || se(), W(!1));
2471
- }, [K, se, W, ie, a]);
2480
+ K && (t.getQueryData(ie) || se(), W(!1));
2481
+ }, [K, se, W, ie, t]);
2472
2482
  function k() {
2473
- const I = a.getQueryData(ie);
2474
- s.queryData || t({
2483
+ const I = t.getQueryData(ie);
2484
+ s.queryData || a({
2475
2485
  queryKey: ie,
2476
2486
  queryData: I
2477
- }), a.setQueryData(ie, null), a.removeQueries({ queryKey: ie, exact: !0 }), P(""), J({}), N(""), le(void 0), V(""), g({}), O("bar");
2487
+ }), t.setQueryData(ie, null), t.removeQueries({ queryKey: ie, exact: !0 }), P(""), J({}), N(""), le(void 0), V(""), g({}), O("bar");
2478
2488
  }
2479
2489
  function _(I, de) {
2480
2490
  if (I.length === 0)
@@ -2518,9 +2528,9 @@ function Al() {
2518
2528
  };
2519
2529
  A == null || A(me);
2520
2530
  }
2521
- function te() {
2531
+ function ae() {
2522
2532
  const { queryKey: I, queryData: de } = s;
2523
- I && de && a.setQueryData(I, de), J({}), B == null || B();
2533
+ I && de && t.setQueryData(I, de), J({}), B == null || B();
2524
2534
  }
2525
2535
  function Ae() {
2526
2536
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
@@ -2545,7 +2555,7 @@ function Al() {
2545
2555
  }
2546
2556
  ),
2547
2557
  !r && /* @__PURE__ */ e.jsx(
2548
- fa,
2558
+ ft,
2549
2559
  {
2550
2560
  onClick: () => i(!0),
2551
2561
  className: Y(
@@ -2644,12 +2654,12 @@ function Al() {
2644
2654
  size: "sm",
2645
2655
  variant: "outline",
2646
2656
  children: [
2647
- q || D ? /* @__PURE__ */ e.jsx(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Mt, { className: "mr-2 h-4 w-4" }),
2657
+ q || D ? /* @__PURE__ */ e.jsx(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Ma, { className: "mr-2 h-4 w-4" }),
2648
2658
  "Run"
2649
2659
  ]
2650
2660
  }
2651
2661
  ),
2652
- (ae || (G == null ? void 0 : G.error)) && /* @__PURE__ */ e.jsx(
2662
+ (te || (G == null ? void 0 : G.error)) && /* @__PURE__ */ e.jsx(
2653
2663
  yl,
2654
2664
  {
2655
2665
  error: (ce == null ? void 0 : ce.message) || ((Ie = G == null ? void 0 : G.error) == null ? void 0 : Ie.message),
@@ -2666,13 +2676,13 @@ function Al() {
2666
2676
  size: "sm",
2667
2677
  variant: "outline",
2668
2678
  children: [
2669
- /* @__PURE__ */ e.jsx(Pn, { className: "mr-2 size-4" }),
2679
+ /* @__PURE__ */ e.jsx(Hn, { className: "mr-2 size-4" }),
2670
2680
  "Clear"
2671
2681
  ]
2672
2682
  }
2673
2683
  ),
2674
2684
  /* @__PURE__ */ e.jsx(
2675
- Na,
2685
+ Nt,
2676
2686
  {
2677
2687
  pressed: n,
2678
2688
  onPressedChange: (I) => l(I),
@@ -2698,7 +2708,7 @@ function Al() {
2698
2708
  /* @__PURE__ */ e.jsxs(
2699
2709
  T,
2700
2710
  {
2701
- onClick: te,
2711
+ onClick: ae,
2702
2712
  className: "w-full",
2703
2713
  size: "sm",
2704
2714
  variant: "outline",
@@ -2715,7 +2725,7 @@ function Al() {
2715
2725
  size: "sm",
2716
2726
  variant: "outline",
2717
2727
  children: [
2718
- /* @__PURE__ */ e.jsx(Dt, { className: "mr-2 size-4 font-bold text-green-600" }),
2728
+ /* @__PURE__ */ e.jsx(Da, { className: "mr-2 size-4 font-bold text-green-600" }),
2719
2729
  "Accept"
2720
2730
  ]
2721
2731
  }
@@ -2731,7 +2741,7 @@ function Al() {
2731
2741
  }
2732
2742
  function ql({ data: s }) {
2733
2743
  var i;
2734
- const [t, a] = ze.useState([]), l = Object.keys(s[0]).map((o) => ({
2744
+ const [a, t] = ze.useState([]), l = Object.keys(s[0]).map((o) => ({
2735
2745
  // header: key,
2736
2746
  accessorKey: o,
2737
2747
  header: ({ column: c }) => {
@@ -2743,55 +2753,55 @@ function ql({ data: s }) {
2743
2753
  onClick: () => c.toggleSorting(c.getIsSorted() === "asc"),
2744
2754
  children: [
2745
2755
  o,
2746
- u === "asc" ? /* @__PURE__ */ e.jsx(Ft, { className: "ml-2 h-5 w-5" }) : u === "desc" ? /* @__PURE__ */ e.jsx(Lt, { className: "ml-2 h-5 w-5" }) : null
2756
+ u === "asc" ? /* @__PURE__ */ e.jsx(Fa, { className: "ml-2 h-5 w-5" }) : u === "desc" ? /* @__PURE__ */ e.jsx(La, { className: "ml-2 h-5 w-5" }) : null
2747
2757
  ]
2748
2758
  }
2749
2759
  ) });
2750
2760
  }
2751
- })), r = Et({
2761
+ })), r = Ea({
2752
2762
  data: s,
2753
2763
  columns: l,
2754
- getCoreRowModel: Ht(),
2755
- getPaginationRowModel: _t(),
2756
- onSortingChange: a,
2757
- getSortedRowModel: Rt(),
2764
+ getCoreRowModel: Ha(),
2765
+ getPaginationRowModel: _a(),
2766
+ onSortingChange: t,
2767
+ getSortedRowModel: Ra(),
2758
2768
  manualPagination: !0,
2759
2769
  state: {
2760
- sorting: t
2770
+ sorting: a
2761
2771
  }
2762
2772
  });
2763
2773
  return /* @__PURE__ */ e.jsx("div", { className: "font-mono text-xs text-foreground/95", children: /* @__PURE__ */ e.jsxs("table", { className: "w-full", children: [
2764
- /* @__PURE__ */ e.jsx(Vt, { children: r.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(ys, { children: o.headers.map((c) => /* @__PURE__ */ e.jsx(
2765
- At,
2774
+ /* @__PURE__ */ e.jsx(Va, { children: r.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(ys, { children: o.headers.map((c) => /* @__PURE__ */ e.jsx(
2775
+ Aa,
2766
2776
  {
2767
2777
  className: "sticky top-0 h-11 bg-muted font-semibold",
2768
- children: c.isPlaceholder ? null : aa(
2778
+ children: c.isPlaceholder ? null : tt(
2769
2779
  c.column.columnDef.header,
2770
2780
  c.getContext()
2771
2781
  )
2772
2782
  },
2773
2783
  c.id
2774
2784
  )) }, o.id)) }),
2775
- /* @__PURE__ */ e.jsx(qt, { children: (i = r.getRowModel().rows) != null && i.length ? r.getRowModel().rows.map((o) => /* @__PURE__ */ e.jsx(
2785
+ /* @__PURE__ */ e.jsx(qa, { children: (i = r.getRowModel().rows) != null && i.length ? r.getRowModel().rows.map((o) => /* @__PURE__ */ e.jsx(
2776
2786
  ys,
2777
2787
  {
2778
2788
  className: "whitespace-nowrap py-2",
2779
2789
  "data-state": o.getIsSelected() && "selected",
2780
- children: o.getVisibleCells().map((c) => /* @__PURE__ */ e.jsx(ta, { className: "py-3", children: aa(c.column.columnDef.cell, c.getContext()) }, c.id))
2790
+ children: o.getVisibleCells().map((c) => /* @__PURE__ */ e.jsx(at, { className: "py-3", children: tt(c.column.columnDef.cell, c.getContext()) }, c.id))
2781
2791
  },
2782
2792
  o.id
2783
- )) : /* @__PURE__ */ e.jsx(ys, { children: /* @__PURE__ */ e.jsx(ta, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
2793
+ )) : /* @__PURE__ */ e.jsx(ys, { children: /* @__PURE__ */ e.jsx(at, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
2784
2794
  ] }) });
2785
2795
  }
2786
2796
  function Rl({ card: s }) {
2787
2797
  var F, L, y, z, M, V, E, P, h, g, O;
2788
- const [t, a] = R(!1), [n, l] = R(
2798
+ const [a, t] = R(!1), [n, l] = R(
2789
2799
  []
2790
- ), { authToken: r } = Oe(), i = Pt(r == null ? void 0 : r.accessToken), o = w((N) => N.themeStyle), c = {
2800
+ ), { authToken: r } = Oe(), i = Pa(r == null ? void 0 : r.accessToken), o = w((N) => N.themeStyle), c = {
2791
2801
  colors: ((L = (F = o == null ? void 0 : o.chart) == null ? void 0 : F.dataset) == null ? void 0 : L.backgroundColor) || []
2792
2802
  };
2793
2803
  (y = s.customCardPreferences) != null && y.inputData;
2794
- const { getCard: u } = Sa(((z = s.customCardPreferences) == null ? void 0 : z.url) || ""), x = ((M = s.customCardPreferences) == null ? void 0 : M.visualType) || "single", j = m((N) => N.frame), { setCustomCardPreferences: b } = oe(), { data: d } = Fe(s), p = Fa((N, A) => {
2804
+ const { getCard: u } = St(((z = s.customCardPreferences) == null ? void 0 : z.url) || ""), x = ((M = s.customCardPreferences) == null ? void 0 : M.visualType) || "single", j = m((N) => N.frame), { setCustomCardPreferences: b } = oe(), { data: d } = Fe(s), p = Ft((N, A) => {
2795
2805
  l((B) => ({
2796
2806
  ...B,
2797
2807
  [N]: A
@@ -2803,7 +2813,7 @@ function Rl({ card: s }) {
2803
2813
  (E = s.customCardPreferences) == null ? void 0 : E.componentName
2804
2814
  );
2805
2815
  function S(N) {
2806
- a(N);
2816
+ t(N);
2807
2817
  }
2808
2818
  const v = Object.keys(
2809
2819
  ((P = s.customCardPreferences) == null ? void 0 : P.dataInputCardIds) || {}
@@ -2813,7 +2823,7 @@ function Rl({ card: s }) {
2813
2823
  return B || null;
2814
2824
  });
2815
2825
  return /* @__PURE__ */ e.jsx("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ e.jsxs(
2816
- En,
2826
+ Ln,
2817
2827
  {
2818
2828
  fallback: /* @__PURE__ */ e.jsx(e.Fragment, {}),
2819
2829
  children: [
@@ -2837,7 +2847,7 @@ function Rl({ card: s }) {
2837
2847
  );
2838
2848
  if (B)
2839
2849
  return /* @__PURE__ */ e.jsx(
2840
- $t,
2850
+ $a,
2841
2851
  {
2842
2852
  onLoadingStatus: S,
2843
2853
  onDataChange: p,
@@ -2867,24 +2877,24 @@ function Rl({ card: s }) {
2867
2877
  (O = s.customCardPreferences) == null ? void 0 : O.componentName
2868
2878
  ) });
2869
2879
  }
2870
- function Ua({
2880
+ function Ut({
2871
2881
  // card,
2872
2882
  // showCard,
2873
2883
  className: s,
2874
- ...t
2884
+ ...a
2875
2885
  }) {
2876
2886
  var S;
2877
- const a = m((v) => v.card), n = ((S = a.customCardPreferences) == null ? void 0 : S.showCardHeader) ?? !0, l = m((v) => v.frame), r = w((v) => v.dashboard.filters);
2887
+ const t = m((v) => v.card), n = ((S = t.customCardPreferences) == null ? void 0 : S.showCardHeader) ?? !0, l = m((v) => v.frame), r = w((v) => v.dashboard.filters);
2878
2888
  m((v) => v.actions.setRunSql);
2879
- const { updateFilter: i } = Ze(), o = r == null ? void 0 : r.find((v) => v.id === l.filterId), { data: c, isLoading: u, isFetching: x } = Fe(a), { setCard: j } = oe(), { data: b } = Rs(a);
2880
- if (!a.id) return null;
2889
+ const { updateFilter: i } = Ze(), o = r == null ? void 0 : r.find((v) => v.id === l.filterId), { data: c, isLoading: u, isFetching: x } = Fe(t), { setCard: j } = oe(), { data: b } = Rs(t);
2890
+ if (!t.id) return null;
2881
2891
  let d;
2882
- c != null && c.records && (c == null ? void 0 : c.records.length) > 0 && (d = wa({
2892
+ c != null && c.records && (c == null ? void 0 : c.records.length) > 0 && (d = wt({
2883
2893
  data: c == null ? void 0 : c.records,
2884
- cardType: a.type,
2885
- cfg: a.cfg,
2886
- customCfg: a.customCfg,
2887
- preferences: a.preferences,
2894
+ cardType: t.type,
2895
+ cfg: t.cfg,
2896
+ customCfg: t.customCfg,
2897
+ preferences: t.preferences,
2888
2898
  topoJson: b
2889
2899
  }));
2890
2900
  function p(v) {
@@ -2894,56 +2904,56 @@ function Ua({
2894
2904
  var v;
2895
2905
  if (c != null && c.records && (c == null ? void 0 : c.records.length) === 0 && !u && !x)
2896
2906
  return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [
2897
- /* @__PURE__ */ e.jsx(Kt, { className: "size-8 text-muted-foreground" }),
2907
+ /* @__PURE__ */ e.jsx(Ka, { className: "size-8 text-muted-foreground" }),
2898
2908
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "No records to display" })
2899
2909
  ] });
2900
- if (a.type === "custom")
2901
- return p(a);
2902
- if (!["table", "custom"].includes(a.type) && d)
2910
+ if (t.type === "custom")
2911
+ return p(t);
2912
+ if (!["table", "custom"].includes(t.type) && d)
2903
2913
  return /* @__PURE__ */ e.jsx(
2904
- Qt,
2914
+ Qa,
2905
2915
  {
2906
2916
  cfg: d
2907
2917
  },
2908
- JSON.stringify(d) + JSON.stringify(a.preferences) + ((v = a == null ? void 0 : a.preferences) == null ? void 0 : v.customVisualCode)
2918
+ JSON.stringify(d) + JSON.stringify(t.preferences) + ((v = t == null ? void 0 : t.preferences) == null ? void 0 : v.customVisualCode)
2909
2919
  );
2910
- if (a.type === "table" && (c != null && c.records) && (c == null ? void 0 : c.records.length) > 0)
2920
+ if (t.type === "table" && (c != null && c.records) && (c == null ? void 0 : c.records.length) > 0)
2911
2921
  return /* @__PURE__ */ e.jsxs(Ne, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
2912
- /* @__PURE__ */ e.jsx(Zt, { card: a, data: c == null ? void 0 : c.records }),
2922
+ /* @__PURE__ */ e.jsx(Za, { card: t, data: c == null ? void 0 : c.records }),
2913
2923
  /* @__PURE__ */ e.jsx(_e, { orientation: "horizontal" })
2914
2924
  ] });
2915
2925
  }
2916
2926
  return /* @__PURE__ */ e.jsxs(
2917
- Bt,
2927
+ Ba,
2918
2928
  {
2919
2929
  role: "editor-visual-card",
2920
2930
  className: Y("relative flex h-full flex-col rounded-none", s),
2921
- ...t,
2931
+ ...a,
2922
2932
  children: [
2923
- n && /* @__PURE__ */ e.jsxs(Ut, { className: "flex flex-row items-start justify-between py-4", children: [
2933
+ n && /* @__PURE__ */ e.jsxs(Ua, { className: "flex flex-row items-start justify-between py-4", children: [
2924
2934
  /* @__PURE__ */ e.jsxs("div", { children: [
2925
2935
  /* @__PURE__ */ e.jsx(
2926
- as,
2936
+ ts,
2927
2937
  {
2928
- text: a.title,
2929
- onSave: (v) => j({ ...a, title: v }),
2930
- children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(Gt, { className: "text-base", children: a.title || "Edit title..." }) })
2938
+ text: t.title,
2939
+ onSave: (v) => j({ ...t, title: v }),
2940
+ children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(Ga, { className: "text-base", children: t.title || "Edit title..." }) })
2931
2941
  },
2932
- a.title
2942
+ t.title
2933
2943
  ),
2934
2944
  /* @__PURE__ */ e.jsx(
2935
- as,
2945
+ ts,
2936
2946
  {
2937
- text: a.description || "",
2938
- onSave: (v) => j({ ...a, description: v }),
2939
- children: /* @__PURE__ */ e.jsx(Jt, { children: a.description || "Edit description..." })
2947
+ text: t.description || "",
2948
+ onSave: (v) => j({ ...t, description: v }),
2949
+ children: /* @__PURE__ */ e.jsx(Ja, { children: t.description || "Edit description..." })
2940
2950
  },
2941
- a.description
2951
+ t.description
2942
2952
  )
2943
2953
  ] }),
2944
2954
  o && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
2945
2955
  /* @__PURE__ */ e.jsx(
2946
- as,
2956
+ ts,
2947
2957
  {
2948
2958
  className: "my-1",
2949
2959
  text: o.title || o.column,
@@ -2951,15 +2961,15 @@ function Ua({
2951
2961
  children: /* @__PURE__ */ e.jsx(U, { children: o.title })
2952
2962
  }
2953
2963
  ),
2954
- /* @__PURE__ */ e.jsx(ka, { filter: o })
2964
+ /* @__PURE__ */ e.jsx(kt, { filter: o })
2955
2965
  ] })
2956
2966
  ] }),
2957
- /* @__PURE__ */ e.jsx(Wt, { className: "flex grow flex-col", children: f() })
2967
+ /* @__PURE__ */ e.jsx(Wa, { className: "flex grow flex-col", children: f() })
2958
2968
  ]
2959
2969
  }
2960
2970
  );
2961
2971
  }
2962
- const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
2972
+ const ct = ({ language: s, value: a, onChange: t }) => /* @__PURE__ */ e.jsx(
2963
2973
  us,
2964
2974
  {
2965
2975
  className: "h-full w-full overflow-hidden text-xs",
@@ -2976,8 +2986,8 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
2976
2986
  renderLineHighlight: "none"
2977
2987
  },
2978
2988
  defaultLanguage: s,
2979
- value: t,
2980
- onChange: a
2989
+ value: a,
2990
+ onChange: t
2981
2991
  }
2982
2992
  ), _l = () => /* @__PURE__ */ e.jsxs(Ts, { children: [
2983
2993
  /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(Ms, { children: "Customize Card" }) }),
@@ -2995,15 +3005,15 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
2995
3005
  ] })
2996
3006
  ] }), Hl = ({
2997
3007
  defaultConfig: s,
2998
- customCode: t,
2999
- customConfig: a,
3008
+ customCode: a,
3009
+ customConfig: t,
3000
3010
  onConfigChange: n,
3001
3011
  onCodeChange: l
3002
- }) => /* @__PURE__ */ e.jsxs(Oa, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
3003
- /* @__PURE__ */ e.jsxs(Ia, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
3004
- /* @__PURE__ */ e.jsx(ts, { value: "custom-config", children: a ? "Custom Config" : "Default Config" }),
3005
- /* @__PURE__ */ e.jsx(ts, { value: "output", children: "Output" }),
3006
- /* @__PURE__ */ e.jsx(ts, { value: "custom-code", children: "Custom Code" })
3012
+ }) => /* @__PURE__ */ e.jsxs(Ot, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
3013
+ /* @__PURE__ */ e.jsxs(It, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
3014
+ /* @__PURE__ */ e.jsx(as, { value: "custom-config", children: t ? "Custom Config" : "Default Config" }),
3015
+ /* @__PURE__ */ e.jsx(as, { value: "output", children: "Output" }),
3016
+ /* @__PURE__ */ e.jsx(as, { value: "custom-code", children: "Custom Code" })
3007
3017
  ] }),
3008
3018
  /* @__PURE__ */ e.jsx(
3009
3019
  ns,
@@ -3011,7 +3021,7 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
3011
3021
  value: "output",
3012
3022
  className: "mt-0 grow rounded-b border border-t-0 p-2",
3013
3023
  children: /* @__PURE__ */ e.jsx(
3014
- Yt,
3024
+ Ya,
3015
3025
  {
3016
3026
  readOnly: !0,
3017
3027
  value: s,
@@ -3026,10 +3036,10 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
3026
3036
  value: "custom-config",
3027
3037
  className: "mt-0 grow rounded-b border border-t-0",
3028
3038
  children: /* @__PURE__ */ e.jsx(
3029
- ca,
3039
+ ct,
3030
3040
  {
3031
3041
  language: "json",
3032
- value: a,
3042
+ value: t,
3033
3043
  onChange: n
3034
3044
  }
3035
3045
  )
@@ -3041,10 +3051,10 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
3041
3051
  value: "custom-code",
3042
3052
  className: "mt-0 grow rounded-b border border-t-0",
3043
3053
  children: /* @__PURE__ */ e.jsx(
3044
- ca,
3054
+ ct,
3045
3055
  {
3046
3056
  language: "javascript",
3047
- value: t,
3057
+ value: a,
3048
3058
  onChange: l
3049
3059
  }
3050
3060
  )
@@ -3052,18 +3062,18 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
3052
3062
  )
3053
3063
  ] }), Pl = ({
3054
3064
  error: s,
3055
- hasCustomConfig: t,
3056
- onReset: a,
3065
+ hasCustomConfig: a,
3066
+ onReset: t,
3057
3067
  onApply: n,
3058
3068
  onClose: l
3059
- }) => /* @__PURE__ */ e.jsxs(ha, { className: "flex items-center", children: [
3069
+ }) => /* @__PURE__ */ e.jsxs(ht, { className: "flex items-center", children: [
3060
3070
  /* @__PURE__ */ e.jsx(U, { className: "mr-2 text-red-500", children: s }),
3061
- /* @__PURE__ */ e.jsx(T, { disabled: !t, onClick: a, variant: "outline", children: "Reset" }),
3071
+ /* @__PURE__ */ e.jsx(T, { disabled: !a, onClick: t, variant: "outline", children: "Reset" }),
3062
3072
  /* @__PURE__ */ e.jsx(T, { onClick: n, variant: "outline", children: "Apply" }),
3063
3073
  /* @__PURE__ */ e.jsx(T, { onClick: l, variant: "outline", children: "Close" })
3064
3074
  ] });
3065
3075
  function $l() {
3066
- const [s, t] = R(!1), [a, n] = R(""), [l, r] = R(""), [i, o] = R(""), [c, u] = R(""), x = m((y) => y.card), j = m((y) => y.card.customCfg), { data: b } = Fe(x), { data: d } = Rs(x), { setCardCustomCfg: p, setCustomVisualCode: f } = oe(), S = (y, z) => Ce.transform(y, (M, V, E) => {
3076
+ const [s, a] = R(!1), [t, n] = R(""), [l, r] = R(""), [i, o] = R(""), [c, u] = R(""), x = m((y) => y.card), j = m((y) => y.card.customCfg), { data: b } = Fe(x), { data: d } = Rs(x), { setCardCustomCfg: p, setCustomVisualCode: f } = oe(), S = (y, z) => Ce.transform(y, (M, V, E) => {
3067
3077
  if (!Ce.isEqual(V, z[E]))
3068
3078
  if (Ce.isArray(V) && Ce.isArray(z[E]))
3069
3079
  M[E] = z[E];
@@ -3091,7 +3101,7 @@ function $l() {
3091
3101
  }, F = () => {
3092
3102
  var z, M;
3093
3103
  if (!((z = b == null ? void 0 : b.records) != null && z.length)) return;
3094
- const y = wa({
3104
+ const y = wt({
3095
3105
  data: b.records,
3096
3106
  cardType: x.type,
3097
3107
  cfg: x.cfg,
@@ -3109,7 +3119,7 @@ function $l() {
3109
3119
  const y = JSON.parse(
3110
3120
  l
3111
3121
  ), z = S(
3112
- JSON.parse(a),
3122
+ JSON.parse(t),
3113
3123
  y
3114
3124
  );
3115
3125
  p(z), u("");
@@ -3118,7 +3128,7 @@ function $l() {
3118
3128
  u("Invalid JSON configuration");
3119
3129
  }
3120
3130
  };
3121
- return /* @__PURE__ */ e.jsxs(zs, { open: s, onOpenChange: t, children: [
3131
+ return /* @__PURE__ */ e.jsxs(zs, { open: s, onOpenChange: a, children: [
3122
3132
  /* @__PURE__ */ e.jsx(Os, { asChild: !0, children: /* @__PURE__ */ e.jsx(
3123
3133
  T,
3124
3134
  {
@@ -3126,17 +3136,17 @@ function $l() {
3126
3136
  size: "sm",
3127
3137
  variant: "outline",
3128
3138
  className: j ? "border-foreground/50 dark:border-foreground/70" : "",
3129
- children: /* @__PURE__ */ e.jsx(Xt, { className: "h-4 w-4" })
3139
+ children: /* @__PURE__ */ e.jsx(Xa, { className: "h-4 w-4" })
3130
3140
  }
3131
3141
  ) }),
3132
3142
  /* @__PURE__ */ e.jsxs(Is, { className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
3133
3143
  /* @__PURE__ */ e.jsx(_l, {}),
3134
3144
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow gap-2", children: [
3135
- /* @__PURE__ */ e.jsx(hs, { FallbackComponent: za, children: /* @__PURE__ */ e.jsx(Ua, { className: "w-1/2 rounded shadow-none" }) }),
3145
+ /* @__PURE__ */ e.jsx(hs, { FallbackComponent: zt, children: /* @__PURE__ */ e.jsx(Ut, { className: "w-1/2 rounded shadow-none" }) }),
3136
3146
  /* @__PURE__ */ e.jsx(
3137
3147
  Hl,
3138
3148
  {
3139
- defaultConfig: a,
3149
+ defaultConfig: t,
3140
3150
  customCode: i,
3141
3151
  customConfig: l,
3142
3152
  onConfigChange: (y) => r(y ?? ""),
@@ -3150,80 +3160,80 @@ function $l() {
3150
3160
  error: c,
3151
3161
  hasCustomConfig: !!j,
3152
3162
  onReset: () => {
3153
- r(a), p(null);
3163
+ r(t), p(null);
3154
3164
  },
3155
3165
  onApply: L,
3156
- onClose: () => t(!1)
3166
+ onClose: () => a(!1)
3157
3167
  }
3158
3168
  )
3159
3169
  ] })
3160
3170
  ] });
3161
3171
  }
3162
- function Ga(s) {
3172
+ function Gt(s) {
3163
3173
  return xe({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(s);
3164
3174
  }
3165
- function Ja(s) {
3175
+ function Jt(s) {
3166
3176
  return xe({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24a8,8,0,0,0-8,8V88a8,8,0,0,0,8,8,32,32,0,1,1-27.72,16,8,8,0,0,0-2.93-10.93l-48.5-28A8,8,0,0,0,37.92,76,104,104,0,1,0,128,24ZM48.09,91.1,83,111.26A48.09,48.09,0,0,0,80,128c0,1.53.08,3,.22,4.52L41.28,143A88.16,88.16,0,0,1,48.09,91.1Zm-2.67,67.31,39-10.44A48.1,48.1,0,0,0,120,175.32v40.31A88.2,88.2,0,0,1,45.42,158.41ZM136,215.63V175.32a48,48,0,0,0,0-94.65V40.36a88,88,0,0,1,0,175.27Z" }, child: [] }] })(s);
3167
3177
  }
3168
- function Wa(s) {
3178
+ function Wt(s) {
3169
3179
  return xe({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(s);
3170
3180
  }
3171
3181
  function Bl(s) {
3172
3182
  return xe({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,0,1,85.78,206.4,30.06,30.06,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.57,4.57,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56A8,8,0,0,0,142,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36A8,8,0,0,0,109.94,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.49,174.17,127.6,171.31Zm83.09-26.84a8,8,0,0,0-10.23,4.84L188,184.21l-12.47-34.9a8,8,0,0,0-15.07,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,210.69,144.47ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z" }, child: [] }] })(s);
3173
3183
  }
3174
- function Ka(s) {
3184
+ function Kt(s) {
3175
3185
  return xe({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(s);
3176
3186
  }
3177
- function Qa(s) {
3187
+ function Qt(s) {
3178
3188
  return xe({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(s);
3179
3189
  }
3180
- function Za(s) {
3190
+ function Zt(s) {
3181
3191
  return xe({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M4 9h4v11H4zM4 4h4v4H4zM10 7h4v4h-4zM16 10h4v4h-4zM16 15h4v5h-4zM10 12h4v8h-4z" }, child: [] }] })(s);
3182
3192
  }
3183
- function Xa(s) {
3193
+ function Xt(s) {
3184
3194
  return xe({ attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(s);
3185
3195
  }
3186
- function Ya(s) {
3196
+ function Yt(s) {
3187
3197
  return xe({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M217 25v14h78V25h-78zm0 32v46h14V71h50v32h14V57h-78zm32 32v14h14V89h-14zm-64 32v46h30v-46h-30zm48 0v14h46v-14h-46zm64 0v46h30v-46h-30zm-64 32v14h46v-14h-46zm-80 32v46h62v-46h-62zm80 0v14h46v-14h-46zm64 0v46h62v-46h-62zm-64 32v14h46v-14h-46zm-112 32v46h94v-46h-94zm112 0v14h46v-14h-46zm64 0v46h94v-46h-94zm-64 32v14h46v-14h-46zM89 313v46h126v-46H89zm144 0v14h46v-14h-46zm64 0v46h126v-46H297zm-64 32v14h46v-14h-46zM57 377v46h158v-46H57zm176 0v14h46v-14h-46zm64 0v46h158v-46H297zm-64 32v14h46v-14h-46zM25 441v46h190v-46H25zm208 0v14h46v-14h-46zm64 0v46h190v-46H297zm-64 32v14h46v-14h-46z" }, child: [] }] })(s);
3188
3198
  }
3189
- function et(s) {
3190
- const [t, a] = R(null);
3199
+ function ea(s) {
3200
+ const [a, t] = R(null);
3191
3201
  return ne(() => {
3192
3202
  s && (async () => {
3193
- const r = (await import("./lucide-react-C7RixR3l.js"))[s];
3194
- a(r);
3203
+ const r = (await import("./lucide-react-BoOXYgIt.js"))[s];
3204
+ t(r);
3195
3205
  })();
3196
- }, [s]), t;
3206
+ }, [s]), a;
3197
3207
  }
3198
- function st() {
3199
- const { authToken: s } = Oe(), { data: t, isLoading: a, isFetching: n, isError: l } = Me({
3208
+ function sa() {
3209
+ const { authToken: s } = Oe(), { data: a, isLoading: t, isFetching: n, isError: l } = Me({
3200
3210
  queryKey: ["plugins", s == null ? void 0 : s.accessToken],
3201
3211
  queryFn: () => en(s == null ? void 0 : s.accessToken)
3202
3212
  // staleTime: Infinity,
3203
3213
  });
3204
- return { data: t, isLoading: a, isFetching: n, isError: l };
3214
+ return { data: a, isLoading: t, isFetching: n, isError: l };
3205
3215
  }
3206
3216
  function Ul({
3207
3217
  onChartTypeChange: s
3208
3218
  }) {
3209
- const [t, a] = R([]), { data: n } = st();
3219
+ const [a, t] = R([]), { data: n } = sa();
3210
3220
  return ne(() => {
3211
3221
  (async () => {
3212
3222
  var r;
3213
3223
  if (n) {
3214
3224
  const o = (await Promise.all(
3215
- (r = n == null ? void 0 : n.plugins) == null ? void 0 : r.map(async (c) => (await sn(c.value)).visuals.map((j) => ({
3225
+ (r = n == null ? void 0 : n.plugins) == null ? void 0 : r.map(async (c) => (await ol(c.value)).visuals.map((j) => ({
3216
3226
  name: j.name,
3217
3227
  icon: j.icon,
3218
3228
  url: c.value
3219
3229
  })))
3220
3230
  )).flat();
3221
- a(o);
3231
+ t(o);
3222
3232
  }
3223
3233
  })();
3224
- }, [n]), t.length === 0 ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3234
+ }, [n]), a.length === 0 ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3225
3235
  /* @__PURE__ */ e.jsx(ke, { className: "my-2" }),
3226
- /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-4 place-items-center", children: t.map((l, r) => /* @__PURE__ */ e.jsx(
3236
+ /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-4 place-items-center", children: a.map((l, r) => /* @__PURE__ */ e.jsx(
3227
3237
  Gl,
3228
3238
  {
3229
3239
  text: l.name,
@@ -3236,15 +3246,15 @@ function Ul({
3236
3246
  }
3237
3247
  const Gl = ({
3238
3248
  text: s,
3239
- icon: t,
3240
- onClick: a
3249
+ icon: a,
3250
+ onClick: t
3241
3251
  }) => {
3242
- const n = et(t || ""), l = s.charAt(0).toUpperCase();
3243
- return /* @__PURE__ */ e.jsx(T, { onClick: a, title: s, variant: "ghost", children: n ? /* @__PURE__ */ e.jsx(n, { className: "h-4 w-4" }) : l });
3252
+ const n = ea(a || ""), l = s.charAt(0).toUpperCase();
3253
+ return /* @__PURE__ */ e.jsx(T, { onClick: t, title: s, variant: "ghost", children: n ? /* @__PURE__ */ e.jsx(n, { className: "h-4 w-4" }) : l });
3244
3254
  };
3245
3255
  function Jl() {
3246
3256
  var x, j;
3247
- const [s, t] = R(!1), a = m((b) => b.card), n = a.type, { setCardType: l, setCardPreferences: r, setChartOrientation: i } = m((b) => b.actions), { setCardCustomCfg: o, setCustomCardPreferences: c } = oe();
3257
+ const [s, a] = R(!1), t = m((b) => b.card), n = t.type, { setCardType: l, setCardPreferences: r, setChartOrientation: i } = m((b) => b.actions), { setCardCustomCfg: o, setCustomCardPreferences: c } = oe();
3248
3258
  function u(b, d) {
3249
3259
  o(null), r({}), l(b), d && c({
3250
3260
  type: "component",
@@ -3252,16 +3262,16 @@ function Jl() {
3252
3262
  url: d.url,
3253
3263
  componentName: d.name,
3254
3264
  icon: d.icon
3255
- }), t(!1);
3265
+ }), a(!1);
3256
3266
  }
3257
- return /* @__PURE__ */ e.jsxs(ms, { open: s, onOpenChange: t, children: [
3267
+ return /* @__PURE__ */ e.jsxs(ms, { open: s, onOpenChange: a, children: [
3258
3268
  /* @__PURE__ */ e.jsx(xs, { asChild: !0, children: /* @__PURE__ */ e.jsx(T, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
3259
3269
  Wl,
3260
3270
  {
3261
3271
  className: "h-4 w-4",
3262
3272
  chartType: n,
3263
- customIcon: (x = a.customCardPreferences) == null ? void 0 : x.icon,
3264
- componentName: (j = a.customCardPreferences) == null ? void 0 : j.componentName
3273
+ customIcon: (x = t.customCardPreferences) == null ? void 0 : x.icon,
3274
+ componentName: (j = t.customCardPreferences) == null ? void 0 : j.componentName
3265
3275
  }
3266
3276
  ) }) }),
3267
3277
  /* @__PURE__ */ e.jsxs(ps, { className: "w-50", children: [
@@ -3288,7 +3298,7 @@ function Jl() {
3288
3298
  {
3289
3299
  onClick: () => u("stackedBar"),
3290
3300
  variant: "ghost",
3291
- children: /* @__PURE__ */ e.jsx(Za, { className: "size-5", strokeWidth: 0 })
3301
+ children: /* @__PURE__ */ e.jsx(Zt, { className: "size-5", strokeWidth: 0 })
3292
3302
  }
3293
3303
  ),
3294
3304
  /* @__PURE__ */ e.jsx(
@@ -3296,7 +3306,7 @@ function Jl() {
3296
3306
  {
3297
3307
  onClick: () => u("stackedLine"),
3298
3308
  variant: "ghost",
3299
- children: /* @__PURE__ */ e.jsx(Qa, { className: "size-5", strokeWidth: 0 })
3309
+ children: /* @__PURE__ */ e.jsx(Qt, { className: "size-5", strokeWidth: 0 })
3300
3310
  }
3301
3311
  ),
3302
3312
  /* @__PURE__ */ e.jsx(
@@ -3304,7 +3314,7 @@ function Jl() {
3304
3314
  {
3305
3315
  onClick: () => u("scatter"),
3306
3316
  variant: "ghost",
3307
- children: /* @__PURE__ */ e.jsx(Va, { className: "size-5" })
3317
+ children: /* @__PURE__ */ e.jsx(Vt, { className: "size-5" })
3308
3318
  }
3309
3319
  ),
3310
3320
  /* @__PURE__ */ e.jsx(
@@ -3312,7 +3322,7 @@ function Jl() {
3312
3322
  {
3313
3323
  onClick: () => u("bubble"),
3314
3324
  variant: "ghost",
3315
- children: /* @__PURE__ */ e.jsx(Ka, { className: "size-4" })
3325
+ children: /* @__PURE__ */ e.jsx(Kt, { className: "size-4" })
3316
3326
  }
3317
3327
  ),
3318
3328
  /* @__PURE__ */ e.jsx(
@@ -3320,7 +3330,7 @@ function Jl() {
3320
3330
  {
3321
3331
  onClick: () => u("pie"),
3322
3332
  variant: "ghost",
3323
- children: /* @__PURE__ */ e.jsx(Ea, { className: "size-5" })
3333
+ children: /* @__PURE__ */ e.jsx(Et, { className: "size-5" })
3324
3334
  }
3325
3335
  ),
3326
3336
  /* @__PURE__ */ e.jsx(
@@ -3328,7 +3338,7 @@ function Jl() {
3328
3338
  {
3329
3339
  onClick: () => u("doughnut"),
3330
3340
  variant: "ghost",
3331
- children: /* @__PURE__ */ e.jsx(Ja, { className: "size-5", strokeWidth: 1 })
3341
+ children: /* @__PURE__ */ e.jsx(Jt, { className: "size-5", strokeWidth: 1 })
3332
3342
  }
3333
3343
  ),
3334
3344
  /* @__PURE__ */ e.jsx(
@@ -3337,7 +3347,7 @@ function Jl() {
3337
3347
  onClick: () => u("radar"),
3338
3348
  variant: "ghost",
3339
3349
  children: /* @__PURE__ */ e.jsx(
3340
- Ga,
3350
+ Gt,
3341
3351
  {
3342
3352
  className: "size-5 font-extralight",
3343
3353
  strokeWidth: 0.5
@@ -3350,7 +3360,7 @@ function Jl() {
3350
3360
  {
3351
3361
  onClick: () => u("polarArea"),
3352
3362
  variant: "ghost",
3353
- children: /* @__PURE__ */ e.jsx(Wa, { className: "size-5" })
3363
+ children: /* @__PURE__ */ e.jsx(Wt, { className: "size-5" })
3354
3364
  }
3355
3365
  ),
3356
3366
  /* @__PURE__ */ e.jsx(
@@ -3358,7 +3368,7 @@ function Jl() {
3358
3368
  {
3359
3369
  onClick: () => u("pyramid"),
3360
3370
  variant: "ghost",
3361
- children: /* @__PURE__ */ e.jsx(Ya, { className: "size-5" })
3371
+ children: /* @__PURE__ */ e.jsx(Yt, { className: "size-5" })
3362
3372
  }
3363
3373
  ),
3364
3374
  /* @__PURE__ */ e.jsx(
@@ -3366,7 +3376,7 @@ function Jl() {
3366
3376
  {
3367
3377
  onClick: () => u("range"),
3368
3378
  variant: "ghost",
3369
- children: /* @__PURE__ */ e.jsx(La, { className: "size-5" })
3379
+ children: /* @__PURE__ */ e.jsx(Lt, { className: "size-5" })
3370
3380
  }
3371
3381
  ),
3372
3382
  /* @__PURE__ */ e.jsx(
@@ -3382,7 +3392,7 @@ function Jl() {
3382
3392
  {
3383
3393
  onClick: () => u("kpi"),
3384
3394
  variant: "ghost",
3385
- children: /* @__PURE__ */ e.jsx(Xa, { className: "size-6" })
3395
+ children: /* @__PURE__ */ e.jsx(Xt, { className: "size-6" })
3386
3396
  }
3387
3397
  ),
3388
3398
  /* @__PURE__ */ e.jsx(
@@ -3398,7 +3408,7 @@ function Jl() {
3398
3408
  {
3399
3409
  onClick: () => u("map"),
3400
3410
  variant: "ghost",
3401
- children: /* @__PURE__ */ e.jsx(Aa, { className: "size-4" })
3411
+ children: /* @__PURE__ */ e.jsx(At, { className: "size-4" })
3402
3412
  }
3403
3413
  ),
3404
3414
  /* @__PURE__ */ e.jsx(
@@ -3406,7 +3416,7 @@ function Jl() {
3406
3416
  {
3407
3417
  onClick: () => u("custom"),
3408
3418
  variant: "ghost",
3409
- children: /* @__PURE__ */ e.jsx(qa, { className: "size-4" })
3419
+ children: /* @__PURE__ */ e.jsx(qt, { className: "size-4" })
3410
3420
  }
3411
3421
  )
3412
3422
  ] }),
@@ -3416,57 +3426,57 @@ function Jl() {
3416
3426
  }
3417
3427
  function Wl({
3418
3428
  chartType: s,
3419
- className: t,
3420
- customIcon: a,
3429
+ className: a,
3430
+ customIcon: t,
3421
3431
  componentName: n
3422
3432
  }) {
3423
- const l = et(a || "");
3433
+ const l = ea(t || "");
3424
3434
  switch (s) {
3425
3435
  case "bar":
3426
- return /* @__PURE__ */ e.jsx(Ps, { className: t });
3436
+ return /* @__PURE__ */ e.jsx(Ps, { className: a });
3427
3437
  case "line":
3428
- return /* @__PURE__ */ e.jsx($s, { className: t });
3438
+ return /* @__PURE__ */ e.jsx($s, { className: a });
3429
3439
  case "pie":
3430
- return /* @__PURE__ */ e.jsx(Ea, { className: t });
3440
+ return /* @__PURE__ */ e.jsx(Et, { className: a });
3431
3441
  case "radar":
3432
- return /* @__PURE__ */ e.jsx(Ga, { className: t });
3442
+ return /* @__PURE__ */ e.jsx(Gt, { className: a });
3433
3443
  case "scatter":
3434
- return /* @__PURE__ */ e.jsx(Va, { className: t });
3444
+ return /* @__PURE__ */ e.jsx(Vt, { className: a });
3435
3445
  case "bubble":
3436
- return /* @__PURE__ */ e.jsx(Ka, { className: t });
3446
+ return /* @__PURE__ */ e.jsx(Kt, { className: a });
3437
3447
  case "doughnut":
3438
- return /* @__PURE__ */ e.jsx(Ja, { className: t });
3448
+ return /* @__PURE__ */ e.jsx(Jt, { className: a });
3439
3449
  case "stackedBar":
3440
- return /* @__PURE__ */ e.jsx(Za, { className: "size-4 text-foreground/70" });
3450
+ return /* @__PURE__ */ e.jsx(Zt, { className: "size-4 text-foreground/70" });
3441
3451
  case "stackedLine":
3442
- return /* @__PURE__ */ e.jsx(Qa, { className: "size-4 text-foreground/70" });
3452
+ return /* @__PURE__ */ e.jsx(Qt, { className: "size-4 text-foreground/70" });
3443
3453
  case "polarArea":
3444
- return /* @__PURE__ */ e.jsx(Wa, { className: t });
3454
+ return /* @__PURE__ */ e.jsx(Wt, { className: a });
3445
3455
  case "pyramid":
3446
- return /* @__PURE__ */ e.jsx(Ya, { className: t });
3456
+ return /* @__PURE__ */ e.jsx(Yt, { className: a });
3447
3457
  case "range":
3448
- return /* @__PURE__ */ e.jsx(La, { className: t });
3458
+ return /* @__PURE__ */ e.jsx(Lt, { className: a });
3449
3459
  case "kpi":
3450
- return /* @__PURE__ */ e.jsx(Xa, { className: t });
3460
+ return /* @__PURE__ */ e.jsx(Xt, { className: a });
3451
3461
  case "text":
3452
- return /* @__PURE__ */ e.jsx(Gs, { className: t });
3462
+ return /* @__PURE__ */ e.jsx(Gs, { className: a });
3453
3463
  case "map":
3454
- return /* @__PURE__ */ e.jsx(Aa, { className: t });
3464
+ return /* @__PURE__ */ e.jsx(At, { className: a });
3455
3465
  case "custom":
3456
- return a && l ? /* @__PURE__ */ e.jsx(l, { className: t }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(qa, { className: t });
3466
+ return t && l ? /* @__PURE__ */ e.jsx(l, { className: a }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(qt, { className: a });
3457
3467
  default:
3458
- return /* @__PURE__ */ e.jsx(Us, { className: t });
3468
+ return /* @__PURE__ */ e.jsx(Us, { className: a });
3459
3469
  }
3460
3470
  }
3461
3471
  function Kl() {
3462
- var a;
3472
+ var t;
3463
3473
  const s = m((n) => n.card);
3464
- (a = s.customCardPreferences) == null || a.showCardHeader;
3465
- const { setCustomCardPreferences: t } = oe();
3474
+ (t = s.customCardPreferences) == null || t.showCardHeader;
3475
+ const { setCustomCardPreferences: a } = oe();
3466
3476
  return /* @__PURE__ */ e.jsxs(Fs, { children: [
3467
3477
  /* @__PURE__ */ e.jsx(Ls, { asChild: !0, children: /* @__PURE__ */ e.jsx(Bs, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
3468
3478
  /* @__PURE__ */ e.jsx(Es, { align: "start", className: "w-40 text-muted-foreground", children: /* @__PURE__ */ e.jsxs(
3469
- an,
3479
+ sn,
3470
3480
  {
3471
3481
  onClick: () => {
3472
3482
  navigator.clipboard.writeText(s.id), Ke.success("Card ID copied to clipboard");
@@ -3480,15 +3490,15 @@ function Kl() {
3480
3490
  ) })
3481
3491
  ] });
3482
3492
  }
3483
- function da() {
3493
+ function dt() {
3484
3494
  var h;
3485
- const s = m((g) => g.frame), t = m((g) => g.card), a = m((g) => g.isShowingVisual), n = m((g) => g.isSqlRunning), l = m((g) => g.pythonStdOut);
3495
+ const s = m((g) => g.frame), a = m((g) => g.card), t = m((g) => g.isShowingVisual), n = m((g) => g.isSqlRunning), l = m((g) => g.pythonStdOut);
3486
3496
  m((g) => g.actions.setRunSql);
3487
- const { setFrame: r, setCard: i, updateCardInFrame: o, setActiveTabCardId: c } = oe(), { data: u, isLoading: x, isFetching: j, error: b } = Fe(t);
3488
- if (!t) return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
3497
+ const { setFrame: r, setCard: i, updateCardInFrame: o, setActiveTabCardId: c } = oe(), { data: u, isLoading: x, isFetching: j, error: b } = Fe(a);
3498
+ if (!a) return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
3489
3499
  function d() {
3490
3500
  const g = {
3491
- connectionId: t.connectionId,
3501
+ connectionId: a.connectionId,
3492
3502
  id: We(),
3493
3503
  title: "Title",
3494
3504
  description: "Description",
@@ -3516,10 +3526,10 @@ function da() {
3516
3526
  }
3517
3527
  function f() {
3518
3528
  const g = {
3519
- ...t,
3529
+ ...a,
3520
3530
  id: We(),
3521
- title: `${t.title} Copy`,
3522
- tabTitle: `${t.tabTitle || t.title} Copy`
3531
+ title: `${a.title} Copy`,
3532
+ tabTitle: `${a.tabTitle || a.title} Copy`
3523
3533
  };
3524
3534
  p(g);
3525
3535
  }
@@ -3556,29 +3566,29 @@ function da() {
3556
3566
  displayTab: N
3557
3567
  });
3558
3568
  },
3559
- children: O.displayTab === !0 || O.displayTab === void 0 ? /* @__PURE__ */ e.jsx(cn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx($n, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
3569
+ children: O.displayTab === !0 || O.displayTab === void 0 ? /* @__PURE__ */ e.jsx(on, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx(Pn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
3560
3570
  }
3561
3571
  );
3562
3572
  }
3563
3573
  function M() {
3564
3574
  return /* @__PURE__ */ e.jsxs(
3565
- Oa,
3575
+ Ot,
3566
3576
  {
3567
3577
  onValueChange: v,
3568
3578
  value: s.activeCardId,
3569
3579
  className: "flex grow flex-col",
3570
3580
  children: [
3571
3581
  s.cards.map((g) => /* @__PURE__ */ e.jsx(ns, { className: "mt-0 grow", value: g.id, children: V() }, g.id)),
3572
- /* @__PURE__ */ e.jsx(Ia, { className: "group mx-6 justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
3582
+ /* @__PURE__ */ e.jsx(It, { className: "group mx-6 justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
3573
3583
  s.cards.map((g, O) => /* @__PURE__ */ e.jsx(
3574
- as,
3584
+ ts,
3575
3585
  {
3576
3586
  text: g.tabTitle || g.title,
3577
3587
  onSave: (N) => {
3578
- i({ ...t, tabTitle: N }), o({ ...t, tabTitle: N });
3588
+ i({ ...a, tabTitle: N }), o({ ...a, tabTitle: N });
3579
3589
  },
3580
3590
  children: /* @__PURE__ */ e.jsxs(
3581
- ts,
3591
+ as,
3582
3592
  {
3583
3593
  draggable: !0,
3584
3594
  onDragStart: (N) => F(N, O),
@@ -3617,7 +3627,7 @@ function da() {
3617
3627
  className: "invisible ml-1 h-8 px-2 hover:bg-muted-foreground/50 group-hover:visible",
3618
3628
  variant: "outline",
3619
3629
  onClick: f,
3620
- children: /* @__PURE__ */ e.jsx(_n, { className: "h-4 w-4" })
3630
+ children: /* @__PURE__ */ e.jsx(Rn, { className: "h-4 w-4" })
3621
3631
  }
3622
3632
  )
3623
3633
  ] }) })
@@ -3626,18 +3636,18 @@ function da() {
3626
3636
  );
3627
3637
  }
3628
3638
  function V() {
3629
- return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(ln, { card: t, data: u == null ? void 0 : u.records }) }) }) : t.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Ne, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
3630
- rn,
3639
+ return a.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(nn, { card: a, data: u == null ? void 0 : u.records }) }) }) : a.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Ne, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
3640
+ ln,
3631
3641
  {
3632
3642
  isLoading: n,
3633
- card: t,
3643
+ card: a,
3634
3644
  data: u == null ? void 0 : u.records
3635
3645
  }
3636
- ) }) }) }) : /* @__PURE__ */ e.jsx(hs, { FallbackComponent: za, children: /* @__PURE__ */ e.jsx(Ua, { className: "grow border-none shadow-none" }) });
3646
+ ) }) }) }) : /* @__PURE__ */ e.jsx(hs, { FallbackComponent: zt, children: /* @__PURE__ */ e.jsx(Ut, { className: "grow border-none shadow-none" }) });
3637
3647
  }
3638
3648
  function E() {
3639
3649
  const g = JSON.stringify(u == null ? void 0 : u.records, null, 2), O = new Blob([g], { type: "application/json" }), N = URL.createObjectURL(O), A = document.createElement("a");
3640
- A.href = N, A.download = `${t.title}.json`, A.click();
3650
+ A.href = N, A.download = `${a.title}.json`, A.click();
3641
3651
  }
3642
3652
  function P() {
3643
3653
  const O = [
@@ -3647,17 +3657,17 @@ function da() {
3647
3657
  ...((u == null ? void 0 : u.records) || []).map((J) => Object.values(J).join(","))
3648
3658
  ].join(`
3649
3659
  `), N = new Blob([O], { type: "text/csv" }), A = URL.createObjectURL(N), B = document.createElement("a");
3650
- B.href = A, B.download = `${t.title}.csv`, B.click();
3660
+ B.href = A, B.download = `${a.title}.csv`, B.click();
3651
3661
  }
3652
3662
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full flex-col py-3", children: [
3653
3663
  (x || j) && /* @__PURE__ */ e.jsx("div", { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e.jsx(Qe, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }),
3654
3664
  /* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
3655
- a && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
3665
+ t && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
3656
3666
  /* @__PURE__ */ e.jsx(Jl, {}),
3657
- !["table", "custom"].includes(t.type) && /* @__PURE__ */ e.jsx($l, {}),
3667
+ !["table", "custom"].includes(a.type) && /* @__PURE__ */ e.jsx($l, {}),
3658
3668
  /* @__PURE__ */ e.jsx(Kl, {})
3659
3669
  ] }),
3660
- !a && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-1", children: [
3670
+ !t && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-1", children: [
3661
3671
  /* @__PURE__ */ e.jsx(
3662
3672
  T,
3663
3673
  {
@@ -3675,11 +3685,11 @@ function da() {
3675
3685
  variant: "ghost",
3676
3686
  size: "icon",
3677
3687
  onClick: E,
3678
- children: /* @__PURE__ */ e.jsx(Bn, { strokeWidth: 1.5, className: "size-4" })
3688
+ children: /* @__PURE__ */ e.jsx($n, { strokeWidth: 1.5, className: "size-4" })
3679
3689
  }
3680
3690
  ),
3681
3691
  /* @__PURE__ */ e.jsx(
3682
- nn,
3692
+ an,
3683
3693
  {
3684
3694
  text: JSON.stringify(u == null ? void 0 : u.records, null, 2),
3685
3695
  className: "h-7 w-fit px-1 font-mono text-xs text-muted-foreground/70"
@@ -3688,7 +3698,7 @@ function da() {
3688
3698
  ] }),
3689
3699
  /* @__PURE__ */ e.jsx(Zl, {})
3690
3700
  ] }),
3691
- a ? M() : /* @__PURE__ */ e.jsxs(
3701
+ t ? M() : /* @__PURE__ */ e.jsxs(
3692
3702
  ls,
3693
3703
  {
3694
3704
  className: "px-6",
@@ -3728,28 +3738,28 @@ function da() {
3728
3738
  ] });
3729
3739
  }
3730
3740
  function Ql() {
3731
- const s = m((a) => a.pythonStdOut);
3741
+ const s = m((t) => t.pythonStdOut);
3732
3742
  if (!s) return null;
3733
- const t = s.replace(/\n/g, "<br>");
3743
+ const a = s.replace(/\n/g, "<br>");
3734
3744
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex w-full flex-col border-r", children: [
3735
3745
  /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 flex max-h-11 min-h-11 grow items-center border-b bg-muted px-3 font-mono text-xs font-semibold text-foreground/70", children: "Python Output" }),
3736
3746
  /* @__PURE__ */ e.jsxs(Ne, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: [
3737
- /* @__PURE__ */ e.jsx("div", { dangerouslySetInnerHTML: { __html: t } }),
3747
+ /* @__PURE__ */ e.jsx("div", { dangerouslySetInnerHTML: { __html: a } }),
3738
3748
  /* @__PURE__ */ e.jsx(_e, { orientation: "horizontal" })
3739
3749
  ] })
3740
3750
  ] });
3741
3751
  }
3742
3752
  function Zl() {
3743
- const s = m((a) => a.isShowingVisual), t = m(
3744
- (a) => a.actions.setIsShowingVisual
3753
+ const s = m((t) => t.isShowingVisual), a = m(
3754
+ (t) => t.actions.setIsShowingVisual
3745
3755
  );
3746
3756
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
3747
3757
  /* @__PURE__ */ e.jsx(U, { htmlFor: "visualize", children: "Chart" }),
3748
3758
  /* @__PURE__ */ e.jsx(
3749
- on,
3759
+ rn,
3750
3760
  {
3751
3761
  checked: s,
3752
- onCheckedChange: () => t(!s),
3762
+ onCheckedChange: () => a(!s),
3753
3763
  id: "visualize",
3754
3764
  className: "data-[state=checked]:bg-foreground/50"
3755
3765
  }
@@ -3758,14 +3768,14 @@ function Zl() {
3758
3768
  }
3759
3769
  function Xl({
3760
3770
  options: s,
3761
- value: t,
3762
- onValueChange: a
3771
+ value: a,
3772
+ onValueChange: t
3763
3773
  }) {
3764
3774
  return /* @__PURE__ */ e.jsx(
3765
3775
  fs,
3766
3776
  {
3767
- value: t,
3768
- onValueChange: a,
3777
+ value: a,
3778
+ onValueChange: t,
3769
3779
  className: "flex gap-4",
3770
3780
  defaultValue: s[0].value,
3771
3781
  children: s.map((n) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
@@ -3777,12 +3787,12 @@ function Xl({
3777
3787
  }
3778
3788
  function fe({
3779
3789
  label: s,
3780
- options: t,
3781
- value: a,
3790
+ options: a,
3791
+ value: t,
3782
3792
  onValueChange: n,
3783
3793
  className: l
3784
3794
  }) {
3785
- return /* @__PURE__ */ e.jsxs(ge, { value: a, onValueChange: n, children: [
3795
+ return /* @__PURE__ */ e.jsxs(ge, { value: t, onValueChange: n, children: [
3786
3796
  /* @__PURE__ */ e.jsx(
3787
3797
  je,
3788
3798
  {
@@ -3792,25 +3802,25 @@ function fe({
3792
3802
  ),
3793
3803
  /* @__PURE__ */ e.jsx(ve, { children: /* @__PURE__ */ e.jsxs(we, { children: [
3794
3804
  /* @__PURE__ */ e.jsx(ye, { children: s }),
3795
- t.map((r) => /* @__PURE__ */ e.jsx(ee, { value: r.value, children: r.label }, r.value))
3805
+ a.map((r) => /* @__PURE__ */ e.jsx(ee, { value: r.value, children: r.label }, r.value))
3796
3806
  ] }) })
3797
3807
  ] });
3798
3808
  }
3799
3809
  function Ge({
3800
3810
  children: s,
3801
- summary: t,
3802
- open: a,
3811
+ summary: a,
3812
+ open: t,
3803
3813
  className: n
3804
3814
  }) {
3805
3815
  return /* @__PURE__ */ e.jsxs(
3806
3816
  "details",
3807
3817
  {
3808
- open: a,
3818
+ open: t,
3809
3819
  className: Y("space-y-4 [&_summary>svg]:open:-rotate-180", n),
3810
3820
  children: [
3811
3821
  /* @__PURE__ */ e.jsxs("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4", children: [
3812
- /* @__PURE__ */ e.jsx(U, { children: t }),
3813
- /* @__PURE__ */ e.jsx(dn, { className: "h-4 w-4" })
3822
+ /* @__PURE__ */ e.jsx(U, { children: a }),
3823
+ /* @__PURE__ */ e.jsx(cn, { className: "h-4 w-4" })
3814
3824
  ] }),
3815
3825
  /* @__PURE__ */ e.jsx("div", { className: "transition-all ease-in-out", children: s })
3816
3826
  ]
@@ -3821,7 +3831,7 @@ function Yl() {
3821
3831
  var f, S;
3822
3832
  const s = m(
3823
3833
  (v) => v.card.customCardPreferences
3824
- ), { data: t } = st(), a = (t == null ? void 0 : t.plugins) || [], n = m((v) => v.card), l = m((v) => v.frame), r = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: i } = oe(), { components: o, manifest: c } = Sa(
3834
+ ), { data: a } = sa(), t = (a == null ? void 0 : a.plugins) || [], n = m((v) => v.card), l = m((v) => v.frame), r = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: i } = oe(), { components: o, manifest: c } = St(
3825
3835
  (s == null ? void 0 : s.url) || ""
3826
3836
  ), u = (f = c == null ? void 0 : c.visuals) == null ? void 0 : f.find(
3827
3837
  (v) => v.name === (s == null ? void 0 : s.componentName)
@@ -3936,7 +3946,7 @@ function Yl() {
3936
3946
  {
3937
3947
  className: "h-8 w-full",
3938
3948
  label: "",
3939
- options: a,
3949
+ options: t,
3940
3950
  value: (s == null ? void 0 : s.url) || "",
3941
3951
  onValueChange: (v) => i({
3942
3952
  ...s || {
@@ -3995,11 +4005,11 @@ function Yl() {
3995
4005
  );
3996
4006
  }
3997
4007
  function Ve() {
3998
- const [s, t] = R([]);
4008
+ const [s, a] = R([]);
3999
4009
  m(
4000
4010
  (x) => x.card.cfg
4001
4011
  );
4002
- const a = m((x) => x.card.preferences), { setCardCfg: n, setFilterOnClickColumnIndex: l, setCardPreferences: r } = m((x) => x.actions), i = m(
4012
+ const t = m((x) => x.card.preferences), { setCardCfg: n, setFilterOnClickColumnIndex: l, setCardPreferences: r } = m((x) => x.actions), i = m(
4003
4013
  (x) => x.queryResultColumns
4004
4014
  );
4005
4015
  m(
@@ -4008,21 +4018,21 @@ function Ve() {
4008
4018
  return (j = x.card.preferences) == null ? void 0 : j.filterOnClickColumnIndex;
4009
4019
  }
4010
4020
  ), ne(() => {
4011
- i && t(new Array(i.length).fill(!1));
4021
+ i && a(new Array(i.length).fill(!1));
4012
4022
  }, [i]);
4013
4023
  function o(x, j) {
4014
4024
  var b, d;
4015
- j ? a != null && a.onClickFilter && ((b = a == null ? void 0 : a.onClickFilter) == null ? void 0 : b.length) > 0 ? r({
4016
- ...a,
4025
+ j ? t != null && t.onClickFilter && ((b = t == null ? void 0 : t.onClickFilter) == null ? void 0 : b.length) > 0 ? r({
4026
+ ...t,
4017
4027
  onClickFilter: [
4018
- ...a.onClickFilter,
4028
+ ...t.onClickFilter,
4019
4029
  {
4020
4030
  columnIndex: x,
4021
4031
  expression: ""
4022
4032
  }
4023
4033
  ]
4024
4034
  }) : r({
4025
- ...a,
4035
+ ...t,
4026
4036
  onClickFilter: [
4027
4037
  {
4028
4038
  columnIndex: x,
@@ -4030,33 +4040,33 @@ function Ve() {
4030
4040
  }
4031
4041
  ]
4032
4042
  }) : (r({
4033
- ...a,
4034
- onClickFilter: (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.filter(
4043
+ ...t,
4044
+ onClickFilter: (d = t == null ? void 0 : t.onClickFilter) == null ? void 0 : d.filter(
4035
4045
  (p) => p.columnIndex !== x
4036
4046
  )
4037
- }), t((p) => {
4047
+ }), a((p) => {
4038
4048
  const f = [...p];
4039
4049
  return f[x] = !1, f;
4040
4050
  }));
4041
4051
  }
4042
4052
  function c(x, j) {
4043
4053
  var d;
4044
- const b = (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.map((p) => p.columnIndex === x ? {
4054
+ const b = (d = t == null ? void 0 : t.onClickFilter) == null ? void 0 : d.map((p) => p.columnIndex === x ? {
4045
4055
  ...p,
4046
4056
  expression: j.target.value
4047
4057
  } : p);
4048
4058
  r({
4049
- ...a,
4059
+ ...t,
4050
4060
  onClickFilter: b
4051
4061
  });
4052
4062
  }
4053
4063
  function u(x) {
4054
4064
  var j, b, d, p;
4055
- if (s != null && s[x] || (b = (j = a == null ? void 0 : a.onClickFilter) == null ? void 0 : j.find((f) => f.columnIndex === x)) != null && b.expression)
4065
+ if (s != null && s[x] || (b = (j = t == null ? void 0 : t.onClickFilter) == null ? void 0 : j.find((f) => f.columnIndex === x)) != null && b.expression)
4056
4066
  return /* @__PURE__ */ e.jsx(
4057
4067
  he,
4058
4068
  {
4059
- value: (p = (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.find((f) => f.columnIndex === x)) == null ? void 0 : p.expression,
4069
+ value: (p = (d = t == null ? void 0 : t.onClickFilter) == null ? void 0 : d.find((f) => f.columnIndex === x)) == null ? void 0 : p.expression,
4060
4070
  onChange: (f) => c(x, f),
4061
4071
  type: "text",
4062
4072
  className: "h-9 w-full font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
@@ -4077,7 +4087,7 @@ function Ve() {
4077
4087
  /* @__PURE__ */ e.jsx(
4078
4088
  _s,
4079
4089
  {
4080
- checked: !!((b = a == null ? void 0 : a.onClickFilter) != null && b.find(
4090
+ checked: !!((b = t == null ? void 0 : t.onClickFilter) != null && b.find(
4081
4091
  (p) => p.columnIndex === j
4082
4092
  )),
4083
4093
  onCheckedChange: (p) => o(j, p)
@@ -4090,13 +4100,13 @@ function Ve() {
4090
4100
  children: x
4091
4101
  }
4092
4102
  ),
4093
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: ((d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.find(
4103
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: ((d = t == null ? void 0 : t.onClickFilter) == null ? void 0 : d.find(
4094
4104
  (p) => p.columnIndex === j
4095
4105
  )) && /* @__PURE__ */ e.jsx(
4096
- pa,
4106
+ pt,
4097
4107
  {
4098
4108
  onClick: () => {
4099
- t((p) => {
4109
+ a((p) => {
4100
4110
  const f = [...p];
4101
4111
  return f[j] = !p[j], f;
4102
4112
  });
@@ -4115,17 +4125,17 @@ function Ve() {
4115
4125
  }
4116
4126
  function gs() {
4117
4127
  var i, o, c;
4118
- const s = m((u) => u.card.preferences), t = m(
4128
+ const s = m((u) => u.card.preferences), a = m(
4119
4129
  (u) => u.card.cfg
4120
- ), { setCardCfg: a, setCardPreferences: n, setChartOrientation: l } = m((u) => u.actions);
4121
- (i = t == null ? void 0 : t.options) != null && i.indexAxis;
4130
+ ), { setCardCfg: t, setCardPreferences: n, setChartOrientation: l } = m((u) => u.actions);
4131
+ (i = a == null ? void 0 : a.options) != null && i.indexAxis;
4122
4132
  function r(u) {
4123
4133
  l(u);
4124
4134
  }
4125
4135
  return /* @__PURE__ */ e.jsxs(
4126
4136
  fs,
4127
4137
  {
4128
- value: ((o = s == null ? void 0 : s.chartOptions) == null ? void 0 : o.indexAxis) || ((c = t == null ? void 0 : t.options) == null ? void 0 : c.indexAxis) || "x",
4138
+ value: ((o = s == null ? void 0 : s.chartOptions) == null ? void 0 : o.indexAxis) || ((c = a == null ? void 0 : a.options) == null ? void 0 : c.indexAxis) || "x",
4129
4139
  onValueChange: r,
4130
4140
  className: "flex gap-3",
4131
4141
  defaultValue: "x",
@@ -4143,25 +4153,25 @@ function gs() {
4143
4153
  );
4144
4154
  }
4145
4155
  const es = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0";
4146
- function ua(s, t) {
4156
+ function ut(s, a) {
4147
4157
  var n, l, r;
4148
- const a = Ta(s, t);
4149
- return ((r = (l = (n = s == null ? void 0 : s.chartOptions) == null ? void 0 : n.scales) == null ? void 0 : l[a]) == null ? void 0 : r.type) || "linear";
4158
+ const t = Tt(s, a);
4159
+ return ((r = (l = (n = s == null ? void 0 : s.chartOptions) == null ? void 0 : n.scales) == null ? void 0 : l[t]) == null ? void 0 : r.type) || "linear";
4150
4160
  }
4151
- function at() {
4161
+ function ta() {
4152
4162
  var J, K, W, le, ue, G;
4153
- const [s, t] = R(!1), a = m((q) => {
4163
+ const [s, a] = R(!1), t = m((q) => {
4154
4164
  var D;
4155
4165
  return (D = q.card) == null ? void 0 : D.preferences;
4156
4166
  }), n = m((q) => {
4157
4167
  var D;
4158
4168
  return (D = q.card) == null ? void 0 : D.cfg;
4159
- }), l = Ta(a, n), [r, i] = R(
4160
- ua(a)
4169
+ }), l = Tt(t, n), [r, i] = R(
4170
+ ut(t)
4161
4171
  ), [o, c] = R(
4162
- ((W = (K = (J = a == null ? void 0 : a.chartOptions) == null ? void 0 : J.scales) == null ? void 0 : K[l]) == null ? void 0 : W.min) || ""
4172
+ ((W = (K = (J = t == null ? void 0 : t.chartOptions) == null ? void 0 : J.scales) == null ? void 0 : K[l]) == null ? void 0 : W.min) || ""
4163
4173
  ), [u, x] = R(
4164
- ((G = (ue = (le = a == null ? void 0 : a.chartOptions) == null ? void 0 : le.scales) == null ? void 0 : ue[l]) == null ? void 0 : G.max) || ""
4174
+ ((G = (ue = (le = t == null ? void 0 : t.chartOptions) == null ? void 0 : le.scales) == null ? void 0 : ue[l]) == null ? void 0 : G.max) || ""
4165
4175
  ), [j, b] = R(o || u ? "custom" : "auto"), [d, p] = R(""), [f, S] = R(0), [v, F] = R(""), [L, y] = R(""), [z, M] = R(""), V = m(
4166
4176
  (q) => q.actions.setCardPreferences
4167
4177
  ), { updateCardInFrame: E } = oe(), P = m((q) => q.card), h = m((q) => {
@@ -4169,13 +4179,13 @@ function at() {
4169
4179
  return (D = q.card) == null ? void 0 : D.type;
4170
4180
  }), g = ["pie", "doughnut", "polarArea"].includes(h);
4171
4181
  ne(() => {
4172
- var q, D, re, ae, ce, ie, se, k, _, $, te, Ae, qe, Ie;
4173
- i(ua(a)), c(
4174
- ((re = (D = (q = a == null ? void 0 : a.chartOptions) == null ? void 0 : q.scales) == null ? void 0 : D[l]) == null ? void 0 : re.min) === 0 ? 0 : ""
4175
- ), x(((ie = (ce = (ae = a == null ? void 0 : a.chartOptions) == null ? void 0 : ae.scales) == null ? void 0 : ce[l]) == null ? void 0 : ie.max) || ""), p(
4176
- (($ = (_ = (k = (se = a == null ? void 0 : a.chartOptions) == null ? void 0 : se.scales) == null ? void 0 : k[l]) == null ? void 0 : _.ticks) == null ? void 0 : $.stepSize) || ""
4177
- ), S(((te = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : te.decimalPlaces) || 0), F(((Ae = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ae.suffix) || ""), y(((qe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : qe.currency) || ""), M(((Ie = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ie.locale) || "");
4178
- }, [s, a, l]);
4182
+ var q, D, re, te, ce, ie, se, k, _, $, ae, Ae, qe, Ie;
4183
+ i(ut(t)), c(
4184
+ ((re = (D = (q = t == null ? void 0 : t.chartOptions) == null ? void 0 : q.scales) == null ? void 0 : D[l]) == null ? void 0 : re.min) === 0 ? 0 : ""
4185
+ ), x(((ie = (ce = (te = t == null ? void 0 : t.chartOptions) == null ? void 0 : te.scales) == null ? void 0 : ce[l]) == null ? void 0 : ie.max) || ""), p(
4186
+ (($ = (_ = (k = (se = t == null ? void 0 : t.chartOptions) == null ? void 0 : se.scales) == null ? void 0 : k[l]) == null ? void 0 : _.ticks) == null ? void 0 : $.stepSize) || ""
4187
+ ), S(((ae = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : ae.decimalPlaces) || 0), F(((Ae = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : Ae.suffix) || ""), y(((qe = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : qe.currency) || ""), M(((Ie = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : Ie.locale) || "");
4188
+ }, [s, t, l]);
4179
4189
  function O(q, D) {
4180
4190
  return D === "" || /^[0-9\b]+$/.test(D) ? Number(D) : Number(q);
4181
4191
  }
@@ -4281,7 +4291,7 @@ function at() {
4281
4291
  ] });
4282
4292
  }
4283
4293
  function B() {
4284
- var ae;
4294
+ var te;
4285
4295
  let q = {};
4286
4296
  j === "custom" && (q = {
4287
4297
  min: o,
@@ -4291,11 +4301,11 @@ function at() {
4291
4301
  }
4292
4302
  });
4293
4303
  const D = {
4294
- ...a || {},
4304
+ ...t || {},
4295
4305
  chartOptions: {
4296
- ...a == null ? void 0 : a.chartOptions,
4306
+ ...t == null ? void 0 : t.chartOptions,
4297
4307
  scales: {
4298
- ...(ae = a == null ? void 0 : a.chartOptions) == null ? void 0 : ae.scales,
4308
+ ...(te = t == null ? void 0 : t.chartOptions) == null ? void 0 : te.scales,
4299
4309
  [l]: {
4300
4310
  // ...cardPreferences?.chartOptions?.scales?.[axis],
4301
4311
  type: r,
@@ -4317,8 +4327,8 @@ function at() {
4317
4327
  };
4318
4328
  E(re);
4319
4329
  }
4320
- return /* @__PURE__ */ e.jsxs(ms, { onOpenChange: (q) => t(q), children: [
4321
- /* @__PURE__ */ e.jsx(xs, { asChild: !0, children: /* @__PURE__ */ e.jsx(un, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
4330
+ return /* @__PURE__ */ e.jsxs(ms, { onOpenChange: (q) => a(q), children: [
4331
+ /* @__PURE__ */ e.jsx(xs, { asChild: !0, children: /* @__PURE__ */ e.jsx(dn, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
4322
4332
  /* @__PURE__ */ e.jsx(ps, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
4323
4333
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4324
4334
  /* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
@@ -4370,7 +4380,7 @@ function at() {
4370
4380
  ] }),
4371
4381
  j === "custom" && r == "linear" && A(),
4372
4382
  N(),
4373
- /* @__PURE__ */ e.jsx(hn, {}),
4383
+ /* @__PURE__ */ e.jsx(un, {}),
4374
4384
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
4375
4385
  T,
4376
4386
  {
@@ -4386,19 +4396,19 @@ function at() {
4386
4396
  }
4387
4397
  function er({ idx: s }) {
4388
4398
  var o;
4389
- const t = m((c) => {
4399
+ const a = m((c) => {
4390
4400
  var u;
4391
4401
  return (u = c.card) == null ? void 0 : u.preferences;
4392
- }), a = m(
4402
+ }), t = m(
4393
4403
  (c) => {
4394
4404
  var u;
4395
4405
  return (u = c.card.preferences) == null ? void 0 : u.datasetOptions;
4396
4406
  }
4397
4407
  ), n = m(
4398
4408
  (c) => c.actions.setCardPreferences
4399
- ), l = (o = t == null ? void 0 : t.chartOptions) == null ? void 0 : o.indexAxis, r = a == null ? void 0 : a.find((c) => c.idx === s);
4409
+ ), l = (o = a == null ? void 0 : a.chartOptions) == null ? void 0 : o.indexAxis, r = t == null ? void 0 : t.find((c) => c.idx === s);
4400
4410
  function i(c, u) {
4401
- (c === "end" || c === "start") && mn(xn());
4411
+ (c === "end" || c === "start") && hn(mn());
4402
4412
  const x = {
4403
4413
  display: c !== "none",
4404
4414
  align: c,
@@ -4407,9 +4417,9 @@ function er({ idx: s }) {
4407
4417
  };
4408
4418
  if (!r)
4409
4419
  n({
4410
- ...t,
4420
+ ...a,
4411
4421
  datasetOptions: [
4412
- ...a || [],
4422
+ ...t || [],
4413
4423
  {
4414
4424
  idx: u,
4415
4425
  datalabels: x
@@ -4419,17 +4429,17 @@ function er({ idx: s }) {
4419
4429
  else {
4420
4430
  const j = { ...r };
4421
4431
  j.datalabels = x;
4422
- const b = a == null ? void 0 : a.map(
4432
+ const b = t == null ? void 0 : t.map(
4423
4433
  (d) => d.idx === u ? j : d
4424
4434
  );
4425
4435
  n({
4426
- ...t,
4436
+ ...a,
4427
4437
  datasetOptions: b
4428
4438
  });
4429
4439
  }
4430
4440
  }
4431
4441
  return /* @__PURE__ */ e.jsxs(ms, { children: [
4432
- /* @__PURE__ */ e.jsx(xs, { children: /* @__PURE__ */ e.jsx(rl, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
4442
+ /* @__PURE__ */ e.jsx(xs, { children: /* @__PURE__ */ e.jsx(ll, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
4433
4443
  /* @__PURE__ */ e.jsx(ps, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
4434
4444
  /* @__PURE__ */ e.jsx(
4435
4445
  T,
@@ -4449,7 +4459,7 @@ function er({ idx: s }) {
4449
4459
  variant: "secondary",
4450
4460
  className: "h-7 p-1 text-xs font-normal",
4451
4461
  children: /* @__PURE__ */ e.jsx(
4452
- Kn,
4462
+ Wn,
4453
4463
  {
4454
4464
  className: Y("h-4 w-4", {
4455
4465
  "rotate-90": l === "y"
@@ -4466,7 +4476,7 @@ function er({ idx: s }) {
4466
4476
  variant: "secondary",
4467
4477
  className: "h-7 p-1 text-xs font-normal",
4468
4478
  children: /* @__PURE__ */ e.jsx(
4469
- Zn,
4479
+ Qn,
4470
4480
  {
4471
4481
  className: Y("h-4 w-4", {
4472
4482
  "rotate-90": l === "y"
@@ -4483,7 +4493,7 @@ function er({ idx: s }) {
4483
4493
  variant: "secondary",
4484
4494
  className: "h-7 p-1 text-xs font-normal",
4485
4495
  children: /* @__PURE__ */ e.jsx(
4486
- Qn,
4496
+ Kn,
4487
4497
  {
4488
4498
  className: Y("h-4 w-4", {
4489
4499
  "rotate-90": l === "y"
@@ -4495,21 +4505,21 @@ function er({ idx: s }) {
4495
4505
  ] }) })
4496
4506
  ] });
4497
4507
  }
4498
- function tt() {
4499
- const s = m((u) => u.card), t = m(
4508
+ function aa() {
4509
+ const s = m((u) => u.card), a = m(
4500
4510
  (u) => {
4501
4511
  var x, j, b;
4502
4512
  return (b = (j = (x = u == null ? void 0 : u.card) == null ? void 0 : x.preferences) == null ? void 0 : j.chartOptions) == null ? void 0 : b.indexAxis;
4503
4513
  }
4504
- ), { data: a } = Fe(s), n = t === "y" ? "Y axis" : "X axis", l = t === "y" ? "X axis" : "Y axis", {
4514
+ ), { data: t } = Fe(s), n = a === "y" ? "Y axis" : "X axis", l = a === "y" ? "X axis" : "Y axis", {
4505
4515
  keys: r,
4506
4516
  metricKeys: i,
4507
4517
  dimensionKeys: o
4508
- } = Cs((a == null ? void 0 : a.records) || []);
4518
+ } = Cs((t == null ? void 0 : t.records) || []);
4509
4519
  let c = i;
4510
4520
  if (["stackedBar", "stackedLine"].includes(s.type)) {
4511
- const u = pn({
4512
- dataArray: (a == null ? void 0 : a.records) || [],
4521
+ const u = xn({
4522
+ dataArray: (t == null ? void 0 : t.records) || [],
4513
4523
  groupKey: o[0],
4514
4524
  pivotKey: o[1],
4515
4525
  valueKey: c[0]
@@ -4519,22 +4529,22 @@ function tt() {
4519
4529
  return r.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
4520
4530
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4521
4531
  /* @__PURE__ */ e.jsx(U, { children: n }),
4522
- /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-md bg-muted/70 px-3 py-2 hover:bg-muted", children: /* @__PURE__ */ e.jsx("p", { title: o[0], children: nt(o[0]) }) }) })
4532
+ /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-md bg-muted/70 px-3 py-2 hover:bg-muted", children: /* @__PURE__ */ e.jsx("p", { title: o[0], children: na(o[0]) }) }) })
4523
4533
  ] }),
4524
4534
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4525
4535
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-5", children: [
4526
4536
  /* @__PURE__ */ e.jsx(U, { children: l }),
4527
- /* @__PURE__ */ e.jsx(at, {})
4537
+ /* @__PURE__ */ e.jsx(ta, {})
4528
4538
  ] }),
4529
4539
  /* @__PURE__ */ e.jsx("div", { className: "my-1 max-h-[125px] space-y-1 overflow-y-auto", children: c.map((u, x) => /* @__PURE__ */ e.jsx(sr, { col: u, idx: x }, u)) })
4530
4540
  ] })
4531
4541
  ] });
4532
4542
  }
4533
- function nt(s, t = 30) {
4534
- return s.length > t ? s.slice(0, t) + "..." : s;
4543
+ function na(s, a = 30) {
4544
+ return s.length > a ? s.slice(0, a) + "..." : s;
4535
4545
  }
4536
- function sr({ col: s, idx: t }) {
4537
- const a = m((o) => {
4546
+ function sr({ col: s, idx: a }) {
4547
+ const t = m((o) => {
4538
4548
  var c;
4539
4549
  return (c = o.card) == null ? void 0 : c.preferences;
4540
4550
  }), n = m(
@@ -4542,15 +4552,15 @@ function sr({ col: s, idx: t }) {
4542
4552
  var c;
4543
4553
  return (c = o.card.preferences) == null ? void 0 : c.datasetOptions;
4544
4554
  }
4545
- ), l = n == null ? void 0 : n.find((o) => o.idx === t), { setCardPreferences: r } = m((o) => o.actions);
4555
+ ), l = n == null ? void 0 : n.find((o) => o.idx === a), { setCardPreferences: r } = m((o) => o.actions);
4546
4556
  function i(o) {
4547
4557
  if (!l)
4548
4558
  r({
4549
- ...a,
4559
+ ...t,
4550
4560
  datasetOptions: [
4551
4561
  ...n || [],
4552
4562
  {
4553
- idx: t,
4563
+ idx: a,
4554
4564
  type: o === "area" ? "line" : o,
4555
4565
  fill: o === "area" ? "origin" : ""
4556
4566
  }
@@ -4560,16 +4570,16 @@ function sr({ col: s, idx: t }) {
4560
4570
  const c = { ...l };
4561
4571
  c.type = o === "area" ? "line" : o, c.fill = o === "area" ? "origin" : "";
4562
4572
  const u = n == null ? void 0 : n.map(
4563
- (x) => x.idx === t ? c : x
4573
+ (x) => x.idx === a ? c : x
4564
4574
  );
4565
4575
  r({
4566
- ...a,
4576
+ ...t,
4567
4577
  datasetOptions: u
4568
4578
  });
4569
4579
  }
4570
4580
  }
4571
4581
  return /* @__PURE__ */ e.jsxs("div", { className: "group flex items-center justify-between gap-5 rounded-md bg-muted/70 px-3 py-2 hover:bg-muted", children: [
4572
- /* @__PURE__ */ e.jsx("p", { title: s, children: nt(s) }),
4582
+ /* @__PURE__ */ e.jsx("p", { title: s, children: na(s) }),
4573
4583
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
4574
4584
  /* @__PURE__ */ e.jsx(
4575
4585
  Ps,
@@ -4586,32 +4596,32 @@ function sr({ col: s, idx: t }) {
4586
4596
  }
4587
4597
  ),
4588
4598
  /* @__PURE__ */ e.jsx(
4589
- qn,
4599
+ An,
4590
4600
  {
4591
4601
  onClick: () => i("area"),
4592
4602
  className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
4593
4603
  }
4594
4604
  ),
4595
- /* @__PURE__ */ e.jsx(er, { idx: t })
4605
+ /* @__PURE__ */ e.jsx(er, { idx: a })
4596
4606
  ] })
4597
4607
  ] });
4598
4608
  }
4599
- function lt() {
4600
- const s = m((d) => d.selectedConnectionId), t = m((d) => d.selectedDatamodelId), a = m((d) => d.selectedDatabaseName), n = m((d) => d.selectedSchemaName), l = m((d) => d.selectedTableName), r = w((d) => d.dashboard.filters) || [], i = w((d) => d.actions.addFilter), o = w((d) => d.actions.removeFilter), { removeFilterValues: c } = Ze(), { modelItems: u, tableName: x, connectionType: j } = Ee();
4609
+ function la() {
4610
+ const s = m((d) => d.selectedConnectionId), a = m((d) => d.selectedDatamodelId), t = m((d) => d.selectedDatabaseName), n = m((d) => d.selectedSchemaName), l = m((d) => d.selectedTableName), r = w((d) => d.dashboard.filters) || [], i = w((d) => d.actions.addFilter), o = w((d) => d.actions.removeFilter), { removeFilterValues: c } = Ze(), { modelItems: u, tableName: x, connectionType: j } = Ee();
4601
4611
  function b(d, p = "dashboard") {
4602
4612
  var V;
4603
- const f = pe(d.column_name), S = pe(a || ""), v = pe(n || ""), F = pe(x);
4604
- let L = fn(
4613
+ const f = pe(d.column_name), S = pe(t || ""), v = pe(n || ""), F = pe(x);
4614
+ let L = pn(
4605
4615
  v,
4606
4616
  F,
4607
4617
  j
4608
4618
  ), y = `${L}.${f}`;
4609
4619
  const z = (V = u == null ? void 0 : u.find(
4610
- (E) => E.id === t
4620
+ (E) => E.id === a
4611
4621
  )) == null ? void 0 : V.name;
4612
- t && t !== "none" && (y = `${la}.${z}.${f}`, L = `${la}.${z}`);
4622
+ a && a !== "none" && (y = `${lt}.${z}.${f}`, L = `${lt}.${z}`);
4613
4623
  const M = r == null ? void 0 : r.find(
4614
- (E) => E.column === y && E.table === F && (E.database === S || E.database === a)
4624
+ (E) => E.column === y && E.table === F && (E.database === S || E.database === t)
4615
4625
  );
4616
4626
  if (M)
4617
4627
  c(M.id), o(M.id);
@@ -4629,7 +4639,7 @@ function lt() {
4629
4639
  // database: 'NA',
4630
4640
  connectionId: s,
4631
4641
  operation: "in",
4632
- sql: na(
4642
+ sql: nt(
4633
4643
  d.data_type,
4634
4644
  L,
4635
4645
  f
@@ -4644,10 +4654,10 @@ function lt() {
4644
4654
  title: d.column_name,
4645
4655
  dataType: d.data_type,
4646
4656
  table: l || "",
4647
- database: a || "",
4657
+ database: t || "",
4648
4658
  connectionId: s || "",
4649
4659
  operation: "in",
4650
- sql: na(
4660
+ sql: nt(
4651
4661
  d.data_type,
4652
4662
  L,
4653
4663
  f
@@ -4661,55 +4671,55 @@ function lt() {
4661
4671
  function He() {
4662
4672
  const s = w(
4663
4673
  (o) => o.dashboard.filters
4664
- ), t = m((o) => o.frame), { setFrame: a } = oe(), { columns: n } = Ee(), { assignFilter: l } = lt();
4674
+ ), a = m((o) => o.frame), { setFrame: t } = oe(), { columns: n } = Ee(), { assignFilter: l } = la();
4665
4675
  function r(o) {
4666
4676
  const c = l(o, "frame");
4667
- a({ ...t, filterId: c });
4677
+ t({ ...a, filterId: c });
4668
4678
  }
4669
- const i = s == null ? void 0 : s.find((o) => o.id === t.filterId);
4679
+ const i = s == null ? void 0 : s.find((o) => o.id === a.filterId);
4670
4680
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
4671
4681
  /* @__PURE__ */ e.jsx(U, { children: "Card Filter" }),
4672
- /* @__PURE__ */ e.jsx(ar, { onSelect: r, columns: n }),
4673
- i && /* @__PURE__ */ e.jsx(Ma, { filter: i })
4682
+ /* @__PURE__ */ e.jsx(tr, { onSelect: r, columns: n }),
4683
+ i && /* @__PURE__ */ e.jsx(Mt, { filter: i })
4674
4684
  ] });
4675
4685
  }
4676
- function ar({
4686
+ function tr({
4677
4687
  columns: s,
4678
- onSelect: t
4688
+ onSelect: a
4679
4689
  }) {
4680
4690
  var i;
4681
- const [a, n] = ra.useState(!1), [l, r] = ra.useState("");
4682
- return /* @__PURE__ */ e.jsxs(ms, { open: a, onOpenChange: n, children: [
4691
+ const [t, n] = rt.useState(!1), [l, r] = rt.useState("");
4692
+ return /* @__PURE__ */ e.jsxs(ms, { open: t, onOpenChange: n, children: [
4683
4693
  /* @__PURE__ */ e.jsx(xs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
4684
4694
  T,
4685
4695
  {
4686
4696
  size: "sm",
4687
4697
  variant: "outline",
4688
4698
  role: "combobox",
4689
- "aria-expanded": a,
4699
+ "aria-expanded": t,
4690
4700
  className: "w-full justify-between font-normal",
4691
4701
  children: [
4692
4702
  l ? (i = s.find((o) => o.column_name === l)) == null ? void 0 : i.column_name : "Select Column...",
4693
- /* @__PURE__ */ e.jsx(gn, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4703
+ /* @__PURE__ */ e.jsx(fn, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4694
4704
  ]
4695
4705
  }
4696
4706
  ) }),
4697
- /* @__PURE__ */ e.jsx(ps, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(jn, { children: [
4698
- /* @__PURE__ */ e.jsx(bn, { placeholder: "Search column", className: "h-9" }),
4699
- /* @__PURE__ */ e.jsxs(vn, { children: [
4700
- /* @__PURE__ */ e.jsx(yn, { children: "No framework found." }),
4701
- /* @__PURE__ */ e.jsx(Nn, { children: s.map((o) => /* @__PURE__ */ e.jsxs(
4702
- Cn,
4707
+ /* @__PURE__ */ e.jsx(ps, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(gn, { children: [
4708
+ /* @__PURE__ */ e.jsx(jn, { placeholder: "Search column", className: "h-9" }),
4709
+ /* @__PURE__ */ e.jsxs(bn, { children: [
4710
+ /* @__PURE__ */ e.jsx(vn, { children: "No framework found." }),
4711
+ /* @__PURE__ */ e.jsx(yn, { children: s.map((o) => /* @__PURE__ */ e.jsxs(
4712
+ Nn,
4703
4713
  {
4704
4714
  value: o.column_name,
4705
4715
  onSelect: (c) => {
4706
4716
  const u = c === l ? "" : c;
4707
- r(u), n(!1), u && t(o);
4717
+ r(u), n(!1), u && a(o);
4708
4718
  },
4709
4719
  children: [
4710
4720
  o.column_name,
4711
4721
  /* @__PURE__ */ e.jsx(
4712
- Sn,
4722
+ Cn,
4713
4723
  {
4714
4724
  className: Y(
4715
4725
  "ml-auto h-4 w-4",
@@ -4725,7 +4735,7 @@ function ar({
4725
4735
  ] }) })
4726
4736
  ] });
4727
4737
  }
4728
- function tr({
4738
+ function ar({
4729
4739
  cardType: s
4730
4740
  }) {
4731
4741
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
@@ -4744,7 +4754,7 @@ function tr({
4744
4754
  "a",
4745
4755
  {
4746
4756
  target: "_blank",
4747
- onClick: (t) => t.stopPropagation(),
4757
+ onClick: (a) => a.stopPropagation(),
4748
4758
  className: "text-blue-700",
4749
4759
  href: "https://docs.semaphor.cloud/docs/charts/bar-line-area",
4750
4760
  children: "example"
@@ -4758,7 +4768,7 @@ function tr({
4758
4768
  /* @__PURE__ */ e.jsx(Z, { children: "Settings" }),
4759
4769
  /* @__PURE__ */ e.jsxs(X, { className: "space-y-4 px-2", children: [
4760
4770
  /* @__PURE__ */ e.jsx(gs, {}),
4761
- /* @__PURE__ */ e.jsx(tt, {})
4771
+ /* @__PURE__ */ e.jsx(aa, {})
4762
4772
  ] })
4763
4773
  ] }),
4764
4774
  /* @__PURE__ */ e.jsxs(Q, { value: "item-3", children: [
@@ -4774,7 +4784,7 @@ function Js() {
4774
4784
  var l, r, i;
4775
4785
  const s = m(
4776
4786
  (o) => o.card.cfg
4777
- ), t = m((o) => o.actions.setCardCfg), a = m((o) => o.card.type);
4787
+ ), a = m((o) => o.actions.setCardCfg), t = m((o) => o.card.type);
4778
4788
  function n(o) {
4779
4789
  var x;
4780
4790
  const c = {
@@ -4794,12 +4804,12 @@ function Js() {
4794
4804
  }
4795
4805
  }
4796
4806
  };
4797
- t(u), console.log(o);
4807
+ a(u), console.log(o);
4798
4808
  }
4799
4809
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4800
4810
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
4801
4811
  /* @__PURE__ */ e.jsx("label", { className: "font-medium", children: "Data Labels" }),
4802
- !["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(at, {})
4812
+ !["pyramid"].includes(t) && /* @__PURE__ */ e.jsx(ta, {})
4803
4813
  ] }),
4804
4814
  /* @__PURE__ */ e.jsxs(
4805
4815
  ge,
@@ -4812,9 +4822,9 @@ function Js() {
4812
4822
  /* @__PURE__ */ e.jsx(ve, { children: /* @__PURE__ */ e.jsxs(we, { children: [
4813
4823
  /* @__PURE__ */ e.jsx(ye, { children: "Data Labels" }),
4814
4824
  /* @__PURE__ */ e.jsx(ee, { value: "none", children: "None" }),
4815
- a !== "pyramid" && /* @__PURE__ */ e.jsx(ee, { value: "start", children: "Start" }),
4825
+ t !== "pyramid" && /* @__PURE__ */ e.jsx(ee, { value: "start", children: "Start" }),
4816
4826
  /* @__PURE__ */ e.jsx(ee, { value: "center", children: "Center" }),
4817
- a !== "pyramid" && /* @__PURE__ */ e.jsx(ee, { value: "end", children: "End" })
4827
+ t !== "pyramid" && /* @__PURE__ */ e.jsx(ee, { value: "end", children: "End" })
4818
4828
  ] }) })
4819
4829
  ]
4820
4830
  }
@@ -4824,15 +4834,15 @@ function Js() {
4824
4834
  function nr({
4825
4835
  cardType: s
4826
4836
  }) {
4827
- function t(a) {
4837
+ function a(t) {
4828
4838
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
4829
- /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: a === "bubble" ? "SELECT label, [group], x-axis, y-axis, radius FROM table" : "SELECT label, [group], x-axis, y-axis FROM table" }),
4839
+ /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: t === "bubble" ? "SELECT label, [group], x-axis, y-axis, radius FROM table" : "SELECT label, [group], x-axis, y-axis FROM table" }),
4830
4840
  /* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
4831
4841
  /* @__PURE__ */ e.jsx("li", { children: "label - category" }),
4832
4842
  /* @__PURE__ */ e.jsx("li", { children: "group - category" }),
4833
4843
  /* @__PURE__ */ e.jsx("li", { children: "x-axis - category" }),
4834
4844
  /* @__PURE__ */ e.jsx("li", { children: "y-axis - category" }),
4835
- a === "bubble" && /* @__PURE__ */ e.jsx("li", { children: "radius - number" })
4845
+ t === "bubble" && /* @__PURE__ */ e.jsx("li", { children: "radius - number" })
4836
4846
  ] }),
4837
4847
  /* @__PURE__ */ e.jsxs("div", { children: [
4838
4848
  "See ",
@@ -4853,7 +4863,7 @@ function nr({
4853
4863
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
4854
4864
  /* @__PURE__ */ e.jsxs(Q, { value: "item-1", children: [
4855
4865
  /* @__PURE__ */ e.jsx(Z, { children: `${Hs(s)} Chart` }),
4856
- /* @__PURE__ */ e.jsx(X, { className: "space-y-4 font-mono text-xs", children: t(s) })
4866
+ /* @__PURE__ */ e.jsx(X, { className: "space-y-4 font-mono text-xs", children: a(s) })
4857
4867
  ] }),
4858
4868
  /* @__PURE__ */ e.jsxs(Q, { value: "item-2", children: [
4859
4869
  /* @__PURE__ */ e.jsx(Z, { children: "Settings" }),
@@ -4892,7 +4902,7 @@ const lr = {
4892
4902
  ]
4893
4903
  };
4894
4904
  function ir() {
4895
- const s = m((t) => t.card.type);
4905
+ const s = m((a) => a.card.type);
4896
4906
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
4897
4907
  /* @__PURE__ */ e.jsx(
4898
4908
  Le,
@@ -5010,9 +5020,9 @@ function or(s) {
5010
5020
  }
5011
5021
  function cr() {
5012
5022
  var c, u, x, j, b;
5013
- const s = m((d) => d.card.preferences), t = m(
5023
+ const s = m((d) => d.card.preferences), a = m(
5014
5024
  (d) => d.actions.setCardPreferences
5015
- ), a = m(
5025
+ ), t = m(
5016
5026
  (d) => d.actions.setNumberFormat
5017
5027
  );
5018
5028
  m(
@@ -5050,7 +5060,7 @@ function cr() {
5050
5060
  {
5051
5061
  checked: !!((c = s == null ? void 0 : s.formatNumber) != null && c.enabled),
5052
5062
  onCheckedChange: (d) => {
5053
- t({
5063
+ a({
5054
5064
  ...s,
5055
5065
  formatNumber: {
5056
5066
  ...s == null ? void 0 : s.formatNumber,
@@ -5073,7 +5083,7 @@ function cr() {
5073
5083
  value: n || "none",
5074
5084
  onValueChange: (d) => {
5075
5085
  var p, f, S;
5076
- return a(
5086
+ return t(
5077
5087
  ((p = s == null ? void 0 : s.formatNumber) == null ? void 0 : p.decimalPlaces) || 0,
5078
5088
  ((f = s == null ? void 0 : s.formatNumber) == null ? void 0 : f.currency) || "",
5079
5089
  d,
@@ -5099,7 +5109,7 @@ function cr() {
5099
5109
  value: l || "none",
5100
5110
  onValueChange: (d) => {
5101
5111
  var p, f, S;
5102
- console.log("currency", d), a(
5112
+ console.log("currency", d), t(
5103
5113
  ((p = s == null ? void 0 : s.formatNumber) == null ? void 0 : p.decimalPlaces) || 0,
5104
5114
  d === "none" ? "" : d,
5105
5115
  ((f = s == null ? void 0 : s.formatNumber) == null ? void 0 : f.locale) || "",
@@ -5127,7 +5137,7 @@ function cr() {
5127
5137
  value: ((j = (x = s == null ? void 0 : s.formatNumber) == null ? void 0 : x.decimalPlaces) == null ? void 0 : j.toString()) || "0",
5128
5138
  onValueChange: (d) => {
5129
5139
  var p, f, S;
5130
- return a(
5140
+ return t(
5131
5141
  Number(d),
5132
5142
  ((p = s == null ? void 0 : s.formatNumber) == null ? void 0 : p.currency) || "",
5133
5143
  ((f = s == null ? void 0 : s.formatNumber) == null ? void 0 : f.locale) || "",
@@ -5151,7 +5161,7 @@ function cr() {
5151
5161
  placeholder: "K, M, B, %",
5152
5162
  onChange: (d) => {
5153
5163
  var p, f, S;
5154
- return a(
5164
+ return t(
5155
5165
  ((p = s == null ? void 0 : s.formatNumber) == null ? void 0 : p.decimalPlaces) || 0,
5156
5166
  ((f = s == null ? void 0 : s.formatNumber) == null ? void 0 : f.currency) || "",
5157
5167
  ((S = s == null ? void 0 : s.formatNumber) == null ? void 0 : S.locale) || "",
@@ -5165,7 +5175,7 @@ function cr() {
5165
5175
  ] }) }),
5166
5176
  /* @__PURE__ */ e.jsx(ke, { className: "my-3" }),
5167
5177
  /* @__PURE__ */ e.jsx(
5168
- wn,
5178
+ Sn,
5169
5179
  {
5170
5180
  colorRanges: r,
5171
5181
  setColorRanges: i
@@ -5307,7 +5317,7 @@ const ur = [
5307
5317
  }));
5308
5318
  function xr() {
5309
5319
  var c, u, x, j, b, d, p, f, S, v, F, L, y, z, M, V, E, P;
5310
- const s = m((h) => h.card), t = (u = (c = s == null ? void 0 : s.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : u.topoJsonUrl, [a, n] = R(
5320
+ const s = m((h) => h.card), a = (u = (c = s == null ? void 0 : s.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : u.topoJsonUrl, [t, n] = R(
5311
5321
  ((j = (x = s == null ? void 0 : s.preferences) == null ? void 0 : x.mapVisualOptions) == null ? void 0 : j.customTopoJsonUrl) || ""
5312
5322
  ), { setCardPreferences: l } = oe(), { data: r } = Rs(s), i = Object.keys((r == null ? void 0 : r.objects) || {}).map((h) => ({
5313
5323
  label: h,
@@ -5344,11 +5354,11 @@ function xr() {
5344
5354
  }
5345
5355
  });
5346
5356
  },
5347
- value: t || "",
5357
+ value: a || "",
5348
5358
  label: "Select Map"
5349
5359
  }
5350
5360
  ),
5351
- t === "custom" && /* @__PURE__ */ e.jsx(
5361
+ a === "custom" && /* @__PURE__ */ e.jsx(
5352
5362
  he,
5353
5363
  {
5354
5364
  onChange: (h) => {
@@ -5356,15 +5366,15 @@ function xr() {
5356
5366
  },
5357
5367
  onBlur: () => {
5358
5368
  var h;
5359
- console.log("onBlur", a), l({
5369
+ console.log("onBlur", t), l({
5360
5370
  ...s.preferences,
5361
5371
  mapVisualOptions: {
5362
5372
  ...(h = s.preferences) == null ? void 0 : h.mapVisualOptions,
5363
- customTopoJsonUrl: a
5373
+ customTopoJsonUrl: t
5364
5374
  }
5365
5375
  });
5366
5376
  },
5367
- value: a,
5377
+ value: t,
5368
5378
  className: `h-9 w-full ${Be}`,
5369
5379
  placeholder: "Custom URL"
5370
5380
  }
@@ -5512,9 +5522,9 @@ function xr() {
5512
5522
  }
5513
5523
  function pr() {
5514
5524
  var n;
5515
- const s = m((l) => l.card.preferences), { setCardPreferences: t } = m((l) => l.actions);
5516
- function a(l) {
5517
- t({
5525
+ const s = m((l) => l.card.preferences), { setCardPreferences: a } = m((l) => l.actions);
5526
+ function t(l) {
5527
+ a({
5518
5528
  ...s,
5519
5529
  textVisualOptions: {
5520
5530
  ...s == null ? void 0 : s.textVisualOptions,
@@ -5526,7 +5536,7 @@ function pr() {
5526
5536
  fs,
5527
5537
  {
5528
5538
  value: (n = s == null ? void 0 : s.textVisualOptions) != null && n.isDynamicText ? "dynamic" : "static",
5529
- onValueChange: a,
5539
+ onValueChange: t,
5530
5540
  className: "flex gap-3",
5531
5541
  defaultValue: "x",
5532
5542
  children: [
@@ -5544,13 +5554,13 @@ function pr() {
5544
5554
  }
5545
5555
  function ss({
5546
5556
  cardType: s,
5547
- docContent: t,
5548
- suffix: a = "Chart"
5557
+ docContent: a,
5558
+ suffix: t = "Chart"
5549
5559
  }) {
5550
5560
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
5551
5561
  /* @__PURE__ */ e.jsxs(Q, { value: "item-1", children: [
5552
- /* @__PURE__ */ e.jsx(Z, { children: `${Hs(s)} ${a}` }),
5553
- /* @__PURE__ */ e.jsx(X, { children: t || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5562
+ /* @__PURE__ */ e.jsx(Z, { children: `${Hs(s)} ${t}` }),
5563
+ /* @__PURE__ */ e.jsx(X, { children: a || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5554
5564
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT label, measure FROM table" }),
5555
5565
  /* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
5556
5566
  /* @__PURE__ */ e.jsx("li", { children: "label - category" }),
@@ -5595,8 +5605,8 @@ function fr() {
5595
5605
  var l, r;
5596
5606
  return (r = (l = n == null ? void 0 : n.card) == null ? void 0 : l.preferences) == null ? void 0 : r.sortChart;
5597
5607
  }
5598
- ), { setSortChart: t } = oe();
5599
- function a() {
5608
+ ), { setSortChart: a } = oe();
5609
+ function t() {
5600
5610
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
5601
5611
  /* @__PURE__ */ e.jsx(U, { children: "Sort" }),
5602
5612
  /* @__PURE__ */ e.jsx(
@@ -5620,7 +5630,7 @@ function fr() {
5620
5630
  ],
5621
5631
  value: s || "none",
5622
5632
  onValueChange: (n) => {
5623
- t(n);
5633
+ a(n);
5624
5634
  }
5625
5635
  }
5626
5636
  )
@@ -5656,8 +5666,8 @@ function fr() {
5656
5666
  /* @__PURE__ */ e.jsx(Z, { children: "Settings" }),
5657
5667
  /* @__PURE__ */ e.jsxs(X, { className: "space-y-4 px-2", children: [
5658
5668
  /* @__PURE__ */ e.jsx(gs, {}),
5659
- a(),
5660
- /* @__PURE__ */ e.jsx(tt, {})
5669
+ t(),
5670
+ /* @__PURE__ */ e.jsx(aa, {})
5661
5671
  ] })
5662
5672
  ] }),
5663
5673
  /* @__PURE__ */ e.jsxs(Q, { value: "item-3", children: [
@@ -5673,10 +5683,10 @@ function gr({}) {
5673
5683
  const s = m((n) => {
5674
5684
  var l;
5675
5685
  return (l = n.card) == null ? void 0 : l.preferences;
5676
- }), t = m(
5686
+ }), a = m(
5677
5687
  (n) => n.actions.setCardPreferences
5678
- ), a = (n) => {
5679
- t({
5688
+ ), t = (n) => {
5689
+ a({
5680
5690
  ...s,
5681
5691
  allowDownload: n
5682
5692
  });
@@ -5690,7 +5700,7 @@ function gr({}) {
5690
5700
  ] })
5691
5701
  ] }) }),
5692
5702
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
5693
- /* @__PURE__ */ e.jsx(_s, { onCheckedChange: a, id: "allow-download" }),
5703
+ /* @__PURE__ */ e.jsx(_s, { onCheckedChange: t, id: "allow-download" }),
5694
5704
  /* @__PURE__ */ e.jsx(
5695
5705
  "label",
5696
5706
  {
@@ -5752,37 +5762,37 @@ const jr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
5752
5762
  ] })
5753
5763
  ] });
5754
5764
  function yr() {
5755
- const s = m((a) => a.card.type);
5756
- function t(a) {
5757
- switch (a) {
5765
+ const s = m((t) => t.card.type);
5766
+ function a(t) {
5767
+ switch (t) {
5758
5768
  case "stackedBar":
5759
5769
  case "stackedLine":
5760
5770
  return /* @__PURE__ */ e.jsx(fr, {});
5761
5771
  case "pyramid":
5762
- return /* @__PURE__ */ e.jsx(ss, { docContent: jr, cardType: a });
5772
+ return /* @__PURE__ */ e.jsx(ss, { docContent: jr, cardType: t });
5763
5773
  case "kpi":
5764
5774
  return /* @__PURE__ */ e.jsx(dr, {});
5765
5775
  case "line":
5766
5776
  case "bar":
5767
- return /* @__PURE__ */ e.jsx(tr, { cardType: a });
5777
+ return /* @__PURE__ */ e.jsx(ar, { cardType: t });
5768
5778
  case "range":
5769
- return /* @__PURE__ */ e.jsx(ss, { docContent: br, cardType: a });
5779
+ return /* @__PURE__ */ e.jsx(ss, { docContent: br, cardType: t });
5770
5780
  case "pie":
5771
5781
  case "doughnut":
5772
5782
  case "polarArea":
5773
5783
  case "radar":
5774
- return /* @__PURE__ */ e.jsx(ss, { cardType: a });
5784
+ return /* @__PURE__ */ e.jsx(ss, { cardType: t });
5775
5785
  case "bubble":
5776
5786
  case "scatter":
5777
- return /* @__PURE__ */ e.jsx(nr, { cardType: a });
5787
+ return /* @__PURE__ */ e.jsx(nr, { cardType: t });
5778
5788
  case "table":
5779
- return /* @__PURE__ */ e.jsx(gr, { cardType: a });
5789
+ return /* @__PURE__ */ e.jsx(gr, { cardType: t });
5780
5790
  case "text":
5781
5791
  return /* @__PURE__ */ e.jsx(
5782
5792
  ss,
5783
5793
  {
5784
5794
  docContent: vr,
5785
- cardType: a,
5795
+ cardType: t,
5786
5796
  suffix: "Visual"
5787
5797
  }
5788
5798
  );
@@ -5795,12 +5805,12 @@ function yr() {
5795
5805
  }
5796
5806
  }
5797
5807
  return /* @__PURE__ */ e.jsxs(Ne, { className: "h-full w-full text-sm", children: [
5798
- t(s),
5808
+ a(s),
5799
5809
  /* @__PURE__ */ e.jsx(_e, { orientation: "horizontal" })
5800
5810
  ] });
5801
5811
  }
5802
5812
  function Nr() {
5803
- const s = m((t) => t.isShowingVisual);
5813
+ const s = m((a) => a.isShowingVisual);
5804
5814
  return /* @__PURE__ */ e.jsxs(
5805
5815
  ls,
5806
5816
  {
@@ -5837,23 +5847,23 @@ function Nr() {
5837
5847
  }
5838
5848
  ) }),
5839
5849
  /* @__PURE__ */ e.jsx(rs, { className: "border" }),
5840
- /* @__PURE__ */ e.jsx(Se, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(da, {}) })
5841
- ] }) : /* @__PURE__ */ e.jsx(da, {})
5850
+ /* @__PURE__ */ e.jsx(Se, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(dt, {}) })
5851
+ ] }) : /* @__PURE__ */ e.jsx(dt, {})
5842
5852
  }
5843
5853
  )
5844
5854
  ]
5845
5855
  }
5846
5856
  );
5847
5857
  }
5848
- function Cr({ authToken: s, onSave: t, onClose: a }) {
5858
+ function Cr({ authToken: s, onSave: a, onClose: t }) {
5849
5859
  w((i) => i.themeStyle);
5850
5860
  const n = m((i) => i.actions.setOnSave), l = m((i) => i.actions.setOnClose), r = w((i) => i.actions.setAuthToken);
5851
5861
  return ne(() => {
5852
- t && n(t), a && l(a);
5853
- }, [t, n, a, l]), ne(() => {
5862
+ a && n(a), t && l(t);
5863
+ }, [a, n, t, l]), ne(() => {
5854
5864
  s && s.accessToken && r(s);
5855
- }, [s, r]), /* @__PURE__ */ e.jsx(hs, { FallbackComponent: Da, children: /* @__PURE__ */ e.jsxs(
5856
- kn,
5865
+ }, [s, r]), /* @__PURE__ */ e.jsx(hs, { FallbackComponent: Dt, children: /* @__PURE__ */ e.jsxs(
5866
+ wn,
5857
5867
  {
5858
5868
  style: {
5859
5869
  // borderRadius: currentStyle?.chart?.options?.borderRadius,
@@ -5862,37 +5872,37 @@ function Cr({ authToken: s, onSave: t, onClose: a }) {
5862
5872
  className: "rounded-none",
5863
5873
  role: "editor-panel",
5864
5874
  children: [
5865
- /* @__PURE__ */ e.jsx(zn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(Ha, {}) }),
5866
- /* @__PURE__ */ e.jsx(On, { children: /* @__PURE__ */ e.jsx(Nr, {}) })
5875
+ /* @__PURE__ */ e.jsx(kn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(Ht, {}) }),
5876
+ /* @__PURE__ */ e.jsx(zn, { children: /* @__PURE__ */ e.jsx(Nr, {}) })
5867
5877
  ]
5868
5878
  }
5869
5879
  ) });
5870
5880
  }
5871
5881
  function Sr() {
5872
5882
  w((i) => i.selectedCardId);
5873
- const s = w((i) => i.selectedSheetId), { setIsVisualEditing: t } = w((i) => i.actions), a = w((i) => i.isVisualEditing), n = w((i) => i.actions.updateFrame);
5883
+ const s = w((i) => i.selectedSheetId), { setIsVisualEditing: a } = w((i) => i.actions), t = w((i) => i.isVisualEditing), n = w((i) => i.actions.updateFrame);
5874
5884
  function l(i) {
5875
- s && (n(s, i), t(!1));
5885
+ s && (n(s, i), a(!1));
5876
5886
  }
5877
5887
  function r() {
5878
- t(!1);
5888
+ a(!1);
5879
5889
  }
5880
5890
  return /* @__PURE__ */ e.jsx(
5881
5891
  "div",
5882
5892
  {
5883
5893
  role: "editor-container",
5884
5894
  className: Y("flex grow", {
5885
- "max-h-0 overflow-hidden": !a
5895
+ "max-h-0 overflow-hidden": !t
5886
5896
  }),
5887
5897
  children: /* @__PURE__ */ e.jsx(Cr, { onSave: l, onClose: r })
5888
5898
  }
5889
5899
  );
5890
5900
  }
5891
5901
  function wr() {
5892
- const s = m((r) => r.selectedDatabaseName), t = m((r) => r.selectedTableName), a = w((r) => r.dashboard.filters) || [], { columns: n } = Ee(), { assignFilter: l } = lt();
5902
+ const s = m((r) => r.selectedDatabaseName), a = m((r) => r.selectedTableName), t = w((r) => r.dashboard.filters) || [], { columns: n } = Ee(), { assignFilter: l } = la();
5893
5903
  return /* @__PURE__ */ e.jsx(Ne, { className: "flex-1 basis-0 flex-col px-3", children: n == null ? void 0 : n.map((r) => {
5894
- const i = a == null ? void 0 : a.find(
5895
- (o) => o.column === pe(r.column_name) && o.table === t && o.database === s
5904
+ const i = t == null ? void 0 : t.find(
5905
+ (o) => o.column === pe(r.column_name) && o.table === a && o.database === s
5896
5906
  );
5897
5907
  return /* @__PURE__ */ e.jsx(
5898
5908
  "div",
@@ -5905,7 +5915,7 @@ function wr() {
5905
5915
  }
5906
5916
  ),
5907
5917
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
5908
- /* @__PURE__ */ e.jsx(_a, { column: r }),
5918
+ /* @__PURE__ */ e.jsx(_t, { column: r }),
5909
5919
  /* @__PURE__ */ e.jsx("span", { children: r.column_name })
5910
5920
  ] })
5911
5921
  },
@@ -5914,9 +5924,9 @@ function wr() {
5914
5924
  }) });
5915
5925
  }
5916
5926
  function kr() {
5917
- w((t) => t.showFilters);
5927
+ w((a) => a.showFilters);
5918
5928
  const s = w(
5919
- (t) => t.actions.setShowFilters
5929
+ (a) => a.actions.setShowFilters
5920
5930
  );
5921
5931
  return /* @__PURE__ */ e.jsxs("section", { className: "relative flex min-w-[320px] grow flex-col border-l px-1", children: [
5922
5932
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex items-center justify-between gap-2 px-3", children: [
@@ -5932,7 +5942,7 @@ function kr() {
5932
5942
  )
5933
5943
  ] }),
5934
5944
  /* @__PURE__ */ e.jsx("div", { className: "flex grow", children: /* @__PURE__ */ e.jsx(
5935
- Ha,
5945
+ Ht,
5936
5946
  {
5937
5947
  ColumnsComponent: () => (
5938
5948
  // schemaName, tableName, columns
@@ -5946,21 +5956,21 @@ function kr() {
5946
5956
  ] });
5947
5957
  }
5948
5958
  function zr() {
5949
- const s = w((n) => n.dashboard.filters), t = w((n) => n.theme), a = s == null ? void 0 : s.filter((n) => n.hide);
5950
- return a != null && a.length ? /* @__PURE__ */ e.jsx(
5959
+ const s = w((n) => n.dashboard.filters), a = w((n) => n.theme), t = s == null ? void 0 : s.filter((n) => n.hide);
5960
+ return t != null && t.length ? /* @__PURE__ */ e.jsx(
5951
5961
  "div",
5952
5962
  {
5953
5963
  className: Y("mb-1 flex items-center gap-2 border-y px-0.5 pb-0.5", {
5954
- "bg-[repeating-linear-gradient(45deg,_#ffffff_0_3px,_#f3f3f3_3px_6px)]": t === "light",
5955
- "bg-[repeating-linear-gradient(45deg,_#18171d_0_3px,_#272729_3px_6px)]": t === "dark"
5964
+ "bg-[repeating-linear-gradient(45deg,_#ffffff_0_3px,_#f3f3f3_3px_6px)]": a === "light",
5965
+ "bg-[repeating-linear-gradient(45deg,_#18171d_0_3px,_#272729_3px_6px)]": a === "dark"
5956
5966
  }),
5957
- children: a == null ? void 0 : a.map((n) => /* @__PURE__ */ e.jsxs(
5967
+ children: t == null ? void 0 : t.map((n) => /* @__PURE__ */ e.jsxs(
5958
5968
  "div",
5959
5969
  {
5960
5970
  className: "flex min-w-[250px] max-w-fit flex-col gap-1 p-2",
5961
5971
  children: [
5962
- /* @__PURE__ */ e.jsx(Ma, { filter: n }),
5963
- /* @__PURE__ */ e.jsx(ka, { filter: n })
5972
+ /* @__PURE__ */ e.jsx(Mt, { filter: n }),
5973
+ /* @__PURE__ */ e.jsx(kt, { filter: n })
5964
5974
  ]
5965
5975
  },
5966
5976
  n.id
@@ -5969,7 +5979,7 @@ function zr() {
5969
5979
  ) : null;
5970
5980
  }
5971
5981
  function Or() {
5972
- const s = w((n) => n.showFilters), t = w((n) => n.isVisualEditing), a = w(
5982
+ const s = w((n) => n.showFilters), a = w((n) => n.isVisualEditing), t = w(
5973
5983
  (n) => n.isDashboardEditing
5974
5984
  );
5975
5985
  return /* @__PURE__ */ e.jsxs(
@@ -5977,15 +5987,15 @@ function Or() {
5977
5987
  {
5978
5988
  role: "dashboard-plus-main",
5979
5989
  className: Y("", {
5980
- "max-h-0 overflow-hidden": t,
5981
- "flex grow overflow-auto": !t
5990
+ "max-h-0 overflow-hidden": a,
5991
+ "flex grow overflow-auto": !a
5982
5992
  // can't do h-full because parent container has dashboard controls (10px height)
5983
5993
  //**overflow-auto** is needed to prevent the tabs from overflowing the container - important for chatbox
5984
5994
  }),
5985
5995
  children: [
5986
5996
  /* @__PURE__ */ e.jsxs("section", { className: "flex grow flex-col", children: [
5987
- a && /* @__PURE__ */ e.jsx(zr, {}),
5988
- /* @__PURE__ */ e.jsx(In, {})
5997
+ t && /* @__PURE__ */ e.jsx(zr, {}),
5998
+ /* @__PURE__ */ e.jsx(On, {})
5989
5999
  ] }),
5990
6000
  s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(kr, {}) })
5991
6001
  ]
@@ -5993,7 +6003,7 @@ function Or() {
5993
6003
  );
5994
6004
  }
5995
6005
  function Ir() {
5996
- const s = w((l) => l.dashboard), t = w((l) => l.actions.setDashboard), a = w(
6006
+ const s = w((l) => l.dashboard), a = w((l) => l.actions.setDashboard), t = w(
5997
6007
  (l) => l.showDashboardJSON
5998
6008
  ), n = w(
5999
6009
  (l) => l.actions.setShowDashboardJSON
@@ -6002,7 +6012,7 @@ function Ir() {
6002
6012
  "div",
6003
6013
  {
6004
6014
  className: Y("relative p-2", {
6005
- hidden: !a
6015
+ hidden: !t
6006
6016
  }),
6007
6017
  children: [
6008
6018
  /* @__PURE__ */ e.jsxs(
@@ -6019,12 +6029,12 @@ function Ir() {
6019
6029
  }
6020
6030
  ),
6021
6031
  /* @__PURE__ */ e.jsx(
6022
- Tn,
6032
+ In,
6023
6033
  {
6024
6034
  onChange: (l) => {
6025
6035
  if (l)
6026
6036
  try {
6027
- JSON.parse(l), t(JSON.parse(l));
6037
+ JSON.parse(l), a(JSON.parse(l));
6028
6038
  } catch {
6029
6039
  }
6030
6040
  },
@@ -6053,14 +6063,14 @@ function Ir() {
6053
6063
  }
6054
6064
  function Fr({
6055
6065
  showControls: s = !1,
6056
- showFooter: t = !0,
6057
- ...a
6066
+ showFooter: a = !0,
6067
+ ...t
6058
6068
  }) {
6059
- return /* @__PURE__ */ e.jsx(hs, { FallbackComponent: Da, children: /* @__PURE__ */ e.jsxs(Mn, { dashboardProps: a, children: [
6060
- /* @__PURE__ */ e.jsx(Dn, {}),
6061
- /* @__PURE__ */ e.jsxs(Fn, { children: [
6069
+ return /* @__PURE__ */ e.jsx(hs, { FallbackComponent: Dt, children: /* @__PURE__ */ e.jsxs(Tn, { dashboardProps: t, children: [
6070
+ /* @__PURE__ */ e.jsx(Mn, {}),
6071
+ /* @__PURE__ */ e.jsxs(Dn, { children: [
6062
6072
  /* @__PURE__ */ e.jsx(Ir, {}),
6063
- /* @__PURE__ */ e.jsxs(Ln, { ...a, children: [
6073
+ /* @__PURE__ */ e.jsxs(Fn, { ...t, children: [
6064
6074
  s && /* @__PURE__ */ e.jsx(gl, {}),
6065
6075
  /* @__PURE__ */ e.jsx(Sr, {}),
6066
6076
  /* @__PURE__ */ e.jsx(Or, {})
@@ -6070,47 +6080,47 @@ function Fr({
6070
6080
  }
6071
6081
  export {
6072
6082
  Ee as A,
6073
- Vn as B,
6074
- qn as C,
6083
+ En as B,
6084
+ An as C,
6075
6085
  Fr as D,
6076
6086
  Bs as E,
6077
- Bn as F,
6078
- Un as G,
6079
- Gn as H,
6087
+ $n as F,
6088
+ Bn as G,
6089
+ Un as H,
6080
6090
  $e as I,
6081
- Ra as J,
6091
+ Rt as J,
6082
6092
  cl as K,
6083
- Kn as L,
6084
- Aa as M,
6085
- Yn as N,
6086
- el as P,
6087
- sl as R,
6088
- al as S,
6093
+ Wn as L,
6094
+ At as M,
6095
+ Xn as N,
6096
+ Yn as P,
6097
+ el as R,
6098
+ sl as S,
6089
6099
  Us as T,
6090
- An as a,
6100
+ Vn as a,
6091
6101
  Ps as b,
6092
6102
  $s as c,
6093
- La as d,
6094
- Ea as e,
6095
- Va as f,
6096
- Rn as g,
6097
- _n as h,
6098
- Hn as i,
6099
- Pn as j,
6100
- $n as k,
6101
- Jn as l,
6102
- Wn as m,
6103
- Qn as n,
6104
- Zn as o,
6103
+ Lt as d,
6104
+ Et as e,
6105
+ Vt as f,
6106
+ qn as g,
6107
+ Rn as h,
6108
+ _n as i,
6109
+ Hn as j,
6110
+ Pn as k,
6111
+ Gn as l,
6112
+ Jn as m,
6113
+ Kn as n,
6114
+ Qn as o,
6105
6115
  Qe as p,
6106
- Xn as q,
6107
- qa as r,
6116
+ Zn as q,
6117
+ qt as r,
6108
6118
  tl as s,
6109
- nl as t,
6110
- ll as u,
6111
- rl as v,
6112
- il as w,
6113
- ol as x,
6119
+ al as t,
6120
+ nl as u,
6121
+ ll as v,
6122
+ rl as w,
6123
+ il as x,
6114
6124
  Gs as y,
6115
6125
  pl as z
6116
6126
  };