@blocklet/pages-kit-inner-components 0.5.30 → 0.5.31

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.
Files changed (37) hide show
  1. package/lib/cjs/add-component.js +47 -23
  2. package/lib/cjs/chunks/array-BH41o7C6.js +475 -0
  3. package/lib/cjs/chunks/{config-string-C4Q0hgG0.js → config-string-B3JoYJVu.js} +1 -1
  4. package/lib/cjs/chunks/{draft-data-Cu9gua-P.js → draft-data-hZaTeHgL.js} +1 -1
  5. package/lib/cjs/chunks/home-B6E0yAU3.js +38 -0
  6. package/lib/cjs/chunks/{publish-button-DvwoFH1F.js → publish-button-CO_WU_f5.js} +1 -1
  7. package/lib/cjs/chunks/site-state-D5jk8eJT.js +57 -0
  8. package/lib/cjs/chunks/state-DxOb57hO.js +1 -0
  9. package/lib/cjs/components.js +1 -1
  10. package/lib/cjs/home.js +1 -1
  11. package/lib/cjs/locales.js +3 -1
  12. package/lib/cjs/project-html.js +2 -2
  13. package/lib/cjs/resources.js +1 -1
  14. package/lib/cjs/setting.js +1 -1
  15. package/lib/cjs/site-state.js +1 -1
  16. package/lib/es/add-component.js +795 -749
  17. package/lib/es/chunks/array-NLDZzhVt.js +2224 -0
  18. package/lib/es/chunks/{config-string-CNLg1EYu.js → config-string-DutyRoOh.js} +1 -1
  19. package/lib/es/chunks/{draft-data-hSHLdxKp.js → draft-data-DjX0kpDC.js} +1 -1
  20. package/lib/es/chunks/{home-CNk6U8FU.js → home-CxRa0eKd.js} +112 -96
  21. package/lib/es/chunks/{publish-button-BftBlabj.js → publish-button-1bl_Nuva.js} +3 -3
  22. package/lib/es/chunks/{site-state-DJ3JcBMm.js → site-state-DEduMTrY.js} +505 -473
  23. package/lib/es/chunks/state-C02ZI8vz.js +605 -0
  24. package/lib/es/components.js +1 -1
  25. package/lib/es/home.js +3 -3
  26. package/lib/es/locales.js +44 -6
  27. package/lib/es/project-html.js +43 -42
  28. package/lib/es/resources.js +1 -1
  29. package/lib/es/setting.js +2 -2
  30. package/lib/es/site-state.js +1 -1
  31. package/package.json +10 -10
  32. package/lib/cjs/chunks/array-CJC7ex3i.js +0 -467
  33. package/lib/cjs/chunks/home-CimGvyT9.js +0 -38
  34. package/lib/cjs/chunks/site-state-DvIWP0pO.js +0 -57
  35. package/lib/cjs/chunks/state-jCG5gSUJ.js +0 -1
  36. package/lib/es/chunks/array-9j8tOSbO.js +0 -1993
  37. package/lib/es/chunks/state-D5BnGunt.js +0 -483
@@ -1,1993 +0,0 @@
1
- import { jsx as i, jsxs as w, Fragment as J } from "react/jsx-runtime";
2
- import "@mui/icons-material";
3
- import { Box as y, styled as Et, Typography as C, Container as Ot, Stack as At, useTheme as xt, createTheme as Ft, ThemeProvider as Ut, Card as Vt, CircularProgress as Dt, Grid as st, CardMedia as Ht, CardContent as Yt } from "@mui/material";
4
- import Jt, { createContext as yt, useMemo as W, useCallback as M, useContext as bt, Fragment as Mt, isValidElement as wt, useState as K, useEffect as E, useRef as tt } from "react";
5
- import G from "lodash/keyBy";
6
- import { f as j, g as N, E as Kt, i as et, m as ot } from "./state-D5BnGunt.js";
7
- import { AIForm as lt, AIFormResult as ct } from "@blocklet/ai-runtime/components";
8
- import { deepmerge as Gt } from "@mui/utils";
9
- import rt 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 vt } from "@blocklet/pages-kit/contexts/color";
13
- import { cx as g, css as q } from "@emotion/css";
14
- import { materialDark as Qt } from "react-syntax-highlighter/dist/esm/styles/prism";
15
- import { useTheme as kt, 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 _t, 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 Nt } from "@iconify-icon/react";
23
- import re from "@arcblock/ux/lib/Screenshot";
24
- import { Link as ne, 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 H } from "pathe";
28
- import { withoutTrailingSlash as X, 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 St = "{{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
- ], ye = [
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
- ], be = [
78
- {
79
- title: "None",
80
- value: "none",
81
- sx: { px: 0 }
82
- },
83
- {
84
- title: "Small",
85
- value: "small",
86
- sx: { px: { xs: 2, md: 4, lg: 4, xl: 6 } }
87
- },
88
- {
89
- title: "Normal",
90
- value: "normal",
91
- sx: { px: { xs: 2.5, md: 7.5, lg: 10, xl: 12.5 } }
92
- },
93
- {
94
- title: "Large",
95
- value: "large",
96
- sx: { px: { xs: 2.5, md: 10, lg: 12.5, xl: 15 } }
97
- }
98
- ], Y = (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) => Y(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) => Y(t, "Normal", "md"),
118
- value: "md",
119
- sx: { maxWidth: (t) => t.breakpoints.values.md, width: "100%", mx: "auto" }
120
- },
121
- {
122
- title: (t) => Y(t, "Large", "lg"),
123
- value: "lg",
124
- sx: { maxWidth: (t) => t.breakpoints.values.lg, width: "100%", mx: "auto" }
125
- },
126
- {
127
- title: (t) => Y(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: St,
136
- width: "100%",
137
- mx: "auto"
138
- }
139
- }
140
- ], ve = G(xe, "value"), ke = G(ye, "value"), _e = G(be, "value"), $e = G(we, "value"), Ne = /* @__PURE__ */ new Map([
141
- ["baseSectionPaddingY", ve],
142
- ["maxWidth", $e],
143
- ["paddingY", ke],
144
- ["paddingX", _e]
145
- ]);
146
- function Ct(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(St, m));
158
- } catch {
159
- }
160
- }
161
- return c;
162
- }
163
- return o;
164
- }
165
- const Pt = yt({
166
- page: null,
167
- getPageMeta: () => ({}),
168
- getPageMetaStyle: () => ({})
169
- });
170
- function Se() {
171
- return bt(Pt);
172
- }
173
- function lr({
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 = M(() => {
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 = M(
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 b = Ct({
192
- type: h,
193
- value: u,
194
- format: l
195
- });
196
- return b ? { ...p, ...b } : 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(Pt.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
- y,
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 = Et(y)`
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 O({
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
- ...b
307
- }) {
308
- const x = vt();
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), ...b, 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
- y,
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 A = [
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 Bt(t) {
400
- if (t.type === Mt) {
401
- const n = (t.props.children || []).filter((r) => wt(r));
402
- return n.length === 1 ? Bt(n[0]) : n.length > 1;
403
- }
404
- return Array.isArray(t);
405
- }
406
- const P = "&>*";
407
- function nt({ 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 = kt(), 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
- Bt(t) || (u = 0);
435
- const b = (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}% - ${b}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}% - ${b}rem)` }, k[P] = { width: `calc(45% - ${u / 2 / 2}rem)` }, x[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k), /* @__PURE__ */ i(y, { 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 L(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] = K(Date.now());
479
- return E(() => {
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
- if (s && Ie(s)) {
492
- delete n.backgroundColor;
493
- const l = !(t.mobile.apple.device || Be()) && L(s), c = L(s) && r ? j(N(r), 1200, "quality") : "";
494
- l ? a = /* @__PURE__ */ i(
495
- y,
496
- {
497
- component: "video",
498
- className: "section-bg",
499
- width: "100%",
500
- autoPlay: !0,
501
- loop: !0,
502
- muted: !0,
503
- controls: !1,
504
- playsInline: !0,
505
- poster: c,
506
- src: L(s) ? s : j(s, 1200, "quality"),
507
- sx: {
508
- position: "absolute",
509
- zIndex: -9999,
510
- right: 0,
511
- left: 0,
512
- top: 0,
513
- width: "100%",
514
- height: "100%",
515
- objectFit: "cover"
516
- }
517
- },
518
- s
519
- ) : a = /* @__PURE__ */ i(
520
- _t,
521
- {
522
- src: L(s) && r ? c : s,
523
- sizesAttr: {
524
- sm: 600,
525
- md: 900,
526
- lg: 1200
527
- },
528
- className: "section-bg",
529
- alt: "",
530
- width: "100%",
531
- loading: "lazy",
532
- sx: {
533
- position: "absolute",
534
- zIndex: -9999,
535
- right: 0,
536
- left: 0,
537
- top: 0,
538
- width: "100%",
539
- height: "100%",
540
- objectFit: "cover"
541
- }
542
- },
543
- o || s
544
- );
545
- } else s ? n.backgroundImage = `${s} !important` : d && (n.backgroundColor = `${d} !important`);
546
- return a;
547
- }
548
- function ze({ autoWidth: t, children: e, ...n }) {
549
- return t ? /* @__PURE__ */ i(y, { display: "flex", ...n, children: e }) : /* @__PURE__ */ i(Ot, { ...n, children: e });
550
- }
551
- function F({
552
- dark: t = !1,
553
- children: e,
554
- className: n,
555
- sx: r = {},
556
- boxed: o = { show: !1 },
557
- padding: a = "normal",
558
- boxProps: d,
559
- type: s,
560
- ...l
561
- }) {
562
- const c = { ...r }, m = $t((u) => u.breakpoints.down("md"));
563
- t && (c.color = dt.common.white, c.backgroundColor = `${dt.grey[900]} !important`), o.show && (c.display = "flex");
564
- const p = W(() => !Number(l.boxMaxWidth) || m ? {
565
- width: "100%"
566
- } : s === "wall" && l.boxMaxWidth ? {
567
- maxWidth: `${l.boxMaxWidth}px !important`,
568
- width: "100%"
569
- } : {
570
- width: "100%"
571
- }, [l.boxMaxWidth, m, s]), h = Ct({
572
- type: "baseSectionPaddingY",
573
- value: a || "normal",
574
- // section default is normal
575
- defaultValue: ""
576
- });
577
- return /* @__PURE__ */ i(
578
- Le,
579
- {
580
- component: "section",
581
- styles: { ...c, ...h },
582
- className: g("base-section", "px-2 md:px-5 lg:px-5 xl:px-10", n, {
583
- dark: t
584
- }),
585
- ...S(
586
- l,
587
- "hoverStyle",
588
- "boxMaxWidth",
589
- "embedUrl",
590
- "autoWidth",
591
- "paddingXY",
592
- "iframeHeight",
593
- "titleAppearance",
594
- "descriptionAppearance"
595
- ),
596
- children: /* @__PURE__ */ i(ze, { autoWidth: l == null ? void 0 : l.autoWidth, className: g("section-content h-full"), sx: p, children: o.show ? /* @__PURE__ */ i(It, { ...d, boxed: o, children: e }) : e })
597
- }
598
- );
599
- }
600
- function It({
601
- background: t = "",
602
- backgroundVideoPoster: e,
603
- children: n,
604
- sx: r = {},
605
- boxed: o = { show: !1 },
606
- className: a = "",
607
- styles: d = {},
608
- ...s
609
- }) {
610
- const l = { ...d, ...r }, c = vt();
611
- let m = null;
612
- const p = $t((f) => f.breakpoints.up("sm")), h = Zt(), u = Re();
613
- return t && (m = mt(
614
- h,
615
- typeof t == "string" ? c(t) : t,
616
- l,
617
- e,
618
- u
619
- )), 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(
620
- h,
621
- typeof (o == null ? void 0 : o.background) == "string" ? c(o == null ? void 0 : o.background) : o == null ? void 0 : o.background,
622
- l,
623
- o == null ? void 0 : o.backgroundVideoPoster,
624
- u
625
- ))), /* @__PURE__ */ w(
626
- y,
627
- {
628
- ...s,
629
- sx: {
630
- ...l,
631
- ...m ? { position: "relative", overflow: "hidden", zIndex: 0 } : {}
632
- },
633
- className: g(a, (o == null ? void 0 : o.boxShadow) && "shadow-xl"),
634
- children: [
635
- m,
636
- n
637
- ]
638
- }
639
- );
640
- }
641
- const Le = _(It)`
642
- &:nth-of-type(even) {
643
- background: #f8f8f8;
644
- }
645
-
646
- @media (max-width: 600px) {
647
- .section__title {
648
- font-size: 24px;
649
- }
650
-
651
- .base-info {
652
- > *:last-child {
653
- margin-bottom: 0;
654
- }
655
- }
656
- }
657
- `;
658
- function Wt({ icon: t, ...e }) {
659
- return /* @__PURE__ */ i(Nt, { icon: t, ...e, ref: null });
660
- }
661
- function $(t, e) {
662
- const n = rt(t, e), r = S(t, e);
663
- return [n, r];
664
- }
665
- const jt = ["title", "description", "actions", "badge", "tag", "prepend", "append", "logo"];
666
- function Te({
667
- image: t,
668
- imageBorder: e,
669
- imageShadow: n,
670
- className: r,
671
- reverse: o = !1,
672
- fullSizeImage: a,
673
- ...d
674
- }) {
675
- const [s, l] = $(d, A), c = Object.keys(s).length > 0 && Object.values(rt(s, jt)).filter(Boolean).length > 0 && /* @__PURE__ */ i(O, { ...s }), m = wt(t) ? t : /* @__PURE__ */ i(y, { component: "img", src: t, alt: "", className: "block" }), p = ["phone", "macbook"].includes(e), h = t && /* @__PURE__ */ i(
676
- y,
677
- {
678
- className: g(
679
- "section__image",
680
- "m-auto, leading-[1] text-center",
681
- n && "shadow-xl",
682
- s != null && s.center ? "flex justify-center items-center" : ""
683
- ),
684
- sx: {
685
- border: e === !0 ? "1px solid #c0c0c0" : void 0,
686
- borderRadius: 2,
687
- overflow: "hidden",
688
- // FIXME: Screenshot 组件无法设置最外层 div 的样式,只能通过父元素设置
689
- "> div": p ? { width: "100%", video: { borderRadius: "0 !important" } } : void 0
690
- },
691
- children: p ? (
692
- // @ts-ignore
693
- /* @__PURE__ */ i(re, { type: e, sx: { width: "100%" }, children: m })
694
- ) : m
695
- }
696
- );
697
- return /* @__PURE__ */ i(
698
- F,
699
- {
700
- className: g(
701
- "section--block",
702
- r,
703
- a && !o && q`
704
- .section-bg {
705
- height: 80%;
706
- }
707
- `
708
- ),
709
- ...l,
710
- boxProps: a ? { sx: { padding: 0, overflow: "hidden" } } : void 0,
711
- children: /* @__PURE__ */ i(
712
- nt,
713
- {
714
- col: t ? 2 : 1,
715
- className: a ? q`
716
- display: flex;
717
- flex-direction: column;
718
-
719
- > .base-info,
720
- > .section__image {
721
- width: 100%;
722
-
723
- > img,
724
- > video {
725
- width: 100%;
726
- }
727
- }
728
- ` : void 0,
729
- children: o ? /* @__PURE__ */ w(J, { children: [
730
- h,
731
- c
732
- ] }) : /* @__PURE__ */ w(J, { children: [
733
- c,
734
- h
735
- ] })
736
- }
737
- )
738
- }
739
- );
740
- }
741
- const U = ["editing", "height", "locale", "dev", "sx"];
742
- function Ee(t) {
743
- const { className: e, ...n } = t;
744
- return /* @__PURE__ */ i(Oe, { ...n, className: g("BlockBase-root", e) });
745
- }
746
- const Oe = _(y)`
747
- position: relative;
748
- color: ${({ theme: t }) => t.palette.text.primary};
749
- `;
750
- function Ae({
751
- widget: t,
752
- reverse: e,
753
- projectId: n,
754
- assistantId: r,
755
- working: o,
756
- submitTitle: a,
757
- submitIcon: d,
758
- submitColor: s,
759
- placeholder: l,
760
- loadingIndicator: c,
761
- section: m,
762
- ...p
763
- }) {
764
- const [{ editing: h }, u] = $(p, U), [f, b] = $(u, A), x = n && r ? { projectId: n, gitRef: "main", assistantId: r, working: !0 } : void 0, k = {
765
- children: a,
766
- endIcon: d ? /* @__PURE__ */ i(Wt, { icon: d }) : void 0,
767
- sx: {
768
- background: s || void 0,
769
- ":hover": {
770
- background: s || void 0,
771
- opacity: 0.8
772
- }
773
- }
774
- }, v = [], I = l && /* @__PURE__ */ i(C, { variant: "caption", color: "text.disabled", children: l }), R = c && /* @__PURE__ */ i(C, { variant: "caption", color: "text.disabled", children: c });
775
- Object.keys(f).length > 0 && Object.values(rt(f, jt)).filter(Boolean).length > 0 && v.push(/* @__PURE__ */ i(O, { ...f }, "base-info")), x && (t === "form" ? v.push(/* @__PURE__ */ i(lt, { identifier: x, SubmitProps: k }, "form")) : t === "result" ? v.push(
776
- /* @__PURE__ */ i(
777
- ct,
778
- {
779
- identifier: x,
780
- placeholder: I,
781
- loadingIndicator: R
782
- },
783
- "result"
784
- )
785
- ) : v.push(
786
- /* @__PURE__ */ w(At, { width: "100%", gap: 2, direction: "row", children: [
787
- /* @__PURE__ */ i(lt, { identifier: x, BoxProps: { flex: 1 }, SubmitProps: k }),
788
- /* @__PURE__ */ i(
789
- ct,
790
- {
791
- identifier: x,
792
- BoxProps: { flex: 1 },
793
- placeholder: I,
794
- loadingIndicator: R
795
- }
796
- )
797
- ] }, "form-result")
798
- )), e && v.reverse();
799
- const at = xt(), Tt = W(
800
- () => Ft(Gt(at, { palette: { primary: s ? { main: s } : void 0 } })),
801
- [s, at]
802
- );
803
- return /* @__PURE__ */ i(Xt, { fallbackRender: Kt, children: /* @__PURE__ */ i(Ut, { theme: Tt, children: /* @__PURE__ */ i(F, { ...b, sx: h ? { pointerEvents: "none" } : {}, children: /* @__PURE__ */ i(nt, { col: v.length, children: v }) }) }) });
804
- }
805
- const Rt = yt({
806
- pages: [],
807
- project: void 0
808
- }), { Provider: cr, Consumer: dr } = Rt;
809
- function zt() {
810
- return bt(Rt);
811
- }
812
- function Fe({ icon: t, className: e = "", size: n = "1rem", ...r }) {
813
- return /* @__PURE__ */ i(Ue, { component: Wt, className: g("css-icon", e), size: n, ...r, icon: t });
814
- }
815
- const Ue = _(y)`
816
- &.css-icon {
817
- display: inline-block;
818
- width: ${({ size: t }) => t};
819
- height: ${({ size: t }) => t};
820
- }
821
- `;
822
- function Ve({ icon: t, className: e = "", size: n = "1rem", imageMeta: r, ...o }) {
823
- const a = j(N(t), 540), [d, s] = K(!1), l = kt();
824
- 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(
825
- "img",
826
- {
827
- className: "image-icon__image",
828
- src: a,
829
- onError: () => s(!0),
830
- width: r == null ? void 0 : r.naturalWidth,
831
- height: r == null ? void 0 : r.naturalHeight,
832
- alt: (r == null ? void 0 : r.filename) || "card-icon",
833
- loading: "lazy"
834
- }
835
- ) });
836
- }
837
- const De = _(y)`
838
- display: inline-block;
839
- width: ${({ size: t }) => t};
840
- height: ${({ size: t }) => t};
841
- .image-icon__image {
842
- object-fit: contain;
843
- height: 100%;
844
- width: 100%;
845
- }
846
- `, it = (t) => typeof t == "string" && /^[\w-_]+:[\w-_]+$/.test(t);
847
- function Z({ icon: t, size: e = "1rem", imageMeta: n, ...r }) {
848
- const o = window.isNaN(e) ? e : `${e}px`;
849
- return it(t) ? /* @__PURE__ */ i(Nt, { icon: t }) : /* @__PURE__ */ i(He, { component: Ve, imageMeta: n, className: "base-icon", icon: t, size: o, ...r });
850
- }
851
- const He = _(y)`
852
- flex-shrink: 0;
853
- `;
854
- function T({ text: t, children: e, icon: n = "", endIcon: r, color: o = "primary", link: a = "", href: d = "", ...s }) {
855
- const l = n ? /* @__PURE__ */ i(Z, { icon: n }) : null, c = r ? /* @__PURE__ */ i(Z, { icon: r }) : null, m = a || d, p = { ...s };
856
- return m && (p.href = m, Q(m) && (p.target = p.target || "_blank")), /* @__PURE__ */ i(se, { startIcon: l, endIcon: c, color: o, ...p, children: t || e });
857
- }
858
- function Lt({ editing: t, text: e, ...n }) {
859
- const { pages: r = [] } = zt(), o = r.find((a) => a.id === (n.link || n.linkId));
860
- if (t)
861
- return /* @__PURE__ */ i(T, { ...S(n, ["link", "linkId"]), children: e });
862
- if (o) {
863
- const a = o.path || "/";
864
- return /* @__PURE__ */ i(ne, { to: a, children: /* @__PURE__ */ i(T, { ...S(n, ["link", "linkId"]), children: e }) });
865
- }
866
- return /* @__PURE__ */ i(T, { ...S(n, "linkId"), children: e });
867
- }
868
- function B({ type: t = "", icon: e = "", size: n = "3rem", className: r = "", ...o }) {
869
- return /* @__PURE__ */ i(Z, { icon: e || t, size: n, className: g("content-icon", r), ...o });
870
- }
871
- B.propTypes = {};
872
- B.defaultProps = {
873
- type: "",
874
- icon: "",
875
- size: "3rem",
876
- color: "inherit",
877
- className: ""
878
- };
879
- function Ye({
880
- to: t,
881
- base: e,
882
- children: n,
883
- className: r,
884
- activeClassName: o = "active",
885
- target: a = "auto",
886
- autoExternalMark: d = !1,
887
- useRouterLink: s,
888
- ...l
889
- }) {
890
- const { pages: c = [], locale: m = "" } = {}, p = e ? H("/", e) : e || "";
891
- let h = a === "auto" ? "_self" : a, u = H(p, t);
892
- const f = d ? Q(u) : !1;
893
- if (e)
894
- return u = H(p, m, t), /* @__PURE__ */ i(
895
- "a",
896
- {
897
- className: `no-underline ${r}`,
898
- href: X(u),
899
- rel: "noreferrer noopener",
900
- target: h,
901
- ...l,
902
- children: n
903
- }
904
- );
905
- if (Q(t))
906
- a === "auto" && (h = "_blank"), u = t;
907
- else {
908
- le(u) && (u = H(window.location.pathname, u));
909
- const b = ce(`${window.location.origin}${u}`), x = c.some((k) => k.pathname === b.pathname);
910
- if (s || x)
911
- return /* @__PURE__ */ i(
912
- ie,
913
- {
914
- end: !0,
915
- to: X(u),
916
- className: ({ isActive: k }) => g(r, k ? o : ""),
917
- ...l,
918
- children: n
919
- }
920
- );
921
- }
922
- return /* @__PURE__ */ w(
923
- "a",
924
- {
925
- className: `no-underline ${r}`,
926
- href: X(u),
927
- rel: "noreferrer noopener",
928
- target: h,
929
- ...l,
930
- children: [
931
- n,
932
- f && /* @__PURE__ */ i(B, { icon: "i-mdi:arrow-top-right", size: "0.9em", className: "smart-link__mark", style: { marginLeft: 5 } })
933
- ]
934
- }
935
- );
936
- }
937
- function V({
938
- prepend: t,
939
- append: e,
940
- children: n,
941
- className: r = "",
942
- dark: o = !1,
943
- border: a = !0,
944
- ...d
945
- }) {
946
- let s = {};
947
- const { pages: l = [] } = zt(), c = l.find((h) => h.id === d.link), m = !n || Jt.Children.toArray(n).every((h) => h === null);
948
- d.link && (s = {
949
- component: Ye,
950
- to: (c == null ? void 0 : c.path) || d.link,
951
- useRouterLink: !0
952
- });
953
- const p = xt();
954
- return /* @__PURE__ */ w(
955
- Je,
956
- {
957
- className: g("base-card card", { dark: o, "border-transparent": !a }, r),
958
- sx: {
959
- borderColor: p.palette.divider
960
- },
961
- ...s,
962
- ...S(d, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
963
- children: [
964
- t,
965
- !m && /* @__PURE__ */ i("div", { className: "card__body", children: n }),
966
- e
967
- ]
968
- }
969
- );
970
- }
971
- const Je = _(y)`
972
- &.base-card {
973
- text-align: left;
974
- border-width: 1px;
975
- border-style: solid;
976
- border-radius: 12px;
977
- overflow: hidden;
978
- &,
979
- &:hover {
980
- text-decoration: none;
981
- }
982
- }
983
- .card__body {
984
- padding: 15px 15px;
985
- }
986
- `;
987
- function D({
988
- align: t = "left",
989
- title: e,
990
- titleProps: n = {},
991
- description: r,
992
- descriptionProps: o = {}
993
- }) {
994
- return /* @__PURE__ */ w(J, { children: [
995
- e && /* @__PURE__ */ i(
996
- C,
997
- {
998
- className: g("card__title text-gray-800", "dark:text-gray-50"),
999
- component: "h5",
1000
- variant: "h5",
1001
- gutterBottom: !0,
1002
- align: t,
1003
- ...n,
1004
- children: e
1005
- }
1006
- ),
1007
- r && /* @__PURE__ */ i(
1008
- C,
1009
- {
1010
- className: g("card__description", "text-gray-500", "dark:text-gray-400"),
1011
- component: "div",
1012
- variant: "body1",
1013
- gutterBottom: !0,
1014
- align: t,
1015
- ...o,
1016
- children: r
1017
- }
1018
- )
1019
- ] });
1020
- }
1021
- function Me({
1022
- image: t,
1023
- title: e,
1024
- description: n,
1025
- imageProps: r = {},
1026
- imageMeta: o,
1027
- imageSize: a,
1028
- titleProps: d = {},
1029
- descriptionProps: s = {},
1030
- actions: l,
1031
- align: c,
1032
- ...m
1033
- }) {
1034
- const p = it(t), h = j(N(t), 540);
1035
- return /* @__PURE__ */ w(
1036
- Ke,
1037
- {
1038
- className: "card-article",
1039
- ...m,
1040
- prepend: /* @__PURE__ */ i("div", { className: "card__image__wrap", children: p && t ? /* @__PURE__ */ i(
1041
- y,
1042
- {
1043
- sx: {
1044
- position: "absolute",
1045
- left: 0,
1046
- top: 0,
1047
- right: 0,
1048
- bottom: 0,
1049
- display: "flex",
1050
- alignItems: "center",
1051
- justifyContent: "center"
1052
- },
1053
- children: /* @__PURE__ */ i(B, { icon: t, color: "primary.main" })
1054
- }
1055
- ) : h && /* @__PURE__ */ i(
1056
- "img",
1057
- {
1058
- className: "card__image",
1059
- src: h,
1060
- ...r,
1061
- alt: r.alt || (o == null ? void 0 : o.filename) || "card-image",
1062
- width: o == null ? void 0 : o.naturalWidth,
1063
- height: o == null ? void 0 : o.naturalHeight,
1064
- style: { width: "100%", height: "100%", objectFit: a || "cover", objectPosition: "center" },
1065
- loading: "lazy"
1066
- }
1067
- ) }),
1068
- children: [
1069
- e || n ? /* @__PURE__ */ i(
1070
- D,
1071
- {
1072
- align: c,
1073
- title: e,
1074
- titleProps: d,
1075
- description: n,
1076
- descriptionProps: s
1077
- }
1078
- ) : null,
1079
- l != null && l.length ? /* @__PURE__ */ i(z, { align: c, actions: l, className: "mt-4" }) : null
1080
- ]
1081
- }
1082
- );
1083
- }
1084
- const Ke = _(V)`
1085
- ${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
1086
- &:hover {
1087
- box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
1088
- }` : ""}
1089
-
1090
- .card__title {
1091
- color: ${({ theme: t }) => t.palette.text.primary};
1092
- a {
1093
- color: ${({ theme: t }) => t.palette.primary.main};
1094
- }
1095
- }
1096
- .card__description {
1097
- color: ${({ theme: t }) => t.palette.text.primary};
1098
- a {
1099
- color: ${({ theme: t }) => t.palette.primary.main};
1100
- }
1101
- }
1102
-
1103
- .card__image__wrap {
1104
- padding-top: 61.8%;
1105
- width: 100%;
1106
- position: relative;
1107
- }
1108
- .card__image {
1109
- position: absolute;
1110
- top: 0;
1111
- left: 0;
1112
- bottom: 0;
1113
- right: 0;
1114
- width: 100%;
1115
- height: 100%;
1116
- object-position: top center;
1117
- }
1118
- `, pt = "section";
1119
- function ut({
1120
- title: t,
1121
- image: e,
1122
- imageMeta: n,
1123
- description: r,
1124
- actions: o,
1125
- align: a,
1126
- listType: d = "",
1127
- className: s = "",
1128
- ...l
1129
- }) {
1130
- return /* @__PURE__ */ w(Ge, { className: g("card", `list-type-${d}`, s), align: a, ...l, children: [
1131
- e && /* @__PURE__ */ i(
1132
- B,
1133
- {
1134
- icon: e,
1135
- color: "primary.main",
1136
- size: d === "icon-title" ? "1.2rem" : "3rem",
1137
- imageMeta: n
1138
- }
1139
- ),
1140
- t || r ? /* @__PURE__ */ i(D, { align: a, title: t, description: r }) : null,
1141
- o != null && o.length ? /* @__PURE__ */ i(z, { align: a, actions: o, className: "mt-4" }) : null
1142
- ] });
1143
- }
1144
- const Ge = _(V)`
1145
- padding: 5vw 4vw;
1146
- box-sizing: border-box;
1147
- /* min-height: 320px; */
1148
- color: inherit !important;
1149
- border-radius: 0.5rem;
1150
- /* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
1151
- @media (max-width: ${({ theme: t }) => t.breakpoints.values[pt]}px) {
1152
- padding: 1.5rem 2rem;
1153
- }
1154
- @media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
1155
- height: auto;
1156
- min-height: unset;
1157
- }
1158
-
1159
- ${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
1160
- &:hover {
1161
- box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
1162
- }` : ""}
1163
-
1164
- .card__title {
1165
- font-weight: 700;
1166
- margin-top: 24px;
1167
- margin-bottom: 12px;
1168
- color: ${({ theme: t }) => t.palette.text.primary};
1169
- a {
1170
- color: ${({ theme: t }) => t.palette.primary.main};
1171
- }
1172
- }
1173
- .card__description {
1174
- color: ${({ theme: t }) => t.palette.text.primary};
1175
- a {
1176
- color: ${({ theme: t }) => t.palette.primary.main};
1177
- }
1178
- }
1179
- .card__body {
1180
- color: ${({ theme: t }) => t.palette.text.primary};
1181
- padding: 0;
1182
- ${({ align: t }) => `text-align:${t || "left"};`}
1183
- }
1184
-
1185
- &.list-type-icon-title {
1186
- padding: 1.2rem;
1187
- .title-line {
1188
- display: flex;
1189
- }
1190
- .card__title {
1191
- margin: 0;
1192
- font-size: 1em;
1193
- }
1194
- .css-icon {
1195
- margin-right: 0.5rem;
1196
- }
1197
- }
1198
-
1199
- @media (min-width: ${({ theme: t }) => t.breakpoints.values[pt]}px) {
1200
- padding: 2rem 2rem;
1201
- text-align: left;
1202
- box-sizing: border-box;
1203
- }
1204
- `;
1205
- function Xe({
1206
- image: t,
1207
- title: e,
1208
- description: n,
1209
- imageProps: r = {},
1210
- imageMeta: o,
1211
- imageSize: a,
1212
- titleProps: d = {},
1213
- descriptionProps: s = {},
1214
- actions: l,
1215
- align: c,
1216
- ...m
1217
- }) {
1218
- const p = it(t), h = j(N(t), 540);
1219
- return /* @__PURE__ */ w(
1220
- qe,
1221
- {
1222
- className: "card-article",
1223
- ...m,
1224
- prepend: /* @__PURE__ */ i("div", { className: "card__image__wrap", children: p && t ? /* @__PURE__ */ i(
1225
- y,
1226
- {
1227
- sx: {
1228
- position: "absolute",
1229
- left: 0,
1230
- top: 0,
1231
- right: 0,
1232
- bottom: 0,
1233
- display: "flex",
1234
- alignItems: "center",
1235
- justifyContent: "center"
1236
- },
1237
- children: /* @__PURE__ */ i(B, { icon: t, color: "primary.main" })
1238
- }
1239
- ) : h && /* @__PURE__ */ i(
1240
- y,
1241
- {
1242
- component: "img",
1243
- className: "card__image",
1244
- src: h,
1245
- ...r,
1246
- alt: r.alt || (o == null ? void 0 : o.filename) || "card-image",
1247
- width: o == null ? void 0 : o.naturalWidth,
1248
- height: o == null ? void 0 : o.naturalHeight,
1249
- style: { width: "100%", height: "100%", objectFit: a || "contain", objectPosition: "center" },
1250
- loading: "lazy"
1251
- }
1252
- ) }),
1253
- children: [
1254
- e || n ? /* @__PURE__ */ i(
1255
- D,
1256
- {
1257
- align: c,
1258
- title: e,
1259
- titleProps: d,
1260
- description: n,
1261
- descriptionProps: s
1262
- }
1263
- ) : null,
1264
- l != null && l.length ? /* @__PURE__ */ i(z, { align: c, actions: l, className: "mt-4" }) : null
1265
- ]
1266
- }
1267
- );
1268
- }
1269
- const qe = _(V)`
1270
- ${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
1271
- &:hover {
1272
- box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
1273
- }` : ""}
1274
-
1275
- border-radius: 0 !important;
1276
-
1277
- .card__body {
1278
- ${({ align: t }) => `text-align:${t || "left"};`}
1279
- }
1280
-
1281
- .card__image__wrap {
1282
- width: 100%;
1283
- height: 100%;
1284
- position: relative;
1285
- display: flex;
1286
- justify-content: center;
1287
- align-items: center;
1288
- }
1289
-
1290
- .card__image {
1291
- max-height: 60px;
1292
- }
1293
- `, ht = "section";
1294
- function Qe({
1295
- title: t,
1296
- image: e,
1297
- imageMeta: n,
1298
- iconSize: r = 100,
1299
- description: o,
1300
- actions: a,
1301
- align: d,
1302
- className: s = "",
1303
- ...l
1304
- }) {
1305
- return /* @__PURE__ */ i(Ze, { className: g("card", s), ...l, children: /* @__PURE__ */ w(y, { className: "flex items-center", children: [
1306
- e && /* @__PURE__ */ i(B, { icon: e, color: "primary.main", size: r, imageMeta: n }),
1307
- /* @__PURE__ */ w(y, { className: "flex-1 ml-4", children: [
1308
- /* @__PURE__ */ i(D, { align: d, title: t, description: o }),
1309
- /* @__PURE__ */ i(z, { align: d, actions: a, className: "mt-4" })
1310
- ] })
1311
- ] }) });
1312
- }
1313
- const Ze = _(V)`
1314
- padding: 5vw 4vw;
1315
- text-align: left;
1316
- box-sizing: border-box;
1317
- /* min-height: 320px; */
1318
- color: inherit !important;
1319
- border-radius: 0.5rem;
1320
- /* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
1321
- @media (max-width: ${({ theme: t }) => t.breakpoints.values[ht]}px) {
1322
- padding: 1.5rem 2rem;
1323
- }
1324
- @media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
1325
- height: auto;
1326
- min-height: unset;
1327
- }
1328
-
1329
- ${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
1330
- &:hover {
1331
- box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
1332
- }` : ""}
1333
-
1334
- .card__title {
1335
- font-weight: 700;
1336
- margin-bottom: 12px;
1337
- color: ${({ theme: t }) => t.palette.text.primary};
1338
- a {
1339
- color: ${({ theme: t }) => t.palette.primary.main};
1340
- }
1341
- }
1342
- .card__description {
1343
- color: ${({ theme: t }) => t.palette.text.primary};
1344
- a {
1345
- color: ${({ theme: t }) => t.palette.primary.main};
1346
- }
1347
- }
1348
- .card__body {
1349
- padding: 0;
1350
- }
1351
-
1352
- &.list-type-icon-title {
1353
- padding: 1.2rem;
1354
- .title-line {
1355
- display: flex;
1356
- }
1357
- .card__title {
1358
- margin: 0;
1359
- font-size: 1em;
1360
- }
1361
- .css-icon {
1362
- margin-right: 0.5rem;
1363
- }
1364
- }
1365
-
1366
- @media (min-width: ${({ theme: t }) => t.breakpoints.values[ht]}px) {
1367
- padding: 2rem 2rem;
1368
- text-align: left;
1369
- box-sizing: border-box;
1370
- }
1371
- `;
1372
- function to({
1373
- title: t,
1374
- titleProps: e = {},
1375
- description: n,
1376
- descriptionProps: r = {},
1377
- image: o,
1378
- imageMeta: a,
1379
- className: d = "",
1380
- align: s,
1381
- hoverStyle: l,
1382
- ...c
1383
- }) {
1384
- return /* @__PURE__ */ w(eo, { className: g("card-simple", d, `hover-style__${l}`), align: s, ...c, children: [
1385
- o && /* @__PURE__ */ i(B, { icon: o, color: "primary.main", imageMeta: a }),
1386
- t || n ? /* @__PURE__ */ i(
1387
- D,
1388
- {
1389
- align: s,
1390
- title: t,
1391
- titleProps: e,
1392
- description: n,
1393
- descriptionProps: r
1394
- }
1395
- ) : null
1396
- ] });
1397
- }
1398
- const eo = _(V)`
1399
- .card__title {
1400
- color: ${({ theme: t }) => t.palette.text.primary};
1401
- a {
1402
- color: ${({ theme: t }) => t.palette.primary.main};
1403
- }
1404
- }
1405
- .card__description {
1406
- color: ${({ theme: t }) => t.palette.text.primary};
1407
- a {
1408
- color: ${({ theme: t }) => t.palette.primary.main};
1409
- }
1410
- }
1411
-
1412
- &.hover-style__default {
1413
- &.card-simple {
1414
- &:hover {
1415
- border-top-right-radius: 36px;
1416
- }
1417
- }
1418
- .card__body {
1419
- &:hover {
1420
- &::before {
1421
- width: 42px;
1422
- height: 42px;
1423
- transform: translate(50%, -50%) rotate(45deg);
1424
- }
1425
- &::after {
1426
- transform: none;
1427
- }
1428
- }
1429
- }
1430
- }
1431
-
1432
- &.card-simple {
1433
- border-radius: 8px;
1434
- border-top-right-radius: 26px;
1435
-
1436
- .card__body {
1437
- ${({ align: t }) => `text-align:${t || "left"};`}
1438
- }
1439
-
1440
- ${(t) => t.link ? `
1441
- cursor: pointer;
1442
- ` : ""}
1443
- /* cursor: pointer; */
1444
- /* &:hover {
1445
- border-top-right-radius: 36px;
1446
- } */
1447
- transition: all 180ms ease 0s;
1448
- overflow: visible;
1449
- .card__title {
1450
- margin: 12px 0;
1451
- }
1452
- .card__body {
1453
- position: relative;
1454
- padding: 20px 16px 18px;
1455
- overflow: hidden;
1456
- transition: all 180ms ease 0s;
1457
- /* &:hover {
1458
- &::before {
1459
- width: 42px;
1460
- height: 42px;
1461
- transform: translate(50%, -50%) rotate(45deg);
1462
- }
1463
- &::after {
1464
- transform: none;
1465
- }
1466
- } */
1467
- &::before,
1468
- &::after {
1469
- content: ${({ border: t }) => t ? '""' : ""};
1470
- transition: inherit;
1471
- position: absolute;
1472
- top: 0px;
1473
- right: 0px;
1474
- }
1475
- &::before {
1476
- z-index: 3;
1477
- background: #fff;
1478
- width: 30px;
1479
- height: 30px;
1480
- transform: translate(50%, -50%) rotate(45deg);
1481
- box-shadow: 0 1px 0 0 #e9eaec;
1482
- }
1483
- &::after {
1484
- z-index: 2;
1485
- width: 28px;
1486
- height: 28px;
1487
- border-bottom-left-radius: 6px;
1488
- background: #fcfcfd;
1489
- box-shadow: -1px 1px 0 0 #e9eaec;
1490
- transform: translate(8px, -8px);
1491
- }
1492
- }
1493
- }
1494
- `;
1495
- function oo({ type: t = "default", ...e }) {
1496
- const r = {
1497
- article: Me,
1498
- simple: to,
1499
- news: Qe,
1500
- default: ut,
1501
- wall: Xe
1502
- }[t] || ut;
1503
- return /* @__PURE__ */ i(r, { ...t === "news" ? e : S(e, "iconSize") });
1504
- }
1505
- function ro({
1506
- list: t = [],
1507
- align: e = "top",
1508
- cards: n,
1509
- listBorder: r = !0,
1510
- listType: o = "",
1511
- col: a = 3,
1512
- gap: d,
1513
- iconColor: s,
1514
- className: l = "",
1515
- type: c = "default",
1516
- dark: m = !1,
1517
- textAlign: p = "left",
1518
- hoverStyle: h,
1519
- ...u
1520
- }) {
1521
- return /* @__PURE__ */ i(
1522
- nt,
1523
- {
1524
- type: c,
1525
- className: g("card-list py-1", l, "items-stretch"),
1526
- col: a,
1527
- gap: d,
1528
- align: e,
1529
- ...u,
1530
- children: n || t.map((f) => /* @__PURE__ */ i(
1531
- oo,
1532
- {
1533
- borderColor: r,
1534
- iconColor: s,
1535
- type: c,
1536
- listType: o,
1537
- dark: m,
1538
- ...f,
1539
- align: p,
1540
- style: d === 0 && t.length > 1 ? {
1541
- borderRadius: 0,
1542
- marginRight: "-1px",
1543
- marginBottom: "-1px"
1544
- } : {}
1545
- },
1546
- f.id
1547
- ))
1548
- }
1549
- );
1550
- }
1551
- const no = [
1552
- "align",
1553
- "cards",
1554
- "list",
1555
- "listBorder",
1556
- "listType",
1557
- "col",
1558
- "gap",
1559
- "iconColor",
1560
- "type",
1561
- "textAlign"
1562
- ], io = _(F)`
1563
- a .card {
1564
- color: #404040;
1565
- cursor: pointer;
1566
- }
1567
- a:not(.MuiButton-root) {
1568
- color: ${({ theme: t }) => t.palette.primary.main};
1569
- &:hover,
1570
- &:active {
1571
- color: ${({ theme: t }) => t.palette.primary.main};
1572
- }
1573
- }
1574
- a:hover .card {
1575
- color: #404040;
1576
- }
1577
- `;
1578
- function ao({ className: t, ...e }) {
1579
- const [n, r] = $(e, A), [o, a] = $(r, no);
1580
- return /* @__PURE__ */ w(io, { className: g("section--card-list", t), type: e.type, ...a, children: [
1581
- Object.keys(n).length > 0 && /* @__PURE__ */ i(O, { center: !0, ...n, className: "mb-[2.5vw]" }),
1582
- /* @__PURE__ */ i(ro, { ...o, dark: !!e.dark })
1583
- ] });
1584
- }
1585
- const so = _(ao)`
1586
- .card__description {
1587
- white-space: pre-wrap;
1588
- }
1589
- .section__description {
1590
- }
1591
- .card {
1592
- /* background: inherit !important; */
1593
- }
1594
- &.dark .card-simple .card__body::before {
1595
- background: #212121 !important;
1596
- }
1597
- .card-simple .card__body::after {
1598
- background: inherit !important;
1599
- }
1600
- `;
1601
- function lo({ section: t, ...e }) {
1602
- const [{ editing: n }, r] = $(e, U), o = W(() => {
1603
- var a;
1604
- return {
1605
- ...S(r, ["listBorder", "list", "iconSize", "imageSize"]),
1606
- list: (a = r.list) == null ? void 0 : a.map((d) => {
1607
- var s, l;
1608
- return {
1609
- ...S(d, "icon", "iconColor"),
1610
- image: ["news", "simple", "default"].includes(r.type) && d.icon ? d.icon : d.image,
1611
- actions: (l = (s = d.actions) == null ? void 0 : s.map) == null ? void 0 : l.call(s, (c) => /* @__PURE__ */ i(Lt, { ...c, editing: n }, c.id)),
1612
- border: r.listBorder,
1613
- iconSize: r.iconSize,
1614
- imageSize: r.imageSize,
1615
- hoverStyle: r.hoverStyle
1616
- };
1617
- })
1618
- };
1619
- }, [r]);
1620
- return /* @__PURE__ */ i(so, { style: n ? { pointerEvents: "none" } : {}, ...o });
1621
- }
1622
- function co({
1623
- properties: t,
1624
- section: e,
1625
- locale: n,
1626
- dev: r
1627
- }) {
1628
- var o;
1629
- return (o = e == null ? void 0 : e.config) != null && o.componentId ? /* @__PURE__ */ i(
1630
- te,
1631
- {
1632
- instanceId: e.id,
1633
- componentId: e.config.componentId,
1634
- blockletId: e.config.blockletId,
1635
- blockletTitle: e.config.blockletTitle,
1636
- componentName: e.config.componentName,
1637
- locale: n,
1638
- properties: t,
1639
- dev: r
1640
- }
1641
- ) : /* @__PURE__ */ i(y, { textAlign: "center", py: 2, children: /* @__PURE__ */ i(C, { variant: "caption", color: "text.secondary", children: "Please select component to render" }) });
1642
- }
1643
- function mo({
1644
- src: t,
1645
- dataId: e,
1646
- isEdit: n = !1,
1647
- height: r = "100%",
1648
- onLoad: o = () => {
1649
- }
1650
- }) {
1651
- return /* @__PURE__ */ i(
1652
- ue,
1653
- {
1654
- isEdit: n,
1655
- embedId: e,
1656
- src: t,
1657
- height: r,
1658
- onLoad: () => {
1659
- o();
1660
- }
1661
- }
1662
- );
1663
- }
1664
- function po({ dataId: t, src: e, actions: n, center: r, onLoad: o, ...a }) {
1665
- const [d, s] = $(a, A);
1666
- return /* @__PURE__ */ w(F, { ...s, children: [
1667
- Object.keys(d).length > 0 && /* @__PURE__ */ i(O, { center: r, ...d }),
1668
- /* @__PURE__ */ i(
1669
- mo,
1670
- {
1671
- dataId: t,
1672
- src: e,
1673
- onLoad: o,
1674
- height: a.iframeHeight ? `${a.iframeHeight}px` : "100%"
1675
- }
1676
- ),
1677
- /* @__PURE__ */ i(z, { actions: n, center: r })
1678
- ] });
1679
- }
1680
- const mr = {
1681
- src: "",
1682
- embedUrl: "",
1683
- title: "",
1684
- description: "",
1685
- dark: !1,
1686
- background: "",
1687
- center: !0,
1688
- config: {},
1689
- id: ""
1690
- };
1691
- function uo({ section: t, id: e, src: n, ...r }) {
1692
- const o = `${e}-${r.locale}`, [{ editing: a }, d] = $(r, U), s = tt({}), l = JSON.parse(JSON.stringify(d)), { message: c } = de(o, "server"), m = me(JSON.parse(JSON.stringify(d.config) || "{}"));
1693
- return E(() => {
1694
- c && c.onInit(() => m.current);
1695
- }, [c]), E(() => {
1696
- const p = JSON.parse(JSON.stringify(d.config) || "{}");
1697
- pe(s.current, p) || (s.current = p, c == null || c.send("config-set", p));
1698
- }, [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' });
1699
- }
1700
- const ho = _("div")`
1701
- user-select: none;
1702
- color: #999;
1703
- padding: 8px;
1704
- height: 200px;
1705
- `, fo = [
1706
- /youtu\.be\/([^#&?]{11})/,
1707
- // youtu.be/<id>
1708
- /\?v=([^#&?]{11})/,
1709
- // ?v=<id>
1710
- /&v=([^#&?]{11})/,
1711
- // &v=<id>
1712
- /embed\/([^#&?]{11})/,
1713
- // embed/<id>
1714
- /\/v\/([^#&?]{11})/
1715
- // /v/<id>
1716
- ];
1717
- function go(t) {
1718
- var e;
1719
- if (/youtu\.?be/.test(t))
1720
- for (const n of fo) {
1721
- const r = (e = n.exec(t)) == null ? void 0 : e[1];
1722
- if (r)
1723
- return r;
1724
- }
1725
- }
1726
- function xo(t) {
1727
- const e = go(t);
1728
- if (e)
1729
- return `https://youtube.com/embed/${e}`;
1730
- }
1731
- function yo({ src: t }) {
1732
- return E(() => {
1733
- import("@lottiefiles/lottie-player");
1734
- }, []), /* @__PURE__ */ i("lottie-player", { autoplay: !0, loop: !0, mode: "normal", src: t });
1735
- }
1736
- function bo(t) {
1737
- return /* @__PURE__ */ i(y, { maxHeight: 400, overflow: "hidden auto", children: /* @__PURE__ */ i(he, { ...t }) });
1738
- }
1739
- function wo({ url: t }) {
1740
- const e = tt(null), n = 495, [r, o] = K(
1741
- e.current ? e.current.offsetWidth * 0.5625 : n
1742
- ), a = M(() => {
1743
- 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;
1744
- return o(Math.floor(s * d));
1745
- }, []);
1746
- return E(() => {
1747
- window.addEventListener("resize", a);
1748
- 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;
1749
- return o(Math.floor(s * d)), function() {
1750
- window.removeEventListener("resize", a);
1751
- };
1752
- }, [r, a]), /* @__PURE__ */ i(
1753
- y,
1754
- {
1755
- component: "iframe",
1756
- ref: e,
1757
- title: "youtube",
1758
- width: "100%",
1759
- height: `${r}px`,
1760
- src: t,
1761
- frameBorder: "0",
1762
- allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
1763
- allowFullScreen: !0,
1764
- sx: { display: "block" }
1765
- }
1766
- );
1767
- }
1768
- const pr = {
1769
- image: "https://www.arcblock.io/static/ead0cabde7f2b7ff34db8f3e8ceca271/afc4b/builder.png",
1770
- badge: "Develop · Deploy · Run",
1771
- title: "The Future is Here: Blockchain and Decentralized Application Development",
1772
- description: "ArcBlock, your exclusive new decentralized development platform, makes developing decentralized applications, blockchain, and distributed ledger technology straightforward.",
1773
- reverse: !1,
1774
- dark: !1,
1775
- background: "",
1776
- actions: void 0,
1777
- hasImage: !0,
1778
- center: !1
1779
- }, vo = _(Te)`
1780
- .section__description {
1781
- }
1782
- `;
1783
- function ko({
1784
- hasImage: t,
1785
- fullSizeImage: e,
1786
- boxed: n,
1787
- videoPoster: r,
1788
- imageMeta: o,
1789
- imageOptimization: a,
1790
- imageSize: d,
1791
- section: s,
1792
- ...l
1793
- }) {
1794
- var u, f;
1795
- const [{ editing: c }, m] = $({ ...l, boxed: e ? void 0 : n }, U);
1796
- let p = _o(m.image, r, e, o, a, d);
1797
- t || (p = null);
1798
- let h = null;
1799
- return m.actions && (h = (f = (u = m.actions) == null ? void 0 : u.map) == null ? void 0 : f.call(u, (b, x) => /* @__PURE__ */ i(Lt, { ...b, editing: c }, x))), /* @__PURE__ */ i(
1800
- vo,
1801
- {
1802
- ...m,
1803
- style: c ? { pointerEvents: "none" } : {},
1804
- image: p,
1805
- fullSizeImage: t && e,
1806
- actions: h
1807
- }
1808
- );
1809
- }
1810
- function _o(t, e, n, r, o, a) {
1811
- if (t) {
1812
- if (t.endsWith(".json"))
1813
- return /* @__PURE__ */ i(yo, { src: t });
1814
- if (t.indexOf("twitter.com") !== -1)
1815
- return /* @__PURE__ */ i(bo, { sourceType: "url", url: t });
1816
- const d = xo(t);
1817
- if (d)
1818
- return /* @__PURE__ */ i(wo, { url: d });
1819
- const { naturalWidth: s, naturalHeight: l, filename: c } = r || {};
1820
- if (L(t))
1821
- return /* @__PURE__ */ i(
1822
- "video",
1823
- {
1824
- width: s && `${s}px`,
1825
- height: l && `${l}px`,
1826
- controls: !0,
1827
- autoPlay: !0,
1828
- muted: !0,
1829
- style: {
1830
- display: "block",
1831
- objectFit: a || "contain",
1832
- borderRadius: "8px",
1833
- width: "100%",
1834
- height: "100%"
1835
- },
1836
- poster: j(N(e), n ? 1200 : 540, o),
1837
- children: /* @__PURE__ */ i("source", { src: N(t), type: We(t) })
1838
- },
1839
- t
1840
- );
1841
- const m = o === "quality" ? 1 : 0.6;
1842
- return /* @__PURE__ */ i(
1843
- _t,
1844
- {
1845
- src: N(t),
1846
- sizesAttr: {
1847
- sm: 600 * m,
1848
- md: 450 * m,
1849
- lg: 540 * m,
1850
- ...n && {
1851
- md: 900 * m,
1852
- lg: 1200 * m
1853
- }
1854
- },
1855
- width: s && `${s}px`,
1856
- height: l && `${l}px`,
1857
- alt: c ?? t,
1858
- style: { objectFit: a || "contain", display: "block", width: "100%", height: "100%" },
1859
- loading: "lazy"
1860
- }
1861
- );
1862
- }
1863
- return null;
1864
- }
1865
- const ur = ["production", "draft"];
1866
- function hr({ mode: t, version: e } = {}) {
1867
- const n = e && typeof e == "number" ? { mode: t, version: e } : { mode: t };
1868
- return et.get(`/api/${ot()}/pages`, { params: n }).then((r) => r.data);
1869
- }
1870
- function fr({ mode: t, routes: e }) {
1871
- return et.post(`/api/${ot()}/pages/publish`, { mode: t, routes: e }).then((n) => n.data);
1872
- }
1873
- function $o({
1874
- locale: t,
1875
- sort: e,
1876
- page: n,
1877
- limit: r,
1878
- mode: o
1879
- } = {}) {
1880
- return et.get(`/api/${ot()}/pages/toc`, { params: { locale: t, sort: e, page: n, limit: r, mode: o } }).then((a) => a.data);
1881
- }
1882
- const gr = {
1883
- style: "list",
1884
- sort: "-updatedAt"
1885
- }, ft = 20;
1886
- function No({ style: t, sort: e, section: n, ...r }) {
1887
- const [{ editing: o, locale: a }, d] = $(r, U), [s, l] = $(d, A), [c, m] = K(), p = tt(!1), h = fe(), u = ae(), f = M(async () => {
1888
- if (!p.current) {
1889
- p.current = !0, h();
1890
- try {
1891
- const b = c ? Math.floor(c.list.length / ft) + 1 : 1, { list: x, total: k } = await $o({ locale: a, sort: e, page: b, limit: ft });
1892
- m((v) => ({
1893
- list: ((v == null ? void 0 : v.list) ?? []).concat(x),
1894
- total: k
1895
- }));
1896
- } finally {
1897
- p.current = !1, h();
1898
- }
1899
- }
1900
- }, [c, a, e, h]);
1901
- return ge(() => {
1902
- f();
1903
- }), /* @__PURE__ */ w(F, { ...l, sx: o ? { pointerEvents: "none" } : {}, children: [
1904
- Object.keys(s).length > 0 && /* @__PURE__ */ i(O, { ...s }),
1905
- c ? /* @__PURE__ */ w(J, { children: [
1906
- /* @__PURE__ */ i(st, { container: !0, spacing: 2, justifyContent: "center", children: c == null ? void 0 : c.list.map((b) => /* @__PURE__ */ i(st, { item: !0, xs: 12, sm: t === "card" ? 6 : 12, md: t === "card" ? 3 : 12, children: /* @__PURE__ */ w(
1907
- So,
1908
- {
1909
- elevation: 0,
1910
- className: g(t === "card" && "style-card"),
1911
- onClick: o ? void 0 : () => u(b.slug),
1912
- children: [
1913
- !!b.image && /* @__PURE__ */ i(
1914
- Ht,
1915
- {
1916
- component: "img",
1917
- alt: "",
1918
- image: j(N(b.image), 540),
1919
- loading: "lazy"
1920
- }
1921
- ),
1922
- /* @__PURE__ */ w(Yt, { children: [
1923
- /* @__PURE__ */ i(C, { variant: "h6", component: "div", className: gt, children: b.title || b.id }),
1924
- /* @__PURE__ */ i(C, { variant: "body2", className: gt, children: b.description })
1925
- ] })
1926
- ]
1927
- }
1928
- ) }, b.id)) }),
1929
- /* @__PURE__ */ i(y, { textAlign: "center", mt: 2, children: c.total > c.list.length ? /* @__PURE__ */ i(T, { variant: "outlined", color: "secondary", onClick: f, loading: p.current, children: "More" }) : /* @__PURE__ */ i(T, { variant: "outlined", color: "secondary", disabled: !0, children: "No More" }) })
1930
- ] }) : /* @__PURE__ */ i(y, { p: 2, textAlign: "center", children: /* @__PURE__ */ i(Dt, { size: 24 }) })
1931
- ] });
1932
- }
1933
- const gt = q`
1934
- display: -webkit-box;
1935
- -webkit-box-orient: vertical;
1936
- -webkit-line-clamp: 2;
1937
- overflow: hidden;
1938
- text-overflow: ellipsis;
1939
- `, So = _(Vt)`
1940
- border: 1px solid #e0e0e0;
1941
- background-color: transparent;
1942
- cursor: pointer;
1943
- display: flex;
1944
- color: inherit;
1945
-
1946
- > .MuiCardMedia-root {
1947
- width: 30vw;
1948
- max-height: 50vw;
1949
- }
1950
-
1951
- &.style-card {
1952
- display: block;
1953
-
1954
- > .MuiCardMedia-root {
1955
- width: 100%;
1956
- max-height: 50vw;
1957
- }
1958
- }
1959
- `, Co = {
1960
- iframe: uo,
1961
- section: ko,
1962
- "section-card-list": lo,
1963
- toc: No,
1964
- "ai-runtime": Ae,
1965
- "custom-component": co
1966
- };
1967
- function xr({ id: t, type: e, mode: n, config: r, section: o, ...a }) {
1968
- const d = Co[e], { getPageMetaStyle: s } = Se(), l = W(() => {
1969
- const { height: p, ...h } = r;
1970
- return h;
1971
- }, [r]), c = W(() => {
1972
- const p = {};
1973
- return e !== "custom-component" && (p.height = r.height), p.sx = s("sx"), p;
1974
- }, [r.height, e, s]), m = d && /* @__PURE__ */ i(d, { mode: n, ...l, id: t, section: o });
1975
- return /* @__PURE__ */ i(Ee, { ...a, ...c, children: m });
1976
- }
1977
- function yr(t) {
1978
- return t != null;
1979
- }
1980
- export {
1981
- Lt as A,
1982
- xr as B,
1983
- Wt as I,
1984
- cr as P,
1985
- ur as S,
1986
- gr as T,
1987
- lr as a,
1988
- pr as b,
1989
- mr as c,
1990
- hr as g,
1991
- yr as n,
1992
- fr as p
1993
- };