@blocklet/pages-kit-inner-components 0.6.23 → 0.6.24

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