react-semaphor 0.1.418 → 0.1.420

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 (51) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +2 -2
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +2 -2
  5. package/dist/chunks/{analyze-result-contract-Akysi2ML.js → analyze-result-contract-DdhEt99q.js} +46 -45
  6. package/dist/chunks/{analyze-result-contract-COjyJzYm.js → analyze-result-contract-DwRzl7yJ.js} +1 -1
  7. package/dist/chunks/{calendar-preferences-dialog-BbuLgela.js → calendar-preferences-dialog-DIfAbE_y.js} +3 -3
  8. package/dist/chunks/{calendar-preferences-dialog-CInkkhl_.js → calendar-preferences-dialog-f0Z7Kf-U.js} +1 -1
  9. package/dist/chunks/{dashboard-briefing-launcher-B4OWNsVD.js → dashboard-briefing-launcher-C3tNkGFG.js} +1 -1
  10. package/dist/chunks/{dashboard-briefing-launcher-D7FNuDuc.js → dashboard-briefing-launcher-anh-Jy5v.js} +4 -4
  11. package/dist/chunks/{dashboard-controls-DcX7Mid4.js → dashboard-controls-8dCQaPaq.js} +5 -5
  12. package/dist/chunks/{dashboard-controls-DTC1eCz0.js → dashboard-controls-DQxlOxzy.js} +1 -1
  13. package/dist/chunks/{dashboard-json-vu38P5pV.js → dashboard-json-B309EInF.js} +1 -1
  14. package/dist/chunks/{dashboard-json-BHWbQS6I.js → dashboard-json-i7Ae9KGD.js} +3 -3
  15. package/dist/chunks/{edit-dashboard-visual-CkBhJBhp.js → edit-dashboard-visual-4HycwBHR.js} +1 -1
  16. package/dist/chunks/{edit-dashboard-visual-DsCr90_3.js → edit-dashboard-visual-z3IqzYnj.js} +4 -4
  17. package/dist/chunks/{index-C56DuHI8.js → index-B6DLEXRX.js} +5 -5
  18. package/dist/chunks/{index-C8thRvkW.js → index-yxKWKFdr.js} +2 -2
  19. package/dist/chunks/{switch-Dsx-IwBE.js → switch-COWQU8aK.js} +1 -1
  20. package/dist/chunks/{switch-BXuyni6l.js → switch-D6Ygf3wA.js} +1 -1
  21. package/dist/chunks/{update-policy-B5S_LfEu.js → update-policy-BzT2k4n6.js} +1 -1
  22. package/dist/chunks/{update-policy-BqBKUk3Q.js → update-policy-VloD-0YM.js} +1 -1
  23. package/dist/chunks/{use-create-flow-overlay-state-CzftV84t.js → use-create-flow-overlay-state-CX0D-6HM.js} +3 -3
  24. package/dist/chunks/{use-create-flow-overlay-state-BDv_VpL6.js → use-create-flow-overlay-state-DENfd7sW.js} +1 -1
  25. package/dist/chunks/{validators-CPFcUMrV.js → validators-BMQo93Y0.js} +1 -1
  26. package/dist/chunks/{validators-CLzrE2N_.js → validators-Cxr9qbrR.js} +1 -1
  27. package/dist/dashboard/index.cjs +1 -1
  28. package/dist/dashboard/index.js +1 -1
  29. package/dist/dashboard-authoring/index.cjs +1 -1
  30. package/dist/dashboard-authoring/index.js +2 -2
  31. package/dist/data-app-builder/index.cjs +1 -1
  32. package/dist/data-app-builder/index.js +2 -2
  33. package/dist/data-app-codegen/index.cjs +1 -1
  34. package/dist/data-app-codegen/index.js +2 -2
  35. package/dist/data-app-codegen-node/index.cjs +123 -92
  36. package/dist/data-app-codegen-node/index.js +461 -422
  37. package/dist/data-app-sdk/index.cjs +2 -2
  38. package/dist/data-app-sdk/index.js +230 -219
  39. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  40. package/dist/data-app-sdk-adapters/index.js +1 -1
  41. package/dist/data-app-sdk-validation/index.cjs +1 -1
  42. package/dist/data-app-sdk-validation/index.js +2 -2
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.js +7 -7
  45. package/dist/surfboard/index.cjs +1 -1
  46. package/dist/surfboard/index.js +2 -2
  47. package/dist/types/analytics-protocol.d.ts +4 -0
  48. package/dist/types/dashboard-assistant.d.ts +1 -0
  49. package/dist/types/data-app-sdk-validation.d.ts +1 -0
  50. package/dist/types/data-app-sdk.d.ts +3 -0
  51. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { toSemaphorInputSnapshots as Pr, toSemaphorInputBinding as zr, toSemaphorActiveInputSnapshots as X, toSemaphorMatrixIntent as Fr, toSemaphorSqlIntent as Mr, toSemaphorInputOptionsIntent as jr, toSemaphorRecordsIntent as Hr, toSemaphorAnalysisQueryOptions as Vr, toSemaphorAnalysisIntent as Qr, toSemaphorMetricIntent as Ur, hasSemaphorInputValue as ue, normalizeSemaphorInputOptions as gr, toSemaphorInputSpec as mr } from "../data-app-sdk-adapters/index.js";
1
+ import { toSemaphorInputSnapshots as Pr, toSemaphorInputBinding as Fr, toSemaphorActiveInputSnapshots as X, toSemaphorMatrixIntent as zr, toSemaphorSqlIntent as Mr, toSemaphorInputOptionsIntent as jr, toSemaphorRecordsIntent as Hr, toSemaphorAnalysisQueryOptions as Vr, toSemaphorAnalysisIntent as Qr, toSemaphorMetricIntent as Ur, hasSemaphorInputValue as ue, normalizeSemaphorInputOptions as gr, toSemaphorInputSpec as mr } from "../data-app-sdk-adapters/index.js";
2
2
  import { jsxs as p, Fragment as yr, jsx as a } from "react/jsx-runtime";
3
- import { createContext as Ie, useContext as Q, useState as F, useRef as E, useEffect as B, useMemo as I, Fragment as Gr, useId as hr, useCallback as O, useReducer as Jr } from "react";
4
- import { H as Yr, K as Xr } from "../chunks/analyze-result-contract-Akysi2ML.js";
5
- import { L as ro } from "../chunks/analyze-result-contract-Akysi2ML.js";
3
+ import { createContext as Ie, useContext as Q, useState as z, useRef as E, useEffect as B, useMemo as I, Fragment as Gr, useId as hr, useCallback as O, useReducer as Jr } from "react";
4
+ import { H as Yr, K as Xr } from "../chunks/analyze-result-contract-DdhEt99q.js";
5
+ import { L as ro } from "../chunks/analyze-result-contract-DdhEt99q.js";
6
6
  import { M as Zr, a as et, S as rt, E as tt, C as nt } from "../chunks/search-BHsQIWBV.js";
7
7
  import { X as it, C as ot, j as st } from "../chunks/x-CXDkqdur.js";
8
- import { b as at } from "../chunks/validators-CLzrE2N_.js";
8
+ import { b as at } from "../chunks/validators-Cxr9qbrR.js";
9
9
  function me(e, r, t = {}) {
10
10
  return {
11
11
  ...t,
@@ -57,7 +57,7 @@ const Hi = {
57
57
  bindInput(e, r) {
58
58
  return {
59
59
  toAnalyticsInput() {
60
- const [t] = Pr([e]), n = zr({
60
+ const [t] = Pr([e]), n = Fr({
61
61
  ...r,
62
62
  inputId: r.inputId || t.inputId
63
63
  });
@@ -130,12 +130,12 @@ const Hi = {
130
130
  };
131
131
  }
132
132
  }, ce = 10, _e = 8;
133
- function dt(e) {
133
+ function lt(e) {
134
134
  const r = e == null ? void 0 : e.result;
135
135
  if (r)
136
136
  switch (r.kind) {
137
137
  case "records":
138
- return de({
138
+ return le({
139
139
  title: "Records",
140
140
  rowNoun: "rows",
141
141
  records: r.records,
@@ -143,7 +143,7 @@ function dt(e) {
143
143
  rowCount: r.rowCount
144
144
  });
145
145
  case "sql":
146
- return de({
146
+ return le({
147
147
  title: "SQL Rows",
148
148
  rowNoun: "rows",
149
149
  records: r.records,
@@ -151,7 +151,7 @@ function dt(e) {
151
151
  rowCount: r.rowCount
152
152
  });
153
153
  case "inputOptions":
154
- return de({
154
+ return le({
155
155
  title: "Options",
156
156
  rowNoun: "options",
157
157
  records: r.options.slice(0, ce).map((t) => {
@@ -173,7 +173,7 @@ function dt(e) {
173
173
  });
174
174
  case "metric": {
175
175
  const t = [
176
- { metric: "value", value: r.value }
176
+ { metric: "primaryValue", value: r.primaryValue }
177
177
  ];
178
178
  return r.comparison && t.push(
179
179
  {
@@ -182,7 +182,7 @@ function dt(e) {
182
182
  },
183
183
  { metric: "delta", value: r.comparison.delta },
184
184
  { metric: "deltaPercent", value: r.comparison.deltaPercent }
185
- ), de({
185
+ ), le({
186
186
  title: "Metric",
187
187
  rowNoun: "values",
188
188
  records: t,
@@ -194,7 +194,7 @@ function dt(e) {
194
194
  });
195
195
  }
196
196
  case "matrix":
197
- return de({
197
+ return le({
198
198
  title: "Matrix Cells",
199
199
  rowNoun: "cells",
200
200
  records: r.cells.slice(0, ce).map((t) => {
@@ -220,14 +220,14 @@ function dt(e) {
220
220
  return ut(r);
221
221
  }
222
222
  }
223
- function de({
223
+ function le({
224
224
  title: e,
225
225
  rowNoun: r,
226
226
  records: t,
227
227
  columns: n,
228
228
  rowCount: i
229
229
  }) {
230
- const o = lt(n, t);
230
+ const o = dt(n, t);
231
231
  if (!o.length)
232
232
  return;
233
233
  const u = i ?? t.length, f = t.slice(0, ce);
@@ -240,7 +240,7 @@ function de({
240
240
  truncatedColumns: o.length > _e
241
241
  };
242
242
  }
243
- function lt(e, r) {
243
+ function dt(e, r) {
244
244
  if (e != null && e.length)
245
245
  return e.filter((n) => n.key).map((n) => ({
246
246
  key: n.key,
@@ -291,24 +291,24 @@ function Me(e) {
291
291
  (v = n == null ? void 0 : n.coverage) == null ? void 0 : v.missingObligations
292
292
  ), f = Ce(
293
293
  (g = n == null ? void 0 : n.coverage) == null ? void 0 : g.warnings
294
- ), l = [], c = xe(r);
295
- (t == null ? void 0 : t.status) === "error" && l.push({
294
+ ), d = [], c = xe(r);
295
+ (t == null ? void 0 : t.status) === "error" && d.push({
296
296
  trace: r,
297
297
  tone: "error",
298
298
  title: c,
299
299
  message: t.errorMessage || "Query attempt failed."
300
300
  });
301
301
  for (const h of r.clientWarnings)
302
- l.push({ trace: r, tone: "warning", title: c, message: h });
302
+ d.push({ trace: r, tone: "warning", title: c, message: h });
303
303
  for (const h of i)
304
- l.push({ trace: r, tone: "warning", title: c, ...h });
304
+ d.push({ trace: r, tone: "warning", title: c, ...h });
305
305
  for (const h of o)
306
- l.push({ trace: r, tone: "error", title: c, ...h });
306
+ d.push({ trace: r, tone: "error", title: c, ...h });
307
307
  for (const h of u)
308
- l.push({ trace: r, tone: "warning", title: c, message: h });
308
+ d.push({ trace: r, tone: "warning", title: c, message: h });
309
309
  for (const h of f)
310
- l.push({ trace: r, tone: "warning", title: c, ...h });
311
- return l;
310
+ d.push({ trace: r, tone: "warning", title: c, ...h });
311
+ return d;
312
312
  });
313
313
  }
314
314
  function mt(e) {
@@ -1558,7 +1558,7 @@ function $t({
1558
1558
  Cn,
1559
1559
  t,
1560
1560
  Rr
1561
- ), o = E(n), u = hr(), [f, l] = F({ open: !1 });
1561
+ ), o = E(n), u = hr(), [f, d] = z({ open: !1 });
1562
1562
  o.current = n, B(() => {
1563
1563
  i({ type: "config", config: t });
1564
1564
  }, [t]), B(() => {
@@ -1573,11 +1573,11 @@ function $t({
1573
1573
  };
1574
1574
  }, [u, n.enabled, n.exposeWindowBridge]);
1575
1575
  const c = I(() => ({ state: n, dispatch: i }), [n]), y = O((h) => {
1576
- l({ open: !0, focus: h });
1576
+ d({ open: !0, focus: h });
1577
1577
  }, []), m = O(() => {
1578
- l((h) => ({ ...h, open: !1 }));
1578
+ d((h) => ({ ...h, open: !1 }));
1579
1579
  }, []), v = O((h) => {
1580
- l({ open: !0, focus: h });
1580
+ d({ open: !0, focus: h });
1581
1581
  }, []), g = I(
1582
1582
  () => ({
1583
1583
  open: f.open,
@@ -1629,7 +1629,7 @@ function Bt({
1629
1629
  className: n,
1630
1630
  style: i
1631
1631
  } = {}) {
1632
- const o = qr(), u = Q(He), [f, l] = F(""), [c, y] = F(!1), m = E(null), v = E(null), g = u == null ? void 0 : u.openDevtools, h = u == null ? void 0 : u.closeDevtools, A = (u == null ? void 0 : u.open) === !0;
1632
+ const o = qr(), u = Q(He), [f, d] = z(""), [c, y] = z(!1), m = E(null), v = E(null), g = u == null ? void 0 : u.openDevtools, h = u == null ? void 0 : u.closeDevtools, A = (u == null ? void 0 : u.open) === !0;
1633
1633
  B(() => {
1634
1634
  wr();
1635
1635
  }, []), B(() => {
@@ -1646,13 +1646,13 @@ function Bt({
1646
1646
  document.removeEventListener("pointerdown", S, !0), document.removeEventListener("mousedown", S, !0), document.removeEventListener("click", S, !0);
1647
1647
  };
1648
1648
  }, [h, A]);
1649
- const d = I(
1649
+ const l = I(
1650
1650
  () => ht(o.queries),
1651
1651
  [o.queries]
1652
1652
  ), b = I(
1653
1653
  () => Me(o.queries),
1654
1654
  [o.queries]
1655
- ), K = tn(d), T = I(
1655
+ ), K = tn(l), T = I(
1656
1656
  () => nn(o.queries, f),
1657
1657
  [o.queries, f]
1658
1658
  ), N = I(
@@ -1674,7 +1674,7 @@ function Bt({
1674
1674
  style: {
1675
1675
  ...s.launcher,
1676
1676
  ...xt(e),
1677
- ...qt(d.severity),
1677
+ ...qt(l.severity),
1678
1678
  ...i
1679
1679
  },
1680
1680
  onClick: () => {
@@ -1690,11 +1690,11 @@ function Bt({
1690
1690
  },
1691
1691
  children: [
1692
1692
  /* @__PURE__ */ a(Wt, {}),
1693
- /* @__PURE__ */ a("span", { style: s.launcherText, children: d.total }),
1694
- d.issueCount > 0 ? /* @__PURE__ */ p("span", { style: s.launcherIssueCount, children: [
1695
- d.issueCount,
1693
+ /* @__PURE__ */ a("span", { style: s.launcherText, children: l.total }),
1694
+ l.issueCount > 0 ? /* @__PURE__ */ p("span", { style: s.launcherIssueCount, children: [
1695
+ l.issueCount,
1696
1696
  " issue",
1697
- d.issueCount === 1 ? "" : "s"
1697
+ l.issueCount === 1 ? "" : "s"
1698
1698
  ] }) : null
1699
1699
  ]
1700
1700
  }
@@ -1717,17 +1717,17 @@ function Bt({
1717
1717
  /* @__PURE__ */ p("div", { style: s.panelTitleBlock, children: [
1718
1718
  /* @__PURE__ */ a("div", { style: s.panelTitle, children: "Semaphor Inspector" }),
1719
1719
  /* @__PURE__ */ p("div", { style: s.panelSubtitle, children: [
1720
- d.total,
1720
+ l.total,
1721
1721
  " queries · ",
1722
- d.loading,
1722
+ l.loading,
1723
1723
  " loading ·",
1724
1724
  " ",
1725
- d.failed,
1725
+ l.failed,
1726
1726
  " failed · ",
1727
- d.errorCount,
1727
+ l.errorCount,
1728
1728
  " errors ·",
1729
1729
  " ",
1730
- d.warningCount,
1730
+ l.warningCount,
1731
1731
  " warnings"
1732
1732
  ] })
1733
1733
  ] }),
@@ -1762,14 +1762,14 @@ function Bt({
1762
1762
  {
1763
1763
  "aria-label": "Search Semaphor traces",
1764
1764
  value: f,
1765
- onChange: (S) => l(S.currentTarget.value),
1765
+ onChange: (S) => d(S.currentTarget.value),
1766
1766
  placeholder: "Search traces",
1767
1767
  style: s.searchInput
1768
1768
  }
1769
1769
  )
1770
1770
  ] }),
1771
1771
  b.length ? /* @__PURE__ */ a(
1772
- zt,
1772
+ Ft,
1773
1773
  {
1774
1774
  issues: b,
1775
1775
  onSelect: (S) => u.focusTrace({
@@ -1802,7 +1802,7 @@ function Bt({
1802
1802
  ] }),
1803
1803
  S.traces.length ? S.traces.map((w) => {
1804
1804
  var ne;
1805
- const L = an(w, $), x = xe(w), D = kr(w), pe = Er(w), re = ln(w, x, pe), te = re.join(" · "), k = Tr(D), M = yt(b, w);
1805
+ const L = an(w, $), x = xe(w), D = kr(w), pe = Er(w), re = dn(w, x, pe), te = re.join(" · "), k = Tr(D), M = yt(b, w);
1806
1806
  return /* @__PURE__ */ p(
1807
1807
  "button",
1808
1808
  {
@@ -1819,7 +1819,7 @@ function Bt({
1819
1819
  }),
1820
1820
  children: [
1821
1821
  /* @__PURE__ */ p("span", { style: s.queryListItemHeader, children: [
1822
- /* @__PURE__ */ a(Ft, { status: (ne = w.latestAttempt) == null ? void 0 : ne.status }),
1822
+ /* @__PURE__ */ a(zt, { status: (ne = w.latestAttempt) == null ? void 0 : ne.status }),
1823
1823
  /* @__PURE__ */ a("span", { style: s.queryListTitle, title: x, children: x }),
1824
1824
  /* @__PURE__ */ a(
1825
1825
  "span",
@@ -1874,15 +1874,15 @@ function Qi({
1874
1874
  B(() => {
1875
1875
  wr();
1876
1876
  }, []);
1877
- const l = r || (f == null ? void 0 : f.id), c = I(
1877
+ const d = r || (f == null ? void 0 : f.id), c = I(
1878
1878
  () => sn(o.queries, {
1879
1879
  queryId: e,
1880
- viewId: l
1880
+ viewId: d
1881
1881
  }),
1882
1882
  [
1883
1883
  o.queries,
1884
1884
  e,
1885
- l
1885
+ d
1886
1886
  ]
1887
1887
  );
1888
1888
  if (!o.enabled || !u || !c)
@@ -1914,7 +1914,7 @@ function Qi({
1914
1914
  }
1915
1915
  function qr() {
1916
1916
  const e = Q(je);
1917
- return !e || !e.state.enabled ? Ir : le(e.state);
1917
+ return !e || !e.state.enabled ? Ir : de(e.state);
1918
1918
  }
1919
1919
  function Kt({
1920
1920
  spec: e,
@@ -1924,7 +1924,7 @@ function Kt({
1924
1924
  activeInputs: i,
1925
1925
  debug: o
1926
1926
  }) {
1927
- const u = Q(je), f = Q(Ve), l = !!(u != null && u.state.enabled), c = u == null ? void 0 : u.dispatch, y = Kn(e), m = pt(e), v = I(
1927
+ const u = Q(je), f = Q(Ve), d = !!(u != null && u.state.enabled), c = u == null ? void 0 : u.dispatch, y = Kn(e), m = pt(e), v = I(
1928
1928
  () => JSON.stringify(e),
1929
1929
  [e]
1930
1930
  ), g = I(
@@ -1933,8 +1933,8 @@ function Kt({
1933
1933
  ), h = I(
1934
1934
  () => JSON.stringify(n || null),
1935
1935
  [n]
1936
- ), A = E(e), d = E(v), b = E(n), K = E(h), T = E(i), N = E(g), $ = Bn(o), S = JSON.stringify($ || []), w = E($), L = E(S);
1937
- d.current !== v && (d.current = v, A.current = e), K.current !== h && (K.current = h, b.current = n), N.current !== g && (N.current = g, T.current = i), L.current !== S && (L.current = S, w.current = $);
1936
+ ), A = E(e), l = E(v), b = E(n), K = E(h), T = E(i), N = E(g), $ = Bn(o), S = JSON.stringify($ || []), w = E($), L = E(S);
1937
+ l.current !== v && (l.current = v, A.current = e), K.current !== h && (K.current = h, b.current = n), N.current !== g && (N.current = g, T.current = i), L.current !== S && (L.current = S, w.current = $);
1938
1938
  const x = A.current, D = b.current, pe = T.current, re = w.current, te = hr(), k = I(
1939
1939
  () => y || `query_${Dr(t)}`,
1940
1940
  [t, y]
@@ -1979,16 +1979,16 @@ function Kt({
1979
1979
  ]
1980
1980
  );
1981
1981
  B(() => {
1982
- if (!(!l || !c))
1982
+ if (!(!d || !c))
1983
1983
  return c({ type: "register", descriptor: Ye }), () => {
1984
1984
  c({ type: "unregister", traceKey: j });
1985
1985
  };
1986
- }, [Ye, c, l, j]);
1986
+ }, [Ye, c, d, j]);
1987
1987
  const P = O(
1988
1988
  (C, U) => {
1989
- !l || !c || c({ type: "event", traceKey: j, event: C, latestAttempt: U });
1989
+ !d || !c || c({ type: "event", traceKey: j, event: C, latestAttempt: U });
1990
1990
  },
1991
- [c, l, j]
1991
+ [c, d, j]
1992
1992
  ), Xe = O(() => {
1993
1993
  P(
1994
1994
  {
@@ -2060,10 +2060,10 @@ function Kt({
2060
2060
  ge(C, 0);
2061
2061
  },
2062
2062
  [ge]
2063
- ), Te = l ? u == null ? void 0 : u.state.entries[j] : void 0;
2063
+ ), Te = d ? u == null ? void 0 : u.state.entries[j] : void 0;
2064
2064
  return I(
2065
2065
  () => ({
2066
- enabled: l,
2066
+ enabled: d,
2067
2067
  queryId: k,
2068
2068
  trace: Te ? ve(Te) : void 0,
2069
2069
  start: Xe,
@@ -2073,7 +2073,7 @@ function Kt({
2073
2073
  validationFailure: rr
2074
2074
  }),
2075
2075
  [
2076
- l,
2076
+ d,
2077
2077
  ge,
2078
2078
  er,
2079
2079
  k,
@@ -2114,7 +2114,7 @@ function _t({
2114
2114
  (w = t == null ? void 0 : t.coverage) == null ? void 0 : w.missingObligations
2115
2115
  ), u = $e(
2116
2116
  (L = t == null ? void 0 : t.coverage) == null ? void 0 : L.warnings
2117
- ), f = t == null ? void 0 : t.compiledQuery, l = Tn(t), c = ((x = e.server) == null ? void 0 : x.compiledSql) || l.compiledSql, y = dt(t), m = [
2117
+ ), f = t == null ? void 0 : t.compiledQuery, d = Tn(t), c = ((x = e.server) == null ? void 0 : x.compiledSql) || d.compiledSql, y = lt(t), m = [
2118
2118
  ...r != null && r.errorMessage ? [r.errorMessage] : [],
2119
2119
  ...i
2120
2120
  ], v = [
@@ -2122,7 +2122,7 @@ function _t({
2122
2122
  ...n,
2123
2123
  ...o,
2124
2124
  ...u
2125
- ], g = e.inputsApplied.length > 0, h = !!(f || c), A = pn(e), d = hn(r == null ? void 0 : r.rowCount), b = bn(r == null ? void 0 : r.durationMs), K = e.sourceRefs.length, T = kr(e), N = Tr(T);
2125
+ ], g = e.inputsApplied.length > 0, h = !!(f || c), A = pn(e), l = hn(r == null ? void 0 : r.rowCount), b = bn(r == null ? void 0 : r.durationMs), K = e.sourceRefs.length, T = kr(e), N = Tr(T);
2126
2126
  return /* @__PURE__ */ p("div", { style: s.detailsPane, children: [
2127
2127
  /* @__PURE__ */ p("div", { style: s.detailsHeader, children: [
2128
2128
  /* @__PURE__ */ p("div", { style: s.detailsHeaderTopRow, children: [
@@ -2152,7 +2152,7 @@ function _t({
2152
2152
  /* @__PURE__ */ a("span", { style: s.metaStripItem, children: A }),
2153
2153
  /* @__PURE__ */ a("span", { style: s.metaStripDot, children: "·" }),
2154
2154
  /* @__PURE__ */ p("span", { style: s.metaStripItem, children: [
2155
- d,
2155
+ l,
2156
2156
  " rows"
2157
2157
  ] }),
2158
2158
  /* @__PURE__ */ a("span", { style: s.metaStripDot, children: "·" }),
@@ -2219,22 +2219,22 @@ function Nt({
2219
2219
  label: "Raw",
2220
2220
  render: () => /* @__PURE__ */ a("pre", { style: s.codeBlock, children: vn(e) })
2221
2221
  });
2222
- const u = (A = o[0]) == null ? void 0 : A.id, f = e.traceId || `${e.viewId ?? ""}:${e.queryId}`, [l, c] = F(u), y = E(f), m = E(!1), v = o.map((d) => d.id).join("|");
2222
+ const u = (A = o[0]) == null ? void 0 : A.id, f = e.traceId || `${e.viewId ?? ""}:${e.queryId}`, [d, c] = z(u), y = E(f), m = E(!1), v = o.map((l) => l.id).join("|");
2223
2223
  B(() => {
2224
2224
  if (y.current !== f) {
2225
2225
  y.current = f, m.current = !1, c(u);
2226
2226
  return;
2227
2227
  }
2228
- if (!(l ? v.split("|").includes(l) : !1)) {
2228
+ if (!(d ? v.split("|").includes(d) : !1)) {
2229
2229
  m.current = !1, c(u);
2230
2230
  return;
2231
2231
  }
2232
- !m.current && l !== u && c(u);
2233
- }, [l, u, v, f]);
2234
- const g = o.find((d) => d.id === l) ?? o[0];
2232
+ !m.current && d !== u && c(u);
2233
+ }, [d, u, v, f]);
2234
+ const g = o.find((l) => l.id === d) ?? o[0];
2235
2235
  return /* @__PURE__ */ p("div", { style: s.traceTabs, children: [
2236
- /* @__PURE__ */ a("div", { style: s.traceTabBar, role: "tablist", "aria-label": "Trace details", children: o.map((d) => {
2237
- const b = d.id === g.id;
2236
+ /* @__PURE__ */ a("div", { style: s.traceTabBar, role: "tablist", "aria-label": "Trace details", children: o.map((l) => {
2237
+ const b = l.id === g.id;
2238
2238
  return /* @__PURE__ */ a(
2239
2239
  "button",
2240
2240
  {
@@ -2247,11 +2247,11 @@ function Nt({
2247
2247
  ...b ? s.traceTabActive : null
2248
2248
  },
2249
2249
  onClick: () => {
2250
- m.current = !0, c(d.id);
2250
+ m.current = !0, c(l.id);
2251
2251
  },
2252
- children: d.label
2252
+ children: l.label
2253
2253
  },
2254
- d.id
2254
+ l.id
2255
2255
  );
2256
2256
  }) }),
2257
2257
  /* @__PURE__ */ a("div", { style: s.traceTabPanel, role: "tabpanel", children: g.render() })
@@ -2276,11 +2276,11 @@ function or({
2276
2276
  t.length > 1 ? /* @__PURE__ */ a("ul", { style: s.alertCardList, children: t.map((i, o) => /* @__PURE__ */ a("li", { children: i }, `${e}-${o}`)) }) : /* @__PURE__ */ a("div", { children: t[0] })
2277
2277
  ] });
2278
2278
  }
2279
- function zt({
2279
+ function Ft({
2280
2280
  issues: e,
2281
2281
  onSelect: r
2282
2282
  }) {
2283
- const [t, n] = F(!1), i = e.slice(0, 6), o = e.length - i.length, u = e.filter((c) => c.tone === "error").length, f = e.length - u, l = [
2283
+ const [t, n] = z(!1), i = e.slice(0, 6), o = e.length - i.length, u = e.filter((c) => c.tone === "error").length, f = e.length - u, d = [
2284
2284
  u ? `${u} error${u === 1 ? "" : "s"}` : "",
2285
2285
  f ? `${f} warning${f === 1 ? "" : "s"}` : ""
2286
2286
  ].filter(Boolean);
@@ -2335,12 +2335,12 @@ function zt({
2335
2335
  " in traces"
2336
2336
  ] }) : null
2337
2337
  ] }) : /* @__PURE__ */ p("div", { style: s.issueSummaryCollapsed, children: [
2338
- l.join(" · "),
2338
+ d.join(" · "),
2339
2339
  " across traces"
2340
2340
  ] })
2341
2341
  ] });
2342
2342
  }
2343
- function Ft({
2343
+ function zt({
2344
2344
  status: e
2345
2345
  }) {
2346
2346
  return /* @__PURE__ */ a(
@@ -2373,7 +2373,13 @@ function Mt({
2373
2373
  ),
2374
2374
  /* @__PURE__ */ a(H, { title: "Identifiers", fields: n.identifiers }),
2375
2375
  /* @__PURE__ */ a(H, { title: "Other fields", fields: n.other }),
2376
- /* @__PURE__ */ a(H, { title: "Input bindings", fields: t })
2376
+ /* @__PURE__ */ a(
2377
+ H,
2378
+ {
2379
+ title: "Input bindings (Filters)",
2380
+ fields: t
2381
+ }
2382
+ )
2377
2383
  ] });
2378
2384
  }
2379
2385
  function jt({
@@ -2389,12 +2395,12 @@ function jt({
2389
2395
  {
2390
2396
  source: r
2391
2397
  },
2392
- `${z(r)}:${t}`
2398
+ `${F(r)}:${t}`
2393
2399
  )) })
2394
2400
  ] }) : null;
2395
2401
  }
2396
2402
  function Ht({ source: e }) {
2397
- const r = z(e);
2403
+ const r = F(e);
2398
2404
  return /* @__PURE__ */ p("span", { style: s.sourcePill, title: r, children: [
2399
2405
  /* @__PURE__ */ a("span", { style: s.sourcePillLabel, children: r }),
2400
2406
  /* @__PURE__ */ a("span", { style: s.sourcePillRole, children: e.kind })
@@ -2450,13 +2456,13 @@ function Ut({
2450
2456
  "div",
2451
2457
  {
2452
2458
  style: s.recipeFieldRow,
2453
- title: z(r),
2459
+ title: F(r),
2454
2460
  children: [
2455
- /* @__PURE__ */ a("span", { style: s.recipeFieldName, children: z(r) }),
2461
+ /* @__PURE__ */ a("span", { style: s.recipeFieldName, children: F(r) }),
2456
2462
  /* @__PURE__ */ a("span", { style: s.recipeFieldMeta, children: r.kind })
2457
2463
  ]
2458
2464
  },
2459
- `${z(r)}:${t}`
2465
+ `${F(r)}:${t}`
2460
2466
  )) }) : /* @__PURE__ */ a("div", { style: s.recipeEmptyText, children: "No sources captured" })
2461
2467
  ] });
2462
2468
  }
@@ -2484,7 +2490,7 @@ function Gt({
2484
2490
  field: e,
2485
2491
  groupTitle: r
2486
2492
  }) {
2487
- const t = gn(e), n = e.label || e.name, i = e.dataType && e.dataType !== "unknown" ? e.dataType : void 0, o = e.source ? z(e.source) : void 0, u = [t, i, o].filter(Boolean).join(" · "), f = Jt(e, r);
2493
+ const t = gn(e), n = e.label || e.name, i = e.dataType && e.dataType !== "unknown" ? e.dataType : void 0, o = e.source ? F(e.source) : void 0, u = [t, i, o].filter(Boolean).join(" · "), f = Jt(e, r);
2488
2494
  return /* @__PURE__ */ p(
2489
2495
  "div",
2490
2496
  {
@@ -2546,7 +2552,7 @@ function Yt({
2546
2552
  }) {
2547
2553
  return /* @__PURE__ */ p("div", { style: s.inputsAppliedBlock, children: [
2548
2554
  /* @__PURE__ */ p("div", { style: s.inputsAppliedHeader, children: [
2549
- /* @__PURE__ */ a("span", { style: s.inputsAppliedTitle, children: "Active Inputs" }),
2555
+ /* @__PURE__ */ a("span", { style: s.inputsAppliedTitle, children: "Active Inputs (Active Filters)" }),
2550
2556
  /* @__PURE__ */ a("span", { style: s.inputsAppliedCount, children: e.length })
2551
2557
  ] }),
2552
2558
  /* @__PURE__ */ a("div", { style: s.inputRecipeList, children: e.map((r) => {
@@ -2729,7 +2735,7 @@ function an(e, r) {
2729
2735
  function Ne(e) {
2730
2736
  return e.traceId;
2731
2737
  }
2732
- function dn(e) {
2738
+ function ln(e) {
2733
2739
  switch (e) {
2734
2740
  case "metric":
2735
2741
  return "metric";
@@ -2783,12 +2789,12 @@ function Cr(e) {
2783
2789
  };
2784
2790
  }
2785
2791
  }
2786
- function ln(e, r, t) {
2792
+ function dn(e, r, t) {
2787
2793
  const n = [];
2788
2794
  return e.queryLabel && e.queryLabel !== r && n.push(e.queryLabel), e.queryId && e.queryId !== r && e.queryId !== e.queryLabel ? n.push(e.queryId) : e.viewId && e.viewId !== r && e.viewId !== e.queryLabel && n.push(e.viewId), n.push(t), n;
2789
2795
  }
2790
2796
  function kr(e) {
2791
- return cn(e.visualType) || dn(e.queryKind);
2797
+ return cn(e.visualType) || ln(e.queryKind);
2792
2798
  }
2793
2799
  function un(e, r) {
2794
2800
  return r ? e.queryLabel || e.queryId : xe(e);
@@ -2798,7 +2804,7 @@ function cn(e) {
2798
2804
  return e.replace(/[_-]+/g, " ").replace(/\b\w/g, (r) => r.toUpperCase());
2799
2805
  }
2800
2806
  function Er(e) {
2801
- const r = e.sourceRefs.map(z);
2807
+ const r = e.sourceRefs.map(F);
2802
2808
  return r.length ? r.length === 1 ? r[0] : `${r[0]} + ${r.length - 1} more` : "No source";
2803
2809
  }
2804
2810
  function fn(e) {
@@ -2838,8 +2844,8 @@ function gn(e) {
2838
2844
  return [e.aggregate, e.label || e.name].filter(Boolean).join(" ");
2839
2845
  }
2840
2846
  function mn(e) {
2841
- var f, l, c;
2842
- const r = e.valuePreview || "redacted", t = e.inputLabel || e.inputId, n = ((f = e.fieldRef) == null ? void 0 : f.label) || ((l = e.fieldRef) == null ? void 0 : l.name), i = (c = e.fieldRef) != null && c.source ? z(e.fieldRef.source) : void 0, o = [n ? `on ${n}` : void 0, i].filter(Boolean).join(" · "), u = [
2847
+ var f, d, c;
2848
+ const r = e.valuePreview || "redacted", t = e.inputLabel || e.inputId, n = ((f = e.fieldRef) == null ? void 0 : f.label) || ((d = e.fieldRef) == null ? void 0 : d.name), i = (c = e.fieldRef) != null && c.source ? F(e.fieldRef.source) : void 0, o = [n ? `on ${n}` : void 0, i].filter(Boolean).join(" · "), u = [
2843
2849
  t,
2844
2850
  e.inputId,
2845
2851
  e.operator,
@@ -2855,7 +2861,7 @@ function mn(e) {
2855
2861
  title: u
2856
2862
  };
2857
2863
  }
2858
- function z(e) {
2864
+ function F(e) {
2859
2865
  return e.kind === "semantic" ? e.datasetName || e.datasetId || e.domainId : e.kind === "physical" ? [
2860
2866
  e.schemaName,
2861
2867
  e.tableName
@@ -3047,7 +3053,7 @@ function $n(e) {
3047
3053
  }
3048
3054
  function Lr(e) {
3049
3055
  var n;
3050
- const r = zn(e.spec), t = Fn(
3056
+ const r = Fn(e.spec), t = zn(
3051
3057
  e.spec,
3052
3058
  e.activeInputs
3053
3059
  );
@@ -3087,7 +3093,7 @@ function ve(e) {
3087
3093
  } = e;
3088
3094
  return o;
3089
3095
  }
3090
- function le(e) {
3096
+ function de(e) {
3091
3097
  if (!e.enabled)
3092
3098
  return Ir;
3093
3099
  const r = e.order.map((n) => e.entries[n]).filter((n) => !!n).map(ve), t = Me(r).map(mt);
@@ -3106,10 +3112,10 @@ function le(e) {
3106
3112
  }
3107
3113
  function Dn(e) {
3108
3114
  return {
3109
- snapshot: () => St(le(e())),
3110
- getQuery: (r) => nr(le(e()).getQuery(r)),
3111
- getQueries: (r) => le(e()).getQueries(r).map((t) => nr(t)).filter((t) => !!t),
3112
- getIssues: () => le(e()).issues
3115
+ snapshot: () => St(de(e())),
3116
+ getQuery: (r) => nr(de(e()).getQuery(r)),
3117
+ getQueries: (r) => de(e()).getQueries(r).map((t) => nr(t)).filter((t) => !!t),
3118
+ getIssues: () => de(e()).issues
3113
3119
  };
3114
3120
  }
3115
3121
  function On(e) {
@@ -3126,12 +3132,12 @@ function On(e) {
3126
3132
  } : {
3127
3133
  enabled: e.enabled !== !1,
3128
3134
  exposeWindowBridge: e.exposeWindowBridge === !0,
3129
- maxEventsPerQuery: dr(
3135
+ maxEventsPerQuery: lr(
3130
3136
  e.maxEventsPerQuery,
3131
3137
  Ee,
3132
3138
  Rt
3133
3139
  ),
3134
- maxQueries: dr(
3140
+ maxQueries: lr(
3135
3141
  e.maxQueries,
3136
3142
  Re,
3137
3143
  Lt
@@ -3163,7 +3169,7 @@ function he(e) {
3163
3169
  function ar(e) {
3164
3170
  return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
3165
3171
  }
3166
- function dr(e, r, t) {
3172
+ function lr(e, r, t) {
3167
3173
  return e === void 0 || !Number.isFinite(e) || !Number.isInteger(e) || e <= 0 ? r : Math.min(e, t);
3168
3174
  }
3169
3175
  function Kn(e) {
@@ -3201,14 +3207,14 @@ function _n(e) {
3201
3207
  ).map((n) => String(n));
3202
3208
  if (t.length === r.length && t.length > 0) {
3203
3209
  const n = t.slice(0, 3).join(", "), i = t.length > 3 ? `, +${t.length - 3} more` : "";
3204
- return lr(`${n}${i}`);
3210
+ return dr(`${n}${i}`);
3205
3211
  }
3206
3212
  return `${r.length} selected`;
3207
3213
  }
3208
- return typeof r == "number" || typeof r == "boolean" ? String(r) : typeof r == "string" ? lr(r) : r && typeof r == "object" ? `object(${Object.keys(r).slice(0, 5).join(",")})` : String(r);
3214
+ return typeof r == "number" || typeof r == "boolean" ? String(r) : typeof r == "string" ? dr(r) : r && typeof r == "object" ? `object(${Object.keys(r).slice(0, 5).join(",")})` : String(r);
3209
3215
  }
3210
3216
  }
3211
- function lr(e) {
3217
+ function dr(e) {
3212
3218
  return e.length > 80 ? `${e.slice(0, 77)}...` : e;
3213
3219
  }
3214
3220
  function Nn(e) {
@@ -3228,7 +3234,7 @@ function Pn(e) {
3228
3234
  jn(t) && r.push(t);
3229
3235
  }), Xr(r);
3230
3236
  }
3231
- function zn(e) {
3237
+ function Fn(e) {
3232
3238
  switch (e.queryKind) {
3233
3239
  case "metric":
3234
3240
  case "analysis":
@@ -3259,7 +3265,7 @@ function zn(e) {
3259
3265
  return qe(e);
3260
3266
  }
3261
3267
  }
3262
- function Fn(e, r) {
3268
+ function zn(e, r) {
3263
3269
  const t = [
3264
3270
  ...(e.inputs || []).map($r),
3265
3271
  ...(r || []).map((n) => n.field)
@@ -3509,9 +3515,9 @@ function Ge({
3509
3515
  return {
3510
3516
  records: e.map((o, u) => {
3511
3517
  const f = {};
3512
- return r.forEach((l) => {
3513
- if (Object.prototype.hasOwnProperty.call(o, l.key)) {
3514
- f[l.key] = o[l.key];
3518
+ return r.forEach((d) => {
3519
+ if (Object.prototype.hasOwnProperty.call(o, d.key)) {
3520
+ f[d.key] = o[d.key];
3515
3521
  return;
3516
3522
  }
3517
3523
  n.push({
@@ -3519,11 +3525,11 @@ function Ge({
3519
3525
  severity: "warning",
3520
3526
  resultSetKey: t,
3521
3527
  rowIndex: u,
3522
- columnKey: l.key,
3523
- ...l.name ? { columnName: l.name } : {},
3524
- ...l.label ? { columnLabel: l.label } : {},
3528
+ columnKey: d.key,
3529
+ ...d.name ? { columnName: d.name } : {},
3530
+ ...d.label ? { columnLabel: d.label } : {},
3525
3531
  availableKeys: Object.keys(o),
3526
- message: `Analysis result set "${t}" row ${u} is missing column key "${l.key}". Rows must expose values by column.key; labels and column names are display metadata only.`
3532
+ message: `Analysis result set "${t}" row ${u} is missing column key "${d.key}". Rows must expose values by column.key; labels and column names are display metadata only.`
3527
3533
  });
3528
3534
  }), f;
3529
3535
  }),
@@ -3564,18 +3570,21 @@ function si(e) {
3564
3570
  e.resultSetKey,
3565
3571
  e.rowIndex,
3566
3572
  e.columnKey
3567
- ].join(":") : ze(e);
3573
+ ].join(":") : Fe(e);
3568
3574
  }
3569
- function ze(e) {
3575
+ function Fe(e) {
3570
3576
  if (!e || typeof e != "object")
3571
3577
  return JSON.stringify(e);
3572
3578
  if (Array.isArray(e))
3573
- return `[${e.map((t) => ze(t)).join(",")}]`;
3579
+ return `[${e.map((t) => Fe(t)).join(",")}]`;
3574
3580
  const r = e;
3575
- return `{${Object.keys(r).sort().map((t) => `${JSON.stringify(t)}:${ze(r[t])}`).join(",")}}`;
3581
+ return `{${Object.keys(r).sort().map((t) => `${JSON.stringify(t)}:${Fe(r[t])}`).join(",")}}`;
3576
3582
  }
3577
- const Oe = { value: null }, Be = {}, ai = { records: [] }, Ke = { options: [] }, di = { records: [] }, We = {};
3578
- function li(e) {
3583
+ const Oe = {
3584
+ value: null,
3585
+ primaryValue: null
3586
+ }, Be = {}, ai = { records: [] }, Ke = { options: [] }, li = { records: [] }, We = {};
3587
+ function di(e) {
3579
3588
  const r = X(e.inputs), t = Vr(e);
3580
3589
  try {
3581
3590
  const n = Qr(e), i = ee(n, "analysis");
@@ -3693,7 +3702,7 @@ function fi(e) {
3693
3702
  }
3694
3703
  }
3695
3704
  function pi(e) {
3696
- const r = X(e.inputs), t = di;
3705
+ const r = X(e.inputs), t = li;
3697
3706
  try {
3698
3707
  const n = Mr(e), i = ee(n);
3699
3708
  return i ? {
@@ -3721,7 +3730,7 @@ function pi(e) {
3721
3730
  function gi(e) {
3722
3731
  const r = X(e.inputs);
3723
3732
  try {
3724
- const t = Fr(e), n = ee(t);
3733
+ const t = zr(e), n = ee(t);
3725
3734
  return n ? {
3726
3735
  error: n,
3727
3736
  activeInputs: r,
@@ -3744,7 +3753,7 @@ function gi(e) {
3744
3753
  };
3745
3754
  }
3746
3755
  }
3747
- function Fe(e) {
3756
+ function ze(e) {
3748
3757
  var o;
3749
3758
  if (mi(e))
3750
3759
  return e;
@@ -3761,7 +3770,7 @@ function Fe(e) {
3761
3770
  return i.name = (r == null ? void 0 : r.name) || i.name, i.stack = r == null ? void 0 : r.stack, i;
3762
3771
  }
3763
3772
  function Z(e, r) {
3764
- const t = Fe(e);
3773
+ const t = ze(e);
3765
3774
  if (t.executionResult || t.validation)
3766
3775
  return t;
3767
3776
  const n = {
@@ -4014,26 +4023,26 @@ function Ci() {
4014
4023
  return Q(Wr);
4015
4024
  }
4016
4025
  function Ui(e) {
4017
- const [r, t] = F(e.defaultValue), n = Object.prototype.hasOwnProperty.call(e, "value"), i = n ? e.value : r, o = I(
4026
+ const [r, t] = z(e.defaultValue), n = Object.prototype.hasOwnProperty.call(e, "value"), i = n ? e.value : r, o = I(
4018
4027
  () => gr(e.options),
4019
4028
  [e.options]
4020
4029
  ), u = O(
4021
- (l) => {
4030
+ (d) => {
4022
4031
  var y;
4023
- const c = l;
4032
+ const c = d;
4024
4033
  (y = e.onValueChange) == null || y.call(e, c), n || t(c);
4025
4034
  },
4026
4035
  [n, e]
4027
4036
  ), f = O(() => u(void 0), [u]);
4028
4037
  return I(() => {
4029
- const l = mr(e);
4038
+ const d = mr(e);
4030
4039
  return {
4031
4040
  id: e.id,
4032
4041
  kind: e.kind,
4033
4042
  label: e.label,
4034
- field: l.field,
4035
- operator: l.operator,
4036
- relationshipHint: l.relationshipHint,
4043
+ field: d.field,
4044
+ operator: d.operator,
4045
+ relationshipHint: d.relationshipHint,
4037
4046
  controlRole: e.kind === "control" ? e.role : void 0,
4038
4047
  value: i,
4039
4048
  options: o,
@@ -4041,21 +4050,21 @@ function Ui(e) {
4041
4050
  setValue: u,
4042
4051
  clear: f,
4043
4052
  toAnalyticsInput: () => ({
4044
- inputId: l.inputId,
4045
- field: l.field,
4053
+ inputId: d.inputId,
4054
+ field: d.field,
4046
4055
  kind: e.kind,
4047
4056
  label: e.label,
4048
4057
  value: i,
4049
4058
  isActive: ue(i),
4050
- operator: l.operator,
4051
- relationshipHint: l.relationshipHint,
4059
+ operator: d.operator,
4060
+ relationshipHint: d.relationshipHint,
4052
4061
  controlRole: e.kind === "control" ? e.role : void 0
4053
4062
  })
4054
4063
  };
4055
4064
  }, [f, o, u, e, i]);
4056
4065
  }
4057
4066
  function Gi(e) {
4058
- const [r, t] = F(() => Oi(e));
4067
+ const [r, t] = z(() => Oi(e));
4059
4068
  return B(() => {
4060
4069
  t((n) => {
4061
4070
  let i = n;
@@ -4074,7 +4083,7 @@ function Gi(e) {
4074
4083
  ...v,
4075
4084
  [n.id]: y
4076
4085
  }));
4077
- }, l = () => f(void 0), c = mr(n);
4086
+ }, d = () => f(void 0), c = mr(n);
4078
4087
  return {
4079
4088
  id: n.id,
4080
4089
  kind: n.kind,
@@ -4087,7 +4096,7 @@ function Gi(e) {
4087
4096
  options: u,
4088
4097
  isActive: ue(o),
4089
4098
  setValue: f,
4090
- clear: l,
4099
+ clear: d,
4091
4100
  toAnalyticsInput: () => ({
4092
4101
  inputId: c.inputId,
4093
4102
  field: c.field,
@@ -4143,7 +4152,7 @@ function Yi(e, r = {}) {
4143
4152
  case "analysis":
4144
4153
  return {
4145
4154
  queryKind: t.queryKind,
4146
- request: li(t)
4155
+ request: di(t)
4147
4156
  };
4148
4157
  case "records":
4149
4158
  return {
@@ -4189,51 +4198,51 @@ function Yi(e, r = {}) {
4189
4198
  i.success
4190
4199
  ]
4191
4200
  ), f = O(
4192
- (d) => {
4201
+ (l) => {
4193
4202
  var K, T, N, $, S, w, L, x, D;
4194
4203
  const b = n.request;
4195
4204
  if (b.intent)
4196
4205
  switch (n.queryKind) {
4197
4206
  case "metric":
4198
- return (K = d.executor) == null ? void 0 : K.executeMetric(
4207
+ return (K = l.executor) == null ? void 0 : K.executeMetric(
4199
4208
  b.intent,
4200
- d
4209
+ l
4201
4210
  );
4202
4211
  case "analysis":
4203
- return (N = (T = d.executor) == null ? void 0 : T.executeAnalysis) == null ? void 0 : N.call(
4212
+ return (N = (T = l.executor) == null ? void 0 : T.executeAnalysis) == null ? void 0 : N.call(
4204
4213
  T,
4205
4214
  b.intent,
4206
- d,
4215
+ l,
4207
4216
  b.analysisOptions
4208
4217
  );
4209
4218
  case "records":
4210
- return ($ = d.executor) == null ? void 0 : $.executeRecords(
4219
+ return ($ = l.executor) == null ? void 0 : $.executeRecords(
4211
4220
  b.intent,
4212
- d
4221
+ l
4213
4222
  );
4214
4223
  case "inputOptions":
4215
- return (S = d.executor) == null ? void 0 : S.executeInputOptions(
4224
+ return (S = l.executor) == null ? void 0 : S.executeInputOptions(
4216
4225
  b.intent,
4217
- d
4226
+ l
4218
4227
  );
4219
4228
  case "sql":
4220
- return (L = (w = d.executor) == null ? void 0 : w.executeSql) == null ? void 0 : L.call(
4229
+ return (L = (w = l.executor) == null ? void 0 : w.executeSql) == null ? void 0 : L.call(
4221
4230
  w,
4222
4231
  b.intent,
4223
- d
4232
+ l
4224
4233
  );
4225
4234
  case "matrix":
4226
- return (D = (x = d.executor) == null ? void 0 : x.executeMatrix) == null ? void 0 : D.call(
4235
+ return (D = (x = l.executor) == null ? void 0 : x.executeMatrix) == null ? void 0 : D.call(
4227
4236
  x,
4228
4237
  b.intent,
4229
- d
4238
+ l
4230
4239
  );
4231
4240
  default:
4232
4241
  return Se(n);
4233
4242
  }
4234
4243
  },
4235
4244
  [n]
4236
- ), l = Di(
4245
+ ), d = Di(
4237
4246
  n.request.queryKey,
4238
4247
  f,
4239
4248
  n.request.idleData,
@@ -4241,144 +4250,146 @@ function Yi(e, r = {}) {
4241
4250
  u
4242
4251
  ), c = i.queryId, y = i.validationFailure;
4243
4252
  B(() => {
4244
- const d = n.request.error;
4245
- if (!d) {
4253
+ const l = n.request.error;
4254
+ if (!l) {
4246
4255
  o.current = null;
4247
4256
  return;
4248
4257
  }
4249
- const b = `${c}:${d.message}`;
4250
- o.current !== b && (o.current = b, y(d));
4258
+ const b = `${c}:${l.message}`;
4259
+ o.current !== b && (o.current = b, y(l));
4251
4260
  }, [
4252
4261
  n.request.error,
4253
4262
  n.request.queryKey,
4254
4263
  c,
4255
4264
  y
4256
4265
  ]);
4257
- const m = n.request.error ? n.request.idleData : l.data, v = n.request.error ? "error" : l.status, g = !n.request.error && l.status === "loading", h = n.request.error || l.error, A = i.trace;
4266
+ const m = n.request.error ? n.request.idleData : d.data, v = n.request.error ? "error" : d.status, g = !n.request.error && d.status === "loading", h = n.request.error || d.error, A = i.trace;
4258
4267
  switch (n.queryKind) {
4259
4268
  case "metric": {
4260
- const d = m, b = J({
4269
+ const l = m, b = J({
4261
4270
  queryKind: n.queryKind,
4262
4271
  status: v,
4263
4272
  isLoading: g,
4264
4273
  error: h,
4265
4274
  trace: A,
4266
- payload: d,
4275
+ payload: l,
4267
4276
  activeInputs: n.request.activeInputs,
4268
- isStale: l.isStale
4277
+ isStale: d.isStale
4269
4278
  });
4270
4279
  return {
4271
4280
  id: t.id,
4272
4281
  intent: n.request.intent,
4273
- value: (d == null ? void 0 : d.value) ?? null,
4274
- measures: d == null ? void 0 : d.measures,
4275
- measureBindings: d == null ? void 0 : d.measureBindings,
4276
- missingMeasures: d == null ? void 0 : d.missingMeasures,
4277
- comparisonValue: d == null ? void 0 : d.comparisonValue,
4278
- delta: d == null ? void 0 : d.delta,
4279
- deltaPercent: d == null ? void 0 : d.deltaPercent,
4280
- records: d == null ? void 0 : d.records,
4282
+ value: (l == null ? void 0 : l.value) ?? null,
4283
+ primaryValue: (l == null ? void 0 : l.primaryValue) ?? null,
4284
+ measures: l == null ? void 0 : l.measures,
4285
+ measureBindings: l == null ? void 0 : l.measureBindings,
4286
+ missingMeasures: l == null ? void 0 : l.missingMeasures,
4287
+ comparisonValue: l == null ? void 0 : l.comparisonValue,
4288
+ comparisonKind: l == null ? void 0 : l.comparisonKind,
4289
+ delta: l == null ? void 0 : l.delta,
4290
+ deltaPercent: l == null ? void 0 : l.deltaPercent,
4291
+ records: l == null ? void 0 : l.records,
4281
4292
  ...b
4282
4293
  };
4283
4294
  }
4284
4295
  case "analysis": {
4285
- const d = Or(m), b = J({
4296
+ const l = Or(m), b = J({
4286
4297
  queryKind: n.queryKind,
4287
4298
  status: v,
4288
4299
  isLoading: g,
4289
4300
  error: h,
4290
4301
  trace: A,
4291
- payload: d,
4302
+ payload: l,
4292
4303
  activeInputs: n.request.activeInputs,
4293
- isStale: l.isStale
4304
+ isStale: d.isStale
4294
4305
  });
4295
4306
  return {
4296
4307
  id: t.id,
4297
4308
  intent: n.request.intent,
4298
- ...d || {},
4309
+ ...l || {},
4299
4310
  ...b
4300
4311
  };
4301
4312
  }
4302
4313
  case "records": {
4303
- const d = m, b = J({
4314
+ const l = m, b = J({
4304
4315
  queryKind: n.queryKind,
4305
4316
  status: v,
4306
4317
  isLoading: g,
4307
4318
  error: h,
4308
4319
  trace: A,
4309
- payload: d,
4320
+ payload: l,
4310
4321
  activeInputs: n.request.activeInputs,
4311
- isStale: l.isStale
4322
+ isStale: d.isStale
4312
4323
  });
4313
4324
  return {
4314
4325
  id: t.id,
4315
4326
  intent: n.request.intent,
4316
- records: (d == null ? void 0 : d.records) || [],
4317
- columns: d == null ? void 0 : d.columns,
4318
- rowCount: d == null ? void 0 : d.rowCount,
4319
- pagination: d == null ? void 0 : d.pagination,
4320
- totals: d == null ? void 0 : d.totals,
4327
+ records: (l == null ? void 0 : l.records) || [],
4328
+ columns: l == null ? void 0 : l.columns,
4329
+ rowCount: l == null ? void 0 : l.rowCount,
4330
+ pagination: l == null ? void 0 : l.pagination,
4331
+ totals: l == null ? void 0 : l.totals,
4321
4332
  ...b
4322
4333
  };
4323
4334
  }
4324
4335
  case "inputOptions": {
4325
- const d = m, b = J({
4336
+ const l = m, b = J({
4326
4337
  queryKind: n.queryKind,
4327
4338
  status: v,
4328
4339
  isLoading: g,
4329
4340
  error: h,
4330
4341
  trace: A,
4331
- payload: d,
4342
+ payload: l,
4332
4343
  activeInputs: n.request.activeInputs,
4333
- isStale: l.isStale
4344
+ isStale: d.isStale
4334
4345
  });
4335
4346
  return {
4336
4347
  id: t.id,
4337
4348
  intent: n.request.intent,
4338
- options: (d == null ? void 0 : d.options) || [],
4349
+ options: (l == null ? void 0 : l.options) || [],
4339
4350
  ...b
4340
4351
  };
4341
4352
  }
4342
4353
  case "sql": {
4343
- const d = m, b = J({
4354
+ const l = m, b = J({
4344
4355
  queryKind: n.queryKind,
4345
4356
  status: v,
4346
4357
  isLoading: g,
4347
4358
  error: h,
4348
4359
  trace: A,
4349
- payload: d,
4360
+ payload: l,
4350
4361
  activeInputs: n.request.activeInputs,
4351
- isStale: l.isStale
4362
+ isStale: d.isStale
4352
4363
  });
4353
4364
  return {
4354
4365
  id: t.id,
4355
4366
  intent: n.request.intent,
4356
- records: (d == null ? void 0 : d.records) || [],
4357
- columns: d == null ? void 0 : d.columns,
4358
- rowCount: d == null ? void 0 : d.rowCount,
4359
- pagination: d == null ? void 0 : d.pagination,
4360
- output: d == null ? void 0 : d.output,
4361
- rowLimitExceeded: d == null ? void 0 : d.rowLimitExceeded,
4367
+ records: (l == null ? void 0 : l.records) || [],
4368
+ columns: l == null ? void 0 : l.columns,
4369
+ rowCount: l == null ? void 0 : l.rowCount,
4370
+ pagination: l == null ? void 0 : l.pagination,
4371
+ output: l == null ? void 0 : l.output,
4372
+ rowLimitExceeded: l == null ? void 0 : l.rowLimitExceeded,
4362
4373
  ...b
4363
4374
  };
4364
4375
  }
4365
4376
  case "matrix": {
4366
- const d = m, b = J({
4377
+ const l = m, b = J({
4367
4378
  queryKind: n.queryKind,
4368
4379
  status: v,
4369
4380
  isLoading: g,
4370
4381
  error: h,
4371
4382
  trace: A,
4372
- payload: d,
4383
+ payload: l,
4373
4384
  activeInputs: n.request.activeInputs,
4374
- isStale: l.isStale
4385
+ isStale: d.isStale
4375
4386
  });
4376
4387
  return {
4377
4388
  id: t.id,
4378
4389
  intent: n.request.intent,
4379
- matrixResult: d == null ? void 0 : d.matrixResult,
4380
- grid: d == null ? void 0 : d.grid,
4381
- expansion: d == null ? void 0 : d.expansion,
4390
+ matrixResult: l == null ? void 0 : l.matrixResult,
4391
+ grid: l == null ? void 0 : l.grid,
4392
+ expansion: l == null ? void 0 : l.expansion,
4382
4393
  ...b
4383
4394
  };
4384
4395
  }
@@ -4400,7 +4411,7 @@ function J(e) {
4400
4411
  isEmpty: $i(e.queryKind, e.payload, e.status),
4401
4412
  isPartial: Li(e.payload, r),
4402
4413
  isFiltered: !!((f = e.activeInputs) != null && f.some(
4403
- (l) => l.kind === "filter" && l.isActive
4414
+ (d) => d.kind === "filter" && d.isActive
4404
4415
  )),
4405
4416
  isStale: e.isStale,
4406
4417
  isValidated: !!t,
@@ -4423,30 +4434,30 @@ function $i(e, r, t) {
4423
4434
  return !1;
4424
4435
  switch (e) {
4425
4436
  case "metric": {
4426
- const l = r;
4427
- return (l == null ? void 0 : l.value) == null && !_(l == null ? void 0 : l.records);
4437
+ const d = r;
4438
+ return (d == null ? void 0 : d.value) == null && !_(d == null ? void 0 : d.records);
4428
4439
  }
4429
4440
  case "analysis": {
4430
- const l = r;
4431
- return l ? !l.answerSummary && !_(l.records) && !_(l.changes) && !_(l.drivers) && !_(l.largestNegativeChanges) && !_(l.largestPositiveChanges) && !_(l.largestNegativeDrivers) && !_(l.largestPositiveDrivers) && !Object.values(l.resultSets || {}).some(
4441
+ const d = r;
4442
+ return d ? !d.answerSummary && !_(d.records) && !_(d.changes) && !_(d.drivers) && !_(d.largestNegativeChanges) && !_(d.largestPositiveChanges) && !_(d.largestNegativeDrivers) && !_(d.largestPositiveDrivers) && !Object.values(d.resultSets || {}).some(
4432
4443
  (c) => _(c.records)
4433
4444
  ) : !0;
4434
4445
  }
4435
4446
  case "records": {
4436
- const l = r;
4437
- return !_(l == null ? void 0 : l.records);
4447
+ const d = r;
4448
+ return !_(d == null ? void 0 : d.records);
4438
4449
  }
4439
4450
  case "sql": {
4440
- const l = r;
4441
- return !_(l == null ? void 0 : l.records) && (l == null ? void 0 : l.output) === void 0;
4451
+ const d = r;
4452
+ return !_(d == null ? void 0 : d.records) && (d == null ? void 0 : d.output) === void 0;
4442
4453
  }
4443
4454
  case "inputOptions": {
4444
- const l = r;
4445
- return !((n = l == null ? void 0 : l.options) != null && n.length);
4455
+ const d = r;
4456
+ return !((n = d == null ? void 0 : d.options) != null && n.length);
4446
4457
  }
4447
4458
  case "matrix": {
4448
- const l = r;
4449
- return !((o = (i = l == null ? void 0 : l.matrixResult) == null ? void 0 : i.cells) != null && o.length) && !((f = (u = l == null ? void 0 : l.grid) == null ? void 0 : u.cells) != null && f.length);
4459
+ const d = r;
4460
+ return !((o = (i = d == null ? void 0 : d.matrixResult) == null ? void 0 : i.cells) != null && o.length) && !((f = (u = d == null ? void 0 : d.grid) == null ? void 0 : u.cells) != null && f.length);
4450
4461
  }
4451
4462
  default:
4452
4463
  return Se(e);
@@ -4456,7 +4467,7 @@ function _(e) {
4456
4467
  return Array.isArray(e) && e.length > 0;
4457
4468
  }
4458
4469
  function Di(e, r, t, n, i) {
4459
- const o = Ci(), u = E(r), f = E(n), [l, c] = F({
4470
+ const o = Ci(), u = E(r), f = E(n), [d, c] = z({
4460
4471
  status: "idle",
4461
4472
  data: t,
4462
4473
  error: null,
@@ -4473,7 +4484,7 @@ function Di(e, r, t, n, i) {
4473
4484
  i == null || i.failure(g, 0), c({
4474
4485
  status: "error",
4475
4486
  data: t,
4476
- error: Fe(g),
4487
+ error: ze(g),
4477
4488
  isStale: !1
4478
4489
  });
4479
4490
  return;
@@ -4495,13 +4506,13 @@ function Di(e, r, t, n, i) {
4495
4506
  m ? i == null || i.ignored("superseded") : (i == null || i.failure(g, pr(v)), c({
4496
4507
  status: "error",
4497
4508
  data: t,
4498
- error: Fe(g),
4509
+ error: ze(g),
4499
4510
  isStale: !1
4500
4511
  }));
4501
4512
  }), () => {
4502
4513
  m = !0;
4503
4514
  };
4504
- }, [t, e, o, i]), l;
4515
+ }, [t, e, o, i]), d;
4505
4516
  }
4506
4517
  function _r() {
4507
4518
  return typeof performance < "u" && performance.now ? performance.now() : Date.now();
@@ -4528,16 +4539,16 @@ function Xi({
4528
4539
  children: i
4529
4540
  }) {
4530
4541
  var g;
4531
- const o = Ti(), u = ((g = o == null ? void 0 : o.authToken) == null ? void 0 : g.accessToken) || e, f = (o == null ? void 0 : o.dataApiBaseUrl) || (o == null ? void 0 : o.apiBaseUrl) || r, l = (o == null ? void 0 : o.debug) ?? n, c = Bi(l), y = I(() => yi(), []), m = t || y, v = I(
4542
+ const o = Ti(), u = ((g = o == null ? void 0 : o.authToken) == null ? void 0 : g.accessToken) || e, f = (o == null ? void 0 : o.dataApiBaseUrl) || (o == null ? void 0 : o.apiBaseUrl) || r, d = (o == null ? void 0 : o.debug) ?? n, c = Bi(d), y = I(() => yi(), []), m = t || y, v = I(
4532
4543
  () => ({
4533
4544
  token: u,
4534
4545
  apiBaseUrl: f,
4535
4546
  executor: m,
4536
- debug: l
4547
+ debug: d
4537
4548
  }),
4538
- [f, l, m, u]
4549
+ [f, d, m, u]
4539
4550
  );
4540
- return /* @__PURE__ */ a($t, { debug: l, children: /* @__PURE__ */ p(Wr.Provider, { value: v, children: [
4551
+ return /* @__PURE__ */ a($t, { debug: d, children: /* @__PURE__ */ p(Wr.Provider, { value: v, children: [
4541
4552
  i,
4542
4553
  c ? /* @__PURE__ */ a(Bt, { ...c }) : null
4543
4554
  ] }) });