react-semaphor 0.1.405 → 0.1.406

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 (64) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +2 -2
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +2 -2
  5. package/dist/chunks/analyze-result-contract-8nxUOWp8.js +1 -0
  6. package/dist/chunks/{analyze-result-contract-BUgK3759.js → analyze-result-contract-DPjm6btg.js} +303 -267
  7. package/dist/chunks/{calendar-preferences-dialog-yyKVESsD.js → calendar-preferences-dialog-BDovl96B.js} +1 -1
  8. package/dist/chunks/{calendar-preferences-dialog-kD_eKqZ6.js → calendar-preferences-dialog-BEJunQM-.js} +3 -3
  9. package/dist/chunks/{dashboard-briefing-launcher-DsFfLdYP.js → dashboard-briefing-launcher-D-G1kXb8.js} +1 -1
  10. package/dist/chunks/{dashboard-briefing-launcher-puN85iMD.js → dashboard-briefing-launcher-DmybDHiR.js} +4 -4
  11. package/dist/chunks/{dashboard-controls-CiHRgAaH.js → dashboard-controls-DIPQW6Vj.js} +1 -1
  12. package/dist/chunks/{dashboard-controls-BjbfKTaU.js → dashboard-controls-DgjlAGWu.js} +5 -5
  13. package/dist/chunks/{dashboard-json-C2hOm_iP.js → dashboard-json-DUmEB8x3.js} +3 -3
  14. package/dist/chunks/{dashboard-json-BPPYDVqC.js → dashboard-json-DvW8_MWp.js} +1 -1
  15. package/dist/chunks/{edit-dashboard-visual-Czq-e2AB.js → edit-dashboard-visual-BZnVLA4S.js} +1 -1
  16. package/dist/chunks/{edit-dashboard-visual-C7Wbdde4.js → edit-dashboard-visual-BuwFsoeW.js} +4 -4
  17. package/dist/chunks/{index-YXD_iY9T.js → index-D7JKnhyA.js} +2 -2
  18. package/dist/chunks/{index-VIOQ0Poi.js → index-DhkNgPPm.js} +5 -5
  19. package/dist/chunks/{switch-oim6Xl36.js → switch-DMlqgIx_.js} +1 -1
  20. package/dist/chunks/{switch-CXMExaSF.js → switch-DgiogS4X.js} +1 -1
  21. package/dist/chunks/{update-policy-BmtOqvbf.js → update-policy-2M0canB_.js} +1 -1
  22. package/dist/chunks/{update-policy-KImUg4Od.js → update-policy-Bv3_5LFK.js} +1 -1
  23. package/dist/chunks/{use-create-flow-overlay-state-Be93UF6S.js → use-create-flow-overlay-state-B8clS9IG.js} +3 -3
  24. package/dist/chunks/{use-create-flow-overlay-state-CCpI38qK.js → use-create-flow-overlay-state-C9QPAd9_.js} +1 -1
  25. package/dist/chunks/validators-BCQB11_y.js +1 -0
  26. package/dist/chunks/{validators-B1Mgdr3T.js → validators-DaBsAUsR.js} +254 -262
  27. package/dist/dashboard/index.cjs +1 -1
  28. package/dist/dashboard/index.js +1 -1
  29. package/dist/dashboard-authoring/index.cjs +1 -1
  30. package/dist/dashboard-authoring/index.js +2 -2
  31. package/dist/data-app-builder/index.cjs +1 -1
  32. package/dist/data-app-builder/index.js +2 -2
  33. package/dist/data-app-codegen/index.cjs +1 -1
  34. package/dist/data-app-codegen/index.js +2 -2
  35. package/dist/data-app-codegen-node/index.cjs +1 -1
  36. package/dist/data-app-codegen-node/index.js +3 -3
  37. package/dist/data-app-sdk/index.cjs +1 -1
  38. package/dist/data-app-sdk/index.js +2 -2
  39. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  40. package/dist/data-app-sdk-adapters/index.js +1 -1
  41. package/dist/data-app-sdk-validation/index.cjs +1 -1
  42. package/dist/data-app-sdk-validation/index.js +2 -2
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.js +7 -7
  45. package/dist/surfboard/index.cjs +1 -1
  46. package/dist/surfboard/index.js +2 -2
  47. package/dist/types/analytics-protocol.d.ts +0 -5
  48. package/dist/types/dashboard-assistant.d.ts +0 -5
  49. package/dist/types/dashboard-authoring.d.ts +0 -5
  50. package/dist/types/dashboard.d.ts +0 -5
  51. package/dist/types/data-app-builder.d.ts +0 -5
  52. package/dist/types/data-app-codegen-node.d.ts +0 -5
  53. package/dist/types/data-app-codegen.d.ts +0 -5
  54. package/dist/types/data-app-sdk-adapters.d.ts +0 -5
  55. package/dist/types/data-app-sdk-validation.d.ts +0 -5
  56. package/dist/types/data-app-sdk.d.ts +0 -5
  57. package/dist/types/main.d.ts +0 -5
  58. package/dist/types/shared.d.ts +0 -5
  59. package/dist/types/surfboard.d.ts +0 -5
  60. package/dist/types/types.d.ts +0 -5
  61. package/package.json +1 -1
  62. package/src/data-app-sdk/README.md +7 -0
  63. package/dist/chunks/analyze-result-contract-S8u7CcPL.js +0 -1
  64. package/dist/chunks/validators-DFOX0tYY.js +0 -1
@@ -6,17 +6,17 @@ function X(e) {
6
6
  for (let i = 0; i < e.length; i += 1) {
7
7
  const t = e[i];
8
8
  if (e.some(
9
- (s, o) => o !== i && L(s, t)
9
+ (n, o) => o !== i && C(n, t)
10
10
  ))
11
11
  return !1;
12
12
  }
13
13
  return !0;
14
14
  }
15
- function C(e, i) {
15
+ function L(e, i) {
16
16
  return K(e, i);
17
17
  }
18
- function L(e, i) {
19
- return C(e, i) && g(e) === g(i);
18
+ function C(e, i) {
19
+ return L(e, i) && g(e) === g(i);
20
20
  }
21
21
  function Z(e) {
22
22
  return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${g(e)}). Use different aggregates to request both, or remove one entry.`;
@@ -36,13 +36,13 @@ function J(e, i, t) {
36
36
  );
37
37
  return;
38
38
  }
39
- Object.entries(e).forEach(([s, o]) => {
40
- if (!s.trim()) {
39
+ Object.entries(e).forEach(([n, o]) => {
40
+ if (!n.trim()) {
41
41
  t.push(
42
42
  a(
43
43
  "invalid_sql_default_parameter_name",
44
44
  "SQL defaultParameters names must be non-empty strings.",
45
- `${i}.${s}`
45
+ `${i}.${n}`
46
46
  )
47
47
  );
48
48
  return;
@@ -51,7 +51,7 @@ function J(e, i, t) {
51
51
  a(
52
52
  "invalid_sql_default_parameter_value",
53
53
  "SQL defaultParameters values must be strings, numbers, booleans, nulls, or arrays of those scalar values.",
54
- `${i}.${s}`
54
+ `${i}.${n}`
55
55
  )
56
56
  );
57
57
  });
@@ -65,11 +65,11 @@ function ee(e, i) {
65
65
  }
66
66
  function M(e, i) {
67
67
  return i.filter(
68
- (s) => ie(e, s)
68
+ (n) => ie(e, n)
69
69
  );
70
70
  }
71
71
  function ie(e, i) {
72
- return te(e, i) ? e.source ? C(i, e) : !0 : !1;
72
+ return te(e, i) ? e.source ? L(i, e) : !0 : !1;
73
73
  }
74
74
  function te(e, i) {
75
75
  return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || ae(e, i) && g(i) !== g(e));
@@ -80,34 +80,34 @@ function ae(e, i) {
80
80
  function g(e) {
81
81
  return (e.aggregate || "SUM").toUpperCase();
82
82
  }
83
- const se = /^(\d{4})-(\d{2})-(\d{2})$/, ne = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;
83
+ const ne = /^(\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})$/;
84
84
  function T(e) {
85
85
  if (typeof e != "string")
86
86
  return null;
87
- const i = e.trim(), t = se.exec(i);
87
+ const i = e.trim(), t = ne.exec(i);
88
88
  if (t) {
89
89
  const [, y, D, F] = t;
90
90
  return E(y, D, F) ? new Date(Date.UTC(Number(y), Number(D) - 1, Number(F))) : null;
91
91
  }
92
- const s = ne.exec(i);
93
- if (!s)
92
+ const n = se.exec(i);
93
+ if (!n)
94
94
  return null;
95
- const [, o, n, r, c, d, p = "00", , m] = s;
96
- if (!E(o, n, r) || !v(c, 0, 23) || !v(d, 0, 59) || !v(p, 0, 59) || !oe(m))
95
+ const [, o, s, r, c, d, p = "00", , f] = n;
96
+ if (!E(o, s, r) || !v(c, 0, 23) || !v(d, 0, 59) || !v(p, 0, 59) || !oe(f))
97
97
  return null;
98
98
  const b = new Date(i);
99
99
  return Number.isFinite(b.getTime()) ? b : null;
100
100
  }
101
101
  function E(e, i, t) {
102
- const s = Number(e), o = Number(i), n = Number(t);
103
- if (!Number.isInteger(s) || !Number.isInteger(o) || !Number.isInteger(n) || o < 1 || o > 12)
102
+ const n = Number(e), o = Number(i), s = Number(t);
103
+ if (!Number.isInteger(n) || !Number.isInteger(o) || !Number.isInteger(s) || o < 1 || o > 12)
104
104
  return !1;
105
- const r = new Date(Date.UTC(s, o - 1, n));
106
- return r.getUTCFullYear() === s && r.getUTCMonth() === o - 1 && r.getUTCDate() === n;
105
+ const r = new Date(Date.UTC(n, o - 1, s));
106
+ return r.getUTCFullYear() === n && r.getUTCMonth() === o - 1 && r.getUTCDate() === s;
107
107
  }
108
108
  function v(e, i, t) {
109
- const s = Number(e);
110
- return Number.isInteger(s) && s >= i && s <= t;
109
+ const n = Number(e);
110
+ return Number.isInteger(n) && n >= i && n <= t;
111
111
  }
112
112
  function oe(e) {
113
113
  if (e === "Z")
@@ -122,19 +122,19 @@ function re(e) {
122
122
  const i = /* @__PURE__ */ new Set();
123
123
  let t = 0;
124
124
  for (; t < e.length; ) {
125
- const s = e[t];
126
- if (s === "'" || s === '"') {
125
+ const n = e[t];
126
+ if (n === "'" || n === '"') {
127
127
  t = de(e, t);
128
128
  continue;
129
129
  }
130
- if (s === "{") {
130
+ if (n === "{") {
131
131
  const o = e.indexOf("}", t + 1);
132
132
  if (o === -1) {
133
133
  t += 1;
134
134
  continue;
135
135
  }
136
- const n = e.slice(t + 1, o);
137
- /^[A-Za-z_][A-Za-z0-9_]*$/.test(n) && i.add(n), t = o + 1;
136
+ const s = e.slice(t + 1, o);
137
+ /^[A-Za-z_][A-Za-z0-9_]*$/.test(s) && i.add(s), t = o + 1;
138
138
  continue;
139
139
  }
140
140
  t += 1;
@@ -143,16 +143,16 @@ function re(e) {
143
143
  }
144
144
  function de(e, i) {
145
145
  const t = e[i];
146
- let s = i + 1;
147
- for (; s < e.length; ) {
148
- if (e[s] === t) {
149
- if (e[s + 1] === t) {
150
- s += 2;
146
+ let n = i + 1;
147
+ for (; n < e.length; ) {
148
+ if (e[n] === t) {
149
+ if (e[n + 1] === t) {
150
+ n += 2;
151
151
  continue;
152
152
  }
153
- return s + 1;
153
+ return n + 1;
154
154
  }
155
- s += 1;
155
+ n += 1;
156
156
  }
157
157
  return e.length;
158
158
  }
@@ -195,10 +195,10 @@ function w(e) {
195
195
  }
196
196
  return null;
197
197
  }
198
- function $(e, i, t, s) {
198
+ function $(e, i, t, n) {
199
199
  w(
200
- e.filter((n) => l(n))
201
- ) && s.push(
200
+ e.filter((s) => l(s))
201
+ ) && n.push(
202
202
  a(
203
203
  "duplicate_matrix_public_id",
204
204
  `Matrix ${t} ids must be unique so sort and expansion references are unambiguous.`,
@@ -268,9 +268,9 @@ function S(e, i, t) {
268
268
  a("invalid_source_kind", "Source kind is not supported.", i)
269
269
  );
270
270
  }
271
- function f(e, i, t, s = {}) {
271
+ function m(e, i, t, n = {}) {
272
272
  if (!e || !u(e)) {
273
- s.required && t.push(
273
+ n.required && t.push(
274
274
  a("missing_field_ref", "Field reference needs a name.", i)
275
275
  );
276
276
  return;
@@ -306,7 +306,7 @@ function ue(e, i, t) {
306
306
  "Input binding kind must be filter or control.",
307
307
  `${i}.kind`
308
308
  )
309
- ), e.field !== void 0 && f(e.field, `${i}.field`, t), e.relationshipHint !== void 0 && k(
309
+ ), e.field !== void 0 && m(e.field, `${i}.field`, t), e.relationshipHint !== void 0 && k(
310
310
  e.relationshipHint,
311
311
  `${i}.relationshipHint`,
312
312
  t
@@ -323,7 +323,7 @@ function k(e, i, t) {
323
323
  );
324
324
  return;
325
325
  }
326
- e.relationshipIds !== void 0 && (!Array.isArray(e.relationshipIds) || e.relationshipIds.some((s) => !l(s))) && t.push(
326
+ e.relationshipIds !== void 0 && (!Array.isArray(e.relationshipIds) || e.relationshipIds.some((n) => !l(n))) && t.push(
327
327
  a(
328
328
  "invalid_relationship_hint",
329
329
  "Relationship hint relationshipIds must be non-empty strings.",
@@ -344,7 +344,7 @@ function ce(e, i) {
344
344
  "Input options intent needs a labelField.",
345
345
  "labelField"
346
346
  )
347
- ), f(e.labelField, "labelField", i, {
347
+ ), m(e.labelField, "labelField", i, {
348
348
  required: !0
349
349
  }), (!e.valueField || !l(e.valueField.name)) && i.push(
350
350
  a(
@@ -352,12 +352,12 @@ function ce(e, i) {
352
352
  "Input options intent needs a valueField.",
353
353
  "valueField"
354
354
  )
355
- ), f(e.valueField, "valueField", i, {
355
+ ), m(e.valueField, "valueField", i, {
356
356
  required: !0
357
- }), e.searchField !== void 0 && f(e.searchField, "searchField", i, {
357
+ }), e.searchField !== void 0 && m(e.searchField, "searchField", i, {
358
358
  required: !0
359
- }), e.disambiguationFields !== void 0 && (Array.isArray(e.disambiguationFields) ? e.disambiguationFields.forEach((t, s) => {
360
- f(t, `disambiguationFields.${s}`, i, {
359
+ }), e.disambiguationFields !== void 0 && (Array.isArray(e.disambiguationFields) ? e.disambiguationFields.forEach((t, n) => {
360
+ m(t, `disambiguationFields.${n}`, i, {
361
361
  required: !0
362
362
  });
363
363
  }) : i.push(
@@ -377,8 +377,8 @@ function ce(e, i) {
377
377
  )
378
378
  );
379
379
  else {
380
- const s = t.mode;
381
- s !== void 0 && s !== "auto" && s !== "independent" && s !== "explicit" && i.push(
380
+ const n = t.mode;
381
+ n !== void 0 && n !== "auto" && n !== "independent" && n !== "explicit" && i.push(
382
382
  a(
383
383
  "invalid_input_options_dependencies",
384
384
  "Input options dependencies mode must be auto, independent, or explicit.",
@@ -394,7 +394,7 @@ function ce(e, i) {
394
394
  "dependencies.excludeInputIds",
395
395
  i,
396
396
  "Input options excludeInputIds must be non-empty strings."
397
- ), fe(e, i);
397
+ ), me(e, i);
398
398
  }
399
399
  }
400
400
  if (e.population !== void 0) {
@@ -408,26 +408,26 @@ function ce(e, i) {
408
408
  )
409
409
  );
410
410
  else {
411
- const s = t.kind;
412
- s !== "option_source" && s !== "related_population" && i.push(
411
+ const n = t.kind;
412
+ n !== "option_source" && n !== "related_population" && i.push(
413
413
  a(
414
414
  "invalid_input_options_population",
415
415
  "Input options population kind must be option_source or related_population.",
416
416
  "population.kind"
417
417
  )
418
- ), s === "option_source" && t.baseSource !== void 0 && i.push(
418
+ ), n === "option_source" && t.baseSource !== void 0 && i.push(
419
419
  a(
420
420
  "invalid_input_options_population",
421
421
  "Input options population baseSource is only valid for related_population.",
422
422
  "population.baseSource"
423
423
  )
424
- ), s === "option_source" && t.relationshipHint !== void 0 && i.push(
424
+ ), n === "option_source" && t.relationshipHint !== void 0 && i.push(
425
425
  a(
426
426
  "invalid_input_options_population",
427
427
  "Input options population relationshipHint is only valid for related_population.",
428
428
  "population.relationshipHint"
429
429
  )
430
- ), s === "related_population" && (S(
430
+ ), n === "related_population" && (S(
431
431
  t.baseSource,
432
432
  "population.baseSource",
433
433
  i
@@ -452,34 +452,34 @@ function pe(e, i) {
452
452
  return;
453
453
  }
454
454
  e.inputs.forEach(
455
- (t, s) => ue(t, `inputs.${s}`, i)
455
+ (t, n) => ue(t, `inputs.${n}`, i)
456
456
  );
457
457
  }
458
458
  }
459
- function fe(e, i) {
460
- var s, o;
459
+ function me(e, i) {
460
+ var n, o;
461
461
  const t = new Set(
462
- Array.isArray(e.inputs) ? e.inputs.map((n) => u(n) ? n.inputId : void 0).filter((n) => typeof n == "string") : []
462
+ Array.isArray(e.inputs) ? e.inputs.map((s) => u(s) ? s.inputId : void 0).filter((s) => typeof s == "string") : []
463
463
  );
464
- for (const n of ((s = e.dependencies) == null ? void 0 : s.includeInputIds) || [])
465
- t.has(n) || i.push(
464
+ for (const s of ((n = e.dependencies) == null ? void 0 : n.includeInputIds) || [])
465
+ t.has(s) || i.push(
466
466
  a(
467
467
  "invalid_input_options_dependencies",
468
- `Input options dependency "${n}" is not declared in inputs.`,
468
+ `Input options dependency "${s}" is not declared in inputs.`,
469
469
  "dependencies.includeInputIds"
470
470
  )
471
471
  );
472
- for (const n of ((o = e.dependencies) == null ? void 0 : o.excludeInputIds) || [])
473
- n !== e.inputId && !t.has(n) && i.push(
472
+ for (const s of ((o = e.dependencies) == null ? void 0 : o.excludeInputIds) || [])
473
+ s !== e.inputId && !t.has(s) && i.push(
474
474
  a(
475
475
  "invalid_input_options_dependencies",
476
- `Input options dependency exclusion "${n}" is not the populated inputId and is not declared in inputs.`,
476
+ `Input options dependency exclusion "${s}" is not the populated inputId and is not declared in inputs.`,
477
477
  "dependencies.excludeInputIds"
478
478
  )
479
479
  );
480
480
  }
481
- function O(e, i, t, s) {
482
- e !== void 0 && (!Array.isArray(e) || e.some((o) => !l(o))) && t.push(a("invalid_input_options_dependencies", s, i));
481
+ function O(e, i, t, n) {
482
+ e !== void 0 && (!Array.isArray(e) || e.some((o) => !l(o))) && t.push(a("invalid_input_options_dependencies", n, i));
483
483
  }
484
484
  function _(e, i, t) {
485
485
  e !== void 0 && (typeof e != "string" || !le.has(e)) && t.push(
@@ -490,7 +490,7 @@ function _(e, i, t) {
490
490
  )
491
491
  );
492
492
  }
493
- const me = /* @__PURE__ */ new Set([
493
+ const fe = /* @__PURE__ */ new Set([
494
494
  "measure",
495
495
  "dimension",
496
496
  "date",
@@ -537,8 +537,8 @@ function R(e, i, t) {
537
537
  );
538
538
  return;
539
539
  }
540
- const s = e;
541
- (typeof s.type != "string" || !ve.has(s.type)) && t.push(
540
+ const n = e;
541
+ (typeof n.type != "string" || !ve.has(n.type)) && t.push(
542
542
  a(
543
543
  "invalid_value_format_type",
544
544
  "Value format type must be number, currency, percent, scientific, date, datetime, duration, or string.",
@@ -572,8 +572,8 @@ function R(e, i, t) {
572
572
  )
573
573
  );
574
574
  for (const o of ["inputUnit", "largestUnit", "smallestUnit"]) {
575
- const n = e[o];
576
- n !== void 0 && (typeof n != "string" || !ge.has(n)) && t.push(
575
+ const s = e[o];
576
+ s !== void 0 && (typeof s != "string" || !ge.has(s)) && t.push(
577
577
  a(
578
578
  "invalid_value_format_duration_unit",
579
579
  "Duration format units must be millisecond, second, minute, hour, or day.",
@@ -623,7 +623,7 @@ function xe(e, i, t) {
623
623
  return;
624
624
  }
625
625
  if (e.kind === "field") {
626
- f(e.field, `${i}.field`, t, { required: !0 }), _(e.aggregate, `${i}.aggregate`, t);
626
+ m(e.field, `${i}.field`, t, { required: !0 }), _(e.aggregate, `${i}.aggregate`, t);
627
627
  return;
628
628
  }
629
629
  t.push(
@@ -645,8 +645,8 @@ function j(e, i, t) {
645
645
  );
646
646
  return;
647
647
  }
648
- const s = l(e.columnKey), o = u(e.field);
649
- if (s === o) {
648
+ const n = l(e.columnKey), o = u(e.field);
649
+ if (n === o) {
650
650
  t.push(
651
651
  a(
652
652
  "invalid_result_column_ref",
@@ -656,7 +656,7 @@ function j(e, i, t) {
656
656
  );
657
657
  return;
658
658
  }
659
- o && f(e.field, `${i}.field`, t, {
659
+ o && m(e.field, `${i}.field`, t, {
660
660
  required: !0
661
661
  });
662
662
  }
@@ -694,21 +694,21 @@ function we(e, i, t) {
694
694
  )
695
695
  );
696
696
  }
697
- function V(e, i, t, s) {
698
- e !== "asc" && e !== "desc" && t.push(a(s, "Sort direction must be asc or desc.", i));
697
+ function V(e, i, t, n) {
698
+ e !== "asc" && e !== "desc" && t.push(a(n, "Sort direction must be asc or desc.", i));
699
699
  }
700
- function G(e, i, t, s) {
700
+ function G(e, i, t, n) {
701
701
  e !== void 0 && e !== "warehouseDefault" && e !== "first" && e !== "last" && t.push(
702
702
  a(
703
- s,
703
+ n,
704
704
  "Null ordering must be warehouseDefault, first, or last.",
705
705
  i
706
706
  )
707
707
  );
708
708
  }
709
- function z(e, i, t, s) {
709
+ function z(e, i, t, n) {
710
710
  e !== void 0 && e !== "global" && e !== "withinParent" && t.push(
711
- a(s, "Sort scope must be global or withinParent.", i)
711
+ a(n, "Sort scope must be global or withinParent.", i)
712
712
  );
713
713
  }
714
714
  function Ie(e, i, t) {
@@ -760,7 +760,7 @@ function Ae(e, i, t) {
760
760
  }
761
761
  if (e.by.kind !== "label") {
762
762
  if (e.by.kind === "field") {
763
- f(e.by.field, `${i}.by.field`, t, {
763
+ m(e.by.field, `${i}.by.field`, t, {
764
764
  required: !0
765
765
  }), _(e.by.aggregate, `${i}.by.aggregate`, t);
766
766
  return;
@@ -774,9 +774,9 @@ function Ae(e, i, t) {
774
774
  );
775
775
  }
776
776
  }
777
- function B(e, i, t, s) {
777
+ function B(e, i, t, n) {
778
778
  if (!Array.isArray(e))
779
- return s.required ? t.push(
779
+ return n.required ? t.push(
780
780
  a(
781
781
  "missing_matrix_rows",
782
782
  "Matrix intent needs at least one row axis level.",
@@ -789,7 +789,7 @@ function B(e, i, t, s) {
789
789
  i
790
790
  )
791
791
  ), [];
792
- s.required && e.length === 0 && t.push(
792
+ n.required && e.length === 0 && t.push(
793
793
  a(
794
794
  "missing_matrix_rows",
795
795
  "Matrix intent needs at least one row axis level.",
@@ -797,9 +797,9 @@ function B(e, i, t, s) {
797
797
  )
798
798
  );
799
799
  const o = [];
800
- return e.forEach((n, r) => {
800
+ return e.forEach((s, r) => {
801
801
  const c = `${i}.${r}`;
802
- if (!u(n)) {
802
+ if (!u(s)) {
803
803
  t.push(
804
804
  a(
805
805
  "invalid_matrix_axis_level",
@@ -809,14 +809,14 @@ function B(e, i, t, s) {
809
809
  );
810
810
  return;
811
811
  }
812
- const d = n;
812
+ const d = s;
813
813
  o.push(d), d.id !== void 0 && !l(d.id) && t.push(
814
814
  a(
815
815
  "invalid_matrix_axis_level_id",
816
816
  "Matrix axis level id must be a non-empty string.",
817
817
  `${c}.id`
818
818
  )
819
- ), f(d.field, `${c}.field`, t, {
819
+ ), m(d.field, `${c}.field`, t, {
820
820
  required: !0
821
821
  }), we(d.grain, `${c}.grain`, t), d.label !== void 0 && typeof d.label != "string" && t.push(
822
822
  a(
@@ -897,9 +897,9 @@ function Se(e, i, t) {
897
897
  i
898
898
  )
899
899
  ), [];
900
- const s = [];
901
- return e.forEach((o, n) => {
902
- const r = `${i}.${n}`;
900
+ const n = [];
901
+ return e.forEach((o, s) => {
902
+ const r = `${i}.${s}`;
903
903
  if (!u(o)) {
904
904
  t.push(
905
905
  a(
@@ -911,13 +911,13 @@ function Se(e, i, t) {
911
911
  return;
912
912
  }
913
913
  const c = o;
914
- s.push(c), c.id !== void 0 && !l(c.id) && t.push(
914
+ n.push(c), c.id !== void 0 && !l(c.id) && t.push(
915
915
  a(
916
916
  "invalid_matrix_value_id",
917
917
  "Matrix value id must be a non-empty string.",
918
918
  `${r}.id`
919
919
  )
920
- ), f(c.field, `${r}.field`, t, {
920
+ ), m(c.field, `${r}.field`, t, {
921
921
  required: !0
922
922
  }), _(
923
923
  c.aggregate,
@@ -934,7 +934,7 @@ function Se(e, i, t) {
934
934
  `${r}.totalBehavior`,
935
935
  t
936
936
  );
937
- }), s;
937
+ }), n;
938
938
  }
939
939
  function ke(e, i, t) {
940
940
  if (!u(e)) {
@@ -947,13 +947,13 @@ function ke(e, i, t) {
947
947
  );
948
948
  return;
949
949
  }
950
- for (const s of ["rows", "columns"]) {
951
- const o = e[s];
950
+ for (const n of ["rows", "columns"]) {
951
+ const o = e[n];
952
952
  o !== void 0 && o !== !0 && o !== !1 && o !== "perLevel" && t.push(
953
953
  a(
954
954
  "invalid_matrix_totals",
955
955
  "Matrix total axis setting must be a boolean or perLevel.",
956
- `${i}.${s}`
956
+ `${i}.${n}`
957
957
  )
958
958
  );
959
959
  }
@@ -967,13 +967,13 @@ function ke(e, i, t) {
967
967
  )
968
968
  );
969
969
  else
970
- for (const s of ["rows", "columns"]) {
971
- const o = e.grandTotal[s];
970
+ for (const n of ["rows", "columns"]) {
971
+ const o = e.grandTotal[n];
972
972
  o !== void 0 && typeof o != "boolean" && t.push(
973
973
  a(
974
974
  "invalid_matrix_totals",
975
975
  "Matrix grandTotal rows/columns must be booleans.",
976
- `${i}.grandTotal.${s}`
976
+ `${i}.grandTotal.${n}`
977
977
  )
978
978
  );
979
979
  }
@@ -991,9 +991,9 @@ function ke(e, i, t) {
991
991
  )
992
992
  );
993
993
  }
994
- function I(e, i, t, s) {
994
+ function I(e, i, t, n) {
995
995
  if (!Array.isArray(e)) {
996
- s.push(
996
+ n.push(
997
997
  a(
998
998
  "invalid_matrix_path",
999
999
  "Matrix member path must be an array of path segments.",
@@ -1002,10 +1002,10 @@ function I(e, i, t, s) {
1002
1002
  );
1003
1003
  return;
1004
1004
  }
1005
- e.forEach((o, n) => {
1006
- const r = `${i}.${n}`;
1005
+ e.forEach((o, s) => {
1006
+ const r = `${i}.${s}`;
1007
1007
  if (!u(o)) {
1008
- s.push(
1008
+ n.push(
1009
1009
  a(
1010
1010
  "invalid_matrix_path",
1011
1011
  "Matrix path segment must be a structured object.",
@@ -1016,7 +1016,7 @@ function I(e, i, t, s) {
1016
1016
  }
1017
1017
  const c = o;
1018
1018
  if (!l(c.levelId)) {
1019
- s.push(
1019
+ n.push(
1020
1020
  a(
1021
1021
  "stable_id_required",
1022
1022
  "Matrix path segments must reference an explicit public axis level id.",
@@ -1025,13 +1025,13 @@ function I(e, i, t, s) {
1025
1025
  );
1026
1026
  return;
1027
1027
  }
1028
- Object.prototype.hasOwnProperty.call(o, "value") || s.push(
1028
+ Object.prototype.hasOwnProperty.call(o, "value") || n.push(
1029
1029
  a(
1030
1030
  "invalid_matrix_path",
1031
1031
  "Matrix path segments must include a value property; use explicit null for null members.",
1032
1032
  `${r}.value`
1033
1033
  )
1034
- ), t.has(c.levelId) || s.push(
1034
+ ), t.has(c.levelId) || n.push(
1035
1035
  a(
1036
1036
  "stable_id_required",
1037
1037
  "Matrix path segment levelId must match an explicit public axis level id.",
@@ -1040,9 +1040,9 @@ function I(e, i, t, s) {
1040
1040
  );
1041
1041
  });
1042
1042
  }
1043
- function q(e, i, t, s) {
1043
+ function q(e, i, t, n) {
1044
1044
  if (!u(e)) {
1045
- s.push(
1045
+ n.push(
1046
1046
  a(
1047
1047
  "invalid_matrix_expansion",
1048
1048
  "Matrix expansion axis options must be structured objects.",
@@ -1051,26 +1051,26 @@ function q(e, i, t, s) {
1051
1051
  );
1052
1052
  return;
1053
1053
  }
1054
- e.defaultDepth !== void 0 && (typeof e.defaultDepth != "number" || !Number.isInteger(e.defaultDepth) || e.defaultDepth < 0) && s.push(
1054
+ e.defaultDepth !== void 0 && (typeof e.defaultDepth != "number" || !Number.isInteger(e.defaultDepth) || e.defaultDepth < 0) && n.push(
1055
1055
  a(
1056
1056
  "invalid_matrix_expansion",
1057
1057
  "Matrix expansion defaultDepth must be a non-negative integer.",
1058
1058
  `${i}.defaultDepth`
1059
1059
  )
1060
- ), e.lazy !== void 0 && typeof e.lazy != "boolean" && s.push(
1060
+ ), e.lazy !== void 0 && typeof e.lazy != "boolean" && n.push(
1061
1061
  a(
1062
1062
  "invalid_matrix_expansion",
1063
1063
  "Matrix expansion lazy must be a boolean.",
1064
1064
  `${i}.lazy`
1065
1065
  )
1066
- ), e.expandedPaths !== void 0 && (Array.isArray(e.expandedPaths) ? e.expandedPaths.forEach((o, n) => {
1066
+ ), e.expandedPaths !== void 0 && (Array.isArray(e.expandedPaths) ? e.expandedPaths.forEach((o, s) => {
1067
1067
  I(
1068
1068
  o,
1069
- `${i}.expandedPaths.${n}`,
1069
+ `${i}.expandedPaths.${s}`,
1070
1070
  t,
1071
- s
1071
+ n
1072
1072
  );
1073
- }) : s.push(
1073
+ }) : n.push(
1074
1074
  a(
1075
1075
  "invalid_matrix_expansion",
1076
1076
  "Matrix expandedPaths must be an array of member paths.",
@@ -1078,10 +1078,10 @@ function q(e, i, t, s) {
1078
1078
  )
1079
1079
  ));
1080
1080
  }
1081
- function Re(e, i, t, s) {
1081
+ function Re(e, i, t, n) {
1082
1082
  if (e !== void 0) {
1083
1083
  if (!u(e)) {
1084
- s.push(
1084
+ n.push(
1085
1085
  a(
1086
1086
  "invalid_matrix_expansion",
1087
1087
  "Matrix expansion must be a structured object.",
@@ -1094,16 +1094,16 @@ function Re(e, i, t, s) {
1094
1094
  e.rows,
1095
1095
  "expansion.rows",
1096
1096
  i,
1097
- s
1097
+ n
1098
1098
  ), e.columns !== void 0 && q(
1099
1099
  e.columns,
1100
1100
  "expansion.columns",
1101
1101
  t,
1102
- s
1102
+ n
1103
1103
  );
1104
1104
  }
1105
1105
  }
1106
- function De(e, i, t, s, o) {
1106
+ function De(e, i, t, n, o) {
1107
1107
  if (e !== void 0) {
1108
1108
  if (!Array.isArray(e)) {
1109
1109
  o.push(
@@ -1115,9 +1115,9 @@ function De(e, i, t, s, o) {
1115
1115
  );
1116
1116
  return;
1117
1117
  }
1118
- e.forEach((n, r) => {
1118
+ e.forEach((s, r) => {
1119
1119
  const c = `sort.${r}`;
1120
- if (!u(n)) {
1120
+ if (!u(s)) {
1121
1121
  o.push(
1122
1122
  a(
1123
1123
  "invalid_matrix_sort",
@@ -1127,7 +1127,7 @@ function De(e, i, t, s, o) {
1127
1127
  );
1128
1128
  return;
1129
1129
  }
1130
- const d = n;
1130
+ const d = s;
1131
1131
  d.axis !== "row" && d.axis !== "column" && o.push(
1132
1132
  a(
1133
1133
  "invalid_matrix_sort",
@@ -1169,7 +1169,7 @@ function De(e, i, t, s, o) {
1169
1169
  }
1170
1170
  if (d.by.kind !== "label") {
1171
1171
  if (d.by.kind === "field") {
1172
- f(d.by.field, `${c}.by.field`, o, {
1172
+ m(d.by.field, `${c}.by.field`, o, {
1173
1173
  required: !0
1174
1174
  }), _(
1175
1175
  d.by.aggregate,
@@ -1179,7 +1179,7 @@ function De(e, i, t, s, o) {
1179
1179
  return;
1180
1180
  }
1181
1181
  if (d.by.kind === "value") {
1182
- (!l(d.by.valueId) || !s.has(d.by.valueId)) && o.push(
1182
+ (!l(d.by.valueId) || !n.has(d.by.valueId)) && o.push(
1183
1183
  a(
1184
1184
  "stable_id_required",
1185
1185
  "Matrix value sort must reference an explicit public value id.",
@@ -1265,31 +1265,15 @@ function H(e, i, t) {
1265
1265
  "Matrix display limit must be a positive integer.",
1266
1266
  `${i}.limit`
1267
1267
  )
1268
- ), e.by !== void 0 && e.by !== "label" && e.by !== "value" && t.push(
1269
- a(
1270
- "invalid_matrix_display_limits",
1271
- "Matrix display limit by must be label or value.",
1272
- `${i}.by`
1273
- )
1274
- ), e.direction !== void 0 && e.direction !== "top" && e.direction !== "bottom" && t.push(
1275
- a(
1276
- "invalid_matrix_display_limits",
1277
- "Matrix display limit direction must be top or bottom.",
1278
- `${i}.direction`
1279
- )
1280
- ), e.others !== void 0 && typeof e.others != "boolean" && (u(e.others) ? e.others.label !== void 0 && typeof e.others.label != "string" && t.push(
1281
- a(
1282
- "invalid_matrix_display_limits",
1283
- "Matrix display limit others label must be a string.",
1284
- `${i}.others.label`
1285
- )
1286
- ) : t.push(
1287
- a(
1288
- "invalid_matrix_display_limits",
1289
- "Matrix display limit others must be a boolean or structured object.",
1290
- `${i}.others`
1291
- )
1292
- ));
1268
+ );
1269
+ for (const n of Object.keys(e))
1270
+ n !== "limit" && t.push(
1271
+ a(
1272
+ "invalid_matrix_display_limits",
1273
+ `Matrix display limit ${n} is not supported in v1; use count-only { limit } display limits.`,
1274
+ `${i}.${n}`
1275
+ )
1276
+ );
1293
1277
  }
1294
1278
  function Pe(e, i) {
1295
1279
  if (e !== void 0) {
@@ -1312,6 +1296,14 @@ function Pe(e, i) {
1312
1296
  "displayLimits.columns",
1313
1297
  i
1314
1298
  );
1299
+ for (const t of Object.keys(e))
1300
+ t === "rows" || t === "columns" || i.push(
1301
+ a(
1302
+ "invalid_matrix_display_limits",
1303
+ `Matrix displayLimits ${t} is not supported in v1; use rows and columns count limits only.`,
1304
+ `displayLimits.${t}`
1305
+ )
1306
+ );
1315
1307
  }
1316
1308
  }
1317
1309
  function Te(e, i) {
@@ -1325,7 +1317,7 @@ function Te(e, i) {
1325
1317
  );
1326
1318
  const t = B(e.rows, "rows", i, {
1327
1319
  required: !0
1328
- }), s = B(e.columns, "columns", i, {
1320
+ }), n = B(e.columns, "columns", i, {
1329
1321
  required: !1
1330
1322
  }), o = Se(e.values, "values", i);
1331
1323
  x(e.filters, "filters", i), e.totals !== void 0 && ke(e.totals, "totals", i), $(
@@ -1334,7 +1326,7 @@ function Te(e, i) {
1334
1326
  "row axis level",
1335
1327
  i
1336
1328
  ), $(
1337
- s.map((p) => p.id),
1329
+ n.map((p) => p.id),
1338
1330
  "columns",
1339
1331
  "column axis level",
1340
1332
  i
@@ -1344,22 +1336,22 @@ function Te(e, i) {
1344
1336
  "value",
1345
1337
  i
1346
1338
  );
1347
- const n = new Set(
1339
+ const s = new Set(
1348
1340
  t.map((p) => p.id).filter((p) => l(p))
1349
1341
  ), r = new Set(
1350
- s.map((p) => p.id).filter((p) => l(p))
1342
+ n.map((p) => p.id).filter((p) => l(p))
1351
1343
  ), c = new Set(
1352
1344
  o.map((p) => p.id).filter((p) => l(p))
1353
1345
  );
1354
1346
  De(
1355
1347
  e.sort,
1356
- n,
1348
+ s,
1357
1349
  r,
1358
1350
  c,
1359
1351
  i
1360
1352
  ), Re(
1361
1353
  e.expansion,
1362
- n,
1354
+ s,
1363
1355
  r,
1364
1356
  i
1365
1357
  ), Fe(e.layout, i), Pe(e.displayLimits, i);
@@ -1440,8 +1432,8 @@ function A(e, i, t) {
1440
1432
  `${i}.end`
1441
1433
  )
1442
1434
  ), l(e.start) && l(e.end)) {
1443
- const s = T(e.start), o = T(e.end);
1444
- s || t.push(
1435
+ const n = T(e.start), o = T(e.end);
1436
+ n || t.push(
1445
1437
  a(
1446
1438
  "invalid_time_window",
1447
1439
  "Absolute time window start must be a valid ISO date or timestamp.",
@@ -1453,7 +1445,7 @@ function A(e, i, t) {
1453
1445
  "Absolute time window end must be a valid ISO date or timestamp.",
1454
1446
  `${i}.end`
1455
1447
  )
1456
- ), s && o && s.getTime() > o.getTime() && t.push(
1448
+ ), n && o && n.getTime() > o.getTime() && t.push(
1457
1449
  a(
1458
1450
  "invalid_time_window",
1459
1451
  "Absolute time window start must be before or equal to end.",
@@ -1501,33 +1493,33 @@ function x(e, i, t) {
1501
1493
  );
1502
1494
  return;
1503
1495
  }
1504
- e.forEach((s, o) => {
1496
+ e.forEach((n, o) => {
1505
1497
  var d;
1506
- const n = `${i}.${o}`;
1507
- if (!u(s)) {
1498
+ const s = `${i}.${o}`;
1499
+ if (!u(n)) {
1508
1500
  t.push(
1509
1501
  a(
1510
1502
  "invalid_analytics_filter",
1511
1503
  "Analytics filter must be a structured object.",
1512
- n
1504
+ s
1513
1505
  )
1514
1506
  );
1515
1507
  return;
1516
1508
  }
1517
- const r = s;
1518
- f(r.field, `${n}.field`, t, {
1509
+ const r = n;
1510
+ m(r.field, `${s}.field`, t, {
1519
1511
  required: !0
1520
1512
  }), r.scope !== void 0 && r.scope !== "row" && r.scope !== "aggregate" && t.push(
1521
1513
  a(
1522
1514
  "invalid_analytics_filter_scope",
1523
1515
  "Analytics filter scope must be row or aggregate.",
1524
- `${n}.scope`
1516
+ `${s}.scope`
1525
1517
  )
1526
1518
  ), r.scope === "aggregate" && ((d = r.field) == null ? void 0 : d.role) !== void 0 && r.field.role !== "measure" && t.push(
1527
1519
  a(
1528
1520
  "invalid_analytics_filter_scope",
1529
1521
  "Aggregate-scope analytics filters must target a measure field.",
1530
- `${n}.scope`
1522
+ `${s}.scope`
1531
1523
  )
1532
1524
  );
1533
1525
  const c = r.operator === "is_null" || r.operator === "is_not_null";
@@ -1535,20 +1527,20 @@ function x(e, i, t) {
1535
1527
  a(
1536
1528
  "invalid_analytics_filter_operator",
1537
1529
  "Analytics filter operator is not supported.",
1538
- `${n}.operator`
1530
+ `${s}.operator`
1539
1531
  )
1540
1532
  ), r.values === void 0 && !c && t.push(
1541
1533
  a(
1542
1534
  "missing_analytics_filter_value",
1543
1535
  "Analytics filter needs values unless it is a null check.",
1544
- n
1536
+ s
1545
1537
  )
1546
1538
  ), c && r.values !== void 0) {
1547
1539
  t.push(
1548
1540
  a(
1549
1541
  "invalid_analytics_filter_values",
1550
1542
  "Null-check analytics filters must not include values.",
1551
- `${n}.values`
1543
+ `${s}.values`
1552
1544
  )
1553
1545
  );
1554
1546
  return;
@@ -1558,7 +1550,7 @@ function x(e, i, t) {
1558
1550
  a(
1559
1551
  "invalid_analytics_filter_values",
1560
1552
  "Analytics filter values must be an array when provided.",
1561
- `${n}.values`
1553
+ `${s}.values`
1562
1554
  )
1563
1555
  );
1564
1556
  return;
@@ -1570,7 +1562,7 @@ function x(e, i, t) {
1570
1562
  a(
1571
1563
  "invalid_analytics_filter_values",
1572
1564
  "Between analytics filters must include exactly two values.",
1573
- `${n}.values`
1565
+ `${s}.values`
1574
1566
  )
1575
1567
  );
1576
1568
  return;
@@ -1579,7 +1571,7 @@ function x(e, i, t) {
1579
1571
  a(
1580
1572
  "invalid_analytics_filter_values",
1581
1573
  "Scalar analytics filters must include exactly one value. Use in/not_in for multiple values.",
1582
- `${n}.values`
1574
+ `${s}.values`
1583
1575
  )
1584
1576
  );
1585
1577
  }
@@ -1609,7 +1601,7 @@ function Ne(e) {
1609
1601
  "Derived field needs a label.",
1610
1602
  "label"
1611
1603
  )
1612
- ), me.has(e.resultRole) || i.push(
1604
+ ), fe.has(e.resultRole) || i.push(
1613
1605
  a(
1614
1606
  "invalid_derived_field_role",
1615
1607
  "Derived field resultRole must be measure, dimension, date, id, or unknown.",
@@ -1683,7 +1675,7 @@ function Ne(e) {
1683
1675
  "Derived field needs at least one typed input.",
1684
1676
  "inputs"
1685
1677
  )
1686
- ) : Object.entries(e.inputs).forEach(([t, s]) => {
1678
+ ) : Object.entries(e.inputs).forEach(([t, n]) => {
1687
1679
  if (!l(t)) {
1688
1680
  i.push(
1689
1681
  a(
@@ -1695,28 +1687,28 @@ function Ne(e) {
1695
1687
  return;
1696
1688
  }
1697
1689
  xe(
1698
- s,
1690
+ n,
1699
1691
  `inputs.${t}`,
1700
1692
  i
1701
1693
  );
1702
1694
  }), l(e.expression) && u(e.inputs)) {
1703
- const t = re(e.expression), s = new Set(t), o = Object.keys(e.inputs).filter(
1704
- (n) => l(n)
1695
+ const t = re(e.expression), n = new Set(t), o = Object.keys(e.inputs).filter(
1696
+ (s) => l(s)
1705
1697
  );
1706
- t.forEach((n) => {
1707
- Object.prototype.hasOwnProperty.call(e.inputs, n) || i.push(
1698
+ t.forEach((s) => {
1699
+ Object.prototype.hasOwnProperty.call(e.inputs, s) || i.push(
1708
1700
  a(
1709
1701
  "invalid_derived_field_expression_token",
1710
- `Derived field expression token "{${n}}" needs a matching inputs.${n} entry.`,
1702
+ `Derived field expression token "{${s}}" needs a matching inputs.${s} entry.`,
1711
1703
  "expression"
1712
1704
  )
1713
1705
  );
1714
- }), o.forEach((n) => {
1715
- s.has(n) || i.push(
1706
+ }), o.forEach((s) => {
1707
+ n.has(s) || i.push(
1716
1708
  a(
1717
1709
  "unused_derived_field_input",
1718
- `Derived field input "${n}" is not referenced by expression.`,
1719
- `inputs.${n}`
1710
+ `Derived field input "${s}" is not referenced by expression.`,
1711
+ `inputs.${s}`
1720
1712
  )
1721
1713
  );
1722
1714
  });
@@ -1729,7 +1721,7 @@ function Ne(e) {
1729
1721
  )
1730
1722
  ), { ok: i.length === 0, errors: i, warnings: [] };
1731
1723
  }
1732
- function Ce(e) {
1724
+ function Le(e) {
1733
1725
  const i = [];
1734
1726
  if (!u(e))
1735
1727
  return i.push(
@@ -1754,7 +1746,7 @@ function Ce(e) {
1754
1746
  )
1755
1747
  ), j(e.input, "input", i), $e(e.output, "output", i), e.kind === "percent_of_total") {
1756
1748
  const t = e.denominator;
1757
- t !== void 0 && (u(t) ? t.scope === "population" ? (f(t.metric, "denominator.metric", i, {
1749
+ t !== void 0 && (u(t) ? t.scope === "population" ? (m(t.metric, "denominator.metric", i, {
1758
1750
  required: !0
1759
1751
  }), x(
1760
1752
  t.filters,
@@ -1783,7 +1775,7 @@ function Ce(e) {
1783
1775
  ), (e.kind === "running_total" || e.kind === "previous_row_delta") && e.orderBy !== void 0 && j(e.orderBy, "orderBy", i), { ok: i.length === 0, errors: i, warnings: [] };
1784
1776
  }
1785
1777
  function Q(e) {
1786
- var s;
1778
+ var n;
1787
1779
  const i = [], t = [];
1788
1780
  if (!e || typeof e != "object")
1789
1781
  return {
@@ -1814,7 +1806,7 @@ function Q(e) {
1814
1806
  i
1815
1807
  ), e.kind === "metric") {
1816
1808
  const o = Array.isArray(e.measures) ? e.measures.filter(
1817
- (n) => u(n) && l(n.name)
1809
+ (s) => u(s) && l(s.name)
1818
1810
  ) : [];
1819
1811
  if (!Array.isArray(e.measures) || e.measures.length === 0 ? i.push(
1820
1812
  a(
@@ -1823,27 +1815,27 @@ function Q(e) {
1823
1815
  "measures"
1824
1816
  )
1825
1817
  ) : e.measures.some(
1826
- (n) => !u(n) || !l(n.name)
1818
+ (s) => !u(s) || !l(s.name)
1827
1819
  ) && i.push(
1828
1820
  a(
1829
1821
  "invalid_measure_list",
1830
1822
  "Metric intent measures must be an array of field references with names.",
1831
1823
  "measures"
1832
1824
  )
1833
- ), o.forEach((n, r) => {
1834
- f(n, `measures.${r}`, i, {
1825
+ ), o.forEach((s, r) => {
1826
+ m(s, `measures.${r}`, i, {
1835
1827
  required: !0
1836
1828
  });
1837
1829
  }), o.length > 0 && !X(o)) {
1838
- const n = o.find(
1830
+ const s = o.find(
1839
1831
  (r, c) => o.some(
1840
- (d, p) => p !== c && L(d, r)
1832
+ (d, p) => p !== c && C(d, r)
1841
1833
  )
1842
1834
  );
1843
- n && i.push(
1835
+ s && i.push(
1844
1836
  a(
1845
1837
  "duplicate_measure",
1846
- Z(n),
1838
+ Z(s),
1847
1839
  "measures"
1848
1840
  )
1849
1841
  );
@@ -1857,7 +1849,7 @@ function Q(e) {
1857
1849
  "Metric intent primaryMeasure must identify exactly one selected measure.",
1858
1850
  "primaryMeasure"
1859
1851
  )
1860
- ), e.primaryMeasure !== void 0 && (f(e.primaryMeasure, "primaryMeasure", i, {
1852
+ ), e.primaryMeasure !== void 0 && (m(e.primaryMeasure, "primaryMeasure", i, {
1861
1853
  required: !0
1862
1854
  }), u(e.primaryMeasure) && l(e.primaryMeasure.name) && o.length > 0 && !W(
1863
1855
  e.primaryMeasure,
@@ -1875,21 +1867,21 @@ function Q(e) {
1875
1867
  "dimensions"
1876
1868
  )
1877
1869
  ) : Array.isArray(e.dimensions) && e.dimensions.some(
1878
- (n) => !u(n) || !l(n.name)
1870
+ (s) => !u(s) || !l(s.name)
1879
1871
  ) && i.push(
1880
1872
  a(
1881
1873
  "invalid_measure_dimensions",
1882
1874
  "Metric intent dimensions must be an array of field references with names.",
1883
1875
  "dimensions"
1884
1876
  )
1885
- ), e.dateField !== void 0 && f(e.dateField, "dateField", i), e.timeWindow !== void 0 && (A(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1877
+ ), e.dateField !== void 0 && m(e.dateField, "dateField", i), e.timeWindow !== void 0 && (A(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1886
1878
  a(
1887
1879
  "missing_time_window_date_field",
1888
1880
  "Metric timeWindow needs a dateField.",
1889
1881
  "dateField"
1890
1882
  )
1891
- )), x(e.filters, "filters", i), Array.isArray(e.dimensions) && e.dimensions.forEach((n, r) => {
1892
- f(n, `dimensions.${r}`, i);
1883
+ )), x(e.filters, "filters", i), Array.isArray(e.dimensions) && e.dimensions.forEach((s, r) => {
1884
+ m(s, `dimensions.${r}`, i);
1893
1885
  }), e.orderBy !== void 0) {
1894
1886
  if (!u(e.orderBy))
1895
1887
  i.push(
@@ -1899,7 +1891,7 @@ function Q(e) {
1899
1891
  "orderBy"
1900
1892
  )
1901
1893
  );
1902
- else if (f(e.orderBy.field, "orderBy.field", i, {
1894
+ else if (m(e.orderBy.field, "orderBy.field", i, {
1903
1895
  required: !0
1904
1896
  }), e.orderBy.direction !== "asc" && e.orderBy.direction !== "desc" && i.push(
1905
1897
  a(
@@ -1908,16 +1900,16 @@ function Q(e) {
1908
1900
  "orderBy.direction"
1909
1901
  )
1910
1902
  ), u(e.orderBy.field) && l(e.orderBy.field.name)) {
1911
- const n = [
1903
+ const s = [
1912
1904
  ...o,
1913
1905
  ...e.timeGrain && e.dateField && u(e.dateField) ? [e.dateField] : [],
1914
1906
  ...Array.isArray(e.dimensions) ? e.dimensions.filter(
1915
1907
  (r) => u(r) && l(r.name)
1916
1908
  ) : []
1917
1909
  ];
1918
- n.length > 0 && !ee(
1910
+ s.length > 0 && !ee(
1919
1911
  e.orderBy.field,
1920
- n
1912
+ s
1921
1913
  ) && i.push(
1922
1914
  a(
1923
1915
  "invalid_measure_order_by",
@@ -1943,23 +1935,23 @@ function Q(e) {
1943
1935
  "Records intent fields must be field references with names.",
1944
1936
  "fields"
1945
1937
  )
1946
- ), Array.isArray(e.fields) && e.fields.forEach((o, n) => {
1947
- f(o, `fields.${n}`, i);
1948
- }), e.dateField !== void 0 && f(e.dateField, "dateField", i), N(e.pagination, "pagination", i), e.timeWindow !== void 0 && (A(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1938
+ ), Array.isArray(e.fields) && e.fields.forEach((o, s) => {
1939
+ m(o, `fields.${s}`, i);
1940
+ }), e.dateField !== void 0 && m(e.dateField, "dateField", i), N(e.pagination, "pagination", i), e.timeWindow !== void 0 && (A(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1949
1941
  a(
1950
1942
  "missing_time_window_date_field",
1951
1943
  "Records timeWindow needs a dateField.",
1952
1944
  "dateField"
1953
1945
  )
1954
- )), x(e.filters, "filters", i), Array.isArray(e.filters) && e.filters.forEach((o, n) => {
1946
+ )), x(e.filters, "filters", i), Array.isArray(e.filters) && e.filters.forEach((o, s) => {
1955
1947
  u(o) && o.scope === "aggregate" && i.push(
1956
1948
  a(
1957
1949
  "unsupported_record_filter_scope",
1958
1950
  "Records intents support row-scope filters only. Use a metric intent for aggregate-scope filters.",
1959
- `filters.${n}.scope`
1951
+ `filters.${s}.scope`
1960
1952
  )
1961
1953
  );
1962
- }), e.orderBy !== void 0 && (u(e.orderBy) ? (f(e.orderBy.field, "orderBy.field", i, {
1954
+ }), e.orderBy !== void 0 && (u(e.orderBy) ? (m(e.orderBy.field, "orderBy.field", i, {
1963
1955
  required: !0
1964
1956
  }), e.orderBy.direction !== "asc" && e.orderBy.direction !== "desc" && i.push(
1965
1957
  a(
@@ -1997,10 +1989,10 @@ function Q(e) {
1997
1989
  "Records server totals need at least one measure.",
1998
1990
  "totals.measures"
1999
1991
  )
2000
- ) : o.forEach((n, r) => {
2001
- f(n, `totals.measures.${r}`, i, {
1992
+ ) : o.forEach((s, r) => {
1993
+ m(s, `totals.measures.${r}`, i, {
2002
1994
  required: !0
2003
- }), (!u(n) || n.role !== "measure") && i.push(
1995
+ }), (!u(s) || s.role !== "measure") && i.push(
2004
1996
  a(
2005
1997
  "invalid_records_totals_measure",
2006
1998
  "Records server totals measures must be measure field references.",
@@ -2009,7 +2001,7 @@ function Q(e) {
2009
2001
  );
2010
2002
  });
2011
2003
  }
2012
- } else e.kind === "inputOptions" ? ce(e, i) : e.kind === "matrix" ? Te(e, i) : e.kind === "sql" ? (((s = e.source) == null ? void 0 : s.kind) !== "sql" && i.push(
2004
+ } else e.kind === "inputOptions" ? ce(e, i) : e.kind === "matrix" ? Te(e, i) : e.kind === "sql" ? (((n = e.source) == null ? void 0 : n.kind) !== "sql" && i.push(
2013
2005
  a(
2014
2006
  "invalid_sql_source",
2015
2007
  "SQL analytics intent must use a SQL execution source.",
@@ -2021,8 +2013,8 @@ function Q(e) {
2021
2013
  e.defaultParameters,
2022
2014
  "defaultParameters",
2023
2015
  i
2024
- ), Array.isArray(e.fields) && e.fields.forEach((o, n) => {
2025
- f(o, `fields.${n}`, i);
2016
+ ), Array.isArray(e.fields) && e.fields.forEach((o, s) => {
2017
+ m(o, `fields.${s}`, i);
2026
2018
  }), N(e.pagination, "pagination", i)) : i.push(
2027
2019
  a(
2028
2020
  "invalid_analytics_kind",
@@ -2049,13 +2041,13 @@ function Oe(e, i) {
2049
2041
  );
2050
2042
  return;
2051
2043
  }
2052
- e.derivedFields.forEach((t, s) => {
2044
+ e.derivedFields.forEach((t, n) => {
2053
2045
  Ne(
2054
2046
  t
2055
- ).errors.forEach((n) => {
2047
+ ).errors.forEach((s) => {
2056
2048
  i.push({
2057
- ...n,
2058
- path: n.path ? `derivedFields.${s}.${n.path}` : `derivedFields.${s}`
2049
+ ...s,
2050
+ path: s.path ? `derivedFields.${n}.${s.path}` : `derivedFields.${n}`
2059
2051
  });
2060
2052
  });
2061
2053
  });
@@ -2093,14 +2085,14 @@ function je(e) {
2093
2085
  "Answer-obligations operation intent needs at least one obligation.",
2094
2086
  "obligations"
2095
2087
  )
2096
- ) : e.obligations.forEach((s, o) => {
2097
- l(s.id) || i.push(
2088
+ ) : e.obligations.forEach((n, o) => {
2089
+ l(n.id) || i.push(
2098
2090
  a(
2099
2091
  "missing_obligation_id",
2100
2092
  "Each analytics obligation needs an id.",
2101
2093
  `obligations.${o}.id`
2102
2094
  )
2103
- ), l(s.prompt) || i.push(
2095
+ ), l(n.prompt) || i.push(
2104
2096
  a(
2105
2097
  "missing_obligation_prompt",
2106
2098
  "Each analytics obligation needs a prompt.",
@@ -2116,10 +2108,10 @@ function je(e) {
2116
2108
  "instruction"
2117
2109
  )
2118
2110
  ), e.analyticsIntent) {
2119
- const s = Q(
2111
+ const n = Q(
2120
2112
  e.analyticsIntent
2121
2113
  );
2122
- i.push(...s.errors), t.push(...s.warnings);
2114
+ i.push(...n.errors), t.push(...n.warnings);
2123
2115
  }
2124
2116
  } else
2125
2117
  i.push(
@@ -2136,7 +2128,7 @@ function je(e) {
2136
2128
  repairHints: Y(i)
2137
2129
  };
2138
2130
  }
2139
- function Le(e) {
2131
+ function Ce(e) {
2140
2132
  const i = [], t = [];
2141
2133
  if (!e || typeof e != "object")
2142
2134
  return {
@@ -2164,10 +2156,10 @@ function Le(e) {
2164
2156
  "kind"
2165
2157
  )
2166
2158
  );
2167
- const s = je(
2159
+ const n = je(
2168
2160
  e.operationIntent
2169
2161
  );
2170
- return i.push(...s.errors), t.push(...s.warnings), Array.isArray(e.plannedToolCalls) || i.push(
2162
+ return i.push(...n.errors), t.push(...n.warnings), Array.isArray(e.plannedToolCalls) || i.push(
2171
2163
  a(
2172
2164
  "invalid_planned_tool_calls",
2173
2165
  "Recovery plan plannedToolCalls must be an array.",
@@ -2269,7 +2261,7 @@ function Be(e) {
2269
2261
  }
2270
2262
  }).filter((i) => !!i);
2271
2263
  }
2272
- function qe(e, i, t, s) {
2264
+ function qe(e, i, t, n) {
2273
2265
  if (!e || typeof e != "object") {
2274
2266
  t.push(
2275
2267
  a("invalid_view", "Dashboard view must be an object.", i)
@@ -2289,7 +2281,7 @@ function qe(e, i, t, s) {
2289
2281
  return;
2290
2282
  }
2291
2283
  if (e.presentation.kind === "text") {
2292
- l(e.text) || s.push(
2284
+ l(e.text) || n.push(
2293
2285
  a(
2294
2286
  "missing_text_content",
2295
2287
  "Text views should include text content.",
@@ -2316,20 +2308,20 @@ function qe(e, i, t, s) {
2316
2308
  )
2317
2309
  );
2318
2310
  const o = Q(e.analytics);
2319
- for (const n of o.errors)
2311
+ for (const s of o.errors)
2320
2312
  t.push(
2321
2313
  a(
2322
- n.code,
2323
- n.message,
2324
- `${i}.analytics${n.path ? `.${n.path}` : ""}`
2314
+ s.code,
2315
+ s.message,
2316
+ `${i}.analytics${s.path ? `.${s.path}` : ""}`
2325
2317
  )
2326
2318
  );
2327
- for (const n of o.warnings)
2328
- s.push(
2319
+ for (const s of o.warnings)
2320
+ n.push(
2329
2321
  a(
2330
- n.code,
2331
- n.message,
2332
- `${i}.analytics${n.path ? `.${n.path}` : ""}`
2322
+ s.code,
2323
+ s.message,
2324
+ `${i}.analytics${s.path ? `.${s.path}` : ""}`
2333
2325
  )
2334
2326
  );
2335
2327
  }
@@ -2353,8 +2345,8 @@ function Ue(e) {
2353
2345
  ), l(e.title) || i.push(
2354
2346
  a("missing_title", "Dashboard intent needs a title.", "title")
2355
2347
  );
2356
- const s = Array.isArray(e.inputs) ? e.inputs : [], o = w(
2357
- s.filter(u).map((d) => d.id).filter((d) => typeof d == "string")
2348
+ const n = Array.isArray(e.inputs) ? e.inputs : [], o = w(
2349
+ n.filter(u).map((d) => d.id).filter((d) => typeof d == "string")
2358
2350
  );
2359
2351
  o && i.push(
2360
2352
  a(
@@ -2363,31 +2355,31 @@ function Ue(e) {
2363
2355
  "inputs"
2364
2356
  )
2365
2357
  );
2366
- for (const [d, p] of s.entries()) {
2367
- const m = `inputs.${d}`;
2358
+ for (const [d, p] of n.entries()) {
2359
+ const f = `inputs.${d}`;
2368
2360
  if (!u(p)) {
2369
2361
  i.push(
2370
- a("invalid_input", "Dashboard input must be an object.", m)
2362
+ a("invalid_input", "Dashboard input must be an object.", f)
2371
2363
  );
2372
2364
  continue;
2373
2365
  }
2374
2366
  l(p.id) || i.push(
2375
- a("missing_input_id", "Input needs an id.", `${m}.id`)
2367
+ a("missing_input_id", "Input needs an id.", `${f}.id`)
2376
2368
  ), l(p.label) || i.push(
2377
- a("missing_input_label", "Input needs a label.", `${m}.label`)
2369
+ a("missing_input_label", "Input needs a label.", `${f}.label`)
2378
2370
  ), !p.field || !l(p.field.name) ? i.push(
2379
- a("missing_input_field", "Input needs a field.", `${m}.field`)
2380
- ) : f(p.field, `${m}.field`, i);
2371
+ a("missing_input_field", "Input needs a field.", `${f}.field`)
2372
+ ) : m(p.field, `${f}.field`, i);
2381
2373
  }
2382
- const n = Array.isArray(e.sections) ? e.sections : [];
2383
- n.length === 0 && i.push(
2374
+ const s = Array.isArray(e.sections) ? e.sections : [];
2375
+ s.length === 0 && i.push(
2384
2376
  a(
2385
2377
  "missing_sections",
2386
2378
  "Dashboard intent needs at least one section.",
2387
2379
  "sections"
2388
2380
  )
2389
2381
  );
2390
- const r = n.flatMap(
2382
+ const r = s.flatMap(
2391
2383
  (d) => d && typeof d == "object" && Array.isArray(d.views) ? d.views.filter(u).map((p) => p.id).filter((p) => !!p) : []
2392
2384
  ), c = w(r);
2393
2385
  c && i.push(
@@ -2397,14 +2389,14 @@ function Ue(e) {
2397
2389
  "sections"
2398
2390
  )
2399
2391
  );
2400
- for (const [d, p] of n.entries()) {
2401
- const m = `sections.${d}`;
2392
+ for (const [d, p] of s.entries()) {
2393
+ const f = `sections.${d}`;
2402
2394
  if (!p || typeof p != "object") {
2403
2395
  i.push(
2404
2396
  a(
2405
2397
  "invalid_section",
2406
2398
  "Dashboard section must be an object.",
2407
- m
2399
+ f
2408
2400
  )
2409
2401
  );
2410
2402
  continue;
@@ -2413,14 +2405,14 @@ function Ue(e) {
2413
2405
  a(
2414
2406
  "missing_section_title",
2415
2407
  "Dashboard section needs a title.",
2416
- m
2408
+ f
2417
2409
  )
2418
2410
  ), !Array.isArray(p.views) || p.views.length === 0) {
2419
2411
  i.push(
2420
2412
  a(
2421
2413
  "missing_section_views",
2422
2414
  "Dashboard section needs at least one view.",
2423
- `${m}.views`
2415
+ `${f}.views`
2424
2416
  )
2425
2417
  );
2426
2418
  continue;
@@ -2428,7 +2420,7 @@ function Ue(e) {
2428
2420
  for (const [b, y] of p.views.entries())
2429
2421
  qe(
2430
2422
  y,
2431
- `${m}.views.${b}`,
2423
+ `${f}.views.${b}`,
2432
2424
  i,
2433
2425
  t
2434
2426
  );
@@ -2436,10 +2428,10 @@ function Ue(e) {
2436
2428
  return { ok: i.length === 0, errors: i, warnings: t };
2437
2429
  }
2438
2430
  export {
2439
- Ce as a,
2431
+ Le as a,
2440
2432
  Q as b,
2441
2433
  je as c,
2442
- Le as d,
2434
+ Ce as d,
2443
2435
  Ue as e,
2444
2436
  T as p,
2445
2437
  Ne as v