react-semaphor 0.0.439 → 0.0.441

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.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { c as A, p as nn, u as _, a as rt, b as Ve, d as Rn, e as jn, B as ee, P as mt, f as Bn, g as Pn, h as Hn, i as Gn, L as U, I as he, j as Un, k as $n, l as Qn, m as X, n as Kn, o as Jn, q as Wn, r as ks, s as In, t as G, C as an, v as Ms, S as ke, w as Me, x as De, y as Ie, z as Fe, A as Oe, E as ue, T as Yn, F as Ke, G as Je, H as It, J as ze, K as sn, M as Ot, N as rn, O as Tt, Q as Le, R as Zn, U as zt, V as Xn, W as Ae, X as On, Y as Re, Z as f, _ as ea, $ as tt, a0 as bt, a1 as Ds, a2 as ta, a3 as na, a4 as aa, a5 as sa, a6 as ra, a7 as ia, a8 as la, a9 as oa, aa as ca, ab as da, ac as ua, ad as ma, ae as xe, af as Is, ag as Se, ah as $e, ai as we, aj as Os, ak as Ts, al as zs, am as vt, an as Ee, ao as As, ap as xt, aq as Fs, ar as W, as as Ls, at as Es, au as _s, av as Jt, aw as ha, ax as At, ay as nt, az as pa, aA as Ct, aB as ge, aC as Vs, aD as qs, aE as it, aF as Rs, aG as js, aH as Bs, aI as fa, aJ as Ps, aK as Ft, aL as Hs, aM as Gs, aN as Us, aO as Tn, aP as $s, aQ as Qs, aR as ln, aS as Ce, aT as Ks, aU as Wt, aV as je, aW as pe, aX as Be, aY as Js, aZ as Ws, a_ as Ys, a$ as Zs, b0 as Xs, b1 as Rt, b2 as er, b3 as zn, b4 as tr, b5 as An, b6 as nr, b7 as ar, b8 as sr, b9 as rr, ba as ga, bb as ir, bc as on, bd as ya, be as lr, bf as or, bg as Xe, bh as cr, bi as dr, bj as ba, bk as ur, bl as mr, bm as hr, bn as pr, bo as fr, bp as Lt, bq as va, br as gr, bs as cn, bt as dn, bu as et, bv as yt, bw as yr, bx as br, by as vr, bz as un, bA as xa, bB as Ca, bC as Nt, bD as xr, bE as St, bF as Na, bG as Sa, bH as wa, bI as Cr, bJ as Nr, bK as Sr, bL as wr, bM as qe, bN as le, bO as oe, bP as ce, bQ as mn, bR as kr, bS as Mr, bT as Dr, bU as Ir, bV as Fn, bW as ka, bX as Or, bY as Tr, bZ as zr, b_ as Ar, b$ as hn, c0 as Ma, c1 as Da, c2 as pn, c3 as Fr, c4 as Ia, c5 as Oa, c6 as Lr, c7 as Er, c8 as _r, c9 as Vr, ca as qr, cb as Rr, cc as jr, cd as Br, ce as Pr, cf as jt, cg as Ta, ch as Hr, ci as Gr, cj as Ur, ck as $r, cl as Qr, cm as Kr, cn as Jr } from "./chunks/index-BbpuKZcd.js";
2
- import { D as Go, cs as Uo, cq as $o, cq as Qo, cv as Ko, cu as Jo, ct as Wo, cw as Yo, cx as Zo, cr as Xo, co as ec, cp as tc } from "./chunks/index-BbpuKZcd.js";
1
+ import { c as A, p as nn, u as _, a as rt, b as Ve, d as jn, e as Bn, B as ee, P as mt, f as Pn, g as Hn, h as Gn, i as Un, L as U, I as he, j as $n, k as Qn, l as Kn, m as X, n as Jn, o as Wn, q as Yn, r as ks, s as On, t as G, C as an, v as Ms, S as ke, w as Me, x as De, y as Ie, z as Fe, A as Oe, E as ue, T as Zn, F as Je, G as We, H as It, J as ze, K as sn, M as Ot, N as rn, O as Tt, Q as Le, R as Xn, U as zt, V as ea, W as Ae, X as Tn, Y as Re, Z as f, _ as ta, $ as nt, a0 as bt, a1 as Ds, a2 as na, a3 as aa, a4 as sa, a5 as ra, a6 as ia, a7 as la, a8 as oa, a9 as ca, aa as da, ab as ua, ac as ma, ad as ha, ae as xe, af as Is, ag as Se, ah as $e, ai as we, aj as Os, ak as Ts, al as zs, am as vt, an as Ee, ao as As, ap as xt, aq as Fs, ar as W, as as Ls, at as Es, au as _s, av as Jt, aw as pa, ax as ln, ay as At, az as Qe, aA as fa, aB as Ct, aC as ge, aD as Vs, aE as qs, aF as it, aG as Rs, aH as js, aI as Bs, aJ as ga, aK as Ps, aL as Ft, aM as Hs, aN as Gs, aO as Us, aP as zn, aQ as $s, aR as Qs, aS as on, aT as Ce, aU as Ks, aV as Wt, aW as je, aX as pe, aY as Be, aZ as Js, a_ as Ws, a$ as Ys, b0 as Zs, b1 as Xs, b2 as Rt, b3 as er, b4 as An, b5 as tr, b6 as Fn, b7 as nr, b8 as ar, b9 as sr, ba as rr, bb as ya, bc as ir, bd as cn, be as ba, bf as lr, bg as or, bh as et, bi as cr, bj as dr, bk as va, bl as ur, bm as mr, bn as hr, bo as pr, bp as fr, bq as Lt, br as xa, bs as gr, bt as dn, bu as un, bv as tt, bw as yt, bx as yr, by as br, bz as vr, bA as mn, bB as Ca, bC as Na, bD as Nt, bE as xr, bF as St, bG as Sa, bH as wa, bI as ka, bJ as Cr, bK as Nr, bL as Sr, bM as wr, bN as qe, bO as le, bP as oe, bQ as ce, bR as hn, bS as kr, bT as Mr, bU as Dr, bV as Ir, bW as Ln, bX as Ma, bY as Or, bZ as Tr, b_ as zr, b$ as Ar, c0 as pn, c1 as Da, c2 as Ia, c3 as fn, c4 as Fr, c5 as Oa, c6 as Lr, c7 as Er, c8 as _r, c9 as Vr, ca as qr, cb as Rr, cc as jr, cd as Br, ce as Pr, cf as jt, cg as Ta, ch as Hr, ci as Gr, cj as Ur, ck as $r, cl as Qr, cm as Kr, cn as Jr } from "./chunks/index-CVGp1HR6.js";
2
+ import { D as Go, cs as Uo, cq as $o, cq as Qo, cv as Ko, cu as Jo, ct as Wo, cw as Yo, cx as Zo, cr as Xo, co as ec, cp as tc } from "./chunks/index-CVGp1HR6.js";
3
3
  import { jsxs as r, jsx as e, Fragment as ae } from "react/jsx-runtime";
4
- import * as Ze from "react";
4
+ import * as Xe from "react";
5
5
  import _e, { useState as J, useMemo as Pe, useEffect as me, useRef as at, useCallback as za, Suspense as Wr } from "react";
6
6
  import "react-dom";
7
7
  /**
@@ -243,7 +243,7 @@ const mi = A("ChartArea", [
243
243
  * This source code is licensed under the ISC license.
244
244
  * See the LICENSE file in the root directory of this source tree.
245
245
  */
246
- const fn = A("ChartColumnIncreasing", [
246
+ const gn = A("ChartColumnIncreasing", [
247
247
  ["path", { d: "M13 17V9", key: "1fwyjl" }],
248
248
  ["path", { d: "M18 17V5", key: "sfb6ij" }],
249
249
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
@@ -268,7 +268,7 @@ const Fa = A("ChartColumnStacked", [
268
268
  * This source code is licensed under the ISC license.
269
269
  * See the LICENSE file in the root directory of this source tree.
270
270
  */
271
- const gn = A("ChartLine", [
271
+ const yn = A("ChartLine", [
272
272
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
273
273
  ["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
274
274
  ]);
@@ -680,7 +680,7 @@ const Ai = A("ListX", [
680
680
  * This source code is licensed under the ISC license.
681
681
  * See the LICENSE file in the root directory of this source tree.
682
682
  */
683
- const Qe = A("LoaderCircle", [
683
+ const Ke = A("LoaderCircle", [
684
684
  ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
685
685
  ]);
686
686
  /**
@@ -918,7 +918,7 @@ const Gi = A("Square", [
918
918
  * This source code is licensed under the ISC license.
919
919
  * See the LICENSE file in the root directory of this source tree.
920
920
  */
921
- const yn = A("Table2", [
921
+ const bn = A("Table2", [
922
922
  [
923
923
  "path",
924
924
  {
@@ -1088,8 +1088,8 @@ function Zi() {
1088
1088
  );
1089
1089
  v && (o([...i || [], v]), l(v.id), d(!1)), c(!1);
1090
1090
  }
1091
- return /* @__PURE__ */ r(Rn, { open: h, onOpenChange: d, children: [
1092
- /* @__PURE__ */ e(jn, { asChild: !0, children: /* @__PURE__ */ r(
1091
+ return /* @__PURE__ */ r(jn, { open: h, onOpenChange: d, children: [
1092
+ /* @__PURE__ */ e(Bn, { asChild: !0, children: /* @__PURE__ */ r(
1093
1093
  ee,
1094
1094
  {
1095
1095
  variant: "secondary",
@@ -1101,10 +1101,10 @@ function Zi() {
1101
1101
  ]
1102
1102
  }
1103
1103
  ) }),
1104
- /* @__PURE__ */ r(Bn, { className: "sm:max-w-[425px]", children: [
1105
- /* @__PURE__ */ r(Pn, { children: [
1106
- /* @__PURE__ */ e(Hn, { children: "Create Lens" }),
1107
- /* @__PURE__ */ e(Gn, { children: "Lenses are private by default and are only visible to you." })
1104
+ /* @__PURE__ */ r(Pn, { className: "sm:max-w-[425px]", children: [
1105
+ /* @__PURE__ */ r(Hn, { children: [
1106
+ /* @__PURE__ */ e(Gn, { children: "Create Lens" }),
1107
+ /* @__PURE__ */ e(Un, { children: "Lenses are private by default and are only visible to you." })
1108
1108
  ] }),
1109
1109
  /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ r("div", { className: "grid grid-cols-8 items-center gap-4", children: [
1110
1110
  /* @__PURE__ */ e(U, { className: "text-right", children: "Name" }),
@@ -1121,7 +1121,7 @@ function Zi() {
1121
1121
  )
1122
1122
  ] }) }),
1123
1123
  n && /* @__PURE__ */ e("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
1124
- /* @__PURE__ */ e(Un, { children: /* @__PURE__ */ e(
1124
+ /* @__PURE__ */ e($n, { children: /* @__PURE__ */ e(
1125
1125
  ee,
1126
1126
  {
1127
1127
  size: "sm",
@@ -1169,20 +1169,20 @@ function Xi() {
1169
1169
  await Yt(C, l == null ? void 0 : l.accessToken);
1170
1170
  }
1171
1171
  }
1172
- return /* @__PURE__ */ r($n, { open: t, onOpenChange: a, children: [
1173
- /* @__PURE__ */ e(Qn, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(ki, { className: "h-4 w-4" }) }) }),
1174
- /* @__PURE__ */ r(Kn, { align: "end", className: "w-60", children: [
1175
- /* @__PURE__ */ e(Jn, { className: "px-3", children: "Lenses" }),
1176
- /* @__PURE__ */ e(Wn, {}),
1172
+ return /* @__PURE__ */ r(Qn, { open: t, onOpenChange: a, children: [
1173
+ /* @__PURE__ */ e(Kn, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(ki, { className: "h-4 w-4" }) }) }),
1174
+ /* @__PURE__ */ r(Jn, { align: "end", className: "w-60", children: [
1175
+ /* @__PURE__ */ e(Wn, { className: "px-3", children: "Lenses" }),
1176
+ /* @__PURE__ */ e(Yn, {}),
1177
1177
  /* @__PURE__ */ r(
1178
1178
  ks,
1179
1179
  {
1180
1180
  value: s,
1181
1181
  onValueChange: u,
1182
1182
  children: [
1183
- /* @__PURE__ */ e(In, { value: "original", children: "Original" }),
1183
+ /* @__PURE__ */ e(On, { value: "original", children: "Original" }),
1184
1184
  n == null ? void 0 : n.map((d) => /* @__PURE__ */ r(
1185
- In,
1185
+ On,
1186
1186
  {
1187
1187
  className: "group flex justify-between gap-2",
1188
1188
  value: d.id,
@@ -1273,7 +1273,7 @@ function tl({
1273
1273
  tooltip: "Download PDF",
1274
1274
  className: "h-7 p-2",
1275
1275
  onClick: s,
1276
- children: n ? /* @__PURE__ */ e(Qe, { className: G("size-3.5 animate-spin", t) }) : /* @__PURE__ */ e(Ms, { className: G("size-4", t) })
1276
+ children: n ? /* @__PURE__ */ e(Ke, { className: G("size-3.5 animate-spin", t) }) : /* @__PURE__ */ e(Ms, { className: G("size-4", t) })
1277
1277
  }
1278
1278
  );
1279
1279
  }
@@ -1312,7 +1312,7 @@ function ye({
1312
1312
  }
1313
1313
  );
1314
1314
  }
1315
- const Ln = [
1315
+ const En = [
1316
1316
  { value: "daily", label: "Daily" },
1317
1317
  { value: "weekly", label: "Weekly" },
1318
1318
  { value: "biweekly", label: "Bi-Weekly" },
@@ -1328,9 +1328,9 @@ function nl({
1328
1328
  status: i,
1329
1329
  error: o,
1330
1330
  isDeleting: l
1331
- } = al(), [u, c] = J(""), [h, d] = J(Ln[0].value), [y, x] = J("06:00"), [m, C] = J("");
1332
- return /* @__PURE__ */ e(Yn, { delayDuration: 0, children: /* @__PURE__ */ r(Ke, { children: [
1333
- /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
1331
+ } = al(), [u, c] = J(""), [h, d] = J(En[0].value), [y, x] = J("06:00"), [m, C] = J("");
1332
+ return /* @__PURE__ */ e(Zn, { delayDuration: 0, children: /* @__PURE__ */ r(Je, { children: [
1333
+ /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(
1334
1334
  X,
1335
1335
  {
1336
1336
  tooltip: "Schedule Dashboard",
@@ -1378,7 +1378,7 @@ function nl({
1378
1378
  {
1379
1379
  className: "col-span-2 h-8",
1380
1380
  label: "Select Frequency",
1381
- options: Ln,
1381
+ options: En,
1382
1382
  value: h,
1383
1383
  onValueChange: (p) => d(p)
1384
1384
  }
@@ -1411,7 +1411,7 @@ function nl({
1411
1411
  className: "h-8 p-2",
1412
1412
  disabled: i === "loading" || !u,
1413
1413
  children: [
1414
- i === "loading" && /* @__PURE__ */ e(Qe, { className: "mr-2 size-4 animate-spin" }),
1414
+ i === "loading" && /* @__PURE__ */ e(Ke, { className: "mr-2 size-4 animate-spin" }),
1415
1415
  i === "success" && /* @__PURE__ */ e(sn, { className: "mr-2 size-4" }),
1416
1416
  i === "error" && /* @__PURE__ */ r(Ot, { children: [
1417
1417
  /* @__PURE__ */ e(rn, { children: /* @__PURE__ */ e(Va, { className: "mr-2 size-4 text-destructive" }) }),
@@ -1428,7 +1428,7 @@ function nl({
1428
1428
  /* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Subscriptions" }),
1429
1429
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Active email subscriptions" })
1430
1430
  ] }),
1431
- Zn
1431
+ Xn
1432
1432
  ] }) }),
1433
1433
  /* @__PURE__ */ e("div", { className: "grid gap-2", children: a == null ? void 0 : a.map((p) => /* @__PURE__ */ r(
1434
1434
  "div",
@@ -1444,14 +1444,14 @@ function nl({
1444
1444
  ] }) }),
1445
1445
  /* @__PURE__ */ r("div", { className: "col-span-2 flex items-center justify-end gap-4", children: [
1446
1446
  /* @__PURE__ */ e(
1447
- En,
1447
+ _n,
1448
1448
  {
1449
1449
  tooltip: `Next Run: ${new Date(p.nextRun).toLocaleString()} ${p.timezone}`,
1450
1450
  children: /* @__PURE__ */ e(hi, { className: "size-3.5" })
1451
1451
  }
1452
1452
  ),
1453
- /* @__PURE__ */ e(En, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(Li, { className: "size-3.5" }) }),
1454
- l === p.id ? /* @__PURE__ */ e(Qe, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ e(
1453
+ /* @__PURE__ */ e(_n, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(Li, { className: "size-3.5" }) }),
1454
+ l === p.id ? /* @__PURE__ */ e(Ke, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ e(
1455
1455
  Qi,
1456
1456
  {
1457
1457
  onClick: () => s(p.id),
@@ -1468,15 +1468,15 @@ function nl({
1468
1468
  ] }) })
1469
1469
  ] }) });
1470
1470
  }
1471
- const En = ({
1471
+ const _n = ({
1472
1472
  children: t,
1473
1473
  tooltip: a
1474
- }) => /* @__PURE__ */ e(Yn, { delayDuration: 0, children: /* @__PURE__ */ r(Ot, { children: [
1474
+ }) => /* @__PURE__ */ e(Zn, { delayDuration: 0, children: /* @__PURE__ */ r(Ot, { children: [
1475
1475
  /* @__PURE__ */ e(rn, { asChild: !0, children: t }),
1476
1476
  /* @__PURE__ */ e(Tt, { children: a })
1477
1477
  ] }) });
1478
1478
  function al() {
1479
- const [t, a] = J("idle"), [n, s] = J(""), [i, o] = J(null), l = _((S) => S.authToken), u = _((S) => S.dashboard.id), c = _((S) => S.dashboard.title), { endUserId: h } = Xn((l == null ? void 0 : l.accessToken) || ""), d = "https://semaphor.cloud/api/v1/subscriptions/get", y = {
1479
+ const [t, a] = J("idle"), [n, s] = J(""), [i, o] = J(null), l = _((S) => S.authToken), u = _((S) => S.dashboard.id), c = _((S) => S.dashboard.title), { endUserId: h } = ea((l == null ? void 0 : l.accessToken) || ""), d = "https://semaphor.cloud/api/v1/subscriptions/get", y = {
1480
1480
  dashboardId: u,
1481
1481
  endUserId: h
1482
1482
  }, { data: x, isLoading: m, isError: C, isFetching: p, refetch: v } = Ae({
@@ -1504,7 +1504,7 @@ function al() {
1504
1504
  a("loading");
1505
1505
  const V = "https://semaphor.cloud/api/v1/subscriptions/create";
1506
1506
  try {
1507
- const Z = await On(
1507
+ const Z = await Tn(
1508
1508
  V,
1509
1509
  (R == null ? void 0 : R.accessToken) || "",
1510
1510
  {
@@ -1522,7 +1522,7 @@ function al() {
1522
1522
  const z = "https://semaphor.cloud/api/v1/subscriptions/delete";
1523
1523
  o(S);
1524
1524
  try {
1525
- await On(z, (l == null ? void 0 : l.accessToken) || "", { id: S }), v(), setTimeout(() => {
1525
+ await Tn(z, (l == null ? void 0 : l.accessToken) || "", { id: S }), v(), setTimeout(() => {
1526
1526
  o(null);
1527
1527
  }, 2e3);
1528
1528
  } catch (k) {
@@ -1560,13 +1560,13 @@ function sl() {
1560
1560
  ), { addFrame: C, setSelectedFrameId: p } = _(
1561
1561
  (M) => M.actions
1562
1562
  ), { getSelectedSheet: v, setIsDashboardEditing: g, setShowDashboardJSON: N } = _((M) => M.actions), S = v(), { tenantId: z, endUserId: k } = Pe(
1563
- () => Xn(t == null ? void 0 : t.accessToken),
1563
+ () => ea(t == null ? void 0 : t.accessToken),
1564
1564
  [t == null ? void 0 : t.accessToken]
1565
1565
  ), O = Pe(() => z || k, [z, k]), R = () => {
1566
1566
  if (!o || !S) return;
1567
1567
  const M = {
1568
1568
  connectionId: l,
1569
- id: tt(),
1569
+ id: nt(),
1570
1570
  title: "Title",
1571
1571
  description: "Description",
1572
1572
  preferences: {
@@ -1581,7 +1581,7 @@ function sl() {
1581
1581
  sql: "",
1582
1582
  data: []
1583
1583
  }, V = {
1584
- id: tt(),
1584
+ id: nt(),
1585
1585
  cards: [M],
1586
1586
  activeCardId: M.id
1587
1587
  };
@@ -1634,7 +1634,7 @@ function sl() {
1634
1634
  className: "h-7 p-2",
1635
1635
  onClick: j,
1636
1636
  size: "sm",
1637
- children: /* @__PURE__ */ e(ea, { className: "h-4 w-4" })
1637
+ children: /* @__PURE__ */ e(ta, { className: "h-4 w-4" })
1638
1638
  }
1639
1639
  ),
1640
1640
  o && !d && /* @__PURE__ */ e(
@@ -1687,8 +1687,8 @@ function rl({
1687
1687
  icon: c,
1688
1688
  showNone: h = !1
1689
1689
  }) {
1690
- const d = Ze.useRef(null), [y, x] = Ze.useState(!1), [m, C] = Ze.useState("100%"), p = h ? [...a || [], { id: "none", name: "None" }] : a;
1691
- Ze.useLayoutEffect(() => {
1690
+ const d = Xe.useRef(null), [y, x] = Xe.useState(!1), [m, C] = Xe.useState("100%"), p = h ? [...a || [], { id: "none", name: "None" }] : a;
1691
+ Xe.useLayoutEffect(() => {
1692
1692
  d.current && C(d.current.offsetWidth);
1693
1693
  }, []);
1694
1694
  function v() {
@@ -1698,8 +1698,8 @@ function rl({
1698
1698
  function g(N, S) {
1699
1699
  s(S), x(!1);
1700
1700
  }
1701
- return /* @__PURE__ */ r(Ke, { open: y, onOpenChange: x, children: [
1702
- /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ r(
1701
+ return /* @__PURE__ */ r(Je, { open: y, onOpenChange: x, children: [
1702
+ /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ r(
1703
1703
  ee,
1704
1704
  {
1705
1705
  ref: d,
@@ -1721,9 +1721,9 @@ function rl({
1721
1721
  {
1722
1722
  className: "w-full p-0",
1723
1723
  style: { minWidth: m },
1724
- children: /* @__PURE__ */ r(ta, { children: [
1724
+ children: /* @__PURE__ */ r(na, { children: [
1725
1725
  /* @__PURE__ */ r("div", { className: "flex h-9 items-center justify-between border-b pr-1", children: [
1726
- /* @__PURE__ */ e(na, { className: "h-9", placeholder: "Search..." }),
1726
+ /* @__PURE__ */ e(aa, { className: "h-9", placeholder: "Search..." }),
1727
1727
  /* @__PURE__ */ e(X, { className: "h-7", onClick: l, children: /* @__PURE__ */ e(
1728
1728
  Ua,
1729
1729
  {
@@ -1734,14 +1734,14 @@ function rl({
1734
1734
  }
1735
1735
  ) })
1736
1736
  ] }),
1737
- /* @__PURE__ */ r(aa, { children: [
1738
- /* @__PURE__ */ r(sa, { children: [
1737
+ /* @__PURE__ */ r(sa, { children: [
1738
+ /* @__PURE__ */ r(ra, { children: [
1739
1739
  "No ",
1740
1740
  t == null ? void 0 : t.toLowerCase(),
1741
1741
  " found."
1742
1742
  ] }),
1743
- /* @__PURE__ */ e(ra, { children: p == null ? void 0 : p.map((N) => /* @__PURE__ */ e(
1744
- ia,
1743
+ /* @__PURE__ */ e(ia, { children: p == null ? void 0 : p.map((N) => /* @__PURE__ */ e(
1744
+ la,
1745
1745
  {
1746
1746
  className: "overflow-x-auto",
1747
1747
  value: N.name,
@@ -1790,7 +1790,7 @@ function ct({
1790
1790
  if (t === "Schema")
1791
1791
  return /* @__PURE__ */ e(qi, { className: "size-4" });
1792
1792
  if (t === "Table")
1793
- return /* @__PURE__ */ e(yn, { className: "size-4" });
1793
+ return /* @__PURE__ */ e(bn, { className: "size-4" });
1794
1794
  if (t === "Model")
1795
1795
  return /* @__PURE__ */ e(di, { className: "size-4" });
1796
1796
  }
@@ -1850,7 +1850,7 @@ function ct({
1850
1850
  }
1851
1851
  );
1852
1852
  }
1853
- return /* @__PURE__ */ e(la, { delayDuration: 0, children: /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: d === "select" ? m() : C() }) });
1853
+ return /* @__PURE__ */ e(oa, { delayDuration: 0, children: /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: d === "select" ? m() : C() }) });
1854
1854
  }
1855
1855
  function il({ column: t }) {
1856
1856
  const [a, n] = J(!1), s = f((p) => p.selectedTableName), i = f(
@@ -1862,11 +1862,11 @@ function il({ column: t }) {
1862
1862
  ), u = f((p) => p.sqlGen), { modelItems: c, connectionType: h } = Ne(), d = f((p) => p.actions.setSqlGen), y = f((p) => p.actions.setCardSql), x = f((p) => p.actions.setRunSql);
1863
1863
  function m(p, v) {
1864
1864
  var z;
1865
- const g = ua(p, u, v), N = (z = c == null ? void 0 : c.find(
1865
+ const g = ma(p, u, v), N = (z = c == null ? void 0 : c.find(
1866
1866
  (k) => k.id === l
1867
1867
  )) == null ? void 0 : z.name;
1868
1868
  d(g);
1869
- const S = ma(
1869
+ const S = ha(
1870
1870
  g,
1871
1871
  xe(i || ""),
1872
1872
  xe(s),
@@ -1920,10 +1920,10 @@ function il({ column: t }) {
1920
1920
  )
1921
1921
  ] });
1922
1922
  }
1923
- return /* @__PURE__ */ r(oa, { openDelay: 0, open: a, onOpenChange: n, children: [
1924
- /* @__PURE__ */ e(ca, { asChild: !0, children: /* @__PURE__ */ e(Ra, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
1923
+ return /* @__PURE__ */ r(ca, { openDelay: 0, open: a, onOpenChange: n, children: [
1924
+ /* @__PURE__ */ e(da, { asChild: !0, children: /* @__PURE__ */ e(Ra, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
1925
1925
  /* @__PURE__ */ e(
1926
- da,
1926
+ ua,
1927
1927
  {
1928
1928
  align: "center",
1929
1929
  className: "w-20 rounded-md p-0 shadow-none",
@@ -1932,9 +1932,9 @@ function il({ column: t }) {
1932
1932
  )
1933
1933
  ] });
1934
1934
  }
1935
- function bn({ column: t }) {
1935
+ function vn({ column: t }) {
1936
1936
  return /* @__PURE__ */ r(Ot, { children: [
1937
- /* @__PURE__ */ e(Is, { className: "shrink-0", asChild: !0, children: Se(t.data_type) ? /* @__PURE__ */ e(Ja, { className: "size-3 text-muted-foreground" }) : $e(t.data_type) ? /* @__PURE__ */ e(Pa, { className: "size-3 text-muted-foreground" }) : we(t.data_type) ? /* @__PURE__ */ e(Os, { className: "size-3 text-muted-foreground" }) : Ts(t.data_type) ? /* @__PURE__ */ e($i, { className: "size-3 text-muted-foreground" }) : t.data_type.toLowerCase() === "json" ? /* @__PURE__ */ e(ui, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(Pi, { className: "size-3 text-muted-foreground" }) }),
1937
+ /* @__PURE__ */ e(Is, { className: "shrink-0", asChild: !0, children: Se(t.data_type) ? /* @__PURE__ */ e(Ja, { className: "size-3 text-muted-foreground" }) : $e(t.data_type) ? /* @__PURE__ */ e(Pa, { className: "size-3 text-muted-foreground" }) : we(t.data_type) ? /* @__PURE__ */ e(Os, { className: "size-3 text-muted-foreground" }) : Ts(t.data_type) ? /* @__PURE__ */ e($i, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(ui, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(Pi, { className: "size-3 text-muted-foreground" }) }),
1938
1938
  /* @__PURE__ */ e(Tt, { children: /* @__PURE__ */ e("p", { className: "text-xs", children: t.data_type }) })
1939
1939
  ] });
1940
1940
  }
@@ -1950,7 +1950,7 @@ function Bt({
1950
1950
  a
1951
1951
  ),
1952
1952
  children: [
1953
- /* @__PURE__ */ e(bn, { column: t }),
1953
+ /* @__PURE__ */ e(vn, { column: t }),
1954
1954
  /* @__PURE__ */ e("span", { children: t.column_name })
1955
1955
  ]
1956
1956
  }
@@ -2062,7 +2062,7 @@ function Za(t) {
2062
2062
  currentConnection: u
2063
2063
  };
2064
2064
  }
2065
- function vn(t) {
2065
+ function xn(t) {
2066
2066
  var v;
2067
2067
  const a = _((g) => g.authToken) || t, n = f(
2068
2068
  (g) => g.selectedConnectionId
@@ -2126,7 +2126,7 @@ function vn(t) {
2126
2126
  };
2127
2127
  }
2128
2128
  function Ne(t, a) {
2129
- var Sn, wn, kn, Mn, Dn;
2129
+ var wn, kn, Mn, Dn, In;
2130
2130
  const n = Ve().authToken || t, s = f(
2131
2131
  (B) => B.selectedConnectionId
2132
2132
  ), i = f(
@@ -2239,7 +2239,7 @@ function Ne(t, a) {
2239
2239
  isColumnsFetching: ne,
2240
2240
  isColumnsError: K,
2241
2241
  refetchColumns: de
2242
- } = vn(t);
2242
+ } = xn(t);
2243
2243
  me(() => {
2244
2244
  (j === "S3" || j === "API") && (d(""), y(""), h(""), j === "API" && x("api"));
2245
2245
  }, [
@@ -2249,27 +2249,27 @@ function Ne(t, a) {
2249
2249
  y,
2250
2250
  h
2251
2251
  ]);
2252
- const q = (S == null ? void 0 : S.type) === "API" ? (Sn = S == null ? void 0 : S.type) == null ? void 0 : Sn.toLowerCase() : u || "", te = Y ? "" : l || "";
2252
+ const q = (S == null ? void 0 : S.type) === "API" ? (wn = S == null ? void 0 : S.type) == null ? void 0 : wn.toLowerCase() : u || "", te = Y ? "" : l || "";
2253
2253
  function fe(B) {
2254
2254
  y(B), x("");
2255
2255
  }
2256
2256
  function Te(B) {
2257
2257
  d(B === "none" ? "" : B), y(""), x(""), B !== "none" && B !== "" && h("");
2258
2258
  }
2259
- function Ye(B) {
2259
+ function Ze(B) {
2260
2260
  c(B);
2261
2261
  }
2262
2262
  function Et(B) {
2263
2263
  h(B === "none" ? "" : B), B !== "none" && B !== "" && d("");
2264
2264
  }
2265
- M && ((wn = M == null ? void 0 : M.databases) == null ? void 0 : wn.length) > 0, b && ((kn = b == null ? void 0 : b.schemas) == null ? void 0 : kn.length) > 0;
2265
+ M && ((kn = M == null ? void 0 : M.databases) == null ? void 0 : kn.length) > 0, b && ((Mn = b == null ? void 0 : b.schemas) == null ? void 0 : Mn.length) > 0;
2266
2266
  const _t = v == null ? void 0 : v.connections.map(
2267
2267
  (B) => ({
2268
2268
  id: B.id,
2269
2269
  name: B.name,
2270
2270
  type: B.type
2271
2271
  })
2272
- ), Vt = (Mn = k == null ? void 0 : k.datamodels) == null ? void 0 : Mn.map((B) => ({
2272
+ ), Vt = (Dn = k == null ? void 0 : k.datamodels) == null ? void 0 : Dn.map((B) => ({
2273
2273
  id: B.id,
2274
2274
  name: B.name
2275
2275
  })), qt = M == null ? void 0 : M.databases.map((B) => ({
@@ -2281,9 +2281,9 @@ function Ne(t, a) {
2281
2281
  })), ie = w == null ? void 0 : w.tables.map((B) => ({
2282
2282
  id: B.table_name,
2283
2283
  name: B.table_name
2284
- })), be = (Dn = k == null ? void 0 : k.datamodels.find(
2284
+ })), be = (In = k == null ? void 0 : k.datamodels.find(
2285
2285
  (B) => B.id === i
2286
- )) == null ? void 0 : Dn.name, ws = xt({
2286
+ )) == null ? void 0 : In.name, ws = xt({
2287
2287
  schemaName: te,
2288
2288
  tableName: q,
2289
2289
  modelName: be,
@@ -2326,7 +2326,7 @@ function Ne(t, a) {
2326
2326
  refetchSchemas: D,
2327
2327
  refetchTables: Q,
2328
2328
  refetchColumns: de,
2329
- handleConnectionChange: Ye,
2329
+ handleConnectionChange: Ze,
2330
2330
  handleDatamodelChange: Et,
2331
2331
  handleDatabaseChange: Te,
2332
2332
  handleSchemaChange: fe
@@ -2351,7 +2351,7 @@ const Pt = {
2351
2351
  type: "string"
2352
2352
  }, Xa = {
2353
2353
  id: "__placeholder__"
2354
- }, He = "droppable-group-by", Ge = "droppable-metrics", Ue = "droppable-pivot-by", wt = "sortable-group-by", Zt = "sortable-metrics", kt = "sortable-pivot-by", Xt = "droppable-filters", en = "sortable-filters", xn = "sortable-order-by";
2354
+ }, He = "droppable-group-by", Ge = "droppable-metrics", Ue = "droppable-pivot-by", wt = "sortable-group-by", Zt = "sortable-metrics", kt = "sortable-pivot-by", Xt = "droppable-filters", en = "sortable-filters", Cn = "sortable-order-by";
2355
2355
  function cl() {
2356
2356
  const t = Ee((I) => I.insertIndex), a = f(
2357
2357
  (I) => {
@@ -2391,7 +2391,7 @@ function cl() {
2391
2391
  setFilterColumns: C,
2392
2392
  setOrderByColumns: p,
2393
2393
  setPivotByColumns: v
2394
- } = W(), { columns: g } = vn(), { formattedTableName: N } = Ne(), S = Ls(
2394
+ } = W(), { columns: g } = xn(), { formattedTableName: N } = Ne(), S = Ls(
2395
2395
  Es(_s, {
2396
2396
  activationConstraint: {
2397
2397
  distance: 1
@@ -2605,7 +2605,7 @@ function cl() {
2605
2605
  }
2606
2606
  function Z(I) {
2607
2607
  const { active: b, over: T } = I, H = b.data.current;
2608
- if ((H == null ? void 0 : H.type) === xn && T) {
2608
+ if ((H == null ? void 0 : H.type) === Cn && T) {
2609
2609
  const F = i.findIndex(
2610
2610
  (w) => dt(w.columnId) === b.id
2611
2611
  ), D = i.findIndex(
@@ -2629,10 +2629,10 @@ function cl() {
2629
2629
  };
2630
2630
  }
2631
2631
  function ve(t) {
2632
- return `${t}-${tt()}`;
2632
+ return `${t}-${nt()}`;
2633
2633
  }
2634
2634
  function ut(t, a) {
2635
- const n = ha(t.replace(/_/g, " "));
2635
+ const n = pa(t.replace(/_/g, " "));
2636
2636
  switch (a) {
2637
2637
  case "SUM":
2638
2638
  return `Sum of ${n}`;
@@ -2651,10 +2651,10 @@ function ut(t, a) {
2651
2651
  }
2652
2652
  }
2653
2653
  function dt(t) {
2654
- return `${xn}-${t}`;
2654
+ return `${Cn}-${t}`;
2655
2655
  }
2656
2656
  function st(t, a) {
2657
- const n = ha(t.replace(/_/g, " "));
2657
+ const n = pa(t.replace(/_/g, " "));
2658
2658
  switch (a) {
2659
2659
  case "day":
2660
2660
  return `Date of ${n}`;
@@ -2707,11 +2707,11 @@ function dl({
2707
2707
  function j(b) {
2708
2708
  var T;
2709
2709
  if (o) {
2710
- const H = ua(b, i);
2710
+ const H = ma(b, i);
2711
2711
  S(H);
2712
2712
  const F = (T = O == null ? void 0 : O.find(
2713
2713
  (w) => w.id === y
2714
- )) == null ? void 0 : T.name, D = ma(
2714
+ )) == null ? void 0 : T.name, D = ha(
2715
2715
  H,
2716
2716
  xe(t),
2717
2717
  xe(a),
@@ -2832,7 +2832,7 @@ function dl({
2832
2832
  onClick: () => j(b),
2833
2833
  children: [
2834
2834
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
2835
- /* @__PURE__ */ e(bn, { column: b }),
2835
+ /* @__PURE__ */ e(vn, { column: b }),
2836
2836
  /* @__PURE__ */ e("span", { children: b.column_name })
2837
2837
  ] }),
2838
2838
  /* @__PURE__ */ e(
@@ -2850,7 +2850,7 @@ function dl({
2850
2850
  function I() {
2851
2851
  return /* @__PURE__ */ r(ae, { children: [
2852
2852
  /* @__PURE__ */ r(
2853
- pa,
2853
+ fa,
2854
2854
  {
2855
2855
  title: `${Z() ? "Remove from" : "Add to"} Assistant Scope`,
2856
2856
  pressed: Z(),
@@ -2882,7 +2882,7 @@ function dl({
2882
2882
  variant: "secondary",
2883
2883
  className: "flex",
2884
2884
  children: [
2885
- s !== "Success" ? /* @__PURE__ */ e(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Fi, { className: "mr-2 size-4" }),
2885
+ s !== "Success" ? /* @__PURE__ */ e(Ke, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Fi, { className: "mr-2 size-4" }),
2886
2886
  "Top 10"
2887
2887
  ]
2888
2888
  }
@@ -2896,14 +2896,19 @@ function dl({
2896
2896
  variant: "secondary",
2897
2897
  className: "w-full",
2898
2898
  children: [
2899
- s !== "Success" ? /* @__PURE__ */ e(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Qa, { className: "mr-2 size-4" }),
2899
+ s !== "Success" ? /* @__PURE__ */ e(Ke, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Qa, { className: "mr-2 size-4" }),
2900
2900
  "Count"
2901
2901
  ]
2902
2902
  }
2903
2903
  )
2904
2904
  ] });
2905
2905
  }
2906
- return /* @__PURE__ */ r("div", { className: "flex grow flex-col space-y-4 px-4", children: [
2906
+ return s !== "Success" ? (
2907
+ // <div className="flex h-full w-full items-center justify-center">
2908
+ // <Loader2 className="h-6 w-6 animate-spin text-muted-foreground/70" />
2909
+ // </div>
2910
+ /* @__PURE__ */ e("div", { className: "flex grow flex-col justify-start gap-2 px-6", children: Array.from({ length: 10 }).map((b, T) => /* @__PURE__ */ e(ln, { className: "h-8 w-full" }, T)) })
2911
+ ) : /* @__PURE__ */ r("div", { className: "flex grow flex-col space-y-4 px-4", children: [
2907
2912
  o && /* @__PURE__ */ e("div", { className: "mx-2 flex items-center justify-center gap-2", children: I() }),
2908
2913
  /* @__PURE__ */ r(
2909
2914
  At,
@@ -2920,8 +2925,8 @@ function dl({
2920
2925
  },
2921
2926
  b.column_name
2922
2927
  )) }),
2923
- /* @__PURE__ */ e(nt, { orientation: "vertical" }),
2924
- /* @__PURE__ */ e(nt, { orientation: "horizontal" })
2928
+ /* @__PURE__ */ e(Qe, { orientation: "vertical" }),
2929
+ /* @__PURE__ */ e(Qe, { orientation: "horizontal" })
2925
2930
  ]
2926
2931
  }
2927
2932
  )
@@ -2993,7 +2998,7 @@ function es({
2993
2998
  q();
2994
2999
  }, 100)) : x(""), y(ie);
2995
3000
  }
2996
- function Ye() {
3001
+ function Ze() {
2997
3002
  if (!s || b === "S3" || b === "API") return null;
2998
3003
  if (!o || o === "none")
2999
3004
  return /* @__PURE__ */ e(
@@ -3098,7 +3103,7 @@ function es({
3098
3103
  )) == null ? void 0 : ht.type) || ""
3099
3104
  }
3100
3105
  ),
3101
- Ye(),
3106
+ Ze(),
3102
3107
  Et(),
3103
3108
  _t(),
3104
3109
  Vt(),
@@ -3147,10 +3152,10 @@ function ts({ sql: t, error: a, onClick: n }) {
3147
3152
  l(!0);
3148
3153
  }, 100);
3149
3154
  }
3150
- return /* @__PURE__ */ r(oa, { openDelay: a ? 0 : 500, children: [
3151
- /* @__PURE__ */ e(ca, { asChild: !0, children: /* @__PURE__ */ e(ee, { variant: "link", className: "h-5 p-0", children: a ? /* @__PURE__ */ e(Va, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(qs, { className: "h-4 w-4 text-muted-foreground" }) }) }),
3155
+ return /* @__PURE__ */ r(ca, { openDelay: a ? 0 : 500, children: [
3156
+ /* @__PURE__ */ e(da, { asChild: !0, children: /* @__PURE__ */ e(ee, { variant: "link", className: "h-5 p-0", children: a ? /* @__PURE__ */ e(Va, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(qs, { className: "h-4 w-4 text-muted-foreground" }) }) }),
3152
3157
  /* @__PURE__ */ e(
3153
- da,
3158
+ ua,
3154
3159
  {
3155
3160
  align: "start",
3156
3161
  className: "w-full min-w-fit max-w-[700px]",
@@ -3189,7 +3194,7 @@ var ns = {
3189
3194
  className: void 0,
3190
3195
  style: void 0,
3191
3196
  attr: void 0
3192
- }, _n = _e.createContext && /* @__PURE__ */ _e.createContext(ns), ul = ["attr", "size", "title"];
3197
+ }, Vn = _e.createContext && /* @__PURE__ */ _e.createContext(ns), ul = ["attr", "size", "title"];
3193
3198
  function ml(t, a) {
3194
3199
  if (t == null) return {};
3195
3200
  var n = hl(t, a), s, i;
@@ -3220,7 +3225,7 @@ function Mt() {
3220
3225
  return t;
3221
3226
  }, Mt.apply(this, arguments);
3222
3227
  }
3223
- function Vn(t, a) {
3228
+ function qn(t, a) {
3224
3229
  var n = Object.keys(t);
3225
3230
  if (Object.getOwnPropertySymbols) {
3226
3231
  var s = Object.getOwnPropertySymbols(t);
@@ -3233,9 +3238,9 @@ function Vn(t, a) {
3233
3238
  function Dt(t) {
3234
3239
  for (var a = 1; a < arguments.length; a++) {
3235
3240
  var n = arguments[a] != null ? arguments[a] : {};
3236
- a % 2 ? Vn(Object(n), !0).forEach(function(s) {
3241
+ a % 2 ? qn(Object(n), !0).forEach(function(s) {
3237
3242
  pl(t, s, n[s]);
3238
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Vn(Object(n)).forEach(function(s) {
3243
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : qn(Object(n)).forEach(function(s) {
3239
3244
  Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(n, s));
3240
3245
  });
3241
3246
  }
@@ -3289,7 +3294,7 @@ function yl(t) {
3289
3294
  xmlns: "http://www.w3.org/2000/svg"
3290
3295
  }), o && /* @__PURE__ */ _e.createElement("title", null, o), t.children);
3291
3296
  };
3292
- return _n !== void 0 ? /* @__PURE__ */ _e.createElement(_n.Consumer, null, (n) => a(n)) : a(ns);
3297
+ return Vn !== void 0 ? /* @__PURE__ */ _e.createElement(Vn.Consumer, null, (n) => a(n)) : a(ns);
3293
3298
  }
3294
3299
  function bl(t) {
3295
3300
  return lt({ 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);
@@ -3297,7 +3302,7 @@ function bl(t) {
3297
3302
  function ss(t) {
3298
3303
  const { theme: a } = js(), n = _((p) => p.theme), s = f((p) => p.frame), i = f((p) => p.card), o = f((p) => p.activeTabCardId), l = Bs(), { refetch: u } = ge(i), { updateCardTab: c, setRunSql: h } = W(), d = at(), y = at({}), x = s.cards.find((p) => p.id === o), m = za(() => {
3299
3304
  let p = "";
3300
- return t === "python" && (p = (x == null ? void 0 : x.python) || fa), t === "sql" && (p = (x == null ? void 0 : x.sql) || ""), p;
3305
+ return t === "python" && (p = (x == null ? void 0 : x.python) || ga), t === "sql" && (p = (x == null ? void 0 : x.sql) || ""), p;
3301
3306
  }, [t, x]);
3302
3307
  me(() => {
3303
3308
  if (o && i.id && i.id !== o) {
@@ -3398,7 +3403,7 @@ function xl() {
3398
3403
  className: "pt-3",
3399
3404
  theme: "default",
3400
3405
  onChange: s,
3401
- value: t || fa,
3406
+ value: t || ga,
3402
3407
  options: {
3403
3408
  minimap: {
3404
3409
  enabled: !1
@@ -3561,7 +3566,7 @@ function rs(t) {
3561
3566
  datamodelName: Ct(k),
3562
3567
  connectionId: v || "",
3563
3568
  connectionType: O || ""
3564
- }, te = Tn([...y, q]);
3569
+ }, te = zn([...y, q]);
3565
3570
  E(te);
3566
3571
  }
3567
3572
  function Q() {
@@ -3578,7 +3583,7 @@ function rs(t) {
3578
3583
  [...N || [], ...y],
3579
3584
  q
3580
3585
  ) || y.length === 0) {
3581
- const fe = Tn([
3586
+ const fe = zn([
3582
3587
  ...N || [],
3583
3588
  ...y,
3584
3589
  q
@@ -3676,7 +3681,7 @@ function is({
3676
3681
  );
3677
3682
  }
3678
3683
  function ls() {
3679
- const { setTempQueryData: t, setSqlGen: a } = W(), n = ln(), s = f((c) => c.tempQueryData), i = f((c) => c.onClose), o = f((c) => c.card), { queryKey: l } = ge(o);
3684
+ const { setTempQueryData: t, setSqlGen: a } = W(), n = on(), s = f((c) => c.tempQueryData), i = f((c) => c.onClose), o = f((c) => c.card), { queryKey: l } = ge(o);
3680
3685
  function u() {
3681
3686
  if (s) {
3682
3687
  const { queryKey: c, queryData: h } = s;
@@ -3698,7 +3703,7 @@ function ls() {
3698
3703
  );
3699
3704
  }
3700
3705
  function os() {
3701
- const { setTempQueryData: t } = W(), a = ln(), n = f((m) => m.tempQueryData), s = f((m) => m.card), { queryKey: i } = ge(s), {
3706
+ const { setTempQueryData: t } = W(), a = on(), n = f((m) => m.tempQueryData), s = f((m) => m.card), { queryKey: i } = ge(s), {
3702
3707
  setCardSql: o,
3703
3708
  setSqlGen: l,
3704
3709
  setCardPython: u,
@@ -3740,7 +3745,7 @@ function Sl(t, a) {
3740
3745
  return t[0].id;
3741
3746
  }
3742
3747
  function wl() {
3743
- const t = ln(), [a, n] = J(!1), [s, i] = J(!1);
3748
+ const t = on(), [a, n] = J(!1), [s, i] = J(!1);
3744
3749
  f((w) => w.frame);
3745
3750
  const o = f((w) => w.card);
3746
3751
  f((w) => w.isShowingVisual), f(
@@ -3922,7 +3927,7 @@ function wl() {
3922
3927
  className: "shrink-0",
3923
3928
  size: "sm",
3924
3929
  children: [
3925
- R || j ? /* @__PURE__ */ e(Qe, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Js, { className: "mr-2 h-4 w-4" }),
3930
+ R || j ? /* @__PURE__ */ e(Ke, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Js, { className: "mr-2 h-4 w-4" }),
3926
3931
  "Run"
3927
3932
  ]
3928
3933
  }
@@ -3937,7 +3942,7 @@ function wl() {
3937
3942
  ),
3938
3943
  /* @__PURE__ */ e(os, {}),
3939
3944
  /* @__PURE__ */ e(
3940
- pa,
3945
+ fa,
3941
3946
  {
3942
3947
  pressed: a,
3943
3948
  onPressedChange: (w) => n(w),
@@ -4015,28 +4020,31 @@ function kl({ data: t }) {
4015
4020
  sorting: a
4016
4021
  }
4017
4022
  });
4018
- return /* @__PURE__ */ e(At, { className: "grow overflow-auto font-mono text-xs text-foreground/95", children: /* @__PURE__ */ r("table", { className: "w-full", children: [
4019
- /* @__PURE__ */ e(Xs, { className: "sticky top-0 z-50 h-0 bg-muted", children: o.getHeaderGroups().map((u) => /* @__PURE__ */ e(Rt, { className: "", children: u.headers.map((c) => /* @__PURE__ */ e(
4020
- er,
4021
- {
4022
- className: "h-11 font-semibold text-foreground",
4023
- children: c.isPlaceholder ? null : zn(
4024
- c.column.columnDef.header,
4025
- c.getContext()
4026
- )
4027
- },
4028
- c.id
4029
- )) }, u.id)) }),
4030
- /* @__PURE__ */ e(tr, { children: (l = o.getRowModel().rows) != null && l.length ? o.getRowModel().rows.map((u) => /* @__PURE__ */ e(
4031
- Rt,
4032
- {
4033
- className: "h-11 whitespace-nowrap py-2",
4034
- "data-state": u.getIsSelected() && "selected",
4035
- children: u.getVisibleCells().map((c) => /* @__PURE__ */ e(An, { className: "py-2", children: zn(c.column.columnDef.cell, c.getContext()) }, c.id))
4036
- },
4037
- u.id
4038
- )) : /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(An, { colSpan: i.length, className: "h-24 text-center", children: "No results." }) }) })
4039
- ] }) });
4023
+ return /* @__PURE__ */ r(At, { className: "grow overflow-auto font-mono text-xs text-foreground/95", children: [
4024
+ /* @__PURE__ */ r("table", { className: "w-full", children: [
4025
+ /* @__PURE__ */ e(Xs, { className: "sticky top-0 z-50 h-0 bg-muted", children: o.getHeaderGroups().map((u) => /* @__PURE__ */ e(Rt, { className: "", children: u.headers.map((c) => /* @__PURE__ */ e(
4026
+ er,
4027
+ {
4028
+ className: "h-11 font-semibold text-foreground",
4029
+ children: c.isPlaceholder ? null : An(
4030
+ c.column.columnDef.header,
4031
+ c.getContext()
4032
+ )
4033
+ },
4034
+ c.id
4035
+ )) }, u.id)) }),
4036
+ /* @__PURE__ */ e(tr, { children: (l = o.getRowModel().rows) != null && l.length ? o.getRowModel().rows.map((u) => /* @__PURE__ */ e(
4037
+ Rt,
4038
+ {
4039
+ className: "h-11 whitespace-nowrap py-2",
4040
+ "data-state": u.getIsSelected() && "selected",
4041
+ children: u.getVisibleCells().map((c) => /* @__PURE__ */ e(Fn, { className: "py-2", children: An(c.column.columnDef.cell, c.getContext()) }, c.id))
4042
+ },
4043
+ u.id
4044
+ )) : /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(Fn, { colSpan: i.length, className: "h-24 text-center", children: "No results." }) }) })
4045
+ ] }),
4046
+ /* @__PURE__ */ e(Qe, { orientation: "horizontal" })
4047
+ ] });
4040
4048
  }
4041
4049
  function Ml({ card: t }) {
4042
4050
  var N, S, z, k, O, R, j, Y, M, V, Z;
@@ -4046,7 +4054,7 @@ function Ml({ card: t }) {
4046
4054
  colors: ((S = (N = u == null ? void 0 : u.chart) == null ? void 0 : N.dataset) == null ? void 0 : S.backgroundColor) || []
4047
4055
  };
4048
4056
  (z = t.customCardPreferences) != null && z.inputData;
4049
- const { getCard: h } = ga(((k = t.customCardPreferences) == null ? void 0 : k.url) || ""), d = ((O = t.customCardPreferences) == null ? void 0 : O.visualType) || "single", y = f(($) => $.frame), { setCustomCardPreferences: x } = W(), { data: m } = ge(t), C = za(($, I) => {
4057
+ const { getCard: h } = ya(((k = t.customCardPreferences) == null ? void 0 : k.url) || ""), d = ((O = t.customCardPreferences) == null ? void 0 : O.visualType) || "single", y = f(($) => $.frame), { setCustomCardPreferences: x } = W(), { data: m } = ge(t), C = za(($, I) => {
4050
4058
  i((b) => ({
4051
4059
  ...b,
4052
4060
  [$]: I
@@ -4131,7 +4139,7 @@ function cs({
4131
4139
  var v;
4132
4140
  const n = f((g) => g.card), s = ((v = n.customCardPreferences) == null ? void 0 : v.showCardHeader) ?? !0, i = f((g) => g.frame), o = _((g) => g.dashboard.filters);
4133
4141
  f((g) => g.actions.setRunSql);
4134
- const { updateFilter: l } = rt(), u = o == null ? void 0 : o.find((g) => g.id === i.filterId), { data: c, isLoading: h, isFetching: d } = ge(n), { setCard: y } = W(), { data: x } = on(n), m = Pe(() => !n.id || !(c != null && c.records) ? null : ya({
4142
+ const { updateFilter: l } = rt(), u = o == null ? void 0 : o.find((g) => g.id === i.filterId), { data: c, isLoading: h, isFetching: d } = ge(n), { setCard: y } = W(), { data: x } = cn(n), m = Pe(() => !n.id || !(c != null && c.records) ? null : ba({
4135
4143
  data: c == null ? void 0 : c.records,
4136
4144
  cardType: n.type,
4137
4145
  queryConfig: n.queryConfig,
@@ -4170,7 +4178,7 @@ function cs({
4170
4178
  if (n.type === "table" && (c != null && c.records) && (c == null ? void 0 : c.records.length) > 0)
4171
4179
  return /* @__PURE__ */ r(it, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
4172
4180
  /* @__PURE__ */ e(pr, { card: n, data: c == null ? void 0 : c.records }),
4173
- /* @__PURE__ */ e(nt, { orientation: "horizontal" })
4181
+ /* @__PURE__ */ e(Qe, { orientation: "horizontal" })
4174
4182
  ] });
4175
4183
  }
4176
4184
  return /* @__PURE__ */ r(
@@ -4183,7 +4191,7 @@ function cs({
4183
4191
  s && /* @__PURE__ */ r(or, { className: "flex flex-row items-start justify-between py-4", children: [
4184
4192
  /* @__PURE__ */ r("div", { children: [
4185
4193
  /* @__PURE__ */ e(
4186
- Xe,
4194
+ et,
4187
4195
  {
4188
4196
  text: n.title,
4189
4197
  onSave: (g) => y({ ...n, title: g }),
@@ -4192,7 +4200,7 @@ function cs({
4192
4200
  n.title
4193
4201
  ),
4194
4202
  /* @__PURE__ */ e(
4195
- Xe,
4203
+ et,
4196
4204
  {
4197
4205
  text: n.description || "",
4198
4206
  onSave: (g) => y({ ...n, description: g }),
@@ -4203,7 +4211,7 @@ function cs({
4203
4211
  ] }),
4204
4212
  u && /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
4205
4213
  /* @__PURE__ */ e(
4206
- Xe,
4214
+ et,
4207
4215
  {
4208
4216
  className: "my-1",
4209
4217
  text: u.title || u.column,
@@ -4211,7 +4219,7 @@ function cs({
4211
4219
  children: /* @__PURE__ */ e(U, { children: u.title })
4212
4220
  }
4213
4221
  ),
4214
- /* @__PURE__ */ e(ba, { filter: u })
4222
+ /* @__PURE__ */ e(va, { filter: u })
4215
4223
  ] })
4216
4224
  ] }),
4217
4225
  /* @__PURE__ */ e(ur, { className: "flex grow flex-col", children: p() })
@@ -4245,9 +4253,9 @@ const $t = ({
4245
4253
  value: a,
4246
4254
  onChange: n
4247
4255
  }
4248
- ), Dl = () => /* @__PURE__ */ r(Pn, { children: [
4249
- /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(Hn, { children: "Customize Card" }) }),
4250
- /* @__PURE__ */ r(Gn, { children: [
4256
+ ), Dl = () => /* @__PURE__ */ r(Hn, { children: [
4257
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(Gn, { children: "Customize Card" }) }),
4258
+ /* @__PURE__ */ r(Un, { children: [
4251
4259
  "See the configuration options and documentation",
4252
4260
  /* @__PURE__ */ e(
4253
4261
  "a",
@@ -4266,11 +4274,11 @@ const $t = ({
4266
4274
  mergedConfig: n,
4267
4275
  onConfigChange: s,
4268
4276
  onCodeChange: i
4269
- }) => /* @__PURE__ */ r(cn, { defaultValue: "final-config", className: "flex w-1/2 flex-col", children: [
4270
- /* @__PURE__ */ r(dn, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
4271
- /* @__PURE__ */ e(et, { value: "final-config", children: "Config" }),
4272
- /* @__PURE__ */ e(et, { value: "custom-config", children: "Changes" }),
4273
- /* @__PURE__ */ e(et, { value: "custom-code", children: "Custom Code" })
4277
+ }) => /* @__PURE__ */ r(dn, { defaultValue: "final-config", className: "flex w-1/2 flex-col", children: [
4278
+ /* @__PURE__ */ r(un, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
4279
+ /* @__PURE__ */ e(tt, { value: "final-config", children: "Config" }),
4280
+ /* @__PURE__ */ e(tt, { value: "custom-config", children: "Changes" }),
4281
+ /* @__PURE__ */ e(tt, { value: "custom-code", children: "Custom Code" })
4274
4282
  ] }),
4275
4283
  /* @__PURE__ */ e(
4276
4284
  yt,
@@ -4325,14 +4333,14 @@ const $t = ({
4325
4333
  onReset: n,
4326
4334
  onApply: s,
4327
4335
  onClose: i
4328
- }) => /* @__PURE__ */ r(Un, { className: "flex items-center", children: [
4336
+ }) => /* @__PURE__ */ r($n, { className: "flex items-center", children: [
4329
4337
  /* @__PURE__ */ e(U, { className: "mr-2 text-red-500", children: t }),
4330
4338
  /* @__PURE__ */ e(ee, { disabled: !a, onClick: n, variant: "outline", children: "Reset" }),
4331
4339
  /* @__PURE__ */ e(ee, { onClick: s, variant: "outline", children: "Apply" }),
4332
4340
  /* @__PURE__ */ e(ee, { onClick: i, variant: "outline", children: "Close" })
4333
4341
  ] });
4334
4342
  function Tl() {
4335
- const [t, a] = J(!1), [n, s] = J(""), [i, o] = J(""), [l, u] = J(""), [c, h] = J(""), d = f((k) => k.card), y = f((k) => k.card.customCfg), x = y ? JSON.stringify(y, null, 2) : "", { data: m } = ge(d), { data: C } = on(d), { setCardCustomCfg: p, setCustomVisualCode: v } = W(), g = (k) => {
4343
+ const [t, a] = J(!1), [n, s] = J(""), [i, o] = J(""), [l, u] = J(""), [c, h] = J(""), d = f((k) => k.card), y = f((k) => k.card.customCfg), x = y ? JSON.stringify(y, null, 2) : "", { data: m } = ge(d), { data: C } = cn(d), { setCardCustomCfg: p, setCustomVisualCode: v } = W(), g = (k) => {
4336
4344
  var O, R;
4337
4345
  return JSON.stringify(
4338
4346
  {
@@ -4351,7 +4359,7 @@ function Tl() {
4351
4359
  }, N = () => {
4352
4360
  var O, R;
4353
4361
  if (!((O = m == null ? void 0 : m.records) != null && O.length)) return;
4354
- const k = ya({
4362
+ const k = ba({
4355
4363
  data: m.records,
4356
4364
  cardType: d.type,
4357
4365
  queryConfig: d.queryConfig,
@@ -4379,8 +4387,8 @@ function Tl() {
4379
4387
  h("Invalid JSON configuration");
4380
4388
  }
4381
4389
  }, z = Object.keys(y || {}).length === 0;
4382
- return /* @__PURE__ */ r(Rn, { open: t, onOpenChange: a, children: [
4383
- /* @__PURE__ */ e(jn, { asChild: !0, children: /* @__PURE__ */ e(
4390
+ return /* @__PURE__ */ r(jn, { open: t, onOpenChange: a, children: [
4391
+ /* @__PURE__ */ e(Bn, { asChild: !0, children: /* @__PURE__ */ e(
4384
4392
  X,
4385
4393
  {
4386
4394
  tooltip: "Customize Visual",
@@ -4389,10 +4397,10 @@ function Tl() {
4389
4397
  children: /* @__PURE__ */ e(fr, { className: "h-4 w-4" })
4390
4398
  }
4391
4399
  ) }),
4392
- /* @__PURE__ */ r(Bn, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
4400
+ /* @__PURE__ */ r(Pn, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
4393
4401
  /* @__PURE__ */ e(Dl, {}),
4394
4402
  /* @__PURE__ */ r("div", { className: "flex grow gap-2", children: [
4395
- /* @__PURE__ */ e(Lt, { FallbackComponent: va, children: /* @__PURE__ */ e(cs, { className: "w-1/2 rounded shadow-none" }) }),
4403
+ /* @__PURE__ */ e(Lt, { FallbackComponent: xa, children: /* @__PURE__ */ e(cs, { className: "w-1/2 rounded shadow-none" }) }),
4396
4404
  /* @__PURE__ */ e(
4397
4405
  Il,
4398
4406
  {
@@ -4518,7 +4526,7 @@ function gs({
4518
4526
  tooltip: "Table",
4519
4527
  onClick: () => c("table"),
4520
4528
  className: "h-10 p-4",
4521
- children: /* @__PURE__ */ e(yn, { className: G("size-5", a) })
4529
+ children: /* @__PURE__ */ e(bn, { className: G("size-5", a) })
4522
4530
  }
4523
4531
  ),
4524
4532
  /* @__PURE__ */ e(
@@ -4528,7 +4536,7 @@ function gs({
4528
4536
  tooltip: "Bar Chart",
4529
4537
  onClick: () => c("bar"),
4530
4538
  className: "h-10 p-4",
4531
- children: /* @__PURE__ */ e(fn, { className: G("size-5", a) })
4539
+ children: /* @__PURE__ */ e(gn, { className: G("size-5", a) })
4532
4540
  }
4533
4541
  ),
4534
4542
  /* @__PURE__ */ e(
@@ -4538,7 +4546,7 @@ function gs({
4538
4546
  tooltip: "Line Chart",
4539
4547
  onClick: () => c("line"),
4540
4548
  className: "h-10 p-4",
4541
- children: /* @__PURE__ */ e(gn, { className: G("size-5", a) })
4549
+ children: /* @__PURE__ */ e(yn, { className: G("size-5", a) })
4542
4550
  }
4543
4551
  ),
4544
4552
  /* @__PURE__ */ e(
@@ -4696,9 +4704,9 @@ function Ll({
4696
4704
  const i = ds();
4697
4705
  switch (t) {
4698
4706
  case "bar":
4699
- return /* @__PURE__ */ e(fn, { className: a });
4700
- case "line":
4701
4707
  return /* @__PURE__ */ e(gn, { className: a });
4708
+ case "line":
4709
+ return /* @__PURE__ */ e(yn, { className: a });
4702
4710
  case "pie":
4703
4711
  return /* @__PURE__ */ e(Ea, { className: a });
4704
4712
  case "radar":
@@ -4728,14 +4736,14 @@ function Ll({
4728
4736
  case "custom":
4729
4737
  return n && i ? /* @__PURE__ */ e(i, { className: a }) : s ? s == null ? void 0 : s.charAt(0).toUpperCase() : /* @__PURE__ */ e($a, { className: a });
4730
4738
  default:
4731
- return /* @__PURE__ */ e(yn, { className: a });
4739
+ return /* @__PURE__ */ e(bn, { className: a });
4732
4740
  }
4733
4741
  }
4734
4742
  function El() {
4735
4743
  var o, l;
4736
4744
  const [t, a] = J(!1), n = f((u) => u.card), s = n.type, i = _((u) => u.isVisualEditing);
4737
- return /* @__PURE__ */ r(Ke, { open: t, onOpenChange: a, children: [
4738
- /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(ee, { size: "sm", variant: i ? "ghost" : "outline", children: /* @__PURE__ */ e(
4745
+ return /* @__PURE__ */ r(Je, { open: t, onOpenChange: a, children: [
4746
+ /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(ee, { size: "sm", variant: i ? "ghost" : "outline", children: /* @__PURE__ */ e(
4739
4747
  Ll,
4740
4748
  {
4741
4749
  className: "size-4",
@@ -4745,7 +4753,7 @@ function El() {
4745
4753
  }
4746
4754
  ) }) }),
4747
4755
  /* @__PURE__ */ r(
4748
- un,
4756
+ mn,
4749
4757
  {
4750
4758
  onOpenAutoFocus: (u) => u.preventDefault(),
4751
4759
  className: "w-50",
@@ -4763,9 +4771,9 @@ function El() {
4763
4771
  ] });
4764
4772
  }
4765
4773
  const pt = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0";
4766
- function qn(t, a) {
4774
+ function Rn(t, a) {
4767
4775
  var s, i, o;
4768
- const n = xa(t, a);
4776
+ const n = Ca(t, a);
4769
4777
  return ((o = (i = (s = t == null ? void 0 : t.chartOptions) == null ? void 0 : s.scales) == null ? void 0 : i[n]) == null ? void 0 : o.type) || "linear";
4770
4778
  }
4771
4779
  function _l() {
@@ -4773,8 +4781,8 @@ function _l() {
4773
4781
  const [t, a] = J(!1), n = f((L) => {
4774
4782
  var E;
4775
4783
  return (E = L.card) == null ? void 0 : E.preferences;
4776
- }), s = xa(n, {}), [i, o] = J(
4777
- qn(n)
4784
+ }), s = Ca(n, {}), [i, o] = J(
4785
+ Rn(n)
4778
4786
  ), [l, u] = J(
4779
4787
  ((H = (T = (b = n == null ? void 0 : n.chartOptions) == null ? void 0 : b.scales) == null ? void 0 : T[s]) == null ? void 0 : H.min) || ""
4780
4788
  ), [c, h] = J(
@@ -4786,12 +4794,12 @@ function _l() {
4786
4794
  return (E = L.card) == null ? void 0 : E.type;
4787
4795
  }), M = ["pie", "doughnut", "polarArea"].includes(Y);
4788
4796
  me(() => {
4789
- var L, E, se, Q, re, P, ne, K, de, q, te, fe, Te, Ye;
4790
- o(qn(n)), u(
4797
+ var L, E, se, Q, re, P, ne, K, de, q, te, fe, Te, Ze;
4798
+ o(Rn(n)), u(
4791
4799
  ((se = (E = (L = n == null ? void 0 : n.chartOptions) == null ? void 0 : L.scales) == null ? void 0 : E[s]) == null ? void 0 : se.min) === 0 ? 0 : ""
4792
4800
  ), h(((P = (re = (Q = n == null ? void 0 : n.chartOptions) == null ? void 0 : Q.scales) == null ? void 0 : re[s]) == null ? void 0 : P.max) || ""), m(
4793
4801
  ((q = (de = (K = (ne = n == null ? void 0 : n.chartOptions) == null ? void 0 : ne.scales) == null ? void 0 : K[s]) == null ? void 0 : de.ticks) == null ? void 0 : q.stepSize) || ""
4794
- ), p(((te = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : te.decimalPlaces) || 0), g(((fe = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : fe.suffix) || ""), S(((Te = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : Te.currency) || ""), k(((Ye = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : Ye.locale) || "");
4802
+ ), p(((te = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : te.decimalPlaces) || 0), g(((fe = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : fe.suffix) || ""), S(((Te = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : Te.currency) || ""), k(((Ze = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : Ze.locale) || "");
4795
4803
  }, [t, n, s]);
4796
4804
  function V(L, E) {
4797
4805
  return E === "" || /^[0-9\b]+$/.test(E) ? Number(E) : Number(L);
@@ -4934,9 +4942,9 @@ function _l() {
4934
4942
  };
4935
4943
  R(se);
4936
4944
  }
4937
- return /* @__PURE__ */ r(Ke, { onOpenChange: (L) => a(L), children: [
4938
- /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Format Number", children: /* @__PURE__ */ e(vi, { className: "size-4" }) }) }),
4939
- /* @__PURE__ */ e(un, { align: "end", className: "max-w-65", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
4945
+ return /* @__PURE__ */ r(Je, { onOpenChange: (L) => a(L), children: [
4946
+ /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Format Number", children: /* @__PURE__ */ e(vi, { className: "size-4" }) }) }),
4947
+ /* @__PURE__ */ e(mn, { align: "end", className: "max-w-65", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
4940
4948
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
4941
4949
  /* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Format Options" }),
4942
4950
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Set the format for number axis" })
@@ -4966,7 +4974,7 @@ function _l() {
4966
4974
  i == "linear" && /* @__PURE__ */ r("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
4967
4975
  /* @__PURE__ */ e(U, { htmlFor: "scale-option", children: "Setup" }),
4968
4976
  /* @__PURE__ */ r(
4969
- Ca,
4977
+ Na,
4970
4978
  {
4971
4979
  disabled: M,
4972
4980
  id: "scale-option",
@@ -5037,9 +5045,9 @@ function Vl() {
5037
5045
  align: u
5038
5046
  });
5039
5047
  };
5040
- return /* @__PURE__ */ r(Ke, { children: [
5041
- /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Legend Settings", children: /* @__PURE__ */ e(Oi, { className: "size-4" }) }) }),
5042
- /* @__PURE__ */ e(un, { align: "end", className: "w-72", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
5048
+ return /* @__PURE__ */ r(Je, { children: [
5049
+ /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Legend Settings", children: /* @__PURE__ */ e(Oi, { className: "size-4" }) }) }),
5050
+ /* @__PURE__ */ e(mn, { align: "end", className: "w-72", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
5043
5051
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
5044
5052
  /* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Legend Options" }),
5045
5053
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Set the legend options for the chart." })
@@ -5048,7 +5056,7 @@ function Vl() {
5048
5056
  /* @__PURE__ */ r("div", { className: "grid grid-cols-3 items-center gap-4", children: [
5049
5057
  /* @__PURE__ */ e(U, { htmlFor: "displayLegend", children: "Display" }),
5050
5058
  /* @__PURE__ */ e("div", { className: "col-span-2 flex h-8 items-center", children: /* @__PURE__ */ e(
5051
- Na,
5059
+ Sa,
5052
5060
  {
5053
5061
  checked: n,
5054
5062
  onCheckedChange: i,
@@ -5065,7 +5073,7 @@ function Vl() {
5065
5073
  {
5066
5074
  tooltip: "Top",
5067
5075
  onClick: () => o("top"),
5068
- children: /* @__PURE__ */ e(Sa, { className: "size-4" })
5076
+ children: /* @__PURE__ */ e(wa, { className: "size-4" })
5069
5077
  }
5070
5078
  ),
5071
5079
  /* @__PURE__ */ e(
@@ -5153,7 +5161,7 @@ function Rl() {
5153
5161
  var u, c;
5154
5162
  return (c = (u = l.card) == null ? void 0 : u.preferences) == null ? void 0 : c.chartOptions;
5155
5163
  }
5156
- ), s = wa(n), { setChartGrid: i } = W();
5164
+ ), s = ka(n), { setChartGrid: i } = W();
5157
5165
  function o() {
5158
5166
  const l = ["xy", "none", "x", "y"], c = (l.indexOf(s) + 1) % l.length;
5159
5167
  i(l[c]);
@@ -5197,7 +5205,7 @@ function ft() {
5197
5205
  return (w = D.card.preferences) == null ? void 0 : w.chartOptions;
5198
5206
  }
5199
5207
  ), c = f((D) => D.actions.setRunSql);
5200
- wa(u);
5208
+ ka(u);
5201
5209
  const {
5202
5210
  setFrame: h,
5203
5211
  setCard: d,
@@ -5214,7 +5222,7 @@ function ft() {
5214
5222
  lastSelectedSchema: a.lastSelectedSchema,
5215
5223
  lastSelectedTable: a.lastSelectedTable,
5216
5224
  lastSelectedDatamodelId: a.lastSelectedDatamodelId,
5217
- id: tt(),
5225
+ id: nt(),
5218
5226
  title: "Title",
5219
5227
  description: "Description",
5220
5228
  preferences: {
@@ -5242,7 +5250,7 @@ function ft() {
5242
5250
  function k() {
5243
5251
  const D = {
5244
5252
  ...a,
5245
- id: tt(),
5253
+ id: nt(),
5246
5254
  title: `${a.title} Copy`,
5247
5255
  tabTitle: `${a.tabTitle || a.title} Copy`
5248
5256
  };
@@ -5297,23 +5305,23 @@ function ft() {
5297
5305
  }
5298
5306
  function $() {
5299
5307
  return /* @__PURE__ */ r(
5300
- cn,
5308
+ dn,
5301
5309
  {
5302
5310
  onValueChange: R,
5303
5311
  value: t.activeCardId,
5304
5312
  className: "flex grow flex-col",
5305
5313
  children: [
5306
5314
  t.cards.map((D) => /* @__PURE__ */ e(yt, { className: "mt-0 grow", value: D.id, children: I() }, D.id)),
5307
- /* @__PURE__ */ e(dn, { className: "group mx-4 justify-between overflow-x-auto", children: /* @__PURE__ */ r("div", { className: "flex items-center", children: [
5315
+ /* @__PURE__ */ e(un, { className: "group mx-4 justify-between overflow-x-auto", children: /* @__PURE__ */ r("div", { className: "flex items-center", children: [
5308
5316
  t.cards.map((D, w) => /* @__PURE__ */ e(
5309
- Xe,
5317
+ et,
5310
5318
  {
5311
5319
  text: D.tabTitle || D.title,
5312
5320
  onSave: (L) => {
5313
5321
  d({ ...a, tabTitle: L }), y({ ...a, tabTitle: L });
5314
5322
  },
5315
5323
  children: /* @__PURE__ */ r(
5316
- et,
5324
+ tt,
5317
5325
  {
5318
5326
  draggable: !0,
5319
5327
  onDragStart: (L) => Y(L, w),
@@ -5368,7 +5376,7 @@ function ft() {
5368
5376
  card: a,
5369
5377
  data: p == null ? void 0 : p.records
5370
5378
  }
5371
- ) }) }) }) : /* @__PURE__ */ e(Lt, { FallbackComponent: va, children: /* @__PURE__ */ e(cs, { className: "grow border-none shadow-none" }) });
5379
+ ) }) }) }) : /* @__PURE__ */ e(Lt, { FallbackComponent: xa, children: /* @__PURE__ */ e(cs, { className: "grow border-none shadow-none" }) });
5372
5380
  }
5373
5381
  function b() {
5374
5382
  const D = JSON.stringify(p == null ? void 0 : p.records, null, 2), w = new Blob([D], { type: "application/json" }), L = URL.createObjectURL(w), E = document.createElement("a");
@@ -5393,7 +5401,7 @@ function ft() {
5393
5401
  {
5394
5402
  className: "relative isolate flex h-full flex-col py-2 pb-3",
5395
5403
  children: [
5396
- (v || g) && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(Qe, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }),
5404
+ (v || g) && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(Ke, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }),
5397
5405
  /* @__PURE__ */ r(
5398
5406
  "div",
5399
5407
  {
@@ -5486,7 +5494,7 @@ function jl() {
5486
5494
  /* @__PURE__ */ e("div", { className: "sticky top-0 flex max-h-11 min-h-11 grow items-center border-b bg-muted px-3 font-mono text-xs font-semibold text-foreground/70", children: "Python Output" }),
5487
5495
  /* @__PURE__ */ r(it, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: [
5488
5496
  /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: a } }),
5489
- /* @__PURE__ */ e(nt, { orientation: "horizontal" })
5497
+ /* @__PURE__ */ e(Qe, { orientation: "horizontal" })
5490
5498
  ] })
5491
5499
  ] });
5492
5500
  }
@@ -5497,7 +5505,7 @@ function Bl() {
5497
5505
  return /* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
5498
5506
  /* @__PURE__ */ e(U, { htmlFor: "visualize", children: "Chart" }),
5499
5507
  /* @__PURE__ */ e(
5500
- Na,
5508
+ Sa,
5501
5509
  {
5502
5510
  checked: t,
5503
5511
  onCheckedChange: () => a(!t),
@@ -5511,7 +5519,7 @@ function Pl() {
5511
5519
  var p, v;
5512
5520
  const t = f(
5513
5521
  (g) => g.card.customCardPreferences
5514
- ), { data: a } = us(), n = (a == null ? void 0 : a.plugins) || [], s = f((g) => g.card), i = f((g) => g.frame), o = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: l } = W(), { components: u, manifest: c } = ga(
5522
+ ), { data: a } = us(), n = (a == null ? void 0 : a.plugins) || [], s = f((g) => g.card), i = f((g) => g.frame), o = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: l } = W(), { components: u, manifest: c } = ya(
5515
5523
  (t == null ? void 0 : t.url) || ""
5516
5524
  ), h = (p = c == null ? void 0 : c.visuals) == null ? void 0 : p.find(
5517
5525
  (g) => g.name === (t == null ? void 0 : t.componentName)
@@ -5645,13 +5653,13 @@ function Pl() {
5645
5653
  }
5646
5654
  ),
5647
5655
  ((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && /* @__PURE__ */ e(
5648
- cn,
5656
+ dn,
5649
5657
  {
5650
5658
  value: o,
5651
5659
  onValueChange: C,
5652
- children: /* @__PURE__ */ r(dn, { className: "h-9 w-full", children: [
5653
- /* @__PURE__ */ e(et, { className: "h-7 w-full", value: "single", children: "Single Visual" }),
5654
- /* @__PURE__ */ e(et, { className: "h-7 w-full", value: "multiple", children: "Multi-Visual" })
5660
+ children: /* @__PURE__ */ r(un, { className: "h-9 w-full", children: [
5661
+ /* @__PURE__ */ e(tt, { className: "h-7 w-full", value: "single", children: "Single Visual" }),
5662
+ /* @__PURE__ */ e(tt, { className: "h-7 w-full", value: "multiple", children: "Multi-Visual" })
5655
5663
  ] })
5656
5664
  }
5657
5665
  )
@@ -5691,7 +5699,7 @@ function Pl() {
5691
5699
  }
5692
5700
  );
5693
5701
  }
5694
- function We() {
5702
+ function Ye() {
5695
5703
  const [t, a] = J([]), n = f((h) => h.card.preferences), { setFilterOnClickColumnIndex: s, setCardPreferences: i } = f(
5696
5704
  (h) => h.actions
5697
5705
  ), o = f(
@@ -5770,7 +5778,7 @@ function We() {
5770
5778
  children: /* @__PURE__ */ r("div", { className: "grow", children: [
5771
5779
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-2 py-2", children: [
5772
5780
  /* @__PURE__ */ e(
5773
- mn,
5781
+ hn,
5774
5782
  {
5775
5783
  checked: !!((y = n == null ? void 0 : n.onClickFilter) != null && y.find(
5776
5784
  (m) => m.columnIndex === d
@@ -5788,7 +5796,7 @@ function We() {
5788
5796
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: ((x = n == null ? void 0 : n.onClickFilter) == null ? void 0 : x.find(
5789
5797
  (m) => m.columnIndex === d
5790
5798
  )) && /* @__PURE__ */ e(
5791
- ea,
5799
+ ta,
5792
5800
  {
5793
5801
  onClick: () => {
5794
5802
  a((m) => {
@@ -5852,8 +5860,8 @@ function Hl({ idx: t }) {
5852
5860
  });
5853
5861
  }
5854
5862
  }
5855
- return /* @__PURE__ */ r(Ke, { children: [
5856
- /* @__PURE__ */ e(Je, { children: /* @__PURE__ */ e(Ui, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
5863
+ return /* @__PURE__ */ r(Je, { children: [
5864
+ /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(Ui, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
5857
5865
  /* @__PURE__ */ e(It, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ r("div", { className: "flex gap-1", children: [
5858
5866
  /* @__PURE__ */ e(
5859
5867
  "button",
@@ -6024,7 +6032,7 @@ function xs({
6024
6032
  i || /* @__PURE__ */ e("p", { title: t, children: vs(t) }),
6025
6033
  /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
6026
6034
  /* @__PURE__ */ e(
6027
- fn,
6035
+ gn,
6028
6036
  {
6029
6037
  onClick: () => h("bar"),
6030
6038
  className: G(
@@ -6034,7 +6042,7 @@ function xs({
6034
6042
  }
6035
6043
  ),
6036
6044
  /* @__PURE__ */ e(
6037
- gn,
6045
+ yn,
6038
6046
  {
6039
6047
  onClick: () => h("line"),
6040
6048
  className: G(
@@ -6073,14 +6081,14 @@ function Cs() {
6073
6081
  const k = (R = h == null ? void 0 : h.find(
6074
6082
  (j) => j.id === a
6075
6083
  )) == null ? void 0 : R.name;
6076
- a && a !== "none" && (z = `${Fn}.${k}.${p}`, S = `${Fn}.${k}`);
6084
+ a && a !== "none" && (z = `${Ln}.${k}.${p}`, S = `${Ln}.${k}`);
6077
6085
  const O = o == null ? void 0 : o.find(
6078
6086
  (j) => j.column === z && j.table === N && (j.database === v || j.database === n)
6079
6087
  );
6080
6088
  if (O)
6081
6089
  c(O.id), u(O.id);
6082
6090
  else {
6083
- const j = tt();
6091
+ const j = nt();
6084
6092
  return d === "api" && t ? (l({
6085
6093
  location: C,
6086
6094
  id: j,
@@ -6134,7 +6142,7 @@ function ot() {
6134
6142
  return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
6135
6143
  /* @__PURE__ */ e(U, { children: "Card Filter" }),
6136
6144
  /* @__PURE__ */ e(Gl, { onSelect: o, columns: s }),
6137
- l && /* @__PURE__ */ e(ka, { filter: l })
6145
+ l && /* @__PURE__ */ e(Ma, { filter: l })
6138
6146
  ] });
6139
6147
  }
6140
6148
  function Gl({
@@ -6142,9 +6150,9 @@ function Gl({
6142
6150
  onSelect: a
6143
6151
  }) {
6144
6152
  var l;
6145
- const [n, s] = Ze.useState(!1), [i, o] = Ze.useState("");
6146
- return /* @__PURE__ */ r(Ke, { open: n, onOpenChange: s, children: [
6147
- /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ r(
6153
+ const [n, s] = Xe.useState(!1), [i, o] = Xe.useState("");
6154
+ return /* @__PURE__ */ r(Je, { open: n, onOpenChange: s, children: [
6155
+ /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ r(
6148
6156
  ee,
6149
6157
  {
6150
6158
  size: "sm",
@@ -6158,12 +6166,12 @@ function Gl({
6158
6166
  ]
6159
6167
  }
6160
6168
  ) }),
6161
- /* @__PURE__ */ e(It, { className: "w-[200px] p-0", children: /* @__PURE__ */ r(ta, { children: [
6162
- /* @__PURE__ */ e(na, { placeholder: "Search column", className: "h-9" }),
6163
- /* @__PURE__ */ r(aa, { children: [
6164
- /* @__PURE__ */ e(sa, { children: "No framework found." }),
6165
- /* @__PURE__ */ e(ra, { children: t == null ? void 0 : t.map((u) => /* @__PURE__ */ r(
6166
- ia,
6169
+ /* @__PURE__ */ e(It, { className: "w-[200px] p-0", children: /* @__PURE__ */ r(na, { children: [
6170
+ /* @__PURE__ */ e(aa, { placeholder: "Search column", className: "h-9" }),
6171
+ /* @__PURE__ */ r(sa, { children: [
6172
+ /* @__PURE__ */ e(ra, { children: "No framework found." }),
6173
+ /* @__PURE__ */ e(ia, { children: t == null ? void 0 : t.map((u) => /* @__PURE__ */ r(
6174
+ la,
6167
6175
  {
6168
6176
  value: u.column_name,
6169
6177
  onSelect: (c) => {
@@ -6225,13 +6233,13 @@ function Ul({
6225
6233
  /* @__PURE__ */ r(le, { value: "item-3", children: [
6226
6234
  /* @__PURE__ */ e(oe, { children: "Filters" }),
6227
6235
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
6228
- /* @__PURE__ */ e(We, {}),
6236
+ /* @__PURE__ */ e(Ye, {}),
6229
6237
  /* @__PURE__ */ e(ot, {})
6230
6238
  ] })
6231
6239
  ] })
6232
6240
  ] }) });
6233
6241
  }
6234
- function Cn() {
6242
+ function Nn() {
6235
6243
  var i, o, l;
6236
6244
  const t = f((u) => u.card.type), a = f((u) => u.card.preferences), { setCardPreferences: n } = f((u) => u.actions);
6237
6245
  function s(u) {
@@ -6313,12 +6321,12 @@ function $l({
6313
6321
  ] }),
6314
6322
  /* @__PURE__ */ r(le, { value: "item-2", children: [
6315
6323
  /* @__PURE__ */ e(oe, { children: "Settings" }),
6316
- /* @__PURE__ */ e(ce, { className: "px-2", children: /* @__PURE__ */ e(Cn, {}) })
6324
+ /* @__PURE__ */ e(ce, { className: "px-2", children: /* @__PURE__ */ e(Nn, {}) })
6317
6325
  ] }),
6318
6326
  /* @__PURE__ */ r(le, { value: "item-3", children: [
6319
6327
  /* @__PURE__ */ e(oe, { children: "Filters" }),
6320
6328
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
6321
- /* @__PURE__ */ e(We, {}),
6329
+ /* @__PURE__ */ e(Ye, {}),
6322
6330
  /* @__PURE__ */ e(ot, {})
6323
6331
  ] })
6324
6332
  ] })
@@ -6360,8 +6368,8 @@ function Jl() {
6360
6368
  }
6361
6369
  ),
6362
6370
  !["kpi"].includes(t) && /* @__PURE__ */ r("div", { className: "space-y-4", children: [
6363
- /* @__PURE__ */ e(Cn, {}),
6364
- /* @__PURE__ */ e(We, {}),
6371
+ /* @__PURE__ */ e(Nn, {}),
6372
+ /* @__PURE__ */ e(Ye, {}),
6365
6373
  /* @__PURE__ */ e(ot, {})
6366
6374
  ] })
6367
6375
  ] });
@@ -6501,7 +6509,7 @@ function Yl() {
6501
6509
  return /* @__PURE__ */ r("div", { children: [
6502
6510
  /* @__PURE__ */ r("div", { className: "mb-3 flex items-center gap-2", children: [
6503
6511
  /* @__PURE__ */ e(
6504
- mn,
6512
+ hn,
6505
6513
  {
6506
6514
  checked: !!((c = t == null ? void 0 : t.formatNumber) != null && c.enabled),
6507
6515
  onCheckedChange: (m) => {
@@ -6785,7 +6793,7 @@ function no() {
6785
6793
  var c, h, d, y, x, m, C, p, v, g, N, S, z, k, O, R, j, Y;
6786
6794
  const t = f((M) => M.card), a = (h = (c = t == null ? void 0 : t.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : h.topoJsonUrl, [n, s] = J(
6787
6795
  ((y = (d = t == null ? void 0 : t.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : y.customTopoJsonUrl) || ""
6788
- ), { setCardPreferences: i } = W(), { data: o } = on(t), l = Object.keys((o == null ? void 0 : o.objects) || {}).map((M) => ({
6796
+ ), { setCardPreferences: i } = W(), { data: o } = cn(t), l = Object.keys((o == null ? void 0 : o.objects) || {}).map((M) => ({
6789
6797
  label: M,
6790
6798
  value: M
6791
6799
  })) || [];
@@ -6983,7 +6991,7 @@ function no() {
6983
6991
  )
6984
6992
  ] }) }),
6985
6993
  /* @__PURE__ */ e(Le, { className: "my-4" }),
6986
- /* @__PURE__ */ e(We, {})
6994
+ /* @__PURE__ */ e(Ye, {})
6987
6995
  ] });
6988
6996
  }
6989
6997
  function ao() {
@@ -6999,7 +7007,7 @@ function ao() {
6999
7007
  });
7000
7008
  }
7001
7009
  return /* @__PURE__ */ r(
7002
- Ca,
7010
+ Na,
7003
7011
  {
7004
7012
  value: (s = t == null ? void 0 : t.textVisualOptions) != null && s.isDynamicText ? "dynamic" : "static",
7005
7013
  onValueChange: n,
@@ -7051,14 +7059,14 @@ function gt({
7051
7059
  /* @__PURE__ */ r(le, { value: "item-2", children: [
7052
7060
  /* @__PURE__ */ e(oe, { children: "Settings" }),
7053
7061
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
7054
- t !== "text" && /* @__PURE__ */ e(Cn, {}),
7062
+ t !== "text" && /* @__PURE__ */ e(Nn, {}),
7055
7063
  t === "text" && /* @__PURE__ */ e(ao, {})
7056
7064
  ] })
7057
7065
  ] }),
7058
7066
  !["range", "text"].includes(t) && /* @__PURE__ */ r(le, { value: "item-3", children: [
7059
7067
  /* @__PURE__ */ e(oe, { children: "Filters" }),
7060
7068
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
7061
- /* @__PURE__ */ e(We, {}),
7069
+ /* @__PURE__ */ e(Ye, {}),
7062
7070
  /* @__PURE__ */ e(ot, {})
7063
7071
  ] })
7064
7072
  ] })
@@ -7137,7 +7145,7 @@ function so() {
7137
7145
  /* @__PURE__ */ r(le, { value: "item-3", children: [
7138
7146
  /* @__PURE__ */ e(oe, { children: "Filters" }),
7139
7147
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
7140
- /* @__PURE__ */ e(We, {}),
7148
+ /* @__PURE__ */ e(Ye, {}),
7141
7149
  /* @__PURE__ */ e(ot, {})
7142
7150
  ] })
7143
7151
  ] })
@@ -7157,12 +7165,12 @@ function ro({
7157
7165
  /* @__PURE__ */ e(qe, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ r(le, { value: "item-3", children: [
7158
7166
  /* @__PURE__ */ e(oe, { children: "Filters" }),
7159
7167
  /* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
7160
- /* @__PURE__ */ e(We, {}),
7168
+ /* @__PURE__ */ e(Ye, {}),
7161
7169
  /* @__PURE__ */ e(ot, {})
7162
7170
  ] })
7163
7171
  ] }) }),
7164
7172
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
7165
- /* @__PURE__ */ e(mn, { onCheckedChange: (i) => {
7173
+ /* @__PURE__ */ e(hn, { onCheckedChange: (i) => {
7166
7174
  n({
7167
7175
  ...a,
7168
7176
  allowDownload: i
@@ -7273,7 +7281,7 @@ function co() {
7273
7281
  }
7274
7282
  return /* @__PURE__ */ r(it, { className: "h-full w-full text-sm", children: [
7275
7283
  a(t),
7276
- /* @__PURE__ */ e(nt, { orientation: "horizontal" })
7284
+ /* @__PURE__ */ e(Qe, { orientation: "horizontal" })
7277
7285
  ] });
7278
7286
  }
7279
7287
  function Ns({
@@ -7333,7 +7341,7 @@ const uo = [
7333
7341
  {
7334
7342
  label: "Max",
7335
7343
  value: "MAX",
7336
- logo: /* @__PURE__ */ e(Sa, { className: "size-3.5" })
7344
+ logo: /* @__PURE__ */ e(wa, { className: "size-3.5" })
7337
7345
  }
7338
7346
  ];
7339
7347
  function mo({ column: t }) {
@@ -7409,7 +7417,7 @@ function fo({
7409
7417
  onChange: a,
7410
7418
  droppableId: n
7411
7419
  }) {
7412
- const { columns: s } = vn(), i = Pe(() => {
7420
+ const { columns: s } = xn(), i = Pe(() => {
7413
7421
  let u = [];
7414
7422
  (n === He || n === Ge || n === Ue) && (u = s);
7415
7423
  const c = u == null ? void 0 : u.filter(
@@ -7428,7 +7436,7 @@ function fo({
7428
7436
  c && a(c);
7429
7437
  }
7430
7438
  return i != null && i.length ? /* @__PURE__ */ e(
7431
- hn,
7439
+ pn,
7432
7440
  {
7433
7441
  multiple: !1,
7434
7442
  options: i,
@@ -7454,7 +7462,7 @@ function tn({
7454
7462
  className: a,
7455
7463
  delayDuration: n
7456
7464
  }) {
7457
- return /* @__PURE__ */ e(la, { children: /* @__PURE__ */ r(Ot, { delayDuration: n, children: [
7465
+ return /* @__PURE__ */ e(oa, { children: /* @__PURE__ */ r(Ot, { delayDuration: n, children: [
7458
7466
  /* @__PURE__ */ e(rn, { asChild: !0, children: /* @__PURE__ */ e(
7459
7467
  "span",
7460
7468
  {
@@ -7481,7 +7489,7 @@ function go({ column: t }) {
7481
7489
  ), u = l ? n.indexOf(l) : -1;
7482
7490
  return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
7483
7491
  l && /* @__PURE__ */ e(xs, { idx: u, col: l, children: /* @__PURE__ */ e(
7484
- Xe,
7492
+ et,
7485
7493
  {
7486
7494
  className: "w-[130px]",
7487
7495
  text: t.label || "",
@@ -7498,7 +7506,7 @@ function go({ column: t }) {
7498
7506
  o && /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
7499
7507
  /* @__PURE__ */ e(U, { children: "Pivot Header" }),
7500
7508
  /* @__PURE__ */ e(
7501
- Xe,
7509
+ et,
7502
7510
  {
7503
7511
  text: t.aliasTemplate || "",
7504
7512
  placeholder: "{label} ({pivot})",
@@ -7527,7 +7535,7 @@ function yo({
7527
7535
  transform: x,
7528
7536
  transition: m,
7529
7537
  isDragging: C
7530
- } = Ma({ id: t.id, data: { type: a } }), p = x ? {
7538
+ } = Da({ id: t.id, data: { type: a } }), p = x ? {
7531
7539
  opacity: C ? 0.5 : void 0,
7532
7540
  transform: vt.Translate.toString(x),
7533
7541
  transition: m
@@ -7687,7 +7695,7 @@ function Kt({
7687
7695
  onRemoveColumn: o
7688
7696
  }) {
7689
7697
  var p, v;
7690
- const { setNodeRef: l, isOver: u, over: c } = Da({
7698
+ const { setNodeRef: l, isOver: u, over: c } = Ia({
7691
7699
  id: t
7692
7700
  }), h = Ee((g) => g.activeId), d = f((g) => {
7693
7701
  var N;
@@ -7697,7 +7705,7 @@ function Kt({
7697
7705
  if (!x || x.length === 0)
7698
7706
  return /* @__PURE__ */ e("div", { className: "mr-5 flex h-8 grow items-center space-x-2 rounded-md border border-dashed border-muted-foreground/80 bg-background px-2 py-1 text-sm text-muted-foreground", children: /* @__PURE__ */ e("span", { className: "invisible text-muted-foreground/70 group-hover:visible", children: "Drag here" }) });
7699
7707
  }
7700
- return /* @__PURE__ */ e(pn, { items: n == null ? void 0 : n.map((g) => g.id), children: /* @__PURE__ */ r(
7708
+ return /* @__PURE__ */ e(fn, { items: n == null ? void 0 : n.map((g) => g.id), children: /* @__PURE__ */ r(
7701
7709
  "div",
7702
7710
  {
7703
7711
  className: G(
@@ -7738,7 +7746,7 @@ function Ss({ children: t, id: a, type: n }) {
7738
7746
  transform: l,
7739
7747
  transition: u,
7740
7748
  isDragging: c
7741
- } = Ma({ id: a, data: { type: n } }), h = l ? {
7749
+ } = Da({ id: a, data: { type: n } }), h = l ? {
7742
7750
  opacity: c ? 0.5 : void 0,
7743
7751
  transform: vt.Translate.toString(l),
7744
7752
  transition: u
@@ -7794,13 +7802,13 @@ function vo() {
7794
7802
  N && i(N);
7795
7803
  }
7796
7804
  return /* @__PURE__ */ e(
7797
- pn,
7805
+ fn,
7798
7806
  {
7799
7807
  items: t.map((g) => dt(g.columnId)),
7800
7808
  children: /* @__PURE__ */ r("div", { className: "space-y-2 rounded-md p-4 text-sm", children: [
7801
7809
  /* @__PURE__ */ e(U, { className: "text-sm", children: "Sort By" }),
7802
7810
  y.length > 0 && /* @__PURE__ */ e("div", { className: "mr-5", children: /* @__PURE__ */ e(
7803
- hn,
7811
+ pn,
7804
7812
  {
7805
7813
  multiple: !1,
7806
7814
  options: y,
@@ -7818,7 +7826,7 @@ function vo() {
7818
7826
  Ss,
7819
7827
  {
7820
7828
  id: dt(g.columnId),
7821
- type: xn,
7829
+ type: Cn,
7822
7830
  children: /* @__PURE__ */ e(
7823
7831
  "div",
7824
7832
  {
@@ -7936,11 +7944,11 @@ function xo() {
7936
7944
  ),
7937
7945
  /* @__PURE__ */ e(vo, {})
7938
7946
  ] }),
7939
- /* @__PURE__ */ e(nt, { orientation: "horizontal" })
7947
+ /* @__PURE__ */ e(Qe, { orientation: "horizontal" })
7940
7948
  ] })
7941
7949
  ] });
7942
7950
  }
7943
- function Nn({
7951
+ function Sn({
7944
7952
  children: t,
7945
7953
  column: a,
7946
7954
  id: n,
@@ -8027,7 +8035,7 @@ function Co({
8027
8035
  connectionId: i,
8028
8036
  // not needed
8029
8037
  dataType: t.type
8030
- }, { data: y, isLoading: x, isFetching: m, isError: C } = Ia(d), p = Pe(() => {
8038
+ }, { data: y, isLoading: x, isFetching: m, isError: C } = Oa(d), p = Pe(() => {
8031
8039
  var S;
8032
8040
  return d.column ? (S = y == null ? void 0 : y.records) == null ? void 0 : S.map((z) => {
8033
8041
  let k = d.column.split(".").slice(-1)[0].replace(/"/g, "");
@@ -8045,7 +8053,7 @@ function Co({
8045
8053
  }
8046
8054
  function g() {
8047
8055
  return x || m ? /* @__PURE__ */ e(
8048
- Oa,
8056
+ ln,
8049
8057
  {
8050
8058
  style: {
8051
8059
  borderRadius: n == null ? void 0 : n.controlInputRadius
@@ -8053,7 +8061,7 @@ function Co({
8053
8061
  className: "h-8 min-w-60 bg-foreground/10"
8054
8062
  }
8055
8063
  ) : C ? /* @__PURE__ */ e("div", { className: "flex h-8 min-w-60 items-center bg-muted px-2 text-sm", children: "Error" }) : /* @__PURE__ */ e(
8056
- hn,
8064
+ pn,
8057
8065
  {
8058
8066
  options: p,
8059
8067
  onChange: v,
@@ -8065,7 +8073,7 @@ function Co({
8065
8073
  );
8066
8074
  }
8067
8075
  return /* @__PURE__ */ e(
8068
- Nn,
8076
+ Sn,
8069
8077
  {
8070
8078
  className: "w-60",
8071
8079
  id: t.id,
@@ -8089,7 +8097,7 @@ function No({
8089
8097
  title: "",
8090
8098
  // not needed
8091
8099
  dataType: t.type
8092
- }, { isLoading: c, isFetching: h, isError: d, data: y } = Ia(u), x = y == null ? void 0 : y.records, { dateRange: m, setDateRange: C, initialDateRange: p } = Lr(x), { updateEditorFilterValue: v } = W();
8100
+ }, { isLoading: c, isFetching: h, isError: d, data: y } = Oa(u), x = y == null ? void 0 : y.records, { dateRange: m, setDateRange: C, initialDateRange: p } = Lr(x), { updateEditorFilterValue: v } = W();
8093
8101
  function g(z) {
8094
8102
  var O, R;
8095
8103
  const k = {
@@ -8102,7 +8110,7 @@ function No({
8102
8110
  v(t.name, null, !0), C(p);
8103
8111
  }
8104
8112
  function S() {
8105
- return c || h ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Oa, { className: "h-8 w-72 bg-foreground/10" }) }) : d ? /* @__PURE__ */ e("div", { className: "h-8 w-72 bg-muted px-2", children: "Error" }) : x ? /* @__PURE__ */ e(
8113
+ return c || h ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(ln, { className: "h-8 w-72 bg-foreground/10" }) }) : d ? /* @__PURE__ */ e("div", { className: "h-8 w-72 bg-muted px-2", children: "Error" }) : x ? /* @__PURE__ */ e(
8106
8114
  Er,
8107
8115
  {
8108
8116
  title: u.title,
@@ -8117,7 +8125,7 @@ function No({
8117
8125
  ) : /* @__PURE__ */ e(U, { className: "flex h-8 w-72 items-center bg-muted px-2", children: "No Data" });
8118
8126
  }
8119
8127
  return /* @__PURE__ */ e(
8120
- Nn,
8128
+ Sn,
8121
8129
  {
8122
8130
  className: "w-72",
8123
8131
  id: t.id,
@@ -8135,7 +8143,7 @@ function So({
8135
8143
  sortableType: i
8136
8144
  }) {
8137
8145
  var C, p;
8138
- const { setNodeRef: o, isOver: l, over: u } = Da({
8146
+ const { setNodeRef: o, isOver: l, over: u } = Ia({
8139
8147
  id: t
8140
8148
  }), c = Ee((v) => v.activeId), h = {
8141
8149
  // borderColor: isOver ? 'green' : undefined,
@@ -8147,7 +8155,7 @@ function So({
8147
8155
  function x(v) {
8148
8156
  const g = we(v.type);
8149
8157
  return v.id === Xa.id ? /* @__PURE__ */ e(
8150
- Nn,
8158
+ Sn,
8151
8159
  {
8152
8160
  id: v.id,
8153
8161
  sortableType: i,
@@ -8174,7 +8182,7 @@ function So({
8174
8182
  );
8175
8183
  }
8176
8184
  const m = c ? s : n;
8177
- return /* @__PURE__ */ e(pn, { items: n == null ? void 0 : n.map((v) => v.id), children: /* @__PURE__ */ r(
8185
+ return /* @__PURE__ */ e(fn, { items: n == null ? void 0 : n.map((v) => v.id), children: /* @__PURE__ */ r(
8178
8186
  "div",
8179
8187
  {
8180
8188
  className: G(
@@ -8334,7 +8342,7 @@ const Io = [
8334
8342
  }
8335
8343
  ];
8336
8344
  function Oo() {
8337
- const t = at(null), a = at(null), [n, s] = J(!1), [i, o] = J(Zn), [l, u] = J(!1), c = f((F) => F.actions.setCardSql), h = f((F) => F.actions.setRunSql), d = f((F) => F.showAIDialog), { setShowAIDialog: y } = W(), {
8345
+ const t = at(null), a = at(null), [n, s] = J(!1), [i, o] = J(Xn), [l, u] = J(!1), c = f((F) => F.actions.setCardSql), h = f((F) => F.actions.setRunSql), d = f((F) => F.showAIDialog), { setShowAIDialog: y } = W(), {
8338
8346
  messages: x,
8339
8347
  setMessages: m,
8340
8348
  reload: C,
@@ -8372,11 +8380,11 @@ function Oo() {
8372
8380
  p(D);
8373
8381
  }
8374
8382
  function b() {
8375
- return /* @__PURE__ */ r($n, { children: [
8376
- /* @__PURE__ */ e(Qn, { asChild: !0, children: /* @__PURE__ */ e(ee, { className: "h-7 p-2", size: "sm", variant: "ghost", children: /* @__PURE__ */ e(Ra, { className: "size-3.5 text-muted-foreground/70 hover:text-muted-foreground" }) }) }),
8377
- /* @__PURE__ */ r(Kn, { align: "end", children: [
8378
- /* @__PURE__ */ e(Jn, { children: "Options" }),
8379
- /* @__PURE__ */ e(Wn, {}),
8383
+ return /* @__PURE__ */ r(Qn, { children: [
8384
+ /* @__PURE__ */ e(Kn, { asChild: !0, children: /* @__PURE__ */ e(ee, { className: "h-7 p-2", size: "sm", variant: "ghost", children: /* @__PURE__ */ e(Ra, { className: "size-3.5 text-muted-foreground/70 hover:text-muted-foreground" }) }) }),
8385
+ /* @__PURE__ */ r(Jn, { align: "end", children: [
8386
+ /* @__PURE__ */ e(Wn, { children: "Options" }),
8387
+ /* @__PURE__ */ e(Yn, {}),
8380
8388
  /* @__PURE__ */ e(
8381
8389
  jt,
8382
8390
  {
@@ -8659,7 +8667,7 @@ function Ao() {
8659
8667
  }
8660
8668
  ),
8661
8669
  children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
8662
- /* @__PURE__ */ e(bn, { column: o }),
8670
+ /* @__PURE__ */ e(vn, { column: o }),
8663
8671
  /* @__PURE__ */ e("span", { children: o.column_name })
8664
8672
  ] })
8665
8673
  },
@@ -8714,8 +8722,8 @@ function Lo() {
8714
8722
  {
8715
8723
  className: "flex min-w-[250px] max-w-fit flex-col gap-1 p-2",
8716
8724
  children: [
8717
- /* @__PURE__ */ e(ka, { filter: s }),
8718
- /* @__PURE__ */ e(ba, { filter: s })
8725
+ /* @__PURE__ */ e(Ma, { filter: s }),
8726
+ /* @__PURE__ */ e(va, { filter: s })
8719
8727
  ]
8720
8728
  },
8721
8729
  s.id
@@ -8832,7 +8840,7 @@ export {
8832
8840
  Qo as SemaphorQueryClient,
8833
8841
  Bo as Surfboard,
8834
8842
  Ki as cleanCard,
8835
- ua as createSqlGenConfig,
8843
+ ma as createSqlGenConfig,
8836
8844
  el as downloadPdf,
8837
8845
  xe as fmt,
8838
8846
  Ko as getColumnDataType,
@@ -8840,7 +8848,7 @@ export {
8840
8848
  Jo as getFilterValueType,
8841
8849
  xt as getFormattedTableNameForQuery,
8842
8850
  Ir as getQualifiedTableName,
8843
- ma as getSql,
8851
+ ha as getSql,
8844
8852
  Wo as invalidateToken,
8845
8853
  Ts as isBooleanDataType,
8846
8854
  Yo as isColumnInSqlGen,