react-semaphor 0.1.318 → 0.1.319

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 (32) hide show
  1. package/dist/briefings/index.cjs +1 -1
  2. package/dist/briefings/index.js +497 -364
  3. package/dist/chunks/{calendar-preferences-dialog-DySStYHa.js → calendar-preferences-dialog-DLKB05SY.js} +1 -1
  4. package/dist/chunks/{calendar-preferences-dialog-DgpoCz1l.js → calendar-preferences-dialog-DPaVsZlk.js} +1 -1
  5. package/dist/chunks/{dashboard-briefing-launcher-BrUNYrwk.js → dashboard-briefing-launcher-DR_i0anv.js} +3164 -2537
  6. package/dist/chunks/dashboard-briefing-launcher-F3qKyuGr.js +106 -0
  7. package/dist/chunks/{dashboard-controls-BJb7QHvl.js → dashboard-controls-8J06Ot-K.js} +3 -3
  8. package/dist/chunks/{dashboard-controls-CDCpt8iB.js → dashboard-controls-BNAIucBl.js} +1 -1
  9. package/dist/chunks/{dashboard-json-BYEqzs6b.js → dashboard-json-B_Li7wO5.js} +1 -1
  10. package/dist/chunks/{dashboard-json-BjFw0Ktj.js → dashboard-json-DIsACFCO.js} +1 -1
  11. package/dist/chunks/{edit-dashboard-visual-IxtXVkBc.js → edit-dashboard-visual-2CBS2I52.js} +1 -1
  12. package/dist/chunks/{edit-dashboard-visual-VHlDJd5A.js → edit-dashboard-visual-BGnC2DH7.js} +3 -3
  13. package/dist/chunks/{index-CAWSZGCL.js → index-DYycYzpZ.js} +289 -288
  14. package/dist/chunks/{index-BhrZn1Zk.js → index-cxoegFH9.js} +75 -75
  15. package/dist/chunks/{resource-management-panel-X4zxZ4wq.js → resource-management-panel-BwNGxqrB.js} +1 -1
  16. package/dist/chunks/{resource-management-panel-0OlH_Gze.js → resource-management-panel-YtbKp2kW.js} +2 -2
  17. package/dist/chunks/{use-create-flow-overlay-state-DkZTa6eN.js → use-create-flow-overlay-state-DQZneUXL.js} +1 -1
  18. package/dist/chunks/{use-create-flow-overlay-state-WYyQFfGQ.js → use-create-flow-overlay-state-Qnd7FF6L.js} +2 -2
  19. package/dist/chunks/{use-visual-utils-2l8uDXRH.js → use-visual-utils-BdMhr0YR.js} +1 -1
  20. package/dist/chunks/{use-visual-utils-C8VR6_Cr.js → use-visual-utils-t73RlvjS.js} +1 -1
  21. package/dist/dashboard/index.cjs +1 -1
  22. package/dist/dashboard/index.js +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +5 -5
  25. package/dist/style.css +1 -1
  26. package/dist/surfboard/index.cjs +1 -1
  27. package/dist/surfboard/index.js +2 -2
  28. package/dist/types/briefings.d.ts +29 -1
  29. package/dist/types/main.d.ts +29 -1
  30. package/dist/types/types.d.ts +29 -1
  31. package/package.json +1 -1
  32. package/dist/chunks/dashboard-briefing-launcher-Fh6vC1S2.js +0 -101
@@ -1,7 +1,7 @@
1
- var P = Object.defineProperty;
2
- var G = (t, n, e) => n in t ? P(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
3
- var x = (t, n, e) => G(t, typeof n != "symbol" ? n + "" : n, e);
4
- const A = "BRIEFING", U = ["markdown", "html"], v = ["markdown"], ue = 20, c = {
1
+ var K = Object.defineProperty;
2
+ var G = (n, t, e) => t in n ? K(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var D = (n, t, e) => G(n, typeof t != "symbol" ? t + "" : t, e);
4
+ const A = "BRIEFING", q = ["markdown", "html"], S = ["markdown"], Ie = 20, l = {
5
5
  name: 500,
6
6
  description: 2e3,
7
7
  instruction: 5e4,
@@ -11,26 +11,33 @@ const A = "BRIEFING", U = ["markdown", "html"], v = ["markdown"], ue = 20, c = {
11
11
  presentationTone: 500,
12
12
  presentationFormat: 2e3,
13
13
  id: 500
14
- }, z = new Set(U), H = /* @__PURE__ */ new Set([
14
+ }, z = new Set(q), H = /* @__PURE__ */ new Set([
15
15
  "EMAIL",
16
16
  "WEBHOOK",
17
17
  "SLACK",
18
18
  "IN_APP",
19
19
  "TELEGRAM"
20
- ]), $ = {
20
+ ]), C = {
21
21
  maxToolCalls: { min: 1, max: 100 },
22
22
  maxRows: { min: 1, max: 1e5 },
23
23
  timeoutMs: { min: 1e3, max: 30 * 6e4 }
24
- }, q = /* @__PURE__ */ new Set([
24
+ }, U = /* @__PURE__ */ new Set([
25
25
  "letter",
26
26
  "legal",
27
27
  "a4",
28
28
  "a3",
29
29
  "tabloid"
30
- ]), K = /* @__PURE__ */ new Set([
30
+ ]), X = /* @__PURE__ */ new Set([
31
31
  "portrait",
32
32
  "landscape"
33
- ]), X = /* @__PURE__ */ new Set([",", ";", " "]), J = [
33
+ ]), J = /* @__PURE__ */ new Set([",", ";", " "]), W = /* @__PURE__ */ new Set([
34
+ "current",
35
+ "all"
36
+ ]), Y = /* @__PURE__ */ new Set([
37
+ "concise",
38
+ "balanced",
39
+ "detailed"
40
+ ]), Z = [
34
41
  "pageSize",
35
42
  "orientation",
36
43
  "includeFilters",
@@ -55,112 +62,112 @@ const A = "BRIEFING", U = ["markdown", "html"], v = ["markdown"], ue = 20, c = {
55
62
  "cardType",
56
63
  "theme"
57
64
  ];
58
- class S extends Error {
65
+ class T extends Error {
59
66
  constructor(e) {
60
67
  super(e.map((r) => `${r.field}: ${r.message}`).join("; "));
61
- x(this, "issues");
68
+ D(this, "issues");
62
69
  this.name = "BriefingContractError", this.issues = e;
63
70
  }
64
71
  }
65
- function F(t) {
66
- return typeof t == "object" && t !== null && !Array.isArray(t);
72
+ function x(n) {
73
+ return typeof n == "object" && n !== null && !Array.isArray(n);
67
74
  }
68
- function d(t, n, e) {
69
- t.push({ field: n, message: e });
75
+ function c(n, t, e) {
76
+ n.push({ field: t, message: e });
70
77
  }
71
- function m(t, n, e) {
72
- return F(t) ? t : (d(e, n, "Expected an object."), {});
78
+ function h(n, t, e) {
79
+ return x(n) ? n : (c(e, t, "Expected an object."), {});
73
80
  }
74
- function l(t, n, e, r) {
81
+ function s(n, t, e, r) {
75
82
  const o = new Set(e);
76
- Object.keys(t).forEach((i) => {
77
- o.has(i) || d(
83
+ Object.keys(n).forEach((i) => {
84
+ o.has(i) || c(
78
85
  r,
79
- n ? `${n}.${i}` : i,
86
+ t ? `${t}.${i}` : i,
80
87
  `Unexpected field "${i}".`
81
88
  );
82
89
  });
83
90
  }
84
- function f(t, n, e, r) {
85
- if (typeof t != "string")
86
- return d(r, n, "Expected a string."), "";
87
- const o = t.trim();
88
- return o ? (o.length > e && d(r, n, `Must be ${e} characters or fewer.`), o) : (d(r, n, "Required value cannot be empty."), "");
91
+ function u(n, t, e, r) {
92
+ if (typeof n != "string")
93
+ return c(r, t, "Expected a string."), "";
94
+ const o = n.trim();
95
+ return o ? (o.length > e && c(r, t, `Must be ${e} characters or fewer.`), o) : (c(r, t, "Required value cannot be empty."), "");
89
96
  }
90
- function u(t, n, e, r) {
91
- if (t == null)
97
+ function p(n, t, e, r) {
98
+ if (n == null)
92
99
  return;
93
- if (typeof t != "string") {
94
- d(r, n, "Expected a string.");
100
+ if (typeof n != "string") {
101
+ c(r, t, "Expected a string.");
95
102
  return;
96
103
  }
97
- const o = t.trim();
104
+ const o = n.trim();
98
105
  if (o)
99
- return o.length > e && d(r, n, `Must be ${e} characters or fewer.`), o;
106
+ return o.length > e && c(r, t, `Must be ${e} characters or fewer.`), o;
100
107
  }
101
- function C(t, n, e, r) {
102
- return t == null ? n : typeof t != "boolean" ? (d(r, e, "Expected a boolean."), n) : t;
108
+ function g(n, t, e, r) {
109
+ return n == null ? t : typeof n != "boolean" ? (c(r, e, "Expected a boolean."), t) : n;
103
110
  }
104
- function W(t, n) {
105
- return t == null ? "ACTIVE" : t === "ACTIVE" || t === "PAUSED" || t === "DISABLED" ? t : (d(n, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
111
+ function Q(n, t) {
112
+ return n == null ? "ACTIVE" : n === "ACTIVE" || n === "PAUSED" || n === "DISABLED" ? n : (c(t, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
106
113
  }
107
- function Y(t) {
108
- return t.includes("@") && t.includes(".") && !t.includes(" ");
114
+ function ee(n) {
115
+ return n.includes("@") && n.includes(".") && !n.includes(" ");
109
116
  }
110
- function O(t, n) {
111
- if (t == null)
117
+ function B(n, t) {
118
+ if (n == null)
112
119
  return { type: "project" };
113
- const e = m(t, "source", n), r = e.type;
114
- return r === "project" ? (l(e, "source", ["type"], n), { type: "project" }) : r === "dashboard" ? (l(e, "source", ["type", "dashboardId"], n), {
120
+ const e = h(n, "source", t), r = e.type;
121
+ return r === "project" ? (s(e, "source", ["type"], t), { type: "project" }) : r === "dashboard" ? (s(e, "source", ["type", "dashboardId"], t), {
115
122
  type: "dashboard",
116
- dashboardId: f(
123
+ dashboardId: u(
117
124
  e.dashboardId,
118
125
  "source.dashboardId",
119
- c.id,
120
- n
126
+ l.id,
127
+ t
121
128
  )
122
- }) : (d(n, "source.type", "Expected project or dashboard."), { type: "project" });
129
+ }) : (c(t, "source.type", "Expected project or dashboard."), { type: "project" });
123
130
  }
124
- function B(t, n) {
125
- const e = m(t, "body", n), r = e.type;
126
- return r === "generated_analysis" ? (l(e, "body", ["type", "instruction"], n), {
131
+ function F(n, t) {
132
+ const e = h(n, "body", t), r = e.type;
133
+ return r === "generated_analysis" ? (s(e, "body", ["type", "instruction"], t), {
127
134
  type: "generated_analysis",
128
- instruction: f(
135
+ instruction: u(
129
136
  e.instruction,
130
137
  "body.instruction",
131
- c.instruction,
132
- n
138
+ l.instruction,
139
+ t
133
140
  )
134
- }) : r === "custom_message" ? (l(e, "body", ["type", "message"], n), {
141
+ }) : r === "custom_message" ? (s(e, "body", ["type", "message"], t), {
135
142
  type: "custom_message",
136
- message: f(
143
+ message: u(
137
144
  e.message,
138
145
  "body.message",
139
- c.customMessage,
140
- n
146
+ l.customMessage,
147
+ t
141
148
  )
142
- }) : r === "none" ? (l(e, "body", ["type"], n), { type: "none" }) : (d(
143
- n,
149
+ }) : r === "none" ? (s(e, "body", ["type"], t), { type: "none" }) : (c(
150
+ t,
144
151
  "body.type",
145
152
  "Expected generated_analysis, custom_message, or none."
146
153
  ), { type: "none" });
147
154
  }
148
- function Z(t, n) {
149
- if (t == null)
150
- return [...v];
151
- if (!Array.isArray(t))
152
- return d(n, "presentation.artifactFormats", "Expected an array."), [...v];
153
- if (t.length === 0)
154
- return d(
155
- n,
155
+ function te(n, t) {
156
+ if (n == null)
157
+ return [...S];
158
+ if (!Array.isArray(n))
159
+ return c(t, "presentation.artifactFormats", "Expected an array."), [...S];
160
+ if (n.length === 0)
161
+ return c(
162
+ t,
156
163
  "presentation.artifactFormats",
157
164
  "Choose at least one artifact format."
158
165
  ), [];
159
166
  const e = [];
160
- return t.forEach((r, o) => {
167
+ return n.forEach((r, o) => {
161
168
  if (typeof r != "string" || !z.has(r)) {
162
- d(
163
- n,
169
+ c(
170
+ t,
164
171
  `presentation.artifactFormats.${o}`,
165
172
  "Expected markdown or html."
166
173
  );
@@ -169,125 +176,125 @@ function Z(t, n) {
169
176
  e.includes(r) || e.push(r);
170
177
  }), e;
171
178
  }
172
- function R(t, n) {
173
- if (t == null)
179
+ function O(n, t) {
180
+ if (n == null)
174
181
  return {
175
- artifactFormats: [...v],
182
+ artifactFormats: [...S],
176
183
  includeEvidence: !0,
177
184
  includeSql: !0
178
185
  };
179
- const e = m(t, "presentation", n);
180
- l(
186
+ const e = h(n, "presentation", t);
187
+ s(
181
188
  e,
182
189
  "presentation",
183
190
  ["artifactFormats", "includeEvidence", "includeSql", "audience", "tone", "format"],
184
- n
191
+ t
185
192
  );
186
193
  const r = {
187
- artifactFormats: Z(e.artifactFormats, n),
188
- includeEvidence: C(
194
+ artifactFormats: te(e.artifactFormats, t),
195
+ includeEvidence: g(
189
196
  e.includeEvidence,
190
197
  !0,
191
198
  "presentation.includeEvidence",
192
- n
199
+ t
193
200
  ),
194
- includeSql: C(
201
+ includeSql: g(
195
202
  e.includeSql,
196
203
  !0,
197
204
  "presentation.includeSql",
198
- n
205
+ t
199
206
  )
200
- }, o = u(
207
+ }, o = p(
201
208
  e.audience,
202
209
  "presentation.audience",
203
- c.presentationAudience,
204
- n
205
- ), i = u(
210
+ l.presentationAudience,
211
+ t
212
+ ), i = p(
206
213
  e.tone,
207
214
  "presentation.tone",
208
- c.presentationTone,
209
- n
210
- ), a = u(
215
+ l.presentationTone,
216
+ t
217
+ ), a = p(
211
218
  e.format,
212
219
  "presentation.format",
213
- c.presentationFormat,
214
- n
220
+ l.presentationFormat,
221
+ t
215
222
  );
216
223
  return o && (r.audience = o), i && (r.tone = i), a && (r.format = a), r;
217
224
  }
218
- function g(t, n, e, r) {
219
- return typeof t == "string" && e.includes(t) ? t : (d(r, n, `Expected ${e.join(" or ")}.`), e[0]);
225
+ function I(n, t, e, r) {
226
+ return typeof n == "string" && e.includes(n) ? n : (c(r, t, `Expected ${e.join(" or ")}.`), e[0]);
220
227
  }
221
- function I(t, n, e, r, o) {
222
- if (t != null) {
223
- if (typeof t == "string" && e.has(t))
224
- return t;
225
- d(o, n, `Expected ${r}.`);
228
+ function b(n, t, e, r, o) {
229
+ if (n != null) {
230
+ if (typeof n == "string" && e.has(n))
231
+ return n;
232
+ c(o, t, `Expected ${r}.`);
226
233
  }
227
234
  }
228
- function Q(t, n, e) {
229
- if (t != null) {
230
- if (!Array.isArray(t)) {
231
- d(e, n, "Expected an array.");
235
+ function ne(n, t, e) {
236
+ if (n != null) {
237
+ if (!Array.isArray(n)) {
238
+ c(e, t, "Expected an array.");
232
239
  return;
233
240
  }
234
- return t;
241
+ return n;
235
242
  }
236
243
  }
237
- function ee(t, n, e) {
238
- if (t != null) {
239
- if (!F(t)) {
240
- d(e, n, "Expected an object.");
244
+ function re(n, t, e) {
245
+ if (n != null) {
246
+ if (!x(n)) {
247
+ c(e, t, "Expected an object.");
241
248
  return;
242
249
  }
243
- return t;
250
+ return n;
244
251
  }
245
252
  }
246
- function te(t, n, e) {
247
- if (t == null)
253
+ function oe(n, t, e) {
254
+ if (n == null)
248
255
  return;
249
- const r = m(t, n, e);
250
- l(r, n, J, e);
251
- const o = {}, i = I(
256
+ const r = h(n, t, e);
257
+ s(r, t, Z, e);
258
+ const o = {}, i = b(
252
259
  r.pageSize,
253
- `${n}.pageSize`,
254
- q,
260
+ `${t}.pageSize`,
261
+ U,
255
262
  "letter, legal, a4, a3, or tabloid",
256
263
  e
257
- ), a = I(
264
+ ), a = b(
258
265
  r.orientation,
259
- `${n}.orientation`,
260
- K,
266
+ `${t}.orientation`,
267
+ X,
261
268
  "portrait or landscape",
262
269
  e
263
- ), p = I(
270
+ ), f = b(
264
271
  r.delimiter,
265
- `${n}.delimiter`,
266
- X,
272
+ `${t}.delimiter`,
273
+ J,
267
274
  "comma, semicolon, or tab",
268
275
  e
269
- ), y = I(
276
+ ), y = b(
270
277
  r.sheetSelection,
271
- `${n}.sheetSelection`,
272
- /* @__PURE__ */ new Set(["current", "all"]),
278
+ `${t}.sheetSelection`,
279
+ W,
273
280
  "current or all",
274
281
  e
275
282
  );
276
- i && (o.pageSize = i), a && (o.orientation = a), p && (o.delimiter = p), y && (o.sheetSelection = y);
277
- for (const s of [
283
+ i && (o.pageSize = i), a && (o.orientation = a), f && (o.delimiter = f), y && (o.sheetSelection = y);
284
+ for (const d of [
278
285
  "includeFilters",
279
286
  "includeTimestamp",
280
287
  "includeHeaders",
281
288
  "useFormattedValues"
282
289
  ])
283
- if (!(r[s] === void 0 || r[s] === null)) {
284
- if (typeof r[s] != "boolean") {
285
- d(e, `${n}.${s}`, "Expected a boolean.");
290
+ if (!(r[d] === void 0 || r[d] === null)) {
291
+ if (typeof r[d] != "boolean") {
292
+ c(e, `${t}.${d}`, "Expected a boolean.");
286
293
  continue;
287
294
  }
288
- o[s] = r[s];
295
+ o[d] = r[d];
289
296
  }
290
- for (const s of [
297
+ for (const d of [
291
298
  "currentSheetId",
292
299
  "currentSheetName",
293
300
  "filterLine",
@@ -295,15 +302,15 @@ function te(t, n, e) {
295
302
  "cardType",
296
303
  "theme"
297
304
  ]) {
298
- const h = u(
299
- r[s],
300
- `${n}.${s}`,
301
- c.id,
305
+ const m = p(
306
+ r[d],
307
+ `${t}.${d}`,
308
+ l.id,
302
309
  e
303
310
  );
304
- h && (o[s] = h);
311
+ m && (o[d] = m);
305
312
  }
306
- for (const s of [
313
+ for (const d of [
307
314
  "filterValues",
308
315
  "inlineFilterValues",
309
316
  "sheetFilterValues",
@@ -311,111 +318,111 @@ function te(t, n, e) {
311
318
  "cardControlDefinitions",
312
319
  "controlBindings"
313
320
  ]) {
314
- const h = Q(r[s], `${n}.${s}`, e);
315
- h && (o[s] = h);
321
+ const m = ne(r[d], `${t}.${d}`, e);
322
+ m && (o[d] = m);
316
323
  }
317
- for (const s of [
324
+ for (const d of [
318
325
  "controlValues",
319
326
  "tablePreferences",
320
327
  "dashboardInputExecutionSnapshot"
321
328
  ]) {
322
- const h = ee(r[s], `${n}.${s}`, e);
323
- h && (o[s] = h);
329
+ const m = re(r[d], `${t}.${d}`, e);
330
+ m && (o[d] = m);
324
331
  }
325
332
  return Object.keys(o).length > 0 ? o : void 0;
326
333
  }
327
- function b(t, n, e, r) {
328
- const o = u(
329
- n,
334
+ function E(n, t, e, r) {
335
+ const o = p(
336
+ t,
330
337
  e,
331
- c.attachmentTitle,
338
+ l.attachmentTitle,
332
339
  r
333
340
  );
334
- return o && (t.title = o), t;
341
+ return o && (n.title = o), n;
335
342
  }
336
- function E(t, n, e, r) {
337
- const o = te(n, e, r);
338
- return o && (t.settings = o), t;
343
+ function $(n, t, e, r) {
344
+ const o = oe(t, e, r);
345
+ return o && (n.settings = o), n;
339
346
  }
340
- function ne(t, n, e) {
341
- const r = `attachments.${n}`, o = m(t, r, e), i = o.type;
347
+ function ie(n, t, e) {
348
+ const r = `attachments.${t}`, o = h(n, r, e), i = o.type;
342
349
  if (i === "dashboard") {
343
- l(
350
+ s(
344
351
  o,
345
352
  r,
346
353
  ["type", "dashboardId", "format", "title", "settings"],
347
354
  e
348
355
  );
349
- const a = b(
356
+ const a = E(
350
357
  {
351
358
  type: "dashboard",
352
- dashboardId: f(
359
+ dashboardId: u(
353
360
  o.dashboardId,
354
361
  `${r}.dashboardId`,
355
- c.id,
362
+ l.id,
356
363
  e
357
364
  ),
358
- format: g(o.format, `${r}.format`, ["pdf"], e)
365
+ format: I(o.format, `${r}.format`, ["pdf"], e)
359
366
  },
360
367
  o.title,
361
368
  `${r}.title`,
362
369
  e
363
370
  );
364
- return E(a, o.settings, `${r}.settings`, e);
371
+ return $(a, o.settings, `${r}.settings`, e);
365
372
  }
366
373
  if (i === "dashboard_sheet" || i === "document_sheet") {
367
- l(
374
+ s(
368
375
  o,
369
376
  r,
370
377
  ["type", "dashboardId", "sheetId", "format", "title", "settings"],
371
378
  e
372
379
  );
373
- const a = b(
380
+ const a = E(
374
381
  {
375
382
  type: i,
376
- dashboardId: f(
383
+ dashboardId: u(
377
384
  o.dashboardId,
378
385
  `${r}.dashboardId`,
379
- c.id,
386
+ l.id,
380
387
  e
381
388
  ),
382
- sheetId: f(
389
+ sheetId: u(
383
390
  o.sheetId,
384
391
  `${r}.sheetId`,
385
- c.id,
392
+ l.id,
386
393
  e
387
394
  ),
388
- format: g(o.format, `${r}.format`, ["pdf"], e)
395
+ format: I(o.format, `${r}.format`, ["pdf"], e)
389
396
  },
390
397
  o.title,
391
398
  `${r}.title`,
392
399
  e
393
400
  );
394
- return E(a, o.settings, `${r}.settings`, e);
401
+ return $(a, o.settings, `${r}.settings`, e);
395
402
  }
396
403
  if (i === "visual") {
397
- l(
404
+ s(
398
405
  o,
399
406
  r,
400
407
  ["type", "dashboardId", "visualId", "format", "title", "settings"],
401
408
  e
402
409
  );
403
- const a = b(
410
+ const a = E(
404
411
  {
405
412
  type: "visual",
406
- dashboardId: f(
413
+ dashboardId: u(
407
414
  o.dashboardId,
408
415
  `${r}.dashboardId`,
409
- c.id,
416
+ l.id,
410
417
  e
411
418
  ),
412
- visualId: f(
419
+ visualId: u(
413
420
  o.visualId,
414
421
  `${r}.visualId`,
415
- c.id,
422
+ l.id,
416
423
  e
417
424
  ),
418
- format: g(
425
+ format: I(
419
426
  o.format,
420
427
  `${r}.format`,
421
428
  ["pdf", "png"],
@@ -426,31 +433,31 @@ function ne(t, n, e) {
426
433
  `${r}.title`,
427
434
  e
428
435
  );
429
- return E(a, o.settings, `${r}.settings`, e);
436
+ return $(a, o.settings, `${r}.settings`, e);
430
437
  }
431
438
  if (i === "card") {
432
- l(
439
+ s(
433
440
  o,
434
441
  r,
435
442
  ["type", "dashboardId", "cardId", "format", "title", "settings"],
436
443
  e
437
444
  );
438
- const a = b(
445
+ const a = E(
439
446
  {
440
447
  type: "card",
441
- dashboardId: f(
448
+ dashboardId: u(
442
449
  o.dashboardId,
443
450
  `${r}.dashboardId`,
444
- c.id,
451
+ l.id,
445
452
  e
446
453
  ),
447
- cardId: f(
454
+ cardId: u(
448
455
  o.cardId,
449
456
  `${r}.cardId`,
450
- c.id,
457
+ l.id,
451
458
  e
452
459
  ),
453
- format: g(
460
+ format: I(
454
461
  o.format,
455
462
  `${r}.format`,
456
463
  ["csv", "pdf", "png"],
@@ -461,57 +468,57 @@ function ne(t, n, e) {
461
468
  `${r}.title`,
462
469
  e
463
470
  );
464
- return E(a, o.settings, `${r}.settings`, e);
471
+ return $(a, o.settings, `${r}.settings`, e);
465
472
  }
466
- return d(
473
+ return c(
467
474
  e,
468
475
  `${r}.type`,
469
476
  "Expected dashboard, dashboard_sheet, document_sheet, visual, or card."
470
477
  ), { type: "dashboard", dashboardId: "", format: "pdf" };
471
478
  }
472
- function re(t) {
473
- switch (t.type) {
479
+ function ae(n) {
480
+ switch (n.type) {
474
481
  case "dashboard":
475
- return `${t.type}:${t.dashboardId}:${t.format}`;
482
+ return `${n.type}:${n.dashboardId}:${n.format}`;
476
483
  case "dashboard_sheet":
477
484
  case "document_sheet":
478
- return `${t.type}:${t.dashboardId}:${t.sheetId}:${t.format}`;
485
+ return `${n.type}:${n.dashboardId}:${n.sheetId}:${n.format}`;
479
486
  case "visual":
480
- return `${t.type}:${t.dashboardId}:${t.visualId}:${t.format}`;
487
+ return `${n.type}:${n.dashboardId}:${n.visualId}:${n.format}`;
481
488
  case "card":
482
- return `${t.type}:${t.dashboardId}:${t.cardId}:${t.format}`;
489
+ return `${n.type}:${n.dashboardId}:${n.cardId}:${n.format}`;
483
490
  }
484
491
  }
485
- function D(t, n) {
486
- if (t == null)
492
+ function R(n, t) {
493
+ if (n == null)
487
494
  return [];
488
- if (!Array.isArray(t))
489
- return d(n, "attachments", "Expected an array."), [];
490
- t.length > 20 && d(
491
- n,
495
+ if (!Array.isArray(n))
496
+ return c(t, "attachments", "Expected an array."), [];
497
+ n.length > 20 && c(
498
+ t,
492
499
  "attachments",
493
500
  "Choose 20 attachments or fewer."
494
501
  );
495
- const e = t.slice(0, 20).map((o, i) => ne(o, i, n)), r = /* @__PURE__ */ new Set();
502
+ const e = n.slice(0, 20).map((o, i) => ie(o, i, t)), r = /* @__PURE__ */ new Set();
496
503
  return e.forEach((o, i) => {
497
- const a = re(o);
498
- r.has(a) && d(n, `attachments.${i}`, "Duplicate attachment."), r.add(a);
504
+ const a = ae(o);
505
+ r.has(a) && c(t, `attachments.${i}`, "Duplicate attachment."), r.add(a);
499
506
  }), e;
500
507
  }
501
- function V(t, n) {
502
- if (t == null)
508
+ function M(n, t) {
509
+ if (n == null)
503
510
  return;
504
- const e = m(t, "limits", n);
505
- l(e, "limits", Object.keys($), n);
511
+ const e = h(n, "limits", t);
512
+ s(e, "limits", Object.keys(C), t);
506
513
  const r = {};
507
- return Object.keys($).forEach((o) => {
514
+ return Object.keys(C).forEach((o) => {
508
515
  const i = e[o];
509
516
  if (i == null)
510
517
  return;
511
- const a = $[o];
518
+ const a = C[o];
512
519
  if (typeof i != "number" || !Number.isInteger(i) || i < a.min || i > a.max) {
513
- d(
514
- n,
520
+ c(
521
+ t,
515
522
  `limits.${o}`,
516
523
  `Expected an integer between ${a.min} and ${a.max}.`
517
524
  );
@@ -520,105 +527,105 @@ function V(t, n) {
520
527
  r[o] = i;
521
528
  }), Object.keys(r).length > 0 ? r : void 0;
522
529
  }
523
- function N(t) {
524
- if (t.length > 0)
525
- throw new S(t);
530
+ function N(n) {
531
+ if (n.length > 0)
532
+ throw new T(n);
526
533
  }
527
- function j(t, n, e) {
528
- t.type === "none" && n.length === 0 && d(
534
+ function V(n, t, e) {
535
+ n.type === "none" && t.length === 0 && c(
529
536
  e,
530
537
  "body",
531
538
  "Add briefing instructions, a custom message, or at least one attachment."
532
539
  );
533
540
  }
534
- function w(t) {
535
- const n = [], e = m(t, "jobConfig", n);
536
- l(
541
+ function P(n) {
542
+ const t = [], e = h(n, "jobConfig", t);
543
+ s(
537
544
  e,
538
545
  "jobConfig",
539
546
  ["kind", "source", "body", "attachments", "presentation", "limits"],
540
- n
541
- ), e.kind !== A && d(n, "kind", "Expected BRIEFING.");
542
- const r = O(e.source, n), o = B(e.body, n), i = D(e.attachments, n), a = R(e.presentation, n), p = V(e.limits, n);
543
- return j(o, i, n), N(n), {
547
+ t
548
+ ), e.kind !== A && c(t, "kind", "Expected BRIEFING.");
549
+ const r = B(e.source, t), o = F(e.body, t), i = R(e.attachments, t), a = O(e.presentation, t), f = M(e.limits, t);
550
+ return V(o, i, t), N(t), {
544
551
  kind: A,
545
552
  source: r,
546
553
  body: o,
547
554
  attachments: i,
548
555
  presentation: a,
549
- ...p ? { limits: p } : {}
556
+ ...f ? { limits: f } : {}
550
557
  };
551
558
  }
552
- function pe(t) {
553
- return w({
554
- ...t,
559
+ function be(n) {
560
+ return P({
561
+ ...n,
555
562
  kind: A
556
563
  });
557
564
  }
558
- function oe(t, n, e) {
559
- const r = `deliveryConfig.recipients.${n}`, o = m(t, r, e), i = o.type;
560
- if (i === "email") {
561
- l(o, r, ["type", "address", "name"], e);
562
- const a = f(
563
- o.address,
564
- `${r}.address`,
565
- c.id,
565
+ function _(n, t, e, r = "deliveryConfig.recipients") {
566
+ const o = `${r}.${t}`, i = h(n, o, e), a = i.type;
567
+ if (a === "email") {
568
+ s(i, o, ["type", "address", "name"], e);
569
+ const f = u(
570
+ i.address,
571
+ `${o}.address`,
572
+ l.id,
566
573
  e
567
- ), p = u(
568
- o.name,
569
- `${r}.name`,
570
- c.attachmentTitle,
574
+ ), y = p(
575
+ i.name,
576
+ `${o}.name`,
577
+ l.attachmentTitle,
571
578
  e
572
579
  );
573
- return a && !Y(a) && d(e, `${r}.address`, "Email address is invalid."), {
580
+ return f && !ee(f) && c(e, `${o}.address`, "Email address is invalid."), {
574
581
  type: "email",
575
- address: a,
576
- ...p ? { name: p } : {}
582
+ address: f,
583
+ ...y ? { name: y } : {}
577
584
  };
578
585
  }
579
- return i === "user" ? (l(o, r, ["type", "userId"], e), {
586
+ return a === "user" ? (s(i, o, ["type", "userId"], e), {
580
587
  type: "user",
581
- userId: f(
582
- o.userId,
583
- `${r}.userId`,
584
- c.id,
588
+ userId: u(
589
+ i.userId,
590
+ `${o}.userId`,
591
+ l.id,
585
592
  e
586
593
  )
587
- }) : i === "tenant_user" ? (l(o, r, ["type", "tenantUserId"], e), {
594
+ }) : a === "tenant_user" ? (s(i, o, ["type", "tenantUserId"], e), {
588
595
  type: "tenant_user",
589
- tenantUserId: f(
590
- o.tenantUserId,
591
- `${r}.tenantUserId`,
592
- c.id,
596
+ tenantUserId: u(
597
+ i.tenantUserId,
598
+ `${o}.tenantUserId`,
599
+ l.id,
593
600
  e
594
601
  )
595
- }) : i === "group" ? (l(o, r, ["type", "groupId"], e), {
602
+ }) : a === "group" ? (s(i, o, ["type", "groupId"], e), {
596
603
  type: "group",
597
- groupId: f(
598
- o.groupId,
599
- `${r}.groupId`,
600
- c.id,
604
+ groupId: u(
605
+ i.groupId,
606
+ `${o}.groupId`,
607
+ l.id,
601
608
  e
602
609
  )
603
- }) : (d(
610
+ }) : (c(
604
611
  e,
605
- `${r}.type`,
612
+ `${o}.type`,
606
613
  "Expected email, user, tenant_user, or group."
607
614
  ), { type: "email", address: "" });
608
615
  }
609
- function ie(t, n) {
610
- return Array.isArray(t) ? t.map(
611
- (e, r) => oe(e, r, n)
612
- ) : (d(n, "deliveryConfig.recipients", "Expected an array."), []);
616
+ function ce(n, t) {
617
+ return n == null ? [] : Array.isArray(n) ? n.map(
618
+ (e, r) => _(e, r, t)
619
+ ) : (c(t, "deliveryConfig.recipients", "Expected an array."), []);
613
620
  }
614
- function ae(t, n) {
615
- if (!Array.isArray(t))
616
- return d(n, "deliveryConfig.channels", "Expected an array."), [];
621
+ function de(n, t) {
622
+ if (!Array.isArray(n))
623
+ return c(t, "deliveryConfig.channels", "Expected an array."), [];
617
624
  const e = [];
618
- return t.forEach((r, o) => {
619
- if (!M(r)) {
620
- d(
621
- n,
625
+ return n.forEach((r, o) => {
626
+ if (!w(r)) {
627
+ c(
628
+ t,
622
629
  `deliveryConfig.channels.${o}`,
623
630
  "Expected EMAIL, WEBHOOK, SLACK, IN_APP, or TELEGRAM."
624
631
  );
@@ -627,136 +634,262 @@ function ae(t, n) {
627
634
  e.includes(r) || e.push(r);
628
635
  }), e;
629
636
  }
630
- function de(t, n, e) {
631
- if (t == null)
637
+ function le(n, t, e) {
638
+ if (n == null)
632
639
  return;
633
- const r = m(t, n, e), o = {};
640
+ const r = h(n, t, e), o = {};
634
641
  return Object.entries(r).forEach(([i, a]) => {
635
642
  if (typeof a != "string") {
636
- d(e, `${n}.${i}`, "Expected a string.");
643
+ c(e, `${t}.${i}`, "Expected a string.");
637
644
  return;
638
645
  }
639
646
  o[i] = a.trim();
640
647
  }), Object.keys(o).length > 0 ? o : void 0;
641
648
  }
642
- function ce(t, n, e) {
643
- if (t == null)
649
+ function se(n, t, e) {
650
+ if (n == null)
644
651
  return;
645
- const r = m(t, n, e);
646
- l(
652
+ const r = h(n, t, e);
653
+ s(
647
654
  r,
648
- n,
655
+ t,
649
656
  ["url", "method", "headers", "secretEncrypted"],
650
657
  e
651
658
  );
652
- const o = r.method === void 0 || r.method === null ? void 0 : g(r.method, `${n}.method`, ["POST", "PUT"], e), i = de(r.headers, `${n}.headers`, e), a = u(
659
+ const o = r.method === void 0 || r.method === null ? void 0 : I(r.method, `${t}.method`, ["POST", "PUT"], e), i = le(r.headers, `${t}.headers`, e), a = p(
653
660
  r.secretEncrypted,
654
- `${n}.secretEncrypted`,
661
+ `${t}.secretEncrypted`,
655
662
  2e3,
656
663
  e
657
664
  );
658
665
  return {
659
- url: f(r.url, `${n}.url`, 2e3, e),
666
+ url: u(r.url, `${t}.url`, 2e3, e),
660
667
  ...o ? { method: o } : {},
661
668
  ...i ? { headers: i } : {},
662
669
  ...a ? { secretEncrypted: a } : {}
663
670
  };
664
671
  }
665
- function se(t, n, e) {
666
- const r = m(t, n, e);
667
- l(
672
+ function fe(n, t, e) {
673
+ const r = h(n, t, e), o = r.type;
674
+ if (o === "channel") {
675
+ s(
676
+ r,
677
+ t,
678
+ ["type", "channelId", "channelName", "isPrivate"],
679
+ e
680
+ );
681
+ const i = p(
682
+ r.channelName,
683
+ `${t}.channelName`,
684
+ l.attachmentTitle,
685
+ e
686
+ ), a = r.isPrivate === void 0 || r.isPrivate === null ? void 0 : g(
687
+ r.isPrivate,
688
+ !1,
689
+ `${t}.isPrivate`,
690
+ e
691
+ );
692
+ return {
693
+ type: "channel",
694
+ channelId: u(
695
+ r.channelId,
696
+ `${t}.channelId`,
697
+ l.id,
698
+ e
699
+ ),
700
+ ...i ? { channelName: i } : {},
701
+ ...a !== void 0 ? { isPrivate: a } : {}
702
+ };
703
+ }
704
+ return o === "dm" ? (s(r, t, ["type", "recipient"], e), c(
705
+ e,
706
+ `${t}.type`,
707
+ "Slack DM delivery is not supported in V1."
708
+ ), {
709
+ type: "dm",
710
+ recipient: _(r.recipient, 0, e, `${t}.recipient`)
711
+ }) : (c(e, `${t}.type`, "Expected channel."), { type: "channel", channelId: "" });
712
+ }
713
+ function me(n, t, e) {
714
+ if (n == null)
715
+ return;
716
+ if (!Array.isArray(n)) {
717
+ c(e, t, "Expected an array.");
718
+ return;
719
+ }
720
+ const r = n.map(
721
+ (o, i) => _(o, i, e, t)
722
+ );
723
+ return r.length > 0 ? r : void 0;
724
+ }
725
+ function ue(n, t, e) {
726
+ if (n == null)
727
+ return;
728
+ const r = h(n, t, e);
729
+ s(
668
730
  r,
669
- n,
731
+ t,
732
+ [
733
+ "destination",
734
+ "threadMentions",
735
+ "postThreadDetail",
736
+ "includeDashboardLink",
737
+ "includeBriefingLink"
738
+ ],
739
+ e
740
+ );
741
+ const o = me(
742
+ r.threadMentions,
743
+ `${t}.threadMentions`,
744
+ e
745
+ ), i = g(
746
+ r.postThreadDetail,
747
+ !0,
748
+ `${t}.postThreadDetail`,
749
+ e
750
+ ), a = g(
751
+ r.includeDashboardLink,
752
+ !0,
753
+ `${t}.includeDashboardLink`,
754
+ e
755
+ ), f = g(
756
+ r.includeBriefingLink,
757
+ !0,
758
+ `${t}.includeBriefingLink`,
759
+ e
760
+ );
761
+ return {
762
+ destination: fe(
763
+ r.destination,
764
+ `${t}.destination`,
765
+ e
766
+ ),
767
+ ...o ? { threadMentions: o } : {},
768
+ ...r.postThreadDetail !== void 0 ? { postThreadDetail: i } : {},
769
+ ...r.includeDashboardLink !== void 0 ? { includeDashboardLink: a } : {},
770
+ ...r.includeBriefingLink !== void 0 ? { includeBriefingLink: f } : {}
771
+ };
772
+ }
773
+ function he(n, t, e) {
774
+ const r = h(n, t, e);
775
+ s(
776
+ r,
777
+ t,
670
778
  [
671
779
  "subjectOverride",
672
780
  "titleOverride",
673
781
  "summaryOverride",
674
782
  "actionBlockVisible",
783
+ "formatProfile",
784
+ "slackConfig",
675
785
  "webhookConfig"
676
786
  ],
677
787
  e
678
788
  );
679
- const o = u(
789
+ const o = b(
790
+ r.formatProfile,
791
+ `${t}.formatProfile`,
792
+ Y,
793
+ "concise, balanced, or detailed",
794
+ e
795
+ ), i = p(
680
796
  r.subjectOverride,
681
- `${n}.subjectOverride`,
797
+ `${t}.subjectOverride`,
682
798
  500,
683
799
  e
684
- ), i = u(
800
+ ), a = p(
685
801
  r.titleOverride,
686
- `${n}.titleOverride`,
802
+ `${t}.titleOverride`,
687
803
  500,
688
804
  e
689
- ), a = u(
805
+ ), f = p(
690
806
  r.summaryOverride,
691
- `${n}.summaryOverride`,
807
+ `${t}.summaryOverride`,
692
808
  2e3,
693
809
  e
694
- ), p = C(
810
+ ), y = g(
695
811
  r.actionBlockVisible,
696
812
  !0,
697
- `${n}.actionBlockVisible`,
813
+ `${t}.actionBlockVisible`,
698
814
  e
699
- ), y = ce(
815
+ ), d = se(
700
816
  r.webhookConfig,
701
- `${n}.webhookConfig`,
817
+ `${t}.webhookConfig`,
818
+ e
819
+ ), m = ue(
820
+ r.slackConfig,
821
+ `${t}.slackConfig`,
702
822
  e
703
823
  );
704
824
  return {
705
- ...o ? { subjectOverride: o } : {},
706
- ...i ? { titleOverride: i } : {},
707
- ...a ? { summaryOverride: a } : {},
708
- ...r.actionBlockVisible !== void 0 ? { actionBlockVisible: p } : {},
709
- ...y ? { webhookConfig: y } : {}
825
+ ...o ? { formatProfile: o } : {},
826
+ ...i ? { subjectOverride: i } : {},
827
+ ...a ? { titleOverride: a } : {},
828
+ ...f ? { summaryOverride: f } : {},
829
+ ...r.actionBlockVisible !== void 0 ? { actionBlockVisible: y } : {},
830
+ ...m ? { slackConfig: m } : {},
831
+ ...d ? { webhookConfig: d } : {}
710
832
  };
711
833
  }
712
- function le(t, n) {
713
- if (t == null)
834
+ function pe(n, t) {
835
+ if (n == null)
714
836
  return;
715
- const e = m(t, "deliveryConfig.channelConfigs", n), r = {};
837
+ const e = h(n, "deliveryConfig.channelConfigs", t), r = {};
716
838
  return Object.entries(e).forEach(([o, i]) => {
717
- if (!M(o)) {
718
- d(
719
- n,
839
+ if (!w(o)) {
840
+ c(
841
+ t,
720
842
  `deliveryConfig.channelConfigs.${o}`,
721
843
  "Expected a supported delivery channel."
722
844
  );
723
845
  return;
724
846
  }
725
- r[o] = se(
847
+ r[o] = he(
726
848
  i,
727
849
  `deliveryConfig.channelConfigs.${o}`,
728
- n
850
+ t
729
851
  );
730
852
  }), Object.keys(r).length > 0 ? r : void 0;
731
853
  }
732
- function fe(t, n) {
733
- if (t == null)
854
+ function ye(n, t) {
855
+ var y, d, m;
856
+ if (n == null)
734
857
  return null;
735
- const e = m(t, "deliveryConfig", n);
736
- l(
858
+ const e = h(n, "deliveryConfig", t);
859
+ s(
737
860
  e,
738
861
  "deliveryConfig",
739
862
  ["recipients", "channels", "channelConfigs"],
740
- n
863
+ t
741
864
  );
742
- const r = le(e.channelConfigs, n), o = ie(e.recipients, n), i = ae(e.channels, n);
743
- return o.length === 0 && d(
744
- n,
865
+ const r = pe(e.channelConfigs, t), o = ce(e.recipients, t), i = de(e.channels, t), a = ((d = (y = r == null ? void 0 : r.SLACK) == null ? void 0 : y.slackConfig) == null ? void 0 : d.destination.type) === "channel" && !!r.SLACK.slackConfig.destination.channelId.trim();
866
+ return i.some(
867
+ (v) => v !== "SLACK"
868
+ ) && o.length === 0 && c(
869
+ t,
745
870
  "deliveryConfig.recipients",
746
871
  "Add at least one recipient or remove delivery config."
747
- ), i.length === 0 && d(
748
- n,
872
+ ), i.length === 0 && c(
873
+ t,
749
874
  "deliveryConfig.channels",
750
875
  "Choose at least one delivery channel or remove delivery config."
876
+ ), i.includes("SLACK") && !a && c(
877
+ t,
878
+ "deliveryConfig.channelConfigs.SLACK.slackConfig.destination.channelId",
879
+ "Choose a Slack channel destination."
880
+ ), !i.includes("SLACK") && ((m = r == null ? void 0 : r.SLACK) != null && m.slackConfig) && c(
881
+ t,
882
+ "deliveryConfig.channelConfigs.SLACK",
883
+ "Slack config requires SLACK in deliveryConfig.channels."
751
884
  ), {
752
885
  recipients: o,
753
886
  channels: i,
754
887
  ...r ? { channelConfigs: r } : {}
755
888
  };
756
889
  }
757
- function T(t) {
758
- const n = [], e = m(t, "draft", n);
759
- l(
890
+ function k(n) {
891
+ const t = [], e = h(n, "draft", t);
892
+ s(
760
893
  e,
761
894
  "draft",
762
895
  [
@@ -772,77 +905,77 @@ function T(t) {
772
905
  "limits",
773
906
  "deliveryConfig"
774
907
  ],
775
- n
908
+ t
776
909
  );
777
- const r = f(
910
+ const r = u(
778
911
  e.name,
779
912
  "name",
780
- c.name,
781
- n
782
- ), o = u(
913
+ l.name,
914
+ t
915
+ ), o = p(
783
916
  e.description,
784
917
  "description",
785
- c.description,
786
- n
787
- ) ?? null, i = u(e.scheduleExpr, "scheduleExpr", 500, n) ?? null, a = u(e.timezone, "timezone", 200, n) ?? "UTC", p = W(e.status, n), y = O(e.source, n), s = B(e.body, n), h = D(e.attachments, n), k = R(e.presentation, n), _ = V(e.limits, n), L = fe(e.deliveryConfig, n);
788
- return j(s, h, n), N(n), {
918
+ l.description,
919
+ t
920
+ ) ?? null, i = p(e.scheduleExpr, "scheduleExpr", 500, t) ?? null, a = p(e.timezone, "timezone", 200, t) ?? "UTC", f = Q(e.status, t), y = B(e.source, t), d = F(e.body, t), m = R(e.attachments, t), v = O(e.presentation, t), L = M(e.limits, t), j = ye(e.deliveryConfig, t);
921
+ return V(d, m, t), N(t), {
789
922
  name: r,
790
923
  description: o,
791
- status: p,
924
+ status: f,
792
925
  scheduleExpr: i,
793
926
  timezone: a,
794
927
  source: y,
795
- body: s,
796
- attachments: h,
797
- presentation: k,
798
- ..._ ? { limits: _ } : {},
799
- deliveryConfig: L
928
+ body: d,
929
+ attachments: m,
930
+ presentation: v,
931
+ ...L ? { limits: L } : {},
932
+ deliveryConfig: j
800
933
  };
801
934
  }
802
- function he(t) {
803
- return T(t);
935
+ function Ee(n) {
936
+ return k(n);
804
937
  }
805
- function ye(t) {
806
- return T(t);
938
+ function $e(n) {
939
+ return k(n);
807
940
  }
808
- function ge(t) {
941
+ function ve(n) {
809
942
  try {
810
- return { valid: !0, value: T(t), issues: [] };
811
- } catch (n) {
812
- if (n instanceof S)
813
- return { valid: !1, issues: n.issues };
814
- throw n;
943
+ return { valid: !0, value: k(n), issues: [] };
944
+ } catch (t) {
945
+ if (t instanceof T)
946
+ return { valid: !1, issues: t.issues };
947
+ throw t;
815
948
  }
816
949
  }
817
- function Ie(t) {
950
+ function Ce(n) {
818
951
  try {
819
- return { valid: !0, value: w(t), issues: [] };
820
- } catch (n) {
821
- if (n instanceof S)
822
- return { valid: !1, issues: n.issues };
823
- throw n;
952
+ return { valid: !0, value: P(n), issues: [] };
953
+ } catch (t) {
954
+ if (t instanceof T)
955
+ return { valid: !1, issues: t.issues };
956
+ throw t;
824
957
  }
825
958
  }
826
- function be(t) {
827
- return typeof t == "string" && z.has(t);
959
+ function Ae(n) {
960
+ return typeof n == "string" && z.has(n);
828
961
  }
829
- function M(t) {
830
- return typeof t == "string" && H.has(t);
962
+ function w(n) {
963
+ return typeof n == "string" && H.has(n);
831
964
  }
832
965
  export {
833
- U as BRIEFING_ARTIFACT_FORMATS,
966
+ q as BRIEFING_ARTIFACT_FORMATS,
834
967
  A as BRIEFING_KIND,
835
- c as BRIEFING_TEXT_LIMITS,
836
- S as BriefingContractError,
837
- v as DEFAULT_BRIEFING_ARTIFACT_FORMATS,
838
- ue as MAX_BRIEFING_ATTACHMENTS,
839
- pe as buildBriefingJobConfig,
840
- he as buildCreateBriefingRequest,
841
- ye as buildUpdateBriefingRequest,
842
- be as isBriefingArtifactFormat,
843
- M as isBriefingDeliveryChannel,
844
- T as normalizeBriefingDraft,
845
- w as normalizeBriefingJobConfig,
846
- ge as validateBriefingDraft,
847
- Ie as validateBriefingJobConfig
968
+ l as BRIEFING_TEXT_LIMITS,
969
+ T as BriefingContractError,
970
+ S as DEFAULT_BRIEFING_ARTIFACT_FORMATS,
971
+ Ie as MAX_BRIEFING_ATTACHMENTS,
972
+ be as buildBriefingJobConfig,
973
+ Ee as buildCreateBriefingRequest,
974
+ $e as buildUpdateBriefingRequest,
975
+ Ae as isBriefingArtifactFormat,
976
+ w as isBriefingDeliveryChannel,
977
+ k as normalizeBriefingDraft,
978
+ P as normalizeBriefingJobConfig,
979
+ ve as validateBriefingDraft,
980
+ Ce as validateBriefingJobConfig
848
981
  };