react-semaphor 0.1.540 → 0.1.542

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 (118) hide show
  1. package/dist/analytics-protocol/index.js +75 -75
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +3 -3
  4. package/dist/briefings/index.js +50 -45
  5. package/dist/chunks/apply-dashboard-operations-Btbp2-6v.js +2260 -0
  6. package/dist/chunks/{assistant-chat-ya7xopaC.js → assistant-chat-oHF5lTjA.js} +12 -12
  7. package/dist/chunks/bookmark-state-CXw7lZ50.js +118 -0
  8. package/dist/chunks/{calendar-day-equality-Bpl15IBo.js → calendar-day-equality-BmJAWduY.js} +180 -207
  9. package/dist/chunks/comparison-window-caption-ChIyd_-L.js +1618 -0
  10. package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
  11. package/dist/chunks/{dashboard-briefing-launcher-DJI-zfEq.js → dashboard-briefing-launcher-B-cm719R.js} +18 -18
  12. package/dist/chunks/{dashboard-controls-Dh7HqoKy.js → dashboard-controls-CIn22Qgp.js} +69 -70
  13. package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
  14. package/dist/chunks/{dashboard-json-BnmlB71h.js → dashboard-json-ZUYsIExq.js} +4 -4
  15. package/dist/chunks/{dashboard-B6Bithfl.js → dashboard-s5WJBcK8.js} +1 -1
  16. package/dist/chunks/{document-dashboard-inputs-BrYYlRVo.js → document-dashboard-inputs-C6MJVyoI.js} +2357 -4948
  17. package/dist/chunks/document-sheet-utils-BsZUnHRl.js +3619 -0
  18. package/dist/chunks/{edit-dashboard-visual-CydOkSko.js → edit-dashboard-visual-DLdereA7.js} +728 -728
  19. package/dist/chunks/{filter-value-text-BhWugPWE.js → filter-value-text-CYsVYPuD.js} +18 -19
  20. package/dist/chunks/index-CV5rHq5D.js +2673 -0
  21. package/dist/chunks/{matrix-analytical-definition-bcprSe4u.js → matrix-analytical-definition-C7Gb0e12.js} +1 -1
  22. package/dist/chunks/{matrix-card-CJn1hB5V.js → matrix-card-DjwWcCo8.js} +2 -2
  23. package/dist/chunks/{matrix-formatter-DQ8avoIQ.js → matrix-formatter-BnsTX90d.js} +430 -417
  24. package/dist/chunks/{matrix-member-presentation-BNPSDKBG.js → matrix-member-presentation-CQGdVks6.js} +1 -1
  25. package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js} +65 -65
  26. package/dist/chunks/metric-comparison-DEwi9uc2.js +498 -0
  27. package/dist/chunks/numeric-presentation-BSAqPpHt.js +5227 -0
  28. package/dist/chunks/{pivot-header-presentation-MkcKnjn3.js → pivot-header-presentation-DHcx1XGQ.js} +1 -1
  29. package/dist/chunks/{pivot-result-identity-D6hhcRXi.js → pivot-result-identity-DJhXXcns.js} +1 -1
  30. package/dist/chunks/pivot-result-lifecycle-BBlAfBA0.js +1155 -0
  31. package/dist/chunks/raw-temporal-presentation-CZ2r0Vb_.js +585 -0
  32. package/dist/chunks/{report-preferences-dialog-neMDolLg.js → report-preferences-dialog-MRUWpMcJ.js} +75 -75
  33. package/dist/chunks/{report-runtime-context-B984Nq1E.js → report-runtime-context-Dq8XyODK.js} +1 -1
  34. package/dist/chunks/{saved-dashboard-context-CCrLpfSQ.js → saved-dashboard-context-DjPqgFly.js} +233 -206
  35. package/dist/chunks/{selection-reducer-vKIb_jS6.js → selection-reducer-Dj_8xD69.js} +1 -1
  36. package/dist/chunks/{semaphor-ready-indicator--4DWtVBu.js → semaphor-ready-indicator-BWSpRsPj.js} +38555 -40449
  37. package/dist/chunks/{shelf-drop-preview-context-CpdB5ois.js → shelf-drop-preview-context-CQbFLm3q.js} +6 -6
  38. package/dist/chunks/sort-target-MT1WK1vX.js +29 -0
  39. package/dist/chunks/{source-entity-resolution-CVA1a85c.js → source-entity-resolution-BYn9giz3.js} +1 -1
  40. package/dist/chunks/{switch-DWEWiv1J.js → switch-C3jLxlG0.js} +2 -2
  41. package/dist/chunks/table-export-sheet-BHSnuZHd.js +949 -0
  42. package/dist/chunks/table-settings-CLZocegs.js +501 -0
  43. package/dist/chunks/temporal-bucket-D7NBrrtL.js +2071 -0
  44. package/dist/chunks/{token-types-bxUxXDX2.js → token-types-DBbZVQsm.js} +1 -1
  45. package/dist/chunks/{use-create-flow-overlay-state-8g6Zhphh.js → use-create-flow-overlay-state-BJDNqdOh.js} +151 -151
  46. package/dist/chunks/{validators-Ej1DdCXa.js → validators-DMHTpf7a.js} +73 -73
  47. package/dist/dashboard/index.js +2 -2
  48. package/dist/dashboard-authoring/index.js +399 -380
  49. package/dist/data-app-sdk/index.js +5 -5
  50. package/dist/data-app-sdk-adapters/index.js +2 -2
  51. package/dist/data-app-sdk-validation/index.js +9 -9
  52. package/dist/format-utils/index.js +346 -238
  53. package/dist/index.js +174 -175
  54. package/dist/pdf-export-policy/index.js +20 -10
  55. package/dist/report-runtime-context/index.js +1 -1
  56. package/dist/surfboard/index.js +2 -2
  57. package/dist/types/briefings/attachment-outcomes.d.ts +23 -0
  58. package/dist/types/briefings/attachments.d.ts +17 -1
  59. package/dist/types/briefings/index.d.ts +6 -3
  60. package/dist/types/index.js +48 -48
  61. package/dist/types/lib/api/exports-api.d.ts +11 -65
  62. package/dist/types/lib/dashboard-inputs/control-contract-overrides.d.ts +17 -0
  63. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +2 -0
  64. package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
  65. package/dist/types/lib/hooks/use-dashboard.d.ts +3 -6
  66. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +8 -2
  67. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +8 -6
  68. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +50 -0
  69. package/dist/types/lib/query-context/card-server-request.d.ts +5 -1
  70. package/dist/types/lib/types/common-types.d.ts +7 -0
  71. package/dist/types/lib/types/explorer-types.d.ts +8 -2
  72. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +3 -3
  73. package/dist/types/shared/assistant-context/index.d.ts +1 -1
  74. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +23 -6
  75. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +173 -0
  76. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +20 -0
  77. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  78. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +4 -3
  79. package/dist/types/shared/format-utils/attachment-filter-line.d.ts +14 -0
  80. package/dist/types/shared/format-utils/exporters/export-cells.d.ts +90 -0
  81. package/dist/types/shared/format-utils/exporters/export-file-format.d.ts +44 -0
  82. package/dist/types/shared/format-utils/exporters/index.d.ts +6 -0
  83. package/dist/types/shared/format-utils/exporters/xlsx-file.d.ts +90 -0
  84. package/dist/types/shared/format-utils/filter-line.d.ts +7 -0
  85. package/dist/types/shared/format-utils/formatters/date-formatter.d.ts +8 -12
  86. package/dist/types/shared/format-utils/formatters/index.d.ts +1 -1
  87. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +2 -0
  88. package/dist/types/shared/format-utils/index.d.ts +3 -0
  89. package/dist/types/shared/format-utils/matrix-continuation.d.ts +55 -9
  90. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +21 -1
  91. package/dist/types/shared/format-utils/matrix-export-xlsx.d.ts +27 -0
  92. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +9 -0
  93. package/dist/types/shared/format-utils/presentation-execution.d.ts +27 -2
  94. package/dist/types/shared/format-utils/raw-temporal.d.ts +8 -0
  95. package/dist/types/shared/format-utils/table-export/index.d.ts +8 -0
  96. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +50 -0
  97. package/dist/types/shared/format-utils/table-export/table-export-formatting.d.ts +47 -0
  98. package/dist/types/shared/format-utils/table-export/table-export-raw-temporal.d.ts +40 -0
  99. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +31 -0
  100. package/dist/types/shared/format-utils/table-export/table-export-sheet.d.ts +38 -0
  101. package/dist/types/shared/format-utils/temporal-bucket.d.ts +9 -0
  102. package/package.json +2 -1
  103. package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +0 -979
  104. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +0 -402
  105. package/dist/chunks/bookmark-state-k7y5SNGf.js +0 -331
  106. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +0 -2161
  107. package/dist/chunks/canonical-result-keys-CEQefvdO.js +0 -33
  108. package/dist/chunks/common-types-CUf03Htv.js +0 -288
  109. package/dist/chunks/csv-utils-GUfKyT1J.js +0 -56
  110. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +0 -3288
  111. package/dist/chunks/document-sheet-utils-C1eEldxs.js +0 -1076
  112. package/dist/chunks/index-CqMiAkay.js +0 -3164
  113. package/dist/chunks/matrix-definition-DQDI2okF.js +0 -206
  114. package/dist/chunks/metric-comparison-CojWeLqx.js +0 -392
  115. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +0 -804
  116. package/dist/chunks/raw-temporal-D61lr48Y.js +0 -1464
  117. package/dist/chunks/temporal-bucket-D8JF7zKz.js +0 -575
  118. package/dist/chunks/temporal-bucket-contract-DaOajRC7.js +0 -108
@@ -1,25 +1,25 @@
1
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";
2
+ var xe = (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) => xe(e, typeof t != "symbol" ? t + "" : t, a);
4
+ import { D as B, a as Fe, r as H } from "../chunks/apply-dashboard-operations-Btbp2-6v.js";
5
+ import { N as ca, b as la, u as ua, e as fa, j as pa, l as ma, k as ha, f as ga, i as ba, c as Ia, t as Ca, m as ya, o as _a, q as Da, g as Sa, p as va, h as Ta, n as wa, d as xa, s as Fa } from "../chunks/apply-dashboard-operations-Btbp2-6v.js";
6
+ import { c as ke, a as Ae, v as Oe, f as Re, d as Ee, p as Ne } from "../chunks/numeric-presentation-BSAqPpHt.js";
7
+ import { A as Aa, Q as Oa, R as Ra, T as Ea, N as Na, O as Ma, P as Pa, J as $a, K as La, M as Ba, L as qa, U as Va, a4 as za, S as ja, V as Ua, b as Ga, a3 as Ha, a2 as Wa, o as Ka, x as Qa, q as Ya, u as Xa, w as Ja, a7 as Za, I as er, H as tr, C as ar, a8 as rr, h as nr, j as ir, $ as or, i as sr, a0 as dr, a1 as cr, B as lr, D as ur, z as fr, a5 as pr, a6 as mr, e as hr, a9 as gr, F as br, l as Ir, X as Cr, m as yr, Z as _r, _ as Dr, Y as Sr, k as vr, E as Tr, y as wr, s as xr, t as Fr, G as kr, W as Ar } from "../chunks/numeric-presentation-BSAqPpHt.js";
8
+ import { q as Me, A as X, au as Pe, B as fe, l as $e, ag as Le } from "../chunks/validators-DMHTpf7a.js";
9
+ import "../chunks/matrix-operation-contract-8OIO4gob.js";
10
10
  import "../chunks/analytics-base-schemas-BFAoRlkU.js";
11
11
  import "zod";
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";
12
+ import { m as j } from "../chunks/document-sheet-utils-BsZUnHRl.js";
13
+ import { p as Rr, D as Er, l as Nr, v as Mr, b as Pr, k as $r, g as Lr, d as Br, f as qr, n as Vr, u as zr, j as jr, r as Ur, h as Gr, q as Hr, s as Wr, i as Kr, o as Qr, t as Yr, w as Xr } from "../chunks/document-sheet-utils-BsZUnHRl.js";
14
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) {
15
+ import { a as Zr, b as en, r as tn } from "../chunks/raw-temporal-presentation-CZ2r0Vb_.js";
16
+ import { D as rn, w as nn, z as on, x as sn, v as dn, y as cn } from "../chunks/table-settings-CLZocegs.js";
17
+ import { D as un, d as fn, i as pn, v as mn } from "../chunks/dashboard-filter-value-compatibility-CwQ_iSNb.js";
18
+ import { $ as gn, _ as bn, Y as In, Z as Cn, a0 as yn, a1 as _n } from "../chunks/pivot-result-lifecycle-BBlAfBA0.js";
19
+ import { e as qe, w as Ve } from "../chunks/metric-comparison-DEwi9uc2.js";
20
+ import { p as ze } from "../chunks/report-runtime-context-Dq8XyODK.js";
21
+ import { m as Sn, a as vn, r as Tn } from "../chunks/matrix-card-DjwWcCo8.js";
22
+ function S(e) {
23
23
  return e && typeof e == "object" ? e : null;
24
24
  }
25
25
  function T(e) {
@@ -27,16 +27,16 @@ function T(e) {
27
27
  }
28
28
  function je(e) {
29
29
  var t, a, r;
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");
30
+ return !!(e && typeof e == "object") && (((t = S(e)) == null ? void 0 : t.kind) === "semantic" || ((a = S(e)) == null ? void 0 : a.kind) === "physical" || ((r = S(e)) == null ? void 0 : r.kind) === "sql");
31
31
  }
32
32
  function R(e) {
33
33
  return je(e) ? e.kind === "semantic" ? !!(e.domainId && e.datasetName) : e.kind === "physical" ? !!(e.connectionId && e.tableName) : !1 : !1;
34
34
  }
35
- function Xt(e) {
35
+ function Yt(e) {
36
36
  return Me(e);
37
37
  }
38
38
  function pe(e, t) {
39
- return Y(e, t);
39
+ return X(e, t);
40
40
  }
41
41
  function Ue(e, t) {
42
42
  return Pe(e, t);
@@ -45,7 +45,7 @@ function q(e) {
45
45
  const t = [];
46
46
  for (const a of e) {
47
47
  const r = t.findIndex(
48
- (i) => pe(i, a)
48
+ (n) => pe(n, a)
49
49
  );
50
50
  r === -1 ? t.push(a) : t[r] = Ue(
51
51
  t[r],
@@ -54,11 +54,11 @@ function q(e) {
54
54
  }
55
55
  return t;
56
56
  }
57
- function Yt(e) {
57
+ function Xt(e) {
58
58
  return q(e)[0];
59
59
  }
60
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 };
61
+ return e.kind !== "semantic" || e.connectionId || (t == null ? void 0 : t.kind) !== "semantic" || !X(e, t) || !t.connectionId ? e : { ...e, connectionId: t.connectionId };
62
62
  }
63
63
  function K(e) {
64
64
  return R(e) ? e : void 0;
@@ -66,7 +66,7 @@ function K(e) {
66
66
  function le(e, t) {
67
67
  if (!(e.kind !== "semantic" || e.connectionId))
68
68
  return t.find(
69
- (a) => (a == null ? void 0 : a.kind) === "semantic" && Y(e, a) && !!a.connectionId
69
+ (a) => (a == null ? void 0 : a.kind) === "semantic" && X(e, a) && !!a.connectionId
70
70
  );
71
71
  }
72
72
  function v(e, t) {
@@ -79,17 +79,17 @@ function Ge({
79
79
  defaultSource: a,
80
80
  fallbackSources: r
81
81
  }) {
82
- const i = [a, ...r || []], o = K(e), n = o ? W(
83
- o,
84
- le(o, i)
82
+ const n = [a, ...r || []], i = K(e), o = i ? W(
83
+ i,
84
+ le(i, n)
85
85
  ) : void 0;
86
- if (n)
87
- return n;
86
+ if (o)
87
+ return o;
88
88
  if (e !== void 0)
89
89
  return;
90
90
  const s = v(t, a), l = s ? W(
91
91
  s,
92
- le(s, i)
92
+ le(s, n)
93
93
  ) : void 0;
94
94
  if (l)
95
95
  return l;
@@ -102,37 +102,37 @@ function Jt(e, t) {
102
102
  const a = v(e), r = v(t);
103
103
  return !a || !r ? !0 : pe(a, r);
104
104
  }
105
- function x(e) {
105
+ function k(e) {
106
106
  var t;
107
- return T((t = D(e)) == null ? void 0 : t.kind);
107
+ return T((t = S(e)) == null ? void 0 : t.kind);
108
108
  }
109
109
  function me(e) {
110
110
  var t, a;
111
- return x(e) !== "semantic" ? null : ((a = T((t = D(e)) == null ? void 0 : t.domainId)) == null ? void 0 : a.trim()) || null;
111
+ return k(e) !== "semantic" ? null : ((a = T((t = S(e)) == null ? void 0 : t.domainId)) == null ? void 0 : a.trim()) || null;
112
112
  }
113
113
  function He(e) {
114
114
  var t;
115
- return x(e) !== "semantic" ? null : T((t = D(e)) == null ? void 0 : t.datasetName);
115
+ return k(e) !== "semantic" ? null : T((t = S(e)) == null ? void 0 : t.datasetName);
116
116
  }
117
117
  function We(e) {
118
118
  var t;
119
- return x(e) !== "semantic" ? null : T((t = D(e)) == null ? void 0 : t.datasetId);
119
+ return k(e) !== "semantic" ? null : T((t = S(e)) == null ? void 0 : t.datasetId);
120
120
  }
121
121
  function Ke(e) {
122
122
  var t;
123
- return x(e) !== "physical" ? null : T((t = D(e)) == null ? void 0 : t.connectionId);
123
+ return k(e) !== "physical" ? null : T((t = S(e)) == null ? void 0 : t.connectionId);
124
124
  }
125
125
  function Qe(e) {
126
126
  var t;
127
- return x(e) !== "physical" ? null : T((t = D(e)) == null ? void 0 : t.tableName);
127
+ return k(e) !== "physical" ? null : T((t = S(e)) == null ? void 0 : t.tableName);
128
128
  }
129
- function Xe(e) {
129
+ function Ye(e) {
130
130
  var t;
131
- return x(e) !== "physical" ? "" : T((t = D(e)) == null ? void 0 : t.databaseName) || "";
131
+ return k(e) !== "physical" ? "" : T((t = S(e)) == null ? void 0 : t.databaseName) || "";
132
132
  }
133
- function Ye(e) {
133
+ function Xe(e) {
134
134
  var t;
135
- return x(e) !== "physical" ? "" : T((t = D(e)) == null ? void 0 : t.schemaName) || "";
135
+ return k(e) !== "physical" ? "" : T((t = S(e)) == null ? void 0 : t.schemaName) || "";
136
136
  }
137
137
  function Je(e) {
138
138
  if (e.analyticsIntent && typeof e.analyticsIntent == "object" && "source" in e.analyticsIntent)
@@ -147,7 +147,7 @@ function Ze({
147
147
  if (e.length <= 1)
148
148
  return { ok: !0 };
149
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 };
150
+ return a.some((n) => !n) || r.size !== 1 ? { ok: !1, issue: "invalid_multi_dataset_scope" } : { ok: !0 };
151
151
  }
152
152
  function J(e, t) {
153
153
  if (!t)
@@ -156,7 +156,7 @@ function J(e, t) {
156
156
  const a = We(e);
157
157
  return me(e) === t.domainId ? a && t.datasetId ? a === t.datasetId : He(e) === t.datasetName : !1;
158
158
  }
159
- return t.kind === "physical" ? Ke(e) === t.connectionId && Qe(e) === t.tableName && Xe(e) === (t.databaseName || "") && Ye(e) === (t.schemaName || "") : !1;
159
+ return t.kind === "physical" ? Ke(e) === t.connectionId && Qe(e) === t.tableName && Ye(e) === (t.databaseName || "") && Xe(e) === (t.schemaName || "") : !1;
160
160
  }
161
161
  function Zt(e, t) {
162
162
  return e.find(
@@ -195,7 +195,7 @@ function he({
195
195
  );
196
196
  return;
197
197
  }
198
- t.some((i) => J(i, r)) || a.push(
198
+ t.some((n) => J(n, r)) || a.push(
199
199
  f(
200
200
  "invalid_card_analytics_source",
201
201
  "Dashboard cards with an explicit analytics source must use one of the selected datasets.",
@@ -227,14 +227,14 @@ function et(e) {
227
227
  e.primaryMeasure,
228
228
  e.dateField,
229
229
  ...U(e.dimensions),
230
- ...ue(e.filters).map((i) => i.field)
230
+ ...ue(e.filters).map((n) => n.field)
231
231
  ])
232
232
  ) : e.kind === "records" ? t.push(
233
233
  ...P([
234
234
  ...U(e.fields),
235
235
  e.dateField,
236
236
  (a = e.orderBy) == null ? void 0 : a.field,
237
- ...ue(e.filters).map((i) => i.field)
237
+ ...ue(e.filters).map((n) => n.field)
238
238
  ])
239
239
  ) : e.kind === "inputOptions" ? (((r = e.population) == null ? void 0 : r.kind) === "related_population" && t.push(e.population.baseSource), t.push(
240
240
  ...P([
@@ -253,7 +253,7 @@ function ge({
253
253
  if (e.type !== "text") {
254
254
  for (const r of et(e.analyticsIntent))
255
255
  if (r && !t.some(
256
- (i) => J(i, r)
256
+ (n) => J(n, r)
257
257
  )) {
258
258
  a.push(
259
259
  f(
@@ -362,18 +362,18 @@ function tt(e) {
362
362
  };
363
363
  const a = e, r = [...a.warnings || []];
364
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(
365
+ const n = Array.isArray(a.datasets) ? a.datasets : [], i = Array.isArray(a.sheets) ? a.sheets : [];
366
+ Ie({ datasets: n, errors: t, requireAtLeastOne: !0 }), i.length !== 1 && t.push(
367
367
  f(
368
368
  "invalid_sheet_count",
369
369
  "MVP dashboard authoring creates exactly one dashboard sheet."
370
370
  )
371
371
  );
372
- const n = o[0];
373
- n && n.kind !== "dashboard" && t.push(
372
+ const o = i[0];
373
+ o && o.kind !== "dashboard" && t.push(
374
374
  f("invalid_sheet_kind", 'Generated sheet must use kind "dashboard".')
375
375
  );
376
- const s = (n == null ? void 0 : n.cards) || [];
376
+ const s = (o == null ? void 0 : o.cards) || [];
377
377
  s.length > B && t.push(
378
378
  f(
379
379
  "too_many_cards",
@@ -404,7 +404,7 @@ function tt(e) {
404
404
  "Non-text card has no analytics intent and may be skipped by the app layer.",
405
405
  u.id
406
406
  )
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 });
407
+ ), he({ card: u, datasets: n, errors: t }), be({ card: u, errors: t }), ge({ card: u, datasets: n, errors: t }), Q({ card: u, errors: t });
408
408
  const p = Array.isArray(a.filterInputs) ? a.filterInputs : [], h = p.map((u) => u.id), y = M(h);
409
409
  y && t.push(
410
410
  f(
@@ -432,7 +432,7 @@ function tt(e) {
432
432
  return { ok: t.length === 0, errors: t, warnings: r };
433
433
  }
434
434
  function at(e) {
435
- var n;
435
+ var o;
436
436
  const t = [];
437
437
  if (!e || typeof e != "object")
438
438
  return {
@@ -448,12 +448,12 @@ function at(e) {
448
448
  const a = e, r = [...a.warnings || []];
449
449
  a.version !== 1 && t.push(
450
450
  f("invalid_version", "Dashboard change plan version must be 1.")
451
- ), (n = a.dashboardId) != null && n.trim() || t.push(
451
+ ), (o = a.dashboardId) != null && o.trim() || t.push(
452
452
  f("missing_dashboard_id", "Dashboard change plan needs a dashboard id.")
453
453
  );
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) {
454
+ const n = Array.isArray(a.datasets) ? a.datasets : [], i = Array.isArray(a.operations) ? a.operations : [];
455
+ Ie({ datasets: n, errors: t, requireAtLeastOne: !1 });
456
+ for (const s of i) {
457
457
  if (s.kind === "unsupported") {
458
458
  r.push(
459
459
  f("unsupported_operation", s.reason || s.requestedAction)
@@ -468,14 +468,14 @@ function at(e) {
468
468
  )
469
469
  ), s.kind === "addCard" && (he({
470
470
  card: s.card,
471
- datasets: i,
471
+ datasets: n,
472
472
  errors: t
473
473
  }), be({
474
474
  card: s.card,
475
475
  errors: t
476
476
  }), ge({
477
477
  card: s.card,
478
- datasets: i,
478
+ datasets: n,
479
479
  errors: t
480
480
  }), Q({ card: s.card, errors: t })), s.kind === "updateCardSelectionSettings") {
481
481
  const l = s.card;
@@ -515,26 +515,26 @@ const rt = {
515
515
  xxs: 6
516
516
  };
517
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);
518
+ let a = 0, r = 0, n = 0;
519
+ return e.map((i) => {
520
+ const o = Math.min(i.w, t);
521
+ a > 0 && a + o > t && (a = 0, r += n, n = 0);
522
522
  const s = {
523
- i: o.frameId,
523
+ i: i.frameId,
524
524
  x: a,
525
525
  y: r,
526
- w: n,
527
- h: o.h,
528
- minW: Math.min(o.minW, t),
529
- minH: o.minH,
526
+ w: o,
527
+ h: i.h,
528
+ minW: Math.min(i.minW, t),
529
+ minH: i.minH,
530
530
  static: !1
531
531
  };
532
- return a += n, i = Math.max(i, o.h), s;
532
+ return a += o, n = Math.max(n, i.h), s;
533
533
  });
534
534
  }
535
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 };
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"), n = t.filter((l) => l.role === "table"), i = t.filter((l) => l.role === "text"), o = i.slice(0, 1), s = i.slice(o.length);
537
+ return { kpis: a, introText: o, charts: r, tables: n, supportingText: s };
538
538
  }
539
539
  function ot(e, t, a) {
540
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;
@@ -543,50 +543,50 @@ function st(e, t, a, r) {
543
543
  return a === "xxs" || a === "xs" || a === "sm" || a === "md" || t === 1 || t % 2 === 1 && e === 0 ? r : r / 2;
544
544
  }
545
545
  function dt(e) {
546
- const { item: t, band: a, index: r, bandCount: i, breakpoint: o, columns: n } = e;
546
+ const { item: t, band: a, index: r, bandCount: n, breakpoint: i, columns: o } = e;
547
547
  return a === "kpi" ? {
548
548
  ...t,
549
549
  band: a,
550
- w: ot(i, o, n),
550
+ w: ot(n, i, o),
551
551
  h: 15,
552
- minW: Math.min(6, n),
552
+ minW: Math.min(6, o),
553
553
  minH: 12
554
554
  } : a === "table" ? {
555
555
  ...t,
556
556
  band: a,
557
- w: n,
558
- h: o === "xxs" || o === "xs" ? 34 : 38,
559
- minW: Math.min(12, n),
557
+ w: o,
558
+ h: i === "xxs" || i === "xs" ? 34 : 38,
559
+ minW: Math.min(12, o),
560
560
  minH: 18
561
561
  } : a === "introText" ? {
562
562
  ...t,
563
563
  band: a,
564
- w: n,
565
- h: o === "xxs" || o === "xs" ? 12 : 10,
566
- minW: Math.min(12, n),
564
+ w: o,
565
+ h: i === "xxs" || i === "xs" ? 12 : 10,
566
+ minW: Math.min(12, o),
567
567
  minH: 8
568
568
  } : a === "supportingText" ? {
569
569
  ...t,
570
570
  band: a,
571
- w: o === "lg" ? n / 2 : n,
572
- h: o === "xxs" || o === "xs" ? 12 : 10,
573
- minW: Math.min(12, n),
571
+ w: i === "lg" ? o / 2 : o,
572
+ h: i === "xxs" || i === "xs" ? 12 : 10,
573
+ minW: Math.min(12, o),
574
574
  minH: 8
575
575
  } : {
576
576
  ...t,
577
577
  band: a,
578
- w: st(r, i, o, n),
579
- h: o === "xxs" || o === "xs" ? 28 : 30,
580
- minW: Math.min(12, n),
578
+ w: st(r, n, i, o),
579
+ h: i === "xxs" || i === "xs" ? 28 : 30,
580
+ minW: Math.min(12, o),
581
581
  minH: 16
582
582
  };
583
583
  }
584
584
  function A(e, t, a, r) {
585
585
  return e.map(
586
- (i, o) => dt({
587
- item: i,
586
+ (n, i) => dt({
587
+ item: n,
588
588
  band: t,
589
- index: o,
589
+ index: i,
590
590
  bandCount: e.length,
591
591
  breakpoint: a,
592
592
  columns: r
@@ -596,15 +596,15 @@ function A(e, t, a, r) {
596
596
  function Z(e) {
597
597
  const t = it(e);
598
598
  return Object.fromEntries(
599
- xe.map((a) => {
600
- const r = rt[a], i = [
599
+ Fe.map((a) => {
600
+ const r = rt[a], n = [
601
601
  ...A(t.introText, "introText", a, r),
602
602
  ...A(t.kpis, "kpi", a, r),
603
603
  ...A(t.charts, "chart", a, r),
604
604
  ...A(t.tables, "table", a, r),
605
605
  ...A(t.supportingText, "supportingText", a, r)
606
606
  ];
607
- return [a, nt(i, r)];
607
+ return [a, nt(n, r)];
608
608
  })
609
609
  );
610
610
  }
@@ -660,8 +660,8 @@ function ee(e, t) {
660
660
  semanticContext: e.semanticContext
661
661
  }
662
662
  });
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))
663
+ const n = Array.isArray(t) ? t : [t], i = a === "date" ? pt(n) : ft(n);
664
+ if (i.length !== 0 && !((r === "between" || r === "not between") && i.length < 2))
665
665
  return j({
666
666
  definition: e,
667
667
  value: {
@@ -669,7 +669,7 @@ function ee(e, t) {
669
669
  name: e.column,
670
670
  operation: r,
671
671
  valueType: a,
672
- values: o,
672
+ values: i,
673
673
  dataType: e.dataType,
674
674
  fieldMeta: e.fieldMeta,
675
675
  semanticContext: e.semanticContext
@@ -681,8 +681,8 @@ function ye(e, t, a) {
681
681
  }
682
682
  function mt(e, t, a) {
683
683
  const r = (t || []).filter(
684
- (i) => i.scope === "card" && i.targetCardId === a
685
- ).map((i) => i.field).filter(Boolean);
684
+ (n) => n.scope === "card" && n.targetCardId === a
685
+ ).map((n) => n.field).filter(Boolean);
686
686
  return r.length === 0 ? e : {
687
687
  ...e,
688
688
  calculatedFields: [
@@ -703,7 +703,7 @@ function ht(e, t, a) {
703
703
  ...t.respondsToSelections !== void 0 ? { respondsToSelections: t.respondsToSelections } : {}
704
704
  };
705
705
  }
706
- function X(e, t) {
706
+ function Y(e, t) {
707
707
  return Array.from(
708
708
  new Set(
709
709
  (e || []).map((a) => t.get(a)).filter((a) => !!a)
@@ -713,20 +713,20 @@ function X(e, t) {
713
713
  function gt(e, t) {
714
714
  if ((e == null ? void 0 : e.kind) !== "cards")
715
715
  return e;
716
- const a = X(e.cardIds, t);
716
+ const a = Y(e.cardIds, t);
717
717
  return a.length > 0 ? { ...e, cardIds: a } : null;
718
718
  }
719
719
  function bt(e, t) {
720
720
  return !e.applyToCardIds && !e.excludeCardIds ? e : {
721
721
  ...e,
722
722
  ...e.applyToCardIds ? {
723
- applyToCardIds: X(
723
+ applyToCardIds: Y(
724
724
  e.applyToCardIds,
725
725
  t
726
726
  )
727
727
  } : {},
728
728
  ...e.excludeCardIds ? {
729
- excludeCardIds: X(
729
+ excludeCardIds: Y(
730
730
  e.excludeCardIds,
731
731
  t
732
732
  )
@@ -737,20 +737,20 @@ function It(e, t) {
737
737
  const a = {}, r = [];
738
738
  return {
739
739
  inputs: (e.filterInputs || []).flatMap(
740
- (o, n) => {
741
- const s = gt(o.scope, t);
740
+ (i, o) => {
741
+ const s = gt(i.scope, t);
742
742
  if (s === null)
743
743
  return r.push(
744
744
  ye(
745
745
  "filter_input_scope_empty",
746
- `Filter input "${o.label}" was skipped because all scoped cards were skipped during query validation.`
746
+ `Filter input "${i.label}" was skipped because all scoped cards were skipped during query validation.`
747
747
  )
748
748
  ), [];
749
749
  const l = ee(
750
- o.filter,
751
- o.defaultValue
750
+ i.filter,
751
+ i.defaultValue
752
752
  );
753
- return l && (a.shared ?? (a.shared = {}), a.shared[o.id] = {
753
+ return l && (a.shared ?? (a.shared = {}), a.shared[i.id] = {
754
754
  status: "set",
755
755
  value: {
756
756
  kind: "filter",
@@ -758,18 +758,18 @@ function It(e, t) {
758
758
  }
759
759
  }), [
760
760
  {
761
- id: o.id,
761
+ id: i.id,
762
762
  kind: "filter",
763
- label: o.label,
764
- variableName: o.variableName,
763
+ label: i.label,
764
+ variableName: i.variableName,
765
765
  scope: s || { kind: "allSheets", sheetKinds: ["dashboard"] },
766
766
  runtimeScope: "shared",
767
767
  presentation: {
768
768
  placement: "toolbar",
769
- order: n
769
+ order: o
770
770
  },
771
771
  exports: ["label", "value", "start", "end", "range"],
772
- filter: bt(o.filter, t)
772
+ filter: bt(i.filter, t)
773
773
  }
774
774
  ];
775
775
  }
@@ -786,23 +786,23 @@ function ea(e) {
786
786
  t.errors.map((c) => c.message).join(`
787
787
  `) || "Dashboard plan is invalid."
788
788
  );
789
- const a = e.plan.sheets[0], r = [...t.warnings], i = [], o = new Map(
789
+ const a = e.plan.sheets[0], r = [...t.warnings], n = [], i = new Map(
790
790
  e.cardArtifacts.map((c) => [c.planCardId, c])
791
- ), n = new Map(
791
+ ), o = new Map(
792
792
  e.cardArtifacts.map((c) => [
793
793
  c.planCardId,
794
794
  c.card.id
795
795
  ])
796
796
  ), s = [];
797
797
  for (const c of a.cards) {
798
- const m = o.get(c.id);
798
+ const m = i.get(c.id);
799
799
  if (!m) {
800
800
  const u = ye(
801
801
  "missing_card_artifact",
802
802
  `Card "${c.title}" was skipped because no generated artifact was supplied.`,
803
803
  c.id
804
804
  );
805
- i.push(u);
805
+ n.push(u);
806
806
  continue;
807
807
  }
808
808
  r.push(...m.warnings || []);
@@ -813,7 +813,7 @@ function ea(e) {
813
813
  c.id
814
814
  ),
815
815
  c,
816
- n
816
+ o
817
817
  );
818
818
  s.push({
819
819
  id: c.frameId,
@@ -823,7 +823,7 @@ function ea(e) {
823
823
  }
824
824
  if (s.length === 0)
825
825
  throw new Error("Dashboard plan did not produce any persistable cards.");
826
- const { inputs: l, defaultInputValues: d, warnings: p } = It(e.plan, n);
826
+ const { inputs: l, defaultInputValues: d, warnings: p } = It(e.plan, o);
827
827
  r.push(...p);
828
828
  const h = Z(
829
829
  a.cards.filter((c) => s.some((m) => m.id === c.frameId)).map((c) => ({
@@ -853,7 +853,7 @@ function ea(e) {
853
853
  calculatedFields: (b = e.plan.calculatedFields) == null ? void 0 : b.filter((c) => c.scope === "dashboard" && c.field).map((c) => c.field),
854
854
  inputs: l,
855
855
  ...d ? { defaultInputValues: d } : {}
856
- }, warnings: r, skippedOperations: i };
856
+ }, warnings: r, skippedOperations: n };
857
857
  }
858
858
  function w(e, t, a) {
859
859
  return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
@@ -870,10 +870,10 @@ function yt(e) {
870
870
  function $(e, t) {
871
871
  var a;
872
872
  for (const r of e.sheets || [])
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 };
873
+ for (const n of r.frames || []) {
874
+ const i = (a = n.cards) == null ? void 0 : a.find((o) => o.id === t);
875
+ if (i)
876
+ return { sheet: r, frame: n, card: i };
877
877
  }
878
878
  return null;
879
879
  }
@@ -892,14 +892,14 @@ function De(e, t = /* @__PURE__ */ new Map()) {
892
892
  const a = _t(e), r = Math.max(
893
893
  a.size,
894
894
  t.size
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
895
+ ), n = (e.frames || []).map(
896
+ (i, o) => ({
897
+ frameId: i.id,
898
+ role: _e(i),
899
+ priority: t.get(i.id) ?? a.get(i.id) ?? r + o
900
900
  })
901
901
  );
902
- e.layouts = Z(i);
902
+ e.layouts = Z(n);
903
903
  }
904
904
  function Dt(e) {
905
905
  return Object.values(e.layouts || {}).some((t) => t.length > 0);
@@ -913,20 +913,20 @@ function St(e, t) {
913
913
  { frameId: t.id, role: _e(t), priority: 0 }
914
914
  ]);
915
915
  e.layouts ?? (e.layouts = {});
916
- for (const [r, i] of Object.entries(a)) {
917
- const o = e.layouts[r] || [];
918
- if (o.some((l) => l.i === t.id))
916
+ for (const [r, n] of Object.entries(a)) {
917
+ const i = e.layouts[r] || [];
918
+ if (i.some((l) => l.i === t.id))
919
919
  continue;
920
- const n = i[0];
921
- if (!n)
920
+ const o = n[0];
921
+ if (!o)
922
922
  continue;
923
- const s = o.reduce(
923
+ const s = i.reduce(
924
924
  (l, d) => Math.max(l, d.y + d.h),
925
925
  0
926
926
  );
927
927
  e.layouts[r] = [
928
- ...o,
929
- { ...n, y: s }
928
+ ...i,
929
+ { ...o, y: s }
930
930
  ];
931
931
  }
932
932
  }
@@ -952,9 +952,9 @@ function ta(e) {
952
952
  t.errors.map((d) => d.message).join(`
953
953
  `) || "Dashboard change plan is invalid."
954
954
  );
955
- const a = Ct(e.dashboard), r = [...t.warnings], i = [], o = new Map(
955
+ const a = Ct(e.dashboard), r = [...t.warnings], n = [], i = new Map(
956
956
  e.cardArtifacts.map((d) => [d.planCardId, d])
957
- ), n = new Map(
957
+ ), o = new Map(
958
958
  e.cardArtifacts.map((d) => [
959
959
  d.planCardId,
960
960
  d.card.id
@@ -973,7 +973,7 @@ function ta(e) {
973
973
  },
974
974
  0
975
975
  ) >= B) {
976
- i.push(
976
+ n.push(
977
977
  w(
978
978
  "generated_card_limit_reached",
979
979
  `AI refinement is capped at ${B} cards.`,
@@ -982,9 +982,9 @@ function ta(e) {
982
982
  );
983
983
  break;
984
984
  }
985
- const h = o.get(d.card.id);
985
+ const h = i.get(d.card.id);
986
986
  if (!h) {
987
- i.push(
987
+ n.push(
988
988
  w(
989
989
  "missing_card_artifact",
990
990
  `Card "${d.card.title}" was skipped because no generated artifact was supplied.`,
@@ -998,7 +998,7 @@ function ta(e) {
998
998
  ...d.card.clickToFilter ? {
999
999
  clickToFilter: H(
1000
1000
  d.card.clickToFilter,
1001
- { cardIds: Object.fromEntries(n) }
1001
+ { cardIds: Object.fromEntries(o) }
1002
1002
  )
1003
1003
  } : {},
1004
1004
  ...d.card.respondsToSelections !== void 0 ? {
@@ -1041,7 +1041,7 @@ function ta(e) {
1041
1041
  s.calculatedFields ?? (s.calculatedFields = []), s.calculatedFields.push(d.field.field);
1042
1042
  else if (d.field.scope === "card" && d.field.field) {
1043
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(
1044
+ p ? ((l = p.card).calculatedFields ?? (l.calculatedFields = []), p.card.calculatedFields.push(d.field.field)) : n.push(
1045
1045
  w(
1046
1046
  "missing_calculated_field_target",
1047
1047
  `Calculated field "${d.field.name}" needs a valid target card.`
@@ -1053,7 +1053,7 @@ function ta(e) {
1053
1053
  case "renameCard": {
1054
1054
  const p = $(a, d.cardId);
1055
1055
  if (!p) {
1056
- i.push(
1056
+ n.push(
1057
1057
  w(
1058
1058
  "card_not_found",
1059
1059
  `Card "${d.cardId}" could not be renamed because it was not found.`,
@@ -1066,9 +1066,9 @@ function ta(e) {
1066
1066
  break;
1067
1067
  }
1068
1068
  case "updateCardSelectionSettings": {
1069
- const p = n.get(d.cardId) ?? d.cardId, h = $(a, p);
1069
+ const p = o.get(d.cardId) ?? d.cardId, h = $(a, p);
1070
1070
  if (!h) {
1071
- i.push(
1071
+ n.push(
1072
1072
  w(
1073
1073
  "card_not_found",
1074
1074
  `Card "${d.cardId}" could not be updated because it was not found.`,
@@ -1079,7 +1079,7 @@ function ta(e) {
1079
1079
  }
1080
1080
  d.card.clickToFilter !== void 0 && (h.card.clickToFilter = H(
1081
1081
  d.card.clickToFilter,
1082
- { cardIds: Object.fromEntries(n) }
1082
+ { cardIds: Object.fromEntries(o) }
1083
1083
  )), d.card.respondsToSelections !== void 0 && (h.card.respondsToSelections = d.card.respondsToSelections);
1084
1084
  break;
1085
1085
  }
@@ -1101,12 +1101,12 @@ function ta(e) {
1101
1101
  );
1102
1102
  break;
1103
1103
  case "unsupported":
1104
- i.push(
1104
+ n.push(
1105
1105
  w("unsupported_operation", d.reason || d.requestedAction)
1106
1106
  );
1107
1107
  break;
1108
1108
  }
1109
- return { dashboard: a, warnings: r, skippedOperations: i };
1109
+ return { dashboard: a, warnings: r, skippedOperations: n };
1110
1110
  }
1111
1111
  function _(e, t, a) {
1112
1112
  return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
@@ -1140,7 +1140,7 @@ function ae(e) {
1140
1140
  (t) => E(t)
1141
1141
  ) : [];
1142
1142
  }
1143
- function F(e) {
1143
+ function x(e) {
1144
1144
  if (!Array.isArray(e))
1145
1145
  return [];
1146
1146
  const t = [];
@@ -1151,36 +1151,36 @@ function F(e) {
1151
1151
  return t;
1152
1152
  }
1153
1153
  function Tt(e) {
1154
- var r, i, o;
1154
+ var r, n, i;
1155
1155
  if (!e)
1156
1156
  return [];
1157
1157
  const t = [];
1158
1158
  if (R(e.source) && t.push(e.source), e.kind === "metric") {
1159
- t.push(...F(e.measures));
1160
- const n = v(e.dateField);
1161
- n && t.push(n), t.push(...F(e.dimensions)), t.push(
1162
- ...F(
1159
+ t.push(...x(e.measures));
1160
+ const o = v(e.dateField);
1161
+ o && t.push(o), t.push(...x(e.dimensions)), t.push(
1162
+ ...x(
1163
1163
  (r = e.filters) == null ? void 0 : r.map((s) => s.field)
1164
1164
  )
1165
1165
  );
1166
1166
  } else if (e.kind === "records") {
1167
- const n = v(e.dateField);
1168
- n && t.push(n), t.push(...F(e.fields)), t.push(
1169
- ...F(
1170
- (i = e.filters) == null ? void 0 : i.map((s) => s.field)
1167
+ const o = v(e.dateField);
1168
+ o && t.push(o), t.push(...x(e.fields)), t.push(
1169
+ ...x(
1170
+ (n = e.filters) == null ? void 0 : n.map((s) => s.field)
1171
1171
  )
1172
1172
  );
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(
1174
- ...F([
1173
+ } else e.kind === "inputOptions" ? (((i = e.population) == null ? void 0 : i.kind) === "related_population" && R(e.population.baseSource) && t.push(e.population.baseSource), t.push(
1174
+ ...x([
1175
1175
  e.labelField,
1176
1176
  e.valueField,
1177
1177
  e.searchField,
1178
1178
  ...e.disambiguationFields || []
1179
- ].filter((n) => !!n))
1180
- )) : e.kind === "sql" && t.push(...F(e.fields));
1179
+ ].filter((o) => !!o))
1180
+ )) : e.kind === "sql" && t.push(...x(e.fields));
1181
1181
  const a = "inputs" in e && Array.isArray(e.inputs) ? e.inputs : [];
1182
- for (const n of a) {
1183
- const s = v(n.field);
1182
+ for (const o of a) {
1183
+ const s = v(o.field);
1184
1184
  s && t.push(s);
1185
1185
  }
1186
1186
  return t;
@@ -1196,15 +1196,15 @@ function wt(e) {
1196
1196
  t.push(...Tt(r.analytics));
1197
1197
  return t;
1198
1198
  }
1199
- function Ft(e) {
1199
+ function xt(e) {
1200
1200
  var a;
1201
1201
  const t = [];
1202
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);
1203
+ for (const n of ae(r))
1204
+ R((a = n.analytics) == null ? void 0 : a.source) && t.push(n.analytics.source);
1205
1205
  return t;
1206
1206
  }
1207
- function xt(e, t) {
1207
+ function Ft(e, t) {
1208
1208
  const a = q(e).filter(R);
1209
1209
  if (a.length === 0)
1210
1210
  return t.push(
@@ -1213,12 +1213,12 @@ function xt(e, t) {
1213
1213
  "No semantic or physical source could be converted into the current dashboard authoring dataset reference."
1214
1214
  )
1215
1215
  ), [];
1216
- const r = a.every((o) => o.kind === "semantic"), i = Array.from(
1216
+ const r = a.every((i) => i.kind === "semantic"), n = Array.from(
1217
1217
  new Set(
1218
- a.filter((o) => o.kind === "semantic").map((o) => o.domainId)
1218
+ a.filter((i) => i.kind === "semantic").map((i) => i.domainId)
1219
1219
  )
1220
1220
  );
1221
- return a.length > 1 && (!r || i.length !== 1) ? (t.push(
1221
+ return a.length > 1 && (!r || n.length !== 1) ? (t.push(
1222
1222
  _(
1223
1223
  "multiple_datasets_out_of_scope",
1224
1224
  "The dashboard authoring compiler supports multiple datasets only within one semantic domain; using the first source and deferring the rest."
@@ -1226,16 +1226,16 @@ function xt(e, t) {
1226
1226
  ), [a[0]]) : a;
1227
1227
  }
1228
1228
  function kt(e, t) {
1229
- const a = te(e), r = ve(e), i = q(wt(e)), o = q(
1230
- Ft(e)
1229
+ const a = te(e), r = ve(e), n = q(wt(e)), i = q(
1230
+ xt(e)
1231
1231
  );
1232
1232
  return {
1233
1233
  sections: a,
1234
1234
  inputs: r,
1235
- sources: i,
1236
- primarySources: o,
1237
- defaultSource: o.length === 1 ? o[0] : void 0,
1238
- datasets: xt(i, t)
1235
+ sources: n,
1236
+ primarySources: i,
1237
+ defaultSource: i.length === 1 ? i[0] : void 0,
1238
+ datasets: Ft(n, t)
1239
1239
  };
1240
1240
  }
1241
1241
  function At(e) {
@@ -1286,29 +1286,29 @@ function Mt(e) {
1286
1286
  if (!(!e || e.kind !== "physical"))
1287
1287
  return [e.databaseName, e.schemaName, e.tableName].filter(Boolean).join(".");
1288
1288
  }
1289
- function Pt(e, t, a, r, i, o) {
1289
+ function Pt(e, t, a, r, n, i) {
1290
1290
  if (e.kind !== "filter")
1291
- return o.push(
1291
+ return i.push(
1292
1292
  _(
1293
1293
  "control_inputs_deferred",
1294
1294
  `Control input "${e.label}" is represented in the protocol but not yet materialized by the dashboard authoring adapter.`
1295
1295
  )
1296
1296
  ), null;
1297
1297
  if (!E(e.field) || typeof e.field.name != "string")
1298
- return o.push(
1298
+ return i.push(
1299
1299
  _(
1300
1300
  "filter_requires_field",
1301
1301
  `Filter "${e.label || e.id}" needs a field before the dashboard compiler can materialize it.`
1302
1302
  )
1303
1303
  ), null;
1304
- const n = Ge({
1304
+ const o = Ge({
1305
1305
  explicitSource: void 0,
1306
1306
  field: e.field,
1307
1307
  defaultSource: t,
1308
1308
  fallbackSources: a
1309
- }), s = (n == null ? void 0 : n.kind) === "semantic" || (n == null ? void 0 : n.kind) === "physical" ? n.connectionId : void 0;
1309
+ }), s = (o == null ? void 0 : o.kind) === "semantic" || (o == null ? void 0 : o.kind) === "physical" ? o.connectionId : void 0;
1310
1310
  if (!s)
1311
- return o.push(
1311
+ return i.push(
1312
1312
  _(
1313
1313
  "filter_requires_connection_id",
1314
1314
  `Filter "${e.label}" needs a source connectionId before the dashboard compiler can materialize it.`
@@ -1317,40 +1317,40 @@ function Pt(e, t, a, r, i, o) {
1317
1317
  const p = {
1318
1318
  id: `filter-${Se(
1319
1319
  O(e.id, e.field.name),
1320
- i
1320
+ n
1321
1321
  )}`,
1322
1322
  variableName: e.id,
1323
1323
  connectionId: s,
1324
1324
  title: e.label,
1325
1325
  column: e.field.name,
1326
1326
  dataType: Nt(e),
1327
- qualifiedTableName: Mt(n),
1327
+ qualifiedTableName: Mt(o),
1328
1328
  sql: "",
1329
1329
  operation: Et(e.operator),
1330
1330
  type: e.multi === !1 ? "single" : "multiple",
1331
1331
  location: "dashboard",
1332
1332
  displayMode: "toolbar",
1333
- fieldMeta: (n == null ? void 0 : n.kind) === "semantic" ? {
1333
+ fieldMeta: (o == null ? void 0 : o.kind) === "semantic" ? {
1334
1334
  name: e.field.name,
1335
1335
  qualifiedFieldName: e.field.name,
1336
1336
  dataType: e.field.dataType,
1337
1337
  role: e.field.role === "measure" ? "metric" : "groupby"
1338
1338
  } : void 0,
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
+ semanticContext: (o == null ? void 0 : o.kind) === "semantic" ? {
1340
+ semanticDomainId: o.domainId,
1341
+ connectionId: o.connectionId
1342
+ } : (o == null ? void 0 : o.kind) === "physical" ? {
1343
+ connectionId: o.connectionId,
1344
+ connectionType: o.connectionType,
1345
1345
  selectedEntities: [
1346
1346
  {
1347
1347
  type: "table",
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
+ connectionId: o.connectionId,
1349
+ connectionType: o.connectionType,
1350
+ dialect: o.dialect,
1351
+ database: o.databaseName,
1352
+ schema: o.schemaName,
1353
+ name: o.tableName
1354
1354
  }
1355
1355
  ]
1356
1356
  } : void 0
@@ -1370,8 +1370,8 @@ function Pt(e, t, a, r, i, o) {
1370
1370
  function G(e) {
1371
1371
  const t = [], a = [];
1372
1372
  for (const r of e.viewIds) {
1373
- const i = e.viewIdToCardId.get(r);
1374
- i ? t.push(i) : a.push(r);
1373
+ const n = e.viewIdToCardId.get(r);
1374
+ n ? t.push(n) : a.push(r);
1375
1375
  }
1376
1376
  return a.length > 0 && e.warnings.push(
1377
1377
  _(
@@ -1381,15 +1381,15 @@ function G(e) {
1381
1381
  ), Array.from(new Set(t));
1382
1382
  }
1383
1383
  function $t(e) {
1384
- var r, i;
1384
+ var r, n;
1385
1385
  if (!e.protocolScope) {
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;
1386
+ const i = Array.from(new Set(e.boundCardIds));
1387
+ return i.length > 0 && i.length < e.allCardIds.length ? { kind: "cards", cardIds: i } : void 0;
1388
1388
  }
1389
1389
  if (e.protocolScope.level === "dashboard") {
1390
1390
  if (!((r = e.protocolScope.excludeViewIds) != null && r.length))
1391
1391
  return;
1392
- const o = new Set(
1392
+ const i = new Set(
1393
1393
  G({
1394
1394
  inputLabel: e.inputLabel,
1395
1395
  viewIds: e.protocolScope.excludeViewIds,
@@ -1399,22 +1399,22 @@ function $t(e) {
1399
1399
  );
1400
1400
  return {
1401
1401
  kind: "cards",
1402
- cardIds: e.allCardIds.filter((n) => !o.has(n))
1402
+ cardIds: e.allCardIds.filter((o) => !i.has(o))
1403
1403
  };
1404
1404
  }
1405
1405
  if (e.protocolScope.level === "view") {
1406
- const o = G({
1406
+ const i = G({
1407
1407
  inputLabel: e.inputLabel,
1408
1408
  viewIds: e.protocolScope.viewIds,
1409
1409
  viewIdToCardId: e.viewIdToCardId,
1410
1410
  warnings: e.warnings
1411
1411
  });
1412
- return o.length === 0 ? (e.warnings.push(
1412
+ return i.length === 0 ? (e.warnings.push(
1413
1413
  _(
1414
1414
  "input_scope_has_no_materialized_cards",
1415
1415
  `Filter "${e.inputLabel}" was deferred because its view scope does not match any materialized cards.`
1416
1416
  )
1417
- ), null) : { kind: "cards", cardIds: o };
1417
+ ), null) : { kind: "cards", cardIds: i };
1418
1418
  }
1419
1419
  const t = e.sectionIdToCardIds.get(e.protocolScope.sectionId) || [];
1420
1420
  if (t.length === 0)
@@ -1424,7 +1424,7 @@ function $t(e) {
1424
1424
  `Filter "${e.inputLabel}" was deferred because section "${e.protocolScope.sectionId}" does not match any materialized cards.`
1425
1425
  )
1426
1426
  ), null;
1427
- if (!((i = e.protocolScope.excludeViewIds) != null && i.length))
1427
+ if (!((n = e.protocolScope.excludeViewIds) != null && n.length))
1428
1428
  return { kind: "cards", cardIds: t };
1429
1429
  const a = new Set(
1430
1430
  G({
@@ -1436,7 +1436,7 @@ function $t(e) {
1436
1436
  );
1437
1437
  return {
1438
1438
  kind: "cards",
1439
- cardIds: t.filter((o) => !a.has(o))
1439
+ cardIds: t.filter((i) => !a.has(i))
1440
1440
  };
1441
1441
  }
1442
1442
  function aa(e) {
@@ -1446,11 +1446,11 @@ function aa(e) {
1446
1446
  t.push(_(m.code, m.message));
1447
1447
  for (const m of a.errors)
1448
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();
1449
+ const r = kt(e, t), n = [], i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
1450
1450
  let p = 0;
1451
1451
  for (const [m, C] of r.sections.entries()) {
1452
1452
  const u = typeof C.title == "string" ? C.title : `Section ${m + 1}`, ne = C.id || O(u, `section-${m + 1}`);
1453
- n.set(ne, []);
1453
+ o.set(ne, []);
1454
1454
  for (const [ie, I] of ae(C).entries()) {
1455
1455
  const oe = Ot(I), V = O(
1456
1456
  I.id || `${u}-${I.title || `View ${ie + 1}`}`,
@@ -1477,13 +1477,13 @@ function aa(e) {
1477
1477
  continue;
1478
1478
  }
1479
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);
1480
+ I.id && i.set(I.id, N), (c = o.get(ne)) == null || c.push(N);
1481
1481
  const Te = I.analytics && "inputs" in I.analytics ? I.analytics.inputs : void 0;
1482
1482
  for (const de of Te || []) {
1483
1483
  const ce = s.get(de.inputId) || [];
1484
1484
  ce.push(N), s.set(de.inputId, ce);
1485
1485
  }
1486
- i.push({
1486
+ n.push({
1487
1487
  id: N,
1488
1488
  frameId: `frame-${se}`,
1489
1489
  title: I.title,
@@ -1501,10 +1501,10 @@ function aa(e) {
1501
1501
  const C = $t({
1502
1502
  protocolScope: m.scope,
1503
1503
  inputLabel: m.label,
1504
- allCardIds: i.map((u) => u.id),
1504
+ allCardIds: n.map((u) => u.id),
1505
1505
  boundCardIds: s.get(m.id) || [],
1506
- viewIdToCardId: o,
1507
- sectionIdToCardIds: n,
1506
+ viewIdToCardId: i,
1507
+ sectionIdToCardIds: o,
1508
1508
  warnings: t
1509
1509
  });
1510
1510
  return C === null ? null : Pt(
@@ -1528,7 +1528,7 @@ function aa(e) {
1528
1528
  title: e.title,
1529
1529
  description: e.description,
1530
1530
  kind: "dashboard",
1531
- cards: i
1531
+ cards: n
1532
1532
  }
1533
1533
  ],
1534
1534
  filterInputs: h.length ? h : void 0,
@@ -1558,98 +1558,112 @@ const ra = [
1558
1558
  "queryConfig",
1559
1559
  "tableConfig"
1560
1560
  ];
1561
- class S extends Error {
1562
- constructor(a, r, i) {
1561
+ class D extends Error {
1562
+ constructor(a, r, n) {
1563
1563
  super(a);
1564
1564
  z(this, "field");
1565
1565
  z(this, "details");
1566
- Object.setPrototypeOf(this, S.prototype), this.name = "CardQueryRequestError", this.field = r, this.details = i;
1566
+ Object.setPrototypeOf(this, D.prototype), this.name = "CardQueryRequestError", this.field = r, this.details = n;
1567
1567
  }
1568
1568
  }
1569
1569
  function re(e) {
1570
1570
  return e.label ? `${e.label}.` : "";
1571
1571
  }
1572
- function k(e) {
1572
+ function F(e) {
1573
1573
  return !e || typeof e != "object" || Array.isArray(e) ? {} : { ...e };
1574
1574
  }
1575
1575
  function L(e) {
1576
1576
  return typeof e == "string" ? e : "";
1577
1577
  }
1578
1578
  function Lt(e, t = {}) {
1579
- const a = k(e), r = re(t), i = {};
1579
+ const a = F(e), r = re(t), n = {};
1580
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("; ")}`,
1581
+ const o = ze(a.calendarContext);
1582
+ if (!o.ok)
1583
+ throw new D(
1584
+ `${r}calendarContext: ${o.issues.map((s) => s.message).join("; ")}`,
1585
1585
  "calendarContext",
1586
- n.issues
1586
+ o.issues
1587
1587
  );
1588
- i.calendarContext = n.value;
1588
+ n.calendarContext = o.value;
1589
1589
  }
1590
- const o = Oe(a.resolvedPrimaryDateField);
1591
- if (!o.ok)
1592
- throw new S(
1593
- `${r}${Re(o.issues)}`,
1590
+ const i = Oe(a.resolvedPrimaryDateField);
1591
+ if (!i.ok)
1592
+ throw new D(
1593
+ `${r}${Re(i.issues)}`,
1594
1594
  "resolvedPrimaryDateField",
1595
- o.issues
1595
+ i.issues
1596
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("; ")}`,
1597
+ if (a.resolvedPrimaryDateField && (n.resolvedPrimaryDateField = a.resolvedPrimaryDateField), a.globalDateComparison !== void 0) {
1598
+ const o = qe(a.globalDateComparison);
1599
+ if (!o.ok)
1600
+ throw new D(
1601
+ `${r}Invalid globalDateComparison: ${o.errors.map((s) => `${s.path}: ${s.message}`).join("; ")}`,
1602
1602
  "globalDateComparison",
1603
- n.errors
1603
+ o.errors
1604
1604
  );
1605
- i.globalDateComparison = Ve(
1605
+ n.globalDateComparison = Ve(
1606
1606
  a.globalDateComparison
1607
1607
  );
1608
1608
  }
1609
- return i;
1609
+ return n;
1610
1610
  }
1611
1611
  function ia(e, t = {}) {
1612
- const a = k(e), r = re(t), i = {};
1612
+ const a = F(e), r = re(t), n = {};
1613
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(
1614
+ const i = F(a.pagination), o = i.page, s = i.pageSize;
1615
+ if (!Number.isInteger(o) || o < 1 || !Number.isInteger(s) || s < 1)
1616
+ throw new D(
1617
1617
  `${r}pagination must name a page and a page size of at least 1`,
1618
1618
  "pagination"
1619
1619
  );
1620
- i.pagination = { page: n, pageSize: s };
1620
+ n.pagination = { page: o, pageSize: s };
1621
1621
  }
1622
1622
  if (a.tableTotalsRequest !== void 0) {
1623
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;
1624
+ throw new D(`${r}tableTotalsRequest must be an object`, "tableTotalsRequest");
1625
+ n.tableTotalsRequest = a.tableTotalsRequest;
1626
+ }
1627
+ if (a.sourceRowProbe !== void 0) {
1628
+ const i = F(a.sourceRowProbe).limit;
1629
+ if (!Number.isInteger(i) || i < 1)
1630
+ throw new D(
1631
+ `${r}sourceRowProbe must name a limit of at least 1`,
1632
+ "sourceRowProbe"
1633
+ );
1634
+ if (n.pagination)
1635
+ throw new D(
1636
+ `${r}sourceRowProbe cannot be combined with pagination`,
1637
+ "sourceRowProbe"
1638
+ );
1639
+ n.sourceRowProbe = { limit: i };
1626
1640
  }
1627
- return i;
1641
+ return n;
1628
1642
  }
1629
1643
  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");
1644
+ const a = F(e), r = re(t), n = (c) => new D(`${r}${c} is required`, c), i = L(a.connection_id).trim();
1645
+ if (!i) throw n("connection_id");
1646
+ const o = L(a.cardType).trim();
1647
+ if (!o) throw n("cardType");
1634
1648
  const s = a.resultOwner;
1635
1649
  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");
1650
+ throw n("resultOwner");
1651
+ const l = F(a.cardConfig), d = L(a.sql), p = L(a.python), h = !!t.configOptional || Object.keys(l).length > 0;
1652
+ if (s === "config" && !h) throw n("cardConfig");
1653
+ if (s === "freeform" && !d.trim()) throw n("sql");
1640
1654
  const y = Ee({
1641
1655
  hasExecutableConfig: h,
1642
1656
  sql: d,
1643
1657
  normalizedPython: p
1644
1658
  });
1645
1659
  if (s !== y)
1646
- throw new S(
1660
+ throw new D(
1647
1661
  `${r}resultOwner must match the normalized execution owner "${y}"`,
1648
1662
  "resultOwner"
1649
1663
  );
1650
- if (s === "none") throw i("cardConfig");
1651
- const g = k(a.cardDataSource);
1652
- if (Object.keys(g).length === 0) throw i("cardDataSource");
1664
+ if (s === "none") throw n("cardConfig");
1665
+ const g = F(a.cardDataSource);
1666
+ if (Object.keys(g).length === 0) throw n("cardDataSource");
1653
1667
  const b = Ne({
1654
1668
  controlValues: a.controlValues,
1655
1669
  controlDefinitions: a.controlDefinitions,
@@ -1657,8 +1671,8 @@ function oa(e, t = {}) {
1657
1671
  controlBindings: a.controlBindings
1658
1672
  });
1659
1673
  return {
1660
- connection_id: o,
1661
- cardType: n,
1674
+ connection_id: i,
1675
+ cardType: o,
1662
1676
  sql: d,
1663
1677
  python: p,
1664
1678
  resultOwner: s,
@@ -1673,151 +1687,156 @@ function oa(e, t = {}) {
1673
1687
  };
1674
1688
  }
1675
1689
  export {
1676
- wa as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
1690
+ Aa as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
1677
1691
  na as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
1678
1692
  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,
1693
+ Oa as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
1694
+ Ra as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
1695
+ Ea as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
1696
+ Na as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
1697
+ Ma as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
1698
+ Pa as CONTROL_DEFINITION_INVALID_ERROR_CODE,
1699
+ $a as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
1700
+ La as CONTROL_REFERENCE_MISSING_ERROR_CODE,
1701
+ Ba as CONTROL_VALUE_INVALID_ERROR_CODE,
1702
+ qa as CONTROL_VALUE_MISSING_ERROR_CODE,
1703
+ D as CardQueryRequestError,
1704
+ Va as ControlResolutionError,
1705
+ Fe as DASHBOARD_AUTHORING_BREAKPOINTS,
1692
1706
  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,
1707
+ Rr as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
1708
+ un as DASHBOARD_FILTER_OPERATIONS,
1709
+ rn as DOCUMENT_KPI_SECTION_MAX_CARDS,
1710
+ nn as DOCUMENT_KPI_SECTION_MAX_TILES,
1711
+ Er as DashboardFilterMappingContractError,
1712
+ za as ExecutionControlContractError,
1699
1713
  ca as NEW_CARD_TYPE,
1700
- Ba as SEMAPHOR_CARTESIAN_CHART_TYPES,
1714
+ ja as SEMAPHOR_CARTESIAN_CHART_TYPES,
1701
1715
  la as applyCardReferenceRemapping,
1702
1716
  ta as applyDashboardChangePlan,
1703
1717
  ua as applyDashboardOperations,
1704
- Ar as applyGroupByOverride,
1718
+ Nr as applyGroupByOverride,
1705
1719
  fa as applyLinkedClickToFilterOverrides,
1706
- Or as applyOptionDependencyOverride,
1707
- qa as buildControlDefinitionIndex,
1708
- Va as buildDashboardCardSourceIndex,
1709
- pa as buildLinkedClickToFilterOverrides,
1720
+ Mr as applyOptionDependencyOverride,
1721
+ pa as buildCardExportFormatOptions,
1722
+ Pr as buildCardExportQueryContext,
1723
+ ma as buildCardExportRequest,
1724
+ ha as buildCardExportRequestFromOptions,
1725
+ Ua as buildControlDefinitionIndex,
1726
+ Ga as buildDashboardCardSourceIndex,
1727
+ ga as buildLinkedClickToFilterOverrides,
1728
+ ba as buildTableExportFormatOptions,
1710
1729
  ke as clickToFilterSettingsSchema,
1711
1730
  ea as compileDashboardFromPlan,
1712
1731
  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,
1732
+ Ia as composeCardReferenceRemapping,
1733
+ Ha as controlBindingExecutionSchema,
1734
+ Wa as controlDefinitionExecutionSchema,
1735
+ $r as createDashboardFilterBindingId,
1736
+ gn as createMatrixAuthoringDraft,
1737
+ bn as createMatrixConfig,
1738
+ Ca as createNewCard,
1720
1739
  J as dashboardAuthoringDatasetMatchesSource,
1721
1740
  Jt as dashboardAuthoringFieldsReferToSameTarget,
1722
1741
  v as dashboardAuthoringSourceFromField,
1723
- Xt as dashboardAuthoringSourceKey,
1742
+ Yt as dashboardAuthoringSourceKey,
1724
1743
  pe as dashboardAuthoringSourcesReferToSameDataset,
1725
- Ua as dashboardCardFilterSourceInventoryContains,
1726
- Er as dashboardFilterTargetMatchesLogicalValue,
1727
- sn as dashboardFilterValueTypeForDataType,
1744
+ Ka as dashboardCardFilterSourceInventoryContains,
1745
+ Lr as dashboardFilterTargetMatchesLogicalValue,
1746
+ fn as dashboardFilterValueTypeForDataType,
1728
1747
  aa as dashboardPlanFromSemaphorDashboardIntent,
1729
- Ga as defaultClickToFilterSettings,
1748
+ Qa as defaultClickToFilterSettings,
1730
1749
  Zt as findDashboardAuthoringDatasetForSource,
1731
- Ha as findDashboardCardExecutableSource,
1732
- Wa as findDashboardCardPinnedCatalogSource,
1733
- Ka as findDashboardSqlPinnedCatalogSource,
1750
+ Ya as findDashboardCardExecutableSource,
1751
+ Xa as findDashboardCardPinnedCatalogSource,
1752
+ Ja as findDashboardSqlPinnedCatalogSource,
1734
1753
  Re as formatResolvedPrimaryDateFieldIssues,
1735
- ga as getCalculatedFieldAggregateOverrides,
1736
- Qa as getCalculatedFieldNamespace,
1737
- ba as getCalculatedFieldParameters,
1738
- Ia as getCalculatedFieldShelfOverrides,
1739
- Xa as getColumnCatalogFieldId,
1754
+ ya as getCalculatedFieldAggregateOverrides,
1755
+ Za as getCalculatedFieldNamespace,
1756
+ _a as getCalculatedFieldParameters,
1757
+ Da as getCalculatedFieldShelfOverrides,
1758
+ er as getColumnCatalogFieldId,
1740
1759
  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,
1760
+ Sa as getDashboardFilterSubscriptionHint,
1761
+ on as getDocumentKpiSectionShapeIssues,
1762
+ sn as getDocumentSectionCards,
1763
+ va as getDomainCalculatedSelectionOverrides,
1764
+ tr as getFieldAggregationOptions,
1765
+ ar as getMatrixBindingTargets,
1766
+ In as getMatrixLevelLabel,
1767
+ Cn as getMatrixMeasureLabel,
1768
+ rr as getStableDomainCalculatedFieldId,
1769
+ nr as getTemporalBucketAuthoringOptions,
1770
+ ir as getTemporalBucketAuthoringSelection,
1771
+ Ta as hasDashboardFilterSubscription,
1772
+ pn as isDashboardFilterOperationCompatible,
1754
1773
  R as isMaterializableDashboardAuthoringSource,
1755
- ar as isPresentationCurrencyBinding,
1756
- rr as isSemaphorCartesianChartType,
1774
+ or as isPresentationCurrencyBinding,
1775
+ sr as isSemaphorCartesianChartType,
1757
1776
  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,
1777
+ dr as isStructuralControlBinding,
1778
+ cr as isValidControlOptionPresentation,
1779
+ lr as linkedClickToFilterOverridesSchema,
1780
+ dn as listDashboardCardLocations,
1781
+ cn as mapDocumentSectionCards,
1782
+ Br as matrixCatalogSources,
1783
+ Sn as matrixDefinitionFields,
1784
+ vn as matrixDefinitionSources,
1785
+ qr as matrixExecutionSources,
1767
1786
  q as mergeDashboardAuthoringSources,
1768
- hn as mergeMatrixSorts,
1769
- sr as moveMatrixLevel,
1770
- dr as normalizeClickToFilterSettings,
1771
- Pr as normalizeDashboardInputs,
1772
- Da as normalizeLegacyLinkedTargetOverrides,
1787
+ yn as mergeMatrixSorts,
1788
+ ur as moveMatrixLevel,
1789
+ fr as normalizeClickToFilterSettings,
1790
+ Vr as normalizeDashboardInputs,
1791
+ wa as normalizeLegacyLinkedTargetOverrides,
1773
1792
  oa as parseCardQueryRequest,
1774
1793
  Lt as parseCardQueryRequestContext,
1775
1794
  ia as parseCardQueryRequestExtras,
1776
- cr as parseExecutionControlBindingsShallow,
1795
+ pr as parseExecutionControlBindingsShallow,
1777
1796
  Ne as parseExecutionControlContext,
1778
- lr as parseExecutionControlContract,
1797
+ mr as parseExecutionControlContract,
1779
1798
  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,
1799
+ Xt as preferredDashboardAuthoringSource,
1800
+ hr as previewTemporalBucketAuthoringFormat,
1801
+ gr as readExactDomainCalculatedFieldReference,
1802
+ Tn as readMatrixCardConfig,
1803
+ zr as rebindDashboardOptionDependencyInputId,
1804
+ br as reconcileMatrixSpecStructure,
1805
+ Ir as reconcileTemporalBucketAuthoringFormat,
1787
1806
  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,
1807
+ xa as remapLinkedClickToFilterOverrides,
1808
+ jr as requireNormalizedDashboardInputs,
1809
+ Cr as resolveBindingControlValue,
1810
+ Zr as resolveCanonicalDetailResultRawKey,
1811
+ en as resolveCanonicalResultOutputKey,
1812
+ tn as resolveCanonicalResultRawKey,
1794
1813
  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,
1814
+ yr as resolveDashboardEntitySource,
1815
+ Ur as resolveDashboardFilterAutomaticTarget,
1816
+ Gr as resolveDashboardFilterInheritedTarget,
1817
+ Hr as resolveDashboardOptionDependencies,
1818
+ Wr as resolveDashboardOptionPopulation,
1819
+ Kr as resolveDashboardSqlFilterTarget,
1820
+ _r as resolveGroupByFieldTarget,
1821
+ Qr as resolveMatrixControlBindings,
1822
+ _n as resolveMatrixDefinition,
1823
+ Dr as resolveMetricFieldTarget,
1824
+ Sr as resolveScalarMappedValue,
1825
+ vr as resolveTemporalBucketAuthoringFormat,
1807
1826
  Ee as resolveTemporalResultOwner,
1808
1827
  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,
1828
+ Tr as retainMatrixConditionalFormatting,
1829
+ Yr as selectDashboardOptionDependencyInputIds,
1830
+ wr as selectionFieldFromExplorerField,
1831
+ Fa as stripInstanceTargetsForLibrarySave,
1832
+ xr as supportsCanonicalDashboardTemporalResult,
1833
+ Fr as transformComparisonDocument,
1834
+ kr as updateMatrixConfig,
1835
+ Ar as validateControlValue,
1817
1836
  Ze as validateDashboardAuthoringDatasetScope,
1818
1837
  at as validateDashboardChangePlan,
1819
- cn as validateDashboardFilterValues,
1838
+ mn as validateDashboardFilterValues,
1820
1839
  tt as validateDashboardPlan,
1821
1840
  Oe as validateResolvedPrimaryDateFieldShape,
1822
- Hr as withDashboardOptionDependencyOverride
1841
+ Xr as withDashboardOptionDependencyOverride
1823
1842
  };