@blocklet/pages-kit-inner-components 0.4.118 → 0.4.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/add-component.js +1 -1
- package/lib/cjs/chunks/{array-CeBRUkLo.js → array-DOclwySd.js} +16 -16
- package/lib/cjs/chunks/{home-DpGYsQ1r.js → home-DdhcZ60U.js} +2 -2
- package/lib/cjs/chunks/{publish-button-DXSPVfAC.js → publish-button-DrP2fRq-.js} +1 -1
- package/lib/cjs/home.js +1 -1
- package/lib/es/add-component.js +1 -1
- package/lib/es/chunks/{array-k2vnX696.js → array-BXCsMjKT.js} +293 -288
- package/lib/es/chunks/{home-DAvVGR8Z.js → home-Cqrxr0ko.js} +2 -2
- package/lib/es/chunks/{publish-button-CxrZAPBF.js → publish-button-BFkn3oDY.js} +2 -2
- package/lib/es/home.js +2 -2
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as i, jsxs as w, Fragment as
|
|
1
|
+
import { jsx as i, jsxs as w, Fragment as J } from "react/jsx-runtime";
|
|
2
2
|
import "@mui/icons-material";
|
|
3
|
-
import { Box as b, styled as Tt, Typography as C, Container as Et, Stack as Ot, useTheme as At, createTheme as Ft, ThemeProvider as
|
|
4
|
-
import Jt, { createContext as xt, useMemo as W, useCallback as
|
|
5
|
-
import
|
|
3
|
+
import { Box as b, styled as Tt, Typography as C, Container as Et, Stack as Ot, useTheme as At, createTheme as Ft, ThemeProvider as Ut, Card as Vt, CircularProgress as Dt, Grid as st, CardMedia as Ht, CardContent as Yt } from "@mui/material";
|
|
4
|
+
import Jt, { createContext as xt, useMemo as W, useCallback as M, useContext as bt, Fragment as Mt, isValidElement as yt, useState as K, useEffect as E, useRef as tt } from "react";
|
|
5
|
+
import G from "lodash/keyBy";
|
|
6
6
|
import { e as j, b as N, E as Kt, h as et, l as ot } from "./state-Dz3GnGWC.js";
|
|
7
7
|
import { AIForm as lt, AIFormResult as ct } from "@blocklet/ai-runtime/components";
|
|
8
8
|
import { deepmerge as Gt } from "@mui/utils";
|
|
@@ -10,7 +10,7 @@ import nt from "lodash/pick";
|
|
|
10
10
|
import { ErrorBoundary as Xt } from "react-error-boundary";
|
|
11
11
|
import qt from "@blocklet/pages-kit/builtin/markdown/markdown-renderer";
|
|
12
12
|
import { useColorConvert as wt } from "@blocklet/pages-kit/contexts/color";
|
|
13
|
-
import { cx as g, css as
|
|
13
|
+
import { cx as g, css as q } from "@emotion/css";
|
|
14
14
|
import { materialDark as Qt } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
15
15
|
import { useTheme as vt, styled as _ } from "@arcblock/ux/lib/Theme";
|
|
16
16
|
import Zt from "@arcblock/react-hooks/lib/useBrowser";
|
|
@@ -23,9 +23,9 @@ import { Icon as $t } from "@iconify-icon/react";
|
|
|
23
23
|
import ne from "@arcblock/ux/lib/Screenshot";
|
|
24
24
|
import { Link as re, NavLink as ie, useNavigate as ae } from "react-router-dom";
|
|
25
25
|
import se from "@arcblock/ux/lib/Button";
|
|
26
|
-
import
|
|
27
|
-
import { join as
|
|
28
|
-
import { withoutTrailingSlash as
|
|
26
|
+
import Q from "is-uri";
|
|
27
|
+
import { join as H } from "pathe";
|
|
28
|
+
import { withoutTrailingSlash as X, isRelative as le, parseURL as ce } from "ufo";
|
|
29
29
|
import { useMessage as de } from "@blocklet/embed/message";
|
|
30
30
|
import { useLatest as me } from "ahooks";
|
|
31
31
|
import pe from "lodash/isEqual";
|
|
@@ -95,9 +95,9 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
|
|
|
95
95
|
value: "large",
|
|
96
96
|
sx: { px: { xs: 7.5, md: 10, lg: 12.5, xl: 15 } }
|
|
97
97
|
}
|
|
98
|
-
],
|
|
99
|
-
const
|
|
100
|
-
return `${e}${
|
|
98
|
+
], Y = (t, e, r) => {
|
|
99
|
+
const n = t.breakpoints.values[r];
|
|
100
|
+
return `${e}${n ? ` (${n}px)` : ""}`;
|
|
101
101
|
}, we = [
|
|
102
102
|
{
|
|
103
103
|
title: "100%",
|
|
@@ -105,7 +105,7 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
|
|
|
105
105
|
sx: { maxWidth: "100%" }
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
|
-
title: (t) =>
|
|
108
|
+
title: (t) => Y(t, "Small", "sm"),
|
|
109
109
|
value: "sm",
|
|
110
110
|
sx: {
|
|
111
111
|
maxWidth: (t) => t.breakpoints.values.sm,
|
|
@@ -114,17 +114,17 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
|
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
|
-
title: (t) =>
|
|
117
|
+
title: (t) => Y(t, "Normal", "md"),
|
|
118
118
|
value: "md",
|
|
119
119
|
sx: { maxWidth: (t) => t.breakpoints.values.md, width: "100%", mx: "auto" }
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
|
-
title: (t) =>
|
|
122
|
+
title: (t) => Y(t, "Large", "lg"),
|
|
123
123
|
value: "lg",
|
|
124
124
|
sx: { maxWidth: (t) => t.breakpoints.values.lg, width: "100%", mx: "auto" }
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
|
-
title: (t) =>
|
|
127
|
+
title: (t) => Y(t, "Extra Large", "xl"),
|
|
128
128
|
value: "xl",
|
|
129
129
|
sx: { maxWidth: (t) => t.breakpoints.values.xl, width: "100%", mx: "auto" }
|
|
130
130
|
},
|
|
@@ -137,7 +137,7 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
|
|
|
137
137
|
mx: "auto"
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
], ve =
|
|
140
|
+
], ve = G(xe, "value"), ke = G(be, "value"), _e = G(ye, "value"), $e = G(we, "value"), Ne = /* @__PURE__ */ new Map([
|
|
141
141
|
["baseSectionPaddingY", ve],
|
|
142
142
|
["maxWidth", $e],
|
|
143
143
|
["paddingY", ke],
|
|
@@ -145,14 +145,14 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
|
|
|
145
145
|
]);
|
|
146
146
|
function St(t) {
|
|
147
147
|
var l;
|
|
148
|
-
const { type: e, value:
|
|
148
|
+
const { type: e, value: r, format: n = "sx", defaultValue: o = null } = t, a = Ne.get(e);
|
|
149
149
|
if (!a)
|
|
150
150
|
return o;
|
|
151
|
-
const d =
|
|
152
|
-
if (a != null && a[s] && ((l = a == null ? void 0 : a[s]) != null && l[
|
|
153
|
-
const c = a[s][
|
|
151
|
+
const d = r.startsWith("custom:"), s = d ? "custom" : r;
|
|
152
|
+
if (a != null && a[s] && ((l = a == null ? void 0 : a[s]) != null && l[n])) {
|
|
153
|
+
const c = a[s][n];
|
|
154
154
|
if (d) {
|
|
155
|
-
const m =
|
|
155
|
+
const m = r.replace("custom:", "");
|
|
156
156
|
try {
|
|
157
157
|
return JSON.parse(JSON.stringify(c || {}).replaceAll(Nt, m));
|
|
158
158
|
} catch {
|
|
@@ -173,15 +173,15 @@ function Se() {
|
|
|
173
173
|
function cn({
|
|
174
174
|
page: t,
|
|
175
175
|
children: e,
|
|
176
|
-
defaultLocale:
|
|
177
|
-
currentLocale:
|
|
176
|
+
defaultLocale: r = "en",
|
|
177
|
+
currentLocale: n
|
|
178
178
|
}) {
|
|
179
|
-
const o = W(() => t ? JSON.parse(JSON.stringify(t)) : null, [JSON.stringify(t)]), a =
|
|
179
|
+
const o = W(() => t ? JSON.parse(JSON.stringify(t)) : null, [JSON.stringify(t)]), a = M(() => {
|
|
180
180
|
var c;
|
|
181
181
|
if (!o) return {};
|
|
182
|
-
const l =
|
|
182
|
+
const l = n || r;
|
|
183
183
|
return ((c = o.locales) == null ? void 0 : c[l]) ?? {};
|
|
184
|
-
}, [o,
|
|
184
|
+
}, [o, r, n]), d = M(
|
|
185
185
|
(l = "sx") => {
|
|
186
186
|
const c = a();
|
|
187
187
|
return !c || !c.style ? {} : Object.entries(c.style || {}).reduce((p, [h, u]) => {
|
|
@@ -207,17 +207,17 @@ function cn({
|
|
|
207
207
|
);
|
|
208
208
|
return /* @__PURE__ */ i(Ct.Provider, { value: s, children: e });
|
|
209
209
|
}
|
|
210
|
-
function z({ actions: t, center: e, className:
|
|
210
|
+
function z({ actions: t, center: e, className: r, align: n }) {
|
|
211
211
|
return t && (t != null && t.length) ? /* @__PURE__ */ i(
|
|
212
212
|
b,
|
|
213
213
|
{
|
|
214
214
|
className: g(
|
|
215
215
|
"flex gap-4 flex-wrap",
|
|
216
216
|
"lg:flex-row lg:gap-8",
|
|
217
|
-
(e ||
|
|
218
|
-
!e &&
|
|
219
|
-
!e &&
|
|
220
|
-
|
|
217
|
+
(e || n === "center") && "justify-center",
|
|
218
|
+
!e && n === "right" && "justify-end",
|
|
219
|
+
!e && n === "left" && "justify-start",
|
|
220
|
+
r
|
|
221
221
|
),
|
|
222
222
|
sx: { alignItems: "center" },
|
|
223
223
|
children: t
|
|
@@ -287,11 +287,11 @@ const Ce = "section", Pe = Tt(b)`
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
`;
|
|
290
|
-
function
|
|
290
|
+
function O({
|
|
291
291
|
title: t,
|
|
292
292
|
description: e,
|
|
293
|
-
descriptionMarkdown:
|
|
294
|
-
actions:
|
|
293
|
+
descriptionMarkdown: r,
|
|
294
|
+
actions: n,
|
|
295
295
|
className: o = "",
|
|
296
296
|
classes: a = {},
|
|
297
297
|
prepend: d,
|
|
@@ -306,7 +306,7 @@ function E({
|
|
|
306
306
|
...y
|
|
307
307
|
}) {
|
|
308
308
|
const x = wt();
|
|
309
|
-
if (!t && !e && !
|
|
309
|
+
if (!t && !e && !n && !m && !c && !d && !s && !h) return null;
|
|
310
310
|
const k = Math.max(Math.min(5, l + 1), 1), v = {
|
|
311
311
|
1: "xl:!text-3xl lg:!text-2xl md:!text-xl",
|
|
312
312
|
2: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
@@ -340,7 +340,7 @@ function E({
|
|
|
340
340
|
children: t
|
|
341
341
|
}
|
|
342
342
|
),
|
|
343
|
-
e && (
|
|
343
|
+
e && (r ? /* @__PURE__ */ i(
|
|
344
344
|
b,
|
|
345
345
|
{
|
|
346
346
|
sx: {
|
|
@@ -377,11 +377,11 @@ function E({
|
|
|
377
377
|
children: e
|
|
378
378
|
}
|
|
379
379
|
)),
|
|
380
|
-
/* @__PURE__ */ i(z, { actions:
|
|
380
|
+
/* @__PURE__ */ i(z, { actions: n, center: p, className: "mt-8" }),
|
|
381
381
|
s && /* @__PURE__ */ i("div", { children: s })
|
|
382
382
|
] });
|
|
383
383
|
}
|
|
384
|
-
const
|
|
384
|
+
const A = [
|
|
385
385
|
"actions",
|
|
386
386
|
"append",
|
|
387
387
|
"badge",
|
|
@@ -398,13 +398,13 @@ const O = [
|
|
|
398
398
|
];
|
|
399
399
|
function Pt(t) {
|
|
400
400
|
if (t.type === Mt) {
|
|
401
|
-
const
|
|
402
|
-
return
|
|
401
|
+
const r = (t.props.children || []).filter((n) => yt(n));
|
|
402
|
+
return r.length === 1 ? Pt(r[0]) : r.length > 1;
|
|
403
403
|
}
|
|
404
404
|
return Array.isArray(t);
|
|
405
405
|
}
|
|
406
406
|
const P = "&>*";
|
|
407
|
-
function rt({ children: t, col: e, gap:
|
|
407
|
+
function rt({ children: t, col: e, gap: r, className: n, align: o, sx: a, type: d, ...s } = {
|
|
408
408
|
children: null,
|
|
409
409
|
className: "",
|
|
410
410
|
col: 3,
|
|
@@ -424,7 +424,7 @@ function rt({ children: t, col: e, gap: n, className: r, align: o, sx: a, type:
|
|
|
424
424
|
"bottom-left": "justify-start items-end",
|
|
425
425
|
"bottom-right": "justify-end items-end"
|
|
426
426
|
}, p = m[o] || m.center;
|
|
427
|
-
let u =
|
|
427
|
+
let u = r ?? ({
|
|
428
428
|
2: 6,
|
|
429
429
|
3: 4,
|
|
430
430
|
4: 4,
|
|
@@ -453,7 +453,7 @@ function rt({ children: t, col: e, gap: n, className: r, align: o, sx: a, type:
|
|
|
453
453
|
};
|
|
454
454
|
break;
|
|
455
455
|
}
|
|
456
|
-
return x[P] = { width: `calc(${c}% - ${y}rem)` }, x[`@media (max-width: ${l.breakpoints.values.xl}px)`] = R, x[`@media (max-width: ${l.breakpoints.values.lg}px)`] = I, x[`@media (max-width: ${l.breakpoints.values.md}px)`] = v, x[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k, d === "wall" && (x = { ...a, gap: `${u}rem` }, x[P] = { width: `calc(${c}% - ${y}rem)` }, k[P] = { width: `calc(45% - ${u / 2 / 2}rem)` }, x[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k), /* @__PURE__ */ i(b, { className: g("flex flex-wrap flex-row h-full", p,
|
|
456
|
+
return x[P] = { width: `calc(${c}% - ${y}rem)` }, x[`@media (max-width: ${l.breakpoints.values.xl}px)`] = R, x[`@media (max-width: ${l.breakpoints.values.lg}px)`] = I, x[`@media (max-width: ${l.breakpoints.values.md}px)`] = v, x[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k, d === "wall" && (x = { ...a, gap: `${u}rem` }, x[P] = { width: `calc(${c}% - ${y}rem)` }, k[P] = { width: `calc(45% - ${u / 2 / 2}rem)` }, x[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k), /* @__PURE__ */ i(b, { className: g("flex flex-wrap flex-row h-full", p, n), sx: x, ...s, children: t });
|
|
457
457
|
}
|
|
458
458
|
function Be() {
|
|
459
459
|
const t = navigator.userAgent.toLowerCase();
|
|
@@ -461,10 +461,10 @@ function Be() {
|
|
|
461
461
|
}
|
|
462
462
|
function Ie(t = "") {
|
|
463
463
|
if (t.startsWith("data:image/svg+xml,")) return !0;
|
|
464
|
-
const e = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,
|
|
465
|
-
return e.test(t) ||
|
|
464
|
+
const e = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, r = /^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;
|
|
465
|
+
return e.test(t) || r.test(t);
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function L(t) {
|
|
468
468
|
return (t == null ? void 0 : t.endsWith(".mp4")) || (t == null ? void 0 : t.endsWith(".m4v")) || (t == null ? void 0 : t.endsWith(".webm"));
|
|
469
469
|
}
|
|
470
470
|
function We(t) {
|
|
@@ -475,86 +475,91 @@ function je(t) {
|
|
|
475
475
|
return typeof t == "string" ? ee(t) ? e.image = t : (e.image = N(t), oe(t) && (e.color = t, e.image = "")) : e = t, e;
|
|
476
476
|
}
|
|
477
477
|
function Re() {
|
|
478
|
-
const [t, e] =
|
|
479
|
-
return
|
|
480
|
-
const
|
|
478
|
+
const [t, e] = K(Date.now());
|
|
479
|
+
return E(() => {
|
|
480
|
+
const r = () => {
|
|
481
481
|
e(Date.now());
|
|
482
482
|
};
|
|
483
|
-
return document.addEventListener("visibilitychange",
|
|
484
|
-
document.removeEventListener("visibilitychange",
|
|
483
|
+
return document.addEventListener("visibilitychange", r), () => {
|
|
484
|
+
document.removeEventListener("visibilitychange", r);
|
|
485
485
|
};
|
|
486
486
|
}, []), t;
|
|
487
487
|
}
|
|
488
|
-
function mt(t, e,
|
|
488
|
+
function mt(t, e, r, n, o) {
|
|
489
489
|
let a = null;
|
|
490
490
|
const { color: d = "", image: s } = je(e);
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
muted: !0,
|
|
500
|
-
controls: !1,
|
|
501
|
-
playsInline: !0,
|
|
502
|
-
poster: j(N(r), 1200, "quality"),
|
|
503
|
-
src: Q(s) ? s : j(s, 1200, "quality"),
|
|
504
|
-
sx: {
|
|
505
|
-
position: "absolute",
|
|
506
|
-
zIndex: -9999,
|
|
507
|
-
right: 0,
|
|
508
|
-
left: 0,
|
|
509
|
-
top: 0,
|
|
491
|
+
if (s && Ie(s)) {
|
|
492
|
+
delete r.backgroundColor;
|
|
493
|
+
const l = !(t.mobile.apple.device || Be()) && L(s), c = L(s) && n ? j(N(n), 1200, "quality") : "";
|
|
494
|
+
l ? a = /* @__PURE__ */ i(
|
|
495
|
+
b,
|
|
496
|
+
{
|
|
497
|
+
component: "video",
|
|
498
|
+
className: "section-bg",
|
|
510
499
|
width: "100%",
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
500
|
+
autoPlay: !0,
|
|
501
|
+
loop: !0,
|
|
502
|
+
muted: !0,
|
|
503
|
+
controls: !1,
|
|
504
|
+
playsInline: !0,
|
|
505
|
+
poster: c,
|
|
506
|
+
src: L(s) ? s : j(s, 1200, "quality"),
|
|
507
|
+
sx: {
|
|
508
|
+
position: "absolute",
|
|
509
|
+
zIndex: -9999,
|
|
510
|
+
right: 0,
|
|
511
|
+
left: 0,
|
|
512
|
+
top: 0,
|
|
513
|
+
width: "100%",
|
|
514
|
+
height: "100%",
|
|
515
|
+
objectFit: "cover"
|
|
516
|
+
}
|
|
524
517
|
},
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
518
|
+
s
|
|
519
|
+
) : a = /* @__PURE__ */ i(
|
|
520
|
+
kt,
|
|
521
|
+
{
|
|
522
|
+
src: L(s) && n ? c : s,
|
|
523
|
+
sizesAttr: {
|
|
524
|
+
sm: 600,
|
|
525
|
+
md: 900,
|
|
526
|
+
lg: 1200
|
|
527
|
+
},
|
|
528
|
+
className: "section-bg",
|
|
529
|
+
alt: "",
|
|
535
530
|
width: "100%",
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
531
|
+
loading: "lazy",
|
|
532
|
+
sx: {
|
|
533
|
+
position: "absolute",
|
|
534
|
+
zIndex: -9999,
|
|
535
|
+
right: 0,
|
|
536
|
+
left: 0,
|
|
537
|
+
top: 0,
|
|
538
|
+
width: "100%",
|
|
539
|
+
height: "100%",
|
|
540
|
+
objectFit: "cover"
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
o || s
|
|
544
|
+
);
|
|
545
|
+
} else s ? r.backgroundImage = `${s} !important` : d && (r.backgroundColor = `${d} !important`);
|
|
546
|
+
return a;
|
|
542
547
|
}
|
|
543
|
-
function ze({ autoWidth: t, children: e, ...
|
|
544
|
-
return t ? /* @__PURE__ */ i(b, { display: "flex", ...
|
|
548
|
+
function ze({ autoWidth: t, children: e, ...r }) {
|
|
549
|
+
return t ? /* @__PURE__ */ i(b, { display: "flex", ...r, children: e }) : /* @__PURE__ */ i(Et, { ...r, children: e });
|
|
545
550
|
}
|
|
546
|
-
function
|
|
551
|
+
function F({
|
|
547
552
|
dark: t = !1,
|
|
548
553
|
children: e,
|
|
549
|
-
className:
|
|
550
|
-
sx:
|
|
554
|
+
className: r,
|
|
555
|
+
sx: n = {},
|
|
551
556
|
boxed: o = { show: !1 },
|
|
552
557
|
padding: a = "normal",
|
|
553
558
|
boxProps: d,
|
|
554
559
|
type: s,
|
|
555
560
|
...l
|
|
556
561
|
}) {
|
|
557
|
-
const c = { ...
|
|
562
|
+
const c = { ...n }, m = _t((u) => u.breakpoints.down("md"));
|
|
558
563
|
t && (c.color = dt.common.white, c.backgroundColor = `${dt.grey[900]} !important`), o.show && (c.display = "flex");
|
|
559
564
|
const p = W(() => !Number(l.boxMaxWidth) || m ? {
|
|
560
565
|
width: "100%"
|
|
@@ -574,7 +579,7 @@ function A({
|
|
|
574
579
|
{
|
|
575
580
|
component: "section",
|
|
576
581
|
styles: { ...c, ...h },
|
|
577
|
-
className: g("base-section", "px-2 md:px-5 lg:px-5 xl:px-10",
|
|
582
|
+
className: g("base-section", "px-2 md:px-5 lg:px-5 xl:px-10", r, {
|
|
578
583
|
dark: t
|
|
579
584
|
}),
|
|
580
585
|
...S(
|
|
@@ -595,14 +600,14 @@ function A({
|
|
|
595
600
|
function Bt({
|
|
596
601
|
background: t = "",
|
|
597
602
|
backgroundVideoPoster: e,
|
|
598
|
-
children:
|
|
599
|
-
sx:
|
|
603
|
+
children: r,
|
|
604
|
+
sx: n = {},
|
|
600
605
|
boxed: o = { show: !1 },
|
|
601
606
|
className: a = "",
|
|
602
607
|
styles: d = {},
|
|
603
608
|
...s
|
|
604
609
|
}) {
|
|
605
|
-
const l = { ...d, ...
|
|
610
|
+
const l = { ...d, ...n }, c = wt();
|
|
606
611
|
let m = null;
|
|
607
612
|
const p = _t((f) => f.breakpoints.up("sm")), h = Zt(), u = Re();
|
|
608
613
|
return t && (m = mt(
|
|
@@ -628,7 +633,7 @@ function Bt({
|
|
|
628
633
|
className: g(a, (o == null ? void 0 : o.boxShadow) && "shadow-xl"),
|
|
629
634
|
children: [
|
|
630
635
|
m,
|
|
631
|
-
|
|
636
|
+
r
|
|
632
637
|
]
|
|
633
638
|
}
|
|
634
639
|
);
|
|
@@ -654,26 +659,26 @@ function It({ icon: t, ...e }) {
|
|
|
654
659
|
return /* @__PURE__ */ i($t, { icon: t, ...e, ref: null });
|
|
655
660
|
}
|
|
656
661
|
function $(t, e) {
|
|
657
|
-
const
|
|
658
|
-
return [
|
|
662
|
+
const r = nt(t, e), n = S(t, e);
|
|
663
|
+
return [r, n];
|
|
659
664
|
}
|
|
660
665
|
const Wt = ["title", "description", "actions", "badge", "tag", "prepend", "append", "logo"];
|
|
661
666
|
function Te({
|
|
662
667
|
image: t,
|
|
663
668
|
imageBorder: e,
|
|
664
|
-
imageShadow:
|
|
665
|
-
className:
|
|
669
|
+
imageShadow: r,
|
|
670
|
+
className: n,
|
|
666
671
|
reverse: o = !1,
|
|
667
672
|
fullSizeImage: a,
|
|
668
673
|
...d
|
|
669
674
|
}) {
|
|
670
|
-
const [s, l] = $(d,
|
|
675
|
+
const [s, l] = $(d, A), c = Object.keys(s).length > 0 && Object.values(nt(s, Wt)).filter(Boolean).length > 0 && /* @__PURE__ */ i(O, { ...s }), m = yt(t) ? t : /* @__PURE__ */ i(b, { component: "img", src: t, alt: "", className: "block" }), p = ["phone", "macbook"].includes(e), h = t && /* @__PURE__ */ i(
|
|
671
676
|
b,
|
|
672
677
|
{
|
|
673
678
|
className: g(
|
|
674
679
|
"section__image",
|
|
675
680
|
"m-auto, leading-[1] text-center",
|
|
676
|
-
|
|
681
|
+
r && "shadow-xl",
|
|
677
682
|
s != null && s.center ? "flex justify-center items-center" : ""
|
|
678
683
|
),
|
|
679
684
|
sx: {
|
|
@@ -690,12 +695,12 @@ function Te({
|
|
|
690
695
|
}
|
|
691
696
|
);
|
|
692
697
|
return /* @__PURE__ */ i(
|
|
693
|
-
|
|
698
|
+
F,
|
|
694
699
|
{
|
|
695
700
|
className: g(
|
|
696
701
|
"section--block",
|
|
697
|
-
|
|
698
|
-
a && !o &&
|
|
702
|
+
n,
|
|
703
|
+
a && !o && q`
|
|
699
704
|
.section-bg {
|
|
700
705
|
height: 80%;
|
|
701
706
|
}
|
|
@@ -707,7 +712,7 @@ function Te({
|
|
|
707
712
|
rt,
|
|
708
713
|
{
|
|
709
714
|
col: t ? 2 : 1,
|
|
710
|
-
className: a ?
|
|
715
|
+
className: a ? q`
|
|
711
716
|
display: flex;
|
|
712
717
|
flex-direction: column;
|
|
713
718
|
|
|
@@ -721,10 +726,10 @@ function Te({
|
|
|
721
726
|
}
|
|
722
727
|
}
|
|
723
728
|
` : void 0,
|
|
724
|
-
children: o ? /* @__PURE__ */ w(
|
|
729
|
+
children: o ? /* @__PURE__ */ w(J, { children: [
|
|
725
730
|
h,
|
|
726
731
|
c
|
|
727
|
-
] }) : /* @__PURE__ */ w(
|
|
732
|
+
] }) : /* @__PURE__ */ w(J, { children: [
|
|
728
733
|
c,
|
|
729
734
|
h
|
|
730
735
|
] })
|
|
@@ -733,10 +738,10 @@ function Te({
|
|
|
733
738
|
}
|
|
734
739
|
);
|
|
735
740
|
}
|
|
736
|
-
const
|
|
741
|
+
const U = ["editing", "height", "locale", "dev", "sx"];
|
|
737
742
|
function Ee(t) {
|
|
738
|
-
const { className: e, ...
|
|
739
|
-
return /* @__PURE__ */ i(Oe, { ...
|
|
743
|
+
const { className: e, ...r } = t;
|
|
744
|
+
return /* @__PURE__ */ i(Oe, { ...r, className: g("BlockBase-root", e) });
|
|
740
745
|
}
|
|
741
746
|
const Oe = _(b)`
|
|
742
747
|
position: relative;
|
|
@@ -745,8 +750,8 @@ const Oe = _(b)`
|
|
|
745
750
|
function Ae({
|
|
746
751
|
widget: t,
|
|
747
752
|
reverse: e,
|
|
748
|
-
projectId:
|
|
749
|
-
assistantId:
|
|
753
|
+
projectId: r,
|
|
754
|
+
assistantId: n,
|
|
750
755
|
working: o,
|
|
751
756
|
submitTitle: a,
|
|
752
757
|
submitIcon: d,
|
|
@@ -756,7 +761,7 @@ function Ae({
|
|
|
756
761
|
section: m,
|
|
757
762
|
...p
|
|
758
763
|
}) {
|
|
759
|
-
const [{ editing: h }, u] = $(p,
|
|
764
|
+
const [{ editing: h }, u] = $(p, U), [f, y] = $(u, A), x = r && n ? { projectId: r, gitRef: "main", assistantId: n, working: !0 } : void 0, k = {
|
|
760
765
|
children: a,
|
|
761
766
|
endIcon: d ? /* @__PURE__ */ i(It, { icon: d }) : void 0,
|
|
762
767
|
sx: {
|
|
@@ -767,7 +772,7 @@ function Ae({
|
|
|
767
772
|
}
|
|
768
773
|
}
|
|
769
774
|
}, v = [], I = l && /* @__PURE__ */ i(C, { variant: "caption", color: "text.disabled", children: l }), R = c && /* @__PURE__ */ i(C, { variant: "caption", color: "text.disabled", children: c });
|
|
770
|
-
Object.keys(f).length > 0 && Object.values(nt(f, Wt)).filter(Boolean).length > 0 && v.push(/* @__PURE__ */ i(
|
|
775
|
+
Object.keys(f).length > 0 && Object.values(nt(f, Wt)).filter(Boolean).length > 0 && v.push(/* @__PURE__ */ i(O, { ...f }, "base-info")), x && (t === "form" ? v.push(/* @__PURE__ */ i(lt, { identifier: x, SubmitProps: k }, "form")) : t === "result" ? v.push(
|
|
771
776
|
/* @__PURE__ */ i(
|
|
772
777
|
ct,
|
|
773
778
|
{
|
|
@@ -795,7 +800,7 @@ function Ae({
|
|
|
795
800
|
() => Ft(Gt(at, { palette: { primary: s ? { main: s } : void 0 } })),
|
|
796
801
|
[s, at]
|
|
797
802
|
);
|
|
798
|
-
return /* @__PURE__ */ i(Xt, { fallbackRender: Kt, children: /* @__PURE__ */ i(
|
|
803
|
+
return /* @__PURE__ */ i(Xt, { fallbackRender: Kt, children: /* @__PURE__ */ i(Ut, { theme: Lt, children: /* @__PURE__ */ i(F, { ...y, sx: h ? { pointerEvents: "none" } : {}, children: /* @__PURE__ */ i(rt, { col: v.length, children: v }) }) }) });
|
|
799
804
|
}
|
|
800
805
|
const jt = xt({
|
|
801
806
|
pages: [],
|
|
@@ -804,27 +809,27 @@ const jt = xt({
|
|
|
804
809
|
function Rt() {
|
|
805
810
|
return bt(jt);
|
|
806
811
|
}
|
|
807
|
-
function Fe({ icon: t, className: e = "", size:
|
|
808
|
-
return /* @__PURE__ */ i(
|
|
812
|
+
function Fe({ icon: t, className: e = "", size: r = "1rem", ...n }) {
|
|
813
|
+
return /* @__PURE__ */ i(Ue, { component: It, className: g("css-icon", e), size: r, ...n, icon: t });
|
|
809
814
|
}
|
|
810
|
-
const
|
|
815
|
+
const Ue = _(b)`
|
|
811
816
|
&.css-icon {
|
|
812
817
|
display: inline-block;
|
|
813
818
|
width: ${({ size: t }) => t};
|
|
814
819
|
height: ${({ size: t }) => t};
|
|
815
820
|
}
|
|
816
821
|
`;
|
|
817
|
-
function
|
|
818
|
-
const a = j(N(t), 540), [d, s] =
|
|
819
|
-
return d ? /* @__PURE__ */ i(Fe, { icon: "i-mdi:image", color: l.palette.grey[500], size:
|
|
822
|
+
function Ve({ icon: t, className: e = "", size: r = "1rem", imageMeta: n, ...o }) {
|
|
823
|
+
const a = j(N(t), 540), [d, s] = K(!1), l = vt();
|
|
824
|
+
return d ? /* @__PURE__ */ i(Fe, { icon: "i-mdi:image", color: l.palette.grey[500], size: r, className: e, ...o }) : /* @__PURE__ */ i(De, { className: g("image-icon", e), size: r, ...o, children: /* @__PURE__ */ i(
|
|
820
825
|
"img",
|
|
821
826
|
{
|
|
822
827
|
className: "image-icon__image",
|
|
823
828
|
src: a,
|
|
824
829
|
onError: () => s(!0),
|
|
825
|
-
width:
|
|
826
|
-
height:
|
|
827
|
-
alt: (
|
|
830
|
+
width: n == null ? void 0 : n.naturalWidth,
|
|
831
|
+
height: n == null ? void 0 : n.naturalHeight,
|
|
832
|
+
alt: (n == null ? void 0 : n.filename) || "card-icon",
|
|
828
833
|
loading: "lazy"
|
|
829
834
|
}
|
|
830
835
|
) });
|
|
@@ -839,29 +844,29 @@ const De = _(b)`
|
|
|
839
844
|
width: 100%;
|
|
840
845
|
}
|
|
841
846
|
`, it = (t) => typeof t == "string" && /^[\w-_]+:[\w-_]+$/.test(t);
|
|
842
|
-
function Z({ icon: t, size: e = "1rem", imageMeta:
|
|
847
|
+
function Z({ icon: t, size: e = "1rem", imageMeta: r, ...n }) {
|
|
843
848
|
const o = window.isNaN(e) ? e : `${e}px`;
|
|
844
|
-
return it(t) ? /* @__PURE__ */ i($t, { icon: t }) : /* @__PURE__ */ i(He, { component:
|
|
849
|
+
return it(t) ? /* @__PURE__ */ i($t, { icon: t }) : /* @__PURE__ */ i(He, { component: Ve, imageMeta: r, className: "base-icon", icon: t, size: o, ...n });
|
|
845
850
|
}
|
|
846
851
|
const He = _(b)`
|
|
847
852
|
flex-shrink: 0;
|
|
848
853
|
`;
|
|
849
|
-
function
|
|
850
|
-
const l =
|
|
851
|
-
return m && (p.href = m,
|
|
854
|
+
function T({ text: t, children: e, icon: r = "", endIcon: n, color: o = "primary", link: a = "", href: d = "", ...s }) {
|
|
855
|
+
const l = r ? /* @__PURE__ */ i(Z, { icon: r }) : null, c = n ? /* @__PURE__ */ i(Z, { icon: n }) : null, m = a || d, p = { ...s };
|
|
856
|
+
return m && (p.href = m, Q(m) && (p.target = p.target || "_blank")), /* @__PURE__ */ i(se, { startIcon: l, endIcon: c, color: o, ...p, children: t || e });
|
|
852
857
|
}
|
|
853
|
-
function zt({ editing: t, text: e, ...
|
|
854
|
-
const { pages:
|
|
858
|
+
function zt({ editing: t, text: e, ...r }) {
|
|
859
|
+
const { pages: n = [] } = Rt(), o = n.find((a) => a.id === (r.link || r.linkId));
|
|
855
860
|
if (t)
|
|
856
|
-
return /* @__PURE__ */ i(
|
|
861
|
+
return /* @__PURE__ */ i(T, { ...S(r, ["link", "linkId"]), children: e });
|
|
857
862
|
if (o) {
|
|
858
863
|
const a = o.path || "/";
|
|
859
|
-
return /* @__PURE__ */ i(re, { to: a, children: /* @__PURE__ */ i(
|
|
864
|
+
return /* @__PURE__ */ i(re, { to: a, children: /* @__PURE__ */ i(T, { ...S(r, ["link", "linkId"]), children: e }) });
|
|
860
865
|
}
|
|
861
|
-
return /* @__PURE__ */ i(
|
|
866
|
+
return /* @__PURE__ */ i(T, { ...S(r, "linkId"), children: e });
|
|
862
867
|
}
|
|
863
|
-
function B({ type: t = "", icon: e = "", size:
|
|
864
|
-
return /* @__PURE__ */ i(Z, { icon: e || t, size:
|
|
868
|
+
function B({ type: t = "", icon: e = "", size: r = "3rem", className: n = "", ...o }) {
|
|
869
|
+
return /* @__PURE__ */ i(Z, { icon: e || t, size: r, className: g("content-icon", n), ...o });
|
|
865
870
|
}
|
|
866
871
|
B.propTypes = {};
|
|
867
872
|
B.defaultProps = {
|
|
@@ -874,56 +879,56 @@ B.defaultProps = {
|
|
|
874
879
|
function Ye({
|
|
875
880
|
to: t,
|
|
876
881
|
base: e,
|
|
877
|
-
children:
|
|
878
|
-
className:
|
|
882
|
+
children: r,
|
|
883
|
+
className: n,
|
|
879
884
|
activeClassName: o = "active",
|
|
880
885
|
target: a = "auto",
|
|
881
886
|
autoExternalMark: d = !1,
|
|
882
887
|
useRouterLink: s,
|
|
883
888
|
...l
|
|
884
889
|
}) {
|
|
885
|
-
const { pages: c = [], locale: m = "" } = {}, p = e ?
|
|
886
|
-
let h = a === "auto" ? "_self" : a, u =
|
|
887
|
-
const f = d ?
|
|
890
|
+
const { pages: c = [], locale: m = "" } = {}, p = e ? H("/", e) : e || "";
|
|
891
|
+
let h = a === "auto" ? "_self" : a, u = H(p, t);
|
|
892
|
+
const f = d ? Q(u) : !1;
|
|
888
893
|
if (e)
|
|
889
|
-
return u =
|
|
894
|
+
return u = H(p, m, t), /* @__PURE__ */ i(
|
|
890
895
|
"a",
|
|
891
896
|
{
|
|
892
|
-
className: `no-underline ${
|
|
893
|
-
href:
|
|
897
|
+
className: `no-underline ${n}`,
|
|
898
|
+
href: X(u),
|
|
894
899
|
rel: "noreferrer noopener",
|
|
895
900
|
target: h,
|
|
896
901
|
...l,
|
|
897
|
-
children:
|
|
902
|
+
children: r
|
|
898
903
|
}
|
|
899
904
|
);
|
|
900
|
-
if (
|
|
905
|
+
if (Q(t))
|
|
901
906
|
a === "auto" && (h = "_blank"), u = t;
|
|
902
907
|
else {
|
|
903
|
-
le(u) && (u =
|
|
908
|
+
le(u) && (u = H(window.location.pathname, u));
|
|
904
909
|
const y = ce(`${window.location.origin}${u}`), x = c.some((k) => k.pathname === y.pathname);
|
|
905
910
|
if (s || x)
|
|
906
911
|
return /* @__PURE__ */ i(
|
|
907
912
|
ie,
|
|
908
913
|
{
|
|
909
914
|
end: !0,
|
|
910
|
-
to:
|
|
911
|
-
className: ({ isActive: k }) => g(
|
|
915
|
+
to: X(u),
|
|
916
|
+
className: ({ isActive: k }) => g(n, k ? o : ""),
|
|
912
917
|
...l,
|
|
913
|
-
children:
|
|
918
|
+
children: r
|
|
914
919
|
}
|
|
915
920
|
);
|
|
916
921
|
}
|
|
917
922
|
return /* @__PURE__ */ w(
|
|
918
923
|
"a",
|
|
919
924
|
{
|
|
920
|
-
className: `no-underline ${
|
|
921
|
-
href:
|
|
925
|
+
className: `no-underline ${n}`,
|
|
926
|
+
href: X(u),
|
|
922
927
|
rel: "noreferrer noopener",
|
|
923
928
|
target: h,
|
|
924
929
|
...l,
|
|
925
930
|
children: [
|
|
926
|
-
|
|
931
|
+
r,
|
|
927
932
|
f && /* @__PURE__ */ i(B, { icon: "i-mdi:arrow-top-right", size: "0.9em", className: "smart-link__mark", style: { marginLeft: 5 } })
|
|
928
933
|
]
|
|
929
934
|
}
|
|
@@ -932,14 +937,14 @@ function Ye({
|
|
|
932
937
|
function V({
|
|
933
938
|
prepend: t,
|
|
934
939
|
append: e,
|
|
935
|
-
children:
|
|
936
|
-
className:
|
|
940
|
+
children: r,
|
|
941
|
+
className: n = "",
|
|
937
942
|
dark: o = !1,
|
|
938
943
|
border: a = !0,
|
|
939
944
|
...d
|
|
940
945
|
}) {
|
|
941
946
|
let s = {};
|
|
942
|
-
const { pages: l = [] } = Rt(), c = l.find((h) => h.id === d.link), m = !
|
|
947
|
+
const { pages: l = [] } = Rt(), c = l.find((h) => h.id === d.link), m = !r || Jt.Children.toArray(r).every((h) => h === null);
|
|
943
948
|
return d.link && (s = {
|
|
944
949
|
component: Ye,
|
|
945
950
|
to: (c == null ? void 0 : c.path) || d.link,
|
|
@@ -952,13 +957,13 @@ function V({
|
|
|
952
957
|
{ "border-gray-200": a },
|
|
953
958
|
{ "dark:border-gray-500": o && a },
|
|
954
959
|
{ dark: o, "border-transparent": !a },
|
|
955
|
-
|
|
960
|
+
n
|
|
956
961
|
),
|
|
957
962
|
...s,
|
|
958
963
|
...S(d, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
|
|
959
964
|
children: [
|
|
960
965
|
t,
|
|
961
|
-
!m && /* @__PURE__ */ i("div", { className: "card__body", children:
|
|
966
|
+
!m && /* @__PURE__ */ i("div", { className: "card__body", children: r }),
|
|
962
967
|
e
|
|
963
968
|
]
|
|
964
969
|
}
|
|
@@ -980,14 +985,14 @@ const Je = _(b)`
|
|
|
980
985
|
padding: 15px 15px;
|
|
981
986
|
}
|
|
982
987
|
`;
|
|
983
|
-
function
|
|
988
|
+
function D({
|
|
984
989
|
align: t = "left",
|
|
985
990
|
title: e,
|
|
986
|
-
titleProps:
|
|
987
|
-
description:
|
|
991
|
+
titleProps: r = {},
|
|
992
|
+
description: n,
|
|
988
993
|
descriptionProps: o = {}
|
|
989
994
|
}) {
|
|
990
|
-
return /* @__PURE__ */ w(
|
|
995
|
+
return /* @__PURE__ */ w(J, { children: [
|
|
991
996
|
e && /* @__PURE__ */ i(
|
|
992
997
|
C,
|
|
993
998
|
{
|
|
@@ -996,11 +1001,11 @@ function U({
|
|
|
996
1001
|
variant: "h5",
|
|
997
1002
|
gutterBottom: !0,
|
|
998
1003
|
align: t,
|
|
999
|
-
...
|
|
1004
|
+
...r,
|
|
1000
1005
|
children: e
|
|
1001
1006
|
}
|
|
1002
1007
|
),
|
|
1003
|
-
|
|
1008
|
+
n && /* @__PURE__ */ i(
|
|
1004
1009
|
C,
|
|
1005
1010
|
{
|
|
1006
1011
|
className: g("card__description", "text-gray-500", "dark:text-gray-400"),
|
|
@@ -1009,7 +1014,7 @@ function U({
|
|
|
1009
1014
|
gutterBottom: !0,
|
|
1010
1015
|
align: t,
|
|
1011
1016
|
...o,
|
|
1012
|
-
children:
|
|
1017
|
+
children: n
|
|
1013
1018
|
}
|
|
1014
1019
|
)
|
|
1015
1020
|
] });
|
|
@@ -1017,8 +1022,8 @@ function U({
|
|
|
1017
1022
|
function Me({
|
|
1018
1023
|
image: t,
|
|
1019
1024
|
title: e,
|
|
1020
|
-
description:
|
|
1021
|
-
imageProps:
|
|
1025
|
+
description: r,
|
|
1026
|
+
imageProps: n = {},
|
|
1022
1027
|
imageMeta: o,
|
|
1023
1028
|
imageSize: a,
|
|
1024
1029
|
titleProps: d = {},
|
|
@@ -1053,8 +1058,8 @@ function Me({
|
|
|
1053
1058
|
{
|
|
1054
1059
|
className: "card__image",
|
|
1055
1060
|
src: h,
|
|
1056
|
-
...
|
|
1057
|
-
alt:
|
|
1061
|
+
...n,
|
|
1062
|
+
alt: n.alt || (o == null ? void 0 : o.filename) || "card-image",
|
|
1058
1063
|
width: o == null ? void 0 : o.naturalWidth,
|
|
1059
1064
|
height: o == null ? void 0 : o.naturalHeight,
|
|
1060
1065
|
style: { width: "100%", height: "100%", objectFit: a || "cover", objectPosition: "center" },
|
|
@@ -1062,13 +1067,13 @@ function Me({
|
|
|
1062
1067
|
}
|
|
1063
1068
|
) }),
|
|
1064
1069
|
children: [
|
|
1065
|
-
e ||
|
|
1066
|
-
|
|
1070
|
+
e || r ? /* @__PURE__ */ i(
|
|
1071
|
+
D,
|
|
1067
1072
|
{
|
|
1068
1073
|
align: c,
|
|
1069
1074
|
title: e,
|
|
1070
1075
|
titleProps: d,
|
|
1071
|
-
description:
|
|
1076
|
+
description: r,
|
|
1072
1077
|
descriptionProps: s
|
|
1073
1078
|
}
|
|
1074
1079
|
) : null,
|
|
@@ -1102,8 +1107,8 @@ const Ke = _(V)`
|
|
|
1102
1107
|
function ut({
|
|
1103
1108
|
title: t,
|
|
1104
1109
|
image: e,
|
|
1105
|
-
imageMeta:
|
|
1106
|
-
description:
|
|
1110
|
+
imageMeta: r,
|
|
1111
|
+
description: n,
|
|
1107
1112
|
actions: o,
|
|
1108
1113
|
align: a,
|
|
1109
1114
|
listType: d = "",
|
|
@@ -1117,10 +1122,10 @@ function ut({
|
|
|
1117
1122
|
icon: e,
|
|
1118
1123
|
color: "primary.main",
|
|
1119
1124
|
size: d === "icon-title" ? "1.2rem" : "3rem",
|
|
1120
|
-
imageMeta:
|
|
1125
|
+
imageMeta: r
|
|
1121
1126
|
}
|
|
1122
1127
|
),
|
|
1123
|
-
t ||
|
|
1128
|
+
t || n ? /* @__PURE__ */ i(D, { align: a, title: t, description: n }) : null,
|
|
1124
1129
|
o != null && o.length ? /* @__PURE__ */ i(z, { align: a, actions: o, className: "mt-4" }) : null
|
|
1125
1130
|
] });
|
|
1126
1131
|
}
|
|
@@ -1188,8 +1193,8 @@ const Ge = _(V)`
|
|
|
1188
1193
|
function Xe({
|
|
1189
1194
|
image: t,
|
|
1190
1195
|
title: e,
|
|
1191
|
-
description:
|
|
1192
|
-
imageProps:
|
|
1196
|
+
description: r,
|
|
1197
|
+
imageProps: n = {},
|
|
1193
1198
|
imageMeta: o,
|
|
1194
1199
|
imageSize: a,
|
|
1195
1200
|
titleProps: d = {},
|
|
@@ -1225,8 +1230,8 @@ function Xe({
|
|
|
1225
1230
|
component: "img",
|
|
1226
1231
|
className: "card__image",
|
|
1227
1232
|
src: h,
|
|
1228
|
-
...
|
|
1229
|
-
alt:
|
|
1233
|
+
...n,
|
|
1234
|
+
alt: n.alt || (o == null ? void 0 : o.filename) || "card-image",
|
|
1230
1235
|
width: o == null ? void 0 : o.naturalWidth,
|
|
1231
1236
|
height: o == null ? void 0 : o.naturalHeight,
|
|
1232
1237
|
style: { width: "100%", height: "100%", objectFit: a || "contain", objectPosition: "center" },
|
|
@@ -1234,13 +1239,13 @@ function Xe({
|
|
|
1234
1239
|
}
|
|
1235
1240
|
) }),
|
|
1236
1241
|
children: [
|
|
1237
|
-
e ||
|
|
1238
|
-
|
|
1242
|
+
e || r ? /* @__PURE__ */ i(
|
|
1243
|
+
D,
|
|
1239
1244
|
{
|
|
1240
1245
|
align: c,
|
|
1241
1246
|
title: e,
|
|
1242
1247
|
titleProps: d,
|
|
1243
|
-
description:
|
|
1248
|
+
description: r,
|
|
1244
1249
|
descriptionProps: s
|
|
1245
1250
|
}
|
|
1246
1251
|
) : null,
|
|
@@ -1277,8 +1282,8 @@ const qe = _(V)`
|
|
|
1277
1282
|
function Qe({
|
|
1278
1283
|
title: t,
|
|
1279
1284
|
image: e,
|
|
1280
|
-
imageMeta:
|
|
1281
|
-
iconSize:
|
|
1285
|
+
imageMeta: r,
|
|
1286
|
+
iconSize: n = 100,
|
|
1282
1287
|
description: o,
|
|
1283
1288
|
actions: a,
|
|
1284
1289
|
align: d,
|
|
@@ -1286,9 +1291,9 @@ function Qe({
|
|
|
1286
1291
|
...l
|
|
1287
1292
|
}) {
|
|
1288
1293
|
return /* @__PURE__ */ i(Ze, { className: g("card", s), ...l, children: /* @__PURE__ */ w(b, { className: "flex items-center", children: [
|
|
1289
|
-
e && /* @__PURE__ */ i(B, { icon: e, color: "primary.main", size:
|
|
1294
|
+
e && /* @__PURE__ */ i(B, { icon: e, color: "primary.main", size: n, imageMeta: r }),
|
|
1290
1295
|
/* @__PURE__ */ w(b, { className: "flex-1 ml-4", children: [
|
|
1291
|
-
/* @__PURE__ */ i(
|
|
1296
|
+
/* @__PURE__ */ i(D, { align: d, title: t, description: o }),
|
|
1292
1297
|
/* @__PURE__ */ i(z, { align: d, actions: a, className: "mt-4" })
|
|
1293
1298
|
] })
|
|
1294
1299
|
] }) });
|
|
@@ -1353,8 +1358,8 @@ const Ze = _(V)`
|
|
|
1353
1358
|
function to({
|
|
1354
1359
|
title: t,
|
|
1355
1360
|
titleProps: e = {},
|
|
1356
|
-
description:
|
|
1357
|
-
descriptionProps:
|
|
1361
|
+
description: r,
|
|
1362
|
+
descriptionProps: n = {},
|
|
1358
1363
|
image: o,
|
|
1359
1364
|
imageMeta: a,
|
|
1360
1365
|
className: d = "",
|
|
@@ -1364,14 +1369,14 @@ function to({
|
|
|
1364
1369
|
}) {
|
|
1365
1370
|
return /* @__PURE__ */ w(eo, { className: g("card-simple", d, `hover-style__${l}`), align: s, ...c, children: [
|
|
1366
1371
|
o && /* @__PURE__ */ i(B, { icon: o, color: "primary.main", imageMeta: a }),
|
|
1367
|
-
t ||
|
|
1368
|
-
|
|
1372
|
+
t || r ? /* @__PURE__ */ i(
|
|
1373
|
+
D,
|
|
1369
1374
|
{
|
|
1370
1375
|
align: s,
|
|
1371
1376
|
title: t,
|
|
1372
1377
|
titleProps: e,
|
|
1373
|
-
description:
|
|
1374
|
-
descriptionProps:
|
|
1378
|
+
description: r,
|
|
1379
|
+
descriptionProps: n
|
|
1375
1380
|
}
|
|
1376
1381
|
) : null
|
|
1377
1382
|
] });
|
|
@@ -1463,20 +1468,20 @@ const eo = _(V)`
|
|
|
1463
1468
|
}
|
|
1464
1469
|
`;
|
|
1465
1470
|
function oo({ type: t = "default", ...e }) {
|
|
1466
|
-
const
|
|
1471
|
+
const n = {
|
|
1467
1472
|
article: Me,
|
|
1468
1473
|
simple: to,
|
|
1469
1474
|
news: Qe,
|
|
1470
1475
|
default: ut,
|
|
1471
1476
|
wall: Xe
|
|
1472
1477
|
}[t] || ut;
|
|
1473
|
-
return /* @__PURE__ */ i(
|
|
1478
|
+
return /* @__PURE__ */ i(n, { ...t === "news" ? e : S(e, "iconSize") });
|
|
1474
1479
|
}
|
|
1475
1480
|
function no({
|
|
1476
1481
|
list: t = [],
|
|
1477
1482
|
align: e = "top",
|
|
1478
|
-
cards:
|
|
1479
|
-
listBorder:
|
|
1483
|
+
cards: r,
|
|
1484
|
+
listBorder: n = !0,
|
|
1480
1485
|
listType: o = "",
|
|
1481
1486
|
col: a = 3,
|
|
1482
1487
|
gap: d,
|
|
@@ -1497,10 +1502,10 @@ function no({
|
|
|
1497
1502
|
gap: d,
|
|
1498
1503
|
align: e,
|
|
1499
1504
|
...u,
|
|
1500
|
-
children:
|
|
1505
|
+
children: r || t.map((f) => /* @__PURE__ */ i(
|
|
1501
1506
|
oo,
|
|
1502
1507
|
{
|
|
1503
|
-
borderColor:
|
|
1508
|
+
borderColor: n,
|
|
1504
1509
|
iconColor: s,
|
|
1505
1510
|
type: c,
|
|
1506
1511
|
listType: o,
|
|
@@ -1532,7 +1537,7 @@ const ro = [
|
|
|
1532
1537
|
"iconColor",
|
|
1533
1538
|
"type",
|
|
1534
1539
|
"textAlign"
|
|
1535
|
-
], io = _(
|
|
1540
|
+
], io = _(F)`
|
|
1536
1541
|
a .card {
|
|
1537
1542
|
color: #404040;
|
|
1538
1543
|
cursor: pointer;
|
|
@@ -1549,9 +1554,9 @@ const ro = [
|
|
|
1549
1554
|
}
|
|
1550
1555
|
`;
|
|
1551
1556
|
function ao({ className: t, ...e }) {
|
|
1552
|
-
const [
|
|
1557
|
+
const [r, n] = $(e, A), [o, a] = $(n, ro);
|
|
1553
1558
|
return /* @__PURE__ */ w(io, { className: g("section--card-list", t), type: e.type, ...a, children: [
|
|
1554
|
-
Object.keys(
|
|
1559
|
+
Object.keys(r).length > 0 && /* @__PURE__ */ i(O, { center: !0, ...r, className: "mb-[2.5vw]" }),
|
|
1555
1560
|
/* @__PURE__ */ i(no, { ...o, dark: !!e.dark })
|
|
1556
1561
|
] });
|
|
1557
1562
|
}
|
|
@@ -1572,31 +1577,31 @@ const so = _(ao)`
|
|
|
1572
1577
|
}
|
|
1573
1578
|
`;
|
|
1574
1579
|
function lo({ section: t, ...e }) {
|
|
1575
|
-
const [{ editing:
|
|
1580
|
+
const [{ editing: r }, n] = $(e, U), o = W(() => {
|
|
1576
1581
|
var a;
|
|
1577
1582
|
return {
|
|
1578
|
-
...S(
|
|
1579
|
-
list: (a =
|
|
1583
|
+
...S(n, ["listBorder", "list", "iconSize", "imageSize"]),
|
|
1584
|
+
list: (a = n.list) == null ? void 0 : a.map((d) => {
|
|
1580
1585
|
var s, l;
|
|
1581
1586
|
return {
|
|
1582
1587
|
...S(d, "icon", "iconColor"),
|
|
1583
|
-
image: ["news", "simple", "default"].includes(
|
|
1584
|
-
actions: (l = (s = d.actions) == null ? void 0 : s.map) == null ? void 0 : l.call(s, (c) => /* @__PURE__ */ i(zt, { ...c, editing:
|
|
1585
|
-
border:
|
|
1586
|
-
iconSize:
|
|
1587
|
-
imageSize:
|
|
1588
|
-
hoverStyle:
|
|
1588
|
+
image: ["news", "simple", "default"].includes(n.type) && d.icon ? d.icon : d.image,
|
|
1589
|
+
actions: (l = (s = d.actions) == null ? void 0 : s.map) == null ? void 0 : l.call(s, (c) => /* @__PURE__ */ i(zt, { ...c, editing: r }, c.id)),
|
|
1590
|
+
border: n.listBorder,
|
|
1591
|
+
iconSize: n.iconSize,
|
|
1592
|
+
imageSize: n.imageSize,
|
|
1593
|
+
hoverStyle: n.hoverStyle
|
|
1589
1594
|
};
|
|
1590
1595
|
})
|
|
1591
1596
|
};
|
|
1592
|
-
}, [
|
|
1593
|
-
return /* @__PURE__ */ i(so, { style:
|
|
1597
|
+
}, [n]);
|
|
1598
|
+
return /* @__PURE__ */ i(so, { style: r ? { pointerEvents: "none" } : {}, ...o });
|
|
1594
1599
|
}
|
|
1595
1600
|
function co({
|
|
1596
1601
|
properties: t,
|
|
1597
1602
|
section: e,
|
|
1598
|
-
locale:
|
|
1599
|
-
dev:
|
|
1603
|
+
locale: r,
|
|
1604
|
+
dev: n
|
|
1600
1605
|
}) {
|
|
1601
1606
|
var o;
|
|
1602
1607
|
return (o = e == null ? void 0 : e.config) != null && o.componentId ? /* @__PURE__ */ i(
|
|
@@ -1607,37 +1612,37 @@ function co({
|
|
|
1607
1612
|
blockletId: e.config.blockletId,
|
|
1608
1613
|
blockletTitle: e.config.blockletTitle,
|
|
1609
1614
|
componentName: e.config.componentName,
|
|
1610
|
-
locale:
|
|
1615
|
+
locale: r,
|
|
1611
1616
|
properties: t,
|
|
1612
|
-
dev:
|
|
1617
|
+
dev: n
|
|
1613
1618
|
}
|
|
1614
1619
|
) : /* @__PURE__ */ i(b, { textAlign: "center", py: 2, children: /* @__PURE__ */ i(C, { variant: "caption", color: "text.secondary", children: "Please select component to render" }) });
|
|
1615
1620
|
}
|
|
1616
1621
|
function mo({
|
|
1617
1622
|
src: t,
|
|
1618
1623
|
dataId: e,
|
|
1619
|
-
isEdit:
|
|
1620
|
-
height:
|
|
1624
|
+
isEdit: r = !1,
|
|
1625
|
+
height: n = "100%",
|
|
1621
1626
|
onLoad: o = () => {
|
|
1622
1627
|
}
|
|
1623
1628
|
}) {
|
|
1624
1629
|
return /* @__PURE__ */ i(
|
|
1625
1630
|
ue,
|
|
1626
1631
|
{
|
|
1627
|
-
isEdit:
|
|
1632
|
+
isEdit: r,
|
|
1628
1633
|
embedId: e,
|
|
1629
1634
|
src: t,
|
|
1630
|
-
height:
|
|
1635
|
+
height: n,
|
|
1631
1636
|
onLoad: () => {
|
|
1632
1637
|
o();
|
|
1633
1638
|
}
|
|
1634
1639
|
}
|
|
1635
1640
|
);
|
|
1636
1641
|
}
|
|
1637
|
-
function po({ dataId: t, src: e, actions:
|
|
1638
|
-
const [d, s] = $(a,
|
|
1639
|
-
return /* @__PURE__ */ w(
|
|
1640
|
-
Object.keys(d).length > 0 && /* @__PURE__ */ i(
|
|
1642
|
+
function po({ dataId: t, src: e, actions: r, center: n, onLoad: o, ...a }) {
|
|
1643
|
+
const [d, s] = $(a, A);
|
|
1644
|
+
return /* @__PURE__ */ w(F, { ...s, children: [
|
|
1645
|
+
Object.keys(d).length > 0 && /* @__PURE__ */ i(O, { center: n, ...d }),
|
|
1641
1646
|
/* @__PURE__ */ i(
|
|
1642
1647
|
mo,
|
|
1643
1648
|
{
|
|
@@ -1647,7 +1652,7 @@ function po({ dataId: t, src: e, actions: n, center: r, onLoad: o, ...a }) {
|
|
|
1647
1652
|
height: a.iframeHeight ? `${a.iframeHeight}px` : "100%"
|
|
1648
1653
|
}
|
|
1649
1654
|
),
|
|
1650
|
-
/* @__PURE__ */ i(z, { actions:
|
|
1655
|
+
/* @__PURE__ */ i(z, { actions: r, center: n })
|
|
1651
1656
|
] });
|
|
1652
1657
|
}
|
|
1653
1658
|
const pn = {
|
|
@@ -1661,14 +1666,14 @@ const pn = {
|
|
|
1661
1666
|
config: {},
|
|
1662
1667
|
id: ""
|
|
1663
1668
|
};
|
|
1664
|
-
function uo({ section: t, id: e, src:
|
|
1665
|
-
const o = `${e}-${
|
|
1666
|
-
return
|
|
1669
|
+
function uo({ section: t, id: e, src: r, ...n }) {
|
|
1670
|
+
const o = `${e}-${n.locale}`, [{ editing: a }, d] = $(n, U), s = tt({}), l = JSON.parse(JSON.stringify(d)), { message: c } = de(o, "server"), m = me(JSON.parse(JSON.stringify(d.config) || "{}"));
|
|
1671
|
+
return E(() => {
|
|
1667
1672
|
c && c.onInit(() => m.current);
|
|
1668
|
-
}, [c]),
|
|
1673
|
+
}, [c]), E(() => {
|
|
1669
1674
|
const p = JSON.parse(JSON.stringify(d.config) || "{}");
|
|
1670
1675
|
pe(s.current, p) || (s.current = p, c == null || c.send("config-set", p));
|
|
1671
|
-
}, [c, d.config]),
|
|
1676
|
+
}, [c, d.config]), r ? /* @__PURE__ */ i(po, { ...l, dataId: o, src: r, style: a ? { pointerEvents: "none" } : {} }) : /* @__PURE__ */ i(ho, { children: 'Please set the "src" attribute for this block' });
|
|
1672
1677
|
}
|
|
1673
1678
|
const ho = _("div")`
|
|
1674
1679
|
user-select: none;
|
|
@@ -1690,10 +1695,10 @@ const ho = _("div")`
|
|
|
1690
1695
|
function go(t) {
|
|
1691
1696
|
var e;
|
|
1692
1697
|
if (/youtu\.?be/.test(t))
|
|
1693
|
-
for (const
|
|
1694
|
-
const
|
|
1695
|
-
if (
|
|
1696
|
-
return
|
|
1698
|
+
for (const r of fo) {
|
|
1699
|
+
const n = (e = r.exec(t)) == null ? void 0 : e[1];
|
|
1700
|
+
if (n)
|
|
1701
|
+
return n;
|
|
1697
1702
|
}
|
|
1698
1703
|
}
|
|
1699
1704
|
function xo(t) {
|
|
@@ -1702,7 +1707,7 @@ function xo(t) {
|
|
|
1702
1707
|
return `https://youtube.com/embed/${e}`;
|
|
1703
1708
|
}
|
|
1704
1709
|
function bo({ src: t }) {
|
|
1705
|
-
return
|
|
1710
|
+
return E(() => {
|
|
1706
1711
|
import("@lottiefiles/lottie-player");
|
|
1707
1712
|
}, []), /* @__PURE__ */ i("lottie-player", { autoplay: !0, loop: !0, mode: "normal", src: t });
|
|
1708
1713
|
}
|
|
@@ -1710,26 +1715,26 @@ function yo(t) {
|
|
|
1710
1715
|
return /* @__PURE__ */ i(b, { maxHeight: 400, overflow: "hidden auto", children: /* @__PURE__ */ i(he, { ...t }) });
|
|
1711
1716
|
}
|
|
1712
1717
|
function wo({ url: t }) {
|
|
1713
|
-
const e = tt(null),
|
|
1714
|
-
e.current ? e.current.offsetWidth * 0.5625 :
|
|
1715
|
-
), a =
|
|
1716
|
-
const d = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 :
|
|
1718
|
+
const e = tt(null), r = 495, [n, o] = K(
|
|
1719
|
+
e.current ? e.current.offsetWidth * 0.5625 : r
|
|
1720
|
+
), a = M(() => {
|
|
1721
|
+
const d = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : r;
|
|
1717
1722
|
return o(Math.floor(s * d));
|
|
1718
1723
|
}, []);
|
|
1719
|
-
return
|
|
1724
|
+
return E(() => {
|
|
1720
1725
|
window.addEventListener("resize", a);
|
|
1721
|
-
const d = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 :
|
|
1726
|
+
const d = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : r;
|
|
1722
1727
|
return o(Math.floor(s * d)), function() {
|
|
1723
1728
|
window.removeEventListener("resize", a);
|
|
1724
1729
|
};
|
|
1725
|
-
}, [
|
|
1730
|
+
}, [n, a]), /* @__PURE__ */ i(
|
|
1726
1731
|
b,
|
|
1727
1732
|
{
|
|
1728
1733
|
component: "iframe",
|
|
1729
1734
|
ref: e,
|
|
1730
1735
|
title: "youtube",
|
|
1731
1736
|
width: "100%",
|
|
1732
|
-
height: `${
|
|
1737
|
+
height: `${n}px`,
|
|
1733
1738
|
src: t,
|
|
1734
1739
|
frameBorder: "0",
|
|
1735
1740
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
@@ -1756,8 +1761,8 @@ const un = {
|
|
|
1756
1761
|
function ko({
|
|
1757
1762
|
hasImage: t,
|
|
1758
1763
|
fullSizeImage: e,
|
|
1759
|
-
boxed:
|
|
1760
|
-
videoPoster:
|
|
1764
|
+
boxed: r,
|
|
1765
|
+
videoPoster: n,
|
|
1761
1766
|
imageMeta: o,
|
|
1762
1767
|
imageOptimization: a,
|
|
1763
1768
|
imageSize: d,
|
|
@@ -1765,8 +1770,8 @@ function ko({
|
|
|
1765
1770
|
...l
|
|
1766
1771
|
}) {
|
|
1767
1772
|
var u, f;
|
|
1768
|
-
const [{ editing: c }, m] = $({ ...l, boxed: e ? void 0 :
|
|
1769
|
-
let p = _o(m.image,
|
|
1773
|
+
const [{ editing: c }, m] = $({ ...l, boxed: e ? void 0 : r }, U);
|
|
1774
|
+
let p = _o(m.image, n, e, o, a, d);
|
|
1770
1775
|
t || (p = null);
|
|
1771
1776
|
let h = null;
|
|
1772
1777
|
return m.actions && (h = (f = (u = m.actions) == null ? void 0 : u.map) == null ? void 0 : f.call(u, (y, x) => /* @__PURE__ */ i(zt, { ...y, editing: c }, x))), /* @__PURE__ */ i(
|
|
@@ -1780,7 +1785,7 @@ function ko({
|
|
|
1780
1785
|
}
|
|
1781
1786
|
);
|
|
1782
1787
|
}
|
|
1783
|
-
function _o(t, e,
|
|
1788
|
+
function _o(t, e, r, n, o, a) {
|
|
1784
1789
|
if (t) {
|
|
1785
1790
|
if (t.endsWith(".json"))
|
|
1786
1791
|
return /* @__PURE__ */ i(bo, { src: t });
|
|
@@ -1789,8 +1794,8 @@ function _o(t, e, n, r, o, a) {
|
|
|
1789
1794
|
const d = xo(t);
|
|
1790
1795
|
if (d)
|
|
1791
1796
|
return /* @__PURE__ */ i(wo, { url: d });
|
|
1792
|
-
const { naturalWidth: s, naturalHeight: l, filename: c } =
|
|
1793
|
-
if (
|
|
1797
|
+
const { naturalWidth: s, naturalHeight: l, filename: c } = n || {};
|
|
1798
|
+
if (L(t))
|
|
1794
1799
|
return /* @__PURE__ */ i(
|
|
1795
1800
|
"video",
|
|
1796
1801
|
{
|
|
@@ -1806,7 +1811,7 @@ function _o(t, e, n, r, o, a) {
|
|
|
1806
1811
|
width: "100%",
|
|
1807
1812
|
height: "100%"
|
|
1808
1813
|
},
|
|
1809
|
-
poster: j(N(e),
|
|
1814
|
+
poster: j(N(e), r ? 1200 : 540, o),
|
|
1810
1815
|
children: /* @__PURE__ */ i("source", { src: N(t), type: We(t) })
|
|
1811
1816
|
},
|
|
1812
1817
|
t
|
|
@@ -1820,7 +1825,7 @@ function _o(t, e, n, r, o, a) {
|
|
|
1820
1825
|
sm: 600 * m,
|
|
1821
1826
|
md: 450 * m,
|
|
1822
1827
|
lg: 540 * m,
|
|
1823
|
-
...
|
|
1828
|
+
...r && {
|
|
1824
1829
|
md: 900 * m,
|
|
1825
1830
|
lg: 1200 * m
|
|
1826
1831
|
}
|
|
@@ -1837,27 +1842,27 @@ function _o(t, e, n, r, o, a) {
|
|
|
1837
1842
|
}
|
|
1838
1843
|
const hn = ["production", "draft"];
|
|
1839
1844
|
function fn({ mode: t, version: e } = {}) {
|
|
1840
|
-
const
|
|
1841
|
-
return et.get(`/api/${ot()}/pages`, { params:
|
|
1845
|
+
const r = e && typeof e == "number" ? { mode: t, version: e } : { mode: t };
|
|
1846
|
+
return et.get(`/api/${ot()}/pages`, { params: r }).then((n) => n.data);
|
|
1842
1847
|
}
|
|
1843
1848
|
function gn({ mode: t, routes: e }) {
|
|
1844
|
-
return et.post(`/api/${ot()}/pages/publish`, { mode: t, routes: e }).then((
|
|
1849
|
+
return et.post(`/api/${ot()}/pages/publish`, { mode: t, routes: e }).then((r) => r.data);
|
|
1845
1850
|
}
|
|
1846
1851
|
function $o({
|
|
1847
1852
|
locale: t,
|
|
1848
1853
|
sort: e,
|
|
1849
|
-
page:
|
|
1850
|
-
limit:
|
|
1854
|
+
page: r,
|
|
1855
|
+
limit: n,
|
|
1851
1856
|
mode: o
|
|
1852
1857
|
} = {}) {
|
|
1853
|
-
return et.get(`/api/${ot()}/pages/toc`, { params: { locale: t, sort: e, page:
|
|
1858
|
+
return et.get(`/api/${ot()}/pages/toc`, { params: { locale: t, sort: e, page: r, limit: n, mode: o } }).then((a) => a.data);
|
|
1854
1859
|
}
|
|
1855
1860
|
const xn = {
|
|
1856
1861
|
style: "list",
|
|
1857
1862
|
sort: "-updatedAt"
|
|
1858
1863
|
}, ft = 20;
|
|
1859
|
-
function No({ style: t, sort: e, section:
|
|
1860
|
-
const [{ editing: o, locale: a }, d] = $(
|
|
1864
|
+
function No({ style: t, sort: e, section: r, ...n }) {
|
|
1865
|
+
const [{ editing: o, locale: a }, d] = $(n, U), [s, l] = $(d, A), [c, m] = K(), p = tt(!1), h = fe(), u = ae(), f = M(async () => {
|
|
1861
1866
|
if (!p.current) {
|
|
1862
1867
|
p.current = !0, h();
|
|
1863
1868
|
try {
|
|
@@ -1873,9 +1878,9 @@ function No({ style: t, sort: e, section: n, ...r }) {
|
|
|
1873
1878
|
}, [c, a, e, h]);
|
|
1874
1879
|
return ge(() => {
|
|
1875
1880
|
f();
|
|
1876
|
-
}), /* @__PURE__ */ w(
|
|
1877
|
-
Object.keys(s).length > 0 && /* @__PURE__ */ i(
|
|
1878
|
-
c ? /* @__PURE__ */ w(
|
|
1881
|
+
}), /* @__PURE__ */ w(F, { ...l, sx: o ? { pointerEvents: "none" } : {}, children: [
|
|
1882
|
+
Object.keys(s).length > 0 && /* @__PURE__ */ i(O, { ...s }),
|
|
1883
|
+
c ? /* @__PURE__ */ w(J, { children: [
|
|
1879
1884
|
/* @__PURE__ */ i(st, { container: !0, spacing: 2, justifyContent: "center", children: c == null ? void 0 : c.list.map((y) => /* @__PURE__ */ i(st, { item: !0, xs: 12, sm: t === "card" ? 6 : 12, md: t === "card" ? 3 : 12, children: /* @__PURE__ */ w(
|
|
1880
1885
|
So,
|
|
1881
1886
|
{
|
|
@@ -1899,17 +1904,17 @@ function No({ style: t, sort: e, section: n, ...r }) {
|
|
|
1899
1904
|
]
|
|
1900
1905
|
}
|
|
1901
1906
|
) }, y.id)) }),
|
|
1902
|
-
/* @__PURE__ */ i(b, { textAlign: "center", mt: 2, children: c.total > c.list.length ? /* @__PURE__ */ i(
|
|
1907
|
+
/* @__PURE__ */ i(b, { textAlign: "center", mt: 2, children: c.total > c.list.length ? /* @__PURE__ */ i(T, { variant: "outlined", color: "secondary", onClick: f, loading: p.current, children: "More" }) : /* @__PURE__ */ i(T, { variant: "outlined", color: "secondary", disabled: !0, children: "No More" }) })
|
|
1903
1908
|
] }) : /* @__PURE__ */ i(b, { p: 2, textAlign: "center", children: /* @__PURE__ */ i(Dt, { size: 24 }) })
|
|
1904
1909
|
] });
|
|
1905
1910
|
}
|
|
1906
|
-
const gt =
|
|
1911
|
+
const gt = q`
|
|
1907
1912
|
display: -webkit-box;
|
|
1908
1913
|
-webkit-box-orient: vertical;
|
|
1909
1914
|
-webkit-line-clamp: 2;
|
|
1910
1915
|
overflow: hidden;
|
|
1911
1916
|
text-overflow: ellipsis;
|
|
1912
|
-
`, So = _(
|
|
1917
|
+
`, So = _(Vt)`
|
|
1913
1918
|
border: 1px solid #e0e0e0;
|
|
1914
1919
|
background-color: transparent;
|
|
1915
1920
|
cursor: pointer;
|
|
@@ -1937,14 +1942,14 @@ const gt = X`
|
|
|
1937
1942
|
"ai-runtime": Ae,
|
|
1938
1943
|
"custom-component": co
|
|
1939
1944
|
};
|
|
1940
|
-
function bn({ id: t, type: e, mode:
|
|
1945
|
+
function bn({ id: t, type: e, mode: r, config: n, section: o, ...a }) {
|
|
1941
1946
|
const d = Co[e], { getPageMetaStyle: s } = Se(), l = W(() => {
|
|
1942
|
-
const { height: p, ...h } =
|
|
1947
|
+
const { height: p, ...h } = n;
|
|
1943
1948
|
return h;
|
|
1944
|
-
}, [
|
|
1949
|
+
}, [n]), c = W(() => {
|
|
1945
1950
|
const p = {};
|
|
1946
|
-
return e !== "custom-component" && (p.height =
|
|
1947
|
-
}, [
|
|
1951
|
+
return e !== "custom-component" && (p.height = n.height), p.sx = s("sx"), p;
|
|
1952
|
+
}, [n.height, e, s]), m = d && /* @__PURE__ */ i(d, { mode: r, ...l, id: t, section: o });
|
|
1948
1953
|
return /* @__PURE__ */ i(Ee, { ...a, ...c, children: m });
|
|
1949
1954
|
}
|
|
1950
1955
|
function yn(t) {
|