@blocklet/list 0.16.35 → 0.16.37

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 (2) hide show
  1. package/lib/index.es.js +587 -536
  2. package/package.json +3 -3
package/lib/index.es.js CHANGED
@@ -1,75 +1,75 @@
1
1
  import { jsx as t, jsxs as h, Fragment as M } from "react/jsx-runtime";
2
- import { styled as X, useTheme as xe } from "@arcblock/ux/lib/Theme";
3
- import Je from "@mui/material/styles/createTheme";
4
- import et from "@mui/material/styles/ThemeProvider";
5
- import { pick as tt, omitBy as le, orderBy as rt, isEmpty as ot, merge as nt } from "lodash-es";
6
- import { ErrorFallback as ye } from "@arcblock/ux/lib/ErrorBoundary";
2
+ import { styled as Q, useTheme as we } from "@arcblock/ux/lib/Theme";
3
+ import et from "@mui/material/styles/createTheme";
4
+ import tt from "@mui/material/styles/ThemeProvider";
5
+ import { pick as rt, omitBy as se, orderBy as ot, isEmpty as nt, merge as it } from "lodash-es";
6
+ import { ErrorFallback as be } from "@arcblock/ux/lib/ErrorBoundary";
7
7
  import y from "@mui/material/Box";
8
8
  import F from "@mui/material/Stack";
9
- import { ErrorBoundary as it } from "react-error-boundary";
10
- import lt from "@iconify-icons/tabler/compass";
11
- import { Icon as K } from "@iconify/react";
12
- import we from "@mui/icons-material/Close";
13
- import b from "@mui/material/Typography";
14
- import { createContext as Le, useState as E, useMemo as j, useContext as Oe, useCallback as me, useEffect as H, forwardRef as at, useRef as fe, memo as st } from "react";
15
- import { createAxios as _e } from "@blocklet/js-sdk";
16
- import { useRequest as re, useDebounceFn as Me, useInfiniteScroll as ct, useReactive as dt } from "ahooks";
9
+ import { createContext as _e, useState as E, useMemo as V, useContext as Me, useCallback as ge, useEffect as G, forwardRef as lt, useRef as re, memo as at } from "react";
10
+ import { ErrorBoundary as st } from "react-error-boundary";
11
+ import ct from "@iconify-icons/tabler/compass";
12
+ import { Icon as X } from "@iconify/react";
13
+ import ke from "@mui/icons-material/Close";
14
+ import v from "@mui/material/Typography";
15
+ import { createAxios as ze } from "@blocklet/js-sdk";
16
+ import { useRequest as ne, useDebounceFn as De, useInfiniteScroll as dt, useReactive as ut } from "ahooks";
17
17
  import "color";
18
- import { parseURL as ut, parseQuery as ht, parseFilename as pt, stringifyParsedURL as mt, withQuery as be, joinURL as Se } from "ufo";
19
- import Ie from "flat";
20
- import oe from "@mui/material/Button";
21
- import ft from "@mui/material/styles/useTheme";
22
- import $ from "@mui/material/useMediaQuery";
23
- import gt from "@mui/material/Drawer";
24
- import ze from "@mui/material/Checkbox";
25
- import De from "@mui/material/FormControlLabel";
26
- import xt from "@mui/icons-material/Check";
27
- import yt from "@mui/icons-material/KeyboardArrowDown";
28
- import wt from "@mui/material/ClickAwayListener";
29
- import bt from "@mui/material/Grow";
30
- import Ne from "@mui/material/MenuItem";
31
- import We from "@mui/material/MenuList";
32
- import kt from "@mui/material/Paper";
33
- import vt from "@mui/material/Popper";
34
- import Ct from "@mui/material/SvgIcon";
35
- import ne from "@mui/material/CircularProgress";
36
- import $e from "@arcblock/ux/lib/Avatar";
37
- import St from "@iconify-icons/tabler/cloud-download";
38
- import It from "@mui/icons-material/ChevronLeft";
39
- import Bt from "@mui/icons-material/ChevronRight";
18
+ import { parseURL as ht, parseQuery as pt, parseFilename as mt, stringifyParsedURL as ft, withQuery as ve, joinURL as Be } from "ufo";
19
+ import Re from "flat";
20
+ import ie from "@mui/material/Button";
21
+ import gt from "@mui/material/styles/useTheme";
22
+ import U from "@mui/material/useMediaQuery";
23
+ import xt from "@mui/material/Drawer";
24
+ import Ne from "@mui/material/Checkbox";
25
+ import We from "@mui/material/FormControlLabel";
26
+ import yt from "@mui/icons-material/Check";
27
+ import wt from "@mui/icons-material/KeyboardArrowDown";
28
+ import bt from "@mui/material/ClickAwayListener";
29
+ import kt from "@mui/material/Grow";
30
+ import $e from "@mui/material/MenuItem";
31
+ import je from "@mui/material/MenuList";
32
+ import vt from "@mui/material/Paper";
33
+ import Ct from "@mui/material/Popper";
34
+ import St from "@mui/material/SvgIcon";
35
+ import le from "@mui/material/CircularProgress";
36
+ import He from "@arcblock/ux/lib/Avatar";
37
+ import It from "@iconify-icons/tabler/cloud-download";
38
+ import Bt from "@mui/icons-material/ChevronLeft";
39
+ import Rt from "@mui/icons-material/ChevronRight";
40
40
  import O from "@mui/material/Skeleton";
41
- import Rt from "react-image-gallery";
41
+ import Tt from "react-image-gallery";
42
42
  import "react-image-gallery/styles/css/image-gallery.css";
43
- import Be from "@mui/material/Grid";
44
- import Tt from "react-infinite-scroll-hook";
45
- import Pt from "@iconify-icons/tabler/square";
46
- import At from "@iconify-icons/tabler/square-check-filled";
47
- import Re from "@mui/material/Chip";
48
- import ee from "@mui/icons-material/Search";
49
- import Et from "@mui/material/Autocomplete";
50
- import Ft from "@mui/material/Dialog";
51
- import je from "@mui/material/OutlinedInput";
52
- import Lt from "@mui/material/TextField";
53
- import { useHotkeys as Ot } from "react-hotkeys-hook";
54
- import Te from "@mui/material/InputAdornment";
55
- import _t from "@arcblock/ux/lib/Empty";
56
- import Mt from "json-stable-stringify";
57
- import zt from "@mui/icons-material/Menu";
58
- import { Card as Dt, Box as ae, Skeleton as L } from "@mui/material";
59
- import Nt from "@arcblock/ux/lib/Img";
60
- const He = Le({
43
+ import Te from "@mui/material/Grid";
44
+ import Pt from "react-infinite-scroll-hook";
45
+ import At from "@iconify-icons/tabler/square";
46
+ import Et from "@iconify-icons/tabler/square-check-filled";
47
+ import Pe from "@mui/material/Chip";
48
+ import te from "@mui/icons-material/Search";
49
+ import Ft from "@mui/material/Autocomplete";
50
+ import Lt from "@mui/material/Dialog";
51
+ import Ue from "@mui/material/OutlinedInput";
52
+ import Ot from "@mui/material/TextField";
53
+ import { useHotkeys as _t } from "react-hotkeys-hook";
54
+ import Ae from "@mui/material/InputAdornment";
55
+ import Mt from "@arcblock/ux/lib/Empty";
56
+ import zt from "json-stable-stringify";
57
+ import Dt from "@mui/icons-material/Menu";
58
+ import { Card as Nt, Box as ce, Skeleton as L } from "@mui/material";
59
+ import Wt from "@arcblock/ux/lib/Img";
60
+ const Ve = _e({
61
61
  open: !1,
62
62
  toggleOpen: (e) => {
63
63
  }
64
64
  });
65
- function Wt({ children: e }) {
66
- const [r, o] = E(!1), n = (s) => {
67
- o(s ?? !s);
68
- }, l = j(() => ({ open: r, toggleOpen: n }), [r]);
69
- return /* @__PURE__ */ t(He.Provider, { value: l, children: e });
65
+ function $t({ children: e }) {
66
+ const [r, o] = E(!1), n = (a) => {
67
+ o(a ?? !a);
68
+ }, l = V(() => ({ open: r, toggleOpen: n }), [r]);
69
+ return /* @__PURE__ */ t(Ve.Provider, { value: l, children: e });
70
70
  }
71
- function ke() {
72
- return Oe(He);
71
+ function Ce() {
72
+ return Me(Ve);
73
73
  }
74
74
  const P = {
75
75
  nameAsc: "title",
@@ -85,19 +85,19 @@ const P = {
85
85
  explorePath: "/api/blocklets/explore",
86
86
  exploreDidsPath: "/api/blocklets/dids",
87
87
  cacheSize: 100
88
- }, $t = (e) => re(
88
+ }, jt = (e) => ne(
89
89
  async () => {
90
90
  const { data: r } = await e.get(P.categoriesPath);
91
91
  return Array.isArray(r) ? r : [];
92
92
  },
93
93
  { manual: !0 }
94
94
  );
95
- function jt(e, r) {
95
+ function Ht(e, r) {
96
96
  const o = e.menu ? {
97
97
  sortBy: "popularity",
98
98
  sortDirection: "desc",
99
99
  showResources: "true",
100
- ...tt(e, ["sortBy", "sortDirection", "showResources"])
100
+ ...rt(e, ["sortBy", "sortDirection", "showResources"])
101
101
  } : {
102
102
  sortBy: "popularity",
103
103
  sortDirection: "desc",
@@ -109,49 +109,49 @@ function jt(e, r) {
109
109
  onSearchSelect: l = (i) => {
110
110
  r.onFilterChange({ ...o, keyword: i.title });
111
111
  },
112
- emptyCategory: s
112
+ emptyCategory: a
113
113
  } = r;
114
- !o.category && !s && (o.category = "All");
115
- const a = (i) => {
116
- const u = { ...o, ...i };
117
- n(le(u, (d) => d === "" || d === void 0));
114
+ !o.category && !a && (o.category = "All");
115
+ const s = (i) => {
116
+ const m = { ...o, ...i };
117
+ n(se(m, (d) => d === "" || d === void 0));
118
118
  };
119
119
  return {
120
120
  filters: e,
121
121
  cleanFilter: (i) => {
122
- const u = i ? le(o, (d, x) => i.includes(x)) : {};
123
- n(le(u, (d) => d === "" || d === void 0));
122
+ const m = i ? se(o, (d, f) => i.includes(f)) : {};
123
+ n(se(m, (d) => d === "" || d === void 0));
124
124
  },
125
125
  handleActiveMenu: (i) => {
126
126
  i !== e.menu && n({ menu: i });
127
127
  },
128
- handleSort: (i, u) => {
129
- a({ sortBy: i, sortDirection: u || i === "nameAsc" ? "asc" : "desc" });
128
+ handleSort: (i, m) => {
129
+ s({ sortBy: i, sortDirection: m || i === "nameAsc" ? "asc" : "desc" });
130
130
  },
131
131
  handleKeyword: (i) => {
132
- a({ category: void 0, keyword: i || void 0 });
132
+ s({ category: void 0, keyword: i || void 0 });
133
133
  },
134
134
  handlePrice: (i) => {
135
- a({ price: i === e.price ? void 0 : i });
135
+ s({ price: i === e.price ? void 0 : i });
136
136
  },
137
137
  handleCategory: (i) => {
138
- a({ category: i === e.category ? "" : i });
138
+ s({ category: i === e.category ? "" : i });
139
139
  },
140
140
  handleDeveloper: (i) => {
141
- a({ owner: i || void 0 });
141
+ s({ owner: i || void 0 });
142
142
  },
143
143
  handlePage: (i) => {
144
- a({ currentPage: i });
144
+ s({ currentPage: i });
145
145
  },
146
146
  handleSwitchShowResources: (i) => {
147
- a({ showResources: i });
147
+ s({ showResources: i });
148
148
  },
149
149
  handleSearchSelect: (i) => {
150
150
  l(i);
151
151
  }
152
152
  };
153
153
  }
154
- const Ht = (e, r, o) => e && r || !o, Ue = (e) => [
154
+ const Ut = (e, r, o) => e && r || !o, Ge = (e) => [
155
155
  {
156
156
  name: e("sort.popularity"),
157
157
  value: "popularity"
@@ -164,25 +164,25 @@ const Ht = (e, r, o) => e && r || !o, Ue = (e) => [
164
164
  // name: t('sort.rating'),
165
165
  // value: 'rating',
166
166
  // },
167
- ], Ve = (e, r, o) => {
168
- var d, x;
169
- const n = ut(e), l = ht(n.search);
170
- if ((d = pt(e, { strict: !0 })) == null ? void 0 : d.endsWith(".gif"))
171
- return l.imageFilter ? mt({ ...n, search: "" }) : e;
167
+ ], qe = (e, r, o) => {
168
+ var d, f;
169
+ const n = ht(e), l = pt(n.search);
170
+ if ((d = mt(e, { strict: !0 })) == null ? void 0 : d.endsWith(".gif"))
171
+ return l.imageFilter ? ft({ ...n, search: "" }) : e;
172
172
  if (l.imageFilter)
173
173
  return e;
174
- const a = o || ((x = window.blocklet) == null ? void 0 : x.version), { w: i, h: u } = typeof r == "object" ? { w: r.w, h: r.h } : { w: r, h: r };
175
- return be(e, {
176
- ...i || u ? { imageFilter: "resize", w: i, h: u } : {},
177
- v: a
174
+ const s = o || ((f = window.blocklet) == null ? void 0 : f.version), { w: i, h: m } = typeof r == "object" ? { w: r.w, h: r.h } : { w: r, h: r };
175
+ return ve(e, {
176
+ ...i || m ? { imageFilter: "resize", w: i, h: m } : {},
177
+ v: s
178
178
  });
179
- }, Ut = (e) => [
179
+ }, Vt = (e) => [
180
180
  { name: e("blocklet.free"), value: "free" },
181
181
  { name: e("blocklet.payment"), value: "payment" }
182
- ], Vt = (e = [], r = "en") => e.map((o) => ({ name: o.locales[r] || o.locales.en, value: o._id })), qt = (e, r) => (
182
+ ], Gt = (e = [], r = "en") => e.map((o) => ({ name: o.locales[r] || o.locales.en, value: o._id })), qt = (e, r) => (
183
183
  // eslint-disable-next-line no-prototype-builtins
184
184
  e == null ? void 0 : e.replace(/{(\w*)}/g, (o, n) => r.hasOwnProperty(n) ? r[n] : "")
185
- ), Gt = () => window.innerWidth <= 600, Kt = {
185
+ ), Kt = () => window.innerWidth <= 600, Xt = {
186
186
  common: {
187
187
  title: "Blocklet Store",
188
188
  searchStore: "Search Blocklet",
@@ -233,7 +233,7 @@ const Ht = (e, r, o) => e && r || !o, Ue = (e) => [
233
233
  autocomplete: {
234
234
  expandResult: 'View all search results for "{name}"'
235
235
  }
236
- }, Xt = {
236
+ }, Qt = {
237
237
  common: {
238
238
  title: "Blocklet 商店",
239
239
  searchStore: "搜索 Blocklet",
@@ -284,22 +284,23 @@ const Ht = (e, r, o) => e && r || !o, Ue = (e) => [
284
284
  autocomplete: {
285
285
  expandResult: "查看 “{name}” 的所有搜索结果"
286
286
  }
287
- }, se = {
288
- en: Ie(Kt),
289
- zh: Ie(Xt)
290
- }, qe = (e, r) => {
287
+ }, de = {
288
+ en: Re(Xt),
289
+ zh: Re(Qt)
290
+ }, Ke = (e, r) => {
291
291
  const o = {};
292
292
  return e && (o["x-blocklet-server-version"] = e), r && (o["x-blocklet-store-version"] = r), o;
293
- }, Qt = (e) => (r, o) => {
294
- const n = se[e] ? se[e][r] : se.en[r];
293
+ }, Yt = (e) => (r, o) => {
294
+ const n = de[e] ? de[e][r] : de.en[r];
295
295
  return qt(n, o) || r;
296
- }, Ge = {
296
+ }, Xe = {
297
297
  errors: {
298
298
  fetchCategoriesError: null
299
299
  },
300
300
  loadings: {
301
301
  fetchCategoriesLoading: !1
302
302
  },
303
+ compact: !1,
303
304
  endpoint: "",
304
305
  wrapChildren: () => null,
305
306
  t: (e) => e,
@@ -347,96 +348,98 @@ const Ht = (e, r, o) => e && r || !o, Ue = (e) => [
347
348
  handlePage: () => {
348
349
  }
349
350
  }
350
- }, Ke = Le(Ge), { Provider: Yt, Consumer: Po } = Ke;
351
- function Zt(e) {
351
+ }, Qe = _e(Xe), { Provider: Zt, Consumer: Ao } = Qe;
352
+ function Jt(e) {
352
353
  const {
353
354
  locale: r = "zh",
354
355
  filters: o = {},
355
356
  serverVersion: n = "",
356
357
  onFilterChange: l = () => {
357
358
  },
358
- minItemWidth: s = 350,
359
- queryFilter: a = !0,
359
+ minItemWidth: a = 350,
360
+ queryFilter: s = !0,
360
361
  layout: i = {},
361
- wrapChildren: u = (I) => I,
362
- extraFilter: d = (I) => I,
363
- baseSearch: x = !1,
364
- fetchCategoryDelay: m = 0,
365
- showResourcesSwitch: f = !1,
366
- showCategory: k = !0,
367
- tagFilters: g = [],
368
- children: B,
369
- storeVersion: S,
362
+ wrapChildren: m = (T) => T,
363
+ extraFilter: d = (T) => T,
364
+ baseSearch: f = !1,
365
+ fetchCategoryDelay: u = 0,
366
+ showResourcesSwitch: x = !1,
367
+ showCategory: w = !0,
368
+ tagFilters: I = [],
369
+ children: g,
370
+ storeVersion: B,
370
371
  onSearchSelect: p = () => {
371
372
  },
372
- endpoint: v,
373
- blockletRender: w
374
- } = e, A = qe(n, S), T = j(() => _e({ baseURL: v, headers: A }), [v]), z = jt(o, { onFilterChange: l, emptyCategory: !i.showExplore, onSearchSelect: p }), [U, D] = E(""), {
375
- data: N = [],
376
- error: Q,
377
- loading: ie,
378
- run: V
379
- } = $t(T), q = j(() => {
380
- const I = rt(N, [(W) => W.name], ["asc"]), _ = I.findIndex((W) => W.name === "All" || W.locales.en === "All");
381
- return _ > -1 ? [{ ...I[_], _id: "All" }, ...I.slice(0, _), ...I.slice(_ + 1)] : I;
382
- }, [N]), G = me(Qt(r), [r]), Y = j(() => Vt(q, r), [q, r]), c = Ut(G), C = {
383
- search: z,
384
- errors: { fetchCategoriesError: Q },
373
+ endpoint: C,
374
+ blockletRender: b,
375
+ compact: k = !1
376
+ } = e, A = Ke(n, B), z = V(() => ze({ baseURL: C, headers: A }), [C]), $ = Ht(o, { onFilterChange: l, emptyCategory: !i.showExplore, onSearchSelect: p }), [D, q] = E(""), {
377
+ data: j = [],
378
+ error: ae,
379
+ loading: Y,
380
+ run: Z
381
+ } = jt(z), H = V(() => {
382
+ const T = ot(j, [(W) => W.name], ["asc"]), _ = T.findIndex((W) => W.name === "All" || W.locales.en === "All");
383
+ return _ > -1 ? [{ ...T[_], _id: "All" }, ...T.slice(0, _), ...T.slice(_ + 1)] : T;
384
+ }, [j]), K = ge(Yt(r), [r]), c = V(() => Gt(H, r), [H, r]), S = Vt(K), N = {
385
+ search: $,
386
+ compact: k,
387
+ errors: { fetchCategoriesError: ae },
385
388
  loadings: {
386
- fetchCategoriesLoading: ie
389
+ fetchCategoriesLoading: Y
387
390
  },
388
391
  extraFilter: d,
389
- endpoint: v,
390
- queryFilter: a,
392
+ endpoint: C,
393
+ queryFilter: s,
391
394
  layout: {
392
395
  showExplore: i.showExplore ?? !1,
393
396
  showCategory: i.showCategory ?? !0,
394
397
  showTitle: i.showTitle ?? !0,
395
398
  showSearch: i.showSearch ?? !0
396
399
  },
397
- minItemWidth: s,
398
- wrapChildren: u,
399
- t: G,
400
- storeVersion: S,
400
+ minItemWidth: a,
401
+ wrapChildren: m,
402
+ t: K,
403
+ storeVersion: B,
401
404
  serverVersion: n,
402
- selectedCategory: z.filters.category || (i.showExplore ? "" : "All"),
403
- categoryList: q,
404
- blockletRender: w,
405
+ selectedCategory: $.filters.category || (i.showExplore ? "" : "All"),
406
+ categoryList: H,
407
+ blockletRender: b,
405
408
  locale: r,
406
- categoryOptions: Y,
407
- priceOptions: c,
408
- storeApi: T,
409
- baseSearch: x,
410
- showResourcesSwitch: f,
411
- showCategory: k,
412
- tagFilters: g,
409
+ categoryOptions: c,
410
+ priceOptions: S,
411
+ storeApi: z,
412
+ baseSearch: f,
413
+ showResourcesSwitch: x,
414
+ showCategory: w,
415
+ tagFilters: I,
413
416
  onFilterChange: l,
414
- getCategoryLocale: (I) => {
415
- if (!I) return null;
416
- const _ = N.find((W) => W._id === I || W.locales.en === "All");
417
+ getCategoryLocale: (T) => {
418
+ if (!T) return null;
419
+ const _ = j.find((W) => W._id === T || W.locales.en === "All");
417
420
  return _ ? _.locales[r] || _.locales.en : null;
418
421
  },
419
422
  get developerName() {
420
- return U;
423
+ return D;
421
424
  },
422
- updateDeveloperName: D
425
+ updateDeveloperName: q
423
426
  };
424
- return H(() => {
425
- setTimeout(V, m || 0);
426
- }, [v, V, m]), /* @__PURE__ */ t(Yt, { value: C, children: B });
427
+ return G(() => {
428
+ setTimeout(Z, u || 0);
429
+ }, [C, Z, u]), /* @__PURE__ */ t(Zt, { value: N, children: g });
427
430
  }
428
431
  function R() {
429
- const e = Oe(Ke);
430
- return e || Ge;
432
+ const e = Me(Qe);
433
+ return e || Xe;
431
434
  }
432
- function Xe({
435
+ function Ye({
433
436
  children: e,
434
437
  onClick: r,
435
438
  size: o = 32,
436
439
  ...n
437
440
  }) {
438
441
  return /* @__PURE__ */ t(
439
- oe,
442
+ ie,
440
443
  {
441
444
  ...n,
442
445
  onClick: r,
@@ -459,97 +462,97 @@ function Xe({
459
462
  }
460
463
  );
461
464
  }
462
- function Z(e, r) {
465
+ function J(e, r) {
463
466
  return e === void 0 ? r : e;
464
467
  }
465
- function ve({
468
+ function Se({
466
469
  xs: e,
467
470
  sm: r,
468
471
  md: o,
469
472
  lg: n,
470
473
  xl: l,
471
- exact: s
474
+ exact: a
472
475
  }) {
473
- const a = ft(), i = $(a.breakpoints.down("sm")), u = $(a.breakpoints.between("sm", "md")), d = $(a.breakpoints.between("md", "lg")), x = $(a.breakpoints.between("lg", "xl"));
474
- if (s)
475
- return i ? e || null : u ? r || null : d ? o || null : x ? n || null : l || null;
476
- let m = e;
477
- return i || (m = Z(r, m), u) || (m = Z(o, m), d) || (m = Z(n, m), x) ? m : Z(l, m);
476
+ const s = gt(), i = U(s.breakpoints.down("sm")), m = U(s.breakpoints.between("sm", "md")), d = U(s.breakpoints.between("md", "lg")), f = U(s.breakpoints.between("lg", "xl"));
477
+ if (a)
478
+ return i ? e || null : m ? r || null : d ? o || null : f ? n || null : l || null;
479
+ let u = e;
480
+ return i || (u = J(r, u), m) || (u = J(o, u), d) || (u = J(n, u), f) ? u : J(l, u);
478
481
  }
479
- function Jt({ children: e }) {
480
- const { open: r, toggleOpen: o } = ke();
482
+ function er({ children: e }) {
483
+ const { open: r, toggleOpen: o } = Ce();
481
484
  return /* @__PURE__ */ t(
482
- ve,
485
+ Se,
483
486
  {
484
- xs: /* @__PURE__ */ t(gt, { open: r, onClose: () => o(!1), children: e }),
487
+ xs: /* @__PURE__ */ t(xt, { open: r, onClose: () => o(!1), children: e }),
485
488
  md: /* @__PURE__ */ t(y, { children: e })
486
489
  }
487
490
  );
488
491
  }
489
- const er = at(({ loading: e, disabled: r, ...o }, n) => /* @__PURE__ */ t(
490
- oe,
492
+ const tr = lt(({ loading: e, disabled: r, ...o }, n) => /* @__PURE__ */ t(
493
+ ie,
491
494
  {
492
495
  ref: n,
493
496
  disableElevation: !0,
494
497
  disabled: r || e,
495
498
  ...o,
496
499
  sx: [{ borderRadius: "4px" }, ...Array.isArray(o.sx) ? o.sx : [o.sx]],
497
- startIcon: e && /* @__PURE__ */ t(ne, { size: "1em" })
500
+ startIcon: e && /* @__PURE__ */ t(le, { size: "1em" })
498
501
  }
499
502
  ));
500
- function Qe({ value: e, options: r, onChange: o, placeholder: n, ...l }) {
501
- var S;
502
- const s = fe(null), a = xe(), [i, u] = E(!1), [d, x] = E(e !== null ? e : ""), m = $(a.breakpoints.down("sm"));
503
- H(() => {
504
- x(e !== null ? e : "");
503
+ function xe({ value: e, options: r, onChange: o, placeholder: n, ...l }) {
504
+ var B;
505
+ const a = re(null), s = we(), [i, m] = E(!1), [d, f] = E(e !== null ? e : ""), u = U(s.breakpoints.down("sm"));
506
+ G(() => {
507
+ f(e !== null ? e : "");
505
508
  }, [e]);
506
- const f = me(() => {
507
- u(!1);
508
- }, []), k = me(() => {
509
- u(!0);
509
+ const x = ge(() => {
510
+ m(!1);
511
+ }, []), w = ge(() => {
512
+ m(!0);
510
513
  }, []);
511
- function g(p) {
512
- x(p.value), o(p.value), m && f();
514
+ function I(p) {
515
+ f(p.value), o(p.value), u && x();
513
516
  }
514
- function B(p) {
517
+ function g(p) {
515
518
  return p === d;
516
519
  }
517
520
  return /* @__PURE__ */ h(M, { children: [
518
521
  /* @__PURE__ */ h(
519
- tr,
522
+ rr,
520
523
  {
521
- ref: s,
522
- onClick: k,
524
+ ref: a,
525
+ onClick: w,
523
526
  variant: "outlined",
524
527
  size: "medium",
525
- className: ["my-select__selector", ot(d) ? "" : "my-select__selector--active"].join(" "),
526
- sx: { minWidth: "auto", color: "text.primary", borderRadius: "8px" },
528
+ className: ["my-select__selector", nt(d) ? "" : "my-select__selector--active"].join(" "),
529
+ sx: { minWidth: { xs: "100px", md: "auto" }, color: "text.primary", borderRadius: "8px" },
527
530
  ...l,
528
531
  children: [
529
- ((S = r.find((p) => p.value === d)) == null ? void 0 : S.name) || n,
530
- /* @__PURE__ */ t(Ct, { className: "my-select__arrowdown", component: yt, sx: { width: 18, height: 18 } })
532
+ ((B = r.find((p) => p.value === d)) == null ? void 0 : B.name) || n,
533
+ /* @__PURE__ */ t(St, { className: "my-select__arrowdown", component: wt, sx: { width: 18, height: 18 } })
531
534
  ]
532
535
  }
533
536
  ),
534
- /* @__PURE__ */ t(vt, { open: i, anchorEl: s.current, transition: !0, sx: { zIndex: "9999" }, children: ({ TransitionProps: p, placement: v }) => /* @__PURE__ */ t(
535
- bt,
537
+ /* @__PURE__ */ t(Ct, { open: i, anchorEl: a.current, transition: !0, sx: { zIndex: "9999" }, children: ({ TransitionProps: p, placement: C }) => /* @__PURE__ */ t(
538
+ kt,
536
539
  {
537
540
  ...p,
538
- style: { transformOrigin: v === "bottom" ? "center top" : "center bottom" },
539
- children: /* @__PURE__ */ t(kt, { children: /* @__PURE__ */ t(wt, { onClickAway: f, children: /* @__PURE__ */ t(rr, { autoFocusItem: i, onMouseEnter: k, onMouseLeave: f, children: r.map((w) => /* @__PURE__ */ h(Ne, { onClick: () => g(w), sx: { fontSize: 14 }, children: [
541
+ style: { transformOrigin: C === "bottom" ? "center top" : "center bottom" },
542
+ children: /* @__PURE__ */ t(vt, { children: /* @__PURE__ */ t(bt, { onClickAway: x, children: /* @__PURE__ */ t(or, { autoFocusItem: i, onMouseEnter: w, onMouseLeave: x, children: r.map((b) => /* @__PURE__ */ h($e, { onClick: () => I(b), sx: { fontSize: 14 }, children: [
540
543
  /* @__PURE__ */ t(
541
- xt,
544
+ yt,
542
545
  {
543
- sx: { mr: 1, fontSize: 16, visibility: B(w.value) ? "visible" : "hidden" }
546
+ sx: { mr: 1, fontSize: 16, visibility: g(b.value) ? "visible" : "hidden" }
544
547
  }
545
548
  ),
546
- w.name
547
- ] }, w.value)) }) }) })
549
+ b.name
550
+ ] }, b.value)) }) }) })
548
551
  }
549
552
  ) })
550
553
  ] });
551
554
  }
552
- const tr = X(er)`
555
+ const rr = Q(tr)`
553
556
  border: 1px solid #f0f0f0;
554
557
  padding: 6px 8px 6px 12px;
555
558
  font-weight: ${(e) => e.theme.typography.fontWeightRegular};
@@ -577,7 +580,7 @@ const tr = X(er)`
577
580
  margin-right: 3px;
578
581
  }
579
582
  }
580
- `, rr = X(We)`
583
+ `, or = Q(je)`
581
584
  .my-select__option__icon {
582
585
  color: transparent;
583
586
  font-size: 14px;
@@ -594,8 +597,8 @@ const tr = X(er)`
594
597
  }
595
598
  }
596
599
  `;
597
- function Ye() {
598
- const { search: e, t: r } = R(), { filters: o, handleSort: n, handlePrice: l } = e, s = Ue(r);
600
+ function Ze() {
601
+ const { search: e, t: r } = R(), { filters: o, handleSort: n, handlePrice: l } = e, a = Ge(r);
599
602
  return /* @__PURE__ */ h(
600
603
  F,
601
604
  {
@@ -606,26 +609,26 @@ function Ye() {
606
609
  justifyContent: "space-between",
607
610
  children: [
608
611
  /* @__PURE__ */ t(
609
- De,
612
+ We,
610
613
  {
611
614
  control: /* @__PURE__ */ t(
612
- ze,
615
+ Ne,
613
616
  {
614
617
  checked: o.price === "free",
615
618
  size: "small",
616
619
  sx: { "& .MuiSvgIcon-fontSizeSmall": { fontSize: 16, color: "text.lighter" } },
617
- onChange: (a) => l(a.target.checked ? "free" : "")
620
+ onChange: (s) => l(s.target.checked ? "free" : "")
618
621
  }
619
622
  ),
620
623
  label: r("blocklet.free")
621
624
  }
622
625
  ),
623
626
  /* @__PURE__ */ t(
624
- Qe,
627
+ xe,
625
628
  {
626
- value: o.sortBy || s[0].value,
627
- options: s,
628
- onChange: (a) => n(a),
629
+ value: o.sortBy || a[0].value,
630
+ options: a,
631
+ onChange: (s) => n(s),
629
632
  placeholder: r("sort.sort")
630
633
  }
631
634
  )
@@ -633,15 +636,15 @@ function Ye() {
633
636
  }
634
637
  );
635
638
  }
636
- function or({ menus: e }) {
637
- const { selectedCategory: r, search: o, t: n, categoryOptions: l, loadings: s, layout: a, baseSearch: i } = R(), { filters: u, handleActiveMenu: d, handleCategory: x, cleanFilter: m } = o, { toggleOpen: f } = ke();
638
- H(() => {
639
- f(!1);
640
- }, [Object.values(u).join("")]);
641
- const k = Ht(i, a.showSearch, u.keyword);
642
- return a.showCategory ? /* @__PURE__ */ h(Jt, { children: [
639
+ function nr({ menus: e }) {
640
+ const { selectedCategory: r, search: o, t: n, categoryOptions: l, loadings: a, layout: s, baseSearch: i, compact: m } = R(), { filters: d, handleActiveMenu: f, handleCategory: u, cleanFilter: x } = o, { toggleOpen: w } = Ce();
641
+ G(() => {
642
+ w(!1);
643
+ }, [Object.values(d).join("")]);
644
+ const I = Ut(i, s.showSearch, d.keyword);
645
+ return s.showCategory && !m ? /* @__PURE__ */ h(er, { children: [
643
646
  /* @__PURE__ */ t(
644
- ve,
647
+ Se,
645
648
  {
646
649
  xs: /* @__PURE__ */ h(
647
650
  F,
@@ -655,8 +658,8 @@ function or({ menus: e }) {
655
658
  borderBottom: 1,
656
659
  borderColor: "divider",
657
660
  children: [
658
- /* @__PURE__ */ t(Xe, { onClick: () => f(!1), children: /* @__PURE__ */ t(we, {}) }),
659
- /* @__PURE__ */ t(b, { flex: 1, variant: "body1", fontWeight: "fontWeightMedium", children: n("common.category") })
661
+ /* @__PURE__ */ t(Ye, { onClick: () => w(!1), children: /* @__PURE__ */ t(ke, {}) }),
662
+ /* @__PURE__ */ t(v, { flex: 1, variant: "body1", fontWeight: "fontWeightMedium", children: n("common.category") })
660
663
  ]
661
664
  }
662
665
  ),
@@ -666,41 +669,41 @@ function or({ menus: e }) {
666
669
  /* @__PURE__ */ t(
667
670
  F,
668
671
  {
669
- visibility: s.fetchCategoriesLoading ? "hidden" : "visible",
672
+ visibility: a.fetchCategoriesLoading ? "hidden" : "visible",
670
673
  width: { xs: 268, md: 200 },
671
674
  boxSizing: "content-box",
672
675
  p: { xs: 2, md: 0 },
673
676
  pr: { md: 6 },
674
- children: k ? /* @__PURE__ */ h(M, { children: [
675
- a.showExplore && /* @__PURE__ */ h(y, { mb: 3, pb: 3, borderBottom: 1, borderColor: "divider", children: [
677
+ children: I ? /* @__PURE__ */ h(M, { children: [
678
+ s.showExplore && /* @__PURE__ */ h(y, { mb: 3, pb: 3, borderBottom: 1, borderColor: "divider", children: [
676
679
  /* @__PURE__ */ h(y, { display: "flex", alignItems: "center", gap: 1, children: [
677
- /* @__PURE__ */ t(K, { icon: lt, width: 20, height: 20 }),
680
+ /* @__PURE__ */ t(X, { icon: ct, width: 20, height: 20 }),
678
681
  /* @__PURE__ */ t(
679
- b,
682
+ v,
680
683
  {
681
684
  variant: "body1",
682
- color: !r && !u.menu ? "text.primary" : "text.lighter",
683
- fontWeight: !r && !u.menu ? "fontWeightMedium" : void 0,
685
+ color: !r && !d.menu ? "text.primary" : "text.lighter",
686
+ fontWeight: !r && !d.menu ? "fontWeightMedium" : void 0,
684
687
  sx: { cursor: "pointer" },
685
688
  onClick: () => {
686
- f(!1), m();
689
+ w(!1), x();
687
690
  },
688
691
  children: n("explore.title")
689
692
  }
690
693
  )
691
694
  ] }),
692
695
  e == null ? void 0 : e.map((g) => /* @__PURE__ */ h(y, { display: "flex", alignItems: "center", mt: 2, gap: 1, children: [
693
- typeof g.icon == "string" ? /* @__PURE__ */ t(K, { icon: g.icon, width: 20, height: 20 }) : g.icon,
696
+ typeof g.icon == "string" ? /* @__PURE__ */ t(X, { icon: g.icon, width: 20, height: 20 }) : g.icon,
694
697
  /* @__PURE__ */ t(
695
- b,
698
+ v,
696
699
  {
697
700
  variant: "body1",
698
- color: u.menu === g.key ? "text.primary" : "text.lighter",
699
- fontWeight: u.menu === g.key ? "fontWeightMedium" : void 0,
701
+ color: d.menu === g.key ? "text.primary" : "text.lighter",
702
+ fontWeight: d.menu === g.key ? "fontWeightMedium" : void 0,
700
703
  sx: { cursor: "pointer" },
701
704
  onClick: () => {
702
705
  var B;
703
- f(!1), d(g.key), (B = g.onClick) == null || B.call(g);
706
+ w(!1), f(g.key), (B = g.onClick) == null || B.call(g);
704
707
  },
705
708
  children: g.title
706
709
  }
@@ -708,7 +711,7 @@ function or({ menus: e }) {
708
711
  ] }, g.key))
709
712
  ] }),
710
713
  !!l.length && /* @__PURE__ */ t(F, { gap: 2, children: l.map((g) => /* @__PURE__ */ t(
711
- b,
714
+ v,
712
715
  {
713
716
  variant: "body1",
714
717
  title: g.name,
@@ -717,37 +720,37 @@ function or({ menus: e }) {
717
720
  color: r === g.value ? "text.primary" : "text.lighter",
718
721
  textTransform: "capitalize",
719
722
  onClick: () => {
720
- r === g.value ? m() : x(g.value), f(!1);
723
+ r === g.value ? x() : u(g.value), w(!1);
721
724
  },
722
725
  children: g.name
723
726
  },
724
727
  g.value
725
728
  )) })
726
- ] }) : /* @__PURE__ */ t(Ye, {})
729
+ ] }) : /* @__PURE__ */ t(Ze, {})
727
730
  }
728
731
  )
729
732
  ] }) : null;
730
733
  }
731
- function Ce() {
732
- const { endpoint: e, serverVersion: r, storeVersion: o } = R(), n = qe(r, o), l = j(() => _e({
734
+ function Ie() {
735
+ const { endpoint: e, serverVersion: r, storeVersion: o } = R(), n = Ke(r, o), l = V(() => ze({
733
736
  baseURL: e,
734
737
  headers: n
735
738
  }), [e]);
736
739
  return {
737
- get: async (s) => {
738
- const { data: a } = await l.get(s);
739
- return a;
740
+ get: async (a) => {
741
+ const { data: s } = await l.get(a);
742
+ return s;
740
743
  },
741
- post: async (s, a) => {
742
- const { data: i } = await l.post(s, a);
744
+ post: async (a, s) => {
745
+ const { data: i } = await l.post(a, s);
743
746
  return i;
744
747
  }
745
748
  };
746
749
  }
747
- const Ze = st(function(r) {
748
- return /* @__PURE__ */ t(y, { height: 60, display: "flex", alignItems: "center", justifyContent: "center", ...r, children: /* @__PURE__ */ t(ne, {}) });
750
+ const Je = at(function(r) {
751
+ return /* @__PURE__ */ t(y, { height: 60, display: "flex", alignItems: "center", justifyContent: "center", ...r, children: /* @__PURE__ */ t(le, {}) });
749
752
  });
750
- function Pe({
753
+ function Ee({
751
754
  icon: e,
752
755
  children: r,
753
756
  maxWidth: o = 100,
@@ -756,7 +759,7 @@ function Pe({
756
759
  return (r === 0 || r) && /* @__PURE__ */ h(F, { direction: "row", alignItems: "center", gap: 1, sx: { maxWidth: o, overflow: "hidden" }, children: [
757
760
  e,
758
761
  /* @__PURE__ */ t(
759
- b,
762
+ v,
760
763
  {
761
764
  flex: 1,
762
765
  variant: "body2",
@@ -767,18 +770,18 @@ function Pe({
767
770
  )
768
771
  ] });
769
772
  }
770
- const nr = 16 / 9, ce = 292, ge = 189, te = 336;
771
- function ir() {
772
- var B, S;
773
- const { t: e, search: r } = R(), { get: o } = Ce(), n = xe(), l = $(n.breakpoints.down("md")), s = ((S = (B = window.blocklet) == null ? void 0 : B.preferences) == null ? void 0 : S.homeBanner) || [], {
774
- data: a = [],
773
+ const ir = 16 / 9, ue = 292, ye = 189, oe = 336;
774
+ function lr() {
775
+ var g, B;
776
+ const { t: e, search: r } = R(), { get: o } = Ie(), n = we(), l = U(n.breakpoints.down("md")), a = ((B = (g = window.blocklet) == null ? void 0 : g.preferences) == null ? void 0 : B.homeBanner) || [], {
777
+ data: s = [],
775
778
  error: i,
776
- loading: u
777
- } = re(async () => {
779
+ loading: m
780
+ } = ne(async () => {
778
781
  const p = await o(
779
- be(P.blockletsPath, { didList: s.map((v) => v.did).join(",") })
782
+ ve(P.blockletsPath, { didList: a.map((C) => C.did).join(",") })
780
783
  );
781
- return p != null && p.dataList ? s.map((v) => p.dataList.find((w) => w.did === v.did)) : [];
784
+ return p != null && p.dataList ? a.map((C) => p.dataList.find((b) => b.did === C.did)) : [];
782
785
  });
783
786
  i && console.error("Get Banner Blocklets error:", i);
784
787
  const d = {
@@ -789,20 +792,20 @@ function ir() {
789
792
  cursor: "pointer",
790
793
  color: "text.lighter"
791
794
  };
792
- return !i && s.length > 0 ? /* @__PURE__ */ h(M, { children: [
793
- /* @__PURE__ */ t(b, { component: "h2", variant: "h2", mt: { xs: 2, md: 0 }, mb: 3, children: e("explore.title") }),
795
+ return !i && a.length > 0 ? /* @__PURE__ */ h(M, { children: [
796
+ /* @__PURE__ */ t(v, { component: "h2", variant: "h2", mt: { xs: 2, md: 0 }, mb: 3, children: e("explore.title") }),
794
797
  /* @__PURE__ */ t(
795
798
  y,
796
799
  {
797
- height: { xs: "auto", md: ce },
798
- minHeight: ce,
800
+ height: { xs: "auto", md: ue },
801
+ minHeight: ue,
799
802
  position: "relative",
800
803
  border: 1,
801
804
  borderColor: "divider",
802
805
  borderRadius: 3,
803
806
  overflow: "hidden",
804
- children: u ? /* @__PURE__ */ h(y, { p: 5, display: { md: "flex" }, gap: 5, alignItems: "center", justifyContent: "center", children: [
805
- /* @__PURE__ */ t(O, { variant: "rounded", height: ge, width: te }),
807
+ children: m ? /* @__PURE__ */ h(y, { p: 5, display: { md: "flex" }, gap: 5, alignItems: "center", justifyContent: "center", children: [
808
+ /* @__PURE__ */ t(O, { variant: "rounded", height: ye, width: oe }),
806
809
  /* @__PURE__ */ h(y, { flex: 1, height: "100%", children: [
807
810
  /* @__PURE__ */ t(O, { variant: "text", height: 50, width: 100 }),
808
811
  /* @__PURE__ */ t(O, { variant: "text", height: 40, width: "100%" }),
@@ -814,7 +817,7 @@ function ir() {
814
817
  /* @__PURE__ */ t(O, { variant: "rounded", height: 30, width: 100 })
815
818
  ] })
816
819
  ] }) : /* @__PURE__ */ t(
817
- Rt,
820
+ Tt,
818
821
  {
819
822
  showNav: !0,
820
823
  autoPlay: !0,
@@ -825,17 +828,17 @@ function ir() {
825
828
  showBullets: !1,
826
829
  showThumbnails: !1,
827
830
  showFullscreenButton: !1,
828
- renderLeftNav: (p) => /* @__PURE__ */ t(y, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(It, { sx: { ...d, left: 5 } }) }),
829
- renderRightNav: (p) => /* @__PURE__ */ t(y, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Bt, { sx: { ...d, right: 5 } }) }),
830
- items: s.map((p, v) => ({
831
+ renderLeftNav: (p) => /* @__PURE__ */ t(y, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Bt, { sx: { ...d, left: 5 } }) }),
832
+ renderRightNav: (p) => /* @__PURE__ */ t(y, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Rt, { sx: { ...d, right: 5 } }) }),
833
+ items: a.map((p, C) => ({
831
834
  original: p.did,
832
835
  renderItem: () => {
833
836
  var z;
834
- const w = a[v] || {}, A = p.cover || ar(p.did, (z = w.screenshots) == null ? void 0 : z[0]), T = Ve(A, n.breakpoints.values.md * 2);
837
+ const b = s[C] || {}, k = p.cover || sr(p.did, (z = b.screenshots) == null ? void 0 : z[0]), A = qe(k, n.breakpoints.values.md * 2);
835
838
  return /* @__PURE__ */ h(
836
839
  F,
837
840
  {
838
- height: { xs: "auto", md: ce },
841
+ height: { xs: "auto", md: ue },
839
842
  sx: {
840
843
  cursor: "pointer",
841
844
  "&::before": {
@@ -845,7 +848,7 @@ function ir() {
845
848
  left: 0,
846
849
  right: 0,
847
850
  bottom: 0,
848
- backgroundImage: `url("${T}")`,
851
+ backgroundImage: `url("${A}")`,
849
852
  backgroundSize: "cover",
850
853
  filter: "blur(50px)",
851
854
  opacity: 0.15,
@@ -857,17 +860,17 @@ function ir() {
857
860
  justifyContent: "center",
858
861
  alignItems: { xs: "flex-start", md: "center" },
859
862
  p: { xs: 2, md: 5 },
860
- onClick: () => r.handleSearchSelect(w),
863
+ onClick: () => r.handleSearchSelect(b),
861
864
  gap: { xs: 2, md: 5 },
862
865
  children: [
863
- x(T),
866
+ f(A),
864
867
  /* @__PURE__ */ h(F, { flex: 1, height: "100%", gap: 3, children: [
865
868
  /* @__PURE__ */ h(y, { flex: 1, children: [
866
- m(p.name || w.title || p.name),
867
- f(p.desc || w.description)
869
+ u(p.name || b.title || p.name),
870
+ x(p.desc || b.description)
868
871
  ] }),
869
- w.did && k(w, p.baseNum),
870
- g(w)
872
+ b.did && w(b, p.baseNum),
873
+ I(b)
871
874
  ] })
872
875
  ]
873
876
  }
@@ -879,15 +882,15 @@ function ir() {
879
882
  }
880
883
  )
881
884
  ] }) : null;
882
- function x(p) {
883
- return /* @__PURE__ */ t(y, { borderRadius: 2, overflow: "hidden", position: "relative", width: { xs: "100%", md: te }, children: /* @__PURE__ */ t(sr, { url: p }) });
885
+ function f(p) {
886
+ return /* @__PURE__ */ t(y, { borderRadius: 2, overflow: "hidden", position: "relative", width: { xs: "100%", md: oe }, children: /* @__PURE__ */ t(cr, { url: p }) });
884
887
  }
885
- function m(p) {
886
- return /* @__PURE__ */ t(b, { variant: "h2", width: "100%", children: p });
888
+ function u(p) {
889
+ return /* @__PURE__ */ t(v, { variant: "h2", width: "100%", children: p });
887
890
  }
888
- function f(p) {
891
+ function x(p) {
889
892
  return /* @__PURE__ */ t(
890
- b,
893
+ v,
891
894
  {
892
895
  variant: "body2",
893
896
  color: "text.secondary",
@@ -909,16 +912,16 @@ function ir() {
909
912
  }
910
913
  );
911
914
  }
912
- function k(p, v = 0) {
913
- const { did: w, owner: A, stats: T } = p;
915
+ function w(p, C = 0) {
916
+ const { did: b, owner: k, stats: A } = p;
914
917
  return /* @__PURE__ */ h(y, { display: "flex", alignItems: "center", gap: 2, color: "text.secondary", children: [
915
- /* @__PURE__ */ t(Pe, { icon: /* @__PURE__ */ t($e, { src: A.avatar, did: w, size: 20, variant: "circle" }), children: A.fullName }),
916
- /* @__PURE__ */ t(Pe, { icon: /* @__PURE__ */ t(K, { icon: St }), title: `${T.downloads + v}`, children: lr(T.downloads + v) })
918
+ /* @__PURE__ */ t(Ee, { icon: /* @__PURE__ */ t(He, { src: k.avatar, did: b, size: 20, variant: "circle" }), children: k.fullName }),
919
+ /* @__PURE__ */ t(Ee, { icon: /* @__PURE__ */ t(X, { icon: It }), title: `${A.downloads + C}`, children: ar(A.downloads + C) })
917
920
  ] });
918
921
  }
919
- function g(p) {
922
+ function I(p) {
920
923
  return /* @__PURE__ */ t(
921
- oe,
924
+ ie,
922
925
  {
923
926
  variant: "outlined",
924
927
  size: "small",
@@ -936,8 +939,8 @@ function ir() {
936
939
  );
937
940
  }
938
941
  }
939
- const lr = (e) => Number.isNaN(e) ? 0 : e < 1e3 ? e : e < 1e6 ? `${(e / 1e3).toFixed(1)}k` : e < 1e9 ? `${(e / 1e6).toFixed(1)}m` : `${(e / 1e9).toFixed(1)}b`, ar = (e, r) => e && r ? `/assets/${e}/screenshots/${r}` : "";
940
- function sr({ url: e }) {
942
+ const ar = (e) => Number.isNaN(e) ? 0 : e < 1e3 ? e : e < 1e6 ? `${(e / 1e3).toFixed(1)}k` : e < 1e9 ? `${(e / 1e6).toFixed(1)}m` : `${(e / 1e9).toFixed(1)}b`, sr = (e, r) => e && r ? `/assets/${e}/screenshots/${r}` : "";
943
+ function cr({ url: e }) {
941
944
  const [r, o] = E(!0);
942
945
  return /* @__PURE__ */ h(M, { children: [
943
946
  r && /* @__PURE__ */ t(
@@ -945,8 +948,8 @@ function sr({ url: e }) {
945
948
  {
946
949
  variant: "rectangular",
947
950
  sx: {
948
- width: { xs: "100%", md: te },
949
- height: { xs: "auto", md: ge }
951
+ width: { xs: "100%", md: oe },
952
+ height: { xs: "auto", md: ye }
950
953
  }
951
954
  }
952
955
  ),
@@ -957,60 +960,60 @@ function sr({ url: e }) {
957
960
  component: "img",
958
961
  src: e,
959
962
  alt: "",
960
- width: { xs: "100%", md: te },
961
- height: { xs: "auto", md: ge },
963
+ width: { xs: "100%", md: oe },
964
+ height: { xs: "auto", md: ye },
962
965
  borderRadius: 2,
963
966
  border: 1,
964
967
  borderColor: "divider",
965
- sx: { objectFit: "container", cursor: "pointer", aspectRatio: nr },
968
+ sx: { objectFit: "container", cursor: "pointer", aspectRatio: ir },
966
969
  onLoad: () => o(!1),
967
970
  onError: () => o(!1)
968
971
  }
969
972
  )
970
973
  ] });
971
974
  }
972
- function cr({ title: e, blocklets: r }) {
975
+ function dr({ title: e, blocklets: r }) {
973
976
  const { blockletRender: o, serverVersion: n } = R();
974
977
  return /* @__PURE__ */ h(y, { mt: 3, children: [
975
- /* @__PURE__ */ t(b, { component: "h3", variant: "h3", sx: { mb: 2 }, children: e }),
976
- /* @__PURE__ */ t(Be, { container: !0, spacing: 2, boxSizing: "border-box", maxWidth: "calc(100vw - 16px)", children: r.map((l) => /* @__PURE__ */ t(Be, { item: !0, xs: 12, md: 6, p: "2px", "data-blocklet-did": l.did, children: /* @__PURE__ */ t(y, { padding: "1px", children: o({ blocklet: l, blocklets: r, serverVersion: n }) }) }, l.did)) })
978
+ /* @__PURE__ */ t(v, { component: "h3", variant: "h3", sx: { mb: 2 }, children: e }),
979
+ /* @__PURE__ */ t(Te, { container: !0, spacing: 2, boxSizing: "border-box", maxWidth: "calc(100vw - 16px)", children: r.map((l) => /* @__PURE__ */ t(Te, { item: !0, xs: 12, md: 6, p: "2px", "data-blocklet-did": l.did, children: /* @__PURE__ */ t(y, { padding: "1px", children: o({ blocklet: l, blocklets: r, serverVersion: n }) }) }, l.did)) })
977
980
  ] });
978
981
  }
979
- function dr() {
980
- const { get: e } = Ce(), { t: r } = R(), {
982
+ function ur() {
983
+ const { get: e } = Ie(), { t: r } = R(), {
981
984
  data: o = [],
982
985
  error: n,
983
986
  loading: l
984
- } = re(async () => {
985
- const s = await e(P.explorePath);
986
- return Array.isArray(s) ? s : [];
987
+ } = ne(async () => {
988
+ const a = await e(P.explorePath);
989
+ return Array.isArray(a) ? a : [];
987
990
  });
988
- return n ? /* @__PURE__ */ t(ye, { error: new Error(`Failed to fetch blocklets from ${P.explorePath}`) }) : l ? /* @__PURE__ */ t(Ze, { mt: 15 }) : /* @__PURE__ */ h(M, { children: [
989
- /* @__PURE__ */ t(ir, {}),
991
+ return n ? /* @__PURE__ */ t(be, { error: new Error(`Failed to fetch blocklets from ${P.explorePath}`) }) : l ? /* @__PURE__ */ t(Je, { mt: 15 }) : /* @__PURE__ */ h(M, { children: [
992
+ /* @__PURE__ */ t(lr, {}),
990
993
  o.map(
991
- (s) => {
992
- var a;
993
- return ((a = s.blocklets) == null ? void 0 : a.length) > 0 ? /* @__PURE__ */ t(cr, { title: r(`explore.${s.type}`), blocklets: s.blocklets }, s.type) : null;
994
+ (a) => {
995
+ var s;
996
+ return ((s = a.blocklets) == null ? void 0 : s.length) > 0 ? /* @__PURE__ */ t(dr, { title: r(`explore.${a.type}`), blocklets: a.blocklets }, a.type) : null;
994
997
  }
995
998
  )
996
999
  ] });
997
1000
  }
998
- const de = "__FREE_TEXT__", Ae = "__NO_RESULT__", ue = 40;
999
- function ur({
1001
+ const he = "__FREE_TEXT__", Fe = "__NO_RESULT__", pe = 40;
1002
+ function hr({
1000
1003
  endpoint: e,
1001
1004
  t: r,
1002
1005
  locale: o,
1003
1006
  filters: n,
1004
1007
  handleKeyword: l,
1005
- handleSearchSelect: s,
1006
- ...a
1008
+ handleSearchSelect: a,
1009
+ ...s
1007
1010
  }) {
1008
- const i = fe(null), u = fe(!1), [d, x] = E(!1), [m, f] = E(""), [k, g] = E(!1), B = Ce(), [S, p] = E(!1), v = (a == null ? void 0 : a.placeholder) || r("common.searchStore"), w = async (c) => {
1011
+ const i = re(null), m = re(!1), [d, f] = E(!1), [u, x] = E(""), [w, I] = E(!1), g = Ie(), [B, p] = E(!1), C = (s == null ? void 0 : s.placeholder) || r("common.searchStore"), b = async (c) => {
1009
1012
  p(!0);
1010
- const C = await B.get(Se(e, be(P.blockletsPath, c)));
1011
- return p(!1), C.dataList || [];
1012
- }, { data: A, run: T } = re(
1013
- (c) => c ? w({
1013
+ const S = await g.get(Be(e, ve(P.blockletsPath, c)));
1014
+ return p(!1), S.dataList || [];
1015
+ }, { data: k, run: A } = ne(
1016
+ (c) => c ? b({
1014
1017
  sortBy: P.nameDesc,
1015
1018
  page: 1,
1016
1019
  pageSize: 10,
@@ -1021,23 +1024,23 @@ function ur({
1021
1024
  manual: !0
1022
1025
  }
1023
1026
  );
1024
- H(() => {
1025
- p(!0), T(n.keyword), f(n.keyword || "");
1026
- }, [n.keyword, T]), Ot(
1027
+ G(() => {
1028
+ p(!0), A(n.keyword), x(n.keyword || "");
1029
+ }, [n.keyword, A]), _t(
1027
1030
  "ctrl + k, command + k",
1028
1031
  (c) => {
1029
- var C, I;
1030
- return c.stopPropagation(), c.preventDefault(), (I = (C = i.current) == null ? void 0 : C.querySelector("input")) == null || I.focus(), !1;
1032
+ var S, N;
1033
+ return c.stopPropagation(), c.preventDefault(), (N = (S = i.current) == null ? void 0 : S.querySelector("input")) == null || N.focus(), !1;
1031
1034
  },
1032
1035
  { enableOnTags: ["INPUT"] }
1033
1036
  );
1034
- const z = Me((c) => T(c), { wait: 300 }), U = { name: de, title: m, did: "" };
1037
+ const z = De((c) => A(c), { wait: 300 }), $ = { name: he, title: u, did: "" };
1035
1038
  let D = [];
1036
- return m && (S ? D = [U] : A != null && A.length ? D = [U, ...A] : D = [{ name: Ae, title: r("blocklet.noResults"), did: "" }]), /* @__PURE__ */ h(M, { children: [
1037
- /* @__PURE__ */ h(Ft, { fullScreen: !0, open: k, sx: { display: { md: "none" } }, children: [
1039
+ return u && (B ? D = [$] : k != null && k.length ? D = [$, ...k] : D = [{ name: Fe, title: r("blocklet.noResults"), did: "" }]), /* @__PURE__ */ h(M, { children: [
1040
+ /* @__PURE__ */ h(Lt, { fullScreen: !0, open: w, sx: { display: { md: "none" } }, children: [
1038
1041
  /* @__PURE__ */ h(y, { p: 2, pb: 0, display: "flex", alignItems: "center", gap: 2, children: [
1039
1042
  /* @__PURE__ */ t(
1040
- je,
1043
+ Ue,
1041
1044
  {
1042
1045
  fullWidth: !0,
1043
1046
  sx: {
@@ -1055,51 +1058,51 @@ function ur({
1055
1058
  }
1056
1059
  },
1057
1060
  autoFocus: !0,
1058
- placeholder: v,
1061
+ placeholder: C,
1059
1062
  className: "bl-autocomplete-input",
1060
- value: m,
1061
- onChange: (c) => N(c.target.value),
1062
- startAdornment: G(k),
1063
- endAdornment: Y()
1063
+ value: u,
1064
+ onChange: (c) => q(c.target.value),
1065
+ startAdornment: H(w),
1066
+ endAdornment: K()
1064
1067
  }
1065
1068
  ),
1066
1069
  /* @__PURE__ */ t(
1067
- oe,
1070
+ ie,
1068
1071
  {
1069
1072
  variant: "outlined",
1070
1073
  onClick: () => {
1071
- g(!1), f(n.keyword || "");
1074
+ I(!1), x(n.keyword || "");
1072
1075
  },
1073
1076
  children: r("common.cancel")
1074
1077
  }
1075
1078
  )
1076
1079
  ] }),
1077
- /* @__PURE__ */ t(We, { sx: { p: 0.5 }, children: D.map((c) => V(c)) })
1080
+ /* @__PURE__ */ t(je, { sx: { p: 0.5 }, children: D.map((c) => Y(c)) })
1078
1081
  ] }),
1079
1082
  /* @__PURE__ */ t(
1080
- ee,
1083
+ te,
1081
1084
  {
1082
1085
  sx: { display: { sx: "block", md: "none" }, fontSize: 28, color: "text.lighter" },
1083
- onClick: () => g(!0)
1086
+ onClick: () => I(!0)
1084
1087
  }
1085
1088
  ),
1086
1089
  /* @__PURE__ */ t(
1087
- Et,
1090
+ Ft,
1088
1091
  {
1089
1092
  ref: i,
1090
- open: !!m && d,
1093
+ open: !!u && d,
1091
1094
  size: "small",
1092
- onOpen: () => x(!0),
1093
- onClose: (c, C) => {
1094
- x(!1), C === "selectOption" && !u.current && l(m);
1095
+ onOpen: () => f(!0),
1096
+ onClose: (c, S) => {
1097
+ f(!1), S === "selectOption" && !m.current && l(u);
1095
1098
  },
1096
1099
  onKeyDown: (c) => {
1097
- c.key === "Enter" && !m && Q();
1100
+ c.key === "Enter" && !u && j();
1098
1101
  },
1099
1102
  disableClearable: !0,
1100
- inputValue: m,
1101
- onInputChange: (c, C) => N(C),
1102
- isOptionEqualToValue: (c, C) => c.name === C.name,
1103
+ inputValue: u,
1104
+ onInputChange: (c, S) => q(S),
1105
+ isOptionEqualToValue: (c, S) => c.name === S.name,
1103
1106
  getOptionLabel: (c) => c.title,
1104
1107
  getOptionKey: (c) => c.name,
1105
1108
  noOptionsText: r("blocklet.noResults"),
@@ -1116,25 +1119,25 @@ function ur({
1116
1119
  }
1117
1120
  },
1118
1121
  renderInput: (c) => /* @__PURE__ */ t(
1119
- Lt,
1122
+ Ot,
1120
1123
  {
1121
1124
  ...c,
1122
1125
  InputProps: {
1123
1126
  ...c.InputProps,
1124
1127
  autoFocus: !0,
1125
- placeholder: v,
1128
+ placeholder: C,
1126
1129
  className: "bl-autocomplete-input",
1127
- value: m,
1128
- startAdornment: G(d),
1129
- endAdornment: Y()
1130
+ value: u,
1131
+ startAdornment: H(d),
1132
+ endAdornment: K()
1130
1133
  }
1131
1134
  }
1132
1135
  ),
1133
1136
  filterOptions: (c) => c,
1134
- ...a,
1137
+ ...s,
1135
1138
  options: D,
1136
- renderOption: (c, C) => V(C),
1137
- value: U,
1139
+ renderOption: (c, S) => Y(S),
1140
+ value: $,
1138
1141
  sx: [
1139
1142
  {
1140
1143
  bgcolor: "#F9FAFB",
@@ -1149,44 +1152,44 @@ function ur({
1149
1152
  borderWidth: "1px"
1150
1153
  }
1151
1154
  },
1152
- ...Array.isArray(a.sx) ? a.sx : [a.sx]
1155
+ ...Array.isArray(s.sx) ? s.sx : [s.sx]
1153
1156
  ]
1154
1157
  }
1155
1158
  )
1156
1159
  ] });
1157
- function N(c) {
1158
- p(!0), f(c), u.current = !1, z.run(c);
1160
+ function q(c) {
1161
+ p(!0), x(c), m.current = !1, z.run(c);
1159
1162
  }
1160
- function Q() {
1161
- g(!1), f(""), N(""), l("");
1163
+ function j() {
1164
+ I(!1), x(""), q(""), l("");
1162
1165
  }
1163
- function ie(c) {
1164
- c != null && c.did ? (g(!1), u.current = !0, f(""), s(c)) : c.name === de && (g(!1), l(m));
1166
+ function ae(c) {
1167
+ c != null && c.did ? (I(!1), m.current = !0, x(""), a(c)) : c.name === he && (I(!1), l(u));
1165
1168
  }
1166
- function V(c) {
1167
- var C, I;
1169
+ function Y(c) {
1170
+ var S, N;
1168
1171
  return /* @__PURE__ */ h(
1169
- Ne,
1172
+ $e,
1170
1173
  {
1171
1174
  sx: { display: "flex", alignItems: "center", gap: 1, p: 1.5, borderRadius: "8px" },
1172
- onClick: () => ie(c),
1175
+ onClick: () => ae(c),
1173
1176
  children: [
1174
- q(c),
1175
- /* @__PURE__ */ h(b, { variant: "body1", children: [
1176
- /* @__PURE__ */ t(b, { fontWeight: "fontWeightMedium", display: "flex", alignItems: "center", gap: 1, children: c.title }),
1177
- /* @__PURE__ */ t(b, { sx: { color: "text.lighter" }, fontSize: "13px", children: ((I = (C = c.category) == null ? void 0 : C.locales) == null ? void 0 : I[o || "en"]) || "" })
1177
+ Z(c),
1178
+ /* @__PURE__ */ h(v, { variant: "body1", children: [
1179
+ /* @__PURE__ */ t(v, { fontWeight: "fontWeightMedium", display: "flex", alignItems: "center", gap: 1, children: c.title }),
1180
+ /* @__PURE__ */ t(v, { sx: { color: "text.lighter" }, fontSize: "13px", children: ((N = (S = c.category) == null ? void 0 : S.locales) == null ? void 0 : N[o || "en"]) || "" })
1178
1181
  ] })
1179
1182
  ]
1180
1183
  },
1181
1184
  c.did
1182
1185
  );
1183
1186
  }
1184
- function q(c) {
1185
- if ([de, Ae].includes(c.name))
1187
+ function Z(c) {
1188
+ if ([he, Fe].includes(c.name))
1186
1189
  return /* @__PURE__ */ t(
1187
1190
  y,
1188
1191
  {
1189
- width: ue,
1192
+ width: pe,
1190
1193
  p: "6px",
1191
1194
  display: "flex",
1192
1195
  justifyContent: "center",
@@ -1194,52 +1197,52 @@ function ur({
1194
1197
  color: "text.lighter",
1195
1198
  bgcolor: "#F1F3F5",
1196
1199
  borderRadius: "8px",
1197
- children: /* @__PURE__ */ t(ee, { sx: { fontSize: 28 } })
1200
+ children: /* @__PURE__ */ t(te, { sx: { fontSize: 28 } })
1198
1201
  }
1199
1202
  );
1200
- let C = "";
1201
- return c.logo && (C = Se(e, "assets", c.did, Ve(c.logo, ue, c.version))), /* @__PURE__ */ t($e, { src: C, size: ue, style: { borderRadius: "8px", overflow: "hidden" } });
1203
+ let S = "";
1204
+ return c.logo && (S = Be(e, "assets", c.did, qe(c.logo, pe, c.version))), /* @__PURE__ */ t(He, { src: S, size: pe, style: { borderRadius: "8px", overflow: "hidden" } });
1202
1205
  }
1203
- function G(c = !0) {
1204
- return /* @__PURE__ */ t(y, { sx: { display: "flex", pl: 0.5, alignItems: "center", color: "text.lighter" }, children: c && m && S ? /* @__PURE__ */ t(ne, { color: "inherit", size: 16 }) : /* @__PURE__ */ t(ee, { sx: { fontSize: 16, cursor: "default" } }) });
1206
+ function H(c = !0) {
1207
+ return /* @__PURE__ */ t(y, { sx: { display: "flex", pl: 0.5, alignItems: "center", color: "text.lighter" }, children: c && u && B ? /* @__PURE__ */ t(le, { color: "inherit", size: 16 }) : /* @__PURE__ */ t(te, { sx: { fontSize: 16, cursor: "default" } }) });
1205
1208
  }
1206
- function Y() {
1207
- return m ? /* @__PURE__ */ t(y, { sx: { display: "flex", alignItems: "center", color: "text.lighter" }, children: /* @__PURE__ */ t(we, { sx: { fontSize: 20, cursor: "pointer" }, onClick: () => Q() }) }) : null;
1209
+ function K() {
1210
+ return u ? /* @__PURE__ */ t(y, { sx: { display: "flex", alignItems: "center", color: "text.lighter" }, children: /* @__PURE__ */ t(ke, { sx: { fontSize: 20, cursor: "pointer" }, onClick: () => j() }) }) : null;
1208
1211
  }
1209
1212
  }
1210
- function hr({ placeholder: e = "Type to search...", ...r }) {
1211
- const { search: o } = R(), { filters: n, handleKeyword: l } = o, [s, a] = E(n.keyword || ""), i = Me(l, { wait: 300 }), u = (x) => {
1212
- const { value: m } = x.target;
1213
- a(m), i.run(m);
1213
+ function pr({ placeholder: e = "Type to search...", ...r }) {
1214
+ const { search: o } = R(), { filters: n, handleKeyword: l } = o, [a, s] = E(n.keyword || ""), i = De(l, { wait: 300 }), m = (f) => {
1215
+ const { value: u } = f.target;
1216
+ s(u), i.run(u);
1214
1217
  }, d = () => {
1215
- a(""), l("");
1218
+ s(""), l("");
1216
1219
  };
1217
- return H(() => {
1218
- a(n.keyword || "");
1220
+ return G(() => {
1221
+ s(n.keyword || "");
1219
1222
  }, [n.keyword]), /* @__PURE__ */ t(
1220
- pr,
1223
+ mr,
1221
1224
  {
1222
1225
  inputProps: {
1223
1226
  "data-cy": "search-blocklet"
1224
1227
  },
1225
- startAdornment: /* @__PURE__ */ t(Te, { position: "start", children: /* @__PURE__ */ t(mr, {}) }),
1226
- onChange: u,
1228
+ startAdornment: /* @__PURE__ */ t(Ae, { position: "start", children: /* @__PURE__ */ t(fr, { sx: { fontSize: 18, ml: -0.5 } }) }),
1229
+ onChange: m,
1227
1230
  placeholder: e,
1228
- value: s,
1231
+ value: a,
1229
1232
  title: e,
1230
1233
  "data-cy": "search",
1231
- endAdornment: s && /* @__PURE__ */ t(Te, { position: "end", children: /* @__PURE__ */ t(fr, { "data-cy": "search-delete", onClick: d }) }),
1234
+ endAdornment: a && /* @__PURE__ */ t(Ae, { position: "end", children: /* @__PURE__ */ t(gr, { "data-cy": "search-delete", onClick: d }) }),
1232
1235
  ...r
1233
1236
  }
1234
1237
  );
1235
1238
  }
1236
- const pr = X(je)`
1239
+ const mr = Q(Ue)`
1237
1240
  background-color: ${(e) => e.theme.palette.grey[50]};
1238
1241
  font-size: 14px;
1239
1242
  border-radius: 6px;
1240
1243
  width: 100%;
1241
1244
  .MuiInputBase-input {
1242
- padding: 8px 0 8px 10px;
1245
+ padding: 8px 0 8px 0px;
1243
1246
  }
1244
1247
  .MuiOutlinedInput-notchedOutline {
1245
1248
  border: none;
@@ -1250,22 +1253,34 @@ const pr = X(je)`
1250
1253
  color: transparent;
1251
1254
  }
1252
1255
  }
1253
- `, mr = X(ee)`
1256
+ `, fr = Q(te)`
1254
1257
  color: ${(e) => e.theme.palette.grey[500]};
1255
- font-size: 28px;
1256
- @media (max-width: ${(e) => e.theme.breakpoints.values.md}px) {
1257
- font-size: 24px;
1258
- }
1259
- `, fr = X(we)`
1258
+ `, gr = Q(ke)`
1260
1259
  color: ${(e) => e.theme.palette.grey[500]};
1261
1260
  font-size: 16px;
1262
1261
  cursor: pointer;
1263
1262
  `;
1264
- function gr() {
1265
- const { search: e, t: r, endpoint: o, locale: n, getCategoryLocale: l, developerName: s, showResourcesSwitch: a, layout: i, baseSearch: u } = R(), { filters: d, handleSort: x, handlePrice: m, handleDeveloper: f, handleSwitchShowResources: k, cleanFilter: g } = e, B = Ue(r);
1263
+ function xr() {
1264
+ var b;
1265
+ const {
1266
+ search: e,
1267
+ t: r,
1268
+ endpoint: o,
1269
+ locale: n,
1270
+ getCategoryLocale: l,
1271
+ developerName: a,
1272
+ showResourcesSwitch: s,
1273
+ layout: i,
1274
+ baseSearch: m,
1275
+ categoryOptions: d,
1276
+ compact: f
1277
+ } = R(), { filters: u, handleSort: x, handlePrice: w, handleDeveloper: I, handleSwitchShowResources: g, cleanFilter: B, handleCategory: p } = e, C = Ge(r);
1266
1278
  return /* @__PURE__ */ h(
1267
1279
  F,
1268
1280
  {
1281
+ position: "sticky",
1282
+ top: 0,
1283
+ zIndex: 1e3,
1269
1284
  className: "filter-bar",
1270
1285
  direction: { xs: "column", md: "row" },
1271
1286
  alignItems: { xs: "flex-start", md: "center" },
@@ -1274,21 +1289,23 @@ function gr() {
1274
1289
  spacing: { xs: 1, md: 0 },
1275
1290
  pt: { xs: 2, md: 0 },
1276
1291
  px: 0,
1277
- pb: 3,
1292
+ pb: f ? 2 : 3,
1293
+ sx: { backgroundColor: "background.default" },
1278
1294
  children: [
1279
- /* @__PURE__ */ t(b, { variant: "h2", textTransform: "capitalize", children: l(d.category) }),
1295
+ !f && /* @__PURE__ */ t(v, { variant: "h2", textTransform: "capitalize", children: l(u.category) }),
1280
1296
  /* @__PURE__ */ h(
1281
1297
  F,
1282
1298
  {
1283
1299
  flex: 1,
1284
1300
  direction: "row",
1285
1301
  alignItems: "center",
1302
+ flexWrap: { xs: "wrap", md: "nowrap" },
1286
1303
  width: "100%",
1287
- justifyContent: { xs: "space-between", md: "flex-end" },
1304
+ justifyContent: { xs: "flex-start", md: "flex-end" },
1288
1305
  gap: 2,
1289
1306
  children: [
1290
- i.showSearch ? /* @__PURE__ */ t(y, { flex: 1, children: u ? /* @__PURE__ */ t(hr, {}) : /* @__PURE__ */ t(
1291
- ur,
1307
+ i.showSearch ? /* @__PURE__ */ t(y, { flex: 1, flexBasis: { xs: "100%", md: "auto" }, children: m ? /* @__PURE__ */ t(pr, {}) : /* @__PURE__ */ t(
1308
+ hr,
1292
1309
  {
1293
1310
  locale: n,
1294
1311
  endpoint: o,
@@ -1304,45 +1321,54 @@ function gr() {
1304
1321
  handleSearchSelect: e.handleSearchSelect
1305
1322
  }
1306
1323
  ) }) : null,
1307
- d.owner && s && /* @__PURE__ */ t(
1308
- Re,
1324
+ u.owner && a && /* @__PURE__ */ t(
1325
+ Pe,
1309
1326
  {
1310
- label: r("blocklet.authorTag", { name: s }),
1327
+ label: r("blocklet.authorTag", { name: a }),
1311
1328
  size: "small",
1312
- onDelete: () => f("")
1329
+ onDelete: () => I("")
1313
1330
  }
1314
1331
  ),
1315
- d.resourceDid && d.resourceBlocklet && /* @__PURE__ */ t(
1316
- Re,
1332
+ u.resourceDid && u.resourceBlocklet && /* @__PURE__ */ t(
1333
+ Pe,
1317
1334
  {
1318
- label: r("blocklet.resourceTag", { name: d.resourceBlocklet }),
1335
+ label: r("blocklet.resourceTag", { name: u.resourceBlocklet }),
1319
1336
  size: "small",
1320
- onDelete: () => g(["resourceDid", "resourceBlocklet", "showResources"])
1337
+ onDelete: () => B(["resourceDid", "resourceBlocklet", "showResources"])
1321
1338
  }
1322
1339
  ),
1323
- a ? /* @__PURE__ */ t(
1324
- Ee,
1340
+ s ? /* @__PURE__ */ t(
1341
+ Le,
1325
1342
  {
1326
- checked: d.showResources !== "false",
1327
- onChange: (S) => k(S ? "true" : "false"),
1343
+ checked: u.showResources !== "false",
1344
+ onChange: (k) => g(k ? "true" : "false"),
1328
1345
  label: r("common.showResources")
1329
1346
  }
1330
1347
  ) : null,
1331
1348
  /* @__PURE__ */ t(
1332
- Ee,
1349
+ Le,
1333
1350
  {
1334
- checked: d.price === "free",
1335
- onChange: (S) => m(S ? "free" : ""),
1351
+ checked: u.price === "free",
1352
+ onChange: (k) => w(k ? "free" : ""),
1336
1353
  label: r("blocklet.free")
1337
1354
  }
1338
1355
  ),
1356
+ f && /* @__PURE__ */ t(y, { children: /* @__PURE__ */ t(
1357
+ xe,
1358
+ {
1359
+ value: u.category || ((b = d[0]) == null ? void 0 : b.value),
1360
+ options: d,
1361
+ placeholder: r("common.category"),
1362
+ onChange: (k) => p(k)
1363
+ }
1364
+ ) }),
1339
1365
  /* @__PURE__ */ t(
1340
- Qe,
1366
+ xe,
1341
1367
  {
1342
- value: d.sortBy || B[0].value,
1343
- options: B,
1368
+ value: u.sortBy || C[0].value,
1369
+ options: C,
1344
1370
  placeholder: r("sort.sort"),
1345
- onChange: (S) => x(S)
1371
+ onChange: (k) => x(k)
1346
1372
  }
1347
1373
  )
1348
1374
  ]
@@ -1352,22 +1378,22 @@ function gr() {
1352
1378
  }
1353
1379
  );
1354
1380
  }
1355
- function Ee({
1381
+ function Le({
1356
1382
  checked: e,
1357
1383
  onChange: r,
1358
1384
  label: o
1359
1385
  }) {
1360
1386
  return /* @__PURE__ */ t(
1361
- De,
1387
+ We,
1362
1388
  {
1363
1389
  sx: { m: 0, p: 0 },
1364
1390
  className: "check-button",
1365
1391
  control: /* @__PURE__ */ t(
1366
- ze,
1392
+ Ne,
1367
1393
  {
1368
1394
  checked: e,
1369
- icon: /* @__PURE__ */ t(K, { style: { padding: 0 }, icon: Pt }),
1370
- checkedIcon: /* @__PURE__ */ t(K, { style: { padding: 0, color: "#3478E2" }, icon: At }),
1395
+ icon: /* @__PURE__ */ t(X, { style: { padding: 0 }, icon: At }),
1396
+ checkedIcon: /* @__PURE__ */ t(X, { style: { padding: 0, color: "#3478E2" }, icon: Et }),
1371
1397
  size: "large",
1372
1398
  sx: { p: 0, mr: 1 },
1373
1399
  onChange: (n) => r(n.target.checked)
@@ -1377,123 +1403,123 @@ function Ee({
1377
1403
  }
1378
1404
  );
1379
1405
  }
1380
- function J({ children: e }) {
1406
+ function ee({ children: e }) {
1381
1407
  return /* @__PURE__ */ h(y, { display: "flex", mt: 2, flexDirection: "column", alignItems: "center", justifyContent: "center", color: "text.lighter", children: [
1382
- /* @__PURE__ */ t(_t, {}),
1408
+ /* @__PURE__ */ t(Mt, {}),
1383
1409
  e
1384
1410
  ] });
1385
1411
  }
1386
- function Fe() {
1412
+ function Oe() {
1387
1413
  const { t: e } = R();
1388
- return /* @__PURE__ */ t(b, { style: { textAlign: "center" }, variant: "subtitle2", children: e("blocklet.noResults") });
1414
+ return /* @__PURE__ */ t(v, { style: { textAlign: "center" }, variant: "subtitle2", children: e("blocklet.noResults") });
1389
1415
  }
1390
- function he({ filterTip: e, keywordTip: r }) {
1416
+ function me({ filterTip: e, keywordTip: r }) {
1391
1417
  const { t: o, locale: n } = R(), l = () => n === "zh" ? "、" : " , ";
1392
1418
  return /* @__PURE__ */ h(y, { mt: 1, display: "flex", children: [
1393
- /* @__PURE__ */ t(b, { style: { marginRight: "16px" }, children: o("blocklet.emptyTip") }),
1394
- e && /* @__PURE__ */ t(b, { children: o("blocklet.filterTip") }),
1419
+ /* @__PURE__ */ t(v, { style: { marginRight: "16px" }, children: o("blocklet.emptyTip") }),
1420
+ e && /* @__PURE__ */ t(v, { children: o("blocklet.filterTip") }),
1395
1421
  e && r && l(),
1396
- r && /* @__PURE__ */ t(b, { children: o("blocklet.keywordTip") })
1422
+ r && /* @__PURE__ */ t(v, { children: o("blocklet.keywordTip") })
1397
1423
  ] });
1398
1424
  }
1399
- function pe({
1425
+ function fe({
1400
1426
  primaryStart: e,
1401
1427
  primaryEnd: r,
1402
1428
  filter: o
1403
1429
  }) {
1404
- return /* @__PURE__ */ h(b, { variant: "subtitle2", display: "flex", gap: 0.5, mx: 0.5, children: [
1405
- /* @__PURE__ */ t(b, { children: e }),
1406
- /* @__PURE__ */ t(b, { color: "primary", children: o }),
1407
- /* @__PURE__ */ h(b, { children: [
1430
+ return /* @__PURE__ */ h(v, { variant: "subtitle2", display: "flex", gap: 0.5, mx: 0.5, children: [
1431
+ /* @__PURE__ */ t(v, { children: e }),
1432
+ /* @__PURE__ */ t(v, { color: "primary", children: o }),
1433
+ /* @__PURE__ */ h(v, { children: [
1408
1434
  r,
1409
1435
  " "
1410
1436
  ] })
1411
1437
  ] });
1412
1438
  }
1413
- function xr() {
1414
- const { t: e, search: r, getCategoryLocale: o, selectedCategory: n } = R(), { filters: l } = r, s = !!n || !!l.price;
1415
- if (l.keyword && s)
1416
- return /* @__PURE__ */ h(J, { children: [
1439
+ function yr() {
1440
+ const { t: e, search: r, getCategoryLocale: o, selectedCategory: n } = R(), { filters: l } = r, a = !!n || !!l.price;
1441
+ if (l.keyword && a)
1442
+ return /* @__PURE__ */ h(ee, { children: [
1417
1443
  /* @__PURE__ */ t(
1418
- pe,
1444
+ fe,
1419
1445
  {
1420
1446
  primaryStart: e("blocklet.noBlockletPart1"),
1421
1447
  primaryEnd: e("blocklet.noBlockletPart2"),
1422
1448
  filter: l.keyword
1423
1449
  }
1424
1450
  ),
1425
- /* @__PURE__ */ t(he, { keywordTip: !0, filterTip: !0 })
1451
+ /* @__PURE__ */ t(me, { keywordTip: !0, filterTip: !0 })
1426
1452
  ] });
1427
1453
  if (l.keyword)
1428
- return /* @__PURE__ */ h(J, { children: [
1454
+ return /* @__PURE__ */ h(ee, { children: [
1429
1455
  /* @__PURE__ */ t(
1430
- pe,
1456
+ fe,
1431
1457
  {
1432
1458
  primaryStart: e("blocklet.noBlockletPart1"),
1433
1459
  primaryEnd: e("blocklet.noBlockletPart2"),
1434
1460
  filter: l.keyword
1435
1461
  }
1436
1462
  ),
1437
- /* @__PURE__ */ t(he, { keywordTip: !0 })
1463
+ /* @__PURE__ */ t(me, { keywordTip: !0 })
1438
1464
  ] });
1439
- if (s) {
1440
- const a = o(n);
1441
- return /* @__PURE__ */ h(J, { children: [
1442
- a ? /* @__PURE__ */ t(
1443
- pe,
1465
+ if (a) {
1466
+ const s = o(n);
1467
+ return /* @__PURE__ */ h(ee, { children: [
1468
+ s ? /* @__PURE__ */ t(
1469
+ fe,
1444
1470
  {
1445
1471
  primaryStart: e("blocklet.noCategoryResults1"),
1446
1472
  primaryEnd: e("blocklet.noCategoryResults2"),
1447
- filter: a
1473
+ filter: s
1448
1474
  }
1449
- ) : /* @__PURE__ */ t(Fe, {}),
1450
- /* @__PURE__ */ t(he, { filterTip: !0 })
1475
+ ) : /* @__PURE__ */ t(Oe, {}),
1476
+ /* @__PURE__ */ t(me, { filterTip: !0 })
1451
1477
  ] });
1452
1478
  }
1453
- return /* @__PURE__ */ t(J, { children: /* @__PURE__ */ t(Fe, {}) });
1479
+ return /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(Oe, {}) });
1454
1480
  }
1455
- const yr = (e, r, o, n) => ct(
1481
+ const wr = (e, r, o, n) => dt(
1456
1482
  async (l) => {
1457
1483
  l || (o.currentPage = o.defaultCurrentPage);
1458
- const { currentPage: s, pageSize: a } = o, i = {
1484
+ const { currentPage: a, pageSize: s } = o, i = {
1459
1485
  ...r,
1460
1486
  category: r.category === "All" ? "" : r.category,
1461
1487
  sortBy: P[r.sortBy],
1462
- page: s,
1463
- pageSize: a
1488
+ page: a,
1489
+ pageSize: s
1464
1490
  };
1465
1491
  n(null);
1466
- const { data: u = {} } = await e.get(P.blockletsPath, { params: i });
1467
- return o.currentPage++, { page: s, pageSize: a, list: (u == null ? void 0 : u.dataList) || [], total: (u == null ? void 0 : u.total) || 0 };
1492
+ const { data: m = {} } = await e.get(P.blockletsPath, { params: i });
1493
+ return o.currentPage++, { page: a, pageSize: s, list: (m == null ? void 0 : m.dataList) || [], total: (m == null ? void 0 : m.total) || 0 };
1468
1494
  },
1469
1495
  {
1470
1496
  isNoMore: (l) => l ? l.page * l.pageSize >= l.total : !1,
1471
- reloadDeps: [e, Mt(r)],
1497
+ reloadDeps: [e, zt(r)],
1472
1498
  onError: n
1473
1499
  }
1474
1500
  );
1475
- function wr() {
1476
- var m;
1477
- const { storeApi: e, search: r, extraFilter: o, errors: n, updateDeveloperName: l } = R(), { filters: s } = r, a = dt({
1501
+ function br() {
1502
+ var u;
1503
+ const { storeApi: e, search: r, extraFilter: o, errors: n, updateDeveloperName: l } = R(), { filters: a } = r, s = ut({
1478
1504
  currentPage: P.currentPage,
1479
- pageSize: Gt() ? P.mobilePageSize : P.pageSize,
1505
+ pageSize: Kt() ? P.mobilePageSize : P.pageSize,
1480
1506
  defaultCurrentPage: P.defaultCurrentPage
1481
- }), [i, u] = E(null), d = yr(e, s, a, u), x = j(
1507
+ }), [i, m] = E(null), d = wr(e, a, s, m), f = V(
1482
1508
  () => {
1483
- var f, k;
1484
- return o ? o(((f = d.data) == null ? void 0 : f.list) || []) : ((k = d.data) == null ? void 0 : k.list) || [];
1509
+ var x, w;
1510
+ return o ? o(((x = d.data) == null ? void 0 : x.list) || []) : ((w = d.data) == null ? void 0 : w.list) || [];
1485
1511
  },
1486
1512
  [d.data, o]
1487
1513
  );
1488
- return H(() => {
1489
- const f = x.find((k) => k.owner.did === s.owner);
1490
- l((f == null ? void 0 : f.owner.fullName) || (f == null ? void 0 : f.author.name) || "");
1491
- }, [s.owner, x, l]), {
1492
- blocklets: x,
1514
+ return G(() => {
1515
+ const x = f.find((w) => w.owner.did === a.owner);
1516
+ l((x == null ? void 0 : x.owner.fullName) || (x == null ? void 0 : x.author.name) || "");
1517
+ }, [a.owner, f, l]), {
1518
+ blocklets: f,
1493
1519
  fetchBlockletsError: i,
1494
1520
  loadMore: d.loadMore,
1495
1521
  hasNextPage: !d.noMore,
1496
- total: ((m = d.data) == null ? void 0 : m.total) || 0,
1522
+ total: ((u = d.data) == null ? void 0 : u.total) || 0,
1497
1523
  loadings: {
1498
1524
  fetchBlockletsLoading: d.loading,
1499
1525
  loadingMore: d.loadingMore
@@ -1504,54 +1530,55 @@ function wr() {
1504
1530
  }
1505
1531
  };
1506
1532
  }
1507
- function br() {
1508
- const { t: e, search: r, endpoint: o, blockletRender: n, serverVersion: l, minItemWidth: s, layout: a, baseSearch: i } = R(), { filters: u } = r, { blocklets: d, errors: x, loadMore: m, loadings: f, hasNextPage: k, total: g } = wr(), [B] = Tt({
1509
- loading: f.fetchBlockletsLoading || f.loadingMore,
1510
- hasNextPage: k,
1511
- onLoadMore: m
1533
+ function kr() {
1534
+ const { t: e, search: r, endpoint: o, blockletRender: n, serverVersion: l, minItemWidth: a, layout: s, baseSearch: i, compact: m } = R(), { filters: d } = r, { blocklets: f, errors: u, loadMore: x, loadings: w, hasNextPage: I, total: g } = br(), [B] = Pt({
1535
+ loading: w.fetchBlockletsLoading || w.loadingMore,
1536
+ hasNextPage: I,
1537
+ onLoadMore: x
1512
1538
  });
1513
- if (x.fetchBlockletsError) {
1514
- const w = new Error(`Failed to fetch blocklets from ${o}: ${x.fetchBlockletsError.message}`);
1515
- return /* @__PURE__ */ t(ye, { error: w });
1539
+ if (u.fetchBlockletsError) {
1540
+ const k = new Error(`Failed to fetch blocklets from ${o}: ${u.fetchBlockletsError.message}`);
1541
+ return /* @__PURE__ */ t(be, { error: k });
1516
1542
  }
1517
- const S = i && a.showSearch || !u.keyword;
1543
+ const p = i && s.showSearch || !d.keyword;
1518
1544
  return /* @__PURE__ */ h(M, { children: [
1519
- S ? /* @__PURE__ */ t(gr, {}) : /* @__PURE__ */ h(M, { children: [
1520
- /* @__PURE__ */ t(ve, { xs: /* @__PURE__ */ t(Ye, {}), md: null }),
1521
- v()
1545
+ p ? /* @__PURE__ */ t(xr, {}) : /* @__PURE__ */ h(M, { children: [
1546
+ /* @__PURE__ */ t(Se, { xs: /* @__PURE__ */ t(Ze, {}), md: null }),
1547
+ b()
1522
1548
  ] }),
1523
- p(),
1524
- !f.fetchBlockletsLoading && k && /* @__PURE__ */ t(y, { height: 60, display: "flex", justifyContent: "center", py: 2, ref: B, children: /* @__PURE__ */ t(ne, {}) })
1549
+ C(),
1550
+ !w.fetchBlockletsLoading && I && /* @__PURE__ */ t(y, { height: 70, minHeight: 70, display: "flex", justifyContent: "center", py: 2, overflow: "hidden", ref: B, children: /* @__PURE__ */ t(le, {}) })
1525
1551
  ] });
1526
- function p() {
1527
- return f.fetchBlockletsLoading ? /* @__PURE__ */ t(Ze, { mt: 15 }) : d.length ? /* @__PURE__ */ t(
1552
+ function C() {
1553
+ return w.fetchBlockletsLoading ? /* @__PURE__ */ t(Je, { mt: 15 }) : f.length ? /* @__PURE__ */ t(
1528
1554
  y,
1529
1555
  {
1530
1556
  className: "blocklet-list",
1531
1557
  display: "grid",
1532
1558
  gridTemplateColumns: {
1533
1559
  xs: "1fr",
1534
- sm: `repeat(auto-fill, minmax(${s}px, 1fr))`
1560
+ sm: `repeat(auto-fill, minmax(${a}px, 1fr))`
1535
1561
  },
1536
1562
  p: "2px",
1537
- gap: 2,
1538
- children: d.map((w) => /* @__PURE__ */ t(
1563
+ rowGap: 2,
1564
+ columnGap: m ? 0 : 2,
1565
+ children: f.map((k) => /* @__PURE__ */ t(
1539
1566
  y,
1540
1567
  {
1541
- "data-blocklet-did": w.did,
1568
+ "data-blocklet-did": k.did,
1542
1569
  minWidth: {
1543
1570
  xs: "100%",
1544
- sm: s
1571
+ sm: a
1545
1572
  },
1546
1573
  maxWidth: "calc(100vw - 32px)",
1547
- children: n({ blocklet: w, blocklets: d, serverVersion: l })
1574
+ children: n({ blocklet: k, blocklets: f, serverVersion: l })
1548
1575
  },
1549
- w.did
1576
+ k.did
1550
1577
  ))
1551
1578
  }
1552
- ) : /* @__PURE__ */ t(xr, {});
1579
+ ) : /* @__PURE__ */ t(yr, {});
1553
1580
  }
1554
- function v() {
1581
+ function b() {
1555
1582
  return /* @__PURE__ */ h(
1556
1583
  F,
1557
1584
  {
@@ -1562,17 +1589,17 @@ function br() {
1562
1589
  mb: 2,
1563
1590
  mt: { xs: 2, md: 0 },
1564
1591
  children: [
1565
- /* @__PURE__ */ t(b, { variant: "h3", children: e("blocklet.search", { keyword: u.keyword }) }),
1566
- /* @__PURE__ */ t(b, { variant: "body1", color: "text.lighter", fontSize: 13, children: e("blocklet.resultCount", { count: g }) })
1592
+ /* @__PURE__ */ t(v, { variant: "h3", children: e("blocklet.search", { keyword: d.keyword }) }),
1593
+ /* @__PURE__ */ t(v, { variant: "body1", color: "text.lighter", fontSize: 13, children: e("blocklet.resultCount", { count: g }) })
1567
1594
  ]
1568
1595
  }
1569
1596
  );
1570
1597
  }
1571
1598
  }
1572
- function kr() {
1573
- const { t: e, selectedCategory: r, getCategoryLocale: o } = R(), { toggleOpen: n } = ke();
1599
+ function vr() {
1600
+ const { t: e, selectedCategory: r, getCategoryLocale: o } = R(), { toggleOpen: n } = Ce();
1574
1601
  return /* @__PURE__ */ h(
1575
- b,
1602
+ v,
1576
1603
  {
1577
1604
  variant: "body1",
1578
1605
  display: { xs: "flex", md: "none" },
@@ -1581,30 +1608,54 @@ function kr() {
1581
1608
  py: 2,
1582
1609
  fontWeight: "fontWeightMedium",
1583
1610
  children: [
1584
- /* @__PURE__ */ t(Xe, { onClick: () => n(!0), children: /* @__PURE__ */ t(zt, {}) }),
1611
+ /* @__PURE__ */ t(Ye, { onClick: () => n(!0), children: /* @__PURE__ */ t(Dt, {}) }),
1585
1612
  o(r) || e("common.category")
1586
1613
  ]
1587
1614
  }
1588
1615
  );
1589
1616
  }
1590
- function vr({ menus: e, children: r }) {
1591
- var i;
1592
- const { search: o, layout: n } = R(), { filters: l } = o, s = l.category || l.keyword || l.price, a = (i = e == null ? void 0 : e.find((u) => u.key === l.menu)) == null ? void 0 : i.key;
1593
- return /* @__PURE__ */ t(Wt, { children: /* @__PURE__ */ h(it, { FallbackComponent: ye, children: [
1594
- /* @__PURE__ */ t(kr, {}),
1595
- /* @__PURE__ */ h(y, { display: "flex", height: "100%", className: "list-container", pt: { xs: 0, md: 5 }, children: [
1596
- /* @__PURE__ */ t(or, { menus: e }),
1597
- /* @__PURE__ */ h(F, { height: "100%", position: "relative", flex: 1, overflow: "visible", children: [
1598
- a && (r == null ? void 0 : r(a)),
1599
- !a && (n.showExplore && !s ? /* @__PURE__ */ t(dr, {}) : /* @__PURE__ */ t(br, {}))
1600
- ] })
1601
- ] })
1617
+ function Cr({ menus: e, children: r }) {
1618
+ var d;
1619
+ const { search: o, layout: n, compact: l } = R(), { filters: a } = o, s = re(null), i = a.category || a.keyword || a.price, m = (d = e == null ? void 0 : e.find((f) => f.key === a.menu)) == null ? void 0 : d.key;
1620
+ return /* @__PURE__ */ t($t, { children: /* @__PURE__ */ h(st, { FallbackComponent: be, children: [
1621
+ !l && /* @__PURE__ */ t(vr, {}),
1622
+ /* @__PURE__ */ h(
1623
+ y,
1624
+ {
1625
+ ref: s,
1626
+ display: "flex",
1627
+ height: "100%",
1628
+ className: "list-container",
1629
+ pt: { xs: 0, md: l ? 0 : 5 },
1630
+ children: [
1631
+ /* @__PURE__ */ t(nr, { menus: e }),
1632
+ /* @__PURE__ */ h(
1633
+ F,
1634
+ {
1635
+ height: "100%",
1636
+ position: "relative",
1637
+ flex: 1,
1638
+ sx: l ? {
1639
+ overflowY: "auto",
1640
+ ml: -2,
1641
+ pr: 1,
1642
+ pb: 2
1643
+ } : { overflow: "visible" },
1644
+ children: [
1645
+ m && (r == null ? void 0 : r(m)),
1646
+ !m && (n.showExplore && !i ? /* @__PURE__ */ t(ur, {}) : /* @__PURE__ */ t(kr, {}))
1647
+ ]
1648
+ }
1649
+ )
1650
+ ]
1651
+ }
1652
+ )
1602
1653
  ] }) });
1603
1654
  }
1604
- function Ao(e) {
1605
- return /* @__PURE__ */ h(Dt, { variant: "outlined", ...e, sx: { maxWidth: 400, borderRadius: "8px", p: { xs: 2, md: 3 }, ...e.sx }, children: [
1606
- /* @__PURE__ */ h(ae, { display: "flex", alignItems: "center", gap: 2, pb: 1, children: [
1607
- /* @__PURE__ */ h(ae, { display: "flex", alignItems: "center", gap: 2, flex: 1, children: [
1655
+ function Eo(e) {
1656
+ return /* @__PURE__ */ h(Nt, { variant: "outlined", ...e, sx: { maxWidth: 400, borderRadius: "8px", p: { xs: 2, md: 3 }, ...e.sx }, children: [
1657
+ /* @__PURE__ */ h(ce, { display: "flex", alignItems: "center", gap: 2, pb: 1, children: [
1658
+ /* @__PURE__ */ h(ce, { display: "flex", alignItems: "center", gap: 2, flex: 1, children: [
1608
1659
  /* @__PURE__ */ t(L, { variant: "rounded", width: 48, height: 48 }),
1609
1660
  /* @__PURE__ */ t(L, { variant: "text", width: 60, height: 28 })
1610
1661
  ] }),
@@ -1612,7 +1663,7 @@ function Ao(e) {
1612
1663
  ] }),
1613
1664
  /* @__PURE__ */ t(L, { variant: "text", width: "100%", height: 24 }),
1614
1665
  /* @__PURE__ */ t(L, { variant: "text", width: "90%", height: 24 }),
1615
- /* @__PURE__ */ h(ae, { display: "flex", alignItems: "center", gap: 1, pt: 1.5, children: [
1666
+ /* @__PURE__ */ h(ce, { display: "flex", alignItems: "center", gap: 1, pt: 1.5, children: [
1616
1667
  /* @__PURE__ */ t(L, { variant: "rounded", width: 24, height: 24 }),
1617
1668
  /* @__PURE__ */ t(L, { variant: "text", width: "15%", height: 20 }),
1618
1669
  /* @__PURE__ */ t(L, { variant: "rounded", width: 24, height: 24, sx: { ml: 1 } }),
@@ -1620,12 +1671,12 @@ function Ao(e) {
1620
1671
  ] })
1621
1672
  ] });
1622
1673
  }
1623
- function Eo({ showSkeleton: e, ...r }) {
1624
- return e ? /* @__PURE__ */ t(O, { variant: "rectangular", width: r.width, height: r.height }) : /* @__PURE__ */ t(Nt, { ...r });
1674
+ function Fo({ showSkeleton: e, ...r }) {
1675
+ return e ? /* @__PURE__ */ t(O, { variant: "rectangular", width: r.width, height: r.height }) : /* @__PURE__ */ t(Wt, { ...r });
1625
1676
  }
1626
- function Fo(e) {
1627
- const { menus: r, children: o, ...n } = e, l = xe(), s = Je(
1628
- nt({
1677
+ function Lo(e) {
1678
+ const { menus: r, children: o, ...n } = e, l = we(), a = et(
1679
+ it({
1629
1680
  ...l,
1630
1681
  typography: {
1631
1682
  h1: {
@@ -1653,12 +1704,12 @@ function Fo(e) {
1653
1704
  }
1654
1705
  })
1655
1706
  );
1656
- return /* @__PURE__ */ t(et, { theme: s, children: /* @__PURE__ */ t(Zt, { ...n, children: /* @__PURE__ */ t(vr, { menus: r, children: o }) }) });
1707
+ return /* @__PURE__ */ t(tt, { theme: a, children: /* @__PURE__ */ t(Jt, { ...n, children: /* @__PURE__ */ t(Cr, { menus: r, children: o }) }) });
1657
1708
  }
1658
1709
  export {
1659
- ur as Autocomplete,
1660
- Ao as CardSkeleton,
1661
- Eo as Image,
1662
- Fo as default,
1663
- jt as useSearch
1710
+ hr as Autocomplete,
1711
+ Eo as CardSkeleton,
1712
+ Fo as Image,
1713
+ Lo as default,
1714
+ Ht as useSearch
1664
1715
  };