@blocklet/pages-kit-inner-components 0.6.21 → 0.6.23
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/lib/cjs/add-component.js +1 -1
- package/lib/cjs/chunks/{home-DexBPRep.js → home-CmcR9R89.js} +2 -2
- package/lib/cjs/chunks/html-JOhPskS4.js +1 -0
- package/lib/cjs/chunks/index-7_tPWvdE.js +475 -0
- package/lib/cjs/chunks/{publish-button-WHYISygD.js → publish-button-CuIP1HAR.js} +1 -1
- package/lib/cjs/chunks/site-state-CkqENAbR.js +1 -0
- package/lib/cjs/home.js +1 -1
- package/lib/cjs/locales.js +2 -2
- package/lib/cjs/project-html.js +6 -6
- package/lib/cjs/resources.js +1 -1
- package/lib/cjs/setting.js +3 -3
- package/lib/cjs/site-state.js +1 -1
- package/lib/es/add-component.js +2 -2
- package/lib/es/chunks/{home-8A6Q8Ei8.js → home-pT8D7Ttx.js} +2 -2
- package/lib/es/chunks/html-DfzaaIYa.js +49 -0
- package/lib/es/chunks/{index-DrqhF7Qu.js → index-BHQcp5eX.js} +948 -560
- package/lib/es/chunks/{publish-button-OwaU0V66.js → publish-button-CIVPDQb7.js} +2 -2
- package/lib/es/chunks/{site-state-Dt2__Byi.js → site-state-CqlS8v17.js} +536 -562
- package/lib/es/home.js +2 -2
- package/lib/es/locales.js +86 -8
- package/lib/es/project-html.js +93 -133
- package/lib/es/resources.js +1 -1
- package/lib/es/setting.js +143 -141
- package/lib/es/site-state.js +1 -1
- package/package.json +8 -8
- package/lib/cjs/chunks/index-DmCIlIe9.js +0 -475
- package/lib/cjs/chunks/site-state-Vc48a38-.js +0 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as r, jsxs as w, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import { ErrorOutline as
|
|
3
|
-
import { Box as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import { ErrorOutline as ne } from "@mui/icons-material";
|
|
3
|
+
import { Box as f, styled as re, Typography as j, Container as ie, useTheme as ae, useMediaQuery as se, GlobalStyles as le, Card as ce, CircularProgress as de, Grid as wt, CardMedia as ue, CardContent as me, Alert as pe } from "@mui/material";
|
|
4
|
+
import he from "lodash/isEmpty";
|
|
5
|
+
import pt from "lodash/pick";
|
|
6
|
+
import ge, { createContext as It, useMemo as S, useCallback as z, useContext as Lt, useState as Z, useEffect as J, Fragment as fe, isValidElement as Et, useRef as ht } from "react";
|
|
7
7
|
import R from "lodash/keyBy";
|
|
8
|
-
import { styled as
|
|
9
|
-
import { cx as
|
|
10
|
-
import
|
|
11
|
-
import { Link as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { Icon as
|
|
15
|
-
import { e as
|
|
16
|
-
import
|
|
17
|
-
import { useColorConvert as
|
|
18
|
-
import { materialDark as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { ResponsiveImage as
|
|
22
|
-
import { isGradient as
|
|
23
|
-
import
|
|
8
|
+
import { styled as C, useTheme as At } from "@arcblock/ux/lib/Theme";
|
|
9
|
+
import { cx as b, css as ct } from "@emotion/css";
|
|
10
|
+
import I from "lodash/omit";
|
|
11
|
+
import { Link as xe, NavLink as be, useNavigate as ye } from "react-router-dom";
|
|
12
|
+
import ve from "@arcblock/ux/lib/Button";
|
|
13
|
+
import dt from "is-uri";
|
|
14
|
+
import { Icon as Pt } from "@iconify-icon/react";
|
|
15
|
+
import { e as F, f as L, i as gt, l as ft } from "./state-DSo43FAB.js";
|
|
16
|
+
import we from "@blocklet/pages-kit/builtin/markdown/markdown-renderer";
|
|
17
|
+
import { useColorConvert as Wt } from "@blocklet/pages-kit/contexts/color";
|
|
18
|
+
import { materialDark as ke } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
19
|
+
import _e from "@arcblock/react-hooks/lib/useBrowser";
|
|
20
|
+
import kt from "@arcblock/ux/lib/Colors";
|
|
21
|
+
import { ResponsiveImage as jt, CustomComponentRenderer as $e } from "@blocklet/pages-kit/components";
|
|
22
|
+
import { isGradient as Ce, isColorString as Se } from "@blocklet/pages-kit/utils/style";
|
|
23
|
+
import zt from "@mui/material/useMediaQuery";
|
|
24
24
|
import { join as X } from "pathe";
|
|
25
|
-
import { withoutTrailingSlash as
|
|
26
|
-
import { useMessage as
|
|
27
|
-
import { useLatest as
|
|
28
|
-
import
|
|
29
|
-
import { EmbedIframe as
|
|
30
|
-
import { useLocaleContext as
|
|
31
|
-
import
|
|
32
|
-
import { TwitterTimelineEmbed as
|
|
33
|
-
import { useUpdate as
|
|
34
|
-
const
|
|
25
|
+
import { withoutTrailingSlash as lt, isRelative as Be, parseURL as Ne } from "ufo";
|
|
26
|
+
import { useMessage as Re } from "@blocklet/embed/message";
|
|
27
|
+
import { useLatest as Me } from "ahooks";
|
|
28
|
+
import Ie from "lodash/isEqual";
|
|
29
|
+
import { EmbedIframe as Le } from "@blocklet/embed/react";
|
|
30
|
+
import { useLocaleContext as Ee } from "@arcblock/ux/lib/Locale/context";
|
|
31
|
+
import ut from "@arcblock/ux/lib/Screenshot";
|
|
32
|
+
import { TwitterTimelineEmbed as Ae } from "react-twitter-embed";
|
|
33
|
+
import { useUpdate as Pe, useMount as We } from "react-use";
|
|
34
|
+
const tt = "{{CUSTOM_VALUE}}", je = [
|
|
35
35
|
{
|
|
36
36
|
title: "None",
|
|
37
37
|
value: "none",
|
|
@@ -52,7 +52,7 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
52
52
|
value: "large",
|
|
53
53
|
sx: { py: { xs: 7.5, md: 10, lg: 12.5, xl: 15 } }
|
|
54
54
|
}
|
|
55
|
-
],
|
|
55
|
+
], ze = [
|
|
56
56
|
{
|
|
57
57
|
title: "None",
|
|
58
58
|
value: "none",
|
|
@@ -73,7 +73,7 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
73
73
|
value: "large",
|
|
74
74
|
sx: { py: { xs: 6, md: 9, lg: 9, xl: 11 } }
|
|
75
75
|
}
|
|
76
|
-
],
|
|
76
|
+
], Fe = [
|
|
77
77
|
{
|
|
78
78
|
title: "None",
|
|
79
79
|
value: "none",
|
|
@@ -97,7 +97,7 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
97
97
|
], q = (t, e, o) => {
|
|
98
98
|
const n = t.breakpoints.values[o];
|
|
99
99
|
return `${e}${n ? ` (${n}px)` : ""}`;
|
|
100
|
-
},
|
|
100
|
+
}, Te = [
|
|
101
101
|
{
|
|
102
102
|
title: "100%",
|
|
103
103
|
value: "full",
|
|
@@ -131,12 +131,12 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
131
131
|
title: "Custom",
|
|
132
132
|
value: "custom",
|
|
133
133
|
sx: {
|
|
134
|
-
maxWidth:
|
|
134
|
+
maxWidth: tt,
|
|
135
135
|
width: "100%",
|
|
136
136
|
mx: "auto"
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
],
|
|
139
|
+
], Oe = [
|
|
140
140
|
{
|
|
141
141
|
title: "None",
|
|
142
142
|
value: "none",
|
|
@@ -158,7 +158,7 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
158
158
|
value: "large",
|
|
159
159
|
sx: { gap: { xs: 3, md: 5, lg: 5, xl: 6.5 } }
|
|
160
160
|
}
|
|
161
|
-
],
|
|
161
|
+
], Ue = [
|
|
162
162
|
{
|
|
163
163
|
title: "None",
|
|
164
164
|
value: "none",
|
|
@@ -179,48 +179,301 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
179
179
|
value: "large",
|
|
180
180
|
sx: { p: { xs: 3, md: 6, lg: 6, xl: 9 } }
|
|
181
181
|
}
|
|
182
|
-
],
|
|
182
|
+
], De = [
|
|
183
183
|
{
|
|
184
184
|
title: "Start",
|
|
185
185
|
value: "start",
|
|
186
186
|
sx: { alignContent: "start" }
|
|
187
187
|
},
|
|
188
|
+
{
|
|
189
|
+
title: "Center",
|
|
190
|
+
value: "center",
|
|
191
|
+
sx: { alignContent: "center" }
|
|
192
|
+
},
|
|
188
193
|
{
|
|
189
194
|
title: "End",
|
|
190
195
|
value: "end",
|
|
191
196
|
sx: { alignContent: "end" }
|
|
192
197
|
},
|
|
198
|
+
{
|
|
199
|
+
title: "Space Between",
|
|
200
|
+
value: "space-between",
|
|
201
|
+
sx: { alignContent: "space-between" }
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
title: "Space Around",
|
|
205
|
+
value: "space-around",
|
|
206
|
+
sx: { alignContent: "space-around" }
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
title: "Space Evenly",
|
|
210
|
+
value: "space-evenly",
|
|
211
|
+
sx: { alignContent: "space-evenly" }
|
|
212
|
+
}
|
|
213
|
+
], Ge = [
|
|
214
|
+
{
|
|
215
|
+
title: "Start",
|
|
216
|
+
value: "start",
|
|
217
|
+
sx: { justifyContent: "start" }
|
|
218
|
+
},
|
|
193
219
|
{
|
|
194
220
|
title: "Center",
|
|
195
221
|
value: "center",
|
|
196
|
-
sx: {
|
|
222
|
+
sx: { justifyContent: "center" }
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
title: "End",
|
|
226
|
+
value: "end",
|
|
227
|
+
sx: { justifyContent: "end" }
|
|
197
228
|
},
|
|
198
229
|
{
|
|
199
230
|
title: "Space Between",
|
|
200
231
|
value: "space-between",
|
|
201
|
-
sx: {
|
|
232
|
+
sx: { justifyContent: "space-between" }
|
|
202
233
|
},
|
|
203
234
|
{
|
|
204
235
|
title: "Space Around",
|
|
205
236
|
value: "space-around",
|
|
206
|
-
sx: {
|
|
237
|
+
sx: { justifyContent: "space-around" }
|
|
207
238
|
},
|
|
208
239
|
{
|
|
209
240
|
title: "Space Evenly",
|
|
210
241
|
value: "space-evenly",
|
|
211
|
-
sx: {
|
|
242
|
+
sx: { justifyContent: "space-evenly" }
|
|
243
|
+
}
|
|
244
|
+
], He = [
|
|
245
|
+
{
|
|
246
|
+
title: "Solid",
|
|
247
|
+
value: "solid",
|
|
248
|
+
sx: { border: "1px solid", borderColor: "divider" },
|
|
249
|
+
group: "borderFrame"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
title: "Dashed",
|
|
253
|
+
value: "dashed",
|
|
254
|
+
sx: { border: "1px dashed", borderColor: "divider" },
|
|
255
|
+
group: "borderFrame"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
title: "Dotted",
|
|
259
|
+
value: "dotted",
|
|
260
|
+
sx: { border: "1px dotted", borderColor: "divider" },
|
|
261
|
+
group: "borderFrame"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
title: "Custom",
|
|
265
|
+
value: "custom",
|
|
266
|
+
sx: {
|
|
267
|
+
border: tt
|
|
268
|
+
},
|
|
269
|
+
group: "borderFrame"
|
|
270
|
+
}
|
|
271
|
+
], Ft = [
|
|
272
|
+
// new device frames
|
|
273
|
+
{ value: "macbook", title: "MacBook", group: "deviceFrame" },
|
|
274
|
+
{ value: "phone", title: "Phone", group: "deviceFrame" }
|
|
275
|
+
// old device frames:
|
|
276
|
+
// @FIXME:以下类型不适配 children,先注释掉了,会走以前的逻辑,渲染 p script 有问题
|
|
277
|
+
// { value: 'iphone-x', title: 'iPhone X', group: 'deviceFrame' },
|
|
278
|
+
// { value: 'iphone-8', title: 'iPhone 8', group: 'deviceFrame' },
|
|
279
|
+
// { value: 'ipad-pro', title: 'iPad Pro', group: 'deviceFrame' },
|
|
280
|
+
// { value: 'imac-pro', title: 'iMac Pro', group: 'deviceFrame' },
|
|
281
|
+
// { value: 'macbook-pro', title: 'MacBook Pro', group: 'deviceFrame' },
|
|
282
|
+
// { value: 'surface-pro', title: 'Surface Pro', group: 'deviceFrame' },
|
|
283
|
+
// { value: 'surface-book', title: 'Surface Book', group: 'deviceFrame' },
|
|
284
|
+
// { value: 'surface-studio', title: 'Surface Studio', group: 'deviceFrame' },
|
|
285
|
+
// { value: 'galaxy-s8', title: 'Galaxy S8', group: 'deviceFrame' },
|
|
286
|
+
// { value: 'google-pixel', title: 'Google Pixel', group: 'deviceFrame' },
|
|
287
|
+
// { value: 'google-pixel-2-xl', title: 'Google Pixel 2 XL', group: 'deviceFrame' },
|
|
288
|
+
// { value: 'apple-watch', title: 'Apple Watch', group: 'deviceFrame' },
|
|
289
|
+
], Tt = (t) => Ft.some((e) => e.value === t), _t = ({ hasUrl: t = !1, hasTab: e = !1 } = {}) => ({
|
|
290
|
+
position: "relative",
|
|
291
|
+
paddingTop: "2em",
|
|
292
|
+
// 为顶部栏腾出空间
|
|
293
|
+
// 移除这些边框属性
|
|
294
|
+
// border: 1,
|
|
295
|
+
// borderColor: 'divider',
|
|
296
|
+
// borderTop: '2em solid',
|
|
297
|
+
// borderTopColor: 'divider',
|
|
298
|
+
// borderRadius: 1,
|
|
299
|
+
// 使用伪元素替代边框
|
|
300
|
+
"&::before": {
|
|
301
|
+
content: '""',
|
|
302
|
+
position: "absolute",
|
|
303
|
+
top: 0,
|
|
304
|
+
left: 0,
|
|
305
|
+
right: 0,
|
|
306
|
+
bottom: 0,
|
|
307
|
+
border: "1px solid",
|
|
308
|
+
borderColor: "divider",
|
|
309
|
+
pointerEvents: "none",
|
|
310
|
+
zIndex: 1
|
|
311
|
+
},
|
|
312
|
+
// 使用伪元素替代顶部边框
|
|
313
|
+
"&::after": {
|
|
314
|
+
content: '""',
|
|
315
|
+
position: "absolute",
|
|
316
|
+
top: 0,
|
|
317
|
+
left: 0,
|
|
318
|
+
right: 0,
|
|
319
|
+
height: "2em",
|
|
320
|
+
backgroundColor: "divider",
|
|
321
|
+
pointerEvents: "none",
|
|
322
|
+
zIndex: 1
|
|
323
|
+
},
|
|
324
|
+
// 浏览器按钮
|
|
325
|
+
"& > div:first-of-type:before": {
|
|
326
|
+
display: "block",
|
|
327
|
+
position: "absolute",
|
|
328
|
+
content: '""',
|
|
329
|
+
top: "-1.25em",
|
|
330
|
+
// 调整按钮位置到顶部栏中间
|
|
331
|
+
left: "1em",
|
|
332
|
+
width: "0.5em",
|
|
333
|
+
height: "0.5em",
|
|
334
|
+
borderRadius: "50%",
|
|
335
|
+
bgcolor: "#f44",
|
|
336
|
+
boxShadow: "0 0 0 2px #f44, 1.5em 0 0 2px #9b3, 3em 0 0 2px #fb5",
|
|
337
|
+
zIndex: 2
|
|
338
|
+
},
|
|
339
|
+
// 浏览器 URL 栏样式
|
|
340
|
+
"& > div:first-of-type:after": t ? {
|
|
341
|
+
display: "block",
|
|
342
|
+
position: "absolute",
|
|
343
|
+
content: '""',
|
|
344
|
+
top: "-1.6em",
|
|
345
|
+
// 调整URL栏位置到顶部栏中间
|
|
346
|
+
left: "5.5em",
|
|
347
|
+
width: "calc(100% - 7em)",
|
|
348
|
+
height: "1.2em",
|
|
349
|
+
borderRadius: 0.25,
|
|
350
|
+
bgcolor: "white",
|
|
351
|
+
zIndex: 2
|
|
352
|
+
} : e ? {
|
|
353
|
+
display: "block",
|
|
354
|
+
position: "absolute",
|
|
355
|
+
content: '""',
|
|
356
|
+
top: "0em",
|
|
357
|
+
// 调整Tab栏位置
|
|
358
|
+
left: "5.5em",
|
|
359
|
+
width: "20%",
|
|
360
|
+
height: "0em",
|
|
361
|
+
borderBottom: "2em solid white",
|
|
362
|
+
borderLeft: "0.8em solid transparent",
|
|
363
|
+
borderRight: "0.8em solid transparent",
|
|
364
|
+
zIndex: 2
|
|
365
|
+
} : {}
|
|
366
|
+
}), Ve = [
|
|
367
|
+
{
|
|
368
|
+
value: "chrome",
|
|
369
|
+
title: "Chrome",
|
|
370
|
+
group: "browserFrame",
|
|
371
|
+
sx: _t()
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
value: "chrome-with-url",
|
|
375
|
+
title: "Chrome (With URL)",
|
|
376
|
+
group: "browserFrame",
|
|
377
|
+
sx: _t({
|
|
378
|
+
hasUrl: !0
|
|
379
|
+
})
|
|
380
|
+
}
|
|
381
|
+
], Je = [
|
|
382
|
+
{
|
|
383
|
+
value: "shadow-sm",
|
|
384
|
+
title: "Shadow Low Elevation",
|
|
385
|
+
group: "shadowFrame",
|
|
386
|
+
sx: { boxShadow: (t) => t.shadows[2] }
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
value: "shadow-md",
|
|
390
|
+
title: "Shadow Medium Elevation",
|
|
391
|
+
group: "shadowFrame",
|
|
392
|
+
sx: { boxShadow: (t) => t.shadows[6] }
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
value: "shadow-lg",
|
|
396
|
+
title: "Shadow High Elevation",
|
|
397
|
+
group: "shadowFrame",
|
|
398
|
+
sx: { boxShadow: (t) => t.shadows[12] }
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
value: "shadow-xl",
|
|
402
|
+
title: "Shadow Extra High Elevation",
|
|
403
|
+
group: "shadowFrame",
|
|
404
|
+
sx: { boxShadow: (t) => t.shadows[16] }
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
value: "shadow-max",
|
|
408
|
+
title: "Shadow Max Elevation",
|
|
409
|
+
group: "shadowFrame",
|
|
410
|
+
sx: { boxShadow: (t) => t.shadows[24] }
|
|
212
411
|
}
|
|
213
|
-
],
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
412
|
+
], Ye = [
|
|
413
|
+
{
|
|
414
|
+
title: "None",
|
|
415
|
+
value: "none",
|
|
416
|
+
sx: { border: "none" },
|
|
417
|
+
group: "commonFrame"
|
|
418
|
+
},
|
|
419
|
+
...He,
|
|
420
|
+
...Ve,
|
|
421
|
+
...Je,
|
|
422
|
+
...Ft
|
|
423
|
+
], Ke = [
|
|
424
|
+
{
|
|
425
|
+
title: "None",
|
|
426
|
+
value: "none",
|
|
427
|
+
sx: { borderRadius: 0 }
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
title: "Small",
|
|
431
|
+
value: "small",
|
|
432
|
+
sx: { borderRadius: 1 }
|
|
433
|
+
// theme.shape.borderRadius * 1
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
title: "Medium",
|
|
437
|
+
value: "medium",
|
|
438
|
+
sx: { borderRadius: 2 }
|
|
439
|
+
// theme.shape.borderRadius * 2
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
title: "Large",
|
|
443
|
+
value: "large",
|
|
444
|
+
sx: { borderRadius: 3 }
|
|
445
|
+
// theme.shape.borderRadius * 3
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
title: "Extra Large",
|
|
449
|
+
value: "xl",
|
|
450
|
+
sx: { borderRadius: 4 }
|
|
451
|
+
// theme.shape.borderRadius * 4
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
title: "Rounded",
|
|
455
|
+
value: "rounded",
|
|
456
|
+
sx: { borderRadius: "50%" }
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
title: "Custom",
|
|
460
|
+
value: "custom",
|
|
461
|
+
sx: { borderRadius: tt }
|
|
462
|
+
}
|
|
463
|
+
], Xe = R(je, "value"), qe = R(ze, "value"), Qe = R(Fe, "value"), Ze = R(Te, "value"), to = R(Oe, "value"), eo = R(Ue, "value"), oo = R(De, "value"), no = R(Ge, "value"), ro = R(Ye, "value"), io = R(Ke, "value"), ao = /* @__PURE__ */ new Map([
|
|
464
|
+
["baseSectionPaddingY", Xe],
|
|
465
|
+
["maxWidth", Ze],
|
|
466
|
+
["paddingY", qe],
|
|
467
|
+
["paddingX", Qe],
|
|
468
|
+
["layoutBlockGap", to],
|
|
469
|
+
["layoutBlockPadding", eo],
|
|
470
|
+
["layoutBlockAlignContent", oo],
|
|
471
|
+
["layoutBlockJustifyContent", no],
|
|
472
|
+
["layoutBlockBorder", ro],
|
|
473
|
+
["layoutBlockBorderRadius", io]
|
|
221
474
|
]);
|
|
222
|
-
function
|
|
223
|
-
const { type: e, value: o, format: n = "sx", defaultValue: i = null } = t, a =
|
|
475
|
+
function W(t) {
|
|
476
|
+
const { type: e, value: o, format: n = "sx", defaultValue: i = null } = t, a = ao.get(e);
|
|
224
477
|
if (!a || typeof o != "string" || !o)
|
|
225
478
|
return i;
|
|
226
479
|
const c = o.startsWith("custom:"), s = c ? "custom" : o;
|
|
@@ -229,7 +482,7 @@ function D(t) {
|
|
|
229
482
|
if (c) {
|
|
230
483
|
const d = o.replace("custom:", "");
|
|
231
484
|
try {
|
|
232
|
-
return JSON.parse(JSON.stringify(l || {}).replaceAll(
|
|
485
|
+
return JSON.parse(JSON.stringify(l || {}).replaceAll(tt, d));
|
|
233
486
|
} catch {
|
|
234
487
|
}
|
|
235
488
|
}
|
|
@@ -237,41 +490,41 @@ function D(t) {
|
|
|
237
490
|
}
|
|
238
491
|
return i;
|
|
239
492
|
}
|
|
240
|
-
const
|
|
493
|
+
const Ot = It({
|
|
241
494
|
page: null,
|
|
242
495
|
getPageMeta: () => ({}),
|
|
243
496
|
getPageMetaStyle: () => ({})
|
|
244
497
|
});
|
|
245
|
-
function
|
|
246
|
-
return
|
|
498
|
+
function so() {
|
|
499
|
+
return Lt(Ot);
|
|
247
500
|
}
|
|
248
|
-
function
|
|
501
|
+
function cr({
|
|
249
502
|
page: t,
|
|
250
503
|
children: e,
|
|
251
504
|
defaultLocale: o = "en",
|
|
252
505
|
currentLocale: n
|
|
253
506
|
}) {
|
|
254
|
-
const i =
|
|
507
|
+
const i = S(() => t ? JSON.parse(JSON.stringify(t)) : null, [JSON.stringify(t)]), a = z(() => {
|
|
255
508
|
if (!i) return {};
|
|
256
509
|
const l = n || o;
|
|
257
510
|
return i.locales?.[l] ?? {};
|
|
258
|
-
}, [i, o, n]), c =
|
|
511
|
+
}, [i, o, n]), c = z(
|
|
259
512
|
(l = "sx") => {
|
|
260
513
|
const d = a();
|
|
261
|
-
return !d || !d.style ? {} : Object.entries(d.style || {}).reduce((
|
|
262
|
-
if (!
|
|
263
|
-
const
|
|
264
|
-
d.style[
|
|
265
|
-
const
|
|
266
|
-
type:
|
|
267
|
-
value:
|
|
514
|
+
return !d || !d.style ? {} : Object.entries(d.style || {}).reduce((u, [h, p]) => {
|
|
515
|
+
if (!p) return u;
|
|
516
|
+
const y = `${h}Custom`;
|
|
517
|
+
d.style[y];
|
|
518
|
+
const x = W({
|
|
519
|
+
type: h,
|
|
520
|
+
value: p,
|
|
268
521
|
format: l
|
|
269
522
|
});
|
|
270
|
-
return
|
|
523
|
+
return x ? { ...u, ...x } : u;
|
|
271
524
|
}, {});
|
|
272
525
|
},
|
|
273
526
|
[a]
|
|
274
|
-
), s =
|
|
527
|
+
), s = S(
|
|
275
528
|
() => ({
|
|
276
529
|
page: i,
|
|
277
530
|
getPageMeta: a,
|
|
@@ -279,39 +532,39 @@ function In({
|
|
|
279
532
|
}),
|
|
280
533
|
[i, a, c]
|
|
281
534
|
);
|
|
282
|
-
return /* @__PURE__ */ r(
|
|
535
|
+
return /* @__PURE__ */ r(Ot.Provider, { value: s, children: e });
|
|
283
536
|
}
|
|
284
|
-
const
|
|
285
|
-
function
|
|
537
|
+
const et = ["editing", "height", "locale", "dev", "sx"];
|
|
538
|
+
function lo(t) {
|
|
286
539
|
const { className: e, ...o } = t;
|
|
287
|
-
return /* @__PURE__ */ r(
|
|
540
|
+
return /* @__PURE__ */ r(co, { ...o, className: b("BlockBase-root", e) });
|
|
288
541
|
}
|
|
289
|
-
const
|
|
542
|
+
const co = C(f)`
|
|
290
543
|
position: relative;
|
|
291
544
|
color: ${({ theme: t }) => t.palette.text.primary};
|
|
292
|
-
`,
|
|
545
|
+
`, Ut = It({
|
|
293
546
|
pages: [],
|
|
294
547
|
project: void 0
|
|
295
|
-
}), { Provider:
|
|
296
|
-
function
|
|
297
|
-
return
|
|
548
|
+
}), { Provider: dr, Consumer: ur } = Ut;
|
|
549
|
+
function Dt() {
|
|
550
|
+
return Lt(Ut);
|
|
298
551
|
}
|
|
299
|
-
function
|
|
300
|
-
return /* @__PURE__ */ r(
|
|
552
|
+
function uo({ icon: t, ...e }) {
|
|
553
|
+
return /* @__PURE__ */ r(Pt, { icon: t, ...e, ref: null });
|
|
301
554
|
}
|
|
302
|
-
function
|
|
303
|
-
return /* @__PURE__ */ r(
|
|
555
|
+
function mo({ icon: t, className: e = "", size: o = "1rem", ...n }) {
|
|
556
|
+
return /* @__PURE__ */ r(po, { component: uo, className: b("css-icon", e), size: o, ...n, icon: t });
|
|
304
557
|
}
|
|
305
|
-
const
|
|
558
|
+
const po = C(f)`
|
|
306
559
|
&.css-icon {
|
|
307
560
|
display: inline-block;
|
|
308
561
|
width: ${({ size: t }) => t};
|
|
309
562
|
height: ${({ size: t }) => t};
|
|
310
563
|
}
|
|
311
564
|
`;
|
|
312
|
-
function
|
|
313
|
-
const a =
|
|
314
|
-
return c ? /* @__PURE__ */ r(
|
|
565
|
+
function ho({ icon: t, className: e = "", size: o = "1rem", imageMeta: n, ...i }) {
|
|
566
|
+
const a = F(L(t), 540), [c, s] = Z(!1), l = At();
|
|
567
|
+
return c ? /* @__PURE__ */ r(mo, { icon: "i-mdi:image", color: l.palette.grey[500], size: o, className: e, ...i }) : /* @__PURE__ */ r(go, { className: b("image-icon", e), size: o, ...i, children: /* @__PURE__ */ r(
|
|
315
568
|
"img",
|
|
316
569
|
{
|
|
317
570
|
className: "image-icon__image",
|
|
@@ -324,7 +577,7 @@ function De({ icon: t, className: e = "", size: o = "1rem", imageMeta: n, ...i }
|
|
|
324
577
|
}
|
|
325
578
|
) });
|
|
326
579
|
}
|
|
327
|
-
const
|
|
580
|
+
const go = C(f)`
|
|
328
581
|
display: inline-block;
|
|
329
582
|
width: ${({ size: t }) => t};
|
|
330
583
|
height: ${({ size: t }) => t};
|
|
@@ -333,33 +586,33 @@ const He = _(h)`
|
|
|
333
586
|
height: 100%;
|
|
334
587
|
width: 100%;
|
|
335
588
|
}
|
|
336
|
-
`,
|
|
337
|
-
function
|
|
589
|
+
`, xt = (t) => typeof t == "string" && /^[\w-_]+:[\w-_]+$/.test(t);
|
|
590
|
+
function mt({ icon: t, size: e = "1rem", imageMeta: o, ...n }) {
|
|
338
591
|
const i = window.isNaN(e) ? e : `${e}px`;
|
|
339
|
-
return
|
|
592
|
+
return xt(t) ? /* @__PURE__ */ r(Pt, { icon: t }) : /* @__PURE__ */ r(fo, { component: ho, imageMeta: o, className: "base-icon", icon: t, size: i, ...n });
|
|
340
593
|
}
|
|
341
|
-
const
|
|
594
|
+
const fo = C(f)`
|
|
342
595
|
flex-shrink: 0;
|
|
343
596
|
`;
|
|
344
|
-
function
|
|
345
|
-
const l = o ? /* @__PURE__ */ r(
|
|
346
|
-
return
|
|
597
|
+
function V({ text: t, children: e, icon: o = "", endIcon: n, color: i = "primary", link: a = "", href: c = "", ...s }) {
|
|
598
|
+
const l = o ? /* @__PURE__ */ r(mt, { icon: o }) : null, d = n ? /* @__PURE__ */ r(mt, { icon: n }) : null, m = a || c, u = { ...s };
|
|
599
|
+
return m && (u.href = m, dt(m) && (u.target = u.target || "_blank")), /* @__PURE__ */ r(ve, { startIcon: l, endIcon: d, color: i, ...u, children: t || e });
|
|
347
600
|
}
|
|
348
|
-
function
|
|
349
|
-
const { pages: n = [] } =
|
|
601
|
+
function Gt({ editing: t, text: e, ...o }) {
|
|
602
|
+
const { pages: n = [] } = Dt(), i = n.find((a) => a.id === (o.link || o.linkId));
|
|
350
603
|
if (t)
|
|
351
|
-
return /* @__PURE__ */ r(
|
|
604
|
+
return /* @__PURE__ */ r(V, { ...I(o, ["link", "linkId"]), children: e });
|
|
352
605
|
if (i) {
|
|
353
606
|
const a = i.path || "/";
|
|
354
|
-
return /* @__PURE__ */ r(
|
|
607
|
+
return /* @__PURE__ */ r(xe, { to: a, children: /* @__PURE__ */ r(V, { ...I(o, ["link", "linkId"]), children: e }) });
|
|
355
608
|
}
|
|
356
|
-
return /* @__PURE__ */ r(
|
|
609
|
+
return /* @__PURE__ */ r(V, { ...I(o, "linkId"), children: e });
|
|
357
610
|
}
|
|
358
|
-
function
|
|
611
|
+
function O({ actions: t, center: e, className: o, align: n }) {
|
|
359
612
|
return t && t?.length ? /* @__PURE__ */ r(
|
|
360
|
-
|
|
613
|
+
f,
|
|
361
614
|
{
|
|
362
|
-
className:
|
|
615
|
+
className: b(
|
|
363
616
|
"flex gap-4 flex-wrap",
|
|
364
617
|
"lg:flex-row lg:gap-8",
|
|
365
618
|
(e || n === "center") && "justify-center",
|
|
@@ -372,7 +625,7 @@ function T({ actions: t, center: e, className: o, align: n }) {
|
|
|
372
625
|
}
|
|
373
626
|
) : null;
|
|
374
627
|
}
|
|
375
|
-
const
|
|
628
|
+
const xo = "section", bo = re(f)`
|
|
376
629
|
overflow: hidden;
|
|
377
630
|
|
|
378
631
|
.section__title {
|
|
@@ -423,7 +676,7 @@ const Ve = "section", Je = Dt(h)`
|
|
|
423
676
|
margin-bottom: 0.5rem;
|
|
424
677
|
}
|
|
425
678
|
}
|
|
426
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
679
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[xo]}px) {
|
|
427
680
|
.section__tag {
|
|
428
681
|
margin-bottom: 32px;
|
|
429
682
|
}
|
|
@@ -435,7 +688,7 @@ const Ve = "section", Je = Dt(h)`
|
|
|
435
688
|
}
|
|
436
689
|
}
|
|
437
690
|
`;
|
|
438
|
-
function
|
|
691
|
+
function ot({
|
|
439
692
|
title: t,
|
|
440
693
|
description: e,
|
|
441
694
|
descriptionMarkdown: o,
|
|
@@ -446,76 +699,76 @@ function et({
|
|
|
446
699
|
append: s,
|
|
447
700
|
level: l = 2,
|
|
448
701
|
tag: d,
|
|
449
|
-
badge:
|
|
450
|
-
center:
|
|
451
|
-
logo:
|
|
452
|
-
titleAppearance:
|
|
453
|
-
descriptionAppearance:
|
|
454
|
-
...
|
|
702
|
+
badge: m,
|
|
703
|
+
center: u,
|
|
704
|
+
logo: h,
|
|
705
|
+
titleAppearance: p,
|
|
706
|
+
descriptionAppearance: y,
|
|
707
|
+
...x
|
|
455
708
|
}) {
|
|
456
|
-
const
|
|
457
|
-
if (!t && !e && !n && !
|
|
458
|
-
const
|
|
709
|
+
const v = Wt();
|
|
710
|
+
if (!t && !e && !n && !m && !d && !c && !s && !h) return null;
|
|
711
|
+
const k = Math.max(Math.min(5, l + 1), 1), _ = {
|
|
459
712
|
1: "xl:!text-3xl lg:!text-2xl md:!text-xl",
|
|
460
713
|
2: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
461
714
|
3: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
462
715
|
4: "xl:!text-xl lg:!text-lg md:!text-md",
|
|
463
716
|
5: "xl:!text-lg md:!text-md sm:!text-sm",
|
|
464
717
|
6: "!text-sm"
|
|
465
|
-
},
|
|
466
|
-
return /* @__PURE__ */ w(
|
|
718
|
+
}, M = l === 0 ? "big" : `h${k}`, B = l === 0;
|
|
719
|
+
return /* @__PURE__ */ w(bo, { className: b("base-info", "lg:text-left", u && "!text-center", i), ...x, children: [
|
|
467
720
|
c && /* @__PURE__ */ r("div", { children: c }),
|
|
468
|
-
(d ||
|
|
469
|
-
|
|
721
|
+
(d || m) && /* @__PURE__ */ r("div", { className: b("section__tag", a?.tag || a?.badge), children: d || m }),
|
|
722
|
+
h && /* @__PURE__ */ r("img", { className: "w-[120px] m-auto mb-8", src: h, alt: "info", loading: "lazy" }),
|
|
470
723
|
t && /* @__PURE__ */ r(
|
|
471
|
-
|
|
724
|
+
j,
|
|
472
725
|
{
|
|
473
726
|
sx: {
|
|
474
727
|
whiteSpace: "pre-wrap",
|
|
475
728
|
mb: e ? "2vw" : 0,
|
|
476
|
-
...
|
|
729
|
+
...p?.color && { color: `${v(p.color)} !important` }
|
|
477
730
|
},
|
|
478
|
-
className:
|
|
731
|
+
className: b(
|
|
479
732
|
"section__title",
|
|
480
733
|
"text-gray-800",
|
|
481
734
|
"dark:text-gray-50",
|
|
482
735
|
a.title,
|
|
483
736
|
"page-kit-section__title",
|
|
484
|
-
|
|
737
|
+
B ? "" : "section__title_non_big"
|
|
485
738
|
),
|
|
486
739
|
component: `h${Math.max(l, 1)}`,
|
|
487
|
-
variant:
|
|
740
|
+
variant: M,
|
|
488
741
|
children: t
|
|
489
742
|
}
|
|
490
743
|
),
|
|
491
744
|
e && (o ? /* @__PURE__ */ r(
|
|
492
|
-
|
|
745
|
+
f,
|
|
493
746
|
{
|
|
494
747
|
sx: {
|
|
495
|
-
...
|
|
748
|
+
...y?.color && { color: `${v(y.color)} !important` }
|
|
496
749
|
},
|
|
497
|
-
className:
|
|
750
|
+
className: b(
|
|
498
751
|
"section__description",
|
|
499
752
|
"text-gray-800",
|
|
500
753
|
"dark:text-gray-100",
|
|
501
|
-
|
|
754
|
+
_[k],
|
|
502
755
|
a.description,
|
|
503
756
|
"page-kit-section__description"
|
|
504
757
|
),
|
|
505
|
-
children: /* @__PURE__ */ r(
|
|
758
|
+
children: /* @__PURE__ */ r(we, { codeOptions: { showActionButton: !1, theme: ke }, children: e })
|
|
506
759
|
}
|
|
507
760
|
) : /* @__PURE__ */ r(
|
|
508
|
-
|
|
761
|
+
j,
|
|
509
762
|
{
|
|
510
763
|
sx: {
|
|
511
764
|
whiteSpace: "pre-wrap",
|
|
512
|
-
...
|
|
765
|
+
...y?.color && { color: `${v(y.color)} !important` }
|
|
513
766
|
},
|
|
514
|
-
className:
|
|
767
|
+
className: b(
|
|
515
768
|
"section__description",
|
|
516
769
|
"text-gray-800",
|
|
517
770
|
"dark:text-gray-100",
|
|
518
|
-
|
|
771
|
+
_[k],
|
|
519
772
|
a.description,
|
|
520
773
|
"page-kit-section__description"
|
|
521
774
|
),
|
|
@@ -525,11 +778,11 @@ function et({
|
|
|
525
778
|
children: e
|
|
526
779
|
}
|
|
527
780
|
)),
|
|
528
|
-
/* @__PURE__ */ r(
|
|
781
|
+
/* @__PURE__ */ r(O, { actions: n, center: u, className: "mt-8" }),
|
|
529
782
|
s && /* @__PURE__ */ r("div", { children: s })
|
|
530
783
|
] });
|
|
531
784
|
}
|
|
532
|
-
const
|
|
785
|
+
const nt = [
|
|
533
786
|
"actions",
|
|
534
787
|
"append",
|
|
535
788
|
"badge",
|
|
@@ -544,28 +797,28 @@ const ot = [
|
|
|
544
797
|
"titleAppearance",
|
|
545
798
|
"descriptionAppearance"
|
|
546
799
|
];
|
|
547
|
-
function
|
|
800
|
+
function yo() {
|
|
548
801
|
const t = navigator.userAgent.toLowerCase();
|
|
549
802
|
return t.includes("safari") && !t.includes("chrome");
|
|
550
803
|
}
|
|
551
|
-
function
|
|
804
|
+
function vo(t = "") {
|
|
552
805
|
if (t.startsWith("data:image/svg+xml,")) return !0;
|
|
553
806
|
const e = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, o = /^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;
|
|
554
807
|
return e.test(t) || o.test(t);
|
|
555
808
|
}
|
|
556
|
-
function
|
|
809
|
+
function H(t) {
|
|
557
810
|
return t?.endsWith(".mp4") || t?.endsWith(".m4v") || t?.endsWith(".webm");
|
|
558
811
|
}
|
|
559
|
-
function
|
|
812
|
+
function wo(t) {
|
|
560
813
|
return t?.endsWith(".mp4") || t?.endsWith(".m4v") ? "video/mp4" : t?.endsWith(".webm") ? "video/webm" : void 0;
|
|
561
814
|
}
|
|
562
|
-
function
|
|
815
|
+
function ko(t) {
|
|
563
816
|
let e = {};
|
|
564
|
-
return typeof t == "string" ?
|
|
817
|
+
return typeof t == "string" ? Ce(t) ? e.image = t : (e.image = L(t), Se(t) && (e.color = t, e.image = "")) : e = t, e;
|
|
565
818
|
}
|
|
566
|
-
function
|
|
819
|
+
function _o() {
|
|
567
820
|
const [t, e] = Z(Date.now());
|
|
568
|
-
return
|
|
821
|
+
return J(() => {
|
|
569
822
|
const o = () => {
|
|
570
823
|
e(Date.now());
|
|
571
824
|
};
|
|
@@ -574,14 +827,14 @@ function Ze() {
|
|
|
574
827
|
};
|
|
575
828
|
}, []), t;
|
|
576
829
|
}
|
|
577
|
-
function
|
|
830
|
+
function $t(t, e, o, n, i) {
|
|
578
831
|
let a = null;
|
|
579
|
-
const { color: c = "", image: s } =
|
|
580
|
-
if (s &&
|
|
832
|
+
const { color: c = "", image: s } = ko(e);
|
|
833
|
+
if (s && vo(s)) {
|
|
581
834
|
delete o.backgroundColor;
|
|
582
|
-
const l = !(t.mobile.apple.device ||
|
|
835
|
+
const l = !(t.mobile.apple.device || yo()) && H(s), d = H(s) && n ? F(L(n), 1200, "quality") : "";
|
|
583
836
|
l ? a = /* @__PURE__ */ r(
|
|
584
|
-
|
|
837
|
+
f,
|
|
585
838
|
{
|
|
586
839
|
component: "video",
|
|
587
840
|
className: "section-bg",
|
|
@@ -591,7 +844,7 @@ function xt(t, e, o, n, i) {
|
|
|
591
844
|
controls: !1,
|
|
592
845
|
playsInline: !0,
|
|
593
846
|
poster: d,
|
|
594
|
-
src:
|
|
847
|
+
src: H(s) ? s : F(s, 1200, "quality"),
|
|
595
848
|
sx: {
|
|
596
849
|
width: "100%",
|
|
597
850
|
position: "absolute",
|
|
@@ -605,9 +858,9 @@ function xt(t, e, o, n, i) {
|
|
|
605
858
|
},
|
|
606
859
|
s
|
|
607
860
|
) : a = /* @__PURE__ */ r(
|
|
608
|
-
|
|
861
|
+
jt,
|
|
609
862
|
{
|
|
610
|
-
src:
|
|
863
|
+
src: H(s) && n ? d : s,
|
|
611
864
|
sizesAttr: {
|
|
612
865
|
sm: 600,
|
|
613
866
|
md: 900,
|
|
@@ -633,9 +886,9 @@ function xt(t, e, o, n, i) {
|
|
|
633
886
|
} else s ? o.backgroundImage = `${s} !important` : c && (o.backgroundColor = `${c} !important`);
|
|
634
887
|
return a;
|
|
635
888
|
}
|
|
636
|
-
function
|
|
889
|
+
function $o({ autoWidth: t, children: e, ...o }) {
|
|
637
890
|
return t ? /* @__PURE__ */ r(
|
|
638
|
-
|
|
891
|
+
f,
|
|
639
892
|
{
|
|
640
893
|
...o,
|
|
641
894
|
sx: [
|
|
@@ -646,9 +899,9 @@ function to({ autoWidth: t, children: e, ...o }) {
|
|
|
646
899
|
],
|
|
647
900
|
children: e
|
|
648
901
|
}
|
|
649
|
-
) : /* @__PURE__ */ r(
|
|
902
|
+
) : /* @__PURE__ */ r(ie, { ...o, children: e });
|
|
650
903
|
}
|
|
651
|
-
function
|
|
904
|
+
function rt({
|
|
652
905
|
dark: t = !1,
|
|
653
906
|
children: e,
|
|
654
907
|
className: o,
|
|
@@ -659,30 +912,30 @@ function nt({
|
|
|
659
912
|
type: s,
|
|
660
913
|
...l
|
|
661
914
|
}) {
|
|
662
|
-
const d = { ...n },
|
|
663
|
-
t && (d.color =
|
|
664
|
-
const
|
|
915
|
+
const d = { ...n }, m = zt((p) => p.breakpoints.down("md"));
|
|
916
|
+
t && (d.color = kt.common.white, d.backgroundColor = `${kt.grey[900]} !important`), i.show && (d.display = "flex");
|
|
917
|
+
const u = S(() => !Number(l.boxMaxWidth) || m ? {
|
|
665
918
|
width: "100%"
|
|
666
919
|
} : s === "wall" && l.boxMaxWidth ? {
|
|
667
920
|
maxWidth: `${l.boxMaxWidth}px !important`,
|
|
668
921
|
width: "100%"
|
|
669
922
|
} : {
|
|
670
923
|
width: "100%"
|
|
671
|
-
}, [l.boxMaxWidth,
|
|
924
|
+
}, [l.boxMaxWidth, m, s]), h = W({
|
|
672
925
|
type: "baseSectionPaddingY",
|
|
673
926
|
value: a || "normal",
|
|
674
927
|
// section default is normal
|
|
675
928
|
defaultValue: ""
|
|
676
929
|
});
|
|
677
930
|
return /* @__PURE__ */ r(
|
|
678
|
-
|
|
931
|
+
Co,
|
|
679
932
|
{
|
|
680
933
|
component: "section",
|
|
681
|
-
styles: { ...d, ...
|
|
682
|
-
className:
|
|
934
|
+
styles: { ...d, ...h },
|
|
935
|
+
className: b("base-section", "px-2 md:px-5 lg:px-5 xl:px-10", o, {
|
|
683
936
|
dark: t
|
|
684
937
|
}),
|
|
685
|
-
...
|
|
938
|
+
...I(
|
|
686
939
|
l,
|
|
687
940
|
"hoverStyle",
|
|
688
941
|
"boxMaxWidth",
|
|
@@ -693,11 +946,11 @@ function nt({
|
|
|
693
946
|
"titleAppearance",
|
|
694
947
|
"descriptionAppearance"
|
|
695
948
|
),
|
|
696
|
-
children: /* @__PURE__ */ r(
|
|
949
|
+
children: /* @__PURE__ */ r($o, { autoWidth: l?.autoWidth, className: b("section-content h-full"), sx: u, children: i.show ? /* @__PURE__ */ r(Ht, { ...c, boxed: i, children: e }) : e })
|
|
697
950
|
}
|
|
698
951
|
);
|
|
699
952
|
}
|
|
700
|
-
function
|
|
953
|
+
function Ht({
|
|
701
954
|
background: t = "",
|
|
702
955
|
backgroundVideoPoster: e,
|
|
703
956
|
children: o,
|
|
@@ -707,38 +960,38 @@ function Rt({
|
|
|
707
960
|
styles: c = {},
|
|
708
961
|
...s
|
|
709
962
|
}) {
|
|
710
|
-
const l = { ...c, ...n }, d =
|
|
711
|
-
let
|
|
712
|
-
const
|
|
713
|
-
return t && (
|
|
714
|
-
|
|
963
|
+
const l = { ...c, ...n }, d = Wt();
|
|
964
|
+
let m = null;
|
|
965
|
+
const u = zt((y) => y.breakpoints.up("sm")), h = _e(), p = _o();
|
|
966
|
+
return t && (m = $t(
|
|
967
|
+
h,
|
|
715
968
|
typeof t == "string" ? d(t) : t,
|
|
716
969
|
l,
|
|
717
970
|
e,
|
|
718
|
-
|
|
719
|
-
)), i.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding =
|
|
720
|
-
|
|
971
|
+
p
|
|
972
|
+
)), i.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding = u ? "50px" : "20px"), i?.border && (l.border = "1px solid #c0c0c0"), i?.background && (m = $t(
|
|
973
|
+
h,
|
|
721
974
|
typeof i?.background == "string" ? d(i?.background) : i?.background,
|
|
722
975
|
l,
|
|
723
976
|
i?.backgroundVideoPoster,
|
|
724
|
-
|
|
977
|
+
p
|
|
725
978
|
))), /* @__PURE__ */ w(
|
|
726
|
-
|
|
979
|
+
f,
|
|
727
980
|
{
|
|
728
981
|
...s,
|
|
729
982
|
sx: {
|
|
730
983
|
...l,
|
|
731
|
-
...
|
|
984
|
+
...m ? { position: "relative", overflow: "hidden", zIndex: 0 } : {}
|
|
732
985
|
},
|
|
733
|
-
className:
|
|
986
|
+
className: b(a, i?.boxShadow && "shadow-xl"),
|
|
734
987
|
children: [
|
|
735
|
-
|
|
988
|
+
m,
|
|
736
989
|
o
|
|
737
990
|
]
|
|
738
991
|
}
|
|
739
992
|
);
|
|
740
993
|
}
|
|
741
|
-
const
|
|
994
|
+
const Co = C(Ht)`
|
|
742
995
|
&:nth-of-type(even) {
|
|
743
996
|
background: #f8f8f8;
|
|
744
997
|
}
|
|
@@ -755,15 +1008,15 @@ const eo = _(Rt)`
|
|
|
755
1008
|
}
|
|
756
1009
|
}
|
|
757
1010
|
`;
|
|
758
|
-
function
|
|
759
|
-
if (t.type ===
|
|
760
|
-
const o = (t.props.children || []).filter((n) =>
|
|
761
|
-
return o.length === 1 ?
|
|
1011
|
+
function Vt(t) {
|
|
1012
|
+
if (t.type === fe) {
|
|
1013
|
+
const o = (t.props.children || []).filter((n) => Et(n));
|
|
1014
|
+
return o.length === 1 ? Vt(o[0]) : o.length > 1;
|
|
762
1015
|
}
|
|
763
1016
|
return Array.isArray(t);
|
|
764
1017
|
}
|
|
765
|
-
const
|
|
766
|
-
function
|
|
1018
|
+
const P = "&>*";
|
|
1019
|
+
function Jt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type: c, ...s } = {
|
|
767
1020
|
children: null,
|
|
768
1021
|
className: "",
|
|
769
1022
|
col: 3,
|
|
@@ -772,7 +1025,7 @@ function Tt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type:
|
|
|
772
1025
|
align: "center",
|
|
773
1026
|
type: "default"
|
|
774
1027
|
}) {
|
|
775
|
-
const l =
|
|
1028
|
+
const l = At(), d = Number(Math.floor(100 / e * 100) / 100), m = {
|
|
776
1029
|
center: "justify-center items-center",
|
|
777
1030
|
left: "justify-start items-center",
|
|
778
1031
|
right: "justify-end items-center",
|
|
@@ -782,51 +1035,51 @@ function Tt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type:
|
|
|
782
1035
|
"top-right": "justify-end items-start",
|
|
783
1036
|
"bottom-left": "justify-start items-end",
|
|
784
1037
|
"bottom-right": "justify-end items-end"
|
|
785
|
-
},
|
|
786
|
-
let
|
|
1038
|
+
}, u = m[i] || m.center;
|
|
1039
|
+
let p = o ?? ({
|
|
787
1040
|
2: 6,
|
|
788
1041
|
3: 4,
|
|
789
1042
|
4: 4,
|
|
790
1043
|
5: 3,
|
|
791
1044
|
6: 3
|
|
792
1045
|
}[e] || 0);
|
|
793
|
-
|
|
794
|
-
const
|
|
795
|
-
let
|
|
796
|
-
const
|
|
797
|
-
switch (
|
|
1046
|
+
Vt(t) || (p = 0);
|
|
1047
|
+
const x = (e - 1) * p / e;
|
|
1048
|
+
let v = { ...a, gap: `${p}rem` };
|
|
1049
|
+
const k = { [P]: { width: "100%" } }, _ = {}, M = {}, B = {};
|
|
1050
|
+
switch (k.gap = "1rem", _.gap = `${p / 2}rem`, e) {
|
|
798
1051
|
case 3:
|
|
799
1052
|
case 4:
|
|
800
|
-
|
|
801
|
-
width: `calc(50% - ${
|
|
1053
|
+
_[P] = {
|
|
1054
|
+
width: `calc(50% - ${p / 2}rem)`
|
|
802
1055
|
};
|
|
803
1056
|
break;
|
|
804
1057
|
case 5:
|
|
805
1058
|
case 6:
|
|
806
|
-
|
|
807
|
-
width: `calc(50% - ${
|
|
808
|
-
},
|
|
809
|
-
width: `calc(50% - ${
|
|
810
|
-
},
|
|
811
|
-
width: `calc(33.33% - ${
|
|
1059
|
+
k[P] = {
|
|
1060
|
+
width: `calc(50% - ${p / 2 / 2}rem)`
|
|
1061
|
+
}, _[P] = {
|
|
1062
|
+
width: `calc(50% - ${p / 2 / 2}rem)`
|
|
1063
|
+
}, M[P] = {
|
|
1064
|
+
width: `calc(33.33% - ${p * 2 / 3}rem)`
|
|
812
1065
|
};
|
|
813
1066
|
break;
|
|
814
1067
|
}
|
|
815
|
-
return
|
|
1068
|
+
return v[P] = { width: `calc(${d}% - ${x}rem)` }, v[`@media (max-width: ${l.breakpoints.values.xl}px)`] = B, v[`@media (max-width: ${l.breakpoints.values.lg}px)`] = M, v[`@media (max-width: ${l.breakpoints.values.md}px)`] = _, v[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k, c === "wall" && (v = { ...a, gap: `${p}rem` }, v[P] = { width: `calc(${d}% - ${x}rem)` }, k[P] = { width: `calc(45% - ${p / 2 / 2}rem)` }, v[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k), /* @__PURE__ */ r(f, { className: b("flex flex-wrap flex-row h-full", u, n), sx: v, ...s, children: t });
|
|
816
1069
|
}
|
|
817
|
-
function
|
|
1070
|
+
function U({ type: t = "", icon: e = "", size: o = "3rem", className: n = "", ...i }) {
|
|
818
1071
|
return /* @__PURE__ */ r(
|
|
819
|
-
|
|
1072
|
+
mt,
|
|
820
1073
|
{
|
|
821
1074
|
icon: e || t,
|
|
822
1075
|
size: o,
|
|
823
|
-
className:
|
|
1076
|
+
className: b("content-icon", n),
|
|
824
1077
|
...i,
|
|
825
1078
|
color: typeof i.color > "u" ? "inherit" : i.color
|
|
826
1079
|
}
|
|
827
1080
|
);
|
|
828
1081
|
}
|
|
829
|
-
function
|
|
1082
|
+
function So({
|
|
830
1083
|
to: t,
|
|
831
1084
|
base: e,
|
|
832
1085
|
children: o,
|
|
@@ -837,33 +1090,33 @@ function oo({
|
|
|
837
1090
|
useRouterLink: s,
|
|
838
1091
|
...l
|
|
839
1092
|
}) {
|
|
840
|
-
const { pages: d = [], locale:
|
|
841
|
-
let
|
|
842
|
-
const
|
|
1093
|
+
const { pages: d = [], locale: m = "" } = {}, u = e ? X("/", e) : e || "";
|
|
1094
|
+
let h = a === "auto" ? "_self" : a, p = X(u, t);
|
|
1095
|
+
const y = c ? dt(p) : !1;
|
|
843
1096
|
if (e)
|
|
844
|
-
return
|
|
1097
|
+
return p = X(u, m, t), /* @__PURE__ */ r(
|
|
845
1098
|
"a",
|
|
846
1099
|
{
|
|
847
1100
|
className: `no-underline ${n}`,
|
|
848
|
-
href:
|
|
1101
|
+
href: lt(p),
|
|
849
1102
|
rel: "noreferrer noopener",
|
|
850
|
-
target:
|
|
1103
|
+
target: h,
|
|
851
1104
|
...l,
|
|
852
1105
|
children: o
|
|
853
1106
|
}
|
|
854
1107
|
);
|
|
855
|
-
if (
|
|
856
|
-
a === "auto" && (
|
|
1108
|
+
if (dt(t))
|
|
1109
|
+
a === "auto" && (h = "_blank"), p = t;
|
|
857
1110
|
else {
|
|
858
|
-
|
|
859
|
-
const
|
|
860
|
-
if (s ||
|
|
1111
|
+
Be(p) && (p = X(window.location.pathname, p));
|
|
1112
|
+
const x = Ne(`${window.location.origin}${p}`), v = d.some((k) => k.pathname === x.pathname);
|
|
1113
|
+
if (s || v)
|
|
861
1114
|
return /* @__PURE__ */ r(
|
|
862
|
-
|
|
1115
|
+
be,
|
|
863
1116
|
{
|
|
864
1117
|
end: !0,
|
|
865
|
-
to:
|
|
866
|
-
className: ({ isActive:
|
|
1118
|
+
to: lt(p),
|
|
1119
|
+
className: ({ isActive: k }) => b(n, k ? i : ""),
|
|
867
1120
|
...l,
|
|
868
1121
|
children: o
|
|
869
1122
|
}
|
|
@@ -873,18 +1126,18 @@ function oo({
|
|
|
873
1126
|
"a",
|
|
874
1127
|
{
|
|
875
1128
|
className: `no-underline ${n}`,
|
|
876
|
-
href:
|
|
1129
|
+
href: lt(p),
|
|
877
1130
|
rel: "noreferrer noopener",
|
|
878
|
-
target:
|
|
1131
|
+
target: h,
|
|
879
1132
|
...l,
|
|
880
1133
|
children: [
|
|
881
1134
|
o,
|
|
882
|
-
|
|
1135
|
+
y && /* @__PURE__ */ r(U, { icon: "i-mdi:arrow-top-right", size: "0.9em", className: "smart-link__mark", style: { marginLeft: 5 } })
|
|
883
1136
|
]
|
|
884
1137
|
}
|
|
885
1138
|
);
|
|
886
1139
|
}
|
|
887
|
-
function
|
|
1140
|
+
function Y({
|
|
888
1141
|
prepend: t,
|
|
889
1142
|
append: e,
|
|
890
1143
|
children: o,
|
|
@@ -894,31 +1147,31 @@ function J({
|
|
|
894
1147
|
...c
|
|
895
1148
|
}) {
|
|
896
1149
|
let s = {};
|
|
897
|
-
const { pages: l = [] } =
|
|
1150
|
+
const { pages: l = [] } = Dt(), d = l.find((h) => h.id === c.link), m = !o || ge.Children.toArray(o).every((h) => h === null);
|
|
898
1151
|
c.link && (s = {
|
|
899
|
-
component:
|
|
1152
|
+
component: So,
|
|
900
1153
|
to: d?.path || c.link,
|
|
901
1154
|
useRouterLink: !0
|
|
902
1155
|
});
|
|
903
|
-
const
|
|
1156
|
+
const u = ae();
|
|
904
1157
|
return /* @__PURE__ */ w(
|
|
905
|
-
|
|
1158
|
+
Bo,
|
|
906
1159
|
{
|
|
907
|
-
className:
|
|
1160
|
+
className: b("base-card card", { dark: i, "border-transparent": !a }, n),
|
|
908
1161
|
sx: {
|
|
909
|
-
borderColor:
|
|
1162
|
+
borderColor: u.palette.divider
|
|
910
1163
|
},
|
|
911
1164
|
...s,
|
|
912
|
-
...
|
|
1165
|
+
...I(c, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
|
|
913
1166
|
children: [
|
|
914
1167
|
t,
|
|
915
|
-
!
|
|
1168
|
+
!m && /* @__PURE__ */ r("div", { className: "card__body", children: o }),
|
|
916
1169
|
e
|
|
917
1170
|
]
|
|
918
1171
|
}
|
|
919
1172
|
);
|
|
920
1173
|
}
|
|
921
|
-
const
|
|
1174
|
+
const Bo = C(f)`
|
|
922
1175
|
&.base-card {
|
|
923
1176
|
text-align: left;
|
|
924
1177
|
border-width: 1px;
|
|
@@ -943,9 +1196,9 @@ function K({
|
|
|
943
1196
|
}) {
|
|
944
1197
|
return /* @__PURE__ */ w(Q, { children: [
|
|
945
1198
|
e && /* @__PURE__ */ r(
|
|
946
|
-
|
|
1199
|
+
j,
|
|
947
1200
|
{
|
|
948
|
-
className:
|
|
1201
|
+
className: b("card__title text-gray-800", "dark:text-gray-50"),
|
|
949
1202
|
component: "h5",
|
|
950
1203
|
variant: "h5",
|
|
951
1204
|
gutterBottom: !0,
|
|
@@ -955,9 +1208,9 @@ function K({
|
|
|
955
1208
|
}
|
|
956
1209
|
),
|
|
957
1210
|
n && /* @__PURE__ */ r(
|
|
958
|
-
|
|
1211
|
+
j,
|
|
959
1212
|
{
|
|
960
|
-
className:
|
|
1213
|
+
className: b("card__description", "text-gray-500", "dark:text-gray-400"),
|
|
961
1214
|
component: "div",
|
|
962
1215
|
variant: "body1",
|
|
963
1216
|
gutterBottom: !0,
|
|
@@ -968,7 +1221,7 @@ function K({
|
|
|
968
1221
|
)
|
|
969
1222
|
] });
|
|
970
1223
|
}
|
|
971
|
-
function
|
|
1224
|
+
function No({
|
|
972
1225
|
image: t,
|
|
973
1226
|
title: e,
|
|
974
1227
|
description: o,
|
|
@@ -979,16 +1232,16 @@ function ro({
|
|
|
979
1232
|
descriptionProps: s = {},
|
|
980
1233
|
actions: l,
|
|
981
1234
|
align: d,
|
|
982
|
-
...
|
|
1235
|
+
...m
|
|
983
1236
|
}) {
|
|
984
|
-
const
|
|
1237
|
+
const u = xt(t), h = F(L(t), 540);
|
|
985
1238
|
return /* @__PURE__ */ w(
|
|
986
|
-
|
|
1239
|
+
Ro,
|
|
987
1240
|
{
|
|
988
1241
|
className: "card-article",
|
|
989
|
-
...
|
|
990
|
-
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children:
|
|
991
|
-
|
|
1242
|
+
...m,
|
|
1243
|
+
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children: u && t ? /* @__PURE__ */ r(
|
|
1244
|
+
f,
|
|
992
1245
|
{
|
|
993
1246
|
sx: {
|
|
994
1247
|
position: "absolute",
|
|
@@ -1000,13 +1253,13 @@ function ro({
|
|
|
1000
1253
|
alignItems: "center",
|
|
1001
1254
|
justifyContent: "center"
|
|
1002
1255
|
},
|
|
1003
|
-
children: /* @__PURE__ */ r(
|
|
1256
|
+
children: /* @__PURE__ */ r(U, { icon: t, color: "primary.main" })
|
|
1004
1257
|
}
|
|
1005
|
-
) :
|
|
1258
|
+
) : h && /* @__PURE__ */ r(
|
|
1006
1259
|
"img",
|
|
1007
1260
|
{
|
|
1008
1261
|
className: "card__image",
|
|
1009
|
-
src:
|
|
1262
|
+
src: h,
|
|
1010
1263
|
...n,
|
|
1011
1264
|
alt: n.alt || i?.filename || "card-image",
|
|
1012
1265
|
width: i?.naturalWidth,
|
|
@@ -1026,12 +1279,12 @@ function ro({
|
|
|
1026
1279
|
descriptionProps: s
|
|
1027
1280
|
}
|
|
1028
1281
|
) : null,
|
|
1029
|
-
l?.length ? /* @__PURE__ */ r(
|
|
1282
|
+
l?.length ? /* @__PURE__ */ r(O, { align: d, actions: l, className: "mt-4" }) : null
|
|
1030
1283
|
]
|
|
1031
1284
|
}
|
|
1032
1285
|
);
|
|
1033
1286
|
}
|
|
1034
|
-
const
|
|
1287
|
+
const Ro = C(Y)`
|
|
1035
1288
|
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
1036
1289
|
&:hover {
|
|
1037
1290
|
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
@@ -1065,8 +1318,8 @@ const io = _(J)`
|
|
|
1065
1318
|
height: 100%;
|
|
1066
1319
|
object-position: top center;
|
|
1067
1320
|
}
|
|
1068
|
-
`,
|
|
1069
|
-
function
|
|
1321
|
+
`, Ct = "section";
|
|
1322
|
+
function St({
|
|
1070
1323
|
title: t,
|
|
1071
1324
|
image: e,
|
|
1072
1325
|
imageMeta: o,
|
|
@@ -1077,9 +1330,9 @@ function yt({
|
|
|
1077
1330
|
className: s = "",
|
|
1078
1331
|
...l
|
|
1079
1332
|
}) {
|
|
1080
|
-
return /* @__PURE__ */ w(
|
|
1333
|
+
return /* @__PURE__ */ w(Mo, { className: b("card", `list-type-${c}`, s), align: a, ...l, children: [
|
|
1081
1334
|
e && /* @__PURE__ */ r(
|
|
1082
|
-
|
|
1335
|
+
U,
|
|
1083
1336
|
{
|
|
1084
1337
|
icon: e,
|
|
1085
1338
|
color: "primary.main",
|
|
@@ -1088,17 +1341,17 @@ function yt({
|
|
|
1088
1341
|
}
|
|
1089
1342
|
),
|
|
1090
1343
|
t || n ? /* @__PURE__ */ r(K, { align: a, title: t, description: n }) : null,
|
|
1091
|
-
i?.length ? /* @__PURE__ */ r(
|
|
1344
|
+
i?.length ? /* @__PURE__ */ r(O, { align: a, actions: i, className: "mt-4" }) : null
|
|
1092
1345
|
] });
|
|
1093
1346
|
}
|
|
1094
|
-
const
|
|
1347
|
+
const Mo = C(Y)`
|
|
1095
1348
|
padding: 5vw 4vw;
|
|
1096
1349
|
box-sizing: border-box;
|
|
1097
1350
|
/* min-height: 320px; */
|
|
1098
1351
|
color: inherit !important;
|
|
1099
1352
|
border-radius: 0.5rem;
|
|
1100
1353
|
/* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
|
|
1101
|
-
@media (max-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1354
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values[Ct]}px) {
|
|
1102
1355
|
padding: 1.5rem 2rem;
|
|
1103
1356
|
}
|
|
1104
1357
|
@media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
|
|
@@ -1146,13 +1399,13 @@ const ao = _(J)`
|
|
|
1146
1399
|
}
|
|
1147
1400
|
}
|
|
1148
1401
|
|
|
1149
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1402
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[Ct]}px) {
|
|
1150
1403
|
padding: 2rem 2rem;
|
|
1151
1404
|
text-align: left;
|
|
1152
1405
|
box-sizing: border-box;
|
|
1153
1406
|
}
|
|
1154
1407
|
`;
|
|
1155
|
-
function
|
|
1408
|
+
function Io({
|
|
1156
1409
|
image: t,
|
|
1157
1410
|
title: e,
|
|
1158
1411
|
description: o,
|
|
@@ -1163,16 +1416,16 @@ function so({
|
|
|
1163
1416
|
descriptionProps: s = {},
|
|
1164
1417
|
actions: l,
|
|
1165
1418
|
align: d,
|
|
1166
|
-
...
|
|
1419
|
+
...m
|
|
1167
1420
|
}) {
|
|
1168
|
-
const
|
|
1421
|
+
const u = xt(t), h = F(L(t), 540);
|
|
1169
1422
|
return /* @__PURE__ */ w(
|
|
1170
|
-
|
|
1423
|
+
Lo,
|
|
1171
1424
|
{
|
|
1172
1425
|
className: "card-article",
|
|
1173
|
-
...
|
|
1174
|
-
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children:
|
|
1175
|
-
|
|
1426
|
+
...m,
|
|
1427
|
+
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children: u && t ? /* @__PURE__ */ r(
|
|
1428
|
+
f,
|
|
1176
1429
|
{
|
|
1177
1430
|
sx: {
|
|
1178
1431
|
position: "absolute",
|
|
@@ -1184,14 +1437,14 @@ function so({
|
|
|
1184
1437
|
alignItems: "center",
|
|
1185
1438
|
justifyContent: "center"
|
|
1186
1439
|
},
|
|
1187
|
-
children: /* @__PURE__ */ r(
|
|
1440
|
+
children: /* @__PURE__ */ r(U, { icon: t, color: "primary.main" })
|
|
1188
1441
|
}
|
|
1189
|
-
) :
|
|
1190
|
-
|
|
1442
|
+
) : h && /* @__PURE__ */ r(
|
|
1443
|
+
f,
|
|
1191
1444
|
{
|
|
1192
1445
|
component: "img",
|
|
1193
1446
|
className: "card__image",
|
|
1194
|
-
src:
|
|
1447
|
+
src: h,
|
|
1195
1448
|
...n,
|
|
1196
1449
|
alt: n.alt || i?.filename || "card-image",
|
|
1197
1450
|
style: { width: "100%", height: "100%", objectFit: a || "contain", objectPosition: "center" },
|
|
@@ -1216,12 +1469,12 @@ function so({
|
|
|
1216
1469
|
descriptionProps: s
|
|
1217
1470
|
}
|
|
1218
1471
|
) : null,
|
|
1219
|
-
l?.length ? /* @__PURE__ */ r(
|
|
1472
|
+
l?.length ? /* @__PURE__ */ r(O, { align: d, actions: l, className: "mt-4" }) : null
|
|
1220
1473
|
]
|
|
1221
1474
|
}
|
|
1222
1475
|
);
|
|
1223
1476
|
}
|
|
1224
|
-
const
|
|
1477
|
+
const Lo = C(Y)`
|
|
1225
1478
|
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
1226
1479
|
&:hover {
|
|
1227
1480
|
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
@@ -1245,8 +1498,8 @@ const lo = _(J)`
|
|
|
1245
1498
|
.card__image {
|
|
1246
1499
|
max-height: 60px;
|
|
1247
1500
|
}
|
|
1248
|
-
`,
|
|
1249
|
-
function
|
|
1501
|
+
`, Bt = "section";
|
|
1502
|
+
function Eo({
|
|
1250
1503
|
title: t,
|
|
1251
1504
|
image: e,
|
|
1252
1505
|
imageMeta: o,
|
|
@@ -1257,15 +1510,15 @@ function co({
|
|
|
1257
1510
|
className: s = "",
|
|
1258
1511
|
...l
|
|
1259
1512
|
}) {
|
|
1260
|
-
return /* @__PURE__ */ r(
|
|
1261
|
-
e && /* @__PURE__ */ r(
|
|
1262
|
-
/* @__PURE__ */ w(
|
|
1513
|
+
return /* @__PURE__ */ r(Ao, { className: b("card", s), ...l, children: /* @__PURE__ */ w(f, { className: "flex items-center", children: [
|
|
1514
|
+
e && /* @__PURE__ */ r(U, { icon: e, color: "primary.main", size: n, imageMeta: o }),
|
|
1515
|
+
/* @__PURE__ */ w(f, { className: "flex-1 ml-4", children: [
|
|
1263
1516
|
/* @__PURE__ */ r(K, { align: c, title: t, description: i }),
|
|
1264
|
-
/* @__PURE__ */ r(
|
|
1517
|
+
/* @__PURE__ */ r(O, { align: c, actions: a, className: "mt-4" })
|
|
1265
1518
|
] })
|
|
1266
1519
|
] }) });
|
|
1267
1520
|
}
|
|
1268
|
-
const
|
|
1521
|
+
const Ao = C(Y)`
|
|
1269
1522
|
padding: 5vw 4vw;
|
|
1270
1523
|
text-align: left;
|
|
1271
1524
|
box-sizing: border-box;
|
|
@@ -1273,7 +1526,7 @@ const mo = _(J)`
|
|
|
1273
1526
|
color: inherit !important;
|
|
1274
1527
|
border-radius: 0.5rem;
|
|
1275
1528
|
/* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
|
|
1276
|
-
@media (max-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1529
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values[Bt]}px) {
|
|
1277
1530
|
padding: 1.5rem 2rem;
|
|
1278
1531
|
}
|
|
1279
1532
|
@media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
|
|
@@ -1318,13 +1571,13 @@ const mo = _(J)`
|
|
|
1318
1571
|
}
|
|
1319
1572
|
}
|
|
1320
1573
|
|
|
1321
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1574
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[Bt]}px) {
|
|
1322
1575
|
padding: 2rem 2rem;
|
|
1323
1576
|
text-align: left;
|
|
1324
1577
|
box-sizing: border-box;
|
|
1325
1578
|
}
|
|
1326
1579
|
`;
|
|
1327
|
-
function
|
|
1580
|
+
function Po({
|
|
1328
1581
|
title: t,
|
|
1329
1582
|
titleProps: e = {},
|
|
1330
1583
|
description: o,
|
|
@@ -1336,8 +1589,8 @@ function po({
|
|
|
1336
1589
|
hoverStyle: l,
|
|
1337
1590
|
...d
|
|
1338
1591
|
}) {
|
|
1339
|
-
return /* @__PURE__ */ w(
|
|
1340
|
-
i && /* @__PURE__ */ r(
|
|
1592
|
+
return /* @__PURE__ */ w(Wo, { className: b("card-simple", c, `hover-style__${l}`), align: s, ...d, children: [
|
|
1593
|
+
i && /* @__PURE__ */ r(U, { icon: i, color: "primary.main", imageMeta: a }),
|
|
1341
1594
|
t || o ? /* @__PURE__ */ r(
|
|
1342
1595
|
K,
|
|
1343
1596
|
{
|
|
@@ -1350,7 +1603,7 @@ function po({
|
|
|
1350
1603
|
) : null
|
|
1351
1604
|
] });
|
|
1352
1605
|
}
|
|
1353
|
-
const
|
|
1606
|
+
const Wo = C(Y)`
|
|
1354
1607
|
.card__title {
|
|
1355
1608
|
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1356
1609
|
a {
|
|
@@ -1447,17 +1700,17 @@ const uo = _(J)`
|
|
|
1447
1700
|
}
|
|
1448
1701
|
}
|
|
1449
1702
|
`;
|
|
1450
|
-
function
|
|
1703
|
+
function jo({ type: t = "default", ...e }) {
|
|
1451
1704
|
const n = {
|
|
1452
|
-
article:
|
|
1453
|
-
simple:
|
|
1454
|
-
news:
|
|
1455
|
-
default:
|
|
1456
|
-
wall:
|
|
1457
|
-
}[t] ||
|
|
1458
|
-
return /* @__PURE__ */ r(n, { ...t === "news" ? e :
|
|
1459
|
-
}
|
|
1460
|
-
function
|
|
1705
|
+
article: No,
|
|
1706
|
+
simple: Po,
|
|
1707
|
+
news: Eo,
|
|
1708
|
+
default: St,
|
|
1709
|
+
wall: Io
|
|
1710
|
+
}[t] || St;
|
|
1711
|
+
return /* @__PURE__ */ r(n, { ...t === "news" ? e : I(e, "iconSize") });
|
|
1712
|
+
}
|
|
1713
|
+
function zo({
|
|
1461
1714
|
list: t = [],
|
|
1462
1715
|
align: e = "top",
|
|
1463
1716
|
cards: o,
|
|
@@ -1468,42 +1721,42 @@ function ho({
|
|
|
1468
1721
|
iconColor: s,
|
|
1469
1722
|
className: l = "",
|
|
1470
1723
|
type: d = "default",
|
|
1471
|
-
dark:
|
|
1472
|
-
textAlign:
|
|
1473
|
-
hoverStyle:
|
|
1474
|
-
...
|
|
1724
|
+
dark: m = !1,
|
|
1725
|
+
textAlign: u = "left",
|
|
1726
|
+
hoverStyle: h,
|
|
1727
|
+
...p
|
|
1475
1728
|
}) {
|
|
1476
1729
|
return /* @__PURE__ */ r(
|
|
1477
|
-
|
|
1730
|
+
Jt,
|
|
1478
1731
|
{
|
|
1479
1732
|
type: d,
|
|
1480
|
-
className:
|
|
1733
|
+
className: b("card-list py-1", l, "items-stretch"),
|
|
1481
1734
|
col: a,
|
|
1482
1735
|
gap: c,
|
|
1483
1736
|
align: e,
|
|
1484
|
-
...
|
|
1485
|
-
children: o || t.map((
|
|
1486
|
-
|
|
1737
|
+
...p,
|
|
1738
|
+
children: o || t.map((y) => /* @__PURE__ */ r(
|
|
1739
|
+
jo,
|
|
1487
1740
|
{
|
|
1488
1741
|
borderColor: n,
|
|
1489
1742
|
iconColor: s,
|
|
1490
1743
|
type: d,
|
|
1491
1744
|
listType: i,
|
|
1492
|
-
dark:
|
|
1493
|
-
...
|
|
1494
|
-
align:
|
|
1745
|
+
dark: m,
|
|
1746
|
+
...y,
|
|
1747
|
+
align: u,
|
|
1495
1748
|
style: c === 0 && t.length > 1 ? {
|
|
1496
1749
|
borderRadius: 0,
|
|
1497
1750
|
marginRight: "-1px",
|
|
1498
1751
|
marginBottom: "-1px"
|
|
1499
1752
|
} : {}
|
|
1500
1753
|
},
|
|
1501
|
-
|
|
1754
|
+
y.id
|
|
1502
1755
|
))
|
|
1503
1756
|
}
|
|
1504
1757
|
);
|
|
1505
1758
|
}
|
|
1506
|
-
const
|
|
1759
|
+
const Fo = [
|
|
1507
1760
|
"align",
|
|
1508
1761
|
"cards",
|
|
1509
1762
|
"list",
|
|
@@ -1515,11 +1768,11 @@ const fo = [
|
|
|
1515
1768
|
"type",
|
|
1516
1769
|
"textAlign"
|
|
1517
1770
|
];
|
|
1518
|
-
function
|
|
1519
|
-
const o =
|
|
1771
|
+
function E(t, e) {
|
|
1772
|
+
const o = pt(t, e), n = I(t, e);
|
|
1520
1773
|
return [o, n];
|
|
1521
1774
|
}
|
|
1522
|
-
const
|
|
1775
|
+
const To = C(rt)`
|
|
1523
1776
|
a .card {
|
|
1524
1777
|
color: #404040;
|
|
1525
1778
|
cursor: pointer;
|
|
@@ -1535,14 +1788,14 @@ const xo = _(nt)`
|
|
|
1535
1788
|
color: #404040;
|
|
1536
1789
|
}
|
|
1537
1790
|
`;
|
|
1538
|
-
function
|
|
1539
|
-
const [o, n] =
|
|
1540
|
-
return /* @__PURE__ */ w(
|
|
1541
|
-
Object.keys(o).length > 0 && /* @__PURE__ */ r(
|
|
1542
|
-
/* @__PURE__ */ r(
|
|
1791
|
+
function Oo({ className: t, ...e }) {
|
|
1792
|
+
const [o, n] = E(e, nt), [i, a] = E(n, Fo);
|
|
1793
|
+
return /* @__PURE__ */ w(To, { className: b("section--card-list", t), type: e.type, ...a, children: [
|
|
1794
|
+
Object.keys(o).length > 0 && /* @__PURE__ */ r(ot, { center: !0, ...o, className: "mb-[2.5vw]" }),
|
|
1795
|
+
/* @__PURE__ */ r(zo, { ...i, dark: !!e.dark })
|
|
1543
1796
|
] });
|
|
1544
1797
|
}
|
|
1545
|
-
const
|
|
1798
|
+
const Uo = C(Oo)`
|
|
1546
1799
|
.card__description {
|
|
1547
1800
|
white-space: pre-wrap;
|
|
1548
1801
|
}
|
|
@@ -1558,29 +1811,29 @@ const yo = _(bo)`
|
|
|
1558
1811
|
background: inherit !important;
|
|
1559
1812
|
}
|
|
1560
1813
|
`;
|
|
1561
|
-
function
|
|
1562
|
-
const [{ editing: o }, n] =
|
|
1563
|
-
...
|
|
1814
|
+
function Do({ section: t, ...e }) {
|
|
1815
|
+
const [{ editing: o }, n] = E(e, et), i = S(() => ({
|
|
1816
|
+
...I(n, ["listBorder", "list", "iconSize", "imageSize"]),
|
|
1564
1817
|
list: n.list?.map((a) => ({
|
|
1565
|
-
...
|
|
1818
|
+
...I(a, "icon", "iconColor"),
|
|
1566
1819
|
image: ["news", "simple", "default"].includes(n.type) && a.icon ? a.icon : a.image,
|
|
1567
|
-
actions: a.actions?.map?.((c) => /* @__PURE__ */ r(
|
|
1820
|
+
actions: a.actions?.map?.((c) => /* @__PURE__ */ r(Gt, { ...c, editing: o }, c.id)),
|
|
1568
1821
|
border: n.listBorder,
|
|
1569
1822
|
iconSize: n.iconSize,
|
|
1570
1823
|
imageSize: n.imageSize,
|
|
1571
1824
|
hoverStyle: n.hoverStyle
|
|
1572
1825
|
}))
|
|
1573
1826
|
}), [n]);
|
|
1574
|
-
return /* @__PURE__ */ r(
|
|
1827
|
+
return /* @__PURE__ */ r(Uo, { style: o ? { pointerEvents: "none" } : {}, ...i });
|
|
1575
1828
|
}
|
|
1576
|
-
function
|
|
1829
|
+
function Go({
|
|
1577
1830
|
properties: t,
|
|
1578
1831
|
section: e,
|
|
1579
1832
|
locale: o,
|
|
1580
1833
|
dev: n
|
|
1581
1834
|
}) {
|
|
1582
1835
|
return e?.config?.componentId ? /* @__PURE__ */ r(
|
|
1583
|
-
|
|
1836
|
+
$e,
|
|
1584
1837
|
{
|
|
1585
1838
|
instanceId: e.id,
|
|
1586
1839
|
componentId: e.config.componentId,
|
|
@@ -1592,14 +1845,14 @@ function vo({
|
|
|
1592
1845
|
dev: n
|
|
1593
1846
|
}
|
|
1594
1847
|
) : /* @__PURE__ */ r(
|
|
1595
|
-
|
|
1848
|
+
f,
|
|
1596
1849
|
{
|
|
1597
1850
|
sx: {
|
|
1598
1851
|
textAlign: "center",
|
|
1599
1852
|
py: 2
|
|
1600
1853
|
},
|
|
1601
1854
|
children: /* @__PURE__ */ r(
|
|
1602
|
-
|
|
1855
|
+
j,
|
|
1603
1856
|
{
|
|
1604
1857
|
variant: "caption",
|
|
1605
1858
|
sx: {
|
|
@@ -1611,7 +1864,7 @@ function vo({
|
|
|
1611
1864
|
}
|
|
1612
1865
|
);
|
|
1613
1866
|
}
|
|
1614
|
-
function
|
|
1867
|
+
function Ho({
|
|
1615
1868
|
src: t,
|
|
1616
1869
|
dataId: e,
|
|
1617
1870
|
isEdit: o = !1,
|
|
@@ -1620,7 +1873,7 @@ function ko({
|
|
|
1620
1873
|
}
|
|
1621
1874
|
}) {
|
|
1622
1875
|
return /* @__PURE__ */ r(
|
|
1623
|
-
|
|
1876
|
+
Le,
|
|
1624
1877
|
{
|
|
1625
1878
|
isEdit: o,
|
|
1626
1879
|
embedId: e,
|
|
@@ -1632,12 +1885,12 @@ function ko({
|
|
|
1632
1885
|
}
|
|
1633
1886
|
);
|
|
1634
1887
|
}
|
|
1635
|
-
function
|
|
1636
|
-
const [c, s] =
|
|
1637
|
-
return /* @__PURE__ */ w(
|
|
1638
|
-
Object.keys(c).length > 0 && /* @__PURE__ */ r(
|
|
1888
|
+
function Vo({ dataId: t, src: e, actions: o, center: n, onLoad: i, ...a }) {
|
|
1889
|
+
const [c, s] = E(a, nt);
|
|
1890
|
+
return /* @__PURE__ */ w(rt, { ...s, children: [
|
|
1891
|
+
Object.keys(c).length > 0 && /* @__PURE__ */ r(ot, { center: n, ...c }),
|
|
1639
1892
|
/* @__PURE__ */ r(
|
|
1640
|
-
|
|
1893
|
+
Ho,
|
|
1641
1894
|
{
|
|
1642
1895
|
dataId: t,
|
|
1643
1896
|
src: e,
|
|
@@ -1645,10 +1898,10 @@ function _o({ dataId: t, src: e, actions: o, center: n, onLoad: i, ...a }) {
|
|
|
1645
1898
|
height: a.iframeHeight ? `${a.iframeHeight}px` : "100%"
|
|
1646
1899
|
}
|
|
1647
1900
|
),
|
|
1648
|
-
/* @__PURE__ */ r(
|
|
1901
|
+
/* @__PURE__ */ r(O, { actions: o, center: n })
|
|
1649
1902
|
] });
|
|
1650
1903
|
}
|
|
1651
|
-
const
|
|
1904
|
+
const mr = {
|
|
1652
1905
|
src: "",
|
|
1653
1906
|
embedUrl: "",
|
|
1654
1907
|
title: "",
|
|
@@ -1659,21 +1912,95 @@ const An = {
|
|
|
1659
1912
|
config: {},
|
|
1660
1913
|
id: ""
|
|
1661
1914
|
};
|
|
1662
|
-
function
|
|
1663
|
-
const i = `${e}-${n.locale}`, [{ editing: a }, c] =
|
|
1664
|
-
return
|
|
1665
|
-
d && d.onInit(() =>
|
|
1666
|
-
}, [d]),
|
|
1667
|
-
const
|
|
1668
|
-
|
|
1669
|
-
}, [d, c.config]), o ? /* @__PURE__ */ r(
|
|
1670
|
-
}
|
|
1671
|
-
const
|
|
1915
|
+
function Jo({ section: t, id: e, src: o, ...n }) {
|
|
1916
|
+
const i = `${e}-${n.locale}`, [{ editing: a }, c] = E(n, et), s = ht({}), l = JSON.parse(JSON.stringify(c)), { message: d } = Re(i, "server"), m = Me(JSON.parse(JSON.stringify(c.config) || "{}"));
|
|
1917
|
+
return J(() => {
|
|
1918
|
+
d && d.onInit(() => m.current);
|
|
1919
|
+
}, [d]), J(() => {
|
|
1920
|
+
const u = JSON.parse(JSON.stringify(c.config) || "{}");
|
|
1921
|
+
Ie(s.current, u) || (s.current = u, d?.send("config-set", u));
|
|
1922
|
+
}, [d, c.config]), o ? /* @__PURE__ */ r(Vo, { ...l, dataId: i, src: o, style: a ? { pointerEvents: "none" } : {} }) : /* @__PURE__ */ r(Yo, { children: 'Please set the "src" attribute for this block' });
|
|
1923
|
+
}
|
|
1924
|
+
const Yo = C("div")`
|
|
1672
1925
|
user-select: none;
|
|
1673
1926
|
color: #999;
|
|
1674
1927
|
padding: 8px;
|
|
1675
1928
|
height: 200px;
|
|
1676
|
-
`,
|
|
1929
|
+
`, Nt = {
|
|
1930
|
+
width: "1px",
|
|
1931
|
+
style: "solid",
|
|
1932
|
+
color: "divider"
|
|
1933
|
+
};
|
|
1934
|
+
function Yt(t) {
|
|
1935
|
+
return typeof t == "string" && t.startsWith("custom:");
|
|
1936
|
+
}
|
|
1937
|
+
function Ko(t) {
|
|
1938
|
+
if (!Yt(t)) return Nt;
|
|
1939
|
+
try {
|
|
1940
|
+
const e = t?.substring(7) || "", [o = "1px", n = "solid", ...i] = e.split(" ");
|
|
1941
|
+
return {
|
|
1942
|
+
width: o,
|
|
1943
|
+
style: n,
|
|
1944
|
+
color: i.join(" ") || "divider"
|
|
1945
|
+
};
|
|
1946
|
+
} catch {
|
|
1947
|
+
return Nt;
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
function Xo(t) {
|
|
1951
|
+
if (!t || t === "none")
|
|
1952
|
+
return { border: "none" };
|
|
1953
|
+
if (Yt(t)) {
|
|
1954
|
+
const { width: e, style: o, color: n } = Ko(t);
|
|
1955
|
+
return {
|
|
1956
|
+
border: "none",
|
|
1957
|
+
// 避免和下面的详细属性冲突
|
|
1958
|
+
borderWidth: e,
|
|
1959
|
+
borderStyle: o,
|
|
1960
|
+
borderColor: n
|
|
1961
|
+
};
|
|
1962
|
+
}
|
|
1963
|
+
return {};
|
|
1964
|
+
}
|
|
1965
|
+
function Kt(t) {
|
|
1966
|
+
return typeof t == "string" && t.startsWith("custom:");
|
|
1967
|
+
}
|
|
1968
|
+
function qo(t) {
|
|
1969
|
+
if (!Kt(t)) return "0";
|
|
1970
|
+
try {
|
|
1971
|
+
return t?.substring(7) || "0";
|
|
1972
|
+
} catch {
|
|
1973
|
+
return "0";
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
function Qo(t) {
|
|
1977
|
+
return !t || t === "none" ? { borderRadius: 0 } : Kt(t) ? { borderRadius: qo(t) } : {};
|
|
1978
|
+
}
|
|
1979
|
+
function Zo({ ref: t = void 0, type: e, sx: o, children: n, ...i }) {
|
|
1980
|
+
const a = [{}, ...Array.isArray(o) ? o : [o]];
|
|
1981
|
+
return z(() => {
|
|
1982
|
+
const s = Tt(e);
|
|
1983
|
+
return s ? (a.push({
|
|
1984
|
+
img: {
|
|
1985
|
+
objectFit: "contain !important",
|
|
1986
|
+
bgcolor: (l) => l.palette.background.default,
|
|
1987
|
+
borderRadius: "0 !important",
|
|
1988
|
+
position: "relative"
|
|
1989
|
+
}
|
|
1990
|
+
}), /* @__PURE__ */ r(ut, { type: e, children: n })) : /* @__PURE__ */ r(
|
|
1991
|
+
f,
|
|
1992
|
+
{
|
|
1993
|
+
component: s ? ut : "div",
|
|
1994
|
+
ref: t,
|
|
1995
|
+
sx: a,
|
|
1996
|
+
...i,
|
|
1997
|
+
...s ? { type: e } : {},
|
|
1998
|
+
children: n
|
|
1999
|
+
}
|
|
2000
|
+
);
|
|
2001
|
+
}, [e, n, a])();
|
|
2002
|
+
}
|
|
2003
|
+
const tn = "none", en = "none", on = "transparent", nn = "center", rn = "start", an = "none", sn = "none", ln = 12, cn = ({
|
|
1677
2004
|
gridSettings: t,
|
|
1678
2005
|
section: e,
|
|
1679
2006
|
index: o,
|
|
@@ -1681,7 +2008,7 @@ const Co = _("div")`
|
|
|
1681
2008
|
simulateMode: i = "desktop",
|
|
1682
2009
|
isBackground: a
|
|
1683
2010
|
}) => {
|
|
1684
|
-
const c = t?.[i] ?? {}, s = c[e.id], l =
|
|
2011
|
+
const c = t?.[i] ?? {}, s = c[e.id], l = dn(c);
|
|
1685
2012
|
return {
|
|
1686
2013
|
i: e.id,
|
|
1687
2014
|
static: e?.locked || a,
|
|
@@ -1702,51 +2029,82 @@ const Co = _("div")`
|
|
|
1702
2029
|
maxH: 1,
|
|
1703
2030
|
maxY: l
|
|
1704
2031
|
};
|
|
1705
|
-
},
|
|
1706
|
-
const { dev: e, id: o, section: n, onBlockRender: i } = t, a = e?.mode, c =
|
|
1707
|
-
|
|
2032
|
+
}, dn = (t) => Object.values(t).reduce((e, o) => Math.max(e, o.y || 0), 0) || 0, un = (t) => {
|
|
2033
|
+
const { dev: e, id: o, section: n, onBlockRender: i } = t, a = e?.mode, c = se((g) => g.breakpoints.down("sm")), { t: s } = Ee(), { sections: l, sectionIds: d, config: m } = n, {
|
|
2034
|
+
columns: u = ln,
|
|
2035
|
+
gridSettings: h,
|
|
2036
|
+
gap: p,
|
|
2037
|
+
padding: y,
|
|
2038
|
+
background: x,
|
|
2039
|
+
alignContent: v,
|
|
2040
|
+
justifyContent: k,
|
|
2041
|
+
border: _,
|
|
2042
|
+
borderRadius: M,
|
|
2043
|
+
ignoreMaxWidth: B
|
|
2044
|
+
} = m || {}, it = S(() => {
|
|
2045
|
+
const $ = W({
|
|
1708
2046
|
type: "layoutBlockGap",
|
|
1709
|
-
value:
|
|
2047
|
+
value: p ?? tn,
|
|
1710
2048
|
format: "sx"
|
|
1711
|
-
}),
|
|
1712
|
-
|
|
1713
|
-
gap: Object.keys(
|
|
2049
|
+
}), T = {
|
|
2050
|
+
...$,
|
|
2051
|
+
gap: Object.keys($.gap).reduce((N, A) => (N[A] = -$.gap[A], N), {})
|
|
1714
2052
|
};
|
|
1715
2053
|
return {
|
|
1716
|
-
item:
|
|
1717
|
-
container:
|
|
2054
|
+
item: $,
|
|
2055
|
+
container: T
|
|
1718
2056
|
};
|
|
1719
|
-
}, [
|
|
2057
|
+
}, [p]), Xt = S(() => W({
|
|
1720
2058
|
type: "layoutBlockPadding",
|
|
1721
|
-
value:
|
|
2059
|
+
value: y ?? en,
|
|
1722
2060
|
format: "sx"
|
|
1723
|
-
}), [
|
|
2061
|
+
}), [y]), at = S(() => W({
|
|
1724
2062
|
type: "layoutBlockAlignContent",
|
|
1725
|
-
|
|
1726
|
-
|
|
2063
|
+
value: v ?? nn,
|
|
2064
|
+
format: "sx"
|
|
2065
|
+
}), [v]), st = S(() => W({
|
|
2066
|
+
type: "layoutBlockJustifyContent",
|
|
2067
|
+
value: k ?? rn,
|
|
1727
2068
|
format: "sx"
|
|
1728
|
-
}), [
|
|
1729
|
-
|
|
1730
|
-
|
|
2069
|
+
}), [k]), qt = S(() => {
|
|
2070
|
+
const g = _ ?? an, $ = Xo(g);
|
|
2071
|
+
return Object.keys($).length > 0 ? $ : W({
|
|
2072
|
+
type: "layoutBlockBorder",
|
|
2073
|
+
value: g,
|
|
2074
|
+
format: "sx"
|
|
2075
|
+
});
|
|
2076
|
+
}, [_]), Qt = z(
|
|
2077
|
+
(g) => Tt(_) ? /* @__PURE__ */ r(Zo, { type: _, ...g }) : /* @__PURE__ */ r(f, { ...g }),
|
|
2078
|
+
[_]
|
|
2079
|
+
), Zt = S(() => {
|
|
2080
|
+
const g = M ?? sn, $ = Qo(g);
|
|
2081
|
+
return Object.keys($).length > 0 ? $ : W({
|
|
2082
|
+
type: "layoutBlockBorderRadius",
|
|
2083
|
+
value: g,
|
|
2084
|
+
format: "sx"
|
|
2085
|
+
});
|
|
2086
|
+
}, [M]), bt = z(
|
|
2087
|
+
(g, $ = !1, T = 0) => {
|
|
2088
|
+
if (!i || !g || !g.component || g.visibility === "hidden")
|
|
1731
2089
|
return null;
|
|
1732
|
-
const N =
|
|
1733
|
-
gridSettings:
|
|
1734
|
-
section:
|
|
1735
|
-
index:
|
|
1736
|
-
columns:
|
|
2090
|
+
const N = cn({
|
|
2091
|
+
gridSettings: h,
|
|
2092
|
+
section: g,
|
|
2093
|
+
index: T,
|
|
2094
|
+
columns: u,
|
|
1737
2095
|
simulateMode: c ? "mobile" : "desktop",
|
|
1738
|
-
isBackground:
|
|
1739
|
-
}),
|
|
2096
|
+
isBackground: $
|
|
2097
|
+
}), A = N?.x ?? 0, D = N?.y ?? 0, G = N?.w ?? u, te = N?.h ?? 1, ee = N?.maxY ?? 0, oe = !!n?.config?.backgroundSectionId;
|
|
1740
2098
|
return /* @__PURE__ */ r(
|
|
1741
|
-
|
|
2099
|
+
f,
|
|
1742
2100
|
{
|
|
1743
|
-
className:
|
|
2101
|
+
className: $ ? "layout-block-background" : "layout-block-component",
|
|
1744
2102
|
sx: {
|
|
1745
2103
|
// 背景元素和普通元素都使用 grid 布局
|
|
1746
|
-
|
|
2104
|
+
...$ ? {
|
|
1747
2105
|
// 背景元素覆盖整个网格区域
|
|
1748
2106
|
gridColumn: "1 / -1",
|
|
1749
|
-
gridRow: `1 / ${
|
|
2107
|
+
gridRow: `1 / ${ee + 1}`,
|
|
1750
2108
|
zIndex: 0,
|
|
1751
2109
|
width: "100%",
|
|
1752
2110
|
height: "100%",
|
|
@@ -1757,55 +2115,68 @@ const Co = _("div")`
|
|
|
1757
2115
|
} : {
|
|
1758
2116
|
position: "relative",
|
|
1759
2117
|
// 使用 grid 定位普通元素
|
|
1760
|
-
gridColumn: `${
|
|
2118
|
+
gridColumn: `${A + 1} / span ${G}`,
|
|
1761
2119
|
// hasBackground 的话,不再 + 1,因为 background 会占用第一行
|
|
1762
|
-
gridRow: `${
|
|
2120
|
+
gridRow: `${D + (oe ? 0 : 1)} / span ${te}`,
|
|
1763
2121
|
zIndex: 1,
|
|
1764
2122
|
// Ensure content is above background
|
|
1765
2123
|
minWidth: 0,
|
|
1766
2124
|
// 防止内容撑开网格项
|
|
1767
2125
|
minHeight: 0,
|
|
1768
2126
|
// 防止内容撑开网格项
|
|
1769
|
-
overflow:
|
|
1770
|
-
// 防止子内容溢出网格项
|
|
2127
|
+
// overflow: 'hidden', // 防止子内容溢出网格项
|
|
1771
2128
|
// 只给非第一行添加上边距
|
|
1772
|
-
...
|
|
2129
|
+
...D > 0 ? { mt: it?.item?.gap } : {},
|
|
1773
2130
|
// 只给非第一列添加左边距
|
|
1774
|
-
...
|
|
2131
|
+
...A > 0 ? { ml: it?.item?.gap } : {},
|
|
1775
2132
|
"& > .BlockBase-root": {
|
|
1776
2133
|
height: "100%",
|
|
1777
2134
|
width: "100%",
|
|
1778
|
-
boxSizing: "border-box"
|
|
2135
|
+
boxSizing: "border-box",
|
|
2136
|
+
position: "relative",
|
|
2137
|
+
...at,
|
|
2138
|
+
...st
|
|
1779
2139
|
}
|
|
1780
2140
|
}
|
|
1781
2141
|
},
|
|
1782
2142
|
children: i({
|
|
1783
|
-
id:
|
|
1784
|
-
type:
|
|
2143
|
+
id: g.id,
|
|
2144
|
+
type: g.component,
|
|
1785
2145
|
config: {},
|
|
1786
2146
|
section: {
|
|
1787
|
-
...
|
|
2147
|
+
...g
|
|
1788
2148
|
},
|
|
1789
2149
|
mode: a
|
|
1790
2150
|
})
|
|
1791
2151
|
},
|
|
1792
|
-
|
|
2152
|
+
g.id
|
|
1793
2153
|
);
|
|
1794
2154
|
},
|
|
1795
|
-
[
|
|
1796
|
-
|
|
2155
|
+
[
|
|
2156
|
+
o,
|
|
2157
|
+
a,
|
|
2158
|
+
i,
|
|
2159
|
+
h,
|
|
2160
|
+
u,
|
|
2161
|
+
c,
|
|
2162
|
+
it,
|
|
2163
|
+
at,
|
|
2164
|
+
st,
|
|
2165
|
+
B
|
|
2166
|
+
]
|
|
2167
|
+
), { backgroundElements: yt, contentElements: vt } = S(() => {
|
|
1797
2168
|
if (!d || !d.length || !l || !Object.keys(l).length)
|
|
1798
2169
|
return { backgroundElements: [], contentElements: [] };
|
|
1799
|
-
const
|
|
1800
|
-
return d?.forEach((
|
|
1801
|
-
const
|
|
1802
|
-
if (!
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1805
|
-
}), { backgroundElements:
|
|
1806
|
-
}, [
|
|
1807
|
-
return a === "draft" && !
|
|
1808
|
-
|
|
2170
|
+
const g = [], $ = [];
|
|
2171
|
+
return d?.forEach((T, N) => {
|
|
2172
|
+
const A = l[T];
|
|
2173
|
+
if (!A) return;
|
|
2174
|
+
const D = n?.config?.backgroundSectionId === T, G = bt(A, D, N);
|
|
2175
|
+
G && (D ? g.push(G) : $.push(G));
|
|
2176
|
+
}), { backgroundElements: g, contentElements: $ };
|
|
2177
|
+
}, [bt, l, d]);
|
|
2178
|
+
return a === "draft" && !yt?.length && !vt?.length ? /* @__PURE__ */ w(
|
|
2179
|
+
f,
|
|
1809
2180
|
{
|
|
1810
2181
|
sx: {
|
|
1811
2182
|
gridColumn: "1 / -1",
|
|
@@ -1815,16 +2186,17 @@ const Co = _("div")`
|
|
|
1815
2186
|
alignItems: "center",
|
|
1816
2187
|
justifyContent: "center",
|
|
1817
2188
|
gap: 2,
|
|
1818
|
-
border: (
|
|
2189
|
+
border: (g) => `2px dashed ${g.palette.divider}`,
|
|
1819
2190
|
borderRadius: 2,
|
|
1820
2191
|
padding: 4,
|
|
1821
2192
|
color: "text.secondary",
|
|
1822
2193
|
textAlign: "center",
|
|
1823
|
-
minHeight: "160px"
|
|
2194
|
+
minHeight: "160px",
|
|
2195
|
+
position: "relative"
|
|
1824
2196
|
},
|
|
1825
2197
|
children: [
|
|
1826
2198
|
/* @__PURE__ */ r(
|
|
1827
|
-
|
|
2199
|
+
f,
|
|
1828
2200
|
{
|
|
1829
2201
|
sx: {
|
|
1830
2202
|
fontSize: "48px",
|
|
@@ -1834,7 +2206,7 @@ const Co = _("div")`
|
|
|
1834
2206
|
}
|
|
1835
2207
|
),
|
|
1836
2208
|
/* @__PURE__ */ r(
|
|
1837
|
-
|
|
2209
|
+
f,
|
|
1838
2210
|
{
|
|
1839
2211
|
sx: {
|
|
1840
2212
|
fontSize: "16px",
|
|
@@ -1845,7 +2217,7 @@ const Co = _("div")`
|
|
|
1845
2217
|
}
|
|
1846
2218
|
),
|
|
1847
2219
|
/* @__PURE__ */ r(
|
|
1848
|
-
|
|
2220
|
+
f,
|
|
1849
2221
|
{
|
|
1850
2222
|
sx: {
|
|
1851
2223
|
opacity: 0.7,
|
|
@@ -1855,7 +2227,7 @@ const Co = _("div")`
|
|
|
1855
2227
|
}
|
|
1856
2228
|
),
|
|
1857
2229
|
/* @__PURE__ */ r(
|
|
1858
|
-
|
|
2230
|
+
f,
|
|
1859
2231
|
{
|
|
1860
2232
|
sx: {
|
|
1861
2233
|
position: "absolute",
|
|
@@ -1865,13 +2237,13 @@ const Co = _("div")`
|
|
|
1865
2237
|
bottom: 0,
|
|
1866
2238
|
pointerEvents: "none",
|
|
1867
2239
|
opacity: 0.1,
|
|
1868
|
-
background: (
|
|
2240
|
+
background: (g) => `
|
|
1869
2241
|
repeating-linear-gradient(
|
|
1870
2242
|
90deg,
|
|
1871
2243
|
transparent,
|
|
1872
|
-
transparent calc(100% / ${
|
|
1873
|
-
${
|
|
1874
|
-
${
|
|
2244
|
+
transparent calc(100% / ${u} - 1px),
|
|
2245
|
+
${g.palette.grey[400]} calc(100% / ${u} - 1px),
|
|
2246
|
+
${g.palette.grey[400]} calc(100% / ${u})
|
|
1875
2247
|
)
|
|
1876
2248
|
`
|
|
1877
2249
|
}
|
|
@@ -1880,31 +2252,47 @@ const Co = _("div")`
|
|
|
1880
2252
|
]
|
|
1881
2253
|
}
|
|
1882
2254
|
) : /* @__PURE__ */ w(
|
|
1883
|
-
|
|
2255
|
+
Qt,
|
|
1884
2256
|
{
|
|
1885
2257
|
sx: {
|
|
1886
2258
|
position: "relative",
|
|
1887
2259
|
display: "grid",
|
|
1888
|
-
gridTemplateColumns: `repeat(${
|
|
2260
|
+
gridTemplateColumns: `repeat(${u}, minmax(0, 1fr))`,
|
|
1889
2261
|
alignItems: "stretch",
|
|
1890
2262
|
width: "100%",
|
|
1891
2263
|
height: "100%",
|
|
1892
2264
|
minWidth: 0,
|
|
1893
|
-
bgcolor:
|
|
2265
|
+
bgcolor: x ?? on,
|
|
1894
2266
|
boxSizing: "border-box",
|
|
1895
|
-
overflow:
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
2267
|
+
// overflow: 'hidden', // Prevent content overflow
|
|
2268
|
+
...Xt,
|
|
2269
|
+
...at,
|
|
2270
|
+
...st
|
|
1899
2271
|
},
|
|
1900
2272
|
children: [
|
|
1901
|
-
|
|
1902
|
-
|
|
2273
|
+
n?.id && /* @__PURE__ */ r(
|
|
2274
|
+
le,
|
|
2275
|
+
{
|
|
2276
|
+
styles: (g) => g.unstable_sx({
|
|
2277
|
+
[`#BlockBase-${n.id}`]: {
|
|
2278
|
+
...B && {
|
|
2279
|
+
maxWidth: "unset !important",
|
|
2280
|
+
px: 0
|
|
2281
|
+
},
|
|
2282
|
+
...qt,
|
|
2283
|
+
...Zt,
|
|
2284
|
+
overflow: "hidden"
|
|
2285
|
+
}
|
|
2286
|
+
})
|
|
2287
|
+
}
|
|
2288
|
+
),
|
|
2289
|
+
yt,
|
|
2290
|
+
vt
|
|
1903
2291
|
]
|
|
1904
2292
|
}
|
|
1905
2293
|
);
|
|
1906
|
-
},
|
|
1907
|
-
function
|
|
2294
|
+
}, mn = ["title", "description", "actions", "badge", "tag", "prepend", "append", "logo"];
|
|
2295
|
+
function pn({
|
|
1908
2296
|
image: t,
|
|
1909
2297
|
imageBorder: e,
|
|
1910
2298
|
imageShadow: o,
|
|
@@ -1913,10 +2301,10 @@ function Ao({
|
|
|
1913
2301
|
fullSizeImage: a,
|
|
1914
2302
|
...c
|
|
1915
2303
|
}) {
|
|
1916
|
-
const [s, l] =
|
|
1917
|
-
|
|
2304
|
+
const [s, l] = E(c, nt), d = Object.keys(s).length > 0 && Object.values(pt(s, mn)).filter(Boolean).length > 0 && /* @__PURE__ */ r(ot, { ...s }), m = Et(t) ? t : /* @__PURE__ */ r(f, { component: "img", src: t, alt: "", className: "block" }), u = ["phone", "macbook"].includes(e), h = t && /* @__PURE__ */ r(
|
|
2305
|
+
f,
|
|
1918
2306
|
{
|
|
1919
|
-
className:
|
|
2307
|
+
className: b(
|
|
1920
2308
|
"section__image",
|
|
1921
2309
|
"m-auto, leading-[1] text-center",
|
|
1922
2310
|
o && "shadow-xl",
|
|
@@ -1927,21 +2315,21 @@ function Ao({
|
|
|
1927
2315
|
borderRadius: 2,
|
|
1928
2316
|
overflow: "hidden",
|
|
1929
2317
|
// FIXME: Screenshot 组件无法设置最外层 div 的样式,只能通过父元素设置
|
|
1930
|
-
"> div":
|
|
2318
|
+
"> div": u ? { width: "100%", video: { borderRadius: "0 !important" } } : void 0
|
|
1931
2319
|
},
|
|
1932
|
-
children:
|
|
2320
|
+
children: u ? (
|
|
1933
2321
|
// @ts-ignore
|
|
1934
|
-
/* @__PURE__ */ r(
|
|
1935
|
-
) :
|
|
2322
|
+
/* @__PURE__ */ r(ut, { type: e, sx: { width: "100%" }, children: m })
|
|
2323
|
+
) : m
|
|
1936
2324
|
}
|
|
1937
2325
|
);
|
|
1938
2326
|
return /* @__PURE__ */ r(
|
|
1939
|
-
|
|
2327
|
+
rt,
|
|
1940
2328
|
{
|
|
1941
|
-
className:
|
|
2329
|
+
className: b(
|
|
1942
2330
|
"section--block",
|
|
1943
2331
|
n,
|
|
1944
|
-
a && !i &&
|
|
2332
|
+
a && !i && ct`
|
|
1945
2333
|
.section-bg {
|
|
1946
2334
|
height: 80%;
|
|
1947
2335
|
}
|
|
@@ -1950,10 +2338,10 @@ function Ao({
|
|
|
1950
2338
|
...l,
|
|
1951
2339
|
boxProps: a ? { sx: { padding: 0, overflow: "hidden" } } : void 0,
|
|
1952
2340
|
children: /* @__PURE__ */ r(
|
|
1953
|
-
|
|
2341
|
+
Jt,
|
|
1954
2342
|
{
|
|
1955
2343
|
col: t ? 2 : 1,
|
|
1956
|
-
className: a ?
|
|
2344
|
+
className: a ? ct`
|
|
1957
2345
|
display: flex;
|
|
1958
2346
|
flex-direction: column;
|
|
1959
2347
|
|
|
@@ -1968,18 +2356,18 @@ function Ao({
|
|
|
1968
2356
|
}
|
|
1969
2357
|
` : void 0,
|
|
1970
2358
|
children: i ? /* @__PURE__ */ w(Q, { children: [
|
|
1971
|
-
|
|
2359
|
+
h,
|
|
1972
2360
|
d
|
|
1973
2361
|
] }) : /* @__PURE__ */ w(Q, { children: [
|
|
1974
2362
|
d,
|
|
1975
|
-
|
|
2363
|
+
h
|
|
1976
2364
|
] })
|
|
1977
2365
|
}
|
|
1978
2366
|
)
|
|
1979
2367
|
}
|
|
1980
2368
|
);
|
|
1981
2369
|
}
|
|
1982
|
-
const
|
|
2370
|
+
const hn = [
|
|
1983
2371
|
/youtu\.be\/([^#&?]{11})/,
|
|
1984
2372
|
// youtu.be/<id>
|
|
1985
2373
|
/\?v=([^#&?]{11})/,
|
|
@@ -1991,51 +2379,51 @@ const zo = [
|
|
|
1991
2379
|
/\/v\/([^#&?]{11})/
|
|
1992
2380
|
// /v/<id>
|
|
1993
2381
|
];
|
|
1994
|
-
function
|
|
2382
|
+
function gn(t) {
|
|
1995
2383
|
if (/youtu\.?be/.test(t))
|
|
1996
|
-
for (const e of
|
|
2384
|
+
for (const e of hn) {
|
|
1997
2385
|
const o = e.exec(t)?.[1];
|
|
1998
2386
|
if (o)
|
|
1999
2387
|
return o;
|
|
2000
2388
|
}
|
|
2001
2389
|
}
|
|
2002
|
-
function
|
|
2003
|
-
const e =
|
|
2390
|
+
function fn(t) {
|
|
2391
|
+
const e = gn(t);
|
|
2004
2392
|
if (e)
|
|
2005
2393
|
return `https://youtube.com/embed/${e}`;
|
|
2006
2394
|
}
|
|
2007
|
-
function
|
|
2008
|
-
return
|
|
2395
|
+
function xn({ src: t }) {
|
|
2396
|
+
return J(() => {
|
|
2009
2397
|
import("@lottiefiles/lottie-player");
|
|
2010
2398
|
}, []), /* @__PURE__ */ r("lottie-player", { autoplay: !0, loop: !0, mode: "normal", src: t });
|
|
2011
2399
|
}
|
|
2012
|
-
function
|
|
2400
|
+
function bn(t) {
|
|
2013
2401
|
return /* @__PURE__ */ r(
|
|
2014
|
-
|
|
2402
|
+
f,
|
|
2015
2403
|
{
|
|
2016
2404
|
sx: {
|
|
2017
2405
|
maxHeight: 400,
|
|
2018
2406
|
overflow: "hidden auto"
|
|
2019
2407
|
},
|
|
2020
|
-
children: /* @__PURE__ */ r(
|
|
2408
|
+
children: /* @__PURE__ */ r(Ae, { ...t })
|
|
2021
2409
|
}
|
|
2022
2410
|
);
|
|
2023
2411
|
}
|
|
2024
|
-
function
|
|
2025
|
-
const e =
|
|
2412
|
+
function yn({ url: t }) {
|
|
2413
|
+
const e = ht(null), o = 495, [n, i] = Z(
|
|
2026
2414
|
e.current ? e.current.offsetWidth * 0.5625 : o
|
|
2027
|
-
), a =
|
|
2415
|
+
), a = z(() => {
|
|
2028
2416
|
const c = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : o;
|
|
2029
2417
|
return i(Math.floor(s * c));
|
|
2030
2418
|
}, []);
|
|
2031
|
-
return
|
|
2419
|
+
return J(() => {
|
|
2032
2420
|
window.addEventListener("resize", a);
|
|
2033
2421
|
const c = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : o;
|
|
2034
2422
|
return i(Math.floor(s * c)), function() {
|
|
2035
2423
|
window.removeEventListener("resize", a);
|
|
2036
2424
|
};
|
|
2037
2425
|
}, [n, a]), /* @__PURE__ */ r(
|
|
2038
|
-
|
|
2426
|
+
f,
|
|
2039
2427
|
{
|
|
2040
2428
|
component: "iframe",
|
|
2041
2429
|
ref: e,
|
|
@@ -2052,7 +2440,7 @@ function Oo({ url: t }) {
|
|
|
2052
2440
|
}
|
|
2053
2441
|
);
|
|
2054
2442
|
}
|
|
2055
|
-
const
|
|
2443
|
+
const pr = {
|
|
2056
2444
|
image: "https://www.arcblock.io/static/ead0cabde7f2b7ff34db8f3e8ceca271/afc4b/builder.png",
|
|
2057
2445
|
badge: "Develop · Deploy · Run",
|
|
2058
2446
|
title: "The Future is Here: Blockchain and Decentralized Application Development",
|
|
@@ -2063,11 +2451,11 @@ const zn = {
|
|
|
2063
2451
|
actions: void 0,
|
|
2064
2452
|
hasImage: !0,
|
|
2065
2453
|
center: !1
|
|
2066
|
-
},
|
|
2454
|
+
}, vn = C(pn)`
|
|
2067
2455
|
.section__description {
|
|
2068
2456
|
}
|
|
2069
2457
|
`;
|
|
2070
|
-
function
|
|
2458
|
+
function wn({
|
|
2071
2459
|
hasImage: t,
|
|
2072
2460
|
fullSizeImage: e,
|
|
2073
2461
|
boxed: o,
|
|
@@ -2078,32 +2466,32 @@ function Fo({
|
|
|
2078
2466
|
section: s,
|
|
2079
2467
|
...l
|
|
2080
2468
|
}) {
|
|
2081
|
-
const [{ editing: d },
|
|
2082
|
-
let
|
|
2083
|
-
t || (
|
|
2084
|
-
let
|
|
2085
|
-
return
|
|
2086
|
-
|
|
2469
|
+
const [{ editing: d }, m] = E({ ...l, boxed: e ? void 0 : o }, et);
|
|
2470
|
+
let u = kn(m.image, n, e, i, a, c);
|
|
2471
|
+
t || (u = null);
|
|
2472
|
+
let h = null;
|
|
2473
|
+
return m.actions && (h = m.actions?.map?.((p, y) => /* @__PURE__ */ r(Gt, { ...p, editing: d }, y))), /* @__PURE__ */ r(
|
|
2474
|
+
vn,
|
|
2087
2475
|
{
|
|
2088
|
-
...
|
|
2476
|
+
...m,
|
|
2089
2477
|
style: d ? { pointerEvents: "none" } : {},
|
|
2090
|
-
image:
|
|
2478
|
+
image: u,
|
|
2091
2479
|
fullSizeImage: t && e,
|
|
2092
|
-
actions:
|
|
2480
|
+
actions: h
|
|
2093
2481
|
}
|
|
2094
2482
|
);
|
|
2095
2483
|
}
|
|
2096
|
-
function
|
|
2484
|
+
function kn(t, e, o, n, i, a) {
|
|
2097
2485
|
if (t) {
|
|
2098
2486
|
if (t.endsWith(".json"))
|
|
2099
|
-
return /* @__PURE__ */ r(
|
|
2487
|
+
return /* @__PURE__ */ r(xn, { src: t });
|
|
2100
2488
|
if (t.indexOf("twitter.com") !== -1)
|
|
2101
|
-
return /* @__PURE__ */ r(
|
|
2102
|
-
const c =
|
|
2489
|
+
return /* @__PURE__ */ r(bn, { sourceType: "url", url: t });
|
|
2490
|
+
const c = fn(t);
|
|
2103
2491
|
if (c)
|
|
2104
|
-
return /* @__PURE__ */ r(
|
|
2492
|
+
return /* @__PURE__ */ r(yn, { url: c });
|
|
2105
2493
|
const { naturalWidth: s, naturalHeight: l, filename: d } = n || {};
|
|
2106
|
-
if (
|
|
2494
|
+
if (H(t))
|
|
2107
2495
|
return /* @__PURE__ */ r(
|
|
2108
2496
|
"video",
|
|
2109
2497
|
{
|
|
@@ -2119,23 +2507,23 @@ function Go(t, e, o, n, i, a) {
|
|
|
2119
2507
|
width: "100%",
|
|
2120
2508
|
height: "100%"
|
|
2121
2509
|
},
|
|
2122
|
-
poster:
|
|
2123
|
-
children: /* @__PURE__ */ r("source", { src:
|
|
2510
|
+
poster: F(L(e), o ? 1200 : 540, i),
|
|
2511
|
+
children: /* @__PURE__ */ r("source", { src: L(t), type: wo(t) })
|
|
2124
2512
|
},
|
|
2125
2513
|
t
|
|
2126
2514
|
);
|
|
2127
|
-
const
|
|
2515
|
+
const m = i === "quality" ? 1 : 0.6;
|
|
2128
2516
|
return /* @__PURE__ */ r(
|
|
2129
|
-
|
|
2517
|
+
jt,
|
|
2130
2518
|
{
|
|
2131
|
-
src:
|
|
2519
|
+
src: L(t),
|
|
2132
2520
|
sizesAttr: {
|
|
2133
|
-
sm: 600 *
|
|
2134
|
-
md: 450 *
|
|
2135
|
-
lg: 540 *
|
|
2521
|
+
sm: 600 * m,
|
|
2522
|
+
md: 450 * m,
|
|
2523
|
+
lg: 540 * m,
|
|
2136
2524
|
...o && {
|
|
2137
|
-
md: 900 *
|
|
2138
|
-
lg: 1200 *
|
|
2525
|
+
md: 900 * m,
|
|
2526
|
+
lg: 1200 * m
|
|
2139
2527
|
}
|
|
2140
2528
|
},
|
|
2141
2529
|
width: s && `${s}px`,
|
|
@@ -2148,57 +2536,57 @@ function Go(t, e, o, n, i, a) {
|
|
|
2148
2536
|
}
|
|
2149
2537
|
return null;
|
|
2150
2538
|
}
|
|
2151
|
-
const
|
|
2152
|
-
function
|
|
2539
|
+
const hr = ["production", "draft"];
|
|
2540
|
+
function gr({ mode: t, version: e } = {}) {
|
|
2153
2541
|
const o = e && typeof e == "number" ? { mode: t, version: e } : { mode: t };
|
|
2154
|
-
return
|
|
2542
|
+
return gt.get(`/api/${ft()}/pages`, { params: o }).then((n) => n.data);
|
|
2155
2543
|
}
|
|
2156
|
-
function
|
|
2157
|
-
return
|
|
2544
|
+
function fr({ mode: t, routes: e }) {
|
|
2545
|
+
return gt.post(`/api/${ft()}/pages/publish`, { mode: t, routes: e }).then((o) => o.data);
|
|
2158
2546
|
}
|
|
2159
|
-
function
|
|
2547
|
+
function _n({
|
|
2160
2548
|
locale: t,
|
|
2161
2549
|
sort: e,
|
|
2162
2550
|
page: o,
|
|
2163
2551
|
limit: n,
|
|
2164
2552
|
mode: i
|
|
2165
2553
|
} = {}) {
|
|
2166
|
-
return
|
|
2554
|
+
return gt.get(`/api/${ft()}/pages/toc`, { params: { locale: t, sort: e, page: o, limit: n, mode: i } }).then((a) => a.data);
|
|
2167
2555
|
}
|
|
2168
|
-
const
|
|
2556
|
+
const xr = {
|
|
2169
2557
|
style: "list",
|
|
2170
2558
|
sort: "-updatedAt"
|
|
2171
|
-
},
|
|
2172
|
-
function
|
|
2173
|
-
const [{ editing: i, locale: a }, c] =
|
|
2174
|
-
if (!
|
|
2175
|
-
|
|
2559
|
+
}, Rt = 20;
|
|
2560
|
+
function $n({ style: t, sort: e, section: o, ...n }) {
|
|
2561
|
+
const [{ editing: i, locale: a }, c] = E(n, et), [s, l] = E(c, nt), [d, m] = Z(), u = ht(!1), h = Pe(), p = ye(), y = z(async () => {
|
|
2562
|
+
if (!u.current) {
|
|
2563
|
+
u.current = !0, h();
|
|
2176
2564
|
try {
|
|
2177
|
-
const
|
|
2178
|
-
|
|
2179
|
-
list: (
|
|
2180
|
-
total:
|
|
2565
|
+
const x = d ? Math.floor(d.list.length / Rt) + 1 : 1, { list: v, total: k } = await _n({ locale: a, sort: e, page: x, limit: Rt });
|
|
2566
|
+
m((_) => ({
|
|
2567
|
+
list: (_?.list ?? []).concat(v),
|
|
2568
|
+
total: k
|
|
2181
2569
|
}));
|
|
2182
2570
|
} finally {
|
|
2183
|
-
|
|
2571
|
+
u.current = !1, h();
|
|
2184
2572
|
}
|
|
2185
2573
|
}
|
|
2186
|
-
}, [d, a, e,
|
|
2187
|
-
return
|
|
2188
|
-
|
|
2189
|
-
}), /* @__PURE__ */ w(
|
|
2190
|
-
Object.keys(s).length > 0 && /* @__PURE__ */ r(
|
|
2574
|
+
}, [d, a, e, h]);
|
|
2575
|
+
return We(() => {
|
|
2576
|
+
y();
|
|
2577
|
+
}), /* @__PURE__ */ w(rt, { ...l, sx: i ? { pointerEvents: "none" } : {}, children: [
|
|
2578
|
+
Object.keys(s).length > 0 && /* @__PURE__ */ r(ot, { ...s }),
|
|
2191
2579
|
d ? /* @__PURE__ */ w(Q, { children: [
|
|
2192
2580
|
/* @__PURE__ */ r(
|
|
2193
|
-
|
|
2581
|
+
wt,
|
|
2194
2582
|
{
|
|
2195
2583
|
container: !0,
|
|
2196
2584
|
spacing: 2,
|
|
2197
2585
|
sx: {
|
|
2198
2586
|
justifyContent: "center"
|
|
2199
2587
|
},
|
|
2200
|
-
children: d?.list.map((
|
|
2201
|
-
|
|
2588
|
+
children: d?.list.map((x) => /* @__PURE__ */ r(
|
|
2589
|
+
wt,
|
|
2202
2590
|
{
|
|
2203
2591
|
size: {
|
|
2204
2592
|
xs: 12,
|
|
@@ -2206,62 +2594,62 @@ function Ho({ style: t, sort: e, section: o, ...n }) {
|
|
|
2206
2594
|
md: t === "card" ? 3 : 12
|
|
2207
2595
|
},
|
|
2208
2596
|
children: /* @__PURE__ */ w(
|
|
2209
|
-
|
|
2597
|
+
Cn,
|
|
2210
2598
|
{
|
|
2211
2599
|
elevation: 0,
|
|
2212
|
-
className:
|
|
2213
|
-
onClick: i ? void 0 : () =>
|
|
2600
|
+
className: b(t === "card" && "style-card"),
|
|
2601
|
+
onClick: i ? void 0 : () => p(x.slug),
|
|
2214
2602
|
children: [
|
|
2215
|
-
!!
|
|
2216
|
-
|
|
2603
|
+
!!x.image && /* @__PURE__ */ r(
|
|
2604
|
+
ue,
|
|
2217
2605
|
{
|
|
2218
2606
|
component: "img",
|
|
2219
2607
|
alt: "",
|
|
2220
|
-
image:
|
|
2608
|
+
image: F(L(x.image), 540),
|
|
2221
2609
|
loading: "lazy"
|
|
2222
2610
|
}
|
|
2223
2611
|
),
|
|
2224
|
-
/* @__PURE__ */ w(
|
|
2225
|
-
/* @__PURE__ */ r(
|
|
2226
|
-
/* @__PURE__ */ r(
|
|
2612
|
+
/* @__PURE__ */ w(me, { children: [
|
|
2613
|
+
/* @__PURE__ */ r(j, { variant: "h6", component: "div", className: Mt, children: x.title || x.id }),
|
|
2614
|
+
/* @__PURE__ */ r(j, { variant: "body2", className: Mt, children: x.description })
|
|
2227
2615
|
] })
|
|
2228
2616
|
]
|
|
2229
2617
|
}
|
|
2230
2618
|
)
|
|
2231
2619
|
},
|
|
2232
|
-
|
|
2620
|
+
x.id
|
|
2233
2621
|
))
|
|
2234
2622
|
}
|
|
2235
2623
|
),
|
|
2236
2624
|
/* @__PURE__ */ r(
|
|
2237
|
-
|
|
2625
|
+
f,
|
|
2238
2626
|
{
|
|
2239
2627
|
sx: {
|
|
2240
2628
|
textAlign: "center",
|
|
2241
2629
|
mt: 2
|
|
2242
2630
|
},
|
|
2243
|
-
children: d.total > d.list.length ? /* @__PURE__ */ r(
|
|
2631
|
+
children: d.total > d.list.length ? /* @__PURE__ */ r(V, { variant: "outlined", color: "secondary", onClick: y, loading: u.current, children: "More" }) : /* @__PURE__ */ r(V, { variant: "outlined", color: "secondary", disabled: !0, children: "No More" })
|
|
2244
2632
|
}
|
|
2245
2633
|
)
|
|
2246
2634
|
] }) : /* @__PURE__ */ r(
|
|
2247
|
-
|
|
2635
|
+
f,
|
|
2248
2636
|
{
|
|
2249
2637
|
sx: {
|
|
2250
2638
|
p: 2,
|
|
2251
2639
|
textAlign: "center"
|
|
2252
2640
|
},
|
|
2253
|
-
children: /* @__PURE__ */ r(
|
|
2641
|
+
children: /* @__PURE__ */ r(de, { size: 24 })
|
|
2254
2642
|
}
|
|
2255
2643
|
)
|
|
2256
2644
|
] });
|
|
2257
2645
|
}
|
|
2258
|
-
const
|
|
2646
|
+
const Mt = ct`
|
|
2259
2647
|
display: -webkit-box;
|
|
2260
2648
|
-webkit-box-orient: vertical;
|
|
2261
2649
|
-webkit-line-clamp: 2;
|
|
2262
2650
|
overflow: hidden;
|
|
2263
2651
|
text-overflow: ellipsis;
|
|
2264
|
-
`,
|
|
2652
|
+
`, Cn = C(ce)`
|
|
2265
2653
|
border: 1px solid #e0e0e0;
|
|
2266
2654
|
background-color: transparent;
|
|
2267
2655
|
cursor: pointer;
|
|
@@ -2281,15 +2669,15 @@ const _t = it`
|
|
|
2281
2669
|
max-height: 50vw;
|
|
2282
2670
|
}
|
|
2283
2671
|
}
|
|
2284
|
-
`,
|
|
2285
|
-
iframe:
|
|
2286
|
-
section:
|
|
2287
|
-
"section-card-list":
|
|
2288
|
-
toc:
|
|
2289
|
-
"custom-component":
|
|
2290
|
-
"layout-block":
|
|
2672
|
+
`, Sn = {
|
|
2673
|
+
iframe: Jo,
|
|
2674
|
+
section: wn,
|
|
2675
|
+
"section-card-list": Do,
|
|
2676
|
+
toc: $n,
|
|
2677
|
+
"custom-component": Go,
|
|
2678
|
+
"layout-block": un
|
|
2291
2679
|
};
|
|
2292
|
-
function
|
|
2680
|
+
function Bn({
|
|
2293
2681
|
id: t,
|
|
2294
2682
|
type: e,
|
|
2295
2683
|
mode: o,
|
|
@@ -2299,46 +2687,46 @@ function Jo({
|
|
|
2299
2687
|
page: c,
|
|
2300
2688
|
...s
|
|
2301
2689
|
}) {
|
|
2302
|
-
const l =
|
|
2303
|
-
const { height:
|
|
2304
|
-
return e === "layout-block" && (
|
|
2305
|
-
const
|
|
2690
|
+
const l = Sn[e], { getPageMetaStyle: d } = so(), m = S(() => {
|
|
2691
|
+
const { height: p, ...y } = n;
|
|
2692
|
+
return e === "layout-block" && (y.onBlockRender = (x) => {
|
|
2693
|
+
const v = {
|
|
2306
2694
|
...n?.dev,
|
|
2307
|
-
...
|
|
2308
|
-
}, { defaultLocale:
|
|
2309
|
-
...
|
|
2310
|
-
...
|
|
2311
|
-
dev:
|
|
2312
|
-
}, { locale:
|
|
2313
|
-
let
|
|
2314
|
-
return
|
|
2315
|
-
|
|
2695
|
+
...x?.config?.dev
|
|
2696
|
+
}, { defaultLocale: k } = v, _ = {
|
|
2697
|
+
...pt(n, ["locale", "editing"]),
|
|
2698
|
+
...x?.config,
|
|
2699
|
+
dev: v
|
|
2700
|
+
}, { locale: M } = _;
|
|
2701
|
+
let B = c?.dataSource?.[x?.id]?.[M];
|
|
2702
|
+
return he(B) && (B = c?.dataSource?.[x?.id]?.[k ?? "en"]), /* @__PURE__ */ r(
|
|
2703
|
+
Bn,
|
|
2316
2704
|
{
|
|
2317
|
-
...
|
|
2705
|
+
...x,
|
|
2318
2706
|
config: {
|
|
2319
|
-
...
|
|
2320
|
-
...
|
|
2321
|
-
|
|
2707
|
+
...x?.section?.properties,
|
|
2708
|
+
...B,
|
|
2709
|
+
..._
|
|
2322
2710
|
},
|
|
2323
2711
|
page: c,
|
|
2324
2712
|
ignorePageMetaStyle: !0
|
|
2325
2713
|
}
|
|
2326
2714
|
);
|
|
2327
|
-
}),
|
|
2328
|
-
}, [n, e]),
|
|
2329
|
-
const
|
|
2330
|
-
return e !== "custom-component" && (
|
|
2331
|
-
}, [n.height, a, e, d]),
|
|
2332
|
-
return
|
|
2333
|
-
}
|
|
2334
|
-
function
|
|
2715
|
+
}), y;
|
|
2716
|
+
}, [n, e]), u = S(() => {
|
|
2717
|
+
const p = {};
|
|
2718
|
+
return e !== "custom-component" && (p.height = n.height), p.sx = a ? void 0 : d("sx"), p.id = `BlockBase-${t}`, p;
|
|
2719
|
+
}, [n.height, a, e, d]), h = l && /* @__PURE__ */ r(l, { mode: o, ...m, id: t, section: i });
|
|
2720
|
+
return h ? /* @__PURE__ */ r(lo, { ...s, ...u, children: h }) : /* @__PURE__ */ r(Nn, { type: e });
|
|
2721
|
+
}
|
|
2722
|
+
function Nn({ type: t }) {
|
|
2335
2723
|
return /* @__PURE__ */ r(
|
|
2336
|
-
|
|
2724
|
+
f,
|
|
2337
2725
|
{
|
|
2338
2726
|
sx: {
|
|
2339
2727
|
p: 2
|
|
2340
2728
|
},
|
|
2341
|
-
children: /* @__PURE__ */ w(
|
|
2729
|
+
children: /* @__PURE__ */ w(pe, { icon: /* @__PURE__ */ r(ne, {}), color: "error", children: [
|
|
2342
2730
|
"Unsupported Block `",
|
|
2343
2731
|
t,
|
|
2344
2732
|
"`"
|
|
@@ -2347,13 +2735,13 @@ function Ko({ type: t }) {
|
|
|
2347
2735
|
);
|
|
2348
2736
|
}
|
|
2349
2737
|
export {
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2738
|
+
Bn as B,
|
|
2739
|
+
mr as I,
|
|
2740
|
+
dr as P,
|
|
2741
|
+
hr as S,
|
|
2742
|
+
xr as T,
|
|
2743
|
+
cr as a,
|
|
2744
|
+
pr as b,
|
|
2745
|
+
gr as g,
|
|
2746
|
+
fr as p
|
|
2359
2747
|
};
|