react-semaphor 0.1.537 → 0.1.538

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/dist/analytics-protocol/index.js +352 -341
  2. package/dist/assistant-context/index.js +10 -0
  3. package/dist/assistant-protocol/index.js +104 -0
  4. package/dist/brand-studio/index.js +35 -31
  5. package/dist/briefings/index.js +46 -45
  6. package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +28 -0
  7. package/dist/chunks/add-to-dashboard-CxtTfISD.js +56 -0
  8. package/dist/chunks/aggregate-table-row-presentation-Qgpv6_G8.js +979 -0
  9. package/dist/chunks/analytics-base-schemas-BFAoRlkU.js +472 -0
  10. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +402 -0
  11. package/dist/chunks/assistant-chat-BAqUIFp5.js +7966 -0
  12. package/dist/chunks/availability-Bp5Gfu1I.js +44 -0
  13. package/dist/chunks/{bookmark-state-B-I9BDD0.js → bookmark-state-k7y5SNGf.js} +9 -9
  14. package/dist/chunks/{braces-8TRlDwDw.js → braces-o9UiRQes.js} +1 -1
  15. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +2161 -0
  16. package/dist/chunks/calendar-day-equality-Bpl15IBo.js +487 -0
  17. package/dist/chunks/class-utils-Df1OVOT1.js +2315 -0
  18. package/dist/chunks/{field-dependencies-CpRUwr9J.js → common-types-CUf03Htv.js} +65 -58
  19. package/dist/chunks/context-HD9usB1P.js +349 -0
  20. package/dist/chunks/conversation-sQiWYUOb.js +16 -0
  21. package/dist/chunks/csv-utils-GUfKyT1J.js +56 -0
  22. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +3288 -0
  23. package/dist/chunks/{dashboard-BPJo-Fnd.js → dashboard-DTDDFQsS.js} +1 -1
  24. package/dist/chunks/{dashboard-briefing-launcher-A2uVpHCp.js → dashboard-briefing-launcher-Bb2QUqOa.js} +764 -740
  25. package/dist/chunks/{dashboard-controls-DxTuVis_.js → dashboard-controls-FpONU8QV.js} +683 -686
  26. package/dist/chunks/{common-types-g7yS12Cg.js → dashboard-filter-value-compatibility-D95O4nd7.js} +18 -24
  27. package/dist/chunks/dashboard-json-DazPhBU_.js +69 -0
  28. package/dist/chunks/document-dashboard-inputs-D96rlU7S.js +10678 -0
  29. package/dist/chunks/document-sheet-utils-C1eEldxs.js +1076 -0
  30. package/dist/chunks/{edit-dashboard-visual-ByV0OwSp.js → edit-dashboard-visual-CIhZodVH.js} +4744 -4746
  31. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +15 -0
  32. package/dist/chunks/filter-value-text-BhWugPWE.js +163 -0
  33. package/dist/chunks/index-CqMiAkay.js +3164 -0
  34. package/dist/chunks/index-CuHybtft.js +51 -0
  35. package/dist/chunks/layout-grid-Bgzth8vd.js +16 -0
  36. package/dist/chunks/{matrix-analytical-definition-CgBTD6H8.js → matrix-analytical-definition-bcprSe4u.js} +1 -1
  37. package/dist/chunks/{matrix-card-CAdizkUl.js → matrix-card-CJn1hB5V.js} +13 -12
  38. package/dist/chunks/matrix-definition-DQDI2okF.js +206 -0
  39. package/dist/chunks/{matrix-formatter-DJCk8Znf.js → matrix-formatter-Bgw32tb3.js} +648 -457
  40. package/dist/chunks/matrix-member-presentation-BNPSDKBG.js +105 -0
  41. package/dist/chunks/{matrix-operation-contract-BKupLHXL.js → matrix-operation-contract-B8PBF1Gd.js} +134 -133
  42. package/dist/chunks/{metric-comparison-BKHyvnAy.js → metric-comparison-CojWeLqx.js} +1 -1
  43. package/dist/chunks/{palette-Cp1hqZtm.js → palette-D10o_yYX.js} +1 -1
  44. package/dist/chunks/pivot-header-presentation-MkcKnjn3.js +42 -0
  45. package/dist/chunks/{pivot-result-identity-Bs4tLtLo.js → pivot-result-identity-D6hhcRXi.js} +1 -1
  46. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +804 -0
  47. package/dist/chunks/raw-temporal-D61lr48Y.js +1464 -0
  48. package/dist/chunks/{raw-temporal-contract-mLFS-9wk.js → raw-temporal-contract-C51YG48G.js} +1 -1
  49. package/dist/chunks/report-preferences-dialog-BCGs4-AE.js +1808 -0
  50. package/dist/chunks/{report-runtime-context-CG_I0PPW.js → report-runtime-context-B984Nq1E.js} +8 -7
  51. package/dist/chunks/save-CfJpQQ68.js +21 -0
  52. package/dist/chunks/saved-dashboard-context-BrTkjcod.js +566 -0
  53. package/dist/chunks/{selection-reducer-CiDEtmAq.js → selection-reducer-vKIb_jS6.js} +2 -2
  54. package/dist/chunks/{semaphor-ready-indicator-CHu1L-lo.js → semaphor-ready-indicator-CHHoWhil.js} +65586 -62749
  55. package/dist/chunks/{shelf-drop-preview-context-i-H6DFyU.js → shelf-drop-preview-context-EsayECEC.js} +199 -196
  56. package/dist/chunks/{source-entity-resolution-C-oNyYMp.js → source-entity-resolution-CVA1a85c.js} +8 -8
  57. package/dist/chunks/switch-CvItuC1Q.js +8199 -0
  58. package/dist/chunks/{temporal-bucket-DlFuhCnT.js → temporal-bucket-D8JF7zKz.js} +86 -71
  59. package/dist/chunks/{temporal-bucket-contract-D2OuaVZ7.js → temporal-bucket-contract-DaOajRC7.js} +1 -1
  60. package/dist/chunks/{token-types-DtSJOUjh.js → token-types-bxUxXDX2.js} +1 -1
  61. package/dist/chunks/{upload-CAIpsti1.js → upload-BFX7apKV.js} +1 -1
  62. package/dist/chunks/{use-create-flow-overlay-state-Bj63WwHc.js → use-create-flow-overlay-state-BqA92GkX.js} +331 -339
  63. package/dist/chunks/{validators-DMSH81OM.js → validators-Ej1DdCXa.js} +1050 -1510
  64. package/dist/chunks/visual-choice-JiJ-_3bi.js +204 -0
  65. package/dist/chunks/x-4f5U2XwU.js +100 -0
  66. package/dist/chunks/{zoned-wall-clock-1qlWCE20.js → zoned-wall-clock-MulfA26h.js} +2 -2
  67. package/dist/dashboard/index.js +2 -2
  68. package/dist/dashboard-authoring/index.js +823 -661
  69. package/dist/data-app-sdk/index.js +32 -30
  70. package/dist/data-app-sdk-adapters/index.js +23 -22
  71. package/dist/data-app-sdk-validation/index.js +23 -22
  72. package/dist/format-utils/index.js +173 -168
  73. package/dist/index.js +267 -258
  74. package/dist/layouts/index.js +236 -24
  75. package/dist/report-runtime-context/index.js +2 -2
  76. package/dist/style.css +1 -1
  77. package/dist/surfboard/index.js +2 -2
  78. package/dist/types/assistant-context.d.ts +2 -0
  79. package/dist/types/assistant-protocol.d.ts +2 -0
  80. package/dist/types/components/assistant/assistant-entry-points.d.ts +18 -0
  81. package/dist/types/components/assistant/assistant-provider.d.ts +19 -0
  82. package/dist/types/components/assistant/assistant-store.d.ts +52 -0
  83. package/dist/types/components/assistant/use-assistant.d.ts +38 -0
  84. package/dist/types/components/index.d.ts +5 -1
  85. package/dist/types/components/surfboard/filter/types.d.ts +5 -2
  86. package/dist/types/index.js +50 -51
  87. package/dist/types/lib/api/invalidate-token.d.ts +7 -0
  88. package/dist/types/lib/charts/cartesian-fields.d.ts +64 -0
  89. package/dist/types/lib/charts/types.d.ts +7 -0
  90. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +14 -2
  91. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +5 -6
  92. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +8 -3
  93. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +11 -6
  94. package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +7 -0
  95. package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +79 -0
  96. package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +3 -2
  97. package/dist/types/lib/document/document-table-data-policy.d.ts +15 -0
  98. package/dist/types/lib/filter-values/filter-mode.d.ts +22 -0
  99. package/dist/types/lib/hooks/use-calendar-context.d.ts +5 -0
  100. package/dist/types/lib/hooks/use-text-filter.d.ts +7 -0
  101. package/dist/types/lib/print/print-inputs.d.ts +4 -2
  102. package/dist/types/lib/query-context/build-card-query-context.d.ts +12 -4
  103. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +93 -0
  104. package/dist/types/lib/query-context/card-server-request.d.ts +72 -0
  105. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
  106. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +56 -0
  107. package/dist/types/lib/query-context/document-section-card-query.d.ts +45 -0
  108. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +17 -2
  109. package/dist/types/lib/stores/dashboard-store.d.ts +34 -11
  110. package/dist/types/lib/stores/editor-store.d.ts +4 -2
  111. package/dist/types/lib/types/token-types.d.ts +11 -0
  112. package/dist/types/lib/utils/card-type-change.d.ts +30 -0
  113. package/dist/types/lib/utils/comparison-window-caption.d.ts +12 -0
  114. package/dist/types/lib/utils/filter-default-value-utils.d.ts +13 -2
  115. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +74 -0
  116. package/dist/types/shared/analytics-protocol/contracts.d.ts +3 -0
  117. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +43 -0
  118. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  119. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +1 -1
  120. package/dist/types/shared/analytics-protocol/visual-choice.d.ts +75 -0
  121. package/dist/types/shared/assistant-context/index.d.ts +9 -0
  122. package/dist/types/shared/assistant-context/project-context.d.ts +55 -0
  123. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +130 -0
  124. package/dist/types/shared/assistant-protocol/add-to-dashboard.d.ts +17 -0
  125. package/dist/types/shared/assistant-protocol/artifact.d.ts +63 -0
  126. package/dist/types/shared/assistant-protocol/availability.d.ts +39 -0
  127. package/dist/types/shared/assistant-protocol/context.d.ts +952 -0
  128. package/dist/types/shared/assistant-protocol/conversation.d.ts +38 -0
  129. package/dist/types/shared/assistant-protocol/index.d.ts +16 -0
  130. package/dist/types/shared/assistant-protocol/limits.d.ts +53 -0
  131. package/dist/types/shared/assistant-protocol/parts.d.ts +131 -0
  132. package/dist/types/shared/assistant-protocol/request.d.ts +77 -0
  133. package/dist/types/shared/assistant-protocol/sources.d.ts +27 -0
  134. package/dist/types/shared/assistant-protocol/token-config.d.ts +32 -0
  135. package/dist/types/shared/assistant-protocol/transcript.d.ts +40 -0
  136. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +112 -0
  137. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +1794 -0
  138. package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
  139. package/dist/types/shared/dashboard-authoring/new-card.d.ts +10 -0
  140. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +40 -0
  141. package/dist/types/shared/dashboard-authoring/resolved-primary-date-field-validation.d.ts +16 -0
  142. package/dist/types/shared/format-utils/filter-detail.d.ts +70 -0
  143. package/dist/types/shared/format-utils/filter-value-text.d.ts +15 -0
  144. package/dist/types/shared/format-utils/index.d.ts +3 -0
  145. package/dist/types/shared/format-utils/raw-temporal.d.ts +7 -0
  146. package/dist/types/shared/format-utils/temporal-bucket.d.ts +7 -0
  147. package/dist/types/shared/layouts/frame-layouts.d.ts +23 -0
  148. package/dist/types/shared/layouts/index.d.ts +1 -0
  149. package/package.json +12 -2
  150. package/dist/chunks/calculated-field-identity-BptYhyOP.js +0 -1326
  151. package/dist/chunks/calendar-day-equality-BRjN1S9h.js +0 -383
  152. package/dist/chunks/card-config-utils-BOM1dxCk.js +0 -1150
  153. package/dist/chunks/constants-DNWVy8Y3.js +0 -9
  154. package/dist/chunks/dashboard-json-B1dEQu98.js +0 -65
  155. package/dist/chunks/field-aggregations-CoLzYHeL.js +0 -1229
  156. package/dist/chunks/index-DTcTAGGM.js +0 -4101
  157. package/dist/chunks/matrix-continuation-C4sRcjZU.js +0 -72
  158. package/dist/chunks/matrix-control-sources-DTqcA2_L.js +0 -636
  159. package/dist/chunks/matrix-definition-D9iShKZI.js +0 -87
  160. package/dist/chunks/matrix-member-presentation-Ct8GuxHt.js +0 -209
  161. package/dist/chunks/numeric-presentation-CWu3gunq.js +0 -537
  162. package/dist/chunks/pivot-header-presentation-CHs2GFrM.js +0 -753
  163. package/dist/chunks/pivot-result-lifecycle-DQz_gjGu.js +0 -789
  164. package/dist/chunks/raw-temporal-iMXRK-Qz.js +0 -930
  165. package/dist/chunks/report-preferences-dialog-DXPjteCU.js +0 -1623
  166. package/dist/chunks/save-kO6cIaob.js +0 -34
  167. package/dist/chunks/semantic-format-DiqYeKwU.js +0 -192
  168. package/dist/chunks/switch-DO8a0EfJ.js +0 -25004
  169. package/dist/chunks/temporal-input-presentation-BD7YNUzu.js +0 -195
  170. package/dist/chunks/x-CXDkqdur.js +0 -149
  171. package/dist/types/lib/class-utils.d.ts +0 -2
  172. package/dist/types/lib/document/document-input-runtime.d.ts +0 -26
  173. package/dist/types/lib/utils.d.ts +0 -51
@@ -1,138 +1,144 @@
1
- import { D as L, a as Ce } from "../chunks/matrix-control-sources-DTqcA2_L.js";
2
- import { k as Vt, l as zt, n as qt, h as jt, i as Ht, j as Gt, C as Ut, d as Kt, f as Wt, e as Xt, o as Qt, c as Yt, p as Jt, u as Zt, w as ea, y as ta, g as aa, x as ra, m as na, b as ia, r as oa, s as sa, z as da, t as ca, q as la, v as ua } from "../chunks/matrix-control-sources-DTqcA2_L.js";
3
- import { c as Se, r as ve } from "../chunks/field-aggregations-CoLzYHeL.js";
4
- import { A as fa, S as ha, h as ma, j as ga, n as ba, k as Ia, l as _a, m as ya, v as Ca, g as Sa, b as va, i as Da, u as Ta, q as Fa, p as ka, e as wa, f as xa, d as Aa, a as Oa, o as Ra, s as Na, t as Ea } from "../chunks/field-aggregations-CoLzYHeL.js";
5
- import { q as De, G as K, b8 as Te, H as se, B as Fe, au as ke } from "../chunks/validators-DMSH81OM.js";
6
- import "../chunks/matrix-operation-contract-BKupLHXL.js";
1
+ var we = Object.defineProperty;
2
+ var Fe = (e, t, a) => t in e ? we(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
+ var z = (e, t, a) => Fe(e, typeof t != "symbol" ? t + "" : t, a);
4
+ import { D as B, a as xe, r as H } from "../chunks/apply-dashboard-operations-C-iahGka.js";
5
+ import { N as ca, d as la, p as ua, f as fa, i as pa, b as ma, o as ha, j as ga, k as ba, m as Ia, g as Ca, l as ya, h as _a, n as Da, e as Sa, s as va } from "../chunks/apply-dashboard-operations-C-iahGka.js";
6
+ import { c as ke, r as Ae, v as Oe, f as Re, a as Ee, p as Ne } from "../chunks/calculated-field-identity-DcBS2NPP.js";
7
+ import { A as wa, N as Fa, O as xa, P as ka, K as Aa, L as Oa, M as Ra, G as Ea, H as Na, J as Ma, I as Pa, Q as $a, a1 as La, S as Ba, R as qa, b as Va, a0 as za, $ as ja, l as Ua, q as Ga, m as Ha, n as Wa, o as Ka, a4 as Qa, F as Xa, E as Ya, y as Ja, a5 as Za, g as er, e as tr, Y as ar, i as rr, Z as nr, _ as ir, x as or, z as sr, w as dr, a2 as cr, a3 as lr, d as ur, a6 as fr, C as pr, j as mr, U as hr, k as gr, W as br, X as Ir, V as Cr, h as yr, B as _r, u as Dr, s as Sr, t as vr, D as Tr, T as wr } from "../chunks/calculated-field-identity-DcBS2NPP.js";
8
+ import { q as Me, E as Y, av as Pe, F as fe, l as $e, ah as Le } from "../chunks/validators-Ej1DdCXa.js";
9
+ import "../chunks/matrix-operation-contract-B8PBF1Gd.js";
10
+ import "../chunks/analytics-base-schemas-BFAoRlkU.js";
7
11
  import "zod";
8
- import { m as $, r as q } from "../chunks/calculated-field-identity-BptYhyOP.js";
9
- import { A as La, D as Pa, j as Ba, l as $a, H as Va, o as za, i as qa, f as ja, d as Ha, x as Ga, g as Ua, q as Ka, y as Wa, h as Xa, t as Qa, n as Ya, p as Ja, z as Za, F as er, v as tr, k as ar, e as rr, a as nr, b as ir, B as or, C as sr, c as dr, u as cr, E as lr, s as ur, w as pr, G as fr } from "../chunks/calculated-field-identity-BptYhyOP.js";
10
- import { n as we } from "../chunks/operators-B3zZoskU.js";
11
- import { a as mr, b as gr, r as br } from "../chunks/canonical-result-keys-CEQefvdO.js";
12
- import { D as _r, i as yr, k as Cr, j as Sr, l as vr, m as Dr } from "../chunks/field-dependencies-CpRUwr9J.js";
13
- import { D as Fr, d as kr, i as wr, v as xr } from "../chunks/common-types-g7yS12Cg.js";
14
- import { b as Or, c as Rr, g as Nr, a as Er, m as Mr, r as Lr } from "../chunks/matrix-definition-D9iShKZI.js";
15
- import { m as Br, a as $r, r as Vr } from "../chunks/matrix-card-CAdizkUl.js";
16
- function y(e) {
12
+ import { m as j } from "../chunks/document-sheet-utils-C1eEldxs.js";
13
+ import { k as xr, D as kr, i as Ar, q as Or, h as Rr, d as Er, a as Nr, b as Mr, n as Pr, p as $r, g as Lr, r as Br, c as qr, l as Vr, o as zr, f as jr, j as Ur, s as Gr, w as Hr } from "../chunks/document-sheet-utils-C1eEldxs.js";
14
+ import { n as Be } from "../chunks/operators-B3zZoskU.js";
15
+ import { a as Kr, b as Qr, r as Xr } from "../chunks/canonical-result-keys-CEQefvdO.js";
16
+ import { D as Jr, i as Zr, k as en, j as tn, l as an, m as rn } from "../chunks/common-types-CUf03Htv.js";
17
+ import { D as on, d as sn, i as dn, v as cn } from "../chunks/dashboard-filter-value-compatibility-D95O4nd7.js";
18
+ import { b as un, c as fn, g as pn, a as mn, m as hn, r as gn } from "../chunks/matrix-definition-DQDI2okF.js";
19
+ import { d as qe, w as Ve } from "../chunks/metric-comparison-CojWeLqx.js";
20
+ import { p as ze } from "../chunks/report-runtime-context-B984Nq1E.js";
21
+ import { m as In, a as Cn, r as yn } from "../chunks/matrix-card-CJn1hB5V.js";
22
+ function D(e) {
17
23
  return e && typeof e == "object" ? e : null;
18
24
  }
19
- function D(e) {
25
+ function T(e) {
20
26
  return typeof e == "string" ? e : null;
21
27
  }
22
- function xe(e) {
28
+ function je(e) {
23
29
  var t, a, r;
24
- return !!(e && typeof e == "object") && (((t = y(e)) == null ? void 0 : t.kind) === "semantic" || ((a = y(e)) == null ? void 0 : a.kind) === "physical" || ((r = y(e)) == null ? void 0 : r.kind) === "sql");
30
+ return !!(e && typeof e == "object") && (((t = D(e)) == null ? void 0 : t.kind) === "semantic" || ((a = D(e)) == null ? void 0 : a.kind) === "physical" || ((r = D(e)) == null ? void 0 : r.kind) === "sql");
25
31
  }
26
- function A(e) {
27
- return xe(e) ? e.kind === "semantic" ? !!(e.domainId && e.datasetName) : e.kind === "physical" ? !!(e.connectionId && e.tableName) : !1 : !1;
32
+ function R(e) {
33
+ return je(e) ? e.kind === "semantic" ? !!(e.domainId && e.datasetName) : e.kind === "physical" ? !!(e.connectionId && e.tableName) : !1 : !1;
28
34
  }
29
- function Ot(e) {
30
- return De(e);
35
+ function Xt(e) {
36
+ return Me(e);
31
37
  }
32
- function de(e, t) {
33
- return K(e, t);
38
+ function pe(e, t) {
39
+ return Y(e, t);
34
40
  }
35
- function Ae(e, t) {
36
- return Te(e, t);
41
+ function Ue(e, t) {
42
+ return Pe(e, t);
37
43
  }
38
- function P(e) {
44
+ function q(e) {
39
45
  const t = [];
40
46
  for (const a of e) {
41
47
  const r = t.findIndex(
42
- (o) => de(o, a)
48
+ (i) => pe(i, a)
43
49
  );
44
- r === -1 ? t.push(a) : t[r] = Ae(
50
+ r === -1 ? t.push(a) : t[r] = Ue(
45
51
  t[r],
46
52
  a
47
53
  );
48
54
  }
49
55
  return t;
50
56
  }
51
- function Rt(e) {
52
- return P(e)[0];
57
+ function Yt(e) {
58
+ return q(e)[0];
53
59
  }
54
- function j(e, t) {
55
- return e.kind !== "semantic" || e.connectionId || (t == null ? void 0 : t.kind) !== "semantic" || !K(e, t) || !t.connectionId ? e : { ...e, connectionId: t.connectionId };
60
+ function W(e, t) {
61
+ return e.kind !== "semantic" || e.connectionId || (t == null ? void 0 : t.kind) !== "semantic" || !Y(e, t) || !t.connectionId ? e : { ...e, connectionId: t.connectionId };
56
62
  }
57
- function H(e) {
58
- return A(e) ? e : void 0;
63
+ function K(e) {
64
+ return R(e) ? e : void 0;
59
65
  }
60
- function ie(e, t) {
66
+ function le(e, t) {
61
67
  if (!(e.kind !== "semantic" || e.connectionId))
62
68
  return t.find(
63
- (a) => (a == null ? void 0 : a.kind) === "semantic" && K(e, a) && !!a.connectionId
69
+ (a) => (a == null ? void 0 : a.kind) === "semantic" && Y(e, a) && !!a.connectionId
64
70
  );
65
71
  }
66
72
  function v(e, t) {
67
- const a = H(e == null ? void 0 : e.source);
68
- return a ? j(a, t) : void 0;
73
+ const a = K(e == null ? void 0 : e.source);
74
+ return a ? W(a, t) : void 0;
69
75
  }
70
- function Oe({
76
+ function Ge({
71
77
  explicitSource: e,
72
78
  field: t,
73
79
  defaultSource: a,
74
80
  fallbackSources: r
75
81
  }) {
76
- const o = [a, ...r || []], n = H(e), i = n ? j(
77
- n,
78
- ie(n, o)
82
+ const i = [a, ...r || []], o = K(e), n = o ? W(
83
+ o,
84
+ le(o, i)
79
85
  ) : void 0;
80
- if (i)
81
- return i;
86
+ if (n)
87
+ return n;
82
88
  if (e !== void 0)
83
89
  return;
84
- const s = v(t, a), u = s ? j(
90
+ const s = v(t, a), l = s ? W(
85
91
  s,
86
- ie(s, o)
92
+ le(s, i)
87
93
  ) : void 0;
88
- if (u)
89
- return u;
94
+ if (l)
95
+ return l;
90
96
  if ((t == null ? void 0 : t.source) === void 0)
91
- return H(a);
97
+ return K(a);
92
98
  }
93
- function Nt(e, t) {
99
+ function Jt(e, t) {
94
100
  if (!(e != null && e.name) || !(t != null && t.name) || e.name !== t.name)
95
101
  return !1;
96
102
  const a = v(e), r = v(t);
97
- return !a || !r ? !0 : de(a, r);
103
+ return !a || !r ? !0 : pe(a, r);
98
104
  }
99
- function k(e) {
105
+ function x(e) {
100
106
  var t;
101
- return D((t = y(e)) == null ? void 0 : t.kind);
107
+ return T((t = D(e)) == null ? void 0 : t.kind);
102
108
  }
103
- function ce(e) {
109
+ function me(e) {
104
110
  var t, a;
105
- return k(e) !== "semantic" ? null : ((a = D((t = y(e)) == null ? void 0 : t.domainId)) == null ? void 0 : a.trim()) || null;
111
+ return x(e) !== "semantic" ? null : ((a = T((t = D(e)) == null ? void 0 : t.domainId)) == null ? void 0 : a.trim()) || null;
106
112
  }
107
- function Re(e) {
113
+ function He(e) {
108
114
  var t;
109
- return k(e) !== "semantic" ? null : D((t = y(e)) == null ? void 0 : t.datasetName);
115
+ return x(e) !== "semantic" ? null : T((t = D(e)) == null ? void 0 : t.datasetName);
110
116
  }
111
- function Ne(e) {
117
+ function We(e) {
112
118
  var t;
113
- return k(e) !== "semantic" ? null : D((t = y(e)) == null ? void 0 : t.datasetId);
119
+ return x(e) !== "semantic" ? null : T((t = D(e)) == null ? void 0 : t.datasetId);
114
120
  }
115
- function Ee(e) {
121
+ function Ke(e) {
116
122
  var t;
117
- return k(e) !== "physical" ? null : D((t = y(e)) == null ? void 0 : t.connectionId);
123
+ return x(e) !== "physical" ? null : T((t = D(e)) == null ? void 0 : t.connectionId);
118
124
  }
119
- function Me(e) {
125
+ function Qe(e) {
120
126
  var t;
121
- return k(e) !== "physical" ? null : D((t = y(e)) == null ? void 0 : t.tableName);
127
+ return x(e) !== "physical" ? null : T((t = D(e)) == null ? void 0 : t.tableName);
122
128
  }
123
- function Le(e) {
129
+ function Xe(e) {
124
130
  var t;
125
- return k(e) !== "physical" ? "" : D((t = y(e)) == null ? void 0 : t.databaseName) || "";
131
+ return x(e) !== "physical" ? "" : T((t = D(e)) == null ? void 0 : t.databaseName) || "";
126
132
  }
127
- function Pe(e) {
133
+ function Ye(e) {
128
134
  var t;
129
- return k(e) !== "physical" ? "" : D((t = y(e)) == null ? void 0 : t.schemaName) || "";
135
+ return x(e) !== "physical" ? "" : T((t = D(e)) == null ? void 0 : t.schemaName) || "";
130
136
  }
131
- function Be(e) {
137
+ function Je(e) {
132
138
  if (e.analyticsIntent && typeof e.analyticsIntent == "object" && "source" in e.analyticsIntent)
133
139
  return e.analyticsIntent.source;
134
140
  }
135
- function $e({
141
+ function Ze({
136
142
  datasets: e,
137
143
  requireAtLeastOne: t
138
144
  }) {
@@ -140,27 +146,27 @@ function $e({
140
146
  return { ok: !1, issue: "invalid_dataset_count" };
141
147
  if (e.length <= 1)
142
148
  return { ok: !0 };
143
- const a = e.map(ce), r = new Set(a.filter(Boolean));
144
- return a.some((o) => !o) || r.size !== 1 ? { ok: !1, issue: "invalid_multi_dataset_scope" } : { ok: !0 };
149
+ const a = e.map(me), r = new Set(a.filter(Boolean));
150
+ return a.some((i) => !i) || r.size !== 1 ? { ok: !1, issue: "invalid_multi_dataset_scope" } : { ok: !0 };
145
151
  }
146
- function W(e, t) {
152
+ function J(e, t) {
147
153
  if (!t)
148
154
  return !1;
149
155
  if (t.kind === "semantic") {
150
- const a = Ne(e);
151
- return ce(e) === t.domainId ? a && t.datasetId ? a === t.datasetId : Re(e) === t.datasetName : !1;
156
+ const a = We(e);
157
+ return me(e) === t.domainId ? a && t.datasetId ? a === t.datasetId : He(e) === t.datasetName : !1;
152
158
  }
153
- return t.kind === "physical" ? Ee(e) === t.connectionId && Me(e) === t.tableName && Le(e) === (t.databaseName || "") && Pe(e) === (t.schemaName || "") : !1;
159
+ return t.kind === "physical" ? Ke(e) === t.connectionId && Qe(e) === t.tableName && Xe(e) === (t.databaseName || "") && Ye(e) === (t.schemaName || "") : !1;
154
160
  }
155
- function Et(e, t) {
161
+ function Zt(e, t) {
156
162
  return e.find(
157
- (a) => W(a, t)
163
+ (a) => J(a, t)
158
164
  );
159
165
  }
160
- function p(e, t, a) {
166
+ function f(e, t, a) {
161
167
  return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
162
168
  }
163
- function N(e) {
169
+ function M(e) {
164
170
  const t = /* @__PURE__ */ new Set();
165
171
  for (const a of e) {
166
172
  if (t.has(a))
@@ -169,19 +175,19 @@ function N(e) {
169
175
  }
170
176
  return null;
171
177
  }
172
- function le({
178
+ function he({
173
179
  card: e,
174
180
  datasets: t,
175
181
  errors: a
176
182
  }) {
177
183
  if (e.type === "text")
178
184
  return;
179
- const r = Be(e);
185
+ const r = Je(e);
180
186
  if (!r) {
181
187
  if (t.length <= 1)
182
188
  return;
183
189
  a.push(
184
- p(
190
+ f(
185
191
  "missing_card_analytics_source",
186
192
  "Multi-dataset dashboard cards must include analytics intent with a source so the materializer can choose the correct dataset.",
187
193
  e.id
@@ -189,68 +195,68 @@ function le({
189
195
  );
190
196
  return;
191
197
  }
192
- t.some((o) => W(o, r)) || a.push(
193
- p(
198
+ t.some((i) => J(i, r)) || a.push(
199
+ f(
194
200
  "invalid_card_analytics_source",
195
201
  "Dashboard cards with an explicit analytics source must use one of the selected datasets.",
196
202
  e.id
197
203
  )
198
204
  );
199
205
  }
200
- function E(e) {
206
+ function P(e) {
201
207
  return e.map((t) => t == null ? void 0 : t.source).filter((t) => !!t);
202
208
  }
203
- function V(e) {
209
+ function U(e) {
204
210
  return Array.isArray(e) ? e.filter(
205
211
  (t) => !!(t && typeof t == "object")
206
212
  ) : [];
207
213
  }
208
- function oe(e) {
214
+ function ue(e) {
209
215
  return Array.isArray(e) ? e.filter(
210
216
  (t) => !!(t && typeof t == "object")
211
217
  ) : [];
212
218
  }
213
- function Ve(e) {
219
+ function et(e) {
214
220
  var a, r;
215
221
  if (!e)
216
222
  return [];
217
223
  const t = [e.source];
218
224
  return e.kind === "metric" ? t.push(
219
- ...E([
220
- ...V(e.measures),
225
+ ...P([
226
+ ...U(e.measures),
221
227
  e.primaryMeasure,
222
228
  e.dateField,
223
- ...V(e.dimensions),
224
- ...oe(e.filters).map((o) => o.field)
229
+ ...U(e.dimensions),
230
+ ...ue(e.filters).map((i) => i.field)
225
231
  ])
226
232
  ) : e.kind === "records" ? t.push(
227
- ...E([
228
- ...V(e.fields),
233
+ ...P([
234
+ ...U(e.fields),
229
235
  e.dateField,
230
236
  (a = e.orderBy) == null ? void 0 : a.field,
231
- ...oe(e.filters).map((o) => o.field)
237
+ ...ue(e.filters).map((i) => i.field)
232
238
  ])
233
239
  ) : e.kind === "inputOptions" ? (((r = e.population) == null ? void 0 : r.kind) === "related_population" && t.push(e.population.baseSource), t.push(
234
- ...E([
240
+ ...P([
235
241
  e.labelField,
236
242
  e.valueField,
237
243
  e.searchField,
238
244
  ...e.disambiguationFields || []
239
245
  ])
240
- )) : e.kind === "sql" && t.push(...E(e.fields || [])), t;
246
+ )) : e.kind === "sql" && t.push(...P(e.fields || [])), t;
241
247
  }
242
- function ue({
248
+ function ge({
243
249
  card: e,
244
250
  datasets: t,
245
251
  errors: a
246
252
  }) {
247
253
  if (e.type !== "text") {
248
- for (const r of Ve(e.analyticsIntent))
254
+ for (const r of et(e.analyticsIntent))
249
255
  if (r && !t.some(
250
- (o) => W(o, r)
256
+ (i) => J(i, r)
251
257
  )) {
252
258
  a.push(
253
- p(
259
+ f(
254
260
  "invalid_card_query_source",
255
261
  "Dashboard card query field references must use one of the selected datasets.",
256
262
  e.id
@@ -260,36 +266,36 @@ function ue({
260
266
  }
261
267
  }
262
268
  }
263
- function pe({
269
+ function be({
264
270
  card: e,
265
271
  errors: t
266
272
  }) {
267
273
  if (e.type === "text" || !e.analyticsIntent)
268
274
  return;
269
- const a = se(e.analyticsIntent);
275
+ const a = fe(e.analyticsIntent);
270
276
  if (!a.ok)
271
277
  for (const r of a.errors)
272
278
  t.push(
273
- p(
279
+ f(
274
280
  r.code,
275
281
  r.path ? `${r.path}: ${r.message}` : r.message,
276
282
  e.id
277
283
  )
278
284
  );
279
285
  }
280
- function fe({
286
+ function Ie({
281
287
  datasets: e,
282
288
  errors: t,
283
289
  requireAtLeastOne: a
284
290
  }) {
285
- const r = $e({
291
+ const r = Ze({
286
292
  datasets: e,
287
293
  requireAtLeastOne: a
288
294
  });
289
295
  if (!r.ok) {
290
296
  if (r.issue === "invalid_dataset_count") {
291
297
  t.push(
292
- p(
298
+ f(
293
299
  "invalid_dataset_count",
294
300
  "Dashboard authoring requires at least one selected dataset."
295
301
  )
@@ -297,57 +303,57 @@ function fe({
297
303
  return;
298
304
  }
299
305
  t.push(
300
- p(
306
+ f(
301
307
  "invalid_multi_dataset_scope",
302
308
  "Multi-dataset dashboard authoring is limited to semantic datasets from one domain."
303
309
  )
304
310
  );
305
311
  }
306
312
  }
307
- function he({
313
+ function Ce({
308
314
  input: e,
309
315
  errors: t
310
316
  }) {
311
317
  var a;
312
318
  (a = e.filter.sql) != null && a.trim() && t.push(
313
- p(
319
+ f(
314
320
  "generated_filter_sql_out_of_scope",
315
321
  `Generated dashboard filter "${e.label}" must use grounded filter configuration; custom SQL is outside the dashboard-authoring contract.`
316
322
  )
317
323
  );
318
324
  }
319
- function G({
325
+ function Q({
320
326
  card: e,
321
327
  errors: t
322
328
  }) {
323
329
  "interactionConfig" in e && t.push(
324
- p(
330
+ f(
325
331
  "legacy_card_interactions_unsupported",
326
332
  "Dashboard authoring accepts click-to-filter settings only through card.clickToFilter.",
327
333
  e.id
328
334
  )
329
- ), e.clickToFilter !== void 0 && !Se.safeParse(e.clickToFilter).success && t.push(
330
- p(
335
+ ), e.clickToFilter !== void 0 && !ke.safeParse(e.clickToFilter).success && t.push(
336
+ f(
331
337
  "invalid_click_to_filter",
332
338
  "Dashboard card clickToFilter settings do not match the canonical schema.",
333
339
  e.id
334
340
  )
335
- ), e.respondsToSelections !== void 0 && !ve.safeParse(e.respondsToSelections).success && t.push(
336
- p(
341
+ ), e.respondsToSelections !== void 0 && !Ae.safeParse(e.respondsToSelections).success && t.push(
342
+ f(
337
343
  "invalid_responds_to_selections",
338
344
  "Dashboard card respondsToSelections must be a boolean.",
339
345
  e.id
340
346
  )
341
347
  );
342
348
  }
343
- function ze(e) {
344
- var f, I;
349
+ function tt(e) {
350
+ var m, C;
345
351
  const t = [];
346
352
  if (!e || typeof e != "object")
347
353
  return {
348
354
  ok: !1,
349
355
  errors: [
350
- p(
356
+ f(
351
357
  "invalid_plan",
352
358
  "Dashboard plan must be a structured object."
353
359
  )
@@ -355,84 +361,84 @@ function ze(e) {
355
361
  warnings: []
356
362
  };
357
363
  const a = e, r = [...a.warnings || []];
358
- a.version !== 1 && t.push(p("invalid_version", "Dashboard plan version must be 1.")), (f = a.title) != null && f.trim() || t.push(p("missing_title", "Dashboard plan needs a title."));
359
- const o = Array.isArray(a.datasets) ? a.datasets : [], n = Array.isArray(a.sheets) ? a.sheets : [];
360
- fe({ datasets: o, errors: t, requireAtLeastOne: !0 }), n.length !== 1 && t.push(
361
- p(
364
+ a.version !== 1 && t.push(f("invalid_version", "Dashboard plan version must be 1.")), (m = a.title) != null && m.trim() || t.push(f("missing_title", "Dashboard plan needs a title."));
365
+ const i = Array.isArray(a.datasets) ? a.datasets : [], o = Array.isArray(a.sheets) ? a.sheets : [];
366
+ Ie({ datasets: i, errors: t, requireAtLeastOne: !0 }), o.length !== 1 && t.push(
367
+ f(
362
368
  "invalid_sheet_count",
363
369
  "MVP dashboard authoring creates exactly one dashboard sheet."
364
370
  )
365
371
  );
366
- const i = n[0];
367
- i && i.kind !== "dashboard" && t.push(
368
- p("invalid_sheet_kind", 'Generated sheet must use kind "dashboard".')
372
+ const n = o[0];
373
+ n && n.kind !== "dashboard" && t.push(
374
+ f("invalid_sheet_kind", 'Generated sheet must use kind "dashboard".')
369
375
  );
370
- const s = (i == null ? void 0 : i.cards) || [];
371
- s.length > L && t.push(
372
- p(
376
+ const s = (n == null ? void 0 : n.cards) || [];
377
+ s.length > B && t.push(
378
+ f(
373
379
  "too_many_cards",
374
- `Generated dashboards can contain at most ${L} cards.`
380
+ `Generated dashboards can contain at most ${B} cards.`
375
381
  )
376
382
  );
377
- const u = N(s.map((l) => l.id));
378
- u && t.push(
379
- p("duplicate_card_id", `Duplicate generated card id: ${u}.`)
383
+ const l = M(s.map((u) => u.id));
384
+ l && t.push(
385
+ f("duplicate_card_id", `Duplicate generated card id: ${l}.`)
380
386
  );
381
- const d = N(s.map((l) => l.frameId));
387
+ const d = M(s.map((u) => u.frameId));
382
388
  d && t.push(
383
- p(
389
+ f(
384
390
  "duplicate_frame_id",
385
391
  `Duplicate generated frame id: ${d}.`
386
392
  )
387
393
  );
388
- for (const l of s)
389
- (I = l.title) != null && I.trim() || t.push(p("missing_card_title", "Card title is required.", l.id)), l.type === "custom" && t.push(
390
- p(
394
+ for (const u of s)
395
+ (C = u.title) != null && C.trim() || t.push(f("missing_card_title", "Card title is required.", u.id)), u.type === "custom" && t.push(
396
+ f(
391
397
  "custom_visual_out_of_scope",
392
398
  "Whole-dashboard authoring supports built-in visual types only.",
393
- l.id
399
+ u.id
394
400
  )
395
- ), l.type !== "text" && !l.analyticsIntent && r.push(
396
- p(
401
+ ), u.type !== "text" && !u.analyticsIntent && r.push(
402
+ f(
397
403
  "missing_analytics_intent",
398
404
  "Non-text card has no analytics intent and may be skipped by the app layer.",
399
- l.id
405
+ u.id
400
406
  )
401
- ), le({ card: l, datasets: o, errors: t }), pe({ card: l, errors: t }), ue({ card: l, datasets: o, errors: t }), G({ card: l, errors: t });
402
- const h = Array.isArray(a.filterInputs) ? a.filterInputs : [], m = h.map((l) => l.id), S = N(m);
403
- S && t.push(
404
- p(
407
+ ), he({ card: u, datasets: i, errors: t }), be({ card: u, errors: t }), ge({ card: u, datasets: i, errors: t }), Q({ card: u, errors: t });
408
+ const p = Array.isArray(a.filterInputs) ? a.filterInputs : [], h = p.map((u) => u.id), y = M(h);
409
+ y && t.push(
410
+ f(
405
411
  "duplicate_input_id",
406
- `Duplicate dashboard input id: ${S}.`
412
+ `Duplicate dashboard input id: ${y}.`
407
413
  )
408
414
  );
409
- const b = h.map((l) => l.variableName).filter(Boolean) || [], C = N(b);
410
- C && t.push(
411
- p(
415
+ const g = p.map((u) => u.variableName).filter(Boolean) || [], b = M(g);
416
+ b && t.push(
417
+ f(
412
418
  "duplicate_input_variable",
413
- `Duplicate dashboard input variable name: ${C}.`
419
+ `Duplicate dashboard input variable name: ${b}.`
414
420
  )
415
421
  );
416
- for (const l of h)
417
- he({ input: l, errors: t });
422
+ for (const u of p)
423
+ Ce({ input: u, errors: t });
418
424
  const c = Array.isArray(a.calculatedFields) ? a.calculatedFields : [];
419
- for (const l of c)
420
- l.scope === "domain" && l.reuseOnly !== !0 && t.push(
421
- p(
425
+ for (const u of c)
426
+ u.scope === "domain" && u.reuseOnly !== !0 && t.push(
427
+ f(
422
428
  "domain_calculated_field_create_out_of_scope",
423
- `Creating domain calculated field "${l.name}" is outside MVP.`
429
+ `Creating domain calculated field "${u.name}" is outside MVP.`
424
430
  )
425
431
  );
426
432
  return { ok: t.length === 0, errors: t, warnings: r };
427
433
  }
428
- function qe(e) {
429
- var i;
434
+ function at(e) {
435
+ var n;
430
436
  const t = [];
431
437
  if (!e || typeof e != "object")
432
438
  return {
433
439
  ok: !1,
434
440
  errors: [
435
- p(
441
+ f(
436
442
  "invalid_change_plan",
437
443
  "Dashboard change plan must be a structured object."
438
444
  )
@@ -441,45 +447,45 @@ function qe(e) {
441
447
  };
442
448
  const a = e, r = [...a.warnings || []];
443
449
  a.version !== 1 && t.push(
444
- p("invalid_version", "Dashboard change plan version must be 1.")
445
- ), (i = a.dashboardId) != null && i.trim() || t.push(
446
- p("missing_dashboard_id", "Dashboard change plan needs a dashboard id.")
450
+ f("invalid_version", "Dashboard change plan version must be 1.")
451
+ ), (n = a.dashboardId) != null && n.trim() || t.push(
452
+ f("missing_dashboard_id", "Dashboard change plan needs a dashboard id.")
447
453
  );
448
- const o = Array.isArray(a.datasets) ? a.datasets : [], n = Array.isArray(a.operations) ? a.operations : [];
449
- fe({ datasets: o, errors: t, requireAtLeastOne: !1 });
450
- for (const s of n) {
454
+ const i = Array.isArray(a.datasets) ? a.datasets : [], o = Array.isArray(a.operations) ? a.operations : [];
455
+ Ie({ datasets: i, errors: t, requireAtLeastOne: !1 });
456
+ for (const s of o) {
451
457
  if (s.kind === "unsupported") {
452
458
  r.push(
453
- p("unsupported_operation", s.reason || s.requestedAction)
459
+ f("unsupported_operation", s.reason || s.requestedAction)
454
460
  );
455
461
  continue;
456
462
  }
457
463
  if (s.kind === "addCard" && s.card.type === "custom" && t.push(
458
- p(
464
+ f(
459
465
  "custom_visual_out_of_scope",
460
466
  "Whole-dashboard authoring supports built-in visual types only.",
461
467
  s.card.id
462
468
  )
463
- ), s.kind === "addCard" && (le({
469
+ ), s.kind === "addCard" && (he({
464
470
  card: s.card,
465
- datasets: o,
471
+ datasets: i,
466
472
  errors: t
467
- }), pe({
473
+ }), be({
468
474
  card: s.card,
469
475
  errors: t
470
- }), ue({
476
+ }), ge({
471
477
  card: s.card,
472
- datasets: o,
478
+ datasets: i,
473
479
  errors: t
474
- }), G({ card: s.card, errors: t })), s.kind === "updateCardSelectionSettings") {
475
- const u = s.card;
480
+ }), Q({ card: s.card, errors: t })), s.kind === "updateCardSelectionSettings") {
481
+ const l = s.card;
476
482
  s.card.clickToFilter === void 0 && s.card.respondsToSelections === void 0 && t.push(
477
- p(
483
+ f(
478
484
  "empty_card_selection_settings_update",
479
485
  "A card selection-settings update must provide clickToFilter or respondsToSelections.",
480
486
  s.cardId
481
487
  )
482
- ), G({
488
+ ), Q({
483
489
  card: {
484
490
  id: s.cardId,
485
491
  frameId: "",
@@ -487,13 +493,13 @@ function qe(e) {
487
493
  type: "table",
488
494
  role: "table",
489
495
  priority: 0,
490
- ...u
496
+ ...l
491
497
  },
492
498
  errors: t
493
499
  });
494
500
  }
495
- s.kind === "addFilterInput" && he({ input: s.input, errors: t }), s.kind === "addCalculatedField" && s.field.scope === "domain" && s.field.reuseOnly !== !0 && t.push(
496
- p(
501
+ s.kind === "addFilterInput" && Ce({ input: s.input, errors: t }), s.kind === "addCalculatedField" && s.field.scope === "domain" && s.field.reuseOnly !== !0 && t.push(
502
+ f(
497
503
  "domain_calculated_field_create_out_of_scope",
498
504
  `Creating domain calculated field "${s.field.name}" is outside MVP.`
499
505
  )
@@ -501,133 +507,133 @@ function qe(e) {
501
507
  }
502
508
  return { ok: t.length === 0, errors: t, warnings: r };
503
509
  }
504
- const je = {
510
+ const rt = {
505
511
  lg: 48,
506
512
  md: 36,
507
513
  sm: 24,
508
514
  xs: 12,
509
515
  xxs: 6
510
516
  };
511
- function He(e, t) {
512
- let a = 0, r = 0, o = 0;
513
- return e.map((n) => {
514
- const i = Math.min(n.w, t);
515
- a > 0 && a + i > t && (a = 0, r += o, o = 0);
517
+ function nt(e, t) {
518
+ let a = 0, r = 0, i = 0;
519
+ return e.map((o) => {
520
+ const n = Math.min(o.w, t);
521
+ a > 0 && a + n > t && (a = 0, r += i, i = 0);
516
522
  const s = {
517
- i: n.frameId,
523
+ i: o.frameId,
518
524
  x: a,
519
525
  y: r,
520
- w: i,
521
- h: n.h,
522
- minW: Math.min(n.minW, t),
523
- minH: n.minH,
526
+ w: n,
527
+ h: o.h,
528
+ minW: Math.min(o.minW, t),
529
+ minH: o.minH,
524
530
  static: !1
525
531
  };
526
- return a += i, o = Math.max(o, n.h), s;
532
+ return a += n, i = Math.max(i, o.h), s;
527
533
  });
528
534
  }
529
- function Ge(e) {
530
- const t = [...e].sort((u, d) => u.priority - d.priority), a = t.filter((u) => u.role === "kpi"), r = t.filter((u) => u.role === "chart"), o = t.filter((u) => u.role === "table"), n = t.filter((u) => u.role === "text"), i = n.slice(0, 1), s = n.slice(i.length);
531
- return { kpis: a, introText: i, charts: r, tables: o, supportingText: s };
535
+ function it(e) {
536
+ const t = [...e].sort((l, d) => l.priority - d.priority), a = t.filter((l) => l.role === "kpi"), r = t.filter((l) => l.role === "chart"), i = t.filter((l) => l.role === "table"), o = t.filter((l) => l.role === "text"), n = o.slice(0, 1), s = o.slice(n.length);
537
+ return { kpis: a, introText: n, charts: r, tables: i, supportingText: s };
532
538
  }
533
- function Ue(e, t, a) {
539
+ function ot(e, t, a) {
534
540
  return t === "xxs" || t === "xs" ? a : t === "sm" ? Math.min(12, a) : t === "md" ? e <= 1 || e === 2 ? 18 : 12 : e <= 1 || e === 2 ? 24 : e === 3 ? 16 : 12;
535
541
  }
536
- function Ke(e, t, a, r) {
542
+ function st(e, t, a, r) {
537
543
  return a === "xxs" || a === "xs" || a === "sm" || a === "md" || t === 1 || t % 2 === 1 && e === 0 ? r : r / 2;
538
544
  }
539
- function We(e) {
540
- const { item: t, band: a, index: r, bandCount: o, breakpoint: n, columns: i } = e;
545
+ function dt(e) {
546
+ const { item: t, band: a, index: r, bandCount: i, breakpoint: o, columns: n } = e;
541
547
  return a === "kpi" ? {
542
548
  ...t,
543
549
  band: a,
544
- w: Ue(o, n, i),
550
+ w: ot(i, o, n),
545
551
  h: 15,
546
- minW: Math.min(6, i),
552
+ minW: Math.min(6, n),
547
553
  minH: 12
548
554
  } : a === "table" ? {
549
555
  ...t,
550
556
  band: a,
551
- w: i,
552
- h: n === "xxs" || n === "xs" ? 34 : 38,
553
- minW: Math.min(12, i),
557
+ w: n,
558
+ h: o === "xxs" || o === "xs" ? 34 : 38,
559
+ minW: Math.min(12, n),
554
560
  minH: 18
555
561
  } : a === "introText" ? {
556
562
  ...t,
557
563
  band: a,
558
- w: i,
559
- h: n === "xxs" || n === "xs" ? 12 : 10,
560
- minW: Math.min(12, i),
564
+ w: n,
565
+ h: o === "xxs" || o === "xs" ? 12 : 10,
566
+ minW: Math.min(12, n),
561
567
  minH: 8
562
568
  } : a === "supportingText" ? {
563
569
  ...t,
564
570
  band: a,
565
- w: n === "lg" ? i / 2 : i,
566
- h: n === "xxs" || n === "xs" ? 12 : 10,
567
- minW: Math.min(12, i),
571
+ w: o === "lg" ? n / 2 : n,
572
+ h: o === "xxs" || o === "xs" ? 12 : 10,
573
+ minW: Math.min(12, n),
568
574
  minH: 8
569
575
  } : {
570
576
  ...t,
571
577
  band: a,
572
- w: Ke(r, o, n, i),
573
- h: n === "xxs" || n === "xs" ? 28 : 30,
574
- minW: Math.min(12, i),
578
+ w: st(r, i, o, n),
579
+ h: o === "xxs" || o === "xs" ? 28 : 30,
580
+ minW: Math.min(12, n),
575
581
  minH: 16
576
582
  };
577
583
  }
578
- function w(e, t, a, r) {
584
+ function A(e, t, a, r) {
579
585
  return e.map(
580
- (o, n) => We({
581
- item: o,
586
+ (i, o) => dt({
587
+ item: i,
582
588
  band: t,
583
- index: n,
589
+ index: o,
584
590
  bandCount: e.length,
585
591
  breakpoint: a,
586
592
  columns: r
587
593
  })
588
594
  );
589
595
  }
590
- function X(e) {
591
- const t = Ge(e);
596
+ function Z(e) {
597
+ const t = it(e);
592
598
  return Object.fromEntries(
593
- Ce.map((a) => {
594
- const r = je[a], o = [
595
- ...w(t.introText, "introText", a, r),
596
- ...w(t.kpis, "kpi", a, r),
597
- ...w(t.charts, "chart", a, r),
598
- ...w(t.tables, "table", a, r),
599
- ...w(t.supportingText, "supportingText", a, r)
599
+ xe.map((a) => {
600
+ const r = rt[a], i = [
601
+ ...A(t.introText, "introText", a, r),
602
+ ...A(t.kpis, "kpi", a, r),
603
+ ...A(t.charts, "chart", a, r),
604
+ ...A(t.tables, "table", a, r),
605
+ ...A(t.supportingText, "supportingText", a, r)
600
606
  ];
601
- return [a, He(o, r)];
607
+ return [a, nt(i, r)];
602
608
  })
603
609
  );
604
610
  }
605
- function Xe(e) {
606
- const t = Fe(e);
611
+ function ct(e) {
612
+ const t = $e(e);
607
613
  return t === "datetime" ? "date" : t === "unknown" ? "string" : t;
608
614
  }
609
- function Qe(e) {
615
+ function lt(e) {
610
616
  return !!(e && typeof e == "object" && !Array.isArray(e));
611
617
  }
612
- function Ye(e) {
613
- return Qe(e) && typeof e.filterId == "string" && typeof e.operation == "string" && Array.isArray(e.values);
618
+ function ut(e) {
619
+ return lt(e) && typeof e.filterId == "string" && typeof e.operation == "string" && Array.isArray(e.values);
614
620
  }
615
- function Je(e) {
621
+ function ft(e) {
616
622
  return e.filter(
617
623
  (t) => typeof t == "string" || typeof t == "number"
618
624
  );
619
625
  }
620
- function Ze(e) {
626
+ function pt(e) {
621
627
  return e.filter(
622
628
  (t) => t instanceof Date || typeof t == "string"
623
629
  );
624
630
  }
625
- function Q(e, t) {
631
+ function ee(e, t) {
626
632
  if (t === void 0)
627
633
  return;
628
- const a = Xe(e.dataType), r = e.operation || "in";
629
- if (Ye(t))
630
- return $({
634
+ const a = ct(e.dataType), r = e.operation || "in";
635
+ if (ut(t))
636
+ return j({
631
637
  definition: e,
632
638
  sourceValue: t,
633
639
  value: {
@@ -641,7 +647,7 @@ function Q(e, t) {
641
647
  }
642
648
  });
643
649
  if (r === "is null" || r === "is not null")
644
- return $({
650
+ return j({
645
651
  definition: e,
646
652
  value: {
647
653
  filterId: e.id,
@@ -654,29 +660,29 @@ function Q(e, t) {
654
660
  semanticContext: e.semanticContext
655
661
  }
656
662
  });
657
- const o = Array.isArray(t) ? t : [t], n = a === "date" ? Ze(o) : Je(o);
658
- if (n.length !== 0 && !((r === "between" || r === "not between") && n.length < 2))
659
- return $({
663
+ const i = Array.isArray(t) ? t : [t], o = a === "date" ? pt(i) : ft(i);
664
+ if (o.length !== 0 && !((r === "between" || r === "not between") && o.length < 2))
665
+ return j({
660
666
  definition: e,
661
667
  value: {
662
668
  filterId: e.id,
663
669
  name: e.column,
664
670
  operation: r,
665
671
  valueType: a,
666
- values: n,
672
+ values: o,
667
673
  dataType: e.dataType,
668
674
  fieldMeta: e.fieldMeta,
669
675
  semanticContext: e.semanticContext
670
676
  }
671
677
  });
672
678
  }
673
- function me(e, t, a) {
679
+ function ye(e, t, a) {
674
680
  return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
675
681
  }
676
- function et(e, t, a) {
682
+ function mt(e, t, a) {
677
683
  const r = (t || []).filter(
678
- (o) => o.scope === "card" && o.targetCardId === a
679
- ).map((o) => o.field).filter(Boolean);
684
+ (i) => i.scope === "card" && i.targetCardId === a
685
+ ).map((i) => i.field).filter(Boolean);
680
686
  return r.length === 0 ? e : {
681
687
  ...e,
682
688
  calculatedFields: [
@@ -685,11 +691,11 @@ function et(e, t, a) {
685
691
  ]
686
692
  };
687
693
  }
688
- function tt(e, t, a) {
694
+ function ht(e, t, a) {
689
695
  return t.clickToFilter === void 0 && t.respondsToSelections === void 0 ? e : {
690
696
  ...e,
691
697
  ...t.clickToFilter ? {
692
- clickToFilter: q(
698
+ clickToFilter: H(
693
699
  t.clickToFilter,
694
700
  { cardIds: Object.fromEntries(a) }
695
701
  )
@@ -697,73 +703,73 @@ function tt(e, t, a) {
697
703
  ...t.respondsToSelections !== void 0 ? { respondsToSelections: t.respondsToSelections } : {}
698
704
  };
699
705
  }
700
- function U(e, t) {
706
+ function X(e, t) {
701
707
  return Array.from(
702
708
  new Set(
703
709
  (e || []).map((a) => t.get(a)).filter((a) => !!a)
704
710
  )
705
711
  );
706
712
  }
707
- function at(e, t) {
713
+ function gt(e, t) {
708
714
  if ((e == null ? void 0 : e.kind) !== "cards")
709
715
  return e;
710
- const a = U(e.cardIds, t);
716
+ const a = X(e.cardIds, t);
711
717
  return a.length > 0 ? { ...e, cardIds: a } : null;
712
718
  }
713
- function rt(e, t) {
719
+ function bt(e, t) {
714
720
  return !e.applyToCardIds && !e.excludeCardIds ? e : {
715
721
  ...e,
716
722
  ...e.applyToCardIds ? {
717
- applyToCardIds: U(
723
+ applyToCardIds: X(
718
724
  e.applyToCardIds,
719
725
  t
720
726
  )
721
727
  } : {},
722
728
  ...e.excludeCardIds ? {
723
- excludeCardIds: U(
729
+ excludeCardIds: X(
724
730
  e.excludeCardIds,
725
731
  t
726
732
  )
727
733
  } : {}
728
734
  };
729
735
  }
730
- function nt(e, t) {
736
+ function It(e, t) {
731
737
  const a = {}, r = [];
732
738
  return {
733
739
  inputs: (e.filterInputs || []).flatMap(
734
- (n, i) => {
735
- const s = at(n.scope, t);
740
+ (o, n) => {
741
+ const s = gt(o.scope, t);
736
742
  if (s === null)
737
743
  return r.push(
738
- me(
744
+ ye(
739
745
  "filter_input_scope_empty",
740
- `Filter input "${n.label}" was skipped because all scoped cards were skipped during query validation.`
746
+ `Filter input "${o.label}" was skipped because all scoped cards were skipped during query validation.`
741
747
  )
742
748
  ), [];
743
- const u = Q(
744
- n.filter,
745
- n.defaultValue
749
+ const l = ee(
750
+ o.filter,
751
+ o.defaultValue
746
752
  );
747
- return u && (a.shared ?? (a.shared = {}), a.shared[n.id] = {
753
+ return l && (a.shared ?? (a.shared = {}), a.shared[o.id] = {
748
754
  status: "set",
749
755
  value: {
750
756
  kind: "filter",
751
- filterValue: u
757
+ filterValue: l
752
758
  }
753
759
  }), [
754
760
  {
755
- id: n.id,
761
+ id: o.id,
756
762
  kind: "filter",
757
- label: n.label,
758
- variableName: n.variableName,
763
+ label: o.label,
764
+ variableName: o.variableName,
759
765
  scope: s || { kind: "allSheets", sheetKinds: ["dashboard"] },
760
766
  runtimeScope: "shared",
761
767
  presentation: {
762
768
  placement: "toolbar",
763
- order: i
769
+ order: n
764
770
  },
765
771
  exports: ["label", "value", "start", "end", "range"],
766
- filter: rt(n.filter, t)
772
+ filter: bt(o.filter, t)
767
773
  }
768
774
  ];
769
775
  }
@@ -772,55 +778,55 @@ function nt(e, t) {
772
778
  defaultInputValues: a.shared && Object.keys(a.shared).length > 0 ? a : void 0
773
779
  };
774
780
  }
775
- function Mt(e) {
776
- var b, C;
777
- const t = ze(e.plan);
781
+ function ea(e) {
782
+ var g, b;
783
+ const t = tt(e.plan);
778
784
  if (!t.ok)
779
785
  throw new Error(
780
786
  t.errors.map((c) => c.message).join(`
781
787
  `) || "Dashboard plan is invalid."
782
788
  );
783
- const a = e.plan.sheets[0], r = [...t.warnings], o = [], n = new Map(
789
+ const a = e.plan.sheets[0], r = [...t.warnings], i = [], o = new Map(
784
790
  e.cardArtifacts.map((c) => [c.planCardId, c])
785
- ), i = new Map(
791
+ ), n = new Map(
786
792
  e.cardArtifacts.map((c) => [
787
793
  c.planCardId,
788
794
  c.card.id
789
795
  ])
790
796
  ), s = [];
791
797
  for (const c of a.cards) {
792
- const f = n.get(c.id);
793
- if (!f) {
794
- const l = me(
798
+ const m = o.get(c.id);
799
+ if (!m) {
800
+ const u = ye(
795
801
  "missing_card_artifact",
796
802
  `Card "${c.title}" was skipped because no generated artifact was supplied.`,
797
803
  c.id
798
804
  );
799
- o.push(l);
805
+ i.push(u);
800
806
  continue;
801
807
  }
802
- r.push(...f.warnings || []);
803
- const I = tt(
804
- et(
805
- f.card,
808
+ r.push(...m.warnings || []);
809
+ const C = ht(
810
+ mt(
811
+ m.card,
806
812
  e.plan.calculatedFields,
807
813
  c.id
808
814
  ),
809
815
  c,
810
- i
816
+ n
811
817
  );
812
818
  s.push({
813
819
  id: c.frameId,
814
- cards: [I],
815
- activeCardId: I.id
820
+ cards: [C],
821
+ activeCardId: C.id
816
822
  });
817
823
  }
818
824
  if (s.length === 0)
819
825
  throw new Error("Dashboard plan did not produce any persistable cards.");
820
- const { inputs: u, defaultInputValues: d, warnings: h } = nt(e.plan, i);
821
- r.push(...h);
822
- const m = X(
823
- a.cards.filter((c) => s.some((f) => f.id === c.frameId)).map((c) => ({
826
+ const { inputs: l, defaultInputValues: d, warnings: p } = It(e.plan, n);
827
+ r.push(...p);
828
+ const h = Z(
829
+ a.cards.filter((c) => s.some((m) => m.id === c.frameId)).map((c) => ({
824
830
  frameId: c.frameId,
825
831
  priority: c.priority,
826
832
  role: c.role
@@ -840,93 +846,93 @@ function Mt(e) {
840
846
  title: a.title,
841
847
  description: a.description,
842
848
  frames: s,
843
- layouts: m,
844
- calculatedFields: (b = e.plan.calculatedFields) == null ? void 0 : b.filter((c) => c.scope === "sheet" && c.field).map((c) => c.field)
849
+ layouts: h,
850
+ calculatedFields: (g = e.plan.calculatedFields) == null ? void 0 : g.filter((c) => c.scope === "sheet" && c.field).map((c) => c.field)
845
851
  }
846
852
  ],
847
- calculatedFields: (C = e.plan.calculatedFields) == null ? void 0 : C.filter((c) => c.scope === "dashboard" && c.field).map((c) => c.field),
848
- inputs: u,
853
+ calculatedFields: (b = e.plan.calculatedFields) == null ? void 0 : b.filter((c) => c.scope === "dashboard" && c.field).map((c) => c.field),
854
+ inputs: l,
849
855
  ...d ? { defaultInputValues: d } : {}
850
- }, warnings: r, skippedOperations: o };
856
+ }, warnings: r, skippedOperations: i };
851
857
  }
852
- function T(e, t, a) {
858
+ function w(e, t, a) {
853
859
  return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
854
860
  }
855
- function it(e) {
861
+ function Ct(e) {
856
862
  return JSON.parse(JSON.stringify(e));
857
863
  }
858
- function ot(e) {
864
+ function yt(e) {
859
865
  var t;
860
866
  return (t = e.sheets) == null ? void 0 : t.find(
861
867
  (a) => (a.kind || "dashboard") === "dashboard"
862
868
  );
863
869
  }
864
- function M(e, t) {
870
+ function $(e, t) {
865
871
  var a;
866
872
  for (const r of e.sheets || [])
867
- for (const o of r.frames || []) {
868
- const n = (a = o.cards) == null ? void 0 : a.find((i) => i.id === t);
869
- if (n)
870
- return { sheet: r, frame: o, card: n };
873
+ for (const i of r.frames || []) {
874
+ const o = (a = i.cards) == null ? void 0 : a.find((n) => n.id === t);
875
+ if (o)
876
+ return { sheet: r, frame: i, card: o };
871
877
  }
872
878
  return null;
873
879
  }
874
- function ge(e) {
880
+ function _e(e) {
875
881
  var a, r;
876
882
  const t = (r = (a = e.cards) == null ? void 0 : a[0]) == null ? void 0 : r.type;
877
883
  return t === "kpi" ? "kpi" : t === "table" || t === "detailTable" || t === "pivotTable" ? "table" : t === "text" ? "text" : "chart";
878
884
  }
879
- function st(e) {
885
+ function _t(e) {
880
886
  var t;
881
887
  return new Map(
882
888
  (((t = e.layouts) == null ? void 0 : t.lg) || []).map((a, r) => [a.i, r])
883
889
  );
884
890
  }
885
- function be(e, t = /* @__PURE__ */ new Map()) {
886
- const a = st(e), r = Math.max(
891
+ function De(e, t = /* @__PURE__ */ new Map()) {
892
+ const a = _t(e), r = Math.max(
887
893
  a.size,
888
894
  t.size
889
- ), o = (e.frames || []).map(
890
- (n, i) => ({
891
- frameId: n.id,
892
- role: ge(n),
893
- priority: t.get(n.id) ?? a.get(n.id) ?? r + i
895
+ ), i = (e.frames || []).map(
896
+ (o, n) => ({
897
+ frameId: o.id,
898
+ role: _e(o),
899
+ priority: t.get(o.id) ?? a.get(o.id) ?? r + n
894
900
  })
895
901
  );
896
- e.layouts = X(o);
902
+ e.layouts = Z(i);
897
903
  }
898
- function dt(e) {
904
+ function Dt(e) {
899
905
  return Object.values(e.layouts || {}).some((t) => t.length > 0);
900
906
  }
901
- function ct(e, t) {
902
- if (!dt(e)) {
903
- be(e);
907
+ function St(e, t) {
908
+ if (!Dt(e)) {
909
+ De(e);
904
910
  return;
905
911
  }
906
- const a = X([
907
- { frameId: t.id, role: ge(t), priority: 0 }
912
+ const a = Z([
913
+ { frameId: t.id, role: _e(t), priority: 0 }
908
914
  ]);
909
915
  e.layouts ?? (e.layouts = {});
910
- for (const [r, o] of Object.entries(a)) {
911
- const n = e.layouts[r] || [];
912
- if (n.some((u) => u.i === t.id))
916
+ for (const [r, i] of Object.entries(a)) {
917
+ const o = e.layouts[r] || [];
918
+ if (o.some((l) => l.i === t.id))
913
919
  continue;
914
- const i = o[0];
915
- if (!i)
920
+ const n = i[0];
921
+ if (!n)
916
922
  continue;
917
- const s = n.reduce(
918
- (u, d) => Math.max(u, d.y + d.h),
923
+ const s = o.reduce(
924
+ (l, d) => Math.max(l, d.y + d.h),
919
925
  0
920
926
  );
921
927
  e.layouts[r] = [
922
- ...n,
923
- { ...i, y: s }
928
+ ...o,
929
+ { ...n, y: s }
924
930
  ];
925
931
  }
926
932
  }
927
- function lt(e, t) {
933
+ function vt(e, t) {
928
934
  var r;
929
- const a = Q(
935
+ const a = ee(
930
936
  t.filter,
931
937
  t.defaultValue
932
938
  );
@@ -938,22 +944,22 @@ function lt(e, t) {
938
944
  }
939
945
  });
940
946
  }
941
- function Lt(e) {
942
- var u;
943
- const t = qe(e.changePlan);
947
+ function ta(e) {
948
+ var l;
949
+ const t = at(e.changePlan);
944
950
  if (!t.ok)
945
951
  throw new Error(
946
952
  t.errors.map((d) => d.message).join(`
947
953
  `) || "Dashboard change plan is invalid."
948
954
  );
949
- const a = it(e.dashboard), r = [...t.warnings], o = [], n = new Map(
955
+ const a = Ct(e.dashboard), r = [...t.warnings], i = [], o = new Map(
950
956
  e.cardArtifacts.map((d) => [d.planCardId, d])
951
- ), i = new Map(
957
+ ), n = new Map(
952
958
  e.cardArtifacts.map((d) => [
953
959
  d.planCardId,
954
960
  d.card.id
955
961
  ])
956
- ), s = ot(a);
962
+ ), s = yt(a);
957
963
  if (!s)
958
964
  throw new Error("Dashboard has no editable dashboard sheet.");
959
965
  s.frames ?? (s.frames = []);
@@ -961,25 +967,25 @@ function Lt(e) {
961
967
  switch (d.kind) {
962
968
  case "addCard": {
963
969
  if ((s.frames || []).reduce(
964
- (C, c) => {
965
- var f;
966
- return C + (((f = c.cards) == null ? void 0 : f.length) || 0);
970
+ (b, c) => {
971
+ var m;
972
+ return b + (((m = c.cards) == null ? void 0 : m.length) || 0);
967
973
  },
968
974
  0
969
- ) >= L) {
970
- o.push(
971
- T(
975
+ ) >= B) {
976
+ i.push(
977
+ w(
972
978
  "generated_card_limit_reached",
973
- `AI refinement is capped at ${L} cards.`,
979
+ `AI refinement is capped at ${B} cards.`,
974
980
  d.card.id
975
981
  )
976
982
  );
977
983
  break;
978
984
  }
979
- const m = n.get(d.card.id);
980
- if (!m) {
981
- o.push(
982
- T(
985
+ const h = o.get(d.card.id);
986
+ if (!h) {
987
+ i.push(
988
+ w(
983
989
  "missing_card_artifact",
984
990
  `Card "${d.card.title}" was skipped because no generated artifact was supplied.`,
985
991
  d.card.id
@@ -987,28 +993,28 @@ function Lt(e) {
987
993
  );
988
994
  break;
989
995
  }
990
- const S = {
991
- ...m.card,
996
+ const y = {
997
+ ...h.card,
992
998
  ...d.card.clickToFilter ? {
993
- clickToFilter: q(
999
+ clickToFilter: H(
994
1000
  d.card.clickToFilter,
995
- { cardIds: Object.fromEntries(i) }
1001
+ { cardIds: Object.fromEntries(n) }
996
1002
  )
997
1003
  } : {},
998
1004
  ...d.card.respondsToSelections !== void 0 ? {
999
1005
  respondsToSelections: d.card.respondsToSelections
1000
1006
  } : {}
1001
- }, b = {
1007
+ }, g = {
1002
1008
  id: d.card.frameId,
1003
- cards: [S],
1004
- activeCardId: S.id
1009
+ cards: [y],
1010
+ activeCardId: y.id
1005
1011
  };
1006
- s.frames.push(b), ct(s, b);
1012
+ s.frames.push(g), St(s, g);
1007
1013
  break;
1008
1014
  }
1009
1015
  case "addFilterInput": {
1010
1016
  a.inputs ?? (a.inputs = []);
1011
- const h = {
1017
+ const p = {
1012
1018
  id: d.input.id,
1013
1019
  kind: "filter",
1014
1020
  label: d.input.label,
@@ -1025,7 +1031,7 @@ function Lt(e) {
1025
1031
  exports: ["label", "value", "start", "end", "range"],
1026
1032
  filter: d.input.filter
1027
1033
  };
1028
- a.inputs.push(h), lt(a, d.input);
1034
+ a.inputs.push(p), vt(a, d.input);
1029
1035
  break;
1030
1036
  }
1031
1037
  case "addCalculatedField": {
@@ -1034,9 +1040,9 @@ function Lt(e) {
1034
1040
  else if (d.field.scope === "sheet" && d.field.field)
1035
1041
  s.calculatedFields ?? (s.calculatedFields = []), s.calculatedFields.push(d.field.field);
1036
1042
  else if (d.field.scope === "card" && d.field.field) {
1037
- const h = d.field.targetCardId ? M(a, d.field.targetCardId) : null;
1038
- h ? ((u = h.card).calculatedFields ?? (u.calculatedFields = []), h.card.calculatedFields.push(d.field.field)) : o.push(
1039
- T(
1043
+ const p = d.field.targetCardId ? $(a, d.field.targetCardId) : null;
1044
+ p ? ((l = p.card).calculatedFields ?? (l.calculatedFields = []), p.card.calculatedFields.push(d.field.field)) : i.push(
1045
+ w(
1040
1046
  "missing_calculated_field_target",
1041
1047
  `Calculated field "${d.field.name}" needs a valid target card.`
1042
1048
  )
@@ -1045,10 +1051,10 @@ function Lt(e) {
1045
1051
  break;
1046
1052
  }
1047
1053
  case "renameCard": {
1048
- const h = M(a, d.cardId);
1049
- if (!h) {
1050
- o.push(
1051
- T(
1054
+ const p = $(a, d.cardId);
1055
+ if (!p) {
1056
+ i.push(
1057
+ w(
1052
1058
  "card_not_found",
1053
1059
  `Card "${d.cardId}" could not be renamed because it was not found.`,
1054
1060
  d.cardId
@@ -1056,14 +1062,14 @@ function Lt(e) {
1056
1062
  );
1057
1063
  break;
1058
1064
  }
1059
- h.card.title = d.title, d.description !== void 0 && (h.card.description = d.description);
1065
+ p.card.title = d.title, d.description !== void 0 && (p.card.description = d.description);
1060
1066
  break;
1061
1067
  }
1062
1068
  case "updateCardSelectionSettings": {
1063
- const h = i.get(d.cardId) ?? d.cardId, m = M(a, h);
1064
- if (!m) {
1065
- o.push(
1066
- T(
1069
+ const p = n.get(d.cardId) ?? d.cardId, h = $(a, p);
1070
+ if (!h) {
1071
+ i.push(
1072
+ w(
1067
1073
  "card_not_found",
1068
1074
  `Card "${d.cardId}" could not be updated because it was not found.`,
1069
1075
  d.cardId
@@ -1071,44 +1077,44 @@ function Lt(e) {
1071
1077
  );
1072
1078
  break;
1073
1079
  }
1074
- d.card.clickToFilter !== void 0 && (m.card.clickToFilter = q(
1080
+ d.card.clickToFilter !== void 0 && (h.card.clickToFilter = H(
1075
1081
  d.card.clickToFilter,
1076
- { cardIds: Object.fromEntries(i) }
1077
- )), d.card.respondsToSelections !== void 0 && (m.card.respondsToSelections = d.card.respondsToSelections);
1082
+ { cardIds: Object.fromEntries(n) }
1083
+ )), d.card.respondsToSelections !== void 0 && (h.card.respondsToSelections = d.card.respondsToSelections);
1078
1084
  break;
1079
1085
  }
1080
1086
  case "reorderCards": {
1081
- const h = /* @__PURE__ */ new Map();
1082
- for (let m = 0; m < d.cardIds.length; m += 1) {
1083
- const S = d.cardIds[m], b = M(a, S);
1084
- b && h.set(b.frame.id, m);
1087
+ const p = /* @__PURE__ */ new Map();
1088
+ for (let h = 0; h < d.cardIds.length; h += 1) {
1089
+ const y = d.cardIds[h], g = $(a, y);
1090
+ g && p.set(g.frame.id, h);
1085
1091
  }
1086
- be(s, h);
1092
+ De(s, p);
1087
1093
  break;
1088
1094
  }
1089
1095
  case "reuseCalculatedField":
1090
1096
  r.push(
1091
- T(
1097
+ w(
1092
1098
  "reused_calculated_field",
1093
1099
  `Calculated field "${d.fieldId}" is reused by reference.`
1094
1100
  )
1095
1101
  );
1096
1102
  break;
1097
1103
  case "unsupported":
1098
- o.push(
1099
- T("unsupported_operation", d.reason || d.requestedAction)
1104
+ i.push(
1105
+ w("unsupported_operation", d.reason || d.requestedAction)
1100
1106
  );
1101
1107
  break;
1102
1108
  }
1103
- return { dashboard: a, warnings: r, skippedOperations: o };
1109
+ return { dashboard: a, warnings: r, skippedOperations: i };
1104
1110
  }
1105
1111
  function _(e, t, a) {
1106
1112
  return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
1107
1113
  }
1108
- function x(e, t) {
1114
+ function O(e, t) {
1109
1115
  return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || t;
1110
1116
  }
1111
- function Ie(e, t) {
1117
+ function Se(e, t) {
1112
1118
  if (!t.has(e))
1113
1119
  return t.add(e), e;
1114
1120
  let a = 2, r = `${e}-${a}`;
@@ -1116,22 +1122,22 @@ function Ie(e, t) {
1116
1122
  a += 1, r = `${e}-${a}`;
1117
1123
  return t.add(r), r;
1118
1124
  }
1119
- function O(e) {
1125
+ function E(e) {
1120
1126
  return !!(e && typeof e == "object");
1121
1127
  }
1122
- function _e(e) {
1128
+ function ve(e) {
1123
1129
  return Array.isArray(e.inputs) ? e.inputs.filter(
1124
- (t) => O(t) && typeof t.id == "string"
1130
+ (t) => E(t) && typeof t.id == "string"
1125
1131
  ) : [];
1126
1132
  }
1127
- function Y(e) {
1133
+ function te(e) {
1128
1134
  return Array.isArray(e.sections) ? e.sections.filter(
1129
- (t) => O(t)
1135
+ (t) => E(t)
1130
1136
  ) : [];
1131
1137
  }
1132
- function J(e) {
1138
+ function ae(e) {
1133
1139
  return Array.isArray(e.views) ? e.views.filter(
1134
- (t) => O(t)
1140
+ (t) => E(t)
1135
1141
  ) : [];
1136
1142
  }
1137
1143
  function F(e) {
@@ -1144,62 +1150,62 @@ function F(e) {
1144
1150
  }
1145
1151
  return t;
1146
1152
  }
1147
- function ut(e) {
1148
- var r, o, n;
1153
+ function Tt(e) {
1154
+ var r, i, o;
1149
1155
  if (!e)
1150
1156
  return [];
1151
1157
  const t = [];
1152
- if (A(e.source) && t.push(e.source), e.kind === "metric") {
1158
+ if (R(e.source) && t.push(e.source), e.kind === "metric") {
1153
1159
  t.push(...F(e.measures));
1154
- const i = v(e.dateField);
1155
- i && t.push(i), t.push(...F(e.dimensions)), t.push(
1160
+ const n = v(e.dateField);
1161
+ n && t.push(n), t.push(...F(e.dimensions)), t.push(
1156
1162
  ...F(
1157
1163
  (r = e.filters) == null ? void 0 : r.map((s) => s.field)
1158
1164
  )
1159
1165
  );
1160
1166
  } else if (e.kind === "records") {
1161
- const i = v(e.dateField);
1162
- i && t.push(i), t.push(...F(e.fields)), t.push(
1167
+ const n = v(e.dateField);
1168
+ n && t.push(n), t.push(...F(e.fields)), t.push(
1163
1169
  ...F(
1164
- (o = e.filters) == null ? void 0 : o.map((s) => s.field)
1170
+ (i = e.filters) == null ? void 0 : i.map((s) => s.field)
1165
1171
  )
1166
1172
  );
1167
- } else e.kind === "inputOptions" ? (((n = e.population) == null ? void 0 : n.kind) === "related_population" && A(e.population.baseSource) && t.push(e.population.baseSource), t.push(
1173
+ } else e.kind === "inputOptions" ? (((o = e.population) == null ? void 0 : o.kind) === "related_population" && R(e.population.baseSource) && t.push(e.population.baseSource), t.push(
1168
1174
  ...F([
1169
1175
  e.labelField,
1170
1176
  e.valueField,
1171
1177
  e.searchField,
1172
1178
  ...e.disambiguationFields || []
1173
- ].filter((i) => !!i))
1179
+ ].filter((n) => !!n))
1174
1180
  )) : e.kind === "sql" && t.push(...F(e.fields));
1175
1181
  const a = "inputs" in e && Array.isArray(e.inputs) ? e.inputs : [];
1176
- for (const i of a) {
1177
- const s = v(i.field);
1182
+ for (const n of a) {
1183
+ const s = v(n.field);
1178
1184
  s && t.push(s);
1179
1185
  }
1180
1186
  return t;
1181
1187
  }
1182
- function pt(e) {
1188
+ function wt(e) {
1183
1189
  const t = [];
1184
- for (const a of _e(e)) {
1190
+ for (const a of ve(e)) {
1185
1191
  const r = v(a.field);
1186
1192
  r && t.push(r);
1187
1193
  }
1188
- for (const a of Y(e))
1189
- for (const r of J(a))
1190
- t.push(...ut(r.analytics));
1194
+ for (const a of te(e))
1195
+ for (const r of ae(a))
1196
+ t.push(...Tt(r.analytics));
1191
1197
  return t;
1192
1198
  }
1193
- function ft(e) {
1199
+ function Ft(e) {
1194
1200
  var a;
1195
1201
  const t = [];
1196
- for (const r of Y(e))
1197
- for (const o of J(r))
1198
- A((a = o.analytics) == null ? void 0 : a.source) && t.push(o.analytics.source);
1202
+ for (const r of te(e))
1203
+ for (const i of ae(r))
1204
+ R((a = i.analytics) == null ? void 0 : a.source) && t.push(i.analytics.source);
1199
1205
  return t;
1200
1206
  }
1201
- function ht(e, t) {
1202
- const a = P(e).filter(A);
1207
+ function xt(e, t) {
1208
+ const a = q(e).filter(R);
1203
1209
  if (a.length === 0)
1204
1210
  return t.push(
1205
1211
  _(
@@ -1207,35 +1213,35 @@ function ht(e, t) {
1207
1213
  "No semantic or physical source could be converted into the current dashboard authoring dataset reference."
1208
1214
  )
1209
1215
  ), [];
1210
- const r = a.every((n) => n.kind === "semantic"), o = Array.from(
1216
+ const r = a.every((o) => o.kind === "semantic"), i = Array.from(
1211
1217
  new Set(
1212
- a.filter((n) => n.kind === "semantic").map((n) => n.domainId)
1218
+ a.filter((o) => o.kind === "semantic").map((o) => o.domainId)
1213
1219
  )
1214
1220
  );
1215
- return a.length > 1 && (!r || o.length !== 1) ? (t.push(
1221
+ return a.length > 1 && (!r || i.length !== 1) ? (t.push(
1216
1222
  _(
1217
1223
  "multiple_datasets_out_of_scope",
1218
1224
  "The dashboard authoring compiler supports multiple datasets only within one semantic domain; using the first source and deferring the rest."
1219
1225
  )
1220
1226
  ), [a[0]]) : a;
1221
1227
  }
1222
- function mt(e, t) {
1223
- const a = Y(e), r = _e(e), o = P(pt(e)), n = P(
1224
- ft(e)
1228
+ function kt(e, t) {
1229
+ const a = te(e), r = ve(e), i = q(wt(e)), o = q(
1230
+ Ft(e)
1225
1231
  );
1226
1232
  return {
1227
1233
  sections: a,
1228
1234
  inputs: r,
1229
- sources: o,
1230
- primarySources: n,
1231
- defaultSource: n.length === 1 ? n[0] : void 0,
1232
- datasets: ht(o, t)
1235
+ sources: i,
1236
+ primarySources: o,
1237
+ defaultSource: o.length === 1 ? o[0] : void 0,
1238
+ datasets: xt(i, t)
1233
1239
  };
1234
1240
  }
1235
- function gt(e) {
1236
- return e && se(e).ok ? e : void 0;
1241
+ function At(e) {
1242
+ return e && fe(e).ok ? e : void 0;
1237
1243
  }
1238
- function bt(e) {
1244
+ function Ot(e) {
1239
1245
  var t;
1240
1246
  switch ((t = e.presentation) == null ? void 0 : t.kind) {
1241
1247
  case "kpi":
@@ -1254,12 +1260,12 @@ function bt(e) {
1254
1260
  return null;
1255
1261
  }
1256
1262
  }
1257
- function It(e) {
1263
+ function Rt(e) {
1258
1264
  var t, a, r;
1259
1265
  return ((t = e.presentation) == null ? void 0 : t.kind) === "kpi" ? "kpi" : ((a = e.presentation) == null ? void 0 : a.kind) === "table" ? "table" : ((r = e.presentation) == null ? void 0 : r.kind) === "text" ? "text" : "chart";
1260
1266
  }
1261
- function _t(e) {
1262
- const t = we(e);
1267
+ function Et(e) {
1268
+ const t = Be(e);
1263
1269
  switch (t) {
1264
1270
  case "not_in":
1265
1271
  return "not in";
@@ -1273,78 +1279,78 @@ function _t(e) {
1273
1279
  return t || "in";
1274
1280
  }
1275
1281
  }
1276
- function yt(e) {
1277
- return O(e.field) ? e.field.dataType === "datetime" ? "date" : e.field.dataType || "string" : "string";
1282
+ function Nt(e) {
1283
+ return E(e.field) ? e.field.dataType === "datetime" ? "date" : e.field.dataType || "string" : "string";
1278
1284
  }
1279
- function Ct(e) {
1285
+ function Mt(e) {
1280
1286
  if (!(!e || e.kind !== "physical"))
1281
1287
  return [e.databaseName, e.schemaName, e.tableName].filter(Boolean).join(".");
1282
1288
  }
1283
- function St(e, t, a, r, o, n) {
1289
+ function Pt(e, t, a, r, i, o) {
1284
1290
  if (e.kind !== "filter")
1285
- return n.push(
1291
+ return o.push(
1286
1292
  _(
1287
1293
  "control_inputs_deferred",
1288
1294
  `Control input "${e.label}" is represented in the protocol but not yet materialized by the dashboard authoring adapter.`
1289
1295
  )
1290
1296
  ), null;
1291
- if (!O(e.field) || typeof e.field.name != "string")
1292
- return n.push(
1297
+ if (!E(e.field) || typeof e.field.name != "string")
1298
+ return o.push(
1293
1299
  _(
1294
1300
  "filter_requires_field",
1295
1301
  `Filter "${e.label || e.id}" needs a field before the dashboard compiler can materialize it.`
1296
1302
  )
1297
1303
  ), null;
1298
- const i = Oe({
1304
+ const n = Ge({
1299
1305
  explicitSource: void 0,
1300
1306
  field: e.field,
1301
1307
  defaultSource: t,
1302
1308
  fallbackSources: a
1303
- }), s = (i == null ? void 0 : i.kind) === "semantic" || (i == null ? void 0 : i.kind) === "physical" ? i.connectionId : void 0;
1309
+ }), s = (n == null ? void 0 : n.kind) === "semantic" || (n == null ? void 0 : n.kind) === "physical" ? n.connectionId : void 0;
1304
1310
  if (!s)
1305
- return n.push(
1311
+ return o.push(
1306
1312
  _(
1307
1313
  "filter_requires_connection_id",
1308
1314
  `Filter "${e.label}" needs a source connectionId before the dashboard compiler can materialize it.`
1309
1315
  )
1310
1316
  ), null;
1311
- const h = {
1312
- id: `filter-${Ie(
1313
- x(e.id, e.field.name),
1314
- o
1317
+ const p = {
1318
+ id: `filter-${Se(
1319
+ O(e.id, e.field.name),
1320
+ i
1315
1321
  )}`,
1316
1322
  variableName: e.id,
1317
1323
  connectionId: s,
1318
1324
  title: e.label,
1319
1325
  column: e.field.name,
1320
- dataType: yt(e),
1321
- qualifiedTableName: Ct(i),
1326
+ dataType: Nt(e),
1327
+ qualifiedTableName: Mt(n),
1322
1328
  sql: "",
1323
- operation: _t(e.operator),
1329
+ operation: Et(e.operator),
1324
1330
  type: e.multi === !1 ? "single" : "multiple",
1325
1331
  location: "dashboard",
1326
1332
  displayMode: "toolbar",
1327
- fieldMeta: (i == null ? void 0 : i.kind) === "semantic" ? {
1333
+ fieldMeta: (n == null ? void 0 : n.kind) === "semantic" ? {
1328
1334
  name: e.field.name,
1329
1335
  qualifiedFieldName: e.field.name,
1330
1336
  dataType: e.field.dataType,
1331
1337
  role: e.field.role === "measure" ? "metric" : "groupby"
1332
1338
  } : void 0,
1333
- semanticContext: (i == null ? void 0 : i.kind) === "semantic" ? {
1334
- semanticDomainId: i.domainId,
1335
- connectionId: i.connectionId
1336
- } : (i == null ? void 0 : i.kind) === "physical" ? {
1337
- connectionId: i.connectionId,
1338
- connectionType: i.connectionType,
1339
+ semanticContext: (n == null ? void 0 : n.kind) === "semantic" ? {
1340
+ semanticDomainId: n.domainId,
1341
+ connectionId: n.connectionId
1342
+ } : (n == null ? void 0 : n.kind) === "physical" ? {
1343
+ connectionId: n.connectionId,
1344
+ connectionType: n.connectionType,
1339
1345
  selectedEntities: [
1340
1346
  {
1341
1347
  type: "table",
1342
- connectionId: i.connectionId,
1343
- connectionType: i.connectionType,
1344
- dialect: i.dialect,
1345
- database: i.databaseName,
1346
- schema: i.schemaName,
1347
- name: i.tableName
1348
+ connectionId: n.connectionId,
1349
+ connectionType: n.connectionType,
1350
+ dialect: n.dialect,
1351
+ database: n.databaseName,
1352
+ schema: n.schemaName,
1353
+ name: n.tableName
1348
1354
  }
1349
1355
  ]
1350
1356
  } : void 0
@@ -1354,18 +1360,18 @@ function St(e, t, a, r, o, n) {
1354
1360
  label: e.label,
1355
1361
  variableName: e.id,
1356
1362
  scope: r,
1357
- filter: h,
1358
- defaultValue: Q(
1359
- h,
1363
+ filter: p,
1364
+ defaultValue: ee(
1365
+ p,
1360
1366
  e.defaultValue
1361
1367
  )
1362
1368
  };
1363
1369
  }
1364
- function z(e) {
1370
+ function G(e) {
1365
1371
  const t = [], a = [];
1366
1372
  for (const r of e.viewIds) {
1367
- const o = e.viewIdToCardId.get(r);
1368
- o ? t.push(o) : a.push(r);
1373
+ const i = e.viewIdToCardId.get(r);
1374
+ i ? t.push(i) : a.push(r);
1369
1375
  }
1370
1376
  return a.length > 0 && e.warnings.push(
1371
1377
  _(
@@ -1374,17 +1380,17 @@ function z(e) {
1374
1380
  )
1375
1381
  ), Array.from(new Set(t));
1376
1382
  }
1377
- function vt(e) {
1378
- var r, o;
1383
+ function $t(e) {
1384
+ var r, i;
1379
1385
  if (!e.protocolScope) {
1380
- const n = Array.from(new Set(e.boundCardIds));
1381
- return n.length > 0 && n.length < e.allCardIds.length ? { kind: "cards", cardIds: n } : void 0;
1386
+ const o = Array.from(new Set(e.boundCardIds));
1387
+ return o.length > 0 && o.length < e.allCardIds.length ? { kind: "cards", cardIds: o } : void 0;
1382
1388
  }
1383
1389
  if (e.protocolScope.level === "dashboard") {
1384
1390
  if (!((r = e.protocolScope.excludeViewIds) != null && r.length))
1385
1391
  return;
1386
- const n = new Set(
1387
- z({
1392
+ const o = new Set(
1393
+ G({
1388
1394
  inputLabel: e.inputLabel,
1389
1395
  viewIds: e.protocolScope.excludeViewIds,
1390
1396
  viewIdToCardId: e.viewIdToCardId,
@@ -1393,22 +1399,22 @@ function vt(e) {
1393
1399
  );
1394
1400
  return {
1395
1401
  kind: "cards",
1396
- cardIds: e.allCardIds.filter((i) => !n.has(i))
1402
+ cardIds: e.allCardIds.filter((n) => !o.has(n))
1397
1403
  };
1398
1404
  }
1399
1405
  if (e.protocolScope.level === "view") {
1400
- const n = z({
1406
+ const o = G({
1401
1407
  inputLabel: e.inputLabel,
1402
1408
  viewIds: e.protocolScope.viewIds,
1403
1409
  viewIdToCardId: e.viewIdToCardId,
1404
1410
  warnings: e.warnings
1405
1411
  });
1406
- return n.length === 0 ? (e.warnings.push(
1412
+ return o.length === 0 ? (e.warnings.push(
1407
1413
  _(
1408
1414
  "input_scope_has_no_materialized_cards",
1409
1415
  `Filter "${e.inputLabel}" was deferred because its view scope does not match any materialized cards.`
1410
1416
  )
1411
- ), null) : { kind: "cards", cardIds: n };
1417
+ ), null) : { kind: "cards", cardIds: o };
1412
1418
  }
1413
1419
  const t = e.sectionIdToCardIds.get(e.protocolScope.sectionId) || [];
1414
1420
  if (t.length === 0)
@@ -1418,10 +1424,10 @@ function vt(e) {
1418
1424
  `Filter "${e.inputLabel}" was deferred because section "${e.protocolScope.sectionId}" does not match any materialized cards.`
1419
1425
  )
1420
1426
  ), null;
1421
- if (!((o = e.protocolScope.excludeViewIds) != null && o.length))
1427
+ if (!((i = e.protocolScope.excludeViewIds) != null && i.length))
1422
1428
  return { kind: "cards", cardIds: t };
1423
1429
  const a = new Set(
1424
- z({
1430
+ G({
1425
1431
  inputLabel: e.inputLabel,
1426
1432
  viewIds: e.protocolScope.excludeViewIds,
1427
1433
  viewIdToCardId: e.viewIdToCardId,
@@ -1430,232 +1436,388 @@ function vt(e) {
1430
1436
  );
1431
1437
  return {
1432
1438
  kind: "cards",
1433
- cardIds: t.filter((n) => !a.has(n))
1439
+ cardIds: t.filter((o) => !a.has(o))
1434
1440
  };
1435
1441
  }
1436
- function Pt(e) {
1437
- var b, C, c;
1438
- const t = [], a = ke(e);
1439
- for (const f of a.warnings)
1440
- t.push(_(f.code, f.message));
1441
- for (const f of a.errors)
1442
- t.push(_(f.code, f.message));
1443
- const r = mt(e, t), o = [], n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
1444
- let h = 0;
1445
- for (const [f, I] of r.sections.entries()) {
1446
- const l = typeof I.title == "string" ? I.title : `Section ${f + 1}`, Z = I.id || x(l, `section-${f + 1}`);
1447
- i.set(Z, []);
1448
- for (const [ee, g] of J(I).entries()) {
1449
- const te = bt(g), B = x(
1450
- g.id || `${l}-${g.title || `View ${ee + 1}`}`,
1451
- `card-${f + 1}-${ee + 1}`
1442
+ function aa(e) {
1443
+ var g, b, c;
1444
+ const t = [], a = Le(e);
1445
+ for (const m of a.warnings)
1446
+ t.push(_(m.code, m.message));
1447
+ for (const m of a.errors)
1448
+ t.push(_(m.code, m.message));
1449
+ const r = kt(e, t), i = [], o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
1450
+ let p = 0;
1451
+ for (const [m, C] of r.sections.entries()) {
1452
+ const u = typeof C.title == "string" ? C.title : `Section ${m + 1}`, ne = C.id || O(u, `section-${m + 1}`);
1453
+ n.set(ne, []);
1454
+ for (const [ie, I] of ae(C).entries()) {
1455
+ const oe = Ot(I), V = O(
1456
+ I.id || `${u}-${I.title || `View ${ie + 1}`}`,
1457
+ `card-${m + 1}-${ie + 1}`
1452
1458
  );
1453
- if (!te) {
1459
+ if (!oe) {
1454
1460
  t.push(
1455
1461
  _(
1456
1462
  "unsupported_presentation",
1457
- `Dashboard presentation "${((b = g.presentation) == null ? void 0 : b.kind) || "unknown"}" is not supported by the dashboard authoring adapter.`,
1458
- `card-${B}`
1463
+ `Dashboard presentation "${((g = I.presentation) == null ? void 0 : g.kind) || "unknown"}" is not supported by the dashboard authoring adapter.`,
1464
+ `card-${V}`
1459
1465
  )
1460
1466
  );
1461
1467
  continue;
1462
1468
  }
1463
- if (((C = g.analytics) == null ? void 0 : C.kind) === "sql") {
1469
+ if (((b = I.analytics) == null ? void 0 : b.kind) === "sql") {
1464
1470
  t.push(
1465
1471
  _(
1466
1472
  "sql_intent_deferred",
1467
1473
  "SQL analytics intent is valid protocol, but the current dashboard authoring adapter only materializes semantic and physical config-card intents.",
1468
- `card-${B}`
1474
+ `card-${V}`
1469
1475
  )
1470
1476
  );
1471
1477
  continue;
1472
1478
  }
1473
- const ae = Ie(B, u), R = `card-${ae}`;
1474
- g.id && n.set(g.id, R), (c = i.get(Z)) == null || c.push(R);
1475
- const ye = g.analytics && "inputs" in g.analytics ? g.analytics.inputs : void 0;
1476
- for (const re of ye || []) {
1477
- const ne = s.get(re.inputId) || [];
1478
- ne.push(R), s.set(re.inputId, ne);
1479
+ const se = Se(V, l), N = `card-${se}`;
1480
+ I.id && o.set(I.id, N), (c = n.get(ne)) == null || c.push(N);
1481
+ const Te = I.analytics && "inputs" in I.analytics ? I.analytics.inputs : void 0;
1482
+ for (const de of Te || []) {
1483
+ const ce = s.get(de.inputId) || [];
1484
+ ce.push(N), s.set(de.inputId, ce);
1479
1485
  }
1480
- o.push({
1481
- id: R,
1482
- frameId: `frame-${ae}`,
1483
- title: g.title,
1484
- description: g.description,
1485
- type: te,
1486
- role: It(g),
1487
- priority: h,
1488
- section: l,
1489
- analyticsIntent: gt(g.analytics),
1490
- text: g.text
1491
- }), h += 1;
1486
+ i.push({
1487
+ id: N,
1488
+ frameId: `frame-${se}`,
1489
+ title: I.title,
1490
+ description: I.description,
1491
+ type: oe,
1492
+ role: Rt(I),
1493
+ priority: p,
1494
+ section: u,
1495
+ analyticsIntent: At(I.analytics),
1496
+ text: I.text
1497
+ }), p += 1;
1492
1498
  }
1493
1499
  }
1494
- const m = r.inputs.map((f) => {
1495
- const I = vt({
1496
- protocolScope: f.scope,
1497
- inputLabel: f.label,
1498
- allCardIds: o.map((l) => l.id),
1499
- boundCardIds: s.get(f.id) || [],
1500
- viewIdToCardId: n,
1501
- sectionIdToCardIds: i,
1500
+ const h = r.inputs.map((m) => {
1501
+ const C = $t({
1502
+ protocolScope: m.scope,
1503
+ inputLabel: m.label,
1504
+ allCardIds: i.map((u) => u.id),
1505
+ boundCardIds: s.get(m.id) || [],
1506
+ viewIdToCardId: o,
1507
+ sectionIdToCardIds: n,
1502
1508
  warnings: t
1503
1509
  });
1504
- return I === null ? null : St(
1505
- f,
1510
+ return C === null ? null : Pt(
1511
+ m,
1506
1512
  r.defaultSource,
1507
1513
  r.sources,
1508
- I,
1514
+ C,
1509
1515
  d,
1510
1516
  t
1511
1517
  );
1512
- }).filter((f) => !!f);
1518
+ }).filter((m) => !!m);
1513
1519
  return { plan: {
1514
1520
  version: 1,
1515
- id: `plan-${x(e.title, "dashboard")}`,
1521
+ id: `plan-${O(e.title, "dashboard")}`,
1516
1522
  title: e.title,
1517
1523
  description: e.description,
1518
1524
  datasets: r.datasets,
1519
1525
  sheets: [
1520
1526
  {
1521
- id: `sheet-${x(e.title, "dashboard")}`,
1527
+ id: `sheet-${O(e.title, "dashboard")}`,
1522
1528
  title: e.title,
1523
1529
  description: e.description,
1524
1530
  kind: "dashboard",
1525
- cards: o
1531
+ cards: i
1526
1532
  }
1527
1533
  ],
1528
- filterInputs: m.length ? m : void 0,
1534
+ filterInputs: h.length ? h : void 0,
1529
1535
  warnings: t.length ? t : void 0,
1530
- unresolvedRequests: a.ok ? void 0 : a.errors.map((f) => f.message)
1536
+ unresolvedRequests: a.ok ? void 0 : a.errors.map((m) => m.message)
1531
1537
  }, warnings: t };
1532
1538
  }
1539
+ const ra = [
1540
+ "cardType",
1541
+ "sql",
1542
+ "python",
1543
+ "resultOwner",
1544
+ "cardConfig",
1545
+ "cardDataSource",
1546
+ "active_filters",
1547
+ "controlValues",
1548
+ "controlDefinitions",
1549
+ "cardControlDefinitions",
1550
+ "controlBindings",
1551
+ "resolvedPrimaryDateField",
1552
+ "globalDateComparison",
1553
+ "calendarContext"
1554
+ ], na = [
1555
+ "cardId",
1556
+ "cardTitle",
1557
+ "cache_config",
1558
+ "queryConfig",
1559
+ "tableConfig"
1560
+ ];
1561
+ class S extends Error {
1562
+ constructor(a, r, i) {
1563
+ super(a);
1564
+ z(this, "field");
1565
+ z(this, "details");
1566
+ Object.setPrototypeOf(this, S.prototype), this.name = "CardQueryRequestError", this.field = r, this.details = i;
1567
+ }
1568
+ }
1569
+ function re(e) {
1570
+ return e.label ? `${e.label}.` : "";
1571
+ }
1572
+ function k(e) {
1573
+ return !e || typeof e != "object" || Array.isArray(e) ? {} : { ...e };
1574
+ }
1575
+ function L(e) {
1576
+ return typeof e == "string" ? e : "";
1577
+ }
1578
+ function Lt(e, t = {}) {
1579
+ const a = k(e), r = re(t), i = {};
1580
+ if (a.calendarContext !== void 0) {
1581
+ const n = ze(a.calendarContext);
1582
+ if (!n.ok)
1583
+ throw new S(
1584
+ `${r}calendarContext: ${n.issues.map((s) => s.message).join("; ")}`,
1585
+ "calendarContext",
1586
+ n.issues
1587
+ );
1588
+ i.calendarContext = n.value;
1589
+ }
1590
+ const o = Oe(a.resolvedPrimaryDateField);
1591
+ if (!o.ok)
1592
+ throw new S(
1593
+ `${r}${Re(o.issues)}`,
1594
+ "resolvedPrimaryDateField",
1595
+ o.issues
1596
+ );
1597
+ if (a.resolvedPrimaryDateField && (i.resolvedPrimaryDateField = a.resolvedPrimaryDateField), a.globalDateComparison !== void 0) {
1598
+ const n = qe(a.globalDateComparison);
1599
+ if (!n.ok)
1600
+ throw new S(
1601
+ `${r}Invalid globalDateComparison: ${n.errors.map((s) => `${s.path}: ${s.message}`).join("; ")}`,
1602
+ "globalDateComparison",
1603
+ n.errors
1604
+ );
1605
+ i.globalDateComparison = Ve(
1606
+ a.globalDateComparison
1607
+ );
1608
+ }
1609
+ return i;
1610
+ }
1611
+ function ia(e, t = {}) {
1612
+ const a = k(e), r = re(t), i = {};
1613
+ if (a.pagination !== void 0) {
1614
+ const o = k(a.pagination), n = o.page, s = o.pageSize;
1615
+ if (!Number.isInteger(n) || n < 1 || !Number.isInteger(s) || s < 1)
1616
+ throw new S(
1617
+ `${r}pagination must name a page and a page size of at least 1`,
1618
+ "pagination"
1619
+ );
1620
+ i.pagination = { page: n, pageSize: s };
1621
+ }
1622
+ if (a.tableTotalsRequest !== void 0) {
1623
+ if (!a.tableTotalsRequest || typeof a.tableTotalsRequest != "object" || Array.isArray(a.tableTotalsRequest))
1624
+ throw new S(`${r}tableTotalsRequest must be an object`, "tableTotalsRequest");
1625
+ i.tableTotalsRequest = a.tableTotalsRequest;
1626
+ }
1627
+ return i;
1628
+ }
1629
+ function oa(e, t = {}) {
1630
+ const a = k(e), r = re(t), i = (c) => new S(`${r}${c} is required`, c), o = L(a.connection_id).trim();
1631
+ if (!o) throw i("connection_id");
1632
+ const n = L(a.cardType).trim();
1633
+ if (!n) throw i("cardType");
1634
+ const s = a.resultOwner;
1635
+ if (s !== "config" && s !== "freeform" && s !== "none")
1636
+ throw i("resultOwner");
1637
+ const l = k(a.cardConfig), d = L(a.sql), p = L(a.python), h = !!t.configOptional || Object.keys(l).length > 0;
1638
+ if (s === "config" && !h) throw i("cardConfig");
1639
+ if (s === "freeform" && !d.trim()) throw i("sql");
1640
+ const y = Ee({
1641
+ hasExecutableConfig: h,
1642
+ sql: d,
1643
+ normalizedPython: p
1644
+ });
1645
+ if (s !== y)
1646
+ throw new S(
1647
+ `${r}resultOwner must match the normalized execution owner "${y}"`,
1648
+ "resultOwner"
1649
+ );
1650
+ if (s === "none") throw i("cardConfig");
1651
+ const g = k(a.cardDataSource);
1652
+ if (Object.keys(g).length === 0) throw i("cardDataSource");
1653
+ const b = Ne({
1654
+ controlValues: a.controlValues,
1655
+ controlDefinitions: a.controlDefinitions,
1656
+ cardControlDefinitions: a.cardControlDefinitions,
1657
+ controlBindings: a.controlBindings
1658
+ });
1659
+ return {
1660
+ connection_id: o,
1661
+ cardType: n,
1662
+ sql: d,
1663
+ python: p,
1664
+ resultOwner: s,
1665
+ cardConfig: l,
1666
+ cardDataSource: g,
1667
+ active_filters: Array.isArray(a.active_filters) ? a.active_filters : [],
1668
+ controlValues: b.controlValues,
1669
+ controlDefinitions: b.controlDefinitions,
1670
+ cardControlDefinitions: b.cardControlDefinitions,
1671
+ controlBindings: b.controlBindings,
1672
+ ...Lt(a, t)
1673
+ };
1674
+ }
1533
1675
  export {
1534
- fa as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
1535
- Vt as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
1536
- zt as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
1537
- qt as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
1538
- jt as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
1539
- Ht as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
1540
- Gt as CONTROL_DEFINITION_INVALID_ERROR_CODE,
1541
- Ut as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
1542
- Kt as CONTROL_REFERENCE_MISSING_ERROR_CODE,
1543
- Wt as CONTROL_VALUE_INVALID_ERROR_CODE,
1544
- Xt as CONTROL_VALUE_MISSING_ERROR_CODE,
1545
- Qt as ControlResolutionError,
1546
- Ce as DASHBOARD_AUTHORING_BREAKPOINTS,
1547
- L as DASHBOARD_AUTHORING_MAX_GENERATED_CARDS,
1548
- La as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
1549
- Fr as DASHBOARD_FILTER_OPERATIONS,
1550
- _r as DOCUMENT_KPI_SECTION_MAX_CARDS,
1551
- yr as DOCUMENT_KPI_SECTION_MAX_TILES,
1552
- Pa as DashboardFilterMappingContractError,
1553
- ha as SEMAPHOR_CARTESIAN_CHART_TYPES,
1554
- Ba as applyCardReferenceRemapping,
1555
- Lt as applyDashboardChangePlan,
1556
- Yt as applyGroupByOverride,
1557
- $a as applyLinkedClickToFilterOverrides,
1558
- Va as applyOptionDependencyOverride,
1559
- Jt as buildControlDefinitionIndex,
1560
- ma as buildDashboardCardSourceIndex,
1561
- za as buildLinkedClickToFilterOverrides,
1562
- Se as clickToFilterSettingsSchema,
1563
- Mt as compileDashboardFromPlan,
1564
- X as compileResponsiveDashboardLayouts,
1565
- qa as composeCardReferenceRemapping,
1566
- ja as createDashboardFilterBindingId,
1567
- Or as createMatrixAuthoringDraft,
1568
- Rr as createMatrixConfig,
1569
- W as dashboardAuthoringDatasetMatchesSource,
1570
- Nt as dashboardAuthoringFieldsReferToSameTarget,
1676
+ wa as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
1677
+ na as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
1678
+ ra as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
1679
+ Fa as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
1680
+ xa as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
1681
+ ka as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
1682
+ Aa as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
1683
+ Oa as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
1684
+ Ra as CONTROL_DEFINITION_INVALID_ERROR_CODE,
1685
+ Ea as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
1686
+ Na as CONTROL_REFERENCE_MISSING_ERROR_CODE,
1687
+ Ma as CONTROL_VALUE_INVALID_ERROR_CODE,
1688
+ Pa as CONTROL_VALUE_MISSING_ERROR_CODE,
1689
+ S as CardQueryRequestError,
1690
+ $a as ControlResolutionError,
1691
+ xe as DASHBOARD_AUTHORING_BREAKPOINTS,
1692
+ B as DASHBOARD_AUTHORING_MAX_GENERATED_CARDS,
1693
+ xr as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
1694
+ on as DASHBOARD_FILTER_OPERATIONS,
1695
+ Jr as DOCUMENT_KPI_SECTION_MAX_CARDS,
1696
+ Zr as DOCUMENT_KPI_SECTION_MAX_TILES,
1697
+ kr as DashboardFilterMappingContractError,
1698
+ La as ExecutionControlContractError,
1699
+ ca as NEW_CARD_TYPE,
1700
+ Ba as SEMAPHOR_CARTESIAN_CHART_TYPES,
1701
+ la as applyCardReferenceRemapping,
1702
+ ta as applyDashboardChangePlan,
1703
+ ua as applyDashboardOperations,
1704
+ Ar as applyGroupByOverride,
1705
+ fa as applyLinkedClickToFilterOverrides,
1706
+ Or as applyOptionDependencyOverride,
1707
+ qa as buildControlDefinitionIndex,
1708
+ Va as buildDashboardCardSourceIndex,
1709
+ pa as buildLinkedClickToFilterOverrides,
1710
+ ke as clickToFilterSettingsSchema,
1711
+ ea as compileDashboardFromPlan,
1712
+ Z as compileResponsiveDashboardLayouts,
1713
+ ma as composeCardReferenceRemapping,
1714
+ za as controlBindingExecutionSchema,
1715
+ ja as controlDefinitionExecutionSchema,
1716
+ Rr as createDashboardFilterBindingId,
1717
+ un as createMatrixAuthoringDraft,
1718
+ fn as createMatrixConfig,
1719
+ ha as createNewCard,
1720
+ J as dashboardAuthoringDatasetMatchesSource,
1721
+ Jt as dashboardAuthoringFieldsReferToSameTarget,
1571
1722
  v as dashboardAuthoringSourceFromField,
1572
- Ot as dashboardAuthoringSourceKey,
1573
- de as dashboardAuthoringSourcesReferToSameDataset,
1574
- ga as dashboardCardFilterSourceInventoryContains,
1575
- Ha as dashboardFilterTargetMatchesLogicalValue,
1576
- kr as dashboardFilterValueTypeForDataType,
1577
- Pt as dashboardPlanFromSemaphorDashboardIntent,
1578
- ba as defaultClickToFilterSettings,
1579
- Et as findDashboardAuthoringDatasetForSource,
1580
- Ia as findDashboardCardExecutableSource,
1581
- _a as findDashboardCardPinnedCatalogSource,
1582
- ya as findDashboardSqlPinnedCatalogSource,
1583
- Zt as getCalculatedFieldAggregateOverrides,
1584
- Ga as getCalculatedFieldNamespace,
1585
- ea as getCalculatedFieldParameters,
1586
- ta as getCalculatedFieldShelfOverrides,
1587
- aa as getColumnCatalogFieldId,
1588
- Be as getDashboardAuthoringCardSource,
1589
- Ua as getDashboardFilterSubscriptionHint,
1590
- Cr as getDocumentKpiSectionShapeIssues,
1591
- Sr as getDocumentSectionCards,
1592
- ra as getDomainCalculatedSelectionOverrides,
1593
- Ca as getFieldAggregationOptions,
1594
- Ka as getMatrixBindingTargets,
1595
- Nr as getMatrixLevelLabel,
1596
- Er as getMatrixMeasureLabel,
1597
- Wa as getStableDomainCalculatedFieldId,
1598
- Sa as getTemporalBucketAuthoringOptions,
1599
- va as getTemporalBucketAuthoringSelection,
1600
- Xa as hasDashboardFilterSubscription,
1601
- wr as isDashboardFilterOperationCompatible,
1602
- A as isMaterializableDashboardAuthoringSource,
1603
- Da as isSemaphorCartesianChartType,
1604
- xe as isSemaphorSourceRef,
1605
- Ta as linkedClickToFilterOverridesSchema,
1606
- vr as listDashboardCardLocations,
1607
- Dr as mapDocumentSectionCards,
1608
- na as matrixCatalogSources,
1609
- Br as matrixDefinitionFields,
1610
- $r as matrixDefinitionSources,
1611
- ia as matrixExecutionSources,
1612
- P as mergeDashboardAuthoringSources,
1613
- Mr as mergeMatrixSorts,
1614
- Qa as moveMatrixLevel,
1615
- Fa as normalizeClickToFilterSettings,
1616
- Ya as normalizeDashboardInputs,
1617
- Ja as normalizeLegacyLinkedTargetOverrides,
1618
- Ae as preferDashboardAuthoringSourceMetadata,
1619
- Rt as preferredDashboardAuthoringSource,
1620
- ka as previewTemporalBucketAuthoringFormat,
1621
- Za as readExactDomainCalculatedFieldReference,
1622
- Vr as readMatrixCardConfig,
1623
- er as rebindDashboardOptionDependencyInputId,
1624
- tr as reconcileMatrixSpecStructure,
1625
- wa as reconcileTemporalBucketAuthoringFormat,
1626
- q as remapClickToFilterReferences,
1627
- ar as remapLinkedClickToFilterOverrides,
1628
- rr as requireNormalizedDashboardInputs,
1629
- oa as resolveBindingControlValue,
1630
- mr as resolveCanonicalDetailResultRawKey,
1631
- gr as resolveCanonicalResultOutputKey,
1632
- br as resolveCanonicalResultRawKey,
1633
- Oe as resolveDashboardAuthoringSource,
1634
- xa as resolveDashboardEntitySource,
1635
- nr as resolveDashboardFilterAutomaticTarget,
1636
- ir as resolveDashboardFilterInheritedTarget,
1637
- or as resolveDashboardOptionDependencies,
1638
- sr as resolveDashboardOptionPopulation,
1639
- dr as resolveDashboardSqlFilterTarget,
1640
- sa as resolveGroupByFieldTarget,
1641
- da as resolveMatrixControlBindings,
1642
- Lr as resolveMatrixDefinition,
1643
- ca as resolveMetricFieldTarget,
1644
- la as resolveScalarMappedValue,
1645
- Aa as resolveTemporalBucketAuthoringFormat,
1646
- Oa as resolveTemporalResultOwner,
1647
- ve as respondsToSelectionsSchema,
1648
- cr as retainMatrixConditionalFormatting,
1649
- lr as selectDashboardOptionDependencyInputIds,
1650
- Ra as selectionFieldFromExplorerField,
1651
- ur as stripInstanceTargetsForLibrarySave,
1652
- Na as supportsCanonicalDashboardTemporalResult,
1653
- Ea as transformComparisonDocument,
1654
- pr as updateMatrixConfig,
1655
- ua as validateControlValue,
1656
- $e as validateDashboardAuthoringDatasetScope,
1657
- qe as validateDashboardChangePlan,
1658
- xr as validateDashboardFilterValues,
1659
- ze as validateDashboardPlan,
1660
- fr as withDashboardOptionDependencyOverride
1723
+ Xt as dashboardAuthoringSourceKey,
1724
+ pe as dashboardAuthoringSourcesReferToSameDataset,
1725
+ Ua as dashboardCardFilterSourceInventoryContains,
1726
+ Er as dashboardFilterTargetMatchesLogicalValue,
1727
+ sn as dashboardFilterValueTypeForDataType,
1728
+ aa as dashboardPlanFromSemaphorDashboardIntent,
1729
+ Ga as defaultClickToFilterSettings,
1730
+ Zt as findDashboardAuthoringDatasetForSource,
1731
+ Ha as findDashboardCardExecutableSource,
1732
+ Wa as findDashboardCardPinnedCatalogSource,
1733
+ Ka as findDashboardSqlPinnedCatalogSource,
1734
+ Re as formatResolvedPrimaryDateFieldIssues,
1735
+ ga as getCalculatedFieldAggregateOverrides,
1736
+ Qa as getCalculatedFieldNamespace,
1737
+ ba as getCalculatedFieldParameters,
1738
+ Ia as getCalculatedFieldShelfOverrides,
1739
+ Xa as getColumnCatalogFieldId,
1740
+ Je as getDashboardAuthoringCardSource,
1741
+ Ca as getDashboardFilterSubscriptionHint,
1742
+ en as getDocumentKpiSectionShapeIssues,
1743
+ tn as getDocumentSectionCards,
1744
+ ya as getDomainCalculatedSelectionOverrides,
1745
+ Ya as getFieldAggregationOptions,
1746
+ Ja as getMatrixBindingTargets,
1747
+ pn as getMatrixLevelLabel,
1748
+ mn as getMatrixMeasureLabel,
1749
+ Za as getStableDomainCalculatedFieldId,
1750
+ er as getTemporalBucketAuthoringOptions,
1751
+ tr as getTemporalBucketAuthoringSelection,
1752
+ _a as hasDashboardFilterSubscription,
1753
+ dn as isDashboardFilterOperationCompatible,
1754
+ R as isMaterializableDashboardAuthoringSource,
1755
+ ar as isPresentationCurrencyBinding,
1756
+ rr as isSemaphorCartesianChartType,
1757
+ je as isSemaphorSourceRef,
1758
+ nr as isStructuralControlBinding,
1759
+ ir as isValidControlOptionPresentation,
1760
+ or as linkedClickToFilterOverridesSchema,
1761
+ an as listDashboardCardLocations,
1762
+ rn as mapDocumentSectionCards,
1763
+ Nr as matrixCatalogSources,
1764
+ In as matrixDefinitionFields,
1765
+ Cn as matrixDefinitionSources,
1766
+ Mr as matrixExecutionSources,
1767
+ q as mergeDashboardAuthoringSources,
1768
+ hn as mergeMatrixSorts,
1769
+ sr as moveMatrixLevel,
1770
+ dr as normalizeClickToFilterSettings,
1771
+ Pr as normalizeDashboardInputs,
1772
+ Da as normalizeLegacyLinkedTargetOverrides,
1773
+ oa as parseCardQueryRequest,
1774
+ Lt as parseCardQueryRequestContext,
1775
+ ia as parseCardQueryRequestExtras,
1776
+ cr as parseExecutionControlBindingsShallow,
1777
+ Ne as parseExecutionControlContext,
1778
+ lr as parseExecutionControlContract,
1779
+ Ue as preferDashboardAuthoringSourceMetadata,
1780
+ Yt as preferredDashboardAuthoringSource,
1781
+ ur as previewTemporalBucketAuthoringFormat,
1782
+ fr as readExactDomainCalculatedFieldReference,
1783
+ yn as readMatrixCardConfig,
1784
+ $r as rebindDashboardOptionDependencyInputId,
1785
+ pr as reconcileMatrixSpecStructure,
1786
+ mr as reconcileTemporalBucketAuthoringFormat,
1787
+ H as remapClickToFilterReferences,
1788
+ Sa as remapLinkedClickToFilterOverrides,
1789
+ Lr as requireNormalizedDashboardInputs,
1790
+ hr as resolveBindingControlValue,
1791
+ Kr as resolveCanonicalDetailResultRawKey,
1792
+ Qr as resolveCanonicalResultOutputKey,
1793
+ Xr as resolveCanonicalResultRawKey,
1794
+ Ge as resolveDashboardAuthoringSource,
1795
+ gr as resolveDashboardEntitySource,
1796
+ Br as resolveDashboardFilterAutomaticTarget,
1797
+ qr as resolveDashboardFilterInheritedTarget,
1798
+ Vr as resolveDashboardOptionDependencies,
1799
+ zr as resolveDashboardOptionPopulation,
1800
+ jr as resolveDashboardSqlFilterTarget,
1801
+ br as resolveGroupByFieldTarget,
1802
+ Ur as resolveMatrixControlBindings,
1803
+ gn as resolveMatrixDefinition,
1804
+ Ir as resolveMetricFieldTarget,
1805
+ Cr as resolveScalarMappedValue,
1806
+ yr as resolveTemporalBucketAuthoringFormat,
1807
+ Ee as resolveTemporalResultOwner,
1808
+ Ae as respondsToSelectionsSchema,
1809
+ _r as retainMatrixConditionalFormatting,
1810
+ Gr as selectDashboardOptionDependencyInputIds,
1811
+ Dr as selectionFieldFromExplorerField,
1812
+ va as stripInstanceTargetsForLibrarySave,
1813
+ Sr as supportsCanonicalDashboardTemporalResult,
1814
+ vr as transformComparisonDocument,
1815
+ Tr as updateMatrixConfig,
1816
+ wr as validateControlValue,
1817
+ Ze as validateDashboardAuthoringDatasetScope,
1818
+ at as validateDashboardChangePlan,
1819
+ cn as validateDashboardFilterValues,
1820
+ tt as validateDashboardPlan,
1821
+ Oe as validateResolvedPrimaryDateFieldShape,
1822
+ Hr as withDashboardOptionDependencyOverride
1661
1823
  };