@blocklet/pages-kit-inner-components 0.6.18 → 0.6.20
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/{draft-data-CVjF01PQ.js → draft-data-BM4piqW0.js} +1 -1
- package/lib/cjs/chunks/{home-BarvCpAK.js → home-D6CNLMDa.js} +2 -2
- package/lib/cjs/chunks/index-D3fT0ax0.js +475 -0
- package/lib/cjs/chunks/{publish-button-CNo2gT6Q.js → publish-button-FsuH_RMC.js} +1 -1
- package/lib/cjs/chunks/state-tEydRMV8.js +1 -0
- package/lib/cjs/home.js +1 -1
- package/lib/cjs/locales.js +2 -2
- package/lib/cjs/setting.js +1 -1
- package/lib/es/add-component.js +6 -8
- package/lib/es/chunks/{draft-data-BiayOfQz.js → draft-data-CpCuyq4R.js} +1 -1
- package/lib/es/chunks/{home-DBc-g4K0.js → home-Dmze9ay0.js} +3 -3
- package/lib/es/chunks/{index-DaF8ujCZ.js → index-aeMNll_R.js} +598 -490
- package/lib/es/chunks/{publish-button-DiKDLFU8.js → publish-button-BPtL08Ue.js} +3 -3
- package/lib/es/chunks/state-DSo43FAB.js +601 -0
- package/lib/es/home.js +3 -3
- package/lib/es/locales.js +17 -4
- package/lib/es/setting.js +1 -1
- package/package.json +12 -12
- package/lib/cjs/chunks/index-DH8UBqWG.js +0 -475
- package/lib/cjs/chunks/state-DCxHc_MB.js +0 -1
- package/lib/es/chunks/state-C3hsEhCe.js +0 -569
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsx as r, jsxs as w, Fragment as
|
|
2
|
-
import { ErrorOutline as
|
|
3
|
-
import { Box as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { styled as _, useTheme as
|
|
9
|
-
import { cx as
|
|
10
|
-
import
|
|
11
|
-
import { Link as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { Icon as
|
|
15
|
-
import { e as
|
|
16
|
-
import
|
|
17
|
-
import { useColorConvert as
|
|
18
|
-
import { materialDark as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { ResponsiveImage as
|
|
22
|
-
import { isGradient as
|
|
23
|
-
import
|
|
24
|
-
import { join as
|
|
25
|
-
import { withoutTrailingSlash as
|
|
26
|
-
import { useMessage as
|
|
27
|
-
import { useLatest as
|
|
28
|
-
import
|
|
29
|
-
import { EmbedIframe as
|
|
30
|
-
import { useLocaleContext as
|
|
31
|
-
import
|
|
32
|
-
import { TwitterTimelineEmbed as
|
|
33
|
-
import { useUpdate as
|
|
34
|
-
const
|
|
1
|
+
import { jsx as r, jsxs as w, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
+
import { ErrorOutline as Dt } from "@mui/icons-material";
|
|
3
|
+
import { Box as h, styled as Gt, Typography as L, Container as Ht, useTheme as Yt, useMediaQuery as Vt, Card as Jt, CircularProgress as Kt, Grid as ht, CardMedia as Xt, CardContent as qt, Alert as Qt } from "@mui/material";
|
|
4
|
+
import Zt from "lodash/isEmpty";
|
|
5
|
+
import lt from "lodash/pick";
|
|
6
|
+
import te, { createContext as $t, useMemo as S, useCallback as D, useContext as Ct, useState as Z, useEffect as G, Fragment as ee, isValidElement as St, useRef as ct } from "react";
|
|
7
|
+
import z from "lodash/keyBy";
|
|
8
|
+
import { styled as _, useTheme as Nt } from "@arcblock/ux/lib/Theme";
|
|
9
|
+
import { cx as x, css as it } from "@emotion/css";
|
|
10
|
+
import N from "lodash/omit";
|
|
11
|
+
import { Link as oe, NavLink as ne, useNavigate as re } from "react-router-dom";
|
|
12
|
+
import ie from "@arcblock/ux/lib/Button";
|
|
13
|
+
import at from "is-uri";
|
|
14
|
+
import { Icon as Bt } from "@iconify-icon/react";
|
|
15
|
+
import { e as A, f as B, i as dt, l as mt } from "./state-DSo43FAB.js";
|
|
16
|
+
import ae from "@blocklet/pages-kit/builtin/markdown/markdown-renderer";
|
|
17
|
+
import { useColorConvert as Mt } from "@blocklet/pages-kit/contexts/color";
|
|
18
|
+
import { materialDark as se } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
19
|
+
import le from "@arcblock/react-hooks/lib/useBrowser";
|
|
20
|
+
import ft from "@arcblock/ux/lib/Colors";
|
|
21
|
+
import { ResponsiveImage as Pt, CustomComponentRenderer as ce } from "@blocklet/pages-kit/components";
|
|
22
|
+
import { isGradient as de, isColorString as me } from "@blocklet/pages-kit/utils/style";
|
|
23
|
+
import It from "@mui/material/useMediaQuery";
|
|
24
|
+
import { join as X } from "pathe";
|
|
25
|
+
import { withoutTrailingSlash as rt, isRelative as pe, parseURL as ue } from "ufo";
|
|
26
|
+
import { useMessage as ge } from "@blocklet/embed/message";
|
|
27
|
+
import { useLatest as he } from "ahooks";
|
|
28
|
+
import fe from "lodash/isEqual";
|
|
29
|
+
import { EmbedIframe as xe } from "@blocklet/embed/react";
|
|
30
|
+
import { useLocaleContext as be } from "@arcblock/ux/lib/Locale/context";
|
|
31
|
+
import ye from "@arcblock/ux/lib/Screenshot";
|
|
32
|
+
import { TwitterTimelineEmbed as we } from "react-twitter-embed";
|
|
33
|
+
import { useUpdate as ve, useMount as ke } from "react-use";
|
|
34
|
+
const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
35
35
|
{
|
|
36
36
|
title: "None",
|
|
37
37
|
value: "none",
|
|
@@ -52,7 +52,7 @@ const $t = "{{CUSTOM_VALUE}}", fe = [
|
|
|
52
52
|
value: "large",
|
|
53
53
|
sx: { py: { xs: 7.5, md: 10, lg: 12.5, xl: 15 } }
|
|
54
54
|
}
|
|
55
|
-
],
|
|
55
|
+
], $e = [
|
|
56
56
|
{
|
|
57
57
|
title: "None",
|
|
58
58
|
value: "none",
|
|
@@ -73,7 +73,7 @@ const $t = "{{CUSTOM_VALUE}}", fe = [
|
|
|
73
73
|
value: "large",
|
|
74
74
|
sx: { py: { xs: 6, md: 9, lg: 9, xl: 11 } }
|
|
75
75
|
}
|
|
76
|
-
],
|
|
76
|
+
], Ce = [
|
|
77
77
|
{
|
|
78
78
|
title: "None",
|
|
79
79
|
value: "none",
|
|
@@ -94,17 +94,17 @@ const $t = "{{CUSTOM_VALUE}}", fe = [
|
|
|
94
94
|
value: "large",
|
|
95
95
|
sx: { px: { xs: 2.5, md: 10, lg: 12.5, xl: 15 } }
|
|
96
96
|
}
|
|
97
|
-
],
|
|
97
|
+
], q = (t, e, o) => {
|
|
98
98
|
const n = t.breakpoints.values[o];
|
|
99
99
|
return `${e}${n ? ` (${n}px)` : ""}`;
|
|
100
|
-
},
|
|
100
|
+
}, Se = [
|
|
101
101
|
{
|
|
102
102
|
title: "100%",
|
|
103
103
|
value: "full",
|
|
104
104
|
sx: { maxWidth: "100%" }
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
|
-
title: (t) =>
|
|
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 $t = "{{CUSTOM_VALUE}}", fe = [
|
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
|
-
title: (t) =>
|
|
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) =>
|
|
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) =>
|
|
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,20 +131,96 @@ const $t = "{{CUSTOM_VALUE}}", fe = [
|
|
|
131
131
|
title: "Custom",
|
|
132
132
|
value: "custom",
|
|
133
133
|
sx: {
|
|
134
|
-
maxWidth:
|
|
134
|
+
maxWidth: Wt,
|
|
135
135
|
width: "100%",
|
|
136
136
|
mx: "auto"
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
],
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
], Ne = [
|
|
140
|
+
{
|
|
141
|
+
title: "None",
|
|
142
|
+
value: "none",
|
|
143
|
+
sx: { gap: 0 }
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
title: "Small",
|
|
147
|
+
value: "small",
|
|
148
|
+
sx: { gap: { xs: 1, md: 2, lg: 2, xl: 3 } }
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
title: "Normal",
|
|
152
|
+
value: "normal",
|
|
153
|
+
sx: { gap: { xs: 2, md: 4, lg: 4, xl: 6 } }
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
title: "Large",
|
|
157
|
+
value: "large",
|
|
158
|
+
sx: { gap: { xs: 3, md: 5, lg: 5, xl: 7 } }
|
|
159
|
+
}
|
|
160
|
+
], Be = [
|
|
161
|
+
{
|
|
162
|
+
title: "None",
|
|
163
|
+
value: "none",
|
|
164
|
+
sx: { p: 0 }
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
title: "Small",
|
|
168
|
+
value: "small",
|
|
169
|
+
sx: { p: { xs: 1, md: 2, lg: 2, xl: 3 } }
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
title: "Normal",
|
|
173
|
+
value: "normal",
|
|
174
|
+
sx: { p: { xs: 2.5, md: 5, lg: 5, xl: 7.5 } }
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
title: "Large",
|
|
178
|
+
value: "large",
|
|
179
|
+
sx: { p: { xs: 3, md: 6, lg: 6, xl: 9 } }
|
|
180
|
+
}
|
|
181
|
+
], Me = [
|
|
182
|
+
{
|
|
183
|
+
title: "Start",
|
|
184
|
+
value: "start",
|
|
185
|
+
sx: { alignContent: "start" }
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
title: "End",
|
|
189
|
+
value: "end",
|
|
190
|
+
sx: { alignContent: "end" }
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
title: "Center",
|
|
194
|
+
value: "center",
|
|
195
|
+
sx: { alignContent: "center" }
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
title: "Space Between",
|
|
199
|
+
value: "space-between",
|
|
200
|
+
sx: { alignContent: "space-between" }
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
title: "Space Around",
|
|
204
|
+
value: "space-around",
|
|
205
|
+
sx: { alignContent: "space-around" }
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
title: "Space Evenly",
|
|
209
|
+
value: "space-evenly",
|
|
210
|
+
sx: { alignContent: "space-evenly" }
|
|
211
|
+
}
|
|
212
|
+
], Pe = z(_e, "value"), Ie = z($e, "value"), We = z(Ce, "value"), Le = z(Se, "value"), Ae = z(Ne, "value"), ze = z(Be, "value"), Re = z(Me, "value"), je = /* @__PURE__ */ new Map([
|
|
213
|
+
["baseSectionPaddingY", Pe],
|
|
214
|
+
["maxWidth", Le],
|
|
215
|
+
["paddingY", Ie],
|
|
216
|
+
["paddingX", We],
|
|
217
|
+
["layoutBlockGap", Ae],
|
|
218
|
+
["layoutBlockPadding", ze],
|
|
219
|
+
["layoutBlockAlignContent", Re]
|
|
144
220
|
]);
|
|
145
|
-
function
|
|
146
|
-
const { type: e, value: o, format: n = "sx", defaultValue: i = null } = t, a =
|
|
147
|
-
if (!a)
|
|
221
|
+
function U(t) {
|
|
222
|
+
const { type: e, value: o, format: n = "sx", defaultValue: i = null } = t, a = je.get(e);
|
|
223
|
+
if (!a || typeof o != "string" || !o)
|
|
148
224
|
return i;
|
|
149
225
|
const c = o.startsWith("custom:"), s = c ? "custom" : o;
|
|
150
226
|
if (a?.[s] && a?.[s]?.[n]) {
|
|
@@ -152,7 +228,7 @@ function St(t) {
|
|
|
152
228
|
if (c) {
|
|
153
229
|
const d = o.replace("custom:", "");
|
|
154
230
|
try {
|
|
155
|
-
return JSON.parse(JSON.stringify(l || {}).replaceAll(
|
|
231
|
+
return JSON.parse(JSON.stringify(l || {}).replaceAll(Wt, d));
|
|
156
232
|
} catch {
|
|
157
233
|
}
|
|
158
234
|
}
|
|
@@ -160,41 +236,41 @@ function St(t) {
|
|
|
160
236
|
}
|
|
161
237
|
return i;
|
|
162
238
|
}
|
|
163
|
-
const
|
|
239
|
+
const Lt = $t({
|
|
164
240
|
page: null,
|
|
165
241
|
getPageMeta: () => ({}),
|
|
166
242
|
getPageMetaStyle: () => ({})
|
|
167
243
|
});
|
|
168
|
-
function
|
|
169
|
-
return
|
|
244
|
+
function Ee() {
|
|
245
|
+
return Ct(Lt);
|
|
170
246
|
}
|
|
171
|
-
function
|
|
247
|
+
function In({
|
|
172
248
|
page: t,
|
|
173
249
|
children: e,
|
|
174
250
|
defaultLocale: o = "en",
|
|
175
251
|
currentLocale: n
|
|
176
252
|
}) {
|
|
177
|
-
const i =
|
|
253
|
+
const i = S(() => t ? JSON.parse(JSON.stringify(t)) : null, [JSON.stringify(t)]), a = D(() => {
|
|
178
254
|
if (!i) return {};
|
|
179
255
|
const l = n || o;
|
|
180
256
|
return i.locales?.[l] ?? {};
|
|
181
|
-
}, [i, o, n]), c =
|
|
257
|
+
}, [i, o, n]), c = D(
|
|
182
258
|
(l = "sx") => {
|
|
183
259
|
const d = a();
|
|
184
|
-
return !d || !d.style ? {} : Object.entries(d.style || {}).reduce((m, [
|
|
260
|
+
return !d || !d.style ? {} : Object.entries(d.style || {}).reduce((m, [g, u]) => {
|
|
185
261
|
if (!u) return m;
|
|
186
|
-
const
|
|
187
|
-
d.style[
|
|
188
|
-
const
|
|
189
|
-
type:
|
|
262
|
+
const b = `${g}Custom`;
|
|
263
|
+
d.style[b];
|
|
264
|
+
const f = U({
|
|
265
|
+
type: g,
|
|
190
266
|
value: u,
|
|
191
267
|
format: l
|
|
192
268
|
});
|
|
193
|
-
return
|
|
269
|
+
return f ? { ...m, ...f } : m;
|
|
194
270
|
}, {});
|
|
195
271
|
},
|
|
196
272
|
[a]
|
|
197
|
-
), s =
|
|
273
|
+
), s = S(
|
|
198
274
|
() => ({
|
|
199
275
|
page: i,
|
|
200
276
|
getPageMeta: a,
|
|
@@ -202,39 +278,39 @@ function hn({
|
|
|
202
278
|
}),
|
|
203
279
|
[i, a, c]
|
|
204
280
|
);
|
|
205
|
-
return /* @__PURE__ */ r(
|
|
281
|
+
return /* @__PURE__ */ r(Lt.Provider, { value: s, children: e });
|
|
206
282
|
}
|
|
207
|
-
const
|
|
208
|
-
function
|
|
283
|
+
const tt = ["editing", "height", "locale", "dev", "sx"];
|
|
284
|
+
function Te(t) {
|
|
209
285
|
const { className: e, ...o } = t;
|
|
210
|
-
return /* @__PURE__ */ r(
|
|
286
|
+
return /* @__PURE__ */ r(Oe, { ...o, className: x("BlockBase-root", e) });
|
|
211
287
|
}
|
|
212
|
-
const
|
|
288
|
+
const Oe = _(h)`
|
|
213
289
|
position: relative;
|
|
214
290
|
color: ${({ theme: t }) => t.palette.text.primary};
|
|
215
|
-
`,
|
|
291
|
+
`, At = $t({
|
|
216
292
|
pages: [],
|
|
217
293
|
project: void 0
|
|
218
|
-
}), { Provider:
|
|
219
|
-
function
|
|
220
|
-
return
|
|
294
|
+
}), { Provider: Wn, Consumer: Ln } = At;
|
|
295
|
+
function zt() {
|
|
296
|
+
return Ct(At);
|
|
221
297
|
}
|
|
222
|
-
function
|
|
223
|
-
return /* @__PURE__ */ r(
|
|
298
|
+
function Ue({ icon: t, ...e }) {
|
|
299
|
+
return /* @__PURE__ */ r(Bt, { icon: t, ...e, ref: null });
|
|
224
300
|
}
|
|
225
|
-
function
|
|
226
|
-
return /* @__PURE__ */ r(
|
|
301
|
+
function Fe({ icon: t, className: e = "", size: o = "1rem", ...n }) {
|
|
302
|
+
return /* @__PURE__ */ r(De, { component: Ue, className: x("css-icon", e), size: o, ...n, icon: t });
|
|
227
303
|
}
|
|
228
|
-
const
|
|
304
|
+
const De = _(h)`
|
|
229
305
|
&.css-icon {
|
|
230
306
|
display: inline-block;
|
|
231
307
|
width: ${({ size: t }) => t};
|
|
232
308
|
height: ${({ size: t }) => t};
|
|
233
309
|
}
|
|
234
310
|
`;
|
|
235
|
-
function
|
|
236
|
-
const a =
|
|
237
|
-
return c ? /* @__PURE__ */ r(
|
|
311
|
+
function Ge({ icon: t, className: e = "", size: o = "1rem", imageMeta: n, ...i }) {
|
|
312
|
+
const a = A(B(t), 540), [c, s] = Z(!1), l = Nt();
|
|
313
|
+
return c ? /* @__PURE__ */ r(Fe, { icon: "i-mdi:image", color: l.palette.grey[500], size: o, className: e, ...i }) : /* @__PURE__ */ r(He, { className: x("image-icon", e), size: o, ...i, children: /* @__PURE__ */ r(
|
|
238
314
|
"img",
|
|
239
315
|
{
|
|
240
316
|
className: "image-icon__image",
|
|
@@ -247,7 +323,7 @@ function We({ icon: t, className: e = "", size: o = "1rem", imageMeta: n, ...i }
|
|
|
247
323
|
}
|
|
248
324
|
) });
|
|
249
325
|
}
|
|
250
|
-
const
|
|
326
|
+
const He = _(h)`
|
|
251
327
|
display: inline-block;
|
|
252
328
|
width: ${({ size: t }) => t};
|
|
253
329
|
height: ${({ size: t }) => t};
|
|
@@ -256,33 +332,33 @@ const Pe = _(f)`
|
|
|
256
332
|
height: 100%;
|
|
257
333
|
width: 100%;
|
|
258
334
|
}
|
|
259
|
-
`,
|
|
260
|
-
function
|
|
335
|
+
`, pt = (t) => typeof t == "string" && /^[\w-_]+:[\w-_]+$/.test(t);
|
|
336
|
+
function st({ icon: t, size: e = "1rem", imageMeta: o, ...n }) {
|
|
261
337
|
const i = window.isNaN(e) ? e : `${e}px`;
|
|
262
|
-
return
|
|
338
|
+
return pt(t) ? /* @__PURE__ */ r(Bt, { icon: t }) : /* @__PURE__ */ r(Ye, { component: Ge, imageMeta: o, className: "base-icon", icon: t, size: i, ...n });
|
|
263
339
|
}
|
|
264
|
-
const
|
|
340
|
+
const Ye = _(h)`
|
|
265
341
|
flex-shrink: 0;
|
|
266
342
|
`;
|
|
267
|
-
function
|
|
268
|
-
const l = o ? /* @__PURE__ */ r(
|
|
269
|
-
return p && (m.href = p,
|
|
343
|
+
function F({ text: t, children: e, icon: o = "", endIcon: n, color: i = "primary", link: a = "", href: c = "", ...s }) {
|
|
344
|
+
const l = o ? /* @__PURE__ */ r(st, { icon: o }) : null, d = n ? /* @__PURE__ */ r(st, { icon: n }) : null, p = a || c, m = { ...s };
|
|
345
|
+
return p && (m.href = p, at(p) && (m.target = m.target || "_blank")), /* @__PURE__ */ r(ie, { startIcon: l, endIcon: d, color: i, ...m, children: t || e });
|
|
270
346
|
}
|
|
271
|
-
function
|
|
272
|
-
const { pages: n = [] } =
|
|
347
|
+
function Rt({ editing: t, text: e, ...o }) {
|
|
348
|
+
const { pages: n = [] } = zt(), i = n.find((a) => a.id === (o.link || o.linkId));
|
|
273
349
|
if (t)
|
|
274
|
-
return /* @__PURE__ */ r(
|
|
350
|
+
return /* @__PURE__ */ r(F, { ...N(o, ["link", "linkId"]), children: e });
|
|
275
351
|
if (i) {
|
|
276
352
|
const a = i.path || "/";
|
|
277
|
-
return /* @__PURE__ */ r(
|
|
353
|
+
return /* @__PURE__ */ r(oe, { to: a, children: /* @__PURE__ */ r(F, { ...N(o, ["link", "linkId"]), children: e }) });
|
|
278
354
|
}
|
|
279
|
-
return /* @__PURE__ */ r(
|
|
355
|
+
return /* @__PURE__ */ r(F, { ...N(o, "linkId"), children: e });
|
|
280
356
|
}
|
|
281
357
|
function j({ actions: t, center: e, className: o, align: n }) {
|
|
282
358
|
return t && t?.length ? /* @__PURE__ */ r(
|
|
283
|
-
|
|
359
|
+
h,
|
|
284
360
|
{
|
|
285
|
-
className:
|
|
361
|
+
className: x(
|
|
286
362
|
"flex gap-4 flex-wrap",
|
|
287
363
|
"lg:flex-row lg:gap-8",
|
|
288
364
|
(e || n === "center") && "justify-center",
|
|
@@ -295,7 +371,7 @@ function j({ actions: t, center: e, className: o, align: n }) {
|
|
|
295
371
|
}
|
|
296
372
|
) : null;
|
|
297
373
|
}
|
|
298
|
-
const
|
|
374
|
+
const Ve = "section", Je = Gt(h)`
|
|
299
375
|
overflow: hidden;
|
|
300
376
|
|
|
301
377
|
.section__title {
|
|
@@ -346,7 +422,7 @@ const ze = "section", Re = Et(f)`
|
|
|
346
422
|
margin-bottom: 0.5rem;
|
|
347
423
|
}
|
|
348
424
|
}
|
|
349
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
425
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[Ve]}px) {
|
|
350
426
|
.section__tag {
|
|
351
427
|
margin-bottom: 32px;
|
|
352
428
|
}
|
|
@@ -358,7 +434,7 @@ const ze = "section", Re = Et(f)`
|
|
|
358
434
|
}
|
|
359
435
|
}
|
|
360
436
|
`;
|
|
361
|
-
function
|
|
437
|
+
function et({
|
|
362
438
|
title: t,
|
|
363
439
|
description: e,
|
|
364
440
|
descriptionMarkdown: o,
|
|
@@ -371,74 +447,74 @@ function X({
|
|
|
371
447
|
tag: d,
|
|
372
448
|
badge: p,
|
|
373
449
|
center: m,
|
|
374
|
-
logo:
|
|
450
|
+
logo: g,
|
|
375
451
|
titleAppearance: u,
|
|
376
|
-
descriptionAppearance:
|
|
377
|
-
...
|
|
452
|
+
descriptionAppearance: b,
|
|
453
|
+
...f
|
|
378
454
|
}) {
|
|
379
|
-
const
|
|
380
|
-
if (!t && !e && !n && !p && !d && !c && !s && !
|
|
381
|
-
const
|
|
455
|
+
const y = Mt();
|
|
456
|
+
if (!t && !e && !n && !p && !d && !c && !s && !g) return null;
|
|
457
|
+
const k = Math.max(Math.min(5, l + 1), 1), $ = {
|
|
382
458
|
1: "xl:!text-3xl lg:!text-2xl md:!text-xl",
|
|
383
459
|
2: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
384
460
|
3: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
385
461
|
4: "xl:!text-xl lg:!text-lg md:!text-md",
|
|
386
462
|
5: "xl:!text-lg md:!text-md sm:!text-sm",
|
|
387
463
|
6: "!text-sm"
|
|
388
|
-
},
|
|
389
|
-
return /* @__PURE__ */ w(
|
|
464
|
+
}, P = l === 0 ? "big" : `h${k}`, C = l === 0;
|
|
465
|
+
return /* @__PURE__ */ w(Je, { className: x("base-info", "lg:text-left", m && "!text-center", i), ...f, children: [
|
|
390
466
|
c && /* @__PURE__ */ r("div", { children: c }),
|
|
391
|
-
(d || p) && /* @__PURE__ */ r("div", { className:
|
|
392
|
-
|
|
467
|
+
(d || p) && /* @__PURE__ */ r("div", { className: x("section__tag", a?.tag || a?.badge), children: d || p }),
|
|
468
|
+
g && /* @__PURE__ */ r("img", { className: "w-[120px] m-auto mb-8", src: g, alt: "info", loading: "lazy" }),
|
|
393
469
|
t && /* @__PURE__ */ r(
|
|
394
|
-
|
|
470
|
+
L,
|
|
395
471
|
{
|
|
396
472
|
sx: {
|
|
397
473
|
whiteSpace: "pre-wrap",
|
|
398
474
|
mb: e ? "2vw" : 0,
|
|
399
|
-
...u?.color && { color: `${
|
|
475
|
+
...u?.color && { color: `${y(u.color)} !important` }
|
|
400
476
|
},
|
|
401
|
-
className:
|
|
477
|
+
className: x(
|
|
402
478
|
"section__title",
|
|
403
479
|
"text-gray-800",
|
|
404
480
|
"dark:text-gray-50",
|
|
405
481
|
a.title,
|
|
406
482
|
"page-kit-section__title",
|
|
407
|
-
|
|
483
|
+
C ? "" : "section__title_non_big"
|
|
408
484
|
),
|
|
409
485
|
component: `h${Math.max(l, 1)}`,
|
|
410
|
-
variant:
|
|
486
|
+
variant: P,
|
|
411
487
|
children: t
|
|
412
488
|
}
|
|
413
489
|
),
|
|
414
490
|
e && (o ? /* @__PURE__ */ r(
|
|
415
|
-
|
|
491
|
+
h,
|
|
416
492
|
{
|
|
417
493
|
sx: {
|
|
418
|
-
...
|
|
494
|
+
...b?.color && { color: `${y(b.color)} !important` }
|
|
419
495
|
},
|
|
420
|
-
className:
|
|
496
|
+
className: x(
|
|
421
497
|
"section__description",
|
|
422
498
|
"text-gray-800",
|
|
423
499
|
"dark:text-gray-100",
|
|
424
|
-
k
|
|
500
|
+
$[k],
|
|
425
501
|
a.description,
|
|
426
502
|
"page-kit-section__description"
|
|
427
503
|
),
|
|
428
|
-
children: /* @__PURE__ */ r(
|
|
504
|
+
children: /* @__PURE__ */ r(ae, { codeOptions: { showActionButton: !1, theme: se }, children: e })
|
|
429
505
|
}
|
|
430
506
|
) : /* @__PURE__ */ r(
|
|
431
|
-
|
|
507
|
+
L,
|
|
432
508
|
{
|
|
433
509
|
sx: {
|
|
434
510
|
whiteSpace: "pre-wrap",
|
|
435
|
-
...
|
|
511
|
+
...b?.color && { color: `${y(b.color)} !important` }
|
|
436
512
|
},
|
|
437
|
-
className:
|
|
513
|
+
className: x(
|
|
438
514
|
"section__description",
|
|
439
515
|
"text-gray-800",
|
|
440
516
|
"dark:text-gray-100",
|
|
441
|
-
k
|
|
517
|
+
$[k],
|
|
442
518
|
a.description,
|
|
443
519
|
"page-kit-section__description"
|
|
444
520
|
),
|
|
@@ -452,7 +528,7 @@ function X({
|
|
|
452
528
|
s && /* @__PURE__ */ r("div", { children: s })
|
|
453
529
|
] });
|
|
454
530
|
}
|
|
455
|
-
const
|
|
531
|
+
const ot = [
|
|
456
532
|
"actions",
|
|
457
533
|
"append",
|
|
458
534
|
"badge",
|
|
@@ -467,28 +543,28 @@ const q = [
|
|
|
467
543
|
"titleAppearance",
|
|
468
544
|
"descriptionAppearance"
|
|
469
545
|
];
|
|
470
|
-
function
|
|
546
|
+
function Ke() {
|
|
471
547
|
const t = navigator.userAgent.toLowerCase();
|
|
472
548
|
return t.includes("safari") && !t.includes("chrome");
|
|
473
549
|
}
|
|
474
|
-
function
|
|
550
|
+
function Xe(t = "") {
|
|
475
551
|
if (t.startsWith("data:image/svg+xml,")) return !0;
|
|
476
552
|
const e = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, o = /^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;
|
|
477
553
|
return e.test(t) || o.test(t);
|
|
478
554
|
}
|
|
479
|
-
function
|
|
555
|
+
function O(t) {
|
|
480
556
|
return t?.endsWith(".mp4") || t?.endsWith(".m4v") || t?.endsWith(".webm");
|
|
481
557
|
}
|
|
482
|
-
function
|
|
558
|
+
function qe(t) {
|
|
483
559
|
return t?.endsWith(".mp4") || t?.endsWith(".m4v") ? "video/mp4" : t?.endsWith(".webm") ? "video/webm" : void 0;
|
|
484
560
|
}
|
|
485
|
-
function
|
|
561
|
+
function Qe(t) {
|
|
486
562
|
let e = {};
|
|
487
|
-
return typeof t == "string" ?
|
|
563
|
+
return typeof t == "string" ? de(t) ? e.image = t : (e.image = B(t), me(t) && (e.color = t, e.image = "")) : e = t, e;
|
|
488
564
|
}
|
|
489
|
-
function
|
|
490
|
-
const [t, e] =
|
|
491
|
-
return
|
|
565
|
+
function Ze() {
|
|
566
|
+
const [t, e] = Z(Date.now());
|
|
567
|
+
return G(() => {
|
|
492
568
|
const o = () => {
|
|
493
569
|
e(Date.now());
|
|
494
570
|
};
|
|
@@ -497,14 +573,14 @@ function Oe() {
|
|
|
497
573
|
};
|
|
498
574
|
}, []), t;
|
|
499
575
|
}
|
|
500
|
-
function
|
|
576
|
+
function xt(t, e, o, n, i) {
|
|
501
577
|
let a = null;
|
|
502
|
-
const { color: c = "", image: s } =
|
|
503
|
-
if (s &&
|
|
578
|
+
const { color: c = "", image: s } = Qe(e);
|
|
579
|
+
if (s && Xe(s)) {
|
|
504
580
|
delete o.backgroundColor;
|
|
505
|
-
const l = !(t.mobile.apple.device ||
|
|
581
|
+
const l = !(t.mobile.apple.device || Ke()) && O(s), d = O(s) && n ? A(B(n), 1200, "quality") : "";
|
|
506
582
|
l ? a = /* @__PURE__ */ r(
|
|
507
|
-
|
|
583
|
+
h,
|
|
508
584
|
{
|
|
509
585
|
component: "video",
|
|
510
586
|
className: "section-bg",
|
|
@@ -514,7 +590,7 @@ function dt(t, e, o, n, i) {
|
|
|
514
590
|
controls: !1,
|
|
515
591
|
playsInline: !0,
|
|
516
592
|
poster: d,
|
|
517
|
-
src:
|
|
593
|
+
src: O(s) ? s : A(s, 1200, "quality"),
|
|
518
594
|
sx: {
|
|
519
595
|
width: "100%",
|
|
520
596
|
position: "absolute",
|
|
@@ -528,9 +604,9 @@ function dt(t, e, o, n, i) {
|
|
|
528
604
|
},
|
|
529
605
|
s
|
|
530
606
|
) : a = /* @__PURE__ */ r(
|
|
531
|
-
|
|
607
|
+
Pt,
|
|
532
608
|
{
|
|
533
|
-
src:
|
|
609
|
+
src: O(s) && n ? d : s,
|
|
534
610
|
sizesAttr: {
|
|
535
611
|
sm: 600,
|
|
536
612
|
md: 900,
|
|
@@ -556,9 +632,9 @@ function dt(t, e, o, n, i) {
|
|
|
556
632
|
} else s ? o.backgroundImage = `${s} !important` : c && (o.backgroundColor = `${c} !important`);
|
|
557
633
|
return a;
|
|
558
634
|
}
|
|
559
|
-
function
|
|
635
|
+
function to({ autoWidth: t, children: e, ...o }) {
|
|
560
636
|
return t ? /* @__PURE__ */ r(
|
|
561
|
-
|
|
637
|
+
h,
|
|
562
638
|
{
|
|
563
639
|
...o,
|
|
564
640
|
sx: [
|
|
@@ -569,9 +645,9 @@ function Ue({ autoWidth: t, children: e, ...o }) {
|
|
|
569
645
|
],
|
|
570
646
|
children: e
|
|
571
647
|
}
|
|
572
|
-
) : /* @__PURE__ */ r(
|
|
648
|
+
) : /* @__PURE__ */ r(Ht, { ...o, children: e });
|
|
573
649
|
}
|
|
574
|
-
function
|
|
650
|
+
function nt({
|
|
575
651
|
dark: t = !1,
|
|
576
652
|
children: e,
|
|
577
653
|
className: o,
|
|
@@ -582,30 +658,30 @@ function Q({
|
|
|
582
658
|
type: s,
|
|
583
659
|
...l
|
|
584
660
|
}) {
|
|
585
|
-
const d = { ...n }, p =
|
|
586
|
-
t && (d.color =
|
|
587
|
-
const m =
|
|
661
|
+
const d = { ...n }, p = It((u) => u.breakpoints.down("md"));
|
|
662
|
+
t && (d.color = ft.common.white, d.backgroundColor = `${ft.grey[900]} !important`), i.show && (d.display = "flex");
|
|
663
|
+
const m = S(() => !Number(l.boxMaxWidth) || p ? {
|
|
588
664
|
width: "100%"
|
|
589
665
|
} : s === "wall" && l.boxMaxWidth ? {
|
|
590
666
|
maxWidth: `${l.boxMaxWidth}px !important`,
|
|
591
667
|
width: "100%"
|
|
592
668
|
} : {
|
|
593
669
|
width: "100%"
|
|
594
|
-
}, [l.boxMaxWidth, p, s]),
|
|
670
|
+
}, [l.boxMaxWidth, p, s]), g = U({
|
|
595
671
|
type: "baseSectionPaddingY",
|
|
596
672
|
value: a || "normal",
|
|
597
673
|
// section default is normal
|
|
598
674
|
defaultValue: ""
|
|
599
675
|
});
|
|
600
676
|
return /* @__PURE__ */ r(
|
|
601
|
-
|
|
677
|
+
eo,
|
|
602
678
|
{
|
|
603
679
|
component: "section",
|
|
604
|
-
styles: { ...d, ...
|
|
605
|
-
className:
|
|
680
|
+
styles: { ...d, ...g },
|
|
681
|
+
className: x("base-section", "px-2 md:px-5 lg:px-5 xl:px-10", o, {
|
|
606
682
|
dark: t
|
|
607
683
|
}),
|
|
608
|
-
...
|
|
684
|
+
...N(
|
|
609
685
|
l,
|
|
610
686
|
"hoverStyle",
|
|
611
687
|
"boxMaxWidth",
|
|
@@ -616,11 +692,11 @@ function Q({
|
|
|
616
692
|
"titleAppearance",
|
|
617
693
|
"descriptionAppearance"
|
|
618
694
|
),
|
|
619
|
-
children: /* @__PURE__ */ r(
|
|
695
|
+
children: /* @__PURE__ */ r(to, { autoWidth: l?.autoWidth, className: x("section-content h-full"), sx: m, children: i.show ? /* @__PURE__ */ r(jt, { ...c, boxed: i, children: e }) : e })
|
|
620
696
|
}
|
|
621
697
|
);
|
|
622
698
|
}
|
|
623
|
-
function
|
|
699
|
+
function jt({
|
|
624
700
|
background: t = "",
|
|
625
701
|
backgroundVideoPoster: e,
|
|
626
702
|
children: o,
|
|
@@ -630,30 +706,30 @@ function It({
|
|
|
630
706
|
styles: c = {},
|
|
631
707
|
...s
|
|
632
708
|
}) {
|
|
633
|
-
const l = { ...c, ...n }, d =
|
|
709
|
+
const l = { ...c, ...n }, d = Mt();
|
|
634
710
|
let p = null;
|
|
635
|
-
const m =
|
|
636
|
-
return t && (p =
|
|
637
|
-
|
|
711
|
+
const m = It((b) => b.breakpoints.up("sm")), g = le(), u = Ze();
|
|
712
|
+
return t && (p = xt(
|
|
713
|
+
g,
|
|
638
714
|
typeof t == "string" ? d(t) : t,
|
|
639
715
|
l,
|
|
640
716
|
e,
|
|
641
717
|
u
|
|
642
|
-
)), i.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding = m ? "50px" : "20px"), i?.border && (l.border = "1px solid #c0c0c0"), i?.background && (p =
|
|
643
|
-
|
|
718
|
+
)), i.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding = m ? "50px" : "20px"), i?.border && (l.border = "1px solid #c0c0c0"), i?.background && (p = xt(
|
|
719
|
+
g,
|
|
644
720
|
typeof i?.background == "string" ? d(i?.background) : i?.background,
|
|
645
721
|
l,
|
|
646
722
|
i?.backgroundVideoPoster,
|
|
647
723
|
u
|
|
648
724
|
))), /* @__PURE__ */ w(
|
|
649
|
-
|
|
725
|
+
h,
|
|
650
726
|
{
|
|
651
727
|
...s,
|
|
652
728
|
sx: {
|
|
653
729
|
...l,
|
|
654
730
|
...p ? { position: "relative", overflow: "hidden", zIndex: 0 } : {}
|
|
655
731
|
},
|
|
656
|
-
className:
|
|
732
|
+
className: x(a, i?.boxShadow && "shadow-xl"),
|
|
657
733
|
children: [
|
|
658
734
|
p,
|
|
659
735
|
o
|
|
@@ -661,7 +737,7 @@ function It({
|
|
|
661
737
|
}
|
|
662
738
|
);
|
|
663
739
|
}
|
|
664
|
-
const
|
|
740
|
+
const eo = _(jt)`
|
|
665
741
|
&:nth-of-type(even) {
|
|
666
742
|
background: #f8f8f8;
|
|
667
743
|
}
|
|
@@ -678,15 +754,15 @@ const He = _(It)`
|
|
|
678
754
|
}
|
|
679
755
|
}
|
|
680
756
|
`;
|
|
681
|
-
function
|
|
682
|
-
if (t.type ===
|
|
683
|
-
const o = (t.props.children || []).filter((n) =>
|
|
684
|
-
return o.length === 1 ?
|
|
757
|
+
function Et(t) {
|
|
758
|
+
if (t.type === ee) {
|
|
759
|
+
const o = (t.props.children || []).filter((n) => St(n));
|
|
760
|
+
return o.length === 1 ? Et(o[0]) : o.length > 1;
|
|
685
761
|
}
|
|
686
762
|
return Array.isArray(t);
|
|
687
763
|
}
|
|
688
|
-
const
|
|
689
|
-
function
|
|
764
|
+
const I = "&>*";
|
|
765
|
+
function Tt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type: c, ...s } = {
|
|
690
766
|
children: null,
|
|
691
767
|
className: "",
|
|
692
768
|
col: 3,
|
|
@@ -695,7 +771,7 @@ function Pt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type:
|
|
|
695
771
|
align: "center",
|
|
696
772
|
type: "default"
|
|
697
773
|
}) {
|
|
698
|
-
const l =
|
|
774
|
+
const l = Nt(), d = Number(Math.floor(100 / e * 100) / 100), p = {
|
|
699
775
|
center: "justify-center items-center",
|
|
700
776
|
left: "justify-start items-center",
|
|
701
777
|
right: "justify-end items-center",
|
|
@@ -713,43 +789,43 @@ function Pt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type:
|
|
|
713
789
|
5: 3,
|
|
714
790
|
6: 3
|
|
715
791
|
}[e] || 0);
|
|
716
|
-
|
|
717
|
-
const
|
|
718
|
-
let
|
|
719
|
-
const
|
|
720
|
-
switch (
|
|
792
|
+
Et(t) || (u = 0);
|
|
793
|
+
const f = (e - 1) * u / e;
|
|
794
|
+
let y = { ...a, gap: `${u}rem` };
|
|
795
|
+
const k = { [I]: { width: "100%" } }, $ = {}, P = {}, C = {};
|
|
796
|
+
switch (k.gap = "1rem", $.gap = `${u / 2}rem`, e) {
|
|
721
797
|
case 3:
|
|
722
798
|
case 4:
|
|
723
|
-
|
|
799
|
+
$[I] = {
|
|
724
800
|
width: `calc(50% - ${u / 2}rem)`
|
|
725
801
|
};
|
|
726
802
|
break;
|
|
727
803
|
case 5:
|
|
728
804
|
case 6:
|
|
729
|
-
|
|
805
|
+
k[I] = {
|
|
730
806
|
width: `calc(50% - ${u / 2 / 2}rem)`
|
|
731
|
-
},
|
|
807
|
+
}, $[I] = {
|
|
732
808
|
width: `calc(50% - ${u / 2 / 2}rem)`
|
|
733
|
-
},
|
|
809
|
+
}, P[I] = {
|
|
734
810
|
width: `calc(33.33% - ${u * 2 / 3}rem)`
|
|
735
811
|
};
|
|
736
812
|
break;
|
|
737
813
|
}
|
|
738
|
-
return
|
|
814
|
+
return y[I] = { width: `calc(${d}% - ${f}rem)` }, y[`@media (max-width: ${l.breakpoints.values.xl}px)`] = C, y[`@media (max-width: ${l.breakpoints.values.lg}px)`] = P, y[`@media (max-width: ${l.breakpoints.values.md}px)`] = $, y[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k, c === "wall" && (y = { ...a, gap: `${u}rem` }, y[I] = { width: `calc(${d}% - ${f}rem)` }, k[I] = { width: `calc(45% - ${u / 2 / 2}rem)` }, y[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k), /* @__PURE__ */ r(h, { className: x("flex flex-wrap flex-row h-full", m, n), sx: y, ...s, children: t });
|
|
739
815
|
}
|
|
740
|
-
function
|
|
816
|
+
function E({ type: t = "", icon: e = "", size: o = "3rem", className: n = "", ...i }) {
|
|
741
817
|
return /* @__PURE__ */ r(
|
|
742
|
-
|
|
818
|
+
st,
|
|
743
819
|
{
|
|
744
820
|
icon: e || t,
|
|
745
821
|
size: o,
|
|
746
|
-
className:
|
|
822
|
+
className: x("content-icon", n),
|
|
747
823
|
...i,
|
|
748
824
|
color: typeof i.color > "u" ? "inherit" : i.color
|
|
749
825
|
}
|
|
750
826
|
);
|
|
751
827
|
}
|
|
752
|
-
function
|
|
828
|
+
function oo({
|
|
753
829
|
to: t,
|
|
754
830
|
base: e,
|
|
755
831
|
children: o,
|
|
@@ -760,33 +836,33 @@ function Fe({
|
|
|
760
836
|
useRouterLink: s,
|
|
761
837
|
...l
|
|
762
838
|
}) {
|
|
763
|
-
const { pages: d = [], locale: p = "" } = {}, m = e ?
|
|
764
|
-
let
|
|
765
|
-
const
|
|
839
|
+
const { pages: d = [], locale: p = "" } = {}, m = e ? X("/", e) : e || "";
|
|
840
|
+
let g = a === "auto" ? "_self" : a, u = X(m, t);
|
|
841
|
+
const b = c ? at(u) : !1;
|
|
766
842
|
if (e)
|
|
767
|
-
return u =
|
|
843
|
+
return u = X(m, p, t), /* @__PURE__ */ r(
|
|
768
844
|
"a",
|
|
769
845
|
{
|
|
770
846
|
className: `no-underline ${n}`,
|
|
771
|
-
href:
|
|
847
|
+
href: rt(u),
|
|
772
848
|
rel: "noreferrer noopener",
|
|
773
|
-
target:
|
|
849
|
+
target: g,
|
|
774
850
|
...l,
|
|
775
851
|
children: o
|
|
776
852
|
}
|
|
777
853
|
);
|
|
778
|
-
if (
|
|
779
|
-
a === "auto" && (
|
|
854
|
+
if (at(t))
|
|
855
|
+
a === "auto" && (g = "_blank"), u = t;
|
|
780
856
|
else {
|
|
781
|
-
|
|
782
|
-
const
|
|
783
|
-
if (s ||
|
|
857
|
+
pe(u) && (u = X(window.location.pathname, u));
|
|
858
|
+
const f = ue(`${window.location.origin}${u}`), y = d.some((k) => k.pathname === f.pathname);
|
|
859
|
+
if (s || y)
|
|
784
860
|
return /* @__PURE__ */ r(
|
|
785
|
-
|
|
861
|
+
ne,
|
|
786
862
|
{
|
|
787
863
|
end: !0,
|
|
788
|
-
to:
|
|
789
|
-
className: ({ isActive:
|
|
864
|
+
to: rt(u),
|
|
865
|
+
className: ({ isActive: k }) => x(n, k ? i : ""),
|
|
790
866
|
...l,
|
|
791
867
|
children: o
|
|
792
868
|
}
|
|
@@ -796,18 +872,18 @@ function Fe({
|
|
|
796
872
|
"a",
|
|
797
873
|
{
|
|
798
874
|
className: `no-underline ${n}`,
|
|
799
|
-
href:
|
|
875
|
+
href: rt(u),
|
|
800
876
|
rel: "noreferrer noopener",
|
|
801
|
-
target:
|
|
877
|
+
target: g,
|
|
802
878
|
...l,
|
|
803
879
|
children: [
|
|
804
880
|
o,
|
|
805
|
-
|
|
881
|
+
b && /* @__PURE__ */ r(E, { icon: "i-mdi:arrow-top-right", size: "0.9em", className: "smart-link__mark", style: { marginLeft: 5 } })
|
|
806
882
|
]
|
|
807
883
|
}
|
|
808
884
|
);
|
|
809
885
|
}
|
|
810
|
-
function
|
|
886
|
+
function H({
|
|
811
887
|
prepend: t,
|
|
812
888
|
append: e,
|
|
813
889
|
children: o,
|
|
@@ -817,22 +893,22 @@ function O({
|
|
|
817
893
|
...c
|
|
818
894
|
}) {
|
|
819
895
|
let s = {};
|
|
820
|
-
const { pages: l = [] } =
|
|
896
|
+
const { pages: l = [] } = zt(), d = l.find((g) => g.id === c.link), p = !o || te.Children.toArray(o).every((g) => g === null);
|
|
821
897
|
c.link && (s = {
|
|
822
|
-
component:
|
|
898
|
+
component: oo,
|
|
823
899
|
to: d?.path || c.link,
|
|
824
900
|
useRouterLink: !0
|
|
825
901
|
});
|
|
826
|
-
const m =
|
|
902
|
+
const m = Yt();
|
|
827
903
|
return /* @__PURE__ */ w(
|
|
828
|
-
|
|
904
|
+
no,
|
|
829
905
|
{
|
|
830
|
-
className:
|
|
906
|
+
className: x("base-card card", { dark: i, "border-transparent": !a }, n),
|
|
831
907
|
sx: {
|
|
832
908
|
borderColor: m.palette.divider
|
|
833
909
|
},
|
|
834
910
|
...s,
|
|
835
|
-
...
|
|
911
|
+
...N(c, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
|
|
836
912
|
children: [
|
|
837
913
|
t,
|
|
838
914
|
!p && /* @__PURE__ */ r("div", { className: "card__body", children: o }),
|
|
@@ -841,7 +917,7 @@ function O({
|
|
|
841
917
|
}
|
|
842
918
|
);
|
|
843
919
|
}
|
|
844
|
-
const
|
|
920
|
+
const no = _(h)`
|
|
845
921
|
&.base-card {
|
|
846
922
|
text-align: left;
|
|
847
923
|
border-width: 1px;
|
|
@@ -857,18 +933,18 @@ const Ye = _(f)`
|
|
|
857
933
|
padding: 15px 15px;
|
|
858
934
|
}
|
|
859
935
|
`;
|
|
860
|
-
function
|
|
936
|
+
function Y({
|
|
861
937
|
align: t = "left",
|
|
862
938
|
title: e,
|
|
863
939
|
titleProps: o = {},
|
|
864
940
|
description: n,
|
|
865
941
|
descriptionProps: i = {}
|
|
866
942
|
}) {
|
|
867
|
-
return /* @__PURE__ */ w(
|
|
943
|
+
return /* @__PURE__ */ w(Q, { children: [
|
|
868
944
|
e && /* @__PURE__ */ r(
|
|
869
|
-
|
|
945
|
+
L,
|
|
870
946
|
{
|
|
871
|
-
className:
|
|
947
|
+
className: x("card__title text-gray-800", "dark:text-gray-50"),
|
|
872
948
|
component: "h5",
|
|
873
949
|
variant: "h5",
|
|
874
950
|
gutterBottom: !0,
|
|
@@ -878,9 +954,9 @@ function U({
|
|
|
878
954
|
}
|
|
879
955
|
),
|
|
880
956
|
n && /* @__PURE__ */ r(
|
|
881
|
-
|
|
957
|
+
L,
|
|
882
958
|
{
|
|
883
|
-
className:
|
|
959
|
+
className: x("card__description", "text-gray-500", "dark:text-gray-400"),
|
|
884
960
|
component: "div",
|
|
885
961
|
variant: "body1",
|
|
886
962
|
gutterBottom: !0,
|
|
@@ -891,7 +967,7 @@ function U({
|
|
|
891
967
|
)
|
|
892
968
|
] });
|
|
893
969
|
}
|
|
894
|
-
function
|
|
970
|
+
function ro({
|
|
895
971
|
image: t,
|
|
896
972
|
title: e,
|
|
897
973
|
description: o,
|
|
@@ -904,14 +980,14 @@ function Ve({
|
|
|
904
980
|
align: d,
|
|
905
981
|
...p
|
|
906
982
|
}) {
|
|
907
|
-
const m =
|
|
983
|
+
const m = pt(t), g = A(B(t), 540);
|
|
908
984
|
return /* @__PURE__ */ w(
|
|
909
|
-
|
|
985
|
+
io,
|
|
910
986
|
{
|
|
911
987
|
className: "card-article",
|
|
912
988
|
...p,
|
|
913
989
|
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children: m && t ? /* @__PURE__ */ r(
|
|
914
|
-
|
|
990
|
+
h,
|
|
915
991
|
{
|
|
916
992
|
sx: {
|
|
917
993
|
position: "absolute",
|
|
@@ -923,13 +999,13 @@ function Ve({
|
|
|
923
999
|
alignItems: "center",
|
|
924
1000
|
justifyContent: "center"
|
|
925
1001
|
},
|
|
926
|
-
children: /* @__PURE__ */ r(
|
|
1002
|
+
children: /* @__PURE__ */ r(E, { icon: t, color: "primary.main" })
|
|
927
1003
|
}
|
|
928
|
-
) :
|
|
1004
|
+
) : g && /* @__PURE__ */ r(
|
|
929
1005
|
"img",
|
|
930
1006
|
{
|
|
931
1007
|
className: "card__image",
|
|
932
|
-
src:
|
|
1008
|
+
src: g,
|
|
933
1009
|
...n,
|
|
934
1010
|
alt: n.alt || i?.filename || "card-image",
|
|
935
1011
|
width: i?.naturalWidth,
|
|
@@ -940,7 +1016,7 @@ function Ve({
|
|
|
940
1016
|
) }),
|
|
941
1017
|
children: [
|
|
942
1018
|
e || o ? /* @__PURE__ */ r(
|
|
943
|
-
|
|
1019
|
+
Y,
|
|
944
1020
|
{
|
|
945
1021
|
align: d,
|
|
946
1022
|
title: e,
|
|
@@ -954,7 +1030,7 @@ function Ve({
|
|
|
954
1030
|
}
|
|
955
1031
|
);
|
|
956
1032
|
}
|
|
957
|
-
const
|
|
1033
|
+
const io = _(H)`
|
|
958
1034
|
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
959
1035
|
&:hover {
|
|
960
1036
|
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
@@ -988,8 +1064,8 @@ const De = _(O)`
|
|
|
988
1064
|
height: 100%;
|
|
989
1065
|
object-position: top center;
|
|
990
1066
|
}
|
|
991
|
-
`,
|
|
992
|
-
function
|
|
1067
|
+
`, bt = "section";
|
|
1068
|
+
function yt({
|
|
993
1069
|
title: t,
|
|
994
1070
|
image: e,
|
|
995
1071
|
imageMeta: o,
|
|
@@ -1000,9 +1076,9 @@ function pt({
|
|
|
1000
1076
|
className: s = "",
|
|
1001
1077
|
...l
|
|
1002
1078
|
}) {
|
|
1003
|
-
return /* @__PURE__ */ w(
|
|
1079
|
+
return /* @__PURE__ */ w(ao, { className: x("card", `list-type-${c}`, s), align: a, ...l, children: [
|
|
1004
1080
|
e && /* @__PURE__ */ r(
|
|
1005
|
-
|
|
1081
|
+
E,
|
|
1006
1082
|
{
|
|
1007
1083
|
icon: e,
|
|
1008
1084
|
color: "primary.main",
|
|
@@ -1010,18 +1086,18 @@ function pt({
|
|
|
1010
1086
|
imageMeta: o
|
|
1011
1087
|
}
|
|
1012
1088
|
),
|
|
1013
|
-
t || n ? /* @__PURE__ */ r(
|
|
1089
|
+
t || n ? /* @__PURE__ */ r(Y, { align: a, title: t, description: n }) : null,
|
|
1014
1090
|
i?.length ? /* @__PURE__ */ r(j, { align: a, actions: i, className: "mt-4" }) : null
|
|
1015
1091
|
] });
|
|
1016
1092
|
}
|
|
1017
|
-
const
|
|
1093
|
+
const ao = _(H)`
|
|
1018
1094
|
padding: 5vw 4vw;
|
|
1019
1095
|
box-sizing: border-box;
|
|
1020
1096
|
/* min-height: 320px; */
|
|
1021
1097
|
color: inherit !important;
|
|
1022
1098
|
border-radius: 0.5rem;
|
|
1023
1099
|
/* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
|
|
1024
|
-
@media (max-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1100
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values[bt]}px) {
|
|
1025
1101
|
padding: 1.5rem 2rem;
|
|
1026
1102
|
}
|
|
1027
1103
|
@media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
|
|
@@ -1069,13 +1145,13 @@ const Je = _(O)`
|
|
|
1069
1145
|
}
|
|
1070
1146
|
}
|
|
1071
1147
|
|
|
1072
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1148
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[bt]}px) {
|
|
1073
1149
|
padding: 2rem 2rem;
|
|
1074
1150
|
text-align: left;
|
|
1075
1151
|
box-sizing: border-box;
|
|
1076
1152
|
}
|
|
1077
1153
|
`;
|
|
1078
|
-
function
|
|
1154
|
+
function so({
|
|
1079
1155
|
image: t,
|
|
1080
1156
|
title: e,
|
|
1081
1157
|
description: o,
|
|
@@ -1088,14 +1164,14 @@ function Ge({
|
|
|
1088
1164
|
align: d,
|
|
1089
1165
|
...p
|
|
1090
1166
|
}) {
|
|
1091
|
-
const m =
|
|
1167
|
+
const m = pt(t), g = A(B(t), 540);
|
|
1092
1168
|
return /* @__PURE__ */ w(
|
|
1093
|
-
|
|
1169
|
+
lo,
|
|
1094
1170
|
{
|
|
1095
1171
|
className: "card-article",
|
|
1096
1172
|
...p,
|
|
1097
1173
|
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children: m && t ? /* @__PURE__ */ r(
|
|
1098
|
-
|
|
1174
|
+
h,
|
|
1099
1175
|
{
|
|
1100
1176
|
sx: {
|
|
1101
1177
|
position: "absolute",
|
|
@@ -1107,14 +1183,14 @@ function Ge({
|
|
|
1107
1183
|
alignItems: "center",
|
|
1108
1184
|
justifyContent: "center"
|
|
1109
1185
|
},
|
|
1110
|
-
children: /* @__PURE__ */ r(
|
|
1186
|
+
children: /* @__PURE__ */ r(E, { icon: t, color: "primary.main" })
|
|
1111
1187
|
}
|
|
1112
|
-
) :
|
|
1113
|
-
|
|
1188
|
+
) : g && /* @__PURE__ */ r(
|
|
1189
|
+
h,
|
|
1114
1190
|
{
|
|
1115
1191
|
component: "img",
|
|
1116
1192
|
className: "card__image",
|
|
1117
|
-
src:
|
|
1193
|
+
src: g,
|
|
1118
1194
|
...n,
|
|
1119
1195
|
alt: n.alt || i?.filename || "card-image",
|
|
1120
1196
|
style: { width: "100%", height: "100%", objectFit: a || "contain", objectPosition: "center" },
|
|
@@ -1130,7 +1206,7 @@ function Ge({
|
|
|
1130
1206
|
) }),
|
|
1131
1207
|
children: [
|
|
1132
1208
|
e || o ? /* @__PURE__ */ r(
|
|
1133
|
-
|
|
1209
|
+
Y,
|
|
1134
1210
|
{
|
|
1135
1211
|
align: d,
|
|
1136
1212
|
title: e,
|
|
@@ -1144,7 +1220,7 @@ function Ge({
|
|
|
1144
1220
|
}
|
|
1145
1221
|
);
|
|
1146
1222
|
}
|
|
1147
|
-
const
|
|
1223
|
+
const lo = _(H)`
|
|
1148
1224
|
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
1149
1225
|
&:hover {
|
|
1150
1226
|
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
@@ -1168,8 +1244,8 @@ const Ke = _(O)`
|
|
|
1168
1244
|
.card__image {
|
|
1169
1245
|
max-height: 60px;
|
|
1170
1246
|
}
|
|
1171
|
-
`,
|
|
1172
|
-
function
|
|
1247
|
+
`, wt = "section";
|
|
1248
|
+
function co({
|
|
1173
1249
|
title: t,
|
|
1174
1250
|
image: e,
|
|
1175
1251
|
imageMeta: o,
|
|
@@ -1180,15 +1256,15 @@ function Xe({
|
|
|
1180
1256
|
className: s = "",
|
|
1181
1257
|
...l
|
|
1182
1258
|
}) {
|
|
1183
|
-
return /* @__PURE__ */ r(
|
|
1184
|
-
e && /* @__PURE__ */ r(
|
|
1185
|
-
/* @__PURE__ */ w(
|
|
1186
|
-
/* @__PURE__ */ r(
|
|
1259
|
+
return /* @__PURE__ */ r(mo, { className: x("card", s), ...l, children: /* @__PURE__ */ w(h, { className: "flex items-center", children: [
|
|
1260
|
+
e && /* @__PURE__ */ r(E, { icon: e, color: "primary.main", size: n, imageMeta: o }),
|
|
1261
|
+
/* @__PURE__ */ w(h, { className: "flex-1 ml-4", children: [
|
|
1262
|
+
/* @__PURE__ */ r(Y, { align: c, title: t, description: i }),
|
|
1187
1263
|
/* @__PURE__ */ r(j, { align: c, actions: a, className: "mt-4" })
|
|
1188
1264
|
] })
|
|
1189
1265
|
] }) });
|
|
1190
1266
|
}
|
|
1191
|
-
const
|
|
1267
|
+
const mo = _(H)`
|
|
1192
1268
|
padding: 5vw 4vw;
|
|
1193
1269
|
text-align: left;
|
|
1194
1270
|
box-sizing: border-box;
|
|
@@ -1196,7 +1272,7 @@ const qe = _(O)`
|
|
|
1196
1272
|
color: inherit !important;
|
|
1197
1273
|
border-radius: 0.5rem;
|
|
1198
1274
|
/* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
|
|
1199
|
-
@media (max-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1275
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values[wt]}px) {
|
|
1200
1276
|
padding: 1.5rem 2rem;
|
|
1201
1277
|
}
|
|
1202
1278
|
@media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
|
|
@@ -1241,13 +1317,13 @@ const qe = _(O)`
|
|
|
1241
1317
|
}
|
|
1242
1318
|
}
|
|
1243
1319
|
|
|
1244
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1320
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[wt]}px) {
|
|
1245
1321
|
padding: 2rem 2rem;
|
|
1246
1322
|
text-align: left;
|
|
1247
1323
|
box-sizing: border-box;
|
|
1248
1324
|
}
|
|
1249
1325
|
`;
|
|
1250
|
-
function
|
|
1326
|
+
function po({
|
|
1251
1327
|
title: t,
|
|
1252
1328
|
titleProps: e = {},
|
|
1253
1329
|
description: o,
|
|
@@ -1259,10 +1335,10 @@ function Qe({
|
|
|
1259
1335
|
hoverStyle: l,
|
|
1260
1336
|
...d
|
|
1261
1337
|
}) {
|
|
1262
|
-
return /* @__PURE__ */ w(
|
|
1263
|
-
i && /* @__PURE__ */ r(
|
|
1338
|
+
return /* @__PURE__ */ w(uo, { className: x("card-simple", c, `hover-style__${l}`), align: s, ...d, children: [
|
|
1339
|
+
i && /* @__PURE__ */ r(E, { icon: i, color: "primary.main", imageMeta: a }),
|
|
1264
1340
|
t || o ? /* @__PURE__ */ r(
|
|
1265
|
-
|
|
1341
|
+
Y,
|
|
1266
1342
|
{
|
|
1267
1343
|
align: s,
|
|
1268
1344
|
title: t,
|
|
@@ -1273,7 +1349,7 @@ function Qe({
|
|
|
1273
1349
|
) : null
|
|
1274
1350
|
] });
|
|
1275
1351
|
}
|
|
1276
|
-
const
|
|
1352
|
+
const uo = _(H)`
|
|
1277
1353
|
.card__title {
|
|
1278
1354
|
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1279
1355
|
a {
|
|
@@ -1370,17 +1446,17 @@ const Ze = _(O)`
|
|
|
1370
1446
|
}
|
|
1371
1447
|
}
|
|
1372
1448
|
`;
|
|
1373
|
-
function
|
|
1449
|
+
function go({ type: t = "default", ...e }) {
|
|
1374
1450
|
const n = {
|
|
1375
|
-
article:
|
|
1376
|
-
simple:
|
|
1377
|
-
news:
|
|
1378
|
-
default:
|
|
1379
|
-
wall:
|
|
1380
|
-
}[t] ||
|
|
1381
|
-
return /* @__PURE__ */ r(n, { ...t === "news" ? e :
|
|
1451
|
+
article: ro,
|
|
1452
|
+
simple: po,
|
|
1453
|
+
news: co,
|
|
1454
|
+
default: yt,
|
|
1455
|
+
wall: so
|
|
1456
|
+
}[t] || yt;
|
|
1457
|
+
return /* @__PURE__ */ r(n, { ...t === "news" ? e : N(e, "iconSize") });
|
|
1382
1458
|
}
|
|
1383
|
-
function
|
|
1459
|
+
function ho({
|
|
1384
1460
|
list: t = [],
|
|
1385
1461
|
align: e = "top",
|
|
1386
1462
|
cards: o,
|
|
@@ -1393,27 +1469,27 @@ function eo({
|
|
|
1393
1469
|
type: d = "default",
|
|
1394
1470
|
dark: p = !1,
|
|
1395
1471
|
textAlign: m = "left",
|
|
1396
|
-
hoverStyle:
|
|
1472
|
+
hoverStyle: g,
|
|
1397
1473
|
...u
|
|
1398
1474
|
}) {
|
|
1399
1475
|
return /* @__PURE__ */ r(
|
|
1400
|
-
|
|
1476
|
+
Tt,
|
|
1401
1477
|
{
|
|
1402
1478
|
type: d,
|
|
1403
|
-
className:
|
|
1479
|
+
className: x("card-list py-1", l, "items-stretch"),
|
|
1404
1480
|
col: a,
|
|
1405
1481
|
gap: c,
|
|
1406
1482
|
align: e,
|
|
1407
1483
|
...u,
|
|
1408
|
-
children: o || t.map((
|
|
1409
|
-
|
|
1484
|
+
children: o || t.map((b) => /* @__PURE__ */ r(
|
|
1485
|
+
go,
|
|
1410
1486
|
{
|
|
1411
1487
|
borderColor: n,
|
|
1412
1488
|
iconColor: s,
|
|
1413
1489
|
type: d,
|
|
1414
1490
|
listType: i,
|
|
1415
1491
|
dark: p,
|
|
1416
|
-
...
|
|
1492
|
+
...b,
|
|
1417
1493
|
align: m,
|
|
1418
1494
|
style: c === 0 && t.length > 1 ? {
|
|
1419
1495
|
borderRadius: 0,
|
|
@@ -1421,12 +1497,12 @@ function eo({
|
|
|
1421
1497
|
marginBottom: "-1px"
|
|
1422
1498
|
} : {}
|
|
1423
1499
|
},
|
|
1424
|
-
|
|
1500
|
+
b.id
|
|
1425
1501
|
))
|
|
1426
1502
|
}
|
|
1427
1503
|
);
|
|
1428
1504
|
}
|
|
1429
|
-
const
|
|
1505
|
+
const fo = [
|
|
1430
1506
|
"align",
|
|
1431
1507
|
"cards",
|
|
1432
1508
|
"list",
|
|
@@ -1438,11 +1514,11 @@ const oo = [
|
|
|
1438
1514
|
"type",
|
|
1439
1515
|
"textAlign"
|
|
1440
1516
|
];
|
|
1441
|
-
function
|
|
1442
|
-
const o =
|
|
1517
|
+
function M(t, e) {
|
|
1518
|
+
const o = lt(t, e), n = N(t, e);
|
|
1443
1519
|
return [o, n];
|
|
1444
1520
|
}
|
|
1445
|
-
const
|
|
1521
|
+
const xo = _(nt)`
|
|
1446
1522
|
a .card {
|
|
1447
1523
|
color: #404040;
|
|
1448
1524
|
cursor: pointer;
|
|
@@ -1458,14 +1534,14 @@ const no = _(Q)`
|
|
|
1458
1534
|
color: #404040;
|
|
1459
1535
|
}
|
|
1460
1536
|
`;
|
|
1461
|
-
function
|
|
1462
|
-
const [o, n] =
|
|
1463
|
-
return /* @__PURE__ */ w(
|
|
1464
|
-
Object.keys(o).length > 0 && /* @__PURE__ */ r(
|
|
1465
|
-
/* @__PURE__ */ r(
|
|
1537
|
+
function bo({ className: t, ...e }) {
|
|
1538
|
+
const [o, n] = M(e, ot), [i, a] = M(n, fo);
|
|
1539
|
+
return /* @__PURE__ */ w(xo, { className: x("section--card-list", t), type: e.type, ...a, children: [
|
|
1540
|
+
Object.keys(o).length > 0 && /* @__PURE__ */ r(et, { center: !0, ...o, className: "mb-[2.5vw]" }),
|
|
1541
|
+
/* @__PURE__ */ r(ho, { ...i, dark: !!e.dark })
|
|
1466
1542
|
] });
|
|
1467
1543
|
}
|
|
1468
|
-
const
|
|
1544
|
+
const yo = _(bo)`
|
|
1469
1545
|
.card__description {
|
|
1470
1546
|
white-space: pre-wrap;
|
|
1471
1547
|
}
|
|
@@ -1481,29 +1557,29 @@ const io = _(ro)`
|
|
|
1481
1557
|
background: inherit !important;
|
|
1482
1558
|
}
|
|
1483
1559
|
`;
|
|
1484
|
-
function
|
|
1485
|
-
const [{ editing: o }, n] =
|
|
1486
|
-
...
|
|
1560
|
+
function wo({ section: t, ...e }) {
|
|
1561
|
+
const [{ editing: o }, n] = M(e, tt), i = S(() => ({
|
|
1562
|
+
...N(n, ["listBorder", "list", "iconSize", "imageSize"]),
|
|
1487
1563
|
list: n.list?.map((a) => ({
|
|
1488
|
-
...
|
|
1564
|
+
...N(a, "icon", "iconColor"),
|
|
1489
1565
|
image: ["news", "simple", "default"].includes(n.type) && a.icon ? a.icon : a.image,
|
|
1490
|
-
actions: a.actions?.map?.((c) => /* @__PURE__ */ r(
|
|
1566
|
+
actions: a.actions?.map?.((c) => /* @__PURE__ */ r(Rt, { ...c, editing: o }, c.id)),
|
|
1491
1567
|
border: n.listBorder,
|
|
1492
1568
|
iconSize: n.iconSize,
|
|
1493
1569
|
imageSize: n.imageSize,
|
|
1494
1570
|
hoverStyle: n.hoverStyle
|
|
1495
1571
|
}))
|
|
1496
1572
|
}), [n]);
|
|
1497
|
-
return /* @__PURE__ */ r(
|
|
1573
|
+
return /* @__PURE__ */ r(yo, { style: o ? { pointerEvents: "none" } : {}, ...i });
|
|
1498
1574
|
}
|
|
1499
|
-
function
|
|
1575
|
+
function vo({
|
|
1500
1576
|
properties: t,
|
|
1501
1577
|
section: e,
|
|
1502
1578
|
locale: o,
|
|
1503
1579
|
dev: n
|
|
1504
1580
|
}) {
|
|
1505
1581
|
return e?.config?.componentId ? /* @__PURE__ */ r(
|
|
1506
|
-
|
|
1582
|
+
ce,
|
|
1507
1583
|
{
|
|
1508
1584
|
instanceId: e.id,
|
|
1509
1585
|
componentId: e.config.componentId,
|
|
@@ -1515,14 +1591,14 @@ function so({
|
|
|
1515
1591
|
dev: n
|
|
1516
1592
|
}
|
|
1517
1593
|
) : /* @__PURE__ */ r(
|
|
1518
|
-
|
|
1594
|
+
h,
|
|
1519
1595
|
{
|
|
1520
1596
|
sx: {
|
|
1521
1597
|
textAlign: "center",
|
|
1522
1598
|
py: 2
|
|
1523
1599
|
},
|
|
1524
1600
|
children: /* @__PURE__ */ r(
|
|
1525
|
-
|
|
1601
|
+
L,
|
|
1526
1602
|
{
|
|
1527
1603
|
variant: "caption",
|
|
1528
1604
|
sx: {
|
|
@@ -1534,7 +1610,7 @@ function so({
|
|
|
1534
1610
|
}
|
|
1535
1611
|
);
|
|
1536
1612
|
}
|
|
1537
|
-
function
|
|
1613
|
+
function ko({
|
|
1538
1614
|
src: t,
|
|
1539
1615
|
dataId: e,
|
|
1540
1616
|
isEdit: o = !1,
|
|
@@ -1543,7 +1619,7 @@ function lo({
|
|
|
1543
1619
|
}
|
|
1544
1620
|
}) {
|
|
1545
1621
|
return /* @__PURE__ */ r(
|
|
1546
|
-
|
|
1622
|
+
xe,
|
|
1547
1623
|
{
|
|
1548
1624
|
isEdit: o,
|
|
1549
1625
|
embedId: e,
|
|
@@ -1555,12 +1631,12 @@ function lo({
|
|
|
1555
1631
|
}
|
|
1556
1632
|
);
|
|
1557
1633
|
}
|
|
1558
|
-
function
|
|
1559
|
-
const [c, s] =
|
|
1560
|
-
return /* @__PURE__ */ w(
|
|
1561
|
-
Object.keys(c).length > 0 && /* @__PURE__ */ r(
|
|
1634
|
+
function _o({ dataId: t, src: e, actions: o, center: n, onLoad: i, ...a }) {
|
|
1635
|
+
const [c, s] = M(a, ot);
|
|
1636
|
+
return /* @__PURE__ */ w(nt, { ...s, children: [
|
|
1637
|
+
Object.keys(c).length > 0 && /* @__PURE__ */ r(et, { center: n, ...c }),
|
|
1562
1638
|
/* @__PURE__ */ r(
|
|
1563
|
-
|
|
1639
|
+
ko,
|
|
1564
1640
|
{
|
|
1565
1641
|
dataId: t,
|
|
1566
1642
|
src: e,
|
|
@@ -1571,7 +1647,7 @@ function co({ dataId: t, src: e, actions: o, center: n, onLoad: i, ...a }) {
|
|
|
1571
1647
|
/* @__PURE__ */ r(j, { actions: o, center: n })
|
|
1572
1648
|
] });
|
|
1573
1649
|
}
|
|
1574
|
-
const
|
|
1650
|
+
const An = {
|
|
1575
1651
|
src: "",
|
|
1576
1652
|
embedUrl: "",
|
|
1577
1653
|
title: "",
|
|
@@ -1582,21 +1658,21 @@ const xn = {
|
|
|
1582
1658
|
config: {},
|
|
1583
1659
|
id: ""
|
|
1584
1660
|
};
|
|
1585
|
-
function
|
|
1586
|
-
const i = `${e}-${n.locale}`, [{ editing: a }, c] =
|
|
1587
|
-
return
|
|
1661
|
+
function $o({ section: t, id: e, src: o, ...n }) {
|
|
1662
|
+
const i = `${e}-${n.locale}`, [{ editing: a }, c] = M(n, tt), s = ct({}), l = JSON.parse(JSON.stringify(c)), { message: d } = ge(i, "server"), p = he(JSON.parse(JSON.stringify(c.config) || "{}"));
|
|
1663
|
+
return G(() => {
|
|
1588
1664
|
d && d.onInit(() => p.current);
|
|
1589
|
-
}, [d]),
|
|
1665
|
+
}, [d]), G(() => {
|
|
1590
1666
|
const m = JSON.parse(JSON.stringify(c.config) || "{}");
|
|
1591
|
-
|
|
1592
|
-
}, [d, c.config]), o ? /* @__PURE__ */ r(
|
|
1667
|
+
fe(s.current, m) || (s.current = m, d?.send("config-set", m));
|
|
1668
|
+
}, [d, c.config]), o ? /* @__PURE__ */ r(_o, { ...l, dataId: i, src: o, style: a ? { pointerEvents: "none" } : {} }) : /* @__PURE__ */ r(Co, { children: 'Please set the "src" attribute for this block' });
|
|
1593
1669
|
}
|
|
1594
|
-
const
|
|
1670
|
+
const Co = _("div")`
|
|
1595
1671
|
user-select: none;
|
|
1596
1672
|
color: #999;
|
|
1597
1673
|
padding: 8px;
|
|
1598
1674
|
height: 200px;
|
|
1599
|
-
`,
|
|
1675
|
+
`, So = "none", No = "none", Bo = "transparent", vt = "start", Mo = 12, Po = ({
|
|
1600
1676
|
gridSettings: t,
|
|
1601
1677
|
section: e,
|
|
1602
1678
|
index: o,
|
|
@@ -1604,7 +1680,7 @@ const po = _("div")`
|
|
|
1604
1680
|
simulateMode: i = "desktop",
|
|
1605
1681
|
isBackground: a
|
|
1606
1682
|
}) => {
|
|
1607
|
-
const c = t?.[i] ?? {}, s = c[e.id], l =
|
|
1683
|
+
const c = t?.[i] ?? {}, s = c[e.id], l = Io(c);
|
|
1608
1684
|
return {
|
|
1609
1685
|
i: e.id,
|
|
1610
1686
|
static: e?.locked || a,
|
|
@@ -1625,29 +1701,42 @@ const po = _("div")`
|
|
|
1625
1701
|
maxH: 1,
|
|
1626
1702
|
maxY: l
|
|
1627
1703
|
};
|
|
1628
|
-
},
|
|
1629
|
-
const { dev: e, id: o, section: n, onBlockRender: i } = t, a = e?.mode, c =
|
|
1630
|
-
|
|
1631
|
-
|
|
1704
|
+
}, Io = (t) => Object.values(t).reduce((e, o) => Math.max(e, o.y || 0), 0) || 0, Wo = (t) => {
|
|
1705
|
+
const { dev: e, id: o, section: n, onBlockRender: i } = t, a = e?.mode, c = Vt((v) => v.breakpoints.down("sm")), { t: s } = be(), { sections: l, sectionIds: d, config: p } = n, { columns: m = Mo, gridSettings: g, gap: u, padding: b, background: f, alignContent: y } = p || {}, k = S(() => U({
|
|
1706
|
+
type: "layoutBlockGap",
|
|
1707
|
+
value: u ?? So,
|
|
1708
|
+
format: "sx"
|
|
1709
|
+
}), [u]), $ = S(() => U({
|
|
1710
|
+
type: "layoutBlockPadding",
|
|
1711
|
+
value: b ?? No,
|
|
1712
|
+
format: "sx"
|
|
1713
|
+
}), [b]), P = S(() => U({
|
|
1714
|
+
type: "layoutBlockAlignContent",
|
|
1715
|
+
// 使用类型断言避免类型错误
|
|
1716
|
+
value: y ?? vt,
|
|
1717
|
+
format: "sx"
|
|
1718
|
+
}), [y]), C = D(
|
|
1719
|
+
(v, R = !1, V = 0) => {
|
|
1720
|
+
if (!i || !v || !v.component || v.visibility === "hidden")
|
|
1632
1721
|
return null;
|
|
1633
|
-
const
|
|
1634
|
-
gridSettings:
|
|
1635
|
-
section:
|
|
1636
|
-
index:
|
|
1722
|
+
const W = Po({
|
|
1723
|
+
gridSettings: g,
|
|
1724
|
+
section: v,
|
|
1725
|
+
index: V,
|
|
1637
1726
|
columns: m,
|
|
1638
1727
|
simulateMode: c ? "mobile" : "desktop",
|
|
1639
|
-
isBackground:
|
|
1640
|
-
}),
|
|
1728
|
+
isBackground: R
|
|
1729
|
+
}), J = W?.x ?? 0, K = W?.y ?? 0, T = W?.w ?? m, Ot = W?.h ?? 1, Ut = W?.maxY ?? 0, Ft = !!n?.config?.backgroundSectionId;
|
|
1641
1730
|
return /* @__PURE__ */ r(
|
|
1642
|
-
|
|
1731
|
+
h,
|
|
1643
1732
|
{
|
|
1644
|
-
className:
|
|
1733
|
+
className: R ? "layout-block-background" : "layout-block-section",
|
|
1645
1734
|
sx: {
|
|
1646
1735
|
// 背景元素和普通元素都使用 grid 布局
|
|
1647
|
-
...
|
|
1736
|
+
...R ? {
|
|
1648
1737
|
// 背景元素覆盖整个网格区域
|
|
1649
1738
|
gridColumn: "1 / -1",
|
|
1650
|
-
gridRow: `1 / ${
|
|
1739
|
+
gridRow: `1 / ${Ut + 1}`,
|
|
1651
1740
|
zIndex: 0,
|
|
1652
1741
|
width: "100%",
|
|
1653
1742
|
height: "100%",
|
|
@@ -1658,40 +1747,51 @@ const po = _("div")`
|
|
|
1658
1747
|
} : {
|
|
1659
1748
|
position: "relative",
|
|
1660
1749
|
// 使用 grid 定位普通元素
|
|
1661
|
-
gridColumn: `${
|
|
1750
|
+
gridColumn: `${J + 1} / span ${T}`,
|
|
1662
1751
|
// hasBackground 的话,不再 + 1,因为 background 会占用第一行
|
|
1663
|
-
gridRow: `${
|
|
1664
|
-
zIndex: 1
|
|
1752
|
+
gridRow: `${K + (Ft ? 0 : 1)} / span ${Ot}`,
|
|
1753
|
+
zIndex: 1,
|
|
1665
1754
|
// Ensure content is above background
|
|
1755
|
+
minWidth: 0,
|
|
1756
|
+
// 防止内容撑开网格项
|
|
1757
|
+
minHeight: 0,
|
|
1758
|
+
// 防止内容撑开网格项
|
|
1759
|
+
overflow: "hidden",
|
|
1760
|
+
// 防止子内容溢出网格项
|
|
1761
|
+
"& > .BlockBase-root": {
|
|
1762
|
+
height: "100%",
|
|
1763
|
+
width: "100%",
|
|
1764
|
+
boxSizing: "border-box"
|
|
1765
|
+
}
|
|
1666
1766
|
}
|
|
1667
1767
|
},
|
|
1668
1768
|
children: i({
|
|
1669
|
-
id:
|
|
1670
|
-
type:
|
|
1769
|
+
id: v.id,
|
|
1770
|
+
type: v.component,
|
|
1671
1771
|
config: {},
|
|
1672
1772
|
section: {
|
|
1673
|
-
...
|
|
1773
|
+
...v
|
|
1674
1774
|
},
|
|
1675
1775
|
mode: a
|
|
1676
1776
|
})
|
|
1677
1777
|
},
|
|
1678
|
-
|
|
1778
|
+
v.id
|
|
1679
1779
|
);
|
|
1680
1780
|
},
|
|
1681
|
-
[o, a, i,
|
|
1682
|
-
), { backgroundElements:
|
|
1781
|
+
[o, a, i, g, m, c]
|
|
1782
|
+
), { backgroundElements: ut, contentElements: gt } = S(() => {
|
|
1683
1783
|
if (!d || !d.length || !l || !Object.keys(l).length)
|
|
1684
1784
|
return { backgroundElements: [], contentElements: [] };
|
|
1685
|
-
const
|
|
1686
|
-
return d?.forEach((
|
|
1687
|
-
const
|
|
1688
|
-
if (!
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1691
|
-
}), { backgroundElements:
|
|
1692
|
-
}, [
|
|
1693
|
-
return a === "draft" && !
|
|
1694
|
-
|
|
1785
|
+
const v = [], R = [];
|
|
1786
|
+
return d?.forEach((V, W) => {
|
|
1787
|
+
const J = l[V];
|
|
1788
|
+
if (!J) return;
|
|
1789
|
+
const K = n?.config?.backgroundSectionId === V, T = C(J, K, W);
|
|
1790
|
+
T && (K ? v.push(T) : R.push(T));
|
|
1791
|
+
}), { backgroundElements: v, contentElements: R };
|
|
1792
|
+
}, [C, l, d]);
|
|
1793
|
+
return a === "draft" && !ut?.length && !gt?.length ? /* @__PURE__ */ w(
|
|
1794
|
+
h,
|
|
1695
1795
|
{
|
|
1696
1796
|
sx: {
|
|
1697
1797
|
gridColumn: "1 / -1",
|
|
@@ -1701,7 +1801,7 @@ const po = _("div")`
|
|
|
1701
1801
|
alignItems: "center",
|
|
1702
1802
|
justifyContent: "center",
|
|
1703
1803
|
gap: 2,
|
|
1704
|
-
border: (
|
|
1804
|
+
border: (v) => `2px dashed ${v.palette.divider}`,
|
|
1705
1805
|
borderRadius: 2,
|
|
1706
1806
|
padding: 4,
|
|
1707
1807
|
color: "text.secondary",
|
|
@@ -1710,7 +1810,7 @@ const po = _("div")`
|
|
|
1710
1810
|
},
|
|
1711
1811
|
children: [
|
|
1712
1812
|
/* @__PURE__ */ r(
|
|
1713
|
-
|
|
1813
|
+
h,
|
|
1714
1814
|
{
|
|
1715
1815
|
sx: {
|
|
1716
1816
|
fontSize: "48px",
|
|
@@ -1720,7 +1820,7 @@ const po = _("div")`
|
|
|
1720
1820
|
}
|
|
1721
1821
|
),
|
|
1722
1822
|
/* @__PURE__ */ r(
|
|
1723
|
-
|
|
1823
|
+
h,
|
|
1724
1824
|
{
|
|
1725
1825
|
sx: {
|
|
1726
1826
|
fontSize: "16px",
|
|
@@ -1731,7 +1831,7 @@ const po = _("div")`
|
|
|
1731
1831
|
}
|
|
1732
1832
|
),
|
|
1733
1833
|
/* @__PURE__ */ r(
|
|
1734
|
-
|
|
1834
|
+
h,
|
|
1735
1835
|
{
|
|
1736
1836
|
sx: {
|
|
1737
1837
|
opacity: 0.7,
|
|
@@ -1741,7 +1841,7 @@ const po = _("div")`
|
|
|
1741
1841
|
}
|
|
1742
1842
|
),
|
|
1743
1843
|
/* @__PURE__ */ r(
|
|
1744
|
-
|
|
1844
|
+
h,
|
|
1745
1845
|
{
|
|
1746
1846
|
sx: {
|
|
1747
1847
|
position: "absolute",
|
|
@@ -1751,13 +1851,13 @@ const po = _("div")`
|
|
|
1751
1851
|
bottom: 0,
|
|
1752
1852
|
pointerEvents: "none",
|
|
1753
1853
|
opacity: 0.1,
|
|
1754
|
-
background: (
|
|
1854
|
+
background: (v) => `
|
|
1755
1855
|
repeating-linear-gradient(
|
|
1756
1856
|
90deg,
|
|
1757
1857
|
transparent,
|
|
1758
1858
|
transparent calc(100% / ${m} - 1px),
|
|
1759
|
-
${
|
|
1760
|
-
${
|
|
1859
|
+
${v.palette.grey[400]} calc(100% / ${m} - 1px),
|
|
1860
|
+
${v.palette.grey[400]} calc(100% / ${m})
|
|
1761
1861
|
)
|
|
1762
1862
|
`
|
|
1763
1863
|
}
|
|
@@ -1766,24 +1866,32 @@ const po = _("div")`
|
|
|
1766
1866
|
]
|
|
1767
1867
|
}
|
|
1768
1868
|
) : /* @__PURE__ */ w(
|
|
1769
|
-
|
|
1869
|
+
h,
|
|
1770
1870
|
{
|
|
1771
1871
|
sx: {
|
|
1772
1872
|
position: "relative",
|
|
1773
1873
|
display: "grid",
|
|
1774
|
-
gridTemplateColumns: `repeat(${m}, 1fr)`,
|
|
1775
|
-
alignItems: "
|
|
1874
|
+
gridTemplateColumns: `repeat(${m}, minmax(0, 1fr))`,
|
|
1875
|
+
alignItems: "stretch",
|
|
1776
1876
|
width: "100%",
|
|
1777
|
-
height: "100%"
|
|
1877
|
+
height: "100%",
|
|
1878
|
+
minWidth: 0,
|
|
1879
|
+
bgcolor: f ?? Bo,
|
|
1880
|
+
boxSizing: "border-box",
|
|
1881
|
+
overflow: "hidden",
|
|
1882
|
+
// Prevent content overflow
|
|
1883
|
+
...k,
|
|
1884
|
+
...$,
|
|
1885
|
+
alignContent: P?.alignContent ?? vt
|
|
1778
1886
|
},
|
|
1779
1887
|
children: [
|
|
1780
|
-
|
|
1781
|
-
|
|
1888
|
+
ut,
|
|
1889
|
+
gt
|
|
1782
1890
|
]
|
|
1783
1891
|
}
|
|
1784
1892
|
);
|
|
1785
|
-
},
|
|
1786
|
-
function
|
|
1893
|
+
}, Lo = ["title", "description", "actions", "badge", "tag", "prepend", "append", "logo"];
|
|
1894
|
+
function Ao({
|
|
1787
1895
|
image: t,
|
|
1788
1896
|
imageBorder: e,
|
|
1789
1897
|
imageShadow: o,
|
|
@@ -1792,10 +1900,10 @@ function bo({
|
|
|
1792
1900
|
fullSizeImage: a,
|
|
1793
1901
|
...c
|
|
1794
1902
|
}) {
|
|
1795
|
-
const [s, l] =
|
|
1796
|
-
|
|
1903
|
+
const [s, l] = M(c, ot), d = Object.keys(s).length > 0 && Object.values(lt(s, Lo)).filter(Boolean).length > 0 && /* @__PURE__ */ r(et, { ...s }), p = St(t) ? t : /* @__PURE__ */ r(h, { component: "img", src: t, alt: "", className: "block" }), m = ["phone", "macbook"].includes(e), g = t && /* @__PURE__ */ r(
|
|
1904
|
+
h,
|
|
1797
1905
|
{
|
|
1798
|
-
className:
|
|
1906
|
+
className: x(
|
|
1799
1907
|
"section__image",
|
|
1800
1908
|
"m-auto, leading-[1] text-center",
|
|
1801
1909
|
o && "shadow-xl",
|
|
@@ -1810,17 +1918,17 @@ function bo({
|
|
|
1810
1918
|
},
|
|
1811
1919
|
children: m ? (
|
|
1812
1920
|
// @ts-ignore
|
|
1813
|
-
/* @__PURE__ */ r(
|
|
1921
|
+
/* @__PURE__ */ r(ye, { type: e, sx: { width: "100%" }, children: p })
|
|
1814
1922
|
) : p
|
|
1815
1923
|
}
|
|
1816
1924
|
);
|
|
1817
1925
|
return /* @__PURE__ */ r(
|
|
1818
|
-
|
|
1926
|
+
nt,
|
|
1819
1927
|
{
|
|
1820
|
-
className:
|
|
1928
|
+
className: x(
|
|
1821
1929
|
"section--block",
|
|
1822
1930
|
n,
|
|
1823
|
-
a && !i &&
|
|
1931
|
+
a && !i && it`
|
|
1824
1932
|
.section-bg {
|
|
1825
1933
|
height: 80%;
|
|
1826
1934
|
}
|
|
@@ -1829,10 +1937,10 @@ function bo({
|
|
|
1829
1937
|
...l,
|
|
1830
1938
|
boxProps: a ? { sx: { padding: 0, overflow: "hidden" } } : void 0,
|
|
1831
1939
|
children: /* @__PURE__ */ r(
|
|
1832
|
-
|
|
1940
|
+
Tt,
|
|
1833
1941
|
{
|
|
1834
1942
|
col: t ? 2 : 1,
|
|
1835
|
-
className: a ?
|
|
1943
|
+
className: a ? it`
|
|
1836
1944
|
display: flex;
|
|
1837
1945
|
flex-direction: column;
|
|
1838
1946
|
|
|
@@ -1846,19 +1954,19 @@ function bo({
|
|
|
1846
1954
|
}
|
|
1847
1955
|
}
|
|
1848
1956
|
` : void 0,
|
|
1849
|
-
children: i ? /* @__PURE__ */ w(
|
|
1850
|
-
|
|
1957
|
+
children: i ? /* @__PURE__ */ w(Q, { children: [
|
|
1958
|
+
g,
|
|
1851
1959
|
d
|
|
1852
|
-
] }) : /* @__PURE__ */ w(
|
|
1960
|
+
] }) : /* @__PURE__ */ w(Q, { children: [
|
|
1853
1961
|
d,
|
|
1854
|
-
|
|
1962
|
+
g
|
|
1855
1963
|
] })
|
|
1856
1964
|
}
|
|
1857
1965
|
)
|
|
1858
1966
|
}
|
|
1859
1967
|
);
|
|
1860
1968
|
}
|
|
1861
|
-
const
|
|
1969
|
+
const zo = [
|
|
1862
1970
|
/youtu\.be\/([^#&?]{11})/,
|
|
1863
1971
|
// youtu.be/<id>
|
|
1864
1972
|
/\?v=([^#&?]{11})/,
|
|
@@ -1870,51 +1978,51 @@ const yo = [
|
|
|
1870
1978
|
/\/v\/([^#&?]{11})/
|
|
1871
1979
|
// /v/<id>
|
|
1872
1980
|
];
|
|
1873
|
-
function
|
|
1981
|
+
function Ro(t) {
|
|
1874
1982
|
if (/youtu\.?be/.test(t))
|
|
1875
|
-
for (const e of
|
|
1983
|
+
for (const e of zo) {
|
|
1876
1984
|
const o = e.exec(t)?.[1];
|
|
1877
1985
|
if (o)
|
|
1878
1986
|
return o;
|
|
1879
1987
|
}
|
|
1880
1988
|
}
|
|
1881
|
-
function
|
|
1882
|
-
const e =
|
|
1989
|
+
function jo(t) {
|
|
1990
|
+
const e = Ro(t);
|
|
1883
1991
|
if (e)
|
|
1884
1992
|
return `https://youtube.com/embed/${e}`;
|
|
1885
1993
|
}
|
|
1886
|
-
function
|
|
1887
|
-
return
|
|
1994
|
+
function Eo({ src: t }) {
|
|
1995
|
+
return G(() => {
|
|
1888
1996
|
import("@lottiefiles/lottie-player");
|
|
1889
1997
|
}, []), /* @__PURE__ */ r("lottie-player", { autoplay: !0, loop: !0, mode: "normal", src: t });
|
|
1890
1998
|
}
|
|
1891
|
-
function
|
|
1999
|
+
function To(t) {
|
|
1892
2000
|
return /* @__PURE__ */ r(
|
|
1893
|
-
|
|
2001
|
+
h,
|
|
1894
2002
|
{
|
|
1895
2003
|
sx: {
|
|
1896
2004
|
maxHeight: 400,
|
|
1897
2005
|
overflow: "hidden auto"
|
|
1898
2006
|
},
|
|
1899
|
-
children: /* @__PURE__ */ r(
|
|
2007
|
+
children: /* @__PURE__ */ r(we, { ...t })
|
|
1900
2008
|
}
|
|
1901
2009
|
);
|
|
1902
2010
|
}
|
|
1903
|
-
function
|
|
1904
|
-
const e =
|
|
2011
|
+
function Oo({ url: t }) {
|
|
2012
|
+
const e = ct(null), o = 495, [n, i] = Z(
|
|
1905
2013
|
e.current ? e.current.offsetWidth * 0.5625 : o
|
|
1906
|
-
), a =
|
|
2014
|
+
), a = D(() => {
|
|
1907
2015
|
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;
|
|
1908
2016
|
return i(Math.floor(s * c));
|
|
1909
2017
|
}, []);
|
|
1910
|
-
return
|
|
2018
|
+
return G(() => {
|
|
1911
2019
|
window.addEventListener("resize", a);
|
|
1912
2020
|
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;
|
|
1913
2021
|
return i(Math.floor(s * c)), function() {
|
|
1914
2022
|
window.removeEventListener("resize", a);
|
|
1915
2023
|
};
|
|
1916
2024
|
}, [n, a]), /* @__PURE__ */ r(
|
|
1917
|
-
|
|
2025
|
+
h,
|
|
1918
2026
|
{
|
|
1919
2027
|
component: "iframe",
|
|
1920
2028
|
ref: e,
|
|
@@ -1931,7 +2039,7 @@ function $o({ url: t }) {
|
|
|
1931
2039
|
}
|
|
1932
2040
|
);
|
|
1933
2041
|
}
|
|
1934
|
-
const
|
|
2042
|
+
const zn = {
|
|
1935
2043
|
image: "https://www.arcblock.io/static/ead0cabde7f2b7ff34db8f3e8ceca271/afc4b/builder.png",
|
|
1936
2044
|
badge: "Develop · Deploy · Run",
|
|
1937
2045
|
title: "The Future is Here: Blockchain and Decentralized Application Development",
|
|
@@ -1942,11 +2050,11 @@ const bn = {
|
|
|
1942
2050
|
actions: void 0,
|
|
1943
2051
|
hasImage: !0,
|
|
1944
2052
|
center: !1
|
|
1945
|
-
},
|
|
2053
|
+
}, Uo = _(Ao)`
|
|
1946
2054
|
.section__description {
|
|
1947
2055
|
}
|
|
1948
2056
|
`;
|
|
1949
|
-
function
|
|
2057
|
+
function Fo({
|
|
1950
2058
|
hasImage: t,
|
|
1951
2059
|
fullSizeImage: e,
|
|
1952
2060
|
boxed: o,
|
|
@@ -1957,32 +2065,32 @@ function Co({
|
|
|
1957
2065
|
section: s,
|
|
1958
2066
|
...l
|
|
1959
2067
|
}) {
|
|
1960
|
-
const [{ editing: d }, p] =
|
|
1961
|
-
let m =
|
|
2068
|
+
const [{ editing: d }, p] = M({ ...l, boxed: e ? void 0 : o }, tt);
|
|
2069
|
+
let m = Do(p.image, n, e, i, a, c);
|
|
1962
2070
|
t || (m = null);
|
|
1963
|
-
let
|
|
1964
|
-
return p.actions && (
|
|
1965
|
-
|
|
2071
|
+
let g = null;
|
|
2072
|
+
return p.actions && (g = p.actions?.map?.((u, b) => /* @__PURE__ */ r(Rt, { ...u, editing: d }, b))), /* @__PURE__ */ r(
|
|
2073
|
+
Uo,
|
|
1966
2074
|
{
|
|
1967
2075
|
...p,
|
|
1968
2076
|
style: d ? { pointerEvents: "none" } : {},
|
|
1969
2077
|
image: m,
|
|
1970
2078
|
fullSizeImage: t && e,
|
|
1971
|
-
actions:
|
|
2079
|
+
actions: g
|
|
1972
2080
|
}
|
|
1973
2081
|
);
|
|
1974
2082
|
}
|
|
1975
|
-
function
|
|
2083
|
+
function Do(t, e, o, n, i, a) {
|
|
1976
2084
|
if (t) {
|
|
1977
2085
|
if (t.endsWith(".json"))
|
|
1978
|
-
return /* @__PURE__ */ r(
|
|
2086
|
+
return /* @__PURE__ */ r(Eo, { src: t });
|
|
1979
2087
|
if (t.indexOf("twitter.com") !== -1)
|
|
1980
|
-
return /* @__PURE__ */ r(
|
|
1981
|
-
const c =
|
|
2088
|
+
return /* @__PURE__ */ r(To, { sourceType: "url", url: t });
|
|
2089
|
+
const c = jo(t);
|
|
1982
2090
|
if (c)
|
|
1983
|
-
return /* @__PURE__ */ r(
|
|
2091
|
+
return /* @__PURE__ */ r(Oo, { url: c });
|
|
1984
2092
|
const { naturalWidth: s, naturalHeight: l, filename: d } = n || {};
|
|
1985
|
-
if (
|
|
2093
|
+
if (O(t))
|
|
1986
2094
|
return /* @__PURE__ */ r(
|
|
1987
2095
|
"video",
|
|
1988
2096
|
{
|
|
@@ -1998,16 +2106,16 @@ function No(t, e, o, n, i, a) {
|
|
|
1998
2106
|
width: "100%",
|
|
1999
2107
|
height: "100%"
|
|
2000
2108
|
},
|
|
2001
|
-
poster:
|
|
2002
|
-
children: /* @__PURE__ */ r("source", { src:
|
|
2109
|
+
poster: A(B(e), o ? 1200 : 540, i),
|
|
2110
|
+
children: /* @__PURE__ */ r("source", { src: B(t), type: qe(t) })
|
|
2003
2111
|
},
|
|
2004
2112
|
t
|
|
2005
2113
|
);
|
|
2006
2114
|
const p = i === "quality" ? 1 : 0.6;
|
|
2007
2115
|
return /* @__PURE__ */ r(
|
|
2008
|
-
|
|
2116
|
+
Pt,
|
|
2009
2117
|
{
|
|
2010
|
-
src:
|
|
2118
|
+
src: B(t),
|
|
2011
2119
|
sizesAttr: {
|
|
2012
2120
|
sm: 600 * p,
|
|
2013
2121
|
md: 450 * p,
|
|
@@ -2027,57 +2135,57 @@ function No(t, e, o, n, i, a) {
|
|
|
2027
2135
|
}
|
|
2028
2136
|
return null;
|
|
2029
2137
|
}
|
|
2030
|
-
const
|
|
2031
|
-
function
|
|
2138
|
+
const Rn = ["production", "draft"];
|
|
2139
|
+
function jn({ mode: t, version: e } = {}) {
|
|
2032
2140
|
const o = e && typeof e == "number" ? { mode: t, version: e } : { mode: t };
|
|
2033
|
-
return
|
|
2141
|
+
return dt.get(`/api/${mt()}/pages`, { params: o }).then((n) => n.data);
|
|
2034
2142
|
}
|
|
2035
|
-
function
|
|
2036
|
-
return
|
|
2143
|
+
function En({ mode: t, routes: e }) {
|
|
2144
|
+
return dt.post(`/api/${mt()}/pages/publish`, { mode: t, routes: e }).then((o) => o.data);
|
|
2037
2145
|
}
|
|
2038
|
-
function
|
|
2146
|
+
function Go({
|
|
2039
2147
|
locale: t,
|
|
2040
2148
|
sort: e,
|
|
2041
2149
|
page: o,
|
|
2042
2150
|
limit: n,
|
|
2043
2151
|
mode: i
|
|
2044
2152
|
} = {}) {
|
|
2045
|
-
return
|
|
2153
|
+
return dt.get(`/api/${mt()}/pages/toc`, { params: { locale: t, sort: e, page: o, limit: n, mode: i } }).then((a) => a.data);
|
|
2046
2154
|
}
|
|
2047
|
-
const
|
|
2155
|
+
const Tn = {
|
|
2048
2156
|
style: "list",
|
|
2049
2157
|
sort: "-updatedAt"
|
|
2050
|
-
},
|
|
2051
|
-
function
|
|
2052
|
-
const [{ editing: i, locale: a }, c] =
|
|
2158
|
+
}, kt = 20;
|
|
2159
|
+
function Ho({ style: t, sort: e, section: o, ...n }) {
|
|
2160
|
+
const [{ editing: i, locale: a }, c] = M(n, tt), [s, l] = M(c, ot), [d, p] = Z(), m = ct(!1), g = ve(), u = re(), b = D(async () => {
|
|
2053
2161
|
if (!m.current) {
|
|
2054
|
-
m.current = !0,
|
|
2162
|
+
m.current = !0, g();
|
|
2055
2163
|
try {
|
|
2056
|
-
const
|
|
2057
|
-
p((
|
|
2058
|
-
list: (
|
|
2059
|
-
total:
|
|
2164
|
+
const f = d ? Math.floor(d.list.length / kt) + 1 : 1, { list: y, total: k } = await Go({ locale: a, sort: e, page: f, limit: kt });
|
|
2165
|
+
p(($) => ({
|
|
2166
|
+
list: ($?.list ?? []).concat(y),
|
|
2167
|
+
total: k
|
|
2060
2168
|
}));
|
|
2061
2169
|
} finally {
|
|
2062
|
-
m.current = !1,
|
|
2170
|
+
m.current = !1, g();
|
|
2063
2171
|
}
|
|
2064
2172
|
}
|
|
2065
|
-
}, [d, a, e,
|
|
2066
|
-
return
|
|
2067
|
-
|
|
2068
|
-
}), /* @__PURE__ */ w(
|
|
2069
|
-
Object.keys(s).length > 0 && /* @__PURE__ */ r(
|
|
2070
|
-
d ? /* @__PURE__ */ w(
|
|
2173
|
+
}, [d, a, e, g]);
|
|
2174
|
+
return ke(() => {
|
|
2175
|
+
b();
|
|
2176
|
+
}), /* @__PURE__ */ w(nt, { ...l, sx: i ? { pointerEvents: "none" } : {}, children: [
|
|
2177
|
+
Object.keys(s).length > 0 && /* @__PURE__ */ r(et, { ...s }),
|
|
2178
|
+
d ? /* @__PURE__ */ w(Q, { children: [
|
|
2071
2179
|
/* @__PURE__ */ r(
|
|
2072
|
-
|
|
2180
|
+
ht,
|
|
2073
2181
|
{
|
|
2074
2182
|
container: !0,
|
|
2075
2183
|
spacing: 2,
|
|
2076
2184
|
sx: {
|
|
2077
2185
|
justifyContent: "center"
|
|
2078
2186
|
},
|
|
2079
|
-
children: d?.list.map((
|
|
2080
|
-
|
|
2187
|
+
children: d?.list.map((f) => /* @__PURE__ */ r(
|
|
2188
|
+
ht,
|
|
2081
2189
|
{
|
|
2082
2190
|
size: {
|
|
2083
2191
|
xs: 12,
|
|
@@ -2085,62 +2193,62 @@ function Mo({ style: t, sort: e, section: o, ...n }) {
|
|
|
2085
2193
|
md: t === "card" ? 3 : 12
|
|
2086
2194
|
},
|
|
2087
2195
|
children: /* @__PURE__ */ w(
|
|
2088
|
-
|
|
2196
|
+
Yo,
|
|
2089
2197
|
{
|
|
2090
2198
|
elevation: 0,
|
|
2091
|
-
className:
|
|
2092
|
-
onClick: i ? void 0 : () => u(
|
|
2199
|
+
className: x(t === "card" && "style-card"),
|
|
2200
|
+
onClick: i ? void 0 : () => u(f.slug),
|
|
2093
2201
|
children: [
|
|
2094
|
-
!!
|
|
2095
|
-
|
|
2202
|
+
!!f.image && /* @__PURE__ */ r(
|
|
2203
|
+
Xt,
|
|
2096
2204
|
{
|
|
2097
2205
|
component: "img",
|
|
2098
2206
|
alt: "",
|
|
2099
|
-
image:
|
|
2207
|
+
image: A(B(f.image), 540),
|
|
2100
2208
|
loading: "lazy"
|
|
2101
2209
|
}
|
|
2102
2210
|
),
|
|
2103
|
-
/* @__PURE__ */ w(
|
|
2104
|
-
/* @__PURE__ */ r(
|
|
2105
|
-
/* @__PURE__ */ r(
|
|
2211
|
+
/* @__PURE__ */ w(qt, { children: [
|
|
2212
|
+
/* @__PURE__ */ r(L, { variant: "h6", component: "div", className: _t, children: f.title || f.id }),
|
|
2213
|
+
/* @__PURE__ */ r(L, { variant: "body2", className: _t, children: f.description })
|
|
2106
2214
|
] })
|
|
2107
2215
|
]
|
|
2108
2216
|
}
|
|
2109
2217
|
)
|
|
2110
2218
|
},
|
|
2111
|
-
|
|
2219
|
+
f.id
|
|
2112
2220
|
))
|
|
2113
2221
|
}
|
|
2114
2222
|
),
|
|
2115
2223
|
/* @__PURE__ */ r(
|
|
2116
|
-
|
|
2224
|
+
h,
|
|
2117
2225
|
{
|
|
2118
2226
|
sx: {
|
|
2119
2227
|
textAlign: "center",
|
|
2120
2228
|
mt: 2
|
|
2121
2229
|
},
|
|
2122
|
-
children: d.total > d.list.length ? /* @__PURE__ */ r(
|
|
2230
|
+
children: d.total > d.list.length ? /* @__PURE__ */ r(F, { variant: "outlined", color: "secondary", onClick: b, loading: m.current, children: "More" }) : /* @__PURE__ */ r(F, { variant: "outlined", color: "secondary", disabled: !0, children: "No More" })
|
|
2123
2231
|
}
|
|
2124
2232
|
)
|
|
2125
2233
|
] }) : /* @__PURE__ */ r(
|
|
2126
|
-
|
|
2234
|
+
h,
|
|
2127
2235
|
{
|
|
2128
2236
|
sx: {
|
|
2129
2237
|
p: 2,
|
|
2130
2238
|
textAlign: "center"
|
|
2131
2239
|
},
|
|
2132
|
-
children: /* @__PURE__ */ r(
|
|
2240
|
+
children: /* @__PURE__ */ r(Kt, { size: 24 })
|
|
2133
2241
|
}
|
|
2134
2242
|
)
|
|
2135
2243
|
] });
|
|
2136
2244
|
}
|
|
2137
|
-
const
|
|
2245
|
+
const _t = it`
|
|
2138
2246
|
display: -webkit-box;
|
|
2139
2247
|
-webkit-box-orient: vertical;
|
|
2140
2248
|
-webkit-line-clamp: 2;
|
|
2141
2249
|
overflow: hidden;
|
|
2142
2250
|
text-overflow: ellipsis;
|
|
2143
|
-
`,
|
|
2251
|
+
`, Yo = _(Jt)`
|
|
2144
2252
|
border: 1px solid #e0e0e0;
|
|
2145
2253
|
background-color: transparent;
|
|
2146
2254
|
cursor: pointer;
|
|
@@ -2160,15 +2268,15 @@ const gt = tt`
|
|
|
2160
2268
|
max-height: 50vw;
|
|
2161
2269
|
}
|
|
2162
2270
|
}
|
|
2163
|
-
`,
|
|
2164
|
-
iframe:
|
|
2165
|
-
section:
|
|
2166
|
-
"section-card-list":
|
|
2167
|
-
toc:
|
|
2168
|
-
"custom-component":
|
|
2169
|
-
"layout-block":
|
|
2271
|
+
`, Vo = {
|
|
2272
|
+
iframe: $o,
|
|
2273
|
+
section: Fo,
|
|
2274
|
+
"section-card-list": wo,
|
|
2275
|
+
toc: Ho,
|
|
2276
|
+
"custom-component": vo,
|
|
2277
|
+
"layout-block": Wo
|
|
2170
2278
|
};
|
|
2171
|
-
function
|
|
2279
|
+
function Jo({
|
|
2172
2280
|
id: t,
|
|
2173
2281
|
type: e,
|
|
2174
2282
|
mode: o,
|
|
@@ -2178,46 +2286,46 @@ function Po({
|
|
|
2178
2286
|
page: c,
|
|
2179
2287
|
...s
|
|
2180
2288
|
}) {
|
|
2181
|
-
const l =
|
|
2182
|
-
const { height: u, ...
|
|
2183
|
-
return e === "layout-block" && (
|
|
2184
|
-
const
|
|
2289
|
+
const l = Vo[e], { getPageMetaStyle: d } = Ee(), p = S(() => {
|
|
2290
|
+
const { height: u, ...b } = n;
|
|
2291
|
+
return e === "layout-block" && (b.onBlockRender = (f) => {
|
|
2292
|
+
const y = {
|
|
2185
2293
|
...n?.dev,
|
|
2186
|
-
...
|
|
2187
|
-
}, { defaultLocale:
|
|
2188
|
-
...
|
|
2189
|
-
...
|
|
2190
|
-
dev:
|
|
2191
|
-
}, { locale:
|
|
2192
|
-
let
|
|
2193
|
-
return
|
|
2194
|
-
|
|
2294
|
+
...f?.config?.dev
|
|
2295
|
+
}, { defaultLocale: k } = y, $ = {
|
|
2296
|
+
...lt(n, ["locale", "editing"]),
|
|
2297
|
+
...f?.config,
|
|
2298
|
+
dev: y
|
|
2299
|
+
}, { locale: P } = $;
|
|
2300
|
+
let C = c?.dataSource?.[f?.id]?.[P];
|
|
2301
|
+
return Zt(C) && (C = c?.dataSource?.[f?.id]?.[k ?? "en"]), /* @__PURE__ */ r(
|
|
2302
|
+
Jo,
|
|
2195
2303
|
{
|
|
2196
|
-
...
|
|
2304
|
+
...f,
|
|
2197
2305
|
config: {
|
|
2198
|
-
...
|
|
2199
|
-
|
|
2200
|
-
|
|
2306
|
+
...f?.section?.properties,
|
|
2307
|
+
...C,
|
|
2308
|
+
...$
|
|
2201
2309
|
},
|
|
2202
2310
|
page: c,
|
|
2203
2311
|
ignorePageMetaStyle: !0
|
|
2204
2312
|
}
|
|
2205
2313
|
);
|
|
2206
|
-
}),
|
|
2207
|
-
}, [n, e]), m =
|
|
2314
|
+
}), b;
|
|
2315
|
+
}, [n, e]), m = S(() => {
|
|
2208
2316
|
const u = {};
|
|
2209
2317
|
return e !== "custom-component" && (u.height = n.height), u.sx = a ? void 0 : d("sx"), u.id = `BlockBase-${t}`, u;
|
|
2210
|
-
}, [n.height, a, e, d]),
|
|
2211
|
-
return
|
|
2318
|
+
}, [n.height, a, e, d]), g = l && /* @__PURE__ */ r(l, { mode: o, ...p, id: t, section: i });
|
|
2319
|
+
return g ? /* @__PURE__ */ r(Te, { ...s, ...m, children: g }) : /* @__PURE__ */ r(Ko, { type: e });
|
|
2212
2320
|
}
|
|
2213
|
-
function
|
|
2321
|
+
function Ko({ type: t }) {
|
|
2214
2322
|
return /* @__PURE__ */ r(
|
|
2215
|
-
|
|
2323
|
+
h,
|
|
2216
2324
|
{
|
|
2217
2325
|
sx: {
|
|
2218
2326
|
p: 2
|
|
2219
2327
|
},
|
|
2220
|
-
children: /* @__PURE__ */ w(
|
|
2328
|
+
children: /* @__PURE__ */ w(Qt, { icon: /* @__PURE__ */ r(Dt, {}), color: "error", children: [
|
|
2221
2329
|
"Unsupported Block `",
|
|
2222
2330
|
t,
|
|
2223
2331
|
"`"
|
|
@@ -2226,13 +2334,13 @@ function jo({ type: t }) {
|
|
|
2226
2334
|
);
|
|
2227
2335
|
}
|
|
2228
2336
|
export {
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2337
|
+
Jo as B,
|
|
2338
|
+
An as I,
|
|
2339
|
+
Wn as P,
|
|
2340
|
+
Rn as S,
|
|
2341
|
+
Tn as T,
|
|
2342
|
+
In as a,
|
|
2343
|
+
zn as b,
|
|
2344
|
+
jn as g,
|
|
2345
|
+
En as p
|
|
2238
2346
|
};
|