@blocklet/pages-kit-inner-components 0.6.81 → 0.6.82

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as T } from "react/jsx-runtime";
2
- import { u as N, c as U, d as se, e as ie, f as le, b as ce } from "./state-DNdwHwty.js";
3
- import { useLocaleContext as W } from "@arcblock/ux/lib/Locale/context";
4
- import V from "@arcblock/ux/lib/Result";
2
+ import { u as U, c as W, d as se, e as ie, f as le, b as ce } from "./state-DNdwHwty.js";
3
+ import { useLocaleContext as V } from "@arcblock/ux/lib/Locale/context";
4
+ import A from "@arcblock/ux/lib/Result";
5
5
  import { styled as M, useTheme as ue } from "@arcblock/ux/lib/Theme";
6
6
  import { useHeaderState as pe } from "@blocklet/pages-kit/builtin/page/header";
7
7
  import { useColorConvert as de } from "@blocklet/pages-kit/contexts/color";
@@ -10,18 +10,18 @@ import { generateParamCombinations as me } from "@blocklet/pages-kit/utils/route
10
10
  import ge from "@blocklet/ui-react/lib/Header";
11
11
  import { cx as he } from "@emotion/css";
12
12
  import { Global as q, css as K } from "@emotion/react";
13
- import { Box as k, CircularProgress as fe, useTheme as Y, Button as be, Stack as ye, alpha as $ } from "@mui/material";
13
+ import { Box as k, CircularProgress as fe, useTheme as Y, Button as be, Stack as ye, alpha as D } from "@mui/material";
14
14
  import { useReactive as J, useScroll as xe } from "ahooks";
15
15
  import ve from "isomorphic-dompurify";
16
16
  import R from "lodash/cloneDeep";
17
17
  import Pe from "lodash/isEmpty";
18
18
  import Q from "lodash/isEqual";
19
- import { useRef as A, useEffect as C, lazy as X, useMemo as x, Suspense as ke, useState as we } from "react";
19
+ import { useRef as B, useEffect as C, lazy as X, useMemo as x, Suspense as ke, useState as we } from "react";
20
20
  import { Helmet as Se } from "react-helmet";
21
21
  import { useSearchParams as Z, Routes as Ce, Route as S, Navigate as Ie, ScrollRestoration as Te } from "react-router-dom";
22
22
  import { useAsync as ee } from "react-use";
23
23
  import { joinURL as P } from "ufo";
24
- import { u as Re, S as je, i as D, P as Me, a as Oe, R as Ee, B as Le, b as te, g as Ae } from "./index-Bggolyu_.js";
24
+ import { u as Re, S as je, i as z, P as Me, a as Oe, R as Ee, B as Le, b as te, g as Ae } from "./index-C_FZEYtF.js";
25
25
  import Be from "@blocklet/ui-react/lib/Footer";
26
26
  import "webfontloader";
27
27
  import { u as _e, a as Fe } from "./session-Dx5M-1r2.js";
@@ -32,7 +32,7 @@ const $e = M(k)`
32
32
  }
33
33
  `;
34
34
  function De({ meta: t, ...o }) {
35
- const s = ue(), { getPageMetaStyle: n } = Re(), r = n();
35
+ const a = ue(), { getPageMetaStyle: n } = Re(), r = n();
36
36
  return /* @__PURE__ */ e(
37
37
  $e,
38
38
  {
@@ -51,7 +51,7 @@ function De({ meta: t, ...o }) {
51
51
  {
52
52
  ...o,
53
53
  meta: t,
54
- theme: s || {},
54
+ theme: a || {},
55
55
  sx: {
56
56
  // ...getPageMetaStyle(),
57
57
  }
@@ -62,10 +62,10 @@ function De({ meta: t, ...o }) {
62
62
  }
63
63
  let ze = null;
64
64
  function He(t) {
65
- const o = A(null), { type: s } = t;
65
+ const o = B(null), { type: a } = t;
66
66
  return C(() => {
67
- s === "app" && o.current;
68
- }, [s]), /* @__PURE__ */ e(
67
+ a === "app" && o.current;
68
+ }, [a]), /* @__PURE__ */ e(
69
69
  k,
70
70
  {
71
71
  ...t,
@@ -85,7 +85,7 @@ function He(t) {
85
85
  },
86
86
  ...Array.isArray(t.sx) ? t.sx : [t.sx]
87
87
  ],
88
- children: s !== "app" && /* @__PURE__ */ e(fe, { size: 30 })
88
+ children: a !== "app" && /* @__PURE__ */ e(fe, { size: 30 })
89
89
  }
90
90
  );
91
91
  }
@@ -132,39 +132,39 @@ function Ve({
132
132
  }
133
133
  );
134
134
  }
135
- function z(t) {
135
+ function H(t) {
136
136
  return t != null;
137
137
  }
138
138
  function Tt() {
139
- const [t] = Z(), { session: o } = _e(), s = Fe("owner", "admin", "pagesEditor", "member"), n = x(() => {
140
- const a = t.get("mode");
141
- return je.includes(a) ? a : "production";
142
- }, [t]), r = n === "production" ? n : o.user ? s ? n : "production" : null;
143
- return r ? /* @__PURE__ */ e(Ge, { mode: r }) : null;
139
+ const [t] = Z(), { session: o } = _e(), a = Fe("owner", "admin", "pagesEditor", "member"), n = x(() => {
140
+ const r = t.get("mode");
141
+ return je.includes(r) ? r : "production";
142
+ }, [t]);
143
+ return n === "draft" && (!a || !o.user) ? /* @__PURE__ */ e(A, { status: "403" }) : /* @__PURE__ */ e(Ge, { mode: n });
144
144
  }
145
145
  function Ge({ mode: t }) {
146
146
  if (t !== "draft") {
147
147
  const o = window.__PAGE_STATE__;
148
- return o ? /* @__PURE__ */ e(L, { mode: t, state: o }) : /* @__PURE__ */ e(Ye, { mode: t, children: ({ state: s }) => /* @__PURE__ */ e(L, { mode: t, state: s }) });
148
+ return o ? /* @__PURE__ */ e(L, { mode: t, state: o }) : /* @__PURE__ */ e(Ye, { mode: t, children: ({ state: a }) => /* @__PURE__ */ e(L, { mode: t, state: a }) });
149
149
  }
150
150
  return /* @__PURE__ */ e(Ke, { children: ({ state: o }) => /* @__PURE__ */ e(L, { mode: t, state: o }) });
151
151
  }
152
- const qe = X(() => import("./publish-button-Dm2Nce-b.js")), Ke = X(() => import("./draft-data-BOoVhbon.js"));
152
+ const qe = X(() => import("./publish-button-ChpODI2O.js")), Ke = X(() => import("./draft-data-BOoVhbon.js"));
153
153
  function Ye({
154
154
  mode: t,
155
155
  children: o
156
156
  }) {
157
- const n = document.querySelector('meta[property="pages:version"]')?.content, r = N(), a = x(() => {
157
+ const n = document.querySelector('meta[property="pages:version"]')?.content, r = U(), i = x(() => {
158
158
  if (n === "{{pagesPublishedAt}}") {
159
159
  const u = localStorage.getItem(ce(r ?? ""));
160
160
  return Number(u) ? Number(u) : (/* @__PURE__ */ new Date()).getTime();
161
161
  }
162
162
  return Number(n);
163
- }, [n]), { loading: p, value: c } = ee(() => Ae({ mode: t, version: a }), [t, a]);
163
+ }, [n]), { loading: p, value: c } = ee(() => Ae({ mode: t, version: i }), [t, i]);
164
164
  return p ? /* @__PURE__ */ e(He, {}) : c ? o({ state: c }) : null;
165
165
  }
166
166
  function L({ mode: t, state: o }) {
167
- const { t: s, locale: n } = W(), [r] = Z(), a = N(), p = se(), c = r.get("hiddenBadge") === "true", u = r.get("showPublish") === "true", {
167
+ const { t: a, locale: n } = V(), [r] = Z(), i = U(), p = se(), c = r.get("hiddenBadge") === "true", u = r.get("showPublish") === "true", {
168
168
  pageIds: d,
169
169
  pages: l,
170
170
  routeIds: f,
@@ -172,52 +172,52 @@ function L({ mode: t, state: o }) {
172
172
  supportedLocales: g,
173
173
  config: { defaultLocale: y },
174
174
  resources: w
175
- } = o, b = U(o), v = x(
175
+ } = o, b = W(o), v = x(
176
176
  () => g?.some((h) => h.locale === n) ? n : void 0,
177
177
  [n, g]
178
- ), B = Object.values(m || {}).find((h) => h?.path === "/") || Object.values(l).find((h) => h?.slug === "/") ? void 0 : Object.values(l)[0], ae = x(() => t === "production" ? d?.map((h) => {
179
- const i = l[h];
180
- return i && {
181
- id: i.id,
182
- path: P("/", p || a || "", i.slug),
178
+ ), _ = Object.values(m || {}).find((h) => h?.path === "/") || Object.values(l).find((h) => h?.slug === "/") ? void 0 : Object.values(l)[0], ae = x(() => t === "production" ? d?.map((h) => {
179
+ const s = l[h];
180
+ return s && {
181
+ id: s.id,
182
+ path: P("/", p || i || "", s.slug),
183
183
  // 是否通过 Link 跳转,如果有 sectionIds 和 sections ,那么认为是内部页面,则通过 Link 跳转
184
- isLinkToPage: D(i)
184
+ isLinkToPage: z(s)
185
185
  };
186
- }).filter(z) : f?.map((h) => {
187
- const i = m[h];
188
- return i ? {
189
- id: i.id,
190
- path: P("/", p || a || "", i.path, `?mode=${t}&showPublish=true`)
186
+ }).filter(H) : f?.map((h) => {
187
+ const s = m[h];
188
+ return s ? {
189
+ id: s.id,
190
+ path: P("/", p || i || "", s.path, `?mode=${t}&showPublish=true`)
191
191
  } : null;
192
- }).filter(z), [d, l, t, m, f, a, p]), I = ([...h]) => (t !== "production" && u && h.unshift(
192
+ }).filter(H), [d, l, t, m, f, i, p]), I = ([...h]) => (t !== "production" && u && h.unshift(
193
193
  /* @__PURE__ */ e(ke, { fallback: /* @__PURE__ */ e("div", {}), children: /* @__PURE__ */ e(qe, { ref: { current: null }, mode: "production", state: o }) })
194
194
  ), h);
195
195
  return /* @__PURE__ */ T(Me, { value: { pages: ae }, children: [
196
196
  /* @__PURE__ */ T(Ce, { children: [
197
- B && /* @__PURE__ */ e(S, { index: !0, element: /* @__PURE__ */ e(Ie, { to: P("/", v || "", B.slug) }) }),
197
+ _ && /* @__PURE__ */ e(S, { index: !0, element: /* @__PURE__ */ e(Ie, { to: P("/", v || "", _.slug) }) }),
198
198
  f?.map((h) => {
199
- const i = m?.[h];
200
- if (!i || !i.displayTemplateId) return null;
201
- const O = l[i.displayTemplateId];
199
+ const s = m?.[h];
200
+ if (!s || !s.displayTemplateId) return null;
201
+ const O = l[s.displayTemplateId];
202
202
  if (!O) return null;
203
203
  let E = [];
204
- return i.params && i.params.length > 0 && (E = me({
205
- basePath: i.path,
206
- params: i.params,
207
- routeId: i.id,
208
- paramsOptions: i.paramsOptions,
204
+ return s.params && s.params.length > 0 && (E = me({
205
+ basePath: s.path,
206
+ params: s.params,
207
+ routeId: s.id,
208
+ paramsOptions: s.paramsOptions,
209
209
  currentIndex: 0,
210
210
  currentParams: [],
211
211
  currentOptionIds: [],
212
212
  result: []
213
- })?.map((_) => {
214
- const F = _.paramOptionIds.join("-");
213
+ })?.map((F) => {
214
+ const $ = F.paramOptionIds.join("-");
215
215
  return /* @__PURE__ */ e(
216
216
  S,
217
217
  {
218
- path: P(":projectIdOrSlug?", _.path),
218
+ path: P(":projectIdOrSlug?", F.path),
219
219
  element: /* @__PURE__ */ e(
220
- H,
220
+ N,
221
221
  {
222
222
  mode: t,
223
223
  components: b,
@@ -226,19 +226,19 @@ function L({ mode: t, state: o }) {
226
226
  defaultLocale: y,
227
227
  headerAddons: I,
228
228
  state: o,
229
- pageData: i.dataSource?.pathDataMappings?.[F]?.dataCache?.[v || y || "en"]
229
+ pageData: s.dataSource?.pathDataMappings?.[$]?.dataCache?.[v || y || "en"]
230
230
  }
231
231
  )
232
232
  },
233
- F
233
+ $
234
234
  );
235
235
  })), E.push(
236
236
  /* @__PURE__ */ e(
237
237
  S,
238
238
  {
239
- path: P(":projectIdOrSlug?", i.path),
239
+ path: P(":projectIdOrSlug?", s.path),
240
240
  element: /* @__PURE__ */ e(
241
- H,
241
+ N,
242
242
  {
243
243
  mode: t,
244
244
  components: b,
@@ -247,52 +247,52 @@ function L({ mode: t, state: o }) {
247
247
  defaultLocale: y,
248
248
  headerAddons: I,
249
249
  state: o,
250
- pageData: i.dataSource?.pathDataMappings?.[i.id]?.dataCache?.[v || y || "en"]
250
+ pageData: s.dataSource?.pathDataMappings?.[s.id]?.dataCache?.[v || y || "en"]
251
251
  }
252
252
  )
253
253
  },
254
- i.id
254
+ s.id
255
255
  )
256
256
  ), E;
257
257
  }),
258
258
  d?.map((h) => {
259
- const i = l[h];
260
- return !i || !D(i) ? null : /* @__PURE__ */ e(
259
+ const s = l[h];
260
+ return !s || !z(s) ? null : /* @__PURE__ */ e(
261
261
  S,
262
262
  {
263
- path: P(":projectIdOrSlug?", i.slug),
263
+ path: P(":projectIdOrSlug?", s.slug),
264
264
  element: /* @__PURE__ */ e(
265
265
  j,
266
266
  {
267
267
  mode: t,
268
268
  components: b,
269
- page: i,
269
+ page: s,
270
270
  locale: v,
271
271
  defaultLocale: y,
272
272
  headerAddons: I
273
273
  }
274
274
  )
275
275
  },
276
- i.id
276
+ s.id
277
277
  );
278
278
  }),
279
- w?.pages && Object.values(w?.pages)?.map(({ blockletId: h, page: i }) => /* @__PURE__ */ e(
279
+ w?.pages && Object.values(w?.pages)?.map(({ blockletId: h, page: s }) => /* @__PURE__ */ e(
280
280
  S,
281
281
  {
282
- path: P("/", `@${h}`, i.slug),
282
+ path: P("/", `@${h}`, s.slug),
283
283
  element: /* @__PURE__ */ e(
284
284
  j,
285
285
  {
286
286
  mode: t,
287
287
  components: b,
288
- page: i,
288
+ page: s,
289
289
  locale: v,
290
290
  defaultLocale: y,
291
291
  headerAddons: I
292
292
  }
293
293
  )
294
294
  },
295
- i.id
295
+ s.id
296
296
  )),
297
297
  /* @__PURE__ */ e(
298
298
  S,
@@ -309,10 +309,10 @@ function L({ mode: t, state: o }) {
309
309
  alignItems: "center"
310
310
  },
311
311
  children: /* @__PURE__ */ e(
312
- V,
312
+ A,
313
313
  {
314
314
  status: 404,
315
- extra: /* @__PURE__ */ e(re, { href: "/", children: s("common.back") }),
315
+ extra: /* @__PURE__ */ e(re, { href: "/", children: a("common.back") }),
316
316
  sx: {
317
317
  bgcolor: "transparent",
318
318
  width: "100%",
@@ -329,13 +329,13 @@ function L({ mode: t, state: o }) {
329
329
  /* @__PURE__ */ e(Ve, {})
330
330
  ] });
331
331
  }
332
- function H({
332
+ function N({
333
333
  mode: t,
334
334
  pageData: o,
335
- components: s,
335
+ components: a,
336
336
  page: n,
337
337
  locale: r,
338
- defaultLocale: a,
338
+ defaultLocale: i,
339
339
  headerAddons: p,
340
340
  state: c
341
341
  }) {
@@ -346,17 +346,17 @@ function H({
346
346
  const l = n || null;
347
347
  l ? u.page = R(l) : u.page = null;
348
348
  }, [n, JSON.stringify(n), u]);
349
- const d = A(void 0);
349
+ const d = B(void 0);
350
350
  return C(() => {
351
351
  Q(o, d.current) || o && u.page && (G(u.page, c, r, o), d.current = R(o));
352
352
  }, [u.page, o, r, c]), u.page ? /* @__PURE__ */ e(
353
353
  j,
354
354
  {
355
355
  mode: t,
356
- components: s,
356
+ components: a,
357
357
  page: u.page,
358
358
  locale: r,
359
- defaultLocale: a,
359
+ defaultLocale: i,
360
360
  headerAddons: p
361
361
  }
362
362
  ) : null;
@@ -364,17 +364,17 @@ function H({
364
364
  function Rt({
365
365
  mode: t,
366
366
  state: o,
367
- path: s,
367
+ path: a,
368
368
  pageData: n
369
369
  }) {
370
- const { t: r, locale: a } = W(), {
370
+ const { t: r, locale: i } = V(), {
371
371
  pages: p,
372
372
  supportedLocales: c,
373
373
  config: { defaultLocale: u },
374
374
  resources: d
375
- } = o, l = Object.values(p).find((b) => b?.slug === s), f = Object.values(d?.pages || {}).find((b) => b.page.slug === s), m = x(
376
- () => c?.some((b) => b.locale === a) ? a : void 0,
377
- [a, c]
375
+ } = o, l = Object.values(p).find((b) => b?.slug === a), f = Object.values(d?.pages || {}).find((b) => b.page.slug === a), m = x(
376
+ () => c?.some((b) => b.locale === i) ? i : void 0,
377
+ [i, c]
378
378
  ), g = J({
379
379
  page: null
380
380
  });
@@ -382,7 +382,7 @@ function Rt({
382
382
  const b = l || f?.page || null;
383
383
  b ? g.page = R(b) : g.page = null;
384
384
  }, [l, f]);
385
- const y = A(void 0);
385
+ const y = B(void 0);
386
386
  if (C(() => {
387
387
  Q(n, y.current) || n && g.page && (G(g.page, o, m, n), y.current = R(n));
388
388
  }, [{}]), !l && !f?.page)
@@ -396,10 +396,10 @@ function Rt({
396
396
  justifyContent: "center",
397
397
  alignItems: "center"
398
398
  },
399
- children: /* @__PURE__ */ e(V, { style: { background: "inherit" }, status: 404, extra: /* @__PURE__ */ e(re, { href: "/", children: r("common.back") }) })
399
+ children: /* @__PURE__ */ e(A, { style: { background: "inherit" }, status: 404, extra: /* @__PURE__ */ e(re, { href: "/", children: r("common.back") }) })
400
400
  }
401
401
  );
402
- const w = U(o);
402
+ const w = W(o);
403
403
  return g.page ? /* @__PURE__ */ e(
404
404
  j,
405
405
  {
@@ -414,13 +414,13 @@ function Rt({
414
414
  function j({
415
415
  mode: t,
416
416
  components: o,
417
- page: s,
417
+ page: a,
418
418
  locale: n,
419
419
  defaultLocale: r,
420
- headerAddons: a
420
+ headerAddons: i
421
421
  }) {
422
- const p = de(), c = s.locales?.[n] ?? s.locales?.[r] ?? {}, u = c.title || window.blocklet?.appName, d = c.description || window.blocklet?.appDescription, l = ie(le(c.image), 540);
423
- return /* @__PURE__ */ T(Oe, { page: s, defaultLocale: r, currentLocale: n, children: [
422
+ const p = de(), c = a.locales?.[n] ?? a.locales?.[r] ?? {}, u = c.title || window.blocklet?.appName, d = c.description || window.blocklet?.appDescription, l = ie(le(c.image), 540);
423
+ return /* @__PURE__ */ T(Oe, { page: a, defaultLocale: r, currentLocale: n, children: [
424
424
  /* @__PURE__ */ e(
425
425
  q,
426
426
  {
@@ -433,7 +433,7 @@ function j({
433
433
  `
434
434
  }
435
435
  ),
436
- /* @__PURE__ */ e(Je, { meta: c, headerAddons: a }),
436
+ /* @__PURE__ */ e(Je, { meta: c, headerAddons: i }),
437
437
  /* @__PURE__ */ e(Te, {}),
438
438
  /* @__PURE__ */ T(Se, { children: [
439
439
  /* @__PURE__ */ e("title", { children: u }),
@@ -459,10 +459,10 @@ function j({
459
459
  zIndex: 0
460
460
  // 确保页面内容在其他元素之上
461
461
  },
462
- children: /* @__PURE__ */ e(Ee, { children: s?.sectionIds?.map((f, m) => {
463
- const g = s.sections[f];
462
+ children: /* @__PURE__ */ e(Ee, { children: a?.sectionIds?.map((f, m) => {
463
+ const g = a.sections[f];
464
464
  if (!g || g.visibility === "hidden") return null;
465
- const y = s.dataSource?.[f]?.[n], w = s.dataSource?.[f]?.[r] ?? {};
465
+ const y = a.dataSource?.[f]?.[n], w = a.dataSource?.[f]?.[r] ?? {};
466
466
  return /* @__PURE__ */ e(k, { sx: { position: "relative" }, children: /* @__PURE__ */ e(
467
467
  Le,
468
468
  {
@@ -483,7 +483,7 @@ function j({
483
483
  // 用于 fallback 的 locale
484
484
  }
485
485
  },
486
- page: s,
486
+ page: a,
487
487
  renderIndex: m
488
488
  },
489
489
  f
@@ -501,12 +501,12 @@ const oe = M(ge)`
501
501
  }
502
502
  `;
503
503
  function Je({ meta: t, headerAddons: o }) {
504
- const { logo: s, brand: n, description: r, ...a } = pe(), p = te(), c = x(
504
+ const { logo: a, brand: n, description: r, ...i } = pe(), p = te(), c = x(
505
505
  () => (d) => {
506
506
  let l = o?.(d) ?? d;
507
- return l = a.addons?.(l) ?? l, l;
507
+ return l = i.addons?.(l) ?? l, l;
508
508
  },
509
- [a.addons, o]
509
+ [i.addons, o]
510
510
  ), u = x(
511
511
  () => t.header?.translucent ? Qe : oe,
512
512
  [t.header?.translucent]
@@ -516,7 +516,7 @@ function Je({ meta: t, headerAddons: o }) {
516
516
  {
517
517
  hideNavMenu: !!t.header?.hideNavMenus,
518
518
  translucentTextColor: t.header?.translucentTextColor,
519
- ...s ? { logo: /* @__PURE__ */ e(ne, { logo: s }) } : {},
519
+ ...a ? { logo: /* @__PURE__ */ e(ne, { logo: a }) } : {},
520
520
  ...n ? { brand: n } : {},
521
521
  ...r ? { description: r } : {},
522
522
  className: he(t.header?.sticky && "sticky", "page-header"),
@@ -544,17 +544,17 @@ function Je({ meta: t, headerAddons: o }) {
544
544
  );
545
545
  }
546
546
  function ne({ logo: t }) {
547
- const [o, s] = we(), n = te(), { value: r } = ee(() => {
548
- const a = new URL(
547
+ const [o, a] = we(), n = te(), { value: r } = ee(() => {
548
+ const i = new URL(
549
549
  n ? window?.blocklet?.appLogo || "/.well-known/service/blocklet/logo" : window?.blocklet?.appLogoRect || "/.well-known/service/blocklet/logo-rect",
550
550
  window.location.origin
551
551
  );
552
- a.searchParams.delete("imageFilter"), a.searchParams.delete("f");
553
- const p = a.toString();
552
+ i.searchParams.delete("imageFilter"), i.searchParams.delete("f");
553
+ const p = i.toString();
554
554
  return new Promise((c) => {
555
555
  fetch(p).then((u) => {
556
556
  u.headers.get("content-type")?.includes("svg") && u.text().then((l) => {
557
- s(l), c(null);
557
+ a(l), c(null);
558
558
  }), c(u.url);
559
559
  });
560
560
  });
@@ -566,9 +566,9 @@ function ne({ logo: t }) {
566
566
  if (o)
567
567
  return /* @__PURE__ */ e(k, { sx: { filter: "initial !important" }, dangerouslySetInnerHTML: { __html: ve.sanitize(o) } });
568
568
  if (r) {
569
- const a = new URL(r);
570
- a.searchParams.set("imageFilter", "convert"), a.searchParams.set("f", "png"), a.searchParams.set("h", "80");
571
- const p = a.toString();
569
+ const i = new URL(r);
570
+ i.searchParams.set("imageFilter", "convert"), i.searchParams.set("f", "png"), i.searchParams.set("h", "80");
571
+ const p = i.toString();
572
572
  return /* @__PURE__ */ e("img", { src: p, alt: "logo" });
573
573
  }
574
574
  return null;
@@ -576,28 +576,28 @@ function ne({ logo: t }) {
576
576
  function Qe({
577
577
  logo: t,
578
578
  translucentTextColor: o,
579
- ...s
579
+ ...a
580
580
  }) {
581
- const r = xe(document.getElementById("app"), (m) => m.top < 1200), a = Y(), p = a.palette.mode === "dark", c = Math.min(r?.top ?? 0, 800), u = x(() => {
581
+ const r = xe(document.getElementById("app"), (m) => m.top < 1200), i = Y(), p = i.palette.mode === "dark", c = Math.min(r?.top ?? 0, 800), u = x(() => {
582
582
  let m = Math.min(c / 800, 1), g = "";
583
- return m > 0.1 ? (m = Math.max(m, 0.6), g = $(a.palette.text.primary, m)) : g = o || "#EEEEEE", {
583
+ return m > 0.1 ? (m = Math.max(m, 0.6), g = D(i.palette.text.primary, m)) : g = o || "#EEEEEE", {
584
584
  backgroundOpacity: m,
585
585
  textColor: g,
586
586
  isReversed: m < 0.7
587
587
  };
588
- }, [c, 800, a.palette.text.primary, o]), { backgroundOpacity: d, textColor: l, isReversed: f } = u;
588
+ }, [c, 800, i.palette.text.primary, o]), { backgroundOpacity: d, textColor: l, isReversed: f } = u;
589
589
  return /* @__PURE__ */ e(
590
590
  oe,
591
591
  {
592
592
  logo: /* @__PURE__ */ e(ne, { logo: t }),
593
- ...s,
593
+ ...a,
594
594
  sx: {
595
595
  // 基础布局和定位
596
596
  position: "fixed !important",
597
597
  top: 0,
598
598
  left: 0,
599
599
  right: 0,
600
- zIndex: a.zIndex.appBar,
600
+ zIndex: i.zIndex.appBar,
601
601
  // 确保在顶层
602
602
  backgroundColor: "transparent !important",
603
603
  // 主元素始终透明
@@ -612,7 +612,7 @@ function Qe({
612
612
  zIndex: -1,
613
613
  // 置于内容下方
614
614
  // 背景样式(颜色和模糊)是固定的
615
- backgroundColor: $(a.palette.background.default, d),
615
+ backgroundColor: D(i.palette.background.default, d),
616
616
  backdropFilter: d >= 0.6 ? "blur(10px)" : "blur(0px)",
617
617
  // **性能关键**: 只对 opacity 进行动画
618
618
  // opacity: backgroundOpacity,
@@ -656,7 +656,7 @@ export {
656
656
  L as P,
657
657
  Qe as T,
658
658
  Ge as a,
659
- H as b,
659
+ N as b,
660
660
  Rt as c,
661
661
  j as d,
662
662
  Je as e