react-semaphor 0.0.621 → 0.0.622

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,7 +1,7 @@
1
1
  import { jsxs as a, jsx as e, Fragment as te } from "react/jsx-runtime";
2
- import { L as re, M as Fr, u as se, N as ua, O as ma, P as _, Q as ha, R as Je, T as hs, I as Ct, V as at, W as xt, X as zr, Y as Le, Z as yt, _ as vt, $ as Nt, a0 as Et, a1 as B, a2 as Ie, a3 as Qt, a4 as ve, a5 as Pr, a6 as xa, a7 as ki, a8 as ir, a9 as ps, aa as G, ab as fs, ac as Di, ad as Lr, ae as _r, af as ca, ag as Te, j as or, ah as Ti, ai as ct, aj as dt, ak as Mi, al as wt, am as wn, an as ya, ao as Vr, ap as Ai, aq as Qe, ar as Ii, as as nt, at as gs, au as Ei, av as Sn, aw as zt, ax as Wt, ay as de, az as bt, aA as rt, aB as Br, aC as Ve, aD as jr, aE as kn, aF as Da, aG as Re, aH as De, aI as Ta, aJ as St, aK as Ma, aL as Oi, aM as aa, aN as et, aO as Be, aP as qe, aQ as Ka, aR as Ge, aS as st, aT as kt, aU as Ja, aV as Ha, aW as Ri, aX as pa, aY as xs, aZ as ys, a_ as vs, a$ as Ns, b0 as Dn, b1 as Fi, b2 as Ze, b3 as zi, b4 as Aa, b5 as Qa, b6 as Ur, b7 as bs, b8 as Tn, b9 as Cs, ba as Pi, bb as Yr, bc as he, bd as pe, be as fe, bf as ge, bg as X, bh as ws, bi as Li, bj as _i, bk as Pt, bl as Lt, bm as _t, bn as Ee, bo as Kt, bp as Za, bq as $r, K as ie, br as Vi, bs as gt, J as A, bt as Bi, bu as qr, bv as Gr, bw as Wr, bx as Kr, by as Jr, bz as Hr, bA as Qr, bB as Zr, bC as Xr, bD as ji, bE as Ia, bF as jt, bG as Ss, bH as Ui, bI as ks, bJ as Mn, bK as Yi, bL as $i, bM as qi, i as Gi, bN as el, bO as _a, bP as Dt, bQ as Xa, bR as en, bS as tn, bT as an, bU as sa, bV as Ea, bW as fa, bX as va, bY as Na, bZ as Ot, b_ as nn, A as Tt, b$ as tl, r as al, q as nl, l as pt, c0 as Pe, c1 as Wi, c2 as Zt, c3 as Jt, c4 as sl, c5 as Ki, k as rl, c6 as Va, c7 as Ut, c8 as Ji, n as Ht, m as Mt, o as At, c9 as Zn, ca as Ds, cb as An, cc as In, cd as Xt, x as cr, ce as _e, cf as En, cg as gn, ch as Ba, ci as Xn, cj as ll, ck as il, cl as Ts, cm as Hi, cn as Qi, co as ol, cp as Zi, cq as On, cr as Xi, cs as ba, ct as eo, cu as to, cv as es, cw as Yt, cx as Ye, cy as $t, cz as ao, cA as no, cB as cl, cC as so, cD as Ms, cE as ro, cF as As, cG as Is, cH as lo, cI as dl, cJ as ul, cK as io, cL as oo, cM as ja, cN as co, cO as Es, cP as uo, cQ as mo, cR as dr, cS as ho, E as sn, b as Os, cT as Rs, cU as po, cV as fo, cW as go, cX as xo, cY as yo, cZ as ml, c_ as Fs, c$ as hl, d0 as pl, d1 as fl, d2 as gl, d3 as xl, d4 as zs, d5 as Ps, d6 as yl, d7 as vl, d8 as Nl, d9 as Ls, da as Rn, db as Fn, dc as vo, dd as No, de as bo, df as Co, dg as wo, dh as So, di as ko, dj as Xe, dk as tt, dl as be, dm as Ce, dn as we, dp as qt, dq as Do, dr as To, ds as Mo, dt as Ao, du as Io, y as Eo, dv as ur, dw as bl, dx as Oo, dy as Ro, dz as He, dA as un, dB as mr, dC as Fo, dD as hr, dE as pr, dF as zo, dG as Po, dH as Lo, dI as _o, dJ as _s, dK as Vs, dL as Bs, dM as Oa, dN as js, dO as ea, dP as Vo, dQ as zn, dR as Cl, dS as Bn, dT as Bo, dU as jo, dV as fr, dW as Uo, dX as Yo, dY as $o, dZ as qo, d_ as Go, w as gr, d$ as xr, e0 as Wo, e1 as Ko, e2 as ts, e3 as Jo, e4 as Ho, e5 as Qo, e6 as Zo, e7 as Xo, e8 as ec, e9 as tc, ea as ac, eb as nc, ec as sc, ed as rc, ee as lc, ef as ic, eg as oc, eh as cc, ei as dc, ej as uc, ek as Us, el as jn, em as mc, en as hc, eo as as, ep as pc, eq as xn, er as yn, es as Ra, et as fc, eu as yr, ev as ns, ew as wl, ex as Ys, ey as Sl, ez as Un, eA as $s, eB as gc, eC as qs, eD as xc, eE as yc, eF as Ua, eG as vc, eH as ss, eI as Nc, eJ as bc, eK as Cc, eL as rs, eM as ls, eN as vn, eO as wc, eP as Ca, eQ as Ya, eR as Sc, eS as kc, eT as Dc, eU as Tc, eV as Mc, eW as Ac, eX as Ic, F as kl, eY as Ec, eZ as Oc, p as Rc, e_ as Fc, B as zc, e$ as Pc, f0 as Lc, S as _c, f1 as Vc, U as Bc, f2 as jc, C as Uc } from "./index-CcyDyuRp.js";
2
+ import { L as re, M as Fr, u as se, N as ua, O as ma, P as _, Q as ha, R as Je, T as hs, I as Ct, V as at, W as xt, X as zr, Y as Le, Z as yt, _ as vt, $ as Nt, a0 as Et, a1 as B, a2 as Ie, a3 as Qt, a4 as ve, a5 as Pr, a6 as xa, a7 as ki, a8 as ir, a9 as ps, aa as G, ab as fs, ac as Di, ad as Lr, ae as _r, af as ca, ag as Te, j as or, ah as Ti, ai as ct, aj as dt, ak as Mi, al as wt, am as wn, an as ya, ao as Vr, ap as Ai, aq as Ze, ar as Ii, as as nt, at as gs, au as Ei, av as Sn, aw as zt, ax as Wt, ay as de, az as bt, aA as rt, aB as Br, aC as Ve, aD as jr, aE as kn, aF as Da, aG as Re, aH as De, aI as Ta, aJ as St, aK as Ma, aL as Oi, aM as aa, aN as He, aO as Be, aP as je, aQ as Ka, aR as Ge, aS as st, aT as kt, aU as Ja, aV as Ha, aW as Ri, aX as pa, aY as xs, aZ as ys, a_ as vs, a$ as Ns, b0 as Dn, b1 as Fi, b2 as Xe, b3 as zi, b4 as Aa, b5 as Qa, b6 as Ur, b7 as bs, b8 as Tn, b9 as Cs, ba as Pi, bb as Yr, bc as he, bd as pe, be as fe, bf as ge, bg as X, bh as ws, bi as Li, bj as _i, bk as Pt, bl as Lt, bm as _t, bn as Ee, bo as Kt, bp as Za, bq as $r, K as ie, br as Vi, bs as gt, J as A, bt as Bi, bu as qr, bv as Gr, bw as Wr, bx as Kr, by as Jr, bz as Hr, bA as Qr, bB as Zr, bC as Xr, bD as ji, bE as Ia, bF as jt, bG as Ss, bH as Ui, bI as ks, bJ as Mn, bK as Yi, bL as $i, bM as qi, i as Gi, bN as el, bO as _a, bP as Dt, bQ as Xa, bR as en, bS as tn, bT as an, bU as sa, bV as Ea, bW as fa, bX as va, bY as Na, bZ as Ot, b_ as nn, A as Tt, b$ as tl, r as al, q as nl, l as pt, c0 as Pe, c1 as Wi, c2 as Zt, c3 as Jt, c4 as sl, c5 as Ki, k as rl, c6 as Va, c7 as Ut, c8 as Ji, n as Ht, m as Mt, o as At, c9 as Zn, ca as Ds, cb as An, cc as In, cd as Xt, x as cr, ce as _e, cf as En, cg as gn, ch as Ba, ci as Xn, cj as ll, ck as il, cl as Ts, cm as Hi, cn as Qi, co as ol, cp as Zi, cq as On, cr as Xi, cs as ba, ct as eo, cu as to, cv as es, cw as Yt, cx as $e, cy as $t, cz as ao, cA as no, cB as cl, cC as so, cD as Ms, cE as ro, cF as As, cG as Is, cH as lo, cI as dl, cJ as ul, cK as io, cL as oo, cM as ja, cN as co, cO as Es, cP as uo, cQ as mo, cR as dr, cS as ho, E as sn, b as Os, cT as Rs, cU as po, cV as fo, cW as go, cX as xo, cY as yo, cZ as ml, c_ as Fs, c$ as hl, d0 as pl, d1 as fl, d2 as gl, d3 as xl, d4 as zs, d5 as Ps, d6 as yl, d7 as vl, d8 as Nl, d9 as Ls, da as Rn, db as Fn, dc as vo, dd as No, de as bo, df as Co, dg as wo, dh as So, di as ko, dj as et, dk as tt, dl as be, dm as Ce, dn as we, dp as qt, dq as Do, dr as To, ds as Mo, dt as Ao, du as Io, y as Eo, dv as ur, dw as bl, dx as Oo, dy as Ro, dz as Qe, dA as un, dB as mr, dC as Fo, dD as hr, dE as pr, dF as zo, dG as Po, dH as Lo, dI as _o, dJ as _s, dK as Vs, dL as Bs, dM as Oa, dN as js, dO as ea, dP as Vo, dQ as zn, dR as Cl, dS as Bn, dT as Bo, dU as jo, dV as fr, dW as Uo, dX as Yo, dY as $o, dZ as qo, d_ as Go, w as gr, d$ as xr, e0 as Wo, e1 as Ko, e2 as ts, e3 as Jo, e4 as Ho, e5 as Qo, e6 as Zo, e7 as Xo, e8 as ec, e9 as tc, ea as ac, eb as nc, ec as sc, ed as rc, ee as lc, ef as ic, eg as oc, eh as cc, ei as dc, ej as uc, ek as Us, el as jn, em as mc, en as hc, eo as as, ep as pc, eq as xn, er as yn, es as Ra, et as fc, eu as yr, ev as ns, ew as wl, ex as Ys, ey as Sl, ez as Un, eA as $s, eB as gc, eC as qs, eD as xc, eE as yc, eF as Ua, eG as vc, eH as ss, eI as Nc, eJ as bc, eK as Cc, eL as rs, eM as ls, eN as vn, eO as wc, eP as Ca, eQ as Ya, eR as Sc, eS as kc, eT as Dc, eU as Tc, eV as Mc, eW as Ac, eX as Ic, F as kl, eY as Ec, p as Oc, eZ as Rc, B as Fc, e_ as zc, e$ as Pc, S as Lc, f0 as _c, U as Vc, f1 as Bc, C as jc } from "./index-KQl91y51.js";
3
3
  import * as na from "react";
4
- import it, { useState as V, useEffect as Me, useRef as Rt, useMemo as $e, useCallback as Se, Suspense as Dl, useContext as Yc } from "react";
4
+ import it, { useState as V, useEffect as Me, useRef as Rt, useMemo as qe, useCallback as Se, Suspense as Dl, useContext as Uc } from "react";
5
5
  import "react-dom";
6
6
  /**
7
7
  * @license lucide-react v0.453.0 - ISC
@@ -9,7 +9,7 @@ import "react-dom";
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
11
  */
12
- const $c = re("ArrowDown10", [
12
+ const Yc = re("ArrowDown10", [
13
13
  ["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
14
14
  ["path", { d: "M7 20V4", key: "1yoxec" }],
15
15
  ["path", { d: "M17 10V4h-2", key: "zcsr5x" }],
@@ -22,7 +22,7 @@ const $c = re("ArrowDown10", [
22
22
  * This source code is licensed under the ISC license.
23
23
  * See the LICENSE file in the root directory of this source tree.
24
24
  */
25
- const qc = re("ArrowDownZA", [
25
+ const $c = re("ArrowDownZA", [
26
26
  ["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
27
27
  ["path", { d: "M7 4v16", key: "1glfcx" }],
28
28
  ["path", { d: "M15 4h5l-5 6h5", key: "8asdl1" }],
@@ -35,7 +35,7 @@ const qc = re("ArrowDownZA", [
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
37
  */
38
- const Gc = re("ArrowLeftRight", [
38
+ const qc = re("ArrowLeftRight", [
39
39
  ["path", { d: "M8 3 4 7l4 4", key: "9rb6wj" }],
40
40
  ["path", { d: "M4 7h16", key: "6tx8e3" }],
41
41
  ["path", { d: "m16 21 4-4-4-4", key: "siv7j2" }],
@@ -47,7 +47,7 @@ const Gc = re("ArrowLeftRight", [
47
47
  * This source code is licensed under the ISC license.
48
48
  * See the LICENSE file in the root directory of this source tree.
49
49
  */
50
- const Wc = re("ArrowUp01", [
50
+ const Gc = re("ArrowUp01", [
51
51
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
52
52
  ["path", { d: "M7 4v16", key: "1glfcx" }],
53
53
  ["rect", { x: "15", y: "4", width: "4", height: "6", ry: "2", key: "1bwicg" }],
@@ -60,7 +60,7 @@ const Wc = re("ArrowUp01", [
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
62
  */
63
- const Kc = re("ArrowUpAZ", [
63
+ const Wc = re("ArrowUpAZ", [
64
64
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
65
65
  ["path", { d: "M7 4v16", key: "1glfcx" }],
66
66
  ["path", { d: "M20 8h-5", key: "1vsyxs" }],
@@ -73,7 +73,7 @@ const Kc = re("ArrowUpAZ", [
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
75
  */
76
- const Jc = re("Blocks", [
76
+ const Kc = re("Blocks", [
77
77
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
78
78
  [
79
79
  "path",
@@ -89,7 +89,7 @@ const Jc = re("Blocks", [
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
91
  */
92
- const Hc = re("BookOpenText", [
92
+ const Jc = re("BookOpenText", [
93
93
  ["path", { d: "M12 7v14", key: "1akyts" }],
94
94
  ["path", { d: "M16 12h2", key: "7q9ll5" }],
95
95
  ["path", { d: "M16 8h2", key: "msurwy" }],
@@ -109,7 +109,7 @@ const Hc = re("BookOpenText", [
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
111
  */
112
- const Qc = re("Box", [
112
+ const Hc = re("Box", [
113
113
  [
114
114
  "path",
115
115
  {
@@ -126,7 +126,7 @@ const Qc = re("Box", [
126
126
  * This source code is licensed under the ISC license.
127
127
  * See the LICENSE file in the root directory of this source tree.
128
128
  */
129
- const Zc = re("Braces", [
129
+ const Qc = re("Braces", [
130
130
  [
131
131
  "path",
132
132
  { d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1", key: "ezmyqa" }
@@ -182,7 +182,7 @@ const rn = re("Calculator", [
182
182
  * This source code is licensed under the ISC license.
183
183
  * See the LICENSE file in the root directory of this source tree.
184
184
  */
185
- const Xc = re("CircleCheckBig", [
185
+ const Zc = re("CircleCheckBig", [
186
186
  ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
187
187
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
188
188
  ]);
@@ -192,7 +192,7 @@ const Xc = re("CircleCheckBig", [
192
192
  * This source code is licensed under the ISC license.
193
193
  * See the LICENSE file in the root directory of this source tree.
194
194
  */
195
- const ed = re("CircleX", [
195
+ const Xc = re("CircleX", [
196
196
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
197
197
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
198
198
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -213,7 +213,7 @@ const wa = re("Code", [
213
213
  * This source code is licensed under the ISC license.
214
214
  * See the LICENSE file in the root directory of this source tree.
215
215
  */
216
- const td = re("Columns3", [
216
+ const ed = re("Columns3", [
217
217
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
218
218
  ["path", { d: "M9 3v18", key: "fh3hqa" }],
219
219
  ["path", { d: "M15 3v18", key: "14nvp0" }]
@@ -224,7 +224,7 @@ const td = re("Columns3", [
224
224
  * This source code is licensed under the ISC license.
225
225
  * See the LICENSE file in the root directory of this source tree.
226
226
  */
227
- const ad = re("Component", [
227
+ const td = re("Component", [
228
228
  [
229
229
  "path",
230
230
  {
@@ -260,7 +260,7 @@ const ad = re("Component", [
260
260
  * This source code is licensed under the ISC license.
261
261
  * See the LICENSE file in the root directory of this source tree.
262
262
  */
263
- const nd = re("CopyPlus", [
263
+ const ad = re("CopyPlus", [
264
264
  ["line", { x1: "15", x2: "15", y1: "12", y2: "18", key: "1p7wdc" }],
265
265
  ["line", { x1: "12", x2: "18", y1: "15", y2: "15", key: "1nscbv" }],
266
266
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
@@ -272,7 +272,7 @@ const nd = re("CopyPlus", [
272
272
  * This source code is licensed under the ISC license.
273
273
  * See the LICENSE file in the root directory of this source tree.
274
274
  */
275
- const sd = re("DatabaseZap", [
275
+ const nd = re("DatabaseZap", [
276
276
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
277
277
  ["path", { d: "M3 5V19A9 3 0 0 0 15 21.84", key: "14ibmq" }],
278
278
  ["path", { d: "M21 5V8", key: "1marbg" }],
@@ -297,7 +297,7 @@ const Tl = re("Expand", [
297
297
  * This source code is licensed under the ISC license.
298
298
  * See the LICENSE file in the root directory of this source tree.
299
299
  */
300
- const rd = re("EyeClosed", [
300
+ const sd = re("EyeClosed", [
301
301
  ["path", { d: "m15 18-.722-3.25", key: "1j64jw" }],
302
302
  ["path", { d: "M2 8a10.645 10.645 0 0 0 20 0", key: "1e7gxb" }],
303
303
  ["path", { d: "m20 15-1.726-2.05", key: "1cnuld" }],
@@ -310,7 +310,7 @@ const rd = re("EyeClosed", [
310
310
  * This source code is licensed under the ISC license.
311
311
  * See the LICENSE file in the root directory of this source tree.
312
312
  */
313
- const ld = re("FileCode2", [
313
+ const rd = re("FileCode2", [
314
314
  ["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
315
315
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
316
316
  ["path", { d: "m5 12-3 3 3 3", key: "oke12k" }],
@@ -322,7 +322,7 @@ const ld = re("FileCode2", [
322
322
  * This source code is licensed under the ISC license.
323
323
  * See the LICENSE file in the root directory of this source tree.
324
324
  */
325
- const id = re("FileJson2", [
325
+ const ld = re("FileJson2", [
326
326
  ["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
327
327
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
328
328
  [
@@ -340,7 +340,7 @@ const id = re("FileJson2", [
340
340
  * This source code is licensed under the ISC license.
341
341
  * See the LICENSE file in the root directory of this source tree.
342
342
  */
343
- const od = re("Files", [
343
+ const id = re("Files", [
344
344
  ["path", { d: "M20 7h-3a2 2 0 0 1-2-2V2", key: "x099mo" }],
345
345
  ["path", { d: "M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z", key: "18t6ie" }],
346
346
  ["path", { d: "M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8", key: "1nja0z" }]
@@ -351,7 +351,7 @@ const od = re("Files", [
351
351
  * This source code is licensed under the ISC license.
352
352
  * See the LICENSE file in the root directory of this source tree.
353
353
  */
354
- const cd = re("Fingerprint", [
354
+ const od = re("Fingerprint", [
355
355
  ["path", { d: "M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4", key: "1nerag" }],
356
356
  ["path", { d: "M14 13.12c0 2.38 0 6.38-1 8.88", key: "o46ks0" }],
357
357
  ["path", { d: "M17.29 21.02c.12-.6.43-2.3.5-3.02", key: "ptglia" }],
@@ -368,7 +368,7 @@ const cd = re("Fingerprint", [
368
368
  * This source code is licensed under the ISC license.
369
369
  * See the LICENSE file in the root directory of this source tree.
370
370
  */
371
- const dd = re("GitCompareArrows", [
371
+ const cd = re("GitCompareArrows", [
372
372
  ["circle", { cx: "5", cy: "6", r: "3", key: "1qnov2" }],
373
373
  ["path", { d: "M12 6h5a2 2 0 0 1 2 2v7", key: "1yj91y" }],
374
374
  ["path", { d: "m15 9-3-3 3-3", key: "1lwv8l" }],
@@ -382,7 +382,7 @@ const dd = re("GitCompareArrows", [
382
382
  * This source code is licensed under the ISC license.
383
383
  * See the LICENSE file in the root directory of this source tree.
384
384
  */
385
- const ud = re("Glasses", [
385
+ const dd = re("Glasses", [
386
386
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
387
387
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
388
388
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -408,7 +408,7 @@ const Pn = re("Grid3x3", [
408
408
  * This source code is licensed under the ISC license.
409
409
  * See the LICENSE file in the root directory of this source tree.
410
410
  */
411
- const md = re("Hammer", [
411
+ const ud = re("Hammer", [
412
412
  ["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
413
413
  ["path", { d: "m18 15 4-4", key: "16gjal" }],
414
414
  [
@@ -437,7 +437,7 @@ const Ft = re("Hash", [
437
437
  * This source code is licensed under the ISC license.
438
438
  * See the LICENSE file in the root directory of this source tree.
439
439
  */
440
- const hd = re("LayoutList", [
440
+ const md = re("LayoutList", [
441
441
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
442
442
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
443
443
  ["path", { d: "M14 4h7", key: "3xa0d5" }],
@@ -451,7 +451,7 @@ const hd = re("LayoutList", [
451
451
  * This source code is licensed under the ISC license.
452
452
  * See the LICENSE file in the root directory of this source tree.
453
453
  */
454
- const pd = re("ListEnd", [
454
+ const hd = re("ListEnd", [
455
455
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
456
456
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
457
457
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -464,7 +464,7 @@ const pd = re("ListEnd", [
464
464
  * This source code is licensed under the ISC license.
465
465
  * See the LICENSE file in the root directory of this source tree.
466
466
  */
467
- const fd = re("ListStart", [
467
+ const pd = re("ListStart", [
468
468
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
469
469
  ["path", { d: "M16 18H3", key: "12xzn7" }],
470
470
  ["path", { d: "M10 6H3", key: "lf8lx7" }],
@@ -477,7 +477,7 @@ const fd = re("ListStart", [
477
477
  * This source code is licensed under the ISC license.
478
478
  * See the LICENSE file in the root directory of this source tree.
479
479
  */
480
- const gd = re("ListX", [
480
+ const fd = re("ListX", [
481
481
  ["path", { d: "M11 12H3", key: "51ecnj" }],
482
482
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
483
483
  ["path", { d: "M16 18H3", key: "12xzn7" }],
@@ -490,7 +490,7 @@ const gd = re("ListX", [
490
490
  * This source code is licensed under the ISC license.
491
491
  * See the LICENSE file in the root directory of this source tree.
492
492
  */
493
- const xd = re("List", [
493
+ const gd = re("List", [
494
494
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
495
495
  ["path", { d: "M3 18h.01", key: "1tta3j" }],
496
496
  ["path", { d: "M3 6h.01", key: "1rqtza" }],
@@ -504,7 +504,7 @@ const xd = re("List", [
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 yd = re("Lock", [
507
+ const xd = re("Lock", [
508
508
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
509
509
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
510
510
  ]);
@@ -514,7 +514,7 @@ const yd = re("Lock", [
514
514
  * This source code is licensed under the ISC license.
515
515
  * See the LICENSE file in the root directory of this source tree.
516
516
  */
517
- const vd = re("Logs", [
517
+ const yd = re("Logs", [
518
518
  ["path", { d: "M13 12h8", key: "h98zly" }],
519
519
  ["path", { d: "M13 18h8", key: "oe0vm4" }],
520
520
  ["path", { d: "M13 6h8", key: "15sg57" }],
@@ -547,7 +547,7 @@ const $a = re("MapPin", [
547
547
  * This source code is licensed under the ISC license.
548
548
  * See the LICENSE file in the root directory of this source tree.
549
549
  */
550
- const Nd = re("Menu", [
550
+ const vd = re("Menu", [
551
551
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
552
552
  ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
553
553
  ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
@@ -558,7 +558,7 @@ const Nd = re("Menu", [
558
558
  * This source code is licensed under the ISC license.
559
559
  * See the LICENSE file in the root directory of this source tree.
560
560
  */
561
- const bd = re("MessageCircleMore", [
561
+ const Nd = re("MessageCircleMore", [
562
562
  ["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }],
563
563
  ["path", { d: "M8 12h.01", key: "czm47f" }],
564
564
  ["path", { d: "M12 12h.01", key: "1mp3jc" }],
@@ -570,7 +570,7 @@ const bd = re("MessageCircleMore", [
570
570
  * This source code is licensed under the ISC license.
571
571
  * See the LICENSE file in the root directory of this source tree.
572
572
  */
573
- const Cd = re("MessageCircle", [
573
+ const bd = re("MessageCircle", [
574
574
  ["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }]
575
575
  ]);
576
576
  /**
@@ -579,7 +579,7 @@ const Cd = re("MessageCircle", [
579
579
  * This source code is licensed under the ISC license.
580
580
  * See the LICENSE file in the root directory of this source tree.
581
581
  */
582
- const wd = re("MessageSquareWarning", [
582
+ const Cd = re("MessageSquareWarning", [
583
583
  ["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" }],
584
584
  ["path", { d: "M12 7v2", key: "stiyo7" }],
585
585
  ["path", { d: "M12 13h.01", key: "y0uutt" }]
@@ -590,7 +590,7 @@ const wd = re("MessageSquareWarning", [
590
590
  * This source code is licensed under the ISC license.
591
591
  * See the LICENSE file in the root directory of this source tree.
592
592
  */
593
- const Sd = re("Moon", [
593
+ const wd = re("Moon", [
594
594
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
595
595
  ]);
596
596
  /**
@@ -621,7 +621,7 @@ const br = re("MoveVertical", [
621
621
  * This source code is licensed under the ISC license.
622
622
  * See the LICENSE file in the root directory of this source tree.
623
623
  */
624
- const kd = re("Network", [
624
+ const Sd = re("Network", [
625
625
  ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
626
626
  ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
627
627
  ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
@@ -634,7 +634,7 @@ const kd = re("Network", [
634
634
  * This source code is licensed under the ISC license.
635
635
  * See the LICENSE file in the root directory of this source tree.
636
636
  */
637
- const Dd = re("Palette", [
637
+ const kd = re("Palette", [
638
638
  ["circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor", key: "1okk4w" }],
639
639
  ["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
640
640
  ["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }],
@@ -653,7 +653,7 @@ const Dd = re("Palette", [
653
653
  * This source code is licensed under the ISC license.
654
654
  * See the LICENSE file in the root directory of this source tree.
655
655
  */
656
- const Td = re("PenLine", [
656
+ const Dd = re("PenLine", [
657
657
  ["path", { d: "M12 20h9", key: "t2du7b" }],
658
658
  [
659
659
  "path",
@@ -669,7 +669,7 @@ const Td = re("PenLine", [
669
669
  * This source code is licensed under the ISC license.
670
670
  * See the LICENSE file in the root directory of this source tree.
671
671
  */
672
- const Md = re("Plug", [
672
+ const Td = re("Plug", [
673
673
  ["path", { d: "M12 22v-5", key: "1ega77" }],
674
674
  ["path", { d: "M9 8V2", key: "14iosj" }],
675
675
  ["path", { d: "M15 8V2", key: "18g5xt" }],
@@ -693,7 +693,7 @@ const Ml = re("RefreshCw", [
693
693
  * This source code is licensed under the ISC license.
694
694
  * See the LICENSE file in the root directory of this source tree.
695
695
  */
696
- const Ad = re("Rows3", [
696
+ const Md = re("Rows3", [
697
697
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
698
698
  ["path", { d: "M21 9H3", key: "1338ky" }],
699
699
  ["path", { d: "M21 15H3", key: "9uk58r" }]
@@ -751,7 +751,7 @@ const Ga = re("Share2", [
751
751
  * This source code is licensed under the ISC license.
752
752
  * See the LICENSE file in the root directory of this source tree.
753
753
  */
754
- const Id = re("Share", [
754
+ const Ad = re("Share", [
755
755
  ["path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8", key: "1b2hhj" }],
756
756
  ["polyline", { points: "16 6 12 2 8 6", key: "m901s6" }],
757
757
  ["line", { x1: "12", x2: "12", y1: "2", y2: "15", key: "1p0rca" }]
@@ -762,7 +762,7 @@ const Id = re("Share", [
762
762
  * This source code is licensed under the ISC license.
763
763
  * See the LICENSE file in the root directory of this source tree.
764
764
  */
765
- const Ed = re("ShieldX", [
765
+ const Id = re("ShieldX", [
766
766
  [
767
767
  "path",
768
768
  {
@@ -779,7 +779,7 @@ const Ed = re("ShieldX", [
779
779
  * This source code is licensed under the ISC license.
780
780
  * See the LICENSE file in the root directory of this source tree.
781
781
  */
782
- const Od = re("Shrink", [
782
+ const Ed = re("Shrink", [
783
783
  ["path", { d: "m15 15 6 6m-6-6v4.8m0-4.8h4.8", key: "17vawe" }],
784
784
  ["path", { d: "M9 19.8V15m0 0H4.2M9 15l-6 6", key: "chjx8e" }],
785
785
  ["path", { d: "M15 4.2V9m0 0h4.8M15 9l6-6", key: "lav6yq" }],
@@ -806,7 +806,7 @@ const Al = re("Sigma", [
806
806
  * This source code is licensed under the ISC license.
807
807
  * See the LICENSE file in the root directory of this source tree.
808
808
  */
809
- const Rd = re("SlidersHorizontal", [
809
+ const Od = re("SlidersHorizontal", [
810
810
  ["line", { x1: "21", x2: "14", y1: "4", y2: "4", key: "obuewd" }],
811
811
  ["line", { x1: "10", x2: "3", y1: "4", y2: "4", key: "1q6298" }],
812
812
  ["line", { x1: "21", x2: "12", y1: "12", y2: "12", key: "1iu8h1" }],
@@ -823,7 +823,7 @@ const Rd = re("SlidersHorizontal", [
823
823
  * This source code is licensed under the ISC license.
824
824
  * See the LICENSE file in the root directory of this source tree.
825
825
  */
826
- const Fd = re("Square", [
826
+ const Rd = re("Square", [
827
827
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
828
828
  ]);
829
829
  /**
@@ -832,7 +832,7 @@ const Fd = re("Square", [
832
832
  * This source code is licensed under the ISC license.
833
833
  * See the LICENSE file in the root directory of this source tree.
834
834
  */
835
- const zd = re("Sun", [
835
+ const Fd = re("Sun", [
836
836
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
837
837
  ["path", { d: "M12 2v2", key: "tus03m" }],
838
838
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -865,7 +865,7 @@ const Il = re("Tag", [
865
865
  * This source code is licensed under the ISC license.
866
866
  * See the LICENSE file in the root directory of this source tree.
867
867
  */
868
- const Pd = re("Tags", [
868
+ const zd = re("Tags", [
869
869
  ["path", { d: "m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19", key: "1cbfv1" }],
870
870
  [
871
871
  "path",
@@ -882,7 +882,7 @@ const Pd = re("Tags", [
882
882
  * This source code is licensed under the ISC license.
883
883
  * See the LICENSE file in the root directory of this source tree.
884
884
  */
885
- const Ld = re("Terminal", [
885
+ const Pd = re("Terminal", [
886
886
  ["polyline", { points: "4 17 10 11 4 5", key: "akl6gq" }],
887
887
  ["line", { x1: "12", x2: "20", y1: "19", y2: "19", key: "q2wloq" }]
888
888
  ]);
@@ -923,7 +923,7 @@ const Sa = re("User", [
923
923
  * This source code is licensed under the ISC license.
924
924
  * See the LICENSE file in the root directory of this source tree.
925
925
  */
926
- const _d = re("View", [
926
+ const Ld = re("View", [
927
927
  ["path", { d: "M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2", key: "mrq65r" }],
928
928
  ["path", { d: "M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2", key: "be3xqs" }],
929
929
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
@@ -935,21 +935,21 @@ const _d = re("View", [
935
935
  }
936
936
  ]
937
937
  ]);
938
- function Vd() {
938
+ function _d() {
939
939
  const { setTheme: t } = Fr(), s = se(
940
940
  (n) => n.actions.setDashboardTheme
941
941
  );
942
942
  return /* @__PURE__ */ a(ua, { children: [
943
943
  /* @__PURE__ */ e(ma, { asChild: !0, children: /* @__PURE__ */ a(_, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
944
944
  /* @__PURE__ */ e(
945
- zd,
945
+ Fd,
946
946
  {
947
947
  strokeWidth: 1.5,
948
948
  className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"
949
949
  }
950
950
  ),
951
951
  /* @__PURE__ */ e(
952
- Sd,
952
+ wd,
953
953
  {
954
954
  strokeWidth: 1.5,
955
955
  className: "absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"
@@ -1000,14 +1000,14 @@ function os(t) {
1000
1000
  var i;
1001
1001
  return {
1002
1002
  ...l,
1003
- cards: (i = l.cards) == null ? void 0 : i.map((c) => Bd(c))
1003
+ cards: (i = l.cards) == null ? void 0 : i.map((c) => Vd(c))
1004
1004
  };
1005
1005
  })
1006
1006
  };
1007
1007
  })
1008
1008
  };
1009
1009
  }
1010
- function Bd(t) {
1010
+ function Vd(t) {
1011
1011
  return {
1012
1012
  ...t,
1013
1013
  // cfg: {
@@ -1023,12 +1023,12 @@ function Bd(t) {
1023
1023
  // }),
1024
1024
  // },
1025
1025
  // },
1026
- customCfg: jd(t.customCfg),
1026
+ customCfg: Bd(t.customCfg),
1027
1027
  // if customCfg is present, clean it, otherwise return null{
1028
1028
  data: []
1029
1029
  };
1030
1030
  }
1031
- function jd(t) {
1031
+ function Bd(t) {
1032
1032
  var s, n;
1033
1033
  return t ? {
1034
1034
  ...t,
@@ -1042,7 +1042,7 @@ function jd(t) {
1042
1042
  }
1043
1043
  } : null;
1044
1044
  }
1045
- async function Ud(t, s, n, r) {
1045
+ async function jd(t, s, n, r) {
1046
1046
  if (!r)
1047
1047
  return null;
1048
1048
  const l = JSON.stringify(s);
@@ -1066,19 +1066,19 @@ async function cs(t, s) {
1066
1066
  operation: "update"
1067
1067
  });
1068
1068
  }
1069
- async function Yd(t, s) {
1069
+ async function Ud(t, s) {
1070
1070
  return s ? await hs("https://semaphor.cloud/api/v1/lens", s, {
1071
1071
  operation: "delete",
1072
1072
  lensId: t
1073
1073
  }) : null;
1074
1074
  }
1075
- function $d() {
1075
+ function Yd() {
1076
1076
  const [t, s] = V(""), [n, r] = V(!1), l = se((f) => f.lenses), { setLenses: i, setSelectedLensId: c } = Ct(), [o, d] = V(!1), [u, m] = V(!1), h = se((f) => f.dashboard), g = se((f) => f.filterValues), { authToken: x } = at();
1077
1077
  async function y() {
1078
1078
  d(!0);
1079
1079
  const f = os(
1080
1080
  h
1081
- ), v = await Ud(
1081
+ ), v = await jd(
1082
1082
  t,
1083
1083
  f,
1084
1084
  g,
@@ -1133,13 +1133,13 @@ function $d() {
1133
1133
  ] })
1134
1134
  ] });
1135
1135
  }
1136
- function qd() {
1136
+ function $d() {
1137
1137
  const [t, s] = V(!1), n = se((m) => m.lenses), r = se((m) => m.selectedLensId), { setLenses: l, setSelectedLensId: i } = Ct(), { authToken: c } = at();
1138
1138
  async function o(m) {
1139
1139
  i(m);
1140
1140
  }
1141
1141
  async function d(m) {
1142
- if (await Yd(m, c == null ? void 0 : c.accessToken)) {
1142
+ if (await Ud(m, c == null ? void 0 : c.accessToken)) {
1143
1143
  const g = n == null ? void 0 : n.filter((x) => x.id !== m);
1144
1144
  l(g || []), i("original");
1145
1145
  }
@@ -1168,7 +1168,7 @@ function qd() {
1168
1168
  }
1169
1169
  }
1170
1170
  return /* @__PURE__ */ a(ua, { open: t, onOpenChange: s, children: [
1171
- /* @__PURE__ */ e(ma, { asChild: !0, children: /* @__PURE__ */ e(ve, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(ud, { className: "h-4 w-4" }) }) }),
1171
+ /* @__PURE__ */ e(ma, { asChild: !0, children: /* @__PURE__ */ e(ve, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(dd, { className: "h-4 w-4" }) }) }),
1172
1172
  /* @__PURE__ */ a(ha, { align: "end", className: "w-60", children: [
1173
1173
  /* @__PURE__ */ e(Pr, { className: "px-3", children: "Lenses" }),
1174
1174
  /* @__PURE__ */ e(xa, {}),
@@ -1224,7 +1224,7 @@ function qd() {
1224
1224
  ] })
1225
1225
  ] });
1226
1226
  }
1227
- function Gd({
1227
+ function qd({
1228
1228
  iconClassName: t
1229
1229
  }) {
1230
1230
  const [s, n] = V(!1), [r, l] = V(""), [i, c] = V(!1), o = se((m) => m.isDownloadingPdf);
@@ -1276,7 +1276,7 @@ function Gd({
1276
1276
  "Download PDF"
1277
1277
  ] }),
1278
1278
  /* @__PURE__ */ a(Je, { onClick: () => n(!0), children: [
1279
- /* @__PURE__ */ e(yd, { className: "mr-2 h-4 w-4" }),
1279
+ /* @__PURE__ */ e(xd, { className: "mr-2 h-4 w-4" }),
1280
1280
  "Download Protected PDF"
1281
1281
  ] })
1282
1282
  ] })
@@ -1337,7 +1337,7 @@ function Gd({
1337
1337
  )
1338
1338
  ] });
1339
1339
  }
1340
- function Wd({
1340
+ function Gd({
1341
1341
  triggerButtonClassName: t
1342
1342
  }) {
1343
1343
  const [s, n] = V(!1), [r, l] = V("current"), i = se((D) => {
@@ -1428,7 +1428,7 @@ function Wd({
1428
1428
  htmlFor: "all-sheets",
1429
1429
  className: "flex cursor-pointer items-center font-normal",
1430
1430
  children: [
1431
- /* @__PURE__ */ e(od, { className: "mr-2 h-4 w-4" }),
1431
+ /* @__PURE__ */ e(id, { className: "mr-2 h-4 w-4" }),
1432
1432
  "All sheets (",
1433
1433
  i == null ? void 0 : i.length,
1434
1434
  " sheets)"
@@ -1451,7 +1451,7 @@ function Wd({
1451
1451
  }
1452
1452
  ),
1453
1453
  u && u.length > 0 && /* @__PURE__ */ a(te, { children: [
1454
- /* @__PURE__ */ e(Qe, { className: "my-6" }),
1454
+ /* @__PURE__ */ e(Ze, { className: "my-6" }),
1455
1455
  /* @__PURE__ */ e(
1456
1456
  Ii,
1457
1457
  {
@@ -1486,7 +1486,7 @@ function El() {
1486
1486
  ] }) }, s)) })
1487
1487
  ] }) });
1488
1488
  }
1489
- function Kd({
1489
+ function Wd({
1490
1490
  visual: t,
1491
1491
  isDeleting: s,
1492
1492
  isDuplicating: n,
@@ -1632,7 +1632,7 @@ function Kd({
1632
1632
  C.stopPropagation(), c == null || c(t);
1633
1633
  },
1634
1634
  children: [
1635
- /* @__PURE__ */ e(Td, { className: "mr-2 h-3 w-3" }),
1635
+ /* @__PURE__ */ e(Dd, { className: "mr-2 h-3 w-3" }),
1636
1636
  "Edit"
1637
1637
  ]
1638
1638
  }
@@ -1799,7 +1799,7 @@ function Rl({
1799
1799
  )
1800
1800
  ] }, i.id);
1801
1801
  }) }),
1802
- /* @__PURE__ */ e(Qe, {})
1802
+ /* @__PURE__ */ e(Ze, {})
1803
1803
  ] });
1804
1804
  }
1805
1805
  function Fl({
@@ -1836,7 +1836,7 @@ function Fl({
1836
1836
  }
1837
1837
  )
1838
1838
  ] }, r.id)) }),
1839
- /* @__PURE__ */ e(Qe, {})
1839
+ /* @__PURE__ */ e(Ze, {})
1840
1840
  ] });
1841
1841
  }
1842
1842
  function zl({
@@ -1909,13 +1909,13 @@ function mt(t, s) {
1909
1909
  var n;
1910
1910
  return ((n = s.find((r) => r.value === t)) == null ? void 0 : n.label) || t;
1911
1911
  }
1912
- function Jd(t) {
1912
+ function Kd(t) {
1913
1913
  return ["POWER_USER", "ADMIN", "EDITOR"].includes(t);
1914
1914
  }
1915
1915
  function Ll(t) {
1916
1916
  return "tenantId" in t && t.tenantId ? "tenant" : "organization";
1917
1917
  }
1918
- function Hd(t, s, n) {
1918
+ function Jd(t, s, n) {
1919
1919
  const r = Ll(t), l = (n == null ? void 0 : n.type) || "organization";
1920
1920
  if (!(!s || !s.shares))
1921
1921
  if (l === "organization")
@@ -1933,10 +1933,10 @@ function Hd(t, s, n) {
1933
1933
  (o) => o.tenantUserId === t.id
1934
1934
  );
1935
1935
  }
1936
- function Qd({ user: t }) {
1936
+ function Hd({ user: t }) {
1937
1937
  return Ll(t) === "tenant" ? /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: t.role === "POWER_USER" ? "Power User" : "Viewer" }) : /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: t.role === "ADMIN" ? "Admin" : t.role === "POWER_USER" ? "Power User" : "Viewer" });
1938
1938
  }
1939
- function Zd({
1939
+ function Qd({
1940
1940
  user: t,
1941
1941
  userShare: s,
1942
1942
  usersToUpdate: n,
@@ -1945,7 +1945,7 @@ function Zd({
1945
1945
  handleUpdateAccess: i
1946
1946
  }) {
1947
1947
  if (!(s != null && s.role)) return null;
1948
- const c = Jd((r == null ? void 0 : r.type) || ""), o = n.some(
1948
+ const c = Kd((r == null ? void 0 : r.type) || ""), o = n.some(
1949
1949
  (h) => h.id === t.id
1950
1950
  ), d = n.find(
1951
1951
  (h) => h.id === t.id
@@ -1964,7 +1964,7 @@ function Zd({
1964
1964
  }
1965
1965
  ) : /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: mt(u, m) }) }) : /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: "Unknown" });
1966
1966
  }
1967
- function Xd({
1967
+ function Zd({
1968
1968
  hasAccess: t,
1969
1969
  isUserRemoving: s,
1970
1970
  isSelected: n,
@@ -2006,7 +2006,7 @@ function Xd({
2006
2006
  )
2007
2007
  ] });
2008
2008
  }
2009
- function eu({
2009
+ function Xd({
2010
2010
  isUserRemoving: t,
2011
2011
  isSelected: s,
2012
2012
  hasAccess: n,
@@ -2024,7 +2024,7 @@ function eu({
2024
2024
  ] }) : "Will share" })
2025
2025
  ] });
2026
2026
  }
2027
- function tu({
2027
+ function eu({
2028
2028
  existingShares: t,
2029
2029
  allUsers: s,
2030
2030
  getRoleOptions: n,
@@ -2365,7 +2365,7 @@ function tu({
2365
2365
  ] });
2366
2366
  }
2367
2367
  }
2368
- function au({
2368
+ function tu({
2369
2369
  isInitialLoading: t,
2370
2370
  searchQuery: s,
2371
2371
  availableUsers: n
@@ -2375,7 +2375,7 @@ function au({
2375
2375
  /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Loading users..." })
2376
2376
  ] }) }) : n.length === 0 ? /* @__PURE__ */ e("div", { className: "py-8 text-center text-sm text-muted-foreground", children: s ? "No users found matching your search." : "No users available to share with." }) : null;
2377
2377
  }
2378
- function nu({
2378
+ function au({
2379
2379
  user: t,
2380
2380
  userShare: s,
2381
2381
  isUserRemoving: n,
@@ -2413,7 +2413,7 @@ function nu({
2413
2413
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
2414
2414
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
2415
2415
  /* @__PURE__ */ e("p", { className: "truncate text-sm font-medium", children: t.name }),
2416
- /* @__PURE__ */ e(Qd, { user: t })
2416
+ /* @__PURE__ */ e(Hd, { user: t })
2417
2417
  ] }),
2418
2418
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
2419
2419
  r && !n ? /* @__PURE__ */ e(
@@ -2426,7 +2426,7 @@ function nu({
2426
2426
  allowDropdown: !0
2427
2427
  }
2428
2428
  ) : /* @__PURE__ */ e(
2429
- Zd,
2429
+ Qd,
2430
2430
  {
2431
2431
  user: t,
2432
2432
  userShare: s,
@@ -2449,7 +2449,7 @@ function nu({
2449
2449
  ] }),
2450
2450
  /* @__PURE__ */ e("p", { className: "truncate text-xs text-muted-foreground", children: t.email }),
2451
2451
  /* @__PURE__ */ e(
2452
- Xd,
2452
+ Zd,
2453
2453
  {
2454
2454
  hasAccess: r,
2455
2455
  isUserRemoving: n,
@@ -2458,7 +2458,7 @@ function nu({
2458
2458
  }
2459
2459
  ),
2460
2460
  /* @__PURE__ */ e(
2461
- eu,
2461
+ Xd,
2462
2462
  {
2463
2463
  isUserRemoving: n,
2464
2464
  isSelected: i,
@@ -2498,10 +2498,10 @@ function _l({
2498
2498
  (D ?? []).length,
2499
2499
  ")"
2500
2500
  ] }),
2501
- /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a(Be, { children: [
2502
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ e(_, { variant: "ghost", size: "sm", className: "h-6 w-6 p-0", children: /* @__PURE__ */ e(Ka, { className: "h-4 w-4" }) }) }),
2501
+ /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(Be, { children: [
2502
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ e(_, { variant: "ghost", size: "sm", className: "h-6 w-6 p-0", children: /* @__PURE__ */ e(Ka, { className: "h-4 w-4" }) }) }),
2503
2503
  /* @__PURE__ */ e(Ge, { className: "w-48 max-w-sm", children: /* @__PURE__ */ e(
2504
- tu,
2504
+ eu,
2505
2505
  {
2506
2506
  existingShares: t,
2507
2507
  allUsers: l,
@@ -2528,7 +2528,7 @@ function _l({
2528
2528
  ] }),
2529
2529
  /* @__PURE__ */ a("div", { className: "max-h-60 space-y-1 overflow-y-auto rounded-md border p-2", children: [
2530
2530
  /* @__PURE__ */ e(
2531
- au,
2531
+ tu,
2532
2532
  {
2533
2533
  isInitialLoading: s,
2534
2534
  isSearching: n,
@@ -2537,13 +2537,13 @@ function _l({
2537
2537
  }
2538
2538
  ),
2539
2539
  !s && !n && (D == null ? void 0 : D.length) > 0 && D.map((w) => {
2540
- const S = t ? Hd(w, t, i) : void 0, N = O.includes(w.id), T = !!S, C = T && !N, P = m.some(
2540
+ const S = t ? Jd(w, t, i) : void 0, N = O.includes(w.id), T = !!S, C = T && !N, P = m.some(
2541
2541
  (M) => M.id === w.id
2542
2542
  ), k = m.find(
2543
2543
  (M) => M.id === w.id
2544
2544
  ), L = r(w.type);
2545
2545
  return /* @__PURE__ */ e(
2546
- nu,
2546
+ au,
2547
2547
  {
2548
2548
  user: w,
2549
2549
  userShare: S,
@@ -2628,7 +2628,7 @@ const ra = () => [
2628
2628
  description: "Full access (view, edit, share, delete)"
2629
2629
  }
2630
2630
  ];
2631
- function su({
2631
+ function nu({
2632
2632
  currentUser: t,
2633
2633
  currentShare: s,
2634
2634
  isSharing: n,
@@ -2647,7 +2647,7 @@ function su({
2647
2647
  case "EDITOR":
2648
2648
  return /* @__PURE__ */ e(Ns, { className: "h-4 w-4" });
2649
2649
  case "CONTRIBUTOR":
2650
- return /* @__PURE__ */ e(Id, { className: "h-4 w-4" });
2650
+ return /* @__PURE__ */ e(Ad, { className: "h-4 w-4" });
2651
2651
  default:
2652
2652
  return /* @__PURE__ */ e(ca, { className: "h-4 w-4" });
2653
2653
  }
@@ -2770,7 +2770,7 @@ function Bl({
2770
2770
  newRole: u(o.newRole)
2771
2771
  } : null;
2772
2772
  return /* @__PURE__ */ e(
2773
- su,
2773
+ nu,
2774
2774
  {
2775
2775
  currentUser: t,
2776
2776
  currentShare: h,
@@ -2788,15 +2788,15 @@ function Bl({
2788
2788
  }
2789
2789
  );
2790
2790
  }
2791
- const ru = async (t, s = {}) => {
2791
+ const su = async (t, s = {}) => {
2792
2792
  const n = {};
2793
2793
  return s.search && (n.search = s.search), s.type && (n.type = s.type), s.active !== void 0 && (n.active = s.active.toString()), s.tenantId && (n.tenantId = s.tenantId), s.limit && (n.limit = s.limit.toString()), s.offset && (n.offset = s.offset.toString()), s.page && (n.page = s.page.toString()), s.pageSize && (n.pageSize = s.pageSize.toString()), await Fi("https://semaphor.cloud/api/management/v1/unified-users", t, n);
2794
2794
  };
2795
- function lu(t = {}) {
2795
+ function ru(t = {}) {
2796
2796
  var i, c, o;
2797
2797
  const { authToken: s, tokenProps: n } = at(), r = (n == null ? void 0 : n.endUserId) || (n == null ? void 0 : n.orgUserId), l = Dn({
2798
2798
  queryKey: ["unified-users", t],
2799
- queryFn: () => ru((s == null ? void 0 : s.accessToken) || "", t),
2799
+ queryFn: () => su((s == null ? void 0 : s.accessToken) || "", t),
2800
2800
  enabled: !!(s != null && s.accessToken) && !!r,
2801
2801
  retry: (d, u) => u instanceof Error && u.message.includes("401") || u instanceof Error && u.message.includes("403") ? !1 : d < 2,
2802
2802
  retryDelay: (d) => Math.min(1e3 * 2 ** d, 3e4)
@@ -2818,10 +2818,10 @@ function ta(t) {
2818
2818
  const {
2819
2819
  debouncedSearchQuery: s,
2820
2820
  resourceId: n,
2821
- resourceType: r = Ze.DASHBOARD,
2821
+ resourceType: r = Xe.DASHBOARD,
2822
2822
  userType: l,
2823
2823
  tenantId: i
2824
- } = t, c = $e(() => ({
2824
+ } = t, c = qe(() => ({
2825
2825
  search: s,
2826
2826
  active: !0,
2827
2827
  // Only show active users
@@ -2833,7 +2833,7 @@ function ta(t) {
2833
2833
  users: o,
2834
2834
  isLoading: d,
2835
2835
  isError: u
2836
- } = lu(c), m = zi(r, n);
2836
+ } = ru(c), m = zi(r, n);
2837
2837
  return {
2838
2838
  allUsers: o,
2839
2839
  isLoadingUsers: d,
@@ -2844,7 +2844,7 @@ function ta(t) {
2844
2844
  isFetchingShares: m.isFetching
2845
2845
  };
2846
2846
  }
2847
- function iu({
2847
+ function lu({
2848
2848
  resource: t,
2849
2849
  resourceType: s,
2850
2850
  currentUser: n,
@@ -3246,7 +3246,7 @@ function Cr({
3246
3246
  ] });
3247
3247
  }
3248
3248
  const jl = () => {
3249
- const t = ws(), s = kt(), n = Ta(), r = St(), l = Ma(), i = Qa(), c = bs(), o = Cs(), d = Tn(), u = $e(() => () => Li({
3249
+ const t = ws(), s = kt(), n = Ta(), r = St(), l = Ma(), i = Qa(), c = bs(), o = Cs(), d = Tn(), u = qe(() => () => Li({
3250
3250
  currentContext: t,
3251
3251
  currentMode: s,
3252
3252
  selectedUsers: n,
@@ -3266,7 +3266,7 @@ const jl = () => {
3266
3266
  c,
3267
3267
  o,
3268
3268
  d
3269
- ]), m = $e(() => (g) => _i(g), []), h = $e(() => {
3269
+ ]), m = qe(() => (g) => _i(g), []), h = qe(() => {
3270
3270
  if (!t || !s)
3271
3271
  return !1;
3272
3272
  switch (t) {
@@ -3474,7 +3474,7 @@ function wr({
3474
3474
  )
3475
3475
  ] });
3476
3476
  }
3477
- function ou({
3477
+ function iu({
3478
3478
  resource: t,
3479
3479
  isSharing: s,
3480
3480
  isRemoving: n,
@@ -3630,7 +3630,7 @@ function Ul({
3630
3630
  /* @__PURE__ */ e(Ee, { value: "tenant", children: "Tenant Users" })
3631
3631
  ] }),
3632
3632
  /* @__PURE__ */ e(Kt, { value: "org", className: "min-h-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e("div", { className: "h-full overflow-y-auto", children: /* @__PURE__ */ e(
3633
- iu,
3633
+ lu,
3634
3634
  {
3635
3635
  resource: t,
3636
3636
  resourceType: s,
@@ -3717,7 +3717,7 @@ function Ul({
3717
3717
  ) : (
3718
3718
  // Tenant users - always show tenant footer
3719
3719
  /* @__PURE__ */ e(
3720
- ou,
3720
+ iu,
3721
3721
  {
3722
3722
  resource: t,
3723
3723
  isSharing: n,
@@ -4104,11 +4104,11 @@ function $l(t, s, n, r) {
4104
4104
  }
4105
4105
  }
4106
4106
  }
4107
- function cu(t, s, n) {
4107
+ function ou(t, s, n) {
4108
4108
  const r = aa(), l = St(), i = Aa(), c = kt(), { currentUser: o } = Pt(), { existingShares: d } = ta({
4109
4109
  debouncedSearchQuery: "",
4110
4110
  resourceId: t || "",
4111
- resourceType: Ze.DASHBOARD,
4111
+ resourceType: Xe.DASHBOARD,
4112
4112
  userType: "tenant"
4113
4113
  }), u = Se(() => {
4114
4114
  r.resetUserSelections();
@@ -4116,7 +4116,7 @@ function cu(t, s, n) {
4116
4116
  (g) => {
4117
4117
  if (!t) return;
4118
4118
  const x = {
4119
- resourceType: Ze.DASHBOARD,
4119
+ resourceType: Xe.DASHBOARD,
4120
4120
  resourceId: t,
4121
4121
  shareMutation: s,
4122
4122
  removeMutation: n,
@@ -4136,7 +4136,7 @@ function cu(t, s, n) {
4136
4136
  ), h = Se(() => {
4137
4137
  if (!t) return;
4138
4138
  const g = {
4139
- resourceType: Ze.DASHBOARD,
4139
+ resourceType: Xe.DASHBOARD,
4140
4140
  resourceId: t,
4141
4141
  removeMutation: n,
4142
4142
  existingShares: d,
@@ -4163,11 +4163,11 @@ function cu(t, s, n) {
4163
4163
  handleRemoveAccess: h
4164
4164
  };
4165
4165
  }
4166
- function du(t, s, n) {
4166
+ function cu(t, s, n) {
4167
4167
  const { currentUser: r } = Pt(), l = aa(), i = St(), c = Aa(), o = kt(), { existingShares: d } = ta({
4168
4168
  debouncedSearchQuery: "",
4169
4169
  resourceId: t || "",
4170
- resourceType: Ze.VISUAL,
4170
+ resourceType: Xe.VISUAL,
4171
4171
  userType: "tenant"
4172
4172
  }), u = Se(() => {
4173
4173
  l.resetUserSelections();
@@ -4175,7 +4175,7 @@ function du(t, s, n) {
4175
4175
  (g) => {
4176
4176
  if (!t) return;
4177
4177
  const x = {
4178
- resourceType: Ze.VISUAL,
4178
+ resourceType: Xe.VISUAL,
4179
4179
  resourceId: t,
4180
4180
  shareMutation: s,
4181
4181
  removeMutation: n,
@@ -4195,7 +4195,7 @@ function du(t, s, n) {
4195
4195
  ), h = Se(() => {
4196
4196
  if (!t) return;
4197
4197
  const g = {
4198
- resourceType: Ze.VISUAL,
4198
+ resourceType: Xe.VISUAL,
4199
4199
  resourceId: t,
4200
4200
  removeMutation: n,
4201
4201
  existingShares: d,
@@ -4222,7 +4222,7 @@ function du(t, s, n) {
4222
4222
  handleRemoveAccess: h
4223
4223
  };
4224
4224
  }
4225
- function uu(t) {
4225
+ function du(t) {
4226
4226
  const s = t.toUpperCase().indexOf("WHERE"), n = t.toUpperCase().indexOf("GROUP BY"), r = t.toUpperCase().indexOf("LIMIT"), l = t.toUpperCase().indexOf("ORDER BY");
4227
4227
  let i = t.length;
4228
4228
  if (l !== -1 && (i = l), r !== -1 && r < i && (i = r), s !== -1) {
@@ -4275,7 +4275,7 @@ function Gs(t) {
4275
4275
  })();
4276
4276
  }, [t]), s;
4277
4277
  }
4278
- function mu(t, s) {
4278
+ function uu(t, s) {
4279
4279
  if (t.length === 0)
4280
4280
  return "";
4281
4281
  if (s) {
@@ -4322,7 +4322,7 @@ async function Sr(t, s, n) {
4322
4322
  throw Te.dismiss(i), c;
4323
4323
  }
4324
4324
  }
4325
- function hu(t, s, n, r, l) {
4325
+ function mu(t, s, n, r, l) {
4326
4326
  const i = t.frameObject;
4327
4327
  s(i);
4328
4328
  const c = i.cards.find(
@@ -4330,7 +4330,7 @@ function hu(t, s, n, r, l) {
4330
4330
  );
4331
4331
  c && n(c), r(!0), l(!0);
4332
4332
  }
4333
- function pu() {
4333
+ function hu() {
4334
4334
  var g;
4335
4335
  const { setCardSql: t } = ie(), s = A((x) => x.frame), n = A((x) => x.card), r = Gs(
4336
4336
  ((g = n.customCardPreferences) == null ? void 0 : g.url) || ""
@@ -4346,7 +4346,7 @@ function pu() {
4346
4346
  return { getUpdatedFrame: Se(() => {
4347
4347
  var p;
4348
4348
  let x = m;
4349
- m && !m.includes("{{") && (x = uu(m), t(x));
4349
+ m && !m.includes("{{") && (x = du(m), t(x));
4350
4350
  const y = (p = r == null ? void 0 : r.getState()) == null ? void 0 : p.settings, f = {
4351
4351
  ...n,
4352
4352
  dataSource: n.dataSource || { mode: "directSource" },
@@ -4372,7 +4372,7 @@ function pu() {
4372
4372
  return {
4373
4373
  ...s,
4374
4374
  cards: v,
4375
- activeCardId: mu(v, s.activeCardId)
4375
+ activeCardId: uu(v, s.activeCardId)
4376
4376
  };
4377
4377
  }, [
4378
4378
  n,
@@ -4406,7 +4406,7 @@ function Ws() {
4406
4406
  f.id,
4407
4407
  s
4408
4408
  );
4409
- return hu(
4409
+ return mu(
4410
4410
  v,
4411
4411
  l,
4412
4412
  i,
@@ -4468,11 +4468,11 @@ function Ws() {
4468
4468
  error: g.error,
4469
4469
  handleEditLibraryVisual: x,
4470
4470
  handleAddLibraryVisual: y,
4471
- getUpdatedFrame: pu().getUpdatedFrame,
4471
+ getUpdatedFrame: hu().getUpdatedFrame,
4472
4472
  refetch: g.refetch
4473
4473
  };
4474
4474
  }
4475
- function fu() {
4475
+ function pu() {
4476
4476
  const [t, s] = V(""), [n, r] = V(!1), [l, i] = V(""), [c, o] = V(""), [d, u] = V(!1), [m, h] = V(
4477
4477
  null
4478
4478
  ), [g, x] = V(!1), [y, f] = V(null), [v, p] = V(null), { setIsDashboardEditing: b, setIsVisualEditing: D } = Ct(), { handleEditLibraryVisual: O, handleAddLibraryVisual: w } = Ws(), {
@@ -4497,7 +4497,7 @@ function fu() {
4497
4497
  () => {
4498
4498
  r(!1), i(""), o("");
4499
4499
  }
4500
- ), { handleShareSubmit: ee, handleRemoveAccess: W } = du(
4500
+ ), { handleShareSubmit: ee, handleRemoveAccess: W } = cu(
4501
4501
  (m == null ? void 0 : m.id) || null,
4502
4502
  M,
4503
4503
  F
@@ -4564,7 +4564,7 @@ function fu() {
4564
4564
  return St(), aa(), ta({
4565
4565
  debouncedSearchQuery: "",
4566
4566
  resourceId: (m == null ? void 0 : m.id) || "",
4567
- resourceType: Ze.VISUAL,
4567
+ resourceType: Xe.VISUAL,
4568
4568
  userType: "tenant"
4569
4569
  }), N ? /* @__PURE__ */ e(El, {}) : T ? /* @__PURE__ */ e(nt, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ a("div", { className: "py-8 text-center text-muted-foreground", children: [
4570
4570
  /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: "Failed to load visuals" }),
@@ -4673,7 +4673,7 @@ function fu() {
4673
4673
  }
4674
4674
  )
4675
4675
  ] }) : me.map((Z) => /* @__PURE__ */ e(
4676
- Kd,
4676
+ Wd,
4677
4677
  {
4678
4678
  visual: Z,
4679
4679
  onAddVisual: ue,
@@ -4695,7 +4695,7 @@ function fu() {
4695
4695
  Ul,
4696
4696
  {
4697
4697
  resource: m,
4698
- resourceType: Ze.VISUAL,
4698
+ resourceType: Xe.VISUAL,
4699
4699
  onShare: ee,
4700
4700
  isSharing: R,
4701
4701
  isRemoving: z,
@@ -4741,7 +4741,7 @@ function fu() {
4741
4741
  )
4742
4742
  ] });
4743
4743
  }
4744
- function gu({
4744
+ function fu({
4745
4745
  dashboard: t,
4746
4746
  isDeleting: s,
4747
4747
  isDuplicating: n,
@@ -4907,13 +4907,13 @@ function gu({
4907
4907
  t.id
4908
4908
  );
4909
4909
  }
4910
- function xu({ onRetry: t }) {
4910
+ function gu({ onRetry: t }) {
4911
4911
  return /* @__PURE__ */ e(nt, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ a("div", { className: "py-8 text-center text-muted-foreground", children: [
4912
4912
  /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: "Failed to load dashboards" }),
4913
4913
  /* @__PURE__ */ e(_, { variant: "outline", size: "sm", className: "mt-2", onClick: t, children: "Retry" })
4914
4914
  ] }) });
4915
4915
  }
4916
- function yu(t) {
4916
+ function xu(t) {
4917
4917
  const [s, n] = V(""), [r, l] = V(!1), [i, c] = V(""), [o, d] = V(""), [u, m] = V(!1), [h, g] = V(
4918
4918
  null
4919
4919
  ), [x, y] = V(!1), [f, v] = V(null), [p, b] = V(null), D = jt(
@@ -4950,7 +4950,7 @@ function yu(t) {
4950
4950
  () => {
4951
4951
  l(!1), c(""), d("");
4952
4952
  }
4953
- ), { handleShareSubmit: J, handleRemoveAccess: Q } = cu(
4953
+ ), { handleShareSubmit: J, handleRemoveAccess: Q } = ou(
4954
4954
  (h == null ? void 0 : h.id) || null,
4955
4955
  me,
4956
4956
  le
@@ -5016,9 +5016,9 @@ function yu(t) {
5016
5016
  return ta({
5017
5017
  debouncedSearchQuery: "",
5018
5018
  resourceId: (h == null ? void 0 : h.id) || "",
5019
- resourceType: Ze.DASHBOARD,
5019
+ resourceType: Xe.DASHBOARD,
5020
5020
  userType: "tenant"
5021
- }), k ? /* @__PURE__ */ e(El, {}) : L ? /* @__PURE__ */ e(xu, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ a("div", { className: "mt-1 flex h-full flex-1 flex-col gap-3 px-4", children: [
5021
+ }), k ? /* @__PURE__ */ e(El, {}) : L ? /* @__PURE__ */ e(gu, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ a("div", { className: "mt-1 flex h-full flex-1 flex-col gap-3 px-4", children: [
5022
5022
  C.canCreateDashboards && /* @__PURE__ */ e("div", { className: "px-1", children: r ? /* @__PURE__ */ a(zt, { className: "border-dashed p-4 pb-2", children: [
5023
5023
  /* @__PURE__ */ e(Ja, { className: "px-0 pb-3 pt-0", children: /* @__PURE__ */ e(Ha, { className: "text-sm", children: "New Dashboard" }) }),
5024
5024
  /* @__PURE__ */ a(pa, { className: "space-y-3 px-0 pb-0", children: [
@@ -5113,7 +5113,7 @@ function yu(t) {
5113
5113
  }
5114
5114
  )
5115
5115
  ] }) : ae.map((ne) => /* @__PURE__ */ e(
5116
- gu,
5116
+ fu,
5117
5117
  {
5118
5118
  dashboard: ne,
5119
5119
  isDeleting: z,
@@ -5139,7 +5139,7 @@ function yu(t) {
5139
5139
  Ul,
5140
5140
  {
5141
5141
  resource: h,
5142
- resourceType: Ze.DASHBOARD,
5142
+ resourceType: Xe.DASHBOARD,
5143
5143
  onShare: J,
5144
5144
  isSharing: j,
5145
5145
  isRemoving: ee,
@@ -5185,7 +5185,7 @@ function yu(t) {
5185
5185
  )
5186
5186
  ] });
5187
5187
  }
5188
- function vu({
5188
+ function yu({
5189
5189
  isOpen: t,
5190
5190
  onClose: s,
5191
5191
  className: n,
@@ -5205,7 +5205,7 @@ function vu({
5205
5205
  }, f = (v) => {
5206
5206
  console.log("Editing dashboard:", v);
5207
5207
  };
5208
- return /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a(
5208
+ return /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(
5209
5209
  "div",
5210
5210
  {
5211
5211
  ref: x,
@@ -5220,8 +5220,8 @@ function vu({
5220
5220
  /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-sm font-medium text-primary", children: o.name.charAt(0).toUpperCase() }) }),
5221
5221
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
5222
5222
  /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: o.name }),
5223
- /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a(Be, { children: [
5224
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ e(
5223
+ /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(Be, { children: [
5224
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ e(
5225
5225
  de,
5226
5226
  {
5227
5227
  variant: d.canCreateDashboards ? "default" : "secondary",
@@ -5275,14 +5275,14 @@ function vu({
5275
5275
  /* @__PURE__ */ e("div", { className: "px-4 pt-4 pb-0", children: /* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-foreground", children: "Dashboards" }) })
5276
5276
  ),
5277
5277
  /* @__PURE__ */ e(Kt, { value: "dashboards", className: "flex-1 mt-4", children: /* @__PURE__ */ e(
5278
- yu,
5278
+ xu,
5279
5279
  {
5280
5280
  onLoadDashboard: y,
5281
5281
  onEditDashboard: f,
5282
5282
  onDashboardItemClick: r
5283
5283
  }
5284
5284
  ) }),
5285
- d.canAccessVisuals && /* @__PURE__ */ e(Kt, { value: "visuals", className: "flex-1 mt-4", children: /* @__PURE__ */ e(fu, {}) })
5285
+ d.canAccessVisuals && /* @__PURE__ */ e(Kt, { value: "visuals", className: "flex-1 mt-4", children: /* @__PURE__ */ e(pu, {}) })
5286
5286
  ]
5287
5287
  }
5288
5288
  ) })
@@ -5290,7 +5290,7 @@ function vu({
5290
5290
  }
5291
5291
  ) });
5292
5292
  }
5293
- function Nu() {
5293
+ function vu() {
5294
5294
  var ue, ye;
5295
5295
  const {
5296
5296
  authToken: t,
@@ -5318,7 +5318,7 @@ function Nu() {
5318
5318
  (K) => K.actions
5319
5319
  ), { getSelectedSheet: L, setIsDashboardEditing: M, setShowDashboardJSON: I } = se((K) => K.actions), E = L(), { setInitialDashboard: F, clearSelectedDashboard: R } = jt(
5320
5320
  (K) => K.actions
5321
- ), { resources: z } = $i(Ze.DASHBOARD);
5321
+ ), { resources: z } = $i(Xe.DASHBOARD);
5322
5322
  Me(() => {
5323
5323
  if (z && z.length > 0) {
5324
5324
  const K = u == null ? void 0 : u.id;
@@ -5373,7 +5373,7 @@ function Nu() {
5373
5373
  P(E.id, Ne), k(Ne.id);
5374
5374
  }, le = () => {
5375
5375
  M(!0);
5376
- }, [J, Q] = V(!1), $ = qi(Ze.DASHBOARD);
5376
+ }, [J, Q] = V(!1), $ = qi(Xe.DASHBOARD);
5377
5377
  async function ae() {
5378
5378
  const K = os(
5379
5379
  u
@@ -5436,7 +5436,7 @@ function Nu() {
5436
5436
  onClick: () => v(!0),
5437
5437
  className: "h-7 p-2",
5438
5438
  buttonProps: { disabled: !i },
5439
- children: /* @__PURE__ */ e(Nd, { className: "h-4 w-4" })
5439
+ children: /* @__PURE__ */ e(vd, { className: "h-4 w-4" })
5440
5440
  }
5441
5441
  )
5442
5442
  ] }),
@@ -5449,13 +5449,13 @@ function Nu() {
5449
5449
  tooltip: "Invalidate Token",
5450
5450
  onClick: Gi,
5451
5451
  className: "h-7 p-2",
5452
- children: /* @__PURE__ */ e(Ed, { className: "h-4 w-4" })
5452
+ children: /* @__PURE__ */ e(Id, { className: "h-4 w-4" })
5453
5453
  }
5454
5454
  ),
5455
+ !b && i && /* @__PURE__ */ e(qd, {}),
5455
5456
  !b && i && /* @__PURE__ */ e(Gd, {}),
5456
- !b && i && /* @__PURE__ */ e(Wd, {}),
5457
- m && !b && j && r && i && /* @__PURE__ */ e($d, {}),
5458
- !b && j && r && i && /* @__PURE__ */ e(qd, {}),
5457
+ m && !b && j && r && i && /* @__PURE__ */ e(Yd, {}),
5458
+ !b && j && r && i && /* @__PURE__ */ e($d, {}),
5459
5459
  m && !b && j && d && r && i && /* @__PURE__ */ a(
5460
5460
  _,
5461
5461
  {
@@ -5545,9 +5545,9 @@ function Nu() {
5545
5545
  children: /* @__PURE__ */ e(wa, { className: "h-4 w-4" })
5546
5546
  }
5547
5547
  ) }),
5548
- !b && r && /* @__PURE__ */ e(Vd, {}),
5548
+ !b && r && /* @__PURE__ */ e(_d, {}),
5549
5549
  !b && /* @__PURE__ */ e(
5550
- vu,
5550
+ yu,
5551
5551
  {
5552
5552
  isOpen: f,
5553
5553
  onClose: () => v(!1)
@@ -5558,7 +5558,7 @@ function Nu() {
5558
5558
  }
5559
5559
  );
5560
5560
  }
5561
- function bu({
5561
+ function Nu({
5562
5562
  name: t,
5563
5563
  items: s,
5564
5564
  value: n,
@@ -5667,15 +5667,15 @@ function Pa({
5667
5667
  const h = r ? "Loading..." : l ? "Error" : n;
5668
5668
  function g() {
5669
5669
  if (t === "Connection")
5670
- return /* @__PURE__ */ e(Md, { className: "size-4" });
5670
+ return /* @__PURE__ */ e(Td, { className: "size-4" });
5671
5671
  if (t === "Database")
5672
5672
  return /* @__PURE__ */ e(Ot, { className: "size-4" });
5673
5673
  if (t === "Schema")
5674
- return /* @__PURE__ */ e(kd, { className: "size-4" });
5674
+ return /* @__PURE__ */ e(Sd, { className: "size-4" });
5675
5675
  if (t === "Table")
5676
5676
  return /* @__PURE__ */ e(nn, { className: "size-4" });
5677
5677
  if (t === "Model")
5678
- return /* @__PURE__ */ e(Qc, { className: "size-4" });
5678
+ return /* @__PURE__ */ e(Hc, { className: "size-4" });
5679
5679
  }
5680
5680
  function x() {
5681
5681
  return /* @__PURE__ */ a(he, { disabled: u, value: h, onValueChange: c, children: [
@@ -5718,7 +5718,7 @@ function Pa({
5718
5718
  }
5719
5719
  function y() {
5720
5720
  return /* @__PURE__ */ e(
5721
- bu,
5721
+ Nu,
5722
5722
  {
5723
5723
  icon: g(),
5724
5724
  items: s,
@@ -5733,9 +5733,9 @@ function Pa({
5733
5733
  }
5734
5734
  );
5735
5735
  }
5736
- return /* @__PURE__ */ e(et, { delayDuration: 0, children: /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: m === "select" ? x() : y() }) });
5736
+ return /* @__PURE__ */ e(He, { delayDuration: 0, children: /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: m === "select" ? x() : y() }) });
5737
5737
  }
5738
- function Cu({ column: t }) {
5738
+ function bu({ column: t }) {
5739
5739
  const [s, n] = V(!1), r = A((f) => f.selectedTableName), l = A(
5740
5740
  (f) => f.selectedSchemaName
5741
5741
  ), i = A(
@@ -5815,7 +5815,7 @@ function Cu({ column: t }) {
5815
5815
  )
5816
5816
  ] });
5817
5817
  }
5818
- function wu({ dataType: t }) {
5818
+ function Cu({ dataType: t }) {
5819
5819
  const s = Pe(t);
5820
5820
  return s === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ot, { className: "h-3 w-3" }) }) : s === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e(Ft, { className: "h-3 w-3" }) }) : s === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(rt, { className: "h-3 w-3" }) }) : s === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(da, { className: "h-3 w-3" }) }) : s === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(wa, { className: "h-3 w-3" }) }) : s === "geo" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e($a, { className: "h-3 w-3" }) }) : s === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(rn, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ot, { className: "h-3 w-3" }) });
5821
5821
  }
@@ -5831,13 +5831,13 @@ function Yn({
5831
5831
  s
5832
5832
  ),
5833
5833
  children: [
5834
- /* @__PURE__ */ e(wu, { dataType: t.data_type }),
5834
+ /* @__PURE__ */ e(Cu, { dataType: t.data_type }),
5835
5835
  /* @__PURE__ */ e("span", { children: t.column_name })
5836
5836
  ]
5837
5837
  }
5838
5838
  );
5839
5839
  }
5840
- function Su({ id: t, children: s, type: n = "column" }) {
5840
+ function wu({ id: t, children: s, type: n = "column" }) {
5841
5841
  const { attributes: r, listeners: l, setNodeRef: i, transform: c } = Wi({
5842
5842
  id: t,
5843
5843
  data: { type: n }
@@ -5857,7 +5857,7 @@ function Su({ id: t, children: s, type: n = "column" }) {
5857
5857
  }
5858
5858
  );
5859
5859
  }
5860
- function ku({
5860
+ function Su({
5861
5861
  onClick: t,
5862
5862
  column: s
5863
5863
  }) {
@@ -5910,7 +5910,7 @@ function ku({
5910
5910
  }
5911
5911
  ) }),
5912
5912
  n === s.column_name && /* @__PURE__ */ e("div", { className: "absolute inset-0", children: n === s.column_name && /* @__PURE__ */ e(Yn, { column: s }) }),
5913
- /* @__PURE__ */ e(Su, { id: s.column_name, type: "column", children: /* @__PURE__ */ e(Yn, { column: s }) })
5913
+ /* @__PURE__ */ e(wu, { id: s.column_name, type: "column", children: /* @__PURE__ */ e(Yn, { column: s }) })
5914
5914
  ]
5915
5915
  }
5916
5916
  )
@@ -5936,7 +5936,7 @@ const $n = {
5936
5936
  }, ql = {
5937
5937
  id: "__placeholder__"
5938
5938
  }, la = "droppable-group-by", ia = "droppable-metrics", oa = "droppable-pivot-by", bn = "sortable-group-by", ds = "sortable-metrics", Cn = "sortable-pivot-by", us = "droppable-filters", ms = "sortable-filters", Ks = "sortable-order-by";
5939
- function Du() {
5939
+ function ku() {
5940
5940
  const t = Jt((I) => I.insertIndex), s = A(
5941
5941
  (I) => {
5942
5942
  var E;
@@ -6252,11 +6252,11 @@ function ka(t, s) {
6252
6252
  return n;
6253
6253
  }
6254
6254
  }
6255
- function Tu({ dataType: t }) {
6255
+ function Du({ dataType: t }) {
6256
6256
  const s = Pe(t);
6257
6257
  return s === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ot, { className: "h-3 w-3" }) }) : s === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e(Ft, { className: "h-3 w-3" }) }) : s === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(rt, { className: "h-3 w-3" }) }) : s === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(da, { className: "h-3 w-3" }) }) : s === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(wa, { className: "h-3 w-3" }) }) : s === "geo" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e($a, { className: "h-3 w-3" }) }) : s === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(rn, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ot, { className: "h-3 w-3" }) });
6258
6258
  }
6259
- function Mu({
6259
+ function Tu({
6260
6260
  schemaName: t,
6261
6261
  tableName: s,
6262
6262
  columns: n,
@@ -6403,7 +6403,7 @@ function Mu({
6403
6403
  onClick: () => T(z),
6404
6404
  children: [
6405
6405
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
6406
- /* @__PURE__ */ e(Tu, { dataType: z.data_type }),
6406
+ /* @__PURE__ */ e(Du, { dataType: z.data_type }),
6407
6407
  /* @__PURE__ */ e("span", { children: z.column_name })
6408
6408
  ] }),
6409
6409
  /* @__PURE__ */ e(
@@ -6411,12 +6411,12 @@ function Mu({
6411
6411
  {
6412
6412
  onClick: (j) => j.stopPropagation(),
6413
6413
  className: "flex items-center justify-end",
6414
- children: Ht(z.data_type) && /* @__PURE__ */ e(Cu, { column: z })
6414
+ children: Ht(z.data_type) && /* @__PURE__ */ e(bu, { column: z })
6415
6415
  }
6416
6416
  )
6417
6417
  ]
6418
6418
  }
6419
- ) : /* @__PURE__ */ e(ku, { onClick: T, column: z });
6419
+ ) : /* @__PURE__ */ e(Su, { onClick: T, column: z });
6420
6420
  }
6421
6421
  function R() {
6422
6422
  return /* @__PURE__ */ a("div", { className: "flex grow gap-2", children: [
@@ -6429,7 +6429,7 @@ function Mu({
6429
6429
  variant: "secondary",
6430
6430
  className: "grow",
6431
6431
  children: [
6432
- r !== "Success" ? /* @__PURE__ */ e(Ve, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(vd, { className: "mr-2 size-4" }),
6432
+ r !== "Success" ? /* @__PURE__ */ e(Ve, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(yd, { className: "mr-2 size-4" }),
6433
6433
  "Top 10"
6434
6434
  ]
6435
6435
  }
@@ -6567,7 +6567,7 @@ function Gl({
6567
6567
  } = Tt(), { data: Y, refetch: ue } = _e(l);
6568
6568
  function ye() {
6569
6569
  return t ? t(ke, oe, O) : /* @__PURE__ */ e(
6570
- Mu,
6570
+ Tu,
6571
6571
  {
6572
6572
  schemaName: ke,
6573
6573
  tableName: oe,
@@ -6605,9 +6605,9 @@ function Gl({
6605
6605
  function Oe() {
6606
6606
  if (i && !z && (!d || d === "none") && (!o || o === "none"))
6607
6607
  return /* @__PURE__ */ a("div", { className: "grid grid-cols-3", children: [
6608
- /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(Qe, {}) }),
6608
+ /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(Ze, {}) }),
6609
6609
  /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(B, { children: "OR" }) }),
6610
- /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(Qe, {}) })
6610
+ /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(Ze, {}) })
6611
6611
  ] });
6612
6612
  }
6613
6613
  function We() {
@@ -6645,8 +6645,8 @@ function Gl({
6645
6645
  }
6646
6646
  function Ae() {
6647
6647
  function xe() {
6648
- let je = !1;
6649
- return R === "API" ? (je = !1, je) : ((R === "S3" || i && d && d !== "none" && u) && (je = !0), je);
6648
+ let Ue = !1;
6649
+ return R === "API" ? (Ue = !1, Ue) : ((R === "S3" || i && d && d !== "none" && u) && (Ue = !0), Ue);
6650
6650
  }
6651
6651
  return xe() ? /* @__PURE__ */ e(
6652
6652
  Pa,
@@ -6741,7 +6741,7 @@ function Gl({
6741
6741
  variant: "secondary",
6742
6742
  className: "group flex items-center gap-2 rounded-full",
6743
6743
  children: [
6744
- /* @__PURE__ */ e(bd, { className: "size-4" }),
6744
+ /* @__PURE__ */ e(Nd, { className: "size-4" }),
6745
6745
  /* @__PURE__ */ e("span", { className: "hidden group-hover:block", children: "Help" })
6746
6746
  ]
6747
6747
  }
@@ -6813,7 +6813,7 @@ function Wl({
6813
6813
  className: "h-8",
6814
6814
  onClick: n,
6815
6815
  children: [
6816
- /* @__PURE__ */ e(wd, { className: "mr-1.5 h-3.5 w-3.5" }),
6816
+ /* @__PURE__ */ e(Cd, { className: "mr-1.5 h-3.5 w-3.5" }),
6817
6817
  "Send Feedback"
6818
6818
  ]
6819
6819
  }
@@ -6856,7 +6856,7 @@ function Kl({
6856
6856
  !s && t && /* @__PURE__ */ e("div", { className: "flex flex-col space-y-1.5", children: /* @__PURE__ */ e("div", { className: "", children: /* @__PURE__ */ e(Ts, { code: t, language: "sql" }) }) })
6857
6857
  ] }),
6858
6858
  !l && t && !s && /* @__PURE__ */ a(_, { onClick: d, variant: "secondary", size: "sm", children: [
6859
- /* @__PURE__ */ e(ld, { className: "mr-2 h-4 w-4" }),
6859
+ /* @__PURE__ */ e(rd, { className: "mr-2 h-4 w-4" }),
6860
6860
  "View in SQL Editor"
6861
6861
  ] }),
6862
6862
  s && r && /* @__PURE__ */ a(
@@ -6866,7 +6866,7 @@ function Kl({
6866
6866
  size: "sm",
6867
6867
  variant: "outline",
6868
6868
  children: [
6869
- /* @__PURE__ */ e(md, { className: "mr-2 h-4 w-4" }),
6869
+ /* @__PURE__ */ e(ud, { className: "mr-2 h-4 w-4" }),
6870
6870
  "Debug with Assistant"
6871
6871
  ]
6872
6872
  }
@@ -6880,7 +6880,7 @@ function Jl({
6880
6880
  onDebugWithAssistant: r
6881
6881
  }) {
6882
6882
  return /* @__PURE__ */ a(xs, { openDelay: s ? 0 : 500, children: [
6883
- /* @__PURE__ */ e(ys, { asChild: !0, children: /* @__PURE__ */ e(_, { variant: "link", className: "h-5 p-0", children: s ? /* @__PURE__ */ e(ed, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(Ka, { className: "h-4 w-4 text-muted-foreground" }) }) }),
6883
+ /* @__PURE__ */ e(ys, { asChild: !0, children: /* @__PURE__ */ e(_, { variant: "link", className: "h-5 p-0", children: s ? /* @__PURE__ */ e(Xc, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(Ka, { className: "h-4 w-4 text-muted-foreground" }) }) }),
6884
6884
  /* @__PURE__ */ e(vs, { align: "start", className: "flex w-[700px]", children: /* @__PURE__ */ e(
6885
6885
  Kl,
6886
6886
  {
@@ -6892,7 +6892,7 @@ function Jl({
6892
6892
  ) })
6893
6893
  ] });
6894
6894
  }
6895
- function Au(t) {
6895
+ function Mu(t) {
6896
6896
  return Hi({ 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: [] }] })(t);
6897
6897
  }
6898
6898
  function Hl(t) {
@@ -6956,7 +6956,7 @@ function Hl(t) {
6956
6956
  }
6957
6957
  return { handleEditorDidMount: y };
6958
6958
  }
6959
- function Iu() {
6959
+ function Au() {
6960
6960
  const t = A((c) => c.card.sql), s = A((c) => c.sqlGen), { setCardSql: n, setSqlGen: r } = ie(), { handleEditorDidMount: l } = Hl("sql");
6961
6961
  function i(c) {
6962
6962
  n(c), Xi(s) || r({});
@@ -6988,7 +6988,7 @@ function Iu() {
6988
6988
  )
6989
6989
  ] });
6990
6990
  }
6991
- function Eu() {
6991
+ function Iu() {
6992
6992
  const t = A((l) => l.card.python), { setCardPython: s } = ie(), { handleEditorDidMount: n } = Hl("python");
6993
6993
  function r(l) {
6994
6994
  s(l);
@@ -7017,7 +7017,7 @@ function Eu() {
7017
7017
  }
7018
7018
  );
7019
7019
  }
7020
- function Ou({ jsonString: t }) {
7020
+ function Eu({ jsonString: t }) {
7021
7021
  return /* @__PURE__ */ e(
7022
7022
  On,
7023
7023
  {
@@ -7080,7 +7080,7 @@ function Js({
7080
7080
  }
7081
7081
  );
7082
7082
  }
7083
- function Ru() {
7083
+ function Ou() {
7084
7084
  const t = Za(), [s, n] = V(!1), r = se(
7085
7085
  (u) => u.actions.setIsDashboardPanelOpen
7086
7086
  ), { setIsVisualEditing: l } = Ct(), { getUpdatedFrame: i } = Ws(), c = $r(), o = eo();
@@ -7176,7 +7176,7 @@ function Ln() {
7176
7176
  }
7177
7177
  );
7178
7178
  }
7179
- function Fu() {
7179
+ function Ru() {
7180
7180
  const t = Za(), [s, n] = V(!1), [r, l] = V(!1);
7181
7181
  A((W) => W.frame);
7182
7182
  const i = A((W) => W.card);
@@ -7277,7 +7277,7 @@ ${d}` : ""}
7277
7277
  className: "relative flex w-1/3 min-w-0 grow overflow-hidden text-xs",
7278
7278
  role: "editor-filter-container",
7279
7279
  children: /* @__PURE__ */ e("div", { className: "mt-2 w-[99%]", children: /* @__PURE__ */ e(
7280
- Ou,
7280
+ Eu,
7281
7281
  {
7282
7282
  jsonString: JSON.stringify(u, null, 2)
7283
7283
  }
@@ -7304,7 +7304,7 @@ ${d}` : ""}
7304
7304
  role: "editor-resizable-group",
7305
7305
  children: [
7306
7306
  /* @__PURE__ */ a(
7307
- Ye,
7307
+ $e,
7308
7308
  {
7309
7309
  id: "1",
7310
7310
  order: 1,
@@ -7316,7 +7316,7 @@ ${d}` : ""}
7316
7316
  {
7317
7317
  id: "sql-container",
7318
7318
  className: "relative flex w-[99%]",
7319
- children: /* @__PURE__ */ e(Iu, {})
7319
+ children: /* @__PURE__ */ e(Au, {})
7320
7320
  }
7321
7321
  ),
7322
7322
  s && /* @__PURE__ */ e("code", { className: "absolute right-6 top-3 text-xs text-muted-foreground/70", children: "sql" })
@@ -7326,7 +7326,7 @@ ${d}` : ""}
7326
7326
  s && /* @__PURE__ */ a(te, { children: [
7327
7327
  /* @__PURE__ */ e($t, { withHandle: !0, className: "border" }),
7328
7328
  /* @__PURE__ */ a(
7329
- Ye,
7329
+ $e,
7330
7330
  {
7331
7331
  id: "2",
7332
7332
  order: 2,
@@ -7338,7 +7338,7 @@ ${d}` : ""}
7338
7338
  {
7339
7339
  id: "python-container",
7340
7340
  className: "relative flex w-[99%] pt-0",
7341
- children: /* @__PURE__ */ e(Eu, {})
7341
+ children: /* @__PURE__ */ e(Iu, {})
7342
7342
  }
7343
7343
  ),
7344
7344
  /* @__PURE__ */ e("code", { className: "absolute right-6 top-3 text-xs text-muted-foreground/70", children: "python" })
@@ -7392,7 +7392,7 @@ ${d}` : ""}
7392
7392
  className: "h-8",
7393
7393
  size: "sm",
7394
7394
  variant: "outline",
7395
- children: /* @__PURE__ */ e(Au, { className: "size-4 text-foreground/70" })
7395
+ children: /* @__PURE__ */ e(Mu, { className: "size-4 text-foreground/70" })
7396
7396
  }
7397
7397
  ),
7398
7398
  /* @__PURE__ */ e(
@@ -7433,12 +7433,12 @@ ${d}` : ""}
7433
7433
  )
7434
7434
  );
7435
7435
  }
7436
- const zu = [
7436
+ const Fu = [
7437
7437
  { value: "table", label: "Table", icon: nn },
7438
7438
  { value: "aggregateTable", label: "Aggregate", icon: An },
7439
7439
  { value: "pivotTable", label: "Pivot", icon: Pn }
7440
7440
  ];
7441
- function Pu({ className: t }) {
7441
+ function zu({ className: t }) {
7442
7442
  const s = A((d) => d.card), { setCardType: n, setCard: r, updateCardInFrame: l } = ie(), i = ["table", "aggregateTable", "pivotTable"].includes(
7443
7443
  s.type
7444
7444
  ), c = cl(s.config);
@@ -7469,7 +7469,7 @@ function Pu({ className: t }) {
7469
7469
  value: s.type,
7470
7470
  onValueChange: o,
7471
7471
  className: "flex flex-row items-center justify-between gap-1 rounded-lg border p-1",
7472
- children: zu.map((d) => {
7472
+ children: Fu.map((d) => {
7473
7473
  const u = d.icon;
7474
7474
  return /* @__PURE__ */ a("div", { className: "flex items-center", children: [
7475
7475
  /* @__PURE__ */ e(
@@ -7500,7 +7500,7 @@ function Pu({ className: t }) {
7500
7500
  }
7501
7501
  ) });
7502
7502
  }
7503
- function Lu({ card: t }) {
7503
+ function Pu({ card: t }) {
7504
7504
  var b, D, O, w, S, N, T, C, P, k, L;
7505
7505
  const [s, n] = V(!1), [r, l] = V(
7506
7506
  []
@@ -7592,7 +7592,7 @@ function Ql({
7592
7592
  ...s
7593
7593
  }) {
7594
7594
  var T;
7595
- const n = A((C) => C.card), r = As(n), l = ((T = n.customCardPreferences) == null ? void 0 : T.showCardHeader) ?? !0, i = A((C) => C.frame), c = se((C) => C.dashboard.filters), o = A((C) => C.actions.setRunSql), { updateFilter: d } = Ct(), u = c == null ? void 0 : c.find((C) => C.id === i.filterId), { data: m, isLoading: h, isFetching: g, errorMessage: x, pagination: y } = _e(n), { setCard: f, updateCardInFrame: v } = ie(), { data: p } = Is(n), b = $e(() => {
7595
+ const n = A((C) => C.card), r = As(n), l = ((T = n.customCardPreferences) == null ? void 0 : T.showCardHeader) ?? !0, i = A((C) => C.frame), c = se((C) => C.dashboard.filters), o = A((C) => C.actions.setRunSql), { updateFilter: d } = Ct(), u = c == null ? void 0 : c.find((C) => C.id === i.filterId), { data: m, isLoading: h, isFetching: g, errorMessage: x, pagination: y } = _e(n), { setCard: f, updateCardInFrame: v } = ie(), { data: p } = Is(n), b = qe(() => {
7596
7596
  var C;
7597
7597
  return n.type !== "pivotTable" || !((C = m == null ? void 0 : m.records) != null && C.length) ? null : {
7598
7598
  records: m.records,
@@ -7619,7 +7619,7 @@ function Ql({
7619
7619
  }
7620
7620
  };
7621
7621
  f(k), v(k), n.sql && ((M = (L = n.preferences) == null ? void 0 : L.tablePrefs) != null && M.enableDevModePagination) && o(!0);
7622
- }, w = $e(() => !n.id || !(m != null && m.records) ? null : dl({
7622
+ }, w = qe(() => !n.id || !(m != null && m.records) ? null : dl({
7623
7623
  card: n,
7624
7624
  data: m == null ? void 0 : m.records,
7625
7625
  cardType: n.type,
@@ -7638,7 +7638,7 @@ function Ql({
7638
7638
  p
7639
7639
  ]);
7640
7640
  function S(C) {
7641
- return /* @__PURE__ */ e(sn, { FallbackComponent: Os, children: /* @__PURE__ */ e(Lu, { card: C }) });
7641
+ return /* @__PURE__ */ e(sn, { FallbackComponent: Os, children: /* @__PURE__ */ e(Pu, { card: C }) });
7642
7642
  }
7643
7643
  function N() {
7644
7644
  if (m != null && m.records && (m == null ? void 0 : m.records.length) === 0 && !h && !g)
@@ -7739,7 +7739,7 @@ function Ql({
7739
7739
  inputClassName: "text-base font-semibold"
7740
7740
  }
7741
7741
  ) }),
7742
- /* @__PURE__ */ e(Pu, {})
7742
+ /* @__PURE__ */ e(zu, {})
7743
7743
  ] }),
7744
7744
  /* @__PURE__ */ e("div", { className: "w-1/2", children: /* @__PURE__ */ e(
7745
7745
  Wt,
@@ -7799,7 +7799,7 @@ const Kn = ({
7799
7799
  value: s,
7800
7800
  onChange: n
7801
7801
  }
7802
- ), _u = () => /* @__PURE__ */ a(vt, { children: [
7802
+ ), Lu = () => /* @__PURE__ */ a(vt, { children: [
7803
7803
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(Nt, { children: "Customize Card" }) }),
7804
7804
  /* @__PURE__ */ a(Et, { children: [
7805
7805
  "See the configuration options and documentation",
@@ -7813,7 +7813,7 @@ const Kn = ({
7813
7813
  }
7814
7814
  )
7815
7815
  ] })
7816
- ] }), Vu = ({
7816
+ ] }), _u = ({
7817
7817
  // defaultConfig,
7818
7818
  customCode: t,
7819
7819
  cardCustomCfgString: s,
@@ -7873,7 +7873,7 @@ const Kn = ({
7873
7873
  )
7874
7874
  }
7875
7875
  )
7876
- ] }), Bu = ({
7876
+ ] }), Vu = ({
7877
7877
  error: t,
7878
7878
  hasCardCustomConfig: s,
7879
7879
  onReset: n,
@@ -7885,7 +7885,7 @@ const Kn = ({
7885
7885
  /* @__PURE__ */ e(_, { onClick: r, variant: "outline", children: "Apply" }),
7886
7886
  /* @__PURE__ */ e(_, { onClick: l, variant: "outline", children: "Close" })
7887
7887
  ] });
7888
- function ju() {
7888
+ function Bu() {
7889
7889
  const [t, s] = V(!1), [n, r] = V(""), [l, i] = V(""), [c, o] = V(""), [d, u] = V(""), m = A((w) => w.card), h = A((w) => w.card.customCfg), g = h ? JSON.stringify(h, null, 2) : "", { data: x } = _e(m), { data: y } = Is(m), { setCardCustomCfg: f, setCustomVisualCode: v } = ie(), p = (w) => {
7890
7890
  var S, N;
7891
7891
  return JSON.stringify(
@@ -7945,11 +7945,11 @@ function ju() {
7945
7945
  }
7946
7946
  ) }),
7947
7947
  /* @__PURE__ */ a(yt, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
7948
- /* @__PURE__ */ e(_u, {}),
7948
+ /* @__PURE__ */ e(Lu, {}),
7949
7949
  /* @__PURE__ */ a("div", { className: "flex grow gap-2", children: [
7950
7950
  /* @__PURE__ */ e(sn, { FallbackComponent: Os, children: /* @__PURE__ */ e(Ql, { className: "w-1/2 rounded shadow-none" }) }),
7951
7951
  /* @__PURE__ */ e(
7952
- Vu,
7952
+ _u,
7953
7953
  {
7954
7954
  customCode: c,
7955
7955
  cardCustomCfgString: g,
@@ -7960,7 +7960,7 @@ function ju() {
7960
7960
  )
7961
7961
  ] }),
7962
7962
  /* @__PURE__ */ e(
7963
- Bu,
7963
+ Vu,
7964
7964
  {
7965
7965
  error: d,
7966
7966
  hasCardCustomConfig: !!h,
@@ -8025,7 +8025,7 @@ function Xl() {
8025
8025
  isError: c
8026
8026
  };
8027
8027
  }
8028
- function Uu({
8028
+ function ju({
8029
8029
  onChartTypeChange: t
8030
8030
  }) {
8031
8031
  const {
@@ -8052,15 +8052,15 @@ function Uu({
8052
8052
  ]
8053
8053
  );
8054
8054
  return c ? /* @__PURE__ */ a(te, { children: [
8055
- /* @__PURE__ */ e(Qe, { className: "my-2" }),
8055
+ /* @__PURE__ */ e(Ze, { className: "my-2" }),
8056
8056
  /* @__PURE__ */ e("div", { className: "grid grid-cols-4 place-items-center", children: /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: "Loading custom visuals..." }) })
8057
8057
  ] }) : o ? /* @__PURE__ */ a(te, { children: [
8058
- /* @__PURE__ */ e(Qe, { className: "my-2" }),
8058
+ /* @__PURE__ */ e(Ze, { className: "my-2" }),
8059
8059
  /* @__PURE__ */ e("div", { className: "grid grid-cols-4 place-items-center", children: /* @__PURE__ */ e("div", { className: "text-sm text-destructive", children: "Failed to load custom visuals" }) })
8060
8060
  ] }) : !i || i.length === 0 ? null : /* @__PURE__ */ a(te, { children: [
8061
- /* @__PURE__ */ e(Qe, { className: "my-2" }),
8061
+ /* @__PURE__ */ e(Ze, { className: "my-2" }),
8062
8062
  /* @__PURE__ */ e("div", { className: "grid grid-cols-4 place-items-center", children: i.map((u, m) => /* @__PURE__ */ e(
8063
- Yu,
8063
+ Uu,
8064
8064
  {
8065
8065
  text: u.name,
8066
8066
  onClick: () => d("custom", u),
@@ -8070,7 +8070,7 @@ function Uu({
8070
8070
  )) })
8071
8071
  ] });
8072
8072
  }
8073
- const Yu = ({
8073
+ const Uu = ({
8074
8074
  text: t,
8075
8075
  icon: s,
8076
8076
  onClick: n
@@ -8276,7 +8276,7 @@ function ei({
8276
8276
  )
8277
8277
  ] });
8278
8278
  }
8279
- function $u({
8279
+ function Yu({
8280
8280
  chartType: t,
8281
8281
  className: s,
8282
8282
  customIcon: n,
@@ -8335,7 +8335,7 @@ function ti({
8335
8335
  size: "sm",
8336
8336
  variant: t || "ghost",
8337
8337
  children: /* @__PURE__ */ e(
8338
- $u,
8338
+ Yu,
8339
8339
  {
8340
8340
  className: "size-4",
8341
8341
  chartType: l,
@@ -8357,13 +8357,13 @@ function ti({
8357
8357
  onChartTypeChange: () => n(!1)
8358
8358
  }
8359
8359
  ),
8360
- /* @__PURE__ */ e(Uu, { onChartTypeChange: () => n(!1) })
8360
+ /* @__PURE__ */ e(ju, { onChartTypeChange: () => n(!1) })
8361
8361
  ]
8362
8362
  }
8363
8363
  )
8364
8364
  ] });
8365
8365
  }
8366
- function qu({
8366
+ function $u({
8367
8367
  error: t,
8368
8368
  className: s = "",
8369
8369
  textClassName: n = "",
@@ -8422,7 +8422,7 @@ function qu({
8422
8422
  }
8423
8423
  );
8424
8424
  }
8425
- function Gu() {
8425
+ function qu() {
8426
8426
  const t = A(
8427
8427
  (i) => {
8428
8428
  var c, o;
@@ -8475,7 +8475,7 @@ function ai() {
8475
8475
  "stackedLine",
8476
8476
  "horizontalBar",
8477
8477
  "funnel"
8478
- ].includes(t.type) && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(Gu, {}) }),
8478
+ ].includes(t.type) && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(qu, {}) }),
8479
8479
  !["kpi", "text", "custom", "table"].includes(t.type) && /* @__PURE__ */ e(te, {}),
8480
8480
  ![
8481
8481
  "pie",
@@ -8490,13 +8490,13 @@ function ai() {
8490
8490
  "map"
8491
8491
  ].includes(t.type) && /* @__PURE__ */ a(ve, { tooltip: "Grid Style", onClick: i, children: [
8492
8492
  (r === "xy" || !r) && /* @__PURE__ */ e(Pn, { className: "size-4" }),
8493
- r === "x" && /* @__PURE__ */ e(td, { className: "size-4" }),
8494
- r === "y" && /* @__PURE__ */ e(Ad, { className: "size-4" }),
8495
- r === "none" && /* @__PURE__ */ e(Fd, { className: "size-4" })
8493
+ r === "x" && /* @__PURE__ */ e(ed, { className: "size-4" }),
8494
+ r === "y" && /* @__PURE__ */ e(Md, { className: "size-4" }),
8495
+ r === "none" && /* @__PURE__ */ e(Rd, { className: "size-4" })
8496
8496
  ] })
8497
8497
  ] }) : null;
8498
8498
  }
8499
- function Wu() {
8499
+ function Gu() {
8500
8500
  const t = A((y) => y.frame), s = A((y) => y.card), { setFrame: n, setActiveTabCardId: r, setCard: l, updateCardInFrame: i } = ie(), c = (y, f) => {
8501
8501
  y.dataTransfer.setData("tabIndex", f.toString());
8502
8502
  }, o = (y) => {
@@ -8572,7 +8572,7 @@ function Wu() {
8572
8572
  displayTab: v
8573
8573
  });
8574
8574
  },
8575
- children: f.displayTab === !0 || f.displayTab === void 0 ? /* @__PURE__ */ e(ca, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(rd, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
8575
+ children: f.displayTab === !0 || f.displayTab === void 0 ? /* @__PURE__ */ e(ca, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(sd, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
8576
8576
  }
8577
8577
  );
8578
8578
  }
@@ -8626,7 +8626,7 @@ function Wu() {
8626
8626
  className: "invisible ml-1 h-8 px-2 hover:bg-muted-foreground/50 group-hover:visible",
8627
8627
  variant: "outline",
8628
8628
  onClick: h,
8629
- children: /* @__PURE__ */ e(nd, { className: "h-4 w-4" })
8629
+ children: /* @__PURE__ */ e(ad, { className: "h-4 w-4" })
8630
8630
  }
8631
8631
  )
8632
8632
  ] }) });
@@ -8680,7 +8680,7 @@ function ni() {
8680
8680
  className: "flex grow flex-col",
8681
8681
  children: [
8682
8682
  t.cards.map((f) => /* @__PURE__ */ e(Kt, { className: "mt-0 grow", value: f.id, children: y() }, f.id)),
8683
- /* @__PURE__ */ e(Wu, {})
8683
+ /* @__PURE__ */ e(Gu, {})
8684
8684
  ]
8685
8685
  }
8686
8686
  );
@@ -8730,8 +8730,8 @@ function mn({
8730
8730
  children: [
8731
8731
  r && /* @__PURE__ */ a("div", { className: "flex grow items-center", children: [
8732
8732
  /* @__PURE__ */ e(ti, {}),
8733
- l && /* @__PURE__ */ e(ve, { tooltip: "Visual Docs", onClick: D, children: /* @__PURE__ */ e(Hc, { className: "size-4" }) }),
8734
- !["table", "custom"].includes(s.type) && l && /* @__PURE__ */ e(ju, {})
8733
+ l && /* @__PURE__ */ e(ve, { tooltip: "Visual Docs", onClick: D, children: /* @__PURE__ */ e(Jc, { className: "size-4" }) }),
8734
+ !["table", "custom"].includes(s.type) && l && /* @__PURE__ */ e(Bu, {})
8735
8735
  ] }),
8736
8736
  !r && /* @__PURE__ */ a("div", { className: "flex grow items-center gap-1", children: [
8737
8737
  /* @__PURE__ */ e(
@@ -8751,7 +8751,7 @@ function mn({
8751
8751
  variant: "ghost",
8752
8752
  size: "icon",
8753
8753
  onClick: p,
8754
- children: /* @__PURE__ */ e(id, { strokeWidth: 1.5, className: "size-4" })
8754
+ children: /* @__PURE__ */ e(ld, { strokeWidth: 1.5, className: "size-4" })
8755
8755
  }
8756
8756
  ),
8757
8757
  /* @__PURE__ */ e(
@@ -8786,7 +8786,7 @@ function mn({
8786
8786
  ),
8787
8787
  /* @__PURE__ */ e(B, { htmlFor: "pagination", children: "Paginate Results" })
8788
8788
  ] }),
8789
- n && /* @__PURE__ */ e(Ju, {})
8789
+ n && /* @__PURE__ */ e(Ku, {})
8790
8790
  ]
8791
8791
  }
8792
8792
  ),
@@ -8798,20 +8798,20 @@ function mn({
8798
8798
  children: [
8799
8799
  i && /* @__PURE__ */ a(te, { children: [
8800
8800
  /* @__PURE__ */ e(
8801
- Ye,
8801
+ $e,
8802
8802
  {
8803
8803
  id: "1",
8804
8804
  order: 1,
8805
8805
  defaultSize: 30,
8806
8806
  minSize: 10,
8807
8807
  className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
8808
- children: i && /* @__PURE__ */ e(Ku, {})
8808
+ children: i && /* @__PURE__ */ e(Wu, {})
8809
8809
  }
8810
8810
  ),
8811
8811
  /* @__PURE__ */ e($t, {})
8812
8812
  ] }),
8813
8813
  /* @__PURE__ */ a(
8814
- Ye,
8814
+ $e,
8815
8815
  {
8816
8816
  id: "2",
8817
8817
  order: 2,
@@ -8825,7 +8825,7 @@ function mn({
8825
8825
  children: [
8826
8826
  (g == null ? void 0 : g.records) && (g == null ? void 0 : g.records.length) > 0 && // <ResultsTable data={data?.records || []} />
8827
8827
  /* @__PURE__ */ e(Es, { card: s, data: (g == null ? void 0 : g.records) || [] }),
8828
- f && /* @__PURE__ */ e(qu, { error: f })
8828
+ f && /* @__PURE__ */ e($u, { error: f })
8829
8829
  ]
8830
8830
  }
8831
8831
  )
@@ -8836,7 +8836,7 @@ function mn({
8836
8836
  }
8837
8837
  ) : /* @__PURE__ */ e(te, { children: "No Active Card" });
8838
8838
  }
8839
- function Ku() {
8839
+ function Wu() {
8840
8840
  const t = A((n) => n.pythonStdOut);
8841
8841
  if (!t) return null;
8842
8842
  const s = t.replace(/\n/g, "<br>");
@@ -8848,14 +8848,14 @@ function Ku() {
8848
8848
  ] })
8849
8849
  ] });
8850
8850
  }
8851
- function Ju() {
8851
+ function Ku() {
8852
8852
  const t = A((n) => n.isShowingVisual), s = A(
8853
8853
  (n) => n.actions.setIsShowingVisual
8854
8854
  );
8855
8855
  return /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
8856
8856
  /* @__PURE__ */ e(B, { htmlFor: "visualize", children: "Chart" }),
8857
8857
  /* @__PURE__ */ e(
8858
- Xe,
8858
+ et,
8859
8859
  {
8860
8860
  checked: t,
8861
8861
  onCheckedChange: () => s(!t),
@@ -8900,7 +8900,7 @@ function ft({
8900
8900
  }
8901
8901
  );
8902
8902
  }
8903
- function Hu() {
8903
+ function Ju() {
8904
8904
  var f, v;
8905
8905
  const t = A(
8906
8906
  (p) => p.card.customCardPreferences
@@ -9023,7 +9023,7 @@ function Hu() {
9023
9023
  /* @__PURE__ */ e(
9024
9024
  ft,
9025
9025
  {
9026
- icon: /* @__PURE__ */ e(Jc, { className: "h-3.5 w-3.5" }),
9026
+ icon: /* @__PURE__ */ e(Kc, { className: "h-3.5 w-3.5" }),
9027
9027
  className: "h-9 w-full",
9028
9028
  label: "Select Plugin",
9029
9029
  options: n,
@@ -9052,7 +9052,7 @@ function Hu() {
9052
9052
  ((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && t && /* @__PURE__ */ e(te, { children: o && /* @__PURE__ */ e(
9053
9053
  ft,
9054
9054
  {
9055
- icon: /* @__PURE__ */ e(ad, { className: "h-3.5 w-3.5" }),
9055
+ icon: /* @__PURE__ */ e(td, { className: "h-3.5 w-3.5" }),
9056
9056
  className: "h-9 w-full",
9057
9057
  label: "Select Component",
9058
9058
  options: (o == null ? void 0 : o.filter((p) => p.type === i).map((p) => ({
@@ -9198,7 +9198,7 @@ function ga() {
9198
9198
  );
9199
9199
  }) });
9200
9200
  }
9201
- function Qu({ idx: t }) {
9201
+ function Hu({ idx: t }) {
9202
9202
  var o;
9203
9203
  const s = A((d) => {
9204
9204
  var u;
@@ -9259,7 +9259,7 @@ function Qu({ idx: t }) {
9259
9259
  onClick: () => c("start", t),
9260
9260
  className: "h-7 p-1 text-xs font-normal",
9261
9261
  children: /* @__PURE__ */ e(
9262
- pd,
9262
+ hd,
9263
9263
  {
9264
9264
  className: G("h-4 w-4", {
9265
9265
  "rotate-90": l === "y"
@@ -9274,7 +9274,7 @@ function Qu({ idx: t }) {
9274
9274
  onClick: () => c("center", t),
9275
9275
  className: "h-7 p-1 text-xs font-normal",
9276
9276
  children: /* @__PURE__ */ e(
9277
- gd,
9277
+ fd,
9278
9278
  {
9279
9279
  className: G("h-4 w-4", {
9280
9280
  "rotate-90": l === "y"
@@ -9289,7 +9289,7 @@ function Qu({ idx: t }) {
9289
9289
  onClick: () => c("end", t),
9290
9290
  className: "h-7 p-1 text-xs font-normal",
9291
9291
  children: /* @__PURE__ */ e(
9292
- fd,
9292
+ pd,
9293
9293
  {
9294
9294
  className: G("h-4 w-4", {
9295
9295
  "rotate-90": l === "y"
@@ -9301,7 +9301,7 @@ function Qu({ idx: t }) {
9301
9301
  ] }) })
9302
9302
  ] });
9303
9303
  }
9304
- function Zu() {
9304
+ function Qu() {
9305
9305
  const t = A((i) => i.card), { data: s } = _e(t), { keys: n } = es((s == null ? void 0 : s.records) || []), r = n.slice(1).filter((i) => !Mo.includes(i));
9306
9306
  let l = r;
9307
9307
  if (["stackedBar", "stackedLine"].includes(t.type)) {
@@ -9325,8 +9325,8 @@ function Vn({
9325
9325
  className: s,
9326
9326
  delayDuration: n
9327
9327
  }) {
9328
- return /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a(Be, { delayDuration: n, children: [
9329
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ e(
9328
+ return /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(Be, { delayDuration: n, children: [
9329
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ e(
9330
9330
  "span",
9331
9331
  {
9332
9332
  className: G(
@@ -9345,7 +9345,7 @@ function si() {
9345
9345
  var u, m, h;
9346
9346
  return (h = (m = (u = d == null ? void 0 : d.card) == null ? void 0 : u.preferences) == null ? void 0 : m.chartOptions) == null ? void 0 : h.indexAxis;
9347
9347
  }
9348
- ), { data: n } = _e(t), r = s === "y" ? "Metric" : "Dimension", l = s === "y" ? "Dimension" : "Metric", { dimensionKeys: i, transformedMetricKeys: c, keys: o } = Zu();
9348
+ ), { data: n } = _e(t), r = s === "y" ? "Metric" : "Dimension", l = s === "y" ? "Dimension" : "Metric", { dimensionKeys: i, transformedMetricKeys: c, keys: o } = Qu();
9349
9349
  return o.length === 0 ? null : /* @__PURE__ */ a("div", { className: "space-y-4", children: [
9350
9350
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
9351
9351
  /* @__PURE__ */ e(B, { children: r }),
@@ -9458,7 +9458,7 @@ function li({
9458
9458
  )
9459
9459
  }
9460
9460
  ),
9461
- /* @__PURE__ */ e(Qu, { idx: s })
9461
+ /* @__PURE__ */ e(Hu, { idx: s })
9462
9462
  ] })
9463
9463
  ]
9464
9464
  }
@@ -9538,11 +9538,11 @@ function Fa() {
9538
9538
  const c = t == null ? void 0 : t.find((o) => o.id === s.filterId);
9539
9539
  return /* @__PURE__ */ a("div", { className: "space-y-3", children: [
9540
9540
  /* @__PURE__ */ e(B, { children: "Card Filter" }),
9541
- /* @__PURE__ */ e(Xu, { onSelect: i, columns: r }),
9541
+ /* @__PURE__ */ e(Zu, { onSelect: i, columns: r }),
9542
9542
  c && /* @__PURE__ */ e(bl, { filter: c })
9543
9543
  ] });
9544
9544
  }
9545
- function Xu({
9545
+ function Zu({
9546
9546
  columns: t,
9547
9547
  onSelect: s
9548
9548
  }) {
@@ -9594,12 +9594,12 @@ function Xu({
9594
9594
  ] }) })
9595
9595
  ] });
9596
9596
  }
9597
- function em({
9597
+ function Xu({
9598
9598
  cardType: t
9599
9599
  }) {
9600
9600
  return /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ a(tt, { defaultValue: ["item-2"], type: "multiple", children: [
9601
9601
  /* @__PURE__ */ a(be, { value: "item-1", children: [
9602
- /* @__PURE__ */ e(Ce, { children: `${He(t)} Chart` }),
9602
+ /* @__PURE__ */ e(Ce, { children: `${Qe(t)} Chart` }),
9603
9603
  /* @__PURE__ */ a(we, { className: "space-y-4 font-mono text-xs", children: [
9604
9604
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT x-axis, y-axis-1, y-axis-2,... FROM table" }),
9605
9605
  /* @__PURE__ */ a("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
@@ -9636,7 +9636,7 @@ function em({
9636
9636
  ] })
9637
9637
  ] }) });
9638
9638
  }
9639
- function tm({
9639
+ function em({
9640
9640
  cardType: t
9641
9641
  }) {
9642
9642
  function s(n) {
@@ -9667,7 +9667,7 @@ function tm({
9667
9667
  }
9668
9668
  return /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ a(tt, { defaultValue: ["item-2"], type: "multiple", children: [
9669
9669
  /* @__PURE__ */ a(be, { value: "item-1", children: [
9670
- /* @__PURE__ */ e(Ce, { children: `${He(t)} Chart` }),
9670
+ /* @__PURE__ */ e(Ce, { children: `${Qe(t)} Chart` }),
9671
9671
  /* @__PURE__ */ e(we, { className: "space-y-4 font-mono text-xs", children: s(t) })
9672
9672
  ] }),
9673
9673
  /* @__PURE__ */ a(be, { value: "item-3", children: [
@@ -9748,7 +9748,7 @@ function ii() {
9748
9748
  }
9749
9749
  return /* @__PURE__ */ e(te, { children: s ? i() : c() });
9750
9750
  }
9751
- const am = {
9751
+ const tm = {
9752
9752
  datasets: [
9753
9753
  {
9754
9754
  type: "line",
@@ -9761,7 +9761,7 @@ const am = {
9761
9761
  data: []
9762
9762
  }
9763
9763
  ]
9764
- }, nm = {
9764
+ }, am = {
9765
9765
  datasets: [
9766
9766
  {
9767
9767
  fill: "origin",
@@ -9771,7 +9771,7 @@ const am = {
9771
9771
  }
9772
9772
  ]
9773
9773
  };
9774
- function sm() {
9774
+ function nm() {
9775
9775
  const t = A((s) => s.card.type);
9776
9776
  return /* @__PURE__ */ a("div", { className: "space-y-6 p-6", children: [
9777
9777
  /* @__PURE__ */ e(
@@ -9780,7 +9780,7 @@ function sm() {
9780
9780
  className: " ",
9781
9781
  type: "single",
9782
9782
  collapsible: !0,
9783
- children: rm(t)
9783
+ children: sm(t)
9784
9784
  }
9785
9785
  ),
9786
9786
  !["kpi"].includes(t) && /* @__PURE__ */ a("div", { className: "space-y-4", children: [
@@ -9790,7 +9790,7 @@ function sm() {
9790
9790
  ] })
9791
9791
  ] });
9792
9792
  }
9793
- function rm(t) {
9793
+ function sm(t) {
9794
9794
  if (["line", "bar"].includes(t))
9795
9795
  return /* @__PURE__ */ a(te, { children: [
9796
9796
  /* @__PURE__ */ a(be, { value: "item-1", children: [
@@ -9811,7 +9811,7 @@ function rm(t) {
9811
9811
  /* @__PURE__ */ e("b", { children: "Customize" }),
9812
9812
  " and change the `type` property in the dataset."
9813
9813
  ] }),
9814
- /* @__PURE__ */ e("pre", { children: JSON.stringify(am, null, 2) })
9814
+ /* @__PURE__ */ e("pre", { children: JSON.stringify(tm, null, 2) })
9815
9815
  ] })
9816
9816
  ] }),
9817
9817
  /* @__PURE__ */ a(be, { value: "item-3", children: [
@@ -9832,7 +9832,7 @@ function rm(t) {
9832
9832
  ),
9833
9833
  "for more options."
9834
9834
  ] }),
9835
- /* @__PURE__ */ e("pre", { children: JSON.stringify(nm, null, 2) })
9835
+ /* @__PURE__ */ e("pre", { children: JSON.stringify(am, null, 2) })
9836
9836
  ] })
9837
9837
  ] })
9838
9838
  ] });
@@ -9887,7 +9887,7 @@ function rm(t) {
9887
9887
  ] })
9888
9888
  ] }) });
9889
9889
  }
9890
- function lm({
9890
+ function rm({
9891
9891
  colorRanges: t,
9892
9892
  setColorRanges: s
9893
9893
  }) {
@@ -9969,7 +9969,7 @@ function lm({
9969
9969
  ] }, o))
9970
9970
  ] });
9971
9971
  }
9972
- function im() {
9972
+ function lm() {
9973
9973
  var m, h, g, x, y;
9974
9974
  const t = A((f) => f.card.preferences), s = A(
9975
9975
  (f) => f.actions.setCardPreferences
@@ -10124,9 +10124,9 @@ function im() {
10124
10124
  ] })
10125
10125
  ] })
10126
10126
  ] }) }),
10127
- /* @__PURE__ */ e(Qe, { className: "my-3" }),
10127
+ /* @__PURE__ */ e(Ze, { className: "my-3" }),
10128
10128
  /* @__PURE__ */ e(
10129
- lm,
10129
+ rm,
10130
10130
  {
10131
10131
  colorRanges: o,
10132
10132
  setColorRanges: d
@@ -10135,7 +10135,7 @@ function im() {
10135
10135
  ] })
10136
10136
  ] });
10137
10137
  }
10138
- function om() {
10138
+ function im() {
10139
10139
  return /* @__PURE__ */ a("div", { className: "space-y-6 px-6 py-2", children: [
10140
10140
  /* @__PURE__ */ e(tt, { type: "single", collapsible: !0, children: /* @__PURE__ */ a(be, { value: "item-1", children: [
10141
10141
  /* @__PURE__ */ e(Ce, { className: "", children: "KPI Query" }),
@@ -10161,7 +10161,7 @@ function om() {
10161
10161
  ] })
10162
10162
  ] })
10163
10163
  ] }) }),
10164
- /* @__PURE__ */ e("section", { className: "", children: /* @__PURE__ */ e(im, {}) }),
10164
+ /* @__PURE__ */ e("section", { className: "", children: /* @__PURE__ */ e(lm, {}) }),
10165
10165
  /* @__PURE__ */ e("div", {}),
10166
10166
  /* @__PURE__ */ e("div", {})
10167
10167
  ] });
@@ -10187,7 +10187,7 @@ function Jn({
10187
10187
  }
10188
10188
  );
10189
10189
  }
10190
- const cm = [
10190
+ const om = [
10191
10191
  {
10192
10192
  label: "Mercator",
10193
10193
  value: "mercator"
@@ -10244,7 +10244,7 @@ const cm = [
10244
10244
  label: "Natural Earth 1",
10245
10245
  value: "naturalEarth1"
10246
10246
  }
10247
- ], dm = [
10247
+ ], cm = [
10248
10248
  "blues",
10249
10249
  "brBG",
10250
10250
  "buGn",
@@ -10283,11 +10283,11 @@ const cm = [
10283
10283
  "ylGnBu",
10284
10284
  "ylOrBr",
10285
10285
  "ylOrRd"
10286
- ], um = dm.map((t) => ({
10286
+ ], dm = cm.map((t) => ({
10287
10287
  label: t,
10288
10288
  value: t
10289
10289
  }));
10290
- function mm() {
10290
+ function um() {
10291
10291
  var d, u, m, h, g, x, y, f, v, p, b, D, O, w, S, N, T, C;
10292
10292
  const t = A((P) => P.card), s = (u = (d = t == null ? void 0 : t.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : u.topoJsonUrl, [n, r] = V(
10293
10293
  ((h = (m = t == null ? void 0 : t.preferences) == null ? void 0 : m.mapVisualOptions) == null ? void 0 : h.customTopoJsonUrl) || ""
@@ -10297,7 +10297,7 @@ function mm() {
10297
10297
  })) || [];
10298
10298
  return /* @__PURE__ */ a("div", { className: "p-6", children: [
10299
10299
  /* @__PURE__ */ e(Jn, { summary: "Map Chart", children: /* @__PURE__ */ e("p", { className: "rounded-md bg-muted p-2 font-mono text-xs", children: "SELECT country, value FROM table" }) }),
10300
- /* @__PURE__ */ e(Qe, { className: "my-4" }),
10300
+ /* @__PURE__ */ e(Ze, { className: "my-4" }),
10301
10301
  /* @__PURE__ */ e(Jn, { open: !0, summary: "Settings", children: /* @__PURE__ */ a("div", { className: "space-y-3 px-2", children: [
10302
10302
  /* @__PURE__ */ e(
10303
10303
  ft,
@@ -10380,7 +10380,7 @@ function mm() {
10380
10380
  ft,
10381
10381
  {
10382
10382
  className: "h-9",
10383
- options: cm,
10383
+ options: om,
10384
10384
  value: ((f = (y = t.preferences) == null ? void 0 : y.mapVisualOptions) == null ? void 0 : f.projection) || "",
10385
10385
  label: "Projection",
10386
10386
  onValueChange: (P) => {
@@ -10402,7 +10402,7 @@ function mm() {
10402
10402
  ft,
10403
10403
  {
10404
10404
  className: "h-9",
10405
- options: um,
10405
+ options: dm,
10406
10406
  value: ((p = (v = t.preferences) == null ? void 0 : v.mapVisualOptions) == null ? void 0 : p.colorScale) || "",
10407
10407
  label: "Select Color Scale",
10408
10408
  onValueChange: (P) => {
@@ -10420,7 +10420,7 @@ function mm() {
10420
10420
  ] })
10421
10421
  ] })
10422
10422
  ] }) }),
10423
- /* @__PURE__ */ e(Qe, { className: "my-4" }),
10423
+ /* @__PURE__ */ e(Ze, { className: "my-4" }),
10424
10424
  /* @__PURE__ */ e(Jn, { className: "", summary: "Scale Options", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
10425
10425
  /* @__PURE__ */ e(
10426
10426
  Ie,
@@ -10488,11 +10488,11 @@ function mm() {
10488
10488
  }
10489
10489
  )
10490
10490
  ] }) }),
10491
- /* @__PURE__ */ e(Qe, { className: "my-4" }),
10491
+ /* @__PURE__ */ e(Ze, { className: "my-4" }),
10492
10492
  /* @__PURE__ */ e(ga, {})
10493
10493
  ] });
10494
10494
  }
10495
- function hm() {
10495
+ function mm() {
10496
10496
  var r;
10497
10497
  const t = A((l) => l.card.preferences), { setCardPreferences: s } = A((l) => l.actions);
10498
10498
  function n(l) {
@@ -10532,7 +10532,7 @@ function hn({
10532
10532
  let r = "pie-donut-polar";
10533
10533
  return t === "funnel" && (r = "funnel"), /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ a(tt, { defaultValue: ["item-2"], type: "multiple", children: [
10534
10534
  /* @__PURE__ */ a(be, { value: "item-1", children: [
10535
- /* @__PURE__ */ e(Ce, { children: `${He(t)} ${n}` }),
10535
+ /* @__PURE__ */ e(Ce, { children: `${Qe(t)} ${n}` }),
10536
10536
  /* @__PURE__ */ e(we, { children: s || /* @__PURE__ */ a("div", { className: "space-y-4 font-mono text-xs", children: [
10537
10537
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT label, measure FROM table" }),
10538
10538
  /* @__PURE__ */ a("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
@@ -10557,7 +10557,7 @@ function hn({
10557
10557
  ] }),
10558
10558
  t === "text" && /* @__PURE__ */ a(be, { value: "item-2", children: [
10559
10559
  /* @__PURE__ */ e(Ce, { children: "Settings" }),
10560
- /* @__PURE__ */ e(we, { className: "space-y-4 px-2 py-4", children: /* @__PURE__ */ e(hm, {}) })
10560
+ /* @__PURE__ */ e(we, { className: "space-y-4 px-2 py-4", children: /* @__PURE__ */ e(mm, {}) })
10561
10561
  ] }),
10562
10562
  !["range", "text"].includes(t) && /* @__PURE__ */ a(be, { value: "item-3", children: [
10563
10563
  /* @__PURE__ */ e(Ce, { children: "Click Filters" }),
@@ -10568,7 +10568,7 @@ function hn({
10568
10568
  ] })
10569
10569
  ] }) });
10570
10570
  }
10571
- function pm() {
10571
+ function hm() {
10572
10572
  const t = A(
10573
10573
  (r) => {
10574
10574
  var l, i;
@@ -10647,7 +10647,7 @@ function pm() {
10647
10647
  ] })
10648
10648
  ] }) });
10649
10649
  }
10650
- function fm({
10650
+ function pm({
10651
10651
  cardType: t = "table"
10652
10652
  }) {
10653
10653
  console.log("cardType", t);
@@ -10698,7 +10698,7 @@ function oi({ color: t, onColorChange: s, onClose: n }) {
10698
10698
  const p = v.currentTarget.getBoundingClientRect(), b = Math.max(0, Math.min(1, (v.clientX - p.left) / p.width)), D = Math.max(0, Math.min(1, (v.clientY - p.top) / p.height)), O = b * 100, w = (1 - D) * 100;
10699
10699
  c(O), d(w), x(r, O, w);
10700
10700
  }, x = (v, p, b) => {
10701
- const D = xm(v, p, b), O = gm(D.r, D.g, D.b);
10701
+ const D = gm(v, p, b), O = fm(D.r, D.g, D.b);
10702
10702
  m(O);
10703
10703
  }, y = (v) => {
10704
10704
  if (m(v), /^#[0-9A-Fa-f]{6}$/.test(v)) {
@@ -10818,7 +10818,7 @@ function kr(t) {
10818
10818
  b: parseInt(s[3], 16)
10819
10819
  } : null;
10820
10820
  }
10821
- function gm(t, s, n) {
10821
+ function fm(t, s, n) {
10822
10822
  return "#" + ((1 << 24) + (t << 16) + (s << 8) + n).toString(16).slice(1);
10823
10823
  }
10824
10824
  function Dr(t, s, n) {
@@ -10846,7 +10846,7 @@ function Dr(t, s, n) {
10846
10846
  l: Math.round(o * 100)
10847
10847
  };
10848
10848
  }
10849
- function xm(t, s, n) {
10849
+ function gm(t, s, n) {
10850
10850
  t /= 360, s /= 100, n /= 100;
10851
10851
  let r, l, i;
10852
10852
  if (s === 0)
@@ -10861,7 +10861,7 @@ function xm(t, s, n) {
10861
10861
  b: Math.round(i * 255)
10862
10862
  };
10863
10863
  }
10864
- const ym = [
10864
+ const xm = [
10865
10865
  "#000000",
10866
10866
  // black
10867
10867
  "#ffffff",
@@ -10900,7 +10900,7 @@ function ci() {
10900
10900
  return (I = M.card) == null ? void 0 : I.preferences;
10901
10901
  }), { setCardPreferences: n, updateCardInFrame: r } = ie(), { data: l } = _e(t), [i, c] = V({}), [o, d] = V(
10902
10902
  null
10903
- ), [u, m] = V(null), h = $e(() => {
10903
+ ), [u, m] = V(null), h = qe(() => {
10904
10904
  var F, R, z, j, ee, W, me;
10905
10905
  if (!(l != null && l.records) || l.records.length === 0) return [];
10906
10906
  const M = (t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine", I = (t == null ? void 0 : t.type) === "bar" || (t == null ? void 0 : t.type) === "line", E = ((F = t == null ? void 0 : t.config) == null ? void 0 : F.pivotByColumns) && t.config.pivotByColumns.length > 0;
@@ -10945,7 +10945,7 @@ function ci() {
10945
10945
  (O = t == null ? void 0 : t.config) == null ? void 0 : O.pivotByColumns,
10946
10946
  (w = t == null ? void 0 : t.config) == null ? void 0 : w.metricColumns,
10947
10947
  t == null ? void 0 : t.type
10948
- ]), g = $e(() => Fo(), []);
10948
+ ]), g = qe(() => Fo(), []);
10949
10949
  Me(() => {
10950
10950
  const M = {};
10951
10951
  h.forEach((I, E) => {
@@ -11014,7 +11014,7 @@ function ci() {
11014
11014
  }, b = Object.keys(((L = s == null ? void 0 : s.colorConfig) == null ? void 0 : L.segments) || {}).length > 0;
11015
11015
  return /* @__PURE__ */ a(be, { value: "colors", className: "border-b-0", children: [
11016
11016
  /* @__PURE__ */ e(Ce, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
11017
- /* @__PURE__ */ e(Dd, { className: "h-4 w-4 text-muted-foreground" }),
11017
+ /* @__PURE__ */ e(kd, { className: "h-4 w-4 text-muted-foreground" }),
11018
11018
  /* @__PURE__ */ e("span", { children: "Colors" })
11019
11019
  ] }) }),
11020
11020
  /* @__PURE__ */ e(we, { className: "", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
@@ -11069,7 +11069,7 @@ function ci() {
11069
11069
  ] }),
11070
11070
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
11071
11071
  /* @__PURE__ */ e("p", { className: "text-xs font-medium text-muted-foreground", children: "Popular Colors" }),
11072
- /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-1.5", children: ym.map((R, z) => /* @__PURE__ */ e(
11072
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-1.5", children: xm.map((R, z) => /* @__PURE__ */ e(
11073
11073
  "button",
11074
11074
  {
11075
11075
  className: G(
@@ -11205,14 +11205,14 @@ function It({
11205
11205
  ] })
11206
11206
  ] });
11207
11207
  }
11208
- const vm = [
11208
+ const ym = [
11209
11209
  "auto",
11210
11210
  "number",
11211
11211
  "currency",
11212
11212
  "percent",
11213
11213
  "scientific",
11214
11214
  "date"
11215
- ], Nm = [
11215
+ ], vm = [
11216
11216
  // 🌐 Global Reserve & Major Currencies
11217
11217
  { value: "USD", label: "USD - US Dollar" },
11218
11218
  { value: "EUR", label: "EUR - Euro" },
@@ -11265,7 +11265,7 @@ const vm = [
11265
11265
  { value: "VND", label: "VND - Vietnamese Dong" },
11266
11266
  { value: "TWD", label: "TWD - New Taiwan Dollar" },
11267
11267
  { value: "ILS", label: "ILS - Israeli New Shekel" }
11268
- ], bm = [
11268
+ ], Nm = [
11269
11269
  { value: "en-US", label: "English (US)" },
11270
11270
  { value: "en-GB", label: "English (UK)" },
11271
11271
  { value: "en-IN", label: "English (India)" },
@@ -11282,7 +11282,7 @@ const vm = [
11282
11282
  { value: "hi-IN", label: "Hindi" },
11283
11283
  { value: "nl-NL", label: "Dutch" },
11284
11284
  { value: "sv-SE", label: "Swedish" }
11285
- ], Cm = (t) => t.charAt(0).toUpperCase() + t.slice(1);
11285
+ ], bm = (t) => t.charAt(0).toUpperCase() + t.slice(1);
11286
11286
  function Zs({
11287
11287
  formatOptions: t = {},
11288
11288
  onFormatOptionsChange: s,
@@ -11305,7 +11305,7 @@ function Zs({
11305
11305
  onValueChange: (o) => i("type", o),
11306
11306
  children: [
11307
11307
  /* @__PURE__ */ e(pe, { className: "h-8 text-xs", children: /* @__PURE__ */ e(fe, {}) }),
11308
- /* @__PURE__ */ e(ge, { children: vm.map((o) => /* @__PURE__ */ e(X, { value: o, className: "text-xs", children: o === "auto" ? "Auto (Default)" : Cm(o) }, o)) })
11308
+ /* @__PURE__ */ e(ge, { children: ym.map((o) => /* @__PURE__ */ e(X, { value: o, className: "text-xs", children: o === "auto" ? "Auto (Default)" : bm(o) }, o)) })
11309
11309
  ]
11310
11310
  }
11311
11311
  )
@@ -11338,7 +11338,7 @@ function Zs({
11338
11338
  onValueChange: (o) => i("currency", o),
11339
11339
  children: [
11340
11340
  /* @__PURE__ */ e(pe, { className: "h-8 flex-1 text-xs", children: /* @__PURE__ */ e(fe, {}) }),
11341
- /* @__PURE__ */ e(ge, { children: Nm.map((o) => /* @__PURE__ */ e(
11341
+ /* @__PURE__ */ e(ge, { children: vm.map((o) => /* @__PURE__ */ e(
11342
11342
  X,
11343
11343
  {
11344
11344
  value: o.value,
@@ -11354,7 +11354,7 @@ function Zs({
11354
11354
  ["number", "currency"].includes(l) && /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
11355
11355
  /* @__PURE__ */ e(B, { className: "text-xs text-muted-foreground", children: "Abbreviate (K, M, B)" }),
11356
11356
  /* @__PURE__ */ e(
11357
- Xe,
11357
+ et,
11358
11358
  {
11359
11359
  checked: t.useSuffix ?? !1,
11360
11360
  onCheckedChange: (o) => i("useSuffix", o)
@@ -11370,7 +11370,7 @@ function Zs({
11370
11370
  onValueChange: (o) => i("locale", o),
11371
11371
  children: [
11372
11372
  /* @__PURE__ */ e(pe, { className: "h-8 flex-1 text-xs", children: /* @__PURE__ */ e(fe, {}) }),
11373
- /* @__PURE__ */ e(ge, { children: bm.map((o) => /* @__PURE__ */ e(
11373
+ /* @__PURE__ */ e(ge, { children: Nm.map((o) => /* @__PURE__ */ e(
11374
11374
  X,
11375
11375
  {
11376
11376
  value: o.value,
@@ -11410,7 +11410,7 @@ function Zs({
11410
11410
  ["number", "currency"].includes(l) && /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
11411
11411
  /* @__PURE__ */ e(B, { className: "text-xs text-muted-foreground", children: "Negative in ()" }),
11412
11412
  /* @__PURE__ */ e(
11413
- Xe,
11413
+ et,
11414
11414
  {
11415
11415
  checked: t.negativeInParentheses ?? !1,
11416
11416
  onCheckedChange: (o) => i("negativeInParentheses", o)
@@ -11487,7 +11487,7 @@ function Tr({ axis: t, label: s, type: n, config: r, onChange: l }) {
11487
11487
  /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between gap-2", children: [
11488
11488
  /* @__PURE__ */ e(Ce, { className: "flex grow items-center justify-between gap-3 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ e("div", { className: "flex grow items-center justify-between gap-2", children: /* @__PURE__ */ e("span", { children: s }) }) }),
11489
11489
  /* @__PURE__ */ e(
11490
- Xe,
11490
+ et,
11491
11491
  {
11492
11492
  checked: (r == null ? void 0 : r.enabled) !== !1,
11493
11493
  onCheckedChange: (N) => i("enabled", N),
@@ -11500,7 +11500,7 @@ function Tr({ axis: t, label: s, type: n, config: r, onChange: l }) {
11500
11500
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
11501
11501
  /* @__PURE__ */ e(B, { className: "text-xs font-medium", children: "TITLE" }),
11502
11502
  /* @__PURE__ */ e(
11503
- Xe,
11503
+ et,
11504
11504
  {
11505
11505
  checked: ((h = r == null ? void 0 : r.name) == null ? void 0 : h.enabled) ?? !1,
11506
11506
  onCheckedChange: (N) => c("enabled", N)
@@ -11526,7 +11526,7 @@ function Tr({ axis: t, label: s, type: n, config: r, onChange: l }) {
11526
11526
  onValueChange: (N) => i("position", N),
11527
11527
  children: [
11528
11528
  /* @__PURE__ */ e(pe, { className: "h-8 text-xs", children: /* @__PURE__ */ e(fe, {}) }),
11529
- /* @__PURE__ */ e(ge, { children: u.map((N) => /* @__PURE__ */ e(X, { value: N, className: "text-xs", children: N === "auto" ? "Auto (Default)" : He(N) }, N)) })
11529
+ /* @__PURE__ */ e(ge, { children: u.map((N) => /* @__PURE__ */ e(X, { value: N, className: "text-xs", children: N === "auto" ? "Auto (Default)" : Qe(N) }, N)) })
11530
11530
  ]
11531
11531
  }
11532
11532
  )
@@ -11535,7 +11535,7 @@ function Tr({ axis: t, label: s, type: n, config: r, onChange: l }) {
11535
11535
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
11536
11536
  /* @__PURE__ */ e(B, { className: "text-xs font-medium", children: "LABELS" }),
11537
11537
  /* @__PURE__ */ e(
11538
- Xe,
11538
+ et,
11539
11539
  {
11540
11540
  checked: ((y = r == null ? void 0 : r.labels) == null ? void 0 : y.enabled) !== !1,
11541
11541
  onCheckedChange: (N) => o("enabled", N)
@@ -11643,7 +11643,7 @@ function di() {
11643
11643
  };
11644
11644
  return /* @__PURE__ */ a(be, { value: "axes", className: "border-b-0", children: [
11645
11645
  /* @__PURE__ */ e(Ce, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
11646
- /* @__PURE__ */ e(Rd, { className: "h-4 w-4 text-muted-foreground" }),
11646
+ /* @__PURE__ */ e(Od, { className: "h-4 w-4 text-muted-foreground" }),
11647
11647
  /* @__PURE__ */ e("span", { children: "Axes" })
11648
11648
  ] }) }),
11649
11649
  /* @__PURE__ */ e(we, { className: "pt-2", children: /* @__PURE__ */ a(tt, { type: "single", collapsible: !0, className: "w-full", children: [
@@ -11688,14 +11688,14 @@ function ui() {
11688
11688
  }, o = ["top", "bottom", "left", "right"], d = ["start", "center", "end"];
11689
11689
  return /* @__PURE__ */ a(be, { value: "legend", className: "border-b-0", children: [
11690
11690
  /* @__PURE__ */ e(Ce, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
11691
- /* @__PURE__ */ e(hd, { className: "h-4 w-4 text-muted-foreground" }),
11691
+ /* @__PURE__ */ e(md, { className: "h-4 w-4 text-muted-foreground" }),
11692
11692
  /* @__PURE__ */ e("span", { children: "Legend" })
11693
11693
  ] }) }),
11694
11694
  /* @__PURE__ */ e(we, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
11695
11695
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
11696
11696
  /* @__PURE__ */ e(B, { className: "text-xs font-medium", children: "Display" }),
11697
11697
  /* @__PURE__ */ e(
11698
- Xe,
11698
+ et,
11699
11699
  {
11700
11700
  checked: (s == null ? void 0 : s.display) ?? i,
11701
11701
  onCheckedChange: (u) => c("display", u)
@@ -11712,7 +11712,7 @@ function ui() {
11712
11712
  onValueChange: (u) => c("position", u),
11713
11713
  children: [
11714
11714
  /* @__PURE__ */ e(pe, { className: "h-8 text-xs", children: /* @__PURE__ */ e(fe, {}) }),
11715
- /* @__PURE__ */ e(ge, { children: o.map((u) => /* @__PURE__ */ e(X, { value: u, className: "text-xs", children: He(u) }, u)) })
11715
+ /* @__PURE__ */ e(ge, { children: o.map((u) => /* @__PURE__ */ e(X, { value: u, className: "text-xs", children: Qe(u) }, u)) })
11716
11716
  ]
11717
11717
  }
11718
11718
  )
@@ -11726,7 +11726,7 @@ function ui() {
11726
11726
  onValueChange: (u) => c("align", u),
11727
11727
  children: [
11728
11728
  /* @__PURE__ */ e(pe, { className: "h-8 text-xs", children: /* @__PURE__ */ e(fe, {}) }),
11729
- /* @__PURE__ */ e(ge, { children: d.map((u) => /* @__PURE__ */ e(X, { value: u, className: "text-xs", children: He(u) }, u)) })
11729
+ /* @__PURE__ */ e(ge, { children: d.map((u) => /* @__PURE__ */ e(X, { value: u, className: "text-xs", children: Qe(u) }, u)) })
11730
11730
  ]
11731
11731
  }
11732
11732
  )
@@ -11806,7 +11806,7 @@ function mi() {
11806
11806
  ...(i ? ["center", "left", "right"] : ["center", "top", "bottom"]).filter((z) => z !== v),
11807
11807
  "custom"
11808
11808
  ];
11809
- const b = () => He(v), D = ["center", "start", "end"], O = ["center", "start", "end", "top", "bottom"], w = d ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], S = [
11809
+ const b = () => Qe(v), D = ["center", "start", "end"], O = ["center", "start", "end", "top", "bottom"], w = d ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], S = [
11810
11810
  { value: "USD", label: "USD - US Dollar" },
11811
11811
  { value: "EUR", label: "EUR - Euro" },
11812
11812
  { value: "GBP", label: "GBP - British Pound" },
@@ -11827,14 +11827,14 @@ function mi() {
11827
11827
  ];
11828
11828
  return /* @__PURE__ */ a(be, { value: "data-labels", className: "border-b-0", children: [
11829
11829
  /* @__PURE__ */ e(Ce, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
11830
- /* @__PURE__ */ e(Pd, { className: "h-4 w-4 text-muted-foreground" }),
11830
+ /* @__PURE__ */ e(zd, { className: "h-4 w-4 text-muted-foreground" }),
11831
11831
  /* @__PURE__ */ e("span", { children: "Data Labels" })
11832
11832
  ] }) }),
11833
11833
  /* @__PURE__ */ e(we, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
11834
11834
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
11835
11835
  /* @__PURE__ */ e(B, { className: "text-xs font-medium", children: "Display" }),
11836
11836
  /* @__PURE__ */ e(
11837
- Xe,
11837
+ et,
11838
11838
  {
11839
11839
  checked: h,
11840
11840
  onCheckedChange: (R) => g("enabled", R)
@@ -11851,7 +11851,7 @@ function mi() {
11851
11851
  onValueChange: (R) => g("position", R),
11852
11852
  children: [
11853
11853
  /* @__PURE__ */ e(pe, { className: "h-8 text-xs", children: /* @__PURE__ */ e(fe, {}) }),
11854
- /* @__PURE__ */ e(ge, { children: p.map((R) => /* @__PURE__ */ e(X, { value: R, className: "text-xs", children: R === "auto" ? b() : R === "custom" ? "Custom (Advanced)" : He(R) }, R)) })
11854
+ /* @__PURE__ */ e(ge, { children: p.map((R) => /* @__PURE__ */ e(X, { value: R, className: "text-xs", children: R === "auto" ? b() : R === "custom" ? "Custom (Advanced)" : Qe(R) }, R)) })
11855
11855
  ]
11856
11856
  }
11857
11857
  )
@@ -11859,7 +11859,7 @@ function mi() {
11859
11859
  c && /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
11860
11860
  /* @__PURE__ */ e(B, { className: "text-xs font-medium", children: "Show Total" }),
11861
11861
  /* @__PURE__ */ e(
11862
- Xe,
11862
+ et,
11863
11863
  {
11864
11864
  checked: (s == null ? void 0 : s.showTotal) ?? !1,
11865
11865
  onCheckedChange: (R) => g("showTotal", R)
@@ -11876,7 +11876,7 @@ function mi() {
11876
11876
  onValueChange: (R) => g("anchor", R),
11877
11877
  children: [
11878
11878
  /* @__PURE__ */ e(pe, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(fe, {}) }),
11879
- /* @__PURE__ */ e(ge, { children: D.map((R) => /* @__PURE__ */ e(X, { value: R, className: "text-xs", children: He(R) }, R)) })
11879
+ /* @__PURE__ */ e(ge, { children: D.map((R) => /* @__PURE__ */ e(X, { value: R, className: "text-xs", children: Qe(R) }, R)) })
11880
11880
  ]
11881
11881
  }
11882
11882
  )
@@ -11890,7 +11890,7 @@ function mi() {
11890
11890
  onValueChange: (R) => g("align", R),
11891
11891
  children: [
11892
11892
  /* @__PURE__ */ e(pe, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(fe, {}) }),
11893
- /* @__PURE__ */ e(ge, { children: O.map((R) => /* @__PURE__ */ e(X, { value: R, className: "text-xs", children: He(R) }, R)) })
11893
+ /* @__PURE__ */ e(ge, { children: O.map((R) => /* @__PURE__ */ e(X, { value: R, className: "text-xs", children: Qe(R) }, R)) })
11894
11894
  ]
11895
11895
  }
11896
11896
  )
@@ -11905,7 +11905,7 @@ function mi() {
11905
11905
  onValueChange: (R) => g("format", R),
11906
11906
  children: [
11907
11907
  /* @__PURE__ */ e(pe, { className: "h-8 text-xs", children: /* @__PURE__ */ e(fe, {}) }),
11908
- /* @__PURE__ */ e(ge, { children: w.map((R) => /* @__PURE__ */ e(X, { value: R, className: "text-xs", children: R === "auto" && d ? "Auto (Use Axis)" : R === "none" ? "None (Raw Value)" : He(R) }, R)) })
11908
+ /* @__PURE__ */ e(ge, { children: w.map((R) => /* @__PURE__ */ e(X, { value: R, className: "text-xs", children: R === "auto" && d ? "Auto (Use Axis)" : R === "none" ? "None (Raw Value)" : Qe(R) }, R)) })
11909
11909
  ]
11910
11910
  }
11911
11911
  )
@@ -11941,7 +11941,7 @@ function mi() {
11941
11941
  ["number", "currency"].includes(s.format) && /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
11942
11942
  /* @__PURE__ */ e(B, { className: "text-xs text-muted-foreground", children: "Abbreviate (K, M, B)" }),
11943
11943
  /* @__PURE__ */ e(
11944
- Xe,
11944
+ et,
11945
11945
  {
11946
11946
  checked: ((M = s == null ? void 0 : s.formatOptions) == null ? void 0 : M.useSuffix) ?? !1,
11947
11947
  onCheckedChange: (R) => y("useSuffix", R)
@@ -12033,7 +12033,7 @@ function mi() {
12033
12033
  ] }) })
12034
12034
  ] });
12035
12035
  }
12036
- function wm() {
12036
+ function Cm() {
12037
12037
  return /* @__PURE__ */ a("div", { className: "space-y-4 px-6 py-4", children: [
12038
12038
  /* @__PURE__ */ e("h3", { className: "text-sm font-medium", children: "Chart Configuration" }),
12039
12039
  /* @__PURE__ */ a(tt, { type: "single", collapsible: !0, className: "w-full px-2", children: [
@@ -12044,7 +12044,7 @@ function wm() {
12044
12044
  ] })
12045
12045
  ] });
12046
12046
  }
12047
- const Sm = /* @__PURE__ */ a("div", { className: "space-y-4 font-mono text-xs", children: [
12047
+ const wm = /* @__PURE__ */ a("div", { className: "space-y-4 font-mono text-xs", children: [
12048
12048
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT dimension, cohort, metric FROM table" }),
12049
12049
  /* @__PURE__ */ a("div", { children: [
12050
12050
  "See ",
@@ -12060,7 +12060,7 @@ const Sm = /* @__PURE__ */ a("div", { className: "space-y-4 font-mono text-xs",
12060
12060
  ),
12061
12061
  " in the docs."
12062
12062
  ] })
12063
- ] }), km = /* @__PURE__ */ a("div", { className: "space-y-4 font-mono text-xs", children: [
12063
+ ] }), Sm = /* @__PURE__ */ a("div", { className: "space-y-4 font-mono text-xs", children: [
12064
12064
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT y-axis, label, range-from, range-to, range-value FROM table" }),
12065
12065
  /* @__PURE__ */ a("div", { children: [
12066
12066
  "See ",
@@ -12076,7 +12076,7 @@ const Sm = /* @__PURE__ */ a("div", { className: "space-y-4 font-mono text-xs",
12076
12076
  ),
12077
12077
  " in the docs."
12078
12078
  ] })
12079
- ] }), Dm = /* @__PURE__ */ a("div", { className: "space-y-4 font-mono text-xs", children: [
12079
+ ] }), km = /* @__PURE__ */ a("div", { className: "space-y-4 font-mono text-xs", children: [
12080
12080
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT text FROM table limit 1" }),
12081
12081
  /* @__PURE__ */ a("div", { children: [
12082
12082
  "See ",
@@ -12093,7 +12093,7 @@ const Sm = /* @__PURE__ */ a("div", { className: "space-y-4 font-mono text-xs",
12093
12093
  " in the docs."
12094
12094
  ] })
12095
12095
  ] });
12096
- function Tm() {
12096
+ function Dm() {
12097
12097
  const t = A((n) => n.card.type);
12098
12098
  function s(n) {
12099
12099
  const r = [
@@ -12104,31 +12104,31 @@ function Tm() {
12104
12104
  "custom"
12105
12105
  ], l = (i) => r.includes(n) ? i : /* @__PURE__ */ a(te, { children: [
12106
12106
  i,
12107
- /* @__PURE__ */ e(wm, {})
12107
+ /* @__PURE__ */ e(Cm, {})
12108
12108
  ] });
12109
12109
  switch (n) {
12110
12110
  case "stackedBar":
12111
12111
  case "stackedLine":
12112
- return l(/* @__PURE__ */ e(pm, {}));
12112
+ return l(/* @__PURE__ */ e(hm, {}));
12113
12113
  case "tornado":
12114
12114
  case "pyramid":
12115
12115
  return l(
12116
12116
  /* @__PURE__ */ e(
12117
12117
  hn,
12118
12118
  {
12119
- docContent: Sm,
12119
+ docContent: wm,
12120
12120
  cardType: n
12121
12121
  }
12122
12122
  )
12123
12123
  );
12124
12124
  case "kpi":
12125
- return /* @__PURE__ */ e(om, {});
12125
+ return /* @__PURE__ */ e(im, {});
12126
12126
  case "line":
12127
12127
  case "bar":
12128
- return l(/* @__PURE__ */ e(em, { cardType: n }));
12128
+ return l(/* @__PURE__ */ e(Xu, { cardType: n }));
12129
12129
  case "range":
12130
12130
  return l(
12131
- /* @__PURE__ */ e(hn, { docContent: km, cardType: n })
12131
+ /* @__PURE__ */ e(hn, { docContent: Sm, cardType: n })
12132
12132
  );
12133
12133
  case "pie":
12134
12134
  case "doughnut":
@@ -12139,25 +12139,25 @@ function Tm() {
12139
12139
  case "bubble":
12140
12140
  case "scatter":
12141
12141
  return l(
12142
- /* @__PURE__ */ e(tm, { cardType: n })
12142
+ /* @__PURE__ */ e(em, { cardType: n })
12143
12143
  );
12144
12144
  case "table":
12145
- return /* @__PURE__ */ e(fm, { cardType: n });
12145
+ return /* @__PURE__ */ e(pm, { cardType: n });
12146
12146
  case "text":
12147
12147
  return /* @__PURE__ */ e(
12148
12148
  hn,
12149
12149
  {
12150
- docContent: Dm,
12150
+ docContent: km,
12151
12151
  cardType: n,
12152
12152
  suffix: "Visual"
12153
12153
  }
12154
12154
  );
12155
12155
  case "map":
12156
- return /* @__PURE__ */ e(mm, {});
12156
+ return /* @__PURE__ */ e(um, {});
12157
12157
  case "custom":
12158
- return /* @__PURE__ */ e(Hu, {});
12158
+ return /* @__PURE__ */ e(Ju, {});
12159
12159
  default:
12160
- return l(/* @__PURE__ */ e(sm, {}));
12160
+ return l(/* @__PURE__ */ e(nm, {}));
12161
12161
  }
12162
12162
  }
12163
12163
  return /* @__PURE__ */ a(nt, { className: "h-full w-full text-sm", children: [
@@ -12193,7 +12193,7 @@ function hi({
12193
12193
  }
12194
12194
  );
12195
12195
  }
12196
- const Mm = [
12196
+ const Tm = [
12197
12197
  {
12198
12198
  label: "Sum",
12199
12199
  value: "SUM",
@@ -12207,12 +12207,12 @@ const Mm = [
12207
12207
  {
12208
12208
  label: "Unique",
12209
12209
  value: "DISTINCT",
12210
- logo: /* @__PURE__ */ e(cd, { className: "size-3.5" })
12210
+ logo: /* @__PURE__ */ e(od, { className: "size-3.5" })
12211
12211
  },
12212
12212
  {
12213
12213
  label: "Average",
12214
12214
  value: "AVG",
12215
- logo: /* @__PURE__ */ e(Gc, { className: "size-3.5" })
12215
+ logo: /* @__PURE__ */ e(qc, { className: "size-3.5" })
12216
12216
  },
12217
12217
  {
12218
12218
  label: "Min",
@@ -12225,9 +12225,9 @@ const Mm = [
12225
12225
  logo: /* @__PURE__ */ e(Vs, { className: "size-3.5" })
12226
12226
  }
12227
12227
  ];
12228
- function Am({ column: t }) {
12228
+ function Mm({ column: t }) {
12229
12229
  const { updateMetricColumnOld: s } = ie();
12230
- let n = Mm;
12230
+ let n = Tm;
12231
12231
  Mt(t.type) && (n = n.filter(
12232
12232
  (l) => ["COUNT", "DISTINCT"].includes(l.value)
12233
12233
  )), Ht(t.type) && (n = n.filter(
@@ -12251,7 +12251,7 @@ function Am({ column: t }) {
12251
12251
  }
12252
12252
  );
12253
12253
  }
12254
- const Im = [
12254
+ const Am = [
12255
12255
  {
12256
12256
  label: "Day (D)",
12257
12257
  value: "day",
@@ -12273,7 +12273,7 @@ const Im = [
12273
12273
  logo: /* @__PURE__ */ e(B, { className: "cursor-pointer text-xs", children: "Y" })
12274
12274
  }
12275
12275
  ];
12276
- function Em({ column: t }) {
12276
+ function Im({ column: t }) {
12277
12277
  const { updateGroupByColumnOld: s } = ie();
12278
12278
  function n(r) {
12279
12279
  const l = {
@@ -12287,18 +12287,18 @@ function Em({ column: t }) {
12287
12287
  hi,
12288
12288
  {
12289
12289
  column: t,
12290
- functions: Im,
12290
+ functions: Am,
12291
12291
  onFunctionChange: (r) => n(r),
12292
12292
  label: "Granularity"
12293
12293
  }
12294
12294
  );
12295
12295
  }
12296
- function Om({
12296
+ function Em({
12297
12297
  col: t,
12298
12298
  onChange: s,
12299
12299
  droppableId: n
12300
12300
  }) {
12301
- const { columns: r } = rl(), l = $e(() => {
12301
+ const { columns: r } = rl(), l = qe(() => {
12302
12302
  let o = [];
12303
12303
  (n === la || n === ia || n === oa) && (o = r);
12304
12304
  const d = o == null ? void 0 : o.filter(
@@ -12363,7 +12363,7 @@ function pi({
12363
12363
  ["pie", "doughnut"].includes(s) && o()
12364
12364
  ] });
12365
12365
  }
12366
- function Rm({
12366
+ function Om({
12367
12367
  column: t,
12368
12368
  type: s,
12369
12369
  onRemoveColumn: n,
@@ -12462,9 +12462,9 @@ function Rm({
12462
12462
  function D() {
12463
12463
  const S = At(t.type);
12464
12464
  if (r === ia)
12465
- return /* @__PURE__ */ e(Am, { column: t });
12465
+ return /* @__PURE__ */ e(Mm, { column: t });
12466
12466
  if ((r === la || r === oa) && S)
12467
- return /* @__PURE__ */ e(Em, { column: t });
12467
+ return /* @__PURE__ */ e(Im, { column: t });
12468
12468
  }
12469
12469
  function O() {
12470
12470
  return /* @__PURE__ */ e(
@@ -12474,7 +12474,7 @@ function Rm({
12474
12474
  "pl-3": (r === la || r === oa) && v
12475
12475
  }),
12476
12476
  children: /* @__PURE__ */ e(
12477
- Om,
12477
+ Em,
12478
12478
  {
12479
12479
  col: t,
12480
12480
  onChange: p,
@@ -12491,7 +12491,7 @@ function Rm({
12491
12491
  className: "h-full pl-2",
12492
12492
  onClick: () => i(!l),
12493
12493
  children: l ? /* @__PURE__ */ e(
12494
- Od,
12494
+ Ed,
12495
12495
  {
12496
12496
  className: G(
12497
12497
  "size-3 cursor-pointer items-center justify-center rounded-r-sm text-muted-foreground"
@@ -12566,8 +12566,8 @@ function Hn({
12566
12566
  ] }),
12567
12567
  y(),
12568
12568
  /* @__PURE__ */ e("div", { className: "space-y-2", children: g == null ? void 0 : g.map(
12569
- (p) => p.id === ql.id ? /* @__PURE__ */ e(Fm, {}, p.id) : /* @__PURE__ */ e(
12570
- Rm,
12569
+ (p) => p.id === ql.id ? /* @__PURE__ */ e(Rm, {}, p.id) : /* @__PURE__ */ e(
12570
+ Om,
12571
12571
  {
12572
12572
  droppableId: t,
12573
12573
  type: l,
@@ -12581,7 +12581,7 @@ function Hn({
12581
12581
  }
12582
12582
  ) });
12583
12583
  }
12584
- function Fm() {
12584
+ function Rm() {
12585
12585
  return /* @__PURE__ */ e("div", { className: "mr-5 flex h-8 grow items-center space-x-2 rounded-md border border-dashed border-muted-foreground bg-background px-2 py-1 text-sm", children: /* @__PURE__ */ e("span", { className: "text-muted-foreground/70", children: "Drop here" }) });
12586
12586
  }
12587
12587
  function fi({ children: t, id: s, type: n }) {
@@ -12599,7 +12599,7 @@ function fi({ children: t, id: s, type: n }) {
12599
12599
  } : void 0;
12600
12600
  return /* @__PURE__ */ e("div", { ...l, ...r, ref: i, style: u, children: t });
12601
12601
  }
12602
- function zm() {
12602
+ function Fm() {
12603
12603
  const t = A((p) => {
12604
12604
  var b;
12605
12605
  return (b = p.card.queryConfig) == null ? void 0 : b.orderBy;
@@ -12612,7 +12612,7 @@ function zm() {
12612
12612
  }) || [], { addOrderByColumn: r, removeOrderByColumn: l, updateOrderByColumn: i } = ie(), c = [...s, ...n];
12613
12613
  if (c.length === 0)
12614
12614
  return /* @__PURE__ */ e(te, {});
12615
- const o = /* @__PURE__ */ e(Kc, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), d = /* @__PURE__ */ e(qc, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), u = /* @__PURE__ */ e(Wc, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), m = /* @__PURE__ */ e($c, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), h = c == null ? void 0 : c.filter((p) => !t.some((b) => b.columnId === p.id)).map((p) => ({
12615
+ const o = /* @__PURE__ */ e(Wc, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), d = /* @__PURE__ */ e($c, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), u = /* @__PURE__ */ e(Gc, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), m = /* @__PURE__ */ e(Yc, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), h = c == null ? void 0 : c.filter((p) => !t.some((b) => b.columnId === p.id)).map((p) => ({
12616
12616
  id: p.id,
12617
12617
  value: p.label || p.name
12618
12618
  }));
@@ -12713,7 +12713,7 @@ function zm() {
12713
12713
  }
12714
12714
  );
12715
12715
  }
12716
- function Pm() {
12716
+ function zm() {
12717
12717
  const t = A(
12718
12718
  (v) => {
12719
12719
  var p;
@@ -12788,7 +12788,7 @@ function Pm() {
12788
12788
  previewColumns: l
12789
12789
  }
12790
12790
  ),
12791
- /* @__PURE__ */ e(zm, {})
12791
+ /* @__PURE__ */ e(Fm, {})
12792
12792
  ] }),
12793
12793
  /* @__PURE__ */ e(Xt, { orientation: "horizontal" })
12794
12794
  ] })
@@ -12863,7 +12863,7 @@ function Xs({
12863
12863
  }
12864
12864
  ) });
12865
12865
  }
12866
- function Lm({
12866
+ function Pm({
12867
12867
  column: t,
12868
12868
  sortableType: s
12869
12869
  }) {
@@ -12879,12 +12879,12 @@ function Lm({
12879
12879
  (S) => S.name === t.name
12880
12880
  );
12881
12881
  }
12882
- ), { selectedConnectionId: i, selectedDatabaseName: c, selectedTableName: o } = Tt(), d = $e(() => {
12882
+ ), { selectedConnectionId: i, selectedDatabaseName: c, selectedTableName: o } = Tt(), d = qe(() => {
12883
12883
  var D;
12884
12884
  return (D = r == null ? void 0 : r.find(
12885
12885
  (O) => O.filterColumnName === t.name
12886
12886
  )) == null ? void 0 : D.filterValue;
12887
- }, [r, t.name]), u = $e(() => Array.isArray(d) ? d.map(
12887
+ }, [r, t.name]), u = qe(() => Array.isArray(d) ? d.map(
12888
12888
  (D) => ({
12889
12889
  id: D,
12890
12890
  value: D
@@ -12898,7 +12898,7 @@ function Lm({
12898
12898
  connectionId: i,
12899
12899
  // not needed
12900
12900
  dataType: t.type
12901
- }, { data: g, isLoading: x, isFetching: y, isError: f } = Cl(h), v = $e(() => {
12901
+ }, { data: g, isLoading: x, isFetching: y, isError: f } = Cl(h), v = qe(() => {
12902
12902
  var O;
12903
12903
  return h.column ? (O = g == null ? void 0 : g.records) == null ? void 0 : O.map((w) => {
12904
12904
  let S = h.column.split(".").slice(-1)[0].replace(/"/g, "");
@@ -12926,7 +12926,7 @@ function Lm({
12926
12926
  ) : f ? /* @__PURE__ */ e("div", { className: "flex h-8 min-w-60 items-center bg-muted px-2 text-sm", children: "Error" }) : /* @__PURE__ */ e(
12927
12927
  Bs,
12928
12928
  {
12929
- renderFilterModeButton: () => /* @__PURE__ */ e(_m, { columnName: t.name }),
12929
+ renderFilterModeButton: () => /* @__PURE__ */ e(Lm, { columnName: t.name }),
12930
12930
  showNegativeIndicator: (l == null ? void 0 : l.mode) === "exclude",
12931
12931
  options: v,
12932
12932
  onChange: p,
@@ -12948,7 +12948,7 @@ function Lm({
12948
12948
  }
12949
12949
  );
12950
12950
  }
12951
- function _m({ columnName: t }) {
12951
+ function Lm({ columnName: t }) {
12952
12952
  const { setEditorFilterMode: s } = ie(), n = A(
12953
12953
  (l) => {
12954
12954
  var i, c;
@@ -12970,11 +12970,11 @@ function _m({ columnName: t }) {
12970
12970
  // 'bg-red-200 hover:bg-red-300': filterMode === 'exclude',
12971
12971
  // 'bg-green-200 hover:bg-green-300': filterMode === 'include',
12972
12972
  }),
12973
- children: He((n == null ? void 0 : n.mode) === "exclude" ? "exclude" : "include")
12973
+ children: Qe((n == null ? void 0 : n.mode) === "exclude" ? "exclude" : "include")
12974
12974
  }
12975
12975
  );
12976
12976
  }
12977
- function Vm({
12977
+ function _m({
12978
12978
  open: t,
12979
12979
  setOpen: s,
12980
12980
  dateRange: n,
@@ -13076,7 +13076,7 @@ function Vm({
13076
13076
  )
13077
13077
  ] }) });
13078
13078
  }
13079
- function Bm({
13079
+ function Vm({
13080
13080
  column: t,
13081
13081
  sortableType: s
13082
13082
  }) {
@@ -13104,7 +13104,7 @@ function Bm({
13104
13104
  }
13105
13105
  function D() {
13106
13106
  return d || u ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Ds, { className: "h-8 w-72 bg-foreground/10" }) }) : m ? /* @__PURE__ */ e("div", { className: "h-8 w-72 bg-muted px-2", children: "Error" }) : g ? /* @__PURE__ */ e(
13107
- Vm,
13107
+ _m,
13108
13108
  {
13109
13109
  title: o.title,
13110
13110
  open: n,
@@ -13128,7 +13128,7 @@ function Bm({
13128
13128
  }
13129
13129
  );
13130
13130
  }
13131
- function jm({
13131
+ function Bm({
13132
13132
  id: t,
13133
13133
  label: s,
13134
13134
  columns: n,
@@ -13153,11 +13153,11 @@ function jm({
13153
13153
  id: v.id,
13154
13154
  sortableType: l,
13155
13155
  column: v,
13156
- children: /* @__PURE__ */ e(Um, {})
13156
+ children: /* @__PURE__ */ e(jm, {})
13157
13157
  },
13158
13158
  v.id
13159
13159
  ) : p ? /* @__PURE__ */ e(
13160
- Bm,
13160
+ Vm,
13161
13161
  {
13162
13162
  droppableId: t,
13163
13163
  sortableType: l,
@@ -13165,7 +13165,7 @@ function jm({
13165
13165
  },
13166
13166
  v.id
13167
13167
  ) : /* @__PURE__ */ e(
13168
- Lm,
13168
+ Pm,
13169
13169
  {
13170
13170
  droppableId: t,
13171
13171
  sortableType: l,
@@ -13192,10 +13192,10 @@ function jm({
13192
13192
  }
13193
13193
  ) });
13194
13194
  }
13195
- function Um() {
13195
+ function jm() {
13196
13196
  return /* @__PURE__ */ e("div", { className: "flex h-8 w-60 items-center space-x-2 rounded-md border border-dashed border-muted-foreground bg-background px-2 py-1 text-sm text-muted-foreground", children: "Drop here" });
13197
13197
  }
13198
- function Ym() {
13198
+ function Um() {
13199
13199
  const t = A(
13200
13200
  (l) => {
13201
13201
  var i;
@@ -13208,7 +13208,7 @@ function Ym() {
13208
13208
  n(l);
13209
13209
  }
13210
13210
  return /* @__PURE__ */ e("section", { className: "size-full px-4 pb-4", children: /* @__PURE__ */ e(
13211
- jm,
13211
+ Bm,
13212
13212
  {
13213
13213
  onRemoveColumn: r,
13214
13214
  sortableType: ms,
@@ -13219,7 +13219,7 @@ function Ym() {
13219
13219
  }
13220
13220
  ) });
13221
13221
  }
13222
- function $m() {
13222
+ function Ym() {
13223
13223
  const t = A((c) => c.card), s = A((c) => c.showAIDialog), { setShowAIDialog: n } = ie(), { data: r, errorMessage: l, errorSql: i } = _e(t);
13224
13224
  return /* @__PURE__ */ a("section", { className: "flex justify-between gap-2 p-4", children: [
13225
13225
  /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
@@ -13231,7 +13231,7 @@ function $m() {
13231
13231
  variant: "secondary",
13232
13232
  size: "sm",
13233
13233
  children: [
13234
- /* @__PURE__ */ e(Cd, { className: "mr-2 h-4 w-4" }),
13234
+ /* @__PURE__ */ e(bd, { className: "mr-2 h-4 w-4" }),
13235
13235
  "Assistant"
13236
13236
  ]
13237
13237
  }
@@ -13245,7 +13245,7 @@ function $m() {
13245
13245
  ] })
13246
13246
  ] });
13247
13247
  }
13248
- function qm() {
13248
+ function $m() {
13249
13249
  const t = Rt(null), s = Rt(null), n = A((o) => o.isShowingVisual), r = A((o) => o.showAIDialog), l = A((o) => o.isDevMode);
13250
13250
  Me(() => {
13251
13251
  var o, d, u, m;
@@ -13254,18 +13254,18 @@ function qm() {
13254
13254
  function i() {
13255
13255
  return /* @__PURE__ */ a(te, { children: [
13256
13256
  /* @__PURE__ */ e(
13257
- Ye,
13257
+ $e,
13258
13258
  {
13259
13259
  role: "query-section",
13260
13260
  className: "flex",
13261
13261
  minSize: 20,
13262
13262
  defaultSize: 40,
13263
- children: /* @__PURE__ */ e(Fu, {})
13263
+ children: /* @__PURE__ */ e(Ru, {})
13264
13264
  }
13265
13265
  ),
13266
13266
  /* @__PURE__ */ e($t, { withHandle: !0 }),
13267
13267
  /* @__PURE__ */ e(
13268
- Ye,
13268
+ $e,
13269
13269
  {
13270
13270
  className: "pb-1",
13271
13271
  role: "visual-section",
@@ -13273,17 +13273,17 @@ function qm() {
13273
13273
  defaultSize: 60,
13274
13274
  children: n && !r ? /* @__PURE__ */ a(Yt, { direction: "horizontal", children: [
13275
13275
  /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
13276
- Ye,
13276
+ $e,
13277
13277
  {
13278
13278
  ref: t,
13279
13279
  className: "flex",
13280
13280
  defaultSize: 25,
13281
13281
  maxSize: 30,
13282
- children: /* @__PURE__ */ e(Tm, {})
13282
+ children: /* @__PURE__ */ e(Dm, {})
13283
13283
  }
13284
13284
  ) }),
13285
13285
  !r && /* @__PURE__ */ e($t, {}),
13286
- /* @__PURE__ */ e(Ye, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e(mn, {}) })
13286
+ /* @__PURE__ */ e($e, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e(mn, {}) })
13287
13287
  ] }) : /* @__PURE__ */ e(mn, {})
13288
13288
  }
13289
13289
  )
@@ -13297,30 +13297,30 @@ function qm() {
13297
13297
  "data-biz-mode-container": "",
13298
13298
  children: n ? /* @__PURE__ */ a(Yt, { direction: "horizontal", children: [
13299
13299
  /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
13300
- Ye,
13300
+ $e,
13301
13301
  {
13302
13302
  ref: s,
13303
13303
  defaultSize: 25,
13304
13304
  maxSize: 30,
13305
- children: /* @__PURE__ */ e(Pm, {})
13305
+ children: /* @__PURE__ */ e(zm, {})
13306
13306
  }
13307
13307
  ) }),
13308
13308
  /* @__PURE__ */ e($t, {}),
13309
- /* @__PURE__ */ e(Ye, { defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ a(Yt, { direction: "vertical", children: [
13309
+ /* @__PURE__ */ e($e, { defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ a(Yt, { direction: "vertical", children: [
13310
13310
  /* @__PURE__ */ a(
13311
- Ye,
13311
+ $e,
13312
13312
  {
13313
13313
  className: "flex min-h-fit flex-col",
13314
13314
  minSize: 10,
13315
13315
  defaultSize: 20,
13316
13316
  children: [
13317
- /* @__PURE__ */ e($m, {}),
13318
- /* @__PURE__ */ e(Ym, {})
13317
+ /* @__PURE__ */ e(Ym, {}),
13318
+ /* @__PURE__ */ e(Um, {})
13319
13319
  ]
13320
13320
  }
13321
13321
  ),
13322
13322
  /* @__PURE__ */ e($t, {}),
13323
- /* @__PURE__ */ e(Ye, { minSize: 60, defaultSize: 80, children: /* @__PURE__ */ e(mn, {}) })
13323
+ /* @__PURE__ */ e($e, { minSize: 60, defaultSize: 80, children: /* @__PURE__ */ e(mn, {}) })
13324
13324
  ] }) })
13325
13325
  ] }) : /* @__PURE__ */ e(mn, {})
13326
13326
  }
@@ -13335,7 +13335,7 @@ function qm() {
13335
13335
  }
13336
13336
  );
13337
13337
  }
13338
- function Gm(t) {
13338
+ function qm(t) {
13339
13339
  fr(
13340
13340
  (Y) => Y.currentAIContext
13341
13341
  );
@@ -13415,10 +13415,10 @@ function Gm(t) {
13415
13415
  }), P(!1));
13416
13416
  }, [v, f, ee, P]);
13417
13417
  async function Q({ toolCall: Y }) {
13418
- var ue, ye, K, Z, Ne, Oe, We, ne, Ae, ce, xe, je, ut, ln, on, cn;
13418
+ var ue, ye, K, Z, Ne, Oe, We, ne, Ae, ce, xe, Ue, ut, ln, on, cn;
13419
13419
  if (["createChartFromSql", "createForecast"].includes(Y.toolName)) {
13420
- const za = ((ue = Y.input) == null ? void 0 : ue.sql) ?? ((ye = Y.args) == null ? void 0 : ye.sql), Vt = ((K = Y.input) == null ? void 0 : K.python) ?? ((Z = Y.args) == null ? void 0 : Z.python), Ue = ((Ne = Y.input) == null ? void 0 : Ne.chartType) ?? ((Oe = Y.args) == null ? void 0 : Oe.chartType);
13421
- g(Ue), m(za), u(Vt), h(!0), me({
13420
+ const za = ((ue = Y.input) == null ? void 0 : ue.sql) ?? ((ye = Y.args) == null ? void 0 : ye.sql), Vt = ((K = Y.input) == null ? void 0 : K.python) ?? ((Z = Y.args) == null ? void 0 : Z.python), Ye = ((Ne = Y.input) == null ? void 0 : Ne.chartType) ?? ((Oe = Y.args) == null ? void 0 : Oe.chartType);
13421
+ g(Ye), m(za), u(Vt), h(!0), me({
13422
13422
  tool: Y.toolName,
13423
13423
  toolCallId: Y.toolCallId,
13424
13424
  output: {
@@ -13450,21 +13450,21 @@ function Gm(t) {
13450
13450
  } else if (Y.toolName === "generateQueryConfig") {
13451
13451
  n("Generating query config...");
13452
13452
  const za = ((We = Y.input) == null ? void 0 : We.chartType) ?? ((ne = Y.args) == null ? void 0 : ne.chartType), Vt = ((Ae = Y.input) == null ? void 0 : Ae.queryConfig) ?? ((ce = Y.args) == null ? void 0 : ce.queryConfig);
13453
- ((xe = Y.input) == null ? void 0 : xe.cardConfig) ?? ((je = Y.args) == null || je.cardConfig), g(za), L(Vt), m(void 0), u(void 0);
13454
- const Ue = await T();
13455
- if ((ut = Ue == null ? void 0 : Ue.data) != null && ut.error) {
13453
+ ((xe = Y.input) == null ? void 0 : xe.cardConfig) ?? ((Ue = Y.args) == null || Ue.cardConfig), g(za), L(Vt), m(void 0), u(void 0);
13454
+ const Ye = await T();
13455
+ if ((ut = Ye == null ? void 0 : Ye.data) != null && ut.error) {
13456
13456
  me({
13457
13457
  tool: Y.toolName,
13458
13458
  toolCallId: Y.toolCallId,
13459
13459
  output: {
13460
13460
  status: "error",
13461
13461
  queryConfig: Vt,
13462
- message: (ln = Ue == null ? void 0 : Ue.data) == null ? void 0 : ln.error.message
13462
+ message: (ln = Ye == null ? void 0 : Ye.data) == null ? void 0 : ln.error.message
13463
13463
  }
13464
13464
  });
13465
13465
  return;
13466
13466
  }
13467
- if ((on = Ue == null ? void 0 : Ue.data) != null && on.records) {
13467
+ if ((on = Ye == null ? void 0 : Ye.data) != null && on.records) {
13468
13468
  me({
13469
13469
  tool: Y.toolName,
13470
13470
  toolCallId: Y.toolCallId,
@@ -13483,7 +13483,7 @@ function Gm(t) {
13483
13483
  status: "success",
13484
13484
  queryConfig: Vt,
13485
13485
  message: "The data has been visualized",
13486
- records: (cn = Ue == null ? void 0 : Ue.data) == null ? void 0 : cn.records
13486
+ records: (cn = Ye == null ? void 0 : Ye.data) == null ? void 0 : cn.records
13487
13487
  }
13488
13488
  });
13489
13489
  } else
@@ -13568,7 +13568,7 @@ function Gm(t) {
13568
13568
  clearError: J
13569
13569
  };
13570
13570
  }
13571
- const Wm = [
13571
+ const Gm = [
13572
13572
  {
13573
13573
  title: "Help me write a query for",
13574
13574
  subtitle: "orders by month"
@@ -13591,22 +13591,22 @@ function Mr() {
13591
13591
  llmUsage: I,
13592
13592
  errorMessage: E,
13593
13593
  clearError: F
13594
- } = Gm(), [R, z] = V(""), j = (ce) => {
13594
+ } = qm(), [R, z] = V(""), j = (ce) => {
13595
13595
  z(ce.target.value);
13596
13596
  }, ee = (ce) => {
13597
13597
  ce.preventDefault();
13598
13598
  const xe = R.trim();
13599
13599
  if (!xe && x.length === 0) return;
13600
- const je = [];
13601
- xe && je.push({ type: "text", text: xe }), x.forEach((ut) => {
13602
- ut.data && je.push({
13600
+ const Ue = [];
13601
+ xe && Ue.push({ type: "text", text: xe }), x.forEach((ut) => {
13602
+ ut.data && Ue.push({
13603
13603
  type: "file",
13604
13604
  mediaType: ut.type,
13605
13605
  filename: ut.name,
13606
13606
  // Convert base64 to data URL for the file content
13607
13607
  url: `data:${ut.type};base64,${ut.data}`
13608
13608
  });
13609
- }), P({ role: "user", parts: je }), z(""), g("editor"), oe({ force: !0 });
13609
+ }), P({ role: "user", parts: Ue }), z(""), g("editor"), oe({ force: !0 });
13610
13610
  }, {
13611
13611
  visibleMessages: W,
13612
13612
  hasMoreMessages: me,
@@ -13840,7 +13840,7 @@ function Mr() {
13840
13840
  oc,
13841
13841
  {
13842
13842
  onClick: Ne,
13843
- placeholders: Wm
13843
+ placeholders: Gm
13844
13844
  }
13845
13845
  ),
13846
13846
  /* @__PURE__ */ e("div", { children: Ae && N && /* @__PURE__ */ e(
@@ -14198,7 +14198,7 @@ const er = (t) => {
14198
14198
  cardType: m
14199
14199
  };
14200
14200
  };
14201
- function Km({ field: t }) {
14201
+ function Wm({ field: t }) {
14202
14202
  return /* @__PURE__ */ a("div", { className: "w-64 bg-background p-0", children: [
14203
14203
  /* @__PURE__ */ a("div", { className: "mb-2 flex items-start justify-between gap-2", children: [
14204
14204
  /* @__PURE__ */ e("h3", { className: "text-sm font-medium text-foreground", children: t.label || t.name }),
@@ -14208,7 +14208,7 @@ function Km({ field: t }) {
14208
14208
  /* @__PURE__ */ e("div", { className: "overflow-x-auto border-t border-border pb-2 pt-2", children: /* @__PURE__ */ e("span", { className: "font-mono text-xs text-muted-foreground", children: t.name }) })
14209
14209
  ] });
14210
14210
  }
14211
- function Jm({ field: t }) {
14211
+ function Km({ field: t }) {
14212
14212
  const {
14213
14213
  attributes: s,
14214
14214
  listeners: n,
@@ -14257,8 +14257,8 @@ function Jm({ field: t }) {
14257
14257
  onClick: () => m(t),
14258
14258
  children: [
14259
14259
  x(t.dataType),
14260
- /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a(Be, { children: [
14261
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e(
14260
+ /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(Be, { children: [
14261
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e(
14262
14262
  "span",
14263
14263
  {
14264
14264
  className: `block text-sm text-foreground/80 hover:text-foreground dark:text-muted-foreground ${o ? "whitespace-normal break-words" : "truncate"}`,
@@ -14271,7 +14271,7 @@ function Jm({ field: t }) {
14271
14271
  side: "bottom",
14272
14272
  align: "start",
14273
14273
  className: "ml-5 max-w-xs px-4 pb-2 pt-4",
14274
- children: /* @__PURE__ */ e(Km, { field: t })
14274
+ children: /* @__PURE__ */ e(Wm, { field: t })
14275
14275
  }
14276
14276
  )
14277
14277
  ] }) })
@@ -14304,7 +14304,7 @@ function Jm({ field: t }) {
14304
14304
  /* @__PURE__ */ e("span", { className: "break-all", children: t.label || t.name })
14305
14305
  ] }),
14306
14306
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
14307
- /* @__PURE__ */ e(Ld, { className: "h-4 w-4 text-muted-foreground" }),
14307
+ /* @__PURE__ */ e(Pd, { className: "h-4 w-4 text-muted-foreground" }),
14308
14308
  /* @__PURE__ */ e("span", { className: "break-all", children: t.name })
14309
14309
  ] }),
14310
14310
  /* @__PURE__ */ e(de, { variant: "outline", className: "mt-2 text-xs", children: t.dataType })
@@ -14313,7 +14313,7 @@ function Jm({ field: t }) {
14313
14313
  }
14314
14314
  );
14315
14315
  }
14316
- function Hm() {
14316
+ function Jm() {
14317
14317
  const [t, s] = V(""), [n, r] = V("all"), l = A((D) => D.card.dataSource), {
14318
14318
  columns: i = [],
14319
14319
  columnGroups: c = [],
@@ -14428,7 +14428,7 @@ function Hm() {
14428
14428
  ]
14429
14429
  }
14430
14430
  ) }),
14431
- /* @__PURE__ */ e(we, { className: "pb-2", children: /* @__PURE__ */ e("div", { className: "space-y-1", children: O.fields.map((S) => /* @__PURE__ */ e(Jm, { field: S }, S.id)) }) })
14431
+ /* @__PURE__ */ e(we, { className: "pb-2", children: /* @__PURE__ */ e("div", { className: "space-y-1", children: O.fields.map((S) => /* @__PURE__ */ e(Km, { field: S }, S.id)) }) })
14432
14432
  ]
14433
14433
  },
14434
14434
  D
@@ -14446,14 +14446,14 @@ function Hm() {
14446
14446
  ] })
14447
14447
  ] });
14448
14448
  }
14449
- function Qm() {
14449
+ function Hm() {
14450
14450
  return /* @__PURE__ */ a("div", { className: " h-full flex flex-col items-center", children: [
14451
14451
  " ",
14452
- /* @__PURE__ */ e(Hm, {}),
14452
+ /* @__PURE__ */ e(Jm, {}),
14453
14453
  " "
14454
14454
  ] });
14455
14455
  }
14456
- function Zm({
14456
+ function Qm({
14457
14457
  initialJoinPlan: t,
14458
14458
  availableDataSources: s
14459
14459
  }) {
@@ -14728,7 +14728,7 @@ ${C.joinType} JOIN ${P.name}
14728
14728
  ))
14729
14729
  };
14730
14730
  }
14731
- function Xm({
14731
+ function Zm({
14732
14732
  joinPlan: t,
14733
14733
  availableDataSources: s,
14734
14734
  onSave: n,
@@ -14757,7 +14757,7 @@ function Xm({
14757
14757
  removeJoinKey: N,
14758
14758
  generateSQLPreview: T,
14759
14759
  isValidConfiguration: C
14760
- } = Zm({
14760
+ } = Qm({
14761
14761
  initialJoinPlan: t,
14762
14762
  availableDataSources: s
14763
14763
  }), P = (k) => {
@@ -15339,7 +15339,7 @@ function Ar({
15339
15339
  /* @__PURE__ */ e(Et, { children: "Configure the join between the two entities to combine the fields." })
15340
15340
  ] }),
15341
15341
  /* @__PURE__ */ e(
15342
- Xm,
15342
+ Zm,
15343
15343
  {
15344
15344
  joinPlan: r,
15345
15345
  availableDataSources: l,
@@ -15352,7 +15352,7 @@ function Ar({
15352
15352
  t
15353
15353
  ] });
15354
15354
  }
15355
- function eh({
15355
+ function Xm({
15356
15356
  joins: t,
15357
15357
  baseEntityId: s,
15358
15358
  availableDataSources: n,
@@ -15439,7 +15439,7 @@ function eh({
15439
15439
  ] })
15440
15440
  ] });
15441
15441
  }
15442
- function th() {
15442
+ function eh() {
15443
15443
  var m, h;
15444
15444
  const t = A((g) => g.card), s = A(
15445
15445
  (g) => g.actions.updateCardConfig
@@ -15497,8 +15497,8 @@ ${f.joinType} JOIN ${v.name}
15497
15497
  };
15498
15498
  return i.length < 2 ? null : /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
15499
15499
  n.joins.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
15500
- /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a(Be, { children: [
15501
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ a(
15500
+ /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(Be, { children: [
15501
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ a(
15502
15502
  _,
15503
15503
  {
15504
15504
  variant: "outline",
@@ -15529,7 +15529,7 @@ ${f.joinType} JOIN ${v.name}
15529
15529
  side: "right",
15530
15530
  className: "max-w-md overflow-hidden p-0",
15531
15531
  children: /* @__PURE__ */ e(
15532
- eh,
15532
+ Xm,
15533
15533
  {
15534
15534
  joins: n.joins,
15535
15535
  baseEntityId: n.baseEntity.name,
@@ -15581,7 +15581,7 @@ ${f.joinType} JOIN ${v.name}
15581
15581
  )
15582
15582
  ] }) }) });
15583
15583
  }
15584
- function ah({
15584
+ function th({
15585
15585
  open: t,
15586
15586
  onOpenChange: s
15587
15587
  }) {
@@ -15615,9 +15615,9 @@ function ah({
15615
15615
  case "table":
15616
15616
  return /* @__PURE__ */ e(ns, { className: "h-4 w-4" });
15617
15617
  case "view":
15618
- return /* @__PURE__ */ e(_d, { className: "h-4 w-4" });
15618
+ return /* @__PURE__ */ e(Ld, { className: "h-4 w-4" });
15619
15619
  case "model":
15620
- return /* @__PURE__ */ e(sd, { className: "h-4 w-4" });
15620
+ return /* @__PURE__ */ e(nd, { className: "h-4 w-4" });
15621
15621
  case "dataset":
15622
15622
  return /* @__PURE__ */ e(Ot, { className: "h-4 w-4" });
15623
15623
  case "file":
@@ -15677,7 +15677,7 @@ function ah({
15677
15677
  " selected"
15678
15678
  ] })
15679
15679
  ] }),
15680
- /* @__PURE__ */ e(Qe, {}),
15680
+ /* @__PURE__ */ e(Ze, {}),
15681
15681
  /* @__PURE__ */ e(nt, { className: "h-64", children: /* @__PURE__ */ e("div", { className: "space-y-2", children: c.map((f, v) => /* @__PURE__ */ a(
15682
15682
  "div",
15683
15683
  {
@@ -15721,7 +15721,7 @@ function ah({
15721
15721
  ] }) }) })
15722
15722
  ] }) });
15723
15723
  }
15724
- function nh({
15724
+ function ah({
15725
15725
  entity: t,
15726
15726
  title: s,
15727
15727
  maxDetails: n = 10
@@ -15744,7 +15744,7 @@ function nh({
15744
15744
  ] }, d)) })
15745
15745
  ] }) });
15746
15746
  }
15747
- function sh({
15747
+ function nh({
15748
15748
  entities: t
15749
15749
  }) {
15750
15750
  return /* @__PURE__ */ e(Ge, { side: "top", className: "ml-5 max-w-xs", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
@@ -15787,7 +15787,7 @@ function sh({
15787
15787
  }) })
15788
15788
  ] }) });
15789
15789
  }
15790
- function rh({
15790
+ function sh({
15791
15791
  isVisible: t,
15792
15792
  onToggleVisibility: s
15793
15793
  }) {
@@ -15878,9 +15878,9 @@ function rh({
15878
15878
  {
15879
15879
  className: `overflow-hidden px-6 ${c ? "max-h-96 space-y-4" : "max-h-0 py-0 opacity-0"}`,
15880
15880
  children: [
15881
- h.selectedEntities.length > 0 && /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1", children: [
15881
+ h.selectedEntities.length > 0 && /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1", children: [
15882
15882
  h.selectedEntities.slice(0, 3).map((g, x) => /* @__PURE__ */ a(Be, { children: [
15883
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ a(
15883
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ a(
15884
15884
  de,
15885
15885
  {
15886
15886
  variant: "secondary",
@@ -15908,30 +15908,30 @@ function rh({
15908
15908
  ]
15909
15909
  }
15910
15910
  ) }),
15911
- /* @__PURE__ */ e(nh, { entity: g })
15911
+ /* @__PURE__ */ e(ah, { entity: g })
15912
15912
  ] }, `${g.type}-${g.name}-${x}`)),
15913
15913
  h.selectedEntities.length > 3 && /* @__PURE__ */ a(Be, { children: [
15914
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ a(de, { variant: "outline", className: "text-xs", children: [
15914
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ a(de, { variant: "outline", className: "text-xs", children: [
15915
15915
  "+",
15916
15916
  h.selectedEntities.length - 3,
15917
15917
  " more"
15918
15918
  ] }) }),
15919
15919
  /* @__PURE__ */ e(
15920
- sh,
15920
+ nh,
15921
15921
  {
15922
15922
  entities: h.selectedEntities.slice(3)
15923
15923
  }
15924
15924
  )
15925
15925
  ] })
15926
15926
  ] }) }),
15927
- /* @__PURE__ */ e(th, {})
15927
+ /* @__PURE__ */ e(eh, {})
15928
15928
  ]
15929
15929
  }
15930
15930
  )
15931
15931
  ]
15932
15932
  }
15933
15933
  ),
15934
- /* @__PURE__ */ e(Qm, {}),
15934
+ /* @__PURE__ */ e(Hm, {}),
15935
15935
  /* @__PURE__ */ e(
15936
15936
  Us,
15937
15937
  {
@@ -15944,7 +15944,7 @@ function rh({
15944
15944
  }
15945
15945
  ),
15946
15946
  /* @__PURE__ */ e(
15947
- ah,
15947
+ th,
15948
15948
  {
15949
15949
  open: l,
15950
15950
  onOpenChange: i
@@ -15954,10 +15954,10 @@ function rh({
15954
15954
  }
15955
15955
  );
15956
15956
  }
15957
- const lh = "chart-selector-standard-first";
15958
- function ih() {
15957
+ const rh = "chart-selector-standard-first";
15958
+ function lh() {
15959
15959
  const [t, s] = ks(
15960
- lh,
15960
+ rh,
15961
15961
  !0
15962
15962
  );
15963
15963
  return { standardFirst: t, updatePreference: s };
@@ -15980,7 +15980,7 @@ const Ir = ({
15980
15980
  /* @__PURE__ */ e("span", { children: t.name })
15981
15981
  ] }),
15982
15982
  /* @__PURE__ */ a(Be, { children: [
15983
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ e(
15983
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ e(
15984
15984
  "span",
15985
15985
  {
15986
15986
  tabIndex: 0,
@@ -15999,18 +15999,18 @@ const Ir = ({
15999
15999
  "standardPlugin",
16000
16000
  "customPlugin"
16001
16001
  ];
16002
- function oh({
16002
+ function ih({
16003
16003
  selectedChart: t,
16004
16004
  onChartChange: s
16005
16005
  }) {
16006
16006
  var O;
16007
16007
  const [n, r] = V(!1), { data: l } = Xl();
16008
- ih();
16008
+ lh();
16009
16009
  const c = ((O = A((w) => w.card).customCardPreferences) == null ? void 0 : O.url) || "";
16010
16010
  Gs(c);
16011
16011
  const { setCardType: o, setCardPreferences: d, setIsDevMode: u } = A(
16012
16012
  (w) => w.actions
16013
- ), { setCardCustomCfg: m, setCustomCardPreferences: h, setQueryConfig: g } = ie(), [x, y] = ks("chart-section-active", null), f = $e(() => x ? [
16013
+ ), { setCardCustomCfg: m, setCustomCardPreferences: h, setQueryConfig: g } = ie(), [x, y] = ks("chart-section-active", null), f = qe(() => x ? [
16014
16014
  x,
16015
16015
  ...Er.filter((w) => w !== x)
16016
16016
  ] : Er, [x]);
@@ -16051,7 +16051,7 @@ function oh({
16051
16051
  if (t === "custom") {
16052
16052
  const T = A.getState().card, C = (S = T == null ? void 0 : T.customCardPreferences) == null ? void 0 : S.icon, P = (N = T == null ? void 0 : T.customCardPreferences) == null ? void 0 : N.componentName;
16053
16053
  if (C && P)
16054
- return /* @__PURE__ */ e(ch, { icon: C, componentName: P });
16054
+ return /* @__PURE__ */ e(oh, { icon: C, componentName: P });
16055
16055
  if (P) {
16056
16056
  const k = $s(P);
16057
16057
  if (k)
@@ -16083,7 +16083,7 @@ function oh({
16083
16083
  {
16084
16084
  heading: /* @__PURE__ */ a("div", { className: "group flex w-full items-center justify-between", children: [
16085
16085
  /* @__PURE__ */ a(Be, { children: [
16086
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "flex items-center gap-2", children: "Default Visuals" }) }),
16086
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "flex items-center gap-2", children: "Default Visuals" }) }),
16087
16087
  /* @__PURE__ */ e(Ge, { side: "right", children: "These are the standard visuals available in Semaphor" })
16088
16088
  ] }),
16089
16089
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
@@ -16164,7 +16164,7 @@ function oh({
16164
16164
  {
16165
16165
  heading: /* @__PURE__ */ a("div", { className: "group flex w-full items-center justify-between", children: [
16166
16166
  /* @__PURE__ */ a(Be, { children: [
16167
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
16167
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
16168
16168
  "Custom Visuals",
16169
16169
  /* @__PURE__ */ e(Ka, { className: "h-3.5 w-3.5 text-muted-foreground" })
16170
16170
  ] }) }),
@@ -16202,13 +16202,13 @@ function oh({
16202
16202
  ] }) })
16203
16203
  ] }) });
16204
16204
  }
16205
- const ch = ({
16205
+ const oh = ({
16206
16206
  icon: t,
16207
16207
  componentName: s
16208
16208
  }) => {
16209
16209
  const n = _n(), r = $s(s);
16210
16210
  return n ? /* @__PURE__ */ e(n, { className: "h-4 w-4" }) : r || /* @__PURE__ */ e(qa, { className: "h-4 w-4" });
16211
- }, dh = [
16211
+ }, ch = [
16212
16212
  { id: "table", icon: nn, label: "Table" },
16213
16213
  { id: "bar", icon: Fn, label: "Bar Chart" },
16214
16214
  { id: "line", icon: Rn, label: "Line Chart" },
@@ -16217,18 +16217,18 @@ const ch = ({
16217
16217
  { id: "doughnut", icon: Ps, label: "Donut Chart" },
16218
16218
  { id: "kpi", icon: Fs, label: "KPI" }
16219
16219
  ];
16220
- function uh({
16220
+ function dh({
16221
16221
  selectedChart: t,
16222
16222
  onChartChange: s
16223
16223
  }) {
16224
16224
  var l;
16225
16225
  const n = A((i) => i.card), r = ((l = n == null ? void 0 : n.config) == null ? void 0 : l.pivotByColumns) && n.config.pivotByColumns.length > 0;
16226
- return /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: dh.map((i) => {
16226
+ return /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: ch.map((i) => {
16227
16227
  if (i.requiresPivot && !r)
16228
16228
  return null;
16229
16229
  const c = i.icon, o = t === i.id;
16230
16230
  return /* @__PURE__ */ a(Be, { children: [
16231
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ a(
16231
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ a(
16232
16232
  _,
16233
16233
  {
16234
16234
  variant: "ghost",
@@ -16252,7 +16252,7 @@ const tr = ({ dataType: t }) => {
16252
16252
  const s = Pe(t);
16253
16253
  return s === "string" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ot, { className: "h-3 w-3" }) }) : s === "number" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e(Ft, { className: "h-3 w-3" }) }) : s === "date" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(rt, { className: "h-3 w-3" }) }) : s === "boolean" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(da, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ot, { className: "h-3 w-3" }) });
16254
16254
  };
16255
- function mh({
16255
+ function uh({
16256
16256
  aliasTemplate: t,
16257
16257
  onAliasTemplateChange: s
16258
16258
  }) {
@@ -16312,7 +16312,7 @@ function mh({
16312
16312
  ] })
16313
16313
  ] });
16314
16314
  }
16315
- function hh({
16315
+ function mh({
16316
16316
  valueAliases: t,
16317
16317
  onValueAliasesChange: s
16318
16318
  }) {
@@ -16434,7 +16434,7 @@ function hh({
16434
16434
  ] })
16435
16435
  ] });
16436
16436
  }
16437
- function ph({
16437
+ function hh({
16438
16438
  field: t,
16439
16439
  searchQuery: s = "",
16440
16440
  limit: n = 500
@@ -16519,7 +16519,7 @@ function ph({
16519
16519
  refetch: o.refetch
16520
16520
  };
16521
16521
  }
16522
- function fh({
16522
+ function ph({
16523
16523
  open: t,
16524
16524
  onOpenChange: s,
16525
16525
  availableFields: n,
@@ -16663,7 +16663,7 @@ function fh({
16663
16663
  ] }),
16664
16664
  x.length === 0 && !u && n.length > 0 && /* @__PURE__ */ e("div", { className: "text-center py-4 text-sm text-muted-foreground", children: "All available fields are already filtered" })
16665
16665
  ] }) : /* @__PURE__ */ e(
16666
- gh,
16666
+ fh,
16667
16667
  {
16668
16668
  field: h.field,
16669
16669
  selectedValues: h.selectedValues,
@@ -16688,7 +16688,7 @@ function fh({
16688
16688
  ] })
16689
16689
  ] }) });
16690
16690
  }
16691
- function gh({
16691
+ function fh({
16692
16692
  field: t,
16693
16693
  selectedValues: s,
16694
16694
  onValuesChange: n,
@@ -16698,7 +16698,7 @@ function gh({
16698
16698
  values: c,
16699
16699
  isLoading: o,
16700
16700
  isFetching: d
16701
- } = ph({
16701
+ } = hh({
16702
16702
  field: t,
16703
16703
  searchQuery: l,
16704
16704
  limit: 500
@@ -16766,7 +16766,7 @@ function gh({
16766
16766
  ] })
16767
16767
  ] });
16768
16768
  }
16769
- function xh({
16769
+ function gh({
16770
16770
  field: t,
16771
16771
  zone: s,
16772
16772
  index: n,
@@ -16899,7 +16899,7 @@ function xh({
16899
16899
  { value: "custom", label: "Custom Format..." }
16900
16900
  ];
16901
16901
  }
16902
- }, xe = ce(me), je = s !== "pivotBy", ut = ne && s === "groupBy", ln = !Ae && ne && s === "groupBy", on = Ae && ne && s === "groupBy", cn = Ae && s === "metrics" && ((rr = x.config) == null ? void 0 : rr.comparisonType) === "target", za = s === "metrics", Vt = () => /* @__PURE__ */ e(
16902
+ }, xe = ce(me), Ue = s !== "pivotBy", ut = ne && s === "groupBy", ln = !Ae && ne && s === "groupBy", on = Ae && ne && s === "groupBy", cn = Ae && s === "metrics" && ((rr = x.config) == null ? void 0 : rr.comparisonType) === "target", za = s === "metrics", Vt = () => /* @__PURE__ */ e(
16903
16903
  "div",
16904
16904
  {
16905
16905
  title: `${t.entityName}.${t.name}`,
@@ -16909,7 +16909,7 @@ function xh({
16909
16909
  className: "max-w-[270px] cursor-default overflow-hidden text-ellipsis whitespace-nowrap px-0.5 text-xs text-gray-500",
16910
16910
  children: `${t.entityName}.${t.name}`
16911
16911
  }
16912
- ), Ue = () => je ? /* @__PURE__ */ a("div", { className: "space-y-1", children: [
16912
+ ), Ye = () => Ue ? /* @__PURE__ */ a("div", { className: "space-y-1", children: [
16913
16913
  /* @__PURE__ */ e(B, { className: "text-xs font-medium text-muted-foreground", children: "Label" }),
16914
16914
  /* @__PURE__ */ e(
16915
16915
  It,
@@ -16997,7 +16997,7 @@ function xh({
16997
16997
  /* @__PURE__ */ e("div", { className: "space-y-1", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
16998
16998
  /* @__PURE__ */ e(B, { className: "text-xs font-medium text-muted-foreground", children: "Show Trendline" }),
16999
16999
  /* @__PURE__ */ e(
17000
- Xe,
17000
+ et,
17001
17001
  {
17002
17002
  checked: ((Fe = x.config) == null ? void 0 : Fe.showTrendline) || !1,
17003
17003
  onCheckedChange: S
@@ -17100,8 +17100,8 @@ function xh({
17100
17100
  H.field.label,
17101
17101
  ":"
17102
17102
  ] }),
17103
- /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a(Be, { children: [
17104
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "cursor-help text-muted-foreground", children: Array.isArray(H.value) ? H.value.length === 1 ? String(H.value[0]) : H.value.length <= 2 ? H.value.join(", ") : `${H.value.slice(0, 2).join(", ")} +${H.value.length - 2}` : String(H.value) }) }),
17103
+ /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(Be, { children: [
17104
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "cursor-help text-muted-foreground", children: Array.isArray(H.value) ? H.value.length === 1 ? String(H.value[0]) : H.value.length <= 2 ? H.value.join(", ") : `${H.value.slice(0, 2).join(", ")} +${H.value.length - 2}` : String(H.value) }) }),
17105
17105
  Array.isArray(H.value) && H.value.length > 1 && /* @__PURE__ */ e(
17106
17106
  Ge,
17107
17107
  {
@@ -17177,14 +17177,14 @@ function xh({
17177
17177
  /* @__PURE__ */ e(pi, { column: t }),
17178
17178
  i && /* @__PURE__ */ a(te, { children: [
17179
17179
  /* @__PURE__ */ e(
17180
- mh,
17180
+ uh,
17181
17181
  {
17182
17182
  aliasTemplate: J,
17183
17183
  onAliasTemplateChange: ue
17184
17184
  }
17185
17185
  ),
17186
17186
  /* @__PURE__ */ e(
17187
- hh,
17187
+ mh,
17188
17188
  {
17189
17189
  valueAliases: $,
17190
17190
  onValueAliasesChange: ye
@@ -17214,8 +17214,8 @@ function xh({
17214
17214
  children: xc(t)
17215
17215
  }
17216
17216
  ),
17217
- s === "metrics" && ((lr = U == null ? void 0 : U.conditions) == null ? void 0 : lr.length) && !P && /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a(Be, { children: [
17218
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ a("div", { className: "flex items-center gap-1 rounded bg-primary/10 px-1.5 py-0.5 text-xs", children: [
17217
+ s === "metrics" && ((lr = U == null ? void 0 : U.conditions) == null ? void 0 : lr.length) && !P && /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(Be, { children: [
17218
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ a("div", { className: "flex items-center gap-1 rounded bg-primary/10 px-1.5 py-0.5 text-xs", children: [
17219
17219
  /* @__PURE__ */ e(_a, { className: "h-3 w-3" }),
17220
17220
  /* @__PURE__ */ e("span", { children: U.conditions.length })
17221
17221
  ] }) }),
@@ -17278,7 +17278,7 @@ function xh({
17278
17278
  ] }),
17279
17279
  P && /* @__PURE__ */ a("div", { className: "space-y-3", children: [
17280
17280
  Vt(),
17281
- Ue(),
17281
+ Ye(),
17282
17282
  c === "kpi" && nr(),
17283
17283
  yi(),
17284
17284
  vi(),
@@ -17289,7 +17289,7 @@ function xh({
17289
17289
  }
17290
17290
  ),
17291
17291
  L && /* @__PURE__ */ e(
17292
- fh,
17292
+ ph,
17293
17293
  {
17294
17294
  open: L,
17295
17295
  onOpenChange: (H) => {
@@ -17320,9 +17320,9 @@ function xh({
17320
17320
  )
17321
17321
  ] });
17322
17322
  }
17323
- function yh({ concept: t }) {
17324
- return /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a(Be, { delayDuration: 300, children: [
17325
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ e(yc, { className: "size-4 text-muted-foreground hover:text-foreground" }) }),
17323
+ function xh({ concept: t }) {
17324
+ return /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(Be, { delayDuration: 300, children: [
17325
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ e(yc, { className: "size-4 text-muted-foreground hover:text-foreground" }) }),
17326
17326
  /* @__PURE__ */ e(Ge, { side: "right", align: "start", className: "p-3", children: (() => {
17327
17327
  switch (t) {
17328
17328
  case "groupBy":
@@ -17440,7 +17440,7 @@ function pn({
17440
17440
  children: n
17441
17441
  }
17442
17442
  ),
17443
- x && /* @__PURE__ */ e(yh, { concept: t })
17443
+ x && /* @__PURE__ */ e(xh, { concept: t })
17444
17444
  ] }),
17445
17445
  /* @__PURE__ */ e(
17446
17446
  "div",
@@ -17459,7 +17459,7 @@ function pn({
17459
17459
  {
17460
17460
  className: "flex w-full items-center gap-2",
17461
17461
  children: /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
17462
- xh,
17462
+ gh,
17463
17463
  {
17464
17464
  field: y,
17465
17465
  zone: t,
@@ -17484,7 +17484,7 @@ const Or = [
17484
17484
  { value: "green", color: "#16a34a", label: "Green" },
17485
17485
  { value: "red", color: "#dc2626", label: "Red" },
17486
17486
  { value: "neutral", color: "#6b7280", label: "Neutral" }
17487
- ], vh = [
17487
+ ], yh = [
17488
17488
  "#16a34a",
17489
17489
  // green-600
17490
17490
  "#dc2626",
@@ -17525,7 +17525,7 @@ function Qn({
17525
17525
  }
17526
17526
  ) }),
17527
17527
  /* @__PURE__ */ e(wt, { align: "start", className: "w-auto p-2", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
17528
- /* @__PURE__ */ e("div", { className: "grid grid-cols-3 items-center justify-items-center gap-1", children: vh.map((d) => /* @__PURE__ */ e(
17528
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 items-center justify-items-center gap-1", children: yh.map((d) => /* @__PURE__ */ e(
17529
17529
  "button",
17530
17530
  {
17531
17531
  className: G(
@@ -17602,7 +17602,7 @@ Difference: Primary - Secondary`,
17602
17602
  example: "You've achieved 80% of your sales quota."
17603
17603
  }
17604
17604
  };
17605
- function Nh() {
17605
+ function vh() {
17606
17606
  var o, d, u, m, h, g, x, y, f, v;
17607
17607
  const t = A((p) => p.card), { setCardPreferences: s } = ie(), n = ((o = t.config) == null ? void 0 : o.metricColumns) || [], r = ((d = t.config) == null ? void 0 : d.groupByColumns) || [];
17608
17608
  if (!(t.type === "kpi" && (n.length >= 2 && r.length === 0 || n.length >= 1 && r.length > 0)))
@@ -17623,14 +17623,14 @@ function Nh() {
17623
17623
  };
17624
17624
  return /* @__PURE__ */ a(be, { value: "comparison", className: "border-none", children: [
17625
17625
  /* @__PURE__ */ e(Ce, { className: "flex items-center gap-2 py-2 text-sm hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
17626
- /* @__PURE__ */ e(dd, { className: "h-4 w-4" }),
17626
+ /* @__PURE__ */ e(cd, { className: "h-4 w-4" }),
17627
17627
  /* @__PURE__ */ e("span", { children: "Comparison" })
17628
17628
  ] }) }),
17629
17629
  /* @__PURE__ */ a(we, { className: "space-y-4 pb-4 pt-2", children: [
17630
17630
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
17631
17631
  /* @__PURE__ */ e(B, { htmlFor: "enable-comparison", className: "text-xs", children: "Enable Metric Comparison" }),
17632
17632
  /* @__PURE__ */ e(
17633
- Xe,
17633
+ et,
17634
17634
  {
17635
17635
  id: "enable-comparison",
17636
17636
  checked: i.enabled || !1,
@@ -17933,7 +17933,7 @@ function Nh() {
17933
17933
  ] })
17934
17934
  ] });
17935
17935
  }
17936
- function bh() {
17936
+ function Nh() {
17937
17937
  var l, i;
17938
17938
  const t = A((c) => c.card), { setCardPreferences: s } = ie();
17939
17939
  if (t.type !== "kpi")
@@ -17964,7 +17964,7 @@ function bh() {
17964
17964
  ) })
17965
17965
  ] });
17966
17966
  }
17967
- function Ch({
17967
+ function bh({
17968
17968
  groupByFields: t,
17969
17969
  pivotByFields: s,
17970
17970
  metricsFields: n,
@@ -18000,7 +18000,7 @@ function Ch({
18000
18000
  children: [
18001
18001
  /* @__PURE__ */ a(be, { value: "fields", className: "border-b-0", children: [
18002
18002
  /* @__PURE__ */ e(Ce, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
18003
- /* @__PURE__ */ e(xd, { className: "h-4 w-4 text-muted-foreground" }),
18003
+ /* @__PURE__ */ e(gd, { className: "h-4 w-4 text-muted-foreground" }),
18004
18004
  /* @__PURE__ */ e("span", { children: "FIELDS" })
18005
18005
  ] }) }),
18006
18006
  /* @__PURE__ */ a(we, { className: "space-y-4 pt-2", children: [
@@ -18049,8 +18049,8 @@ function Ch({
18049
18049
  /* @__PURE__ */ e("span", { children: "CONFIGURATION" })
18050
18050
  ] }) }),
18051
18051
  /* @__PURE__ */ e(we, { className: "rounded-md border border-border bg-muted/50 px-3 py-0", children: /* @__PURE__ */ a(tt, { type: "single", collapsible: !0, className: "w-full", children: [
18052
- /* @__PURE__ */ e(bh, {}),
18053
18052
  /* @__PURE__ */ e(Nh, {}),
18053
+ /* @__PURE__ */ e(vh, {}),
18054
18054
  /* @__PURE__ */ e(ci, {}),
18055
18055
  /* @__PURE__ */ e(di, {}),
18056
18056
  /* @__PURE__ */ e(ui, {}),
@@ -18061,7 +18061,7 @@ function Ch({
18061
18061
  }
18062
18062
  );
18063
18063
  }
18064
- function wh({
18064
+ function Ch({
18065
18065
  selectedChart: t,
18066
18066
  onChartChange: s,
18067
18067
  groupByFields: n,
@@ -18079,14 +18079,14 @@ function wh({
18079
18079
  /* @__PURE__ */ a("div", { className: "space-y-4 px-6 pt-4", children: [
18080
18080
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e("h2", { className: "font-semibold", children: "Chart Configuration" }) }),
18081
18081
  /* @__PURE__ */ e(
18082
- oh,
18082
+ ih,
18083
18083
  {
18084
18084
  selectedChart: t,
18085
18085
  onChartChange: s
18086
18086
  }
18087
18087
  ),
18088
18088
  /* @__PURE__ */ e(
18089
- uh,
18089
+ dh,
18090
18090
  {
18091
18091
  selectedChart: t,
18092
18092
  onChartChange: s
@@ -18111,7 +18111,7 @@ function wh({
18111
18111
  ] }),
18112
18112
  /* @__PURE__ */ a(nt, { className: "w-full flex-1 basis-0 px-6 pb-6", children: [
18113
18113
  /* @__PURE__ */ e(
18114
- Ch,
18114
+ bh,
18115
18115
  {
18116
18116
  groupByFields: n,
18117
18117
  pivotByFields: r,
@@ -18125,7 +18125,7 @@ function wh({
18125
18125
  }
18126
18126
  );
18127
18127
  }
18128
- function Sh({
18128
+ function wh({
18129
18129
  initialFilters: t,
18130
18130
  availableFields: s
18131
18131
  } = {}) {
@@ -18351,13 +18351,13 @@ function Sh({
18351
18351
  hasAnyFilters: O
18352
18352
  };
18353
18353
  }
18354
- function kh({
18354
+ function Sh({
18355
18355
  children: t,
18356
18356
  className: s,
18357
18357
  delayDuration: n
18358
18358
  }) {
18359
- return /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a(Be, { delayDuration: n, children: [
18360
- /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ e(
18359
+ return /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(Be, { delayDuration: n, children: [
18360
+ /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ e(
18361
18361
  "div",
18362
18362
  {
18363
18363
  className: G(
@@ -18370,7 +18370,7 @@ function kh({
18370
18370
  /* @__PURE__ */ e(Nc, { children: t })
18371
18371
  ] }) });
18372
18372
  }
18373
- const Dh = (t) => {
18373
+ const kh = (t) => {
18374
18374
  switch (t) {
18375
18375
  case "table":
18376
18376
  return /* @__PURE__ */ e(ns, { className: "h-3 w-3" });
@@ -18383,14 +18383,14 @@ const Dh = (t) => {
18383
18383
  default:
18384
18384
  return /* @__PURE__ */ e(ns, { className: "h-3 w-3" });
18385
18385
  }
18386
- }, Th = (t) => {
18386
+ }, Dh = (t) => {
18387
18387
  if (t.qualifiedEntityName) {
18388
18388
  const s = t.qualifiedEntityName.split(".");
18389
18389
  return s.length > 1 ? s[0] : "default";
18390
18390
  }
18391
18391
  return "default";
18392
18392
  };
18393
- function Mh({
18393
+ function Th({
18394
18394
  value: t,
18395
18395
  onValueChange: s,
18396
18396
  availableFields: n,
@@ -18400,7 +18400,7 @@ function Mh({
18400
18400
  const [i, c] = it.useState(!1), o = it.useMemo(() => {
18401
18401
  const d = {};
18402
18402
  return n.forEach((u) => {
18403
- const m = Th(u);
18403
+ const m = Dh(u);
18404
18404
  d[m] || (d[m] = {}), d[m][u.entityId] || (d[m][u.entityId] = []), d[m][u.entityId].push(u);
18405
18405
  }), d;
18406
18406
  }, [n]);
@@ -18417,7 +18417,7 @@ function Mh({
18417
18417
  l
18418
18418
  ),
18419
18419
  children: [
18420
- t ? /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ a(kh, { children: [
18420
+ t ? /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ a(Sh, { children: [
18421
18421
  t.entityName,
18422
18422
  ".",
18423
18423
  t.name
@@ -18438,7 +18438,7 @@ function Mh({
18438
18438
  ] }),
18439
18439
  children: Object.entries(u).map(([m, h]) => /* @__PURE__ */ a("div", { children: [
18440
18440
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2 bg-gray-50/50 px-2 py-1 text-xs font-medium text-gray-600", children: [
18441
- Dh(h[0].entityType),
18441
+ kh(h[0].entityType),
18442
18442
  /* @__PURE__ */ e("span", { children: h[0].entityName })
18443
18443
  ] }),
18444
18444
  h.map((g, x) => /* @__PURE__ */ a(
@@ -18531,7 +18531,7 @@ function ar(t) {
18531
18531
  })
18532
18532
  ), isPending: h, error: g };
18533
18533
  }
18534
- function Ah({
18534
+ function Mh({
18535
18535
  field: t,
18536
18536
  selected: s,
18537
18537
  onChange: n,
@@ -18610,7 +18610,7 @@ function Ah({
18610
18610
  ] }) })
18611
18611
  ] }) });
18612
18612
  }
18613
- function Ih({
18613
+ function Ah({
18614
18614
  field: t,
18615
18615
  value: s,
18616
18616
  onChange: n,
@@ -18634,14 +18634,14 @@ function Ih({
18634
18634
  )) })
18635
18635
  ] });
18636
18636
  }
18637
- function Eh({
18637
+ function Ih({
18638
18638
  value: t,
18639
18639
  operator: s,
18640
18640
  onChange: n,
18641
18641
  className: r
18642
18642
  }) {
18643
18643
  var d;
18644
- const { tokenProps: l } = at(), i = (d = l == null ? void 0 : l.params) == null ? void 0 : d.timeZone, c = $e(() => {
18644
+ const { tokenProps: l } = at(), i = (d = l == null ? void 0 : l.params) == null ? void 0 : d.timeZone, c = qe(() => {
18645
18645
  if (t) {
18646
18646
  if (s === "between" || s === "not between") {
18647
18647
  if (Array.isArray(t) && t.length === 2) {
@@ -18700,7 +18700,7 @@ function Eh({
18700
18700
  }
18701
18701
  );
18702
18702
  }
18703
- const Oh = [
18703
+ const Eh = [
18704
18704
  "=",
18705
18705
  "!=",
18706
18706
  ">",
@@ -18714,7 +18714,7 @@ const Oh = [
18714
18714
  "not in",
18715
18715
  "isNull",
18716
18716
  "isNotNull"
18717
- ], Rh = [
18717
+ ], Oh = [
18718
18718
  "=",
18719
18719
  "!=",
18720
18720
  "contains",
@@ -18724,7 +18724,7 @@ const Oh = [
18724
18724
  "not in",
18725
18725
  "isNull",
18726
18726
  "isNotNull"
18727
- ], Fh = [
18727
+ ], Rh = [
18728
18728
  "=",
18729
18729
  "!=",
18730
18730
  ">",
@@ -18735,12 +18735,12 @@ const Oh = [
18735
18735
  "not in",
18736
18736
  "isNull",
18737
18737
  "isNotNull"
18738
- ], zh = ["=", "!=", "isNull", "isNotNull"], Ph = [
18738
+ ], Fh = ["=", "!=", "isNull", "isNotNull"], zh = [
18739
18739
  "between",
18740
18740
  // Default operator for dates
18741
18741
  "isNull",
18742
18742
  "isNotNull"
18743
- ], Lh = {
18743
+ ], Ph = {
18744
18744
  "=": "Equals",
18745
18745
  "!=": "Not Equals",
18746
18746
  ">": "Greater Than",
@@ -18757,20 +18757,20 @@ const Oh = [
18757
18757
  isNotNull: "Is Not Null"
18758
18758
  };
18759
18759
  function Rr(t) {
18760
- return Lh[t] || He(t);
18760
+ return Ph[t] || Qe(t);
18761
18761
  }
18762
- function _h(t) {
18762
+ function Lh(t) {
18763
18763
  switch (t) {
18764
18764
  case "string":
18765
- return Rh;
18765
+ return Oh;
18766
18766
  case "number":
18767
- return Fh;
18767
+ return Rh;
18768
18768
  case "boolean":
18769
- return zh;
18769
+ return Fh;
18770
18770
  case "date":
18771
- return Ph;
18771
+ return zh;
18772
18772
  default:
18773
- return Oh;
18773
+ return Eh;
18774
18774
  }
18775
18775
  }
18776
18776
  function gi({
@@ -18829,7 +18829,7 @@ function gi({
18829
18829
  ),
18830
18830
  s === 0 && /* @__PURE__ */ e("div", { className: "w-24" }),
18831
18831
  /* @__PURE__ */ e(
18832
- Mh,
18832
+ Th,
18833
18833
  {
18834
18834
  value: t.field,
18835
18835
  onValueChange: (b) => {
@@ -18864,7 +18864,7 @@ function gi({
18864
18864
  },
18865
18865
  children: [
18866
18866
  /* @__PURE__ */ e(pe, { className: "w-32", children: /* @__PURE__ */ e(fe, { children: t.operator ? Rr(t.operator) : "" }) }),
18867
- /* @__PURE__ */ e(ge, { children: _h(Pe(t.field.dataType)).map(
18867
+ /* @__PURE__ */ e(ge, { children: Lh(Pe(t.field.dataType)).map(
18868
18868
  (b) => /* @__PURE__ */ e(X, { className: "hover:bg-muted", value: b, children: Rr(b) }, b)
18869
18869
  ) })
18870
18870
  ]
@@ -18874,7 +18874,7 @@ function gi({
18874
18874
  /* @__PURE__ */ e(Ve, { className: "mr-2 size-3.5 animate-spin" }),
18875
18875
  " Loading values..."
18876
18876
  ] }) : v ? /* @__PURE__ */ e("div", { className: "flex-1 p-2 text-xs text-red-500", children: "Error loading values" }) : /* @__PURE__ */ e(
18877
- Ah,
18877
+ Mh,
18878
18878
  {
18879
18879
  field: t.field,
18880
18880
  selected: Array.isArray(t.value) && t.value.every((b) => typeof b == "string") ? t.value : [],
@@ -18897,7 +18897,7 @@ function gi({
18897
18897
  placeholder: t.operator.charAt(0).toUpperCase() + t.operator.slice(1) + "..."
18898
18898
  }
18899
18899
  ) : /* @__PURE__ */ e(
18900
- Ih,
18900
+ Ah,
18901
18901
  {
18902
18902
  field: t.field,
18903
18903
  value: typeof t.value == "string" ? t.value : "",
@@ -18926,7 +18926,7 @@ function gi({
18926
18926
  // - Handles different operators (=, !=, >, <, between, in, etc.)
18927
18927
  // - Supports timezone-aware date selection
18928
18928
  /* @__PURE__ */ e(
18929
- Eh,
18929
+ Ih,
18930
18930
  {
18931
18931
  value: t.value,
18932
18932
  operator: t.operator,
@@ -18957,7 +18957,7 @@ function gi({
18957
18957
  }
18958
18958
  );
18959
18959
  }
18960
- function Vh({
18960
+ function _h({
18961
18961
  group: t,
18962
18962
  depth: s,
18963
18963
  parentGroupId: n,
@@ -19150,7 +19150,7 @@ function Vh({
19150
19150
  }
19151
19151
  );
19152
19152
  }
19153
- function Bh({
19153
+ function Vh({
19154
19154
  filters: t,
19155
19155
  availableFields: s,
19156
19156
  onSave: n,
@@ -19174,7 +19174,7 @@ function Bh({
19174
19174
  generateSQLPreview: b,
19175
19175
  hasAnyFilters: D,
19176
19176
  setCurrentFilters: O
19177
- } = Sh({
19177
+ } = wh({
19178
19178
  initialFilters: t,
19179
19179
  availableFields: s
19180
19180
  }), w = Va(
@@ -19294,7 +19294,7 @@ function Bh({
19294
19294
  )
19295
19295
  ] })
19296
19296
  ] }) }, k.id) : /* @__PURE__ */ e(
19297
- Vh,
19297
+ _h,
19298
19298
  {
19299
19299
  group: k,
19300
19300
  depth: L,
@@ -19358,7 +19358,7 @@ function Bh({
19358
19358
  ] })
19359
19359
  ] });
19360
19360
  }
19361
- function jh({
19361
+ function Bh({
19362
19362
  cardId: t,
19363
19363
  filters: s,
19364
19364
  onFiltersChange: n,
@@ -19382,7 +19382,7 @@ function jh({
19382
19382
  /* @__PURE__ */ e(Et, { children: "Add filters to the card to limit the data that is displayed." })
19383
19383
  ] }),
19384
19384
  /* @__PURE__ */ e(
19385
- Bh,
19385
+ Vh,
19386
19386
  {
19387
19387
  filters: s,
19388
19388
  availableFields: l,
@@ -19400,7 +19400,7 @@ function jh({
19400
19400
  )
19401
19401
  ] });
19402
19402
  }
19403
- function Uh({
19403
+ function jh({
19404
19404
  activeCardId: t,
19405
19405
  sourceFields: s,
19406
19406
  getFieldsForContainer: n,
@@ -19560,7 +19560,7 @@ function Uh({
19560
19560
  handleDragEnd: h
19561
19561
  };
19562
19562
  }
19563
- function Yh({
19563
+ function Uh({
19564
19564
  dashboardFilterCount: t = 0,
19565
19565
  cardFilterCount: s = 0,
19566
19566
  clickFilterCount: n = 0,
@@ -19584,8 +19584,8 @@ function Yh({
19584
19584
  children: h
19585
19585
  }
19586
19586
  );
19587
- return o ? /* @__PURE__ */ e(et, { children: /* @__PURE__ */ a(Be, { delayDuration: 200, children: [
19588
- /* @__PURE__ */ e(qe, { asChild: !0, children: g }),
19587
+ return o ? /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(Be, { delayDuration: 200, children: [
19588
+ /* @__PURE__ */ e(je, { asChild: !0, children: g }),
19589
19589
  /* @__PURE__ */ e(
19590
19590
  Ge,
19591
19591
  {
@@ -19622,7 +19622,7 @@ function Yh({
19622
19622
  )
19623
19623
  ] }) }) : g;
19624
19624
  }
19625
- function $h({
19625
+ function Yh({
19626
19626
  onAdvancedToggle: t,
19627
19627
  onDebugToggle: s,
19628
19628
  onAccept: n
@@ -19631,7 +19631,7 @@ function $h({
19631
19631
  r == null || r.role;
19632
19632
  const [l, i] = V(!1), c = A((p) => p.isDevMode), o = A((p) => p.card), d = A((p) => p.card.dataSource);
19633
19633
  As(o);
19634
- const { config: u } = Yc(kc).tokenProps, m = (u == null ? void 0 : u.showAdvancedMode) !== !1, { setIsDevMode: h } = ie(), g = A((p) => p.showAIDialog), x = A((p) => p.frame), y = jt((p) => p.selectedVisual), f = (y == null ? void 0 : y.id) === (x == null ? void 0 : x.id), { setShowAIDialog: v } = ie();
19634
+ const { config: u } = Uc(kc).tokenProps, m = (u == null ? void 0 : u.showAdvancedMode) !== !1, { setIsDevMode: h } = ie(), g = A((p) => p.showAIDialog), x = A((p) => p.frame), y = jt((p) => p.selectedVisual), f = (y == null ? void 0 : y.id) === (x == null ? void 0 : x.id), { setShowAIDialog: v } = ie();
19635
19635
  return /* @__PURE__ */ a(
19636
19636
  "div",
19637
19637
  {
@@ -19643,7 +19643,7 @@ function $h({
19643
19643
  children: [
19644
19644
  m && t && !g && /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
19645
19645
  /* @__PURE__ */ e(
19646
- Xe,
19646
+ et,
19647
19647
  {
19648
19648
  className: G("", {
19649
19649
  // 'border-[0.5px] border-green-500/50': isExplorer,
@@ -19658,7 +19658,7 @@ function $h({
19658
19658
  /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
19659
19659
  /* @__PURE__ */ e(Hs, {}),
19660
19660
  n && !f && /* @__PURE__ */ e(Js, { variant: "default" }),
19661
- f && /* @__PURE__ */ e(Ru, {}),
19661
+ f && /* @__PURE__ */ e(Ou, {}),
19662
19662
  s && ts
19663
19663
  ] }),
19664
19664
  l && /* @__PURE__ */ e(
@@ -19676,7 +19676,7 @@ function $h({
19676
19676
  }
19677
19677
  );
19678
19678
  }
19679
- function qh({ activeView: t, onViewChange: s }) {
19679
+ function $h({ activeView: t, onViewChange: s }) {
19680
19680
  const n = A((l) => l.card), { errorMessage: r } = _e(n);
19681
19681
  return /* @__PURE__ */ e(
19682
19682
  Lt,
@@ -19715,7 +19715,7 @@ function qh({ activeView: t, onViewChange: s }) {
19715
19715
  }
19716
19716
  );
19717
19717
  }
19718
- const Gh = [
19718
+ const qh = [
19719
19719
  { value: "10", label: "Top 10" },
19720
19720
  { value: "20", label: "Top 20" },
19721
19721
  { value: "50", label: "Top 50" },
@@ -19725,7 +19725,7 @@ const Gh = [
19725
19725
  { value: "1000", label: "Top 1000" }
19726
19726
  // { value: 'custom', label: 'Custom' },
19727
19727
  ];
19728
- function Wh() {
19728
+ function Gh() {
19729
19729
  var d, u;
19730
19730
  const t = A((m) => m.card), { updateRowLimit: s } = ie(), [n, r] = V(!1), [l, i] = V(""), c = (m) => {
19731
19731
  if (m === "custom") {
@@ -19754,12 +19754,12 @@ function Wh() {
19754
19754
  onValueChange: c,
19755
19755
  children: [
19756
19756
  /* @__PURE__ */ e(pe, { className: "h-8 w-24 border-none px-1 [&>svg]:hidden", children: /* @__PURE__ */ e(fe, { placeholder: "Select limit" }) }),
19757
- /* @__PURE__ */ e(ge, { children: Gh.map((m) => /* @__PURE__ */ e(X, { value: m.value, children: m.label }, m.value)) })
19757
+ /* @__PURE__ */ e(ge, { children: qh.map((m) => /* @__PURE__ */ e(X, { value: m.value, children: m.label }, m.value)) })
19758
19758
  ]
19759
19759
  }
19760
19760
  ) });
19761
19761
  }
19762
- function Kh({
19762
+ function Wh({
19763
19763
  isOpen: t,
19764
19764
  onClose: s
19765
19765
  }) {
@@ -19780,7 +19780,7 @@ function Kh({
19780
19780
  var h;
19781
19781
  return ((h = m.card.customCardPreferences) == null ? void 0 : h.settings) || {};
19782
19782
  }
19783
- ), { data: o } = _e(l), { getCard: d } = Ms(r), u = $e(() => !r || r.trim() === "" ? null : d("Chart Settings"), [d, r]);
19783
+ ), { data: o } = _e(l), { getCard: d } = Ms(r), u = qe(() => !r || r.trim() === "" ? null : d("Chart Settings"), [d, r]);
19784
19784
  return /* @__PURE__ */ e(
19785
19785
  "div",
19786
19786
  {
@@ -19818,7 +19818,7 @@ function Kh({
19818
19818
  }
19819
19819
  );
19820
19820
  }
19821
- function Jh() {
19821
+ function Kh() {
19822
19822
  const { authToken: t, tokenProps: s } = at(), { currentUser: n } = Pt(), r = Dc({
19823
19823
  mutationFn: async (l) => {
19824
19824
  if (!(t != null && t.accessToken))
@@ -19859,7 +19859,7 @@ function Jh() {
19859
19859
  reset: r.reset
19860
19860
  };
19861
19861
  }
19862
- function Hh(t, s, n) {
19862
+ function Jh(t, s, n) {
19863
19863
  return {
19864
19864
  category: t,
19865
19865
  userMessage: n,
@@ -19872,13 +19872,13 @@ function Hh(t, s, n) {
19872
19872
  }
19873
19873
  };
19874
19874
  }
19875
- function Qh({
19875
+ function Hh({
19876
19876
  open: t,
19877
19877
  onOpenChange: s,
19878
19878
  feedbackData: n
19879
19879
  }) {
19880
19880
  var f, v, p, b, D, O;
19881
- const [r, l] = V(""), [i, c] = V(!1), { sendFeedback: o, isLoading: d, isSuccess: u, data: m, reset: h } = Jh(), g = () => {
19881
+ const [r, l] = V(""), [i, c] = V(!1), { sendFeedback: o, isLoading: d, isSuccess: u, data: m, reset: h } = Kh(), g = () => {
19882
19882
  const w = {
19883
19883
  ...n,
19884
19884
  userMessage: r.trim() || void 0
@@ -19966,7 +19966,7 @@ function Qh({
19966
19966
  ] })
19967
19967
  ] }),
19968
19968
  u && /* @__PURE__ */ a("div", { className: "flex flex-col items-center space-y-4 py-6", children: [
19969
- /* @__PURE__ */ e(Xc, { className: "h-12 w-12 text-green-600" }),
19969
+ /* @__PURE__ */ e(Zc, { className: "h-12 w-12 text-green-600" }),
19970
19970
  /* @__PURE__ */ a("div", { className: "text-center", children: [
19971
19971
  /* @__PURE__ */ e("p", { className: "text-lg font-medium", children: "Thank you for your feedback!" }),
19972
19972
  /* @__PURE__ */ a("p", { className: "mt-2 text-sm text-muted-foreground", children: [
@@ -19981,7 +19981,7 @@ function Qh({
19981
19981
  ] }) });
19982
19982
  }
19983
19983
  var xi = /* @__PURE__ */ ((t) => (t.QUERY_GENERATION = "query-generation", t))(xi || {});
19984
- function Zh({
19984
+ function Qh({
19985
19985
  // selectedChart,
19986
19986
  activeView: t,
19987
19987
  onViewChange: s,
@@ -20082,7 +20082,7 @@ function Zh({
20082
20082
  ...U,
20083
20083
  sortByColumns: q
20084
20084
  });
20085
- }, Q = $e(() => {
20085
+ }, Q = qe(() => {
20086
20086
  var ae, U;
20087
20087
  return (U = (ae = x.config) == null ? void 0 : ae.sortByColumns) == null ? void 0 : U.map((q) => ({
20088
20088
  id: q.label,
@@ -20091,7 +20091,7 @@ function Zh({
20091
20091
  }, [($ = x.config) == null ? void 0 : $.sortByColumns]);
20092
20092
  return /* @__PURE__ */ a("div", { className: "relative flex w-0 grow flex-col", children: [
20093
20093
  /* @__PURE__ */ e(
20094
- $h,
20094
+ Yh,
20095
20095
  {
20096
20096
  showDebug: n,
20097
20097
  onDebugToggle: r,
@@ -20107,9 +20107,9 @@ function Zh({
20107
20107
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2 px-6", children: [
20108
20108
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2", children: [
20109
20109
  t === "chart" && N && /* @__PURE__ */ e(ti, { variant: "outline" }),
20110
- /* @__PURE__ */ e(qh, { activeView: t, onViewChange: s }),
20110
+ /* @__PURE__ */ e($h, { activeView: t, onViewChange: s }),
20111
20111
  o && /* @__PURE__ */ e(
20112
- Yh,
20112
+ Uh,
20113
20113
  {
20114
20114
  dashboardFilterCount: f,
20115
20115
  cardFilterCount: d,
@@ -20117,7 +20117,7 @@ function Zh({
20117
20117
  className: "h-8"
20118
20118
  }
20119
20119
  ),
20120
- /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(Wh, {}) }),
20120
+ /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(Gh, {}) }),
20121
20121
  N && /* @__PURE__ */ e(Ln, {})
20122
20122
  ] }),
20123
20123
  /* @__PURE__ */ e("div", { className: G("flex grow items-center justify-end"), children: t === "chart" && /* @__PURE__ */ e(ai, {}) })
@@ -20188,7 +20188,7 @@ function Zh({
20188
20188
  error: R,
20189
20189
  errorSql: ee,
20190
20190
  onSendFeedback: () => {
20191
- const ae = Hh(
20191
+ const ae = Jh(
20192
20192
  xi.QUERY_GENERATION,
20193
20193
  {
20194
20194
  cardConfig: x.config,
@@ -20219,14 +20219,14 @@ function Zh({
20219
20219
  ] }) })
20220
20220
  ] }),
20221
20221
  /* @__PURE__ */ e(
20222
- Kh,
20222
+ Wh,
20223
20223
  {
20224
20224
  isOpen: T,
20225
20225
  onClose: () => C(!1)
20226
20226
  }
20227
20227
  ),
20228
20228
  L && /* @__PURE__ */ e(
20229
- Qh,
20229
+ Hh,
20230
20230
  {
20231
20231
  open: P,
20232
20232
  onOpenChange: k,
@@ -20236,7 +20236,7 @@ function Zh({
20236
20236
  ] })
20237
20237
  ] });
20238
20238
  }
20239
- function Xh({ activeField: t }) {
20239
+ function Zh({ activeField: t }) {
20240
20240
  const [s, n] = V(!0);
20241
20241
  return Me(() => {
20242
20242
  t && n(!0);
@@ -20252,7 +20252,7 @@ function Xh({ activeField: t }) {
20252
20252
  }
20253
20253
  ) : null;
20254
20254
  }
20255
- const ep = () => {
20255
+ const Xh = () => {
20256
20256
  const t = console.error;
20257
20257
  console.error = (...r) => {
20258
20258
  r.length > 0 && typeof r[0] == "string" && r[0].includes(
@@ -20279,12 +20279,12 @@ const ep = () => {
20279
20279
  );
20280
20280
  };
20281
20281
  };
20282
- function tp() {
20282
+ function ep() {
20283
20283
  var le, J;
20284
20284
  const [t, s] = V(
20285
20285
  "chart"
20286
20286
  ), [n, r] = V(!1), [l, i] = V(!1), [c, o] = V(!0), d = A((Q) => Q.showAIDialog), u = se((Q) => Q.isVisualEditing), { setCardType: m } = ie(), h = A((Q) => Q.card.type);
20287
- Me(() => ep(), []);
20287
+ Me(() => Xh(), []);
20288
20288
  const g = () => {
20289
20289
  console.log("Accept clicked - would save/apply current configuration");
20290
20290
  }, x = () => {
@@ -20312,7 +20312,7 @@ function tp() {
20312
20312
  ), L = b, {
20313
20313
  getFieldsForContainer: M,
20314
20314
  setFieldsForContainer: I
20315
- } = er(L), { activeField: E, handleDragStart: F, handleDragEnd: R } = Uh({
20315
+ } = er(L), { activeField: E, handleDragStart: F, handleDragEnd: R } = jh({
20316
20316
  activeCardId: p.activeCardId,
20317
20317
  sourceFields: T,
20318
20318
  getFieldsForContainer: M,
@@ -20344,7 +20344,7 @@ function tp() {
20344
20344
  children: [
20345
20345
  /* @__PURE__ */ a("div", { className: "flex h-full grow", children: [
20346
20346
  /* @__PURE__ */ e(
20347
- rh,
20347
+ sh,
20348
20348
  {
20349
20349
  isVisible: c,
20350
20350
  onToggleVisibility: () => o(!c)
@@ -20352,7 +20352,7 @@ function tp() {
20352
20352
  ),
20353
20353
  /* @__PURE__ */ a("div", { className: "flex flex-1 transition-all duration-300 ease-in-out", children: [
20354
20354
  !d && /* @__PURE__ */ e(
20355
- wh,
20355
+ Ch,
20356
20356
  {
20357
20357
  selectedChart: h,
20358
20358
  onChartChange: v,
@@ -20363,7 +20363,7 @@ function tp() {
20363
20363
  }
20364
20364
  ),
20365
20365
  /* @__PURE__ */ e(
20366
- Zh,
20366
+ Qh,
20367
20367
  {
20368
20368
  selectedChart: h,
20369
20369
  activeView: t,
@@ -20401,7 +20401,7 @@ function tp() {
20401
20401
  ) })
20402
20402
  ] }),
20403
20403
  L && /* @__PURE__ */ e(
20404
- jh,
20404
+ Bh,
20405
20405
  {
20406
20406
  cardId: L.id,
20407
20407
  filters: ((J = L.config) == null ? void 0 : J.filters) || null,
@@ -20412,19 +20412,19 @@ function tp() {
20412
20412
  onOpenChange: i
20413
20413
  }
20414
20414
  ),
20415
- /* @__PURE__ */ e(sl, { dropAnimation: null, children: /* @__PURE__ */ e(Xh, { activeField: E || null }) })
20415
+ /* @__PURE__ */ e(sl, { dropAnimation: null, children: /* @__PURE__ */ e(Zh, { activeField: E || null }) })
20416
20416
  ]
20417
20417
  }
20418
20418
  );
20419
20419
  }
20420
- function ap({ authToken: t, onSave: s, onClose: n }) {
20420
+ function tp({ authToken: t, onSave: s, onClose: n }) {
20421
20421
  const r = Rt(null), l = A((b) => b.showAIDialog), i = A((b) => b.isDevMode), { setAuthToken: c } = Ct(), { setShowAIDialog: o, setOnSave: d, setOnClose: u } = ie(), {
20422
20422
  handleDragOver: m,
20423
20423
  handleDragEnd: h,
20424
20424
  handleDragStart: g,
20425
20425
  handleDragCancel: x,
20426
20426
  sensors: y
20427
- } = Du();
20427
+ } = ku();
20428
20428
  Me(() => {
20429
20429
  s && d(s), n && u(n);
20430
20430
  }, [s, d, n, u]), Me(() => {
@@ -20446,10 +20446,10 @@ function ap({ authToken: t, onSave: s, onClose: n }) {
20446
20446
  className: "grow",
20447
20447
  direction: "horizontal",
20448
20448
  children: [
20449
- /* @__PURE__ */ e(Ye, { className: "min-w-[510px] rounded-none", children: /* @__PURE__ */ e(qm, {}) }),
20449
+ /* @__PURE__ */ e($e, { className: "min-w-[510px] rounded-none", children: /* @__PURE__ */ e($m, {}) }),
20450
20450
  /* @__PURE__ */ e($t, {}),
20451
20451
  /* @__PURE__ */ e(
20452
- Ye,
20452
+ $e,
20453
20453
  {
20454
20454
  "data-role": "editor-assistant-panel",
20455
20455
  ref: r,
@@ -20471,10 +20471,10 @@ function ap({ authToken: t, onSave: s, onClose: n }) {
20471
20471
  className: "flex grow",
20472
20472
  direction: "horizontal",
20473
20473
  children: [
20474
- /* @__PURE__ */ e(Ye, { className: "min-w-[510px] grow rounded-none", children: /* @__PURE__ */ e(tp, {}) }),
20474
+ /* @__PURE__ */ e($e, { className: "min-w-[510px] grow rounded-none", children: /* @__PURE__ */ e(ep, {}) }),
20475
20475
  /* @__PURE__ */ e($t, {}),
20476
20476
  /* @__PURE__ */ e(
20477
- Ye,
20477
+ $e,
20478
20478
  {
20479
20479
  "data-role": "editor-assistant-panel",
20480
20480
  ref: r,
@@ -20506,7 +20506,7 @@ function ap({ authToken: t, onSave: s, onClose: n }) {
20506
20506
  }
20507
20507
  ) : p() });
20508
20508
  }
20509
- function np() {
20509
+ function ap() {
20510
20510
  se((c) => c.selectedCardId);
20511
20511
  const t = se((c) => c.selectedSheetId), { setIsVisualEditing: s } = se((c) => c.actions), n = se((c) => c.isVisualEditing), r = se((c) => c.actions.updateFrame);
20512
20512
  function l(c) {
@@ -20522,17 +20522,17 @@ function np() {
20522
20522
  className: G("flex-1 grow basis-0 overflow-auto", {
20523
20523
  "max-h-0 overflow-hidden": !n
20524
20524
  }),
20525
- children: /* @__PURE__ */ e(ap, { onSave: l, onClose: i })
20525
+ children: /* @__PURE__ */ e(tp, { onSave: l, onClose: i })
20526
20526
  }
20527
20527
  );
20528
20528
  }
20529
- function sp({ column: t }) {
20530
- return /* @__PURE__ */ a(Be, { children: [
20531
- /* @__PURE__ */ e(Ec, { className: "shrink-0", asChild: !0, children: Mt(t.data_type) ? /* @__PURE__ */ e(Oc, { className: "size-3 text-muted-foreground" }) : Ht(t.data_type) ? /* @__PURE__ */ e(Ft, { className: "size-3 text-muted-foreground" }) : At(t.data_type) ? /* @__PURE__ */ e(rt, { className: "size-3 text-muted-foreground" }) : Rc(t.data_type) ? /* @__PURE__ */ e(da, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(Zc, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(Fc, { className: "size-3 text-muted-foreground" }) }),
20529
+ function np({ column: t }) {
20530
+ return /* @__PURE__ */ e(He, { children: /* @__PURE__ */ a(Be, { children: [
20531
+ /* @__PURE__ */ e(je, { className: "shrink-0", asChild: !0, children: Mt(t.data_type) ? /* @__PURE__ */ e(Ec, { className: "size-3 text-muted-foreground" }) : Ht(t.data_type) ? /* @__PURE__ */ e(Ft, { className: "size-3 text-muted-foreground" }) : At(t.data_type) ? /* @__PURE__ */ e(rt, { className: "size-3 text-muted-foreground" }) : Oc(t.data_type) ? /* @__PURE__ */ e(da, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(Qc, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(Rc, { className: "size-3 text-muted-foreground" }) }),
20532
20532
  /* @__PURE__ */ e(Ge, { children: /* @__PURE__ */ e("p", { className: "text-xs", children: t.data_type }) })
20533
- ] });
20533
+ ] }) });
20534
20534
  }
20535
- function rp() {
20535
+ function sp() {
20536
20536
  const t = A((i) => i.selectedDatabaseName), s = A((i) => i.selectedTableName), n = se((i) => i.dashboard.filters) || [], { columns: r } = Tt(), { assignFilter: l } = Qs();
20537
20537
  return /* @__PURE__ */ e(nt, { className: "flex-1 basis-0 flex-col px-3", children: r == null ? void 0 : r.map((i) => {
20538
20538
  const c = n == null ? void 0 : n.find(
@@ -20549,7 +20549,7 @@ function rp() {
20549
20549
  }
20550
20550
  ),
20551
20551
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
20552
- /* @__PURE__ */ e(sp, { column: i }),
20552
+ /* @__PURE__ */ e(np, { column: i }),
20553
20553
  /* @__PURE__ */ e("span", { children: i.column_name })
20554
20554
  ] })
20555
20555
  },
@@ -20557,11 +20557,11 @@ function rp() {
20557
20557
  );
20558
20558
  }) });
20559
20559
  }
20560
- function lp({ dataType: t }) {
20560
+ function rp({ dataType: t }) {
20561
20561
  const s = Pe(t);
20562
20562
  return s === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ot, { className: "h-3 w-3" }) }) : s === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e(Ft, { className: "h-3 w-3" }) }) : s === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(rt, { className: "h-3 w-3" }) }) : s === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(da, { className: "h-3 w-3" }) }) : s === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(wa, { className: "h-3 w-3" }) }) : s === "geo" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e($a, { className: "h-3 w-3" }) }) : s === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(rn, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ot, { className: "h-3 w-3" }) });
20563
20563
  }
20564
- function ip() {
20564
+ function lp() {
20565
20565
  const [t, s] = V(""), [n, r] = V("all"), l = se((p) => p.dashboard.filters) || [], { assignFilter: i } = Qs(), c = A((p) => p.card.dataSource), {
20566
20566
  columns: o = [],
20567
20567
  isLoading: d,
@@ -20673,7 +20673,7 @@ function ip() {
20673
20673
  }
20674
20674
  ),
20675
20675
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
20676
- /* @__PURE__ */ e(lp, { dataType: p.dataType }),
20676
+ /* @__PURE__ */ e(rp, { dataType: p.dataType }),
20677
20677
  /* @__PURE__ */ e("span", { children: p.label || p.name })
20678
20678
  ] })
20679
20679
  },
@@ -20683,11 +20683,11 @@ function ip() {
20683
20683
  ] })
20684
20684
  ] });
20685
20685
  }
20686
- function op() {
20686
+ function ip() {
20687
20687
  var r;
20688
20688
  const t = se(
20689
20689
  (l) => l.actions.setShowFilters
20690
- ), s = zc(), n = s && ((r = s.dataSource) == null ? void 0 : r.selectedEntities) && s.dataSource.selectedEntities.length > 0;
20690
+ ), s = Fc(), n = s && ((r = s.dataSource) == null ? void 0 : r.selectedEntities) && s.dataSource.selectedEntities.length > 0;
20691
20691
  return /* @__PURE__ */ a("section", { className: "relative flex min-w-[320px] grow flex-col border-l px-1", children: [
20692
20692
  /* @__PURE__ */ a("div", { className: "mt-4 flex items-center justify-between gap-2 px-3", children: [
20693
20693
  /* @__PURE__ */ e(B, { className: "px-2 text-lg", children: "Filters" }),
@@ -20703,20 +20703,20 @@ function op() {
20703
20703
  ] }),
20704
20704
  /* @__PURE__ */ e("div", { className: "flex grow", children: n ? (
20705
20705
  // Show all fields from the data source
20706
- /* @__PURE__ */ e(ip, {})
20706
+ /* @__PURE__ */ e(lp, {})
20707
20707
  ) : (
20708
20708
  // Show legacy filter columns with editor aside
20709
20709
  /* @__PURE__ */ e(
20710
20710
  Gl,
20711
20711
  {
20712
20712
  type: "filter",
20713
- ColumnsComponent: () => /* @__PURE__ */ e(rp, {})
20713
+ ColumnsComponent: () => /* @__PURE__ */ e(sp, {})
20714
20714
  }
20715
20715
  )
20716
20716
  ) })
20717
20717
  ] });
20718
20718
  }
20719
- function cp() {
20719
+ function op() {
20720
20720
  const t = se((r) => r.dashboard.filters), s = se((r) => r.theme), n = t == null ? void 0 : t.filter((r) => r.hide);
20721
20721
  return n != null && n.length ? /* @__PURE__ */ e(
20722
20722
  "div",
@@ -20739,7 +20739,7 @@ function cp() {
20739
20739
  }
20740
20740
  ) : null;
20741
20741
  }
20742
- function dp() {
20742
+ function cp() {
20743
20743
  const t = se((r) => r.showFilters), s = se((r) => r.isVisualEditing), n = se(
20744
20744
  (r) => r.isDashboardEditing
20745
20745
  );
@@ -20755,15 +20755,15 @@ function dp() {
20755
20755
  }),
20756
20756
  children: [
20757
20757
  /* @__PURE__ */ a("section", { className: "flex grow flex-col", children: [
20758
- n && /* @__PURE__ */ e(cp, {}),
20759
- /* @__PURE__ */ e(Pc, {})
20758
+ n && /* @__PURE__ */ e(op, {}),
20759
+ /* @__PURE__ */ e(zc, {})
20760
20760
  ] }),
20761
- t && /* @__PURE__ */ e("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e(op, {}) })
20761
+ t && /* @__PURE__ */ e("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e(ip, {}) })
20762
20762
  ]
20763
20763
  }
20764
20764
  );
20765
20765
  }
20766
- function up() {
20766
+ function dp() {
20767
20767
  const t = se((l) => l.dashboard), s = se((l) => l.actions.setDashboard), n = se(
20768
20768
  (l) => l.showDashboardJSON
20769
20769
  ), r = se(
@@ -20790,7 +20790,7 @@ function up() {
20790
20790
  }
20791
20791
  ),
20792
20792
  /* @__PURE__ */ e(
20793
- Lc,
20793
+ Pc,
20794
20794
  {
20795
20795
  onChange: (l) => {
20796
20796
  if (l)
@@ -20822,7 +20822,7 @@ function up() {
20822
20822
  }
20823
20823
  );
20824
20824
  }
20825
- function gp({
20825
+ function fp({
20826
20826
  showControls: t = !1,
20827
20827
  showFooter: s = !0,
20828
20828
  ...n
@@ -20830,25 +20830,25 @@ function gp({
20830
20830
  if (typeof window > "u")
20831
20831
  return null;
20832
20832
  const { preferences: r } = n;
20833
- return /* @__PURE__ */ e(sn, { FallbackComponent: kl, children: /* @__PURE__ */ a(_c, { dashboardProps: n, children: [
20834
- /* @__PURE__ */ e(Vc, {}),
20835
- /* @__PURE__ */ e(Bc, { children: /* @__PURE__ */ a(jc, { preferences: r, children: [
20836
- /* @__PURE__ */ e(up, {}),
20833
+ return /* @__PURE__ */ e(sn, { FallbackComponent: kl, children: /* @__PURE__ */ a(Lc, { dashboardProps: n, children: [
20834
+ /* @__PURE__ */ e(_c, {}),
20835
+ /* @__PURE__ */ e(Vc, { children: /* @__PURE__ */ a(Bc, { preferences: r, children: [
20836
+ /* @__PURE__ */ e(dp, {}),
20837
20837
  /* @__PURE__ */ a("main", { className: "relative flex h-full w-full flex-col", children: [
20838
- t && /* @__PURE__ */ e(Nu, {}),
20839
- /* @__PURE__ */ a(Uc, { ...n, type: "dashboard", children: [
20840
- /* @__PURE__ */ e(np, {}),
20841
- /* @__PURE__ */ e(dp, {})
20838
+ t && /* @__PURE__ */ e(vu, {}),
20839
+ /* @__PURE__ */ a(jc, { ...n, type: "dashboard", children: [
20840
+ /* @__PURE__ */ e(ap, {}),
20841
+ /* @__PURE__ */ e(cp, {})
20842
20842
  ] })
20843
20843
  ] })
20844
20844
  ] }) })
20845
20845
  ] }) });
20846
20846
  }
20847
20847
  export {
20848
- gp as D,
20849
- vu as R,
20850
- Wd as S,
20848
+ fp as D,
20849
+ yu as R,
20850
+ Gd as S,
20851
20851
  Pa as a,
20852
- Bd as c,
20852
+ Vd as c,
20853
20853
  os as g
20854
20854
  };