react-semaphor 0.1.544 → 0.1.546
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.
- package/dist/analytics-protocol/index.js +405 -441
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +100 -76
- package/dist/brand-studio/index.js +5 -5
- package/dist/briefings/index.js +55 -52
- package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
- package/dist/chunks/{add-to-dashboard-BuAqfA2Y.js → add-to-dashboard-BQRAAnc3.js} +55 -33
- package/dist/chunks/{analytics-base-schemas-BFAoRlkU.js → analytics-base-schemas-BKs3flFS.js} +2 -2
- package/dist/chunks/{assistant-chat-BNLkCDml.js → assistant-chat-BPXhulAx.js} +2792 -2562
- package/dist/chunks/{bookmark-state-CXw7lZ50.js → bookmark-state-C4vetoa0.js} +7 -8
- package/dist/chunks/column-catalog-BYnochWQ.js +3363 -0
- package/dist/chunks/comparison-window-caption-C2xF-eWw.js +1433 -0
- package/dist/chunks/{context-ClREvqCZ.js → context-BerEBuFR.js} +11 -6
- package/dist/chunks/custom-visual-inputs-CkJW9pBS.js +295 -0
- package/dist/chunks/{dashboard-g5a4DKWq.js → dashboard-C3CoKbGY.js} +1 -1
- package/dist/chunks/dashboard-briefing-launcher-Be4h-7My.js +3734 -0
- package/dist/chunks/dashboard-controls-bxPrlSyp.js +2307 -0
- package/dist/chunks/{dashboard-json-7qT9jmfL.js → dashboard-json-BrjxIiRt.js} +6 -6
- package/dist/chunks/document-dashboard-inputs-CRVHpIHp.js +3010 -0
- package/dist/chunks/{edit-dashboard-visual-BfJwnRIZ.js → edit-dashboard-visual-DYYYDjY6.js} +5986 -6063
- package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-Ddf55Ku1.js} +8 -8
- package/dist/chunks/global-date-filter-utils-9d6m9-FE.js +11859 -0
- package/dist/chunks/index-CtoK1Lgu.js +586 -0
- package/dist/chunks/{index-DkAyQvC6.js → index-DkQkMKa1.js} +385 -339
- package/dist/chunks/list-filter-DsaTbM3J.js +15 -0
- package/dist/chunks/matrix-analytical-definition-B9vW-osb.js +717 -0
- package/dist/chunks/{matrix-card-DjwWcCo8.js → matrix-card-LiMEipvq.js} +3 -3
- package/dist/chunks/{matrix-formatter-CxJLkztA.js → matrix-formatter-DWEeC0_c.js} +55 -55
- package/dist/chunks/{matrix-member-presentation-CQGdVks6.js → matrix-member-presentation-DqzG-UhQ.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-8OIO4gob.js → matrix-operation-contract-D6vYkZK4.js} +72 -72
- package/dist/chunks/{metric-comparison-DEwi9uc2.js → metric-comparison-zpGw4lD6.js} +2 -2
- package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +119 -0
- package/dist/chunks/{pivot-header-presentation-DHcx1XGQ.js → pivot-header-presentation-CQnIDtUv.js} +1 -1
- package/dist/chunks/{pivot-result-identity-DJhXXcns.js → pivot-result-identity-C-Q1j1Wb.js} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-DM4CyGKs.js → pivot-result-lifecycle-pwq3b7LC.js} +571 -380
- package/dist/chunks/{raw-temporal-contract-C51YG48G.js → raw-temporal-contract-WuXA8jBP.js} +1 -1
- package/dist/chunks/{raw-temporal-presentation-CLiVi90c.js → raw-temporal-presentation-CBzrDOjM.js} +8 -8
- package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
- package/dist/chunks/{report-preferences-dialog-Df7VpRVW.js → report-preferences-dialog-4QEZWe5U.js} +637 -610
- package/dist/chunks/{report-runtime-context-Dq8XyODK.js → report-runtime-context-hWiTCzFV.js} +2 -2
- package/dist/chunks/resolve-dashboard-input-context-UpK_LBpL.js +5677 -0
- package/dist/chunks/{saved-dashboard-context-B-mQ--nV.js → saved-dashboard-context-D_I3Lxk0.js} +184 -212
- package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
- package/dist/chunks/{selection-reducer-Dj_8xD69.js → selection-reducer-CJzkTZio.js} +15 -15
- package/dist/chunks/{semaphor-ready-indicator-DDAxk8us.js → semaphor-ready-indicator-4zpRHE-X.js} +56832 -59068
- package/dist/chunks/{shelf-drop-preview-context-BSRPwaED.js → shelf-drop-preview-context-Cfw7TRAx.js} +890 -871
- package/dist/chunks/{source-entity-resolution-BYn9giz3.js → source-entity-resolution-BIGRvtbG.js} +13 -13
- package/dist/chunks/{switch-C3jLxlG0.js → switch-CEBOR4n7.js} +47 -48
- package/dist/chunks/{table-export-sheet-CPfGAQ9X.js → table-export-sheet-4X9mAG3V.js} +1 -1
- package/dist/chunks/table-settings-CunhoDUi.js +605 -0
- package/dist/chunks/{temporal-bucket-D7NBrrtL.js → temporal-bucket-CQOSbv9-.js} +26 -26
- package/dist/chunks/{token-types-DBbZVQsm.js → token-types-BMqRmT-C.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BxzFviM-.js → use-create-flow-overlay-state-DZBZiiD-.js} +83 -83
- package/dist/chunks/{validators-DMHTpf7a.js → validators-C-aOQlTB.js} +713 -658
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1800 -1135
- package/dist/data-app-sdk/index.js +6 -6
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +14 -14
- package/dist/format-utils/index.js +198 -187
- package/dist/index.js +359 -325
- package/dist/layouts/index.js +5 -242
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/shared/index.js +4 -5
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +33 -6
- package/dist/types/briefings/index.d.ts +6 -5
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/surfboard/arrange-layout-button.d.ts +8 -0
- package/dist/types/components/surfboard/filter/types.d.ts +0 -14
- package/dist/types/components/surfboard/screen-size-preview-button.d.ts +7 -0
- package/dist/types/index.js +6 -6
- package/dist/types/lib/charts/table-chart-types.d.ts +4 -0
- package/dist/types/lib/charts/types.d.ts +2 -2
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +41 -1
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +201 -0
- package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +15 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
- package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
- package/dist/types/lib/download-pdf.d.ts +75 -1
- package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
- package/dist/types/lib/matrix-table/matrix-editor.d.ts +52 -0
- package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +69 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +159 -56
- package/dist/types/lib/stores/editor-store.d.ts +0 -3
- package/dist/types/lib/types/common-types.d.ts +29 -6
- package/dist/types/lib/types/explorer-types.d.ts +10 -0
- package/dist/types/lib/types/semantic-types.d.ts +84 -0
- package/dist/types/lib/utils/build-saved-editor-card.d.ts +20 -0
- package/dist/types/lib/utils/card-type-change.d.ts +16 -0
- package/dist/types/lib/utils/field-availability-context.d.ts +25 -0
- package/dist/types/lib/utils/field-placement.d.ts +96 -0
- package/dist/types/lib/utils/field-state-calculator.d.ts +161 -0
- package/dist/types/lib/utils/qualified-entity-name.d.ts +2 -0
- package/dist/types/shared/analytics-protocol/field-provenance.d.ts +89 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
- package/dist/types/shared/analytics-protocol/query-policies.d.ts +52 -0
- package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/time-window.d.ts +40 -1
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -12
- package/dist/types/shared/assistant-protocol/answer-text.d.ts +20 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +21 -21
- package/dist/types/shared/assistant-protocol/index.d.ts +1 -0
- package/dist/types/shared/assistant-protocol/limits.d.ts +6 -1
- package/dist/types/shared/assistant-protocol/parts.d.ts +43 -3
- package/dist/types/shared/assistant-protocol/request.d.ts +14 -2
- package/dist/types/shared/dashboard-authoring/calculated-field-identity.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +487 -0
- package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +34 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +7886 -0
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +43 -0
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +54 -0
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +89 -0
- package/dist/types/shared/dashboard-authoring/column-catalog.d.ts +32 -0
- package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -55
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +16 -6
- package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +9 -1
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +118 -0
- package/dist/types/shared/dashboard-authoring/filter-applicability.d.ts +75 -0
- package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
- package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +20 -2
- package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +10 -37
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +189 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +94 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +78 -0
- package/dist/types/shared/dashboard-authoring/validators.d.ts +1 -2
- package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
- package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
- package/dist/types/shared/layouts/engine/grid.d.ts +25 -0
- package/dist/types/shared/layouts/engine/index.d.ts +4 -0
- package/dist/types/shared/layouts/engine/sheet-layout.d.ts +7 -0
- package/dist/types/shared/layouts/engine/types.d.ts +125 -0
- package/dist/types/shared/layouts/index.d.ts +1 -2
- package/package.json +2 -2
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/chunks/apply-dashboard-operations-Bz4n1Lq6.js +0 -2260
- package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
- package/dist/chunks/comparison-window-caption-BTkrN3W4.js +0 -1623
- package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +0 -323
- package/dist/chunks/dashboard-briefing-launcher-DQ_8O_e2.js +0 -3725
- package/dist/chunks/dashboard-controls-8RyBTQUO.js +0 -2315
- package/dist/chunks/dashboard-filter-value-compatibility-CwQ_iSNb.js +0 -108
- package/dist/chunks/document-dashboard-inputs-BC6p-ESg.js +0 -8087
- package/dist/chunks/document-sheet-utils-Duo9uLoH.js +0 -3619
- package/dist/chunks/matrix-analytical-definition-C7Gb0e12.js +0 -117
- package/dist/chunks/normalize-dashboard-for-dirty-check-Bk3VYv_q.js +0 -67
- package/dist/chunks/numeric-presentation-DESvLiu9.js +0 -5227
- package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
- package/dist/chunks/stable-serialize-CfqXeiBP.js +0 -6
- package/dist/chunks/table-settings-CLZocegs.js +0 -501
- package/dist/chunks/use-debounced-dirty-check-BwAbnX_5.js +0 -59
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
- package/dist/types/shared/dashboard-authoring/change-compiler.d.ts +0 -7
- package/dist/types/shared/dashboard-authoring/layout-compiler.d.ts +0 -2
- package/dist/types/shared/layouts/create-frame-layouts.d.ts +0 -27
- package/dist/types/shared/layouts/frame-layouts.d.ts +0 -23
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as Se, j as U, l as Be, m as Mt, o as Rt, q as Tt, v as Et, g as Le, h as W, t as Nt, c as Ve } from "./analytics-base-schemas-BKs3flFS.js";
|
|
2
2
|
import { z as n } from "zod";
|
|
3
|
-
function
|
|
3
|
+
function $t(e) {
|
|
4
4
|
return typeof e == "string" || typeof e == "number" && Number.isFinite(e) || typeof e == "boolean";
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
return !Array.isArray(e) || e.length === 0 || e.length >
|
|
6
|
+
function jt(e) {
|
|
7
|
+
return !Array.isArray(e) || e.length === 0 || e.length > Se || !e.every($t) ? {
|
|
8
8
|
ok: !1,
|
|
9
|
-
error: `matchValues must be 1 to ${
|
|
9
|
+
error: `matchValues must be 1 to ${Se} string, number or boolean values.`
|
|
10
10
|
} : { ok: !0, values: e };
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const Ct = [
|
|
13
13
|
"day",
|
|
14
14
|
"week",
|
|
15
15
|
"month",
|
|
16
16
|
"quarter",
|
|
17
17
|
"year"
|
|
18
|
-
],
|
|
18
|
+
], Wn = ["this", "previous"], Ot = ["now", "latest_available"], Yt = [
|
|
19
19
|
"include_partial",
|
|
20
20
|
"complete_periods"
|
|
21
|
-
],
|
|
21
|
+
], Jn = {
|
|
22
22
|
second: 31536e4,
|
|
23
23
|
minute: 5256e3,
|
|
24
24
|
hour: 87600,
|
|
@@ -28,25 +28,73 @@ const jt = [
|
|
|
28
28
|
quarter: 40,
|
|
29
29
|
year: 10
|
|
30
30
|
};
|
|
31
|
-
function
|
|
31
|
+
function Pt(e) {
|
|
32
32
|
return e.anchor ?? "latest_available";
|
|
33
33
|
}
|
|
34
|
+
function R(e) {
|
|
35
|
+
return !!e && (e.kind === void 0 || e.kind === "relative");
|
|
36
|
+
}
|
|
37
|
+
function Bt(e) {
|
|
38
|
+
return (e == null ? void 0 : e.kind) === "calendar";
|
|
39
|
+
}
|
|
40
|
+
function ea(e) {
|
|
41
|
+
return R(e) && e.anchor === "latest_available" || Vt(e) ? null : R(e) && e.unit === "day" && e.completeness !== "complete_periods" ? { mode: "between", unit: "day", from: 1 - e.value, to: 0 } : qt(R(e) ? { ...e, anchor: "now" } : e);
|
|
42
|
+
}
|
|
43
|
+
const Lt = /* @__PURE__ */ new Set(["week", "month", "quarter", "year"]);
|
|
44
|
+
function Vt(e) {
|
|
45
|
+
return R(e) && Lt.has(e.unit) && e.completeness !== "complete_periods";
|
|
46
|
+
}
|
|
47
|
+
function ta(e) {
|
|
48
|
+
const t = e;
|
|
49
|
+
return t.mode === "between" ? t.unit === "day" && t.to === 0 && typeof t.from == "number" && t.from <= 0 ? { unit: "day", value: 1 - t.from } : null : t.mode === "last" && typeof t.n == "number" ? t.relativeTo === "latest_data" ? null : {
|
|
50
|
+
unit: t.unit,
|
|
51
|
+
value: t.n,
|
|
52
|
+
anchor: "now",
|
|
53
|
+
completeness: t.complete ? "complete_periods" : "include_partial"
|
|
54
|
+
} : t.mode === "this" ? t.boundary ? null : { kind: "calendar", unit: t.unit, period: "this", ...t.toDate ? { toDate: !0 } : {} } : t.mode === "previous" ? { kind: "calendar", unit: t.unit, period: "previous" } : null;
|
|
55
|
+
}
|
|
56
|
+
function qt(e, t = {}) {
|
|
57
|
+
if (Bt(e))
|
|
58
|
+
return e.period === "previous" ? { mode: "previous", unit: e.unit } : {
|
|
59
|
+
mode: "this",
|
|
60
|
+
unit: e.unit,
|
|
61
|
+
...e.toDate ? { toDate: !0 } : {}
|
|
62
|
+
};
|
|
63
|
+
if (!R(e))
|
|
64
|
+
return null;
|
|
65
|
+
const i = Pt(e) === "latest_available" ? { relativeTo: "latest_data" } : {}, o = e.value, a = (t.completeness ?? e.completeness) === "complete_periods";
|
|
66
|
+
switch (e.unit) {
|
|
67
|
+
case "second":
|
|
68
|
+
return null;
|
|
69
|
+
case "minute":
|
|
70
|
+
case "hour":
|
|
71
|
+
return a ? null : { mode: "last", n: o, unit: e.unit, ...i };
|
|
72
|
+
default:
|
|
73
|
+
return {
|
|
74
|
+
mode: "last",
|
|
75
|
+
n: o,
|
|
76
|
+
unit: e.unit,
|
|
77
|
+
...a ? { complete: !0 } : {},
|
|
78
|
+
...i
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
34
82
|
function r(e, t, i) {
|
|
35
83
|
return i ? { code: e, message: t, path: i } : { code: e, message: t };
|
|
36
84
|
}
|
|
37
85
|
function m(e) {
|
|
38
86
|
return typeof e == "string" && e.trim().length > 0;
|
|
39
87
|
}
|
|
40
|
-
function
|
|
88
|
+
function Ut(e) {
|
|
41
89
|
const t = /* @__PURE__ */ new Set();
|
|
42
|
-
return
|
|
90
|
+
return Ht(e, (i) => (t.add(i), `{${i}}`)), Array.from(t);
|
|
43
91
|
}
|
|
44
|
-
function
|
|
92
|
+
function Ht(e, t) {
|
|
45
93
|
let i = "", o = 0, a = 0;
|
|
46
94
|
for (; a < e.length; ) {
|
|
47
95
|
const s = e[a];
|
|
48
96
|
if (s === "'" || s === '"') {
|
|
49
|
-
a =
|
|
97
|
+
a = Gt(e, a);
|
|
50
98
|
continue;
|
|
51
99
|
}
|
|
52
100
|
if (s === "{") {
|
|
@@ -63,7 +111,7 @@ function Pt(e, t) {
|
|
|
63
111
|
}
|
|
64
112
|
return i + e.slice(o);
|
|
65
113
|
}
|
|
66
|
-
function
|
|
114
|
+
function Gt(e, t) {
|
|
67
115
|
const i = e[t];
|
|
68
116
|
let o = t + 1;
|
|
69
117
|
for (; o < e.length; ) {
|
|
@@ -81,7 +129,7 @@ function Bt(e, t) {
|
|
|
81
129
|
function f(e) {
|
|
82
130
|
return !!(e && typeof e == "object" && !Array.isArray(e));
|
|
83
131
|
}
|
|
84
|
-
const
|
|
132
|
+
const zt = /* @__PURE__ */ new Set([
|
|
85
133
|
"SUM",
|
|
86
134
|
"COUNT",
|
|
87
135
|
"AVG",
|
|
@@ -90,7 +138,7 @@ const Lt = /* @__PURE__ */ new Set([
|
|
|
90
138
|
"MEDIAN",
|
|
91
139
|
"DISTINCT"
|
|
92
140
|
]);
|
|
93
|
-
function
|
|
141
|
+
function le(e, t, i) {
|
|
94
142
|
if (!e || typeof e != "object") {
|
|
95
143
|
i.push(
|
|
96
144
|
r("missing_source", "Analytics intent needs a source.", t)
|
|
@@ -156,10 +204,10 @@ function b(e, t, i, o = {}) {
|
|
|
156
204
|
"Field reference needs a name.",
|
|
157
205
|
`${t}.name`
|
|
158
206
|
)
|
|
159
|
-
), e.source !== void 0 &&
|
|
207
|
+
), e.source !== void 0 && le(e.source, `${t}.source`, i), de(e.aggregate, `${t}.aggregate`, i);
|
|
160
208
|
}
|
|
161
|
-
function
|
|
162
|
-
e !== void 0 && (typeof e != "string" || !
|
|
209
|
+
function de(e, t, i) {
|
|
210
|
+
e !== void 0 && (typeof e != "string" || !zt.has(e)) && i.push(
|
|
163
211
|
r(
|
|
164
212
|
"invalid_aggregate",
|
|
165
213
|
"Field aggregate must be SUM, COUNT, AVG, MIN, MAX, MEDIAN, or DISTINCT.",
|
|
@@ -167,20 +215,20 @@ function le(e, t, i) {
|
|
|
167
215
|
)
|
|
168
216
|
);
|
|
169
217
|
}
|
|
170
|
-
const
|
|
218
|
+
const Qt = /* @__PURE__ */ new Set([
|
|
171
219
|
"measure",
|
|
172
220
|
"dimension",
|
|
173
221
|
"date",
|
|
174
222
|
"id",
|
|
175
223
|
"unknown"
|
|
176
|
-
]),
|
|
224
|
+
]), Kt = /* @__PURE__ */ new Set(["row", "aggregate"]), qe = /* @__PURE__ */ new Set([
|
|
177
225
|
"string",
|
|
178
226
|
"number",
|
|
179
227
|
"boolean",
|
|
180
228
|
"date",
|
|
181
229
|
"datetime",
|
|
182
230
|
"unknown"
|
|
183
|
-
]),
|
|
231
|
+
]), Xt = /* @__PURE__ */ new Set([
|
|
184
232
|
"number",
|
|
185
233
|
"currency",
|
|
186
234
|
"percent",
|
|
@@ -191,14 +239,14 @@ const Vt = /* @__PURE__ */ new Set([
|
|
|
191
239
|
"duration",
|
|
192
240
|
"string",
|
|
193
241
|
"temporal_bucket"
|
|
194
|
-
]),
|
|
242
|
+
]), Zt = /* @__PURE__ */ new Set([
|
|
195
243
|
"millisecond",
|
|
196
244
|
"second",
|
|
197
245
|
"minute",
|
|
198
246
|
"hour",
|
|
199
247
|
"day"
|
|
200
|
-
]),
|
|
201
|
-
function
|
|
248
|
+
]), Wt = /* @__PURE__ */ new Set(["compact", "digital", "long"]);
|
|
249
|
+
function Ue(e, t, i) {
|
|
202
250
|
if (e === void 0)
|
|
203
251
|
return;
|
|
204
252
|
if (!f(e)) {
|
|
@@ -212,13 +260,13 @@ function qe(e, t, i) {
|
|
|
212
260
|
return;
|
|
213
261
|
}
|
|
214
262
|
const o = e;
|
|
215
|
-
(typeof o.type != "string" || !
|
|
263
|
+
(typeof o.type != "string" || !Xt.has(o.type)) && i.push(
|
|
216
264
|
r(
|
|
217
265
|
"invalid_value_format_type",
|
|
218
266
|
"Value format type must be number, currency, percent, percentage, scientific, date, datetime, duration, string, or temporal_bucket.",
|
|
219
267
|
`${t}.type`
|
|
220
268
|
)
|
|
221
|
-
), o.type === "temporal_bucket" && !
|
|
269
|
+
), o.type === "temporal_bucket" && !U.safeParse(e).success && i.push(
|
|
222
270
|
r(
|
|
223
271
|
"invalid_temporal_bucket_format",
|
|
224
272
|
"Temporal bucket format must contain a valid auto, preset, or pattern presentation.",
|
|
@@ -230,15 +278,15 @@ function qe(e, t, i) {
|
|
|
230
278
|
"Numeric value formats cannot define viewer locale.",
|
|
231
279
|
`${t}.locale`
|
|
232
280
|
)
|
|
233
|
-
),
|
|
281
|
+
), Y(
|
|
234
282
|
e.minimumFractionDigits,
|
|
235
283
|
`${t}.minimumFractionDigits`,
|
|
236
284
|
i
|
|
237
|
-
),
|
|
285
|
+
), Y(
|
|
238
286
|
e.maximumFractionDigits,
|
|
239
287
|
`${t}.maximumFractionDigits`,
|
|
240
288
|
i
|
|
241
|
-
),
|
|
289
|
+
), Y(e.scale, `${t}.scale`, i), Y(e.maxUnits, `${t}.maxUnits`, i), e.useGrouping !== void 0 && typeof e.useGrouping != "boolean" && i.push(
|
|
242
290
|
r(
|
|
243
291
|
"invalid_value_format_use_grouping",
|
|
244
292
|
"Value format useGrouping must be boolean.",
|
|
@@ -259,7 +307,7 @@ function qe(e, t, i) {
|
|
|
259
307
|
);
|
|
260
308
|
for (const a of ["inputUnit", "largestUnit", "smallestUnit"]) {
|
|
261
309
|
const s = e[a];
|
|
262
|
-
s !== void 0 && (typeof s != "string" || !
|
|
310
|
+
s !== void 0 && (typeof s != "string" || !Zt.has(s)) && i.push(
|
|
263
311
|
r(
|
|
264
312
|
"invalid_value_format_duration_unit",
|
|
265
313
|
"Duration format units must be millisecond, second, minute, hour, or day.",
|
|
@@ -267,7 +315,7 @@ function qe(e, t, i) {
|
|
|
267
315
|
)
|
|
268
316
|
);
|
|
269
317
|
}
|
|
270
|
-
e.outputStyle !== void 0 && (typeof e.outputStyle != "string" || !
|
|
318
|
+
e.outputStyle !== void 0 && (typeof e.outputStyle != "string" || !Wt.has(e.outputStyle)) && i.push(
|
|
271
319
|
r(
|
|
272
320
|
"invalid_value_format_duration_style",
|
|
273
321
|
"Duration format outputStyle must be compact, digital, or long.",
|
|
@@ -275,7 +323,7 @@ function qe(e, t, i) {
|
|
|
275
323
|
)
|
|
276
324
|
);
|
|
277
325
|
}
|
|
278
|
-
function
|
|
326
|
+
function Y(e, t, i) {
|
|
279
327
|
e !== void 0 && (typeof e != "number" || !Number.isFinite(e)) && i.push(
|
|
280
328
|
r(
|
|
281
329
|
"invalid_value_format_number",
|
|
@@ -284,20 +332,20 @@ function O(e, t, i) {
|
|
|
284
332
|
)
|
|
285
333
|
);
|
|
286
334
|
}
|
|
287
|
-
const
|
|
335
|
+
const Jt = /* @__PURE__ */ new Set([
|
|
288
336
|
"additive",
|
|
289
337
|
"non_additive",
|
|
290
338
|
"ratio_of_sums",
|
|
291
339
|
"weighted",
|
|
292
340
|
"pre_aggregated",
|
|
293
341
|
"snapshot"
|
|
294
|
-
]),
|
|
342
|
+
]), ei = /* @__PURE__ */ new Set([
|
|
295
343
|
"default",
|
|
296
344
|
"symmetric_aggregate",
|
|
297
345
|
"aggregate_then_join",
|
|
298
346
|
"weighted"
|
|
299
347
|
]);
|
|
300
|
-
function
|
|
348
|
+
function ti(e, t, i) {
|
|
301
349
|
if (!e || !f(e)) {
|
|
302
350
|
i.push(
|
|
303
351
|
r(
|
|
@@ -309,7 +357,7 @@ function Qt(e, t, i) {
|
|
|
309
357
|
return;
|
|
310
358
|
}
|
|
311
359
|
if (e.kind === "field") {
|
|
312
|
-
b(e.field, `${t}.field`, i, { required: !0 }),
|
|
360
|
+
b(e.field, `${t}.field`, i, { required: !0 }), de(e.aggregate, `${t}.aggregate`, i);
|
|
313
361
|
return;
|
|
314
362
|
}
|
|
315
363
|
i.push(
|
|
@@ -320,7 +368,7 @@ function Qt(e, t, i) {
|
|
|
320
368
|
)
|
|
321
369
|
);
|
|
322
370
|
}
|
|
323
|
-
function
|
|
371
|
+
function ue(e) {
|
|
324
372
|
const t = [];
|
|
325
373
|
if (!f(e))
|
|
326
374
|
return t.push(
|
|
@@ -347,19 +395,19 @@ function de(e) {
|
|
|
347
395
|
"Derived field needs a label.",
|
|
348
396
|
"label"
|
|
349
397
|
)
|
|
350
|
-
),
|
|
398
|
+
), Qt.has(e.resultRole) || t.push(
|
|
351
399
|
r(
|
|
352
400
|
"invalid_derived_field_role",
|
|
353
401
|
"Derived field resultRole must be measure, dimension, date, id, or unknown.",
|
|
354
402
|
"resultRole"
|
|
355
403
|
)
|
|
356
|
-
),
|
|
404
|
+
), qe.has(e.dataType) || t.push(
|
|
357
405
|
r(
|
|
358
406
|
"invalid_derived_field_data_type",
|
|
359
407
|
"Derived field dataType must be string, number, boolean, date, datetime, or unknown.",
|
|
360
408
|
"dataType"
|
|
361
409
|
)
|
|
362
|
-
),
|
|
410
|
+
), Kt.has(e.computeStage) || t.push(
|
|
363
411
|
r(
|
|
364
412
|
"invalid_derived_field_compute_stage",
|
|
365
413
|
"Derived field computeStage must be row or aggregate.",
|
|
@@ -383,11 +431,11 @@ function de(e) {
|
|
|
383
431
|
"Row-stage measure derived fields must declare defaultAggregate so row results have explicit rollup semantics.",
|
|
384
432
|
"defaultAggregate"
|
|
385
433
|
)
|
|
386
|
-
),
|
|
434
|
+
), de(
|
|
387
435
|
e.defaultAggregate,
|
|
388
436
|
"defaultAggregate",
|
|
389
437
|
t
|
|
390
|
-
), e.aggregationBehavior !== void 0 && !
|
|
438
|
+
), e.aggregationBehavior !== void 0 && !Jt.has(
|
|
391
439
|
e.aggregationBehavior
|
|
392
440
|
) && t.push(
|
|
393
441
|
r(
|
|
@@ -395,7 +443,7 @@ function de(e) {
|
|
|
395
443
|
"Derived field aggregationBehavior is not supported.",
|
|
396
444
|
"aggregationBehavior"
|
|
397
445
|
)
|
|
398
|
-
), e.aggregationStrategy !== void 0 && !
|
|
446
|
+
), e.aggregationStrategy !== void 0 && !ei.has(
|
|
399
447
|
e.aggregationStrategy
|
|
400
448
|
) && t.push(
|
|
401
449
|
r(
|
|
@@ -432,13 +480,13 @@ function de(e) {
|
|
|
432
480
|
);
|
|
433
481
|
return;
|
|
434
482
|
}
|
|
435
|
-
|
|
483
|
+
ti(
|
|
436
484
|
a,
|
|
437
485
|
`inputs.${o}`,
|
|
438
486
|
t
|
|
439
487
|
);
|
|
440
488
|
}), m(e.expression) && f(e.inputs)) {
|
|
441
|
-
const o =
|
|
489
|
+
const o = Ut(
|
|
442
490
|
e.expression
|
|
443
491
|
), a = new Set(o), s = Object.keys(e.inputs).filter(
|
|
444
492
|
(l) => m(l)
|
|
@@ -468,7 +516,7 @@ function de(e) {
|
|
|
468
516
|
"Derived field computation metadata cannot own temporal bucket presentation; declare grain and format on the grouped field.",
|
|
469
517
|
"format"
|
|
470
518
|
)
|
|
471
|
-
) :
|
|
519
|
+
) : Ue(i, "format", t), e.tags !== void 0 && (!Array.isArray(e.tags) || e.tags.some((o) => !m(o))) && t.push(
|
|
472
520
|
r(
|
|
473
521
|
"invalid_derived_field_tags",
|
|
474
522
|
"Derived field tags must be non-empty strings.",
|
|
@@ -476,55 +524,55 @@ function de(e) {
|
|
|
476
524
|
)
|
|
477
525
|
), { ok: t.length === 0, errors: t, warnings: [] };
|
|
478
526
|
}
|
|
479
|
-
const
|
|
480
|
-
|
|
527
|
+
const M = n.string().min(1).refine((e) => e.trim().length > 0, "Must not be blank."), [ii, ni, ai, oi] = Be.options, He = n.union([
|
|
528
|
+
ii.innerType().omit({ locale: !0 }).strict().superRefine((e, t) => {
|
|
481
529
|
const { minimumFractionDigits: i = 0, maximumFractionDigits: o = 2 } = e;
|
|
482
530
|
(![i, o].every((a) => Number.isInteger(a) && a >= 0 && a <= 20) || i > o) && t.addIssue({
|
|
483
531
|
code: "custom",
|
|
484
532
|
message: "Fraction digits must be integers from 0 to 20 with minimum <= maximum."
|
|
485
533
|
}), e.scale !== void 0 && !Number.isFinite(e.scale) && t.addIssue({ code: "custom", message: "Scale must be finite." });
|
|
486
534
|
}),
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
]),
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
]),
|
|
494
|
-
Mt.extend({ domainId:
|
|
495
|
-
|
|
496
|
-
]),
|
|
497
|
-
name:
|
|
498
|
-
source:
|
|
499
|
-
}).strict(),
|
|
500
|
-
format:
|
|
535
|
+
ni.strict(),
|
|
536
|
+
ai.strict(),
|
|
537
|
+
oi.strict()
|
|
538
|
+
]), ke = n.union([
|
|
539
|
+
He,
|
|
540
|
+
U
|
|
541
|
+
]), ce = n.union([
|
|
542
|
+
Mt.extend({ domainId: M, datasetName: M }).strict(),
|
|
543
|
+
Rt.extend({ connectionId: M, tableName: M }).strict()
|
|
544
|
+
]), Ge = Tt.extend({
|
|
545
|
+
name: M,
|
|
546
|
+
source: ce.optional()
|
|
547
|
+
}).strict(), pe = Et.extend({
|
|
548
|
+
format: He.optional(),
|
|
501
549
|
inputs: n.record(
|
|
502
550
|
n.object({
|
|
503
551
|
kind: n.literal("field"),
|
|
504
|
-
field:
|
|
505
|
-
aggregate:
|
|
552
|
+
field: Ge,
|
|
553
|
+
aggregate: Le.optional()
|
|
506
554
|
}).strict()
|
|
507
555
|
)
|
|
508
556
|
}).strict().superRefine((e, t) => {
|
|
509
557
|
var i;
|
|
510
|
-
for (const o of
|
|
558
|
+
for (const o of ue(e).errors)
|
|
511
559
|
t.addIssue({
|
|
512
560
|
code: "custom",
|
|
513
561
|
path: ((i = o.path) == null ? void 0 : i.split(".")) ?? [],
|
|
514
562
|
message: o.message
|
|
515
563
|
});
|
|
516
|
-
}),
|
|
517
|
-
derivedField:
|
|
564
|
+
}), si = Ge.extend({
|
|
565
|
+
derivedField: pe.optional()
|
|
518
566
|
}).strict();
|
|
519
|
-
function
|
|
567
|
+
function me(e) {
|
|
520
568
|
return typeof e == "string" ? e.trim().toLowerCase() : "";
|
|
521
569
|
}
|
|
522
|
-
function
|
|
570
|
+
function ri(e) {
|
|
523
571
|
return String(
|
|
524
572
|
e.column_name || e.name || e.qualifiedFieldName || ""
|
|
525
573
|
);
|
|
526
574
|
}
|
|
527
|
-
function
|
|
575
|
+
function li(e) {
|
|
528
576
|
return Array.from(
|
|
529
577
|
new Set(
|
|
530
578
|
[e.column_name, e.name, e.qualifiedFieldName, e.alias].filter(
|
|
@@ -533,11 +581,11 @@ function ii(e) {
|
|
|
533
581
|
)
|
|
534
582
|
);
|
|
535
583
|
}
|
|
536
|
-
function
|
|
537
|
-
const t =
|
|
538
|
-
return t ?
|
|
584
|
+
function fe(e) {
|
|
585
|
+
const t = Qe(e);
|
|
586
|
+
return t ? pi(t) ? "number" : t.includes("timestamp") || t.includes("datetime") || t.startsWith("time") ? "datetime" : t.includes("date") ? "date" : t.includes("bool") ? "boolean" : "string" : "unknown";
|
|
539
587
|
}
|
|
540
|
-
const
|
|
588
|
+
const Q = /* @__PURE__ */ new Map([
|
|
541
589
|
// Integer families (PostgreSQL, ClickHouse, DuckDB, MySQL).
|
|
542
590
|
["int", "integer"],
|
|
543
591
|
["uint", "integer"],
|
|
@@ -566,34 +614,34 @@ const z = /* @__PURE__ */ new Map([
|
|
|
566
614
|
["money", null],
|
|
567
615
|
["currency", null],
|
|
568
616
|
["percent", null]
|
|
569
|
-
]),
|
|
570
|
-
function
|
|
617
|
+
]), di = ["int", "uint", "decimal", "float"];
|
|
618
|
+
function ui(e) {
|
|
571
619
|
return e.length > 0 && Array.from(e).every((t) => t >= "0" && t <= "9");
|
|
572
620
|
}
|
|
573
|
-
function
|
|
621
|
+
function ci(e) {
|
|
574
622
|
var i;
|
|
575
623
|
const t = (i = /^number\s*\(\s*\d+\s*,\s*(\d+)\s*\)$/.exec(e)) == null ? void 0 : i[1];
|
|
576
624
|
return t === void 0 ? null : Number(t) === 0 ? "integer" : "decimal";
|
|
577
625
|
}
|
|
578
|
-
function
|
|
626
|
+
function ze(e) {
|
|
579
627
|
const t = e.split(/[\s(]/, 1)[0] || "";
|
|
580
628
|
if (t === "number")
|
|
581
|
-
return { numeric: !0, kind:
|
|
582
|
-
if (
|
|
583
|
-
return { numeric: !0, kind:
|
|
584
|
-
const i =
|
|
585
|
-
(o) => t.startsWith(o) &&
|
|
629
|
+
return { numeric: !0, kind: ci(e) };
|
|
630
|
+
if (Q.has(t))
|
|
631
|
+
return { numeric: !0, kind: Q.get(t) ?? null };
|
|
632
|
+
const i = di.find(
|
|
633
|
+
(o) => t.startsWith(o) && ui(t.slice(o.length))
|
|
586
634
|
);
|
|
587
|
-
return i ? { numeric: !0, kind:
|
|
635
|
+
return i ? { numeric: !0, kind: Q.get(i) ?? null } : { numeric: !1, kind: null };
|
|
588
636
|
}
|
|
589
|
-
function
|
|
590
|
-
return
|
|
637
|
+
function pi(e) {
|
|
638
|
+
return ze(e).numeric;
|
|
591
639
|
}
|
|
592
|
-
function
|
|
593
|
-
return
|
|
640
|
+
function mi(e) {
|
|
641
|
+
return ze(Qe(e)).kind;
|
|
594
642
|
}
|
|
595
|
-
function
|
|
596
|
-
let t =
|
|
643
|
+
function Qe(e) {
|
|
644
|
+
let t = me(e), i = "";
|
|
597
645
|
for (; t && t !== i; )
|
|
598
646
|
i = t, t = we(t, "nullable"), t = we(t, "lowcardinality");
|
|
599
647
|
return t;
|
|
@@ -602,47 +650,47 @@ function we(e, t) {
|
|
|
602
650
|
const i = `${t}(`;
|
|
603
651
|
return !e.startsWith(i) || !e.endsWith(")") ? e : e.slice(i.length, -1).trim();
|
|
604
652
|
}
|
|
605
|
-
function
|
|
606
|
-
const t =
|
|
653
|
+
function fi(e) {
|
|
654
|
+
const t = fe(e);
|
|
607
655
|
return t === "date" || t === "datetime";
|
|
608
656
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
657
|
+
function Ke(e) {
|
|
658
|
+
return fi(e.dataType || e.data_type);
|
|
611
659
|
}
|
|
612
|
-
function
|
|
613
|
-
const t =
|
|
660
|
+
function Xe(e) {
|
|
661
|
+
const t = Ze(e);
|
|
614
662
|
return t === "id" || t === "row_id";
|
|
615
663
|
}
|
|
616
|
-
function
|
|
617
|
-
const t =
|
|
618
|
-
return
|
|
664
|
+
function Ae(e) {
|
|
665
|
+
const t = Ze(e);
|
|
666
|
+
return Xe(e) || t.endsWith("_id") || t.endsWith("_key") || t.endsWith("_number");
|
|
619
667
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
622
|
-
|
|
668
|
+
function Ze(e) {
|
|
669
|
+
return me(
|
|
670
|
+
ri(e) || e.name || e.alias
|
|
623
671
|
).replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
624
672
|
}
|
|
625
|
-
function
|
|
626
|
-
const i =
|
|
627
|
-
return i === "metric" || i === "measure" ? !t.excludeIdentifiers || !
|
|
673
|
+
function We(e, t = {}) {
|
|
674
|
+
const i = me(e.role);
|
|
675
|
+
return i === "metric" || i === "measure" ? !t.excludeIdentifiers || !Ae(e) : i === "groupby" || i === "dimension" || i === "date" || i === "id" ? !1 : fe(
|
|
628
676
|
e.dataType || e.data_type
|
|
629
|
-
) === "number" && (!t.excludeIdentifiers || !
|
|
677
|
+
) === "number" && (!t.excludeIdentifiers || !Ae(e));
|
|
630
678
|
}
|
|
631
|
-
function
|
|
632
|
-
return !
|
|
679
|
+
function ia(e) {
|
|
680
|
+
return !We(e) && !Ke(e);
|
|
633
681
|
}
|
|
634
|
-
function
|
|
682
|
+
function na(e) {
|
|
635
683
|
const t = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
636
684
|
for (const a of e) {
|
|
637
|
-
if (
|
|
685
|
+
if (Xe(a))
|
|
638
686
|
continue;
|
|
639
|
-
const s =
|
|
687
|
+
const s = li(a);
|
|
640
688
|
if (s.length !== 0) {
|
|
641
|
-
if (
|
|
689
|
+
if (Ke(a)) {
|
|
642
690
|
s.forEach((l) => i.add(l));
|
|
643
691
|
continue;
|
|
644
692
|
}
|
|
645
|
-
if (
|
|
693
|
+
if (We(a, { excludeIdentifiers: !0 })) {
|
|
646
694
|
s.forEach((l) => t.add(l));
|
|
647
695
|
continue;
|
|
648
696
|
}
|
|
@@ -655,8 +703,8 @@ function Kn(e) {
|
|
|
655
703
|
validDimensionCandidates: Array.from(o).sort()
|
|
656
704
|
};
|
|
657
705
|
}
|
|
658
|
-
const
|
|
659
|
-
function
|
|
706
|
+
const T = 16 * 1024;
|
|
707
|
+
function L(e) {
|
|
660
708
|
const t = /^([+-]?)(?:(\d+)(?:\.(\d*))?|\.(\d+))(?:[eE]([+-]?\d+))?$/.exec(e);
|
|
661
709
|
return t ? {
|
|
662
710
|
sign: t[1],
|
|
@@ -665,44 +713,44 @@ function B(e) {
|
|
|
665
713
|
exponent: Number(t[5] ?? "0")
|
|
666
714
|
} : null;
|
|
667
715
|
}
|
|
668
|
-
function
|
|
716
|
+
function xe(e) {
|
|
669
717
|
const { sign: t, whole: i, fraction: o = "", exponent: a } = e, s = (i + o).replace(/^0+/, ""), l = s.replace(/0+$/, ""), d = a - o.length + s.length - l.length;
|
|
670
718
|
return !Number.isSafeInteger(a) || !Number.isSafeInteger(d) ? null : l ? `${t === "-" ? "-" : ""}${l}e${d}` : "0";
|
|
671
719
|
}
|
|
672
|
-
function
|
|
673
|
-
const t =
|
|
720
|
+
function gi(e) {
|
|
721
|
+
const t = L(e);
|
|
674
722
|
if (!t) return null;
|
|
675
723
|
const i = t.sign === "+" ? e.slice(1) : e, o = Number(e);
|
|
676
724
|
if (!Number.isFinite(o)) return i;
|
|
677
|
-
const a =
|
|
678
|
-
return a !== null && s !== null && a ===
|
|
725
|
+
const a = xe(t), s = L(String(o));
|
|
726
|
+
return a !== null && s !== null && a === xe(s) ? o : i;
|
|
679
727
|
}
|
|
680
|
-
function
|
|
681
|
-
if (e.length >
|
|
728
|
+
function hi(e) {
|
|
729
|
+
if (e.length > T)
|
|
682
730
|
throw new RangeError("Exact numeric text exceeds 16 KiB.");
|
|
683
|
-
const t =
|
|
731
|
+
const t = L(e);
|
|
684
732
|
if (!t) throw new TypeError("Expected finite decimal text.");
|
|
685
733
|
const { sign: i, whole: o, fraction: a, exponent: s } = t, l = `${i}${o || "0"}${a ? `.${a}` : ""}`;
|
|
686
734
|
return x(`${l}e${s}`);
|
|
687
735
|
}
|
|
688
736
|
function x(e) {
|
|
689
|
-
if (e.length >
|
|
737
|
+
if (e.length > T)
|
|
690
738
|
throw new RangeError("Exact numeric text exceeds 16 KiB.");
|
|
691
|
-
const t =
|
|
739
|
+
const t = L(e);
|
|
692
740
|
if (!t || t.whole === "" || t.fraction === "")
|
|
693
741
|
throw new TypeError("Expected finite decimal text.");
|
|
694
742
|
const { sign: i, whole: o, fraction: a = "", exponent: s } = t;
|
|
695
|
-
if (!Number.isSafeInteger(s) || Math.abs(s) >
|
|
743
|
+
if (!Number.isSafeInteger(s) || Math.abs(s) > T)
|
|
696
744
|
throw new RangeError("Exact numeric exponent exceeds the text budget.");
|
|
697
745
|
const l = o + a, d = o.length + s;
|
|
698
|
-
if (Math.max(l.length, d) + Math.max(0, -d) + 3 >
|
|
746
|
+
if (Math.max(l.length, d) + Math.max(0, -d) + 3 > T)
|
|
699
747
|
throw new RangeError("Normalized exact numeric text exceeds 16 KiB.");
|
|
700
748
|
let p;
|
|
701
749
|
d <= 0 ? p = `0.${"0".repeat(-d)}${l}` : d >= l.length ? p = l + "0".repeat(d - l.length) : p = `${l.slice(0, d)}.${l.slice(d)}`;
|
|
702
750
|
const [u, _ = ""] = p.split("."), y = u.replace(/^0+(?=\d)/, ""), I = _.replace(/0+$/, ""), h = y + (I ? `.${I}` : "");
|
|
703
751
|
return i === "-" && h !== "0" ? `-${h}` : h;
|
|
704
752
|
}
|
|
705
|
-
function
|
|
753
|
+
function Je(e, t) {
|
|
706
754
|
const i = e.startsWith("-"), o = t.startsWith("-");
|
|
707
755
|
if (i !== o) return i ? -1 : 1;
|
|
708
756
|
const [a, s = ""] = (i ? e.slice(1) : e).split("."), [l, d = ""] = (o ? t.slice(1) : t).split(".");
|
|
@@ -713,7 +761,7 @@ function Ze(e, t) {
|
|
|
713
761
|
}
|
|
714
762
|
return c === 0 ? 0 : i ? -c : c;
|
|
715
763
|
}
|
|
716
|
-
function
|
|
764
|
+
function aa(e, t) {
|
|
717
765
|
if (typeof t == "number" && !Number.isFinite(t))
|
|
718
766
|
throw new TypeError("Numeric scale must be finite.");
|
|
719
767
|
const i = [e, x(String(t))].map((s) => {
|
|
@@ -722,34 +770,34 @@ function Xn(e, t) {
|
|
|
722
770
|
}), o = i[0].coefficient * i[1].coefficient, a = i[0].digits + i[1].digits;
|
|
723
771
|
return x(`${o}e-${a}`);
|
|
724
772
|
}
|
|
725
|
-
function
|
|
773
|
+
function _i(e) {
|
|
726
774
|
try {
|
|
727
775
|
return x(e) === e;
|
|
728
776
|
} catch {
|
|
729
777
|
return !1;
|
|
730
778
|
}
|
|
731
779
|
}
|
|
732
|
-
const
|
|
780
|
+
const et = n.object({
|
|
733
781
|
kind: n.literal("exact_number"),
|
|
734
782
|
type: n.enum(["integer", "decimal"]),
|
|
735
|
-
value: n.string().max(
|
|
783
|
+
value: n.string().max(T).refine(_i, "Expected canonical decimal text.")
|
|
736
784
|
}).strict().superRefine((e, t) => {
|
|
737
785
|
e.type === "integer" && e.value.includes(".") && t.addIssue({ code: "custom", path: ["value"], message: "An integer cannot have fractional digits." });
|
|
738
|
-
}),
|
|
786
|
+
}), B = n.union([
|
|
739
787
|
n.null(),
|
|
740
788
|
n.string(),
|
|
741
789
|
n.boolean(),
|
|
742
790
|
n.number().finite(),
|
|
743
|
-
|
|
791
|
+
et
|
|
744
792
|
]);
|
|
745
|
-
function
|
|
746
|
-
return
|
|
793
|
+
function yi(e, t) {
|
|
794
|
+
return et.parse({ kind: "exact_number", type: t, value: x(e) });
|
|
747
795
|
}
|
|
748
|
-
function
|
|
796
|
+
function V(e) {
|
|
749
797
|
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";
|
|
750
798
|
}
|
|
751
|
-
function
|
|
752
|
-
const t =
|
|
799
|
+
function oa(e) {
|
|
800
|
+
const t = mi(e.nativeDataType);
|
|
753
801
|
if (!t) throw new TypeError("Numeric result type is not established.");
|
|
754
802
|
if (e.value === null) return null;
|
|
755
803
|
if (t === "float") {
|
|
@@ -759,12 +807,12 @@ function Zn(e) {
|
|
|
759
807
|
}
|
|
760
808
|
if (e.exactText === void 0)
|
|
761
809
|
throw new TypeError("Exact numeric sidecar is required; rounded result values cannot substitute.");
|
|
762
|
-
return
|
|
810
|
+
return yi(e.exactText, t);
|
|
763
811
|
}
|
|
764
|
-
const
|
|
765
|
-
n.object({ kind: n.literal("value"), value:
|
|
766
|
-
n.object({ kind: n.literal("others"), rankingId:
|
|
767
|
-
]), F = n.array(n.object({ levelId:
|
|
812
|
+
const ge = n.string().uuid(), he = n.enum(["rows", "columns"]), bi = n.enum(["member", "subtotal", "grand_total", "others"]), vi = n.discriminatedUnion("kind", [
|
|
813
|
+
n.object({ kind: n.literal("value"), value: B }).strict(),
|
|
814
|
+
n.object({ kind: n.literal("others"), rankingId: ge }).strict()
|
|
815
|
+
]), F = n.array(n.object({ levelId: ge, member: vi }).strict()).readonly().superRefine((e, t) => {
|
|
768
816
|
new Set(e.map((i) => i.levelId)).size !== e.length && t.addIssue({
|
|
769
817
|
code: "custom",
|
|
770
818
|
path: [],
|
|
@@ -776,12 +824,12 @@ const fe = n.string().uuid(), ge = n.enum(["rows", "columns"]), mi = n.enum(["me
|
|
|
776
824
|
path: [],
|
|
777
825
|
message: "Others is terminal."
|
|
778
826
|
});
|
|
779
|
-
}),
|
|
827
|
+
}), sa = n.object({
|
|
780
828
|
rowPath: F,
|
|
781
829
|
columnPath: F,
|
|
782
|
-
measureId:
|
|
830
|
+
measureId: ge
|
|
783
831
|
}).strict();
|
|
784
|
-
function
|
|
832
|
+
function tt(e) {
|
|
785
833
|
return JSON.stringify(
|
|
786
834
|
e.map(({ levelId: t, member: i }) => [
|
|
787
835
|
t,
|
|
@@ -789,11 +837,11 @@ function et(e) {
|
|
|
789
837
|
])
|
|
790
838
|
);
|
|
791
839
|
}
|
|
792
|
-
const
|
|
793
|
-
function
|
|
840
|
+
const J = "SEMAPHOR_CALCULATED_FIELD", Ii = "calculated_fields";
|
|
841
|
+
function Si(e) {
|
|
794
842
|
return (e == null ? void 0 : e.sourceField) || (e == null ? void 0 : e.name) || "";
|
|
795
843
|
}
|
|
796
|
-
const
|
|
844
|
+
const ki = [
|
|
797
845
|
// Day granularity formats
|
|
798
846
|
"MM-DD-YYYY",
|
|
799
847
|
"YYYY-MM-DD",
|
|
@@ -828,16 +876,16 @@ const _i = [
|
|
|
828
876
|
// Custom format
|
|
829
877
|
"custom"
|
|
830
878
|
];
|
|
831
|
-
function
|
|
879
|
+
function ra(e) {
|
|
832
880
|
return e.role === "metric" && "expression" in e && !!e.expression;
|
|
833
881
|
}
|
|
834
|
-
function
|
|
882
|
+
function la(e) {
|
|
835
883
|
return !!e.expression;
|
|
836
884
|
}
|
|
837
|
-
function
|
|
838
|
-
return !!(e && (e.calculationRepresentation || e.expression || e.derivedField || e.calculatedFieldOrigin || e.calculatedFormula ||
|
|
885
|
+
function wi(e) {
|
|
886
|
+
return !!(e && (e.calculationRepresentation || e.expression || e.derivedField || e.calculatedFieldOrigin || e.calculatedFormula || ee(e)));
|
|
839
887
|
}
|
|
840
|
-
function
|
|
888
|
+
function it(e) {
|
|
841
889
|
var _, y, I;
|
|
842
890
|
if (!e)
|
|
843
891
|
return {
|
|
@@ -848,11 +896,11 @@ function tt(e) {
|
|
|
848
896
|
legacyManual: !1
|
|
849
897
|
};
|
|
850
898
|
const t = e.fieldScope === "domain" ? "domain" : "local", i = ((_ = e.derivedField) == null ? void 0 : _.computeStage) || ((y = e.calculatedFormula) == null ? void 0 : y.computeStage), o = !e.calculatedFormula || Array.isArray(e.calculatedFormula.inputFields) && e.calculatedFormula.inputFields.every((h) => {
|
|
851
|
-
const
|
|
852
|
-
return typeof
|
|
899
|
+
const O = h && Si(h);
|
|
900
|
+
return typeof O == "string" && !!O.trim();
|
|
853
901
|
}), a = typeof e.expression == "string" && !!e.expression.trim() && o, s = e.calculationRepresentation;
|
|
854
902
|
if (e.derivedField || s === "typed-derived") {
|
|
855
|
-
const h = e.derivedField !== void 0 &&
|
|
903
|
+
const h = e.derivedField !== void 0 && ue(e.derivedField).ok;
|
|
856
904
|
return {
|
|
857
905
|
representation: "typed-derived",
|
|
858
906
|
ownership: t,
|
|
@@ -862,7 +910,7 @@ function tt(e) {
|
|
|
862
910
|
legacyManual: !1
|
|
863
911
|
};
|
|
864
912
|
}
|
|
865
|
-
if (!(!!s ||
|
|
913
|
+
if (!(!!s || wi(e)))
|
|
866
914
|
return {
|
|
867
915
|
representation: "physical",
|
|
868
916
|
ownership: t,
|
|
@@ -870,7 +918,7 @@ function tt(e) {
|
|
|
870
918
|
runtimeExecutable: !1,
|
|
871
919
|
legacyManual: !1
|
|
872
920
|
};
|
|
873
|
-
const d = i || (e.role === "groupby" || ((I = e.calculatedFieldOrigin) == null ? void 0 : I.role) === "groupby" ? "row" : void 0), c = t === "domain" ||
|
|
921
|
+
const d = i || (e.role === "groupby" || ((I = e.calculatedFieldOrigin) == null ? void 0 : I.role) === "groupby" ? "row" : void 0), c = t === "domain" || ee(e) || e.fieldScope === "card" || e.fieldScope === "sheet" || e.fieldScope === "dashboard" ? "manual" : "inline-expression", p = s === "manual" || s === "inline-expression" ? s : c, u = (!s || s === "manual" || s === "inline-expression") && !(s === "inline-expression" && ee(e));
|
|
874
922
|
return {
|
|
875
923
|
representation: p,
|
|
876
924
|
ownership: t,
|
|
@@ -880,89 +928,89 @@ function tt(e) {
|
|
|
880
928
|
legacyManual: p === "manual" && t === "local" && !d
|
|
881
929
|
};
|
|
882
930
|
}
|
|
883
|
-
function
|
|
931
|
+
function da(e) {
|
|
884
932
|
if (e.calculationRepresentation) return e;
|
|
885
|
-
const { representation: t } =
|
|
933
|
+
const { representation: t } = it(e);
|
|
886
934
|
return t === "physical" ? e : { ...e, calculationRepresentation: t };
|
|
887
935
|
}
|
|
888
|
-
function
|
|
889
|
-
return
|
|
936
|
+
function ua(e) {
|
|
937
|
+
return it(e).computeStage;
|
|
890
938
|
}
|
|
891
|
-
function
|
|
939
|
+
function ca(e, t) {
|
|
892
940
|
return e === "aggregate" && t === "default";
|
|
893
941
|
}
|
|
894
|
-
function
|
|
942
|
+
function pa(e) {
|
|
895
943
|
var i, o;
|
|
896
944
|
const t = e;
|
|
897
945
|
return !!(t != null && t.expression && ((o = (i = t.calculatedFormula) == null ? void 0 : i.inputFields) != null && o.length));
|
|
898
946
|
}
|
|
899
|
-
function
|
|
900
|
-
return !!(e && (e.entityName ===
|
|
947
|
+
function ma(e) {
|
|
948
|
+
return !!(e && (e.entityName === J || e.entityId === J));
|
|
901
949
|
}
|
|
902
|
-
function
|
|
950
|
+
function ee(e) {
|
|
903
951
|
return e ? [e.entityName, e.entityId, e.qualifiedEntityName].some(
|
|
904
|
-
(t) => t ===
|
|
952
|
+
(t) => t === J || t === Ii
|
|
905
953
|
) : !1;
|
|
906
954
|
}
|
|
907
|
-
var
|
|
908
|
-
function
|
|
955
|
+
var Ai = /* @__PURE__ */ ((e) => (e.SUBTOTAL = "__SUBTOTAL__", e.TOTAL = "__TOTAL__", e.ALL = "__ALL__", e))(Ai || {});
|
|
956
|
+
function fa(e) {
|
|
909
957
|
return typeof e == "object" && e !== null && e.mode === "last" && e.relativeTo === "latest_data";
|
|
910
958
|
}
|
|
911
|
-
function
|
|
959
|
+
function xi(e) {
|
|
912
960
|
return e === "between" || e === "not between";
|
|
913
961
|
}
|
|
914
|
-
const
|
|
962
|
+
const H = n.enum(["day", "week", "month", "quarter", "year"]), Fi = n.enum(["minute", "hour"]), nt = n.number().int().positive(), Fe = n.number().int(), at = n.object({
|
|
915
963
|
mode: n.literal("last"),
|
|
916
|
-
n:
|
|
917
|
-
unit:
|
|
964
|
+
n: nt,
|
|
965
|
+
unit: Fi,
|
|
918
966
|
complete: n.literal(!1).optional(),
|
|
919
967
|
relativeTo: n.literal("latest_data").optional()
|
|
920
|
-
}),
|
|
968
|
+
}), ot = n.object({
|
|
921
969
|
mode: n.literal("last"),
|
|
922
|
-
n:
|
|
923
|
-
unit:
|
|
970
|
+
n: nt,
|
|
971
|
+
unit: H,
|
|
924
972
|
complete: n.boolean().optional(),
|
|
925
973
|
relativeTo: n.literal("latest_data").optional()
|
|
926
|
-
}),
|
|
974
|
+
}), st = n.object({
|
|
927
975
|
mode: n.literal("this"),
|
|
928
|
-
unit:
|
|
976
|
+
unit: H,
|
|
929
977
|
toDate: n.boolean().optional(),
|
|
930
978
|
boundary: n.enum(["first_day", "last_day"]).optional()
|
|
931
|
-
}),
|
|
979
|
+
}), rt = n.object({ mode: n.literal("previous"), unit: H }), lt = n.object({
|
|
932
980
|
mode: n.literal("between"),
|
|
933
|
-
unit:
|
|
934
|
-
from:
|
|
935
|
-
to:
|
|
936
|
-
}),
|
|
981
|
+
unit: H,
|
|
982
|
+
from: Fe,
|
|
983
|
+
to: Fe
|
|
984
|
+
}), te = {
|
|
937
985
|
check: (e) => e.boundary === void 0 || e.unit === "month",
|
|
938
986
|
message: 'A month boundary requires unit "month".'
|
|
939
|
-
},
|
|
940
|
-
nt.strict(),
|
|
987
|
+
}, Di = n.union([
|
|
941
988
|
at.strict(),
|
|
942
|
-
ot.strict()
|
|
943
|
-
|
|
989
|
+
ot.strict(),
|
|
990
|
+
st.strict().refine(te.check, {
|
|
991
|
+
message: te.message,
|
|
944
992
|
path: ["boundary"]
|
|
945
993
|
}),
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
]),
|
|
949
|
-
nt,
|
|
994
|
+
rt.strict(),
|
|
995
|
+
lt.strict()
|
|
996
|
+
]), Mi = n.union([
|
|
950
997
|
at,
|
|
951
|
-
ot
|
|
952
|
-
st,
|
|
953
|
-
rt
|
|
998
|
+
ot,
|
|
999
|
+
st.refine(te.check),
|
|
1000
|
+
rt,
|
|
1001
|
+
lt
|
|
954
1002
|
]);
|
|
955
|
-
function
|
|
956
|
-
const t =
|
|
1003
|
+
function ga(e) {
|
|
1004
|
+
const t = Mi.safeParse(e);
|
|
957
1005
|
return t.success ? t.data : void 0;
|
|
958
1006
|
}
|
|
959
|
-
const [
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
]), v = n.string().min(1),
|
|
1007
|
+
const [Ri, Ti, Ei, Ni] = Be.options, $i = n.union([
|
|
1008
|
+
Ri.innerType().strict(),
|
|
1009
|
+
Ti.extend({ type: n.literal("date") }).strict(),
|
|
1010
|
+
Ei.strict(),
|
|
1011
|
+
Ni.strict(),
|
|
1012
|
+
U
|
|
1013
|
+
]), v = n.string().min(1), De = n.enum(["groupby", "metric", "sortby", "pivotby", "detail"]), dt = n.enum([
|
|
966
1014
|
"table",
|
|
967
1015
|
"view",
|
|
968
1016
|
"materialized view",
|
|
@@ -971,7 +1019,7 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
971
1019
|
"dataset",
|
|
972
1020
|
"url",
|
|
973
1021
|
"upload"
|
|
974
|
-
]),
|
|
1022
|
+
]), K = n.object({
|
|
975
1023
|
connectionId: v,
|
|
976
1024
|
connectionType: n.enum([
|
|
977
1025
|
"GoogleSheets",
|
|
@@ -987,7 +1035,7 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
987
1035
|
"API",
|
|
988
1036
|
"none"
|
|
989
1037
|
]),
|
|
990
|
-
type:
|
|
1038
|
+
type: dt,
|
|
991
1039
|
name: v,
|
|
992
1040
|
// Grounded relationship plans retain semantic identity and display metadata.
|
|
993
1041
|
// SQL stays server-resolved; it is not accepted inside a join entity.
|
|
@@ -1010,7 +1058,7 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
1010
1058
|
"duckdb",
|
|
1011
1059
|
"mssql"
|
|
1012
1060
|
]).optional()
|
|
1013
|
-
}).strict(),
|
|
1061
|
+
}).strict(), q = n.lazy(
|
|
1014
1062
|
() => n.object({
|
|
1015
1063
|
id: v,
|
|
1016
1064
|
name: v,
|
|
@@ -1021,30 +1069,30 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
1021
1069
|
dataType: v,
|
|
1022
1070
|
entityId: v,
|
|
1023
1071
|
entityName: v,
|
|
1024
|
-
entityType:
|
|
1072
|
+
entityType: dt,
|
|
1025
1073
|
alias: n.string().optional(),
|
|
1026
1074
|
sourceField: n.string().optional(),
|
|
1027
|
-
source:
|
|
1075
|
+
source: ce.optional(),
|
|
1028
1076
|
nativeDataType: n.string().optional(),
|
|
1029
1077
|
description: n.string().optional(),
|
|
1030
1078
|
qualifiedEntityName: n.string().optional(),
|
|
1031
|
-
dateFormat: n.enum(
|
|
1079
|
+
dateFormat: n.enum(ki).optional(),
|
|
1032
1080
|
customFormat: n.string().optional(),
|
|
1033
|
-
granularity:
|
|
1034
|
-
role:
|
|
1081
|
+
granularity: W.optional(),
|
|
1082
|
+
role: De.optional(),
|
|
1035
1083
|
calculationRepresentation: n.enum(["inline-expression", "manual", "typed-derived"]).optional(),
|
|
1036
|
-
calculatedFieldOrigin: n.object({ id: v, role:
|
|
1084
|
+
calculatedFieldOrigin: n.object({ id: v, role: De.optional() }).strict().optional(),
|
|
1037
1085
|
aggregateOrigin: n.enum(["default", "explicit"]).optional(),
|
|
1038
1086
|
labelOrigin: n.enum(["semantic", "override"]).optional(),
|
|
1039
1087
|
formatOrigin: n.enum(["semantic", "override"]).optional(),
|
|
1040
1088
|
expression: n.string().optional(),
|
|
1041
|
-
derivedField:
|
|
1042
|
-
format:
|
|
1089
|
+
derivedField: pe.optional(),
|
|
1090
|
+
format: $i.optional(),
|
|
1043
1091
|
semanticTemporalPresentation: n.object({
|
|
1044
|
-
granularity:
|
|
1045
|
-
format:
|
|
1092
|
+
granularity: W,
|
|
1093
|
+
format: U
|
|
1046
1094
|
}).strict().optional(),
|
|
1047
|
-
aggregate:
|
|
1095
|
+
aggregate: Le.optional(),
|
|
1048
1096
|
fieldScope: n.enum(["card", "sheet", "dashboard", "domain"]).optional(),
|
|
1049
1097
|
calculatedFormula: n.object({
|
|
1050
1098
|
operation: n.enum([
|
|
@@ -1057,20 +1105,20 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
1057
1105
|
"scale",
|
|
1058
1106
|
"custom"
|
|
1059
1107
|
]),
|
|
1060
|
-
inputFields: n.array(
|
|
1108
|
+
inputFields: n.array(q),
|
|
1061
1109
|
constant: n.number().finite().optional(),
|
|
1062
1110
|
computeStage: n.enum(["row", "aggregate"]).optional()
|
|
1063
1111
|
}).strict().optional()
|
|
1064
1112
|
}).strict()
|
|
1065
|
-
),
|
|
1113
|
+
), ji = n.union([
|
|
1066
1114
|
n.string(),
|
|
1067
1115
|
n.number().finite(),
|
|
1068
1116
|
n.boolean(),
|
|
1069
1117
|
n.date(),
|
|
1070
1118
|
n.null()
|
|
1071
|
-
]),
|
|
1119
|
+
]), Ci = n.object({
|
|
1072
1120
|
id: v,
|
|
1073
|
-
field:
|
|
1121
|
+
field: q,
|
|
1074
1122
|
operator: n.enum([
|
|
1075
1123
|
"=",
|
|
1076
1124
|
"!=",
|
|
@@ -1090,23 +1138,24 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
1090
1138
|
"isNull",
|
|
1091
1139
|
"isNotNull"
|
|
1092
1140
|
]),
|
|
1093
|
-
value: n.union([
|
|
1141
|
+
value: n.union([ji, n.array(n.string()), n.array(n.number().finite())]),
|
|
1094
1142
|
label: n.string().optional(),
|
|
1095
|
-
temporalBucket:
|
|
1096
|
-
relativeMeta:
|
|
1097
|
-
latestValue: n.literal(!0).optional()
|
|
1143
|
+
temporalBucket: Nt.optional(),
|
|
1144
|
+
relativeMeta: Di.optional(),
|
|
1145
|
+
latestValue: n.literal(!0).optional(),
|
|
1146
|
+
latestValuePolicy: n.literal("snapshot").optional()
|
|
1098
1147
|
}).strict().superRefine((e, t) => {
|
|
1099
1148
|
const { operator: i, value: o } = e;
|
|
1100
1149
|
if ((i === "between" || i === "not between") && (!Array.isArray(o) || o.length !== 2) && t.addIssue({
|
|
1101
1150
|
code: "custom",
|
|
1102
1151
|
path: ["value"],
|
|
1103
1152
|
message: "Between requires two endpoints."
|
|
1104
|
-
}), e.relativeMeta && !
|
|
1153
|
+
}), e.relativeMeta && !xi(i) && t.addIssue({
|
|
1105
1154
|
code: "custom",
|
|
1106
1155
|
path: ["relativeMeta"],
|
|
1107
1156
|
message: "A relative date requires between or not between."
|
|
1108
1157
|
}), e.latestValue) {
|
|
1109
|
-
const s = [e.field.nativeDataType, e.field.dataType].map((l) =>
|
|
1158
|
+
const s = [e.field.nativeDataType, e.field.dataType].map((l) => fe(l)).some((l) => l === "date" || l === "datetime");
|
|
1110
1159
|
(i !== "=" || !s) && t.addIssue({
|
|
1111
1160
|
code: "custom",
|
|
1112
1161
|
path: ["latestValue"],
|
|
@@ -1118,21 +1167,21 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
1118
1167
|
path: ["value"],
|
|
1119
1168
|
message: "Membership requires an array."
|
|
1120
1169
|
});
|
|
1121
|
-
}),
|
|
1170
|
+
}), ut = n.lazy(
|
|
1122
1171
|
() => n.object({
|
|
1123
1172
|
id: v,
|
|
1124
1173
|
logicalOperator: n.enum(["AND", "OR"]),
|
|
1125
1174
|
negate: n.boolean(),
|
|
1126
|
-
conditions: n.array(
|
|
1127
|
-
groups: n.array(
|
|
1175
|
+
conditions: n.array(Ci),
|
|
1176
|
+
groups: n.array(ut)
|
|
1128
1177
|
}).strict()
|
|
1129
|
-
),
|
|
1130
|
-
baseEntity:
|
|
1178
|
+
), Oi = n.object({
|
|
1179
|
+
baseEntity: K,
|
|
1131
1180
|
joins: n.array(
|
|
1132
1181
|
n.object({
|
|
1133
1182
|
id: v,
|
|
1134
|
-
source:
|
|
1135
|
-
target:
|
|
1183
|
+
source: K,
|
|
1184
|
+
target: K,
|
|
1136
1185
|
joinType: n.enum(["INNER", "LEFT", "RIGHT", "FULL"]),
|
|
1137
1186
|
sequence: n.number().int().nonnegative(),
|
|
1138
1187
|
autoResolved: n.boolean().optional(),
|
|
@@ -1147,8 +1196,8 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
1147
1196
|
keys: n.array(
|
|
1148
1197
|
n.object({
|
|
1149
1198
|
id: n.string().optional(),
|
|
1150
|
-
source:
|
|
1151
|
-
target:
|
|
1199
|
+
source: q,
|
|
1200
|
+
target: q,
|
|
1152
1201
|
operator: n.enum(["=", "!=", ">", ">=", "<", "<="])
|
|
1153
1202
|
}).strict()
|
|
1154
1203
|
).min(1)
|
|
@@ -1156,14 +1205,14 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
1156
1205
|
).min(1)
|
|
1157
1206
|
}).strict()
|
|
1158
1207
|
)
|
|
1159
|
-
}).strict(),
|
|
1160
|
-
axis:
|
|
1208
|
+
}).strict(), Yi = n.object({
|
|
1209
|
+
axis: he,
|
|
1161
1210
|
levelId: n.string().uuid().optional(),
|
|
1162
1211
|
// Persisted table preferences are edited through Immer; runtime paths remain readonly.
|
|
1163
1212
|
oppositePath: F.transform((e) => [...e]).optional()
|
|
1164
|
-
}).strict(),
|
|
1213
|
+
}).strict(), k = n.string().min(1), Pi = n.array(
|
|
1165
1214
|
n.enum(["body", "header", "footer", "subtotal", "grandTotal"])
|
|
1166
|
-
),
|
|
1215
|
+
), Bi = n.enum(["normal", "medium", "semibold", "bold"]), Li = n.enum(["none", "underline", "line-through"]), ct = n.object({
|
|
1167
1216
|
version: n.literal(1),
|
|
1168
1217
|
rules: n.array(
|
|
1169
1218
|
n.object({
|
|
@@ -1172,11 +1221,11 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
1172
1221
|
enabled: n.boolean().optional(),
|
|
1173
1222
|
target: n.object({
|
|
1174
1223
|
level: n.enum(["cell", "row"]),
|
|
1175
|
-
matrix:
|
|
1176
|
-
columnIds: n.array(
|
|
1177
|
-
conditionColumnId:
|
|
1178
|
-
applyToColumnIds: n.array(
|
|
1179
|
-
tableParts:
|
|
1224
|
+
matrix: Yi.optional(),
|
|
1225
|
+
columnIds: n.array(k).optional(),
|
|
1226
|
+
conditionColumnId: k.optional(),
|
|
1227
|
+
applyToColumnIds: n.array(k).optional(),
|
|
1228
|
+
tableParts: Pi.optional(),
|
|
1180
1229
|
rowRoles: n.array(n.string()).optional(),
|
|
1181
1230
|
depth: n.number().int().nonnegative().optional(),
|
|
1182
1231
|
includeTotals: n.boolean().optional(),
|
|
@@ -1185,38 +1234,38 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
1185
1234
|
condition: n.discriminatedUnion("kind", [
|
|
1186
1235
|
n.object({
|
|
1187
1236
|
kind: n.literal("comparison"),
|
|
1188
|
-
columnId:
|
|
1237
|
+
columnId: k,
|
|
1189
1238
|
operator: n.enum(["eq", "neq", "gt", "gte", "lt", "lte"]),
|
|
1190
|
-
value:
|
|
1239
|
+
value: B
|
|
1191
1240
|
}).strict(),
|
|
1192
1241
|
n.object({
|
|
1193
1242
|
kind: n.literal("between"),
|
|
1194
|
-
columnId:
|
|
1195
|
-
min:
|
|
1196
|
-
max:
|
|
1243
|
+
columnId: k,
|
|
1244
|
+
min: B,
|
|
1245
|
+
max: B,
|
|
1197
1246
|
inclusive: n.boolean().optional()
|
|
1198
1247
|
}).strict(),
|
|
1199
1248
|
n.object({
|
|
1200
1249
|
kind: n.literal("blank"),
|
|
1201
|
-
columnId:
|
|
1250
|
+
columnId: k,
|
|
1202
1251
|
isBlank: n.boolean()
|
|
1203
1252
|
}).strict(),
|
|
1204
1253
|
n.object({
|
|
1205
1254
|
kind: n.literal("contains"),
|
|
1206
|
-
columnId:
|
|
1255
|
+
columnId: k,
|
|
1207
1256
|
value: n.string(),
|
|
1208
1257
|
caseSensitive: n.boolean().optional(),
|
|
1209
1258
|
exact: n.boolean().optional()
|
|
1210
1259
|
}).strict(),
|
|
1211
1260
|
n.object({
|
|
1212
1261
|
kind: n.literal("topBottom"),
|
|
1213
|
-
columnId:
|
|
1262
|
+
columnId: k,
|
|
1214
1263
|
direction: n.enum(["top", "bottom"]),
|
|
1215
1264
|
count: n.number().int().positive()
|
|
1216
1265
|
}).strict(),
|
|
1217
1266
|
n.object({
|
|
1218
1267
|
kind: n.literal("colorScale"),
|
|
1219
|
-
columnId:
|
|
1268
|
+
columnId: k,
|
|
1220
1269
|
range: n.enum(["auto", "manual"]),
|
|
1221
1270
|
min: n.number().finite().optional(),
|
|
1222
1271
|
mid: n.number().finite().optional(),
|
|
@@ -1229,7 +1278,7 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
1229
1278
|
}).strict(),
|
|
1230
1279
|
n.object({
|
|
1231
1280
|
kind: n.literal("dataBar"),
|
|
1232
|
-
columnId:
|
|
1281
|
+
columnId: k,
|
|
1233
1282
|
range: n.enum(["auto", "manual"]),
|
|
1234
1283
|
min: n.number().finite().optional(),
|
|
1235
1284
|
max: n.number().finite().optional(),
|
|
@@ -1240,39 +1289,39 @@ const [ki, Ai, xi, Fi] = Pe.options, Mi = n.union([
|
|
|
1240
1289
|
style: n.object({
|
|
1241
1290
|
backgroundColor: n.string().optional(),
|
|
1242
1291
|
textColor: n.string().optional(),
|
|
1243
|
-
fontWeight:
|
|
1292
|
+
fontWeight: Bi.optional(),
|
|
1244
1293
|
italic: n.boolean().optional(),
|
|
1245
|
-
textDecoration:
|
|
1294
|
+
textDecoration: Li.optional(),
|
|
1246
1295
|
icon: n.enum(["arrowUp", "arrowDown", "warning", "check", "x"]).optional(),
|
|
1247
1296
|
dataBar: n.object({ color: n.string(), showValue: n.boolean() }).strict().optional()
|
|
1248
1297
|
}).strict().optional()
|
|
1249
1298
|
}).strict()
|
|
1250
1299
|
)
|
|
1251
1300
|
}).strict();
|
|
1252
|
-
function
|
|
1301
|
+
function ha(e, t) {
|
|
1253
1302
|
const i = (s) => {
|
|
1254
|
-
if (
|
|
1255
|
-
const l = typeof s == "string" ?
|
|
1303
|
+
if (V(s)) return s.value;
|
|
1304
|
+
const l = typeof s == "string" ? gi(s.trim()) ?? ie(s) : ie(s);
|
|
1256
1305
|
if (l === null) return null;
|
|
1257
1306
|
try {
|
|
1258
|
-
return
|
|
1307
|
+
return hi(String(l));
|
|
1259
1308
|
} catch {
|
|
1260
1309
|
return null;
|
|
1261
1310
|
}
|
|
1262
1311
|
}, o = i(e), a = i(t);
|
|
1263
|
-
return o === null || a === null ? null :
|
|
1312
|
+
return o === null || a === null ? null : Je(o, a);
|
|
1264
1313
|
}
|
|
1265
|
-
function
|
|
1266
|
-
const o =
|
|
1314
|
+
function _a(e, t, i) {
|
|
1315
|
+
const o = Ui(e);
|
|
1267
1316
|
if (o === null) return null;
|
|
1268
1317
|
if (typeof o == "number" && typeof t == "number" && typeof i == "number") {
|
|
1269
|
-
const h =
|
|
1318
|
+
const h = Hi(o, t, i);
|
|
1270
1319
|
return { ratio: h, midpointComparison: Math.sign(h - 0.5) };
|
|
1271
1320
|
}
|
|
1272
1321
|
if ([t, i].some((h) => typeof h == "number" && !Number.isFinite(h))) return null;
|
|
1273
1322
|
const a = [o, t, i].map((h) => {
|
|
1274
|
-
const
|
|
1275
|
-
return { coefficient:
|
|
1323
|
+
const O = typeof h == "number" ? x(String(h)) : h.value, [Dt, Ie = ""] = O.split(".");
|
|
1324
|
+
return { coefficient: Dt + Ie, scale: Ie.length };
|
|
1276
1325
|
}), s = Math.max(...a.map((h) => h.scale)), [l, d, c] = a.map(
|
|
1277
1326
|
(h) => BigInt(h.coefficient) * 10n ** BigInt(s - h.scale)
|
|
1278
1327
|
), p = c - d, u = l - d;
|
|
@@ -1284,20 +1333,20 @@ function ua(e, t, i) {
|
|
|
1284
1333
|
const _ = u * 2n - p, y = _ < 0n ? -1 : _ > 0n ? 1 : 0;
|
|
1285
1334
|
return { ratio: u <= 0n ? 0 : u >= p ? 1 : Number(u * 1000000000n / p) / 1e9, midpointComparison: y };
|
|
1286
1335
|
}
|
|
1287
|
-
function
|
|
1336
|
+
function ya(e) {
|
|
1288
1337
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
1289
1338
|
}
|
|
1290
|
-
function
|
|
1339
|
+
function ba(e) {
|
|
1291
1340
|
return e.enabled !== !1;
|
|
1292
1341
|
}
|
|
1293
|
-
function
|
|
1342
|
+
function va(e) {
|
|
1294
1343
|
return e.kind === "topBottom" || e.kind === "colorScale" && e.range === "auto" || e.kind === "dataBar" && e.range === "auto";
|
|
1295
1344
|
}
|
|
1296
|
-
function
|
|
1345
|
+
function Vi(e) {
|
|
1297
1346
|
return e.columnId;
|
|
1298
1347
|
}
|
|
1299
|
-
function
|
|
1300
|
-
const t = [
|
|
1348
|
+
function qi(e) {
|
|
1349
|
+
const t = [Vi(e.condition)];
|
|
1301
1350
|
return { validationRefs: [.../* @__PURE__ */ new Set([
|
|
1302
1351
|
...t,
|
|
1303
1352
|
...e.target.conditionColumnId === void 0 ? [] : [e.target.conditionColumnId],
|
|
@@ -1305,7 +1354,7 @@ function Oi(e) {
|
|
|
1305
1354
|
...e.target.applyToColumnIds ?? []
|
|
1306
1355
|
])], evaluationInputs: t };
|
|
1307
1356
|
}
|
|
1308
|
-
function
|
|
1357
|
+
function ie(e) {
|
|
1309
1358
|
if (typeof e == "number")
|
|
1310
1359
|
return Number.isFinite(e) ? e : null;
|
|
1311
1360
|
if (typeof e == "string" && e.trim() !== "") {
|
|
@@ -1314,30 +1363,30 @@ function te(e) {
|
|
|
1314
1363
|
}
|
|
1315
1364
|
return null;
|
|
1316
1365
|
}
|
|
1317
|
-
function
|
|
1318
|
-
return
|
|
1366
|
+
function Ui(e) {
|
|
1367
|
+
return V(e) ? e : ie(e);
|
|
1319
1368
|
}
|
|
1320
|
-
function
|
|
1369
|
+
function Ia(e) {
|
|
1321
1370
|
const t = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
1322
1371
|
for (const o of e)
|
|
1323
|
-
|
|
1372
|
+
V(o) ? i.add(o.value) : t.add(o);
|
|
1324
1373
|
return {
|
|
1325
|
-
has: (o) =>
|
|
1374
|
+
has: (o) => V(o) ? i.has(o.value) : t.has(o)
|
|
1326
1375
|
};
|
|
1327
1376
|
}
|
|
1328
|
-
function
|
|
1329
|
-
return typeof e == "number" && typeof t == "number" ? Math.sign(e - t) :
|
|
1377
|
+
function Sa(e, t) {
|
|
1378
|
+
return typeof e == "number" && typeof t == "number" ? Math.sign(e - t) : Je(
|
|
1330
1379
|
typeof e == "number" ? x(String(e)) : e.value,
|
|
1331
1380
|
typeof t == "number" ? x(String(t)) : t.value
|
|
1332
1381
|
);
|
|
1333
1382
|
}
|
|
1334
|
-
function
|
|
1383
|
+
function ka(e) {
|
|
1335
1384
|
return e == null || e === "";
|
|
1336
1385
|
}
|
|
1337
|
-
function
|
|
1386
|
+
function Hi(e, t, i) {
|
|
1338
1387
|
return !Number.isFinite(e) || !Number.isFinite(t) || !Number.isFinite(i) ? 0 : i === t ? e >= i ? 1 : 0 : Math.max(0, Math.min(1, (e - t) / (i - t)));
|
|
1339
1388
|
}
|
|
1340
|
-
function
|
|
1389
|
+
function Gi(e) {
|
|
1341
1390
|
switch (e) {
|
|
1342
1391
|
case "bold":
|
|
1343
1392
|
return 700;
|
|
@@ -1351,91 +1400,91 @@ function Bi(e) {
|
|
|
1351
1400
|
return;
|
|
1352
1401
|
}
|
|
1353
1402
|
}
|
|
1354
|
-
function
|
|
1355
|
-
return e ?
|
|
1356
|
-
fontWeight:
|
|
1403
|
+
function wa(e) {
|
|
1404
|
+
return e ? pt({
|
|
1405
|
+
fontWeight: Gi(e.fontWeight),
|
|
1357
1406
|
fontStyle: e.italic ? "italic" : void 0,
|
|
1358
1407
|
color: e.textColor,
|
|
1359
1408
|
backgroundColor: e.backgroundColor,
|
|
1360
1409
|
textDecoration: e.textDecoration
|
|
1361
1410
|
}) : {};
|
|
1362
1411
|
}
|
|
1363
|
-
function
|
|
1412
|
+
function Aa(...e) {
|
|
1364
1413
|
return Object.assign(
|
|
1365
1414
|
{},
|
|
1366
|
-
...e.filter((t) => !!t).map(
|
|
1415
|
+
...e.filter((t) => !!t).map(pt)
|
|
1367
1416
|
);
|
|
1368
1417
|
}
|
|
1369
|
-
function
|
|
1418
|
+
function pt(e) {
|
|
1370
1419
|
return Object.fromEntries(
|
|
1371
1420
|
Object.entries(e).filter(([, t]) => t !== void 0)
|
|
1372
1421
|
);
|
|
1373
1422
|
}
|
|
1374
|
-
const S = n.string().uuid(),
|
|
1423
|
+
const S = n.string().uuid(), zi = n.string().min(1), Qi = n.number().int().positive().max(Number.MAX_SAFE_INTEGER), Ki = n.enum([
|
|
1375
1424
|
"SUM",
|
|
1376
1425
|
"COUNT",
|
|
1377
1426
|
"DISTINCT",
|
|
1378
1427
|
"AVG",
|
|
1379
1428
|
"MIN",
|
|
1380
1429
|
"MAX"
|
|
1381
|
-
]),
|
|
1430
|
+
]), mt = si.omit({
|
|
1382
1431
|
aggregate: !0
|
|
1383
|
-
}),
|
|
1432
|
+
}), Xi = {
|
|
1384
1433
|
id: S,
|
|
1385
|
-
field:
|
|
1386
|
-
grain:
|
|
1387
|
-
},
|
|
1434
|
+
field: mt,
|
|
1435
|
+
grain: W.optional()
|
|
1436
|
+
}, ne = n.object(Xi).strict(), Zi = n.object({
|
|
1388
1437
|
id: S,
|
|
1389
1438
|
kind: n.literal("aggregate"),
|
|
1390
|
-
field:
|
|
1391
|
-
aggregate:
|
|
1392
|
-
}).strict(),
|
|
1439
|
+
field: mt,
|
|
1440
|
+
aggregate: Ki
|
|
1441
|
+
}).strict(), Wi = n.object({
|
|
1393
1442
|
id: S,
|
|
1394
1443
|
kind: n.literal("calculated"),
|
|
1395
|
-
definition:
|
|
1396
|
-
}).strict(),
|
|
1444
|
+
definition: pe
|
|
1445
|
+
}).strict(), ft = n.discriminatedUnion("kind", [Zi, Wi]), Ji = n.discriminatedUnion("kind", [
|
|
1397
1446
|
n.object({ kind: n.literal("member") }).strict(),
|
|
1398
1447
|
n.object({
|
|
1399
1448
|
kind: n.literal("measure"),
|
|
1400
1449
|
measureId: S,
|
|
1401
1450
|
oppositePath: F
|
|
1402
1451
|
}).strict()
|
|
1403
|
-
]),
|
|
1404
|
-
axis:
|
|
1452
|
+
]), en = {
|
|
1453
|
+
axis: he,
|
|
1405
1454
|
levelId: S,
|
|
1406
1455
|
scope: n.discriminatedUnion("kind", [
|
|
1407
1456
|
n.object({ kind: n.literal("level") }).strict(),
|
|
1408
1457
|
n.object({ kind: n.literal("branch"), parent: F }).strict()
|
|
1409
1458
|
]),
|
|
1410
|
-
target:
|
|
1459
|
+
target: Ji,
|
|
1411
1460
|
direction: n.enum(["asc", "desc"]),
|
|
1412
1461
|
nulls: n.enum(["first", "last"])
|
|
1413
|
-
},
|
|
1462
|
+
}, gt = n.object(en).strict(), tn = n.object({
|
|
1414
1463
|
id: S,
|
|
1415
|
-
axis:
|
|
1464
|
+
axis: he,
|
|
1416
1465
|
levelId: S,
|
|
1417
1466
|
direction: n.enum(["top", "bottom"]),
|
|
1418
|
-
count:
|
|
1467
|
+
count: Qi,
|
|
1419
1468
|
measureId: S,
|
|
1420
1469
|
oppositePath: F,
|
|
1421
1470
|
others: n.boolean()
|
|
1422
|
-
}).strict(),
|
|
1423
|
-
source:
|
|
1424
|
-
rows: n.array(
|
|
1425
|
-
columns: n.array(
|
|
1426
|
-
measures: n.array(
|
|
1427
|
-
filters:
|
|
1428
|
-
joinPlan:
|
|
1429
|
-
relationshipHint: n.object({ relationshipIds: n.array(
|
|
1430
|
-
sorts: n.array(
|
|
1431
|
-
rankings: n.array(
|
|
1471
|
+
}).strict(), ht = n.object({
|
|
1472
|
+
source: ce,
|
|
1473
|
+
rows: n.array(ne).min(1).readonly(),
|
|
1474
|
+
columns: n.array(ne).readonly(),
|
|
1475
|
+
measures: n.array(ft).min(1).readonly(),
|
|
1476
|
+
filters: ut.optional(),
|
|
1477
|
+
joinPlan: Oi.optional(),
|
|
1478
|
+
relationshipHint: n.object({ relationshipIds: n.array(zi).optional() }).strict().optional(),
|
|
1479
|
+
sorts: n.array(gt).readonly(),
|
|
1480
|
+
rankings: n.array(tn).readonly()
|
|
1432
1481
|
}).strict();
|
|
1433
|
-
function
|
|
1482
|
+
function _t(e) {
|
|
1434
1483
|
return JSON.stringify([
|
|
1435
1484
|
e.axis,
|
|
1436
1485
|
e.levelId,
|
|
1437
1486
|
e.scope.kind,
|
|
1438
|
-
e.scope.kind === "branch" ?
|
|
1487
|
+
e.scope.kind === "branch" ? tt(e.scope.parent) : null
|
|
1439
1488
|
]);
|
|
1440
1489
|
}
|
|
1441
1490
|
function g(e, t, i) {
|
|
@@ -1444,7 +1493,7 @@ function g(e, t, i) {
|
|
|
1444
1493
|
function A(e, t, i) {
|
|
1445
1494
|
new Set(e).size !== e.length && g(t, i, "Duplicate identity.");
|
|
1446
1495
|
}
|
|
1447
|
-
function
|
|
1496
|
+
function $(e, t, i, o, a, s = !1) {
|
|
1448
1497
|
i.length > e[t].length && g(o, a, "Path exceeds axis depth."), i.forEach((l, d) => {
|
|
1449
1498
|
var c;
|
|
1450
1499
|
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") {
|
|
@@ -1459,10 +1508,10 @@ function N(e, t, i, o, a, s = !1) {
|
|
|
1459
1508
|
}
|
|
1460
1509
|
});
|
|
1461
1510
|
}
|
|
1462
|
-
function
|
|
1463
|
-
A(t.map(
|
|
1511
|
+
function yt(e, t, i, o) {
|
|
1512
|
+
A(t.map(_t), i, o), t.forEach((a, s) => {
|
|
1464
1513
|
const l = [...o, s], d = e[a.axis].findIndex((c) => c.id === a.levelId);
|
|
1465
|
-
if (d < 0 && g(i, l, "Sort level is not on its axis."), a.scope.kind === "branch" && (
|
|
1514
|
+
if (d < 0 && g(i, l, "Sort level is not on its axis."), a.scope.kind === "branch" && ($(
|
|
1466
1515
|
e,
|
|
1467
1516
|
a.axis,
|
|
1468
1517
|
a.scope.parent,
|
|
@@ -1475,7 +1524,7 @@ function _t(e, t, i, o) {
|
|
|
1475
1524
|
"Branch sort must name the immediate parent of its level."
|
|
1476
1525
|
)), a.target.kind === "measure") {
|
|
1477
1526
|
const c = a.target.measureId;
|
|
1478
|
-
e.measures.some((p) => p.id === c) || g(i, l, "Unknown sort measure."),
|
|
1527
|
+
e.measures.some((p) => p.id === c) || g(i, l, "Unknown sort measure."), $(
|
|
1479
1528
|
e,
|
|
1480
1529
|
a.axis === "rows" ? "columns" : "rows",
|
|
1481
1530
|
a.target.oppositePath,
|
|
@@ -1486,19 +1535,19 @@ function _t(e, t, i, o) {
|
|
|
1486
1535
|
}
|
|
1487
1536
|
});
|
|
1488
1537
|
}
|
|
1489
|
-
function
|
|
1538
|
+
function P(e, t, i, o) {
|
|
1490
1539
|
e && (e.kind !== t.kind || e.kind === "semantic" && t.kind === "semantic" && e.domainId !== t.domainId || e.kind === "physical" && t.kind === "physical" && e.connectionId !== t.connectionId) && g(
|
|
1491
1540
|
i,
|
|
1492
1541
|
o,
|
|
1493
1542
|
"Field source must belong to the same semantic domain or physical connection."
|
|
1494
1543
|
);
|
|
1495
1544
|
}
|
|
1496
|
-
function
|
|
1545
|
+
function X(e, t, i) {
|
|
1497
1546
|
(e.defaultAggregate === "MEDIAN" || Object.values(e.inputs).some(
|
|
1498
1547
|
(o) => o.aggregate === "MEDIAN" || o.field.aggregate === "MEDIAN"
|
|
1499
1548
|
)) && g(t, i, "MEDIAN dependencies are not supported at launch."), (e.aggregationBehavior === "snapshot" || e.aggregationBehavior === "weighted" || e.aggregationStrategy === "weighted") && g(t, i, "This measure semantic requires a later capability.");
|
|
1500
1549
|
}
|
|
1501
|
-
function
|
|
1550
|
+
function bt(e, t) {
|
|
1502
1551
|
A(
|
|
1503
1552
|
[...e.rows, ...e.columns, ...e.measures].map((a) => a.id),
|
|
1504
1553
|
t,
|
|
@@ -1522,7 +1571,7 @@ function yt(e, t) {
|
|
|
1522
1571
|
...e.measures.filter((a) => a.kind === "aggregate")
|
|
1523
1572
|
];
|
|
1524
1573
|
for (const a of i)
|
|
1525
|
-
if (
|
|
1574
|
+
if (P(a.field.source, e.source, t, [
|
|
1526
1575
|
a.id,
|
|
1527
1576
|
"field",
|
|
1528
1577
|
"source"
|
|
@@ -1531,9 +1580,9 @@ function yt(e, t) {
|
|
|
1531
1580
|
t,
|
|
1532
1581
|
[a.id],
|
|
1533
1582
|
"Aggregate-stage calculations cannot be grouped or wrapped in an aggregate."
|
|
1534
|
-
),
|
|
1583
|
+
), X(a.field.derivedField, t, [a.id]);
|
|
1535
1584
|
for (const s of Object.values(a.field.derivedField.inputs))
|
|
1536
|
-
|
|
1585
|
+
P(s.field.source, e.source, t, [a.id, "inputs"]);
|
|
1537
1586
|
}
|
|
1538
1587
|
for (const a of e.measures)
|
|
1539
1588
|
if (a.kind === "calculated") {
|
|
@@ -1541,9 +1590,9 @@ function yt(e, t) {
|
|
|
1541
1590
|
t,
|
|
1542
1591
|
[a.id],
|
|
1543
1592
|
"Calculated measures require aggregate stage and measure role."
|
|
1544
|
-
),
|
|
1593
|
+
), X(a.definition, t, [a.id]);
|
|
1545
1594
|
for (const s of Object.values(a.definition.inputs))
|
|
1546
|
-
|
|
1595
|
+
P(s.field.source, e.source, t, [
|
|
1547
1596
|
a.id,
|
|
1548
1597
|
"inputs"
|
|
1549
1598
|
]);
|
|
@@ -1552,9 +1601,9 @@ function yt(e, t) {
|
|
|
1552
1601
|
const s = (l, d) => {
|
|
1553
1602
|
var c, p;
|
|
1554
1603
|
if ((l.aggregate || ((c = l.derivedField) == null ? void 0 : c.computeStage) === "aggregate") && g(t, d, "Aggregate/HAVING filters are not supported."), l.derivedField) {
|
|
1555
|
-
|
|
1604
|
+
X(l.derivedField, t, d);
|
|
1556
1605
|
for (const u of Object.values(l.derivedField.inputs))
|
|
1557
|
-
|
|
1606
|
+
P(u.field.source, e.source, t, d);
|
|
1558
1607
|
}
|
|
1559
1608
|
for (const u of ((p = l.calculatedFormula) == null ? void 0 : p.inputFields) ?? [])
|
|
1560
1609
|
s(u, d);
|
|
@@ -1574,8 +1623,8 @@ function yt(e, t) {
|
|
|
1574
1623
|
["joinPlan", "joins"]
|
|
1575
1624
|
);
|
|
1576
1625
|
}
|
|
1577
|
-
|
|
1578
|
-
(!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."),
|
|
1626
|
+
yt(e, e.sorts, t, ["sorts"]), e.rankings.forEach((a, s) => {
|
|
1627
|
+
(!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."), $(
|
|
1579
1628
|
e,
|
|
1580
1629
|
a.axis === "rows" ? "columns" : "rows",
|
|
1581
1630
|
a.oppositePath,
|
|
@@ -1585,18 +1634,18 @@ function yt(e, t) {
|
|
|
1585
1634
|
);
|
|
1586
1635
|
});
|
|
1587
1636
|
}
|
|
1588
|
-
const
|
|
1589
|
-
rows: n.array(
|
|
1590
|
-
measures: n.array(
|
|
1591
|
-
}),
|
|
1592
|
-
const o =
|
|
1637
|
+
const C = ht.superRefine(bt), nn = ht.extend({
|
|
1638
|
+
rows: n.array(ne).readonly(),
|
|
1639
|
+
measures: n.array(ft).readonly()
|
|
1640
|
+
}), an = nn.superRefine(bt), on = C.innerType().extend({ kind: n.literal("matrix") }), sn = on.superRefine(({ kind: e, ...t }, i) => {
|
|
1641
|
+
const o = C.safeParse(t);
|
|
1593
1642
|
o.success || o.error.issues.forEach((a) => i.addIssue(a));
|
|
1594
|
-
}),
|
|
1643
|
+
}), rn = "{member}", Me = n.object({
|
|
1595
1644
|
visible: n.boolean(),
|
|
1596
1645
|
position: n.enum(["before", "after"]),
|
|
1597
1646
|
/** As written; a subtotal's `{member}` becomes its member's name. */
|
|
1598
1647
|
label: n.string().optional()
|
|
1599
|
-
}).strict(),
|
|
1648
|
+
}).strict(), Re = n.object({
|
|
1600
1649
|
grand: Me,
|
|
1601
1650
|
levels: n.record(S, Me).readonly(),
|
|
1602
1651
|
/**
|
|
@@ -1604,10 +1653,10 @@ const j = gt.superRefine(yt), Ki = gt.extend({
|
|
|
1604
1653
|
* exactly one child shows no subtotal. Off when absent.
|
|
1605
1654
|
*/
|
|
1606
1655
|
skipRedundant: n.boolean().optional()
|
|
1607
|
-
}).strict(),
|
|
1608
|
-
rules: n.array(
|
|
1609
|
-
target:
|
|
1610
|
-
rowRoles: n.array(
|
|
1656
|
+
}).strict(), Te = ct.shape.rules.element, ln = ct.extend({
|
|
1657
|
+
rules: n.array(Te.extend({
|
|
1658
|
+
target: Te.shape.target.extend({
|
|
1659
|
+
rowRoles: n.array(bi).optional()
|
|
1611
1660
|
})
|
|
1612
1661
|
}))
|
|
1613
1662
|
}).superRefine((e, t) => {
|
|
@@ -1634,13 +1683,13 @@ const j = gt.superRefine(yt), Ki = gt.extend({
|
|
|
1634
1683
|
);
|
|
1635
1684
|
}
|
|
1636
1685
|
});
|
|
1637
|
-
function
|
|
1686
|
+
function dn(e, t, i, o, a = []) {
|
|
1638
1687
|
for (const s of e.rules) {
|
|
1639
1688
|
const l = [...a, "rules", s.id], d = s.target.matrix;
|
|
1640
|
-
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 &&
|
|
1689
|
+
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"])), qi(s).validationRefs.some((c) => !i.has(c)) && g(o, l, "Conditional rules must reference displayed measures.");
|
|
1641
1690
|
}
|
|
1642
1691
|
}
|
|
1643
|
-
const
|
|
1692
|
+
const un = {
|
|
1644
1693
|
layout: n.discriminatedUnion("kind", [
|
|
1645
1694
|
n.object({ kind: n.literal("compact") }).strict(),
|
|
1646
1695
|
n.object({ kind: n.literal("tabular"), repeatLabels: n.boolean() }).strict()
|
|
@@ -1648,25 +1697,25 @@ const an = {
|
|
|
1648
1697
|
absence: n.object({ emptyText: n.string(), nullText: n.string() }).strict(),
|
|
1649
1698
|
levelLabels: n.record(S, n.string()).readonly(),
|
|
1650
1699
|
measureLabels: n.record(S, n.string()).readonly(),
|
|
1651
|
-
levelFormats: n.record(S,
|
|
1652
|
-
measureFormats: n.record(S,
|
|
1653
|
-
totals: n.object({ rows:
|
|
1654
|
-
conditionalFormatting:
|
|
1655
|
-
},
|
|
1700
|
+
levelFormats: n.record(S, ke).readonly(),
|
|
1701
|
+
measureFormats: n.record(S, ke).readonly(),
|
|
1702
|
+
totals: n.object({ rows: Re, columns: Re }).strict(),
|
|
1703
|
+
conditionalFormatting: ln.optional()
|
|
1704
|
+
}, _e = n.object(un).strict(), cn = n.object({
|
|
1656
1705
|
depth: n.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
|
|
1657
1706
|
overrides: n.array(
|
|
1658
1707
|
n.object({ path: F, expanded: n.boolean() }).strict()
|
|
1659
1708
|
).readonly()
|
|
1660
|
-
}).strict(), Ee =
|
|
1709
|
+
}).strict(), Ee = cn.superRefine(
|
|
1661
1710
|
(e, t) => A(
|
|
1662
|
-
e.overrides.map((i) =>
|
|
1711
|
+
e.overrides.map((i) => tt(i.path)),
|
|
1663
1712
|
t,
|
|
1664
1713
|
["overrides"]
|
|
1665
1714
|
)
|
|
1666
|
-
),
|
|
1667
|
-
(e, t) => A(e.sorts.map(
|
|
1715
|
+
), pn = { rows: Ee, columns: Ee }, G = n.object(pn).strict(), mn = G.extend({ sorts: n.array(gt).readonly() }).strict(), fn = mn.superRefine(
|
|
1716
|
+
(e, t) => A(e.sorts.map(_t), t, ["sorts"])
|
|
1668
1717
|
);
|
|
1669
|
-
function
|
|
1718
|
+
function z(e, t) {
|
|
1670
1719
|
var c, p;
|
|
1671
1720
|
const { spec: i, presentation: o, defaults: a, session: s } = e, l = new Set([...i.rows, ...i.columns].map((u) => u.id)), d = new Set(i.measures.map((u) => u.id));
|
|
1672
1721
|
for (const u of [
|
|
@@ -1697,7 +1746,7 @@ function G(e, t) {
|
|
|
1697
1746
|
);
|
|
1698
1747
|
for (const u of ["rows", "columns"]) {
|
|
1699
1748
|
(p = o.totals[u].grand.label) != null && p.includes(
|
|
1700
|
-
|
|
1749
|
+
rn
|
|
1701
1750
|
) && g(
|
|
1702
1751
|
t,
|
|
1703
1752
|
["presentation", "totals", u, "grand", "label"],
|
|
@@ -1711,7 +1760,7 @@ function G(e, t) {
|
|
|
1711
1760
|
);
|
|
1712
1761
|
for (const y of [a, ...s ? [s] : []])
|
|
1713
1762
|
for (const I of y[u].overrides)
|
|
1714
|
-
|
|
1763
|
+
$(
|
|
1715
1764
|
i,
|
|
1716
1765
|
u,
|
|
1717
1766
|
I.path,
|
|
@@ -1724,7 +1773,7 @@ function G(e, t) {
|
|
|
1724
1773
|
"Use depth to expand/collapse the root."
|
|
1725
1774
|
);
|
|
1726
1775
|
}
|
|
1727
|
-
s &&
|
|
1776
|
+
s && yt(i, s.sorts, t, ["session", "sorts"]), o.conditionalFormatting && dn(
|
|
1728
1777
|
o.conditionalFormatting,
|
|
1729
1778
|
i,
|
|
1730
1779
|
d,
|
|
@@ -1732,32 +1781,32 @@ function G(e, t) {
|
|
|
1732
1781
|
["presentation", "conditionalFormatting"]
|
|
1733
1782
|
);
|
|
1734
1783
|
}
|
|
1735
|
-
const
|
|
1736
|
-
spec:
|
|
1737
|
-
presentation:
|
|
1738
|
-
defaults:
|
|
1739
|
-
session:
|
|
1740
|
-
}).strict(),
|
|
1784
|
+
const gn = n.object({
|
|
1785
|
+
spec: C,
|
|
1786
|
+
presentation: _e,
|
|
1787
|
+
defaults: G,
|
|
1788
|
+
session: fn.optional()
|
|
1789
|
+
}).strict(), xa = gn.superRefine(z), hn = n.object({
|
|
1741
1790
|
version: n.literal(1),
|
|
1742
|
-
spec:
|
|
1743
|
-
presentation:
|
|
1744
|
-
defaultView:
|
|
1745
|
-
}).strict(),
|
|
1746
|
-
(e, t) =>
|
|
1747
|
-
),
|
|
1748
|
-
spec:
|
|
1749
|
-
}),
|
|
1750
|
-
|
|
1791
|
+
spec: C,
|
|
1792
|
+
presentation: _e,
|
|
1793
|
+
defaultView: G
|
|
1794
|
+
}).strict(), _n = hn.superRefine(
|
|
1795
|
+
(e, t) => z({ ...e, defaults: e.defaultView }, t)
|
|
1796
|
+
), yn = _n.innerType().extend({
|
|
1797
|
+
spec: an
|
|
1798
|
+
}), Fa = yn.superRefine((e, t) => z({ ...e, defaults: e.defaultView }, t)), Ne = n.object({ spec: C, presentation: _e }).strict(), bn = n.union([
|
|
1799
|
+
Ne.extend({
|
|
1751
1800
|
mode: n.literal("layout"),
|
|
1752
1801
|
format: n.enum(["csv", "xlsx", "pdf"]),
|
|
1753
1802
|
expansion: n.union([
|
|
1754
|
-
|
|
1803
|
+
G.extend({ kind: n.literal("current") }).strict(),
|
|
1755
1804
|
n.object({ kind: n.literal("all") }).strict()
|
|
1756
1805
|
])
|
|
1757
1806
|
}).strict(),
|
|
1758
|
-
|
|
1759
|
-
]),
|
|
1760
|
-
(e, t) =>
|
|
1807
|
+
Ne.extend({ mode: n.literal("flat"), format: n.enum(["csv", "xlsx"]) }).strict()
|
|
1808
|
+
]), Da = bn.superRefine(
|
|
1809
|
+
(e, t) => z(
|
|
1761
1810
|
{
|
|
1762
1811
|
...e,
|
|
1763
1812
|
defaults: e.mode === "layout" && e.expansion.kind === "current" ? e.expansion : {
|
|
@@ -1768,44 +1817,44 @@ const dn = n.object({
|
|
|
1768
1817
|
t
|
|
1769
1818
|
)
|
|
1770
1819
|
);
|
|
1771
|
-
function
|
|
1820
|
+
function Ma(e) {
|
|
1772
1821
|
return e && "id" in e ? e.id : void 0;
|
|
1773
1822
|
}
|
|
1774
|
-
const
|
|
1775
|
-
function
|
|
1823
|
+
const vn = "SUM";
|
|
1824
|
+
function w(e) {
|
|
1776
1825
|
return typeof e == "string" && e.trim().length > 0;
|
|
1777
1826
|
}
|
|
1778
1827
|
function E(e) {
|
|
1779
|
-
return
|
|
1828
|
+
return w(e) ? e.trim().toLowerCase() : "";
|
|
1780
1829
|
}
|
|
1781
|
-
function
|
|
1782
|
-
const t =
|
|
1830
|
+
function Ra(e) {
|
|
1831
|
+
const t = w(e.id) ? e.id.trim() : void 0;
|
|
1783
1832
|
if (!t) return;
|
|
1784
|
-
const i = E(t), o =
|
|
1833
|
+
const i = E(t), o = w(e.table) ? e.table.trim() : void 0;
|
|
1785
1834
|
if (!(i === E(e.name) || o && i === E(o)))
|
|
1786
1835
|
return t;
|
|
1787
1836
|
}
|
|
1788
|
-
function
|
|
1789
|
-
const t =
|
|
1837
|
+
function D(e) {
|
|
1838
|
+
const t = w(e.datasetId) ? e.datasetId.trim() : void 0;
|
|
1790
1839
|
if (t)
|
|
1791
1840
|
return E(t) === E(e.datasetName) ? void 0 : t;
|
|
1792
1841
|
}
|
|
1793
|
-
function
|
|
1842
|
+
function vt(e) {
|
|
1794
1843
|
if (e.kind !== "semantic") return e;
|
|
1795
|
-
const t =
|
|
1844
|
+
const t = D(e), { datasetId: i, ...o } = e;
|
|
1796
1845
|
return {
|
|
1797
1846
|
...o,
|
|
1798
1847
|
...t ? { datasetId: t } : {}
|
|
1799
1848
|
};
|
|
1800
1849
|
}
|
|
1801
|
-
function
|
|
1802
|
-
return e ? e.kind === "semantic" ? !!(
|
|
1850
|
+
function Ta(e) {
|
|
1851
|
+
return e ? e.kind === "semantic" ? !!(w(e.domainId) && (w(e.datasetId) || w(e.datasetName))) : e.kind === "physical" ? w(e.connectionId) && w(e.tableName) : w(e.connectionId) : !1;
|
|
1803
1852
|
}
|
|
1804
|
-
function
|
|
1853
|
+
function ae(e) {
|
|
1805
1854
|
if (!e)
|
|
1806
1855
|
return "";
|
|
1807
1856
|
if (e.kind === "semantic") {
|
|
1808
|
-
const t =
|
|
1857
|
+
const t = D(e);
|
|
1809
1858
|
return [
|
|
1810
1859
|
e.kind,
|
|
1811
1860
|
e.domainId,
|
|
@@ -1825,7 +1874,7 @@ function ne(e) {
|
|
|
1825
1874
|
e.label || ""
|
|
1826
1875
|
].join(":");
|
|
1827
1876
|
}
|
|
1828
|
-
function
|
|
1877
|
+
function ye(e, t) {
|
|
1829
1878
|
if (!e || !t)
|
|
1830
1879
|
return e === t;
|
|
1831
1880
|
if (e.kind !== t.kind)
|
|
@@ -1833,67 +1882,67 @@ function _e(e, t) {
|
|
|
1833
1882
|
if (e.kind === "semantic" && t.kind === "semantic") {
|
|
1834
1883
|
if (e.domainId !== t.domainId)
|
|
1835
1884
|
return !1;
|
|
1836
|
-
const i =
|
|
1885
|
+
const i = D(e), o = D(t);
|
|
1837
1886
|
return i && o ? i === o : e.datasetName === t.datasetName;
|
|
1838
1887
|
}
|
|
1839
|
-
return
|
|
1888
|
+
return ae(e) === ae(t);
|
|
1840
1889
|
}
|
|
1841
|
-
function
|
|
1842
|
-
return e.kind !== "semantic" || t.kind !== "semantic" ? e :
|
|
1890
|
+
function It(e, t) {
|
|
1891
|
+
return e.kind !== "semantic" || t.kind !== "semantic" ? e : vt({
|
|
1843
1892
|
...e,
|
|
1844
1893
|
datasetName: e.datasetName || t.datasetName,
|
|
1845
|
-
datasetId:
|
|
1894
|
+
datasetId: D(e) || D(t),
|
|
1846
1895
|
label: e.label || t.label,
|
|
1847
1896
|
connectionId: e.connectionId || t.connectionId
|
|
1848
1897
|
});
|
|
1849
1898
|
}
|
|
1850
|
-
function
|
|
1899
|
+
function Ea(e) {
|
|
1851
1900
|
const t = [];
|
|
1852
1901
|
for (const i of e) {
|
|
1853
|
-
const o =
|
|
1902
|
+
const o = vt(
|
|
1854
1903
|
i
|
|
1855
1904
|
), a = t.findIndex(
|
|
1856
|
-
(s) =>
|
|
1905
|
+
(s) => ye(s, o)
|
|
1857
1906
|
);
|
|
1858
1907
|
if (a === -1) {
|
|
1859
1908
|
t.push(o);
|
|
1860
1909
|
continue;
|
|
1861
1910
|
}
|
|
1862
|
-
t[a] =
|
|
1911
|
+
t[a] = It(
|
|
1863
1912
|
t[a],
|
|
1864
1913
|
o
|
|
1865
1914
|
);
|
|
1866
1915
|
}
|
|
1867
1916
|
return t;
|
|
1868
1917
|
}
|
|
1869
|
-
function
|
|
1870
|
-
return e.name === t.name &&
|
|
1918
|
+
function In(e, t) {
|
|
1919
|
+
return e.name === t.name && ye(e.source, t.source);
|
|
1871
1920
|
}
|
|
1872
|
-
function
|
|
1921
|
+
function Na(e) {
|
|
1873
1922
|
return [
|
|
1874
|
-
e.source ?
|
|
1875
|
-
|
|
1923
|
+
e.source ? ae(e.source) : "unknown",
|
|
1924
|
+
St(e),
|
|
1876
1925
|
e.name
|
|
1877
1926
|
].filter(Boolean).join(":");
|
|
1878
1927
|
}
|
|
1879
|
-
function
|
|
1880
|
-
return
|
|
1881
|
-
e.aggregate ||
|
|
1928
|
+
function St(e) {
|
|
1929
|
+
return Sn(
|
|
1930
|
+
e.aggregate || vn
|
|
1882
1931
|
);
|
|
1883
1932
|
}
|
|
1884
|
-
function
|
|
1933
|
+
function Sn(e) {
|
|
1885
1934
|
return e.trim().toUpperCase();
|
|
1886
1935
|
}
|
|
1887
|
-
function
|
|
1936
|
+
function $a(e, t) {
|
|
1888
1937
|
return {
|
|
1889
1938
|
...e,
|
|
1890
1939
|
label: e.label || t.label,
|
|
1891
1940
|
role: e.role || t.role,
|
|
1892
1941
|
dataType: e.dataType || t.dataType,
|
|
1893
|
-
source: e.source && t.source ?
|
|
1942
|
+
source: e.source && t.source ? It(e.source, t.source) : e.source || t.source
|
|
1894
1943
|
};
|
|
1895
1944
|
}
|
|
1896
|
-
function
|
|
1945
|
+
function kn(e) {
|
|
1897
1946
|
for (let t = 0; t < e.length; t += 1) {
|
|
1898
1947
|
const i = e[t];
|
|
1899
1948
|
if (e.some(
|
|
@@ -1903,19 +1952,19 @@ function _n(e) {
|
|
|
1903
1952
|
}
|
|
1904
1953
|
return !0;
|
|
1905
1954
|
}
|
|
1906
|
-
function
|
|
1907
|
-
return
|
|
1955
|
+
function kt(e, t) {
|
|
1956
|
+
return In(e, t);
|
|
1908
1957
|
}
|
|
1909
1958
|
function wt(e, t) {
|
|
1910
|
-
return
|
|
1959
|
+
return kt(e, t) && j(e) === j(t);
|
|
1911
1960
|
}
|
|
1912
|
-
function
|
|
1913
|
-
return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${
|
|
1961
|
+
function wn(e) {
|
|
1962
|
+
return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${j(e)}). Use different aggregates to request both, or remove one entry.`;
|
|
1914
1963
|
}
|
|
1915
|
-
function
|
|
1964
|
+
function $e(e) {
|
|
1916
1965
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
1917
1966
|
}
|
|
1918
|
-
function
|
|
1967
|
+
function An(e, t, i) {
|
|
1919
1968
|
if (e !== void 0) {
|
|
1920
1969
|
if (!e || typeof e != "object" || Array.isArray(e)) {
|
|
1921
1970
|
i.push(
|
|
@@ -1938,7 +1987,7 @@ function bn(e, t, i) {
|
|
|
1938
1987
|
);
|
|
1939
1988
|
return;
|
|
1940
1989
|
}
|
|
1941
|
-
(Array.isArray(a) ? a.every(
|
|
1990
|
+
(Array.isArray(a) ? a.every($e) : $e(a)) || i.push(
|
|
1942
1991
|
r(
|
|
1943
1992
|
"invalid_sql_default_parameter_value",
|
|
1944
1993
|
"SQL defaultParameters values must be strings, numbers, booleans, nulls, or arrays of those scalar values.",
|
|
@@ -1948,68 +1997,68 @@ function bn(e, t, i) {
|
|
|
1948
1997
|
});
|
|
1949
1998
|
}
|
|
1950
1999
|
}
|
|
1951
|
-
function
|
|
1952
|
-
return
|
|
2000
|
+
function xn(e, t) {
|
|
2001
|
+
return be(e, t).length === 1;
|
|
1953
2002
|
}
|
|
1954
|
-
function
|
|
1955
|
-
return
|
|
2003
|
+
function Fn(e, t) {
|
|
2004
|
+
return be(e, t).length === 1;
|
|
1956
2005
|
}
|
|
1957
|
-
function
|
|
2006
|
+
function be(e, t) {
|
|
1958
2007
|
return t.filter(
|
|
1959
|
-
(o) =>
|
|
2008
|
+
(o) => Dn(e, o)
|
|
1960
2009
|
);
|
|
1961
2010
|
}
|
|
1962
|
-
function
|
|
1963
|
-
return
|
|
2011
|
+
function Dn(e, t) {
|
|
2012
|
+
return Mn(e, t) ? e.source ? kt(t, e) : !0 : !1;
|
|
1964
2013
|
}
|
|
1965
|
-
function
|
|
1966
|
-
return !(t.name !== e.name || e.role !== void 0 && t.role !== void 0 && t.role !== e.role ||
|
|
2014
|
+
function Mn(e, t) {
|
|
2015
|
+
return !(t.name !== e.name || e.role !== void 0 && t.role !== void 0 && t.role !== e.role || Rn(e, t) && j(t) !== j(e));
|
|
1967
2016
|
}
|
|
1968
|
-
function
|
|
2017
|
+
function Rn(e, t) {
|
|
1969
2018
|
return e.role === "measure" || t.role === "measure" || e.aggregate !== void 0 || t.aggregate !== void 0;
|
|
1970
2019
|
}
|
|
1971
|
-
function
|
|
1972
|
-
return
|
|
2020
|
+
function j(e) {
|
|
2021
|
+
return St(e);
|
|
1973
2022
|
}
|
|
1974
|
-
const
|
|
1975
|
-
function
|
|
2023
|
+
const Tn = /^(\d{4})-(\d{2})-(\d{2})$/, At = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:\d{2})$/;
|
|
2024
|
+
function oe(e) {
|
|
1976
2025
|
if (typeof e != "string")
|
|
1977
2026
|
return null;
|
|
1978
|
-
const t = e.trim(), i =
|
|
2027
|
+
const t = e.trim(), i = Tn.exec(t);
|
|
1979
2028
|
if (i) {
|
|
1980
2029
|
const [, y, I, h] = i;
|
|
1981
|
-
return
|
|
2030
|
+
return je(y, I, h) ? new Date(Date.UTC(Number(y), Number(I) - 1, Number(h))) : null;
|
|
1982
2031
|
}
|
|
1983
|
-
const o =
|
|
2032
|
+
const o = At.exec(t);
|
|
1984
2033
|
if (!o)
|
|
1985
2034
|
return null;
|
|
1986
2035
|
const [, a, s, l, d, c, p = "00", , u] = o;
|
|
1987
|
-
if (
|
|
2036
|
+
if (!je(a, s, l) || !N(d, 0, 23) || !N(c, 0, 59) || !N(p, 0, 59) || !En(u))
|
|
1988
2037
|
return null;
|
|
1989
2038
|
const _ = new Date(t);
|
|
1990
2039
|
return Number.isFinite(_.getTime()) ? _ : null;
|
|
1991
2040
|
}
|
|
1992
|
-
function
|
|
1993
|
-
return typeof e != "string" || !
|
|
2041
|
+
function ja(e) {
|
|
2042
|
+
return typeof e != "string" || !At.test(e.trim()) ? null : oe(e);
|
|
1994
2043
|
}
|
|
1995
|
-
function
|
|
2044
|
+
function je(e, t, i) {
|
|
1996
2045
|
const o = Number(e), a = Number(t), s = Number(i);
|
|
1997
2046
|
if (!Number.isInteger(o) || !Number.isInteger(a) || !Number.isInteger(s) || a < 1 || a > 12)
|
|
1998
2047
|
return !1;
|
|
1999
2048
|
const l = new Date(Date.UTC(o, a - 1, s));
|
|
2000
2049
|
return l.getUTCFullYear() === o && l.getUTCMonth() === a - 1 && l.getUTCDate() === s;
|
|
2001
2050
|
}
|
|
2002
|
-
function
|
|
2051
|
+
function N(e, t, i) {
|
|
2003
2052
|
const o = Number(e);
|
|
2004
2053
|
return Number.isInteger(o) && o >= t && o <= i;
|
|
2005
2054
|
}
|
|
2006
|
-
function
|
|
2055
|
+
function En(e) {
|
|
2007
2056
|
if (e === "Z")
|
|
2008
2057
|
return !0;
|
|
2009
2058
|
const t = /^([+-])(\d{2}):(\d{2})$/.exec(e);
|
|
2010
|
-
return !!(t &&
|
|
2059
|
+
return !!(t && N(t[2], 0, 23) && N(t[3], 0, 59));
|
|
2011
2060
|
}
|
|
2012
|
-
function
|
|
2061
|
+
function Ce(e, t, i) {
|
|
2013
2062
|
if (e !== void 0) {
|
|
2014
2063
|
if (!f(e)) {
|
|
2015
2064
|
i.push(
|
|
@@ -2036,7 +2085,7 @@ function je(e, t, i) {
|
|
|
2036
2085
|
);
|
|
2037
2086
|
}
|
|
2038
2087
|
}
|
|
2039
|
-
function
|
|
2088
|
+
function Oe(e) {
|
|
2040
2089
|
const t = /* @__PURE__ */ new Set();
|
|
2041
2090
|
for (const i of e) {
|
|
2042
2091
|
if (t.has(i))
|
|
@@ -2045,7 +2094,7 @@ function Ce(e) {
|
|
|
2045
2094
|
}
|
|
2046
2095
|
return null;
|
|
2047
2096
|
}
|
|
2048
|
-
function
|
|
2097
|
+
function Nn(e, t, i) {
|
|
2049
2098
|
if (!f(e)) {
|
|
2050
2099
|
i.push(
|
|
2051
2100
|
r(
|
|
@@ -2068,13 +2117,13 @@ function Fn(e, t, i) {
|
|
|
2068
2117
|
"Input binding kind must be filter or control.",
|
|
2069
2118
|
`${t}.kind`
|
|
2070
2119
|
)
|
|
2071
|
-
), e.field !== void 0 && b(e.field, `${t}.field`, i), e.relationshipHint !== void 0 &&
|
|
2120
|
+
), e.field !== void 0 && b(e.field, `${t}.field`, i), e.relationshipHint !== void 0 && ve(
|
|
2072
2121
|
e.relationshipHint,
|
|
2073
2122
|
`${t}.relationshipHint`,
|
|
2074
2123
|
i
|
|
2075
2124
|
);
|
|
2076
2125
|
}
|
|
2077
|
-
function
|
|
2126
|
+
function ve(e, t, i) {
|
|
2078
2127
|
if (!f(e)) {
|
|
2079
2128
|
i.push(
|
|
2080
2129
|
r(
|
|
@@ -2093,7 +2142,7 @@ function be(e, t, i) {
|
|
|
2093
2142
|
)
|
|
2094
2143
|
);
|
|
2095
2144
|
}
|
|
2096
|
-
function
|
|
2145
|
+
function $n(e, t) {
|
|
2097
2146
|
var o, a;
|
|
2098
2147
|
if (((o = e.source) == null ? void 0 : o.kind) !== "semantic" && ((a = e.source) == null ? void 0 : a.kind) !== "physical" && t.push(
|
|
2099
2148
|
r(
|
|
@@ -2114,7 +2163,7 @@ function Mn(e, t) {
|
|
|
2114
2163
|
"search"
|
|
2115
2164
|
)
|
|
2116
2165
|
), e.matchValues !== void 0) {
|
|
2117
|
-
const s =
|
|
2166
|
+
const s = jt(e.matchValues);
|
|
2118
2167
|
s.ok || t.push(
|
|
2119
2168
|
r("invalid_input_options_match_values", s.error, "matchValues")
|
|
2120
2169
|
), typeof e.search == "string" && e.search.trim() && t.push(
|
|
@@ -2168,7 +2217,7 @@ function Mn(e, t) {
|
|
|
2168
2217
|
path: `disambiguationFields.${l}`
|
|
2169
2218
|
})) : []
|
|
2170
2219
|
].forEach(({ field: s, path: l }) => {
|
|
2171
|
-
s != null && s.source && !
|
|
2220
|
+
s != null && s.source && !ye(s.source, e.source) && t.push(
|
|
2172
2221
|
r(
|
|
2173
2222
|
"input_options_field_source_mismatch",
|
|
2174
2223
|
"Input option fields must belong to the declared option source.",
|
|
@@ -2176,10 +2225,10 @@ function Mn(e, t) {
|
|
|
2176
2225
|
)
|
|
2177
2226
|
);
|
|
2178
2227
|
}), e.dependencies !== void 0) {
|
|
2179
|
-
const s =
|
|
2228
|
+
const s = Cn(
|
|
2180
2229
|
e.dependencies
|
|
2181
2230
|
);
|
|
2182
|
-
t.push(...s.errors), s.ok &&
|
|
2231
|
+
t.push(...s.errors), s.ok && Yn(e, t);
|
|
2183
2232
|
}
|
|
2184
2233
|
if (e.population !== void 0) {
|
|
2185
2234
|
const s = e.population;
|
|
@@ -2211,11 +2260,11 @@ function Mn(e, t) {
|
|
|
2211
2260
|
"Input options population relationshipHint is only valid for related_population.",
|
|
2212
2261
|
"population.relationshipHint"
|
|
2213
2262
|
)
|
|
2214
|
-
), l === "related_population" && (
|
|
2263
|
+
), l === "related_population" && (le(
|
|
2215
2264
|
s.baseSource,
|
|
2216
2265
|
"population.baseSource",
|
|
2217
2266
|
t
|
|
2218
|
-
), s.relationshipHint !== void 0 &&
|
|
2267
|
+
), s.relationshipHint !== void 0 && ve(
|
|
2219
2268
|
s.relationshipHint,
|
|
2220
2269
|
"population.relationshipHint",
|
|
2221
2270
|
t
|
|
@@ -2223,7 +2272,7 @@ function Mn(e, t) {
|
|
|
2223
2272
|
}
|
|
2224
2273
|
}
|
|
2225
2274
|
}
|
|
2226
|
-
function
|
|
2275
|
+
function jn(e, t) {
|
|
2227
2276
|
if (!(!("inputs" in e) || e.inputs === void 0)) {
|
|
2228
2277
|
if (!Array.isArray(e.inputs)) {
|
|
2229
2278
|
t.push(
|
|
@@ -2236,11 +2285,11 @@ function Dn(e, t) {
|
|
|
2236
2285
|
return;
|
|
2237
2286
|
}
|
|
2238
2287
|
e.inputs.forEach(
|
|
2239
|
-
(i, o) =>
|
|
2288
|
+
(i, o) => Nn(i, `inputs.${o}`, t)
|
|
2240
2289
|
);
|
|
2241
2290
|
}
|
|
2242
2291
|
}
|
|
2243
|
-
function
|
|
2292
|
+
function Cn(e, t = "protocol") {
|
|
2244
2293
|
const i = [];
|
|
2245
2294
|
if (!f(e))
|
|
2246
2295
|
return i.push(
|
|
@@ -2257,12 +2306,12 @@ function Rn(e, t = "protocol") {
|
|
|
2257
2306
|
"Input options dependencies mode must be independent, explicit, or all_applicable.",
|
|
2258
2307
|
"dependencies.mode"
|
|
2259
2308
|
)
|
|
2260
|
-
),
|
|
2309
|
+
), Z(
|
|
2261
2310
|
o.includeInputIds,
|
|
2262
2311
|
"dependencies.includeInputIds",
|
|
2263
2312
|
i,
|
|
2264
2313
|
"Input options includeInputIds must be non-empty strings."
|
|
2265
|
-
),
|
|
2314
|
+
), Z(
|
|
2266
2315
|
o.excludeInputIds,
|
|
2267
2316
|
"dependencies.excludeInputIds",
|
|
2268
2317
|
i,
|
|
@@ -2273,7 +2322,7 @@ function Rn(e, t = "protocol") {
|
|
|
2273
2322
|
"All applicable dependencies cannot specify includeInputIds.",
|
|
2274
2323
|
"dependencies.includeInputIds"
|
|
2275
2324
|
)
|
|
2276
|
-
),
|
|
2325
|
+
), Z(
|
|
2277
2326
|
o.omitInputIds,
|
|
2278
2327
|
"dependencies.omitInputIds",
|
|
2279
2328
|
i,
|
|
@@ -2290,9 +2339,9 @@ function Rn(e, t = "protocol") {
|
|
|
2290
2339
|
)
|
|
2291
2340
|
);
|
|
2292
2341
|
}
|
|
2293
|
-
return t === "dashboard" &&
|
|
2342
|
+
return t === "dashboard" && On(o, i), { ok: i.length === 0, errors: i, warnings: [] };
|
|
2294
2343
|
}
|
|
2295
|
-
function
|
|
2344
|
+
function On(e, t) {
|
|
2296
2345
|
const { mode: i, includeInputIds: o, excludeInputIds: a } = e;
|
|
2297
2346
|
i === void 0 && t.push(
|
|
2298
2347
|
r(
|
|
@@ -2326,7 +2375,7 @@ function En(e, t) {
|
|
|
2326
2375
|
)
|
|
2327
2376
|
);
|
|
2328
2377
|
}
|
|
2329
|
-
function
|
|
2378
|
+
function Yn(e, t) {
|
|
2330
2379
|
var a, s, l;
|
|
2331
2380
|
const i = new Set(
|
|
2332
2381
|
Array.isArray(e.inputs) ? e.inputs.map((d) => f(d) ? d.inputId : void 0).filter((d) => typeof d == "string") : []
|
|
@@ -2348,11 +2397,11 @@ function Tn(e, t) {
|
|
|
2348
2397
|
)
|
|
2349
2398
|
);
|
|
2350
2399
|
}
|
|
2351
|
-
function
|
|
2400
|
+
function Z(e, t, i, o) {
|
|
2352
2401
|
e !== void 0 && (!Array.isArray(e) || e.some((a) => !m(a))) && i.push(r("invalid_input_options_dependencies", o, t));
|
|
2353
2402
|
}
|
|
2354
|
-
const
|
|
2355
|
-
function
|
|
2403
|
+
const Pn = new Set(Ve);
|
|
2404
|
+
function Bn(e, t, i) {
|
|
2356
2405
|
if (f(e) && e.type === "temporal_bucket") {
|
|
2357
2406
|
i.push(
|
|
2358
2407
|
r(
|
|
@@ -2363,9 +2412,9 @@ function $n(e, t, i) {
|
|
|
2363
2412
|
);
|
|
2364
2413
|
return;
|
|
2365
2414
|
}
|
|
2366
|
-
|
|
2415
|
+
Ue(e, t, i);
|
|
2367
2416
|
}
|
|
2368
|
-
function
|
|
2417
|
+
function Ye(e, t, i) {
|
|
2369
2418
|
if (!f(e)) {
|
|
2370
2419
|
i.push(
|
|
2371
2420
|
r(
|
|
@@ -2391,7 +2440,7 @@ function Oe(e, t, i) {
|
|
|
2391
2440
|
required: !0
|
|
2392
2441
|
});
|
|
2393
2442
|
}
|
|
2394
|
-
function
|
|
2443
|
+
function Ln(e, t, i) {
|
|
2395
2444
|
if (!f(e)) {
|
|
2396
2445
|
i.push(
|
|
2397
2446
|
r(
|
|
@@ -2408,15 +2457,15 @@ function jn(e, t, i) {
|
|
|
2408
2457
|
"Result calculation output needs a stable key.",
|
|
2409
2458
|
`${t}.key`
|
|
2410
2459
|
)
|
|
2411
|
-
), e.dataType !== void 0 && (typeof e.dataType != "string" || !
|
|
2460
|
+
), e.dataType !== void 0 && (typeof e.dataType != "string" || !qe.has(e.dataType)) && i.push(
|
|
2412
2461
|
r(
|
|
2413
2462
|
"invalid_result_calculation_output",
|
|
2414
2463
|
"Result calculation output dataType must be string, number, boolean, date, datetime, or unknown.",
|
|
2415
2464
|
`${t}.dataType`
|
|
2416
2465
|
)
|
|
2417
|
-
),
|
|
2466
|
+
), Bn(e.format, `${t}.format`, i);
|
|
2418
2467
|
}
|
|
2419
|
-
function
|
|
2468
|
+
function Vn(e, t) {
|
|
2420
2469
|
if (e.analysis === void 0)
|
|
2421
2470
|
return;
|
|
2422
2471
|
if (!f(e.analysis)) {
|
|
@@ -2459,17 +2508,17 @@ function Cn(e, t) {
|
|
|
2459
2508
|
)
|
|
2460
2509
|
);
|
|
2461
2510
|
const { timeWindow: i } = e.analysis;
|
|
2462
|
-
i !== void 0 &&
|
|
2511
|
+
i !== void 0 && se(i, "analysis.timeWindow", t);
|
|
2463
2512
|
}
|
|
2464
|
-
const
|
|
2465
|
-
jt
|
|
2466
|
-
), Yn = new Set(
|
|
2513
|
+
const qn = new Set(
|
|
2467
2514
|
Ct
|
|
2468
|
-
),
|
|
2515
|
+
), Un = new Set(
|
|
2469
2516
|
Ot
|
|
2517
|
+
), Hn = new Set(
|
|
2518
|
+
Yt
|
|
2470
2519
|
);
|
|
2471
|
-
function
|
|
2472
|
-
|
|
2520
|
+
function Gn(e, t, i) {
|
|
2521
|
+
qn.has(e.unit) || i.push(
|
|
2473
2522
|
r(
|
|
2474
2523
|
"invalid_time_window",
|
|
2475
2524
|
"Calendar time window unit must be one of: day, week, month, quarter, year.",
|
|
@@ -2495,7 +2544,7 @@ function Bn(e, t, i) {
|
|
|
2495
2544
|
)
|
|
2496
2545
|
);
|
|
2497
2546
|
}
|
|
2498
|
-
function
|
|
2547
|
+
function se(e, t, i) {
|
|
2499
2548
|
if (!f(e)) {
|
|
2500
2549
|
i.push(
|
|
2501
2550
|
r(
|
|
@@ -2513,7 +2562,7 @@ function oe(e, t, i) {
|
|
|
2513
2562
|
`${t}.kind`
|
|
2514
2563
|
)
|
|
2515
2564
|
), e.kind === "calendar") {
|
|
2516
|
-
|
|
2565
|
+
Gn(e, t, i);
|
|
2517
2566
|
return;
|
|
2518
2567
|
}
|
|
2519
2568
|
if (e.kind === "absolute") {
|
|
@@ -2530,7 +2579,7 @@ function oe(e, t, i) {
|
|
|
2530
2579
|
`${t}.end`
|
|
2531
2580
|
)
|
|
2532
2581
|
), m(e.start) && m(e.end)) {
|
|
2533
|
-
const o =
|
|
2582
|
+
const o = oe(e.start), a = oe(e.end);
|
|
2534
2583
|
o || i.push(
|
|
2535
2584
|
r(
|
|
2536
2585
|
"invalid_time_window",
|
|
@@ -2553,10 +2602,10 @@ function oe(e, t, i) {
|
|
|
2553
2602
|
}
|
|
2554
2603
|
return;
|
|
2555
2604
|
}
|
|
2556
|
-
(typeof e.unit != "string" || !
|
|
2605
|
+
(typeof e.unit != "string" || !Pn.has(e.unit)) && i.push(
|
|
2557
2606
|
r(
|
|
2558
2607
|
"invalid_time_window",
|
|
2559
|
-
`Time window unit must be one of: ${
|
|
2608
|
+
`Time window unit must be one of: ${Ve.join(", ")}.`,
|
|
2560
2609
|
`${t}.unit`
|
|
2561
2610
|
)
|
|
2562
2611
|
), (typeof e.value != "number" || !Number.isFinite(e.value) || e.value <= 0) && i.push(
|
|
@@ -2565,13 +2614,13 @@ function oe(e, t, i) {
|
|
|
2565
2614
|
"Time window value must be a positive number.",
|
|
2566
2615
|
`${t}.value`
|
|
2567
2616
|
)
|
|
2568
|
-
), e.anchor !== void 0 && !
|
|
2617
|
+
), e.anchor !== void 0 && !Un.has(e.anchor) && i.push(
|
|
2569
2618
|
r(
|
|
2570
2619
|
"invalid_time_window",
|
|
2571
2620
|
"Time window anchor must be now or latest_available.",
|
|
2572
2621
|
`${t}.anchor`
|
|
2573
2622
|
)
|
|
2574
|
-
), e.completeness !== void 0 && !
|
|
2623
|
+
), e.completeness !== void 0 && !Hn.has(e.completeness) && i.push(
|
|
2575
2624
|
r(
|
|
2576
2625
|
"invalid_time_window",
|
|
2577
2626
|
"Time window completeness must be include_partial or complete_periods.",
|
|
@@ -2579,7 +2628,7 @@ function oe(e, t, i) {
|
|
|
2579
2628
|
)
|
|
2580
2629
|
);
|
|
2581
2630
|
}
|
|
2582
|
-
function
|
|
2631
|
+
function re(e, t, i) {
|
|
2583
2632
|
if (e !== void 0) {
|
|
2584
2633
|
if (!Array.isArray(e)) {
|
|
2585
2634
|
i.push(
|
|
@@ -2676,7 +2725,7 @@ function se(e, t, i) {
|
|
|
2676
2725
|
});
|
|
2677
2726
|
}
|
|
2678
2727
|
}
|
|
2679
|
-
function
|
|
2728
|
+
function Ca(e) {
|
|
2680
2729
|
const t = [];
|
|
2681
2730
|
if (!f(e))
|
|
2682
2731
|
return t.push(
|
|
@@ -2703,11 +2752,11 @@ function Da(e) {
|
|
|
2703
2752
|
"Result calculation kind must be percent_of_total, rank, running_total, or previous_row_delta.",
|
|
2704
2753
|
"kind"
|
|
2705
2754
|
)
|
|
2706
|
-
),
|
|
2755
|
+
), Ye(e.input, "input", t), Ln(e.output, "output", t), e.kind === "percent_of_total") {
|
|
2707
2756
|
const i = e.denominator;
|
|
2708
2757
|
i !== void 0 && (f(i) ? i.scope === "population" ? (b(i.metric, "denominator.metric", t, {
|
|
2709
2758
|
required: !0
|
|
2710
|
-
}),
|
|
2759
|
+
}), re(
|
|
2711
2760
|
i.filters,
|
|
2712
2761
|
"denominator.filters",
|
|
2713
2762
|
t
|
|
@@ -2731,9 +2780,9 @@ function Da(e) {
|
|
|
2731
2780
|
"Rank result calculation order must be asc or desc.",
|
|
2732
2781
|
"order"
|
|
2733
2782
|
)
|
|
2734
|
-
), (e.kind === "running_total" || e.kind === "previous_row_delta") && e.orderBy !== void 0 &&
|
|
2783
|
+
), (e.kind === "running_total" || e.kind === "previous_row_delta") && e.orderBy !== void 0 && Ye(e.orderBy, "orderBy", t), { ok: t.length === 0, errors: t, warnings: [] };
|
|
2735
2784
|
}
|
|
2736
|
-
function
|
|
2785
|
+
function xt(e) {
|
|
2737
2786
|
var o;
|
|
2738
2787
|
const t = [], i = [];
|
|
2739
2788
|
if (!e || typeof e != "object")
|
|
@@ -2754,8 +2803,8 @@ function At(e) {
|
|
|
2754
2803
|
]
|
|
2755
2804
|
};
|
|
2756
2805
|
if (e.kind === "matrix") {
|
|
2757
|
-
const a =
|
|
2758
|
-
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: i, repairHints:
|
|
2806
|
+
const a = sn.safeParse(e);
|
|
2807
|
+
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: i, repairHints: Pe(t) };
|
|
2759
2808
|
}
|
|
2760
2809
|
if (e.version !== void 0 && e.version !== 1 && t.push(
|
|
2761
2810
|
r(
|
|
@@ -2763,7 +2812,7 @@ function At(e) {
|
|
|
2763
2812
|
"Analytics intent version must be 1.",
|
|
2764
2813
|
"version"
|
|
2765
2814
|
)
|
|
2766
|
-
),
|
|
2815
|
+
), le(e.source, "source", t), zn(e, t), jn(e, t), "relationshipHint" in e && e.relationshipHint !== void 0 && ve(
|
|
2767
2816
|
e.relationshipHint,
|
|
2768
2817
|
"relationshipHint",
|
|
2769
2818
|
t
|
|
@@ -2789,7 +2838,7 @@ function At(e) {
|
|
|
2789
2838
|
b(s, `measures.${l}`, t, {
|
|
2790
2839
|
required: !0
|
|
2791
2840
|
});
|
|
2792
|
-
}), a.length > 0 && !
|
|
2841
|
+
}), a.length > 0 && !kn(a)) {
|
|
2793
2842
|
const s = a.find(
|
|
2794
2843
|
(l, d) => a.some(
|
|
2795
2844
|
(c, p) => p !== d && wt(c, l)
|
|
@@ -2798,12 +2847,12 @@ function At(e) {
|
|
|
2798
2847
|
s && t.push(
|
|
2799
2848
|
r(
|
|
2800
2849
|
"duplicate_measure",
|
|
2801
|
-
|
|
2850
|
+
wn(s),
|
|
2802
2851
|
"measures"
|
|
2803
2852
|
)
|
|
2804
2853
|
);
|
|
2805
2854
|
}
|
|
2806
|
-
if (f(e.primaryMeasure) && m(e.primaryMeasure.name) &&
|
|
2855
|
+
if (f(e.primaryMeasure) && m(e.primaryMeasure.name) && be(
|
|
2807
2856
|
e.primaryMeasure,
|
|
2808
2857
|
a
|
|
2809
2858
|
).length > 1 && t.push(
|
|
@@ -2814,7 +2863,7 @@ function At(e) {
|
|
|
2814
2863
|
)
|
|
2815
2864
|
), e.primaryMeasure !== void 0 && (b(e.primaryMeasure, "primaryMeasure", t, {
|
|
2816
2865
|
required: !0
|
|
2817
|
-
}), f(e.primaryMeasure) && m(e.primaryMeasure.name) && a.length > 0 && !
|
|
2866
|
+
}), f(e.primaryMeasure) && m(e.primaryMeasure.name) && a.length > 0 && !xn(
|
|
2818
2867
|
e.primaryMeasure,
|
|
2819
2868
|
a
|
|
2820
2869
|
) && t.push(
|
|
@@ -2837,13 +2886,13 @@ function At(e) {
|
|
|
2837
2886
|
"Metric intent dimensions must be an array of field references with names.",
|
|
2838
2887
|
"dimensions"
|
|
2839
2888
|
)
|
|
2840
|
-
), e.dateField !== void 0 && b(e.dateField, "dateField", t), e.timeWindow !== void 0 && (
|
|
2889
|
+
), e.dateField !== void 0 && b(e.dateField, "dateField", t), e.timeWindow !== void 0 && (se(e.timeWindow, "timeWindow", t), e.dateField || t.push(
|
|
2841
2890
|
r(
|
|
2842
2891
|
"missing_time_window_date_field",
|
|
2843
2892
|
"Metric timeWindow needs a dateField.",
|
|
2844
2893
|
"dateField"
|
|
2845
2894
|
)
|
|
2846
|
-
)),
|
|
2895
|
+
)), re(e.filters, "filters", t), Array.isArray(e.dimensions) && e.dimensions.forEach((s, l) => {
|
|
2847
2896
|
b(s, `dimensions.${l}`, t);
|
|
2848
2897
|
}), e.orderBy !== void 0) {
|
|
2849
2898
|
if (!f(e.orderBy))
|
|
@@ -2870,7 +2919,7 @@ function At(e) {
|
|
|
2870
2919
|
(l) => f(l) && m(l.name)
|
|
2871
2920
|
) : []
|
|
2872
2921
|
];
|
|
2873
|
-
s.length > 0 && !
|
|
2922
|
+
s.length > 0 && !Fn(
|
|
2874
2923
|
e.orderBy.field,
|
|
2875
2924
|
s
|
|
2876
2925
|
) && t.push(
|
|
@@ -2882,7 +2931,7 @@ function At(e) {
|
|
|
2882
2931
|
);
|
|
2883
2932
|
}
|
|
2884
2933
|
}
|
|
2885
|
-
|
|
2934
|
+
Vn(e, t);
|
|
2886
2935
|
} else if (e.kind === "records") {
|
|
2887
2936
|
if (!Array.isArray(e.fields) || e.fields.length === 0 ? t.push(
|
|
2888
2937
|
r(
|
|
@@ -2900,13 +2949,13 @@ function At(e) {
|
|
|
2900
2949
|
)
|
|
2901
2950
|
), Array.isArray(e.fields) && e.fields.forEach((a, s) => {
|
|
2902
2951
|
b(a, `fields.${s}`, t);
|
|
2903
|
-
}), e.dateField !== void 0 && b(e.dateField, "dateField", t),
|
|
2952
|
+
}), e.dateField !== void 0 && b(e.dateField, "dateField", t), Ce(e.pagination, "pagination", t), e.timeWindow !== void 0 && (se(e.timeWindow, "timeWindow", t), e.dateField || t.push(
|
|
2904
2953
|
r(
|
|
2905
2954
|
"missing_time_window_date_field",
|
|
2906
2955
|
"Records timeWindow needs a dateField.",
|
|
2907
2956
|
"dateField"
|
|
2908
2957
|
)
|
|
2909
|
-
)),
|
|
2958
|
+
)), re(e.filters, "filters", t), Array.isArray(e.filters) && e.filters.forEach((a, s) => {
|
|
2910
2959
|
f(a) && a.scope === "aggregate" && t.push(
|
|
2911
2960
|
r(
|
|
2912
2961
|
"unsupported_record_filter_scope",
|
|
@@ -2964,7 +3013,7 @@ function At(e) {
|
|
|
2964
3013
|
);
|
|
2965
3014
|
});
|
|
2966
3015
|
}
|
|
2967
|
-
} else e.kind === "inputOptions" ?
|
|
3016
|
+
} else e.kind === "inputOptions" ? $n(e, t) : e.kind === "sql" ? (((o = e.source) == null ? void 0 : o.kind) !== "sql" && t.push(
|
|
2968
3017
|
r(
|
|
2969
3018
|
"invalid_sql_source",
|
|
2970
3019
|
"SQL analytics intent must use a SQL execution source.",
|
|
@@ -2972,13 +3021,13 @@ function At(e) {
|
|
|
2972
3021
|
)
|
|
2973
3022
|
), m(e.sql) || t.push(
|
|
2974
3023
|
r("missing_sql", "SQL analytics intent needs SQL text.", "sql")
|
|
2975
|
-
),
|
|
3024
|
+
), An(
|
|
2976
3025
|
e.defaultParameters,
|
|
2977
3026
|
"defaultParameters",
|
|
2978
3027
|
t
|
|
2979
3028
|
), Array.isArray(e.fields) && e.fields.forEach((a, s) => {
|
|
2980
3029
|
b(a, `fields.${s}`, t);
|
|
2981
|
-
}),
|
|
3030
|
+
}), Ce(e.pagination, "pagination", t)) : t.push(
|
|
2982
3031
|
r(
|
|
2983
3032
|
"invalid_analytics_kind",
|
|
2984
3033
|
"Analytics kind is not supported.",
|
|
@@ -2989,10 +3038,10 @@ function At(e) {
|
|
|
2989
3038
|
ok: t.length === 0,
|
|
2990
3039
|
errors: t,
|
|
2991
3040
|
warnings: i,
|
|
2992
|
-
repairHints:
|
|
3041
|
+
repairHints: Pe(t)
|
|
2993
3042
|
};
|
|
2994
3043
|
}
|
|
2995
|
-
function
|
|
3044
|
+
function zn(e, t) {
|
|
2996
3045
|
if (!(!("derivedFields" in e) || e.derivedFields === void 0)) {
|
|
2997
3046
|
if (!Array.isArray(e.derivedFields)) {
|
|
2998
3047
|
t.push(
|
|
@@ -3005,7 +3054,7 @@ function Ln(e, t) {
|
|
|
3005
3054
|
return;
|
|
3006
3055
|
}
|
|
3007
3056
|
e.derivedFields.forEach((i, o) => {
|
|
3008
|
-
|
|
3057
|
+
ue(
|
|
3009
3058
|
i
|
|
3010
3059
|
).errors.forEach((s) => {
|
|
3011
3060
|
t.push({
|
|
@@ -3016,7 +3065,7 @@ function Ln(e, t) {
|
|
|
3016
3065
|
});
|
|
3017
3066
|
}
|
|
3018
3067
|
}
|
|
3019
|
-
function
|
|
3068
|
+
function Qn(e) {
|
|
3020
3069
|
const t = [], i = [];
|
|
3021
3070
|
if (!e || typeof e != "object")
|
|
3022
3071
|
return {
|
|
@@ -3071,7 +3120,7 @@ function Vn(e) {
|
|
|
3071
3120
|
"instruction"
|
|
3072
3121
|
)
|
|
3073
3122
|
), e.analyticsIntent) {
|
|
3074
|
-
const o =
|
|
3123
|
+
const o = xt(
|
|
3075
3124
|
e.analyticsIntent
|
|
3076
3125
|
);
|
|
3077
3126
|
t.push(...o.errors), i.push(...o.warnings);
|
|
@@ -3088,10 +3137,10 @@ function Vn(e) {
|
|
|
3088
3137
|
ok: t.length === 0,
|
|
3089
3138
|
errors: t,
|
|
3090
3139
|
warnings: i,
|
|
3091
|
-
repairHints:
|
|
3140
|
+
repairHints: Ft(t)
|
|
3092
3141
|
};
|
|
3093
3142
|
}
|
|
3094
|
-
function
|
|
3143
|
+
function Oa(e) {
|
|
3095
3144
|
const t = [], i = [];
|
|
3096
3145
|
if (!e || typeof e != "object")
|
|
3097
3146
|
return {
|
|
@@ -3119,7 +3168,7 @@ function Ra(e) {
|
|
|
3119
3168
|
"kind"
|
|
3120
3169
|
)
|
|
3121
3170
|
);
|
|
3122
|
-
const o =
|
|
3171
|
+
const o = Qn(
|
|
3123
3172
|
e.operationIntent
|
|
3124
3173
|
);
|
|
3125
3174
|
return t.push(...o.errors), i.push(...o.warnings), Array.isArray(e.plannedToolCalls) || t.push(
|
|
@@ -3132,16 +3181,16 @@ function Ra(e) {
|
|
|
3132
3181
|
ok: t.length === 0,
|
|
3133
3182
|
errors: t,
|
|
3134
3183
|
warnings: i,
|
|
3135
|
-
repairHints:
|
|
3184
|
+
repairHints: Ft(t)
|
|
3136
3185
|
};
|
|
3137
3186
|
}
|
|
3138
|
-
function
|
|
3187
|
+
function Ft(e) {
|
|
3139
3188
|
return e.map((t) => ({
|
|
3140
3189
|
code: t.code,
|
|
3141
3190
|
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."
|
|
3142
3191
|
}));
|
|
3143
3192
|
}
|
|
3144
|
-
function
|
|
3193
|
+
function Pe(e) {
|
|
3145
3194
|
return e.map((t) => {
|
|
3146
3195
|
switch (t.code) {
|
|
3147
3196
|
case "invalid_matrix_intent":
|
|
@@ -3229,7 +3278,7 @@ function Ye(e) {
|
|
|
3229
3278
|
}
|
|
3230
3279
|
}).filter((t) => !!t);
|
|
3231
3280
|
}
|
|
3232
|
-
function
|
|
3281
|
+
function Kn(e, t, i, o) {
|
|
3233
3282
|
if (!e || typeof e != "object") {
|
|
3234
3283
|
i.push(
|
|
3235
3284
|
r("invalid_view", "Dashboard view must be an object.", t)
|
|
@@ -3275,7 +3324,7 @@ function qn(e, t, i, o) {
|
|
|
3275
3324
|
`${t}.analytics.kind`
|
|
3276
3325
|
)
|
|
3277
3326
|
);
|
|
3278
|
-
const a =
|
|
3327
|
+
const a = xt(e.analytics);
|
|
3279
3328
|
for (const s of a.errors)
|
|
3280
3329
|
i.push(
|
|
3281
3330
|
r(
|
|
@@ -3293,7 +3342,7 @@ function qn(e, t, i, o) {
|
|
|
3293
3342
|
)
|
|
3294
3343
|
);
|
|
3295
3344
|
}
|
|
3296
|
-
function
|
|
3345
|
+
function Ya(e) {
|
|
3297
3346
|
const t = [], i = [];
|
|
3298
3347
|
if (!e || typeof e != "object")
|
|
3299
3348
|
return {
|
|
@@ -3313,7 +3362,7 @@ function Ea(e) {
|
|
|
3313
3362
|
), m(e.title) || t.push(
|
|
3314
3363
|
r("missing_title", "Dashboard intent needs a title.", "title")
|
|
3315
3364
|
);
|
|
3316
|
-
const o = Array.isArray(e.inputs) ? e.inputs : [], a =
|
|
3365
|
+
const o = Array.isArray(e.inputs) ? e.inputs : [], a = Oe(
|
|
3317
3366
|
o.filter(f).map((c) => c.id).filter((c) => typeof c == "string")
|
|
3318
3367
|
);
|
|
3319
3368
|
a && t.push(
|
|
@@ -3349,7 +3398,7 @@ function Ea(e) {
|
|
|
3349
3398
|
);
|
|
3350
3399
|
const l = s.flatMap(
|
|
3351
3400
|
(c) => c && typeof c == "object" && Array.isArray(c.views) ? c.views.filter(f).map((p) => p.id).filter((p) => !!p) : []
|
|
3352
|
-
), d =
|
|
3401
|
+
), d = Oe(l);
|
|
3353
3402
|
d && t.push(
|
|
3354
3403
|
r(
|
|
3355
3404
|
"duplicate_view_id",
|
|
@@ -3386,7 +3435,7 @@ function Ea(e) {
|
|
|
3386
3435
|
continue;
|
|
3387
3436
|
}
|
|
3388
3437
|
for (const [_, y] of p.views.entries())
|
|
3389
|
-
|
|
3438
|
+
Kn(
|
|
3390
3439
|
y,
|
|
3391
3440
|
`${u}.views.${_}`,
|
|
3392
3441
|
t,
|
|
@@ -3396,124 +3445,130 @@ function Ea(e) {
|
|
|
3396
3445
|
return { ok: t.length === 0, errors: t, warnings: i };
|
|
3397
3446
|
}
|
|
3398
3447
|
export {
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3448
|
+
jt as $,
|
|
3449
|
+
he as A,
|
|
3450
|
+
Ki as B,
|
|
3451
|
+
J as C,
|
|
3452
|
+
ki as D,
|
|
3453
|
+
mt as E,
|
|
3454
|
+
ne as F,
|
|
3455
|
+
ft as G,
|
|
3456
|
+
vi as H,
|
|
3457
|
+
F as I,
|
|
3458
|
+
sa as J,
|
|
3459
|
+
Ji as K,
|
|
3460
|
+
Ii as L,
|
|
3461
|
+
gt as M,
|
|
3462
|
+
tn as N,
|
|
3463
|
+
_t as O,
|
|
3464
|
+
Ai as P,
|
|
3465
|
+
C as Q,
|
|
3466
|
+
Me as R,
|
|
3467
|
+
rn as S,
|
|
3468
|
+
_e as T,
|
|
3469
|
+
Ee as U,
|
|
3470
|
+
G as V,
|
|
3471
|
+
fn as W,
|
|
3472
|
+
xa as X,
|
|
3473
|
+
Da as Y,
|
|
3474
|
+
ce as Z,
|
|
3475
|
+
$t as _,
|
|
3476
|
+
St as a,
|
|
3477
|
+
Vi as a$,
|
|
3478
|
+
oe as a0,
|
|
3479
|
+
Cn as a1,
|
|
3480
|
+
Ca as a2,
|
|
3481
|
+
xt as a3,
|
|
3482
|
+
Qn as a4,
|
|
3483
|
+
Oa as a5,
|
|
3484
|
+
Ya as a6,
|
|
3485
|
+
ue as a7,
|
|
3486
|
+
me as a8,
|
|
3487
|
+
ri as a9,
|
|
3488
|
+
Bt as aA,
|
|
3489
|
+
ea as aB,
|
|
3490
|
+
Vt as aC,
|
|
3491
|
+
ta as aD,
|
|
3492
|
+
qt as aE,
|
|
3493
|
+
et as aF,
|
|
3494
|
+
B as aG,
|
|
3495
|
+
yi as aH,
|
|
3496
|
+
V as aI,
|
|
3497
|
+
oa as aJ,
|
|
3498
|
+
x as aK,
|
|
3499
|
+
gi as aL,
|
|
3500
|
+
an as aM,
|
|
3501
|
+
$ as aN,
|
|
3502
|
+
ke as aO,
|
|
3503
|
+
aa as aP,
|
|
3504
|
+
Je as aQ,
|
|
3505
|
+
qi as aR,
|
|
3506
|
+
pe as aS,
|
|
3507
|
+
Ht as aT,
|
|
3508
|
+
ln as aU,
|
|
3509
|
+
ya as aV,
|
|
3461
3510
|
Yi as aW,
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3511
|
+
Aa as aX,
|
|
3512
|
+
wa as aY,
|
|
3513
|
+
ba as aZ,
|
|
3514
|
+
va as a_,
|
|
3515
|
+
li as aa,
|
|
3516
|
+
fe as ab,
|
|
3517
|
+
mi as ac,
|
|
3518
|
+
fi as ad,
|
|
3519
|
+
Ke as ae,
|
|
3520
|
+
Xe as af,
|
|
3521
|
+
Ae as ag,
|
|
3522
|
+
We as ah,
|
|
3523
|
+
ia as ai,
|
|
3524
|
+
na as aj,
|
|
3525
|
+
Ma as ak,
|
|
3526
|
+
Ra as al,
|
|
3527
|
+
D as am,
|
|
3528
|
+
vt as an,
|
|
3529
|
+
ye as ao,
|
|
3530
|
+
It as ap,
|
|
3531
|
+
Na as aq,
|
|
3532
|
+
xi as ar,
|
|
3533
|
+
Di as as,
|
|
3534
|
+
Ct as at,
|
|
3535
|
+
Wn as au,
|
|
3536
|
+
Ot as av,
|
|
3537
|
+
Yt as aw,
|
|
3538
|
+
Jn as ax,
|
|
3539
|
+
Pt as ay,
|
|
3540
|
+
R as az,
|
|
3541
|
+
la as b,
|
|
3542
|
+
Ui as b0,
|
|
3543
|
+
Sa as b1,
|
|
3544
|
+
Ia as b2,
|
|
3545
|
+
ka as b3,
|
|
3546
|
+
ha as b4,
|
|
3547
|
+
ie as b5,
|
|
3548
|
+
_a as b6,
|
|
3549
|
+
dn as b7,
|
|
3550
|
+
wi as c,
|
|
3551
|
+
it as d,
|
|
3552
|
+
ua as e,
|
|
3553
|
+
ca as f,
|
|
3554
|
+
Si as g,
|
|
3555
|
+
pa as h,
|
|
3556
|
+
ra as i,
|
|
3557
|
+
ma as j,
|
|
3558
|
+
ee as k,
|
|
3559
|
+
Fa as l,
|
|
3560
|
+
sn as m,
|
|
3561
|
+
da as n,
|
|
3562
|
+
_n as o,
|
|
3563
|
+
$a as p,
|
|
3564
|
+
Ea as q,
|
|
3565
|
+
ja as r,
|
|
3566
|
+
In as s,
|
|
3567
|
+
tt as t,
|
|
3568
|
+
fa as u,
|
|
3569
|
+
ga as v,
|
|
3570
|
+
Ta as w,
|
|
3571
|
+
ae as x,
|
|
3572
|
+
ut as y,
|
|
3573
|
+
bi as z
|
|
3519
3574
|
};
|