react-semaphor 0.1.543 → 0.1.545
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity/index.js +73 -0
- package/dist/analytics-protocol/index.js +35 -34
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +56 -52
- package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
- package/dist/chunks/{apply-dashboard-operations-CG9S7MGt.js → apply-dashboard-operations-CZEMsx8E.js} +778 -958
- package/dist/chunks/{assistant-chat-BFMRUYoB.js → assistant-chat-D7sWTypJ.js} +26 -27
- package/dist/chunks/calendar-day-equality-dvoQp1xW.js +410 -0
- package/dist/chunks/{comparison-window-caption-Bv18samq.js → comparison-window-caption-D4E6IHPD.js} +462 -456
- package/dist/chunks/{custom-visual-inputs-DUtpYZOk.js → custom-visual-inputs-DLCD9Y5V.js} +8 -2
- package/dist/chunks/dashboard-B1tMju0u.js +14 -0
- package/dist/chunks/dashboard-briefing-launcher-CePgIu0Z.js +3720 -0
- package/dist/chunks/{dashboard-controls-UGpjOM2k.js → dashboard-controls-Cq05n3e0.js} +526 -521
- package/dist/chunks/{dashboard-json-DG8dz0eX.js → dashboard-json-CoYRPqxx.js} +3 -3
- package/dist/chunks/document-dashboard-inputs-BesAHZvB.js +3112 -0
- package/dist/chunks/{edit-dashboard-visual-CDpA4y5e.js → edit-dashboard-visual-JPtNfJRb.js} +5628 -5618
- package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
- package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-ff7osJr7.js} +1 -1
- package/dist/chunks/{index-l5LclZvs.js → index-DRWiuqyd.js} +378 -332
- package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-DnCyRXJE.js} +13 -13
- package/dist/chunks/{numeric-presentation-F_-H6VAw.js → numeric-presentation-7X_IrD58.js} +2572 -2573
- package/dist/chunks/{pivot-result-lifecycle-DupbRk-R.js → pivot-result-lifecycle-DM4CyGKs.js} +285 -393
- package/dist/chunks/{raw-temporal-presentation-D-azM_98.js → raw-temporal-presentation-C3mUgnEx.js} +2 -2
- package/dist/chunks/{zoned-wall-clock-MulfA26h.js → relative-date-label-Bk2j94pA.js} +21 -64
- package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
- package/dist/chunks/{report-preferences-dialog-CPwRwEJx.js → report-preferences-dialog-DUtuUL_5.js} +640 -612
- package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +9415 -0
- package/dist/chunks/{saved-dashboard-context-BKvMfRfC.js → saved-dashboard-context-LrF_kW0l.js} +183 -211
- package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
- package/dist/chunks/{semaphor-ready-indicator-CN2AHm2x.js → semaphor-ready-indicator-BxF96Yhv.js} +46859 -47102
- package/dist/chunks/shelf-drop-preview-context-CNaM_Gmh.js +2469 -0
- package/dist/chunks/{switch-C3jLxlG0.js → switch-uDtPgQlQ.js} +44 -45
- package/dist/chunks/{table-export-sheet-BDRXLLdq.js → table-export-sheet-YzMioA7Y.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BnclfB2k.js → use-create-flow-overlay-state-CjB7ig1o.js} +153 -164
- package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +553 -541
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.js +241 -227
- package/dist/index.js +354 -331
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/activity.d.ts +2 -0
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +33 -6
- package/dist/types/briefings/index.d.ts +6 -5
- package/dist/types/components/activity/activity-bell.d.ts +11 -0
- package/dist/types/components/activity/activity-instance.d.ts +50 -0
- package/dist/types/components/activity/activity-notices.d.ts +7 -0
- package/dist/types/components/activity/activity-provider.d.ts +21 -0
- package/dist/types/components/activity/activity-types.d.ts +177 -0
- package/dist/types/components/activity/index.d.ts +6 -0
- package/dist/types/components/activity/use-activity.d.ts +20 -0
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/briefings/briefing-author.d.ts +14 -12
- package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +5 -0
- package/dist/types/components/briefings/use-briefing-run-detail.d.ts +34 -0
- package/dist/types/components/index.d.ts +1 -4
- package/dist/types/components/surfboard/filter/types.d.ts +0 -14
- package/dist/types/lib/activity-identity.d.ts +21 -0
- package/dist/types/lib/api/exports-api.d.ts +4 -4
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +35 -1
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +199 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
- package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
- package/dist/types/lib/download-pdf.d.ts +75 -1
- package/dist/types/lib/hooks/index.d.ts +1 -3
- package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
- package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
- package/dist/types/lib/stores/dashboard-store.d.ts +39 -55
- package/dist/types/lib/stores/editor-store.d.ts +0 -3
- package/dist/types/lib/types/common-types.d.ts +21 -6
- package/dist/types/shared/activity/activity-contract.d.ts +84 -0
- package/dist/types/shared/activity/index.d.ts +5 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -11
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +12 -12
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +92 -0
- package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
- package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/format-utils/export-policy.d.ts +12 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
- package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
- package/package.json +6 -2
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
- package/dist/chunks/dashboard-B9mKTJoy.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-Bdmry_oG.js +0 -4248
- package/dist/chunks/document-dashboard-inputs-OwqCbrVp.js +0 -8087
- package/dist/chunks/document-sheet-utils-BTb3VZxV.js +0 -3619
- package/dist/chunks/shelf-drop-preview-context-BGl_rxcW.js +0 -2407
- package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
- package/dist/types/components/briefings/briefing-author/run-ui.d.ts +0 -81
- package/dist/types/components/briefings/use-briefing-run-polling.d.ts +0 -34
- package/dist/types/components/notifications/export-notification-item.d.ts +0 -24
- package/dist/types/components/notifications/export-notification-list.d.ts +0 -8
- package/dist/types/components/notifications/index.d.ts +0 -3
- package/dist/types/components/notifications/notification-bell.d.ts +0 -13
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
- package/dist/types/lib/exports/bounded-request.d.ts +0 -12
- package/dist/types/lib/hooks/use-export-polling.d.ts +0 -32
- package/dist/types/lib/hooks/use-export-recovery.d.ts +0 -11
- package/dist/types/lib/stores/export-store.d.ts +0 -62
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var L = (e, n, t) =>
|
|
4
|
-
import { r as ae, q as
|
|
5
|
-
import { a8 as J, l as
|
|
6
|
-
import {
|
|
1
|
+
var Fe = Object.defineProperty;
|
|
2
|
+
var Ne = (e, n, t) => n in e ? Fe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var L = (e, n, t) => Ne(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { r as ae, q as se, j as Re } from "./temporal-bucket-D7NBrrtL.js";
|
|
5
|
+
import { a8 as J, l as Be, t as Me } from "./validators-DMHTpf7a.js";
|
|
6
|
+
import { l as Le, C as Ue } from "./export-file-format-C-tJsxsf.js";
|
|
7
7
|
import { z as y } from "zod";
|
|
8
|
-
import {
|
|
8
|
+
import { F as Pe, q as Ve, o as ze, P as B } from "./pivot-result-lifecycle-DM4CyGKs.js";
|
|
9
|
+
import { af as je, ah as qe, V as Ke } from "./matrix-operation-contract-8OIO4gob.js";
|
|
9
10
|
import "./analytics-base-schemas-BFAoRlkU.js";
|
|
10
11
|
import "../value-format-preferences/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
12
|
+
import { r as He } from "./rendered-file-D8xEuVVx.js";
|
|
13
|
+
import { aa as Ge, ab as We, ac as Xe, r as Ze, n as Ye } from "./numeric-presentation-7X_IrD58.js";
|
|
14
|
+
import { r as Je } from "./matrix-card-DjwWcCo8.js";
|
|
15
|
+
import { x as Qe } from "./table-settings-CLZocegs.js";
|
|
16
|
+
import { r as et, a as tt, b as nt, c as rt, d as ot } from "./raw-temporal-presentation-C3mUgnEx.js";
|
|
17
|
+
import "./index-CuHybtft.js";
|
|
18
|
+
import "./_commonjsHelpers-DimLPMtv.js";
|
|
19
|
+
import { f as at, r as it, b as ct, g as lt } from "./custom-visual-inputs-DLCD9Y5V.js";
|
|
20
|
+
const dt = /* @__PURE__ */ new Set([
|
|
17
21
|
"table",
|
|
18
22
|
"aggregateTable",
|
|
19
23
|
"pivotTable",
|
|
20
24
|
"detailTable"
|
|
21
|
-
]),
|
|
25
|
+
]), st = /* @__PURE__ */ new Set([
|
|
22
26
|
"bar",
|
|
23
27
|
"horizontalBar",
|
|
24
28
|
"line",
|
|
@@ -49,21 +53,21 @@ const it = /* @__PURE__ */ new Set([
|
|
|
49
53
|
"treemap",
|
|
50
54
|
"custom"
|
|
51
55
|
]);
|
|
52
|
-
function
|
|
56
|
+
function Xn(e) {
|
|
53
57
|
var o, a, i;
|
|
54
|
-
const n =
|
|
58
|
+
const n = st.has(e.type) && (e.type !== "custom" || !!((o = e.customCardPreferences) != null && o.url));
|
|
55
59
|
let t = !1;
|
|
56
60
|
try {
|
|
57
|
-
t = !!
|
|
61
|
+
t = !!Je(e);
|
|
58
62
|
} catch {
|
|
59
63
|
return { formats: [], defaultFormat: null };
|
|
60
64
|
}
|
|
61
|
-
return e.type === "text" || !n || !t &&
|
|
62
|
-
formats:
|
|
65
|
+
return e.type === "text" || !n || !t && Ge(e) ? { formats: [], defaultFormat: null } : {
|
|
66
|
+
formats: ut({
|
|
63
67
|
cardType: e.type,
|
|
64
68
|
allowDownload: (a = e.preferences) == null ? void 0 : a.allowDownload
|
|
65
69
|
}).filter((c) => c !== "xlsx" || e.type !== "matrixTable" || t),
|
|
66
|
-
defaultFormat:
|
|
70
|
+
defaultFormat: pt({
|
|
67
71
|
cardType: e.type,
|
|
68
72
|
allowDownload: (i = e.preferences) == null ? void 0 : i.allowDownload
|
|
69
73
|
})
|
|
@@ -72,21 +76,39 @@ function Pn(e) {
|
|
|
72
76
|
function Q(e) {
|
|
73
77
|
return e === "table" || e === "detailTable";
|
|
74
78
|
}
|
|
75
|
-
function
|
|
76
|
-
var
|
|
77
|
-
|
|
79
|
+
function mt(e) {
|
|
80
|
+
var t, r;
|
|
81
|
+
if (e.type !== "card")
|
|
82
|
+
return { kind: "rendered", format: e.format };
|
|
83
|
+
const n = !!((t = e.settings) != null && t.matrix);
|
|
84
|
+
switch (e.format) {
|
|
85
|
+
case "png":
|
|
86
|
+
return { kind: "rendered", format: "png" };
|
|
87
|
+
case "pdf":
|
|
88
|
+
return n ? { kind: "matrix_pdf" } : { kind: "rendered", format: "pdf" };
|
|
89
|
+
case "csv":
|
|
90
|
+
case "xlsx":
|
|
91
|
+
return n || Q((r = e.settings) == null ? void 0 : r.cardType) ? { kind: "export_job", format: e.format } : { kind: "rendered", format: "csv" };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function Zn(e) {
|
|
95
|
+
return mt(e).kind === "export_job";
|
|
96
|
+
}
|
|
97
|
+
function ft(e) {
|
|
98
|
+
const { label: n, extension: t, contentType: r } = e === "pdf" || e === "png" ? He(e) : Le(e);
|
|
99
|
+
return { label: n, extension: t, contentType: r };
|
|
78
100
|
}
|
|
79
|
-
function
|
|
80
|
-
return e.allowDownload === !1 ? ["pdf"] : e.cardType === "matrixTable" || Q(e.cardType) ? ["pdf", "csv", "xlsx"] : ["pdf", "csv"];
|
|
101
|
+
function ut(e) {
|
|
102
|
+
return e.allowDownload === !1 ? ["pdf", "png"] : e.cardType === "matrixTable" || Q(e.cardType) ? ["pdf", "png", "csv", "xlsx"] : ["pdf", "png", "csv"];
|
|
81
103
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
104
|
+
function Yn(e) {
|
|
105
|
+
return ft(e).label;
|
|
84
106
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
107
|
+
function pt(e) {
|
|
108
|
+
return dt.has(e.cardType) && e.allowDownload !== !1 ? "csv" : "pdf";
|
|
87
109
|
}
|
|
88
|
-
function
|
|
89
|
-
const { config: n } = e, t =
|
|
110
|
+
function Jn(e) {
|
|
111
|
+
const { config: n } = e, t = Pe({
|
|
90
112
|
spec: n.spec,
|
|
91
113
|
presentation: n.presentation,
|
|
92
114
|
defaults: n.defaultView,
|
|
@@ -106,7 +128,7 @@ function jn(e) {
|
|
|
106
128
|
}
|
|
107
129
|
});
|
|
108
130
|
}
|
|
109
|
-
const
|
|
131
|
+
const ht = y.object({
|
|
110
132
|
connection_id: y.string().min(1),
|
|
111
133
|
cardType: y.literal("matrixTable"),
|
|
112
134
|
resultOwner: y.literal("config"),
|
|
@@ -121,7 +143,7 @@ const st = y.object({
|
|
|
121
143
|
semanticDomainId: y.string().optional()
|
|
122
144
|
}).passthrough(),
|
|
123
145
|
active_filters: y.array(y.unknown()).default([])
|
|
124
|
-
}).passthrough(),
|
|
146
|
+
}).passthrough(), Qn = ht.extend({
|
|
125
147
|
dashboardId: y.string().min(1),
|
|
126
148
|
cardId: y.string().min(1),
|
|
127
149
|
formatOptions: y.object({
|
|
@@ -136,7 +158,7 @@ const st = y.object({
|
|
|
136
158
|
});
|
|
137
159
|
})
|
|
138
160
|
});
|
|
139
|
-
function
|
|
161
|
+
function er(e) {
|
|
140
162
|
return {
|
|
141
163
|
...e.controls,
|
|
142
164
|
type: "card",
|
|
@@ -164,25 +186,25 @@ function Kn(e) {
|
|
|
164
186
|
delimiter: e.delimiter,
|
|
165
187
|
includeHeaders: e.includeHeaders,
|
|
166
188
|
timezone: e.reportContext.calendar.tz,
|
|
167
|
-
presentationExecutionSnapshot:
|
|
189
|
+
presentationExecutionSnapshot: Ve({
|
|
168
190
|
reportContext: e.reportContext,
|
|
169
191
|
resolvedFormats: []
|
|
170
192
|
})
|
|
171
193
|
}
|
|
172
194
|
};
|
|
173
195
|
}
|
|
174
|
-
const K = y.number().int().nonnegative(),
|
|
196
|
+
const K = y.number().int().nonnegative(), tr = y.discriminatedUnion("status", [
|
|
175
197
|
y.object({
|
|
176
198
|
status: y.literal("ok"),
|
|
177
199
|
request: J,
|
|
178
|
-
layout:
|
|
179
|
-
rows: y.array(
|
|
200
|
+
layout: je,
|
|
201
|
+
rows: y.array(qe).readonly(),
|
|
180
202
|
usage: y.object({ rows: K, cells: K, bytes: K }).strict()
|
|
181
203
|
}).strict(),
|
|
182
204
|
y.object({
|
|
183
205
|
status: y.literal("failed"),
|
|
184
206
|
failure: y.object({
|
|
185
|
-
code: y.enum(
|
|
207
|
+
code: y.enum(Ke),
|
|
186
208
|
limit: y.enum(["rows", "bytes"]).optional(),
|
|
187
209
|
message: y.string().min(1),
|
|
188
210
|
retryable: y.boolean()
|
|
@@ -192,7 +214,7 @@ const K = y.number().int().nonnegative(), Hn = y.discriminatedUnion("status", [
|
|
|
192
214
|
function ie(e) {
|
|
193
215
|
return !e || typeof e != "object" ? !1 : Array.isArray(e.cards);
|
|
194
216
|
}
|
|
195
|
-
function
|
|
217
|
+
function yt(e) {
|
|
196
218
|
if (!e)
|
|
197
219
|
return null;
|
|
198
220
|
if (typeof e == "string")
|
|
@@ -204,14 +226,14 @@ function mt(e) {
|
|
|
204
226
|
}
|
|
205
227
|
return ie(e) ? e : null;
|
|
206
228
|
}
|
|
207
|
-
function
|
|
229
|
+
function me(e) {
|
|
208
230
|
var n;
|
|
209
231
|
return (n = e == null ? void 0 : e.cards) != null && n.length ? e.activeCardId && e.cards.find((t) => t.id === e.activeCardId) || e.cards[0] : null;
|
|
210
232
|
}
|
|
211
|
-
function
|
|
233
|
+
function nr(e) {
|
|
212
234
|
var t;
|
|
213
235
|
const n = (e == null ? void 0 : e.frameObject) ?? ((t = e == null ? void 0 : e.visual) == null ? void 0 : t.frameObject);
|
|
214
|
-
return
|
|
236
|
+
return me(yt(n));
|
|
215
237
|
}
|
|
216
238
|
class U extends Error {
|
|
217
239
|
constructor(t) {
|
|
@@ -224,7 +246,7 @@ class U extends Error {
|
|
|
224
246
|
this.name = "TemporalSnapshotSelectionError", this.selection = t;
|
|
225
247
|
}
|
|
226
248
|
}
|
|
227
|
-
function
|
|
249
|
+
function gt(e, n) {
|
|
228
250
|
var o;
|
|
229
251
|
const t = [], r = /* @__PURE__ */ new Map();
|
|
230
252
|
for (const a of n) {
|
|
@@ -238,9 +260,9 @@ function ft(e, n) {
|
|
|
238
260
|
let c = !a.cardId;
|
|
239
261
|
for (const l of i) {
|
|
240
262
|
const m = (((o = l.document) == null ? void 0 : o.sections) || []).flatMap(
|
|
241
|
-
(h) =>
|
|
263
|
+
(h) => Qe(h)
|
|
242
264
|
), s = (l.frames || []).flatMap(
|
|
243
|
-
(h) =>
|
|
265
|
+
(h) => bt(h, a.cardId)
|
|
244
266
|
);
|
|
245
267
|
s.length > 0 && (c = !0);
|
|
246
268
|
const u = [
|
|
@@ -266,29 +288,29 @@ function ft(e, n) {
|
|
|
266
288
|
}
|
|
267
289
|
return t;
|
|
268
290
|
}
|
|
269
|
-
function
|
|
291
|
+
function bt(e, n) {
|
|
270
292
|
var i;
|
|
271
|
-
const t = n ? (i = e.cards) == null ? void 0 : i.find((c) => c.id === n) :
|
|
293
|
+
const t = n ? (i = e.cards) == null ? void 0 : i.find((c) => c.id === n) : me(e);
|
|
272
294
|
if (!t) return [];
|
|
273
|
-
const r =
|
|
295
|
+
const r = at(e, t), o = (e.cards || []).filter(
|
|
274
296
|
(c) => {
|
|
275
297
|
var l;
|
|
276
298
|
return typeof ((l = c.customCardPreferences) == null ? void 0 : l.slotIndex) == "number";
|
|
277
299
|
}
|
|
278
|
-
).length > 1, a = r != null && (
|
|
279
|
-
return !r || !a ? [t] :
|
|
280
|
-
|
|
300
|
+
).length > 1, a = r != null && (it(r) === "multiple" || o);
|
|
301
|
+
return !r || !a ? [t] : ct(
|
|
302
|
+
lt({
|
|
281
303
|
frame: e,
|
|
282
304
|
configCard: r,
|
|
283
305
|
isMultiInputVisual: !0
|
|
284
306
|
})
|
|
285
307
|
).filter((c) => c !== null);
|
|
286
308
|
}
|
|
287
|
-
function
|
|
288
|
-
return
|
|
309
|
+
function rr(e) {
|
|
310
|
+
return gt(e.dashboard, e.selections).flatMap(
|
|
289
311
|
({ card: n, attachmentIndex: t }) => {
|
|
290
312
|
var s, u, h, g;
|
|
291
|
-
const r = ((s = e.resolveCardConfig) == null ? void 0 : s.call(e, n)) ?? n.config, o =
|
|
313
|
+
const r = ((s = e.resolveCardConfig) == null ? void 0 : s.call(e, n)) ?? n.config, o = We({
|
|
292
314
|
card: n,
|
|
293
315
|
cardConfig: r
|
|
294
316
|
}), a = {
|
|
@@ -302,7 +324,7 @@ function Wn(e) {
|
|
|
302
324
|
fieldId: E.id,
|
|
303
325
|
role: E.role
|
|
304
326
|
},
|
|
305
|
-
format:
|
|
327
|
+
format: Xe(
|
|
306
328
|
E,
|
|
307
329
|
{
|
|
308
330
|
dateStyle: e.valueFormatPreferences.dateStyle,
|
|
@@ -310,11 +332,11 @@ function Wn(e) {
|
|
|
310
332
|
},
|
|
311
333
|
e.valueFormatPreferences.locale
|
|
312
334
|
)
|
|
313
|
-
})) : [], c = [], l =
|
|
335
|
+
})) : [], c = [], l = Ze(n, r), m = Ye(
|
|
314
336
|
n.python || ""
|
|
315
337
|
);
|
|
316
338
|
if (n.type === "detailTable" && l === "config") {
|
|
317
|
-
const E = (r == null ? void 0 : r.detailColumns) || [],
|
|
339
|
+
const E = (r == null ? void 0 : r.detailColumns) || [], C = [
|
|
318
340
|
...((r == null ? void 0 : r.groupByColumns) || []).map(($) => ({
|
|
319
341
|
field: $,
|
|
320
342
|
role: "groupby"
|
|
@@ -332,21 +354,21 @@ function Wn(e) {
|
|
|
332
354
|
role: "detail"
|
|
333
355
|
}))
|
|
334
356
|
], _ = /* @__PURE__ */ new Map(), M = new Set(
|
|
335
|
-
|
|
336
|
-
({ field: $, role: T }) =>
|
|
357
|
+
C.map(
|
|
358
|
+
({ field: $, role: T }) => et($, T)
|
|
337
359
|
)
|
|
338
360
|
);
|
|
339
|
-
for (const { field: $ } of
|
|
361
|
+
for (const { field: $ } of C) {
|
|
340
362
|
const T = $.label;
|
|
341
363
|
T && _.set(T, (_.get(T) || 0) + 1);
|
|
342
364
|
}
|
|
343
365
|
for (const $ of E) {
|
|
344
|
-
const T =
|
|
366
|
+
const T = Be($.dataType);
|
|
345
367
|
if (T !== "date" && T !== "datetime") continue;
|
|
346
|
-
const
|
|
368
|
+
const Oe = tt($), q = $.label, oe = nt({
|
|
347
369
|
label: q,
|
|
348
370
|
labelCount: q && _.get(q) || 0,
|
|
349
|
-
rawKey:
|
|
371
|
+
rawKey: Oe,
|
|
350
372
|
rawKeys: M
|
|
351
373
|
});
|
|
352
374
|
if (!oe) throw new U(a);
|
|
@@ -354,19 +376,19 @@ function Wn(e) {
|
|
|
354
376
|
scope: a,
|
|
355
377
|
target: { kind: "column", columnKey: oe },
|
|
356
378
|
format: ae({
|
|
357
|
-
format:
|
|
379
|
+
format: rt($),
|
|
358
380
|
preferences: e.valueFormatPreferences,
|
|
359
381
|
calendar: e.calendar
|
|
360
382
|
})
|
|
361
383
|
});
|
|
362
384
|
}
|
|
363
385
|
} else if (l === "freeform" && ((u = n.sql) != null && u.trim()) && !m.trim())
|
|
364
|
-
for (const [E,
|
|
386
|
+
for (const [E, C] of Object.entries(
|
|
365
387
|
((g = (h = n.preferences) == null ? void 0 : h.tablePrefs) == null ? void 0 : g.columnSettingsMap) || {}
|
|
366
388
|
)) {
|
|
367
|
-
if (
|
|
368
|
-
const _ =
|
|
369
|
-
|
|
389
|
+
if (C.type !== "date") continue;
|
|
390
|
+
const _ = ot(
|
|
391
|
+
C.dateFormat
|
|
370
392
|
);
|
|
371
393
|
_ && c.push({
|
|
372
394
|
scope: a,
|
|
@@ -382,11 +404,11 @@ function Wn(e) {
|
|
|
382
404
|
}
|
|
383
405
|
);
|
|
384
406
|
}
|
|
385
|
-
function
|
|
407
|
+
function It(e) {
|
|
386
408
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
387
409
|
}
|
|
388
410
|
function A(e, n, t) {
|
|
389
|
-
return
|
|
411
|
+
return It(e) ? e : (t.push({ field: n, message: "Expected an object." }), {});
|
|
390
412
|
}
|
|
391
413
|
function w(e, n, t, r) {
|
|
392
414
|
const o = new Set(t);
|
|
@@ -537,7 +559,7 @@ function ce(e, n, t) {
|
|
|
537
559
|
}
|
|
538
560
|
return o;
|
|
539
561
|
}
|
|
540
|
-
function
|
|
562
|
+
function vt(e, n) {
|
|
541
563
|
const t = "presentation.appearance", r = A(e, t, n);
|
|
542
564
|
w(r, t, ["version", "schemes"], n);
|
|
543
565
|
const o = {};
|
|
@@ -562,7 +584,7 @@ function ht(e, n) {
|
|
|
562
584
|
}
|
|
563
585
|
return o;
|
|
564
586
|
}
|
|
565
|
-
function
|
|
587
|
+
function Et(e, n) {
|
|
566
588
|
const t = "presentation.brandOverrides", r = A(e, t, n);
|
|
567
589
|
w(r, t, ["brandName", "logoUrl", "link"], n);
|
|
568
590
|
const o = F(
|
|
@@ -577,7 +599,7 @@ function yt(e, n) {
|
|
|
577
599
|
...i !== void 0 ? { link: i } : {}
|
|
578
600
|
};
|
|
579
601
|
}
|
|
580
|
-
function
|
|
602
|
+
function $t(e, n) {
|
|
581
603
|
const t = "presentation.fragments", r = A(e, t, n), o = [
|
|
582
604
|
"preHeaderText",
|
|
583
605
|
"headerBannerHtml",
|
|
@@ -599,9 +621,9 @@ function gt(e, n) {
|
|
|
599
621
|
c !== void 0 && (a[i] = c);
|
|
600
622
|
}), a;
|
|
601
623
|
}
|
|
602
|
-
function
|
|
624
|
+
function xt(e) {
|
|
603
625
|
const n = [], t = {};
|
|
604
|
-
if (e.appearance !== void 0 && (t.appearance =
|
|
626
|
+
if (e.appearance !== void 0 && (t.appearance = vt(e.appearance, n)), e.brandOverrides !== void 0 && (t.brandOverrides = Et(e.brandOverrides, n)), e.fragments !== void 0 && (t.fragments = $t(e.fragments, n)), e.viewUrl !== void 0) {
|
|
605
627
|
const r = ee(e.viewUrl, "presentation.viewUrl", n);
|
|
606
628
|
r !== void 0 && (t.viewUrl = r);
|
|
607
629
|
}
|
|
@@ -615,21 +637,21 @@ const P = [
|
|
|
615
637
|
"THU",
|
|
616
638
|
"FRI",
|
|
617
639
|
"SAT"
|
|
618
|
-
],
|
|
640
|
+
], fe = new Map(
|
|
619
641
|
P.map((e, n) => [e, n])
|
|
620
|
-
), z = [1, 2, 3, 4, 5],
|
|
642
|
+
), z = [1, 2, 3, 4, 5], ue = [1, 2, 3, 6, 12], pe = {
|
|
621
643
|
1: "first",
|
|
622
644
|
2: "second",
|
|
623
645
|
3: "third",
|
|
624
646
|
4: "fourth",
|
|
625
647
|
[-1]: "last"
|
|
626
|
-
},
|
|
648
|
+
}, or = {
|
|
627
649
|
frequency: "weekly",
|
|
628
650
|
hour: 9,
|
|
629
651
|
minute: 0,
|
|
630
652
|
weekdays: [1]
|
|
631
653
|
}, S = { ok: !1, issue: "Choose a supported schedule." };
|
|
632
|
-
function
|
|
654
|
+
function Ct(e) {
|
|
633
655
|
if (typeof e != "string" || e.length === 0 || e !== e.trim() || /^(?:(?:UTC|GMT)[+-]|[+-]\d{2}:\d{2}$)/.test(e))
|
|
634
656
|
return !1;
|
|
635
657
|
try {
|
|
@@ -638,17 +660,17 @@ function It(e) {
|
|
|
638
660
|
return !1;
|
|
639
661
|
}
|
|
640
662
|
}
|
|
641
|
-
function
|
|
663
|
+
function Tt(e) {
|
|
642
664
|
return Number.isInteger(e.minute) && e.minute >= 0 && e.minute <= 59 && Number.isInteger(e.hour) && e.hour >= 0 && e.hour <= 23;
|
|
643
665
|
}
|
|
644
|
-
function
|
|
666
|
+
function he(e) {
|
|
645
667
|
if (e.length === 0) return null;
|
|
646
668
|
const n = [...e].sort((t, r) => t - r);
|
|
647
669
|
return n.some(
|
|
648
670
|
(t, r) => !Number.isInteger(t) || t < 0 || t > 6 || r > 0 && t === n[r - 1]
|
|
649
671
|
) ? null : n;
|
|
650
672
|
}
|
|
651
|
-
function
|
|
673
|
+
function ye(e) {
|
|
652
674
|
const t = [...e.filter((o) => o !== "last")].sort((o, a) => o - a);
|
|
653
675
|
if (t.some(
|
|
654
676
|
(o, a) => !Number.isInteger(o) || o < 1 || o > 31 || a > 0 && o === t[a - 1]
|
|
@@ -663,51 +685,51 @@ function R(e, n) {
|
|
|
663
685
|
t.push((n + r * e) % 12);
|
|
664
686
|
return t.sort((r, o) => r - o);
|
|
665
687
|
}
|
|
666
|
-
function
|
|
688
|
+
function St(e, n) {
|
|
667
689
|
return e === 1 ? "*" : R(e, n).map((t) => t + 1).join(",");
|
|
668
690
|
}
|
|
669
|
-
function
|
|
670
|
-
return e.every((t) =>
|
|
691
|
+
function ge(e, n) {
|
|
692
|
+
return e.every((t) => Nt(t, n));
|
|
671
693
|
}
|
|
672
|
-
function
|
|
673
|
-
if (!
|
|
694
|
+
function ar(e) {
|
|
695
|
+
if (!Tt(e))
|
|
674
696
|
throw new Error("Choose a valid schedule time.");
|
|
675
697
|
const n = `${e.minute} ${e.hour}`;
|
|
676
698
|
switch (e.frequency) {
|
|
677
699
|
case "daily":
|
|
678
700
|
return e.weekdaysOnly ? `${n} * * ${z.map((t) => P[t]).join(",")}` : `${n} * * *`;
|
|
679
701
|
case "weekly": {
|
|
680
|
-
const t =
|
|
702
|
+
const t = he(e.weekdays);
|
|
681
703
|
if (!t) throw new Error("Choose at least one weekday.");
|
|
682
704
|
return `${n} * * ${t.map((r) => P[r]).join(",")}`;
|
|
683
705
|
}
|
|
684
706
|
case "monthly": {
|
|
685
|
-
if (!
|
|
707
|
+
if (!ue.includes(e.interval) || !Number.isInteger(e.startMonth) || e.startMonth < 0 || e.startMonth >= e.interval)
|
|
686
708
|
throw new Error("Choose a valid month cycle.");
|
|
687
|
-
const t =
|
|
709
|
+
const t = St(e.interval, e.startMonth);
|
|
688
710
|
if (e.on.type === "days") {
|
|
689
|
-
const i =
|
|
711
|
+
const i = ye(e.on.days);
|
|
690
712
|
if (!i) throw new Error("Choose at least one day of the month.");
|
|
691
713
|
const c = R(e.interval, e.startMonth);
|
|
692
|
-
if (!
|
|
714
|
+
if (!ge(i, c))
|
|
693
715
|
throw new Error("Choose a day that occurs in the chosen months.");
|
|
694
716
|
const l = i.map((m) => m === "last" ? "L" : String(m)).join(",");
|
|
695
717
|
return `${n} ${l} ${t} *`;
|
|
696
718
|
}
|
|
697
719
|
const { ordinal: r, weekday: o } = e.on;
|
|
698
|
-
if (!Number.isInteger(o) || o < 0 || o > 6 || !(r in
|
|
720
|
+
if (!Number.isInteger(o) || o < 0 || o > 6 || !(r in pe))
|
|
699
721
|
throw new Error("Choose a valid weekday.");
|
|
700
722
|
const a = P[o];
|
|
701
723
|
return `${n} * ${t} ${r === -1 ? `${a}L` : `${a}#${r}`}`;
|
|
702
724
|
}
|
|
703
725
|
}
|
|
704
726
|
}
|
|
705
|
-
function
|
|
727
|
+
function kt(e) {
|
|
706
728
|
if (e === "*") return { interval: 1, startMonth: 0 };
|
|
707
729
|
const n = e.split(",");
|
|
708
730
|
if (n.some((i) => !/^([1-9]|1[0-2])$/.test(i))) return null;
|
|
709
731
|
const t = n.map((i) => Number(i) - 1), r = 12 / t.length;
|
|
710
|
-
if (!
|
|
732
|
+
if (!ue.includes(r))
|
|
711
733
|
return null;
|
|
712
734
|
const o = t[0], a = R(
|
|
713
735
|
r,
|
|
@@ -715,24 +737,24 @@ function $t(e) {
|
|
|
715
737
|
);
|
|
716
738
|
return o >= r || a.length !== t.length || a.some((i, c) => i !== t[c]) ? null : { interval: r, startMonth: o };
|
|
717
739
|
}
|
|
718
|
-
function
|
|
740
|
+
function At(e) {
|
|
719
741
|
const n = e.split(",");
|
|
720
742
|
if (n.some((o) => !/^(L|[1-9]|[12]\d|3[01])$/.test(o))) return null;
|
|
721
743
|
const t = n.map(
|
|
722
744
|
(o) => o === "L" ? "last" : Number(o)
|
|
723
|
-
), r =
|
|
745
|
+
), r = ye(t);
|
|
724
746
|
return !r || r.some((o, a) => o !== t[a]) ? null : r;
|
|
725
747
|
}
|
|
726
|
-
function
|
|
748
|
+
function wt(e) {
|
|
727
749
|
const n = /^([A-Z]{3})(?:#([1-4])|(L))$/.exec(e);
|
|
728
750
|
if (!n) return null;
|
|
729
|
-
const t =
|
|
751
|
+
const t = fe.get(n[1]);
|
|
730
752
|
return t === void 0 ? null : {
|
|
731
753
|
weekday: t,
|
|
732
754
|
ordinal: n[3] ? -1 : Number(n[2])
|
|
733
755
|
};
|
|
734
756
|
}
|
|
735
|
-
function
|
|
757
|
+
function be(e) {
|
|
736
758
|
if (typeof e != "string" || e.length === 0 || e !== e.trim() || e.includes(" "))
|
|
737
759
|
return S;
|
|
738
760
|
const n = e.split(" ");
|
|
@@ -748,10 +770,10 @@ function ge(e) {
|
|
|
748
770
|
value: { frequency: "daily", hour: l, minute: c, weekdaysOnly: !1 }
|
|
749
771
|
};
|
|
750
772
|
if (a === "*" && o === "*" && !i.includes("#") && !i.endsWith("L")) {
|
|
751
|
-
const u = i.split(",").map((E) =>
|
|
773
|
+
const u = i.split(",").map((E) => fe.get(E));
|
|
752
774
|
if (u.some((E) => E === void 0)) return S;
|
|
753
|
-
const h = u, g =
|
|
754
|
-
return !g || g.some((E,
|
|
775
|
+
const h = u, g = he(h);
|
|
776
|
+
return !g || g.some((E, C) => E !== h[C]) ? S : g.length === z.length && g.every((E, C) => E === z[C]) ? {
|
|
755
777
|
ok: !0,
|
|
756
778
|
value: { frequency: "daily", hour: l, minute: c, weekdaysOnly: !0 }
|
|
757
779
|
} : {
|
|
@@ -759,11 +781,11 @@ function ge(e) {
|
|
|
759
781
|
value: { frequency: "weekly", hour: l, minute: c, weekdays: g }
|
|
760
782
|
};
|
|
761
783
|
}
|
|
762
|
-
const m =
|
|
784
|
+
const m = kt(a);
|
|
763
785
|
if (!m) return S;
|
|
764
786
|
if (o !== "*" && i === "*") {
|
|
765
|
-
const s =
|
|
766
|
-
return !s || !
|
|
787
|
+
const s = At(o), u = R(m.interval, m.startMonth);
|
|
788
|
+
return !s || !ge(s, u) ? S : {
|
|
767
789
|
ok: !0,
|
|
768
790
|
value: {
|
|
769
791
|
frequency: "monthly",
|
|
@@ -775,7 +797,7 @@ function ge(e) {
|
|
|
775
797
|
};
|
|
776
798
|
}
|
|
777
799
|
if (o === "*" && i !== "*") {
|
|
778
|
-
const s =
|
|
800
|
+
const s = wt(i);
|
|
779
801
|
return s ? {
|
|
780
802
|
ok: !0,
|
|
781
803
|
value: {
|
|
@@ -789,14 +811,14 @@ function ge(e) {
|
|
|
789
811
|
}
|
|
790
812
|
return S;
|
|
791
813
|
}
|
|
792
|
-
function
|
|
814
|
+
function Dt(e, n, t) {
|
|
793
815
|
return new Intl.DateTimeFormat(t, {
|
|
794
816
|
hour: "numeric",
|
|
795
817
|
minute: "2-digit",
|
|
796
818
|
timeZone: "UTC"
|
|
797
819
|
}).format(new Date(Date.UTC(2020, 0, 1, e, n)));
|
|
798
820
|
}
|
|
799
|
-
function
|
|
821
|
+
function _t(e, n) {
|
|
800
822
|
var t;
|
|
801
823
|
if (e === "UTC") return "UTC";
|
|
802
824
|
try {
|
|
@@ -811,11 +833,11 @@ function St(e, n) {
|
|
|
811
833
|
function le(e) {
|
|
812
834
|
return e.length <= 1 ? e.join("") : e.length === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")} and ${e[e.length - 1]}`;
|
|
813
835
|
}
|
|
814
|
-
function
|
|
836
|
+
function Ot(e) {
|
|
815
837
|
const n = e % 100;
|
|
816
838
|
return n >= 11 && n <= 13 ? `${e}th` : `${e}${["th", "st", "nd", "rd"][e % 10] ?? "th"}`;
|
|
817
839
|
}
|
|
818
|
-
function
|
|
840
|
+
function Ft(e, n, t) {
|
|
819
841
|
const r = (a, i) => new Intl.DateTimeFormat(t, { month: i, timeZone: "UTC" }).format(
|
|
820
842
|
new Date(Date.UTC(2020, a, 1))
|
|
821
843
|
);
|
|
@@ -824,13 +846,13 @@ function At(e, n, t) {
|
|
|
824
846
|
const o = R(e, n).map((a) => r(a, "short")).join(", ");
|
|
825
847
|
return e === 3 ? `each quarter (${o})` : `every ${e} months (${o})`;
|
|
826
848
|
}
|
|
827
|
-
function
|
|
828
|
-
const r =
|
|
849
|
+
function ir(e, n, t = "en-US") {
|
|
850
|
+
const r = be(e);
|
|
829
851
|
if (!r.ok) return null;
|
|
830
852
|
try {
|
|
831
|
-
const o = r.value, a =
|
|
853
|
+
const o = r.value, a = _t(n, t);
|
|
832
854
|
if (!a) return null;
|
|
833
|
-
const i = `at ${
|
|
855
|
+
const i = `at ${Dt(o.hour, o.minute, t)} ${a}`, c = (l) => new Intl.DateTimeFormat(t, {
|
|
834
856
|
weekday: "long",
|
|
835
857
|
timeZone: "UTC"
|
|
836
858
|
}).format(new Date(Date.UTC(2023, 0, 1 + l)));
|
|
@@ -840,11 +862,11 @@ function Yn(e, n, t = "en-US") {
|
|
|
840
862
|
case "weekly":
|
|
841
863
|
return `Every ${le(o.weekdays.map(c))} ${i}`;
|
|
842
864
|
case "monthly": {
|
|
843
|
-
const l =
|
|
865
|
+
const l = Ft(o.interval, o.startMonth, t);
|
|
844
866
|
if (o.on.type === "weekday")
|
|
845
|
-
return `On the ${
|
|
867
|
+
return `On the ${pe[o.on.ordinal]} ${c(o.on.weekday)} of ${l} ${i}`;
|
|
846
868
|
const m = o.on.days.map(
|
|
847
|
-
(s) => s === "last" ? "last day" :
|
|
869
|
+
(s) => s === "last" ? "last day" : Ot(s)
|
|
848
870
|
);
|
|
849
871
|
return `On the ${le(m)} of ${l} ${i}`;
|
|
850
872
|
}
|
|
@@ -853,23 +875,23 @@ function Yn(e, n, t = "en-US") {
|
|
|
853
875
|
return null;
|
|
854
876
|
}
|
|
855
877
|
}
|
|
856
|
-
const
|
|
857
|
-
function
|
|
858
|
-
return e === "last" || n.some((t) => e <=
|
|
878
|
+
const Ie = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
879
|
+
function Nt(e, n) {
|
|
880
|
+
return e === "last" || n.some((t) => e <= Ie[t]);
|
|
859
881
|
}
|
|
860
|
-
function
|
|
882
|
+
function cr(e) {
|
|
861
883
|
if (e.frequency !== "monthly" || e.on.type !== "days") return null;
|
|
862
884
|
const n = e.on.days.filter((o) => o !== "last");
|
|
863
885
|
if (n.length === 0) return null;
|
|
864
886
|
const t = Math.max(...n), r = R(e.interval, e.startMonth).filter(
|
|
865
|
-
(o) => t > (o === 1 ? 28 :
|
|
887
|
+
(o) => t > (o === 1 ? 28 : Ie[o])
|
|
866
888
|
);
|
|
867
889
|
return r.length > 0 ? { day: t, months: r } : null;
|
|
868
890
|
}
|
|
869
|
-
function
|
|
891
|
+
function Rt(e, n) {
|
|
870
892
|
return new Date(Date.UTC(e, n + 1, 0)).getUTCDate();
|
|
871
893
|
}
|
|
872
|
-
function
|
|
894
|
+
function Bt(e, n, t, r) {
|
|
873
895
|
const o = new Date(Date.UTC(n, t, r)).getUTCDay();
|
|
874
896
|
switch (e.frequency) {
|
|
875
897
|
case "daily":
|
|
@@ -879,16 +901,16 @@ function _t(e, n, t, r) {
|
|
|
879
901
|
case "monthly": {
|
|
880
902
|
if (!R(e.interval, e.startMonth).includes(t))
|
|
881
903
|
return !1;
|
|
882
|
-
const a =
|
|
904
|
+
const a = Rt(n, t);
|
|
883
905
|
return e.on.type === "days" ? e.on.days.some(
|
|
884
906
|
(i) => i === "last" ? r === a : i === r
|
|
885
907
|
) : o !== e.on.weekday ? !1 : e.on.ordinal === -1 ? r + 7 > a : Math.ceil(r / 7) === e.on.ordinal;
|
|
886
908
|
}
|
|
887
909
|
}
|
|
888
910
|
}
|
|
889
|
-
function
|
|
890
|
-
const o =
|
|
891
|
-
if (!o.ok || !
|
|
911
|
+
function lr(e, n, t, r) {
|
|
912
|
+
const o = be(e);
|
|
913
|
+
if (!o.ok || !Ct(n)) return [];
|
|
892
914
|
const a = o.value, i = new Intl.DateTimeFormat("en-US", {
|
|
893
915
|
timeZone: n,
|
|
894
916
|
hourCycle: "h23",
|
|
@@ -904,10 +926,10 @@ function Qn(e, n, t, r) {
|
|
|
904
926
|
c("hour") * 60 + c("minute") >= a.hour * 60 + a.minute && l.setUTCDate(l.getUTCDate() + 1);
|
|
905
927
|
const m = [];
|
|
906
928
|
for (let s = 0; s < 366 * 4 * (r + 1) && m.length < r; s += 1)
|
|
907
|
-
|
|
929
|
+
Bt(a, l.getUTCFullYear(), l.getUTCMonth(), l.getUTCDate()) && m.push(l.toISOString().slice(0, 10)), l.setUTCDate(l.getUTCDate() + 1);
|
|
908
930
|
return m;
|
|
909
931
|
}
|
|
910
|
-
const
|
|
932
|
+
const Mt = Object.freeze([
|
|
911
933
|
"PDF_ROW_LIMIT_EXCEEDED",
|
|
912
934
|
"PDF_SIZE_LIMIT_EXCEEDED",
|
|
913
935
|
"TABLE_COMPLETENESS_UNVERIFIED",
|
|
@@ -920,15 +942,17 @@ const Ot = Object.freeze([
|
|
|
920
942
|
"EXCEL_LIMIT_EXCEEDED",
|
|
921
943
|
"EXPORT_ROW_LIMIT_EXCEEDED",
|
|
922
944
|
"EXPORT_COUNT_UNAVAILABLE",
|
|
923
|
-
"EXPORT_NO_ROWS"
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
945
|
+
"EXPORT_NO_ROWS",
|
|
946
|
+
// A dashboard sheet too tall for one image (PNG exports PN-D7).
|
|
947
|
+
"IMAGE_TOO_LARGE"
|
|
948
|
+
]), Lt = new Set(Mt);
|
|
949
|
+
function Ut(e) {
|
|
950
|
+
return typeof e == "string" && Lt.has(e);
|
|
927
951
|
}
|
|
928
|
-
function
|
|
952
|
+
function Pt(e) {
|
|
929
953
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
930
954
|
const n = e;
|
|
931
|
-
return typeof n.index != "number" || !Number.isInteger(n.index) || n.index < 0 || typeof n.title != "string" ||
|
|
955
|
+
return typeof n.index != "number" || !Number.isInteger(n.index) || n.index < 0 || typeof n.title != "string" || !ve.includes(n.format) || !Ut(n.code) || typeof n.reason != "string" || typeof n.diagnostic != "string" ? null : {
|
|
932
956
|
index: n.index,
|
|
933
957
|
title: n.title,
|
|
934
958
|
format: n.format,
|
|
@@ -937,39 +961,39 @@ function Rt(e) {
|
|
|
937
961
|
diagnostic: n.diagnostic
|
|
938
962
|
};
|
|
939
963
|
}
|
|
940
|
-
function
|
|
964
|
+
function dr(e) {
|
|
941
965
|
if (!e || typeof e != "object" || Array.isArray(e)) return [];
|
|
942
966
|
const n = e.omittedAttachments;
|
|
943
967
|
return Array.isArray(n) ? n.flatMap((t) => {
|
|
944
|
-
const r =
|
|
968
|
+
const r = Pt(t);
|
|
945
969
|
return r ? [r] : [];
|
|
946
970
|
}) : [];
|
|
947
971
|
}
|
|
948
|
-
function
|
|
972
|
+
function sr(e) {
|
|
949
973
|
return e != null && e.role ? e.type === "tenant" ? e.role === "POWER_USER" : ["AUTHOR", "ADMIN", "SUPER_ADMIN"].includes(e.role) : !1;
|
|
950
974
|
}
|
|
951
|
-
function
|
|
975
|
+
function mr(e) {
|
|
952
976
|
return e.canCreate ? [
|
|
953
977
|
...e.scheduledReportAvailable ? ["scheduled_report"] : [],
|
|
954
978
|
...e.analyticalBriefingsEnabled ? ["analytical_briefing"] : []
|
|
955
979
|
] : [];
|
|
956
980
|
}
|
|
957
|
-
function
|
|
981
|
+
function Vt(e) {
|
|
958
982
|
const n = (e == null ? void 0 : e.channels) ?? [];
|
|
959
983
|
return n.length === 1 && n[0] === "EMAIL";
|
|
960
984
|
}
|
|
961
|
-
function
|
|
962
|
-
return e.body.type === "generated_analysis" ? "Analytical briefing" : e.body.type === "custom_message" && e.attachments.length > 0 &&
|
|
985
|
+
function zt(e) {
|
|
986
|
+
return e.body.type === "generated_analysis" ? "Analytical briefing" : e.body.type === "custom_message" && e.attachments.length > 0 && Vt(e.deliveryConfig) ? e.scheduleExpr ? "Scheduled report" : "On-demand report" : "Plain briefing";
|
|
963
987
|
}
|
|
964
|
-
function
|
|
965
|
-
const n =
|
|
988
|
+
function fr(e) {
|
|
989
|
+
const n = zt(e), t = n === "Scheduled report" || n === "On-demand report" ? "report" : "briefing";
|
|
966
990
|
return {
|
|
967
991
|
typeLabel: n,
|
|
968
992
|
noun: t,
|
|
969
993
|
pluralNoun: t === "report" ? "reports" : "briefings"
|
|
970
994
|
};
|
|
971
995
|
}
|
|
972
|
-
const Z = "BRIEFING",
|
|
996
|
+
const Z = "BRIEFING", jt = ["markdown", "html"], Y = ["markdown"], H = 20, f = {
|
|
973
997
|
name: 500,
|
|
974
998
|
description: 2e3,
|
|
975
999
|
instruction: 5e4,
|
|
@@ -985,7 +1009,7 @@ const Z = "BRIEFING", Lt = ["markdown", "html"], Y = ["markdown"], H = 20, f = {
|
|
|
985
1009
|
presentationTone: 500,
|
|
986
1010
|
presentationFormat: 2e3,
|
|
987
1011
|
id: 500
|
|
988
|
-
},
|
|
1012
|
+
}, x = {
|
|
989
1013
|
maxBlocks: 50,
|
|
990
1014
|
maxTableRows: 100,
|
|
991
1015
|
maxTableColumns: 20,
|
|
@@ -998,7 +1022,7 @@ const Z = "BRIEFING", Lt = ["markdown", "html"], Y = ["markdown"], H = 20, f = {
|
|
|
998
1022
|
// tiny tiles in narrow client panels; 2-up was the chosen layout).
|
|
999
1023
|
maxKpiTiles: 8
|
|
1000
1024
|
};
|
|
1001
|
-
function
|
|
1025
|
+
function qt(e) {
|
|
1002
1026
|
if (e === null || typeof e != "object" || Array.isArray(e))
|
|
1003
1027
|
return !1;
|
|
1004
1028
|
const n = e;
|
|
@@ -1008,17 +1032,17 @@ function Ut(e) {
|
|
|
1008
1032
|
if (t === null || typeof t != "object" || Array.isArray(t))
|
|
1009
1033
|
return !1;
|
|
1010
1034
|
const r = t;
|
|
1011
|
-
return (r.kind === "metric" && typeof r.metricId == "string" && !!r.metricId.trim() || r.kind === "column" && typeof r.columnKey == "string" && !!r.columnKey.trim() || r.kind === "matrix_measure" && typeof r.measureId == "string" && !!r.measureId.trim()) &&
|
|
1035
|
+
return (r.kind === "metric" && typeof r.metricId == "string" && !!r.metricId.trim() || r.kind === "column" && typeof r.columnKey == "string" && !!r.columnKey.trim() || r.kind === "matrix_measure" && typeof r.measureId == "string" && !!r.measureId.trim()) && se(n.format).ok;
|
|
1012
1036
|
}
|
|
1013
|
-
function
|
|
1014
|
-
return e == null ? "" :
|
|
1037
|
+
function Kt(e) {
|
|
1038
|
+
return e == null ? "" : qt(e) ? Re(e.value, e.format) : String(e);
|
|
1015
1039
|
}
|
|
1016
|
-
function
|
|
1040
|
+
function ur(e) {
|
|
1017
1041
|
return [e.delta, e.percentChange].filter(
|
|
1018
1042
|
(n) => n != null
|
|
1019
|
-
).map(
|
|
1043
|
+
).map(Kt).filter(Boolean).join(" / ");
|
|
1020
1044
|
}
|
|
1021
|
-
const
|
|
1045
|
+
const ve = ["pdf", "png", "csv", "xlsx"], Ee = new Set(jt), Ht = /* @__PURE__ */ new Set([
|
|
1022
1046
|
"EMAIL",
|
|
1023
1047
|
"WEBHOOK",
|
|
1024
1048
|
"SLACK",
|
|
@@ -1029,39 +1053,39 @@ const Ie = new Set(Lt), Vt = /* @__PURE__ */ new Set([
|
|
|
1029
1053
|
maxPlanningIterations: { min: 1, max: 10 },
|
|
1030
1054
|
maxRows: { min: 1, max: 1e5 },
|
|
1031
1055
|
timeoutMs: { min: 1e3, max: 30 * 6e4 }
|
|
1032
|
-
},
|
|
1056
|
+
}, Gt = /* @__PURE__ */ new Set([
|
|
1033
1057
|
"letter",
|
|
1034
1058
|
"legal",
|
|
1035
1059
|
"a4",
|
|
1036
1060
|
"a3",
|
|
1037
1061
|
"tabloid"
|
|
1038
|
-
]),
|
|
1062
|
+
]), Wt = /* @__PURE__ */ new Set([
|
|
1039
1063
|
"portrait",
|
|
1040
1064
|
"landscape"
|
|
1041
|
-
]),
|
|
1065
|
+
]), Xt = /* @__PURE__ */ new Set([",", ";", " "]), Zt = new Set(Ue), Yt = /* @__PURE__ */ new Set([
|
|
1042
1066
|
"current",
|
|
1043
1067
|
"all"
|
|
1044
|
-
]),
|
|
1068
|
+
]), Jt = /* @__PURE__ */ new Set([
|
|
1045
1069
|
"concise",
|
|
1046
1070
|
"balanced",
|
|
1047
1071
|
"detailed"
|
|
1048
|
-
]),
|
|
1072
|
+
]), Qt = /* @__PURE__ */ new Set([
|
|
1049
1073
|
"info",
|
|
1050
1074
|
"positive",
|
|
1051
1075
|
"warning",
|
|
1052
1076
|
"critical"
|
|
1053
|
-
]),
|
|
1077
|
+
]), en = /* @__PURE__ */ new Set([
|
|
1054
1078
|
"text",
|
|
1055
1079
|
"number",
|
|
1056
1080
|
"currency",
|
|
1057
1081
|
"percent",
|
|
1058
1082
|
"date",
|
|
1059
1083
|
"boolean"
|
|
1060
|
-
]),
|
|
1084
|
+
]), tn = /* @__PURE__ */ new Set([
|
|
1061
1085
|
"left",
|
|
1062
1086
|
"center",
|
|
1063
1087
|
"right"
|
|
1064
|
-
]),
|
|
1088
|
+
]), nn = [
|
|
1065
1089
|
"matrix",
|
|
1066
1090
|
"pageSize",
|
|
1067
1091
|
"orientation",
|
|
@@ -1099,14 +1123,14 @@ class j extends Error {
|
|
|
1099
1123
|
this.name = "BriefingContractError", this.issues = t;
|
|
1100
1124
|
}
|
|
1101
1125
|
}
|
|
1102
|
-
function
|
|
1126
|
+
function $e(e) {
|
|
1103
1127
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1104
1128
|
}
|
|
1105
1129
|
function d(e, n, t) {
|
|
1106
1130
|
e.push({ field: n, message: t });
|
|
1107
1131
|
}
|
|
1108
1132
|
function v(e, n, t) {
|
|
1109
|
-
return
|
|
1133
|
+
return $e(e) ? e : (d(t, n, "Expected an object."), {});
|
|
1110
1134
|
}
|
|
1111
1135
|
function p(e, n, t, r) {
|
|
1112
1136
|
const o = new Set(t);
|
|
@@ -1135,13 +1159,13 @@ function I(e, n, t, r) {
|
|
|
1135
1159
|
if (o)
|
|
1136
1160
|
return o.length > t && d(r, n, `Must be ${t} characters or fewer.`), o;
|
|
1137
1161
|
}
|
|
1138
|
-
function
|
|
1162
|
+
function rn(e, n, t, r) {
|
|
1139
1163
|
if (typeof e != "string")
|
|
1140
1164
|
return d(r, n, "Expected a string."), "";
|
|
1141
1165
|
const o = e.trim();
|
|
1142
1166
|
return o.length > t && d(r, n, `Must be ${t} characters or fewer.`), o;
|
|
1143
1167
|
}
|
|
1144
|
-
function
|
|
1168
|
+
function on(e, n, t) {
|
|
1145
1169
|
if (e != null) {
|
|
1146
1170
|
if (!Number.isInteger(e) || Number(e) < 0) {
|
|
1147
1171
|
d(t, n, "Expected a non-negative integer.");
|
|
@@ -1169,13 +1193,13 @@ function k(e, n, t, r = {}) {
|
|
|
1169
1193
|
function N(e, n, t, r) {
|
|
1170
1194
|
return e == null ? n : typeof e != "boolean" ? (d(r, t, "Expected a boolean."), n) : e;
|
|
1171
1195
|
}
|
|
1172
|
-
function
|
|
1196
|
+
function an(e, n) {
|
|
1173
1197
|
return e == null ? "ACTIVE" : e === "ACTIVE" || e === "PAUSED" || e === "DISABLED" ? e : (d(n, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
|
|
1174
1198
|
}
|
|
1175
|
-
function
|
|
1199
|
+
function cn(e) {
|
|
1176
1200
|
return e.includes("@") && e.includes(".") && !e.includes(" ");
|
|
1177
1201
|
}
|
|
1178
|
-
function
|
|
1202
|
+
function xe(e, n) {
|
|
1179
1203
|
if (e == null)
|
|
1180
1204
|
return { type: "project" };
|
|
1181
1205
|
const t = v(e, "source", n), r = t.type;
|
|
@@ -1189,7 +1213,7 @@ function Ee(e, n) {
|
|
|
1189
1213
|
)
|
|
1190
1214
|
}) : (d(n, "source.type", "Expected project or dashboard."), { type: "project" });
|
|
1191
1215
|
}
|
|
1192
|
-
function
|
|
1216
|
+
function Ce(e, n) {
|
|
1193
1217
|
const t = v(e, "body", n), r = t.type;
|
|
1194
1218
|
return r === "generated_analysis" ? (p(t, "body", ["type", "instruction"], n), {
|
|
1195
1219
|
type: "generated_analysis",
|
|
@@ -1201,7 +1225,7 @@ function $e(e, n) {
|
|
|
1201
1225
|
)
|
|
1202
1226
|
}) : r === "custom_message" ? (p(t, "body", ["type", "message"], n), {
|
|
1203
1227
|
type: "custom_message",
|
|
1204
|
-
message:
|
|
1228
|
+
message: rn(
|
|
1205
1229
|
t.message,
|
|
1206
1230
|
"body.message",
|
|
1207
1231
|
f.customMessage,
|
|
@@ -1213,7 +1237,7 @@ function $e(e, n) {
|
|
|
1213
1237
|
"Expected generated_analysis, custom_message, or none."
|
|
1214
1238
|
), { type: "none" });
|
|
1215
1239
|
}
|
|
1216
|
-
function
|
|
1240
|
+
function ln(e, n) {
|
|
1217
1241
|
if (e == null)
|
|
1218
1242
|
return [...Y];
|
|
1219
1243
|
if (!Array.isArray(e))
|
|
@@ -1226,7 +1250,7 @@ function nn(e, n) {
|
|
|
1226
1250
|
), [];
|
|
1227
1251
|
const t = [];
|
|
1228
1252
|
return e.forEach((r, o) => {
|
|
1229
|
-
if (typeof r != "string" || !
|
|
1253
|
+
if (typeof r != "string" || !Ee.has(r)) {
|
|
1230
1254
|
d(
|
|
1231
1255
|
n,
|
|
1232
1256
|
`presentation.artifactFormats.${o}`,
|
|
@@ -1237,7 +1261,7 @@ function nn(e, n) {
|
|
|
1237
1261
|
t.includes(r) || t.push(r);
|
|
1238
1262
|
}), t;
|
|
1239
1263
|
}
|
|
1240
|
-
function
|
|
1264
|
+
function Te(e, n) {
|
|
1241
1265
|
if (e == null)
|
|
1242
1266
|
return {
|
|
1243
1267
|
artifactFormats: [...Y],
|
|
@@ -1263,7 +1287,7 @@ function Ce(e, n) {
|
|
|
1263
1287
|
n
|
|
1264
1288
|
);
|
|
1265
1289
|
const r = {
|
|
1266
|
-
artifactFormats:
|
|
1290
|
+
artifactFormats: ln(t.artifactFormats, n),
|
|
1267
1291
|
includeEvidence: N(
|
|
1268
1292
|
t.includeEvidence,
|
|
1269
1293
|
!0,
|
|
@@ -1293,15 +1317,15 @@ function Ce(e, n) {
|
|
|
1293
1317
|
n
|
|
1294
1318
|
);
|
|
1295
1319
|
o && (r.audience = o), a && (r.tone = a), i && (r.format = i);
|
|
1296
|
-
const c =
|
|
1320
|
+
const c = xt(t);
|
|
1297
1321
|
return c.issues.forEach((l) => d(n, l.field, l.message)), Object.assign(r, c.value), r;
|
|
1298
1322
|
}
|
|
1299
|
-
function
|
|
1300
|
-
return Array.isArray(e) ? (e.length === 0 && d(t, n, "Expected at least one item."), e.length >
|
|
1323
|
+
function dn(e, n, t) {
|
|
1324
|
+
return Array.isArray(e) ? (e.length === 0 && d(t, n, "Expected at least one item."), e.length > x.maxListItems && d(
|
|
1301
1325
|
t,
|
|
1302
1326
|
n,
|
|
1303
|
-
`Must have ${
|
|
1304
|
-
), e.slice(0,
|
|
1327
|
+
`Must have ${x.maxListItems} items or fewer.`
|
|
1328
|
+
), e.slice(0, x.maxListItems).map(
|
|
1305
1329
|
(r, o) => b(
|
|
1306
1330
|
r,
|
|
1307
1331
|
`${n}.${o}`,
|
|
@@ -1310,7 +1334,7 @@ function rn(e, n, t) {
|
|
|
1310
1334
|
)
|
|
1311
1335
|
).filter(Boolean)) : (d(t, n, "Expected an array."), []);
|
|
1312
1336
|
}
|
|
1313
|
-
function
|
|
1337
|
+
function sn(e, n, t) {
|
|
1314
1338
|
const r = v(e, n, t);
|
|
1315
1339
|
if (r.kind === "metric")
|
|
1316
1340
|
return p(r, n, ["kind", "metricId"], t), {
|
|
@@ -1348,18 +1372,18 @@ function on(e, n, t) {
|
|
|
1348
1372
|
"Expected metric, column, or matrix_measure."
|
|
1349
1373
|
);
|
|
1350
1374
|
}
|
|
1351
|
-
function
|
|
1375
|
+
function Se(e, n, t) {
|
|
1352
1376
|
if (e === null || typeof e != "object" || Array.isArray(e))
|
|
1353
1377
|
return;
|
|
1354
1378
|
const r = v(e, n, t);
|
|
1355
1379
|
if (!Object.prototype.hasOwnProperty.call(r, "target") && !Object.prototype.hasOwnProperty.call(r, "format"))
|
|
1356
1380
|
return;
|
|
1357
1381
|
p(r, n, ["value", "target", "format"], t), (typeof r.value != "number" || !Number.isFinite(r.value)) && d(t, `${n}.value`, "Expected a finite number.");
|
|
1358
|
-
const o =
|
|
1382
|
+
const o = sn(
|
|
1359
1383
|
r.target,
|
|
1360
1384
|
`${n}.target`,
|
|
1361
1385
|
t
|
|
1362
|
-
), a =
|
|
1386
|
+
), a = se(r.format);
|
|
1363
1387
|
if (a.ok || a.issues.forEach(
|
|
1364
1388
|
(i) => d(
|
|
1365
1389
|
t,
|
|
@@ -1379,7 +1403,7 @@ function O(e, n, t) {
|
|
|
1379
1403
|
}
|
|
1380
1404
|
return e;
|
|
1381
1405
|
}
|
|
1382
|
-
const r =
|
|
1406
|
+
const r = Se(e, n, t);
|
|
1383
1407
|
if (r) return r;
|
|
1384
1408
|
d(
|
|
1385
1409
|
t,
|
|
@@ -1387,30 +1411,30 @@ function O(e, n, t) {
|
|
|
1387
1411
|
"Expected a string, number, or structured numeric value."
|
|
1388
1412
|
);
|
|
1389
1413
|
}
|
|
1390
|
-
function
|
|
1414
|
+
function mn(e, n, t) {
|
|
1391
1415
|
if (e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean")
|
|
1392
1416
|
return typeof e == "string" && e.length > f.contentCell ? (d(
|
|
1393
1417
|
t,
|
|
1394
1418
|
n,
|
|
1395
1419
|
`Must be ${f.contentCell} characters or fewer.`
|
|
1396
1420
|
), e.slice(0, f.contentCell)) : typeof e == "number" && !Number.isFinite(e) ? (d(t, n, "Expected a finite number."), null) : e;
|
|
1397
|
-
const r =
|
|
1421
|
+
const r = Se(e, n, t);
|
|
1398
1422
|
return r || (d(
|
|
1399
1423
|
t,
|
|
1400
1424
|
n,
|
|
1401
1425
|
"Expected a string, number, boolean, structured numeric value, or null."
|
|
1402
1426
|
), null);
|
|
1403
1427
|
}
|
|
1404
|
-
function
|
|
1428
|
+
function fn(e, n, t) {
|
|
1405
1429
|
if (!Array.isArray(e))
|
|
1406
1430
|
return d(t, n, "Expected an array."), [];
|
|
1407
|
-
e.length === 0 && d(t, n, "Expected at least one column."), e.length >
|
|
1431
|
+
e.length === 0 && d(t, n, "Expected at least one column."), e.length > x.maxTableColumns && d(
|
|
1408
1432
|
t,
|
|
1409
1433
|
n,
|
|
1410
|
-
`Must have ${
|
|
1434
|
+
`Must have ${x.maxTableColumns} columns or fewer.`
|
|
1411
1435
|
);
|
|
1412
1436
|
const r = /* @__PURE__ */ new Set();
|
|
1413
|
-
return e.slice(0,
|
|
1437
|
+
return e.slice(0, x.maxTableColumns).map((o, a) => {
|
|
1414
1438
|
const i = `${n}.${a}`, c = v(o, i, t);
|
|
1415
1439
|
p(c, i, ["key", "label", "kind", "align"], t);
|
|
1416
1440
|
const l = b(
|
|
@@ -1428,13 +1452,13 @@ function cn(e, n, t) {
|
|
|
1428
1452
|
), s = D(
|
|
1429
1453
|
c.kind,
|
|
1430
1454
|
`${i}.kind`,
|
|
1431
|
-
|
|
1455
|
+
en,
|
|
1432
1456
|
"text, number, currency, percent, date, or boolean",
|
|
1433
1457
|
t
|
|
1434
1458
|
), u = D(
|
|
1435
1459
|
c.align,
|
|
1436
1460
|
`${i}.align`,
|
|
1437
|
-
|
|
1461
|
+
tn,
|
|
1438
1462
|
"left, center, or right",
|
|
1439
1463
|
t
|
|
1440
1464
|
);
|
|
@@ -1446,28 +1470,28 @@ function cn(e, n, t) {
|
|
|
1446
1470
|
};
|
|
1447
1471
|
});
|
|
1448
1472
|
}
|
|
1449
|
-
function
|
|
1473
|
+
function un(e, n, t, r) {
|
|
1450
1474
|
if (!Array.isArray(e))
|
|
1451
1475
|
return d(r, n, "Expected an array."), [];
|
|
1452
|
-
e.length >
|
|
1476
|
+
e.length > x.maxTableRows && d(
|
|
1453
1477
|
r,
|
|
1454
1478
|
n,
|
|
1455
|
-
`Must have ${
|
|
1479
|
+
`Must have ${x.maxTableRows} rows or fewer.`
|
|
1456
1480
|
);
|
|
1457
1481
|
const o = new Set(t.map((a) => a.key).filter(Boolean));
|
|
1458
|
-
return e.slice(0,
|
|
1482
|
+
return e.slice(0, x.maxTableRows).map((a, i) => {
|
|
1459
1483
|
const c = `${n}.${i}`, l = v(a, c, r);
|
|
1460
1484
|
return Object.keys(l).forEach((m) => {
|
|
1461
1485
|
o.has(m) || d(r, `${c}.${m}`, `Unexpected table cell "${m}".`);
|
|
1462
1486
|
}), Object.fromEntries(
|
|
1463
1487
|
t.map((m) => [
|
|
1464
1488
|
m.key,
|
|
1465
|
-
|
|
1489
|
+
mn(l[m.key] ?? null, `${c}.${m.key}`, r)
|
|
1466
1490
|
])
|
|
1467
1491
|
);
|
|
1468
1492
|
});
|
|
1469
1493
|
}
|
|
1470
|
-
function
|
|
1494
|
+
function pn(e, n, t) {
|
|
1471
1495
|
const r = `content.blocks.${n}`, o = v(e, r, t), a = o.type;
|
|
1472
1496
|
if (a === "heading") {
|
|
1473
1497
|
p(o, r, ["type", "text", "level", "evidenceIds"], t);
|
|
@@ -1510,7 +1534,7 @@ function dn(e, n, t) {
|
|
|
1510
1534
|
), c = D(
|
|
1511
1535
|
o.severity,
|
|
1512
1536
|
`${r}.severity`,
|
|
1513
|
-
|
|
1537
|
+
Qt,
|
|
1514
1538
|
"info, positive, warning, or critical",
|
|
1515
1539
|
t
|
|
1516
1540
|
);
|
|
@@ -1540,7 +1564,7 @@ function dn(e, n, t) {
|
|
|
1540
1564
|
return {
|
|
1541
1565
|
type: a,
|
|
1542
1566
|
...i ? { title: i } : {},
|
|
1543
|
-
items:
|
|
1567
|
+
items: dn(o.items, `${r}.items`, t),
|
|
1544
1568
|
...c ? { evidenceIds: c } : {}
|
|
1545
1569
|
};
|
|
1546
1570
|
}
|
|
@@ -1608,12 +1632,12 @@ function dn(e, n, t) {
|
|
|
1608
1632
|
f.contentTitle,
|
|
1609
1633
|
t
|
|
1610
1634
|
), c = Array.isArray(o.tiles) ? o.tiles : [];
|
|
1611
|
-
Array.isArray(o.tiles) || d(t, `${r}.tiles`, "Expected an array."), c.length === 0 && d(t, `${r}.tiles`, "Expected at least one tile."), c.length >
|
|
1635
|
+
Array.isArray(o.tiles) || d(t, `${r}.tiles`, "Expected an array."), c.length === 0 && d(t, `${r}.tiles`, "Expected at least one tile."), c.length > x.maxKpiTiles && d(
|
|
1612
1636
|
t,
|
|
1613
1637
|
`${r}.tiles`,
|
|
1614
|
-
`Must have ${
|
|
1638
|
+
`Must have ${x.maxKpiTiles} tiles or fewer.`
|
|
1615
1639
|
);
|
|
1616
|
-
const l = c.slice(0,
|
|
1640
|
+
const l = c.slice(0, x.maxKpiTiles).map((s, u) => {
|
|
1617
1641
|
const h = `${r}.tiles.${u}`, g = v(s, h, t);
|
|
1618
1642
|
p(
|
|
1619
1643
|
g,
|
|
@@ -1639,7 +1663,7 @@ function dn(e, n, t) {
|
|
|
1639
1663
|
`${h}.value`,
|
|
1640
1664
|
"Expected a non-empty string, number, or structured numeric value."
|
|
1641
1665
|
);
|
|
1642
|
-
const
|
|
1666
|
+
const C = g.previousValue === void 0 || g.previousValue === null ? g.previousValue : O(
|
|
1643
1667
|
g.previousValue,
|
|
1644
1668
|
`${h}.previousValue`,
|
|
1645
1669
|
t
|
|
@@ -1669,7 +1693,7 @@ function dn(e, n, t) {
|
|
|
1669
1693
|
t
|
|
1670
1694
|
),
|
|
1671
1695
|
value: E,
|
|
1672
|
-
...
|
|
1696
|
+
...C !== void 0 ? { previousValue: C } : {},
|
|
1673
1697
|
..._ !== void 0 ? { delta: _ } : {},
|
|
1674
1698
|
...M !== void 0 ? { percentChange: M } : {},
|
|
1675
1699
|
...$ ? { unit: $ } : {},
|
|
@@ -1717,7 +1741,7 @@ function dn(e, n, t) {
|
|
|
1717
1741
|
["type", "id", "title", "columns", "rows", "caption", "totalRows", "evidenceIds"],
|
|
1718
1742
|
t
|
|
1719
1743
|
);
|
|
1720
|
-
const i =
|
|
1744
|
+
const i = fn(o.columns, `${r}.columns`, t), c = I(
|
|
1721
1745
|
o.title,
|
|
1722
1746
|
`${r}.title`,
|
|
1723
1747
|
f.contentTitle,
|
|
@@ -1732,7 +1756,7 @@ function dn(e, n, t) {
|
|
|
1732
1756
|
`${r}.caption`,
|
|
1733
1757
|
f.contentItem,
|
|
1734
1758
|
t
|
|
1735
|
-
), s =
|
|
1759
|
+
), s = on(
|
|
1736
1760
|
o.totalRows,
|
|
1737
1761
|
`${r}.totalRows`,
|
|
1738
1762
|
t
|
|
@@ -1742,7 +1766,7 @@ function dn(e, n, t) {
|
|
|
1742
1766
|
...l ? { id: l } : {},
|
|
1743
1767
|
...c ? { title: c } : {},
|
|
1744
1768
|
columns: i,
|
|
1745
|
-
rows:
|
|
1769
|
+
rows: un(o.rows, `${r}.rows`, i, t),
|
|
1746
1770
|
...m ? { caption: m } : {},
|
|
1747
1771
|
...s !== void 0 ? { totalRows: s } : {},
|
|
1748
1772
|
...u ? { evidenceIds: u } : {}
|
|
@@ -1793,7 +1817,7 @@ function dn(e, n, t) {
|
|
|
1793
1817
|
text: ""
|
|
1794
1818
|
};
|
|
1795
1819
|
}
|
|
1796
|
-
function
|
|
1820
|
+
function hn(e) {
|
|
1797
1821
|
const n = [], t = v(e, "content", n);
|
|
1798
1822
|
p(t, "content", ["version", "title", "summary", "blocks"], n), t.version !== 1 && d(n, "content.version", "Expected version 1.");
|
|
1799
1823
|
const r = I(
|
|
@@ -1809,12 +1833,12 @@ function sn(e) {
|
|
|
1809
1833
|
);
|
|
1810
1834
|
Array.isArray(t.blocks) || d(n, "content.blocks", "Expected an array.");
|
|
1811
1835
|
const a = Array.isArray(t.blocks) ? t.blocks : [];
|
|
1812
|
-
a.length === 0 && d(n, "content.blocks", "Expected at least one block."), a.length >
|
|
1836
|
+
a.length === 0 && d(n, "content.blocks", "Expected at least one block."), a.length > x.maxBlocks && d(
|
|
1813
1837
|
n,
|
|
1814
1838
|
"content.blocks",
|
|
1815
|
-
`Must have ${
|
|
1839
|
+
`Must have ${x.maxBlocks} blocks or fewer.`
|
|
1816
1840
|
);
|
|
1817
|
-
const i = a.slice(0,
|
|
1841
|
+
const i = a.slice(0, x.maxBlocks).map((c, l) => pn(c, l, n));
|
|
1818
1842
|
return te(n), {
|
|
1819
1843
|
version: 1,
|
|
1820
1844
|
...r ? { title: r } : {},
|
|
@@ -1822,11 +1846,11 @@ function sn(e) {
|
|
|
1822
1846
|
blocks: i
|
|
1823
1847
|
};
|
|
1824
1848
|
}
|
|
1825
|
-
function
|
|
1849
|
+
function pr(e) {
|
|
1826
1850
|
try {
|
|
1827
1851
|
return {
|
|
1828
1852
|
valid: !0,
|
|
1829
|
-
value:
|
|
1853
|
+
value: hn(e),
|
|
1830
1854
|
issues: []
|
|
1831
1855
|
};
|
|
1832
1856
|
} catch (n) {
|
|
@@ -1845,7 +1869,7 @@ function D(e, n, t, r, o) {
|
|
|
1845
1869
|
d(o, n, `Expected ${r}.`);
|
|
1846
1870
|
}
|
|
1847
1871
|
}
|
|
1848
|
-
function
|
|
1872
|
+
function yn(e, n, t) {
|
|
1849
1873
|
if (e != null) {
|
|
1850
1874
|
if (!Array.isArray(e)) {
|
|
1851
1875
|
d(t, n, "Expected an array.");
|
|
@@ -1854,25 +1878,25 @@ function mn(e, n, t) {
|
|
|
1854
1878
|
return e;
|
|
1855
1879
|
}
|
|
1856
1880
|
}
|
|
1857
|
-
function
|
|
1881
|
+
function gn(e, n, t) {
|
|
1858
1882
|
if (e != null) {
|
|
1859
|
-
if (
|
|
1883
|
+
if (!$e(e)) {
|
|
1860
1884
|
d(t, n, "Expected an object.");
|
|
1861
1885
|
return;
|
|
1862
1886
|
}
|
|
1863
1887
|
return e;
|
|
1864
1888
|
}
|
|
1865
1889
|
}
|
|
1866
|
-
function
|
|
1890
|
+
function bn(e, n, t) {
|
|
1867
1891
|
if (e == null)
|
|
1868
1892
|
return;
|
|
1869
1893
|
const r = v(e, n, t);
|
|
1870
|
-
p(r, n,
|
|
1894
|
+
p(r, n, nn, t);
|
|
1871
1895
|
const o = {};
|
|
1872
1896
|
if (r.matrix !== void 0) {
|
|
1873
1897
|
const s = v(r.matrix, `${n}.matrix`, t);
|
|
1874
1898
|
p(s, `${n}.matrix`, ["config", "content"], t);
|
|
1875
|
-
const u =
|
|
1899
|
+
const u = Me.safeParse(s.config);
|
|
1876
1900
|
u.success || d(t, `${n}.matrix.config`, "Expected a valid Matrix definition.");
|
|
1877
1901
|
const h = D(
|
|
1878
1902
|
s.content,
|
|
@@ -1886,31 +1910,31 @@ function un(e, n, t) {
|
|
|
1886
1910
|
const a = D(
|
|
1887
1911
|
r.pageSize,
|
|
1888
1912
|
`${n}.pageSize`,
|
|
1889
|
-
|
|
1913
|
+
Gt,
|
|
1890
1914
|
"letter, legal, a4, a3, or tabloid",
|
|
1891
1915
|
t
|
|
1892
1916
|
), i = D(
|
|
1893
1917
|
r.orientation,
|
|
1894
1918
|
`${n}.orientation`,
|
|
1895
|
-
|
|
1919
|
+
Wt,
|
|
1896
1920
|
"portrait or landscape",
|
|
1897
1921
|
t
|
|
1898
1922
|
), c = D(
|
|
1899
1923
|
r.delimiter,
|
|
1900
1924
|
`${n}.delimiter`,
|
|
1901
|
-
|
|
1925
|
+
Xt,
|
|
1902
1926
|
"comma, semicolon, or tab",
|
|
1903
1927
|
t
|
|
1904
1928
|
), l = D(
|
|
1905
1929
|
r.csvEncoding,
|
|
1906
1930
|
`${n}.csvEncoding`,
|
|
1907
|
-
|
|
1931
|
+
Zt,
|
|
1908
1932
|
"utf-8-bom or utf-8",
|
|
1909
1933
|
t
|
|
1910
1934
|
), m = D(
|
|
1911
1935
|
r.sheetSelection,
|
|
1912
1936
|
`${n}.sheetSelection`,
|
|
1913
|
-
|
|
1937
|
+
Yt,
|
|
1914
1938
|
"current or all",
|
|
1915
1939
|
t
|
|
1916
1940
|
);
|
|
@@ -1952,7 +1976,7 @@ function un(e, n, t) {
|
|
|
1952
1976
|
"cardControlDefinitions",
|
|
1953
1977
|
"controlBindings"
|
|
1954
1978
|
]) {
|
|
1955
|
-
const u =
|
|
1979
|
+
const u = yn(r[s], `${n}.${s}`, t);
|
|
1956
1980
|
u && (o[s] = u);
|
|
1957
1981
|
}
|
|
1958
1982
|
for (const s of [
|
|
@@ -1961,7 +1985,7 @@ function un(e, n, t) {
|
|
|
1961
1985
|
"dashboardInputExecutionSnapshot",
|
|
1962
1986
|
"printInputCapture"
|
|
1963
1987
|
]) {
|
|
1964
|
-
const u =
|
|
1988
|
+
const u = gn(r[s], `${n}.${s}`, t);
|
|
1965
1989
|
u && (o[s] = u);
|
|
1966
1990
|
}
|
|
1967
1991
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
@@ -1976,14 +2000,14 @@ function W(e, n, t, r) {
|
|
|
1976
2000
|
return o && (e.title = o), e;
|
|
1977
2001
|
}
|
|
1978
2002
|
function X(e, n, t, r) {
|
|
1979
|
-
const o =
|
|
2003
|
+
const o = bn(n, t, r);
|
|
1980
2004
|
return o != null && o.printInputCapture && e.type !== "dashboard" && d(
|
|
1981
2005
|
r,
|
|
1982
2006
|
`${t}.printInputCapture`,
|
|
1983
2007
|
"Only a full dashboard attachment can carry printInputCapture."
|
|
1984
2008
|
), o && (e.settings = o), e;
|
|
1985
2009
|
}
|
|
1986
|
-
function
|
|
2010
|
+
function In(e, n, t) {
|
|
1987
2011
|
const r = `attachments.${n}`, o = v(e, r, t), a = o.type;
|
|
1988
2012
|
if (a === "dashboard") {
|
|
1989
2013
|
p(
|
|
@@ -2031,13 +2055,20 @@ function pn(e, n, t) {
|
|
|
2031
2055
|
f.id,
|
|
2032
2056
|
t
|
|
2033
2057
|
),
|
|
2034
|
-
format: V(
|
|
2058
|
+
format: V(
|
|
2059
|
+
o.format,
|
|
2060
|
+
`${r}.format`,
|
|
2061
|
+
a === "dashboard_sheet" ? ["pdf", "png"] : ["pdf"],
|
|
2062
|
+
t
|
|
2063
|
+
)
|
|
2035
2064
|
},
|
|
2036
2065
|
o.title,
|
|
2037
2066
|
`${r}.title`,
|
|
2038
2067
|
t
|
|
2039
2068
|
);
|
|
2040
|
-
return
|
|
2069
|
+
return de(
|
|
2070
|
+
X(i, o.settings, `${r}.settings`, t)
|
|
2071
|
+
);
|
|
2041
2072
|
}
|
|
2042
2073
|
if (a === "card") {
|
|
2043
2074
|
p(
|
|
@@ -2064,7 +2095,7 @@ function pn(e, n, t) {
|
|
|
2064
2095
|
format: V(
|
|
2065
2096
|
o.format,
|
|
2066
2097
|
`${r}.format`,
|
|
2067
|
-
|
|
2098
|
+
ve,
|
|
2068
2099
|
t
|
|
2069
2100
|
)
|
|
2070
2101
|
},
|
|
@@ -2072,7 +2103,9 @@ function pn(e, n, t) {
|
|
|
2072
2103
|
`${r}.title`,
|
|
2073
2104
|
t
|
|
2074
2105
|
);
|
|
2075
|
-
return
|
|
2106
|
+
return de(
|
|
2107
|
+
X(i, o.settings, `${r}.settings`, t)
|
|
2108
|
+
);
|
|
2076
2109
|
}
|
|
2077
2110
|
return d(
|
|
2078
2111
|
t,
|
|
@@ -2080,7 +2113,17 @@ function pn(e, n, t) {
|
|
|
2080
2113
|
"Expected dashboard, dashboard_sheet, document_sheet, or card."
|
|
2081
2114
|
), { type: "dashboard", dashboardId: "", format: "pdf" };
|
|
2082
2115
|
}
|
|
2083
|
-
function
|
|
2116
|
+
function de(e) {
|
|
2117
|
+
if (e.format !== "png" || !e.settings) return e;
|
|
2118
|
+
const {
|
|
2119
|
+
pageSize: n,
|
|
2120
|
+
orientation: t,
|
|
2121
|
+
includeFilters: r,
|
|
2122
|
+
...o
|
|
2123
|
+
} = e.settings, { settings: a, ...i } = e;
|
|
2124
|
+
return Object.keys(o).length > 0 ? { ...i, settings: o } : i;
|
|
2125
|
+
}
|
|
2126
|
+
function vn(e) {
|
|
2084
2127
|
switch (e.type) {
|
|
2085
2128
|
case "dashboard":
|
|
2086
2129
|
return `${e.type}:${e.dashboardId}:${e.format}`;
|
|
@@ -2091,7 +2134,7 @@ function hn(e) {
|
|
|
2091
2134
|
return `${e.type}:${e.dashboardId}:${e.cardId}:${e.format}`;
|
|
2092
2135
|
}
|
|
2093
2136
|
}
|
|
2094
|
-
function
|
|
2137
|
+
function ke(e, n) {
|
|
2095
2138
|
if (e == null)
|
|
2096
2139
|
return [];
|
|
2097
2140
|
if (!Array.isArray(e))
|
|
@@ -2101,15 +2144,15 @@ function Te(e, n) {
|
|
|
2101
2144
|
"attachments",
|
|
2102
2145
|
`Choose ${H} attachments or fewer.`
|
|
2103
2146
|
);
|
|
2104
|
-
const t = e.slice(0, H).map((o, a) =>
|
|
2147
|
+
const t = e.slice(0, H).map((o, a) => In(o, a, n)), r = /* @__PURE__ */ new Set();
|
|
2105
2148
|
return t.forEach((o, a) => {
|
|
2106
|
-
var c, l, m;
|
|
2107
|
-
(c = o.settings) != null && c.matrix && (o.type !== "card" || o.settings.cardType !== "matrixTable" || o.settings.matrix.content === "flat" && o.format === "pdf") && d(n, `attachments.${a}.settings.matrix`, "Matrix settings require a matrixTable card attachment; flat content requires CSV or Excel."), o.format === "
|
|
2108
|
-
const i =
|
|
2149
|
+
var c, l, m, s;
|
|
2150
|
+
(c = o.settings) != null && c.matrix && (o.type !== "card" || o.settings.cardType !== "matrixTable" || o.settings.matrix.content === "flat" && o.format === "pdf") && d(n, `attachments.${a}.settings.matrix`, "Matrix settings require a matrixTable card attachment; flat content requires CSV or Excel."), o.format === "png" && ((l = o.settings) != null && l.matrix) && o.settings.matrix.content !== "current" && d(n, `attachments.${a}.settings.matrix.content`, "A Matrix PNG image shows the current layout."), o.format === "xlsx" && !((m = o.settings) != null && m.matrix) && !Q((s = o.settings) == null ? void 0 : s.cardType) && d(n, `attachments.${a}.format`, "Excel attachments require a Table, Detail Table or Matrix card.");
|
|
2151
|
+
const i = vn(o);
|
|
2109
2152
|
r.has(i) && d(n, `attachments.${a}`, "Duplicate attachment."), r.add(i);
|
|
2110
2153
|
}), t;
|
|
2111
2154
|
}
|
|
2112
|
-
function
|
|
2155
|
+
function Ae(e, n) {
|
|
2113
2156
|
if (e == null)
|
|
2114
2157
|
return;
|
|
2115
2158
|
const t = v(e, "limits", n);
|
|
@@ -2135,14 +2178,14 @@ function te(e) {
|
|
|
2135
2178
|
if (e.length > 0)
|
|
2136
2179
|
throw new j(e);
|
|
2137
2180
|
}
|
|
2138
|
-
function
|
|
2181
|
+
function we(e, n, t) {
|
|
2139
2182
|
!(e.type === "generated_analysis" || e.type === "custom_message" && !!e.message.trim()) && n.length === 0 && d(
|
|
2140
2183
|
t,
|
|
2141
2184
|
"body",
|
|
2142
2185
|
"Add briefing instructions, a custom message, or at least one attachment."
|
|
2143
2186
|
);
|
|
2144
2187
|
}
|
|
2145
|
-
function
|
|
2188
|
+
function En(e, n, t) {
|
|
2146
2189
|
e == null || e.forEach((r, o) => {
|
|
2147
2190
|
const a = `${t}.${o}.scope`, i = r.scope.attachmentIndex;
|
|
2148
2191
|
if (i === void 0)
|
|
@@ -2164,7 +2207,7 @@ function yn(e, n, t) {
|
|
|
2164
2207
|
);
|
|
2165
2208
|
});
|
|
2166
2209
|
}
|
|
2167
|
-
function
|
|
2210
|
+
function De(e) {
|
|
2168
2211
|
const n = [], t = v(e, "jobConfig", n);
|
|
2169
2212
|
p(
|
|
2170
2213
|
t,
|
|
@@ -2182,7 +2225,7 @@ function Ae(e) {
|
|
|
2182
2225
|
), t.kind !== Z && d(n, "kind", "Expected BRIEFING.");
|
|
2183
2226
|
let r;
|
|
2184
2227
|
try {
|
|
2185
|
-
r =
|
|
2228
|
+
r = ze(
|
|
2186
2229
|
t.presentationExecutionSnapshot
|
|
2187
2230
|
);
|
|
2188
2231
|
} catch (m) {
|
|
@@ -2194,8 +2237,8 @@ function Ae(e) {
|
|
|
2194
2237
|
m instanceof Error ? m.message : "Invalid presentation snapshot."
|
|
2195
2238
|
);
|
|
2196
2239
|
}
|
|
2197
|
-
const o =
|
|
2198
|
-
return
|
|
2240
|
+
const o = xe(t.source, n), a = Ce(t.body, n), i = ke(t.attachments, n), c = Te(t.presentation, n), l = Ae(t.limits, n);
|
|
2241
|
+
return we(a, i, n), En(
|
|
2199
2242
|
r == null ? void 0 : r.resolvedFormats,
|
|
2200
2243
|
i,
|
|
2201
2244
|
"jobConfig.presentationExecutionSnapshot.resolvedFormats"
|
|
@@ -2209,8 +2252,8 @@ function Ae(e) {
|
|
|
2209
2252
|
...l ? { limits: l } : {}
|
|
2210
2253
|
};
|
|
2211
2254
|
}
|
|
2212
|
-
function
|
|
2213
|
-
return
|
|
2255
|
+
function hr(e) {
|
|
2256
|
+
return De({
|
|
2214
2257
|
...e,
|
|
2215
2258
|
kind: Z
|
|
2216
2259
|
});
|
|
@@ -2230,7 +2273,7 @@ function ne(e, n, t, r = "deliveryConfig.recipients") {
|
|
|
2230
2273
|
f.attachmentTitle,
|
|
2231
2274
|
t
|
|
2232
2275
|
);
|
|
2233
|
-
return c && !
|
|
2276
|
+
return c && !cn(c) && d(t, `${o}.address`, "Email address is invalid."), {
|
|
2234
2277
|
type: "email",
|
|
2235
2278
|
address: c,
|
|
2236
2279
|
...l ? { name: l } : {}
|
|
@@ -2266,17 +2309,17 @@ function ne(e, n, t, r = "deliveryConfig.recipients") {
|
|
|
2266
2309
|
"Expected email, user, tenant_user, or group."
|
|
2267
2310
|
), { type: "email", address: "" });
|
|
2268
2311
|
}
|
|
2269
|
-
function
|
|
2312
|
+
function $n(e, n) {
|
|
2270
2313
|
return e == null ? [] : Array.isArray(e) ? e.map(
|
|
2271
2314
|
(t, r) => ne(t, r, n)
|
|
2272
2315
|
) : (d(n, "deliveryConfig.recipients", "Expected an array."), []);
|
|
2273
2316
|
}
|
|
2274
|
-
function
|
|
2317
|
+
function xn(e, n) {
|
|
2275
2318
|
if (!Array.isArray(e))
|
|
2276
2319
|
return d(n, "deliveryConfig.channels", "Expected an array."), [];
|
|
2277
2320
|
const t = [];
|
|
2278
2321
|
return e.forEach((r, o) => {
|
|
2279
|
-
if (!
|
|
2322
|
+
if (!_e(r)) {
|
|
2280
2323
|
d(
|
|
2281
2324
|
n,
|
|
2282
2325
|
`deliveryConfig.channels.${o}`,
|
|
@@ -2287,7 +2330,7 @@ function bn(e, n) {
|
|
|
2287
2330
|
t.includes(r) || t.push(r);
|
|
2288
2331
|
}), t;
|
|
2289
2332
|
}
|
|
2290
|
-
function
|
|
2333
|
+
function Cn(e, n, t) {
|
|
2291
2334
|
if (e == null)
|
|
2292
2335
|
return;
|
|
2293
2336
|
const r = v(e, n, t), o = {};
|
|
@@ -2299,7 +2342,7 @@ function In(e, n, t) {
|
|
|
2299
2342
|
o[a] = i.trim();
|
|
2300
2343
|
}), Object.keys(o).length > 0 ? o : void 0;
|
|
2301
2344
|
}
|
|
2302
|
-
function
|
|
2345
|
+
function Tn(e, n, t) {
|
|
2303
2346
|
if (e == null)
|
|
2304
2347
|
return;
|
|
2305
2348
|
const r = v(e, n, t);
|
|
@@ -2309,7 +2352,7 @@ function vn(e, n, t) {
|
|
|
2309
2352
|
["url", "method", "headers", "secretEncrypted"],
|
|
2310
2353
|
t
|
|
2311
2354
|
);
|
|
2312
|
-
const o = r.method === void 0 || r.method === null ? void 0 : V(r.method, `${n}.method`, ["POST", "PUT"], t), a =
|
|
2355
|
+
const o = r.method === void 0 || r.method === null ? void 0 : V(r.method, `${n}.method`, ["POST", "PUT"], t), a = Cn(r.headers, `${n}.headers`, t), i = I(
|
|
2313
2356
|
r.secretEncrypted,
|
|
2314
2357
|
`${n}.secretEncrypted`,
|
|
2315
2358
|
2e3,
|
|
@@ -2322,7 +2365,7 @@ function vn(e, n, t) {
|
|
|
2322
2365
|
...i ? { secretEncrypted: i } : {}
|
|
2323
2366
|
};
|
|
2324
2367
|
}
|
|
2325
|
-
function
|
|
2368
|
+
function Sn(e, n, t) {
|
|
2326
2369
|
const r = v(e, n, t), o = r.type;
|
|
2327
2370
|
if (o === "channel") {
|
|
2328
2371
|
p(
|
|
@@ -2363,7 +2406,7 @@ function En(e, n, t) {
|
|
|
2363
2406
|
recipient: ne(r.recipient, 0, t, `${n}.recipient`)
|
|
2364
2407
|
}) : (d(t, `${n}.type`, "Expected channel."), { type: "channel", channelId: "" });
|
|
2365
2408
|
}
|
|
2366
|
-
function
|
|
2409
|
+
function kn(e, n, t) {
|
|
2367
2410
|
if (e == null)
|
|
2368
2411
|
return;
|
|
2369
2412
|
if (!Array.isArray(e)) {
|
|
@@ -2375,7 +2418,7 @@ function $n(e, n, t) {
|
|
|
2375
2418
|
);
|
|
2376
2419
|
return r.length > 0 ? r : void 0;
|
|
2377
2420
|
}
|
|
2378
|
-
function
|
|
2421
|
+
function An(e, n, t) {
|
|
2379
2422
|
if (e == null)
|
|
2380
2423
|
return;
|
|
2381
2424
|
const r = v(e, n, t);
|
|
@@ -2391,7 +2434,7 @@ function Cn(e, n, t) {
|
|
|
2391
2434
|
],
|
|
2392
2435
|
t
|
|
2393
2436
|
);
|
|
2394
|
-
const o =
|
|
2437
|
+
const o = kn(
|
|
2395
2438
|
r.threadMentions,
|
|
2396
2439
|
`${n}.threadMentions`,
|
|
2397
2440
|
t
|
|
@@ -2412,7 +2455,7 @@ function Cn(e, n, t) {
|
|
|
2412
2455
|
t
|
|
2413
2456
|
);
|
|
2414
2457
|
return {
|
|
2415
|
-
destination:
|
|
2458
|
+
destination: Sn(
|
|
2416
2459
|
r.destination,
|
|
2417
2460
|
`${n}.destination`,
|
|
2418
2461
|
t
|
|
@@ -2423,7 +2466,7 @@ function Cn(e, n, t) {
|
|
|
2423
2466
|
...r.includeBriefingLink !== void 0 ? { includeBriefingLink: c } : {}
|
|
2424
2467
|
};
|
|
2425
2468
|
}
|
|
2426
|
-
function
|
|
2469
|
+
function wn(e, n, t) {
|
|
2427
2470
|
const r = v(e, n, t);
|
|
2428
2471
|
p(
|
|
2429
2472
|
r,
|
|
@@ -2442,7 +2485,7 @@ function xn(e, n, t) {
|
|
|
2442
2485
|
const o = D(
|
|
2443
2486
|
r.formatProfile,
|
|
2444
2487
|
`${n}.formatProfile`,
|
|
2445
|
-
|
|
2488
|
+
Jt,
|
|
2446
2489
|
"concise, balanced, or detailed",
|
|
2447
2490
|
t
|
|
2448
2491
|
), a = I(
|
|
@@ -2465,11 +2508,11 @@ function xn(e, n, t) {
|
|
|
2465
2508
|
!0,
|
|
2466
2509
|
`${n}.actionBlockVisible`,
|
|
2467
2510
|
t
|
|
2468
|
-
), m =
|
|
2511
|
+
), m = Tn(
|
|
2469
2512
|
r.webhookConfig,
|
|
2470
2513
|
`${n}.webhookConfig`,
|
|
2471
2514
|
t
|
|
2472
|
-
), s =
|
|
2515
|
+
), s = An(
|
|
2473
2516
|
r.slackConfig,
|
|
2474
2517
|
`${n}.slackConfig`,
|
|
2475
2518
|
t
|
|
@@ -2484,12 +2527,12 @@ function xn(e, n, t) {
|
|
|
2484
2527
|
...m ? { webhookConfig: m } : {}
|
|
2485
2528
|
};
|
|
2486
2529
|
}
|
|
2487
|
-
function
|
|
2530
|
+
function Dn(e, n) {
|
|
2488
2531
|
if (e == null)
|
|
2489
2532
|
return;
|
|
2490
2533
|
const t = v(e, "deliveryConfig.channelConfigs", n), r = {};
|
|
2491
2534
|
return Object.entries(t).forEach(([o, a]) => {
|
|
2492
|
-
if (!
|
|
2535
|
+
if (!_e(o)) {
|
|
2493
2536
|
d(
|
|
2494
2537
|
n,
|
|
2495
2538
|
`deliveryConfig.channelConfigs.${o}`,
|
|
@@ -2497,14 +2540,14 @@ function Tn(e, n) {
|
|
|
2497
2540
|
);
|
|
2498
2541
|
return;
|
|
2499
2542
|
}
|
|
2500
|
-
r[o] =
|
|
2543
|
+
r[o] = wn(
|
|
2501
2544
|
a,
|
|
2502
2545
|
`deliveryConfig.channelConfigs.${o}`,
|
|
2503
2546
|
n
|
|
2504
2547
|
);
|
|
2505
2548
|
}), Object.keys(r).length > 0 ? r : void 0;
|
|
2506
2549
|
}
|
|
2507
|
-
function
|
|
2550
|
+
function _n(e, n) {
|
|
2508
2551
|
var l, m, s;
|
|
2509
2552
|
if (e == null)
|
|
2510
2553
|
return null;
|
|
@@ -2515,7 +2558,7 @@ function Sn(e, n) {
|
|
|
2515
2558
|
["recipients", "channels", "channelConfigs"],
|
|
2516
2559
|
n
|
|
2517
2560
|
);
|
|
2518
|
-
const r =
|
|
2561
|
+
const r = Dn(t.channelConfigs, n), o = $n(t.recipients, n), a = xn(t.channels, n), i = ((m = (l = r == null ? void 0 : r.SLACK) == null ? void 0 : l.slackConfig) == null ? void 0 : m.destination.type) === "channel" && !!r.SLACK.slackConfig.destination.channelId.trim();
|
|
2519
2562
|
return a.some(
|
|
2520
2563
|
(u) => u !== "SLACK"
|
|
2521
2564
|
) && o.length === 0 && d(
|
|
@@ -2570,8 +2613,8 @@ function re(e) {
|
|
|
2570
2613
|
"description",
|
|
2571
2614
|
f.description,
|
|
2572
2615
|
n
|
|
2573
|
-
) ?? null, a = I(t.scheduleExpr, "scheduleExpr", 500, n) ?? null, i = I(t.timezone, "timezone", 200, n) ?? "UTC", c =
|
|
2574
|
-
return
|
|
2616
|
+
) ?? null, a = I(t.scheduleExpr, "scheduleExpr", 500, n) ?? null, i = I(t.timezone, "timezone", 200, n) ?? "UTC", c = an(t.status, n), l = xe(t.source, n), m = Ce(t.body, n), s = ke(t.attachments, n), u = Te(t.presentation, n), h = Ae(t.limits, n), g = _n(t.deliveryConfig, n);
|
|
2617
|
+
return we(m, s, n), te(n), {
|
|
2575
2618
|
name: r,
|
|
2576
2619
|
description: o,
|
|
2577
2620
|
status: c,
|
|
@@ -2585,13 +2628,13 @@ function re(e) {
|
|
|
2585
2628
|
deliveryConfig: g
|
|
2586
2629
|
};
|
|
2587
2630
|
}
|
|
2588
|
-
function
|
|
2631
|
+
function yr(e) {
|
|
2589
2632
|
return re(e);
|
|
2590
2633
|
}
|
|
2591
|
-
function
|
|
2634
|
+
function gr(e) {
|
|
2592
2635
|
return re(e);
|
|
2593
2636
|
}
|
|
2594
|
-
function
|
|
2637
|
+
function br(e) {
|
|
2595
2638
|
try {
|
|
2596
2639
|
return { valid: !0, value: re(e), issues: [] };
|
|
2597
2640
|
} catch (n) {
|
|
@@ -2600,74 +2643,77 @@ function dr(e) {
|
|
|
2600
2643
|
throw n;
|
|
2601
2644
|
}
|
|
2602
2645
|
}
|
|
2603
|
-
function
|
|
2646
|
+
function Ir(e) {
|
|
2604
2647
|
try {
|
|
2605
|
-
return { valid: !0, value:
|
|
2648
|
+
return { valid: !0, value: De(e), issues: [] };
|
|
2606
2649
|
} catch (n) {
|
|
2607
2650
|
if (n instanceof j)
|
|
2608
2651
|
return { valid: !1, issues: n.issues };
|
|
2609
2652
|
throw n;
|
|
2610
2653
|
}
|
|
2611
2654
|
}
|
|
2612
|
-
function
|
|
2613
|
-
return typeof e == "string" &&
|
|
2655
|
+
function vr(e) {
|
|
2656
|
+
return typeof e == "string" && Ee.has(e);
|
|
2614
2657
|
}
|
|
2615
|
-
function
|
|
2616
|
-
return typeof e == "string" &&
|
|
2658
|
+
function _e(e) {
|
|
2659
|
+
return typeof e == "string" && Ht.has(e);
|
|
2617
2660
|
}
|
|
2618
2661
|
export {
|
|
2619
|
-
|
|
2662
|
+
Q as $,
|
|
2620
2663
|
f as A,
|
|
2621
2664
|
Z as B,
|
|
2622
|
-
C,
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2665
|
+
x as C,
|
|
2666
|
+
or as D,
|
|
2667
|
+
qt as E,
|
|
2668
|
+
Kt as F,
|
|
2669
|
+
ur as G,
|
|
2670
|
+
ve as H,
|
|
2671
|
+
j as I,
|
|
2672
|
+
hn as J,
|
|
2673
|
+
pr as K,
|
|
2674
|
+
De as L,
|
|
2632
2675
|
H as M,
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2676
|
+
hr as N,
|
|
2677
|
+
re as O,
|
|
2678
|
+
yr as P,
|
|
2679
|
+
gr as Q,
|
|
2680
|
+
br as R,
|
|
2681
|
+
Ir as S,
|
|
2682
|
+
vr as T,
|
|
2683
|
+
_e as U,
|
|
2684
|
+
Qn as V,
|
|
2685
|
+
ht as W,
|
|
2686
|
+
ft as X,
|
|
2687
|
+
Zn as Y,
|
|
2688
|
+
mt as Z,
|
|
2689
|
+
pt as _,
|
|
2690
|
+
mr as a,
|
|
2691
|
+
Mt as a0,
|
|
2692
|
+
Ut as a1,
|
|
2693
|
+
zt as a2,
|
|
2694
|
+
ut as b,
|
|
2695
|
+
Jn as c,
|
|
2696
|
+
ir as d,
|
|
2697
|
+
er as e,
|
|
2698
|
+
rr as f,
|
|
2699
|
+
fr as g,
|
|
2700
|
+
Xn as h,
|
|
2701
|
+
Yn as i,
|
|
2702
|
+
Ct as j,
|
|
2703
|
+
ar as k,
|
|
2658
2704
|
R as l,
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2705
|
+
cr as m,
|
|
2706
|
+
Nt as n,
|
|
2707
|
+
lr as o,
|
|
2708
|
+
be as p,
|
|
2709
|
+
ye as q,
|
|
2710
|
+
Vt as r,
|
|
2711
|
+
dr as s,
|
|
2712
|
+
sr as t,
|
|
2713
|
+
yt as u,
|
|
2714
|
+
me as v,
|
|
2715
|
+
nr as w,
|
|
2716
|
+
tr as x,
|
|
2717
|
+
jt as y,
|
|
2672
2718
|
Y as z
|
|
2673
2719
|
};
|