semaphor 0.0.87 → 0.0.89

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,4 +1,4 @@
1
- import { c as R, u as vs, v as M, w as is, x as Se, y as e, z as Cs, A as Ns, H as O, o as Ss, J as ws, K as ks, M as zs, N as Os, O as H, Q as ie, R as ta, V as na, W as la, Y as ra, Z as st, _ as at, $ as tt, a0 as Gs, a1 as Y, a2 as Be, i as nt, a3 as u, a4 as lt, P as ia, F as oa, a5 as Ue, a6 as Ge, a7 as Ds, a8 as ca, a9 as Ms, aa as ue, ab as he, ac as me, ad as xe, ae as ve, af as pe, ag as Z, T as Is, ah as Fs, ai as Ts, aj as Ls, ak as da, al as ua, am as ce, an as rt, ao as it, ap as ha, aq as ot, C as ct, ar as dt, as as ma, B as ut, at as fe, au as ht, av as Ke, aw as xa, ax as gs, ay as be, az as ze, aA as Ce, aB as pa, aC as mt, aD as xt, aE as pt, aF as ft, l as gt, aG as jt, aH as bt, aI as De, aJ as ne, aK as fa, aL as yt, aM as os, aN as vt, aO as Ct, aP as js, a as Nt, aQ as ss, aR as ye, aS as as, aT as St, aU as wt, aV as kt, aW as zt, aX as fs, aY as Ot, aZ as Ks, a_ as Dt, a$ as Qs, b0 as Mt, b1 as It, b2 as Ft, b3 as Tt, b4 as ga, b5 as Lt, b6 as Es, b7 as ja, b8 as Et, b9 as Vt, ba as Ze, bb as At, bc as qt, bd as ba, be as Rt, s as _t, bf as Ht, bg as $t, r as Pt, bh as cs, bi as ya, bj as va, bk as Ca, bl as Xe, bm as Na, bn as es, bo as Js, bp as Bt, bq as Ut, br as ds, bs as us, bt as hs, bu as Gt, I as Kt, X as Sa, bv as Qt, bw as Jt, bx as Wt, E as Yt, by as ms, bz as Oe, f as Zt, bA as $e, bB as Vs, bC as wa, bD as Xt, bE as en, bF as ts, bG as sn, bH as an, bI as tn, bJ as Ws, bK as ka, bL as nn, bM as ln, bN as rn, bO as on, bP as cn, bQ as dn, bR as un, bS as Me, bT as Q, bU as J, bV as As, bW as W, bX as hn, bY as za, bZ as mn, b_ as xn, b$ as pn, c0 as fn, c1 as gn, c2 as jn, c3 as bn, c4 as yn, c5 as vn } from "./index-CpBdXQXJ.js";
1
+ import { c as R, u as vs, v as M, w as is, x as Se, y as e, z as Cs, A as Ns, H as O, o as Ss, J as ws, K as ks, M as zs, N as Os, O as H, Q as ie, R as ta, V as na, W as la, Y as ra, Z as st, _ as at, $ as tt, a0 as Gs, a1 as Y, a2 as Be, i as nt, a3 as u, a4 as lt, P as ia, F as oa, a5 as Ue, a6 as Ge, a7 as Ds, a8 as ca, a9 as Ms, aa as ue, ab as he, ac as me, ad as xe, ae as ve, af as pe, ag as Z, T as Is, ah as Fs, ai as Ts, aj as Ls, ak as da, al as ua, am as ce, an as rt, ao as it, ap as ha, aq as ot, C as ct, ar as dt, as as ma, B as ut, at as fe, au as ht, av as Ke, aw as xa, ax as gs, ay as be, az as ze, aA as Ce, aB as pa, aC as mt, aD as xt, aE as pt, aF as ft, l as gt, aG as jt, aH as bt, aI as De, aJ as te, aK as fa, aL as yt, aM as os, aN as vt, aO as Ct, aP as js, a as Nt, aQ as ss, aR as ye, aS as as, aT as St, aU as wt, aV as kt, aW as zt, aX as fs, aY as Ot, aZ as Ks, a_ as Dt, a$ as Qs, b0 as Mt, b1 as It, b2 as Ft, b3 as Tt, b4 as ga, b5 as Lt, b6 as Es, b7 as ja, b8 as Et, b9 as Vt, ba as Ze, bb as At, bc as qt, bd as ba, be as Rt, s as _t, bf as Ht, bg as $t, r as Pt, bh as cs, bi as ya, bj as va, bk as Ca, bl as Xe, bm as Na, bn as es, bo as Js, bp as Bt, bq as Ut, br as ds, bs as us, bt as hs, bu as Gt, I as Kt, X as Sa, bv as Qt, bw as Jt, bx as Wt, E as Yt, by as ms, bz as Oe, f as Zt, bA as $e, bB as Vs, bC as wa, bD as Xt, bE as en, bF as ts, bG as sn, bH as an, bI as tn, bJ as Ws, bK as ka, bL as nn, bM as ln, bN as rn, bO as on, bP as cn, bQ as dn, bR as un, bS as Me, bT as Q, bU as J, bV as As, bW as W, bX as hn, bY as za, bZ as mn, b_ as xn, b$ as pn, c0 as fn, c1 as gn, c2 as jn, c3 as bn, c4 as yn, c5 as vn } from "./index-WvZUoAR6.js";
2
2
  import * as Ys from "react";
3
3
  import Ne, { useState as q, useMemo as bs, useEffect as X, useRef as ns, useCallback as Oa, Suspense as Cn } from "react";
4
4
  import "react-dom";
@@ -588,7 +588,7 @@ async function Xn(s, n) {
588
588
  }) : null;
589
589
  }
590
590
  function el() {
591
- const [s, n] = q(""), [a, t] = q(!1), l = M((p) => p.lenses), { setLenses: r, setSelectedLensId: o } = is(), [i, d] = q(!1), [x, c] = q(!1), b = M((p) => p.dashboard), g = M((p) => p.filterValues), { authToken: h } = Se();
591
+ const [s, n] = q(""), [a, t] = q(!1), l = M((p) => p.lenses), { setLenses: r, setSelectedLensId: o } = is(), [i, d] = q(!1), [m, c] = q(!1), b = M((p) => p.dashboard), g = M((p) => p.filterValues), { authToken: h } = Se();
592
592
  async function f() {
593
593
  d(!0);
594
594
  const p = Ea(
@@ -601,7 +601,7 @@ function el() {
601
601
  );
602
602
  N && (r([...l || [], N]), o(N.id), c(!1)), d(!1);
603
603
  }
604
- return /* @__PURE__ */ e.jsxs(Cs, { open: x, onOpenChange: c, children: [
604
+ return /* @__PURE__ */ e.jsxs(Cs, { open: m, onOpenChange: c, children: [
605
605
  /* @__PURE__ */ e.jsx(Ns, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
606
606
  O,
607
607
  {
@@ -659,7 +659,7 @@ function sl() {
659
659
  l(g || []), r("original");
660
660
  }
661
661
  }
662
- async function x(c) {
662
+ async function m(c) {
663
663
  const b = a == null ? void 0 : a.map((f) => f.id === c.id ? {
664
664
  ...f,
665
665
  isDefault: !c.isDefault
@@ -706,7 +706,7 @@ function sl() {
706
706
  Ln,
707
707
  {
708
708
  onClick: (b) => {
709
- b.preventDefault(), x(c);
709
+ b.preventDefault(), m(c);
710
710
  },
711
711
  className: Y(
712
712
  "size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
@@ -783,7 +783,7 @@ function tl() {
783
783
  (j) => j.isDashboardEditing
784
784
  ), o = u(
785
785
  (j) => j.selectedConnectionId
786
- ), [i, d] = q(!1), x = M((j) => j.filterValues), c = M((j) => j.isVisualEditing), b = M((j) => j.showFilters);
786
+ ), [i, d] = q(!1), m = M((j) => j.filterValues), c = M((j) => j.isVisualEditing), b = M((j) => j.showFilters);
787
787
  M(
788
788
  (j) => j.showDashboardJSON
789
789
  );
@@ -818,7 +818,7 @@ function tl() {
818
818
  activeCardId: j.id
819
819
  };
820
820
  f(I.id, D), p(D.id);
821
- }, m = () => {
821
+ }, x = () => {
822
822
  y(!0);
823
823
  };
824
824
  async function v() {
@@ -828,7 +828,7 @@ function tl() {
828
828
  ), D = JSON.stringify(j), S = {
829
829
  ...t,
830
830
  template: D,
831
- filterValues: x
831
+ filterValues: m
832
832
  };
833
833
  await ys(S, s == null ? void 0 : s.accessToken), Ge.success("Lens saved"), g == null || g(j), d(!1);
834
834
  }
@@ -862,7 +862,7 @@ function tl() {
862
862
  {
863
863
  variant: "ghost",
864
864
  className: "h-7 p-2",
865
- onClick: m,
865
+ onClick: x,
866
866
  size: "sm",
867
867
  children: /* @__PURE__ */ e.jsx(ia, { className: "h-4 w-4", strokeWidth: 1.5 })
868
868
  }
@@ -918,7 +918,7 @@ function He({
918
918
  onChange: o,
919
919
  showNone: i = !1,
920
920
  className: d,
921
- showIcon: x = !0,
921
+ showIcon: m = !0,
922
922
  disabled: c = !1
923
923
  }) {
924
924
  const b = t ? "Loading..." : l ? "Error" : a;
@@ -935,7 +935,7 @@ function He({
935
935
  return /* @__PURE__ */ e.jsx(Nn, { className: "size-4" });
936
936
  }
937
937
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
938
- x && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: r ? /* @__PURE__ */ e.jsxs(Ds, { children: [
938
+ m && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: r ? /* @__PURE__ */ e.jsxs(Ds, { children: [
939
939
  /* @__PURE__ */ e.jsx(ca, { children: g() }),
940
940
  /* @__PURE__ */ e.jsx(Ms, { className: "text-xs", align: "start", children: r })
941
941
  ] }) : g() }),
@@ -971,7 +971,7 @@ function nl({ column: s }) {
971
971
  (h) => h.selectedSchemaName
972
972
  ), r = u(
973
973
  (h) => h.selectedDatamodelId
974
- ), o = u((h) => h.sqlGen), { modelItems: i } = qe(), d = u((h) => h.actions.setSqlGen), x = u((h) => h.actions.setCardSql), c = u((h) => h.actions.setRunSql);
974
+ ), o = u((h) => h.sqlGen), { modelItems: i } = qe(), d = u((h) => h.actions.setSqlGen), m = u((h) => h.actions.setCardSql), c = u((h) => h.actions.setRunSql);
975
975
  function b(h, f) {
976
976
  var V;
977
977
  const p = da(h, o, f), N = (V = i == null ? void 0 : i.find(
@@ -984,7 +984,7 @@ function nl({ column: s }) {
984
984
  ce(t),
985
985
  N
986
986
  );
987
- y && (x(y), c(!0)), a(!1);
987
+ y && (m(y), c(!0)), a(!1);
988
988
  }
989
989
  function g() {
990
990
  return /* @__PURE__ */ e.jsxs("ul", { className: "text-xs", children: [
@@ -1054,35 +1054,35 @@ function ll({
1054
1054
  columns: a,
1055
1055
  status: t
1056
1056
  }) {
1057
- const l = u((m) => m.sqlGen), r = u(
1058
- (m) => m.selectedConnectionId
1057
+ const l = u((x) => x.sqlGen), r = u(
1058
+ (x) => x.selectedConnectionId
1059
1059
  ), o = u(
1060
- (m) => m.selectedDatabaseName
1060
+ (x) => x.selectedDatabaseName
1061
1061
  ), i = u(
1062
- (m) => m.selectedSchemaName
1063
- ), d = u((m) => m.selectedTableName), x = u(
1064
- (m) => m.selectedDatamodelId
1062
+ (x) => x.selectedSchemaName
1063
+ ), d = u((x) => x.selectedTableName), m = u(
1064
+ (x) => x.selectedDatamodelId
1065
1065
  ), c = M(
1066
- (m) => m.dashboard.aiScopeTables
1067
- ), { setAIScopeTables: b } = M((m) => m.actions), g = u((m) => m.actions.setRunSql), h = u((m) => m.actions.setSqlGen), f = u(
1068
- (m) => m.actions.setIsShowingVisual
1069
- ), p = u((m) => m.actions.setCardSql), { connectionType: N, modelItems: y } = qe();
1070
- function V(m) {
1066
+ (x) => x.dashboard.aiScopeTables
1067
+ ), { setAIScopeTables: b } = M((x) => x.actions), g = u((x) => x.actions.setRunSql), h = u((x) => x.actions.setSqlGen), f = u(
1068
+ (x) => x.actions.setIsShowingVisual
1069
+ ), p = u((x) => x.actions.setCardSql), { connectionType: N, modelItems: y } = qe();
1070
+ function V(x) {
1071
1071
  var S;
1072
- const v = da(m, l);
1072
+ const v = da(x, l);
1073
1073
  h(v);
1074
1074
  const j = (S = y == null ? void 0 : y.find(
1075
- (_) => _.id === x
1075
+ (_) => _.id === m
1076
1076
  )) == null ? void 0 : S.name, D = ua(v, ce(s), ce(n), j);
1077
1077
  D && (p(D), g(!0));
1078
1078
  }
1079
1079
  function I() {
1080
1080
  return (c == null ? void 0 : c.find(
1081
- (m) => m.connectinonId === r && m.tableName === d
1081
+ (x) => x.connectinonId === r && x.tableName === d
1082
1082
  )) !== void 0;
1083
1083
  }
1084
- function z(m) {
1085
- if (m === !0 && d && r) {
1084
+ function z(x) {
1085
+ if (x === !0 && d && r) {
1086
1086
  const v = {
1087
1087
  connectinonId: r,
1088
1088
  connectionType: N,
@@ -1112,23 +1112,23 @@ function ll({
1112
1112
  }
1113
1113
  function F() {
1114
1114
  var S;
1115
- let m = xa(s, n);
1115
+ let x = xa(s, n);
1116
1116
  const v = (S = y == null ? void 0 : y.find(
1117
- (_) => _.id === x
1117
+ (_) => _.id === m
1118
1118
  )) == null ? void 0 : S.name;
1119
- x && x !== "none" && (m = `${gs}.${v}`);
1120
- let j = m;
1119
+ m && m !== "none" && (x = `${gs}.${v}`);
1120
+ let j = x;
1121
1121
  return ((_) => /[A-Z]/.test(_))(n) && (j = j.split(".").map((P) => `"${P}"`).join(".")), j;
1122
1122
  }
1123
1123
  function T() {
1124
- const m = F();
1124
+ const x = F();
1125
1125
  f(!1);
1126
- const v = N === "MSSQL" ? `SELECT top 10 * FROM ${m}` : `SELECT * FROM ${m} LIMIT 10`;
1126
+ const v = N === "MSSQL" ? `SELECT top 10 * FROM ${x}` : `SELECT * FROM ${x} LIMIT 10`;
1127
1127
  p(v), g(!0);
1128
1128
  }
1129
1129
  function A() {
1130
- const m = F();
1131
- p(`SELECT COUNT(*) as count FROM ${m}`), g(!0);
1130
+ const x = F();
1131
+ p(`SELECT COUNT(*) as count FROM ${x}`), g(!0);
1132
1132
  }
1133
1133
  return /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-4 px-4", children: [
1134
1134
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center gap-1", children: [
@@ -1185,32 +1185,32 @@ function ll({
1185
1185
  {
1186
1186
  className: "flex-1 basis-0 overflow-y-auto border-b border-t border-muted py-3",
1187
1187
  children: [
1188
- a == null ? void 0 : a.map((m) => /* @__PURE__ */ e.jsxs(
1188
+ a == null ? void 0 : a.map((x) => /* @__PURE__ */ e.jsxs(
1189
1189
  "div",
1190
1190
  {
1191
- onClick: () => V(m),
1191
+ onClick: () => V(x),
1192
1192
  className: Y(
1193
1193
  "group mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
1194
1194
  {
1195
- "bg-muted": ht(m, l)
1195
+ "bg-muted": ht(x, l)
1196
1196
  }
1197
1197
  ),
1198
1198
  children: [
1199
1199
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
1200
- /* @__PURE__ */ e.jsx(Va, { column: m }),
1201
- /* @__PURE__ */ e.jsx("span", { children: m.column_name })
1200
+ /* @__PURE__ */ e.jsx(Va, { column: x }),
1201
+ /* @__PURE__ */ e.jsx("span", { children: x.column_name })
1202
1202
  ] }),
1203
1203
  /* @__PURE__ */ e.jsx(
1204
1204
  "div",
1205
1205
  {
1206
1206
  onClick: (v) => v.stopPropagation(),
1207
1207
  className: "flex items-center justify-end",
1208
- children: ha(m.data_type) && /* @__PURE__ */ e.jsx(nl, { column: m })
1208
+ children: ha(x.data_type) && /* @__PURE__ */ e.jsx(nl, { column: x })
1209
1209
  }
1210
1210
  )
1211
1211
  ]
1212
1212
  },
1213
- m.column_name
1213
+ x.column_name
1214
1214
  )),
1215
1215
  /* @__PURE__ */ e.jsx(Ke, { orientation: "vertical" }),
1216
1216
  /* @__PURE__ */ e.jsx(Ke, { orientation: "horizontal" })
@@ -1230,7 +1230,7 @@ function qe(s, n) {
1230
1230
  (C) => C.selectedDatabaseName
1231
1231
  ), i = u(
1232
1232
  (C) => C.selectedSchemaName
1233
- ), d = u((C) => C.selectedTableName), x = u(
1233
+ ), d = u((C) => C.selectedTableName), m = u(
1234
1234
  (C) => C.actions.setCurrentColumns
1235
1235
  ), c = u(
1236
1236
  (C) => C.actions.setSelectedConnectionId
@@ -1267,7 +1267,7 @@ function qe(s, n) {
1267
1267
  }), {
1268
1268
  data: T,
1269
1269
  isLoading: A,
1270
- isError: m
1270
+ isError: x
1271
1271
  } = be({
1272
1272
  queryKey: ["models", l],
1273
1273
  queryFn: () => ze(
@@ -1340,7 +1340,7 @@ function qe(s, n) {
1340
1340
  ),
1341
1341
  enabled: N(j)
1342
1342
  }), {
1343
- data: te,
1343
+ data: ne,
1344
1344
  isLoading: je,
1345
1345
  isFetching: Fe,
1346
1346
  isError: we
@@ -1375,8 +1375,8 @@ function qe(s, n) {
1375
1375
  // && currentConnection?.type !== 'API', // Only fetch if connectionId, database, and table is present
1376
1376
  });
1377
1377
  X(() => {
1378
- x(a);
1379
- }, [te, x, a]), X(() => {
1378
+ m(a);
1379
+ }, [ne, m, a]), X(() => {
1380
1380
  }, [
1381
1381
  D,
1382
1382
  p,
@@ -1398,7 +1398,7 @@ function qe(s, n) {
1398
1398
  function le(C) {
1399
1399
  b(C === "none" ? "" : C), C !== "none" && C !== "" && g("");
1400
1400
  }
1401
- S && (($s = S == null ? void 0 : S.databases) == null ? void 0 : $s.length) > 0, G && ((Ps = G == null ? void 0 : G.schemas) == null ? void 0 : Ps.length) > 0, te && ((Bs = te == null ? void 0 : te.columns) == null ? void 0 : Bs.length) > 0 && (a = te.columns.map((C) => ({
1401
+ S && (($s = S == null ? void 0 : S.databases) == null ? void 0 : $s.length) > 0, G && ((Ps = G == null ? void 0 : G.schemas) == null ? void 0 : Ps.length) > 0, ne && ((Bs = ne == null ? void 0 : ne.columns) == null ? void 0 : Bs.length) > 0 && (a = ne.columns.map((C) => ({
1402
1402
  ...C,
1403
1403
  data_type: C.data_type.toLowerCase()
1404
1404
  }))), K && (a = []), (we || F) && (a = []);
@@ -1427,7 +1427,7 @@ function qe(s, n) {
1427
1427
  isConnectionsError: F,
1428
1428
  modelItems: oe,
1429
1429
  isModelsLoading: A,
1430
- isModelsError: m,
1430
+ isModelsError: x,
1431
1431
  databaseItems: _e,
1432
1432
  isDatabasesLoadingOrFetching: _ || P,
1433
1433
  isDatabaseError: K,
@@ -1467,7 +1467,7 @@ function Aa({
1467
1467
  ), {
1468
1468
  connectionItems: i,
1469
1469
  modelItems: d,
1470
- schemaItems: x,
1470
+ schemaItems: m,
1471
1471
  databaseItems: c,
1472
1472
  tableItems: b,
1473
1473
  columns: g,
@@ -1482,7 +1482,7 @@ function Aa({
1482
1482
  isColumnsError: F,
1483
1483
  isColumnsLoadingOrFetching: T,
1484
1484
  isTableLoadingOrFetching: A,
1485
- isTableError: m,
1485
+ isTableError: x,
1486
1486
  connectionType: v,
1487
1487
  isNonDbConnection: j,
1488
1488
  handleConnectionChange: D,
@@ -1553,7 +1553,7 @@ function Aa({
1553
1553
  onChange: _,
1554
1554
  isError: z,
1555
1555
  isLoading: I,
1556
- items: x,
1556
+ items: m,
1557
1557
  value: l || "",
1558
1558
  title: "Schema"
1559
1559
  }
@@ -1568,7 +1568,7 @@ function Aa({
1568
1568
  He,
1569
1569
  {
1570
1570
  onChange: o,
1571
- isError: m,
1571
+ isError: x,
1572
1572
  items: b,
1573
1573
  isLoading: A,
1574
1574
  value: r || "",
@@ -1719,7 +1719,7 @@ function cl({
1719
1719
  triggerAIRun: l,
1720
1720
  setTriggerAIRun: r
1721
1721
  }) {
1722
- const o = ns(null), i = ns(null), { authToken: d } = Se(), [x, c] = q(!1), b = u((k) => k.actions.setCardSql), g = M((k) => k.dashboard.baseQueries), h = u((k) => k.actions.setRunSql), f = u((k) => k.actions.setCardType), [p, N] = q([]), y = u((k) => k.currentColumns), V = u((k) => k.card.sql), I = u((k) => k.selectedTableName), z = `
1722
+ const o = ns(null), i = ns(null), { authToken: d } = Se(), [m, c] = q(!1), b = u((k) => k.actions.setCardSql), g = M((k) => k.dashboard.baseQueries), h = u((k) => k.actions.setRunSql), f = u((k) => k.actions.setCardType), [p, N] = q([]), y = u((k) => k.currentColumns), V = u((k) => k.card.sql), I = u((k) => k.selectedTableName), z = `
1723
1723
  ${a}
1724
1724
 
1725
1725
  Database Query Dialect: ${I === "api" || I === "s3" ? "DuckDb" : ""}
@@ -1727,13 +1727,13 @@ function cl({
1727
1727
  Table Columns: ${y == null ? void 0 : y.map((k) => `${k.column_name} | ${k.data_type}`).join(", ")}
1728
1728
  User SQL: ${V}
1729
1729
  ${g && `Base Queries: ${JSON.stringify(g)} `}`, F = ` When the user asks for a specific chart please use the following query structure to generate the chart query. Do not make up the column names. Use only the table columns provided above for the query. Replace x-axis, y-axis, and lables with the appropriate column names.
1730
- Visual Query Syntax: ${ol}`, { data: T, isLoading: A, isFetching: m, isError: v, refetch: j } = be({
1730
+ Visual Query Syntax: ${ol}`, { data: T, isLoading: A, isFetching: x, isError: v, refetch: j } = be({
1731
1731
  queryKey: ["ai-query"],
1732
1732
  queryFn: () => ze(
1733
1733
  "https://semaphor.cloud/api/v1/ai",
1734
1734
  (d == null ? void 0 : d.accessToken) || "",
1735
1735
  {
1736
- user_content: `userContent: ${z} ${x ? F : ""}`
1736
+ user_content: `userContent: ${z} ${m ? F : ""}`
1737
1737
  }
1738
1738
  ),
1739
1739
  enabled: !1
@@ -1902,7 +1902,7 @@ function cl({
1902
1902
  className: Y(
1903
1903
  "max-h-10 min-h-7 resize-none border-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
1904
1904
  ),
1905
- disabled: A || m,
1905
+ disabled: A || x,
1906
1906
  value: a,
1907
1907
  onChange: (k) => t(k.target.value)
1908
1908
  }
@@ -1915,7 +1915,7 @@ function cl({
1915
1915
  size: "sm",
1916
1916
  variant: "ghost",
1917
1917
  onClick: S,
1918
- children: !A && !m ? /* @__PURE__ */ e.jsx(mt, {}) : /* @__PURE__ */ e.jsx(Ae, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1918
+ children: !A && !x ? /* @__PURE__ */ e.jsx(mt, {}) : /* @__PURE__ */ e.jsx(Ae, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1919
1919
  }
1920
1920
  )
1921
1921
  ] })
@@ -2054,7 +2054,7 @@ function jl({ sql: s }) {
2054
2054
  ] });
2055
2055
  }
2056
2056
  function _a(s) {
2057
- const { theme: n } = jt(), a = M((p) => p.theme), t = u((p) => p.frame), l = u((p) => p.card), r = u((p) => p.activeTabCardId), o = bt(), { refetch: i } = De(l), { updateCardTab: d, setRunSql: x } = ne(), c = ns(), b = ns({}), g = t.cards.find((p) => p.id === r), h = Oa(() => {
2057
+ const { theme: n } = jt(), a = M((p) => p.theme), t = u((p) => p.frame), l = u((p) => p.card), r = u((p) => p.activeTabCardId), o = bt(), { refetch: i } = De(l), { updateCardTab: d, setRunSql: m } = te(), c = ns(), b = ns({}), g = t.cards.find((p) => p.id === r), h = Oa(() => {
2058
2058
  let p = "";
2059
2059
  return s === "python" && (p = (g == null ? void 0 : g.python) || fa), s === "sql" && (p = (g == null ? void 0 : g.sql) || ""), p;
2060
2060
  }, [s, g]);
@@ -2070,14 +2070,14 @@ function _a(s) {
2070
2070
  }
2071
2071
  c.current.setModel(N);
2072
2072
  }
2073
- d(r, l), x(!0);
2073
+ d(r, l), m(!0);
2074
2074
  }
2075
2075
  }, [
2076
2076
  r,
2077
2077
  l,
2078
2078
  d,
2079
2079
  o,
2080
- x,
2080
+ m,
2081
2081
  s,
2082
2082
  h
2083
2083
  ]), X(() => {
@@ -2115,7 +2115,7 @@ function _a(s) {
2115
2115
  return { handleEditorDidMount: f };
2116
2116
  }
2117
2117
  function bl() {
2118
- const s = u((o) => o.card.sql), n = u((o) => o.sqlGen), { setCardSql: a, setSqlGen: t } = ne(), { handleEditorDidMount: l } = _a("sql");
2118
+ const s = u((o) => o.card.sql), n = u((o) => o.sqlGen), { setCardSql: a, setSqlGen: t } = te(), { handleEditorDidMount: l } = _a("sql");
2119
2119
  function r(o) {
2120
2120
  a(o), vt(n) || t({});
2121
2121
  }
@@ -2144,7 +2144,7 @@ function bl() {
2144
2144
  );
2145
2145
  }
2146
2146
  function yl() {
2147
- const s = u((l) => l.card.python), { setCardPython: n } = ne(), { handleEditorDidMount: a } = _a("python");
2147
+ const s = u((l) => l.card.python), { setCardPython: n } = te(), { handleEditorDidMount: a } = _a("python");
2148
2148
  function t(l) {
2149
2149
  n(l);
2150
2150
  }
@@ -2207,7 +2207,7 @@ function Cl() {
2207
2207
  const [s, n] = q({
2208
2208
  queryKey: [],
2209
2209
  queryData: null
2210
- }), a = Ct(), [t, l] = q(!1), [r, o] = q(!1), [i, d] = q(!1), [x, c] = q(""), [b, g] = q(!1), h = u((w) => w.frame), f = u((w) => w.card), p = u((w) => w.isShowingVisual), N = u(
2210
+ }), a = Ct(), [t, l] = q(!1), [r, o] = q(!1), [i, d] = q(!1), [m, c] = q(""), [b, g] = q(!1), h = u((w) => w.frame), f = u((w) => w.card), p = u((w) => w.isShowingVisual), N = u(
2211
2211
  (w) => w.selectedConnectionId
2212
2212
  ), y = u(
2213
2213
  (w) => w.selectedDatabaseName
@@ -2220,13 +2220,13 @@ function Cl() {
2220
2220
  return (le = w == null ? void 0 : w.card) == null ? void 0 : le.sql;
2221
2221
  }), T = u((w) => w.applyFilters), {
2222
2222
  setCardCustomCfg: A,
2223
- setQueryResultColumns: m,
2223
+ setQueryResultColumns: x,
2224
2224
  setCardSql: v,
2225
2225
  setQueryError: j,
2226
2226
  setPythonStdOut: D,
2227
2227
  setCardPreferences: S,
2228
2228
  setCardType: _
2229
- } = ne(), P = u((w) => w.onSave), K = u((w) => w.onClose), ee = u((w) => w.actions.setSqlGen), G = u((w) => w.runSql), se = u((w) => w.actions.setRunSql), k = u((w) => w.actions.setCardCfg), $ = u(
2229
+ } = te(), P = u((w) => w.onSave), K = u((w) => w.onClose), ee = u((w) => w.actions.setSqlGen), G = u((w) => w.runSql), se = u((w) => w.actions.setRunSql), k = u((w) => w.actions.setCardCfg), $ = u(
2230
2230
  (w) => w.actions.setIsSqlRunning
2231
2231
  ), {
2232
2232
  data: U,
@@ -2235,7 +2235,7 @@ function Cl() {
2235
2235
  isSuccess: re,
2236
2236
  isError: B,
2237
2237
  error: ae,
2238
- queryKey: te,
2238
+ queryKey: ne,
2239
2239
  refetch: je
2240
2240
  } = De(f);
2241
2241
  X(() => {
@@ -2244,10 +2244,10 @@ function Cl() {
2244
2244
  richColors: !0
2245
2245
  }), D((U == null ? void 0 : U.output) || ""), U.records.length > 0)) {
2246
2246
  const { dimensionKeys: w } = js(U.records);
2247
- m(w);
2247
+ x(w);
2248
2248
  }
2249
- }, [U, m, D]), X(() => {
2250
- (E || L) && $(!0), (B || re) && $(!1), B ? (j(ae.message), m([]), D("")) : j("");
2249
+ }, [U, x, D]), X(() => {
2250
+ (E || L) && $(!0), (B || re) && $(!1), B ? (j(ae.message), x([]), D("")) : j("");
2251
2251
  }, [
2252
2252
  E,
2253
2253
  L,
@@ -2256,18 +2256,18 @@ function Cl() {
2256
2256
  B,
2257
2257
  re,
2258
2258
  $,
2259
- m,
2259
+ x,
2260
2260
  j,
2261
2261
  ae
2262
2262
  ]), X(() => {
2263
- G && (a.getQueryData(te) || je(), se(!1));
2264
- }, [G, je, se, te, a]);
2263
+ G && (a.getQueryData(ne) || je(), se(!1));
2264
+ }, [G, je, se, ne, a]);
2265
2265
  function Fe() {
2266
- const w = a.getQueryData(te);
2266
+ const w = a.getQueryData(ne);
2267
2267
  s.queryData || n({
2268
- queryKey: te,
2268
+ queryKey: ne,
2269
2269
  queryData: w
2270
- }), a.setQueryData(te, null), v(""), ee({}), k(void 0), A(""), S({}), _("bar");
2270
+ }), v(""), ee({}), k(void 0), A(""), S({}), _("bar");
2271
2271
  }
2272
2272
  function we(w, le) {
2273
2273
  if (w.length === 0)
@@ -2480,7 +2480,7 @@ function Cl() {
2480
2480
  {
2481
2481
  open: i,
2482
2482
  setOpen: d,
2483
- userInput: x,
2483
+ userInput: m,
2484
2484
  triggerAIRun: b,
2485
2485
  setTriggerAIRun: g,
2486
2486
  setUserInput: (w) => c(w)
@@ -2529,7 +2529,7 @@ function Nl({ data: s }) {
2529
2529
  // header: key,
2530
2530
  accessorKey: i,
2531
2531
  header: ({ column: d }) => {
2532
- const x = d.getIsSorted();
2532
+ const m = d.getIsSorted();
2533
2533
  return /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ e.jsxs(
2534
2534
  "div",
2535
2535
  {
@@ -2537,7 +2537,7 @@ function Nl({ data: s }) {
2537
2537
  onClick: () => d.toggleSorting(d.getIsSorted() === "asc"),
2538
2538
  children: [
2539
2539
  i,
2540
- x === "asc" ? /* @__PURE__ */ e.jsx(St, { className: "ml-2 h-5 w-5" }) : x === "desc" ? /* @__PURE__ */ e.jsx(wt, { className: "ml-2 h-5 w-5" }) : null
2540
+ m === "asc" ? /* @__PURE__ */ e.jsx(St, { className: "ml-2 h-5 w-5" }) : m === "desc" ? /* @__PURE__ */ e.jsx(wt, { className: "ml-2 h-5 w-5" }) : null
2541
2541
  ]
2542
2542
  }
2543
2543
  ) });
@@ -2578,15 +2578,15 @@ function Nl({ data: s }) {
2578
2578
  ] }) });
2579
2579
  }
2580
2580
  function Sl({ card: s }) {
2581
- var y, V, I, z, F, T, A, m, v, j, D;
2581
+ var y, V, I, z, F, T, A, x, v, j, D;
2582
2582
  const [n, a] = q(!1), [t, l] = q(
2583
2583
  []
2584
2584
  ), { authToken: r } = Se(), o = Tt(r == null ? void 0 : r.accessToken), i = M((S) => S.themeStyle), d = {
2585
2585
  colors: ((V = (y = i == null ? void 0 : i.chart) == null ? void 0 : y.dataset) == null ? void 0 : V.backgroundColor) || []
2586
2586
  };
2587
2587
  (I = s.customCardPreferences) != null && I.inputData;
2588
- const { getCard: x } = ga(((z = s.customCardPreferences) == null ? void 0 : z.url) || ""), c = ((F = s.customCardPreferences) == null ? void 0 : F.visualType) || "single", b = u((S) => S.frame);
2589
- ne();
2588
+ const { getCard: m } = ga(((z = s.customCardPreferences) == null ? void 0 : z.url) || ""), c = ((F = s.customCardPreferences) == null ? void 0 : F.visualType) || "single", b = u((S) => S.frame);
2589
+ te();
2590
2590
  const { data: g } = De(s), h = Oa((S, _) => {
2591
2591
  l((P) => ({
2592
2592
  ...P,
@@ -2595,14 +2595,14 @@ function Sl({ card: s }) {
2595
2595
  }, []);
2596
2596
  if (!((T = s.customCardPreferences) != null && T.componentName))
2597
2597
  return null;
2598
- const f = x(
2598
+ const f = m(
2599
2599
  (A = s.customCardPreferences) == null ? void 0 : A.componentName
2600
2600
  );
2601
2601
  function p(S) {
2602
2602
  a(S);
2603
2603
  }
2604
2604
  const N = Object.keys(
2605
- ((m = s.customCardPreferences) == null ? void 0 : m.dataInputCardIds) || {}
2605
+ ((x = s.customCardPreferences) == null ? void 0 : x.dataInputCardIds) || {}
2606
2606
  ).map((S) => {
2607
2607
  var K, ee, G;
2608
2608
  const _ = (ee = (K = s.customCardPreferences) == null ? void 0 : K.dataInputCardIds) == null ? void 0 : ee[S].cardId, P = (G = b == null ? void 0 : b.cards) == null ? void 0 : G.find((se) => se.id === _);
@@ -2672,7 +2672,7 @@ function Ha({
2672
2672
  var N;
2673
2673
  const a = u((y) => y.card), t = ((N = a.customCardPreferences) == null ? void 0 : N.showCardHeader) ?? !0, l = u((y) => y.frame), r = M((y) => y.dashboard.filters);
2674
2674
  u((y) => y.actions.setRunSql);
2675
- const { updateFilter: o } = is(), i = r == null ? void 0 : r.find((y) => y.id === l.filterId), { data: d, isLoading: x, isFetching: c } = De(a), { setCard: b } = ne(), { data: g } = Es(a);
2675
+ const { updateFilter: o } = is(), i = r == null ? void 0 : r.find((y) => y.id === l.filterId), { data: d, isLoading: m, isFetching: c } = De(a), { setCard: b } = te(), { data: g } = Es(a);
2676
2676
  if (!a.id) return null;
2677
2677
  let h;
2678
2678
  d != null && d.records && (d == null ? void 0 : d.records.length) > 0 && (h = ja({
@@ -2688,7 +2688,7 @@ function Ha({
2688
2688
  }
2689
2689
  function p() {
2690
2690
  var y;
2691
- if (d != null && d.records && (d == null ? void 0 : d.records.length) === 0 && !x && !c)
2691
+ if (d != null && d.records && (d == null ? void 0 : d.records.length) === 0 && !m && !c)
2692
2692
  return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [
2693
2693
  /* @__PURE__ */ e.jsx(_t, { className: "size-8 text-muted-foreground" }),
2694
2694
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "No records to display" })
@@ -2873,7 +2873,7 @@ const ea = ({ language: s, value: n, onChange: a }) => /* @__PURE__ */ e.jsx(
2873
2873
  /* @__PURE__ */ e.jsx(O, { onClick: l, variant: "outline", children: "Close" })
2874
2874
  ] });
2875
2875
  function Ol() {
2876
- const [s, n] = q(!1), [a, t] = q(""), [l, r] = q(""), [o, i] = q(""), [d, x] = q(""), c = u((z) => z.card), b = u((z) => z.card.customCfg), { data: g } = De(c), { data: h } = Es(c), { setCardCustomCfg: f, setCustomVisualCode: p } = ne(), N = (z) => {
2876
+ const [s, n] = q(!1), [a, t] = q(""), [l, r] = q(""), [o, i] = q(""), [d, m] = q(""), c = u((z) => z.card), b = u((z) => z.card.customCfg), { data: g } = De(c), { data: h } = Es(c), { setCardCustomCfg: f, setCustomVisualCode: p } = te(), N = (z) => {
2877
2877
  var F, T;
2878
2878
  return JSON.stringify(
2879
2879
  {
@@ -2906,10 +2906,10 @@ function Ol() {
2906
2906
  try {
2907
2907
  if (o && p(o), l) {
2908
2908
  const z = JSON.parse(l);
2909
- f(z), x("");
2909
+ f(z), m("");
2910
2910
  }
2911
2911
  } catch {
2912
- x("Invalid JSON configuration");
2912
+ m("Invalid JSON configuration");
2913
2913
  }
2914
2914
  }, I = () => {
2915
2915
  if (b) {
@@ -2987,7 +2987,7 @@ function Wa(s) {
2987
2987
  const [n, a] = q(null);
2988
2988
  return X(() => {
2989
2989
  s && (async () => {
2990
- const r = (await import("./lucide-react-CoTyczdi.js"))[s];
2990
+ const r = (await import("./lucide-react-CmVFr7-K.js"))[s];
2991
2991
  a(r);
2992
2992
  })();
2993
2993
  }, [s]), n;
@@ -3041,8 +3041,8 @@ const Ml = ({
3041
3041
  };
3042
3042
  function Il() {
3043
3043
  var c, b;
3044
- const [s, n] = q(!1), a = u((g) => g.card), t = a.type, { setCardType: l, setCardPreferences: r, setChartOrientation: o } = u((g) => g.actions), { setCardCustomCfg: i, setCustomCardPreferences: d } = ne();
3045
- function x(g, h) {
3044
+ const [s, n] = q(!1), a = u((g) => g.card), t = a.type, { setCardType: l, setCardPreferences: r, setChartOrientation: o } = u((g) => g.actions), { setCardCustomCfg: i, setCustomCardPreferences: d } = te();
3045
+ function m(g, h) {
3046
3046
  i(null), r({}), l(g), h && d({
3047
3047
  type: "component",
3048
3048
  visualType: "single",
@@ -3066,7 +3066,7 @@ function Il() {
3066
3066
  /* @__PURE__ */ e.jsx(
3067
3067
  O,
3068
3068
  {
3069
- onClick: () => x("bar"),
3069
+ onClick: () => m("bar"),
3070
3070
  className: "font-normal",
3071
3071
  variant: "ghost",
3072
3072
  children: /* @__PURE__ */ e.jsx(qs, { className: "size-5" })
@@ -3075,7 +3075,7 @@ function Il() {
3075
3075
  /* @__PURE__ */ e.jsx(
3076
3076
  O,
3077
3077
  {
3078
- onClick: () => x("line"),
3078
+ onClick: () => m("line"),
3079
3079
  variant: "ghost",
3080
3080
  children: /* @__PURE__ */ e.jsx(Rs, { className: "size-5" })
3081
3081
  }
@@ -3083,7 +3083,7 @@ function Il() {
3083
3083
  /* @__PURE__ */ e.jsx(
3084
3084
  O,
3085
3085
  {
3086
- onClick: () => x("stackedBar"),
3086
+ onClick: () => m("stackedBar"),
3087
3087
  variant: "ghost",
3088
3088
  children: /* @__PURE__ */ e.jsx(Ka, { className: "size-5", strokeWidth: 0 })
3089
3089
  }
@@ -3091,7 +3091,7 @@ function Il() {
3091
3091
  /* @__PURE__ */ e.jsx(
3092
3092
  O,
3093
3093
  {
3094
- onClick: () => x("stackedLine"),
3094
+ onClick: () => m("stackedLine"),
3095
3095
  variant: "ghost",
3096
3096
  children: /* @__PURE__ */ e.jsx(Ga, { className: "size-5", strokeWidth: 0 })
3097
3097
  }
@@ -3099,7 +3099,7 @@ function Il() {
3099
3099
  /* @__PURE__ */ e.jsx(
3100
3100
  O,
3101
3101
  {
3102
- onClick: () => x("scatter"),
3102
+ onClick: () => m("scatter"),
3103
3103
  variant: "ghost",
3104
3104
  children: /* @__PURE__ */ e.jsx(Ia, { className: "size-5" })
3105
3105
  }
@@ -3107,7 +3107,7 @@ function Il() {
3107
3107
  /* @__PURE__ */ e.jsx(
3108
3108
  O,
3109
3109
  {
3110
- onClick: () => x("bubble"),
3110
+ onClick: () => m("bubble"),
3111
3111
  variant: "ghost",
3112
3112
  children: /* @__PURE__ */ e.jsx(Ua, { className: "size-4" })
3113
3113
  }
@@ -3115,7 +3115,7 @@ function Il() {
3115
3115
  /* @__PURE__ */ e.jsx(
3116
3116
  O,
3117
3117
  {
3118
- onClick: () => x("pie"),
3118
+ onClick: () => m("pie"),
3119
3119
  variant: "ghost",
3120
3120
  children: /* @__PURE__ */ e.jsx(Ma, { className: "size-5" })
3121
3121
  }
@@ -3123,7 +3123,7 @@ function Il() {
3123
3123
  /* @__PURE__ */ e.jsx(
3124
3124
  O,
3125
3125
  {
3126
- onClick: () => x("doughnut"),
3126
+ onClick: () => m("doughnut"),
3127
3127
  variant: "ghost",
3128
3128
  children: /* @__PURE__ */ e.jsx(Pa, { className: "size-5", strokeWidth: 1 })
3129
3129
  }
@@ -3131,7 +3131,7 @@ function Il() {
3131
3131
  /* @__PURE__ */ e.jsx(
3132
3132
  O,
3133
3133
  {
3134
- onClick: () => x("radar"),
3134
+ onClick: () => m("radar"),
3135
3135
  variant: "ghost",
3136
3136
  children: /* @__PURE__ */ e.jsx(
3137
3137
  $a,
@@ -3145,7 +3145,7 @@ function Il() {
3145
3145
  /* @__PURE__ */ e.jsx(
3146
3146
  O,
3147
3147
  {
3148
- onClick: () => x("polarArea"),
3148
+ onClick: () => m("polarArea"),
3149
3149
  variant: "ghost",
3150
3150
  children: /* @__PURE__ */ e.jsx(Ba, { className: "size-5" })
3151
3151
  }
@@ -3153,7 +3153,7 @@ function Il() {
3153
3153
  /* @__PURE__ */ e.jsx(
3154
3154
  O,
3155
3155
  {
3156
- onClick: () => x("pyramid"),
3156
+ onClick: () => m("pyramid"),
3157
3157
  variant: "ghost",
3158
3158
  children: /* @__PURE__ */ e.jsx(Ja, { className: "size-5" })
3159
3159
  }
@@ -3161,7 +3161,7 @@ function Il() {
3161
3161
  /* @__PURE__ */ e.jsx(
3162
3162
  O,
3163
3163
  {
3164
- onClick: () => x("range"),
3164
+ onClick: () => m("range"),
3165
3165
  variant: "ghost",
3166
3166
  children: /* @__PURE__ */ e.jsx(Da, { className: "size-5" })
3167
3167
  }
@@ -3169,7 +3169,7 @@ function Il() {
3169
3169
  /* @__PURE__ */ e.jsx(
3170
3170
  O,
3171
3171
  {
3172
- onClick: () => x("table"),
3172
+ onClick: () => m("table"),
3173
3173
  variant: "ghost",
3174
3174
  children: /* @__PURE__ */ e.jsx(Is, { className: "size-5" })
3175
3175
  }
@@ -3177,7 +3177,7 @@ function Il() {
3177
3177
  /* @__PURE__ */ e.jsx(
3178
3178
  O,
3179
3179
  {
3180
- onClick: () => x("kpi"),
3180
+ onClick: () => m("kpi"),
3181
3181
  variant: "ghost",
3182
3182
  children: /* @__PURE__ */ e.jsx(Qa, { className: "size-6" })
3183
3183
  }
@@ -3185,7 +3185,7 @@ function Il() {
3185
3185
  /* @__PURE__ */ e.jsx(
3186
3186
  O,
3187
3187
  {
3188
- onClick: () => x("text"),
3188
+ onClick: () => m("text"),
3189
3189
  variant: "ghost",
3190
3190
  children: /* @__PURE__ */ e.jsx(_s, { className: "size-4" })
3191
3191
  }
@@ -3193,7 +3193,7 @@ function Il() {
3193
3193
  /* @__PURE__ */ e.jsx(
3194
3194
  O,
3195
3195
  {
3196
- onClick: () => x("map"),
3196
+ onClick: () => m("map"),
3197
3197
  variant: "ghost",
3198
3198
  children: /* @__PURE__ */ e.jsx(Ta, { className: "size-4" })
3199
3199
  }
@@ -3201,13 +3201,13 @@ function Il() {
3201
3201
  /* @__PURE__ */ e.jsx(
3202
3202
  O,
3203
3203
  {
3204
- onClick: () => x("custom"),
3204
+ onClick: () => m("custom"),
3205
3205
  variant: "ghost",
3206
3206
  children: /* @__PURE__ */ e.jsx(La, { className: "size-4" })
3207
3207
  }
3208
3208
  )
3209
3209
  ] }),
3210
- /* @__PURE__ */ e.jsx(Dl, { onChartTypeChange: x })
3210
+ /* @__PURE__ */ e.jsx(Dl, { onChartTypeChange: m })
3211
3211
  ] })
3212
3212
  ] });
3213
3213
  }
@@ -3258,7 +3258,7 @@ function Fl({
3258
3258
  function Tl() {
3259
3259
  var n;
3260
3260
  const s = u((a) => a.card);
3261
- return (n = s.customCardPreferences) == null || n.showCardHeader, ne(), /* @__PURE__ */ e.jsxs(na, { children: [
3261
+ return (n = s.customCardPreferences) == null || n.showCardHeader, te(), /* @__PURE__ */ e.jsxs(na, { children: [
3262
3262
  /* @__PURE__ */ e.jsx(la, { asChild: !0, children: /* @__PURE__ */ e.jsx(Fa, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
3263
3263
  /* @__PURE__ */ e.jsx(ra, { align: "start", className: "w-40 text-muted-foreground", children: /* @__PURE__ */ e.jsxs(
3264
3264
  Gt,
@@ -3276,12 +3276,12 @@ function Tl() {
3276
3276
  ] });
3277
3277
  }
3278
3278
  function sa() {
3279
- const s = u((m) => m.frame), n = u((m) => m.card), a = u((m) => m.isShowingVisual), t = u((m) => m.isSqlRunning), l = u((m) => m.queryError), r = u((m) => m.pythonStdOut);
3280
- u((m) => m.actions.setRunSql);
3281
- const { setFrame: o, setCard: i, updateCardInFrame: d, setActiveTabCardId: x } = ne(), { data: c, isLoading: b, isFetching: g } = De(n);
3279
+ const s = u((x) => x.frame), n = u((x) => x.card), a = u((x) => x.isShowingVisual), t = u((x) => x.isSqlRunning), l = u((x) => x.queryError), r = u((x) => x.pythonStdOut);
3280
+ u((x) => x.actions.setRunSql);
3281
+ const { setFrame: o, setCard: i, updateCardInFrame: d, setActiveTabCardId: m } = te(), { data: c, isLoading: b, isFetching: g } = De(n);
3282
3282
  if (!n) return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
3283
3283
  function h() {
3284
- const m = {
3284
+ const x = {
3285
3285
  connectionId: n.connectionId,
3286
3286
  id: Ue(),
3287
3287
  title: "Title",
@@ -3298,49 +3298,49 @@ function sa() {
3298
3298
  sql: "",
3299
3299
  data: []
3300
3300
  };
3301
- f(m);
3301
+ f(x);
3302
3302
  }
3303
- function f(m) {
3303
+ function f(x) {
3304
3304
  const v = {
3305
3305
  ...s,
3306
- cards: [...s.cards, m],
3307
- activeCardId: m.id
3306
+ cards: [...s.cards, x],
3307
+ activeCardId: x.id
3308
3308
  };
3309
- o(v), x(m.id);
3309
+ o(v), m(x.id);
3310
3310
  }
3311
3311
  function p() {
3312
- const m = {
3312
+ const x = {
3313
3313
  ...n,
3314
3314
  id: Ue(),
3315
3315
  title: `${n.title} Copy`,
3316
3316
  tabTitle: `${n.tabTitle || n.title} Copy`
3317
3317
  };
3318
- f(m);
3318
+ f(x);
3319
3319
  }
3320
- function N(m) {
3321
- const v = s.cards.filter((S) => S.id !== m), j = v[0], D = {
3320
+ function N(x) {
3321
+ const v = s.cards.filter((S) => S.id !== x), j = v[0], D = {
3322
3322
  ...s,
3323
3323
  cards: v,
3324
3324
  // update the active card to the first card in the frame
3325
3325
  activeCardId: j.id
3326
3326
  };
3327
- o(D), i(j);
3327
+ o(D), m(j.id), i(j);
3328
3328
  }
3329
- function y(m) {
3330
- x(m);
3329
+ function y(x) {
3330
+ m(x);
3331
3331
  }
3332
- const V = (m, v) => {
3333
- console.log("handleDragStart", v), m.dataTransfer.setData("tabIndex", v.toString());
3334
- }, I = (m) => {
3335
- m.preventDefault();
3336
- }, z = (m, v) => {
3337
- const j = m.dataTransfer.getData("tabIndex");
3332
+ const V = (x, v) => {
3333
+ console.log("handleDragStart", v), x.dataTransfer.setData("tabIndex", v.toString());
3334
+ }, I = (x) => {
3335
+ x.preventDefault();
3336
+ }, z = (x, v) => {
3337
+ const j = x.dataTransfer.getData("tabIndex");
3338
3338
  if (j === v.toString()) return;
3339
3339
  const D = Array.from(s.cards), [S] = D.splice(parseInt(j), 1);
3340
3340
  D.splice(v, 0, S), o({ ...s, cards: D });
3341
3341
  };
3342
- function F(m, v) {
3343
- return m.cards.length === 1 && (v.displayTab === !0 || v.displayTab === void 0) || m.activeCardId !== v.id && (v.displayTab === !0 || v.displayTab === void 0) ? null : /* @__PURE__ */ e.jsx(
3342
+ function F(x, v) {
3343
+ return x.cards.length === 1 && (v.displayTab === !0 || v.displayTab === void 0) || x.activeCardId !== v.id && (v.displayTab === !0 || v.displayTab === void 0) ? null : /* @__PURE__ */ e.jsx(
3344
3344
  "div",
3345
3345
  {
3346
3346
  onClick: () => {
@@ -3362,12 +3362,12 @@ function sa() {
3362
3362
  value: s.activeCardId,
3363
3363
  className: "flex grow flex-col",
3364
3364
  children: [
3365
- s.cards.map((m) => /* @__PURE__ */ e.jsx(es, { className: "mt-0 grow", value: m.id, children: A() }, m.id)),
3365
+ s.cards.map((x) => /* @__PURE__ */ e.jsx(es, { className: "mt-0 grow", value: x.id, children: A() }, x.id)),
3366
3366
  /* @__PURE__ */ e.jsx(Ca, { className: "group mx-6 justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
3367
- s.cards.map((m, v) => /* @__PURE__ */ e.jsx(
3367
+ s.cards.map((x, v) => /* @__PURE__ */ e.jsx(
3368
3368
  Ze,
3369
3369
  {
3370
- text: m.tabTitle || m.title,
3370
+ text: x.tabTitle || x.title,
3371
3371
  onSave: (j) => {
3372
3372
  i({ ...n, tabTitle: j }), d({ ...n, tabTitle: j });
3373
3373
  },
@@ -3379,22 +3379,22 @@ function sa() {
3379
3379
  onDragOver: I,
3380
3380
  onDrop: (j) => z(j, v),
3381
3381
  className: "",
3382
- value: m.id,
3382
+ value: x.id,
3383
3383
  children: [
3384
- F(s, m),
3385
- m.tabTitle || m.title,
3386
- s.activeCardId === m.id && s.cards.length > 1 && /* @__PURE__ */ e.jsx(
3384
+ F(s, x),
3385
+ x.tabTitle || x.title,
3386
+ s.activeCardId === x.id && s.cards.length > 1 && /* @__PURE__ */ e.jsx(
3387
3387
  Sa,
3388
3388
  {
3389
3389
  className: "ml-2 size-3.5 text-muted-foreground hover:text-foreground",
3390
- onClick: () => N(m.id)
3390
+ onClick: () => N(x.id)
3391
3391
  }
3392
3392
  )
3393
3393
  ]
3394
3394
  }
3395
3395
  )
3396
3396
  },
3397
- m.id
3397
+ x.id
3398
3398
  )),
3399
3399
  /* @__PURE__ */ e.jsx(
3400
3400
  O,
@@ -3572,9 +3572,9 @@ function Al() {
3572
3572
  var p, N;
3573
3573
  const s = u(
3574
3574
  (y) => y.card.customCardPreferences
3575
- ), { data: n } = Ya(), a = (n == null ? void 0 : n.plugins) || [], t = u((y) => y.card), l = u((y) => y.frame), r = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: o } = ne(), { components: i, manifest: d } = ga(
3575
+ ), { data: n } = Ya(), a = (n == null ? void 0 : n.plugins) || [], t = u((y) => y.card), l = u((y) => y.frame), r = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: o } = te(), { components: i, manifest: d } = ga(
3576
3576
  (s == null ? void 0 : s.url) || ""
3577
- ), x = (p = d == null ? void 0 : d.visuals) == null ? void 0 : p.find(
3577
+ ), m = (p = d == null ? void 0 : d.visuals) == null ? void 0 : p.find(
3578
3578
  (y) => y.name === (s == null ? void 0 : s.componentName)
3579
3579
  );
3580
3580
  function c(y, V) {
@@ -3601,7 +3601,7 @@ function Al() {
3601
3601
  label: F.tabTitle || F.title
3602
3602
  }));
3603
3603
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: (z = y == null ? void 0 : y.dataInputs) == null ? void 0 : z.map((F, T) => {
3604
- var A, m;
3604
+ var A, x;
3605
3605
  return /* @__PURE__ */ e.jsxs(
3606
3606
  "div",
3607
3607
  {
@@ -3614,7 +3614,7 @@ function Al() {
3614
3614
  className: "col-span-6 h-8 w-full justify-between",
3615
3615
  label: "",
3616
3616
  options: V || [],
3617
- value: ((m = (A = s == null ? void 0 : s.dataInputCardIds) == null ? void 0 : A[T]) == null ? void 0 : m.cardId) || "",
3617
+ value: ((x = (A = s == null ? void 0 : s.dataInputCardIds) == null ? void 0 : A[T]) == null ? void 0 : x.cardId) || "",
3618
3618
  onValueChange: (v) => c(T, v)
3619
3619
  }
3620
3620
  )
@@ -3735,11 +3735,11 @@ function Al() {
3735
3735
  ] }) }) }),
3736
3736
  /* @__PURE__ */ e.jsx(Ce, { className: "my-4" }),
3737
3737
  ((N = t == null ? void 0 : t.customCardPreferences) == null ? void 0 : N.componentName) && /* @__PURE__ */ e.jsxs(Pe, { summary: "Component Settings", children: [
3738
- x && x.dataInputs && /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
3738
+ m && m.dataInputs && /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
3739
3739
  /* @__PURE__ */ e.jsx(H, { children: "Input Mapping" }),
3740
- /* @__PURE__ */ e.jsx("div", { className: "px-2", children: b(x) })
3740
+ /* @__PURE__ */ e.jsx("div", { className: "px-2", children: b(m) })
3741
3741
  ] }),
3742
- x && x.settings && /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: /* @__PURE__ */ e.jsx("div", { className: "px-2", children: h(x) }) })
3742
+ m && m.settings && /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: /* @__PURE__ */ e.jsx("div", { className: "px-2", children: h(m) }) })
3743
3743
  ] })
3744
3744
  ]
3745
3745
  }
@@ -3801,7 +3801,7 @@ function Ie() {
3801
3801
  onClickFilter: g
3802
3802
  });
3803
3803
  }
3804
- function x(c) {
3804
+ function m(c) {
3805
3805
  var b, g, h, f;
3806
3806
  if (s != null && s[c] || (g = (b = a == null ? void 0 : a.onClickFilter) == null ? void 0 : b.find((p) => p.columnIndex === c)) != null && g.expression)
3807
3807
  return /* @__PURE__ */ e.jsx(
@@ -3856,7 +3856,7 @@ function Ie() {
3856
3856
  }
3857
3857
  ) })
3858
3858
  ] }),
3859
- x(b)
3859
+ m(b)
3860
3860
  ] })
3861
3861
  },
3862
3862
  c
@@ -3866,12 +3866,12 @@ function Ie() {
3866
3866
  }
3867
3867
  function xs() {
3868
3868
  var o, i, d;
3869
- const s = u((x) => x.card.preferences), n = u(
3870
- (x) => x.card.cfg
3871
- ), { setCardCfg: a, setCardPreferences: t, setChartOrientation: l } = u((x) => x.actions);
3869
+ const s = u((m) => m.card.preferences), n = u(
3870
+ (m) => m.card.cfg
3871
+ ), { setCardCfg: a, setCardPreferences: t, setChartOrientation: l } = u((m) => m.actions);
3872
3872
  (o = n == null ? void 0 : n.options) != null && o.indexAxis;
3873
- function r(x) {
3874
- l(x);
3873
+ function r(m) {
3874
+ l(m);
3875
3875
  }
3876
3876
  return /* @__PURE__ */ e.jsxs(
3877
3877
  ms,
@@ -3911,19 +3911,19 @@ function Za() {
3911
3911
  aa(a)
3912
3912
  ), [i, d] = q(
3913
3913
  ((se = (G = (ee = a == null ? void 0 : a.chartOptions) == null ? void 0 : ee.scales) == null ? void 0 : G[l]) == null ? void 0 : se.min) || ""
3914
- ), [x, c] = q(
3914
+ ), [m, c] = q(
3915
3915
  ((U = ($ = (k = a == null ? void 0 : a.chartOptions) == null ? void 0 : k.scales) == null ? void 0 : $[l]) == null ? void 0 : U.max) || ""
3916
- ), [b, g] = q(i || x ? "custom" : "auto"), [h, f] = q(""), [p, N] = q(0), [y, V] = q(""), [I, z] = q(""), [F, T] = q(""), A = u(
3916
+ ), [b, g] = q(i || m ? "custom" : "auto"), [h, f] = q(""), [p, N] = q(0), [y, V] = q(""), [I, z] = q(""), [F, T] = q(""), A = u(
3917
3917
  (E) => E.actions.setCardPreferences
3918
- ), { updateCardInFrame: m } = ne(), v = u((E) => E.card), j = u((E) => {
3918
+ ), { updateCardInFrame: x } = te(), v = u((E) => E.card), j = u((E) => {
3919
3919
  var L;
3920
3920
  return (L = E.card) == null ? void 0 : L.type;
3921
3921
  }), D = ["pie", "doughnut", "polarArea"].includes(j);
3922
3922
  X(() => {
3923
- var E, L, re, B, ae, te, je, Fe, we, Te, Le, Ee, Ve, w;
3923
+ var E, L, re, B, ae, ne, je, Fe, we, Te, Le, Ee, Ve, w;
3924
3924
  o(aa(a)), d(
3925
3925
  ((re = (L = (E = a == null ? void 0 : a.chartOptions) == null ? void 0 : E.scales) == null ? void 0 : L[l]) == null ? void 0 : re.min) === 0 ? 0 : ""
3926
- ), c(((te = (ae = (B = a == null ? void 0 : a.chartOptions) == null ? void 0 : B.scales) == null ? void 0 : ae[l]) == null ? void 0 : te.max) || ""), f(
3926
+ ), c(((ne = (ae = (B = a == null ? void 0 : a.chartOptions) == null ? void 0 : B.scales) == null ? void 0 : ae[l]) == null ? void 0 : ne.max) || ""), f(
3927
3927
  ((Te = (we = (Fe = (je = a == null ? void 0 : a.chartOptions) == null ? void 0 : je.scales) == null ? void 0 : Fe[l]) == null ? void 0 : we.ticks) == null ? void 0 : Te.stepSize) || ""
3928
3928
  ), N(((Le = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Le.decimalPlaces) || 0), V(((Ee = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ee.suffix) || ""), z(((Ve = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ve.currency) || ""), T(((w = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : w.locale) || "");
3929
3929
  }, [s, a, l]);
@@ -4010,7 +4010,7 @@ function Za() {
4010
4010
  /* @__PURE__ */ e.jsx(
4011
4011
  ie,
4012
4012
  {
4013
- value: x,
4013
+ value: m,
4014
4014
  onChange: (E) => c((L) => S(L, E.target.value)),
4015
4015
  id: "max",
4016
4016
  className: `col-span-1 h-8 w-full ${We}`
@@ -4036,7 +4036,7 @@ function Za() {
4036
4036
  let E = {};
4037
4037
  b === "custom" && (E = {
4038
4038
  min: i,
4039
- max: x,
4039
+ max: m,
4040
4040
  ticks: {
4041
4041
  stepSize: h
4042
4042
  }
@@ -4066,7 +4066,7 @@ function Za() {
4066
4066
  ...v,
4067
4067
  preferences: L
4068
4068
  };
4069
- m(re);
4069
+ x(re);
4070
4070
  }
4071
4071
  return /* @__PURE__ */ e.jsxs(ds, { onOpenChange: (E) => n(E), children: [
4072
4072
  /* @__PURE__ */ e.jsx(us, { asChild: !0, children: /* @__PURE__ */ e.jsx(Xt, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
@@ -4138,17 +4138,17 @@ function Za() {
4138
4138
  function ql({ idx: s }) {
4139
4139
  var i;
4140
4140
  const n = u((d) => {
4141
- var x;
4142
- return (x = d.card) == null ? void 0 : x.preferences;
4141
+ var m;
4142
+ return (m = d.card) == null ? void 0 : m.preferences;
4143
4143
  }), a = u(
4144
4144
  (d) => {
4145
- var x;
4146
- return (x = d.card.preferences) == null ? void 0 : x.datasetOptions;
4145
+ var m;
4146
+ return (m = d.card.preferences) == null ? void 0 : m.datasetOptions;
4147
4147
  }
4148
4148
  ), t = u(
4149
4149
  (d) => d.actions.setCardPreferences
4150
4150
  ), l = (i = n == null ? void 0 : n.chartOptions) == null ? void 0 : i.indexAxis, r = a == null ? void 0 : a.find((d) => d.idx === s);
4151
- function o(d, x) {
4151
+ function o(d, m) {
4152
4152
  (d === "end" || d === "start") && sn(an());
4153
4153
  const c = {
4154
4154
  display: d !== "none",
@@ -4162,7 +4162,7 @@ function ql({ idx: s }) {
4162
4162
  datasetOptions: [
4163
4163
  ...a || [],
4164
4164
  {
4165
- idx: x,
4165
+ idx: m,
4166
4166
  datalabels: c
4167
4167
  }
4168
4168
  ]
@@ -4171,7 +4171,7 @@ function ql({ idx: s }) {
4171
4171
  const b = { ...r };
4172
4172
  b.datalabels = c;
4173
4173
  const g = a == null ? void 0 : a.map(
4174
- (h) => h.idx === x ? b : h
4174
+ (h) => h.idx === m ? b : h
4175
4175
  );
4176
4176
  t({
4177
4177
  ...n,
@@ -4247,10 +4247,10 @@ function ql({ idx: s }) {
4247
4247
  ] });
4248
4248
  }
4249
4249
  function Xa() {
4250
- const s = u((x) => x.card), n = u(
4251
- (x) => {
4250
+ const s = u((m) => m.card), n = u(
4251
+ (m) => {
4252
4252
  var c, b, g;
4253
- return (g = (b = (c = x == null ? void 0 : x.card) == null ? void 0 : c.preferences) == null ? void 0 : b.chartOptions) == null ? void 0 : g.indexAxis;
4253
+ return (g = (b = (c = m == null ? void 0 : m.card) == null ? void 0 : c.preferences) == null ? void 0 : b.chartOptions) == null ? void 0 : g.indexAxis;
4254
4254
  }
4255
4255
  ), { data: a } = De(s), t = n === "y" ? "Y axis" : "X axis", l = n === "y" ? "X axis" : "Y axis", {
4256
4256
  keys: r,
@@ -4259,12 +4259,12 @@ function Xa() {
4259
4259
  } = js((a == null ? void 0 : a.records) || []);
4260
4260
  let d = o;
4261
4261
  if (["stackedBar", "stackedLine"].includes(s.type)) {
4262
- const x = tn({
4262
+ const m = tn({
4263
4263
  dataArray: (a == null ? void 0 : a.records) || [],
4264
4264
  groupKey: i[0],
4265
4265
  pivotKey: i[1],
4266
4266
  valueKey: d[0]
4267
- }), { metricKeys: c } = js(x);
4267
+ }), { metricKeys: c } = js(m);
4268
4268
  d = c;
4269
4269
  }
4270
4270
  return r.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
@@ -4277,7 +4277,7 @@ function Xa() {
4277
4277
  /* @__PURE__ */ e.jsx(H, { children: l }),
4278
4278
  /* @__PURE__ */ e.jsx(Za, {})
4279
4279
  ] }),
4280
- /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: d.map((x, c) => /* @__PURE__ */ e.jsx(Rl, { col: x, idx: c }, x)) })
4280
+ /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: d.map((m, c) => /* @__PURE__ */ e.jsx(Rl, { col: m, idx: c }, m)) })
4281
4281
  ] })
4282
4282
  ] });
4283
4283
  }
@@ -4307,12 +4307,12 @@ function Rl({ col: s, idx: n }) {
4307
4307
  else {
4308
4308
  const d = { ...l };
4309
4309
  d.type = i === "area" ? "line" : i, d.fill = i === "area" ? "origin" : "";
4310
- const x = t == null ? void 0 : t.map(
4310
+ const m = t == null ? void 0 : t.map(
4311
4311
  (c) => c.idx === n ? d : c
4312
4312
  );
4313
4313
  r({
4314
4314
  ...a,
4315
- datasetOptions: x
4315
+ datasetOptions: m
4316
4316
  });
4317
4317
  }
4318
4318
  }
@@ -4345,7 +4345,7 @@ function Rl({ col: s, idx: n }) {
4345
4345
  ] });
4346
4346
  }
4347
4347
  function et() {
4348
- const s = u((g) => g.selectedConnectionId), n = u((g) => g.selectedDatamodelId), a = u((g) => g.selectedDatabaseName), t = u((g) => g.selectedSchemaName), l = u((g) => g.selectedTableName), r = M((g) => g.dashboard.filters) || [], o = M((g) => g.actions.addFilter), i = M((g) => g.actions.removeFilter), { removeFilterValues: d } = is(), { modelItems: x, tableName: c } = qe();
4348
+ const s = u((g) => g.selectedConnectionId), n = u((g) => g.selectedDatamodelId), a = u((g) => g.selectedDatabaseName), t = u((g) => g.selectedSchemaName), l = u((g) => g.selectedTableName), r = M((g) => g.dashboard.filters) || [], o = M((g) => g.actions.addFilter), i = M((g) => g.actions.removeFilter), { removeFilterValues: d } = is(), { modelItems: m, tableName: c } = qe();
4349
4349
  function b(g, h = "dashboard") {
4350
4350
  var T;
4351
4351
  const f = ce(g.column_name), p = ce(a || ""), N = ce(t || ""), y = ce(c);
@@ -4353,7 +4353,7 @@ function et() {
4353
4353
  N,
4354
4354
  y
4355
4355
  ), I = `${V}.${f}`;
4356
- const z = (T = x == null ? void 0 : x.find(
4356
+ const z = (T = m == null ? void 0 : m.find(
4357
4357
  (A) => A.id === n
4358
4358
  )) == null ? void 0 : T.name;
4359
4359
  n && n !== "none" && (I = `${gs}.${z}.${f}`, V = `${gs}.${z}`);
@@ -4408,7 +4408,7 @@ function et() {
4408
4408
  function Re() {
4409
4409
  const s = M(
4410
4410
  (i) => i.dashboard.filters
4411
- ), n = u((i) => i.frame), { setFrame: a } = ne(), { columns: t } = qe(), { assignFilter: l } = et();
4411
+ ), n = u((i) => i.frame), { setFrame: a } = te(), { columns: t } = qe(), { assignFilter: l } = et();
4412
4412
  function r(i) {
4413
4413
  const d = l(i, "frame");
4414
4414
  a({ ...n, filterId: d });
@@ -4450,8 +4450,8 @@ function _l({
4450
4450
  {
4451
4451
  value: i.column_name,
4452
4452
  onSelect: (d) => {
4453
- const x = d === l ? "" : d;
4454
- r(x), t(!1), x && n(i);
4453
+ const m = d === l ? "" : d;
4454
+ r(m), t(!1), m && n(i);
4455
4455
  },
4456
4456
  children: [
4457
4457
  i.column_name,
@@ -4531,7 +4531,7 @@ function Hs() {
4531
4531
  anchor: i,
4532
4532
  clamp: !0
4533
4533
  }
4534
- }, x = {
4534
+ }, m = {
4535
4535
  ...s,
4536
4536
  options: {
4537
4537
  ...s == null ? void 0 : s.options,
@@ -4541,7 +4541,7 @@ function Hs() {
4541
4541
  }
4542
4542
  }
4543
4543
  };
4544
- n(x), console.log(i);
4544
+ n(m), console.log(i);
4545
4545
  }
4546
4546
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4547
4547
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
@@ -4756,7 +4756,7 @@ function Gl(s) {
4756
4756
  ] }) });
4757
4757
  }
4758
4758
  function Kl() {
4759
- var d, x, c, b, g;
4759
+ var d, m, c, b, g;
4760
4760
  const s = u((h) => h.card.preferences), n = u(
4761
4761
  (h) => h.actions.setCardPreferences
4762
4762
  ), a = u(
@@ -4809,7 +4809,7 @@ function Kl() {
4809
4809
  ),
4810
4810
  /* @__PURE__ */ e.jsx(H, { children: "Format Number" })
4811
4811
  ] }),
4812
- ((x = s == null ? void 0 : s.formatNumber) == null ? void 0 : x.enabled) === !0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
4812
+ ((m = s == null ? void 0 : s.formatNumber) == null ? void 0 : m.enabled) === !0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
4813
4813
  /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 p-2", children: [
4814
4814
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
4815
4815
  /* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
@@ -5053,10 +5053,10 @@ const Jl = [
5053
5053
  value: s
5054
5054
  }));
5055
5055
  function Zl() {
5056
- var d, x, c, b, g, h, f, p, N, y, V, I, z, F, T, A, m, v;
5057
- const s = u((j) => j.card), n = (x = (d = s == null ? void 0 : s.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : x.topoJsonUrl, [a, t] = q(
5056
+ var d, m, c, b, g, h, f, p, N, y, V, I, z, F, T, A, x, v;
5057
+ const s = u((j) => j.card), n = (m = (d = s == null ? void 0 : s.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : m.topoJsonUrl, [a, t] = q(
5058
5058
  ((b = (c = s == null ? void 0 : s.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : b.customTopoJsonUrl) || ""
5059
- ), { setCardPreferences: l } = ne(), { data: r } = Es(s), o = Object.keys((r == null ? void 0 : r.objects) || {}).map((j) => ({
5059
+ ), { setCardPreferences: l } = te(), { data: r } = Es(s), o = Object.keys((r == null ? void 0 : r.objects) || {}).map((j) => ({
5060
5060
  label: j,
5061
5061
  value: j
5062
5062
  })) || [], i = [
@@ -5236,7 +5236,7 @@ function Zl() {
5236
5236
  className: `h-9 w-full ${$e}`,
5237
5237
  type: "number",
5238
5238
  step: 10,
5239
- value: ((v = (m = (A = s.preferences) == null ? void 0 : A.mapVisualOptions) == null ? void 0 : m.projectionOffset) == null ? void 0 : v[1]) || 0,
5239
+ value: ((v = (x = (A = s.preferences) == null ? void 0 : A.mapVisualOptions) == null ? void 0 : x.projectionOffset) == null ? void 0 : v[1]) || 0,
5240
5240
  onChange: (j) => {
5241
5241
  var D, S, _, P;
5242
5242
  l({
@@ -5343,7 +5343,7 @@ function er() {
5343
5343
  var l, r;
5344
5344
  return (r = (l = t == null ? void 0 : t.card) == null ? void 0 : l.preferences) == null ? void 0 : r.sortChart;
5345
5345
  }
5346
- ), { setSortChart: n } = ne();
5346
+ ), { setSortChart: n } = te();
5347
5347
  function a() {
5348
5348
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
5349
5349
  /* @__PURE__ */ e.jsx(H, { children: "Sort" }),
@@ -5695,7 +5695,7 @@ function ur() {
5695
5695
  return a != null && a.length ? /* @__PURE__ */ e.jsx(
5696
5696
  "div",
5697
5697
  {
5698
- className: Y("mb-1 flex items-center gap-2 border-y pb-0.5", {
5698
+ className: Y("mb-1 flex items-center gap-2 border-y px-0.5 pb-0.5", {
5699
5699
  "bg-[repeating-linear-gradient(45deg,_#ffffff_0_3px,_#f3f3f3_3px_6px)]": n === "light",
5700
5700
  "bg-[repeating-linear-gradient(45deg,_#18171d_0_3px,_#272729_3px_6px)]": n === "dark"
5701
5701
  }),