react-semaphor 0.1.559 → 0.1.561

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 (168) hide show
  1. package/dist/analytics-protocol/index.js +389 -378
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +9 -9
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/analytics-base-schemas-CB3oFAXk.js +658 -0
  7. package/dist/chunks/{assistant-chat-B_4bVE6I.js → assistant-chat-DiVHY3Hw.js} +209 -211
  8. package/dist/chunks/bookmark-impact-CR09dpkn.js +75 -0
  9. package/dist/chunks/bookmark-state-BusLpkb7.js +743 -0
  10. package/dist/chunks/{braces-Rdxa3H-s.js → braces-u8VorWJc.js} +1 -1
  11. package/dist/chunks/{comparison-window-caption-CKzQ5LcF.js → comparison-window-caption-DDsIWJYT.js} +201 -201
  12. package/dist/chunks/{context-DVy4HOU0.js → context-TUjw9eqr.js} +1 -1
  13. package/dist/chunks/{custom-visual-inputs-zVa9wX_o.js → custom-visual-inputs-DfolidZ9.js} +1 -1
  14. package/dist/chunks/{dashboard-BziwOVpZ.js → dashboard-BRdZBPqr.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CbeNR-YI.js → dashboard-briefing-launcher-CgvTLndW.js} +1163 -1178
  16. package/dist/chunks/{dashboard-controls-RD6UJs1r.js → dashboard-controls-B4vfSzTF.js} +877 -941
  17. package/dist/chunks/{dashboard-json-DGpv17vL.js → dashboard-json-Y3MF59g7.js} +5 -5
  18. package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +1718 -0
  19. package/dist/chunks/{edit-dashboard-visual-AQ2pQkFp.js → edit-dashboard-visual-DwjZcxj-.js} +9080 -9354
  20. package/dist/chunks/filter-reach-copy-bijwf_-b.js +3596 -0
  21. package/dist/chunks/{filter-value-text-B4l-xqJT.js → filter-value-text-DFnhwuEW.js} +3 -3
  22. package/dist/chunks/global-date-filter-utils-BXgCpvQM.js +15142 -0
  23. package/dist/chunks/{index-B1Xr7W24.js → index-ClwbY3BL.js} +648 -674
  24. package/dist/chunks/{layout-grid-Bbz3zKif.js → layout-grid-CtvCBfOm.js} +1 -1
  25. package/dist/chunks/{list-filter-3sbH0Uy1.js → list-filter-BklYgciR.js} +1 -1
  26. package/dist/chunks/{matrix-analytical-definition-CEe3PGEo.js → matrix-analytical-definition-pU51-JmY.js} +4 -4
  27. package/dist/chunks/{matrix-card-BRNGb1C4.js → matrix-card-CUorIB7Q.js} +3 -3
  28. package/dist/chunks/{matrix-member-presentation-CEegvTqg.js → matrix-member-presentation-Df5UgCGN.js} +1 -1
  29. package/dist/chunks/{matrix-operation-contract-COxrfQTS.js → matrix-operation-contract-BSiGEXVC.js} +221 -214
  30. package/dist/chunks/{metric-comparison-DQx-uX__.js → metric-comparison-95aC0uEO.js} +6 -6
  31. package/dist/chunks/{model-change-CJEj3ZD6.js → model-change-B5wQhg5G.js} +1 -1
  32. package/dist/chunks/{palette-DMJtp3Vn.js → palette-DTnMhipt.js} +1 -1
  33. package/dist/chunks/pivot-result-contract-expectations-Bo-86vwS.js +56 -0
  34. package/dist/chunks/{pivot-result-identity-CAj8SiRL.js → pivot-result-identity-olvXJoB9.js} +1 -1
  35. package/dist/chunks/{report-preferences-dialog-0sc8B1lh.js → report-preferences-dialog-C2YUIwKG.js} +55 -55
  36. package/dist/chunks/{report-runtime-context-bYoExeWr.js → report-runtime-context-DoIUr3MP.js} +2 -2
  37. package/dist/chunks/resolve-dashboard-input-context-q_iiNXE1.js +6503 -0
  38. package/dist/chunks/{save-DSb1jTtG.js → save-DH4RyrnG.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-BQWM3ldX.js → saved-dashboard-context-8jqfI7hI.js} +59 -59
  40. package/dist/chunks/{selection-reducer-DSzMWb4x.js → selection-reducer-CV7K4FI6.js} +1 -1
  41. package/dist/chunks/{semaphor-ready-indicator-Bz14Oma5.js → semaphor-ready-indicator-E2XWyibu.js} +40105 -41658
  42. package/dist/chunks/{shelf-drop-preview-context-DBHAkgch.js → shelf-drop-preview-context-C29EUzDp.js} +570 -570
  43. package/dist/chunks/{source-entity-resolution-BOrmNCEM.js → source-entity-resolution-BXI3nQ5Z.js} +1 -1
  44. package/dist/chunks/{switch-Dq8XPFpT.js → switch-balDSHc7.js} +3 -3
  45. package/dist/chunks/{table-export-sheet-C_RvEUyO.js → table-export-sheet-CK8tvh4d.js} +1 -1
  46. package/dist/chunks/temporal-input-presentation-B77JsAzU.js +5002 -0
  47. package/dist/chunks/{token-types-LCYMJ3pa.js → token-types-DhYH5YKb.js} +1 -1
  48. package/dist/chunks/{upload-Dr_WAxHQ.js → upload-Ufj8vjyn.js} +1 -1
  49. package/dist/chunks/{use-create-flow-overlay-state-BK3YFkfc.js → use-create-flow-overlay-state-9WsnzEO5.js} +6 -6
  50. package/dist/chunks/{validators-C87JPd-_.js → validators-BtaCFIEB.js} +1206 -1579
  51. package/dist/chunks/{zoned-wall-clock-E35Frf9v.js → zoned-wall-clock-CGLVI40Q.js} +1 -1
  52. package/dist/dashboard/index.js +2 -2
  53. package/dist/dashboard-authoring/index.js +2713 -1459
  54. package/dist/data-app-sdk/index.js +20 -20
  55. package/dist/data-app-sdk-adapters/index.js +3 -3
  56. package/dist/data-app-sdk-validation/index.js +10 -10
  57. package/dist/format-utils/index.js +262 -256
  58. package/dist/index.js +214 -215
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
  63. package/dist/types/components/editor/editor-aside/utils.d.ts +1 -1
  64. package/dist/types/components/visual/data-table/types/data-table.d.ts +5 -20
  65. package/dist/types/index.js +50 -51
  66. package/dist/types/lib/formatters/canonical-format-adapter.d.ts +2 -29
  67. package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
  68. package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
  69. package/dist/types/lib/formatters/table-column-settings.d.ts +47 -0
  70. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +10 -188
  71. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
  72. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +16 -372
  73. package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
  74. package/dist/types/lib/stores/editor-store.d.ts +48 -10
  75. package/dist/types/lib/stores/table-actions.d.ts +9 -5
  76. package/dist/types/lib/table-formatting/index.d.ts +0 -2
  77. package/dist/types/lib/table-formatting/table-conditional-formatting-range-source.d.ts +3 -2
  78. package/dist/types/lib/table-formatting/table-conditional-formatting-range.d.ts +3 -2
  79. package/dist/types/lib/table-formatting/table-formatting-normalize.d.ts +1 -2
  80. package/dist/types/lib/table-formatting/table-formatting-render-model.d.ts +9 -0
  81. package/dist/types/lib/table-formatting/table-formatting-types.d.ts +5 -95
  82. package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +35 -0
  83. package/dist/types/lib/types/common-types.d.ts +40 -47
  84. package/dist/types/lib/types/explorer-types.d.ts +11 -43
  85. package/dist/types/lib/utils/card-config-utils.d.ts +8 -0
  86. package/dist/types/lib/utils/card-definition.d.ts +9 -187
  87. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +169 -513
  88. package/dist/types/shared/analytics-protocol/contracts.d.ts +32 -9
  89. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +108 -980
  90. package/dist/types/shared/analytics-protocol/field-validation.d.ts +1 -0
  91. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +281 -4624
  92. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +20 -20
  93. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +18 -18
  94. package/dist/types/shared/analytics-protocol/matrix-path-contract.d.ts +40 -40
  95. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +3 -203
  96. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
  97. package/dist/types/shared/analytics-protocol/scalar-value.d.ts +8 -8
  98. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -0
  99. package/dist/types/shared/assistant-protocol/context.d.ts +69 -69
  100. package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +13 -0
  101. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +4 -1
  102. package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +10 -0
  103. package/dist/types/shared/dashboard-authoring/card-formats/upgrade-card-formats.d.ts +57 -0
  104. package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
  105. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +52 -0
  106. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
  107. package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
  108. package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
  109. package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
  110. package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
  111. package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
  112. package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
  113. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +15 -0
  114. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +102 -0
  115. package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
  116. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
  117. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
  118. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +40 -0
  119. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +28 -0
  120. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
  121. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
  122. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +555 -38
  123. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +27 -8
  124. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +25 -1
  125. package/dist/types/shared/dashboard-authoring/conditional-formatting/editable.d.ts +14 -0
  126. package/dist/types/shared/dashboard-authoring/conditional-formatting/evaluate.d.ts +16 -0
  127. package/dist/types/shared/dashboard-authoring/conditional-formatting/index.d.ts +9 -0
  128. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +7 -0
  129. package/dist/types/shared/dashboard-authoring/conditional-formatting/resolve-card-column-ref.d.ts +17 -0
  130. package/dist/types/shared/dashboard-authoring/conditional-formatting/retain.d.ts +14 -0
  131. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +4499 -0
  132. package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +12 -0
  133. package/dist/types/shared/dashboard-authoring/conditional-formatting/types.d.ts +151 -0
  134. package/dist/types/shared/dashboard-authoring/conditional-formatting/upgrade.d.ts +35 -0
  135. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +62 -62
  136. package/dist/types/shared/dashboard-authoring/index.d.ts +8 -0
  137. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
  138. package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -5
  139. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +24 -736
  140. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +21 -1
  141. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +10 -4
  142. package/dist/types/shared/dashboard-authoring/retired-presentation-fields.d.ts +31 -0
  143. package/dist/types/shared/dashboard-authoring/upgrade-card-presentation.d.ts +14 -0
  144. package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
  145. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +13 -2
  146. package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +16 -0
  147. package/dist/types/shared/format-utils/index.d.ts +2 -0
  148. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +10 -366
  149. package/dist/types/shared/format-utils/raw-temporal.d.ts +31 -1
  150. package/dist/types/shared/format-utils/resolve-column-format.d.ts +43 -0
  151. package/dist/types/shared/format-utils/retired-format-adapters.d.ts +68 -0
  152. package/dist/types/shared/format-utils/semantic-format.d.ts +5 -1
  153. package/dist/types/shared/format-utils/stored-value-format.d.ts +16 -0
  154. package/dist/types/shared/format-utils/types/format-types.d.ts +10 -12
  155. package/package.json +2 -2
  156. package/dist/chunks/analytics-base-schemas-BUFUoO6G.js +0 -472
  157. package/dist/chunks/bookmark-state-ssqrs5oP.js +0 -111
  158. package/dist/chunks/document-dashboard-inputs-ChVkcBuu.js +0 -3010
  159. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +0 -15
  160. package/dist/chunks/filter-reach-copy-B5Y7FHzg.js +0 -3411
  161. package/dist/chunks/global-date-filter-utils-DBzEOX9M.js +0 -12222
  162. package/dist/chunks/pivot-result-contract-expectations-DOYhqeZb.js +0 -1926
  163. package/dist/chunks/raw-temporal-presentation-BmT7z6NH.js +0 -584
  164. package/dist/chunks/resolve-dashboard-input-context-B_C_VAJH.js +0 -5520
  165. package/dist/chunks/table-settings-DXj_zXwS.js +0 -637
  166. package/dist/chunks/temporal-input-presentation-AhLSkGPf.js +0 -2939
  167. package/dist/types/lib/table-formatting/table-conditional-formatting-evaluator.d.ts +0 -9
  168. package/dist/types/lib/table-formatting/table-formatting-validation.d.ts +0 -12
@@ -1,6 +1,6 @@
1
1
  import { z as t } from "zod";
2
- import { z as je, E as Fe, F as Le, I as Ue, J as qe, s as U, x as $, n as De, C as Me, D as ce, f as Be, r as Ge, y as ze, m as Ve, o as We, a as le, u as Xe } from "./analytics-base-schemas-BUFUoO6G.js";
3
- import { R as w, K as ue, Y as G, a_ as ee, t as A, S as Ke, aU as Z, a$ as $e, M as Ze, s as Ye, H as de, ag as He, r as Qe, m as Je } from "./validators-C87JPd-_.js";
2
+ import { x as je, K as Fe, U as Le, V as Ue, Y as qe, Z as De, s as U, I as Z, n as Me, P as Be, Q as ce, g as Ge, r as ze, J as Ve, B as We, C as Ke, b as le, F as Xe } from "./analytics-base-schemas-CB3oFAXk.js";
3
+ import { R as w, K as ue, Y as G, a_ as ee, t as A, S as Ze, aU as $, M as $e, s as Ye, H as de, ag as He, r as Qe, aj as Je, m as et } from "./validators-BtaCFIEB.js";
4
4
  const Y = {
5
5
  answerSummary: "string",
6
6
  responseDetail: "responseDetail",
@@ -61,7 +61,7 @@ const Y = {
61
61
  "timeout",
62
62
  "budget_exceeded",
63
63
  "cancelled"
64
- ], et = {
64
+ ], tt = {
65
65
  invalid_request: 400,
66
66
  missing_relationship: 400,
67
67
  ambiguous_relationship: 400,
@@ -74,29 +74,29 @@ const Y = {
74
74
  timeout: 504,
75
75
  budget_exceeded: 413,
76
76
  cancelled: 499
77
- }, tt = /* @__PURE__ */ new Set(["execution_failed", "timeout"]);
78
- function nt(e) {
77
+ }, nt = /* @__PURE__ */ new Set(["execution_failed", "timeout"]);
78
+ function at(e) {
79
79
  return typeof e == "string" && me.includes(e);
80
80
  }
81
- function at(e, n, a = {}) {
81
+ function rt(e, n, a = {}) {
82
82
  return {
83
83
  code: e,
84
84
  message: n,
85
85
  ...a.details ? { details: a.details } : {},
86
86
  ...a.nextStep ? { nextStep: a.nextStep } : {},
87
- retryable: tt.has(e),
88
- status: a.status ?? et[e]
87
+ retryable: nt.has(e),
88
+ status: a.status ?? tt[e]
89
89
  };
90
90
  }
91
- function sn(e) {
91
+ function cn(e) {
92
92
  if (!e || typeof e != "object") return;
93
93
  const n = e.refusal ?? e;
94
94
  if (!n || typeof n != "object") return;
95
95
  const { code: a, message: r } = n;
96
- if (!(!nt(a) || typeof r != "string"))
96
+ if (!(!at(a) || typeof r != "string"))
97
97
  return n;
98
98
  }
99
- const rt = {
99
+ const st = {
100
100
  invalid_request: { message: "This query configuration cannot run.", nextStep: "Check the selected fields, filters and parameters." },
101
101
  missing_relationship: { message: "The selected data is not connected.", nextStep: "Choose related datasets or ask the owner to add a relationship." },
102
102
  ambiguous_relationship: { message: "The selected data has more than one relationship path.", nextStep: "Choose the relationship to use." },
@@ -110,29 +110,29 @@ const rt = {
110
110
  budget_exceeded: { message: "The query exceeds this view’s limits.", nextStep: "Request fewer rows, columns or measures." },
111
111
  cancelled: { message: "The query was cancelled.", nextStep: "Reload the view when ready." }
112
112
  };
113
- function on(e) {
114
- const n = rt[e.code], a = at(e.code, n.message, { nextStep: n.nextStep, status: e.status }), r = e.retryable ?? a.retryable;
113
+ function ln(e) {
114
+ const n = st[e.code], a = rt(e.code, n.message, { nextStep: n.nextStep, status: e.status }), r = e.retryable ?? a.retryable;
115
115
  return {
116
116
  ...a,
117
117
  retryable: r,
118
118
  ...!r && a.retryable ? { nextStep: "Ask the owner to check the query." } : {}
119
119
  };
120
120
  }
121
- const st = [
121
+ const ot = [
122
122
  ...me,
123
123
  "stale_cursor",
124
124
  "source_truncated"
125
- ], cn = Object.freeze({
125
+ ], un = Object.freeze({
126
126
  coordinates: 2e4,
127
127
  responseBytes: 5 * 1024 * 1024
128
- }), O = t.string().uuid(), y = t.string().min(1), ot = t.number().int().positive().max(Number.MAX_SAFE_INTEGER);
128
+ }), O = t.string().uuid(), y = t.string().min(1), it = t.number().int().positive().max(Number.MAX_SAFE_INTEGER);
129
129
  function f(e, n, a) {
130
130
  e.addIssue({ code: "custom", path: n, message: a });
131
131
  }
132
132
  function v(e, n, a) {
133
133
  new Set(e).size !== e.length && f(n, a, "Duplicate identity.");
134
134
  }
135
- const it = t.object({
135
+ const ct = t.object({
136
136
  id: y,
137
137
  axis: ue,
138
138
  parent: w,
@@ -140,18 +140,18 @@ const it = t.object({
140
140
  t.object({ kind: t.literal("first") }).strict(),
141
141
  t.object({ kind: t.enum(["after", "before"]), cursor: y }).strict()
142
142
  ]),
143
- size: ot
143
+ size: it
144
144
  }).strict(), te = t.object({
145
145
  paths: t.array(w).readonly(),
146
146
  pageIds: t.array(y).readonly()
147
- }).strict(), ct = t.object({
147
+ }).strict(), lt = t.object({
148
148
  id: y,
149
149
  rows: te,
150
150
  columns: te,
151
151
  measureIds: t.array(O).min(1).readonly()
152
152
  }).strict(), pe = t.object({
153
- pages: t.array(it).readonly(),
154
- blocks: t.array(ct).readonly()
153
+ pages: t.array(ct).readonly(),
154
+ blocks: t.array(lt).readonly()
155
155
  }).strict().superRefine((e, n) => {
156
156
  !e.pages.length && !e.blocks.length && f(n, [], "Request at least one page or block."), v(
157
157
  [...e.pages, ...e.blocks].map((a) => a.id),
@@ -170,7 +170,7 @@ const it = t.object({
170
170
  "Page reference must name a page on this axis in this operation."
171
171
  );
172
172
  }
173
- }), ln = t.object({ spec: G, request: pe }).strict().superRefine(({ spec: e, request: n }, a) => {
173
+ }), dn = t.object({ spec: G, request: pe }).strict().superRefine(({ spec: e, request: n }, a) => {
174
174
  for (const r of n.pages)
175
175
  ee(
176
176
  e,
@@ -190,7 +190,7 @@ const it = t.object({
190
190
  for (const c of r[s].paths)
191
191
  ee(e, s, c, a, ["blocks", r.id, s]);
192
192
  }
193
- }), lt = t.object({
193
+ }), ut = t.object({
194
194
  requestId: y,
195
195
  axis: ue,
196
196
  parent: w,
@@ -229,11 +229,11 @@ function fe(e, n) {
229
229
  const a = e.rowPaths.map(A), r = e.columnPaths.map(A);
230
230
  return v(a, n, ["coverage", "rowPaths"]), v(r, n, ["coverage", "columnPaths"]), v(e.measureIds, n, ["coverage", "measureIds"]), { rows: a, columns: r };
231
231
  }
232
- const ut = t.object({
232
+ const dt = t.object({
233
233
  requestId: y,
234
234
  coverage: he,
235
235
  cells: t.array(
236
- Ke.extend({ value: Z }).strict()
236
+ Ze.extend({ value: $ }).strict()
237
237
  ).readonly()
238
238
  }).strict().superRefine((e, n) => {
239
239
  const { rows: a, columns: r } = fe(e.coverage, n), s = new Set(a), c = new Set(r), i = new Set(e.coverage.measureIds);
@@ -250,11 +250,11 @@ const ut = t.object({
250
250
  );
251
251
  for (const l of e.cells)
252
252
  (!s.has(A(l.rowPath)) || !c.has(A(l.columnPath)) || !i.has(l.measureId)) && f(n, ["cells"], "Cell is outside certified coverage.");
253
- }), q = t.number().int().nonnegative(), dt = t.object({
253
+ }), q = t.number().int().nonnegative(), mt = t.object({
254
254
  requestId: y,
255
255
  coverage: he,
256
256
  values: t.array(
257
- t.tuple([q, q, q, Z]).readonly()
257
+ t.tuple([q, q, q, $]).readonly()
258
258
  ).readonly()
259
259
  }).strict().superRefine((e, n) => {
260
260
  fe(e.coverage, n);
@@ -269,14 +269,14 @@ const ut = t.object({
269
269
  }
270
270
  }), ne = t.object({
271
271
  id: O,
272
- column: je,
272
+ column: Fe,
273
273
  nativeDataType: y,
274
- semanticFormat: $e.optional()
274
+ semanticFormat: je.optional()
275
275
  }).strict(), ge = t.object({
276
276
  levels: t.array(ne).readonly(),
277
277
  measures: t.array(ne).readonly()
278
278
  }).strict(), H = t.object({
279
- code: t.enum(st),
279
+ code: t.enum(ot),
280
280
  message: y,
281
281
  /** Technical cause for dashboard owners; never shown as the primary copy. */
282
282
  detail: y.optional(),
@@ -288,16 +288,16 @@ const ut = t.object({
288
288
  t.object({ kind: t.literal("operation") }).strict(),
289
289
  t.object({ kind: t.enum(["page", "block"]), requestId: y }).strict()
290
290
  ])
291
- }).strict(), mt = t.object({
291
+ }).strict(), pt = t.object({
292
292
  dialect: t.enum(["postgres", "clickhouse", "duckdb", "snowflake"]),
293
- aggregates: t.array(Ze).readonly()
293
+ aggregates: t.array($e).readonly()
294
294
  }).strict();
295
295
  function ye(e) {
296
296
  return t.object({
297
297
  queryIdentity: y,
298
298
  descriptors: ge,
299
- capabilities: mt,
300
- pages: t.array(lt).readonly(),
299
+ capabilities: pt,
300
+ pages: t.array(ut).readonly(),
301
301
  blocks: t.array(e).readonly(),
302
302
  failures: t.array(H).readonly()
303
303
  }).strict().superRefine((n, a) => {
@@ -356,9 +356,9 @@ function ye(e) {
356
356
  });
357
357
  }
358
358
  const Se = ye(
359
- ut
360
- ), pt = ye(
361
359
  dt
360
+ ), ht = ye(
361
+ mt
362
362
  );
363
363
  function be(e) {
364
364
  return t.union([
@@ -378,12 +378,12 @@ function be(e) {
378
378
  ), r.status === "success" != (s.failures.length === 0) && f(a, ["status"], "Status must match failure coverage.");
379
379
  });
380
380
  }
381
- const un = be(
381
+ const mn = be(
382
382
  Se
383
- ), dn = be(
384
- pt
383
+ ), pn = be(
384
+ ht
385
385
  );
386
- function ht(e) {
386
+ function ft(e) {
387
387
  const { rowPaths: n, columnPaths: a, measureIds: r } = e.coverage, s = (m) => new Map(m.map((o, d) => [o, d])), c = s(n.map(A)), i = s(a.map(A)), l = s(r);
388
388
  return {
389
389
  requestId: e.requestId,
@@ -396,7 +396,7 @@ function ht(e) {
396
396
  })
397
397
  };
398
398
  }
399
- function ft(e) {
399
+ function gt(e) {
400
400
  const { rowPaths: n, columnPaths: a, measureIds: r } = e.coverage;
401
401
  return {
402
402
  requestId: e.requestId,
@@ -409,19 +409,19 @@ function ft(e) {
409
409
  }))
410
410
  };
411
411
  }
412
- function gt(e) {
413
- return { ...e, blocks: e.blocks.map(ht) };
414
- }
415
- function mn(e) {
412
+ function yt(e) {
416
413
  return { ...e, blocks: e.blocks.map(ft) };
417
414
  }
418
- function pn(e) {
419
- return e.status === "failed" ? e : { status: e.status, window: gt(e.window) };
415
+ function hn(e) {
416
+ return { ...e, blocks: e.blocks.map(gt) };
417
+ }
418
+ function fn(e) {
419
+ return e.status === "failed" ? e : { status: e.status, window: yt(e.window) };
420
420
  }
421
421
  const Ae = t.object({
422
422
  kind: t.literal("matrix"),
423
423
  window: Se
424
- }).strict(), Ie = t.enum(["member", "subtotal", "grand_total"]), yt = t.discriminatedUnion("kind", [
424
+ }).strict(), Ie = t.enum(["member", "subtotal", "grand_total"]), St = t.discriminatedUnion("kind", [
425
425
  t.object({ kind: t.literal("hierarchy"), label: t.string() }).strict(),
426
426
  t.object({ kind: t.literal("level"), levelId: O, label: t.string() }).strict(),
427
427
  t.object({
@@ -431,18 +431,18 @@ const Ae = t.object({
431
431
  role: Ie,
432
432
  label: t.string()
433
433
  }).strict()
434
- ]), St = t.object({
435
- columns: t.array(yt).readonly(),
434
+ ]), bt = t.object({
435
+ columns: t.array(St).readonly(),
436
436
  descriptors: ge
437
437
  }).strict(), ae = t.union([
438
438
  t.object({
439
439
  kind: t.literal("value"),
440
- value: Z.refine(
440
+ value: $.refine(
441
441
  (e) => e !== null
442
442
  )
443
443
  }).strict(),
444
444
  t.object({ kind: t.enum(["null", "empty"]) }).strict()
445
- ]), bt = t.discriminatedUnion("kind", [
445
+ ]), At = t.discriminatedUnion("kind", [
446
446
  t.object({
447
447
  kind: t.literal("layout"),
448
448
  rowPath: w,
@@ -455,24 +455,24 @@ const Ae = t.object({
455
455
  columnPath: w,
456
456
  values: t.array(ae).readonly()
457
457
  }).strict()
458
- ]), hn = t.discriminatedUnion("kind", [
458
+ ]), gn = t.discriminatedUnion("kind", [
459
459
  t.object({
460
460
  kind: t.literal("layout"),
461
- layout: St,
461
+ layout: bt,
462
462
  next: y
463
463
  }).strict(),
464
464
  t.object({
465
465
  kind: t.literal("rows"),
466
- rows: t.array(bt).readonly(),
466
+ rows: t.array(At).readonly(),
467
467
  next: y.nullable()
468
468
  }).strict()
469
- ]), At = t.union([
470
- Fe,
469
+ ]), It = t.union([
471
470
  Le,
472
471
  Ue,
473
472
  qe,
473
+ De,
474
474
  Ae
475
- ]), It = t.object({
475
+ ]), _t = t.object({
476
476
  status: t.enum([
477
477
  "not_required",
478
478
  "resolved",
@@ -516,7 +516,7 @@ const Ae = t.object({
516
516
  queryId: t.string().optional(),
517
517
  summary: t.string(),
518
518
  evidenceIds: t.array(t.string()).optional(),
519
- fieldsUsed: t.array($).optional()
519
+ fieldsUsed: t.array(Z).optional()
520
520
  }).passthrough()
521
521
  ),
522
522
  blocked: t.array(
@@ -543,11 +543,11 @@ const Ae = t.object({
543
543
  ).optional()
544
544
  }).passthrough(), ke = t.object({
545
545
  scope: t.literal("filtered_query"),
546
- measures: t.record(De)
546
+ measures: t.record(Me)
547
547
  }).passthrough(), we = t.object({
548
548
  answeredObligations: t.array(t.string()),
549
549
  missingObligations: t.array(t.string()),
550
- warnings: t.array(Me).optional()
550
+ warnings: t.array(Be).optional()
551
551
  }).passthrough(), ve = t.object({
552
552
  intentId: t.string().optional(),
553
553
  queryId: t.string().optional(),
@@ -563,39 +563,39 @@ const Ae = t.object({
563
563
  ]).optional(),
564
564
  intent: t.unknown().optional(),
565
565
  compiledQuery: t.unknown().optional(),
566
- fieldsUsed: t.array($).optional(),
567
- result: At.optional(),
566
+ fieldsUsed: t.array(Z).optional(),
567
+ result: It.optional(),
568
568
  validation: ce,
569
569
  coverage: we.optional(),
570
570
  missingFields: t.array(t.string()).optional(),
571
571
  warnings: t.array(t.string()).optional(),
572
- relationshipDiagnostics: It.optional(),
572
+ relationshipDiagnostics: _t.optional(),
573
573
  diagnosticFeedback: _e.optional(),
574
574
  population: ke.optional(),
575
575
  metadata: t.record(t.string(), t.unknown()).optional()
576
- }).passthrough(), _t = ve;
577
- function kt(e) {
576
+ }).passthrough(), kt = ve;
577
+ function wt(e) {
578
578
  switch (e) {
579
579
  case "boolean":
580
580
  return t.boolean().optional();
581
581
  case "compactExecutionFieldArray":
582
- return t.array(ze).optional();
582
+ return t.array(Ve).optional();
583
583
  case "coverage":
584
584
  return we.optional();
585
585
  case "diagnosticFeedback":
586
586
  return _e.optional();
587
587
  case "executionFieldArray":
588
- return t.array($).optional();
588
+ return t.array(Z).optional();
589
589
  case "executionResult":
590
- return _t.optional();
590
+ return kt.optional();
591
591
  case "number":
592
592
  return t.number().finite().optional();
593
593
  case "population":
594
594
  return ke.optional();
595
595
  case "record":
596
- return Ge.optional();
596
+ return ze.optional();
597
597
  case "recordArray":
598
- return Be.optional();
598
+ return Ge.optional();
599
599
  case "responseDetail":
600
600
  return t.enum(["compact", "standard", "debug"]).optional();
601
601
  case "string":
@@ -610,32 +610,32 @@ function kt(e) {
610
610
  return ce.optional();
611
611
  }
612
612
  }
613
- const wt = Object.fromEntries(
613
+ const vt = Object.fromEntries(
614
614
  Object.entries(Y).map(
615
- ([e, n]) => [e, kt(n)]
615
+ ([e, n]) => [e, wt(n)]
616
616
  )
617
- ), vt = t.object(wt).strict(), Tt = new Set(
617
+ ), Tt = t.object(vt).strict(), Et = new Set(
618
618
  Object.keys(Y)
619
619
  );
620
- function fn() {
620
+ function yn() {
621
621
  return Object.keys(
622
622
  Y
623
623
  );
624
624
  }
625
- function Et(e) {
626
- return Tt.has(e);
625
+ function Rt(e) {
626
+ return Et.has(e);
627
627
  }
628
- function gn(e) {
628
+ function Sn(e) {
629
629
  if (!e || typeof e != "object" || Array.isArray(e))
630
630
  throw new Error("Semaphor analyze result must be an object.");
631
631
  const a = Object.keys(e).filter(
632
- (r) => !Et(r)
632
+ (r) => !Rt(r)
633
633
  );
634
634
  if (a.length)
635
635
  throw new Error(
636
636
  `Semaphor analyze result contains unsupported top-level field(s): ${a.join(", ")}.`
637
637
  );
638
- return vt.parse(e);
638
+ return Tt.parse(e);
639
639
  }
640
640
  const Te = 100, F = "selection:";
641
641
  function Ee(e) {
@@ -645,14 +645,14 @@ function Ee(e) {
645
645
  e.sourceField ?? ""
646
646
  ].join("::");
647
647
  }
648
- function yn(e) {
648
+ function bn(e) {
649
649
  return `${F}${e}`;
650
650
  }
651
- function Rt(e) {
651
+ function Ct(e) {
652
652
  return e.startsWith(F) && e.length > F.length;
653
653
  }
654
- function Sn(e) {
655
- return Rt(e) ? e.slice(F.length) : void 0;
654
+ function An(e) {
655
+ return Ct(e) ? e.slice(F.length) : void 0;
656
656
  }
657
657
  function Re(e) {
658
658
  if (!e) return "";
@@ -664,7 +664,7 @@ function Re(e) {
664
664
  n ? [n.kind, n.yearStartMonth] : null
665
665
  ]);
666
666
  }
667
- function Ct(e) {
667
+ function Nt(e) {
668
668
  return JSON.stringify([
669
669
  Ee(e.field),
670
670
  e.operator,
@@ -673,7 +673,7 @@ function Ct(e) {
673
673
  ]);
674
674
  }
675
675
  function se(e) {
676
- return JSON.stringify(e.conditions.map(Ct).sort());
676
+ return JSON.stringify(e.conditions.map(Nt).sort());
677
677
  }
678
678
  function z(e) {
679
679
  return JSON.stringify([
@@ -689,7 +689,7 @@ function oe(e) {
689
689
  e.conditions.map(z).sort()
690
690
  );
691
691
  }
692
- function bn(e) {
692
+ function In(e) {
693
693
  const n = e.map((a) => a.id);
694
694
  if (new Set(n).size !== n.length)
695
695
  throw new Error("Data App selections require one active selection per id.");
@@ -714,23 +714,23 @@ function bn(e) {
714
714
  function D(e, n) {
715
715
  return e < n ? -1 : e > n ? 1 : 0;
716
716
  }
717
- function An(e, n) {
717
+ function _n(e, n) {
718
718
  return se(e) === se(n);
719
719
  }
720
- const Nt = "(Blank)";
721
- function In(e) {
722
- return e.conditions.map((n) => n.label ? n.label : n.operator === "isNull" || n.value === null ? Nt : String(n.value)).join(" · ");
720
+ const Ot = "(Blank)";
721
+ function kn(e) {
722
+ return e.conditions.map((n) => n.label ? n.label : n.operator === "isNull" || n.value === null ? Ot : String(n.value)).join(" · ");
723
723
  }
724
- const Ot = t.union([
725
- Ve,
726
- We
727
- ]), xt = t.object({
724
+ const xt = t.union([
725
+ We,
726
+ Ke
727
+ ]), Pt = t.object({
728
728
  name: t.string().min(1),
729
- source: Ot,
729
+ source: xt,
730
730
  dataType: t.enum(["string", "number", "boolean", "date", "datetime"]),
731
731
  sourceField: t.string().min(1).optional()
732
- }).strict(), Pt = t.object({
733
- field: xt,
732
+ }).strict(), jt = t.object({
733
+ field: Pt,
734
734
  operator: t.enum(["=", "isNull"]),
735
735
  value: t.union([t.string(), t.number().finite(), t.null()]),
736
736
  label: t.string().optional(),
@@ -741,8 +741,8 @@ const Ot = t.union([
741
741
  message: "isNull carries a null value, and only isNull does.",
742
742
  path: ["value"]
743
743
  });
744
- }), jt = t.object({
745
- conditions: t.array(Pt).min(1)
744
+ }), Ft = t.object({
745
+ conditions: t.array(jt).min(1)
746
746
  }).strict().superRefine((e, n) => {
747
747
  const a = e.conditions.map((r) => Ee(r.field));
748
748
  new Set(a).size !== a.length && n.addIssue({
@@ -750,11 +750,11 @@ const Ot = t.union([
750
750
  message: "A tuple holds one condition per field.",
751
751
  path: ["conditions"]
752
752
  });
753
- }), _n = t.object({
753
+ }), wn = t.object({
754
754
  kind: t.literal("selection"),
755
755
  sourceCardId: t.string().min(1),
756
- tuples: t.array(jt).min(1).max(Te)
757
- }).strict(), Ft = t.object({
756
+ tuples: t.array(Ft).min(1).max(Te)
757
+ }).strict(), Lt = t.object({
758
758
  field: Xe,
759
759
  operator: t.enum(["=", "isNull"]),
760
760
  value: t.union([t.string(), t.number().finite(), t.null()]),
@@ -765,8 +765,8 @@ const Ot = t.union([
765
765
  message: "isNull carries a null value, and only isNull does.",
766
766
  path: ["value"]
767
767
  });
768
- }), Lt = t.object({
769
- conditions: t.array(Ft).min(1)
768
+ }), Ut = t.object({
769
+ conditions: t.array(Lt).min(1)
770
770
  }).strict().superRefine((e, n) => {
771
771
  for (let a = 0; a < e.conditions.length; a += 1) {
772
772
  const r = e.conditions[a];
@@ -778,21 +778,21 @@ const Ot = t.union([
778
778
  path: ["conditions", a, "field"]
779
779
  });
780
780
  }
781
- }), kn = t.object({
781
+ }), vn = t.object({
782
782
  id: t.string().min(1),
783
- tuples: t.array(Lt).min(1).max(Te)
784
- }).strict(), Ut = t.object({ key: t.string().min(1), nativeText: t.string().nullable() }).strict(), qt = t.object({
783
+ tuples: t.array(Ut).min(1).max(Te)
784
+ }).strict(), qt = t.object({ key: t.string().min(1), nativeText: t.string().nullable() }).strict(), Dt = t.object({
785
785
  executionInstant: t.string().refine((e) => Qe(e) !== null, {
786
786
  message: "executionInstant must be an ISO instant"
787
787
  }),
788
- dataAnchors: t.array(Ut).default([])
788
+ dataAnchors: t.array(qt).default([])
789
789
  }).strict().refine(
790
790
  (e) => new Set(e.dataAnchors.map((n) => n.key)).size === e.dataAnchors.length,
791
791
  { message: "dataAnchors keys must be unique", path: ["dataAnchors"] }
792
792
  );
793
- function wn(e) {
793
+ function Tn(e) {
794
794
  if (e == null) return;
795
- const n = qt.safeParse(e);
795
+ const n = Dt.safeParse(e);
796
796
  return n.success ? n.data : void 0;
797
797
  }
798
798
  const Ce = {
@@ -859,16 +859,16 @@ const Ce = {
859
859
  COLLECT_SET: "other",
860
860
  FIRST: "other",
861
861
  LAST: "other"
862
- }, Dt = /(?:_AGG$|^APPROX_[A-Z0-9_]+$|^COUNT_DISTINCT$|^HLL_(?:COUNT|ESTIMATE)$|^REGR_[A-Z_]+$)/;
863
- function Mt(e) {
862
+ }, Mt = /(?:_AGG$|^APPROX_[A-Z0-9_]+$|^COUNT_DISTINCT$|^HLL_(?:COUNT|ESTIMATE)$|^REGR_[A-Z_]+$)/;
863
+ function Bt(e) {
864
864
  const n = e.toUpperCase();
865
- return n in Ce || Dt.test(n);
865
+ return n in Ce || Mt.test(n);
866
866
  }
867
867
  function Ne(e, n = !1) {
868
868
  const a = Ce[e.toUpperCase()] ?? "other";
869
869
  return n ? a === "count" || a === "count_distinct" ? "count_distinct" : a === "min" || a === "max" ? a : "repeat_safe_other" : a;
870
870
  }
871
- const Bt = /* @__PURE__ */ new Set([
871
+ const Gt = /* @__PURE__ */ new Set([
872
872
  "NULLIF",
873
873
  "COALESCE",
874
874
  "IFNULL",
@@ -883,7 +883,7 @@ const Bt = /* @__PURE__ */ new Set([
883
883
  "CAST",
884
884
  "TRY_CAST",
885
885
  "SAFE_CAST"
886
- ]), Gt = /* @__PURE__ */ new Set(["DECIMAL", "NUMERIC", "INTEGER", "INT", "BIGINT", "FLOAT", "DOUBLE", "REAL", "VARCHAR", "TEXT"]), ie = /[A-Za-z_]/, zt = /[A-Za-z0-9_]/;
886
+ ]), zt = /* @__PURE__ */ new Set(["DECIMAL", "NUMERIC", "INTEGER", "INT", "BIGINT", "FLOAT", "DOUBLE", "REAL", "VARCHAR", "TEXT"]), ie = /[A-Za-z_]/, Vt = /[A-Za-z0-9_]/;
887
887
  function V(e, n) {
888
888
  const a = e[n];
889
889
  let r = n + 1;
@@ -920,12 +920,12 @@ function j(e, n) {
920
920
  }
921
921
  function M(e, n) {
922
922
  let a = n + 1;
923
- for (; a < e.length && zt.test(e[a]); ) a += 1;
923
+ for (; a < e.length && Vt.test(e[a]); ) a += 1;
924
924
  return a;
925
925
  }
926
- const Vt = /\{([A-Za-z_][A-Za-z0-9_]*)\}/g;
927
- function Wt(e) {
928
- return Array.from(e.matchAll(Vt), (n) => n[1]);
926
+ const Wt = /\{([A-Za-z_][A-Za-z0-9_]*)\}/g;
927
+ function Kt(e) {
928
+ return Array.from(e.matchAll(Wt), (n) => n[1]);
929
929
  }
930
930
  function W(e, n = /* @__PURE__ */ new Set()) {
931
931
  const a = [], r = [];
@@ -947,7 +947,7 @@ function W(e, n = /* @__PURE__ */ new Set()) {
947
947
  }
948
948
  if (ie.test(m)) {
949
949
  const o = M(e, l), d = e.slice(l, o), p = j(e, o);
950
- if (e[p] === "(" && Mt(d)) {
950
+ if (e[p] === "(" && Bt(d)) {
951
951
  let g = P(e, p);
952
952
  const I = g - 1;
953
953
  let R = g;
@@ -980,7 +980,7 @@ function W(e, n = /* @__PURE__ */ new Set()) {
980
980
  kind: Ne(d, C),
981
981
  distinct: C,
982
982
  windowed: b,
983
- tokens: Wt(e.slice(p, g)),
983
+ tokens: Kt(e.slice(p, g)),
984
984
  span: { start: l, end: R, argumentStart: p + 1, argumentEnd: I },
985
985
  argumentCount: x,
986
986
  filtered: _
@@ -1036,9 +1036,9 @@ function Xt(e, n) {
1036
1036
  }
1037
1037
  if (o.startsWith("@") || o === "'S'" || ["NULL", "TRUE", "FALSE"].includes(o) || /^[0-9.]/.test(o))
1038
1038
  return s++, !0;
1039
- if (!Bt.has(o) || (s++, !c("(") || !i())) return !1;
1039
+ if (!Gt.has(o) || (s++, !c("(") || !i())) return !1;
1040
1040
  if (["CAST", "TRY_CAST", "SAFE_CAST"].includes(o)) {
1041
- if (!c("AS") || !Gt.has(a[s++]) || (c("PRECISION"), c("(") && (!/^\d+$/.test(a[s++] || "") || c(",") && !/^\d+$/.test(a[s++] || "") || !c(")"))))
1041
+ if (!c("AS") || !zt.has(a[s++]) || (c("PRECISION"), c("(") && (!/^\d+$/.test(a[s++] || "") || c(",") && !/^\d+$/.test(a[s++] || "") || !c(")"))))
1042
1042
  return !1;
1043
1043
  } else
1044
1044
  for (; c(","); ) if (!i()) return !1;
@@ -1046,7 +1046,7 @@ function Xt(e, n) {
1046
1046
  };
1047
1047
  return i() && s === a.length;
1048
1048
  }
1049
- function Kt(e) {
1049
+ function Zt(e) {
1050
1050
  const n = [];
1051
1051
  let a = 0;
1052
1052
  for (; a < e.length; ) {
@@ -1091,7 +1091,7 @@ function Kt(e) {
1091
1091
  return n;
1092
1092
  }
1093
1093
  function $t(e) {
1094
- const n = Kt(e), a = n.some((o) => o.type === "op" && o.value === "/");
1094
+ const n = Zt(e), a = n.some((o) => o.type === "op" && o.value === "/");
1095
1095
  if (n.some((o) => o.type === "other"))
1096
1096
  return { kind: "other", hasDivision: a };
1097
1097
  let r = 0, s = !0;
@@ -1145,7 +1145,7 @@ const Oe = /* @__PURE__ */ new Set([
1145
1145
  "count_distinct",
1146
1146
  "repeat_safe_other"
1147
1147
  ]);
1148
- function X(e) {
1148
+ function K(e) {
1149
1149
  if (!(!e || !e.trim()))
1150
1150
  return Ne(e);
1151
1151
  }
@@ -1167,7 +1167,7 @@ function xe(e) {
1167
1167
  return { kind: "none", reason: "other" };
1168
1168
  }
1169
1169
  }
1170
- function Zt(e) {
1170
+ function Yt(e) {
1171
1171
  var n, a;
1172
1172
  return ((n = e.derivedField) == null ? void 0 : n.computeStage) || ((a = e.calculatedFormula) == null ? void 0 : a.computeStage);
1173
1173
  }
@@ -1181,7 +1181,7 @@ const Q = {
1181
1181
  identity: "unresolved",
1182
1182
  unresolved: !0
1183
1183
  }, Pe = { ...Q, stage: "row" };
1184
- function K(e) {
1184
+ function X(e) {
1185
1185
  return {
1186
1186
  stage: "row",
1187
1187
  outer: e,
@@ -1199,23 +1199,23 @@ function B(e, n) {
1199
1199
  const a = (r = n.derivedField) == null ? void 0 : r.aggregationBehavior;
1200
1200
  return !a || e.unresolved ? e : a === "additive" ? e.reaggregation.kind === "additive" ? e : { ...e, reaggregation: { kind: "additive" } } : { ...e, reaggregation: { kind: "none", reason: "declared" } };
1201
1201
  }
1202
- function Yt(e, n) {
1202
+ function Ht(e, n) {
1203
1203
  if (!e) return Q;
1204
1204
  if (typeof e.expression == "string" && e.expression.trim()) {
1205
1205
  const r = J(e, n + 1);
1206
1206
  return r === "row_input" ? "raw" : r.unresolved || r.stage === "aggregate" || r.outer ? r : "raw";
1207
1207
  }
1208
- const a = X(e.aggregate);
1209
- return a ? K(a) : "raw";
1208
+ const a = K(e.aggregate);
1209
+ return a ? X(a) : "raw";
1210
1210
  }
1211
- const Ht = 12;
1211
+ const Qt = 12;
1212
1212
  function J(e, n) {
1213
1213
  var E;
1214
- if (n > Ht) return Q;
1214
+ if (n > Qt) return Q;
1215
1215
  const a = typeof e.expression == "string" ? e.expression.trim() : "";
1216
1216
  if (!a)
1217
1217
  return B(
1218
- K(X(e.aggregate) ?? "sum"),
1218
+ X(K(e.aggregate) ?? "sum"),
1219
1219
  e
1220
1220
  );
1221
1221
  const r = W(a), s = ((E = e.calculatedFormula) == null ? void 0 : E.inputFields) || [], c = (u) => {
@@ -1223,7 +1223,7 @@ function J(e, n) {
1223
1223
  return S ? s[Number(S[1])] : void 0;
1224
1224
  }, i = /* @__PURE__ */ new Map();
1225
1225
  for (const u of r.tokensOutsideAggregates)
1226
- i.has(u) || i.set(u, Yt(c(u), n));
1226
+ i.has(u) || i.set(u, Ht(c(u), n));
1227
1227
  const l = r.calls.some(
1228
1228
  (u) => u.tokens.some((S) => {
1229
1229
  const k = c(S);
@@ -1233,15 +1233,15 @@ function J(e, n) {
1233
1233
  })
1234
1234
  ), m = Array.from(i.values()).filter(
1235
1235
  (u) => u !== "raw"
1236
- ), o = Array.from(i.values()).some((u) => u === "raw"), d = r.calls.length > 0 || m.length > 0 || Zt(e) === "aggregate" || !!e.isPreAggregated, p = new Set(
1236
+ ), o = Array.from(i.values()).some((u) => u === "raw"), d = r.calls.length > 0 || m.length > 0 || Yt(e) === "aggregate" || !!e.isPreAggregated, p = new Set(
1237
1237
  [...i].filter(
1238
1238
  ([u, S]) => S === "raw" ? !d && !!c(u) : !S.unresolved
1239
1239
  ).map(([u]) => u)
1240
1240
  ), g = W(a, p).aggregateInputsComplete;
1241
1241
  if (!d) {
1242
1242
  if (!g) return Pe;
1243
- const u = X(e.aggregate);
1244
- return u ? B(K(u), e) : "row_input";
1243
+ const u = K(e.aggregate);
1244
+ return u ? B(X(u), e) : "row_input";
1245
1245
  }
1246
1246
  const I = !g || o || r.nestedAggregate || l || m.some((u) => u.unresolved) || r.calls.length === 0 && m.length === 0, R = [
1247
1247
  ...r.calls.map((u) => ({ kind: u.kind, distinct: u.distinct })),
@@ -1282,106 +1282,113 @@ function J(e, n) {
1282
1282
  e
1283
1283
  );
1284
1284
  }
1285
- function vn(e) {
1285
+ function Jt(e) {
1286
1286
  const n = J(e, 0);
1287
1287
  return n === "row_input" ? Pe : n;
1288
1288
  }
1289
- const Qt = t.object({
1290
- intent: Je,
1289
+ function En(e) {
1290
+ const n = Je((e == null ? void 0 : e.dataType) || "number");
1291
+ if (!e) return n;
1292
+ const a = Jt(e);
1293
+ return a.unresolved || a.outputType === "input" ? n : "number";
1294
+ }
1295
+ const en = t.object({
1296
+ intent: et,
1291
1297
  matrixWindowRequest: pe
1292
- }).strict(), Jt = t.object({
1298
+ }).strict(), tn = t.object({
1293
1299
  runtimeFilters: G.innerType().shape.filters,
1294
1300
  runtimeSorts: G.innerType().shape.sorts.optional()
1295
1301
  });
1296
- function Tn(e) {
1297
- return Jt.parse(e);
1302
+ function Rn(e) {
1303
+ return tn.parse(e);
1298
1304
  }
1299
- const en = {
1305
+ const nn = {
1300
1306
  // A window executes a governed statement set, not one compiled query.
1301
1307
  compiledQuery: t.never().optional(),
1302
- intent: Qt.shape.intent,
1308
+ intent: en.shape.intent,
1303
1309
  resultShape: t.literal("matrix"),
1304
1310
  result: Ae.optional(),
1305
1311
  metadata: t.object({ rowLimitExceeded: t.boolean(), matrixFailure: H.optional() }).passthrough()
1306
- }, tn = ve.extend(en), En = tn.superRefine((e, n) => {
1312
+ }, an = ve.extend(nn), Cn = an.superRefine((e, n) => {
1307
1313
  e.status === "failed" == !!e.result && n.addIssue({ code: "custom", message: "Only answered or partial Matrix execution carries a window." }), e.result && e.status === "partial" != e.result.window.failures.length > 0 && n.addIssue({ code: "custom", message: "Matrix execution status must match acquired window failures." });
1308
1314
  });
1309
1315
  export {
1310
- lt as $,
1311
- An as A,
1312
- In as B,
1313
- xt as C,
1314
- Pt as D,
1315
- jt as E,
1316
- Ft as F,
1317
- Lt as G,
1318
- qt as H,
1319
- wn as I,
1320
- Mt as J,
1316
+ dn as $,
1317
+ kn as A,
1318
+ Pt as B,
1319
+ jt as C,
1320
+ Ft as D,
1321
+ wn as E,
1322
+ Lt as F,
1323
+ Ut as G,
1324
+ Dt as H,
1325
+ Tn as I,
1326
+ Bt as J,
1321
1327
  Ne as K,
1322
1328
  W as L,
1323
1329
  $t as M,
1324
- vn as N,
1325
- me as O,
1326
- nt as P,
1330
+ Jt as N,
1331
+ En as O,
1332
+ me as P,
1327
1333
  at as Q,
1328
- sn as R,
1334
+ rt as R,
1329
1335
  Te as S,
1330
- on as T,
1331
- st as U,
1332
- cn as V,
1333
- it as W,
1334
- te as X,
1335
- ct as Y,
1336
- pe as Z,
1337
- ln as _,
1338
- kn as a,
1336
+ cn as T,
1337
+ ln as U,
1338
+ ot as V,
1339
+ un as W,
1340
+ ct as X,
1341
+ te as Y,
1342
+ lt as Z,
1343
+ pe as _,
1344
+ vn as a,
1339
1345
  ut as a0,
1340
1346
  dt as a1,
1341
- ne as a2,
1342
- H as a3,
1343
- mt as a4,
1344
- Se as a5,
1345
- pt as a6,
1346
- un as a7,
1347
- dn as a8,
1348
- ht as a9,
1347
+ mt as a2,
1348
+ ne as a3,
1349
+ H as a4,
1350
+ pt as a5,
1351
+ Se as a6,
1352
+ ht as a7,
1353
+ mn as a8,
1354
+ pn as a9,
1349
1355
  ft as aa,
1350
1356
  gt as ab,
1351
- mn as ac,
1352
- pn as ad,
1353
- yt as ae,
1357
+ yt as ac,
1358
+ hn as ad,
1359
+ fn as ae,
1354
1360
  St as af,
1355
- ae as ag,
1356
- bt as ah,
1357
- hn as ai,
1358
- Jt as aj,
1359
- Tn as ak,
1360
- En as al,
1361
- Qt as am,
1362
- _n as b,
1363
- bn as c,
1364
- Sn as d,
1365
- Y as e,
1366
- At as f,
1367
- fn as g,
1368
- It as h,
1369
- Et as i,
1370
- _e as j,
1371
- ke as k,
1372
- we as l,
1373
- ve as m,
1374
- _t as n,
1375
- wt as o,
1376
- gn as p,
1377
- vt as q,
1378
- Ae as r,
1361
+ bt as ag,
1362
+ ae as ah,
1363
+ At as ai,
1364
+ gn as aj,
1365
+ tn as ak,
1366
+ Rn as al,
1367
+ Cn as am,
1368
+ en as an,
1369
+ Y as b,
1370
+ In as c,
1371
+ It as d,
1372
+ _t as e,
1373
+ _e as f,
1374
+ yn as g,
1375
+ ke as h,
1376
+ Rt as i,
1377
+ we as j,
1378
+ ve as k,
1379
+ kt as l,
1380
+ vt as m,
1381
+ Tt as n,
1382
+ Ae as o,
1383
+ Sn as p,
1384
+ Ee as q,
1385
+ bn as r,
1379
1386
  se as s,
1380
- Ee as t,
1381
- yn as u,
1382
- Rt as v,
1383
- Re as w,
1384
- Ct as x,
1385
- z as y,
1386
- oe as z
1387
+ Ct as t,
1388
+ An as u,
1389
+ Re as v,
1390
+ Nt as w,
1391
+ z as x,
1392
+ oe as y,
1393
+ _n as z
1387
1394
  };