react-semaphor 0.1.588 → 0.1.590

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.
Files changed (40) hide show
  1. package/dist/analytics-protocol/index.js +2 -2
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +5 -5
  4. package/dist/briefings/index.js +1 -1
  5. package/dist/chunks/{assistant-chat-BeM6joPc.js → assistant-chat-C_6dBLUk.js} +9 -9
  6. package/dist/chunks/{bookmark-impact-B7pbMx2e.js → bookmark-impact-DkZABEd3.js} +1 -1
  7. package/dist/chunks/{card-filter-builder-DmodrhyI.js → card-filter-builder-6vflbF9O.js} +166 -166
  8. package/dist/chunks/{dashboard-Tu5wT0Cw.js → dashboard-DpgRl65K.js} +1 -1
  9. package/dist/chunks/{dashboard-briefing-launcher-D8jMxIJo.js → dashboard-briefing-launcher-BLbhONJz.js} +156 -156
  10. package/dist/chunks/{dashboard-controls-uzeAIEkM.js → dashboard-controls-kCTYEEsq.js} +45 -45
  11. package/dist/chunks/{dashboard-json-i5rpFNCg.js → dashboard-json-CNIFresY.js} +2 -2
  12. package/dist/chunks/{dates-BunbHJH0.js → dates-BoeweqEo.js} +4 -4
  13. package/dist/chunks/{edit-dashboard-visual-BpEK_Sls.js → edit-dashboard-visual-D0eWTlPL.js} +719 -719
  14. package/dist/chunks/{filter-reach-copy-D5AmDHda.js → filter-reach-copy-eMhDPTYH.js} +3 -3
  15. package/dist/chunks/{index-dGxJTaP1.js → index-D8LFjI8j.js} +1 -1
  16. package/dist/chunks/{layout-grid-XCYphks2.js → layout-grid-BG__sPkb.js} +1 -1
  17. package/dist/chunks/{list-filter-DGV3fqqv.js → list-filter-Cb8i7N8f.js} +1 -1
  18. package/dist/chunks/{matrix-analytical-definition-SN0JUJVk.js → matrix-analytical-definition-D9Ll_9R-.js} +202 -190
  19. package/dist/chunks/{paintbrush-DEEZXhDj.js → paintbrush-C310xSuR.js} +1 -1
  20. package/dist/chunks/{palette-Bgy0H-Nt.js → palette-Ci5P91Zb.js} +1 -1
  21. package/dist/chunks/report-preferences-dialog-dUlVLgEk.js +1637 -0
  22. package/dist/chunks/{resolve-dashboard-input-context-DFBIngUZ.js → resolve-dashboard-input-context-NurwNg4I.js} +1 -1
  23. package/dist/chunks/{save-xnRCvMeA.js → save-BhhXfp4s.js} +1 -1
  24. package/dist/chunks/{saved-dashboard-context-DKMTP9ib.js → saved-dashboard-context-CPp--vXU.js} +3 -3
  25. package/dist/chunks/{selection-filter-compiler-DkIjp1yH.js → selection-filter-compiler-CHG-8xnW.js} +1 -1
  26. package/dist/chunks/{semaphor-ready-indicator-zU9reNmX.js → semaphor-ready-indicator-CXojR95M.js} +27098 -26525
  27. package/dist/chunks/{shelf-drop-preview-context-R9sf4oDX.js → shelf-drop-preview-context-BDScAUdq.js} +109 -109
  28. package/dist/chunks/{stored-dashboard-CksluF2S.js → stored-dashboard-KkH4zOhq.js} +4 -4
  29. package/dist/chunks/{style-sheet-parts-D7NbsFL0.js → style-sheet-parts-CmXmKqGw.js} +30 -30
  30. package/dist/chunks/{upload-BXGgYS4g.js → upload-DDYc1Qjj.js} +1 -1
  31. package/dist/chunks/{variable-draft-rbtGPvmX.js → variable-draft-Bi3RlULA.js} +3 -3
  32. package/dist/dashboard/index.js +1 -1
  33. package/dist/dashboard-authoring/index.js +10 -10
  34. package/dist/index.js +210 -211
  35. package/dist/style.css +1 -1
  36. package/dist/surfboard/index.js +1 -1
  37. package/dist/types/lib/dashboard-view-state/date-zoom.d.ts +2 -2
  38. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +7 -0
  39. package/package.json +1 -1
  40. package/dist/chunks/report-preferences-dialog-CTM0xfd0.js +0 -2028
@@ -1,18 +1,18 @@
1
- import { c as nt, B as G, X as ce, x as Ne, q as mn, a8 as pn, t as at, u as rt, v as st, w as ot, a9 as Ot, F as Oe, s as le, y as ge, z as xe, A as be, D as ve, E as re, e as it, f as lt, h as dt, L as fn, d as hn } from "./style-sheet-parts-D7NbsFL0.js";
1
+ import { c as nt, B as G, X as ce, x as Ne, q as mn, a6 as pn, t as at, u as rt, v as st, w as ot, a7 as Ot, F as Oe, s as le, y as ge, z as xe, A as be, D as ve, E as re, e as it, f as lt, h as dt, L as fn, d as hn } from "./style-sheet-parts-CmXmKqGw.js";
2
2
  import { jsx as t, jsxs as l, Fragment as fe } from "react/jsx-runtime";
3
3
  import * as _e from "react";
4
4
  import vt, { useMemo as Q, useState as H, useRef as Ae, useCallback as ne, useEffect as de, forwardRef as gn, Fragment as xn } from "react";
5
- import { b2 as ct, u as ut, ag as se, c5 as _t, cC as X, cD as bn, c1 as Ie, cE as Ue, cF as Vt, cG as vn, bX as Ve, cH as yn, ah as Rt, bE as Nn, bF as Cn, bH as wn, bx as kn, cI as Sn, i as Dn, cJ as In, cK as Tn, cL as yt, bW as Et, cM as Ln, cN as Mt, cO as zt, cP as An, cQ as $n, cR as Fn, cS as On, cT as _n, cU as Vn, cV as Rn, by as En, cW as Nt, cX as qt, cY as Mn, bB as zn, cZ as qn, c_ as jn, c$ as Un, d0 as ye, d1 as jt, d2 as Gn, d3 as Bn, d4 as Wn, d5 as Kn, d6 as Qn, d7 as Je, d8 as he, d9 as Ze, da as et, db as tt, dc as Hn, dd as Re, de as Ee, df as Me, dg as ze, dh as Ut, di as Gt, dj as Bt } from "./semaphor-ready-indicator-zU9reNmX.js";
6
- import { D as Pn } from "./token-types-DTocOcwt.js";
7
- import { fJ as Wt, fK as Yn, fL as Xn, fM as Jn, fN as Zn, fO as ea, fP as $e, fQ as Ct, fR as wt, fS as Ke, fT as Qe, fU as ta, fV as na, fW as kt, fX as aa, fY as ra, fZ as Fe, f_ as sa, f$ as St, g0 as Kt, g1 as Qt, g2 as Ht, g3 as Pt, g4 as oa, g5 as ia, g6 as Dt, g7 as la, g8 as It, g9 as da, ga as ca, gb as ua, gc as ma, gd as He, a as qe, ge as Pe, bd as pa, gf as fa, gg as ha, gh as ga, gi as xa } from "./resolve-dashboard-input-context-DFBIngUZ.js";
8
- import { c as z } from "./pickers-DkqmtnTL.js";
9
- import { r as Yt } from "./validators-CrYXNnNE.js";
5
+ import { b8 as ct, u as ut, am as se, c8 as _t, cF as J, cG as bn, c4 as Ie, cH as Ue, cI as Vt, cJ as vn, b_ as Ve, cK as yn, an as Rt, bG as Nn, bH as Cn, bJ as wn, bZ as kn, cL as Sn, o as Dn, cM as In, cN as Tn, cO as yt, bY as Et, cP as Ln, cQ as zt, cR as Mt, cS as An, cT as $n, cU as Fn, cV as On, cW as _n, cX as Vn, cY as Rn, bz as En, cZ as Nt, c_ as qt, c$ as zn, bC as Mn, d0 as qn, d1 as jn, d2 as Un, d3 as ye, d4 as jt, d5 as Gn, d6 as Bn, d7 as Wn, d8 as Kn, d9 as Qn, da as Xe, db as he, dc as Ze, dd as et, de as tt, df as Hn, dg as Re, dh as Ee, di as ze, dj as Me, dk as Ut, dl as Gt, dm as Bt } from "./semaphor-ready-indicator-CXojR95M.js";
6
+ import { D as Yn } from "./token-types-DTocOcwt.js";
7
+ import { fJ as Wt, fK as Pn, fL as Jn, fM as Xn, fN as Zn, fO as ea, fP as $e, fQ as Ct, fR as wt, fS as Ke, fT as Qe, fU as ta, fV as na, fW as kt, fX as aa, fY as ra, fZ as Fe, f_ as sa, f$ as St, g0 as Kt, g1 as Qt, g2 as Ht, g3 as Yt, g4 as oa, g5 as ia, g6 as Dt, g7 as la, g8 as It, g9 as da, ga as ca, gb as ua, gc as ma, gd as He, a as qe, ge as Ye, bd as pa, gf as fa, gg as ha, gh as ga, gi as xa } from "./resolve-dashboard-input-context-NurwNg4I.js";
8
+ import { c as M } from "./pickers-DkqmtnTL.js";
9
+ import { r as Pt } from "./validators-CrYXNnNE.js";
10
10
  import "./matrix-operation-contract-JSmproo9.js";
11
11
  import "./analytics-base-schemas-8wz9vqn_.js";
12
12
  import "../value-format-preferences/index.js";
13
- import { U as ba } from "./upload-BXGgYS4g.js";
14
- import { r as Xt } from "./metric-comparison-xE_J6hkg.js";
15
- import { a3 as Jt } from "./filter-reach-copy-D5AmDHda.js";
13
+ import { U as ba } from "./upload-DDYc1Qjj.js";
14
+ import { r as Jt } from "./metric-comparison-xE_J6hkg.js";
15
+ import { a3 as Xt } from "./filter-reach-copy-eMhDPTYH.js";
16
16
  /**
17
17
  * @license lucide-react v0.453.0 - ISC
18
18
  *
@@ -142,10 +142,10 @@ function mt(e) {
142
142
  }
143
143
  function wa(e, n) {
144
144
  if (e.some(
145
- (d) => X(d, n)
145
+ (d) => J(d, n)
146
146
  ))
147
147
  return e.filter(
148
- (d) => !X(d, n)
148
+ (d) => !J(d, n)
149
149
  );
150
150
  const o = mt(e);
151
151
  return e.some(
@@ -162,7 +162,7 @@ function ka(e, n) {
162
162
  return n;
163
163
  const d = [...e];
164
164
  for (const c of n)
165
- d.some((i) => X(i, c)) || d.push(c);
165
+ d.some((i) => J(i, c)) || d.push(c);
166
166
  return d;
167
167
  }
168
168
  function Sa({
@@ -210,20 +210,20 @@ function Da({
210
210
  );
211
211
  }, [s, n]), w = n.length > 0 && f.length > 0, y = d || w || !!a, h = s.length, N = Q(() => f.filter(
212
212
  (O) => o.some(
213
- (T) => X(T, Le(O))
213
+ (T) => J(T, Le(O))
214
214
  )
215
215
  ).length, [f, o]), k = Q(
216
216
  () => f.map(Le),
217
217
  [f]
218
218
  ), _ = k.length > 0 && k.every(
219
- (O) => o.some((T) => X(T, O))
219
+ (O) => o.some((T) => J(T, O))
220
220
  ), D = () => {
221
221
  if (k.length !== 0) {
222
222
  if (_) {
223
223
  u(
224
224
  o.filter(
225
225
  (O) => !k.some(
226
- (T) => X(O, T)
226
+ (T) => J(O, T)
227
227
  )
228
228
  )
229
229
  );
@@ -257,7 +257,7 @@ function Da({
257
257
  /* @__PURE__ */ t(
258
258
  Ie,
259
259
  {
260
- className: z(
260
+ className: M(
261
261
  "h-3 w-3 shrink-0 text-muted-foreground transition-transform",
262
262
  y && "rotate-90"
263
263
  ),
@@ -287,14 +287,14 @@ function Da({
287
287
  /* @__PURE__ */ t("span", { className: "ml-auto font-mono text-[10px] tabular-nums text-muted-foreground", children: N > 0 ? N : "" })
288
288
  ] }),
289
289
  y && /* @__PURE__ */ t("ul", { className: "space-y-px pb-1", children: m && s.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "Loading datasets…" }) : f.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "No datasets in this domain." }) : f.map((O) => {
290
- const T = Le(O), P = o.some(
291
- (J) => X(J, T)
290
+ const T = Le(O), Y = o.some(
291
+ (X) => J(X, T)
292
292
  );
293
293
  return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ l("label", { className: "flex cursor-pointer items-start gap-2 rounded-[4px] px-9 py-1.5 transition-colors hover:bg-muted/40", children: [
294
294
  /* @__PURE__ */ t(
295
295
  Ue,
296
296
  {
297
- checked: P,
297
+ checked: Y,
298
298
  onCheckedChange: () => j(O),
299
299
  className: "mt-[3px] h-3.5 w-3.5 shrink-0"
300
300
  }
@@ -387,7 +387,7 @@ function La({
387
387
  /* @__PURE__ */ t(
388
388
  Ie,
389
389
  {
390
- className: z(
390
+ className: M(
391
391
  "h-3 w-3 shrink-0 text-muted-foreground transition-transform",
392
392
  i && "rotate-90"
393
393
  ),
@@ -771,13 +771,13 @@ function pt({
771
771
  const m = i.map(
772
772
  (h) => s(h.table_name, h.table_type)
773
773
  ), f = m.length > 0 && m.every(
774
- (h) => u.some((N) => X(N, h))
774
+ (h) => u.some((N) => J(N, h))
775
775
  ), w = (h, N) => {
776
776
  const k = s(h, N), _ = u.some(
777
- (D) => X(D, k)
777
+ (D) => J(D, k)
778
778
  );
779
779
  d(
780
- _ ? u.filter((D) => !X(D, k)) : [...u, k]
780
+ _ ? u.filter((D) => !J(D, k)) : [...u, k]
781
781
  );
782
782
  }, y = () => {
783
783
  if (m.length === 0) return;
@@ -785,7 +785,7 @@ function pt({
785
785
  d(
786
786
  u.filter(
787
787
  (N) => !m.some(
788
- (k) => X(N, k)
788
+ (k) => J(N, k)
789
789
  )
790
790
  )
791
791
  );
@@ -793,7 +793,7 @@ function pt({
793
793
  }
794
794
  const h = [...u];
795
795
  for (const N of m)
796
- h.some((k) => X(k, N)) || h.push(N);
796
+ h.some((k) => J(k, N)) || h.push(N);
797
797
  d(h);
798
798
  };
799
799
  return /* @__PURE__ */ l("ul", { children: [
@@ -815,7 +815,7 @@ function pt({
815
815
  ] }),
816
816
  i.map((h) => {
817
817
  const N = s(h.table_name, h.table_type), k = u.some(
818
- (_) => X(_, N)
818
+ (_) => J(_, N)
819
819
  );
820
820
  return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ l("label", { className: "flex cursor-pointer items-center gap-2.5 py-1.5 pl-12 pr-4 transition-colors hover:bg-muted/40", children: [
821
821
  /* @__PURE__ */ t(
@@ -873,10 +873,10 @@ function Oa({
873
873
  database: i.database || "",
874
874
  schema: i.schema || ""
875
875
  }, m = a.some(
876
- (f) => X(f, s)
876
+ (f) => J(f, s)
877
877
  );
878
878
  o(
879
- m ? a.filter((f) => !X(f, s)) : [...a, s]
879
+ m ? a.filter((f) => !J(f, s)) : [...a, s]
880
880
  );
881
881
  };
882
882
  return /* @__PURE__ */ l("div", { children: [
@@ -894,7 +894,7 @@ function Oa({
894
894
  database: i.database || "",
895
895
  schema: i.schema || ""
896
896
  }, m = a.some(
897
- (f) => X(f, s)
897
+ (f) => J(f, s)
898
898
  );
899
899
  return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ l("label", { className: "flex cursor-pointer items-start gap-2.5 py-1.5 pl-12 pr-4 transition-colors hover:bg-muted/40", children: [
900
900
  /* @__PURE__ */ t(
@@ -936,7 +936,7 @@ function an({
936
936
  {
937
937
  type: "button",
938
938
  onClick: () => d((s) => !s),
939
- className: z(
939
+ className: M(
940
940
  "flex h-6 w-full items-center gap-1.5 pr-4 text-left transition-colors hover:bg-muted/40",
941
941
  n === 1 ? "pl-8" : "pl-10"
942
942
  ),
@@ -944,7 +944,7 @@ function an({
944
944
  /* @__PURE__ */ t(
945
945
  Ie,
946
946
  {
947
- className: z(
947
+ className: M(
948
948
  "h-2.5 w-2.5 shrink-0 text-muted-foreground transition-transform",
949
949
  c && "rotate-90"
950
950
  ),
@@ -1032,7 +1032,7 @@ function Ea({
1032
1032
  }
1033
1033
  );
1034
1034
  }
1035
- function Ye(e) {
1035
+ function Pe(e) {
1036
1036
  if (e != null && e.length)
1037
1037
  return e.every((n) => n.type === "dataset") ? "semanticDomain" : e.every((n) => n.type === "url") ? "url" : e.every(
1038
1038
  (n) => n.type === "upload" || n.type === "file"
@@ -1046,9 +1046,9 @@ function Cr({
1046
1046
  onDataSourceChange: u
1047
1047
  }) {
1048
1048
  var Se, me;
1049
- const { tokenProps: d } = ct(), c = d.config, i = d.semanticDomainAccess || Pn, [s, m] = H([]), [f, w] = H(""), [y, h] = H("all"), [N, k] = H(
1049
+ const { tokenProps: d } = ct(), c = d.config, i = d.semanticDomainAccess || Yn, [s, m] = H([]), [f, w] = H(""), [y, h] = H("all"), [N, k] = H(
1050
1050
  void 0
1051
- ), _ = Ae(!1), { updateDataSource: D } = Rt(), j = u ?? D, O = i.mode, T = (c == null ? void 0 : c.showDirectSource) !== !1, P = O === "include" || O === "exclude" || !T, J = O !== "all", p = T && !P, I = P ? "semanticDomain" : a.mode, A = !T, S = O === "include" && (((Se = i.domainIds) == null ? void 0 : Se.length) || 0) === 1 ? (me = i.domainIds) == null ? void 0 : me[0] : void 0, v = ne(
1051
+ ), _ = Ae(!1), { updateDataSource: D } = Rt(), j = u ?? D, O = i.mode, T = (c == null ? void 0 : c.showDirectSource) !== !1, Y = O === "include" || O === "exclude" || !T, X = O !== "all", p = T && !Y, I = Y ? "semanticDomain" : a.mode, A = !T, S = O === "include" && (((Se = i.domainIds) == null ? void 0 : Se.length) || 0) === 1 ? (me = i.domainIds) == null ? void 0 : me[0] : void 0, v = ne(
1052
1052
  ($) => {
1053
1053
  _.current = !0, j({
1054
1054
  ...a,
@@ -1071,11 +1071,11 @@ function Cr({
1071
1071
  );
1072
1072
  de(() => {
1073
1073
  var b;
1074
- if (P && a.mode !== "semanticDomain") {
1074
+ if (Y && a.mode !== "semanticDomain") {
1075
1075
  v("semanticDomain");
1076
1076
  return;
1077
1077
  }
1078
- if (!J || I !== "semanticDomain") return;
1078
+ if (!X || I !== "semanticDomain") return;
1079
1079
  const $ = i.domainIds ?? [], ae = (((b = a.selectedEntities) == null ? void 0 : b.length) ?? 0) > 0, r = ((s == null ? void 0 : s.length) ?? 0) > 0;
1080
1080
  Ca({
1081
1081
  mode: O,
@@ -1087,8 +1087,8 @@ function Cr({
1087
1087
  selectedEntities: []
1088
1088
  }), r && m([]));
1089
1089
  }, [
1090
- P,
1091
- J,
1090
+ Y,
1091
+ X,
1092
1092
  I,
1093
1093
  a.mode,
1094
1094
  a.semanticDomainId,
@@ -1102,27 +1102,27 @@ function Cr({
1102
1102
  S && !a.semanticDomainId && g({ semanticDomainId: S });
1103
1103
  }, [S, a.semanticDomainId, g]), de(() => {
1104
1104
  if (!e) {
1105
- _.current = !1, w(""), k(void 0), h(P ? "semantic" : "all");
1105
+ _.current = !1, w(""), k(void 0), h(Y ? "semantic" : "all");
1106
1106
  return;
1107
1107
  }
1108
1108
  _.current || (m([...o || []]), k(
1109
- Ye(o)
1109
+ Pe(o)
1110
1110
  ));
1111
- }, [e, o, P]);
1111
+ }, [e, o, Y]);
1112
1112
  const q = ($) => {
1113
1113
  _.current = !0, m(
1114
- s.filter((ae) => !X(ae, $))
1114
+ s.filter((ae) => !J(ae, $))
1115
1115
  );
1116
1116
  }, C = ne(
1117
1117
  ($, ae) => {
1118
1118
  _.current = !0, m($), k(
1119
- ae ?? Ye($)
1119
+ ae ?? Pe($)
1120
1120
  );
1121
1121
  },
1122
1122
  []
1123
1123
  ), Z = () => {
1124
1124
  var ae, r;
1125
- const $ = Ye(s) ?? N ?? I;
1125
+ const $ = Pe(s) ?? N ?? I;
1126
1126
  if ($ === "semanticDomain") {
1127
1127
  const x = en(s) || a.semanticDomainId, b = ((ae = s == null ? void 0 : s[0]) == null ? void 0 : ae.connectionId) || a.connectionId, L = ((r = s == null ? void 0 : s[0]) == null ? void 0 : r.connectionType) || a.connectionType;
1128
1128
  j({
@@ -1155,7 +1155,7 @@ function Cr({
1155
1155
  });
1156
1156
  }
1157
1157
  n(!1);
1158
- }, { semanticDomains: V } = Zt(), { connections: M } = Vt(), K = Q(
1158
+ }, { semanticDomains: V } = Zt(), { connections: z } = Vt(), K = Q(
1159
1159
  () => new Map(
1160
1160
  V.map(($) => [
1161
1161
  $.id,
@@ -1165,7 +1165,7 @@ function Cr({
1165
1165
  [V]
1166
1166
  ), U = ($) => {
1167
1167
  h($), $ === "semantic" || $.startsWith("domain:") ? a.mode !== "semanticDomain" && v("semanticDomain") : ($ === "direct" || $.startsWith("conn:")) && a.mode === "semanticDomain" && v("database");
1168
- }, ee = y.startsWith("domain:"), te = y.startsWith("conn:"), Be = ee ? y.slice(7) : void 0, We = te ? y.slice(5) : void 0, oe = !p || y === "all" || y === "semantic" || ee, Te = T && !P && (y === "all" || y === "direct" || te), ue = ((o == null ? void 0 : o.length) ?? 0) > 0, Ce = s.length === 0 && !ue, we = s.length === 0 && ue ? "Clear" : "Add", ke = A ? "Select dataset" : "Add data";
1168
+ }, ee = y.startsWith("domain:"), te = y.startsWith("conn:"), Be = ee ? y.slice(7) : void 0, We = te ? y.slice(5) : void 0, oe = !p || y === "all" || y === "semantic" || ee, Te = T && !Y && (y === "all" || y === "direct" || te), ue = ((o == null ? void 0 : o.length) ?? 0) > 0, Ce = s.length === 0 && !ue, we = s.length === 0 && ue ? "Clear" : "Add", ke = A ? "Select dataset" : "Add data";
1169
1169
  return /* @__PURE__ */ t(Nn, { open: e, onOpenChange: n, children: /* @__PURE__ */ l(
1170
1170
  Cn,
1171
1171
  {
@@ -1225,7 +1225,7 @@ function Cr({
1225
1225
  onClick: () => U("all")
1226
1226
  }
1227
1227
  ),
1228
- (V.length > 0 || M.length > 0) && /* @__PURE__ */ l(fe, { children: [
1228
+ (V.length > 0 || z.length > 0) && /* @__PURE__ */ l(fe, { children: [
1229
1229
  /* @__PURE__ */ t(
1230
1230
  De,
1231
1231
  {
@@ -1253,7 +1253,7 @@ function Cr({
1253
1253
  },
1254
1254
  `domain:${$.id}`
1255
1255
  )),
1256
- M.map(($) => /* @__PURE__ */ t(
1256
+ z.map(($) => /* @__PURE__ */ t(
1257
1257
  De,
1258
1258
  {
1259
1259
  label: $.name,
@@ -1310,7 +1310,7 @@ function Cr({
1310
1310
  type: "button",
1311
1311
  onClick: Z,
1312
1312
  disabled: Ce,
1313
- className: z(
1313
+ className: M(
1314
1314
  "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-2.5 text-[12px] font-medium text-primary-foreground transition-colors hover:bg-primary/90",
1315
1315
  Ce && "cursor-not-allowed opacity-50 hover:bg-primary"
1316
1316
  ),
@@ -1349,7 +1349,7 @@ function De({
1349
1349
  type: "button",
1350
1350
  onClick: a,
1351
1351
  "aria-pressed": n,
1352
- className: z(
1352
+ className: M(
1353
1353
  "inline-flex h-6 shrink-0 items-center whitespace-nowrap rounded-control px-2 text-[11px] font-medium transition-colors",
1354
1354
  n ? "bg-primary text-primary-foreground hover:bg-primary/90" : "text-muted-foreground hover:bg-muted hover:text-foreground"
1355
1355
  ),
@@ -1434,7 +1434,7 @@ function kr({
1434
1434
  In,
1435
1435
  {
1436
1436
  variant: "outline",
1437
- className: z(
1437
+ className: M(
1438
1438
  "cursor-help select-none transition-all",
1439
1439
  m[s],
1440
1440
  a
@@ -1449,7 +1449,7 @@ function kr({
1449
1449
  ot,
1450
1450
  {
1451
1451
  side: "bottom",
1452
- className: z("max-w-xs", w[s]),
1452
+ className: M("max-w-xs", w[s]),
1453
1453
  children: [
1454
1454
  /* @__PURE__ */ t(Ot, { className: y[s] }),
1455
1455
  /* @__PURE__ */ t("p", { children: f[s] })
@@ -1458,7 +1458,7 @@ function kr({
1458
1458
  )
1459
1459
  ] }) });
1460
1460
  }
1461
- const Ma = gn(
1461
+ const za = gn(
1462
1462
  ({
1463
1463
  side: e = "bottom",
1464
1464
  children: n,
@@ -1480,7 +1480,7 @@ const Ma = gn(
1480
1480
  onClick: u,
1481
1481
  ...s,
1482
1482
  ...c,
1483
- className: z(`${Yn}`, a),
1483
+ className: M(`${Pn}`, a),
1484
1484
  children: n
1485
1485
  }
1486
1486
  ) }),
@@ -1489,7 +1489,7 @@ const Ma = gn(
1489
1489
  {
1490
1490
  side: e,
1491
1491
  sideOffset: 10,
1492
- className: z(
1492
+ className: M(
1493
1493
  "border-foreground/20 bg-foreground text-background"
1494
1494
  ),
1495
1495
  children: [
@@ -1500,10 +1500,10 @@ const Ma = gn(
1500
1500
  )
1501
1501
  ] }) })
1502
1502
  );
1503
- Ma.displayName = "IconButton";
1504
- function za(e, n) {
1503
+ za.displayName = "IconButton";
1504
+ function Ma(e, n) {
1505
1505
  var s, m;
1506
- const a = e.qualifiedFieldName || e.name, o = e.qualifiedFieldName ? e.qualifiedFieldName.split(".").slice(0, -1).join(".") : e.qualifiedEntityName || e.entityName, u = n.connectionId || ((s = n.dataSource) == null ? void 0 : s.connectionId) || "", d = Xn(e), c = Jn(
1506
+ const a = e.qualifiedFieldName || e.name, o = e.qualifiedFieldName ? e.qualifiedFieldName.split(".").slice(0, -1).join(".") : e.qualifiedEntityName || e.entityName, u = n.connectionId || ((s = n.dataSource) == null ? void 0 : s.connectionId) || "", d = Jn(e), c = Xn(
1507
1507
  n.dataSource,
1508
1508
  {
1509
1509
  connectionId: u,
@@ -1513,7 +1513,7 @@ function za(e, n) {
1513
1513
  ), i = Zn(n.dataSource, c, e) || "";
1514
1514
  return {
1515
1515
  column: a,
1516
- title: Jt(e),
1516
+ title: Xt(e),
1517
1517
  dataType: e.dataType,
1518
1518
  ...e.nativeDataType ? { nativeDataType: e.nativeDataType } : {},
1519
1519
  table: e.entityName || "",
@@ -1550,7 +1550,7 @@ function qa(e) {
1550
1550
  /* @__PURE__ */ t(
1551
1551
  "span",
1552
1552
  {
1553
- className: z(
1553
+ className: M(
1554
1554
  "flex h-5 w-5 items-center justify-center rounded-full border text-[10px] font-medium tabular-nums",
1555
1555
  c ? "border-foreground bg-foreground text-background" : i ? "border-foreground/30 bg-foreground/10 text-foreground" : "border-border/60 bg-background text-muted-foreground"
1556
1556
  ),
@@ -1560,7 +1560,7 @@ function qa(e) {
1560
1560
  /* @__PURE__ */ t(
1561
1561
  "span",
1562
1562
  {
1563
- className: z(
1563
+ className: M(
1564
1564
  "text-[12px]",
1565
1565
  c ? "font-medium text-foreground" : "text-muted-foreground"
1566
1566
  ),
@@ -1623,7 +1623,7 @@ function Tt(e) {
1623
1623
  return /* @__PURE__ */ l("div", { className: "space-y-3", children: [
1624
1624
  /* @__PURE__ */ t(rn, { control: n, onChange: s }),
1625
1625
  /* @__PURE__ */ t(
1626
- Mt,
1626
+ zt,
1627
1627
  {
1628
1628
  control: n,
1629
1629
  availableFieldChoices: o,
@@ -1635,7 +1635,7 @@ function Tt(e) {
1635
1635
  }
1636
1636
  ),
1637
1637
  /* @__PURE__ */ t(
1638
- zt,
1638
+ Mt,
1639
1639
  {
1640
1640
  control: n,
1641
1641
  value: a,
@@ -1774,7 +1774,7 @@ function Ga(e) {
1774
1774
  ...n,
1775
1775
  label: He[e.type]
1776
1776
  } : {
1777
- ...Pt({
1777
+ ...Yt({
1778
1778
  controls: [
1779
1779
  {
1780
1780
  ...n,
@@ -1815,7 +1815,7 @@ function Sr({
1815
1815
  [a]
1816
1816
  ), D = oa(e), j = ea(e), [O, T] = H(
1817
1817
  null
1818
- ), [P, J] = H(
1818
+ ), [Y, X] = H(
1819
1819
  null
1820
1820
  ), [p, I] = H(
1821
1821
  () => c ? {
@@ -1890,9 +1890,9 @@ function Sr({
1890
1890
  v.current = c, r && (I({
1891
1891
  step: 1,
1892
1892
  control: $e(e, n, Array.from(_))
1893
- }), J(null), T(null));
1893
+ }), X(null), T(null));
1894
1894
  }, [n, c, _, e]);
1895
- const M = (r) => {
1895
+ const z = (r) => {
1896
1896
  if (!C(r.type))
1897
1897
  return {
1898
1898
  fields: s || [],
@@ -1984,7 +1984,7 @@ function Sr({
1984
1984
  const B = L.find(
1985
1985
  (W) => W.id === r
1986
1986
  );
1987
- let Y = o;
1987
+ let P = o;
1988
1988
  if (b && B) {
1989
1989
  const W = Qe({
1990
1990
  control: b,
@@ -1996,11 +1996,11 @@ function Sr({
1996
1996
  nextControl: B,
1997
1997
  currentDefaultValue: pe
1998
1998
  });
1999
- B.source.kind === "manual" && (A.current[r] = ie), o && (Y = { ...o }, ie === void 0 ? delete Y[r] : Y[r] = ie), L = L.map(
1999
+ B.source.kind === "manual" && (A.current[r] = ie), o && (P = { ...o }, ie === void 0 ? delete P[r] : P[r] = ie), L = L.map(
2000
2000
  (bt) => bt.id === r ? { ...B, defaultValue: ie } : bt
2001
2001
  );
2002
2002
  }
2003
- U(L, Y, {
2003
+ U(L, P, {
2004
2004
  type: "update",
2005
2005
  cardBindingsById: E,
2006
2006
  affectedBindingControlIds: F
@@ -2042,7 +2042,7 @@ function Sr({
2042
2042
  S.current = void 0, I({
2043
2043
  step: 1,
2044
2044
  control: $e(e, n, Array.from(_))
2045
- }), J(null), T(null);
2045
+ }), X(null), T(null);
2046
2046
  }, [n, _, e]), oe = (r) => {
2047
2047
  I(
2048
2048
  (x) => x && (() => {
@@ -2163,7 +2163,7 @@ function Sr({
2163
2163
  cardBindingsById: p.cardBindingsById
2164
2164
  }
2165
2165
  );
2166
- J(x), I(null), k == null || k();
2166
+ X(x), I(null), k == null || k();
2167
2167
  }, [n, p, o, U, k]), xt = p ? C(p.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Se = p != null && p.createdControlId ? `[[param.${p.createdControlId}]]` : p ? `[[param.${sa(p.control.label) || p.control.id}]]` : "", me = St({
2168
2168
  controls: n,
2169
2169
  defaultValues: o
@@ -2443,10 +2443,10 @@ function Sr({
2443
2443
  ] }) : null,
2444
2444
  !p && n.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: d }) : null,
2445
2445
  !p && n.map((r) => {
2446
- const x = M(r), b = i == null ? void 0 : i[r.id], L = Qe({
2446
+ const x = z(r), b = i == null ? void 0 : i[r.id], L = Qe({
2447
2447
  control: r,
2448
2448
  defaultValues: o
2449
- }), R = P === r.id, E = "inline-flex shrink-0 items-center rounded-[4px] border border-border/60 bg-muted/40 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground";
2449
+ }), R = Y === r.id, E = "inline-flex shrink-0 items-center rounded-[4px] border border-border/60 bg-muted/40 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground";
2450
2450
  return /* @__PURE__ */ l(
2451
2451
  "div",
2452
2452
  {
@@ -2458,7 +2458,7 @@ function Sr({
2458
2458
  {
2459
2459
  type: "button",
2460
2460
  className: "flex min-w-0 flex-1 items-start gap-2 rounded-control text-left focus:outline-none focus-visible:bg-muted/40",
2461
- onClick: () => J(
2461
+ onClick: () => X(
2462
2462
  (F) => F === r.id ? null : r.id
2463
2463
  ),
2464
2464
  children: [
@@ -2514,7 +2514,7 @@ function Sr({
2514
2514
  {
2515
2515
  value: r.type,
2516
2516
  onValueChange: (F) => {
2517
- const B = Pt({
2517
+ const B = Yt({
2518
2518
  controls: n,
2519
2519
  controlId: r.id,
2520
2520
  nextType: F,
@@ -2574,10 +2574,10 @@ function Sr({
2574
2574
  const B = K({
2575
2575
  control: r,
2576
2576
  nextSelectedCardIds: F
2577
- }), Y = n.map(
2577
+ }), P = n.map(
2578
2578
  (W) => W.id === r.id ? B.nextControl : W
2579
2579
  );
2580
- U(Y, o, {
2580
+ U(P, o, {
2581
2581
  type: "update",
2582
2582
  cardBindingsById: B.cardBindingsById
2583
2583
  });
@@ -2591,22 +2591,22 @@ function Sr({
2591
2591
  selectedCardIds: (w == null ? void 0 : w[r.id]) || [],
2592
2592
  control: r,
2593
2593
  onChange: (F, B) => {
2594
- const Y = K({
2594
+ const P = K({
2595
2595
  control: r,
2596
2596
  nextSelectedCardIds: (w == null ? void 0 : w[r.id]) || [],
2597
2597
  matrixTargetIds: { [F]: B }
2598
2598
  });
2599
2599
  U(
2600
- n.map((W) => W.id === r.id ? Y.nextControl : W),
2600
+ n.map((W) => W.id === r.id ? P.nextControl : W),
2601
2601
  o,
2602
- { type: "update", cardBindingsById: Y.cardBindingsById }
2602
+ { type: "update", cardBindingsById: P.cardBindingsById }
2603
2603
  );
2604
2604
  }
2605
2605
  }
2606
2606
  )
2607
2607
  ] }) : null,
2608
2608
  /* @__PURE__ */ t(
2609
- Mt,
2609
+ zt,
2610
2610
  {
2611
2611
  control: r,
2612
2612
  availableFieldChoices: x.fields,
@@ -2618,7 +2618,7 @@ function Sr({
2618
2618
  }
2619
2619
  ),
2620
2620
  r.initialValueStrategy === "saved_default" && /* @__PURE__ */ t(
2621
- zt,
2621
+ Mt,
2622
2622
  {
2623
2623
  control: r,
2624
2624
  value: L,
@@ -2628,11 +2628,11 @@ function Sr({
2628
2628
  previewControlValues: me,
2629
2629
  onChange: (F) => {
2630
2630
  const B = n.map(
2631
- (Y) => Y.id === r.id ? { ...Y, defaultValue: F } : Y
2631
+ (P) => P.id === r.id ? { ...P, defaultValue: F } : P
2632
2632
  );
2633
2633
  if (r.source.kind === "manual" && (A.current[r.id] = F), o) {
2634
- const Y = { ...o };
2635
- F === void 0 ? delete Y[r.id] : Y[r.id] = F, U(B, Y);
2634
+ const P = { ...o };
2635
+ F === void 0 ? delete P[r.id] : P[r.id] = F, U(B, P);
2636
2636
  return;
2637
2637
  }
2638
2638
  U(B, void 0);
@@ -2924,7 +2924,7 @@ function Ka({
2924
2924
  groups: g.groups.map(v)
2925
2925
  };
2926
2926
  d(v(o));
2927
- }, P = (I, A, S) => {
2927
+ }, Y = (I, A, S) => {
2928
2928
  const v = (g) => g.id === I ? {
2929
2929
  ...g,
2930
2930
  groups: Nt(g.groups, A, S)
@@ -2933,7 +2933,7 @@ function Ka({
2933
2933
  groups: g.groups.map(v)
2934
2934
  };
2935
2935
  d(v(o));
2936
- }, J = (I) => {
2936
+ }, X = (I) => {
2937
2937
  if (!I || I.conditions.length === 0 && I.groups.length === 0)
2938
2938
  return "-- No filters defined";
2939
2939
  const A = (v) => {
@@ -2943,31 +2943,31 @@ function Ka({
2943
2943
  let C = v.value;
2944
2944
  if (v.latestValue && q === "=")
2945
2945
  return `${g} = ${qt} /* the latest value each time the card runs */`;
2946
- const Z = Yt(v.relativeMeta);
2946
+ const Z = Pt(v.relativeMeta);
2947
2947
  if (Z && (q === "between" || q === "not between")) {
2948
- const V = q === "between" ? "BETWEEN" : "NOT BETWEEN", { label: M, range: K } = Mn(Z, {
2948
+ const V = q === "between" ? "BETWEEN" : "NOT BETWEEN", { label: z, range: K } = zn(Z, {
2949
2949
  tz: (D == null ? void 0 : D.tz) ?? "UTC",
2950
2950
  weekStart: (D == null ? void 0 : D.weekStart) ?? 1,
2951
2951
  anchor: (D == null ? void 0 : D.anchor) ?? "now"
2952
2952
  });
2953
- return K ? `${g} ${V} '${K.start.toISOString()}' AND '${K.end.toISOString()}' /* ${M}: dates update each time the card runs */` : Xt(Z).dataAnchored ? `${g} ${V} ${M} /* dates count back from the latest data each time the card runs */` : `${g} ${V} ${M} /* dates follow your calendar each time the card runs */`;
2953
+ return K ? `${g} ${V} '${K.start.toISOString()}' AND '${K.end.toISOString()}' /* ${z}: dates update each time the card runs */` : Jt(Z).dataAnchored ? `${g} ${V} ${z} /* dates count back from the latest data each time the card runs */` : `${g} ${V} ${z} /* dates follow your calendar each time the card runs */`;
2954
2954
  }
2955
2955
  if (v.field.dataType === "string" && !["in", "not in"].includes(v.operator))
2956
2956
  typeof C == "string" ? C = `'${C}'` : Array.isArray(C) && (C = `'${C.join(", ")}'`);
2957
2957
  else if (v.field.dataType === "date" || v.field.dataType === "datetime" || v.field.dataType === "timestamp")
2958
2958
  if (v.operator === "between" && Array.isArray(C) && C.length === 2) {
2959
- const V = C[0] ? `'${C[0]}'` : "NULL", M = C[1] ? `'${C[1]}'` : "NULL";
2960
- return `${g} BETWEEN ${V} AND ${M}`;
2959
+ const V = C[0] ? `'${C[0]}'` : "NULL", z = C[1] ? `'${C[1]}'` : "NULL";
2960
+ return `${g} BETWEEN ${V} AND ${z}`;
2961
2961
  } else if ((v.operator === "in" || v.operator === "not in") && Array.isArray(C)) {
2962
- const V = C.map((M) => M ? `'${M}'` : "NULL").join(", ");
2962
+ const V = C.map((z) => z ? `'${z}'` : "NULL").join(", ");
2963
2963
  return `${g} ${q} (${V})`;
2964
2964
  } else typeof C == "string" || C instanceof Date ? C = `'${C}'` : Array.isArray(C) && C.length > 0 && (C = `'${C[0]}'`);
2965
2965
  else if (["in", "not in"].includes(v.operator)) {
2966
2966
  let V = [];
2967
2967
  Array.isArray(C) ? V = C.map(
2968
- (M) => typeof M == "string" ? `'${M}'` : String(M)
2969
- ) : typeof C == "string" ? V = C.split(",").map((M) => {
2970
- const K = M.trim();
2968
+ (z) => typeof z == "string" ? `'${z}'` : String(z)
2969
+ ) : typeof C == "string" ? V = C.split(",").map((z) => {
2970
+ const K = z.trim();
2971
2971
  return v.field.dataType === "string" ? `'${K}'` : K;
2972
2972
  }) : typeof C == "number" && (V = [String(C)]), C = `(${V.join(", ")})`;
2973
2973
  }
@@ -2987,7 +2987,7 @@ function Ka({
2987
2987
  }
2988
2988
  }, S = (v) => {
2989
2989
  const g = v.conditions.map(A), q = v.groups.map(
2990
- (M) => S(M)
2990
+ (z) => S(z)
2991
2991
  ), C = [...g, ...q].filter(Boolean);
2992
2992
  if (C.length === 0) return "";
2993
2993
  const Z = C.join(` ${v.logicalOperator} `), V = C.length > 1 ? `(${Z})` : Z;
@@ -3009,8 +3009,8 @@ function Ka({
3009
3009
  updateGroupOperator: j,
3010
3010
  updateGroupNegate: O,
3011
3011
  reorderConditions: T,
3012
- reorderGroups: P,
3013
- generateSQLPreview: J,
3012
+ reorderGroups: Y,
3013
+ generateSQLPreview: X,
3014
3014
  hasAnyFilters: p
3015
3015
  };
3016
3016
  }
@@ -3023,7 +3023,7 @@ function Qa({
3023
3023
  /* @__PURE__ */ t(st, { asChild: !0, children: /* @__PURE__ */ t(
3024
3024
  "div",
3025
3025
  {
3026
- className: z(
3026
+ className: M(
3027
3027
  "w-[200px] overflow-hidden text-ellipsis whitespace-nowrap text-sm",
3028
3028
  n
3029
3029
  ),
@@ -3043,7 +3043,7 @@ function Ha({
3043
3043
  const [d, c] = vt.useState(!1), i = vt.useMemo(
3044
3044
  () => new Set(e ? [e.id] : []),
3045
3045
  [e]
3046
- ), s = e ? Jt(e) : null;
3046
+ ), s = e ? Xt(e) : null;
3047
3047
  return /* @__PURE__ */ l(it, { modal: !0, open: d, onOpenChange: c, children: [
3048
3048
  /* @__PURE__ */ t(lt, { asChild: !0, children: /* @__PURE__ */ l(
3049
3049
  G,
@@ -3053,14 +3053,14 @@ function Ha({
3053
3053
  role: "combobox",
3054
3054
  "aria-expanded": d,
3055
3055
  title: e ? `${e.entityName}.${e.name}` : void 0,
3056
- className: z(
3056
+ className: M(
3057
3057
  "min-w-0 justify-between gap-1.5 font-normal",
3058
3058
  !e && "text-muted-foreground",
3059
3059
  u
3060
3060
  ),
3061
3061
  children: [
3062
3062
  s ? /* @__PURE__ */ t(Qa, { className: "w-auto min-w-0 flex-1 text-left text-[12px]", children: s }) : /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-left", children: o }),
3063
- /* @__PURE__ */ t(zn, { className: "h-3.5 w-3.5 shrink-0 opacity-50" })
3063
+ /* @__PURE__ */ t(Mn, { className: "h-3.5 w-3.5 shrink-0 opacity-50" })
3064
3064
  ]
3065
3065
  }
3066
3066
  ) }),
@@ -3099,7 +3099,7 @@ function on(e, n) {
3099
3099
  ), d = n ? n.dataSource : a, c = n ? n.connectionId || ((m = n.dataSource) == null ? void 0 : m.connectionId) : u || (a == null ? void 0 : a.connectionId) || o, i = Q(
3100
3100
  () => ({
3101
3101
  id: `card-filter-option:${e.id}`,
3102
- ...za(e, { dataSource: d, connectionId: c })
3102
+ ...Ma(e, { dataSource: d, connectionId: c })
3103
3103
  }),
3104
3104
  [c, d, e]
3105
3105
  ), s = Q(
@@ -3111,7 +3111,7 @@ function on(e, n) {
3111
3111
  currentSelectionPolicy: "exclude"
3112
3112
  });
3113
3113
  }
3114
- function Pa({
3114
+ function Ya({
3115
3115
  field: e,
3116
3116
  source: n,
3117
3117
  selected: a,
@@ -3130,7 +3130,7 @@ function Pa({
3130
3130
  }, y = (h) => {
3131
3131
  i(h), !h && s.query && s.setQuery("");
3132
3132
  };
3133
- return /* @__PURE__ */ t("div", { className: z("w-full", d), children: /* @__PURE__ */ l(it, { open: c, onOpenChange: y, modal: !0, children: [
3133
+ return /* @__PURE__ */ t("div", { className: M("w-full", d), children: /* @__PURE__ */ l(it, { open: c, onOpenChange: y, modal: !0, children: [
3134
3134
  /* @__PURE__ */ t(lt, { asChild: !0, children: /* @__PURE__ */ l(
3135
3135
  G,
3136
3136
  {
@@ -3209,7 +3209,7 @@ function Pa({
3209
3209
  )
3210
3210
  ] }) });
3211
3211
  }
3212
- function Ya({
3212
+ function Pa({
3213
3213
  field: e,
3214
3214
  source: n,
3215
3215
  value: a,
@@ -3234,7 +3234,7 @@ function Ya({
3234
3234
  size: "xs",
3235
3235
  role: "combobox",
3236
3236
  "aria-expanded": c,
3237
- className: z(
3237
+ className: M(
3238
3238
  "min-w-0 flex-1 justify-between gap-1.5 px-2 font-normal",
3239
3239
  d
3240
3240
  ),
@@ -3242,7 +3242,7 @@ function Ya({
3242
3242
  /* @__PURE__ */ t(
3243
3243
  "span",
3244
3244
  {
3245
- className: z("truncate", !a && "text-muted-foreground"),
3245
+ className: M("truncate", !a && "text-muted-foreground"),
3246
3246
  children: a ? f : u
3247
3247
  }
3248
3248
  ),
@@ -3278,7 +3278,7 @@ function Ya({
3278
3278
  )
3279
3279
  ] });
3280
3280
  }
3281
- function Xa({
3281
+ function Ja({
3282
3282
  value: e,
3283
3283
  operator: n,
3284
3284
  relativeMeta: a,
@@ -3292,7 +3292,7 @@ function Xa({
3292
3292
  const D = s(a);
3293
3293
  return {
3294
3294
  ...D,
3295
- tooltip: D.dates ? void 0 : Xt(a).dataAnchored ? Wn : Kn
3295
+ tooltip: D.dates ? void 0 : Jt(a).dataAnchored ? Wn : Kn
3296
3296
  };
3297
3297
  }, [m, a, s]), w = Q(() => {
3298
3298
  if (m) {
@@ -3301,7 +3301,7 @@ function Xa({
3301
3301
  return D ? { from: D.start, to: D.end } : void 0;
3302
3302
  }
3303
3303
  if (e && Array.isArray(e) && e.length === 2) {
3304
- const D = Pe(e[0], i, "start"), j = Pe(e[1], i, "end");
3304
+ const D = Ye(e[0], i, "start"), j = Ye(e[1], i, "end");
3305
3305
  if (D && j)
3306
3306
  return { from: D, to: j };
3307
3307
  }
@@ -3309,7 +3309,7 @@ function Xa({
3309
3309
  }, [e, m, f, i]), y = Q(() => {
3310
3310
  if (!e || m || o) return;
3311
3311
  const D = Array.isArray(e) ? e[0] : e;
3312
- return Pe(D, i, "start");
3312
+ return Ye(D, i, "start");
3313
3313
  }, [e, m, o, i]), h = (D) => n === "<=" || n === ">" ? ha(D, i) : ga(D, i);
3314
3314
  return /* @__PURE__ */ t(
3315
3315
  Qn,
@@ -3352,13 +3352,13 @@ function Xa({
3352
3352
  enableTimePrecision: pa(u),
3353
3353
  staticTimeInputs: !1,
3354
3354
  showRelativeTab: m,
3355
- className: z("min-w-0", c),
3355
+ className: M("min-w-0", c),
3356
3356
  buttonClassName: "h-7 text-[12px] [&>span]:text-[12px]",
3357
3357
  placeholder: "Select date…"
3358
3358
  }
3359
3359
  );
3360
3360
  }
3361
- const Ja = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3361
+ const Xa = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3362
3362
  "contains",
3363
3363
  "startsWith",
3364
3364
  "endsWith",
@@ -3425,7 +3425,7 @@ const Ja = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3425
3425
  isNotNull: "Is not null",
3426
3426
  "not between": "Not between"
3427
3427
  };
3428
- function Xe(e) {
3428
+ function Je(e) {
3429
3429
  return rr[e] || xa(e);
3430
3430
  }
3431
3431
  function sr(e) {
@@ -3459,7 +3459,7 @@ function dn({
3459
3459
  {
3460
3460
  size: "xs",
3461
3461
  "aria-label": a,
3462
- className: z(ln, "font-medium"),
3462
+ className: M(ln, "font-medium"),
3463
3463
  children: /* @__PURE__ */ t(be, {})
3464
3464
  }
3465
3465
  ),
@@ -3499,7 +3499,7 @@ function cn({
3499
3499
  {
3500
3500
  ref: y,
3501
3501
  style: _,
3502
- className: z(
3502
+ className: M(
3503
3503
  "flex items-center gap-2 rounded-control px-1.5 py-1 transition-colors hover:bg-muted/40",
3504
3504
  k && "z-50 opacity-50"
3505
3505
  ),
@@ -3522,7 +3522,7 @@ function cn({
3522
3522
  onValueChange: (T) => d(a, T),
3523
3523
  "aria-label": "Logical operator"
3524
3524
  }
3525
- ) : /* @__PURE__ */ t("span", { className: z(ln, "text-center", gt), children: "Where" }),
3525
+ ) : /* @__PURE__ */ t("span", { className: M(ln, "text-center", gt), children: "Where" }),
3526
3526
  /* @__PURE__ */ t(
3527
3527
  Ha,
3528
3528
  {
@@ -3536,7 +3536,7 @@ function cn({
3536
3536
  },
3537
3537
  availableFields: c,
3538
3538
  placeholder: "Select field",
3539
- className: z("w-60 shrink-0", $t)
3539
+ className: M("w-60 shrink-0", $t)
3540
3540
  }
3541
3541
  ),
3542
3542
  /* @__PURE__ */ l(
@@ -3554,16 +3554,16 @@ function cn({
3554
3554
  {
3555
3555
  size: "xs",
3556
3556
  "aria-label": "Operator",
3557
- className: z("w-40 shrink-0", $t),
3558
- children: /* @__PURE__ */ t(be, { children: e.operator ? Xe(e.operator) : "" })
3557
+ className: M("w-40 shrink-0", $t),
3558
+ children: /* @__PURE__ */ t(be, { children: e.operator ? Je(e.operator) : "" })
3559
3559
  }
3560
3560
  ),
3561
- /* @__PURE__ */ t(ve, { children: sr(D).map((T) => /* @__PURE__ */ t(re, { value: T, children: Xe(T) }, T)) })
3561
+ /* @__PURE__ */ t(ve, { children: sr(D).map((T) => /* @__PURE__ */ t(re, { value: T, children: Je(T) }, T)) })
3562
3562
  ]
3563
3563
  }
3564
3564
  ),
3565
3565
  j ? /* @__PURE__ */ t("div", { className: "min-w-0 flex-1" }) : D === "string" ? O ? /* @__PURE__ */ t(
3566
- Pa,
3566
+ Ya,
3567
3567
  {
3568
3568
  field: e.field,
3569
3569
  source: i,
@@ -3583,10 +3583,10 @@ function cn({
3583
3583
  value: T.target.value
3584
3584
  }),
3585
3585
  className: "min-w-0 flex-1",
3586
- placeholder: `${Xe(e.operator)}…`
3586
+ placeholder: `${Je(e.operator)}…`
3587
3587
  }
3588
3588
  ) : /* @__PURE__ */ t(
3589
- Ya,
3589
+ Pa,
3590
3590
  {
3591
3591
  field: e.field,
3592
3592
  source: i,
@@ -3616,11 +3616,11 @@ function cn({
3616
3616
  // - Handles different operators (=, !=, >, <, between, in, etc.)
3617
3617
  // - Saves relative choices ("This month") with the range
3618
3618
  /* @__PURE__ */ t(
3619
- Xa,
3619
+ Ja,
3620
3620
  {
3621
3621
  value: e.value,
3622
3622
  operator: e.operator,
3623
- relativeMeta: Yt(e.relativeMeta),
3623
+ relativeMeta: Pt(e.relativeMeta),
3624
3624
  latestValue: e.latestValue === !0,
3625
3625
  field: e.field,
3626
3626
  onChange: (T) => m(
@@ -3670,7 +3670,7 @@ function un({
3670
3670
  type: "button",
3671
3671
  size: "xs",
3672
3672
  variant: "outline",
3673
- className: z("gap-1.5", Ft),
3673
+ className: M("gap-1.5", Ft),
3674
3674
  onClick: e,
3675
3675
  children: [
3676
3676
  /* @__PURE__ */ t(Ve, { className: "h-3 w-3" }),
@@ -3684,7 +3684,7 @@ function un({
3684
3684
  type: "button",
3685
3685
  size: "xs",
3686
3686
  variant: "ghost",
3687
- className: z("gap-1.5 text-muted-foreground hover:text-foreground", Ft),
3687
+ className: M("gap-1.5 text-muted-foreground hover:text-foreground", Ft),
3688
3688
  onClick: n,
3689
3689
  children: [
3690
3690
  /* @__PURE__ */ t(Ve, { className: "h-3 w-3" }),
@@ -3718,8 +3718,8 @@ function or({
3718
3718
  setNodeRef: j,
3719
3719
  transform: O,
3720
3720
  transition: T,
3721
- isDragging: P
3722
- } = Ut({ id: e.id }), J = {
3721
+ isDragging: Y
3722
+ } = Ut({ id: e.id }), X = {
3723
3723
  transform: Gt.Transform.toString(O),
3724
3724
  transition: T
3725
3725
  }, p = (A) => {
@@ -3743,10 +3743,10 @@ function or({
3743
3743
  "div",
3744
3744
  {
3745
3745
  ref: j,
3746
- style: J,
3747
- className: z(
3746
+ style: X,
3747
+ className: M(
3748
3748
  n > 0 && "mt-2 overflow-hidden rounded-[6px] border border-border/60",
3749
- P && "z-50 opacity-50"
3749
+ Y && "z-50 opacity-50"
3750
3750
  ),
3751
3751
  children: [
3752
3752
  n > 0 && /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-2 border-b border-border/60 bg-muted/40 px-2 py-1", children: [
@@ -3797,11 +3797,11 @@ function or({
3797
3797
  }
3798
3798
  )
3799
3799
  ] }),
3800
- /* @__PURE__ */ l("div", { className: z(n > 0 && "p-2"), children: [
3800
+ /* @__PURE__ */ l("div", { className: M(n > 0 && "p-2"), children: [
3801
3801
  /* @__PURE__ */ t(
3802
3802
  Re,
3803
3803
  {
3804
- sensors: Je(
3804
+ sensors: Xe(
3805
3805
  he(tt),
3806
3806
  he(et, {
3807
3807
  coordinateGetter: Ze
@@ -3810,10 +3810,10 @@ function or({
3810
3810
  collisionDetection: Ee,
3811
3811
  onDragEnd: p,
3812
3812
  children: /* @__PURE__ */ t(
3813
- Me,
3813
+ ze,
3814
3814
  {
3815
3815
  items: e.conditions.map((A) => A.id),
3816
- strategy: ze,
3816
+ strategy: Me,
3817
3817
  children: /* @__PURE__ */ t("div", { className: "space-y-0.5", children: e.conditions.map((A, S) => /* @__PURE__ */ t(
3818
3818
  cn,
3819
3819
  {
@@ -3837,7 +3837,7 @@ function or({
3837
3837
  /* @__PURE__ */ t(
3838
3838
  Re,
3839
3839
  {
3840
- sensors: Je(
3840
+ sensors: Xe(
3841
3841
  he(tt),
3842
3842
  he(et, {
3843
3843
  coordinateGetter: Ze
@@ -3846,10 +3846,10 @@ function or({
3846
3846
  collisionDetection: Ee,
3847
3847
  onDragEnd: I,
3848
3848
  children: /* @__PURE__ */ t(
3849
- Me,
3849
+ ze,
3850
3850
  {
3851
3851
  items: e.groups.map((A) => A.id),
3852
- strategy: ze,
3852
+ strategy: Me,
3853
3853
  children: e.groups.map(
3854
3854
  (A) => h(A, n + 1, e.id)
3855
3855
  )
@@ -3893,15 +3893,15 @@ function Ir({
3893
3893
  updateGroupNegate: j,
3894
3894
  reorderConditions: O,
3895
3895
  reorderGroups: T,
3896
- generateSQLPreview: P,
3897
- hasAnyFilters: J
3896
+ generateSQLPreview: Y,
3897
+ hasAnyFilters: X
3898
3898
  } = Ka({
3899
3899
  initialFilters: e,
3900
3900
  availableFields: n,
3901
3901
  ...c ? {
3902
- onChange: (g) => c(Ja(g) ? g : null)
3902
+ onChange: (g) => c(Xa(g) ? g : null)
3903
3903
  } : {}
3904
- }), p = Je(
3904
+ }), p = Xe(
3905
3905
  he(tt),
3906
3906
  he(et, {
3907
3907
  coordinateGetter: Ze
@@ -3916,10 +3916,10 @@ function Ir({
3916
3916
  sensors: p,
3917
3917
  collisionDetection: Ee,
3918
3918
  onDragEnd: (V) => {
3919
- const { active: M, over: K } = V;
3920
- if (K && M.id !== K.id) {
3919
+ const { active: z, over: K } = V;
3920
+ if (K && z.id !== K.id) {
3921
3921
  const U = g.conditions.findIndex(
3922
- (te) => te.id === M.id
3922
+ (te) => te.id === z.id
3923
3923
  ), ee = g.conditions.findIndex(
3924
3924
  (te) => te.id === K.id
3925
3925
  );
@@ -3927,15 +3927,15 @@ function Ir({
3927
3927
  }
3928
3928
  },
3929
3929
  children: /* @__PURE__ */ t(
3930
- Me,
3930
+ ze,
3931
3931
  {
3932
3932
  items: g.conditions.map((V) => V.id),
3933
- strategy: ze,
3934
- children: /* @__PURE__ */ t("div", { className: "space-y-0.5", children: g.conditions.map((V, M) => /* @__PURE__ */ t(
3933
+ strategy: Me,
3934
+ children: /* @__PURE__ */ t("div", { className: "space-y-0.5", children: g.conditions.map((V, z) => /* @__PURE__ */ t(
3935
3935
  cn,
3936
3936
  {
3937
3937
  condition: V,
3938
- index: M,
3938
+ index: z,
3939
3939
  groupId: g.id,
3940
3940
  groupLogicalOperator: g.logicalOperator,
3941
3941
  onRemoveCondition: h,
@@ -3957,10 +3957,10 @@ function Ir({
3957
3957
  sensors: p,
3958
3958
  collisionDetection: Ee,
3959
3959
  onDragEnd: (V) => {
3960
- const { active: M, over: K } = V;
3961
- if (K && M.id !== K.id) {
3960
+ const { active: z, over: K } = V;
3961
+ if (K && z.id !== K.id) {
3962
3962
  const U = g.groups.findIndex(
3963
- (te) => te.id === M.id
3963
+ (te) => te.id === z.id
3964
3964
  ), ee = g.groups.findIndex(
3965
3965
  (te) => te.id === K.id
3966
3966
  );
@@ -3968,10 +3968,10 @@ function Ir({
3968
3968
  }
3969
3969
  },
3970
3970
  children: /* @__PURE__ */ t(
3971
- Me,
3971
+ ze,
3972
3972
  {
3973
3973
  items: g.groups.map((V) => V.id),
3974
- strategy: ze,
3974
+ strategy: Me,
3975
3975
  children: g.groups.map(
3976
3976
  (V) => S(V, q + 1, g.id)
3977
3977
  )
@@ -4016,7 +4016,7 @@ function Ir({
4016
4016
  g.id
4017
4017
  );
4018
4018
  }, v = Hn(e);
4019
- return /* @__PURE__ */ l("div", { className: z("group/filters", i ? "flex flex-col" : "flex min-h-0 flex-1 flex-col"), "data-inline": i || void 0, children: [
4019
+ return /* @__PURE__ */ l("div", { className: M("group/filters", i ? "flex flex-col" : "flex min-h-0 flex-1 flex-col"), "data-inline": i || void 0, children: [
4020
4020
  /* @__PURE__ */ l("div", { className: i ? "" : "min-h-0 flex-1 overflow-y-auto px-3 py-3", children: [
4021
4021
  f ? /* @__PURE__ */ l("div", { className: "flex items-center justify-center gap-2 py-6 text-[12px] text-muted-foreground", children: [
4022
4022
  /* @__PURE__ */ t(fn, { className: "h-3.5 w-3.5 animate-spin" }),
@@ -4042,9 +4042,9 @@ function Ir({
4042
4042
  ),
4043
4043
  /* @__PURE__ */ t("span", { className: "text-[11px] text-muted-foreground", children: "Nest conditions in groups" })
4044
4044
  ] }),
4045
- J && !i && /* @__PURE__ */ l("div", { className: "mt-3 border-t border-border/60 pt-3", children: [
4046
- /* @__PURE__ */ t("div", { className: z("mb-1.5", gt), children: "Where clause" }),
4047
- /* @__PURE__ */ t("pre", { className: "overflow-x-auto whitespace-pre-wrap break-words rounded-[6px] border border-border bg-muted/40 px-3 py-2 font-mono text-[12px] leading-[1.55] text-foreground", children: P(s) })
4045
+ X && !i && /* @__PURE__ */ l("div", { className: "mt-3 border-t border-border/60 pt-3", children: [
4046
+ /* @__PURE__ */ t("div", { className: M("mb-1.5", gt), children: "Where clause" }),
4047
+ /* @__PURE__ */ t("pre", { className: "overflow-x-auto whitespace-pre-wrap break-words rounded-[6px] border border-border bg-muted/40 px-3 py-2 font-mono text-[12px] leading-[1.55] text-foreground", children: Y(s) })
4048
4048
  ] })
4049
4049
  ] }),
4050
4050
  i ? null : /* @__PURE__ */ l("div", { className: "flex shrink-0 items-center justify-between gap-2 border-t border-border px-3 py-2.5", children: [
@@ -4064,7 +4064,7 @@ function Ir({
4064
4064
  G,
4065
4065
  {
4066
4066
  size: "xs",
4067
- onClick: () => o == null ? void 0 : o(J ? s : null),
4067
+ onClick: () => o == null ? void 0 : o(X ? s : null),
4068
4068
  children: "Apply filters"
4069
4069
  }
4070
4070
  )
@@ -4076,13 +4076,13 @@ export {
4076
4076
  Cr as A,
4077
4077
  Sr as C,
4078
4078
  Nr as F,
4079
- Ma as I,
4079
+ za as I,
4080
4080
  ya as L,
4081
4081
  kr as V,
4082
4082
  wr as a,
4083
4083
  Ir as b,
4084
4084
  Zt as c,
4085
- za as d,
4085
+ Ma as d,
4086
4086
  Va as g,
4087
4087
  en as i,
4088
4088
  Dr as u