react-semaphor 0.1.593 → 0.1.594

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 (37) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +2 -2
  3. package/dist/chunks/{assistant-chat-D05uNAeO.js → assistant-chat-1-vtOSvb.js} +6 -6
  4. package/dist/chunks/{bookmark-impact-B0k90wq8.js → bookmark-impact-Dh-wiTs3.js} +2 -2
  5. package/dist/chunks/{card-filter-builder-CiafWE26.js → card-filter-builder-CLI3IBUQ.js} +351 -362
  6. package/dist/chunks/{comparison-window-caption-h8w3ySL6.js → comparison-window-caption-DmMFtNP5.js} +1 -1
  7. package/dist/chunks/{dashboard-T-gYKGTF.js → dashboard-a5cAhXh8.js} +1 -1
  8. package/dist/chunks/{dashboard-briefing-launcher-CPh2B3Rf.js → dashboard-briefing-launcher-DtImhLiL.js} +224 -224
  9. package/dist/chunks/{dashboard-controls-Cijc9c3G.js → dashboard-controls-ChS1JL_o.js} +8 -8
  10. package/dist/chunks/{dashboard-json-D3m7h4VL.js → dashboard-json-DEmywwom.js} +1 -1
  11. package/dist/chunks/{dates-Bb0sn54j.js → dates-B-bKEsiu.js} +5 -5
  12. package/dist/chunks/{edit-dashboard-visual-C0iSuX9t.js → edit-dashboard-visual-CjGPZh0A.js} +5170 -5302
  13. package/dist/chunks/{filter-line-CYT7KIXb.js → filter-line-BpdPq1D2.js} +3 -2
  14. package/dist/chunks/{filter-reach-copy-CifrEFxj.js → filter-reach-copy-DoXmRmk-.js} +4 -4
  15. package/dist/chunks/{filter-value-text-CHBm4IU7.js → filter-value-text-CDQCIREQ.js} +10 -10
  16. package/dist/chunks/{index-CzM2w1kY.js → index-C0jX5wlM.js} +2 -2
  17. package/dist/chunks/{pivot-result-contract-expectations-CaS0y823.js → pivot-result-contract-expectations-Dt0E1Wou.js} +1309 -1312
  18. package/dist/chunks/{report-preferences-dialog-GHvai50w.js → report-preferences-dialog-WFosRbzF.js} +8 -8
  19. package/dist/chunks/{resolve-dashboard-input-context-BcQHmMlw.js → resolve-dashboard-input-context-DfJshnw8.js} +3621 -3556
  20. package/dist/chunks/{saved-dashboard-context-BHHEzmwM.js → saved-dashboard-context-DdhPU2Kq.js} +3 -3
  21. package/dist/chunks/{semaphor-ready-indicator-AOUJrUAJ.js → semaphor-ready-indicator-DBGF9cuM.js} +21939 -21871
  22. package/dist/chunks/{shelf-drop-preview-context-Cs62lWI1.js → shelf-drop-preview-context-v9NfjBVj.js} +2 -2
  23. package/dist/chunks/{stored-dashboard-Cmtl_Obh.js → stored-dashboard-D6FtWx_3.js} +930 -928
  24. package/dist/chunks/{table-export-sheet-Cd6z7SsG.js → table-export-sheet-DBlFMvE8.js} +1 -1
  25. package/dist/chunks/{variable-draft-CSK9Ps1o.js → variable-draft-CxdgKDCx.js} +2 -2
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/dashboard-authoring/index.js +1025 -1012
  28. package/dist/format-utils/index.js +211 -210
  29. package/dist/index.js +11 -11
  30. package/dist/surfboard/index.js +1 -1
  31. package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +3 -1
  32. package/dist/types/shared/dashboard-authoring/card-formats/detail-date-display.d.ts +43 -1
  33. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  34. package/dist/types/shared/dashboard-authoring/semantic-card-domain.d.ts +30 -0
  35. package/dist/types/shared/dashboard-authoring/temporal-bucket-authoring.d.ts +7 -1
  36. package/dist/types/shared/format-utils/temporal-bucket-format-policy.d.ts +27 -5
  37. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
- import { c as nt, B as G, X as ce, x as Ne, q as hn, a6 as gn, t as at, u as rt, v as st, w as ot, a7 as _t, 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 xn, d as bn } from "./style-sheet-parts-DM_Mw_sm.js";
1
+ import { c as nt, B as U, X as ce, x as Ne, q as hn, a6 as gn, 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 xn, d as bn } from "./style-sheet-parts-DM_Mw_sm.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
- import vt, { useMemo as P, useState as Y, useRef as $e, useCallback as ne, useEffect as de, forwardRef as vn, Fragment as yn } from "react";
5
- import { b8 as ct, u as ut, am as se, c8 as Vt, cF as J, cG as Nn, c4 as Ie, cH as Ue, cI as Rt, cJ as Cn, b_ as Ve, cK as wn, an as Et, bG as kn, bH as Sn, bJ as Dn, bZ as In, cL as Tn, o as Ln, cM as $n, cN as An, cO as yt, bY as zt, cP as Fn, cQ as Mt, cR as qt, cS as On, cT as _n, cU as Vn, cV as Rn, cW as En, cX as zn, cY as Mn, bz as qn, cZ as Nt, c_ as jt, c$ as Ct, bC as jn, d0 as Un, d1 as Gn, d2 as Bn, d3 as ye, d4 as Ut, d5 as Wn, d6 as Kn, d7 as Qn, d8 as Pn, d9 as Hn, da as Je, db as he, dc as Xe, dd as et, de as tt, df as Yn, dg as Re, dh as Ee, di as ze, dj as Me, dk as Gt, dl as Bt, dm as Wt } from "./semaphor-ready-indicator-AOUJrUAJ.js";
6
- import { D as Zn } from "./token-types-BB2ImFx6.js";
7
- import { fZ as Kt, f_ as Jn, f$ as Xn, g0 as ea, g1 as ta, g2 as na, g3 as Ae, g4 as wt, g5 as kt, g6 as Ke, g7 as Qe, g8 as aa, g9 as ra, ga as St, gb as sa, gc as oa, gd as Fe, ge as ia, gf as Dt, gg as Qt, gh as Pt, gi as Ht, gj as Yt, gk as la, gl as da, gm as It, gn as ca, go as Tt, gp as ua, gq as ma, gr as pa, gs as fa, gt as Pe, a as qe, gu as He, bj as ha, gv as ga, gw as xa, gx as ba, gy as va } from "./resolve-dashboard-input-context-BcQHmMlw.js";
4
+ import bt, { useMemo as H, useState as Y, useRef as $e, useCallback as ne, useEffect as de, forwardRef as vn, Fragment as yn } from "react";
5
+ import { b8 as ct, u as ut, am as se, c8 as _t, cF as X, cG as Nn, c4 as Te, cH as Ge, cI as Vt, cJ as Cn, b_ as Ve, cK as wn, an as Rt, bG as kn, bH as Sn, bJ as Dn, bZ as Tn, cL as In, o as Ln, cM as $n, cN as An, cO as vt, bY as Et, cP as Fn, cQ as zt, cR as Mt, cS as On, cT as _n, cU as Vn, cV as Rn, cW as En, cX as zn, cY as Mn, bz as qn, cZ as yt, c_ as qt, c$ as Nt, bC as jn, d0 as Gn, d1 as Un, d2 as Bn, d3 as ye, d4 as jt, d5 as Wn, d6 as Kn, d7 as Qn, d8 as Hn, d9 as Pn, da as Xe, db as he, dc as Ze, dd as et, de as tt, df as Yn, dg as Re, dh as Ee, di as ze, dj as Me, dk as Gt, dl as Ut, dm as Bt } from "./semaphor-ready-indicator-DBGF9cuM.js";
6
+ import { D as Jn } from "./token-types-BB2ImFx6.js";
7
+ import { g7 as Wt, cp as Kt, co as Qt, g8 as Xn, g9 as Zn, ga as ea, gb as ta, gc as na, gd as Ae, ge as Ct, gf as wt, gg as Ke, gh as Qe, gi as aa, gj as ra, gk as kt, gl as sa, gm as oa, gn as Fe, go as ia, gp as St, gq as Ht, gr as Pt, gs as Yt, gt as Jt, gu as la, gv as da, gw as Dt, gx as ca, gy as Tt, gz as ua, gA as ma, gB as pa, gC as fa, gD as He, a as qe, gE as Pe, bl as ha, gF as ga, gG as xa, gH as ba, gI as va } from "./resolve-dashboard-input-context-DfJshnw8.js";
8
8
  import { c as q } from "./pickers-DkqmtnTL.js";
9
- import { r as Zt, l as ya, k as Jt, aE as Xt } from "./validators-BlEWWX9O.js";
9
+ import { r as Xt, l as ya, k as Zt, aE as en } from "./validators-BlEWWX9O.js";
10
10
  import "./matrix-operation-contract-CAanJeCj.js";
11
11
  import "./analytics-base-schemas-8wz9vqn_.js";
12
12
  import "../value-format-preferences/index.js";
13
13
  import { U as Na } from "./upload-CMTCg47S.js";
14
- import { r as en } from "./metric-comparison-BeKnUD08.js";
14
+ import { r as tn } from "./metric-comparison-BeKnUD08.js";
15
15
  import { r as Ca, j as wa } from "./raw-temporal-value-BzdgeDa7.js";
16
- import { a3 as tn } from "./filter-reach-copy-CifrEFxj.js";
16
+ import { a3 as nn } from "./filter-reach-copy-DoXmRmk-.js";
17
17
  /**
18
18
  * @license lucide-react v0.453.0 - ISC
19
19
  *
@@ -58,7 +58,7 @@ const ka = nt("Boxes", [
58
58
  * This source code is licensed under the ISC license.
59
59
  * See the LICENSE file in the root directory of this source tree.
60
60
  */
61
- const Ir = nt("FilterX", [
61
+ const Tr = nt("FilterX", [
62
62
  ["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
63
63
  ["path", { d: "m22 3-5 5", key: "12jva0" }],
64
64
  ["path", { d: "m17 3 5 5", key: "k36vhe" }]
@@ -88,7 +88,7 @@ function Da(e, n, a) {
88
88
  return !0;
89
89
  }
90
90
  }
91
- function Ia({
91
+ function Ta({
92
92
  mode: e,
93
93
  currentDomainId: n,
94
94
  scopedDomainIds: a,
@@ -96,7 +96,7 @@ function Ia({
96
96
  }) {
97
97
  return e === "all" ? !1 : e === "none" ? !!n || o : n ? !Da(e, n, a) : o;
98
98
  }
99
- function nn(e) {
99
+ function an(e) {
100
100
  const { tokenProps: n } = ct(), a = ut((s) => s.authToken) || e;
101
101
  se(
102
102
  (s) => s.selectedConnectionId
@@ -112,9 +112,9 @@ function nn(e) {
112
112
  data: d,
113
113
  isLoading: c,
114
114
  isError: i
115
- } = Vt({
115
+ } = _t({
116
116
  queryKey: ["semantic-domains"],
117
- queryFn: () => Kt(
117
+ queryFn: () => Wt(
118
118
  `${n.apiServiceUrl}/v1/domains`,
119
119
  (a == null ? void 0 : a.accessToken) || ""
120
120
  ),
@@ -131,30 +131,20 @@ function nn(e) {
131
131
  refetchSemanticDomains: o
132
132
  };
133
133
  }
134
- function an(e) {
135
- const n = mt(e);
136
- return n.size === 1 ? [...n][0] : void 0;
137
- }
138
- function mt(e) {
139
- const n = /* @__PURE__ */ new Set();
140
- for (const a of e)
141
- "domainId" in a && typeof a.domainId == "string" && a.domainId && n.add(a.domainId);
142
- return n;
143
- }
144
- function Ta(e, n) {
134
+ function Ia(e, n) {
145
135
  if (e.some(
146
- (d) => J(d, n)
136
+ (d) => X(d, n)
147
137
  ))
148
138
  return e.filter(
149
- (d) => !J(d, n)
139
+ (d) => !X(d, n)
150
140
  );
151
- const o = mt(e);
141
+ const o = Qt(e);
152
142
  return e.some(
153
143
  (d) => !("domainId" in d)
154
144
  ) || [...o].some((d) => d !== n.domainId) ? [n] : [...e, n];
155
145
  }
156
146
  function La(e, n) {
157
- const a = an(n), o = mt(e), u = e.some(
147
+ const a = Kt(n), o = Qt(e), u = e.some(
158
148
  (c) => !("domainId" in c)
159
149
  );
160
150
  if (a && (u || [...o].some(
@@ -163,7 +153,7 @@ function La(e, n) {
163
153
  return n;
164
154
  const d = [...e];
165
155
  for (const c of n)
166
- d.some((i) => J(i, c)) || d.push(c);
156
+ d.some((i) => X(i, c)) || d.push(c);
167
157
  return d;
168
158
  }
169
159
  function $a({
@@ -173,7 +163,7 @@ function $a({
173
163
  selectedEntities: o,
174
164
  onSelectionChange: u
175
165
  }) {
176
- const { semanticDomains: d, isSemanticDomainsLoading: c } = nn(), i = P(() => Fa(d, e), [d, e]), s = P(() => a ? i.filter((f) => f.id === a) : i, [i, a]);
166
+ const { semanticDomains: d, isSemanticDomainsLoading: c } = an(), i = H(() => Fa(d, e), [d, e]), s = H(() => a ? i.filter((f) => f.id === a) : i, [i, a]);
177
167
  if (c && s.length === 0)
178
168
  return /* @__PURE__ */ t("div", { className: "px-3 py-4 text-[11px] text-muted-foreground", children: "Loading semantic domains…" });
179
169
  if (s.length === 0)
@@ -203,28 +193,28 @@ function Aa({
203
193
  }) {
204
194
  const [d, c] = Y(!1), i = d || n.length > 0 || !!a, { datasets: s, isPending: m } = Nn(
205
195
  i ? e.id : void 0
206
- ), f = P(() => {
196
+ ), f = H(() => {
207
197
  if (!n) return s;
208
198
  const C = n.trim().toLowerCase();
209
199
  return s.filter(
210
- (I) => `${I.label ?? ""} ${I.name ?? ""} ${I.description ?? ""}`.toLowerCase().includes(C)
200
+ (T) => `${T.label ?? ""} ${T.name ?? ""} ${T.description ?? ""}`.toLowerCase().includes(C)
211
201
  );
212
- }, [s, n]), k = n.length > 0 && f.length > 0, y = d || k || !!a, g = s.length, N = P(() => f.filter(
202
+ }, [s, n]), k = n.length > 0 && f.length > 0, y = d || k || !!a, g = s.length, N = H(() => f.filter(
213
203
  (C) => o.some(
214
- (I) => J(I, Le(C))
204
+ (T) => X(T, Le(C))
215
205
  )
216
- ).length, [f, o]), S = P(
206
+ ).length, [f, o]), S = H(
217
207
  () => f.map(Le),
218
208
  [f]
219
209
  ), V = S.length > 0 && S.every(
220
- (C) => o.some((I) => J(I, C))
210
+ (C) => o.some((T) => X(T, C))
221
211
  ), _ = () => {
222
212
  if (S.length !== 0) {
223
213
  if (V) {
224
214
  u(
225
215
  o.filter(
226
216
  (C) => !S.some(
227
- (I) => J(C, I)
217
+ (T) => X(C, T)
228
218
  )
229
219
  )
230
220
  );
@@ -238,11 +228,11 @@ function Aa({
238
228
  );
239
229
  }
240
230
  }, Q = (C) => {
241
- const I = Le(C);
231
+ const T = Le(C);
242
232
  u(
243
- Ta(
233
+ Ia(
244
234
  o,
245
- I
235
+ T
246
236
  )
247
237
  );
248
238
  };
@@ -256,7 +246,7 @@ function Aa({
256
246
  className: "flex min-w-0 flex-1 items-center gap-1.5 text-left",
257
247
  children: [
258
248
  /* @__PURE__ */ t(
259
- Ie,
249
+ Te,
260
250
  {
261
251
  className: q(
262
252
  "h-3 w-3 shrink-0 text-muted-foreground transition-transform",
@@ -288,14 +278,14 @@ function Aa({
288
278
  /* @__PURE__ */ t("span", { className: "ml-auto font-mono text-[10px] tabular-nums text-muted-foreground", children: N > 0 ? N : "" })
289
279
  ] }),
290
280
  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((C) => {
291
- const I = Le(C), U = o.some(
292
- (X) => J(X, I)
281
+ const T = Le(C), G = o.some(
282
+ (Z) => X(Z, T)
293
283
  );
294
284
  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: [
295
285
  /* @__PURE__ */ t(
296
- Ue,
286
+ Ge,
297
287
  {
298
- checked: U,
288
+ checked: G,
299
289
  onCheckedChange: () => Q(C),
300
290
  className: "mt-[3px] h-3.5 w-3.5 shrink-0"
301
291
  }
@@ -344,7 +334,7 @@ function Oa({
344
334
  selectedEntities: a,
345
335
  onSelectionChange: o
346
336
  }) {
347
- const { connections: u, isConnectionsLoading: d } = Rt(), c = P(() => n ? u.filter((s) => s.id === n) : u, [u, n]);
337
+ const { connections: u, isConnectionsLoading: d } = Vt(), c = H(() => n ? u.filter((s) => s.id === n) : u, [u, n]);
348
338
  if (d && c.length === 0)
349
339
  return /* @__PURE__ */ t("div", { className: "px-3 py-4 text-[11px] text-muted-foreground", children: "Loading connections…" });
350
340
  if (c.length === 0)
@@ -373,7 +363,7 @@ function _a({
373
363
  onSelectionChange: u
374
364
  }) {
375
365
  var N;
376
- const [d, c] = Y(!1), i = d || n.length > 0 || !!a, s = ((N = e.capabilities) == null ? void 0 : N.path) ?? [], m = s.includes("database"), f = s.includes("schema"), k = e.type === "upload", y = e.type === "url", g = P(
366
+ const [d, c] = Y(!1), i = d || n.length > 0 || !!a, s = ((N = e.capabilities) == null ? void 0 : N.path) ?? [], m = s.includes("database"), f = s.includes("schema"), k = e.type === "upload", y = e.type === "url", g = H(
377
367
  () => o.filter((S) => S.connectionId === e.id).length,
378
368
  [o, e.id]
379
369
  );
@@ -386,7 +376,7 @@ function _a({
386
376
  className: "flex w-full items-center gap-2 px-4 py-1.5 text-left transition-colors hover:bg-muted/40",
387
377
  children: [
388
378
  /* @__PURE__ */ t(
389
- Ie,
379
+ Te,
390
380
  {
391
381
  className: q(
392
382
  "h-3 w-3 shrink-0 text-muted-foreground transition-transform",
@@ -438,7 +428,7 @@ function _a({
438
428
  onSelectionChange: u
439
429
  }
440
430
  ) : /* @__PURE__ */ t(
441
- pt,
431
+ mt,
442
432
  {
443
433
  connection: e,
444
434
  databaseName: "",
@@ -504,7 +494,7 @@ function Va({
504
494
  }
505
495
  ),
506
496
  /* @__PURE__ */ t(
507
- G,
497
+ U,
508
498
  {
509
499
  type: "button",
510
500
  variant: "outline",
@@ -606,7 +596,7 @@ function Ra({
606
596
  }
607
597
  ),
608
598
  /* @__PURE__ */ l(
609
- G,
599
+ U,
610
600
  {
611
601
  type: "button",
612
602
  size: "sm",
@@ -655,7 +645,7 @@ function Ea({
655
645
  onSelectionChange: u
656
646
  }) {
657
647
  var i;
658
- const d = Ge("/v1/databases", { connection_id: e.id }, [
648
+ const d = Ue("/v1/databases", { connection_id: e.id }, [
659
649
  "databases",
660
650
  e.id
661
651
  ]);
@@ -678,7 +668,7 @@ function Ea({
678
668
  onSelectionChange: u
679
669
  }
680
670
  ) : /* @__PURE__ */ t(
681
- pt,
671
+ mt,
682
672
  {
683
673
  connection: e,
684
674
  databaseName: s.database_name,
@@ -700,7 +690,7 @@ function sn({
700
690
  onSelectionChange: u
701
691
  }) {
702
692
  var i;
703
- const d = Ge(
693
+ const d = Ue(
704
694
  "/v1/schemas",
705
695
  {
706
696
  connection_id: e.id,
@@ -719,7 +709,7 @@ function sn({
719
709
  indentLevel: n ? 2 : 1,
720
710
  search: a,
721
711
  renderChildren: (m) => m && /* @__PURE__ */ t(
722
- pt,
712
+ mt,
723
713
  {
724
714
  connection: e,
725
715
  databaseName: n,
@@ -733,7 +723,7 @@ function sn({
733
723
  s.schema_name
734
724
  )) });
735
725
  }
736
- function pt({
726
+ function mt({
737
727
  connection: e,
738
728
  databaseName: n,
739
729
  schemaName: a,
@@ -741,7 +731,7 @@ function pt({
741
731
  selectedEntities: u,
742
732
  onSelectionChange: d
743
733
  }) {
744
- const c = Ge(
734
+ const c = Ue(
745
735
  "/v1/tables",
746
736
  {
747
737
  connection_id: e.id,
@@ -749,7 +739,7 @@ function pt({
749
739
  schema_name: a || void 0
750
740
  },
751
741
  ["tables", e.id, n, a]
752
- ), i = P(() => {
742
+ ), i = H(() => {
753
743
  var S;
754
744
  const g = ((S = c.data) == null ? void 0 : S.tables) ?? [];
755
745
  if (!o) return g;
@@ -772,13 +762,13 @@ function pt({
772
762
  const m = i.map(
773
763
  (g) => s(g.table_name, g.table_type)
774
764
  ), f = m.length > 0 && m.every(
775
- (g) => u.some((N) => J(N, g))
765
+ (g) => u.some((N) => X(N, g))
776
766
  ), k = (g, N) => {
777
767
  const S = s(g, N), V = u.some(
778
- (_) => J(_, S)
768
+ (_) => X(_, S)
779
769
  );
780
770
  d(
781
- V ? u.filter((_) => !J(_, S)) : [...u, S]
771
+ V ? u.filter((_) => !X(_, S)) : [...u, S]
782
772
  );
783
773
  }, y = () => {
784
774
  if (m.length === 0) return;
@@ -786,7 +776,7 @@ function pt({
786
776
  d(
787
777
  u.filter(
788
778
  (N) => !m.some(
789
- (S) => J(N, S)
779
+ (S) => X(N, S)
790
780
  )
791
781
  )
792
782
  );
@@ -794,7 +784,7 @@ function pt({
794
784
  }
795
785
  const g = [...u];
796
786
  for (const N of m)
797
- g.some((S) => J(S, N)) || g.push(N);
787
+ g.some((S) => X(S, N)) || g.push(N);
798
788
  d(g);
799
789
  };
800
790
  return /* @__PURE__ */ l("ul", { children: [
@@ -816,11 +806,11 @@ function pt({
816
806
  ] }),
817
807
  i.map((g) => {
818
808
  const N = s(g.table_name, g.table_type), S = u.some(
819
- (V) => J(V, N)
809
+ (V) => X(V, N)
820
810
  );
821
811
  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: [
822
812
  /* @__PURE__ */ t(
823
- Ue,
813
+ Ge,
824
814
  {
825
815
  checked: S,
826
816
  onCheckedChange: () => k(g.table_name, g.table_type),
@@ -848,10 +838,10 @@ function za({
848
838
  selectedEntities: a,
849
839
  onSelectionChange: o
850
840
  }) {
851
- const u = Ge("/v1/datamodels", { connection_id: e.id }, [
841
+ const u = Ue("/v1/datamodels", { connection_id: e.id }, [
852
842
  "datamodels",
853
843
  e.id
854
- ]), d = P(() => {
844
+ ]), d = H(() => {
855
845
  var m;
856
846
  const i = ((m = u.data) == null ? void 0 : m.datamodels) ?? [];
857
847
  if (!n) return i;
@@ -874,10 +864,10 @@ function za({
874
864
  database: i.database || "",
875
865
  schema: i.schema || ""
876
866
  }, m = a.some(
877
- (f) => J(f, s)
867
+ (f) => X(f, s)
878
868
  );
879
869
  o(
880
- m ? a.filter((f) => !J(f, s)) : [...a, s]
870
+ m ? a.filter((f) => !X(f, s)) : [...a, s]
881
871
  );
882
872
  };
883
873
  return /* @__PURE__ */ l("div", { children: [
@@ -895,11 +885,11 @@ function za({
895
885
  database: i.database || "",
896
886
  schema: i.schema || ""
897
887
  }, m = a.some(
898
- (f) => J(f, s)
888
+ (f) => X(f, s)
899
889
  );
900
890
  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: [
901
891
  /* @__PURE__ */ t(
902
- Ue,
892
+ Ge,
903
893
  {
904
894
  checked: m,
905
895
  onCheckedChange: () => c(i),
@@ -943,7 +933,7 @@ function on({
943
933
  ),
944
934
  children: [
945
935
  /* @__PURE__ */ t(
946
- Ie,
936
+ Te,
947
937
  {
948
938
  className: q(
949
939
  "h-2.5 w-2.5 shrink-0 text-muted-foreground transition-transform",
@@ -959,16 +949,16 @@ function on({
959
949
  o(c)
960
950
  ] });
961
951
  }
962
- function Ge(e, n, a, o = !0) {
963
- const { tokenProps: u } = ct(), d = ut((i) => i.authToken), c = P(
952
+ function Ue(e, n, a, o = !0) {
953
+ const { tokenProps: u } = ct(), d = ut((i) => i.authToken), c = H(
964
954
  () => Object.fromEntries(
965
955
  Object.entries(n).filter(([, i]) => i !== void 0)
966
956
  ),
967
957
  [n]
968
958
  );
969
- return Vt({
959
+ return _t({
970
960
  queryKey: a,
971
- queryFn: () => Kt(
961
+ queryFn: () => Wt(
972
962
  `${u.apiServiceUrl}${e}`,
973
963
  (d == null ? void 0 : d.accessToken) || "",
974
964
  c
@@ -989,7 +979,7 @@ function ja({
989
979
  semanticDomainLabels: a
990
980
  }) {
991
981
  return e.length === 0 ? null : /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1", children: e.map((o, u) => /* @__PURE__ */ t(
992
- Ua,
982
+ Ga,
993
983
  {
994
984
  entity: o,
995
985
  semanticDomainLabels: a,
@@ -998,7 +988,7 @@ function ja({
998
988
  `${o.type}-${o.name}-${u}`
999
989
  )) });
1000
990
  }
1001
- function Ua({
991
+ function Ga({
1002
992
  entity: e,
1003
993
  semanticDomainLabels: n,
1004
994
  onDeselect: a
@@ -1039,7 +1029,7 @@ function Ye(e) {
1039
1029
  (n) => n.type === "upload" || n.type === "file"
1040
1030
  ) ? "upload" : "database";
1041
1031
  }
1042
- function Tr({
1032
+ function Ir({
1043
1033
  open: e,
1044
1034
  onOpenChange: n,
1045
1035
  dataSource: a,
@@ -1047,9 +1037,9 @@ function Tr({
1047
1037
  onDataSourceChange: u
1048
1038
  }) {
1049
1039
  var Se, me;
1050
- const { tokenProps: d } = ct(), c = d.config, i = d.semanticDomainAccess || Zn, [s, m] = Y([]), [f, k] = Y(""), [y, g] = Y("all"), [N, S] = Y(
1040
+ const { tokenProps: d } = ct(), c = d.config, i = d.semanticDomainAccess || Jn, [s, m] = Y([]), [f, k] = Y(""), [y, g] = Y("all"), [N, S] = Y(
1051
1041
  void 0
1052
- ), V = $e(!1), { updateDataSource: _ } = Et(), Q = u ?? _, C = i.mode, I = (c == null ? void 0 : c.showDirectSource) !== !1, U = C === "include" || C === "exclude" || !I, X = C !== "all", p = I && !U, T = U ? "semanticDomain" : a.mode, $ = !I, D = C === "include" && (((Se = i.domainIds) == null ? void 0 : Se.length) || 0) === 1 ? (me = i.domainIds) == null ? void 0 : me[0] : void 0, v = ne(
1042
+ ), V = $e(!1), { updateDataSource: _ } = Rt(), Q = u ?? _, C = i.mode, T = (c == null ? void 0 : c.showDirectSource) !== !1, G = C === "include" || C === "exclude" || !T, Z = C !== "all", p = T && !G, I = G ? "semanticDomain" : a.mode, $ = !T, D = C === "include" && (((Se = i.domainIds) == null ? void 0 : Se.length) || 0) === 1 ? (me = i.domainIds) == null ? void 0 : me[0] : void 0, v = ne(
1053
1043
  (A) => {
1054
1044
  V.current = !0, Q({
1055
1045
  ...a,
@@ -1072,13 +1062,13 @@ function Tr({
1072
1062
  );
1073
1063
  de(() => {
1074
1064
  var b;
1075
- if (U && a.mode !== "semanticDomain") {
1065
+ if (G && a.mode !== "semanticDomain") {
1076
1066
  v("semanticDomain");
1077
1067
  return;
1078
1068
  }
1079
- if (!X || T !== "semanticDomain") return;
1069
+ if (!Z || I !== "semanticDomain") return;
1080
1070
  const A = i.domainIds ?? [], ae = (((b = a.selectedEntities) == null ? void 0 : b.length) ?? 0) > 0, r = ((s == null ? void 0 : s.length) ?? 0) > 0;
1081
- Ia({
1071
+ Ta({
1082
1072
  mode: C,
1083
1073
  currentDomainId: a.semanticDomainId,
1084
1074
  scopedDomainIds: A,
@@ -1088,9 +1078,9 @@ function Tr({
1088
1078
  selectedEntities: []
1089
1079
  }), r && m([]));
1090
1080
  }, [
1091
- U,
1092
- X,
1093
- T,
1081
+ G,
1082
+ Z,
1083
+ I,
1094
1084
  a.mode,
1095
1085
  a.semanticDomainId,
1096
1086
  a.selectedEntities,
@@ -1103,16 +1093,16 @@ function Tr({
1103
1093
  D && !a.semanticDomainId && h({ semanticDomainId: D });
1104
1094
  }, [D, a.semanticDomainId, h]), de(() => {
1105
1095
  if (!e) {
1106
- V.current = !1, k(""), S(void 0), g(U ? "semantic" : "all");
1096
+ V.current = !1, k(""), S(void 0), g(G ? "semantic" : "all");
1107
1097
  return;
1108
1098
  }
1109
1099
  V.current || (m([...o || []]), S(
1110
1100
  Ye(o)
1111
1101
  ));
1112
- }, [e, o, U]);
1102
+ }, [e, o, G]);
1113
1103
  const E = (A) => {
1114
1104
  V.current = !0, m(
1115
- s.filter((ae) => !J(ae, A))
1105
+ s.filter((ae) => !X(ae, A))
1116
1106
  );
1117
1107
  }, w = ne(
1118
1108
  (A, ae) => {
@@ -1121,11 +1111,11 @@ function Tr({
1121
1111
  );
1122
1112
  },
1123
1113
  []
1124
- ), H = () => {
1114
+ ), P = () => {
1125
1115
  var ae, r;
1126
- const A = Ye(s) ?? N ?? T;
1116
+ const A = Ye(s) ?? N ?? I;
1127
1117
  if (A === "semanticDomain") {
1128
- const x = an(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;
1118
+ const x = Kt(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;
1129
1119
  Q({
1130
1120
  ...a,
1131
1121
  mode: "semanticDomain",
@@ -1156,7 +1146,7 @@ function Tr({
1156
1146
  });
1157
1147
  }
1158
1148
  n(!1);
1159
- }, { semanticDomains: O } = nn(), { connections: z } = Rt(), B = P(
1149
+ }, { semanticDomains: O } = an(), { connections: z } = Vt(), B = H(
1160
1150
  () => new Map(
1161
1151
  O.map((A) => [
1162
1152
  A.id,
@@ -1166,7 +1156,7 @@ function Tr({
1166
1156
  [O]
1167
1157
  ), j = (A) => {
1168
1158
  g(A), A === "semantic" || A.startsWith("domain:") ? a.mode !== "semanticDomain" && v("semanticDomain") : (A === "direct" || A.startsWith("conn:")) && a.mode === "semanticDomain" && v("database");
1169
- }, 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 = I && !U && (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 = $ ? "Select dataset" : "Add data";
1159
+ }, 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, Ie = T && !G && (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 = $ ? "Select dataset" : "Add data";
1170
1160
  return /* @__PURE__ */ t(kn, { open: e, onOpenChange: n, children: /* @__PURE__ */ l(
1171
1161
  Sn,
1172
1162
  {
@@ -1192,7 +1182,7 @@ function Tr({
1192
1182
  ] }),
1193
1183
  /* @__PURE__ */ l("div", { className: "border-b border-border px-4 py-2.5", children: [
1194
1184
  /* @__PURE__ */ l("div", { className: "flex h-7 items-center gap-1.5 rounded-control border border-input bg-background px-2 focus-within:border-ring", children: [
1195
- /* @__PURE__ */ t(In, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
1185
+ /* @__PURE__ */ t(Tn, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
1196
1186
  /* @__PURE__ */ t(
1197
1187
  "input",
1198
1188
  {
@@ -1276,7 +1266,7 @@ function Tr({
1276
1266
  onSelectionChange: (A) => w(A, "semanticDomain")
1277
1267
  }
1278
1268
  ),
1279
- Te && /* @__PURE__ */ t(
1269
+ Ie && /* @__PURE__ */ t(
1280
1270
  Oa,
1281
1271
  {
1282
1272
  search: f,
@@ -1309,7 +1299,7 @@ function Tr({
1309
1299
  "button",
1310
1300
  {
1311
1301
  type: "button",
1312
- onClick: H,
1302
+ onClick: P,
1313
1303
  disabled: Ce,
1314
1304
  className: q(
1315
1305
  "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",
@@ -1365,11 +1355,11 @@ function Lr() {
1365
1355
  setSelectedSchemaName: o,
1366
1356
  setSelectedTableName: u,
1367
1357
  setSelectedDatamodelId: d
1368
- } = Et();
1358
+ } = Rt();
1369
1359
  de(() => {
1370
1360
  var g;
1371
1361
  if (!e) return;
1372
- const { tableName: c, schemaName: i, databaseName: s, connectionId: m } = Tn(e), f = (g = e.selectedEntities) == null ? void 0 : g[0], y = (f == null ? void 0 : f.type) === "model" && "id" in f ? f.id : "";
1362
+ const { tableName: c, schemaName: i, databaseName: s, connectionId: m } = In(e), f = (g = e.selectedEntities) == null ? void 0 : g[0], y = (f == null ? void 0 : f.type) === "model" && "id" in f ? f.id : "";
1373
1363
  n(m || ""), a(s || ""), o(i || ""), u(c || ""), d(y);
1374
1364
  }, [
1375
1365
  e,
@@ -1452,14 +1442,14 @@ function $r({
1452
1442
  side: "bottom",
1453
1443
  className: q("max-w-xs", k[s]),
1454
1444
  children: [
1455
- /* @__PURE__ */ t(_t, { className: y[s] }),
1445
+ /* @__PURE__ */ t(Ot, { className: y[s] }),
1456
1446
  /* @__PURE__ */ t("p", { children: f[s] })
1457
1447
  ]
1458
1448
  }
1459
1449
  )
1460
1450
  ] }) });
1461
1451
  }
1462
- const Ga = vn(
1452
+ const Ua = vn(
1463
1453
  ({
1464
1454
  side: e = "bottom",
1465
1455
  children: n,
@@ -1472,7 +1462,7 @@ const Ga = vn(
1472
1462
  ...s
1473
1463
  }, m) => /* @__PURE__ */ t(at, { children: /* @__PURE__ */ l(rt, { delayDuration: d, children: [
1474
1464
  /* @__PURE__ */ t(st, { asChild: !0, children: /* @__PURE__ */ t(
1475
- G,
1465
+ U,
1476
1466
  {
1477
1467
  disabled: i,
1478
1468
  ref: m,
@@ -1481,7 +1471,7 @@ const Ga = vn(
1481
1471
  onClick: u,
1482
1472
  ...s,
1483
1473
  ...c,
1484
- className: q(`${Jn}`, a),
1474
+ className: q(`${Xn}`, a),
1485
1475
  children: n
1486
1476
  }
1487
1477
  ) }),
@@ -1495,16 +1485,16 @@ const Ga = vn(
1495
1485
  ),
1496
1486
  children: [
1497
1487
  o,
1498
- /* @__PURE__ */ t(_t, { className: "fill-foreground" })
1488
+ /* @__PURE__ */ t(Ot, { className: "fill-foreground" })
1499
1489
  ]
1500
1490
  }
1501
1491
  )
1502
1492
  ] }) })
1503
1493
  );
1504
- Ga.displayName = "IconButton";
1494
+ Ua.displayName = "IconButton";
1505
1495
  function Ba(e, n) {
1506
1496
  var s, m;
1507
- 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 = ea(
1497
+ 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 = Zn(e), c = ea(
1508
1498
  n.dataSource,
1509
1499
  {
1510
1500
  connectionId: u,
@@ -1514,7 +1504,7 @@ function Ba(e, n) {
1514
1504
  ), i = ta(n.dataSource, c, e) || "";
1515
1505
  return {
1516
1506
  column: a,
1517
- title: tn(e),
1507
+ title: nn(e),
1518
1508
  dataType: e.dataType,
1519
1509
  ...e.nativeDataType ? { nativeDataType: e.nativeDataType } : {},
1520
1510
  table: e.entityName || "",
@@ -1594,10 +1584,10 @@ function Ka(e) {
1594
1584
  /* @__PURE__ */ l("div", { className: "min-w-0 space-y-0.5", children: [
1595
1585
  /* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: n.label }),
1596
1586
  /* @__PURE__ */ l("div", { className: "text-[12px] text-muted-foreground", children: [
1597
- Qt(n.type).label,
1587
+ Ht(n.type).label,
1598
1588
  " ·",
1599
1589
  " ",
1600
- Ht(n),
1590
+ Yt(n),
1601
1591
  " ·",
1602
1592
  " ",
1603
1593
  Pt(a, n.placement)
@@ -1606,7 +1596,7 @@ function Ka(e) {
1606
1596
  ] })
1607
1597
  ] });
1608
1598
  }
1609
- function Lt(e) {
1599
+ function It(e) {
1610
1600
  const {
1611
1601
  control: n,
1612
1602
  defaultValue: a,
@@ -1624,7 +1614,7 @@ function Lt(e) {
1624
1614
  return /* @__PURE__ */ l("div", { className: "space-y-3", children: [
1625
1615
  /* @__PURE__ */ t(ln, { control: n, onChange: s }),
1626
1616
  /* @__PURE__ */ t(
1627
- Mt,
1617
+ zt,
1628
1618
  {
1629
1619
  control: n,
1630
1620
  availableFieldChoices: o,
@@ -1636,7 +1626,7 @@ function Lt(e) {
1636
1626
  }
1637
1627
  ),
1638
1628
  /* @__PURE__ */ t(
1639
- qt,
1629
+ Mt,
1640
1630
  {
1641
1631
  control: n,
1642
1632
  value: a,
@@ -1651,9 +1641,9 @@ function Lt(e) {
1651
1641
  /* @__PURE__ */ t(
1652
1642
  je,
1653
1643
  {
1654
- secondary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: f, children: "Back" }),
1644
+ secondary: /* @__PURE__ */ t(U, { type: "button", variant: "outline", size: "xs", onClick: f, children: "Back" }),
1655
1645
  primary: /* @__PURE__ */ t(
1656
- G,
1646
+ U,
1657
1647
  {
1658
1648
  type: "button",
1659
1649
  size: "xs",
@@ -1672,7 +1662,7 @@ const Qa = /* @__PURE__ */ new Set([
1672
1662
  "field_selector",
1673
1663
  "metric_selector"
1674
1664
  ]);
1675
- function $t(e) {
1665
+ function Lt(e) {
1676
1666
  const { text: n, ariaLabel: a } = e, [o, u] = Y(!1);
1677
1667
  return /* @__PURE__ */ l(
1678
1668
  "button",
@@ -1694,7 +1684,7 @@ function $t(e) {
1694
1684
  }
1695
1685
  );
1696
1686
  }
1697
- function At(e) {
1687
+ function $t(e) {
1698
1688
  const {
1699
1689
  control: n,
1700
1690
  scope: a,
@@ -1725,14 +1715,14 @@ function At(e) {
1725
1715
  /* @__PURE__ */ l("div", { className: "space-y-1.5 px-3 py-2.5", children: [
1726
1716
  /* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "SQL cards" }),
1727
1717
  /* @__PURE__ */ t(
1728
- $t,
1718
+ Lt,
1729
1719
  {
1730
1720
  text: o,
1731
1721
  ariaLabel: "Copy SQL control reference"
1732
1722
  }
1733
1723
  ),
1734
1724
  y ? /* @__PURE__ */ t(
1735
- $t,
1725
+ Lt,
1736
1726
  {
1737
1727
  text: y,
1738
1728
  ariaLabel: "Copy Jinja control reference"
@@ -1759,33 +1749,33 @@ function At(e) {
1759
1749
  /* @__PURE__ */ t(
1760
1750
  je,
1761
1751
  {
1762
- secondary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: i, children: "Back" }),
1763
- tertiary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: s, children: "Cancel" }),
1764
- primary: /* @__PURE__ */ t(G, { type: "button", size: "xs", onClick: m, children: "Done" })
1752
+ secondary: /* @__PURE__ */ t(U, { type: "button", variant: "outline", size: "xs", onClick: i, children: "Back" }),
1753
+ tertiary: /* @__PURE__ */ t(U, { type: "button", variant: "outline", size: "xs", onClick: s, children: "Cancel" }),
1754
+ primary: /* @__PURE__ */ t(U, { type: "button", size: "xs", onClick: m, children: "Done" })
1765
1755
  }
1766
1756
  )
1767
1757
  ] });
1768
1758
  }
1769
- function Pa(e) {
1759
+ function Ha(e) {
1770
1760
  const n = Ae(
1771
1761
  e.scope,
1772
1762
  e.existingControls,
1773
1763
  e.reservedIds
1774
1764
  ), a = e.type === n.type ? {
1775
1765
  ...n,
1776
- label: Pe[e.type]
1766
+ label: He[e.type]
1777
1767
  } : {
1778
- ...Yt({
1768
+ ...Jt({
1779
1769
  controls: [
1780
1770
  {
1781
1771
  ...n,
1782
- label: Pe[e.type]
1772
+ label: He[e.type]
1783
1773
  }
1784
1774
  ],
1785
1775
  controlId: n.id,
1786
1776
  nextType: e.type
1787
1777
  }).controls[0],
1788
- label: Pe[e.type]
1778
+ label: He[e.type]
1789
1779
  };
1790
1780
  return {
1791
1781
  step: 2,
@@ -1811,27 +1801,27 @@ function Ar({
1811
1801
  onCreateFlowActiveChange: N,
1812
1802
  onCreateFlowComplete: S
1813
1803
  }) {
1814
- const V = P(
1804
+ const V = H(
1815
1805
  () => new Set(a || []),
1816
1806
  [a]
1817
- ), _ = la(e), Q = na(e), [C, I] = Y(
1807
+ ), _ = la(e), Q = na(e), [C, T] = Y(
1818
1808
  null
1819
- ), [U, X] = Y(
1809
+ ), [G, Z] = Y(
1820
1810
  null
1821
- ), [p, T] = Y(
1811
+ ), [p, I] = Y(
1822
1812
  () => c ? {
1823
1813
  step: 1,
1824
1814
  control: Ae(e, n, Array.from(V))
1825
1815
  } : null
1826
- ), $ = $e({}), D = $e(void 0), v = $e(c), h = P(() => {
1827
- const r = wt({ scope: e, card: y });
1816
+ ), $ = $e({}), D = $e(void 0), v = $e(c), h = H(() => {
1817
+ const r = Ct({ scope: e, card: y });
1828
1818
  if (!g)
1829
1819
  return r;
1830
1820
  const x = new Set(g);
1831
1821
  return r.filter((b) => x.has(b.value));
1832
1822
  }, [g, y, e]), E = ne(
1833
1823
  (r) => {
1834
- const x = wt({
1824
+ const x = Ct({
1835
1825
  scope: e,
1836
1826
  card: y,
1837
1827
  includeType: g ? void 0 : r
@@ -1845,13 +1835,13 @@ function Ar({
1845
1835
  ), w = ne(
1846
1836
  (r) => e === "dashboard" && (r === "field_selector" || r === "metric_selector"),
1847
1837
  [e]
1848
- ), H = P(
1849
- () => p ? kt(
1838
+ ), P = H(
1839
+ () => p ? wt(
1850
1840
  f || [],
1851
1841
  p.control.type
1852
1842
  ) : [],
1853
1843
  [p, f]
1854
- ), O = P(() => {
1844
+ ), O = H(() => {
1855
1845
  if (!p)
1856
1846
  return {
1857
1847
  fields: s || [],
@@ -1888,10 +1878,10 @@ function Ar({
1888
1878
  N == null || N(!!p);
1889
1879
  }, [p, N]), de(() => {
1890
1880
  const r = c && !v.current;
1891
- v.current = c, r && (T({
1881
+ v.current = c, r && (I({
1892
1882
  step: 1,
1893
1883
  control: Ae(e, n, Array.from(V))
1894
- }), X(null), I(null));
1884
+ }), Z(null), T(null));
1895
1885
  }, [n, c, V, e]);
1896
1886
  const z = (r) => {
1897
1887
  if (!w(r.type))
@@ -1985,23 +1975,23 @@ function Ar({
1985
1975
  const W = L.find(
1986
1976
  (K) => K.id === r
1987
1977
  );
1988
- let Z = o;
1978
+ let J = o;
1989
1979
  if (b && W) {
1990
1980
  const K = Qe({
1991
1981
  control: b,
1992
1982
  defaultValues: o
1993
1983
  });
1994
1984
  b.source.kind === "manual" && W.source.kind === "sql_query" && ($.current[r] = K);
1995
- const pe = K === void 0 && b.source.kind === "sql_query" && W.source.kind === "manual" ? $.current[r] : K, ie = It({
1985
+ const pe = K === void 0 && b.source.kind === "sql_query" && W.source.kind === "manual" ? $.current[r] : K, ie = Dt({
1996
1986
  previousControl: b,
1997
1987
  nextControl: W,
1998
1988
  currentDefaultValue: pe
1999
1989
  });
2000
- W.source.kind === "manual" && ($.current[r] = ie), o && (Z = { ...o }, ie === void 0 ? delete Z[r] : Z[r] = ie), L = L.map(
2001
- (bt) => bt.id === r ? { ...W, defaultValue: ie } : bt
1990
+ W.source.kind === "manual" && ($.current[r] = ie), o && (J = { ...o }, ie === void 0 ? delete J[r] : J[r] = ie), L = L.map(
1991
+ (xt) => xt.id === r ? { ...W, defaultValue: ie } : xt
2002
1992
  );
2003
1993
  }
2004
- j(L, Z, {
1994
+ j(L, J, {
2005
1995
  type: "update",
2006
1996
  cardBindingsById: M,
2007
1997
  affectedBindingControlIds: F
@@ -2040,16 +2030,16 @@ function Ar({
2040
2030
  const b = { ...o };
2041
2031
  delete b[r], j(x, b, { type: "remove", controlId: r });
2042
2032
  }, We = ne(() => {
2043
- D.current = void 0, T({
2033
+ D.current = void 0, I({
2044
2034
  step: 1,
2045
2035
  control: Ae(e, n, Array.from(V))
2046
- }), X(null), I(null);
2036
+ }), Z(null), T(null);
2047
2037
  }, [n, V, e]), oe = (r) => {
2048
- T(
2038
+ I(
2049
2039
  (x) => x && (() => {
2050
2040
  const b = r(x.control);
2051
2041
  x.control.source.kind === "manual" && b.source.kind === "sql_query" && (D.current = x.defaultValue);
2052
- const L = x.defaultValue === void 0 && x.control.source.kind === "sql_query" && b.source.kind === "manual" ? D.current : x.defaultValue, R = It({
2042
+ const L = x.defaultValue === void 0 && x.control.source.kind === "sql_query" && b.source.kind === "manual" ? D.current : x.defaultValue, R = Dt({
2053
2043
  previousControl: x.control,
2054
2044
  nextControl: b,
2055
2045
  currentDefaultValue: L
@@ -2061,8 +2051,8 @@ function Ar({
2061
2051
  };
2062
2052
  })()
2063
2053
  );
2064
- }, Te = (r) => {
2065
- T(
2054
+ }, Ie = (r) => {
2055
+ I(
2066
2056
  (x) => x && (x.control.source.kind === "manual" && (D.current = r), {
2067
2057
  ...x,
2068
2058
  defaultValue: r
@@ -2080,7 +2070,7 @@ function Ar({
2080
2070
  });
2081
2071
  if (p.step !== 2 && p.step !== 3 || !p.control.label.trim())
2082
2072
  return !1;
2083
- const x = p.control.source.kind === "sql_query" ? p.control : St(p.control);
2073
+ const x = p.control.source.kind === "sql_query" ? p.control : kt(p.control);
2084
2074
  if (x.source.kind === "manual" && (sa(x) && x.source.options.length === 0 || x.source.options.some(
2085
2075
  (L) => L.label.trim().length === 0 || L.value.trim().length === 0
2086
2076
  )))
@@ -2096,7 +2086,7 @@ function Ar({
2096
2086
  var M;
2097
2087
  if (!p)
2098
2088
  return;
2099
- const r = St(p.control), x = ca({
2089
+ const r = kt(p.control), x = ca({
2100
2090
  label: r.label,
2101
2091
  fallbackId: r.id,
2102
2092
  existingControls: n,
@@ -2113,7 +2103,7 @@ function Ar({
2113
2103
  b,
2114
2104
  p.defaultValue
2115
2105
  );
2116
- T({
2106
+ I({
2117
2107
  step: e === "dashboard" && (b.type === "field_selector" || b.type === "metric_selector") ? 4 : 3,
2118
2108
  control: b,
2119
2109
  defaultValue: R,
@@ -2123,10 +2113,10 @@ function Ar({
2123
2113
  cardBindingsById: L
2124
2114
  });
2125
2115
  }, we = ne(() => {
2126
- T(null);
2116
+ I(null);
2127
2117
  }, []), ke = ne(() => {
2128
2118
  if (!(p != null && p.createdControlId)) {
2129
- T(null);
2119
+ I(null);
2130
2120
  return;
2131
2121
  }
2132
2122
  const r = p.control, x = p.createdControlId, b = Fe(
@@ -2164,11 +2154,11 @@ function Ar({
2164
2154
  cardBindingsById: p.cardBindingsById
2165
2155
  }
2166
2156
  );
2167
- X(x), T(null), S == null || S();
2168
- }, [n, p, o, j, S]), xt = p ? w(p.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Se = p != null && p.createdControlId ? `[[param.${p.createdControlId}]]` : p ? `[[param.${ia(p.control.label) || p.control.id}]]` : "", me = Dt({
2157
+ Z(x), I(null), S == null || S();
2158
+ }, [n, p, o, j, S]), gt = p ? w(p.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Se = p != null && p.createdControlId ? `[[param.${p.createdControlId}]]` : p ? `[[param.${ia(p.control.label) || p.control.id}]]` : "", me = St({
2169
2159
  controls: n,
2170
2160
  defaultValues: o
2171
- }), A = p ? [...n, p.control] : n, ae = p ? Dt({
2161
+ }), A = p ? [...n, p.control] : n, ae = p ? St({
2172
2162
  controls: A,
2173
2163
  defaultValues: o,
2174
2164
  overrides: [
@@ -2184,7 +2174,7 @@ function Ar({
2184
2174
  Wa,
2185
2175
  {
2186
2176
  currentStep: p.step,
2187
- labels: xt
2177
+ labels: gt
2188
2178
  }
2189
2179
  ),
2190
2180
  p.step === 1 && (() => {
@@ -2207,8 +2197,8 @@ function Ar({
2207
2197
  {
2208
2198
  type: "button",
2209
2199
  className: "rounded-control border border-border/60 bg-background px-3 py-2.5 text-left transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:outline-none",
2210
- onClick: () => T(
2211
- Pa({
2200
+ onClick: () => I(
2201
+ Ha({
2212
2202
  scope: e,
2213
2203
  existingControls: n,
2214
2204
  reservedIds: Array.from(V),
@@ -2236,7 +2226,7 @@ function Ar({
2236
2226
  je,
2237
2227
  {
2238
2228
  secondary: /* @__PURE__ */ t(
2239
- G,
2229
+ U,
2240
2230
  {
2241
2231
  type: "button",
2242
2232
  variant: "outline",
@@ -2263,7 +2253,7 @@ function Ar({
2263
2253
  ),
2264
2254
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
2265
2255
  ] }),
2266
- H.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-control border border-border/60 bg-muted/30 px-3 py-2.5 text-[12px] text-muted-foreground", children: "No eligible cards are available yet. Add compatible metrics or group-by fields to cards first." }) : /* @__PURE__ */ t("div", { className: "space-y-1 rounded-control border border-border/60 bg-background p-2", children: H.map((r) => {
2256
+ P.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-control border border-border/60 bg-muted/30 px-3 py-2.5 text-[12px] text-muted-foreground", children: "No eligible cards are available yet. Add compatible metrics or group-by fields to cards first." }) : /* @__PURE__ */ t("div", { className: "space-y-1 rounded-control border border-border/60 bg-background p-2", children: P.map((r) => {
2267
2257
  const x = (p.selectedCardIds || []).includes(r.cardId);
2268
2258
  return /* @__PURE__ */ l(
2269
2259
  "label",
@@ -2271,10 +2261,10 @@ function Ar({
2271
2261
  className: "flex items-start gap-2 rounded-control px-1.5 py-1 text-[13px] hover:bg-muted/40",
2272
2262
  children: [
2273
2263
  /* @__PURE__ */ t(
2274
- Ue,
2264
+ Ge,
2275
2265
  {
2276
2266
  checked: x,
2277
- onCheckedChange: (b) => T(
2267
+ onCheckedChange: (b) => I(
2278
2268
  (L) => L && {
2279
2269
  ...L,
2280
2270
  selectedCardIds: b === !0 ? [
@@ -2297,25 +2287,25 @@ function Ar({
2297
2287
  );
2298
2288
  }) }),
2299
2289
  /* @__PURE__ */ t(
2300
- yt,
2290
+ vt,
2301
2291
  {
2302
- participants: H,
2292
+ participants: P,
2303
2293
  selectedCardIds: p.selectedCardIds || [],
2304
2294
  control: p.control,
2305
2295
  selected: p.matrixTargetIds,
2306
- onChange: (r, x) => T((b) => b && { ...b, matrixTargetIds: { ...b.matrixTargetIds, [r]: x } })
2296
+ onChange: (r, x) => I((b) => b && { ...b, matrixTargetIds: { ...b.matrixTargetIds, [r]: x } })
2307
2297
  }
2308
2298
  ),
2309
2299
  /* @__PURE__ */ t(
2310
2300
  je,
2311
2301
  {
2312
2302
  secondary: /* @__PURE__ */ t(
2313
- G,
2303
+ U,
2314
2304
  {
2315
2305
  type: "button",
2316
2306
  variant: "outline",
2317
2307
  size: "xs",
2318
- onClick: () => T(
2308
+ onClick: () => I(
2319
2309
  (r) => r && {
2320
2310
  ...r,
2321
2311
  step: 1,
@@ -2326,11 +2316,11 @@ function Ar({
2326
2316
  }
2327
2317
  ),
2328
2318
  primary: /* @__PURE__ */ t(
2329
- G,
2319
+ U,
2330
2320
  {
2331
2321
  type: "button",
2332
2322
  size: "xs",
2333
- onClick: () => T(
2323
+ onClick: () => I(
2334
2324
  (r) => r && {
2335
2325
  ...r,
2336
2326
  step: 3
@@ -2344,7 +2334,7 @@ function Ar({
2344
2334
  )
2345
2335
  ] }),
2346
2336
  p.step === 2 && !w(p.control.type) && /* @__PURE__ */ t(
2347
- Lt,
2337
+ It,
2348
2338
  {
2349
2339
  control: p.control,
2350
2340
  defaultValue: p.defaultValue,
@@ -2357,8 +2347,8 @@ function Ar({
2357
2347
  ...x,
2358
2348
  label: r
2359
2349
  })),
2360
- onDefaultValueChange: Te,
2361
- onBack: () => T(
2350
+ onDefaultValueChange: Ie,
2351
+ onBack: () => I(
2362
2352
  (r) => r && {
2363
2353
  ...r,
2364
2354
  step: 1
@@ -2369,7 +2359,7 @@ function Ar({
2369
2359
  }
2370
2360
  ),
2371
2361
  p.step === 3 && w(p.control.type) && /* @__PURE__ */ t(
2372
- Lt,
2362
+ It,
2373
2363
  {
2374
2364
  control: p.control,
2375
2365
  defaultValue: p.defaultValue,
@@ -2382,8 +2372,8 @@ function Ar({
2382
2372
  ...x,
2383
2373
  label: r
2384
2374
  })),
2385
- onDefaultValueChange: Te,
2386
- onBack: () => T(
2375
+ onDefaultValueChange: Ie,
2376
+ onBack: () => I(
2387
2377
  (r) => r && {
2388
2378
  ...r,
2389
2379
  step: 2
@@ -2394,7 +2384,7 @@ function Ar({
2394
2384
  }
2395
2385
  ),
2396
2386
  p.step === 3 && !w(p.control.type) && /* @__PURE__ */ t(
2397
- At,
2387
+ $t,
2398
2388
  {
2399
2389
  control: p.control,
2400
2390
  scope: e,
@@ -2407,7 +2397,7 @@ function Ar({
2407
2397
  "to choose what this control changes."
2408
2398
  ] }),
2409
2399
  sqlDescription: "Reference this control directly in the SQL editor.",
2410
- onBack: () => T(
2400
+ onBack: () => I(
2411
2401
  (r) => r && {
2412
2402
  ...r,
2413
2403
  step: 2
@@ -2418,7 +2408,7 @@ function Ar({
2418
2408
  }
2419
2409
  ),
2420
2410
  p.step === 4 && w(p.control.type) && /* @__PURE__ */ t(
2421
- At,
2411
+ $t,
2422
2412
  {
2423
2413
  control: p.control,
2424
2414
  scope: e,
@@ -2431,7 +2421,7 @@ function Ar({
2431
2421
  ] }),
2432
2422
  explorerContent: /* @__PURE__ */ t(fe, { children: "Selected cards have been set up to respond to this control automatically." }),
2433
2423
  sqlDescription: "SQL cards can still reference this control directly in the SQL editor.",
2434
- onBack: () => T(
2424
+ onBack: () => I(
2435
2425
  (r) => r && {
2436
2426
  ...r,
2437
2427
  step: 3
@@ -2447,7 +2437,7 @@ function Ar({
2447
2437
  const x = z(r), b = i == null ? void 0 : i[r.id], L = Qe({
2448
2438
  control: r,
2449
2439
  defaultValues: o
2450
- }), R = U === r.id, M = "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";
2440
+ }), R = G === r.id, M = "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";
2451
2441
  return /* @__PURE__ */ l(
2452
2442
  "div",
2453
2443
  {
@@ -2459,19 +2449,19 @@ function Ar({
2459
2449
  {
2460
2450
  type: "button",
2461
2451
  className: "flex min-w-0 flex-1 items-start gap-2 rounded-control text-left focus:outline-none focus-visible:bg-muted/40",
2462
- onClick: () => X(
2452
+ onClick: () => Z(
2463
2453
  (F) => F === r.id ? null : r.id
2464
2454
  ),
2465
2455
  children: [
2466
- R ? /* @__PURE__ */ t(Oe, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ t(Ie, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
2456
+ R ? /* @__PURE__ */ t(Oe, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ t(Te, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
2467
2457
  /* @__PURE__ */ l("div", { className: "min-w-0", children: [
2468
2458
  /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-1.5", children: [
2469
2459
  /* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: r.label || "Untitled control" }),
2470
- /* @__PURE__ */ t("span", { className: M, children: Qt(r.type).label }),
2460
+ /* @__PURE__ */ t("span", { className: M, children: Ht(r.type).label }),
2471
2461
  /* @__PURE__ */ t("span", { className: M, children: Pt(e, r.placement) })
2472
2462
  ] }),
2473
2463
  /* @__PURE__ */ l("div", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
2474
- Ht(r),
2464
+ Yt(r),
2475
2465
  b != null && b.status ? ` · ${b.status}` : ""
2476
2466
  ] })
2477
2467
  ] })
@@ -2479,7 +2469,7 @@ function Ar({
2479
2469
  }
2480
2470
  ),
2481
2471
  /* @__PURE__ */ t(
2482
- G,
2472
+ U,
2483
2473
  {
2484
2474
  type: "button",
2485
2475
  size: "xs",
@@ -2487,7 +2477,7 @@ function Ar({
2487
2477
  className: "h-7 w-7 shrink-0 p-0 text-muted-foreground",
2488
2478
  onClick: () => Be(r.id),
2489
2479
  "aria-label": `Remove ${r.label}`,
2490
- children: /* @__PURE__ */ t(zt, { className: "h-3.5 w-3.5" })
2480
+ children: /* @__PURE__ */ t(Et, { className: "h-3.5 w-3.5" })
2491
2481
  }
2492
2482
  )
2493
2483
  ] }),
@@ -2515,7 +2505,7 @@ function Ar({
2515
2505
  {
2516
2506
  value: r.type,
2517
2507
  onValueChange: (F) => {
2518
- const W = Yt({
2508
+ const W = Jt({
2519
2509
  controls: n,
2520
2510
  controlId: r.id,
2521
2511
  nextType: F,
@@ -2562,7 +2552,7 @@ function Ar({
2562
2552
  Fn,
2563
2553
  {
2564
2554
  type: r.type,
2565
- participants: kt(
2555
+ participants: wt(
2566
2556
  f || [],
2567
2557
  r.type
2568
2558
  ).map((F) => ({
@@ -2575,10 +2565,10 @@ function Ar({
2575
2565
  const W = B({
2576
2566
  control: r,
2577
2567
  nextSelectedCardIds: F
2578
- }), Z = n.map(
2568
+ }), J = n.map(
2579
2569
  (K) => K.id === r.id ? W.nextControl : K
2580
2570
  );
2581
- j(Z, o, {
2571
+ j(J, o, {
2582
2572
  type: "update",
2583
2573
  cardBindingsById: W.cardBindingsById
2584
2574
  });
@@ -2586,28 +2576,28 @@ function Ar({
2586
2576
  }
2587
2577
  ),
2588
2578
  /* @__PURE__ */ t(
2589
- yt,
2579
+ vt,
2590
2580
  {
2591
2581
  participants: f || [],
2592
2582
  selectedCardIds: (k == null ? void 0 : k[r.id]) || [],
2593
2583
  control: r,
2594
2584
  onChange: (F, W) => {
2595
- const Z = B({
2585
+ const J = B({
2596
2586
  control: r,
2597
2587
  nextSelectedCardIds: (k == null ? void 0 : k[r.id]) || [],
2598
2588
  matrixTargetIds: { [F]: W }
2599
2589
  });
2600
2590
  j(
2601
- n.map((K) => K.id === r.id ? Z.nextControl : K),
2591
+ n.map((K) => K.id === r.id ? J.nextControl : K),
2602
2592
  o,
2603
- { type: "update", cardBindingsById: Z.cardBindingsById }
2593
+ { type: "update", cardBindingsById: J.cardBindingsById }
2604
2594
  );
2605
2595
  }
2606
2596
  }
2607
2597
  )
2608
2598
  ] }) : null,
2609
2599
  /* @__PURE__ */ t(
2610
- Mt,
2600
+ zt,
2611
2601
  {
2612
2602
  control: r,
2613
2603
  availableFieldChoices: x.fields,
@@ -2619,7 +2609,7 @@ function Ar({
2619
2609
  }
2620
2610
  ),
2621
2611
  r.initialValueStrategy === "saved_default" && /* @__PURE__ */ t(
2622
- qt,
2612
+ Mt,
2623
2613
  {
2624
2614
  control: r,
2625
2615
  value: L,
@@ -2629,11 +2619,11 @@ function Ar({
2629
2619
  previewControlValues: me,
2630
2620
  onChange: (F) => {
2631
2621
  const W = n.map(
2632
- (Z) => Z.id === r.id ? { ...Z, defaultValue: F } : Z
2622
+ (J) => J.id === r.id ? { ...J, defaultValue: F } : J
2633
2623
  );
2634
2624
  if (r.source.kind === "manual" && ($.current[r.id] = F), o) {
2635
- const Z = { ...o };
2636
- F === void 0 ? delete Z[r.id] : Z[r.id] = F, j(W, Z);
2625
+ const J = { ...o };
2626
+ F === void 0 ? delete J[r.id] : J[r.id] = F, j(W, J);
2637
2627
  return;
2638
2628
  }
2639
2629
  j(W, void 0);
@@ -2644,17 +2634,17 @@ function Ar({
2644
2634
  On,
2645
2635
  {
2646
2636
  open: C === r.id,
2647
- onOpenChange: (F) => I(F ? r.id : null),
2637
+ onOpenChange: (F) => T(F ? r.id : null),
2648
2638
  children: [
2649
2639
  /* @__PURE__ */ t(_n, { asChild: !0, children: /* @__PURE__ */ l(
2650
- G,
2640
+ U,
2651
2641
  {
2652
2642
  type: "button",
2653
2643
  variant: "ghost",
2654
2644
  size: "xs",
2655
2645
  className: "-ml-2 gap-1 text-muted-foreground hover:text-foreground",
2656
2646
  children: [
2657
- C === r.id ? /* @__PURE__ */ t(Oe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Ie, { className: "h-3.5 w-3.5" }),
2647
+ C === r.id ? /* @__PURE__ */ t(Oe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Te, { className: "h-3.5 w-3.5" }),
2658
2648
  "Advanced"
2659
2649
  ]
2660
2650
  }
@@ -2715,7 +2705,7 @@ function Ar({
2715
2705
  );
2716
2706
  }),
2717
2707
  !p && /* @__PURE__ */ l(
2718
- G,
2708
+ U,
2719
2709
  {
2720
2710
  type: "button",
2721
2711
  variant: "outline",
@@ -2771,22 +2761,22 @@ function dn(e) {
2771
2761
  } = e;
2772
2762
  return o;
2773
2763
  }
2774
- function ft(e, n) {
2764
+ function pt(e, n) {
2775
2765
  const a = dn(e);
2776
2766
  return n.relativeMeta ? { ...a, value: n.value, relativeMeta: n.relativeMeta } : { ...a, value: n.value };
2777
2767
  }
2778
- function Ha(e, n) {
2768
+ function Pa(e, n) {
2779
2769
  const a = n === "in" || n === "not in" || n === "between" || n === "not between" ? [] : n === "isNull" || n === "isNotNull" ? null : "";
2780
- return ft({ ...e, operator: n }, { value: a });
2770
+ return pt({ ...e, operator: n }, { value: a });
2781
2771
  }
2782
2772
  function Ya(e, n) {
2783
2773
  const a = qe(n.dataType) === "date";
2784
- return ft(
2774
+ return pt(
2785
2775
  { ...e, field: n, operator: a ? "between" : "=" },
2786
2776
  { value: "" }
2787
2777
  );
2788
2778
  }
2789
- function Za({
2779
+ function Ja({
2790
2780
  initialFilters: e,
2791
2781
  availableFields: n,
2792
2782
  onChange: a
@@ -2799,10 +2789,10 @@ function Za({
2799
2789
  conditions: [],
2800
2790
  groups: []
2801
2791
  }
2802
- ), d = (T) => {
2803
- u(T), a == null || a(T);
2792
+ ), d = (I) => {
2793
+ u(I), a == null || a(I);
2804
2794
  };
2805
- se((T) => T.card.dataSource);
2795
+ se((I) => I.card.dataSource);
2806
2796
  const { filterableFields: c, isLoading: i } = Mn(), s = n || c || [], m = {
2807
2797
  id: "default",
2808
2798
  qualifiedFieldName: "default",
@@ -2812,9 +2802,9 @@ function Za({
2812
2802
  entityId: "default",
2813
2803
  entityName: "Default",
2814
2804
  entityType: "table"
2815
- }, f = (T) => {
2805
+ }, f = (I) => {
2816
2806
  const $ = (D) => {
2817
- if (D.id === T) {
2807
+ if (D.id === I) {
2818
2808
  const v = s[0] || m, h = qe(v.dataType) === "date";
2819
2809
  return {
2820
2810
  ...D,
@@ -2835,9 +2825,9 @@ function Za({
2835
2825
  };
2836
2826
  };
2837
2827
  d($(o));
2838
- }, k = (T) => {
2828
+ }, k = (I) => {
2839
2829
  const $ = (D) => {
2840
- if (D.id === T) {
2830
+ if (D.id === I) {
2841
2831
  const v = s[0] || m, h = qe(v.dataType) === "date";
2842
2832
  return {
2843
2833
  ...D,
@@ -2866,8 +2856,8 @@ function Za({
2866
2856
  };
2867
2857
  };
2868
2858
  d($(o));
2869
- }, y = (T, $) => {
2870
- const D = (v) => v.id === T ? {
2859
+ }, y = (I, $) => {
2860
+ const D = (v) => v.id === I ? {
2871
2861
  ...v,
2872
2862
  conditions: v.conditions.filter((h) => h.id !== $)
2873
2863
  } : {
@@ -2875,8 +2865,8 @@ function Za({
2875
2865
  groups: v.groups.map(D)
2876
2866
  };
2877
2867
  d(D(o));
2878
- }, g = (T, $) => {
2879
- const D = (v) => v.id === T ? {
2868
+ }, g = (I, $) => {
2869
+ const D = (v) => v.id === I ? {
2880
2870
  ...v,
2881
2871
  groups: v.groups.filter((h) => h.id !== $)
2882
2872
  } : {
@@ -2884,8 +2874,8 @@ function Za({
2884
2874
  groups: v.groups.map(D)
2885
2875
  };
2886
2876
  d(D(o));
2887
- }, N = (T, $, D) => {
2888
- const v = (h) => h.id === T ? {
2877
+ }, N = (I, $, D) => {
2878
+ const v = (h) => h.id === I ? {
2889
2879
  ...h,
2890
2880
  conditions: h.conditions.map(
2891
2881
  (E) => E.id === $ ? D(E) : E
@@ -2895,11 +2885,11 @@ function Za({
2895
2885
  groups: h.groups.map(v)
2896
2886
  };
2897
2887
  d(v(o));
2898
- }, S = (T, $, D) => N(T, $, (v) => ({
2888
+ }, S = (I, $, D) => N(I, $, (v) => ({
2899
2889
  ..."value" in D || "operator" in D || "field" in D ? dn(v) : v,
2900
2890
  ...D
2901
- })), V = (T, $, D) => N(T, $, () => D), _ = qn(), Q = (T, $) => {
2902
- const D = (v) => v.id === T ? {
2891
+ })), V = (I, $, D) => N(I, $, () => D), _ = qn(), Q = (I, $) => {
2892
+ const D = (v) => v.id === I ? {
2903
2893
  ...v,
2904
2894
  logicalOperator: $
2905
2895
  } : {
@@ -2907,8 +2897,8 @@ function Za({
2907
2897
  groups: v.groups.map(D)
2908
2898
  };
2909
2899
  d(D(o));
2910
- }, C = (T, $) => {
2911
- const D = (v) => v.id === T ? {
2900
+ }, C = (I, $) => {
2901
+ const D = (v) => v.id === I ? {
2912
2902
  ...v,
2913
2903
  negate: $
2914
2904
  } : {
@@ -2916,26 +2906,26 @@ function Za({
2916
2906
  groups: v.groups.map(D)
2917
2907
  };
2918
2908
  d(D(o));
2919
- }, I = (T, $, D) => {
2920
- const v = (h) => h.id === T ? {
2909
+ }, T = (I, $, D) => {
2910
+ const v = (h) => h.id === I ? {
2921
2911
  ...h,
2922
- conditions: Nt(h.conditions, $, D)
2912
+ conditions: yt(h.conditions, $, D)
2923
2913
  } : {
2924
2914
  ...h,
2925
2915
  groups: h.groups.map(v)
2926
2916
  };
2927
2917
  d(v(o));
2928
- }, U = (T, $, D) => {
2929
- const v = (h) => h.id === T ? {
2918
+ }, G = (I, $, D) => {
2919
+ const v = (h) => h.id === I ? {
2930
2920
  ...h,
2931
- groups: Nt(h.groups, $, D)
2921
+ groups: yt(h.groups, $, D)
2932
2922
  } : {
2933
2923
  ...h,
2934
2924
  groups: h.groups.map(v)
2935
2925
  };
2936
2926
  d(v(o));
2937
- }, X = (T) => {
2938
- if (!T || T.conditions.length === 0 && T.groups.length === 0)
2927
+ }, Z = (I) => {
2928
+ if (!I || I.conditions.length === 0 && I.groups.length === 0)
2939
2929
  return "-- No filters defined";
2940
2930
  const $ = (v) => {
2941
2931
  let h = "";
@@ -2943,27 +2933,27 @@ function Za({
2943
2933
  const E = v.operator;
2944
2934
  let w = v.value;
2945
2935
  if (v.latestValue && E === "=")
2946
- return `${h} = ${jt} /* the latest value each time the card runs */`;
2947
- const H = Zt(v.relativeMeta);
2948
- if (H && ya(E) && Jt(E, H)) {
2949
- const O = Ca(E, H), { label: z, range: B } = Ct(H, {
2936
+ return `${h} = ${qt} /* the latest value each time the card runs */`;
2937
+ const P = Xt(v.relativeMeta);
2938
+ if (P && ya(E) && Zt(E, P)) {
2939
+ const O = Ca(E, P), { label: z, range: B } = Nt(P, {
2950
2940
  tz: (_ == null ? void 0 : _.tz) ?? "UTC",
2951
2941
  weekStart: (_ == null ? void 0 : _.weekStart) ?? 1,
2952
2942
  anchor: (_ == null ? void 0 : _.anchor) ?? "now"
2953
2943
  }), j = O ? wa(O) : z;
2954
2944
  if (B) {
2955
- const [ee] = Xt(E, [B.start, B.end]);
2945
+ const [ee] = en(E, [B.start, B.end]);
2956
2946
  return `${h} ${E} '${ee.toISOString()}' /* ${j}: the date updates each time the card runs */`;
2957
2947
  }
2958
2948
  return `${h} ${E} ${j} /* the date follows your calendar each time the card runs */`;
2959
2949
  }
2960
- if (H && (E === "between" || E === "not between")) {
2961
- const O = E === "between" ? "BETWEEN" : "NOT BETWEEN", { label: z, range: B } = Ct(H, {
2950
+ if (P && (E === "between" || E === "not between")) {
2951
+ const O = E === "between" ? "BETWEEN" : "NOT BETWEEN", { label: z, range: B } = Nt(P, {
2962
2952
  tz: (_ == null ? void 0 : _.tz) ?? "UTC",
2963
2953
  weekStart: (_ == null ? void 0 : _.weekStart) ?? 1,
2964
2954
  anchor: (_ == null ? void 0 : _.anchor) ?? "now"
2965
2955
  });
2966
- return B ? `${h} ${O} '${B.start.toISOString()}' AND '${B.end.toISOString()}' /* ${z}: dates update each time the card runs */` : en(H).dataAnchored ? `${h} ${O} ${z} /* dates count back from the latest data each time the card runs */` : `${h} ${O} ${z} /* dates follow your calendar each time the card runs */`;
2956
+ return B ? `${h} ${O} '${B.start.toISOString()}' AND '${B.end.toISOString()}' /* ${z}: dates update each time the card runs */` : tn(P).dataAnchored ? `${h} ${O} ${z} /* dates count back from the latest data each time the card runs */` : `${h} ${O} ${z} /* dates follow your calendar each time the card runs */`;
2967
2957
  }
2968
2958
  if (v.field.dataType === "string" && !["in", "not in"].includes(v.operator))
2969
2959
  typeof w == "string" ? w = `'${w}'` : Array.isArray(w) && (w = `'${w.join(", ")}'`);
@@ -3003,10 +2993,10 @@ function Za({
3003
2993
  (z) => D(z)
3004
2994
  ), w = [...h, ...E].filter(Boolean);
3005
2995
  if (w.length === 0) return "";
3006
- const H = w.join(` ${v.logicalOperator} `), O = w.length > 1 ? `(${H})` : H;
2996
+ const P = w.join(` ${v.logicalOperator} `), O = w.length > 1 ? `(${P})` : P;
3007
2997
  return v.negate ? `NOT ${O}` : O;
3008
2998
  };
3009
- return D(T);
2999
+ return D(I);
3010
3000
  }, p = o.conditions.length > 0 || o.groups.length > 0;
3011
3001
  return {
3012
3002
  currentFilters: o,
@@ -3021,13 +3011,13 @@ function Za({
3021
3011
  replaceCondition: V,
3022
3012
  updateGroupOperator: Q,
3023
3013
  updateGroupNegate: C,
3024
- reorderConditions: I,
3025
- reorderGroups: U,
3026
- generateSQLPreview: X,
3014
+ reorderConditions: T,
3015
+ reorderGroups: G,
3016
+ generateSQLPreview: Z,
3027
3017
  hasAnyFilters: p
3028
3018
  };
3029
3019
  }
3030
- function Ja({
3020
+ function Xa({
3031
3021
  children: e,
3032
3022
  className: n,
3033
3023
  delayDuration: a
@@ -3046,20 +3036,20 @@ function Ja({
3046
3036
  /* @__PURE__ */ t(ot, { children: e })
3047
3037
  ] }) });
3048
3038
  }
3049
- function Xa({
3039
+ function Za({
3050
3040
  value: e,
3051
3041
  onValueChange: n,
3052
3042
  availableFields: a,
3053
3043
  placeholder: o = "Select field",
3054
3044
  className: u
3055
3045
  }) {
3056
- const [d, c] = vt.useState(!1), i = vt.useMemo(
3046
+ const [d, c] = bt.useState(!1), i = bt.useMemo(
3057
3047
  () => new Set(e ? [e.id] : []),
3058
3048
  [e]
3059
- ), s = e ? tn(e) : null;
3049
+ ), s = e ? nn(e) : null;
3060
3050
  return /* @__PURE__ */ l(it, { modal: !0, open: d, onOpenChange: c, children: [
3061
3051
  /* @__PURE__ */ t(lt, { asChild: !0, children: /* @__PURE__ */ l(
3062
- G,
3052
+ U,
3063
3053
  {
3064
3054
  variant: "outline",
3065
3055
  size: "xs",
@@ -3072,7 +3062,7 @@ function Xa({
3072
3062
  u
3073
3063
  ),
3074
3064
  children: [
3075
- s ? /* @__PURE__ */ t(Ja, { 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 }),
3065
+ s ? /* @__PURE__ */ t(Xa, { 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 }),
3076
3066
  /* @__PURE__ */ t(jn, { className: "h-3.5 w-3.5 shrink-0 opacity-50" })
3077
3067
  ]
3078
3068
  }
@@ -3087,7 +3077,7 @@ function Xa({
3087
3077
  m.preventDefault(), (k = (f = m.currentTarget) == null ? void 0 : f.querySelector('input[type="text"]')) == null || k.focus();
3088
3078
  },
3089
3079
  children: /* @__PURE__ */ t(
3090
- Un,
3080
+ Gn,
3091
3081
  {
3092
3082
  fields: a,
3093
3083
  selectedIds: i,
@@ -3109,14 +3099,14 @@ function cn(e, n) {
3109
3099
  (f) => f.card.connectionId
3110
3100
  ), u = se(
3111
3101
  (f) => f.selectedConnectionId
3112
- ), 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 = P(
3102
+ ), 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 = H(
3113
3103
  () => ({
3114
3104
  id: `card-filter-option:${e.id}`,
3115
3105
  ...Ba(e, { dataSource: d, connectionId: c })
3116
3106
  }),
3117
3107
  [c, d, e]
3118
- ), s = P(
3119
- () => Gn({ filter: i }),
3108
+ ), s = H(
3109
+ () => Un({ filter: i }),
3120
3110
  [i]
3121
3111
  );
3122
3112
  return Bn(i, {
@@ -3145,7 +3135,7 @@ function er({
3145
3135
  };
3146
3136
  return /* @__PURE__ */ t("div", { className: q("w-full", d), children: /* @__PURE__ */ l(it, { open: c, onOpenChange: y, modal: !0, children: [
3147
3137
  /* @__PURE__ */ t(lt, { asChild: !0, children: /* @__PURE__ */ l(
3148
- G,
3138
+ U,
3149
3139
  {
3150
3140
  variant: "outline",
3151
3141
  size: "xs",
@@ -3204,7 +3194,7 @@ function er({
3204
3194
  g.preventDefault(), (S = (N = g.currentTarget) == null ? void 0 : N.querySelector('input[type="text"]')) == null || S.focus();
3205
3195
  },
3206
3196
  children: /* @__PURE__ */ t(
3207
- Ut,
3197
+ jt,
3208
3198
  {
3209
3199
  records: s.displayRecords,
3210
3200
  selectedIdentities: m,
@@ -3241,7 +3231,7 @@ function tr({
3241
3231
  };
3242
3232
  return /* @__PURE__ */ l(it, { open: c, onOpenChange: k, modal: !0, children: [
3243
3233
  /* @__PURE__ */ t(lt, { asChild: !0, children: /* @__PURE__ */ l(
3244
- G,
3234
+ U,
3245
3235
  {
3246
3236
  variant: "outline",
3247
3237
  size: "xs",
@@ -3273,7 +3263,7 @@ function tr({
3273
3263
  N.preventDefault(), (V = (S = N.currentTarget) == null ? void 0 : S.querySelector('input[type="text"]')) == null || V.focus();
3274
3264
  },
3275
3265
  children: /* @__PURE__ */ t(
3276
- Ut,
3266
+ jt,
3277
3267
  {
3278
3268
  records: s.displayRecords,
3279
3269
  selectedIdentities: m,
@@ -3300,37 +3290,37 @@ function nr({
3300
3290
  onChange: d,
3301
3291
  className: c
3302
3292
  }) {
3303
- const i = Wn(), s = Kn(), m = n === "between" || n === "not between", f = Jt(n), k = f ? a : void 0, y = P(() => {
3293
+ const i = Wn(), s = Kn(), m = n === "between" || n === "not between", f = Zt(n), k = f ? a : void 0, y = H(() => {
3304
3294
  if (!m || !a) return;
3305
3295
  const C = s(a);
3306
3296
  return {
3307
3297
  ...C,
3308
- tooltip: C.dates ? void 0 : en(a).dataAnchored ? Qn : Pn
3298
+ tooltip: C.dates ? void 0 : tn(a).dataAnchored ? Qn : Hn
3309
3299
  };
3310
- }, [m, a, s]), g = P(() => {
3300
+ }, [m, a, s]), g = H(() => {
3311
3301
  if (m) {
3312
3302
  if (y) {
3313
3303
  const { range: C } = y;
3314
3304
  return C ? { from: C.start, to: C.end } : void 0;
3315
3305
  }
3316
3306
  if (e && Array.isArray(e) && e.length === 2) {
3317
- const C = He(e[0], i, "start"), I = He(e[1], i, "end");
3318
- if (C && I)
3319
- return { from: C, to: I };
3307
+ const C = Pe(e[0], i, "start"), T = Pe(e[1], i, "end");
3308
+ if (C && T)
3309
+ return { from: C, to: T };
3320
3310
  }
3321
3311
  }
3322
- }, [e, m, y, i]), N = P(() => {
3312
+ }, [e, m, y, i]), N = H(() => {
3323
3313
  if (!e || m || o) return;
3324
3314
  const C = Array.isArray(e) ? e[0] : e;
3325
- return He(C, i, "start");
3315
+ return Pe(C, i, "start");
3326
3316
  }, [e, m, o, i]), S = (C) => n === "<=" || n === ">" ? xa(C, i) : ba(C, i);
3327
3317
  return /* @__PURE__ */ t(
3328
- Hn,
3318
+ Pn,
3329
3319
  {
3330
3320
  value: m ? g : void 0,
3331
3321
  selectionMode: m ? "range" : "single",
3332
3322
  singleValue: m ? void 0 : N,
3333
- singleValueLabel: !m && o ? jt : void 0,
3323
+ singleValueLabel: !m && o ? qt : void 0,
3334
3324
  onChange: (C) => {
3335
3325
  if (C != null && C.from && C.to) {
3336
3326
  d({ value: [C.from.toISOString(), C.to.toISOString()] });
@@ -3343,23 +3333,23 @@ function nr({
3343
3333
  d({ value: "" });
3344
3334
  return;
3345
3335
  }
3346
- const I = S(C), U = ga(I, n, {
3336
+ const T = S(C), G = ga(T, n, {
3347
3337
  timezone: i
3348
3338
  });
3349
- d({ value: typeof U == "string" ? U : U.toISOString() });
3339
+ d({ value: typeof G == "string" ? G : G.toISOString() });
3350
3340
  },
3351
- onRelativeSelect: f ? (C, I) => {
3341
+ onRelativeSelect: f ? (C, T) => {
3352
3342
  if (!C.from || !C.to) {
3353
3343
  d({ value: m ? [] : "" });
3354
3344
  return;
3355
3345
  }
3356
- const U = Xt(n, [
3346
+ const G = en(n, [
3357
3347
  C.from.toISOString(),
3358
3348
  C.to.toISOString()
3359
3349
  ]);
3360
3350
  d({
3361
- value: U.length === 1 ? U[0] : U,
3362
- relativeMeta: I
3351
+ value: G.length === 1 ? G[0] : G,
3352
+ relativeMeta: T
3363
3353
  });
3364
3354
  } : void 0,
3365
3355
  relativeValue: k,
@@ -3377,7 +3367,7 @@ function nr({
3377
3367
  }
3378
3368
  );
3379
3369
  }
3380
- const ar = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3370
+ const ar = (e) => e.conditions.length > 0 || e.groups.length > 0, ft = [
3381
3371
  "contains",
3382
3372
  "startsWith",
3383
3373
  "endsWith",
@@ -3390,7 +3380,7 @@ const ar = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3390
3380
  ">=",
3391
3381
  "<",
3392
3382
  "<=",
3393
- ...ht,
3383
+ ...ft,
3394
3384
  "in",
3395
3385
  "not in",
3396
3386
  "isNull",
@@ -3398,7 +3388,7 @@ const ar = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3398
3388
  ], sr = [
3399
3389
  "=",
3400
3390
  "!=",
3401
- ...ht,
3391
+ ...ft,
3402
3392
  "in",
3403
3393
  "not in",
3404
3394
  "isNull",
@@ -3444,7 +3434,7 @@ const ar = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3444
3434
  isNotNull: "Is not null",
3445
3435
  "not between": "Not between"
3446
3436
  };
3447
- function Ze(e) {
3437
+ function Je(e) {
3448
3438
  return dr[e] || va(e);
3449
3439
  }
3450
3440
  function cr(e) {
@@ -3461,7 +3451,7 @@ function cr(e) {
3461
3451
  return rr;
3462
3452
  }
3463
3453
  }
3464
- const un = "w-[68px] shrink-0", Ft = "group-data-[inline]/filters:w-auto group-data-[inline]/filters:min-w-0 group-data-[inline]/filters:flex-1 group-data-[inline]/filters:shrink", gt = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
3454
+ const un = "w-[68px] shrink-0", At = "group-data-[inline]/filters:w-auto group-data-[inline]/filters:min-w-0 group-data-[inline]/filters:flex-1 group-data-[inline]/filters:shrink", ht = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
3465
3455
  function mn({
3466
3456
  value: e,
3467
3457
  onValueChange: n,
@@ -3510,7 +3500,7 @@ function pn({
3510
3500
  transition: N,
3511
3501
  isDragging: S
3512
3502
  } = Gt({ id: e.id }), V = {
3513
- transform: Bt.Transform.toString(g),
3503
+ transform: Ut.Transform.toString(g),
3514
3504
  transition: N
3515
3505
  }, _ = qe(e.field.dataType), Q = e.operator === "isNull" || e.operator === "isNotNull", C = e.operator === "in" || e.operator === "not in";
3516
3506
  return /* @__PURE__ */ l(
@@ -3531,41 +3521,41 @@ function pn({
3531
3521
  ...k,
3532
3522
  "aria-label": "Drag to reorder condition",
3533
3523
  className: "flex h-7 w-5 shrink-0 cursor-grab items-center justify-center rounded-control text-muted-foreground/60 hover:text-foreground focus-visible:outline-none active:cursor-grabbing",
3534
- children: /* @__PURE__ */ t(Wt, { className: "h-3.5 w-3.5" })
3524
+ children: /* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" })
3535
3525
  }
3536
3526
  ),
3537
3527
  n > 0 ? /* @__PURE__ */ t(
3538
3528
  mn,
3539
3529
  {
3540
3530
  value: o,
3541
- onValueChange: (I) => d(a, I),
3531
+ onValueChange: (T) => d(a, T),
3542
3532
  "aria-label": "Logical operator"
3543
3533
  }
3544
- ) : /* @__PURE__ */ t("span", { className: q(un, "text-center", gt), children: "Where" }),
3534
+ ) : /* @__PURE__ */ t("span", { className: q(un, "text-center", ht), children: "Where" }),
3545
3535
  /* @__PURE__ */ t(
3546
- Xa,
3536
+ Za,
3547
3537
  {
3548
3538
  value: e.field,
3549
- onValueChange: (I) => {
3539
+ onValueChange: (T) => {
3550
3540
  m(
3551
3541
  a,
3552
3542
  e.id,
3553
- Ya(e, I)
3543
+ Ya(e, T)
3554
3544
  );
3555
3545
  },
3556
3546
  availableFields: c,
3557
3547
  placeholder: "Select field",
3558
- className: q("w-60 shrink-0", Ft)
3548
+ className: q("w-60 shrink-0", At)
3559
3549
  }
3560
3550
  ),
3561
3551
  /* @__PURE__ */ l(
3562
3552
  ge,
3563
3553
  {
3564
3554
  value: e.operator,
3565
- onValueChange: (I) => m(
3555
+ onValueChange: (T) => m(
3566
3556
  a,
3567
3557
  e.id,
3568
- Ha(e, I)
3558
+ Pa(e, T)
3569
3559
  ),
3570
3560
  children: [
3571
3561
  /* @__PURE__ */ t(
@@ -3573,11 +3563,11 @@ function pn({
3573
3563
  {
3574
3564
  size: "xs",
3575
3565
  "aria-label": "Operator",
3576
- className: q("w-40 shrink-0", Ft),
3577
- children: /* @__PURE__ */ t(be, { children: e.operator ? Ze(e.operator) : "" })
3566
+ className: q("w-40 shrink-0", At),
3567
+ children: /* @__PURE__ */ t(be, { children: e.operator ? Je(e.operator) : "" })
3578
3568
  }
3579
3569
  ),
3580
- /* @__PURE__ */ t(ve, { children: cr(_).map((I) => /* @__PURE__ */ t(re, { value: I, children: Ze(I) }, I)) })
3570
+ /* @__PURE__ */ t(ve, { children: cr(_).map((T) => /* @__PURE__ */ t(re, { value: T, children: Je(T) }, T)) })
3581
3571
  ]
3582
3572
  }
3583
3573
  ),
@@ -3586,23 +3576,23 @@ function pn({
3586
3576
  {
3587
3577
  field: e.field,
3588
3578
  source: i,
3589
- selected: Array.isArray(e.value) && e.value.every((I) => typeof I == "string") ? e.value : [],
3590
- onChange: (I) => s(a, e.id, {
3591
- value: I
3579
+ selected: Array.isArray(e.value) && e.value.every((T) => typeof T == "string") ? e.value : [],
3580
+ onChange: (T) => s(a, e.id, {
3581
+ value: T
3592
3582
  }),
3593
3583
  placeholder: "Select values…",
3594
3584
  className: "min-w-0 flex-1"
3595
3585
  }
3596
- ) : ht.includes(e.operator) ? /* @__PURE__ */ t(
3586
+ ) : ft.includes(e.operator) ? /* @__PURE__ */ t(
3597
3587
  Ne,
3598
3588
  {
3599
3589
  size: "xs",
3600
3590
  value: typeof e.value == "string" ? e.value : "",
3601
- onChange: (I) => s(a, e.id, {
3602
- value: I.target.value
3591
+ onChange: (T) => s(a, e.id, {
3592
+ value: T.target.value
3603
3593
  }),
3604
3594
  className: "min-w-0 flex-1",
3605
- placeholder: `${Ze(e.operator)}…`
3595
+ placeholder: `${Je(e.operator)}…`
3606
3596
  }
3607
3597
  ) : /* @__PURE__ */ t(
3608
3598
  tr,
@@ -3610,7 +3600,7 @@ function pn({
3610
3600
  field: e.field,
3611
3601
  source: i,
3612
3602
  value: typeof e.value == "string" ? e.value : "",
3613
- onChange: (I) => s(a, e.id, { value: I }),
3603
+ onChange: (T) => s(a, e.id, { value: T }),
3614
3604
  placeholder: "Select value…",
3615
3605
  className: "min-w-0 flex-1"
3616
3606
  }
@@ -3618,8 +3608,8 @@ function pn({
3618
3608
  ge,
3619
3609
  {
3620
3610
  value: typeof e.value == "boolean" ? String(e.value) : "",
3621
- onValueChange: (I) => s(a, e.id, {
3622
- value: I === "true"
3611
+ onValueChange: (T) => s(a, e.id, {
3612
+ value: T === "true"
3623
3613
  }),
3624
3614
  children: [
3625
3615
  /* @__PURE__ */ t(xe, { size: "xs", className: "min-w-0 flex-1", children: /* @__PURE__ */ t(be, { placeholder: "Select value…" }) }),
@@ -3639,13 +3629,13 @@ function pn({
3639
3629
  {
3640
3630
  value: e.value,
3641
3631
  operator: e.operator,
3642
- relativeMeta: Zt(e.relativeMeta),
3632
+ relativeMeta: Xt(e.relativeMeta),
3643
3633
  latestValue: e.latestValue === !0,
3644
3634
  field: e.field,
3645
- onChange: (I) => m(
3635
+ onChange: (T) => m(
3646
3636
  a,
3647
3637
  e.id,
3648
- ft(e, I)
3638
+ pt(e, T)
3649
3639
  ),
3650
3640
  className: "min-w-0 flex-1"
3651
3641
  }
@@ -3655,15 +3645,15 @@ function pn({
3655
3645
  {
3656
3646
  size: "xs",
3657
3647
  value: typeof e.value == "string" || typeof e.value == "number" ? e.value : "",
3658
- onChange: (I) => s(a, e.id, {
3659
- value: I.target.value
3648
+ onChange: (T) => s(a, e.id, {
3649
+ value: T.target.value
3660
3650
  }),
3661
3651
  className: "min-w-0 flex-1",
3662
3652
  placeholder: C ? "value1, value2, value3" : "Value"
3663
3653
  }
3664
3654
  ),
3665
3655
  /* @__PURE__ */ t(
3666
- G,
3656
+ U,
3667
3657
  {
3668
3658
  variant: "ghost",
3669
3659
  size: "xs",
@@ -3677,19 +3667,19 @@ function pn({
3677
3667
  }
3678
3668
  );
3679
3669
  }
3680
- const Ot = "group-data-[inline]/filters:h-auto group-data-[inline]/filters:gap-1 group-data-[inline]/filters:border-0 group-data-[inline]/filters:bg-transparent group-data-[inline]/filters:px-0 group-data-[inline]/filters:py-0.5 group-data-[inline]/filters:text-[11px] group-data-[inline]/filters:font-medium group-data-[inline]/filters:text-muted-foreground group-data-[inline]/filters:shadow-none group-data-[inline]/filters:underline-offset-2 group-data-[inline]/filters:hover:bg-transparent group-data-[inline]/filters:hover:text-foreground group-data-[inline]/filters:hover:underline";
3670
+ const Ft = "group-data-[inline]/filters:h-auto group-data-[inline]/filters:gap-1 group-data-[inline]/filters:border-0 group-data-[inline]/filters:bg-transparent group-data-[inline]/filters:px-0 group-data-[inline]/filters:py-0.5 group-data-[inline]/filters:text-[11px] group-data-[inline]/filters:font-medium group-data-[inline]/filters:text-muted-foreground group-data-[inline]/filters:shadow-none group-data-[inline]/filters:underline-offset-2 group-data-[inline]/filters:hover:bg-transparent group-data-[inline]/filters:hover:text-foreground group-data-[inline]/filters:hover:underline";
3681
3671
  function fn({
3682
3672
  onAddCondition: e,
3683
3673
  onAddGroup: n
3684
3674
  }) {
3685
3675
  return /* @__PURE__ */ l("div", { className: "mt-2 flex items-center gap-1.5 group-data-[inline]/filters:mt-1 group-data-[inline]/filters:gap-3", children: [
3686
3676
  /* @__PURE__ */ l(
3687
- G,
3677
+ U,
3688
3678
  {
3689
3679
  type: "button",
3690
3680
  size: "xs",
3691
3681
  variant: "outline",
3692
- className: q("gap-1.5", Ot),
3682
+ className: q("gap-1.5", Ft),
3693
3683
  onClick: e,
3694
3684
  children: [
3695
3685
  /* @__PURE__ */ t(Ve, { className: "h-3 w-3" }),
@@ -3698,12 +3688,12 @@ function fn({
3698
3688
  }
3699
3689
  ),
3700
3690
  n && /* @__PURE__ */ l(
3701
- G,
3691
+ U,
3702
3692
  {
3703
3693
  type: "button",
3704
3694
  size: "xs",
3705
3695
  variant: "ghost",
3706
- className: q("gap-1.5 text-muted-foreground hover:text-foreground", Ot),
3696
+ className: q("gap-1.5 text-muted-foreground hover:text-foreground", Ft),
3707
3697
  onClick: n,
3708
3698
  children: [
3709
3699
  /* @__PURE__ */ t(Ve, { className: "h-3 w-3" }),
@@ -3736,11 +3726,11 @@ function ur({
3736
3726
  listeners: _,
3737
3727
  setNodeRef: Q,
3738
3728
  transform: C,
3739
- transition: I,
3740
- isDragging: U
3741
- } = Gt({ id: e.id }), X = {
3742
- transform: Bt.Transform.toString(C),
3743
- transition: I
3729
+ transition: T,
3730
+ isDragging: G
3731
+ } = Gt({ id: e.id }), Z = {
3732
+ transform: Ut.Transform.toString(C),
3733
+ transition: T
3744
3734
  }, p = ($) => {
3745
3735
  const { active: D, over: v } = $;
3746
3736
  if (v && D.id !== v.id) {
@@ -3751,7 +3741,7 @@ function ur({
3751
3741
  );
3752
3742
  h !== -1 && E !== -1 && i(e.id, h, E);
3753
3743
  }
3754
- }, T = ($) => {
3744
+ }, I = ($) => {
3755
3745
  const { active: D, over: v } = $;
3756
3746
  if (v && D.id !== v.id && a) {
3757
3747
  const h = e.groups.findIndex((w) => w.id === D.id), E = e.groups.findIndex((w) => w.id === v.id);
@@ -3762,10 +3752,10 @@ function ur({
3762
3752
  "div",
3763
3753
  {
3764
3754
  ref: Q,
3765
- style: X,
3755
+ style: Z,
3766
3756
  className: q(
3767
3757
  n > 0 && "mt-2 overflow-hidden rounded-[6px] border border-border/60",
3768
- U && "z-50 opacity-50"
3758
+ G && "z-50 opacity-50"
3769
3759
  ),
3770
3760
  children: [
3771
3761
  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: [
@@ -3778,11 +3768,11 @@ function ur({
3778
3768
  ..._,
3779
3769
  "aria-label": "Drag to reorder group",
3780
3770
  className: "flex h-7 w-5 shrink-0 cursor-grab items-center justify-center rounded-control text-muted-foreground/60 hover:text-foreground focus-visible:outline-none active:cursor-grabbing",
3781
- children: /* @__PURE__ */ t(Wt, { className: "h-3.5 w-3.5" })
3771
+ children: /* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" })
3782
3772
  }
3783
3773
  ),
3784
3774
  /* @__PURE__ */ t(
3785
- G,
3775
+ U,
3786
3776
  {
3787
3777
  type: "button",
3788
3778
  variant: e.negate ? "default" : "outline",
@@ -3801,10 +3791,10 @@ function ur({
3801
3791
  "aria-label": "Group logical operator"
3802
3792
  }
3803
3793
  ),
3804
- /* @__PURE__ */ t("span", { className: gt, children: "Group" })
3794
+ /* @__PURE__ */ t("span", { className: ht, children: "Group" })
3805
3795
  ] }),
3806
3796
  /* @__PURE__ */ t(
3807
- G,
3797
+ U,
3808
3798
  {
3809
3799
  type: "button",
3810
3800
  variant: "ghost",
@@ -3812,7 +3802,7 @@ function ur({
3812
3802
  "aria-label": "Remove group",
3813
3803
  className: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground",
3814
3804
  onClick: () => a && d(a, e.id),
3815
- children: /* @__PURE__ */ t(zt, { className: "h-3.5 w-3.5" })
3805
+ children: /* @__PURE__ */ t(Et, { className: "h-3.5 w-3.5" })
3816
3806
  }
3817
3807
  )
3818
3808
  ] }),
@@ -3820,10 +3810,10 @@ function ur({
3820
3810
  /* @__PURE__ */ t(
3821
3811
  Re,
3822
3812
  {
3823
- sensors: Je(
3813
+ sensors: Xe(
3824
3814
  he(tt),
3825
3815
  he(et, {
3826
- coordinateGetter: Xe
3816
+ coordinateGetter: Ze
3827
3817
  })
3828
3818
  ),
3829
3819
  collisionDetection: Ee,
@@ -3856,14 +3846,14 @@ function ur({
3856
3846
  /* @__PURE__ */ t(
3857
3847
  Re,
3858
3848
  {
3859
- sensors: Je(
3849
+ sensors: Xe(
3860
3850
  he(tt),
3861
3851
  he(et, {
3862
- coordinateGetter: Xe
3852
+ coordinateGetter: Ze
3863
3853
  })
3864
3854
  ),
3865
3855
  collisionDetection: Ee,
3866
- onDragEnd: T,
3856
+ onDragEnd: I,
3867
3857
  children: /* @__PURE__ */ t(
3868
3858
  ze,
3869
3859
  {
@@ -3911,23 +3901,23 @@ function Or({
3911
3901
  updateGroupOperator: _,
3912
3902
  updateGroupNegate: Q,
3913
3903
  reorderConditions: C,
3914
- reorderGroups: I,
3915
- generateSQLPreview: U,
3916
- hasAnyFilters: X
3917
- } = Za({
3904
+ reorderGroups: T,
3905
+ generateSQLPreview: G,
3906
+ hasAnyFilters: Z
3907
+ } = Ja({
3918
3908
  initialFilters: e,
3919
3909
  availableFields: n,
3920
3910
  ...c ? {
3921
3911
  onChange: (h) => c(ar(h) ? h : null)
3922
3912
  } : {}
3923
- }), p = Je(
3913
+ }), p = Xe(
3924
3914
  he(tt),
3925
3915
  he(et, {
3926
- coordinateGetter: Xe
3916
+ coordinateGetter: Ze
3927
3917
  })
3928
- ), [T, $] = Y(!1), D = (h, E = 0, w) => {
3918
+ ), [I, $] = Y(!1), D = (h, E = 0, w) => {
3929
3919
  if (E === 0) {
3930
- const H = h.conditions.length === 0 && h.groups.length === 0;
3920
+ const P = h.conditions.length === 0 && h.groups.length === 0;
3931
3921
  return /* @__PURE__ */ l("div", { children: [
3932
3922
  /* @__PURE__ */ t(
3933
3923
  Re,
@@ -3983,7 +3973,7 @@ function Or({
3983
3973
  ), ee = h.groups.findIndex(
3984
3974
  (te) => te.id === B.id
3985
3975
  );
3986
- j !== -1 && ee !== -1 && I(h.id, j, ee);
3976
+ j !== -1 && ee !== -1 && T(h.id, j, ee);
3987
3977
  }
3988
3978
  },
3989
3979
  children: /* @__PURE__ */ t(
@@ -3998,7 +3988,7 @@ function Or({
3998
3988
  )
3999
3989
  }
4000
3990
  ),
4001
- H && !i && /* @__PURE__ */ t("p", { className: "rounded-control border border-dashed border-border/60 px-3 py-2 text-center text-[11.5px] text-muted-foreground", children: "No filters yet. Add a condition to limit the rows this card shows." }),
3991
+ P && !i && /* @__PURE__ */ t("p", { className: "rounded-control border border-dashed border-border/60 px-3 py-2 text-center text-[11.5px] text-muted-foreground", children: "No filters yet. Add a condition to limit the rows this card shows." }),
4002
3992
  /* @__PURE__ */ t(
4003
3993
  fn,
4004
3994
  {
@@ -4006,7 +3996,7 @@ function Or({
4006
3996
  onAddGroup: (
4007
3997
  // In place, grouping is offered once there are two conditions to group,
4008
3998
  // not as a mode to switch on first.
4009
- (i ? h.conditions.length + h.groups.length >= 2 : T) ? () => y(h.id) : void 0
3999
+ (i ? h.conditions.length + h.groups.length >= 2 : I) ? () => y(h.id) : void 0
4010
4000
  )
4011
4001
  }
4012
4002
  )
@@ -4023,7 +4013,7 @@ function Or({
4023
4013
  onRemoveGroup: N,
4024
4014
  onRemoveCondition: g,
4025
4015
  onReorderConditions: C,
4026
- onReorderGroups: I,
4016
+ onReorderGroups: T,
4027
4017
  onAddCondition: k,
4028
4018
  onAddGroup: y,
4029
4019
  availableFields: m,
@@ -4047,7 +4037,7 @@ function Or({
4047
4037
  {
4048
4038
  size: "xs",
4049
4039
  id: "advanced-mode",
4050
- checked: T,
4040
+ checked: I,
4051
4041
  onCheckedChange: (h) => $(h)
4052
4042
  }
4053
4043
  ),
@@ -4061,14 +4051,14 @@ function Or({
4061
4051
  ),
4062
4052
  /* @__PURE__ */ t("span", { className: "text-[11px] text-muted-foreground", children: "Nest conditions in groups" })
4063
4053
  ] }),
4064
- X && !i && /* @__PURE__ */ l("div", { className: "mt-3 border-t border-border/60 pt-3", children: [
4065
- /* @__PURE__ */ t("div", { className: q("mb-1.5", gt), children: "Where clause" }),
4066
- /* @__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: U(s) })
4054
+ Z && !i && /* @__PURE__ */ l("div", { className: "mt-3 border-t border-border/60 pt-3", children: [
4055
+ /* @__PURE__ */ t("div", { className: q("mb-1.5", ht), children: "Where clause" }),
4056
+ /* @__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: G(s) })
4067
4057
  ] })
4068
4058
  ] }),
4069
4059
  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: [
4070
4060
  /* @__PURE__ */ t("div", { children: v > 0 && /* @__PURE__ */ t(
4071
- G,
4061
+ U,
4072
4062
  {
4073
4063
  size: "xs",
4074
4064
  variant: "ghost",
@@ -4078,12 +4068,12 @@ function Or({
4078
4068
  }
4079
4069
  ) }),
4080
4070
  /* @__PURE__ */ l("div", { className: "flex items-center gap-1.5", children: [
4081
- /* @__PURE__ */ t(G, { size: "xs", variant: "ghost", onClick: () => d == null ? void 0 : d(), children: "Cancel" }),
4071
+ /* @__PURE__ */ t(U, { size: "xs", variant: "ghost", onClick: () => d == null ? void 0 : d(), children: "Cancel" }),
4082
4072
  /* @__PURE__ */ t(
4083
- G,
4073
+ U,
4084
4074
  {
4085
4075
  size: "xs",
4086
- onClick: () => o == null ? void 0 : o(X ? s : null),
4076
+ onClick: () => o == null ? void 0 : o(Z ? s : null),
4087
4077
  children: "Apply filters"
4088
4078
  }
4089
4079
  )
@@ -4092,17 +4082,16 @@ function Or({
4092
4082
  ] });
4093
4083
  }
4094
4084
  export {
4095
- Tr as A,
4085
+ Ir as A,
4096
4086
  Ar as C,
4097
- Ir as F,
4098
- Ga as I,
4087
+ Tr as F,
4088
+ Ua as I,
4099
4089
  Sa as L,
4100
4090
  $r as V,
4101
4091
  Lr as a,
4102
4092
  Or as b,
4103
- nn as c,
4093
+ an as c,
4104
4094
  Ba as d,
4105
4095
  qa as g,
4106
- an as i,
4107
4096
  Fr as u
4108
4097
  };