@blocklet/pages-kit-inner-components 0.4.116 → 0.4.118
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 +8 -8
- package/lib/cjs/chunks/array-CeBRUkLo.js +441 -0
- package/lib/cjs/chunks/{config-color-C8L0QSPJ.js → config-color-C8kj-s2C.js} +1 -1
- package/lib/cjs/chunks/{draft-data-DPTVTTlh.js → draft-data-CRdesc3Z.js} +1 -1
- package/lib/cjs/chunks/home-DpGYsQ1r.js +38 -0
- package/lib/cjs/chunks/publish-button-DXSPVfAC.js +1 -0
- package/lib/cjs/chunks/site-state-BMf96RZL.js +57 -0
- package/lib/cjs/chunks/state-oc52fQ0j.js +1 -0
- package/lib/cjs/components.js +1 -1
- package/lib/cjs/home.js +1 -1
- package/lib/cjs/locales.js +1 -1
- package/lib/cjs/project-html.js +1 -1
- package/lib/cjs/resources.js +1 -1
- package/lib/cjs/setting.js +1 -1
- package/lib/cjs/site-state.js +1 -1
- package/lib/es/add-component.js +125 -120
- package/lib/es/chunks/array-k2vnX696.js +1966 -0
- package/lib/es/chunks/{config-color-JrBPRsTv.js → config-color-CXt_ZsC_.js} +1 -1
- package/lib/es/chunks/{draft-data-BFlmvWXx.js → draft-data-BwyMBf8Y.js} +1 -1
- package/lib/es/chunks/home-DAvVGR8Z.js +505 -0
- package/lib/es/chunks/publish-button-CxrZAPBF.js +295 -0
- package/lib/es/chunks/site-state-kjir-UCL.js +1718 -0
- package/lib/es/chunks/state-Dz3GnGWC.js +437 -0
- package/lib/es/components.js +1 -1
- package/lib/es/home.js +10 -8
- package/lib/es/locales.js +81 -17
- package/lib/es/project-html.js +1 -1
- package/lib/es/resources.js +1 -1
- package/lib/es/setting.js +2 -2
- package/lib/es/site-state.js +13 -12
- package/package.json +9 -9
- package/lib/cjs/chunks/array-BwGaBJVb.js +0 -513
- package/lib/cjs/chunks/home-CXupaCeO.js +0 -38
- package/lib/cjs/chunks/publish-button-TrJpN62K.js +0 -1
- package/lib/cjs/chunks/site-state-D15mduKB.js +0 -57
- package/lib/cjs/chunks/state-DDwYX2mu.js +0 -1
- package/lib/es/chunks/array-Chju-apt.js +0 -2142
- package/lib/es/chunks/home-47HCvpbj.js +0 -475
- package/lib/es/chunks/publish-button-DhT2I-bw.js +0 -282
- package/lib/es/chunks/site-state-DJ_KkVbi.js +0 -1548
- package/lib/es/chunks/state-BgKqNapt.js +0 -425
|
@@ -0,0 +1,1966 @@
|
|
|
1
|
+
import { jsx as i, jsxs as w, Fragment as Y } from "react/jsx-runtime";
|
|
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 Vt, Card as Ut, 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 J, useContext as bt, Fragment as Mt, isValidElement as yt, useState as M, useEffect as T, useRef as tt } from "react";
|
|
5
|
+
import K from "lodash/keyBy";
|
|
6
|
+
import { e as j, b as N, E as Kt, h as et, l as ot } from "./state-Dz3GnGWC.js";
|
|
7
|
+
import { AIForm as lt, AIFormResult as ct } from "@blocklet/ai-runtime/components";
|
|
8
|
+
import { deepmerge as Gt } from "@mui/utils";
|
|
9
|
+
import nt from "lodash/pick";
|
|
10
|
+
import { ErrorBoundary as Xt } from "react-error-boundary";
|
|
11
|
+
import qt from "@blocklet/pages-kit/builtin/markdown/markdown-renderer";
|
|
12
|
+
import { useColorConvert as wt } from "@blocklet/pages-kit/contexts/color";
|
|
13
|
+
import { cx as g, css as X } from "@emotion/css";
|
|
14
|
+
import { materialDark as Qt } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
15
|
+
import { useTheme as vt, styled as _ } from "@arcblock/ux/lib/Theme";
|
|
16
|
+
import Zt from "@arcblock/react-hooks/lib/useBrowser";
|
|
17
|
+
import dt from "@arcblock/ux/lib/Colors";
|
|
18
|
+
import { ResponsiveImage as kt, CustomComponentRenderer as te } from "@blocklet/pages-kit/components";
|
|
19
|
+
import { isGradient as ee, isColorString as oe } from "@blocklet/pages-kit/utils/style";
|
|
20
|
+
import _t from "@mui/material/useMediaQuery";
|
|
21
|
+
import S from "lodash/omit";
|
|
22
|
+
import { Icon as $t } from "@iconify-icon/react";
|
|
23
|
+
import ne from "@arcblock/ux/lib/Screenshot";
|
|
24
|
+
import { Link as re, NavLink as ie, useNavigate as ae } from "react-router-dom";
|
|
25
|
+
import se from "@arcblock/ux/lib/Button";
|
|
26
|
+
import q from "is-uri";
|
|
27
|
+
import { join as D } from "pathe";
|
|
28
|
+
import { withoutTrailingSlash as G, isRelative as le, parseURL as ce } from "ufo";
|
|
29
|
+
import { useMessage as de } from "@blocklet/embed/message";
|
|
30
|
+
import { useLatest as me } from "ahooks";
|
|
31
|
+
import pe from "lodash/isEqual";
|
|
32
|
+
import { EmbedIframe as ue } from "@blocklet/embed/react";
|
|
33
|
+
import { TwitterTimelineEmbed as he } from "react-twitter-embed";
|
|
34
|
+
import { useUpdate as fe, useMount as ge } from "react-use";
|
|
35
|
+
const Nt = "{{CUSTOM_VALUE}}", xe = [
|
|
36
|
+
{
|
|
37
|
+
title: "None",
|
|
38
|
+
value: "none",
|
|
39
|
+
sx: { py: 0 }
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: "Small",
|
|
43
|
+
value: "small",
|
|
44
|
+
sx: { py: { xs: 2.5, md: 4, lg: 4, xl: 6 } }
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: "Normal",
|
|
48
|
+
value: "normal",
|
|
49
|
+
sx: { py: { xs: 5, md: 7.5, lg: 10, xl: 12.5 } }
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
title: "Large",
|
|
53
|
+
value: "large",
|
|
54
|
+
sx: { py: { xs: 7.5, md: 10, lg: 12.5, xl: 15 } }
|
|
55
|
+
}
|
|
56
|
+
], be = [
|
|
57
|
+
{
|
|
58
|
+
title: "None",
|
|
59
|
+
value: "none",
|
|
60
|
+
sx: { py: 0 }
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: "Small",
|
|
64
|
+
value: "small",
|
|
65
|
+
sx: { py: { xs: 2.5, md: 4, lg: 4, xl: 6 } }
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
title: "Normal",
|
|
69
|
+
value: "normal",
|
|
70
|
+
sx: { py: { xs: 5, md: 7, lg: 7, xl: 9 } }
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
title: "Large",
|
|
74
|
+
value: "large",
|
|
75
|
+
sx: { py: { xs: 6, md: 9, lg: 9, xl: 11 } }
|
|
76
|
+
}
|
|
77
|
+
], ye = [
|
|
78
|
+
{
|
|
79
|
+
title: "None",
|
|
80
|
+
value: "none",
|
|
81
|
+
sx: { px: 0 }
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
title: "Small",
|
|
85
|
+
value: "small",
|
|
86
|
+
sx: { px: { xs: 2.5, md: 4, lg: 4, xl: 6 } }
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
title: "Normal",
|
|
90
|
+
value: "normal",
|
|
91
|
+
sx: { px: { xs: 5, md: 7.5, lg: 10, xl: 12.5 } }
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: "Large",
|
|
95
|
+
value: "large",
|
|
96
|
+
sx: { px: { xs: 7.5, md: 10, lg: 12.5, xl: 15 } }
|
|
97
|
+
}
|
|
98
|
+
], H = (t, e, n) => {
|
|
99
|
+
const r = t.breakpoints.values[n];
|
|
100
|
+
return `${e}${r ? ` (${r}px)` : ""}`;
|
|
101
|
+
}, we = [
|
|
102
|
+
{
|
|
103
|
+
title: "100%",
|
|
104
|
+
value: "full",
|
|
105
|
+
sx: { maxWidth: "100%" }
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
title: (t) => H(t, "Small", "sm"),
|
|
109
|
+
value: "sm",
|
|
110
|
+
sx: {
|
|
111
|
+
maxWidth: (t) => t.breakpoints.values.sm,
|
|
112
|
+
width: "100%",
|
|
113
|
+
mx: "auto"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
title: (t) => H(t, "Normal", "md"),
|
|
118
|
+
value: "md",
|
|
119
|
+
sx: { maxWidth: (t) => t.breakpoints.values.md, width: "100%", mx: "auto" }
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
title: (t) => H(t, "Large", "lg"),
|
|
123
|
+
value: "lg",
|
|
124
|
+
sx: { maxWidth: (t) => t.breakpoints.values.lg, width: "100%", mx: "auto" }
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
title: (t) => H(t, "Extra Large", "xl"),
|
|
128
|
+
value: "xl",
|
|
129
|
+
sx: { maxWidth: (t) => t.breakpoints.values.xl, width: "100%", mx: "auto" }
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
title: "Custom",
|
|
133
|
+
value: "custom",
|
|
134
|
+
sx: {
|
|
135
|
+
maxWidth: Nt,
|
|
136
|
+
width: "100%",
|
|
137
|
+
mx: "auto"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
], ve = K(xe, "value"), ke = K(be, "value"), _e = K(ye, "value"), $e = K(we, "value"), Ne = /* @__PURE__ */ new Map([
|
|
141
|
+
["baseSectionPaddingY", ve],
|
|
142
|
+
["maxWidth", $e],
|
|
143
|
+
["paddingY", ke],
|
|
144
|
+
["paddingX", _e]
|
|
145
|
+
]);
|
|
146
|
+
function St(t) {
|
|
147
|
+
var l;
|
|
148
|
+
const { type: e, value: n, format: r = "sx", defaultValue: o = null } = t, a = Ne.get(e);
|
|
149
|
+
if (!a)
|
|
150
|
+
return o;
|
|
151
|
+
const d = n.startsWith("custom:"), s = d ? "custom" : n;
|
|
152
|
+
if (a != null && a[s] && ((l = a == null ? void 0 : a[s]) != null && l[r])) {
|
|
153
|
+
const c = a[s][r];
|
|
154
|
+
if (d) {
|
|
155
|
+
const m = n.replace("custom:", "");
|
|
156
|
+
try {
|
|
157
|
+
return JSON.parse(JSON.stringify(c || {}).replaceAll(Nt, m));
|
|
158
|
+
} catch {
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return c;
|
|
162
|
+
}
|
|
163
|
+
return o;
|
|
164
|
+
}
|
|
165
|
+
const Ct = xt({
|
|
166
|
+
page: null,
|
|
167
|
+
getPageMeta: () => ({}),
|
|
168
|
+
getPageMetaStyle: () => ({})
|
|
169
|
+
});
|
|
170
|
+
function Se() {
|
|
171
|
+
return bt(Ct);
|
|
172
|
+
}
|
|
173
|
+
function cn({
|
|
174
|
+
page: t,
|
|
175
|
+
children: e,
|
|
176
|
+
defaultLocale: n = "en",
|
|
177
|
+
currentLocale: r
|
|
178
|
+
}) {
|
|
179
|
+
const o = W(() => t ? JSON.parse(JSON.stringify(t)) : null, [JSON.stringify(t)]), a = J(() => {
|
|
180
|
+
var c;
|
|
181
|
+
if (!o) return {};
|
|
182
|
+
const l = r || n;
|
|
183
|
+
return ((c = o.locales) == null ? void 0 : c[l]) ?? {};
|
|
184
|
+
}, [o, n, r]), d = J(
|
|
185
|
+
(l = "sx") => {
|
|
186
|
+
const c = a();
|
|
187
|
+
return !c || !c.style ? {} : Object.entries(c.style || {}).reduce((p, [h, u]) => {
|
|
188
|
+
if (!u) return p;
|
|
189
|
+
const f = `${h}Custom`;
|
|
190
|
+
c.style[f];
|
|
191
|
+
const y = St({
|
|
192
|
+
type: h,
|
|
193
|
+
value: u,
|
|
194
|
+
format: l
|
|
195
|
+
});
|
|
196
|
+
return y ? { ...p, ...y } : p;
|
|
197
|
+
}, {});
|
|
198
|
+
},
|
|
199
|
+
[a]
|
|
200
|
+
), s = W(
|
|
201
|
+
() => ({
|
|
202
|
+
page: o,
|
|
203
|
+
getPageMeta: a,
|
|
204
|
+
getPageMetaStyle: d
|
|
205
|
+
}),
|
|
206
|
+
[o, a, d]
|
|
207
|
+
);
|
|
208
|
+
return /* @__PURE__ */ i(Ct.Provider, { value: s, children: e });
|
|
209
|
+
}
|
|
210
|
+
function z({ actions: t, center: e, className: n, align: r }) {
|
|
211
|
+
return t && (t != null && t.length) ? /* @__PURE__ */ i(
|
|
212
|
+
b,
|
|
213
|
+
{
|
|
214
|
+
className: g(
|
|
215
|
+
"flex gap-4 flex-wrap",
|
|
216
|
+
"lg:flex-row lg:gap-8",
|
|
217
|
+
(e || r === "center") && "justify-center",
|
|
218
|
+
!e && r === "right" && "justify-end",
|
|
219
|
+
!e && r === "left" && "justify-start",
|
|
220
|
+
n
|
|
221
|
+
),
|
|
222
|
+
sx: { alignItems: "center" },
|
|
223
|
+
children: t
|
|
224
|
+
}
|
|
225
|
+
) : null;
|
|
226
|
+
}
|
|
227
|
+
const Ce = "section", Pe = Tt(b)`
|
|
228
|
+
overflow: hidden;
|
|
229
|
+
|
|
230
|
+
.section__title {
|
|
231
|
+
margin-top: 0;
|
|
232
|
+
font-weight: 700;
|
|
233
|
+
}
|
|
234
|
+
.section__title_non_big {
|
|
235
|
+
font-size: 32px;
|
|
236
|
+
@media (max-width: 600px) {
|
|
237
|
+
font-size: 24px;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
&.base-info .section__tag {
|
|
241
|
+
margin-top: 0;
|
|
242
|
+
margin-bottom: 2vw;
|
|
243
|
+
background-color: ${({ theme: t }) => t.palette.primary.main};
|
|
244
|
+
white-space: nowrap;
|
|
245
|
+
max-width: 100%;
|
|
246
|
+
display: inline-block;
|
|
247
|
+
padding: 0 10px;
|
|
248
|
+
justify-content: flex-start;
|
|
249
|
+
overflow: hidden;
|
|
250
|
+
text-overflow: ellipsis;
|
|
251
|
+
font-size: 12px;
|
|
252
|
+
color: #fff;
|
|
253
|
+
border-radius: 4px;
|
|
254
|
+
line-height: 20px;
|
|
255
|
+
}
|
|
256
|
+
.section__title {
|
|
257
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
258
|
+
a {
|
|
259
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
260
|
+
}
|
|
261
|
+
p {
|
|
262
|
+
margin-top: 0;
|
|
263
|
+
margin-bottom: 0;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
.section__description {
|
|
267
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
268
|
+
margin-bottom: 4vw;
|
|
269
|
+
margin-top: 0;
|
|
270
|
+
a {
|
|
271
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
272
|
+
}
|
|
273
|
+
p {
|
|
274
|
+
margin-top: 0;
|
|
275
|
+
margin-bottom: 0.5rem;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[Ce]}px) {
|
|
279
|
+
.section__tag {
|
|
280
|
+
margin-bottom: 32px;
|
|
281
|
+
}
|
|
282
|
+
.section__title {
|
|
283
|
+
margin-bottom: 32px;
|
|
284
|
+
}
|
|
285
|
+
.section__description {
|
|
286
|
+
margin-bottom: 40px;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
`;
|
|
290
|
+
function E({
|
|
291
|
+
title: t,
|
|
292
|
+
description: e,
|
|
293
|
+
descriptionMarkdown: n,
|
|
294
|
+
actions: r,
|
|
295
|
+
className: o = "",
|
|
296
|
+
classes: a = {},
|
|
297
|
+
prepend: d,
|
|
298
|
+
append: s,
|
|
299
|
+
level: l = 2,
|
|
300
|
+
tag: c,
|
|
301
|
+
badge: m,
|
|
302
|
+
center: p,
|
|
303
|
+
logo: h,
|
|
304
|
+
titleAppearance: u,
|
|
305
|
+
descriptionAppearance: f,
|
|
306
|
+
...y
|
|
307
|
+
}) {
|
|
308
|
+
const x = wt();
|
|
309
|
+
if (!t && !e && !r && !m && !c && !d && !s && !h) return null;
|
|
310
|
+
const k = Math.max(Math.min(5, l + 1), 1), v = {
|
|
311
|
+
1: "xl:!text-3xl lg:!text-2xl md:!text-xl",
|
|
312
|
+
2: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
313
|
+
3: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
314
|
+
4: "xl:!text-xl lg:!text-lg md:!text-md",
|
|
315
|
+
5: "xl:!text-lg md:!text-md sm:!text-sm",
|
|
316
|
+
6: "!text-sm"
|
|
317
|
+
}, I = l === 0 ? "big" : `h${k}`, R = l === 0;
|
|
318
|
+
return /* @__PURE__ */ w(Pe, { className: g("base-info", "lg:text-left", p && "!text-center", o), ...y, children: [
|
|
319
|
+
d && /* @__PURE__ */ i("div", { children: d }),
|
|
320
|
+
(c || m) && /* @__PURE__ */ i("div", { className: g("section__tag", (a == null ? void 0 : a.tag) || (a == null ? void 0 : a.badge)), children: c || m }),
|
|
321
|
+
h && /* @__PURE__ */ i("img", { className: "w-[120px] m-auto mb-8", src: h, alt: "info", loading: "lazy" }),
|
|
322
|
+
t && /* @__PURE__ */ i(
|
|
323
|
+
C,
|
|
324
|
+
{
|
|
325
|
+
sx: {
|
|
326
|
+
whiteSpace: "pre-wrap",
|
|
327
|
+
mb: e ? "2vw" : 0,
|
|
328
|
+
...(u == null ? void 0 : u.color) && { color: `${x(u.color)} !important` }
|
|
329
|
+
},
|
|
330
|
+
className: g(
|
|
331
|
+
"section__title",
|
|
332
|
+
"text-gray-800",
|
|
333
|
+
"dark:text-gray-50",
|
|
334
|
+
a.title,
|
|
335
|
+
"page-kit-section__title",
|
|
336
|
+
R ? "" : "section__title_non_big"
|
|
337
|
+
),
|
|
338
|
+
component: `h${Math.max(l, 1)}`,
|
|
339
|
+
variant: I,
|
|
340
|
+
children: t
|
|
341
|
+
}
|
|
342
|
+
),
|
|
343
|
+
e && (n ? /* @__PURE__ */ i(
|
|
344
|
+
b,
|
|
345
|
+
{
|
|
346
|
+
sx: {
|
|
347
|
+
...(f == null ? void 0 : f.color) && { color: `${x(f.color)} !important` }
|
|
348
|
+
},
|
|
349
|
+
className: g(
|
|
350
|
+
"section__description",
|
|
351
|
+
"text-gray-800",
|
|
352
|
+
"dark:text-gray-100",
|
|
353
|
+
v[k],
|
|
354
|
+
a.description,
|
|
355
|
+
"page-kit-section__description"
|
|
356
|
+
),
|
|
357
|
+
children: /* @__PURE__ */ i(qt, { codeOptions: { showActionButton: !1, theme: Qt }, children: e })
|
|
358
|
+
}
|
|
359
|
+
) : /* @__PURE__ */ i(
|
|
360
|
+
C,
|
|
361
|
+
{
|
|
362
|
+
sx: {
|
|
363
|
+
whiteSpace: "pre-wrap",
|
|
364
|
+
...(f == null ? void 0 : f.color) && { color: `${x(f.color)} !important` }
|
|
365
|
+
},
|
|
366
|
+
className: g(
|
|
367
|
+
"section__description",
|
|
368
|
+
"text-gray-800",
|
|
369
|
+
"dark:text-gray-100",
|
|
370
|
+
v[k],
|
|
371
|
+
a.description,
|
|
372
|
+
"page-kit-section__description"
|
|
373
|
+
),
|
|
374
|
+
component: "div",
|
|
375
|
+
variant: "body1",
|
|
376
|
+
gutterBottom: !0,
|
|
377
|
+
children: e
|
|
378
|
+
}
|
|
379
|
+
)),
|
|
380
|
+
/* @__PURE__ */ i(z, { actions: r, center: p, className: "mt-8" }),
|
|
381
|
+
s && /* @__PURE__ */ i("div", { children: s })
|
|
382
|
+
] });
|
|
383
|
+
}
|
|
384
|
+
const O = [
|
|
385
|
+
"actions",
|
|
386
|
+
"append",
|
|
387
|
+
"badge",
|
|
388
|
+
"tag",
|
|
389
|
+
"center",
|
|
390
|
+
"description",
|
|
391
|
+
"descriptionMarkdown",
|
|
392
|
+
"level",
|
|
393
|
+
"logo",
|
|
394
|
+
"prepend",
|
|
395
|
+
"title",
|
|
396
|
+
"titleAppearance",
|
|
397
|
+
"descriptionAppearance"
|
|
398
|
+
];
|
|
399
|
+
function Pt(t) {
|
|
400
|
+
if (t.type === Mt) {
|
|
401
|
+
const n = (t.props.children || []).filter((r) => yt(r));
|
|
402
|
+
return n.length === 1 ? Pt(n[0]) : n.length > 1;
|
|
403
|
+
}
|
|
404
|
+
return Array.isArray(t);
|
|
405
|
+
}
|
|
406
|
+
const P = "&>*";
|
|
407
|
+
function rt({ children: t, col: e, gap: n, className: r, align: o, sx: a, type: d, ...s } = {
|
|
408
|
+
children: null,
|
|
409
|
+
className: "",
|
|
410
|
+
col: 3,
|
|
411
|
+
gap: void 0,
|
|
412
|
+
sx: {},
|
|
413
|
+
align: "center",
|
|
414
|
+
type: "default"
|
|
415
|
+
}) {
|
|
416
|
+
const l = vt(), c = Number(Math.floor(100 / e * 100) / 100), m = {
|
|
417
|
+
center: "justify-center items-center",
|
|
418
|
+
left: "justify-start items-center",
|
|
419
|
+
right: "justify-end items-center",
|
|
420
|
+
top: "justify-center items-start",
|
|
421
|
+
bottom: "justify-center items-end",
|
|
422
|
+
"top-left": "justify-start items-start",
|
|
423
|
+
"top-right": "justify-end items-start",
|
|
424
|
+
"bottom-left": "justify-start items-end",
|
|
425
|
+
"bottom-right": "justify-end items-end"
|
|
426
|
+
}, p = m[o] || m.center;
|
|
427
|
+
let u = n ?? ({
|
|
428
|
+
2: 6,
|
|
429
|
+
3: 4,
|
|
430
|
+
4: 4,
|
|
431
|
+
5: 3,
|
|
432
|
+
6: 3
|
|
433
|
+
}[e] || 0);
|
|
434
|
+
Pt(t) || (u = 0);
|
|
435
|
+
const y = (e - 1) * u / e;
|
|
436
|
+
let x = { ...a, gap: `${u}rem` };
|
|
437
|
+
const k = { [P]: { width: "100%" } }, v = {}, I = {}, R = {};
|
|
438
|
+
switch (k.gap = "1rem", v.gap = `${u / 2}rem`, e) {
|
|
439
|
+
case 3:
|
|
440
|
+
case 4:
|
|
441
|
+
v[P] = {
|
|
442
|
+
width: `calc(50% - ${u / 2}rem)`
|
|
443
|
+
};
|
|
444
|
+
break;
|
|
445
|
+
case 5:
|
|
446
|
+
case 6:
|
|
447
|
+
k[P] = {
|
|
448
|
+
width: `calc(50% - ${u / 2 / 2}rem)`
|
|
449
|
+
}, v[P] = {
|
|
450
|
+
width: `calc(50% - ${u / 2 / 2}rem)`
|
|
451
|
+
}, I[P] = {
|
|
452
|
+
width: `calc(33.33% - ${u * 2 / 3}rem)`
|
|
453
|
+
};
|
|
454
|
+
break;
|
|
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, r), sx: x, ...s, children: t });
|
|
457
|
+
}
|
|
458
|
+
function Be() {
|
|
459
|
+
const t = navigator.userAgent.toLowerCase();
|
|
460
|
+
return t.includes("safari") && !t.includes("chrome");
|
|
461
|
+
}
|
|
462
|
+
function Ie(t = "") {
|
|
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}\/?/, n = /^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;
|
|
465
|
+
return e.test(t) || n.test(t);
|
|
466
|
+
}
|
|
467
|
+
function Q(t) {
|
|
468
|
+
return (t == null ? void 0 : t.endsWith(".mp4")) || (t == null ? void 0 : t.endsWith(".m4v")) || (t == null ? void 0 : t.endsWith(".webm"));
|
|
469
|
+
}
|
|
470
|
+
function We(t) {
|
|
471
|
+
return t != null && t.endsWith(".mp4") || t != null && t.endsWith(".m4v") ? "video/mp4" : t != null && t.endsWith(".webm") ? "video/webm" : void 0;
|
|
472
|
+
}
|
|
473
|
+
function je(t) {
|
|
474
|
+
let e = {};
|
|
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
|
+
}
|
|
477
|
+
function Re() {
|
|
478
|
+
const [t, e] = M(Date.now());
|
|
479
|
+
return T(() => {
|
|
480
|
+
const n = () => {
|
|
481
|
+
e(Date.now());
|
|
482
|
+
};
|
|
483
|
+
return document.addEventListener("visibilitychange", n), () => {
|
|
484
|
+
document.removeEventListener("visibilitychange", n);
|
|
485
|
+
};
|
|
486
|
+
}, []), t;
|
|
487
|
+
}
|
|
488
|
+
function mt(t, e, n, r, o) {
|
|
489
|
+
let a = null;
|
|
490
|
+
const { color: d = "", image: s } = je(e);
|
|
491
|
+
return s && Ie(s) ? (delete n.backgroundColor, !(t.mobile.apple.device || Be()) && Q(s) ? a = /* @__PURE__ */ i(
|
|
492
|
+
b,
|
|
493
|
+
{
|
|
494
|
+
component: "video",
|
|
495
|
+
className: "section-bg",
|
|
496
|
+
width: "100%",
|
|
497
|
+
autoPlay: !0,
|
|
498
|
+
loop: !0,
|
|
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,
|
|
510
|
+
width: "100%",
|
|
511
|
+
height: "100%",
|
|
512
|
+
objectFit: "cover"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
s
|
|
516
|
+
) : a = /* @__PURE__ */ i(
|
|
517
|
+
kt,
|
|
518
|
+
{
|
|
519
|
+
src: s,
|
|
520
|
+
sizesAttr: {
|
|
521
|
+
sm: 600,
|
|
522
|
+
md: 900,
|
|
523
|
+
lg: 1200
|
|
524
|
+
},
|
|
525
|
+
className: "section-bg",
|
|
526
|
+
alt: "",
|
|
527
|
+
width: "100%",
|
|
528
|
+
loading: "lazy",
|
|
529
|
+
sx: {
|
|
530
|
+
position: "absolute",
|
|
531
|
+
zIndex: -9999,
|
|
532
|
+
right: 0,
|
|
533
|
+
left: 0,
|
|
534
|
+
top: 0,
|
|
535
|
+
width: "100%",
|
|
536
|
+
height: "100%",
|
|
537
|
+
objectFit: "cover"
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
o || s
|
|
541
|
+
)) : s ? n.backgroundImage = `${s} !important` : d && (n.backgroundColor = `${d} !important`), a;
|
|
542
|
+
}
|
|
543
|
+
function ze({ autoWidth: t, children: e, ...n }) {
|
|
544
|
+
return t ? /* @__PURE__ */ i(b, { display: "flex", ...n, children: e }) : /* @__PURE__ */ i(Et, { ...n, children: e });
|
|
545
|
+
}
|
|
546
|
+
function A({
|
|
547
|
+
dark: t = !1,
|
|
548
|
+
children: e,
|
|
549
|
+
className: n,
|
|
550
|
+
sx: r = {},
|
|
551
|
+
boxed: o = { show: !1 },
|
|
552
|
+
padding: a = "normal",
|
|
553
|
+
boxProps: d,
|
|
554
|
+
type: s,
|
|
555
|
+
...l
|
|
556
|
+
}) {
|
|
557
|
+
const c = { ...r }, m = _t((u) => u.breakpoints.down("md"));
|
|
558
|
+
t && (c.color = dt.common.white, c.backgroundColor = `${dt.grey[900]} !important`), o.show && (c.display = "flex");
|
|
559
|
+
const p = W(() => !Number(l.boxMaxWidth) || m ? {
|
|
560
|
+
width: "100%"
|
|
561
|
+
} : s === "wall" && l.boxMaxWidth ? {
|
|
562
|
+
maxWidth: `${l.boxMaxWidth}px !important`,
|
|
563
|
+
width: "100%"
|
|
564
|
+
} : {
|
|
565
|
+
width: "100%"
|
|
566
|
+
}, [l.boxMaxWidth, m, s]), h = St({
|
|
567
|
+
type: "baseSectionPaddingY",
|
|
568
|
+
value: a || "normal",
|
|
569
|
+
// section default is normal
|
|
570
|
+
defaultValue: ""
|
|
571
|
+
});
|
|
572
|
+
return /* @__PURE__ */ i(
|
|
573
|
+
Le,
|
|
574
|
+
{
|
|
575
|
+
component: "section",
|
|
576
|
+
styles: { ...c, ...h },
|
|
577
|
+
className: g("base-section", "px-2 md:px-5 lg:px-5 xl:px-10", n, {
|
|
578
|
+
dark: t
|
|
579
|
+
}),
|
|
580
|
+
...S(
|
|
581
|
+
l,
|
|
582
|
+
"hoverStyle",
|
|
583
|
+
"boxMaxWidth",
|
|
584
|
+
"embedUrl",
|
|
585
|
+
"autoWidth",
|
|
586
|
+
"paddingXY",
|
|
587
|
+
"iframeHeight",
|
|
588
|
+
"titleAppearance",
|
|
589
|
+
"descriptionAppearance"
|
|
590
|
+
),
|
|
591
|
+
children: /* @__PURE__ */ i(ze, { autoWidth: l == null ? void 0 : l.autoWidth, className: g("section-content h-full"), sx: p, children: o.show ? /* @__PURE__ */ i(Bt, { ...d, boxed: o, children: e }) : e })
|
|
592
|
+
}
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
function Bt({
|
|
596
|
+
background: t = "",
|
|
597
|
+
backgroundVideoPoster: e,
|
|
598
|
+
children: n,
|
|
599
|
+
sx: r = {},
|
|
600
|
+
boxed: o = { show: !1 },
|
|
601
|
+
className: a = "",
|
|
602
|
+
styles: d = {},
|
|
603
|
+
...s
|
|
604
|
+
}) {
|
|
605
|
+
const l = { ...d, ...r }, c = wt();
|
|
606
|
+
let m = null;
|
|
607
|
+
const p = _t((f) => f.breakpoints.up("sm")), h = Zt(), u = Re();
|
|
608
|
+
return t && (m = mt(
|
|
609
|
+
h,
|
|
610
|
+
typeof t == "string" ? c(t) : t,
|
|
611
|
+
l,
|
|
612
|
+
e,
|
|
613
|
+
u
|
|
614
|
+
)), o.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding = p ? "50px" : "20px"), o != null && o.border && (l.border = "1px solid #c0c0c0"), o != null && o.background && (m = mt(
|
|
615
|
+
h,
|
|
616
|
+
typeof (o == null ? void 0 : o.background) == "string" ? c(o == null ? void 0 : o.background) : o == null ? void 0 : o.background,
|
|
617
|
+
l,
|
|
618
|
+
o == null ? void 0 : o.backgroundVideoPoster,
|
|
619
|
+
u
|
|
620
|
+
))), /* @__PURE__ */ w(
|
|
621
|
+
b,
|
|
622
|
+
{
|
|
623
|
+
...s,
|
|
624
|
+
sx: {
|
|
625
|
+
...l,
|
|
626
|
+
...m ? { position: "relative", overflow: "hidden", zIndex: 0 } : {}
|
|
627
|
+
},
|
|
628
|
+
className: g(a, (o == null ? void 0 : o.boxShadow) && "shadow-xl"),
|
|
629
|
+
children: [
|
|
630
|
+
m,
|
|
631
|
+
n
|
|
632
|
+
]
|
|
633
|
+
}
|
|
634
|
+
);
|
|
635
|
+
}
|
|
636
|
+
const Le = _(Bt)`
|
|
637
|
+
&:nth-of-type(even) {
|
|
638
|
+
background: #f8f8f8;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
@media (max-width: 600px) {
|
|
642
|
+
.section__title {
|
|
643
|
+
font-size: 24px;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.base-info {
|
|
647
|
+
> *:last-child {
|
|
648
|
+
margin-bottom: 0;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
`;
|
|
653
|
+
function It({ icon: t, ...e }) {
|
|
654
|
+
return /* @__PURE__ */ i($t, { icon: t, ...e, ref: null });
|
|
655
|
+
}
|
|
656
|
+
function $(t, e) {
|
|
657
|
+
const n = nt(t, e), r = S(t, e);
|
|
658
|
+
return [n, r];
|
|
659
|
+
}
|
|
660
|
+
const Wt = ["title", "description", "actions", "badge", "tag", "prepend", "append", "logo"];
|
|
661
|
+
function Te({
|
|
662
|
+
image: t,
|
|
663
|
+
imageBorder: e,
|
|
664
|
+
imageShadow: n,
|
|
665
|
+
className: r,
|
|
666
|
+
reverse: o = !1,
|
|
667
|
+
fullSizeImage: a,
|
|
668
|
+
...d
|
|
669
|
+
}) {
|
|
670
|
+
const [s, l] = $(d, O), c = Object.keys(s).length > 0 && Object.values(nt(s, Wt)).filter(Boolean).length > 0 && /* @__PURE__ */ i(E, { ...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
|
+
b,
|
|
672
|
+
{
|
|
673
|
+
className: g(
|
|
674
|
+
"section__image",
|
|
675
|
+
"m-auto, leading-[1] text-center",
|
|
676
|
+
n && "shadow-xl",
|
|
677
|
+
s != null && s.center ? "flex justify-center items-center" : ""
|
|
678
|
+
),
|
|
679
|
+
sx: {
|
|
680
|
+
border: e === !0 ? "1px solid #c0c0c0" : void 0,
|
|
681
|
+
borderRadius: 2,
|
|
682
|
+
overflow: "hidden",
|
|
683
|
+
// FIXME: Screenshot 组件无法设置最外层 div 的样式,只能通过父元素设置
|
|
684
|
+
"> div": p ? { width: "100%", video: { borderRadius: "0 !important" } } : void 0
|
|
685
|
+
},
|
|
686
|
+
children: p ? (
|
|
687
|
+
// @ts-ignore
|
|
688
|
+
/* @__PURE__ */ i(ne, { type: e, sx: { width: "100%" }, children: m })
|
|
689
|
+
) : m
|
|
690
|
+
}
|
|
691
|
+
);
|
|
692
|
+
return /* @__PURE__ */ i(
|
|
693
|
+
A,
|
|
694
|
+
{
|
|
695
|
+
className: g(
|
|
696
|
+
"section--block",
|
|
697
|
+
r,
|
|
698
|
+
a && !o && X`
|
|
699
|
+
.section-bg {
|
|
700
|
+
height: 80%;
|
|
701
|
+
}
|
|
702
|
+
`
|
|
703
|
+
),
|
|
704
|
+
...l,
|
|
705
|
+
boxProps: a ? { sx: { padding: 0, overflow: "hidden" } } : void 0,
|
|
706
|
+
children: /* @__PURE__ */ i(
|
|
707
|
+
rt,
|
|
708
|
+
{
|
|
709
|
+
col: t ? 2 : 1,
|
|
710
|
+
className: a ? X`
|
|
711
|
+
display: flex;
|
|
712
|
+
flex-direction: column;
|
|
713
|
+
|
|
714
|
+
> .base-info,
|
|
715
|
+
> .section__image {
|
|
716
|
+
width: 100%;
|
|
717
|
+
|
|
718
|
+
> img,
|
|
719
|
+
> video {
|
|
720
|
+
width: 100%;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
` : void 0,
|
|
724
|
+
children: o ? /* @__PURE__ */ w(Y, { children: [
|
|
725
|
+
h,
|
|
726
|
+
c
|
|
727
|
+
] }) : /* @__PURE__ */ w(Y, { children: [
|
|
728
|
+
c,
|
|
729
|
+
h
|
|
730
|
+
] })
|
|
731
|
+
}
|
|
732
|
+
)
|
|
733
|
+
}
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
const F = ["editing", "height", "locale", "dev", "sx"];
|
|
737
|
+
function Ee(t) {
|
|
738
|
+
const { className: e, ...n } = t;
|
|
739
|
+
return /* @__PURE__ */ i(Oe, { ...n, className: g("BlockBase-root", e) });
|
|
740
|
+
}
|
|
741
|
+
const Oe = _(b)`
|
|
742
|
+
position: relative;
|
|
743
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
744
|
+
`;
|
|
745
|
+
function Ae({
|
|
746
|
+
widget: t,
|
|
747
|
+
reverse: e,
|
|
748
|
+
projectId: n,
|
|
749
|
+
assistantId: r,
|
|
750
|
+
working: o,
|
|
751
|
+
submitTitle: a,
|
|
752
|
+
submitIcon: d,
|
|
753
|
+
submitColor: s,
|
|
754
|
+
placeholder: l,
|
|
755
|
+
loadingIndicator: c,
|
|
756
|
+
section: m,
|
|
757
|
+
...p
|
|
758
|
+
}) {
|
|
759
|
+
const [{ editing: h }, u] = $(p, F), [f, y] = $(u, O), x = n && r ? { projectId: n, gitRef: "main", assistantId: r, working: !0 } : void 0, k = {
|
|
760
|
+
children: a,
|
|
761
|
+
endIcon: d ? /* @__PURE__ */ i(It, { icon: d }) : void 0,
|
|
762
|
+
sx: {
|
|
763
|
+
background: s || void 0,
|
|
764
|
+
":hover": {
|
|
765
|
+
background: s || void 0,
|
|
766
|
+
opacity: 0.8
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}, 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(E, { ...f }, "base-info")), x && (t === "form" ? v.push(/* @__PURE__ */ i(lt, { identifier: x, SubmitProps: k }, "form")) : t === "result" ? v.push(
|
|
771
|
+
/* @__PURE__ */ i(
|
|
772
|
+
ct,
|
|
773
|
+
{
|
|
774
|
+
identifier: x,
|
|
775
|
+
placeholder: I,
|
|
776
|
+
loadingIndicator: R
|
|
777
|
+
},
|
|
778
|
+
"result"
|
|
779
|
+
)
|
|
780
|
+
) : v.push(
|
|
781
|
+
/* @__PURE__ */ w(Ot, { width: "100%", gap: 2, direction: "row", children: [
|
|
782
|
+
/* @__PURE__ */ i(lt, { identifier: x, BoxProps: { flex: 1 }, SubmitProps: k }),
|
|
783
|
+
/* @__PURE__ */ i(
|
|
784
|
+
ct,
|
|
785
|
+
{
|
|
786
|
+
identifier: x,
|
|
787
|
+
BoxProps: { flex: 1 },
|
|
788
|
+
placeholder: I,
|
|
789
|
+
loadingIndicator: R
|
|
790
|
+
}
|
|
791
|
+
)
|
|
792
|
+
] }, "form-result")
|
|
793
|
+
)), e && v.reverse();
|
|
794
|
+
const at = At(), Lt = W(
|
|
795
|
+
() => Ft(Gt(at, { palette: { primary: s ? { main: s } : void 0 } })),
|
|
796
|
+
[s, at]
|
|
797
|
+
);
|
|
798
|
+
return /* @__PURE__ */ i(Xt, { fallbackRender: Kt, children: /* @__PURE__ */ i(Vt, { theme: Lt, children: /* @__PURE__ */ i(A, { ...y, sx: h ? { pointerEvents: "none" } : {}, children: /* @__PURE__ */ i(rt, { col: v.length, children: v }) }) }) });
|
|
799
|
+
}
|
|
800
|
+
const jt = xt({
|
|
801
|
+
pages: [],
|
|
802
|
+
project: void 0
|
|
803
|
+
}), { Provider: dn, Consumer: mn } = jt;
|
|
804
|
+
function Rt() {
|
|
805
|
+
return bt(jt);
|
|
806
|
+
}
|
|
807
|
+
function Fe({ icon: t, className: e = "", size: n = "1rem", ...r }) {
|
|
808
|
+
return /* @__PURE__ */ i(Ve, { component: It, className: g("css-icon", e), size: n, ...r, icon: t });
|
|
809
|
+
}
|
|
810
|
+
const Ve = _(b)`
|
|
811
|
+
&.css-icon {
|
|
812
|
+
display: inline-block;
|
|
813
|
+
width: ${({ size: t }) => t};
|
|
814
|
+
height: ${({ size: t }) => t};
|
|
815
|
+
}
|
|
816
|
+
`;
|
|
817
|
+
function Ue({ icon: t, className: e = "", size: n = "1rem", imageMeta: r, ...o }) {
|
|
818
|
+
const a = j(N(t), 540), [d, s] = M(!1), l = vt();
|
|
819
|
+
return d ? /* @__PURE__ */ i(Fe, { icon: "i-mdi:image", color: l.palette.grey[500], size: n, className: e, ...o }) : /* @__PURE__ */ i(De, { className: g("image-icon", e), size: n, ...o, children: /* @__PURE__ */ i(
|
|
820
|
+
"img",
|
|
821
|
+
{
|
|
822
|
+
className: "image-icon__image",
|
|
823
|
+
src: a,
|
|
824
|
+
onError: () => s(!0),
|
|
825
|
+
width: r == null ? void 0 : r.naturalWidth,
|
|
826
|
+
height: r == null ? void 0 : r.naturalHeight,
|
|
827
|
+
alt: (r == null ? void 0 : r.filename) || "card-icon",
|
|
828
|
+
loading: "lazy"
|
|
829
|
+
}
|
|
830
|
+
) });
|
|
831
|
+
}
|
|
832
|
+
const De = _(b)`
|
|
833
|
+
display: inline-block;
|
|
834
|
+
width: ${({ size: t }) => t};
|
|
835
|
+
height: ${({ size: t }) => t};
|
|
836
|
+
.image-icon__image {
|
|
837
|
+
object-fit: contain;
|
|
838
|
+
height: 100%;
|
|
839
|
+
width: 100%;
|
|
840
|
+
}
|
|
841
|
+
`, it = (t) => typeof t == "string" && /^[\w-_]+:[\w-_]+$/.test(t);
|
|
842
|
+
function Z({ icon: t, size: e = "1rem", imageMeta: n, ...r }) {
|
|
843
|
+
const o = window.isNaN(e) ? e : `${e}px`;
|
|
844
|
+
return it(t) ? /* @__PURE__ */ i($t, { icon: t }) : /* @__PURE__ */ i(He, { component: Ue, imageMeta: n, className: "base-icon", icon: t, size: o, ...r });
|
|
845
|
+
}
|
|
846
|
+
const He = _(b)`
|
|
847
|
+
flex-shrink: 0;
|
|
848
|
+
`;
|
|
849
|
+
function L({ text: t, children: e, icon: n = "", endIcon: r, color: o = "primary", link: a = "", href: d = "", ...s }) {
|
|
850
|
+
const l = n ? /* @__PURE__ */ i(Z, { icon: n }) : null, c = r ? /* @__PURE__ */ i(Z, { icon: r }) : null, m = a || d, p = { ...s };
|
|
851
|
+
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
|
+
}
|
|
853
|
+
function zt({ editing: t, text: e, ...n }) {
|
|
854
|
+
const { pages: r = [] } = Rt(), o = r.find((a) => a.id === (n.link || n.linkId));
|
|
855
|
+
if (t)
|
|
856
|
+
return /* @__PURE__ */ i(L, { ...S(n, ["link", "linkId"]), children: e });
|
|
857
|
+
if (o) {
|
|
858
|
+
const a = o.path || "/";
|
|
859
|
+
return /* @__PURE__ */ i(re, { to: a, children: /* @__PURE__ */ i(L, { ...S(n, ["link", "linkId"]), children: e }) });
|
|
860
|
+
}
|
|
861
|
+
return /* @__PURE__ */ i(L, { ...S(n, "linkId"), children: e });
|
|
862
|
+
}
|
|
863
|
+
function B({ type: t = "", icon: e = "", size: n = "3rem", className: r = "", ...o }) {
|
|
864
|
+
return /* @__PURE__ */ i(Z, { icon: e || t, size: n, className: g("content-icon", r), ...o });
|
|
865
|
+
}
|
|
866
|
+
B.propTypes = {};
|
|
867
|
+
B.defaultProps = {
|
|
868
|
+
type: "",
|
|
869
|
+
icon: "",
|
|
870
|
+
size: "3rem",
|
|
871
|
+
color: "inherit",
|
|
872
|
+
className: ""
|
|
873
|
+
};
|
|
874
|
+
function Ye({
|
|
875
|
+
to: t,
|
|
876
|
+
base: e,
|
|
877
|
+
children: n,
|
|
878
|
+
className: r,
|
|
879
|
+
activeClassName: o = "active",
|
|
880
|
+
target: a = "auto",
|
|
881
|
+
autoExternalMark: d = !1,
|
|
882
|
+
useRouterLink: s,
|
|
883
|
+
...l
|
|
884
|
+
}) {
|
|
885
|
+
const { pages: c = [], locale: m = "" } = {}, p = e ? D("/", e) : e || "";
|
|
886
|
+
let h = a === "auto" ? "_self" : a, u = D(p, t);
|
|
887
|
+
const f = d ? q(u) : !1;
|
|
888
|
+
if (e)
|
|
889
|
+
return u = D(p, m, t), /* @__PURE__ */ i(
|
|
890
|
+
"a",
|
|
891
|
+
{
|
|
892
|
+
className: `no-underline ${r}`,
|
|
893
|
+
href: G(u),
|
|
894
|
+
rel: "noreferrer noopener",
|
|
895
|
+
target: h,
|
|
896
|
+
...l,
|
|
897
|
+
children: n
|
|
898
|
+
}
|
|
899
|
+
);
|
|
900
|
+
if (q(t))
|
|
901
|
+
a === "auto" && (h = "_blank"), u = t;
|
|
902
|
+
else {
|
|
903
|
+
le(u) && (u = D(window.location.pathname, u));
|
|
904
|
+
const y = ce(`${window.location.origin}${u}`), x = c.some((k) => k.pathname === y.pathname);
|
|
905
|
+
if (s || x)
|
|
906
|
+
return /* @__PURE__ */ i(
|
|
907
|
+
ie,
|
|
908
|
+
{
|
|
909
|
+
end: !0,
|
|
910
|
+
to: G(u),
|
|
911
|
+
className: ({ isActive: k }) => g(r, k ? o : ""),
|
|
912
|
+
...l,
|
|
913
|
+
children: n
|
|
914
|
+
}
|
|
915
|
+
);
|
|
916
|
+
}
|
|
917
|
+
return /* @__PURE__ */ w(
|
|
918
|
+
"a",
|
|
919
|
+
{
|
|
920
|
+
className: `no-underline ${r}`,
|
|
921
|
+
href: G(u),
|
|
922
|
+
rel: "noreferrer noopener",
|
|
923
|
+
target: h,
|
|
924
|
+
...l,
|
|
925
|
+
children: [
|
|
926
|
+
n,
|
|
927
|
+
f && /* @__PURE__ */ i(B, { icon: "i-mdi:arrow-top-right", size: "0.9em", className: "smart-link__mark", style: { marginLeft: 5 } })
|
|
928
|
+
]
|
|
929
|
+
}
|
|
930
|
+
);
|
|
931
|
+
}
|
|
932
|
+
function V({
|
|
933
|
+
prepend: t,
|
|
934
|
+
append: e,
|
|
935
|
+
children: n,
|
|
936
|
+
className: r = "",
|
|
937
|
+
dark: o = !1,
|
|
938
|
+
border: a = !0,
|
|
939
|
+
...d
|
|
940
|
+
}) {
|
|
941
|
+
let s = {};
|
|
942
|
+
const { pages: l = [] } = Rt(), c = l.find((h) => h.id === d.link), m = !n || Jt.Children.toArray(n).every((h) => h === null);
|
|
943
|
+
return d.link && (s = {
|
|
944
|
+
component: Ye,
|
|
945
|
+
to: (c == null ? void 0 : c.path) || d.link,
|
|
946
|
+
useRouterLink: !0
|
|
947
|
+
}), /* @__PURE__ */ w(
|
|
948
|
+
Je,
|
|
949
|
+
{
|
|
950
|
+
className: g(
|
|
951
|
+
"base-card card",
|
|
952
|
+
{ "border-gray-200": a },
|
|
953
|
+
{ "dark:border-gray-500": o && a },
|
|
954
|
+
{ dark: o, "border-transparent": !a },
|
|
955
|
+
r
|
|
956
|
+
),
|
|
957
|
+
...s,
|
|
958
|
+
...S(d, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
|
|
959
|
+
children: [
|
|
960
|
+
t,
|
|
961
|
+
!m && /* @__PURE__ */ i("div", { className: "card__body", children: n }),
|
|
962
|
+
e
|
|
963
|
+
]
|
|
964
|
+
}
|
|
965
|
+
);
|
|
966
|
+
}
|
|
967
|
+
const Je = _(b)`
|
|
968
|
+
&.base-card {
|
|
969
|
+
text-align: left;
|
|
970
|
+
border-width: 1px;
|
|
971
|
+
border-style: solid;
|
|
972
|
+
border-radius: 12px;
|
|
973
|
+
overflow: hidden;
|
|
974
|
+
&,
|
|
975
|
+
&:hover {
|
|
976
|
+
text-decoration: none;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
.card__body {
|
|
980
|
+
padding: 15px 15px;
|
|
981
|
+
}
|
|
982
|
+
`;
|
|
983
|
+
function U({
|
|
984
|
+
align: t = "left",
|
|
985
|
+
title: e,
|
|
986
|
+
titleProps: n = {},
|
|
987
|
+
description: r,
|
|
988
|
+
descriptionProps: o = {}
|
|
989
|
+
}) {
|
|
990
|
+
return /* @__PURE__ */ w(Y, { children: [
|
|
991
|
+
e && /* @__PURE__ */ i(
|
|
992
|
+
C,
|
|
993
|
+
{
|
|
994
|
+
className: g("card__title text-gray-800", "dark:text-gray-50"),
|
|
995
|
+
component: "h5",
|
|
996
|
+
variant: "h5",
|
|
997
|
+
gutterBottom: !0,
|
|
998
|
+
align: t,
|
|
999
|
+
...n,
|
|
1000
|
+
children: e
|
|
1001
|
+
}
|
|
1002
|
+
),
|
|
1003
|
+
r && /* @__PURE__ */ i(
|
|
1004
|
+
C,
|
|
1005
|
+
{
|
|
1006
|
+
className: g("card__description", "text-gray-500", "dark:text-gray-400"),
|
|
1007
|
+
component: "div",
|
|
1008
|
+
variant: "body1",
|
|
1009
|
+
gutterBottom: !0,
|
|
1010
|
+
align: t,
|
|
1011
|
+
...o,
|
|
1012
|
+
children: r
|
|
1013
|
+
}
|
|
1014
|
+
)
|
|
1015
|
+
] });
|
|
1016
|
+
}
|
|
1017
|
+
function Me({
|
|
1018
|
+
image: t,
|
|
1019
|
+
title: e,
|
|
1020
|
+
description: n,
|
|
1021
|
+
imageProps: r = {},
|
|
1022
|
+
imageMeta: o,
|
|
1023
|
+
imageSize: a,
|
|
1024
|
+
titleProps: d = {},
|
|
1025
|
+
descriptionProps: s = {},
|
|
1026
|
+
actions: l,
|
|
1027
|
+
align: c,
|
|
1028
|
+
...m
|
|
1029
|
+
}) {
|
|
1030
|
+
const p = it(t), h = j(N(t), 540);
|
|
1031
|
+
return /* @__PURE__ */ w(
|
|
1032
|
+
Ke,
|
|
1033
|
+
{
|
|
1034
|
+
className: "card-article",
|
|
1035
|
+
...m,
|
|
1036
|
+
prepend: /* @__PURE__ */ i("div", { className: "card__image__wrap", children: p && t ? /* @__PURE__ */ i(
|
|
1037
|
+
b,
|
|
1038
|
+
{
|
|
1039
|
+
sx: {
|
|
1040
|
+
position: "absolute",
|
|
1041
|
+
left: 0,
|
|
1042
|
+
top: 0,
|
|
1043
|
+
right: 0,
|
|
1044
|
+
bottom: 0,
|
|
1045
|
+
display: "flex",
|
|
1046
|
+
alignItems: "center",
|
|
1047
|
+
justifyContent: "center"
|
|
1048
|
+
},
|
|
1049
|
+
children: /* @__PURE__ */ i(B, { icon: t, color: "primary.main" })
|
|
1050
|
+
}
|
|
1051
|
+
) : h && /* @__PURE__ */ i(
|
|
1052
|
+
"img",
|
|
1053
|
+
{
|
|
1054
|
+
className: "card__image",
|
|
1055
|
+
src: h,
|
|
1056
|
+
...r,
|
|
1057
|
+
alt: r.alt || (o == null ? void 0 : o.filename) || "card-image",
|
|
1058
|
+
width: o == null ? void 0 : o.naturalWidth,
|
|
1059
|
+
height: o == null ? void 0 : o.naturalHeight,
|
|
1060
|
+
style: { width: "100%", height: "100%", objectFit: a || "cover", objectPosition: "center" },
|
|
1061
|
+
loading: "lazy"
|
|
1062
|
+
}
|
|
1063
|
+
) }),
|
|
1064
|
+
children: [
|
|
1065
|
+
e || n ? /* @__PURE__ */ i(
|
|
1066
|
+
U,
|
|
1067
|
+
{
|
|
1068
|
+
align: c,
|
|
1069
|
+
title: e,
|
|
1070
|
+
titleProps: d,
|
|
1071
|
+
description: n,
|
|
1072
|
+
descriptionProps: s
|
|
1073
|
+
}
|
|
1074
|
+
) : null,
|
|
1075
|
+
l != null && l.length ? /* @__PURE__ */ i(z, { align: c, actions: l, className: "mt-4" }) : null
|
|
1076
|
+
]
|
|
1077
|
+
}
|
|
1078
|
+
);
|
|
1079
|
+
}
|
|
1080
|
+
const Ke = _(V)`
|
|
1081
|
+
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
1082
|
+
&:hover {
|
|
1083
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
1084
|
+
}` : ""}
|
|
1085
|
+
|
|
1086
|
+
.card__image__wrap {
|
|
1087
|
+
padding-top: 61.8%;
|
|
1088
|
+
width: 100%;
|
|
1089
|
+
position: relative;
|
|
1090
|
+
}
|
|
1091
|
+
.card__image {
|
|
1092
|
+
position: absolute;
|
|
1093
|
+
top: 0;
|
|
1094
|
+
left: 0;
|
|
1095
|
+
bottom: 0;
|
|
1096
|
+
right: 0;
|
|
1097
|
+
width: 100%;
|
|
1098
|
+
height: 100%;
|
|
1099
|
+
object-position: top center;
|
|
1100
|
+
}
|
|
1101
|
+
`, pt = "section";
|
|
1102
|
+
function ut({
|
|
1103
|
+
title: t,
|
|
1104
|
+
image: e,
|
|
1105
|
+
imageMeta: n,
|
|
1106
|
+
description: r,
|
|
1107
|
+
actions: o,
|
|
1108
|
+
align: a,
|
|
1109
|
+
listType: d = "",
|
|
1110
|
+
className: s = "",
|
|
1111
|
+
...l
|
|
1112
|
+
}) {
|
|
1113
|
+
return /* @__PURE__ */ w(Ge, { className: g("card", `list-type-${d}`, s), align: a, ...l, children: [
|
|
1114
|
+
e && /* @__PURE__ */ i(
|
|
1115
|
+
B,
|
|
1116
|
+
{
|
|
1117
|
+
icon: e,
|
|
1118
|
+
color: "primary.main",
|
|
1119
|
+
size: d === "icon-title" ? "1.2rem" : "3rem",
|
|
1120
|
+
imageMeta: n
|
|
1121
|
+
}
|
|
1122
|
+
),
|
|
1123
|
+
t || r ? /* @__PURE__ */ i(U, { align: a, title: t, description: r }) : null,
|
|
1124
|
+
o != null && o.length ? /* @__PURE__ */ i(z, { align: a, actions: o, className: "mt-4" }) : null
|
|
1125
|
+
] });
|
|
1126
|
+
}
|
|
1127
|
+
const Ge = _(V)`
|
|
1128
|
+
padding: 5vw 4vw;
|
|
1129
|
+
box-sizing: border-box;
|
|
1130
|
+
/* min-height: 320px; */
|
|
1131
|
+
color: inherit !important;
|
|
1132
|
+
border-radius: 0.5rem;
|
|
1133
|
+
/* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
|
|
1134
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values[pt]}px) {
|
|
1135
|
+
padding: 1.5rem 2rem;
|
|
1136
|
+
}
|
|
1137
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
|
|
1138
|
+
height: auto;
|
|
1139
|
+
min-height: unset;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
1143
|
+
&:hover {
|
|
1144
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
1145
|
+
}` : ""}
|
|
1146
|
+
|
|
1147
|
+
.card__title {
|
|
1148
|
+
font-weight: 700;
|
|
1149
|
+
margin-top: 24px;
|
|
1150
|
+
margin-bottom: 12px;
|
|
1151
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1152
|
+
a {
|
|
1153
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
.card__description {
|
|
1157
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1158
|
+
a {
|
|
1159
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
.card__body {
|
|
1163
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1164
|
+
padding: 0;
|
|
1165
|
+
${({ align: t }) => `text-align:${t || "left"};`}
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
&.list-type-icon-title {
|
|
1169
|
+
padding: 1.2rem;
|
|
1170
|
+
.title-line {
|
|
1171
|
+
display: flex;
|
|
1172
|
+
}
|
|
1173
|
+
.card__title {
|
|
1174
|
+
margin: 0;
|
|
1175
|
+
font-size: 1em;
|
|
1176
|
+
}
|
|
1177
|
+
.css-icon {
|
|
1178
|
+
margin-right: 0.5rem;
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[pt]}px) {
|
|
1183
|
+
padding: 2rem 2rem;
|
|
1184
|
+
text-align: left;
|
|
1185
|
+
box-sizing: border-box;
|
|
1186
|
+
}
|
|
1187
|
+
`;
|
|
1188
|
+
function Xe({
|
|
1189
|
+
image: t,
|
|
1190
|
+
title: e,
|
|
1191
|
+
description: n,
|
|
1192
|
+
imageProps: r = {},
|
|
1193
|
+
imageMeta: o,
|
|
1194
|
+
imageSize: a,
|
|
1195
|
+
titleProps: d = {},
|
|
1196
|
+
descriptionProps: s = {},
|
|
1197
|
+
actions: l,
|
|
1198
|
+
align: c,
|
|
1199
|
+
...m
|
|
1200
|
+
}) {
|
|
1201
|
+
const p = it(t), h = j(N(t), 540);
|
|
1202
|
+
return /* @__PURE__ */ w(
|
|
1203
|
+
qe,
|
|
1204
|
+
{
|
|
1205
|
+
className: "card-article",
|
|
1206
|
+
...m,
|
|
1207
|
+
prepend: /* @__PURE__ */ i("div", { className: "card__image__wrap", children: p && t ? /* @__PURE__ */ i(
|
|
1208
|
+
b,
|
|
1209
|
+
{
|
|
1210
|
+
sx: {
|
|
1211
|
+
position: "absolute",
|
|
1212
|
+
left: 0,
|
|
1213
|
+
top: 0,
|
|
1214
|
+
right: 0,
|
|
1215
|
+
bottom: 0,
|
|
1216
|
+
display: "flex",
|
|
1217
|
+
alignItems: "center",
|
|
1218
|
+
justifyContent: "center"
|
|
1219
|
+
},
|
|
1220
|
+
children: /* @__PURE__ */ i(B, { icon: t, color: "primary.main" })
|
|
1221
|
+
}
|
|
1222
|
+
) : h && /* @__PURE__ */ i(
|
|
1223
|
+
b,
|
|
1224
|
+
{
|
|
1225
|
+
component: "img",
|
|
1226
|
+
className: "card__image",
|
|
1227
|
+
src: h,
|
|
1228
|
+
...r,
|
|
1229
|
+
alt: r.alt || (o == null ? void 0 : o.filename) || "card-image",
|
|
1230
|
+
width: o == null ? void 0 : o.naturalWidth,
|
|
1231
|
+
height: o == null ? void 0 : o.naturalHeight,
|
|
1232
|
+
style: { width: "100%", height: "100%", objectFit: a || "contain", objectPosition: "center" },
|
|
1233
|
+
loading: "lazy"
|
|
1234
|
+
}
|
|
1235
|
+
) }),
|
|
1236
|
+
children: [
|
|
1237
|
+
e || n ? /* @__PURE__ */ i(
|
|
1238
|
+
U,
|
|
1239
|
+
{
|
|
1240
|
+
align: c,
|
|
1241
|
+
title: e,
|
|
1242
|
+
titleProps: d,
|
|
1243
|
+
description: n,
|
|
1244
|
+
descriptionProps: s
|
|
1245
|
+
}
|
|
1246
|
+
) : null,
|
|
1247
|
+
l != null && l.length ? /* @__PURE__ */ i(z, { align: c, actions: l, className: "mt-4" }) : null
|
|
1248
|
+
]
|
|
1249
|
+
}
|
|
1250
|
+
);
|
|
1251
|
+
}
|
|
1252
|
+
const qe = _(V)`
|
|
1253
|
+
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
1254
|
+
&:hover {
|
|
1255
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
1256
|
+
}` : ""}
|
|
1257
|
+
|
|
1258
|
+
border-radius: 0 !important;
|
|
1259
|
+
|
|
1260
|
+
.card__body {
|
|
1261
|
+
${({ align: t }) => `text-align:${t || "left"};`}
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
.card__image__wrap {
|
|
1265
|
+
width: 100%;
|
|
1266
|
+
height: 100%;
|
|
1267
|
+
position: relative;
|
|
1268
|
+
display: flex;
|
|
1269
|
+
justify-content: center;
|
|
1270
|
+
align-items: center;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
.card__image {
|
|
1274
|
+
max-height: 60px;
|
|
1275
|
+
}
|
|
1276
|
+
`, ht = "section";
|
|
1277
|
+
function Qe({
|
|
1278
|
+
title: t,
|
|
1279
|
+
image: e,
|
|
1280
|
+
imageMeta: n,
|
|
1281
|
+
iconSize: r = 100,
|
|
1282
|
+
description: o,
|
|
1283
|
+
actions: a,
|
|
1284
|
+
align: d,
|
|
1285
|
+
className: s = "",
|
|
1286
|
+
...l
|
|
1287
|
+
}) {
|
|
1288
|
+
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: r, imageMeta: n }),
|
|
1290
|
+
/* @__PURE__ */ w(b, { className: "flex-1 ml-4", children: [
|
|
1291
|
+
/* @__PURE__ */ i(U, { align: d, title: t, description: o }),
|
|
1292
|
+
/* @__PURE__ */ i(z, { align: d, actions: a, className: "mt-4" })
|
|
1293
|
+
] })
|
|
1294
|
+
] }) });
|
|
1295
|
+
}
|
|
1296
|
+
const Ze = _(V)`
|
|
1297
|
+
padding: 5vw 4vw;
|
|
1298
|
+
text-align: left;
|
|
1299
|
+
box-sizing: border-box;
|
|
1300
|
+
/* min-height: 320px; */
|
|
1301
|
+
color: inherit !important;
|
|
1302
|
+
border-radius: 0.5rem;
|
|
1303
|
+
/* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
|
|
1304
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values[ht]}px) {
|
|
1305
|
+
padding: 1.5rem 2rem;
|
|
1306
|
+
}
|
|
1307
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
|
|
1308
|
+
height: auto;
|
|
1309
|
+
min-height: unset;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
1313
|
+
&:hover {
|
|
1314
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
1315
|
+
}` : ""}
|
|
1316
|
+
|
|
1317
|
+
.card__title {
|
|
1318
|
+
font-weight: 700;
|
|
1319
|
+
margin-bottom: 12px;
|
|
1320
|
+
a {
|
|
1321
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
.card__description {
|
|
1325
|
+
a {
|
|
1326
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
.card__body {
|
|
1330
|
+
padding: 0;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
&.list-type-icon-title {
|
|
1334
|
+
padding: 1.2rem;
|
|
1335
|
+
.title-line {
|
|
1336
|
+
display: flex;
|
|
1337
|
+
}
|
|
1338
|
+
.card__title {
|
|
1339
|
+
margin: 0;
|
|
1340
|
+
font-size: 1em;
|
|
1341
|
+
}
|
|
1342
|
+
.css-icon {
|
|
1343
|
+
margin-right: 0.5rem;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[ht]}px) {
|
|
1348
|
+
padding: 2rem 2rem;
|
|
1349
|
+
text-align: left;
|
|
1350
|
+
box-sizing: border-box;
|
|
1351
|
+
}
|
|
1352
|
+
`;
|
|
1353
|
+
function to({
|
|
1354
|
+
title: t,
|
|
1355
|
+
titleProps: e = {},
|
|
1356
|
+
description: n,
|
|
1357
|
+
descriptionProps: r = {},
|
|
1358
|
+
image: o,
|
|
1359
|
+
imageMeta: a,
|
|
1360
|
+
className: d = "",
|
|
1361
|
+
align: s,
|
|
1362
|
+
hoverStyle: l,
|
|
1363
|
+
...c
|
|
1364
|
+
}) {
|
|
1365
|
+
return /* @__PURE__ */ w(eo, { className: g("card-simple", d, `hover-style__${l}`), align: s, ...c, children: [
|
|
1366
|
+
o && /* @__PURE__ */ i(B, { icon: o, color: "primary.main", imageMeta: a }),
|
|
1367
|
+
t || n ? /* @__PURE__ */ i(
|
|
1368
|
+
U,
|
|
1369
|
+
{
|
|
1370
|
+
align: s,
|
|
1371
|
+
title: t,
|
|
1372
|
+
titleProps: e,
|
|
1373
|
+
description: n,
|
|
1374
|
+
descriptionProps: r
|
|
1375
|
+
}
|
|
1376
|
+
) : null
|
|
1377
|
+
] });
|
|
1378
|
+
}
|
|
1379
|
+
const eo = _(V)`
|
|
1380
|
+
${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`}
|
|
1381
|
+
|
|
1382
|
+
&.hover-style__default {
|
|
1383
|
+
&.card-simple {
|
|
1384
|
+
&:hover {
|
|
1385
|
+
border-top-right-radius: 36px;
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
.card__body {
|
|
1389
|
+
&:hover {
|
|
1390
|
+
&::before {
|
|
1391
|
+
width: 42px;
|
|
1392
|
+
height: 42px;
|
|
1393
|
+
transform: translate(50%, -50%) rotate(45deg);
|
|
1394
|
+
}
|
|
1395
|
+
&::after {
|
|
1396
|
+
transform: none;
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
&.card-simple {
|
|
1403
|
+
border-radius: 8px;
|
|
1404
|
+
border-top-right-radius: 26px;
|
|
1405
|
+
|
|
1406
|
+
.card__body {
|
|
1407
|
+
${({ align: t }) => `text-align:${t || "left"};`}
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
${(t) => t.link ? `
|
|
1411
|
+
cursor: pointer;
|
|
1412
|
+
` : ""}
|
|
1413
|
+
/* cursor: pointer; */
|
|
1414
|
+
/* &:hover {
|
|
1415
|
+
border-top-right-radius: 36px;
|
|
1416
|
+
} */
|
|
1417
|
+
transition: all 180ms ease 0s;
|
|
1418
|
+
overflow: visible;
|
|
1419
|
+
.card__title {
|
|
1420
|
+
margin: 12px 0;
|
|
1421
|
+
}
|
|
1422
|
+
.card__body {
|
|
1423
|
+
position: relative;
|
|
1424
|
+
padding: 20px 16px 18px;
|
|
1425
|
+
overflow: hidden;
|
|
1426
|
+
transition: all 180ms ease 0s;
|
|
1427
|
+
/* &:hover {
|
|
1428
|
+
&::before {
|
|
1429
|
+
width: 42px;
|
|
1430
|
+
height: 42px;
|
|
1431
|
+
transform: translate(50%, -50%) rotate(45deg);
|
|
1432
|
+
}
|
|
1433
|
+
&::after {
|
|
1434
|
+
transform: none;
|
|
1435
|
+
}
|
|
1436
|
+
} */
|
|
1437
|
+
&::before,
|
|
1438
|
+
&::after {
|
|
1439
|
+
content: ${({ border: t }) => t ? '""' : ""};
|
|
1440
|
+
transition: inherit;
|
|
1441
|
+
position: absolute;
|
|
1442
|
+
top: 0px;
|
|
1443
|
+
right: 0px;
|
|
1444
|
+
}
|
|
1445
|
+
&::before {
|
|
1446
|
+
z-index: 3;
|
|
1447
|
+
background: #fff;
|
|
1448
|
+
width: 30px;
|
|
1449
|
+
height: 30px;
|
|
1450
|
+
transform: translate(50%, -50%) rotate(45deg);
|
|
1451
|
+
box-shadow: 0 1px 0 0 #e9eaec;
|
|
1452
|
+
}
|
|
1453
|
+
&::after {
|
|
1454
|
+
z-index: 2;
|
|
1455
|
+
width: 28px;
|
|
1456
|
+
height: 28px;
|
|
1457
|
+
border-bottom-left-radius: 6px;
|
|
1458
|
+
background: #fcfcfd;
|
|
1459
|
+
box-shadow: -1px 1px 0 0 #e9eaec;
|
|
1460
|
+
transform: translate(8px, -8px);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
`;
|
|
1465
|
+
function oo({ type: t = "default", ...e }) {
|
|
1466
|
+
const r = {
|
|
1467
|
+
article: Me,
|
|
1468
|
+
simple: to,
|
|
1469
|
+
news: Qe,
|
|
1470
|
+
default: ut,
|
|
1471
|
+
wall: Xe
|
|
1472
|
+
}[t] || ut;
|
|
1473
|
+
return /* @__PURE__ */ i(r, { ...t === "news" ? e : S(e, "iconSize") });
|
|
1474
|
+
}
|
|
1475
|
+
function no({
|
|
1476
|
+
list: t = [],
|
|
1477
|
+
align: e = "top",
|
|
1478
|
+
cards: n,
|
|
1479
|
+
listBorder: r = !0,
|
|
1480
|
+
listType: o = "",
|
|
1481
|
+
col: a = 3,
|
|
1482
|
+
gap: d,
|
|
1483
|
+
iconColor: s,
|
|
1484
|
+
className: l = "",
|
|
1485
|
+
type: c = "default",
|
|
1486
|
+
dark: m = !1,
|
|
1487
|
+
textAlign: p = "left",
|
|
1488
|
+
hoverStyle: h,
|
|
1489
|
+
...u
|
|
1490
|
+
}) {
|
|
1491
|
+
return /* @__PURE__ */ i(
|
|
1492
|
+
rt,
|
|
1493
|
+
{
|
|
1494
|
+
type: c,
|
|
1495
|
+
className: g("card-list py-1", l, "items-stretch"),
|
|
1496
|
+
col: a,
|
|
1497
|
+
gap: d,
|
|
1498
|
+
align: e,
|
|
1499
|
+
...u,
|
|
1500
|
+
children: n || t.map((f) => /* @__PURE__ */ i(
|
|
1501
|
+
oo,
|
|
1502
|
+
{
|
|
1503
|
+
borderColor: r,
|
|
1504
|
+
iconColor: s,
|
|
1505
|
+
type: c,
|
|
1506
|
+
listType: o,
|
|
1507
|
+
dark: m,
|
|
1508
|
+
...f,
|
|
1509
|
+
align: p,
|
|
1510
|
+
sx: {
|
|
1511
|
+
bgcolor: c === "wall" ? void 0 : m ? "grey.900" : "common.white"
|
|
1512
|
+
},
|
|
1513
|
+
style: d === 0 && t.length > 1 ? {
|
|
1514
|
+
borderRadius: 0,
|
|
1515
|
+
marginRight: "-1px",
|
|
1516
|
+
marginBottom: "-1px"
|
|
1517
|
+
} : {}
|
|
1518
|
+
},
|
|
1519
|
+
f.id
|
|
1520
|
+
))
|
|
1521
|
+
}
|
|
1522
|
+
);
|
|
1523
|
+
}
|
|
1524
|
+
const ro = [
|
|
1525
|
+
"align",
|
|
1526
|
+
"cards",
|
|
1527
|
+
"list",
|
|
1528
|
+
"listBorder",
|
|
1529
|
+
"listType",
|
|
1530
|
+
"col",
|
|
1531
|
+
"gap",
|
|
1532
|
+
"iconColor",
|
|
1533
|
+
"type",
|
|
1534
|
+
"textAlign"
|
|
1535
|
+
], io = _(A)`
|
|
1536
|
+
a .card {
|
|
1537
|
+
color: #404040;
|
|
1538
|
+
cursor: pointer;
|
|
1539
|
+
}
|
|
1540
|
+
a:not(.MuiButton-root) {
|
|
1541
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1542
|
+
&:hover,
|
|
1543
|
+
&:active {
|
|
1544
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
a:hover .card {
|
|
1548
|
+
color: #404040;
|
|
1549
|
+
}
|
|
1550
|
+
`;
|
|
1551
|
+
function ao({ className: t, ...e }) {
|
|
1552
|
+
const [n, r] = $(e, O), [o, a] = $(r, ro);
|
|
1553
|
+
return /* @__PURE__ */ w(io, { className: g("section--card-list", t), type: e.type, ...a, children: [
|
|
1554
|
+
Object.keys(n).length > 0 && /* @__PURE__ */ i(E, { center: !0, ...n, className: "mb-[2.5vw]" }),
|
|
1555
|
+
/* @__PURE__ */ i(no, { ...o, dark: !!e.dark })
|
|
1556
|
+
] });
|
|
1557
|
+
}
|
|
1558
|
+
const so = _(ao)`
|
|
1559
|
+
.card__description {
|
|
1560
|
+
white-space: pre-wrap;
|
|
1561
|
+
}
|
|
1562
|
+
.section__description {
|
|
1563
|
+
}
|
|
1564
|
+
.card {
|
|
1565
|
+
/* background: inherit !important; */
|
|
1566
|
+
}
|
|
1567
|
+
&.dark .card-simple .card__body::before {
|
|
1568
|
+
background: #212121 !important;
|
|
1569
|
+
}
|
|
1570
|
+
.card-simple .card__body::after {
|
|
1571
|
+
background: inherit !important;
|
|
1572
|
+
}
|
|
1573
|
+
`;
|
|
1574
|
+
function lo({ section: t, ...e }) {
|
|
1575
|
+
const [{ editing: n }, r] = $(e, F), o = W(() => {
|
|
1576
|
+
var a;
|
|
1577
|
+
return {
|
|
1578
|
+
...S(r, ["listBorder", "list", "iconSize", "imageSize"]),
|
|
1579
|
+
list: (a = r.list) == null ? void 0 : a.map((d) => {
|
|
1580
|
+
var s, l;
|
|
1581
|
+
return {
|
|
1582
|
+
...S(d, "icon", "iconColor"),
|
|
1583
|
+
image: ["news", "simple", "default"].includes(r.type) && d.icon ? d.icon : d.image,
|
|
1584
|
+
actions: (l = (s = d.actions) == null ? void 0 : s.map) == null ? void 0 : l.call(s, (c) => /* @__PURE__ */ i(zt, { ...c, editing: n }, c.id)),
|
|
1585
|
+
border: r.listBorder,
|
|
1586
|
+
iconSize: r.iconSize,
|
|
1587
|
+
imageSize: r.imageSize,
|
|
1588
|
+
hoverStyle: r.hoverStyle
|
|
1589
|
+
};
|
|
1590
|
+
})
|
|
1591
|
+
};
|
|
1592
|
+
}, [r]);
|
|
1593
|
+
return /* @__PURE__ */ i(so, { style: n ? { pointerEvents: "none" } : {}, ...o });
|
|
1594
|
+
}
|
|
1595
|
+
function co({
|
|
1596
|
+
properties: t,
|
|
1597
|
+
section: e,
|
|
1598
|
+
locale: n,
|
|
1599
|
+
dev: r
|
|
1600
|
+
}) {
|
|
1601
|
+
var o;
|
|
1602
|
+
return (o = e == null ? void 0 : e.config) != null && o.componentId ? /* @__PURE__ */ i(
|
|
1603
|
+
te,
|
|
1604
|
+
{
|
|
1605
|
+
instanceId: e.id,
|
|
1606
|
+
componentId: e.config.componentId,
|
|
1607
|
+
blockletId: e.config.blockletId,
|
|
1608
|
+
blockletTitle: e.config.blockletTitle,
|
|
1609
|
+
componentName: e.config.componentName,
|
|
1610
|
+
locale: n,
|
|
1611
|
+
properties: t,
|
|
1612
|
+
dev: r
|
|
1613
|
+
}
|
|
1614
|
+
) : /* @__PURE__ */ i(b, { textAlign: "center", py: 2, children: /* @__PURE__ */ i(C, { variant: "caption", color: "text.secondary", children: "Please select component to render" }) });
|
|
1615
|
+
}
|
|
1616
|
+
function mo({
|
|
1617
|
+
src: t,
|
|
1618
|
+
dataId: e,
|
|
1619
|
+
isEdit: n = !1,
|
|
1620
|
+
height: r = "100%",
|
|
1621
|
+
onLoad: o = () => {
|
|
1622
|
+
}
|
|
1623
|
+
}) {
|
|
1624
|
+
return /* @__PURE__ */ i(
|
|
1625
|
+
ue,
|
|
1626
|
+
{
|
|
1627
|
+
isEdit: n,
|
|
1628
|
+
embedId: e,
|
|
1629
|
+
src: t,
|
|
1630
|
+
height: r,
|
|
1631
|
+
onLoad: () => {
|
|
1632
|
+
o();
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
);
|
|
1636
|
+
}
|
|
1637
|
+
function po({ dataId: t, src: e, actions: n, center: r, onLoad: o, ...a }) {
|
|
1638
|
+
const [d, s] = $(a, O);
|
|
1639
|
+
return /* @__PURE__ */ w(A, { ...s, children: [
|
|
1640
|
+
Object.keys(d).length > 0 && /* @__PURE__ */ i(E, { center: r, ...d }),
|
|
1641
|
+
/* @__PURE__ */ i(
|
|
1642
|
+
mo,
|
|
1643
|
+
{
|
|
1644
|
+
dataId: t,
|
|
1645
|
+
src: e,
|
|
1646
|
+
onLoad: o,
|
|
1647
|
+
height: a.iframeHeight ? `${a.iframeHeight}px` : "100%"
|
|
1648
|
+
}
|
|
1649
|
+
),
|
|
1650
|
+
/* @__PURE__ */ i(z, { actions: n, center: r })
|
|
1651
|
+
] });
|
|
1652
|
+
}
|
|
1653
|
+
const pn = {
|
|
1654
|
+
src: "",
|
|
1655
|
+
embedUrl: "",
|
|
1656
|
+
title: "",
|
|
1657
|
+
description: "",
|
|
1658
|
+
dark: !1,
|
|
1659
|
+
background: "",
|
|
1660
|
+
center: !0,
|
|
1661
|
+
config: {},
|
|
1662
|
+
id: ""
|
|
1663
|
+
};
|
|
1664
|
+
function uo({ section: t, id: e, src: n, ...r }) {
|
|
1665
|
+
const o = `${e}-${r.locale}`, [{ editing: a }, d] = $(r, F), s = tt({}), l = JSON.parse(JSON.stringify(d)), { message: c } = de(o, "server"), m = me(JSON.parse(JSON.stringify(d.config) || "{}"));
|
|
1666
|
+
return T(() => {
|
|
1667
|
+
c && c.onInit(() => m.current);
|
|
1668
|
+
}, [c]), T(() => {
|
|
1669
|
+
const p = JSON.parse(JSON.stringify(d.config) || "{}");
|
|
1670
|
+
pe(s.current, p) || (s.current = p, c == null || c.send("config-set", p));
|
|
1671
|
+
}, [c, d.config]), n ? /* @__PURE__ */ i(po, { ...l, dataId: o, src: n, style: a ? { pointerEvents: "none" } : {} }) : /* @__PURE__ */ i(ho, { children: 'Please set the "src" attribute for this block' });
|
|
1672
|
+
}
|
|
1673
|
+
const ho = _("div")`
|
|
1674
|
+
user-select: none;
|
|
1675
|
+
color: #999;
|
|
1676
|
+
padding: 8px;
|
|
1677
|
+
height: 200px;
|
|
1678
|
+
`, fo = [
|
|
1679
|
+
/youtu\.be\/([^#&?]{11})/,
|
|
1680
|
+
// youtu.be/<id>
|
|
1681
|
+
/\?v=([^#&?]{11})/,
|
|
1682
|
+
// ?v=<id>
|
|
1683
|
+
/&v=([^#&?]{11})/,
|
|
1684
|
+
// &v=<id>
|
|
1685
|
+
/embed\/([^#&?]{11})/,
|
|
1686
|
+
// embed/<id>
|
|
1687
|
+
/\/v\/([^#&?]{11})/
|
|
1688
|
+
// /v/<id>
|
|
1689
|
+
];
|
|
1690
|
+
function go(t) {
|
|
1691
|
+
var e;
|
|
1692
|
+
if (/youtu\.?be/.test(t))
|
|
1693
|
+
for (const n of fo) {
|
|
1694
|
+
const r = (e = n.exec(t)) == null ? void 0 : e[1];
|
|
1695
|
+
if (r)
|
|
1696
|
+
return r;
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
function xo(t) {
|
|
1700
|
+
const e = go(t);
|
|
1701
|
+
if (e)
|
|
1702
|
+
return `https://youtube.com/embed/${e}`;
|
|
1703
|
+
}
|
|
1704
|
+
function bo({ src: t }) {
|
|
1705
|
+
return T(() => {
|
|
1706
|
+
import("@lottiefiles/lottie-player");
|
|
1707
|
+
}, []), /* @__PURE__ */ i("lottie-player", { autoplay: !0, loop: !0, mode: "normal", src: t });
|
|
1708
|
+
}
|
|
1709
|
+
function yo(t) {
|
|
1710
|
+
return /* @__PURE__ */ i(b, { maxHeight: 400, overflow: "hidden auto", children: /* @__PURE__ */ i(he, { ...t }) });
|
|
1711
|
+
}
|
|
1712
|
+
function wo({ url: t }) {
|
|
1713
|
+
const e = tt(null), n = 495, [r, o] = M(
|
|
1714
|
+
e.current ? e.current.offsetWidth * 0.5625 : n
|
|
1715
|
+
), a = J(() => {
|
|
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 : n;
|
|
1717
|
+
return o(Math.floor(s * d));
|
|
1718
|
+
}, []);
|
|
1719
|
+
return T(() => {
|
|
1720
|
+
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 : n;
|
|
1722
|
+
return o(Math.floor(s * d)), function() {
|
|
1723
|
+
window.removeEventListener("resize", a);
|
|
1724
|
+
};
|
|
1725
|
+
}, [r, a]), /* @__PURE__ */ i(
|
|
1726
|
+
b,
|
|
1727
|
+
{
|
|
1728
|
+
component: "iframe",
|
|
1729
|
+
ref: e,
|
|
1730
|
+
title: "youtube",
|
|
1731
|
+
width: "100%",
|
|
1732
|
+
height: `${r}px`,
|
|
1733
|
+
src: t,
|
|
1734
|
+
frameBorder: "0",
|
|
1735
|
+
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
1736
|
+
allowFullScreen: !0,
|
|
1737
|
+
sx: { display: "block" }
|
|
1738
|
+
}
|
|
1739
|
+
);
|
|
1740
|
+
}
|
|
1741
|
+
const un = {
|
|
1742
|
+
image: "https://www.arcblock.io/static/ead0cabde7f2b7ff34db8f3e8ceca271/afc4b/builder.png",
|
|
1743
|
+
badge: "Develop · Deploy · Run",
|
|
1744
|
+
title: "The Future is Here: Blockchain and Decentralized Application Development",
|
|
1745
|
+
description: "ArcBlock, your exclusive new decentralized development platform, makes developing decentralized applications, blockchain, and distributed ledger technology straightforward.",
|
|
1746
|
+
reverse: !1,
|
|
1747
|
+
dark: !1,
|
|
1748
|
+
background: "",
|
|
1749
|
+
actions: void 0,
|
|
1750
|
+
hasImage: !0,
|
|
1751
|
+
center: !1
|
|
1752
|
+
}, vo = _(Te)`
|
|
1753
|
+
.section__description {
|
|
1754
|
+
}
|
|
1755
|
+
`;
|
|
1756
|
+
function ko({
|
|
1757
|
+
hasImage: t,
|
|
1758
|
+
fullSizeImage: e,
|
|
1759
|
+
boxed: n,
|
|
1760
|
+
videoPoster: r,
|
|
1761
|
+
imageMeta: o,
|
|
1762
|
+
imageOptimization: a,
|
|
1763
|
+
imageSize: d,
|
|
1764
|
+
section: s,
|
|
1765
|
+
...l
|
|
1766
|
+
}) {
|
|
1767
|
+
var u, f;
|
|
1768
|
+
const [{ editing: c }, m] = $({ ...l, boxed: e ? void 0 : n }, F);
|
|
1769
|
+
let p = _o(m.image, r, e, o, a, d);
|
|
1770
|
+
t || (p = null);
|
|
1771
|
+
let h = null;
|
|
1772
|
+
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(
|
|
1773
|
+
vo,
|
|
1774
|
+
{
|
|
1775
|
+
...m,
|
|
1776
|
+
style: c ? { pointerEvents: "none" } : {},
|
|
1777
|
+
image: p,
|
|
1778
|
+
fullSizeImage: t && e,
|
|
1779
|
+
actions: h
|
|
1780
|
+
}
|
|
1781
|
+
);
|
|
1782
|
+
}
|
|
1783
|
+
function _o(t, e, n, r, o, a) {
|
|
1784
|
+
if (t) {
|
|
1785
|
+
if (t.endsWith(".json"))
|
|
1786
|
+
return /* @__PURE__ */ i(bo, { src: t });
|
|
1787
|
+
if (t.indexOf("twitter.com") !== -1)
|
|
1788
|
+
return /* @__PURE__ */ i(yo, { sourceType: "url", url: t });
|
|
1789
|
+
const d = xo(t);
|
|
1790
|
+
if (d)
|
|
1791
|
+
return /* @__PURE__ */ i(wo, { url: d });
|
|
1792
|
+
const { naturalWidth: s, naturalHeight: l, filename: c } = r || {};
|
|
1793
|
+
if (Q(t))
|
|
1794
|
+
return /* @__PURE__ */ i(
|
|
1795
|
+
"video",
|
|
1796
|
+
{
|
|
1797
|
+
width: s && `${s}px`,
|
|
1798
|
+
height: l && `${l}px`,
|
|
1799
|
+
controls: !0,
|
|
1800
|
+
autoPlay: !0,
|
|
1801
|
+
muted: !0,
|
|
1802
|
+
style: {
|
|
1803
|
+
display: "block",
|
|
1804
|
+
objectFit: a || "contain",
|
|
1805
|
+
borderRadius: "8px",
|
|
1806
|
+
width: "100%",
|
|
1807
|
+
height: "100%"
|
|
1808
|
+
},
|
|
1809
|
+
poster: j(N(e), n ? 1200 : 540, o),
|
|
1810
|
+
children: /* @__PURE__ */ i("source", { src: N(t), type: We(t) })
|
|
1811
|
+
},
|
|
1812
|
+
t
|
|
1813
|
+
);
|
|
1814
|
+
const m = o === "quality" ? 1 : 0.6;
|
|
1815
|
+
return /* @__PURE__ */ i(
|
|
1816
|
+
kt,
|
|
1817
|
+
{
|
|
1818
|
+
src: N(t),
|
|
1819
|
+
sizesAttr: {
|
|
1820
|
+
sm: 600 * m,
|
|
1821
|
+
md: 450 * m,
|
|
1822
|
+
lg: 540 * m,
|
|
1823
|
+
...n && {
|
|
1824
|
+
md: 900 * m,
|
|
1825
|
+
lg: 1200 * m
|
|
1826
|
+
}
|
|
1827
|
+
},
|
|
1828
|
+
width: s && `${s}px`,
|
|
1829
|
+
height: l && `${l}px`,
|
|
1830
|
+
alt: c ?? t,
|
|
1831
|
+
style: { objectFit: a || "contain", display: "block", width: "100%", height: "100%" },
|
|
1832
|
+
loading: "lazy"
|
|
1833
|
+
}
|
|
1834
|
+
);
|
|
1835
|
+
}
|
|
1836
|
+
return null;
|
|
1837
|
+
}
|
|
1838
|
+
const hn = ["production", "draft"];
|
|
1839
|
+
function fn({ mode: t, version: e } = {}) {
|
|
1840
|
+
const n = e && typeof e == "number" ? { mode: t, version: e } : { mode: t };
|
|
1841
|
+
return et.get(`/api/${ot()}/pages`, { params: n }).then((r) => r.data);
|
|
1842
|
+
}
|
|
1843
|
+
function gn({ mode: t, routes: e }) {
|
|
1844
|
+
return et.post(`/api/${ot()}/pages/publish`, { mode: t, routes: e }).then((n) => n.data);
|
|
1845
|
+
}
|
|
1846
|
+
function $o({
|
|
1847
|
+
locale: t,
|
|
1848
|
+
sort: e,
|
|
1849
|
+
page: n,
|
|
1850
|
+
limit: r,
|
|
1851
|
+
mode: o
|
|
1852
|
+
} = {}) {
|
|
1853
|
+
return et.get(`/api/${ot()}/pages/toc`, { params: { locale: t, sort: e, page: n, limit: r, mode: o } }).then((a) => a.data);
|
|
1854
|
+
}
|
|
1855
|
+
const xn = {
|
|
1856
|
+
style: "list",
|
|
1857
|
+
sort: "-updatedAt"
|
|
1858
|
+
}, ft = 20;
|
|
1859
|
+
function No({ style: t, sort: e, section: n, ...r }) {
|
|
1860
|
+
const [{ editing: o, locale: a }, d] = $(r, F), [s, l] = $(d, O), [c, m] = M(), p = tt(!1), h = fe(), u = ae(), f = J(async () => {
|
|
1861
|
+
if (!p.current) {
|
|
1862
|
+
p.current = !0, h();
|
|
1863
|
+
try {
|
|
1864
|
+
const y = c ? Math.floor(c.list.length / ft) + 1 : 1, { list: x, total: k } = await $o({ locale: a, sort: e, page: y, limit: ft });
|
|
1865
|
+
m((v) => ({
|
|
1866
|
+
list: ((v == null ? void 0 : v.list) ?? []).concat(x),
|
|
1867
|
+
total: k
|
|
1868
|
+
}));
|
|
1869
|
+
} finally {
|
|
1870
|
+
p.current = !1, h();
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
}, [c, a, e, h]);
|
|
1874
|
+
return ge(() => {
|
|
1875
|
+
f();
|
|
1876
|
+
}), /* @__PURE__ */ w(A, { ...l, sx: o ? { pointerEvents: "none" } : {}, children: [
|
|
1877
|
+
Object.keys(s).length > 0 && /* @__PURE__ */ i(E, { ...s }),
|
|
1878
|
+
c ? /* @__PURE__ */ w(Y, { children: [
|
|
1879
|
+
/* @__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
|
+
So,
|
|
1881
|
+
{
|
|
1882
|
+
elevation: 0,
|
|
1883
|
+
className: g(t === "card" && "style-card"),
|
|
1884
|
+
onClick: o ? void 0 : () => u(y.slug),
|
|
1885
|
+
children: [
|
|
1886
|
+
!!y.image && /* @__PURE__ */ i(
|
|
1887
|
+
Ht,
|
|
1888
|
+
{
|
|
1889
|
+
component: "img",
|
|
1890
|
+
alt: "",
|
|
1891
|
+
image: j(N(y.image), 540),
|
|
1892
|
+
loading: "lazy"
|
|
1893
|
+
}
|
|
1894
|
+
),
|
|
1895
|
+
/* @__PURE__ */ w(Yt, { children: [
|
|
1896
|
+
/* @__PURE__ */ i(C, { variant: "h6", component: "div", className: gt, children: y.title || y.id }),
|
|
1897
|
+
/* @__PURE__ */ i(C, { variant: "body2", className: gt, children: y.description })
|
|
1898
|
+
] })
|
|
1899
|
+
]
|
|
1900
|
+
}
|
|
1901
|
+
) }, y.id)) }),
|
|
1902
|
+
/* @__PURE__ */ i(b, { textAlign: "center", mt: 2, children: c.total > c.list.length ? /* @__PURE__ */ i(L, { variant: "outlined", color: "secondary", onClick: f, loading: p.current, children: "More" }) : /* @__PURE__ */ i(L, { variant: "outlined", color: "secondary", disabled: !0, children: "No More" }) })
|
|
1903
|
+
] }) : /* @__PURE__ */ i(b, { p: 2, textAlign: "center", children: /* @__PURE__ */ i(Dt, { size: 24 }) })
|
|
1904
|
+
] });
|
|
1905
|
+
}
|
|
1906
|
+
const gt = X`
|
|
1907
|
+
display: -webkit-box;
|
|
1908
|
+
-webkit-box-orient: vertical;
|
|
1909
|
+
-webkit-line-clamp: 2;
|
|
1910
|
+
overflow: hidden;
|
|
1911
|
+
text-overflow: ellipsis;
|
|
1912
|
+
`, So = _(Ut)`
|
|
1913
|
+
border: 1px solid #e0e0e0;
|
|
1914
|
+
background-color: transparent;
|
|
1915
|
+
cursor: pointer;
|
|
1916
|
+
display: flex;
|
|
1917
|
+
color: inherit;
|
|
1918
|
+
|
|
1919
|
+
> .MuiCardMedia-root {
|
|
1920
|
+
width: 30vw;
|
|
1921
|
+
max-height: 50vw;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
&.style-card {
|
|
1925
|
+
display: block;
|
|
1926
|
+
|
|
1927
|
+
> .MuiCardMedia-root {
|
|
1928
|
+
width: 100%;
|
|
1929
|
+
max-height: 50vw;
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
`, Co = {
|
|
1933
|
+
iframe: uo,
|
|
1934
|
+
section: ko,
|
|
1935
|
+
"section-card-list": lo,
|
|
1936
|
+
toc: No,
|
|
1937
|
+
"ai-runtime": Ae,
|
|
1938
|
+
"custom-component": co
|
|
1939
|
+
};
|
|
1940
|
+
function bn({ id: t, type: e, mode: n, config: r, section: o, ...a }) {
|
|
1941
|
+
const d = Co[e], { getPageMetaStyle: s } = Se(), l = W(() => {
|
|
1942
|
+
const { height: p, ...h } = r;
|
|
1943
|
+
return h;
|
|
1944
|
+
}, [r]), c = W(() => {
|
|
1945
|
+
const p = {};
|
|
1946
|
+
return e !== "custom-component" && (p.height = r.height), p.sx = s("sx"), p;
|
|
1947
|
+
}, [r.height, e, s]), m = d && /* @__PURE__ */ i(d, { mode: n, ...l, id: t, section: o });
|
|
1948
|
+
return /* @__PURE__ */ i(Ee, { ...a, ...c, children: m });
|
|
1949
|
+
}
|
|
1950
|
+
function yn(t) {
|
|
1951
|
+
return t != null;
|
|
1952
|
+
}
|
|
1953
|
+
export {
|
|
1954
|
+
zt as A,
|
|
1955
|
+
bn as B,
|
|
1956
|
+
It as I,
|
|
1957
|
+
dn as P,
|
|
1958
|
+
hn as S,
|
|
1959
|
+
xn as T,
|
|
1960
|
+
cn as a,
|
|
1961
|
+
un as b,
|
|
1962
|
+
pn as c,
|
|
1963
|
+
fn as g,
|
|
1964
|
+
yn as n,
|
|
1965
|
+
gn as p
|
|
1966
|
+
};
|