react-blockkit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +203 -0
- package/dist/Block.d.ts +13 -0
- package/dist/Block.d.ts.map +1 -0
- package/dist/BlockKit.d.ts +13 -0
- package/dist/BlockKit.d.ts.map +1 -0
- package/dist/assert-never.d.ts +2 -0
- package/dist/assert-never.d.ts.map +1 -0
- package/dist/blocks/AdvancedBlocks.d.ts +21 -0
- package/dist/blocks/AdvancedBlocks.d.ts.map +1 -0
- package/dist/blocks/BasicBlocks.d.ts +21 -0
- package/dist/blocks/BasicBlocks.d.ts.map +1 -0
- package/dist/blocks/Charts.d.ts +4 -0
- package/dist/blocks/Charts.d.ts.map +1 -0
- package/dist/blocks/InteractiveBlocks.d.ts +6 -0
- package/dist/blocks/InteractiveBlocks.d.ts.map +1 -0
- package/dist/constants.d.ts +54 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/context.d.ts +17 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/elements/Elements.d.ts +51 -0
- package/dist/elements/Elements.d.ts.map +1 -0
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/index.cjs +6 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4707 -0
- package/dist/index.js.map +1 -0
- package/dist/runtime.d.ts +6 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/safe-url.d.ts +2 -0
- package/dist/safe-url.d.ts.map +1 -0
- package/dist/styles.css +1502 -0
- package/dist/styles.d.ts +21 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/text/Markdown.d.ts +34 -0
- package/dist/text/Markdown.d.ts.map +1 -0
- package/dist/text/Mrkdwn.d.ts +37 -0
- package/dist/text/Mrkdwn.d.ts.map +1 -0
- package/dist/text/RichText.d.ts +9 -0
- package/dist/text/RichText.d.ts.map +1 -0
- package/dist/text/Text.d.ts +10 -0
- package/dist/text/Text.d.ts.map +1 -0
- package/dist/text/date.d.ts +6 -0
- package/dist/text/date.d.ts.map +1 -0
- package/dist/text/emoji.d.ts +3 -0
- package/dist/text/emoji.d.ts.map +1 -0
- package/dist/tokens.stylex.d.ts +8 -0
- package/dist/tokens.stylex.d.ts.map +1 -0
- package/dist/types.d.ts +221 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/validation.d.ts +11 -0
- package/dist/validation.d.ts.map +1 -0
- package/docs/coverage-matrix.md +80 -0
- package/docs/parity/chart-bar-3-w580-dark.png +0 -0
- package/docs/parity/chart-bar-3-w580-light.png +0 -0
- package/docs/parity/chart-line-3-w580-light.png +0 -0
- package/docs/parity/chart-pie-12-w400-light.png +0 -0
- package/docs/parity/chart-pie-5-w580-light.png +0 -0
- package/docs/parity/data-table-w580-dark.png +0 -0
- package/docs/parity/data-table-w580-light.png +0 -0
- package/docs/parity/headers-levels-w580-light.png +0 -0
- package/docs/parity/rich-text-full-w580-light.png +0 -0
- package/docs/parity/spacing-rhythm-w580-light.png +0 -0
- package/docs/parity/table-align-wrap-w580-light.png +0 -0
- package/docs/parity/table-basic-w580-light.png +0 -0
- package/docs/slack-style-baseline.md +260 -0
- package/package.json +83 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,4707 @@
|
|
|
1
|
+
import { createContext as e, createElement as t, useCallback as n, useContext as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
2
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stylexjs+stylex@0.19.0/node_modules/@stylexjs/stylex/lib/es/stylex.mjs
|
|
4
|
+
var d = {}, f;
|
|
5
|
+
function p() {
|
|
6
|
+
if (f) return d;
|
|
7
|
+
f = 1, Object.defineProperty(d, "__esModule", { value: !0 }), d.styleq = void 0;
|
|
8
|
+
var e = /* @__PURE__ */ new WeakMap(), t = "$$css";
|
|
9
|
+
function n(n) {
|
|
10
|
+
var r, i, a;
|
|
11
|
+
return n != null && (r = n.disableCache === !0, i = n.disableMix === !0, a = n.transform), function() {
|
|
12
|
+
for (var n = [], o = "", s = null, c = "", l = r ? null : e, u = Array(arguments.length), d = 0; d < arguments.length; d++) u[d] = arguments[d];
|
|
13
|
+
for (; u.length > 0;) {
|
|
14
|
+
var f = u.pop();
|
|
15
|
+
if (!(f == null || f === !1)) {
|
|
16
|
+
if (Array.isArray(f)) {
|
|
17
|
+
for (var p = 0; p < f.length; p++) u.push(f[p]);
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
var m = a == null ? f : a(f);
|
|
21
|
+
if (m.$$css != null) {
|
|
22
|
+
var h = "";
|
|
23
|
+
if (l != null && l.has(m)) {
|
|
24
|
+
var g = l.get(m);
|
|
25
|
+
g != null && (h = g[0], c = g[2], n.push.apply(n, g[1]), l = g[3]);
|
|
26
|
+
} else {
|
|
27
|
+
var ee = [];
|
|
28
|
+
for (var _ in m) {
|
|
29
|
+
var v = m[_];
|
|
30
|
+
if (_ === t) {
|
|
31
|
+
var y = m[_];
|
|
32
|
+
y !== !0 && (c = c ? y + "; " + c : y);
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
typeof v == "string" || v === null ? n.includes(_) || (n.push(_), l != null && ee.push(_), typeof v == "string" && (h += h ? " " + v : v)) : console.error(`styleq: ${_} typeof ${String(v)} is not "string" or "null".`);
|
|
36
|
+
}
|
|
37
|
+
if (l != null) {
|
|
38
|
+
var b = /* @__PURE__ */ new WeakMap();
|
|
39
|
+
l.set(m, [
|
|
40
|
+
h,
|
|
41
|
+
ee,
|
|
42
|
+
c,
|
|
43
|
+
b
|
|
44
|
+
]), l = b;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
h && (o = o ? h + " " + o : h);
|
|
48
|
+
} else if (i) s ??= {}, s = Object.assign({}, m, s);
|
|
49
|
+
else {
|
|
50
|
+
var x = null;
|
|
51
|
+
for (var S in m) {
|
|
52
|
+
var te = m[S];
|
|
53
|
+
te !== void 0 && (n.includes(S) || (te != null && (s ??= {}, x ??= {}, x[S] = te), n.push(S), l = null));
|
|
54
|
+
}
|
|
55
|
+
x != null && (s = Object.assign(x, s));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return [
|
|
60
|
+
o,
|
|
61
|
+
s,
|
|
62
|
+
c
|
|
63
|
+
];
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
var r = d.styleq = n();
|
|
67
|
+
return r.factory = n, d;
|
|
68
|
+
}
|
|
69
|
+
var m = /*@__PURE__*/ p();
|
|
70
|
+
function h(...e) {
|
|
71
|
+
let [t, n, r] = m.styleq(e), i = {};
|
|
72
|
+
return t != null && t !== "" && (i.className = t), n != null && Object.keys(n).length > 0 && (i.style = n), r != null && r !== "" && (i["data-style-src"] = r), i;
|
|
73
|
+
}
|
|
74
|
+
Object.freeze({});
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/assert-never.ts
|
|
77
|
+
function g(e) {
|
|
78
|
+
throw TypeError(`Unreachable value: ${JSON.stringify(e)}`);
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/context.tsx
|
|
82
|
+
var ee = {}, _ = e({
|
|
83
|
+
onAction: void 0,
|
|
84
|
+
resolvers: ee,
|
|
85
|
+
surface: "message"
|
|
86
|
+
});
|
|
87
|
+
function v({ children: e, onAction: t, resolvers: n = ee, surface: r = "message" }) {
|
|
88
|
+
let i = a(() => ({
|
|
89
|
+
onAction: t,
|
|
90
|
+
resolvers: n,
|
|
91
|
+
surface: r
|
|
92
|
+
}), [
|
|
93
|
+
t,
|
|
94
|
+
n,
|
|
95
|
+
r
|
|
96
|
+
]);
|
|
97
|
+
return /* @__PURE__ */ l(_.Provider, {
|
|
98
|
+
value: i,
|
|
99
|
+
children: e
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function y() {
|
|
103
|
+
return r(_);
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/errors.ts
|
|
107
|
+
var b = class extends Error {
|
|
108
|
+
code;
|
|
109
|
+
path;
|
|
110
|
+
name;
|
|
111
|
+
constructor(e, t) {
|
|
112
|
+
super(`${t.path}: ${e}`), this.code = t.code, this.path = t.path, this.name = "BlockKitInvariantError";
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/runtime.ts
|
|
117
|
+
function x(e) {
|
|
118
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
119
|
+
}
|
|
120
|
+
function S(e) {
|
|
121
|
+
if (x(e)) return typeof e.type == "string" ? e.type : void 0;
|
|
122
|
+
}
|
|
123
|
+
function te(e) {
|
|
124
|
+
if (x(e)) return typeof e.block_id == "string" ? e.block_id : void 0;
|
|
125
|
+
}
|
|
126
|
+
function C(e, t) {
|
|
127
|
+
if (!x(e)) return `Unsupported ${t}`;
|
|
128
|
+
for (let t of [
|
|
129
|
+
"text",
|
|
130
|
+
"label",
|
|
131
|
+
"name",
|
|
132
|
+
"id",
|
|
133
|
+
"url"
|
|
134
|
+
]) {
|
|
135
|
+
let n = e[t];
|
|
136
|
+
if (typeof n == "string" && n.length > 0) return n;
|
|
137
|
+
}
|
|
138
|
+
let n = S(e);
|
|
139
|
+
return n === void 0 ? `Unsupported ${t}` : `Unsupported ${t}: ${n}`;
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/safe-url.ts
|
|
143
|
+
function w(e) {
|
|
144
|
+
return e !== void 0 && /^(?:https?:|mailto:)/i.test(e) ? e : void 0;
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/tokens.stylex.ts
|
|
148
|
+
var ne = {
|
|
149
|
+
surface: "var(--xf210bc)",
|
|
150
|
+
surfaceRaised: "var(--xop8b6t)",
|
|
151
|
+
surfaceSunken: "var(--xajfn77)",
|
|
152
|
+
text: "var(--x9fzz95)",
|
|
153
|
+
textSecondary: "var(--xkl90bz)",
|
|
154
|
+
textFaint: "var(--x1wgu5h0)",
|
|
155
|
+
fadedText: "var(--x10ufbl0)",
|
|
156
|
+
contextText: "var(--xvbs4la)",
|
|
157
|
+
link: "var(--x7yxiqt)",
|
|
158
|
+
linkHover: "var(--x1vk4vvw)",
|
|
159
|
+
border: "var(--x1k1x5vw)",
|
|
160
|
+
borderStrong: "var(--xvml0ot)",
|
|
161
|
+
outlineFaint: "var(--xs7wnl2)",
|
|
162
|
+
quoteBar: "var(--x1s0fkf6)",
|
|
163
|
+
sunkenBand: "var(--x1q3wvl1)",
|
|
164
|
+
focus: "var(--x1lxtqoo)",
|
|
165
|
+
primary: "var(--x60yy18)",
|
|
166
|
+
primaryHover: "var(--x1boqxxr)",
|
|
167
|
+
danger: "var(--xvck1iw)",
|
|
168
|
+
dangerHover: "var(--xuxyi6r)",
|
|
169
|
+
warning: "var(--x1h5952)",
|
|
170
|
+
info: "var(--x1ewt0uj)",
|
|
171
|
+
success: "var(--x1iofpsc)",
|
|
172
|
+
codeSurface: "var(--xosg8sf)",
|
|
173
|
+
codeText: "var(--xixxt1k)",
|
|
174
|
+
codeBorder: "var(--x1pl7a27)",
|
|
175
|
+
inlineCodeSurface: "var(--xufkk4o)",
|
|
176
|
+
controlBorder: "var(--x1sshfsp)",
|
|
177
|
+
mentionSurface: "var(--x1fp2zh6)",
|
|
178
|
+
selectionSurface: "var(--x1woami9)",
|
|
179
|
+
shadow: "var(--xy8szbr)",
|
|
180
|
+
fontFamily: "var(--xpso4pg)",
|
|
181
|
+
monoFamily: "var(--xz0850p)",
|
|
182
|
+
fontSize: "var(--x187q4sc)",
|
|
183
|
+
lineHeight: "var(--xly840x)",
|
|
184
|
+
smallFontSize: "var(--x1td96tq)",
|
|
185
|
+
smallLineHeight: "var(--x1aku1qx)",
|
|
186
|
+
largeFontSize: "var(--x1w2qy7r)",
|
|
187
|
+
largeLineHeight: "var(--x1gdkpgo)",
|
|
188
|
+
radiusSmall: "var(--xk8bvd3)",
|
|
189
|
+
radiusMedium: "var(--xw6fjdp)",
|
|
190
|
+
radiusLarge: "var(--x1anb6a2)",
|
|
191
|
+
space1: "var(--xyqg4g)",
|
|
192
|
+
space2: "var(--xce4sdd)",
|
|
193
|
+
space3: "var(--x1aazw3)",
|
|
194
|
+
space4: "var(--x9neswr)",
|
|
195
|
+
space5: "var(--x2wog52)",
|
|
196
|
+
space6: "var(--xf76y9a)",
|
|
197
|
+
chartTickText: "var(--xp6fcxv)",
|
|
198
|
+
chartTickFontFamily: "var(--xwcrna3)",
|
|
199
|
+
chartAreaFallbackOpacity: "var(--x1bv6jb3)",
|
|
200
|
+
chartSeries1: "var(--xgbw59a)",
|
|
201
|
+
chartSeries2: "var(--x1y9reb)",
|
|
202
|
+
chartSeries3: "var(--xtyg07v)",
|
|
203
|
+
chartSeries4: "var(--x1efc3vk)",
|
|
204
|
+
chartSeries5: "var(--xekxuhj)",
|
|
205
|
+
chartSeries6: "var(--xswpqcc)",
|
|
206
|
+
chartSeries7: "var(--x119nunw)",
|
|
207
|
+
chartSeries8: "var(--x18hclru)",
|
|
208
|
+
chartSeries9: "var(--x5a2rib)",
|
|
209
|
+
chartSeries10: "var(--x1uug2l2)",
|
|
210
|
+
chartSeries11: "var(--xlxwzi2)",
|
|
211
|
+
chartSeries12: "var(--x14ykvsx)",
|
|
212
|
+
chartSeriesTint1: "var(--xht6yz5)",
|
|
213
|
+
chartSeriesTint2: "var(--x5pc1fo)",
|
|
214
|
+
chartSeriesTint3: "var(--xsr4xjm)",
|
|
215
|
+
chartSeriesTint4: "var(--xl5j2un)",
|
|
216
|
+
chartSeriesTint5: "var(--x1nud87m)",
|
|
217
|
+
chartSeriesTint6: "var(--x1t1bkho)",
|
|
218
|
+
__varGroupHash__: "xpd22m1"
|
|
219
|
+
}, re = {
|
|
220
|
+
xpd22m1: "x1l73jb5 xpd22m1",
|
|
221
|
+
$$css: !0
|
|
222
|
+
}, ie = {
|
|
223
|
+
xpd22m1: "xky7mqn xpd22m1",
|
|
224
|
+
$$css: !0
|
|
225
|
+
}, T = {
|
|
226
|
+
root: {
|
|
227
|
+
kWkggS: "xfs8zev",
|
|
228
|
+
kMwMTN: "xr3bju4",
|
|
229
|
+
k1xSpc: "x78zum5",
|
|
230
|
+
kXwgrk: "xdt5ytf",
|
|
231
|
+
kMv6JI: "x1pmjkix",
|
|
232
|
+
kGuDYH: "x1rrsw0e",
|
|
233
|
+
k75w0D: "xyg637s",
|
|
234
|
+
kLWn49: "xtyajrp",
|
|
235
|
+
ks0D6T: "x193iq5w",
|
|
236
|
+
k7Eaqz: "xeuugli",
|
|
237
|
+
kHjlTd: "x1mzt3pk",
|
|
238
|
+
kGO01o: "xdzjq9u",
|
|
239
|
+
kJwUce: "xfqjyog",
|
|
240
|
+
khiITx: "xvmahel",
|
|
241
|
+
$$css: !0
|
|
242
|
+
},
|
|
243
|
+
rootLight: {
|
|
244
|
+
kQNsl9: "x19aimcq",
|
|
245
|
+
$$css: !0
|
|
246
|
+
},
|
|
247
|
+
rootDark: {
|
|
248
|
+
kQNsl9: "xntwwlm",
|
|
249
|
+
$$css: !0
|
|
250
|
+
},
|
|
251
|
+
block: {
|
|
252
|
+
k1K539: "x4vbgl9",
|
|
253
|
+
k7Eaqz: "xeuugli",
|
|
254
|
+
k8WAf4: "x1hq2hf5",
|
|
255
|
+
$$css: !0
|
|
256
|
+
},
|
|
257
|
+
section: {
|
|
258
|
+
kGNEyG: "x1cy8zhl",
|
|
259
|
+
k1xSpc: "x78zum5",
|
|
260
|
+
kOIVth: "x12n5c1t",
|
|
261
|
+
kjj79g: "x1qughib",
|
|
262
|
+
k1K539: "xqws75s",
|
|
263
|
+
keoZOQ: "x1kadbbt",
|
|
264
|
+
k7Eaqz: "xeuugli",
|
|
265
|
+
$$css: !0
|
|
266
|
+
},
|
|
267
|
+
sectionContent: {
|
|
268
|
+
kzQI83: "x1iyjqo2",
|
|
269
|
+
k7Eaqz: "xeuugli",
|
|
270
|
+
$$css: !0
|
|
271
|
+
},
|
|
272
|
+
fields: {
|
|
273
|
+
k1xSpc: "xrvj5dj",
|
|
274
|
+
k1C7PZ: "x180bbmo",
|
|
275
|
+
kumcoG: "xz25sdm",
|
|
276
|
+
khm7nJ: "xxs79tx",
|
|
277
|
+
$$css: !0
|
|
278
|
+
},
|
|
279
|
+
accessory: {
|
|
280
|
+
kmuXW: "x2lah0s",
|
|
281
|
+
k1K539: "xqws75s",
|
|
282
|
+
ks0D6T: "x8jryan",
|
|
283
|
+
$$css: !0
|
|
284
|
+
},
|
|
285
|
+
text: {
|
|
286
|
+
kqGvvJ: "x10im51j",
|
|
287
|
+
khDVqt: "x126k92a",
|
|
288
|
+
$$css: !0
|
|
289
|
+
},
|
|
290
|
+
smallText: {
|
|
291
|
+
kMwMTN: "xlx0kvv",
|
|
292
|
+
kGuDYH: "x6wetls",
|
|
293
|
+
kLWn49: "x1bw88vm",
|
|
294
|
+
$$css: !0
|
|
295
|
+
},
|
|
296
|
+
bold: {
|
|
297
|
+
k63SB2: "x1xlr1w8",
|
|
298
|
+
$$css: !0
|
|
299
|
+
},
|
|
300
|
+
italic: {
|
|
301
|
+
kKX8nH: "x1k4tb9n",
|
|
302
|
+
$$css: !0
|
|
303
|
+
},
|
|
304
|
+
strike: {
|
|
305
|
+
kMnn75: "x5lhwog",
|
|
306
|
+
$$css: !0
|
|
307
|
+
},
|
|
308
|
+
underline: {
|
|
309
|
+
kMnn75: "xujl8zx",
|
|
310
|
+
$$css: !0
|
|
311
|
+
},
|
|
312
|
+
inlineCode: {
|
|
313
|
+
kWkggS: "x1e1z2ym",
|
|
314
|
+
kVAM5u: "x1d5idl8",
|
|
315
|
+
kaIpWk: "x18zih8k",
|
|
316
|
+
ksu8eU: "x1y0btm7",
|
|
317
|
+
kMzoRj: "xmkeg23",
|
|
318
|
+
kMwMTN: "xdlcw9o",
|
|
319
|
+
kMv6JI: "xmmtbmh",
|
|
320
|
+
kGuDYH: "xfifm61",
|
|
321
|
+
kLWn49: "xd4r4e8",
|
|
322
|
+
kGO01o: "x1j85h84",
|
|
323
|
+
kLKAdn: "x1nn3v0j",
|
|
324
|
+
kg3NbH: "x3y1lgt",
|
|
325
|
+
$$css: !0
|
|
326
|
+
},
|
|
327
|
+
link: {
|
|
328
|
+
kMwMTN: "x79zlbl xbxavls",
|
|
329
|
+
kMnn75: "xkrqix3 x1sur9pj",
|
|
330
|
+
$$css: !0
|
|
331
|
+
},
|
|
332
|
+
mention: {
|
|
333
|
+
kWkggS: "x1atmwd0",
|
|
334
|
+
kaIpWk: "x18zih8k",
|
|
335
|
+
kMwMTN: "x79zlbl",
|
|
336
|
+
kg3NbH: "x5k8d2m",
|
|
337
|
+
$$css: !0
|
|
338
|
+
},
|
|
339
|
+
colorSwatch: {
|
|
340
|
+
kVAM5u: "xxqpzdx",
|
|
341
|
+
kaIpWk: "x18zih8k",
|
|
342
|
+
ksu8eU: "x1y0btm7",
|
|
343
|
+
kMzoRj: "xmkeg23",
|
|
344
|
+
k1xSpc: "x1rg5ohu",
|
|
345
|
+
kZKoxP: "x1kpxq89",
|
|
346
|
+
k71WvV: "x161fxfn",
|
|
347
|
+
kXLuUW: "x19693qn",
|
|
348
|
+
kzqmXN: "xsmyaan",
|
|
349
|
+
$$css: !0
|
|
350
|
+
},
|
|
351
|
+
richText: {
|
|
352
|
+
k1xSpc: "x1lliihq",
|
|
353
|
+
$$css: !0
|
|
354
|
+
},
|
|
355
|
+
richSection: {
|
|
356
|
+
kAzted: "x1a3d1is",
|
|
357
|
+
khDVqt: "x126k92a",
|
|
358
|
+
$$css: !0
|
|
359
|
+
},
|
|
360
|
+
list: {
|
|
361
|
+
kqGvvJ: "x10im51j",
|
|
362
|
+
kZCmMZ: "x1c1uobl",
|
|
363
|
+
$$css: !0
|
|
364
|
+
},
|
|
365
|
+
listItemBullet: {
|
|
366
|
+
kTP8oX: "xgaypha",
|
|
367
|
+
kgeoSG: "x1cpjm7i",
|
|
368
|
+
kP1sEF: "x1fhgk32",
|
|
369
|
+
kgzTxl: "xf14d2n",
|
|
370
|
+
kgbC5f: "x16z0v49",
|
|
371
|
+
krMjp6: "x14uouze",
|
|
372
|
+
kiZrQH: "x1n7jhte",
|
|
373
|
+
kJ33su: "x3mu4kn",
|
|
374
|
+
kOlAkY: "x1fitiw8",
|
|
375
|
+
kH6xsr: "x3ct3a4",
|
|
376
|
+
keTefX: "x9pbi5e",
|
|
377
|
+
$$css: !0
|
|
378
|
+
},
|
|
379
|
+
listItemOrdered: {
|
|
380
|
+
keTefX: "xi37gm7",
|
|
381
|
+
kZCmMZ: "x1j7nfk9",
|
|
382
|
+
$$css: !0
|
|
383
|
+
},
|
|
384
|
+
listBullet: {
|
|
385
|
+
k3DiCg: "x14alfy",
|
|
386
|
+
kuPSpR: "xo40evb",
|
|
387
|
+
k836YN: "x1x74kny",
|
|
388
|
+
$$css: !0
|
|
389
|
+
},
|
|
390
|
+
listBulletAlternate: {
|
|
391
|
+
k3DiCg: "x1ki3hy7",
|
|
392
|
+
kuPSpR: "x1qsdrx0",
|
|
393
|
+
k836YN: "x1eu2g3i",
|
|
394
|
+
$$css: !0
|
|
395
|
+
},
|
|
396
|
+
listBulletSquare: {
|
|
397
|
+
k3DiCg: "xvrmgxb",
|
|
398
|
+
kuPSpR: "xcwbexy",
|
|
399
|
+
k836YN: "xgyhcuf",
|
|
400
|
+
$$css: !0
|
|
401
|
+
},
|
|
402
|
+
listOrdered: {
|
|
403
|
+
kH6xsr: "x3yw8vx",
|
|
404
|
+
$$css: !0
|
|
405
|
+
},
|
|
406
|
+
listOrderedAlpha: {
|
|
407
|
+
kH6xsr: "x1rrqm6h",
|
|
408
|
+
$$css: !0
|
|
409
|
+
},
|
|
410
|
+
listOrderedRoman: {
|
|
411
|
+
kH6xsr: "x19k9dhg",
|
|
412
|
+
$$css: !0
|
|
413
|
+
},
|
|
414
|
+
quote: {
|
|
415
|
+
kLkRvE: "xs55rtf",
|
|
416
|
+
kPB484: "x17c2zl0",
|
|
417
|
+
kgeoSG: "x1cpjm7i",
|
|
418
|
+
k5Ofw7: "xhq5o37",
|
|
419
|
+
k96MEf: "x1y3wzot",
|
|
420
|
+
kSJ0CW: "x1682cnc",
|
|
421
|
+
kEoFBp: "x1hmns74",
|
|
422
|
+
kOlAkY: "x1eencha",
|
|
423
|
+
kMwMTN: "xr3bju4",
|
|
424
|
+
kqGvvJ: "x19v53j4",
|
|
425
|
+
kUOVxO: "xrxpjvj",
|
|
426
|
+
kZCmMZ: "x18jm10a",
|
|
427
|
+
kVAEAm: "x1n2onr6",
|
|
428
|
+
khDVqt: "x126k92a",
|
|
429
|
+
$$css: !0
|
|
430
|
+
},
|
|
431
|
+
richBorder: {
|
|
432
|
+
kGJrpR: "xoih3la",
|
|
433
|
+
kVhnKS: "x1t7ytsu",
|
|
434
|
+
k2ei4v: "x56jcm7",
|
|
435
|
+
$$css: !0
|
|
436
|
+
},
|
|
437
|
+
pre: {
|
|
438
|
+
kWkggS: "x1e1z2ym",
|
|
439
|
+
kVAM5u: "x1d5idl8",
|
|
440
|
+
kaIpWk: "x1hdofj4",
|
|
441
|
+
ksu8eU: "x1y0btm7",
|
|
442
|
+
kMzoRj: "xmkeg23",
|
|
443
|
+
kMv6JI: "xmmtbmh",
|
|
444
|
+
kGuDYH: "xfifm61",
|
|
445
|
+
kLWn49: "xd4r4e8",
|
|
446
|
+
kqGvvJ: "x19v53j4",
|
|
447
|
+
kXHlph: "xw2csxc",
|
|
448
|
+
k8WAf4: "x10wxn1s",
|
|
449
|
+
kg3NbH: "x17hd1w2",
|
|
450
|
+
kKi2Bq: "x1k5ss6i",
|
|
451
|
+
khDVqt: "x1sdyfia",
|
|
452
|
+
$$css: !0
|
|
453
|
+
},
|
|
454
|
+
heading: {
|
|
455
|
+
k63SB2: "x1uu0p8",
|
|
456
|
+
k1K539: "xqws75s",
|
|
457
|
+
keoZOQ: "xcxhlts",
|
|
458
|
+
$$css: !0
|
|
459
|
+
},
|
|
460
|
+
heading1: {
|
|
461
|
+
kGuDYH: "xlwa70p",
|
|
462
|
+
kLWn49: "x4321kk",
|
|
463
|
+
$$css: !0
|
|
464
|
+
},
|
|
465
|
+
heading2: {
|
|
466
|
+
kGuDYH: "x1rrsw0e",
|
|
467
|
+
kLWn49: "xtyajrp",
|
|
468
|
+
$$css: !0
|
|
469
|
+
},
|
|
470
|
+
heading3: {
|
|
471
|
+
kGuDYH: "x1rrsw0e",
|
|
472
|
+
k63SB2: "x1xlr1w8",
|
|
473
|
+
kLWn49: "xtyajrp",
|
|
474
|
+
$$css: !0
|
|
475
|
+
},
|
|
476
|
+
heading4: {
|
|
477
|
+
kGuDYH: "x1rrsw0e",
|
|
478
|
+
k63SB2: "x1xlr1w8",
|
|
479
|
+
kLWn49: "xtyajrp",
|
|
480
|
+
$$css: !0
|
|
481
|
+
},
|
|
482
|
+
divider: {
|
|
483
|
+
kL6WhQ: "x17fznl5",
|
|
484
|
+
kfdmCh: "x1q0q8m5",
|
|
485
|
+
kt9PQ7: "xso031l",
|
|
486
|
+
kPef9Z: "x1ejq31n",
|
|
487
|
+
kJRH4f: "xkgv12d",
|
|
488
|
+
k1K539: "x81smla",
|
|
489
|
+
keoZOQ: "xk59hdr",
|
|
490
|
+
kUOVxO: "xrxpjvj",
|
|
491
|
+
$$css: !0
|
|
492
|
+
},
|
|
493
|
+
image: {
|
|
494
|
+
kaIpWk: "x1hdofj4",
|
|
495
|
+
k1xSpc: "x1lliihq",
|
|
496
|
+
kZKoxP: "xt7dq6l",
|
|
497
|
+
kskxy: "x2z3yb8",
|
|
498
|
+
ks0D6T: "x193iq5w",
|
|
499
|
+
kVIFPx: "x19kjcj4",
|
|
500
|
+
$$css: !0
|
|
501
|
+
},
|
|
502
|
+
accessoryImage: {
|
|
503
|
+
kaIpWk: "xsqv9me",
|
|
504
|
+
kZKoxP: "x14nwjz3",
|
|
505
|
+
keTefX: "x34y3n0",
|
|
506
|
+
kVIFPx: "xl1xv1r",
|
|
507
|
+
kzqmXN: "x29ncy0",
|
|
508
|
+
$$css: !0
|
|
509
|
+
},
|
|
510
|
+
context: {
|
|
511
|
+
kGNEyG: "x6s0dn4",
|
|
512
|
+
kMwMTN: "xr3bju4",
|
|
513
|
+
k1xSpc: "x78zum5",
|
|
514
|
+
kwnvtZ: "x1a02dak",
|
|
515
|
+
kGuDYH: "x1rrsw0e",
|
|
516
|
+
kOIVth: "xxhr3t",
|
|
517
|
+
kLWn49: "xtyajrp",
|
|
518
|
+
kqGvvJ: "x19v53j4",
|
|
519
|
+
kAzted: "x1a3d1is",
|
|
520
|
+
$$css: !0
|
|
521
|
+
},
|
|
522
|
+
contextElement: {
|
|
523
|
+
kGuDYH: "x1rrsw0e",
|
|
524
|
+
kLWn49: "xtyajrp",
|
|
525
|
+
k7Eaqz: "xeuugli",
|
|
526
|
+
kwRFfy: "x1o1cwpf",
|
|
527
|
+
$$css: !0
|
|
528
|
+
},
|
|
529
|
+
contextText: {
|
|
530
|
+
kMwMTN: "xvuv4jf",
|
|
531
|
+
k1xSpc: "xt0psk2",
|
|
532
|
+
kGuDYH: "x6wetls",
|
|
533
|
+
kLWn49: "x1bw88vm",
|
|
534
|
+
$$css: !0
|
|
535
|
+
},
|
|
536
|
+
contextImage: {
|
|
537
|
+
kaIpWk: "x1cum3z5",
|
|
538
|
+
kZKoxP: "x1qx5ct2",
|
|
539
|
+
kVIFPx: "xl1xv1r",
|
|
540
|
+
kzqmXN: "xw4jnvo",
|
|
541
|
+
$$css: !0
|
|
542
|
+
},
|
|
543
|
+
actions: {
|
|
544
|
+
kGNEyG: "x6s0dn4",
|
|
545
|
+
k1xSpc: "x78zum5",
|
|
546
|
+
kwnvtZ: "x1a02dak",
|
|
547
|
+
kOIVth: "x12n5c1t",
|
|
548
|
+
k1K539: "x81smla",
|
|
549
|
+
$$css: !0
|
|
550
|
+
},
|
|
551
|
+
button: {
|
|
552
|
+
kGNEyG: "x6s0dn4",
|
|
553
|
+
kWkggS: "x1itzlyb xb1q457",
|
|
554
|
+
kVAM5u: "x12ero96",
|
|
555
|
+
kaIpWk: "x1hdofj4",
|
|
556
|
+
ksu8eU: "x1y0btm7",
|
|
557
|
+
kMzoRj: "xmkeg23",
|
|
558
|
+
kMwMTN: "xr3bju4",
|
|
559
|
+
kkrTdU: "x1ypdohk",
|
|
560
|
+
k1xSpc: "x3nfvp2",
|
|
561
|
+
kMv6JI: "x1pmjkix",
|
|
562
|
+
kGuDYH: "x6wetls",
|
|
563
|
+
k63SB2: "x1xlr1w8",
|
|
564
|
+
kZKoxP: "x1fgtraw",
|
|
565
|
+
kjj79g: "xl56j7k",
|
|
566
|
+
kLWn49: "xggjnk3",
|
|
567
|
+
ks0D6T: "x193iq5w",
|
|
568
|
+
kGO01o: "x1j85h84",
|
|
569
|
+
kLKAdn: "xexx8yu",
|
|
570
|
+
kg3NbH: "x17hd1w2",
|
|
571
|
+
kMnn75: "xkrqix3",
|
|
572
|
+
khDVqt: "xuxw1ft",
|
|
573
|
+
$$css: !0
|
|
574
|
+
},
|
|
575
|
+
buttonPrimary: {
|
|
576
|
+
kWkggS: "xt83fp8 x6oolif",
|
|
577
|
+
kMzoRj: "xc342km",
|
|
578
|
+
kMwMTN: "x1f7m26b",
|
|
579
|
+
$$css: !0
|
|
580
|
+
},
|
|
581
|
+
buttonDanger: {
|
|
582
|
+
kWkggS: "x1cgfsch xrnjtfn",
|
|
583
|
+
kVAM5u: "xo5q5bu",
|
|
584
|
+
kMwMTN: "x1f7m26b",
|
|
585
|
+
$$css: !0
|
|
586
|
+
},
|
|
587
|
+
overflowButton: {
|
|
588
|
+
k7Eaqz: "x17s4nb9",
|
|
589
|
+
kg3NbH: "xlkn9b3",
|
|
590
|
+
kzqmXN: "x1849jeq",
|
|
591
|
+
$$css: !0
|
|
592
|
+
},
|
|
593
|
+
picker: {
|
|
594
|
+
kWkggS: "x1itzlyb",
|
|
595
|
+
kVAM5u: "x12ero96",
|
|
596
|
+
kaIpWk: "xsqv9me",
|
|
597
|
+
ksu8eU: "x1y0btm7",
|
|
598
|
+
kMzoRj: "xmkeg23",
|
|
599
|
+
kMwMTN: "xr3bju4",
|
|
600
|
+
kkrTdU: "x1ypdohk",
|
|
601
|
+
kMv6JI: "x1pmjkix",
|
|
602
|
+
kGuDYH: "x6wetls",
|
|
603
|
+
k63SB2: "xo1l8bm",
|
|
604
|
+
kZKoxP: "x1fgtraw",
|
|
605
|
+
kjj79g: "x1nhvcw1",
|
|
606
|
+
kLWn49: "x1bw88vm",
|
|
607
|
+
k1K539: "xqws75s",
|
|
608
|
+
kg3NbH: "x1pbfunf",
|
|
609
|
+
kVAEAm: "x1n2onr6",
|
|
610
|
+
kzqmXN: "xg7gh6y",
|
|
611
|
+
$$css: !0
|
|
612
|
+
},
|
|
613
|
+
pickerIcon: {
|
|
614
|
+
kMwMTN: "xvuv4jf",
|
|
615
|
+
kGuDYH: "xfifm61",
|
|
616
|
+
kLqNvP: "xuhg197",
|
|
617
|
+
kVAEAm: "x10l6tqk",
|
|
618
|
+
$$css: !0
|
|
619
|
+
},
|
|
620
|
+
pickerChevron: {
|
|
621
|
+
kMwMTN: "xvuv4jf",
|
|
622
|
+
kt4wiu: "x1vikou4",
|
|
623
|
+
kVAEAm: "x10l6tqk",
|
|
624
|
+
$$css: !0
|
|
625
|
+
},
|
|
626
|
+
iconButton: {
|
|
627
|
+
kaIpWk: "x1hdofj4",
|
|
628
|
+
kZKoxP: "x10w6t97",
|
|
629
|
+
kg3NbH: "x17hd1w2",
|
|
630
|
+
$$css: !0
|
|
631
|
+
},
|
|
632
|
+
select: {
|
|
633
|
+
kysU6D: "xjyslct",
|
|
634
|
+
kWkggS: "x1itzlyb",
|
|
635
|
+
kVAM5u: "xxqpzdx",
|
|
636
|
+
kaIpWk: "x1hdofj4",
|
|
637
|
+
ksu8eU: "x1y0btm7",
|
|
638
|
+
kMzoRj: "xmkeg23",
|
|
639
|
+
kMwMTN: "xr3bju4",
|
|
640
|
+
kMv6JI: "x1pmjkix",
|
|
641
|
+
kGuDYH: "xif65rj",
|
|
642
|
+
kZKoxP: "xc9qbxq",
|
|
643
|
+
ks0D6T: "x193iq5w",
|
|
644
|
+
k7Eaqz: "x5w4yej",
|
|
645
|
+
kg3NbH: "x1r82r8e",
|
|
646
|
+
$$css: !0
|
|
647
|
+
},
|
|
648
|
+
choiceGroup: {
|
|
649
|
+
ksu8eU: "xng3xce",
|
|
650
|
+
k1xSpc: "x78zum5",
|
|
651
|
+
kXwgrk: "xdt5ytf",
|
|
652
|
+
kOIVth: "x12n5c1t",
|
|
653
|
+
kogj98: "x1ghz6dp",
|
|
654
|
+
kmVPX3: "x1717udv",
|
|
655
|
+
$$css: !0
|
|
656
|
+
},
|
|
657
|
+
choice: {
|
|
658
|
+
kGNEyG: "x1cy8zhl",
|
|
659
|
+
k1xSpc: "x78zum5",
|
|
660
|
+
kOIVth: "x12n5c1t",
|
|
661
|
+
$$css: !0
|
|
662
|
+
},
|
|
663
|
+
inputBlock: {
|
|
664
|
+
k1xSpc: "x78zum5",
|
|
665
|
+
kXwgrk: "xdt5ytf",
|
|
666
|
+
kOIVth: "x17wmo0l",
|
|
667
|
+
$$css: !0
|
|
668
|
+
},
|
|
669
|
+
inputLabel: {
|
|
670
|
+
k63SB2: "x1xlr1w8",
|
|
671
|
+
$$css: !0
|
|
672
|
+
},
|
|
673
|
+
required: {
|
|
674
|
+
kMwMTN: "xyd08hl",
|
|
675
|
+
keTefX: "xwklpps",
|
|
676
|
+
$$css: !0
|
|
677
|
+
},
|
|
678
|
+
input: {
|
|
679
|
+
kWkggS: "x1itzlyb",
|
|
680
|
+
kVAM5u: "xxqpzdx",
|
|
681
|
+
kaIpWk: "x1hdofj4",
|
|
682
|
+
ksu8eU: "x1y0btm7",
|
|
683
|
+
kMzoRj: "xmkeg23",
|
|
684
|
+
kMwMTN: "xr3bju4",
|
|
685
|
+
kMv6JI: "x1pmjkix",
|
|
686
|
+
kGuDYH: "x1rrsw0e",
|
|
687
|
+
kLWn49: "xtyajrp",
|
|
688
|
+
kAzted: "xu0aao5",
|
|
689
|
+
k8WAf4: "x1t0vds8",
|
|
690
|
+
kg3NbH: "x1r82r8e",
|
|
691
|
+
kHenm0: "x288g5",
|
|
692
|
+
kzqmXN: "xh8yej3",
|
|
693
|
+
$$css: !0
|
|
694
|
+
},
|
|
695
|
+
tableScroller: {
|
|
696
|
+
ks0D6T: "x193iq5w",
|
|
697
|
+
kXHlph: "xw2csxc",
|
|
698
|
+
k5wCbM: "x1rohswg",
|
|
699
|
+
$$css: !0
|
|
700
|
+
},
|
|
701
|
+
table: {
|
|
702
|
+
kLvRdT: "x1vathgz",
|
|
703
|
+
kheTzg: "x1gukg7c",
|
|
704
|
+
kGuDYH: "x1rrsw0e",
|
|
705
|
+
kLWn49: "xtyajrp",
|
|
706
|
+
k8WAf4: "x1hq2hf5",
|
|
707
|
+
$$css: !0
|
|
708
|
+
},
|
|
709
|
+
tableCell: {
|
|
710
|
+
kBCPoo: "x1sllf4f",
|
|
711
|
+
k8ry5P: "x18b5jzi",
|
|
712
|
+
ke9TFa: "x1lun4ml",
|
|
713
|
+
kL6WhQ: "x5s9v0k",
|
|
714
|
+
kfdmCh: "x1q0q8m5",
|
|
715
|
+
kt9PQ7: "xso031l",
|
|
716
|
+
k63SB2: "xo1l8bm",
|
|
717
|
+
kZKoxP: "x1fgtraw",
|
|
718
|
+
kGO01o: "x18d9i69",
|
|
719
|
+
kLKAdn: "x1nn3v0j",
|
|
720
|
+
kg3NbH: "x1r82r8e",
|
|
721
|
+
k9WMMc: "x1yc453h",
|
|
722
|
+
kXLuUW: "x16dsc37",
|
|
723
|
+
khDVqt: "xuxw1ft",
|
|
724
|
+
$$css: !0
|
|
725
|
+
},
|
|
726
|
+
tableHeader: {
|
|
727
|
+
kLZC3w: "xmngdqm",
|
|
728
|
+
kPef9Z: "x13fuv20",
|
|
729
|
+
kEafiO: "x178xt8z",
|
|
730
|
+
k63SB2: "x1xlr1w8",
|
|
731
|
+
$$css: !0
|
|
732
|
+
},
|
|
733
|
+
tableCellFirstColumn: {
|
|
734
|
+
kGJrpR: "x5xry9r",
|
|
735
|
+
kVhnKS: "x1t7ytsu",
|
|
736
|
+
k2ei4v: "xpilrb4",
|
|
737
|
+
$$css: !0
|
|
738
|
+
},
|
|
739
|
+
tableCellWrapped: {
|
|
740
|
+
khDVqt: "xeaf4i8",
|
|
741
|
+
$$css: !0
|
|
742
|
+
},
|
|
743
|
+
card: {
|
|
744
|
+
kWkggS: "x1itzlyb",
|
|
745
|
+
kVAM5u: "xdwi0n9",
|
|
746
|
+
kaIpWk: "xsqv9me",
|
|
747
|
+
ksu8eU: "x1y0btm7",
|
|
748
|
+
kMzoRj: "xmkeg23",
|
|
749
|
+
kGVxlE: "xmd40vq",
|
|
750
|
+
k1xSpc: "x78zum5",
|
|
751
|
+
kXwgrk: "xdt5ytf",
|
|
752
|
+
k7Eaqz: "xeuugli",
|
|
753
|
+
kVQacm: "xb3r6kr",
|
|
754
|
+
$$css: !0
|
|
755
|
+
},
|
|
756
|
+
cardHero: {
|
|
757
|
+
kaIpWk: "x2u8bby",
|
|
758
|
+
kskxy: "x1xiyphd",
|
|
759
|
+
kVIFPx: "xl1xv1r",
|
|
760
|
+
kzqmXN: "xh8yej3",
|
|
761
|
+
$$css: !0
|
|
762
|
+
},
|
|
763
|
+
cardContent: {
|
|
764
|
+
k1xSpc: "x78zum5",
|
|
765
|
+
kXwgrk: "xdt5ytf",
|
|
766
|
+
kOIVth: "x12n5c1t",
|
|
767
|
+
k8WAf4: "xs20w12",
|
|
768
|
+
kg3NbH: "xzgshkr",
|
|
769
|
+
$$css: !0
|
|
770
|
+
},
|
|
771
|
+
cardHeading: {
|
|
772
|
+
kGNEyG: "x6s0dn4",
|
|
773
|
+
k1xSpc: "x78zum5",
|
|
774
|
+
kOIVth: "x12n5c1t",
|
|
775
|
+
$$css: !0
|
|
776
|
+
},
|
|
777
|
+
cardIcon: {
|
|
778
|
+
kaIpWk: "x1hdofj4",
|
|
779
|
+
kZKoxP: "xc9qbxq",
|
|
780
|
+
kVIFPx: "xl1xv1r",
|
|
781
|
+
kzqmXN: "x14qfxbe",
|
|
782
|
+
$$css: !0
|
|
783
|
+
},
|
|
784
|
+
cardTitle: {
|
|
785
|
+
k63SB2: "x1xlr1w8",
|
|
786
|
+
$$css: !0
|
|
787
|
+
},
|
|
788
|
+
cardActions: {
|
|
789
|
+
kLZC3w: "xawdbnq",
|
|
790
|
+
kPef9Z: "x13fuv20",
|
|
791
|
+
kEafiO: "x178xt8z",
|
|
792
|
+
k1xSpc: "x78zum5",
|
|
793
|
+
kOIVth: "x12n5c1t",
|
|
794
|
+
kjj79g: "x13a6bvl",
|
|
795
|
+
k8WAf4: "x10wxn1s",
|
|
796
|
+
kg3NbH: "x1r82r8e",
|
|
797
|
+
$$css: !0
|
|
798
|
+
},
|
|
799
|
+
carousel: {
|
|
800
|
+
k1xSpc: "x78zum5",
|
|
801
|
+
kOIVth: "xyf1f98",
|
|
802
|
+
ks0D6T: "x193iq5w",
|
|
803
|
+
kXHlph: "xw2csxc",
|
|
804
|
+
kGO01o: "x1pl6tyu",
|
|
805
|
+
kc424l: "xhfbhpw",
|
|
806
|
+
$$css: !0
|
|
807
|
+
},
|
|
808
|
+
carouselCard: {
|
|
809
|
+
kCS8Yb: "x1a4bs9z",
|
|
810
|
+
kzQI83: "x1c4vz4f",
|
|
811
|
+
kmuXW: "x2lah0s",
|
|
812
|
+
k5xd4v: "x1bhewko",
|
|
813
|
+
$$css: !0
|
|
814
|
+
},
|
|
815
|
+
alert: {
|
|
816
|
+
kGNEyG: "x1cy8zhl",
|
|
817
|
+
kWkggS: "x1fatxfb",
|
|
818
|
+
kVAM5u: "xxqpzdx",
|
|
819
|
+
kaIpWk: "x1hdofj4",
|
|
820
|
+
ksu8eU: "x1y0btm7",
|
|
821
|
+
kMzoRj: "xmkeg23",
|
|
822
|
+
k1xSpc: "x78zum5",
|
|
823
|
+
kOIVth: "x12n5c1t",
|
|
824
|
+
k8WAf4: "xs20w12",
|
|
825
|
+
kg3NbH: "x1r82r8e",
|
|
826
|
+
$$css: !0
|
|
827
|
+
},
|
|
828
|
+
alertInfo: {
|
|
829
|
+
kGJrpR: "x159hbhe",
|
|
830
|
+
k2ei4v: "x56jcm7",
|
|
831
|
+
$$css: !0
|
|
832
|
+
},
|
|
833
|
+
alertWarning: {
|
|
834
|
+
kGJrpR: "xyg2ju7",
|
|
835
|
+
k2ei4v: "x56jcm7",
|
|
836
|
+
$$css: !0
|
|
837
|
+
},
|
|
838
|
+
alertError: {
|
|
839
|
+
kGJrpR: "xrncz1v",
|
|
840
|
+
k2ei4v: "x56jcm7",
|
|
841
|
+
$$css: !0
|
|
842
|
+
},
|
|
843
|
+
alertSuccess: {
|
|
844
|
+
kGJrpR: "x1q3k51m",
|
|
845
|
+
k2ei4v: "x56jcm7",
|
|
846
|
+
$$css: !0
|
|
847
|
+
},
|
|
848
|
+
container: {
|
|
849
|
+
kWkggS: "x1itzlyb",
|
|
850
|
+
kVAM5u: "xdwi0n9",
|
|
851
|
+
kaIpWk: "xsqv9me",
|
|
852
|
+
ksu8eU: "x1y0btm7",
|
|
853
|
+
kMzoRj: "xmkeg23",
|
|
854
|
+
kVQacm: "xb3r6kr",
|
|
855
|
+
$$css: !0
|
|
856
|
+
},
|
|
857
|
+
containerHeader: {
|
|
858
|
+
kGNEyG: "x6s0dn4",
|
|
859
|
+
k1xSpc: "x78zum5",
|
|
860
|
+
kOIVth: "x12n5c1t",
|
|
861
|
+
k8WAf4: "xs20w12",
|
|
862
|
+
kg3NbH: "xzgshkr",
|
|
863
|
+
$$css: !0
|
|
864
|
+
},
|
|
865
|
+
containerHeaderDivider: {
|
|
866
|
+
kL6WhQ: "x17fznl5",
|
|
867
|
+
kfdmCh: "x1q0q8m5",
|
|
868
|
+
kt9PQ7: "xso031l",
|
|
869
|
+
$$css: !0
|
|
870
|
+
},
|
|
871
|
+
containerBody: {
|
|
872
|
+
k1xSpc: "x78zum5",
|
|
873
|
+
kXwgrk: "xdt5ytf",
|
|
874
|
+
k8WAf4: "x10wxn1s",
|
|
875
|
+
kg3NbH: "xzgshkr",
|
|
876
|
+
$$css: !0
|
|
877
|
+
},
|
|
878
|
+
task: {
|
|
879
|
+
kVAM5u: "xdwi0n9",
|
|
880
|
+
kaIpWk: "x1hdofj4",
|
|
881
|
+
ksu8eU: "x1y0btm7",
|
|
882
|
+
kMzoRj: "xmkeg23",
|
|
883
|
+
k1xSpc: "x78zum5",
|
|
884
|
+
kXwgrk: "xdt5ytf",
|
|
885
|
+
kOIVth: "x12n5c1t",
|
|
886
|
+
k8WAf4: "xs20w12",
|
|
887
|
+
kg3NbH: "x1r82r8e",
|
|
888
|
+
$$css: !0
|
|
889
|
+
},
|
|
890
|
+
taskHeading: {
|
|
891
|
+
kGNEyG: "x6s0dn4",
|
|
892
|
+
k1xSpc: "x78zum5",
|
|
893
|
+
k63SB2: "x1xlr1w8",
|
|
894
|
+
kOIVth: "x12n5c1t",
|
|
895
|
+
$$css: !0
|
|
896
|
+
},
|
|
897
|
+
taskStatus: {
|
|
898
|
+
kaIpWk: "x1e6avla",
|
|
899
|
+
kGuDYH: "x1j6dyjg",
|
|
900
|
+
k63SB2: "x1xlr1w8",
|
|
901
|
+
kLWn49: "xd4r4e8",
|
|
902
|
+
kg3NbH: "x17hd1w2",
|
|
903
|
+
kP9fke: "xtvhhri",
|
|
904
|
+
$$css: !0
|
|
905
|
+
},
|
|
906
|
+
plan: {
|
|
907
|
+
k1xSpc: "x78zum5",
|
|
908
|
+
kXwgrk: "xdt5ytf",
|
|
909
|
+
kOIVth: "x12n5c1t",
|
|
910
|
+
$$css: !0
|
|
911
|
+
},
|
|
912
|
+
file: {
|
|
913
|
+
kGNEyG: "x6s0dn4",
|
|
914
|
+
kVAM5u: "xdwi0n9",
|
|
915
|
+
kaIpWk: "x1hdofj4",
|
|
916
|
+
ksu8eU: "x1y0btm7",
|
|
917
|
+
kMzoRj: "xmkeg23",
|
|
918
|
+
k1xSpc: "x78zum5",
|
|
919
|
+
kOIVth: "xyf1f98",
|
|
920
|
+
k8WAf4: "xs20w12",
|
|
921
|
+
kg3NbH: "x1r82r8e",
|
|
922
|
+
$$css: !0
|
|
923
|
+
},
|
|
924
|
+
markdown: {
|
|
925
|
+
k1xSpc: "x78zum5",
|
|
926
|
+
kXwgrk: "xdt5ytf",
|
|
927
|
+
kOIVth: "x12n5c1t",
|
|
928
|
+
$$css: !0
|
|
929
|
+
},
|
|
930
|
+
chartScroller: {
|
|
931
|
+
kqGvvJ: "x1npninb",
|
|
932
|
+
ks0D6T: "x193iq5w",
|
|
933
|
+
kXHlph: "xw2csxc",
|
|
934
|
+
k5wCbM: "x1rohswg",
|
|
935
|
+
$$css: !0
|
|
936
|
+
},
|
|
937
|
+
chartCard: {
|
|
938
|
+
kWkggS: "x1itzlyb",
|
|
939
|
+
kVAM5u: "x1h41ylt",
|
|
940
|
+
kaIpWk: "xegd2im",
|
|
941
|
+
ksu8eU: "x1y0btm7",
|
|
942
|
+
kMzoRj: "xmkeg23",
|
|
943
|
+
ks0D6T: "xc5f494",
|
|
944
|
+
k7Eaqz: "x13o0s5z",
|
|
945
|
+
kzqmXN: "xh8yej3",
|
|
946
|
+
$$css: !0
|
|
947
|
+
},
|
|
948
|
+
chartContent: {
|
|
949
|
+
k1xSpc: "x78zum5",
|
|
950
|
+
kXwgrk: "xdt5ytf",
|
|
951
|
+
kOIVth: "x12n5c1t",
|
|
952
|
+
k8WAf4: "xs20w12",
|
|
953
|
+
kg3NbH: "x1r82r8e",
|
|
954
|
+
$$css: !0
|
|
955
|
+
},
|
|
956
|
+
chartTitle: {
|
|
957
|
+
kMwMTN: "xr3bju4",
|
|
958
|
+
kGuDYH: "xlwa70p",
|
|
959
|
+
k63SB2: "x1uu0p8",
|
|
960
|
+
kLWn49: "x4321kk",
|
|
961
|
+
kqGvvJ: "x10im51j",
|
|
962
|
+
$$css: !0
|
|
963
|
+
},
|
|
964
|
+
chartPlotArea: {
|
|
965
|
+
k1xSpc: "x78zum5",
|
|
966
|
+
kXwgrk: "xdt5ytf",
|
|
967
|
+
$$css: !0
|
|
968
|
+
},
|
|
969
|
+
chartCanvas: {
|
|
970
|
+
kVAEAm: "x1n2onr6",
|
|
971
|
+
$$css: !0
|
|
972
|
+
},
|
|
973
|
+
chartSvg: {
|
|
974
|
+
k1xSpc: "x1lliihq",
|
|
975
|
+
kfSwDN: "x87ps6o",
|
|
976
|
+
$$css: !0
|
|
977
|
+
},
|
|
978
|
+
chartGridline: {
|
|
979
|
+
kjVXCG: "x1li7xbp",
|
|
980
|
+
$$css: !0
|
|
981
|
+
},
|
|
982
|
+
chartTickText: {
|
|
983
|
+
kDwRjp: "xivj14e",
|
|
984
|
+
kMv6JI: "x1xdnmw1",
|
|
985
|
+
kGuDYH: "x6wetls",
|
|
986
|
+
$$css: !0
|
|
987
|
+
},
|
|
988
|
+
chartLinePath: {
|
|
989
|
+
kJdQPc: "x1ck585c",
|
|
990
|
+
kfJifR: "x8pzrqk",
|
|
991
|
+
$$css: !0
|
|
992
|
+
},
|
|
993
|
+
chartAreaFill: {
|
|
994
|
+
kVYP8I: "xsn0423",
|
|
995
|
+
$$css: !0
|
|
996
|
+
},
|
|
997
|
+
chartAreaFallbackFill: {
|
|
998
|
+
kVYP8I: "x1e57jxs",
|
|
999
|
+
$$css: !0
|
|
1000
|
+
},
|
|
1001
|
+
pieSlice: {
|
|
1002
|
+
kjVXCG: "x13lnj35",
|
|
1003
|
+
kJdQPc: "x1f6yumg",
|
|
1004
|
+
kfJifR: "x8pzrqk",
|
|
1005
|
+
$$css: !0
|
|
1006
|
+
},
|
|
1007
|
+
chartXAxisLabel: {
|
|
1008
|
+
kMwMTN: "xr3bju4",
|
|
1009
|
+
kGuDYH: "x6wetls",
|
|
1010
|
+
k63SB2: "x1xlr1w8",
|
|
1011
|
+
kLWn49: "x1bw88vm",
|
|
1012
|
+
kLKAdn: "xfja3g7",
|
|
1013
|
+
kZCmMZ: "xyuoyjg",
|
|
1014
|
+
k9WMMc: "x2b8uid",
|
|
1015
|
+
$$css: !0
|
|
1016
|
+
},
|
|
1017
|
+
chartYAxisLabel: {
|
|
1018
|
+
kGNEyG: "x6s0dn4",
|
|
1019
|
+
k1xSpc: "x78zum5",
|
|
1020
|
+
kZKoxP: "xopl6j5",
|
|
1021
|
+
k87sOh: "xfr5jun",
|
|
1022
|
+
kLqNvP: "x1o0tod",
|
|
1023
|
+
kjj79g: "xl56j7k",
|
|
1024
|
+
kVAEAm: "x10l6tqk",
|
|
1025
|
+
kzqmXN: "x1xp8n7a",
|
|
1026
|
+
$$css: !0
|
|
1027
|
+
},
|
|
1028
|
+
chartYAxisLabelText: {
|
|
1029
|
+
kMwMTN: "xr3bju4",
|
|
1030
|
+
kGuDYH: "x6wetls",
|
|
1031
|
+
k63SB2: "x1xlr1w8",
|
|
1032
|
+
kLWn49: "x1bw88vm",
|
|
1033
|
+
khDVqt: "xuxw1ft",
|
|
1034
|
+
kW8zPn: "x35i7",
|
|
1035
|
+
$$css: !0
|
|
1036
|
+
},
|
|
1037
|
+
chartLegend: {
|
|
1038
|
+
kGNEyG: "x6s0dn4",
|
|
1039
|
+
k1xSpc: "x78zum5",
|
|
1040
|
+
kwnvtZ: "x1a02dak",
|
|
1041
|
+
kGuDYH: "x6wetls",
|
|
1042
|
+
kOIVth: "x12n5c1t",
|
|
1043
|
+
kjj79g: "xl56j7k",
|
|
1044
|
+
kLWn49: "x1bw88vm",
|
|
1045
|
+
kLKAdn: "xfja3g7",
|
|
1046
|
+
$$css: !0
|
|
1047
|
+
},
|
|
1048
|
+
chartLegendCartesian: {
|
|
1049
|
+
kZCmMZ: "xyuoyjg",
|
|
1050
|
+
$$css: !0
|
|
1051
|
+
},
|
|
1052
|
+
chartLegendItem: {
|
|
1053
|
+
kGNEyG: "x6s0dn4",
|
|
1054
|
+
k1xSpc: "x78zum5",
|
|
1055
|
+
kOIVth: "x12n5c1t",
|
|
1056
|
+
khDVqt: "xuxw1ft",
|
|
1057
|
+
$$css: !0
|
|
1058
|
+
},
|
|
1059
|
+
chartLegendSwatch: {
|
|
1060
|
+
kaIpWk: "x10hpsqq",
|
|
1061
|
+
k1xSpc: "x1lliihq",
|
|
1062
|
+
kZKoxP: "x170jfvy",
|
|
1063
|
+
kzqmXN: "x1fsd2vl",
|
|
1064
|
+
$$css: !0
|
|
1065
|
+
},
|
|
1066
|
+
dataTable: {
|
|
1067
|
+
k1xSpc: "x78zum5",
|
|
1068
|
+
kXwgrk: "xdt5ytf",
|
|
1069
|
+
kqGvvJ: "x19v53j4",
|
|
1070
|
+
$$css: !0
|
|
1071
|
+
},
|
|
1072
|
+
dataTableHeaderBar: {
|
|
1073
|
+
kGNEyG: "x6s0dn4",
|
|
1074
|
+
k1xSpc: "x78zum5",
|
|
1075
|
+
kOIVth: "x12n5c1t",
|
|
1076
|
+
k8WAf4: "x10wxn1s",
|
|
1077
|
+
kg3NbH: "x1nye7i",
|
|
1078
|
+
$$css: !0
|
|
1079
|
+
},
|
|
1080
|
+
dataTableTitle: {
|
|
1081
|
+
kzQI83: "x1iyjqo2",
|
|
1082
|
+
k63SB2: "x1uu0p8",
|
|
1083
|
+
k7Eaqz: "xeuugli",
|
|
1084
|
+
kVQacm: "xb3r6kr",
|
|
1085
|
+
kg5iWk: "xlyipyv",
|
|
1086
|
+
khDVqt: "xuxw1ft",
|
|
1087
|
+
$$css: !0
|
|
1088
|
+
},
|
|
1089
|
+
dataTableFilter: {
|
|
1090
|
+
kGNEyG: "x6s0dn4",
|
|
1091
|
+
kWkggS: "x1itzlyb",
|
|
1092
|
+
kVAM5u: "x12ero96",
|
|
1093
|
+
kaIpWk: "xsqv9me",
|
|
1094
|
+
ksu8eU: "x1y0btm7",
|
|
1095
|
+
kMzoRj: "xmkeg23",
|
|
1096
|
+
kMwMTN: "xr3bju4",
|
|
1097
|
+
k1xSpc: "x78zum5",
|
|
1098
|
+
kmuXW: "x2lah0s",
|
|
1099
|
+
kGuDYH: "x6wetls",
|
|
1100
|
+
kZKoxP: "x1fgtraw",
|
|
1101
|
+
kg3NbH: "x1nye7i",
|
|
1102
|
+
kzqmXN: "x35muul",
|
|
1103
|
+
$$css: !0
|
|
1104
|
+
},
|
|
1105
|
+
dataTableFilterInput: {
|
|
1106
|
+
kWkggS: "xjbqb8w",
|
|
1107
|
+
ksu8eU: "xng3xce",
|
|
1108
|
+
kMwMTN: "xr3bju4",
|
|
1109
|
+
kMv6JI: "x1pmjkix",
|
|
1110
|
+
kGuDYH: "x6wetls",
|
|
1111
|
+
k7Eaqz: "xeuugli",
|
|
1112
|
+
kI3sdo: "x1a2a7pz",
|
|
1113
|
+
k8WAf4: "xt970qd",
|
|
1114
|
+
kg3NbH: "x1nye7i",
|
|
1115
|
+
kzqmXN: "xh8yej3",
|
|
1116
|
+
$$css: !0
|
|
1117
|
+
},
|
|
1118
|
+
dataTableIconButton: {
|
|
1119
|
+
kGNEyG: "x6s0dn4",
|
|
1120
|
+
kWkggS: "xjbqb8w xb1q457",
|
|
1121
|
+
kVAM5u: "x12ero96",
|
|
1122
|
+
kaIpWk: "xsqv9me",
|
|
1123
|
+
ksu8eU: "x1y0btm7",
|
|
1124
|
+
kMzoRj: "xmkeg23",
|
|
1125
|
+
kMwMTN: "xlx0kvv",
|
|
1126
|
+
kkrTdU: "x1ypdohk",
|
|
1127
|
+
k1xSpc: "x3nfvp2",
|
|
1128
|
+
kmuXW: "x2lah0s",
|
|
1129
|
+
kZKoxP: "x1fgtraw",
|
|
1130
|
+
kjj79g: "xl56j7k",
|
|
1131
|
+
k8WAf4: "xt970qd",
|
|
1132
|
+
kg3NbH: "xnjsko4",
|
|
1133
|
+
kzqmXN: "xgd8bvy",
|
|
1134
|
+
$$css: !0
|
|
1135
|
+
},
|
|
1136
|
+
dataTableBand: {
|
|
1137
|
+
kWkggS: "xvpodxj",
|
|
1138
|
+
kaIpWk: "xegd2im",
|
|
1139
|
+
kg3NbH: "x1nye7i",
|
|
1140
|
+
$$css: !0
|
|
1141
|
+
},
|
|
1142
|
+
dataTableBandUnpaginated: {
|
|
1143
|
+
kGO01o: "xdzjq9u",
|
|
1144
|
+
$$css: !0
|
|
1145
|
+
},
|
|
1146
|
+
dataTableTable: {
|
|
1147
|
+
kLvRdT: "x1vathgz",
|
|
1148
|
+
kheTzg: "x1gukg7c",
|
|
1149
|
+
kGuDYH: "x1rrsw0e",
|
|
1150
|
+
kLWn49: "xtyajrp",
|
|
1151
|
+
kzqmXN: "xh8yej3",
|
|
1152
|
+
$$css: !0
|
|
1153
|
+
},
|
|
1154
|
+
dataTableTh: {
|
|
1155
|
+
kMwMTN: "xlx0kvv",
|
|
1156
|
+
kGuDYH: "x6wetls",
|
|
1157
|
+
k63SB2: "x1xlr1w8",
|
|
1158
|
+
kZKoxP: "xc9qbxq",
|
|
1159
|
+
kLWn49: "x1bw88vm",
|
|
1160
|
+
k8WAf4: "xt970qd",
|
|
1161
|
+
kg3NbH: "x1r82r8e",
|
|
1162
|
+
k9WMMc: "x1yc453h",
|
|
1163
|
+
kXLuUW: "xxymvpz",
|
|
1164
|
+
$$css: !0
|
|
1165
|
+
},
|
|
1166
|
+
dataTableTd: {
|
|
1167
|
+
kWkggS: "x1itzlyb",
|
|
1168
|
+
kLZC3w: "xccwo0",
|
|
1169
|
+
kPef9Z: "x13fuv20",
|
|
1170
|
+
kEafiO: "x178xt8z",
|
|
1171
|
+
kMwMTN: "xr3bju4",
|
|
1172
|
+
kZKoxP: "xsdox4t",
|
|
1173
|
+
k8WAf4: "xt970qd",
|
|
1174
|
+
kg3NbH: "x1r82r8e",
|
|
1175
|
+
k9WMMc: "x1yc453h",
|
|
1176
|
+
kXLuUW: "xxymvpz",
|
|
1177
|
+
$$css: !0
|
|
1178
|
+
},
|
|
1179
|
+
dataTableRadiusTopStart: {
|
|
1180
|
+
krdFHd: "x1kpm8pg",
|
|
1181
|
+
$$css: !0
|
|
1182
|
+
},
|
|
1183
|
+
dataTableRadiusTopEnd: {
|
|
1184
|
+
kfmiAY: "xdd0blh",
|
|
1185
|
+
$$css: !0
|
|
1186
|
+
},
|
|
1187
|
+
dataTableRadiusBottomStart: {
|
|
1188
|
+
kVL7Gh: "x6rc8tz",
|
|
1189
|
+
$$css: !0
|
|
1190
|
+
},
|
|
1191
|
+
dataTableRadiusBottomEnd: {
|
|
1192
|
+
kT0f0o: "xdrwjz2",
|
|
1193
|
+
$$css: !0
|
|
1194
|
+
},
|
|
1195
|
+
dataTablePagination: {
|
|
1196
|
+
kGNEyG: "x6s0dn4",
|
|
1197
|
+
kMwMTN: "xlx0kvv",
|
|
1198
|
+
k1xSpc: "x78zum5",
|
|
1199
|
+
kGuDYH: "x6wetls",
|
|
1200
|
+
kOIVth: "x12n5c1t",
|
|
1201
|
+
kjj79g: "xl56j7k",
|
|
1202
|
+
kLWn49: "x1bw88vm",
|
|
1203
|
+
k8WAf4: "x1t0vds8",
|
|
1204
|
+
$$css: !0
|
|
1205
|
+
},
|
|
1206
|
+
dataTablePageChevron: {
|
|
1207
|
+
kGNEyG: "x6s0dn4",
|
|
1208
|
+
kWkggS: "xjbqb8w",
|
|
1209
|
+
kaIpWk: "xsqv9me",
|
|
1210
|
+
ksu8eU: "xng3xce",
|
|
1211
|
+
kMwMTN: "xlx0kvv",
|
|
1212
|
+
kkrTdU: "x1ypdohk",
|
|
1213
|
+
k1xSpc: "x3nfvp2",
|
|
1214
|
+
kGuDYH: "x1rrsw0e",
|
|
1215
|
+
kZKoxP: "x1qx5ct2",
|
|
1216
|
+
kjj79g: "xl56j7k",
|
|
1217
|
+
kSiTet: "x1hc1fzr x1lfpgzf",
|
|
1218
|
+
k8WAf4: "xt970qd",
|
|
1219
|
+
kg3NbH: "xnjsko4",
|
|
1220
|
+
kzqmXN: "xw4jnvo",
|
|
1221
|
+
$$css: !0
|
|
1222
|
+
},
|
|
1223
|
+
dataTablePageButton: {
|
|
1224
|
+
kGNEyG: "x6s0dn4",
|
|
1225
|
+
kWkggS: "xjbqb8w",
|
|
1226
|
+
kaIpWk: "x1hdofj4",
|
|
1227
|
+
ksu8eU: "xng3xce",
|
|
1228
|
+
kMwMTN: "x1alddev",
|
|
1229
|
+
kkrTdU: "x1ypdohk",
|
|
1230
|
+
k1xSpc: "x3nfvp2",
|
|
1231
|
+
kGuDYH: "x6wetls",
|
|
1232
|
+
kZKoxP: "x1qx5ct2",
|
|
1233
|
+
kjj79g: "xl56j7k",
|
|
1234
|
+
kLWn49: "x1bw88vm",
|
|
1235
|
+
keTefX: "x34y3n0",
|
|
1236
|
+
k7Eaqz: "xt4ypqs",
|
|
1237
|
+
k8WAf4: "xt970qd",
|
|
1238
|
+
kg3NbH: "x1xijbu4",
|
|
1239
|
+
$$css: !0
|
|
1240
|
+
},
|
|
1241
|
+
dataTablePageButtonActive: {
|
|
1242
|
+
kWkggS: "xt83fp8",
|
|
1243
|
+
kMwMTN: "x1f7m26b",
|
|
1244
|
+
$$css: !0
|
|
1245
|
+
},
|
|
1246
|
+
reference: {
|
|
1247
|
+
kWkggS: "x199zixi",
|
|
1248
|
+
kaIpWk: "x18zih8k",
|
|
1249
|
+
kMwMTN: "xlx0kvv",
|
|
1250
|
+
kGuDYH: "x6wetls",
|
|
1251
|
+
kg3NbH: "x1nye7i",
|
|
1252
|
+
$$css: !0
|
|
1253
|
+
},
|
|
1254
|
+
unhandled: {
|
|
1255
|
+
kWkggS: "x1fatxfb",
|
|
1256
|
+
kVAM5u: "xdwi0n9",
|
|
1257
|
+
kaIpWk: "x1hdofj4",
|
|
1258
|
+
ksu8eU: "x1y0btm7",
|
|
1259
|
+
kMzoRj: "xmkeg23",
|
|
1260
|
+
kMwMTN: "xlx0kvv",
|
|
1261
|
+
kGuDYH: "x6wetls",
|
|
1262
|
+
k8WAf4: "x10wxn1s",
|
|
1263
|
+
kg3NbH: "x1r82r8e",
|
|
1264
|
+
$$css: !0
|
|
1265
|
+
},
|
|
1266
|
+
visuallyHidden: {
|
|
1267
|
+
kMcinP: "xeh89do",
|
|
1268
|
+
kz4h6p: "x1hyvwdk",
|
|
1269
|
+
kZKoxP: "xjm9jq1",
|
|
1270
|
+
kVQacm: "xb3r6kr",
|
|
1271
|
+
kVAEAm: "x10l6tqk",
|
|
1272
|
+
khDVqt: "xuxw1ft",
|
|
1273
|
+
kzqmXN: "x1i1rx1s",
|
|
1274
|
+
$$css: !0
|
|
1275
|
+
}
|
|
1276
|
+
}, E = {
|
|
1277
|
+
fill1: {
|
|
1278
|
+
kDwRjp: "xtzl89e",
|
|
1279
|
+
$$css: !0
|
|
1280
|
+
},
|
|
1281
|
+
fill2: {
|
|
1282
|
+
kDwRjp: "xhtsb06",
|
|
1283
|
+
$$css: !0
|
|
1284
|
+
},
|
|
1285
|
+
fill3: {
|
|
1286
|
+
kDwRjp: "x40gz2k",
|
|
1287
|
+
$$css: !0
|
|
1288
|
+
},
|
|
1289
|
+
fill4: {
|
|
1290
|
+
kDwRjp: "x18bpcoy",
|
|
1291
|
+
$$css: !0
|
|
1292
|
+
},
|
|
1293
|
+
fill5: {
|
|
1294
|
+
kDwRjp: "x1jfbz69",
|
|
1295
|
+
$$css: !0
|
|
1296
|
+
},
|
|
1297
|
+
fill6: {
|
|
1298
|
+
kDwRjp: "xuvz3d1",
|
|
1299
|
+
$$css: !0
|
|
1300
|
+
},
|
|
1301
|
+
fill7: {
|
|
1302
|
+
kDwRjp: "xgh9wk2",
|
|
1303
|
+
$$css: !0
|
|
1304
|
+
},
|
|
1305
|
+
fill8: {
|
|
1306
|
+
kDwRjp: "xcik9sg",
|
|
1307
|
+
$$css: !0
|
|
1308
|
+
},
|
|
1309
|
+
fill9: {
|
|
1310
|
+
kDwRjp: "x1ppuy4m",
|
|
1311
|
+
$$css: !0
|
|
1312
|
+
},
|
|
1313
|
+
fill10: {
|
|
1314
|
+
kDwRjp: "x1kk73je",
|
|
1315
|
+
$$css: !0
|
|
1316
|
+
},
|
|
1317
|
+
fill11: {
|
|
1318
|
+
kDwRjp: "x1grxdoe",
|
|
1319
|
+
$$css: !0
|
|
1320
|
+
},
|
|
1321
|
+
fill12: {
|
|
1322
|
+
kDwRjp: "xn18j63",
|
|
1323
|
+
$$css: !0
|
|
1324
|
+
},
|
|
1325
|
+
stroke1: {
|
|
1326
|
+
kjVXCG: "xr5mi3n",
|
|
1327
|
+
$$css: !0
|
|
1328
|
+
},
|
|
1329
|
+
stroke2: {
|
|
1330
|
+
kjVXCG: "xxuc5cw",
|
|
1331
|
+
$$css: !0
|
|
1332
|
+
},
|
|
1333
|
+
stroke3: {
|
|
1334
|
+
kjVXCG: "x2y61bw",
|
|
1335
|
+
$$css: !0
|
|
1336
|
+
},
|
|
1337
|
+
stroke4: {
|
|
1338
|
+
kjVXCG: "x14vfwx2",
|
|
1339
|
+
$$css: !0
|
|
1340
|
+
},
|
|
1341
|
+
stroke5: {
|
|
1342
|
+
kjVXCG: "x107q3u5",
|
|
1343
|
+
$$css: !0
|
|
1344
|
+
},
|
|
1345
|
+
stroke6: {
|
|
1346
|
+
kjVXCG: "x15kttyg",
|
|
1347
|
+
$$css: !0
|
|
1348
|
+
},
|
|
1349
|
+
stroke7: {
|
|
1350
|
+
kjVXCG: "xwopo54",
|
|
1351
|
+
$$css: !0
|
|
1352
|
+
},
|
|
1353
|
+
stroke8: {
|
|
1354
|
+
kjVXCG: "x1n79cs4",
|
|
1355
|
+
$$css: !0
|
|
1356
|
+
},
|
|
1357
|
+
stroke9: {
|
|
1358
|
+
kjVXCG: "xjwd1fr",
|
|
1359
|
+
$$css: !0
|
|
1360
|
+
},
|
|
1361
|
+
stroke10: {
|
|
1362
|
+
kjVXCG: "xyr8hbx",
|
|
1363
|
+
$$css: !0
|
|
1364
|
+
},
|
|
1365
|
+
stroke11: {
|
|
1366
|
+
kjVXCG: "xr5op8g",
|
|
1367
|
+
$$css: !0
|
|
1368
|
+
},
|
|
1369
|
+
stroke12: {
|
|
1370
|
+
kjVXCG: "xiv3644",
|
|
1371
|
+
$$css: !0
|
|
1372
|
+
},
|
|
1373
|
+
swatch1: {
|
|
1374
|
+
kWkggS: "x16spyt8",
|
|
1375
|
+
$$css: !0
|
|
1376
|
+
},
|
|
1377
|
+
swatch2: {
|
|
1378
|
+
kWkggS: "xvqqcf1",
|
|
1379
|
+
$$css: !0
|
|
1380
|
+
},
|
|
1381
|
+
swatch3: {
|
|
1382
|
+
kWkggS: "xanfl35",
|
|
1383
|
+
$$css: !0
|
|
1384
|
+
},
|
|
1385
|
+
swatch4: {
|
|
1386
|
+
kWkggS: "x1uwglha",
|
|
1387
|
+
$$css: !0
|
|
1388
|
+
},
|
|
1389
|
+
swatch5: {
|
|
1390
|
+
kWkggS: "xxdvdsm",
|
|
1391
|
+
$$css: !0
|
|
1392
|
+
},
|
|
1393
|
+
swatch6: {
|
|
1394
|
+
kWkggS: "xp9jimw",
|
|
1395
|
+
$$css: !0
|
|
1396
|
+
},
|
|
1397
|
+
swatch7: {
|
|
1398
|
+
kWkggS: "x1puna6j",
|
|
1399
|
+
$$css: !0
|
|
1400
|
+
},
|
|
1401
|
+
swatch8: {
|
|
1402
|
+
kWkggS: "x1qvrrfc",
|
|
1403
|
+
$$css: !0
|
|
1404
|
+
},
|
|
1405
|
+
swatch9: {
|
|
1406
|
+
kWkggS: "x1hpw8ye",
|
|
1407
|
+
$$css: !0
|
|
1408
|
+
},
|
|
1409
|
+
swatch10: {
|
|
1410
|
+
kWkggS: "x1g11eq6",
|
|
1411
|
+
$$css: !0
|
|
1412
|
+
},
|
|
1413
|
+
swatch11: {
|
|
1414
|
+
kWkggS: "x13m5t",
|
|
1415
|
+
$$css: !0
|
|
1416
|
+
},
|
|
1417
|
+
swatch12: {
|
|
1418
|
+
kWkggS: "x1mppn65",
|
|
1419
|
+
$$css: !0
|
|
1420
|
+
},
|
|
1421
|
+
tint1: {
|
|
1422
|
+
kDwRjp: "x1ttro82",
|
|
1423
|
+
$$css: !0
|
|
1424
|
+
},
|
|
1425
|
+
tint2: {
|
|
1426
|
+
kDwRjp: "xqo2i6n",
|
|
1427
|
+
$$css: !0
|
|
1428
|
+
},
|
|
1429
|
+
tint3: {
|
|
1430
|
+
kDwRjp: "x1e7csjy",
|
|
1431
|
+
$$css: !0
|
|
1432
|
+
},
|
|
1433
|
+
tint4: {
|
|
1434
|
+
kDwRjp: "x1n92c87",
|
|
1435
|
+
$$css: !0
|
|
1436
|
+
},
|
|
1437
|
+
tint5: {
|
|
1438
|
+
kDwRjp: "xs5yibb",
|
|
1439
|
+
$$css: !0
|
|
1440
|
+
},
|
|
1441
|
+
tint6: {
|
|
1442
|
+
kDwRjp: "x1mnwzol",
|
|
1443
|
+
$$css: !0
|
|
1444
|
+
}
|
|
1445
|
+
}, ae = {
|
|
1446
|
+
fill: E.fill1,
|
|
1447
|
+
stroke: E.stroke1,
|
|
1448
|
+
swatch: E.swatch1,
|
|
1449
|
+
tint: E.tint1
|
|
1450
|
+
}, oe = [
|
|
1451
|
+
ae,
|
|
1452
|
+
{
|
|
1453
|
+
fill: E.fill2,
|
|
1454
|
+
stroke: E.stroke2,
|
|
1455
|
+
swatch: E.swatch2,
|
|
1456
|
+
tint: E.tint2
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
fill: E.fill3,
|
|
1460
|
+
stroke: E.stroke3,
|
|
1461
|
+
swatch: E.swatch3,
|
|
1462
|
+
tint: E.tint3
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
fill: E.fill4,
|
|
1466
|
+
stroke: E.stroke4,
|
|
1467
|
+
swatch: E.swatch4,
|
|
1468
|
+
tint: E.tint4
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
fill: E.fill5,
|
|
1472
|
+
stroke: E.stroke5,
|
|
1473
|
+
swatch: E.swatch5,
|
|
1474
|
+
tint: E.tint5
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
fill: E.fill6,
|
|
1478
|
+
stroke: E.stroke6,
|
|
1479
|
+
swatch: E.swatch6,
|
|
1480
|
+
tint: E.tint6
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
fill: E.fill7,
|
|
1484
|
+
stroke: E.stroke7,
|
|
1485
|
+
swatch: E.swatch7,
|
|
1486
|
+
tint: E.fill7
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
fill: E.fill8,
|
|
1490
|
+
stroke: E.stroke8,
|
|
1491
|
+
swatch: E.swatch8,
|
|
1492
|
+
tint: E.fill8
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
fill: E.fill9,
|
|
1496
|
+
stroke: E.stroke9,
|
|
1497
|
+
swatch: E.swatch9,
|
|
1498
|
+
tint: E.fill9
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
fill: E.fill10,
|
|
1502
|
+
stroke: E.stroke10,
|
|
1503
|
+
swatch: E.swatch10,
|
|
1504
|
+
tint: E.fill10
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
fill: E.fill11,
|
|
1508
|
+
stroke: E.stroke11,
|
|
1509
|
+
swatch: E.swatch11,
|
|
1510
|
+
tint: E.fill11
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
fill: E.fill12,
|
|
1514
|
+
stroke: E.stroke12,
|
|
1515
|
+
swatch: E.swatch12,
|
|
1516
|
+
tint: E.fill12
|
|
1517
|
+
}
|
|
1518
|
+
];
|
|
1519
|
+
function D(e, t) {
|
|
1520
|
+
return e === void 0 ? t : t === void 0 || t.length === 0 ? e : `${e} ${t}`;
|
|
1521
|
+
}
|
|
1522
|
+
//#endregion
|
|
1523
|
+
//#region src/constants.ts
|
|
1524
|
+
var se = 3e3, ce = 3e3, le = 2e3, ue = 3e3, de = 2e3, fe = 2e3, pe = 12e3, me = 3e3, he = 2e3, ge = 1e4, _e = 2e4, ve = [
|
|
1525
|
+
"actions",
|
|
1526
|
+
"alert",
|
|
1527
|
+
"card",
|
|
1528
|
+
"carousel",
|
|
1529
|
+
"container",
|
|
1530
|
+
"context",
|
|
1531
|
+
"context_actions",
|
|
1532
|
+
"data_table",
|
|
1533
|
+
"data_visualization",
|
|
1534
|
+
"divider",
|
|
1535
|
+
"file",
|
|
1536
|
+
"header",
|
|
1537
|
+
"image",
|
|
1538
|
+
"input",
|
|
1539
|
+
"markdown",
|
|
1540
|
+
"plan",
|
|
1541
|
+
"rich_text",
|
|
1542
|
+
"section",
|
|
1543
|
+
"table",
|
|
1544
|
+
"task_card",
|
|
1545
|
+
"video"
|
|
1546
|
+
];
|
|
1547
|
+
//#endregion
|
|
1548
|
+
//#region src/validation.ts
|
|
1549
|
+
function O(e, t, n) {
|
|
1550
|
+
throw new b(n, {
|
|
1551
|
+
code: e,
|
|
1552
|
+
path: t
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
function k(e, t, n, r) {
|
|
1556
|
+
e || O(t, n, r);
|
|
1557
|
+
}
|
|
1558
|
+
function ye(e) {
|
|
1559
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1560
|
+
}
|
|
1561
|
+
function A(e, t) {
|
|
1562
|
+
k(ye(e), "invalid_type", t, "expected an object");
|
|
1563
|
+
}
|
|
1564
|
+
function j(e, t) {
|
|
1565
|
+
k(Array.isArray(e), "invalid_type", t, "expected an array");
|
|
1566
|
+
}
|
|
1567
|
+
function M(e, t, n = {}) {
|
|
1568
|
+
k(typeof e == "string", "invalid_type", t, "expected a string"), n.allowEmpty !== !0 && k(e.length > 0, "invalid_value", t, "must not be empty"), n.max !== void 0 && k(e.length <= n.max, "limit_exceeded", t, `must contain at most ${String(n.max)} characters`);
|
|
1569
|
+
}
|
|
1570
|
+
function N(e, t, n = {}) {
|
|
1571
|
+
e !== void 0 && M(e, t, n);
|
|
1572
|
+
}
|
|
1573
|
+
function P(e, t, n = {}) {
|
|
1574
|
+
k(typeof e == "number" && Number.isFinite(e), "invalid_type", t, "expected a finite number"), n.integer === !0 && k(Number.isInteger(e), "invalid_value", t, "expected an integer"), n.min !== void 0 && k(e >= n.min, "invalid_value", t, `must be at least ${String(n.min)}`), n.max !== void 0 && k(e <= n.max, "invalid_value", t, `must be at most ${String(n.max)}`);
|
|
1575
|
+
}
|
|
1576
|
+
function F(e, t) {
|
|
1577
|
+
e !== void 0 && k(typeof e == "boolean", "invalid_type", t, "expected a boolean");
|
|
1578
|
+
}
|
|
1579
|
+
function I(e, t, n) {
|
|
1580
|
+
k(e.type === t, "invalid_value", `${n}.type`, `expected "${t}"`);
|
|
1581
|
+
}
|
|
1582
|
+
function L(e, t, n) {
|
|
1583
|
+
M(e, n), k(t.includes(e), "invalid_value", n, `expected one of: ${t.join(", ")}`);
|
|
1584
|
+
}
|
|
1585
|
+
function R(e, t) {
|
|
1586
|
+
M(e.type, `${t}.type`), N(e.block_id, `${t}.block_id`, { max: 255 });
|
|
1587
|
+
}
|
|
1588
|
+
function z(e, t, n = se) {
|
|
1589
|
+
A(e, t), L(e.type, ["plain_text", "mrkdwn"], `${t}.type`), M(e.text, `${t}.text`, { max: n }), e.type === "plain_text" ? (F(e.emoji, `${t}.emoji`), k(e.verbatim === void 0, "invalid_value", `${t}.verbatim`, "verbatim is only legal on mrkdwn text")) : (F(e.verbatim, `${t}.verbatim`), k(e.emoji === void 0, "invalid_value", `${t}.emoji`, "emoji is only legal on plain_text"));
|
|
1590
|
+
}
|
|
1591
|
+
function be(e, t = "text", n = se) {
|
|
1592
|
+
z(e, t, n);
|
|
1593
|
+
}
|
|
1594
|
+
function B(e, t, n = se) {
|
|
1595
|
+
z(e, t, n), k(ye(e) && e.type === "plain_text", "invalid_value", `${t}.type`, "expected \"plain_text\"");
|
|
1596
|
+
}
|
|
1597
|
+
function xe(e, t) {
|
|
1598
|
+
A(e, t);
|
|
1599
|
+
let n = e.id !== void 0, r = e.url !== void 0;
|
|
1600
|
+
k(n !== r, "invalid_value", t, "must contain exactly one of id or url"), n && M(e.id, `${t}.id`), r && M(e.url, `${t}.url`, { max: ue });
|
|
1601
|
+
}
|
|
1602
|
+
function V(e, t) {
|
|
1603
|
+
A(e, t), I(e, "image", t), M(e.alt_text, `${t}.alt_text`, { max: de });
|
|
1604
|
+
let n = e.image_url !== void 0, r = e.slack_file !== void 0;
|
|
1605
|
+
k(n !== r, "invalid_value", t, "must contain exactly one of image_url or slack_file"), n && M(e.image_url, `${t}.image_url`, { max: ue }), r && xe(e.slack_file, `${t}.slack_file`);
|
|
1606
|
+
}
|
|
1607
|
+
function Se(e, t = "element") {
|
|
1608
|
+
V(e, t);
|
|
1609
|
+
}
|
|
1610
|
+
function Ce(e, t) {
|
|
1611
|
+
A(e, t), z(e.text, `${t}.text`, 75), N(e.value, `${t}.value`, { max: 75 }), N(e.url, `${t}.url`, { max: me }), e.description !== void 0 && B(e.description, `${t}.description`, 75);
|
|
1612
|
+
}
|
|
1613
|
+
function we(e, t, n) {
|
|
1614
|
+
j(e, t), k(e.length > 0, "missing_field", t, "must contain at least one option"), k(e.length <= n, "limit_exceeded", t, `must contain at most ${String(n)} options`), e.forEach((e, n) => {
|
|
1615
|
+
Ce(e, `${t}[${String(n)}]`);
|
|
1616
|
+
});
|
|
1617
|
+
}
|
|
1618
|
+
function Te(e, t) {
|
|
1619
|
+
N(e.action_id, `${t}.action_id`, { max: 255 });
|
|
1620
|
+
}
|
|
1621
|
+
function Ee(e, t) {
|
|
1622
|
+
e.placeholder !== void 0 && B(e.placeholder, `${t}.placeholder`, 150);
|
|
1623
|
+
}
|
|
1624
|
+
function De(e, t) {
|
|
1625
|
+
A(e, t), I(e, "button", t), Te(e, t), B(e.text, `${t}.text`, 75), N(e.url, `${t}.url`, { max: me }), N(e.value, `${t}.value`, { max: he }), N(e.accessibility_label, `${t}.accessibility_label`, { max: 75 }), e.style !== void 0 && L(e.style, ["primary", "danger"], `${t}.style`);
|
|
1626
|
+
}
|
|
1627
|
+
function Oe(e, t) {
|
|
1628
|
+
let n = e.options !== void 0, r = e.option_groups !== void 0;
|
|
1629
|
+
k(n !== r, "invalid_value", t, "must contain exactly one of options or option_groups"), n && we(e.options, `${t}.options`, 100), r && (j(e.option_groups, `${t}.option_groups`), k(e.option_groups.length <= 100, "limit_exceeded", `${t}.option_groups`, "must contain at most 100 groups"), e.option_groups.forEach((e, n) => {
|
|
1630
|
+
let r = `${t}.option_groups[${String(n)}]`;
|
|
1631
|
+
A(e, r), B(e.label, `${r}.label`, 75), we(e.options, `${r}.options`, 100);
|
|
1632
|
+
}));
|
|
1633
|
+
}
|
|
1634
|
+
function ke(e, t) {
|
|
1635
|
+
switch (A(e, t), M(e.type, `${t}.type`), Te(e, t), Ee(e, t), e.type) {
|
|
1636
|
+
case "button":
|
|
1637
|
+
De(e, t);
|
|
1638
|
+
return;
|
|
1639
|
+
case "checkboxes":
|
|
1640
|
+
case "radio_buttons":
|
|
1641
|
+
we(e.options, `${t}.options`, 10);
|
|
1642
|
+
return;
|
|
1643
|
+
case "overflow":
|
|
1644
|
+
we(e.options, `${t}.options`, 5);
|
|
1645
|
+
return;
|
|
1646
|
+
case "static_select":
|
|
1647
|
+
case "multi_static_select":
|
|
1648
|
+
Oe(e, t);
|
|
1649
|
+
return;
|
|
1650
|
+
case "external_select":
|
|
1651
|
+
case "multi_external_select":
|
|
1652
|
+
e.min_query_length !== void 0 && P(e.min_query_length, `${t}.min_query_length`, {
|
|
1653
|
+
integer: !0,
|
|
1654
|
+
min: 0
|
|
1655
|
+
});
|
|
1656
|
+
return;
|
|
1657
|
+
case "users_select":
|
|
1658
|
+
case "multi_users_select":
|
|
1659
|
+
case "conversations_select":
|
|
1660
|
+
case "multi_conversations_select":
|
|
1661
|
+
case "channels_select":
|
|
1662
|
+
case "multi_channels_select": return;
|
|
1663
|
+
case "datepicker":
|
|
1664
|
+
N(e.initial_date, `${t}.initial_date`);
|
|
1665
|
+
return;
|
|
1666
|
+
case "datetimepicker":
|
|
1667
|
+
e.initial_date_time !== void 0 && P(e.initial_date_time, `${t}.initial_date_time`, {
|
|
1668
|
+
integer: !0,
|
|
1669
|
+
min: 0
|
|
1670
|
+
});
|
|
1671
|
+
return;
|
|
1672
|
+
case "timepicker":
|
|
1673
|
+
N(e.initial_time, `${t}.initial_time`), N(e.timezone, `${t}.timezone`);
|
|
1674
|
+
return;
|
|
1675
|
+
case "plain_text_input":
|
|
1676
|
+
case "email_text_input":
|
|
1677
|
+
case "url_text_input":
|
|
1678
|
+
case "number_input":
|
|
1679
|
+
N(e.initial_value, `${t}.initial_value`, { allowEmpty: !0 }), e.type === "plain_text_input" && F(e.multiline, `${t}.multiline`), e.type === "number_input" && k(typeof e.is_decimal_allowed == "boolean", "missing_field", `${t}.is_decimal_allowed`, "expected a boolean");
|
|
1680
|
+
return;
|
|
1681
|
+
case "rich_text_input":
|
|
1682
|
+
e.initial_value !== void 0 && H(e.initial_value, `${t}.initial_value`);
|
|
1683
|
+
return;
|
|
1684
|
+
case "file_input":
|
|
1685
|
+
e.max_files !== void 0 && P(e.max_files, `${t}.max_files`, {
|
|
1686
|
+
integer: !0,
|
|
1687
|
+
min: 1,
|
|
1688
|
+
max: 10
|
|
1689
|
+
});
|
|
1690
|
+
return;
|
|
1691
|
+
case "workflow_button":
|
|
1692
|
+
B(e.text, `${t}.text`, 75), A(e.workflow, `${t}.workflow`), A(e.workflow.trigger, `${t}.workflow.trigger`), M(e.workflow.trigger.url, `${t}.workflow.trigger.url`);
|
|
1693
|
+
return;
|
|
1694
|
+
default: O("unsupported_element", `${t}.type`, `unsupported element "${e.type}"`);
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
function Ae(e, t = "element") {
|
|
1698
|
+
ke(e, t);
|
|
1699
|
+
}
|
|
1700
|
+
function je(e, t) {
|
|
1701
|
+
if (e !== void 0) {
|
|
1702
|
+
A(e, t);
|
|
1703
|
+
for (let n of [
|
|
1704
|
+
"bold",
|
|
1705
|
+
"code",
|
|
1706
|
+
"italic",
|
|
1707
|
+
"strike",
|
|
1708
|
+
"underline"
|
|
1709
|
+
]) F(e[n], `${t}.${n}`);
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
function Me(e, t) {
|
|
1713
|
+
switch (A(e, t), M(e.type, `${t}.type`), je(e.style, `${t}.style`), e.type) {
|
|
1714
|
+
case "text":
|
|
1715
|
+
M(e.text, `${t}.text`, { allowEmpty: !0 });
|
|
1716
|
+
return;
|
|
1717
|
+
case "link":
|
|
1718
|
+
M(e.url, `${t}.url`), N(e.text, `${t}.text`, { allowEmpty: !0 });
|
|
1719
|
+
return;
|
|
1720
|
+
case "emoji":
|
|
1721
|
+
M(e.name, `${t}.name`), N(e.unicode, `${t}.unicode`);
|
|
1722
|
+
return;
|
|
1723
|
+
case "user":
|
|
1724
|
+
M(e.user_id, `${t}.user_id`);
|
|
1725
|
+
return;
|
|
1726
|
+
case "usergroup":
|
|
1727
|
+
M(e.usergroup_id, `${t}.usergroup_id`);
|
|
1728
|
+
return;
|
|
1729
|
+
case "channel":
|
|
1730
|
+
M(e.channel_id, `${t}.channel_id`);
|
|
1731
|
+
return;
|
|
1732
|
+
case "team":
|
|
1733
|
+
M(e.team_id, `${t}.team_id`);
|
|
1734
|
+
return;
|
|
1735
|
+
case "broadcast":
|
|
1736
|
+
L(e.range, [
|
|
1737
|
+
"here",
|
|
1738
|
+
"channel",
|
|
1739
|
+
"everyone"
|
|
1740
|
+
], `${t}.range`);
|
|
1741
|
+
return;
|
|
1742
|
+
case "date":
|
|
1743
|
+
P(e.timestamp, `${t}.timestamp`, {
|
|
1744
|
+
integer: !0,
|
|
1745
|
+
min: 0
|
|
1746
|
+
}), M(e.format, `${t}.format`);
|
|
1747
|
+
return;
|
|
1748
|
+
case "color":
|
|
1749
|
+
M(e.value, `${t}.value`), k(/^#[\da-f]{6}$/i.test(e.value), "invalid_value", `${t}.value`, "expected a six-digit hex color");
|
|
1750
|
+
return;
|
|
1751
|
+
case "citation":
|
|
1752
|
+
A(e.details, `${t}.details`), N(e.url, `${t}.url`), N(e.text, `${t}.text`, { allowEmpty: !0 });
|
|
1753
|
+
return;
|
|
1754
|
+
case "attachment_mention":
|
|
1755
|
+
case "canvas":
|
|
1756
|
+
case "canvas_message_unfurl":
|
|
1757
|
+
case "canvas_user_mention":
|
|
1758
|
+
case "file":
|
|
1759
|
+
case "list_record":
|
|
1760
|
+
case "message_mention":
|
|
1761
|
+
case "salesforce_data_field":
|
|
1762
|
+
case "tag":
|
|
1763
|
+
case "work_object_mention":
|
|
1764
|
+
case "workflow_mention":
|
|
1765
|
+
k(Object.keys(e).length > 1, "missing_field", t, `${e.type} must contain its reference fields`);
|
|
1766
|
+
return;
|
|
1767
|
+
default: O("unsupported_element", `${t}.type`, `unsupported rich text element "${e.type}"`);
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
function Ne(e, t) {
|
|
1771
|
+
j(e, t), e.forEach((e, n) => {
|
|
1772
|
+
Me(e, `${t}[${String(n)}]`);
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
function H(e, t) {
|
|
1776
|
+
A(e, t), I(e, "rich_text", t), R(e, t), j(e.elements, `${t}.elements`), e.elements.forEach((e, n) => {
|
|
1777
|
+
let r = `${t}.elements[${String(n)}]`;
|
|
1778
|
+
switch (A(e, r), M(e.type, `${r}.type`), e.type) {
|
|
1779
|
+
case "rich_text_section":
|
|
1780
|
+
case "rich_text_quote":
|
|
1781
|
+
Ne(e.elements, `${r}.elements`);
|
|
1782
|
+
return;
|
|
1783
|
+
case "rich_text_list":
|
|
1784
|
+
L(e.style, ["bullet", "ordered"], `${r}.style`), e.indent !== void 0 && P(e.indent, `${r}.indent`, {
|
|
1785
|
+
integer: !0,
|
|
1786
|
+
min: 0,
|
|
1787
|
+
max: 8
|
|
1788
|
+
}), e.offset !== void 0 && P(e.offset, `${r}.offset`, {
|
|
1789
|
+
integer: !0,
|
|
1790
|
+
min: 0
|
|
1791
|
+
}), j(e.elements, `${r}.elements`), e.elements.forEach((e, t) => {
|
|
1792
|
+
let n = `${r}.elements[${String(t)}]`;
|
|
1793
|
+
A(e, n), I(e, "rich_text_section", n), Ne(e.elements, `${n}.elements`);
|
|
1794
|
+
});
|
|
1795
|
+
return;
|
|
1796
|
+
case "rich_text_preformatted":
|
|
1797
|
+
j(e.elements, `${r}.elements`), e.elements.forEach((e, t) => {
|
|
1798
|
+
let n = `${r}.elements[${String(t)}]`;
|
|
1799
|
+
Me(e, n), A(e, n), k(e.type === "text" || e.type === "link", "invalid_value", `${n}.type`, "preformatted text only accepts text or link elements");
|
|
1800
|
+
}), N(e.language, `${r}.language`);
|
|
1801
|
+
return;
|
|
1802
|
+
default: O("unsupported_element", `${r}.type`, `unsupported rich text container "${e.type}"`);
|
|
1803
|
+
}
|
|
1804
|
+
});
|
|
1805
|
+
}
|
|
1806
|
+
function Pe(e, t = "block") {
|
|
1807
|
+
H(e, t);
|
|
1808
|
+
}
|
|
1809
|
+
function Fe(e, t) {
|
|
1810
|
+
A(e, t), I(e, "section", t), R(e, t);
|
|
1811
|
+
let n = e.text !== void 0, r = e.fields !== void 0;
|
|
1812
|
+
k(n || r, "missing_field", t, "requires text or fields"), n && z(e.text, `${t}.text`, ce), r && (j(e.fields, `${t}.fields`), k(e.fields.length > 0 && e.fields.length <= 10, "limit_exceeded", `${t}.fields`, "must contain 1–10 text objects"), e.fields.forEach((e, n) => {
|
|
1813
|
+
z(e, `${t}.fields[${String(n)}]`, le);
|
|
1814
|
+
})), e.accessory !== void 0 && (A(e.accessory, `${t}.accessory`), e.accessory.type === "image" ? V(e.accessory, `${t}.accessory`) : (ke(e.accessory, `${t}.accessory`), k(![
|
|
1815
|
+
"datetimepicker",
|
|
1816
|
+
"file_input",
|
|
1817
|
+
"plain_text_input",
|
|
1818
|
+
"email_text_input",
|
|
1819
|
+
"url_text_input",
|
|
1820
|
+
"number_input",
|
|
1821
|
+
"rich_text_input"
|
|
1822
|
+
].includes(String(e.accessory.type)), "invalid_value", `${t}.accessory.type`, "element is not legal as a section accessory"))), F(e.expand, `${t}.expand`);
|
|
1823
|
+
}
|
|
1824
|
+
function Ie(e, t) {
|
|
1825
|
+
A(e, t), I(e, "header", t), R(e, t), B(e.text, `${t}.text`, 150), e.level !== void 0 && P(e.level, `${t}.level`, {
|
|
1826
|
+
integer: !0,
|
|
1827
|
+
min: 1,
|
|
1828
|
+
max: 4
|
|
1829
|
+
});
|
|
1830
|
+
}
|
|
1831
|
+
function Le(e, t) {
|
|
1832
|
+
V(e, t), A(e, t), R(e, t), e.title !== void 0 && B(e.title, `${t}.title`, fe);
|
|
1833
|
+
}
|
|
1834
|
+
function Re(e, t) {
|
|
1835
|
+
A(e, t), I(e, "context", t), R(e, t), j(e.elements, `${t}.elements`), k(e.elements.length > 0 && e.elements.length <= 10, "limit_exceeded", `${t}.elements`, "must contain 1–10 elements"), e.elements.forEach((e, n) => {
|
|
1836
|
+
let r = `${t}.elements[${String(n)}]`;
|
|
1837
|
+
A(e, r), e.type === "image" ? V(e, r) : z(e, r);
|
|
1838
|
+
});
|
|
1839
|
+
}
|
|
1840
|
+
function ze(e, t) {
|
|
1841
|
+
A(e, t), I(e, "actions", t), R(e, t), j(e.elements, `${t}.elements`), k(e.elements.length > 0 && e.elements.length <= 25, "limit_exceeded", `${t}.elements`, "must contain 1–25 elements"), e.elements.forEach((e, n) => {
|
|
1842
|
+
let r = `${t}.elements[${String(n)}]`;
|
|
1843
|
+
ke(e, r), A(e, r), k([
|
|
1844
|
+
"button",
|
|
1845
|
+
"checkboxes",
|
|
1846
|
+
"datepicker",
|
|
1847
|
+
"datetimepicker",
|
|
1848
|
+
"external_select",
|
|
1849
|
+
"multi_external_select",
|
|
1850
|
+
"users_select",
|
|
1851
|
+
"multi_users_select",
|
|
1852
|
+
"conversations_select",
|
|
1853
|
+
"multi_conversations_select",
|
|
1854
|
+
"channels_select",
|
|
1855
|
+
"multi_channels_select",
|
|
1856
|
+
"static_select",
|
|
1857
|
+
"multi_static_select",
|
|
1858
|
+
"overflow",
|
|
1859
|
+
"radio_buttons",
|
|
1860
|
+
"timepicker",
|
|
1861
|
+
"workflow_button",
|
|
1862
|
+
"rich_text_input"
|
|
1863
|
+
].includes(String(e.type)), "invalid_value", `${r}.type`, "element is not legal inside an actions block");
|
|
1864
|
+
});
|
|
1865
|
+
}
|
|
1866
|
+
function Be(e, t) {
|
|
1867
|
+
A(e, t), I(e, "input", t), R(e, t), B(e.label, `${t}.label`, 2e3), e.hint !== void 0 && B(e.hint, `${t}.hint`, 2e3), F(e.optional, `${t}.optional`), F(e.dispatch_action, `${t}.dispatch_action`), ke(e.element, `${t}.element`), A(e.element, `${t}.element`), k(![
|
|
1868
|
+
"button",
|
|
1869
|
+
"overflow",
|
|
1870
|
+
"workflow_button",
|
|
1871
|
+
"icon_button",
|
|
1872
|
+
"feedback_buttons"
|
|
1873
|
+
].includes(String(e.element.type)), "invalid_value", `${t}.element.type`, "element is not legal inside an input block"), k(!(e.dispatch_action === !0 && e.element.type === "file_input"), "invalid_value", `${t}.dispatch_action`, "dispatch_action is incompatible with file_input");
|
|
1874
|
+
}
|
|
1875
|
+
function Ve(e) {
|
|
1876
|
+
if (!ye(e)) return 0;
|
|
1877
|
+
if (e.type === "raw_text") return typeof e.text == "string" ? e.text.length : 0;
|
|
1878
|
+
if (e.type === "raw_number") return typeof e.text == "string" ? e.text.length : typeof e.value == "number" ? String(e.value).length : 0;
|
|
1879
|
+
if (e.type === "rich_text" && Array.isArray(e.elements)) {
|
|
1880
|
+
let t = 0;
|
|
1881
|
+
for (let n of e.elements) if (!(!ye(n) || !Array.isArray(n.elements))) for (let e of n.elements) ye(e) && (typeof e.text == "string" ? t += e.text.length : typeof e.url == "string" && (t += e.url.length));
|
|
1882
|
+
return t;
|
|
1883
|
+
}
|
|
1884
|
+
return 0;
|
|
1885
|
+
}
|
|
1886
|
+
function He(e, t, n) {
|
|
1887
|
+
switch (A(e, t), M(e.type, `${t}.type`), e.type) {
|
|
1888
|
+
case "raw_text":
|
|
1889
|
+
M(e.text, `${t}.text`);
|
|
1890
|
+
return;
|
|
1891
|
+
case "raw_number":
|
|
1892
|
+
P(e.value, `${t}.value`), N(e.text, `${t}.text`);
|
|
1893
|
+
return;
|
|
1894
|
+
case "rich_text":
|
|
1895
|
+
k(n, "invalid_value", t, "rich_text is not legal in this row"), H(e, t);
|
|
1896
|
+
return;
|
|
1897
|
+
default: O("invalid_value", `${t}.type`, `unsupported table cell "${e.type}"`);
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
function Ue(e, t, n, r, i) {
|
|
1901
|
+
j(e, t), k(e.length > 0, "missing_field", t, "must contain at least one row"), k(e.length <= n, "limit_exceeded", t, `must contain at most ${String(n)} rows`);
|
|
1902
|
+
let a, o = 0;
|
|
1903
|
+
return e.forEach((e, n) => {
|
|
1904
|
+
let r = `${t}[${String(n)}]`;
|
|
1905
|
+
j(e, r), k(e.length > 0 && e.length <= 20, "limit_exceeded", r, "must contain 1–20 cells"), a === void 0 ? a = e.length : k(e.length === a, "invalid_value", r, "all table rows must contain the same number of cells"), e.forEach((e, t) => {
|
|
1906
|
+
He(e, `${r}[${String(t)}]`, i || n !== 0), o += Ve(e);
|
|
1907
|
+
});
|
|
1908
|
+
}), k(o <= r, "limit_exceeded", t, `cell content must contain at most ${String(r)} characters`), a ?? 0;
|
|
1909
|
+
}
|
|
1910
|
+
function We(e, t) {
|
|
1911
|
+
A(e, t), I(e, "table", t), R(e, t), Ue(e.rows, `${t}.rows`, 100, ge, !0), e.column_settings !== void 0 && (j(e.column_settings, `${t}.column_settings`), k(e.column_settings.length <= 20, "limit_exceeded", `${t}.column_settings`, "must contain at most 20 entries"), e.column_settings.forEach((e, n) => {
|
|
1912
|
+
if (e === null) return;
|
|
1913
|
+
let r = `${t}.column_settings[${String(n)}]`;
|
|
1914
|
+
A(e, r), e.align !== void 0 && L(e.align, [
|
|
1915
|
+
"left",
|
|
1916
|
+
"center",
|
|
1917
|
+
"right"
|
|
1918
|
+
], `${r}.align`), F(e.is_wrapped, `${r}.is_wrapped`);
|
|
1919
|
+
}));
|
|
1920
|
+
}
|
|
1921
|
+
function Ge(e, t) {
|
|
1922
|
+
A(e, t), I(e, "data_table", t), R(e, t), M(e.caption, `${t}.caption`);
|
|
1923
|
+
let n = Ue(e.rows, `${t}.rows`, 201, _e, !1);
|
|
1924
|
+
j(e.rows, `${t}.rows`), k(e.rows.length >= 2, "invalid_value", `${t}.rows`, "requires a header row and at least one data row"), e.page_size !== void 0 && P(e.page_size, `${t}.page_size`, {
|
|
1925
|
+
integer: !0,
|
|
1926
|
+
min: 1,
|
|
1927
|
+
max: 100
|
|
1928
|
+
}), e.row_header_column_index !== void 0 && P(e.row_header_column_index, `${t}.row_header_column_index`, {
|
|
1929
|
+
integer: !0,
|
|
1930
|
+
min: 0,
|
|
1931
|
+
max: n - 1
|
|
1932
|
+
});
|
|
1933
|
+
}
|
|
1934
|
+
function Ke(e, t) {
|
|
1935
|
+
if (A(e, t), I(e, "data_visualization", t), R(e, t), M(e.title, `${t}.title`, { max: 50 }), A(e.chart, `${t}.chart`), M(e.chart.type, `${t}.chart.type`), e.chart.type === "pie") {
|
|
1936
|
+
j(e.chart.segments, `${t}.chart.segments`), k(e.chart.segments.length > 0 && e.chart.segments.length <= 12, "limit_exceeded", `${t}.chart.segments`, "must contain 1–12 segments"), e.chart.segments.forEach((e, n) => {
|
|
1937
|
+
let r = `${t}.chart.segments[${String(n)}]`;
|
|
1938
|
+
A(e, r), M(e.label, `${r}.label`, { max: 20 }), P(e.value, `${r}.value`, { min: 2 ** -52 });
|
|
1939
|
+
});
|
|
1940
|
+
return;
|
|
1941
|
+
}
|
|
1942
|
+
L(e.chart.type, [
|
|
1943
|
+
"bar",
|
|
1944
|
+
"area",
|
|
1945
|
+
"line"
|
|
1946
|
+
], `${t}.chart.type`), j(e.chart.series, `${t}.chart.series`), k(e.chart.series.length > 0 && e.chart.series.length <= 12, "limit_exceeded", `${t}.chart.series`, "must contain 1–12 series"), A(e.chart.axis_config, `${t}.chart.axis_config`), j(e.chart.axis_config.categories, `${t}.chart.axis_config.categories`), k(e.chart.axis_config.categories.length > 0 && e.chart.axis_config.categories.length <= 20, "limit_exceeded", `${t}.chart.axis_config.categories`, "must contain 1–20 categories");
|
|
1947
|
+
let n = /* @__PURE__ */ new Set();
|
|
1948
|
+
e.chart.axis_config.categories.forEach((e, r) => {
|
|
1949
|
+
let i = `${t}.chart.axis_config.categories[${String(r)}]`;
|
|
1950
|
+
M(e, i, { max: 20 }), k(!n.has(e), "invalid_value", i, "axis categories must be unique"), n.add(e);
|
|
1951
|
+
}), N(e.chart.axis_config.x_label, `${t}.chart.axis_config.x_label`, { max: 50 }), N(e.chart.axis_config.y_label, `${t}.chart.axis_config.y_label`, { max: 50 });
|
|
1952
|
+
let r = /* @__PURE__ */ new Set();
|
|
1953
|
+
e.chart.series.forEach((e, i) => {
|
|
1954
|
+
let a = `${t}.chart.series[${String(i)}]`;
|
|
1955
|
+
A(e, a), M(e.name, `${a}.name`, { max: 20 }), k(!r.has(e.name), "duplicate_id", `${a}.name`, "series names must be unique"), r.add(e.name), j(e.data, `${a}.data`), k(e.data.length > 0 && e.data.length <= 20, "limit_exceeded", `${a}.data`, "must contain 1–20 points"), k(e.data.length === n.size, "invalid_value", `${a}.data`, "must provide exactly one point per axis category");
|
|
1956
|
+
let o = /* @__PURE__ */ new Set();
|
|
1957
|
+
e.data.forEach((e, t) => {
|
|
1958
|
+
let r = `${a}.data[${String(t)}]`;
|
|
1959
|
+
A(e, r), M(e.label, `${r}.label`, { max: 20 }), k(n.has(e.label), "invalid_value", `${r}.label`, "must match an axis category"), k(!o.has(e.label), "invalid_value", `${r}.label`, "point labels must be unique within a series"), o.add(e.label), P(e.value, `${r}.value`);
|
|
1960
|
+
});
|
|
1961
|
+
});
|
|
1962
|
+
}
|
|
1963
|
+
function qe(e, t) {
|
|
1964
|
+
A(e, t), I(e, "card", t), R(e, t), k(e.hero_image !== void 0 || e.title !== void 0 || e.actions !== void 0 || e.body !== void 0, "missing_field", t, "requires at least one of hero_image, title, actions, or body"), e.hero_image !== void 0 && V(e.hero_image, `${t}.hero_image`), e.icon !== void 0 && V(e.icon, `${t}.icon`), k(!(e.icon !== void 0 && e.slack_icon !== void 0), "invalid_value", t, "icon and slack_icon are mutually exclusive"), e.slack_icon !== void 0 && (A(e.slack_icon, `${t}.slack_icon`), I(e.slack_icon, "icon", `${t}.slack_icon`), M(e.slack_icon.name, `${t}.slack_icon.name`));
|
|
1965
|
+
for (let n of ["title", "subtitle"]) e[n] !== void 0 && z(e[n], `${t}.${n}`, 150);
|
|
1966
|
+
for (let n of ["body", "subtext"]) e[n] !== void 0 && z(e[n], `${t}.${n}`, 200);
|
|
1967
|
+
e.actions !== void 0 && (j(e.actions, `${t}.actions`), k(e.actions.length > 0 && e.actions.length <= 3, "limit_exceeded", `${t}.actions`, "must contain 1–3 buttons"), e.actions.forEach((e, n) => {
|
|
1968
|
+
De(e, `${t}.actions[${String(n)}]`);
|
|
1969
|
+
}));
|
|
1970
|
+
}
|
|
1971
|
+
function Je(e, t) {
|
|
1972
|
+
A(e, t), I(e, "carousel", t), R(e, t), j(e.elements, `${t}.elements`), k(e.elements.length > 0 && e.elements.length <= 10, "limit_exceeded", `${t}.elements`, "must contain 1–10 cards"), e.elements.forEach((e, n) => {
|
|
1973
|
+
qe(e, `${t}.elements[${String(n)}]`);
|
|
1974
|
+
});
|
|
1975
|
+
}
|
|
1976
|
+
function Ye(e, t, n) {
|
|
1977
|
+
A(e, n), I(e, "alert", n), R(e, n), k(t === "modal", "surface_mismatch", n, "alert blocks are only legal on modal surfaces"), z(e.text, `${n}.text`, 200), e.level !== void 0 && L(e.level, [
|
|
1978
|
+
"default",
|
|
1979
|
+
"info",
|
|
1980
|
+
"warning",
|
|
1981
|
+
"error",
|
|
1982
|
+
"success"
|
|
1983
|
+
], `${n}.level`);
|
|
1984
|
+
}
|
|
1985
|
+
function Xe(e, t) {
|
|
1986
|
+
A(e, t), I(e, "context_actions", t), R(e, t), j(e.elements, `${t}.elements`), k(e.elements.length > 0 && e.elements.length <= 5, "limit_exceeded", `${t}.elements`, "must contain 1–5 elements"), e.elements.forEach((e, n) => {
|
|
1987
|
+
let r = `${t}.elements[${String(n)}]`;
|
|
1988
|
+
if (A(e, r), Te(e, r), e.type === "icon_button") {
|
|
1989
|
+
L(e.icon, ["trash"], `${r}.icon`), B(e.text, `${r}.text`, 75), N(e.value, `${r}.value`, { max: he });
|
|
1990
|
+
return;
|
|
1991
|
+
}
|
|
1992
|
+
k(e.type === "feedback_buttons", "unsupported_element", `${r}.type`, "context_actions only accepts icon_button or feedback_buttons");
|
|
1993
|
+
for (let t of ["positive_button", "negative_button"]) {
|
|
1994
|
+
let n = `${r}.${t}`;
|
|
1995
|
+
A(e[t], n), B(e[t].text, `${n}.text`, 75), M(e[t].value, `${n}.value`, { max: he });
|
|
1996
|
+
}
|
|
1997
|
+
});
|
|
1998
|
+
}
|
|
1999
|
+
function Ze(e, t) {
|
|
2000
|
+
A(e, t), I(e, "task_card", t), R(e, t), M(e.task_id, `${t}.task_id`), M(e.title, `${t}.title`), L(e.status, [
|
|
2001
|
+
"pending",
|
|
2002
|
+
"in_progress",
|
|
2003
|
+
"complete",
|
|
2004
|
+
"error"
|
|
2005
|
+
], `${t}.status`), e.details !== void 0 && H(e.details, `${t}.details`), e.output !== void 0 && H(e.output, `${t}.output`), e.sources !== void 0 && (j(e.sources, `${t}.sources`), e.sources.forEach((e, n) => {
|
|
2006
|
+
let r = `${t}.sources[${String(n)}]`;
|
|
2007
|
+
A(e, r), I(e, "url", r), M(e.url, `${r}.url`), M(e.text, `${r}.text`);
|
|
2008
|
+
}));
|
|
2009
|
+
}
|
|
2010
|
+
function Qe(e, t) {
|
|
2011
|
+
A(e, t), I(e, "plan", t), R(e, t), M(e.title, `${t}.title`), e.tasks !== void 0 && (j(e.tasks, `${t}.tasks`), e.tasks.forEach((e, n) => {
|
|
2012
|
+
Ze(e, `${t}.tasks[${String(n)}]`);
|
|
2013
|
+
}));
|
|
2014
|
+
}
|
|
2015
|
+
function $e(e, t) {
|
|
2016
|
+
A(e, t), I(e, "container", t), R(e, t), k(e.title !== void 0 || e.rich_text_title !== void 0, "missing_field", t, "requires title or rich_text_title"), e.title !== void 0 && B(e.title, `${t}.title`, 150), e.rich_text_title !== void 0 && H(e.rich_text_title, `${t}.rich_text_title`), e.subtitle !== void 0 && B(e.subtitle, `${t}.subtitle`, 150), e.icon !== void 0 && V(e.icon, `${t}.icon`), e.width !== void 0 && L(e.width, [
|
|
2017
|
+
"narrow",
|
|
2018
|
+
"standard",
|
|
2019
|
+
"wide",
|
|
2020
|
+
"full"
|
|
2021
|
+
], `${t}.width`), F(e.is_collapsible, `${t}.is_collapsible`), F(e.default_collapsed, `${t}.default_collapsed`), F(e.has_header_divider, `${t}.has_header_divider`), k(!(e.default_collapsed === !0 && e.is_collapsible !== !0), "invalid_value", `${t}.default_collapsed`, "requires is_collapsible to be true"), j(e.child_blocks, `${t}.child_blocks`), k(e.child_blocks.length > 0 && e.child_blocks.length <= 10, "limit_exceeded", `${t}.child_blocks`, "must contain 1–10 child blocks");
|
|
2022
|
+
let n = [
|
|
2023
|
+
"actions",
|
|
2024
|
+
"context",
|
|
2025
|
+
"divider",
|
|
2026
|
+
"file",
|
|
2027
|
+
"header",
|
|
2028
|
+
"image",
|
|
2029
|
+
"input",
|
|
2030
|
+
"rich_text",
|
|
2031
|
+
"section",
|
|
2032
|
+
"table",
|
|
2033
|
+
"video"
|
|
2034
|
+
];
|
|
2035
|
+
e.child_blocks.forEach((e, r) => {
|
|
2036
|
+
let i = `${t}.child_blocks[${String(r)}]`;
|
|
2037
|
+
A(e, i), M(e.type, `${i}.type`), k(n.includes(e.type), "invalid_value", `${i}.type`, `"${e.type}" is not legal inside a container`), nt(e, "message", i);
|
|
2038
|
+
});
|
|
2039
|
+
}
|
|
2040
|
+
function et(e, t) {
|
|
2041
|
+
A(e, t), I(e, "file", t), R(e, t), k(e.source === "remote", "invalid_value", `${t}.source`, "expected \"remote\""), M(e.external_id, `${t}.external_id`);
|
|
2042
|
+
}
|
|
2043
|
+
function tt(e, t) {
|
|
2044
|
+
A(e, t), I(e, "video", t), R(e, t), M(e.video_url, `${t}.video_url`), M(e.thumbnail_url, `${t}.thumbnail_url`), M(e.alt_text, `${t}.alt_text`, { max: de }), B(e.title, `${t}.title`, 199), e.description !== void 0 && B(e.description, `${t}.description`, 199), N(e.author_name, `${t}.author_name`, { max: 49 });
|
|
2045
|
+
}
|
|
2046
|
+
function U(e, t, n) {
|
|
2047
|
+
k(e === "message", "surface_mismatch", t, `${n} blocks are only documented for message surfaces`);
|
|
2048
|
+
}
|
|
2049
|
+
function nt(e, t = "message", n = "block") {
|
|
2050
|
+
switch (A(e, n), R(e, n), e.type) {
|
|
2051
|
+
case "actions":
|
|
2052
|
+
ze(e, n);
|
|
2053
|
+
return;
|
|
2054
|
+
case "alert":
|
|
2055
|
+
Ye(e, t, n);
|
|
2056
|
+
return;
|
|
2057
|
+
case "card":
|
|
2058
|
+
U(t, n, e.type), qe(e, n);
|
|
2059
|
+
return;
|
|
2060
|
+
case "carousel":
|
|
2061
|
+
U(t, n, e.type), Je(e, n);
|
|
2062
|
+
return;
|
|
2063
|
+
case "container":
|
|
2064
|
+
U(t, n, e.type), $e(e, n);
|
|
2065
|
+
return;
|
|
2066
|
+
case "context":
|
|
2067
|
+
Re(e, n);
|
|
2068
|
+
return;
|
|
2069
|
+
case "context_actions":
|
|
2070
|
+
U(t, n, e.type), Xe(e, n);
|
|
2071
|
+
return;
|
|
2072
|
+
case "data_table":
|
|
2073
|
+
U(t, n, e.type), Ge(e, n);
|
|
2074
|
+
return;
|
|
2075
|
+
case "data_visualization":
|
|
2076
|
+
U(t, n, e.type), Ke(e, n);
|
|
2077
|
+
return;
|
|
2078
|
+
case "divider":
|
|
2079
|
+
I(e, "divider", n);
|
|
2080
|
+
return;
|
|
2081
|
+
case "file":
|
|
2082
|
+
U(t, n, e.type), et(e, n);
|
|
2083
|
+
return;
|
|
2084
|
+
case "header":
|
|
2085
|
+
Ie(e, n);
|
|
2086
|
+
return;
|
|
2087
|
+
case "image":
|
|
2088
|
+
Le(e, n);
|
|
2089
|
+
return;
|
|
2090
|
+
case "input":
|
|
2091
|
+
Be(e, n);
|
|
2092
|
+
return;
|
|
2093
|
+
case "markdown":
|
|
2094
|
+
U(t, n, e.type), M(e.text, `${n}.text`, { max: pe });
|
|
2095
|
+
return;
|
|
2096
|
+
case "plan":
|
|
2097
|
+
U(t, n, e.type), Qe(e, n);
|
|
2098
|
+
return;
|
|
2099
|
+
case "rich_text":
|
|
2100
|
+
H(e, n);
|
|
2101
|
+
return;
|
|
2102
|
+
case "section":
|
|
2103
|
+
Fe(e, n);
|
|
2104
|
+
return;
|
|
2105
|
+
case "table":
|
|
2106
|
+
U(t, n, e.type), We(e, n);
|
|
2107
|
+
return;
|
|
2108
|
+
case "task_card":
|
|
2109
|
+
U(t, n, e.type), Ze(e, n);
|
|
2110
|
+
return;
|
|
2111
|
+
case "video":
|
|
2112
|
+
tt(e, n);
|
|
2113
|
+
return;
|
|
2114
|
+
default: O("unsupported_block", `${n}.type`, `unsupported block "${String(e.type)}"`);
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
function rt(e, t, n = "message", r = "block") {
|
|
2118
|
+
nt(e, n, r), k(e.type === t, "invalid_value", `${r}.type`, `expected "${t}"`);
|
|
2119
|
+
}
|
|
2120
|
+
function it(e, t) {
|
|
2121
|
+
return Array.isArray(e) ? e : (A(e, t), j(e.blocks, `${t}.blocks`), e.blocks);
|
|
2122
|
+
}
|
|
2123
|
+
function at(e, t = "message", n = "data") {
|
|
2124
|
+
let r = Array.isArray(e) ? n : `${n}.blocks`, i = it(e, n), a = t === "message" ? 50 : 100;
|
|
2125
|
+
k(i.length <= a, "limit_exceeded", r, `${t} surfaces accept at most ${String(a)} blocks`);
|
|
2126
|
+
let o = 0, s = 0, c = 0, l = /* @__PURE__ */ new Set();
|
|
2127
|
+
i.forEach((e, n) => {
|
|
2128
|
+
let i = `${r}[${String(n)}]`;
|
|
2129
|
+
if (nt(e, t, i), e.block_id !== void 0 && (k(!l.has(e.block_id), "duplicate_id", `${i}.block_id`, `"${e.block_id}" is already used in this payload`), l.add(e.block_id)), e.type === "markdown") o += e.text.length;
|
|
2130
|
+
else if (e.type === "table") for (let t of e.rows) for (let e of t) s += Ve(e);
|
|
2131
|
+
else if (e.type === "data_table") for (let t of e.rows) for (let e of t) c += Ve(e);
|
|
2132
|
+
}), k(o <= pe, "limit_exceeded", r, `markdown blocks exceed the cumulative ${String(pe)} character limit`), k(s <= ge, "limit_exceeded", r, `table cells exceed the cumulative ${String(ge)} character limit`), k(c <= _e, "limit_exceeded", r, `data_table cells exceed the cumulative ${String(_e)} character limit`);
|
|
2133
|
+
}
|
|
2134
|
+
function ot(e, t = "message") {
|
|
2135
|
+
let n = e;
|
|
2136
|
+
if (typeof e == "string") try {
|
|
2137
|
+
n = JSON.parse(e);
|
|
2138
|
+
} catch {
|
|
2139
|
+
throw new b("expected valid JSON", {
|
|
2140
|
+
code: "invalid_json",
|
|
2141
|
+
path: "data"
|
|
2142
|
+
});
|
|
2143
|
+
}
|
|
2144
|
+
return at(n, t), n;
|
|
2145
|
+
}
|
|
2146
|
+
function st(e) {
|
|
2147
|
+
return ct(e) ? e.blocks : e;
|
|
2148
|
+
}
|
|
2149
|
+
function ct(e) {
|
|
2150
|
+
return !Array.isArray(e);
|
|
2151
|
+
}
|
|
2152
|
+
//#endregion
|
|
2153
|
+
//#region src/text/date.ts
|
|
2154
|
+
var lt = /\{([a-z_]+)\}/g, ut = [
|
|
2155
|
+
"January",
|
|
2156
|
+
"February",
|
|
2157
|
+
"March",
|
|
2158
|
+
"April",
|
|
2159
|
+
"May",
|
|
2160
|
+
"June",
|
|
2161
|
+
"July",
|
|
2162
|
+
"August",
|
|
2163
|
+
"September",
|
|
2164
|
+
"October",
|
|
2165
|
+
"November",
|
|
2166
|
+
"December"
|
|
2167
|
+
], dt = [
|
|
2168
|
+
"Jan",
|
|
2169
|
+
"Feb",
|
|
2170
|
+
"Mar",
|
|
2171
|
+
"Apr",
|
|
2172
|
+
"May",
|
|
2173
|
+
"Jun",
|
|
2174
|
+
"Jul",
|
|
2175
|
+
"Aug",
|
|
2176
|
+
"Sep",
|
|
2177
|
+
"Oct",
|
|
2178
|
+
"Nov",
|
|
2179
|
+
"Dec"
|
|
2180
|
+
], ft = [
|
|
2181
|
+
"Sunday",
|
|
2182
|
+
"Monday",
|
|
2183
|
+
"Tuesday",
|
|
2184
|
+
"Wednesday",
|
|
2185
|
+
"Thursday",
|
|
2186
|
+
"Friday",
|
|
2187
|
+
"Saturday"
|
|
2188
|
+
];
|
|
2189
|
+
function W(e) {
|
|
2190
|
+
return String(e).padStart(2, "0");
|
|
2191
|
+
}
|
|
2192
|
+
function pt(e) {
|
|
2193
|
+
let t = e % 100;
|
|
2194
|
+
if (t >= 11 && t <= 13) return `${String(e)}th`;
|
|
2195
|
+
switch (e % 10) {
|
|
2196
|
+
case 1: return `${String(e)}st`;
|
|
2197
|
+
case 2: return `${String(e)}nd`;
|
|
2198
|
+
case 3: return `${String(e)}rd`;
|
|
2199
|
+
default: return `${String(e)}th`;
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
function mt(e, t) {
|
|
2203
|
+
let n = t.getUTCDate(), r = ut[t.getUTCMonth()] ?? "", i = dt[t.getUTCMonth()] ?? "", a = ft[t.getUTCDay()] ?? "", o = t.getUTCFullYear();
|
|
2204
|
+
switch (e) {
|
|
2205
|
+
case "date_num": return `${String(o)}-${W(t.getUTCMonth() + 1)}-${W(n)}`;
|
|
2206
|
+
case "date_slash": return `${W(n)}/${W(t.getUTCMonth() + 1)}/${String(o)}`;
|
|
2207
|
+
case "date_long":
|
|
2208
|
+
case "date_long_pretty":
|
|
2209
|
+
case "day_divider_pretty": return `${a}, ${r} ${pt(n)}, ${String(o)}`;
|
|
2210
|
+
case "date_long_full": return `${r} ${String(n)}, ${String(o)}`;
|
|
2211
|
+
case "date":
|
|
2212
|
+
case "date_pretty": return `${r} ${String(n)}`;
|
|
2213
|
+
case "date_short":
|
|
2214
|
+
case "date_short_pretty": return `${i} ${String(n)}, ${String(o)}`;
|
|
2215
|
+
case "time": return `${W(t.getUTCHours())}:${W(t.getUTCMinutes())}`;
|
|
2216
|
+
case "time_secs": return `${W(t.getUTCHours())}:${W(t.getUTCMinutes())}:${W(t.getUTCSeconds())}`;
|
|
2217
|
+
default: return;
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
function ht(e, t, n) {
|
|
2221
|
+
let r = /* @__PURE__ */ new Date(e * 1e3);
|
|
2222
|
+
if (!Number.isFinite(e) || Number.isNaN(r.getTime())) return n ?? String(e);
|
|
2223
|
+
let i = !1, a = t.replace(lt, (e, t) => {
|
|
2224
|
+
let n = mt(t, r);
|
|
2225
|
+
return n === void 0 ? (i = !0, "") : n;
|
|
2226
|
+
});
|
|
2227
|
+
return t.length === 0 || i ? n ?? r.toISOString().slice(0, 10) : a;
|
|
2228
|
+
}
|
|
2229
|
+
//#endregion
|
|
2230
|
+
//#region src/text/emoji.ts
|
|
2231
|
+
var gt = {
|
|
2232
|
+
"+1": "👍",
|
|
2233
|
+
"-1": "👎",
|
|
2234
|
+
100: "💯",
|
|
2235
|
+
blush: "😊",
|
|
2236
|
+
bug: "🐛",
|
|
2237
|
+
bulb: "💡",
|
|
2238
|
+
check: "✓",
|
|
2239
|
+
clap: "👏",
|
|
2240
|
+
eyes: "👀",
|
|
2241
|
+
fire: "🔥",
|
|
2242
|
+
gear: "⚙️",
|
|
2243
|
+
grinning: "😀",
|
|
2244
|
+
heart: "❤️",
|
|
2245
|
+
heavy_check_mark: "✔️",
|
|
2246
|
+
joy: "😂",
|
|
2247
|
+
link: "🔗",
|
|
2248
|
+
mag: "🔍",
|
|
2249
|
+
memo: "📝",
|
|
2250
|
+
ok_hand: "👌",
|
|
2251
|
+
pray: "🙏",
|
|
2252
|
+
rocket: "🚀",
|
|
2253
|
+
smile: "😄",
|
|
2254
|
+
sob: "😭",
|
|
2255
|
+
sparkles: "✨",
|
|
2256
|
+
star: "⭐",
|
|
2257
|
+
sweat_smile: "😅",
|
|
2258
|
+
tada: "🎉",
|
|
2259
|
+
thinking_face: "🤔",
|
|
2260
|
+
thumbsdown: "👎",
|
|
2261
|
+
thumbsup: "👍",
|
|
2262
|
+
warning: "⚠️",
|
|
2263
|
+
wave: "👋",
|
|
2264
|
+
white_check_mark: "✅",
|
|
2265
|
+
wink: "😉",
|
|
2266
|
+
x: "❌",
|
|
2267
|
+
zap: "⚡"
|
|
2268
|
+
}, _t = /^[0-9a-f]{1,6}(?:-[0-9a-f]{1,6})*$/i;
|
|
2269
|
+
function vt(e) {
|
|
2270
|
+
return gt[e];
|
|
2271
|
+
}
|
|
2272
|
+
function yt(e) {
|
|
2273
|
+
if (e === void 0 || !_t.test(e)) return;
|
|
2274
|
+
let t = e.split("-").map((e) => Number.parseInt(e, 16));
|
|
2275
|
+
if (!t.some((e) => !Number.isFinite(e))) try {
|
|
2276
|
+
return String.fromCodePoint(...t);
|
|
2277
|
+
} catch {
|
|
2278
|
+
return;
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
//#endregion
|
|
2282
|
+
//#region src/text/RichText.tsx
|
|
2283
|
+
var bt = {
|
|
2284
|
+
attachment_mention: !0,
|
|
2285
|
+
broadcast: !0,
|
|
2286
|
+
canvas: !0,
|
|
2287
|
+
canvas_message_unfurl: !0,
|
|
2288
|
+
canvas_user_mention: !0,
|
|
2289
|
+
channel: !0,
|
|
2290
|
+
citation: !0,
|
|
2291
|
+
color: !0,
|
|
2292
|
+
date: !0,
|
|
2293
|
+
emoji: !0,
|
|
2294
|
+
file: !0,
|
|
2295
|
+
link: !0,
|
|
2296
|
+
list_record: !0,
|
|
2297
|
+
message_mention: !0,
|
|
2298
|
+
salesforce_data_field: !0,
|
|
2299
|
+
tag: !0,
|
|
2300
|
+
team: !0,
|
|
2301
|
+
text: !0,
|
|
2302
|
+
user: !0,
|
|
2303
|
+
usergroup: !0,
|
|
2304
|
+
work_object_mention: !0,
|
|
2305
|
+
workflow_mention: !0
|
|
2306
|
+
}, xt = {
|
|
2307
|
+
rich_text_list: !0,
|
|
2308
|
+
rich_text_preformatted: !0,
|
|
2309
|
+
rich_text_quote: !0,
|
|
2310
|
+
rich_text_section: !0
|
|
2311
|
+
};
|
|
2312
|
+
function St(e) {
|
|
2313
|
+
switch (e.type) {
|
|
2314
|
+
case "broadcast":
|
|
2315
|
+
case "channel":
|
|
2316
|
+
case "color":
|
|
2317
|
+
case "date":
|
|
2318
|
+
case "emoji":
|
|
2319
|
+
case "link":
|
|
2320
|
+
case "team":
|
|
2321
|
+
case "text":
|
|
2322
|
+
case "user":
|
|
2323
|
+
case "usergroup": return e.style;
|
|
2324
|
+
case "attachment_mention":
|
|
2325
|
+
case "canvas":
|
|
2326
|
+
case "canvas_message_unfurl":
|
|
2327
|
+
case "canvas_user_mention":
|
|
2328
|
+
case "citation":
|
|
2329
|
+
case "file":
|
|
2330
|
+
case "list_record":
|
|
2331
|
+
case "message_mention":
|
|
2332
|
+
case "salesforce_data_field":
|
|
2333
|
+
case "tag":
|
|
2334
|
+
case "work_object_mention":
|
|
2335
|
+
case "workflow_mention": return;
|
|
2336
|
+
}
|
|
2337
|
+
return g(e);
|
|
2338
|
+
}
|
|
2339
|
+
function Ct(e) {
|
|
2340
|
+
let t = S(e);
|
|
2341
|
+
if (t === void 0 || !(t in bt) || !x(e)) return !1;
|
|
2342
|
+
switch (t) {
|
|
2343
|
+
case "text": return typeof e.text == "string";
|
|
2344
|
+
case "link": return typeof e.url == "string";
|
|
2345
|
+
case "emoji": return typeof e.name == "string";
|
|
2346
|
+
case "user": return typeof e.user_id == "string";
|
|
2347
|
+
case "usergroup": return typeof e.usergroup_id == "string";
|
|
2348
|
+
case "channel": return typeof e.channel_id == "string";
|
|
2349
|
+
case "team": return typeof e.team_id == "string";
|
|
2350
|
+
case "broadcast": return typeof e.range == "string";
|
|
2351
|
+
case "date": return typeof e.timestamp == "number" && typeof e.format == "string";
|
|
2352
|
+
case "color": return typeof e.value == "string";
|
|
2353
|
+
default: return !0;
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2356
|
+
function wt(e) {
|
|
2357
|
+
let t = S(e);
|
|
2358
|
+
return t === void 0 || !(t in xt) || !x(e) || !Array.isArray(e.elements) ? !1 : t !== "rich_text_list" || e.elements.every((e) => x(e) && e.type === "rich_text_section" && Array.isArray(e.elements));
|
|
2359
|
+
}
|
|
2360
|
+
function G(e, t) {
|
|
2361
|
+
let n = e;
|
|
2362
|
+
return t?.bold === !0 && (n = /* @__PURE__ */ l("strong", {
|
|
2363
|
+
...h(T.bold),
|
|
2364
|
+
children: n
|
|
2365
|
+
})), t?.italic === !0 && (n = /* @__PURE__ */ l("em", {
|
|
2366
|
+
...h(T.italic),
|
|
2367
|
+
children: n
|
|
2368
|
+
})), t?.strike === !0 && (n = /* @__PURE__ */ l("s", {
|
|
2369
|
+
...h(T.strike),
|
|
2370
|
+
children: n
|
|
2371
|
+
})), t?.underline === !0 && (n = /* @__PURE__ */ l("span", {
|
|
2372
|
+
...h(T.underline),
|
|
2373
|
+
children: n
|
|
2374
|
+
})), t?.code === !0 && (n = /* @__PURE__ */ l("code", {
|
|
2375
|
+
...h(T.inlineCode),
|
|
2376
|
+
children: n
|
|
2377
|
+
})), n;
|
|
2378
|
+
}
|
|
2379
|
+
function Tt(e) {
|
|
2380
|
+
return e.text ?? e.id ?? e.user_id ?? e.channel_id ?? e.team_id ?? e.file_id ?? e.canvas_id ?? e.record_id ?? e.message_ts ?? e.workflow_id ?? e.type;
|
|
2381
|
+
}
|
|
2382
|
+
function Et({ element: e }) {
|
|
2383
|
+
let { resolvers: t } = y();
|
|
2384
|
+
if (!Ct(e)) return /* @__PURE__ */ l("span", {
|
|
2385
|
+
...h(T.reference),
|
|
2386
|
+
"data-unhandled-rich-text-element": S(e) ?? "unknown",
|
|
2387
|
+
children: C(e, "rich text element")
|
|
2388
|
+
});
|
|
2389
|
+
let n = St(e);
|
|
2390
|
+
switch (e.type) {
|
|
2391
|
+
case "text": return G(e.text, n);
|
|
2392
|
+
case "link": {
|
|
2393
|
+
let t = w(e.url), r = e.text ?? e.url;
|
|
2394
|
+
return t === void 0 ? G(r, n) : /* @__PURE__ */ l("a", {
|
|
2395
|
+
...h(T.link),
|
|
2396
|
+
href: t,
|
|
2397
|
+
rel: "noreferrer",
|
|
2398
|
+
children: G(r, n)
|
|
2399
|
+
});
|
|
2400
|
+
}
|
|
2401
|
+
case "emoji": return /* @__PURE__ */ l("span", {
|
|
2402
|
+
"aria-label": `:${e.name}:`,
|
|
2403
|
+
role: "img",
|
|
2404
|
+
children: G(t.emoji?.(e.name, e.unicode) ?? yt(e.unicode) ?? vt(e.name) ?? `:${e.name}:`, n)
|
|
2405
|
+
});
|
|
2406
|
+
case "user": return /* @__PURE__ */ l("span", {
|
|
2407
|
+
...h(T.mention),
|
|
2408
|
+
children: G(/* @__PURE__ */ u(c, { children: ["@", t.user?.(e.user_id) ?? e.user_id] }), n)
|
|
2409
|
+
});
|
|
2410
|
+
case "usergroup": return /* @__PURE__ */ l("span", {
|
|
2411
|
+
...h(T.mention),
|
|
2412
|
+
children: G(/* @__PURE__ */ u(c, { children: ["@", t.usergroup?.(e.usergroup_id) ?? e.usergroup_id] }), n)
|
|
2413
|
+
});
|
|
2414
|
+
case "channel": return /* @__PURE__ */ l("span", {
|
|
2415
|
+
...h(T.mention),
|
|
2416
|
+
children: G(/* @__PURE__ */ u(c, { children: ["#", t.channel?.(e.channel_id) ?? e.channel_id] }), n)
|
|
2417
|
+
});
|
|
2418
|
+
case "team": return /* @__PURE__ */ l("span", {
|
|
2419
|
+
...h(T.mention),
|
|
2420
|
+
children: G(/* @__PURE__ */ u(c, { children: ["@", t.team?.(e.team_id) ?? e.team_id] }), n)
|
|
2421
|
+
});
|
|
2422
|
+
case "broadcast": return /* @__PURE__ */ l("span", {
|
|
2423
|
+
...h(T.mention),
|
|
2424
|
+
children: G(`@${e.range}`, n)
|
|
2425
|
+
});
|
|
2426
|
+
case "date": {
|
|
2427
|
+
let r = t.date?.(e.timestamp, e.format) ?? ht(e.timestamp, e.format, e.fallback), i = w(e.url);
|
|
2428
|
+
return i === void 0 ? G(r, n) : /* @__PURE__ */ l("a", {
|
|
2429
|
+
...h(T.link),
|
|
2430
|
+
href: i,
|
|
2431
|
+
rel: "noreferrer",
|
|
2432
|
+
children: G(r, n)
|
|
2433
|
+
});
|
|
2434
|
+
}
|
|
2435
|
+
case "color": return /* @__PURE__ */ u("span", { children: [/* @__PURE__ */ l("span", {
|
|
2436
|
+
...h(T.colorSwatch),
|
|
2437
|
+
"aria-hidden": "true",
|
|
2438
|
+
style: { backgroundColor: e.value }
|
|
2439
|
+
}), G(e.value, n)] });
|
|
2440
|
+
case "citation": return /* @__PURE__ */ u("span", {
|
|
2441
|
+
...h(T.reference),
|
|
2442
|
+
children: [
|
|
2443
|
+
"[",
|
|
2444
|
+
e.index ?? e.text ?? "source",
|
|
2445
|
+
"]"
|
|
2446
|
+
]
|
|
2447
|
+
});
|
|
2448
|
+
case "attachment_mention":
|
|
2449
|
+
case "canvas":
|
|
2450
|
+
case "canvas_message_unfurl":
|
|
2451
|
+
case "canvas_user_mention":
|
|
2452
|
+
case "file":
|
|
2453
|
+
case "list_record":
|
|
2454
|
+
case "message_mention":
|
|
2455
|
+
case "salesforce_data_field":
|
|
2456
|
+
case "tag":
|
|
2457
|
+
case "work_object_mention":
|
|
2458
|
+
case "workflow_mention": return /* @__PURE__ */ l("span", {
|
|
2459
|
+
...h(T.reference),
|
|
2460
|
+
children: Tt(e)
|
|
2461
|
+
});
|
|
2462
|
+
}
|
|
2463
|
+
return g(e);
|
|
2464
|
+
}
|
|
2465
|
+
function Dt(e, n) {
|
|
2466
|
+
let r = S(e);
|
|
2467
|
+
if ((r === "text" || r === "link") && x(e)) {
|
|
2468
|
+
let t = e.text;
|
|
2469
|
+
if (typeof t == "string") return t;
|
|
2470
|
+
let n = e.url;
|
|
2471
|
+
if (typeof n == "string") return n;
|
|
2472
|
+
}
|
|
2473
|
+
return /* @__PURE__ */ t("span", {
|
|
2474
|
+
...h(T.reference),
|
|
2475
|
+
"data-unhandled-rich-text-element": r ?? "unknown",
|
|
2476
|
+
key: `${r ?? "unknown"}-${String(n)}`
|
|
2477
|
+
}, C(e, "rich text element"));
|
|
2478
|
+
}
|
|
2479
|
+
function Ot(e) {
|
|
2480
|
+
let t = e % 3;
|
|
2481
|
+
return t === 1 ? T.listOrderedAlpha : t === 2 ? T.listOrderedRoman : T.listOrdered;
|
|
2482
|
+
}
|
|
2483
|
+
function kt(e) {
|
|
2484
|
+
let t = e % 3;
|
|
2485
|
+
return t === 1 ? T.listBulletAlternate : t === 2 ? T.listBulletSquare : T.listBullet;
|
|
2486
|
+
}
|
|
2487
|
+
function At({ element: e, path: n }) {
|
|
2488
|
+
if (!wt(e)) return /* @__PURE__ */ l("div", {
|
|
2489
|
+
...h(T.unhandled),
|
|
2490
|
+
"data-unhandled-rich-text-container": S(e) ?? "unknown",
|
|
2491
|
+
children: C(e, "rich text container")
|
|
2492
|
+
});
|
|
2493
|
+
switch (e.type) {
|
|
2494
|
+
case "rich_text_section": return /* @__PURE__ */ l("div", {
|
|
2495
|
+
...h(T.richSection),
|
|
2496
|
+
"data-rich-text-section": !0,
|
|
2497
|
+
children: e.elements.map((e, t) => /* @__PURE__ */ l(Et, { element: e }, `${S(e) ?? "unknown"}-${String(t)}`))
|
|
2498
|
+
});
|
|
2499
|
+
case "rich_text_quote": return /* @__PURE__ */ l("blockquote", {
|
|
2500
|
+
...h(T.quote, e.border === 1 && T.richBorder),
|
|
2501
|
+
"data-border": e.border ?? 0,
|
|
2502
|
+
children: e.elements.map((e, t) => /* @__PURE__ */ l(Et, { element: e }, `${S(e) ?? "unknown"}-${String(t)}`))
|
|
2503
|
+
});
|
|
2504
|
+
case "rich_text_preformatted": return /* @__PURE__ */ l("pre", {
|
|
2505
|
+
...h(T.pre, e.border === 1 && T.richBorder),
|
|
2506
|
+
"data-border": e.border ?? 0,
|
|
2507
|
+
"data-language": e.language,
|
|
2508
|
+
children: e.elements.map((e, t) => Dt(e, t))
|
|
2509
|
+
});
|
|
2510
|
+
case "rich_text_list": {
|
|
2511
|
+
let r = Number.isFinite(e.indent) ? Math.trunc(e.indent ?? 0) : 0, i = Math.min(8, Math.max(0, r)), a = Number.isFinite(e.offset) ? Math.trunc(e.offset ?? 0) : 0, o = Math.max(1, a + 1), s = { marginInlineStart: i * 28 }, c = e.style === "ordered" ? T.listItemOrdered : [T.listItemBullet, kt(i)], u = e.elements.map((e, r) => /* @__PURE__ */ t("li", {
|
|
2512
|
+
...h(c),
|
|
2513
|
+
key: `${n}.elements[${String(r)}]`
|
|
2514
|
+
}, e.elements.map((e, t) => /* @__PURE__ */ l(Et, { element: e }, `${S(e) ?? "unknown"}-${String(t)}`))));
|
|
2515
|
+
return e.style === "ordered" ? /* @__PURE__ */ l("ol", {
|
|
2516
|
+
...h(T.list, Ot(i), e.border === 1 && T.richBorder),
|
|
2517
|
+
"data-border": e.border ?? 0,
|
|
2518
|
+
"data-indent": i,
|
|
2519
|
+
start: o,
|
|
2520
|
+
style: s,
|
|
2521
|
+
children: u
|
|
2522
|
+
}) : /* @__PURE__ */ l("ul", {
|
|
2523
|
+
...h(T.list, e.border === 1 && T.richBorder),
|
|
2524
|
+
"data-border": e.border ?? 0,
|
|
2525
|
+
"data-indent": i,
|
|
2526
|
+
style: s,
|
|
2527
|
+
children: u
|
|
2528
|
+
});
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
return g(e);
|
|
2532
|
+
}
|
|
2533
|
+
function K({ block: e, className: t, path: n = "block" }) {
|
|
2534
|
+
let r = h(T.richText), i = e, a = x(i) ? i.elements : void 0;
|
|
2535
|
+
return /* @__PURE__ */ l("div", {
|
|
2536
|
+
...r,
|
|
2537
|
+
className: D(r.className, t),
|
|
2538
|
+
children: Array.isArray(a) ? a.map((e, t) => /* @__PURE__ */ l(At, {
|
|
2539
|
+
element: e,
|
|
2540
|
+
path: `${n}.elements[${String(t)}]`
|
|
2541
|
+
}, `${S(e) ?? "unknown"}-${String(t)}`)) : /* @__PURE__ */ l("div", {
|
|
2542
|
+
...h(T.unhandled),
|
|
2543
|
+
"data-unhandled-rich-text-block": !0,
|
|
2544
|
+
children: C(i, "rich text block")
|
|
2545
|
+
})
|
|
2546
|
+
});
|
|
2547
|
+
}
|
|
2548
|
+
//#endregion
|
|
2549
|
+
//#region src/elements/Elements.tsx
|
|
2550
|
+
var jt = {
|
|
2551
|
+
button: !0,
|
|
2552
|
+
channels_select: !0,
|
|
2553
|
+
checkboxes: !0,
|
|
2554
|
+
conversations_select: !0,
|
|
2555
|
+
datepicker: !0,
|
|
2556
|
+
datetimepicker: !0,
|
|
2557
|
+
email_text_input: !0,
|
|
2558
|
+
external_select: !0,
|
|
2559
|
+
file_input: !0,
|
|
2560
|
+
image: !0,
|
|
2561
|
+
multi_channels_select: !0,
|
|
2562
|
+
multi_conversations_select: !0,
|
|
2563
|
+
multi_external_select: !0,
|
|
2564
|
+
multi_static_select: !0,
|
|
2565
|
+
multi_users_select: !0,
|
|
2566
|
+
number_input: !0,
|
|
2567
|
+
overflow: !0,
|
|
2568
|
+
plain_text_input: !0,
|
|
2569
|
+
radio_buttons: !0,
|
|
2570
|
+
rich_text_input: !0,
|
|
2571
|
+
static_select: !0,
|
|
2572
|
+
timepicker: !0,
|
|
2573
|
+
url_text_input: !0,
|
|
2574
|
+
users_select: !0,
|
|
2575
|
+
workflow_button: !0
|
|
2576
|
+
};
|
|
2577
|
+
function Mt(e) {
|
|
2578
|
+
let t = S(e);
|
|
2579
|
+
return t !== void 0 && t in jt;
|
|
2580
|
+
}
|
|
2581
|
+
function Nt(e) {
|
|
2582
|
+
if (!x(e)) return;
|
|
2583
|
+
if ("image_url" in e) return typeof e.image_url == "string" ? e.image_url : void 0;
|
|
2584
|
+
let t = e.slack_file;
|
|
2585
|
+
if (x(t) && typeof t.url == "string") return t.url;
|
|
2586
|
+
}
|
|
2587
|
+
function q(e, t) {
|
|
2588
|
+
try {
|
|
2589
|
+
return Ae(e, t), !0;
|
|
2590
|
+
} catch (e) {
|
|
2591
|
+
if (e instanceof b) return !1;
|
|
2592
|
+
throw e;
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
function J({ className: e, element: t }) {
|
|
2596
|
+
let n = h(T.unhandled);
|
|
2597
|
+
return /* @__PURE__ */ l("span", {
|
|
2598
|
+
...n,
|
|
2599
|
+
className: D(n.className, e),
|
|
2600
|
+
"data-unhandled-element": S(t) ?? "unknown",
|
|
2601
|
+
children: C(t, "Block Kit element")
|
|
2602
|
+
});
|
|
2603
|
+
}
|
|
2604
|
+
function Y({ className: e, element: t, variant: n }) {
|
|
2605
|
+
let r = h(T.image, n === "accessory" && T.accessoryImage, n === "cardHero" && T.cardHero, n === "cardIcon" && T.cardIcon, n === "context" && T.contextImage), i = t, a = x(i) && typeof i.alt_text == "string" ? i.alt_text : C(i, "image"), o = Nt(t);
|
|
2606
|
+
return o === void 0 ? /* @__PURE__ */ l("div", {
|
|
2607
|
+
...r,
|
|
2608
|
+
"aria-label": a,
|
|
2609
|
+
className: D(r.className, e),
|
|
2610
|
+
role: "img"
|
|
2611
|
+
}) : /* @__PURE__ */ l("img", {
|
|
2612
|
+
...r,
|
|
2613
|
+
alt: a,
|
|
2614
|
+
className: D(r.className, e),
|
|
2615
|
+
src: o
|
|
2616
|
+
});
|
|
2617
|
+
}
|
|
2618
|
+
function Pt({ blockId: e, className: t, element: n, path: r = "element" }) {
|
|
2619
|
+
let { onAction: i } = y();
|
|
2620
|
+
if (!q(n, r)) return /* @__PURE__ */ l(J, {
|
|
2621
|
+
className: t,
|
|
2622
|
+
element: n
|
|
2623
|
+
});
|
|
2624
|
+
let a = h(T.button, n.style === "primary" && T.buttonPrimary, n.style === "danger" && T.buttonDanger), o = () => {
|
|
2625
|
+
n.action_id !== void 0 && i?.({
|
|
2626
|
+
actionId: n.action_id,
|
|
2627
|
+
type: n.type,
|
|
2628
|
+
...e === void 0 ? {} : { blockId: e },
|
|
2629
|
+
...n.value === void 0 ? {} : { value: n.value }
|
|
2630
|
+
});
|
|
2631
|
+
}, s = w(n.url);
|
|
2632
|
+
return s === void 0 ? /* @__PURE__ */ l("button", {
|
|
2633
|
+
...a,
|
|
2634
|
+
"aria-label": n.accessibility_label,
|
|
2635
|
+
className: D(a.className, t),
|
|
2636
|
+
onClick: o,
|
|
2637
|
+
type: "button",
|
|
2638
|
+
children: n.text.text
|
|
2639
|
+
}) : /* @__PURE__ */ l("a", {
|
|
2640
|
+
...a,
|
|
2641
|
+
"aria-label": n.accessibility_label,
|
|
2642
|
+
className: D(a.className, t),
|
|
2643
|
+
href: s,
|
|
2644
|
+
onClick: o,
|
|
2645
|
+
rel: "noreferrer",
|
|
2646
|
+
children: n.text.text
|
|
2647
|
+
});
|
|
2648
|
+
}
|
|
2649
|
+
function Ft({ blockId: e, className: t, element: n, path: r = "element" }) {
|
|
2650
|
+
let { onAction: i } = y();
|
|
2651
|
+
if (!q(n, r)) return /* @__PURE__ */ l(J, {
|
|
2652
|
+
className: t,
|
|
2653
|
+
element: n
|
|
2654
|
+
});
|
|
2655
|
+
let a = h(T.button, T.overflowButton);
|
|
2656
|
+
return /* @__PURE__ */ l("button", {
|
|
2657
|
+
...a,
|
|
2658
|
+
"aria-label": "More options",
|
|
2659
|
+
className: D(a.className, t),
|
|
2660
|
+
onClick: () => {
|
|
2661
|
+
n.action_id !== void 0 && i?.({
|
|
2662
|
+
actionId: n.action_id,
|
|
2663
|
+
type: n.type,
|
|
2664
|
+
...e === void 0 ? {} : { blockId: e }
|
|
2665
|
+
});
|
|
2666
|
+
},
|
|
2667
|
+
type: "button",
|
|
2668
|
+
children: "⋯"
|
|
2669
|
+
});
|
|
2670
|
+
}
|
|
2671
|
+
function It(e, t) {
|
|
2672
|
+
return e.value ?? `${e.text.text}-${String(t)}`;
|
|
2673
|
+
}
|
|
2674
|
+
function Lt(e, t) {
|
|
2675
|
+
return t?.some((t) => t.value === e.value && t.text.text === e.text.text) ?? !1;
|
|
2676
|
+
}
|
|
2677
|
+
function Rt({ blockId: e, className: n, element: r, path: i = "element" }) {
|
|
2678
|
+
let { onAction: a } = y();
|
|
2679
|
+
if (!q(r, i)) return /* @__PURE__ */ l(J, {
|
|
2680
|
+
className: n,
|
|
2681
|
+
element: r
|
|
2682
|
+
});
|
|
2683
|
+
let o = h(T.choiceGroup), s = r.type === "checkboxes" ? r.initial_options : r.initial_option === void 0 ? void 0 : [r.initial_option];
|
|
2684
|
+
return /* @__PURE__ */ l("fieldset", {
|
|
2685
|
+
...o,
|
|
2686
|
+
className: D(o.className, n),
|
|
2687
|
+
"data-element-type": r.type,
|
|
2688
|
+
children: r.options.map((n, i) => {
|
|
2689
|
+
let o = It(n, i);
|
|
2690
|
+
return /* @__PURE__ */ t("label", {
|
|
2691
|
+
...h(T.choice),
|
|
2692
|
+
key: o
|
|
2693
|
+
}, /* @__PURE__ */ l("input", {
|
|
2694
|
+
defaultChecked: Lt(n, s),
|
|
2695
|
+
name: r.action_id,
|
|
2696
|
+
onChange: (t) => {
|
|
2697
|
+
if (r.action_id !== void 0) {
|
|
2698
|
+
let n = r.type === "checkboxes" ? Array.from(t.currentTarget.closest("fieldset")?.querySelectorAll("input[type=\"checkbox\"]:checked") ?? [], (e) => e.value) : void 0;
|
|
2699
|
+
a?.({
|
|
2700
|
+
actionId: r.action_id,
|
|
2701
|
+
type: r.type,
|
|
2702
|
+
...e === void 0 ? {} : { blockId: e },
|
|
2703
|
+
...n === void 0 ? { value: o } : { values: n }
|
|
2704
|
+
});
|
|
2705
|
+
}
|
|
2706
|
+
},
|
|
2707
|
+
type: r.type === "checkboxes" ? "checkbox" : "radio",
|
|
2708
|
+
value: o
|
|
2709
|
+
}), /* @__PURE__ */ u("span", { children: [n.text.text, n.description === void 0 ? null : /* @__PURE__ */ u("span", {
|
|
2710
|
+
...h(T.smallText),
|
|
2711
|
+
children: [" ", n.description.text]
|
|
2712
|
+
})] }));
|
|
2713
|
+
})
|
|
2714
|
+
});
|
|
2715
|
+
}
|
|
2716
|
+
function zt(e) {
|
|
2717
|
+
return e.options === void 0 ? e.option_groups?.flatMap((e) => e.options) ?? [] : e.options;
|
|
2718
|
+
}
|
|
2719
|
+
function Bt(e) {
|
|
2720
|
+
return e.map((e, t) => ({
|
|
2721
|
+
label: e.text.text,
|
|
2722
|
+
value: It(e, t)
|
|
2723
|
+
}));
|
|
2724
|
+
}
|
|
2725
|
+
function X(e) {
|
|
2726
|
+
return e.map((e) => ({
|
|
2727
|
+
label: e,
|
|
2728
|
+
value: e
|
|
2729
|
+
}));
|
|
2730
|
+
}
|
|
2731
|
+
function Vt(e) {
|
|
2732
|
+
switch (e.type) {
|
|
2733
|
+
case "static_select":
|
|
2734
|
+
case "multi_static_select": return Bt(zt(e));
|
|
2735
|
+
case "external_select": return e.initial_option === void 0 ? [] : Bt([e.initial_option]);
|
|
2736
|
+
case "multi_external_select": return Bt(e.initial_options ?? []);
|
|
2737
|
+
case "users_select": return X(e.initial_user === void 0 ? [] : [e.initial_user]);
|
|
2738
|
+
case "multi_users_select": return X(e.initial_users ?? []);
|
|
2739
|
+
case "channels_select": return X(e.initial_channel === void 0 ? [] : [e.initial_channel]);
|
|
2740
|
+
case "multi_channels_select": return X(e.initial_channels ?? []);
|
|
2741
|
+
case "conversations_select": return X(e.initial_conversation === void 0 ? [] : [e.initial_conversation]);
|
|
2742
|
+
case "multi_conversations_select": return X(e.initial_conversations ?? []);
|
|
2743
|
+
}
|
|
2744
|
+
return g(e);
|
|
2745
|
+
}
|
|
2746
|
+
function Ht(e, t) {
|
|
2747
|
+
return e.flatMap((e, n) => Lt(e, t) ? [It(e, n)] : []);
|
|
2748
|
+
}
|
|
2749
|
+
function Ut(e, t) {
|
|
2750
|
+
switch (e.type) {
|
|
2751
|
+
case "static_select": return Ht(zt(e), e.initial_option === void 0 ? void 0 : [e.initial_option]);
|
|
2752
|
+
case "multi_static_select": return Ht(zt(e), e.initial_options);
|
|
2753
|
+
case "external_select":
|
|
2754
|
+
case "multi_external_select":
|
|
2755
|
+
case "users_select":
|
|
2756
|
+
case "multi_users_select":
|
|
2757
|
+
case "channels_select":
|
|
2758
|
+
case "multi_channels_select":
|
|
2759
|
+
case "conversations_select":
|
|
2760
|
+
case "multi_conversations_select": return t.map((e) => e.value);
|
|
2761
|
+
}
|
|
2762
|
+
return g(e);
|
|
2763
|
+
}
|
|
2764
|
+
function Wt(e) {
|
|
2765
|
+
if ("placeholder" in e && e.placeholder !== void 0) return e.placeholder.text;
|
|
2766
|
+
switch (e.type) {
|
|
2767
|
+
case "users_select":
|
|
2768
|
+
case "multi_users_select": return "Select people";
|
|
2769
|
+
case "channels_select":
|
|
2770
|
+
case "multi_channels_select": return "Select channels";
|
|
2771
|
+
case "conversations_select":
|
|
2772
|
+
case "multi_conversations_select": return "Select conversations";
|
|
2773
|
+
case "external_select":
|
|
2774
|
+
case "multi_external_select":
|
|
2775
|
+
case "multi_static_select":
|
|
2776
|
+
case "static_select": return "Select an option";
|
|
2777
|
+
}
|
|
2778
|
+
return g(e);
|
|
2779
|
+
}
|
|
2780
|
+
function Gt({ blockId: e, className: t, element: n, path: r = "element" }) {
|
|
2781
|
+
let { onAction: i } = y();
|
|
2782
|
+
if (!q(n, r)) return /* @__PURE__ */ l(J, {
|
|
2783
|
+
className: t,
|
|
2784
|
+
element: n
|
|
2785
|
+
});
|
|
2786
|
+
let a = h(T.select), o = n.type.startsWith("multi_"), s = Vt(n), c = Ut(n, s), d = (t) => {
|
|
2787
|
+
if (n.action_id !== void 0) {
|
|
2788
|
+
let r = Array.from(t.currentTarget.selectedOptions, (e) => e.value);
|
|
2789
|
+
i?.({
|
|
2790
|
+
actionId: n.action_id,
|
|
2791
|
+
type: n.type,
|
|
2792
|
+
...e === void 0 ? {} : { blockId: e },
|
|
2793
|
+
...o ? { values: r } : { value: t.currentTarget.value }
|
|
2794
|
+
});
|
|
2795
|
+
}
|
|
2796
|
+
};
|
|
2797
|
+
return /* @__PURE__ */ u("select", {
|
|
2798
|
+
...a,
|
|
2799
|
+
"aria-label": Wt(n),
|
|
2800
|
+
className: D(a.className, t),
|
|
2801
|
+
defaultValue: o ? c : c[0] ?? "",
|
|
2802
|
+
multiple: o,
|
|
2803
|
+
onChange: d,
|
|
2804
|
+
children: [/* @__PURE__ */ l("option", {
|
|
2805
|
+
disabled: !0,
|
|
2806
|
+
value: "",
|
|
2807
|
+
children: Wt(n)
|
|
2808
|
+
}), s.length === 0 ? /* @__PURE__ */ l("option", {
|
|
2809
|
+
value: "preview",
|
|
2810
|
+
children: "Preview option"
|
|
2811
|
+
}) : s.map((e) => /* @__PURE__ */ l("option", {
|
|
2812
|
+
value: e.value,
|
|
2813
|
+
children: e.label
|
|
2814
|
+
}, e.value))]
|
|
2815
|
+
});
|
|
2816
|
+
}
|
|
2817
|
+
function Kt(e) {
|
|
2818
|
+
return String(e).padStart(2, "0");
|
|
2819
|
+
}
|
|
2820
|
+
function qt(e) {
|
|
2821
|
+
return `${String(e.getFullYear())}-${Kt(e.getMonth() + 1)}-${Kt(e.getDate())}`;
|
|
2822
|
+
}
|
|
2823
|
+
function Jt(e) {
|
|
2824
|
+
if (e === void 0) return "Select a date";
|
|
2825
|
+
if (e === qt(/* @__PURE__ */ new Date())) return "Today";
|
|
2826
|
+
let [t = "", n = "", r = ""] = e.split("-");
|
|
2827
|
+
return `${n}/${r}/${t}`;
|
|
2828
|
+
}
|
|
2829
|
+
function Yt(e) {
|
|
2830
|
+
if (e === void 0) return;
|
|
2831
|
+
let t = /* @__PURE__ */ new Date(e * 1e3);
|
|
2832
|
+
if (!Number.isNaN(t.getTime())) return `${String(t.getFullYear())}-${Kt(t.getMonth() + 1)}-${Kt(t.getDate())}T${Kt(t.getHours())}:${Kt(t.getMinutes())}`;
|
|
2833
|
+
}
|
|
2834
|
+
function Xt({ blockId: e, className: t, element: n, path: r = "element" }) {
|
|
2835
|
+
let { onAction: i } = y();
|
|
2836
|
+
if (!q(n, r)) return /* @__PURE__ */ l(J, {
|
|
2837
|
+
className: t,
|
|
2838
|
+
element: n
|
|
2839
|
+
});
|
|
2840
|
+
let a = h(T.input), o = (t) => {
|
|
2841
|
+
n.action_id !== void 0 && i?.({
|
|
2842
|
+
actionId: n.action_id,
|
|
2843
|
+
type: n.type,
|
|
2844
|
+
value: t,
|
|
2845
|
+
...e === void 0 ? {} : { blockId: e }
|
|
2846
|
+
});
|
|
2847
|
+
}, s = (e) => {
|
|
2848
|
+
o(e.currentTarget.value);
|
|
2849
|
+
};
|
|
2850
|
+
switch (n.type) {
|
|
2851
|
+
case "plain_text_input": return n.multiline === !0 ? /* @__PURE__ */ l("textarea", {
|
|
2852
|
+
...a,
|
|
2853
|
+
className: D(a.className, t),
|
|
2854
|
+
defaultValue: n.initial_value,
|
|
2855
|
+
maxLength: n.max_length,
|
|
2856
|
+
minLength: n.min_length,
|
|
2857
|
+
onChange: s,
|
|
2858
|
+
placeholder: n.placeholder?.text,
|
|
2859
|
+
rows: 4
|
|
2860
|
+
}) : /* @__PURE__ */ l("input", {
|
|
2861
|
+
...a,
|
|
2862
|
+
className: D(a.className, t),
|
|
2863
|
+
defaultValue: n.initial_value,
|
|
2864
|
+
maxLength: n.max_length,
|
|
2865
|
+
minLength: n.min_length,
|
|
2866
|
+
onChange: s,
|
|
2867
|
+
placeholder: n.placeholder?.text,
|
|
2868
|
+
type: "text"
|
|
2869
|
+
});
|
|
2870
|
+
case "email_text_input": return /* @__PURE__ */ l("input", {
|
|
2871
|
+
...a,
|
|
2872
|
+
className: D(a.className, t),
|
|
2873
|
+
defaultValue: n.initial_value,
|
|
2874
|
+
onChange: s,
|
|
2875
|
+
placeholder: n.placeholder?.text,
|
|
2876
|
+
type: "email"
|
|
2877
|
+
});
|
|
2878
|
+
case "url_text_input": return /* @__PURE__ */ l("input", {
|
|
2879
|
+
...a,
|
|
2880
|
+
className: D(a.className, t),
|
|
2881
|
+
defaultValue: n.initial_value,
|
|
2882
|
+
onChange: s,
|
|
2883
|
+
placeholder: n.placeholder?.text,
|
|
2884
|
+
type: "url"
|
|
2885
|
+
});
|
|
2886
|
+
case "number_input": return /* @__PURE__ */ l("input", {
|
|
2887
|
+
...a,
|
|
2888
|
+
className: D(a.className, t),
|
|
2889
|
+
defaultValue: n.initial_value,
|
|
2890
|
+
max: n.max_value,
|
|
2891
|
+
min: n.min_value,
|
|
2892
|
+
onChange: s,
|
|
2893
|
+
placeholder: n.placeholder?.text,
|
|
2894
|
+
step: n.is_decimal_allowed ? "any" : 1,
|
|
2895
|
+
type: "number"
|
|
2896
|
+
});
|
|
2897
|
+
case "datepicker": {
|
|
2898
|
+
let e = h(T.button, T.picker);
|
|
2899
|
+
return /* @__PURE__ */ u("button", {
|
|
2900
|
+
...e,
|
|
2901
|
+
"aria-label": "Date",
|
|
2902
|
+
className: D(e.className, t),
|
|
2903
|
+
onClick: () => {
|
|
2904
|
+
o(n.initial_date ?? "");
|
|
2905
|
+
},
|
|
2906
|
+
type: "button",
|
|
2907
|
+
children: [
|
|
2908
|
+
/* @__PURE__ */ l("span", {
|
|
2909
|
+
...h(T.pickerIcon),
|
|
2910
|
+
"aria-hidden": "true",
|
|
2911
|
+
children: "▦"
|
|
2912
|
+
}),
|
|
2913
|
+
Jt(n.initial_date),
|
|
2914
|
+
/* @__PURE__ */ l("span", {
|
|
2915
|
+
...h(T.pickerChevron),
|
|
2916
|
+
"aria-hidden": "true",
|
|
2917
|
+
children: "⌄"
|
|
2918
|
+
})
|
|
2919
|
+
]
|
|
2920
|
+
});
|
|
2921
|
+
}
|
|
2922
|
+
case "datetimepicker": return /* @__PURE__ */ l("input", {
|
|
2923
|
+
...a,
|
|
2924
|
+
className: D(a.className, t),
|
|
2925
|
+
defaultValue: Yt(n.initial_date_time),
|
|
2926
|
+
onChange: s,
|
|
2927
|
+
type: "datetime-local"
|
|
2928
|
+
});
|
|
2929
|
+
case "timepicker": return /* @__PURE__ */ l("input", {
|
|
2930
|
+
...a,
|
|
2931
|
+
className: D(a.className, t),
|
|
2932
|
+
defaultValue: n.initial_time,
|
|
2933
|
+
onChange: s,
|
|
2934
|
+
type: "time"
|
|
2935
|
+
});
|
|
2936
|
+
case "file_input": return /* @__PURE__ */ l("input", {
|
|
2937
|
+
...a,
|
|
2938
|
+
accept: n.filetypes?.map((e) => `.${e}`).join(","),
|
|
2939
|
+
className: D(a.className, t),
|
|
2940
|
+
multiple: (n.max_files ?? 10) > 1,
|
|
2941
|
+
onChange: (e) => {
|
|
2942
|
+
o(e.currentTarget.files?.[0]?.name ?? "");
|
|
2943
|
+
},
|
|
2944
|
+
type: "file"
|
|
2945
|
+
});
|
|
2946
|
+
case "rich_text_input": return /* @__PURE__ */ l("div", {
|
|
2947
|
+
...a,
|
|
2948
|
+
className: D(a.className, t),
|
|
2949
|
+
contentEditable: !0,
|
|
2950
|
+
onInput: (e) => {
|
|
2951
|
+
o(e.currentTarget.textContent ?? "");
|
|
2952
|
+
},
|
|
2953
|
+
role: "textbox",
|
|
2954
|
+
suppressContentEditableWarning: !0,
|
|
2955
|
+
children: n.initial_value === void 0 ? null : /* @__PURE__ */ l(K, {
|
|
2956
|
+
block: n.initial_value,
|
|
2957
|
+
path: `${r}.initial_value`
|
|
2958
|
+
})
|
|
2959
|
+
});
|
|
2960
|
+
}
|
|
2961
|
+
return g(n);
|
|
2962
|
+
}
|
|
2963
|
+
function Zt({ blockId: e, className: t, element: n, path: r = "element" }) {
|
|
2964
|
+
if (!Mt(n)) return /* @__PURE__ */ l(J, {
|
|
2965
|
+
className: t,
|
|
2966
|
+
element: n
|
|
2967
|
+
});
|
|
2968
|
+
if (n.type === "image") return /* @__PURE__ */ l(Y, {
|
|
2969
|
+
className: t,
|
|
2970
|
+
element: n,
|
|
2971
|
+
path: r
|
|
2972
|
+
});
|
|
2973
|
+
switch (n.type) {
|
|
2974
|
+
case "button": return /* @__PURE__ */ l(Pt, {
|
|
2975
|
+
blockId: e,
|
|
2976
|
+
className: t,
|
|
2977
|
+
element: n,
|
|
2978
|
+
path: r
|
|
2979
|
+
});
|
|
2980
|
+
case "checkboxes":
|
|
2981
|
+
case "radio_buttons": return /* @__PURE__ */ l(Rt, {
|
|
2982
|
+
blockId: e,
|
|
2983
|
+
className: t,
|
|
2984
|
+
element: n,
|
|
2985
|
+
path: r
|
|
2986
|
+
});
|
|
2987
|
+
case "overflow": return /* @__PURE__ */ l(Ft, {
|
|
2988
|
+
blockId: e,
|
|
2989
|
+
className: t,
|
|
2990
|
+
element: n,
|
|
2991
|
+
path: r
|
|
2992
|
+
});
|
|
2993
|
+
case "channels_select":
|
|
2994
|
+
case "conversations_select":
|
|
2995
|
+
case "external_select":
|
|
2996
|
+
case "multi_channels_select":
|
|
2997
|
+
case "multi_conversations_select":
|
|
2998
|
+
case "multi_external_select":
|
|
2999
|
+
case "multi_static_select":
|
|
3000
|
+
case "multi_users_select":
|
|
3001
|
+
case "static_select":
|
|
3002
|
+
case "users_select": return /* @__PURE__ */ l(Gt, {
|
|
3003
|
+
blockId: e,
|
|
3004
|
+
className: t,
|
|
3005
|
+
element: n,
|
|
3006
|
+
path: r
|
|
3007
|
+
});
|
|
3008
|
+
case "datepicker":
|
|
3009
|
+
case "datetimepicker":
|
|
3010
|
+
case "email_text_input":
|
|
3011
|
+
case "file_input":
|
|
3012
|
+
case "number_input":
|
|
3013
|
+
case "plain_text_input":
|
|
3014
|
+
case "rich_text_input":
|
|
3015
|
+
case "timepicker":
|
|
3016
|
+
case "url_text_input": return /* @__PURE__ */ l(Xt, {
|
|
3017
|
+
blockId: e,
|
|
3018
|
+
className: t,
|
|
3019
|
+
element: n,
|
|
3020
|
+
path: r
|
|
3021
|
+
});
|
|
3022
|
+
case "workflow_button": {
|
|
3023
|
+
if (!q(n, r)) return /* @__PURE__ */ l(J, {
|
|
3024
|
+
className: t,
|
|
3025
|
+
element: n
|
|
3026
|
+
});
|
|
3027
|
+
let e = h(T.button);
|
|
3028
|
+
return /* @__PURE__ */ l("button", {
|
|
3029
|
+
...e,
|
|
3030
|
+
className: D(e.className, t),
|
|
3031
|
+
type: "button",
|
|
3032
|
+
children: n.text.text
|
|
3033
|
+
});
|
|
3034
|
+
}
|
|
3035
|
+
}
|
|
3036
|
+
return g(n);
|
|
3037
|
+
}
|
|
3038
|
+
//#endregion
|
|
3039
|
+
//#region src/text/Mrkdwn.tsx
|
|
3040
|
+
var Qt = /* @__PURE__ */ new Set([
|
|
3041
|
+
"*",
|
|
3042
|
+
"_",
|
|
3043
|
+
"~",
|
|
3044
|
+
"`",
|
|
3045
|
+
"<",
|
|
3046
|
+
":"
|
|
3047
|
+
]), $t = /^[a-z0-9_+-]{1,64}$/, en = /[A-Za-z0-9]/;
|
|
3048
|
+
function tn(e) {
|
|
3049
|
+
return e.replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
3050
|
+
}
|
|
3051
|
+
function nn(e) {
|
|
3052
|
+
let t = tn(e);
|
|
3053
|
+
if (t.startsWith("@")) return {
|
|
3054
|
+
id: t.slice(1),
|
|
3055
|
+
kind: "user"
|
|
3056
|
+
};
|
|
3057
|
+
if (t.startsWith("#")) {
|
|
3058
|
+
let [e = "", n] = t.slice(1).split("|", 2);
|
|
3059
|
+
return {
|
|
3060
|
+
id: e,
|
|
3061
|
+
kind: "channel",
|
|
3062
|
+
...n === void 0 ? {} : { fallback: n }
|
|
3063
|
+
};
|
|
3064
|
+
}
|
|
3065
|
+
if (t.startsWith("!subteam^")) {
|
|
3066
|
+
let [e = "", n] = t.slice(9).split("|", 2);
|
|
3067
|
+
return {
|
|
3068
|
+
id: e,
|
|
3069
|
+
kind: "usergroup",
|
|
3070
|
+
...n === void 0 ? {} : { fallback: n }
|
|
3071
|
+
};
|
|
3072
|
+
}
|
|
3073
|
+
if (t.startsWith("!date^")) {
|
|
3074
|
+
let [e = "", n] = t.slice(6).split("|", 2), [r = "", i = "", a] = e.split("^", 3);
|
|
3075
|
+
return {
|
|
3076
|
+
id: r,
|
|
3077
|
+
kind: "date",
|
|
3078
|
+
format: i,
|
|
3079
|
+
...n === void 0 ? {} : { fallback: n },
|
|
3080
|
+
...a === void 0 ? {} : { href: a }
|
|
3081
|
+
};
|
|
3082
|
+
}
|
|
3083
|
+
if (t === "!here" || t === "!channel" || t === "!everyone") return {
|
|
3084
|
+
kind: "broadcast",
|
|
3085
|
+
range: t.slice(1)
|
|
3086
|
+
};
|
|
3087
|
+
let n = t.indexOf("|");
|
|
3088
|
+
if (n >= 0) return {
|
|
3089
|
+
href: t.slice(0, n),
|
|
3090
|
+
kind: "link",
|
|
3091
|
+
label: t.slice(n + 1)
|
|
3092
|
+
};
|
|
3093
|
+
if (/^(?:https?:|mailto:)/i.test(t)) return {
|
|
3094
|
+
href: t,
|
|
3095
|
+
kind: "link",
|
|
3096
|
+
label: t
|
|
3097
|
+
};
|
|
3098
|
+
}
|
|
3099
|
+
function rn(e, t) {
|
|
3100
|
+
for (let n = t; n < e.length; n += 1) if (Qt.has(e[n] ?? "")) return n;
|
|
3101
|
+
return e.length;
|
|
3102
|
+
}
|
|
3103
|
+
function an(e, t) {
|
|
3104
|
+
if (t > 16) return [{
|
|
3105
|
+
kind: "text",
|
|
3106
|
+
value: tn(e)
|
|
3107
|
+
}];
|
|
3108
|
+
let n = [], r = 0;
|
|
3109
|
+
for (; r < e.length;) {
|
|
3110
|
+
if (e.startsWith("```", r)) {
|
|
3111
|
+
let t = e.indexOf("```", r + 3);
|
|
3112
|
+
if (t >= 0) {
|
|
3113
|
+
n.push({
|
|
3114
|
+
kind: "code_block",
|
|
3115
|
+
value: tn(e.slice(r + 3, t))
|
|
3116
|
+
}), r = t + 3;
|
|
3117
|
+
continue;
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
3120
|
+
let i = e[r] ?? "";
|
|
3121
|
+
if (i === "`") {
|
|
3122
|
+
let t = e.indexOf("`", r + 1);
|
|
3123
|
+
if (t > r + 1) {
|
|
3124
|
+
n.push({
|
|
3125
|
+
kind: "code",
|
|
3126
|
+
value: tn(e.slice(r + 1, t))
|
|
3127
|
+
}), r = t + 1;
|
|
3128
|
+
continue;
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
if (i === "*" || i === "_" || i === "~") {
|
|
3132
|
+
let a = e.indexOf(i, r + 1);
|
|
3133
|
+
if (a > r + 1) {
|
|
3134
|
+
let o = i === "*" ? "bold" : i === "_" ? "italic" : "strike";
|
|
3135
|
+
n.push({
|
|
3136
|
+
children: an(e.slice(r + 1, a), t + 1),
|
|
3137
|
+
kind: o
|
|
3138
|
+
}), r = a + 1;
|
|
3139
|
+
continue;
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3142
|
+
if (i === "<") {
|
|
3143
|
+
let t = e.indexOf(">", r + 1);
|
|
3144
|
+
if (t >= 0) {
|
|
3145
|
+
let i = nn(e.slice(r + 1, t));
|
|
3146
|
+
if (i !== void 0) {
|
|
3147
|
+
n.push(i), r = t + 1;
|
|
3148
|
+
continue;
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
}
|
|
3152
|
+
if (i === ":") {
|
|
3153
|
+
let t = e.indexOf(":", r + 1), i = t < 0 ? "" : e.slice(r + 1, t), a = r === 0 || !en.test(e[r - 1] ?? ""), o = t < 0 || t + 1 >= e.length || !en.test(e[t + 1] ?? "");
|
|
3154
|
+
if (t > r + 1 && a && o && $t.test(i)) {
|
|
3155
|
+
n.push({
|
|
3156
|
+
kind: "emoji",
|
|
3157
|
+
name: i
|
|
3158
|
+
}), r = t + 1;
|
|
3159
|
+
continue;
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
let a = rn(e, r + 1);
|
|
3163
|
+
n.push({
|
|
3164
|
+
kind: "text",
|
|
3165
|
+
value: tn(e.slice(r, a))
|
|
3166
|
+
}), r = a;
|
|
3167
|
+
}
|
|
3168
|
+
return n;
|
|
3169
|
+
}
|
|
3170
|
+
function on(e) {
|
|
3171
|
+
return an(e, 0);
|
|
3172
|
+
}
|
|
3173
|
+
function sn({ token: e }) {
|
|
3174
|
+
let { resolvers: t } = y();
|
|
3175
|
+
switch (e.kind) {
|
|
3176
|
+
case "text": return e.value;
|
|
3177
|
+
case "bold": return /* @__PURE__ */ l("strong", {
|
|
3178
|
+
...h(T.bold),
|
|
3179
|
+
children: e.children.map((e, t) => /* @__PURE__ */ l(sn, { token: e }, `${e.kind}-${String(t)}`))
|
|
3180
|
+
});
|
|
3181
|
+
case "italic": return /* @__PURE__ */ l("em", {
|
|
3182
|
+
...h(T.italic),
|
|
3183
|
+
children: e.children.map((e, t) => /* @__PURE__ */ l(sn, { token: e }, `${e.kind}-${String(t)}`))
|
|
3184
|
+
});
|
|
3185
|
+
case "strike": return /* @__PURE__ */ l("s", {
|
|
3186
|
+
...h(T.strike),
|
|
3187
|
+
children: e.children.map((e, t) => /* @__PURE__ */ l(sn, { token: e }, `${e.kind}-${String(t)}`))
|
|
3188
|
+
});
|
|
3189
|
+
case "code": return /* @__PURE__ */ l("code", {
|
|
3190
|
+
...h(T.inlineCode),
|
|
3191
|
+
children: e.value
|
|
3192
|
+
});
|
|
3193
|
+
case "code_block": return /* @__PURE__ */ l("pre", {
|
|
3194
|
+
...h(T.pre),
|
|
3195
|
+
children: e.value
|
|
3196
|
+
});
|
|
3197
|
+
case "emoji": return /* @__PURE__ */ l("span", {
|
|
3198
|
+
"aria-label": `:${e.name}:`,
|
|
3199
|
+
role: "img",
|
|
3200
|
+
children: t.emoji?.(e.name) ?? vt(e.name) ?? `:${e.name}:`
|
|
3201
|
+
});
|
|
3202
|
+
case "link": {
|
|
3203
|
+
let t = w(e.href);
|
|
3204
|
+
return t === void 0 ? e.label : /* @__PURE__ */ l("a", {
|
|
3205
|
+
...h(T.link),
|
|
3206
|
+
href: t,
|
|
3207
|
+
rel: "noreferrer",
|
|
3208
|
+
children: e.label
|
|
3209
|
+
});
|
|
3210
|
+
}
|
|
3211
|
+
case "user": return /* @__PURE__ */ u("span", {
|
|
3212
|
+
...h(T.mention),
|
|
3213
|
+
children: ["@", t.user?.(e.id) ?? e.id]
|
|
3214
|
+
});
|
|
3215
|
+
case "channel": return /* @__PURE__ */ u("span", {
|
|
3216
|
+
...h(T.mention),
|
|
3217
|
+
children: ["#", t.channel?.(e.id) ?? e.fallback ?? e.id]
|
|
3218
|
+
});
|
|
3219
|
+
case "usergroup": return /* @__PURE__ */ u("span", {
|
|
3220
|
+
...h(T.mention),
|
|
3221
|
+
children: ["@", t.usergroup?.(e.id) ?? e.fallback ?? e.id]
|
|
3222
|
+
});
|
|
3223
|
+
case "team": return /* @__PURE__ */ u("span", {
|
|
3224
|
+
...h(T.mention),
|
|
3225
|
+
children: ["@", t.team?.(e.id) ?? e.id]
|
|
3226
|
+
});
|
|
3227
|
+
case "broadcast": return /* @__PURE__ */ u("span", {
|
|
3228
|
+
...h(T.mention),
|
|
3229
|
+
children: ["@", e.range]
|
|
3230
|
+
});
|
|
3231
|
+
case "date": {
|
|
3232
|
+
let n = Number(e.id), r = Number.isFinite(n) ? t.date?.(n, e.format ?? "") ?? ht(n, e.format ?? "", e.fallback) : e.fallback ?? e.id, i = w(e.href);
|
|
3233
|
+
return i === void 0 ? r : /* @__PURE__ */ l("a", {
|
|
3234
|
+
...h(T.link),
|
|
3235
|
+
href: i,
|
|
3236
|
+
rel: "noreferrer",
|
|
3237
|
+
children: r
|
|
3238
|
+
});
|
|
3239
|
+
}
|
|
3240
|
+
}
|
|
3241
|
+
return g(e);
|
|
3242
|
+
}
|
|
3243
|
+
function Z({ className: e, text: t }) {
|
|
3244
|
+
let n = h(T.text);
|
|
3245
|
+
return /* @__PURE__ */ l("div", {
|
|
3246
|
+
...n,
|
|
3247
|
+
className: D(n.className, e),
|
|
3248
|
+
children: on(t).map((e, t) => /* @__PURE__ */ l(sn, { token: e }, `${e.kind}-${String(t)}`))
|
|
3249
|
+
});
|
|
3250
|
+
}
|
|
3251
|
+
//#endregion
|
|
3252
|
+
//#region src/text/Text.tsx
|
|
3253
|
+
function Q({ className: e, text: t }) {
|
|
3254
|
+
let n = t, r = x(n) && typeof n.text == "string" ? n.text : C(n, "text");
|
|
3255
|
+
if (S(n) === "mrkdwn") return /* @__PURE__ */ l(Z, {
|
|
3256
|
+
className: e,
|
|
3257
|
+
text: r
|
|
3258
|
+
});
|
|
3259
|
+
let i = h(T.text);
|
|
3260
|
+
return /* @__PURE__ */ l("div", {
|
|
3261
|
+
...i,
|
|
3262
|
+
className: D(i.className, e),
|
|
3263
|
+
children: r
|
|
3264
|
+
});
|
|
3265
|
+
}
|
|
3266
|
+
//#endregion
|
|
3267
|
+
//#region src/text/Markdown.tsx
|
|
3268
|
+
function cn(e) {
|
|
3269
|
+
let t = e.trim();
|
|
3270
|
+
return t === "---" || t === "***" || t === "___";
|
|
3271
|
+
}
|
|
3272
|
+
function ln(e) {
|
|
3273
|
+
let t = e.trim().replace(/^\|/, "").replace(/\|$/, "").split("|");
|
|
3274
|
+
return t.length > 0 && t.every((e) => /^:?-{3,}:?$/.test(e.trim()));
|
|
3275
|
+
}
|
|
3276
|
+
function un(e) {
|
|
3277
|
+
return e.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((e) => e.trim());
|
|
3278
|
+
}
|
|
3279
|
+
function dn(e) {
|
|
3280
|
+
let t = /^\s*[-*+]\s+\[([ xX])\]\s+(.+)$/.exec(e);
|
|
3281
|
+
if (t !== null) return {
|
|
3282
|
+
checked: (t[1] ?? "").toLowerCase() === "x",
|
|
3283
|
+
ordered: !1,
|
|
3284
|
+
task: !0,
|
|
3285
|
+
text: t[2] ?? ""
|
|
3286
|
+
};
|
|
3287
|
+
let n = /^\s*[-*+]\s+(.+)$/.exec(e);
|
|
3288
|
+
if (n !== null) return {
|
|
3289
|
+
ordered: !1,
|
|
3290
|
+
task: !1,
|
|
3291
|
+
text: n[1] ?? ""
|
|
3292
|
+
};
|
|
3293
|
+
let r = /^\s*\d+[.)]\s+(.+)$/.exec(e);
|
|
3294
|
+
if (r !== null) return {
|
|
3295
|
+
ordered: !0,
|
|
3296
|
+
task: !1,
|
|
3297
|
+
text: r[1] ?? ""
|
|
3298
|
+
};
|
|
3299
|
+
}
|
|
3300
|
+
function fn(e) {
|
|
3301
|
+
let t = e.split("\n"), n = [], r = 0;
|
|
3302
|
+
for (; r < t.length;) {
|
|
3303
|
+
let e = t[r] ?? "";
|
|
3304
|
+
if (e.trim().length === 0) {
|
|
3305
|
+
r += 1;
|
|
3306
|
+
continue;
|
|
3307
|
+
}
|
|
3308
|
+
if (e.trimStart().startsWith("```")) {
|
|
3309
|
+
let i = e.trim().slice(3).trim(), a = [];
|
|
3310
|
+
for (r += 1; r < t.length && !(t[r] ?? "").trimStart().startsWith("```");) a.push(t[r] ?? ""), r += 1;
|
|
3311
|
+
r += +(r < t.length), n.push({
|
|
3312
|
+
kind: "code",
|
|
3313
|
+
text: a.join("\n"),
|
|
3314
|
+
...i.length === 0 ? {} : { language: i }
|
|
3315
|
+
});
|
|
3316
|
+
continue;
|
|
3317
|
+
}
|
|
3318
|
+
if (e.includes("|") && r + 1 < t.length && ln(t[r + 1] ?? "")) {
|
|
3319
|
+
let i = un(e), a = [];
|
|
3320
|
+
for (r += 2; r < t.length && (t[r] ?? "").includes("|");) a.push(un(t[r] ?? "")), r += 1;
|
|
3321
|
+
n.push({
|
|
3322
|
+
headers: i,
|
|
3323
|
+
kind: "table",
|
|
3324
|
+
rows: a
|
|
3325
|
+
});
|
|
3326
|
+
continue;
|
|
3327
|
+
}
|
|
3328
|
+
if (cn(e)) {
|
|
3329
|
+
n.push({ kind: "divider" }), r += 1;
|
|
3330
|
+
continue;
|
|
3331
|
+
}
|
|
3332
|
+
let i = /^(#{1,6})\s+(.+)$/.exec(e);
|
|
3333
|
+
if (i !== null) {
|
|
3334
|
+
n.push({
|
|
3335
|
+
kind: "heading",
|
|
3336
|
+
level: (i[1] ?? "#").length,
|
|
3337
|
+
text: i[2] ?? ""
|
|
3338
|
+
}), r += 1;
|
|
3339
|
+
continue;
|
|
3340
|
+
}
|
|
3341
|
+
let a = dn(e);
|
|
3342
|
+
if (a !== void 0) {
|
|
3343
|
+
let e = [a];
|
|
3344
|
+
for (r += 1; r < t.length;) {
|
|
3345
|
+
let n = dn(t[r] ?? "");
|
|
3346
|
+
if (n === void 0 || n.ordered !== a.ordered) break;
|
|
3347
|
+
e.push(n), r += 1;
|
|
3348
|
+
}
|
|
3349
|
+
n.push({
|
|
3350
|
+
items: e,
|
|
3351
|
+
kind: "list",
|
|
3352
|
+
ordered: a.ordered
|
|
3353
|
+
});
|
|
3354
|
+
continue;
|
|
3355
|
+
}
|
|
3356
|
+
if (e.trimStart().startsWith(">")) {
|
|
3357
|
+
let e = [];
|
|
3358
|
+
for (; r < t.length && (t[r] ?? "").trimStart().startsWith(">");) e.push((t[r] ?? "").trimStart().replace(/^>\s?/, "")), r += 1;
|
|
3359
|
+
n.push({
|
|
3360
|
+
kind: "quote",
|
|
3361
|
+
text: e.join("\n")
|
|
3362
|
+
});
|
|
3363
|
+
continue;
|
|
3364
|
+
}
|
|
3365
|
+
let o = [e];
|
|
3366
|
+
for (r += 1; r < t.length && (t[r] ?? "").trim().length > 0;) {
|
|
3367
|
+
let e = t[r] ?? "";
|
|
3368
|
+
if (e.trimStart().startsWith("```") || cn(e) || /^(#{1,6})\s+/.test(e) || dn(e) !== void 0 || e.trimStart().startsWith(">")) break;
|
|
3369
|
+
o.push(e), r += 1;
|
|
3370
|
+
}
|
|
3371
|
+
n.push({
|
|
3372
|
+
kind: "paragraph",
|
|
3373
|
+
text: o.join("\n")
|
|
3374
|
+
});
|
|
3375
|
+
}
|
|
3376
|
+
return n;
|
|
3377
|
+
}
|
|
3378
|
+
function pn(e) {
|
|
3379
|
+
return e.replace(/\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/g, "<$2|$1>").replaceAll("**", "*").replaceAll("__", "*").replaceAll("~~", "~");
|
|
3380
|
+
}
|
|
3381
|
+
function mn(e) {
|
|
3382
|
+
return e <= 1 ? T.heading1 : e === 2 ? T.heading2 : e === 3 ? T.heading3 : T.heading4;
|
|
3383
|
+
}
|
|
3384
|
+
function hn({ token: e }) {
|
|
3385
|
+
switch (e.kind) {
|
|
3386
|
+
case "paragraph": return /* @__PURE__ */ l(Z, { text: pn(e.text) });
|
|
3387
|
+
case "quote": return /* @__PURE__ */ l("blockquote", {
|
|
3388
|
+
...h(T.quote),
|
|
3389
|
+
children: /* @__PURE__ */ l(Z, { text: pn(e.text) })
|
|
3390
|
+
});
|
|
3391
|
+
case "heading": return /* @__PURE__ */ l("div", {
|
|
3392
|
+
...h(T.heading, mn(e.level)),
|
|
3393
|
+
children: /* @__PURE__ */ l(Z, { text: pn(e.text) })
|
|
3394
|
+
});
|
|
3395
|
+
case "divider": return /* @__PURE__ */ l("hr", { ...h(T.divider) });
|
|
3396
|
+
case "code": return /* @__PURE__ */ l("pre", {
|
|
3397
|
+
...h(T.pre),
|
|
3398
|
+
"data-language": e.language,
|
|
3399
|
+
children: e.text
|
|
3400
|
+
});
|
|
3401
|
+
case "list": {
|
|
3402
|
+
let n = e.ordered ? T.listItemOrdered : [T.listItemBullet, T.listBullet], r = e.items.map((e, r) => /* @__PURE__ */ t("li", {
|
|
3403
|
+
...h(n),
|
|
3404
|
+
key: `${e.text}-${String(r)}`
|
|
3405
|
+
}, e.task ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("input", {
|
|
3406
|
+
checked: e.checked,
|
|
3407
|
+
disabled: !0,
|
|
3408
|
+
readOnly: !0,
|
|
3409
|
+
type: "checkbox"
|
|
3410
|
+
}), " "] }) : null, /* @__PURE__ */ l(Z, { text: pn(e.text) })));
|
|
3411
|
+
return e.ordered ? /* @__PURE__ */ l("ol", {
|
|
3412
|
+
...h(T.list, T.listOrdered),
|
|
3413
|
+
children: r
|
|
3414
|
+
}) : /* @__PURE__ */ l("ul", {
|
|
3415
|
+
...h(T.list),
|
|
3416
|
+
children: r
|
|
3417
|
+
});
|
|
3418
|
+
}
|
|
3419
|
+
case "table": return /* @__PURE__ */ l("div", {
|
|
3420
|
+
...h(T.tableScroller),
|
|
3421
|
+
children: /* @__PURE__ */ u("table", {
|
|
3422
|
+
...h(T.table),
|
|
3423
|
+
children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: e.headers.map((e, n) => /* @__PURE__ */ t("th", {
|
|
3424
|
+
...h(T.tableCell, T.tableHeader, n === 0 && T.tableCellFirstColumn),
|
|
3425
|
+
key: `${e}-${String(n)}`,
|
|
3426
|
+
scope: "col"
|
|
3427
|
+
}, /* @__PURE__ */ l(Z, { text: pn(e) }))) }) }), /* @__PURE__ */ l("tbody", { children: e.rows.map((e, n) => /* @__PURE__ */ l("tr", { children: e.map((e, n) => /* @__PURE__ */ t("td", {
|
|
3428
|
+
...h(T.tableCell, n === 0 && T.tableCellFirstColumn),
|
|
3429
|
+
key: `${e}-${String(n)}`
|
|
3430
|
+
}, /* @__PURE__ */ l(Z, { text: pn(e) }))) }, `row-${String(n)}`)) })]
|
|
3431
|
+
})
|
|
3432
|
+
});
|
|
3433
|
+
}
|
|
3434
|
+
return g(e);
|
|
3435
|
+
}
|
|
3436
|
+
function gn({ markdown: e }) {
|
|
3437
|
+
return /* @__PURE__ */ l("div", {
|
|
3438
|
+
...h(T.markdown),
|
|
3439
|
+
children: fn(e).map((e, t) => /* @__PURE__ */ l(hn, { token: e }, `${e.kind}-${String(t)}`))
|
|
3440
|
+
});
|
|
3441
|
+
}
|
|
3442
|
+
//#endregion
|
|
3443
|
+
//#region src/blocks/BasicBlocks.tsx
|
|
3444
|
+
function _n(e) {
|
|
3445
|
+
return x(e) && e.type === "image";
|
|
3446
|
+
}
|
|
3447
|
+
function $({ blockId: e, blockType: t, children: n, className: r }) {
|
|
3448
|
+
let i = h(T.block);
|
|
3449
|
+
return /* @__PURE__ */ l("div", {
|
|
3450
|
+
...i,
|
|
3451
|
+
className: D(i.className, r),
|
|
3452
|
+
"data-block-id": e,
|
|
3453
|
+
"data-block-type": t,
|
|
3454
|
+
children: n
|
|
3455
|
+
});
|
|
3456
|
+
}
|
|
3457
|
+
function vn({ block: e, className: t, path: n = "block" }) {
|
|
3458
|
+
let r = e.accessory, i = Array.isArray(e.fields) ? e.fields : void 0;
|
|
3459
|
+
return /* @__PURE__ */ l($, {
|
|
3460
|
+
blockId: e.block_id,
|
|
3461
|
+
blockType: e.type,
|
|
3462
|
+
className: t,
|
|
3463
|
+
children: /* @__PURE__ */ u("div", {
|
|
3464
|
+
...h(T.section),
|
|
3465
|
+
children: [/* @__PURE__ */ u("div", {
|
|
3466
|
+
...h(T.sectionContent),
|
|
3467
|
+
children: [e.text === void 0 ? null : /* @__PURE__ */ l(Q, {
|
|
3468
|
+
path: `${n}.text`,
|
|
3469
|
+
text: e.text
|
|
3470
|
+
}), i === void 0 ? null : /* @__PURE__ */ l("div", {
|
|
3471
|
+
...h(T.fields),
|
|
3472
|
+
children: i.map((e, t) => /* @__PURE__ */ l(Q, {
|
|
3473
|
+
path: `${n}.fields[${String(t)}]`,
|
|
3474
|
+
text: e
|
|
3475
|
+
}, `${S(e) ?? "unknown"}-${String(t)}`))
|
|
3476
|
+
})]
|
|
3477
|
+
}), r === void 0 ? null : _n(r) ? /* @__PURE__ */ l("div", {
|
|
3478
|
+
...h(T.accessory),
|
|
3479
|
+
children: /* @__PURE__ */ l(Y, {
|
|
3480
|
+
element: r,
|
|
3481
|
+
path: `${n}.accessory`,
|
|
3482
|
+
variant: "accessory"
|
|
3483
|
+
})
|
|
3484
|
+
}) : /* @__PURE__ */ l(Zt, {
|
|
3485
|
+
blockId: e.block_id,
|
|
3486
|
+
className: h(T.accessory).className,
|
|
3487
|
+
element: e.accessory,
|
|
3488
|
+
path: `${n}.accessory`
|
|
3489
|
+
})]
|
|
3490
|
+
})
|
|
3491
|
+
});
|
|
3492
|
+
}
|
|
3493
|
+
function yn({ block: e, className: t }) {
|
|
3494
|
+
let n = e.level === void 0 ? void 0 : Math.trunc(e.level), r = n === void 0 || Number.isNaN(n) ? void 0 : Math.min(4, Math.max(1, n)), i = e.text, a = x(i) && typeof i.text == "string" ? i.text : C(e, "header"), o = h(T.heading, r === 1 && T.heading1, (r === void 0 || r === 2) && T.heading2, r === 3 && T.heading3, r === 4 && T.heading4), s = l(r === 1 ? "h1" : r === 3 ? "h3" : r === 4 ? "h4" : "h2", {
|
|
3495
|
+
...o,
|
|
3496
|
+
children: a
|
|
3497
|
+
});
|
|
3498
|
+
return /* @__PURE__ */ l($, {
|
|
3499
|
+
blockId: e.block_id,
|
|
3500
|
+
blockType: e.type,
|
|
3501
|
+
className: t,
|
|
3502
|
+
children: s
|
|
3503
|
+
});
|
|
3504
|
+
}
|
|
3505
|
+
function bn({ block: e, className: t }) {
|
|
3506
|
+
return /* @__PURE__ */ l($, {
|
|
3507
|
+
blockId: e.block_id,
|
|
3508
|
+
blockType: e.type,
|
|
3509
|
+
className: t,
|
|
3510
|
+
children: /* @__PURE__ */ l("hr", { ...h(T.divider) })
|
|
3511
|
+
});
|
|
3512
|
+
}
|
|
3513
|
+
function xn({ block: e, className: t, path: n = "block" }) {
|
|
3514
|
+
return /* @__PURE__ */ u($, {
|
|
3515
|
+
blockId: e.block_id,
|
|
3516
|
+
blockType: e.type,
|
|
3517
|
+
className: t,
|
|
3518
|
+
children: [/* @__PURE__ */ l(Y, {
|
|
3519
|
+
element: e,
|
|
3520
|
+
path: n
|
|
3521
|
+
}), e.title === void 0 ? null : /* @__PURE__ */ l(Q, {
|
|
3522
|
+
className: h(T.smallText).className,
|
|
3523
|
+
path: `${n}.title`,
|
|
3524
|
+
text: e.title
|
|
3525
|
+
})]
|
|
3526
|
+
});
|
|
3527
|
+
}
|
|
3528
|
+
function Sn(e) {
|
|
3529
|
+
return x(e) && (e.type === "mrkdwn" || e.type === "plain_text") && typeof e.text == "string";
|
|
3530
|
+
}
|
|
3531
|
+
function Cn({ block: e, className: n, path: r = "block" }) {
|
|
3532
|
+
let i = e.elements;
|
|
3533
|
+
return /* @__PURE__ */ l($, {
|
|
3534
|
+
blockId: e.block_id,
|
|
3535
|
+
blockType: e.type,
|
|
3536
|
+
className: n,
|
|
3537
|
+
children: /* @__PURE__ */ l("div", {
|
|
3538
|
+
...h(T.context),
|
|
3539
|
+
children: Array.isArray(i) ? i.map((e, n) => _n(e) ? /* @__PURE__ */ l(Y, {
|
|
3540
|
+
element: e,
|
|
3541
|
+
path: `${r}.elements[${String(n)}]`,
|
|
3542
|
+
variant: "context"
|
|
3543
|
+
}, `${e.type}-${String(n)}`) : Sn(e) ? /* @__PURE__ */ t("div", {
|
|
3544
|
+
...h(T.contextElement),
|
|
3545
|
+
key: `${e.type}-${String(n)}`
|
|
3546
|
+
}, /* @__PURE__ */ l(Q, {
|
|
3547
|
+
className: h(T.contextText).className,
|
|
3548
|
+
path: `${r}.elements[${String(n)}]`,
|
|
3549
|
+
text: e
|
|
3550
|
+
})) : /* @__PURE__ */ t("span", {
|
|
3551
|
+
...h(T.unhandled),
|
|
3552
|
+
"data-unhandled-element": S(e) ?? "unknown",
|
|
3553
|
+
key: `unhandled-${String(n)}`
|
|
3554
|
+
}, C(e, "context element"))) : /* @__PURE__ */ l("span", {
|
|
3555
|
+
...h(T.unhandled),
|
|
3556
|
+
"data-unhandled-element": "context",
|
|
3557
|
+
children: C(e, "context block")
|
|
3558
|
+
})
|
|
3559
|
+
})
|
|
3560
|
+
});
|
|
3561
|
+
}
|
|
3562
|
+
function wn({ block: e, className: t, path: n = "block" }) {
|
|
3563
|
+
return /* @__PURE__ */ l($, {
|
|
3564
|
+
blockId: e.block_id,
|
|
3565
|
+
blockType: e.type,
|
|
3566
|
+
className: t,
|
|
3567
|
+
children: /* @__PURE__ */ l(K, {
|
|
3568
|
+
block: e,
|
|
3569
|
+
path: n
|
|
3570
|
+
})
|
|
3571
|
+
});
|
|
3572
|
+
}
|
|
3573
|
+
function Tn({ block: e, className: t }) {
|
|
3574
|
+
let n = typeof e.text == "string" ? e.text : C(e, "markdown block");
|
|
3575
|
+
return /* @__PURE__ */ l($, {
|
|
3576
|
+
blockId: e.block_id,
|
|
3577
|
+
blockType: e.type,
|
|
3578
|
+
className: t,
|
|
3579
|
+
children: /* @__PURE__ */ l(gn, { markdown: n })
|
|
3580
|
+
});
|
|
3581
|
+
}
|
|
3582
|
+
function En({ block: e, className: t }) {
|
|
3583
|
+
return /* @__PURE__ */ l($, {
|
|
3584
|
+
blockId: e.block_id,
|
|
3585
|
+
blockType: e.type,
|
|
3586
|
+
className: t,
|
|
3587
|
+
children: /* @__PURE__ */ u("div", {
|
|
3588
|
+
...h(T.file),
|
|
3589
|
+
children: [/* @__PURE__ */ l("span", {
|
|
3590
|
+
"aria-hidden": "true",
|
|
3591
|
+
children: "📎"
|
|
3592
|
+
}), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("strong", { children: "Remote file" }), /* @__PURE__ */ l("div", {
|
|
3593
|
+
...h(T.smallText),
|
|
3594
|
+
children: e.external_id
|
|
3595
|
+
})] })]
|
|
3596
|
+
})
|
|
3597
|
+
});
|
|
3598
|
+
}
|
|
3599
|
+
function Dn({ block: e, className: t }) {
|
|
3600
|
+
let n = w(typeof e.title_url == "string" ? e.title_url : typeof e.video_url == "string" ? e.video_url : void 0), r = e.title, i = x(r) && typeof r.text == "string" ? r.text : C(e, "video"), a = e.description, o = x(a) && typeof a.text == "string" ? a.text : void 0, s = typeof e.alt_text == "string" ? e.alt_text : C(e, "video"), d = typeof e.thumbnail_url == "string" ? e.thumbnail_url : void 0, f = /* @__PURE__ */ u(c, { children: [d === void 0 ? null : /* @__PURE__ */ l("img", {
|
|
3601
|
+
...h(T.image, T.cardHero),
|
|
3602
|
+
alt: s,
|
|
3603
|
+
src: d
|
|
3604
|
+
}), /* @__PURE__ */ u("div", {
|
|
3605
|
+
...h(T.cardContent),
|
|
3606
|
+
children: [
|
|
3607
|
+
/* @__PURE__ */ l("strong", { children: i }),
|
|
3608
|
+
o,
|
|
3609
|
+
typeof e.provider_name == "string" ? /* @__PURE__ */ l("span", {
|
|
3610
|
+
...h(T.smallText),
|
|
3611
|
+
children: e.provider_name
|
|
3612
|
+
}) : null
|
|
3613
|
+
]
|
|
3614
|
+
})] });
|
|
3615
|
+
return /* @__PURE__ */ l($, {
|
|
3616
|
+
blockId: e.block_id,
|
|
3617
|
+
blockType: e.type,
|
|
3618
|
+
className: t,
|
|
3619
|
+
children: n === void 0 ? /* @__PURE__ */ l("div", {
|
|
3620
|
+
...h(T.card),
|
|
3621
|
+
"aria-label": s,
|
|
3622
|
+
children: f
|
|
3623
|
+
}) : /* @__PURE__ */ l("a", {
|
|
3624
|
+
...h(T.card),
|
|
3625
|
+
"aria-label": s,
|
|
3626
|
+
href: n,
|
|
3627
|
+
rel: "noreferrer",
|
|
3628
|
+
children: f
|
|
3629
|
+
})
|
|
3630
|
+
});
|
|
3631
|
+
}
|
|
3632
|
+
//#endregion
|
|
3633
|
+
//#region src/blocks/AdvancedBlocks.tsx
|
|
3634
|
+
function On({ align: e = "left", cell: t, className: n, firstColumn: r = !1, header: i = !1, path: a = "cell", scope: o = "col", wrapped: s = !1 }) {
|
|
3635
|
+
let c = h(T.tableCell, i && T.tableHeader, r && T.tableCellFirstColumn, s && T.tableCellWrapped), u;
|
|
3636
|
+
if (!x(t)) u = C(t, "table cell");
|
|
3637
|
+
else switch (t.type) {
|
|
3638
|
+
case "rich_text":
|
|
3639
|
+
u = /* @__PURE__ */ l(K, {
|
|
3640
|
+
block: t,
|
|
3641
|
+
path: a
|
|
3642
|
+
});
|
|
3643
|
+
break;
|
|
3644
|
+
case "raw_number":
|
|
3645
|
+
u = t.text ?? String(t.value);
|
|
3646
|
+
break;
|
|
3647
|
+
case "raw_text":
|
|
3648
|
+
u = t.text;
|
|
3649
|
+
break;
|
|
3650
|
+
default: u = C(t, "table cell");
|
|
3651
|
+
}
|
|
3652
|
+
return i ? /* @__PURE__ */ l("th", {
|
|
3653
|
+
...c,
|
|
3654
|
+
className: D(c.className, n),
|
|
3655
|
+
scope: o,
|
|
3656
|
+
style: { textAlign: e },
|
|
3657
|
+
children: u
|
|
3658
|
+
}) : /* @__PURE__ */ l("td", {
|
|
3659
|
+
...c,
|
|
3660
|
+
className: D(c.className, n),
|
|
3661
|
+
style: { textAlign: e },
|
|
3662
|
+
children: u
|
|
3663
|
+
});
|
|
3664
|
+
}
|
|
3665
|
+
function kn(e) {
|
|
3666
|
+
return Array.isArray(e);
|
|
3667
|
+
}
|
|
3668
|
+
function An({ block: e, className: t, path: n = "block" }) {
|
|
3669
|
+
let r = Array.isArray(e.rows) ? e.rows.filter(kn) : [], i = e.column_settings;
|
|
3670
|
+
return /* @__PURE__ */ l($, {
|
|
3671
|
+
blockId: e.block_id,
|
|
3672
|
+
blockType: e.type,
|
|
3673
|
+
className: t,
|
|
3674
|
+
children: /* @__PURE__ */ l("div", {
|
|
3675
|
+
...h(T.tableScroller),
|
|
3676
|
+
children: /* @__PURE__ */ u("table", {
|
|
3677
|
+
...h(T.table),
|
|
3678
|
+
children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: (r[0] ?? []).map((e, t) => /* @__PURE__ */ l(On, {
|
|
3679
|
+
align: i?.[t]?.align,
|
|
3680
|
+
cell: e,
|
|
3681
|
+
firstColumn: t === 0,
|
|
3682
|
+
header: !0,
|
|
3683
|
+
path: `${n}.rows[0][${String(t)}]`,
|
|
3684
|
+
wrapped: i?.[t]?.is_wrapped
|
|
3685
|
+
}, `header-${String(t)}`)) }) }), /* @__PURE__ */ l("tbody", { children: r.slice(1).map((e, t) => /* @__PURE__ */ l("tr", { children: e.map((e, r) => /* @__PURE__ */ l(On, {
|
|
3686
|
+
align: i?.[r]?.align,
|
|
3687
|
+
cell: e,
|
|
3688
|
+
firstColumn: r === 0,
|
|
3689
|
+
path: `${n}.rows[${String(t + 1)}][${String(r)}]`,
|
|
3690
|
+
wrapped: i?.[r]?.is_wrapped
|
|
3691
|
+
}, `cell-${String(r)}`)) }, `row-${String(t + 1)}`)) })]
|
|
3692
|
+
})
|
|
3693
|
+
})
|
|
3694
|
+
});
|
|
3695
|
+
}
|
|
3696
|
+
function jn({ cell: e, path: t }) {
|
|
3697
|
+
if (!x(e)) return C(e, "table cell");
|
|
3698
|
+
switch (e.type) {
|
|
3699
|
+
case "rich_text": return /* @__PURE__ */ l(K, {
|
|
3700
|
+
block: e,
|
|
3701
|
+
path: t
|
|
3702
|
+
});
|
|
3703
|
+
case "raw_number": return e.text ?? String(e.value);
|
|
3704
|
+
case "raw_text": return e.text;
|
|
3705
|
+
default: return C(e, "table cell");
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
function Mn(e) {
|
|
3709
|
+
let t = e;
|
|
3710
|
+
if (!x(t)) return "";
|
|
3711
|
+
if (e.type === "raw_text") {
|
|
3712
|
+
let e = t.text;
|
|
3713
|
+
return typeof e == "string" ? e : "";
|
|
3714
|
+
}
|
|
3715
|
+
if (e.type === "raw_number") {
|
|
3716
|
+
let e = t.text;
|
|
3717
|
+
if (typeof e == "string") return e;
|
|
3718
|
+
let n = t.value;
|
|
3719
|
+
return typeof n == "number" || typeof n == "string" ? String(n) : "";
|
|
3720
|
+
}
|
|
3721
|
+
if (e.type === "rich_text") {
|
|
3722
|
+
let e = JSON.stringify(t.elements);
|
|
3723
|
+
return typeof e == "string" ? e : "";
|
|
3724
|
+
}
|
|
3725
|
+
return "";
|
|
3726
|
+
}
|
|
3727
|
+
function Nn({ block: e, className: n, path: r = "block" }) {
|
|
3728
|
+
let i = e.page_size ?? 5, a = Number.isFinite(i) && i > 0 ? Math.max(1, Math.trunc(i)) : 5, o = Array.isArray(e.rows) ? e.rows.filter(kn) : [], c = e.row_header_column_index ?? 0, d = typeof e.caption == "string" ? e.caption : void 0, [f, p] = s(0), [m, g] = s(""), ee = o[0] ?? [], _ = m.trim().toLowerCase(), v = _ === "" ? o.slice(1) : o.slice(1).filter((e) => e.some((e) => Mn(e).toLowerCase().includes(_))), y = Math.max(1, Math.ceil(v.length / a)), b = Math.min(f, y - 1), x = v.slice(b * a, (b + 1) * a), S = x.length - 1;
|
|
3729
|
+
return /* @__PURE__ */ l($, {
|
|
3730
|
+
blockId: e.block_id,
|
|
3731
|
+
blockType: e.type,
|
|
3732
|
+
className: n,
|
|
3733
|
+
children: /* @__PURE__ */ u("div", {
|
|
3734
|
+
...h(T.dataTable),
|
|
3735
|
+
children: [/* @__PURE__ */ u("div", {
|
|
3736
|
+
...h(T.dataTableHeaderBar),
|
|
3737
|
+
children: [
|
|
3738
|
+
/* @__PURE__ */ l("span", {
|
|
3739
|
+
...h(T.dataTableTitle),
|
|
3740
|
+
children: d
|
|
3741
|
+
}),
|
|
3742
|
+
/* @__PURE__ */ u("span", {
|
|
3743
|
+
...h(T.dataTableFilter),
|
|
3744
|
+
children: [/* @__PURE__ */ l("span", {
|
|
3745
|
+
"aria-hidden": "true",
|
|
3746
|
+
children: "⌕"
|
|
3747
|
+
}), /* @__PURE__ */ l("input", {
|
|
3748
|
+
...h(T.dataTableFilterInput),
|
|
3749
|
+
"aria-label": d === void 0 ? "Filter table" : `Filter ${d}`,
|
|
3750
|
+
onChange: (e) => {
|
|
3751
|
+
g(e.target.value), p(0);
|
|
3752
|
+
},
|
|
3753
|
+
placeholder: "Filter table...",
|
|
3754
|
+
type: "text",
|
|
3755
|
+
value: m
|
|
3756
|
+
})]
|
|
3757
|
+
}),
|
|
3758
|
+
/* @__PURE__ */ l("button", {
|
|
3759
|
+
...h(T.dataTableIconButton),
|
|
3760
|
+
"aria-label": d === void 0 ? "Expand table" : `View ${d}`,
|
|
3761
|
+
type: "button",
|
|
3762
|
+
children: /* @__PURE__ */ l("span", {
|
|
3763
|
+
"aria-hidden": "true",
|
|
3764
|
+
children: "⤢"
|
|
3765
|
+
})
|
|
3766
|
+
}),
|
|
3767
|
+
/* @__PURE__ */ l("button", {
|
|
3768
|
+
...h(T.dataTableIconButton),
|
|
3769
|
+
"aria-label": "More actions",
|
|
3770
|
+
type: "button",
|
|
3771
|
+
children: /* @__PURE__ */ l("span", {
|
|
3772
|
+
"aria-hidden": "true",
|
|
3773
|
+
children: "⋮"
|
|
3774
|
+
})
|
|
3775
|
+
})
|
|
3776
|
+
]
|
|
3777
|
+
}), /* @__PURE__ */ u("div", {
|
|
3778
|
+
...h(T.dataTableBand, y <= 1 && T.dataTableBandUnpaginated),
|
|
3779
|
+
children: [/* @__PURE__ */ u("table", {
|
|
3780
|
+
...h(T.dataTableTable),
|
|
3781
|
+
children: [
|
|
3782
|
+
d === void 0 ? null : /* @__PURE__ */ l("caption", {
|
|
3783
|
+
...h(T.visuallyHidden),
|
|
3784
|
+
children: d
|
|
3785
|
+
}),
|
|
3786
|
+
/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: ee.map((e, n) => /* @__PURE__ */ t("th", {
|
|
3787
|
+
...h(T.dataTableTh),
|
|
3788
|
+
key: `header-${String(n)}`,
|
|
3789
|
+
scope: "col"
|
|
3790
|
+
}, /* @__PURE__ */ l(jn, {
|
|
3791
|
+
cell: e,
|
|
3792
|
+
path: `${r}.rows[0][${String(n)}]`
|
|
3793
|
+
}))) }) }),
|
|
3794
|
+
/* @__PURE__ */ l("tbody", { children: x.map((e, n) => {
|
|
3795
|
+
let i = b * a + n + 1, o = e.length - 1;
|
|
3796
|
+
return /* @__PURE__ */ l("tr", { children: e.map((e, a) => {
|
|
3797
|
+
let s = h(T.dataTableTd, n === 0 && a === 0 && T.dataTableRadiusTopStart, n === 0 && a === o && T.dataTableRadiusTopEnd, n === S && a === 0 && T.dataTableRadiusBottomStart, n === S && a === o && T.dataTableRadiusBottomEnd), u = /* @__PURE__ */ l(jn, {
|
|
3798
|
+
cell: e,
|
|
3799
|
+
path: `${r}.rows[${String(i)}][${String(a)}]`
|
|
3800
|
+
});
|
|
3801
|
+
return a === c ? /* @__PURE__ */ t("th", {
|
|
3802
|
+
...s,
|
|
3803
|
+
key: `cell-${String(a)}`,
|
|
3804
|
+
scope: "row"
|
|
3805
|
+
}, u) : /* @__PURE__ */ t("td", {
|
|
3806
|
+
...s,
|
|
3807
|
+
key: `cell-${String(a)}`
|
|
3808
|
+
}, u);
|
|
3809
|
+
}) }, `row-${String(i)}`);
|
|
3810
|
+
}) })
|
|
3811
|
+
]
|
|
3812
|
+
}), y <= 1 ? null : /* @__PURE__ */ u("div", {
|
|
3813
|
+
...h(T.dataTablePagination),
|
|
3814
|
+
children: [
|
|
3815
|
+
/* @__PURE__ */ l("button", {
|
|
3816
|
+
...h(T.dataTablePageChevron),
|
|
3817
|
+
"aria-label": "Previous",
|
|
3818
|
+
disabled: b === 0,
|
|
3819
|
+
onClick: () => {
|
|
3820
|
+
p((e) => Math.max(0, e - 1));
|
|
3821
|
+
},
|
|
3822
|
+
type: "button",
|
|
3823
|
+
children: /* @__PURE__ */ l("span", {
|
|
3824
|
+
"aria-hidden": "true",
|
|
3825
|
+
children: "‹"
|
|
3826
|
+
})
|
|
3827
|
+
}),
|
|
3828
|
+
Array.from({ length: y }, (e, n) => /* @__PURE__ */ t("button", {
|
|
3829
|
+
...h(T.dataTablePageButton, n === b && T.dataTablePageButtonActive),
|
|
3830
|
+
"aria-current": n === b ? "page" : void 0,
|
|
3831
|
+
key: `page-${String(n)}`,
|
|
3832
|
+
onClick: () => {
|
|
3833
|
+
p(n);
|
|
3834
|
+
},
|
|
3835
|
+
type: "button"
|
|
3836
|
+
}, n + 1)),
|
|
3837
|
+
/* @__PURE__ */ l("button", {
|
|
3838
|
+
...h(T.dataTablePageChevron),
|
|
3839
|
+
"aria-label": "Next",
|
|
3840
|
+
disabled: b === y - 1,
|
|
3841
|
+
onClick: () => {
|
|
3842
|
+
p((e) => Math.min(y - 1, e + 1));
|
|
3843
|
+
},
|
|
3844
|
+
type: "button",
|
|
3845
|
+
children: /* @__PURE__ */ l("span", {
|
|
3846
|
+
"aria-hidden": "true",
|
|
3847
|
+
children: "›"
|
|
3848
|
+
})
|
|
3849
|
+
})
|
|
3850
|
+
]
|
|
3851
|
+
})]
|
|
3852
|
+
})]
|
|
3853
|
+
})
|
|
3854
|
+
});
|
|
3855
|
+
}
|
|
3856
|
+
function Pn({ block: e, className: t, path: n = "block" }) {
|
|
3857
|
+
let r = Array.isArray(e.actions) ? e.actions : void 0;
|
|
3858
|
+
return /* @__PURE__ */ l($, {
|
|
3859
|
+
blockId: e.block_id,
|
|
3860
|
+
blockType: e.type,
|
|
3861
|
+
className: t,
|
|
3862
|
+
children: /* @__PURE__ */ u("div", {
|
|
3863
|
+
...h(T.card),
|
|
3864
|
+
children: [
|
|
3865
|
+
e.hero_image === void 0 ? null : /* @__PURE__ */ l(Y, {
|
|
3866
|
+
element: e.hero_image,
|
|
3867
|
+
path: `${n}.hero_image`,
|
|
3868
|
+
variant: "cardHero"
|
|
3869
|
+
}),
|
|
3870
|
+
/* @__PURE__ */ u("div", {
|
|
3871
|
+
...h(T.cardContent),
|
|
3872
|
+
children: [
|
|
3873
|
+
e.icon === void 0 && e.slack_icon === void 0 && e.title === void 0 && e.subtitle === void 0 ? null : /* @__PURE__ */ u("div", {
|
|
3874
|
+
...h(T.cardHeading),
|
|
3875
|
+
children: [e.icon === void 0 ? e.slack_icon === void 0 ? null : /* @__PURE__ */ l("span", {
|
|
3876
|
+
"aria-hidden": "true",
|
|
3877
|
+
children: "◆"
|
|
3878
|
+
}) : /* @__PURE__ */ l(Y, {
|
|
3879
|
+
element: e.icon,
|
|
3880
|
+
path: `${n}.icon`,
|
|
3881
|
+
variant: "cardIcon"
|
|
3882
|
+
}), /* @__PURE__ */ u("div", { children: [e.title === void 0 ? null : /* @__PURE__ */ l(Q, {
|
|
3883
|
+
className: h(T.cardTitle).className,
|
|
3884
|
+
path: `${n}.title`,
|
|
3885
|
+
text: e.title
|
|
3886
|
+
}), e.subtitle === void 0 ? null : /* @__PURE__ */ l(Q, {
|
|
3887
|
+
className: h(T.smallText).className,
|
|
3888
|
+
path: `${n}.subtitle`,
|
|
3889
|
+
text: e.subtitle
|
|
3890
|
+
})] })]
|
|
3891
|
+
}),
|
|
3892
|
+
e.body === void 0 ? null : /* @__PURE__ */ l(Q, {
|
|
3893
|
+
path: `${n}.body`,
|
|
3894
|
+
text: e.body
|
|
3895
|
+
}),
|
|
3896
|
+
e.subtext === void 0 ? null : /* @__PURE__ */ l(Q, {
|
|
3897
|
+
className: h(T.smallText).className,
|
|
3898
|
+
path: `${n}.subtext`,
|
|
3899
|
+
text: e.subtext
|
|
3900
|
+
})
|
|
3901
|
+
]
|
|
3902
|
+
}),
|
|
3903
|
+
r === void 0 ? null : /* @__PURE__ */ l("div", {
|
|
3904
|
+
...h(T.cardActions),
|
|
3905
|
+
children: r.map((t, r) => /* @__PURE__ */ l(Pt, {
|
|
3906
|
+
blockId: e.block_id,
|
|
3907
|
+
element: t,
|
|
3908
|
+
path: `${n}.actions[${String(r)}]`
|
|
3909
|
+
}, `${x(t) && typeof t.action_id == "string" ? t.action_id : "button"}-${String(r)}`))
|
|
3910
|
+
})
|
|
3911
|
+
]
|
|
3912
|
+
})
|
|
3913
|
+
});
|
|
3914
|
+
}
|
|
3915
|
+
function Fn(e) {
|
|
3916
|
+
return x(e) && e.type === "card";
|
|
3917
|
+
}
|
|
3918
|
+
function In({ block: e, className: n, path: r = "block" }) {
|
|
3919
|
+
let i = e.elements;
|
|
3920
|
+
return /* @__PURE__ */ l($, {
|
|
3921
|
+
blockId: e.block_id,
|
|
3922
|
+
blockType: e.type,
|
|
3923
|
+
className: n,
|
|
3924
|
+
children: /* @__PURE__ */ l("div", {
|
|
3925
|
+
...h(T.carousel),
|
|
3926
|
+
children: Array.isArray(i) ? i.map((e, n) => Fn(e) ? /* @__PURE__ */ l(Pn, {
|
|
3927
|
+
block: e,
|
|
3928
|
+
className: h(T.carouselCard).className,
|
|
3929
|
+
path: `${r}.elements[${String(n)}]`
|
|
3930
|
+
}, `${te(e) ?? "card"}-${String(n)}`) : /* @__PURE__ */ t("div", {
|
|
3931
|
+
...h(T.unhandled),
|
|
3932
|
+
"data-unhandled-block": !0,
|
|
3933
|
+
key: `unknown-${String(n)}`
|
|
3934
|
+
}, C(e, "carousel card"))) : null
|
|
3935
|
+
})
|
|
3936
|
+
});
|
|
3937
|
+
}
|
|
3938
|
+
function Ln({ block: e, className: t, path: n = "block" }) {
|
|
3939
|
+
let r = e.level ?? "default";
|
|
3940
|
+
return /* @__PURE__ */ l($, {
|
|
3941
|
+
blockId: e.block_id,
|
|
3942
|
+
blockType: e.type,
|
|
3943
|
+
className: t,
|
|
3944
|
+
children: /* @__PURE__ */ u("div", {
|
|
3945
|
+
...h(T.alert, r === "info" && T.alertInfo, r === "warning" && T.alertWarning, r === "error" && T.alertError, r === "success" && T.alertSuccess),
|
|
3946
|
+
children: [/* @__PURE__ */ l("span", {
|
|
3947
|
+
"aria-hidden": "true",
|
|
3948
|
+
children: r === "warning" ? "⚠" : r === "error" ? "!" : r === "success" ? "✓" : "i"
|
|
3949
|
+
}), /* @__PURE__ */ l(Q, {
|
|
3950
|
+
path: `${n}.text`,
|
|
3951
|
+
text: e.text
|
|
3952
|
+
})]
|
|
3953
|
+
})
|
|
3954
|
+
});
|
|
3955
|
+
}
|
|
3956
|
+
function Rn({ block: e, className: n, path: r = "block" }) {
|
|
3957
|
+
let i = e.sources, a = typeof e.status == "string" ? e.status : "unknown", o = typeof e.title == "string" ? e.title : C(e, "task");
|
|
3958
|
+
return /* @__PURE__ */ l($, {
|
|
3959
|
+
blockId: e.block_id,
|
|
3960
|
+
blockType: e.type,
|
|
3961
|
+
className: n,
|
|
3962
|
+
children: /* @__PURE__ */ u("div", {
|
|
3963
|
+
...h(T.task),
|
|
3964
|
+
children: [
|
|
3965
|
+
/* @__PURE__ */ u("div", {
|
|
3966
|
+
...h(T.taskHeading),
|
|
3967
|
+
children: [
|
|
3968
|
+
/* @__PURE__ */ l("span", {
|
|
3969
|
+
"aria-hidden": "true",
|
|
3970
|
+
children: a === "complete" ? "✓" : a === "error" ? "!" : a === "in_progress" ? "◌" : "○"
|
|
3971
|
+
}),
|
|
3972
|
+
/* @__PURE__ */ l("span", { children: o }),
|
|
3973
|
+
/* @__PURE__ */ l("span", {
|
|
3974
|
+
...h(T.taskStatus),
|
|
3975
|
+
children: a
|
|
3976
|
+
})
|
|
3977
|
+
]
|
|
3978
|
+
}),
|
|
3979
|
+
e.details === void 0 ? null : /* @__PURE__ */ l(K, {
|
|
3980
|
+
block: e.details,
|
|
3981
|
+
path: `${r}.details`
|
|
3982
|
+
}),
|
|
3983
|
+
e.output === void 0 ? null : /* @__PURE__ */ l(K, {
|
|
3984
|
+
block: e.output,
|
|
3985
|
+
path: `${r}.output`
|
|
3986
|
+
}),
|
|
3987
|
+
Array.isArray(i) ? /* @__PURE__ */ l("div", {
|
|
3988
|
+
...h(T.context),
|
|
3989
|
+
children: i.map((e, n) => {
|
|
3990
|
+
if (!x(e)) return /* @__PURE__ */ t("span", {
|
|
3991
|
+
...h(T.unhandled),
|
|
3992
|
+
key: `unknown-${String(n)}`
|
|
3993
|
+
}, C(e, "task source"));
|
|
3994
|
+
let r = w(typeof e.url == "string" ? e.url : void 0), i = typeof e.text == "string" ? e.text : C(e, "task source"), a = `${typeof e.url == "string" ? e.url : `source-${String(n)}`}-${String(n)}`;
|
|
3995
|
+
return r === void 0 ? /* @__PURE__ */ l("span", { children: i }, a) : /* @__PURE__ */ t("a", {
|
|
3996
|
+
...h(T.link),
|
|
3997
|
+
href: r,
|
|
3998
|
+
key: a,
|
|
3999
|
+
rel: "noreferrer"
|
|
4000
|
+
}, i);
|
|
4001
|
+
})
|
|
4002
|
+
}) : null
|
|
4003
|
+
]
|
|
4004
|
+
})
|
|
4005
|
+
});
|
|
4006
|
+
}
|
|
4007
|
+
function zn(e) {
|
|
4008
|
+
return x(e) && e.type === "task_card";
|
|
4009
|
+
}
|
|
4010
|
+
function Bn({ block: e, className: n, path: r = "block" }) {
|
|
4011
|
+
let i = e.tasks, a = typeof e.title == "string" ? e.title : C(e, "plan");
|
|
4012
|
+
return /* @__PURE__ */ l($, {
|
|
4013
|
+
blockId: e.block_id,
|
|
4014
|
+
blockType: e.type,
|
|
4015
|
+
className: n,
|
|
4016
|
+
children: /* @__PURE__ */ u("div", {
|
|
4017
|
+
...h(T.plan),
|
|
4018
|
+
children: [/* @__PURE__ */ l("strong", { children: a }), Array.isArray(i) ? i.map((e, n) => zn(e) ? /* @__PURE__ */ l(Rn, {
|
|
4019
|
+
block: e,
|
|
4020
|
+
path: `${r}.tasks[${String(n)}]`
|
|
4021
|
+
}, `${typeof e.task_id == "string" ? e.task_id : "task"}-${String(n)}`) : /* @__PURE__ */ t("div", {
|
|
4022
|
+
...h(T.unhandled),
|
|
4023
|
+
"data-unhandled-block": !0,
|
|
4024
|
+
key: `unknown-${String(n)}`
|
|
4025
|
+
}, C(e, "plan task"))) : null]
|
|
4026
|
+
})
|
|
4027
|
+
});
|
|
4028
|
+
}
|
|
4029
|
+
//#endregion
|
|
4030
|
+
//#region src/blocks/Charts.tsx
|
|
4031
|
+
var Vn = 554;
|
|
4032
|
+
function Hn() {
|
|
4033
|
+
let [e, t] = s(Vn + 26), r = o(void 0), a = n((e) => {
|
|
4034
|
+
if (r.current?.disconnect(), r.current = void 0, e === null) return;
|
|
4035
|
+
let n = () => {
|
|
4036
|
+
let n = e.getBoundingClientRect().width;
|
|
4037
|
+
n > 0 && t(n);
|
|
4038
|
+
};
|
|
4039
|
+
if (n(), typeof ResizeObserver > "u") return;
|
|
4040
|
+
let i = new ResizeObserver(n);
|
|
4041
|
+
i.observe(e), r.current = i;
|
|
4042
|
+
}, []);
|
|
4043
|
+
return i(() => () => r.current?.disconnect(), []), {
|
|
4044
|
+
ref: a,
|
|
4045
|
+
width: e
|
|
4046
|
+
};
|
|
4047
|
+
}
|
|
4048
|
+
function Un(e, t) {
|
|
4049
|
+
let n = e / Math.max(1, t), r = 10 ** Math.floor(Math.log10(n)), i = n / r;
|
|
4050
|
+
return i >= Math.sqrt(50) ? r * 10 : i >= Math.sqrt(10) ? r * 5 : i >= Math.SQRT2 ? r * 2 : r;
|
|
4051
|
+
}
|
|
4052
|
+
function Wn(e, t) {
|
|
4053
|
+
let n = Math.min(0, e), r = t > n ? t : n + 1, i = Un(r - n, 4), a = Math.floor(n / i), o = Math.ceil(r / i), s = [];
|
|
4054
|
+
for (let e = a; e <= o; e += 1) s.push(e * i);
|
|
4055
|
+
return s;
|
|
4056
|
+
}
|
|
4057
|
+
function Gn(e) {
|
|
4058
|
+
return Math.ceil(e - .5) + .5;
|
|
4059
|
+
}
|
|
4060
|
+
function Kn(e, t) {
|
|
4061
|
+
let n = 0, r = 0;
|
|
4062
|
+
for (let e of t) n = Math.min(n, e), r = Math.max(r, e);
|
|
4063
|
+
let i = Wn(n, r), a = i[0] ?? 0, o = (i[i.length - 1] ?? 1) - a || 1;
|
|
4064
|
+
return {
|
|
4065
|
+
plotLeft: 74,
|
|
4066
|
+
plotRight: e,
|
|
4067
|
+
svgWidth: e,
|
|
4068
|
+
ticks: i,
|
|
4069
|
+
y: (e) => 334 - (e - a) / o * 325
|
|
4070
|
+
};
|
|
4071
|
+
}
|
|
4072
|
+
function qn(e) {
|
|
4073
|
+
return oe[e % oe.length] ?? ae;
|
|
4074
|
+
}
|
|
4075
|
+
function Jn(e, t) {
|
|
4076
|
+
let n = new Map(e.data.map((e) => [e.label, e]));
|
|
4077
|
+
return t.map((e) => n.get(e));
|
|
4078
|
+
}
|
|
4079
|
+
function Yn(e, t, n, r) {
|
|
4080
|
+
let i = Math.min(4, t / 2, Math.abs(r - n)), a = e, o = e + t;
|
|
4081
|
+
return [
|
|
4082
|
+
`M${String(a + i)} ${String(n)}`,
|
|
4083
|
+
`L${String(o - i)} ${String(n)}`,
|
|
4084
|
+
`A${String(i)} ${String(i)} 0 0 1 ${String(o)} ${String(n + i)}`,
|
|
4085
|
+
`L${String(o)} ${String(r)}`,
|
|
4086
|
+
`L${String(a)} ${String(r)}`,
|
|
4087
|
+
`L${String(a)} ${String(n + i)}`,
|
|
4088
|
+
`A${String(i)} ${String(i)} 0 0 1 ${String(a + i)} ${String(n)}`,
|
|
4089
|
+
"Z"
|
|
4090
|
+
].join("");
|
|
4091
|
+
}
|
|
4092
|
+
function Xn(e) {
|
|
4093
|
+
if (e.length === 0) return "";
|
|
4094
|
+
let t = e[0];
|
|
4095
|
+
if (t === void 0) return "";
|
|
4096
|
+
if (e.length === 1) return `M${String(t.x)} ${String(t.y)}`;
|
|
4097
|
+
let n = e.map((t, n) => {
|
|
4098
|
+
if (n === 0 || n === e.length - 1) return {
|
|
4099
|
+
x: 0,
|
|
4100
|
+
y: 0
|
|
4101
|
+
};
|
|
4102
|
+
let r = e[n - 1], i = e[n + 1];
|
|
4103
|
+
return r === void 0 || i === void 0 ? {
|
|
4104
|
+
x: 0,
|
|
4105
|
+
y: 0
|
|
4106
|
+
} : {
|
|
4107
|
+
x: (i.x - r.x) * .29,
|
|
4108
|
+
y: (i.y - r.y) * .29
|
|
4109
|
+
};
|
|
4110
|
+
}), r = [`M${String(t.x)} ${String(t.y)}`];
|
|
4111
|
+
for (let t = 0; t < e.length - 1; t += 1) {
|
|
4112
|
+
let i = e[t], a = e[t + 1], o = n[t], s = n[t + 1];
|
|
4113
|
+
if (i === void 0 || a === void 0 || o === void 0 || s === void 0) continue;
|
|
4114
|
+
let c = i.x + o.x, l = i.y + o.y, u = a.x - s.x, d = a.y - s.y;
|
|
4115
|
+
r.push(`C${String(c)} ${String(l)} ${String(u)} ${String(d)} ${String(a.x)} ${String(a.y)}`);
|
|
4116
|
+
}
|
|
4117
|
+
return r.join("");
|
|
4118
|
+
}
|
|
4119
|
+
function Zn({ geometry: e }) {
|
|
4120
|
+
let { plotLeft: n, plotRight: r, ticks: i, y: a } = e;
|
|
4121
|
+
return /* @__PURE__ */ u(c, { children: [i.map((e) => {
|
|
4122
|
+
let i = Gn(a(e));
|
|
4123
|
+
return /* @__PURE__ */ t("path", {
|
|
4124
|
+
...h(T.chartGridline),
|
|
4125
|
+
d: `M${String(n)} ${String(i)}L${String(r)} ${String(i)}`,
|
|
4126
|
+
fill: "none",
|
|
4127
|
+
key: `grid-${String(e)}`
|
|
4128
|
+
});
|
|
4129
|
+
}), i.map((e) => /* @__PURE__ */ t("text", {
|
|
4130
|
+
...h(T.chartTickText),
|
|
4131
|
+
dy: "0.32em",
|
|
4132
|
+
key: `tick-${String(e)}`,
|
|
4133
|
+
textAnchor: "end",
|
|
4134
|
+
x: n - 8,
|
|
4135
|
+
y: a(e)
|
|
4136
|
+
}, e))] });
|
|
4137
|
+
}
|
|
4138
|
+
function Qn({ categories: e, tickX: n }) {
|
|
4139
|
+
return /* @__PURE__ */ l(c, { children: e.map((e, r) => /* @__PURE__ */ t("text", {
|
|
4140
|
+
...h(T.chartTickText),
|
|
4141
|
+
key: `${e}-${String(r)}`,
|
|
4142
|
+
textAnchor: "middle",
|
|
4143
|
+
x: n(r),
|
|
4144
|
+
y: 351
|
|
4145
|
+
}, e)) });
|
|
4146
|
+
}
|
|
4147
|
+
function $n(e, t) {
|
|
4148
|
+
let n = e * Math.min(.155, Math.max(.075, .175 - .02 * t));
|
|
4149
|
+
return {
|
|
4150
|
+
barWidth: (e - 2 * n) / (1.1 * t - .1),
|
|
4151
|
+
outer: n
|
|
4152
|
+
};
|
|
4153
|
+
}
|
|
4154
|
+
function er({ chart: e, svgWidth: n, title: r }) {
|
|
4155
|
+
let i = e.axis_config.categories, a = e.series.map((e) => ({
|
|
4156
|
+
points: Jn(e, i),
|
|
4157
|
+
series: e
|
|
4158
|
+
})), o = Kn(n, a.flatMap(({ points: e }) => e.flatMap((e) => e === void 0 ? [] : [e.value]))), { plotLeft: s, plotRight: c, y: d } = o, f, p;
|
|
4159
|
+
if (e.type === "bar") {
|
|
4160
|
+
let n = (c - s) / Math.max(1, i.length), { barWidth: r, outer: o } = $n(n, Math.max(1, e.series.length));
|
|
4161
|
+
p = (e) => s + n * (e + .5), f = a.map(({ points: e, series: i }, a) => e.map((e, c) => {
|
|
4162
|
+
if (e === void 0) return null;
|
|
4163
|
+
let l = s + c * n + o + 1.1 * r * a;
|
|
4164
|
+
return /* @__PURE__ */ t("path", {
|
|
4165
|
+
...h(qn(a).fill),
|
|
4166
|
+
d: Yn(l, r, d(e.value), 334),
|
|
4167
|
+
"data-category": e.label,
|
|
4168
|
+
"data-series": i.name,
|
|
4169
|
+
key: `${i.name}-${String(a)}-${e.label}-${String(c)}`
|
|
4170
|
+
});
|
|
4171
|
+
}));
|
|
4172
|
+
} else {
|
|
4173
|
+
let t = c - 13, n = (e) => i.length <= 1 ? (s + t) / 2 : s + e * (t - s) / (i.length - 1);
|
|
4174
|
+
p = n, f = a.map(({ points: t, series: r }, i) => {
|
|
4175
|
+
let a = t.flatMap((e, t) => e === void 0 ? [] : [{
|
|
4176
|
+
x: n(t),
|
|
4177
|
+
y: d(e.value)
|
|
4178
|
+
}]), o = Xn(a);
|
|
4179
|
+
if (o === "") return null;
|
|
4180
|
+
let s = a[a.length - 1], c = a[0];
|
|
4181
|
+
return /* @__PURE__ */ u("g", { children: [e.type === "area" && c !== void 0 && s !== void 0 ? /* @__PURE__ */ l("path", {
|
|
4182
|
+
...h(qn(i).tint, T.chartAreaFill, i >= 6 && T.chartAreaFallbackFill),
|
|
4183
|
+
d: `${o}L${String(s.x)} 334L${String(c.x)} 334Z`,
|
|
4184
|
+
"data-series-area": r.name
|
|
4185
|
+
}) : null, /* @__PURE__ */ l("path", {
|
|
4186
|
+
...h(qn(i).stroke, T.chartLinePath),
|
|
4187
|
+
d: o,
|
|
4188
|
+
"data-series": r.name,
|
|
4189
|
+
fill: "none"
|
|
4190
|
+
})] }, `${r.name}-${String(i)}`);
|
|
4191
|
+
});
|
|
4192
|
+
}
|
|
4193
|
+
return /* @__PURE__ */ u("svg", {
|
|
4194
|
+
...h(T.chartSvg),
|
|
4195
|
+
"aria-label": r,
|
|
4196
|
+
height: 360,
|
|
4197
|
+
role: "img",
|
|
4198
|
+
width: n,
|
|
4199
|
+
children: [
|
|
4200
|
+
/* @__PURE__ */ l(Zn, { geometry: o }),
|
|
4201
|
+
f,
|
|
4202
|
+
/* @__PURE__ */ l(Qn, {
|
|
4203
|
+
categories: i,
|
|
4204
|
+
tickX: p
|
|
4205
|
+
})
|
|
4206
|
+
]
|
|
4207
|
+
});
|
|
4208
|
+
}
|
|
4209
|
+
function tr(e, t, n, r) {
|
|
4210
|
+
return {
|
|
4211
|
+
x: e + n * Math.sin(r),
|
|
4212
|
+
y: t - n * Math.cos(r)
|
|
4213
|
+
};
|
|
4214
|
+
}
|
|
4215
|
+
function nr({ chart: e, svgWidth: n, title: r }) {
|
|
4216
|
+
let i = e.segments.map((e) => Number.isFinite(e.value) ? Math.max(0, e.value) : 0), a = i.reduce((e, t) => e + t, 0);
|
|
4217
|
+
if (a <= 0) return /* @__PURE__ */ l("div", {
|
|
4218
|
+
...h(T.unhandled),
|
|
4219
|
+
"aria-label": `${r}: no chart data`,
|
|
4220
|
+
"data-empty-chart": !0,
|
|
4221
|
+
role: "img",
|
|
4222
|
+
children: "No chart data"
|
|
4223
|
+
});
|
|
4224
|
+
let o = n / 2, s = 0, c = e.segments.map((e, n) => {
|
|
4225
|
+
let r = (i[n] ?? 0) / a, c = s * 2 * Math.PI;
|
|
4226
|
+
s += r;
|
|
4227
|
+
let l = s * 2 * Math.PI, u = tr(o, 180, 144, c), d = tr(o, 180, 144, l), f = +(l - c > Math.PI), p = r >= 1 ? `M${String(o)} 36A144 144 0 1 1 ${String(o)} 324A144 144 0 1 1 ${String(o)} 36Z` : `M${String(u.x)} ${String(u.y)}A144 144 0 ${String(f)} 1 ${String(d.x)} ${String(d.y)}L${String(o)} 180Z`;
|
|
4228
|
+
return r <= 0 ? null : /* @__PURE__ */ t("path", {
|
|
4229
|
+
...h(qn(n).fill, T.pieSlice),
|
|
4230
|
+
d: p,
|
|
4231
|
+
"data-segment": e.label,
|
|
4232
|
+
key: `${e.label}-${String(n)}`
|
|
4233
|
+
});
|
|
4234
|
+
});
|
|
4235
|
+
return /* @__PURE__ */ l("svg", {
|
|
4236
|
+
...h(T.chartSvg),
|
|
4237
|
+
"aria-label": r,
|
|
4238
|
+
height: 360,
|
|
4239
|
+
role: "img",
|
|
4240
|
+
width: n,
|
|
4241
|
+
children: c
|
|
4242
|
+
});
|
|
4243
|
+
}
|
|
4244
|
+
var rr = {
|
|
4245
|
+
area: !0,
|
|
4246
|
+
bar: !0,
|
|
4247
|
+
line: !0
|
|
4248
|
+
};
|
|
4249
|
+
function ir(e) {
|
|
4250
|
+
return x(e) && typeof e.label == "string" && typeof e.value == "number" && Number.isFinite(e.value);
|
|
4251
|
+
}
|
|
4252
|
+
function ar(e) {
|
|
4253
|
+
return x(e) && typeof e.label == "string" && typeof e.value == "number" && Number.isFinite(e.value);
|
|
4254
|
+
}
|
|
4255
|
+
function or(e) {
|
|
4256
|
+
return x(e) && typeof e.name == "string" && Array.isArray(e.data) && e.data.every(ar);
|
|
4257
|
+
}
|
|
4258
|
+
function sr(e) {
|
|
4259
|
+
return x(e) && e.type === "pie" && Array.isArray(e.segments) && e.segments.every(ir);
|
|
4260
|
+
}
|
|
4261
|
+
function cr(e) {
|
|
4262
|
+
if (!x(e)) return !1;
|
|
4263
|
+
let t = e.type;
|
|
4264
|
+
if (typeof t != "string" || !(t in rr)) return !1;
|
|
4265
|
+
let n = e.axis_config;
|
|
4266
|
+
return Array.isArray(e.series) && e.series.every(or) && x(n) && Array.isArray(n.categories) && n.categories.every((e) => typeof e == "string");
|
|
4267
|
+
}
|
|
4268
|
+
function lr({ block: e, className: n }) {
|
|
4269
|
+
let r = e.chart, i = typeof e.title == "string" ? e.title : C(e, "chart"), { ref: a, width: o } = Hn(), s = Math.min(624, Math.max(400, o)) - 26, c = cr(r) ? r : void 0, d = c === void 0 && sr(r) ? r : void 0, f, p;
|
|
4270
|
+
d === void 0 ? c === void 0 ? (f = /* @__PURE__ */ l("div", {
|
|
4271
|
+
...h(T.unhandled),
|
|
4272
|
+
"data-unhandled-chart-type": S(r) ?? "unknown",
|
|
4273
|
+
children: C(r, "chart")
|
|
4274
|
+
}), p = []) : (f = /* @__PURE__ */ l(er, {
|
|
4275
|
+
chart: c,
|
|
4276
|
+
svgWidth: s,
|
|
4277
|
+
title: i
|
|
4278
|
+
}), p = c.series.map((e) => e.name)) : (f = /* @__PURE__ */ l(nr, {
|
|
4279
|
+
chart: d,
|
|
4280
|
+
svgWidth: s,
|
|
4281
|
+
title: i
|
|
4282
|
+
}), p = d.segments.map((e) => e.label));
|
|
4283
|
+
let m = c?.axis_config.x_label, g = c?.axis_config.y_label;
|
|
4284
|
+
return /* @__PURE__ */ l($, {
|
|
4285
|
+
blockId: e.block_id,
|
|
4286
|
+
blockType: e.type,
|
|
4287
|
+
className: n,
|
|
4288
|
+
children: /* @__PURE__ */ l("div", {
|
|
4289
|
+
...h(T.chartScroller),
|
|
4290
|
+
children: /* @__PURE__ */ l("div", {
|
|
4291
|
+
...h(T.chartCard),
|
|
4292
|
+
ref: a,
|
|
4293
|
+
children: /* @__PURE__ */ u("div", {
|
|
4294
|
+
...h(T.chartContent),
|
|
4295
|
+
children: [/* @__PURE__ */ l("h3", {
|
|
4296
|
+
...h(T.chartTitle),
|
|
4297
|
+
children: i
|
|
4298
|
+
}), /* @__PURE__ */ u("div", {
|
|
4299
|
+
...h(T.chartPlotArea),
|
|
4300
|
+
children: [
|
|
4301
|
+
/* @__PURE__ */ u("div", {
|
|
4302
|
+
...h(T.chartCanvas),
|
|
4303
|
+
children: [f, g === void 0 ? null : /* @__PURE__ */ l("div", {
|
|
4304
|
+
...h(T.chartYAxisLabel),
|
|
4305
|
+
children: /* @__PURE__ */ l("span", {
|
|
4306
|
+
...h(T.chartYAxisLabelText),
|
|
4307
|
+
children: g
|
|
4308
|
+
})
|
|
4309
|
+
})]
|
|
4310
|
+
}),
|
|
4311
|
+
c === void 0 ? null : /* @__PURE__ */ l("div", {
|
|
4312
|
+
...h(T.chartXAxisLabel),
|
|
4313
|
+
children: m
|
|
4314
|
+
}),
|
|
4315
|
+
p.length === 0 ? null : /* @__PURE__ */ l("div", {
|
|
4316
|
+
...h(T.chartLegend, c !== void 0 && T.chartLegendCartesian),
|
|
4317
|
+
children: p.map((e, n) => /* @__PURE__ */ t("span", {
|
|
4318
|
+
...h(T.chartLegendItem),
|
|
4319
|
+
key: `${e}-${String(n)}`
|
|
4320
|
+
}, /* @__PURE__ */ l("span", {
|
|
4321
|
+
...h(T.chartLegendSwatch, qn(n).swatch),
|
|
4322
|
+
"aria-hidden": "true"
|
|
4323
|
+
}), e))
|
|
4324
|
+
})
|
|
4325
|
+
]
|
|
4326
|
+
})]
|
|
4327
|
+
})
|
|
4328
|
+
})
|
|
4329
|
+
})
|
|
4330
|
+
});
|
|
4331
|
+
}
|
|
4332
|
+
//#endregion
|
|
4333
|
+
//#region src/blocks/InteractiveBlocks.tsx
|
|
4334
|
+
function ur(e) {
|
|
4335
|
+
return x(e) && x(e.text) && typeof e.text.text == "string";
|
|
4336
|
+
}
|
|
4337
|
+
function dr(e) {
|
|
4338
|
+
return x(e) && e.type === "feedback_buttons" && ur(e.positive_button) && ur(e.negative_button);
|
|
4339
|
+
}
|
|
4340
|
+
function fr(e) {
|
|
4341
|
+
return x(e) && e.type === "icon_button" && ur(e);
|
|
4342
|
+
}
|
|
4343
|
+
function pr({ block: e, className: t, path: n = "block" }) {
|
|
4344
|
+
let r = h(T.block, T.actions), i = Array.isArray(e.elements) ? e.elements : [];
|
|
4345
|
+
return /* @__PURE__ */ l("div", {
|
|
4346
|
+
...r,
|
|
4347
|
+
className: D(r.className, t),
|
|
4348
|
+
"data-block-id": e.block_id,
|
|
4349
|
+
"data-block-type": e.type,
|
|
4350
|
+
children: i.map((t, r) => /* @__PURE__ */ l(Zt, {
|
|
4351
|
+
blockId: e.block_id,
|
|
4352
|
+
element: t,
|
|
4353
|
+
path: `${n}.elements[${String(r)}]`
|
|
4354
|
+
}, `${S(t) ?? "unknown"}-${x(t) && typeof t.action_id == "string" ? t.action_id : "action"}-${String(r)}`))
|
|
4355
|
+
});
|
|
4356
|
+
}
|
|
4357
|
+
function mr({ block: e, className: t, path: n = "block" }) {
|
|
4358
|
+
let r = h(T.block, T.inputBlock), i = e.label;
|
|
4359
|
+
return /* @__PURE__ */ u("div", {
|
|
4360
|
+
...r,
|
|
4361
|
+
className: D(r.className, t),
|
|
4362
|
+
"data-block-id": e.block_id,
|
|
4363
|
+
"data-block-type": e.type,
|
|
4364
|
+
children: [
|
|
4365
|
+
/* @__PURE__ */ u("div", {
|
|
4366
|
+
...h(T.inputLabel),
|
|
4367
|
+
children: [x(i) && typeof i.text == "string" ? i.text : C(i, "input label"), e.optional === !0 ? null : /* @__PURE__ */ l("span", {
|
|
4368
|
+
...h(T.required),
|
|
4369
|
+
"aria-hidden": "true",
|
|
4370
|
+
children: "*"
|
|
4371
|
+
})]
|
|
4372
|
+
}),
|
|
4373
|
+
/* @__PURE__ */ l(Zt, {
|
|
4374
|
+
blockId: e.block_id,
|
|
4375
|
+
element: e.element,
|
|
4376
|
+
path: `${n}.element`
|
|
4377
|
+
}),
|
|
4378
|
+
e.hint === void 0 ? null : /* @__PURE__ */ l("div", {
|
|
4379
|
+
...h(T.smallText),
|
|
4380
|
+
children: x(e.hint) && typeof e.hint.text == "string" ? e.hint.text : C(e.hint, "input hint")
|
|
4381
|
+
})
|
|
4382
|
+
]
|
|
4383
|
+
});
|
|
4384
|
+
}
|
|
4385
|
+
function hr(e, t) {
|
|
4386
|
+
return t === "positive" ? e.positive_button.text.text : e.negative_button.text.text;
|
|
4387
|
+
}
|
|
4388
|
+
function gr({ block: e, className: n }) {
|
|
4389
|
+
let { onAction: r } = y(), i = h(T.block, T.actions), a = e.elements;
|
|
4390
|
+
return /* @__PURE__ */ l("div", {
|
|
4391
|
+
...i,
|
|
4392
|
+
className: D(i.className, n),
|
|
4393
|
+
"data-block-id": e.block_id,
|
|
4394
|
+
"data-block-type": e.type,
|
|
4395
|
+
children: Array.isArray(a) ? a.map((n, i) => fr(n) ? /* @__PURE__ */ t("button", {
|
|
4396
|
+
...h(T.button, T.iconButton),
|
|
4397
|
+
"aria-label": n.accessibility_label ?? n.text.text,
|
|
4398
|
+
key: `${n.type}-${n.action_id ?? "button"}-${String(i)}`,
|
|
4399
|
+
onClick: () => {
|
|
4400
|
+
n.action_id !== void 0 && r?.({
|
|
4401
|
+
actionId: n.action_id,
|
|
4402
|
+
type: n.type,
|
|
4403
|
+
...e.block_id === void 0 ? {} : { blockId: e.block_id },
|
|
4404
|
+
...n.value === void 0 ? {} : { value: n.value }
|
|
4405
|
+
});
|
|
4406
|
+
},
|
|
4407
|
+
title: n.text.text,
|
|
4408
|
+
type: "button"
|
|
4409
|
+
}, n.icon === "trash" ? "⌫" : n.icon) : dr(n) ? /* @__PURE__ */ t("div", {
|
|
4410
|
+
...h(T.actions),
|
|
4411
|
+
key: `${n.type}-${n.action_id ?? "feedback"}-${String(i)}`
|
|
4412
|
+
}, /* @__PURE__ */ l("button", {
|
|
4413
|
+
...h(T.button, T.iconButton),
|
|
4414
|
+
"aria-label": hr(n, "positive"),
|
|
4415
|
+
onClick: () => {
|
|
4416
|
+
n.action_id !== void 0 && r?.({
|
|
4417
|
+
actionId: n.action_id,
|
|
4418
|
+
type: n.type,
|
|
4419
|
+
value: n.positive_button.value,
|
|
4420
|
+
...e.block_id === void 0 ? {} : { blockId: e.block_id }
|
|
4421
|
+
});
|
|
4422
|
+
},
|
|
4423
|
+
type: "button",
|
|
4424
|
+
children: "👍"
|
|
4425
|
+
}), /* @__PURE__ */ l("button", {
|
|
4426
|
+
...h(T.button, T.iconButton),
|
|
4427
|
+
"aria-label": hr(n, "negative"),
|
|
4428
|
+
onClick: () => {
|
|
4429
|
+
n.action_id !== void 0 && r?.({
|
|
4430
|
+
actionId: n.action_id,
|
|
4431
|
+
type: n.type,
|
|
4432
|
+
value: n.negative_button.value,
|
|
4433
|
+
...e.block_id === void 0 ? {} : { blockId: e.block_id }
|
|
4434
|
+
});
|
|
4435
|
+
},
|
|
4436
|
+
type: "button",
|
|
4437
|
+
children: "👎"
|
|
4438
|
+
})) : /* @__PURE__ */ t("div", {
|
|
4439
|
+
...h(T.unhandled),
|
|
4440
|
+
"data-unhandled-element": S(n) ?? "unknown",
|
|
4441
|
+
key: `unhandled-${String(i)}`
|
|
4442
|
+
}, C(n, "context action"))) : /* @__PURE__ */ l("div", {
|
|
4443
|
+
...h(T.unhandled),
|
|
4444
|
+
"data-unhandled-element": "context_actions",
|
|
4445
|
+
children: C(e, "context actions block")
|
|
4446
|
+
})
|
|
4447
|
+
});
|
|
4448
|
+
}
|
|
4449
|
+
//#endregion
|
|
4450
|
+
//#region src/Block.tsx
|
|
4451
|
+
var _r = new Set(ve);
|
|
4452
|
+
function vr(e) {
|
|
4453
|
+
let t = S(e);
|
|
4454
|
+
return t !== void 0 && _r.has(t);
|
|
4455
|
+
}
|
|
4456
|
+
function yr({ block: e, className: t, path: n = "block" }) {
|
|
4457
|
+
let r = S(e);
|
|
4458
|
+
if (!vr(e)) {
|
|
4459
|
+
let n = h(T.block, T.unhandled);
|
|
4460
|
+
return /* @__PURE__ */ l("div", {
|
|
4461
|
+
...n,
|
|
4462
|
+
className: D(n.className, t),
|
|
4463
|
+
"data-block-type": r ?? "unknown",
|
|
4464
|
+
"data-unhandled-block": !0,
|
|
4465
|
+
role: "note",
|
|
4466
|
+
children: C(e, "Slack block")
|
|
4467
|
+
});
|
|
4468
|
+
}
|
|
4469
|
+
switch (e.type) {
|
|
4470
|
+
case "actions": return /* @__PURE__ */ l(pr, {
|
|
4471
|
+
block: e,
|
|
4472
|
+
className: t,
|
|
4473
|
+
path: n
|
|
4474
|
+
});
|
|
4475
|
+
case "alert": return /* @__PURE__ */ l(Ln, {
|
|
4476
|
+
block: e,
|
|
4477
|
+
className: t,
|
|
4478
|
+
path: n
|
|
4479
|
+
});
|
|
4480
|
+
case "card": return /* @__PURE__ */ l(Pn, {
|
|
4481
|
+
block: e,
|
|
4482
|
+
className: t,
|
|
4483
|
+
path: n
|
|
4484
|
+
});
|
|
4485
|
+
case "carousel": return /* @__PURE__ */ l(In, {
|
|
4486
|
+
block: e,
|
|
4487
|
+
className: t,
|
|
4488
|
+
path: n
|
|
4489
|
+
});
|
|
4490
|
+
case "container": return /* @__PURE__ */ l(Tr, {
|
|
4491
|
+
block: e,
|
|
4492
|
+
className: t,
|
|
4493
|
+
path: n
|
|
4494
|
+
});
|
|
4495
|
+
case "context": return /* @__PURE__ */ l(Cn, {
|
|
4496
|
+
block: e,
|
|
4497
|
+
className: t,
|
|
4498
|
+
path: n
|
|
4499
|
+
});
|
|
4500
|
+
case "context_actions": return /* @__PURE__ */ l(gr, {
|
|
4501
|
+
block: e,
|
|
4502
|
+
className: t,
|
|
4503
|
+
path: n
|
|
4504
|
+
});
|
|
4505
|
+
case "data_table": return /* @__PURE__ */ l(Nn, {
|
|
4506
|
+
block: e,
|
|
4507
|
+
className: t,
|
|
4508
|
+
path: n
|
|
4509
|
+
});
|
|
4510
|
+
case "data_visualization": return /* @__PURE__ */ l(lr, {
|
|
4511
|
+
block: e,
|
|
4512
|
+
className: t,
|
|
4513
|
+
path: n
|
|
4514
|
+
});
|
|
4515
|
+
case "divider": return /* @__PURE__ */ l(bn, {
|
|
4516
|
+
block: e,
|
|
4517
|
+
className: t,
|
|
4518
|
+
path: n
|
|
4519
|
+
});
|
|
4520
|
+
case "file": return /* @__PURE__ */ l(En, {
|
|
4521
|
+
block: e,
|
|
4522
|
+
className: t,
|
|
4523
|
+
path: n
|
|
4524
|
+
});
|
|
4525
|
+
case "header": return /* @__PURE__ */ l(yn, {
|
|
4526
|
+
block: e,
|
|
4527
|
+
className: t,
|
|
4528
|
+
path: n
|
|
4529
|
+
});
|
|
4530
|
+
case "image": return /* @__PURE__ */ l(xn, {
|
|
4531
|
+
block: e,
|
|
4532
|
+
className: t,
|
|
4533
|
+
path: n
|
|
4534
|
+
});
|
|
4535
|
+
case "input": return /* @__PURE__ */ l(mr, {
|
|
4536
|
+
block: e,
|
|
4537
|
+
className: t,
|
|
4538
|
+
path: n
|
|
4539
|
+
});
|
|
4540
|
+
case "markdown": return /* @__PURE__ */ l(Tn, {
|
|
4541
|
+
block: e,
|
|
4542
|
+
className: t,
|
|
4543
|
+
path: n
|
|
4544
|
+
});
|
|
4545
|
+
case "plan": return /* @__PURE__ */ l(Bn, {
|
|
4546
|
+
block: e,
|
|
4547
|
+
className: t,
|
|
4548
|
+
path: n
|
|
4549
|
+
});
|
|
4550
|
+
case "rich_text": return /* @__PURE__ */ l(wn, {
|
|
4551
|
+
block: e,
|
|
4552
|
+
className: t,
|
|
4553
|
+
path: n
|
|
4554
|
+
});
|
|
4555
|
+
case "section": return /* @__PURE__ */ l(vn, {
|
|
4556
|
+
block: e,
|
|
4557
|
+
className: t,
|
|
4558
|
+
path: n
|
|
4559
|
+
});
|
|
4560
|
+
case "table": return /* @__PURE__ */ l(An, {
|
|
4561
|
+
block: e,
|
|
4562
|
+
className: t,
|
|
4563
|
+
path: n
|
|
4564
|
+
});
|
|
4565
|
+
case "task_card": return /* @__PURE__ */ l(Rn, {
|
|
4566
|
+
block: e,
|
|
4567
|
+
className: t,
|
|
4568
|
+
path: n
|
|
4569
|
+
});
|
|
4570
|
+
case "video": return /* @__PURE__ */ l(Dn, {
|
|
4571
|
+
block: e,
|
|
4572
|
+
className: t,
|
|
4573
|
+
path: n
|
|
4574
|
+
});
|
|
4575
|
+
default: return g(e);
|
|
4576
|
+
}
|
|
4577
|
+
}
|
|
4578
|
+
function br(e) {
|
|
4579
|
+
return /* @__PURE__ */ l(yr, { ...e });
|
|
4580
|
+
}
|
|
4581
|
+
var xr = {
|
|
4582
|
+
actions: !0,
|
|
4583
|
+
context: !0,
|
|
4584
|
+
divider: !0,
|
|
4585
|
+
file: !0,
|
|
4586
|
+
header: !0,
|
|
4587
|
+
image: !0,
|
|
4588
|
+
input: !0,
|
|
4589
|
+
rich_text: !0,
|
|
4590
|
+
section: !0,
|
|
4591
|
+
table: !0,
|
|
4592
|
+
video: !0
|
|
4593
|
+
};
|
|
4594
|
+
function Sr(e) {
|
|
4595
|
+
let t = S(e);
|
|
4596
|
+
return t !== void 0 && t in xr;
|
|
4597
|
+
}
|
|
4598
|
+
function Cr({ block: e, path: t }) {
|
|
4599
|
+
let n = e.title, r = e.subtitle;
|
|
4600
|
+
return /* @__PURE__ */ u(c, { children: [e.icon === void 0 ? null : /* @__PURE__ */ l(Y, {
|
|
4601
|
+
element: e.icon,
|
|
4602
|
+
path: `${t}.icon`,
|
|
4603
|
+
variant: "cardIcon"
|
|
4604
|
+
}), /* @__PURE__ */ u("div", { children: [e.rich_text_title === void 0 ? e.title === void 0 ? null : /* @__PURE__ */ l("strong", { children: x(n) && typeof n.text == "string" ? n.text : C(n, "container title") }) : /* @__PURE__ */ l(K, {
|
|
4605
|
+
block: e.rich_text_title,
|
|
4606
|
+
path: `${t}.rich_text_title`
|
|
4607
|
+
}), e.subtitle === void 0 ? null : /* @__PURE__ */ l("div", {
|
|
4608
|
+
...h(T.smallText),
|
|
4609
|
+
children: x(r) && typeof r.text == "string" ? r.text : C(r, "container subtitle")
|
|
4610
|
+
})] })] });
|
|
4611
|
+
}
|
|
4612
|
+
function wr({ block: e, path: n }) {
|
|
4613
|
+
let r = e.child_blocks;
|
|
4614
|
+
return /* @__PURE__ */ l("div", {
|
|
4615
|
+
...h(T.containerBody),
|
|
4616
|
+
children: Array.isArray(r) ? r.map((e, r) => Sr(e) ? /* @__PURE__ */ l(yr, {
|
|
4617
|
+
block: e,
|
|
4618
|
+
path: `${n}.child_blocks[${String(r)}]`
|
|
4619
|
+
}, `${S(e) ?? "unknown"}-${te(e) ?? "block"}-${String(r)}`) : /* @__PURE__ */ t("div", {
|
|
4620
|
+
...h(T.unhandled),
|
|
4621
|
+
"data-block-type": S(e) ?? "unknown",
|
|
4622
|
+
"data-unhandled-block": !0,
|
|
4623
|
+
key: `unknown-${String(r)}`
|
|
4624
|
+
}, C(e, "Slack block"))) : null
|
|
4625
|
+
});
|
|
4626
|
+
}
|
|
4627
|
+
function Tr({ block: e, className: t, path: n = "block" }) {
|
|
4628
|
+
return /* @__PURE__ */ l($, {
|
|
4629
|
+
blockId: e.block_id,
|
|
4630
|
+
blockType: e.type,
|
|
4631
|
+
className: t,
|
|
4632
|
+
children: e.is_collapsible === !0 ? /* @__PURE__ */ u("details", {
|
|
4633
|
+
...h(T.container),
|
|
4634
|
+
open: e.default_collapsed !== !0,
|
|
4635
|
+
children: [/* @__PURE__ */ l("summary", {
|
|
4636
|
+
...h(T.containerHeader, e.has_header_divider === !0 && T.containerHeaderDivider),
|
|
4637
|
+
children: /* @__PURE__ */ l(Cr, {
|
|
4638
|
+
block: e,
|
|
4639
|
+
path: n
|
|
4640
|
+
})
|
|
4641
|
+
}), /* @__PURE__ */ l(wr, {
|
|
4642
|
+
block: e,
|
|
4643
|
+
path: n
|
|
4644
|
+
})]
|
|
4645
|
+
}) : /* @__PURE__ */ u("div", {
|
|
4646
|
+
...h(T.container),
|
|
4647
|
+
children: [/* @__PURE__ */ l("div", {
|
|
4648
|
+
...h(T.containerHeader, e.has_header_divider === !0 && T.containerHeaderDivider),
|
|
4649
|
+
children: /* @__PURE__ */ l(Cr, {
|
|
4650
|
+
block: e,
|
|
4651
|
+
path: n
|
|
4652
|
+
})
|
|
4653
|
+
}), /* @__PURE__ */ l(wr, {
|
|
4654
|
+
block: e,
|
|
4655
|
+
path: n
|
|
4656
|
+
})]
|
|
4657
|
+
})
|
|
4658
|
+
});
|
|
4659
|
+
}
|
|
4660
|
+
//#endregion
|
|
4661
|
+
//#region src/BlockKit.tsx
|
|
4662
|
+
function Er(e) {
|
|
4663
|
+
let t = e;
|
|
4664
|
+
if (typeof e == "string") try {
|
|
4665
|
+
t = JSON.parse(e);
|
|
4666
|
+
} catch {
|
|
4667
|
+
throw new b("data: expected valid JSON", {
|
|
4668
|
+
code: "invalid_json",
|
|
4669
|
+
path: "data"
|
|
4670
|
+
});
|
|
4671
|
+
}
|
|
4672
|
+
return Array.isArray(t) ? {
|
|
4673
|
+
blockListPath: "data",
|
|
4674
|
+
blocks: t
|
|
4675
|
+
} : x(t) && Array.isArray(t.blocks) ? {
|
|
4676
|
+
blockListPath: "data.blocks",
|
|
4677
|
+
blocks: t.blocks
|
|
4678
|
+
} : {
|
|
4679
|
+
blockListPath: "data",
|
|
4680
|
+
blocks: [t]
|
|
4681
|
+
};
|
|
4682
|
+
}
|
|
4683
|
+
function Dr({ "aria-label": e = "Slack Block Kit preview", className: t, data: n, onAction: r, resolvers: i, surface: o = "message", theme: s = "light" }) {
|
|
4684
|
+
let c = a(() => Er(n), [n]), u = h(s === "dark" ? ie : re, T.root, s === "dark" ? T.rootDark : T.rootLight);
|
|
4685
|
+
return /* @__PURE__ */ l(v, {
|
|
4686
|
+
onAction: r,
|
|
4687
|
+
resolvers: i,
|
|
4688
|
+
surface: o,
|
|
4689
|
+
children: /* @__PURE__ */ l("div", {
|
|
4690
|
+
...u,
|
|
4691
|
+
"aria-label": e,
|
|
4692
|
+
className: D(u.className, t),
|
|
4693
|
+
"data-block-kit-root": !0,
|
|
4694
|
+
"data-surface": o,
|
|
4695
|
+
"data-theme": s,
|
|
4696
|
+
role: "article",
|
|
4697
|
+
children: c.blocks.map((e, t) => /* @__PURE__ */ l(yr, {
|
|
4698
|
+
block: e,
|
|
4699
|
+
path: `${c.blockListPath}[${String(t)}]`
|
|
4700
|
+
}, `${S(e) ?? "unknown"}-${te(e) ?? "block"}-${String(t)}`))
|
|
4701
|
+
})
|
|
4702
|
+
});
|
|
4703
|
+
}
|
|
4704
|
+
//#endregion
|
|
4705
|
+
export { pr as ActionsBlock, Ln as AlertBlock, br as Block, Dr as BlockKit, b as BlockKitInvariantError, v as BlockKitProvider, Pt as ButtonElement, Pn as CardBlock, In as CarouselBlock, Rt as ChoiceGroup, Tr as ContainerBlock, gr as ContextActionsBlock, Cn as ContextBlock, Nn as DataTableBlock, lr as DataVisualizationBlock, bn as DividerBlock, En as FileBlock, yn as HeaderBlock, xn as ImageBlock, Y as ImageElement, mr as InputBlock, Xt as InputElement, Zt as InteractiveElement, gn as Markdown, Tn as MarkdownBlock, Z as Mrkdwn, Ft as OverflowElement, Bn as PlanBlock, K as RichText, wn as RichTextBlock, vn as SectionBlock, Gt as SelectElement, An as TableBlock, On as TableCell, Rn as TaskCardBlock, Q as Text, Dn as VideoBlock, at as assertBlockKitData, rt as assertBlockType, Se as assertImageElementData, Ae as assertInteractiveElementData, nt as assertRenderableBlock, Pe as assertRichTextBlockData, be as assertTextObjectData, st as blocksOf, ie as darkTheme, re as lightTheme, ot as parseBlockKitData, fn as tokenizeMarkdown, on as tokenizeMrkdwn, ne as tokens, y as useBlockKitContext };
|
|
4706
|
+
|
|
4707
|
+
//# sourceMappingURL=index.js.map
|