@campus-admin/core 2.0.7 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,79 +2,80 @@ import './style.css'
2
2
  import "element-plus/es/components/base/style/css";
3
3
  import "element-plus/theme-chalk/dark/css-vars.css";
4
4
  import "@campus-admin/theme/nova.css";
5
- import { Fragment as e, KeepAlive as t, computed as n, createApp as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createStaticVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, h as f, mergeModels as p, nextTick as m, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as _, onMounted as v, openBlock as y, reactive as b, ref as x, renderList as S, renderSlot as C, resolveComponent as w, resolveDynamicComponent as T, toDisplayString as E, unref as D, useModel as O, vShow as k, watch as A, watchEffect as j, withCtx as M, withDirectives as N, withModifiers as P } from "vue";
6
- import { createPinia as F, defineStore as I } from "pinia";
7
- import { installUi as L, translateKey as R } from "@campus-admin/ui";
8
- import { LOCALES as z, frameworkMessages as ee } from "@campus-admin/locale";
9
- import { createI18n as te, useI18n as B } from "vue-i18n";
10
- import { RouterLink as V, createRouter as ne, createWebHashHistory as H, createWebHistory as re, useRoute as U, useRouter as W } from "vue-router";
11
- import { applyTheme as ie, deriveCssVars as ae, isHexColor as oe, resolveMode as se, resolveTheme as ce } from "@campus-admin/theme";
12
- import { ElLoading as le, ElMessage as ue, ElMessageBox as de, ElNotification as fe } from "element-plus";
5
+ import { Fragment as e, KeepAlive as t, computed as n, createApp as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createStaticVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, h as f, mergeModels as p, nextTick as m, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as _, onMounted as v, openBlock as y, reactive as b, ref as x, renderList as S, renderSlot as C, resolveComponent as w, resolveDynamicComponent as T, toDisplayString as E, unref as D, useId as O, useModel as k, vShow as A, watch as j, watchEffect as M, withCtx as N, withDirectives as P, withModifiers as F } from "vue";
6
+ import { createPinia as I, defineStore as L } from "pinia";
7
+ import { installUi as R, translateKey as z } from "@campus-admin/ui";
8
+ import { LOCALES as ee, frameworkMessages as te } from "@campus-admin/locale";
9
+ import { createI18n as B, useI18n as V } from "vue-i18n";
10
+ import { RouterLink as ne, createRouter as re, createWebHashHistory as H, createWebHistory as U, useRoute as W, useRouter as G } from "vue-router";
11
+ import { applyTheme as ie, deriveCssVars as ae, isHexColor as oe, parseColor as se, resolveMode as ce, resolveTheme as le, toHex as ue } from "@campus-admin/theme";
12
+ import { ElLoading as de, ElMessage as fe, ElMessageBox as pe, ElNotification as me } from "element-plus";
13
13
  import "element-plus/es/components/loading/style/css";
14
14
  import "element-plus/es/components/notification/style/css";
15
15
  import "element-plus/es/components/message/style/css";
16
16
  import "element-plus/es/components/message-box/style/css";
17
+ import { pinyin as he } from "pinyin-pro";
17
18
  export * from "@campus-admin/ui";
18
19
  // packages/core/src/storage.ts
19
- var pe = "ca:";
20
- function me(e, t = "local") {
20
+ var ge = "ca:";
21
+ function _e(e, t = "local") {
21
22
  try {
22
- return (t === "local" ? localStorage : sessionStorage).getItem(pe + e);
23
+ return (t === "local" ? localStorage : sessionStorage).getItem(ge + e);
23
24
  } catch {
24
25
  return null;
25
26
  }
26
27
  }
27
- function G(e, t, n = "local") {
28
+ function K(e, t, n = "local") {
28
29
  try {
29
30
  let r = n === "local" ? localStorage : sessionStorage;
30
- t === null ? r.removeItem(pe + e) : r.setItem(pe + e, t);
31
+ t === null ? r.removeItem(ge + e) : r.setItem(ge + e, t);
31
32
  } catch {}
32
33
  }
33
- function he(e, t = "local") {
34
- let n = me(e, t);
34
+ function ve(e, t = "local") {
35
+ let n = _e(e, t);
35
36
  if (n) try {
36
37
  return JSON.parse(n);
37
38
  } catch {
38
39
  return;
39
40
  }
40
41
  }
41
- function ge(e, t, n = "local") {
42
- G(e, JSON.stringify(t), n);
42
+ function ye(e, t, n = "local") {
43
+ K(e, JSON.stringify(t), n);
43
44
  }
44
45
  // packages/core/src/i18n.ts
45
- var _e = (e) => typeof e == "object" && !!e && !Array.isArray(e);
46
- function ve(e, t) {
46
+ var be = (e) => typeof e == "object" && !!e && !Array.isArray(e);
47
+ function xe(e, t) {
47
48
  let n = { ...e };
48
49
  for (let [e, r] of Object.entries(t)) {
49
50
  let t = n[e];
50
- n[e] = _e(t) && _e(r) ? ve(t, r) : r;
51
+ n[e] = be(t) && be(r) ? xe(t, r) : r;
51
52
  }
52
53
  return n;
53
54
  }
54
- var ye = "locale";
55
- function be(e) {
55
+ var Se = "locale";
56
+ function Ce(e) {
56
57
  return e === "zh-CN" || e === "en-US";
57
58
  }
58
- function xe(e) {
59
- let t = me(ye), n = be(t) ? t : e.defaultLocale ?? "zh-CN", r = Object.fromEntries(["zh-CN", "en-US"].map((t) => [t, ve(ee[t], e.messages?.[t] ?? {})])), i = te({
59
+ function we(e) {
60
+ let t = _e(Se), n = Ce(t) ? t : e.defaultLocale ?? "zh-CN", r = Object.fromEntries(["zh-CN", "en-US"].map((t) => [t, xe(te[t], e.messages?.[t] ?? {})])), i = B({
60
61
  legacy: !1,
61
62
  locale: n,
62
63
  fallbackLocale: "zh-CN",
63
64
  messages: r
64
65
  });
65
- return typeof document < "u" && A(() => i.global.locale.value, (e) => {
66
+ return typeof document < "u" && j(() => i.global.locale.value, (e) => {
66
67
  document.documentElement.lang = e;
67
- }, { immediate: !0 }), Se = i, i;
68
+ }, { immediate: !0 }), Te = i, i;
68
69
  }
69
- var Se;
70
- function Ce(e, t) {
71
- return Se ? Se.global.t(e, t ?? {}) : e;
70
+ var Te;
71
+ function Ee(e, t) {
72
+ return Te ? Te.global.t(e, t ?? {}) : e;
72
73
  }
73
- function we(e) {
74
- G(ye, e);
74
+ function De(e) {
75
+ K(Se, e);
75
76
  }
76
- function K() {
77
- let { t: e, te: t, locale: n } = B();
77
+ function q() {
78
+ let { t: e, te: t, locale: n } = V();
78
79
  return {
79
80
  t: e,
80
81
  te: t,
@@ -83,38 +84,38 @@ function K() {
83
84
  };
84
85
  }
85
86
  // packages/core/src/CampusRoot.vue
86
- var Te = /* @__PURE__ */ d({
87
+ var Oe = /* @__PURE__ */ d({
87
88
  __name: "CampusRoot",
88
89
  setup(e) {
89
- let { locale: t } = K();
90
+ let { locale: t } = q();
90
91
  return (e, n) => {
91
92
  let r = w("router-view"), a = w("ca-config-provider");
92
93
  return y(), i(a, { locale: D(t) }, {
93
- default: M(() => [u(r)]),
94
+ default: N(() => [u(r)]),
94
95
  _: 1
95
96
  }, 8, ["locale"]);
96
97
  };
97
98
  }
98
99
  });
99
100
  // packages/core/src/types.ts
100
- function Ee(e) {
101
+ function ke(e) {
101
102
  return "children" in e;
102
103
  }
103
104
  // packages/core/src/context.ts
104
- var De;
105
- function Oe(e) {
106
- De = e;
105
+ var Ae;
106
+ function je(e) {
107
+ Ae = e;
107
108
  }
108
- function q() {
109
- if (!De) throw Error("[campus] 请先调用 createCampusApp()");
110
- return De;
109
+ function J() {
110
+ if (!Ae) throw Error("[campus] 请先调用 createCampusApp()");
111
+ return Ae;
111
112
  }
112
- function ke(e) {
113
- for (let t of q().menus) {
113
+ function Me(e) {
114
+ for (let t of J().menus) {
114
115
  if (t.key === e && t.path) return { titles: [t.title] };
115
116
  for (let n of t.children) {
116
117
  if (n.key === e && n.path) return { titles: [t.title, n.title] };
117
- if (Ee(n)) {
118
+ if (ke(n)) {
118
119
  let r = n.children.find((t) => t.key === e);
119
120
  if (r) return { titles: [
120
121
  t.title,
@@ -125,15 +126,15 @@ function ke(e) {
125
126
  }
126
127
  }
127
128
  }
128
- var Ae = [
129
+ var Ne = [
129
130
  "none",
130
131
  "panel",
131
132
  "all"
132
133
  ];
133
- function je(e) {
134
+ function Pe(e) {
134
135
  let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
135
136
  function o(e, s, c, l = 1) {
136
- let u = l === 1 ? i : l === 2 && Ee(e) ? a : void 0;
137
+ let u = l === 1 ? i : l === 2 && ke(e) ? a : void 0;
137
138
  if (u?.has(e.key)) throw Error(`[campus] 菜单${l === 1 ? "一级场景键" : "组键"}重复:${e.key}`);
138
139
  u?.add(e.key);
139
140
  let d = e.path !== void 0;
@@ -147,9 +148,9 @@ function je(e) {
147
148
  let { children: i, ...a } = e, o = {
148
149
  ...a,
149
150
  appKey: s,
150
- groupKey: l === 2 && Ee(e) ? e.key : c
151
+ groupKey: l === 2 && ke(e) ? e.key : c
151
152
  };
152
- o.sideCollapse != null && !Ae.includes(o.sideCollapse) && (console.warn(`[campus] 菜单页面 sideCollapse 只能是 none / panel / all,已忽略:${e.key}`), delete o.sideCollapse), o.openMode != null && ![
153
+ o.sideCollapse != null && !Ne.includes(o.sideCollapse) && (console.warn(`[campus] 菜单页面 sideCollapse 只能是 none / panel / all,已忽略:${e.key}`), delete o.sideCollapse), o.openMode != null && ![
153
154
  "normal",
154
155
  "collapsePanel",
155
156
  "collapseAll",
@@ -166,7 +167,7 @@ function je(e) {
166
167
  for (let t of e) o(t, t.key);
167
168
  return t;
168
169
  }
169
- function Me(e) {
170
+ function Fe(e) {
170
171
  let t = {
171
172
  home: "/",
172
173
  login: "/login",
@@ -186,8 +187,8 @@ function Me(e) {
186
187
  ])).size !== 5) throw Error("[campus] 系统页面路径不能重复");
187
188
  return t;
188
189
  }
189
- function Ne(e, t) {
190
- let n = e.homeEntry === !1 ? void 0 : je(e.menus).find((e) => e.affix && t(e.permission)), r = !e.accountInMenu && !e.onAccountClick, i = (i) => !!i.path && t(i.permission) && i.key !== n?.key && (!r || i.path !== e.accountPath);
190
+ function Ie(e, t) {
191
+ let n = e.homeEntry === !1 ? void 0 : Pe(e.menus).find((e) => e.affix && t(e.permission)), r = !e.accountInMenu && !e.onAccountClick, i = (i) => !!i.path && t(i.permission) && i.key !== n?.key && (!r || i.path !== e.accountPath);
191
192
  function a(e) {
192
193
  let t = "children" in e ? e.children.map((e) => a(e)).filter((e) => e !== void 0) : [], n = i(e);
193
194
  if (!n && !t.length) return;
@@ -200,7 +201,7 @@ function Ne(e, t) {
200
201
  accountStandalone: r
201
202
  };
202
203
  }
203
- function J(e) {
204
+ function Y(e) {
204
205
  return {
205
206
  login: "login",
206
207
  register: "register",
@@ -211,51 +212,51 @@ function J(e) {
211
212
  };
212
213
  }
213
214
  // packages/core/src/stores/theme.ts
214
- var Pe = "theme-mode", Fe = "box-style", Ie = "user-primary";
215
- function Le() {
216
- return me(Fe) === "border" ? "border" : "shadow";
215
+ var Le = "theme-mode", Re = "box-style", ze = "user-primary";
216
+ function Be() {
217
+ return _e(Re) === "border" ? "border" : "shadow";
217
218
  }
218
- function Re() {
219
- let e = me(Ie);
219
+ function Ve() {
220
+ let e = _e(ze);
220
221
  return oe(e) ? e : void 0;
221
222
  }
222
- function ze() {
223
- let e = me(Pe);
223
+ function He() {
224
+ let e = _e(Le);
224
225
  return e === "light" || e === "dark" || e === "auto" ? e : "auto";
225
226
  }
226
- var Be = I("campus-theme", () => {
227
- let e = x({}), t = x(ze()), r = x(Le()), i = x(Re()), a = typeof matchMedia == "function" ? matchMedia("(prefers-color-scheme: dark)") : void 0, o = x(a?.matches ?? !1);
227
+ var Ue = L("campus-theme", () => {
228
+ let e = x({}), t = x(He()), r = x(Be()), i = x(Ve()), a = typeof matchMedia == "function" ? matchMedia("(prefers-color-scheme: dark)") : void 0, o = x(a?.matches ?? !1);
228
229
  a?.addEventListener("change", (e) => o.value = e.matches);
229
- let s = n(() => ce(e.value)), c = n(() => e.value.tenantDefault?.locks?.includes("primary") ?? !1), l = n(() => {
230
+ let s = n(() => le(e.value)), c = n(() => e.value.tenantDefault?.locks?.includes("primary") ?? !1), l = n(() => {
230
231
  let e = s.value.theme, t = i.value;
231
232
  return !t || c.value ? e : {
232
233
  ...e,
233
234
  primary: t,
234
235
  headerBg: e.headerBg === e.primary ? t : e.headerBg
235
236
  };
236
- }), u = n(() => s.value.issues), d = n(() => se(t.value, o.value)), f = n(() => ae(l.value, d.value));
237
- j(() => ie(f.value, d.value, l.value.style)), j(() => {
237
+ }), u = n(() => s.value.issues), d = n(() => ce(t.value, o.value)), f = n(() => ae(l.value, d.value));
238
+ M(() => ie(f.value, d.value, l.value.style)), M(() => {
238
239
  document.documentElement.dataset.caBox = r.value;
239
240
  });
240
241
  function p(e) {
241
- (e === void 0 || oe(e)) && (i.value = e, G(Ie, e ?? null));
242
+ (e === void 0 || oe(e)) && (i.value = e, K(ze, e ?? null));
242
243
  }
243
244
  function h(e) {
244
- r.value = e, G(Fe, e);
245
+ r.value = e, K(Re, e);
245
246
  }
246
247
  function g() {
247
- return `theme-layers:${q().theme?.cacheKey ?? location.host}`;
248
+ return `theme-layers:${J().theme?.cacheKey ?? location.host}`;
248
249
  }
249
250
  function _(e) {
250
- t.value = e, G(Pe, e);
251
+ t.value = e, K(Le, e);
251
252
  }
252
253
  function v(e, t) {
253
- let n = document, r = se(e, o.value) !== d.value, i = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
254
+ let n = document, r = ce(e, o.value) !== d.value, i = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
254
255
  if (!t || !r || i || !n.startViewTransition) {
255
256
  _(e);
256
257
  return;
257
258
  }
258
- let a = Math.hypot(Math.max(t.x, innerWidth - t.x), Math.max(t.y, innerHeight - t.y)), s = se(e, o.value) === "dark", c = document.documentElement;
259
+ let a = Math.hypot(Math.max(t.x, innerWidth - t.x), Math.max(t.y, innerHeight - t.y)), s = ce(e, o.value) === "dark", c = document.documentElement;
259
260
  c.dataset.caThemeTransition = s ? "to-dark" : "to-light";
260
261
  let l = !1, u = () => {
261
262
  l || (l = !0, _(e));
@@ -274,12 +275,12 @@ var Be = I("campus-theme", () => {
274
275
  }).catch(() => {});
275
276
  }
276
277
  function y(t, n = !0) {
277
- e.value = t, n && ge(g(), t);
278
+ e.value = t, n && ye(g(), t);
278
279
  }
279
280
  async function b() {
280
- let t = he(g());
281
+ let t = ve(g());
281
282
  t && (e.value = t);
282
- let n = q().theme?.load;
283
+ let n = J().theme?.load;
283
284
  if (n) {
284
285
  try {
285
286
  y(await n());
@@ -307,16 +308,16 @@ var Be = I("campus-theme", () => {
307
308
  };
308
309
  });
309
310
  // packages/core/src/copyright.ts
310
- function Ve(e, t = (/* @__PURE__ */ new Date()).getFullYear()) {
311
+ function We(e, t = (/* @__PURE__ */ new Date()).getFullYear()) {
311
312
  return e.replaceAll("{year}", String(t));
312
313
  }
313
314
  // packages/core/src/pages/auth/options.ts
314
- var He = /^1[3-9]\d{9}$/;
315
- function Y() {
316
- return q().login ?? {};
315
+ var Ge = /^1[3-9]\d{9}$/;
316
+ function X() {
317
+ return J().login ?? {};
317
318
  }
318
- function Ue() {
319
- let e = q().auth;
319
+ function Ke() {
320
+ let e = J().auth;
320
321
  return {
321
322
  captcha: typeof e.captcha == "function",
322
323
  register: typeof e.register == "function" && typeof e.sendSmsCode == "function",
@@ -324,37 +325,37 @@ function Ue() {
324
325
  forgot: typeof e.resetPassword == "function" && typeof e.sendSmsCode == "function"
325
326
  };
326
327
  }
327
- function We(e) {
328
- return typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : Me(q()).home;
328
+ function qe(e) {
329
+ return typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : Fe(J()).home;
329
330
  }
330
331
  // packages/core/src/pages/auth/AuthShell.vue?vue&type=script&setup=true&lang.ts
331
- var Ge = {
332
+ var Je = {
332
333
  key: 0,
333
334
  class: "ca-auth__title"
334
- }, Ke = ["src"], qe = { class: "ca-auth__qrcode" }, Je = ["src", "alt"], Ye = {
335
+ }, Ye = ["src"], Xe = { class: "ca-auth__qrcode" }, Ze = ["src", "alt"], Qe = {
335
336
  key: 0,
336
337
  class: "ca-auth__caption"
337
- }, Xe = { class: "ca-auth__site" }, Ze = {
338
+ }, $e = { class: "ca-auth__site" }, et = {
338
339
  key: 0,
339
340
  class: "ca-auth__caption"
340
- }, Qe = { class: "ca-auth__main" }, $e = { class: "ca-auth__brand" }, et = ["src"], tt = {
341
+ }, tt = { class: "ca-auth__main" }, nt = { class: "ca-auth__brand" }, rt = ["src"], it = {
341
342
  class: "ca-auth__tabs",
342
343
  role: "tablist"
343
- }, nt = [
344
+ }, at = [
344
345
  "aria-selected",
345
346
  "tabindex",
346
347
  "onClick",
347
348
  "onKeydown"
348
- ], rt = {
349
+ ], ot = {
349
350
  class: "ca-auth__body",
350
351
  role: "tabpanel"
351
- }, it = {
352
+ }, st = {
352
353
  key: 0,
353
354
  class: "ca-auth__footer"
354
- }, at = {
355
+ }, ct = {
355
356
  key: 0,
356
357
  class: "ca-auth__version"
357
- }, ot = /*@__PURE__*/ d({
358
+ }, lt = /*@__PURE__*/ d({
358
359
  __name: "AuthShell",
359
360
  props: {
360
361
  tabs: {},
@@ -363,13 +364,13 @@ var Ge = {
363
364
  },
364
365
  emits: ["update:active"],
365
366
  setup(t, { emit: r }) {
366
- let c = t, u = r, { t: d, label: f } = K(), p = q().brand, m = Y(), _ = Be(), v = n(() => f(_.theme.siteName ?? p.name)), b = n(() => _.theme.logo ?? p.logo), x = n(() => m.panel?.logo ?? b.value), w = n(() => m.panel?.qrcode), T = n(() => {
367
+ let c = t, u = r, { t: d, label: f } = q(), p = J().brand, m = X(), _ = Ue(), v = n(() => f(_.theme.siteName ?? p.name)), b = n(() => _.theme.logo ?? p.logo), x = n(() => m.panel?.logo ?? b.value), w = n(() => m.panel?.qrcode), T = n(() => {
367
368
  let e = m.panel?.caption ?? p.subtitle;
368
369
  return e ? f(e) : "";
369
370
  }), O = n(() => m.panel?.title ? f(m.panel.title) : ""), k = n(() => m.panel?.background), A = (e) => typeof e == "number" && Number.isFinite(e) && e > 0 ? `${e}px` : typeof e == "string" && /^[\d.]+(px|rem|em|%)$/.test(e) ? e : void 0, j = n(() => {
370
371
  let e = m.card, t = {}, n = A(e?.width), r = A(e?.minHeight), i = A(e?.panelWidth), a = A(e?.radius);
371
372
  return n && (t["--ca-auth-card-width"] = n), r && (t["--ca-auth-card-min-height"] = r), i && (t["--ca-auth-panel-width"] = i), a && (t["--ca-auth-card-radius"] = a), t;
372
- }), N = n(() => m.background ?? "var(--ca-login-bg)"), P = n(() => m.footer ? m.footer.map((e) => Ve(f(e))) : p.copyright ? Ve(f(p.copyright)).split("\n").filter(Boolean) : []);
373
+ }), M = n(() => m.background ?? "var(--ca-login-bg)"), P = n(() => m.footer ? m.footer.map((e) => We(f(e))) : p.copyright ? We(f(p.copyright)).split("\n").filter(Boolean) : []);
373
374
  function F(e, t) {
374
375
  if (e.key !== "ArrowRight" && e.key !== "ArrowLeft") return;
375
376
  let n = (t + (e.key === "ArrowRight" ? 1 : -1) + c.tabs.length) % c.tabs.length, r = c.tabs[n];
@@ -377,7 +378,7 @@ var Ge = {
377
378
  }
378
379
  return (n, r) => (y(), o("div", { class: h(["ca-auth", { "ca-auth--preview": t.preview }]) }, [s("div", {
379
380
  class: "ca-auth__stage",
380
- style: g({ background: N.value })
381
+ style: g({ background: M.value })
381
382
  }, [s("div", {
382
383
  class: "ca-auth__card",
383
384
  style: g(j.value)
@@ -385,24 +386,24 @@ var Ge = {
385
386
  class: "ca-auth__panel",
386
387
  style: g(k.value ? { background: k.value } : void 0)
387
388
  }, [
388
- O.value && w.value ? (y(), o("h2", Ge, E(O.value), 1)) : a("v-if", !0),
389
+ O.value && w.value ? (y(), o("h2", Je, E(O.value), 1)) : a("v-if", !0),
389
390
  x.value ? (y(), o("img", {
390
391
  key: 1,
391
392
  src: x.value,
392
393
  alt: "",
393
394
  class: "ca-auth__logo"
394
- }, null, 8, Ke)) : a("v-if", !0),
395
- w.value ? (y(), o(e, { key: 2 }, [s("div", qe, [s("img", {
395
+ }, null, 8, Ye)) : a("v-if", !0),
396
+ w.value ? (y(), o(e, { key: 2 }, [s("div", Xe, [s("img", {
396
397
  src: w.value,
397
398
  alt: D(d)("campus.auth.qrcodeAlt")
398
- }, null, 8, Je)]), T.value ? (y(), o("p", Ye, E(T.value), 1)) : a("v-if", !0)], 64)) : (y(), o(e, { key: 3 }, [s("h2", Xe, E(O.value || v.value), 1), T.value ? (y(), o("p", Ze, E(T.value), 1)) : a("v-if", !0)], 64))
399
- ], 4), s("section", Qe, [
400
- s("div", $e, [b.value ? (y(), o("img", {
399
+ }, null, 8, Ze)]), T.value ? (y(), o("p", Qe, E(T.value), 1)) : a("v-if", !0)], 64)) : (y(), o(e, { key: 3 }, [s("h2", $e, E(O.value || v.value), 1), T.value ? (y(), o("p", et, E(T.value), 1)) : a("v-if", !0)], 64))
400
+ ], 4), s("section", tt, [
401
+ s("div", nt, [b.value ? (y(), o("img", {
401
402
  key: 0,
402
403
  src: b.value,
403
404
  alt: ""
404
- }, null, 8, et)) : a("v-if", !0), s("span", null, E(v.value), 1)]),
405
- s("div", tt, [(y(!0), o(e, null, S(t.tabs, (n, r) => (y(), o(e, { key: n.key }, [n.to && !t.preview ? (y(), i(D(V), {
405
+ }, null, 8, rt)) : a("v-if", !0), s("span", null, E(v.value), 1)]),
406
+ s("div", it, [(y(!0), o(e, null, S(t.tabs, (n, r) => (y(), o(e, { key: n.key }, [n.to && !t.preview ? (y(), i(D(ne), {
406
407
  key: 0,
407
408
  to: n.to,
408
409
  role: "tab",
@@ -410,7 +411,7 @@ var Ge = {
410
411
  class: "ca-auth__tab",
411
412
  onKeydown: (e) => F(e, r)
412
413
  }, {
413
- default: M(() => [l(E(n.label), 1)]),
414
+ default: N(() => [l(E(n.label), 1)]),
414
415
  _: 2
415
416
  }, 1032, ["to", "onKeydown"])) : (y(), o("button", {
416
417
  key: 1,
@@ -421,17 +422,17 @@ var Ge = {
421
422
  tabindex: n.key === t.active ? 0 : -1,
422
423
  onClick: (e) => n.to ? void 0 : u("update:active", n.key),
423
424
  onKeydown: (e) => F(e, r)
424
- }, E(n.label), 43, nt))], 64))), 128))]),
425
- s("div", rt, [C(n.$slots, "default", {}, void 0, !0)]),
426
- P.value.length ? (y(), o("div", it, [(y(!0), o(e, null, S(P.value, (e) => (y(), o("p", { key: e }, E(e), 1))), 128))])) : a("v-if", !0)
427
- ])], 4), D(m).version ? (y(), o("span", at, E(D(m).version), 1)) : a("v-if", !0)], 4)], 2));
425
+ }, E(n.label), 43, at))], 64))), 128))]),
426
+ s("div", ot, [C(n.$slots, "default", {}, void 0, !0)]),
427
+ P.value.length ? (y(), o("div", st, [(y(!0), o(e, null, S(P.value, (e) => (y(), o("p", { key: e }, E(e), 1))), 128))])) : a("v-if", !0)
428
+ ])], 4), D(m).version ? (y(), o("span", ct, E(D(m).version), 1)) : a("v-if", !0)], 4)], 2));
428
429
  }
429
- }), X = (e, t) => {
430
+ }), Z = (e, t) => {
430
431
  let n = e.__vccOpts || e;
431
432
  for (let [e, r] of t) n[e] = r;
432
433
  return n;
433
- }, st = /*#__PURE__*/ X(ot, [["__scopeId", "data-v-df817220"]]), ct = "side-collapsed", Z = I("campus-layout", () => {
434
- let e = x(!1), t = x("desktop"), r = x(!1), i = x(!1), a = x(me(ct) === "1"), o = x(null), s = n(() => o.value ?? a.value), c = x(!1), l = n(() => c.value && t.value === "desktop"), u = x({}), d = x({}), f;
434
+ }, ut = /*#__PURE__*/ Z(lt, [["__scopeId", "data-v-3545cdf2"]]), dt = "side-collapsed", ft = L("campus-layout", () => {
435
+ let e = x(!1), t = x("desktop"), r = x(!1), i = x(!1), a = x(_e(dt) === "1"), o = x(null), s = n(() => o.value ?? a.value), c = x(!1), l = n(() => c.value && t.value === "desktop"), u = x({}), d = x({}), f;
435
436
  function p(e, t = !1) {
436
437
  f = e, e && !t && (o.value = u.value[e] ?? !1);
437
438
  }
@@ -442,7 +443,7 @@ var Ge = {
442
443
  e in d.value || m(e, !0);
443
444
  }
444
445
  async function g(e, n, r) {
445
- e.path && n !== e.path ? (await r(e.path), m(e.key, !0), t.value === "phone" ? V() : t.value === "pad" && H()) : m(e.key, !(d.value[e.key] ?? !1));
446
+ e.path && n !== e.path ? (await r(e.path), m(e.key, !0), t.value === "phone" ? V() : t.value === "pad" && re()) : m(e.key, !(d.value[e.key] ?? !1));
446
447
  }
447
448
  async function _(e, n, r, a) {
448
449
  if (e.path) {
@@ -451,11 +452,11 @@ var Ge = {
451
452
  let n = e.openMode == null ? e.sideCollapse === "panel" || e.sideCollapse === "all" : e.openMode !== "normal";
452
453
  a && e.children.length && t.value === "desktop" && !n && (o.value = !1, u.value[e.key] = !1);
453
454
  } else e.children.length && (t.value === "desktop" ? v() : t.value === "pad" && (i.value = !i.value));
454
- e.path !== n && e.children.length && t.value === "pad" && H(), e.children.length && t.value === "phone" && V(), e.children.length || re();
455
+ e.path !== n && e.children.length && t.value === "pad" && re(), e.children.length && t.value === "phone" && V(), e.children.length || H();
455
456
  } else t.value === "pad" ? i.value = !(a && i.value) : t.value === "desktop" && s.value && v();
456
457
  }
457
458
  function v() {
458
- o.value === null ? (a.value = !a.value, G(ct, a.value ? "1" : "0")) : (o.value = !o.value, f && (u.value[f] = o.value));
459
+ o.value === null ? (a.value = !a.value, K(dt, a.value ? "1" : "0")) : (o.value = !o.value, f && (u.value[f] = o.value));
459
460
  }
460
461
  function y() {
461
462
  c.value = !1, o.value = null;
@@ -529,14 +530,14 @@ var Ge = {
529
530
  function ne() {
530
531
  i.value = !1;
531
532
  }
532
- function H() {
533
+ function re() {
533
534
  i.value = !0;
534
535
  }
535
- function re() {
536
+ function H() {
536
537
  r.value = !1, i.value = !1;
537
538
  }
538
539
  function U() {
539
- F("normal"), e.value = !1, b("none"), re(), u.value = {}, d.value = {}, f = void 0;
540
+ F("normal"), e.value = !1, b("none"), H(), u.value = {}, d.value = {}, f = void 0;
540
541
  }
541
542
  return {
542
543
  enterParentPage: p,
@@ -571,33 +572,33 @@ var Ge = {
571
572
  closeMobileMenu: B,
572
573
  openMobileMenu: V,
573
574
  closePadPanel: ne,
574
- openPadPanel: H,
575
- closeOverlays: re
575
+ openPadPanel: re,
576
+ closeOverlays: H
576
577
  };
577
578
  });
578
579
  // packages/core/src/tabs-policy.ts
579
- function lt(e, t, n = Date.now()) {
580
+ function pt(e, t, n = Date.now()) {
580
581
  return {
581
582
  ...e,
582
583
  [t]: Math.max(n, ...Object.values(e).map((e) => e + 1))
583
584
  };
584
585
  }
585
- function ut(e, t, n, r, i) {
586
+ function mt(e, t, n, r, i) {
586
587
  let a = e.filter((e) => !r.includes(e));
587
588
  if (!(a.length <= i)) return a.filter((e) => e !== n).reduce((e, n) => e === void 0 || (t[n] ?? 0) < (t[e] ?? 0) ? n : e, void 0);
588
589
  }
589
590
  // packages/core/src/stores/tabs.ts
590
- var dt = "tabs", ft = I("campus-tabs", () => {
591
- let e = je(q().menus), t = new Set(e.map((e) => e.key)), r = e.filter((e) => e.affix).map((e) => e.key), i = he(dt, "session"), a = !Array.isArray(i) && Array.isArray(i?.affix) ? i.affix : [], o = x(a.filter((e) => t.has(e) && !r.includes(e))), s = n(() => [...r, ...o.value]), c = q().maxTabs, l = typeof c == "number" && Number.isFinite(c) ? Math.max(1, Math.floor(c)) : 20, u = (Array.isArray(i) ? i : Array.isArray(i?.visited) ? i.visited : []).filter((e) => typeof e == "string" && t.has(e)), d = x([.../* @__PURE__ */ new Set([...s.value, ...u])]), f = !Array.isArray(i) && i?.active && typeof i.active == "object" ? i.active : {}, p = x(Object.fromEntries(Object.entries(f).filter(([e, n]) => t.has(e) && typeof n == "number" && Number.isFinite(n))));
591
+ var ht = "tabs", gt = L("campus-tabs", () => {
592
+ let e = Pe(J().menus), t = new Set(e.map((e) => e.key)), r = e.filter((e) => e.affix).map((e) => e.key), i = ve(ht, "session"), a = !Array.isArray(i) && Array.isArray(i?.affix) ? i.affix : [], o = x(a.filter((e) => t.has(e) && !r.includes(e))), s = n(() => [...r, ...o.value]), c = J().maxTabs, l = typeof c == "number" && Number.isFinite(c) ? Math.max(1, Math.floor(c)) : 20, u = (Array.isArray(i) ? i : Array.isArray(i?.visited) ? i.visited : []).filter((e) => typeof e == "string" && t.has(e)), d = x([.../* @__PURE__ */ new Set([...s.value, ...u])]), f = !Array.isArray(i) && i?.active && typeof i.active == "object" ? i.active : {}, p = x(Object.fromEntries(Object.entries(f).filter(([e, n]) => t.has(e) && typeof n == "number" && Number.isFinite(n))));
592
593
  for (let [e, t] of d.value.entries()) Number.isFinite(p.value[t]) || (p.value[t] = e + 1);
593
594
  for (;;) {
594
- let e = ut(d.value, p.value, "", s.value, l);
595
+ let e = mt(d.value, p.value, "", s.value, l);
595
596
  if (!e) break;
596
597
  d.value.splice(d.value.indexOf(e), 1), delete p.value[e];
597
598
  }
598
599
  let h = x({}), g = x(null), _ = n(() => d.value.filter((e) => e !== g.value));
599
600
  function v() {
600
- p.value = Object.fromEntries(d.value.map((e) => [e, p.value[e] ?? 0])), ge(dt, {
601
+ p.value = Object.fromEntries(d.value.map((e) => [e, p.value[e] ?? 0])), ye(ht, {
601
602
  visited: d.value,
602
603
  active: p.value,
603
604
  affix: o.value
@@ -605,8 +606,8 @@ var dt = "tabs", ft = I("campus-tabs", () => {
605
606
  }
606
607
  function y(e) {
607
608
  if (!t.has(e)) return;
608
- d.value.includes(e) || d.value.push(e), p.value = lt(p.value, e);
609
- let n = ut(d.value, p.value, e, s.value, l);
609
+ d.value.includes(e) || d.value.push(e), p.value = pt(p.value, e);
610
+ let n = mt(d.value, p.value, e, s.value, l);
610
611
  n && d.value.splice(d.value.indexOf(n), 1), v();
611
612
  }
612
613
  function b(e) {
@@ -654,8 +655,8 @@ var dt = "tabs", ft = I("campus-tabs", () => {
654
655
  refresh: E,
655
656
  setAffix: D
656
657
  };
657
- }), pt = "session", Q = I("campus-session", () => {
658
- let e = he(pt, "session"), t = x(e?.token ?? ""), r = x(e?.user), i = n(() => !!(t.value && r.value));
658
+ }), _t = "session", Q = L("campus-session", () => {
659
+ let e = ve(_t, "session"), t = x(e?.token ?? ""), r = x(e?.user), i = n(() => !!(t.value && r.value));
659
660
  function a(e) {
660
661
  if (!e) return !0;
661
662
  let t = r.value?.permissions;
@@ -665,28 +666,28 @@ var dt = "tabs", ft = I("campus-tabs", () => {
665
666
  r.value && (r.value = {
666
667
  ...r.value,
667
668
  permissions: e
668
- }, ge(pt, {
669
+ }, ye(_t, {
669
670
  token: t.value,
670
671
  user: r.value
671
672
  }, "session"));
672
673
  }
673
674
  async function s(e) {
674
- c(await q().auth.login(e));
675
+ c(await J().auth.login(e));
675
676
  }
676
677
  function c(e) {
677
- t.value = e.token, r.value = e.user, ge(pt, e, "session");
678
+ t.value = e.token, r.value = e.user, ye(_t, e, "session");
678
679
  }
679
680
  async function l() {
680
681
  try {
681
- await q().auth.logout?.();
682
+ await J().auth.logout?.();
682
683
  } catch (e) {
683
684
  console.warn("[campus] 退出时通知服务端失败,已清除本地登录态:", e);
684
685
  } finally {
685
- t.value = "", r.value = void 0, G(pt, null, "session"), ft().reset(), Z().reset();
686
+ t.value = "", r.value = void 0, K(_t, null, "session"), gt().reset(), ft().reset();
686
687
  }
687
688
  }
688
689
  function u() {
689
- t.value = "", r.value = void 0, G(pt, null, "session"), ft().reset(), Z().reset();
690
+ t.value = "", r.value = void 0, K(_t, null, "session"), gt().reset(), ft().reset();
690
691
  }
691
692
  return {
692
693
  token: t,
@@ -699,7 +700,7 @@ var dt = "tabs", ft = I("campus-tabs", () => {
699
700
  logout: l,
700
701
  expire: u
701
702
  };
702
- }), mt = {
703
+ }), vt = {
703
704
  class: "ca-auth-icon",
704
705
  viewBox: "0 0 24 24",
705
706
  width: "16",
@@ -710,7 +711,7 @@ var dt = "tabs", ft = I("campus-tabs", () => {
710
711
  "stroke-linecap": "round",
711
712
  "stroke-linejoin": "round",
712
713
  "aria-hidden": "true"
713
- }, ht = ["d"], $ = /* @__PURE__ */ d({
714
+ }, yt = ["d"], $ = /* @__PURE__ */ d({
714
715
  __name: "AuthIcon",
715
716
  props: { name: {} },
716
717
  setup(e) {
@@ -721,15 +722,19 @@ var dt = "tabs", ft = I("campus-tabs", () => {
721
722
  shield: "M12 3l7 3v5c0 4.5-3 8-7 10-4-2-7-5.500-7-10V6l7-3Zm-3 9 2.500 2.500L15 10",
722
723
  message: "M4 5h16v11H9l-4 3.500V16H4z"
723
724
  };
724
- return (n, r) => (y(), o("svg", mt, [s("path", { d: t[e.name] }, null, 8, ht)]));
725
+ return (n, r) => (y(), o("svg", vt, [s("path", { d: t[e.name] }, null, 8, yt)]));
725
726
  }
726
- }), gt = { class: "ca-auth-row" }, _t = [
727
+ }), bt = { class: "ca-auth-row" }, xt = [
727
728
  "title",
728
729
  "aria-label",
729
730
  "disabled"
730
- ], vt = ["src"], yt = { key: 1 }, bt = /* @__PURE__ */ d({
731
+ ], St = ["src"], Ct = { key: 1 }, wt = /*#__PURE__*/ Z(/* @__PURE__ */ d({
731
732
  __name: "CaptchaField",
732
- props: /*@__PURE__*/ p({ scene: {} }, {
733
+ props: /*@__PURE__*/ p({
734
+ scene: {},
735
+ inputId: {},
736
+ inputErrorId: {}
737
+ }, {
733
738
  code: { default: "" },
734
739
  codeModifiers: {},
735
740
  captchaKey: { default: "" },
@@ -737,11 +742,11 @@ var dt = "tabs", ft = I("campus-tabs", () => {
737
742
  }),
738
743
  emits: ["update:code", "update:captchaKey"],
739
744
  setup(e, { expose: t }) {
740
- let n = e, r = O(e, "code"), i = O(e, "captchaKey"), { t: c, label: l } = K(), d = Y().fields?.captcha, f = x(""), p = x(!1), m = x(!1);
741
- async function h() {
745
+ let n = e, r = k(e, "code"), i = k(e, "captchaKey"), { t: c, label: l } = q(), d = X().fields?.captcha, f = x(""), p = x(!1), m = x(!1);
746
+ async function g() {
742
747
  m.value = !0;
743
748
  try {
744
- let e = await q().auth.captcha(n.scene);
749
+ let e = await J().auth.captcha(n.scene);
745
750
  i.value = e.key, f.value = e.image, p.value = !1;
746
751
  } catch {
747
752
  f.value = "", p.value = !0;
@@ -749,22 +754,30 @@ var dt = "tabs", ft = I("campus-tabs", () => {
749
754
  r.value = "", m.value = !1;
750
755
  }
751
756
  }
752
- return v(h), t({ refresh: h }), (e, t) => {
753
- let n = w("ca-input");
754
- return y(), o("div", gt, [u(n, {
757
+ return v(g), t({ refresh: g }), (t, n) => {
758
+ let i = w("ca-input");
759
+ return y(), o("div", bt, [u(i, {
755
760
  modelValue: r.value,
756
- "onUpdate:modelValue": t[0] ||= (e) => r.value = e,
757
- placeholder: D(d)?.placeholder ? D(l)(D(d).placeholder) : D(c)("campus.auth.captchaPlaceholder"),
758
- "aria-label": D(c)("campus.auth.captcha"),
761
+ "onUpdate:modelValue": n[0] ||= (e) => r.value = e,
762
+ id: e.inputId,
763
+ class: h({ "ca-auth-captcha__input": e.inputId }),
764
+ placeholder: D(d)?.placeholder ? D(l)(D(d).placeholder) : e.inputId ? void 0 : D(c)("campus.auth.captchaPlaceholder"),
765
+ "aria-label": e.inputId ? void 0 : D(c)("campus.auth.captcha"),
766
+ "aria-invalid": e.inputErrorId ? "true" : void 0,
767
+ "aria-describedby": e.inputErrorId,
759
768
  autocomplete: "off",
760
769
  maxlength: D(d)?.maxlength ?? 8
761
770
  }, {
762
- prefix: M(() => [u($, { name: "shield" })]),
771
+ prefix: N(() => [u($, { name: "shield" })]),
763
772
  _: 1
764
773
  }, 8, [
765
774
  "modelValue",
775
+ "id",
776
+ "class",
766
777
  "placeholder",
767
778
  "aria-label",
779
+ "aria-invalid",
780
+ "aria-describedby",
768
781
  "maxlength"
769
782
  ]), s("button", {
770
783
  type: "button",
@@ -772,26 +785,26 @@ var dt = "tabs", ft = I("campus-tabs", () => {
772
785
  title: D(c)("campus.auth.captchaRefresh"),
773
786
  "aria-label": D(c)("campus.auth.captchaRefresh"),
774
787
  disabled: m.value,
775
- onClick: h
788
+ onClick: g
776
789
  }, [f.value ? (y(), o("img", {
777
790
  key: 0,
778
791
  src: f.value,
779
792
  alt: ""
780
- }, null, 8, vt)) : p.value ? (y(), o("span", yt, E(D(c)("campus.auth.captchaFailed")), 1)) : a("v-if", !0)], 8, _t)]);
793
+ }, null, 8, St)) : p.value ? (y(), o("span", Ct, E(D(c)("campus.auth.captchaFailed")), 1)) : a("v-if", !0)], 8, xt)]);
781
794
  };
782
795
  }
783
- }), xt = {
796
+ }), [["__scopeId", "data-v-bd481e4d"]]), Tt = {
784
797
  key: 1,
785
798
  class: "ca-auth-links"
786
- }, St = { class: "ca-auth-help" }, Ct = /* @__PURE__ */ d({
799
+ }, Et = { class: "ca-auth-help" }, Dt = /* @__PURE__ */ d({
787
800
  __name: "LoginForm",
788
801
  props: { preview: { type: Boolean } },
789
802
  setup(t) {
790
- let r = t, c = U(), d = W(), f = Q(), { t: p, label: m } = K(), h = Ue(), g = Y(), _ = g.fields ?? {}, v = b({
803
+ let r = t, c = W(), d = G(), f = Q(), { t: p, label: m } = q(), h = Ke(), g = X(), _ = g.fields ?? {}, v = b({
791
804
  username: "",
792
805
  password: "",
793
806
  captcha: ""
794
- }), C = x(""), T = x(), O = x(), k = x(!1), A = x(""), j = x("error"), N = n(() => ({
807
+ }), C = x(""), T = x(), O = x(), k = x(!1), A = x(""), j = x("error"), M = n(() => ({
795
808
  username: [{
796
809
  required: !0,
797
810
  message: p("campus.login.required", { label: p("campus.login.username") }),
@@ -807,7 +820,7 @@ var dt = "tabs", ft = I("campus-tabs", () => {
807
820
  message: p("campus.auth.captchaRequired"),
808
821
  trigger: "blur"
809
822
  }] : []
810
- })), F = n(() => (g.helps ?? [
823
+ })), P = n(() => (g.helps ?? [
811
824
  1,
812
825
  2,
813
826
  3,
@@ -833,7 +846,7 @@ var dt = "tabs", ft = I("campus-tabs", () => {
833
846
  key: C.value,
834
847
  code: v.captcha
835
848
  } : void 0
836
- }), await d.replace(We(c.query.redirect));
849
+ }), await d.replace(qe(c.query.redirect));
837
850
  } catch (e) {
838
851
  A.value = e instanceof Error && e.message ? e.message : p("campus.login.failed"), T.value?.refresh();
839
852
  } finally {
@@ -860,14 +873,14 @@ var dt = "tabs", ft = I("campus-tabs", () => {
860
873
  ref_key: "formRef",
861
874
  ref: O,
862
875
  model: v,
863
- rules: N.value,
876
+ rules: M.value,
864
877
  size: "large",
865
878
  class: "ca-auth-form",
866
- onSubmit: P(L, ["prevent"])
879
+ onSubmit: F(L, ["prevent"])
867
880
  }, {
868
- default: M(() => [
881
+ default: N(() => [
869
882
  u(d, { prop: "username" }, {
870
- default: M(() => [u(c, {
883
+ default: N(() => [u(c, {
871
884
  modelValue: v.username,
872
885
  "onUpdate:modelValue": n[0] ||= (e) => v.username = e,
873
886
  placeholder: D(_).username?.placeholder ? D(m)(D(_).username.placeholder) : D(p)("campus.auth.accountPlaceholder"),
@@ -877,7 +890,7 @@ var dt = "tabs", ft = I("campus-tabs", () => {
877
890
  "aria-label": D(p)("campus.login.username"),
878
891
  autocomplete: "username"
879
892
  }, {
880
- prefix: M(() => [u($, { name: "user" })]),
893
+ prefix: N(() => [u($, { name: "user" })]),
881
894
  _: 1
882
895
  }, 8, [
883
896
  "modelValue",
@@ -889,7 +902,7 @@ var dt = "tabs", ft = I("campus-tabs", () => {
889
902
  _: 1
890
903
  }),
891
904
  u(d, { prop: "password" }, {
892
- default: M(() => [u(c, {
905
+ default: N(() => [u(c, {
893
906
  modelValue: v.password,
894
907
  "onUpdate:modelValue": n[1] ||= (e) => v.password = e,
895
908
  type: "password",
@@ -899,7 +912,7 @@ var dt = "tabs", ft = I("campus-tabs", () => {
899
912
  "aria-label": D(p)("campus.login.password"),
900
913
  autocomplete: "current-password"
901
914
  }, {
902
- prefix: M(() => [u($, { name: "lock" })]),
915
+ prefix: N(() => [u($, { name: "lock" })]),
903
916
  _: 1
904
917
  }, 8, [
905
918
  "modelValue",
@@ -913,7 +926,7 @@ var dt = "tabs", ft = I("campus-tabs", () => {
913
926
  key: 0,
914
927
  prop: "captcha"
915
928
  }, {
916
- default: M(() => [u(bt, {
929
+ default: N(() => [u(wt, {
917
930
  ref_key: "captchaRef",
918
931
  ref: T,
919
932
  code: v.captcha,
@@ -931,33 +944,33 @@ var dt = "tabs", ft = I("campus-tabs", () => {
931
944
  loading: k.value,
932
945
  class: "ca-auth-submit"
933
946
  }, {
934
- default: M(() => [l(E(D(p)("campus.login.submit")), 1)]),
947
+ default: N(() => [l(E(D(p)("campus.login.submit")), 1)]),
935
948
  _: 1
936
949
  }, 8, ["loading"])
937
950
  ]),
938
951
  _: 1
939
952
  }, 8, ["model", "rules"]),
940
- z.value ? (y(), o("div", xt, [D(h).forgot ? (y(), i(D(V), {
953
+ z.value ? (y(), o("div", Tt, [D(h).forgot ? (y(), i(D(ne), {
941
954
  key: 0,
942
- to: { name: D(J)(D(q)()).forgot },
955
+ to: { name: D(Y)(D(J)()).forgot },
943
956
  onClick: R
944
957
  }, {
945
- default: M(() => [l(E(D(p)("campus.auth.forgotLink")), 1)]),
958
+ default: N(() => [l(E(D(p)("campus.auth.forgotLink")), 1)]),
946
959
  _: 1
947
- }, 8, ["to"])) : a("v-if", !0), D(h).register ? (y(), i(D(V), {
960
+ }, 8, ["to"])) : a("v-if", !0), D(h).register ? (y(), i(D(ne), {
948
961
  key: 1,
949
- to: { name: D(J)(D(q)()).register },
962
+ to: { name: D(Y)(D(J)()).register },
950
963
  onClick: R
951
964
  }, {
952
- default: M(() => [l(E(D(p)("campus.auth.registerLink")), 1)]),
965
+ default: N(() => [l(E(D(p)("campus.auth.registerLink")), 1)]),
953
966
  _: 1
954
967
  }, 8, ["to"])) : a("v-if", !0)])) : a("v-if", !0),
955
- s("div", St, [s("h3", null, E(D(p)("campus.auth.helpTitle")), 1), s("ol", null, [(y(!0), o(e, null, S(F.value, (t, n) => (y(), o("li", { key: n }, [(y(!0), o(e, null, S(t, (t, n) => (y(), o(e, { key: n }, [t === null ? D(h).forgot ? (y(), i(D(V), {
968
+ s("div", Et, [s("h3", null, E(D(p)("campus.auth.helpTitle")), 1), s("ol", null, [(y(!0), o(e, null, S(P.value, (t, n) => (y(), o("li", { key: n }, [(y(!0), o(e, null, S(t, (t, n) => (y(), o(e, { key: n }, [t === null ? D(h).forgot ? (y(), i(D(ne), {
956
969
  key: 1,
957
- to: { name: D(J)(D(q)()).forgot },
970
+ to: { name: D(Y)(D(J)()).forgot },
958
971
  onClick: R
959
972
  }, {
960
- default: M(() => [l(E(D(p)("campus.auth.findPassword")), 1)]),
973
+ default: N(() => [l(E(D(p)("campus.auth.findPassword")), 1)]),
961
974
  _: 1
962
975
  }, 8, ["to"])) : (y(), o(e, { key: 2 }, [l(E(D(p)("campus.auth.findPassword")), 1)], 64)) : (y(), o(e, { key: 0 }, [l(E(t), 1)], 64))], 64))), 128))]))), 128))])])
963
976
  ], 64);
@@ -965,7 +978,7 @@ var dt = "tabs", ft = I("campus-tabs", () => {
965
978
  }
966
979
  });
967
980
  // packages/core/src/pages/auth/wechat-host.ts
968
- function wt(e, t) {
981
+ function Ot(e, t) {
969
982
  let n, r = !1, i = () => {
970
983
  if (!r) {
971
984
  r = !0;
@@ -992,75 +1005,75 @@ function wt(e, t) {
992
1005
  };
993
1006
  }
994
1007
  // packages/core/src/pages/auth/WechatPane.vue?vue&type=script&setup=true&lang.ts
995
- var Tt = {
1008
+ var kt = {
996
1009
  key: 0,
997
1010
  class: "ca-auth-wechat"
998
- }, Et = {
1011
+ }, At = {
999
1012
  key: 0,
1000
1013
  class: "ca-auth-wechat__failed",
1001
1014
  role: "alert"
1002
- }, Dt = {
1015
+ }, jt = {
1003
1016
  key: 1,
1004
1017
  class: "ca-auth-wechat"
1005
- }, Ot = { class: "ca-auth-wechat__code" }, kt = ["src", "alt"], At = ["aria-label"], jt = { class: "ca-auth-wechat__hint" }, Mt = {
1018
+ }, Mt = { class: "ca-auth-wechat__code" }, Nt = ["src", "alt"], Pt = ["aria-label"], Ft = { class: "ca-auth-wechat__hint" }, It = {
1006
1019
  key: 0,
1007
1020
  class: "ca-auth-wechat__note"
1008
- }, Nt = /* @__PURE__ */ d({
1021
+ }, Lt = /* @__PURE__ */ d({
1009
1022
  __name: "WechatPane",
1010
1023
  props: { preview: { type: Boolean } },
1011
1024
  setup(e) {
1012
- let t = e, { t: r } = K(), i = n(() => Y().panel?.qrcode), d = !t.preview && Ue().wechat, f = x(), p = x(!1), h;
1025
+ let t = e, { t: r } = q(), i = n(() => X().panel?.qrcode), d = !t.preview && Ke().wechat, f = x(), p = x(!1), h;
1013
1026
  function g() {
1014
1027
  h?.release(), h = void 0;
1015
1028
  }
1016
1029
  async function b() {
1017
- g(), p.value = !1, await m(), f.value && (h = wt(q().auth.wechat.mount, f.value), p.value = !h.ok);
1030
+ g(), p.value = !1, await m(), f.value && (h = Ot(J().auth.wechat.mount, f.value), p.value = !h.ok);
1018
1031
  }
1019
1032
  return v(() => {
1020
1033
  d && b();
1021
1034
  }), _(g), (e, t) => {
1022
1035
  let n = w("ca-button");
1023
- return D(d) ? (y(), o("div", Tt, [N(s("div", {
1036
+ return D(d) ? (y(), o("div", kt, [P(s("div", {
1024
1037
  ref_key: "host",
1025
1038
  ref: f,
1026
1039
  class: "ca-auth-wechat__host"
1027
- }, null, 512), [[k, !p.value]]), p.value ? (y(), o("div", Et, [s("p", null, E(D(r)("campus.auth.wechatMountFailed")), 1), u(n, { onClick: b }, {
1028
- default: M(() => [l(E(D(r)("campus.auth.wechatRetry")), 1)]),
1040
+ }, null, 512), [[A, !p.value]]), p.value ? (y(), o("div", At, [s("p", null, E(D(r)("campus.auth.wechatMountFailed")), 1), u(n, { onClick: b }, {
1041
+ default: N(() => [l(E(D(r)("campus.auth.wechatRetry")), 1)]),
1029
1042
  _: 1
1030
- })])) : a("v-if", !0)])) : (y(), o("div", Dt, [
1031
- s("div", Ot, [i.value ? (y(), o("img", {
1043
+ })])) : a("v-if", !0)])) : (y(), o("div", jt, [
1044
+ s("div", Mt, [i.value ? (y(), o("img", {
1032
1045
  key: 0,
1033
1046
  src: i.value,
1034
1047
  alt: D(r)("campus.auth.qrcodeAlt")
1035
- }, null, 8, kt)) : (y(), o("svg", {
1048
+ }, null, 8, Nt)) : (y(), o("svg", {
1036
1049
  key: 1,
1037
1050
  viewBox: "0 0 100 100",
1038
1051
  role: "img",
1039
1052
  "aria-label": D(r)("campus.auth.qrcodeAlt")
1040
- }, [...t[0] ||= [c("<rect x=\"8\" y=\"8\" width=\"26\" height=\"26\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"5\"></rect><rect x=\"66\" y=\"8\" width=\"26\" height=\"26\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"5\"></rect><rect x=\"8\" y=\"66\" width=\"26\" height=\"26\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"5\"></rect><rect x=\"16\" y=\"16\" width=\"10\" height=\"10\" fill=\"currentColor\"></rect><rect x=\"74\" y=\"16\" width=\"10\" height=\"10\" fill=\"currentColor\"></rect><rect x=\"16\" y=\"74\" width=\"10\" height=\"10\" fill=\"currentColor\"></rect><path d=\"M44 10h8v10h-8zM44 28h16v8H44zM10 44h10v8H10zM28 44h16v10H28zM52 46h10v10H52zM70 44h22v8H70zM44 62h8v14h-8zM58 66h14v8H58zM78 62h14v14H78zM56 82h14v10H56z\" fill=\"currentColor\"></path>", 7)]], 8, At))]),
1041
- s("p", jt, E(D(r)("campus.auth.wechatHint")), 1),
1042
- i.value ? a("v-if", !0) : (y(), o("p", Mt, E(D(r)("campus.auth.wechatNote")), 1))
1053
+ }, [...t[0] ||= [c("<rect x=\"8\" y=\"8\" width=\"26\" height=\"26\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"5\"></rect><rect x=\"66\" y=\"8\" width=\"26\" height=\"26\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"5\"></rect><rect x=\"8\" y=\"66\" width=\"26\" height=\"26\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"5\"></rect><rect x=\"16\" y=\"16\" width=\"10\" height=\"10\" fill=\"currentColor\"></rect><rect x=\"74\" y=\"16\" width=\"10\" height=\"10\" fill=\"currentColor\"></rect><rect x=\"16\" y=\"74\" width=\"10\" height=\"10\" fill=\"currentColor\"></rect><path d=\"M44 10h8v10h-8zM44 28h16v8H44zM10 44h10v8H10zM28 44h16v10H28zM52 46h10v10H52zM70 44h22v8H70zM44 62h8v14h-8zM58 66h14v8H58zM78 62h14v14H78zM56 82h14v10H56z\" fill=\"currentColor\"></path>", 7)]], 8, Pt))]),
1054
+ s("p", Ft, E(D(r)("campus.auth.wechatHint")), 1),
1055
+ i.value ? a("v-if", !0) : (y(), o("p", It, E(D(r)("campus.auth.wechatNote")), 1))
1043
1056
  ]));
1044
1057
  };
1045
1058
  }
1046
- }), Pt = /* @__PURE__ */ d({
1059
+ }), Rt = /* @__PURE__ */ d({
1047
1060
  __name: "LoginSplit",
1048
1061
  props: { preview: { type: Boolean } },
1049
1062
  setup(e) {
1050
- let { t } = K(), r = Y().tabs?.length ? Y().tabs : ["account", "wechat"], a = x(r[0]), o = n(() => r.map((e) => ({
1063
+ let { t } = q(), r = X().tabs?.length ? X().tabs : ["account", "wechat"], a = x(r[0]), o = n(() => r.map((e) => ({
1051
1064
  key: e,
1052
1065
  label: t(e === "account" ? "campus.auth.tabAccount" : "campus.auth.tabWechat")
1053
1066
  })));
1054
- return (t, n) => (y(), i(st, {
1067
+ return (t, n) => (y(), i(ut, {
1055
1068
  active: a.value,
1056
1069
  "onUpdate:active": n[0] ||= (e) => a.value = e,
1057
1070
  tabs: o.value,
1058
1071
  preview: e.preview
1059
1072
  }, {
1060
- default: M(() => [a.value === "account" ? (y(), i(Ct, {
1073
+ default: N(() => [a.value === "account" ? (y(), i(Dt, {
1061
1074
  key: 0,
1062
1075
  preview: e.preview
1063
- }, null, 8, ["preview"])) : (y(), i(Nt, { key: 1 }))]),
1076
+ }, null, 8, ["preview"])) : (y(), i(Lt, { key: 1 }))]),
1064
1077
  _: 1
1065
1078
  }, 8, [
1066
1079
  "active",
@@ -1070,78 +1083,78 @@ var Tt = {
1070
1083
  }
1071
1084
  });
1072
1085
  // packages/core/src/security.ts
1073
- function Ft(e) {
1086
+ function zt(e) {
1074
1087
  return e.environment ? e.environment : "production";
1075
1088
  }
1076
- function It(e) {
1077
- if (Ft(e) === "production" && typeof e.auth.captcha != "function") throw Error("[campus] 生产环境必须在 auth 中提供 captcha()(图形验证码);测试环境可设置 environment: 'test' 跳过");
1089
+ function Bt(e) {
1090
+ if (zt(e) === "production" && typeof e.auth.captcha != "function") throw Error("[campus] 生产环境必须在 auth 中提供 captcha()(图形验证码);测试环境可设置 environment: 'test' 跳过");
1078
1091
  }
1079
- function Lt(e, t) {
1092
+ function Vt(e, t) {
1080
1093
  return t === "test" || e.length >= 8 && /[A-Za-z]/.test(e) && /\d/.test(e);
1081
1094
  }
1082
1095
  // packages/core/src/services/feedback.ts
1083
- var Rt = (e) => e;
1084
- function zt(e) {
1085
- Rt = e;
1096
+ var Ht = (e) => e;
1097
+ function Ut(e) {
1098
+ Ht = e;
1086
1099
  }
1087
- async function Bt(e, t = {}) {
1088
- await de.alert(e, t.title ?? Rt("campus.common.tip"), {
1100
+ async function Wt(e, t = {}) {
1101
+ await pe.alert(e, t.title ?? Ht("campus.common.tip"), {
1089
1102
  type: t.type ?? "info",
1090
- confirmButtonText: t.confirmText ?? Rt("campus.common.ok")
1103
+ confirmButtonText: t.confirmText ?? Ht("campus.common.ok")
1091
1104
  });
1092
1105
  }
1093
- async function Vt(e, t = {}) {
1106
+ async function Gt(e, t = {}) {
1094
1107
  try {
1095
- return await de.confirm(e, t.title ?? Rt("campus.common.tip"), {
1108
+ return await pe.confirm(e, t.title ?? Ht("campus.common.tip"), {
1096
1109
  type: t.type ?? "warning",
1097
- confirmButtonText: t.confirmText ?? Rt("campus.common.confirm"),
1098
- cancelButtonText: t.cancelText ?? Rt("campus.common.cancel")
1110
+ confirmButtonText: t.confirmText ?? Ht("campus.common.confirm"),
1111
+ cancelButtonText: t.cancelText ?? Ht("campus.common.cancel")
1099
1112
  }), !0;
1100
1113
  } catch (e) {
1101
1114
  if (e === "cancel" || e === "close") return !1;
1102
1115
  throw e;
1103
1116
  }
1104
1117
  }
1105
- var Ht = {
1106
- info: (e) => void ue({
1118
+ var Kt = {
1119
+ info: (e) => void fe({
1107
1120
  message: e,
1108
1121
  type: "info"
1109
1122
  }),
1110
- success: (e) => void ue({
1123
+ success: (e) => void fe({
1111
1124
  message: e,
1112
1125
  type: "success"
1113
1126
  }),
1114
- warning: (e) => void ue({
1127
+ warning: (e) => void fe({
1115
1128
  message: e,
1116
1129
  type: "warning"
1117
1130
  }),
1118
- error: (e) => void ue({
1131
+ error: (e) => void fe({
1119
1132
  message: e,
1120
1133
  type: "error"
1121
1134
  })
1122
- }, Ut = le.service;
1123
- function Wt(e, t, n = {}) {
1124
- let r = fe({
1135
+ }, qt = de.service;
1136
+ function Jt(e, t, n = {}) {
1137
+ let r = me({
1125
1138
  ...n,
1126
- title: n.title ?? Rt(`campus.notify.${e}`),
1139
+ title: n.title ?? Ht(`campus.notify.${e}`),
1127
1140
  message: t,
1128
1141
  type: e
1129
1142
  });
1130
- return m(() => fe.updateOffsets(n.position)), r;
1143
+ return m(() => me.updateOffsets(n.position)), r;
1131
1144
  }
1132
1145
  // packages/core/src/services/ca.ts
1133
- var Gt = {
1134
- alert: Bt,
1135
- confirm: Vt,
1136
- toast: Ht,
1137
- loading: Ut,
1146
+ var Yt = {
1147
+ alert: Wt,
1148
+ confirm: Gt,
1149
+ toast: Kt,
1150
+ loading: qt,
1138
1151
  notify: {
1139
- success: (e, t) => Wt("success", e, t),
1140
- info: (e, t) => Wt("info", e, t),
1141
- warning: (e, t) => Wt("warning", e, t),
1142
- error: (e, t) => Wt("error", e, t)
1152
+ success: (e, t) => Jt("success", e, t),
1153
+ info: (e, t) => Jt("info", e, t),
1154
+ warning: (e, t) => Jt("warning", e, t),
1155
+ error: (e, t) => Jt("error", e, t)
1143
1156
  }
1144
- }, Kt = { class: "ca-auth-row" }, qt = ["disabled"], Jt = 60, Yt = /* @__PURE__ */ d({
1157
+ }, Xt = { class: "ca-auth-row" }, Zt = ["disabled"], Qt = 60, $t = /* @__PURE__ */ d({
1145
1158
  __name: "SmsField",
1146
1159
  props: /*@__PURE__*/ p({ send: { type: Function } }, {
1147
1160
  modelValue: { default: "" },
@@ -1149,7 +1162,7 @@ var Gt = {
1149
1162
  }),
1150
1163
  emits: ["update:modelValue"],
1151
1164
  setup(e) {
1152
- let t = e, n = O(e, "modelValue"), { t: r } = K(), i = x(0), a = x(!1), c;
1165
+ let t = e, n = k(e, "modelValue"), { t: r } = q(), i = x(0), a = x(!1), c;
1153
1166
  function l() {
1154
1167
  c && clearInterval(c), c = void 0;
1155
1168
  }
@@ -1163,14 +1176,14 @@ var Gt = {
1163
1176
  } finally {
1164
1177
  a.value = !1;
1165
1178
  }
1166
- i.value = Jt, l(), c = setInterval(() => {
1179
+ i.value = Qt, l(), c = setInterval(() => {
1167
1180
  --i.value, i.value <= 0 && l();
1168
1181
  }, 1e3);
1169
1182
  }
1170
1183
  }
1171
1184
  return _(l), (e, t) => {
1172
1185
  let c = w("ca-input");
1173
- return y(), o("div", Kt, [u(c, {
1186
+ return y(), o("div", Xt, [u(c, {
1174
1187
  modelValue: n.value,
1175
1188
  "onUpdate:modelValue": t[0] ||= (e) => n.value = e,
1176
1189
  placeholder: D(r)("campus.auth.smsPlaceholder"),
@@ -1178,7 +1191,7 @@ var Gt = {
1178
1191
  autocomplete: "one-time-code",
1179
1192
  maxlength: "8"
1180
1193
  }, {
1181
- prefix: M(() => [u($, { name: "message" })]),
1194
+ prefix: N(() => [u($, { name: "message" })]),
1182
1195
  _: 1
1183
1196
  }, 8, [
1184
1197
  "modelValue",
@@ -1189,30 +1202,30 @@ var Gt = {
1189
1202
  class: "ca-auth-sms",
1190
1203
  disabled: i.value > 0 || a.value,
1191
1204
  onClick: d
1192
- }, E(i.value > 0 ? D(r)("campus.auth.resend", { n: i.value }) : D(r)("campus.auth.getCode")), 9, qt)]);
1205
+ }, E(i.value > 0 ? D(r)("campus.auth.resend", { n: i.value }) : D(r)("campus.auth.getCode")), 9, Zt)]);
1193
1206
  };
1194
1207
  }
1195
- }), Xt = {
1208
+ }), en = {
1196
1209
  key: 0,
1197
1210
  class: "ca-auth-hint"
1198
- }, Zt = { class: "ca-auth-agreements" }, Qt = ["href"], $t = /* @__PURE__ */ d({
1211
+ }, tn = { class: "ca-auth-agreements" }, nn = ["href"], rn = /* @__PURE__ */ d({
1199
1212
  __name: "RegisterForm",
1200
1213
  props: { preview: { type: Boolean } },
1201
1214
  setup(t) {
1202
- let r = t, c = W(), { t: d, label: f } = K(), p = Ue(), m = Ft(q()), g = Y(), _ = g.agreements ?? [], v = b({
1215
+ let r = t, c = G(), { t: d, label: f } = q(), p = Ke(), m = zt(J()), g = X(), _ = g.agreements ?? [], v = b({
1203
1216
  phone: "",
1204
1217
  captcha: "",
1205
1218
  code: "",
1206
1219
  password: "",
1207
1220
  confirm: "",
1208
1221
  agree: !1
1209
- }), C = x(""), T = x(), O = x(), k = x(!1), A = x(""), j = x("error"), N = n(() => ({
1222
+ }), C = x(""), T = x(), O = x(), k = x(!1), A = x(""), j = x("error"), M = n(() => ({
1210
1223
  phone: [{
1211
1224
  required: !0,
1212
1225
  message: d("campus.auth.phonePlaceholder"),
1213
1226
  trigger: "blur"
1214
1227
  }, {
1215
- pattern: He,
1228
+ pattern: Ge,
1216
1229
  message: d("campus.auth.phoneInvalid"),
1217
1230
  trigger: "blur"
1218
1231
  }],
@@ -1231,7 +1244,7 @@ var Gt = {
1231
1244
  message: d("campus.auth.registerPasswordPlaceholder"),
1232
1245
  trigger: "blur"
1233
1246
  }, {
1234
- validator: (e, t, n) => n(Lt(t, m) ? void 0 : Error(d("campus.auth.passwordPolicy"))),
1247
+ validator: (e, t, n) => n(Vt(t, m) ? void 0 : Error(d("campus.auth.passwordPolicy"))),
1235
1248
  trigger: "blur"
1236
1249
  }],
1237
1250
  confirm: [{
@@ -1246,7 +1259,7 @@ var Gt = {
1246
1259
  validator: (e, t, n) => n(t ? void 0 : Error(d("campus.auth.agreeRequired"))),
1247
1260
  trigger: "change"
1248
1261
  }] : []
1249
- })), F = n(() => !!(v.phone && v.code && v.password && v.confirm) && (!p.captcha || !!v.captcha) && (!_.length || v.agree));
1262
+ })), P = n(() => !!(v.phone && v.code && v.password && v.confirm) && (!p.captcha || !!v.captcha) && (!_.length || v.agree));
1250
1263
  function I(e, t) {
1251
1264
  j.value = "error", A.value = e instanceof Error && e.message ? e.message : t;
1252
1265
  }
@@ -1259,20 +1272,20 @@ var Gt = {
1259
1272
  }
1260
1273
  if (A.value = "", r.preview) j.value = "info", A.value = d("campus.auth.previewNote");
1261
1274
  else try {
1262
- await q().auth.sendSmsCode({
1275
+ await J().auth.sendSmsCode({
1263
1276
  phone: v.phone,
1264
1277
  scene: "register",
1265
1278
  captcha: p.captcha ? {
1266
1279
  key: C.value,
1267
1280
  code: v.captcha
1268
1281
  } : void 0
1269
- }), Gt.toast.success(d("campus.auth.smsSent"));
1282
+ }), Yt.toast.success(d("campus.auth.smsSent"));
1270
1283
  } catch (e) {
1271
1284
  throw I(e, d("campus.login.failed")), T.value?.refresh(), e;
1272
1285
  }
1273
1286
  }
1274
1287
  async function R() {
1275
- if (F.value) {
1288
+ if (P.value) {
1276
1289
  try {
1277
1290
  await O.value?.validate();
1278
1291
  } catch {
@@ -1282,7 +1295,7 @@ var Gt = {
1282
1295
  else {
1283
1296
  k.value = !0, A.value = "";
1284
1297
  try {
1285
- await q().auth.register({
1298
+ await J().auth.register({
1286
1299
  phone: v.phone,
1287
1300
  code: v.code,
1288
1301
  password: v.password,
@@ -1290,7 +1303,7 @@ var Gt = {
1290
1303
  key: C.value,
1291
1304
  code: v.captcha
1292
1305
  } : void 0
1293
- }), Gt.toast.success(d("campus.auth.registerOk")), await c.replace({ name: J(q()).login });
1306
+ }), Yt.toast.success(d("campus.auth.registerOk")), await c.replace({ name: Y(J()).login });
1294
1307
  } catch (e) {
1295
1308
  I(e, d("campus.login.failed")), T.value?.refresh();
1296
1309
  } finally {
@@ -1312,14 +1325,14 @@ var Gt = {
1312
1325
  ref_key: "formRef",
1313
1326
  ref: O,
1314
1327
  model: v,
1315
- rules: N.value,
1328
+ rules: M.value,
1316
1329
  size: "large",
1317
1330
  class: "ca-auth-form",
1318
- onSubmit: P(R, ["prevent"])
1331
+ onSubmit: F(R, ["prevent"])
1319
1332
  }, {
1320
- default: M(() => [
1333
+ default: N(() => [
1321
1334
  u(m, { prop: "phone" }, {
1322
- default: M(() => [u(c, {
1335
+ default: N(() => [u(c, {
1323
1336
  modelValue: v.phone,
1324
1337
  "onUpdate:modelValue": n[0] ||= (e) => v.phone = e,
1325
1338
  placeholder: D(d)("campus.auth.phonePlaceholder"),
@@ -1327,7 +1340,7 @@ var Gt = {
1327
1340
  autocomplete: "tel",
1328
1341
  maxlength: "11"
1329
1342
  }, {
1330
- prefix: M(() => [u($, { name: "phone" })]),
1343
+ prefix: N(() => [u($, { name: "phone" })]),
1331
1344
  _: 1
1332
1345
  }, 8, [
1333
1346
  "modelValue",
@@ -1340,7 +1353,7 @@ var Gt = {
1340
1353
  key: 0,
1341
1354
  prop: "captcha"
1342
1355
  }, {
1343
- default: M(() => [u(bt, {
1356
+ default: N(() => [u(wt, {
1344
1357
  ref_key: "captchaRef",
1345
1358
  ref: T,
1346
1359
  code: v.captcha,
@@ -1352,15 +1365,15 @@ var Gt = {
1352
1365
  _: 1
1353
1366
  })) : a("v-if", !0),
1354
1367
  u(m, { prop: "code" }, {
1355
- default: M(() => [u(Yt, {
1368
+ default: N(() => [u($t, {
1356
1369
  modelValue: v.code,
1357
1370
  "onUpdate:modelValue": n[3] ||= (e) => v.code = e,
1358
1371
  send: L
1359
- }, null, 8, ["modelValue"]), D(g).smsHint ? (y(), o("p", Xt, E(D(f)(D(g).smsHint)), 1)) : a("v-if", !0)]),
1372
+ }, null, 8, ["modelValue"]), D(g).smsHint ? (y(), o("p", en, E(D(f)(D(g).smsHint)), 1)) : a("v-if", !0)]),
1360
1373
  _: 1
1361
1374
  }),
1362
1375
  u(m, { prop: "password" }, {
1363
- default: M(() => [u(c, {
1376
+ default: N(() => [u(c, {
1364
1377
  modelValue: v.password,
1365
1378
  "onUpdate:modelValue": n[4] ||= (e) => v.password = e,
1366
1379
  type: "password",
@@ -1369,7 +1382,7 @@ var Gt = {
1369
1382
  "aria-label": D(d)("campus.auth.registerPassword"),
1370
1383
  autocomplete: "new-password"
1371
1384
  }, {
1372
- prefix: M(() => [u($, { name: "lock" })]),
1385
+ prefix: N(() => [u($, { name: "lock" })]),
1373
1386
  _: 1
1374
1387
  }, 8, [
1375
1388
  "modelValue",
@@ -1379,7 +1392,7 @@ var Gt = {
1379
1392
  _: 1
1380
1393
  }),
1381
1394
  u(m, { prop: "confirm" }, {
1382
- default: M(() => [u(c, {
1395
+ default: N(() => [u(c, {
1383
1396
  modelValue: v.confirm,
1384
1397
  "onUpdate:modelValue": n[5] ||= (e) => v.confirm = e,
1385
1398
  type: "password",
@@ -1388,7 +1401,7 @@ var Gt = {
1388
1401
  "aria-label": D(d)("campus.auth.confirmPlaceholder"),
1389
1402
  autocomplete: "new-password"
1390
1403
  }, {
1391
- prefix: M(() => [u($, { name: "lock" })]),
1404
+ prefix: N(() => [u($, { name: "lock" })]),
1392
1405
  _: 1
1393
1406
  }, 8, [
1394
1407
  "modelValue",
@@ -1401,18 +1414,18 @@ var Gt = {
1401
1414
  key: 1,
1402
1415
  prop: "agree"
1403
1416
  }, {
1404
- default: M(() => [u(b, {
1417
+ default: N(() => [u(b, {
1405
1418
  modelValue: v.agree,
1406
1419
  "onUpdate:modelValue": n[6] ||= (e) => v.agree = e
1407
1420
  }, {
1408
- default: M(() => [l(E(D(d)("campus.auth.agreePrefix")), 1)]),
1421
+ default: N(() => [l(E(D(d)("campus.auth.agreePrefix")), 1)]),
1409
1422
  _: 1
1410
- }, 8, ["modelValue"]), s("span", Zt, [(y(!0), o(e, null, S(D(_), (e) => (y(), o("a", {
1423
+ }, 8, ["modelValue"]), s("span", tn, [(y(!0), o(e, null, S(D(_), (e) => (y(), o("a", {
1411
1424
  key: e.href,
1412
1425
  href: e.href,
1413
1426
  target: "_blank",
1414
1427
  rel: "noopener noreferrer"
1415
- }, E(D(f)(e.text)), 9, Qt))), 128))])]),
1428
+ }, E(D(f)(e.text)), 9, nn))), 128))])]),
1416
1429
  _: 1
1417
1430
  })) : a("v-if", !0),
1418
1431
  u(x, {
@@ -1420,10 +1433,10 @@ var Gt = {
1420
1433
  "native-type": "submit",
1421
1434
  size: "large",
1422
1435
  loading: k.value,
1423
- disabled: !F.value,
1424
- class: h(["ca-auth-submit", { "ca-auth-submit--off": !F.value }])
1436
+ disabled: !P.value,
1437
+ class: h(["ca-auth-submit", { "ca-auth-submit--off": !P.value }])
1425
1438
  }, {
1426
- default: M(() => [l(E(D(d)("campus.common.ok")), 1)]),
1439
+ default: N(() => [l(E(D(d)("campus.common.ok")), 1)]),
1427
1440
  _: 1
1428
1441
  }, 8, [
1429
1442
  "loading",
@@ -1435,42 +1448,42 @@ var Gt = {
1435
1448
  }, 8, ["model", "rules"])], 64);
1436
1449
  };
1437
1450
  }
1438
- }), en = {
1451
+ }), an = {
1439
1452
  key: 1,
1440
1453
  class: "ca-auth-off",
1441
1454
  role: "status"
1442
- }, tn = /* @__PURE__ */ d({
1455
+ }, on = /* @__PURE__ */ d({
1443
1456
  __name: "RegisterPage",
1444
1457
  props: { preview: { type: Boolean } },
1445
1458
  setup(e) {
1446
- let { t } = K(), r = Ue().register, a = n(() => [{
1459
+ let { t } = q(), r = Ke().register, a = n(() => [{
1447
1460
  key: "register",
1448
1461
  label: t("campus.auth.tabRegister")
1449
1462
  }, {
1450
1463
  key: "login",
1451
1464
  label: t("campus.auth.backLogin"),
1452
- to: Me(q()).login
1465
+ to: Fe(J()).login
1453
1466
  }]);
1454
- return (n, c) => (y(), i(st, {
1467
+ return (n, c) => (y(), i(ut, {
1455
1468
  active: "register",
1456
1469
  tabs: a.value,
1457
1470
  preview: e.preview
1458
1471
  }, {
1459
- default: M(() => [D(r) ? (y(), i($t, {
1472
+ default: N(() => [D(r) ? (y(), i(rn, {
1460
1473
  key: 0,
1461
1474
  preview: e.preview
1462
- }, null, 8, ["preview"])) : (y(), o("div", en, [s("h3", null, E(D(t)("campus.auth.unavailableTitle")), 1), s("p", null, E(D(t)("campus.auth.unavailableDesc")), 1)]))]),
1475
+ }, null, 8, ["preview"])) : (y(), o("div", an, [s("h3", null, E(D(t)("campus.auth.unavailableTitle")), 1), s("p", null, E(D(t)("campus.auth.unavailableDesc")), 1)]))]),
1463
1476
  _: 1
1464
1477
  }, 8, ["tabs", "preview"]));
1465
1478
  }
1466
- }), nn = {
1479
+ }), sn = {
1467
1480
  key: 0,
1468
1481
  class: "ca-auth-hint"
1469
- }, rn = /* @__PURE__ */ d({
1482
+ }, cn = /* @__PURE__ */ d({
1470
1483
  __name: "ForgotForm",
1471
1484
  props: { preview: { type: Boolean } },
1472
1485
  setup(t) {
1473
- let r = t, s = W(), { t: c, label: d } = K(), f = Ue(), p = Ft(q()), m = Y(), g = b({
1486
+ let r = t, s = G(), { t: c, label: d } = q(), f = Ke(), p = zt(J()), m = X(), g = b({
1474
1487
  account: "",
1475
1488
  captcha: "",
1476
1489
  code: "",
@@ -1497,7 +1510,7 @@ var Gt = {
1497
1510
  message: c("campus.auth.newPasswordPlaceholder"),
1498
1511
  trigger: "blur"
1499
1512
  }, {
1500
- validator: (e, t, n) => n(Lt(t, p) ? void 0 : Error(c("campus.auth.passwordPolicy"))),
1513
+ validator: (e, t, n) => n(Vt(t, p) ? void 0 : Error(c("campus.auth.passwordPolicy"))),
1501
1514
  trigger: "blur"
1502
1515
  }],
1503
1516
  confirm: [{
@@ -1512,7 +1525,7 @@ var Gt = {
1512
1525
  function j(e, t) {
1513
1526
  O.value = "error", T.value = e instanceof Error && e.message ? e.message : t;
1514
1527
  }
1515
- async function N() {
1528
+ async function M() {
1516
1529
  let e = f.captcha ? ["account", "captcha"] : ["account"];
1517
1530
  try {
1518
1531
  await S.value?.validateField(e);
@@ -1521,19 +1534,19 @@ var Gt = {
1521
1534
  }
1522
1535
  if (T.value = "", r.preview) O.value = "info", T.value = c("campus.auth.previewNote");
1523
1536
  else try {
1524
- await q().auth.sendSmsCode({
1525
- ...He.test(g.account) ? { phone: g.account } : { username: g.account },
1537
+ await J().auth.sendSmsCode({
1538
+ ...Ge.test(g.account) ? { phone: g.account } : { username: g.account },
1526
1539
  scene: "forgot",
1527
1540
  captcha: f.captcha ? {
1528
1541
  key: _.value,
1529
1542
  code: g.captcha
1530
1543
  } : void 0
1531
- }), Gt.toast.success(c("campus.auth.smsSent"));
1544
+ }), Yt.toast.success(c("campus.auth.smsSent"));
1532
1545
  } catch (e) {
1533
1546
  throw j(e, c("campus.login.failed")), v.value?.refresh(), e;
1534
1547
  }
1535
1548
  }
1536
- async function F() {
1549
+ async function P() {
1537
1550
  if (A.value) {
1538
1551
  try {
1539
1552
  await S.value?.validate();
@@ -1544,7 +1557,7 @@ var Gt = {
1544
1557
  else {
1545
1558
  C.value = !0, T.value = "";
1546
1559
  try {
1547
- await q().auth.resetPassword({
1560
+ await J().auth.resetPassword({
1548
1561
  account: g.account,
1549
1562
  code: g.code,
1550
1563
  password: g.password,
@@ -1552,7 +1565,7 @@ var Gt = {
1552
1565
  key: _.value,
1553
1566
  code: g.captcha
1554
1567
  } : void 0
1555
- }), Gt.toast.success(c("campus.auth.resetOk")), await s.replace({ name: J(q()).login });
1568
+ }), Yt.toast.success(c("campus.auth.resetOk")), await s.replace({ name: Y(J()).login });
1556
1569
  } catch (e) {
1557
1570
  j(e, c("campus.login.failed")), v.value?.refresh();
1558
1571
  } finally {
@@ -1577,18 +1590,18 @@ var Gt = {
1577
1590
  rules: k.value,
1578
1591
  size: "large",
1579
1592
  class: "ca-auth-form",
1580
- onSubmit: P(F, ["prevent"])
1593
+ onSubmit: F(P, ["prevent"])
1581
1594
  }, {
1582
- default: M(() => [
1595
+ default: N(() => [
1583
1596
  u(p, { prop: "account" }, {
1584
- default: M(() => [u(s, {
1597
+ default: N(() => [u(s, {
1585
1598
  modelValue: g.account,
1586
1599
  "onUpdate:modelValue": n[0] ||= (e) => g.account = e,
1587
1600
  placeholder: D(c)("campus.auth.accountPlaceholder"),
1588
1601
  "aria-label": D(c)("campus.auth.account"),
1589
1602
  autocomplete: "username"
1590
1603
  }, {
1591
- prefix: M(() => [u($, { name: "user" })]),
1604
+ prefix: N(() => [u($, { name: "user" })]),
1592
1605
  _: 1
1593
1606
  }, 8, [
1594
1607
  "modelValue",
@@ -1601,7 +1614,7 @@ var Gt = {
1601
1614
  key: 0,
1602
1615
  prop: "captcha"
1603
1616
  }, {
1604
- default: M(() => [u(bt, {
1617
+ default: N(() => [u(wt, {
1605
1618
  ref_key: "captchaRef",
1606
1619
  ref: v,
1607
1620
  code: g.captcha,
@@ -1613,15 +1626,15 @@ var Gt = {
1613
1626
  _: 1
1614
1627
  })) : a("v-if", !0),
1615
1628
  u(p, { prop: "code" }, {
1616
- default: M(() => [u(Yt, {
1629
+ default: N(() => [u($t, {
1617
1630
  modelValue: g.code,
1618
1631
  "onUpdate:modelValue": n[3] ||= (e) => g.code = e,
1619
- send: N
1620
- }, null, 8, ["modelValue"]), D(m).smsHint ? (y(), o("p", nn, E(D(d)(D(m).smsHint)), 1)) : a("v-if", !0)]),
1632
+ send: M
1633
+ }, null, 8, ["modelValue"]), D(m).smsHint ? (y(), o("p", sn, E(D(d)(D(m).smsHint)), 1)) : a("v-if", !0)]),
1621
1634
  _: 1
1622
1635
  }),
1623
1636
  u(p, { prop: "password" }, {
1624
- default: M(() => [u(s, {
1637
+ default: N(() => [u(s, {
1625
1638
  modelValue: g.password,
1626
1639
  "onUpdate:modelValue": n[4] ||= (e) => g.password = e,
1627
1640
  type: "password",
@@ -1630,7 +1643,7 @@ var Gt = {
1630
1643
  "aria-label": D(c)("campus.auth.newPasswordPlaceholder"),
1631
1644
  autocomplete: "new-password"
1632
1645
  }, {
1633
- prefix: M(() => [u($, { name: "lock" })]),
1646
+ prefix: N(() => [u($, { name: "lock" })]),
1634
1647
  _: 1
1635
1648
  }, 8, [
1636
1649
  "modelValue",
@@ -1640,7 +1653,7 @@ var Gt = {
1640
1653
  _: 1
1641
1654
  }),
1642
1655
  u(p, { prop: "confirm" }, {
1643
- default: M(() => [u(s, {
1656
+ default: N(() => [u(s, {
1644
1657
  modelValue: g.confirm,
1645
1658
  "onUpdate:modelValue": n[5] ||= (e) => g.confirm = e,
1646
1659
  type: "password",
@@ -1649,7 +1662,7 @@ var Gt = {
1649
1662
  "aria-label": D(c)("campus.auth.confirmPlaceholder"),
1650
1663
  autocomplete: "new-password"
1651
1664
  }, {
1652
- prefix: M(() => [u($, { name: "lock" })]),
1665
+ prefix: N(() => [u($, { name: "lock" })]),
1653
1666
  _: 1
1654
1667
  }, 8, [
1655
1668
  "modelValue",
@@ -1666,7 +1679,7 @@ var Gt = {
1666
1679
  disabled: !A.value,
1667
1680
  class: h(["ca-auth-submit", { "ca-auth-submit--off": !A.value }])
1668
1681
  }, {
1669
- default: M(() => [l(E(D(c)("campus.common.ok")), 1)]),
1682
+ default: N(() => [l(E(D(c)("campus.common.ok")), 1)]),
1670
1683
  _: 1
1671
1684
  }, 8, [
1672
1685
  "loading",
@@ -1678,50 +1691,50 @@ var Gt = {
1678
1691
  }, 8, ["model", "rules"])], 64);
1679
1692
  };
1680
1693
  }
1681
- }), an = {
1694
+ }), ln = {
1682
1695
  key: 1,
1683
1696
  class: "ca-auth-off",
1684
1697
  role: "status"
1685
- }, on = /* @__PURE__ */ d({
1698
+ }, un = /* @__PURE__ */ d({
1686
1699
  __name: "ForgotPage",
1687
1700
  props: { preview: { type: Boolean } },
1688
1701
  setup(e) {
1689
- let { t } = K(), r = Ue().forgot, a = n(() => [{
1702
+ let { t } = q(), r = Ke().forgot, a = n(() => [{
1690
1703
  key: "forgot",
1691
1704
  label: t("campus.auth.tabForgot")
1692
1705
  }, {
1693
1706
  key: "login",
1694
1707
  label: t("campus.auth.backLogin"),
1695
- to: Me(q()).login
1708
+ to: Fe(J()).login
1696
1709
  }]);
1697
- return (n, c) => (y(), i(st, {
1710
+ return (n, c) => (y(), i(ut, {
1698
1711
  active: "forgot",
1699
1712
  tabs: a.value,
1700
1713
  preview: e.preview
1701
1714
  }, {
1702
- default: M(() => [D(r) ? (y(), i(rn, {
1715
+ default: N(() => [D(r) ? (y(), i(cn, {
1703
1716
  key: 0,
1704
1717
  preview: e.preview
1705
- }, null, 8, ["preview"])) : (y(), o("div", an, [s("h3", null, E(D(t)("campus.auth.unavailableTitle")), 1), s("p", null, E(D(t)("campus.auth.unavailableDesc")), 1)]))]),
1718
+ }, null, 8, ["preview"])) : (y(), o("div", ln, [s("h3", null, E(D(t)("campus.auth.unavailableTitle")), 1), s("p", null, E(D(t)("campus.auth.unavailableDesc")), 1)]))]),
1706
1719
  _: 1
1707
1720
  }, 8, ["tabs", "preview"]));
1708
1721
  }
1709
- }), sn = /* @__PURE__ */ d({
1722
+ }), dn = /* @__PURE__ */ d({
1710
1723
  __name: "AuthPreview",
1711
1724
  props: { kind: {} },
1712
1725
  setup(e) {
1713
- return (t, n) => e.kind === "login" ? (y(), i(Pt, {
1726
+ return (t, n) => e.kind === "login" ? (y(), i(Rt, {
1714
1727
  key: 0,
1715
1728
  preview: ""
1716
- })) : e.kind === "register" ? (y(), i(tn, {
1729
+ })) : e.kind === "register" ? (y(), i(on, {
1717
1730
  key: 1,
1718
1731
  preview: ""
1719
- })) : (y(), i(on, {
1732
+ })) : (y(), i(un, {
1720
1733
  key: 2,
1721
1734
  preview: ""
1722
1735
  }));
1723
1736
  }
1724
- }), cn = { class: "ca-user-avatar" }, ln = ["src"], un = /*#__PURE__*/ X(/* @__PURE__ */ d({
1737
+ }), fn = { class: "ca-user-avatar" }, pn = ["src"], mn = /*#__PURE__*/ Z(/* @__PURE__ */ d({
1725
1738
  __name: "UserAvatar",
1726
1739
  props: {
1727
1740
  name: {},
@@ -1729,48 +1742,248 @@ var Gt = {
1729
1742
  },
1730
1743
  setup(t) {
1731
1744
  let n = t, r = x(!1);
1732
- return A(() => n.src, () => {
1745
+ return j(() => n.src, () => {
1733
1746
  r.value = !1;
1734
- }), (n, i) => (y(), o("span", cn, [t.src && !r.value ? (y(), o("img", {
1747
+ }), (n, i) => (y(), o("span", fn, [t.src && !r.value ? (y(), o("img", {
1735
1748
  key: 0,
1736
1749
  src: t.src,
1737
1750
  alt: "",
1738
1751
  draggable: "false",
1739
1752
  onError: i[0] ||= (e) => r.value = !0
1740
- }, null, 40, ln)) : (y(), o(e, { key: 1 }, [l(E(t.name?.slice(0, 1)), 1)], 64))]));
1753
+ }, null, 40, pn)) : (y(), o(e, { key: 1 }, [l(E(t.name?.slice(0, 1)), 1)], 64))]));
1754
+ }
1755
+ }), [["__scopeId", "data-v-b67c1b85"]]), hn = (e) => e.normalize("NFKC").toLowerCase().trim();
1756
+ function gn(e) {
1757
+ return e.filter((e) => /\p{Script=Han}/u.test(e)).flatMap((e) => {
1758
+ let t = {
1759
+ toneType: "none",
1760
+ type: "array",
1761
+ nonZh: "consecutive",
1762
+ v: !0
1763
+ };
1764
+ return [he(e, t), he(e, {
1765
+ ...t,
1766
+ pattern: "first"
1767
+ })].map((e) => e.join("").replace(/[^a-z0-9]/g, ""));
1768
+ }).filter(Boolean);
1769
+ }
1770
+ function _n(e, t, n) {
1771
+ return Pe(J().menus).filter((t) => e(t.permission)).map((e) => {
1772
+ let r = Me(e.key)?.titles.slice(0, -1) ?? [], i = t(e.title), a = r.map(t).join(" / "), o = [i, n(e.title)].map(hn);
1773
+ return {
1774
+ key: e.key,
1775
+ path: e.path,
1776
+ title: i,
1777
+ trail: a,
1778
+ icon: e.icon,
1779
+ titles: o,
1780
+ pinyinTitles: gn(o),
1781
+ terms: hn([
1782
+ a,
1783
+ ...r.map(n),
1784
+ ...o,
1785
+ e.path
1786
+ ].join(" "))
1787
+ };
1788
+ });
1789
+ }
1790
+ function vn(e, t) {
1791
+ let n = hn(t);
1792
+ if (!n) return e;
1793
+ let r = n.split(/\s+/), i = /^[a-z0-9\s]+$/.test(n) ? r.join("") : "";
1794
+ return e.flatMap((e) => {
1795
+ let t = r.every((t) => e.terms.includes(t)), a = i && e.pinyinTitles.some((e) => e.includes(i));
1796
+ return !t && !a ? [] : [{
1797
+ entry: e,
1798
+ score: e.titles.includes(n) || hn(e.path) === n ? 0 : e.titles.some((e) => e.startsWith(n)) ? 1 : e.titles.some((e) => e.includes(n)) ? 2 : e.pinyinTitles.includes(i) ? 3 : t ? 4 : 5
1799
+ }];
1800
+ }).sort((e, t) => e.score - t.score).map(({ entry: e }) => e);
1801
+ }
1802
+ // packages/core/src/layout/MenuSearch.vue?vue&type=script&setup=true&lang.ts
1803
+ var yn = ["aria-label"], bn = [
1804
+ "id",
1805
+ "aria-selected",
1806
+ "onMousemove",
1807
+ "onClick"
1808
+ ], xn = { class: "ca-menu-search__label" }, Sn = { key: 0 }, Cn = {
1809
+ key: 0,
1810
+ class: "ca-menu-search__empty",
1811
+ role: "status"
1812
+ }, wn = { class: "ca-menu-search__keys" }, Tn = /*#__PURE__*/ Z(/* @__PURE__ */ d({
1813
+ __name: "MenuSearch",
1814
+ props: {
1815
+ modelValue: {
1816
+ type: Boolean,
1817
+ required: !0
1818
+ },
1819
+ modelModifiers: {}
1820
+ },
1821
+ emits: ["update:modelValue"],
1822
+ setup(t) {
1823
+ let r = k(t, "modelValue"), { t: c, te: d, label: f, locale: p } = q(), h = Q(), g = G(), _ = x(""), v = x(0), b = O(), C = `${b}-input`, T = `${b}-results`, M = (e) => `${T}-${e}`, I = n(() => {
1824
+ let e = p.value === "zh-CN" ? "en-US" : "zh-CN";
1825
+ return _n((e) => h.can(e), f, (t) => d(t, e) ? c(t, {}, { locale: e }) : t);
1826
+ }), L = n(() => vn(I.value, _.value));
1827
+ j(r, (e) => {
1828
+ e && (_.value = "", v.value = 0);
1829
+ }), j(L, () => {
1830
+ v.value = 0;
1831
+ });
1832
+ async function R() {
1833
+ await m(), await m(), r.value && document.getElementById(C)?.focus();
1834
+ }
1835
+ function z(e) {
1836
+ r.value = !1, g.push({ name: e.key });
1837
+ }
1838
+ async function ee(e) {
1839
+ if (e.isComposing || e.keyCode === 229 || !L.value.length) return;
1840
+ if (e.key === "Enter") {
1841
+ e.preventDefault(), z(L.value[v.value]);
1842
+ return;
1843
+ }
1844
+ if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
1845
+ e.preventDefault();
1846
+ let t = e.key === "ArrowDown" ? 1 : -1;
1847
+ v.value = (v.value + t + L.value.length) % L.value.length, await m(), document.getElementById(M(v.value))?.scrollIntoView({ block: "nearest" });
1848
+ }
1849
+ return (t, n) => {
1850
+ let d = w("ca-icon"), f = w("ca-input"), p = w("ca-dialog");
1851
+ return y(), i(p, {
1852
+ modelValue: r.value,
1853
+ "onUpdate:modelValue": n[2] ||= (e) => r.value = e,
1854
+ title: D(c)("campus.menuSearch.title"),
1855
+ width: "min(560px, calc(100vw - 24px))",
1856
+ top: "min(12vh, 96px)",
1857
+ "append-to-body": "",
1858
+ "destroy-on-close": "",
1859
+ "close-on-press-escape": !1,
1860
+ "header-class": "ca-menu-search__header",
1861
+ "body-class": "ca-menu-search__body",
1862
+ class: "ca-menu-search",
1863
+ onOpenAutoFocus: R
1864
+ }, {
1865
+ default: N(() => [
1866
+ s("div", {
1867
+ class: "ca-menu-search__input",
1868
+ onKeydown: ee
1869
+ }, [u(f, {
1870
+ id: C,
1871
+ modelValue: _.value,
1872
+ "onUpdate:modelValue": n[0] ||= (e) => _.value = e,
1873
+ class: "ca-menu-search__control",
1874
+ placeholder: D(c)("campus.menuSearch.placeholder"),
1875
+ "aria-label": D(c)("campus.menuSearch.title"),
1876
+ "aria-controls": T,
1877
+ "aria-expanded": L.value.length > 0,
1878
+ "aria-activedescendant": L.value.length ? M(v.value) : void 0,
1879
+ "container-role": "combobox",
1880
+ "aria-autocomplete": "list",
1881
+ autocomplete: "off",
1882
+ spellcheck: "false"
1883
+ }, {
1884
+ prefix: N(() => [u(d, {
1885
+ name: "search",
1886
+ size: 18,
1887
+ "aria-hidden": "true"
1888
+ })]),
1889
+ _: 1
1890
+ }, 8, [
1891
+ "modelValue",
1892
+ "placeholder",
1893
+ "aria-label",
1894
+ "aria-expanded",
1895
+ "aria-activedescendant"
1896
+ ])], 32),
1897
+ P(s("ul", {
1898
+ id: T,
1899
+ class: "ca-menu-search__results",
1900
+ role: "listbox",
1901
+ "aria-label": D(c)("campus.menuSearch.results")
1902
+ }, [(y(!0), o(e, null, S(L.value, (e, t) => (y(), o("li", {
1903
+ id: M(t),
1904
+ key: e.key,
1905
+ role: "option",
1906
+ "aria-selected": t === v.value,
1907
+ onMousemove: (e) => v.value = t,
1908
+ onMousedown: n[1] ||= F(() => {}, ["prevent"]),
1909
+ onClick: (t) => z(e)
1910
+ }, [
1911
+ u(d, {
1912
+ name: e.icon || "document",
1913
+ size: 18,
1914
+ "aria-hidden": "true"
1915
+ }, null, 8, ["name"]),
1916
+ s("span", xn, [s("strong", null, E(e.title), 1), e.trail ? (y(), o("small", Sn, E(e.trail), 1)) : a("v-if", !0)]),
1917
+ u(d, {
1918
+ name: "right",
1919
+ size: 16,
1920
+ class: "ca-menu-search__arrow",
1921
+ "aria-hidden": "true"
1922
+ })
1923
+ ], 40, bn))), 128))], 8, yn), [[A, L.value.length]]),
1924
+ L.value.length ? a("v-if", !0) : (y(), o("p", Cn, E(D(c)("campus.menuSearch.empty")), 1)),
1925
+ s("div", wn, [
1926
+ s("span", null, [
1927
+ n[3] ||= s("kbd", null, "↑", -1),
1928
+ n[4] ||= l(),
1929
+ n[5] ||= s("kbd", null, "↓", -1),
1930
+ l(" " + E(D(c)("campus.menuSearch.navigate")), 1)
1931
+ ]),
1932
+ s("span", null, [n[6] ||= s("kbd", null, "↵", -1), l(" " + E(D(c)("campus.menuSearch.open")), 1)]),
1933
+ s("span", null, [n[7] ||= s("kbd", null, "Esc", -1), l(" " + E(D(c)("campus.menuSearch.close")), 1)])
1934
+ ])
1935
+ ]),
1936
+ _: 1
1937
+ }, 8, ["modelValue", "title"]);
1938
+ };
1741
1939
  }
1742
- }), [["__scopeId", "data-v-b67c1b85"]]), dn = { class: "ca-header" }, fn = [
1940
+ }), [["__scopeId", "data-v-1f227e14"]]), En = { class: "ca-header" }, Dn = [
1743
1941
  "title",
1744
1942
  "aria-label",
1745
1943
  "aria-expanded"
1746
- ], pn = { class: "ca-header__brand" }, mn = ["src"], hn = { class: "ca-header__titles" }, gn = { class: "ca-header__name" }, _n = {
1944
+ ], On = { class: "ca-header__brand" }, kn = ["src"], An = { class: "ca-header__titles" }, jn = { class: "ca-header__name" }, Mn = {
1747
1945
  key: 0,
1748
1946
  class: "ca-header__subtitle"
1749
- }, vn = ["aria-label"], yn = ["onClick"], bn = { class: "ca-header__tools" }, xn = { class: "ca-header__search-text" }, Sn = [
1947
+ }, Nn = ["aria-label"], Pn = ["onClick"], Fn = { class: "ca-header__tools" }, In = ["aria-label", "aria-haspopup"], Ln = { class: "ca-header__search-text" }, Rn = {
1948
+ class: "ca-header__kbd",
1949
+ "aria-hidden": "true"
1950
+ }, zn = [
1750
1951
  "title",
1751
1952
  "aria-label",
1752
1953
  "aria-pressed"
1753
- ], Cn = ["title", "aria-label"], wn = { class: "ca-header__icon-text" }, Tn = ["title", "aria-label"], En = ["title", "aria-label"], Dn = ["title", "aria-label"], On = ["title", "aria-label"], kn = { class: "ca-settings__group" }, An = { class: "ca-settings__title" }, jn = ["aria-label"], Mn = ["aria-checked", "onClick"], Nn = {
1954
+ ], Bn = ["title", "aria-label"], Vn = { class: "ca-header__icon-text" }, Hn = ["title", "aria-label"], Un = ["title", "aria-label"], Wn = ["title", "aria-label"], Gn = ["title", "aria-label"], Kn = { class: "ca-settings__intro" }, qn = { class: "ca-settings__group" }, Jn = { class: "ca-settings__title" }, Yn = ["aria-label"], Xn = ["aria-pressed", "onClick"], Zn = {
1754
1955
  key: 0,
1755
1956
  class: "ca-settings__group"
1756
- }, Pn = { class: "ca-settings__title" }, Fn = ["aria-label"], In = [
1957
+ }, Qn = { class: "ca-settings__color-heading" }, $n = { class: "ca-settings__title" }, er = {
1958
+ class: "ca-settings__color-value",
1959
+ "aria-live": "polite"
1960
+ }, tr = { key: 0 }, nr = ["aria-label"], rr = [
1757
1961
  "aria-label",
1758
- "aria-checked",
1962
+ "title",
1963
+ "aria-pressed",
1759
1964
  "onClick"
1760
- ], Ln = ["title"], Rn = ["value", "aria-label"], zn = ["disabled"], Bn = { class: "ca-settings__group" }, Vn = { class: "ca-settings__title" }, Hn = ["aria-label"], Un = ["aria-checked", "onClick"], Wn = /*#__PURE__*/ X(/* @__PURE__ */ d({
1965
+ ], ir = { class: "ca-settings__color-actions" }, ar = { class: "ca-settings__custom" }, or = ["value", "aria-label"], sr = ["disabled"], cr = { class: "ca-settings__group" }, lr = { class: "ca-settings__title" }, ur = ["aria-label"], dr = ["aria-pressed", "onClick"], fr = /*#__PURE__*/ Z(/* @__PURE__ */ d({
1761
1966
  __name: "HeaderBar",
1762
1967
  setup(t) {
1763
- let r = U(), c = W(), d = Q(), f = Z(), p = Be(), { t: m, label: b, locale: C } = K(), T = q(), O = x(!1), k = [{
1968
+ let r = W(), c = G(), d = Q(), f = ft(), p = Ue(), { t: m, label: b, locale: C } = q(), T = J(), O = x(!1), k = typeof navigator < "u" && /Mac|iPhone|iPad/i.test(navigator.platform) ? "⌘ K" : "Ctrl K";
1969
+ function A() {
1970
+ T.headerTools?.search ? T.headerTools.search() : O.value = !0;
1971
+ }
1972
+ function j(e) {
1973
+ e.isComposing || e.defaultPrevented || (e.key === "Escape" && O.value ? (e.preventDefault(), e.stopPropagation(), O.value = !1) : !(e.metaKey || e.ctrlKey) || e.altKey || e.shiftKey || e.key.toLowerCase() !== "k" || e.target instanceof Element && e.target.closest("[aria-modal=\"true\"]") || (e.preventDefault(), e.repeat || A()));
1974
+ }
1975
+ v(() => window.addEventListener("keydown", j, !0)), _(() => window.removeEventListener("keydown", j, !0));
1976
+ let M = x(!1), P = [{
1764
1977
  value: "border",
1765
1978
  label: "campus.settings.boxBorder"
1766
1979
  }, {
1767
1980
  value: "shadow",
1768
1981
  label: "campus.settings.boxShadow"
1769
- }], A = n(() => b(p.theme.siteName ?? T.brand.name)), j = n(() => p.theme.logo ?? T.brand.logo), N = n(() => (T.shortcuts ?? []).filter((e) => d.can(e.permission)));
1770
- function P(e) {
1982
+ }], F = n(() => b(p.theme.siteName ?? T.brand.name)), I = n(() => p.theme.logo ?? T.brand.logo), L = n(() => (T.shortcuts ?? []).filter((e) => d.can(e.permission)));
1983
+ function R(e) {
1771
1984
  r.path !== e && c.push(e);
1772
1985
  }
1773
- let F = [
1986
+ let z = [
1774
1987
  {
1775
1988
  value: "light",
1776
1989
  icon: "sunny"
@@ -1783,7 +1996,7 @@ var Gt = {
1783
1996
  value: "auto",
1784
1997
  icon: "monitor"
1785
1998
  }
1786
- ], I = [
1999
+ ], te = [
1787
2000
  "#1677ff",
1788
2001
  "#364fc7",
1789
2002
  "#6b1d7a",
@@ -1792,39 +2005,39 @@ var Gt = {
1792
2005
  "#f59f00",
1793
2006
  "#0f9d58",
1794
2007
  "#0ca678"
1795
- ], L = n(() => p.theme.primary);
1796
- function R(e, t) {
2008
+ ], B = n(() => ue(se(p.theme.primary))), V = n(() => p.userPrimary && te.find((e) => e === B.value));
2009
+ function ne(e, t) {
1797
2010
  let n = t.currentTarget?.getBoundingClientRect();
1798
2011
  p.setMode(e, n ? {
1799
2012
  x: n.left + n.width / 2,
1800
2013
  y: n.top + n.height / 2
1801
2014
  } : void 0);
1802
2015
  }
1803
- function ee(e) {
1804
- C.value = e, we(e);
2016
+ function re(e) {
2017
+ C.value = e, De(e);
1805
2018
  }
1806
- async function te(e) {
1807
- e === "account" ? T.onAccountClick ? await T.onAccountClick("header") : T.accountPath && P(T.accountPath) : (await d.logout(), await c.replace({ name: J(q()).login }));
2019
+ async function H(e) {
2020
+ e === "account" ? T.onAccountClick ? await T.onAccountClick("header") : T.accountPath && R(T.accountPath) : (await d.logout(), await c.replace({ name: Y(J()).login }));
1808
2021
  }
1809
- let B = x(!1);
1810
- function V() {
1811
- B.value = !!document.fullscreenElement;
2022
+ let U = x(!1);
2023
+ function ie() {
2024
+ U.value = !!document.fullscreenElement;
1812
2025
  }
1813
- async function ne() {
2026
+ async function ae() {
1814
2027
  f.pageScreenManual();
1815
2028
  try {
1816
2029
  document.fullscreenElement ? await document.exitFullscreen() : await document.documentElement.requestFullscreen();
1817
2030
  } catch {}
1818
2031
  }
1819
2032
  v(() => {
1820
- V(), document.addEventListener("fullscreenchange", V);
1821
- }), _(() => document.removeEventListener("fullscreenchange", V));
1822
- function H(e) {
2033
+ ie(), document.addEventListener("fullscreenchange", ie);
2034
+ }), _(() => document.removeEventListener("fullscreenchange", ie));
2035
+ function oe(e) {
1823
2036
  T.headerTools?.[e]?.();
1824
2037
  }
1825
2038
  return (t, n) => {
1826
- let c = w("ca-icon"), _ = w("ca-dropdown-item"), v = w("ca-dropdown-menu"), x = w("ca-dropdown"), V = w("ca-drawer");
1827
- return y(), o("header", dn, [
2039
+ let c = w("ca-icon"), _ = w("ca-dropdown-item"), v = w("ca-dropdown-menu"), x = w("ca-dropdown"), j = w("ca-drawer");
2040
+ return y(), o("header", En, [
1828
2041
  a(" 菜单按钮:手机打开抽屉;电脑档两栏都收起时也显示,点击重新显示侧栏 "),
1829
2042
  s("button", {
1830
2043
  type: "button",
@@ -1842,13 +2055,13 @@ var Gt = {
1842
2055
  "stroke-width": "2",
1843
2056
  "stroke-linecap": "round",
1844
2057
  "aria-hidden": "true"
1845
- }, [s("path", { d: "M4 6h16M4 12h16M4 18h16" })], -1)]], 10, fn),
1846
- s("div", pn, [j.value ? (y(), o("img", {
2058
+ }, [s("path", { d: "M4 6h16M4 12h16M4 18h16" })], -1)]], 10, Dn),
2059
+ s("div", On, [I.value ? (y(), o("img", {
1847
2060
  key: 0,
1848
- src: j.value,
2061
+ src: I.value,
1849
2062
  alt: "",
1850
2063
  class: "ca-header__logo"
1851
- }, null, 8, mn)) : (y(), o(e, { key: 1 }, [a(" 没有配置 logo 时用框架默认标志(学士帽),颜色跟随头部前景色 "), n[9] ||= s("svg", {
2064
+ }, null, 8, kn)) : (y(), o(e, { key: 1 }, [a(" 没有配置 logo 时用框架默认标志(学士帽),颜色跟随头部前景色 "), n[9] ||= s("svg", {
1852
2065
  class: "ca-header__logo",
1853
2066
  viewBox: "0 0 32 32",
1854
2067
  fill: "none",
@@ -1861,58 +2074,64 @@ var Gt = {
1861
2074
  s("path", { d: "M16 6 3 12.5 16 19l13-6.5L16 6Z" }),
1862
2075
  s("path", { d: "M9 16.5v5.2c0 1.6 3.1 3.3 7 3.3s7-1.7 7-3.3v-5.2" }),
1863
2076
  s("path", { d: "M29 12.5V20" })
1864
- ], -1)], 2112)), s("div", hn, [s("strong", gn, E(A.value), 1), D(T).brand.subtitle ? (y(), o("span", _n, E(D(b)(D(T).brand.subtitle)), 1)) : a("v-if", !0)])]),
2077
+ ], -1)], 2112)), s("div", An, [s("strong", jn, E(F.value), 1), D(T).brand.subtitle ? (y(), o("span", Mn, E(D(b)(D(T).brand.subtitle)), 1)) : a("v-if", !0)])]),
1865
2078
  s("nav", {
1866
2079
  class: "ca-header__nav",
1867
2080
  "aria-label": D(m)("campus.header.shortcuts")
1868
- }, [(y(!0), o(e, null, S(N.value, (e) => (y(), o("button", {
2081
+ }, [(y(!0), o(e, null, S(L.value, (e) => (y(), o("button", {
1869
2082
  key: e.key,
1870
2083
  class: h(["ca-header__nav-item", { "is-active": D(r).path === e.path }]),
1871
2084
  type: "button",
1872
- onClick: (t) => P(e.path)
1873
- }, E(D(b)(e.title)), 11, yn))), 128))], 8, vn),
1874
- s("div", bn, [
2085
+ onClick: (t) => R(e.path)
2086
+ }, E(D(b)(e.title)), 11, Pn))), 128))], 8, Nn),
2087
+ s("div", Fn, [
1875
2088
  s("button", {
1876
2089
  type: "button",
1877
2090
  class: "ca-header__search",
1878
- onClick: n[1] ||= (e) => H("search")
2091
+ "aria-label": D(m)("campus.header.search"),
2092
+ "aria-haspopup": D(T).headerTools?.search ? void 0 : "dialog",
2093
+ "aria-keyshortcuts": "Meta+K Control+K",
2094
+ onClick: A
1879
2095
  }, [
1880
- u(c, { name: "search" }),
1881
- s("span", xn, E(D(m)("campus.header.search")), 1),
1882
- n[10] ||= s("kbd", { class: "ca-header__kbd" }, "⌘ K", -1)
1883
- ]),
2096
+ u(c, {
2097
+ name: "search",
2098
+ "aria-hidden": "true"
2099
+ }),
2100
+ s("span", Ln, E(D(m)("campus.header.search")), 1),
2101
+ s("kbd", Rn, E(D(k)), 1)
2102
+ ], 8, In),
1884
2103
  s("button", {
1885
2104
  type: "button",
1886
2105
  class: "ca-header__icon ca-header__desktop-tool",
1887
- title: B.value ? D(m)("campus.header.exitFullscreen") : D(m)("campus.header.fullscreen"),
1888
- "aria-label": B.value ? D(m)("campus.header.exitFullscreen") : D(m)("campus.header.fullscreen"),
1889
- "aria-pressed": B.value,
1890
- onClick: ne
2106
+ title: U.value ? D(m)("campus.header.exitFullscreen") : D(m)("campus.header.fullscreen"),
2107
+ "aria-label": U.value ? D(m)("campus.header.exitFullscreen") : D(m)("campus.header.fullscreen"),
2108
+ "aria-pressed": U.value,
2109
+ onClick: ae
1891
2110
  }, [u(c, {
1892
- name: B.value ? "exitFullscreen" : "fullscreen",
2111
+ name: U.value ? "exitFullscreen" : "fullscreen",
1893
2112
  size: 18
1894
- }, null, 8, ["name"])], 8, Sn),
2113
+ }, null, 8, ["name"])], 8, zn),
1895
2114
  u(x, {
1896
2115
  trigger: "click",
1897
- onCommand: ee
2116
+ onCommand: re
1898
2117
  }, {
1899
- dropdown: M(() => [u(v, null, {
1900
- default: M(() => [(y(!0), o(e, null, S(D(z), (e) => (y(), i(_, {
2118
+ dropdown: N(() => [u(v, null, {
2119
+ default: N(() => [(y(!0), o(e, null, S(D(ee), (e) => (y(), i(_, {
1901
2120
  key: e.code,
1902
2121
  command: e.code,
1903
2122
  class: h({ "is-current": D(C) === e.code })
1904
2123
  }, {
1905
- default: M(() => [l(E(e.code === "zh-CN" ? "简体中文" : "English"), 1)]),
2124
+ default: N(() => [l(E(e.code === "zh-CN" ? "简体中文" : "English"), 1)]),
1906
2125
  _: 2
1907
2126
  }, 1032, ["command", "class"]))), 128))]),
1908
2127
  _: 1
1909
2128
  })]),
1910
- default: M(() => [s("button", {
2129
+ default: N(() => [s("button", {
1911
2130
  type: "button",
1912
2131
  class: "ca-header__icon",
1913
2132
  title: D(m)("campus.header.language"),
1914
2133
  "aria-label": D(m)("campus.header.language")
1915
- }, [s("span", wn, E(D(z).find((e) => e.code === D(C))?.label), 1)], 8, Cn)]),
2134
+ }, [s("span", Vn, E(D(ee).find((e) => e.code === D(C))?.label), 1)], 8, Bn)]),
1916
2135
  _: 1
1917
2136
  }),
1918
2137
  s("button", {
@@ -1920,161 +2139,184 @@ var Gt = {
1920
2139
  class: "ca-header__icon ca-header__desktop-tool",
1921
2140
  title: D(m)("campus.header.notifications"),
1922
2141
  "aria-label": D(m)("campus.header.notifications"),
1923
- onClick: n[2] ||= (e) => H("notifications")
2142
+ onClick: n[1] ||= (e) => oe("notifications")
1924
2143
  }, [u(c, {
1925
2144
  name: "bell",
1926
2145
  size: 18
1927
- }), n[11] ||= s("i", {
2146
+ }), n[10] ||= s("i", {
1928
2147
  class: "ca-header__dot is-danger",
1929
2148
  "aria-hidden": "true"
1930
- }, null, -1)], 8, Tn),
2149
+ }, null, -1)], 8, Hn),
1931
2150
  s("button", {
1932
2151
  type: "button",
1933
2152
  class: "ca-header__icon ca-header__desktop-tool",
1934
2153
  title: D(m)("campus.header.assistant"),
1935
2154
  "aria-label": D(m)("campus.header.assistant"),
1936
- onClick: n[3] ||= (e) => H("assistant")
2155
+ onClick: n[2] ||= (e) => oe("assistant")
1937
2156
  }, [u(c, {
1938
2157
  name: "chat",
1939
2158
  size: 18
1940
- }), n[12] ||= s("i", {
2159
+ }), n[11] ||= s("i", {
1941
2160
  class: "ca-header__dot is-success",
1942
2161
  "aria-hidden": "true"
1943
- }, null, -1)], 8, En),
2162
+ }, null, -1)], 8, Un),
1944
2163
  s("button", {
1945
2164
  type: "button",
1946
2165
  class: "ca-header__icon",
1947
2166
  title: D(m)("campus.header.settings"),
1948
2167
  "aria-label": D(m)("campus.header.settings"),
1949
- onClick: n[4] ||= (e) => O.value = !0
2168
+ onClick: n[3] ||= (e) => M.value = !0
1950
2169
  }, [u(c, {
1951
2170
  name: "setting",
1952
2171
  size: 18
1953
- })], 8, Dn),
2172
+ })], 8, Wn),
1954
2173
  u(x, {
1955
2174
  trigger: "click",
1956
- onCommand: te
2175
+ onCommand: H
1957
2176
  }, {
1958
- dropdown: M(() => [u(v, null, {
1959
- default: M(() => [D(T).accountEntry?.header !== !1 && (D(T).accountPath || D(T).onAccountClick) ? (y(), i(_, {
2177
+ dropdown: N(() => [u(v, null, {
2178
+ default: N(() => [D(T).accountEntry?.header !== !1 && (D(T).accountPath || D(T).onAccountClick) ? (y(), i(_, {
1960
2179
  key: 0,
1961
2180
  command: "account"
1962
2181
  }, {
1963
- default: M(() => [l(E(D(m)("campus.header.myAccount")), 1)]),
2182
+ default: N(() => [l(E(D(m)("campus.header.myAccount")), 1)]),
1964
2183
  _: 1
1965
2184
  })) : a("v-if", !0), u(_, {
1966
2185
  command: "logout",
1967
2186
  divided: ""
1968
2187
  }, {
1969
- default: M(() => [l(E(D(m)("campus.header.logout")), 1)]),
2188
+ default: N(() => [l(E(D(m)("campus.header.logout")), 1)]),
1970
2189
  _: 1
1971
2190
  })]),
1972
2191
  _: 1
1973
2192
  })]),
1974
- default: M(() => [s("button", {
2193
+ default: N(() => [s("button", {
1975
2194
  type: "button",
1976
2195
  class: "ca-header__user",
1977
2196
  title: D(m)("campus.header.account"),
1978
2197
  "aria-label": D(d).user?.name
1979
- }, [u(un, {
2198
+ }, [u(mn, {
1980
2199
  class: "ca-header__avatar",
1981
2200
  name: D(d).user?.name,
1982
2201
  src: D(d).user?.avatar
1983
2202
  }, null, 8, ["name", "src"]), u(c, {
1984
2203
  name: "arrowDown",
1985
2204
  size: 12
1986
- })], 8, On)]),
2205
+ })], 8, Gn)]),
1987
2206
  _: 1
1988
2207
  })
1989
2208
  ]),
1990
- u(V, {
2209
+ D(T).headerTools?.search ? a("v-if", !0) : (y(), i(Tn, {
2210
+ key: 0,
1991
2211
  modelValue: O.value,
1992
- "onUpdate:modelValue": n[7] ||= (e) => O.value = e,
2212
+ "onUpdate:modelValue": n[4] ||= (e) => O.value = e
2213
+ }, null, 8, ["modelValue"])),
2214
+ u(j, {
2215
+ modelValue: M.value,
2216
+ "onUpdate:modelValue": n[7] ||= (e) => M.value = e,
1993
2217
  title: D(m)("campus.settings.title"),
1994
- size: "320px",
2218
+ size: "min(352px, 100vw)",
1995
2219
  "append-to-body": "",
2220
+ "header-class": "ca-settings__header",
2221
+ "body-class": "ca-settings__body",
1996
2222
  class: "ca-settings"
1997
2223
  }, {
1998
- default: M(() => [
1999
- s("section", kn, [s("h3", An, [s("span", null, E(D(m)("campus.settings.themeMode")), 1)]), s("div", {
2224
+ default: N(() => [
2225
+ s("p", Kn, E(D(m)("campus.settings.deviceNote")), 1),
2226
+ s("section", qn, [s("h3", Jn, E(D(m)("campus.settings.themeMode")), 1), s("div", {
2000
2227
  class: "ca-settings__segment is-three",
2001
- role: "radiogroup",
2228
+ role: "group",
2002
2229
  "aria-label": D(m)("campus.settings.themeMode")
2003
- }, [(y(), o(e, null, S(F, (e) => s("button", {
2230
+ }, [(y(), o(e, null, S(z, (e) => s("button", {
2004
2231
  key: e.value,
2005
2232
  type: "button",
2006
- role: "radio",
2007
- "aria-checked": D(p).mode === e.value,
2233
+ "aria-pressed": D(p).mode === e.value,
2008
2234
  class: h({ "is-active": D(p).mode === e.value }),
2009
- onClick: (t) => R(e.value, t)
2235
+ onClick: (t) => ne(e.value, t)
2010
2236
  }, [u(c, {
2011
2237
  name: e.icon,
2012
- size: 16
2013
- }, null, 8, ["name"]), l(E(D(m)(`campus.mode.${e.value}`)), 1)], 10, Mn)), 64))], 8, jn)]),
2014
- D(p).primaryLocked ? a("v-if", !0) : (y(), o("section", Nn, [
2015
- s("h3", Pn, [s("span", null, E(D(m)("campus.settings.themeColor")), 1)]),
2238
+ size: 16,
2239
+ "aria-hidden": "true"
2240
+ }, null, 8, ["name"]), l(E(D(m)(`campus.mode.${e.value}`)), 1)], 10, Xn)), 64))], 8, Yn)]),
2241
+ D(p).primaryLocked ? a("v-if", !0) : (y(), o("section", Zn, [
2242
+ s("div", Qn, [s("h3", $n, E(D(m)("campus.settings.themeColor")), 1), s("span", er, [D(p).userPrimary ? a("v-if", !0) : (y(), o("span", tr, E(D(m)("campus.settings.siteDefault")), 1)), s("code", null, E(B.value), 1)])]),
2016
2243
  s("div", {
2017
2244
  class: "ca-settings__swatches",
2018
- role: "radiogroup",
2245
+ role: "group",
2019
2246
  "aria-label": D(m)("campus.settings.themeColor")
2020
- }, [(y(), o(e, null, S(I, (e) => s("button", {
2247
+ }, [(y(), o(e, null, S(te, (e) => s("button", {
2021
2248
  key: e,
2022
2249
  type: "button",
2023
- role: "radio",
2024
- class: h(["ca-settings__swatch", { "is-active": D(p).userPrimary?.toLowerCase() === e }]),
2025
- style: g({ background: e }),
2250
+ class: "ca-settings__swatch",
2026
2251
  "aria-label": e,
2027
- "aria-checked": D(p).userPrimary?.toLowerCase() === e,
2252
+ title: e,
2253
+ "aria-pressed": V.value === e,
2028
2254
  onClick: (t) => D(p).setPrimary(e)
2029
- }, null, 14, In)), 64)), s("label", {
2030
- class: "ca-settings__swatch is-custom",
2031
- title: D(m)("campus.settings.themeColorCustom")
2032
- }, [s("input", {
2033
- type: "color",
2034
- value: L.value,
2035
- "aria-label": D(m)("campus.settings.themeColorCustom"),
2036
- onInput: n[5] ||= (e) => D(p).setPrimary(e.target.value)
2037
- }, null, 40, Rn)], 8, Ln)], 8, Fn),
2038
- s("button", {
2255
+ }, [s("span", {
2256
+ class: "ca-settings__chip",
2257
+ style: g({ background: e }),
2258
+ "aria-hidden": "true"
2259
+ }, null, 4), V.value === e ? (y(), i(c, {
2260
+ key: 0,
2261
+ name: "check",
2262
+ size: 14,
2263
+ "aria-hidden": "true"
2264
+ })) : a("v-if", !0)], 8, rr)), 64))], 8, nr),
2265
+ s("div", ir, [s("label", ar, [
2266
+ u(c, {
2267
+ name: "brush",
2268
+ size: 16,
2269
+ "aria-hidden": "true"
2270
+ }),
2271
+ l(" " + E(D(m)("campus.settings.themeColorCustom")) + " ", 1),
2272
+ s("input", {
2273
+ type: "color",
2274
+ value: B.value,
2275
+ "aria-label": D(m)("campus.settings.themeColorCustom"),
2276
+ onInput: n[5] ||= (e) => D(p).setPrimary(e.target.value)
2277
+ }, null, 40, or)
2278
+ ]), s("button", {
2039
2279
  type: "button",
2040
2280
  class: "ca-settings__reset",
2041
2281
  disabled: !D(p).userPrimary,
2042
2282
  onClick: n[6] ||= (e) => D(p).setPrimary(void 0)
2043
- }, E(D(m)("campus.settings.themeColorReset")), 9, zn)
2283
+ }, E(D(m)("campus.settings.themeColorReset")), 9, sr)])
2044
2284
  ])),
2045
- s("section", Bn, [s("h3", Vn, [s("span", null, E(D(m)("campus.settings.boxStyle")), 1)]), s("div", {
2046
- class: "ca-settings__segment",
2047
- role: "radiogroup",
2285
+ s("section", cr, [s("h3", lr, E(D(m)("campus.settings.boxStyle")), 1), s("div", {
2286
+ class: "ca-settings__segment ca-settings__boxes",
2287
+ role: "group",
2048
2288
  "aria-label": D(m)("campus.settings.boxStyle")
2049
- }, [(y(), o(e, null, S(k, (e) => s("button", {
2289
+ }, [(y(), o(e, null, S(P, (e) => s("button", {
2050
2290
  key: e.value,
2051
2291
  type: "button",
2052
- role: "radio",
2053
- "aria-checked": D(p).boxStyle === e.value,
2292
+ "aria-pressed": D(p).boxStyle === e.value,
2054
2293
  class: h({ "is-active": D(p).boxStyle === e.value }),
2055
2294
  onClick: (t) => D(p).setBoxStyle(e.value)
2056
- }, E(D(m)(e.label)), 11, Un)), 64))], 8, Hn)])
2295
+ }, [s("span", {
2296
+ class: h(["ca-settings__box-sample", `is-${e.value}`]),
2297
+ "aria-hidden": "true"
2298
+ }, [...n[12] ||= [s("span", null, null, -1)]], 2), l(" " + E(D(m)(e.label)), 1)], 10, dr)), 64))], 8, ur)])
2057
2299
  ]),
2058
2300
  _: 1
2059
2301
  }, 8, ["modelValue", "title"])
2060
2302
  ]);
2061
2303
  };
2062
2304
  }
2063
- }), [["__scopeId", "data-v-d0a9b424"]]), Gn = {
2305
+ }), [["__scopeId", "data-v-9af060a7"]]), pr = {
2064
2306
  key: 0,
2065
2307
  class: "ca-page-header"
2066
- }, Kn = { class: "ca-page-header__top" }, qn = { class: "ca-page-header__crumb" }, Jn = ["title", "aria-label"], Yn = { class: "ca-page-header__date" }, Xn = /*#__PURE__*/ X(/* @__PURE__ */ d({
2308
+ }, mr = { class: "ca-page-header__top" }, hr = { class: "ca-page-header__crumb" }, gr = ["title", "aria-label"], _r = ["title"], vr = { class: "ca-page-header__date" }, yr = /*#__PURE__*/ Z(/* @__PURE__ */ d({
2067
2309
  __name: "PageHeader",
2068
2310
  setup(t) {
2069
- let r = U(), { t: c, label: d, locale: f } = K(), p = ft(), m = new Map(je(q().menus).map((e) => [e.key, e])), h = n(() => r.meta.pageKey ? m.get(r.meta.pageKey) : void 0), g = n(() => {
2070
- let e = h.value ? ke(h.value.key) : void 0;
2311
+ let r = W(), { t: c, label: d, locale: f } = q(), p = gt(), m = new Map(Pe(J().menus).map((e) => [e.key, e])), h = n(() => r.meta.pageKey ? m.get(r.meta.pageKey) : void 0), g = n(() => {
2312
+ let e = h.value ? Me(h.value.key) : void 0;
2071
2313
  if (!e) return [];
2072
2314
  let t = e.titles.map((e) => d(e));
2073
2315
  return h.value?.affix ? t.filter((e, n) => e !== t[n - 1]) : t;
2074
- }), v = x(/* @__PURE__ */ new Date()), b = setInterval(() => v.value = /* @__PURE__ */ new Date(), 6e4);
2075
- _(() => clearInterval(b));
2076
- let C = n(() => {
2077
- let e = v.value;
2316
+ }), v = n(() => h.value?.tip ? d(h.value.tip) : ""), b = x(/* @__PURE__ */ new Date()), C = setInterval(() => b.value = /* @__PURE__ */ new Date(), 6e4);
2317
+ _(() => clearInterval(C));
2318
+ let T = n(() => {
2319
+ let e = b.value;
2078
2320
  if (f.value === "zh-CN") {
2079
2321
  let t = new Intl.DateTimeFormat("zh-CN", { weekday: "long" }).format(e);
2080
2322
  return `${e.getFullYear()} 年 ${e.getMonth() + 1} 月 ${e.getDate()} 日 · ${t}`;
@@ -2083,49 +2325,57 @@ var Gt = {
2083
2325
  });
2084
2326
  return (t, n) => {
2085
2327
  let r = w("ca-icon"), d = w("ca-breadcrumb-item"), f = w("ca-breadcrumb");
2086
- return h.value ? (y(), o("header", Gn, [s("div", Kn, [s("div", qn, [
2087
- u(r, {
2088
- name: "location",
2089
- class: "ca-page-header__icon"
2090
- }),
2091
- s("span", null, E(D(c)("campus.breadcrumb.current")), 1),
2092
- u(f, { separator: ">" }, {
2093
- default: M(() => [(y(!0), o(e, null, S(g.value, (e, t) => (y(), i(d, { key: t }, {
2094
- default: M(() => [l(E(e), 1)]),
2095
- _: 2
2096
- }, 1024))), 128))]),
2097
- _: 1
2098
- }),
2099
- a(" 刷新当前页面:重新创建页面组件,等于重新进入 "),
2100
- s("button", {
2101
- type: "button",
2102
- class: "ca-page-header__refresh",
2103
- title: D(c)("campus.tabs.refresh"),
2104
- "aria-label": D(c)("campus.tabs.refresh"),
2105
- onClick: n[0] ||= (e) => h.value && D(p).refresh(h.value.key)
2106
- }, [u(r, { name: "refresh" })], 8, Jn)
2107
- ]), s("time", Yn, E(C.value), 1)])])) : a("v-if", !0);
2328
+ return h.value ? (y(), o("header", pr, [s("div", mr, [
2329
+ s("div", hr, [
2330
+ u(r, {
2331
+ name: "location",
2332
+ class: "ca-page-header__icon"
2333
+ }),
2334
+ s("span", null, E(D(c)("campus.breadcrumb.current")), 1),
2335
+ u(f, { separator: ">" }, {
2336
+ default: N(() => [(y(!0), o(e, null, S(g.value, (e, t) => (y(), i(d, { key: t }, {
2337
+ default: N(() => [l(E(e), 1)]),
2338
+ _: 2
2339
+ }, 1024))), 128))]),
2340
+ _: 1
2341
+ }),
2342
+ a(" 刷新当前页面:重新创建页面组件,等于重新进入 "),
2343
+ s("button", {
2344
+ type: "button",
2345
+ class: "ca-page-header__refresh",
2346
+ title: D(c)("campus.tabs.refresh"),
2347
+ "aria-label": D(c)("campus.tabs.refresh"),
2348
+ onClick: n[0] ||= (e) => h.value && D(p).refresh(h.value.key)
2349
+ }, [u(r, { name: "refresh" })], 8, gr)
2350
+ ]),
2351
+ v.value ? (y(), o("span", {
2352
+ key: 0,
2353
+ class: "ca-page-header__tip",
2354
+ title: v.value
2355
+ }, E(v.value), 9, _r)) : a("v-if", !0),
2356
+ s("time", vr, E(T.value), 1)
2357
+ ])])) : a("v-if", !0);
2108
2358
  };
2109
2359
  }
2110
- }), [["__scopeId", "data-v-e0f9b42f"]]), Zn = {
2360
+ }), [["__scopeId", "data-v-b71acbe5"]]), br = {
2111
2361
  key: 0,
2112
2362
  class: "ca-page-header__titles"
2113
- }, Qn = { class: "ca-page-header__title" }, $n = ["title"], er = /*#__PURE__*/ X(/* @__PURE__ */ d({
2363
+ }, xr = { class: "ca-page-header__title" }, Sr = ["title"], Cr = /*#__PURE__*/ Z(/* @__PURE__ */ d({
2114
2364
  __name: "PageTitle",
2115
2365
  setup(e) {
2116
- let t = U(), { label: r } = K(), i = new Map(je(q().menus).map((e) => [e.key, e])), c = n(() => t.meta.pageKey ? i.get(t.meta.pageKey) : void 0), l = n(() => c.value?.pageHeader ?? q().pageHeader ?? !0), u = n(() => c.value ? r(c.value.title) : ""), d = n(() => c.value?.description ? r(c.value.description) : "");
2366
+ let t = W(), { label: r } = q(), i = new Map(Pe(J().menus).map((e) => [e.key, e])), c = n(() => t.meta.pageKey ? i.get(t.meta.pageKey) : void 0), l = n(() => c.value?.pageHeader ?? J().pageHeader ?? !0), u = n(() => c.value ? r(c.value.title) : ""), d = n(() => c.value?.description ? r(c.value.description) : "");
2117
2367
  return (e, t) => c.value ? (y(), o("header", {
2118
2368
  key: 0,
2119
2369
  class: h(["ca-page-header__main", { "is-title-hidden": !l.value }])
2120
2370
  }, [
2121
- l.value ? (y(), o("div", Zn, [
2122
- s("h2", Qn, E(u.value), 1),
2371
+ l.value ? (y(), o("div", br, [
2372
+ s("h2", xr, E(u.value), 1),
2123
2373
  a(" 说明和标题同一行,放不下时省略;窗口较矮时直接隐藏,把高度留给内容 "),
2124
2374
  d.value ? (y(), o("p", {
2125
2375
  key: 0,
2126
2376
  class: "ca-page-header__desc",
2127
2377
  title: d.value
2128
- }, E(d.value), 9, $n)) : a("v-if", !0)
2378
+ }, E(d.value), 9, Sr)) : a("v-if", !0)
2129
2379
  ])) : a("v-if", !0),
2130
2380
  a(" 页面通过 <ca-page-actions> 把按钮放到这里 "),
2131
2381
  t[0] ||= s("div", {
@@ -2134,112 +2384,112 @@ var Gt = {
2134
2384
  }, null, -1)
2135
2385
  ], 2)) : a("v-if", !0);
2136
2386
  }
2137
- }), [["__scopeId", "data-v-98ee1b64"]]), tr = ["aria-label"], nr = ["onClick"], rr = { class: "ca-side__rail-list" }, ir = ["aria-current", "title"], ar = [
2387
+ }), [["__scopeId", "data-v-22464957"]]), wr = ["aria-label"], Tr = ["onClick"], Er = { class: "ca-side__rail-list" }, Dr = ["aria-current", "title"], Or = [
2138
2388
  "aria-current",
2139
2389
  "aria-expanded",
2140
2390
  "title",
2141
2391
  "onClick"
2142
- ], or = {
2392
+ ], kr = {
2143
2393
  key: 0,
2144
2394
  class: "ca-side__badge"
2145
- }, sr = { class: "ca-side__tools" }, cr = [
2395
+ }, Ar = { class: "ca-side__tools" }, jr = [
2146
2396
  "title",
2147
2397
  "aria-label",
2148
2398
  "aria-pressed"
2149
- ], lr = [
2399
+ ], Mr = [
2150
2400
  "title",
2151
2401
  "aria-label",
2152
2402
  "aria-expanded"
2153
- ], ur = ["title", "aria-label"], dr = ["inert"], fr = { class: "ca-side__panel-inner" }, pr = {
2403
+ ], Nr = ["title", "aria-label"], Pr = ["inert"], Fr = { class: "ca-side__panel-inner" }, Ir = {
2154
2404
  key: 0,
2155
2405
  class: "ca-side__title"
2156
- }, mr = { class: "ca-side__group-label" }, hr = {
2406
+ }, Lr = { class: "ca-side__group-label" }, Rr = {
2157
2407
  key: 1,
2158
2408
  class: "ca-side__group-badge"
2159
- }, gr = /*#__PURE__*/ X(/* @__PURE__ */ d({
2409
+ }, zr = /*#__PURE__*/ Z(/* @__PURE__ */ d({
2160
2410
  __name: "SideMenu",
2161
2411
  setup(t) {
2162
- let r = U(), c = W(), d = Q(), f = Z(), { t: p, label: g } = K(), _ = q(), v = n(() => f.sidePanelCollapsed), b = () => f.toggleSidePanel(), C = x(me("side-text-hidden") === "1");
2412
+ let r = W(), c = G(), d = Q(), f = ft(), { t: p, label: g } = q(), _ = J(), v = n(() => f.sidePanelCollapsed), b = () => f.toggleSidePanel(), C = x(_e("side-text-hidden") === "1");
2163
2413
  function T() {
2164
- C.value = !C.value, G("side-text-hidden", C.value ? "1" : "0");
2414
+ C.value = !C.value, K("side-text-hidden", C.value ? "1" : "0");
2165
2415
  }
2166
2416
  async function O(e) {
2167
- e === "account" ? _.onAccountClick ? await _.onAccountClick("side") : _.accountPath && r.path !== _.accountPath && await c.push(_.accountPath) : (await d.logout(), await c.replace({ name: J(q()).login }));
2417
+ e === "account" ? _.onAccountClick ? await _.onAccountClick("side") : _.accountPath && r.path !== _.accountPath && await c.push(_.accountPath) : (await d.logout(), await c.replace({ name: Y(J()).login }));
2168
2418
  }
2169
- let j = n(() => Ne(_, (e) => d.can(e))), P = n(() => j.value.home), F = n(() => j.value.apps), I = j.value.accountStandalone, L = x(), R = n(() => !!P.value && r.path === P.value.path);
2170
- A(() => [r.path, r.meta.appKey], () => {
2419
+ let k = n(() => Ie(_, (e) => d.can(e))), M = n(() => k.value.home), F = n(() => k.value.apps), I = k.value.accountStandalone, L = x(), R = n(() => !!M.value && r.path === M.value.path);
2420
+ j(() => [r.path, r.meta.appKey], () => {
2171
2421
  L.value = R.value || I && r.path === _.accountPath ? void 0 : r.meta.appKey ?? F.value[0]?.key;
2172
2422
  }, { immediate: !0 });
2173
2423
  let z = n(() => F.value.find((e) => e.key === L.value)), ee = n(() => (f.mode === "phone" ? !f.mobileMenuOpen : f.mode === "pad" ? !f.padPanelOpen : v.value || f.sideHiddenActive) || !z.value?.children.length), te = x();
2174
- A(z, (e) => e?.children.length && (te.value = e), { immediate: !0 });
2424
+ j(z, (e) => e?.children.length && (te.value = e), { immediate: !0 });
2175
2425
  let B = n(() => z.value?.children.length ? z.value : te.value);
2176
2426
  function V(e) {
2177
2427
  let t = typeof e.badge == "function" ? e.badge() : e.badge ?? 0;
2178
2428
  return t > 0 ? t : 0;
2179
2429
  }
2180
2430
  function ne(e) {
2181
- return e.children.reduce((e, t) => e + (Ee(t) ? V(t) : 0), 0);
2431
+ return e.children.reduce((e, t) => e + (ke(t) ? V(t) : 0), 0);
2182
2432
  }
2183
- let H = x(), re = !0;
2184
- function ie(e, t) {
2185
- re || f.setMenuGroup(e, t);
2433
+ let re = x(), H = !0;
2434
+ function U(e, t) {
2435
+ H || f.setMenuGroup(e, t);
2186
2436
  }
2187
- let ae = n(() => Object.keys(f.menuGroups).filter((e) => f.menuGroups[e]));
2188
- A(() => r.meta.groupKey, (e) => {
2437
+ let ie = n(() => Object.keys(f.menuGroups).filter((e) => f.menuGroups[e]));
2438
+ j(() => r.meta.groupKey, (e) => {
2189
2439
  e && f.ensureMenuGroup(e);
2190
- }, { immediate: !0 }), A([
2440
+ }, { immediate: !0 }), j([
2191
2441
  () => f.menuGroups,
2192
2442
  B,
2193
2443
  () => r.path
2194
2444
  ], async () => {
2195
- re = !0, await m();
2196
- for (let e of B.value?.children ?? []) Ee(e) && e.children.length && (f.menuGroups[e.key] ? H.value?.open(e.key) : H.value?.close(e.key));
2197
- re = !1;
2445
+ H = !0, await m();
2446
+ for (let e of B.value?.children ?? []) ke(e) && e.children.length && (f.menuGroups[e.key] ? re.value?.open(e.key) : re.value?.close(e.key));
2447
+ H = !1;
2198
2448
  }, {
2199
2449
  deep: !0,
2200
2450
  immediate: !0
2201
2451
  });
2202
- async function oe(e) {
2452
+ async function ae(e) {
2203
2453
  let t = F.value.find((t) => t.key === e);
2204
2454
  if (!t) return;
2205
2455
  let n = L.value === e;
2206
2456
  L.value = e, await f.clickMenuApp(t, r.path, (e) => c.push(e), n);
2207
2457
  }
2208
- function se(e, t) {
2458
+ function oe(e, t) {
2209
2459
  let n = e.currentTarget, i = e.type === "keydown";
2210
2460
  (n.firstElementChild?.contains(e.target) || i && e.target === n) && (!i || ["Enter", " "].includes(e.key)) && (e.preventDefault(), e.stopPropagation(), f.clickMenuGroup(t, r.path, (e) => c.push(e)));
2211
2461
  }
2212
- let ce = n(() => (_.shortcuts ?? []).filter((e) => d.can(e.permission)));
2213
- function le(e) {
2462
+ let se = n(() => (_.shortcuts ?? []).filter((e) => d.can(e.permission)));
2463
+ function ce(e) {
2214
2464
  f.closeOverlays(), r.path !== e && c.push(e);
2215
2465
  }
2216
2466
  return (t, n) => {
2217
- let c = w("ca-icon"), m = w("ca-dropdown-item"), x = w("ca-dropdown-menu"), A = w("ca-dropdown"), j = w("ca-menu-item"), I = w("ca-sub-menu"), L = w("ca-menu");
2467
+ let c = w("ca-icon"), m = w("ca-dropdown-item"), x = w("ca-dropdown-menu"), k = w("ca-dropdown"), j = w("ca-menu-item"), I = w("ca-sub-menu"), L = w("ca-menu");
2218
2468
  return y(), o(e, null, [a(" 两栏都收起(只在电脑档):整个侧栏向左滑出,第二栏同时收起;不可聚焦由 CaLayout 的 inert 负责 "), s("aside", { class: h(["ca-side", {
2219
2469
  "is-pad-open": D(f).mode === "pad" && D(f).padPanelOpen,
2220
2470
  "is-hidden": D(f).sideHiddenActive,
2221
2471
  "is-text-hidden": C.value
2222
2472
  }]) }, [
2223
- ce.value.length ? (y(), o("nav", {
2473
+ se.value.length ? (y(), o("nav", {
2224
2474
  key: 0,
2225
2475
  class: "ca-side__shortcuts",
2226
2476
  "aria-label": D(p)("campus.header.shortcuts")
2227
- }, [(y(!0), o(e, null, S(ce.value, (e) => (y(), o("button", {
2477
+ }, [(y(!0), o(e, null, S(se.value, (e) => (y(), o("button", {
2228
2478
  key: e.key,
2229
2479
  type: "button",
2230
2480
  class: h({ "is-active": D(r).path === e.path }),
2231
- onClick: (t) => le(e.path)
2232
- }, E(D(g)(e.title)), 11, nr))), 128))], 8, tr)) : a("v-if", !0),
2481
+ onClick: (t) => ce(e.path)
2482
+ }, E(D(g)(e.title)), 11, Tr))), 128))], 8, wr)) : a("v-if", !0),
2233
2483
  s("nav", { class: h(["ca-side__rail", { "is-compact": C.value }]) }, [
2234
2484
  a(" 入口列表单独滚动;底部工具按钮固定在外面,窗口再矮也不会被挤出屏幕 "),
2235
- s("div", rr, [P.value ? (y(), o("button", {
2485
+ s("div", Er, [M.value ? (y(), o("button", {
2236
2486
  key: 0,
2237
2487
  type: "button",
2238
2488
  class: h(["ca-side__rail-item", { "is-active": R.value }]),
2239
2489
  "aria-current": R.value ? "page" : void 0,
2240
- title: C.value ? D(p)("campus.side.home") : void 0,
2241
- onClick: n[0] ||= (e) => le(P.value.path)
2242
- }, [u(c, { name: "home" }), N(s("span", { class: "ca-side__rail-text" }, E(D(p)("campus.side.home")), 513), [[k, !C.value || D(f).mobileMenuOpen]])], 10, ir)) : a("v-if", !0), (y(!0), o(e, null, S(F.value, (e) => (y(), o("button", {
2490
+ title: D(p)("campus.side.home"),
2491
+ onClick: n[0] ||= (e) => ce(M.value.path)
2492
+ }, [u(c, { name: "home" }), P(s("span", { class: "ca-side__rail-text" }, E(D(p)("campus.side.home")), 513), [[A, !C.value || D(f).mobileMenuOpen]])], 10, Dr)) : a("v-if", !0), (y(!0), o(e, null, S(F.value, (e) => (y(), o("button", {
2243
2493
  key: e.key,
2244
2494
  type: "button",
2245
2495
  class: h(["ca-side__rail-item", {
@@ -2248,17 +2498,17 @@ var Gt = {
2248
2498
  }]),
2249
2499
  "aria-current": e.path === D(r).path ? "page" : void 0,
2250
2500
  "aria-expanded": e.children.length ? e.key === z.value?.key && !ee.value : void 0,
2251
- title: C.value ? D(g)(e.title) : void 0,
2252
- onClick: (t) => oe(e.key)
2501
+ title: D(g)(e.title),
2502
+ onClick: (t) => ae(e.key)
2253
2503
  }, [
2254
2504
  u(c, {
2255
2505
  name: e.icon,
2256
2506
  fallback: "grid"
2257
2507
  }, null, 8, ["name"]),
2258
- N(s("span", { class: "ca-side__rail-text" }, E(D(g)(e.title)), 513), [[k, !C.value || D(f).mobileMenuOpen]]),
2259
- ne(e) ? (y(), o("span", or, E(ne(e)), 1)) : a("v-if", !0)
2260
- ], 10, ar))), 128))]),
2261
- s("div", sr, [
2508
+ P(s("span", { class: "ca-side__rail-text" }, E(D(g)(e.title)), 513), [[A, !C.value || D(f).mobileMenuOpen]]),
2509
+ ne(e) ? (y(), o("span", kr, E(ne(e)), 1)) : a("v-if", !0)
2510
+ ], 10, Or))), 128))]),
2511
+ s("div", Ar, [
2262
2512
  s("button", {
2263
2513
  type: "button",
2264
2514
  class: "ca-side__tool",
@@ -2269,7 +2519,7 @@ var Gt = {
2269
2519
  }, [u(c, {
2270
2520
  name: C.value ? "view" : "hide",
2271
2521
  size: 18
2272
- }, null, 8, ["name"])], 8, cr),
2522
+ }, null, 8, ["name"])], 8, jr),
2273
2523
  s("button", {
2274
2524
  type: "button",
2275
2525
  class: "ca-side__tool ca-side__tool--collapse",
@@ -2280,38 +2530,38 @@ var Gt = {
2280
2530
  }, [u(c, {
2281
2531
  name: v.value ? "expand" : "fold",
2282
2532
  size: 18
2283
- }, null, 8, ["name"])], 8, lr),
2284
- u(A, {
2533
+ }, null, 8, ["name"])], 8, Mr),
2534
+ u(k, {
2285
2535
  trigger: "click",
2286
2536
  placement: "right-end",
2287
2537
  onCommand: O
2288
2538
  }, {
2289
- dropdown: M(() => [u(x, null, {
2290
- default: M(() => [D(_).accountEntry?.side !== !1 && (D(_).accountPath || D(_).onAccountClick) ? (y(), i(m, {
2539
+ dropdown: N(() => [u(x, null, {
2540
+ default: N(() => [D(_).accountEntry?.side !== !1 && (D(_).accountPath || D(_).onAccountClick) ? (y(), i(m, {
2291
2541
  key: 0,
2292
2542
  command: "account"
2293
2543
  }, {
2294
- default: M(() => [l(E(D(p)("campus.header.myAccount")), 1)]),
2544
+ default: N(() => [l(E(D(p)("campus.header.myAccount")), 1)]),
2295
2545
  _: 1
2296
2546
  })) : a("v-if", !0), u(m, {
2297
2547
  command: "logout",
2298
2548
  divided: ""
2299
2549
  }, {
2300
- default: M(() => [l(E(D(p)("campus.header.logout")), 1)]),
2550
+ default: N(() => [l(E(D(p)("campus.header.logout")), 1)]),
2301
2551
  _: 1
2302
2552
  })]),
2303
2553
  _: 1
2304
2554
  })]),
2305
- default: M(() => [s("button", {
2555
+ default: N(() => [s("button", {
2306
2556
  type: "button",
2307
2557
  class: "ca-side__tool",
2308
2558
  title: D(d).user?.name,
2309
2559
  "aria-label": D(d).user?.name
2310
- }, [u(un, {
2560
+ }, [u(mn, {
2311
2561
  class: "ca-side__avatar",
2312
2562
  name: D(d).user?.name,
2313
2563
  src: D(d).user?.avatar
2314
- }, null, 8, ["name", "src"])], 8, ur)]),
2564
+ }, null, 8, ["name", "src"])], 8, Nr)]),
2315
2565
  _: 1
2316
2566
  })
2317
2567
  ])
@@ -2323,22 +2573,22 @@ var Gt = {
2323
2573
  "is-empty": !z.value?.children.length
2324
2574
  }]),
2325
2575
  inert: ee.value && !D(f).mobileMenuOpen
2326
- }, [s("div", fr, [
2327
- B.value ? (y(), o("div", pr, E(D(g)(B.value.title)), 1)) : a("v-if", !0),
2576
+ }, [s("div", Fr, [
2577
+ B.value ? (y(), o("div", Ir, E(D(g)(B.value.title)), 1)) : a("v-if", !0),
2328
2578
  a(" key 绑定场景:切换场景时重建菜单,展开状态不会串到别的场景 "),
2329
2579
  (y(), i(L, {
2330
2580
  ref_key: "menuRef",
2331
- ref: H,
2581
+ ref: re,
2332
2582
  key: B.value?.key,
2333
2583
  "default-active": D(r).path,
2334
- "default-openeds": ae.value,
2584
+ "default-openeds": ie.value,
2335
2585
  router: "",
2336
2586
  class: "ca-side__menu",
2337
2587
  onSelect: n[1] ||= (e) => D(f).closeOverlays(),
2338
- onOpen: n[2] ||= (e) => ie(e, !0),
2339
- onClose: n[3] ||= (e) => ie(e, !1)
2588
+ onOpen: n[2] ||= (e) => U(e, !0),
2589
+ onClose: n[3] ||= (e) => U(e, !1)
2340
2590
  }, {
2341
- default: M(() => [(y(!0), o(e, null, S(B.value?.children ?? [], (t) => (y(), o(e, { key: t.key }, [a(" 二级是菜单组:可展开,下面是三级页面 "), D(Ee)(t) && t.children.length ? (y(), i(I, {
2591
+ default: N(() => [(y(!0), o(e, null, S(B.value?.children ?? [], (t) => (y(), o(e, { key: t.key }, [a(" 二级是菜单组:可展开,下面是三级页面 "), D(ke)(t) && t.children.length ? (y(), i(I, {
2342
2592
  key: 0,
2343
2593
  index: t.key,
2344
2594
  tabindex: "0",
@@ -2347,24 +2597,24 @@ var Gt = {
2347
2597
  "is-ancestor": D(r).meta.groupKey === t.key && t.path !== D(r).path
2348
2598
  }),
2349
2599
  "aria-current": t.path === D(r).path ? "page" : void 0,
2350
- onClickCapture: (e) => se(e, t),
2351
- onKeydownCapture: (e) => se(e, t)
2600
+ onClickCapture: (e) => oe(e, t),
2601
+ onKeydownCapture: (e) => oe(e, t)
2352
2602
  }, {
2353
- title: M(() => [s("span", mr, [
2603
+ title: N(() => [s("span", Lr, [
2354
2604
  t.icon ? (y(), i(c, {
2355
2605
  key: 0,
2356
2606
  name: t.icon
2357
2607
  }, null, 8, ["name"])) : a("v-if", !0),
2358
2608
  s("span", null, E(D(g)(t.title)), 1),
2359
- V(t) ? (y(), o("span", hr, E(V(t)), 1)) : a("v-if", !0)
2609
+ V(t) ? (y(), o("span", Rr, E(V(t)), 1)) : a("v-if", !0)
2360
2610
  ])]),
2361
- default: M(() => [(y(!0), o(e, null, S(t.children, (e) => (y(), i(j, {
2611
+ default: N(() => [(y(!0), o(e, null, S(t.children, (e) => (y(), i(j, {
2362
2612
  class: "ca-side__submenu-item",
2363
2613
  key: e.key,
2364
2614
  index: e.path,
2365
2615
  "aria-current": e.path === D(r).path ? "page" : void 0
2366
2616
  }, {
2367
- default: M(() => [e.icon ? (y(), i(c, {
2617
+ default: N(() => [e.icon ? (y(), i(c, {
2368
2618
  key: 0,
2369
2619
  name: e.icon
2370
2620
  }, null, 8, ["name"])) : a("v-if", !0), s("span", null, E(D(g)(e.title)), 1)]),
@@ -2381,7 +2631,7 @@ var Gt = {
2381
2631
  index: t.path,
2382
2632
  "aria-current": t.path === D(r).path ? "page" : void 0
2383
2633
  }, {
2384
- default: M(() => [t.icon ? (y(), i(c, {
2634
+ default: N(() => [t.icon ? (y(), i(c, {
2385
2635
  key: 0,
2386
2636
  name: t.icon
2387
2637
  }, null, 8, ["name"])) : a("v-if", !0), s("span", null, E(D(g)(t.title)), 1)]),
@@ -2389,34 +2639,34 @@ var Gt = {
2389
2639
  }, 1032, ["index", "aria-current"])], 2112))], 64))), 128))]),
2390
2640
  _: 1
2391
2641
  }, 8, ["default-active", "default-openeds"]))
2392
- ])], 10, dr)
2642
+ ])], 10, Pr)
2393
2643
  ], 2)], 2112);
2394
2644
  };
2395
2645
  }
2396
- }), [["__scopeId", "data-v-efa0bb9f"]]), _r = {
2646
+ }), [["__scopeId", "data-v-71272a0f"]]), Br = {
2397
2647
  key: 0,
2398
2648
  class: "ca-copyright"
2399
- }, vr = ["href"], yr = /*#__PURE__*/ X(/* @__PURE__ */ d({
2649
+ }, Vr = ["href"], Hr = /*#__PURE__*/ Z(/* @__PURE__ */ d({
2400
2650
  __name: "CaCopyright",
2401
2651
  setup(t) {
2402
- let r = q().brand, { label: i } = K(), c = n(() => r.copyright ? Ve(i(r.copyright)) : ""), l = n(() => r.copyrightLinks ?? []);
2403
- return (t, n) => c.value ? (y(), o("footer", _r, [s("span", null, E(c.value), 1), (y(!0), o(e, null, S(l.value, (t) => (y(), o(e, { key: t.href }, [n[0] ||= s("span", {
2652
+ let r = J().brand, { label: i } = q(), c = n(() => r.copyright ? We(i(r.copyright)) : ""), l = n(() => r.copyrightLinks ?? []);
2653
+ return (t, n) => c.value ? (y(), o("footer", Br, [s("span", null, E(c.value), 1), (y(!0), o(e, null, S(l.value, (t) => (y(), o(e, { key: t.href }, [n[0] ||= s("span", {
2404
2654
  class: "ca-copyright__dot",
2405
2655
  "aria-hidden": "true"
2406
2656
  }, "·", -1), s("a", {
2407
2657
  href: t.href,
2408
2658
  target: "_blank",
2409
2659
  rel: "noopener noreferrer"
2410
- }, E(t.text), 9, vr)], 64))), 128))])) : a("v-if", !0);
2660
+ }, E(t.text), 9, Vr)], 64))), 128))])) : a("v-if", !0);
2411
2661
  }
2412
- }), [["__scopeId", "data-v-c51879e8"]]), br = { class: "ca-tabs" }, xr = ["onClick"], Sr = { class: "ca-tabs__more" }, Cr = [
2662
+ }), [["__scopeId", "data-v-c51879e8"]]), Ur = { class: "ca-tabs" }, Wr = ["onClick"], Gr = { class: "ca-tabs__more" }, Kr = [
2413
2663
  "title",
2414
2664
  "aria-label",
2415
2665
  "aria-pressed"
2416
- ], wr = /*#__PURE__*/ X(/* @__PURE__ */ d({
2666
+ ], qr = /*#__PURE__*/ Z(/* @__PURE__ */ d({
2417
2667
  __name: "TabsBar",
2418
2668
  setup(t) {
2419
- let r = U(), c = W(), d = ft(), f = Z(), { t: p, label: g } = K(), _ = new Map(je(q().menus).map((e) => [e.key, e])), b = n(() => d.visited.map((e) => _.get(e)).filter((e) => !!e).map((e) => ({
2669
+ let r = W(), c = G(), d = gt(), f = ft(), { t: p, label: g } = q(), _ = new Map(Pe(J().menus).map((e) => [e.key, e])), b = n(() => d.visited.map((e) => _.get(e)).filter((e) => !!e).map((e) => ({
2420
2670
  key: e.key,
2421
2671
  path: e.path,
2422
2672
  title: g(e.title),
@@ -2440,27 +2690,27 @@ var Gt = {
2440
2690
  });
2441
2691
  });
2442
2692
  }
2443
- A([C, () => b.value.length], k), v(k);
2444
- function j(e) {
2693
+ j([C, () => b.value.length], k), v(k);
2694
+ function A(e) {
2445
2695
  let t = d.close(e);
2446
2696
  if (e !== C.value) return;
2447
2697
  let n = t ? _.get(t)?.path : void 0;
2448
2698
  c.push(n ?? "/");
2449
2699
  }
2450
- let N = n(() => {
2700
+ let M = n(() => {
2451
2701
  let e = d.visited.indexOf(C.value ?? "");
2452
2702
  return d.visited.some((t, n) => n < e && !d.affixKeys.includes(t));
2453
- }), F = n(() => {
2703
+ }), P = n(() => {
2454
2704
  let e = d.visited.indexOf(C.value ?? "");
2455
2705
  return e !== -1 && d.visited.some((t, n) => n > e && !d.affixKeys.includes(t));
2456
2706
  });
2457
2707
  function I(e) {
2458
2708
  let t = C.value;
2459
- e === "closeAll" ? (d.closeAll(), c.push(_.get(d.affixKeys[0] ?? "")?.path ?? "/")) : t && (e === "close" ? j(t) : e === "closeLeft" ? d.closeLeft(t) : e === "closeRight" ? d.closeRight(t) : d.closeOthers(t));
2709
+ e === "closeAll" ? (d.closeAll(), c.push(_.get(d.affixKeys[0] ?? "")?.path ?? "/")) : t && (e === "close" ? A(t) : e === "closeLeft" ? d.closeLeft(t) : e === "closeRight" ? d.closeRight(t) : d.closeOthers(t));
2460
2710
  }
2461
2711
  return (t, n) => {
2462
2712
  let r = w("ca-icon"), d = w("ca-dropdown-item"), m = w("ca-dropdown-menu"), g = w("ca-dropdown");
2463
- return y(), o("div", br, [
2713
+ return y(), o("div", Ur, [
2464
2714
  (y(!0), o(e, null, S(T.value, (t) => (y(), o("div", {
2465
2715
  key: t.name,
2466
2716
  ref_for: !0,
@@ -2482,45 +2732,45 @@ var Gt = {
2482
2732
  key: 1,
2483
2733
  name: "close",
2484
2734
  class: "ca-tabs__close",
2485
- onClick: P((t) => j(e.key), ["stop"])
2735
+ onClick: F((t) => A(e.key), ["stop"])
2486
2736
  }, null, 8, ["onClick"])) : a("v-if", !0)
2487
- ], 10, xr))), 128))], 2))), 128)),
2737
+ ], 10, Wr))), 128))], 2))), 128)),
2488
2738
  u(g, {
2489
2739
  trigger: "click",
2490
2740
  onCommand: I
2491
2741
  }, {
2492
- dropdown: M(() => [u(m, null, {
2493
- default: M(() => [
2742
+ dropdown: N(() => [u(m, null, {
2743
+ default: N(() => [
2494
2744
  u(d, { command: "close" }, {
2495
- default: M(() => [l(E(D(p)("campus.tabs.close")), 1)]),
2745
+ default: N(() => [l(E(D(p)("campus.tabs.close")), 1)]),
2496
2746
  _: 1
2497
2747
  }),
2498
- N.value ? (y(), i(d, {
2748
+ M.value ? (y(), i(d, {
2499
2749
  key: 0,
2500
2750
  command: "closeLeft"
2501
2751
  }, {
2502
- default: M(() => [l(E(D(p)("campus.tabs.closeLeft")), 1)]),
2752
+ default: N(() => [l(E(D(p)("campus.tabs.closeLeft")), 1)]),
2503
2753
  _: 1
2504
2754
  })) : a("v-if", !0),
2505
- F.value ? (y(), i(d, {
2755
+ P.value ? (y(), i(d, {
2506
2756
  key: 1,
2507
2757
  command: "closeRight"
2508
2758
  }, {
2509
- default: M(() => [l(E(D(p)("campus.tabs.closeRight")), 1)]),
2759
+ default: N(() => [l(E(D(p)("campus.tabs.closeRight")), 1)]),
2510
2760
  _: 1
2511
2761
  })) : a("v-if", !0),
2512
2762
  u(d, { command: "closeOthers" }, {
2513
- default: M(() => [l(E(D(p)("campus.tabs.closeOthers")), 1)]),
2763
+ default: N(() => [l(E(D(p)("campus.tabs.closeOthers")), 1)]),
2514
2764
  _: 1
2515
2765
  }),
2516
2766
  u(d, { command: "closeAll" }, {
2517
- default: M(() => [l(E(D(p)("campus.tabs.closeAll")), 1)]),
2767
+ default: N(() => [l(E(D(p)("campus.tabs.closeAll")), 1)]),
2518
2768
  _: 1
2519
2769
  })
2520
2770
  ]),
2521
2771
  _: 1
2522
2772
  })]),
2523
- default: M(() => [s("span", Sr, [u(r, { name: "arrowDown" })])]),
2773
+ default: N(() => [s("span", Gr, [u(r, { name: "arrowDown" })])]),
2524
2774
  _: 1
2525
2775
  }),
2526
2776
  a(" 内容全屏:隐藏头部和侧栏,再点一次恢复 "),
@@ -2531,25 +2781,25 @@ var Gt = {
2531
2781
  "aria-label": D(f).contentFullscreen ? D(p)("campus.tabs.exitFullscreen") : D(p)("campus.tabs.fullscreen"),
2532
2782
  "aria-pressed": D(f).contentFullscreen,
2533
2783
  onClick: n[0] ||= (e) => D(f).toggleContentFullscreen()
2534
- }, [u(r, { name: D(f).contentFullscreen ? "exitFullscreen" : "fullscreen" }, null, 8, ["name"])], 8, Cr)
2784
+ }, [u(r, { name: D(f).contentFullscreen ? "exitFullscreen" : "fullscreen" }, null, 8, ["name"])], 8, Kr)
2535
2785
  ]);
2536
2786
  };
2537
2787
  }
2538
- }), [["__scopeId", "data-v-1d7ba823"]]), Tr = 1200, Er = "(max-width: 768px)", Dr = `(min-width: 769px) and (max-width: ${Tr}px)`, Or = ["aria-label"], kr = ["aria-label"], Ar = { class: "ca-main" }, jr = {
2788
+ }), [["__scopeId", "data-v-1d7ba823"]]), Jr = 1200, Yr = "(max-width: 768px)", Xr = `(min-width: 769px) and (max-width: ${Jr}px)`, Zr = ["aria-label"], Qr = ["aria-label"], $r = { class: "ca-main" }, ei = {
2539
2789
  key: 0,
2540
2790
  class: "ca-screen-prompt",
2541
2791
  role: "status"
2542
- }, Mr = { class: "ca-content" }, Nr = { class: "ca-content__page" }, Pr = /*#__PURE__*/ X(/* @__PURE__ */ d({
2792
+ }, ti = { class: "ca-content" }, ni = { class: "ca-content__page" }, ri = /*#__PURE__*/ Z(/* @__PURE__ */ d({
2543
2793
  __name: "CaLayout",
2544
2794
  setup(e) {
2545
- let n = U(), r = ft(), c = Z(), { t: d } = K(), f = window.matchMedia(Er), p = window.matchMedia(Dr), m = "";
2795
+ let n = W(), r = gt(), c = ft(), { t: d } = q(), f = window.matchMedia(Yr), p = window.matchMedia(Xr), m = "";
2546
2796
  function g() {
2547
2797
  let e = f.matches ? "phone" : p.matches ? "pad" : "desktop";
2548
2798
  c.setMode(e);
2549
2799
  }
2550
- g(), A(() => c.mode === "phone" && c.mobileMenuOpen, (e) => {
2800
+ g(), j(() => c.mode === "phone" && c.mobileMenuOpen, (e) => {
2551
2801
  e ? (m = document.body.style.overflow, document.body.style.overflow = "hidden") : document.body.style.overflow = m;
2552
- }), A(() => n.fullPath, () => c.closeOverlays());
2802
+ }), j(() => n.fullPath, () => c.closeOverlays());
2553
2803
  function b(e) {
2554
2804
  e.key === "Escape" && (c.mobileMenuOpen || c.padPanelOpen ? c.closeOverlays() : c.contentFullscreen && c.toggleContentFullscreen());
2555
2805
  }
@@ -2564,212 +2814,261 @@ var Gt = {
2564
2814
  }
2565
2815
  return (e, n) => {
2566
2816
  let f = w("ca-button"), p = w("router-view");
2567
- return y(), o("div", { class: h(["ca-shell", { "is-fullscreen": D(c).contentFullscreen }]) }, [N(u(Wn, null, null, 512), [[k, !D(c).contentFullscreen]]), s("div", { class: h(["ca-body", { "is-fullscreen": D(c).contentFullscreen }]) }, [
2817
+ return y(), o("div", { class: h(["ca-shell", { "is-fullscreen": D(c).contentFullscreen }]) }, [P(u(fr, null, null, 512), [[A, !D(c).contentFullscreen]]), s("div", { class: h(["ca-body", { "is-fullscreen": D(c).contentFullscreen }]) }, [
2568
2818
  D(c).mode === "phone" && D(c).mobileMenuOpen ? (y(), o("button", {
2569
2819
  key: 0,
2570
2820
  type: "button",
2571
2821
  class: "ca-mobile-scrim",
2572
2822
  "aria-label": D(d)("campus.side.closeMenu"),
2573
2823
  onClick: n[0] ||= (e) => D(c).closeMobileMenu()
2574
- }, null, 8, Or)) : a("v-if", !0),
2824
+ }, null, 8, Zr)) : a("v-if", !0),
2575
2825
  D(c).mode === "pad" && D(c).padPanelOpen ? (y(), o("button", {
2576
2826
  key: 1,
2577
2827
  type: "button",
2578
2828
  class: "ca-pad-scrim",
2579
2829
  "aria-label": D(d)("campus.side.closeMenu"),
2580
2830
  onClick: n[1] ||= (e) => D(c).closePadPanel()
2581
- }, null, 8, kr)) : a("v-if", !0),
2831
+ }, null, 8, Qr)) : a("v-if", !0),
2582
2832
  a(" 手机抽屉关闭时、电脑档两栏都收起时,侧栏不在屏幕上,不可聚焦 "),
2583
- N(u(gr, {
2833
+ P(u(zr, {
2584
2834
  class: h({ "is-mobile-open": D(c).mobileMenuOpen }),
2585
2835
  inert: D(c).mode === "phone" && !D(c).mobileMenuOpen || D(c).sideHiddenActive
2586
- }, null, 8, ["class", "inert"]), [[k, !D(c).contentFullscreen]]),
2587
- s("main", Ar, [
2588
- u(wr),
2589
- u(Xn),
2590
- D(c).pageScreenPrompt ? (y(), o("div", jr, [u(f, {
2836
+ }, null, 8, ["class", "inert"]), [[A, !D(c).contentFullscreen]]),
2837
+ s("main", $r, [
2838
+ u(qr),
2839
+ u(yr),
2840
+ D(c).pageScreenPrompt ? (y(), o("div", ei, [u(f, {
2591
2841
  size: "small",
2592
2842
  onClick: n[2] ||= (e) => D(c).retryPageScreen()
2593
2843
  }, {
2594
- default: M(() => [l(E(D(d)("campus.tabs.enterScreen")), 1)]),
2844
+ default: N(() => [l(E(D(d)("campus.tabs.enterScreen")), 1)]),
2595
2845
  _: 1
2596
2846
  }), u(f, {
2597
2847
  size: "small",
2598
2848
  "aria-label": D(d)("campus.tabs.dismissScreen"),
2599
2849
  onClick: n[3] ||= (e) => D(c).dismissPageScreenPrompt()
2600
2850
  }, {
2601
- default: M(() => [l(E(D(d)("campus.tabs.dismissScreen")), 1)]),
2851
+ default: N(() => [l(E(D(d)("campus.tabs.dismissScreen")), 1)]),
2602
2852
  _: 1
2603
2853
  }, 8, ["aria-label"])])) : a("v-if", !0),
2604
- s("div", Mr, [
2605
- u(er),
2854
+ s("div", ti, [
2855
+ u(Cr),
2606
2856
  a(" 页面区撑满剩余高度,版权在其后:内容少时贴窗口底,内容长时滚到最底才出现 "),
2607
- s("div", Nr, [u(p, null, {
2608
- default: M(({ Component: e }) => [a(" include 与标签名单同步;缓存容量包含固定标签。 "), (y(), i(t, {
2857
+ s("div", ni, [u(p, null, {
2858
+ default: N(({ Component: e }) => [a(" include 与标签名单同步;缓存容量包含固定标签。 "), (y(), i(t, {
2609
2859
  include: D(r).cached,
2610
2860
  max: D(r).maxTabs + D(r).affixKeys.length
2611
2861
  }, [e ? (y(), i(T(e), { key: x() })) : a("v-if", !0)], 1032, ["include", "max"]))]),
2612
2862
  _: 1
2613
2863
  })]),
2614
- u(yr)
2864
+ u(Hr)
2615
2865
  ])
2616
2866
  ])
2617
2867
  ], 2)], 2);
2618
2868
  };
2619
2869
  }
2620
- }), [["__scopeId", "data-v-90594751"]]), Fr = { class: "ca-exception" }, Ir = { class: "ca-exception__code" }, Lr = { class: "ca-exception__text" }, Rr = /*#__PURE__*/ X(/* @__PURE__ */ d({
2870
+ }), [["__scopeId", "data-v-90594751"]]), ii = { class: "ca-exception" }, ai = { class: "ca-exception__code" }, oi = { class: "ca-exception__text" }, si = /*#__PURE__*/ Z(/* @__PURE__ */ d({
2621
2871
  __name: "ExceptionPage",
2622
2872
  props: { kind: {} },
2623
2873
  setup(e) {
2624
- let t = e, r = W(), i = Me(q()).home, { t: a } = K(), c = n(() => t.kind === "forbidden" ? "403" : "404"), d = n(() => a(t.kind === "forbidden" ? "campus.error.forbidden" : "campus.error.notFound"));
2874
+ let t = e, r = G(), i = Fe(J()).home, { t: a } = q(), c = n(() => t.kind === "forbidden" ? "403" : "404"), d = n(() => a(t.kind === "forbidden" ? "campus.error.forbidden" : "campus.error.notFound"));
2625
2875
  return (e, t) => {
2626
2876
  let n = w("ca-button");
2627
- return y(), o("div", Fr, [
2628
- s("div", Ir, E(c.value), 1),
2629
- s("p", Lr, E(d.value), 1),
2877
+ return y(), o("div", ii, [
2878
+ s("h1", ai, E(c.value), 1),
2879
+ s("p", oi, E(d.value), 1),
2630
2880
  u(n, {
2631
2881
  type: "primary",
2632
2882
  onClick: t[0] ||= (e) => D(r).replace(D(i))
2633
2883
  }, {
2634
- default: M(() => [l(E(D(a)("campus.error.backHome")), 1)]),
2884
+ default: N(() => [l(E(D(a)("campus.error.backHome")), 1)]),
2635
2885
  _: 1
2636
2886
  })
2637
2887
  ]);
2638
2888
  };
2639
2889
  }
2640
- }), [["__scopeId", "data-v-75a54c8a"]]), zr = { class: "ca-login" }, Br = { class: "ca-login__main" }, Vr = { class: "ca-login__card" }, Hr = { class: "ca-login__brand" }, Ur = ["src"], Wr = { class: "ca-login__name" }, Gr = {
2890
+ }), [["__scopeId", "data-v-c6bc58c6"]]), ci = { class: "ca-login" }, li = { class: "ca-login__main" }, ui = { class: "ca-card ca-login__card" }, di = { class: "ca-login__brand" }, fi = ["src"], pi = { class: "ca-login__name" }, mi = {
2641
2891
  key: 1,
2642
2892
  class: "ca-login__subtitle"
2643
- }, Kr = /*#__PURE__*/ X(/* @__PURE__ */ d({
2893
+ }, hi = ["id"], gi = /*#__PURE__*/ Z(/* @__PURE__ */ d({
2644
2894
  __name: "LoginPage",
2645
- setup(e) {
2646
- let t = U(), r = W(), c = Q(), d = Be(), { t: f, label: p } = K(), m = q().brand, h = n(() => p(d.theme.siteName ?? m.name)), g = n(() => d.theme.logo ?? m.logo), _ = Ue(), v = b({
2895
+ setup(t) {
2896
+ let r = W(), c = G(), d = Q(), f = Ue(), { t: p, label: h } = q(), g = J().brand, _ = n(() => h(f.theme.siteName ?? g.name)), v = n(() => f.theme.logo ?? g.logo), C = Ke(), T = b({
2647
2897
  username: "",
2648
2898
  password: "",
2649
2899
  captcha: ""
2650
- }), S = x(""), C = x(), T = x(), O = x(!1), k = x(""), A = n(() => ({
2900
+ }), k = x(""), A = x([]), j = x(), M = x(!1), P = x(""), I = O(), L = n(() => [
2901
+ {
2902
+ key: "username",
2903
+ label: p("campus.login.username")
2904
+ },
2905
+ {
2906
+ key: "password",
2907
+ label: p("campus.login.password")
2908
+ },
2909
+ ...C.captcha ? [{
2910
+ key: "captcha",
2911
+ label: p("campus.auth.captcha")
2912
+ }] : []
2913
+ ].map((e) => {
2914
+ let t = j.value?.getField(e.key), n = `${I}-${e.key}`, r = t?.validateState === "error" ? t.validateMessage : "";
2915
+ return {
2916
+ ...e,
2917
+ id: n,
2918
+ error: r,
2919
+ errorId: r ? `${n}-error` : void 0
2920
+ };
2921
+ })), R = n(() => ({
2651
2922
  username: [{
2652
2923
  required: !0,
2653
- message: f("campus.login.required", { label: f("campus.login.username") }),
2924
+ message: p("campus.login.required", { label: p("campus.login.username") }),
2654
2925
  trigger: "blur"
2655
2926
  }],
2656
2927
  password: [{
2657
2928
  required: !0,
2658
- message: f("campus.login.required", { label: f("campus.login.password") }),
2929
+ message: p("campus.login.required", { label: p("campus.login.password") }),
2659
2930
  trigger: "blur"
2660
2931
  }],
2661
- captcha: _.captcha ? [{
2932
+ captcha: C.captcha ? [{
2662
2933
  required: !0,
2663
- message: f("campus.auth.captchaRequired"),
2934
+ message: p("campus.auth.captchaRequired"),
2664
2935
  trigger: "blur"
2665
2936
  }] : []
2666
2937
  }));
2667
- async function j() {
2668
- try {
2669
- await T.value?.validate();
2670
- } catch {
2671
- return;
2672
- }
2673
- O.value = !0, k.value = "";
2674
- try {
2675
- await c.login({
2676
- username: v.username,
2677
- password: v.password,
2678
- captcha: _.captcha ? {
2679
- key: S.value,
2680
- code: v.captcha
2681
- } : void 0
2682
- }), await r.replace(We(t.query.redirect));
2683
- } catch (e) {
2684
- k.value = e instanceof Error && e.message ? e.message : f("campus.login.failed"), C.value?.refresh();
2685
- } finally {
2686
- O.value = !1;
2938
+ async function z() {
2939
+ if (!M.value) {
2940
+ P.value = "";
2941
+ try {
2942
+ await j.value?.validate();
2943
+ } catch {
2944
+ await m();
2945
+ let e = L.value.find((e) => e.error);
2946
+ e && document.getElementById(e.id)?.focus();
2947
+ return;
2948
+ }
2949
+ if (!M.value) {
2950
+ M.value = !0;
2951
+ try {
2952
+ await d.login({
2953
+ username: T.username,
2954
+ password: T.password,
2955
+ captcha: C.captcha ? {
2956
+ key: k.value,
2957
+ code: T.captcha
2958
+ } : void 0
2959
+ }), await c.replace(qe(r.query.redirect));
2960
+ } catch (e) {
2961
+ P.value = e instanceof Error && e.message ? e.message : p("campus.login.failed"), A.value[0]?.refresh();
2962
+ } finally {
2963
+ M.value = !1;
2964
+ }
2965
+ }
2687
2966
  }
2688
2967
  }
2689
- return (e, t) => {
2690
- let n = w("ca-alert"), r = w("ca-input"), c = w("ca-form-item"), d = w("ca-button"), b = w("ca-form");
2691
- return y(), o("div", zr, [s("div", Br, [s("div", Vr, [
2692
- s("div", Hr, [
2693
- g.value ? (y(), o("img", {
2968
+ return (t, n) => {
2969
+ let r = w("ca-alert"), c = w("ca-input"), d = w("ca-form-item"), f = w("ca-button"), m = w("ca-form");
2970
+ return y(), o("div", ci, [s("main", li, [s("div", ui, [
2971
+ s("div", di, [
2972
+ v.value ? (y(), o("img", {
2694
2973
  key: 0,
2695
- src: g.value,
2974
+ src: v.value,
2696
2975
  alt: "",
2697
2976
  class: "ca-login__logo"
2698
- }, null, 8, Ur)) : a("v-if", !0),
2699
- s("h1", Wr, E(h.value), 1),
2700
- D(m).subtitle ? (y(), o("p", Gr, E(D(p)(D(m).subtitle)), 1)) : a("v-if", !0)
2977
+ }, null, 8, fi)) : a("v-if", !0),
2978
+ s("h1", pi, E(_.value), 1),
2979
+ D(g).subtitle ? (y(), o("p", mi, E(D(h)(D(g).subtitle)), 1)) : a("v-if", !0)
2701
2980
  ]),
2702
- k.value ? (y(), i(n, {
2981
+ P.value ? (y(), i(r, {
2703
2982
  key: 0,
2704
- title: k.value,
2983
+ title: P.value,
2705
2984
  type: "error",
2706
2985
  "show-icon": "",
2707
2986
  closable: !1,
2708
2987
  class: "ca-login__error"
2709
2988
  }, null, 8, ["title"])) : a("v-if", !0),
2710
- u(b, {
2989
+ u(m, {
2711
2990
  ref_key: "formRef",
2712
- ref: T,
2713
- model: v,
2714
- rules: A.value,
2991
+ ref: j,
2992
+ model: T,
2993
+ rules: R.value,
2715
2994
  size: "large",
2716
- class: "ca-auth-form",
2717
- onSubmit: P(j, ["prevent"])
2995
+ "label-position": "top",
2996
+ "hide-required-asterisk": "",
2997
+ class: "ca-auth-form ca-login__form",
2998
+ onSubmit: F(z, ["prevent"])
2718
2999
  }, {
2719
- default: M(() => [
2720
- u(c, { prop: "username" }, {
2721
- default: M(() => [u(r, {
2722
- modelValue: v.username,
2723
- "onUpdate:modelValue": t[0] ||= (e) => v.username = e,
2724
- placeholder: D(f)("campus.login.username"),
2725
- autocomplete: "username"
2726
- }, null, 8, ["modelValue", "placeholder"])]),
2727
- _: 1
2728
- }),
2729
- u(c, { prop: "password" }, {
2730
- default: M(() => [u(r, {
2731
- modelValue: v.password,
2732
- "onUpdate:modelValue": t[1] ||= (e) => v.password = e,
2733
- type: "password",
2734
- "show-password": "",
2735
- placeholder: D(f)("campus.login.password"),
2736
- autocomplete: "current-password"
2737
- }, null, 8, ["modelValue", "placeholder"])]),
2738
- _: 1
2739
- }),
2740
- D(_).captcha ? (y(), i(c, {
3000
+ default: N(() => [(y(!0), o(e, null, S(L.value, (e) => (y(), i(d, {
3001
+ key: e.key,
3002
+ prop: e.key,
3003
+ label: e.label,
3004
+ for: e.id,
3005
+ "show-message": !1,
3006
+ class: "ca-login__field"
3007
+ }, {
3008
+ default: N(() => [e.key === "captcha" ? (y(), i(wt, {
2741
3009
  key: 0,
2742
- prop: "captcha"
2743
- }, {
2744
- default: M(() => [u(bt, {
2745
- ref_key: "captchaRef",
2746
- ref: C,
2747
- code: v.captcha,
2748
- "onUpdate:code": t[2] ||= (e) => v.captcha = e,
2749
- "captcha-key": S.value,
2750
- "onUpdate:captchaKey": t[3] ||= (e) => S.value = e,
2751
- scene: "login"
2752
- }, null, 8, ["code", "captcha-key"])]),
2753
- _: 1
2754
- })) : a("v-if", !0),
2755
- u(d, {
2756
- type: "primary",
2757
- "native-type": "submit",
2758
- loading: O.value,
2759
- class: "ca-login__submit"
2760
- }, {
2761
- default: M(() => [l(E(D(f)("campus.login.submit")), 1)]),
2762
- _: 1
2763
- }, 8, ["loading"])
2764
- ]),
3010
+ ref_for: !0,
3011
+ ref_key: "captchaFields",
3012
+ ref: A,
3013
+ code: T.captcha,
3014
+ "onUpdate:code": n[0] ||= (e) => T.captcha = e,
3015
+ "captcha-key": k.value,
3016
+ "onUpdate:captchaKey": n[1] ||= (e) => k.value = e,
3017
+ scene: "login",
3018
+ "input-id": e.id,
3019
+ "input-error-id": e.errorId
3020
+ }, null, 8, [
3021
+ "code",
3022
+ "captcha-key",
3023
+ "input-id",
3024
+ "input-error-id"
3025
+ ])) : (y(), i(c, {
3026
+ key: 1,
3027
+ id: e.id,
3028
+ modelValue: T[e.key],
3029
+ "onUpdate:modelValue": (t) => T[e.key] = t,
3030
+ class: "ca-login__input",
3031
+ type: e.key === "password" ? "password" : "text",
3032
+ "show-password": e.key === "password",
3033
+ autocomplete: e.key === "password" ? "current-password" : "username",
3034
+ "aria-invalid": e.error ? "true" : void 0,
3035
+ "aria-describedby": e.errorId
3036
+ }, null, 8, [
3037
+ "id",
3038
+ "modelValue",
3039
+ "onUpdate:modelValue",
3040
+ "type",
3041
+ "show-password",
3042
+ "autocomplete",
3043
+ "aria-invalid",
3044
+ "aria-describedby"
3045
+ ])), e.error ? (y(), o("p", {
3046
+ key: 2,
3047
+ id: e.errorId,
3048
+ class: "ca-login__field-error"
3049
+ }, E(e.error), 9, hi)) : a("v-if", !0)]),
3050
+ _: 2
3051
+ }, 1032, [
3052
+ "prop",
3053
+ "label",
3054
+ "for"
3055
+ ]))), 128)), u(f, {
3056
+ type: "primary",
3057
+ "native-type": "submit",
3058
+ loading: M.value,
3059
+ class: "ca-login__submit"
3060
+ }, {
3061
+ default: N(() => [l(E(D(p)("campus.login.submit")), 1)]),
3062
+ _: 1
3063
+ }, 8, ["loading"])]),
2765
3064
  _: 1
2766
3065
  }, 8, ["model", "rules"])
2767
- ])]), u(yr, { class: "ca-login__copyright" })]);
3066
+ ])]), u(Hr, { class: "ca-login__copyright" })]);
2768
3067
  };
2769
3068
  }
2770
- }), [["__scopeId", "data-v-ddf636fd"]]);
3069
+ }), [["__scopeId", "data-v-163d1aec"]]);
2771
3070
  // packages/core/src/router.ts
2772
- function qr(e) {
3071
+ function _i(e) {
2773
3072
  return async () => {
2774
3073
  let t = await e.component();
2775
3074
  return d({
@@ -2778,17 +3077,17 @@ function qr(e) {
2778
3077
  });
2779
3078
  };
2780
3079
  }
2781
- var Jr = d({
3080
+ var vi = d({
2782
3081
  name: "CaForbidden",
2783
- setup: () => () => f(Rr, { kind: "forbidden" })
2784
- }), Yr = d({
3082
+ setup: () => () => f(si, { kind: "forbidden" })
3083
+ }), yi = d({
2785
3084
  name: "CaNotFound",
2786
- setup: () => () => f(Rr, { kind: "notFound" })
3085
+ setup: () => () => f(si, { kind: "notFound" })
2787
3086
  });
2788
- function Xr(e, t) {
2789
- let n = je(e.menus);
3087
+ function bi(e, t) {
3088
+ let n = Pe(e.menus);
2790
3089
  if (!n.length) throw Error("[campus] 菜单里至少需要一个页面");
2791
- let r = Me(e), i = J(e);
3090
+ let r = Fe(e), i = Y(e);
2792
3091
  if (new Set(Object.values(i)).size !== 5 || n.some((e) => Object.values(i).includes(e.key))) throw Error("[campus] 系统路由名称重复或与页面键冲突,请配置 routeNames");
2793
3092
  for (let e of n) if ([
2794
3093
  r.login,
@@ -2801,24 +3100,24 @@ function Xr(e, t) {
2801
3100
  {
2802
3101
  path: r.login,
2803
3102
  name: i.login,
2804
- component: e.login?.style === "split" ? Pt : Kr,
3103
+ component: e.login?.style === "split" ? Rt : gi,
2805
3104
  meta: { public: !0 }
2806
3105
  },
2807
3106
  {
2808
3107
  path: r.register,
2809
3108
  name: i.register,
2810
- component: tn,
3109
+ component: on,
2811
3110
  meta: { public: !0 }
2812
3111
  },
2813
3112
  {
2814
3113
  path: r.forgot,
2815
3114
  name: i.forgot,
2816
- component: on,
3115
+ component: un,
2817
3116
  meta: { public: !0 }
2818
3117
  },
2819
3118
  {
2820
3119
  path: "/",
2821
- component: Pr,
3120
+ component: ri,
2822
3121
  redirect: n.some((e) => e.path === "/") ? void 0 : () => {
2823
3122
  let e = Q(t);
2824
3123
  return r.home === "/" ? n.find((t) => e.can(t.permission))?.path ?? r.forbidden : r.home;
@@ -2827,7 +3126,7 @@ function Xr(e, t) {
2827
3126
  ...n.map((e) => ({
2828
3127
  path: e.path,
2829
3128
  name: e.key,
2830
- component: qr(e),
3129
+ component: _i(e),
2831
3130
  meta: {
2832
3131
  pageKey: e.key,
2833
3132
  appKey: e.appKey,
@@ -2840,12 +3139,12 @@ function Xr(e, t) {
2840
3139
  {
2841
3140
  path: r.forbidden,
2842
3141
  name: i.forbidden,
2843
- component: Jr
3142
+ component: vi
2844
3143
  },
2845
3144
  {
2846
3145
  path: r.notFound,
2847
3146
  name: i.notFound,
2848
- component: Yr
3147
+ component: yi
2849
3148
  },
2850
3149
  ...r.notFound === "/:pathMatch(.*)*" ? [] : [{
2851
3150
  path: "/:pathMatch(.*)*",
@@ -2853,10 +3152,10 @@ function Xr(e, t) {
2853
3152
  }]
2854
3153
  ]
2855
3154
  }
2856
- ], o = ne({
2857
- history: e.history === "web" ? re() : H(),
3155
+ ], o = re({
3156
+ history: e.history === "web" ? U() : H(),
2858
3157
  routes: a
2859
- }), s = Z(t);
3158
+ }), s = ft(t);
2860
3159
  return o.beforeEach((e, n) => {
2861
3160
  let a = Q(t);
2862
3161
  return e.meta.public ? a.isLoggedIn && e.name === i.login ? { path: r.home } : !0 : a.isLoggedIn ? a.can(e.meta.permission) ? (e.path === n.path && n.matched.length || e.meta.openMode !== "screen" || s.preparePageScreen(), !0) : { name: i.forbidden } : {
@@ -2867,51 +3166,51 @@ function Xr(e, t) {
2867
3166
  if (i) s.cancelPageScreen();
2868
3167
  else {
2869
3168
  if (n.path === r.path && r.matched.length || s.applyPageOpenMode(n.meta.openMode, n.meta.sideCollapse), n.path !== r.path || !r.matched.length) {
2870
- let r = Ne(e, (e) => Q(t).can(e)).apps.find((e) => e.key === n.meta.appKey);
3169
+ let r = Ie(e, (e) => Q(t).can(e)).apps.find((e) => e.key === n.meta.appKey);
2871
3170
  s.enterParentPage(r?.path === n.path && r.children.length ? r.key : void 0, n.meta.openMode == null ? n.meta.sideCollapse === "panel" || n.meta.sideCollapse === "all" : n.meta.openMode !== "normal"), n.meta.groupKey && s.ensureMenuGroup(n.meta.groupKey);
2872
3171
  }
2873
- n.meta.pageKey && ft(t).open(n.meta.pageKey);
3172
+ n.meta.pageKey && gt(t).open(n.meta.pageKey);
2874
3173
  }
2875
3174
  }), o.onError(() => s.cancelPageScreen()), o;
2876
3175
  }
2877
3176
  // packages/core/src/services/login.ts
2878
- async function Zr(e, t, n, r) {
2879
- e.signIn(n), await t.replace(We(r));
3177
+ async function xi(e, t, n, r) {
3178
+ e.signIn(n), await t.replace(qe(r));
2880
3179
  }
2881
3180
  // packages/core/src/services/auth.ts
2882
- var Qr, $r;
2883
- function ei(e, t) {
2884
- Qr = e, $r = t;
3181
+ var Si, Ci;
3182
+ function wi(e, t) {
3183
+ Si = e, Ci = t;
2885
3184
  }
2886
- async function ti(e) {
2887
- if (q(), !Qr || !$r) return;
2888
- let t = Q($r);
3185
+ async function Ti(e) {
3186
+ if (J(), !Si || !Ci) return;
3187
+ let t = Q(Ci);
2889
3188
  if (!t.isLoggedIn) return;
2890
- t.expire(), Gt.toast.warning(e || Ce("campus.auth.sessionExpired"));
2891
- let n = Qr.currentRoute.value;
2892
- n.name !== "login" && await Qr.replace({
2893
- name: J(q()).login,
2894
- query: n.fullPath === Me(q()).home ? void 0 : { redirect: n.fullPath }
3189
+ t.expire(), Yt.toast.warning(e || Ee("campus.auth.sessionExpired"));
3190
+ let n = Si.currentRoute.value;
3191
+ n.name !== "login" && await Si.replace({
3192
+ name: Y(J()).login,
3193
+ query: n.fullPath === Fe(J()).home ? void 0 : { redirect: n.fullPath }
2895
3194
  });
2896
3195
  }
2897
- async function ni(e, t) {
2898
- if (q(), !Qr || !$r) throw Error("[campus] 应用尚未创建,无法完成登录");
2899
- await Zr(Q($r), Qr, e, t);
3196
+ async function Ei(e, t) {
3197
+ if (J(), !Si || !Ci) throw Error("[campus] 应用尚未创建,无法完成登录");
3198
+ await xi(Q(Ci), Si, e, t);
2900
3199
  }
2901
3200
  // packages/core/src/app.ts
2902
- function ri(e) {
2903
- It(e), Oe(e);
2904
- let t = r(Te), n = F();
3201
+ function Di(e) {
3202
+ Bt(e), je(e);
3203
+ let t = r(Oe), n = I();
2905
3204
  t.use(n);
2906
- let i = xe(e);
3205
+ let i = we(e);
2907
3206
  t.use(i);
2908
3207
  let a = (e, t) => i.global.t(e, t ?? {});
2909
- t.provide(R, a), zt(a), t.config.globalProperties.$ca = Gt, L(t), t.component("CaAuthPreview", sn);
2910
- let o = Xr(e, n);
2911
- return ei(o, n), t.use(o), Be(n).boot(), t;
3208
+ t.provide(z, a), Ut(a), t.config.globalProperties.$ca = Yt, R(t), t.component("CaAuthPreview", dn);
3209
+ let o = bi(e, n);
3210
+ return wi(o, n), t.use(o), Ue(n).boot(), t;
2912
3211
  }
2913
3212
  // packages/core/src/index.ts
2914
- function ii(e) {
3213
+ function Oi(e) {
2915
3214
  return e;
2916
3215
  }
2917
- export { Gt as ca, ni as completeLogin, ri as createCampusApp, ii as defineMenus, ti as handleUnauthorized, Ft as resolveEnvironment, Ce as t, K as useCampusT, Z as useLayoutStore, Q as useSessionStore, ft as useTabsStore, Be as useThemeStore };
3216
+ export { Yt as ca, Ei as completeLogin, Di as createCampusApp, Oi as defineMenus, Ti as handleUnauthorized, zt as resolveEnvironment, Ee as t, q as useCampusT, ft as useLayoutStore, Q as useSessionStore, gt as useTabsStore, Ue as useThemeStore };