react-semaphor 0.0.372 → 0.0.373

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 P, x as ks, y as z, z as Ze, A as Ie, B as e, H as Os, J as zs, K as T, p as Xe, M as Is, N as Ms, Q as Ts, R as Ds, V as $, W as de, Y as ha, Z as Fs, _ as Ls, $ as Es, a0 as ma, a1 as xa, a2 as rt, a3 as ea, a4 as Y, a5 as Ge, i as it, a6 as h, a7 as ot, a8 as ct, P as pa, F as fa, a9 as Je, aa as We, ab as ga, ac as dt, ad as ja, ae as ge, af as je, ag as be, ah as ve, ai as ke, aj as ye, ak as se, al as Vs, am as As, an as qs, ao as ba, ap as va, aq as pe, ar as ut, as as ht, at as ya, au as mt, C as xt, av as pt, aw as Na, ax as Ne, ay as ft, az as Ke, aA as Ns, aB as De, aC as Re, aD as Oe, aE as gt, aF as jt, aG as sa, aH as bt, X as ds, aI as vt, aJ as yt, aK as Nt, aL as Ct, aM as vs, l as St, aN as wt, aO as kt, aP as Le, aQ as le, aR as Ca, aS as Ot, aT as us, aU as zt, aV as It, aW as Cs, o as Mt, a as Tt, aX as ls, aY as we, aZ as rs, a_ as Dt, a$ as Ft, b0 as Lt, b1 as Et, b2 as ys, b3 as Vt, b4 as aa, b5 as At, b6 as ta, b7 as qt, b8 as Rt, b9 as _t, ba as Ht, bb as Sa, bc as Pt, bd as Rs, be as wa, bf as $t, bg as Bt, bh as as, bi as Ut, bj as Gt, bk as ka, bl as Jt, u as Wt, bm as Kt, bn as Qt, s as Zt, bo as hs, bp as Oa, bq as za, br as Ia, bs as ts, bt as ns, bu as Xt, bv as Se, bw as Yt, bx as en, by as ms, bz as xs, bA as ps, bB as sn, I as an, bC as tn, bD as nn, bE as ln, bF as rn, E as on, bG as fs, bH as Fe, f as cn, bI as $e, bJ as _s, bK as Ma, bL as dn, bM as un, bN as is, bO as hn, bP as mn, bQ as xn, bR as pn, bS as na, bT as la, bU as Ta, bV as fn, bW as gn, bX as jn, bY as bn, bZ as vn, b_ as yn, b$ as Nn, c0 as Cn, c1 as Ee, c2 as Q, c3 as Z, c4 as Hs, c5 as X, c6 as Sn, c7 as Da, c8 as wn, c9 as kn, ca as On, cb as zn, cc as In, cd as Mn, ce as Tn, cf as Dn, cg as Fn } from "./index-DarZ2wwN.js";
1
+ import { c as P, x as ks, y as z, z as Ze, A as Ie, B as e, H as Os, J as zs, K as T, p as Xe, M as Is, N as Ms, Q as Ts, R as Ds, V as $, W as de, Y as ha, Z as Fs, _ as Ls, $ as Es, a0 as ma, a1 as xa, a2 as rt, a3 as ea, a4 as Y, a5 as Ge, i as it, a6 as h, a7 as ot, a8 as ct, P as pa, F as fa, a9 as Je, aa as We, ab as ga, ac as dt, ad as ja, ae as ge, af as je, ag as be, ah as ve, ai as ke, aj as ye, ak as se, al as Vs, am as As, an as qs, ao as ba, ap as va, aq as pe, ar as ut, as as ht, at as ya, au as mt, C as xt, av as pt, aw as Na, ax as Ne, ay as ft, az as Ke, aA as Ns, aB as De, aC as Re, aD as Oe, aE as gt, aF as jt, aG as sa, aH as bt, X as ds, aI as vt, aJ as yt, aK as Nt, aL as Ct, aM as vs, l as St, aN as wt, aO as kt, aP as Le, aQ as le, aR as Ca, aS as Ot, aT as us, aU as zt, aV as It, aW as Cs, o as Mt, a as Tt, aX as ls, aY as we, aZ as rs, a_ as Dt, a$ as Ft, b0 as Lt, b1 as Et, b2 as ys, b3 as Vt, b4 as aa, b5 as At, b6 as ta, b7 as qt, b8 as Rt, b9 as _t, ba as Ht, bb as Sa, bc as Pt, bd as Rs, be as wa, bf as $t, bg as Bt, bh as as, bi as Ut, bj as Gt, bk as ka, bl as Jt, u as Wt, bm as Kt, bn as Qt, s as Zt, bo as hs, bp as Oa, bq as za, br as Ia, bs as ts, bt as ns, bu as Xt, bv as Se, bw as Yt, bx as en, by as ms, bz as xs, bA as ps, bB as sn, I as an, bC as tn, bD as nn, bE as ln, bF as rn, E as on, bG as fs, bH as Fe, f as cn, bI as $e, bJ as _s, bK as Ma, bL as dn, bM as un, bN as is, bO as hn, bP as mn, bQ as xn, bR as pn, bS as na, bT as la, bU as Ta, bV as fn, bW as gn, bX as jn, bY as bn, bZ as vn, b_ as yn, b$ as Nn, c0 as Cn, c1 as Ee, c2 as Q, c3 as Z, c4 as Hs, c5 as X, c6 as Sn, c7 as Da, c8 as wn, c9 as kn, ca as On, cb as zn, cc as In, cd as Mn, ce as Tn, cf as Dn, cg as Fn } from "./index-PwLsV4fg.js";
2
2
  import * as ra from "react";
3
3
  import ze, { useState as H, useMemo as Ss, useEffect as te, useRef as Be, useCallback as Fa, Suspense as Ln } from "react";
4
4
  import "react-dom";
@@ -617,7 +617,7 @@ async function ul(s, t) {
617
617
  }) : null;
618
618
  }
619
619
  function hl() {
620
- const [s, t] = H(""), [a, n] = H(!1), l = z((p) => p.lenses), { setLenses: r, setSelectedLensId: i } = Ze(), [o, d] = H(!1), [u, m] = H(!1), g = z((p) => p.dashboard), b = z((p) => p.filterValues), { authToken: c } = Ie();
620
+ const [s, t] = H(""), [a, n] = H(!1), l = z((p) => p.lenses), { setLenses: r, setSelectedLensId: i } = Ze(), [o, d] = H(!1), [u, m] = H(!1), g = z((p) => p.dashboard), v = z((p) => p.filterValues), { authToken: c } = Ie();
621
621
  async function x() {
622
622
  d(!0);
623
623
  const p = Ra(
@@ -625,7 +625,7 @@ function hl() {
625
625
  ), S = await dl(
626
626
  s,
627
627
  p,
628
- b,
628
+ v,
629
629
  c == null ? void 0 : c.accessToken
630
630
  );
631
631
  S && (r([...l || [], S]), i(S.id), m(!1)), d(!1);
@@ -684,8 +684,8 @@ function ml() {
684
684
  }
685
685
  async function d(m) {
686
686
  if (await ul(m, i == null ? void 0 : i.accessToken)) {
687
- const b = a == null ? void 0 : a.filter((c) => c.id !== m);
688
- l(b || []), r("original");
687
+ const v = a == null ? void 0 : a.filter((c) => c.id !== m);
688
+ l(v || []), r("original");
689
689
  }
690
690
  }
691
691
  async function u(m) {
@@ -697,11 +697,11 @@ function ml() {
697
697
  isDefault: !1
698
698
  });
699
699
  l(g || []);
700
- const b = {
700
+ const v = {
701
701
  ...m,
702
702
  isDefault: !m.isDefault
703
703
  };
704
- await ws(b, i == null ? void 0 : i.accessToken);
704
+ await ws(v, i == null ? void 0 : i.accessToken);
705
705
  const c = a == null ? void 0 : a.find((x) => x.isDefault);
706
706
  if (c && c.id !== m.id) {
707
707
  const x = {
@@ -784,8 +784,8 @@ async function xl() {
784
784
  }
785
785
  })).json()).url, g = document.createElement("a");
786
786
  g.href = m;
787
- const b = `${n}-${(/* @__PURE__ */ new Date()).toISOString()}.pdf`;
788
- g.download = b, g.click(), z.setState({ isDownloadingPdf: !1 });
787
+ const v = `${n}-${(/* @__PURE__ */ new Date()).toISOString()}.pdf`;
788
+ g.download = v, g.click(), z.setState({ isDownloadingPdf: !1 });
789
789
  }
790
790
  function pl({
791
791
  iconClassName: s
@@ -828,11 +828,11 @@ function fl() {
828
828
  z(
829
829
  (f) => f.showDashboardJSON
830
830
  );
831
- const b = z((f) => f.onSaveFunction), c = z(
831
+ const v = z((f) => f.onSaveFunction), c = z(
832
832
  (f) => f.actions.setShowFilters
833
833
  ), { addFrame: x, setSelectedFrameId: p } = z(
834
834
  (f) => f.actions
835
- ), { getSelectedSheet: S, setIsDashboardEditing: v, setShowDashboardJSON: A } = z((f) => f.actions), D = S(), { tenantId: k, endUserId: C } = Ss(
835
+ ), { getSelectedSheet: S, setIsDashboardEditing: j, setShowDashboardJSON: A } = z((f) => f.actions), D = S(), { tenantId: k, endUserId: C } = Ss(
836
836
  () => ot(s == null ? void 0 : s.accessToken),
837
837
  [s == null ? void 0 : s.accessToken]
838
838
  ), E = Ss(() => k || C, [k, C]), R = () => {
@@ -853,25 +853,25 @@ function fl() {
853
853
  type: "bar",
854
854
  sql: "select COUNT(*) from YOUR_TABLE",
855
855
  data: []
856
- }, j = {
856
+ }, b = {
857
857
  id: Je(),
858
858
  cards: [f],
859
859
  activeCardId: f.id
860
860
  };
861
- x(D.id, j), p(j.id);
861
+ x(D.id, b), p(b.id);
862
862
  }, V = () => {
863
- v(!0);
863
+ j(!0);
864
864
  };
865
865
  async function y() {
866
866
  if (d(!0), !a || !n) return;
867
867
  const f = Ra(
868
868
  l
869
- ), j = JSON.stringify(f), N = {
869
+ ), b = JSON.stringify(f), N = {
870
870
  ...n,
871
- template: j,
871
+ template: b,
872
872
  filterValues: u
873
873
  };
874
- await ws(N, s == null ? void 0 : s.accessToken), We.success("Lens saved"), b == null || b(f), d(!1);
874
+ await ws(N, s == null ? void 0 : s.accessToken), We.success("Lens saved"), v == null || v(f), d(!1);
875
875
  }
876
876
  return m ? null : /* @__PURE__ */ e.jsxs(
877
877
  "div",
@@ -916,7 +916,7 @@ function fl() {
916
916
  role: "close",
917
917
  className: "h-7 p-2",
918
918
  onClick: () => {
919
- v(!1), A(!1);
919
+ j(!1), A(!1);
920
920
  },
921
921
  size: "sm",
922
922
  children: /* @__PURE__ */ e.jsx(Ge, { className: "h-4 w-4", strokeWidth: 1.5 })
@@ -964,7 +964,7 @@ function Pe({
964
964
  showIcon: m = !0,
965
965
  disabled: g = !1
966
966
  }) {
967
- const b = n ? "Loading..." : l ? "Error" : a;
967
+ const v = n ? "Loading..." : l ? "Error" : a;
968
968
  function c() {
969
969
  if (s === "Connection")
970
970
  return /* @__PURE__ */ e.jsx(Yn, { className: "size-4 rotate-90" });
@@ -982,7 +982,7 @@ function Pe({
982
982
  /* @__PURE__ */ e.jsx(dt, { children: c() }),
983
983
  /* @__PURE__ */ e.jsx(ja, { className: "text-xs", align: "start", children: i })
984
984
  ] }) : c() }),
985
- /* @__PURE__ */ e.jsxs(ge, { disabled: g, value: b, onValueChange: o, children: [
985
+ /* @__PURE__ */ e.jsxs(ge, { disabled: g, value: v, onValueChange: o, children: [
986
986
  /* @__PURE__ */ e.jsx(
987
987
  je,
988
988
  {
@@ -1013,7 +1013,7 @@ function Pe({
1013
1013
  d && /* @__PURE__ */ e.jsx(se, { value: "none", children: "None" }, "none"),
1014
1014
  t && t.map((x, p) => /* @__PURE__ */ e.jsx(se, { value: x.id, children: x.name }, p))
1015
1015
  ] }),
1016
- (n || l) && /* @__PURE__ */ e.jsx(se, { value: b, children: b })
1016
+ (n || l) && /* @__PURE__ */ e.jsx(se, { value: v, children: v })
1017
1017
  ] }) })
1018
1018
  ] })
1019
1019
  ] });
@@ -1024,9 +1024,9 @@ function gl({ column: s }) {
1024
1024
  ), r = h(
1025
1025
  (x) => x.selectedDatamodelId
1026
1026
  ), i = h((x) => x.sqlGen), { modelItems: o, connectionType: d } = Ve(), u = h((x) => x.actions.setSqlGen), m = h((x) => x.actions.setCardSql), g = h((x) => x.actions.setRunSql);
1027
- function b(x, p) {
1027
+ function v(x, p) {
1028
1028
  var D;
1029
- const S = ba(x, i, p), v = (D = o == null ? void 0 : o.find(
1029
+ const S = ba(x, i, p), j = (D = o == null ? void 0 : o.find(
1030
1030
  (k) => k.id === r
1031
1031
  )) == null ? void 0 : D.name;
1032
1032
  u(S);
@@ -1034,7 +1034,7 @@ function gl({ column: s }) {
1034
1034
  S,
1035
1035
  pe(l || ""),
1036
1036
  pe(n),
1037
- v,
1037
+ j,
1038
1038
  d
1039
1039
  );
1040
1040
  A && (m(A), g(!0)), a(!1);
@@ -1044,7 +1044,7 @@ function gl({ column: s }) {
1044
1044
  /* @__PURE__ */ e.jsx(
1045
1045
  "li",
1046
1046
  {
1047
- onClick: () => b(s, "COUNT"),
1047
+ onClick: () => v(s, "COUNT"),
1048
1048
  className: "cursor-pointer p-1 px-3 transition-colors hover:bg-muted",
1049
1049
  children: "Count"
1050
1050
  }
@@ -1052,7 +1052,7 @@ function gl({ column: s }) {
1052
1052
  /* @__PURE__ */ e.jsx(
1053
1053
  "li",
1054
1054
  {
1055
- onClick: () => b(s, "AVG"),
1055
+ onClick: () => v(s, "AVG"),
1056
1056
  className: "cursor-pointer p-1 px-3 transition-colors hover:bg-muted",
1057
1057
  children: "Avg"
1058
1058
  }
@@ -1060,7 +1060,7 @@ function gl({ column: s }) {
1060
1060
  /* @__PURE__ */ e.jsx(
1061
1061
  "li",
1062
1062
  {
1063
- onClick: () => b(s, "SUM"),
1063
+ onClick: () => v(s, "SUM"),
1064
1064
  className: "cursor-pointer p-1 px-3 transition-colors hover:bg-muted",
1065
1065
  children: "Sum"
1066
1066
  }
@@ -1068,7 +1068,7 @@ function gl({ column: s }) {
1068
1068
  /* @__PURE__ */ e.jsx(
1069
1069
  "li",
1070
1070
  {
1071
- onClick: () => b(s, "MAX"),
1071
+ onClick: () => v(s, "MAX"),
1072
1072
  className: "cursor-pointer p-1 px-3 transition-colors hover:bg-muted",
1073
1073
  children: "Max"
1074
1074
  }
@@ -1076,7 +1076,7 @@ function gl({ column: s }) {
1076
1076
  /* @__PURE__ */ e.jsx(
1077
1077
  "li",
1078
1078
  {
1079
- onClick: () => b(s, "MIN"),
1079
+ onClick: () => v(s, "MIN"),
1080
1080
  className: "cursor-pointer p-1 px-3 transition-colors hover:bg-muted",
1081
1081
  children: "Min"
1082
1082
  }
@@ -1117,23 +1117,23 @@ function jl({
1117
1117
  (y) => y.selectedDatamodelId
1118
1118
  ), m = z(
1119
1119
  (y) => y.dashboard.aiScopeTables
1120
- ), { addToAIScope: g, removeFromAIScope: b } = Ze();
1120
+ ), { addToAIScope: g, removeFromAIScope: v } = Ze();
1121
1121
  z((y) => y.actions);
1122
1122
  const c = h((y) => y.actions.setRunSql), x = h((y) => y.actions.setSqlGen), p = h(
1123
1123
  (y) => y.actions.setIsShowingVisual
1124
- ), S = h((y) => y.actions.setCardSql), { connectionType: v, modelItems: A, selectedDatamodelName: D } = Ve();
1124
+ ), S = h((y) => y.actions.setCardSql), { connectionType: j, modelItems: A, selectedDatamodelName: D } = Ve();
1125
1125
  function k(y) {
1126
1126
  var M;
1127
1127
  const f = ba(y, l);
1128
1128
  x(f);
1129
- const j = (M = A == null ? void 0 : A.find(
1129
+ const b = (M = A == null ? void 0 : A.find(
1130
1130
  (q) => q.id === u
1131
1131
  )) == null ? void 0 : M.name, N = va(
1132
1132
  f,
1133
1133
  pe(s),
1134
1134
  pe(t),
1135
- j,
1136
- v
1135
+ b,
1136
+ j
1137
1137
  );
1138
1138
  N && (S(N), c(!0));
1139
1139
  }
@@ -1145,7 +1145,7 @@ function jl({
1145
1145
  function E(y) {
1146
1146
  y === !0 && (d || D) && r ? (g({
1147
1147
  connectionId: r,
1148
- connectionType: v,
1148
+ connectionType: j === "S3" || j === "API" ? "DuckDb" : j,
1149
1149
  databaseName: i,
1150
1150
  schemaName: o,
1151
1151
  tableName: d,
@@ -1154,9 +1154,9 @@ function jl({
1154
1154
  position: "top-right",
1155
1155
  duration: 2500,
1156
1156
  richColors: !0
1157
- })) : (b({
1157
+ })) : (v({
1158
1158
  connectionId: r || "",
1159
- connectionType: v || "",
1159
+ connectionType: j || "",
1160
1160
  tableName: d || "",
1161
1161
  datamodelName: D || ""
1162
1162
  }), We("Removed from Assistant Scope", {
@@ -1170,10 +1170,10 @@ function jl({
1170
1170
  schemaName: s,
1171
1171
  tableName: t,
1172
1172
  modelName: D,
1173
- connectionType: v
1173
+ connectionType: j
1174
1174
  });
1175
1175
  p(!1);
1176
- const f = v === "MSSQL" ? `SELECT top 10 * FROM ${y}` : `SELECT * FROM ${y} LIMIT 10`;
1176
+ const f = j === "MSSQL" ? `SELECT top 10 * FROM ${y}` : `SELECT * FROM ${y} LIMIT 10`;
1177
1177
  S(f), c(!0);
1178
1178
  }
1179
1179
  function V() {
@@ -1181,7 +1181,7 @@ function jl({
1181
1181
  schemaName: s,
1182
1182
  tableName: t,
1183
1183
  modelName: D,
1184
- connectionType: v
1184
+ connectionType: j
1185
1185
  });
1186
1186
  S(`SELECT COUNT(*) as count FROM ${y}`), c(!0);
1187
1187
  }
@@ -1296,7 +1296,7 @@ function Ve(s, t) {
1296
1296
  (w) => w.actions.setSelectedConnectionId
1297
1297
  ), g = h(
1298
1298
  (w) => w.actions.setSelectedDatamodelId
1299
- ), b = h(
1299
+ ), v = h(
1300
1300
  (w) => w.actions.setSelectedDatabaseName
1301
1301
  ), c = h(
1302
1302
  (w) => w.actions.setSelectedSchemaName
@@ -1310,7 +1310,7 @@ function Ve(s, t) {
1310
1310
  function S(w) {
1311
1311
  return !!(l && i && i !== "NA" && o && d || l && (w === "S3" || w === "API") || r && r);
1312
1312
  }
1313
- function v(w) {
1313
+ function j(w) {
1314
1314
  return l && w ? !(w === "API" || w === "S3") : !1;
1315
1315
  }
1316
1316
  const {
@@ -1344,7 +1344,7 @@ function Ve(s, t) {
1344
1344
  // Only fetch if authToken is present
1345
1345
  }), f = D == null ? void 0 : D.connections.find(
1346
1346
  (w) => w.id === l
1347
- ), j = f == null ? void 0 : f.type, N = (f == null ? void 0 : f.type) === "API" || (f == null ? void 0 : f.type) === "S3", {
1347
+ ), b = f == null ? void 0 : f.type, N = (f == null ? void 0 : f.type) === "API" || (f == null ? void 0 : f.type) === "S3", {
1348
1348
  data: M,
1349
1349
  isLoading: q,
1350
1350
  isFetching: J,
@@ -1359,7 +1359,7 @@ function Ve(s, t) {
1359
1359
  connection_id: l
1360
1360
  }
1361
1361
  ),
1362
- enabled: v(j)
1362
+ enabled: j(b)
1363
1363
  // !!selectedConnectionId && !isNonDbConnection, //currentConnection?.type !== 'API', // Only fetch if connectionId is present
1364
1364
  }), {
1365
1365
  data: K,
@@ -1401,7 +1401,7 @@ function Ve(s, t) {
1401
1401
  schema_name: o
1402
1402
  }
1403
1403
  ),
1404
- enabled: p(j)
1404
+ enabled: p(b)
1405
1405
  }), {
1406
1406
  data: ae,
1407
1407
  isLoading: he,
@@ -1429,7 +1429,7 @@ function Ve(s, t) {
1429
1429
  table_name: d
1430
1430
  }
1431
1431
  ),
1432
- enabled: S(j)
1432
+ enabled: S(b)
1433
1433
  // (!!selectedConnectionId &&
1434
1434
  // !!selectedDatabaseName &&
1435
1435
  // !!selectedSchemaName &&
@@ -1441,11 +1441,11 @@ function Ve(s, t) {
1441
1441
  te(() => {
1442
1442
  u(a);
1443
1443
  }, [ae, u, a]), te(() => {
1444
- (j === "S3" || j === "API") && (b(""), c(""), g(""), j === "API" && x("api"));
1444
+ (b === "S3" || b === "API") && (v(""), c(""), g(""), b === "API" && x("api"));
1445
1445
  }, [
1446
- j,
1447
- x,
1448
1446
  b,
1447
+ x,
1448
+ v,
1449
1449
  c,
1450
1450
  g
1451
1451
  ]);
@@ -1454,13 +1454,13 @@ function Ve(s, t) {
1454
1454
  c(w), x("");
1455
1455
  }
1456
1456
  function I(w) {
1457
- b(w === "none" ? "" : w), c(""), x(""), w !== "none" && w !== "" && g("");
1457
+ v(w === "none" ? "" : w), c(""), x(""), w !== "none" && w !== "" && g("");
1458
1458
  }
1459
1459
  function ce(w) {
1460
1460
  m(w);
1461
1461
  }
1462
1462
  function Te(w) {
1463
- g(w === "none" ? "" : w), w !== "none" && w !== "" && b("");
1463
+ g(w === "none" ? "" : w), w !== "none" && w !== "" && v("");
1464
1464
  }
1465
1465
  M && ((Ks = M == null ? void 0 : M.databases) == null ? void 0 : Ks.length) > 0, K && ((Qs = K == null ? void 0 : K.schemas) == null ? void 0 : Qs.length) > 0, ae && ((Zs = ae == null ? void 0 : ae.columns) == null ? void 0 : Zs.length) > 0 && (a = ae.columns.map((w) => ({
1466
1466
  ...w,
@@ -1509,7 +1509,7 @@ function Ve(s, t) {
1509
1509
  isColumnsLoadingOrFetching: he || O,
1510
1510
  isColumnsError: L,
1511
1511
  isNonDbConnection: N,
1512
- connectionType: j,
1512
+ connectionType: b,
1513
1513
  tableName: Ce,
1514
1514
  schemaName: qe,
1515
1515
  refetchConnections: A,
@@ -1544,12 +1544,12 @@ function Ha({
1544
1544
  schemaItems: u,
1545
1545
  databaseItems: m,
1546
1546
  tableItems: g,
1547
- columns: b,
1547
+ columns: v,
1548
1548
  isConnectionsLoading: c,
1549
1549
  isModelsLoading: x,
1550
1550
  isConnectionsError: p,
1551
1551
  isModelsError: S,
1552
- isDatabasesLoadingOrFetching: v,
1552
+ isDatabasesLoadingOrFetching: j,
1553
1553
  isDatabaseError: A,
1554
1554
  isSchemaLoadingOrFetching: D,
1555
1555
  isSchemaError: k,
@@ -1559,7 +1559,7 @@ function Ha({
1559
1559
  isTableError: V,
1560
1560
  connectionType: y,
1561
1561
  isNonDbConnection: f,
1562
- refetchDatabases: j,
1562
+ refetchDatabases: b,
1563
1563
  refetchModels: N,
1564
1564
  refetchSchemas: M,
1565
1565
  refetchTables: q,
@@ -1573,12 +1573,12 @@ function Ha({
1573
1573
  schemaName: _
1574
1574
  } = Ve();
1575
1575
  function F() {
1576
- return s ? s(_, U, b) : /* @__PURE__ */ e.jsx(
1576
+ return s ? s(_, U, v) : /* @__PURE__ */ e.jsx(
1577
1577
  jl,
1578
1578
  {
1579
1579
  schemaName: _,
1580
1580
  tableName: U,
1581
- columns: b,
1581
+ columns: v,
1582
1582
  status: E ? "Loading..." : C ? "Error" : "Success"
1583
1583
  }
1584
1584
  );
@@ -1592,11 +1592,11 @@ function Ha({
1592
1592
  return /* @__PURE__ */ e.jsx(
1593
1593
  Pe,
1594
1594
  {
1595
- refetch: j,
1595
+ refetch: b,
1596
1596
  showNone: !0,
1597
1597
  onChange: K,
1598
1598
  isError: A,
1599
- isLoading: v,
1599
+ isLoading: j,
1600
1600
  items: m,
1601
1601
  value: n || "",
1602
1602
  title: "Database"
@@ -1756,13 +1756,13 @@ function yl({
1756
1756
  open: n,
1757
1757
  setOpen: l
1758
1758
  }) {
1759
- const r = Be(null), i = Be(null), [o, d] = H([]), [u, m] = H(""), [g, b] = H(null), { authToken: c } = Ie(), x = h((O) => {
1759
+ const r = Be(null), i = Be(null), [o, d] = H([]), [u, m] = H(""), [g, v] = H(null), { authToken: c } = Ie(), x = h((O) => {
1760
1760
  var L;
1761
1761
  return (L = O == null ? void 0 : O.card) == null ? void 0 : L.sql;
1762
1762
  }), p = h((O) => {
1763
1763
  var L;
1764
1764
  return (L = O == null ? void 0 : O.card) == null ? void 0 : L.python;
1765
- }), S = h((O) => O.actions.setCardSql), v = h((O) => O.actions.setRunSql), A = h(
1765
+ }), S = h((O) => O.actions.setCardSql), j = h((O) => O.actions.setRunSql), A = h(
1766
1766
  (O) => O.actions.switchCardType
1767
1767
  ), D = h(
1768
1768
  (O) => O.selectedDatabaseName
@@ -1774,7 +1774,7 @@ function yl({
1774
1774
  (O) => O.dashboard.aiScopeTables
1775
1775
  ), { selectedDatamodelName: V, connectionType: y } = Ve(), {
1776
1776
  messages: f,
1777
- setMessages: j,
1777
+ setMessages: b,
1778
1778
  reload: N,
1779
1779
  append: M,
1780
1780
  input: q,
@@ -1825,7 +1825,7 @@ function yl({
1825
1825
  return () => clearTimeout(L);
1826
1826
  }, [f, n]);
1827
1827
  function U(O) {
1828
- b((L) => L ? {
1828
+ v((L) => L ? {
1829
1829
  promptTokens: L.promptTokens + O.promptTokens,
1830
1830
  completionTokens: L.completionTokens + O.completionTokens,
1831
1831
  totalTokens: L.totalTokens + O.totalTokens
@@ -1841,7 +1841,7 @@ function yl({
1841
1841
  if (O.toolName === "createChart") {
1842
1842
  console.log("createChart", O.args);
1843
1843
  const L = O.args.sql, G = O.args.chartType;
1844
- return A(G), S(L), v(!0), {
1844
+ return A(G), S(L), j(!0), {
1845
1845
  status: "success",
1846
1846
  message: "Let the user know that chart is created"
1847
1847
  // query: sql,
@@ -1869,7 +1869,7 @@ function yl({
1869
1869
  }
1870
1870
  function ee(O) {
1871
1871
  const L = ie(O);
1872
- d(L), j((G) => [
1872
+ d(L), b((G) => [
1873
1873
  ...G,
1874
1874
  {
1875
1875
  id: crypto.randomUUID(),
@@ -1913,12 +1913,12 @@ function yl({
1913
1913
  }
1914
1914
  }
1915
1915
  function ae(O) {
1916
- l(!1), S(O), v(!0);
1916
+ l(!1), S(O), j(!0);
1917
1917
  }
1918
1918
  const he = !["ready", "error"].includes(J);
1919
1919
  return {
1920
1920
  messages: f,
1921
- setMessages: j,
1921
+ setMessages: b,
1922
1922
  reload: N,
1923
1923
  append: M,
1924
1924
  input: q,
@@ -1949,12 +1949,12 @@ function Cl({
1949
1949
  }) {
1950
1950
  const [r, i] = H(!1), [o, d] = H(Nl), [u, m] = H(!1), {
1951
1951
  messages: g,
1952
- setMessages: b,
1952
+ setMessages: v,
1953
1953
  reload: c,
1954
1954
  append: x,
1955
1955
  input: p,
1956
1956
  isLoading: S,
1957
- handleRun: v,
1957
+ handleRun: j,
1958
1958
  handleOpenDialogAndSetScope: A,
1959
1959
  handleAddCurrentTableToScope: D,
1960
1960
  removeFromCurrentSelections: k,
@@ -1964,7 +1964,7 @@ function Cl({
1964
1964
  inputRef: V,
1965
1965
  handleInputChange: y,
1966
1966
  handleSubmit: f,
1967
- stop: j,
1967
+ stop: b,
1968
1968
  chatStatus: N,
1969
1969
  toolStatus: M,
1970
1970
  llmUsage: q
@@ -2077,7 +2077,7 @@ function Cl({
2077
2077
  size: "sm",
2078
2078
  variant: "secondary",
2079
2079
  onClick: () => {
2080
- b([]), E([]), c();
2080
+ v([]), E([]), c();
2081
2081
  },
2082
2082
  children: "Clear"
2083
2083
  }
@@ -2095,7 +2095,7 @@ function Cl({
2095
2095
  {
2096
2096
  messages: g,
2097
2097
  showTools: o,
2098
- handleRun: v,
2098
+ handleRun: j,
2099
2099
  showSystemMessage: u
2100
2100
  }
2101
2101
  ),
@@ -2112,7 +2112,7 @@ function Cl({
2112
2112
  /* @__PURE__ */ e.jsx(
2113
2113
  Ct,
2114
2114
  {
2115
- stop: j,
2115
+ stop: b,
2116
2116
  ref: V,
2117
2117
  input: p,
2118
2118
  handleInputChange: y,
@@ -2262,10 +2262,10 @@ function Dl({ sql: s }) {
2262
2262
  ] });
2263
2263
  }
2264
2264
  function Ba(s) {
2265
- const { theme: t } = wt(), a = z((p) => p.theme), n = h((p) => p.frame), l = h((p) => p.card), r = h((p) => p.activeTabCardId), i = kt(), { refetch: o } = Le(l), { updateCardTab: d, setRunSql: u } = le(), m = Be(), g = Be({}), b = n.cards.find((p) => p.id === r), c = Fa(() => {
2265
+ const { theme: t } = wt(), a = z((p) => p.theme), n = h((p) => p.frame), l = h((p) => p.card), r = h((p) => p.activeTabCardId), i = kt(), { refetch: o } = Le(l), { updateCardTab: d, setRunSql: u } = le(), m = Be(), g = Be({}), v = n.cards.find((p) => p.id === r), c = Fa(() => {
2266
2266
  let p = "";
2267
- return s === "python" && (p = (b == null ? void 0 : b.python) || Ca), s === "sql" && (p = (b == null ? void 0 : b.sql) || ""), p;
2268
- }, [s, b]);
2267
+ return s === "python" && (p = (v == null ? void 0 : v.python) || Ca), s === "sql" && (p = (v == null ? void 0 : v.sql) || ""), p;
2268
+ }, [s, v]);
2269
2269
  te(() => {
2270
2270
  if (r && l.id && l.id !== r) {
2271
2271
  if (m.current && i) {
@@ -2273,8 +2273,8 @@ function Ba(s) {
2273
2273
  p && (g.current[l.id] = p);
2274
2274
  let S = g.current[r];
2275
2275
  if (!S) {
2276
- const v = c();
2277
- S = i.editor.createModel(v, s), g.current[r] = S;
2276
+ const j = c();
2277
+ S = i.editor.createModel(j, s), g.current[r] = S;
2278
2278
  }
2279
2279
  m.current.setModel(S);
2280
2280
  }
@@ -2315,8 +2315,8 @@ function Ba(s) {
2315
2315
  }, [i, o, l]);
2316
2316
  function x(p, S) {
2317
2317
  if (m.current = p, !g.current[l.id]) {
2318
- const v = p.getModel(), A = c();
2319
- g.current[l.id] = v || (S == null ? void 0 : S.editor.createModel(A, s)) || p.getModel();
2318
+ const j = p.getModel(), A = c();
2319
+ g.current[l.id] = j || (S == null ? void 0 : S.editor.createModel(A, s)) || p.getModel();
2320
2320
  }
2321
2321
  p.setModel(g.current[l.id]);
2322
2322
  }
@@ -2416,9 +2416,9 @@ function Vl() {
2416
2416
  const [s, t] = H({
2417
2417
  queryKey: [],
2418
2418
  queryData: null
2419
- }), a = It(), [n, l] = H(!1), [r, i] = H(!1), [o, d] = H(!1), [u, m] = H(""), [g, b] = H(!1), c = h((I) => I.frame), x = h((I) => I.card), p = h((I) => I.isShowingVisual), S = h(
2419
+ }), a = It(), [n, l] = H(!1), [r, i] = H(!1), [o, d] = H(!1), [u, m] = H(""), [g, v] = H(!1), c = h((I) => I.frame), x = h((I) => I.card), p = h((I) => I.isShowingVisual), S = h(
2420
2420
  (I) => I.selectedConnectionId
2421
- ), v = h(
2421
+ ), j = h(
2422
2422
  (I) => I.selectedDatabaseName
2423
2423
  ), A = h(
2424
2424
  (I) => I.selectedDatamodelId
@@ -2433,7 +2433,7 @@ function Vl() {
2433
2433
  setCardSql: y,
2434
2434
  // setQueryError,
2435
2435
  setPythonStdOut: f,
2436
- setCardPreferences: j,
2436
+ setCardPreferences: b,
2437
2437
  setCardType: N,
2438
2438
  setCardPython: M
2439
2439
  } = le(), q = h((I) => I.onSave), J = h((I) => I.onClose), B = h((I) => I.actions.setSqlGen), W = h((I) => I.runSql), K = h((I) => I.actions.setRunSql), ue = h((I) => I.actions.setCardCfg), re = h(
@@ -2477,7 +2477,7 @@ function Vl() {
2477
2477
  s.queryData || t({
2478
2478
  queryKey: ne,
2479
2479
  queryData: I
2480
- }), a.setQueryData(ne, null), a.removeQueries({ queryKey: ne, exact: !0 }), y(""), B({}), M(""), ue(void 0), R(""), j({}), N("bar");
2480
+ }), a.setQueryData(ne, null), a.removeQueries({ queryKey: ne, exact: !0 }), y(""), B({}), M(""), ue(void 0), R(""), b({}), N("bar");
2481
2481
  }
2482
2482
  function O(I, ce) {
2483
2483
  if (I.length === 0)
@@ -2506,7 +2506,7 @@ function Vl() {
2506
2506
  ...x,
2507
2507
  lastSelectedSchema: D,
2508
2508
  lastSelectedDatamodelId: A,
2509
- lastSelectedDatabase: v,
2509
+ lastSelectedDatabase: j,
2510
2510
  lastSelectedTable: k,
2511
2511
  connectionId: S,
2512
2512
  type: p ? x.type : "table",
@@ -2657,7 +2657,7 @@ function Vl() {
2657
2657
  {
2658
2658
  error: (oe == null ? void 0 : oe.message) || ((Me = U == null ? void 0 : U.error) == null ? void 0 : Me.message),
2659
2659
  setShowAIDialog: d,
2660
- setTriggerAIRun: b,
2660
+ setTriggerAIRun: v,
2661
2661
  setUserInputforAI: m
2662
2662
  }
2663
2663
  ),
@@ -2692,7 +2692,7 @@ function Vl() {
2692
2692
  setOpen: d,
2693
2693
  userInput: u,
2694
2694
  triggerAIRun: g,
2695
- setTriggerAIRun: b
2695
+ setTriggerAIRun: v
2696
2696
  }
2697
2697
  )
2698
2698
  ] }),
@@ -2787,16 +2787,16 @@ function Al({ data: s }) {
2787
2787
  ] }) });
2788
2788
  }
2789
2789
  function ql({ card: s }) {
2790
- var v, A, D, k, C, E, R, V, y, f, j;
2790
+ var j, A, D, k, C, E, R, V, y, f, b;
2791
2791
  const [t, a] = H(!1), [n, l] = H(
2792
2792
  []
2793
2793
  ), { authToken: r } = Ie(), i = Ht(r == null ? void 0 : r.accessToken), o = z((N) => N.themeStyle), d = {
2794
- colors: ((A = (v = o == null ? void 0 : o.chart) == null ? void 0 : v.dataset) == null ? void 0 : A.backgroundColor) || []
2794
+ colors: ((A = (j = o == null ? void 0 : o.chart) == null ? void 0 : j.dataset) == null ? void 0 : A.backgroundColor) || []
2795
2795
  };
2796
2796
  (D = s.customCardPreferences) != null && D.inputData;
2797
2797
  const { getCard: u } = Sa(((k = s.customCardPreferences) == null ? void 0 : k.url) || ""), m = ((C = s.customCardPreferences) == null ? void 0 : C.visualType) || "single", g = h((N) => N.frame);
2798
2798
  le();
2799
- const { data: b } = Le(s), c = Fa((N, M) => {
2799
+ const { data: v } = Le(s), c = Fa((N, M) => {
2800
2800
  l((q) => ({
2801
2801
  ...q,
2802
2802
  [N]: M
@@ -2829,7 +2829,7 @@ function ql({ card: s }) {
2829
2829
  theme: d,
2830
2830
  settings: (y = s.customCardPreferences) == null ? void 0 : y.settings,
2831
2831
  onDataChange: c,
2832
- data: (b == null ? void 0 : b.records) || []
2832
+ data: (v == null ? void 0 : v.records) || []
2833
2833
  }
2834
2834
  ),
2835
2835
  x && m === "multiple" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
@@ -2869,7 +2869,7 @@ function ql({ card: s }) {
2869
2869
  ] })
2870
2870
  ]
2871
2871
  },
2872
- (j = s.customCardPreferences) == null ? void 0 : j.componentName
2872
+ (b = s.customCardPreferences) == null ? void 0 : b.componentName
2873
2873
  ) });
2874
2874
  }
2875
2875
  function Ua({
@@ -2879,9 +2879,9 @@ function Ua({
2879
2879
  ...t
2880
2880
  }) {
2881
2881
  var S;
2882
- const a = h((v) => v.card), n = ((S = a.customCardPreferences) == null ? void 0 : S.showCardHeader) ?? !0, l = h((v) => v.frame), r = z((v) => v.dashboard.filters);
2883
- h((v) => v.actions.setRunSql);
2884
- const { updateFilter: i } = Ze(), o = r == null ? void 0 : r.find((v) => v.id === l.filterId), { data: d, isLoading: u, isFetching: m } = Le(a), { setCard: g } = le(), { data: b } = Rs(a);
2882
+ const a = h((j) => j.card), n = ((S = a.customCardPreferences) == null ? void 0 : S.showCardHeader) ?? !0, l = h((j) => j.frame), r = z((j) => j.dashboard.filters);
2883
+ h((j) => j.actions.setRunSql);
2884
+ const { updateFilter: i } = Ze(), o = r == null ? void 0 : r.find((j) => j.id === l.filterId), { data: d, isLoading: u, isFetching: m } = Le(a), { setCard: g } = le(), { data: v } = Rs(a);
2885
2885
  if (!a.id) return null;
2886
2886
  let c;
2887
2887
  d != null && d.records && (d == null ? void 0 : d.records.length) > 0 && (c = wa({
@@ -2890,13 +2890,13 @@ function Ua({
2890
2890
  cfg: a.cfg,
2891
2891
  customCfg: a.customCfg,
2892
2892
  preferences: a.preferences,
2893
- topoJson: b
2893
+ topoJson: v
2894
2894
  }));
2895
- function x(v) {
2896
- return /* @__PURE__ */ e.jsx(ql, { card: v });
2895
+ function x(j) {
2896
+ return /* @__PURE__ */ e.jsx(ql, { card: j });
2897
2897
  }
2898
2898
  function p() {
2899
- var v;
2899
+ var j;
2900
2900
  if (d != null && d.records && (d == null ? void 0 : d.records.length) === 0 && !u && !m)
2901
2901
  return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [
2902
2902
  /* @__PURE__ */ e.jsx(Wt, { className: "size-8 text-muted-foreground" }),
@@ -2910,7 +2910,7 @@ function Ua({
2910
2910
  {
2911
2911
  cfg: c
2912
2912
  },
2913
- JSON.stringify(c) + JSON.stringify(a.preferences) + ((v = a == null ? void 0 : a.preferences) == null ? void 0 : v.customVisualCode)
2913
+ JSON.stringify(c) + JSON.stringify(a.preferences) + ((j = a == null ? void 0 : a.preferences) == null ? void 0 : j.customVisualCode)
2914
2914
  );
2915
2915
  if (a.type === "table" && (d != null && d.records) && (d == null ? void 0 : d.records.length) > 0)
2916
2916
  return /* @__PURE__ */ e.jsxs(Ne, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
@@ -2931,7 +2931,7 @@ function Ua({
2931
2931
  as,
2932
2932
  {
2933
2933
  text: a.title,
2934
- onSave: (v) => g({ ...a, title: v }),
2934
+ onSave: (j) => g({ ...a, title: j }),
2935
2935
  children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(Ut, { className: "text-base", children: a.title || "Edit title..." }) })
2936
2936
  },
2937
2937
  a.title
@@ -2940,7 +2940,7 @@ function Ua({
2940
2940
  as,
2941
2941
  {
2942
2942
  text: a.description || "",
2943
- onSave: (v) => g({ ...a, description: v }),
2943
+ onSave: (j) => g({ ...a, description: j }),
2944
2944
  children: /* @__PURE__ */ e.jsx(Gt, { children: a.description || "Edit description..." })
2945
2945
  },
2946
2946
  a.description
@@ -2952,7 +2952,7 @@ function Ua({
2952
2952
  {
2953
2953
  className: "my-1",
2954
2954
  text: o.title || o.column,
2955
- onSave: (v) => i({ ...o, title: v }),
2955
+ onSave: (j) => i({ ...o, title: j }),
2956
2956
  children: /* @__PURE__ */ e.jsx($, { children: o.title })
2957
2957
  }
2958
2958
  ),
@@ -3068,7 +3068,7 @@ const ca = ({ language: s, value: t, onChange: a }) => /* @__PURE__ */ e.jsx(
3068
3068
  /* @__PURE__ */ e.jsx(T, { onClick: l, variant: "outline", children: "Close" })
3069
3069
  ] });
3070
3070
  function Pl() {
3071
- const [s, t] = H(!1), [a, n] = H(""), [l, r] = H(""), [i, o] = H(""), [d, u] = H(""), m = h((k) => k.card), g = h((k) => k.card.customCfg), { data: b } = Le(m), { data: c } = Rs(m), { setCardCustomCfg: x, setCustomVisualCode: p } = le(), S = (k, C) => Se.transform(k, (E, R, V) => {
3071
+ const [s, t] = H(!1), [a, n] = H(""), [l, r] = H(""), [i, o] = H(""), [d, u] = H(""), m = h((k) => k.card), g = h((k) => k.card.customCfg), { data: v } = Le(m), { data: c } = Rs(m), { setCardCustomCfg: x, setCustomVisualCode: p } = le(), S = (k, C) => Se.transform(k, (E, R, V) => {
3072
3072
  if (!Se.isEqual(R, C[V]))
3073
3073
  if (Se.isArray(R) && Se.isArray(C[V]))
3074
3074
  E[V] = C[V];
@@ -3077,7 +3077,7 @@ function Pl() {
3077
3077
  Se.isEmpty(y) || (E[V] = y);
3078
3078
  } else
3079
3079
  E[V] = C[V];
3080
- }), v = (k) => {
3080
+ }), j = (k) => {
3081
3081
  var C, E;
3082
3082
  return JSON.stringify(
3083
3083
  {
@@ -3095,18 +3095,18 @@ function Pl() {
3095
3095
  );
3096
3096
  }, A = () => {
3097
3097
  var C, E;
3098
- if (!((C = b == null ? void 0 : b.records) != null && C.length)) return;
3098
+ if (!((C = v == null ? void 0 : v.records) != null && C.length)) return;
3099
3099
  const k = wa({
3100
- data: b.records,
3100
+ data: v.records,
3101
3101
  cardType: m.type,
3102
3102
  cfg: m.cfg,
3103
3103
  preferences: m.preferences,
3104
3104
  topoJson: c
3105
3105
  });
3106
3106
  if (k) {
3107
- n(v(k)), o(((E = m.preferences) == null ? void 0 : E.customVisualCode) || "");
3107
+ n(j(k)), o(((E = m.preferences) == null ? void 0 : E.customVisualCode) || "");
3108
3108
  const R = Se.merge(k, g);
3109
- r(v(R));
3109
+ r(j(R));
3110
3110
  }
3111
3111
  }, D = () => {
3112
3112
  try {
@@ -3195,7 +3195,7 @@ function et(s) {
3195
3195
  const [t, a] = H(null);
3196
3196
  return te(() => {
3197
3197
  s && (async () => {
3198
- const r = (await import("./lucide-react-DREi5Q9q.js"))[s];
3198
+ const r = (await import("./lucide-react-DXbiJQ14.js"))[s];
3199
3199
  a(r);
3200
3200
  })();
3201
3201
  }, [s]), t;
@@ -3249,9 +3249,9 @@ const Ul = ({
3249
3249
  };
3250
3250
  function Gl() {
3251
3251
  var m, g;
3252
- const [s, t] = H(!1), a = h((b) => b.card), n = a.type, { setCardType: l, setCardPreferences: r, setChartOrientation: i } = h((b) => b.actions), { setCardCustomCfg: o, setCustomCardPreferences: d } = le();
3253
- function u(b, c) {
3254
- o(null), r({}), l(b), c && d({
3252
+ const [s, t] = H(!1), a = h((v) => v.card), n = a.type, { setCardType: l, setCardPreferences: r, setChartOrientation: i } = h((v) => v.actions), { setCardCustomCfg: o, setCustomCardPreferences: d } = le();
3253
+ function u(v, c) {
3254
+ o(null), r({}), l(v), c && d({
3255
3255
  type: "component",
3256
3256
  visualType: "single",
3257
3257
  url: c.url,
@@ -3485,12 +3485,12 @@ function Wl() {
3485
3485
  }
3486
3486
  function da() {
3487
3487
  var f;
3488
- const s = h((j) => j.frame), t = h((j) => j.card), a = h((j) => j.isShowingVisual), n = h((j) => j.isSqlRunning), l = h((j) => j.pythonStdOut);
3489
- h((j) => j.actions.setRunSql);
3490
- const { setFrame: r, setCard: i, updateCardInFrame: o, setActiveTabCardId: d } = le(), { data: u, isLoading: m, isFetching: g, error: b } = Le(t);
3488
+ const s = h((b) => b.frame), t = h((b) => b.card), a = h((b) => b.isShowingVisual), n = h((b) => b.isSqlRunning), l = h((b) => b.pythonStdOut);
3489
+ h((b) => b.actions.setRunSql);
3490
+ const { setFrame: r, setCard: i, updateCardInFrame: o, setActiveTabCardId: d } = le(), { data: u, isLoading: m, isFetching: g, error: v } = Le(t);
3491
3491
  if (!t) return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
3492
3492
  function c() {
3493
- const j = {
3493
+ const b = {
3494
3494
  connectionId: t.connectionId,
3495
3495
  id: Je(),
3496
3496
  title: "Title",
@@ -3507,27 +3507,27 @@ function da() {
3507
3507
  sql: "",
3508
3508
  data: []
3509
3509
  };
3510
- x(j);
3510
+ x(b);
3511
3511
  }
3512
- function x(j) {
3512
+ function x(b) {
3513
3513
  const N = {
3514
3514
  ...s,
3515
- cards: [...s.cards, j],
3516
- activeCardId: j.id
3515
+ cards: [...s.cards, b],
3516
+ activeCardId: b.id
3517
3517
  };
3518
- r(N), d(j.id);
3518
+ r(N), d(b.id);
3519
3519
  }
3520
3520
  function p() {
3521
- const j = {
3521
+ const b = {
3522
3522
  ...t,
3523
3523
  id: Je(),
3524
3524
  title: `${t.title} Copy`,
3525
3525
  tabTitle: `${t.tabTitle || t.title} Copy`
3526
3526
  };
3527
- x(j);
3527
+ x(b);
3528
3528
  }
3529
- function S(j) {
3530
- const N = s.cards.filter((J) => J.id !== j), M = N[0], q = {
3529
+ function S(b) {
3530
+ const N = s.cards.filter((J) => J.id !== b), M = N[0], q = {
3531
3531
  ...s,
3532
3532
  cards: N,
3533
3533
  // update the active card to the first card in the frame
@@ -3535,21 +3535,21 @@ function da() {
3535
3535
  };
3536
3536
  r(q), d(M.id), i(M);
3537
3537
  }
3538
- function v(j) {
3539
- d(j);
3538
+ function j(b) {
3539
+ d(b);
3540
3540
  }
3541
- const A = (j, N) => {
3542
- console.log("handleDragStart", N), j.dataTransfer.setData("tabIndex", N.toString());
3543
- }, D = (j) => {
3544
- j.preventDefault();
3545
- }, k = (j, N) => {
3546
- const M = j.dataTransfer.getData("tabIndex");
3541
+ const A = (b, N) => {
3542
+ console.log("handleDragStart", N), b.dataTransfer.setData("tabIndex", N.toString());
3543
+ }, D = (b) => {
3544
+ b.preventDefault();
3545
+ }, k = (b, N) => {
3546
+ const M = b.dataTransfer.getData("tabIndex");
3547
3547
  if (M === N.toString()) return;
3548
3548
  const q = Array.from(s.cards), [J] = q.splice(parseInt(M), 1);
3549
3549
  q.splice(N, 0, J), r({ ...s, cards: q });
3550
3550
  };
3551
- function C(j, N) {
3552
- return j.cards.length === 1 && (N.displayTab === !0 || N.displayTab === void 0) || j.activeCardId !== N.id && (N.displayTab === !0 || N.displayTab === void 0) ? null : /* @__PURE__ */ e.jsx(
3551
+ function C(b, N) {
3552
+ return b.cards.length === 1 && (N.displayTab === !0 || N.displayTab === void 0) || b.activeCardId !== N.id && (N.displayTab === !0 || N.displayTab === void 0) ? null : /* @__PURE__ */ e.jsx(
3553
3553
  "div",
3554
3554
  {
3555
3555
  onClick: () => {
@@ -3567,16 +3567,16 @@ function da() {
3567
3567
  return /* @__PURE__ */ e.jsxs(
3568
3568
  za,
3569
3569
  {
3570
- onValueChange: v,
3570
+ onValueChange: j,
3571
3571
  value: s.activeCardId,
3572
3572
  className: "flex grow flex-col",
3573
3573
  children: [
3574
- s.cards.map((j) => /* @__PURE__ */ e.jsx(ns, { className: "mt-0 grow", value: j.id, children: R() }, j.id)),
3574
+ s.cards.map((b) => /* @__PURE__ */ e.jsx(ns, { className: "mt-0 grow", value: b.id, children: R() }, b.id)),
3575
3575
  /* @__PURE__ */ e.jsx(Ia, { className: "group mx-6 justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
3576
- s.cards.map((j, N) => /* @__PURE__ */ e.jsx(
3576
+ s.cards.map((b, N) => /* @__PURE__ */ e.jsx(
3577
3577
  as,
3578
3578
  {
3579
- text: j.tabTitle || j.title,
3579
+ text: b.tabTitle || b.title,
3580
3580
  onSave: (M) => {
3581
3581
  i({ ...t, tabTitle: M }), o({ ...t, tabTitle: M });
3582
3582
  },
@@ -3588,22 +3588,22 @@ function da() {
3588
3588
  onDragOver: D,
3589
3589
  onDrop: (M) => k(M, N),
3590
3590
  className: "",
3591
- value: j.id,
3591
+ value: b.id,
3592
3592
  children: [
3593
- C(s, j),
3594
- j.tabTitle || j.title,
3595
- s.activeCardId === j.id && s.cards.length > 1 && /* @__PURE__ */ e.jsx(
3593
+ C(s, b),
3594
+ b.tabTitle || b.title,
3595
+ s.activeCardId === b.id && s.cards.length > 1 && /* @__PURE__ */ e.jsx(
3596
3596
  ds,
3597
3597
  {
3598
3598
  className: "ml-2 size-3.5 text-muted-foreground hover:text-foreground",
3599
- onClick: () => S(j.id)
3599
+ onClick: () => S(b.id)
3600
3600
  }
3601
3601
  )
3602
3602
  ]
3603
3603
  }
3604
3604
  )
3605
3605
  },
3606
- j.id
3606
+ b.id
3607
3607
  )),
3608
3608
  /* @__PURE__ */ e.jsx(
3609
3609
  T,
@@ -3639,7 +3639,7 @@ function da() {
3639
3639
  ) }) }) }) : /* @__PURE__ */ e.jsx(hs, { FallbackComponent: Oa, children: /* @__PURE__ */ e.jsx(Ua, { className: "grow border-none shadow-none" }) });
3640
3640
  }
3641
3641
  function V() {
3642
- const j = JSON.stringify(u == null ? void 0 : u.records, null, 2), N = new Blob([j], { type: "application/json" }), M = URL.createObjectURL(N), q = document.createElement("a");
3642
+ const b = JSON.stringify(u == null ? void 0 : u.records, null, 2), N = new Blob([b], { type: "application/json" }), M = URL.createObjectURL(N), q = document.createElement("a");
3643
3643
  q.href = M, q.download = `${t.title}.json`, q.click();
3644
3644
  }
3645
3645
  function y() {
@@ -3720,7 +3720,7 @@ function da() {
3720
3720
  className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
3721
3721
  children: /* @__PURE__ */ e.jsxs(Ne, { className: "relative flex h-full min-h-0 w-full flex-1 basis-0", children: [
3722
3722
  (u == null ? void 0 : u.records) && (u == null ? void 0 : u.records.length) > 0 && /* @__PURE__ */ e.jsx(Al, { data: (u == null ? void 0 : u.records) || [] }),
3723
- (b || (u == null ? void 0 : u.error)) && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs", children: (b == null ? void 0 : b.message) || ((f = u == null ? void 0 : u.error) == null ? void 0 : f.message) }),
3723
+ (v || (u == null ? void 0 : u.error)) && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs", children: (v == null ? void 0 : v.message) || ((f = u == null ? void 0 : u.error) == null ? void 0 : f.message) }),
3724
3724
  /* @__PURE__ */ e.jsx(Ke, { orientation: "horizontal" })
3725
3725
  ] })
3726
3726
  }
@@ -3823,17 +3823,17 @@ function Ue({
3823
3823
  function Xl() {
3824
3824
  var p, S;
3825
3825
  const s = h(
3826
- (v) => v.card.customCardPreferences
3827
- ), { data: t } = st(), a = (t == null ? void 0 : t.plugins) || [], n = h((v) => v.card), l = h((v) => v.frame), r = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: i } = le(), { components: o, manifest: d } = Sa(
3826
+ (j) => j.card.customCardPreferences
3827
+ ), { data: t } = st(), a = (t == null ? void 0 : t.plugins) || [], n = h((j) => j.card), l = h((j) => j.frame), r = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: i } = le(), { components: o, manifest: d } = Sa(
3828
3828
  (s == null ? void 0 : s.url) || ""
3829
3829
  ), u = (p = d == null ? void 0 : d.visuals) == null ? void 0 : p.find(
3830
- (v) => v.name === (s == null ? void 0 : s.componentName)
3830
+ (j) => j.name === (s == null ? void 0 : s.componentName)
3831
3831
  );
3832
- function m(v, A) {
3832
+ function m(j, A) {
3833
3833
  if (!s) return;
3834
3834
  const k = {
3835
3835
  ...(s == null ? void 0 : s.dataInputCardIds) || {},
3836
- [v]: {
3836
+ [j]: {
3837
3837
  cardId: A,
3838
3838
  hookRef: null
3839
3839
  }
@@ -3843,7 +3843,7 @@ function Xl() {
3843
3843
  dataInputCardIds: k
3844
3844
  });
3845
3845
  }
3846
- function g(v) {
3846
+ function g(j) {
3847
3847
  var D, k;
3848
3848
  const A = (D = l == null ? void 0 : l.cards) == null ? void 0 : D.filter((C) => {
3849
3849
  var E;
@@ -3852,7 +3852,7 @@ function Xl() {
3852
3852
  value: C.id,
3853
3853
  label: C.tabTitle || C.title
3854
3854
  }));
3855
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: (k = v == null ? void 0 : v.dataInputs) == null ? void 0 : k.map((C, E) => {
3855
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: (k = j == null ? void 0 : j.dataInputs) == null ? void 0 : k.map((C, E) => {
3856
3856
  var R, V;
3857
3857
  return /* @__PURE__ */ e.jsxs(
3858
3858
  "div",
@@ -3876,9 +3876,9 @@ function Xl() {
3876
3876
  );
3877
3877
  }) });
3878
3878
  }
3879
- function b(v, A, D = []) {
3879
+ function v(j, A, D = []) {
3880
3880
  var k, C;
3881
- return s ? v === "input" ? /* @__PURE__ */ e.jsx(
3881
+ return s ? j === "input" ? /* @__PURE__ */ e.jsx(
3882
3882
  de,
3883
3883
  {
3884
3884
  className: `h-8 w-full ${$e}`,
@@ -3894,7 +3894,7 @@ function Xl() {
3894
3894
  }
3895
3895
  },
3896
3896
  A
3897
- ) : v === "select" ? /* @__PURE__ */ e.jsx(
3897
+ ) : j === "select" ? /* @__PURE__ */ e.jsx(
3898
3898
  fe,
3899
3899
  {
3900
3900
  className: "h-8 w-full",
@@ -3910,21 +3910,21 @@ function Xl() {
3910
3910
  }
3911
3911
  ) : null : null;
3912
3912
  }
3913
- function c(v) {
3914
- const A = Object.entries((v == null ? void 0 : v.settings) || {});
3913
+ function c(j) {
3914
+ const A = Object.entries((j == null ? void 0 : j.settings) || {});
3915
3915
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: A.map(([D, k]) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3916
3916
  /* @__PURE__ */ e.jsx($, { children: k.title }),
3917
- b(
3917
+ v(
3918
3918
  k.ui,
3919
3919
  D,
3920
3920
  k.options
3921
3921
  )
3922
3922
  ] }, D)) });
3923
3923
  }
3924
- function x(v) {
3924
+ function x(j) {
3925
3925
  s && i({
3926
3926
  ...s,
3927
- visualType: v,
3927
+ visualType: j,
3928
3928
  componentName: ""
3929
3929
  });
3930
3930
  }
@@ -3941,12 +3941,12 @@ function Xl() {
3941
3941
  label: "",
3942
3942
  options: a,
3943
3943
  value: (s == null ? void 0 : s.url) || "",
3944
- onValueChange: (v) => i({
3944
+ onValueChange: (j) => i({
3945
3945
  ...s || {
3946
3946
  url: "",
3947
3947
  componentName: ""
3948
3948
  },
3949
- url: v
3949
+ url: j
3950
3950
  })
3951
3951
  }
3952
3952
  ) }) }),
@@ -3969,16 +3969,16 @@ function Xl() {
3969
3969
  className: "h-8 w-full",
3970
3970
  label: "",
3971
3971
  options: (o == null ? void 0 : o.filter(
3972
- (v) => v.type === r
3973
- ).map((v) => ({
3974
- value: v.name,
3975
- label: v.name
3972
+ (j) => j.type === r
3973
+ ).map((j) => ({
3974
+ value: j.name,
3975
+ label: j.name
3976
3976
  }))) || [],
3977
3977
  value: s.componentName,
3978
- onValueChange: (v) => {
3979
- console.log("changing value", v), i({
3978
+ onValueChange: (j) => {
3979
+ console.log("changing value", j), i({
3980
3980
  ...s,
3981
- componentName: v
3981
+ componentName: j
3982
3982
  });
3983
3983
  }
3984
3984
  }
@@ -4014,8 +4014,8 @@ function Ae() {
4014
4014
  i && t(new Array(i.length).fill(!1));
4015
4015
  }, [i]);
4016
4016
  function o(m, g) {
4017
- var b, c;
4018
- g ? a != null && a.onClickFilter && ((b = a == null ? void 0 : a.onClickFilter) == null ? void 0 : b.length) > 0 ? r({
4017
+ var v, c;
4018
+ g ? a != null && a.onClickFilter && ((v = a == null ? void 0 : a.onClickFilter) == null ? void 0 : v.length) > 0 ? r({
4019
4019
  ...a,
4020
4020
  onClickFilter: [
4021
4021
  ...a.onClickFilter,
@@ -4044,18 +4044,18 @@ function Ae() {
4044
4044
  }
4045
4045
  function d(m, g) {
4046
4046
  var c;
4047
- const b = (c = a == null ? void 0 : a.onClickFilter) == null ? void 0 : c.map((x) => x.columnIndex === m ? {
4047
+ const v = (c = a == null ? void 0 : a.onClickFilter) == null ? void 0 : c.map((x) => x.columnIndex === m ? {
4048
4048
  ...x,
4049
4049
  expression: g.target.value
4050
4050
  } : x);
4051
4051
  r({
4052
4052
  ...a,
4053
- onClickFilter: b
4053
+ onClickFilter: v
4054
4054
  });
4055
4055
  }
4056
4056
  function u(m) {
4057
- var g, b, c, x;
4058
- if (s != null && s[m] || (b = (g = a == null ? void 0 : a.onClickFilter) == null ? void 0 : g.find((p) => p.columnIndex === m)) != null && b.expression)
4057
+ var g, v, c, x;
4058
+ if (s != null && s[m] || (v = (g = a == null ? void 0 : a.onClickFilter) == null ? void 0 : g.find((p) => p.columnIndex === m)) != null && v.expression)
4059
4059
  return /* @__PURE__ */ e.jsx(
4060
4060
  de,
4061
4061
  {
@@ -4070,7 +4070,7 @@ function Ae() {
4070
4070
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4071
4071
  /* @__PURE__ */ e.jsx($, { children: "On Click" }),
4072
4072
  i == null ? void 0 : i.map((m, g) => {
4073
- var b, c;
4073
+ var v, c;
4074
4074
  return /* @__PURE__ */ e.jsx(
4075
4075
  "div",
4076
4076
  {
@@ -4080,7 +4080,7 @@ function Ae() {
4080
4080
  /* @__PURE__ */ e.jsx(
4081
4081
  _s,
4082
4082
  {
4083
- checked: !!((b = a == null ? void 0 : a.onClickFilter) != null && b.find(
4083
+ checked: !!((v = a == null ? void 0 : a.onClickFilter) != null && v.find(
4084
4084
  (x) => x.columnIndex === g
4085
4085
  )),
4086
4086
  onCheckedChange: (x) => o(g, x)
@@ -4165,12 +4165,12 @@ function at() {
4165
4165
  ((K = (W = (B = a == null ? void 0 : a.chartOptions) == null ? void 0 : B.scales) == null ? void 0 : W[l]) == null ? void 0 : K.min) || ""
4166
4166
  ), [u, m] = H(
4167
4167
  ((U = (re = (ue = a == null ? void 0 : a.chartOptions) == null ? void 0 : ue.scales) == null ? void 0 : re[l]) == null ? void 0 : U.max) || ""
4168
- ), [g, b] = H(o || u ? "custom" : "auto"), [c, x] = H(""), [p, S] = H(0), [v, A] = H(""), [D, k] = H(""), [C, E] = H(""), R = h(
4168
+ ), [g, v] = H(o || u ? "custom" : "auto"), [c, x] = H(""), [p, S] = H(0), [j, A] = H(""), [D, k] = H(""), [C, E] = H(""), R = h(
4169
4169
  (_) => _.actions.setCardPreferences
4170
4170
  ), { updateCardInFrame: V } = le(), y = h((_) => _.card), f = h((_) => {
4171
4171
  var F;
4172
4172
  return (F = _.card) == null ? void 0 : F.type;
4173
- }), j = ["pie", "doughnut", "polarArea"].includes(f);
4173
+ }), b = ["pie", "doughnut", "polarArea"].includes(f);
4174
4174
  te(() => {
4175
4175
  var _, F, ie, ee, oe, ne, ae, he, O, L, G, Ce, qe, Me;
4176
4176
  i(ua(a)), d(
@@ -4308,7 +4308,7 @@ function at() {
4308
4308
  },
4309
4309
  numberAxisFormat: {
4310
4310
  decimalPlaces: p,
4311
- suffix: v,
4311
+ suffix: j,
4312
4312
  currency: D,
4313
4313
  locale: C
4314
4314
  }
@@ -4333,7 +4333,7 @@ function at() {
4333
4333
  /* @__PURE__ */ e.jsxs(
4334
4334
  ge,
4335
4335
  {
4336
- disabled: j,
4336
+ disabled: b,
4337
4337
  value: r,
4338
4338
  onValueChange: (_) => i(_),
4339
4339
  children: [
@@ -4352,10 +4352,10 @@ function at() {
4352
4352
  /* @__PURE__ */ e.jsxs(
4353
4353
  fs,
4354
4354
  {
4355
- disabled: j,
4355
+ disabled: b,
4356
4356
  id: "scale-option",
4357
4357
  value: g,
4358
- onValueChange: (_) => b(_),
4358
+ onValueChange: (_) => v(_),
4359
4359
  className: "col-span-2 flex gap-3",
4360
4360
  defaultValue: "x",
4361
4361
  children: [
@@ -4422,12 +4422,12 @@ function Yl({ idx: s }) {
4422
4422
  else {
4423
4423
  const g = { ...r };
4424
4424
  g.datalabels = m;
4425
- const b = a == null ? void 0 : a.map(
4425
+ const v = a == null ? void 0 : a.map(
4426
4426
  (c) => c.idx === u ? g : c
4427
4427
  );
4428
4428
  n({
4429
4429
  ...t,
4430
- datasetOptions: b
4430
+ datasetOptions: v
4431
4431
  });
4432
4432
  }
4433
4433
  }
@@ -4501,8 +4501,8 @@ function Yl({ idx: s }) {
4501
4501
  function tt() {
4502
4502
  const s = h((u) => u.card), t = h(
4503
4503
  (u) => {
4504
- var m, g, b;
4505
- return (b = (g = (m = u == null ? void 0 : u.card) == null ? void 0 : m.preferences) == null ? void 0 : g.chartOptions) == null ? void 0 : b.indexAxis;
4504
+ var m, g, v;
4505
+ return (v = (g = (m = u == null ? void 0 : u.card) == null ? void 0 : m.preferences) == null ? void 0 : g.chartOptions) == null ? void 0 : v.indexAxis;
4506
4506
  }
4507
4507
  ), { data: a } = Le(s), n = t === "y" ? "Y axis" : "X axis", l = t === "y" ? "X axis" : "Y axis", {
4508
4508
  keys: r,
@@ -4598,11 +4598,11 @@ function er({ col: s, idx: t }) {
4598
4598
  }
4599
4599
  function nt() {
4600
4600
  const s = h((c) => c.selectedConnectionId), t = h((c) => c.selectedDatamodelId), a = h((c) => c.selectedDatabaseName), n = h((c) => c.selectedSchemaName), l = h((c) => c.selectedTableName), r = z((c) => c.dashboard.filters) || [], i = z((c) => c.actions.addFilter), o = z((c) => c.actions.removeFilter), { removeFilterValues: d } = Ze(), { modelItems: u, tableName: m, connectionType: g } = Ve();
4601
- function b(c, x = "dashboard") {
4601
+ function v(c, x = "dashboard") {
4602
4602
  var R;
4603
- const p = pe(c.column_name), S = pe(a || ""), v = pe(n || ""), A = pe(m);
4603
+ const p = pe(c.column_name), S = pe(a || ""), j = pe(n || ""), A = pe(m);
4604
4604
  let D = pn(
4605
- v,
4605
+ j,
4606
4606
  A,
4607
4607
  g
4608
4608
  ), k = `${D}.${p}`;
@@ -4656,7 +4656,7 @@ function nt() {
4656
4656
  }), V);
4657
4657
  }
4658
4658
  }
4659
- return { assignFilter: b };
4659
+ return { assignFilter: v };
4660
4660
  }
4661
4661
  function _e() {
4662
4662
  const s = z(
@@ -5009,7 +5009,7 @@ function ir(s) {
5009
5009
  ] }) });
5010
5010
  }
5011
5011
  function or() {
5012
- var d, u, m, g, b;
5012
+ var d, u, m, g, v;
5013
5013
  const s = h((c) => c.card.preferences), t = h(
5014
5014
  (c) => c.actions.setCardPreferences
5015
5015
  ), a = h(
@@ -5146,7 +5146,7 @@ function or() {
5146
5146
  /* @__PURE__ */ e.jsx(
5147
5147
  de,
5148
5148
  {
5149
- value: ((b = s == null ? void 0 : s.formatNumber) == null ? void 0 : b.suffix) || "",
5149
+ value: ((v = s == null ? void 0 : s.formatNumber) == null ? void 0 : v.suffix) || "",
5150
5150
  className: "h-8 font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
5151
5151
  placeholder: "K, M, B, %",
5152
5152
  onChange: (c) => {
@@ -5306,7 +5306,7 @@ const dr = [
5306
5306
  value: s
5307
5307
  }));
5308
5308
  function mr() {
5309
- var d, u, m, g, b, c, x, p, S, v, A, D, k, C, E, R, V, y;
5309
+ var d, u, m, g, v, c, x, p, S, j, A, D, k, C, E, R, V, y;
5310
5310
  const s = h((f) => f.card), t = (u = (d = s == null ? void 0 : s.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : u.topoJsonUrl, [a, n] = H(
5311
5311
  ((g = (m = s == null ? void 0 : s.preferences) == null ? void 0 : m.mapVisualOptions) == null ? void 0 : g.customTopoJsonUrl) || ""
5312
5312
  ), { setCardPreferences: l } = le(), { data: r } = Rs(s), i = Object.keys((r == null ? void 0 : r.objects) || {}).map((f) => ({
@@ -5377,14 +5377,14 @@ function mr() {
5377
5377
  {
5378
5378
  className: "h-9",
5379
5379
  options: i,
5380
- value: ((c = (b = s.preferences) == null ? void 0 : b.mapVisualOptions) == null ? void 0 : c.objectKey) || "",
5380
+ value: ((c = (v = s.preferences) == null ? void 0 : v.mapVisualOptions) == null ? void 0 : c.objectKey) || "",
5381
5381
  label: "Map Object",
5382
5382
  onValueChange: (f) => {
5383
- var j;
5383
+ var b;
5384
5384
  l({
5385
5385
  ...s.preferences,
5386
5386
  mapVisualOptions: {
5387
- ...(j = s.preferences) == null ? void 0 : j.mapVisualOptions,
5387
+ ...(b = s.preferences) == null ? void 0 : b.mapVisualOptions,
5388
5388
  objectKey: f
5389
5389
  }
5390
5390
  });
@@ -5402,11 +5402,11 @@ function mr() {
5402
5402
  value: ((p = (x = s.preferences) == null ? void 0 : x.mapVisualOptions) == null ? void 0 : p.projection) || "",
5403
5403
  label: "Projection",
5404
5404
  onValueChange: (f) => {
5405
- var j;
5405
+ var b;
5406
5406
  l({
5407
5407
  ...s.preferences,
5408
5408
  mapVisualOptions: {
5409
- ...(j = s.preferences) == null ? void 0 : j.mapVisualOptions,
5409
+ ...(b = s.preferences) == null ? void 0 : b.mapVisualOptions,
5410
5410
  projection: f
5411
5411
  }
5412
5412
  });
@@ -5421,14 +5421,14 @@ function mr() {
5421
5421
  {
5422
5422
  className: "h-9",
5423
5423
  options: hr,
5424
- value: ((v = (S = s.preferences) == null ? void 0 : S.mapVisualOptions) == null ? void 0 : v.colorScale) || "",
5424
+ value: ((j = (S = s.preferences) == null ? void 0 : S.mapVisualOptions) == null ? void 0 : j.colorScale) || "",
5425
5425
  label: "Select Color Scale",
5426
5426
  onValueChange: (f) => {
5427
- var j;
5427
+ var b;
5428
5428
  l({
5429
5429
  ...s.preferences,
5430
5430
  mapVisualOptions: {
5431
- ...(j = s.preferences) == null ? void 0 : j.mapVisualOptions,
5431
+ ...(b = s.preferences) == null ? void 0 : b.mapVisualOptions,
5432
5432
  colorScale: f
5433
5433
  }
5434
5434
  });
@@ -5448,11 +5448,11 @@ function mr() {
5448
5448
  step: 0.1,
5449
5449
  value: ((D = (A = s.preferences) == null ? void 0 : A.mapVisualOptions) == null ? void 0 : D.projectionScale) || 1,
5450
5450
  onChange: (f) => {
5451
- var j;
5451
+ var b;
5452
5452
  l({
5453
5453
  ...s.preferences,
5454
5454
  mapVisualOptions: {
5455
- ...(j = s.preferences) == null ? void 0 : j.mapVisualOptions,
5455
+ ...(b = s.preferences) == null ? void 0 : b.mapVisualOptions,
5456
5456
  projectionScale: Number(f.target.value)
5457
5457
  }
5458
5458
  });
@@ -5468,11 +5468,11 @@ function mr() {
5468
5468
  step: 10,
5469
5469
  value: ((E = (C = (k = s.preferences) == null ? void 0 : k.mapVisualOptions) == null ? void 0 : C.projectionOffset) == null ? void 0 : E[0]) || 0,
5470
5470
  onChange: (f) => {
5471
- var j, N, M, q;
5471
+ var b, N, M, q;
5472
5472
  l({
5473
5473
  ...s.preferences,
5474
5474
  mapVisualOptions: {
5475
- ...(j = s.preferences) == null ? void 0 : j.mapVisualOptions,
5475
+ ...(b = s.preferences) == null ? void 0 : b.mapVisualOptions,
5476
5476
  projectionOffset: [
5477
5477
  Number(f.target.value),
5478
5478
  ((q = (M = (N = s.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : M.projectionOffset) == null ? void 0 : q[1]) || 0
@@ -5491,11 +5491,11 @@ function mr() {
5491
5491
  step: 10,
5492
5492
  value: ((y = (V = (R = s.preferences) == null ? void 0 : R.mapVisualOptions) == null ? void 0 : V.projectionOffset) == null ? void 0 : y[1]) || 0,
5493
5493
  onChange: (f) => {
5494
- var j, N, M, q;
5494
+ var b, N, M, q;
5495
5495
  l({
5496
5496
  ...s.preferences,
5497
5497
  mapVisualOptions: {
5498
- ...(j = s.preferences) == null ? void 0 : j.mapVisualOptions,
5498
+ ...(b = s.preferences) == null ? void 0 : b.mapVisualOptions,
5499
5499
  projectionOffset: [
5500
5500
  ((q = (M = (N = s.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : M.projectionOffset) == null ? void 0 : q[0]) || 0,
5501
5501
  Number(f.target.value)