react-semaphor 0.1.372 → 0.1.373

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 (53) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +1 -1
  3. package/dist/chunks/{calendar-preferences-dialog-Dn6o2r2Y.js → calendar-preferences-dialog-BCO0I6Q2.js} +1 -1
  4. package/dist/chunks/{calendar-preferences-dialog-ClBAkMmF.js → calendar-preferences-dialog-CAcqW83Q.js} +1 -1
  5. package/dist/chunks/{dashboard-briefing-launcher-BO-kXtEd.js → dashboard-briefing-launcher-CxozwqgX.js} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-D3Xfc_26.js → dashboard-briefing-launcher-DTp4KNI1.js} +104 -104
  7. package/dist/chunks/{dashboard-controls-B3sdy_Zx.js → dashboard-controls-Bc4E4Cky.js} +167 -167
  8. package/dist/chunks/{dashboard-controls-DcXMFgGR.js → dashboard-controls-Dkct7mpD.js} +1 -1
  9. package/dist/chunks/{dashboard-json-CFURS_OR.js → dashboard-json-BFB5jFmm.js} +1 -1
  10. package/dist/chunks/{dashboard-json-BWfkEy48.js → dashboard-json-BmCwILfI.js} +1 -1
  11. package/dist/chunks/{edit-dashboard-visual-BD2AJLiT.js → edit-dashboard-visual-BBlY9tKB.js} +37 -37
  12. package/dist/chunks/{edit-dashboard-visual-DjdhKiP2.js → edit-dashboard-visual-BXLuXKFc.js} +6592 -6565
  13. package/dist/chunks/{index-C0Qnfr_7.js → index-Clqr43Sr.js} +36742 -34869
  14. package/dist/chunks/index-D5Pp-5LR.js +1361 -0
  15. package/dist/chunks/{resource-management-panel-DytUMSGA.js → resource-management-panel-BbkbAlPo.js} +1 -1
  16. package/dist/chunks/{resource-management-panel-YvIfaphX.js → resource-management-panel-DJUr47Bb.js} +51 -51
  17. package/dist/chunks/{use-create-flow-overlay-state-CwIG1Ekp.js → use-create-flow-overlay-state-B4EAcL2v.js} +1 -1
  18. package/dist/chunks/{use-create-flow-overlay-state-BETXykC9.js → use-create-flow-overlay-state-DZI7VYBs.js} +35 -35
  19. package/dist/chunks/{use-visual-utils-Bk135OgA.js → use-visual-utils-Bl3ltNL9.js} +12 -12
  20. package/dist/chunks/{use-visual-utils-BzFjIykb.js → use-visual-utils-djsPEgF1.js} +1 -1
  21. package/dist/chunks/{validation-D4Zz6WPD.js → validation-1V7bWmYw.js} +1 -1
  22. package/dist/chunks/{validation-CQFpcSSP.js → validation-DlrTIf1N.js} +1 -1
  23. package/dist/chunks/{validators-CuKnUZFO.js → validators-CtNmgsvG.js} +409 -314
  24. package/dist/chunks/validators-jpoYhpHh.js +1 -0
  25. package/dist/dashboard/index.cjs +1 -1
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/dashboard-authoring/index.cjs +1 -1
  28. package/dist/dashboard-authoring/index.js +1 -1
  29. package/dist/data-app-builder/index.cjs +1 -1
  30. package/dist/data-app-builder/index.js +1 -1
  31. package/dist/data-app-sdk/index.cjs +1 -1
  32. package/dist/data-app-sdk/index.js +32 -32
  33. package/dist/data-app-sdk-validation/index.cjs +1 -1
  34. package/dist/data-app-sdk-validation/index.js +2 -2
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.js +127 -126
  37. package/dist/style.css +1 -1
  38. package/dist/surfboard/index.cjs +1 -1
  39. package/dist/surfboard/index.js +2 -2
  40. package/dist/types/analytics-protocol.d.ts +102 -11
  41. package/dist/types/dashboard-assistant.d.ts +117 -103
  42. package/dist/types/dashboard-authoring.d.ts +63 -2
  43. package/dist/types/dashboard.d.ts +263 -2
  44. package/dist/types/data-app-builder.d.ts +40 -1
  45. package/dist/types/data-app-sdk-validation.d.ts +94 -102
  46. package/dist/types/data-app-sdk.d.ts +106 -11
  47. package/dist/types/main.d.ts +473 -2
  48. package/dist/types/shared.d.ts +263 -2
  49. package/dist/types/surfboard.d.ts +263 -2
  50. package/dist/types/types.d.ts +529 -2
  51. package/package.json +1 -1
  52. package/dist/chunks/index-DlLvzmJF.js +0 -1361
  53. package/dist/chunks/validators-DHee9kM2.js +0 -1
@@ -1,9 +1,9 @@
1
- import { b as z } from "./source-identity-Dj3dryN9.js";
2
- function Ee(e) {
3
- const i = Q(e);
1
+ import { b as Y } from "./source-identity-Dj3dryN9.js";
2
+ function Be(e) {
3
+ const i = K(e);
4
4
  return B(i) ? i : void 0;
5
5
  }
6
- function Q(e) {
6
+ function K(e) {
7
7
  if (typeof e != "string" || e.trim().length === 0)
8
8
  return;
9
9
  const i = e.trim().toLowerCase().replace(/_/g, " ");
@@ -41,41 +41,41 @@ function Q(e) {
41
41
  case "is not null":
42
42
  return "is_not_null";
43
43
  default:
44
- return K(e) ? e : void 0;
44
+ return X(e) ? e : void 0;
45
45
  }
46
46
  }
47
47
  function B(e) {
48
48
  return e === "=" || e === "!=" || e === "in" || e === "not_in" || e === "contains" || e === "not_contains" || e === "between" || e === "not_between" || e === ">" || e === ">=" || e === "<" || e === "<=";
49
49
  }
50
- function K(e) {
50
+ function X(e) {
51
51
  return B(e) || e === "not_contains" || e === "is_null" || e === "is_not_null";
52
52
  }
53
53
  function a(e, i, t) {
54
54
  return t ? { code: e, message: i, path: t } : { code: e, message: i };
55
55
  }
56
- function Y(e) {
56
+ function Z(e) {
57
57
  for (let i = 0; i < e.length; i += 1) {
58
58
  const t = e[i];
59
59
  if (e.some(
60
- (s, n) => n !== i && j(s, t)
60
+ (n, s) => s !== i && C(n, t)
61
61
  ))
62
62
  return !1;
63
63
  }
64
64
  return !0;
65
65
  }
66
- function O(e, i) {
67
- return z(e, i);
68
- }
69
66
  function j(e, i) {
70
- return O(e, i) && v(e) === v(i);
67
+ return Y(e, i);
71
68
  }
72
- function X(e) {
69
+ function C(e, i) {
70
+ return j(e, i) && v(e) === v(i);
71
+ }
72
+ function J(e) {
73
73
  return `Metric intent has duplicate metric "${e.name}" with the same aggregate (${v(e)}). Use different aggregates to request both, or remove one entry.`;
74
74
  }
75
- function I(e) {
75
+ function D(e) {
76
76
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
77
77
  }
78
- function Z(e, i, t) {
78
+ function W(e, i, t) {
79
79
  if (e !== void 0) {
80
80
  if (!e || typeof e != "object" || Array.isArray(e)) {
81
81
  t.push(
@@ -87,80 +87,80 @@ function Z(e, i, t) {
87
87
  );
88
88
  return;
89
89
  }
90
- Object.entries(e).forEach(([s, n]) => {
91
- if (!s.trim()) {
90
+ Object.entries(e).forEach(([n, s]) => {
91
+ if (!n.trim()) {
92
92
  t.push(
93
93
  a(
94
94
  "invalid_sql_default_parameter_name",
95
95
  "SQL defaultParameters names must be non-empty strings.",
96
- `${i}.${s}`
96
+ `${i}.${n}`
97
97
  )
98
98
  );
99
99
  return;
100
100
  }
101
- (Array.isArray(n) ? n.every(I) : I(n)) || t.push(
101
+ (Array.isArray(s) ? s.every(D) : D(s)) || t.push(
102
102
  a(
103
103
  "invalid_sql_default_parameter_value",
104
104
  "SQL defaultParameters values must be strings, numbers, booleans, nulls, or arrays of those scalar values.",
105
- `${i}.${s}`
105
+ `${i}.${n}`
106
106
  )
107
107
  );
108
108
  });
109
109
  }
110
110
  }
111
- function J(e, i) {
111
+ function ee(e, i) {
112
112
  return A(e, i).length === 1;
113
113
  }
114
- function W(e, i) {
114
+ function ie(e, i) {
115
115
  return A(e, i).length === 1;
116
116
  }
117
117
  function A(e, i) {
118
118
  return i.filter(
119
- (s) => ee(e, s)
119
+ (n) => te(e, n)
120
120
  );
121
121
  }
122
- function ee(e, i) {
123
- return ie(e, i) ? e.source ? O(i, e) : !0 : !1;
122
+ function te(e, i) {
123
+ return ae(e, i) ? e.source ? j(i, e) : !0 : !1;
124
124
  }
125
- function ie(e, i) {
126
- return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || te(e, i) && v(i) !== v(e));
125
+ function ae(e, i) {
126
+ return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || ne(e, i) && v(i) !== v(e));
127
127
  }
128
- function te(e, i) {
128
+ function ne(e, i) {
129
129
  return e.role === "measure" || i.role === "measure" || e.aggregate !== void 0 || i.aggregate !== void 0;
130
130
  }
131
131
  function v(e) {
132
132
  return (e.aggregate || "SUM").toUpperCase();
133
133
  }
134
- const ae = /^(\d{4})-(\d{2})-(\d{2})$/, se = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;
135
- function R(e) {
134
+ const se = /^(\d{4})-(\d{2})-(\d{2})$/, re = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;
135
+ function P(e) {
136
136
  if (typeof e != "string")
137
137
  return null;
138
- const i = e.trim(), t = ae.exec(i);
138
+ const i = e.trim(), t = se.exec(i);
139
139
  if (t) {
140
- const [, y, k, S] = t;
141
- return D(y, k, S) ? new Date(Date.UTC(Number(y), Number(k) - 1, Number(S))) : null;
140
+ const [, y, I, R] = t;
141
+ return T(y, I, R) ? new Date(Date.UTC(Number(y), Number(I) - 1, Number(R))) : null;
142
142
  }
143
- const s = se.exec(i);
144
- if (!s)
143
+ const n = re.exec(i);
144
+ if (!n)
145
145
  return null;
146
- const [, n, r, o, u, d, f = "00", , p] = s;
147
- if (!D(n, r, o) || !g(u, 0, 23) || !g(d, 0, 59) || !g(f, 0, 59) || !ne(p))
146
+ const [, s, r, o, u, d, m = "00", , p] = n;
147
+ if (!T(s, r, o) || !g(u, 0, 23) || !g(d, 0, 59) || !g(m, 0, 59) || !oe(p))
148
148
  return null;
149
149
  const b = new Date(i);
150
150
  return Number.isFinite(b.getTime()) ? b : null;
151
151
  }
152
- function D(e, i, t) {
153
- const s = Number(e), n = Number(i), r = Number(t);
154
- if (!Number.isInteger(s) || !Number.isInteger(n) || !Number.isInteger(r) || n < 1 || n > 12)
152
+ function T(e, i, t) {
153
+ const n = Number(e), s = Number(i), r = Number(t);
154
+ if (!Number.isInteger(n) || !Number.isInteger(s) || !Number.isInteger(r) || s < 1 || s > 12)
155
155
  return !1;
156
- const o = new Date(Date.UTC(s, n - 1, r));
157
- return o.getUTCFullYear() === s && o.getUTCMonth() === n - 1 && o.getUTCDate() === r;
156
+ const o = new Date(Date.UTC(n, s - 1, r));
157
+ return o.getUTCFullYear() === n && o.getUTCMonth() === s - 1 && o.getUTCDate() === r;
158
158
  }
159
159
  function g(e, i, t) {
160
- const s = Number(e);
161
- return Number.isInteger(s) && s >= i && s <= t;
160
+ const n = Number(e);
161
+ return Number.isInteger(n) && n >= i && n <= t;
162
162
  }
163
- function ne(e) {
163
+ function oe(e) {
164
164
  if (e === "Z")
165
165
  return !0;
166
166
  const i = /^([+-])(\d{2}):(\d{2})$/.exec(e);
@@ -169,48 +169,48 @@ function ne(e) {
169
169
  function l(e) {
170
170
  return typeof e == "string" && e.trim().length > 0;
171
171
  }
172
- function re(e) {
172
+ function de(e) {
173
173
  const i = /* @__PURE__ */ new Set();
174
174
  let t = 0;
175
175
  for (; t < e.length; ) {
176
- const s = e[t];
177
- if (s === "'" || s === '"') {
178
- t = oe(e, t);
176
+ const n = e[t];
177
+ if (n === "'" || n === '"') {
178
+ t = le(e, t);
179
179
  continue;
180
180
  }
181
- if (s === "{") {
182
- const n = e.indexOf("}", t + 1);
183
- if (n === -1) {
181
+ if (n === "{") {
182
+ const s = e.indexOf("}", t + 1);
183
+ if (s === -1) {
184
184
  t += 1;
185
185
  continue;
186
186
  }
187
- const r = e.slice(t + 1, n);
188
- /^[A-Za-z_][A-Za-z0-9_]*$/.test(r) && i.add(r), t = n + 1;
187
+ const r = e.slice(t + 1, s);
188
+ /^[A-Za-z_][A-Za-z0-9_]*$/.test(r) && i.add(r), t = s + 1;
189
189
  continue;
190
190
  }
191
191
  t += 1;
192
192
  }
193
193
  return Array.from(i);
194
194
  }
195
- function oe(e, i) {
195
+ function le(e, i) {
196
196
  const t = e[i];
197
- let s = i + 1;
198
- for (; s < e.length; ) {
199
- if (e[s] === t) {
200
- if (e[s + 1] === t) {
201
- s += 2;
197
+ let n = i + 1;
198
+ for (; n < e.length; ) {
199
+ if (e[n] === t) {
200
+ if (e[n + 1] === t) {
201
+ n += 2;
202
202
  continue;
203
203
  }
204
- return s + 1;
204
+ return n + 1;
205
205
  }
206
- s += 1;
206
+ n += 1;
207
207
  }
208
208
  return e.length;
209
209
  }
210
210
  function c(e) {
211
211
  return !!(e && typeof e == "object" && !Array.isArray(e));
212
212
  }
213
- function P(e, i, t) {
213
+ function E(e, i, t) {
214
214
  if (e !== void 0) {
215
215
  if (!c(e)) {
216
216
  t.push(
@@ -237,7 +237,7 @@ function P(e, i, t) {
237
237
  );
238
238
  }
239
239
  }
240
- function w(e) {
240
+ function $(e) {
241
241
  const i = /* @__PURE__ */ new Set();
242
242
  for (const t of e) {
243
243
  if (i.has(t))
@@ -246,10 +246,10 @@ function w(e) {
246
246
  }
247
247
  return null;
248
248
  }
249
- function x(e, i, t, s) {
250
- w(
249
+ function w(e, i, t, n) {
250
+ $(
251
251
  e.filter((r) => l(r))
252
- ) && s.push(
252
+ ) && n.push(
253
253
  a(
254
254
  "duplicate_matrix_public_id",
255
255
  `Matrix ${t} ids must be unique so sort and expansion references are unambiguous.`,
@@ -257,7 +257,7 @@ function x(e, i, t, s) {
257
257
  )
258
258
  );
259
259
  }
260
- const de = /* @__PURE__ */ new Set([
260
+ const ue = /* @__PURE__ */ new Set([
261
261
  "SUM",
262
262
  "COUNT",
263
263
  "AVG",
@@ -266,7 +266,7 @@ const de = /* @__PURE__ */ new Set([
266
266
  "MEDIAN",
267
267
  "DISTINCT"
268
268
  ]);
269
- function F(e, i, t) {
269
+ function L(e, i, t) {
270
270
  if (!e || typeof e != "object") {
271
271
  t.push(
272
272
  a("missing_source", "Analytics intent needs a source.", i)
@@ -319,9 +319,9 @@ function F(e, i, t) {
319
319
  a("invalid_source_kind", "Source kind is not supported.", i)
320
320
  );
321
321
  }
322
- function m(e, i, t, s = {}) {
322
+ function f(e, i, t, n = {}) {
323
323
  if (!e || !c(e)) {
324
- s.required && t.push(
324
+ n.required && t.push(
325
325
  a("missing_field_ref", "Field reference needs a name.", i)
326
326
  );
327
327
  return;
@@ -332,10 +332,10 @@ function m(e, i, t, s = {}) {
332
332
  "Field reference needs a name.",
333
333
  `${i}.name`
334
334
  )
335
- ), e.source !== void 0 && F(e.source, `${i}.source`, t), _(e.aggregate, `${i}.aggregate`, t);
335
+ ), e.source !== void 0 && L(e.source, `${i}.source`, t), _(e.aggregate, `${i}.aggregate`, t);
336
336
  }
337
337
  function _(e, i, t) {
338
- e !== void 0 && (typeof e != "string" || !de.has(e)) && t.push(
338
+ e !== void 0 && (typeof e != "string" || !ue.has(e)) && t.push(
339
339
  a(
340
340
  "invalid_aggregate",
341
341
  "Field aggregate must be SUM, COUNT, AVG, MIN, MAX, MEDIAN, or DISTINCT.",
@@ -343,33 +343,128 @@ function _(e, i, t) {
343
343
  )
344
344
  );
345
345
  }
346
- const le = /* @__PURE__ */ new Set([
346
+ const ce = /* @__PURE__ */ new Set([
347
347
  "measure",
348
348
  "group",
349
349
  "date",
350
350
  "id",
351
351
  "filter"
352
- ]), ue = /* @__PURE__ */ new Set(["row", "aggregate"]), C = /* @__PURE__ */ new Set([
352
+ ]), me = /* @__PURE__ */ new Set(["row", "aggregate"]), U = /* @__PURE__ */ new Set([
353
353
  "string",
354
354
  "number",
355
355
  "boolean",
356
356
  "date",
357
357
  "datetime",
358
358
  "unknown"
359
- ]), ce = /* @__PURE__ */ new Set([
359
+ ]), fe = /* @__PURE__ */ new Set([
360
+ "number",
361
+ "currency",
362
+ "percent",
363
+ "percentage",
364
+ "scientific",
365
+ "date",
366
+ "datetime",
367
+ "duration",
368
+ "string"
369
+ ]), pe = /* @__PURE__ */ new Set([
370
+ "millisecond",
371
+ "second",
372
+ "minute",
373
+ "hour",
374
+ "day"
375
+ ]), _e = /* @__PURE__ */ new Set([
376
+ "compact",
377
+ "digital",
378
+ "long"
379
+ ]);
380
+ function k(e, i, t) {
381
+ if (e === void 0)
382
+ return;
383
+ if (!c(e)) {
384
+ t.push(
385
+ a(
386
+ "invalid_value_format",
387
+ "Value format must be a structured object.",
388
+ i
389
+ )
390
+ );
391
+ return;
392
+ }
393
+ const n = e;
394
+ (typeof n.type != "string" || !fe.has(n.type)) && t.push(
395
+ a(
396
+ "invalid_value_format_type",
397
+ "Value format type must be number, currency, percent, scientific, date, datetime, duration, or string.",
398
+ `${i}.type`
399
+ )
400
+ ), h(
401
+ e.minimumFractionDigits,
402
+ `${i}.minimumFractionDigits`,
403
+ t
404
+ ), h(
405
+ e.maximumFractionDigits,
406
+ `${i}.maximumFractionDigits`,
407
+ t
408
+ ), h(e.scale, `${i}.scale`, t), h(e.maxUnits, `${i}.maxUnits`, t), e.useGrouping !== void 0 && typeof e.useGrouping != "boolean" && t.push(
409
+ a(
410
+ "invalid_value_format_use_grouping",
411
+ "Value format useGrouping must be boolean.",
412
+ `${i}.useGrouping`
413
+ )
414
+ ), e.negativeStyle !== void 0 && e.negativeStyle !== "minus" && e.negativeStyle !== "parentheses" && t.push(
415
+ a(
416
+ "invalid_value_format_negative_style",
417
+ "Value format negativeStyle must be minus or parentheses.",
418
+ `${i}.negativeStyle`
419
+ )
420
+ ), e.percentValueMode !== void 0 && e.percentValueMode !== "fraction" && e.percentValueMode !== "whole" && t.push(
421
+ a(
422
+ "invalid_value_format_percent_mode",
423
+ "Value format percentValueMode must be fraction or whole.",
424
+ `${i}.percentValueMode`
425
+ )
426
+ );
427
+ for (const s of ["inputUnit", "largestUnit", "smallestUnit"]) {
428
+ const r = e[s];
429
+ r !== void 0 && (typeof r != "string" || !pe.has(r)) && t.push(
430
+ a(
431
+ "invalid_value_format_duration_unit",
432
+ "Duration format units must be millisecond, second, minute, hour, or day.",
433
+ `${i}.${s}`
434
+ )
435
+ );
436
+ }
437
+ e.outputStyle !== void 0 && (typeof e.outputStyle != "string" || !_e.has(e.outputStyle)) && t.push(
438
+ a(
439
+ "invalid_value_format_duration_style",
440
+ "Duration format outputStyle must be compact, digital, or long.",
441
+ `${i}.outputStyle`
442
+ )
443
+ );
444
+ }
445
+ function h(e, i, t) {
446
+ e !== void 0 && (typeof e != "number" || !Number.isFinite(e)) && t.push(
447
+ a(
448
+ "invalid_value_format_number",
449
+ "Value format numeric options must be finite numbers.",
450
+ i
451
+ )
452
+ );
453
+ }
454
+ const ge = /* @__PURE__ */ new Set([
360
455
  "additive",
361
456
  "non_additive",
362
457
  "ratio_of_sums",
363
458
  "weighted",
364
459
  "pre_aggregated",
365
460
  "snapshot"
366
- ]), fe = /* @__PURE__ */ new Set([
461
+ ]), ve = /* @__PURE__ */ new Set([
367
462
  "default",
368
463
  "symmetric_aggregate",
369
464
  "aggregate_then_join",
370
465
  "weighted"
371
466
  ]);
372
- function me(e, i, t) {
467
+ function be(e, i, t) {
373
468
  if (!e || !c(e)) {
374
469
  t.push(
375
470
  a(
@@ -381,17 +476,17 @@ function me(e, i, t) {
381
476
  return;
382
477
  }
383
478
  if (e.kind === "field") {
384
- m(e.field, `${i}.field`, t, { required: !0 }), _(e.aggregate, `${i}.aggregate`, t);
479
+ f(e.field, `${i}.field`, t, { required: !0 }), _(e.aggregate, `${i}.aggregate`, t);
385
480
  return;
386
481
  }
387
482
  if (e.kind === "metric") {
388
- m(e.metric, `${i}.metric`, t, {
483
+ f(e.metric, `${i}.metric`, t, {
389
484
  required: !0
390
485
  });
391
486
  return;
392
487
  }
393
488
  if (e.kind === "dimension") {
394
- m(e.dimension, `${i}.dimension`, t, {
489
+ f(e.dimension, `${i}.dimension`, t, {
395
490
  required: !0
396
491
  });
397
492
  return;
@@ -404,7 +499,7 @@ function me(e, i, t) {
404
499
  )
405
500
  );
406
501
  }
407
- function T(e, i, t) {
502
+ function N(e, i, t) {
408
503
  if (!c(e)) {
409
504
  t.push(
410
505
  a(
@@ -415,8 +510,8 @@ function T(e, i, t) {
415
510
  );
416
511
  return;
417
512
  }
418
- const s = l(e.columnKey), n = c(e.field);
419
- if (s === n) {
513
+ const n = l(e.columnKey), s = c(e.field);
514
+ if (n === s) {
420
515
  t.push(
421
516
  a(
422
517
  "invalid_result_column_ref",
@@ -426,11 +521,11 @@ function T(e, i, t) {
426
521
  );
427
522
  return;
428
523
  }
429
- n && m(e.field, `${i}.field`, t, {
524
+ s && f(e.field, `${i}.field`, t, {
430
525
  required: !0
431
526
  });
432
527
  }
433
- function pe(e, i, t) {
528
+ function ye(e, i, t) {
434
529
  if (!c(e)) {
435
530
  t.push(
436
531
  a(
@@ -447,15 +542,15 @@ function pe(e, i, t) {
447
542
  "Result calculation output needs a stable key.",
448
543
  `${i}.key`
449
544
  )
450
- ), e.dataType !== void 0 && (typeof e.dataType != "string" || !C.has(e.dataType)) && t.push(
545
+ ), e.dataType !== void 0 && (typeof e.dataType != "string" || !U.has(e.dataType)) && t.push(
451
546
  a(
452
547
  "invalid_result_calculation_output",
453
548
  "Result calculation output dataType must be string, number, boolean, date, datetime, or unknown.",
454
549
  `${i}.dataType`
455
550
  )
456
- );
551
+ ), k(e.format, `${i}.format`, t);
457
552
  }
458
- function _e(e, i, t) {
553
+ function he(e, i, t) {
459
554
  e !== void 0 && e !== "hour" && e !== "day" && e !== "week" && e !== "month" && e !== "quarter" && e !== "year" && t.push(
460
555
  a(
461
556
  "invalid_time_grain",
@@ -464,24 +559,24 @@ function _e(e, i, t) {
464
559
  )
465
560
  );
466
561
  }
467
- function L(e, i, t, s) {
468
- e !== "asc" && e !== "desc" && t.push(a(s, "Sort direction must be asc or desc.", i));
562
+ function V(e, i, t, n) {
563
+ e !== "asc" && e !== "desc" && t.push(a(n, "Sort direction must be asc or desc.", i));
469
564
  }
470
- function H(e, i, t, s) {
565
+ function H(e, i, t, n) {
471
566
  e !== void 0 && e !== "warehouseDefault" && e !== "first" && e !== "last" && t.push(
472
567
  a(
473
- s,
568
+ n,
474
569
  "Null ordering must be warehouseDefault, first, or last.",
475
570
  i
476
571
  )
477
572
  );
478
573
  }
479
- function U(e, i, t, s) {
574
+ function G(e, i, t, n) {
480
575
  e !== void 0 && e !== "global" && e !== "withinParent" && t.push(
481
- a(s, "Sort scope must be global or withinParent.", i)
576
+ a(n, "Sort scope must be global or withinParent.", i)
482
577
  );
483
578
  }
484
- function ge(e, i, t) {
579
+ function xe(e, i, t) {
485
580
  e.enabled !== void 0 && typeof e.enabled != "boolean" && t.push(
486
581
  a(
487
582
  "invalid_matrix_subtotal",
@@ -502,8 +597,8 @@ function ge(e, i, t) {
502
597
  )
503
598
  );
504
599
  }
505
- function ve(e, i, t) {
506
- if (L(
600
+ function we(e, i, t) {
601
+ if (V(
507
602
  e.direction,
508
603
  `${i}.direction`,
509
604
  t,
@@ -513,7 +608,7 @@ function ve(e, i, t) {
513
608
  `${i}.nulls`,
514
609
  t,
515
610
  "invalid_matrix_sort_nulls"
516
- ), U(
611
+ ), G(
517
612
  e.scope,
518
613
  `${i}.scope`,
519
614
  t,
@@ -530,7 +625,7 @@ function ve(e, i, t) {
530
625
  }
531
626
  if (e.by.kind !== "label") {
532
627
  if (e.by.kind === "field") {
533
- m(e.by.field, `${i}.by.field`, t, {
628
+ f(e.by.field, `${i}.by.field`, t, {
534
629
  required: !0
535
630
  }), _(e.by.aggregate, `${i}.by.aggregate`, t);
536
631
  return;
@@ -544,9 +639,9 @@ function ve(e, i, t) {
544
639
  );
545
640
  }
546
641
  }
547
- function E(e, i, t, s) {
642
+ function O(e, i, t, n) {
548
643
  if (!Array.isArray(e))
549
- return s.required ? t.push(
644
+ return n.required ? t.push(
550
645
  a(
551
646
  "missing_matrix_rows",
552
647
  "Matrix intent needs at least one row axis level.",
@@ -559,14 +654,14 @@ function E(e, i, t, s) {
559
654
  i
560
655
  )
561
656
  ), [];
562
- s.required && e.length === 0 && t.push(
657
+ n.required && e.length === 0 && t.push(
563
658
  a(
564
659
  "missing_matrix_rows",
565
660
  "Matrix intent needs at least one row axis level.",
566
661
  i
567
662
  )
568
663
  );
569
- const n = [];
664
+ const s = [];
570
665
  return e.forEach((r, o) => {
571
666
  const u = `${i}.${o}`;
572
667
  if (!c(r)) {
@@ -580,21 +675,21 @@ function E(e, i, t, s) {
580
675
  return;
581
676
  }
582
677
  const d = r;
583
- n.push(d), d.id !== void 0 && !l(d.id) && t.push(
678
+ s.push(d), d.id !== void 0 && !l(d.id) && t.push(
584
679
  a(
585
680
  "invalid_matrix_axis_level_id",
586
681
  "Matrix axis level id must be a non-empty string.",
587
682
  `${u}.id`
588
683
  )
589
- ), m(d.field, `${u}.field`, t, {
684
+ ), f(d.field, `${u}.field`, t, {
590
685
  required: !0
591
- }), _e(d.grain, `${u}.grain`, t), d.label !== void 0 && typeof d.label != "string" && t.push(
686
+ }), he(d.grain, `${u}.grain`, t), d.label !== void 0 && typeof d.label != "string" && t.push(
592
687
  a(
593
688
  "invalid_matrix_axis_label",
594
689
  "Matrix axis level label must be a string.",
595
690
  `${u}.label`
596
691
  )
597
- ), d.subtotal !== void 0 && typeof d.subtotal != "boolean" && (c(d.subtotal) ? ge(
692
+ ), d.subtotal !== void 0 && typeof d.subtotal != "boolean" && (c(d.subtotal) ? xe(
598
693
  d.subtotal,
599
694
  `${u}.subtotal`,
600
695
  t
@@ -604,7 +699,7 @@ function E(e, i, t, s) {
604
699
  "Matrix subtotal must be a boolean or structured options object.",
605
700
  `${u}.subtotal`
606
701
  )
607
- )), d.sortBy !== void 0 && (c(d.sortBy) ? ve(
702
+ )), d.sortBy !== void 0 && (c(d.sortBy) ? we(
608
703
  d.sortBy,
609
704
  `${u}.sortBy`,
610
705
  t
@@ -615,9 +710,9 @@ function E(e, i, t, s) {
615
710
  `${u}.sortBy`
616
711
  )
617
712
  ));
618
- }), n;
713
+ }), s;
619
714
  }
620
- function be(e, i, t) {
715
+ function $e(e, i, t) {
621
716
  if (!c(e)) {
622
717
  t.push(
623
718
  a(
@@ -658,7 +753,7 @@ function be(e, i, t) {
658
753
  )
659
754
  );
660
755
  }
661
- function ye(e, i, t) {
756
+ function Me(e, i, t) {
662
757
  if (!Array.isArray(e) || e.length === 0)
663
758
  return t.push(
664
759
  a(
@@ -667,10 +762,10 @@ function ye(e, i, t) {
667
762
  i
668
763
  )
669
764
  ), [];
670
- const s = [];
671
- return e.forEach((n, r) => {
765
+ const n = [];
766
+ return e.forEach((s, r) => {
672
767
  const o = `${i}.${r}`;
673
- if (!c(n)) {
768
+ if (!c(s)) {
674
769
  t.push(
675
770
  a(
676
771
  "invalid_matrix_value",
@@ -680,33 +775,33 @@ function ye(e, i, t) {
680
775
  );
681
776
  return;
682
777
  }
683
- const u = n;
684
- s.push(u), u.id !== void 0 && !l(u.id) && t.push(
778
+ const u = s;
779
+ n.push(u), u.id !== void 0 && !l(u.id) && t.push(
685
780
  a(
686
781
  "invalid_matrix_value_id",
687
782
  "Matrix value id must be a non-empty string.",
688
783
  `${o}.id`
689
784
  )
690
- ), m(u.field, `${o}.field`, t, {
785
+ ), f(u.field, `${o}.field`, t, {
691
786
  required: !0
692
787
  }), _(
693
788
  u.aggregate,
694
789
  `${o}.aggregate`,
695
790
  t
696
- ), u.label !== void 0 && typeof u.label != "string" && t.push(
791
+ ), k(u.format, `${o}.format`, t), u.label !== void 0 && typeof u.label != "string" && t.push(
697
792
  a(
698
793
  "invalid_matrix_value_label",
699
794
  "Matrix value label must be a string.",
700
795
  `${o}.label`
701
796
  )
702
- ), u.totalBehavior !== void 0 && be(
797
+ ), u.totalBehavior !== void 0 && $e(
703
798
  u.totalBehavior,
704
799
  `${o}.totalBehavior`,
705
800
  t
706
801
  );
707
- }), s;
802
+ }), n;
708
803
  }
709
- function he(e, i, t) {
804
+ function Se(e, i, t) {
710
805
  if (!c(e)) {
711
806
  t.push(
712
807
  a(
@@ -717,13 +812,13 @@ function he(e, i, t) {
717
812
  );
718
813
  return;
719
814
  }
720
- for (const s of ["rows", "columns"]) {
721
- const n = e[s];
722
- n !== void 0 && n !== !0 && n !== !1 && n !== "perLevel" && t.push(
815
+ for (const n of ["rows", "columns"]) {
816
+ const s = e[n];
817
+ s !== void 0 && s !== !0 && s !== !1 && s !== "perLevel" && t.push(
723
818
  a(
724
819
  "invalid_matrix_totals",
725
820
  "Matrix total axis setting must be a boolean or perLevel.",
726
- `${i}.${s}`
821
+ `${i}.${n}`
727
822
  )
728
823
  );
729
824
  }
@@ -737,13 +832,13 @@ function he(e, i, t) {
737
832
  )
738
833
  );
739
834
  else
740
- for (const s of ["rows", "columns"]) {
741
- const n = e.grandTotal[s];
742
- n !== void 0 && typeof n != "boolean" && t.push(
835
+ for (const n of ["rows", "columns"]) {
836
+ const s = e.grandTotal[n];
837
+ s !== void 0 && typeof s != "boolean" && t.push(
743
838
  a(
744
839
  "invalid_matrix_totals",
745
840
  "Matrix grandTotal rows/columns must be booleans.",
746
- `${i}.grandTotal.${s}`
841
+ `${i}.grandTotal.${n}`
747
842
  )
748
843
  );
749
844
  }
@@ -761,9 +856,9 @@ function he(e, i, t) {
761
856
  )
762
857
  );
763
858
  }
764
- function $(e, i, t, s) {
859
+ function M(e, i, t, n) {
765
860
  if (!Array.isArray(e)) {
766
- s.push(
861
+ n.push(
767
862
  a(
768
863
  "invalid_matrix_path",
769
864
  "Matrix member path must be an array of path segments.",
@@ -772,10 +867,10 @@ function $(e, i, t, s) {
772
867
  );
773
868
  return;
774
869
  }
775
- e.forEach((n, r) => {
870
+ e.forEach((s, r) => {
776
871
  const o = `${i}.${r}`;
777
- if (!c(n)) {
778
- s.push(
872
+ if (!c(s)) {
873
+ n.push(
779
874
  a(
780
875
  "invalid_matrix_path",
781
876
  "Matrix path segment must be a structured object.",
@@ -784,9 +879,9 @@ function $(e, i, t, s) {
784
879
  );
785
880
  return;
786
881
  }
787
- const u = n;
882
+ const u = s;
788
883
  if (!l(u.levelId)) {
789
- s.push(
884
+ n.push(
790
885
  a(
791
886
  "stable_id_required",
792
887
  "Matrix path segments must reference an explicit public axis level id.",
@@ -795,13 +890,13 @@ function $(e, i, t, s) {
795
890
  );
796
891
  return;
797
892
  }
798
- Object.prototype.hasOwnProperty.call(n, "value") || s.push(
893
+ Object.prototype.hasOwnProperty.call(s, "value") || n.push(
799
894
  a(
800
895
  "invalid_matrix_path",
801
896
  "Matrix path segments must include a value property; use explicit null for null members.",
802
897
  `${o}.value`
803
898
  )
804
- ), t.has(u.levelId) || s.push(
899
+ ), t.has(u.levelId) || n.push(
805
900
  a(
806
901
  "stable_id_required",
807
902
  "Matrix path segment levelId must match an explicit public axis level id.",
@@ -810,9 +905,9 @@ function $(e, i, t, s) {
810
905
  );
811
906
  });
812
907
  }
813
- function N(e, i, t, s) {
908
+ function F(e, i, t, n) {
814
909
  if (!c(e)) {
815
- s.push(
910
+ n.push(
816
911
  a(
817
912
  "invalid_matrix_expansion",
818
913
  "Matrix expansion axis options must be structured objects.",
@@ -821,26 +916,26 @@ function N(e, i, t, s) {
821
916
  );
822
917
  return;
823
918
  }
824
- e.defaultDepth !== void 0 && (typeof e.defaultDepth != "number" || !Number.isInteger(e.defaultDepth) || e.defaultDepth < 0) && s.push(
919
+ e.defaultDepth !== void 0 && (typeof e.defaultDepth != "number" || !Number.isInteger(e.defaultDepth) || e.defaultDepth < 0) && n.push(
825
920
  a(
826
921
  "invalid_matrix_expansion",
827
922
  "Matrix expansion defaultDepth must be a non-negative integer.",
828
923
  `${i}.defaultDepth`
829
924
  )
830
- ), e.lazy !== void 0 && typeof e.lazy != "boolean" && s.push(
925
+ ), e.lazy !== void 0 && typeof e.lazy != "boolean" && n.push(
831
926
  a(
832
927
  "invalid_matrix_expansion",
833
928
  "Matrix expansion lazy must be a boolean.",
834
929
  `${i}.lazy`
835
930
  )
836
- ), e.expandedPaths !== void 0 && (Array.isArray(e.expandedPaths) ? e.expandedPaths.forEach((n, r) => {
837
- $(
838
- n,
931
+ ), e.expandedPaths !== void 0 && (Array.isArray(e.expandedPaths) ? e.expandedPaths.forEach((s, r) => {
932
+ M(
933
+ s,
839
934
  `${i}.expandedPaths.${r}`,
840
935
  t,
841
- s
936
+ n
842
937
  );
843
- }) : s.push(
938
+ }) : n.push(
844
939
  a(
845
940
  "invalid_matrix_expansion",
846
941
  "Matrix expandedPaths must be an array of member paths.",
@@ -848,10 +943,10 @@ function N(e, i, t, s) {
848
943
  )
849
944
  ));
850
945
  }
851
- function xe(e, i, t, s) {
946
+ function Ae(e, i, t, n) {
852
947
  if (e !== void 0) {
853
948
  if (!c(e)) {
854
- s.push(
949
+ n.push(
855
950
  a(
856
951
  "invalid_matrix_expansion",
857
952
  "Matrix expansion must be a structured object.",
@@ -860,23 +955,23 @@ function xe(e, i, t, s) {
860
955
  );
861
956
  return;
862
957
  }
863
- e.rows !== void 0 && N(
958
+ e.rows !== void 0 && F(
864
959
  e.rows,
865
960
  "expansion.rows",
866
961
  i,
867
- s
868
- ), e.columns !== void 0 && N(
962
+ n
963
+ ), e.columns !== void 0 && F(
869
964
  e.columns,
870
965
  "expansion.columns",
871
966
  t,
872
- s
967
+ n
873
968
  );
874
969
  }
875
970
  }
876
- function we(e, i, t, s, n) {
971
+ function ke(e, i, t, n, s) {
877
972
  if (e !== void 0) {
878
973
  if (!Array.isArray(e)) {
879
- n.push(
974
+ s.push(
880
975
  a(
881
976
  "invalid_matrix_sort",
882
977
  "Matrix sort must be an array of sort rules.",
@@ -888,7 +983,7 @@ function we(e, i, t, s, n) {
888
983
  e.forEach((r, o) => {
889
984
  const u = `sort.${o}`;
890
985
  if (!c(r)) {
891
- n.push(
986
+ s.push(
892
987
  a(
893
988
  "invalid_matrix_sort",
894
989
  "Matrix sort rule must be a structured object.",
@@ -898,37 +993,37 @@ function we(e, i, t, s, n) {
898
993
  return;
899
994
  }
900
995
  const d = r;
901
- d.axis !== "row" && d.axis !== "column" && n.push(
996
+ d.axis !== "row" && d.axis !== "column" && s.push(
902
997
  a(
903
998
  "invalid_matrix_sort",
904
999
  "Matrix sort axis must be row or column.",
905
1000
  `${u}.axis`
906
1001
  )
907
1002
  );
908
- const f = d.axis === "column" ? t : i;
909
- if (d.targetId !== void 0 && !f.has(d.targetId) && n.push(
1003
+ const m = d.axis === "column" ? t : i;
1004
+ if (d.targetId !== void 0 && !m.has(d.targetId) && s.push(
910
1005
  a(
911
1006
  "stable_id_required",
912
1007
  "Matrix sort targetId must reference an explicit public axis level id.",
913
1008
  `${u}.targetId`
914
1009
  )
915
- ), L(
1010
+ ), V(
916
1011
  d.direction,
917
1012
  `${u}.direction`,
918
- n,
1013
+ s,
919
1014
  "invalid_matrix_sort_direction"
920
1015
  ), H(
921
1016
  d.nulls,
922
1017
  `${u}.nulls`,
923
- n,
1018
+ s,
924
1019
  "invalid_matrix_sort_nulls"
925
- ), U(
1020
+ ), G(
926
1021
  d.scope,
927
1022
  `${u}.scope`,
928
- n,
1023
+ s,
929
1024
  "invalid_matrix_sort_scope"
930
1025
  ), !c(d.by)) {
931
- n.push(
1026
+ s.push(
932
1027
  a(
933
1028
  "invalid_matrix_sort_by",
934
1029
  "Matrix sort by must be a structured object.",
@@ -939,36 +1034,36 @@ function we(e, i, t, s, n) {
939
1034
  }
940
1035
  if (d.by.kind !== "label") {
941
1036
  if (d.by.kind === "field") {
942
- m(d.by.field, `${u}.by.field`, n, {
1037
+ f(d.by.field, `${u}.by.field`, s, {
943
1038
  required: !0
944
1039
  }), _(
945
1040
  d.by.aggregate,
946
1041
  `${u}.by.aggregate`,
947
- n
1042
+ s
948
1043
  );
949
1044
  return;
950
1045
  }
951
1046
  if (d.by.kind === "value") {
952
- (!l(d.by.valueId) || !s.has(d.by.valueId)) && n.push(
1047
+ (!l(d.by.valueId) || !n.has(d.by.valueId)) && s.push(
953
1048
  a(
954
1049
  "stable_id_required",
955
1050
  "Matrix value sort must reference an explicit public value id.",
956
1051
  `${u}.by.valueId`
957
1052
  )
958
- ), d.by.rowPath !== void 0 && $(
1053
+ ), d.by.rowPath !== void 0 && M(
959
1054
  d.by.rowPath,
960
1055
  `${u}.by.rowPath`,
961
1056
  i,
962
- n
963
- ), d.by.columnPath !== void 0 && $(
1057
+ s
1058
+ ), d.by.columnPath !== void 0 && M(
964
1059
  d.by.columnPath,
965
1060
  `${u}.by.columnPath`,
966
1061
  t,
967
- n
1062
+ s
968
1063
  );
969
1064
  return;
970
1065
  }
971
- n.push(
1066
+ s.push(
972
1067
  a(
973
1068
  "invalid_matrix_sort_by",
974
1069
  "Matrix sort by must be label, field, or value.",
@@ -979,7 +1074,7 @@ function we(e, i, t, s, n) {
979
1074
  });
980
1075
  }
981
1076
  }
982
- function $e(e, i) {
1077
+ function Ie(e, i) {
983
1078
  if (e !== void 0) {
984
1079
  if (!c(e)) {
985
1080
  i.push(
@@ -1061,7 +1156,7 @@ function q(e, i, t) {
1061
1156
  )
1062
1157
  ));
1063
1158
  }
1064
- function Me(e, i) {
1159
+ function Re(e, i) {
1065
1160
  if (e !== void 0) {
1066
1161
  if (!c(e)) {
1067
1162
  i.push(
@@ -1084,7 +1179,7 @@ function Me(e, i) {
1084
1179
  );
1085
1180
  }
1086
1181
  }
1087
- function Ae(e, i) {
1182
+ function De(e, i) {
1088
1183
  var d;
1089
1184
  ((d = e.source) == null ? void 0 : d.kind) === "sql" && i.push(
1090
1185
  a(
@@ -1093,48 +1188,48 @@ function Ae(e, i) {
1093
1188
  "source.kind"
1094
1189
  )
1095
1190
  );
1096
- const t = E(e.rows, "rows", i, {
1191
+ const t = O(e.rows, "rows", i, {
1097
1192
  required: !0
1098
- }), s = E(e.columns, "columns", i, {
1193
+ }), n = O(e.columns, "columns", i, {
1099
1194
  required: !1
1100
- }), n = ye(e.values, "values", i);
1101
- h(e.filters, "filters", i), e.totals !== void 0 && he(e.totals, "totals", i), x(
1102
- t.map((f) => f.id),
1195
+ }), s = Me(e.values, "values", i);
1196
+ x(e.filters, "filters", i), e.totals !== void 0 && Se(e.totals, "totals", i), w(
1197
+ t.map((m) => m.id),
1103
1198
  "rows",
1104
1199
  "row axis level",
1105
1200
  i
1106
- ), x(
1107
- s.map((f) => f.id),
1201
+ ), w(
1202
+ n.map((m) => m.id),
1108
1203
  "columns",
1109
1204
  "column axis level",
1110
1205
  i
1111
- ), x(
1112
- n.map((f) => f.id),
1206
+ ), w(
1207
+ s.map((m) => m.id),
1113
1208
  "values",
1114
1209
  "value",
1115
1210
  i
1116
1211
  );
1117
1212
  const r = new Set(
1118
- t.map((f) => f.id).filter((f) => l(f))
1213
+ t.map((m) => m.id).filter((m) => l(m))
1119
1214
  ), o = new Set(
1120
- s.map((f) => f.id).filter((f) => l(f))
1215
+ n.map((m) => m.id).filter((m) => l(m))
1121
1216
  ), u = new Set(
1122
- n.map((f) => f.id).filter((f) => l(f))
1217
+ s.map((m) => m.id).filter((m) => l(m))
1123
1218
  );
1124
- we(
1219
+ ke(
1125
1220
  e.sort,
1126
1221
  r,
1127
1222
  o,
1128
1223
  u,
1129
1224
  i
1130
- ), xe(
1225
+ ), Ae(
1131
1226
  e.expansion,
1132
1227
  r,
1133
1228
  o,
1134
1229
  i
1135
- ), $e(e.layout, i), Me(e.displayLimits, i);
1230
+ ), Ie(e.layout, i), Re(e.displayLimits, i);
1136
1231
  }
1137
- function ke(e, i) {
1232
+ function Pe(e, i) {
1138
1233
  if (e.analysis === void 0)
1139
1234
  return;
1140
1235
  if (!c(e.analysis)) {
@@ -1177,9 +1272,9 @@ function ke(e, i) {
1177
1272
  )
1178
1273
  );
1179
1274
  const { timeWindow: t } = e.analysis;
1180
- t !== void 0 && M(t, "analysis.timeWindow", i);
1275
+ t !== void 0 && S(t, "analysis.timeWindow", i);
1181
1276
  }
1182
- function M(e, i, t) {
1277
+ function S(e, i, t) {
1183
1278
  if (!c(e)) {
1184
1279
  t.push(
1185
1280
  a(
@@ -1210,20 +1305,20 @@ function M(e, i, t) {
1210
1305
  `${i}.end`
1211
1306
  )
1212
1307
  ), l(e.start) && l(e.end)) {
1213
- const s = R(e.start), n = R(e.end);
1214
- s || t.push(
1308
+ const n = P(e.start), s = P(e.end);
1309
+ n || t.push(
1215
1310
  a(
1216
1311
  "invalid_time_window",
1217
1312
  "Absolute time window start must be a valid ISO date or timestamp.",
1218
1313
  `${i}.start`
1219
1314
  )
1220
- ), n || t.push(
1315
+ ), s || t.push(
1221
1316
  a(
1222
1317
  "invalid_time_window",
1223
1318
  "Absolute time window end must be a valid ISO date or timestamp.",
1224
1319
  `${i}.end`
1225
1320
  )
1226
- ), s && n && s.getTime() > n.getTime() && t.push(
1321
+ ), n && s && n.getTime() > s.getTime() && t.push(
1227
1322
  a(
1228
1323
  "invalid_time_window",
1229
1324
  "Absolute time window start must be before or equal to end.",
@@ -1259,7 +1354,7 @@ function M(e, i, t) {
1259
1354
  )
1260
1355
  );
1261
1356
  }
1262
- function h(e, i, t) {
1357
+ function x(e, i, t) {
1263
1358
  if (e !== void 0) {
1264
1359
  if (!Array.isArray(e)) {
1265
1360
  t.push(
@@ -1271,10 +1366,10 @@ function h(e, i, t) {
1271
1366
  );
1272
1367
  return;
1273
1368
  }
1274
- e.forEach((s, n) => {
1369
+ e.forEach((n, s) => {
1275
1370
  var d;
1276
- const r = `${i}.${n}`;
1277
- if (!c(s)) {
1371
+ const r = `${i}.${s}`;
1372
+ if (!c(n)) {
1278
1373
  t.push(
1279
1374
  a(
1280
1375
  "invalid_analytics_filter",
@@ -1284,8 +1379,8 @@ function h(e, i, t) {
1284
1379
  );
1285
1380
  return;
1286
1381
  }
1287
- const o = s;
1288
- m(o.field, `${r}.field`, t, {
1382
+ const o = n;
1383
+ f(o.field, `${r}.field`, t, {
1289
1384
  required: !0
1290
1385
  }), o.scope !== void 0 && o.scope !== "row" && o.scope !== "aggregate" && t.push(
1291
1386
  a(
@@ -1334,9 +1429,9 @@ function h(e, i, t) {
1334
1429
  return;
1335
1430
  }
1336
1431
  if (o.values !== void 0) {
1337
- const f = o.values.length;
1432
+ const m = o.values.length;
1338
1433
  if (o.operator === "between" || o.operator === "not_between") {
1339
- f !== 2 && t.push(
1434
+ m !== 2 && t.push(
1340
1435
  a(
1341
1436
  "invalid_analytics_filter_values",
1342
1437
  "Between analytics filters must include exactly two values.",
@@ -1345,7 +1440,7 @@ function h(e, i, t) {
1345
1440
  );
1346
1441
  return;
1347
1442
  }
1348
- (o.operator === "contains" || o.operator === "not_contains" || o.operator === "=" || o.operator === "!=" || o.operator === ">" || o.operator === ">=" || o.operator === "<" || o.operator === "<=" || o.operator === void 0) && f !== 1 && t.push(
1443
+ (o.operator === "contains" || o.operator === "not_contains" || o.operator === "=" || o.operator === "!=" || o.operator === ">" || o.operator === ">=" || o.operator === "<" || o.operator === "<=" || o.operator === void 0) && m !== 1 && t.push(
1349
1444
  a(
1350
1445
  "invalid_analytics_filter_values",
1351
1446
  "Scalar analytics filters must include exactly one value. Use in/not_in for multiple values.",
@@ -1356,7 +1451,7 @@ function h(e, i, t) {
1356
1451
  });
1357
1452
  }
1358
1453
  }
1359
- function Se(e) {
1454
+ function Te(e) {
1360
1455
  const i = [];
1361
1456
  if (!c(e))
1362
1457
  return i.push(
@@ -1379,19 +1474,19 @@ function Se(e) {
1379
1474
  "Derived field needs a label.",
1380
1475
  "label"
1381
1476
  )
1382
- ), le.has(e.resultRole) || i.push(
1477
+ ), ce.has(e.resultRole) || i.push(
1383
1478
  a(
1384
1479
  "invalid_derived_field_role",
1385
1480
  "Derived field resultRole must be measure, group, date, id, or filter.",
1386
1481
  "resultRole"
1387
1482
  )
1388
- ), C.has(e.dataType) || i.push(
1483
+ ), U.has(e.dataType) || i.push(
1389
1484
  a(
1390
1485
  "invalid_derived_field_data_type",
1391
1486
  "Derived field dataType must be string, number, boolean, date, datetime, or unknown.",
1392
1487
  "dataType"
1393
1488
  )
1394
- ), ue.has(e.computeStage) || i.push(
1489
+ ), me.has(e.computeStage) || i.push(
1395
1490
  a(
1396
1491
  "invalid_derived_field_compute_stage",
1397
1492
  "Derived field computeStage must be row or aggregate.",
@@ -1419,7 +1514,7 @@ function Se(e) {
1419
1514
  e.defaultAggregate,
1420
1515
  "defaultAggregate",
1421
1516
  i
1422
- ), e.aggregationBehavior !== void 0 && !ce.has(
1517
+ ), e.aggregationBehavior !== void 0 && !ge.has(
1423
1518
  e.aggregationBehavior
1424
1519
  ) && i.push(
1425
1520
  a(
@@ -1427,7 +1522,7 @@ function Se(e) {
1427
1522
  "Derived field aggregationBehavior is not supported.",
1428
1523
  "aggregationBehavior"
1429
1524
  )
1430
- ), e.aggregationStrategy !== void 0 && !fe.has(
1525
+ ), e.aggregationStrategy !== void 0 && !ve.has(
1431
1526
  e.aggregationStrategy
1432
1527
  ) && i.push(
1433
1528
  a(
@@ -1453,7 +1548,7 @@ function Se(e) {
1453
1548
  "Derived field needs at least one typed input.",
1454
1549
  "inputs"
1455
1550
  )
1456
- ) : Object.entries(e.inputs).forEach(([t, s]) => {
1551
+ ) : Object.entries(e.inputs).forEach(([t, n]) => {
1457
1552
  if (!l(t)) {
1458
1553
  i.push(
1459
1554
  a(
@@ -1464,13 +1559,13 @@ function Se(e) {
1464
1559
  );
1465
1560
  return;
1466
1561
  }
1467
- me(
1468
- s,
1562
+ be(
1563
+ n,
1469
1564
  `inputs.${t}`,
1470
1565
  i
1471
1566
  );
1472
1567
  }), l(e.expression) && c(e.inputs)) {
1473
- const t = re(e.expression), s = new Set(t), n = Object.keys(e.inputs).filter(
1568
+ const t = de(e.expression), n = new Set(t), s = Object.keys(e.inputs).filter(
1474
1569
  (r) => l(r)
1475
1570
  );
1476
1571
  t.forEach((r) => {
@@ -1481,8 +1576,8 @@ function Se(e) {
1481
1576
  "expression"
1482
1577
  )
1483
1578
  );
1484
- }), n.forEach((r) => {
1485
- s.has(r) || i.push(
1579
+ }), s.forEach((r) => {
1580
+ n.has(r) || i.push(
1486
1581
  a(
1487
1582
  "unused_derived_field_input",
1488
1583
  `Derived field input "${r}" is not referenced by expression.`,
@@ -1491,7 +1586,7 @@ function Se(e) {
1491
1586
  );
1492
1587
  });
1493
1588
  }
1494
- return e.tags !== void 0 && (!Array.isArray(e.tags) || e.tags.some((t) => !l(t))) && i.push(
1589
+ return k(e.format, "format", i), e.tags !== void 0 && (!Array.isArray(e.tags) || e.tags.some((t) => !l(t))) && i.push(
1495
1590
  a(
1496
1591
  "invalid_derived_field_tags",
1497
1592
  "Derived field tags must be non-empty strings.",
@@ -1499,7 +1594,7 @@ function Se(e) {
1499
1594
  )
1500
1595
  ), { ok: i.length === 0, errors: i, warnings: [] };
1501
1596
  }
1502
- function Ne(e) {
1597
+ function je(e) {
1503
1598
  const i = [];
1504
1599
  if (!c(e))
1505
1600
  return i.push(
@@ -1522,11 +1617,11 @@ function Ne(e) {
1522
1617
  "Result calculation kind must be percent_of_total, rank, running_total, or previous_row_delta.",
1523
1618
  "kind"
1524
1619
  )
1525
- ), T(e.input, "input", i), pe(e.output, "output", i), e.kind === "percent_of_total") {
1620
+ ), N(e.input, "input", i), ye(e.output, "output", i), e.kind === "percent_of_total") {
1526
1621
  const t = e.denominator;
1527
- t !== void 0 && (c(t) ? t.scope === "population" ? (m(t.metric, "denominator.metric", i, {
1622
+ t !== void 0 && (c(t) ? t.scope === "population" ? (f(t.metric, "denominator.metric", i, {
1528
1623
  required: !0
1529
- }), h(
1624
+ }), x(
1530
1625
  t.filters,
1531
1626
  "denominator.filters",
1532
1627
  i
@@ -1550,10 +1645,10 @@ function Ne(e) {
1550
1645
  "Rank result calculation order must be asc or desc.",
1551
1646
  "order"
1552
1647
  )
1553
- ), (e.kind === "running_total" || e.kind === "previous_row_delta") && e.orderBy !== void 0 && T(e.orderBy, "orderBy", i), { ok: i.length === 0, errors: i, warnings: [] };
1648
+ ), (e.kind === "running_total" || e.kind === "previous_row_delta") && e.orderBy !== void 0 && N(e.orderBy, "orderBy", i), { ok: i.length === 0, errors: i, warnings: [] };
1554
1649
  }
1555
- function G(e) {
1556
- var s;
1650
+ function z(e) {
1651
+ var n;
1557
1652
  const i = [], t = [];
1558
1653
  if (!e || typeof e != "object")
1559
1654
  return {
@@ -1578,8 +1673,8 @@ function G(e) {
1578
1673
  "Analytics intent version must be 1.",
1579
1674
  "version"
1580
1675
  )
1581
- ), F(e.source, "source", i), Ie(e, i), e.kind === "metric") {
1582
- const n = Array.isArray(e.metrics) ? e.metrics.filter(
1676
+ ), L(e.source, "source", i), Ee(e, i), e.kind === "metric") {
1677
+ const s = Array.isArray(e.metrics) ? e.metrics.filter(
1583
1678
  (r) => c(r) && l(r.name)
1584
1679
  ) : [];
1585
1680
  if (!Array.isArray(e.metrics) || e.metrics.length === 0 ? i.push(
@@ -1596,38 +1691,38 @@ function G(e) {
1596
1691
  "Metric intent metrics must be an array of field references with names.",
1597
1692
  "metrics"
1598
1693
  )
1599
- ), n.forEach((r, o) => {
1600
- m(r, `metrics.${o}`, i, {
1694
+ ), s.forEach((r, o) => {
1695
+ f(r, `metrics.${o}`, i, {
1601
1696
  required: !0
1602
1697
  });
1603
- }), n.length > 0 && !Y(n)) {
1604
- const r = n.find(
1605
- (o, u) => n.some(
1606
- (d, f) => f !== u && j(d, o)
1698
+ }), s.length > 0 && !Z(s)) {
1699
+ const r = s.find(
1700
+ (o, u) => s.some(
1701
+ (d, m) => m !== u && C(d, o)
1607
1702
  )
1608
1703
  );
1609
1704
  r && i.push(
1610
1705
  a(
1611
1706
  "duplicate_metric",
1612
- X(r),
1707
+ J(r),
1613
1708
  "metrics"
1614
1709
  )
1615
1710
  );
1616
1711
  }
1617
1712
  if (c(e.primaryMetric) && l(e.primaryMetric.name) && A(
1618
1713
  e.primaryMetric,
1619
- n
1714
+ s
1620
1715
  ).length > 1 && i.push(
1621
1716
  a(
1622
1717
  "ambiguous_primary_metric",
1623
1718
  "Metric intent primaryMetric must identify exactly one selected metric.",
1624
1719
  "primaryMetric"
1625
1720
  )
1626
- ), e.primaryMetric !== void 0 && (m(e.primaryMetric, "primaryMetric", i, {
1721
+ ), e.primaryMetric !== void 0 && (f(e.primaryMetric, "primaryMetric", i, {
1627
1722
  required: !0
1628
- }), c(e.primaryMetric) && l(e.primaryMetric.name) && n.length > 0 && !J(
1723
+ }), c(e.primaryMetric) && l(e.primaryMetric.name) && s.length > 0 && !ee(
1629
1724
  e.primaryMetric,
1630
- n
1725
+ s
1631
1726
  ) && i.push(
1632
1727
  a(
1633
1728
  "invalid_primary_metric",
@@ -1648,14 +1743,14 @@ function G(e) {
1648
1743
  "Metric intent dimensions must be an array of field references with names.",
1649
1744
  "dimensions"
1650
1745
  )
1651
- ), e.dateField !== void 0 && m(e.dateField, "dateField", i), e.timeWindow !== void 0 && (M(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1746
+ ), e.dateField !== void 0 && f(e.dateField, "dateField", i), e.timeWindow !== void 0 && (S(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1652
1747
  a(
1653
1748
  "missing_time_window_date_field",
1654
1749
  "Metric timeWindow needs a dateField.",
1655
1750
  "dateField"
1656
1751
  )
1657
- )), h(e.filters, "filters", i), Array.isArray(e.dimensions) && e.dimensions.forEach((r, o) => {
1658
- m(r, `dimensions.${o}`, i);
1752
+ )), x(e.filters, "filters", i), Array.isArray(e.dimensions) && e.dimensions.forEach((r, o) => {
1753
+ f(r, `dimensions.${o}`, i);
1659
1754
  }), e.orderBy !== void 0) {
1660
1755
  if (!c(e.orderBy))
1661
1756
  i.push(
@@ -1665,7 +1760,7 @@ function G(e) {
1665
1760
  "orderBy"
1666
1761
  )
1667
1762
  );
1668
- else if (m(e.orderBy.field, "orderBy.field", i, {
1763
+ else if (f(e.orderBy.field, "orderBy.field", i, {
1669
1764
  required: !0
1670
1765
  }), e.orderBy.direction !== "asc" && e.orderBy.direction !== "desc" && i.push(
1671
1766
  a(
@@ -1675,13 +1770,13 @@ function G(e) {
1675
1770
  )
1676
1771
  ), c(e.orderBy.field) && l(e.orderBy.field.name)) {
1677
1772
  const r = [
1678
- ...n,
1773
+ ...s,
1679
1774
  ...e.timeGrain && e.dateField && c(e.dateField) ? [e.dateField] : [],
1680
1775
  ...Array.isArray(e.dimensions) ? e.dimensions.filter(
1681
1776
  (o) => c(o) && l(o.name)
1682
1777
  ) : []
1683
1778
  ];
1684
- r.length > 0 && !W(
1779
+ r.length > 0 && !ie(
1685
1780
  e.orderBy.field,
1686
1781
  r
1687
1782
  ) && i.push(
@@ -1693,7 +1788,7 @@ function G(e) {
1693
1788
  );
1694
1789
  }
1695
1790
  }
1696
- ke(e, i);
1791
+ Pe(e, i);
1697
1792
  } else e.kind === "records" ? (!Array.isArray(e.fields) || e.fields.length === 0 ? i.push(
1698
1793
  a(
1699
1794
  "missing_record_fields",
@@ -1701,30 +1796,30 @@ function G(e) {
1701
1796
  "fields"
1702
1797
  )
1703
1798
  ) : e.fields.some(
1704
- (n) => !c(n) || !l(n.name)
1799
+ (s) => !c(s) || !l(s.name)
1705
1800
  ) && i.push(
1706
1801
  a(
1707
1802
  "invalid_record_fields",
1708
1803
  "Records intent fields must be field references with names.",
1709
1804
  "fields"
1710
1805
  )
1711
- ), Array.isArray(e.fields) && e.fields.forEach((n, r) => {
1712
- m(n, `fields.${r}`, i);
1713
- }), e.dateField !== void 0 && m(e.dateField, "dateField", i), P(e.pagination, "pagination", i), e.timeWindow !== void 0 && (M(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1806
+ ), Array.isArray(e.fields) && e.fields.forEach((s, r) => {
1807
+ f(s, `fields.${r}`, i);
1808
+ }), e.dateField !== void 0 && f(e.dateField, "dateField", i), E(e.pagination, "pagination", i), e.timeWindow !== void 0 && (S(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1714
1809
  a(
1715
1810
  "missing_time_window_date_field",
1716
1811
  "Records timeWindow needs a dateField.",
1717
1812
  "dateField"
1718
1813
  )
1719
- )), h(e.filters, "filters", i), Array.isArray(e.filters) && e.filters.forEach((n, r) => {
1720
- c(n) && n.scope === "aggregate" && i.push(
1814
+ )), x(e.filters, "filters", i), Array.isArray(e.filters) && e.filters.forEach((s, r) => {
1815
+ c(s) && s.scope === "aggregate" && i.push(
1721
1816
  a(
1722
1817
  "unsupported_record_filter_scope",
1723
1818
  "Records intents support row-scope filters only. Use a metric intent for aggregate-scope filters.",
1724
1819
  `filters.${r}.scope`
1725
1820
  )
1726
1821
  );
1727
- }), e.orderBy !== void 0 && (c(e.orderBy) ? (m(e.orderBy.field, "orderBy.field", i, {
1822
+ }), e.orderBy !== void 0 && (c(e.orderBy) ? (f(e.orderBy.field, "orderBy.field", i, {
1728
1823
  required: !0
1729
1824
  }), e.orderBy.direction !== "asc" && e.orderBy.direction !== "desc" && i.push(
1730
1825
  a(
@@ -1744,7 +1839,7 @@ function G(e) {
1744
1839
  "Input options intent needs a field.",
1745
1840
  "field"
1746
1841
  )
1747
- ), m(e.field, "field", i, { required: !0 })) : e.kind === "matrix" ? Ae(e, i) : e.kind === "sql" ? (((s = e.source) == null ? void 0 : s.kind) !== "sql" && i.push(
1842
+ ), f(e.field, "field", i, { required: !0 })) : e.kind === "matrix" ? De(e, i) : e.kind === "sql" ? (((n = e.source) == null ? void 0 : n.kind) !== "sql" && i.push(
1748
1843
  a(
1749
1844
  "invalid_sql_source",
1750
1845
  "SQL analytics intent must use a SQL execution source.",
@@ -1752,13 +1847,13 @@ function G(e) {
1752
1847
  )
1753
1848
  ), l(e.sql) || i.push(
1754
1849
  a("missing_sql", "SQL analytics intent needs SQL text.", "sql")
1755
- ), Z(
1850
+ ), W(
1756
1851
  e.defaultParameters,
1757
1852
  "defaultParameters",
1758
1853
  i
1759
- ), Array.isArray(e.fields) && e.fields.forEach((n, r) => {
1760
- m(n, `fields.${r}`, i);
1761
- }), P(e.pagination, "pagination", i)) : i.push(
1854
+ ), Array.isArray(e.fields) && e.fields.forEach((s, r) => {
1855
+ f(s, `fields.${r}`, i);
1856
+ }), E(e.pagination, "pagination", i)) : i.push(
1762
1857
  a(
1763
1858
  "invalid_analytics_kind",
1764
1859
  "Analytics kind is not supported.",
@@ -1769,10 +1864,10 @@ function G(e) {
1769
1864
  ok: i.length === 0,
1770
1865
  errors: i,
1771
1866
  warnings: t,
1772
- repairHints: De(i)
1867
+ repairHints: Oe(i)
1773
1868
  };
1774
1869
  }
1775
- function Ie(e, i) {
1870
+ function Ee(e, i) {
1776
1871
  if (!(!("derivedFields" in e) || e.derivedFields === void 0)) {
1777
1872
  if (!Array.isArray(e.derivedFields)) {
1778
1873
  i.push(
@@ -1784,19 +1879,19 @@ function Ie(e, i) {
1784
1879
  );
1785
1880
  return;
1786
1881
  }
1787
- e.derivedFields.forEach((t, s) => {
1788
- Se(
1882
+ e.derivedFields.forEach((t, n) => {
1883
+ Te(
1789
1884
  t
1790
1885
  ).errors.forEach((r) => {
1791
1886
  i.push({
1792
1887
  ...r,
1793
- path: r.path ? `derivedFields.${s}.${r.path}` : `derivedFields.${s}`
1888
+ path: r.path ? `derivedFields.${n}.${r.path}` : `derivedFields.${n}`
1794
1889
  });
1795
1890
  });
1796
1891
  });
1797
1892
  }
1798
1893
  }
1799
- function Re(e) {
1894
+ function Ne(e) {
1800
1895
  const i = [], t = [];
1801
1896
  if (!e || typeof e != "object")
1802
1897
  return {
@@ -1828,18 +1923,18 @@ function Re(e) {
1828
1923
  "Answer-obligations operation intent needs at least one obligation.",
1829
1924
  "obligations"
1830
1925
  )
1831
- ) : e.obligations.forEach((s, n) => {
1832
- l(s.id) || i.push(
1926
+ ) : e.obligations.forEach((n, s) => {
1927
+ l(n.id) || i.push(
1833
1928
  a(
1834
1929
  "missing_obligation_id",
1835
1930
  "Each analytics obligation needs an id.",
1836
- `obligations.${n}.id`
1931
+ `obligations.${s}.id`
1837
1932
  )
1838
- ), l(s.prompt) || i.push(
1933
+ ), l(n.prompt) || i.push(
1839
1934
  a(
1840
1935
  "missing_obligation_prompt",
1841
1936
  "Each analytics obligation needs a prompt.",
1842
- `obligations.${n}.prompt`
1937
+ `obligations.${s}.prompt`
1843
1938
  )
1844
1939
  );
1845
1940
  });
@@ -1851,10 +1946,10 @@ function Re(e) {
1851
1946
  "instruction"
1852
1947
  )
1853
1948
  ), e.analyticsIntent) {
1854
- const s = G(
1949
+ const n = z(
1855
1950
  e.analyticsIntent
1856
1951
  );
1857
- i.push(...s.errors), t.push(...s.warnings);
1952
+ i.push(...n.errors), t.push(...n.warnings);
1858
1953
  }
1859
1954
  } else
1860
1955
  i.push(
@@ -1868,10 +1963,10 @@ function Re(e) {
1868
1963
  ok: i.length === 0,
1869
1964
  errors: i,
1870
1965
  warnings: t,
1871
- repairHints: V(i)
1966
+ repairHints: Q(i)
1872
1967
  };
1873
1968
  }
1874
- function qe(e) {
1969
+ function Ce(e) {
1875
1970
  const i = [], t = [];
1876
1971
  if (!e || typeof e != "object")
1877
1972
  return {
@@ -1899,10 +1994,10 @@ function qe(e) {
1899
1994
  "kind"
1900
1995
  )
1901
1996
  );
1902
- const s = Re(
1997
+ const n = Ne(
1903
1998
  e.operationIntent
1904
1999
  );
1905
- return i.push(...s.errors), t.push(...s.warnings), Array.isArray(e.plannedToolCalls) || i.push(
2000
+ return i.push(...n.errors), t.push(...n.warnings), Array.isArray(e.plannedToolCalls) || i.push(
1906
2001
  a(
1907
2002
  "invalid_planned_tool_calls",
1908
2003
  "Recovery plan plannedToolCalls must be an array.",
@@ -1912,16 +2007,16 @@ function qe(e) {
1912
2007
  ok: i.length === 0,
1913
2008
  errors: i,
1914
2009
  warnings: t,
1915
- repairHints: V(i)
2010
+ repairHints: Q(i)
1916
2011
  };
1917
2012
  }
1918
- function V(e) {
2013
+ function Q(e) {
1919
2014
  return e.map((i) => ({
1920
2015
  code: i.code,
1921
2016
  recommendedNextStep: i.code === "missing_obligations" ? "Normalize the user request into one or more typed analytics obligations before recovery planning." : "Correct the operation/recovery contract shape before planning execution."
1922
2017
  }));
1923
2018
  }
1924
- function De(e) {
2019
+ function Oe(e) {
1925
2020
  return e.map((i) => {
1926
2021
  switch (i.code) {
1927
2022
  case "missing_source":
@@ -1992,7 +2087,7 @@ function De(e) {
1992
2087
  }
1993
2088
  }).filter((i) => !!i);
1994
2089
  }
1995
- function Pe(e, i, t, s) {
2090
+ function Fe(e, i, t, n) {
1996
2091
  if (!e || typeof e != "object") {
1997
2092
  t.push(
1998
2093
  a("invalid_view", "Dashboard view must be an object.", i)
@@ -2012,7 +2107,7 @@ function Pe(e, i, t, s) {
2012
2107
  return;
2013
2108
  }
2014
2109
  if (e.presentation.kind === "text") {
2015
- l(e.text) || s.push(
2110
+ l(e.text) || n.push(
2016
2111
  a(
2017
2112
  "missing_text_content",
2018
2113
  "Text views should include text content.",
@@ -2038,8 +2133,8 @@ function Pe(e, i, t, s) {
2038
2133
  `${i}.analytics.kind`
2039
2134
  )
2040
2135
  );
2041
- const n = G(e.analytics);
2042
- for (const r of n.errors)
2136
+ const s = z(e.analytics);
2137
+ for (const r of s.errors)
2043
2138
  t.push(
2044
2139
  a(
2045
2140
  r.code,
@@ -2047,8 +2142,8 @@ function Pe(e, i, t, s) {
2047
2142
  `${i}.analytics${r.path ? `.${r.path}` : ""}`
2048
2143
  )
2049
2144
  );
2050
- for (const r of n.warnings)
2051
- s.push(
2145
+ for (const r of s.warnings)
2146
+ n.push(
2052
2147
  a(
2053
2148
  r.code,
2054
2149
  r.message,
@@ -2056,7 +2151,7 @@ function Pe(e, i, t, s) {
2056
2151
  )
2057
2152
  );
2058
2153
  }
2059
- function Be(e) {
2154
+ function Le(e) {
2060
2155
  const i = [], t = [];
2061
2156
  if (!e || typeof e != "object")
2062
2157
  return {
@@ -2076,31 +2171,31 @@ function Be(e) {
2076
2171
  ), l(e.title) || i.push(
2077
2172
  a("missing_title", "Dashboard intent needs a title.", "title")
2078
2173
  );
2079
- const s = Array.isArray(e.inputs) ? e.inputs : [], n = w(
2080
- s.filter(c).map((d) => d.id).filter((d) => typeof d == "string")
2174
+ const n = Array.isArray(e.inputs) ? e.inputs : [], s = $(
2175
+ n.filter(c).map((d) => d.id).filter((d) => typeof d == "string")
2081
2176
  );
2082
- n && i.push(
2177
+ s && i.push(
2083
2178
  a(
2084
2179
  "duplicate_input_id",
2085
- `Duplicate input id: ${n}.`,
2180
+ `Duplicate input id: ${s}.`,
2086
2181
  "inputs"
2087
2182
  )
2088
2183
  );
2089
- for (const [d, f] of s.entries()) {
2184
+ for (const [d, m] of n.entries()) {
2090
2185
  const p = `inputs.${d}`;
2091
- if (!c(f)) {
2186
+ if (!c(m)) {
2092
2187
  i.push(
2093
2188
  a("invalid_input", "Dashboard input must be an object.", p)
2094
2189
  );
2095
2190
  continue;
2096
2191
  }
2097
- l(f.id) || i.push(
2192
+ l(m.id) || i.push(
2098
2193
  a("missing_input_id", "Input needs an id.", `${p}.id`)
2099
- ), l(f.label) || i.push(
2194
+ ), l(m.label) || i.push(
2100
2195
  a("missing_input_label", "Input needs a label.", `${p}.label`)
2101
- ), !f.field || !l(f.field.name) ? i.push(
2196
+ ), !m.field || !l(m.field.name) ? i.push(
2102
2197
  a("missing_input_field", "Input needs a field.", `${p}.field`)
2103
- ) : m(f.field, `${p}.field`, i);
2198
+ ) : f(m.field, `${p}.field`, i);
2104
2199
  }
2105
2200
  const r = Array.isArray(e.sections) ? e.sections : [];
2106
2201
  r.length === 0 && i.push(
@@ -2111,8 +2206,8 @@ function Be(e) {
2111
2206
  )
2112
2207
  );
2113
2208
  const o = r.flatMap(
2114
- (d) => d && typeof d == "object" && Array.isArray(d.views) ? d.views.filter(c).map((f) => f.id).filter((f) => !!f) : []
2115
- ), u = w(o);
2209
+ (d) => d && typeof d == "object" && Array.isArray(d.views) ? d.views.filter(c).map((m) => m.id).filter((m) => !!m) : []
2210
+ ), u = $(o);
2116
2211
  u && i.push(
2117
2212
  a(
2118
2213
  "duplicate_view_id",
@@ -2120,9 +2215,9 @@ function Be(e) {
2120
2215
  "sections"
2121
2216
  )
2122
2217
  );
2123
- for (const [d, f] of r.entries()) {
2218
+ for (const [d, m] of r.entries()) {
2124
2219
  const p = `sections.${d}`;
2125
- if (!f || typeof f != "object") {
2220
+ if (!m || typeof m != "object") {
2126
2221
  i.push(
2127
2222
  a(
2128
2223
  "invalid_section",
@@ -2132,13 +2227,13 @@ function Be(e) {
2132
2227
  );
2133
2228
  continue;
2134
2229
  }
2135
- if (l(f.title) || i.push(
2230
+ if (l(m.title) || i.push(
2136
2231
  a(
2137
2232
  "missing_section_title",
2138
2233
  "Dashboard section needs a title.",
2139
2234
  p
2140
2235
  )
2141
- ), !Array.isArray(f.views) || f.views.length === 0) {
2236
+ ), !Array.isArray(m.views) || m.views.length === 0) {
2142
2237
  i.push(
2143
2238
  a(
2144
2239
  "missing_section_views",
@@ -2148,8 +2243,8 @@ function Be(e) {
2148
2243
  );
2149
2244
  continue;
2150
2245
  }
2151
- for (const [b, y] of f.views.entries())
2152
- Pe(
2246
+ for (const [b, y] of m.views.entries())
2247
+ Fe(
2153
2248
  y,
2154
2249
  `${p}.views.${b}`,
2155
2250
  i,
@@ -2159,13 +2254,13 @@ function Be(e) {
2159
2254
  return { ok: i.length === 0, errors: i, warnings: t };
2160
2255
  }
2161
2256
  export {
2162
- Q as a,
2163
- Ne as b,
2164
- G as c,
2165
- Re as d,
2166
- qe as e,
2167
- Be as f,
2168
- Ee as n,
2169
- R as p,
2170
- Se as v
2257
+ K as a,
2258
+ je as b,
2259
+ z as c,
2260
+ Ne as d,
2261
+ Ce as e,
2262
+ Le as f,
2263
+ Be as n,
2264
+ P as p,
2265
+ Te as v
2171
2266
  };