react-semaphor 0.1.495 → 0.1.496

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 (124) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +233 -218
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.cjs +1 -1
  6. package/dist/briefings/index.js +5 -5
  7. package/dist/chunks/calculated-field-identity-Cq9GwHfE.js +1266 -0
  8. package/dist/chunks/calculated-field-identity-DTfyvvLC.cjs +1 -0
  9. package/dist/chunks/{constants-BjGBVFbu.js → constants-CC3WKmqC.js} +14 -14
  10. package/dist/chunks/{constants-C-GvudXp.cjs → constants-DIuhVR6J.cjs} +1 -1
  11. package/dist/chunks/{dashboard-briefing-launcher-tYTkfNPj.js → dashboard-briefing-launcher-Bbz4cwHb.js} +9 -9
  12. package/dist/chunks/{dashboard-briefing-launcher-DyYVbfXp.cjs → dashboard-briefing-launcher-CM6LTGw5.cjs} +1 -1
  13. package/dist/chunks/{dashboard-controls-Hwo4ZnW4.cjs → dashboard-controls-B2nrczJl.cjs} +1 -1
  14. package/dist/chunks/{dashboard-controls-BR7hSzDh.js → dashboard-controls-BsgADy-S.js} +11 -11
  15. package/dist/chunks/{dashboard-date-comparison-definition-CpCZAGIz.js → dashboard-date-comparison-definition-Bqti6YAo.js} +1 -1
  16. package/dist/chunks/{dashboard-date-comparison-definition-1NBx_7QQ.cjs → dashboard-date-comparison-definition-C69F-zaC.cjs} +1 -1
  17. package/dist/chunks/{dashboard-json-FDNan6Lc.js → dashboard-json-CA-BChbt.js} +7 -7
  18. package/dist/chunks/{dashboard-json-B3CuJo_G.cjs → dashboard-json-CwRRBSSL.cjs} +1 -1
  19. package/dist/chunks/{edit-dashboard-visual-aqW4Jtrr.cjs → edit-dashboard-visual-BlS27LDw.cjs} +1 -1
  20. package/dist/chunks/{edit-dashboard-visual-DTJwFkdX.js → edit-dashboard-visual-CEiPgdkX.js} +15 -15
  21. package/dist/chunks/{editor-action-buttons-DSGiwWur.js → editor-action-buttons-6HBjjcfK.js} +6 -6
  22. package/dist/chunks/{editor-action-buttons-B3Dpnink.cjs → editor-action-buttons-kk2BNiTe.cjs} +1 -1
  23. package/dist/chunks/{field-aggregations-Cy4hBBqe.js → field-aggregations-C8kZqMTD.js} +11 -11
  24. package/dist/chunks/{field-aggregations-U54X9_Rt.cjs → field-aggregations-naKZ7S2Q.cjs} +1 -1
  25. package/dist/chunks/{index-a9nBmD-v.cjs → index-BSRwdFTN.cjs} +222 -222
  26. package/dist/chunks/{index-B9FLuTyx.cjs → index-CCa-A-Yx.cjs} +1 -1
  27. package/dist/chunks/{index-Ne0-ePdz.js → index-Cgoz65yM.js} +39098 -38334
  28. package/dist/chunks/{index-zKj-mqbS.js → index-oll4m-qi.js} +11 -11
  29. package/dist/chunks/{matrix-analytical-definition-DSRmzber.js → matrix-analytical-definition-B1xhoCak.js} +1 -1
  30. package/dist/chunks/{matrix-analytical-definition-B5oWAePu.cjs → matrix-analytical-definition-BK5y9XHH.cjs} +1 -1
  31. package/dist/chunks/{matrix-card-CxTCV9HF.js → matrix-card-BEb6hr8i.js} +2 -2
  32. package/dist/chunks/{matrix-card-BV7OPtq_.cjs → matrix-card-Ii8yYSnw.cjs} +1 -1
  33. package/dist/chunks/{matrix-control-sources-BLGlb4S9.cjs → matrix-control-sources-CdegRBcA.cjs} +1 -1
  34. package/dist/chunks/{matrix-control-sources-DYMzccBY.js → matrix-control-sources-cbYmqWNg.js} +5 -5
  35. package/dist/chunks/{matrix-definition-jy7ygO6J.cjs → matrix-definition-CSNthxru.cjs} +1 -1
  36. package/dist/chunks/{matrix-definition-Djesv_9v.js → matrix-definition-CZM5-YJX.js} +1 -1
  37. package/dist/chunks/{matrix-formatter-CuRTrMP2.cjs → matrix-formatter-C19PZAal.cjs} +1 -1
  38. package/dist/chunks/{matrix-formatter-BhkdDosE.js → matrix-formatter-CiXzpX6X.js} +27 -27
  39. package/dist/chunks/matrix-member-presentation-CQHvq18l.cjs +1 -0
  40. package/dist/chunks/matrix-member-presentation-CabW8mJc.js +105 -0
  41. package/dist/chunks/{matrix-operation-contract-4q53iAUW.js → matrix-operation-contract-0Nor-C71.js} +21 -21
  42. package/dist/chunks/{matrix-operation-contract-CbavkrJj.cjs → matrix-operation-contract-o9GXbiHw.cjs} +1 -1
  43. package/dist/chunks/{metric-comparison-CPx_2iqI.js → metric-comparison-Br8l0WkK.js} +1 -1
  44. package/dist/chunks/{metric-comparison-l2X7Reol.cjs → metric-comparison-DeiOjEm5.cjs} +1 -1
  45. package/dist/chunks/{operators-C8TxpM4C.js → operators-B3zZoskU.js} +28 -10
  46. package/dist/chunks/operators-DEfKaU_V.cjs +1 -0
  47. package/dist/chunks/{pivot-header-presentation-BDMb1Wlc.cjs → pivot-header-presentation-DRv-cSIP.cjs} +1 -1
  48. package/dist/chunks/{pivot-header-presentation-utM9JrgD.js → pivot-header-presentation-DW-ti5ek.js} +3 -3
  49. package/dist/chunks/{pivot-result-identity-Hm1sO9KE.cjs → pivot-result-identity-DEenUrMj.cjs} +1 -1
  50. package/dist/chunks/{pivot-result-identity-BDntll93.js → pivot-result-identity-sZc1RaIz.js} +1 -1
  51. package/dist/chunks/{pivot-result-lifecycle-QiOUMsYd.cjs → pivot-result-lifecycle-D81qcCcZ.cjs} +1 -1
  52. package/dist/chunks/{pivot-result-lifecycle-Cu9hRFAp.js → pivot-result-lifecycle-DJ40gdwk.js} +7 -7
  53. package/dist/chunks/{raw-temporal-DWuF9bt7.cjs → raw-temporal-DDTt2yv5.cjs} +1 -1
  54. package/dist/chunks/{raw-temporal-CknUT-Fp.js → raw-temporal-DHCZrFe7.js} +15 -15
  55. package/dist/chunks/{raw-temporal-contract-B3YGcvzw.cjs → raw-temporal-contract-BcbV56Rc.cjs} +1 -1
  56. package/dist/chunks/{raw-temporal-contract-BVcDonCB.js → raw-temporal-contract-CkvdtPYA.js} +1 -1
  57. package/dist/chunks/{report-preferences-dialog-DsjMwa3m.js → report-preferences-dialog-CVRJOCQu.js} +6 -6
  58. package/dist/chunks/{report-preferences-dialog-BP_EdVHP.cjs → report-preferences-dialog-DGEq-iBF.cjs} +1 -1
  59. package/dist/chunks/{report-runtime-context-DTxVBKqP.js → report-runtime-context-BlDpc-F-.js} +1 -1
  60. package/dist/chunks/{report-runtime-context-C-As8sq_.cjs → report-runtime-context-lSIvyKm2.cjs} +1 -1
  61. package/dist/chunks/{semantic-format-CyJWf8gZ.cjs → semantic-format--_VEin18.cjs} +1 -1
  62. package/dist/chunks/{semantic-format-BTEhH9ga.js → semantic-format-ew5zviaT.js} +2 -2
  63. package/dist/chunks/{source-entity-resolution-DXjCZPuO.js → source-entity-resolution-79Rihbk3.js} +121 -107
  64. package/dist/chunks/source-entity-resolution-DPjslVgx.cjs +1 -0
  65. package/dist/chunks/{switch-BmCGBb2F.js → switch-BmyuyM7e.js} +4736 -4697
  66. package/dist/chunks/switch-nDjQC2y3.cjs +139 -0
  67. package/dist/chunks/{temporal-bucket-contract-pW4c6N2M.cjs → temporal-bucket-contract-BYR6tj6F.cjs} +1 -1
  68. package/dist/chunks/{temporal-bucket-contract-Bhsl_j4B.js → temporal-bucket-contract-C-kKQ_W4.js} +1 -1
  69. package/dist/chunks/{token-types-DpYncMPp.js → token-types-BIYFAsGq.js} +1 -1
  70. package/dist/chunks/{token-types-CsKRtJp0.cjs → token-types-CkAGFhiW.cjs} +1 -1
  71. package/dist/chunks/{update-policy-CtLb9ish.cjs → update-policy-BCtFr2Qh.cjs} +1 -1
  72. package/dist/chunks/{update-policy-BoB26XrS.js → update-policy-CP_A1IVD.js} +2 -2
  73. package/dist/chunks/{validators-DgmJaRF4.js → validators-D-_IT-Xw.js} +1132 -1013
  74. package/dist/chunks/validators-ux2obZB9.cjs +1 -0
  75. package/dist/dashboard/index.cjs +1 -1
  76. package/dist/dashboard/index.js +1 -1
  77. package/dist/dashboard-authoring/index.cjs +3 -3
  78. package/dist/dashboard-authoring/index.js +157 -150
  79. package/dist/data-app-builder/index.cjs +1 -1
  80. package/dist/data-app-builder/index.js +2 -2
  81. package/dist/data-app-codegen/index.cjs +1 -1
  82. package/dist/data-app-codegen/index.js +2 -2
  83. package/dist/data-app-codegen-node/index.cjs +2 -2
  84. package/dist/data-app-codegen-node/index.js +33 -36
  85. package/dist/data-app-sdk/index.cjs +2 -2
  86. package/dist/data-app-sdk/index.js +232 -230
  87. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  88. package/dist/data-app-sdk-adapters/index.js +3 -3
  89. package/dist/data-app-sdk-validation/index.cjs +1 -1
  90. package/dist/data-app-sdk-validation/index.js +5 -5
  91. package/dist/format-utils/index.cjs +1 -1
  92. package/dist/format-utils/index.js +26 -26
  93. package/dist/index.cjs +1 -1
  94. package/dist/index.js +15 -15
  95. package/dist/report-runtime-context/index.cjs +1 -1
  96. package/dist/report-runtime-context/index.js +2 -2
  97. package/dist/surfboard/index.cjs +1 -1
  98. package/dist/surfboard/index.js +2 -2
  99. package/dist/types/analytics-protocol.d.ts +256 -1
  100. package/dist/types/briefings.d.ts +46 -0
  101. package/dist/types/dashboard-assistant.d.ts +46 -1
  102. package/dist/types/dashboard-authoring.d.ts +131 -2
  103. package/dist/types/dashboard.d.ts +48 -0
  104. package/dist/types/data-app-builder.d.ts +23 -1
  105. package/dist/types/data-app-codegen-node.d.ts +23 -1
  106. package/dist/types/data-app-codegen.d.ts +23 -1
  107. package/dist/types/data-app-sdk-adapters.d.ts +23 -1
  108. package/dist/types/data-app-sdk-validation.d.ts +46 -1
  109. package/dist/types/data-app-sdk.d.ts +51 -1
  110. package/dist/types/index.cjs +1 -1
  111. package/dist/types/index.js +4 -4
  112. package/dist/types/main.d.ts +111 -1
  113. package/dist/types/shared.d.ts +46 -0
  114. package/dist/types/surfboard.d.ts +48 -0
  115. package/dist/types/types.d.ts +48 -0
  116. package/package.json +1 -1
  117. package/dist/chunks/calculated-field-identity-Cc-RlE-0.cjs +0 -1
  118. package/dist/chunks/calculated-field-identity-D7ygZ7oN.js +0 -1117
  119. package/dist/chunks/matrix-member-presentation-BN6VD-fr.js +0 -24
  120. package/dist/chunks/matrix-member-presentation-D82rMVDG.cjs +0 -1
  121. package/dist/chunks/operators-DrTQsJXv.cjs +0 -1
  122. package/dist/chunks/source-entity-resolution-BA8sdBbL.cjs +0 -1
  123. package/dist/chunks/switch-COujiMcB.cjs +0 -139
  124. package/dist/chunks/validators-CueUwVE4.cjs +0 -1
@@ -1,5 +1,16 @@
1
1
  import { z as i } from "zod";
2
- const G = [
2
+ const jt = [
3
+ "missing_dependency",
4
+ "missing_relationship",
5
+ "population_required",
6
+ "ambiguous_relationship"
7
+ ];
8
+ function Qn(e) {
9
+ return jt.includes(
10
+ e
11
+ );
12
+ }
13
+ const Re = 200, G = [
3
14
  "second",
4
15
  "minute",
5
16
  "hour",
@@ -9,35 +20,44 @@ const G = [
9
20
  "quarter",
10
21
  "year"
11
22
  ];
12
- function qn(e) {
23
+ function Wn(e) {
13
24
  return typeof e == "string" && G.includes(e);
14
25
  }
15
- const jt = [
26
+ const $t = [
16
27
  "week_of_short",
17
28
  "week_of_long",
18
29
  "quarter_short",
19
30
  "quarter_long",
20
31
  "fiscal_quarter_short",
21
32
  "fiscal_year"
22
- ], Ln = {
33
+ ], Xn = {
23
34
  invalidMetadata: "invalid_raw_temporal_metadata"
24
35
  };
25
- function Et(e) {
36
+ function Ct(e) {
26
37
  return e === "second" || e === "minute" || e === "hour" ? "datetime" : "date";
27
38
  }
28
- const Un = {
39
+ const Zn = {
29
40
  missingMetadata: "missing_temporal_bucket_metadata",
30
41
  invalidMetadata: "invalid_temporal_bucket_metadata",
31
42
  invalidValue: "invalid_temporal_bucket_value"
32
- }, Vn = "__auto_count__";
33
- function $t(e) {
43
+ }, Jn = "__auto_count__";
44
+ function Ot(e) {
45
+ return typeof e == "string" || typeof e == "number" && Number.isFinite(e) || typeof e == "boolean";
46
+ }
47
+ function Yt(e) {
48
+ return !Array.isArray(e) || e.length === 0 || e.length > Re || !e.every(Ot) ? {
49
+ ok: !1,
50
+ error: `matchValues must be 1 to ${Re} string, number or boolean values.`
51
+ } : { ok: !0, values: e };
52
+ }
53
+ function Pt(e) {
34
54
  try {
35
55
  return new Intl.DateTimeFormat("en-US", { timeZone: e }).format(), !0;
36
56
  } catch {
37
57
  return !1;
38
58
  }
39
59
  }
40
- const Ct = i.record(i.string(), i.unknown()), Y = i.array(Ct), F = i.enum([
60
+ const Bt = i.record(i.string(), i.unknown()), O = i.array(Bt), F = i.enum([
41
61
  "SUM",
42
62
  "COUNT",
43
63
  "AVG",
@@ -75,11 +95,11 @@ const Ct = i.record(i.string(), i.unknown()), Y = i.array(Ct), F = i.enum([
75
95
  "minute",
76
96
  "hour",
77
97
  "day"
78
- ]), Yt = i.enum(jt), Pt = i.discriminatedUnion("mode", [
98
+ ]), qt = i.enum($t), Lt = i.discriminatedUnion("mode", [
79
99
  i.object({ mode: i.literal("auto") }).strict(),
80
100
  i.object({
81
101
  mode: i.literal("preset"),
82
- preset: Yt
102
+ preset: qt
83
103
  }).strict(),
84
104
  i.object({
85
105
  mode: i.literal("pattern"),
@@ -87,9 +107,9 @@ const Ct = i.record(i.string(), i.unknown()), Y = i.array(Ct), F = i.enum([
87
107
  }).strict()
88
108
  ]), W = i.object({
89
109
  type: i.literal("temporal_bucket"),
90
- presentation: Pt
91
- }).strict(), Ot = i.object({
92
- tz: i.string().min(1).refine($t, {
110
+ presentation: Lt
111
+ }).strict(), Ut = i.object({
112
+ tz: i.string().min(1).refine(Pt, {
93
113
  message: "tz must be a valid IANA timezone"
94
114
  }),
95
115
  weekStart: i.number().int().min(0).max(6),
@@ -97,14 +117,14 @@ const Ct = i.record(i.string(), i.unknown()), Y = i.array(Ct), F = i.enum([
97
117
  kind: i.literal("month_aligned"),
98
118
  yearStartMonth: i.number().int().min(1).max(12)
99
119
  }).strict().optional()
100
- }).strict(), oe = i.object({
120
+ }).strict(), se = i.object({
101
121
  kind: i.literal("temporal_bucket"),
102
122
  granularity: L,
103
- calendar: Ot
104
- }).strict(), Bt = i.object({
123
+ calendar: Ut
124
+ }).strict(), Vt = i.object({
105
125
  kind: i.literal("raw_temporal"),
106
126
  valueKind: i.enum(["date", "wall_datetime", "instant"])
107
- }).strict(), pe = i.union([
127
+ }).strict(), fe = i.union([
108
128
  i.object({
109
129
  type: i.enum([
110
130
  "number",
@@ -158,7 +178,7 @@ const Ct = i.record(i.string(), i.unknown()), Y = i.array(Ct), F = i.enum([
158
178
  suffix: i.string().optional()
159
179
  }).passthrough()
160
180
  ]);
161
- function qt(e, t) {
181
+ function Ht(e, t) {
162
182
  return i.object(e).passthrough().superRefine((n, o) => {
163
183
  for (const a of t)
164
184
  Object.prototype.hasOwnProperty.call(n, a) || o.addIssue({
@@ -168,14 +188,14 @@ function qt(e, t) {
168
188
  });
169
189
  });
170
190
  }
171
- const fe = i.object({
191
+ const ge = i.object({
172
192
  kind: i.literal("semantic"),
173
193
  domainId: i.string(),
174
194
  datasetName: i.string(),
175
195
  datasetId: i.string().optional(),
176
196
  label: i.string().optional(),
177
197
  connectionId: i.string().optional()
178
- }).passthrough(), Ve = i.object({
198
+ }).passthrough(), He = i.object({
179
199
  kind: i.literal("physical"),
180
200
  connectionId: i.string(),
181
201
  connectionType: i.string().optional(),
@@ -184,27 +204,27 @@ const fe = i.object({
184
204
  schemaName: i.string().optional(),
185
205
  label: i.string().optional(),
186
206
  dialect: z.optional()
187
- }).passthrough(), Lt = i.object({
207
+ }).passthrough(), Gt = i.object({
188
208
  kind: i.literal("sql"),
189
209
  connectionId: i.string(),
190
210
  dialect: z.optional(),
191
211
  label: i.string().optional()
192
- }).passthrough(), He = i.union([
193
- fe,
194
- Ve,
195
- Lt
196
- ]), Ge = i.object({
212
+ }).passthrough(), Ge = i.union([
213
+ ge,
214
+ He,
215
+ Gt
216
+ ]), ze = i.object({
197
217
  name: i.string(),
198
218
  label: i.string().optional(),
199
219
  role: K.optional(),
200
220
  dataType: Q.optional(),
201
- source: He.optional(),
221
+ source: Ge.optional(),
202
222
  aggregate: F.optional()
203
- }).passthrough(), ze = Ge, Ut = i.object({
223
+ }).passthrough(), Ke = ze, zt = i.object({
204
224
  kind: i.literal("field"),
205
- field: ze,
225
+ field: Ke,
206
226
  aggregate: F.optional()
207
- }).passthrough(), Ke = i.object({
227
+ }).passthrough(), Qe = i.object({
208
228
  kind: i.literal("derived_field"),
209
229
  name: i.string(),
210
230
  label: i.string(),
@@ -214,7 +234,7 @@ const fe = i.object({
214
234
  computeStage: i.enum(["row", "aggregate"]),
215
235
  expression: i.string(),
216
236
  expressionLanguage: i.literal("semaphor_sql_template").optional(),
217
- inputs: i.record(Ut),
237
+ inputs: i.record(zt),
218
238
  defaultAggregate: F.optional(),
219
239
  aggregationBehavior: i.enum([
220
240
  "additive",
@@ -230,13 +250,13 @@ const fe = i.object({
230
250
  "aggregate_then_join",
231
251
  "weighted"
232
252
  ]).optional(),
233
- format: pe.optional(),
253
+ format: fe.optional(),
234
254
  tags: i.array(i.string()).optional()
235
- }).passthrough(), Qe = Ke, Hn = ze.and(
255
+ }).passthrough(), We = Qe, ea = Ke.and(
236
256
  i.object({
237
- derivedField: Qe.optional()
257
+ derivedField: We.optional()
238
258
  }).passthrough()
239
- ), Vt = fe, Ht = i.object({
259
+ ), Kt = ge, Qt = i.object({
240
260
  kind: i.literal("physical"),
241
261
  connectionId: i.string().optional(),
242
262
  connectionType: i.string().optional(),
@@ -245,35 +265,35 @@ const fe = i.object({
245
265
  schemaName: i.string().optional(),
246
266
  label: i.string().optional(),
247
267
  dialect: z.optional()
248
- }).passthrough(), Gt = i.object({
268
+ }).passthrough(), Wt = i.object({
249
269
  kind: i.literal("sql"),
250
270
  connectionId: i.string().optional(),
251
271
  dialect: z.optional(),
252
272
  label: i.string().optional()
253
- }).passthrough(), zt = i.union([
254
- Vt,
255
- Ht,
256
- Gt
257
- ]), Gn = i.object({
273
+ }).passthrough(), Xt = i.union([
274
+ Kt,
275
+ Qt,
276
+ Wt
277
+ ]), ta = i.object({
258
278
  key: i.string().optional(),
259
279
  name: i.string(),
260
280
  label: i.string().optional(),
261
281
  role: K.optional(),
262
282
  dataType: Q.optional(),
263
- source: zt.optional(),
283
+ source: Xt.optional(),
264
284
  aggregate: F.optional(),
265
285
  derivedField: i.never().optional()
266
- }).passthrough(), E = i.object({
286
+ }).passthrough(), j = i.object({
267
287
  key: i.string(),
268
288
  name: i.string(),
269
289
  label: i.string(),
270
290
  role: K.optional(),
271
291
  dataType: Q.optional(),
272
292
  aggregate: F.optional(),
273
- source: He.optional(),
274
- derivedField: Qe.optional(),
275
- temporalBucket: oe.optional(),
276
- rawTemporal: Bt.optional(),
293
+ source: Ge.optional(),
294
+ derivedField: We.optional(),
295
+ temporalBucket: se.optional(),
296
+ rawTemporal: Vt.optional(),
277
297
  pivotIdentity: i.object({
278
298
  metricId: i.string().min(1),
279
299
  metricAlias: i.string().min(1),
@@ -281,7 +301,7 @@ const fe = i.object({
281
301
  i.object({
282
302
  fieldId: i.string().min(1),
283
303
  value: i.string().nullable(),
284
- temporalBucket: oe.optional()
304
+ temporalBucket: se.optional()
285
305
  }).strict()
286
306
  )
287
307
  }).strict().optional()
@@ -291,7 +311,7 @@ const fe = i.object({
291
311
  path: ["rawTemporal"],
292
312
  message: "A result column cannot carry both temporalBucket and rawTemporal metadata."
293
313
  }), e.temporalBucket) {
294
- const n = Et(
314
+ const n = Ct(
295
315
  e.temporalBucket.granularity
296
316
  );
297
317
  e.dataType !== n && t.addIssue({
@@ -308,13 +328,13 @@ const fe = i.object({
308
328
  message: `${e.rawTemporal.valueKind} raw temporal values require dataType ${n}.`
309
329
  });
310
330
  }
311
- }), zn = i.object({
312
- records: Y,
313
- columns: i.array(E).optional()
314
- }).passthrough(), Kn = i.object({
315
- records: Y,
316
- columns: i.array(E)
317
- }).passthrough(), We = i.object({
331
+ }), ia = i.object({
332
+ records: O,
333
+ columns: i.array(j).optional()
334
+ }).passthrough(), na = i.object({
335
+ records: O,
336
+ columns: i.array(j)
337
+ }).passthrough(), Xe = i.object({
318
338
  code: i.string(),
319
339
  message: i.string().optional(),
320
340
  invalidField: i.string().optional(),
@@ -323,18 +343,18 @@ const fe = i.object({
323
343
  validDateCandidates: i.array(i.string()).optional(),
324
344
  validDimensionCandidates: i.array(i.string()).optional(),
325
345
  recommendedNextStep: i.string()
326
- }).passthrough(), Fe = i.object({
346
+ }).passthrough(), Te = i.object({
327
347
  code: i.string(),
328
348
  message: i.string(),
329
349
  path: i.string().optional(),
330
350
  fieldRole: i.enum(["measure", "date", "dimension", "input", "source", "sql"]).optional(),
331
- repairHint: We.optional()
332
- }).passthrough(), Qn = i.object({
351
+ repairHint: Xe.optional()
352
+ }).passthrough(), aa = i.object({
333
353
  ok: i.boolean(),
334
- errors: i.array(Fe),
335
- warnings: i.array(Fe),
336
- repairHints: i.array(We)
337
- }).passthrough(), Kt = i.object({
354
+ errors: i.array(Te),
355
+ warnings: i.array(Te),
356
+ repairHints: i.array(Xe)
357
+ }).passthrough(), Zt = i.object({
338
358
  page: i.number(),
339
359
  pageSize: i.number(),
340
360
  pageCount: i.number(),
@@ -348,8 +368,8 @@ const fe = i.object({
348
368
  rowCount: i.number().optional(),
349
369
  rowLimitExceeded: i.boolean().optional(),
350
370
  limit: i.number().optional(),
351
- pagination: Kt.optional()
352
- }, Wn = i.object({
371
+ pagination: Zt.optional()
372
+ }, oa = i.object({
353
373
  ...X,
354
374
  kind: i.literal("metric"),
355
375
  primaryValue: ee,
@@ -361,23 +381,41 @@ const fe = i.object({
361
381
  delta: i.union([i.number(), i.null()]).optional(),
362
382
  deltaPercent: i.union([i.number(), i.null()]).optional()
363
383
  }).passthrough().optional(),
364
- records: Y.optional()
365
- }).passthrough(), Xn = i.object({
384
+ records: O.optional()
385
+ }).passthrough(), sa = i.object({
366
386
  ...X,
367
387
  kind: i.literal("records"),
368
- columns: i.array(E),
369
- records: Y,
388
+ columns: i.array(j),
389
+ records: O,
370
390
  totals: i.object({
371
391
  mode: i.literal("server"),
372
392
  scope: i.literal("filtered_result"),
373
393
  row: i.record(i.string(), i.unknown()),
374
- columns: i.array(E).optional()
394
+ columns: i.array(j).optional()
375
395
  }).passthrough().optional()
376
- }).passthrough(), Zn = i.object({
396
+ }).passthrough(), Jt = i.object({
397
+ inputId: i.string().min(1),
398
+ status: i.enum(["applied", "inactive", "skipped", "overridden", "error"]),
399
+ reason: i.enum([
400
+ "unrelated",
401
+ "population_required",
402
+ "missing_dependency",
403
+ "missing_relationship",
404
+ "ambiguous_relationship",
405
+ "invalid_metadata",
406
+ "unsupported_dependency",
407
+ "override_not_eligible"
408
+ ]).optional()
409
+ }), ei = i.object({
410
+ complete: i.boolean(),
411
+ reason: i.enum(["unsupported", "truncated"]).optional()
412
+ }), ra = i.object({
377
413
  ...X,
378
414
  kind: i.literal("inputOptions"),
415
+ dependencyOutcomes: i.array(Jt).optional(),
416
+ match: ei.optional(),
379
417
  options: i.array(
380
- qt(
418
+ Ht(
381
419
  {
382
420
  label: i.string(),
383
421
  value: i.unknown(),
@@ -387,50 +425,50 @@ const fe = i.object({
387
425
  ["value"]
388
426
  )
389
427
  )
390
- }).passthrough(), Jn = i.object({
428
+ }).passthrough(), la = i.object({
391
429
  ...X,
392
430
  kind: i.literal("sql"),
393
- columns: i.array(E),
394
- records: Y,
431
+ columns: i.array(j),
432
+ records: O,
395
433
  sqlShape: i.object({
396
434
  statementType: i.string().optional(),
397
435
  explicitLimit: i.number().optional(),
398
436
  hasPythonCode: i.boolean().optional()
399
437
  }).passthrough().optional()
400
438
  }).passthrough();
401
- function r(e, t, n) {
439
+ function s(e, t, n) {
402
440
  return n ? { code: e, message: t, path: n } : { code: e, message: t };
403
441
  }
404
- function m(e) {
442
+ function p(e) {
405
443
  return typeof e == "string" && e.trim().length > 0;
406
444
  }
407
- function Qt(e) {
445
+ function ti(e) {
408
446
  const t = /* @__PURE__ */ new Set();
409
- return Wt(e, (n) => (t.add(n), `{${n}}`)), Array.from(t);
447
+ return ii(e, (n) => (t.add(n), `{${n}}`)), Array.from(t);
410
448
  }
411
- function Wt(e, t) {
449
+ function ii(e, t) {
412
450
  let n = "", o = 0, a = 0;
413
451
  for (; a < e.length; ) {
414
- const s = e[a];
415
- if (s === "'" || s === '"') {
416
- a = Xt(e, a);
452
+ const r = e[a];
453
+ if (r === "'" || r === '"') {
454
+ a = ni(e, a);
417
455
  continue;
418
456
  }
419
- if (s === "{") {
457
+ if (r === "{") {
420
458
  const l = e.indexOf("}", a + 1);
421
459
  if (l === -1) {
422
460
  a += 1;
423
461
  continue;
424
462
  }
425
- const u = e.slice(a + 1, l);
426
- /^[A-Za-z_][A-Za-z0-9_]*$/.test(u) && (n += e.slice(o, a) + t(u), o = l + 1), a = l + 1;
463
+ const d = e.slice(a + 1, l);
464
+ /^[A-Za-z_][A-Za-z0-9_]*$/.test(d) && (n += e.slice(o, a) + t(d), o = l + 1), a = l + 1;
427
465
  continue;
428
466
  }
429
467
  a += 1;
430
468
  }
431
469
  return n + e.slice(o);
432
470
  }
433
- function Xt(e, t) {
471
+ function ni(e, t) {
434
472
  const n = e[t];
435
473
  let o = t + 1;
436
474
  for (; o < e.length; ) {
@@ -448,7 +486,7 @@ function Xt(e, t) {
448
486
  function f(e) {
449
487
  return !!(e && typeof e == "object" && !Array.isArray(e));
450
488
  }
451
- const Zt = /* @__PURE__ */ new Set([
489
+ const ai = /* @__PURE__ */ new Set([
452
490
  "SUM",
453
491
  "COUNT",
454
492
  "AVG",
@@ -457,22 +495,22 @@ const Zt = /* @__PURE__ */ new Set([
457
495
  "MEDIAN",
458
496
  "DISTINCT"
459
497
  ]);
460
- function ge(e, t, n) {
498
+ function he(e, t, n) {
461
499
  if (!e || typeof e != "object") {
462
500
  n.push(
463
- r("missing_source", "Analytics intent needs a source.", t)
501
+ s("missing_source", "Analytics intent needs a source.", t)
464
502
  );
465
503
  return;
466
504
  }
467
505
  if (e.kind === "semantic") {
468
- m(e.domainId) || n.push(
469
- r(
506
+ p(e.domainId) || n.push(
507
+ s(
470
508
  "missing_semantic_domain",
471
509
  "Semantic source needs a domainId.",
472
510
  `${t}.domainId`
473
511
  )
474
- ), m(e.datasetName) || n.push(
475
- r(
512
+ ), p(e.datasetName) || n.push(
513
+ s(
476
514
  "missing_dataset_name",
477
515
  "Semantic source needs a datasetName.",
478
516
  `${t}.datasetName`
@@ -481,14 +519,14 @@ function ge(e, t, n) {
481
519
  return;
482
520
  }
483
521
  if (e.kind === "physical") {
484
- m(e.connectionId) || n.push(
485
- r(
522
+ p(e.connectionId) || n.push(
523
+ s(
486
524
  "missing_connection_id",
487
525
  "Physical source needs a connectionId.",
488
526
  `${t}.connectionId`
489
527
  )
490
- ), m(e.tableName) || n.push(
491
- r(
528
+ ), p(e.tableName) || n.push(
529
+ s(
492
530
  "missing_table_name",
493
531
  "Physical source needs a tableName.",
494
532
  `${t}.tableName`
@@ -497,8 +535,8 @@ function ge(e, t, n) {
497
535
  return;
498
536
  }
499
537
  if (e.kind === "sql") {
500
- m(e.connectionId) || n.push(
501
- r(
538
+ p(e.connectionId) || n.push(
539
+ s(
502
540
  "missing_connection_id",
503
541
  "SQL source needs a connectionId.",
504
542
  `${t}.connectionId`
@@ -507,47 +545,47 @@ function ge(e, t, n) {
507
545
  return;
508
546
  }
509
547
  n.push(
510
- r("invalid_source_kind", "Source kind is not supported.", t)
548
+ s("invalid_source_kind", "Source kind is not supported.", t)
511
549
  );
512
550
  }
513
551
  function b(e, t, n, o = {}) {
514
552
  if (!e || !f(e)) {
515
553
  o.required && n.push(
516
- r("missing_field_ref", "Field reference needs a name.", t)
554
+ s("missing_field_ref", "Field reference needs a name.", t)
517
555
  );
518
556
  return;
519
557
  }
520
- m(e.name) || n.push(
521
- r(
558
+ p(e.name) || n.push(
559
+ s(
522
560
  "missing_field_ref",
523
561
  "Field reference needs a name.",
524
562
  `${t}.name`
525
563
  )
526
- ), e.source !== void 0 && ge(e.source, `${t}.source`, n), he(e.aggregate, `${t}.aggregate`, n);
564
+ ), e.source !== void 0 && he(e.source, `${t}.source`, n), _e(e.aggregate, `${t}.aggregate`, n);
527
565
  }
528
- function he(e, t, n) {
529
- e !== void 0 && (typeof e != "string" || !Zt.has(e)) && n.push(
530
- r(
566
+ function _e(e, t, n) {
567
+ e !== void 0 && (typeof e != "string" || !ai.has(e)) && n.push(
568
+ s(
531
569
  "invalid_aggregate",
532
570
  "Field aggregate must be SUM, COUNT, AVG, MIN, MAX, MEDIAN, or DISTINCT.",
533
571
  t
534
572
  )
535
573
  );
536
574
  }
537
- const Jt = /* @__PURE__ */ new Set([
575
+ const oi = /* @__PURE__ */ new Set([
538
576
  "measure",
539
577
  "dimension",
540
578
  "date",
541
579
  "id",
542
580
  "unknown"
543
- ]), ei = /* @__PURE__ */ new Set(["row", "aggregate"]), Xe = /* @__PURE__ */ new Set([
581
+ ]), si = /* @__PURE__ */ new Set(["row", "aggregate"]), Ze = /* @__PURE__ */ new Set([
544
582
  "string",
545
583
  "number",
546
584
  "boolean",
547
585
  "date",
548
586
  "datetime",
549
587
  "unknown"
550
- ]), ti = /* @__PURE__ */ new Set([
588
+ ]), ri = /* @__PURE__ */ new Set([
551
589
  "number",
552
590
  "currency",
553
591
  "percent",
@@ -558,19 +596,19 @@ const Jt = /* @__PURE__ */ new Set([
558
596
  "duration",
559
597
  "string",
560
598
  "temporal_bucket"
561
- ]), ii = /* @__PURE__ */ new Set([
599
+ ]), li = /* @__PURE__ */ new Set([
562
600
  "millisecond",
563
601
  "second",
564
602
  "minute",
565
603
  "hour",
566
604
  "day"
567
- ]), ni = /* @__PURE__ */ new Set(["compact", "digital", "long"]);
568
- function Ze(e, t, n) {
605
+ ]), di = /* @__PURE__ */ new Set(["compact", "digital", "long"]);
606
+ function Je(e, t, n) {
569
607
  if (e === void 0)
570
608
  return;
571
609
  if (!f(e)) {
572
610
  n.push(
573
- r(
611
+ s(
574
612
  "invalid_value_format",
575
613
  "Value format must be a structured object.",
576
614
  t
@@ -579,95 +617,95 @@ function Ze(e, t, n) {
579
617
  return;
580
618
  }
581
619
  const o = e;
582
- (typeof o.type != "string" || !ti.has(o.type)) && n.push(
583
- r(
620
+ (typeof o.type != "string" || !ri.has(o.type)) && n.push(
621
+ s(
584
622
  "invalid_value_format_type",
585
623
  "Value format type must be number, currency, percent, percentage, scientific, date, datetime, duration, string, or temporal_bucket.",
586
624
  `${t}.type`
587
625
  )
588
626
  ), o.type === "temporal_bucket" && !W.safeParse(e).success && n.push(
589
- r(
627
+ s(
590
628
  "invalid_temporal_bucket_format",
591
629
  "Temporal bucket format must contain a valid auto, preset, or pattern presentation.",
592
630
  t
593
631
  )
594
632
  ), (o.type === "number" || o.type === "currency" || o.type === "percent" || o.type === "percentage" || o.type === "scientific") && Object.prototype.hasOwnProperty.call(e, "locale") && n.push(
595
- r(
633
+ s(
596
634
  "invalid_value_format",
597
635
  "Numeric value formats cannot define viewer locale.",
598
636
  `${t}.locale`
599
637
  )
600
- ), O(
638
+ ), P(
601
639
  e.minimumFractionDigits,
602
640
  `${t}.minimumFractionDigits`,
603
641
  n
604
- ), O(
642
+ ), P(
605
643
  e.maximumFractionDigits,
606
644
  `${t}.maximumFractionDigits`,
607
645
  n
608
- ), O(e.scale, `${t}.scale`, n), O(e.maxUnits, `${t}.maxUnits`, n), e.useGrouping !== void 0 && typeof e.useGrouping != "boolean" && n.push(
609
- r(
646
+ ), P(e.scale, `${t}.scale`, n), P(e.maxUnits, `${t}.maxUnits`, n), e.useGrouping !== void 0 && typeof e.useGrouping != "boolean" && n.push(
647
+ s(
610
648
  "invalid_value_format_use_grouping",
611
649
  "Value format useGrouping must be boolean.",
612
650
  `${t}.useGrouping`
613
651
  )
614
652
  ), e.negativeStyle !== void 0 && e.negativeStyle !== "minus" && e.negativeStyle !== "parentheses" && n.push(
615
- r(
653
+ s(
616
654
  "invalid_value_format_negative_style",
617
655
  "Value format negativeStyle must be minus or parentheses.",
618
656
  `${t}.negativeStyle`
619
657
  )
620
658
  ), e.percentValueMode !== void 0 && e.percentValueMode !== "fraction" && e.percentValueMode !== "whole" && n.push(
621
- r(
659
+ s(
622
660
  "invalid_value_format_percent_mode",
623
661
  "Value format percentValueMode must be fraction or whole.",
624
662
  `${t}.percentValueMode`
625
663
  )
626
664
  );
627
665
  for (const a of ["inputUnit", "largestUnit", "smallestUnit"]) {
628
- const s = e[a];
629
- s !== void 0 && (typeof s != "string" || !ii.has(s)) && n.push(
630
- r(
666
+ const r = e[a];
667
+ r !== void 0 && (typeof r != "string" || !li.has(r)) && n.push(
668
+ s(
631
669
  "invalid_value_format_duration_unit",
632
670
  "Duration format units must be millisecond, second, minute, hour, or day.",
633
671
  `${t}.${a}`
634
672
  )
635
673
  );
636
674
  }
637
- e.outputStyle !== void 0 && (typeof e.outputStyle != "string" || !ni.has(e.outputStyle)) && n.push(
638
- r(
675
+ e.outputStyle !== void 0 && (typeof e.outputStyle != "string" || !di.has(e.outputStyle)) && n.push(
676
+ s(
639
677
  "invalid_value_format_duration_style",
640
678
  "Duration format outputStyle must be compact, digital, or long.",
641
679
  `${t}.outputStyle`
642
680
  )
643
681
  );
644
682
  }
645
- function O(e, t, n) {
683
+ function P(e, t, n) {
646
684
  e !== void 0 && (typeof e != "number" || !Number.isFinite(e)) && n.push(
647
- r(
685
+ s(
648
686
  "invalid_value_format_number",
649
687
  "Value format numeric options must be finite numbers.",
650
688
  t
651
689
  )
652
690
  );
653
691
  }
654
- const ai = /* @__PURE__ */ new Set([
692
+ const ui = /* @__PURE__ */ new Set([
655
693
  "additive",
656
694
  "non_additive",
657
695
  "ratio_of_sums",
658
696
  "weighted",
659
697
  "pre_aggregated",
660
698
  "snapshot"
661
- ]), oi = /* @__PURE__ */ new Set([
699
+ ]), ci = /* @__PURE__ */ new Set([
662
700
  "default",
663
701
  "symmetric_aggregate",
664
702
  "aggregate_then_join",
665
703
  "weighted"
666
704
  ]);
667
- function si(e, t, n) {
705
+ function pi(e, t, n) {
668
706
  if (!e || !f(e)) {
669
707
  n.push(
670
- r(
708
+ s(
671
709
  "invalid_derived_field_input",
672
710
  "Derived field inputs must be structured input references.",
673
711
  t
@@ -676,122 +714,122 @@ function si(e, t, n) {
676
714
  return;
677
715
  }
678
716
  if (e.kind === "field") {
679
- b(e.field, `${t}.field`, n, { required: !0 }), he(e.aggregate, `${t}.aggregate`, n);
717
+ b(e.field, `${t}.field`, n, { required: !0 }), _e(e.aggregate, `${t}.aggregate`, n);
680
718
  return;
681
719
  }
682
720
  n.push(
683
- r(
721
+ s(
684
722
  "invalid_derived_field_input",
685
723
  "Derived field input kind must be field.",
686
724
  `${t}.kind`
687
725
  )
688
726
  );
689
727
  }
690
- function Je(e) {
728
+ function et(e) {
691
729
  const t = [];
692
730
  if (!f(e))
693
731
  return t.push(
694
- r(
732
+ s(
695
733
  "invalid_derived_field",
696
734
  "Derived field definition must be a structured object."
697
735
  )
698
736
  ), { ok: !1, errors: t, warnings: [] };
699
737
  if (e.kind !== "derived_field" && t.push(
700
- r(
738
+ s(
701
739
  "invalid_derived_field_kind",
702
740
  "Derived field kind must be derived_field.",
703
741
  "kind"
704
742
  )
705
- ), m(e.name) || t.push(
706
- r(
743
+ ), p(e.name) || t.push(
744
+ s(
707
745
  "invalid_derived_field_name",
708
746
  "Derived field needs a name.",
709
747
  "name"
710
748
  )
711
- ), m(e.label) || t.push(
712
- r(
749
+ ), p(e.label) || t.push(
750
+ s(
713
751
  "invalid_derived_field_label",
714
752
  "Derived field needs a label.",
715
753
  "label"
716
754
  )
717
- ), Jt.has(e.resultRole) || t.push(
718
- r(
755
+ ), oi.has(e.resultRole) || t.push(
756
+ s(
719
757
  "invalid_derived_field_role",
720
758
  "Derived field resultRole must be measure, dimension, date, id, or unknown.",
721
759
  "resultRole"
722
760
  )
723
- ), Xe.has(e.dataType) || t.push(
724
- r(
761
+ ), Ze.has(e.dataType) || t.push(
762
+ s(
725
763
  "invalid_derived_field_data_type",
726
764
  "Derived field dataType must be string, number, boolean, date, datetime, or unknown.",
727
765
  "dataType"
728
766
  )
729
- ), ei.has(e.computeStage) || t.push(
730
- r(
767
+ ), si.has(e.computeStage) || t.push(
768
+ s(
731
769
  "invalid_derived_field_compute_stage",
732
770
  "Derived field computeStage must be row or aggregate.",
733
771
  "computeStage"
734
772
  )
735
773
  ), e.computeStage === "aggregate" && e.resultRole !== "measure" && t.push(
736
- r(
774
+ s(
737
775
  "invalid_derived_field_compute_stage",
738
776
  "Aggregate-stage derived fields must have resultRole measure.",
739
777
  "computeStage"
740
778
  )
741
779
  ), e.resultRole !== "measure" && e.defaultAggregate !== void 0 && t.push(
742
- r(
780
+ s(
743
781
  "invalid_derived_field_aggregate",
744
782
  "Only measure derived fields may declare defaultAggregate.",
745
783
  "defaultAggregate"
746
784
  )
747
785
  ), e.computeStage === "row" && e.resultRole === "measure" && e.defaultAggregate === void 0 && t.push(
748
- r(
786
+ s(
749
787
  "missing_derived_field_default_aggregate",
750
788
  "Row-stage measure derived fields must declare defaultAggregate so row results have explicit rollup semantics.",
751
789
  "defaultAggregate"
752
790
  )
753
- ), he(
791
+ ), _e(
754
792
  e.defaultAggregate,
755
793
  "defaultAggregate",
756
794
  t
757
- ), e.aggregationBehavior !== void 0 && !ai.has(
795
+ ), e.aggregationBehavior !== void 0 && !ui.has(
758
796
  e.aggregationBehavior
759
797
  ) && t.push(
760
- r(
798
+ s(
761
799
  "invalid_derived_field_aggregation_behavior",
762
800
  "Derived field aggregationBehavior is not supported.",
763
801
  "aggregationBehavior"
764
802
  )
765
- ), e.aggregationStrategy !== void 0 && !oi.has(
803
+ ), e.aggregationStrategy !== void 0 && !ci.has(
766
804
  e.aggregationStrategy
767
805
  ) && t.push(
768
- r(
806
+ s(
769
807
  "invalid_derived_field_aggregation_strategy",
770
808
  "Derived field aggregationStrategy is not supported.",
771
809
  "aggregationStrategy"
772
810
  )
773
- ), m(e.expression) || t.push(
774
- r(
811
+ ), p(e.expression) || t.push(
812
+ s(
775
813
  "invalid_derived_field_expression",
776
814
  "Derived field needs a named-token expression.",
777
815
  "expression"
778
816
  )
779
817
  ), e.expressionLanguage !== void 0 && e.expressionLanguage !== "semaphor_sql_template" && t.push(
780
- r(
818
+ s(
781
819
  "invalid_derived_field_expression_language",
782
820
  "Derived field expressionLanguage must be semaphor_sql_template.",
783
821
  "expressionLanguage"
784
822
  )
785
823
  ), !f(e.inputs) || Object.keys(e.inputs).length === 0 ? t.push(
786
- r(
824
+ s(
787
825
  "invalid_derived_field_inputs",
788
826
  "Derived field needs at least one typed input.",
789
827
  "inputs"
790
828
  )
791
829
  ) : Object.entries(e.inputs).forEach(([o, a]) => {
792
- if (!m(o)) {
830
+ if (!p(o)) {
793
831
  t.push(
794
- r(
832
+ s(
795
833
  "invalid_derived_field_input_name",
796
834
  "Derived field input names must be non-empty strings.",
797
835
  "inputs"
@@ -799,28 +837,28 @@ function Je(e) {
799
837
  );
800
838
  return;
801
839
  }
802
- si(
840
+ pi(
803
841
  a,
804
842
  `inputs.${o}`,
805
843
  t
806
844
  );
807
- }), m(e.expression) && f(e.inputs)) {
808
- const o = Qt(
845
+ }), p(e.expression) && f(e.inputs)) {
846
+ const o = ti(
809
847
  e.expression
810
- ), a = new Set(o), s = Object.keys(e.inputs).filter(
811
- (l) => m(l)
848
+ ), a = new Set(o), r = Object.keys(e.inputs).filter(
849
+ (l) => p(l)
812
850
  );
813
851
  o.forEach((l) => {
814
852
  Object.prototype.hasOwnProperty.call(e.inputs, l) || t.push(
815
- r(
853
+ s(
816
854
  "invalid_derived_field_expression_token",
817
855
  `Derived field expression token "{${l}}" needs a matching inputs.${l} entry.`,
818
856
  "expression"
819
857
  )
820
858
  );
821
- }), s.forEach((l) => {
859
+ }), r.forEach((l) => {
822
860
  a.has(l) || t.push(
823
- r(
861
+ s(
824
862
  "unused_derived_field_input",
825
863
  `Derived field input "${l}" is not referenced by expression.`,
826
864
  `inputs.${l}`
@@ -830,68 +868,68 @@ function Je(e) {
830
868
  }
831
869
  const n = e.format;
832
870
  return f(n) && n.type === "temporal_bucket" ? t.push(
833
- r(
871
+ s(
834
872
  "invalid_derived_field_format",
835
873
  "Derived field computation metadata cannot own temporal bucket presentation; declare grain and format on the grouped field.",
836
874
  "format"
837
875
  )
838
- ) : Ze(n, "format", t), e.tags !== void 0 && (!Array.isArray(e.tags) || e.tags.some((o) => !m(o))) && t.push(
839
- r(
876
+ ) : Je(n, "format", t), e.tags !== void 0 && (!Array.isArray(e.tags) || e.tags.some((o) => !p(o))) && t.push(
877
+ s(
840
878
  "invalid_derived_field_tags",
841
879
  "Derived field tags must be non-empty strings.",
842
880
  "tags"
843
881
  )
844
882
  ), { ok: t.length === 0, errors: t, warnings: [] };
845
883
  }
846
- const M = i.string().min(1).refine((e) => e.trim().length > 0, "Must not be blank."), [ri, li, di, ui] = pe.options, et = i.union([
847
- ri.innerType().omit({ locale: !0 }).strict().superRefine((e, t) => {
884
+ const M = i.string().min(1).refine((e) => e.trim().length > 0, "Must not be blank."), [mi, fi, gi, hi] = fe.options, tt = i.union([
885
+ mi.innerType().omit({ locale: !0 }).strict().superRefine((e, t) => {
848
886
  const { minimumFractionDigits: n = 0, maximumFractionDigits: o = 2 } = e;
849
887
  (![n, o].every((a) => Number.isInteger(a) && a >= 0 && a <= 20) || n > o) && t.addIssue({
850
888
  code: "custom",
851
889
  message: "Fraction digits must be integers from 0 to 20 with minimum <= maximum."
852
890
  }), e.scale !== void 0 && !Number.isFinite(e.scale) && t.addIssue({ code: "custom", message: "Scale must be finite." });
853
891
  }),
854
- li.strict(),
855
- di.strict(),
856
- ui.strict()
857
- ]), Re = i.union([
858
- et,
892
+ fi.strict(),
893
+ gi.strict(),
894
+ hi.strict()
895
+ ]), Me = i.union([
896
+ tt,
859
897
  W
860
- ]), _e = i.union([
861
- fe.extend({ domainId: M, datasetName: M }).strict(),
862
- Ve.extend({ connectionId: M, tableName: M }).strict()
863
- ]), tt = Ge.extend({
898
+ ]), be = i.union([
899
+ ge.extend({ domainId: M, datasetName: M }).strict(),
900
+ He.extend({ connectionId: M, tableName: M }).strict()
901
+ ]), it = ze.extend({
864
902
  name: M,
865
- source: _e.optional()
866
- }).strict(), be = Ke.extend({
867
- format: et.optional(),
903
+ source: be.optional()
904
+ }).strict(), ye = Qe.extend({
905
+ format: tt.optional(),
868
906
  inputs: i.record(
869
907
  i.object({
870
908
  kind: i.literal("field"),
871
- field: tt,
909
+ field: it,
872
910
  aggregate: F.optional()
873
911
  }).strict()
874
912
  )
875
913
  }).strict().superRefine((e, t) => {
876
914
  var n;
877
- for (const o of Je(e).errors)
915
+ for (const o of et(e).errors)
878
916
  t.addIssue({
879
917
  code: "custom",
880
918
  path: ((n = o.path) == null ? void 0 : n.split(".")) ?? [],
881
919
  message: o.message
882
920
  });
883
- }), ci = tt.extend({
884
- derivedField: be.optional()
921
+ }), _i = it.extend({
922
+ derivedField: ye.optional()
885
923
  }).strict();
886
- function ye(e) {
924
+ function ve(e) {
887
925
  return typeof e == "string" ? e.trim().toLowerCase() : "";
888
926
  }
889
- function mi(e) {
927
+ function bi(e) {
890
928
  return String(
891
929
  e.column_name || e.name || e.qualifiedFieldName || ""
892
930
  );
893
931
  }
894
- function pi(e) {
932
+ function yi(e) {
895
933
  return Array.from(
896
934
  new Set(
897
935
  [e.column_name, e.name, e.qualifiedFieldName, e.alias].filter(
@@ -900,9 +938,9 @@ function pi(e) {
900
938
  )
901
939
  );
902
940
  }
903
- function it(e) {
904
- const t = at(e);
905
- return t ? hi(t) ? "number" : t.includes("timestamp") || t.includes("datetime") || t.startsWith("time") ? "datetime" : t.includes("date") ? "date" : t.includes("bool") ? "boolean" : "string" : "unknown";
941
+ function nt(e) {
942
+ const t = ot(e);
943
+ return t ? Ii(t) ? "number" : t.includes("timestamp") || t.includes("datetime") || t.startsWith("time") ? "datetime" : t.includes("date") ? "date" : t.includes("bool") ? "boolean" : "string" : "unknown";
906
944
  }
907
945
  const ie = /* @__PURE__ */ new Map([
908
946
  // Integer families (PostgreSQL, ClickHouse, DuckDB, MySQL).
@@ -932,80 +970,80 @@ const ie = /* @__PURE__ */ new Map([
932
970
  ["money", null],
933
971
  ["currency", null],
934
972
  ["percent", null]
935
- ]), fi = ["int", "uint", "decimal", "float"];
936
- function gi(e) {
973
+ ]), vi = ["int", "uint", "decimal", "float"];
974
+ function Si(e) {
937
975
  return e.length > 0 && Array.from(e).every((t) => t >= "0" && t <= "9");
938
976
  }
939
- function nt(e) {
977
+ function at(e) {
940
978
  const t = e.split(/[\s(]/, 1)[0] || "";
941
979
  if (ie.has(t))
942
980
  return { numeric: !0, kind: ie.get(t) ?? null };
943
- const n = fi.find(
944
- (o) => t.startsWith(o) && gi(t.slice(o.length))
981
+ const n = vi.find(
982
+ (o) => t.startsWith(o) && Si(t.slice(o.length))
945
983
  );
946
984
  return n ? { numeric: !0, kind: ie.get(n) ?? null } : { numeric: !1, kind: null };
947
985
  }
948
- function hi(e) {
949
- return nt(e).numeric;
986
+ function Ii(e) {
987
+ return at(e).numeric;
950
988
  }
951
- function _i(e) {
952
- return nt(at(e)).kind;
989
+ function ki(e) {
990
+ return at(ot(e)).kind;
953
991
  }
954
- function at(e) {
955
- let t = ye(e), n = "";
992
+ function ot(e) {
993
+ let t = ve(e), n = "";
956
994
  for (; t && t !== n; )
957
- n = t, t = Te(t, "nullable"), t = Te(t, "lowcardinality");
995
+ n = t, t = De(t, "nullable"), t = De(t, "lowcardinality");
958
996
  return t;
959
997
  }
960
- function Te(e, t) {
998
+ function De(e, t) {
961
999
  const n = `${t}(`;
962
1000
  return !e.startsWith(n) || !e.endsWith(")") ? e : e.slice(n.length, -1).trim();
963
1001
  }
964
- function bi(e) {
965
- const t = it(e);
1002
+ function wi(e) {
1003
+ const t = nt(e);
966
1004
  return t === "date" || t === "datetime";
967
1005
  }
968
- function ot(e) {
969
- return bi(e.dataType || e.data_type);
970
- }
971
1006
  function st(e) {
972
- const t = rt(e);
1007
+ return wi(e.dataType || e.data_type);
1008
+ }
1009
+ function rt(e) {
1010
+ const t = lt(e);
973
1011
  return t === "id" || t === "row_id";
974
1012
  }
975
- function Me(e) {
976
- const t = rt(e);
977
- return st(e) || t.endsWith("_id") || t.endsWith("_key") || t.endsWith("_number");
1013
+ function Ne(e) {
1014
+ const t = lt(e);
1015
+ return rt(e) || t.endsWith("_id") || t.endsWith("_key") || t.endsWith("_number");
978
1016
  }
979
- function rt(e) {
980
- return ye(
981
- mi(e) || e.name || e.alias
1017
+ function lt(e) {
1018
+ return ve(
1019
+ bi(e) || e.name || e.alias
982
1020
  ).replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
983
1021
  }
984
- function lt(e, t = {}) {
985
- const n = ye(e.role);
986
- return n === "metric" || n === "measure" ? !t.excludeIdentifiers || !Me(e) : n === "groupby" || n === "dimension" || n === "date" || n === "id" ? !1 : it(
1022
+ function dt(e, t = {}) {
1023
+ const n = ve(e.role);
1024
+ return n === "metric" || n === "measure" ? !t.excludeIdentifiers || !Ne(e) : n === "groupby" || n === "dimension" || n === "date" || n === "id" ? !1 : nt(
987
1025
  e.dataType || e.data_type
988
- ) === "number" && (!t.excludeIdentifiers || !Me(e));
1026
+ ) === "number" && (!t.excludeIdentifiers || !Ne(e));
989
1027
  }
990
- function ea(e) {
991
- return !lt(e) && !ot(e);
1028
+ function da(e) {
1029
+ return !dt(e) && !st(e);
992
1030
  }
993
- function ta(e) {
1031
+ function ua(e) {
994
1032
  const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
995
1033
  for (const a of e) {
996
- if (st(a))
1034
+ if (rt(a))
997
1035
  continue;
998
- const s = pi(a);
999
- if (s.length !== 0) {
1000
- if (ot(a)) {
1001
- s.forEach((l) => n.add(l));
1036
+ const r = yi(a);
1037
+ if (r.length !== 0) {
1038
+ if (st(a)) {
1039
+ r.forEach((l) => n.add(l));
1002
1040
  continue;
1003
1041
  }
1004
- if (lt(a, { excludeIdentifiers: !0 })) {
1005
- s.forEach((l) => t.add(l));
1042
+ if (dt(a, { excludeIdentifiers: !0 })) {
1043
+ r.forEach((l) => t.add(l));
1006
1044
  continue;
1007
1045
  }
1008
- s.forEach((l) => o.add(l));
1046
+ r.forEach((l) => o.add(l));
1009
1047
  }
1010
1048
  }
1011
1049
  return {
@@ -1024,25 +1062,25 @@ function U(e) {
1024
1062
  exponent: Number(t[5] ?? "0")
1025
1063
  } : null;
1026
1064
  }
1027
- function De(e) {
1028
- const { sign: t, whole: n, fraction: o = "", exponent: a } = e, s = (n + o).replace(/^0+/, ""), l = s.replace(/0+$/, ""), u = a - o.length + s.length - l.length;
1029
- return !Number.isSafeInteger(a) || !Number.isSafeInteger(u) ? null : l ? `${t === "-" ? "-" : ""}${l}e${u}` : "0";
1065
+ function Ee(e) {
1066
+ const { sign: t, whole: n, fraction: o = "", exponent: a } = e, r = (n + o).replace(/^0+/, ""), l = r.replace(/0+$/, ""), d = a - o.length + r.length - l.length;
1067
+ return !Number.isSafeInteger(a) || !Number.isSafeInteger(d) ? null : l ? `${t === "-" ? "-" : ""}${l}e${d}` : "0";
1030
1068
  }
1031
- function yi(e) {
1069
+ function Ai(e) {
1032
1070
  const t = U(e);
1033
1071
  if (!t) return null;
1034
1072
  const n = t.sign === "+" ? e.slice(1) : e, o = Number(e);
1035
1073
  if (!Number.isFinite(o)) return n;
1036
- const a = De(t), s = U(String(o));
1037
- return a !== null && s !== null && a === De(s) ? o : n;
1074
+ const a = Ee(t), r = U(String(o));
1075
+ return a !== null && r !== null && a === Ee(r) ? o : n;
1038
1076
  }
1039
- function vi(e) {
1077
+ function xi(e) {
1040
1078
  if (e.length > D)
1041
1079
  throw new RangeError("Exact numeric text exceeds 16 KiB.");
1042
1080
  const t = U(e);
1043
1081
  if (!t) throw new TypeError("Expected finite decimal text.");
1044
- const { sign: n, whole: o, fraction: a, exponent: s } = t, l = `${n}${o || "0"}${a ? `.${a}` : ""}`;
1045
- return A(`${l}e${s}`);
1082
+ const { sign: n, whole: o, fraction: a, exponent: r } = t, l = `${n}${o || "0"}${a ? `.${a}` : ""}`;
1083
+ return A(`${l}e${r}`);
1046
1084
  }
1047
1085
  function A(e) {
1048
1086
  if (e.length > D)
@@ -1050,48 +1088,48 @@ function A(e) {
1050
1088
  const t = U(e);
1051
1089
  if (!t || t.whole === "" || t.fraction === "")
1052
1090
  throw new TypeError("Expected finite decimal text.");
1053
- const { sign: n, whole: o, fraction: a = "", exponent: s } = t;
1054
- if (!Number.isSafeInteger(s) || Math.abs(s) > D)
1091
+ const { sign: n, whole: o, fraction: a = "", exponent: r } = t;
1092
+ if (!Number.isSafeInteger(r) || Math.abs(r) > D)
1055
1093
  throw new RangeError("Exact numeric exponent exceeds the text budget.");
1056
- const l = o + a, u = o.length + s;
1057
- if (Math.max(l.length, u) + Math.max(0, -u) + 3 > D)
1094
+ const l = o + a, d = o.length + r;
1095
+ if (Math.max(l.length, d) + Math.max(0, -d) + 3 > D)
1058
1096
  throw new RangeError("Normalized exact numeric text exceeds 16 KiB.");
1059
- let d;
1060
- u <= 0 ? d = `0.${"0".repeat(-u)}${l}` : u >= l.length ? d = l + "0".repeat(u - l.length) : d = `${l.slice(0, u)}.${l.slice(u)}`;
1061
- const [p, h = ""] = d.split("."), v = p.replace(/^0+(?=\d)/, ""), R = h.replace(/0+$/, ""), _ = v + (R ? `.${R}` : "");
1097
+ let u;
1098
+ d <= 0 ? u = `0.${"0".repeat(-d)}${l}` : d >= l.length ? u = l + "0".repeat(d - l.length) : u = `${l.slice(0, d)}.${l.slice(d)}`;
1099
+ const [m, h = ""] = u.split("."), v = m.replace(/^0+(?=\d)/, ""), R = h.replace(/0+$/, ""), _ = v + (R ? `.${R}` : "");
1062
1100
  return n === "-" && _ !== "0" ? `-${_}` : _;
1063
1101
  }
1064
- function dt(e, t) {
1102
+ function ut(e, t) {
1065
1103
  const n = e.startsWith("-"), o = t.startsWith("-");
1066
1104
  if (n !== o) return n ? -1 : 1;
1067
- const [a, s = ""] = (n ? e.slice(1) : e).split("."), [l, u = ""] = (o ? t.slice(1) : t).split(".");
1105
+ const [a, r = ""] = (n ? e.slice(1) : e).split("."), [l, d = ""] = (o ? t.slice(1) : t).split(".");
1068
1106
  let c = Math.sign(a.length - l.length);
1069
1107
  if (!c && a !== l && (c = a < l ? -1 : 1), !c) {
1070
- const d = Math.max(s.length, u.length), p = s.padEnd(d, "0"), h = u.padEnd(d, "0");
1071
- c = p === h ? 0 : p < h ? -1 : 1;
1108
+ const u = Math.max(r.length, d.length), m = r.padEnd(u, "0"), h = d.padEnd(u, "0");
1109
+ c = m === h ? 0 : m < h ? -1 : 1;
1072
1110
  }
1073
1111
  return c === 0 ? 0 : n ? -c : c;
1074
1112
  }
1075
- function ia(e, t) {
1113
+ function ca(e, t) {
1076
1114
  if (typeof t == "number" && !Number.isFinite(t))
1077
1115
  throw new TypeError("Numeric scale must be finite.");
1078
- const n = [e, A(String(t))].map((s) => {
1079
- const [l, u = ""] = s.split(".");
1080
- return { coefficient: BigInt(l + u), digits: u.length };
1116
+ const n = [e, A(String(t))].map((r) => {
1117
+ const [l, d = ""] = r.split(".");
1118
+ return { coefficient: BigInt(l + d), digits: d.length };
1081
1119
  }), o = n[0].coefficient * n[1].coefficient, a = n[0].digits + n[1].digits;
1082
1120
  return A(`${o}e-${a}`);
1083
1121
  }
1084
- function Si(e) {
1122
+ function Fi(e) {
1085
1123
  try {
1086
1124
  return A(e) === e;
1087
1125
  } catch {
1088
1126
  return !1;
1089
1127
  }
1090
1128
  }
1091
- const ut = i.object({
1129
+ const ct = i.object({
1092
1130
  kind: i.literal("exact_number"),
1093
1131
  type: i.enum(["integer", "decimal"]),
1094
- value: i.string().max(D).refine(Si, "Expected canonical decimal text.")
1132
+ value: i.string().max(D).refine(Fi, "Expected canonical decimal text.")
1095
1133
  }).strict().superRefine((e, t) => {
1096
1134
  e.type === "integer" && e.value.includes(".") && t.addIssue({ code: "custom", path: ["value"], message: "An integer cannot have fractional digits." });
1097
1135
  }), q = i.union([
@@ -1099,16 +1137,16 @@ const ut = i.object({
1099
1137
  i.string(),
1100
1138
  i.boolean(),
1101
1139
  i.number().finite(),
1102
- ut
1140
+ ct
1103
1141
  ]);
1104
- function Ii(e, t) {
1105
- return ut.parse({ kind: "exact_number", type: t, value: A(e) });
1142
+ function Ri(e, t) {
1143
+ return ct.parse({ kind: "exact_number", type: t, value: A(e) });
1106
1144
  }
1107
1145
  function V(e) {
1108
1146
  return typeof e == "object" && e !== null && "kind" in e && e.kind === "exact_number" && "type" in e && (e.type === "integer" || e.type === "decimal") && "value" in e && typeof e.value == "string";
1109
1147
  }
1110
- function na(e) {
1111
- const t = _i(e.nativeDataType);
1148
+ function pa(e) {
1149
+ const t = ki(e.nativeDataType);
1112
1150
  if (!t) throw new TypeError("Numeric result type is not established.");
1113
1151
  if (e.value === null) return null;
1114
1152
  if (t === "float") {
@@ -1118,12 +1156,12 @@ function na(e) {
1118
1156
  }
1119
1157
  if (e.exactText === void 0)
1120
1158
  throw new TypeError("Exact numeric sidecar is required; rounded result values cannot substitute.");
1121
- return Ii(e.exactText, t);
1159
+ return Ri(e.exactText, t);
1122
1160
  }
1123
- const ve = i.string().uuid(), Se = i.enum(["rows", "columns"]), ki = i.enum(["member", "subtotal", "grand_total", "others"]), wi = i.discriminatedUnion("kind", [
1161
+ const Se = i.string().uuid(), Ie = i.enum(["rows", "columns"]), Ti = i.enum(["member", "subtotal", "grand_total", "others"]), Mi = i.discriminatedUnion("kind", [
1124
1162
  i.object({ kind: i.literal("value"), value: q }).strict(),
1125
- i.object({ kind: i.literal("others"), rankingId: ve }).strict()
1126
- ]), x = i.array(i.object({ levelId: ve, member: wi }).strict()).readonly().superRefine((e, t) => {
1163
+ i.object({ kind: i.literal("others"), rankingId: Se }).strict()
1164
+ ]), x = i.array(i.object({ levelId: Se, member: Mi }).strict()).readonly().superRefine((e, t) => {
1127
1165
  new Set(e.map((n) => n.levelId)).size !== e.length && t.addIssue({
1128
1166
  code: "custom",
1129
1167
  path: [],
@@ -1135,12 +1173,12 @@ const ve = i.string().uuid(), Se = i.enum(["rows", "columns"]), ki = i.enum(["me
1135
1173
  path: [],
1136
1174
  message: "Others is terminal."
1137
1175
  });
1138
- }), aa = i.object({
1176
+ }), ma = i.object({
1139
1177
  rowPath: x,
1140
1178
  columnPath: x,
1141
- measureId: ve
1179
+ measureId: Se
1142
1180
  }).strict();
1143
- function ct(e) {
1181
+ function pt(e) {
1144
1182
  return JSON.stringify(
1145
1183
  e.map(({ levelId: t, member: n }) => [
1146
1184
  t,
@@ -1148,11 +1186,11 @@ function ct(e) {
1148
1186
  ])
1149
1187
  );
1150
1188
  }
1151
- const se = "SEMAPHOR_CALCULATED_FIELD", Ai = "calculated_fields";
1152
- function oa(e) {
1189
+ const re = "SEMAPHOR_CALCULATED_FIELD", Di = "calculated_fields";
1190
+ function fa(e) {
1153
1191
  return (e == null ? void 0 : e.sourceField) || (e == null ? void 0 : e.name) || "";
1154
1192
  }
1155
- const xi = [
1193
+ const Ni = [
1156
1194
  // Day granularity formats
1157
1195
  "MM-DD-YYYY",
1158
1196
  "YYYY-MM-DD",
@@ -1187,34 +1225,34 @@ const xi = [
1187
1225
  // Custom format
1188
1226
  "custom"
1189
1227
  ];
1190
- function sa(e) {
1228
+ function ga(e) {
1191
1229
  return e.role === "metric" && "expression" in e && !!e.expression;
1192
1230
  }
1193
- function ra(e) {
1231
+ function ha(e) {
1194
1232
  return !!e.expression;
1195
1233
  }
1196
- function la(e) {
1234
+ function _a(e) {
1197
1235
  return !!e.expression;
1198
1236
  }
1199
- function da(e) {
1237
+ function ba(e) {
1200
1238
  var n, o;
1201
1239
  const t = e;
1202
1240
  return !!(t != null && t.expression && ((o = (n = t.calculatedFormula) == null ? void 0 : n.inputFields) != null && o.length));
1203
1241
  }
1204
- function ua(e) {
1205
- return !!(e && (e.entityName === se || e.entityId === se));
1242
+ function ya(e) {
1243
+ return !!(e && (e.entityName === re || e.entityId === re));
1206
1244
  }
1207
- function ca(e) {
1245
+ function va(e) {
1208
1246
  return e ? [e.entityName, e.entityId, e.qualifiedEntityName].some(
1209
- (t) => t === se || t === Ai
1247
+ (t) => t === re || t === Di
1210
1248
  ) : !1;
1211
1249
  }
1212
- var Fi = /* @__PURE__ */ ((e) => (e.SUBTOTAL = "__SUBTOTAL__", e.TOTAL = "__TOTAL__", e.ALL = "__ALL__", e))(Fi || {});
1213
- const [Ri, Ti, Mi, Di] = pe.options, Ni = i.union([
1214
- Ri.innerType().strict(),
1215
- Ti.extend({ type: i.literal("date") }).strict(),
1216
- Mi.strict(),
1217
- Di.strict(),
1250
+ var Ei = /* @__PURE__ */ ((e) => (e.SUBTOTAL = "__SUBTOTAL__", e.TOTAL = "__TOTAL__", e.ALL = "__ALL__", e))(Ei || {});
1251
+ const [ji, $i, Ci, Oi] = fe.options, Yi = i.union([
1252
+ ji.innerType().strict(),
1253
+ $i.extend({ type: i.literal("date") }).strict(),
1254
+ Ci.strict(),
1255
+ Oi.strict(),
1218
1256
  W
1219
1257
  ]), y = i.string().min(1), mt = i.enum([
1220
1258
  "table",
@@ -1279,17 +1317,17 @@ const [Ri, Ti, Mi, Di] = pe.options, Ni = i.union([
1279
1317
  entityType: mt,
1280
1318
  alias: i.string().optional(),
1281
1319
  sourceField: i.string().optional(),
1282
- source: _e.optional(),
1320
+ source: be.optional(),
1283
1321
  nativeDataType: i.string().optional(),
1284
1322
  description: i.string().optional(),
1285
1323
  qualifiedEntityName: i.string().optional(),
1286
- dateFormat: i.enum(xi).optional(),
1324
+ dateFormat: i.enum(Ni).optional(),
1287
1325
  customFormat: i.string().optional(),
1288
1326
  granularity: L.optional(),
1289
1327
  role: i.enum(["groupby", "metric", "sortby", "pivotby", "detail"]).optional(),
1290
1328
  expression: i.string().optional(),
1291
- derivedField: be.optional(),
1292
- format: Ni.optional(),
1329
+ derivedField: ye.optional(),
1330
+ format: Yi.optional(),
1293
1331
  semanticTemporalPresentation: i.object({
1294
1332
  granularity: L,
1295
1333
  format: W
@@ -1311,13 +1349,13 @@ const [Ri, Ti, Mi, Di] = pe.options, Ni = i.union([
1311
1349
  constant: i.number().finite().optional()
1312
1350
  }).strict().optional()
1313
1351
  }).strict()
1314
- ), ji = i.union([
1352
+ ), Pi = i.union([
1315
1353
  i.string(),
1316
1354
  i.number().finite(),
1317
1355
  i.boolean(),
1318
1356
  i.date(),
1319
1357
  i.null()
1320
- ]), Ei = i.object({
1358
+ ]), Bi = i.object({
1321
1359
  id: y,
1322
1360
  field: H,
1323
1361
  operator: i.enum([
@@ -1339,9 +1377,9 @@ const [Ri, Ti, Mi, Di] = pe.options, Ni = i.union([
1339
1377
  "isNull",
1340
1378
  "isNotNull"
1341
1379
  ]),
1342
- value: i.union([ji, i.array(i.string()), i.array(i.number().finite())]),
1380
+ value: i.union([Pi, i.array(i.string()), i.array(i.number().finite())]),
1343
1381
  label: i.string().optional(),
1344
- temporalBucket: oe.optional()
1382
+ temporalBucket: se.optional()
1345
1383
  }).strict().superRefine((e, t) => {
1346
1384
  const { operator: n, value: o } = e;
1347
1385
  (n === "between" || n === "not between") && (!Array.isArray(o) || o.length !== 2) && t.addIssue({
@@ -1353,15 +1391,15 @@ const [Ri, Ti, Mi, Di] = pe.options, Ni = i.union([
1353
1391
  path: ["value"],
1354
1392
  message: "Membership requires an array."
1355
1393
  });
1356
- }), pt = i.lazy(
1394
+ }), ft = i.lazy(
1357
1395
  () => i.object({
1358
1396
  id: y,
1359
1397
  logicalOperator: i.enum(["AND", "OR"]),
1360
1398
  negate: i.boolean(),
1361
- conditions: i.array(Ei),
1362
- groups: i.array(pt)
1399
+ conditions: i.array(Bi),
1400
+ groups: i.array(ft)
1363
1401
  }).strict()
1364
- ), $i = i.object({
1402
+ ), qi = i.object({
1365
1403
  baseEntity: ne,
1366
1404
  joins: i.array(
1367
1405
  i.object({
@@ -1390,14 +1428,14 @@ const [Ri, Ti, Mi, Di] = pe.options, Ni = i.union([
1390
1428
  ).min(1)
1391
1429
  }).strict()
1392
1430
  )
1393
- }).strict(), Ci = i.object({
1394
- axis: Se,
1431
+ }).strict(), Li = i.object({
1432
+ axis: Ie,
1395
1433
  levelId: i.string().uuid().optional(),
1396
1434
  // Persisted table preferences are edited through Immer; runtime paths remain readonly.
1397
1435
  oppositePath: x.transform((e) => [...e]).optional()
1398
- }).strict(), I = i.string().min(1), Yi = i.array(
1436
+ }).strict(), I = i.string().min(1), Ui = i.array(
1399
1437
  i.enum(["body", "header", "footer", "subtotal", "grandTotal"])
1400
- ), Pi = i.enum(["normal", "medium", "semibold", "bold"]), Oi = i.enum(["none", "underline", "line-through"]), ft = i.object({
1438
+ ), Vi = i.enum(["normal", "medium", "semibold", "bold"]), Hi = i.enum(["none", "underline", "line-through"]), gt = i.object({
1401
1439
  version: i.literal(1),
1402
1440
  rules: i.array(
1403
1441
  i.object({
@@ -1406,11 +1444,11 @@ const [Ri, Ti, Mi, Di] = pe.options, Ni = i.union([
1406
1444
  enabled: i.boolean().optional(),
1407
1445
  target: i.object({
1408
1446
  level: i.enum(["cell", "row"]),
1409
- matrix: Ci.optional(),
1447
+ matrix: Li.optional(),
1410
1448
  columnIds: i.array(I).optional(),
1411
1449
  conditionColumnId: I.optional(),
1412
1450
  applyToColumnIds: i.array(I).optional(),
1413
- tableParts: Yi.optional(),
1451
+ tableParts: Ui.optional(),
1414
1452
  rowRoles: i.array(i.string()).optional(),
1415
1453
  depth: i.number().int().nonnegative().optional(),
1416
1454
  includeTotals: i.boolean().optional(),
@@ -1474,64 +1512,64 @@ const [Ri, Ti, Mi, Di] = pe.options, Ni = i.union([
1474
1512
  style: i.object({
1475
1513
  backgroundColor: i.string().optional(),
1476
1514
  textColor: i.string().optional(),
1477
- fontWeight: Pi.optional(),
1515
+ fontWeight: Vi.optional(),
1478
1516
  italic: i.boolean().optional(),
1479
- textDecoration: Oi.optional(),
1517
+ textDecoration: Hi.optional(),
1480
1518
  icon: i.enum(["arrowUp", "arrowDown", "warning", "check", "x"]).optional(),
1481
1519
  dataBar: i.object({ color: i.string(), showValue: i.boolean() }).strict().optional()
1482
1520
  }).strict().optional()
1483
1521
  }).strict()
1484
1522
  )
1485
1523
  }).strict();
1486
- function ma(e, t) {
1487
- const n = (s) => {
1488
- if (V(s)) return s.value;
1489
- const l = typeof s == "string" ? yi(s.trim()) ?? re(s) : re(s);
1524
+ function Sa(e, t) {
1525
+ const n = (r) => {
1526
+ if (V(r)) return r.value;
1527
+ const l = typeof r == "string" ? Ai(r.trim()) ?? le(r) : le(r);
1490
1528
  if (l === null) return null;
1491
1529
  try {
1492
- return vi(String(l));
1530
+ return xi(String(l));
1493
1531
  } catch {
1494
1532
  return null;
1495
1533
  }
1496
1534
  }, o = n(e), a = n(t);
1497
- return o === null || a === null ? null : dt(o, a);
1535
+ return o === null || a === null ? null : ut(o, a);
1498
1536
  }
1499
- function pa(e, t, n) {
1500
- const o = Li(e);
1537
+ function Ia(e, t, n) {
1538
+ const o = Ki(e);
1501
1539
  if (o === null) return null;
1502
1540
  if (typeof o == "number" && typeof t == "number" && typeof n == "number") {
1503
- const _ = Ui(o, t, n);
1541
+ const _ = Qi(o, t, n);
1504
1542
  return { ratio: _, midpointComparison: Math.sign(_ - 0.5) };
1505
1543
  }
1506
1544
  if ([t, n].some((_) => typeof _ == "number" && !Number.isFinite(_))) return null;
1507
1545
  const a = [o, t, n].map((_) => {
1508
- const Dt = typeof _ == "number" ? A(String(_)) : _.value, [Nt, xe = ""] = Dt.split(".");
1509
- return { coefficient: Nt + xe, scale: xe.length };
1510
- }), s = Math.max(...a.map((_) => _.scale)), [l, u, c] = a.map(
1511
- (_) => BigInt(_.coefficient) * 10n ** BigInt(s - _.scale)
1512
- ), d = c - u, p = l - u;
1513
- if (d <= 0n)
1546
+ const Nt = typeof _ == "number" ? A(String(_)) : _.value, [Et, Fe = ""] = Nt.split(".");
1547
+ return { coefficient: Et + Fe, scale: Fe.length };
1548
+ }), r = Math.max(...a.map((_) => _.scale)), [l, d, c] = a.map(
1549
+ (_) => BigInt(_.coefficient) * 10n ** BigInt(r - _.scale)
1550
+ ), u = c - d, m = l - d;
1551
+ if (u <= 0n)
1514
1552
  return {
1515
1553
  ratio: l >= c ? 1 : 0,
1516
1554
  midpointComparison: l >= c ? 1 : -1
1517
1555
  };
1518
- const h = p * 2n - d, v = h < 0n ? -1 : h > 0n ? 1 : 0;
1519
- return { ratio: p <= 0n ? 0 : p >= d ? 1 : Number(p * 1000000000n / d) / 1e9, midpointComparison: v };
1556
+ const h = m * 2n - u, v = h < 0n ? -1 : h > 0n ? 1 : 0;
1557
+ return { ratio: m <= 0n ? 0 : m >= u ? 1 : Number(m * 1000000000n / u) / 1e9, midpointComparison: v };
1520
1558
  }
1521
- function fa(e) {
1559
+ function ka(e) {
1522
1560
  return !!e && typeof e == "object" && !Array.isArray(e);
1523
1561
  }
1524
- function ga(e) {
1562
+ function wa(e) {
1525
1563
  return e.enabled !== !1;
1526
1564
  }
1527
- function ha(e) {
1565
+ function Aa(e) {
1528
1566
  return e.kind === "topBottom" || e.kind === "colorScale" && e.range === "auto" || e.kind === "dataBar" && e.range === "auto";
1529
1567
  }
1530
- function Bi(e) {
1568
+ function Gi(e) {
1531
1569
  return e.columnId;
1532
1570
  }
1533
- function qi(e) {
1534
- const t = [Bi(e.condition)];
1571
+ function zi(e) {
1572
+ const t = [Gi(e.condition)];
1535
1573
  return { validationRefs: [.../* @__PURE__ */ new Set([
1536
1574
  ...t,
1537
1575
  ...e.target.conditionColumnId === void 0 ? [] : [e.target.conditionColumnId],
@@ -1539,7 +1577,7 @@ function qi(e) {
1539
1577
  ...e.target.applyToColumnIds ?? []
1540
1578
  ])], evaluationInputs: t };
1541
1579
  }
1542
- function re(e) {
1580
+ function le(e) {
1543
1581
  if (typeof e == "number")
1544
1582
  return Number.isFinite(e) ? e : null;
1545
1583
  if (typeof e == "string" && e.trim() !== "") {
@@ -1548,10 +1586,10 @@ function re(e) {
1548
1586
  }
1549
1587
  return null;
1550
1588
  }
1551
- function Li(e) {
1552
- return V(e) ? e : re(e);
1589
+ function Ki(e) {
1590
+ return V(e) ? e : le(e);
1553
1591
  }
1554
- function _a(e) {
1592
+ function xa(e) {
1555
1593
  const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
1556
1594
  for (const o of e)
1557
1595
  V(o) ? n.add(o.value) : t.add(o);
@@ -1559,19 +1597,19 @@ function _a(e) {
1559
1597
  has: (o) => V(o) ? n.has(o.value) : t.has(o)
1560
1598
  };
1561
1599
  }
1562
- function ba(e, t) {
1563
- return typeof e == "number" && typeof t == "number" ? Math.sign(e - t) : dt(
1600
+ function Fa(e, t) {
1601
+ return typeof e == "number" && typeof t == "number" ? Math.sign(e - t) : ut(
1564
1602
  typeof e == "number" ? A(String(e)) : e.value,
1565
1603
  typeof t == "number" ? A(String(t)) : t.value
1566
1604
  );
1567
1605
  }
1568
- function ya(e) {
1606
+ function Ra(e) {
1569
1607
  return e == null || e === "";
1570
1608
  }
1571
- function Ui(e, t, n) {
1609
+ function Qi(e, t, n) {
1572
1610
  return !Number.isFinite(e) || !Number.isFinite(t) || !Number.isFinite(n) ? 0 : n === t ? e >= n ? 1 : 0 : Math.max(0, Math.min(1, (e - t) / (n - t)));
1573
1611
  }
1574
- function Vi(e) {
1612
+ function Wi(e) {
1575
1613
  switch (e) {
1576
1614
  case "bold":
1577
1615
  return 700;
@@ -1585,91 +1623,91 @@ function Vi(e) {
1585
1623
  return;
1586
1624
  }
1587
1625
  }
1588
- function va(e) {
1589
- return e ? gt({
1590
- fontWeight: Vi(e.fontWeight),
1626
+ function Ta(e) {
1627
+ return e ? ht({
1628
+ fontWeight: Wi(e.fontWeight),
1591
1629
  fontStyle: e.italic ? "italic" : void 0,
1592
1630
  color: e.textColor,
1593
1631
  backgroundColor: e.backgroundColor,
1594
1632
  textDecoration: e.textDecoration
1595
1633
  }) : {};
1596
1634
  }
1597
- function Sa(...e) {
1635
+ function Ma(...e) {
1598
1636
  return Object.assign(
1599
1637
  {},
1600
- ...e.filter((t) => !!t).map(gt)
1638
+ ...e.filter((t) => !!t).map(ht)
1601
1639
  );
1602
1640
  }
1603
- function gt(e) {
1641
+ function ht(e) {
1604
1642
  return Object.fromEntries(
1605
1643
  Object.entries(e).filter(([, t]) => t !== void 0)
1606
1644
  );
1607
1645
  }
1608
- const S = i.string().uuid(), Hi = i.string().min(1), Gi = i.number().int().positive().max(Number.MAX_SAFE_INTEGER), zi = i.enum([
1646
+ const S = i.string().uuid(), Xi = i.string().min(1), Zi = i.number().int().positive().max(Number.MAX_SAFE_INTEGER), Ji = i.enum([
1609
1647
  "SUM",
1610
1648
  "COUNT",
1611
1649
  "DISTINCT",
1612
1650
  "AVG",
1613
1651
  "MIN",
1614
1652
  "MAX"
1615
- ]), ht = ci.omit({
1653
+ ]), _t = _i.omit({
1616
1654
  aggregate: !0
1617
- }), Ki = {
1655
+ }), en = {
1618
1656
  id: S,
1619
- field: ht,
1657
+ field: _t,
1620
1658
  grain: L.optional()
1621
- }, le = i.object(Ki).strict(), Qi = i.object({
1659
+ }, de = i.object(en).strict(), tn = i.object({
1622
1660
  id: S,
1623
1661
  kind: i.literal("aggregate"),
1624
- field: ht,
1625
- aggregate: zi
1626
- }).strict(), Wi = i.object({
1662
+ field: _t,
1663
+ aggregate: Ji
1664
+ }).strict(), nn = i.object({
1627
1665
  id: S,
1628
1666
  kind: i.literal("calculated"),
1629
- definition: be
1630
- }).strict(), _t = i.discriminatedUnion("kind", [Qi, Wi]), Xi = i.discriminatedUnion("kind", [
1667
+ definition: ye
1668
+ }).strict(), bt = i.discriminatedUnion("kind", [tn, nn]), an = i.discriminatedUnion("kind", [
1631
1669
  i.object({ kind: i.literal("member") }).strict(),
1632
1670
  i.object({
1633
1671
  kind: i.literal("measure"),
1634
1672
  measureId: S,
1635
1673
  oppositePath: x
1636
1674
  }).strict()
1637
- ]), bt = i.object({
1638
- axis: Se,
1675
+ ]), yt = i.object({
1676
+ axis: Ie,
1639
1677
  levelId: S,
1640
1678
  scope: i.discriminatedUnion("kind", [
1641
1679
  i.object({ kind: i.literal("level") }).strict(),
1642
1680
  i.object({ kind: i.literal("branch"), parent: x }).strict()
1643
1681
  ]),
1644
- target: Xi,
1682
+ target: an,
1645
1683
  direction: i.enum(["asc", "desc"]),
1646
1684
  nulls: i.enum(["first", "last"])
1647
- }).strict(), Zi = i.object({
1685
+ }).strict(), on = i.object({
1648
1686
  id: S,
1649
- axis: Se,
1687
+ axis: Ie,
1650
1688
  levelId: S,
1651
1689
  direction: i.enum(["top", "bottom"]),
1652
- count: Gi,
1690
+ count: Zi,
1653
1691
  measureId: S,
1654
1692
  oppositePath: x,
1655
1693
  others: i.boolean()
1656
- }).strict(), yt = i.object({
1657
- source: _e,
1658
- rows: i.array(le).min(1).readonly(),
1659
- columns: i.array(le).readonly(),
1660
- measures: i.array(_t).min(1).readonly(),
1661
- filters: pt.optional(),
1662
- joinPlan: $i.optional(),
1663
- relationshipHint: i.object({ relationshipIds: i.array(Hi).optional() }).strict().optional(),
1664
- sorts: i.array(bt).readonly(),
1665
- rankings: i.array(Zi).readonly()
1694
+ }).strict(), vt = i.object({
1695
+ source: be,
1696
+ rows: i.array(de).min(1).readonly(),
1697
+ columns: i.array(de).readonly(),
1698
+ measures: i.array(bt).min(1).readonly(),
1699
+ filters: ft.optional(),
1700
+ joinPlan: qi.optional(),
1701
+ relationshipHint: i.object({ relationshipIds: i.array(Xi).optional() }).strict().optional(),
1702
+ sorts: i.array(yt).readonly(),
1703
+ rankings: i.array(on).readonly()
1666
1704
  }).strict();
1667
- function vt(e) {
1705
+ function St(e) {
1668
1706
  return JSON.stringify([
1669
1707
  e.axis,
1670
1708
  e.levelId,
1671
1709
  e.scope.kind,
1672
- e.scope.kind === "branch" ? ct(e.scope.parent) : null
1710
+ e.scope.kind === "branch" ? pt(e.scope.parent) : null
1673
1711
  ]);
1674
1712
  }
1675
1713
  function g(e, t, n) {
@@ -1678,38 +1716,38 @@ function g(e, t, n) {
1678
1716
  function w(e, t, n) {
1679
1717
  new Set(e).size !== e.length && g(t, n, "Duplicate identity.");
1680
1718
  }
1681
- function $(e, t, n, o, a, s = !1) {
1682
- n.length > e[t].length && g(o, a, "Path exceeds axis depth."), n.forEach((l, u) => {
1719
+ function $(e, t, n, o, a, r = !1) {
1720
+ n.length > e[t].length && g(o, a, "Path exceeds axis depth."), n.forEach((l, d) => {
1683
1721
  var c;
1684
- if (l.levelId !== ((c = e[t][u]) == null ? void 0 : c.id) && g(o, [...a, u], "Path must be an ordered axis prefix."), l.member.kind === "others") {
1685
- const d = l.member.rankingId;
1686
- (s || u !== n.length - 1 || !e.rankings.some(
1687
- (p) => p.id === d && p.others && p.axis === t && p.levelId === l.levelId
1722
+ if (l.levelId !== ((c = e[t][d]) == null ? void 0 : c.id) && g(o, [...a, d], "Path must be an ordered axis prefix."), l.member.kind === "others") {
1723
+ const u = l.member.rankingId;
1724
+ (r || d !== n.length - 1 || !e.rankings.some(
1725
+ (m) => m.id === u && m.others && m.axis === t && m.levelId === l.levelId
1688
1726
  )) && g(
1689
1727
  o,
1690
- [...a, u],
1728
+ [...a, d],
1691
1729
  "Others must terminate a path at its enabled ranking and cannot be a sort/rank target."
1692
1730
  );
1693
1731
  }
1694
1732
  });
1695
1733
  }
1696
- function St(e, t, n, o) {
1697
- w(t.map(vt), n, o), t.forEach((a, s) => {
1698
- const l = [...o, s], u = e[a.axis].findIndex((c) => c.id === a.levelId);
1699
- if (u < 0 && g(n, l, "Sort level is not on its axis."), a.scope.kind === "branch" && ($(
1734
+ function It(e, t, n, o) {
1735
+ w(t.map(St), n, o), t.forEach((a, r) => {
1736
+ const l = [...o, r], d = e[a.axis].findIndex((c) => c.id === a.levelId);
1737
+ if (d < 0 && g(n, l, "Sort level is not on its axis."), a.scope.kind === "branch" && ($(
1700
1738
  e,
1701
1739
  a.axis,
1702
1740
  a.scope.parent,
1703
1741
  n,
1704
1742
  [...l, "scope", "parent"],
1705
1743
  !0
1706
- ), a.scope.parent.length !== u && g(
1744
+ ), a.scope.parent.length !== d && g(
1707
1745
  n,
1708
1746
  l,
1709
1747
  "Branch sort must name the immediate parent of its level."
1710
1748
  )), a.target.kind === "measure") {
1711
1749
  const c = a.target.measureId;
1712
- e.measures.some((d) => d.id === c) || g(n, l, "Unknown sort measure."), $(
1750
+ e.measures.some((u) => u.id === c) || g(n, l, "Unknown sort measure."), $(
1713
1751
  e,
1714
1752
  a.axis === "rows" ? "columns" : "rows",
1715
1753
  a.target.oppositePath,
@@ -1732,7 +1770,7 @@ function ae(e, t, n) {
1732
1770
  (o) => o.aggregate === "MEDIAN" || o.field.aggregate === "MEDIAN"
1733
1771
  )) && g(t, n, "MEDIAN dependencies are not supported at launch."), (e.aggregationBehavior === "snapshot" || e.aggregationBehavior === "weighted" || e.aggregationStrategy === "weighted") && g(t, n, "This measure semantic requires a later capability.");
1734
1772
  }
1735
- function It(e, t) {
1773
+ function kt(e, t) {
1736
1774
  w(
1737
1775
  [...e.rows, ...e.columns, ...e.measures].map((a) => a.id),
1738
1776
  t,
@@ -1747,8 +1785,8 @@ function It(e, t) {
1747
1785
  ["rankings"]
1748
1786
  );
1749
1787
  for (const a of ["rows", "columns"])
1750
- e[a].forEach((s, l) => {
1751
- s.grain && s.field.dataType !== void 0 && !["date", "datetime", "unknown"].includes(s.field.dataType) && g(t, [a, l, "grain"], "Grain requires a temporal field.");
1788
+ e[a].forEach((r, l) => {
1789
+ r.grain && r.field.dataType !== void 0 && !["date", "datetime", "unknown"].includes(r.field.dataType) && g(t, [a, l, "grain"], "Grain requires a temporal field.");
1752
1790
  });
1753
1791
  const n = [
1754
1792
  ...e.rows,
@@ -1766,8 +1804,8 @@ function It(e, t) {
1766
1804
  [a.id],
1767
1805
  "Aggregate-stage calculations cannot be grouped or wrapped in an aggregate."
1768
1806
  ), ae(a.field.derivedField, t, [a.id]);
1769
- for (const s of Object.values(a.field.derivedField.inputs))
1770
- B(s.field.source, e.source, t, [a.id, "inputs"]);
1807
+ for (const r of Object.values(a.field.derivedField.inputs))
1808
+ B(r.field.source, e.source, t, [a.id, "inputs"]);
1771
1809
  }
1772
1810
  for (const a of e.measures)
1773
1811
  if (a.kind === "calculated") {
@@ -1776,66 +1814,66 @@ function It(e, t) {
1776
1814
  [a.id],
1777
1815
  "Calculated measures require aggregate stage and measure role."
1778
1816
  ), ae(a.definition, t, [a.id]);
1779
- for (const s of Object.values(a.definition.inputs))
1780
- B(s.field.source, e.source, t, [
1817
+ for (const r of Object.values(a.definition.inputs))
1818
+ B(r.field.source, e.source, t, [
1781
1819
  a.id,
1782
1820
  "inputs"
1783
1821
  ]);
1784
1822
  }
1785
1823
  const o = (a) => {
1786
- const s = (l, u) => {
1787
- var c, d;
1788
- if ((l.aggregate || ((c = l.derivedField) == null ? void 0 : c.computeStage) === "aggregate") && g(t, u, "Aggregate/HAVING filters are not supported."), l.derivedField) {
1789
- ae(l.derivedField, t, u);
1790
- for (const p of Object.values(l.derivedField.inputs))
1791
- B(p.field.source, e.source, t, u);
1824
+ const r = (l, d) => {
1825
+ var c, u;
1826
+ if ((l.aggregate || ((c = l.derivedField) == null ? void 0 : c.computeStage) === "aggregate") && g(t, d, "Aggregate/HAVING filters are not supported."), l.derivedField) {
1827
+ ae(l.derivedField, t, d);
1828
+ for (const m of Object.values(l.derivedField.inputs))
1829
+ B(m.field.source, e.source, t, d);
1792
1830
  }
1793
- for (const p of ((d = l.calculatedFormula) == null ? void 0 : d.inputFields) ?? [])
1794
- s(p, u);
1831
+ for (const m of ((u = l.calculatedFormula) == null ? void 0 : u.inputFields) ?? [])
1832
+ r(m, d);
1795
1833
  };
1796
1834
  for (const l of a.conditions)
1797
- s(l.field, ["filters", l.id]);
1835
+ r(l.field, ["filters", l.id]);
1798
1836
  a.groups.forEach(o);
1799
1837
  };
1800
1838
  if (e.filters && o(e.filters), e.joinPlan) {
1801
1839
  const a = [
1802
1840
  e.joinPlan.baseEntity,
1803
- ...e.joinPlan.joins.flatMap((s) => [s.source, s.target])
1841
+ ...e.joinPlan.joins.flatMap((r) => [r.source, r.target])
1804
1842
  ];
1805
- (new Set(a.map((s) => s.connectionId)).size > 1 || e.source.kind === "physical" && a[0].connectionId !== e.source.connectionId) && g(t, ["joinPlan"], "Joins must stay within the source connection."), w(
1806
- e.joinPlan.joins.map((s) => s.id),
1843
+ (new Set(a.map((r) => r.connectionId)).size > 1 || e.source.kind === "physical" && a[0].connectionId !== e.source.connectionId) && g(t, ["joinPlan"], "Joins must stay within the source connection."), w(
1844
+ e.joinPlan.joins.map((r) => r.id),
1807
1845
  t,
1808
1846
  ["joinPlan", "joins"]
1809
1847
  );
1810
1848
  }
1811
- St(e, e.sorts, t, ["sorts"]), e.rankings.forEach((a, s) => {
1812
- (!e[a.axis].some((l) => l.id === a.levelId) || !e.measures.some((l) => l.id === a.measureId)) && g(t, ["rankings", s], "Unknown ranking level or measure."), $(
1849
+ It(e, e.sorts, t, ["sorts"]), e.rankings.forEach((a, r) => {
1850
+ (!e[a.axis].some((l) => l.id === a.levelId) || !e.measures.some((l) => l.id === a.measureId)) && g(t, ["rankings", r], "Unknown ranking level or measure."), $(
1813
1851
  e,
1814
1852
  a.axis === "rows" ? "columns" : "rows",
1815
1853
  a.oppositePath,
1816
1854
  t,
1817
- ["rankings", s, "oppositePath"],
1855
+ ["rankings", r, "oppositePath"],
1818
1856
  !0
1819
1857
  );
1820
1858
  });
1821
1859
  }
1822
- const P = yt.superRefine(It), Ji = yt.extend({
1823
- rows: i.array(le).readonly(),
1824
- measures: i.array(_t).readonly()
1825
- }), en = Ji.superRefine(It), tn = P.innerType().extend({ kind: i.literal("matrix") }), nn = tn.superRefine(({ kind: e, ...t }, n) => {
1826
- const o = P.safeParse(t);
1860
+ const Y = vt.superRefine(kt), sn = vt.extend({
1861
+ rows: i.array(de).readonly(),
1862
+ measures: i.array(bt).readonly()
1863
+ }), rn = sn.superRefine(kt), ln = Y.innerType().extend({ kind: i.literal("matrix") }), dn = ln.superRefine(({ kind: e, ...t }, n) => {
1864
+ const o = Y.safeParse(t);
1827
1865
  o.success || o.error.issues.forEach((a) => n.addIssue(a));
1828
- }), Ne = i.object({
1866
+ }), je = i.object({
1829
1867
  visible: i.boolean(),
1830
1868
  position: i.enum(["before", "after"]),
1831
1869
  label: i.string().optional()
1832
- }).strict(), je = i.object({
1833
- grand: Ne,
1834
- levels: i.record(S, Ne).readonly()
1835
- }).strict(), Ee = ft.shape.rules.element, an = ft.extend({
1836
- rules: i.array(Ee.extend({
1837
- target: Ee.shape.target.extend({
1838
- rowRoles: i.array(ki).optional()
1870
+ }).strict(), $e = i.object({
1871
+ grand: je,
1872
+ levels: i.record(S, je).readonly()
1873
+ }).strict(), Ce = gt.shape.rules.element, un = gt.extend({
1874
+ rules: i.array(Ce.extend({
1875
+ target: Ce.shape.target.extend({
1876
+ rowRoles: i.array(Ti).optional()
1839
1877
  })
1840
1878
  }))
1841
1879
  }).superRefine((e, t) => {
@@ -1862,13 +1900,13 @@ const P = yt.superRefine(It), Ji = yt.extend({
1862
1900
  );
1863
1901
  }
1864
1902
  });
1865
- function on(e, t, n, o, a = []) {
1866
- for (const s of e.rules) {
1867
- const l = [...a, "rules", s.id], u = s.target.matrix;
1868
- u && (u.levelId !== void 0 && !t[u.axis].some((c) => c.id === u.levelId) && g(o, [...l, "target", "matrix", "levelId"], "Conditional-format level is not on the selected axis."), u.oppositePath !== void 0 && $(t, u.axis === "rows" ? "columns" : "rows", u.oppositePath, o, [...l, "target", "matrix", "oppositePath"])), qi(s).validationRefs.some((c) => !n.has(c)) && g(o, l, "Conditional rules must reference displayed measures.");
1903
+ function cn(e, t, n, o, a = []) {
1904
+ for (const r of e.rules) {
1905
+ const l = [...a, "rules", r.id], d = r.target.matrix;
1906
+ d && (d.levelId !== void 0 && !t[d.axis].some((c) => c.id === d.levelId) && g(o, [...l, "target", "matrix", "levelId"], "Conditional-format level is not on the selected axis."), d.oppositePath !== void 0 && $(t, d.axis === "rows" ? "columns" : "rows", d.oppositePath, o, [...l, "target", "matrix", "oppositePath"])), zi(r).validationRefs.some((c) => !n.has(c)) && g(o, l, "Conditional rules must reference displayed measures.");
1869
1907
  }
1870
1908
  }
1871
- const sn = {
1909
+ const pn = {
1872
1910
  layout: i.discriminatedUnion("kind", [
1873
1911
  i.object({ kind: i.literal("compact") }).strict(),
1874
1912
  i.object({ kind: i.literal("tabular"), repeatLabels: i.boolean() }).strict()
@@ -1876,99 +1914,99 @@ const sn = {
1876
1914
  absence: i.object({ emptyText: i.string(), nullText: i.string() }).strict(),
1877
1915
  levelLabels: i.record(S, i.string()).readonly(),
1878
1916
  measureLabels: i.record(S, i.string()).readonly(),
1879
- levelFormats: i.record(S, Re).readonly(),
1880
- measureFormats: i.record(S, Re).readonly(),
1881
- totals: i.object({ rows: je, columns: je }).strict(),
1882
- conditionalFormatting: an.optional()
1883
- }, Ie = i.object(sn).strict(), rn = i.object({
1917
+ levelFormats: i.record(S, Me).readonly(),
1918
+ measureFormats: i.record(S, Me).readonly(),
1919
+ totals: i.object({ rows: $e, columns: $e }).strict(),
1920
+ conditionalFormatting: un.optional()
1921
+ }, ke = i.object(pn).strict(), mn = i.object({
1884
1922
  depth: i.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
1885
1923
  overrides: i.array(
1886
1924
  i.object({ path: x, expanded: i.boolean() }).strict()
1887
1925
  ).readonly()
1888
- }).strict(), $e = rn.superRefine(
1926
+ }).strict(), Oe = mn.superRefine(
1889
1927
  (e, t) => w(
1890
- e.overrides.map((n) => ct(n.path)),
1928
+ e.overrides.map((n) => pt(n.path)),
1891
1929
  t,
1892
1930
  ["overrides"]
1893
1931
  )
1894
- ), ln = { rows: $e, columns: $e }, Z = i.object(ln).strict(), dn = Z.extend({ sorts: i.array(bt).readonly() }).strict(), un = dn.superRefine(
1895
- (e, t) => w(e.sorts.map(vt), t, ["sorts"])
1932
+ ), fn = { rows: Oe, columns: Oe }, Z = i.object(fn).strict(), gn = Z.extend({ sorts: i.array(yt).readonly() }).strict(), hn = gn.superRefine(
1933
+ (e, t) => w(e.sorts.map(St), t, ["sorts"])
1896
1934
  );
1897
1935
  function J(e, t) {
1898
1936
  var c;
1899
- const { spec: n, presentation: o, defaults: a, session: s } = e, l = new Set([...n.rows, ...n.columns].map((d) => d.id)), u = new Set(n.measures.map((d) => d.id));
1900
- for (const d of [
1937
+ const { spec: n, presentation: o, defaults: a, session: r } = e, l = new Set([...n.rows, ...n.columns].map((u) => u.id)), d = new Set(n.measures.map((u) => u.id));
1938
+ for (const u of [
1901
1939
  "levelLabels",
1902
1940
  "levelFormats",
1903
1941
  "measureLabels",
1904
1942
  "measureFormats"
1905
1943
  ]) {
1906
- const p = d.startsWith("level") ? l : u;
1907
- for (const h of Object.keys(o[d]))
1908
- p.has(h) || g(
1944
+ const m = u.startsWith("level") ? l : d;
1945
+ for (const h of Object.keys(o[u]))
1946
+ m.has(h) || g(
1909
1947
  t,
1910
- ["presentation", d, h],
1948
+ ["presentation", u, h],
1911
1949
  "Unknown presentation reference."
1912
1950
  );
1913
1951
  }
1914
- for (const [d, p] of Object.entries(o.measureFormats))
1915
- p.type === "temporal_bucket" && g(
1952
+ for (const [u, m] of Object.entries(o.measureFormats))
1953
+ m.type === "temporal_bucket" && g(
1916
1954
  t,
1917
- ["presentation", "measureFormats", d],
1955
+ ["presentation", "measureFormats", u],
1918
1956
  "Measures cannot own temporal bucket formats."
1919
1957
  );
1920
- for (const [d, p] of Object.entries(o.levelFormats))
1921
- p.type === "temporal_bucket" && !((c = [...n.rows, ...n.columns].find((h) => h.id === d)) != null && c.grain) && g(
1958
+ for (const [u, m] of Object.entries(o.levelFormats))
1959
+ m.type === "temporal_bucket" && !((c = [...n.rows, ...n.columns].find((h) => h.id === u)) != null && c.grain) && g(
1922
1960
  t,
1923
- ["presentation", "levelFormats", d],
1961
+ ["presentation", "levelFormats", u],
1924
1962
  "Temporal bucket formats require a grain."
1925
1963
  );
1926
- for (const d of ["rows", "columns"]) {
1927
- const p = Object.keys(o.totals[d].levels);
1928
- (p.length !== n[d].length || p.some((h) => !n[d].some((v) => v.id === h))) && g(
1964
+ for (const u of ["rows", "columns"]) {
1965
+ const m = Object.keys(o.totals[u].levels);
1966
+ (m.length !== n[u].length || m.some((h) => !n[u].some((v) => v.id === h))) && g(
1929
1967
  t,
1930
- ["presentation", "totals", d],
1968
+ ["presentation", "totals", u],
1931
1969
  "Subtotal map must contain exactly the current axis levels."
1932
1970
  );
1933
- for (const h of [a, ...s ? [s] : []])
1934
- for (const v of h[d].overrides)
1971
+ for (const h of [a, ...r ? [r] : []])
1972
+ for (const v of h[u].overrides)
1935
1973
  $(
1936
1974
  n,
1937
- d,
1975
+ u,
1938
1976
  v.path,
1939
1977
  t,
1940
- [d, "overrides"],
1978
+ [u, "overrides"],
1941
1979
  !0
1942
1980
  ), v.path.length || g(
1943
1981
  t,
1944
- [d, "overrides"],
1982
+ [u, "overrides"],
1945
1983
  "Use depth to expand/collapse the root."
1946
1984
  );
1947
1985
  }
1948
- s && St(n, s.sorts, t, ["session", "sorts"]), o.conditionalFormatting && on(
1986
+ r && It(n, r.sorts, t, ["session", "sorts"]), o.conditionalFormatting && cn(
1949
1987
  o.conditionalFormatting,
1950
1988
  n,
1951
- u,
1989
+ d,
1952
1990
  t,
1953
1991
  ["presentation", "conditionalFormatting"]
1954
1992
  );
1955
1993
  }
1956
- const cn = i.object({
1957
- spec: P,
1958
- presentation: Ie,
1994
+ const _n = i.object({
1995
+ spec: Y,
1996
+ presentation: ke,
1959
1997
  defaults: Z,
1960
- session: un.optional()
1961
- }).strict(), Ia = cn.superRefine(J), mn = i.object({
1998
+ session: hn.optional()
1999
+ }).strict(), Da = _n.superRefine(J), bn = i.object({
1962
2000
  version: i.literal(1),
1963
- spec: P,
1964
- presentation: Ie,
2001
+ spec: Y,
2002
+ presentation: ke,
1965
2003
  defaultView: Z
1966
- }).strict(), pn = mn.superRefine(
2004
+ }).strict(), yn = bn.superRefine(
1967
2005
  (e, t) => J({ ...e, defaults: e.defaultView }, t)
1968
- ), fn = pn.innerType().extend({
1969
- spec: en
1970
- }), ka = fn.superRefine((e, t) => J({ ...e, defaults: e.defaultView }, t)), Ce = i.object({ spec: P, presentation: Ie }).strict(), gn = i.union([
1971
- Ce.extend({
2006
+ ), vn = yn.innerType().extend({
2007
+ spec: rn
2008
+ }), Na = vn.superRefine((e, t) => J({ ...e, defaults: e.defaultView }, t)), Ye = i.object({ spec: Y, presentation: ke }).strict(), Sn = i.union([
2009
+ Ye.extend({
1972
2010
  mode: i.literal("layout"),
1973
2011
  format: i.enum(["csv", "xlsx", "pdf"]),
1974
2012
  expansion: i.union([
@@ -1976,8 +2014,8 @@ const cn = i.object({
1976
2014
  i.object({ kind: i.literal("all") }).strict()
1977
2015
  ])
1978
2016
  }).strict(),
1979
- Ce.extend({ mode: i.literal("flat"), format: i.literal("csv") }).strict()
1980
- ]), wa = gn.superRefine(
2017
+ Ye.extend({ mode: i.literal("flat"), format: i.literal("csv") }).strict()
2018
+ ]), Ea = Sn.superRefine(
1981
2019
  (e, t) => J(
1982
2020
  {
1983
2021
  ...e,
@@ -1989,17 +2027,17 @@ const cn = i.object({
1989
2027
  t
1990
2028
  )
1991
2029
  );
1992
- function Aa(e) {
2030
+ function ja(e) {
1993
2031
  return e && "id" in e ? e.id : void 0;
1994
2032
  }
1995
- const hn = "SUM";
2033
+ const In = "SUM";
1996
2034
  function k(e) {
1997
2035
  return typeof e == "string" && e.trim().length > 0;
1998
2036
  }
1999
2037
  function N(e) {
2000
2038
  return k(e) ? e.trim().toLowerCase() : "";
2001
2039
  }
2002
- function xa(e) {
2040
+ function $a(e) {
2003
2041
  const t = k(e.id) ? e.id.trim() : void 0;
2004
2042
  if (!t) return;
2005
2043
  const n = N(t), o = k(e.table) ? e.table.trim() : void 0;
@@ -2011,7 +2049,7 @@ function T(e) {
2011
2049
  if (t)
2012
2050
  return N(t) === N(e.datasetName) ? void 0 : t;
2013
2051
  }
2014
- function kt(e) {
2052
+ function wt(e) {
2015
2053
  if (e.kind !== "semantic") return e;
2016
2054
  const t = T(e), { datasetId: n, ...o } = e;
2017
2055
  return {
@@ -2019,10 +2057,10 @@ function kt(e) {
2019
2057
  ...t ? { datasetId: t } : {}
2020
2058
  };
2021
2059
  }
2022
- function Fa(e) {
2060
+ function Ca(e) {
2023
2061
  return e ? e.kind === "semantic" ? !!(k(e.domainId) && (k(e.datasetId) || k(e.datasetName))) : e.kind === "physical" ? k(e.connectionId) && k(e.tableName) : k(e.connectionId) : !1;
2024
2062
  }
2025
- function de(e) {
2063
+ function ue(e) {
2026
2064
  if (!e)
2027
2065
  return "";
2028
2066
  if (e.kind === "semantic") {
@@ -2046,7 +2084,7 @@ function de(e) {
2046
2084
  e.label || ""
2047
2085
  ].join(":");
2048
2086
  }
2049
- function ke(e, t) {
2087
+ function we(e, t) {
2050
2088
  if (!e || !t)
2051
2089
  return e === t;
2052
2090
  if (e.kind !== t.kind)
@@ -2057,10 +2095,10 @@ function ke(e, t) {
2057
2095
  const n = T(e), o = T(t);
2058
2096
  return n && o ? n === o : e.datasetName === t.datasetName;
2059
2097
  }
2060
- return de(e) === de(t);
2098
+ return ue(e) === ue(t);
2061
2099
  }
2062
- function wt(e, t) {
2063
- return e.kind !== "semantic" || t.kind !== "semantic" ? e : kt({
2100
+ function At(e, t) {
2101
+ return e.kind !== "semantic" || t.kind !== "semantic" ? e : wt({
2064
2102
  ...e,
2065
2103
  datasetName: e.datasetName || t.datasetName,
2066
2104
  datasetId: T(e) || T(t),
@@ -2068,79 +2106,79 @@ function wt(e, t) {
2068
2106
  connectionId: e.connectionId || t.connectionId
2069
2107
  });
2070
2108
  }
2071
- function Ra(e) {
2109
+ function Oa(e) {
2072
2110
  const t = [];
2073
2111
  for (const n of e) {
2074
- const o = kt(
2112
+ const o = wt(
2075
2113
  n
2076
2114
  ), a = t.findIndex(
2077
- (s) => ke(s, o)
2115
+ (r) => we(r, o)
2078
2116
  );
2079
2117
  if (a === -1) {
2080
2118
  t.push(o);
2081
2119
  continue;
2082
2120
  }
2083
- t[a] = wt(
2121
+ t[a] = At(
2084
2122
  t[a],
2085
2123
  o
2086
2124
  );
2087
2125
  }
2088
2126
  return t;
2089
2127
  }
2090
- function _n(e, t) {
2091
- return e.name === t.name && ke(e.source, t.source);
2128
+ function kn(e, t) {
2129
+ return e.name === t.name && we(e.source, t.source);
2092
2130
  }
2093
- function Ta(e) {
2131
+ function Ya(e) {
2094
2132
  return [
2095
- e.source ? de(e.source) : "unknown",
2096
- At(e),
2133
+ e.source ? ue(e.source) : "unknown",
2134
+ xt(e),
2097
2135
  e.name
2098
2136
  ].filter(Boolean).join(":");
2099
2137
  }
2100
- function At(e) {
2101
- return bn(
2102
- e.aggregate || hn
2138
+ function xt(e) {
2139
+ return wn(
2140
+ e.aggregate || In
2103
2141
  );
2104
2142
  }
2105
- function bn(e) {
2143
+ function wn(e) {
2106
2144
  return e.trim().toUpperCase();
2107
2145
  }
2108
- function Ma(e, t) {
2146
+ function Pa(e, t) {
2109
2147
  return {
2110
2148
  ...e,
2111
2149
  label: e.label || t.label,
2112
2150
  role: e.role || t.role,
2113
2151
  dataType: e.dataType || t.dataType,
2114
- source: e.source && t.source ? wt(e.source, t.source) : e.source || t.source
2152
+ source: e.source && t.source ? At(e.source, t.source) : e.source || t.source
2115
2153
  };
2116
2154
  }
2117
- function yn(e) {
2155
+ function An(e) {
2118
2156
  for (let t = 0; t < e.length; t += 1) {
2119
2157
  const n = e[t];
2120
2158
  if (e.some(
2121
- (o, a) => a !== t && Ft(o, n)
2159
+ (o, a) => a !== t && Rt(o, n)
2122
2160
  ))
2123
2161
  return !1;
2124
2162
  }
2125
2163
  return !0;
2126
2164
  }
2127
- function xt(e, t) {
2128
- return _n(e, t);
2129
- }
2130
2165
  function Ft(e, t) {
2131
- return xt(e, t) && C(e) === C(t);
2166
+ return kn(e, t);
2167
+ }
2168
+ function Rt(e, t) {
2169
+ return Ft(e, t) && C(e) === C(t);
2132
2170
  }
2133
- function vn(e) {
2171
+ function xn(e) {
2134
2172
  return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${C(e)}). Use different aggregates to request both, or remove one entry.`;
2135
2173
  }
2136
- function Ye(e) {
2174
+ function Pe(e) {
2137
2175
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
2138
2176
  }
2139
- function Sn(e, t, n) {
2177
+ function Fn(e, t, n) {
2140
2178
  if (e !== void 0) {
2141
2179
  if (!e || typeof e != "object" || Array.isArray(e)) {
2142
2180
  n.push(
2143
- r(
2181
+ s(
2144
2182
  "invalid_sql_default_parameters",
2145
2183
  "SQL defaultParameters must be an object keyed by parameter name.",
2146
2184
  t
@@ -2151,7 +2189,7 @@ function Sn(e, t, n) {
2151
2189
  Object.entries(e).forEach(([o, a]) => {
2152
2190
  if (!o.trim()) {
2153
2191
  n.push(
2154
- r(
2192
+ s(
2155
2193
  "invalid_sql_default_parameter_name",
2156
2194
  "SQL defaultParameters names must be non-empty strings.",
2157
2195
  `${t}.${o}`
@@ -2159,8 +2197,8 @@ function Sn(e, t, n) {
2159
2197
  );
2160
2198
  return;
2161
2199
  }
2162
- (Array.isArray(a) ? a.every(Ye) : Ye(a)) || n.push(
2163
- r(
2200
+ (Array.isArray(a) ? a.every(Pe) : Pe(a)) || n.push(
2201
+ s(
2164
2202
  "invalid_sql_default_parameter_value",
2165
2203
  "SQL defaultParameters values must be strings, numbers, booleans, nulls, or arrays of those scalar values.",
2166
2204
  `${t}.${o}`
@@ -2169,72 +2207,72 @@ function Sn(e, t, n) {
2169
2207
  });
2170
2208
  }
2171
2209
  }
2172
- function In(e, t) {
2173
- return we(e, t).length === 1;
2210
+ function Rn(e, t) {
2211
+ return Ae(e, t).length === 1;
2174
2212
  }
2175
- function kn(e, t) {
2176
- return we(e, t).length === 1;
2213
+ function Tn(e, t) {
2214
+ return Ae(e, t).length === 1;
2177
2215
  }
2178
- function we(e, t) {
2216
+ function Ae(e, t) {
2179
2217
  return t.filter(
2180
- (o) => wn(e, o)
2218
+ (o) => Mn(e, o)
2181
2219
  );
2182
2220
  }
2183
- function wn(e, t) {
2184
- return An(e, t) ? e.source ? xt(t, e) : !0 : !1;
2221
+ function Mn(e, t) {
2222
+ return Dn(e, t) ? e.source ? Ft(t, e) : !0 : !1;
2185
2223
  }
2186
- function An(e, t) {
2187
- return !(t.name !== e.name || e.role !== void 0 && t.role !== void 0 && t.role !== e.role || xn(e, t) && C(t) !== C(e));
2224
+ function Dn(e, t) {
2225
+ return !(t.name !== e.name || e.role !== void 0 && t.role !== void 0 && t.role !== e.role || Nn(e, t) && C(t) !== C(e));
2188
2226
  }
2189
- function xn(e, t) {
2227
+ function Nn(e, t) {
2190
2228
  return e.role === "measure" || t.role === "measure" || e.aggregate !== void 0 || t.aggregate !== void 0;
2191
2229
  }
2192
2230
  function C(e) {
2193
- return At(e);
2231
+ return xt(e);
2194
2232
  }
2195
- const Fn = /^(\d{4})-(\d{2})-(\d{2})$/, Rt = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:\d{2})$/;
2196
- function ue(e) {
2233
+ const En = /^(\d{4})-(\d{2})-(\d{2})$/, Tt = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:\d{2})$/;
2234
+ function ce(e) {
2197
2235
  if (typeof e != "string")
2198
2236
  return null;
2199
- const t = e.trim(), n = Fn.exec(t);
2237
+ const t = e.trim(), n = En.exec(t);
2200
2238
  if (n) {
2201
2239
  const [, v, R, _] = n;
2202
- return Pe(v, R, _) ? new Date(Date.UTC(Number(v), Number(R) - 1, Number(_))) : null;
2240
+ return Be(v, R, _) ? new Date(Date.UTC(Number(v), Number(R) - 1, Number(_))) : null;
2203
2241
  }
2204
- const o = Rt.exec(t);
2242
+ const o = Tt.exec(t);
2205
2243
  if (!o)
2206
2244
  return null;
2207
- const [, a, s, l, u, c, d = "00", , p] = o;
2208
- if (!Pe(a, s, l) || !j(u, 0, 23) || !j(c, 0, 59) || !j(d, 0, 59) || !Rn(p))
2245
+ const [, a, r, l, d, c, u = "00", , m] = o;
2246
+ if (!Be(a, r, l) || !E(d, 0, 23) || !E(c, 0, 59) || !E(u, 0, 59) || !jn(m))
2209
2247
  return null;
2210
2248
  const h = new Date(t);
2211
2249
  return Number.isFinite(h.getTime()) ? h : null;
2212
2250
  }
2213
- function Da(e) {
2214
- return typeof e != "string" || !Rt.test(e.trim()) ? null : ue(e);
2251
+ function Ba(e) {
2252
+ return typeof e != "string" || !Tt.test(e.trim()) ? null : ce(e);
2215
2253
  }
2216
- function Pe(e, t, n) {
2217
- const o = Number(e), a = Number(t), s = Number(n);
2218
- if (!Number.isInteger(o) || !Number.isInteger(a) || !Number.isInteger(s) || a < 1 || a > 12)
2254
+ function Be(e, t, n) {
2255
+ const o = Number(e), a = Number(t), r = Number(n);
2256
+ if (!Number.isInteger(o) || !Number.isInteger(a) || !Number.isInteger(r) || a < 1 || a > 12)
2219
2257
  return !1;
2220
- const l = new Date(Date.UTC(o, a - 1, s));
2221
- return l.getUTCFullYear() === o && l.getUTCMonth() === a - 1 && l.getUTCDate() === s;
2258
+ const l = new Date(Date.UTC(o, a - 1, r));
2259
+ return l.getUTCFullYear() === o && l.getUTCMonth() === a - 1 && l.getUTCDate() === r;
2222
2260
  }
2223
- function j(e, t, n) {
2261
+ function E(e, t, n) {
2224
2262
  const o = Number(e);
2225
2263
  return Number.isInteger(o) && o >= t && o <= n;
2226
2264
  }
2227
- function Rn(e) {
2265
+ function jn(e) {
2228
2266
  if (e === "Z")
2229
2267
  return !0;
2230
2268
  const t = /^([+-])(\d{2}):(\d{2})$/.exec(e);
2231
- return !!(t && j(t[2], 0, 23) && j(t[3], 0, 59));
2269
+ return !!(t && E(t[2], 0, 23) && E(t[3], 0, 59));
2232
2270
  }
2233
- function Oe(e, t, n) {
2271
+ function qe(e, t, n) {
2234
2272
  if (e !== void 0) {
2235
2273
  if (!f(e)) {
2236
2274
  n.push(
2237
- r(
2275
+ s(
2238
2276
  "invalid_pagination",
2239
2277
  "Pagination must be an object with positive integer page and pageSize.",
2240
2278
  t
@@ -2243,13 +2281,13 @@ function Oe(e, t, n) {
2243
2281
  return;
2244
2282
  }
2245
2283
  (!Number.isInteger(e.page) || typeof e.page != "number" || e.page < 1) && n.push(
2246
- r(
2284
+ s(
2247
2285
  "invalid_pagination_page",
2248
2286
  "Pagination page must be a positive integer.",
2249
2287
  `${t}.page`
2250
2288
  )
2251
2289
  ), (!Number.isInteger(e.pageSize) || typeof e.pageSize != "number" || e.pageSize < 1) && n.push(
2252
- r(
2290
+ s(
2253
2291
  "invalid_pagination_page_size",
2254
2292
  "Pagination pageSize must be a positive integer.",
2255
2293
  `${t}.pageSize`
@@ -2257,7 +2295,7 @@ function Oe(e, t, n) {
2257
2295
  );
2258
2296
  }
2259
2297
  }
2260
- function Be(e) {
2298
+ function Le(e) {
2261
2299
  const t = /* @__PURE__ */ new Set();
2262
2300
  for (const n of e) {
2263
2301
  if (t.has(n))
@@ -2266,10 +2304,10 @@ function Be(e) {
2266
2304
  }
2267
2305
  return null;
2268
2306
  }
2269
- function Tn(e, t, n) {
2307
+ function $n(e, t, n) {
2270
2308
  if (!f(e)) {
2271
2309
  n.push(
2272
- r(
2310
+ s(
2273
2311
  "invalid_input_binding",
2274
2312
  "Input bindings must be structured objects.",
2275
2313
  t
@@ -2277,28 +2315,28 @@ function Tn(e, t, n) {
2277
2315
  );
2278
2316
  return;
2279
2317
  }
2280
- m(e.inputId) || n.push(
2281
- r(
2318
+ p(e.inputId) || n.push(
2319
+ s(
2282
2320
  "invalid_input_binding",
2283
2321
  "Input bindings need a non-empty inputId.",
2284
2322
  `${t}.inputId`
2285
2323
  )
2286
2324
  ), e.kind !== void 0 && e.kind !== "filter" && e.kind !== "control" && n.push(
2287
- r(
2325
+ s(
2288
2326
  "invalid_input_binding",
2289
2327
  "Input binding kind must be filter or control.",
2290
2328
  `${t}.kind`
2291
2329
  )
2292
- ), e.field !== void 0 && b(e.field, `${t}.field`, n), e.relationshipHint !== void 0 && Ae(
2330
+ ), e.field !== void 0 && b(e.field, `${t}.field`, n), e.relationshipHint !== void 0 && xe(
2293
2331
  e.relationshipHint,
2294
2332
  `${t}.relationshipHint`,
2295
2333
  n
2296
2334
  );
2297
2335
  }
2298
- function Ae(e, t, n) {
2336
+ function xe(e, t, n) {
2299
2337
  if (!f(e)) {
2300
2338
  n.push(
2301
- r(
2339
+ s(
2302
2340
  "invalid_relationship_hint",
2303
2341
  "Relationship hints must be structured objects.",
2304
2342
  t
@@ -2306,50 +2344,62 @@ function Ae(e, t, n) {
2306
2344
  );
2307
2345
  return;
2308
2346
  }
2309
- e.relationshipIds !== void 0 && (!Array.isArray(e.relationshipIds) || e.relationshipIds.some((o) => !m(o))) && n.push(
2310
- r(
2347
+ e.relationshipIds !== void 0 && (!Array.isArray(e.relationshipIds) || e.relationshipIds.some((o) => !p(o))) && n.push(
2348
+ s(
2311
2349
  "invalid_relationship_hint",
2312
2350
  "Relationship hint relationshipIds must be non-empty strings.",
2313
2351
  `${t}.relationshipIds`
2314
2352
  )
2315
2353
  );
2316
2354
  }
2317
- function Mn(e, t) {
2355
+ function Cn(e, t) {
2318
2356
  var o, a;
2319
2357
  if (((o = e.source) == null ? void 0 : o.kind) !== "semantic" && ((a = e.source) == null ? void 0 : a.kind) !== "physical" && t.push(
2320
- r(
2358
+ s(
2321
2359
  "invalid_input_options_source",
2322
2360
  "Input options must use a semantic or physical source.",
2323
2361
  "source"
2324
2362
  )
2325
- ), m(e.inputId) || t.push(
2326
- r(
2363
+ ), p(e.inputId) || t.push(
2364
+ s(
2327
2365
  "missing_input_options_input_id",
2328
2366
  "Input options intent needs the inputId it populates.",
2329
2367
  "inputId"
2330
2368
  )
2331
2369
  ), e.search !== void 0 && typeof e.search != "string" && t.push(
2332
- r(
2370
+ s(
2333
2371
  "invalid_input_options_search",
2334
2372
  "Input options search must be a string.",
2335
2373
  "search"
2336
2374
  )
2337
- ), e.limit !== void 0 && (typeof e.limit != "number" || !Number.isFinite(e.limit) || !Number.isInteger(e.limit) || e.limit <= 0) && t.push(
2338
- r(
2375
+ ), e.matchValues !== void 0) {
2376
+ const r = Yt(e.matchValues);
2377
+ r.ok || t.push(
2378
+ s("invalid_input_options_match_values", r.error, "matchValues")
2379
+ ), typeof e.search == "string" && e.search.trim() && t.push(
2380
+ s(
2381
+ "invalid_input_options_match_values",
2382
+ "Input options matchValues cannot be combined with search.",
2383
+ "matchValues"
2384
+ )
2385
+ );
2386
+ }
2387
+ if (e.limit !== void 0 && (typeof e.limit != "number" || !Number.isFinite(e.limit) || !Number.isInteger(e.limit) || e.limit <= 0) && t.push(
2388
+ s(
2339
2389
  "invalid_input_options_limit",
2340
2390
  "Input options limit must be a positive finite number.",
2341
2391
  "limit"
2342
2392
  )
2343
- ), (!e.labelField || !m(e.labelField.name)) && t.push(
2344
- r(
2393
+ ), (!e.labelField || !p(e.labelField.name)) && t.push(
2394
+ s(
2345
2395
  "missing_input_options_label_field",
2346
2396
  "Input options intent needs a labelField.",
2347
2397
  "labelField"
2348
2398
  )
2349
2399
  ), b(e.labelField, "labelField", t, {
2350
2400
  required: !0
2351
- }), (!e.valueField || !m(e.valueField.name)) && t.push(
2352
- r(
2401
+ }), (!e.valueField || !p(e.valueField.name)) && t.push(
2402
+ s(
2353
2403
  "missing_input_options_value_field",
2354
2404
  "Input options intent needs a valueField.",
2355
2405
  "valueField"
@@ -2358,12 +2408,12 @@ function Mn(e, t) {
2358
2408
  required: !0
2359
2409
  }), e.searchField !== void 0 && b(e.searchField, "searchField", t, {
2360
2410
  required: !0
2361
- }), e.disambiguationFields !== void 0 && (Array.isArray(e.disambiguationFields) ? e.disambiguationFields.forEach((s, l) => {
2362
- b(s, `disambiguationFields.${l}`, t, {
2411
+ }), e.disambiguationFields !== void 0 && (Array.isArray(e.disambiguationFields) ? e.disambiguationFields.forEach((r, l) => {
2412
+ b(r, `disambiguationFields.${l}`, t, {
2363
2413
  required: !0
2364
2414
  });
2365
2415
  }) : t.push(
2366
- r(
2416
+ s(
2367
2417
  "invalid_input_options_disambiguation_fields",
2368
2418
  "Input options disambiguationFields must be an array of field refs.",
2369
2419
  "disambiguationFields"
@@ -2372,96 +2422,71 @@ function Mn(e, t) {
2372
2422
  { field: e.labelField, path: "labelField" },
2373
2423
  { field: e.valueField, path: "valueField" },
2374
2424
  ...e.searchField ? [{ field: e.searchField, path: "searchField" }] : [],
2375
- ...Array.isArray(e.disambiguationFields) ? e.disambiguationFields.map((s, l) => ({
2376
- field: s,
2425
+ ...Array.isArray(e.disambiguationFields) ? e.disambiguationFields.map((r, l) => ({
2426
+ field: r,
2377
2427
  path: `disambiguationFields.${l}`
2378
2428
  })) : []
2379
- ].forEach(({ field: s, path: l }) => {
2380
- s != null && s.source && !ke(s.source, e.source) && t.push(
2381
- r(
2429
+ ].forEach(({ field: r, path: l }) => {
2430
+ r != null && r.source && !we(r.source, e.source) && t.push(
2431
+ s(
2382
2432
  "input_options_field_source_mismatch",
2383
2433
  "Input option fields must belong to the declared option source.",
2384
2434
  `${l}.source`
2385
2435
  )
2386
2436
  );
2387
2437
  }), e.dependencies !== void 0) {
2388
- const s = e.dependencies;
2389
- if (!f(s))
2390
- t.push(
2391
- r(
2392
- "invalid_input_options_dependencies",
2393
- "Input options dependencies must be a structured object.",
2394
- "dependencies"
2395
- )
2396
- );
2397
- else {
2398
- const l = s.mode;
2399
- l !== void 0 && l !== "independent" && l !== "explicit" && t.push(
2400
- r(
2401
- "invalid_input_options_dependencies",
2402
- "Input options dependencies mode must be independent or explicit.",
2403
- "dependencies.mode"
2404
- )
2405
- ), qe(
2406
- s.includeInputIds,
2407
- "dependencies.includeInputIds",
2408
- t,
2409
- "Input options includeInputIds must be non-empty strings."
2410
- ), qe(
2411
- s.excludeInputIds,
2412
- "dependencies.excludeInputIds",
2413
- t,
2414
- "Input options excludeInputIds must be non-empty strings."
2415
- ), Nn(e, t);
2416
- }
2438
+ const r = Yn(
2439
+ e.dependencies
2440
+ );
2441
+ t.push(...r.errors), r.ok && Bn(e, t);
2417
2442
  }
2418
2443
  if (e.population !== void 0) {
2419
- const s = e.population;
2420
- if (!f(s))
2444
+ const r = e.population;
2445
+ if (!f(r))
2421
2446
  t.push(
2422
- r(
2447
+ s(
2423
2448
  "invalid_input_options_population",
2424
2449
  "Input options population must be a structured object.",
2425
2450
  "population"
2426
2451
  )
2427
2452
  );
2428
2453
  else {
2429
- const l = s.kind;
2454
+ const l = r.kind;
2430
2455
  l !== "option_source" && l !== "related_population" && t.push(
2431
- r(
2456
+ s(
2432
2457
  "invalid_input_options_population",
2433
2458
  "Input options population kind must be option_source or related_population.",
2434
2459
  "population.kind"
2435
2460
  )
2436
- ), l === "option_source" && s.baseSource !== void 0 && t.push(
2437
- r(
2461
+ ), l === "option_source" && r.baseSource !== void 0 && t.push(
2462
+ s(
2438
2463
  "invalid_input_options_population",
2439
2464
  "Input options population baseSource is only valid for related_population.",
2440
2465
  "population.baseSource"
2441
2466
  )
2442
- ), l === "option_source" && s.relationshipHint !== void 0 && t.push(
2443
- r(
2467
+ ), l === "option_source" && r.relationshipHint !== void 0 && t.push(
2468
+ s(
2444
2469
  "invalid_input_options_population",
2445
2470
  "Input options population relationshipHint is only valid for related_population.",
2446
2471
  "population.relationshipHint"
2447
2472
  )
2448
- ), l === "related_population" && (ge(
2449
- s.baseSource,
2473
+ ), l === "related_population" && (he(
2474
+ r.baseSource,
2450
2475
  "population.baseSource",
2451
2476
  t
2452
- ), s.relationshipHint !== void 0 && Ae(
2453
- s.relationshipHint,
2477
+ ), r.relationshipHint !== void 0 && xe(
2478
+ r.relationshipHint,
2454
2479
  "population.relationshipHint",
2455
2480
  t
2456
2481
  ));
2457
2482
  }
2458
2483
  }
2459
2484
  }
2460
- function Dn(e, t) {
2485
+ function On(e, t) {
2461
2486
  if (!(!("inputs" in e) || e.inputs === void 0)) {
2462
2487
  if (!Array.isArray(e.inputs)) {
2463
2488
  t.push(
2464
- r(
2489
+ s(
2465
2490
  "invalid_input_binding",
2466
2491
  "Analytics intent inputs must be an array of input bindings.",
2467
2492
  "inputs"
@@ -2470,40 +2495,126 @@ function Dn(e, t) {
2470
2495
  return;
2471
2496
  }
2472
2497
  e.inputs.forEach(
2473
- (n, o) => Tn(n, `inputs.${o}`, t)
2498
+ (n, o) => $n(n, `inputs.${o}`, t)
2474
2499
  );
2475
2500
  }
2476
2501
  }
2477
- function Nn(e, t) {
2478
- var o, a;
2479
- const n = new Set(
2480
- Array.isArray(e.inputs) ? e.inputs.map((s) => f(s) ? s.inputId : void 0).filter((s) => typeof s == "string") : []
2502
+ function Yn(e, t = "protocol") {
2503
+ const n = [];
2504
+ if (!f(e))
2505
+ return n.push(
2506
+ s(
2507
+ "invalid_input_options_dependencies",
2508
+ "Input options dependencies must be a structured object.",
2509
+ "dependencies"
2510
+ )
2511
+ ), { ok: !1, errors: n, warnings: [] };
2512
+ const o = e, a = o.mode;
2513
+ if (a !== void 0 && a !== "independent" && a !== "explicit" && a !== "all_applicable" && n.push(
2514
+ s(
2515
+ "invalid_input_options_dependencies",
2516
+ "Input options dependencies mode must be independent, explicit, or all_applicable.",
2517
+ "dependencies.mode"
2518
+ )
2519
+ ), oe(
2520
+ o.includeInputIds,
2521
+ "dependencies.includeInputIds",
2522
+ n,
2523
+ "Input options includeInputIds must be non-empty strings."
2524
+ ), oe(
2525
+ o.excludeInputIds,
2526
+ "dependencies.excludeInputIds",
2527
+ n,
2528
+ "Input options excludeInputIds must be non-empty strings."
2529
+ ), a === "all_applicable" && o.includeInputIds !== void 0 && n.push(
2530
+ s(
2531
+ "invalid_input_options_dependencies",
2532
+ "All applicable dependencies cannot specify includeInputIds.",
2533
+ "dependencies.includeInputIds"
2534
+ )
2535
+ ), oe(
2536
+ o.omitInputIds,
2537
+ "dependencies.omitInputIds",
2538
+ n,
2539
+ "Input options omitInputIds must be non-empty strings."
2540
+ ), Array.isArray(o.omitInputIds)) {
2541
+ const r = new Set(
2542
+ Array.isArray(o.includeInputIds) ? o.includeInputIds : []
2543
+ );
2544
+ (a !== "explicit" || new Set(o.omitInputIds).size !== o.omitInputIds.length || o.omitInputIds.some((l) => !r.has(l))) && n.push(
2545
+ s(
2546
+ "invalid_input_options_dependencies",
2547
+ "A browse override may only omit unique ids from an explicit includeInputIds list.",
2548
+ "dependencies.omitInputIds"
2549
+ )
2550
+ );
2551
+ }
2552
+ return t === "dashboard" && Pn(o, n), { ok: n.length === 0, errors: n, warnings: [] };
2553
+ }
2554
+ function Pn(e, t) {
2555
+ const { mode: n, includeInputIds: o, excludeInputIds: a } = e;
2556
+ n === void 0 && t.push(
2557
+ s(
2558
+ "invalid_input_options_dependencies",
2559
+ "Dashboard option dependencies must declare a mode.",
2560
+ "dependencies.mode"
2561
+ )
2562
+ );
2563
+ for (const [r, l] of [
2564
+ ["dependencies.includeInputIds", o],
2565
+ ["dependencies.excludeInputIds", a]
2566
+ ])
2567
+ Array.isArray(l) && new Set(l).size !== l.length && t.push(
2568
+ s(
2569
+ "invalid_input_options_dependencies",
2570
+ "Dashboard option dependency input IDs must be unique.",
2571
+ r
2572
+ )
2573
+ );
2574
+ n === "independent" && (o !== void 0 || a !== void 0) && t.push(
2575
+ s(
2576
+ "invalid_input_options_dependencies",
2577
+ "Independent dashboard dependencies cannot specify input IDs.",
2578
+ "dependencies"
2579
+ )
2580
+ ), n === "explicit" && (!Array.isArray(o) || o.length === 0 || a !== void 0) && t.push(
2581
+ s(
2582
+ "invalid_input_options_dependencies",
2583
+ "Explicit dashboard dependencies require included input IDs and cannot specify exclusions.",
2584
+ "dependencies"
2585
+ )
2481
2586
  );
2482
- for (const s of ((o = e.dependencies) == null ? void 0 : o.includeInputIds) || [])
2483
- n.has(s) || t.push(
2484
- r(
2587
+ }
2588
+ function Bn(e, t) {
2589
+ var a, r, l;
2590
+ const n = new Set(
2591
+ Array.isArray(e.inputs) ? e.inputs.map((d) => f(d) ? d.inputId : void 0).filter((d) => typeof d == "string") : []
2592
+ ), o = new Set(((a = e.dependencies) == null ? void 0 : a.omitInputIds) || []);
2593
+ for (const d of ((r = e.dependencies) == null ? void 0 : r.includeInputIds) || [])
2594
+ !n.has(d) && !o.has(d) && t.push(
2595
+ s(
2485
2596
  "invalid_input_options_dependencies",
2486
- `Input options dependency "${s}" is not declared in inputs.`,
2597
+ `Input options dependency "${d}" is not declared in inputs.`,
2487
2598
  "dependencies.includeInputIds"
2488
2599
  )
2489
2600
  );
2490
- for (const s of ((a = e.dependencies) == null ? void 0 : a.excludeInputIds) || [])
2491
- s !== e.inputId && !n.has(s) && t.push(
2492
- r(
2601
+ for (const d of ((l = e.dependencies) == null ? void 0 : l.excludeInputIds) || [])
2602
+ d !== e.inputId && !n.has(d) && t.push(
2603
+ s(
2493
2604
  "invalid_input_options_dependencies",
2494
- `Input options dependency exclusion "${s}" is not the populated inputId and is not declared in inputs.`,
2605
+ `Input options dependency exclusion "${d}" is not the populated inputId and is not declared in inputs.`,
2495
2606
  "dependencies.excludeInputIds"
2496
2607
  )
2497
2608
  );
2498
2609
  }
2499
- function qe(e, t, n, o) {
2500
- e !== void 0 && (!Array.isArray(e) || e.some((a) => !m(a))) && n.push(r("invalid_input_options_dependencies", o, t));
2610
+ function oe(e, t, n, o) {
2611
+ e !== void 0 && (!Array.isArray(e) || e.some((a) => !p(a))) && n.push(s("invalid_input_options_dependencies", o, t));
2501
2612
  }
2502
- const jn = new Set(G);
2503
- function En(e, t, n) {
2613
+ const qn = new Set(G);
2614
+ function Ln(e, t, n) {
2504
2615
  if (f(e) && e.type === "temporal_bucket") {
2505
2616
  n.push(
2506
- r(
2617
+ s(
2507
2618
  "invalid_scalar_value_format",
2508
2619
  "Scalar and measure slots cannot own temporal bucket presentation; declare it with grain on a grouped field or axis.",
2509
2620
  t
@@ -2511,12 +2622,12 @@ function En(e, t, n) {
2511
2622
  );
2512
2623
  return;
2513
2624
  }
2514
- Ze(e, t, n);
2625
+ Je(e, t, n);
2515
2626
  }
2516
- function Le(e, t, n) {
2627
+ function Ue(e, t, n) {
2517
2628
  if (!f(e)) {
2518
2629
  n.push(
2519
- r(
2630
+ s(
2520
2631
  "invalid_result_column_ref",
2521
2632
  "Result calculation references must use columnKey or field.",
2522
2633
  t
@@ -2524,10 +2635,10 @@ function Le(e, t, n) {
2524
2635
  );
2525
2636
  return;
2526
2637
  }
2527
- const o = m(e.columnKey), a = f(e.field);
2638
+ const o = p(e.columnKey), a = f(e.field);
2528
2639
  if (o === a) {
2529
2640
  n.push(
2530
- r(
2641
+ s(
2531
2642
  "invalid_result_column_ref",
2532
2643
  "Result calculation references must identify exactly one of columnKey or field.",
2533
2644
  t
@@ -2539,10 +2650,10 @@ function Le(e, t, n) {
2539
2650
  required: !0
2540
2651
  });
2541
2652
  }
2542
- function $n(e, t, n) {
2653
+ function Un(e, t, n) {
2543
2654
  if (!f(e)) {
2544
2655
  n.push(
2545
- r(
2656
+ s(
2546
2657
  "invalid_result_calculation_output",
2547
2658
  "Result calculation output must be a structured object.",
2548
2659
  t
@@ -2550,26 +2661,26 @@ function $n(e, t, n) {
2550
2661
  );
2551
2662
  return;
2552
2663
  }
2553
- m(e.key) || n.push(
2554
- r(
2664
+ p(e.key) || n.push(
2665
+ s(
2555
2666
  "invalid_result_calculation_output",
2556
2667
  "Result calculation output needs a stable key.",
2557
2668
  `${t}.key`
2558
2669
  )
2559
- ), e.dataType !== void 0 && (typeof e.dataType != "string" || !Xe.has(e.dataType)) && n.push(
2560
- r(
2670
+ ), e.dataType !== void 0 && (typeof e.dataType != "string" || !Ze.has(e.dataType)) && n.push(
2671
+ s(
2561
2672
  "invalid_result_calculation_output",
2562
2673
  "Result calculation output dataType must be string, number, boolean, date, datetime, or unknown.",
2563
2674
  `${t}.dataType`
2564
2675
  )
2565
- ), En(e.format, `${t}.format`, n);
2676
+ ), Ln(e.format, `${t}.format`, n);
2566
2677
  }
2567
- function Cn(e, t) {
2678
+ function Vn(e, t) {
2568
2679
  if (e.analysis === void 0)
2569
2680
  return;
2570
2681
  if (!f(e.analysis)) {
2571
2682
  t.push(
2572
- r(
2683
+ s(
2573
2684
  "invalid_measure_analysis",
2574
2685
  "Metric analysis must be a structured object.",
2575
2686
  "analysis"
@@ -2579,7 +2690,7 @@ function Cn(e, t) {
2579
2690
  }
2580
2691
  if (e.analysis.kind !== "period_change") {
2581
2692
  t.push(
2582
- r(
2693
+ s(
2583
2694
  "invalid_measure_analysis",
2584
2695
  "Metric analysis kind is not supported.",
2585
2696
  "analysis.kind"
@@ -2588,31 +2699,31 @@ function Cn(e, t) {
2588
2699
  return;
2589
2700
  }
2590
2701
  e.dateField || t.push(
2591
- r(
2702
+ s(
2592
2703
  "missing_analysis_date_field",
2593
2704
  "Period-change analysis needs a dateField.",
2594
2705
  "dateField"
2595
2706
  )
2596
2707
  ), e.timeGrain || t.push(
2597
- r(
2708
+ s(
2598
2709
  "missing_analysis_time_grain",
2599
2710
  "Period-change analysis needs a timeGrain.",
2600
2711
  "timeGrain"
2601
2712
  )
2602
2713
  ), e.analysis.orderBy !== void 0 && e.analysis.orderBy !== "absolute_change" && e.analysis.orderBy !== "positive_change" && e.analysis.orderBy !== "negative_change" && e.analysis.orderBy !== "period" && t.push(
2603
- r(
2714
+ s(
2604
2715
  "invalid_measure_analysis",
2605
2716
  "Period-change analysis orderBy must be absolute_change, positive_change, negative_change, or period.",
2606
2717
  "analysis.orderBy"
2607
2718
  )
2608
2719
  );
2609
2720
  const { timeWindow: n } = e.analysis;
2610
- n !== void 0 && ce(n, "analysis.timeWindow", t);
2721
+ n !== void 0 && pe(n, "analysis.timeWindow", t);
2611
2722
  }
2612
- function ce(e, t, n) {
2723
+ function pe(e, t, n) {
2613
2724
  if (!f(e)) {
2614
2725
  n.push(
2615
- r(
2726
+ s(
2616
2727
  "invalid_time_window",
2617
2728
  "Time window must be a structured object.",
2618
2729
  t
@@ -2621,40 +2732,40 @@ function ce(e, t, n) {
2621
2732
  return;
2622
2733
  }
2623
2734
  if (e.kind !== void 0 && e.kind !== "relative" && e.kind !== "absolute" && n.push(
2624
- r(
2735
+ s(
2625
2736
  "invalid_time_window",
2626
2737
  "Time window kind must be relative or absolute.",
2627
2738
  `${t}.kind`
2628
2739
  )
2629
2740
  ), e.kind === "absolute") {
2630
- if (m(e.start) || n.push(
2631
- r(
2741
+ if (p(e.start) || n.push(
2742
+ s(
2632
2743
  "invalid_time_window",
2633
2744
  "Absolute time window start must be a non-empty ISO date or timestamp string.",
2634
2745
  `${t}.start`
2635
2746
  )
2636
- ), m(e.end) || n.push(
2637
- r(
2747
+ ), p(e.end) || n.push(
2748
+ s(
2638
2749
  "invalid_time_window",
2639
2750
  "Absolute time window end must be a non-empty ISO date or timestamp string.",
2640
2751
  `${t}.end`
2641
2752
  )
2642
- ), m(e.start) && m(e.end)) {
2643
- const o = ue(e.start), a = ue(e.end);
2753
+ ), p(e.start) && p(e.end)) {
2754
+ const o = ce(e.start), a = ce(e.end);
2644
2755
  o || n.push(
2645
- r(
2756
+ s(
2646
2757
  "invalid_time_window",
2647
2758
  "Absolute time window start must be a valid ISO date or timestamp.",
2648
2759
  `${t}.start`
2649
2760
  )
2650
2761
  ), a || n.push(
2651
- r(
2762
+ s(
2652
2763
  "invalid_time_window",
2653
2764
  "Absolute time window end must be a valid ISO date or timestamp.",
2654
2765
  `${t}.end`
2655
2766
  )
2656
2767
  ), o && a && o.getTime() > a.getTime() && n.push(
2657
- r(
2768
+ s(
2658
2769
  "invalid_time_window",
2659
2770
  "Absolute time window start must be before or equal to end.",
2660
2771
  t
@@ -2663,26 +2774,26 @@ function ce(e, t, n) {
2663
2774
  }
2664
2775
  return;
2665
2776
  }
2666
- (typeof e.unit != "string" || !jn.has(e.unit)) && n.push(
2667
- r(
2777
+ (typeof e.unit != "string" || !qn.has(e.unit)) && n.push(
2778
+ s(
2668
2779
  "invalid_time_window",
2669
2780
  `Time window unit must be one of: ${G.join(", ")}.`,
2670
2781
  `${t}.unit`
2671
2782
  )
2672
2783
  ), (typeof e.value != "number" || !Number.isFinite(e.value) || e.value <= 0) && n.push(
2673
- r(
2784
+ s(
2674
2785
  "invalid_time_window",
2675
2786
  "Time window value must be a positive number.",
2676
2787
  `${t}.value`
2677
2788
  )
2678
2789
  ), e.anchor !== void 0 && e.anchor !== "now" && e.anchor !== "latest_available" && n.push(
2679
- r(
2790
+ s(
2680
2791
  "invalid_time_window",
2681
2792
  "Time window anchor must be now or latest_available.",
2682
2793
  `${t}.anchor`
2683
2794
  )
2684
2795
  ), e.completeness !== void 0 && e.completeness !== "include_partial" && e.completeness !== "complete_periods" && n.push(
2685
- r(
2796
+ s(
2686
2797
  "invalid_time_window",
2687
2798
  "Time window completeness must be include_partial or complete_periods.",
2688
2799
  `${t}.completeness`
@@ -2693,7 +2804,7 @@ function me(e, t, n) {
2693
2804
  if (e !== void 0) {
2694
2805
  if (!Array.isArray(e)) {
2695
2806
  n.push(
2696
- r(
2807
+ s(
2697
2808
  "invalid_analytics_filters",
2698
2809
  "Analytics filters must be an array.",
2699
2810
  t
@@ -2703,117 +2814,117 @@ function me(e, t, n) {
2703
2814
  }
2704
2815
  e.forEach((o, a) => {
2705
2816
  var c;
2706
- const s = `${t}.${a}`;
2817
+ const r = `${t}.${a}`;
2707
2818
  if (!f(o)) {
2708
2819
  n.push(
2709
- r(
2820
+ s(
2710
2821
  "invalid_analytics_filter",
2711
2822
  "Analytics filter must be a structured object.",
2712
- s
2823
+ r
2713
2824
  )
2714
2825
  );
2715
2826
  return;
2716
2827
  }
2717
2828
  const l = o;
2718
- b(l.field, `${s}.field`, n, {
2829
+ b(l.field, `${r}.field`, n, {
2719
2830
  required: !0
2720
2831
  }), l.scope !== void 0 && l.scope !== "row" && l.scope !== "aggregate" && n.push(
2721
- r(
2832
+ s(
2722
2833
  "invalid_analytics_filter_scope",
2723
2834
  "Analytics filter scope must be row or aggregate.",
2724
- `${s}.scope`
2835
+ `${r}.scope`
2725
2836
  )
2726
2837
  ), l.scope === "aggregate" && ((c = l.field) == null ? void 0 : c.role) !== void 0 && l.field.role !== "measure" && n.push(
2727
- r(
2838
+ s(
2728
2839
  "invalid_analytics_filter_scope",
2729
2840
  "Aggregate-scope analytics filters must target a measure field.",
2730
- `${s}.scope`
2841
+ `${r}.scope`
2731
2842
  )
2732
2843
  );
2733
- const u = l.operator === "is_null" || l.operator === "is_not_null";
2844
+ const d = l.operator === "is_null" || l.operator === "is_not_null";
2734
2845
  if (l.operator !== void 0 && l.operator !== "=" && l.operator !== "!=" && l.operator !== "in" && l.operator !== "not_in" && l.operator !== "contains" && l.operator !== "not_contains" && l.operator !== "between" && l.operator !== "not_between" && l.operator !== ">" && l.operator !== ">=" && l.operator !== "<" && l.operator !== "<=" && l.operator !== "is_null" && l.operator !== "is_not_null" && n.push(
2735
- r(
2846
+ s(
2736
2847
  "invalid_analytics_filter_operator",
2737
2848
  "Analytics filter operator is not supported.",
2738
- `${s}.operator`
2849
+ `${r}.operator`
2739
2850
  )
2740
- ), l.values === void 0 && !u && n.push(
2741
- r(
2851
+ ), l.values === void 0 && !d && n.push(
2852
+ s(
2742
2853
  "missing_analytics_filter_value",
2743
2854
  "Analytics filter needs values unless it is a null check.",
2744
- s
2855
+ r
2745
2856
  )
2746
- ), u && l.values !== void 0) {
2857
+ ), d && l.values !== void 0) {
2747
2858
  n.push(
2748
- r(
2859
+ s(
2749
2860
  "invalid_analytics_filter_values",
2750
2861
  "Null-check analytics filters must not include values.",
2751
- `${s}.values`
2862
+ `${r}.values`
2752
2863
  )
2753
2864
  );
2754
2865
  return;
2755
2866
  }
2756
2867
  if (l.values !== void 0 && !Array.isArray(l.values)) {
2757
2868
  n.push(
2758
- r(
2869
+ s(
2759
2870
  "invalid_analytics_filter_values",
2760
2871
  "Analytics filter values must be an array when provided.",
2761
- `${s}.values`
2872
+ `${r}.values`
2762
2873
  )
2763
2874
  );
2764
2875
  return;
2765
2876
  }
2766
2877
  if (l.values !== void 0) {
2767
- const d = l.values.length;
2878
+ const u = l.values.length;
2768
2879
  if (l.operator === "between" || l.operator === "not_between") {
2769
- d !== 2 && n.push(
2770
- r(
2880
+ u !== 2 && n.push(
2881
+ s(
2771
2882
  "invalid_analytics_filter_values",
2772
2883
  "Between analytics filters must include exactly two values.",
2773
- `${s}.values`
2884
+ `${r}.values`
2774
2885
  )
2775
2886
  );
2776
2887
  return;
2777
2888
  }
2778
- (l.operator === "contains" || l.operator === "not_contains" || l.operator === "=" || l.operator === "!=" || l.operator === ">" || l.operator === ">=" || l.operator === "<" || l.operator === "<=" || l.operator === void 0) && d !== 1 && n.push(
2779
- r(
2889
+ (l.operator === "contains" || l.operator === "not_contains" || l.operator === "=" || l.operator === "!=" || l.operator === ">" || l.operator === ">=" || l.operator === "<" || l.operator === "<=" || l.operator === void 0) && u !== 1 && n.push(
2890
+ s(
2780
2891
  "invalid_analytics_filter_values",
2781
2892
  "Scalar analytics filters must include exactly one value. Use in/not_in for multiple values.",
2782
- `${s}.values`
2893
+ `${r}.values`
2783
2894
  )
2784
2895
  );
2785
2896
  }
2786
2897
  });
2787
2898
  }
2788
2899
  }
2789
- function Na(e) {
2900
+ function qa(e) {
2790
2901
  const t = [];
2791
2902
  if (!f(e))
2792
2903
  return t.push(
2793
- r(
2904
+ s(
2794
2905
  "invalid_result_calculation",
2795
2906
  "Result calculation must be a structured object."
2796
2907
  )
2797
2908
  ), { ok: !1, errors: t, warnings: [] };
2798
- if (m(e.id) || t.push(
2799
- r(
2909
+ if (p(e.id) || t.push(
2910
+ s(
2800
2911
  "invalid_result_calculation_id",
2801
2912
  "Result calculation needs an id.",
2802
2913
  "id"
2803
2914
  )
2804
- ), m(e.label) || t.push(
2805
- r(
2915
+ ), p(e.label) || t.push(
2916
+ s(
2806
2917
  "invalid_result_calculation_label",
2807
2918
  "Result calculation needs a label.",
2808
2919
  "label"
2809
2920
  )
2810
2921
  ), e.kind !== "percent_of_total" && e.kind !== "rank" && e.kind !== "running_total" && e.kind !== "previous_row_delta" && t.push(
2811
- r(
2922
+ s(
2812
2923
  "invalid_result_calculation_kind",
2813
2924
  "Result calculation kind must be percent_of_total, rank, running_total, or previous_row_delta.",
2814
2925
  "kind"
2815
2926
  )
2816
- ), Le(e.input, "input", t), $n(e.output, "output", t), e.kind === "percent_of_total") {
2927
+ ), Ue(e.input, "input", t), Un(e.output, "output", t), e.kind === "percent_of_total") {
2817
2928
  const n = e.denominator;
2818
2929
  n !== void 0 && (f(n) ? n.scope === "population" ? (b(n.metric, "denominator.metric", t, {
2819
2930
  required: !0
@@ -2822,13 +2933,13 @@ function Na(e) {
2822
2933
  "denominator.filters",
2823
2934
  t
2824
2935
  )) : n.scope !== "returned_result" && t.push(
2825
- r(
2936
+ s(
2826
2937
  "invalid_result_calculation_denominator",
2827
2938
  "Percent-of-total denominator scope must be returned_result or population.",
2828
2939
  "denominator.scope"
2829
2940
  )
2830
2941
  ) : t.push(
2831
- r(
2942
+ s(
2832
2943
  "invalid_result_calculation_denominator",
2833
2944
  "Percent-of-total denominator must be a structured object.",
2834
2945
  "denominator"
@@ -2836,21 +2947,21 @@ function Na(e) {
2836
2947
  ));
2837
2948
  }
2838
2949
  return e.kind === "rank" && e.order !== void 0 && e.order !== "asc" && e.order !== "desc" && t.push(
2839
- r(
2950
+ s(
2840
2951
  "invalid_result_calculation_order",
2841
2952
  "Rank result calculation order must be asc or desc.",
2842
2953
  "order"
2843
2954
  )
2844
- ), (e.kind === "running_total" || e.kind === "previous_row_delta") && e.orderBy !== void 0 && Le(e.orderBy, "orderBy", t), { ok: t.length === 0, errors: t, warnings: [] };
2955
+ ), (e.kind === "running_total" || e.kind === "previous_row_delta") && e.orderBy !== void 0 && Ue(e.orderBy, "orderBy", t), { ok: t.length === 0, errors: t, warnings: [] };
2845
2956
  }
2846
- function Tt(e) {
2957
+ function Mt(e) {
2847
2958
  var o;
2848
2959
  const t = [], n = [];
2849
2960
  if (!e || typeof e != "object")
2850
2961
  return {
2851
2962
  ok: !1,
2852
2963
  errors: [
2853
- r(
2964
+ s(
2854
2965
  "invalid_analytics_intent",
2855
2966
  "Analytics intent must be a structured object."
2856
2967
  )
@@ -2864,101 +2975,101 @@ function Tt(e) {
2864
2975
  ]
2865
2976
  };
2866
2977
  if (e.kind === "matrix") {
2867
- const a = nn.safeParse(e);
2868
- return a.success || t.push(...a.error.issues.map((s) => r("invalid_matrix_intent", s.message, s.path.join(".")))), { ok: t.length === 0, errors: t, warnings: n, repairHints: Ue(t) };
2978
+ const a = dn.safeParse(e);
2979
+ return a.success || t.push(...a.error.issues.map((r) => s("invalid_matrix_intent", r.message, r.path.join(".")))), { ok: t.length === 0, errors: t, warnings: n, repairHints: Ve(t) };
2869
2980
  }
2870
2981
  if (e.version !== void 0 && e.version !== 1 && t.push(
2871
- r(
2982
+ s(
2872
2983
  "invalid_version",
2873
2984
  "Analytics intent version must be 1.",
2874
2985
  "version"
2875
2986
  )
2876
- ), ge(e.source, "source", t), Yn(e, t), Dn(e, t), "relationshipHint" in e && e.relationshipHint !== void 0 && Ae(
2987
+ ), he(e.source, "source", t), Hn(e, t), On(e, t), "relationshipHint" in e && e.relationshipHint !== void 0 && xe(
2877
2988
  e.relationshipHint,
2878
2989
  "relationshipHint",
2879
2990
  t
2880
2991
  ), e.kind === "metric") {
2881
2992
  const a = Array.isArray(e.measures) ? e.measures.filter(
2882
- (s) => f(s) && m(s.name)
2993
+ (r) => f(r) && p(r.name)
2883
2994
  ) : [];
2884
2995
  if (!Array.isArray(e.measures) || e.measures.length === 0 ? t.push(
2885
- r(
2996
+ s(
2886
2997
  "missing_measure",
2887
2998
  "Metric intent needs at least one measure.",
2888
2999
  "measures"
2889
3000
  )
2890
3001
  ) : e.measures.some(
2891
- (s) => !f(s) || !m(s.name)
3002
+ (r) => !f(r) || !p(r.name)
2892
3003
  ) && t.push(
2893
- r(
3004
+ s(
2894
3005
  "invalid_measure_list",
2895
3006
  "Metric intent measures must be an array of field references with names.",
2896
3007
  "measures"
2897
3008
  )
2898
- ), a.forEach((s, l) => {
2899
- b(s, `measures.${l}`, t, {
3009
+ ), a.forEach((r, l) => {
3010
+ b(r, `measures.${l}`, t, {
2900
3011
  required: !0
2901
3012
  });
2902
- }), a.length > 0 && !yn(a)) {
2903
- const s = a.find(
2904
- (l, u) => a.some(
2905
- (c, d) => d !== u && Ft(c, l)
3013
+ }), a.length > 0 && !An(a)) {
3014
+ const r = a.find(
3015
+ (l, d) => a.some(
3016
+ (c, u) => u !== d && Rt(c, l)
2906
3017
  )
2907
3018
  );
2908
- s && t.push(
2909
- r(
3019
+ r && t.push(
3020
+ s(
2910
3021
  "duplicate_measure",
2911
- vn(s),
3022
+ xn(r),
2912
3023
  "measures"
2913
3024
  )
2914
3025
  );
2915
3026
  }
2916
- if (f(e.primaryMeasure) && m(e.primaryMeasure.name) && we(
3027
+ if (f(e.primaryMeasure) && p(e.primaryMeasure.name) && Ae(
2917
3028
  e.primaryMeasure,
2918
3029
  a
2919
3030
  ).length > 1 && t.push(
2920
- r(
3031
+ s(
2921
3032
  "ambiguous_primary_measure",
2922
3033
  "Metric intent primaryMeasure must identify exactly one selected measure.",
2923
3034
  "primaryMeasure"
2924
3035
  )
2925
3036
  ), e.primaryMeasure !== void 0 && (b(e.primaryMeasure, "primaryMeasure", t, {
2926
3037
  required: !0
2927
- }), f(e.primaryMeasure) && m(e.primaryMeasure.name) && a.length > 0 && !In(
3038
+ }), f(e.primaryMeasure) && p(e.primaryMeasure.name) && a.length > 0 && !Rn(
2928
3039
  e.primaryMeasure,
2929
3040
  a
2930
3041
  ) && t.push(
2931
- r(
3042
+ s(
2932
3043
  "invalid_primary_measure",
2933
3044
  "Metric intent primaryMeasure must match one measure field reference.",
2934
3045
  "primaryMeasure"
2935
3046
  )
2936
3047
  )), e.dimensions !== void 0 && !Array.isArray(e.dimensions) ? t.push(
2937
- r(
3048
+ s(
2938
3049
  "invalid_measure_dimensions",
2939
3050
  "Metric intent dimensions must be an array of field references.",
2940
3051
  "dimensions"
2941
3052
  )
2942
3053
  ) : Array.isArray(e.dimensions) && e.dimensions.some(
2943
- (s) => !f(s) || !m(s.name)
3054
+ (r) => !f(r) || !p(r.name)
2944
3055
  ) && t.push(
2945
- r(
3056
+ s(
2946
3057
  "invalid_measure_dimensions",
2947
3058
  "Metric intent dimensions must be an array of field references with names.",
2948
3059
  "dimensions"
2949
3060
  )
2950
- ), e.dateField !== void 0 && b(e.dateField, "dateField", t), e.timeWindow !== void 0 && (ce(e.timeWindow, "timeWindow", t), e.dateField || t.push(
2951
- r(
3061
+ ), e.dateField !== void 0 && b(e.dateField, "dateField", t), e.timeWindow !== void 0 && (pe(e.timeWindow, "timeWindow", t), e.dateField || t.push(
3062
+ s(
2952
3063
  "missing_time_window_date_field",
2953
3064
  "Metric timeWindow needs a dateField.",
2954
3065
  "dateField"
2955
3066
  )
2956
- )), me(e.filters, "filters", t), Array.isArray(e.dimensions) && e.dimensions.forEach((s, l) => {
2957
- b(s, `dimensions.${l}`, t);
3067
+ )), me(e.filters, "filters", t), Array.isArray(e.dimensions) && e.dimensions.forEach((r, l) => {
3068
+ b(r, `dimensions.${l}`, t);
2958
3069
  }), e.orderBy !== void 0) {
2959
3070
  if (!f(e.orderBy))
2960
3071
  t.push(
2961
- r(
3072
+ s(
2962
3073
  "invalid_measure_order_by",
2963
3074
  "Metric intent orderBy must be a structured object.",
2964
3075
  "orderBy"
@@ -2967,24 +3078,24 @@ function Tt(e) {
2967
3078
  else if (b(e.orderBy.field, "orderBy.field", t, {
2968
3079
  required: !0
2969
3080
  }), e.orderBy.direction !== "asc" && e.orderBy.direction !== "desc" && t.push(
2970
- r(
3081
+ s(
2971
3082
  "invalid_measure_order_direction",
2972
3083
  "Metric intent orderBy direction must be asc or desc.",
2973
3084
  "orderBy.direction"
2974
3085
  )
2975
- ), f(e.orderBy.field) && m(e.orderBy.field.name)) {
2976
- const s = [
3086
+ ), f(e.orderBy.field) && p(e.orderBy.field.name)) {
3087
+ const r = [
2977
3088
  ...a,
2978
3089
  ...e.timeGrain && e.dateField && f(e.dateField) ? [e.dateField] : [],
2979
3090
  ...Array.isArray(e.dimensions) ? e.dimensions.filter(
2980
- (l) => f(l) && m(l.name)
3091
+ (l) => f(l) && p(l.name)
2981
3092
  ) : []
2982
3093
  ];
2983
- s.length > 0 && !kn(
3094
+ r.length > 0 && !Tn(
2984
3095
  e.orderBy.field,
2985
- s
3096
+ r
2986
3097
  ) && t.push(
2987
- r(
3098
+ s(
2988
3099
  "invalid_measure_order_by",
2989
3100
  "Metric intent orderBy.field must match one selected measure, grouped dateField, or dimension.",
2990
3101
  "orderBy.field"
@@ -2992,48 +3103,48 @@ function Tt(e) {
2992
3103
  );
2993
3104
  }
2994
3105
  }
2995
- Cn(e, t);
3106
+ Vn(e, t);
2996
3107
  } else if (e.kind === "records") {
2997
3108
  if (!Array.isArray(e.fields) || e.fields.length === 0 ? t.push(
2998
- r(
3109
+ s(
2999
3110
  "missing_record_fields",
3000
3111
  "Records intent needs at least one field.",
3001
3112
  "fields"
3002
3113
  )
3003
3114
  ) : e.fields.some(
3004
- (a) => !f(a) || !m(a.name)
3115
+ (a) => !f(a) || !p(a.name)
3005
3116
  ) && t.push(
3006
- r(
3117
+ s(
3007
3118
  "invalid_record_fields",
3008
3119
  "Records intent fields must be field references with names.",
3009
3120
  "fields"
3010
3121
  )
3011
- ), Array.isArray(e.fields) && e.fields.forEach((a, s) => {
3012
- b(a, `fields.${s}`, t);
3013
- }), e.dateField !== void 0 && b(e.dateField, "dateField", t), Oe(e.pagination, "pagination", t), e.timeWindow !== void 0 && (ce(e.timeWindow, "timeWindow", t), e.dateField || t.push(
3014
- r(
3122
+ ), Array.isArray(e.fields) && e.fields.forEach((a, r) => {
3123
+ b(a, `fields.${r}`, t);
3124
+ }), e.dateField !== void 0 && b(e.dateField, "dateField", t), qe(e.pagination, "pagination", t), e.timeWindow !== void 0 && (pe(e.timeWindow, "timeWindow", t), e.dateField || t.push(
3125
+ s(
3015
3126
  "missing_time_window_date_field",
3016
3127
  "Records timeWindow needs a dateField.",
3017
3128
  "dateField"
3018
3129
  )
3019
- )), me(e.filters, "filters", t), Array.isArray(e.filters) && e.filters.forEach((a, s) => {
3130
+ )), me(e.filters, "filters", t), Array.isArray(e.filters) && e.filters.forEach((a, r) => {
3020
3131
  f(a) && a.scope === "aggregate" && t.push(
3021
- r(
3132
+ s(
3022
3133
  "unsupported_record_filter_scope",
3023
3134
  "Records intents support row-scope filters only. Use a metric intent for aggregate-scope filters.",
3024
- `filters.${s}.scope`
3135
+ `filters.${r}.scope`
3025
3136
  )
3026
3137
  );
3027
3138
  }), e.orderBy !== void 0 && (f(e.orderBy) ? (b(e.orderBy.field, "orderBy.field", t, {
3028
3139
  required: !0
3029
3140
  }), e.orderBy.direction !== "asc" && e.orderBy.direction !== "desc" && t.push(
3030
- r(
3141
+ s(
3031
3142
  "invalid_record_order_direction",
3032
3143
  "Records intent orderBy direction must be asc or desc.",
3033
3144
  "orderBy.direction"
3034
3145
  )
3035
3146
  )) : t.push(
3036
- r(
3147
+ s(
3037
3148
  "invalid_record_order_by",
3038
3149
  "Records intent orderBy must be a structured object.",
3039
3150
  "orderBy"
@@ -3041,7 +3152,7 @@ function Tt(e) {
3041
3152
  )), e.totals !== void 0)
3042
3153
  if (!f(e.totals))
3043
3154
  t.push(
3044
- r(
3155
+ s(
3045
3156
  "invalid_records_totals",
3046
3157
  "Records totals must be a structured server totals request.",
3047
3158
  "totals"
@@ -3049,7 +3160,7 @@ function Tt(e) {
3049
3160
  );
3050
3161
  else {
3051
3162
  e.totals.mode !== "server" && t.push(
3052
- r(
3163
+ s(
3053
3164
  "invalid_records_totals",
3054
3165
  "Records totals mode must be server.",
3055
3166
  "totals.mode"
@@ -3057,16 +3168,16 @@ function Tt(e) {
3057
3168
  );
3058
3169
  const a = e.totals.measures;
3059
3170
  !Array.isArray(a) || a.length === 0 ? t.push(
3060
- r(
3171
+ s(
3061
3172
  "missing_records_totals_measures",
3062
3173
  "Records server totals need at least one measure.",
3063
3174
  "totals.measures"
3064
3175
  )
3065
- ) : a.forEach((s, l) => {
3066
- b(s, `totals.measures.${l}`, t, {
3176
+ ) : a.forEach((r, l) => {
3177
+ b(r, `totals.measures.${l}`, t, {
3067
3178
  required: !0
3068
- }), (!f(s) || s.role !== "measure") && t.push(
3069
- r(
3179
+ }), (!f(r) || r.role !== "measure") && t.push(
3180
+ s(
3070
3181
  "invalid_records_totals_measure",
3071
3182
  "Records server totals measures must be measure field references.",
3072
3183
  `totals.measures.${l}.role`
@@ -3074,22 +3185,22 @@ function Tt(e) {
3074
3185
  );
3075
3186
  });
3076
3187
  }
3077
- } else e.kind === "inputOptions" ? Mn(e, t) : e.kind === "sql" ? (((o = e.source) == null ? void 0 : o.kind) !== "sql" && t.push(
3078
- r(
3188
+ } else e.kind === "inputOptions" ? Cn(e, t) : e.kind === "sql" ? (((o = e.source) == null ? void 0 : o.kind) !== "sql" && t.push(
3189
+ s(
3079
3190
  "invalid_sql_source",
3080
3191
  "SQL analytics intent must use a SQL execution source.",
3081
3192
  "source"
3082
3193
  )
3083
- ), m(e.sql) || t.push(
3084
- r("missing_sql", "SQL analytics intent needs SQL text.", "sql")
3085
- ), Sn(
3194
+ ), p(e.sql) || t.push(
3195
+ s("missing_sql", "SQL analytics intent needs SQL text.", "sql")
3196
+ ), Fn(
3086
3197
  e.defaultParameters,
3087
3198
  "defaultParameters",
3088
3199
  t
3089
- ), Array.isArray(e.fields) && e.fields.forEach((a, s) => {
3090
- b(a, `fields.${s}`, t);
3091
- }), Oe(e.pagination, "pagination", t)) : t.push(
3092
- r(
3200
+ ), Array.isArray(e.fields) && e.fields.forEach((a, r) => {
3201
+ b(a, `fields.${r}`, t);
3202
+ }), qe(e.pagination, "pagination", t)) : t.push(
3203
+ s(
3093
3204
  "invalid_analytics_kind",
3094
3205
  "Analytics kind is not supported.",
3095
3206
  "kind"
@@ -3099,14 +3210,14 @@ function Tt(e) {
3099
3210
  ok: t.length === 0,
3100
3211
  errors: t,
3101
3212
  warnings: n,
3102
- repairHints: Ue(t)
3213
+ repairHints: Ve(t)
3103
3214
  };
3104
3215
  }
3105
- function Yn(e, t) {
3216
+ function Hn(e, t) {
3106
3217
  if (!(!("derivedFields" in e) || e.derivedFields === void 0)) {
3107
3218
  if (!Array.isArray(e.derivedFields)) {
3108
3219
  t.push(
3109
- r(
3220
+ s(
3110
3221
  "invalid_derived_fields",
3111
3222
  "Analytics intent derivedFields must be an array of derived field definitions.",
3112
3223
  "derivedFields"
@@ -3115,24 +3226,24 @@ function Yn(e, t) {
3115
3226
  return;
3116
3227
  }
3117
3228
  e.derivedFields.forEach((n, o) => {
3118
- Je(
3229
+ et(
3119
3230
  n
3120
- ).errors.forEach((s) => {
3231
+ ).errors.forEach((r) => {
3121
3232
  t.push({
3122
- ...s,
3123
- path: s.path ? `derivedFields.${o}.${s.path}` : `derivedFields.${o}`
3233
+ ...r,
3234
+ path: r.path ? `derivedFields.${o}.${r.path}` : `derivedFields.${o}`
3124
3235
  });
3125
3236
  });
3126
3237
  });
3127
3238
  }
3128
3239
  }
3129
- function Pn(e) {
3240
+ function Gn(e) {
3130
3241
  const t = [], n = [];
3131
3242
  if (!e || typeof e != "object")
3132
3243
  return {
3133
3244
  ok: !1,
3134
3245
  errors: [
3135
- r(
3246
+ s(
3136
3247
  "invalid_operation_intent",
3137
3248
  "Operation intent must be a structured object."
3138
3249
  )
@@ -3146,27 +3257,27 @@ function Pn(e) {
3146
3257
  ]
3147
3258
  };
3148
3259
  if (e.version !== 1 && t.push(
3149
- r(
3260
+ s(
3150
3261
  "invalid_version",
3151
3262
  "Operation intent version must be 1.",
3152
3263
  "version"
3153
3264
  )
3154
3265
  ), e.kind === "answer_obligations")
3155
3266
  !Array.isArray(e.obligations) || e.obligations.length === 0 ? t.push(
3156
- r(
3267
+ s(
3157
3268
  "missing_obligations",
3158
3269
  "Answer-obligations operation intent needs at least one obligation.",
3159
3270
  "obligations"
3160
3271
  )
3161
3272
  ) : e.obligations.forEach((o, a) => {
3162
- m(o.id) || t.push(
3163
- r(
3273
+ p(o.id) || t.push(
3274
+ s(
3164
3275
  "missing_obligation_id",
3165
3276
  "Each analytics obligation needs an id.",
3166
3277
  `obligations.${a}.id`
3167
3278
  )
3168
- ), m(o.prompt) || t.push(
3169
- r(
3279
+ ), p(o.prompt) || t.push(
3280
+ s(
3170
3281
  "missing_obligation_prompt",
3171
3282
  "Each analytics obligation needs a prompt.",
3172
3283
  `obligations.${a}.prompt`
@@ -3174,21 +3285,21 @@ function Pn(e) {
3174
3285
  );
3175
3286
  });
3176
3287
  else if (e.kind === "dashboard_change" || e.kind === "data_app_change") {
3177
- if (m(e.instruction) || t.push(
3178
- r(
3288
+ if (p(e.instruction) || t.push(
3289
+ s(
3179
3290
  "missing_instruction",
3180
3291
  "Change operation intent needs an instruction.",
3181
3292
  "instruction"
3182
3293
  )
3183
3294
  ), e.analyticsIntent) {
3184
- const o = Tt(
3295
+ const o = Mt(
3185
3296
  e.analyticsIntent
3186
3297
  );
3187
3298
  t.push(...o.errors), n.push(...o.warnings);
3188
3299
  }
3189
3300
  } else
3190
3301
  t.push(
3191
- r(
3302
+ s(
3192
3303
  "invalid_operation_kind",
3193
3304
  "Operation intent kind is not supported.",
3194
3305
  "kind"
@@ -3198,16 +3309,16 @@ function Pn(e) {
3198
3309
  ok: t.length === 0,
3199
3310
  errors: t,
3200
3311
  warnings: n,
3201
- repairHints: Mt(t)
3312
+ repairHints: Dt(t)
3202
3313
  };
3203
3314
  }
3204
- function ja(e) {
3315
+ function La(e) {
3205
3316
  const t = [], n = [];
3206
3317
  if (!e || typeof e != "object")
3207
3318
  return {
3208
3319
  ok: !1,
3209
3320
  errors: [
3210
- r(
3321
+ s(
3211
3322
  "invalid_recovery_plan",
3212
3323
  "Analytics recovery plan must be a structured object."
3213
3324
  )
@@ -3221,19 +3332,19 @@ function ja(e) {
3221
3332
  ]
3222
3333
  };
3223
3334
  e.version !== 1 && t.push(
3224
- r("invalid_version", "Recovery plan version must be 1.", "version")
3335
+ s("invalid_version", "Recovery plan version must be 1.", "version")
3225
3336
  ), e.kind !== "analytics_recovery_plan" && t.push(
3226
- r(
3337
+ s(
3227
3338
  "invalid_recovery_plan_kind",
3228
3339
  "Recovery plan kind must be analytics_recovery_plan.",
3229
3340
  "kind"
3230
3341
  )
3231
3342
  );
3232
- const o = Pn(
3343
+ const o = Gn(
3233
3344
  e.operationIntent
3234
3345
  );
3235
3346
  return t.push(...o.errors), n.push(...o.warnings), Array.isArray(e.plannedToolCalls) || t.push(
3236
- r(
3347
+ s(
3237
3348
  "invalid_planned_tool_calls",
3238
3349
  "Recovery plan plannedToolCalls must be an array.",
3239
3350
  "plannedToolCalls"
@@ -3242,16 +3353,16 @@ function ja(e) {
3242
3353
  ok: t.length === 0,
3243
3354
  errors: t,
3244
3355
  warnings: n,
3245
- repairHints: Mt(t)
3356
+ repairHints: Dt(t)
3246
3357
  };
3247
3358
  }
3248
- function Mt(e) {
3359
+ function Dt(e) {
3249
3360
  return e.map((t) => ({
3250
3361
  code: t.code,
3251
3362
  recommendedNextStep: t.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."
3252
3363
  }));
3253
3364
  }
3254
- function Ue(e) {
3365
+ function Ve(e) {
3255
3366
  return e.map((t) => {
3256
3367
  switch (t.code) {
3257
3368
  case "invalid_matrix_intent":
@@ -3339,18 +3450,18 @@ function Ue(e) {
3339
3450
  }
3340
3451
  }).filter((t) => !!t);
3341
3452
  }
3342
- function On(e, t, n, o) {
3453
+ function zn(e, t, n, o) {
3343
3454
  if (!e || typeof e != "object") {
3344
3455
  n.push(
3345
- r("invalid_view", "Dashboard view must be an object.", t)
3456
+ s("invalid_view", "Dashboard view must be an object.", t)
3346
3457
  );
3347
3458
  return;
3348
3459
  }
3349
- if (m(e.title) || n.push(
3350
- r("missing_view_title", "Dashboard view needs a title.", t)
3460
+ if (p(e.title) || n.push(
3461
+ s("missing_view_title", "Dashboard view needs a title.", t)
3351
3462
  ), !e.presentation || typeof e.presentation != "object") {
3352
3463
  n.push(
3353
- r(
3464
+ s(
3354
3465
  "missing_presentation",
3355
3466
  "Dashboard view needs a presentation.",
3356
3467
  `${t}.presentation`
@@ -3359,8 +3470,8 @@ function On(e, t, n, o) {
3359
3470
  return;
3360
3471
  }
3361
3472
  if (e.presentation.kind === "text") {
3362
- m(e.text) || o.push(
3363
- r(
3473
+ p(e.text) || o.push(
3474
+ s(
3364
3475
  "missing_text_content",
3365
3476
  "Text views should include text content.",
3366
3477
  `${t}.text`
@@ -3370,7 +3481,7 @@ function On(e, t, n, o) {
3370
3481
  }
3371
3482
  if (!e.analytics) {
3372
3483
  n.push(
3373
- r(
3484
+ s(
3374
3485
  "missing_view_analytics",
3375
3486
  "Non-text dashboard views need analytics intent.",
3376
3487
  `${t}.analytics`
@@ -3379,37 +3490,37 @@ function On(e, t, n, o) {
3379
3490
  return;
3380
3491
  }
3381
3492
  e.presentation.kind === "matrixTable" && e.analytics.kind !== "matrix" && n.push(
3382
- r(
3493
+ s(
3383
3494
  "invalid_matrix_view_analytics",
3384
3495
  "Matrix table views need matrix analytics intent.",
3385
3496
  `${t}.analytics.kind`
3386
3497
  )
3387
3498
  );
3388
- const a = Tt(e.analytics);
3389
- for (const s of a.errors)
3499
+ const a = Mt(e.analytics);
3500
+ for (const r of a.errors)
3390
3501
  n.push(
3391
- r(
3392
- s.code,
3393
- s.message,
3394
- `${t}.analytics${s.path ? `.${s.path}` : ""}`
3502
+ s(
3503
+ r.code,
3504
+ r.message,
3505
+ `${t}.analytics${r.path ? `.${r.path}` : ""}`
3395
3506
  )
3396
3507
  );
3397
- for (const s of a.warnings)
3508
+ for (const r of a.warnings)
3398
3509
  o.push(
3399
- r(
3400
- s.code,
3401
- s.message,
3402
- `${t}.analytics${s.path ? `.${s.path}` : ""}`
3510
+ s(
3511
+ r.code,
3512
+ r.message,
3513
+ `${t}.analytics${r.path ? `.${r.path}` : ""}`
3403
3514
  )
3404
3515
  );
3405
3516
  }
3406
- function Ea(e) {
3517
+ function Ua(e) {
3407
3518
  const t = [], n = [];
3408
3519
  if (!e || typeof e != "object")
3409
3520
  return {
3410
3521
  ok: !1,
3411
3522
  errors: [
3412
- r(
3523
+ s(
3413
3524
  "invalid_dashboard_intent",
3414
3525
  "Dashboard intent must be a structured object."
3415
3526
  )
@@ -3417,88 +3528,88 @@ function Ea(e) {
3417
3528
  warnings: n
3418
3529
  };
3419
3530
  e.version !== 1 && t.push(
3420
- r("invalid_version", "Dashboard intent version must be 1.")
3531
+ s("invalid_version", "Dashboard intent version must be 1.")
3421
3532
  ), e.kind !== "dashboard" && t.push(
3422
- r("invalid_kind", "Experience intent kind must be dashboard.")
3423
- ), m(e.title) || t.push(
3424
- r("missing_title", "Dashboard intent needs a title.", "title")
3533
+ s("invalid_kind", "Experience intent kind must be dashboard.")
3534
+ ), p(e.title) || t.push(
3535
+ s("missing_title", "Dashboard intent needs a title.", "title")
3425
3536
  );
3426
- const o = Array.isArray(e.inputs) ? e.inputs : [], a = Be(
3537
+ const o = Array.isArray(e.inputs) ? e.inputs : [], a = Le(
3427
3538
  o.filter(f).map((c) => c.id).filter((c) => typeof c == "string")
3428
3539
  );
3429
3540
  a && t.push(
3430
- r(
3541
+ s(
3431
3542
  "duplicate_input_id",
3432
3543
  `Duplicate input id: ${a}.`,
3433
3544
  "inputs"
3434
3545
  )
3435
3546
  );
3436
- for (const [c, d] of o.entries()) {
3437
- const p = `inputs.${c}`;
3438
- if (!f(d)) {
3547
+ for (const [c, u] of o.entries()) {
3548
+ const m = `inputs.${c}`;
3549
+ if (!f(u)) {
3439
3550
  t.push(
3440
- r("invalid_input", "Dashboard input must be an object.", p)
3551
+ s("invalid_input", "Dashboard input must be an object.", m)
3441
3552
  );
3442
3553
  continue;
3443
3554
  }
3444
- m(d.id) || t.push(
3445
- r("missing_input_id", "Input needs an id.", `${p}.id`)
3446
- ), m(d.label) || t.push(
3447
- r("missing_input_label", "Input needs a label.", `${p}.label`)
3448
- ), !d.field || !m(d.field.name) ? t.push(
3449
- r("missing_input_field", "Input needs a field.", `${p}.field`)
3450
- ) : b(d.field, `${p}.field`, t);
3555
+ p(u.id) || t.push(
3556
+ s("missing_input_id", "Input needs an id.", `${m}.id`)
3557
+ ), p(u.label) || t.push(
3558
+ s("missing_input_label", "Input needs a label.", `${m}.label`)
3559
+ ), !u.field || !p(u.field.name) ? t.push(
3560
+ s("missing_input_field", "Input needs a field.", `${m}.field`)
3561
+ ) : b(u.field, `${m}.field`, t);
3451
3562
  }
3452
- const s = Array.isArray(e.sections) ? e.sections : [];
3453
- s.length === 0 && t.push(
3454
- r(
3563
+ const r = Array.isArray(e.sections) ? e.sections : [];
3564
+ r.length === 0 && t.push(
3565
+ s(
3455
3566
  "missing_sections",
3456
3567
  "Dashboard intent needs at least one section.",
3457
3568
  "sections"
3458
3569
  )
3459
3570
  );
3460
- const l = s.flatMap(
3461
- (c) => c && typeof c == "object" && Array.isArray(c.views) ? c.views.filter(f).map((d) => d.id).filter((d) => !!d) : []
3462
- ), u = Be(l);
3463
- u && t.push(
3464
- r(
3571
+ const l = r.flatMap(
3572
+ (c) => c && typeof c == "object" && Array.isArray(c.views) ? c.views.filter(f).map((u) => u.id).filter((u) => !!u) : []
3573
+ ), d = Le(l);
3574
+ d && t.push(
3575
+ s(
3465
3576
  "duplicate_view_id",
3466
- `Duplicate dashboard view id: ${u}.`,
3577
+ `Duplicate dashboard view id: ${d}.`,
3467
3578
  "sections"
3468
3579
  )
3469
3580
  );
3470
- for (const [c, d] of s.entries()) {
3471
- const p = `sections.${c}`;
3472
- if (!d || typeof d != "object") {
3581
+ for (const [c, u] of r.entries()) {
3582
+ const m = `sections.${c}`;
3583
+ if (!u || typeof u != "object") {
3473
3584
  t.push(
3474
- r(
3585
+ s(
3475
3586
  "invalid_section",
3476
3587
  "Dashboard section must be an object.",
3477
- p
3588
+ m
3478
3589
  )
3479
3590
  );
3480
3591
  continue;
3481
3592
  }
3482
- if (m(d.title) || t.push(
3483
- r(
3593
+ if (p(u.title) || t.push(
3594
+ s(
3484
3595
  "missing_section_title",
3485
3596
  "Dashboard section needs a title.",
3486
- p
3597
+ m
3487
3598
  )
3488
- ), !Array.isArray(d.views) || d.views.length === 0) {
3599
+ ), !Array.isArray(u.views) || u.views.length === 0) {
3489
3600
  t.push(
3490
- r(
3601
+ s(
3491
3602
  "missing_section_views",
3492
3603
  "Dashboard section needs at least one view.",
3493
- `${p}.views`
3604
+ `${m}.views`
3494
3605
  )
3495
3606
  );
3496
3607
  continue;
3497
3608
  }
3498
- for (const [h, v] of d.views.entries())
3499
- On(
3609
+ for (const [h, v] of u.views.entries())
3610
+ zn(
3500
3611
  v,
3501
- `${p}.views.${h}`,
3612
+ `${m}.views.${h}`,
3502
3613
  t,
3503
3614
  n
3504
3615
  );
@@ -3506,141 +3617,149 @@ function Ea(e) {
3506
3617
  return { ok: t.length === 0, errors: t, warnings: n };
3507
3618
  }
3508
3619
  export {
3509
- Vn as $,
3510
- zi as A,
3511
- ht as B,
3512
- se as C,
3513
- xi as D,
3514
- le as E,
3515
- _t as F,
3516
- wi as G,
3517
- x as H,
3518
- aa as I,
3519
- Xi as J,
3520
- bt as K,
3521
- Ai as L,
3522
- Zi as M,
3523
- P as N,
3524
- Ne as O,
3525
- Fi as P,
3526
- Ie as Q,
3527
- Ln as R,
3528
- $e as S,
3529
- Un as T,
3620
+ G as $,
3621
+ _t as A,
3622
+ de as B,
3623
+ re as C,
3624
+ Ni as D,
3625
+ bt as E,
3626
+ Mi as F,
3627
+ x as G,
3628
+ ma as H,
3629
+ an as I,
3630
+ yt as J,
3631
+ on as K,
3632
+ Di as L,
3633
+ pt as M,
3634
+ Y as N,
3635
+ je as O,
3636
+ Ei as P,
3637
+ ke as Q,
3638
+ Xn as R,
3639
+ Oe as S,
3640
+ Zn as T,
3530
3641
  Z as U,
3531
- un as V,
3532
- wa as W,
3533
- _e as X,
3534
- G as Y,
3535
- qn as Z,
3536
- jt as _,
3537
- ra as a,
3538
- Re as a$,
3539
- ue as a0,
3540
- Na as a1,
3541
- Tt as a2,
3542
- Pn as a3,
3543
- ja as a4,
3544
- Ea as a5,
3545
- Je as a6,
3546
- ye as a7,
3547
- mi as a8,
3548
- pi as a9,
3549
- Gn as aA,
3550
- E as aB,
3551
- zn as aC,
3552
- Kn as aD,
3553
- Fe as aE,
3554
- Qn as aF,
3555
- Wn as aG,
3556
- Xn as aH,
3557
- Zn as aI,
3558
- Jn as aJ,
3559
- Aa as aK,
3560
- xa as aL,
3561
- T as aM,
3562
- kt as aN,
3563
- ke as aO,
3564
- wt as aP,
3565
- Ta as aQ,
3566
- ut as aR,
3567
- q as aS,
3568
- Ii as aT,
3569
- V as aU,
3570
- na as aV,
3571
- A as aW,
3572
- yi as aX,
3573
- ia as aY,
3574
- dt as aZ,
3575
- $ as a_,
3576
- it as aa,
3577
- _i as ab,
3578
- bi as ac,
3579
- ot as ad,
3580
- st as ae,
3581
- Me as af,
3582
- lt as ag,
3583
- ea as ah,
3584
- ta as ai,
3585
- Ct as aj,
3586
- Y as ak,
3587
- F as al,
3588
- L as am,
3589
- ee as an,
3590
- W as ao,
3642
+ hn as V,
3643
+ Ea as W,
3644
+ be as X,
3645
+ jt as Y,
3646
+ Qn as Z,
3647
+ Re as _,
3648
+ ha as a,
3649
+ Ri as a$,
3650
+ Wn as a0,
3651
+ $t as a1,
3652
+ Jn as a2,
3653
+ Ot as a3,
3654
+ Yt as a4,
3655
+ ce as a5,
3656
+ Yn as a6,
3657
+ qa as a7,
3658
+ Mt as a8,
3659
+ Gn as a9,
3660
+ Ge as aA,
3661
+ ze as aB,
3662
+ Ke as aC,
3663
+ Qe as aD,
3664
+ We as aE,
3665
+ ea as aF,
3666
+ ta as aG,
3667
+ j as aH,
3668
+ ia as aI,
3669
+ na as aJ,
3670
+ Te as aK,
3671
+ aa as aL,
3672
+ oa as aM,
3673
+ sa as aN,
3674
+ Jt as aO,
3675
+ ei as aP,
3676
+ ra as aQ,
3677
+ la as aR,
3678
+ ja as aS,
3679
+ $a as aT,
3680
+ T as aU,
3681
+ wt as aV,
3682
+ we as aW,
3683
+ At as aX,
3684
+ Ya as aY,
3685
+ ct as aZ,
3686
+ q as a_,
3687
+ La as aa,
3688
+ Ua as ab,
3689
+ et as ac,
3690
+ ve as ad,
3691
+ bi as ae,
3692
+ yi as af,
3693
+ nt as ag,
3694
+ ki as ah,
3695
+ wi as ai,
3696
+ st as aj,
3697
+ rt as ak,
3698
+ Ne as al,
3699
+ dt as am,
3700
+ da as an,
3701
+ ua as ao,
3591
3702
  Bt as ap,
3592
- pe as aq,
3593
- fe as ar,
3594
- Ve as as,
3595
- Lt as at,
3596
- He as au,
3597
- Ge as av,
3598
- ze as aw,
3599
- Ke as ax,
3600
- Qe as ay,
3601
- Hn as az,
3602
- la as b,
3603
- qi as b0,
3604
- an as b1,
3605
- fa as b2,
3606
- Ci as b3,
3607
- Sa as b4,
3608
- va as b5,
3609
- ga as b6,
3610
- ha as b7,
3611
- Bi as b8,
3612
- Li as b9,
3613
- ba,
3614
- _a as bb,
3615
- ya as bc,
3616
- ma as bd,
3617
- re as be,
3618
- pa as bf,
3619
- on as bg,
3620
- be as bh,
3621
- Wt as bi,
3622
- ua as c,
3623
- ca as d,
3624
- $t as e,
3625
- At as f,
3626
- oa as g,
3627
- da as h,
3628
- sa as i,
3629
- ct as j,
3630
- vt as k,
3631
- de as l,
3632
- nn as m,
3633
- ka as n,
3634
- pn as o,
3635
- Ma as p,
3636
- Ra as q,
3637
- Et as r,
3638
- _n as s,
3639
- oe as t,
3640
- en as u,
3641
- Ia as v,
3642
- Da as w,
3643
- Fa as x,
3644
- ki as y,
3645
- Se as z
3703
+ O as aq,
3704
+ F as ar,
3705
+ L as as,
3706
+ ee as at,
3707
+ W as au,
3708
+ Vt as av,
3709
+ fe as aw,
3710
+ ge as ax,
3711
+ He as ay,
3712
+ Gt as az,
3713
+ _a as b,
3714
+ V as b0,
3715
+ pa as b1,
3716
+ A as b2,
3717
+ Ai as b3,
3718
+ ca as b4,
3719
+ ut as b5,
3720
+ $ as b6,
3721
+ Me as b7,
3722
+ zi as b8,
3723
+ un as b9,
3724
+ ka as ba,
3725
+ Li as bb,
3726
+ Ma as bc,
3727
+ Ta as bd,
3728
+ wa as be,
3729
+ Aa as bf,
3730
+ Gi as bg,
3731
+ Ki as bh,
3732
+ Fa as bi,
3733
+ xa as bj,
3734
+ Ra as bk,
3735
+ Sa as bl,
3736
+ le as bm,
3737
+ Ia as bn,
3738
+ cn as bo,
3739
+ ye as bp,
3740
+ ii as bq,
3741
+ ya as c,
3742
+ va as d,
3743
+ Pt as e,
3744
+ xt as f,
3745
+ fa as g,
3746
+ ba as h,
3747
+ ga as i,
3748
+ St as j,
3749
+ ue as k,
3750
+ Na as l,
3751
+ dn as m,
3752
+ yn as n,
3753
+ Oa as o,
3754
+ Pa as p,
3755
+ Ct as q,
3756
+ rn as r,
3757
+ kn as s,
3758
+ se as t,
3759
+ Da as u,
3760
+ Ba as v,
3761
+ Ca as w,
3762
+ Ti as x,
3763
+ Ie as y,
3764
+ Ji as z
3646
3765
  };