react-semaphor 0.1.417 → 0.1.418

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 (59) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +49 -50
  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 +2003 -0
  6. package/dist/chunks/analyze-result-contract-COjyJzYm.js +1 -0
  7. package/dist/chunks/{calendar-preferences-dialog-BOfryj8P.js → calendar-preferences-dialog-BbuLgela.js} +3 -3
  8. package/dist/chunks/{calendar-preferences-dialog-Rq9qiG3X.js → calendar-preferences-dialog-CInkkhl_.js} +1 -1
  9. package/dist/chunks/{dashboard-briefing-launcher-D_P0cNQ_.js → dashboard-briefing-launcher-B4OWNsVD.js} +1 -1
  10. package/dist/chunks/{dashboard-briefing-launcher-DgvlOcRI.js → dashboard-briefing-launcher-D7FNuDuc.js} +4 -4
  11. package/dist/chunks/{dashboard-controls-DzVA-wWu.js → dashboard-controls-DTC1eCz0.js} +1 -1
  12. package/dist/chunks/{dashboard-controls-JYTKRokc.js → dashboard-controls-DcX7Mid4.js} +5 -5
  13. package/dist/chunks/{dashboard-json-h6YMk_-l.js → dashboard-json-BHWbQS6I.js} +3 -3
  14. package/dist/chunks/{dashboard-json-D5TEri2w.js → dashboard-json-vu38P5pV.js} +1 -1
  15. package/dist/chunks/{edit-dashboard-visual-kfbu03n9.js → edit-dashboard-visual-CkBhJBhp.js} +1 -1
  16. package/dist/chunks/{edit-dashboard-visual-DOtCYmDn.js → edit-dashboard-visual-DsCr90_3.js} +4 -4
  17. package/dist/chunks/{index-BgESS5r7.js → index-C56DuHI8.js} +163 -164
  18. package/dist/chunks/{index-Beol8cOo.js → index-C8thRvkW.js} +4 -4
  19. package/dist/chunks/{switch--FHwRAOL.js → switch-BXuyni6l.js} +1 -1
  20. package/dist/chunks/{switch-C8_t4Pio.js → switch-Dsx-IwBE.js} +1 -1
  21. package/dist/chunks/{update-policy-CQLHKQ_h.js → update-policy-B5S_LfEu.js} +161 -142
  22. package/dist/chunks/update-policy-BqBKUk3Q.js +3 -0
  23. package/dist/chunks/{use-create-flow-overlay-state-BEPWzqQn.js → use-create-flow-overlay-state-BDv_VpL6.js} +1 -1
  24. package/dist/chunks/{use-create-flow-overlay-state-NEs9ePDy.js → use-create-flow-overlay-state-CzftV84t.js} +3 -3
  25. package/dist/chunks/{validators-UqQI3Cg_.js → validators-CLzrE2N_.js} +1 -1
  26. package/dist/chunks/validators-CPFcUMrV.js +1 -0
  27. package/dist/dashboard/index.cjs +1 -1
  28. package/dist/dashboard/index.js +1 -1
  29. package/dist/dashboard-authoring/index.cjs +3 -3
  30. package/dist/dashboard-authoring/index.js +28 -29
  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 +154 -125
  36. package/dist/data-app-codegen-node/index.js +695 -613
  37. package/dist/data-app-sdk/index.cjs +2 -2
  38. package/dist/data-app-sdk/index.js +171 -157
  39. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  40. package/dist/data-app-sdk-adapters/index.js +26 -27
  41. package/dist/data-app-sdk-validation/index.cjs +1 -1
  42. package/dist/data-app-sdk-validation/index.js +17 -18
  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 +5 -0
  48. package/dist/types/dashboard-assistant.d.ts +1 -0
  49. package/dist/types/data-app-codegen-node.d.ts +2 -1
  50. package/dist/types/data-app-codegen.d.ts +2 -1
  51. package/dist/types/data-app-sdk-validation.d.ts +1 -0
  52. package/dist/types/data-app-sdk.d.ts +6 -0
  53. package/package.json +1 -1
  54. package/dist/chunks/analyze-result-contract-B0O3oIYu.js +0 -1870
  55. package/dist/chunks/analyze-result-contract-CL97m8X8.js +0 -1
  56. package/dist/chunks/source-identity-BM2FvJDP.js +0 -1
  57. package/dist/chunks/source-identity-Cv4Nm3TM.js +0 -75
  58. package/dist/chunks/update-policy-B50M0Jeg.js +0 -3
  59. package/dist/chunks/validators-JzI7olk4.js +0 -1
@@ -1,12 +1,11 @@
1
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";
2
2
  import { jsxs as p, Fragment as yr, jsx as a } from "react/jsx-runtime";
3
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 { a as Yr, m as Xr } from "../chunks/source-identity-Cv4Nm3TM.js";
5
- import { d as ro } from "../chunks/source-identity-Cv4Nm3TM.js";
6
- import "../chunks/analyze-result-contract-B0O3oIYu.js";
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";
7
6
  import { M as Zr, a as et, S as rt, E as tt, C as nt } from "../chunks/search-BHsQIWBV.js";
8
7
  import { X as it, C as ot, j as st } from "../chunks/x-CXDkqdur.js";
9
- import { b as at } from "../chunks/validators-UqQI3Cg_.js";
8
+ import { b as at } from "../chunks/validators-CLzrE2N_.js";
10
9
  function me(e, r, t = {}) {
11
10
  return {
12
11
  ...t,
@@ -460,7 +459,7 @@ function qt(e) {
460
459
  color: "var(--sd-success-fg)"
461
460
  };
462
461
  }
463
- function Tt(e) {
462
+ function At(e) {
464
463
  return e === "right" ? {
465
464
  top: 16,
466
465
  right: 16,
@@ -479,7 +478,7 @@ function Tt(e) {
479
478
  borderRadius: 6
480
479
  };
481
480
  }
482
- function At(e) {
481
+ function Tt(e) {
483
482
  return e === "right" ? {
484
483
  gridTemplateColumns: "minmax(210px, 280px) minmax(0, 1fr)"
485
484
  } : {
@@ -1630,13 +1629,13 @@ function Bt({
1630
1629
  className: n,
1631
1630
  style: i
1632
1631
  } = {}) {
1633
- 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, T = (u == null ? void 0 : u.open) === !0;
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;
1634
1633
  B(() => {
1635
1634
  wr();
1636
1635
  }, []), B(() => {
1637
1636
  r && o.enabled && (g == null || g());
1638
1637
  }, [r, o.enabled, g]), B(() => {
1639
- if (!T || !h)
1638
+ if (!A || !h)
1640
1639
  return;
1641
1640
  const S = (w) => {
1642
1641
  var x, D;
@@ -1646,22 +1645,22 @@ function Bt({
1646
1645
  return document.addEventListener("pointerdown", S, !0), document.addEventListener("mousedown", S, !0), document.addEventListener("click", S, !0), () => {
1647
1646
  document.removeEventListener("pointerdown", S, !0), document.removeEventListener("mousedown", S, !0), document.removeEventListener("click", S, !0);
1648
1647
  };
1649
- }, [h, T]);
1648
+ }, [h, A]);
1650
1649
  const d = I(
1651
1650
  () => ht(o.queries),
1652
1651
  [o.queries]
1653
1652
  ), b = I(
1654
1653
  () => Me(o.queries),
1655
1654
  [o.queries]
1656
- ), K = tn(d), A = I(
1655
+ ), K = tn(d), T = I(
1657
1656
  () => nn(o.queries, f),
1658
1657
  [o.queries, f]
1659
1658
  ), N = I(
1660
- () => on(A),
1661
- [A]
1659
+ () => on(T),
1660
+ [T]
1662
1661
  ), $ = I(
1663
- () => Tr(A, u == null ? void 0 : u.focus) || A[0],
1664
- [A, u == null ? void 0 : u.focus]
1662
+ () => Ar(T, u == null ? void 0 : u.focus) || T[0],
1663
+ [T, u == null ? void 0 : u.focus]
1665
1664
  );
1666
1665
  return !o.enabled || !u ? null : /* @__PURE__ */ p(yr, { children: [
1667
1666
  /* @__PURE__ */ p(
@@ -1710,7 +1709,7 @@ function Bt({
1710
1709
  className: R,
1711
1710
  style: {
1712
1711
  ...s.panel,
1713
- ...Tt(t),
1712
+ ...At(t),
1714
1713
  ...c ? s.panelFullscreen : null
1715
1714
  },
1716
1715
  children: [
@@ -1785,7 +1784,7 @@ function Bt({
1785
1784
  {
1786
1785
  style: {
1787
1786
  ...s.panelBody,
1788
- ...At(t)
1787
+ ...Tt(t)
1789
1788
  },
1790
1789
  children: [
1791
1790
  /* @__PURE__ */ a(
@@ -1796,14 +1795,14 @@ function Bt({
1796
1795
  ...Ct()
1797
1796
  },
1798
1797
  "aria-label": "Registered queries",
1799
- children: A.length ? N.map((S) => /* @__PURE__ */ p("div", { style: s.queryGroup, children: [
1798
+ children: T.length ? N.map((S) => /* @__PURE__ */ p("div", { style: s.queryGroup, children: [
1800
1799
  /* @__PURE__ */ p("div", { style: s.queryGroupHeader, children: [
1801
1800
  /* @__PURE__ */ a("span", { children: S.title }),
1802
1801
  /* @__PURE__ */ a("span", { style: s.queryGroupCount, children: S.traces.length })
1803
1802
  ] }),
1804
1803
  S.traces.length ? S.traces.map((w) => {
1805
1804
  var ne;
1806
- const L = an(w, $), x = xe(w), D = kr(w), pe = Er(w), re = ln(w, x, pe), te = re.join(" · "), C = Ar(D), M = yt(b, w);
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);
1807
1806
  return /* @__PURE__ */ p(
1808
1807
  "button",
1809
1808
  {
@@ -1827,7 +1826,7 @@ function Bt({
1827
1826
  {
1828
1827
  style: {
1829
1828
  ...s.queryListKindChip,
1830
- ...Cr(C)
1829
+ ...Cr(k)
1831
1830
  },
1832
1831
  children: D
1833
1832
  }
@@ -1934,23 +1933,23 @@ function Kt({
1934
1933
  ), h = I(
1935
1934
  () => JSON.stringify(n || null),
1936
1935
  [n]
1937
- ), T = E(e), d = E(v), b = E(n), K = E(h), A = E(i), N = E(g), $ = Bn(o), S = JSON.stringify($ || []), w = E($), L = E(S);
1938
- d.current !== v && (d.current = v, T.current = e), K.current !== h && (K.current = h, b.current = n), N.current !== g && (N.current = g, A.current = i), L.current !== S && (L.current = S, w.current = $);
1939
- const x = T.current, D = b.current, pe = A.current, re = w.current, te = hr(), C = I(
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 = $);
1938
+ const x = A.current, D = b.current, pe = T.current, re = w.current, te = hr(), k = I(
1940
1939
  () => y || `query_${Dr(t)}`,
1941
1940
  [t, y]
1942
1941
  ), M = (o == null ? void 0 : o.viewId) || (f == null ? void 0 : f.id), ne = (o == null ? void 0 : o.viewTitle) || (o == null ? void 0 : o.title) || (f == null ? void 0 : f.title), ie = o == null ? void 0 : o.visualType, oe = o == null ? void 0 : o.sectionTitle, j = I(
1943
1942
  () => [
1944
1943
  M || "unscoped-view",
1945
- C,
1944
+ k,
1946
1945
  te
1947
1946
  ].join("::"),
1948
- [C, te, M]
1947
+ [k, te, M]
1949
1948
  ), Ye = I(
1950
1949
  () => ({
1951
1950
  traceKey: j,
1952
1951
  spec: x,
1953
- queryId: C,
1952
+ queryId: k,
1954
1953
  queryLabel: m,
1955
1954
  queryKind: r,
1956
1955
  builder: Wn(r),
@@ -1964,7 +1963,7 @@ function Kt({
1964
1963
  clientWarnings: y ? [] : ["Query spec is missing an explicit id; using an opaque internal id."]
1965
1964
  }),
1966
1965
  [
1967
- C,
1966
+ k,
1968
1967
  r,
1969
1968
  y,
1970
1969
  m,
@@ -1986,26 +1985,26 @@ function Kt({
1986
1985
  };
1987
1986
  }, [Ye, c, l, j]);
1988
1987
  const P = O(
1989
- (k, U) => {
1990
- !l || !c || c({ type: "event", traceKey: j, event: k, latestAttempt: U });
1988
+ (C, U) => {
1989
+ !l || !c || c({ type: "event", traceKey: j, event: C, latestAttempt: U });
1991
1990
  },
1992
1991
  [c, l, j]
1993
1992
  ), Xe = O(() => {
1994
1993
  P(
1995
1994
  {
1996
1995
  type: "query_started",
1997
- queryId: C,
1996
+ queryId: k,
1998
1997
  at: be()
1999
1998
  },
2000
1999
  { status: "loading" }
2001
2000
  );
2002
- }, [P, C]), Ze = O(
2003
- (k, U) => {
2004
- const se = cr(k), ae = Hn(k), Nr = Vn(k);
2001
+ }, [P, k]), Ze = O(
2002
+ (C, U) => {
2003
+ const se = cr(C), ae = Hn(C), Nr = Vn(C);
2005
2004
  P(
2006
2005
  {
2007
2006
  type: "query_succeeded",
2008
- queryId: C,
2007
+ queryId: k,
2009
2008
  requestId: se,
2010
2009
  at: be(),
2011
2010
  rowCount: ae,
@@ -2017,18 +2016,19 @@ function Kt({
2017
2016
  durationMs: U,
2018
2017
  rowCount: ae,
2019
2018
  columnCount: Nr,
2020
- executionResult: ur(k)
2019
+ metricCoverage: Qn(C),
2020
+ executionResult: ur(C)
2021
2021
  }
2022
2022
  );
2023
2023
  },
2024
- [P, C]
2024
+ [P, k]
2025
2025
  ), ge = O(
2026
- (k, U) => {
2027
- const se = cr(k), ae = k instanceof Error ? k.message : String(k);
2026
+ (C, U) => {
2027
+ const se = cr(C), ae = C instanceof Error ? C.message : String(C);
2028
2028
  P(
2029
2029
  {
2030
2030
  type: "query_failed",
2031
- queryId: C,
2031
+ queryId: k,
2032
2032
  requestId: se,
2033
2033
  at: be(),
2034
2034
  errorMessage: ae
@@ -2038,34 +2038,34 @@ function Kt({
2038
2038
  status: "error",
2039
2039
  durationMs: U,
2040
2040
  errorMessage: ae,
2041
- executionResult: ur(k)
2041
+ executionResult: ur(C)
2042
2042
  }
2043
2043
  );
2044
2044
  },
2045
- [P, C]
2045
+ [P, k]
2046
2046
  ), er = O(
2047
- (k) => {
2047
+ (C) => {
2048
2048
  P(
2049
2049
  {
2050
2050
  type: "query_ignored_stale",
2051
- queryId: C,
2051
+ queryId: k,
2052
2052
  at: be(),
2053
- reason: k
2053
+ reason: C
2054
2054
  }
2055
2055
  );
2056
2056
  },
2057
- [P, C]
2057
+ [P, k]
2058
2058
  ), rr = O(
2059
- (k) => {
2060
- ge(k, 0);
2059
+ (C) => {
2060
+ ge(C, 0);
2061
2061
  },
2062
2062
  [ge]
2063
- ), Ae = l ? u == null ? void 0 : u.state.entries[j] : void 0;
2063
+ ), Te = l ? u == null ? void 0 : u.state.entries[j] : void 0;
2064
2064
  return I(
2065
2065
  () => ({
2066
2066
  enabled: l,
2067
- queryId: C,
2068
- trace: Ae ? ve(Ae) : void 0,
2067
+ queryId: k,
2068
+ trace: Te ? ve(Te) : void 0,
2069
2069
  start: Xe,
2070
2070
  success: Ze,
2071
2071
  failure: ge,
@@ -2076,10 +2076,10 @@ function Kt({
2076
2076
  l,
2077
2077
  ge,
2078
2078
  er,
2079
- C,
2079
+ k,
2080
2080
  Xe,
2081
2081
  Ze,
2082
- Ae,
2082
+ Te,
2083
2083
  rr
2084
2084
  ]
2085
2085
  );
@@ -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 = An(t), c = ((x = e.server) == null ? void 0 : x.compiledSql) || l.compiledSql, y = dt(t), m = [
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 = [
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), T = pn(e), d = hn(r == null ? void 0 : r.rowCount), b = bn(r == null ? void 0 : r.durationMs), K = e.sourceRefs.length, A = kr(e), N = Ar(A);
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);
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: [
@@ -2144,12 +2144,12 @@ function _t({
2144
2144
  ...s.detailsKindChip,
2145
2145
  ...Cr(N)
2146
2146
  },
2147
- children: A
2147
+ children: T
2148
2148
  }
2149
2149
  )
2150
2150
  ] }),
2151
2151
  /* @__PURE__ */ p("div", { style: s.metaStrip, children: [
2152
- /* @__PURE__ */ a("span", { style: s.metaStripItem, children: T }),
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
2155
  d,
@@ -2186,7 +2186,7 @@ function Nt({
2186
2186
  compiledSql: n,
2187
2187
  hasCompiled: i
2188
2188
  }) {
2189
- var h, T;
2189
+ var h, A;
2190
2190
  const o = [];
2191
2191
  r && o.push({
2192
2192
  id: "returned",
@@ -2219,7 +2219,7 @@ function Nt({
2219
2219
  label: "Raw",
2220
2220
  render: () => /* @__PURE__ */ a("pre", { style: s.codeBlock, children: vn(e) })
2221
2221
  });
2222
- const u = (T = o[0]) == null ? void 0 : T.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}`, [l, c] = F(u), y = E(f), m = E(!1), v = o.map((d) => d.id).join("|");
2223
2223
  B(() => {
2224
2224
  if (y.current !== f) {
2225
2225
  y.current = f, m.current = !1, c(u);
@@ -2711,13 +2711,13 @@ function on(e) {
2711
2711
  { title: "Inputs", traces: r }
2712
2712
  ];
2713
2713
  }
2714
- function Tr(e, r) {
2714
+ function Ar(e, r) {
2715
2715
  if (!(!(r != null && r.traceId) && !(r != null && r.queryId) && !(r != null && r.viewId)))
2716
2716
  return r.traceId ? e.find((t) => t.traceId === r.traceId) : e.find((t) => !(r.queryId && t.queryId !== r.queryId || r.viewId && t.viewId !== r.viewId));
2717
2717
  }
2718
2718
  function sn(e, r) {
2719
2719
  if (r.queryId)
2720
- return Tr(e, r);
2720
+ return Ar(e, r);
2721
2721
  if (!r.viewId)
2722
2722
  return;
2723
2723
  const t = e.filter((n) => n.viewId === r.viewId);
@@ -2747,7 +2747,7 @@ function dn(e) {
2747
2747
  return qe(e);
2748
2748
  }
2749
2749
  }
2750
- function Ar(e) {
2750
+ function Tr(e) {
2751
2751
  const r = e.trim().toLowerCase();
2752
2752
  return r === "metric" || r === "kpi" ? "metric" : r === "records" || r === "table" ? "records" : r === "matrix" || r === "pivot" ? "matrix" : r === "analysis" ? "analysis" : r === "inputs" || r === "input options" ? "inputs" : r === "sql" ? "sql" : "default";
2753
2753
  }
@@ -2913,9 +2913,9 @@ function $e(e) {
2913
2913
  }
2914
2914
  function qn(e) {
2915
2915
  var r;
2916
- return (r = Tn(e)) == null ? void 0 : r.message;
2916
+ return (r = An(e)) == null ? void 0 : r.message;
2917
2917
  }
2918
- function Tn(e) {
2918
+ function An(e) {
2919
2919
  if (typeof e == "string")
2920
2920
  return { message: e };
2921
2921
  if (!e || typeof e != "object" || Array.isArray(e))
@@ -2927,7 +2927,7 @@ function Tn(e) {
2927
2927
  ...i ? { path: i } : {}
2928
2928
  } : t ? { message: t } : n ? { message: n, code: n } : void 0;
2929
2929
  }
2930
- function An(e) {
2930
+ function Tn(e) {
2931
2931
  const r = e == null ? void 0 : e.metadata, t = r && typeof r == "object" && !Array.isArray(r) && "dataAppDebug" in r && r.dataAppDebug && typeof r.dataAppDebug == "object" && !Array.isArray(r.dataAppDebug) ? r.dataAppDebug : void 0;
2932
2932
  return {
2933
2933
  compiledSql: typeof (t == null ? void 0 : t.compiledSql) == "string" ? t.compiledSql : void 0,
@@ -3340,6 +3340,19 @@ function ur(e) {
3340
3340
  const r = e;
3341
3341
  return r == null ? void 0 : r.executionResult;
3342
3342
  }
3343
+ function Qn(e) {
3344
+ const r = e, t = [
3345
+ ...r != null && r.measures ? Object.keys(r.measures) : [],
3346
+ ...r != null && r.measureBindings ? Object.keys(r.measureBindings) : []
3347
+ ].filter(Boolean).sort(), n = Array.isArray(r == null ? void 0 : r.missingMeasures) ? r.missingMeasures.filter(
3348
+ (i) => typeof i == "string" && !!i
3349
+ ) : [];
3350
+ if (!(t.length === 0 && n.length === 0))
3351
+ return {
3352
+ ...t.length > 0 ? { populatedMetricKeys: t } : {},
3353
+ ...n.length > 0 ? { missingMeasures: n } : {}
3354
+ };
3355
+ }
3343
3356
  function cr(e) {
3344
3357
  const r = e;
3345
3358
  return typeof (r == null ? void 0 : r.requestId) == "string" ? r.requestId : void 0;
@@ -3356,7 +3369,7 @@ function be() {
3356
3369
  function Ue() {
3357
3370
  return typeof performance < "u" && performance.now ? performance.now() : Date.now();
3358
3371
  }
3359
- const Qn = [
3372
+ const Un = [
3360
3373
  "primary",
3361
3374
  "comparisons",
3362
3375
  "contributors",
@@ -3370,7 +3383,7 @@ const Qn = [
3370
3383
  "largestPositiveChanges",
3371
3384
  "largestNegativeDrivers",
3372
3385
  "largestPositiveDrivers"
3373
- ], Un = [
3386
+ ], Gn = [
3374
3387
  "primary",
3375
3388
  "records",
3376
3389
  "periodChanges",
@@ -3388,9 +3401,9 @@ const Qn = [
3388
3401
  function Or(e) {
3389
3402
  if (!e)
3390
3403
  return {};
3391
- const r = ei(e.executionResult), t = Gn(e, r), n = Xn(t), i = Br(
3404
+ const r = ri(e.executionResult), t = Jn(e, r), n = Zn(t), i = Br(
3392
3405
  Je(e.analysisWarnings),
3393
- ni(t)
3406
+ ii(t)
3394
3407
  );
3395
3408
  return {
3396
3409
  ...e,
@@ -3403,15 +3416,15 @@ function Or(e) {
3403
3416
  } : {}
3404
3417
  };
3405
3418
  }
3406
- function Gn(e, r) {
3407
- const t = Jn(e.resultSets);
3408
- for (const i of Qn) {
3419
+ function Jn(e, r) {
3420
+ const t = Yn(e.resultSets);
3421
+ for (const i of Un) {
3409
3422
  if (t[i])
3410
3423
  continue;
3411
- const o = ri(e[i]);
3424
+ const o = ti(e[i]);
3412
3425
  if (!o.length)
3413
3426
  continue;
3414
- const u = r.length ? r : ti(o);
3427
+ const u = r.length ? r : ni(o);
3415
3428
  t[i] = {
3416
3429
  id: i,
3417
3430
  role: i,
@@ -3424,18 +3437,18 @@ function Gn(e, r) {
3424
3437
  rowCount: o.length
3425
3438
  };
3426
3439
  }
3427
- const n = Zn(e.executionResult);
3440
+ const n = ei(e.executionResult);
3428
3441
  return n && n.records.length > 0 && !t.records && (t.records = n), t;
3429
3442
  }
3430
- function Jn(e) {
3443
+ function Yn(e) {
3431
3444
  return Object.fromEntries(
3432
3445
  Object.entries(e || {}).map(([r, t]) => [
3433
3446
  r,
3434
- Yn(t, r)
3447
+ Xn(t, r)
3435
3448
  ])
3436
3449
  );
3437
3450
  }
3438
- function Yn(e, r = e.id || e.role || "resultSet") {
3451
+ function Xn(e, r = e.id || e.role || "resultSet") {
3439
3452
  var n;
3440
3453
  const t = Ge({
3441
3454
  records: e.records || [],
@@ -3454,14 +3467,14 @@ function Yn(e, r = e.id || e.role || "resultSet") {
3454
3467
  rowCount: e.rowCount ?? ((n = e.records) == null ? void 0 : n.length) ?? 0
3455
3468
  };
3456
3469
  }
3457
- function Xn(e) {
3470
+ function Zn(e) {
3458
3471
  var r;
3459
- for (const t of Un)
3472
+ for (const t of Gn)
3460
3473
  if ((r = e[t]) != null && r.records.length)
3461
3474
  return e[t];
3462
3475
  return Object.values(e).find((t) => t.records.length) || Object.values(e)[0];
3463
3476
  }
3464
- function Zn(e) {
3477
+ function ei(e) {
3465
3478
  const r = e == null ? void 0 : e.result;
3466
3479
  if (!(!r || r.kind !== "records" && r.kind !== "sql"))
3467
3480
  return {
@@ -3476,11 +3489,11 @@ function Zn(e) {
3476
3489
  rowCount: r.rowCount ?? r.records.length
3477
3490
  };
3478
3491
  }
3479
- function ei(e) {
3492
+ function ri(e) {
3480
3493
  const r = e == null ? void 0 : e.result;
3481
3494
  return !r || r.kind !== "records" && r.kind !== "sql" ? [] : r.columns;
3482
3495
  }
3483
- function ri(e) {
3496
+ function ti(e) {
3484
3497
  return Array.isArray(e) ? e.filter(
3485
3498
  (r) => !!(r && typeof r == "object" && !Array.isArray(r))
3486
3499
  ) : [];
@@ -3517,7 +3530,7 @@ function Ge({
3517
3530
  ...n.length ? { warnings: n } : {}
3518
3531
  };
3519
3532
  }
3520
- function ti(e) {
3533
+ function ni(e) {
3521
3534
  return Array.from(
3522
3535
  new Set(e.flatMap((t) => Object.keys(t)))
3523
3536
  ).map((t) => ({
@@ -3526,26 +3539,26 @@ function ti(e) {
3526
3539
  label: t
3527
3540
  }));
3528
3541
  }
3529
- function ni(e) {
3542
+ function ii(e) {
3530
3543
  return Object.values(e).flatMap(
3531
3544
  (r) => Je(r.warnings)
3532
3545
  );
3533
3546
  }
3534
3547
  function Je(e) {
3535
- return Array.isArray(e) ? e.filter(ii) : [];
3548
+ return Array.isArray(e) ? e.filter(oi) : [];
3536
3549
  }
3537
- function ii(e) {
3550
+ function oi(e) {
3538
3551
  return !!(e && typeof e == "object" && !Array.isArray(e));
3539
3552
  }
3540
3553
  function Br(...e) {
3541
3554
  const r = /* @__PURE__ */ new Set(), t = [];
3542
3555
  for (const n of e.flatMap((i) => i || [])) {
3543
- const i = oi(n);
3556
+ const i = si(n);
3544
3557
  r.has(i) || (r.add(i), t.push(n));
3545
3558
  }
3546
3559
  return t;
3547
3560
  }
3548
- function oi(e) {
3561
+ function si(e) {
3549
3562
  return e.code === "missing_analysis_result_key" ? [
3550
3563
  e.code,
3551
3564
  e.resultSetKey,
@@ -3561,8 +3574,8 @@ function ze(e) {
3561
3574
  const r = e;
3562
3575
  return `{${Object.keys(r).sort().map((t) => `${JSON.stringify(t)}:${ze(r[t])}`).join(",")}}`;
3563
3576
  }
3564
- const Oe = { value: null }, Be = {}, si = { records: [] }, Ke = { options: [] }, ai = { records: [] }, We = {};
3565
- function di(e) {
3577
+ const Oe = { value: null }, Be = {}, ai = { records: [] }, Ke = { options: [] }, di = { records: [] }, We = {};
3578
+ function li(e) {
3566
3579
  const r = X(e.inputs), t = Vr(e);
3567
3580
  try {
3568
3581
  const n = Qr(e), i = ee(n, "analysis");
@@ -3601,7 +3614,7 @@ function di(e) {
3601
3614
  };
3602
3615
  }
3603
3616
  }
3604
- function li(e) {
3617
+ function ui(e) {
3605
3618
  const r = X(e.inputs);
3606
3619
  try {
3607
3620
  const t = Ur(e), n = ee(t);
@@ -3627,8 +3640,8 @@ function li(e) {
3627
3640
  };
3628
3641
  }
3629
3642
  }
3630
- function ui(e) {
3631
- const r = X(e.inputs), t = si;
3643
+ function ci(e) {
3644
+ const r = X(e.inputs), t = ai;
3632
3645
  try {
3633
3646
  const n = Hr(e), i = ee(n);
3634
3647
  return i ? {
@@ -3653,7 +3666,7 @@ function ui(e) {
3653
3666
  };
3654
3667
  }
3655
3668
  }
3656
- function ci(e) {
3669
+ function fi(e) {
3657
3670
  const r = X(e.inputs);
3658
3671
  try {
3659
3672
  const t = jr(e), n = ee(t);
@@ -3679,8 +3692,8 @@ function ci(e) {
3679
3692
  };
3680
3693
  }
3681
3694
  }
3682
- function fi(e) {
3683
- const r = X(e.inputs), t = ai;
3695
+ function pi(e) {
3696
+ const r = X(e.inputs), t = di;
3684
3697
  try {
3685
3698
  const n = Mr(e), i = ee(n);
3686
3699
  return i ? {
@@ -3705,7 +3718,7 @@ function fi(e) {
3705
3718
  };
3706
3719
  }
3707
3720
  }
3708
- function pi(e) {
3721
+ function gi(e) {
3709
3722
  const r = X(e.inputs);
3710
3723
  try {
3711
3724
  const t = Fr(e), n = ee(t);
@@ -3733,9 +3746,9 @@ function pi(e) {
3733
3746
  }
3734
3747
  function Fe(e) {
3735
3748
  var o;
3736
- if (gi(e))
3749
+ if (mi(e))
3737
3750
  return e;
3738
- const r = e instanceof Error ? e : void 0, t = e, n = t == null ? void 0 : t.executionResult, i = Te(
3751
+ const r = e instanceof Error ? e : void 0, t = e, n = t == null ? void 0 : t.executionResult, i = Ae(
3739
3752
  (r == null ? void 0 : r.message) ?? String(e),
3740
3753
  {
3741
3754
  requestId: typeof (t == null ? void 0 : t.requestId) == "string" ? t.requestId : void 0,
@@ -3772,21 +3785,21 @@ function Z(e, r) {
3772
3785
  void 0,
3773
3786
  r,
3774
3787
  n
3775
- ), o = Te(t.message, {
3788
+ ), o = Ae(t.message, {
3776
3789
  executionResult: i,
3777
3790
  validation: n,
3778
3791
  validationIssues: n.errors
3779
3792
  });
3780
3793
  return o.stack = t.stack, o;
3781
3794
  }
3782
- function Te(e, r = {}) {
3795
+ function Ae(e, r = {}) {
3783
3796
  var i, o, u;
3784
3797
  const t = new Error(e);
3785
3798
  t.name = "SemaphorDataAppQueryError", t.kind = "data_app_query_error", r.requestId && (t.requestId = r.requestId), r.details !== void 0 && (t.details = r.details), r.executionResult !== void 0 && (t.executionResult = r.executionResult), r.validation !== void 0 && (t.validation = r.validation);
3786
3799
  const n = r.validationIssues ?? ((i = r.validation) == null ? void 0 : i.errors) ?? ((u = (o = r.executionResult) == null ? void 0 : o.validation) == null ? void 0 : u.errors);
3787
3800
  return n !== void 0 && (t.validationIssues = n), t;
3788
3801
  }
3789
- function gi(e) {
3802
+ function mi(e) {
3790
3803
  return e instanceof Error && e.kind === "data_app_query_error";
3791
3804
  }
3792
3805
  function ee(e, r = e.kind) {
@@ -3800,7 +3813,7 @@ function ee(e, r = e.kind) {
3800
3813
  r,
3801
3814
  t
3802
3815
  );
3803
- return Te(
3816
+ return Ae(
3804
3817
  `Invalid Semaphor analytics intent. ${n}`,
3805
3818
  {
3806
3819
  executionResult: i,
@@ -3856,7 +3869,7 @@ function q(e, r, t, n) {
3856
3869
  error: t == null ? void 0 : t.message
3857
3870
  });
3858
3871
  }
3859
- function mi() {
3872
+ function yi() {
3860
3873
  return {
3861
3874
  executeAnalysis: (e, r, t) => G(
3862
3875
  e,
@@ -3875,7 +3888,7 @@ async function G(e, r, t) {
3875
3888
  throw new Error(
3876
3889
  "SemaphorDataAppProvider needs a token to execute queries."
3877
3890
  );
3878
- const n = xi(r), i = bi(e, n);
3891
+ const n = qi(r), i = vi(e, n);
3879
3892
  let o;
3880
3893
  try {
3881
3894
  o = await fetch(n, {
@@ -3889,7 +3902,7 @@ async function G(e, r, t) {
3889
3902
  activeInputs: r.activeInputs,
3890
3903
  ...t ? { analysisOptions: t } : {},
3891
3904
  resultShape: e.kind,
3892
- ...hi(r) ? { debug: { responseDetail: "debug" } } : {}
3905
+ ...bi(r) ? { debug: { responseDetail: "debug" } } : {}
3893
3906
  })
3894
3907
  });
3895
3908
  } catch (f) {
@@ -3897,37 +3910,37 @@ async function G(e, r, t) {
3897
3910
  `${i}: ${f instanceof Error ? f.message : String(f)}`
3898
3911
  );
3899
3912
  }
3900
- const u = await wi(o);
3913
+ const u = await Ii(o);
3901
3914
  if (!o.ok || u.error)
3902
- throw yi(
3915
+ throw hi(
3903
3916
  `${i}: ${u.error || `Semaphor Data App execution failed with status ${o.status}.`}`,
3904
3917
  u
3905
3918
  );
3906
3919
  return u;
3907
3920
  }
3908
- function yi(e, r) {
3921
+ function hi(e, r) {
3909
3922
  var t;
3910
- return Te(e, {
3923
+ return Ae(e, {
3911
3924
  requestId: r.requestId,
3912
3925
  details: r.details,
3913
3926
  executionResult: r.executionResult,
3914
3927
  validation: (t = r.executionResult) == null ? void 0 : t.validation
3915
3928
  });
3916
3929
  }
3917
- function hi(e) {
3930
+ function bi(e) {
3918
3931
  const r = e.debug;
3919
3932
  return r ? r === !0 ? !0 : r.enabled !== !1 && r.requestServerDebug !== !1 : !1;
3920
3933
  }
3921
- function bi(e, r) {
3934
+ function vi(e, r) {
3922
3935
  return [
3923
3936
  `Semaphor ${e.kind} query`,
3924
3937
  e.id ? `id=${e.id}` : void 0,
3925
3938
  e.label ? `label=${e.label}` : void 0,
3926
- vi(e),
3927
- `endpoint=${Si(r)}`
3939
+ Si(e),
3940
+ `endpoint=${wi(r)}`
3928
3941
  ].filter((t) => !!t).join(" ");
3929
3942
  }
3930
- function vi(e) {
3943
+ function Si(e) {
3931
3944
  const r = "source" in e ? e.source : void 0;
3932
3945
  if (!(!r || typeof r != "object")) {
3933
3946
  if (r.kind === "semantic")
@@ -3946,7 +3959,7 @@ function vi(e) {
3946
3959
  return r.connectionId ? `source=${r.connectionId}` : void 0;
3947
3960
  }
3948
3961
  }
3949
- function Si(e) {
3962
+ function wi(e) {
3950
3963
  if (!e)
3951
3964
  return "/api/v1/data-app/execute";
3952
3965
  try {
@@ -3955,7 +3968,7 @@ function Si(e) {
3955
3968
  return e;
3956
3969
  }
3957
3970
  }
3958
- async function wi(e) {
3971
+ async function Ii(e) {
3959
3972
  const r = await e.text().catch(() => "");
3960
3973
  if (!r.trim())
3961
3974
  return e.ok ? {
@@ -3968,20 +3981,20 @@ async function wi(e) {
3968
3981
  error: "Semaphor Data App execution returned invalid JSON.",
3969
3982
  details: r
3970
3983
  } : {
3971
- error: Ii(e, r),
3984
+ error: xi(e, r),
3972
3985
  details: r
3973
3986
  };
3974
3987
  }
3975
3988
  }
3976
- function Ii(e, r) {
3989
+ function xi(e, r) {
3977
3990
  const t = e.statusText ? ` ${e.statusText}` : "", n = r.replace(/\s+/g, " ").trim();
3978
3991
  return n ? `Semaphor Data App execution failed with status ${e.status}${t}: ${n.slice(0, 240)}` : `Semaphor Data App execution failed with status ${e.status}${t}.`;
3979
3992
  }
3980
- function xi(e) {
3981
- const r = qi(e).replace(/\/+$/, "");
3993
+ function qi(e) {
3994
+ const r = Ai(e).replace(/\/+$/, "");
3982
3995
  return r ? r.endsWith("/api") ? `${r}/v1/data-app/execute` : `${r}/api/v1/data-app/execute` : "/api/v1/data-app/execute";
3983
3996
  }
3984
- function qi(e) {
3997
+ function Ai(e) {
3985
3998
  if (e.apiBaseUrl)
3986
3999
  return e.apiBaseUrl;
3987
4000
  if (!e.token)
@@ -3997,7 +4010,7 @@ function Ti() {
3997
4010
  if (!(typeof window > "u"))
3998
4011
  return window.__SEMAPHOR_DATA_APP_RUNTIME__;
3999
4012
  }
4000
- function Ai() {
4013
+ function Ci() {
4001
4014
  return Q(Wr);
4002
4015
  }
4003
4016
  function Ui(e) {
@@ -4042,7 +4055,7 @@ function Ui(e) {
4042
4055
  }, [f, o, u, e, i]);
4043
4056
  }
4044
4057
  function Gi(e) {
4045
- const [r, t] = F(() => Di(e));
4058
+ const [r, t] = F(() => Oi(e));
4046
4059
  return B(() => {
4047
4060
  t((n) => {
4048
4061
  let i = n;
@@ -4092,12 +4105,12 @@ function Gi(e) {
4092
4105
  );
4093
4106
  }
4094
4107
  function Ji(e, r) {
4095
- const t = (r == null ? void 0 : r.status) === "success" ? r.options : void 0, n = I(() => ki(t), [t]);
4108
+ const t = (r == null ? void 0 : r.status) === "success" ? r.options : void 0, n = I(() => Ei(t), [t]);
4096
4109
  B(() => {
4097
- Ci(e.value, t) || e.clear();
4110
+ ki(e.value, t) || e.clear();
4098
4111
  }, [e, n, r == null ? void 0 : r.status, t]);
4099
4112
  }
4100
- function Ci(e, r) {
4113
+ function ki(e, r) {
4101
4114
  if (!ue(e) || r === void 0)
4102
4115
  return !0;
4103
4116
  const t = new Set(
@@ -4107,7 +4120,7 @@ function Ci(e, r) {
4107
4120
  (i) => t.has(fr(i))
4108
4121
  );
4109
4122
  }
4110
- function ki(e) {
4123
+ function Ei(e) {
4111
4124
  return JSON.stringify((e || []).map((r) => r.value));
4112
4125
  }
4113
4126
  function fr(e) {
@@ -4125,32 +4138,32 @@ function Yi(e, r = {}) {
4125
4138
  case "metric":
4126
4139
  return {
4127
4140
  queryKind: t.queryKind,
4128
- request: li(t)
4141
+ request: ui(t)
4129
4142
  };
4130
4143
  case "analysis":
4131
4144
  return {
4132
4145
  queryKind: t.queryKind,
4133
- request: di(t)
4146
+ request: li(t)
4134
4147
  };
4135
4148
  case "records":
4136
4149
  return {
4137
4150
  queryKind: t.queryKind,
4138
- request: ui(t)
4151
+ request: ci(t)
4139
4152
  };
4140
4153
  case "inputOptions":
4141
4154
  return {
4142
4155
  queryKind: t.queryKind,
4143
- request: ci(t)
4156
+ request: fi(t)
4144
4157
  };
4145
4158
  case "sql":
4146
4159
  return {
4147
4160
  queryKind: t.queryKind,
4148
- request: fi(t)
4161
+ request: pi(t)
4149
4162
  };
4150
4163
  case "matrix":
4151
4164
  return {
4152
4165
  queryKind: t.queryKind,
4153
- request: pi(t)
4166
+ request: gi(t)
4154
4167
  };
4155
4168
  default:
4156
4169
  return Se(t);
@@ -4177,7 +4190,7 @@ function Yi(e, r = {}) {
4177
4190
  ]
4178
4191
  ), f = O(
4179
4192
  (d) => {
4180
- var K, A, N, $, S, w, L, x, D;
4193
+ var K, T, N, $, S, w, L, x, D;
4181
4194
  const b = n.request;
4182
4195
  if (b.intent)
4183
4196
  switch (n.queryKind) {
@@ -4187,8 +4200,8 @@ function Yi(e, r = {}) {
4187
4200
  d
4188
4201
  );
4189
4202
  case "analysis":
4190
- return (N = (A = d.executor) == null ? void 0 : A.executeAnalysis) == null ? void 0 : N.call(
4191
- A,
4203
+ return (N = (T = d.executor) == null ? void 0 : T.executeAnalysis) == null ? void 0 : N.call(
4204
+ T,
4192
4205
  b.intent,
4193
4206
  d,
4194
4207
  b.analysisOptions
@@ -4220,7 +4233,7 @@ function Yi(e, r = {}) {
4220
4233
  }
4221
4234
  },
4222
4235
  [n]
4223
- ), l = $i(
4236
+ ), l = Di(
4224
4237
  n.request.queryKey,
4225
4238
  f,
4226
4239
  n.request.idleData,
@@ -4241,7 +4254,7 @@ function Yi(e, r = {}) {
4241
4254
  c,
4242
4255
  y
4243
4256
  ]);
4244
- 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, T = i.trace;
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;
4245
4258
  switch (n.queryKind) {
4246
4259
  case "metric": {
4247
4260
  const d = m, b = J({
@@ -4249,7 +4262,7 @@ function Yi(e, r = {}) {
4249
4262
  status: v,
4250
4263
  isLoading: g,
4251
4264
  error: h,
4252
- trace: T,
4265
+ trace: A,
4253
4266
  payload: d,
4254
4267
  activeInputs: n.request.activeInputs,
4255
4268
  isStale: l.isStale
@@ -4260,6 +4273,7 @@ function Yi(e, r = {}) {
4260
4273
  value: (d == null ? void 0 : d.value) ?? null,
4261
4274
  measures: d == null ? void 0 : d.measures,
4262
4275
  measureBindings: d == null ? void 0 : d.measureBindings,
4276
+ missingMeasures: d == null ? void 0 : d.missingMeasures,
4263
4277
  comparisonValue: d == null ? void 0 : d.comparisonValue,
4264
4278
  delta: d == null ? void 0 : d.delta,
4265
4279
  deltaPercent: d == null ? void 0 : d.deltaPercent,
@@ -4273,7 +4287,7 @@ function Yi(e, r = {}) {
4273
4287
  status: v,
4274
4288
  isLoading: g,
4275
4289
  error: h,
4276
- trace: T,
4290
+ trace: A,
4277
4291
  payload: d,
4278
4292
  activeInputs: n.request.activeInputs,
4279
4293
  isStale: l.isStale
@@ -4291,7 +4305,7 @@ function Yi(e, r = {}) {
4291
4305
  status: v,
4292
4306
  isLoading: g,
4293
4307
  error: h,
4294
- trace: T,
4308
+ trace: A,
4295
4309
  payload: d,
4296
4310
  activeInputs: n.request.activeInputs,
4297
4311
  isStale: l.isStale
@@ -4313,7 +4327,7 @@ function Yi(e, r = {}) {
4313
4327
  status: v,
4314
4328
  isLoading: g,
4315
4329
  error: h,
4316
- trace: T,
4330
+ trace: A,
4317
4331
  payload: d,
4318
4332
  activeInputs: n.request.activeInputs,
4319
4333
  isStale: l.isStale
@@ -4331,7 +4345,7 @@ function Yi(e, r = {}) {
4331
4345
  status: v,
4332
4346
  isLoading: g,
4333
4347
  error: h,
4334
- trace: T,
4348
+ trace: A,
4335
4349
  payload: d,
4336
4350
  activeInputs: n.request.activeInputs,
4337
4351
  isStale: l.isStale
@@ -4354,7 +4368,7 @@ function Yi(e, r = {}) {
4354
4368
  status: v,
4355
4369
  isLoading: g,
4356
4370
  error: h,
4357
- trace: T,
4371
+ trace: A,
4358
4372
  payload: d,
4359
4373
  activeInputs: n.request.activeInputs,
4360
4374
  isStale: l.isStale
@@ -4374,7 +4388,7 @@ function Yi(e, r = {}) {
4374
4388
  }
4375
4389
  function J(e) {
4376
4390
  var o, u, f;
4377
- const r = Ei(e.payload) ?? ((o = e.error) == null ? void 0 : o.executionResult), t = ((u = e.error) == null ? void 0 : u.validation) ?? (r == null ? void 0 : r.validation), n = r == null ? void 0 : r.coverage, i = r == null ? void 0 : r.diagnosticFeedback;
4391
+ const r = Ri(e.payload) ?? ((o = e.error) == null ? void 0 : o.executionResult), t = ((u = e.error) == null ? void 0 : u.validation) ?? (r == null ? void 0 : r.validation), n = r == null ? void 0 : r.coverage, i = r == null ? void 0 : r.diagnosticFeedback;
4378
4392
  return {
4379
4393
  status: e.status,
4380
4394
  executionStatus: r == null ? void 0 : r.status,
@@ -4383,8 +4397,8 @@ function J(e) {
4383
4397
  coverage: n,
4384
4398
  diagnosticFeedback: i,
4385
4399
  isLoading: e.isLoading,
4386
- isEmpty: Li(e.queryKind, e.payload, e.status),
4387
- isPartial: Ri(e.payload, r),
4400
+ isEmpty: $i(e.queryKind, e.payload, e.status),
4401
+ isPartial: Li(e.payload, r),
4388
4402
  isFiltered: !!((f = e.activeInputs) != null && f.some(
4389
4403
  (l) => l.kind === "filter" && l.isActive
4390
4404
  )),
@@ -4394,16 +4408,16 @@ function J(e) {
4394
4408
  trace: e.trace
4395
4409
  };
4396
4410
  }
4397
- function Ei(e) {
4411
+ function Ri(e) {
4398
4412
  const r = e;
4399
4413
  return r == null ? void 0 : r.executionResult;
4400
4414
  }
4401
- function Ri(e, r) {
4415
+ function Li(e, r) {
4402
4416
  var n, i;
4403
4417
  const t = !!(e != null && e.rowLimitExceeded);
4404
4418
  return !!((r == null ? void 0 : r.status) === "partial" || ((n = r == null ? void 0 : r.diagnosticFeedback) == null ? void 0 : n.status) === "partial" || (r == null ? void 0 : r.status) !== "failed" && ((i = r == null ? void 0 : r.coverage) != null && i.missingObligations.length) || t);
4405
4419
  }
4406
- function Li(e, r, t) {
4420
+ function $i(e, r, t) {
4407
4421
  var n, i, o, u, f;
4408
4422
  if (t !== "success")
4409
4423
  return !1;
@@ -4441,8 +4455,8 @@ function Li(e, r, t) {
4441
4455
  function _(e) {
4442
4456
  return Array.isArray(e) && e.length > 0;
4443
4457
  }
4444
- function $i(e, r, t, n, i) {
4445
- const o = Ai(), u = E(r), f = E(n), [l, c] = F({
4458
+ function Di(e, r, t, n, i) {
4459
+ const o = Ci(), u = E(r), f = E(n), [l, c] = F({
4446
4460
  status: "idle",
4447
4461
  data: t,
4448
4462
  error: null,
@@ -4495,7 +4509,7 @@ function _r() {
4495
4509
  function pr(e) {
4496
4510
  return Math.max(0, Math.round(_r() - e));
4497
4511
  }
4498
- function Di(e) {
4512
+ function Oi(e) {
4499
4513
  return Object.fromEntries(
4500
4514
  e.filter((r) => r.defaultValue !== void 0).map((r) => [r.id, r.defaultValue])
4501
4515
  );
@@ -4503,7 +4517,7 @@ function Di(e) {
4503
4517
  function Se(e) {
4504
4518
  throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
4505
4519
  }
4506
- function Oi(e) {
4520
+ function Bi(e) {
4507
4521
  return !e || typeof e == "boolean" || e.enabled === !1 ? null : e.autoRenderDevtools === !0 ? {} : e.autoRenderDevtools ? e.autoRenderDevtools : null;
4508
4522
  }
4509
4523
  function Xi({
@@ -4514,7 +4528,7 @@ function Xi({
4514
4528
  children: i
4515
4529
  }) {
4516
4530
  var g;
4517
- 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 = Oi(l), y = I(() => mi(), []), m = t || y, v = I(
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(
4518
4532
  () => ({
4519
4533
  token: u,
4520
4534
  apiBaseUrl: f,
@@ -4533,10 +4547,10 @@ export {
4533
4547
  Bt as SemaphorDevtools,
4534
4548
  Qi as SemaphorDevtoolsInspectButton,
4535
4549
  Vi as SemaphorViewBoundary,
4536
- mi as createSemaphorQueryExecutor,
4550
+ yi as createSemaphorQueryExecutor,
4537
4551
  Mi as defineSemaphorDataApp,
4538
4552
  ji as defineSemaphorInput,
4539
- Ci as isSemaphorInputValueValidForOptions,
4553
+ ki as isSemaphorInputValueValidForOptions,
4540
4554
  Hi as semaphor,
4541
4555
  ro as semaphorMetricMeasureBindingKey,
4542
4556
  Ji as useClearInvalidSemaphorInputValue,