react-semaphor 0.1.527 → 0.1.528
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-protocol/index.js +206 -195
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +3 -3
- package/dist/chunks/{calculated-field-identity-DEhjPSr-.js → calculated-field-identity-DUu-tCQw.js} +2 -2
- package/dist/chunks/{card-config-utils-BlIbwkuD.js → card-config-utils-BdPceiw8.js} +3 -3
- package/dist/chunks/{dashboard-JNHR0_cZ.js → dashboard-BkskKMck.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D9pFByPh.js → dashboard-briefing-launcher-Bb0RhGRC.js} +8 -8
- package/dist/chunks/{dashboard-controls-CJI5ZWMq.js → dashboard-controls-loWTHPMi.js} +10 -10
- package/dist/chunks/{dashboard-json-DLdrFry-.js → dashboard-json-DUci_SOR.js} +2 -2
- package/dist/chunks/{edit-dashboard-visual-D5LjWle1.js → edit-dashboard-visual-z9WN26w7.js} +14 -14
- package/dist/chunks/{editor-action-buttons-G91NQKxU.js → editor-action-buttons-CGSFK9S-.js} +5 -5
- package/dist/chunks/{field-aggregations-DeVQLIsP.js → field-aggregations-CdXSo1pb.js} +2 -2
- package/dist/chunks/{index-BvJOYbNv.js → index-CTYnXU85.js} +348 -357
- package/dist/chunks/{matrix-card-DY45yiUM.js → matrix-card-DhykwdZs.js} +1 -1
- package/dist/chunks/{matrix-control-sources-BypfLZsK.js → matrix-control-sources-BV9ywFtJ.js} +4 -4
- package/dist/chunks/{matrix-formatter-BoKU3MzZ.js → matrix-formatter-1Mm8x8w7.js} +2 -2
- package/dist/chunks/matrix-operation-contract-Dp7kFpVk.js +1383 -0
- package/dist/chunks/{pivot-header-presentation-D5v8uyjj.js → pivot-header-presentation-CZa3556D.js} +3 -3
- package/dist/chunks/{pivot-result-lifecycle-BWrPhlGT.js → pivot-result-lifecycle-Bqdtknud.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-D3hxu4sE.js → report-preferences-dialog-VV0-Ro6F.js} +6 -6
- package/dist/chunks/{selection-reducer-C7Um5XN-.js → selection-reducer-IZjBSU6Z.js} +1 -1
- package/dist/chunks/{semantic-format-BjBMOSoo.js → semantic-format-BBLvfwua.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-D46I_4g7.js → semaphor-ready-indicator-DbA4mVQL.js} +9356 -9408
- package/dist/chunks/{slider-B6LELqx6.js → slider-DpiJG8lv.js} +7 -7
- package/dist/chunks/{switch-_7uBAbYx.js → switch-C4YH-W1X.js} +6 -6
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +8 -8
- package/dist/data-app-sdk/index.js +3 -3
- package/dist/data-app-sdk-adapters/index.js +1 -1
- package/dist/data-app-sdk-validation/index.js +2 -2
- package/dist/format-utils/index.js +5 -5
- package/dist/index.js +13 -13
- package/dist/surfboard/index.js +1 -1
- package/dist/types/lib/types/semantic-types.d.ts +4 -2
- package/dist/types/lib/utils/aggregate-expression-utils.d.ts +0 -4
- package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +89 -0
- package/dist/types/shared/analytics-protocol/analytics-refusal.d.ts +32 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +38 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +10 -1
- package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +63 -0
- package/package.json +1 -1
- package/dist/chunks/matrix-operation-contract-BV02rLhu.js +0 -809
|
@@ -3,26 +3,26 @@ var pt = (e, r, t) => r in e ? ft(e, r, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var F = (e, r, t) => pt(e, typeof r != "symbol" ? r + "" : r, t);
|
|
4
4
|
import { k as Re, e as yt } from "./numeric-presentation-LvnNY5Ma.js";
|
|
5
5
|
import { F as Ae, am as ht, S as me, ah as ye, t as gt } from "./validators-CQcG0EPN.js";
|
|
6
|
-
import { z as vt, x as bt, u as It, y as Ct, s as Tt, M as wt, o as $t, C as xt, n as Et, P as G } from "./pivot-result-lifecycle-
|
|
6
|
+
import { z as vt, x as bt, u as It, y as Ct, s as Tt, M as wt, o as $t, C as xt, n as Et, P as G } from "./pivot-result-lifecycle-Bqdtknud.js";
|
|
7
7
|
import "./matrix-continuation-C4sRcjZU.js";
|
|
8
|
-
import {
|
|
8
|
+
import { af as kt, ah as St, V as _t } from "./matrix-operation-contract-Dp7kFpVk.js";
|
|
9
9
|
import { z as T } from "zod";
|
|
10
10
|
import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as he } from "../value-format-preferences/index.js";
|
|
11
|
-
import { r as
|
|
12
|
-
import { h as De, i as ge, r as Me, a as Pe, v as
|
|
13
|
-
import { r as
|
|
14
|
-
import { a as
|
|
15
|
-
import { f as re, r as W, c as Bt, R as
|
|
16
|
-
import { r as q, b as
|
|
17
|
-
import { v as
|
|
18
|
-
import { f as
|
|
11
|
+
import { r as Ft } from "./matrix-definition-Cdn3LoxW.js";
|
|
12
|
+
import { h as De, i as ge, r as Me, a as Pe, v as Rt, b as At } from "./card-config-utils-BdPceiw8.js";
|
|
13
|
+
import { r as Dt } from "./matrix-card-DhykwdZs.js";
|
|
14
|
+
import { a as Oe, s as Mt, i as Pt, o as Ot } from "./field-aggregations-CdXSo1pb.js";
|
|
15
|
+
import { f as re, r as W, c as Bt, R as Kt, v as Nt } from "./raw-temporal-CdnA_OXJ.js";
|
|
16
|
+
import { r as q, b as Lt, d as zt, P as Vt } from "./pivot-result-identity-CY__BuwI.js";
|
|
17
|
+
import { v as qt, a as Ut } from "./temporal-bucket-contract-C6lUGPS3.js";
|
|
18
|
+
import { f as jt, a as Gt, c as Be, D as Ht } from "./temporal-bucket-DlFuhCnT.js";
|
|
19
19
|
import { v as Ke } from "./raw-temporal-contract-Bc9z83t-.js";
|
|
20
|
-
import { r as
|
|
21
|
-
const
|
|
20
|
+
import { r as Wt, a as Yt, b as Zt } from "./canonical-result-keys-CEQefvdO.js";
|
|
21
|
+
const Qt = `import pandas as pd
|
|
22
22
|
df = pd.DataFrame(data) # 'data' contains the query result
|
|
23
23
|
result = df.to_dict('records') # must return 'result' as [dict] type
|
|
24
24
|
`;
|
|
25
|
-
function
|
|
25
|
+
function ao(e) {
|
|
26
26
|
return {
|
|
27
27
|
databaseName: (e == null ? void 0 : e.lastSelectedDatabase) || "",
|
|
28
28
|
schemaName: (e == null ? void 0 : e.lastSelectedSchema) || "",
|
|
@@ -31,16 +31,16 @@ function oo(e) {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function Z(e) {
|
|
34
|
-
return e ===
|
|
34
|
+
return e === Qt ? "" : e;
|
|
35
35
|
}
|
|
36
36
|
function ne(e, r = e.config) {
|
|
37
|
-
return
|
|
37
|
+
return Oe({
|
|
38
38
|
hasExecutableConfig: De(r, e.type),
|
|
39
39
|
sql: e.sql,
|
|
40
40
|
normalizedPython: Z(e.python || "")
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
class
|
|
43
|
+
class Xt extends Error {
|
|
44
44
|
constructor(t) {
|
|
45
45
|
super(
|
|
46
46
|
`ambiguous_temporal_grain: Temporal field "${t}" has saved presentation but no valid grouping grain. Reconfigure and resave the field.`
|
|
@@ -50,16 +50,16 @@ class Qt extends Error {
|
|
|
50
50
|
this.name = "AmbiguousGroupedTemporalGrainError", this.fieldId = t;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Jt(e) {
|
|
54
54
|
return Pe(e) || e.semanticTemporalPresentation != null;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function er(e) {
|
|
57
57
|
if (!e.id || !["date", "datetime"].includes(
|
|
58
58
|
Ae(e.dataType)
|
|
59
59
|
))
|
|
60
60
|
return;
|
|
61
61
|
if (ht(e.granularity)) return e;
|
|
62
|
-
if (!
|
|
62
|
+
if (!Jt(e)) return;
|
|
63
63
|
if (!Me({
|
|
64
64
|
fieldId: e.id,
|
|
65
65
|
dataType: e.dataType,
|
|
@@ -68,12 +68,12 @@ function Jt(e) {
|
|
|
68
68
|
dateFormat: e.dateFormat,
|
|
69
69
|
customFormat: e.customFormat
|
|
70
70
|
}).ok)
|
|
71
|
-
throw new
|
|
71
|
+
throw new Xt(e.id);
|
|
72
72
|
return { ...e, granularity: "day" };
|
|
73
73
|
}
|
|
74
74
|
function ve(e) {
|
|
75
75
|
const r = e.cardConfig ?? e.card.config;
|
|
76
|
-
if (!r || !e.supportsCardType(e.card.type) ||
|
|
76
|
+
if (!r || !e.supportsCardType(e.card.type) || Oe({
|
|
77
77
|
hasExecutableConfig: De(r),
|
|
78
78
|
sql: e.card.sql,
|
|
79
79
|
normalizedPython: Z(e.card.python || "")
|
|
@@ -93,12 +93,12 @@ function ve(e) {
|
|
|
93
93
|
cardType: e.card.type,
|
|
94
94
|
cardConfig: r,
|
|
95
95
|
fields: t.flatMap((n) => {
|
|
96
|
-
const o =
|
|
96
|
+
const o = er(n);
|
|
97
97
|
return o ? [o] : [];
|
|
98
98
|
})
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function io(e) {
|
|
102
102
|
if (ge(e.card))
|
|
103
103
|
return ve({
|
|
104
104
|
...e,
|
|
@@ -106,15 +106,15 @@ function ao(e) {
|
|
|
106
106
|
supportsCardType: (r) => r === "table"
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function co(e) {
|
|
110
110
|
if (ge(e.card))
|
|
111
111
|
return ve({
|
|
112
112
|
...e,
|
|
113
113
|
card: e.card,
|
|
114
|
-
supportsCardType:
|
|
114
|
+
supportsCardType: Pt
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function tr(e) {
|
|
118
118
|
if (ge(e.card))
|
|
119
119
|
return ve({
|
|
120
120
|
...e,
|
|
@@ -122,11 +122,11 @@ function er(e) {
|
|
|
122
122
|
// Raw detail-table presentation has its own result/adapter contract.
|
|
123
123
|
// This module remains grouped-only even though the shared producer
|
|
124
124
|
// registry now recognizes detailTable.
|
|
125
|
-
supportsCardType: (r) => r !== "detailTable" &&
|
|
125
|
+
supportsCardType: (r) => r !== "detailTable" && Mt(r)
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
const xe = /* @__PURE__ */ new WeakMap();
|
|
129
|
-
function
|
|
129
|
+
function rr(e) {
|
|
130
130
|
const r = xe.get(e);
|
|
131
131
|
if (r) return r;
|
|
132
132
|
const t = vt(e);
|
|
@@ -136,7 +136,7 @@ function j(e, r) {
|
|
|
136
136
|
const t = e ?? [], n = r ?? [];
|
|
137
137
|
return t.length === n.length && t.every((o, a) => o === n[a]);
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function nr(e, r) {
|
|
140
140
|
const t = bt({
|
|
141
141
|
groupByFields: r.groupByColumns,
|
|
142
142
|
metricFields: r.metricColumns,
|
|
@@ -160,7 +160,7 @@ function rr(e, r) {
|
|
|
160
160
|
t.expectedMetricAliases
|
|
161
161
|
);
|
|
162
162
|
}
|
|
163
|
-
class
|
|
163
|
+
class or extends Error {
|
|
164
164
|
constructor(t) {
|
|
165
165
|
super(
|
|
166
166
|
`missing_resolved_temporal_format: Saved presentation is missing temporal field "${t.fieldId}" for card "${t.cardId}". Resave the report or Briefing to capture the current dashboard presentation.`
|
|
@@ -196,13 +196,13 @@ class L extends Error {
|
|
|
196
196
|
function Ne(e, r) {
|
|
197
197
|
return `${r}:${e}`;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function ar(e) {
|
|
200
200
|
var r, t;
|
|
201
201
|
return (t = (r = e.presentation) == null ? void 0 : r.byFieldRole) == null ? void 0 : t.get(
|
|
202
202
|
Ne(e.fieldId, e.role)
|
|
203
203
|
);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function ir(e) {
|
|
206
206
|
var t;
|
|
207
207
|
if ((((t = e.cardConfig.metricColumns) == null ? void 0 : t.length) || 0) > 0 || e.binding.role !== "metric")
|
|
208
208
|
return !1;
|
|
@@ -214,7 +214,7 @@ function ar(e) {
|
|
|
214
214
|
}
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function lo(e, r) {
|
|
218
218
|
return !r || r.byColumnKey.size === 0 ? e.map((t) => ({ ...t })) : e.map((t) => {
|
|
219
219
|
const n = { ...t };
|
|
220
220
|
return r.byColumnKey.forEach((o, a) => {
|
|
@@ -225,7 +225,7 @@ function co(e, r) {
|
|
|
225
225
|
}), n;
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function so(e) {
|
|
229
229
|
var f;
|
|
230
230
|
if (!e.result || typeof e.result != "object") return !1;
|
|
231
231
|
const r = e.result;
|
|
@@ -237,8 +237,8 @@ function lo(e) {
|
|
|
237
237
|
const n = Array.isArray(r.records) ? r.records.length : void 0, o = (t.cardConfig.pivotByColumns || []).map((m) => m.id);
|
|
238
238
|
if (t.cardType === "pivotTable")
|
|
239
239
|
try {
|
|
240
|
-
const m =
|
|
241
|
-
if (!
|
|
240
|
+
const m = rr(r);
|
|
241
|
+
if (!nr(
|
|
242
242
|
m.pivotResultContract,
|
|
243
243
|
t.cardConfig
|
|
244
244
|
))
|
|
@@ -254,7 +254,7 @@ function lo(e) {
|
|
|
254
254
|
), b = g.length > 0 && g.every(
|
|
255
255
|
(C) => {
|
|
256
256
|
var v;
|
|
257
|
-
return ((v = C.pivotIdentity) == null ? void 0 : v.members.length) === 0 &&
|
|
257
|
+
return ((v = C.pivotIdentity) == null ? void 0 : v.members.length) === 0 && Lt({
|
|
258
258
|
expectedPivotFieldIds: o,
|
|
259
259
|
classification: m.pivotResultContract.columnClassifications[C.key]
|
|
260
260
|
});
|
|
@@ -325,7 +325,7 @@ function lo(e) {
|
|
|
325
325
|
"metric"
|
|
326
326
|
);
|
|
327
327
|
if (l) {
|
|
328
|
-
if (!
|
|
328
|
+
if (!ir({
|
|
329
329
|
cardConfig: t.cardConfig,
|
|
330
330
|
binding: l,
|
|
331
331
|
columns: r.columns || []
|
|
@@ -341,7 +341,7 @@ function lo(e) {
|
|
|
341
341
|
))
|
|
342
342
|
return !1;
|
|
343
343
|
try {
|
|
344
|
-
|
|
344
|
+
zt(
|
|
345
345
|
(r.columns || []).map((m) => ({
|
|
346
346
|
key: m.key,
|
|
347
347
|
pivotIdentity: m.pivotIdentity
|
|
@@ -352,7 +352,7 @@ function lo(e) {
|
|
|
352
352
|
}
|
|
353
353
|
);
|
|
354
354
|
} catch (m) {
|
|
355
|
-
if (m instanceof
|
|
355
|
+
if (m instanceof Vt) return !1;
|
|
356
356
|
throw m;
|
|
357
357
|
}
|
|
358
358
|
const u = (r.columns || []).filter((m) => {
|
|
@@ -405,9 +405,9 @@ function ee(e, r) {
|
|
|
405
405
|
if (!o.ok) throw new Error(o.error.code);
|
|
406
406
|
return o.format;
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function cr(e, r, t = he) {
|
|
409
409
|
const n = ee(e, "card"), o = ee(e, "semantic"), a = e.semanticTemporalPresentation;
|
|
410
|
-
return
|
|
410
|
+
return Be({
|
|
411
411
|
metadata: r,
|
|
412
412
|
...n ? { cardFormat: n } : {},
|
|
413
413
|
...o && a ? {
|
|
@@ -423,7 +423,7 @@ function ir(e, r, t = he) {
|
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function lr(e, r = Ht, t = "en-US") {
|
|
427
427
|
var i;
|
|
428
428
|
const n = ee(e, "card"), o = ((i = e.semanticTemporalPresentation) == null ? void 0 : i.granularity) === e.granularity ? ee(e, "semantic") : void 0, a = n && n.presentation.mode !== "auto" ? n : o && o.presentation.mode !== "auto" ? o : {
|
|
429
429
|
presentation: { mode: "auto" }
|
|
@@ -438,7 +438,7 @@ function cr(e, r = Gt, t = "en-US") {
|
|
|
438
438
|
presentation: a.presentation
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function mo(e) {
|
|
442
442
|
const r = e.activation;
|
|
443
443
|
if (!r)
|
|
444
444
|
return {
|
|
@@ -480,7 +480,7 @@ function so(e) {
|
|
|
480
480
|
}
|
|
481
481
|
}) : void 0;
|
|
482
482
|
if (e.executionSnapshot && !f)
|
|
483
|
-
throw new
|
|
483
|
+
throw new or({
|
|
484
484
|
dashboardId: e.dashboardId,
|
|
485
485
|
cardId: e.card.id,
|
|
486
486
|
fieldId: l.id
|
|
@@ -490,14 +490,14 @@ function so(e) {
|
|
|
490
490
|
fieldId: l.id,
|
|
491
491
|
role: l.role,
|
|
492
492
|
metadata: s,
|
|
493
|
-
resolved: f ?
|
|
493
|
+
resolved: f ? Be({
|
|
494
494
|
metadata: s,
|
|
495
495
|
cardFormat: f,
|
|
496
496
|
locale: f.locale,
|
|
497
497
|
...f.presentation.mode === "auto" ? {
|
|
498
498
|
styles: f.presentation.styles
|
|
499
499
|
} : {}
|
|
500
|
-
}) :
|
|
500
|
+
}) : cr(
|
|
501
501
|
l,
|
|
502
502
|
s,
|
|
503
503
|
e.valueFormatPreferences ?? he
|
|
@@ -544,7 +544,7 @@ function so(e) {
|
|
|
544
544
|
fieldId: l.id,
|
|
545
545
|
columnKey: C.column.key
|
|
546
546
|
});
|
|
547
|
-
const v =
|
|
547
|
+
const v = qt(
|
|
548
548
|
C.member.temporalBucket
|
|
549
549
|
);
|
|
550
550
|
if (!v.ok || !v.value)
|
|
@@ -579,7 +579,7 @@ function so(e) {
|
|
|
579
579
|
fieldId: l.id,
|
|
580
580
|
columnKey: u
|
|
581
581
|
});
|
|
582
|
-
const m =
|
|
582
|
+
const m = Ut(f, {
|
|
583
583
|
metadataRequired: !0
|
|
584
584
|
});
|
|
585
585
|
if (!m.ok || !m.value)
|
|
@@ -597,9 +597,9 @@ function so(e) {
|
|
|
597
597
|
}
|
|
598
598
|
return { byColumnKey: n, byFieldId: o, byFieldRole: a };
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function uo(e) {
|
|
601
601
|
var t, n;
|
|
602
|
-
const r = e.role ?
|
|
602
|
+
const r = e.role ? ar({
|
|
603
603
|
presentation: e.presentation,
|
|
604
604
|
fieldId: e.fieldId,
|
|
605
605
|
role: e.role
|
|
@@ -621,13 +621,13 @@ function Le(e) {
|
|
|
621
621
|
}
|
|
622
622
|
);
|
|
623
623
|
try {
|
|
624
|
-
return
|
|
624
|
+
return jt({
|
|
625
625
|
value: e.value,
|
|
626
626
|
metadata: e.presentation.metadata,
|
|
627
627
|
format: e.presentation.resolved.format
|
|
628
628
|
});
|
|
629
629
|
} catch (r) {
|
|
630
|
-
throw r instanceof
|
|
630
|
+
throw r instanceof Gt ? new L(
|
|
631
631
|
r.code,
|
|
632
632
|
r.message,
|
|
633
633
|
{
|
|
@@ -645,7 +645,7 @@ class S extends Error {
|
|
|
645
645
|
function ze() {
|
|
646
646
|
return { type: "raw_temporal", presentation: { mode: "auto" } };
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function sr(e) {
|
|
649
649
|
if (e.locale || e.relative || e.timezone && e.timezone !== "auto" || e.sourceTimezone && e.sourceTimezone !== "auto" || e.prefix || e.suffix)
|
|
650
650
|
throw new S(
|
|
651
651
|
"invalid_raw_temporal_format",
|
|
@@ -654,7 +654,7 @@ function lr(e) {
|
|
|
654
654
|
}
|
|
655
655
|
function Ve(e) {
|
|
656
656
|
const r = e.format;
|
|
657
|
-
if ((r == null ? void 0 : r.type) === "date" && (
|
|
657
|
+
if ((r == null ? void 0 : r.type) === "date" && (sr(r), r.pattern))
|
|
658
658
|
return {
|
|
659
659
|
type: "raw_temporal",
|
|
660
660
|
presentation: {
|
|
@@ -723,17 +723,17 @@ function be(e) {
|
|
|
723
723
|
presentation: { mode: "auto" }
|
|
724
724
|
};
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function fo(e) {
|
|
727
727
|
return e === "instant" ? "yyyy-MM-dd'T'HH:mm:ssXXX" : e === "wall_datetime" ? "yyyy-MM-dd'T'HH:mm:ss" : "yyyy-MM-dd";
|
|
728
728
|
}
|
|
729
|
-
function
|
|
730
|
-
|
|
729
|
+
function po(e) {
|
|
730
|
+
Nt({
|
|
731
731
|
dialect: "date_fns",
|
|
732
732
|
pattern: e.pattern,
|
|
733
733
|
valueKind: e.valueKind
|
|
734
734
|
});
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function dr(e) {
|
|
737
737
|
const r = be(e.settings);
|
|
738
738
|
if (!r)
|
|
739
739
|
throw new S(
|
|
@@ -758,9 +758,9 @@ function sr(e) {
|
|
|
758
758
|
);
|
|
759
759
|
return a.text;
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function yo(e) {
|
|
762
762
|
try {
|
|
763
|
-
return { ok: !0, text:
|
|
763
|
+
return { ok: !0, text: dr(e) };
|
|
764
764
|
} catch (r) {
|
|
765
765
|
return {
|
|
766
766
|
ok: !1,
|
|
@@ -773,7 +773,7 @@ function qe(e) {
|
|
|
773
773
|
const r = e.effectiveCardConfig ?? e.card.config;
|
|
774
774
|
return ne(e.card, r) === "freeform" && !!((t = e.card.sql) != null && t.trim()) && !Z(e.card.python || "").trim();
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function mr(e) {
|
|
777
777
|
var r, t;
|
|
778
778
|
return e.type !== "table" && e.type !== "detailTable" || !qe({ card: e }) ? !1 : Object.values(
|
|
779
779
|
((t = (r = e.preferences) == null ? void 0 : r.tablePrefs) == null ? void 0 : t.columnSettingsMap) || {}
|
|
@@ -784,9 +784,9 @@ function dr(e) {
|
|
|
784
784
|
}
|
|
785
785
|
);
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function ho(e) {
|
|
788
788
|
var t, n, o;
|
|
789
|
-
if (!
|
|
789
|
+
if (!mr(e)) return e;
|
|
790
790
|
const r = ((n = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : n.columnSettingsMap) || {};
|
|
791
791
|
return {
|
|
792
792
|
...e,
|
|
@@ -815,7 +815,7 @@ function yo(e) {
|
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function ur() {
|
|
819
819
|
return {
|
|
820
820
|
activatedColumnKeys: /* @__PURE__ */ new Set(),
|
|
821
821
|
byColumnKey: /* @__PURE__ */ new Map(),
|
|
@@ -825,7 +825,7 @@ function mr() {
|
|
|
825
825
|
function ue(e, r) {
|
|
826
826
|
return e === void 0 ? { kind: "invalid", error: r } : {
|
|
827
827
|
kind: "invalid",
|
|
828
|
-
error: e instanceof S ? e : e instanceof
|
|
828
|
+
error: e instanceof S ? e : e instanceof Kt ? new S(
|
|
829
829
|
e.code,
|
|
830
830
|
e.message,
|
|
831
831
|
r.context
|
|
@@ -836,7 +836,7 @@ function ue(e, r) {
|
|
|
836
836
|
)
|
|
837
837
|
};
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function fr(e) {
|
|
840
840
|
var o;
|
|
841
841
|
if (e.cardType !== "detailTable" || e.resultOwner !== "config")
|
|
842
842
|
return { kind: "inactive" };
|
|
@@ -921,7 +921,7 @@ function ur(e) {
|
|
|
921
921
|
);
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function pr(e) {
|
|
925
925
|
var n, o, a;
|
|
926
926
|
const r = e.effectiveCardConfig ?? e.card.config, t = ne(
|
|
927
927
|
e.card,
|
|
@@ -936,7 +936,7 @@ function fr(e) {
|
|
|
936
936
|
"Activated raw temporal detail results require records, columns, and columnKeyMap atomically."
|
|
937
937
|
)
|
|
938
938
|
} : e.records !== void 0 && !i ? { kind: "inactive" } : Ee(
|
|
939
|
-
|
|
939
|
+
fr({
|
|
940
940
|
cardType: e.card.type,
|
|
941
941
|
resultOwner: t,
|
|
942
942
|
effectiveCardConfig: r,
|
|
@@ -952,7 +952,7 @@ function fr(e) {
|
|
|
952
952
|
);
|
|
953
953
|
}
|
|
954
954
|
return Ee(
|
|
955
|
-
|
|
955
|
+
yr({
|
|
956
956
|
resultOwner: t,
|
|
957
957
|
sql: e.card.sql,
|
|
958
958
|
normalizedPython: Z(
|
|
@@ -967,7 +967,7 @@ function fr(e) {
|
|
|
967
967
|
e
|
|
968
968
|
);
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function go(e) {
|
|
971
971
|
var n, o, a;
|
|
972
972
|
const r = e.effectiveCardConfig ?? e.card.config, t = ne(
|
|
973
973
|
e.card,
|
|
@@ -1030,7 +1030,7 @@ function Ee(e, r) {
|
|
|
1030
1030
|
}
|
|
1031
1031
|
};
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1033
|
+
function yr(e) {
|
|
1034
1034
|
var t, n;
|
|
1035
1035
|
if (e.resultOwner !== "freeform" || !((t = e.sql) != null && t.trim()) || (n = e.normalizedPython) != null && n.trim())
|
|
1036
1036
|
return { kind: "inactive" };
|
|
@@ -1108,7 +1108,7 @@ function pr(e) {
|
|
|
1108
1108
|
});
|
|
1109
1109
|
}
|
|
1110
1110
|
const d = {
|
|
1111
|
-
...
|
|
1111
|
+
...ur(),
|
|
1112
1112
|
activatedColumnKeys: a,
|
|
1113
1113
|
byColumnKey: o
|
|
1114
1114
|
};
|
|
@@ -1133,7 +1133,7 @@ function pr(e) {
|
|
|
1133
1133
|
);
|
|
1134
1134
|
}
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1136
|
+
function vo(e) {
|
|
1137
1137
|
if (e.value !== null && typeof e.value != "string")
|
|
1138
1138
|
return {
|
|
1139
1139
|
value: e.value,
|
|
@@ -1150,11 +1150,11 @@ function go(e) {
|
|
|
1150
1150
|
const r = e.presentation.formatValue(e.value);
|
|
1151
1151
|
return { value: e.value, label: r.text, result: r };
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1153
|
+
function bo(e) {
|
|
1154
1154
|
if (!e.result || typeof e.result != "object") return !1;
|
|
1155
1155
|
const r = e.result;
|
|
1156
1156
|
if (e.expectedResultOwner !== void 0 && r.resultOwner !== e.expectedResultOwner || !Array.isArray(r.records)) return !1;
|
|
1157
|
-
const t =
|
|
1157
|
+
const t = pr({
|
|
1158
1158
|
card: e.card,
|
|
1159
1159
|
effectiveCardConfig: e.effectiveCardConfig,
|
|
1160
1160
|
records: r.records,
|
|
@@ -1168,7 +1168,7 @@ function vo(e) {
|
|
|
1168
1168
|
function ke(e) {
|
|
1169
1169
|
return !e || typeof e != "object" ? !1 : Array.isArray(e.cards);
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function hr(e) {
|
|
1172
1172
|
if (!e)
|
|
1173
1173
|
return null;
|
|
1174
1174
|
if (typeof e == "string")
|
|
@@ -1184,17 +1184,17 @@ function Ue(e) {
|
|
|
1184
1184
|
var r;
|
|
1185
1185
|
return (r = e == null ? void 0 : e.cards) != null && r.length ? e.activeCardId && e.cards.find((t) => t.id === e.activeCardId) || e.cards[0] : null;
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1187
|
+
function Io(e) {
|
|
1188
1188
|
var t;
|
|
1189
1189
|
const r = (e == null ? void 0 : e.frameObject) ?? ((t = e == null ? void 0 : e.visual) == null ? void 0 : t.frameObject);
|
|
1190
|
-
return Ue(
|
|
1190
|
+
return Ue(hr(r));
|
|
1191
1191
|
}
|
|
1192
1192
|
function Ie(e) {
|
|
1193
1193
|
if (!(e != null && e.expectedType)) return "table";
|
|
1194
1194
|
const r = Array.isArray(e.expectedType) ? e.expectedType[0] : e.expectedType;
|
|
1195
|
-
return
|
|
1195
|
+
return vr(r) ? r : "table";
|
|
1196
1196
|
}
|
|
1197
|
-
const
|
|
1197
|
+
const gr = [
|
|
1198
1198
|
"bar",
|
|
1199
1199
|
"horizontalBar",
|
|
1200
1200
|
"line",
|
|
@@ -1225,8 +1225,8 @@ const hr = [
|
|
|
1225
1225
|
"treemap",
|
|
1226
1226
|
"custom"
|
|
1227
1227
|
];
|
|
1228
|
-
function
|
|
1229
|
-
return
|
|
1228
|
+
function vr(e) {
|
|
1229
|
+
return gr.includes(e);
|
|
1230
1230
|
}
|
|
1231
1231
|
function Y(e) {
|
|
1232
1232
|
const r = e.position;
|
|
@@ -1306,12 +1306,12 @@ function Ge(e, r) {
|
|
|
1306
1306
|
)[0];
|
|
1307
1307
|
return l == null ? void 0 : l.slot;
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function br(e, r) {
|
|
1310
1310
|
const t = Ge(e, r);
|
|
1311
1311
|
if (t)
|
|
1312
1312
|
return Ie(t);
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function Ir(e, r) {
|
|
1315
1315
|
var n;
|
|
1316
1316
|
const t = (n = e == null ? void 0 : e.customCardPreferences) == null ? void 0 : n.slotIndex;
|
|
1317
1317
|
return typeof t == "number" ? t : r;
|
|
@@ -1334,18 +1334,18 @@ function Se(e, r) {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
return !1;
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Cr(e) {
|
|
1338
1338
|
const r = [];
|
|
1339
1339
|
let t = -1;
|
|
1340
1340
|
e.forEach((n, o) => {
|
|
1341
|
-
const a =
|
|
1341
|
+
const a = Ir(n, o);
|
|
1342
1342
|
a > t && (t = a), r[a] = n ?? null;
|
|
1343
1343
|
});
|
|
1344
1344
|
for (let n = 0; n <= t; n += 1)
|
|
1345
1345
|
n in r || (r[n] = null);
|
|
1346
1346
|
return r;
|
|
1347
1347
|
}
|
|
1348
|
-
function
|
|
1348
|
+
function Co(e) {
|
|
1349
1349
|
return e.map((r, t) => !r.customCardPreferences || r.customCardPreferences.slotIndex === t ? r : {
|
|
1350
1350
|
...r,
|
|
1351
1351
|
customCardPreferences: {
|
|
@@ -1354,17 +1354,17 @@ function Io(e) {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
});
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1357
|
+
function To(e) {
|
|
1358
1358
|
const r = je(e);
|
|
1359
1359
|
if (r)
|
|
1360
1360
|
return Ie(r);
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function wo(e, r, t) {
|
|
1363
1363
|
if (!e) return;
|
|
1364
|
-
const n =
|
|
1364
|
+
const n = br(t, r);
|
|
1365
1365
|
return e.type === "custom" && n ? n : e.type;
|
|
1366
1366
|
}
|
|
1367
|
-
function
|
|
1367
|
+
function $o(e, r, t) {
|
|
1368
1368
|
var g;
|
|
1369
1369
|
const n = {
|
|
1370
1370
|
dataSource: t.dataSource,
|
|
@@ -1392,7 +1392,7 @@ function wo(e, r, t) {
|
|
|
1392
1392
|
for (let y = 0; y < d; y += 1) {
|
|
1393
1393
|
const b = Ge(e, y), C = Ie(b), v = !u && y === s, w = y, k = {
|
|
1394
1394
|
...n,
|
|
1395
|
-
id:
|
|
1395
|
+
id: Rt(),
|
|
1396
1396
|
title: (v ? l == null ? void 0 : l.label : b == null ? void 0 : b.label) || `Tab ${y + 1}`,
|
|
1397
1397
|
tabTitle: (v ? l == null ? void 0 : l.label : b == null ? void 0 : b.label) || `Tab ${y + 1}`,
|
|
1398
1398
|
description: (v ? l == null ? void 0 : l.description : b == null ? void 0 : b.description) || "",
|
|
@@ -1438,7 +1438,7 @@ function wo(e, r, t) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
return f;
|
|
1440
1440
|
}
|
|
1441
|
-
function
|
|
1441
|
+
function Tr({
|
|
1442
1442
|
frame: e,
|
|
1443
1443
|
configCard: r,
|
|
1444
1444
|
isMultiInputVisual: t
|
|
@@ -1453,10 +1453,10 @@ function Cr({
|
|
|
1453
1453
|
return e.cards.find((d) => d.id === i) || null;
|
|
1454
1454
|
}) : e.cards;
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function wr(e, r) {
|
|
1457
1457
|
return r && Se(r, e.cards) ? r : e.cards.find((t) => Se(t, e.cards)) || null;
|
|
1458
1458
|
}
|
|
1459
|
-
function
|
|
1459
|
+
function $r(e, r) {
|
|
1460
1460
|
var o, a;
|
|
1461
1461
|
if (!e) return null;
|
|
1462
1462
|
const t = r == null ? void 0 : r.visualType;
|
|
@@ -1466,10 +1466,10 @@ function wr(e, r) {
|
|
|
1466
1466
|
const n = (o = e.customCardPreferences) == null ? void 0 : o.visualType;
|
|
1467
1467
|
return n || ((a = e.customCardPreferences) != null && a.dataInputCardIds ? "multiple" : null);
|
|
1468
1468
|
}
|
|
1469
|
-
function
|
|
1469
|
+
function xo(e) {
|
|
1470
1470
|
return e.visualType === "multiple" || e.slots && e.slots.length > 0 || (e.minInputs || 0) > 1 || (e.maxInputs || 0) > 1 || (e.dataInputs || []).length > 1 ? "multiple" : "single";
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function Eo(e) {
|
|
1473
1473
|
return Array.isArray(e) ? { records: e } : e;
|
|
1474
1474
|
}
|
|
1475
1475
|
class Q extends Error {
|
|
@@ -1483,7 +1483,7 @@ class Q extends Error {
|
|
|
1483
1483
|
this.name = "TemporalSnapshotSelectionError", this.selection = t;
|
|
1484
1484
|
}
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1486
|
+
function xr(e, r) {
|
|
1487
1487
|
var o;
|
|
1488
1488
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
1489
1489
|
for (const a of r) {
|
|
@@ -1497,9 +1497,9 @@ function $r(e, r) {
|
|
|
1497
1497
|
let c = !a.cardId;
|
|
1498
1498
|
for (const d of i) {
|
|
1499
1499
|
const l = (((o = d.document) == null ? void 0 : o.sections) || []).flatMap(
|
|
1500
|
-
(f) =>
|
|
1500
|
+
(f) => Ot(f)
|
|
1501
1501
|
), s = (d.frames || []).flatMap(
|
|
1502
|
-
(f) =>
|
|
1502
|
+
(f) => Er(f, a.cardId)
|
|
1503
1503
|
);
|
|
1504
1504
|
s.length > 0 && (c = !0);
|
|
1505
1505
|
const u = [
|
|
@@ -1525,29 +1525,29 @@ function $r(e, r) {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
return t;
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1528
|
+
function Er(e, r) {
|
|
1529
1529
|
var i;
|
|
1530
1530
|
const t = r ? (i = e.cards) == null ? void 0 : i.find((c) => c.id === r) : Ue(e);
|
|
1531
1531
|
if (!t) return [];
|
|
1532
|
-
const n =
|
|
1532
|
+
const n = wr(e, t), o = (e.cards || []).filter(
|
|
1533
1533
|
(c) => {
|
|
1534
1534
|
var d;
|
|
1535
1535
|
return typeof ((d = c.customCardPreferences) == null ? void 0 : d.slotIndex) == "number";
|
|
1536
1536
|
}
|
|
1537
|
-
).length > 1, a = n != null && (
|
|
1538
|
-
return !n || !a ? [t] :
|
|
1539
|
-
|
|
1537
|
+
).length > 1, a = n != null && ($r(n) === "multiple" || o);
|
|
1538
|
+
return !n || !a ? [t] : Cr(
|
|
1539
|
+
Tr({
|
|
1540
1540
|
frame: e,
|
|
1541
1541
|
configCard: n,
|
|
1542
1542
|
isMultiInputVisual: !0
|
|
1543
1543
|
})
|
|
1544
1544
|
).filter((c) => c !== null);
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1547
|
-
return
|
|
1546
|
+
function ko(e) {
|
|
1547
|
+
return xr(e.dashboard, e.selections).flatMap(
|
|
1548
1548
|
({ card: r, attachmentIndex: t }) => {
|
|
1549
1549
|
var s, u, f, m;
|
|
1550
|
-
const n = ((s = e.resolveCardConfig) == null ? void 0 : s.call(e, r)) ?? r.config, o =
|
|
1550
|
+
const n = ((s = e.resolveCardConfig) == null ? void 0 : s.call(e, r)) ?? r.config, o = tr({
|
|
1551
1551
|
card: r,
|
|
1552
1552
|
cardConfig: n
|
|
1553
1553
|
}), a = {
|
|
@@ -1561,7 +1561,7 @@ function Eo(e) {
|
|
|
1561
1561
|
fieldId: g.id,
|
|
1562
1562
|
role: g.role
|
|
1563
1563
|
},
|
|
1564
|
-
format:
|
|
1564
|
+
format: lr(
|
|
1565
1565
|
g,
|
|
1566
1566
|
{
|
|
1567
1567
|
dateStyle: e.valueFormatPreferences.dateStyle,
|
|
@@ -1592,7 +1592,7 @@ function Eo(e) {
|
|
|
1592
1592
|
}))
|
|
1593
1593
|
], b = /* @__PURE__ */ new Map(), C = new Set(
|
|
1594
1594
|
y.map(
|
|
1595
|
-
({ field: v, role: w }) =>
|
|
1595
|
+
({ field: v, role: w }) => Wt(v, w)
|
|
1596
1596
|
)
|
|
1597
1597
|
);
|
|
1598
1598
|
for (const { field: v } of y) {
|
|
@@ -1602,7 +1602,7 @@ function Eo(e) {
|
|
|
1602
1602
|
for (const v of g) {
|
|
1603
1603
|
const w = Ae(v.dataType);
|
|
1604
1604
|
if (w !== "date" && w !== "datetime") continue;
|
|
1605
|
-
const k =
|
|
1605
|
+
const k = Yt(v), _ = v.label, M = Zt({
|
|
1606
1606
|
label: _,
|
|
1607
1607
|
labelCount: _ && b.get(_) || 0,
|
|
1608
1608
|
rawKey: k,
|
|
@@ -1641,12 +1641,12 @@ function Eo(e) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
);
|
|
1643
1643
|
}
|
|
1644
|
-
const
|
|
1644
|
+
const kr = /* @__PURE__ */ new Set([
|
|
1645
1645
|
"table",
|
|
1646
1646
|
"aggregateTable",
|
|
1647
1647
|
"pivotTable",
|
|
1648
1648
|
"detailTable"
|
|
1649
|
-
]),
|
|
1649
|
+
]), Sr = /* @__PURE__ */ new Set([
|
|
1650
1650
|
"bar",
|
|
1651
1651
|
"horizontalBar",
|
|
1652
1652
|
"line",
|
|
@@ -1677,34 +1677,34 @@ const Er = /* @__PURE__ */ new Set([
|
|
|
1677
1677
|
"treemap",
|
|
1678
1678
|
"custom"
|
|
1679
1679
|
]);
|
|
1680
|
-
function
|
|
1680
|
+
function So(e) {
|
|
1681
1681
|
var o, a, i;
|
|
1682
|
-
const r =
|
|
1682
|
+
const r = Sr.has(e.type) && (e.type !== "custom" || !!((o = e.customCardPreferences) != null && o.url));
|
|
1683
1683
|
let t = !1;
|
|
1684
1684
|
try {
|
|
1685
|
-
t = !!
|
|
1685
|
+
t = !!Dt(e);
|
|
1686
1686
|
} catch {
|
|
1687
1687
|
return { formats: [], defaultFormat: null };
|
|
1688
1688
|
}
|
|
1689
|
-
return e.type === "text" || !r || !t &&
|
|
1690
|
-
formats:
|
|
1689
|
+
return e.type === "text" || !r || !t && At(e) ? { formats: [], defaultFormat: null } : {
|
|
1690
|
+
formats: _r({
|
|
1691
1691
|
cardType: e.type,
|
|
1692
1692
|
allowDownload: (a = e.preferences) == null ? void 0 : a.allowDownload
|
|
1693
1693
|
}),
|
|
1694
|
-
defaultFormat:
|
|
1694
|
+
defaultFormat: Fr({
|
|
1695
1695
|
cardType: e.type,
|
|
1696
1696
|
allowDownload: (i = e.preferences) == null ? void 0 : i.allowDownload
|
|
1697
1697
|
})
|
|
1698
1698
|
};
|
|
1699
1699
|
}
|
|
1700
|
-
function
|
|
1700
|
+
function _r(e) {
|
|
1701
1701
|
return e.allowDownload === !1 ? ["pdf"] : ["pdf", "csv"];
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1704
|
-
return
|
|
1703
|
+
function Fr(e) {
|
|
1704
|
+
return kr.has(e.cardType) && e.allowDownload !== !1 ? "csv" : "pdf";
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1707
|
-
const { config: r } = e, t =
|
|
1706
|
+
function _o(e) {
|
|
1707
|
+
const { config: r } = e, t = Ft({
|
|
1708
1708
|
spec: r.spec,
|
|
1709
1709
|
presentation: r.presentation,
|
|
1710
1710
|
defaults: r.defaultView,
|
|
@@ -1724,7 +1724,7 @@ function So(e) {
|
|
|
1724
1724
|
}
|
|
1725
1725
|
});
|
|
1726
1726
|
}
|
|
1727
|
-
const
|
|
1727
|
+
const Rr = T.object({
|
|
1728
1728
|
connection_id: T.string().min(1),
|
|
1729
1729
|
cardType: T.literal("matrixTable"),
|
|
1730
1730
|
resultOwner: T.literal("config"),
|
|
@@ -1739,7 +1739,7 @@ const Fr = T.object({
|
|
|
1739
1739
|
semanticDomainId: T.string().optional()
|
|
1740
1740
|
}).passthrough(),
|
|
1741
1741
|
active_filters: T.array(T.unknown()).default([])
|
|
1742
|
-
}).passthrough(),
|
|
1742
|
+
}).passthrough(), Fo = Rr.extend({
|
|
1743
1743
|
dashboardId: T.string().min(1),
|
|
1744
1744
|
cardId: T.string().min(1),
|
|
1745
1745
|
formatOptions: T.object({
|
|
@@ -1754,7 +1754,7 @@ const Fr = T.object({
|
|
|
1754
1754
|
});
|
|
1755
1755
|
})
|
|
1756
1756
|
});
|
|
1757
|
-
function
|
|
1757
|
+
function Ro(e) {
|
|
1758
1758
|
return {
|
|
1759
1759
|
...e.controls,
|
|
1760
1760
|
type: "card",
|
|
@@ -1789,7 +1789,7 @@ function Fo(e) {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
};
|
|
1791
1791
|
}
|
|
1792
|
-
const ie = T.number().int().nonnegative(),
|
|
1792
|
+
const ie = T.number().int().nonnegative(), Ao = T.discriminatedUnion("status", [
|
|
1793
1793
|
T.object({
|
|
1794
1794
|
status: T.literal("ok"),
|
|
1795
1795
|
request: ye,
|
|
@@ -1800,29 +1800,20 @@ const ie = T.number().int().nonnegative(), Ro = T.discriminatedUnion("status", [
|
|
|
1800
1800
|
T.object({
|
|
1801
1801
|
status: T.literal("failed"),
|
|
1802
1802
|
failure: T.object({
|
|
1803
|
-
code: T.enum(
|
|
1804
|
-
"invalid_request",
|
|
1805
|
-
"unsupported_capability",
|
|
1806
|
-
"stale_cursor",
|
|
1807
|
-
"forbidden",
|
|
1808
|
-
"budget_exceeded",
|
|
1809
|
-
"source_truncated",
|
|
1810
|
-
"execution_failed",
|
|
1811
|
-
"cancelled"
|
|
1812
|
-
]),
|
|
1803
|
+
code: T.enum(_t),
|
|
1813
1804
|
limit: T.enum(["rows", "bytes"]).optional(),
|
|
1814
1805
|
message: T.string().min(1),
|
|
1815
1806
|
retryable: T.boolean()
|
|
1816
1807
|
}).strict()
|
|
1817
1808
|
}).strict()
|
|
1818
1809
|
]);
|
|
1819
|
-
function
|
|
1810
|
+
function Ar(e) {
|
|
1820
1811
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
1821
1812
|
}
|
|
1822
1813
|
function P(e, r, t) {
|
|
1823
|
-
return
|
|
1814
|
+
return Ar(e) ? e : (t.push({ field: r, message: "Expected an object." }), {});
|
|
1824
1815
|
}
|
|
1825
|
-
function
|
|
1816
|
+
function O(e, r, t, n) {
|
|
1826
1817
|
const o = new Set(t);
|
|
1827
1818
|
Object.keys(e).forEach((a) => {
|
|
1828
1819
|
o.has(a) || n.push({
|
|
@@ -1864,11 +1855,11 @@ function Ce(e, r, t) {
|
|
|
1864
1855
|
}
|
|
1865
1856
|
function _e(e, r, t) {
|
|
1866
1857
|
const n = P(e, r, t);
|
|
1867
|
-
|
|
1858
|
+
O(n, r, ["tokens", "components"], t);
|
|
1868
1859
|
const o = {};
|
|
1869
1860
|
if (n.tokens !== void 0) {
|
|
1870
1861
|
const a = P(n.tokens, `${r}.tokens`, t);
|
|
1871
|
-
|
|
1862
|
+
O(
|
|
1872
1863
|
a,
|
|
1873
1864
|
`${r}.tokens`,
|
|
1874
1865
|
["color", "typography"],
|
|
@@ -1893,7 +1884,7 @@ function _e(e, r, t) {
|
|
|
1893
1884
|
"warning",
|
|
1894
1885
|
"info"
|
|
1895
1886
|
];
|
|
1896
|
-
|
|
1887
|
+
O(c, `${r}.tokens.color`, d, t);
|
|
1897
1888
|
const l = {};
|
|
1898
1889
|
d.forEach((s) => {
|
|
1899
1890
|
const u = N(
|
|
@@ -1911,7 +1902,7 @@ function _e(e, r, t) {
|
|
|
1911
1902
|
`${r}.tokens.typography`,
|
|
1912
1903
|
t
|
|
1913
1904
|
);
|
|
1914
|
-
|
|
1905
|
+
O(
|
|
1915
1906
|
c,
|
|
1916
1907
|
`${r}.tokens.typography`,
|
|
1917
1908
|
["fontFamily", "monoFontFamily"],
|
|
@@ -1943,13 +1934,13 @@ function _e(e, r, t) {
|
|
|
1943
1934
|
`${r}.components`,
|
|
1944
1935
|
t
|
|
1945
1936
|
);
|
|
1946
|
-
if (
|
|
1937
|
+
if (O(a, `${r}.components`, ["chart"], t), a.chart !== void 0) {
|
|
1947
1938
|
const i = P(
|
|
1948
1939
|
a.chart,
|
|
1949
1940
|
`${r}.components.chart`,
|
|
1950
1941
|
t
|
|
1951
1942
|
);
|
|
1952
|
-
|
|
1943
|
+
O(i, `${r}.components.chart`, ["palette"], t);
|
|
1953
1944
|
let c;
|
|
1954
1945
|
i.palette !== void 0 && (Array.isArray(i.palette) ? i.palette.length > 20 ? t.push({
|
|
1955
1946
|
field: `${r}.components.chart.palette`,
|
|
@@ -1971,13 +1962,13 @@ function _e(e, r, t) {
|
|
|
1971
1962
|
}
|
|
1972
1963
|
return o;
|
|
1973
1964
|
}
|
|
1974
|
-
function
|
|
1965
|
+
function Dr(e, r) {
|
|
1975
1966
|
const t = "presentation.appearance", n = P(e, t, r);
|
|
1976
|
-
|
|
1967
|
+
O(n, t, ["version", "schemes"], r);
|
|
1977
1968
|
const o = {};
|
|
1978
1969
|
if (n.version !== void 0 && (typeof n.version != "number" || !Number.isFinite(n.version) ? r.push({ field: `${t}.version`, message: "Expected a number." }) : o.version = n.version), n.schemes !== void 0) {
|
|
1979
1970
|
const a = P(n.schemes, `${t}.schemes`, r);
|
|
1980
|
-
|
|
1971
|
+
O(a, `${t}.schemes`, ["light", "dark"], r), o.schemes = {
|
|
1981
1972
|
...a.light !== void 0 ? {
|
|
1982
1973
|
light: _e(
|
|
1983
1974
|
a.light,
|
|
@@ -1996,9 +1987,9 @@ function Ar(e, r) {
|
|
|
1996
1987
|
}
|
|
1997
1988
|
return o;
|
|
1998
1989
|
}
|
|
1999
|
-
function
|
|
1990
|
+
function Mr(e, r) {
|
|
2000
1991
|
const t = "presentation.brandOverrides", n = P(e, t, r);
|
|
2001
|
-
|
|
1992
|
+
O(n, t, ["brandName", "logoUrl", "link"], r);
|
|
2002
1993
|
const o = N(
|
|
2003
1994
|
n.brandName,
|
|
2004
1995
|
`${t}.brandName`,
|
|
@@ -2011,7 +2002,7 @@ function Dr(e, r) {
|
|
|
2011
2002
|
...i !== void 0 ? { link: i } : {}
|
|
2012
2003
|
};
|
|
2013
2004
|
}
|
|
2014
|
-
function
|
|
2005
|
+
function Pr(e, r) {
|
|
2015
2006
|
const t = "presentation.fragments", n = P(e, t, r), o = [
|
|
2016
2007
|
"preHeaderText",
|
|
2017
2008
|
"headerBannerHtml",
|
|
@@ -2020,7 +2011,7 @@ function Mr(e, r) {
|
|
|
2020
2011
|
"disclaimerHtml",
|
|
2021
2012
|
"unsubscribeUrl"
|
|
2022
2013
|
];
|
|
2023
|
-
|
|
2014
|
+
O(n, t, o, r);
|
|
2024
2015
|
const a = {};
|
|
2025
2016
|
return o.forEach((i) => {
|
|
2026
2017
|
const c = i === "unsubscribeUrl" ? Ce(n[i], `${t}.${i}`, r) : N(
|
|
@@ -2033,9 +2024,9 @@ function Mr(e, r) {
|
|
|
2033
2024
|
c !== void 0 && (a[i] = c);
|
|
2034
2025
|
}), a;
|
|
2035
2026
|
}
|
|
2036
|
-
function
|
|
2027
|
+
function Or(e) {
|
|
2037
2028
|
const r = [], t = {};
|
|
2038
|
-
if (e.appearance !== void 0 && (t.appearance =
|
|
2029
|
+
if (e.appearance !== void 0 && (t.appearance = Dr(e.appearance, r)), e.brandOverrides !== void 0 && (t.brandOverrides = Mr(e.brandOverrides, r)), e.fragments !== void 0 && (t.fragments = Pr(e.fragments, r)), e.viewUrl !== void 0) {
|
|
2039
2030
|
const n = Ce(e.viewUrl, "presentation.viewUrl", r);
|
|
2040
2031
|
n !== void 0 && (t.viewUrl = n);
|
|
2041
2032
|
}
|
|
@@ -2057,7 +2048,7 @@ const X = [
|
|
|
2057
2048
|
3: "third",
|
|
2058
2049
|
4: "fourth",
|
|
2059
2050
|
[-1]: "last"
|
|
2060
|
-
},
|
|
2051
|
+
}, Do = {
|
|
2061
2052
|
frequency: "weekly",
|
|
2062
2053
|
hour: 9,
|
|
2063
2054
|
minute: 0,
|
|
@@ -2072,7 +2063,7 @@ function Br(e) {
|
|
|
2072
2063
|
return !1;
|
|
2073
2064
|
}
|
|
2074
2065
|
}
|
|
2075
|
-
function
|
|
2066
|
+
function Kr(e) {
|
|
2076
2067
|
return Number.isInteger(e.minute) && e.minute >= 0 && e.minute <= 59 && Number.isInteger(e.hour) && e.hour >= 0 && e.hour <= 23;
|
|
2077
2068
|
}
|
|
2078
2069
|
function Ze(e) {
|
|
@@ -2097,14 +2088,14 @@ function V(e, r) {
|
|
|
2097
2088
|
t.push((r + n * e) % 12);
|
|
2098
2089
|
return t.sort((n, o) => n - o);
|
|
2099
2090
|
}
|
|
2100
|
-
function
|
|
2091
|
+
function Nr(e, r) {
|
|
2101
2092
|
return e === 1 ? "*" : V(e, r).map((t) => t + 1).join(",");
|
|
2102
2093
|
}
|
|
2103
2094
|
function Xe(e, r) {
|
|
2104
|
-
return e.every((t) =>
|
|
2095
|
+
return e.every((t) => Hr(t, r));
|
|
2105
2096
|
}
|
|
2106
|
-
function
|
|
2107
|
-
if (!
|
|
2097
|
+
function Mo(e) {
|
|
2098
|
+
if (!Kr(e))
|
|
2108
2099
|
throw new Error("Choose a valid schedule time.");
|
|
2109
2100
|
const r = `${e.minute} ${e.hour}`;
|
|
2110
2101
|
switch (e.frequency) {
|
|
@@ -2118,7 +2109,7 @@ function Do(e) {
|
|
|
2118
2109
|
case "monthly": {
|
|
2119
2110
|
if (!We.includes(e.interval) || !Number.isInteger(e.startMonth) || e.startMonth < 0 || e.startMonth >= e.interval)
|
|
2120
2111
|
throw new Error("Choose a valid month cycle.");
|
|
2121
|
-
const t =
|
|
2112
|
+
const t = Nr(e.interval, e.startMonth);
|
|
2122
2113
|
if (e.on.type === "days") {
|
|
2123
2114
|
const i = Qe(e.on.days);
|
|
2124
2115
|
if (!i) throw new Error("Choose at least one day of the month.");
|
|
@@ -2136,7 +2127,7 @@ function Do(e) {
|
|
|
2136
2127
|
}
|
|
2137
2128
|
}
|
|
2138
2129
|
}
|
|
2139
|
-
function
|
|
2130
|
+
function Lr(e) {
|
|
2140
2131
|
if (e === "*") return { interval: 1, startMonth: 0 };
|
|
2141
2132
|
const r = e.split(",");
|
|
2142
2133
|
if (r.some((i) => !/^([1-9]|1[0-2])$/.test(i))) return null;
|
|
@@ -2149,7 +2140,7 @@ function Nr(e) {
|
|
|
2149
2140
|
);
|
|
2150
2141
|
return o >= n || a.length !== t.length || a.some((i, c) => i !== t[c]) ? null : { interval: n, startMonth: o };
|
|
2151
2142
|
}
|
|
2152
|
-
function
|
|
2143
|
+
function zr(e) {
|
|
2153
2144
|
const r = e.split(",");
|
|
2154
2145
|
if (r.some((o) => !/^(L|[1-9]|[12]\d|3[01])$/.test(o))) return null;
|
|
2155
2146
|
const t = r.map(
|
|
@@ -2157,7 +2148,7 @@ function Lr(e) {
|
|
|
2157
2148
|
), n = Qe(t);
|
|
2158
2149
|
return !n || n.some((o, a) => o !== t[a]) ? null : n;
|
|
2159
2150
|
}
|
|
2160
|
-
function
|
|
2151
|
+
function Vr(e) {
|
|
2161
2152
|
const r = /^([A-Z]{3})(?:#([1-4])|(L))$/.exec(e);
|
|
2162
2153
|
if (!r) return null;
|
|
2163
2154
|
const t = He.get(r[1]);
|
|
@@ -2193,10 +2184,10 @@ function Je(e) {
|
|
|
2193
2184
|
value: { frequency: "weekly", hour: d, minute: c, weekdays: m }
|
|
2194
2185
|
};
|
|
2195
2186
|
}
|
|
2196
|
-
const l =
|
|
2187
|
+
const l = Lr(a);
|
|
2197
2188
|
if (!l) return A;
|
|
2198
2189
|
if (o !== "*" && i === "*") {
|
|
2199
|
-
const s =
|
|
2190
|
+
const s = zr(o), u = V(l.interval, l.startMonth);
|
|
2200
2191
|
return !s || !Xe(s, u) ? A : {
|
|
2201
2192
|
ok: !0,
|
|
2202
2193
|
value: {
|
|
@@ -2209,7 +2200,7 @@ function Je(e) {
|
|
|
2209
2200
|
};
|
|
2210
2201
|
}
|
|
2211
2202
|
if (o === "*" && i !== "*") {
|
|
2212
|
-
const s =
|
|
2203
|
+
const s = Vr(i);
|
|
2213
2204
|
return s ? {
|
|
2214
2205
|
ok: !0,
|
|
2215
2206
|
value: {
|
|
@@ -2223,14 +2214,14 @@ function Je(e) {
|
|
|
2223
2214
|
}
|
|
2224
2215
|
return A;
|
|
2225
2216
|
}
|
|
2226
|
-
function
|
|
2217
|
+
function qr(e, r, t) {
|
|
2227
2218
|
return new Intl.DateTimeFormat(t, {
|
|
2228
2219
|
hour: "numeric",
|
|
2229
2220
|
minute: "2-digit",
|
|
2230
2221
|
timeZone: "UTC"
|
|
2231
2222
|
}).format(new Date(Date.UTC(2020, 0, 1, e, r)));
|
|
2232
2223
|
}
|
|
2233
|
-
function
|
|
2224
|
+
function Ur(e, r) {
|
|
2234
2225
|
var t;
|
|
2235
2226
|
if (e === "UTC") return "UTC";
|
|
2236
2227
|
try {
|
|
@@ -2245,11 +2236,11 @@ function qr(e, r) {
|
|
|
2245
2236
|
function Fe(e) {
|
|
2246
2237
|
return e.length <= 1 ? e.join("") : e.length === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")} and ${e[e.length - 1]}`;
|
|
2247
2238
|
}
|
|
2248
|
-
function
|
|
2239
|
+
function jr(e) {
|
|
2249
2240
|
const r = e % 100;
|
|
2250
2241
|
return r >= 11 && r <= 13 ? `${e}th` : `${e}${["th", "st", "nd", "rd"][e % 10] ?? "th"}`;
|
|
2251
2242
|
}
|
|
2252
|
-
function
|
|
2243
|
+
function Gr(e, r, t) {
|
|
2253
2244
|
const n = (a, i) => new Intl.DateTimeFormat(t, { month: i, timeZone: "UTC" }).format(
|
|
2254
2245
|
new Date(Date.UTC(2020, a, 1))
|
|
2255
2246
|
);
|
|
@@ -2258,13 +2249,13 @@ function jr(e, r, t) {
|
|
|
2258
2249
|
const o = V(e, r).map((a) => n(a, "short")).join(", ");
|
|
2259
2250
|
return e === 3 ? `each quarter (${o})` : `every ${e} months (${o})`;
|
|
2260
2251
|
}
|
|
2261
|
-
function
|
|
2252
|
+
function Po(e, r, t = "en-US") {
|
|
2262
2253
|
const n = Je(e);
|
|
2263
2254
|
if (!n.ok) return null;
|
|
2264
2255
|
try {
|
|
2265
|
-
const o = n.value, a =
|
|
2256
|
+
const o = n.value, a = Ur(r, t);
|
|
2266
2257
|
if (!a) return null;
|
|
2267
|
-
const i = `at ${
|
|
2258
|
+
const i = `at ${qr(o.hour, o.minute, t)} ${a}`, c = (d) => new Intl.DateTimeFormat(t, {
|
|
2268
2259
|
weekday: "long",
|
|
2269
2260
|
timeZone: "UTC"
|
|
2270
2261
|
}).format(new Date(Date.UTC(2023, 0, 1 + d)));
|
|
@@ -2274,11 +2265,11 @@ function Mo(e, r, t = "en-US") {
|
|
|
2274
2265
|
case "weekly":
|
|
2275
2266
|
return `Every ${Fe(o.weekdays.map(c))} ${i}`;
|
|
2276
2267
|
case "monthly": {
|
|
2277
|
-
const d =
|
|
2268
|
+
const d = Gr(o.interval, o.startMonth, t);
|
|
2278
2269
|
if (o.on.type === "weekday")
|
|
2279
2270
|
return `On the ${Ye[o.on.ordinal]} ${c(o.on.weekday)} of ${d} ${i}`;
|
|
2280
2271
|
const l = o.on.days.map(
|
|
2281
|
-
(s) => s === "last" ? "last day" :
|
|
2272
|
+
(s) => s === "last" ? "last day" : jr(s)
|
|
2282
2273
|
);
|
|
2283
2274
|
return `On the ${Fe(l)} of ${d} ${i}`;
|
|
2284
2275
|
}
|
|
@@ -2288,10 +2279,10 @@ function Mo(e, r, t = "en-US") {
|
|
|
2288
2279
|
}
|
|
2289
2280
|
}
|
|
2290
2281
|
const et = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
2291
|
-
function
|
|
2282
|
+
function Hr(e, r) {
|
|
2292
2283
|
return e === "last" || r.some((t) => e <= et[t]);
|
|
2293
2284
|
}
|
|
2294
|
-
function
|
|
2285
|
+
function Oo(e) {
|
|
2295
2286
|
if (e.frequency !== "monthly" || e.on.type !== "days") return null;
|
|
2296
2287
|
const r = e.on.days.filter((o) => o !== "last");
|
|
2297
2288
|
if (r.length === 0) return null;
|
|
@@ -2300,10 +2291,10 @@ function Po(e) {
|
|
|
2300
2291
|
);
|
|
2301
2292
|
return n.length > 0 ? { day: t, months: n } : null;
|
|
2302
2293
|
}
|
|
2303
|
-
function
|
|
2294
|
+
function Wr(e, r) {
|
|
2304
2295
|
return new Date(Date.UTC(e, r + 1, 0)).getUTCDate();
|
|
2305
2296
|
}
|
|
2306
|
-
function
|
|
2297
|
+
function Yr(e, r, t, n) {
|
|
2307
2298
|
const o = new Date(Date.UTC(r, t, n)).getUTCDay();
|
|
2308
2299
|
switch (e.frequency) {
|
|
2309
2300
|
case "daily":
|
|
@@ -2313,7 +2304,7 @@ function Wr(e, r, t, n) {
|
|
|
2313
2304
|
case "monthly": {
|
|
2314
2305
|
if (!V(e.interval, e.startMonth).includes(t))
|
|
2315
2306
|
return !1;
|
|
2316
|
-
const a =
|
|
2307
|
+
const a = Wr(r, t);
|
|
2317
2308
|
return e.on.type === "days" ? e.on.days.some(
|
|
2318
2309
|
(i) => i === "last" ? n === a : i === n
|
|
2319
2310
|
) : o !== e.on.weekday ? !1 : e.on.ordinal === -1 ? n + 7 > a : Math.ceil(n / 7) === e.on.ordinal;
|
|
@@ -2338,34 +2329,34 @@ function Bo(e, r, t, n) {
|
|
|
2338
2329
|
c("hour") * 60 + c("minute") >= a.hour * 60 + a.minute && d.setUTCDate(d.getUTCDate() + 1);
|
|
2339
2330
|
const l = [];
|
|
2340
2331
|
for (let s = 0; s < 366 * 4 * (n + 1) && l.length < n; s += 1)
|
|
2341
|
-
|
|
2332
|
+
Yr(a, d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate()) && l.push(d.toISOString().slice(0, 10)), d.setUTCDate(d.getUTCDate() + 1);
|
|
2342
2333
|
return l;
|
|
2343
2334
|
}
|
|
2344
|
-
function
|
|
2335
|
+
function Ko(e) {
|
|
2345
2336
|
return e != null && e.role ? e.type === "tenant" ? e.role === "POWER_USER" : ["AUTHOR", "ADMIN", "SUPER_ADMIN"].includes(e.role) : !1;
|
|
2346
2337
|
}
|
|
2347
|
-
function
|
|
2338
|
+
function No(e) {
|
|
2348
2339
|
return e.canCreate ? [
|
|
2349
2340
|
...e.scheduledReportAvailable ? ["scheduled_report"] : [],
|
|
2350
2341
|
...e.analyticalBriefingsEnabled ? ["analytical_briefing"] : []
|
|
2351
2342
|
] : [];
|
|
2352
2343
|
}
|
|
2353
|
-
function
|
|
2344
|
+
function Zr(e) {
|
|
2354
2345
|
const r = (e == null ? void 0 : e.channels) ?? [];
|
|
2355
2346
|
return r.length === 1 && r[0] === "EMAIL";
|
|
2356
2347
|
}
|
|
2357
|
-
function
|
|
2358
|
-
return e.body.type === "generated_analysis" ? "Analytical briefing" : e.body.type === "custom_message" && e.attachments.length > 0 &&
|
|
2348
|
+
function Qr(e) {
|
|
2349
|
+
return e.body.type === "generated_analysis" ? "Analytical briefing" : e.body.type === "custom_message" && e.attachments.length > 0 && Zr(e.deliveryConfig) ? e.scheduleExpr ? "Scheduled report" : "On-demand report" : "Plain briefing";
|
|
2359
2350
|
}
|
|
2360
|
-
function
|
|
2361
|
-
const r =
|
|
2351
|
+
function Lo(e) {
|
|
2352
|
+
const r = Qr(e), t = r === "Scheduled report" || r === "On-demand report" ? "report" : "briefing";
|
|
2362
2353
|
return {
|
|
2363
2354
|
typeLabel: r,
|
|
2364
2355
|
noun: t,
|
|
2365
2356
|
pluralNoun: t === "report" ? "reports" : "briefings"
|
|
2366
2357
|
};
|
|
2367
2358
|
}
|
|
2368
|
-
const fe = "BRIEFING",
|
|
2359
|
+
const fe = "BRIEFING", Xr = ["markdown", "html"], pe = ["markdown"], ce = 20, h = {
|
|
2369
2360
|
name: 500,
|
|
2370
2361
|
description: 2e3,
|
|
2371
2362
|
instruction: 5e4,
|
|
@@ -2394,7 +2385,7 @@ const fe = "BRIEFING", Qr = ["markdown", "html"], pe = ["markdown"], ce = 20, h
|
|
|
2394
2385
|
// tiny tiles in narrow client panels; 2-up was the chosen layout).
|
|
2395
2386
|
maxKpiTiles: 8
|
|
2396
2387
|
};
|
|
2397
|
-
function
|
|
2388
|
+
function Jr(e) {
|
|
2398
2389
|
if (e === null || typeof e != "object" || Array.isArray(e))
|
|
2399
2390
|
return !1;
|
|
2400
2391
|
const r = e;
|
|
@@ -2406,15 +2397,15 @@ function Xr(e) {
|
|
|
2406
2397
|
const n = t;
|
|
2407
2398
|
return (n.kind === "metric" && typeof n.metricId == "string" && !!n.metricId.trim() || n.kind === "column" && typeof n.columnKey == "string" && !!n.columnKey.trim() || n.kind === "matrix_measure" && typeof n.measureId == "string" && !!n.measureId.trim()) && Re(r.format).ok;
|
|
2408
2399
|
}
|
|
2409
|
-
function
|
|
2410
|
-
return e == null ? "" :
|
|
2400
|
+
function en(e) {
|
|
2401
|
+
return e == null ? "" : Jr(e) ? yt(e.value, e.format) : String(e);
|
|
2411
2402
|
}
|
|
2412
|
-
function
|
|
2403
|
+
function zo(e) {
|
|
2413
2404
|
return [e.delta, e.percentChange].filter(
|
|
2414
2405
|
(r) => r != null
|
|
2415
|
-
).map(
|
|
2406
|
+
).map(en).filter(Boolean).join(" / ");
|
|
2416
2407
|
}
|
|
2417
|
-
const tt = new Set(
|
|
2408
|
+
const tt = new Set(Xr), tn = /* @__PURE__ */ new Set([
|
|
2418
2409
|
"EMAIL",
|
|
2419
2410
|
"WEBHOOK",
|
|
2420
2411
|
"SLACK",
|
|
@@ -2425,39 +2416,39 @@ const tt = new Set(Qr), en = /* @__PURE__ */ new Set([
|
|
|
2425
2416
|
maxPlanningIterations: { min: 1, max: 10 },
|
|
2426
2417
|
maxRows: { min: 1, max: 1e5 },
|
|
2427
2418
|
timeoutMs: { min: 1e3, max: 30 * 6e4 }
|
|
2428
|
-
},
|
|
2419
|
+
}, rn = /* @__PURE__ */ new Set([
|
|
2429
2420
|
"letter",
|
|
2430
2421
|
"legal",
|
|
2431
2422
|
"a4",
|
|
2432
2423
|
"a3",
|
|
2433
2424
|
"tabloid"
|
|
2434
|
-
]),
|
|
2425
|
+
]), nn = /* @__PURE__ */ new Set([
|
|
2435
2426
|
"portrait",
|
|
2436
2427
|
"landscape"
|
|
2437
|
-
]),
|
|
2428
|
+
]), on = /* @__PURE__ */ new Set([",", ";", " "]), an = new Set(xt), cn = /* @__PURE__ */ new Set([
|
|
2438
2429
|
"current",
|
|
2439
2430
|
"all"
|
|
2440
|
-
]),
|
|
2431
|
+
]), ln = /* @__PURE__ */ new Set([
|
|
2441
2432
|
"concise",
|
|
2442
2433
|
"balanced",
|
|
2443
2434
|
"detailed"
|
|
2444
|
-
]),
|
|
2435
|
+
]), sn = /* @__PURE__ */ new Set([
|
|
2445
2436
|
"info",
|
|
2446
2437
|
"positive",
|
|
2447
2438
|
"warning",
|
|
2448
2439
|
"critical"
|
|
2449
|
-
]),
|
|
2440
|
+
]), dn = /* @__PURE__ */ new Set([
|
|
2450
2441
|
"text",
|
|
2451
2442
|
"number",
|
|
2452
2443
|
"currency",
|
|
2453
2444
|
"percent",
|
|
2454
2445
|
"date",
|
|
2455
2446
|
"boolean"
|
|
2456
|
-
]),
|
|
2447
|
+
]), mn = /* @__PURE__ */ new Set([
|
|
2457
2448
|
"left",
|
|
2458
2449
|
"center",
|
|
2459
2450
|
"right"
|
|
2460
|
-
]),
|
|
2451
|
+
]), un = [
|
|
2461
2452
|
"matrix",
|
|
2462
2453
|
"pageSize",
|
|
2463
2454
|
"orientation",
|
|
@@ -2529,13 +2520,13 @@ function x(e, r, t, n) {
|
|
|
2529
2520
|
if (o)
|
|
2530
2521
|
return o.length > t && p(n, r, `Must be ${t} characters or fewer.`), o;
|
|
2531
2522
|
}
|
|
2532
|
-
function
|
|
2523
|
+
function fn(e, r, t, n) {
|
|
2533
2524
|
if (typeof e != "string")
|
|
2534
2525
|
return p(n, r, "Expected a string."), "";
|
|
2535
2526
|
const o = e.trim();
|
|
2536
2527
|
return o.length > t && p(n, r, `Must be ${t} characters or fewer.`), o;
|
|
2537
2528
|
}
|
|
2538
|
-
function
|
|
2529
|
+
function pn(e, r, t) {
|
|
2539
2530
|
if (e != null) {
|
|
2540
2531
|
if (!Number.isInteger(e) || Number(e) < 0) {
|
|
2541
2532
|
p(t, r, "Expected a non-negative integer.");
|
|
@@ -2563,10 +2554,10 @@ function D(e, r, t, n = {}) {
|
|
|
2563
2554
|
function z(e, r, t, n) {
|
|
2564
2555
|
return e == null ? r : typeof e != "boolean" ? (p(n, t, "Expected a boolean."), r) : e;
|
|
2565
2556
|
}
|
|
2566
|
-
function
|
|
2557
|
+
function yn(e, r) {
|
|
2567
2558
|
return e == null ? "ACTIVE" : e === "ACTIVE" || e === "PAUSED" || e === "DISABLED" ? e : (p(r, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
|
|
2568
2559
|
}
|
|
2569
|
-
function
|
|
2560
|
+
function hn(e) {
|
|
2570
2561
|
return e.includes("@") && e.includes(".") && !e.includes(" ");
|
|
2571
2562
|
}
|
|
2572
2563
|
function nt(e, r) {
|
|
@@ -2595,7 +2586,7 @@ function ot(e, r) {
|
|
|
2595
2586
|
)
|
|
2596
2587
|
}) : n === "custom_message" ? (I(t, "body", ["type", "message"], r), {
|
|
2597
2588
|
type: "custom_message",
|
|
2598
|
-
message:
|
|
2589
|
+
message: fn(
|
|
2599
2590
|
t.message,
|
|
2600
2591
|
"body.message",
|
|
2601
2592
|
h.customMessage,
|
|
@@ -2607,7 +2598,7 @@ function ot(e, r) {
|
|
|
2607
2598
|
"Expected generated_analysis, custom_message, or none."
|
|
2608
2599
|
), { type: "none" });
|
|
2609
2600
|
}
|
|
2610
|
-
function
|
|
2601
|
+
function gn(e, r) {
|
|
2611
2602
|
if (e == null)
|
|
2612
2603
|
return [...pe];
|
|
2613
2604
|
if (!Array.isArray(e))
|
|
@@ -2657,7 +2648,7 @@ function at(e, r) {
|
|
|
2657
2648
|
r
|
|
2658
2649
|
);
|
|
2659
2650
|
const n = {
|
|
2660
|
-
artifactFormats:
|
|
2651
|
+
artifactFormats: gn(t.artifactFormats, r),
|
|
2661
2652
|
includeEvidence: z(
|
|
2662
2653
|
t.includeEvidence,
|
|
2663
2654
|
!0,
|
|
@@ -2687,10 +2678,10 @@ function at(e, r) {
|
|
|
2687
2678
|
r
|
|
2688
2679
|
);
|
|
2689
2680
|
o && (n.audience = o), a && (n.tone = a), i && (n.format = i);
|
|
2690
|
-
const c =
|
|
2681
|
+
const c = Or(t);
|
|
2691
2682
|
return c.issues.forEach((d) => p(r, d.field, d.message)), Object.assign(n, c.value), n;
|
|
2692
2683
|
}
|
|
2693
|
-
function
|
|
2684
|
+
function vn(e, r, t) {
|
|
2694
2685
|
return Array.isArray(e) ? (e.length === 0 && p(t, r, "Expected at least one item."), e.length > R.maxListItems && p(
|
|
2695
2686
|
t,
|
|
2696
2687
|
r,
|
|
@@ -2704,7 +2695,7 @@ function gn(e, r, t) {
|
|
|
2704
2695
|
)
|
|
2705
2696
|
).filter(Boolean)) : (p(t, r, "Expected an array."), []);
|
|
2706
2697
|
}
|
|
2707
|
-
function
|
|
2698
|
+
function bn(e, r, t) {
|
|
2708
2699
|
const n = E(e, r, t);
|
|
2709
2700
|
if (n.kind === "metric")
|
|
2710
2701
|
return I(n, r, ["kind", "metricId"], t), {
|
|
@@ -2749,7 +2740,7 @@ function it(e, r, t) {
|
|
|
2749
2740
|
if (!Object.prototype.hasOwnProperty.call(n, "target") && !Object.prototype.hasOwnProperty.call(n, "format"))
|
|
2750
2741
|
return;
|
|
2751
2742
|
I(n, r, ["value", "target", "format"], t), (typeof n.value != "number" || !Number.isFinite(n.value)) && p(t, `${r}.value`, "Expected a finite number.");
|
|
2752
|
-
const o =
|
|
2743
|
+
const o = bn(
|
|
2753
2744
|
n.target,
|
|
2754
2745
|
`${r}.target`,
|
|
2755
2746
|
t
|
|
@@ -2781,7 +2772,7 @@ function K(e, r, t) {
|
|
|
2781
2772
|
"Expected a string, number, or structured numeric value."
|
|
2782
2773
|
);
|
|
2783
2774
|
}
|
|
2784
|
-
function
|
|
2775
|
+
function In(e, r, t) {
|
|
2785
2776
|
if (e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean")
|
|
2786
2777
|
return typeof e == "string" && e.length > h.contentCell ? (p(
|
|
2787
2778
|
t,
|
|
@@ -2795,7 +2786,7 @@ function bn(e, r, t) {
|
|
|
2795
2786
|
"Expected a string, number, boolean, structured numeric value, or null."
|
|
2796
2787
|
), null);
|
|
2797
2788
|
}
|
|
2798
|
-
function
|
|
2789
|
+
function Cn(e, r, t) {
|
|
2799
2790
|
if (!Array.isArray(e))
|
|
2800
2791
|
return p(t, r, "Expected an array."), [];
|
|
2801
2792
|
e.length === 0 && p(t, r, "Expected at least one column."), e.length > R.maxTableColumns && p(
|
|
@@ -2819,16 +2810,16 @@ function In(e, r, t) {
|
|
|
2819
2810
|
`${i}.label`,
|
|
2820
2811
|
h.contentTitle,
|
|
2821
2812
|
t
|
|
2822
|
-
), s =
|
|
2813
|
+
), s = B(
|
|
2823
2814
|
c.kind,
|
|
2824
2815
|
`${i}.kind`,
|
|
2825
|
-
|
|
2816
|
+
dn,
|
|
2826
2817
|
"text, number, currency, percent, date, or boolean",
|
|
2827
2818
|
t
|
|
2828
|
-
), u =
|
|
2819
|
+
), u = B(
|
|
2829
2820
|
c.align,
|
|
2830
2821
|
`${i}.align`,
|
|
2831
|
-
|
|
2822
|
+
mn,
|
|
2832
2823
|
"left, center, or right",
|
|
2833
2824
|
t
|
|
2834
2825
|
);
|
|
@@ -2840,7 +2831,7 @@ function In(e, r, t) {
|
|
|
2840
2831
|
};
|
|
2841
2832
|
});
|
|
2842
2833
|
}
|
|
2843
|
-
function
|
|
2834
|
+
function Tn(e, r, t, n) {
|
|
2844
2835
|
if (!Array.isArray(e))
|
|
2845
2836
|
return p(n, r, "Expected an array."), [];
|
|
2846
2837
|
e.length > R.maxTableRows && p(
|
|
@@ -2856,12 +2847,12 @@ function Cn(e, r, t, n) {
|
|
|
2856
2847
|
}), Object.fromEntries(
|
|
2857
2848
|
t.map((l) => [
|
|
2858
2849
|
l.key,
|
|
2859
|
-
|
|
2850
|
+
In(d[l.key] ?? null, `${c}.${l.key}`, n)
|
|
2860
2851
|
])
|
|
2861
2852
|
);
|
|
2862
2853
|
});
|
|
2863
2854
|
}
|
|
2864
|
-
function
|
|
2855
|
+
function wn(e, r, t) {
|
|
2865
2856
|
const n = `content.blocks.${r}`, o = E(e, n, t), a = o.type;
|
|
2866
2857
|
if (a === "heading") {
|
|
2867
2858
|
I(o, n, ["type", "text", "level", "evidenceIds"], t);
|
|
@@ -2901,10 +2892,10 @@ function Tn(e, r, t) {
|
|
|
2901
2892
|
`${n}.title`,
|
|
2902
2893
|
h.contentTitle,
|
|
2903
2894
|
t
|
|
2904
|
-
), c =
|
|
2895
|
+
), c = B(
|
|
2905
2896
|
o.severity,
|
|
2906
2897
|
`${n}.severity`,
|
|
2907
|
-
|
|
2898
|
+
sn,
|
|
2908
2899
|
"info, positive, warning, or critical",
|
|
2909
2900
|
t
|
|
2910
2901
|
);
|
|
@@ -2934,7 +2925,7 @@ function Tn(e, r, t) {
|
|
|
2934
2925
|
return {
|
|
2935
2926
|
type: a,
|
|
2936
2927
|
...i ? { title: i } : {},
|
|
2937
|
-
items:
|
|
2928
|
+
items: vn(o.items, `${n}.items`, t),
|
|
2938
2929
|
...c ? { evidenceIds: c } : {}
|
|
2939
2930
|
};
|
|
2940
2931
|
}
|
|
@@ -3111,7 +3102,7 @@ function Tn(e, r, t) {
|
|
|
3111
3102
|
["type", "id", "title", "columns", "rows", "caption", "totalRows", "evidenceIds"],
|
|
3112
3103
|
t
|
|
3113
3104
|
);
|
|
3114
|
-
const i =
|
|
3105
|
+
const i = Cn(o.columns, `${n}.columns`, t), c = x(
|
|
3115
3106
|
o.title,
|
|
3116
3107
|
`${n}.title`,
|
|
3117
3108
|
h.contentTitle,
|
|
@@ -3126,7 +3117,7 @@ function Tn(e, r, t) {
|
|
|
3126
3117
|
`${n}.caption`,
|
|
3127
3118
|
h.contentItem,
|
|
3128
3119
|
t
|
|
3129
|
-
), s =
|
|
3120
|
+
), s = pn(
|
|
3130
3121
|
o.totalRows,
|
|
3131
3122
|
`${n}.totalRows`,
|
|
3132
3123
|
t
|
|
@@ -3136,7 +3127,7 @@ function Tn(e, r, t) {
|
|
|
3136
3127
|
...d ? { id: d } : {},
|
|
3137
3128
|
...c ? { title: c } : {},
|
|
3138
3129
|
columns: i,
|
|
3139
|
-
rows:
|
|
3130
|
+
rows: Tn(o.rows, `${n}.rows`, i, t),
|
|
3140
3131
|
...l ? { caption: l } : {},
|
|
3141
3132
|
...s !== void 0 ? { totalRows: s } : {},
|
|
3142
3133
|
...u ? { evidenceIds: u } : {}
|
|
@@ -3187,7 +3178,7 @@ function Tn(e, r, t) {
|
|
|
3187
3178
|
text: ""
|
|
3188
3179
|
};
|
|
3189
3180
|
}
|
|
3190
|
-
function
|
|
3181
|
+
function $n(e) {
|
|
3191
3182
|
const r = [], t = E(e, "content", r);
|
|
3192
3183
|
I(t, "content", ["version", "title", "summary", "blocks"], r), t.version !== 1 && p(r, "content.version", "Expected version 1.");
|
|
3193
3184
|
const n = x(
|
|
@@ -3208,7 +3199,7 @@ function wn(e) {
|
|
|
3208
3199
|
"content.blocks",
|
|
3209
3200
|
`Must have ${R.maxBlocks} blocks or fewer.`
|
|
3210
3201
|
);
|
|
3211
|
-
const i = a.slice(0, R.maxBlocks).map((c, d) =>
|
|
3202
|
+
const i = a.slice(0, R.maxBlocks).map((c, d) => wn(c, d, r));
|
|
3212
3203
|
return Te(r), {
|
|
3213
3204
|
version: 1,
|
|
3214
3205
|
...n ? { title: n } : {},
|
|
@@ -3216,11 +3207,11 @@ function wn(e) {
|
|
|
3216
3207
|
blocks: i
|
|
3217
3208
|
};
|
|
3218
3209
|
}
|
|
3219
|
-
function
|
|
3210
|
+
function Vo(e) {
|
|
3220
3211
|
try {
|
|
3221
3212
|
return {
|
|
3222
3213
|
valid: !0,
|
|
3223
|
-
value:
|
|
3214
|
+
value: $n(e),
|
|
3224
3215
|
issues: []
|
|
3225
3216
|
};
|
|
3226
3217
|
} catch (r) {
|
|
@@ -3232,14 +3223,14 @@ function zo(e) {
|
|
|
3232
3223
|
function J(e, r, t, n) {
|
|
3233
3224
|
return typeof e == "string" && t.includes(e) ? e : (p(n, r, `Expected ${t.join(" or ")}.`), t[0]);
|
|
3234
3225
|
}
|
|
3235
|
-
function
|
|
3226
|
+
function B(e, r, t, n, o) {
|
|
3236
3227
|
if (e != null) {
|
|
3237
3228
|
if (typeof e == "string" && t.has(e))
|
|
3238
3229
|
return e;
|
|
3239
3230
|
p(o, r, `Expected ${n}.`);
|
|
3240
3231
|
}
|
|
3241
3232
|
}
|
|
3242
|
-
function
|
|
3233
|
+
function xn(e, r, t) {
|
|
3243
3234
|
if (e != null) {
|
|
3244
3235
|
if (!Array.isArray(e)) {
|
|
3245
3236
|
p(t, r, "Expected an array.");
|
|
@@ -3248,7 +3239,7 @@ function $n(e, r, t) {
|
|
|
3248
3239
|
return e;
|
|
3249
3240
|
}
|
|
3250
3241
|
}
|
|
3251
|
-
function
|
|
3242
|
+
function En(e, r, t) {
|
|
3252
3243
|
if (e != null) {
|
|
3253
3244
|
if (!rt(e)) {
|
|
3254
3245
|
p(t, r, "Expected an object.");
|
|
@@ -3257,18 +3248,18 @@ function xn(e, r, t) {
|
|
|
3257
3248
|
return e;
|
|
3258
3249
|
}
|
|
3259
3250
|
}
|
|
3260
|
-
function
|
|
3251
|
+
function kn(e, r, t) {
|
|
3261
3252
|
if (e == null)
|
|
3262
3253
|
return;
|
|
3263
3254
|
const n = E(e, r, t);
|
|
3264
|
-
I(n, r,
|
|
3255
|
+
I(n, r, un, t);
|
|
3265
3256
|
const o = {};
|
|
3266
3257
|
if (n.matrix !== void 0) {
|
|
3267
3258
|
const s = E(n.matrix, `${r}.matrix`, t);
|
|
3268
3259
|
I(s, `${r}.matrix`, ["config", "content"], t);
|
|
3269
3260
|
const u = gt.safeParse(s.config);
|
|
3270
3261
|
u.success || p(t, `${r}.matrix.config`, "Expected a valid Matrix definition.");
|
|
3271
|
-
const f =
|
|
3262
|
+
const f = B(
|
|
3272
3263
|
s.content,
|
|
3273
3264
|
`${r}.matrix.content`,
|
|
3274
3265
|
/* @__PURE__ */ new Set(["current", "all", "flat"]),
|
|
@@ -3277,34 +3268,34 @@ function En(e, r, t) {
|
|
|
3277
3268
|
);
|
|
3278
3269
|
f || p(t, `${r}.matrix.content`, "Choose Matrix export content."), u.success && f && (o.matrix = { config: u.data, content: f });
|
|
3279
3270
|
}
|
|
3280
|
-
const a =
|
|
3271
|
+
const a = B(
|
|
3281
3272
|
n.pageSize,
|
|
3282
3273
|
`${r}.pageSize`,
|
|
3283
|
-
|
|
3274
|
+
rn,
|
|
3284
3275
|
"letter, legal, a4, a3, or tabloid",
|
|
3285
3276
|
t
|
|
3286
|
-
), i =
|
|
3277
|
+
), i = B(
|
|
3287
3278
|
n.orientation,
|
|
3288
3279
|
`${r}.orientation`,
|
|
3289
|
-
|
|
3280
|
+
nn,
|
|
3290
3281
|
"portrait or landscape",
|
|
3291
3282
|
t
|
|
3292
|
-
), c =
|
|
3283
|
+
), c = B(
|
|
3293
3284
|
n.delimiter,
|
|
3294
3285
|
`${r}.delimiter`,
|
|
3295
|
-
|
|
3286
|
+
on,
|
|
3296
3287
|
"comma, semicolon, or tab",
|
|
3297
3288
|
t
|
|
3298
|
-
), d =
|
|
3289
|
+
), d = B(
|
|
3299
3290
|
n.csvEncoding,
|
|
3300
3291
|
`${r}.csvEncoding`,
|
|
3301
|
-
|
|
3292
|
+
an,
|
|
3302
3293
|
"utf-8-bom or utf-8",
|
|
3303
3294
|
t
|
|
3304
|
-
), l =
|
|
3295
|
+
), l = B(
|
|
3305
3296
|
n.sheetSelection,
|
|
3306
3297
|
`${r}.sheetSelection`,
|
|
3307
|
-
|
|
3298
|
+
cn,
|
|
3308
3299
|
"current or all",
|
|
3309
3300
|
t
|
|
3310
3301
|
);
|
|
@@ -3347,7 +3338,7 @@ function En(e, r, t) {
|
|
|
3347
3338
|
"cardControlDefinitions",
|
|
3348
3339
|
"controlBindings"
|
|
3349
3340
|
]) {
|
|
3350
|
-
const u =
|
|
3341
|
+
const u = xn(n[s], `${r}.${s}`, t);
|
|
3351
3342
|
u && (o[s] = u);
|
|
3352
3343
|
}
|
|
3353
3344
|
for (const s of [
|
|
@@ -3356,7 +3347,7 @@ function En(e, r, t) {
|
|
|
3356
3347
|
"dashboardInputExecutionSnapshot",
|
|
3357
3348
|
"printInputCapture"
|
|
3358
3349
|
]) {
|
|
3359
|
-
const u =
|
|
3350
|
+
const u = En(n[s], `${r}.${s}`, t);
|
|
3360
3351
|
u && (o[s] = u);
|
|
3361
3352
|
}
|
|
3362
3353
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
@@ -3371,14 +3362,14 @@ function se(e, r, t, n) {
|
|
|
3371
3362
|
return o && (e.title = o), e;
|
|
3372
3363
|
}
|
|
3373
3364
|
function de(e, r, t, n) {
|
|
3374
|
-
const o =
|
|
3365
|
+
const o = kn(r, t, n);
|
|
3375
3366
|
return o != null && o.printInputCapture && e.type !== "dashboard" && p(
|
|
3376
3367
|
n,
|
|
3377
3368
|
`${t}.printInputCapture`,
|
|
3378
3369
|
"Only a full dashboard attachment can carry printInputCapture."
|
|
3379
3370
|
), o && (e.settings = o), e;
|
|
3380
3371
|
}
|
|
3381
|
-
function
|
|
3372
|
+
function Sn(e, r, t) {
|
|
3382
3373
|
const n = `attachments.${r}`, o = E(e, n, t), a = o.type;
|
|
3383
3374
|
if (a === "dashboard") {
|
|
3384
3375
|
I(
|
|
@@ -3475,7 +3466,7 @@ function kn(e, r, t) {
|
|
|
3475
3466
|
"Expected dashboard, dashboard_sheet, document_sheet, or card."
|
|
3476
3467
|
), { type: "dashboard", dashboardId: "", format: "pdf" };
|
|
3477
3468
|
}
|
|
3478
|
-
function
|
|
3469
|
+
function _n(e) {
|
|
3479
3470
|
switch (e.type) {
|
|
3480
3471
|
case "dashboard":
|
|
3481
3472
|
return `${e.type}:${e.dashboardId}:${e.format}`;
|
|
@@ -3496,11 +3487,11 @@ function ct(e, r) {
|
|
|
3496
3487
|
"attachments",
|
|
3497
3488
|
`Choose ${ce} attachments or fewer.`
|
|
3498
3489
|
);
|
|
3499
|
-
const t = e.slice(0, ce).map((o, a) =>
|
|
3490
|
+
const t = e.slice(0, ce).map((o, a) => Sn(o, a, r)), n = /* @__PURE__ */ new Set();
|
|
3500
3491
|
return t.forEach((o, a) => {
|
|
3501
3492
|
var c;
|
|
3502
3493
|
(c = o.settings) != null && c.matrix && (o.type !== "card" || o.settings.cardType !== "matrixTable" || o.settings.matrix.content === "flat" && o.format !== "csv") && p(r, `attachments.${a}.settings.matrix`, "Matrix settings require a matrixTable card attachment; flat content requires CSV.");
|
|
3503
|
-
const i =
|
|
3494
|
+
const i = _n(o);
|
|
3504
3495
|
n.has(i) && p(r, `attachments.${a}`, "Duplicate attachment."), n.add(i);
|
|
3505
3496
|
}), t;
|
|
3506
3497
|
}
|
|
@@ -3537,7 +3528,7 @@ function st(e, r, t) {
|
|
|
3537
3528
|
"Add briefing instructions, a custom message, or at least one attachment."
|
|
3538
3529
|
);
|
|
3539
3530
|
}
|
|
3540
|
-
function
|
|
3531
|
+
function Fn(e, r, t) {
|
|
3541
3532
|
e == null || e.forEach((n, o) => {
|
|
3542
3533
|
const a = `${t}.${o}.scope`, i = n.scope.attachmentIndex;
|
|
3543
3534
|
if (i === void 0)
|
|
@@ -3590,7 +3581,7 @@ function dt(e) {
|
|
|
3590
3581
|
);
|
|
3591
3582
|
}
|
|
3592
3583
|
const o = nt(t.source, r), a = ot(t.body, r), i = ct(t.attachments, r), c = at(t.presentation, r), d = lt(t.limits, r);
|
|
3593
|
-
return st(a, i, r),
|
|
3584
|
+
return st(a, i, r), Fn(
|
|
3594
3585
|
n == null ? void 0 : n.resolvedFormats,
|
|
3595
3586
|
i,
|
|
3596
3587
|
"jobConfig.presentationExecutionSnapshot.resolvedFormats"
|
|
@@ -3604,7 +3595,7 @@ function dt(e) {
|
|
|
3604
3595
|
...d ? { limits: d } : {}
|
|
3605
3596
|
};
|
|
3606
3597
|
}
|
|
3607
|
-
function
|
|
3598
|
+
function qo(e) {
|
|
3608
3599
|
return dt({
|
|
3609
3600
|
...e,
|
|
3610
3601
|
kind: fe
|
|
@@ -3625,7 +3616,7 @@ function we(e, r, t, n = "deliveryConfig.recipients") {
|
|
|
3625
3616
|
h.attachmentTitle,
|
|
3626
3617
|
t
|
|
3627
3618
|
);
|
|
3628
|
-
return c && !
|
|
3619
|
+
return c && !hn(c) && p(t, `${o}.address`, "Email address is invalid."), {
|
|
3629
3620
|
type: "email",
|
|
3630
3621
|
address: c,
|
|
3631
3622
|
...d ? { name: d } : {}
|
|
@@ -3661,12 +3652,12 @@ function we(e, r, t, n = "deliveryConfig.recipients") {
|
|
|
3661
3652
|
"Expected email, user, tenant_user, or group."
|
|
3662
3653
|
), { type: "email", address: "" });
|
|
3663
3654
|
}
|
|
3664
|
-
function
|
|
3655
|
+
function Rn(e, r) {
|
|
3665
3656
|
return e == null ? [] : Array.isArray(e) ? e.map(
|
|
3666
3657
|
(t, n) => we(t, n, r)
|
|
3667
3658
|
) : (p(r, "deliveryConfig.recipients", "Expected an array."), []);
|
|
3668
3659
|
}
|
|
3669
|
-
function
|
|
3660
|
+
function An(e, r) {
|
|
3670
3661
|
if (!Array.isArray(e))
|
|
3671
3662
|
return p(r, "deliveryConfig.channels", "Expected an array."), [];
|
|
3672
3663
|
const t = [];
|
|
@@ -3682,7 +3673,7 @@ function Rn(e, r) {
|
|
|
3682
3673
|
t.includes(n) || t.push(n);
|
|
3683
3674
|
}), t;
|
|
3684
3675
|
}
|
|
3685
|
-
function
|
|
3676
|
+
function Dn(e, r, t) {
|
|
3686
3677
|
if (e == null)
|
|
3687
3678
|
return;
|
|
3688
3679
|
const n = E(e, r, t), o = {};
|
|
@@ -3694,7 +3685,7 @@ function An(e, r, t) {
|
|
|
3694
3685
|
o[a] = i.trim();
|
|
3695
3686
|
}), Object.keys(o).length > 0 ? o : void 0;
|
|
3696
3687
|
}
|
|
3697
|
-
function
|
|
3688
|
+
function Mn(e, r, t) {
|
|
3698
3689
|
if (e == null)
|
|
3699
3690
|
return;
|
|
3700
3691
|
const n = E(e, r, t);
|
|
@@ -3704,7 +3695,7 @@ function Dn(e, r, t) {
|
|
|
3704
3695
|
["url", "method", "headers", "secretEncrypted"],
|
|
3705
3696
|
t
|
|
3706
3697
|
);
|
|
3707
|
-
const o = n.method === void 0 || n.method === null ? void 0 : J(n.method, `${r}.method`, ["POST", "PUT"], t), a =
|
|
3698
|
+
const o = n.method === void 0 || n.method === null ? void 0 : J(n.method, `${r}.method`, ["POST", "PUT"], t), a = Dn(n.headers, `${r}.headers`, t), i = x(
|
|
3708
3699
|
n.secretEncrypted,
|
|
3709
3700
|
`${r}.secretEncrypted`,
|
|
3710
3701
|
2e3,
|
|
@@ -3717,7 +3708,7 @@ function Dn(e, r, t) {
|
|
|
3717
3708
|
...i ? { secretEncrypted: i } : {}
|
|
3718
3709
|
};
|
|
3719
3710
|
}
|
|
3720
|
-
function
|
|
3711
|
+
function Pn(e, r, t) {
|
|
3721
3712
|
const n = E(e, r, t), o = n.type;
|
|
3722
3713
|
if (o === "channel") {
|
|
3723
3714
|
I(
|
|
@@ -3758,7 +3749,7 @@ function Mn(e, r, t) {
|
|
|
3758
3749
|
recipient: we(n.recipient, 0, t, `${r}.recipient`)
|
|
3759
3750
|
}) : (p(t, `${r}.type`, "Expected channel."), { type: "channel", channelId: "" });
|
|
3760
3751
|
}
|
|
3761
|
-
function
|
|
3752
|
+
function On(e, r, t) {
|
|
3762
3753
|
if (e == null)
|
|
3763
3754
|
return;
|
|
3764
3755
|
if (!Array.isArray(e)) {
|
|
@@ -3786,7 +3777,7 @@ function Bn(e, r, t) {
|
|
|
3786
3777
|
],
|
|
3787
3778
|
t
|
|
3788
3779
|
);
|
|
3789
|
-
const o =
|
|
3780
|
+
const o = On(
|
|
3790
3781
|
n.threadMentions,
|
|
3791
3782
|
`${r}.threadMentions`,
|
|
3792
3783
|
t
|
|
@@ -3807,7 +3798,7 @@ function Bn(e, r, t) {
|
|
|
3807
3798
|
t
|
|
3808
3799
|
);
|
|
3809
3800
|
return {
|
|
3810
|
-
destination:
|
|
3801
|
+
destination: Pn(
|
|
3811
3802
|
n.destination,
|
|
3812
3803
|
`${r}.destination`,
|
|
3813
3804
|
t
|
|
@@ -3818,7 +3809,7 @@ function Bn(e, r, t) {
|
|
|
3818
3809
|
...n.includeBriefingLink !== void 0 ? { includeBriefingLink: c } : {}
|
|
3819
3810
|
};
|
|
3820
3811
|
}
|
|
3821
|
-
function
|
|
3812
|
+
function Kn(e, r, t) {
|
|
3822
3813
|
const n = E(e, r, t);
|
|
3823
3814
|
I(
|
|
3824
3815
|
n,
|
|
@@ -3834,10 +3825,10 @@ function On(e, r, t) {
|
|
|
3834
3825
|
],
|
|
3835
3826
|
t
|
|
3836
3827
|
);
|
|
3837
|
-
const o =
|
|
3828
|
+
const o = B(
|
|
3838
3829
|
n.formatProfile,
|
|
3839
3830
|
`${r}.formatProfile`,
|
|
3840
|
-
|
|
3831
|
+
ln,
|
|
3841
3832
|
"concise, balanced, or detailed",
|
|
3842
3833
|
t
|
|
3843
3834
|
), a = x(
|
|
@@ -3860,7 +3851,7 @@ function On(e, r, t) {
|
|
|
3860
3851
|
!0,
|
|
3861
3852
|
`${r}.actionBlockVisible`,
|
|
3862
3853
|
t
|
|
3863
|
-
), l =
|
|
3854
|
+
), l = Mn(
|
|
3864
3855
|
n.webhookConfig,
|
|
3865
3856
|
`${r}.webhookConfig`,
|
|
3866
3857
|
t
|
|
@@ -3879,7 +3870,7 @@ function On(e, r, t) {
|
|
|
3879
3870
|
...l ? { webhookConfig: l } : {}
|
|
3880
3871
|
};
|
|
3881
3872
|
}
|
|
3882
|
-
function
|
|
3873
|
+
function Nn(e, r) {
|
|
3883
3874
|
if (e == null)
|
|
3884
3875
|
return;
|
|
3885
3876
|
const t = E(e, "deliveryConfig.channelConfigs", r), n = {};
|
|
@@ -3892,14 +3883,14 @@ function Kn(e, r) {
|
|
|
3892
3883
|
);
|
|
3893
3884
|
return;
|
|
3894
3885
|
}
|
|
3895
|
-
n[o] =
|
|
3886
|
+
n[o] = Kn(
|
|
3896
3887
|
a,
|
|
3897
3888
|
`deliveryConfig.channelConfigs.${o}`,
|
|
3898
3889
|
r
|
|
3899
3890
|
);
|
|
3900
3891
|
}), Object.keys(n).length > 0 ? n : void 0;
|
|
3901
3892
|
}
|
|
3902
|
-
function
|
|
3893
|
+
function Ln(e, r) {
|
|
3903
3894
|
var d, l, s;
|
|
3904
3895
|
if (e == null)
|
|
3905
3896
|
return null;
|
|
@@ -3910,7 +3901,7 @@ function Nn(e, r) {
|
|
|
3910
3901
|
["recipients", "channels", "channelConfigs"],
|
|
3911
3902
|
r
|
|
3912
3903
|
);
|
|
3913
|
-
const n =
|
|
3904
|
+
const n = Nn(t.channelConfigs, r), o = Rn(t.recipients, r), a = An(t.channels, r), i = ((l = (d = n == null ? void 0 : n.SLACK) == null ? void 0 : d.slackConfig) == null ? void 0 : l.destination.type) === "channel" && !!n.SLACK.slackConfig.destination.channelId.trim();
|
|
3914
3905
|
return a.some(
|
|
3915
3906
|
(u) => u !== "SLACK"
|
|
3916
3907
|
) && o.length === 0 && p(
|
|
@@ -3965,7 +3956,7 @@ function $e(e) {
|
|
|
3965
3956
|
"description",
|
|
3966
3957
|
h.description,
|
|
3967
3958
|
r
|
|
3968
|
-
) ?? null, a = x(t.scheduleExpr, "scheduleExpr", 500, r) ?? null, i = x(t.timezone, "timezone", 200, r) ?? "UTC", c =
|
|
3959
|
+
) ?? null, a = x(t.scheduleExpr, "scheduleExpr", 500, r) ?? null, i = x(t.timezone, "timezone", 200, r) ?? "UTC", c = yn(t.status, r), d = nt(t.source, r), l = ot(t.body, r), s = ct(t.attachments, r), u = at(t.presentation, r), f = lt(t.limits, r), m = Ln(t.deliveryConfig, r);
|
|
3969
3960
|
return st(l, s, r), Te(r), {
|
|
3970
3961
|
name: n,
|
|
3971
3962
|
description: o,
|
|
@@ -3980,13 +3971,13 @@ function $e(e) {
|
|
|
3980
3971
|
deliveryConfig: m
|
|
3981
3972
|
};
|
|
3982
3973
|
}
|
|
3983
|
-
function qo(e) {
|
|
3984
|
-
return $e(e);
|
|
3985
|
-
}
|
|
3986
3974
|
function Uo(e) {
|
|
3987
3975
|
return $e(e);
|
|
3988
3976
|
}
|
|
3989
3977
|
function jo(e) {
|
|
3978
|
+
return $e(e);
|
|
3979
|
+
}
|
|
3980
|
+
function Go(e) {
|
|
3990
3981
|
try {
|
|
3991
3982
|
return { valid: !0, value: $e(e), issues: [] };
|
|
3992
3983
|
} catch (r) {
|
|
@@ -3995,7 +3986,7 @@ function jo(e) {
|
|
|
3995
3986
|
throw r;
|
|
3996
3987
|
}
|
|
3997
3988
|
}
|
|
3998
|
-
function
|
|
3989
|
+
function Ho(e) {
|
|
3999
3990
|
try {
|
|
4000
3991
|
return { valid: !0, value: dt(e), issues: [] };
|
|
4001
3992
|
} catch (r) {
|
|
@@ -4004,105 +3995,105 @@ function Go(e) {
|
|
|
4004
3995
|
throw r;
|
|
4005
3996
|
}
|
|
4006
3997
|
}
|
|
4007
|
-
function
|
|
3998
|
+
function Wo(e) {
|
|
4008
3999
|
return typeof e == "string" && tt.has(e);
|
|
4009
4000
|
}
|
|
4010
4001
|
function mt(e) {
|
|
4011
|
-
return typeof e == "string" &&
|
|
4002
|
+
return typeof e == "string" && tn.has(e);
|
|
4012
4003
|
}
|
|
4013
4004
|
export {
|
|
4014
4005
|
Br as $,
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4006
|
+
ho as A,
|
|
4007
|
+
ko as B,
|
|
4008
|
+
_r as C,
|
|
4009
|
+
_o as D,
|
|
4010
|
+
Ro as E,
|
|
4020
4011
|
ne as F,
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4012
|
+
ar as G,
|
|
4013
|
+
io as H,
|
|
4014
|
+
vo as I,
|
|
4024
4015
|
L as J,
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4016
|
+
uo as K,
|
|
4017
|
+
Xt as L,
|
|
4018
|
+
rr as M,
|
|
4019
|
+
nr as N,
|
|
4020
|
+
pr as O,
|
|
4021
|
+
Qt as P,
|
|
4022
|
+
fr as Q,
|
|
4032
4023
|
be as R,
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4024
|
+
lr as S,
|
|
4025
|
+
go as T,
|
|
4026
|
+
lo as U,
|
|
4027
|
+
fo as V,
|
|
4028
|
+
po as W,
|
|
4029
|
+
yo as X,
|
|
4039
4030
|
qe as Y,
|
|
4040
4031
|
S as Z,
|
|
4041
|
-
|
|
4042
|
-
|
|
4032
|
+
So as _,
|
|
4033
|
+
Ir as a,
|
|
4043
4034
|
Je as a0,
|
|
4044
|
-
|
|
4035
|
+
Mo as a1,
|
|
4045
4036
|
V as a2,
|
|
4046
|
-
|
|
4047
|
-
|
|
4037
|
+
Oo as a3,
|
|
4038
|
+
Hr as a4,
|
|
4048
4039
|
Bo as a5,
|
|
4049
4040
|
Qe as a6,
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4041
|
+
Do as a7,
|
|
4042
|
+
Zr as a8,
|
|
4043
|
+
Ko as a9,
|
|
4044
|
+
Fo as aA,
|
|
4045
|
+
Rr as aB,
|
|
4046
|
+
Fr as aC,
|
|
4047
|
+
Qr as aD,
|
|
4048
|
+
mr as aa,
|
|
4049
|
+
hr as ab,
|
|
4059
4050
|
Ue as ac,
|
|
4060
|
-
|
|
4061
|
-
|
|
4051
|
+
Io as ad,
|
|
4052
|
+
Ao as ae,
|
|
4062
4053
|
fe as af,
|
|
4063
|
-
|
|
4054
|
+
Xr as ag,
|
|
4064
4055
|
pe as ah,
|
|
4065
4056
|
ce as ai,
|
|
4066
4057
|
h as aj,
|
|
4067
4058
|
R as ak,
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4059
|
+
Jr as al,
|
|
4060
|
+
en as am,
|
|
4061
|
+
zo as an,
|
|
4071
4062
|
oe as ao,
|
|
4072
|
-
|
|
4073
|
-
|
|
4063
|
+
$n as ap,
|
|
4064
|
+
Vo as aq,
|
|
4074
4065
|
dt as ar,
|
|
4075
|
-
|
|
4066
|
+
qo as as,
|
|
4076
4067
|
$e as at,
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4068
|
+
Uo as au,
|
|
4069
|
+
jo as av,
|
|
4070
|
+
Go as aw,
|
|
4071
|
+
Ho as ax,
|
|
4072
|
+
Wo as ay,
|
|
4082
4073
|
mt as az,
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4074
|
+
wo as b,
|
|
4075
|
+
Cr as c,
|
|
4076
|
+
Lo as d,
|
|
4077
|
+
Po as e,
|
|
4078
|
+
wr as f,
|
|
4079
|
+
Tr as g,
|
|
4080
|
+
No as h,
|
|
4090
4081
|
Se as i,
|
|
4091
4082
|
Z as j,
|
|
4092
|
-
|
|
4093
|
-
|
|
4083
|
+
xo as k,
|
|
4084
|
+
$o as l,
|
|
4094
4085
|
Ge as m,
|
|
4095
|
-
|
|
4096
|
-
|
|
4086
|
+
Eo as n,
|
|
4087
|
+
Co as o,
|
|
4097
4088
|
Ie as p,
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4089
|
+
To as q,
|
|
4090
|
+
$r as r,
|
|
4091
|
+
er as s,
|
|
4092
|
+
ao as t,
|
|
4093
|
+
mo as u,
|
|
4094
|
+
tr as v,
|
|
4095
|
+
so as w,
|
|
4096
|
+
bo as x,
|
|
4106
4097
|
Le as y,
|
|
4107
|
-
|
|
4098
|
+
co as z
|
|
4108
4099
|
};
|