@gx-design-vue/pro-layout-components 0.1.0-alpha.2 → 0.1.0-alpha.4

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,31 +1,28 @@
1
- import { Fragment as e, cloneVNode as t, computed as n, createTextVNode as r, createVNode as i, customRef as a, defineComponent as o, getCurrentInstance as s, getCurrentScope as c, h as l, isRef as u, mergeProps as d, nextTick as f, onMounted as p, onScopeDispose as m, reactive as h, readonly as g, ref as _, shallowReadonly as v, shallowRef as y, toRef as b, toValue as x, unref as S, watch as C } from "vue";
2
- import { ArrowUpOutlined as w, CloseOutlined as T, CompressOutlined as E, DesktopOutlined as D, EnterOutlined as O, ExpandOutlined as ee, LockOutlined as te, LogoutOutlined as k, SearchOutlined as A, SettingOutlined as ne, UserOutlined as re } from "@antdv-next/icons";
1
+ import { Fragment as e, computed as t, createTextVNode as n, createVNode as r, customRef as i, defineComponent as a, getCurrentInstance as o, getCurrentScope as s, h as c, isRef as l, mergeProps as u, nextTick as d, onMounted as f, onScopeDispose as p, reactive as m, readonly as h, ref as g, shallowReadonly as _, shallowRef as v, toRef as y, toValue as b, unref as x, watch as S } from "vue";
2
+ import { ArrowUpOutlined as C, CloseOutlined as w, CompressOutlined as ee, DesktopOutlined as T, EnterOutlined as E, ExpandOutlined as D, LockOutlined as te, LogoutOutlined as O, SearchOutlined as k, SettingOutlined as ne, UserOutlined as re } from "@antdv-next/icons";
3
3
  import { useThemeContext as ie } from "@gx-design-vue/context";
4
- import { GIcon as j } from "@gx-design-vue/icon";
5
- import { useInjectLayoutContext as M } from "@gx-design-vue/pro-layout";
6
- import { Avatar as ae, Dropdown as oe, Empty as N, Input as se } from "antdv-next";
7
- import { useBaseConfig as ce } from "antdv-next/config-provider/context";
8
- import le from "antdv-next/config-provider/hooks/useCSSVarCls";
9
- import { GProModal as ue } from "@gx-design-vue/pro-modal";
10
- import { useProAppContext as P } from "@gx-design-vue/pro-app";
11
- import { useRouter as de } from "vue-router";
12
- import { proGenStyleHooks as F } from "@gx-design-vue/pro-provider";
13
- typeof process < "u" && process.versions != null && process.versions.node;
14
- //#endregion
4
+ import { GIcon as A } from "@gx-design-vue/icon";
5
+ import { useInjectLayoutContext as ae } from "@gx-design-vue/pro-layout";
6
+ import { Avatar as oe, Dropdown as se, Empty as j, Input as M } from "antdv-next";
7
+ import { useBaseConfig as N } from "antdv-next/config-provider/context";
8
+ import ce from "antdv-next/config-provider/hooks/useCSSVarCls";
9
+ import { GProModal as le } from "@gx-design-vue/pro-modal";
10
+ import { proGenStyleHooks as P, useProConfigContext as F } from "@gx-design-vue/pro-provider";
11
+ import { useRouter as ue } from "vue-router";
15
12
  //#region ../pro-utils/dist/is/device.js
16
- function fe() {
17
- return /windows|win32/i.test(navigator.userAgent);
13
+ function de() {
14
+ return typeof navigator > "u" ? !1 : /windows|win32/i.test(navigator.userAgent);
18
15
  }
19
16
  //#endregion
20
17
  //#region ../pro-utils/dist/is/type.js
21
- function pe(e, t) {
18
+ function fe(e, t) {
22
19
  return Object.prototype.toString.call(e) === `[object ${t}]`;
23
20
  }
24
- function I(e) {
21
+ function pe(e) {
25
22
  return Array.isArray === void 0 ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
26
23
  }
27
24
  function me(e) {
28
- return e !== null && pe(e, "Object");
25
+ return e !== null && fe(e, "Object");
29
26
  }
30
27
  function he(e) {
31
28
  return typeof e == "string";
@@ -36,8 +33,8 @@ function ge(e) {
36
33
  if (!e || !e.startsWith("http")) return !1;
37
34
  try {
38
35
  return !!new URL(e);
39
- } catch (e) {
40
- return console.error("isUrl error", e), !1;
36
+ } catch {
37
+ return !1;
41
38
  }
42
39
  }
43
40
  //#endregion
@@ -45,51 +42,25 @@ function ge(e) {
45
42
  function _e(e, t = "children") {
46
43
  let n = [];
47
44
  return e.forEach((e) => {
48
- n.push(e), I(e[t]) && e[t].length > 0 && (n = n.concat(_e(e[t], t)));
45
+ n.push(e), pe(e[t]) && e[t].length > 0 && (n = n.concat(_e(e[t], t)));
49
46
  }), n;
50
47
  }
51
48
  //#endregion
52
49
  //#region ../pro-utils/dist/class/prefix.js
53
- function ve({ suffixCls: e, customizePrefixCls: t, isPor: n, className: r }) {
50
+ function ve({ suffixCls: e, customizePrefixCls: t, isPro: n, className: r }) {
54
51
  let i = r || (n ? "gx-pro" : "gx");
55
52
  return t || (e ? `${i}-${e}` : i);
56
53
  }
57
54
  //#endregion
58
- //#region ../pro-utils/dist/dom/raf.js
59
- var ye = (e) => setTimeout(e, 16), be = (e) => clearTimeout(e);
60
- typeof window < "u" && "requestAnimationFrame" in window && (ye = (e) => window.requestAnimationFrame(e), be = (e) => window.cancelAnimationFrame(e));
61
- var xe = 0, L = /* @__PURE__ */ new Map();
62
- function Se(e) {
63
- L.delete(e);
64
- }
65
- function Ce(e, t = 1) {
66
- xe += 1;
67
- let n = xe;
68
- function r(t) {
69
- if (t === 0) Se(n), e();
70
- else {
71
- let e = ye(() => {
72
- r(t - 1);
73
- });
74
- L.set(n, e);
75
- }
76
- }
77
- return r(t), n;
78
- }
79
- Ce.cancel = (e) => {
80
- let t = L.get(e);
81
- return Se(t), be(t);
82
- };
83
- //#endregion
84
55
  //#region ../pro-utils/dist/object/classNames.js
85
- function R(...e) {
56
+ function I(...e) {
86
57
  let t = [];
87
58
  for (let n = 0; n < e.length; n++) {
88
59
  let r = e[n];
89
60
  if (r) {
90
61
  if (he(r)) t.push(r);
91
- else if (I(r)) for (let e = 0; e < r.length; e++) {
92
- let n = R(r[e]);
62
+ else if (pe(r)) for (let e = 0; e < r.length; e++) {
63
+ let n = I(r[e]);
93
64
  n && t.push(n);
94
65
  }
95
66
  else if (me(r)) for (let e in r) r[e] && t.push(e);
@@ -99,21 +70,21 @@ function R(...e) {
99
70
  }
100
71
  //#endregion
101
72
  //#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.27_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
102
- function we(e, t) {
103
- return c() ? (m(e, t), !0) : !1;
73
+ function ye(e, t) {
74
+ return s() ? (p(e, t), !0) : !1;
104
75
  }
105
- var z = typeof window < "u" && typeof document < "u";
76
+ var L = typeof window < "u" && typeof document < "u";
106
77
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
107
- var Te = Object.prototype.toString, Ee = (e) => Te.call(e) === "[object Object]", B = () => {};
108
- function De(...e) {
109
- if (e.length !== 1) return b(...e);
78
+ var be = Object.prototype.toString, xe = (e) => be.call(e) === "[object Object]", R = () => {};
79
+ function Se(...e) {
80
+ if (e.length !== 1) return y(...e);
110
81
  let t = e[0];
111
- return typeof t == "function" ? g(a(() => ({
82
+ return typeof t == "function" ? h(i(() => ({
112
83
  get: t,
113
- set: B
114
- }))) : _(t);
84
+ set: R
85
+ }))) : g(t);
115
86
  }
116
- function Oe(e, t) {
87
+ function Ce(e, t) {
117
88
  function n(...n) {
118
89
  return new Promise((r, i) => {
119
90
  Promise.resolve(e(() => t.apply(this, n), {
@@ -125,24 +96,24 @@ function Oe(e, t) {
125
96
  }
126
97
  return n;
127
98
  }
128
- var ke = (e) => e();
129
- function Ae(...e) {
130
- let t = 0, n, r = !0, i = B, a, o, s, c, l;
131
- !u(e[0]) && typeof e[0] == "object" ? {delay: o, trailing: s = !0, leading: c = !0, rejectOnCancel: l = !1} = e[0] : [o, s = !0, c = !0, l = !1] = e;
99
+ var z = (e) => e();
100
+ function we(...e) {
101
+ let t = 0, n, r = !0, i = R, a, o, s, c, u;
102
+ !l(e[0]) && typeof e[0] == "object" ? {delay: o, trailing: s = !0, leading: c = !0, rejectOnCancel: u = !1} = e[0] : [o, s = !0, c = !0, u = !1] = e;
132
103
  let d = () => {
133
- n && (clearTimeout(n), n = void 0, i(), i = B);
104
+ n && (clearTimeout(n), n = void 0, i(), i = R);
134
105
  };
135
106
  return (e) => {
136
- let u = x(o), f = Date.now() - t, p = () => a = e();
137
- return d(), u <= 0 ? (t = Date.now(), p()) : (f > u ? (t = Date.now(), (c || !r) && p()) : s && (a = new Promise((e, a) => {
138
- i = l ? a : e, n = setTimeout(() => {
107
+ let l = b(o), f = Date.now() - t, p = () => a = e();
108
+ return d(), l <= 0 ? (t = Date.now(), p()) : (f > l ? (t = Date.now(), (c || !r) && p()) : s && (a = new Promise((e, a) => {
109
+ i = u ? a : e, n = setTimeout(() => {
139
110
  t = Date.now(), r = !0, e(p()), d();
140
- }, Math.max(0, u - f));
141
- })), !c && !n && (n = setTimeout(() => r = !0, u)), r = !1, a);
111
+ }, Math.max(0, l - f));
112
+ })), !c && !n && (n = setTimeout(() => r = !0, l)), r = !1, a);
142
113
  };
143
114
  }
144
- function je(e = ke, t = {}) {
145
- let { initialState: n = "active" } = t, r = De(n === "active");
115
+ function Te(e = z, t = {}) {
116
+ let { initialState: n = "active" } = t, r = Se(n === "active");
146
117
  function i() {
147
118
  r.value = !1;
148
119
  }
@@ -150,7 +121,7 @@ function je(e = ke, t = {}) {
150
121
  r.value = !0;
151
122
  }
152
123
  return {
153
- isActive: v(r),
124
+ isActive: _(r),
154
125
  pause: i,
155
126
  resume: a,
156
127
  eventFilter: (...t) => {
@@ -158,23 +129,23 @@ function je(e = ke, t = {}) {
158
129
  }
159
130
  };
160
131
  }
161
- function V(e) {
132
+ function B(e) {
162
133
  return Array.isArray(e) ? e : [e];
163
134
  }
164
- function Me(e) {
165
- return e || s();
135
+ function Ee(e) {
136
+ return e || o();
166
137
  }
167
- function Ne(e, t = 200, n = !1, r = !0, i = !1) {
168
- return Oe(Ae(t, n, r, i), e);
138
+ function De(e, t = 200, n = !1, r = !0, i = !1) {
139
+ return Ce(we(t, n, r, i), e);
169
140
  }
170
- function Pe(e, t, n = {}) {
171
- let { eventFilter: r = ke, ...i } = n;
172
- return C(e, Oe(r, t), i);
141
+ function Oe(e, t, n = {}) {
142
+ let { eventFilter: r = z, ...i } = n;
143
+ return S(e, Ce(r, t), i);
173
144
  }
174
- function Fe(e, t, n = {}) {
175
- let { eventFilter: r, initialState: i = "active", ...a } = n, { eventFilter: o, pause: s, resume: c, isActive: l } = je(r, { initialState: i });
145
+ function ke(e, t, n = {}) {
146
+ let { eventFilter: r, initialState: i = "active", ...a } = n, { eventFilter: o, pause: s, resume: c, isActive: l } = Te(r, { initialState: i });
176
147
  return {
177
- stop: Pe(e, t, {
148
+ stop: Oe(e, t, {
178
149
  ...a,
179
150
  eventFilter: o
180
151
  }),
@@ -183,18 +154,18 @@ function Fe(e, t, n = {}) {
183
154
  isActive: l
184
155
  };
185
156
  }
186
- function H(e, t = !0, n) {
187
- Me(n) ? p(e, n) : t ? e() : f(e);
157
+ function V(e, t = !0, n) {
158
+ Ee(n) ? f(e, n) : t ? e() : d(e);
188
159
  }
189
- function Ie(e, t, n) {
190
- return C(e, t, {
160
+ function Ae(e, t, n) {
161
+ return S(e, t, {
191
162
  ...n,
192
163
  immediate: !0
193
164
  });
194
165
  }
195
- function Le(e, t, n) {
196
- let r = C(e, (e, i, a) => {
197
- e && (n?.once && f(() => r()), t(e, i, a));
166
+ function H(e, t, n) {
167
+ let r = S(e, (e, i, a) => {
168
+ e && (n?.once && d(() => r()), t(e, i, a));
198
169
  }, {
199
170
  ...n,
200
171
  once: !1
@@ -203,63 +174,63 @@ function Le(e, t, n) {
203
174
  }
204
175
  //#endregion
205
176
  //#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.27_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
206
- var U = z ? window : void 0, Re = z ? window.document : void 0;
207
- z && window.navigator, z && window.location;
177
+ var U = L ? window : void 0, je = L ? window.document : void 0;
178
+ L && window.navigator, L && window.location;
208
179
  function W(e) {
209
- let t = x(e);
180
+ let t = b(e);
210
181
  return t?.$el ?? t;
211
182
  }
212
183
  function G(...e) {
213
- let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = n(() => {
214
- let t = V(x(e[0])).filter((e) => e != null);
184
+ let n = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = t(() => {
185
+ let t = B(b(e[0])).filter((e) => e != null);
215
186
  return t.every((e) => typeof e != "string") ? t : void 0;
216
187
  });
217
- return Ie(() => [
188
+ return Ae(() => [
218
189
  r.value?.map((e) => W(e)) ?? [U].filter((e) => e != null),
219
- V(x(r.value ? e[1] : e[0])),
220
- V(S(r.value ? e[2] : e[1])),
221
- x(r.value ? e[3] : e[2])
222
- ], ([e, n, r, i], a, o) => {
223
- if (!e?.length || !n?.length || !r?.length) return;
224
- let s = Ee(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
190
+ B(b(r.value ? e[1] : e[0])),
191
+ B(x(r.value ? e[2] : e[1])),
192
+ b(r.value ? e[3] : e[2])
193
+ ], ([e, t, r, i], a, o) => {
194
+ if (!e?.length || !t?.length || !r?.length) return;
195
+ let s = xe(i) ? { ...i } : i, c = e.flatMap((e) => t.flatMap((t) => r.map((r) => n(e, t, r, s))));
225
196
  o(() => {
226
197
  c.forEach((e) => e());
227
198
  });
228
199
  }, { flush: "post" });
229
200
  }
230
- function ze() {
231
- let e = y(!1), t = s();
232
- return t && p(() => {
201
+ function Me() {
202
+ let e = v(!1), t = o();
203
+ return t && f(() => {
233
204
  e.value = !0;
234
205
  }, t), e;
235
206
  }
236
207
  /* @__NO_SIDE_EFFECTS__ */
237
- function Be(e) {
238
- let t = ze();
239
- return n(() => (t.value, !!e()));
208
+ function Ne(e) {
209
+ let n = Me();
210
+ return t(() => (n.value, !!e()));
240
211
  }
241
- function Ve(e) {
212
+ function Pe(e) {
242
213
  return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
243
214
  }
244
215
  function K(...e) {
245
216
  let t, n, r = {};
246
217
  e.length === 3 ? (t = e[0], n = e[1], r = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], r = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
247
- let { target: i = U, eventName: a = "keydown", passive: o = !1, dedupe: s = !1 } = r, c = Ve(t);
218
+ let { target: i = U, eventName: a = "keydown", passive: o = !1, dedupe: s = !1 } = r, c = Pe(t);
248
219
  return G(i, a, (e) => {
249
- e.repeat && x(s) || c(e) && n(e);
220
+ e.repeat && b(s) || c(e) && n(e);
250
221
  }, o);
251
222
  }
252
- var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, J = "__vueuse_ssr_handlers__", He = /* @__PURE__ */ Ue();
253
- function Ue() {
223
+ var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, J = "__vueuse_ssr_handlers__", Fe = /* @__PURE__ */ Ie();
224
+ function Ie() {
254
225
  return J in q || (q[J] = q[J] || {}), q[J];
255
226
  }
256
- function We(e, t) {
257
- return He[e] || t;
227
+ function Le(e, t) {
228
+ return Fe[e] || t;
258
229
  }
259
- function Ge(e) {
230
+ function Re(e) {
260
231
  return e == null ? "any" : e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof Date ? "date" : typeof e == "boolean" ? "boolean" : typeof e == "string" ? "string" : typeof e == "object" ? "object" : Number.isNaN(e) ? "any" : "number";
261
232
  }
262
- var Ke = {
233
+ var ze = {
263
234
  boolean: {
264
235
  read: (e) => e === "true",
265
236
  write: (e) => String(e)
@@ -292,61 +263,61 @@ var Ke = {
292
263
  read: (e) => new Date(e),
293
264
  write: (e) => e.toISOString()
294
265
  }
295
- }, qe = "vueuse-storage";
296
- function Je(e, t, r, i = {}) {
297
- let { flush: a = "pre", deep: o = !0, listenToStorageChanges: s = !0, writeDefaults: c = !0, mergeDefaults: l = !1, shallow: u, window: d = U, eventFilter: p, onError: m = (e) => {
266
+ }, Be = "vueuse-storage";
267
+ function Ve(e, n, r, i = {}) {
268
+ let { flush: a = "pre", deep: o = !0, listenToStorageChanges: s = !0, writeDefaults: c = !0, mergeDefaults: l = !1, shallow: u, window: f = U, eventFilter: p, onError: m = (e) => {
298
269
  console.error(e);
299
- }, initOnMounted: h } = i, g = (u ? y : _)(typeof t == "function" ? t() : t), v = n(() => x(e));
270
+ }, initOnMounted: h } = i, _ = (u ? v : g)(typeof n == "function" ? n() : n), y = t(() => b(e));
300
271
  if (!r) try {
301
- r = We("getDefaultStorage", () => U?.localStorage)();
272
+ r = Le("getDefaultStorage", () => U?.localStorage)();
302
273
  } catch (e) {
303
274
  m(e);
304
275
  }
305
- if (!r) return g;
306
- let b = x(t), S = Ge(b), w = i.serializer ?? Ke[S], { pause: T, resume: E } = Fe(g, (e) => ee(e), {
276
+ if (!r) return _;
277
+ let x = b(n), C = Re(x), w = i.serializer ?? ze[C], { pause: ee, resume: T } = ke(_, (e) => te(e), {
307
278
  flush: a,
308
279
  deep: o,
309
280
  eventFilter: p
310
281
  });
311
- C(v, () => k(), { flush: a });
312
- let D = !1;
313
- d && s && (r instanceof Storage ? G(d, "storage", (e) => {
314
- h && !D || k(e);
315
- }, { passive: !0 }) : G(d, qe, (e) => {
316
- h && !D || A(e);
317
- })), h ? H(() => {
318
- D = !0, k();
282
+ S(y, () => k(), { flush: a });
283
+ let E = !1;
284
+ f && s && (r instanceof Storage ? G(f, "storage", (e) => {
285
+ h && !E || k(e);
286
+ }, { passive: !0 }) : G(f, Be, (e) => {
287
+ h && !E || ne(e);
288
+ })), h ? V(() => {
289
+ E = !0, k();
319
290
  }) : k();
320
- function O(e, t) {
321
- if (d) {
291
+ function D(e, t) {
292
+ if (f) {
322
293
  let n = {
323
- key: v.value,
294
+ key: y.value,
324
295
  oldValue: e,
325
296
  newValue: t,
326
297
  storageArea: r
327
298
  };
328
- d.dispatchEvent(r instanceof Storage ? new StorageEvent("storage", n) : new CustomEvent(qe, { detail: n }));
299
+ f.dispatchEvent(r instanceof Storage ? new StorageEvent("storage", n) : new CustomEvent(Be, { detail: n }));
329
300
  }
330
301
  }
331
- function ee(e) {
302
+ function te(e) {
332
303
  try {
333
- let t = r.getItem(v.value);
334
- if (e == null) O(t, null), r.removeItem(v.value);
304
+ let t = r.getItem(y.value);
305
+ if (e == null) D(t, null), r.removeItem(y.value);
335
306
  else {
336
307
  let n = w.write(e);
337
- t !== n && (r.setItem(v.value, n), O(t, n));
308
+ t !== n && (r.setItem(y.value, n), D(t, n));
338
309
  }
339
310
  } catch (e) {
340
311
  m(e);
341
312
  }
342
313
  }
343
- function te(e) {
344
- let t = e ? e.newValue : r.getItem(v.value);
345
- if (t == null) return c && b != null && r.setItem(v.value, w.write(b)), b;
314
+ function O(e) {
315
+ let t = e ? e.newValue : r.getItem(y.value);
316
+ if (t == null) return c && x != null && r.setItem(y.value, w.write(x)), x;
346
317
  if (!e && l) {
347
318
  let e = w.read(t);
348
- return typeof l == "function" ? l(e, b) : S === "object" && !Array.isArray(e) ? {
349
- ...b,
319
+ return typeof l == "function" ? l(e, x) : C === "object" && !Array.isArray(e) ? {
320
+ ...x,
350
321
  ...e
351
322
  } : e;
352
323
  } else if (typeof t != "string") return t;
@@ -355,36 +326,36 @@ function Je(e, t, r, i = {}) {
355
326
  function k(e) {
356
327
  if (!(e && e.storageArea !== r)) {
357
328
  if (e && e.key == null) {
358
- g.value = b;
329
+ _.value = x;
359
330
  return;
360
331
  }
361
- if (!(e && e.key !== v.value)) {
362
- T();
332
+ if (!(e && e.key !== y.value)) {
333
+ ee();
363
334
  try {
364
- let t = w.write(g.value);
365
- (e === void 0 || e?.newValue !== t) && (g.value = te(e));
335
+ let t = w.write(_.value);
336
+ (e === void 0 || e?.newValue !== t) && (_.value = O(e));
366
337
  } catch (e) {
367
338
  m(e);
368
339
  } finally {
369
- e ? f(E) : E();
340
+ e ? d(T) : T();
370
341
  }
371
342
  }
372
343
  }
373
344
  }
374
- function A(e) {
345
+ function ne(e) {
375
346
  k(e.detail);
376
347
  }
377
- return g;
348
+ return _;
378
349
  }
379
- function Ye(e, t, r = {}) {
380
- let { window: i = U, ...a } = r, o, s = /* @__PURE__ */ Be(() => i && "ResizeObserver" in i), c = () => {
350
+ function He(e, n, r = {}) {
351
+ let { window: i = U, ...a } = r, o, s = /* @__PURE__ */ Ne(() => i && "ResizeObserver" in i), c = () => {
381
352
  o &&= (o.disconnect(), void 0);
382
- }, l = C(n(() => {
383
- let t = x(e);
353
+ }, l = S(t(() => {
354
+ let t = b(e);
384
355
  return Array.isArray(t) ? t.map((e) => W(e)) : [W(t)];
385
356
  }), (e) => {
386
357
  if (c(), s.value && i) {
387
- o = new ResizeObserver(t);
358
+ o = new ResizeObserver(n);
388
359
  for (let t of e) t && o.observe(t, a);
389
360
  }
390
361
  }, {
@@ -393,19 +364,19 @@ function Ye(e, t, r = {}) {
393
364
  }), u = () => {
394
365
  c(), l();
395
366
  };
396
- return we(u), {
367
+ return ye(u), {
397
368
  isSupported: s,
398
369
  stop: u
399
370
  };
400
371
  }
401
- function Xe(e, t = {
372
+ function Ue(e, n = {
402
373
  width: 0,
403
374
  height: 0
404
375
  }, r = {}) {
405
- let { window: i = U, box: a = "content-box" } = r, o = n(() => {
376
+ let { window: i = U, box: a = "content-box" } = r, o = t(() => {
406
377
  var t;
407
378
  return (t = W(e)) == null || (t = t.namespaceURI) == null ? void 0 : t.includes("svg");
408
- }), s = y(t.width), c = y(t.height), { stop: l } = Ye(e, ([t]) => {
379
+ }), s = v(n.width), c = v(n.height), { stop: l } = He(e, ([t]) => {
409
380
  let n = a === "border-box" ? t.borderBoxSize : a === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
410
381
  if (i && o.value) {
411
382
  let t = W(e);
@@ -414,16 +385,16 @@ function Xe(e, t = {
414
385
  s.value = e.width, c.value = e.height;
415
386
  }
416
387
  } else if (n) {
417
- let e = V(n);
388
+ let e = B(n);
418
389
  s.value = e.reduce((e, { inlineSize: t }) => e + t, 0), c.value = e.reduce((e, { blockSize: t }) => e + t, 0);
419
390
  } else s.value = t.contentRect.width, c.value = t.contentRect.height;
420
391
  }, r);
421
- H(() => {
422
- let n = W(e);
423
- n && (s.value = "offsetWidth" in n ? n.offsetWidth : t.width, c.value = "offsetHeight" in n ? n.offsetHeight : t.height);
392
+ V(() => {
393
+ let t = W(e);
394
+ t && (s.value = "offsetWidth" in t ? t.offsetWidth : n.width, c.value = "offsetHeight" in t ? t.offsetHeight : n.height);
424
395
  });
425
- let u = C(() => W(e), (e) => {
426
- s.value = e ? t.width : 0, c.value = e ? t.height : 0;
396
+ let u = S(() => W(e), (e) => {
397
+ s.value = e ? n.width : 0, c.value = e ? n.height : 0;
427
398
  });
428
399
  function d() {
429
400
  l(), u();
@@ -434,15 +405,15 @@ function Xe(e, t = {
434
405
  stop: d
435
406
  };
436
407
  }
437
- var Ze = [
408
+ var We = [
438
409
  "fullscreenchange",
439
410
  "webkitfullscreenchange",
440
411
  "webkitendfullscreen",
441
412
  "mozfullscreenchange",
442
413
  "MSFullscreenChange"
443
414
  ];
444
- function Qe(e, t = {}) {
445
- let { document: r = Re, autoExit: i = !1 } = t, a = n(() => W(e) ?? r?.documentElement), o = y(!1), s = n(() => [
415
+ function Ge(e, n = {}) {
416
+ let { document: r = je, autoExit: i = !1 } = n, a = t(() => W(e) ?? r?.documentElement), o = v(!1), s = t(() => [
446
417
  "requestFullscreen",
447
418
  "webkitRequestFullscreen",
448
419
  "webkitEnterFullscreen",
@@ -450,14 +421,14 @@ function Qe(e, t = {}) {
450
421
  "webkitRequestFullScreen",
451
422
  "mozRequestFullScreen",
452
423
  "msRequestFullscreen"
453
- ].find((e) => r && e in r || a.value && e in a.value)), c = n(() => [
424
+ ].find((e) => r && e in r || a.value && e in a.value)), c = t(() => [
454
425
  "exitFullscreen",
455
426
  "webkitExitFullscreen",
456
427
  "webkitExitFullScreen",
457
428
  "webkitCancelFullScreen",
458
429
  "mozCancelFullScreen",
459
430
  "msExitFullscreen"
460
- ].find((e) => r && e in r || a.value && e in a.value)), l = n(() => [
431
+ ].find((e) => r && e in r || a.value && e in a.value)), l = t(() => [
461
432
  "fullScreen",
462
433
  "webkitIsFullScreen",
463
434
  "webkitDisplayingFullscreen",
@@ -468,7 +439,7 @@ function Qe(e, t = {}) {
468
439
  "webkitFullscreenElement",
469
440
  "mozFullScreenElement",
470
441
  "msFullscreenElement"
471
- ].find((e) => r && e in r), d = /* @__PURE__ */ Be(() => a.value && r && s.value !== void 0 && c.value !== void 0 && l.value !== void 0), f = () => u ? r?.[u] === a.value : !1, p = () => {
442
+ ].find((e) => r && e in r), d = /* @__PURE__ */ Ne(() => a.value && r && s.value !== void 0 && c.value !== void 0 && l.value !== void 0), f = () => u ? r?.[u] === a.value : !1, p = () => {
472
443
  if (l.value) {
473
444
  if (r && r[l.value] != null) return r[l.value];
474
445
  {
@@ -500,11 +471,11 @@ function Qe(e, t = {}) {
500
471
  let _ = () => {
501
472
  let e = p();
502
473
  (!e || e && f()) && (o.value = e);
503
- }, v = {
474
+ }, y = {
504
475
  capture: !1,
505
476
  passive: !0
506
477
  };
507
- return G(r, Ze, _, v), G(() => W(a), Ze, _, v), H(_, !1), i && we(m), {
478
+ return G(r, We, _, y), G(() => W(a), We, _, y), V(_, !1), i && ye(m), {
508
479
  isSupported: d,
509
480
  isFullscreen: o,
510
481
  enter: h,
@@ -512,11 +483,11 @@ function Qe(e, t = {}) {
512
483
  toggle: g
513
484
  };
514
485
  }
515
- function $e(e, t, n = {}) {
486
+ function Ke(e, t, n = {}) {
516
487
  let { window: r = U } = n;
517
- return Je(e, t, r?.localStorage, n);
488
+ return Ve(e, t, r?.localStorage, n);
518
489
  }
519
- var et = {
490
+ var qe = {
520
491
  ctrl: "control",
521
492
  command: "meta",
522
493
  cmd: "meta",
@@ -526,21 +497,21 @@ var et = {
526
497
  left: "arrowleft",
527
498
  right: "arrowright"
528
499
  };
529
- function tt(e = {}) {
530
- let { reactive: t = !1, target: r = U, aliasMap: i = et, passive: a = !0, onEventFired: o = B } = e, s = h(/* @__PURE__ */ new Set()), c = {
500
+ function Je(e = {}) {
501
+ let { reactive: n = !1, target: r = U, aliasMap: i = qe, passive: a = !0, onEventFired: o = R } = e, s = m(/* @__PURE__ */ new Set()), c = {
531
502
  toJSON() {
532
503
  return {};
533
504
  },
534
505
  current: s
535
- }, l = t ? h(c) : c, u = /* @__PURE__ */ new Set(), d = new Map([
506
+ }, l = n ? m(c) : c, u = /* @__PURE__ */ new Set(), d = new Map([
536
507
  ["Meta", u],
537
508
  ["Shift", /* @__PURE__ */ new Set()],
538
509
  ["Alt", /* @__PURE__ */ new Set()]
539
510
  ]), f = /* @__PURE__ */ new Set();
540
- function p(e, n) {
541
- e in l && (t ? l[e] = n : l[e].value = n);
511
+ function p(e, t) {
512
+ e in l && (n ? l[e] = t : l[e].value = t);
542
513
  }
543
- function m() {
514
+ function h() {
544
515
  s.clear();
545
516
  for (let e of f) p(e, !1);
546
517
  }
@@ -561,7 +532,7 @@ function tt(e = {}) {
561
532
  t >= a && (s.delete(e), p(e, !1));
562
533
  }), r.clear();
563
534
  }
564
- function v(e, t) {
535
+ function y(e, t) {
565
536
  let n = e.key?.toLowerCase(), r = [e.code?.toLowerCase(), n].filter(Boolean);
566
537
  if (n) {
567
538
  n && (t ? s.add(n) : s.delete(n));
@@ -571,21 +542,21 @@ function tt(e = {}) {
571
542
  }), u.clear());
572
543
  }
573
544
  }
574
- G(r, "keydown", (e) => (v(e, !0), o(e)), { passive: a }), G(r, "keyup", (e) => (v(e, !1), o(e)), { passive: a }), G("blur", m, { passive: a }), G("focus", m, { passive: a });
575
- let b = new Proxy(l, { get(e, r, a) {
545
+ G(r, "keydown", (e) => (y(e, !0), o(e)), { passive: a }), G(r, "keyup", (e) => (y(e, !1), o(e)), { passive: a }), G("blur", h, { passive: a }), G("focus", h, { passive: a });
546
+ let x = new Proxy(l, { get(e, r, a) {
576
547
  if (typeof r != "string") return Reflect.get(e, r, a);
577
548
  if (r = r.toLowerCase(), r in i && (r = i[r]), !(r in l)) if (/[+_-]/.test(r)) {
578
549
  let e = r.split(/[+_-]/g).map((e) => e.trim());
579
- l[r] = n(() => e.map((e) => x(b[e])).every(Boolean));
580
- } else l[r] = y(!1);
550
+ l[r] = t(() => e.map((e) => b(x[e])).every(Boolean));
551
+ } else l[r] = v(!1);
581
552
  let o = Reflect.get(e, r, a);
582
- return t ? x(o) : o;
553
+ return n ? b(o) : o;
583
554
  } });
584
- return b;
555
+ return x;
585
556
  }
586
557
  //#endregion
587
558
  //#region src/RightContent/locale.ts
588
- var nt = {
559
+ var Ye = {
589
560
  searchPlaceholder: "搜索导航菜单",
590
561
  searchLabel: "搜索",
591
562
  searchShortcutLabel: "⌘ K",
@@ -602,33 +573,33 @@ var nt = {
602
573
  };
603
574
  //#endregion
604
575
  //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
605
- function rt(e) {
576
+ function Xe(e) {
606
577
  return e == null || typeof e != "object" && typeof e != "function";
607
578
  }
608
579
  //#endregion
609
580
  //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
610
- function it(e) {
581
+ function Ze(e) {
611
582
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
612
583
  }
613
584
  //#endregion
614
585
  //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
615
- function at(e) {
586
+ function Qe(e) {
616
587
  return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
617
588
  }
618
589
  //#endregion
619
590
  //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
620
- function ot(e) {
591
+ function $e(e) {
621
592
  return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
622
593
  }
623
594
  //#endregion
624
595
  //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
625
- var st = "[object RegExp]", ct = "[object String]", lt = "[object Number]", ut = "[object Boolean]", dt = "[object Arguments]", ft = "[object Symbol]", pt = "[object Date]", mt = "[object Map]", ht = "[object Set]", gt = "[object Array]", _t = "[object ArrayBuffer]", vt = "[object Object]", yt = "[object DataView]", bt = "[object Uint8Array]", xt = "[object Uint8ClampedArray]", St = "[object Uint16Array]", Ct = "[object Uint32Array]", wt = "[object Int8Array]", Tt = "[object Int16Array]", Et = "[object Int32Array]", Dt = "[object Float32Array]", Ot = "[object Float64Array]";
596
+ var et = "[object RegExp]", tt = "[object String]", nt = "[object Number]", rt = "[object Boolean]", it = "[object Arguments]", at = "[object Symbol]", ot = "[object Date]", st = "[object Map]", ct = "[object Set]", lt = "[object Array]", ut = "[object ArrayBuffer]", dt = "[object Object]", ft = "[object DataView]", pt = "[object Uint8Array]", mt = "[object Uint8ClampedArray]", ht = "[object Uint16Array]", gt = "[object Uint32Array]", _t = "[object Int8Array]", vt = "[object Int16Array]", yt = "[object Int32Array]", bt = "[object Float32Array]", xt = "[object Float64Array]";
626
597
  //#endregion
627
598
  //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
628
599
  function Y(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
629
600
  let a = i?.(e, t, n, r);
630
601
  if (a !== void 0) return a;
631
- if (rt(e)) return e;
602
+ if (Xe(e)) return e;
632
603
  if (r.has(e)) return r.get(e);
633
604
  if (Array.isArray(e)) {
634
605
  let t = Array(e.length);
@@ -654,7 +625,7 @@ function Y(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
654
625
  return t;
655
626
  }
656
627
  if (typeof Buffer < "u" && Buffer.isBuffer(e)) return e.subarray();
657
- if (it(e)) {
628
+ if (Ze(e)) {
658
629
  let t = new (Object.getPrototypeOf(e)).constructor(e.length);
659
630
  r.set(e, t);
660
631
  for (let a = 0; a < e.length; a++) t[a] = Y(e[a], a, n, r, i);
@@ -689,43 +660,43 @@ function Y(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
689
660
  let t = new String(e.valueOf());
690
661
  return r.set(e, t), X(t, e, n, r, i), t;
691
662
  }
692
- if (typeof e == "object" && kt(e)) {
663
+ if (typeof e == "object" && St(e)) {
693
664
  let t = Object.create(Object.getPrototypeOf(e));
694
665
  return r.set(e, t), X(t, e, n, r, i), t;
695
666
  }
696
667
  return e;
697
668
  }
698
669
  function X(e, t, n = e, r, i) {
699
- let a = [...Object.keys(t), ...at(t)];
670
+ let a = [...Object.keys(t), ...Qe(t)];
700
671
  for (let o = 0; o < a.length; o++) {
701
672
  let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
702
673
  (c == null || c.writable) && (e[s] = Y(t[s], s, n, r, i));
703
674
  }
704
675
  }
705
- function kt(e) {
706
- switch (ot(e)) {
707
- case dt:
708
- case gt:
676
+ function St(e) {
677
+ switch ($e(e)) {
678
+ case it:
679
+ case lt:
680
+ case ut:
681
+ case ft:
682
+ case rt:
683
+ case ot:
684
+ case bt:
685
+ case xt:
709
686
  case _t:
687
+ case vt:
710
688
  case yt:
711
- case ut:
689
+ case st:
690
+ case nt:
691
+ case dt:
692
+ case et:
693
+ case ct:
694
+ case tt:
695
+ case at:
712
696
  case pt:
713
- case Dt:
714
- case Ot:
715
- case wt:
716
- case Tt:
717
- case Et:
718
697
  case mt:
719
- case lt:
720
- case vt:
721
- case st:
722
698
  case ht:
723
- case ct:
724
- case ft:
725
- case bt:
726
- case xt:
727
- case St:
728
- case Ct: return !0;
699
+ case gt: return !0;
729
700
  default: return !1;
730
701
  }
731
702
  }
@@ -736,104 +707,98 @@ function Z(e) {
736
707
  }
737
708
  //#endregion
738
709
  //#region src/RightContent/utils.ts
739
- function At(e, t) {
710
+ function Ct(e, t) {
740
711
  let n = /* @__PURE__ */ new Map();
741
712
  return e.filter((e) => {
742
713
  let r = e[t];
743
714
  return n.has(r) ? !1 : (n.set(r, e), !0);
744
715
  });
745
716
  }
746
- var jt = "ABCDEFGHJKLMNOPQRSTWXYZ", Mt = "阿八嚓哒鹅发旮哈讥咔垃妈拿噢啪七日撒他挖昔压匝";
747
- function Nt(e) {
717
+ var wt = "ABCDEFGHJKLMNOPQRSTWXYZ", Tt = "阿八嚓哒鹅发旮哈讥咔垃妈拿噢啪七日撒他挖昔压匝";
718
+ function Et(e) {
748
719
  let t = e.codePointAt(0);
749
720
  if (t >= 65 && t <= 90) return e;
750
721
  if (t >= 97 && t <= 122) return e.toUpperCase();
751
722
  if (t < 19968 || t > 40959) return "";
752
- for (let t = 22; t >= 0; t--) if (e.localeCompare(Mt[t], "zh-CN") >= 0) return jt[t];
723
+ for (let t = 22; t >= 0; t--) if (e.localeCompare(Tt[t], "zh-CN") >= 0) return wt[t];
753
724
  return "";
754
725
  }
755
- function Pt(e) {
726
+ function Dt(e) {
756
727
  let t = "";
757
- for (let n of e) t += Nt(n);
728
+ for (let n of e) t += Et(n);
758
729
  return t;
759
730
  }
760
- function Ft(e, t) {
731
+ function Ot(e, t) {
761
732
  if (!t) return !1;
762
733
  let n = t.trim().toLowerCase();
763
- return !!(e.toLowerCase().includes(n) || Pt(e).toLowerCase().includes(n));
734
+ return !!(e.toLowerCase().includes(n) || Dt(e).toLowerCase().includes(n));
764
735
  }
765
- function It(e, t) {
736
+ function kt(e, t) {
766
737
  let n = t.trim();
767
738
  if (!n) return [];
768
739
  let r = [];
769
- for (let t of e) t.meta?.hideInMenu || Ft(t.meta?.title || (typeof t.name == "string" ? t.name : "") || "", n) && r.push(t);
740
+ for (let t of e) t.meta?.hideInMenu || Ot(t.meta?.title || (typeof t.name == "string" ? t.name : "") || "", n) && r.push(t);
770
741
  return r;
771
742
  }
772
743
  //#endregion
773
744
  //#region src/RightContent/Search/Panel.tsx
774
- var Lt = ({ className: e, value: t, locale: n }) => t ? i(N, {
775
- image: N.PRESENTED_IMAGE_SIMPLE,
745
+ var At = ({ className: e, value: t, locale: n }) => t ? r(j, {
746
+ image: j.PRESENTED_IMAGE_SIMPLE,
776
747
  description: n.noResult?.(t)
777
- }, null) : i("div", { class: e }, [n.noHistory]), Rt = /* @__PURE__ */ o((n) => {
778
- let r = de(), { emptyText: a } = P(), o = $e(n.historyKey || ve({
748
+ }, null) : r("div", { class: e }, [n.noHistory]), jt = /* @__PURE__ */ a((t) => {
749
+ let n = ue(), { renderEmpty: i } = F(), a = Ke(t.historyKey || ve({
779
750
  suffixCls: "search-history",
780
- isPor: !0
781
- }), []), s = _(0), c = _(Z(S(o))), l = Ne((e) => {
782
- let t = e.trim();
783
- if (!t) {
784
- c.value = [];
751
+ isPro: !0
752
+ }), []), o = g(0), s = g(Z(x(a))), c = De((e) => {
753
+ let n = e.trim();
754
+ if (!n) {
755
+ s.value = [];
785
756
  return;
786
757
  }
787
- c.value = It(n.dataSource ?? [], t), s.value = 0;
758
+ s.value = kt(t.dataSource ?? [], n), o.value = 0;
788
759
  }, 200);
789
- C(() => n.keyword, (e) => {
790
- e ? l(e) : c.value = Z(S(o));
760
+ S(() => t.keyword, (e) => {
761
+ e ? c(e) : s.value = Z(x(a));
791
762
  });
792
- function u() {
793
- document.querySelector(`[data-search-item="${s.value}"]`)?.scrollIntoView({ block: "nearest" });
763
+ function l() {
764
+ document.querySelector(`[data-search-item="${o.value}"]`)?.scrollIntoView({ block: "nearest" });
794
765
  }
795
- async function d() {
796
- if (c.value.length === 0) return;
797
- let e = s.value;
766
+ async function u() {
767
+ if (s.value.length === 0) return;
768
+ let e = o.value;
798
769
  if (e < 0) return;
799
- let t = c.value[e];
800
- if (!t) return;
801
- let i = he(t.redirect) ? t.redirect : t.path || "", a = t.meta?.link || "", l = ge(a);
802
- o.value.every((e) => e.name !== t.name) && o.value.push(Z(t)), n.onClose?.(!0), await f(), l && a && t.meta?.linkStatus === 1 ? window.open(a, "_blank") : r.push({ path: i });
770
+ let r = s.value[e];
771
+ if (!r) return;
772
+ let i = he(r.redirect) ? r.redirect : r.path || "", c = r.meta?.link || "", l = ge(c);
773
+ a.value.every((e) => e.name !== r.name) && a.value.push(Z(r)), t.onClose?.(!0), await d(), l && c && r.meta?.linkStatus === 1 ? window.open(c, "_blank") : n.push({ path: i });
803
774
  }
804
- function m() {
805
- c.value.length !== 0 && (n.onBlur?.(), s.value--, s.value < 0 && (s.value = c.value.length - 1), u());
775
+ function p() {
776
+ s.value.length !== 0 && (t.onBlur?.(), o.value--, o.value < 0 && (o.value = s.value.length - 1), l());
806
777
  }
807
- function h() {
808
- c.value.length !== 0 && (n.onBlur?.(), s.value++, s.value > c.value.length - 1 && (s.value = 0), u());
778
+ function m() {
779
+ s.value.length !== 0 && (t.onBlur?.(), o.value++, o.value > s.value.length - 1 && (o.value = 0), l());
809
780
  }
810
- p(() => {
811
- K("Enter", d), K("ArrowUp", m), K("ArrowDown", h);
781
+ f(() => {
782
+ K("Enter", u), K("ArrowUp", p), K("ArrowDown", m);
812
783
  });
813
- function g(e) {
814
- s.value = e;
784
+ function h(e) {
785
+ o.value = e;
815
786
  }
816
- function v(e, t) {
817
- e.stopPropagation(), c.value = c.value.filter((e) => e.name !== t.name), o.value = o.value.filter((e) => e.name !== t.name), s.value = s.value - 1 >= 0 ? s.value - 1 : 0, u();
787
+ function _(e, t) {
788
+ e.stopPropagation(), s.value = s.value.filter((e) => e.name !== t.name), a.value = a.value.filter((e) => e.name !== t.name), o.value = o.value - 1 >= 0 ? o.value - 1 : 0, l();
818
789
  }
819
- let y = (e) => R(`${n.className}${e ? `-${e}` : ""}`, n.hashId);
820
- return () => {
821
- let r = I(a.value) ? a.value : [a.value];
822
- return i(e, null, [c.value.length > 0 ? i(e, null, [o.value.length > 0 && !n.keyword && i("div", { class: y("panel-title") }, [n.locale.searchHistory]), i("div", { class: y("panel-list") }, [At(c.value, "name").map((e, t) => i("div", {
823
- key: e.name,
824
- class: y(R("panel-item", t === s.value && "active")),
825
- "data-search-item": t,
826
- onClick: () => d(),
827
- onMouseenter: () => g(t)
828
- }, [i("div", { class: y("panel-item-left") }, [e.meta?.title]), o.value.length > 0 && !n.keyword && i(T, { onClick: (t) => v(t, e) }, null)]))])]) : a.value ? r.map((e) => t(e, {
829
- ...n.emptyProps,
830
- text: n.keyword ? n.locale.noResult?.(n.keyword) : !0
831
- })) : i(Lt, {
832
- className: y("result"),
833
- value: n.keyword,
834
- locale: n.locale
835
- }, null)]);
836
- };
790
+ let v = (e) => I(`${t.className}${e ? `-${e}` : ""}`, t.hashId);
791
+ return () => r(e, null, [s.value.length > 0 ? r(e, null, [a.value.length > 0 && !t.keyword && r("div", { class: v("panel-title") }, [t.locale.searchHistory]), r("div", { class: v("panel-list") }, [Ct(s.value, "name").map((e, n) => r("div", {
792
+ key: e.name,
793
+ class: v(I("panel-item", n === o.value && "active")),
794
+ "data-search-item": n,
795
+ onClick: () => u(),
796
+ onMouseenter: () => h(n)
797
+ }, [r("div", { class: v("panel-item-left") }, [e.meta?.title]), a.value.length > 0 && !t.keyword && r(w, { onClick: (t) => _(t, e) }, null)]))])]) : i.value?.() || r(At, {
798
+ className: v("result"),
799
+ value: t.keyword,
800
+ locale: t.locale
801
+ }, null)]);
837
802
  }, {
838
803
  props: {
839
804
  className: {
@@ -875,7 +840,7 @@ var Lt = ({ className: e, value: t, locale: n }) => t ? i(N, {
875
840
  },
876
841
  name: "GSearchPanel",
877
842
  inheritAttrs: !1
878
- }), zt = F("ProRightSearch", (e) => {
843
+ }), Mt = P("ProRightSearch", (e) => {
879
844
  let t = e.menuItemIconSize || e.fontSize, n = e.calc(e.borderRadiusLG).mul(2).equal(), r = e.calc(e.paddingXXS).div(2).equal();
880
845
  return { [e.componentCls]: {
881
846
  display: "flex",
@@ -963,42 +928,42 @@ var Lt = ({ className: e, value: t, locale: n }) => t ? i(N, {
963
928
  color: e.colorTextQuaternary
964
929
  }
965
930
  } };
966
- }), Bt = ({ className: e, hashId: t, locale: n }) => i("div", { class: R(`${e}-footer`, t) }, [i("div", { class: R(`${e}-footer-icon`, t) }, [i(O, null, null), n.selectLabel]), i("div", { class: R(`${e}-footer-icon`, t) }, [
967
- i(w, null, null),
968
- i(w, { rotate: 180 }, null),
931
+ }), Nt = ({ className: e, hashId: t, locale: n }) => r("div", { class: I(`${e}-footer`, t) }, [r("div", { class: I(`${e}-footer-icon`, t) }, [r(E, null, null), n.selectLabel]), r("div", { class: I(`${e}-footer-icon`, t) }, [
932
+ r(C, null, null),
933
+ r(C, { rotate: 180 }, null),
969
934
  n.navigateLabel
970
- ])]), Vt = /* @__PURE__ */ o((t) => {
971
- let a = M(), { prefixCls: o } = ce("pro-right-search"), s = le(o), [c, l] = zt(o, s), u = _(""), p = _(!1), m = tt(), h = fe() ? m["ctrl+k"] : m["cmd+k"], g = _(), v = n(() => t.dataSource?.length ? _e(t.dataSource) : a?.menuState?.flatMenus ? a.menuState.flatMenus.value : []);
972
- Le(h, () => {
973
- t.disabledShortKey || (p.value = !0);
974
- }), Le(() => p.value, () => {
975
- f(() => {
976
- g.value?.focus?.();
935
+ ])]), Pt = /* @__PURE__ */ a((i) => {
936
+ let a = ae(), { prefixCls: o } = N("pro-right-search"), s = ce(o), [c, l] = Mt(o, s), f = g(""), p = g(!1), m = Je(), h = de() ? m["ctrl+k"] : m["cmd+k"], _ = g(), v = t(() => i.dataSource?.length ? _e(i.dataSource) : a?.menuState?.flatMenus ? a.menuState.flatMenus.value : []);
937
+ H(h, () => {
938
+ i.disabledShortKey || (p.value = !0);
939
+ }), H(() => p.value, () => {
940
+ d(() => {
941
+ _.value?.focus?.();
977
942
  });
978
943
  });
979
944
  function y(e) {
980
- p.value = !1, e && (u.value = "");
945
+ p.value = !1, e && (f.value = "");
981
946
  }
982
947
  return () => {
983
- let n = {
948
+ let t = {
984
949
  className: o.value,
985
950
  hashId: c.value
986
951
  }, a = `${o.value}-modal`;
987
- return i(e, null, [i("div", {
988
- class: R(o.value, c.value, l.value, s.value),
952
+ return r(e, null, [r("div", {
953
+ class: I(o.value, c.value, l.value, s.value),
989
954
  onClick: () => {
990
955
  p.value = !0;
991
956
  }
992
957
  }, [
993
- i(A, null, null),
994
- i("span", { class: R(`${o.value}-word`, c.value) }, [t.locale.searchLabel]),
995
- i("span", { class: R(`${o.value}-word-icon`, c.value) }, [
996
- r("⌘"),
958
+ r(k, null, null),
959
+ r("span", { class: I(`${o.value}-word`, c.value) }, [i.locale.searchLabel]),
960
+ r("span", { class: I(`${o.value}-word-icon`, c.value) }, [
961
+ n("⌘"),
997
962
  " ",
998
- i("kbd", null, [r("K")])
963
+ r("kbd", null, [n("K")])
999
964
  ])
1000
- ]), i(ue, {
1001
- wrapClassName: R(a, c.value),
965
+ ]), r(le, {
966
+ wrapClassName: I(a, c.value),
1002
967
  width: 600,
1003
968
  scrollProps: {
1004
969
  maxHeight: 400,
@@ -1006,33 +971,33 @@ var Lt = ({ className: e, value: t, locale: n }) => t ? i(N, {
1006
971
  },
1007
972
  centered: !1,
1008
973
  destroyOnHidden: !1,
1009
- title: i(se, {
974
+ title: r(M, {
1010
975
  style: {
1011
976
  width: `${600 * .8}px`,
1012
977
  padding: 0
1013
978
  },
1014
- ref: g,
979
+ ref: _,
1015
980
  bordered: !1,
1016
981
  size: "large",
1017
- placeholder: t.locale.searchPlaceholder,
1018
- value: u.value,
982
+ placeholder: i.locale.searchPlaceholder,
983
+ value: f.value,
1019
984
  "onUpdate:value": (e) => {
1020
- u.value = e;
985
+ f.value = e;
1021
986
  }
1022
- }, { prefix: () => i(A, null, null) }),
987
+ }, { prefix: () => r(k, null, null) }),
1023
988
  open: p.value,
1024
- footer: i(Bt, {
989
+ footer: r(Nt, {
1025
990
  className: a,
1026
991
  hashId: c.value,
1027
- locale: t.locale
992
+ locale: i.locale
1028
993
  }, null),
1029
994
  onCancel: () => y()
1030
- }, { default: () => [i(Rt, d(n, {
1031
- emptyProps: t.emptyProps,
1032
- keyword: u.value,
995
+ }, { default: () => [r(jt, u(t, {
996
+ emptyProps: i.emptyProps,
997
+ keyword: f.value,
1033
998
  dataSource: v.value,
1034
- historyKey: t.searchHistoryKey,
1035
- locale: t.locale,
999
+ historyKey: i.searchHistoryKey,
1000
+ locale: i.locale,
1036
1001
  onClose: y
1037
1002
  }), null)] })]);
1038
1003
  };
@@ -1065,10 +1030,10 @@ var Lt = ({ className: e, value: t, locale: n }) => t ? i(N, {
1065
1030
  });
1066
1031
  //#endregion
1067
1032
  //#region src/RightContent/style.ts
1068
- function Ht(e, t) {
1033
+ function Ft(e, t) {
1069
1034
  return `color-mix(in srgb, ${e} ${t * 100}%, transparent)`;
1070
1035
  }
1071
- var Ut = F("ProRightContent", (e) => ({ [e.componentCls]: {
1036
+ var It = P("ProRightContent", (e) => ({ [e.componentCls]: {
1072
1037
  height: "100%",
1073
1038
  "&-header-actions": {
1074
1039
  display: "flex",
@@ -1117,7 +1082,7 @@ var Ut = F("ProRightContent", (e) => ({ [e.componentCls]: {
1117
1082
  height: 44,
1118
1083
  lineHeight: "44px",
1119
1084
  borderRadius: e.borderRadius,
1120
- "&:hover": { backgroundColor: Ht(e.colorTextBase, .03) }
1085
+ "&:hover": { backgroundColor: Ft(e.colorTextBase, .03) }
1121
1086
  },
1122
1087
  "&-avatar": {
1123
1088
  display: "inline-flex",
@@ -1133,119 +1098,119 @@ var Ut = F("ProRightContent", (e) => ({ [e.componentCls]: {
1133
1098
  }
1134
1099
  } })), Q = { fontSize: "15px" };
1135
1100
  function $(e, t) {
1136
- return () => i("div", { style: {
1101
+ return () => r("div", { style: {
1137
1102
  display: "flex",
1138
1103
  alignItems: "center",
1139
1104
  gap: "6px"
1140
1105
  } }, [typeof e == "function" ? e() : e, t]);
1141
1106
  }
1142
- var Wt = [
1107
+ var Lt = [
1143
1108
  {
1144
1109
  value: "light",
1145
- label: $(l(j, {
1110
+ label: $(c(A, {
1146
1111
  type: "Moon",
1147
1112
  style: Q
1148
1113
  }), "亮色")
1149
1114
  },
1150
1115
  {
1151
1116
  value: "dark",
1152
- label: $(l(j, {
1117
+ label: $(c(A, {
1153
1118
  type: "Sunny",
1154
1119
  style: Q
1155
1120
  }), "深色")
1156
1121
  },
1157
1122
  {
1158
1123
  value: "system",
1159
- label: $(l(D, { style: Q }), "自动")
1124
+ label: $(c(T, { style: Q }), "自动")
1160
1125
  }
1161
- ], Gt = /* @__PURE__ */ o((t, { emit: r, slots: a }) => {
1162
- let { isFullscreen: o, toggle: s } = Qe(), c = M(), { setTheme: l, isDark: u, theme: f } = ie(), { prefixCls: p } = ce("pro-right-content"), m = le(p), [h, g] = Ut(p, m), v = n(() => c?.isMobile.value ?? !1), y = _(), { width: b } = Xe(y), x = _("auto"), S = _();
1163
- C(b, (e) => {
1126
+ ], Rt = /* @__PURE__ */ a((n, { emit: i, slots: a }) => {
1127
+ let { isFullscreen: o, toggle: s } = Ge(), c = ae(), { setTheme: l, isDark: d, theme: f } = ie(), { prefixCls: p } = N("pro-right-content"), m = ce(p), [h, _] = It(p, m), v = t(() => c?.isMobile.value ?? !1), y = g(), { width: b } = Ue(y), x = g("auto"), C = g();
1128
+ S(b, (e) => {
1164
1129
  x.value = e > 0 ? e : "auto";
1165
1130
  });
1166
- let w = _(!1), T = n(() => ({
1167
- ...nt,
1168
- ...t.locale
1169
- })), D = n(() => t.actions === !1 ? {} : {
1131
+ let w = g(!1), T = t(() => ({
1132
+ ...Ye,
1133
+ ...n.locale
1134
+ })), E = t(() => n.actions === !1 ? {} : {
1170
1135
  lock: !0,
1171
1136
  theme: !0,
1172
1137
  search: !0,
1173
1138
  themeEditor: !0,
1174
1139
  fullScreen: !0,
1175
- ...t.actions
1176
- }), O = n(() => (t.themeOptions || Wt).map((e) => ({
1140
+ ...n.actions
1141
+ }), k = t(() => (n.themeOptions || Lt).map((e) => ({
1177
1142
  key: e.value,
1178
1143
  label: e.label()
1179
1144
  })));
1180
- function A(e) {
1145
+ function j(e) {
1181
1146
  let t = e.key;
1182
1147
  l(t);
1183
1148
  }
1184
- let N = n(() => {
1149
+ let M = t(() => {
1185
1150
  let e = [];
1186
- return D.value.lock && a.lock && (e.push({
1151
+ return E.value.lock && a.lock && (e.push({
1187
1152
  key: "lock",
1188
- icon: () => i(te, null, null),
1153
+ icon: () => r(te, null, null),
1189
1154
  label: T.value.lockScreen
1190
1155
  }), e.push({ type: "divider" })), e.push({
1191
1156
  key: "logout",
1192
- icon: () => i(k, null, null),
1157
+ icon: () => r(O, null, null),
1193
1158
  label: T.value.logout
1194
1159
  }), e;
1195
1160
  });
1196
- function se(e) {
1197
- e.key === "lock" ? w.value = !0 : e.key === "logout" && r("logout");
1198
- }
1199
- function ue(e) {
1200
- r("actionClick", e);
1161
+ function le(e) {
1162
+ e.key === "lock" ? w.value = !0 : e.key === "logout" && i("logout");
1201
1163
  }
1202
1164
  function P(e) {
1165
+ i("actionClick", e);
1166
+ }
1167
+ function F(e) {
1203
1168
  w.value = e;
1204
1169
  }
1205
1170
  return () => {
1206
- let n = [`${p.value}-header-actions-item`, h.value], r = o.value ? E : ee;
1207
- return i("div", {
1171
+ let t = [`${p.value}-header-actions-item`, h.value], i = o.value ? ee : D;
1172
+ return r("div", {
1208
1173
  ref: y,
1209
- class: R(p.value, h.value, g.value, m.value),
1174
+ class: I(p.value, h.value, _.value, m.value),
1210
1175
  style: {
1211
1176
  minWidth: x.value,
1212
1177
  height: "100%"
1213
1178
  }
1214
- }, [i("div", { style: { height: "100%" } }, [i("div", { class: R(`${p.value}-header-actions`, h.value) }, [a.default ? a.default() : i(e, null, [
1215
- D.value.search && !v.value && i(Vt, {
1216
- dataSource: t.searchConfig?.dataSource,
1217
- disabledShortKey: t.searchConfig?.disabledShortKey,
1218
- searchHistoryKey: t.searchConfig?.historyKey,
1219
- emptyProps: t.searchConfig?.emptyProps,
1179
+ }, [r("div", { style: { height: "100%" } }, [r("div", { class: I(`${p.value}-header-actions`, h.value) }, [a.default ? a.default() : r(e, null, [
1180
+ E.value.search && !v.value && r(Pt, {
1181
+ dataSource: n.searchConfig?.dataSource,
1182
+ disabledShortKey: n.searchConfig?.disabledShortKey,
1183
+ searchHistoryKey: n.searchConfig?.historyKey,
1184
+ emptyProps: n.searchConfig?.emptyProps,
1220
1185
  locale: T.value
1221
1186
  }, null),
1222
- D.value.theme && i("div", {
1223
- ref: S,
1224
- class: R(`${p.value}-header-actions-item`, `${p.value}-header-actions-theme`, h.value)
1225
- }, [i(oe, {
1187
+ E.value.theme && r("div", {
1188
+ ref: C,
1189
+ class: I(`${p.value}-header-actions-item`, `${p.value}-header-actions-theme`, h.value)
1190
+ }, [r(se, {
1226
1191
  trigger: ["click"],
1227
1192
  placement: "bottomRight",
1228
1193
  menu: {
1229
- items: O.value,
1230
- onClick: A,
1194
+ items: k.value,
1195
+ onClick: j,
1231
1196
  selectedKeys: [f.value]
1232
1197
  }
1233
- }, { default: () => [i(j, {
1234
- class: R(`${p.value}-header-actions-icon`, h.value),
1235
- type: u.value ? "Moon" : "Sunny"
1198
+ }, { default: () => [r(A, {
1199
+ class: I(`${p.value}-header-actions-icon`, h.value),
1200
+ type: d.value ? "Moon" : "Sunny"
1236
1201
  }, null)] })]),
1237
- D.value.themeEditor && !v.value && i("div", { class: R(n) }, [i(ne, { onClick: () => ue("themeEditor") }, null)]),
1238
- D.value.fullScreen && !v.value && i("div", { class: R(n) }, [i(r, { onClick: () => s() }, null)]),
1239
- a.actionsRender?.(n)
1240
- ]), i(oe, d({ placement: "bottomRight" }, t.dropdownProps, { menu: a.dropdownMenu ? void 0 : {
1241
- items: N.value,
1242
- onClick: se
1243
- } }), { default: () => [a.dropdownTrigger ? a.dropdownTrigger() : i("div", { class: R(`${p.value}-header-actions-avatar`, h.value) }, [i(ae, {
1202
+ E.value.themeEditor && !v.value && r("div", { class: I(t) }, [r(ne, { onClick: () => P("themeEditor") }, null)]),
1203
+ E.value.fullScreen && !v.value && r("div", { class: I(t) }, [r(i, { onClick: () => s() }, null)]),
1204
+ a.actionsRender?.(t)
1205
+ ]), r(se, u({ placement: "bottomRight" }, n.dropdownProps, { menu: a.dropdownMenu ? void 0 : {
1206
+ items: M.value,
1207
+ onClick: le
1208
+ } }), { default: () => [a.dropdownTrigger ? a.dropdownTrigger() : r("div", { class: I(`${p.value}-header-actions-avatar`, h.value) }, [r(oe, {
1244
1209
  size: 28,
1245
- icon: i(re, null, null)
1246
- }, null), t.name && i("span", { class: R(`${p.value}-header-actions-name`, h.value) }, [t.name])])] })])]), a.lock?.({
1210
+ icon: r(re, null, null)
1211
+ }, null), n.name && r("span", { class: I(`${p.value}-header-actions-name`, h.value) }, [n.name])])] })])]), a.lock?.({
1247
1212
  open: w.value,
1248
- onOpenChange: P
1213
+ onOpenChange: F
1249
1214
  })]);
1250
1215
  };
1251
1216
  }, {
@@ -1285,4 +1250,4 @@ var Wt = [
1285
1250
  inheritAttrs: !1
1286
1251
  });
1287
1252
  //#endregion
1288
- export { Gt as RightContent };
1253
+ export { Rt as RightContent };