react-semaphor 0.0.327 → 0.0.328

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 V, q as zs, u as z, r as Os, s as ke, t as e, v as Fs, w as Is, x as O, k as Ds, y as Ts, z as Ls, A as Ms, E as Es, H as R, J as le, K as la, M as ra, N as ia, O as oa, Q as st, R as at, V as tt, W as Js, Y as Q, Z as Je, h as nt, _ as m, $ as lt, F as ca, a0 as Ke, a1 as We, a2 as da, a3 as rt, a4 as ua, a5 as me, a6 as he, a7 as xe, a8 as pe, a9 as Ne, aa as fe, ab as K, T as As, ac as Vs, ad as qs, ae as Rs, af as ma, ag as ha, ah as de, ai as it, aj as ot, ak as xa, al as ct, C as dt, am as ut, an as pa, B as mt, ao as qe, ap as ht, aq as Ks, ar as fa, as as ys, at as Ce, au as Fe, av as Se, aw as ga, ax as xt, ay as pt, az as ft, aA as gt, I as jt, aB as bt, aC as yt, aD as vt, aE as Re, aF as vs, aG as Ct, a as Nt, aH as Ge, aI as Cs, aJ as Ae, aK as Ns, aL as St, aM as wt, aN as kt, aO as zt, aP as Ot, aQ as Ft, aR as bs, aS as It, aT as Ws, aU as Dt, aV as Ys, aW as Tt, aX as Lt, aY as Mt, aZ as Et, a_ as ja, a$ as re, b0 as _s, b1 as ba, b2 as At, b3 as Vt, b4 as ls, b5 as qt, b6 as Rt, b7 as _t, b8 as Ht, o as $t, b9 as Pt, ba as Bt, bb as Ut, n as Gt, bc as us, bd as ya, be as va, bf as Ca, bg as rs, bh as Na, bi as is, bj as Xs, bk as Qt, bl as Jt, bm as ms, bn as hs, bo as xs, bp as Kt, X as Sa, bq as Wt, br as Yt, bs as Xt, bt as ps, bu as Ie, f as Zt, bv as Ue, bw as Hs, bx as wa, by as en, bz as sn, bA as os, bB as an, bC as tn, bD as nn, bE as Zs, bF as ln, bG as rn, bH as on, bI as cn, bJ as dn, bK as un, bL as mn, bM as hn, bN as De, bO as B, bP as U, bQ as $s, bR as G, bS as xn, bT as ka, bU as pn, bV as fn, bW as gn, bX as jn, bY as bn, bZ as yn, b_ as vn, b$ as Cn, c0 as Nn } from "./index-D9w7Qyp6.js";
1
+ import { c as V, q as Os, u as z, r as Fs, s as ze, t as e, v as Is, w as Ds, x as O, k as Ts, y as Ls, z as Ms, A as Es, E as As, H as R, J as le, K as la, M as ra, N as ia, O as oa, Q as st, R as at, V as tt, W as Ks, Y as Q, Z as Je, h as nt, _ as m, $ as lt, F as ca, a0 as Ke, a1 as We, a2 as da, a3 as rt, a4 as ua, a5 as me, a6 as he, a7 as xe, a8 as pe, a9 as Se, aa as fe, ab as K, T as Vs, ac as qs, ad as Rs, ae as _s, af as ma, ag as ha, ah as de, ai as it, aj as ot, ak as xa, al as ct, C as dt, am as ut, an as pa, B as mt, ao as De, ap as ht, aq as os, ar as fa, as as Ns, at as Ce, au as Ie, av as we, aw as ga, ax as xt, ay as pt, az as ft, aA as gt, I as jt, aB as bt, aC as yt, aD as vt, aE as Re, aF as Ss, aG as Ct, a as Nt, aH as Ge, aI as cs, aJ as Ne, aK as ds, aL as St, aM as wt, aN as kt, aO as zt, aP as Ot, aQ as Cs, aR as Ft, aS as Ws, aT as It, aU as Ys, aV as Dt, aW as Tt, aX as Lt, aY as Mt, aZ as ja, a_ as re, a$ as Hs, b0 as ba, b1 as Et, b2 as At, b3 as ls, b4 as Vt, b5 as qt, b6 as Rt, b7 as _t, o as Ht, b8 as $t, b9 as Pt, ba as Bt, n as Ut, bb as xs, bc as ya, bd as va, be as Ca, bf as rs, bg as Na, bh as is, bi as Xs, bj as Gt, bk as Qt, bl as ps, bm as fs, bn as gs, bo as Jt, X as Sa, bp as Kt, bq as Wt, br as Yt, bs as js, bt as Te, f as Xt, bu as Ue, bv as $s, bw as wa, bx as Zt, by as en, bz as us, bA as sn, bB as an, bC as tn, bD as Zs, bE as nn, bF as ln, bG as rn, bH as on, bI as cn, bJ as dn, bK as un, bL as mn, bM as Le, bN as B, bO as U, bP as Ps, bQ as G, bR as hn, bS as ka, bT as xn, bU as pn, bV as fn, bW as gn, bX as jn, bY as bn, bZ as yn, b_ as vn, b$ as Cn } from "./index-DRTY2Nyf.js";
2
2
  import * as ea from "react";
3
- import we, { useState as q, useMemo as Ss, useEffect as Z, useRef as ws, Suspense as Sn } from "react";
3
+ import ke, { useState as q, useMemo as ws, useEffect as Z, useRef as ks, Suspense as Nn } 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 wn = V("Box", [
11
+ const Sn = V("Box", [
12
12
  [
13
13
  "path",
14
14
  {
@@ -25,7 +25,7 @@ const wn = V("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 kn = V("ChartArea", [
28
+ const wn = V("ChartArea", [
29
29
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
30
30
  [
31
31
  "path",
@@ -41,7 +41,7 @@ const kn = V("ChartArea", [
41
41
  * This source code is licensed under the ISC license.
42
42
  * See the LICENSE file in the root directory of this source tree.
43
43
  */
44
- const Ps = V("ChartColumnIncreasing", [
44
+ const Bs = V("ChartColumnIncreasing", [
45
45
  ["path", { d: "M13 17V9", key: "1fwyjl" }],
46
46
  ["path", { d: "M18 17V5", key: "sfb6ij" }],
47
47
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
@@ -53,7 +53,7 @@ const Ps = V("ChartColumnIncreasing", [
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
55
  */
56
- const Bs = V("ChartLine", [
56
+ const Us = V("ChartLine", [
57
57
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
58
58
  ["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
59
59
  ]);
@@ -104,7 +104,7 @@ const Fa = V("ChartScatter", [
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
106
  */
107
- const zn = V("CircleX", [
107
+ const kn = V("CircleX", [
108
108
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
109
109
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
110
110
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -115,7 +115,7 @@ const zn = V("CircleX", [
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
117
  */
118
- const On = V("CopyPlus", [
118
+ const zn = V("CopyPlus", [
119
119
  ["line", { x1: "15", x2: "15", y1: "12", y2: "18", key: "1p7wdc" }],
120
120
  ["line", { x1: "12", x2: "18", y1: "15", y2: "15", key: "1nscbv" }],
121
121
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
@@ -127,7 +127,7 @@ const On = V("CopyPlus", [
127
127
  * This source code is licensed under the ISC license.
128
128
  * See the LICENSE file in the root directory of this source tree.
129
129
  */
130
- const Fn = V("Database", [
130
+ const On = V("Database", [
131
131
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
132
132
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
133
133
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
@@ -149,7 +149,7 @@ const Ia = V("EllipsisVertical", [
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
151
  */
152
- const In = V("Eraser", [
152
+ const Fn = V("Eraser", [
153
153
  [
154
154
  "path",
155
155
  {
@@ -166,7 +166,7 @@ const In = V("Eraser", [
166
166
  * This source code is licensed under the ISC license.
167
167
  * See the LICENSE file in the root directory of this source tree.
168
168
  */
169
- const Dn = V("EyeClosed", [
169
+ const In = V("EyeClosed", [
170
170
  ["path", { d: "m15 18-.722-3.25", key: "1j64jw" }],
171
171
  ["path", { d: "M2 8a10.645 10.645 0 0 0 20 0", key: "1e7gxb" }],
172
172
  ["path", { d: "m20 15-1.726-2.05", key: "1cnuld" }],
@@ -179,7 +179,7 @@ const Dn = V("EyeClosed", [
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
181
  */
182
- const Tn = V("Eye", [
182
+ const Dn = V("Eye", [
183
183
  [
184
184
  "path",
185
185
  {
@@ -195,7 +195,7 @@ const Tn = V("Eye", [
195
195
  * This source code is licensed under the ISC license.
196
196
  * See the LICENSE file in the root directory of this source tree.
197
197
  */
198
- const Ln = V("Glasses", [
198
+ const Tn = V("Glasses", [
199
199
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
200
200
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
201
201
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -208,7 +208,7 @@ const Ln = V("Glasses", [
208
208
  * This source code is licensed under the ISC license.
209
209
  * See the LICENSE file in the root directory of this source tree.
210
210
  */
211
- const Mn = V("Hammer", [
211
+ const Ln = V("Hammer", [
212
212
  ["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
213
213
  ["path", { d: "m18 15 4-4", key: "16gjal" }],
214
214
  [
@@ -225,7 +225,7 @@ const Mn = V("Hammer", [
225
225
  * This source code is licensed under the ISC license.
226
226
  * See the LICENSE file in the root directory of this source tree.
227
227
  */
228
- const En = V("Hash", [
228
+ const Mn = V("Hash", [
229
229
  ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
230
230
  ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
231
231
  ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
@@ -237,7 +237,7 @@ const En = V("Hash", [
237
237
  * This source code is licensed under the ISC license.
238
238
  * See the LICENSE file in the root directory of this source tree.
239
239
  */
240
- const An = V("House", [
240
+ const En = V("House", [
241
241
  ["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
242
242
  [
243
243
  "path",
@@ -253,7 +253,7 @@ const An = V("House", [
253
253
  * This source code is licensed under the ISC license.
254
254
  * See the LICENSE file in the root directory of this source tree.
255
255
  */
256
- const Vn = V("IdCard", [
256
+ const An = V("IdCard", [
257
257
  ["path", { d: "M16 10h2", key: "8sgtl7" }],
258
258
  ["path", { d: "M16 14h2", key: "epxaof" }],
259
259
  ["path", { d: "M6.17 15a3 3 0 0 1 5.66 0", key: "n6f512" }],
@@ -266,7 +266,7 @@ const Vn = V("IdCard", [
266
266
  * This source code is licensed under the ISC license.
267
267
  * See the LICENSE file in the root directory of this source tree.
268
268
  */
269
- const qn = V("ListEnd", [
269
+ const Vn = V("ListEnd", [
270
270
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
271
271
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
272
272
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -279,7 +279,7 @@ const qn = V("ListEnd", [
279
279
  * This source code is licensed under the ISC license.
280
280
  * See the LICENSE file in the root directory of this source tree.
281
281
  */
282
- const Rn = V("ListStart", [
282
+ const qn = V("ListStart", [
283
283
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
284
284
  ["path", { d: "M16 18H3", key: "12xzn7" }],
285
285
  ["path", { d: "M10 6H3", key: "lf8lx7" }],
@@ -292,7 +292,7 @@ const Rn = V("ListStart", [
292
292
  * This source code is licensed under the ISC license.
293
293
  * See the LICENSE file in the root directory of this source tree.
294
294
  */
295
- const _n = V("ListX", [
295
+ const Rn = V("ListX", [
296
296
  ["path", { d: "M11 12H3", key: "51ecnj" }],
297
297
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
298
298
  ["path", { d: "M16 18H3", key: "12xzn7" }],
@@ -305,7 +305,7 @@ const _n = V("ListX", [
305
305
  * This source code is licensed under the ISC license.
306
306
  * See the LICENSE file in the root directory of this source tree.
307
307
  */
308
- const Ve = V("LoaderCircle", [
308
+ const qe = V("LoaderCircle", [
309
309
  ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
310
310
  ]);
311
311
  /**
@@ -331,7 +331,7 @@ const Da = V("Map", [
331
331
  * This source code is licensed under the ISC license.
332
332
  * See the LICENSE file in the root directory of this source tree.
333
333
  */
334
- const Hn = V("MessageSquareMore", [
334
+ const _n = V("MessageSquareMore", [
335
335
  ["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" }],
336
336
  ["path", { d: "M8 10h.01", key: "19clt8" }],
337
337
  ["path", { d: "M12 10h.01", key: "1nrarc" }],
@@ -343,7 +343,7 @@ const Hn = V("MessageSquareMore", [
343
343
  * This source code is licensed under the ISC license.
344
344
  * See the LICENSE file in the root directory of this source tree.
345
345
  */
346
- const $n = V("Network", [
346
+ const Hn = V("Network", [
347
347
  ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
348
348
  ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
349
349
  ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
@@ -372,7 +372,7 @@ const Ta = V("Pencil", [
372
372
  * This source code is licensed under the ISC license.
373
373
  * See the LICENSE file in the root directory of this source tree.
374
374
  */
375
- const Pn = V("Play", [
375
+ const $n = V("Play", [
376
376
  ["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
377
377
  ]);
378
378
  /**
@@ -381,7 +381,7 @@ const Pn = V("Play", [
381
381
  * This source code is licensed under the ISC license.
382
382
  * See the LICENSE file in the root directory of this source tree.
383
383
  */
384
- const Bn = V("Plug2", [
384
+ const Pn = V("Plug2", [
385
385
  ["path", { d: "M9 2v6", key: "17ngun" }],
386
386
  ["path", { d: "M15 2v6", key: "s7yy2p" }],
387
387
  ["path", { d: "M12 17v5", key: "bb1du9" }],
@@ -394,7 +394,7 @@ const Bn = V("Plug2", [
394
394
  * This source code is licensed under the ISC license.
395
395
  * See the LICENSE file in the root directory of this source tree.
396
396
  */
397
- const Un = V("Save", [
397
+ const Bn = V("Save", [
398
398
  [
399
399
  "path",
400
400
  {
@@ -428,7 +428,7 @@ const La = V("Shapes", [
428
428
  * This source code is licensed under the ISC license.
429
429
  * See the LICENSE file in the root directory of this source tree.
430
430
  */
431
- const Gn = V("ShieldQuestion", [
431
+ const Un = V("ShieldQuestion", [
432
432
  [
433
433
  "path",
434
434
  {
@@ -445,7 +445,7 @@ const Gn = V("ShieldQuestion", [
445
445
  * This source code is licensed under the ISC license.
446
446
  * See the LICENSE file in the root directory of this source tree.
447
447
  */
448
- const Qn = V("Sigma", [
448
+ const Gn = V("Sigma", [
449
449
  [
450
450
  "path",
451
451
  {
@@ -460,7 +460,7 @@ const Qn = V("Sigma", [
460
460
  * This source code is licensed under the ISC license.
461
461
  * See the LICENSE file in the root directory of this source tree.
462
462
  */
463
- const Jn = V("SwatchBook", [
463
+ const Qn = V("SwatchBook", [
464
464
  ["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z", key: "1ldrpk" }],
465
465
  ["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7", key: "11i5po" }],
466
466
  ["path", { d: "M 7 17h.01", key: "1euzgo" }],
@@ -478,7 +478,7 @@ const Jn = V("SwatchBook", [
478
478
  * This source code is licensed under the ISC license.
479
479
  * See the LICENSE file in the root directory of this source tree.
480
480
  */
481
- const Kn = V("Tag", [
481
+ const Jn = V("Tag", [
482
482
  [
483
483
  "path",
484
484
  {
@@ -494,7 +494,7 @@ const Kn = V("Tag", [
494
494
  * This source code is licensed under the ISC license.
495
495
  * See the LICENSE file in the root directory of this source tree.
496
496
  */
497
- const Wn = V("ToggleLeft", [
497
+ const Kn = V("ToggleLeft", [
498
498
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
499
499
  ["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
500
500
  ]);
@@ -504,7 +504,7 @@ const Wn = V("ToggleLeft", [
504
504
  * This source code is licensed under the ISC license.
505
505
  * See the LICENSE file in the root directory of this source tree.
506
506
  */
507
- const Us = V("Type", [
507
+ const Gs = V("Type", [
508
508
  ["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
509
509
  ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
510
510
  ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
@@ -515,7 +515,7 @@ const Us = V("Type", [
515
515
  * This source code is licensed under the ISC license.
516
516
  * See the LICENSE file in the root directory of this source tree.
517
517
  */
518
- const Yn = V("User", [
518
+ const Wn = V("User", [
519
519
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
520
520
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
521
521
  ]);
@@ -531,14 +531,14 @@ function Ma(s) {
531
531
  var d;
532
532
  return {
533
533
  ...l,
534
- cards: (d = l.cards) == null ? void 0 : d.map((r) => Xn(r))
534
+ cards: (d = l.cards) == null ? void 0 : d.map((r) => Yn(r))
535
535
  };
536
536
  })
537
537
  };
538
538
  })
539
539
  };
540
540
  }
541
- function Xn(s) {
541
+ function Yn(s) {
542
542
  var t, a, n, l;
543
543
  return {
544
544
  ...s,
@@ -553,12 +553,12 @@ function Xn(s) {
553
553
  }))
554
554
  }
555
555
  },
556
- customCfg: Zn(s.customCfg),
556
+ customCfg: Xn(s.customCfg),
557
557
  // if customCfg is present, clean it, otherwise return null{
558
558
  data: []
559
559
  };
560
560
  }
561
- function Zn(s) {
561
+ function Xn(s) {
562
562
  var t, a;
563
563
  return s ? {
564
564
  ...s,
@@ -572,22 +572,22 @@ function Zn(s) {
572
572
  }
573
573
  } : null;
574
574
  }
575
- async function el(s, t, a, n) {
575
+ async function Zn(s, t, a, n) {
576
576
  if (!n)
577
577
  return null;
578
578
  const l = JSON.stringify(t);
579
- return await zs("https://semaphor.cloud/api/v1/lens", n, {
579
+ return await Os("https://semaphor.cloud/api/v1/lens", n, {
580
580
  name: s,
581
581
  template: l,
582
582
  filterValues: a,
583
583
  operation: "create"
584
584
  });
585
585
  }
586
- async function ks(s, t) {
586
+ async function zs(s, t) {
587
587
  if (!t)
588
588
  return null;
589
589
  const { id: a, template: n, filterValues: l, isDefault: d, shared: r } = s;
590
- return await zs("https://semaphor.cloud/api/v1/lens", t, {
590
+ return await Os("https://semaphor.cloud/api/v1/lens", t, {
591
591
  lensId: a,
592
592
  template: n,
593
593
  filterValues: l,
@@ -596,19 +596,19 @@ async function ks(s, t) {
596
596
  operation: "update"
597
597
  });
598
598
  }
599
- async function sl(s, t) {
600
- return t ? await zs("https://semaphor.cloud/api/v1/lens", t, {
599
+ async function el(s, t) {
600
+ return t ? await Os("https://semaphor.cloud/api/v1/lens", t, {
601
601
  operation: "delete",
602
602
  lensId: s
603
603
  }) : null;
604
604
  }
605
- function al() {
606
- const [s, t] = q(""), [a, n] = q(!1), l = z((C) => C.lenses), { setLenses: d, setSelectedLensId: r } = Os(), [o, c] = q(!1), [p, u] = q(!1), b = z((C) => C.dashboard), g = z((C) => C.filterValues), { authToken: h } = ke();
605
+ function sl() {
606
+ const [s, t] = q(""), [a, n] = q(!1), l = z((C) => C.lenses), { setLenses: d, setSelectedLensId: r } = Fs(), [o, c] = q(!1), [p, u] = q(!1), b = z((C) => C.dashboard), g = z((C) => C.filterValues), { authToken: h } = ze();
607
607
  async function j() {
608
608
  c(!0);
609
609
  const C = Ma(
610
610
  b
611
- ), F = await el(
611
+ ), F = await Zn(
612
612
  s,
613
613
  C,
614
614
  g,
@@ -616,23 +616,23 @@ function al() {
616
616
  );
617
617
  F && (d([...l || [], F]), r(F.id), u(!1)), c(!1);
618
618
  }
619
- return /* @__PURE__ */ e.jsxs(Fs, { open: p, onOpenChange: u, children: [
620
- /* @__PURE__ */ e.jsx(Is, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
619
+ return /* @__PURE__ */ e.jsxs(Is, { open: p, onOpenChange: u, children: [
620
+ /* @__PURE__ */ e.jsx(Ds, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
621
621
  O,
622
622
  {
623
623
  variant: "secondary",
624
624
  className: "h-7 p-2",
625
625
  size: "sm",
626
626
  children: [
627
- /* @__PURE__ */ e.jsx(Ds, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
627
+ /* @__PURE__ */ e.jsx(Ts, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
628
628
  "Lens"
629
629
  ]
630
630
  }
631
631
  ) }),
632
- /* @__PURE__ */ e.jsxs(Ts, { className: "sm:max-w-[425px]", children: [
633
- /* @__PURE__ */ e.jsxs(Ls, { children: [
634
- /* @__PURE__ */ e.jsx(Ms, { children: "Create Lens" }),
635
- /* @__PURE__ */ e.jsx(Es, { children: "Lenses are private by default and are only visible to you." })
632
+ /* @__PURE__ */ e.jsxs(Ls, { className: "sm:max-w-[425px]", children: [
633
+ /* @__PURE__ */ e.jsxs(Ms, { children: [
634
+ /* @__PURE__ */ e.jsx(Es, { children: "Create Lens" }),
635
+ /* @__PURE__ */ e.jsx(As, { children: "Lenses are private by default and are only visible to you." })
636
636
  ] }),
637
637
  /* @__PURE__ */ e.jsx("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-8 items-center gap-4", children: [
638
638
  /* @__PURE__ */ e.jsx(R, { className: "text-right", children: "Name" }),
@@ -663,13 +663,13 @@ function al() {
663
663
  ] })
664
664
  ] });
665
665
  }
666
- function tl() {
667
- const [s, t] = q(!1), a = z((u) => u.lenses), n = z((u) => u.selectedLensId), { setLenses: l, setSelectedLensId: d } = Os(), { authToken: r } = ke();
666
+ function al() {
667
+ const [s, t] = q(!1), a = z((u) => u.lenses), n = z((u) => u.selectedLensId), { setLenses: l, setSelectedLensId: d } = Fs(), { authToken: r } = ze();
668
668
  async function o(u) {
669
669
  d(u);
670
670
  }
671
671
  async function c(u) {
672
- if (await sl(u, r == null ? void 0 : r.accessToken)) {
672
+ if (await el(u, r == null ? void 0 : r.accessToken)) {
673
673
  const g = a == null ? void 0 : a.filter((h) => h.id !== u);
674
674
  l(g || []), d("original");
675
675
  }
@@ -687,18 +687,18 @@ function tl() {
687
687
  ...u,
688
688
  isDefault: !u.isDefault
689
689
  };
690
- await ks(g, r == null ? void 0 : r.accessToken);
690
+ await zs(g, r == null ? void 0 : r.accessToken);
691
691
  const h = a == null ? void 0 : a.find((j) => j.isDefault);
692
692
  if (h && h.id !== u.id) {
693
693
  const j = {
694
694
  ...h,
695
695
  isDefault: !1
696
696
  };
697
- await ks(j, r == null ? void 0 : r.accessToken);
697
+ await zs(j, r == null ? void 0 : r.accessToken);
698
698
  }
699
699
  }
700
700
  return /* @__PURE__ */ e.jsxs(ra, { open: s, onOpenChange: t, children: [
701
- /* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(O, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(Ln, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
701
+ /* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(O, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(Tn, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
702
702
  /* @__PURE__ */ e.jsxs(oa, { align: "end", className: "w-60", children: [
703
703
  /* @__PURE__ */ e.jsx(st, { className: "px-3", children: "Lenses" }),
704
704
  /* @__PURE__ */ e.jsx(at, {}),
@@ -708,9 +708,9 @@ function tl() {
708
708
  value: n,
709
709
  onValueChange: o,
710
710
  children: [
711
- /* @__PURE__ */ e.jsx(Js, { value: "original", children: "Original" }),
711
+ /* @__PURE__ */ e.jsx(Ks, { value: "original", children: "Original" }),
712
712
  a == null ? void 0 : a.map((u) => /* @__PURE__ */ e.jsxs(
713
- Js,
713
+ Ks,
714
714
  {
715
715
  className: "group flex justify-between gap-2",
716
716
  value: u.id,
@@ -718,7 +718,7 @@ function tl() {
718
718
  /* @__PURE__ */ e.jsx("p", { children: u.name }),
719
719
  /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-3", children: [
720
720
  /* @__PURE__ */ e.jsx(
721
- An,
721
+ En,
722
722
  {
723
723
  onClick: (b) => {
724
724
  b.preventDefault(), p(u);
@@ -754,10 +754,10 @@ function tl() {
754
754
  ] })
755
755
  ] });
756
756
  }
757
- function nl({
757
+ function tl({
758
758
  iconClassName: s
759
759
  }) {
760
- const [t, a] = q(!1), { authToken: n } = ke(), l = z((o) => o.theme), d = z((o) => o.filterValues);
760
+ const [t, a] = q(!1), { authToken: n } = ze(), l = z((o) => o.theme), d = z((o) => o.filterValues);
761
761
  async function r() {
762
762
  {
763
763
  a(!0);
@@ -779,7 +779,7 @@ function nl({
779
779
  className: "group h-7 p-2",
780
780
  size: "sm",
781
781
  onClick: r,
782
- children: t ? /* @__PURE__ */ e.jsx(Ve, { className: Q("size-3.5 animate-spin", s) }) : /* @__PURE__ */ e.jsx(
782
+ children: t ? /* @__PURE__ */ e.jsx(qe, { className: Q("size-3.5 animate-spin", s) }) : /* @__PURE__ */ e.jsx(
783
783
  nt,
784
784
  {
785
785
  className: Q("size-3.5", s),
@@ -789,9 +789,9 @@ function nl({
789
789
  }
790
790
  );
791
791
  }
792
- function ll() {
792
+ function nl() {
793
793
  q(!1);
794
- const { authToken: s } = ke();
794
+ const { authToken: s } = ze();
795
795
  z((f) => f.theme);
796
796
  const t = z((f) => f.lenses), a = z((f) => f.selectedLensId), n = t == null ? void 0 : t.find((f) => f.id === a), l = z((f) => f.dashboard);
797
797
  z((f) => f.selectedSheetId);
@@ -807,10 +807,10 @@ function ll() {
807
807
  (f) => f.actions.setShowFilters
808
808
  ), { addFrame: j, setSelectedFrameId: C } = z(
809
809
  (f) => f.actions
810
- ), { getSelectedSheet: F, setIsDashboardEditing: y, setShowDashboardJSON: T } = z((f) => f.actions), I = F(), { tenantId: A, endUserId: N } = Ss(
810
+ ), { getSelectedSheet: F, setIsDashboardEditing: y, setShowDashboardJSON: T } = z((f) => f.actions), I = F(), { tenantId: A, endUserId: N } = ws(
811
811
  () => lt(s == null ? void 0 : s.accessToken),
812
812
  [s == null ? void 0 : s.accessToken]
813
- ), S = Ss(() => A || N, [A, N]), L = () => {
813
+ ), S = ws(() => A || N, [A, N]), L = () => {
814
814
  if (!d || !I) return;
815
815
  const f = {
816
816
  connectionId: r,
@@ -846,7 +846,7 @@ function ll() {
846
846
  template: k,
847
847
  filterValues: p
848
848
  };
849
- await ks(M, s == null ? void 0 : s.accessToken), We.success("Lens saved"), g == null || g(f), c(!1);
849
+ await zs(M, s == null ? void 0 : s.accessToken), We.success("Lens saved"), g == null || g(f), c(!1);
850
850
  }
851
851
  return u ? null : /* @__PURE__ */ e.jsxs(
852
852
  "div",
@@ -856,9 +856,9 @@ function ll() {
856
856
  children: [
857
857
  !u && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ e.jsx(R, { children: n == null ? void 0 : n.name }) }),
858
858
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
859
- /* @__PURE__ */ e.jsx(nl, {}),
860
- d && !u && S && /* @__PURE__ */ e.jsx(al, {}),
861
- !u && S && /* @__PURE__ */ e.jsx(tl, {}),
859
+ /* @__PURE__ */ e.jsx(tl, {}),
860
+ d && !u && S && /* @__PURE__ */ e.jsx(sl, {}),
861
+ !u && S && /* @__PURE__ */ e.jsx(al, {}),
862
862
  d && !u && /* @__PURE__ */ e.jsxs(
863
863
  O,
864
864
  {
@@ -868,7 +868,7 @@ function ll() {
868
868
  disabled: !d,
869
869
  onClick: L,
870
870
  children: [
871
- /* @__PURE__ */ e.jsx(Ds, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
871
+ /* @__PURE__ */ e.jsx(Ts, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
872
872
  "Frame"
873
873
  ]
874
874
  }
@@ -904,7 +904,7 @@ function ll() {
904
904
  disabled: o,
905
905
  onClick: v,
906
906
  size: "sm",
907
- children: /* @__PURE__ */ e.jsx(Un, { className: "h-4 w-4", strokeWidth: 1.5 })
907
+ children: /* @__PURE__ */ e.jsx(Bn, { className: "h-4 w-4", strokeWidth: 1.5 })
908
908
  }
909
909
  ),
910
910
  !b && !u && d && /* @__PURE__ */ e.jsx(
@@ -940,15 +940,15 @@ function Be({
940
940
  const b = n ? "Loading..." : l ? "Error" : a;
941
941
  function g() {
942
942
  if (s === "Connection")
943
- return /* @__PURE__ */ e.jsx(Bn, { className: "size-4 rotate-90" });
943
+ return /* @__PURE__ */ e.jsx(Pn, { className: "size-4 rotate-90" });
944
944
  if (s === "Database")
945
- return /* @__PURE__ */ e.jsx(Fn, { className: "size-4" });
945
+ return /* @__PURE__ */ e.jsx(On, { className: "size-4" });
946
946
  if (s === "Schema")
947
- return /* @__PURE__ */ e.jsx($n, { className: "size-4" });
947
+ return /* @__PURE__ */ e.jsx(Hn, { className: "size-4" });
948
948
  if (s === "Table")
949
- return /* @__PURE__ */ e.jsx(As, { className: "size-4" });
949
+ return /* @__PURE__ */ e.jsx(Vs, { className: "size-4" });
950
950
  if (s === "Model")
951
- return /* @__PURE__ */ e.jsx(wn, { className: "size-4" });
951
+ return /* @__PURE__ */ e.jsx(Sn, { className: "size-4" });
952
952
  }
953
953
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
954
954
  p && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: d ? /* @__PURE__ */ e.jsxs(da, { children: [
@@ -971,7 +971,7 @@ function Be({
971
971
  )
972
972
  }
973
973
  ),
974
- /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
974
+ /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
975
975
  n ? /* @__PURE__ */ e.jsx(fe, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(fe, { children: s }),
976
976
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
977
977
  o && /* @__PURE__ */ e.jsx(K, { value: "none", children: "None" }, "none"),
@@ -982,7 +982,7 @@ function Be({
982
982
  ] })
983
983
  ] });
984
984
  }
985
- function rl({ column: s }) {
985
+ function ll({ column: s }) {
986
986
  const [t, a] = q(!1), n = m((h) => h.selectedTableName), l = m(
987
987
  (h) => h.selectedSchemaName
988
988
  ), d = m(
@@ -1046,10 +1046,10 @@ function rl({ column: s }) {
1046
1046
  )
1047
1047
  ] });
1048
1048
  }
1049
- return /* @__PURE__ */ e.jsxs(Vs, { openDelay: 0, open: t, onOpenChange: a, children: [
1050
- /* @__PURE__ */ e.jsx(qs, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ia, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
1049
+ return /* @__PURE__ */ e.jsxs(qs, { openDelay: 0, open: t, onOpenChange: a, children: [
1050
+ /* @__PURE__ */ e.jsx(Rs, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ia, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
1051
1051
  /* @__PURE__ */ e.jsx(
1052
- Rs,
1052
+ _s,
1053
1053
  {
1054
1054
  align: "center",
1055
1055
  className: "w-20 rounded-md p-0 shadow-none",
@@ -1062,15 +1062,15 @@ function Ea({ column: s }) {
1062
1062
  return /* @__PURE__ */ e.jsxs(da, { children: [
1063
1063
  /* @__PURE__ */ e.jsx(it, { asChild: !0, children: ot.includes(s.data_type.toLowerCase()) ? (
1064
1064
  // <span className=" font-thin">T</span>
1065
- /* @__PURE__ */ e.jsx(Us, { className: "size-3" })
1065
+ /* @__PURE__ */ e.jsx(Gs, { className: "size-3" })
1066
1066
  ) : xa.includes(s.data_type.toLowerCase()) ? (
1067
1067
  //
1068
- /* @__PURE__ */ e.jsx(En, { className: "size-3" })
1069
- ) : ct.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(dt, { className: "size-3" }) : ut.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Wn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Gn, { className: "size-3" }) }),
1068
+ /* @__PURE__ */ e.jsx(Mn, { className: "size-3" })
1069
+ ) : ct.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(dt, { className: "size-3" }) : ut.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Kn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Un, { className: "size-3" }) }),
1070
1070
  /* @__PURE__ */ e.jsx(ua, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
1071
1071
  ] });
1072
1072
  }
1073
- function il({
1073
+ function rl({
1074
1074
  schemaName: s,
1075
1075
  tableName: t,
1076
1076
  columns: a,
@@ -1138,7 +1138,7 @@ function il({
1138
1138
  const v = (M = y == null ? void 0 : y.find(
1139
1139
  (H) => H.id === p
1140
1140
  )) == null ? void 0 : M.name;
1141
- console.log("modelName", v), p && p !== "none" && (x = `${ys}.${v}`);
1141
+ console.log("modelName", v), p && p !== "none" && (x = `${Ns}.${v}`);
1142
1142
  let f = x;
1143
1143
  return ((H) => /[A-Z]/.test(H))(t) && (f = f.split(".").map((P) => `"${P}"`).join(".")), f;
1144
1144
  }
@@ -1182,7 +1182,7 @@ function il({
1182
1182
  variant: "secondary",
1183
1183
  className: "flex",
1184
1184
  children: [
1185
- n !== "Success" ? /* @__PURE__ */ e.jsx(Ve, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Jn, { className: "mr-2 size-4" }),
1185
+ n !== "Success" ? /* @__PURE__ */ e.jsx(qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Qn, { className: "mr-2 size-4" }),
1186
1186
  "Top 10"
1187
1187
  ]
1188
1188
  }
@@ -1196,14 +1196,14 @@ function il({
1196
1196
  variant: "secondary",
1197
1197
  className: "flex",
1198
1198
  children: [
1199
- n !== "Success" ? /* @__PURE__ */ e.jsx(Ve, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Qn, { className: "mr-2 size-4" }),
1199
+ n !== "Success" ? /* @__PURE__ */ e.jsx(qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Gn, { className: "mr-2 size-4" }),
1200
1200
  "Count"
1201
1201
  ]
1202
1202
  }
1203
1203
  )
1204
1204
  ] }),
1205
1205
  /* @__PURE__ */ e.jsxs(
1206
- qe,
1206
+ De,
1207
1207
  {
1208
1208
  className: "flex-1 basis-0 overflow-y-auto border-b border-t border-muted py-3",
1209
1209
  children: [
@@ -1227,15 +1227,15 @@ function il({
1227
1227
  {
1228
1228
  onClick: (v) => v.stopPropagation(),
1229
1229
  className: "flex items-center justify-end",
1230
- children: xa.includes(x.data_type) && /* @__PURE__ */ e.jsx(rl, { column: x })
1230
+ children: xa.includes(x.data_type) && /* @__PURE__ */ e.jsx(ll, { column: x })
1231
1231
  }
1232
1232
  )
1233
1233
  ]
1234
1234
  },
1235
1235
  x.column_name
1236
1236
  )),
1237
- /* @__PURE__ */ e.jsx(Ks, { orientation: "vertical" }),
1238
- /* @__PURE__ */ e.jsx(Ks, { orientation: "horizontal" })
1237
+ /* @__PURE__ */ e.jsx(os, { orientation: "vertical" }),
1238
+ /* @__PURE__ */ e.jsx(os, { orientation: "horizontal" })
1239
1239
  ]
1240
1240
  }
1241
1241
  )
@@ -1243,8 +1243,8 @@ function il({
1243
1243
  }
1244
1244
  function _e(s, t) {
1245
1245
  var Xe, Ze, es, ss, as;
1246
- let a = Ss(() => [], []);
1247
- const n = ke().authToken || s, l = m(
1246
+ let a = ws(() => [], []);
1247
+ const n = ze().authToken || s, l = m(
1248
1248
  (i) => i.selectedConnectionId
1249
1249
  ), d = m(
1250
1250
  (i) => i.selectedDatamodelId
@@ -1280,7 +1280,7 @@ function _e(s, t) {
1280
1280
  isError: N
1281
1281
  } = Ce({
1282
1282
  queryKey: ["connections"],
1283
- queryFn: () => Fe(
1283
+ queryFn: () => Ie(
1284
1284
  "https://semaphor.cloud/api/v1/connections",
1285
1285
  (n == null ? void 0 : n.accessToken) || ""
1286
1286
  ),
@@ -1292,7 +1292,7 @@ function _e(s, t) {
1292
1292
  isError: x
1293
1293
  } = Ce({
1294
1294
  queryKey: ["models", l],
1295
- queryFn: () => Fe(
1295
+ queryFn: () => Ie(
1296
1296
  "https://semaphor.cloud/api/v1/datamodels",
1297
1297
  (n == null ? void 0 : n.accessToken) || "",
1298
1298
  {
@@ -1311,7 +1311,7 @@ function _e(s, t) {
1311
1311
  refetch: ie
1312
1312
  } = Ce({
1313
1313
  queryKey: ["databases", l],
1314
- queryFn: () => Fe(
1314
+ queryFn: () => Ie(
1315
1315
  "https://semaphor.cloud/api/v1/databases",
1316
1316
  (n == null ? void 0 : n.accessToken) || "",
1317
1317
  {
@@ -1328,7 +1328,7 @@ function _e(s, t) {
1328
1328
  refetch: ee
1329
1329
  } = Ce({
1330
1330
  queryKey: ["schemas", l, r],
1331
- queryFn: () => Fe(
1331
+ queryFn: () => Ie(
1332
1332
  "https://semaphor.cloud/api/v1/schemas",
1333
1333
  (n == null ? void 0 : n.accessToken) || "",
1334
1334
  {
@@ -1351,7 +1351,7 @@ function _e(s, t) {
1351
1351
  r,
1352
1352
  o
1353
1353
  ],
1354
- queryFn: () => Fe(
1354
+ queryFn: () => Ie(
1355
1355
  "https://semaphor.cloud/api/v1/tables",
1356
1356
  (n == null ? void 0 : n.accessToken) || "",
1357
1357
  {
@@ -1363,8 +1363,8 @@ function _e(s, t) {
1363
1363
  enabled: F(f)
1364
1364
  }), {
1365
1365
  data: te,
1366
- isLoading: Le,
1367
- isFetching: ze,
1366
+ isLoading: Ee,
1367
+ isFetching: Oe,
1368
1368
  isError: je
1369
1369
  } = Ce({
1370
1370
  queryKey: [
@@ -1375,7 +1375,7 @@ function _e(s, t) {
1375
1375
  o,
1376
1376
  c
1377
1377
  ],
1378
- queryFn: () => Fe(
1378
+ queryFn: () => Ie(
1379
1379
  "https://semaphor.cloud/api/v1/columns",
1380
1380
  (n == null ? void 0 : n.accessToken) || "",
1381
1381
  {
@@ -1414,10 +1414,10 @@ function _e(s, t) {
1414
1414
  function ce(i) {
1415
1415
  g(i === "none" ? "" : i), h(""), j(""), i !== "none" && i !== "" && b("");
1416
1416
  }
1417
- function Oe(i) {
1417
+ function Fe(i) {
1418
1418
  u(i);
1419
1419
  }
1420
- function Me(i) {
1420
+ function Ae(i) {
1421
1421
  b(i === "none" ? "" : i), i !== "none" && i !== "" && g("");
1422
1422
  }
1423
1423
  M && ((Ze = M == null ? void 0 : M.databases) == null ? void 0 : Ze.length) > 0, W && ((es = W == null ? void 0 : W.schemas) == null ? void 0 : es.length) > 0, te && ((ss = te == null ? void 0 : te.columns) == null ? void 0 : ss.length) > 0 && (a = te.columns.map((i) => ({
@@ -1433,10 +1433,10 @@ function _e(s, t) {
1433
1433
  ), Pe = (as = S == null ? void 0 : S.datamodels) == null ? void 0 : as.map((i) => ({
1434
1434
  id: i.id,
1435
1435
  name: i.name
1436
- })), Ee = M == null ? void 0 : M.databases.map((i) => ({
1436
+ })), Ve = M == null ? void 0 : M.databases.map((i) => ({
1437
1437
  id: i.database_name,
1438
1438
  name: i.database_name
1439
- })), gs = W == null ? void 0 : W.schemas.map((i) => ({
1439
+ })), ys = W == null ? void 0 : W.schemas.map((i) => ({
1440
1440
  id: i.schema_name,
1441
1441
  name: i.schema_name
1442
1442
  })), Ye = E == null ? void 0 : E.tables.map((i) => ({
@@ -1450,24 +1450,24 @@ function _e(s, t) {
1450
1450
  modelItems: Pe,
1451
1451
  isModelsLoading: L,
1452
1452
  isModelsError: x,
1453
- databaseItems: Ee,
1453
+ databaseItems: Ve,
1454
1454
  isDatabasesLoadingOrFetching: H || P,
1455
1455
  isDatabaseError: Y,
1456
- schemaItems: gs,
1456
+ schemaItems: ys,
1457
1457
  isSchemaLoadingOrFetching: ae || w,
1458
1458
  isSchemaError: _,
1459
1459
  tableItems: Ye,
1460
1460
  isTableLoadingOrFetching: D || se,
1461
1461
  isTableError: $,
1462
1462
  columns: a,
1463
- isColumnsLoadingOrFetching: Le || ze,
1463
+ isColumnsLoadingOrFetching: Ee || Oe,
1464
1464
  isColumnsError: je,
1465
1465
  isNonDbConnection: k,
1466
1466
  connectionType: f,
1467
1467
  tableName: be,
1468
1468
  schemaName: J,
1469
- handleConnectionChange: Oe,
1470
- handleDatamodelChange: Me,
1469
+ handleConnectionChange: Fe,
1470
+ handleDatamodelChange: Ae,
1471
1471
  handleDatabaseChange: ce,
1472
1472
  handleSchemaChange: oe
1473
1473
  };
@@ -1516,7 +1516,7 @@ function Aa({
1516
1516
  } = _e();
1517
1517
  function W() {
1518
1518
  return s ? s(ie, Y, g) : /* @__PURE__ */ e.jsx(
1519
- il,
1519
+ rl,
1520
1520
  {
1521
1521
  schemaName: ie,
1522
1522
  tableName: Y,
@@ -1547,9 +1547,9 @@ function Aa({
1547
1547
  function _() {
1548
1548
  if (t && !f && (!n || n === "none") && (!a || a === "none"))
1549
1549
  return /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3", children: [
1550
- /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Se, {}) }),
1550
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(we, {}) }),
1551
1551
  /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(R, { children: "OR" }) }),
1552
- /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Se, {}) })
1552
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(we, {}) })
1553
1553
  ] });
1554
1554
  }
1555
1555
  function ee() {
@@ -1629,14 +1629,14 @@ function Aa({
1629
1629
  variant: "secondary",
1630
1630
  className: "w-full",
1631
1631
  children: [
1632
- /* @__PURE__ */ e.jsx(Hn, { className: "mr-2 size-4" }),
1632
+ /* @__PURE__ */ e.jsx(_n, { className: "mr-2 size-4" }),
1633
1633
  "Help"
1634
1634
  ]
1635
1635
  }
1636
1636
  ) })
1637
1637
  ] });
1638
1638
  }
1639
- function ol(s) {
1639
+ function il(s) {
1640
1640
  const t = s.toUpperCase().indexOf("WHERE"), a = s.toUpperCase().indexOf("GROUP BY"), n = s.toUpperCase().indexOf("LIMIT"), l = s.toUpperCase().indexOf("ORDER BY");
1641
1641
  let d = s.length;
1642
1642
  if (l !== -1 && (d = l), n !== -1 && n < d && (d = n), t !== -1) {
@@ -1652,21 +1652,21 @@ function ol(s) {
1652
1652
  return `${r} {{ filters | where }} ${o}`;
1653
1653
  }
1654
1654
  }
1655
- function cl({
1655
+ function ol({
1656
1656
  error: s,
1657
1657
  setShowAIDialog: t,
1658
1658
  setUserInputforAI: a,
1659
1659
  setTriggerAIRun: n
1660
1660
  }) {
1661
- return /* @__PURE__ */ e.jsxs(Vs, { openDelay: 0, children: [
1662
- /* @__PURE__ */ e.jsx(qs, { asChild: !0, children: /* @__PURE__ */ e.jsx(O, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(zn, { className: "h-4 w-4 text-red-500" }) }) }),
1661
+ return /* @__PURE__ */ e.jsxs(qs, { openDelay: 0, children: [
1662
+ /* @__PURE__ */ e.jsx(Rs, { asChild: !0, children: /* @__PURE__ */ e.jsx(O, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(kn, { className: "h-4 w-4 text-red-500" }) }) }),
1663
1663
  /* @__PURE__ */ e.jsx(
1664
- Rs,
1664
+ _s,
1665
1665
  {
1666
1666
  align: "start",
1667
1667
  className: "w-full min-w-fit max-w-[700px]",
1668
1668
  children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-2", children: [
1669
- /* @__PURE__ */ e.jsx(qe, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 text-xs leading-relaxed", children: s }) }),
1669
+ /* @__PURE__ */ e.jsx(De, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 text-xs leading-relaxed", children: s }) }),
1670
1670
  /* @__PURE__ */ e.jsxs(
1671
1671
  O,
1672
1672
  {
@@ -1676,7 +1676,7 @@ function cl({
1676
1676
  size: "sm",
1677
1677
  variant: "outline",
1678
1678
  children: [
1679
- /* @__PURE__ */ e.jsx(Mn, { className: "mr-2 h-4 w-4" }),
1679
+ /* @__PURE__ */ e.jsx(Ln, { className: "mr-2 h-4 w-4" }),
1680
1680
  "Debug with AI"
1681
1681
  ]
1682
1682
  }
@@ -1686,7 +1686,7 @@ function cl({
1686
1686
  )
1687
1687
  ] });
1688
1688
  }
1689
- const dl = `
1689
+ const cl = `
1690
1690
 
1691
1691
  Use the following syntax to create a chart query. Please replace the x-axis, y-axis, stack-by, label, and measure with the actual column names of the table.
1692
1692
 
@@ -1733,7 +1733,7 @@ SELECT label, measure FROM table
1733
1733
  - Label - Category
1734
1734
  - Measure - Number
1735
1735
  `;
1736
- function ul({
1736
+ function dl({
1737
1737
  open: s,
1738
1738
  setOpen: t,
1739
1739
  userInput: a,
@@ -1741,7 +1741,7 @@ function ul({
1741
1741
  triggerAIRun: l,
1742
1742
  setTriggerAIRun: d
1743
1743
  }) {
1744
- const r = ws(null), o = ws(null), { authToken: c } = ke(), [p, u] = q(!1), b = m((w) => w.actions.setCardSql), g = z((w) => w.dashboard.baseQueries), h = m((w) => w.actions.setRunSql), j = m((w) => w.actions.setCardType), [C, F] = q([]), y = m((w) => w.currentColumns), T = m((w) => w.card.sql), I = m((w) => w.selectedTableName), A = `
1744
+ const r = ks(null), o = ks(null), { authToken: c } = ze(), [p, u] = q(!1), b = m((w) => w.actions.setCardSql), g = z((w) => w.dashboard.baseQueries), h = m((w) => w.actions.setRunSql), j = m((w) => w.actions.setCardType), [C, F] = q([]), y = m((w) => w.currentColumns), T = m((w) => w.card.sql), I = m((w) => w.selectedTableName), A = `
1745
1745
  ${a}
1746
1746
 
1747
1747
  Database Query Dialect: ${I === "api" || I === "s3" ? "DuckDb" : ""}
@@ -1749,9 +1749,9 @@ function ul({
1749
1749
  Table Columns: ${y == null ? void 0 : y.map((w) => `${w.column_name} | ${w.data_type}`).join(", ")}
1750
1750
  User SQL: ${T}
1751
1751
  ${g && `Base Queries: ${JSON.stringify(g)} `}`, N = ` When the user asks for a specific chart please use the following query structure to generate the chart query. Do not make up the column names. Use only the table columns provided above for the query. Replace x-axis, y-axis, and lables with the appropriate column names.
1752
- Visual Query Syntax: ${dl}`, { data: S, isLoading: L, isFetching: x, isError: v, refetch: f } = Ce({
1752
+ Visual Query Syntax: ${cl}`, { data: S, isLoading: L, isFetching: x, isError: v, refetch: f } = Ce({
1753
1753
  queryKey: ["ai-query"],
1754
- queryFn: () => Fe(
1754
+ queryFn: () => Ie(
1755
1755
  "https://semaphor.cloud/api/v1/ai",
1756
1756
  (c == null ? void 0 : c.accessToken) || "",
1757
1757
  {
@@ -1862,7 +1862,7 @@ function ul({
1862
1862
  {
1863
1863
  className: "flex items-start rounded-md bg-muted p-3 text-sm",
1864
1864
  children: [
1865
- /* @__PURE__ */ e.jsx(Yn, { className: "mr-2 h-5 w-5" }),
1865
+ /* @__PURE__ */ e.jsx(Wn, { className: "mr-2 h-5 w-5" }),
1866
1866
  /* @__PURE__ */ e.jsx("div", { children: w.content })
1867
1867
  ]
1868
1868
  },
@@ -1877,8 +1877,8 @@ function ul({
1877
1877
  _
1878
1878
  ) : /* @__PURE__ */ e.jsx("div", {}, _));
1879
1879
  }
1880
- return /* @__PURE__ */ e.jsxs(Fs, { open: s, onOpenChange: t, children: [
1881
- /* @__PURE__ */ e.jsx(Is, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1880
+ return /* @__PURE__ */ e.jsxs(Is, { open: s, onOpenChange: t, children: [
1881
+ /* @__PURE__ */ e.jsx(Ds, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1882
1882
  O,
1883
1883
  {
1884
1884
  size: "sm",
@@ -1888,13 +1888,13 @@ function ul({
1888
1888
  }
1889
1889
  ) }),
1890
1890
  /* @__PURE__ */ e.jsxs(
1891
- Ts,
1891
+ Ls,
1892
1892
  {
1893
1893
  className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]",
1894
1894
  children: [
1895
- /* @__PURE__ */ e.jsxs(Ls, { children: [
1896
- /* @__PURE__ */ e.jsx(Ms, { children: "Assistant" }),
1897
- /* @__PURE__ */ e.jsx(Es, { children: "What can I help you with?" })
1895
+ /* @__PURE__ */ e.jsxs(Ms, { children: [
1896
+ /* @__PURE__ */ e.jsx(Es, { children: "Assistant" }),
1897
+ /* @__PURE__ */ e.jsx(As, { children: "What can I help you with?" })
1898
1898
  ] }),
1899
1899
  /* @__PURE__ */ e.jsx(
1900
1900
  "div",
@@ -1937,7 +1937,7 @@ function ul({
1937
1937
  size: "sm",
1938
1938
  variant: "ghost",
1939
1939
  onClick: M,
1940
- children: !L && !x ? /* @__PURE__ */ e.jsx(xt, {}) : /* @__PURE__ */ e.jsx(Ve, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1940
+ children: !L && !x ? /* @__PURE__ */ e.jsx(xt, {}) : /* @__PURE__ */ e.jsx(qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1941
1941
  }
1942
1942
  )
1943
1943
  ] })
@@ -1954,10 +1954,10 @@ var Va = {
1954
1954
  className: void 0,
1955
1955
  style: void 0,
1956
1956
  attr: void 0
1957
- }, sa = we.createContext && /* @__PURE__ */ we.createContext(Va), ml = ["attr", "size", "title"];
1958
- function hl(s, t) {
1957
+ }, sa = ke.createContext && /* @__PURE__ */ ke.createContext(Va), ul = ["attr", "size", "title"];
1958
+ function ml(s, t) {
1959
1959
  if (s == null) return {};
1960
- var a = xl(s, t), n, l;
1960
+ var a = hl(s, t), n, l;
1961
1961
  if (Object.getOwnPropertySymbols) {
1962
1962
  var d = Object.getOwnPropertySymbols(s);
1963
1963
  for (l = 0; l < d.length; l++)
@@ -1965,7 +1965,7 @@ function hl(s, t) {
1965
1965
  }
1966
1966
  return a;
1967
1967
  }
1968
- function xl(s, t) {
1968
+ function hl(s, t) {
1969
1969
  if (s == null) return {};
1970
1970
  var a = {};
1971
1971
  for (var n in s)
@@ -1975,15 +1975,15 @@ function xl(s, t) {
1975
1975
  }
1976
1976
  return a;
1977
1977
  }
1978
- function cs() {
1979
- return cs = Object.assign ? Object.assign.bind() : function(s) {
1978
+ function ms() {
1979
+ return ms = Object.assign ? Object.assign.bind() : function(s) {
1980
1980
  for (var t = 1; t < arguments.length; t++) {
1981
1981
  var a = arguments[t];
1982
1982
  for (var n in a)
1983
1983
  Object.prototype.hasOwnProperty.call(a, n) && (s[n] = a[n]);
1984
1984
  }
1985
1985
  return s;
1986
- }, cs.apply(this, arguments);
1986
+ }, ms.apply(this, arguments);
1987
1987
  }
1988
1988
  function aa(s, t) {
1989
1989
  var a = Object.keys(s);
@@ -1995,25 +1995,25 @@ function aa(s, t) {
1995
1995
  }
1996
1996
  return a;
1997
1997
  }
1998
- function ds(s) {
1998
+ function hs(s) {
1999
1999
  for (var t = 1; t < arguments.length; t++) {
2000
2000
  var a = arguments[t] != null ? arguments[t] : {};
2001
2001
  t % 2 ? aa(Object(a), !0).forEach(function(n) {
2002
- pl(s, n, a[n]);
2002
+ xl(s, n, a[n]);
2003
2003
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(a)) : aa(Object(a)).forEach(function(n) {
2004
2004
  Object.defineProperty(s, n, Object.getOwnPropertyDescriptor(a, n));
2005
2005
  });
2006
2006
  }
2007
2007
  return s;
2008
2008
  }
2009
- function pl(s, t, a) {
2010
- return t = fl(t), t in s ? Object.defineProperty(s, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[t] = a, s;
2009
+ function xl(s, t, a) {
2010
+ return t = pl(t), t in s ? Object.defineProperty(s, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[t] = a, s;
2011
2011
  }
2012
- function fl(s) {
2013
- var t = gl(s, "string");
2012
+ function pl(s) {
2013
+ var t = fl(s, "string");
2014
2014
  return typeof t == "symbol" ? t : t + "";
2015
2015
  }
2016
- function gl(s, t) {
2016
+ function fl(s, t) {
2017
2017
  if (typeof s != "object" || !s) return s;
2018
2018
  var a = s[Symbol.toPrimitive];
2019
2019
  if (a !== void 0) {
@@ -2024,62 +2024,62 @@ function gl(s, t) {
2024
2024
  return (t === "string" ? String : Number)(s);
2025
2025
  }
2026
2026
  function qa(s) {
2027
- return s && s.map((t, a) => /* @__PURE__ */ we.createElement(t.tag, ds({
2027
+ return s && s.map((t, a) => /* @__PURE__ */ ke.createElement(t.tag, hs({
2028
2028
  key: a
2029
2029
  }, t.attr), qa(t.child)));
2030
2030
  }
2031
2031
  function ge(s) {
2032
- return (t) => /* @__PURE__ */ we.createElement(jl, cs({
2033
- attr: ds({}, s.attr)
2032
+ return (t) => /* @__PURE__ */ ke.createElement(gl, ms({
2033
+ attr: hs({}, s.attr)
2034
2034
  }, t), qa(s.child));
2035
2035
  }
2036
- function jl(s) {
2036
+ function gl(s) {
2037
2037
  var t = (a) => {
2038
2038
  var {
2039
2039
  attr: n,
2040
2040
  size: l,
2041
2041
  title: d
2042
- } = s, r = hl(s, ml), o = l || a.size || "1em", c;
2043
- return a.className && (c = a.className), s.className && (c = (c ? c + " " : "") + s.className), /* @__PURE__ */ we.createElement("svg", cs({
2042
+ } = s, r = ml(s, ul), o = l || a.size || "1em", c;
2043
+ return a.className && (c = a.className), s.className && (c = (c ? c + " " : "") + s.className), /* @__PURE__ */ ke.createElement("svg", ms({
2044
2044
  stroke: "currentColor",
2045
2045
  fill: "currentColor",
2046
2046
  strokeWidth: "0"
2047
2047
  }, a.attr, n, r, {
2048
2048
  className: c,
2049
- style: ds(ds({
2049
+ style: hs(hs({
2050
2050
  color: s.color || a.color
2051
2051
  }, a.style), s.style),
2052
2052
  height: o,
2053
2053
  width: o,
2054
2054
  xmlns: "http://www.w3.org/2000/svg"
2055
- }), d && /* @__PURE__ */ we.createElement("title", null, d), s.children);
2055
+ }), d && /* @__PURE__ */ ke.createElement("title", null, d), s.children);
2056
2056
  };
2057
- return sa !== void 0 ? /* @__PURE__ */ we.createElement(sa.Consumer, null, (a) => t(a)) : t(Va);
2057
+ return sa !== void 0 ? /* @__PURE__ */ ke.createElement(sa.Consumer, null, (a) => t(a)) : t(Va);
2058
2058
  }
2059
- function bl(s) {
2059
+ function jl(s) {
2060
2060
  return ge({ tag: "svg", 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);
2061
2061
  }
2062
- function yl({ sql: s }) {
2063
- return /* @__PURE__ */ e.jsxs(Vs, { children: [
2064
- /* @__PURE__ */ e.jsx(qs, { asChild: !0, children: /* @__PURE__ */ e.jsx(O, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(jt, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2062
+ function bl({ sql: s }) {
2063
+ return /* @__PURE__ */ e.jsxs(qs, { children: [
2064
+ /* @__PURE__ */ e.jsx(Rs, { asChild: !0, children: /* @__PURE__ */ e.jsx(O, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(jt, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2065
2065
  /* @__PURE__ */ e.jsx(
2066
- Rs,
2066
+ _s,
2067
2067
  {
2068
2068
  align: "end",
2069
2069
  className: "w-full min-w-fit max-w-[700px] p-3 pt-2",
2070
2070
  children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2071
2071
  /* @__PURE__ */ e.jsx(R, { className: "text-xs font-semibold", children: "Resolved Query" }),
2072
- /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-col space-y-2", children: /* @__PURE__ */ e.jsx(qe, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 font-mono text-xs leading-relaxed", children: s }) }) })
2072
+ /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-col space-y-2", children: /* @__PURE__ */ e.jsx(De, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 font-mono text-xs leading-relaxed", children: s }) }) })
2073
2073
  ] })
2074
2074
  }
2075
2075
  )
2076
2076
  ] });
2077
2077
  }
2078
- function vl() {
2078
+ function yl() {
2079
2079
  const [s, t] = q({
2080
2080
  queryKey: [],
2081
2081
  queryData: null
2082
- }), { theme: a } = bt(), n = yt(), l = ws(), d = vt(), [r, o] = q(!1), [c, p] = q(!1), [u, b] = q(!1), [g, h] = q(""), [j, C] = q(!1), F = z((i) => i.selectedSheetId);
2082
+ }), { theme: a } = bt(), n = yt(), l = ks(), d = vt(), [r, o] = q(!1), [c, p] = q(!1), [u, b] = q(!1), [g, h] = q(""), [j, C] = q(!1), F = z((i) => i.selectedSheetId);
2083
2083
  z((i) => i.dashboard.baseQueries);
2084
2084
  const y = m((i) => i.card), T = z((i) => i.theme), I = m((i) => i.isShowingVisual);
2085
2085
  z((i) => i.onAcceptChanges);
@@ -2113,7 +2113,7 @@ function vl() {
2113
2113
  m(
2114
2114
  (i) => i.actions.setApplyFilters
2115
2115
  );
2116
- const te = m((i) => i.onClose), Le = m((i) => i.actions.setSqlGen), ze = m((i) => i.runSql), je = m((i) => i.actions.setRunSql);
2116
+ const te = m((i) => i.onClose), Ee = m((i) => i.actions.setSqlGen), Oe = m((i) => i.runSql), je = m((i) => i.actions.setRunSql);
2117
2117
  m((i) => i.actions.setCardCfg);
2118
2118
  const be = m(
2119
2119
  (i) => i.actions.setIsSqlRunning
@@ -2121,18 +2121,18 @@ function vl() {
2121
2121
  data: J,
2122
2122
  isLoading: oe,
2123
2123
  isFetching: ce,
2124
- isSuccess: Oe,
2125
- isError: Me,
2124
+ isSuccess: Fe,
2125
+ isError: Ae,
2126
2126
  error: $e,
2127
2127
  queryKey: Pe,
2128
- refetch: Ee
2128
+ refetch: Ve
2129
2129
  } = Re(y);
2130
2130
  Z(() => {
2131
2131
  if (J && (J.rowLimitExceeded && We.error("Row limit (10,000) exceeded. Refine your query.", {
2132
2132
  position: "top-center",
2133
2133
  richColors: !0
2134
2134
  }), se((J == null ? void 0 : J.output) || ""), J.records.length > 0)) {
2135
- const { dimensionKeys: i } = vs(J.records);
2135
+ const { dimensionKeys: i } = Ss(J.records);
2136
2136
  ae(i);
2137
2137
  }
2138
2138
  }, [
@@ -2141,27 +2141,27 @@ function vl() {
2141
2141
  ae,
2142
2142
  se
2143
2143
  ]), Z(() => {
2144
- (oe || ce) && be(!0), (Me || Oe) && be(!1), Me ? (D($e.message), ae([]), se("")) : D("");
2144
+ (oe || ce) && be(!0), (Ae || Fe) && be(!1), Ae ? (D($e.message), ae([]), se("")) : D("");
2145
2145
  }, [
2146
2146
  oe,
2147
2147
  ce,
2148
2148
  J,
2149
2149
  se,
2150
- Me,
2151
- Oe,
2150
+ Ae,
2151
+ Fe,
2152
2152
  be,
2153
2153
  ae,
2154
2154
  D,
2155
2155
  $e
2156
2156
  ]), Z(() => {
2157
- ze && (Ee(), je(!1));
2158
- }, [ze, Ee, je]);
2159
- function gs() {
2157
+ Oe && (Ve(), je(!1));
2158
+ }, [Oe, Ve, je]);
2159
+ function ys() {
2160
2160
  const i = n.getQueryData(Pe);
2161
2161
  s.queryData || t({
2162
2162
  queryKey: Pe,
2163
2163
  queryData: i
2164
- }), n.setQueryData(Pe, null), _(""), Le({}), W(""), $({});
2164
+ }), n.setQueryData(Pe, null), _(""), Ee({}), W(""), $({});
2165
2165
  }
2166
2166
  const Ye = (i) => {
2167
2167
  l.current = i;
@@ -2176,10 +2176,10 @@ function vl() {
2176
2176
  if (ve == "All__Header")
2177
2177
  return i[0].id;
2178
2178
  if (ve && ve.endsWith("__Header")) {
2179
- const Za = ve.split("__")[0], Qs = i.find(
2179
+ const Za = ve.split("__")[0], Js = i.find(
2180
2180
  (et) => et.tabTitle === Za
2181
2181
  );
2182
- return Qs ? Qs.id : i[0].id;
2182
+ return Js ? Js.id : i[0].id;
2183
2183
  }
2184
2184
  return ne;
2185
2185
  }
@@ -2188,7 +2188,7 @@ function vl() {
2188
2188
  }
2189
2189
  function Ze() {
2190
2190
  let i = v;
2191
- v && !v.includes("{{") && (i = ol(v), _(i));
2191
+ v && !v.includes("{{") && (i = il(v), _(i));
2192
2192
  const ne = {
2193
2193
  ...y,
2194
2194
  lastSelectedSchema: L,
@@ -2200,7 +2200,7 @@ function vl() {
2200
2200
  sql: i,
2201
2201
  customCfg: I ? y.customCfg : null
2202
2202
  }, ye = k.cards.map(
2203
- (js) => js.id === y.id ? ne : js
2203
+ (vs) => vs.id === y.id ? ne : vs
2204
2204
  ), ve = {
2205
2205
  ...k,
2206
2206
  cards: ye,
@@ -2230,7 +2230,7 @@ function vl() {
2230
2230
  }), d.editor.setTheme("default"), i && d && i.addCommand(
2231
2231
  d.KeyMod.Shift | d.KeyCode.Enter,
2232
2232
  function() {
2233
- return Ee(), !1;
2233
+ return Ve(), !1;
2234
2234
  }
2235
2235
  ), () => {
2236
2236
  };
@@ -2304,14 +2304,14 @@ function vl() {
2304
2304
  }
2305
2305
  function as() {
2306
2306
  return /* @__PURE__ */ e.jsxs(
2307
- Cs,
2307
+ cs,
2308
2308
  {
2309
2309
  className: "flex grow pb-1",
2310
2310
  direction: "vertical",
2311
2311
  role: "editor-resizable-group",
2312
2312
  children: [
2313
2313
  /* @__PURE__ */ e.jsxs(
2314
- Ae,
2314
+ Ne,
2315
2315
  {
2316
2316
  id: "1",
2317
2317
  order: 1,
@@ -2355,9 +2355,9 @@ function vl() {
2355
2355
  }
2356
2356
  ),
2357
2357
  r && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2358
- /* @__PURE__ */ e.jsx(Ns, { withHandle: !0, className: "border" }),
2358
+ /* @__PURE__ */ e.jsx(ds, { withHandle: !0, className: "border" }),
2359
2359
  /* @__PURE__ */ e.jsxs(
2360
- Ae,
2360
+ Ne,
2361
2361
  {
2362
2362
  id: "2",
2363
2363
  order: 2,
@@ -2437,19 +2437,19 @@ function vl() {
2437
2437
  title: "Shift + Enter",
2438
2438
  disabled: oe || ce,
2439
2439
  onClick: () => {
2440
- Ee();
2440
+ Ve();
2441
2441
  },
2442
2442
  className: "shrink-0",
2443
2443
  size: "sm",
2444
2444
  variant: "outline",
2445
2445
  children: [
2446
- oe || ce ? /* @__PURE__ */ e.jsx(Ve, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Pn, { className: "mr-2 h-4 w-4" }),
2446
+ oe || ce ? /* @__PURE__ */ e.jsx(qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx($n, { className: "mr-2 h-4 w-4" }),
2447
2447
  "Run"
2448
2448
  ]
2449
2449
  }
2450
2450
  ),
2451
- Me && /* @__PURE__ */ e.jsx(
2452
- cl,
2451
+ Ae && /* @__PURE__ */ e.jsx(
2452
+ ol,
2453
2453
  {
2454
2454
  error: $e.message,
2455
2455
  setShowAIDialog: b,
@@ -2460,12 +2460,12 @@ function vl() {
2460
2460
  /* @__PURE__ */ e.jsxs(
2461
2461
  O,
2462
2462
  {
2463
- onClick: gs,
2463
+ onClick: ys,
2464
2464
  className: "",
2465
2465
  size: "sm",
2466
2466
  variant: "outline",
2467
2467
  children: [
2468
- /* @__PURE__ */ e.jsx(In, { className: "mr-2 size-4" }),
2468
+ /* @__PURE__ */ e.jsx(Fn, { className: "mr-2 size-4" }),
2469
2469
  "Clear"
2470
2470
  ]
2471
2471
  }
@@ -2478,11 +2478,11 @@ function vl() {
2478
2478
  className: "",
2479
2479
  size: "sm",
2480
2480
  variant: "outline",
2481
- children: /* @__PURE__ */ e.jsx(bl, { className: "size-4 text-foreground/70" })
2481
+ children: /* @__PURE__ */ e.jsx(jl, { className: "size-4 text-foreground/70" })
2482
2482
  }
2483
2483
  ),
2484
2484
  /* @__PURE__ */ e.jsx(
2485
- ul,
2485
+ dl,
2486
2486
  {
2487
2487
  open: u,
2488
2488
  setOpen: b,
@@ -2494,7 +2494,7 @@ function vl() {
2494
2494
  )
2495
2495
  ] }),
2496
2496
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
2497
- (J == null ? void 0 : J.sql) && /* @__PURE__ */ e.jsx(yl, { sql: J.sql }),
2497
+ (J == null ? void 0 : J.sql) && /* @__PURE__ */ e.jsx(bl, { sql: J.sql }),
2498
2498
  /* @__PURE__ */ e.jsxs(
2499
2499
  O,
2500
2500
  {
@@ -2529,9 +2529,9 @@ function vl() {
2529
2529
  )
2530
2530
  );
2531
2531
  }
2532
- function Cl({ data: s }) {
2532
+ function vl({ data: s }) {
2533
2533
  var r;
2534
- const [t, a] = we.useState([]), l = Object.keys(s[0]).map((o) => ({
2534
+ const [t, a] = ke.useState([]), l = Object.keys(s[0]).map((o) => ({
2535
2535
  // header: key,
2536
2536
  accessorKey: o,
2537
2537
  header: ({ column: c }) => {
@@ -2551,18 +2551,18 @@ function Cl({ data: s }) {
2551
2551
  })), d = zt({
2552
2552
  data: s,
2553
2553
  columns: l,
2554
- getCoreRowModel: Tt(),
2555
- getPaginationRowModel: Lt(),
2554
+ getCoreRowModel: Dt(),
2555
+ getPaginationRowModel: Tt(),
2556
2556
  onSortingChange: a,
2557
- getSortedRowModel: Mt(),
2557
+ getSortedRowModel: Lt(),
2558
2558
  manualPagination: !0,
2559
2559
  state: {
2560
2560
  sorting: t
2561
2561
  }
2562
2562
  });
2563
- return /* @__PURE__ */ e.jsxs(Ot, { className: "font-mono text-xs text-foreground/95", children: [
2564
- /* @__PURE__ */ e.jsx(Ft, { children: d.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(bs, { children: o.headers.map((c) => /* @__PURE__ */ e.jsx(
2565
- It,
2563
+ return /* @__PURE__ */ e.jsx("div", { className: "font-mono text-xs text-foreground/95", children: /* @__PURE__ */ e.jsxs("table", { children: [
2564
+ /* @__PURE__ */ e.jsx(Ot, { children: d.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(Cs, { children: o.headers.map((c) => /* @__PURE__ */ e.jsx(
2565
+ Ft,
2566
2566
  {
2567
2567
  className: "sticky top-0 h-11 bg-muted font-semibold",
2568
2568
  children: c.isPlaceholder ? null : Ws(
@@ -2572,20 +2572,20 @@ function Cl({ data: s }) {
2572
2572
  },
2573
2573
  c.id
2574
2574
  )) }, o.id)) }),
2575
- /* @__PURE__ */ e.jsx(Dt, { children: (r = d.getRowModel().rows) != null && r.length ? d.getRowModel().rows.map((o) => /* @__PURE__ */ e.jsx(
2576
- bs,
2575
+ /* @__PURE__ */ e.jsx(It, { children: (r = d.getRowModel().rows) != null && r.length ? d.getRowModel().rows.map((o) => /* @__PURE__ */ e.jsx(
2576
+ Cs,
2577
2577
  {
2578
2578
  className: "whitespace-nowrap py-2",
2579
2579
  "data-state": o.getIsSelected() && "selected",
2580
2580
  children: o.getVisibleCells().map((c) => /* @__PURE__ */ e.jsx(Ys, { className: "py-3", children: Ws(c.column.columnDef.cell, c.getContext()) }, c.id))
2581
2581
  },
2582
2582
  o.id
2583
- )) : /* @__PURE__ */ e.jsx(bs, { children: /* @__PURE__ */ e.jsx(Ys, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
2584
- ] });
2583
+ )) : /* @__PURE__ */ e.jsx(Cs, { children: /* @__PURE__ */ e.jsx(Ys, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
2584
+ ] }) });
2585
2585
  }
2586
- function Nl({ card: s }) {
2586
+ function Cl({ card: s }) {
2587
2587
  var g, h, j, C, F, y, T, I, A, N;
2588
- const { authToken: t } = ke(), a = Et(t == null ? void 0 : t.accessToken), n = z((S) => S.themeStyle), l = {
2588
+ const { authToken: t } = ze(), a = Mt(t == null ? void 0 : t.accessToken), n = z((S) => S.themeStyle), l = {
2589
2589
  colors: ((h = (g = n == null ? void 0 : n.chart) == null ? void 0 : g.dataset) == null ? void 0 : h.backgroundColor) || []
2590
2590
  };
2591
2591
  (j = s.customCardPreferences) != null && j.inputData;
@@ -2606,7 +2606,7 @@ function Nl({ card: s }) {
2606
2606
  return x || null;
2607
2607
  });
2608
2608
  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(
2609
- Sn,
2609
+ Nn,
2610
2610
  {
2611
2611
  fallback: /* @__PURE__ */ e.jsx(e.Fragment, {}),
2612
2612
  children: [
@@ -2648,7 +2648,7 @@ function Ra({
2648
2648
  var F;
2649
2649
  const a = m((y) => y.card), n = ((F = a.customCardPreferences) == null ? void 0 : F.showCardHeader) ?? !0, l = m((y) => y.frame), d = z((y) => y.dashboard.filters);
2650
2650
  m((y) => y.actions.setRunSql);
2651
- const { updateFilter: r } = Os(), o = d == null ? void 0 : d.find((y) => y.id === l.filterId), { data: c, isLoading: p, isFetching: u } = Re(a), { setCard: b } = re(), { data: g } = _s(a);
2651
+ const { updateFilter: r } = Fs(), o = d == null ? void 0 : d.find((y) => y.id === l.filterId), { data: c, isLoading: p, isFetching: u } = Re(a), { setCard: b } = re(), { data: g } = Hs(a);
2652
2652
  if (!a.id) return null;
2653
2653
  let h;
2654
2654
  c != null && c.records && (c == null ? void 0 : c.records.length) > 0 && (h = ba({
@@ -2660,43 +2660,43 @@ function Ra({
2660
2660
  topoJson: g
2661
2661
  }));
2662
2662
  function j(y) {
2663
- return /* @__PURE__ */ e.jsx(Nl, { card: y });
2663
+ return /* @__PURE__ */ e.jsx(Cl, { card: y });
2664
2664
  }
2665
2665
  function C() {
2666
2666
  var y;
2667
2667
  if (c != null && c.records && (c == null ? void 0 : c.records.length) === 0 && !p && !u)
2668
2668
  return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [
2669
- /* @__PURE__ */ e.jsx($t, { className: "size-8 text-muted-foreground" }),
2669
+ /* @__PURE__ */ e.jsx(Ht, { className: "size-8 text-muted-foreground" }),
2670
2670
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "No records to display" })
2671
2671
  ] });
2672
2672
  if (a.type === "custom")
2673
2673
  return j(a);
2674
2674
  if (!["table", "custom"].includes(a.type) && h)
2675
2675
  return /* @__PURE__ */ e.jsx(
2676
- Pt,
2676
+ $t,
2677
2677
  {
2678
2678
  cfg: h
2679
2679
  },
2680
2680
  JSON.stringify(h) + JSON.stringify(a.preferences) + ((y = a == null ? void 0 : a.preferences) == null ? void 0 : y.customVisualCode)
2681
2681
  );
2682
2682
  if (a.type === "table" && (c != null && c.records) && (c == null ? void 0 : c.records.length) > 0)
2683
- return /* @__PURE__ */ e.jsx(Bt, { className: "flex min-h-0 flex-1 grow basis-0", children: /* @__PURE__ */ e.jsx(Ut, { card: a, data: c == null ? void 0 : c.records }) });
2683
+ return /* @__PURE__ */ e.jsx(Pt, { className: "flex min-h-0 flex-1 grow basis-0", children: /* @__PURE__ */ e.jsx(Bt, { card: a, data: c == null ? void 0 : c.records }) });
2684
2684
  }
2685
2685
  return /* @__PURE__ */ e.jsxs(
2686
- At,
2686
+ Et,
2687
2687
  {
2688
2688
  role: "editor-visual-card",
2689
2689
  className: Q("relative flex h-full flex-col rounded-none", s),
2690
2690
  ...t,
2691
2691
  children: [
2692
- n && /* @__PURE__ */ e.jsxs(Vt, { className: "flex flex-row items-start justify-between py-4", children: [
2692
+ n && /* @__PURE__ */ e.jsxs(At, { className: "flex flex-row items-start justify-between py-4", children: [
2693
2693
  /* @__PURE__ */ e.jsxs("div", { children: [
2694
2694
  /* @__PURE__ */ e.jsx(
2695
2695
  ls,
2696
2696
  {
2697
2697
  text: a.title,
2698
2698
  onSave: (y) => b({ ...a, title: y }),
2699
- children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(qt, { className: "text-base", children: a.title || "Edit title..." }) })
2699
+ children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(Vt, { className: "text-base", children: a.title || "Edit title..." }) })
2700
2700
  },
2701
2701
  a.title
2702
2702
  ),
@@ -2705,7 +2705,7 @@ function Ra({
2705
2705
  {
2706
2706
  text: a.description || "",
2707
2707
  onSave: (y) => b({ ...a, description: y }),
2708
- children: /* @__PURE__ */ e.jsx(Rt, { children: a.description || "Edit description..." })
2708
+ children: /* @__PURE__ */ e.jsx(qt, { children: a.description || "Edit description..." })
2709
2709
  },
2710
2710
  a.description
2711
2711
  )
@@ -2720,18 +2720,18 @@ function Ra({
2720
2720
  children: /* @__PURE__ */ e.jsx(R, { children: o.title })
2721
2721
  }
2722
2722
  ),
2723
- /* @__PURE__ */ e.jsx(_t, { filter: o })
2723
+ /* @__PURE__ */ e.jsx(Rt, { filter: o })
2724
2724
  ] })
2725
2725
  ] }),
2726
- /* @__PURE__ */ e.jsx(Ht, { className: "flex grow flex-col", children: C() })
2726
+ /* @__PURE__ */ e.jsx(_t, { className: "flex grow flex-col", children: C() })
2727
2727
  ]
2728
2728
  }
2729
2729
  );
2730
2730
  }
2731
- function Sl() {
2731
+ function Nl() {
2732
2732
  const [s, t] = q(!1), [a, n] = q(""), [l, d] = q(""), [r, o] = q(""), [c, p] = q(""), u = m((N) => N.card), b = m(
2733
2733
  (N) => N.card.customCfg
2734
- ), { data: g } = Re(u), { data: h } = _s(u), { setCardCustomCfg: j, setCustomVisualCode: C } = re();
2734
+ ), { data: g } = Re(u), { data: h } = Hs(u), { setCardCustomCfg: j, setCustomVisualCode: C } = re();
2735
2735
  function F(N) {
2736
2736
  var x, v;
2737
2737
  const S = {
@@ -2778,25 +2778,25 @@ function Sl() {
2778
2778
  }
2779
2779
  return a ? (N = F(JSON.parse(a)), N) : "";
2780
2780
  }
2781
- return /* @__PURE__ */ e.jsxs(Fs, { open: s, onOpenChange: t, children: [
2782
- /* @__PURE__ */ e.jsx(Is, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2781
+ return /* @__PURE__ */ e.jsxs(Is, { open: s, onOpenChange: t, children: [
2782
+ /* @__PURE__ */ e.jsx(Ds, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2783
2783
  O,
2784
2784
  {
2785
2785
  onClick: y,
2786
2786
  className: ` ${b && "border-foreground/50 dark:border-foreground/70"}`,
2787
2787
  size: "sm",
2788
2788
  variant: "outline",
2789
- children: /* @__PURE__ */ e.jsx(Gt, { className: "h-4 w-4" })
2789
+ children: /* @__PURE__ */ e.jsx(Ut, { className: "h-4 w-4" })
2790
2790
  }
2791
2791
  ) }),
2792
2792
  /* @__PURE__ */ e.jsxs(
2793
- Ts,
2793
+ Ls,
2794
2794
  {
2795
2795
  className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]",
2796
2796
  children: [
2797
- /* @__PURE__ */ e.jsxs(Ls, { className: "", children: [
2798
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(Ms, { children: "Customize Card" }) }),
2799
- /* @__PURE__ */ e.jsxs(Es, { children: [
2797
+ /* @__PURE__ */ e.jsxs(Ms, { className: "", children: [
2798
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(Es, { children: "Customize Card" }) }),
2799
+ /* @__PURE__ */ e.jsxs(As, { children: [
2800
2800
  "See the configuration options and documentation",
2801
2801
  /* @__PURE__ */ e.jsx(
2802
2802
  "a",
@@ -2810,7 +2810,7 @@ function Sl() {
2810
2810
  ] })
2811
2811
  ] }),
2812
2812
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow gap-2", children: [
2813
- /* @__PURE__ */ e.jsx(us, { FallbackComponent: ya, children: /* @__PURE__ */ e.jsx(Ra, { className: "w-1/2 rounded shadow-none" }) }),
2813
+ /* @__PURE__ */ e.jsx(xs, { FallbackComponent: ya, children: /* @__PURE__ */ e.jsx(Ra, { className: "w-1/2 rounded shadow-none" }) }),
2814
2814
  /* @__PURE__ */ e.jsxs(va, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
2815
2815
  /* @__PURE__ */ e.jsxs(Ca, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
2816
2816
  /* @__PURE__ */ e.jsxs(rs, { value: "custom-config", children: [
@@ -2942,20 +2942,20 @@ function Ja(s) {
2942
2942
  const [t, a] = q(null);
2943
2943
  return Z(() => {
2944
2944
  s && (async () => {
2945
- const d = (await import("./lucide-react-B32xDJUJ.js"))[s];
2945
+ const d = (await import("./lucide-react-D50gZph-.js"))[s];
2946
2946
  a(d);
2947
2947
  })();
2948
2948
  }, [s]), t;
2949
2949
  }
2950
2950
  function Ka() {
2951
- const { authToken: s } = ke(), { data: t, isLoading: a, isFetching: n, isError: l } = Ce({
2951
+ const { authToken: s } = ze(), { data: t, isLoading: a, isFetching: n, isError: l } = Ce({
2952
2952
  queryKey: ["plugins", s == null ? void 0 : s.accessToken],
2953
- queryFn: () => Qt(s == null ? void 0 : s.accessToken)
2953
+ queryFn: () => Gt(s == null ? void 0 : s.accessToken)
2954
2954
  // staleTime: Infinity,
2955
2955
  });
2956
2956
  return { data: t, isLoading: a, isFetching: n, isError: l };
2957
2957
  }
2958
- function wl({
2958
+ function Sl({
2959
2959
  onChartTypeChange: s
2960
2960
  }) {
2961
2961
  const [t, a] = q([]), { data: n } = Ka();
@@ -2964,7 +2964,7 @@ function wl({
2964
2964
  var d;
2965
2965
  if (n) {
2966
2966
  const o = (await Promise.all(
2967
- (d = n == null ? void 0 : n.plugins) == null ? void 0 : d.map(async (c) => (await Jt(c.value)).visuals.map((b) => ({
2967
+ (d = n == null ? void 0 : n.plugins) == null ? void 0 : d.map(async (c) => (await Qt(c.value)).visuals.map((b) => ({
2968
2968
  name: b.name,
2969
2969
  icon: b.icon,
2970
2970
  url: c.value
@@ -2974,9 +2974,9 @@ function wl({
2974
2974
  }
2975
2975
  })();
2976
2976
  }, [n]), t.length === 0 ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2977
- /* @__PURE__ */ e.jsx(Se, { className: "my-2" }),
2977
+ /* @__PURE__ */ e.jsx(we, { className: "my-2" }),
2978
2978
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-4 place-items-center", children: t.map((l, d) => /* @__PURE__ */ e.jsx(
2979
- kl,
2979
+ wl,
2980
2980
  {
2981
2981
  text: l.name,
2982
2982
  onClick: () => s("custom", l),
@@ -2986,7 +2986,7 @@ function wl({
2986
2986
  )) })
2987
2987
  ] });
2988
2988
  }
2989
- const kl = ({
2989
+ const wl = ({
2990
2990
  text: s,
2991
2991
  icon: t,
2992
2992
  onClick: a
@@ -2994,7 +2994,7 @@ const kl = ({
2994
2994
  const n = Ja(t || ""), l = s.charAt(0).toUpperCase();
2995
2995
  return /* @__PURE__ */ e.jsx(O, { onClick: a, title: s, variant: "ghost", children: n ? /* @__PURE__ */ e.jsx(n, { className: "h-4 w-4" }) : l });
2996
2996
  };
2997
- function zl() {
2997
+ function kl() {
2998
2998
  var u, b;
2999
2999
  const [s, t] = q(!1), a = m((g) => g.card), n = a.type, { setCardType: l, setCardPreferences: d, setChartOrientation: r } = m((g) => g.actions), { setCardCustomCfg: o, setCustomCardPreferences: c } = re();
3000
3000
  function p(g, h) {
@@ -3006,9 +3006,9 @@ function zl() {
3006
3006
  icon: h.icon
3007
3007
  }), t(!1);
3008
3008
  }
3009
- return /* @__PURE__ */ e.jsxs(ms, { open: s, onOpenChange: t, children: [
3010
- /* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsx(O, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
3011
- Ol,
3009
+ return /* @__PURE__ */ e.jsxs(ps, { open: s, onOpenChange: t, children: [
3010
+ /* @__PURE__ */ e.jsx(fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(O, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
3011
+ zl,
3012
3012
  {
3013
3013
  className: "h-4 w-4",
3014
3014
  chartType: n,
@@ -3016,7 +3016,7 @@ function zl() {
3016
3016
  componentName: (b = a.customCardPreferences) == null ? void 0 : b.componentName
3017
3017
  }
3018
3018
  ) }) }),
3019
- /* @__PURE__ */ e.jsxs(xs, { className: "w-50", children: [
3019
+ /* @__PURE__ */ e.jsxs(gs, { className: "w-50", children: [
3020
3020
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-4 place-items-center", children: [
3021
3021
  /* @__PURE__ */ e.jsx(
3022
3022
  O,
@@ -3024,7 +3024,7 @@ function zl() {
3024
3024
  onClick: () => p("bar"),
3025
3025
  className: "font-normal",
3026
3026
  variant: "ghost",
3027
- children: /* @__PURE__ */ e.jsx(Ps, { className: "size-5" })
3027
+ children: /* @__PURE__ */ e.jsx(Bs, { className: "size-5" })
3028
3028
  }
3029
3029
  ),
3030
3030
  /* @__PURE__ */ e.jsx(
@@ -3032,7 +3032,7 @@ function zl() {
3032
3032
  {
3033
3033
  onClick: () => p("line"),
3034
3034
  variant: "ghost",
3035
- children: /* @__PURE__ */ e.jsx(Bs, { className: "size-5" })
3035
+ children: /* @__PURE__ */ e.jsx(Us, { className: "size-5" })
3036
3036
  }
3037
3037
  ),
3038
3038
  /* @__PURE__ */ e.jsx(
@@ -3126,7 +3126,7 @@ function zl() {
3126
3126
  {
3127
3127
  onClick: () => p("table"),
3128
3128
  variant: "ghost",
3129
- children: /* @__PURE__ */ e.jsx(As, { className: "size-5" })
3129
+ children: /* @__PURE__ */ e.jsx(Vs, { className: "size-5" })
3130
3130
  }
3131
3131
  ),
3132
3132
  /* @__PURE__ */ e.jsx(
@@ -3142,7 +3142,7 @@ function zl() {
3142
3142
  {
3143
3143
  onClick: () => p("text"),
3144
3144
  variant: "ghost",
3145
- children: /* @__PURE__ */ e.jsx(Us, { className: "size-4" })
3145
+ children: /* @__PURE__ */ e.jsx(Gs, { className: "size-4" })
3146
3146
  }
3147
3147
  ),
3148
3148
  /* @__PURE__ */ e.jsx(
@@ -3162,11 +3162,11 @@ function zl() {
3162
3162
  }
3163
3163
  )
3164
3164
  ] }),
3165
- /* @__PURE__ */ e.jsx(wl, { onChartTypeChange: p })
3165
+ /* @__PURE__ */ e.jsx(Sl, { onChartTypeChange: p })
3166
3166
  ] })
3167
3167
  ] });
3168
3168
  }
3169
- function Ol({
3169
+ function zl({
3170
3170
  chartType: s,
3171
3171
  className: t,
3172
3172
  customIcon: a,
@@ -3175,9 +3175,9 @@ function Ol({
3175
3175
  const l = Ja(a || "");
3176
3176
  switch (s) {
3177
3177
  case "bar":
3178
- return /* @__PURE__ */ e.jsx(Ps, { className: t });
3179
- case "line":
3180
3178
  return /* @__PURE__ */ e.jsx(Bs, { className: t });
3179
+ case "line":
3180
+ return /* @__PURE__ */ e.jsx(Us, { className: t });
3181
3181
  case "pie":
3182
3182
  return /* @__PURE__ */ e.jsx(Oa, { className: t });
3183
3183
  case "radar":
@@ -3201,29 +3201,29 @@ function Ol({
3201
3201
  case "kpi":
3202
3202
  return /* @__PURE__ */ e.jsx(Ga, { className: t });
3203
3203
  case "text":
3204
- return /* @__PURE__ */ e.jsx(Us, { className: t });
3204
+ return /* @__PURE__ */ e.jsx(Gs, { className: t });
3205
3205
  case "map":
3206
3206
  return /* @__PURE__ */ e.jsx(Da, { className: t });
3207
3207
  case "custom":
3208
3208
  return a && l ? /* @__PURE__ */ e.jsx(l, { className: t }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(La, { className: t });
3209
3209
  default:
3210
- return /* @__PURE__ */ e.jsx(As, { className: t });
3210
+ return /* @__PURE__ */ e.jsx(Vs, { className: t });
3211
3211
  }
3212
3212
  }
3213
- function Fl() {
3213
+ function Ol() {
3214
3214
  var t;
3215
3215
  const s = m((a) => a.card);
3216
3216
  return (t = s.customCardPreferences) == null || t.showCardHeader, re(), /* @__PURE__ */ e.jsxs(ra, { children: [
3217
3217
  /* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ia, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
3218
3218
  /* @__PURE__ */ e.jsx(oa, { align: "start", className: "w-40 text-muted-foreground", children: /* @__PURE__ */ e.jsxs(
3219
- Kt,
3219
+ Jt,
3220
3220
  {
3221
3221
  onClick: () => {
3222
3222
  navigator.clipboard.writeText(s.id), We.success("Card ID copied to clipboard");
3223
3223
  },
3224
3224
  className: "cursor-pointer space-x-2",
3225
3225
  children: [
3226
- /* @__PURE__ */ e.jsx(Vn, { className: "size-5" }),
3226
+ /* @__PURE__ */ e.jsx(An, { className: "size-5" }),
3227
3227
  /* @__PURE__ */ e.jsx("span", { children: "Copy Card ID" })
3228
3228
  ]
3229
3229
  }
@@ -3312,7 +3312,7 @@ function ta() {
3312
3312
  displayTab: f
3313
3313
  });
3314
3314
  },
3315
- children: v.displayTab === !0 || v.displayTab === void 0 ? /* @__PURE__ */ e.jsx(Tn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx(Dn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
3315
+ children: v.displayTab === !0 || v.displayTab === void 0 ? /* @__PURE__ */ e.jsx(Dn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx(In, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
3316
3316
  }
3317
3317
  );
3318
3318
  }
@@ -3364,7 +3364,7 @@ function ta() {
3364
3364
  className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
3365
3365
  variant: "outline",
3366
3366
  onClick: h,
3367
- children: /* @__PURE__ */ e.jsx(Ds, { className: "h-4 w-4" })
3367
+ children: /* @__PURE__ */ e.jsx(Ts, { className: "h-4 w-4" })
3368
3368
  }
3369
3369
  ),
3370
3370
  /* @__PURE__ */ e.jsx(
@@ -3373,7 +3373,7 @@ function ta() {
3373
3373
  className: "invisible ml-1 h-8 px-2 hover:bg-muted-foreground/50 group-hover:visible",
3374
3374
  variant: "outline",
3375
3375
  onClick: C,
3376
- children: /* @__PURE__ */ e.jsx(On, { className: "h-4 w-4" })
3376
+ children: /* @__PURE__ */ e.jsx(zn, { className: "h-4 w-4" })
3377
3377
  }
3378
3378
  )
3379
3379
  ] }) })
@@ -3382,49 +3382,83 @@ function ta() {
3382
3382
  );
3383
3383
  }
3384
3384
  function L() {
3385
- 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(Wt, { 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(qe, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
3386
- Yt,
3385
+ 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(Kt, { 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(De, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
3386
+ Wt,
3387
3387
  {
3388
3388
  isLoading: n,
3389
3389
  card: t,
3390
3390
  data: u == null ? void 0 : u.records
3391
3391
  }
3392
- ) }) }) }) : /* @__PURE__ */ e.jsx(us, { FallbackComponent: ya, children: /* @__PURE__ */ e.jsx(Ra, { className: "grow border-none shadow-none" }) });
3392
+ ) }) }) }) : /* @__PURE__ */ e.jsx(xs, { FallbackComponent: ya, children: /* @__PURE__ */ e.jsx(Ra, { className: "grow border-none shadow-none" }) });
3393
3393
  }
3394
3394
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full flex-col py-3", children: [
3395
- (b || g) && /* @__PURE__ */ e.jsx(Ve, { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto h-10 w-10 animate-spin text-foreground/10" }),
3395
+ (b || g) && /* @__PURE__ */ e.jsx(qe, { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto h-10 w-10 animate-spin text-foreground/10" }),
3396
3396
  /* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
3397
3397
  a && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
3398
- /* @__PURE__ */ e.jsx(zl, {}),
3399
- !["table", "custom"].includes(t.type) && /* @__PURE__ */ e.jsx(Sl, {}),
3400
- /* @__PURE__ */ e.jsx(Fl, {})
3398
+ /* @__PURE__ */ e.jsx(kl, {}),
3399
+ !["table", "custom"].includes(t.type) && /* @__PURE__ */ e.jsx(Nl, {}),
3400
+ /* @__PURE__ */ e.jsx(Ol, {})
3401
3401
  ] }),
3402
- /* @__PURE__ */ e.jsx(Dl, {})
3402
+ /* @__PURE__ */ e.jsx(Il, {})
3403
3403
  ] }),
3404
- a ? S() : /* @__PURE__ */ e.jsxs("div", { className: "flex min-h-0 w-full flex-1 grow basis-0 px-6", children: [
3405
- d && /* @__PURE__ */ e.jsx(Il, {}),
3406
- (u == null ? void 0 : u.records) && (u == null ? void 0 : u.records.length) > 0 && /* @__PURE__ */ e.jsx(Cl, { data: (u == null ? void 0 : u.records) || [] }),
3407
- l && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs", children: l })
3408
- ] })
3404
+ a ? S() : /* @__PURE__ */ e.jsxs(
3405
+ cs,
3406
+ {
3407
+ className: "px-6",
3408
+ direction: "horizontal",
3409
+ children: [
3410
+ d && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3411
+ /* @__PURE__ */ e.jsx(
3412
+ Ne,
3413
+ {
3414
+ id: "1",
3415
+ order: 1,
3416
+ minSize: 10,
3417
+ className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
3418
+ children: d && /* @__PURE__ */ e.jsx(Fl, {})
3419
+ }
3420
+ ),
3421
+ /* @__PURE__ */ e.jsx(ds, {})
3422
+ ] }),
3423
+ /* @__PURE__ */ e.jsx(
3424
+ Ne,
3425
+ {
3426
+ id: "2",
3427
+ order: 2,
3428
+ minSize: 10,
3429
+ className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
3430
+ children: /* @__PURE__ */ e.jsxs(De, { className: "relative flex h-full min-h-0 w-full flex-1 basis-0", children: [
3431
+ (u == null ? void 0 : u.records) && (u == null ? void 0 : u.records.length) > 0 && /* @__PURE__ */ e.jsx(vl, { data: (u == null ? void 0 : u.records) || [] }),
3432
+ l && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs", children: l }),
3433
+ /* @__PURE__ */ e.jsx(os, { orientation: "horizontal" })
3434
+ ] })
3435
+ }
3436
+ )
3437
+ ]
3438
+ }
3439
+ )
3409
3440
  ] });
3410
3441
  }
3411
- function Il() {
3442
+ function Fl() {
3412
3443
  const s = m((a) => a.pythonStdOut);
3413
3444
  if (!s) return null;
3414
3445
  const t = s.replace(/\n/g, "<br>");
3415
3446
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex w-full flex-col border-r", children: [
3416
- /* @__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", children: "Python Output" }),
3417
- /* @__PURE__ */ e.jsx(qe, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: /* @__PURE__ */ e.jsx("div", { dangerouslySetInnerHTML: { __html: t } }) })
3447
+ /* @__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" }),
3448
+ /* @__PURE__ */ e.jsxs(De, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: [
3449
+ /* @__PURE__ */ e.jsx("div", { dangerouslySetInnerHTML: { __html: t } }),
3450
+ /* @__PURE__ */ e.jsx(os, { orientation: "horizontal" })
3451
+ ] })
3418
3452
  ] });
3419
3453
  }
3420
- function Dl() {
3454
+ function Il() {
3421
3455
  const s = m((a) => a.isShowingVisual), t = m(
3422
3456
  (a) => a.actions.setIsShowingVisual
3423
3457
  );
3424
3458
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
3425
3459
  /* @__PURE__ */ e.jsx(R, { htmlFor: "visualize", children: "Chart" }),
3426
3460
  /* @__PURE__ */ e.jsx(
3427
- Xt,
3461
+ Yt,
3428
3462
  {
3429
3463
  checked: s,
3430
3464
  onCheckedChange: () => t(!s),
@@ -3434,20 +3468,20 @@ function Dl() {
3434
3468
  )
3435
3469
  ] });
3436
3470
  }
3437
- function Tl({
3471
+ function Dl({
3438
3472
  options: s,
3439
3473
  value: t,
3440
3474
  onValueChange: a
3441
3475
  }) {
3442
3476
  return /* @__PURE__ */ e.jsx(
3443
- ps,
3477
+ js,
3444
3478
  {
3445
3479
  value: t,
3446
3480
  onValueChange: a,
3447
3481
  className: "flex gap-4",
3448
3482
  defaultValue: s[0].value,
3449
3483
  children: s.map((n) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
3450
- /* @__PURE__ */ e.jsx(Ie, { value: n.value, id: n.value }),
3484
+ /* @__PURE__ */ e.jsx(Te, { value: n.value, id: n.value }),
3451
3485
  /* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: n.value, children: n.label })
3452
3486
  ] }, n.value))
3453
3487
  }
@@ -3468,7 +3502,7 @@ function ue({
3468
3502
  children: /* @__PURE__ */ e.jsx(xe, { placeholder: s })
3469
3503
  }
3470
3504
  ),
3471
- /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
3505
+ /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
3472
3506
  /* @__PURE__ */ e.jsx(fe, { children: s }),
3473
3507
  t.map((d) => /* @__PURE__ */ e.jsx(K, { value: d.value, children: d.label }, d.value))
3474
3508
  ] }) })
@@ -3488,14 +3522,14 @@ function Qe({
3488
3522
  children: [
3489
3523
  /* @__PURE__ */ e.jsxs("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4", children: [
3490
3524
  /* @__PURE__ */ e.jsx(R, { children: t }),
3491
- /* @__PURE__ */ e.jsx(Zt, { className: "h-4 w-4" })
3525
+ /* @__PURE__ */ e.jsx(Xt, { className: "h-4 w-4" })
3492
3526
  ] }),
3493
3527
  /* @__PURE__ */ e.jsx("div", { className: "transition-all ease-in-out", children: s })
3494
3528
  ]
3495
3529
  }
3496
3530
  );
3497
3531
  }
3498
- function Ll() {
3532
+ function Tl() {
3499
3533
  var C, F;
3500
3534
  const s = m(
3501
3535
  (y) => y.card.customCardPreferences
@@ -3626,7 +3660,7 @@ function Ll() {
3626
3660
  }
3627
3661
  ) }) }),
3628
3662
  ((s == null ? void 0 : s.type) === "component" || (s == null ? void 0 : s.type) === void 0) && /* @__PURE__ */ e.jsx(
3629
- Tl,
3663
+ Dl,
3630
3664
  {
3631
3665
  options: [
3632
3666
  { value: "single", label: "Single Visual" },
@@ -3660,7 +3694,7 @@ function Ll() {
3660
3694
  ) })
3661
3695
  ] }) })
3662
3696
  ] }) }) }),
3663
- /* @__PURE__ */ e.jsx(Se, { className: "my-4" }),
3697
+ /* @__PURE__ */ e.jsx(we, { className: "my-4" }),
3664
3698
  ((F = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : F.componentName) && /* @__PURE__ */ e.jsxs(Qe, { summary: "Component Settings", children: [
3665
3699
  p && p.dataInputs && /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
3666
3700
  /* @__PURE__ */ e.jsx(R, { children: "Input Mapping" }),
@@ -3672,7 +3706,7 @@ function Ll() {
3672
3706
  }
3673
3707
  );
3674
3708
  }
3675
- function Te() {
3709
+ function Me() {
3676
3710
  const [s, t] = q([]);
3677
3711
  m(
3678
3712
  (u) => u.card.cfg
@@ -3753,7 +3787,7 @@ function Te() {
3753
3787
  children: /* @__PURE__ */ e.jsxs("div", { className: "grow", children: [
3754
3788
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2 py-2", children: [
3755
3789
  /* @__PURE__ */ e.jsx(
3756
- Hs,
3790
+ $s,
3757
3791
  {
3758
3792
  checked: !!((g = a == null ? void 0 : a.onClickFilter) != null && g.find(
3759
3793
  (j) => j.columnIndex === b
@@ -3791,7 +3825,7 @@ function Te() {
3791
3825
  })
3792
3826
  ] });
3793
3827
  }
3794
- function fs() {
3828
+ function bs() {
3795
3829
  var r, o, c;
3796
3830
  const s = m((p) => p.card.preferences), t = m(
3797
3831
  (p) => p.card.cfg
@@ -3801,7 +3835,7 @@ function fs() {
3801
3835
  l(p);
3802
3836
  }
3803
3837
  return /* @__PURE__ */ e.jsxs(
3804
- ps,
3838
+ js,
3805
3839
  {
3806
3840
  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",
3807
3841
  onValueChange: d,
@@ -3809,11 +3843,11 @@ function fs() {
3809
3843
  defaultValue: "x",
3810
3844
  children: [
3811
3845
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
3812
- /* @__PURE__ */ e.jsx(Ie, { value: "x", id: "r1" }),
3846
+ /* @__PURE__ */ e.jsx(Te, { value: "x", id: "r1" }),
3813
3847
  /* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r1", children: "Vertical" })
3814
3848
  ] }),
3815
3849
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
3816
- /* @__PURE__ */ e.jsx(Ie, { value: "y", id: "r2" }),
3850
+ /* @__PURE__ */ e.jsx(Te, { value: "y", id: "r2" }),
3817
3851
  /* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r2", children: "Horizontal" })
3818
3852
  ] })
3819
3853
  ]
@@ -3847,19 +3881,19 @@ function Wa() {
3847
3881
  return (D = E.card) == null ? void 0 : D.type;
3848
3882
  }), k = ["pie", "doughnut", "polarArea"].includes(f);
3849
3883
  Z(() => {
3850
- var E, D, se, $, X, te, Le, ze, je, be, J, oe, ce, Oe;
3884
+ var E, D, se, $, X, te, Ee, Oe, je, be, J, oe, ce, Fe;
3851
3885
  r(na(a)), c(
3852
3886
  ((se = (D = (E = a == null ? void 0 : a.chartOptions) == null ? void 0 : E.scales) == null ? void 0 : D[l]) == null ? void 0 : se.min) === 0 ? 0 : ""
3853
3887
  ), u(((te = (X = ($ = a == null ? void 0 : a.chartOptions) == null ? void 0 : $.scales) == null ? void 0 : X[l]) == null ? void 0 : te.max) || ""), j(
3854
- ((be = (je = (ze = (Le = a == null ? void 0 : a.chartOptions) == null ? void 0 : Le.scales) == null ? void 0 : ze[l]) == null ? void 0 : je.ticks) == null ? void 0 : be.stepSize) || ""
3855
- ), F(((J = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : J.decimalPlaces) || 0), T(((oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : oe.suffix) || ""), A(((ce = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ce.currency) || ""), S(((Oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Oe.locale) || "");
3888
+ ((be = (je = (Oe = (Ee = a == null ? void 0 : a.chartOptions) == null ? void 0 : Ee.scales) == null ? void 0 : Oe[l]) == null ? void 0 : je.ticks) == null ? void 0 : be.stepSize) || ""
3889
+ ), F(((J = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : J.decimalPlaces) || 0), T(((oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : oe.suffix) || ""), A(((ce = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ce.currency) || ""), S(((Fe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Fe.locale) || "");
3856
3890
  }, [s, a, l]);
3857
3891
  function M(E, D) {
3858
3892
  return D === "" || /^[0-9\b]+$/.test(D) ? Number(D) : Number(E);
3859
3893
  }
3860
3894
  function H() {
3861
3895
  const E = [
3862
- ...new Set(os.map((D) => D.currency))
3896
+ ...new Set(us.map((D) => D.currency))
3863
3897
  ];
3864
3898
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3865
3899
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-6 items-center gap-2", children: [
@@ -3885,7 +3919,7 @@ function Wa() {
3885
3919
  onValueChange: (D) => A(D === "none" ? "" : D),
3886
3920
  children: [
3887
3921
  /* @__PURE__ */ e.jsx(he, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
3888
- /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
3922
+ /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
3889
3923
  /* @__PURE__ */ e.jsx(fe, { children: "Currency" }),
3890
3924
  /* @__PURE__ */ e.jsx(K, { value: "none", children: "None" }),
3891
3925
  E.map((D) => /* @__PURE__ */ e.jsx(K, { value: D, children: D }, D))
@@ -3901,9 +3935,9 @@ function Wa() {
3901
3935
  children: /* @__PURE__ */ e.jsx(xe, {})
3902
3936
  }
3903
3937
  ),
3904
- /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
3938
+ /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
3905
3939
  /* @__PURE__ */ e.jsx(fe, { children: "Locale" }),
3906
- os.map((D) => /* @__PURE__ */ e.jsx(K, { value: D.locale, children: D.locale }, D.locale))
3940
+ us.map((D) => /* @__PURE__ */ e.jsx(K, { value: D.locale, children: D.locale }, D.locale))
3907
3941
  ] }) })
3908
3942
  ] })
3909
3943
  ] }),
@@ -3995,9 +4029,9 @@ function Wa() {
3995
4029
  };
3996
4030
  x(se);
3997
4031
  }
3998
- return /* @__PURE__ */ e.jsxs(ms, { onOpenChange: (E) => t(E), children: [
3999
- /* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsx(en, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
4000
- /* @__PURE__ */ e.jsx(xs, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
4032
+ return /* @__PURE__ */ e.jsxs(ps, { onOpenChange: (E) => t(E), children: [
4033
+ /* @__PURE__ */ e.jsx(fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(Zt, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
4034
+ /* @__PURE__ */ e.jsx(gs, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
4001
4035
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4002
4036
  /* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
4003
4037
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "Set the scale for the number axis" })
@@ -4013,7 +4047,7 @@ function Wa() {
4013
4047
  onValueChange: (E) => r(E),
4014
4048
  children: [
4015
4049
  /* @__PURE__ */ e.jsx(he, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
4016
- /* @__PURE__ */ e.jsx(pe, { id: "type", children: /* @__PURE__ */ e.jsxs(Ne, { children: [
4050
+ /* @__PURE__ */ e.jsx(pe, { id: "type", children: /* @__PURE__ */ e.jsxs(Se, { children: [
4017
4051
  /* @__PURE__ */ e.jsx(fe, { children: "Option" }),
4018
4052
  /* @__PURE__ */ e.jsx(K, { value: "linear", children: "Linear" }),
4019
4053
  /* @__PURE__ */ e.jsx(K, { value: "logarithmic", children: "Logarithmic" })
@@ -4025,7 +4059,7 @@ function Wa() {
4025
4059
  d == "linear" && /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
4026
4060
  /* @__PURE__ */ e.jsx(R, { htmlFor: "scale-option", children: "Setup" }),
4027
4061
  /* @__PURE__ */ e.jsxs(
4028
- ps,
4062
+ js,
4029
4063
  {
4030
4064
  disabled: k,
4031
4065
  id: "scale-option",
@@ -4035,11 +4069,11 @@ function Wa() {
4035
4069
  defaultValue: "x",
4036
4070
  children: [
4037
4071
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
4038
- /* @__PURE__ */ e.jsx(Ie, { value: "auto", id: "r1" }),
4072
+ /* @__PURE__ */ e.jsx(Te, { value: "auto", id: "r1" }),
4039
4073
  /* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r1", children: "Auto" })
4040
4074
  ] }),
4041
4075
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
4042
- /* @__PURE__ */ e.jsx(Ie, { value: "custom", id: "r2" }),
4076
+ /* @__PURE__ */ e.jsx(Te, { value: "custom", id: "r2" }),
4043
4077
  /* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r2", children: "Custom" })
4044
4078
  ] })
4045
4079
  ]
@@ -4048,7 +4082,7 @@ function Wa() {
4048
4082
  ] }),
4049
4083
  b === "custom" && d == "linear" && P(),
4050
4084
  H(),
4051
- /* @__PURE__ */ e.jsx(sn, {}),
4085
+ /* @__PURE__ */ e.jsx(en, {}),
4052
4086
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
4053
4087
  O,
4054
4088
  {
@@ -4062,7 +4096,7 @@ function Wa() {
4062
4096
  ] }) })
4063
4097
  ] });
4064
4098
  }
4065
- function Ml({ idx: s }) {
4099
+ function Ll({ idx: s }) {
4066
4100
  var o;
4067
4101
  const t = m((c) => {
4068
4102
  var p;
@@ -4076,7 +4110,7 @@ function Ml({ idx: s }) {
4076
4110
  (c) => c.actions.setCardPreferences
4077
4111
  ), l = (o = t == null ? void 0 : t.chartOptions) == null ? void 0 : o.indexAxis, d = a == null ? void 0 : a.find((c) => c.idx === s);
4078
4112
  function r(c, p) {
4079
- (c === "end" || c === "start") && an(tn());
4113
+ (c === "end" || c === "start") && sn(an());
4080
4114
  const u = {
4081
4115
  display: c !== "none",
4082
4116
  align: c,
@@ -4106,9 +4140,9 @@ function Ml({ idx: s }) {
4106
4140
  });
4107
4141
  }
4108
4142
  }
4109
- return /* @__PURE__ */ e.jsxs(ms, { children: [
4110
- /* @__PURE__ */ e.jsx(hs, { children: /* @__PURE__ */ e.jsx(Kn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
4111
- /* @__PURE__ */ e.jsx(xs, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
4143
+ return /* @__PURE__ */ e.jsxs(ps, { children: [
4144
+ /* @__PURE__ */ e.jsx(fs, { children: /* @__PURE__ */ e.jsx(Jn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
4145
+ /* @__PURE__ */ e.jsx(gs, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
4112
4146
  /* @__PURE__ */ e.jsx(
4113
4147
  O,
4114
4148
  {
@@ -4127,7 +4161,7 @@ function Ml({ idx: s }) {
4127
4161
  variant: "secondary",
4128
4162
  className: "h-7 p-1 text-xs font-normal",
4129
4163
  children: /* @__PURE__ */ e.jsx(
4130
- qn,
4164
+ Vn,
4131
4165
  {
4132
4166
  className: Q("h-4 w-4", {
4133
4167
  "rotate-90": l === "y"
@@ -4144,7 +4178,7 @@ function Ml({ idx: s }) {
4144
4178
  variant: "secondary",
4145
4179
  className: "h-7 p-1 text-xs font-normal",
4146
4180
  children: /* @__PURE__ */ e.jsx(
4147
- _n,
4181
+ Rn,
4148
4182
  {
4149
4183
  className: Q("h-4 w-4", {
4150
4184
  "rotate-90": l === "y"
@@ -4161,7 +4195,7 @@ function Ml({ idx: s }) {
4161
4195
  variant: "secondary",
4162
4196
  className: "h-7 p-1 text-xs font-normal",
4163
4197
  children: /* @__PURE__ */ e.jsx(
4164
- Rn,
4198
+ qn,
4165
4199
  {
4166
4200
  className: Q("h-4 w-4", {
4167
4201
  "rotate-90": l === "y"
@@ -4183,15 +4217,15 @@ function Ya() {
4183
4217
  keys: d,
4184
4218
  metricKeys: r,
4185
4219
  dimensionKeys: o
4186
- } = vs((a == null ? void 0 : a.records) || []);
4220
+ } = Ss((a == null ? void 0 : a.records) || []);
4187
4221
  let c = r;
4188
4222
  if (["stackedBar", "stackedLine"].includes(s.type)) {
4189
- const p = nn({
4223
+ const p = tn({
4190
4224
  dataArray: (a == null ? void 0 : a.records) || [],
4191
4225
  groupKey: o[0],
4192
4226
  pivotKey: o[1],
4193
4227
  valueKey: c[0]
4194
- }), { metricKeys: u } = vs(p);
4228
+ }), { metricKeys: u } = Ss(p);
4195
4229
  c = u;
4196
4230
  }
4197
4231
  return d.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
@@ -4204,11 +4238,11 @@ function Ya() {
4204
4238
  /* @__PURE__ */ e.jsx(R, { children: l }),
4205
4239
  /* @__PURE__ */ e.jsx(Wa, {})
4206
4240
  ] }),
4207
- /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: c.map((p, u) => /* @__PURE__ */ e.jsx(El, { col: p, idx: u }, p)) })
4241
+ /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: c.map((p, u) => /* @__PURE__ */ e.jsx(Ml, { col: p, idx: u }, p)) })
4208
4242
  ] })
4209
4243
  ] });
4210
4244
  }
4211
- function El({ col: s, idx: t }) {
4245
+ function Ml({ col: s, idx: t }) {
4212
4246
  const a = m((o) => {
4213
4247
  var c;
4214
4248
  return (c = o.card) == null ? void 0 : c.preferences;
@@ -4247,27 +4281,27 @@ function El({ col: s, idx: t }) {
4247
4281
  /* @__PURE__ */ e.jsx("p", { children: s }),
4248
4282
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
4249
4283
  /* @__PURE__ */ e.jsx(
4250
- Ps,
4284
+ Bs,
4251
4285
  {
4252
4286
  onClick: () => r("bar"),
4253
4287
  className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
4254
4288
  }
4255
4289
  ),
4256
4290
  /* @__PURE__ */ e.jsx(
4257
- Bs,
4291
+ Us,
4258
4292
  {
4259
4293
  onClick: () => r("line"),
4260
4294
  className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
4261
4295
  }
4262
4296
  ),
4263
4297
  /* @__PURE__ */ e.jsx(
4264
- kn,
4298
+ wn,
4265
4299
  {
4266
4300
  onClick: () => r("area"),
4267
4301
  className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
4268
4302
  }
4269
4303
  ),
4270
- /* @__PURE__ */ e.jsx(Ml, { idx: t })
4304
+ /* @__PURE__ */ e.jsx(Ll, { idx: t })
4271
4305
  ] })
4272
4306
  ] });
4273
4307
  }
@@ -4285,7 +4319,7 @@ function Xa() {
4285
4319
  const A = (S = p == null ? void 0 : p.find(
4286
4320
  (L) => L.id === t
4287
4321
  )) == null ? void 0 : S.name;
4288
- t && t !== "none" && (I = `${ys}.${A}.${j}`, T = `${ys}.${A}`);
4322
+ t && t !== "none" && (I = `${Ns}.${A}.${j}`, T = `${Ns}.${A}`);
4289
4323
  const N = d == null ? void 0 : d.find(
4290
4324
  (L) => L.column === I && L.table === y && (L.database === C || L.database === a)
4291
4325
  );
@@ -4345,18 +4379,18 @@ function He() {
4345
4379
  const r = s == null ? void 0 : s.find((o) => o.id === t.filterId);
4346
4380
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
4347
4381
  /* @__PURE__ */ e.jsx(R, { children: "Card Filter" }),
4348
- /* @__PURE__ */ e.jsx(Al, { onSelect: d, columns: n }),
4349
- r && /* @__PURE__ */ e.jsx(ln, { filter: r })
4382
+ /* @__PURE__ */ e.jsx(El, { onSelect: d, columns: n }),
4383
+ r && /* @__PURE__ */ e.jsx(nn, { filter: r })
4350
4384
  ] });
4351
4385
  }
4352
- function Al({
4386
+ function El({
4353
4387
  columns: s,
4354
4388
  onSelect: t
4355
4389
  }) {
4356
4390
  var r;
4357
4391
  const [a, n] = ea.useState(!1), [l, d] = ea.useState("");
4358
- return /* @__PURE__ */ e.jsxs(ms, { open: a, onOpenChange: n, children: [
4359
- /* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
4392
+ return /* @__PURE__ */ e.jsxs(ps, { open: a, onOpenChange: n, children: [
4393
+ /* @__PURE__ */ e.jsx(fs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
4360
4394
  O,
4361
4395
  {
4362
4396
  size: "sm",
@@ -4366,16 +4400,16 @@ function Al({
4366
4400
  className: "w-full justify-between font-normal",
4367
4401
  children: [
4368
4402
  l ? (r = s.find((o) => o.column_name === l)) == null ? void 0 : r.column_name : "Select Column...",
4369
- /* @__PURE__ */ e.jsx(rn, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4403
+ /* @__PURE__ */ e.jsx(ln, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4370
4404
  ]
4371
4405
  }
4372
4406
  ) }),
4373
- /* @__PURE__ */ e.jsx(xs, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(on, { children: [
4374
- /* @__PURE__ */ e.jsx(cn, { placeholder: "Search column", className: "h-9" }),
4375
- /* @__PURE__ */ e.jsxs(dn, { children: [
4376
- /* @__PURE__ */ e.jsx(un, { children: "No framework found." }),
4377
- /* @__PURE__ */ e.jsx(mn, { children: s.map((o) => /* @__PURE__ */ e.jsxs(
4378
- hn,
4407
+ /* @__PURE__ */ e.jsx(gs, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(rn, { children: [
4408
+ /* @__PURE__ */ e.jsx(on, { placeholder: "Search column", className: "h-9" }),
4409
+ /* @__PURE__ */ e.jsxs(cn, { children: [
4410
+ /* @__PURE__ */ e.jsx(dn, { children: "No framework found." }),
4411
+ /* @__PURE__ */ e.jsx(un, { children: s.map((o) => /* @__PURE__ */ e.jsxs(
4412
+ mn,
4379
4413
  {
4380
4414
  value: o.column_name,
4381
4415
  onSelect: (c) => {
@@ -4401,12 +4435,12 @@ function Al({
4401
4435
  ] }) })
4402
4436
  ] });
4403
4437
  }
4404
- function Vl({
4438
+ function Al({
4405
4439
  cardType: s
4406
4440
  }) {
4407
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(De, { defaultValue: ["item-2"], type: "multiple", children: [
4441
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
4408
4442
  /* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
4409
- /* @__PURE__ */ e.jsx(U, { children: `${$s(s)} Chart` }),
4443
+ /* @__PURE__ */ e.jsx(U, { children: `${Ps(s)} Chart` }),
4410
4444
  /* @__PURE__ */ e.jsxs(G, { className: "space-y-4 font-mono text-xs", children: [
4411
4445
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT x-axis, y-axis-1, y-axis-2,... FROM table" }),
4412
4446
  /* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
@@ -4433,20 +4467,20 @@ function Vl({
4433
4467
  /* @__PURE__ */ e.jsxs(B, { value: "item-2", children: [
4434
4468
  /* @__PURE__ */ e.jsx(U, { children: "Settings" }),
4435
4469
  /* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
4436
- /* @__PURE__ */ e.jsx(fs, {}),
4470
+ /* @__PURE__ */ e.jsx(bs, {}),
4437
4471
  /* @__PURE__ */ e.jsx(Ya, {})
4438
4472
  ] })
4439
4473
  ] }),
4440
4474
  /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
4441
4475
  /* @__PURE__ */ e.jsx(U, { children: "Filters" }),
4442
4476
  /* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
4443
- /* @__PURE__ */ e.jsx(Te, {}),
4477
+ /* @__PURE__ */ e.jsx(Me, {}),
4444
4478
  /* @__PURE__ */ e.jsx(He, {})
4445
4479
  ] })
4446
4480
  ] })
4447
4481
  ] }) });
4448
4482
  }
4449
- function Gs() {
4483
+ function Qs() {
4450
4484
  var l, d, r;
4451
4485
  const s = m(
4452
4486
  (o) => o.card.cfg
@@ -4485,7 +4519,7 @@ function Gs() {
4485
4519
  defaultValue: "none",
4486
4520
  children: [
4487
4521
  /* @__PURE__ */ e.jsx(he, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, { placeholder: "Select position" }) }),
4488
- /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
4522
+ /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
4489
4523
  /* @__PURE__ */ e.jsx(fe, { children: "Data Labels" }),
4490
4524
  /* @__PURE__ */ e.jsx(K, { value: "none", children: "None" }),
4491
4525
  a !== "pyramid" && /* @__PURE__ */ e.jsx(K, { value: "start", children: "Start" }),
@@ -4497,7 +4531,7 @@ function Gs() {
4497
4531
  )
4498
4532
  ] });
4499
4533
  }
4500
- function ql({
4534
+ function Vl({
4501
4535
  cardType: s
4502
4536
  }) {
4503
4537
  function t(a) {
@@ -4526,25 +4560,25 @@ function ql({
4526
4560
  ] })
4527
4561
  ] });
4528
4562
  }
4529
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(De, { defaultValue: ["item-2"], type: "multiple", children: [
4563
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
4530
4564
  /* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
4531
- /* @__PURE__ */ e.jsx(U, { children: `${$s(s)} Chart` }),
4565
+ /* @__PURE__ */ e.jsx(U, { children: `${Ps(s)} Chart` }),
4532
4566
  /* @__PURE__ */ e.jsx(G, { className: "space-y-4 font-mono text-xs", children: t(s) })
4533
4567
  ] }),
4534
4568
  /* @__PURE__ */ e.jsxs(B, { value: "item-2", children: [
4535
4569
  /* @__PURE__ */ e.jsx(U, { children: "Settings" }),
4536
- /* @__PURE__ */ e.jsx(G, { className: "px-2", children: /* @__PURE__ */ e.jsx(Gs, {}) })
4570
+ /* @__PURE__ */ e.jsx(G, { className: "px-2", children: /* @__PURE__ */ e.jsx(Qs, {}) })
4537
4571
  ] }),
4538
4572
  /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
4539
4573
  /* @__PURE__ */ e.jsx(U, { children: "Filters" }),
4540
4574
  /* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
4541
- /* @__PURE__ */ e.jsx(Te, {}),
4575
+ /* @__PURE__ */ e.jsx(Me, {}),
4542
4576
  /* @__PURE__ */ e.jsx(He, {})
4543
4577
  ] })
4544
4578
  ] })
4545
4579
  ] }) });
4546
4580
  }
4547
- const Rl = {
4581
+ const ql = {
4548
4582
  datasets: [
4549
4583
  {
4550
4584
  type: "line",
@@ -4557,7 +4591,7 @@ const Rl = {
4557
4591
  data: []
4558
4592
  }
4559
4593
  ]
4560
- }, _l = {
4594
+ }, Rl = {
4561
4595
  datasets: [
4562
4596
  {
4563
4597
  fill: "origin",
@@ -4567,27 +4601,27 @@ const Rl = {
4567
4601
  }
4568
4602
  ]
4569
4603
  };
4570
- function Hl() {
4604
+ function _l() {
4571
4605
  const s = m((t) => t.card.type);
4572
4606
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
4573
4607
  /* @__PURE__ */ e.jsx(
4574
- De,
4608
+ Le,
4575
4609
  {
4576
4610
  className: " ",
4577
4611
  type: "single",
4578
4612
  collapsible: !0,
4579
- children: $l(s)
4613
+ children: Hl(s)
4580
4614
  }
4581
4615
  ),
4582
- /* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(fs, {}) }),
4616
+ /* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(bs, {}) }),
4583
4617
  !["kpi"].includes(s) && /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
4584
- /* @__PURE__ */ e.jsx(Gs, {}),
4585
- /* @__PURE__ */ e.jsx(Te, {}),
4618
+ /* @__PURE__ */ e.jsx(Qs, {}),
4619
+ /* @__PURE__ */ e.jsx(Me, {}),
4586
4620
  /* @__PURE__ */ e.jsx(He, {})
4587
4621
  ] })
4588
4622
  ] });
4589
4623
  }
4590
- function $l(s) {
4624
+ function Hl(s) {
4591
4625
  if (["line", "bar"].includes(s))
4592
4626
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
4593
4627
  /* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
@@ -4608,7 +4642,7 @@ function $l(s) {
4608
4642
  /* @__PURE__ */ e.jsx("b", { children: "Customize" }),
4609
4643
  " and change the `type` property in the dataset."
4610
4644
  ] }),
4611
- /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Rl, null, 2) })
4645
+ /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(ql, null, 2) })
4612
4646
  ] })
4613
4647
  ] }),
4614
4648
  /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
@@ -4629,7 +4663,7 @@ function $l(s) {
4629
4663
  ),
4630
4664
  "for more options."
4631
4665
  ] }),
4632
- /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(_l, null, 2) })
4666
+ /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Rl, null, 2) })
4633
4667
  ] })
4634
4668
  ] })
4635
4669
  ] });
@@ -4684,7 +4718,7 @@ function $l(s) {
4684
4718
  ] })
4685
4719
  ] }) });
4686
4720
  }
4687
- function Pl() {
4721
+ function $l() {
4688
4722
  var c, p, u, b, g;
4689
4723
  const s = m((h) => h.card.preferences), t = m(
4690
4724
  (h) => h.actions.setCardPreferences
@@ -4718,11 +4752,11 @@ function Pl() {
4718
4752
  }
4719
4753
  ) || [], r = m(
4720
4754
  (h) => h.actions.setColorRanges
4721
- ), o = [...new Set(os.map((h) => h.currency))];
4755
+ ), o = [...new Set(us.map((h) => h.currency))];
4722
4756
  return /* @__PURE__ */ e.jsxs("div", { children: [
4723
4757
  /* @__PURE__ */ e.jsxs("div", { className: "mb-3 flex items-center gap-2", children: [
4724
4758
  /* @__PURE__ */ e.jsx(
4725
- Hs,
4759
+ $s,
4726
4760
  {
4727
4761
  checked: !!((c = s == null ? void 0 : s.formatNumber) != null && c.enabled),
4728
4762
  onCheckedChange: (h) => {
@@ -4758,10 +4792,10 @@ function Pl() {
4758
4792
  },
4759
4793
  children: [
4760
4794
  /* @__PURE__ */ e.jsx(he, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
4761
- /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
4795
+ /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
4762
4796
  /* @__PURE__ */ e.jsx(fe, { children: "Format" }),
4763
4797
  /* @__PURE__ */ e.jsx(K, { value: "none", children: "None" }, "none"),
4764
- os.map((h) => /* @__PURE__ */ e.jsx(K, { value: h.locale, children: h.locale }, h.locale))
4798
+ us.map((h) => /* @__PURE__ */ e.jsx(K, { value: h.locale, children: h.locale }, h.locale))
4765
4799
  ] }) })
4766
4800
  ]
4767
4801
  }
@@ -4784,7 +4818,7 @@ function Pl() {
4784
4818
  },
4785
4819
  children: [
4786
4820
  /* @__PURE__ */ e.jsx(he, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
4787
- /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
4821
+ /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
4788
4822
  /* @__PURE__ */ e.jsx(fe, { children: "Currency" }),
4789
4823
  /* @__PURE__ */ e.jsx(K, { value: "none", children: "None" }, "none"),
4790
4824
  o.map((h) => /* @__PURE__ */ e.jsx(K, { value: h, children: h }, h))
@@ -4839,9 +4873,9 @@ function Pl() {
4839
4873
  ] })
4840
4874
  ] })
4841
4875
  ] }) }),
4842
- /* @__PURE__ */ e.jsx(Se, { className: "my-3" }),
4876
+ /* @__PURE__ */ e.jsx(we, { className: "my-3" }),
4843
4877
  /* @__PURE__ */ e.jsx(
4844
- xn,
4878
+ hn,
4845
4879
  {
4846
4880
  colorRanges: d,
4847
4881
  setColorRanges: r
@@ -4850,9 +4884,9 @@ function Pl() {
4850
4884
  ] })
4851
4885
  ] });
4852
4886
  }
4853
- function Bl() {
4887
+ function Pl() {
4854
4888
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
4855
- /* @__PURE__ */ e.jsx(De, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
4889
+ /* @__PURE__ */ e.jsx(Le, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
4856
4890
  /* @__PURE__ */ e.jsx(U, { className: "", children: "KPI Query" }),
4857
4891
  /* @__PURE__ */ e.jsxs(G, { className: "font-mono", children: [
4858
4892
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs", children: "SELECT current, previous FROM table" }),
@@ -4876,12 +4910,12 @@ function Bl() {
4876
4910
  ] })
4877
4911
  ] })
4878
4912
  ] }) }),
4879
- /* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(Pl, {}) }),
4913
+ /* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx($l, {}) }),
4880
4914
  /* @__PURE__ */ e.jsx("div", {}),
4881
4915
  /* @__PURE__ */ e.jsx("div", {})
4882
4916
  ] });
4883
4917
  }
4884
- const Ul = [
4918
+ const Bl = [
4885
4919
  {
4886
4920
  label: "Mercator",
4887
4921
  value: "mercator"
@@ -4938,7 +4972,7 @@ const Ul = [
4938
4972
  label: "Natural Earth 1",
4939
4973
  value: "naturalEarth1"
4940
4974
  }
4941
- ], Gl = [
4975
+ ], Ul = [
4942
4976
  "blues",
4943
4977
  "brBG",
4944
4978
  "buGn",
@@ -4977,15 +5011,15 @@ const Ul = [
4977
5011
  "ylGnBu",
4978
5012
  "ylOrBr",
4979
5013
  "ylOrRd"
4980
- ], Ql = Gl.map((s) => ({
5014
+ ], Gl = Ul.map((s) => ({
4981
5015
  label: s,
4982
5016
  value: s
4983
5017
  }));
4984
- function Jl() {
5018
+ function Ql() {
4985
5019
  var c, p, u, b, g, h, j, C, F, y, T, I, A, N, S, L, x, v;
4986
5020
  const s = m((f) => f.card), t = (p = (c = s == null ? void 0 : s.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : p.topoJsonUrl, [a, n] = q(
4987
5021
  ((b = (u = s == null ? void 0 : s.preferences) == null ? void 0 : u.mapVisualOptions) == null ? void 0 : b.customTopoJsonUrl) || ""
4988
- ), { setCardPreferences: l } = re(), { data: d } = _s(s), r = Object.keys((d == null ? void 0 : d.objects) || {}).map((f) => ({
5022
+ ), { setCardPreferences: l } = re(), { data: d } = Hs(s), r = Object.keys((d == null ? void 0 : d.objects) || {}).map((f) => ({
4989
5023
  label: f,
4990
5024
  value: f
4991
5025
  })) || [], o = [
@@ -5004,7 +5038,7 @@ function Jl() {
5004
5038
  ];
5005
5039
  return /* @__PURE__ */ e.jsxs("div", { className: "p-6", children: [
5006
5040
  /* @__PURE__ */ e.jsx(Qe, { summary: "Map Query", children: /* @__PURE__ */ e.jsx("p", { className: "rounded-md bg-muted p-2 font-mono text-xs", children: "SELECT country, value FROM table" }) }),
5007
- /* @__PURE__ */ e.jsx(Se, { className: "my-4" }),
5041
+ /* @__PURE__ */ e.jsx(we, { className: "my-4" }),
5008
5042
  /* @__PURE__ */ e.jsx(Qe, { open: !0, summary: "Settings", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-3 px-2", children: [
5009
5043
  /* @__PURE__ */ e.jsx(
5010
5044
  ue,
@@ -5074,7 +5108,7 @@ function Jl() {
5074
5108
  ue,
5075
5109
  {
5076
5110
  className: "h-9",
5077
- options: Ul,
5111
+ options: Bl,
5078
5112
  value: ((C = (j = s.preferences) == null ? void 0 : j.mapVisualOptions) == null ? void 0 : C.projection) || "",
5079
5113
  label: "Projection",
5080
5114
  onValueChange: (f) => {
@@ -5096,7 +5130,7 @@ function Jl() {
5096
5130
  ue,
5097
5131
  {
5098
5132
  className: "h-9",
5099
- options: Ql,
5133
+ options: Gl,
5100
5134
  value: ((y = (F = s.preferences) == null ? void 0 : F.mapVisualOptions) == null ? void 0 : y.colorScale) || "",
5101
5135
  label: "Select Color Scale",
5102
5136
  onValueChange: (f) => {
@@ -5114,7 +5148,7 @@ function Jl() {
5114
5148
  ] })
5115
5149
  ] })
5116
5150
  ] }) }),
5117
- /* @__PURE__ */ e.jsx(Se, { className: "my-4" }),
5151
+ /* @__PURE__ */ e.jsx(we, { className: "my-4" }),
5118
5152
  /* @__PURE__ */ e.jsx(Qe, { className: "", summary: "Scale Options", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
5119
5153
  /* @__PURE__ */ e.jsx(
5120
5154
  le,
@@ -5182,11 +5216,11 @@ function Jl() {
5182
5216
  }
5183
5217
  )
5184
5218
  ] }) }),
5185
- /* @__PURE__ */ e.jsx(Se, { className: "my-4" }),
5186
- /* @__PURE__ */ e.jsx(Te, {})
5219
+ /* @__PURE__ */ e.jsx(we, { className: "my-4" }),
5220
+ /* @__PURE__ */ e.jsx(Me, {})
5187
5221
  ] });
5188
5222
  }
5189
- function Kl() {
5223
+ function Jl() {
5190
5224
  var n;
5191
5225
  const s = m((l) => l.card.preferences), { setCardPreferences: t } = m((l) => l.actions);
5192
5226
  function a(l) {
@@ -5199,7 +5233,7 @@ function Kl() {
5199
5233
  });
5200
5234
  }
5201
5235
  return /* @__PURE__ */ e.jsxs(
5202
- ps,
5236
+ js,
5203
5237
  {
5204
5238
  value: (n = s == null ? void 0 : s.textVisualOptions) != null && n.isDynamicText ? "dynamic" : "static",
5205
5239
  onValueChange: a,
@@ -5207,11 +5241,11 @@ function Kl() {
5207
5241
  defaultValue: "x",
5208
5242
  children: [
5209
5243
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
5210
- /* @__PURE__ */ e.jsx(Ie, { value: "static", id: "r1" }),
5244
+ /* @__PURE__ */ e.jsx(Te, { value: "static", id: "r1" }),
5211
5245
  /* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r1", children: "Static" })
5212
5246
  ] }),
5213
5247
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
5214
- /* @__PURE__ */ e.jsx(Ie, { value: "dynamic", id: "r2" }),
5248
+ /* @__PURE__ */ e.jsx(Te, { value: "dynamic", id: "r2" }),
5215
5249
  /* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r2", children: "Dynamic" })
5216
5250
  ] })
5217
5251
  ]
@@ -5224,9 +5258,9 @@ function ns({
5224
5258
  suffix: a = "Chart"
5225
5259
  }) {
5226
5260
  let n = "pie-chart";
5227
- return s === "radar" && (n = "radar-chart"), /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(De, { defaultValue: ["item-2"], type: "multiple", children: [
5261
+ return s === "radar" && (n = "radar-chart"), /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
5228
5262
  /* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
5229
- /* @__PURE__ */ e.jsx(U, { children: `${$s(s)} ${a}` }),
5263
+ /* @__PURE__ */ e.jsx(U, { children: `${Ps(s)} ${a}` }),
5230
5264
  /* @__PURE__ */ e.jsx(G, { children: t || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5231
5265
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT label, measure FROM table" }),
5232
5266
  /* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
@@ -5252,21 +5286,21 @@ function ns({
5252
5286
  /* @__PURE__ */ e.jsxs(B, { value: "item-2", children: [
5253
5287
  /* @__PURE__ */ e.jsx(U, { children: "Settings" }),
5254
5288
  /* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
5255
- s === "range" && /* @__PURE__ */ e.jsx(fs, {}),
5256
- s !== "text" && /* @__PURE__ */ e.jsx(Gs, {}),
5257
- s === "text" && /* @__PURE__ */ e.jsx(Kl, {})
5289
+ s === "range" && /* @__PURE__ */ e.jsx(bs, {}),
5290
+ s !== "text" && /* @__PURE__ */ e.jsx(Qs, {}),
5291
+ s === "text" && /* @__PURE__ */ e.jsx(Jl, {})
5258
5292
  ] })
5259
5293
  ] }),
5260
5294
  !["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
5261
5295
  /* @__PURE__ */ e.jsx(U, { children: "Filters" }),
5262
5296
  /* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
5263
- /* @__PURE__ */ e.jsx(Te, {}),
5297
+ /* @__PURE__ */ e.jsx(Me, {}),
5264
5298
  /* @__PURE__ */ e.jsx(He, {})
5265
5299
  ] })
5266
5300
  ] })
5267
5301
  ] }) });
5268
5302
  }
5269
- function Wl() {
5303
+ function Kl() {
5270
5304
  const s = m(
5271
5305
  (n) => {
5272
5306
  var l, d;
@@ -5303,7 +5337,7 @@ function Wl() {
5303
5337
  )
5304
5338
  ] });
5305
5339
  }
5306
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(De, { defaultValue: ["item-2"], type: "multiple", children: [
5340
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
5307
5341
  /* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
5308
5342
  /* @__PURE__ */ e.jsx(U, { children: "Stacked Chart" }),
5309
5343
  /* @__PURE__ */ e.jsxs(G, { className: "space-y-4 font-mono text-xs", children: [
@@ -5332,7 +5366,7 @@ function Wl() {
5332
5366
  /* @__PURE__ */ e.jsxs(B, { value: "item-2", children: [
5333
5367
  /* @__PURE__ */ e.jsx(U, { children: "Settings" }),
5334
5368
  /* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
5335
- /* @__PURE__ */ e.jsx(fs, {}),
5369
+ /* @__PURE__ */ e.jsx(bs, {}),
5336
5370
  a(),
5337
5371
  /* @__PURE__ */ e.jsx(Ya, {})
5338
5372
  ] })
@@ -5340,13 +5374,13 @@ function Wl() {
5340
5374
  /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
5341
5375
  /* @__PURE__ */ e.jsx(U, { children: "Filters" }),
5342
5376
  /* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
5343
- /* @__PURE__ */ e.jsx(Te, {}),
5377
+ /* @__PURE__ */ e.jsx(Me, {}),
5344
5378
  /* @__PURE__ */ e.jsx(He, {})
5345
5379
  ] })
5346
5380
  ] })
5347
5381
  ] }) });
5348
5382
  }
5349
- function Yl({}) {
5383
+ function Wl({}) {
5350
5384
  const s = m((n) => {
5351
5385
  var l;
5352
5386
  return (l = n.card) == null ? void 0 : l.preferences;
@@ -5359,15 +5393,15 @@ function Yl({}) {
5359
5393
  });
5360
5394
  };
5361
5395
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
5362
- /* @__PURE__ */ e.jsx(De, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
5396
+ /* @__PURE__ */ e.jsx(Le, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
5363
5397
  /* @__PURE__ */ e.jsx(U, { children: "Filters" }),
5364
5398
  /* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
5365
- /* @__PURE__ */ e.jsx(Te, {}),
5399
+ /* @__PURE__ */ e.jsx(Me, {}),
5366
5400
  /* @__PURE__ */ e.jsx(He, {})
5367
5401
  ] })
5368
5402
  ] }) }),
5369
5403
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
5370
- /* @__PURE__ */ e.jsx(Hs, { onCheckedChange: a, id: "allow-download" }),
5404
+ /* @__PURE__ */ e.jsx($s, { onCheckedChange: a, id: "allow-download" }),
5371
5405
  /* @__PURE__ */ e.jsx(
5372
5406
  "label",
5373
5407
  {
@@ -5379,7 +5413,7 @@ function Yl({}) {
5379
5413
  ] })
5380
5414
  ] });
5381
5415
  }
5382
- const Xl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5416
+ const Yl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5383
5417
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT dimension, cohort, metric FROM table" }),
5384
5418
  /* @__PURE__ */ e.jsxs("div", { children: [
5385
5419
  "See ",
@@ -5395,7 +5429,7 @@ const Xl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
5395
5429
  ),
5396
5430
  " in the docs."
5397
5431
  ] })
5398
- ] }), Zl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5432
+ ] }), Xl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5399
5433
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT y-axis, label, range-from, range-to, range-value FROM table" }),
5400
5434
  /* @__PURE__ */ e.jsxs("div", { children: [
5401
5435
  "See ",
@@ -5411,7 +5445,7 @@ const Xl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
5411
5445
  ),
5412
5446
  " in the docs."
5413
5447
  ] })
5414
- ] }), er = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5448
+ ] }), Zl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5415
5449
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT text FROM table limit 1" }),
5416
5450
  /* @__PURE__ */ e.jsxs("div", { children: [
5417
5451
  "See ",
@@ -5428,22 +5462,22 @@ const Xl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
5428
5462
  " in the docs."
5429
5463
  ] })
5430
5464
  ] });
5431
- function sr() {
5465
+ function er() {
5432
5466
  const s = m((a) => a.card.type);
5433
5467
  function t(a) {
5434
5468
  switch (a) {
5435
5469
  case "stackedBar":
5436
5470
  case "stackedLine":
5437
- return /* @__PURE__ */ e.jsx(Wl, {});
5471
+ return /* @__PURE__ */ e.jsx(Kl, {});
5438
5472
  case "pyramid":
5439
- return /* @__PURE__ */ e.jsx(ns, { docContent: Xl, cardType: a });
5473
+ return /* @__PURE__ */ e.jsx(ns, { docContent: Yl, cardType: a });
5440
5474
  case "kpi":
5441
- return /* @__PURE__ */ e.jsx(Bl, {});
5475
+ return /* @__PURE__ */ e.jsx(Pl, {});
5442
5476
  case "line":
5443
5477
  case "bar":
5444
- return /* @__PURE__ */ e.jsx(Vl, { cardType: a });
5478
+ return /* @__PURE__ */ e.jsx(Al, { cardType: a });
5445
5479
  case "range":
5446
- return /* @__PURE__ */ e.jsx(ns, { docContent: Zl, cardType: a });
5480
+ return /* @__PURE__ */ e.jsx(ns, { docContent: Xl, cardType: a });
5447
5481
  case "pie":
5448
5482
  case "doughnut":
5449
5483
  case "polarArea":
@@ -5451,67 +5485,67 @@ function sr() {
5451
5485
  return /* @__PURE__ */ e.jsx(ns, { cardType: a });
5452
5486
  case "bubble":
5453
5487
  case "scatter":
5454
- return /* @__PURE__ */ e.jsx(ql, { cardType: a });
5488
+ return /* @__PURE__ */ e.jsx(Vl, { cardType: a });
5455
5489
  case "table":
5456
- return /* @__PURE__ */ e.jsx(Yl, { cardType: a });
5490
+ return /* @__PURE__ */ e.jsx(Wl, { cardType: a });
5457
5491
  case "text":
5458
5492
  return /* @__PURE__ */ e.jsx(
5459
5493
  ns,
5460
5494
  {
5461
- docContent: er,
5495
+ docContent: Zl,
5462
5496
  cardType: a,
5463
5497
  suffix: "Visual"
5464
5498
  }
5465
5499
  );
5466
5500
  case "map":
5467
- return /* @__PURE__ */ e.jsx(Jl, {});
5501
+ return /* @__PURE__ */ e.jsx(Ql, {});
5468
5502
  case "custom":
5469
- return /* @__PURE__ */ e.jsx(Ll, {});
5503
+ return /* @__PURE__ */ e.jsx(Tl, {});
5470
5504
  default:
5471
- return /* @__PURE__ */ e.jsx(Hl, {});
5505
+ return /* @__PURE__ */ e.jsx(_l, {});
5472
5506
  }
5473
5507
  }
5474
- return /* @__PURE__ */ e.jsx(qe, { className: "h-full w-full text-sm", children: t(s) });
5508
+ return /* @__PURE__ */ e.jsx(De, { className: "h-full w-full text-sm", children: t(s) });
5475
5509
  }
5476
- function ar() {
5510
+ function sr() {
5477
5511
  const s = m((t) => t.isShowingVisual);
5478
5512
  return /* @__PURE__ */ e.jsxs(
5479
- Cs,
5513
+ cs,
5480
5514
  {
5481
5515
  direction: "vertical",
5482
5516
  className: "min-h-[250px] min-w-full max-w-lg",
5483
5517
  children: [
5484
5518
  /* @__PURE__ */ e.jsx(
5485
- Ae,
5519
+ Ne,
5486
5520
  {
5487
5521
  role: "query-section",
5488
5522
  className: "flex",
5489
5523
  minSize: 20,
5490
5524
  defaultSize: 40,
5491
- children: /* @__PURE__ */ e.jsx(vl, {})
5525
+ children: /* @__PURE__ */ e.jsx(yl, {})
5492
5526
  }
5493
5527
  ),
5494
- /* @__PURE__ */ e.jsx(Ns, { withHandle: !0, className: "border" }),
5528
+ /* @__PURE__ */ e.jsx(ds, { withHandle: !0, className: "border" }),
5495
5529
  /* @__PURE__ */ e.jsx(
5496
- Ae,
5530
+ Ne,
5497
5531
  {
5498
5532
  className: "pb-1",
5499
5533
  role: "visual-section",
5500
5534
  minSize: 0,
5501
5535
  defaultSize: 60,
5502
- children: s ? /* @__PURE__ */ e.jsxs(Cs, { direction: "horizontal", children: [
5536
+ children: s ? /* @__PURE__ */ e.jsxs(cs, { direction: "horizontal", children: [
5503
5537
  /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
5504
- Ae,
5538
+ Ne,
5505
5539
  {
5506
5540
  className: "flex min-w-[275px]",
5507
5541
  minSize: 20,
5508
5542
  defaultSize: 25,
5509
5543
  maxSize: 30,
5510
- children: /* @__PURE__ */ e.jsx(sr, {})
5544
+ children: /* @__PURE__ */ e.jsx(er, {})
5511
5545
  }
5512
5546
  ) }),
5513
- /* @__PURE__ */ e.jsx(Ns, { className: "border" }),
5514
- /* @__PURE__ */ e.jsx(Ae, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(ta, {}) })
5547
+ /* @__PURE__ */ e.jsx(ds, { className: "border" }),
5548
+ /* @__PURE__ */ e.jsx(Ne, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(ta, {}) })
5515
5549
  ] }) : /* @__PURE__ */ e.jsx(ta, {})
5516
5550
  }
5517
5551
  )
@@ -5519,15 +5553,15 @@ function ar() {
5519
5553
  }
5520
5554
  );
5521
5555
  }
5522
- function tr({ authToken: s, onSave: t, onClose: a }) {
5556
+ function ar({ authToken: s, onSave: t, onClose: a }) {
5523
5557
  z((r) => r.themeStyle);
5524
5558
  const n = m((r) => r.actions.setOnSave), l = m((r) => r.actions.setOnClose), d = z((r) => r.actions.setAuthToken);
5525
5559
  return Z(() => {
5526
5560
  t && n(t), a && l(a);
5527
5561
  }, [t, n, a, l]), Z(() => {
5528
5562
  s && s.accessToken && d(s);
5529
- }, [s, d]), /* @__PURE__ */ e.jsx(us, { FallbackComponent: ka, children: /* @__PURE__ */ e.jsxs(
5530
- pn,
5563
+ }, [s, d]), /* @__PURE__ */ e.jsx(xs, { FallbackComponent: ka, children: /* @__PURE__ */ e.jsxs(
5564
+ xn,
5531
5565
  {
5532
5566
  style: {
5533
5567
  // borderRadius: currentStyle?.chart?.options?.borderRadius,
@@ -5536,13 +5570,13 @@ function tr({ authToken: s, onSave: t, onClose: a }) {
5536
5570
  className: "rounded-none",
5537
5571
  role: "editor-panel",
5538
5572
  children: [
5539
- /* @__PURE__ */ e.jsx(fn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(Aa, {}) }),
5540
- /* @__PURE__ */ e.jsx(gn, { children: /* @__PURE__ */ e.jsx(ar, {}) })
5573
+ /* @__PURE__ */ e.jsx(pn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(Aa, {}) }),
5574
+ /* @__PURE__ */ e.jsx(fn, { children: /* @__PURE__ */ e.jsx(sr, {}) })
5541
5575
  ]
5542
5576
  }
5543
5577
  ) });
5544
5578
  }
5545
- function nr() {
5579
+ function tr() {
5546
5580
  z((r) => r.selectedCardId);
5547
5581
  const s = z((r) => r.selectedSheetId), { setIsVisualEditing: t } = z((r) => r.actions), a = z((r) => r.isVisualEditing), n = z((r) => r.actions.updateFrame);
5548
5582
  function l(r) {
@@ -5558,11 +5592,11 @@ function nr() {
5558
5592
  className: Q("flex grow", {
5559
5593
  "max-h-0 overflow-hidden": !a
5560
5594
  }),
5561
- children: /* @__PURE__ */ e.jsx(tr, { onSave: l, onClose: d })
5595
+ children: /* @__PURE__ */ e.jsx(ar, { onSave: l, onClose: d })
5562
5596
  }
5563
5597
  );
5564
5598
  }
5565
- function lr() {
5599
+ function nr() {
5566
5600
  m((r) => r.selectedConnectionId), m((r) => r.selectedDatamodelId);
5567
5601
  const s = m((r) => r.selectedDatabaseName);
5568
5602
  m((r) => r.selectedSchemaName);
@@ -5594,7 +5628,7 @@ function lr() {
5594
5628
  );
5595
5629
  }) });
5596
5630
  }
5597
- function rr() {
5631
+ function lr() {
5598
5632
  z((t) => t.showFilters);
5599
5633
  const s = z(
5600
5634
  (t) => t.actions.setShowFilters
@@ -5618,7 +5652,7 @@ function rr() {
5618
5652
  ColumnsComponent: () => (
5619
5653
  // schemaName, tableName, columns
5620
5654
  /* @__PURE__ */ e.jsx(
5621
- lr,
5655
+ nr,
5622
5656
  {}
5623
5657
  )
5624
5658
  )
@@ -5626,7 +5660,7 @@ function rr() {
5626
5660
  ) })
5627
5661
  ] });
5628
5662
  }
5629
- function ir() {
5663
+ function rr() {
5630
5664
  const s = z((a) => a.showFilters), t = z((a) => a.isVisualEditing);
5631
5665
  return /* @__PURE__ */ e.jsxs(
5632
5666
  "div",
@@ -5637,13 +5671,13 @@ function ir() {
5637
5671
  "flex grow": !t
5638
5672
  }),
5639
5673
  children: [
5640
- /* @__PURE__ */ e.jsx(jn, {}),
5641
- s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(rr, {}) })
5674
+ /* @__PURE__ */ e.jsx(gn, {}),
5675
+ s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(lr, {}) })
5642
5676
  ]
5643
5677
  }
5644
5678
  );
5645
5679
  }
5646
- function or() {
5680
+ function ir() {
5647
5681
  const s = z((n) => n.dashboard), t = z((n) => n.actions.setDashboard), a = z(
5648
5682
  (n) => n.showDashboardJSON
5649
5683
  );
@@ -5656,7 +5690,7 @@ function or() {
5656
5690
  hidden: !a
5657
5691
  }),
5658
5692
  children: /* @__PURE__ */ e.jsx(
5659
- bn,
5693
+ jn,
5660
5694
  {
5661
5695
  onChange: (n) => {
5662
5696
  if (n)
@@ -5687,65 +5721,65 @@ function or() {
5687
5721
  }
5688
5722
  );
5689
5723
  }
5690
- function mr({
5724
+ function ur({
5691
5725
  showControls: s = !1,
5692
5726
  showFooter: t = !0,
5693
5727
  ...a
5694
5728
  }) {
5695
- return /* @__PURE__ */ e.jsx(us, { FallbackComponent: ka, children: /* @__PURE__ */ e.jsxs(yn, { dashboardProps: a, children: [
5696
- /* @__PURE__ */ e.jsx(vn, {}),
5697
- /* @__PURE__ */ e.jsxs(Cn, { children: [
5698
- /* @__PURE__ */ e.jsx(or, {}),
5699
- /* @__PURE__ */ e.jsxs(Nn, { ...a, children: [
5700
- s && /* @__PURE__ */ e.jsx(ll, {}),
5701
- /* @__PURE__ */ e.jsx(nr, {}),
5702
- /* @__PURE__ */ e.jsx(ir, {})
5729
+ return /* @__PURE__ */ e.jsx(xs, { FallbackComponent: ka, children: /* @__PURE__ */ e.jsxs(bn, { dashboardProps: a, children: [
5730
+ /* @__PURE__ */ e.jsx(yn, {}),
5731
+ /* @__PURE__ */ e.jsxs(vn, { children: [
5732
+ /* @__PURE__ */ e.jsx(ir, {}),
5733
+ /* @__PURE__ */ e.jsxs(Cn, { ...a, children: [
5734
+ s && /* @__PURE__ */ e.jsx(nl, {}),
5735
+ /* @__PURE__ */ e.jsx(tr, {}),
5736
+ /* @__PURE__ */ e.jsx(rr, {})
5703
5737
  ] })
5704
5738
  ] })
5705
5739
  ] }) });
5706
5740
  }
5707
5741
  export {
5708
5742
  Be as A,
5709
- wn as B,
5710
- kn as C,
5711
- mr as D,
5743
+ Sn as B,
5744
+ wn as C,
5745
+ ur as D,
5712
5746
  Ia as E,
5713
5747
  Ma as F,
5714
- Ln as G,
5715
- Mn as H,
5716
- Vn as I,
5717
- Xn as J,
5718
- qn as L,
5748
+ Tn as G,
5749
+ Ln as H,
5750
+ An as I,
5751
+ Yn as J,
5752
+ Vn as L,
5719
5753
  Da as M,
5720
- $n as N,
5754
+ Hn as N,
5721
5755
  Ta as P,
5722
- Un as S,
5723
- Kn as T,
5724
- Yn as U,
5725
- Ps as a,
5726
- Bs as b,
5756
+ Bn as S,
5757
+ Jn as T,
5758
+ Wn as U,
5759
+ Bs as a,
5760
+ Us as b,
5727
5761
  za as c,
5728
5762
  Oa as d,
5729
5763
  Fa as e,
5730
- zn as f,
5731
- On as g,
5732
- Fn as h,
5733
- In as i,
5734
- Tn as j,
5735
- Dn as k,
5736
- En as l,
5737
- An as m,
5738
- Rn as n,
5739
- _n as o,
5740
- Ve as p,
5741
- Hn as q,
5742
- Pn as r,
5743
- Bn as s,
5764
+ kn as f,
5765
+ zn as g,
5766
+ On as h,
5767
+ Fn as i,
5768
+ Dn as j,
5769
+ In as k,
5770
+ Mn as l,
5771
+ En as m,
5772
+ qn as n,
5773
+ Rn as o,
5774
+ qe as p,
5775
+ _n as q,
5776
+ $n as r,
5777
+ Pn as s,
5744
5778
  La as t,
5745
- Gn as u,
5746
- Qn as v,
5747
- Jn as w,
5748
- Wn as x,
5749
- Us as y,
5779
+ Un as u,
5780
+ Gn as v,
5781
+ Qn as w,
5782
+ Kn as x,
5783
+ Gs as y,
5750
5784
  _e as z
5751
5785
  };