react-semaphor 0.1.421 → 0.1.423

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +2 -2
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +2 -2
  5. package/dist/briefings/index.cjs +1 -1
  6. package/dist/briefings/index.js +913 -712
  7. package/dist/chunks/{analyze-result-contract-sWcmvBOA.js → analyze-result-contract-D7pjjYPy.js} +45 -46
  8. package/dist/chunks/{analyze-result-contract-B5Eeu7vD.js → analyze-result-contract-DpDcImgk.js} +1 -1
  9. package/dist/chunks/{calendar-preferences-dialog-CscmhyuZ.js → calendar-preferences-dialog-CTmeASaM.js} +1 -1
  10. package/dist/chunks/{calendar-preferences-dialog-cN3_2C-u.js → calendar-preferences-dialog-t5ET6MON.js} +3 -3
  11. package/dist/chunks/card-config-utils-15sRtebL.js +1 -0
  12. package/dist/chunks/card-config-utils-BYZ5MJOh.js +16 -0
  13. package/dist/chunks/dashboard-briefing-launcher-Cavd0QJb.js +3401 -0
  14. package/dist/chunks/dashboard-briefing-launcher-S2akO-ub.js +26 -0
  15. package/dist/chunks/dashboard-controls-BJLrErjW.js +2322 -0
  16. package/dist/chunks/dashboard-controls-DzbP8AXA.js +52 -0
  17. package/dist/chunks/dashboard-json-5tWb5KD6.js +1 -0
  18. package/dist/chunks/{dashboard-json-Cxhw2TZc.js → dashboard-json-Do2-pdPZ.js} +12 -11
  19. package/dist/chunks/{edit-dashboard-visual-BigSJ3-x.js → edit-dashboard-visual-Cw6bq4_w.js} +7058 -6989
  20. package/dist/chunks/edit-dashboard-visual-Yh5YFgMF.js +178 -0
  21. package/dist/chunks/index-BPM3gDRw.js +1406 -0
  22. package/dist/chunks/{index-CH2ZzQo4.js → index-yHe0SeLO.js} +81534 -75430
  23. package/dist/chunks/{switch-TbCsyhv9.js → switch-2bh3Hka1.js} +620 -633
  24. package/dist/chunks/{switch-CiOjVyVI.js → switch-DMT7qf_R.js} +24 -24
  25. package/dist/chunks/{update-policy-2MZ-Vf7v.js → update-policy-BCJc0oI5.js} +1 -1
  26. package/dist/chunks/{update-policy-qpyAkOyO.js → update-policy-C1pmhLz9.js} +1 -1
  27. package/dist/chunks/{use-create-flow-overlay-state-BzcJWNzh.js → use-create-flow-overlay-state-5MDbZcs1.js} +515 -544
  28. package/dist/chunks/use-create-flow-overlay-state-BNczg9Gj.js +11 -0
  29. package/dist/chunks/{validators-Dj1Y-46V.js → validators-DMlVbd1p.js} +1 -1
  30. package/dist/chunks/{validators-D0pfj3jJ.js → validators-PXkij33j.js} +1 -1
  31. package/dist/dashboard/index.cjs +1 -1
  32. package/dist/dashboard/index.js +1 -1
  33. package/dist/dashboard-authoring/index.cjs +1 -1
  34. package/dist/dashboard-authoring/index.js +2 -2
  35. package/dist/data-app-builder/index.cjs +1 -1
  36. package/dist/data-app-builder/index.js +108 -108
  37. package/dist/data-app-codegen/index.cjs +1 -1
  38. package/dist/data-app-codegen/index.js +2 -2
  39. package/dist/data-app-codegen-node/index.cjs +165 -340
  40. package/dist/data-app-codegen-node/index.js +761 -952
  41. package/dist/data-app-sdk/index.cjs +2 -2
  42. package/dist/data-app-sdk/index.js +91 -95
  43. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  44. package/dist/data-app-sdk-adapters/index.js +1 -1
  45. package/dist/data-app-sdk-validation/index.cjs +1 -1
  46. package/dist/data-app-sdk-validation/index.js +2 -2
  47. package/dist/index.cjs +1 -1
  48. package/dist/index.js +168 -164
  49. package/dist/style.css +1 -1
  50. package/dist/surfboard/index.cjs +1 -1
  51. package/dist/surfboard/index.js +2 -2
  52. package/dist/types/analytics-protocol.d.ts +0 -4
  53. package/dist/types/briefings.d.ts +2388 -7
  54. package/dist/types/dashboard-assistant.d.ts +0 -1
  55. package/dist/types/data-app-sdk-validation.d.ts +0 -1
  56. package/dist/types/data-app-sdk.d.ts +0 -2
  57. package/dist/types/main.d.ts +70 -10
  58. package/dist/types/types.d.ts +4 -8
  59. package/package.json +1 -1
  60. package/dist/chunks/dashboard-briefing-launcher-BYTBNetR.js +0 -9077
  61. package/dist/chunks/dashboard-briefing-launcher-DmZkzIC3.js +0 -80
  62. package/dist/chunks/dashboard-controls-9DFeKIP4.js +0 -52
  63. package/dist/chunks/dashboard-controls-PhzuaTBj.js +0 -2280
  64. package/dist/chunks/dashboard-json-DyRHI3mL.js +0 -1
  65. package/dist/chunks/edit-dashboard-visual-3_jiBXsu.js +0 -178
  66. package/dist/chunks/index-BKDQw0aK.js +0 -1346
  67. package/dist/chunks/use-create-flow-overlay-state-DUQmgb9H.js +0 -21
@@ -1,7 +1,224 @@
1
- var W = Object.defineProperty;
2
- var Y = (r, t, e) => t in r ? W(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var F = (r, t, e) => Y(r, typeof t != "symbol" ? t + "" : t, e);
4
- const w = "BRIEFING", Z = ["markdown", "html"], V = ["markdown"], ze = 20, l = {
1
+ var Q = Object.defineProperty;
2
+ var ee = (t, n, e) => n in t ? Q(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
3
+ var M = (t, n, e) => ee(t, typeof n != "symbol" ? n + "" : n, e);
4
+ import { i as te } from "../chunks/card-config-utils-BYZ5MJOh.js";
5
+ const P = [
6
+ "SUN",
7
+ "MON",
8
+ "TUE",
9
+ "WED",
10
+ "THU",
11
+ "FRI",
12
+ "SAT"
13
+ ], ne = new Map(
14
+ P.map((t, n) => [t, n])
15
+ ), Xe = {
16
+ cadence: "weekly",
17
+ hour: 9,
18
+ minute: 0,
19
+ weekdays: [1]
20
+ };
21
+ function Qe(t) {
22
+ if (typeof t != "string" || t.length === 0 || t !== t.trim() || /^(?:(?:UTC|GMT)[+-]|[+-]\d{2}:\d{2}$)/.test(t))
23
+ return !1;
24
+ try {
25
+ return new Intl.DateTimeFormat("en-US", { timeZone: t }).format(), !0;
26
+ } catch {
27
+ return !1;
28
+ }
29
+ }
30
+ function re(t) {
31
+ return Number.isInteger(t.minute) && t.minute >= 0 && t.minute <= 59 && Number.isInteger(t.hour) && t.hour >= 0 && t.hour <= 23;
32
+ }
33
+ function U(t) {
34
+ if (t.length === 0) return null;
35
+ const n = [...t].sort((e, r) => e - r);
36
+ return n.some(
37
+ (e, r) => !Number.isInteger(e) || e < 0 || e > 6 || r > 0 && e === n[r - 1]
38
+ ) ? null : n;
39
+ }
40
+ function et(t) {
41
+ if (!re(t))
42
+ throw new Error("Choose a valid schedule time.");
43
+ const n = `${t.minute} ${t.hour}`;
44
+ switch (t.cadence) {
45
+ case "daily":
46
+ return `${n} * * *`;
47
+ case "weekly": {
48
+ const e = U(t.weekdays);
49
+ if (!e) throw new Error("Choose at least one weekday.");
50
+ return `${n} * * ${e.map((r) => P[r]).join(",")}`;
51
+ }
52
+ case "twice_monthly":
53
+ return `${n} 1,15 * *`;
54
+ case "monthly":
55
+ return `${n} 1 * *`;
56
+ }
57
+ }
58
+ function oe(t) {
59
+ if (typeof t != "string" || t.length === 0)
60
+ return { ok: !1, issue: "Choose a supported schedule." };
61
+ if (t !== t.trim() || t.includes(" "))
62
+ return { ok: !1, issue: "Choose a supported schedule." };
63
+ const n = t.split(" ");
64
+ if (n.length !== 5)
65
+ return { ok: !1, issue: "Choose a supported schedule." };
66
+ const [e, r, o, i, a] = n;
67
+ if (!/^(0|[1-9]\d?)$/.test(e) || !/^(0|[1-9]\d?)$/.test(r))
68
+ return { ok: !1, issue: "Choose a supported schedule." };
69
+ const l = Number(e), f = Number(r);
70
+ if (l > 59 || f > 23 || i !== "*")
71
+ return { ok: !1, issue: "Choose a supported schedule." };
72
+ if (o === "*" && a === "*")
73
+ return {
74
+ ok: !0,
75
+ value: { cadence: "daily", hour: f, minute: l, weekdays: [] }
76
+ };
77
+ if (o === "*" && a !== "*") {
78
+ const m = a.split(",").map((p) => ne.get(p));
79
+ if (m.some((p) => p === void 0))
80
+ return { ok: !1, issue: "Choose a supported schedule." };
81
+ const I = m, v = U(I);
82
+ return !v || v.some((p, C) => p !== I[C]) ? { ok: !1, issue: "Choose a supported schedule." } : {
83
+ ok: !0,
84
+ value: { cadence: "weekly", hour: f, minute: l, weekdays: v }
85
+ };
86
+ }
87
+ return o === "1,15" && a === "*" ? {
88
+ ok: !0,
89
+ value: { cadence: "twice_monthly", hour: f, minute: l, weekdays: [] }
90
+ } : o === "1" && a === "*" ? {
91
+ ok: !0,
92
+ value: { cadence: "monthly", hour: f, minute: l, weekdays: [] }
93
+ } : { ok: !1, issue: "Choose a supported schedule." };
94
+ }
95
+ function ie(t, n, e) {
96
+ return new Intl.DateTimeFormat(e, {
97
+ hour: "numeric",
98
+ minute: "2-digit",
99
+ timeZone: "UTC"
100
+ }).format(new Date(Date.UTC(2020, 0, 1, t, n)));
101
+ }
102
+ function ae(t, n) {
103
+ var e;
104
+ if (t === "UTC") return "UTC";
105
+ try {
106
+ return ((e = new Intl.DateTimeFormat(n, {
107
+ timeZone: t,
108
+ timeZoneName: "longGeneric"
109
+ }).formatToParts(new Date(Date.UTC(2020, 0, 1))).find((o) => o.type === "timeZoneName")) == null ? void 0 : e.value) ?? t;
110
+ } catch {
111
+ return null;
112
+ }
113
+ }
114
+ function tt(t, n, e = "en-US") {
115
+ const r = oe(t);
116
+ if (!r.ok) return null;
117
+ try {
118
+ const o = ie(r.value.hour, r.value.minute, e), i = ae(n, e);
119
+ if (!i) return null;
120
+ switch (r.value.cadence) {
121
+ case "daily":
122
+ return `Daily at ${o} ${i}`;
123
+ case "weekly": {
124
+ const a = new Intl.DateTimeFormat(e, {
125
+ weekday: "long",
126
+ timeZone: "UTC"
127
+ });
128
+ return `${r.value.weekdays.map(
129
+ (f) => a.format(new Date(Date.UTC(2023, 0, 1 + f)))
130
+ ).join(" and ")} at ${o} ${i}`;
131
+ }
132
+ case "twice_monthly":
133
+ return `On the 1st and 15th at ${o} ${i}`;
134
+ case "monthly":
135
+ return `Monthly on the 1st at ${o} ${i}`;
136
+ }
137
+ } catch {
138
+ return null;
139
+ }
140
+ }
141
+ const ce = /* @__PURE__ */ new Set([
142
+ "table",
143
+ "aggregateTable",
144
+ "pivotTable",
145
+ "detailTable"
146
+ ]), le = /* @__PURE__ */ new Set([
147
+ "bar",
148
+ "horizontalBar",
149
+ "line",
150
+ "area",
151
+ "stackedArea",
152
+ "combo",
153
+ "pie",
154
+ "doughnut",
155
+ "radar",
156
+ "polarArea",
157
+ "bubble",
158
+ "scatter",
159
+ "stackedBar",
160
+ "stackedLine",
161
+ "table",
162
+ "pivotTable",
163
+ "aggregateTable",
164
+ "matrixTable",
165
+ "detailTable",
166
+ "kpi",
167
+ "pyramid",
168
+ "tornado",
169
+ "range",
170
+ "map",
171
+ "funnel",
172
+ "bullet",
173
+ "heatmap",
174
+ "treemap",
175
+ "custom"
176
+ ]);
177
+ function nt(t) {
178
+ var r, o, i;
179
+ const n = le.has(t.type) && (t.type !== "custom" || !!((r = t.customCardPreferences) != null && r.url));
180
+ return t.type === "text" || !n || te(t) ? { formats: [], defaultFormat: null } : {
181
+ formats: de({
182
+ cardType: t.type,
183
+ allowDownload: (o = t.preferences) == null ? void 0 : o.allowDownload
184
+ }),
185
+ defaultFormat: se({
186
+ cardType: t.type,
187
+ allowDownload: (i = t.preferences) == null ? void 0 : i.allowDownload
188
+ })
189
+ };
190
+ }
191
+ function de(t) {
192
+ return t.allowDownload === !1 ? ["pdf"] : ["pdf", "csv"];
193
+ }
194
+ function se(t) {
195
+ return ce.has(t.cardType) && t.allowDownload !== !1 ? "csv" : "pdf";
196
+ }
197
+ function rt(t) {
198
+ return t != null && t.role ? t.type === "tenant" ? t.role === "POWER_USER" : ["AUTHOR", "ADMIN", "SUPER_ADMIN"].includes(t.role) : !1;
199
+ }
200
+ function ot(t) {
201
+ return t.canCreate ? [
202
+ ...t.scheduledReportAvailable ? ["scheduled_report"] : [],
203
+ ...t.analyticalBriefingsEnabled ? ["analytical_briefing"] : []
204
+ ] : [];
205
+ }
206
+ function fe(t) {
207
+ const n = (t == null ? void 0 : t.channels) ?? [];
208
+ return n.length === 1 && n[0] === "EMAIL";
209
+ }
210
+ function ue(t) {
211
+ return t.body.type === "generated_analysis" ? "Analytical briefing" : t.body.type === "custom_message" && t.attachments.length > 0 && fe(t.deliveryConfig) ? t.scheduleExpr ? "Scheduled report" : "On-demand report" : "Plain briefing";
212
+ }
213
+ function it(t) {
214
+ const n = ue(t), e = n === "Scheduled report" || n === "On-demand report" ? "report" : "briefing";
215
+ return {
216
+ typeLabel: n,
217
+ noun: e,
218
+ pluralNoun: e === "report" ? "reports" : "briefings"
219
+ };
220
+ }
221
+ const L = "BRIEFING", me = ["markdown", "html"], N = ["markdown"], w = 20, d = {
5
222
  name: 500,
6
223
  description: 2e3,
7
224
  instruction: 5e4,
@@ -17,61 +234,61 @@ const w = "BRIEFING", Z = ["markdown", "html"], V = ["markdown"], ze = 20, l = {
17
234
  presentationTone: 500,
18
235
  presentationFormat: 2e3,
19
236
  id: 500
20
- }, g = {
237
+ }, b = {
21
238
  maxBlocks: 50,
22
239
  maxTableRows: 100,
23
240
  maxTableColumns: 20,
24
- maxTableCellCharacters: l.contentCell,
25
- maxParagraphCharacters: l.contentText,
26
- maxFindingCharacters: l.contentText,
241
+ maxTableCellCharacters: d.contentCell,
242
+ maxParagraphCharacters: d.contentText,
243
+ maxFindingCharacters: d.contentText,
27
244
  maxListItems: 100,
28
245
  // A kpi_grid is rendered as a 2-up tile arrangement in emails. Cap at 8 so
29
246
  // the visual stays at most 4 rows (4 columns wide on desktop would force
30
247
  // tiny tiles in narrow client panels; 2-up was the chosen layout).
31
248
  maxKpiTiles: 8
32
- }, M = new Set(Z), Q = /* @__PURE__ */ new Set([
249
+ }, j = new Set(me), pe = /* @__PURE__ */ new Set([
33
250
  "EMAIL",
34
251
  "WEBHOOK",
35
252
  "SLACK",
36
253
  "IN_APP",
37
254
  "TELEGRAM"
38
- ]), L = {
255
+ ]), D = {
39
256
  maxToolCalls: { min: 1, max: 100 },
40
257
  maxRows: { min: 1, max: 1e5 },
41
258
  timeoutMs: { min: 1e3, max: 30 * 6e4 }
42
- }, ee = /* @__PURE__ */ new Set([
259
+ }, he = /* @__PURE__ */ new Set([
43
260
  "letter",
44
261
  "legal",
45
262
  "a4",
46
263
  "a3",
47
264
  "tabloid"
48
- ]), te = /* @__PURE__ */ new Set([
265
+ ]), ye = /* @__PURE__ */ new Set([
49
266
  "portrait",
50
267
  "landscape"
51
- ]), ne = /* @__PURE__ */ new Set([",", ";", " "]), re = /* @__PURE__ */ new Set([
268
+ ]), ge = /* @__PURE__ */ new Set([",", ";", " "]), ve = /* @__PURE__ */ new Set([
52
269
  "current",
53
270
  "all"
54
- ]), oe = /* @__PURE__ */ new Set([
271
+ ]), be = /* @__PURE__ */ new Set([
55
272
  "concise",
56
273
  "balanced",
57
274
  "detailed"
58
- ]), ie = /* @__PURE__ */ new Set([
275
+ ]), Ie = /* @__PURE__ */ new Set([
59
276
  "info",
60
277
  "positive",
61
278
  "warning",
62
279
  "critical"
63
- ]), ae = /* @__PURE__ */ new Set([
280
+ ]), $e = /* @__PURE__ */ new Set([
64
281
  "text",
65
282
  "number",
66
283
  "currency",
67
284
  "percent",
68
285
  "date",
69
286
  "boolean"
70
- ]), ce = /* @__PURE__ */ new Set([
287
+ ]), Ee = /* @__PURE__ */ new Set([
71
288
  "left",
72
289
  "center",
73
290
  "right"
74
- ]), de = [
291
+ ]), Te = [
75
292
  "pageSize",
76
293
  "orientation",
77
294
  "includeFilters",
@@ -94,678 +311,686 @@ const w = "BRIEFING", Z = ["markdown", "html"], V = ["markdown"], ze = 20, l = {
94
311
  "dashboardInputExecutionSnapshot",
95
312
  "selectedSheetId",
96
313
  "cardType",
314
+ "allowDownload",
97
315
  "theme"
98
316
  ];
99
- class S extends Error {
317
+ class A extends Error {
100
318
  constructor(e) {
101
- super(e.map((n) => `${n.field}: ${n.message}`).join("; "));
102
- F(this, "issues");
319
+ super(e.map((r) => `${r.field}: ${r.message}`).join("; "));
320
+ M(this, "issues");
103
321
  this.name = "BriefingContractError", this.issues = e;
104
322
  }
105
323
  }
106
- function P(r) {
107
- return typeof r == "object" && r !== null && !Array.isArray(r);
324
+ function q(t) {
325
+ return typeof t == "object" && t !== null && !Array.isArray(t);
108
326
  }
109
- function c(r, t, e) {
110
- r.push({ field: t, message: e });
327
+ function c(t, n, e) {
328
+ t.push({ field: n, message: e });
111
329
  }
112
- function h(r, t, e) {
113
- return P(r) ? r : (c(e, t, "Expected an object."), {});
330
+ function g(t, n, e) {
331
+ return q(t) ? t : (c(e, n, "Expected an object."), {});
114
332
  }
115
- function m(r, t, e, n) {
333
+ function u(t, n, e, r) {
116
334
  const o = new Set(e);
117
- Object.keys(r).forEach((i) => {
335
+ Object.keys(t).forEach((i) => {
118
336
  o.has(i) || c(
119
- n,
120
- t ? `${t}.${i}` : i,
337
+ r,
338
+ n ? `${n}.${i}` : i,
121
339
  `Unexpected field "${i}".`
122
340
  );
123
341
  });
124
342
  }
125
- function u(r, t, e, n) {
126
- if (typeof r != "string")
127
- return c(n, t, "Expected a string."), "";
128
- const o = r.trim();
129
- return o ? (o.length > e && c(n, t, `Must be ${e} characters or fewer.`), o) : (c(n, t, "Required value cannot be empty."), "");
343
+ function y(t, n, e, r) {
344
+ if (typeof t != "string")
345
+ return c(r, n, "Expected a string."), "";
346
+ const o = t.trim();
347
+ return o ? (o.length > e && c(r, n, `Must be ${e} characters or fewer.`), o) : (c(r, n, "Required value cannot be empty."), "");
130
348
  }
131
- function y(r, t, e, n) {
132
- if (r == null)
349
+ function h(t, n, e, r) {
350
+ if (t == null)
133
351
  return;
134
- if (typeof r != "string") {
135
- c(n, t, "Expected a string.");
352
+ if (typeof t != "string") {
353
+ c(r, n, "Expected a string.");
136
354
  return;
137
355
  }
138
- const o = r.trim();
356
+ const o = t.trim();
139
357
  if (o)
140
- return o.length > e && c(n, t, `Must be ${e} characters or fewer.`), o;
358
+ return o.length > e && c(r, n, `Must be ${e} characters or fewer.`), o;
141
359
  }
142
- function le(r, t, e) {
143
- if (r != null) {
144
- if (!Number.isInteger(r) || Number(r) < 0) {
145
- c(e, t, "Expected a non-negative integer.");
360
+ function Ce(t, n, e, r) {
361
+ if (typeof t != "string")
362
+ return c(r, n, "Expected a string."), "";
363
+ const o = t.trim();
364
+ return o.length > e && c(r, n, `Must be ${e} characters or fewer.`), o;
365
+ }
366
+ function ke(t, n, e) {
367
+ if (t != null) {
368
+ if (!Number.isInteger(t) || Number(t) < 0) {
369
+ c(e, n, "Expected a non-negative integer.");
146
370
  return;
147
371
  }
148
- return Number(r);
372
+ return Number(t);
149
373
  }
150
374
  }
151
- function $(r, t, e, n = {}) {
152
- if (r == null)
153
- return n.required ? (c(e, t, "Expected at least one evidence id."), []) : void 0;
154
- if (!Array.isArray(r))
155
- return c(e, t, "Expected an array."), n.required ? [] : void 0;
375
+ function $(t, n, e, r = {}) {
376
+ if (t == null)
377
+ return r.required ? (c(e, n, "Expected at least one evidence id."), []) : void 0;
378
+ if (!Array.isArray(t))
379
+ return c(e, n, "Expected an array."), r.required ? [] : void 0;
156
380
  const o = [];
157
- return r.forEach((i, a) => {
158
- const d = u(
381
+ return t.forEach((i, a) => {
382
+ const l = y(
159
383
  i,
160
- `${t}.${a}`,
161
- l.id,
384
+ `${n}.${a}`,
385
+ d.id,
162
386
  e
163
387
  );
164
- d && !o.includes(d) && o.push(d);
165
- }), n.required && o.length === 0 && c(e, t, "Expected at least one evidence id."), o.length > 0 || n.required ? o : void 0;
388
+ l && !o.includes(l) && o.push(l);
389
+ }), r.required && o.length === 0 && c(e, n, "Expected at least one evidence id."), o.length > 0 || r.required ? o : void 0;
166
390
  }
167
- function C(r, t, e, n) {
168
- return r == null ? t : typeof r != "boolean" ? (c(n, e, "Expected a boolean."), t) : r;
391
+ function T(t, n, e, r) {
392
+ return t == null ? n : typeof t != "boolean" ? (c(r, e, "Expected a boolean."), n) : t;
169
393
  }
170
- function fe(r, t) {
171
- return r == null ? "ACTIVE" : r === "ACTIVE" || r === "PAUSED" || r === "DISABLED" ? r : (c(t, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
394
+ function Ae(t, n) {
395
+ return t == null ? "ACTIVE" : t === "ACTIVE" || t === "PAUSED" || t === "DISABLED" ? t : (c(n, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
172
396
  }
173
- function se(r) {
174
- return r.includes("@") && r.includes(".") && !r.includes(" ");
397
+ function xe(t) {
398
+ return t.includes("@") && t.includes(".") && !t.includes(" ");
175
399
  }
176
- function q(r, t) {
177
- if (r == null)
400
+ function K(t, n) {
401
+ if (t == null)
178
402
  return { type: "project" };
179
- const e = h(r, "source", t), n = e.type;
180
- return n === "project" ? (m(e, "source", ["type"], t), { type: "project" }) : n === "dashboard" ? (m(e, "source", ["type", "dashboardId"], t), {
403
+ const e = g(t, "source", n), r = e.type;
404
+ return r === "project" ? (u(e, "source", ["type"], n), { type: "project" }) : r === "dashboard" ? (u(e, "source", ["type", "dashboardId"], n), {
181
405
  type: "dashboard",
182
- dashboardId: u(
406
+ dashboardId: y(
183
407
  e.dashboardId,
184
408
  "source.dashboardId",
185
- l.id,
186
- t
409
+ d.id,
410
+ n
187
411
  )
188
- }) : (c(t, "source.type", "Expected project or dashboard."), { type: "project" });
412
+ }) : (c(n, "source.type", "Expected project or dashboard."), { type: "project" });
189
413
  }
190
- function j(r, t) {
191
- const e = h(r, "body", t), n = e.type;
192
- return n === "generated_analysis" ? (m(e, "body", ["type", "instruction"], t), {
414
+ function G(t, n) {
415
+ const e = g(t, "body", n), r = e.type;
416
+ return r === "generated_analysis" ? (u(e, "body", ["type", "instruction"], n), {
193
417
  type: "generated_analysis",
194
- instruction: u(
418
+ instruction: y(
195
419
  e.instruction,
196
420
  "body.instruction",
197
- l.instruction,
198
- t
421
+ d.instruction,
422
+ n
199
423
  )
200
- }) : n === "custom_message" ? (m(e, "body", ["type", "message"], t), {
424
+ }) : r === "custom_message" ? (u(e, "body", ["type", "message"], n), {
201
425
  type: "custom_message",
202
- message: u(
426
+ message: Ce(
203
427
  e.message,
204
428
  "body.message",
205
- l.customMessage,
206
- t
429
+ d.customMessage,
430
+ n
207
431
  )
208
- }) : n === "none" ? (m(e, "body", ["type"], t), { type: "none" }) : (c(
209
- t,
432
+ }) : r === "none" ? (u(e, "body", ["type"], n), { type: "none" }) : (c(
433
+ n,
210
434
  "body.type",
211
435
  "Expected generated_analysis, custom_message, or none."
212
436
  ), { type: "none" });
213
437
  }
214
- function me(r, t) {
215
- if (r == null)
216
- return [...V];
217
- if (!Array.isArray(r))
218
- return c(t, "presentation.artifactFormats", "Expected an array."), [...V];
219
- if (r.length === 0)
438
+ function Se(t, n) {
439
+ if (t == null)
440
+ return [...N];
441
+ if (!Array.isArray(t))
442
+ return c(n, "presentation.artifactFormats", "Expected an array."), [...N];
443
+ if (t.length === 0)
220
444
  return c(
221
- t,
445
+ n,
222
446
  "presentation.artifactFormats",
223
447
  "Choose at least one artifact format."
224
448
  ), [];
225
449
  const e = [];
226
- return r.forEach((n, o) => {
227
- if (typeof n != "string" || !M.has(n)) {
450
+ return t.forEach((r, o) => {
451
+ if (typeof r != "string" || !j.has(r)) {
228
452
  c(
229
- t,
453
+ n,
230
454
  `presentation.artifactFormats.${o}`,
231
455
  "Expected markdown or html."
232
456
  );
233
457
  return;
234
458
  }
235
- e.includes(n) || e.push(n);
459
+ e.includes(r) || e.push(r);
236
460
  }), e;
237
461
  }
238
- function K(r, t) {
239
- if (r == null)
462
+ function H(t, n) {
463
+ if (t == null)
240
464
  return {
241
- artifactFormats: [...V],
465
+ artifactFormats: [...N],
242
466
  includeEvidence: !0,
243
467
  includeSql: !0
244
468
  };
245
- const e = h(r, "presentation", t);
246
- m(
469
+ const e = g(t, "presentation", n);
470
+ u(
247
471
  e,
248
472
  "presentation",
249
473
  ["artifactFormats", "includeEvidence", "includeSql", "audience", "tone", "format"],
250
- t
474
+ n
251
475
  );
252
- const n = {
253
- artifactFormats: me(e.artifactFormats, t),
254
- includeEvidence: C(
476
+ const r = {
477
+ artifactFormats: Se(e.artifactFormats, n),
478
+ includeEvidence: T(
255
479
  e.includeEvidence,
256
480
  !0,
257
481
  "presentation.includeEvidence",
258
- t
482
+ n
259
483
  ),
260
- includeSql: C(
484
+ includeSql: T(
261
485
  e.includeSql,
262
486
  !0,
263
487
  "presentation.includeSql",
264
- t
488
+ n
265
489
  )
266
- }, o = y(
490
+ }, o = h(
267
491
  e.audience,
268
492
  "presentation.audience",
269
- l.presentationAudience,
270
- t
271
- ), i = y(
493
+ d.presentationAudience,
494
+ n
495
+ ), i = h(
272
496
  e.tone,
273
497
  "presentation.tone",
274
- l.presentationTone,
275
- t
276
- ), a = y(
498
+ d.presentationTone,
499
+ n
500
+ ), a = h(
277
501
  e.format,
278
502
  "presentation.format",
279
- l.presentationFormat,
280
- t
503
+ d.presentationFormat,
504
+ n
281
505
  );
282
- return o && (n.audience = o), i && (n.tone = i), a && (n.format = a), n;
506
+ return o && (r.audience = o), i && (r.tone = i), a && (r.format = a), r;
283
507
  }
284
- function pe(r, t, e) {
285
- return Array.isArray(r) ? (r.length === 0 && c(e, t, "Expected at least one item."), r.length > g.maxListItems && c(
508
+ function we(t, n, e) {
509
+ return Array.isArray(t) ? (t.length === 0 && c(e, n, "Expected at least one item."), t.length > b.maxListItems && c(
286
510
  e,
287
- t,
288
- `Must have ${g.maxListItems} items or fewer.`
289
- ), r.slice(0, g.maxListItems).map(
290
- (n, o) => u(
291
- n,
292
- `${t}.${o}`,
293
- l.contentItem,
511
+ n,
512
+ `Must have ${b.maxListItems} items or fewer.`
513
+ ), t.slice(0, b.maxListItems).map(
514
+ (r, o) => y(
515
+ r,
516
+ `${n}.${o}`,
517
+ d.contentItem,
294
518
  e
295
519
  )
296
- ).filter(Boolean)) : (c(e, t, "Expected an array."), []);
520
+ ).filter(Boolean)) : (c(e, n, "Expected an array."), []);
297
521
  }
298
- function ue(r, t, e) {
299
- return r === null || typeof r == "string" || typeof r == "number" || typeof r == "boolean" ? typeof r == "string" && r.length > l.contentCell ? (c(
522
+ function De(t, n, e) {
523
+ return t === null || typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? typeof t == "string" && t.length > d.contentCell ? (c(
300
524
  e,
301
- t,
302
- `Must be ${l.contentCell} characters or fewer.`
303
- ), r.slice(0, l.contentCell)) : typeof r == "number" && !Number.isFinite(r) ? (c(e, t, "Expected a finite number."), null) : r : (c(e, t, "Expected a string, number, boolean, or null."), null);
304
- }
305
- function ye(r, t, e) {
306
- if (!Array.isArray(r))
307
- return c(e, t, "Expected an array."), [];
308
- r.length === 0 && c(e, t, "Expected at least one column."), r.length > g.maxTableColumns && c(
525
+ n,
526
+ `Must be ${d.contentCell} characters or fewer.`
527
+ ), t.slice(0, d.contentCell)) : typeof t == "number" && !Number.isFinite(t) ? (c(e, n, "Expected a finite number."), null) : t : (c(e, n, "Expected a string, number, boolean, or null."), null);
528
+ }
529
+ function _e(t, n, e) {
530
+ if (!Array.isArray(t))
531
+ return c(e, n, "Expected an array."), [];
532
+ t.length === 0 && c(e, n, "Expected at least one column."), t.length > b.maxTableColumns && c(
309
533
  e,
310
- t,
311
- `Must have ${g.maxTableColumns} columns or fewer.`
534
+ n,
535
+ `Must have ${b.maxTableColumns} columns or fewer.`
312
536
  );
313
- const n = /* @__PURE__ */ new Set();
314
- return r.slice(0, g.maxTableColumns).map((o, i) => {
315
- const a = `${t}.${i}`, d = h(o, a, e);
316
- m(d, a, ["key", "label", "kind", "align"], e);
317
- const s = u(
318
- d.key,
537
+ const r = /* @__PURE__ */ new Set();
538
+ return t.slice(0, b.maxTableColumns).map((o, i) => {
539
+ const a = `${n}.${i}`, l = g(o, a, e);
540
+ u(l, a, ["key", "label", "kind", "align"], e);
541
+ const f = y(
542
+ l.key,
319
543
  `${a}.key`,
320
- l.id,
544
+ d.id,
321
545
  e
322
546
  );
323
- s && (n.has(s) && c(e, `${a}.key`, "Column key must be unique."), n.add(s));
324
- const f = u(
325
- d.label,
547
+ f && (r.has(f) && c(e, `${a}.key`, "Column key must be unique."), r.add(f));
548
+ const s = y(
549
+ l.label,
326
550
  `${a}.label`,
327
- l.contentTitle,
551
+ d.contentTitle,
328
552
  e
329
- ), p = E(
330
- d.kind,
553
+ ), m = E(
554
+ l.kind,
331
555
  `${a}.kind`,
332
- ae,
556
+ $e,
333
557
  "text, number, currency, percent, date, or boolean",
334
558
  e
335
559
  ), I = E(
336
- d.align,
560
+ l.align,
337
561
  `${a}.align`,
338
- ce,
562
+ Ee,
339
563
  "left, center, or right",
340
564
  e
341
565
  );
342
566
  return {
343
- key: s,
344
- label: f,
345
- ...p ? { kind: p } : {},
567
+ key: f,
568
+ label: s,
569
+ ...m ? { kind: m } : {},
346
570
  ...I ? { align: I } : {}
347
571
  };
348
572
  });
349
573
  }
350
- function ve(r, t, e, n) {
351
- if (!Array.isArray(r))
352
- return c(n, t, "Expected an array."), [];
353
- r.length > g.maxTableRows && c(
574
+ function Be(t, n, e, r) {
575
+ if (!Array.isArray(t))
576
+ return c(r, n, "Expected an array."), [];
577
+ t.length > b.maxTableRows && c(
578
+ r,
354
579
  n,
355
- t,
356
- `Must have ${g.maxTableRows} rows or fewer.`
580
+ `Must have ${b.maxTableRows} rows or fewer.`
357
581
  );
358
582
  const o = new Set(e.map((i) => i.key).filter(Boolean));
359
- return r.slice(0, g.maxTableRows).map((i, a) => {
360
- const d = `${t}.${a}`, s = h(i, d, n);
361
- return Object.keys(s).forEach((f) => {
362
- o.has(f) || c(n, `${d}.${f}`, `Unexpected table cell "${f}".`);
583
+ return t.slice(0, b.maxTableRows).map((i, a) => {
584
+ const l = `${n}.${a}`, f = g(i, l, r);
585
+ return Object.keys(f).forEach((s) => {
586
+ o.has(s) || c(r, `${l}.${s}`, `Unexpected table cell "${s}".`);
363
587
  }), Object.fromEntries(
364
- e.map((f) => [
365
- f.key,
366
- ue(s[f.key] ?? null, `${d}.${f.key}`, n)
588
+ e.map((s) => [
589
+ s.key,
590
+ De(f[s.key] ?? null, `${l}.${s.key}`, r)
367
591
  ])
368
592
  );
369
593
  });
370
594
  }
371
- function he(r, t, e) {
372
- const n = `content.blocks.${t}`, o = h(r, n, e), i = o.type;
595
+ function Le(t, n, e) {
596
+ const r = `content.blocks.${n}`, o = g(t, r, e), i = o.type;
373
597
  if (i === "heading") {
374
- m(o, n, ["type", "text", "level", "evidenceIds"], e);
598
+ u(o, r, ["type", "text", "level", "evidenceIds"], e);
375
599
  const a = o.level === void 0 || o.level === null ? void 0 : o.level === 2 || o.level === 3 ? o.level : void 0;
376
- o.level !== void 0 && o.level !== null && a === void 0 && c(e, `${n}.level`, "Expected 2 or 3.");
377
- const d = $(o.evidenceIds, `${n}.evidenceIds`, e);
600
+ o.level !== void 0 && o.level !== null && a === void 0 && c(e, `${r}.level`, "Expected 2 or 3.");
601
+ const l = $(o.evidenceIds, `${r}.evidenceIds`, e);
378
602
  return {
379
603
  type: "heading",
380
- text: u(
604
+ text: y(
381
605
  o.text,
382
- `${n}.text`,
383
- l.contentTitle,
606
+ `${r}.text`,
607
+ d.contentTitle,
384
608
  e
385
609
  ),
386
610
  ...a ? { level: a } : {},
387
- ...d ? { evidenceIds: d } : {}
611
+ ...l ? { evidenceIds: l } : {}
388
612
  };
389
613
  }
390
614
  if (i === "paragraph") {
391
- m(o, n, ["type", "text", "evidenceIds"], e);
392
- const a = $(o.evidenceIds, `${n}.evidenceIds`, e);
615
+ u(o, r, ["type", "text", "evidenceIds"], e);
616
+ const a = $(o.evidenceIds, `${r}.evidenceIds`, e);
393
617
  return {
394
618
  type: "paragraph",
395
- text: u(
619
+ text: y(
396
620
  o.text,
397
- `${n}.text`,
398
- l.contentText,
621
+ `${r}.text`,
622
+ d.contentText,
399
623
  e
400
624
  ),
401
625
  ...a ? { evidenceIds: a } : {}
402
626
  };
403
627
  }
404
628
  if (i === "finding") {
405
- m(o, n, ["type", "title", "text", "severity", "evidenceIds"], e);
406
- const a = y(
629
+ u(o, r, ["type", "title", "text", "severity", "evidenceIds"], e);
630
+ const a = h(
407
631
  o.title,
408
- `${n}.title`,
409
- l.contentTitle,
632
+ `${r}.title`,
633
+ d.contentTitle,
410
634
  e
411
- ), d = E(
635
+ ), l = E(
412
636
  o.severity,
413
- `${n}.severity`,
414
- ie,
637
+ `${r}.severity`,
638
+ Ie,
415
639
  "info, positive, warning, or critical",
416
640
  e
417
641
  );
418
642
  return {
419
643
  type: "finding",
420
644
  ...a ? { title: a } : {},
421
- text: u(
645
+ text: y(
422
646
  o.text,
423
- `${n}.text`,
424
- l.contentText,
647
+ `${r}.text`,
648
+ d.contentText,
425
649
  e
426
650
  ),
427
- ...d ? { severity: d } : {},
428
- evidenceIds: $(o.evidenceIds, `${n}.evidenceIds`, e, {
651
+ ...l ? { severity: l } : {},
652
+ evidenceIds: $(o.evidenceIds, `${r}.evidenceIds`, e, {
429
653
  required: !0
430
654
  }) ?? []
431
655
  };
432
656
  }
433
657
  if (i === "bullets" || i === "actions" || i === "limitations") {
434
- m(o, n, ["type", "title", "items", "evidenceIds"], e);
435
- const a = y(
658
+ u(o, r, ["type", "title", "items", "evidenceIds"], e);
659
+ const a = h(
436
660
  o.title,
437
- `${n}.title`,
438
- l.contentTitle,
661
+ `${r}.title`,
662
+ d.contentTitle,
439
663
  e
440
- ), d = $(o.evidenceIds, `${n}.evidenceIds`, e);
664
+ ), l = $(o.evidenceIds, `${r}.evidenceIds`, e);
441
665
  return {
442
666
  type: i,
443
667
  ...a ? { title: a } : {},
444
- items: pe(o.items, `${n}.items`, e),
445
- ...d ? { evidenceIds: d } : {}
668
+ items: we(o.items, `${r}.items`, e),
669
+ ...l ? { evidenceIds: l } : {}
446
670
  };
447
671
  }
448
672
  if (i === "metric") {
449
- m(
673
+ u(
450
674
  o,
451
- n,
675
+ r,
452
676
  ["type", "label", "value", "previousValue", "delta", "unit", "evidenceIds"],
453
677
  e
454
678
  );
455
679
  const a = typeof o.value == "string" || typeof o.value == "number" ? o.value : "";
456
- a === "" && c(e, `${n}.value`, "Expected a string or number.");
457
- const d = o.previousValue === void 0 || o.previousValue === null || typeof o.previousValue == "string" || typeof o.previousValue == "number" ? o.previousValue : void 0;
458
- o.previousValue !== void 0 && o.previousValue !== null && d === void 0 && c(e, `${n}.previousValue`, "Expected a string, number, or null.");
459
- const s = o.delta === void 0 || o.delta === null || typeof o.delta == "string" || typeof o.delta == "number" ? o.delta : void 0;
460
- o.delta !== void 0 && o.delta !== null && s === void 0 && c(e, `${n}.delta`, "Expected a string, number, or null.");
461
- const f = y(
680
+ a === "" && c(e, `${r}.value`, "Expected a string or number.");
681
+ const l = o.previousValue === void 0 || o.previousValue === null || typeof o.previousValue == "string" || typeof o.previousValue == "number" ? o.previousValue : void 0;
682
+ o.previousValue !== void 0 && o.previousValue !== null && l === void 0 && c(e, `${r}.previousValue`, "Expected a string, number, or null.");
683
+ const f = o.delta === void 0 || o.delta === null || typeof o.delta == "string" || typeof o.delta == "number" ? o.delta : void 0;
684
+ o.delta !== void 0 && o.delta !== null && f === void 0 && c(e, `${r}.delta`, "Expected a string, number, or null.");
685
+ const s = h(
462
686
  o.unit,
463
- `${n}.unit`,
464
- l.contentTitle,
687
+ `${r}.unit`,
688
+ d.contentTitle,
465
689
  e
466
- ), p = $(o.evidenceIds, `${n}.evidenceIds`, e);
690
+ ), m = $(o.evidenceIds, `${r}.evidenceIds`, e);
467
691
  return {
468
692
  type: "metric",
469
- label: u(
693
+ label: y(
470
694
  o.label,
471
- `${n}.label`,
472
- l.contentTitle,
695
+ `${r}.label`,
696
+ d.contentTitle,
473
697
  e
474
698
  ),
475
699
  value: a,
476
- ...d !== void 0 ? { previousValue: d } : {},
477
- ...s !== void 0 ? { delta: s } : {},
478
- ...f ? { unit: f } : {},
479
- ...p ? { evidenceIds: p } : {}
700
+ ...l !== void 0 ? { previousValue: l } : {},
701
+ ...f !== void 0 ? { delta: f } : {},
702
+ ...s ? { unit: s } : {},
703
+ ...m ? { evidenceIds: m } : {}
480
704
  };
481
705
  }
482
706
  if (i === "kpi_grid") {
483
- m(o, n, ["type", "title", "tiles", "evidenceIds"], e);
484
- const a = y(
707
+ u(o, r, ["type", "title", "tiles", "evidenceIds"], e);
708
+ const a = h(
485
709
  o.title,
486
- `${n}.title`,
487
- l.contentTitle,
710
+ `${r}.title`,
711
+ d.contentTitle,
488
712
  e
489
- ), d = Array.isArray(o.tiles) ? o.tiles : [];
490
- Array.isArray(o.tiles) || c(e, `${n}.tiles`, "Expected an array."), d.length === 0 && c(e, `${n}.tiles`, "Expected at least one tile."), d.length > g.maxKpiTiles && c(
713
+ ), l = Array.isArray(o.tiles) ? o.tiles : [];
714
+ Array.isArray(o.tiles) || c(e, `${r}.tiles`, "Expected an array."), l.length === 0 && c(e, `${r}.tiles`, "Expected at least one tile."), l.length > b.maxKpiTiles && c(
491
715
  e,
492
- `${n}.tiles`,
493
- `Must have ${g.maxKpiTiles} tiles or fewer.`
716
+ `${r}.tiles`,
717
+ `Must have ${b.maxKpiTiles} tiles or fewer.`
494
718
  );
495
- const s = d.slice(0, g.maxKpiTiles).map((p, I) => {
496
- const b = `${n}.tiles.${I}`, v = h(p, b, e);
497
- m(
719
+ const f = l.slice(0, b.maxKpiTiles).map((m, I) => {
720
+ const v = `${r}.tiles.${I}`, p = g(m, v, e);
721
+ u(
722
+ p,
498
723
  v,
499
- b,
500
724
  ["label", "value", "previousValue", "delta", "unit", "evidenceIds"],
501
725
  e
502
726
  );
503
- const D = typeof v.value == "string" || typeof v.value == "number" ? v.value : "";
504
- D === "" && c(e, `${b}.value`, "Expected a string or number.");
505
- const k = v.previousValue === void 0 || v.previousValue === null || typeof v.previousValue == "string" || typeof v.previousValue == "number" ? v.previousValue : void 0;
506
- v.previousValue !== void 0 && v.previousValue !== null && k === void 0 && c(
727
+ const C = typeof p.value == "string" || typeof p.value == "number" ? p.value : "";
728
+ C === "" && c(e, `${v}.value`, "Expected a string or number.");
729
+ const x = p.previousValue === void 0 || p.previousValue === null || typeof p.previousValue == "string" || typeof p.previousValue == "number" ? p.previousValue : void 0;
730
+ p.previousValue !== void 0 && p.previousValue !== null && x === void 0 && c(
507
731
  e,
508
- `${b}.previousValue`,
732
+ `${v}.previousValue`,
509
733
  "Expected a string, number, or null."
510
734
  );
511
- const _ = v.delta === void 0 || v.delta === null || typeof v.delta == "string" || typeof v.delta == "number" ? v.delta : void 0;
512
- v.delta !== void 0 && v.delta !== null && _ === void 0 && c(e, `${b}.delta`, "Expected a string, number, or null.");
513
- const O = y(
514
- v.unit,
515
- `${b}.unit`,
516
- l.contentTitle,
735
+ const S = p.delta === void 0 || p.delta === null || typeof p.delta == "string" || typeof p.delta == "number" ? p.delta : void 0;
736
+ p.delta !== void 0 && p.delta !== null && S === void 0 && c(e, `${v}.delta`, "Expected a string, number, or null.");
737
+ const V = h(
738
+ p.unit,
739
+ `${v}.unit`,
740
+ d.contentTitle,
517
741
  e
518
- ), R = $(
519
- v.evidenceIds,
520
- `${b}.evidenceIds`,
742
+ ), z = $(
743
+ p.evidenceIds,
744
+ `${v}.evidenceIds`,
521
745
  e
522
746
  );
523
747
  return {
524
- label: u(
525
- v.label,
526
- `${b}.label`,
527
- l.contentTitle,
748
+ label: y(
749
+ p.label,
750
+ `${v}.label`,
751
+ d.contentTitle,
528
752
  e
529
753
  ),
530
- value: D,
531
- ...k !== void 0 ? { previousValue: k } : {},
532
- ..._ !== void 0 ? { delta: _ } : {},
533
- ...O ? { unit: O } : {},
534
- ...R ? { evidenceIds: R } : {}
754
+ value: C,
755
+ ...x !== void 0 ? { previousValue: x } : {},
756
+ ...S !== void 0 ? { delta: S } : {},
757
+ ...V ? { unit: V } : {},
758
+ ...z ? { evidenceIds: z } : {}
535
759
  };
536
- }), f = $(
760
+ }), s = $(
537
761
  o.evidenceIds,
538
- `${n}.evidenceIds`,
762
+ `${r}.evidenceIds`,
539
763
  e
540
764
  );
541
765
  return {
542
766
  type: "kpi_grid",
543
767
  ...a ? { title: a } : {},
544
- tiles: s,
545
- ...f ? { evidenceIds: f } : {}
768
+ tiles: f,
769
+ ...s ? { evidenceIds: s } : {}
546
770
  };
547
771
  }
548
772
  if (i === "progress") {
549
- m(o, n, ["type", "label", "value", "detail", "evidenceIds"], e);
773
+ u(o, r, ["type", "label", "value", "detail", "evidenceIds"], e);
550
774
  const a = typeof o.value == "number" && Number.isFinite(o.value) ? o.value : 0;
551
- (typeof o.value != "number" || !Number.isFinite(o.value)) && c(e, `${n}.value`, "Expected a finite number.");
552
- const d = y(
775
+ (typeof o.value != "number" || !Number.isFinite(o.value)) && c(e, `${r}.value`, "Expected a finite number.");
776
+ const l = h(
553
777
  o.detail,
554
- `${n}.detail`,
555
- l.contentText,
778
+ `${r}.detail`,
779
+ d.contentText,
556
780
  e
557
- ), s = $(o.evidenceIds, `${n}.evidenceIds`, e);
781
+ ), f = $(o.evidenceIds, `${r}.evidenceIds`, e);
558
782
  return {
559
783
  type: "progress",
560
- label: u(
784
+ label: y(
561
785
  o.label,
562
- `${n}.label`,
563
- l.contentTitle,
786
+ `${r}.label`,
787
+ d.contentTitle,
564
788
  e
565
789
  ),
566
790
  value: a,
567
- ...d ? { detail: d } : {},
568
- ...s ? { evidenceIds: s } : {}
791
+ ...l ? { detail: l } : {},
792
+ ...f ? { evidenceIds: f } : {}
569
793
  };
570
794
  }
571
795
  if (i === "table") {
572
- m(
796
+ u(
573
797
  o,
574
- n,
798
+ r,
575
799
  ["type", "id", "title", "columns", "rows", "caption", "totalRows", "evidenceIds"],
576
800
  e
577
801
  );
578
- const a = ye(o.columns, `${n}.columns`, e), d = y(
802
+ const a = _e(o.columns, `${r}.columns`, e), l = h(
579
803
  o.title,
580
- `${n}.title`,
581
- l.contentTitle,
804
+ `${r}.title`,
805
+ d.contentTitle,
582
806
  e
583
- ), s = y(
807
+ ), f = h(
584
808
  o.id,
585
- `${n}.id`,
586
- l.id,
809
+ `${r}.id`,
810
+ d.id,
587
811
  e
588
- ), f = y(
812
+ ), s = h(
589
813
  o.caption,
590
- `${n}.caption`,
591
- l.contentItem,
814
+ `${r}.caption`,
815
+ d.contentItem,
592
816
  e
593
- ), p = le(
817
+ ), m = ke(
594
818
  o.totalRows,
595
- `${n}.totalRows`,
819
+ `${r}.totalRows`,
596
820
  e
597
- ), I = $(o.evidenceIds, `${n}.evidenceIds`, e);
821
+ ), I = $(o.evidenceIds, `${r}.evidenceIds`, e);
598
822
  return {
599
823
  type: "table",
600
- ...s ? { id: s } : {},
601
- ...d ? { title: d } : {},
824
+ ...f ? { id: f } : {},
825
+ ...l ? { title: l } : {},
602
826
  columns: a,
603
- rows: ve(o.rows, `${n}.rows`, a, e),
604
- ...f ? { caption: f } : {},
605
- ...p !== void 0 ? { totalRows: p } : {},
827
+ rows: Be(o.rows, `${r}.rows`, a, e),
828
+ ...s ? { caption: s } : {},
829
+ ...m !== void 0 ? { totalRows: m } : {},
606
830
  ...I ? { evidenceIds: I } : {}
607
831
  };
608
832
  }
609
833
  if (i === "evidence_appendix") {
610
- m(o, n, ["type", "title", "evidenceIds"], e);
611
- const a = y(
834
+ u(o, r, ["type", "title", "evidenceIds"], e);
835
+ const a = h(
612
836
  o.title,
613
- `${n}.title`,
614
- l.contentTitle,
837
+ `${r}.title`,
838
+ d.contentTitle,
615
839
  e
616
840
  );
617
841
  return {
618
842
  type: "evidence_appendix",
619
843
  ...a ? { title: a } : {},
620
- evidenceIds: $(o.evidenceIds, `${n}.evidenceIds`, e, {
844
+ evidenceIds: $(o.evidenceIds, `${r}.evidenceIds`, e, {
621
845
  required: !0
622
846
  }) ?? []
623
847
  };
624
848
  }
625
849
  if (i === "sql") {
626
- m(o, n, ["type", "title", "sql", "evidenceIds"], e);
627
- const a = y(
850
+ u(o, r, ["type", "title", "sql", "evidenceIds"], e);
851
+ const a = h(
628
852
  o.title,
629
- `${n}.title`,
630
- l.contentTitle,
853
+ `${r}.title`,
854
+ d.contentTitle,
631
855
  e
632
- ), d = u(
856
+ ), l = y(
633
857
  o.sql,
634
- `${n}.sql`,
635
- l.contentSql,
858
+ `${r}.sql`,
859
+ d.contentSql,
636
860
  e
637
- ), s = $(o.evidenceIds, `${n}.evidenceIds`, e);
861
+ ), f = $(o.evidenceIds, `${r}.evidenceIds`, e);
638
862
  return {
639
863
  type: "sql",
640
864
  ...a ? { title: a } : {},
641
- sql: d,
642
- ...s ? { evidenceIds: s } : {}
865
+ sql: l,
866
+ ...f ? { evidenceIds: f } : {}
643
867
  };
644
868
  }
645
869
  return c(
646
870
  e,
647
- `${n}.type`,
871
+ `${r}.type`,
648
872
  "Expected heading, paragraph, finding, bullets, metric, kpi_grid, progress, table, actions, limitations, sql, or evidence_appendix."
649
873
  ), {
650
874
  type: "paragraph",
651
875
  text: ""
652
876
  };
653
877
  }
654
- function ge(r) {
655
- const t = [], e = h(r, "content", t);
656
- m(e, "content", ["version", "title", "summary", "blocks"], t), e.version !== 1 && c(t, "content.version", "Expected version 1.");
657
- const n = y(
878
+ function Ne(t) {
879
+ const n = [], e = g(t, "content", n);
880
+ u(e, "content", ["version", "title", "summary", "blocks"], n), e.version !== 1 && c(n, "content.version", "Expected version 1.");
881
+ const r = h(
658
882
  e.title,
659
883
  "content.title",
660
- l.contentTitle,
661
- t
662
- ), o = y(
884
+ d.contentTitle,
885
+ n
886
+ ), o = h(
663
887
  e.summary,
664
888
  "content.summary",
665
- l.contentSummary,
666
- t
889
+ d.contentSummary,
890
+ n
667
891
  );
668
- Array.isArray(e.blocks) || c(t, "content.blocks", "Expected an array.");
892
+ Array.isArray(e.blocks) || c(n, "content.blocks", "Expected an array.");
669
893
  const i = Array.isArray(e.blocks) ? e.blocks : [];
670
- i.length === 0 && c(t, "content.blocks", "Expected at least one block."), i.length > g.maxBlocks && c(
671
- t,
894
+ i.length === 0 && c(n, "content.blocks", "Expected at least one block."), i.length > b.maxBlocks && c(
895
+ n,
672
896
  "content.blocks",
673
- `Must have ${g.maxBlocks} blocks or fewer.`
897
+ `Must have ${b.maxBlocks} blocks or fewer.`
674
898
  );
675
- const a = i.slice(0, g.maxBlocks).map((d, s) => he(d, s, t));
676
- return B(t), {
899
+ const a = i.slice(0, b.maxBlocks).map((l, f) => Le(l, f, n));
900
+ return O(n), {
677
901
  version: 1,
678
- ...n ? { title: n } : {},
902
+ ...r ? { title: r } : {},
679
903
  ...o ? { summary: o } : {},
680
904
  blocks: a
681
905
  };
682
906
  }
683
- function De(r) {
907
+ function at(t) {
684
908
  try {
685
909
  return {
686
910
  valid: !0,
687
- value: ge(r),
911
+ value: Ne(t),
688
912
  issues: []
689
913
  };
690
- } catch (t) {
691
- if (t instanceof S)
692
- return { valid: !1, issues: t.issues };
693
- throw t;
914
+ } catch (n) {
915
+ if (n instanceof A)
916
+ return { valid: !1, issues: n.issues };
917
+ throw n;
694
918
  }
695
919
  }
696
- function x(r, t, e, n) {
697
- return typeof r == "string" && e.includes(r) ? r : (c(n, t, `Expected ${e.join(" or ")}.`), e[0]);
920
+ function k(t, n, e, r) {
921
+ return typeof t == "string" && e.includes(t) ? t : (c(r, n, `Expected ${e.join(" or ")}.`), e[0]);
698
922
  }
699
- function E(r, t, e, n, o) {
700
- if (r != null) {
701
- if (typeof r == "string" && e.has(r))
702
- return r;
703
- c(o, t, `Expected ${n}.`);
923
+ function E(t, n, e, r, o) {
924
+ if (t != null) {
925
+ if (typeof t == "string" && e.has(t))
926
+ return t;
927
+ c(o, n, `Expected ${r}.`);
704
928
  }
705
929
  }
706
- function Ie(r, t, e) {
707
- if (r != null) {
708
- if (!Array.isArray(r)) {
709
- c(e, t, "Expected an array.");
930
+ function Oe(t, n, e) {
931
+ if (t != null) {
932
+ if (!Array.isArray(t)) {
933
+ c(e, n, "Expected an array.");
710
934
  return;
711
935
  }
712
- return r;
936
+ return t;
713
937
  }
714
938
  }
715
- function be(r, t, e) {
716
- if (r != null) {
717
- if (!P(r)) {
718
- c(e, t, "Expected an object.");
939
+ function Fe(t, n, e) {
940
+ if (t != null) {
941
+ if (!q(t)) {
942
+ c(e, n, "Expected an object.");
719
943
  return;
720
944
  }
721
- return r;
945
+ return t;
722
946
  }
723
947
  }
724
- function $e(r, t, e) {
725
- if (r == null)
948
+ function Re(t, n, e) {
949
+ if (t == null)
726
950
  return;
727
- const n = h(r, t, e);
728
- m(n, t, de, e);
951
+ const r = g(t, n, e);
952
+ u(r, n, Te, e);
729
953
  const o = {}, i = E(
730
- n.pageSize,
731
- `${t}.pageSize`,
732
- ee,
954
+ r.pageSize,
955
+ `${n}.pageSize`,
956
+ he,
733
957
  "letter, legal, a4, a3, or tabloid",
734
958
  e
735
959
  ), a = E(
736
- n.orientation,
737
- `${t}.orientation`,
738
- te,
960
+ r.orientation,
961
+ `${n}.orientation`,
962
+ ye,
739
963
  "portrait or landscape",
740
964
  e
741
- ), d = E(
742
- n.delimiter,
743
- `${t}.delimiter`,
744
- ne,
965
+ ), l = E(
966
+ r.delimiter,
967
+ `${n}.delimiter`,
968
+ ge,
745
969
  "comma, semicolon, or tab",
746
970
  e
747
- ), s = E(
748
- n.sheetSelection,
749
- `${t}.sheetSelection`,
750
- re,
971
+ ), f = E(
972
+ r.sheetSelection,
973
+ `${n}.sheetSelection`,
974
+ ve,
751
975
  "current or all",
752
976
  e
753
977
  );
754
- i && (o.pageSize = i), a && (o.orientation = a), d && (o.delimiter = d), s && (o.sheetSelection = s);
755
- for (const f of [
978
+ i && (o.pageSize = i), a && (o.orientation = a), l && (o.delimiter = l), f && (o.sheetSelection = f);
979
+ for (const s of [
756
980
  "includeFilters",
757
981
  "includeTimestamp",
758
982
  "includeHeaders",
759
- "useFormattedValues"
983
+ "useFormattedValues",
984
+ "allowDownload"
760
985
  ])
761
- if (!(n[f] === void 0 || n[f] === null)) {
762
- if (typeof n[f] != "boolean") {
763
- c(e, `${t}.${f}`, "Expected a boolean.");
986
+ if (!(r[s] === void 0 || r[s] === null)) {
987
+ if (typeof r[s] != "boolean") {
988
+ c(e, `${n}.${s}`, "Expected a boolean.");
764
989
  continue;
765
990
  }
766
- o[f] = n[f];
991
+ o[s] = r[s];
767
992
  }
768
- for (const f of [
993
+ for (const s of [
769
994
  "currentSheetId",
770
995
  "currentSheetName",
771
996
  "filterLine",
@@ -773,15 +998,15 @@ function $e(r, t, e) {
773
998
  "cardType",
774
999
  "theme"
775
1000
  ]) {
776
- const p = y(
777
- n[f],
778
- `${t}.${f}`,
779
- l.id,
1001
+ const m = h(
1002
+ r[s],
1003
+ `${n}.${s}`,
1004
+ d.id,
780
1005
  e
781
1006
  );
782
- p && (o[f] = p);
1007
+ m && (o[s] = m);
783
1008
  }
784
- for (const f of [
1009
+ for (const s of [
785
1010
  "filterValues",
786
1011
  "inlineFilterValues",
787
1012
  "sheetFilterValues",
@@ -789,293 +1014,256 @@ function $e(r, t, e) {
789
1014
  "cardControlDefinitions",
790
1015
  "controlBindings"
791
1016
  ]) {
792
- const p = Ie(n[f], `${t}.${f}`, e);
793
- p && (o[f] = p);
1017
+ const m = Oe(r[s], `${n}.${s}`, e);
1018
+ m && (o[s] = m);
794
1019
  }
795
- for (const f of [
1020
+ for (const s of [
796
1021
  "controlValues",
797
1022
  "tablePreferences",
798
1023
  "dashboardInputExecutionSnapshot"
799
1024
  ]) {
800
- const p = be(n[f], `${t}.${f}`, e);
801
- p && (o[f] = p);
1025
+ const m = Fe(r[s], `${n}.${s}`, e);
1026
+ m && (o[s] = m);
802
1027
  }
803
1028
  return Object.keys(o).length > 0 ? o : void 0;
804
1029
  }
805
- function T(r, t, e, n) {
806
- const o = y(
807
- t,
1030
+ function _(t, n, e, r) {
1031
+ const o = h(
1032
+ n,
808
1033
  e,
809
- l.attachmentTitle,
810
- n
1034
+ d.attachmentTitle,
1035
+ r
811
1036
  );
812
- return o && (r.title = o), r;
1037
+ return o && (t.title = o), t;
813
1038
  }
814
- function A(r, t, e, n) {
815
- const o = $e(t, e, n);
816
- return o && (r.settings = o), r;
1039
+ function B(t, n, e, r) {
1040
+ const o = Re(n, e, r);
1041
+ return o && (t.settings = o), t;
817
1042
  }
818
- function Ee(r, t, e) {
819
- const n = `attachments.${t}`, o = h(r, n, e), i = o.type;
1043
+ function Ve(t, n, e) {
1044
+ const r = `attachments.${n}`, o = g(t, r, e), i = o.type;
820
1045
  if (i === "dashboard") {
821
- m(
1046
+ u(
822
1047
  o,
823
- n,
1048
+ r,
824
1049
  ["type", "dashboardId", "format", "title", "settings"],
825
1050
  e
826
1051
  );
827
- const a = T(
1052
+ const a = _(
828
1053
  {
829
1054
  type: "dashboard",
830
- dashboardId: u(
1055
+ dashboardId: y(
831
1056
  o.dashboardId,
832
- `${n}.dashboardId`,
833
- l.id,
1057
+ `${r}.dashboardId`,
1058
+ d.id,
834
1059
  e
835
1060
  ),
836
- format: x(o.format, `${n}.format`, ["pdf"], e)
1061
+ format: k(o.format, `${r}.format`, ["pdf"], e)
837
1062
  },
838
1063
  o.title,
839
- `${n}.title`,
1064
+ `${r}.title`,
840
1065
  e
841
1066
  );
842
- return A(a, o.settings, `${n}.settings`, e);
1067
+ return B(a, o.settings, `${r}.settings`, e);
843
1068
  }
844
1069
  if (i === "dashboard_sheet" || i === "document_sheet") {
845
- m(
1070
+ u(
846
1071
  o,
847
- n,
1072
+ r,
848
1073
  ["type", "dashboardId", "sheetId", "format", "title", "settings"],
849
1074
  e
850
1075
  );
851
- const a = T(
1076
+ const a = _(
852
1077
  {
853
1078
  type: i,
854
- dashboardId: u(
1079
+ dashboardId: y(
855
1080
  o.dashboardId,
856
- `${n}.dashboardId`,
857
- l.id,
1081
+ `${r}.dashboardId`,
1082
+ d.id,
858
1083
  e
859
1084
  ),
860
- sheetId: u(
1085
+ sheetId: y(
861
1086
  o.sheetId,
862
- `${n}.sheetId`,
863
- l.id,
1087
+ `${r}.sheetId`,
1088
+ d.id,
864
1089
  e
865
1090
  ),
866
- format: x(o.format, `${n}.format`, ["pdf"], e)
1091
+ format: k(o.format, `${r}.format`, ["pdf"], e)
867
1092
  },
868
1093
  o.title,
869
- `${n}.title`,
1094
+ `${r}.title`,
870
1095
  e
871
1096
  );
872
- return A(a, o.settings, `${n}.settings`, e);
873
- }
874
- if (i === "visual") {
875
- m(
876
- o,
877
- n,
878
- ["type", "dashboardId", "visualId", "format", "title", "settings"],
879
- e
880
- );
881
- const a = T(
882
- {
883
- type: "visual",
884
- dashboardId: u(
885
- o.dashboardId,
886
- `${n}.dashboardId`,
887
- l.id,
888
- e
889
- ),
890
- visualId: u(
891
- o.visualId,
892
- `${n}.visualId`,
893
- l.id,
894
- e
895
- ),
896
- format: x(
897
- o.format,
898
- `${n}.format`,
899
- ["pdf", "png"],
900
- e
901
- )
902
- },
903
- o.title,
904
- `${n}.title`,
905
- e
906
- );
907
- return A(a, o.settings, `${n}.settings`, e);
1097
+ return B(a, o.settings, `${r}.settings`, e);
908
1098
  }
909
1099
  if (i === "card") {
910
- m(
1100
+ u(
911
1101
  o,
912
- n,
1102
+ r,
913
1103
  ["type", "dashboardId", "cardId", "format", "title", "settings"],
914
1104
  e
915
1105
  );
916
- const a = T(
1106
+ const a = _(
917
1107
  {
918
1108
  type: "card",
919
- dashboardId: u(
1109
+ dashboardId: y(
920
1110
  o.dashboardId,
921
- `${n}.dashboardId`,
922
- l.id,
1111
+ `${r}.dashboardId`,
1112
+ d.id,
923
1113
  e
924
1114
  ),
925
- cardId: u(
1115
+ cardId: y(
926
1116
  o.cardId,
927
- `${n}.cardId`,
928
- l.id,
1117
+ `${r}.cardId`,
1118
+ d.id,
929
1119
  e
930
1120
  ),
931
- format: x(
1121
+ format: k(
932
1122
  o.format,
933
- `${n}.format`,
934
- ["csv", "pdf", "png"],
1123
+ `${r}.format`,
1124
+ ["csv", "pdf"],
935
1125
  e
936
1126
  )
937
1127
  },
938
1128
  o.title,
939
- `${n}.title`,
1129
+ `${r}.title`,
940
1130
  e
941
1131
  );
942
- return A(a, o.settings, `${n}.settings`, e);
1132
+ return B(a, o.settings, `${r}.settings`, e);
943
1133
  }
944
1134
  return c(
945
1135
  e,
946
- `${n}.type`,
947
- "Expected dashboard, dashboard_sheet, document_sheet, visual, or card."
1136
+ `${r}.type`,
1137
+ "Expected dashboard, dashboard_sheet, document_sheet, or card."
948
1138
  ), { type: "dashboard", dashboardId: "", format: "pdf" };
949
1139
  }
950
- function Ce(r) {
951
- switch (r.type) {
1140
+ function ze(t) {
1141
+ switch (t.type) {
952
1142
  case "dashboard":
953
- return `${r.type}:${r.dashboardId}:${r.format}`;
1143
+ return `${t.type}:${t.dashboardId}:${t.format}`;
954
1144
  case "dashboard_sheet":
955
1145
  case "document_sheet":
956
- return `${r.type}:${r.dashboardId}:${r.sheetId}:${r.format}`;
957
- case "visual":
958
- return `${r.type}:${r.dashboardId}:${r.visualId}:${r.format}`;
1146
+ return `${t.type}:${t.dashboardId}:${t.sheetId}:${t.format}`;
959
1147
  case "card":
960
- return `${r.type}:${r.dashboardId}:${r.cardId}:${r.format}`;
1148
+ return `${t.type}:${t.dashboardId}:${t.cardId}:${t.format}`;
961
1149
  }
962
1150
  }
963
- function G(r, t) {
964
- if (r == null)
1151
+ function W(t, n) {
1152
+ if (t == null)
965
1153
  return [];
966
- if (!Array.isArray(r))
967
- return c(t, "attachments", "Expected an array."), [];
968
- r.length > 20 && c(
969
- t,
1154
+ if (!Array.isArray(t))
1155
+ return c(n, "attachments", "Expected an array."), [];
1156
+ t.length > w && c(
1157
+ n,
970
1158
  "attachments",
971
- "Choose 20 attachments or fewer."
1159
+ `Choose ${w} attachments or fewer.`
972
1160
  );
973
- const e = r.slice(0, 20).map((o, i) => Ee(o, i, t)), n = /* @__PURE__ */ new Set();
1161
+ const e = t.slice(0, w).map((o, i) => Ve(o, i, n)), r = /* @__PURE__ */ new Set();
974
1162
  return e.forEach((o, i) => {
975
- const a = Ce(o);
976
- n.has(a) && c(t, `attachments.${i}`, "Duplicate attachment."), n.add(a);
1163
+ const a = ze(o);
1164
+ r.has(a) && c(n, `attachments.${i}`, "Duplicate attachment."), r.add(a);
977
1165
  }), e;
978
1166
  }
979
- function U(r, t) {
980
- if (r == null)
1167
+ function Z(t, n) {
1168
+ if (t == null)
981
1169
  return;
982
- const e = h(r, "limits", t);
983
- m(e, "limits", Object.keys(L), t);
984
- const n = {};
985
- return Object.keys(L).forEach((o) => {
1170
+ const e = g(t, "limits", n);
1171
+ u(e, "limits", Object.keys(D), n);
1172
+ const r = {};
1173
+ return Object.keys(D).forEach((o) => {
986
1174
  const i = e[o];
987
1175
  if (i == null)
988
1176
  return;
989
- const a = L[o];
1177
+ const a = D[o];
990
1178
  if (typeof i != "number" || !Number.isInteger(i) || i < a.min || i > a.max) {
991
1179
  c(
992
- t,
1180
+ n,
993
1181
  `limits.${o}`,
994
1182
  `Expected an integer between ${a.min} and ${a.max}.`
995
1183
  );
996
1184
  return;
997
1185
  }
998
- n[o] = i;
999
- }), Object.keys(n).length > 0 ? n : void 0;
1186
+ r[o] = i;
1187
+ }), Object.keys(r).length > 0 ? r : void 0;
1000
1188
  }
1001
- function B(r) {
1002
- if (r.length > 0)
1003
- throw new S(r);
1189
+ function O(t) {
1190
+ if (t.length > 0)
1191
+ throw new A(t);
1004
1192
  }
1005
- function H(r, t, e) {
1006
- r.type === "none" && t.length === 0 && c(
1193
+ function Y(t, n, e) {
1194
+ !(t.type === "generated_analysis" || t.type === "custom_message" && !!t.message.trim()) && n.length === 0 && c(
1007
1195
  e,
1008
1196
  "body",
1009
1197
  "Add briefing instructions, a custom message, or at least one attachment."
1010
1198
  );
1011
1199
  }
1012
- function X(r) {
1013
- const t = [], e = h(r, "jobConfig", t);
1014
- m(
1200
+ function J(t) {
1201
+ const n = [], e = g(t, "jobConfig", n);
1202
+ u(
1015
1203
  e,
1016
1204
  "jobConfig",
1017
1205
  ["kind", "source", "body", "attachments", "presentation", "limits"],
1018
- t
1019
- ), e.kind !== w && c(t, "kind", "Expected BRIEFING.");
1020
- const n = q(e.source, t), o = j(e.body, t), i = G(e.attachments, t), a = K(e.presentation, t), d = U(e.limits, t);
1021
- return H(o, i, t), B(t), {
1022
- kind: w,
1023
- source: n,
1206
+ n
1207
+ ), e.kind !== L && c(n, "kind", "Expected BRIEFING.");
1208
+ const r = K(e.source, n), o = G(e.body, n), i = W(e.attachments, n), a = H(e.presentation, n), l = Z(e.limits, n);
1209
+ return Y(o, i, n), O(n), {
1210
+ kind: L,
1211
+ source: r,
1024
1212
  body: o,
1025
1213
  attachments: i,
1026
1214
  presentation: a,
1027
- ...d ? { limits: d } : {}
1215
+ ...l ? { limits: l } : {}
1028
1216
  };
1029
1217
  }
1030
- function Oe(r) {
1031
- return X({
1032
- ...r,
1033
- kind: w
1218
+ function ct(t) {
1219
+ return J({
1220
+ ...t,
1221
+ kind: L
1034
1222
  });
1035
1223
  }
1036
- function N(r, t, e, n = "deliveryConfig.recipients") {
1037
- const o = `${n}.${t}`, i = h(r, o, e), a = i.type;
1224
+ function F(t, n, e, r = "deliveryConfig.recipients") {
1225
+ const o = `${r}.${n}`, i = g(t, o, e), a = i.type;
1038
1226
  if (a === "email") {
1039
- m(i, o, ["type", "address", "name"], e);
1040
- const d = u(
1227
+ u(i, o, ["type", "address", "name"], e);
1228
+ const l = y(
1041
1229
  i.address,
1042
1230
  `${o}.address`,
1043
- l.id,
1231
+ d.id,
1044
1232
  e
1045
- ), s = y(
1233
+ ), f = h(
1046
1234
  i.name,
1047
1235
  `${o}.name`,
1048
- l.attachmentTitle,
1236
+ d.attachmentTitle,
1049
1237
  e
1050
1238
  );
1051
- return d && !se(d) && c(e, `${o}.address`, "Email address is invalid."), {
1239
+ return l && !xe(l) && c(e, `${o}.address`, "Email address is invalid."), {
1052
1240
  type: "email",
1053
- address: d,
1054
- ...s ? { name: s } : {}
1241
+ address: l,
1242
+ ...f ? { name: f } : {}
1055
1243
  };
1056
1244
  }
1057
- return a === "user" ? (m(i, o, ["type", "userId"], e), {
1245
+ return a === "user" ? (u(i, o, ["type", "userId"], e), {
1058
1246
  type: "user",
1059
- userId: u(
1247
+ userId: y(
1060
1248
  i.userId,
1061
1249
  `${o}.userId`,
1062
- l.id,
1250
+ d.id,
1063
1251
  e
1064
1252
  )
1065
- }) : a === "tenant_user" ? (m(i, o, ["type", "tenantUserId"], e), {
1253
+ }) : a === "tenant_user" ? (u(i, o, ["type", "tenantUserId"], e), {
1066
1254
  type: "tenant_user",
1067
- tenantUserId: u(
1255
+ tenantUserId: y(
1068
1256
  i.tenantUserId,
1069
1257
  `${o}.tenantUserId`,
1070
- l.id,
1258
+ d.id,
1071
1259
  e
1072
1260
  )
1073
- }) : a === "group" ? (m(i, o, ["type", "groupId"], e), {
1261
+ }) : a === "group" ? (u(i, o, ["type", "groupId"], e), {
1074
1262
  type: "group",
1075
- groupId: u(
1263
+ groupId: y(
1076
1264
  i.groupId,
1077
1265
  `${o}.groupId`,
1078
- l.id,
1266
+ d.id,
1079
1267
  e
1080
1268
  )
1081
1269
  }) : (c(
@@ -1084,122 +1272,122 @@ function N(r, t, e, n = "deliveryConfig.recipients") {
1084
1272
  "Expected email, user, tenant_user, or group."
1085
1273
  ), { type: "email", address: "" });
1086
1274
  }
1087
- function xe(r, t) {
1088
- return r == null ? [] : Array.isArray(r) ? r.map(
1089
- (e, n) => N(e, n, t)
1090
- ) : (c(t, "deliveryConfig.recipients", "Expected an array."), []);
1275
+ function Me(t, n) {
1276
+ return t == null ? [] : Array.isArray(t) ? t.map(
1277
+ (e, r) => F(e, r, n)
1278
+ ) : (c(n, "deliveryConfig.recipients", "Expected an array."), []);
1091
1279
  }
1092
- function Te(r, t) {
1093
- if (!Array.isArray(r))
1094
- return c(t, "deliveryConfig.channels", "Expected an array."), [];
1280
+ function Pe(t, n) {
1281
+ if (!Array.isArray(t))
1282
+ return c(n, "deliveryConfig.channels", "Expected an array."), [];
1095
1283
  const e = [];
1096
- return r.forEach((n, o) => {
1097
- if (!J(n)) {
1284
+ return t.forEach((r, o) => {
1285
+ if (!X(r)) {
1098
1286
  c(
1099
- t,
1287
+ n,
1100
1288
  `deliveryConfig.channels.${o}`,
1101
1289
  "Expected EMAIL, WEBHOOK, SLACK, IN_APP, or TELEGRAM."
1102
1290
  );
1103
1291
  return;
1104
1292
  }
1105
- e.includes(n) || e.push(n);
1293
+ e.includes(r) || e.push(r);
1106
1294
  }), e;
1107
1295
  }
1108
- function Ae(r, t, e) {
1109
- if (r == null)
1296
+ function Ue(t, n, e) {
1297
+ if (t == null)
1110
1298
  return;
1111
- const n = h(r, t, e), o = {};
1112
- return Object.entries(n).forEach(([i, a]) => {
1299
+ const r = g(t, n, e), o = {};
1300
+ return Object.entries(r).forEach(([i, a]) => {
1113
1301
  if (typeof a != "string") {
1114
- c(e, `${t}.${i}`, "Expected a string.");
1302
+ c(e, `${n}.${i}`, "Expected a string.");
1115
1303
  return;
1116
1304
  }
1117
1305
  o[i] = a.trim();
1118
1306
  }), Object.keys(o).length > 0 ? o : void 0;
1119
1307
  }
1120
- function Se(r, t, e) {
1121
- if (r == null)
1308
+ function je(t, n, e) {
1309
+ if (t == null)
1122
1310
  return;
1123
- const n = h(r, t, e);
1124
- m(
1311
+ const r = g(t, n, e);
1312
+ u(
1313
+ r,
1125
1314
  n,
1126
- t,
1127
1315
  ["url", "method", "headers", "secretEncrypted"],
1128
1316
  e
1129
1317
  );
1130
- const o = n.method === void 0 || n.method === null ? void 0 : x(n.method, `${t}.method`, ["POST", "PUT"], e), i = Ae(n.headers, `${t}.headers`, e), a = y(
1131
- n.secretEncrypted,
1132
- `${t}.secretEncrypted`,
1318
+ const o = r.method === void 0 || r.method === null ? void 0 : k(r.method, `${n}.method`, ["POST", "PUT"], e), i = Ue(r.headers, `${n}.headers`, e), a = h(
1319
+ r.secretEncrypted,
1320
+ `${n}.secretEncrypted`,
1133
1321
  2e3,
1134
1322
  e
1135
1323
  );
1136
1324
  return {
1137
- url: u(n.url, `${t}.url`, 2e3, e),
1325
+ url: y(r.url, `${n}.url`, 2e3, e),
1138
1326
  ...o ? { method: o } : {},
1139
1327
  ...i ? { headers: i } : {},
1140
1328
  ...a ? { secretEncrypted: a } : {}
1141
1329
  };
1142
1330
  }
1143
- function ke(r, t, e) {
1144
- const n = h(r, t, e), o = n.type;
1331
+ function qe(t, n, e) {
1332
+ const r = g(t, n, e), o = r.type;
1145
1333
  if (o === "channel") {
1146
- m(
1334
+ u(
1335
+ r,
1147
1336
  n,
1148
- t,
1149
1337
  ["type", "channelId", "channelName", "isPrivate"],
1150
1338
  e
1151
1339
  );
1152
- const i = y(
1153
- n.channelName,
1154
- `${t}.channelName`,
1155
- l.attachmentTitle,
1340
+ const i = h(
1341
+ r.channelName,
1342
+ `${n}.channelName`,
1343
+ d.attachmentTitle,
1156
1344
  e
1157
- ), a = n.isPrivate === void 0 || n.isPrivate === null ? void 0 : C(
1158
- n.isPrivate,
1345
+ ), a = r.isPrivate === void 0 || r.isPrivate === null ? void 0 : T(
1346
+ r.isPrivate,
1159
1347
  !1,
1160
- `${t}.isPrivate`,
1348
+ `${n}.isPrivate`,
1161
1349
  e
1162
1350
  );
1163
1351
  return {
1164
1352
  type: "channel",
1165
- channelId: u(
1166
- n.channelId,
1167
- `${t}.channelId`,
1168
- l.id,
1353
+ channelId: y(
1354
+ r.channelId,
1355
+ `${n}.channelId`,
1356
+ d.id,
1169
1357
  e
1170
1358
  ),
1171
1359
  ...i ? { channelName: i } : {},
1172
1360
  ...a !== void 0 ? { isPrivate: a } : {}
1173
1361
  };
1174
1362
  }
1175
- return o === "dm" ? (m(n, t, ["type", "recipient"], e), c(
1363
+ return o === "dm" ? (u(r, n, ["type", "recipient"], e), c(
1176
1364
  e,
1177
- `${t}.type`,
1365
+ `${n}.type`,
1178
1366
  "Slack DM delivery is not supported in V1."
1179
1367
  ), {
1180
1368
  type: "dm",
1181
- recipient: N(n.recipient, 0, e, `${t}.recipient`)
1182
- }) : (c(e, `${t}.type`, "Expected channel."), { type: "channel", channelId: "" });
1369
+ recipient: F(r.recipient, 0, e, `${n}.recipient`)
1370
+ }) : (c(e, `${n}.type`, "Expected channel."), { type: "channel", channelId: "" });
1183
1371
  }
1184
- function _e(r, t, e) {
1185
- if (r == null)
1372
+ function Ke(t, n, e) {
1373
+ if (t == null)
1186
1374
  return;
1187
- if (!Array.isArray(r)) {
1188
- c(e, t, "Expected an array.");
1375
+ if (!Array.isArray(t)) {
1376
+ c(e, n, "Expected an array.");
1189
1377
  return;
1190
1378
  }
1191
- const n = r.map(
1192
- (o, i) => N(o, i, e, t)
1379
+ const r = t.map(
1380
+ (o, i) => F(o, i, e, n)
1193
1381
  );
1194
- return n.length > 0 ? n : void 0;
1382
+ return r.length > 0 ? r : void 0;
1195
1383
  }
1196
- function Le(r, t, e) {
1197
- if (r == null)
1384
+ function Ge(t, n, e) {
1385
+ if (t == null)
1198
1386
  return;
1199
- const n = h(r, t, e);
1200
- m(
1387
+ const r = g(t, n, e);
1388
+ u(
1389
+ r,
1201
1390
  n,
1202
- t,
1203
1391
  [
1204
1392
  "destination",
1205
1393
  "threadMentions",
@@ -1209,43 +1397,43 @@ function Le(r, t, e) {
1209
1397
  ],
1210
1398
  e
1211
1399
  );
1212
- const o = _e(
1213
- n.threadMentions,
1214
- `${t}.threadMentions`,
1400
+ const o = Ke(
1401
+ r.threadMentions,
1402
+ `${n}.threadMentions`,
1215
1403
  e
1216
- ), i = C(
1217
- n.postThreadDetail,
1404
+ ), i = T(
1405
+ r.postThreadDetail,
1218
1406
  !0,
1219
- `${t}.postThreadDetail`,
1407
+ `${n}.postThreadDetail`,
1220
1408
  e
1221
- ), a = C(
1222
- n.includeDashboardLink,
1409
+ ), a = T(
1410
+ r.includeDashboardLink,
1223
1411
  !0,
1224
- `${t}.includeDashboardLink`,
1412
+ `${n}.includeDashboardLink`,
1225
1413
  e
1226
- ), d = C(
1227
- n.includeBriefingLink,
1414
+ ), l = T(
1415
+ r.includeBriefingLink,
1228
1416
  !0,
1229
- `${t}.includeBriefingLink`,
1417
+ `${n}.includeBriefingLink`,
1230
1418
  e
1231
1419
  );
1232
1420
  return {
1233
- destination: ke(
1234
- n.destination,
1235
- `${t}.destination`,
1421
+ destination: qe(
1422
+ r.destination,
1423
+ `${n}.destination`,
1236
1424
  e
1237
1425
  ),
1238
1426
  ...o ? { threadMentions: o } : {},
1239
- ...n.postThreadDetail !== void 0 ? { postThreadDetail: i } : {},
1240
- ...n.includeDashboardLink !== void 0 ? { includeDashboardLink: a } : {},
1241
- ...n.includeBriefingLink !== void 0 ? { includeBriefingLink: d } : {}
1427
+ ...r.postThreadDetail !== void 0 ? { postThreadDetail: i } : {},
1428
+ ...r.includeDashboardLink !== void 0 ? { includeDashboardLink: a } : {},
1429
+ ...r.includeBriefingLink !== void 0 ? { includeBriefingLink: l } : {}
1242
1430
  };
1243
1431
  }
1244
- function we(r, t, e) {
1245
- const n = h(r, t, e);
1246
- m(
1432
+ function He(t, n, e) {
1433
+ const r = g(t, n, e);
1434
+ u(
1435
+ r,
1247
1436
  n,
1248
- t,
1249
1437
  [
1250
1438
  "subjectOverride",
1251
1439
  "titleOverride",
@@ -1258,109 +1446,109 @@ function we(r, t, e) {
1258
1446
  e
1259
1447
  );
1260
1448
  const o = E(
1261
- n.formatProfile,
1262
- `${t}.formatProfile`,
1263
- oe,
1449
+ r.formatProfile,
1450
+ `${n}.formatProfile`,
1451
+ be,
1264
1452
  "concise, balanced, or detailed",
1265
1453
  e
1266
- ), i = y(
1267
- n.subjectOverride,
1268
- `${t}.subjectOverride`,
1454
+ ), i = h(
1455
+ r.subjectOverride,
1456
+ `${n}.subjectOverride`,
1269
1457
  500,
1270
1458
  e
1271
- ), a = y(
1272
- n.titleOverride,
1273
- `${t}.titleOverride`,
1459
+ ), a = h(
1460
+ r.titleOverride,
1461
+ `${n}.titleOverride`,
1274
1462
  500,
1275
1463
  e
1276
- ), d = y(
1277
- n.summaryOverride,
1278
- `${t}.summaryOverride`,
1464
+ ), l = h(
1465
+ r.summaryOverride,
1466
+ `${n}.summaryOverride`,
1279
1467
  2e3,
1280
1468
  e
1281
- ), s = C(
1282
- n.actionBlockVisible,
1469
+ ), f = T(
1470
+ r.actionBlockVisible,
1283
1471
  !0,
1284
- `${t}.actionBlockVisible`,
1472
+ `${n}.actionBlockVisible`,
1285
1473
  e
1286
- ), f = Se(
1287
- n.webhookConfig,
1288
- `${t}.webhookConfig`,
1474
+ ), s = je(
1475
+ r.webhookConfig,
1476
+ `${n}.webhookConfig`,
1289
1477
  e
1290
- ), p = Le(
1291
- n.slackConfig,
1292
- `${t}.slackConfig`,
1478
+ ), m = Ge(
1479
+ r.slackConfig,
1480
+ `${n}.slackConfig`,
1293
1481
  e
1294
1482
  );
1295
1483
  return {
1296
1484
  ...o ? { formatProfile: o } : {},
1297
1485
  ...i ? { subjectOverride: i } : {},
1298
1486
  ...a ? { titleOverride: a } : {},
1299
- ...d ? { summaryOverride: d } : {},
1300
- ...n.actionBlockVisible !== void 0 ? { actionBlockVisible: s } : {},
1301
- ...p ? { slackConfig: p } : {},
1302
- ...f ? { webhookConfig: f } : {}
1487
+ ...l ? { summaryOverride: l } : {},
1488
+ ...r.actionBlockVisible !== void 0 ? { actionBlockVisible: f } : {},
1489
+ ...m ? { slackConfig: m } : {},
1490
+ ...s ? { webhookConfig: s } : {}
1303
1491
  };
1304
1492
  }
1305
- function Ve(r, t) {
1306
- if (r == null)
1493
+ function We(t, n) {
1494
+ if (t == null)
1307
1495
  return;
1308
- const e = h(r, "deliveryConfig.channelConfigs", t), n = {};
1496
+ const e = g(t, "deliveryConfig.channelConfigs", n), r = {};
1309
1497
  return Object.entries(e).forEach(([o, i]) => {
1310
- if (!J(o)) {
1498
+ if (!X(o)) {
1311
1499
  c(
1312
- t,
1500
+ n,
1313
1501
  `deliveryConfig.channelConfigs.${o}`,
1314
1502
  "Expected a supported delivery channel."
1315
1503
  );
1316
1504
  return;
1317
1505
  }
1318
- n[o] = we(
1506
+ r[o] = He(
1319
1507
  i,
1320
1508
  `deliveryConfig.channelConfigs.${o}`,
1321
- t
1509
+ n
1322
1510
  );
1323
- }), Object.keys(n).length > 0 ? n : void 0;
1511
+ }), Object.keys(r).length > 0 ? r : void 0;
1324
1512
  }
1325
- function Be(r, t) {
1326
- var s, f, p;
1327
- if (r == null)
1513
+ function Ze(t, n) {
1514
+ var f, s, m;
1515
+ if (t == null)
1328
1516
  return null;
1329
- const e = h(r, "deliveryConfig", t);
1330
- m(
1517
+ const e = g(t, "deliveryConfig", n);
1518
+ u(
1331
1519
  e,
1332
1520
  "deliveryConfig",
1333
1521
  ["recipients", "channels", "channelConfigs"],
1334
- t
1522
+ n
1335
1523
  );
1336
- const n = Ve(e.channelConfigs, t), o = xe(e.recipients, t), i = Te(e.channels, t), a = ((f = (s = n == null ? void 0 : n.SLACK) == null ? void 0 : s.slackConfig) == null ? void 0 : f.destination.type) === "channel" && !!n.SLACK.slackConfig.destination.channelId.trim();
1524
+ const r = We(e.channelConfigs, n), o = Me(e.recipients, n), i = Pe(e.channels, n), a = ((s = (f = r == null ? void 0 : r.SLACK) == null ? void 0 : f.slackConfig) == null ? void 0 : s.destination.type) === "channel" && !!r.SLACK.slackConfig.destination.channelId.trim();
1337
1525
  return i.some(
1338
1526
  (I) => I !== "SLACK"
1339
1527
  ) && o.length === 0 && c(
1340
- t,
1528
+ n,
1341
1529
  "deliveryConfig.recipients",
1342
1530
  "Add at least one recipient or remove delivery config."
1343
1531
  ), i.length === 0 && c(
1344
- t,
1532
+ n,
1345
1533
  "deliveryConfig.channels",
1346
1534
  "Choose at least one delivery channel or remove delivery config."
1347
1535
  ), i.includes("SLACK") && !a && c(
1348
- t,
1536
+ n,
1349
1537
  "deliveryConfig.channelConfigs.SLACK.slackConfig.destination.channelId",
1350
1538
  "Choose a Slack channel destination."
1351
- ), !i.includes("SLACK") && ((p = n == null ? void 0 : n.SLACK) != null && p.slackConfig) && c(
1352
- t,
1539
+ ), !i.includes("SLACK") && ((m = r == null ? void 0 : r.SLACK) != null && m.slackConfig) && c(
1540
+ n,
1353
1541
  "deliveryConfig.channelConfigs.SLACK",
1354
1542
  "Slack config requires SLACK in deliveryConfig.channels."
1355
1543
  ), {
1356
1544
  recipients: o,
1357
1545
  channels: i,
1358
- ...n ? { channelConfigs: n } : {}
1546
+ ...r ? { channelConfigs: r } : {}
1359
1547
  };
1360
1548
  }
1361
- function z(r) {
1362
- const t = [], e = h(r, "draft", t);
1363
- m(
1549
+ function R(t) {
1550
+ const n = [], e = g(t, "draft", n);
1551
+ u(
1364
1552
  e,
1365
1553
  "draft",
1366
1554
  [
@@ -1376,80 +1564,93 @@ function z(r) {
1376
1564
  "limits",
1377
1565
  "deliveryConfig"
1378
1566
  ],
1379
- t
1567
+ n
1380
1568
  );
1381
- const n = u(
1569
+ const r = y(
1382
1570
  e.name,
1383
1571
  "name",
1384
- l.name,
1385
- t
1386
- ), o = y(
1572
+ d.name,
1573
+ n
1574
+ ), o = h(
1387
1575
  e.description,
1388
1576
  "description",
1389
- l.description,
1390
- t
1391
- ) ?? null, i = y(e.scheduleExpr, "scheduleExpr", 500, t) ?? null, a = y(e.timezone, "timezone", 200, t) ?? "UTC", d = fe(e.status, t), s = q(e.source, t), f = j(e.body, t), p = G(e.attachments, t), I = K(e.presentation, t), b = U(e.limits, t), v = Be(e.deliveryConfig, t);
1392
- return H(f, p, t), B(t), {
1393
- name: n,
1577
+ d.description,
1578
+ n
1579
+ ) ?? null, i = h(e.scheduleExpr, "scheduleExpr", 500, n) ?? null, a = h(e.timezone, "timezone", 200, n) ?? "UTC", l = Ae(e.status, n), f = K(e.source, n), s = G(e.body, n), m = W(e.attachments, n), I = H(e.presentation, n), v = Z(e.limits, n), p = Ze(e.deliveryConfig, n);
1580
+ return Y(s, m, n), O(n), {
1581
+ name: r,
1394
1582
  description: o,
1395
- status: d,
1583
+ status: l,
1396
1584
  scheduleExpr: i,
1397
1585
  timezone: a,
1398
- source: s,
1399
- body: f,
1400
- attachments: p,
1586
+ source: f,
1587
+ body: s,
1588
+ attachments: m,
1401
1589
  presentation: I,
1402
- ...b ? { limits: b } : {},
1403
- deliveryConfig: v
1590
+ ...v ? { limits: v } : {},
1591
+ deliveryConfig: p
1404
1592
  };
1405
1593
  }
1406
- function Re(r) {
1407
- return z(r);
1594
+ function lt(t) {
1595
+ return R(t);
1408
1596
  }
1409
- function Fe(r) {
1410
- return z(r);
1597
+ function dt(t) {
1598
+ return R(t);
1411
1599
  }
1412
- function Me(r) {
1600
+ function st(t) {
1413
1601
  try {
1414
- return { valid: !0, value: z(r), issues: [] };
1415
- } catch (t) {
1416
- if (t instanceof S)
1417
- return { valid: !1, issues: t.issues };
1418
- throw t;
1602
+ return { valid: !0, value: R(t), issues: [] };
1603
+ } catch (n) {
1604
+ if (n instanceof A)
1605
+ return { valid: !1, issues: n.issues };
1606
+ throw n;
1419
1607
  }
1420
1608
  }
1421
- function Pe(r) {
1609
+ function ft(t) {
1422
1610
  try {
1423
- return { valid: !0, value: X(r), issues: [] };
1424
- } catch (t) {
1425
- if (t instanceof S)
1426
- return { valid: !1, issues: t.issues };
1427
- throw t;
1611
+ return { valid: !0, value: J(t), issues: [] };
1612
+ } catch (n) {
1613
+ if (n instanceof A)
1614
+ return { valid: !1, issues: n.issues };
1615
+ throw n;
1428
1616
  }
1429
1617
  }
1430
- function qe(r) {
1431
- return typeof r == "string" && M.has(r);
1618
+ function ut(t) {
1619
+ return typeof t == "string" && j.has(t);
1432
1620
  }
1433
- function J(r) {
1434
- return typeof r == "string" && Q.has(r);
1621
+ function X(t) {
1622
+ return typeof t == "string" && pe.has(t);
1435
1623
  }
1436
1624
  export {
1437
- Z as BRIEFING_ARTIFACT_FORMATS,
1438
- g as BRIEFING_CONTENT_LIMITS,
1439
- w as BRIEFING_KIND,
1440
- l as BRIEFING_TEXT_LIMITS,
1441
- S as BriefingContractError,
1442
- V as DEFAULT_BRIEFING_ARTIFACT_FORMATS,
1443
- ze as MAX_BRIEFING_ATTACHMENTS,
1444
- Oe as buildBriefingJobConfig,
1445
- Re as buildCreateBriefingRequest,
1446
- Fe as buildUpdateBriefingRequest,
1447
- qe as isBriefingArtifactFormat,
1448
- J as isBriefingDeliveryChannel,
1449
- ge as normalizeBriefingContentDocument,
1450
- z as normalizeBriefingDraft,
1451
- X as normalizeBriefingJobConfig,
1452
- De as validateBriefingContentDocument,
1453
- Me as validateBriefingDraft,
1454
- Pe as validateBriefingJobConfig
1625
+ me as BRIEFING_ARTIFACT_FORMATS,
1626
+ b as BRIEFING_CONTENT_LIMITS,
1627
+ L as BRIEFING_KIND,
1628
+ d as BRIEFING_TEXT_LIMITS,
1629
+ A as BriefingContractError,
1630
+ N as DEFAULT_BRIEFING_ARTIFACT_FORMATS,
1631
+ Xe as DEFAULT_BRIEFING_SCHEDULE,
1632
+ w as MAX_BRIEFING_ATTACHMENTS,
1633
+ ct as buildBriefingJobConfig,
1634
+ et as buildBriefingScheduleExpr,
1635
+ lt as buildCreateBriefingRequest,
1636
+ dt as buildUpdateBriefingRequest,
1637
+ rt as canCreateBriefingForUser,
1638
+ tt as describeBriefingSchedule,
1639
+ nt as getBriefingCardAttachmentCapability,
1640
+ de as getBriefingCardAttachmentFormats,
1641
+ ot as getBriefingCreationIntents,
1642
+ ue as getBriefingDisplayTypeLabel,
1643
+ it as getBriefingPresentation,
1644
+ se as getDefaultBriefingCardAttachmentFormat,
1645
+ ut as isBriefingArtifactFormat,
1646
+ X as isBriefingDeliveryChannel,
1647
+ fe as isEmailOnlyBriefingDelivery,
1648
+ Qe as isValidBriefingTimezone,
1649
+ Ne as normalizeBriefingContentDocument,
1650
+ R as normalizeBriefingDraft,
1651
+ J as normalizeBriefingJobConfig,
1652
+ oe as parseBriefingScheduleExpr,
1653
+ at as validateBriefingContentDocument,
1654
+ st as validateBriefingDraft,
1655
+ ft as validateBriefingJobConfig
1455
1656
  };