xto-fronted 0.4.87 → 0.4.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/App.vue.d.ts +2 -0
  2. package/dist/api/auth.d.ts +8 -0
  3. package/dist/api/system.d.ts +16 -0
  4. package/dist/api/user.d.ts +13 -0
  5. package/dist/components/Layout/Footer.vue.d.ts +2 -0
  6. package/dist/components/Layout/Header.vue.d.ts +5 -0
  7. package/dist/components/Layout/MixTopMenu.vue.d.ts +5 -0
  8. package/dist/components/Layout/Sidebar.vue.d.ts +11 -0
  9. package/dist/components/Layout/SidebarMenuItem.vue.d.ts +5 -0
  10. package/dist/components/Layout/Tabs.vue.d.ts +2 -0
  11. package/dist/components/Layout/TopMenu.vue.d.ts +5 -0
  12. package/dist/components/Layout/index.vue.d.ts +2 -0
  13. package/dist/composables/useApp.d.ts +29 -0
  14. package/dist/composables/useAuth.d.ts +6 -0
  15. package/dist/composables/useForm.d.ts +20 -0
  16. package/dist/composables/useI18n.d.ts +30 -0
  17. package/dist/composables/useTable.d.ts +29 -0
  18. package/dist/directives/permission.d.ts +4 -0
  19. package/dist/enums/index.d.ts +32 -0
  20. package/dist/index-BRvi9qW-.js +515 -0
  21. package/dist/index-Bmf0YbVq.js +189 -0
  22. package/dist/index-C2-a5KSQ.js +4233 -0
  23. package/dist/index-D25KzR0I.js +479 -0
  24. package/dist/index-DEYOivza.js +641 -0
  25. package/dist/index.d.ts +59 -0
  26. package/dist/index.es.js +94 -0
  27. package/dist/index.umd.js +8 -0
  28. package/dist/main.d.ts +0 -0
  29. package/dist/router/dynamicRoutes.d.ts +30 -0
  30. package/dist/router/guards.d.ts +17 -0
  31. package/dist/router/index.d.ts +6 -0
  32. package/dist/router/layoutRoute.d.ts +18 -0
  33. package/dist/router/staticRoutes.d.ts +2 -0
  34. package/dist/stores/app.d.ts +93 -0
  35. package/dist/stores/auth.d.ts +41 -0
  36. package/dist/stores/index.d.ts +10 -0
  37. package/dist/stores/locale.d.ts +42 -0
  38. package/dist/stores/menu.d.ts +77 -0
  39. package/dist/stores/user.d.ts +92 -0
  40. package/dist/style.css +1 -0
  41. package/dist/utils/auth.d.ts +27 -0
  42. package/dist/utils/config.d.ts +30 -0
  43. package/dist/utils/permission.d.ts +18 -0
  44. package/dist/utils/request.d.ts +24 -0
  45. package/dist/utils/storage.d.ts +24 -0
  46. package/dist/views/dashboard/index.vue.d.ts +2 -0
  47. package/dist/views/error/403.vue.d.ts +2 -0
  48. package/dist/views/error/404.vue.d.ts +2 -0
  49. package/dist/views/login/index.vue.d.ts +4 -0
  50. package/dist/views/system/menu/index.vue.d.ts +4 -0
  51. package/dist/views/system/role/index.vue.d.ts +4 -0
  52. package/dist/views/system/user/index.vue.d.ts +4 -0
  53. package/package.json +1 -1
@@ -0,0 +1,4233 @@
1
+ import { ref as P, computed as j, watch as Xe, defineComponent as Ae, resolveComponent as Pt, openBlock as w, createBlock as ce, unref as y, withCtx as X, createElementBlock as E, Fragment as he, renderList as ge, createElementVNode as s, toDisplayString as q, createCommentVNode as le, normalizeClass as _e, withDirectives as lt, vShow as Zt, createVNode as z, createTextVNode as Re, onMounted as _t, onUnmounted as wt, vModelText as yt, Transition as Ve, withModifiers as it, normalizeStyle as Ye, reactive as kt, createStaticVNode as nt, withKeys as Qt } from "vue";
2
+ import { defineStore as Je } from "pinia";
3
+ import { useRoute as qe, useRouter as Pe, createRouter as bt, createWebHistory as xt } from "vue-router";
4
+ import { SubMenu as gt, MenuItem as He, Menu as Ct, Tabs as es, TabPane as ts } from "@xto/navigation";
5
+ import { Icon as Z, Button as je } from "@xto/base";
6
+ import { Drawer as Nt, Message as Ie } from "@xto/feedback";
7
+ import { Form as ss, FormItem as mt, Input as Ot, Checkbox as ns } from "@xto/form";
8
+ import os from "axios";
9
+ import { createLocaleProvider as rs, getSupportedLocales as as, useLocale as ls } from "@xto/core/locale";
10
+ const ot = P(""), rt = P(""), at = P("");
11
+ function is(r) {
12
+ r.appId && (ot.value = r.appId), r.clientId && (rt.value = r.clientId), r.apiBaseUrl && (at.value = r.apiBaseUrl);
13
+ }
14
+ function ct() {
15
+ if (ot.value)
16
+ return ot.value;
17
+ try {
18
+ return "";
19
+ } catch {
20
+ return "";
21
+ }
22
+ }
23
+ function zt() {
24
+ if (rt.value)
25
+ return rt.value;
26
+ try {
27
+ return "";
28
+ } catch {
29
+ return "";
30
+ }
31
+ }
32
+ function cs() {
33
+ if (at.value)
34
+ return at.value;
35
+ try {
36
+ return "";
37
+ } catch {
38
+ return "";
39
+ }
40
+ }
41
+ const Da = {
42
+ appId: ot,
43
+ clientId: rt,
44
+ apiBaseUrl: at
45
+ }, Ke = "xto_", Rt = (r) => ({
46
+ get(f) {
47
+ const v = r.getItem(Ke + f);
48
+ if (!v) return null;
49
+ try {
50
+ return JSON.parse(v);
51
+ } catch {
52
+ return v;
53
+ }
54
+ },
55
+ set(f, v) {
56
+ if (v == null) {
57
+ r.removeItem(Ke + f);
58
+ return;
59
+ }
60
+ const p = typeof v == "string" ? v : JSON.stringify(v);
61
+ r.setItem(Ke + f, p);
62
+ },
63
+ remove(f) {
64
+ r.removeItem(Ke + f);
65
+ },
66
+ clear() {
67
+ Object.keys(r).forEach((v) => {
68
+ v.startsWith(Ke) && r.removeItem(v);
69
+ });
70
+ }
71
+ }), et = Rt(window.localStorage), tt = Rt(window.sessionStorage), K = {
72
+ get: et.get,
73
+ set: et.set,
74
+ remove: et.remove,
75
+ clear: et.clear
76
+ }, Fa = {
77
+ get: tt.get,
78
+ set: tt.set,
79
+ remove: tt.remove,
80
+ clear: tt.clear
81
+ }, ze = Je("app", () => {
82
+ const r = P(K.get("appName") || "XTO App"), f = P(K.get("indexPath") || "/dashboard"), v = P(K.get("isDark") || !1), p = P(K.get("theme") || "light"), h = P(K.get("layout") || "sidebar"), b = P(K.get("isCollapsed") || !1), A = P(K.get("showTabs") ?? !0), g = P(K.get("showFooter") ?? !0), S = P(K.get("showBreadcrumb") ?? !0), _ = P(K.get("primaryColor") || "#409eff"), x = P([]), M = P([]), C = j(() => v.value ? "dark" : "light"), G = (D) => {
83
+ r.value = D, K.set("appName", D);
84
+ }, Q = (D) => {
85
+ f.value = D, K.set("indexPath", D);
86
+ }, O = () => {
87
+ v.value = !v.value, p.value = v.value ? "dark" : "light", V();
88
+ }, T = (D) => {
89
+ p.value = D, v.value = D === "dark", V();
90
+ }, V = () => {
91
+ const D = document.documentElement;
92
+ v.value ? D.classList.add("dark") : D.classList.remove("dark"), K.set("isDark", v.value), K.set("theme", p.value);
93
+ }, L = () => {
94
+ b.value = !b.value, K.set("isCollapsed", b.value);
95
+ }, W = (D) => {
96
+ h.value = D, K.set("layout", D);
97
+ }, Y = () => {
98
+ A.value = !A.value, K.set("showTabs", A.value);
99
+ }, oe = () => {
100
+ g.value = !g.value, K.set("showFooter", g.value);
101
+ }, U = () => {
102
+ S.value = !S.value, K.set("showBreadcrumb", S.value);
103
+ }, I = (D) => {
104
+ _.value = D, document.documentElement.style.setProperty("--color-primary", D), K.set("primaryColor", D);
105
+ }, J = (D) => {
106
+ x.value.includes(D) || x.value.push(D);
107
+ }, ee = (D) => {
108
+ const ie = x.value.indexOf(D);
109
+ ie > -1 && x.value.splice(ie, 1);
110
+ }, $ = () => {
111
+ x.value = [];
112
+ }, re = (D) => {
113
+ M.value = D;
114
+ }, te = () => {
115
+ V(), _.value !== "#409eff" && document.documentElement.style.setProperty("--color-primary", _.value);
116
+ };
117
+ return Xe(v, V), {
118
+ appName: r,
119
+ indexPath: f,
120
+ isDark: v,
121
+ theme: p,
122
+ layout: h,
123
+ isCollapsed: b,
124
+ showTabs: A,
125
+ showFooter: g,
126
+ showBreadcrumb: S,
127
+ primaryColor: _,
128
+ cachedViews: x,
129
+ mixSubMenus: M,
130
+ themeClass: C,
131
+ setAppName: G,
132
+ setIndexPath: Q,
133
+ toggleTheme: O,
134
+ toggleCollapse: L,
135
+ setTheme: T,
136
+ setLayout: W,
137
+ toggleTabs: Y,
138
+ toggleFooter: oe,
139
+ toggleBreadcrumb: U,
140
+ setPrimaryColor: I,
141
+ addCachedView: J,
142
+ removeCachedView: ee,
143
+ clearCachedViews: $,
144
+ setMixSubMenus: re,
145
+ initTheme: te
146
+ };
147
+ }), ht = "menu_list", us = {
148
+ menuCode: "home",
149
+ menuName: "首页",
150
+ menuUrl: "/dashboard",
151
+ icon: "home",
152
+ closable: !1,
153
+ isDefault: !1,
154
+ isOut: !1
155
+ }, De = Je("menu", () => {
156
+ const r = P(K.get(ht) || []), f = j(() => r.value.length > 0);
157
+ return {
158
+ menuList: r,
159
+ hasMenu: f,
160
+ setMenuList: (h) => {
161
+ r.value = [us, ...h], K.set(ht, r.value);
162
+ },
163
+ clearMenu: () => {
164
+ r.value = [], K.remove(ht);
165
+ }
166
+ };
167
+ }), Et = "/vite.svg", vt = "user_info", $e = Je("user", () => {
168
+ const r = P(K.get(vt)), f = j(() => !!r.value), v = j(() => {
169
+ var M;
170
+ return ((M = r.value) == null ? void 0 : M.userId) || "";
171
+ }), p = j(() => {
172
+ var M;
173
+ return ((M = r.value) == null ? void 0 : M.userName) || "";
174
+ }), h = j(() => {
175
+ var M;
176
+ return ((M = r.value) == null ? void 0 : M.departmentName) || "";
177
+ }), b = j(() => {
178
+ var M;
179
+ return ((M = r.value) == null ? void 0 : M.email) || "";
180
+ }), A = j(() => {
181
+ var M;
182
+ return ((M = r.value) == null ? void 0 : M.mobilePhone) || "";
183
+ }), g = j(() => {
184
+ var M;
185
+ return ((M = r.value) == null ? void 0 : M.positionName) || "";
186
+ }), S = j(() => {
187
+ var M;
188
+ return ((M = r.value) == null ? void 0 : M.avatar) || "";
189
+ });
190
+ return {
191
+ userInfo: r,
192
+ isLoggedIn: f,
193
+ userId: v,
194
+ userName: p,
195
+ departmentName: h,
196
+ email: b,
197
+ mobilePhone: A,
198
+ positionName: g,
199
+ avatar: S,
200
+ setUserInfo: (M) => {
201
+ r.value = M, K.set(vt, M);
202
+ },
203
+ clearUserInfo: () => {
204
+ r.value = null, K.remove(vt);
205
+ }
206
+ };
207
+ }), $t = "token", St = "token_type", Mt = "refresh_token", Lt = "expires_time", It = "refresh_time", At = "code", ut = () => K.get($t), ds = (r) => {
208
+ K.set($t, r);
209
+ }, fs = () => K.get(St), ps = (r) => {
210
+ K.set(St, r);
211
+ }, Va = () => K.get(Mt), ms = (r) => {
212
+ K.set(Mt, r);
213
+ }, hs = () => K.get(Lt), vs = (r) => {
214
+ K.set(Lt, r);
215
+ }, ja = () => K.get(It), gs = (r) => {
216
+ K.set(It, r);
217
+ }, qa = () => K.get(At), _s = (r) => {
218
+ K.set(At, r);
219
+ }, Dt = (r) => {
220
+ ds(r.access_token), ps(r.token_type || "Bearer"), ms(r.refresh_token), vs(r.expires_time), gs(r.refresh_time), r.code && _s(r.code);
221
+ }, We = () => {
222
+ K.remove($t), K.remove(St), K.remove(Mt), K.remove(Lt), K.remove(It), K.remove(At);
223
+ }, ws = () => {
224
+ const r = hs();
225
+ return r ? Date.now() > r : !0;
226
+ }, Ft = () => !!ut() && !ws(), Ze = Je("auth", () => {
227
+ const r = P(ut()), f = j(() => Ft()), v = P(""), p = P(""), h = P(""), b = P("/login");
228
+ return {
229
+ token: r,
230
+ isLoggedIn: f,
231
+ baseUrl: v,
232
+ appId: p,
233
+ clientId: h,
234
+ loginPath: b,
235
+ login: (C) => {
236
+ r.value = C.access_token, Dt(C);
237
+ },
238
+ logout: () => {
239
+ r.value = null, We();
240
+ },
241
+ setBaseUrl: (C) => {
242
+ v.value = C;
243
+ },
244
+ setAppId: (C) => {
245
+ p.value = C;
246
+ },
247
+ setClientId: (C) => {
248
+ h.value = C;
249
+ },
250
+ setLoginPath: (C) => {
251
+ b.value = C;
252
+ }
253
+ };
254
+ }), ys = { class: "menu-item__content" }, ks = { class: "menu-item__icon" }, bs = {
255
+ key: 1,
256
+ class: "menu-item__char"
257
+ }, xs = { class: "menu-item__text" }, Cs = { class: "menu-item__content" }, Ns = {
258
+ key: 0,
259
+ class: "menu-item__icon"
260
+ }, Es = {
261
+ key: 1,
262
+ class: "menu-item__char"
263
+ }, $s = { class: "menu-item__text" }, Ss = /* @__PURE__ */ Ae({
264
+ __name: "SidebarMenuItem",
265
+ props: {
266
+ menu: {}
267
+ },
268
+ setup(r) {
269
+ const f = r, v = /* @__PURE__ */ new Set([
270
+ "arrow-up",
271
+ "arrow-down",
272
+ "arrow-left",
273
+ "arrow-right",
274
+ "caret-down",
275
+ "caret-right",
276
+ "plus",
277
+ "minus",
278
+ "close",
279
+ "check",
280
+ "edit",
281
+ "delete",
282
+ "copy",
283
+ "download",
284
+ "upload",
285
+ "refresh",
286
+ "search",
287
+ "filter",
288
+ "more",
289
+ "setting",
290
+ "share",
291
+ "loading",
292
+ "info",
293
+ "success",
294
+ "warning",
295
+ "error",
296
+ "question",
297
+ "user",
298
+ "user-add",
299
+ "user-group",
300
+ "logout",
301
+ "login",
302
+ "file",
303
+ "folder",
304
+ "folder-open",
305
+ "document",
306
+ "image",
307
+ "video",
308
+ "music",
309
+ "camera",
310
+ "mail",
311
+ "phone",
312
+ "chat",
313
+ "bell",
314
+ "message",
315
+ "eye",
316
+ "eye-off",
317
+ "calendar",
318
+ "clock",
319
+ "history",
320
+ "timer",
321
+ "location",
322
+ "map",
323
+ "globe",
324
+ "star",
325
+ "heart",
326
+ "thumb-up",
327
+ "link",
328
+ "external-link",
329
+ "lock",
330
+ "unlock",
331
+ "key",
332
+ "home",
333
+ "menu",
334
+ "menu-fold",
335
+ "menu-unfold",
336
+ "sidebar-fold",
337
+ "sidebar-expand",
338
+ "sidebar-left",
339
+ "dashboard",
340
+ "chart",
341
+ "chart-pie",
342
+ "chart-line",
343
+ "report",
344
+ "analytics",
345
+ "system",
346
+ "permission",
347
+ "role",
348
+ "user-manage",
349
+ "log",
350
+ "notification",
351
+ "app",
352
+ "list",
353
+ "grid",
354
+ "fullscreen",
355
+ "fullscreen-exit",
356
+ "zoom-in",
357
+ "zoom-out",
358
+ "print",
359
+ "bookmark",
360
+ "tag",
361
+ "code",
362
+ "terminal",
363
+ "database",
364
+ "server",
365
+ "cloud",
366
+ "gift",
367
+ "moon",
368
+ "sun",
369
+ "theme",
370
+ "skin"
371
+ ]), p = (g) => {
372
+ if (!g || g === "") return "";
373
+ if (g.startsWith("tineco-icon-")) {
374
+ const _ = g.replace("tineco-icon-", "");
375
+ return {
376
+ home: "home",
377
+ dashboard: "dashboard",
378
+ system: "system",
379
+ user: "user",
380
+ role: "role",
381
+ menu: "list",
382
+ setting: "setting",
383
+ file: "file",
384
+ folder: "folder",
385
+ chart: "chart",
386
+ report: "report",
387
+ analytics: "analytics"
388
+ }[_] || _;
389
+ }
390
+ return {
391
+ dashboard: "dashboard",
392
+ system: "system",
393
+ user: "user",
394
+ role: "role",
395
+ menu: "list",
396
+ setting: "setting",
397
+ home: "home",
398
+ chart: "chart",
399
+ report: "report",
400
+ analytics: "analytics",
401
+ permission: "permission",
402
+ log: "log",
403
+ notification: "notification",
404
+ app: "app",
405
+ list: "list",
406
+ grid: "grid"
407
+ }[g] || g;
408
+ }, h = (g) => g ? g.charAt(0) : "", b = (g) => v.has(g), A = j(() => f.menu.children && f.menu.children.length > 0);
409
+ return (g, S) => {
410
+ const _ = Pt("SidebarMenuItem", !0);
411
+ return A.value ? (w(), ce(y(gt), {
412
+ key: 0,
413
+ index: r.menu.menuUrl
414
+ }, {
415
+ title: X(() => [
416
+ s("span", ys, [
417
+ s("span", ks, [
418
+ b(p(r.menu.icon)) ? (w(), ce(y(Z), {
419
+ key: 0,
420
+ name: p(r.menu.icon),
421
+ size: 16
422
+ }, null, 8, ["name"])) : (w(), E("span", bs, q(h(r.menu.menuName)), 1))
423
+ ]),
424
+ s("span", xs, q(r.menu.menuName), 1)
425
+ ])
426
+ ]),
427
+ default: X(() => [
428
+ (w(!0), E(he, null, ge(r.menu.children, (x) => (w(), ce(_, {
429
+ key: x.menuUrl,
430
+ menu: x
431
+ }, null, 8, ["menu"]))), 128))
432
+ ]),
433
+ _: 1
434
+ }, 8, ["index"])) : (w(), ce(y(He), {
435
+ key: 1,
436
+ index: r.menu.menuUrl
437
+ }, {
438
+ default: X(() => [
439
+ s("span", Cs, [
440
+ r.menu.menuName !== "首页" ? (w(), E("span", Ns, [
441
+ b(p(r.menu.icon)) ? (w(), ce(y(Z), {
442
+ key: 0,
443
+ name: p(r.menu.icon),
444
+ size: 16
445
+ }, null, 8, ["name"])) : (w(), E("span", Es, q(h(r.menu.menuName)), 1))
446
+ ])) : le("", !0),
447
+ s("span", $s, q(r.menu.menuName), 1)
448
+ ])
449
+ ]),
450
+ _: 1
451
+ }, 8, ["index"]));
452
+ };
453
+ }
454
+ }), Se = (r, f) => {
455
+ const v = r.__vccOpts || r;
456
+ for (const [p, h] of f)
457
+ v[p] = h;
458
+ return v;
459
+ }, Ms = /* @__PURE__ */ Se(Ss, [["__scopeId", "data-v-d160ae6a"]]), Ls = {
460
+ key: 0,
461
+ class: "sidebar__logo"
462
+ }, Is = {
463
+ key: 1,
464
+ class: "sidebar__user"
465
+ }, As = { class: "sidebar__user-info" }, Ts = { class: "sidebar__user-name" }, Os = { class: "sidebar__user-role" }, Ut = "sidebar_opened_menus", Us = /* @__PURE__ */ Ae({
466
+ __name: "Sidebar",
467
+ props: {
468
+ menuList: { default: () => [] },
469
+ showLogo: { type: Boolean, default: !0 },
470
+ showUser: { type: Boolean, default: !0 }
471
+ },
472
+ setup(r) {
473
+ const f = r, v = qe(), p = Pe(), h = De(), b = $e(), A = Ze(), g = ze(), S = j(() => f.menuList.length > 0 ? f.menuList : h.menuList), _ = j(() => g.isCollapsed), x = j(() => v.path), M = P(K.get(Ut) || []);
474
+ Xe(M, (L) => {
475
+ K.set(Ut, L);
476
+ }, { deep: !0 });
477
+ const C = (L, W, Y = []) => {
478
+ var oe;
479
+ for (const U of L) {
480
+ if (W === U.menuUrl || W.startsWith(U.menuUrl + "/"))
481
+ return [...Y, U.menuUrl];
482
+ if ((oe = U.children) != null && oe.length) {
483
+ const I = C(U.children, W, [...Y, U.menuUrl]);
484
+ if (I) return I;
485
+ }
486
+ }
487
+ return null;
488
+ };
489
+ Xe([() => v.path, S], ([L, W]) => {
490
+ if (W.length > 0) {
491
+ const Y = C(W, L);
492
+ Y ? M.value = Y.slice(0, -1) : M.value = [];
493
+ }
494
+ }, { immediate: !0 });
495
+ const G = j(() => g.isDark ? "#1d1e1f" : "#fff"), Q = j(() => g.isDark ? "#cfd3dc" : "#303133"), O = j(() => "#409eff"), T = (L) => {
496
+ L && L !== v.path && p.push(L);
497
+ }, V = () => {
498
+ A.logout(), b.clearUserInfo(), h.clearMenu(), p.push("/login");
499
+ };
500
+ return (L, W) => (w(), E("div", {
501
+ class: _e(["sidebar", { "sidebar--collapsed": _.value }])
502
+ }, [
503
+ f.showLogo ? (w(), E("div", Ls, [
504
+ W[2] || (W[2] = s("img", {
505
+ src: Et,
506
+ alt: "Logo",
507
+ class: "sidebar__logo-img"
508
+ }, null, -1)),
509
+ lt(s("span", { class: "sidebar__logo-text" }, q(y(g).appName), 513), [
510
+ [Zt, !_.value]
511
+ ])
512
+ ])) : le("", !0),
513
+ z(y(Ct), {
514
+ modelValue: x.value,
515
+ "onUpdate:modelValue": W[0] || (W[0] = (Y) => x.value = Y),
516
+ openeds: M.value,
517
+ "onUpdate:openeds": W[1] || (W[1] = (Y) => M.value = Y),
518
+ mode: "vertical",
519
+ collapse: _.value,
520
+ "collapse-transition": !1,
521
+ "background-color": G.value,
522
+ "text-color": Q.value,
523
+ "active-text-color": O.value,
524
+ class: "sidebar__menu",
525
+ onSelect: T
526
+ }, {
527
+ default: X(() => [
528
+ (w(!0), E(he, null, ge(S.value, (Y) => (w(), ce(Ms, {
529
+ key: Y.menuUrl,
530
+ menu: Y
531
+ }, null, 8, ["menu"]))), 128))
532
+ ]),
533
+ _: 1
534
+ }, 8, ["modelValue", "openeds", "collapse", "background-color", "text-color", "active-text-color"]),
535
+ f.showUser && !_.value ? (w(), E("div", Is, [
536
+ s("div", As, [
537
+ s("span", Ts, q(y(b).userName), 1),
538
+ s("span", Os, q(y(b).departmentName), 1)
539
+ ]),
540
+ z(y(je), {
541
+ type: "text",
542
+ size: "small",
543
+ onClick: V
544
+ }, {
545
+ default: X(() => [...W[3] || (W[3] = [
546
+ Re("退出", -1)
547
+ ])]),
548
+ _: 1
549
+ })
550
+ ])) : le("", !0)
551
+ ], 2));
552
+ }
553
+ }), Bt = /* @__PURE__ */ Se(Us, [["__scopeId", "data-v-3c79a9c4"]]), Bs = { class: "header" }, Ps = { class: "header__left" }, zs = {
554
+ key: 0,
555
+ class: "header__breadcrumb"
556
+ }, Rs = {
557
+ key: 0,
558
+ class: "breadcrumb-separator"
559
+ }, Ds = { class: "header__right" }, Fs = {
560
+ key: 0,
561
+ class: "header__search-dropdown"
562
+ }, Vs = {
563
+ key: 0,
564
+ class: "header__search-results"
565
+ }, js = ["onClick"], qs = {
566
+ key: 0,
567
+ class: "header__search-icon"
568
+ }, Gs = {
569
+ key: 1,
570
+ class: "header__search-char"
571
+ }, Ks = { class: "header__search-item-title" }, Hs = {
572
+ key: 1,
573
+ class: "header__search-item-parent"
574
+ }, Ws = {
575
+ key: 1,
576
+ class: "header__search-empty"
577
+ }, Xs = ["title"], Ys = { class: "header__avatar" }, Js = { class: "header__user-name" }, Zs = {
578
+ key: 0,
579
+ class: "header__dropdown"
580
+ }, Qs = { class: "header__dropdown-header" }, en = { class: "header__dropdown-avatar" }, tn = { class: "header__dropdown-info" }, sn = { class: "header__dropdown-name" }, nn = { class: "header__dropdown-role" }, on = { class: "header__dropdown-menu" }, rn = { class: "settings-drawer" }, an = { class: "settings-section" }, ln = { class: "settings-layout-options" }, cn = ["onClick"], un = { class: "layout-option__preview" }, dn = {
581
+ key: 0,
582
+ class: "layout-preview-sidebar"
583
+ }, fn = {
584
+ key: 1,
585
+ class: "layout-preview-top"
586
+ }, pn = {
587
+ key: 2,
588
+ class: "layout-preview-mix"
589
+ }, mn = { class: "layout-option__label" }, hn = { class: "settings-section" }, vn = { class: "settings-color-options" }, gn = ["title", "onClick"], _n = { class: "settings-section" }, wn = { class: "settings-switch-list" }, yn = { class: "settings-switch-item" }, kn = { class: "settings-switch-item" }, bn = /* @__PURE__ */ Ae({
590
+ __name: "Header",
591
+ setup(r) {
592
+ const f = qe(), v = Pe(), p = ze(), h = $e(), b = Ze(), A = De(), g = P(!1), S = P(!1), _ = P(null), x = P(!1), M = P(!1), C = P(""), G = P(null), Q = P(!1), O = [
593
+ { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
594
+ { value: "top", label: "顶部菜单", icon: "menu" },
595
+ { value: "mix", label: "混合菜单", icon: "grid" }
596
+ ], T = [
597
+ { value: "#409eff", label: "默认蓝" },
598
+ { value: "#1890ff", label: "科技蓝" },
599
+ { value: "#52c41a", label: "极光绿" },
600
+ { value: "#faad14", label: "日落橙" },
601
+ { value: "#f5222d", label: "薄暮红" },
602
+ { value: "#722ed1", label: "酱紫" }
603
+ ], V = j(() => f.matched.filter((B) => B.meta && B.meta.title).map((B) => ({
604
+ title: B.meta.title,
605
+ path: B.path
606
+ }))), L = (H, B = "") => {
607
+ const t = [];
608
+ return H.forEach((e) => {
609
+ e.children && e.children.length > 0 ? t.push(...L(e.children, e.menuName)) : t.push({ ...e, parentTitle: B, title: e.menuName, path: e.menuUrl });
610
+ }), t;
611
+ }, W = /* @__PURE__ */ new Set([
612
+ "arrow-up",
613
+ "arrow-down",
614
+ "arrow-left",
615
+ "arrow-right",
616
+ "caret-down",
617
+ "caret-right",
618
+ "plus",
619
+ "minus",
620
+ "close",
621
+ "check",
622
+ "edit",
623
+ "delete",
624
+ "copy",
625
+ "download",
626
+ "upload",
627
+ "refresh",
628
+ "search",
629
+ "filter",
630
+ "more",
631
+ "setting",
632
+ "share",
633
+ "loading",
634
+ "info",
635
+ "success",
636
+ "warning",
637
+ "error",
638
+ "question",
639
+ "user",
640
+ "user-add",
641
+ "user-group",
642
+ "logout",
643
+ "login",
644
+ "file",
645
+ "folder",
646
+ "folder-open",
647
+ "document",
648
+ "image",
649
+ "video",
650
+ "music",
651
+ "camera",
652
+ "mail",
653
+ "phone",
654
+ "chat",
655
+ "bell",
656
+ "message",
657
+ "eye",
658
+ "eye-off",
659
+ "calendar",
660
+ "clock",
661
+ "history",
662
+ "timer",
663
+ "location",
664
+ "map",
665
+ "globe",
666
+ "star",
667
+ "heart",
668
+ "thumb-up",
669
+ "link",
670
+ "external-link",
671
+ "lock",
672
+ "unlock",
673
+ "key",
674
+ "home",
675
+ "menu",
676
+ "menu-fold",
677
+ "menu-unfold",
678
+ "sidebar-fold",
679
+ "sidebar-expand",
680
+ "sidebar-left",
681
+ "dashboard",
682
+ "chart",
683
+ "chart-pie",
684
+ "chart-line",
685
+ "report",
686
+ "analytics",
687
+ "system",
688
+ "permission",
689
+ "role",
690
+ "user-manage",
691
+ "log",
692
+ "notification",
693
+ "app",
694
+ "list",
695
+ "grid",
696
+ "fullscreen",
697
+ "fullscreen-exit",
698
+ "zoom-in",
699
+ "zoom-out",
700
+ "print",
701
+ "bookmark",
702
+ "tag",
703
+ "code",
704
+ "terminal",
705
+ "database",
706
+ "server",
707
+ "cloud",
708
+ "gift",
709
+ "moon",
710
+ "sun",
711
+ "theme",
712
+ "skin"
713
+ ]), Y = (H) => {
714
+ if (!H || H === "") return "";
715
+ if (H.startsWith("tineco-icon-")) {
716
+ const t = H.replace("tineco-icon-", "");
717
+ return {
718
+ home: "home",
719
+ dashboard: "dashboard",
720
+ system: "system",
721
+ user: "user",
722
+ role: "role",
723
+ menu: "list",
724
+ setting: "setting",
725
+ file: "file",
726
+ folder: "folder",
727
+ chart: "chart",
728
+ report: "report",
729
+ analytics: "analytics"
730
+ }[t] || t;
731
+ }
732
+ return {
733
+ dashboard: "dashboard",
734
+ system: "system",
735
+ user: "user",
736
+ role: "role",
737
+ menu: "list",
738
+ setting: "setting",
739
+ home: "home",
740
+ chart: "chart",
741
+ report: "report",
742
+ analytics: "analytics",
743
+ permission: "permission",
744
+ log: "log",
745
+ notification: "notification",
746
+ app: "app",
747
+ list: "list",
748
+ grid: "grid"
749
+ }[H] || H;
750
+ }, oe = (H) => H ? H.charAt(0) : "", U = (H) => W.has(H), I = j(() => C.value.trim() ? L(A.menuList).filter(
751
+ (B) => B.title.toLowerCase().includes(C.value.toLowerCase())
752
+ ) : []), J = j(() => p.layout), ee = () => {
753
+ p.toggleCollapse();
754
+ }, $ = () => {
755
+ p.toggleTheme();
756
+ }, re = () => {
757
+ S.value = !0;
758
+ }, te = (H) => {
759
+ p.setLayout(H), S.value = !1;
760
+ }, D = (H) => {
761
+ Q.value = H;
762
+ const B = document.documentElement;
763
+ H ? B.classList.add("grey-mode") : B.classList.remove("grey-mode");
764
+ }, ie = () => {
765
+ D(!Q.value), S.value = !1;
766
+ }, de = () => {
767
+ p.toggleTheme(), S.value = !1;
768
+ }, Ce = () => {
769
+ document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
770
+ }, fe = () => {
771
+ x.value = !!document.fullscreenElement;
772
+ }, ke = () => {
773
+ g.value = !g.value;
774
+ }, be = () => {
775
+ g.value = !1;
776
+ }, we = () => {
777
+ M.value = !1, C.value = "";
778
+ }, Te = (H) => {
779
+ v.push(H), we();
780
+ }, Ne = (H) => {
781
+ p.setPrimaryColor(H), S.value = !1;
782
+ }, Oe = () => {
783
+ be(), v.push("/profile");
784
+ }, N = () => {
785
+ be(), v.push("/change-password");
786
+ }, Ue = () => {
787
+ be(), b.logout(), h.clearUserInfo(), A.clearMenu(), v.push("/login");
788
+ }, Be = (H) => {
789
+ _.value && !_.value.contains(H.target) && be(), G.value && !G.value.contains(H.target) && we();
790
+ }, Me = (H) => {
791
+ H.key === "Escape" && (we(), be());
792
+ };
793
+ return _t(() => {
794
+ document.addEventListener("click", Be), document.addEventListener("fullscreenchange", fe), document.addEventListener("keydown", Me), p.initTheme(), Q.value = document.documentElement.classList.contains("grey-mode");
795
+ }), wt(() => {
796
+ document.removeEventListener("click", Be), document.removeEventListener("fullscreenchange", fe), document.removeEventListener("keydown", Me);
797
+ }), (H, B) => {
798
+ var t;
799
+ return w(), E("div", Bs, [
800
+ s("div", Ps, [
801
+ s("div", {
802
+ class: "header__collapse",
803
+ onClick: ee
804
+ }, [
805
+ z(y(Z), {
806
+ name: y(p).isCollapsed ? "menu-unfold" : "menu-fold",
807
+ size: 18
808
+ }, null, 8, ["name"])
809
+ ]),
810
+ y(p).showBreadcrumb ? (w(), E("div", zs, [
811
+ (w(!0), E(he, null, ge(V.value, (e, o) => (w(), E("span", {
812
+ key: e.path
813
+ }, [
814
+ o > 0 ? (w(), E("span", Rs, "/")) : le("", !0),
815
+ s("span", {
816
+ class: _e({ "is-current": o === V.value.length - 1 })
817
+ }, q(e.title), 3)
818
+ ]))), 128))
819
+ ])) : le("", !0)
820
+ ]),
821
+ s("div", Ds, [
822
+ s("div", {
823
+ class: "header__search",
824
+ ref_key: "searchRef",
825
+ ref: G
826
+ }, [
827
+ z(y(Z), {
828
+ name: "search",
829
+ size: 14,
830
+ class: "header__search-icon"
831
+ }),
832
+ lt(s("input", {
833
+ "onUpdate:modelValue": B[0] || (B[0] = (e) => C.value = e),
834
+ type: "text",
835
+ class: "header__search-input",
836
+ placeholder: "搜索菜单...",
837
+ onFocus: B[1] || (B[1] = (e) => M.value = !0)
838
+ }, null, 544), [
839
+ [yt, C.value]
840
+ ]),
841
+ z(Ve, { name: "search-dropdown" }, {
842
+ default: X(() => [
843
+ M.value && (I.value.length > 0 || C.value) ? (w(), E("div", Fs, [
844
+ I.value.length > 0 ? (w(), E("div", Vs, [
845
+ (w(!0), E(he, null, ge(I.value, (e) => (w(), E("div", {
846
+ key: e.path,
847
+ class: "header__search-item",
848
+ onClick: (o) => Te(e.path)
849
+ }, [
850
+ e.title !== "首页" ? (w(), E("span", qs, [
851
+ U(Y(e.icon)) ? (w(), ce(y(Z), {
852
+ key: 0,
853
+ name: Y(e.icon),
854
+ size: 16
855
+ }, null, 8, ["name"])) : (w(), E("span", Gs, q(oe(e.title)), 1))
856
+ ])) : le("", !0),
857
+ s("span", Ks, q(e.title), 1),
858
+ e.parentTitle ? (w(), E("span", Hs, q(e.parentTitle), 1)) : le("", !0)
859
+ ], 8, js))), 128))
860
+ ])) : (w(), E("div", Ws, " 未找到匹配的菜单 "))
861
+ ])) : le("", !0)
862
+ ]),
863
+ _: 1
864
+ })
865
+ ], 512),
866
+ s("div", {
867
+ class: "header__action",
868
+ onClick: Ce,
869
+ title: x.value ? "退出全屏" : "全屏"
870
+ }, [
871
+ z(y(Z), {
872
+ name: x.value ? "fullscreen-exit" : "fullscreen",
873
+ size: 16
874
+ }, null, 8, ["name"])
875
+ ], 8, Xs),
876
+ s("div", {
877
+ class: "header__action",
878
+ onClick: re,
879
+ title: "换肤设置"
880
+ }, [
881
+ z(y(Z), {
882
+ name: "skin",
883
+ size: 16
884
+ })
885
+ ]),
886
+ s("div", {
887
+ class: "header__action",
888
+ onClick: $,
889
+ title: "切换主题"
890
+ }, [
891
+ z(y(Z), {
892
+ name: y(p).isDark ? "sun" : "moon",
893
+ size: 16
894
+ }, null, 8, ["name"])
895
+ ]),
896
+ s("div", {
897
+ class: "header__user",
898
+ ref_key: "dropdownRef",
899
+ ref: _
900
+ }, [
901
+ s("div", {
902
+ class: "header__user-trigger",
903
+ onClick: it(ke, ["stop"])
904
+ }, [
905
+ s("div", Ys, [
906
+ s("span", null, q(((t = y(h).userName) == null ? void 0 : t.charAt(0)) || "U"), 1)
907
+ ]),
908
+ s("span", Js, q(y(h).userName), 1),
909
+ s("span", {
910
+ class: _e(["header__user-arrow", { "is-active": g.value }])
911
+ }, "▼", 2)
912
+ ]),
913
+ z(Ve, { name: "dropdown" }, {
914
+ default: X(() => {
915
+ var e;
916
+ return [
917
+ g.value ? (w(), E("div", Zs, [
918
+ s("div", Qs, [
919
+ s("div", en, [
920
+ s("span", null, q(((e = y(h).userName) == null ? void 0 : e.charAt(0)) || "U"), 1)
921
+ ]),
922
+ s("div", tn, [
923
+ s("div", sn, q(y(h).userName), 1),
924
+ s("div", nn, q(y(h).departmentName), 1)
925
+ ])
926
+ ]),
927
+ B[7] || (B[7] = s("div", { class: "header__dropdown-divider" }, null, -1)),
928
+ s("div", on, [
929
+ s("div", {
930
+ class: "header__dropdown-item",
931
+ onClick: Oe
932
+ }, [
933
+ z(y(Z), {
934
+ name: "user",
935
+ size: 16
936
+ }),
937
+ B[3] || (B[3] = s("span", null, "个人信息", -1))
938
+ ]),
939
+ s("div", {
940
+ class: "header__dropdown-item",
941
+ onClick: N
942
+ }, [
943
+ z(y(Z), {
944
+ name: "lock",
945
+ size: 16
946
+ }),
947
+ B[4] || (B[4] = s("span", null, "修改密码", -1))
948
+ ]),
949
+ B[6] || (B[6] = s("div", { class: "header__dropdown-divider" }, null, -1)),
950
+ s("div", {
951
+ class: "header__dropdown-item header__dropdown-item--danger",
952
+ onClick: Ue
953
+ }, [
954
+ z(y(Z), {
955
+ name: "logout",
956
+ size: 16
957
+ }),
958
+ B[5] || (B[5] = s("span", null, "退出登录", -1))
959
+ ])
960
+ ])
961
+ ])) : le("", !0)
962
+ ];
963
+ }),
964
+ _: 1
965
+ })
966
+ ], 512)
967
+ ]),
968
+ z(y(Nt), {
969
+ modelValue: S.value,
970
+ "onUpdate:modelValue": B[2] || (B[2] = (e) => S.value = e),
971
+ title: "换肤设置",
972
+ direction: "rtl",
973
+ size: "320px"
974
+ }, {
975
+ default: X(() => [
976
+ s("div", rn, [
977
+ s("div", an, [
978
+ B[11] || (B[11] = s("div", { class: "settings-title" }, "布局模式", -1)),
979
+ s("div", ln, [
980
+ (w(), E(he, null, ge(O, (e) => s("div", {
981
+ key: e.value,
982
+ class: _e(["layout-option", { "is-active": J.value === e.value }]),
983
+ onClick: (o) => te(e.value)
984
+ }, [
985
+ s("div", un, [
986
+ e.value === "sidebar" ? (w(), E("div", dn, [...B[8] || (B[8] = [
987
+ s("div", { class: "preview-aside" }, null, -1),
988
+ s("div", { class: "preview-main" }, [
989
+ s("div", { class: "preview-header" }),
990
+ s("div", { class: "preview-content" })
991
+ ], -1)
992
+ ])])) : e.value === "top" ? (w(), E("div", fn, [...B[9] || (B[9] = [
993
+ s("div", { class: "preview-header-full" }, null, -1),
994
+ s("div", { class: "preview-content-full" }, null, -1)
995
+ ])])) : (w(), E("div", pn, [...B[10] || (B[10] = [
996
+ s("div", { class: "preview-header-mix" }, [
997
+ s("div", { class: "preview-mix-left" })
998
+ ], -1),
999
+ s("div", { class: "preview-mix-body" }, [
1000
+ s("div", { class: "preview-mix-aside" }),
1001
+ s("div", { class: "preview-mix-content" })
1002
+ ], -1)
1003
+ ])]))
1004
+ ]),
1005
+ s("span", mn, q(e.label), 1)
1006
+ ], 10, cn)), 64))
1007
+ ])
1008
+ ]),
1009
+ s("div", hn, [
1010
+ B[12] || (B[12] = s("div", { class: "settings-title" }, "主题色", -1)),
1011
+ s("div", vn, [
1012
+ (w(), E(he, null, ge(T, (e) => s("div", {
1013
+ key: e.value,
1014
+ class: _e(["color-option", { "is-active": y(p).primaryColor === e.value }]),
1015
+ style: Ye({ backgroundColor: e.value }),
1016
+ title: e.label,
1017
+ onClick: (o) => Ne(e.value)
1018
+ }, [
1019
+ y(p).primaryColor === e.value ? (w(), ce(y(Z), {
1020
+ key: 0,
1021
+ name: "check",
1022
+ size: 12,
1023
+ color: "#fff"
1024
+ })) : le("", !0)
1025
+ ], 14, gn)), 64))
1026
+ ])
1027
+ ]),
1028
+ s("div", _n, [
1029
+ B[17] || (B[17] = s("div", { class: "settings-title" }, "功能设置", -1)),
1030
+ s("div", wn, [
1031
+ s("div", yn, [
1032
+ B[14] || (B[14] = s("span", null, "灰色模式", -1)),
1033
+ s("div", {
1034
+ class: _e(["switch-wrapper", { "is-checked": Q.value }]),
1035
+ onClick: ie
1036
+ }, [...B[13] || (B[13] = [
1037
+ s("span", { class: "switch-core" }, null, -1)
1038
+ ])], 2)
1039
+ ]),
1040
+ s("div", kn, [
1041
+ B[16] || (B[16] = s("span", null, "暗黑模式", -1)),
1042
+ s("div", {
1043
+ class: _e(["switch-wrapper", { "is-checked": y(p).isDark }]),
1044
+ onClick: de
1045
+ }, [...B[15] || (B[15] = [
1046
+ s("span", { class: "switch-core" }, null, -1)
1047
+ ])], 2)
1048
+ ])
1049
+ ])
1050
+ ])
1051
+ ])
1052
+ ]),
1053
+ _: 1
1054
+ }, 8, ["modelValue"])
1055
+ ]);
1056
+ };
1057
+ }
1058
+ }), xn = /* @__PURE__ */ Se(bn, [["__scopeId", "data-v-89179947"]]), Cn = { class: "top-menu" }, Nn = { class: "top-menu__logo" }, En = { class: "top-menu__logo-text" }, $n = { class: "top-menu__menu-content" }, Sn = {
1059
+ key: 0,
1060
+ class: "top-menu__menu-icon"
1061
+ }, Mn = {
1062
+ key: 1,
1063
+ class: "top-menu__menu-char"
1064
+ }, Ln = { class: "top-menu__menu-text" }, In = { class: "top-menu__menu-content" }, An = { class: "top-menu__menu-icon" }, Tn = {
1065
+ key: 1,
1066
+ class: "top-menu__menu-char"
1067
+ }, On = { class: "top-menu__menu-text" }, Un = { class: "top-menu__menu-content" }, Bn = { class: "top-menu__menu-icon" }, Pn = {
1068
+ key: 1,
1069
+ class: "top-menu__menu-char"
1070
+ }, zn = { class: "top-menu__menu-text" }, Rn = { class: "top-menu__menu-content" }, Dn = { class: "top-menu__menu-icon" }, Fn = {
1071
+ key: 1,
1072
+ class: "top-menu__menu-char"
1073
+ }, Vn = { class: "top-menu__menu-text" }, jn = { class: "top-menu__menu-content" }, qn = {
1074
+ key: 0,
1075
+ class: "top-menu__menu-icon"
1076
+ }, Gn = {
1077
+ key: 1,
1078
+ class: "top-menu__menu-char"
1079
+ }, Kn = { class: "top-menu__menu-text" }, Hn = { class: "top-menu__actions" }, Wn = {
1080
+ key: 0,
1081
+ class: "top-menu__search-dropdown"
1082
+ }, Xn = {
1083
+ key: 0,
1084
+ class: "top-menu__search-results"
1085
+ }, Yn = ["onClick"], Jn = {
1086
+ key: 0,
1087
+ class: "top-menu__search-icon-item"
1088
+ }, Zn = {
1089
+ key: 1,
1090
+ class: "top-menu__search-char"
1091
+ }, Qn = { class: "top-menu__search-item-title" }, eo = {
1092
+ key: 1,
1093
+ class: "top-menu__search-item-parent"
1094
+ }, to = {
1095
+ key: 1,
1096
+ class: "top-menu__search-empty"
1097
+ }, so = ["title"], no = { class: "top-menu__avatar" }, oo = { class: "top-menu__user-name" }, ro = {
1098
+ key: 0,
1099
+ class: "top-menu__dropdown"
1100
+ }, ao = { class: "top-menu__dropdown-header" }, lo = { class: "top-menu__dropdown-avatar" }, io = { class: "top-menu__dropdown-info" }, co = { class: "top-menu__dropdown-name" }, uo = { class: "top-menu__dropdown-role" }, fo = { class: "top-menu__dropdown-menu" }, po = { class: "settings-drawer" }, mo = { class: "settings-section" }, ho = { class: "settings-layout-options" }, vo = ["onClick"], go = { class: "layout-option__preview" }, _o = {
1101
+ key: 0,
1102
+ class: "layout-preview-sidebar"
1103
+ }, wo = {
1104
+ key: 1,
1105
+ class: "layout-preview-top"
1106
+ }, yo = {
1107
+ key: 2,
1108
+ class: "layout-preview-mix"
1109
+ }, ko = { class: "layout-option__label" }, bo = { class: "settings-section" }, xo = { class: "settings-color-options" }, Co = ["title", "onClick"], No = { class: "settings-section" }, Eo = { class: "settings-switch-list" }, $o = { class: "settings-switch-item" }, So = { class: "settings-switch-item" }, Mo = /* @__PURE__ */ Ae({
1110
+ __name: "TopMenu",
1111
+ setup(r) {
1112
+ const f = qe(), v = Pe(), p = De(), h = ze(), b = $e(), A = Ze(), g = j(() => f.path), S = (e, o = "") => {
1113
+ const c = [];
1114
+ return e.forEach((n) => {
1115
+ n.children && n.children.length > 0 ? c.push(...S(n.children, n.menuName)) : c.push({ ...n, parentTitle: o, title: n.menuName, path: n.menuUrl });
1116
+ }), c;
1117
+ }, _ = j(() => W.value.trim() ? S(p.menuList).filter(
1118
+ (o) => o.title.toLowerCase().includes(W.value.toLowerCase())
1119
+ ) : []), x = j(() => h.isDark ? "#1d1e1f" : "#fff"), M = j(() => h.isDark ? "#cfd3dc" : "#303133"), C = j(() => "#409eff"), G = P(!1), Q = P(null), O = P(!1), T = P(!1), V = P(!1), L = P(!1), W = P(""), Y = P(null), oe = (e) => {
1120
+ e && e !== f.path && v.push(e);
1121
+ }, U = /* @__PURE__ */ new Set([
1122
+ "arrow-up",
1123
+ "arrow-down",
1124
+ "arrow-left",
1125
+ "arrow-right",
1126
+ "caret-down",
1127
+ "caret-right",
1128
+ "plus",
1129
+ "minus",
1130
+ "close",
1131
+ "check",
1132
+ "edit",
1133
+ "delete",
1134
+ "copy",
1135
+ "download",
1136
+ "upload",
1137
+ "refresh",
1138
+ "search",
1139
+ "filter",
1140
+ "more",
1141
+ "setting",
1142
+ "share",
1143
+ "loading",
1144
+ "info",
1145
+ "success",
1146
+ "warning",
1147
+ "error",
1148
+ "question",
1149
+ "user",
1150
+ "user-add",
1151
+ "user-group",
1152
+ "logout",
1153
+ "login",
1154
+ "file",
1155
+ "folder",
1156
+ "folder-open",
1157
+ "document",
1158
+ "image",
1159
+ "video",
1160
+ "music",
1161
+ "camera",
1162
+ "mail",
1163
+ "phone",
1164
+ "chat",
1165
+ "bell",
1166
+ "message",
1167
+ "eye",
1168
+ "eye-off",
1169
+ "calendar",
1170
+ "clock",
1171
+ "history",
1172
+ "timer",
1173
+ "location",
1174
+ "map",
1175
+ "globe",
1176
+ "star",
1177
+ "heart",
1178
+ "thumb-up",
1179
+ "link",
1180
+ "external-link",
1181
+ "lock",
1182
+ "unlock",
1183
+ "key",
1184
+ "home",
1185
+ "menu",
1186
+ "menu-fold",
1187
+ "menu-unfold",
1188
+ "sidebar-fold",
1189
+ "sidebar-expand",
1190
+ "sidebar-left",
1191
+ "dashboard",
1192
+ "chart",
1193
+ "chart-pie",
1194
+ "chart-line",
1195
+ "report",
1196
+ "analytics",
1197
+ "system",
1198
+ "permission",
1199
+ "role",
1200
+ "user-manage",
1201
+ "log",
1202
+ "notification",
1203
+ "app",
1204
+ "list",
1205
+ "grid",
1206
+ "fullscreen",
1207
+ "fullscreen-exit",
1208
+ "zoom-in",
1209
+ "zoom-out",
1210
+ "print",
1211
+ "bookmark",
1212
+ "tag",
1213
+ "code",
1214
+ "terminal",
1215
+ "database",
1216
+ "server",
1217
+ "cloud",
1218
+ "gift",
1219
+ "moon",
1220
+ "sun",
1221
+ "theme",
1222
+ "skin"
1223
+ ]), I = (e) => {
1224
+ if (!e || e === "") return "";
1225
+ if (e.startsWith("tineco-icon-")) {
1226
+ const c = e.replace("tineco-icon-", "");
1227
+ return {
1228
+ home: "home",
1229
+ dashboard: "dashboard",
1230
+ system: "system",
1231
+ user: "user",
1232
+ role: "role",
1233
+ menu: "list",
1234
+ setting: "setting",
1235
+ file: "file",
1236
+ folder: "folder",
1237
+ chart: "chart",
1238
+ report: "report",
1239
+ analytics: "analytics"
1240
+ }[c] || c;
1241
+ }
1242
+ return {
1243
+ dashboard: "dashboard",
1244
+ system: "system",
1245
+ user: "user",
1246
+ role: "role",
1247
+ menu: "list",
1248
+ setting: "setting",
1249
+ home: "home",
1250
+ chart: "chart",
1251
+ report: "report",
1252
+ analytics: "analytics",
1253
+ permission: "permission",
1254
+ log: "log",
1255
+ notification: "notification",
1256
+ app: "app",
1257
+ list: "list",
1258
+ grid: "grid"
1259
+ }[e] || e;
1260
+ }, J = (e) => e ? e.charAt(0) : "", ee = (e) => U.has(e), $ = () => {
1261
+ h.toggleTheme(), T.value = !1;
1262
+ }, re = () => {
1263
+ document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1264
+ }, te = () => {
1265
+ O.value = !!document.fullscreenElement;
1266
+ }, D = () => {
1267
+ G.value = !G.value;
1268
+ }, ie = () => {
1269
+ G.value = !1;
1270
+ }, de = () => {
1271
+ L.value = !1, W.value = "";
1272
+ }, Ce = (e) => {
1273
+ v.push(e), de();
1274
+ }, fe = () => {
1275
+ T.value = !0;
1276
+ }, ke = (e) => {
1277
+ V.value = e;
1278
+ const o = document.documentElement;
1279
+ e ? o.classList.add("grey-mode") : o.classList.remove("grey-mode");
1280
+ }, be = () => {
1281
+ ke(!V.value), T.value = !1;
1282
+ }, we = () => {
1283
+ h.toggleTheme(), T.value = !1;
1284
+ }, Te = [
1285
+ { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1286
+ { value: "top", label: "顶部菜单", icon: "menu" },
1287
+ { value: "mix", label: "混合菜单", icon: "grid" }
1288
+ ], Ne = j(() => h.layout), Oe = (e) => {
1289
+ h.setLayout(e), T.value = !1;
1290
+ }, N = [
1291
+ { value: "#409eff", label: "默认蓝" },
1292
+ { value: "#1890ff", label: "科技蓝" },
1293
+ { value: "#52c41a", label: "极光绿" },
1294
+ { value: "#faad14", label: "日落橙" },
1295
+ { value: "#f5222d", label: "薄暮红" },
1296
+ { value: "#722ed1", label: "酱紫" }
1297
+ ], Ue = (e) => {
1298
+ h.setPrimaryColor(e), T.value = !1;
1299
+ }, Be = () => {
1300
+ ie(), v.push("/profile");
1301
+ }, Me = () => {
1302
+ ie(), v.push("/change-password");
1303
+ }, H = () => {
1304
+ ie(), A.logout(), b.clearUserInfo(), p.clearMenu(), v.push("/login");
1305
+ }, B = (e) => {
1306
+ Q.value && !Q.value.contains(e.target) && ie(), Y.value && !Y.value.contains(e.target) && de();
1307
+ }, t = (e) => {
1308
+ e.key === "Escape" && (de(), ie());
1309
+ };
1310
+ return _t(() => {
1311
+ document.addEventListener("click", B), document.addEventListener("fullscreenchange", te), document.addEventListener("keydown", t), V.value = document.documentElement.classList.contains("grey-mode");
1312
+ }), wt(() => {
1313
+ document.removeEventListener("click", B), document.removeEventListener("fullscreenchange", te), document.removeEventListener("keydown", t);
1314
+ }), (e, o) => {
1315
+ var c;
1316
+ return w(), E("div", Cn, [
1317
+ s("div", Nn, [
1318
+ o[3] || (o[3] = s("img", {
1319
+ src: Et,
1320
+ alt: "Logo",
1321
+ class: "top-menu__logo-img"
1322
+ }, null, -1)),
1323
+ s("span", En, q(y(h).appName), 1)
1324
+ ]),
1325
+ z(y(Ct), {
1326
+ "model-value": g.value,
1327
+ mode: "horizontal",
1328
+ "background-color": x.value,
1329
+ "text-color": M.value,
1330
+ "active-text-color": C.value,
1331
+ class: "top-menu__menu",
1332
+ onSelect: oe
1333
+ }, {
1334
+ default: X(() => [
1335
+ (w(!0), E(he, null, ge(y(p).menuList, (n) => (w(), E(he, {
1336
+ key: n.menuUrl
1337
+ }, [
1338
+ n.children && n.children.length > 0 ? (w(), ce(y(gt), {
1339
+ key: 0,
1340
+ index: n.menuUrl
1341
+ }, {
1342
+ title: X(() => [
1343
+ s("span", $n, [
1344
+ n.menuName !== "首页" ? (w(), E("span", Sn, [
1345
+ ee(I(n.icon)) ? (w(), ce(y(Z), {
1346
+ key: 0,
1347
+ name: I(n.icon),
1348
+ size: 16
1349
+ }, null, 8, ["name"])) : (w(), E("span", Mn, q(J(n.menuName)), 1))
1350
+ ])) : le("", !0),
1351
+ s("span", Ln, q(n.menuName), 1)
1352
+ ])
1353
+ ]),
1354
+ default: X(() => [
1355
+ (w(!0), E(he, null, ge(n.children, (a) => (w(), E(he, {
1356
+ key: a.menuUrl
1357
+ }, [
1358
+ a.children && a.children.length > 0 ? (w(), ce(y(gt), {
1359
+ key: 0,
1360
+ index: a.menuUrl
1361
+ }, {
1362
+ title: X(() => [
1363
+ s("span", In, [
1364
+ s("span", An, [
1365
+ ee(I(a.icon)) ? (w(), ce(y(Z), {
1366
+ key: 0,
1367
+ name: I(a.icon),
1368
+ size: 16
1369
+ }, null, 8, ["name"])) : (w(), E("span", Tn, q(J(a.menuName)), 1))
1370
+ ]),
1371
+ s("span", On, q(a.menuName), 1)
1372
+ ])
1373
+ ]),
1374
+ default: X(() => [
1375
+ (w(!0), E(he, null, ge(a.children, (u) => (w(), ce(y(He), {
1376
+ key: u.menuUrl,
1377
+ index: u.menuUrl
1378
+ }, {
1379
+ default: X(() => [
1380
+ s("span", Un, [
1381
+ s("span", Bn, [
1382
+ ee(I(u.icon)) ? (w(), ce(y(Z), {
1383
+ key: 0,
1384
+ name: I(u.icon),
1385
+ size: 16
1386
+ }, null, 8, ["name"])) : (w(), E("span", Pn, q(J(u.menuName)), 1))
1387
+ ]),
1388
+ s("span", zn, q(u.menuName), 1)
1389
+ ])
1390
+ ]),
1391
+ _: 2
1392
+ }, 1032, ["index"]))), 128))
1393
+ ]),
1394
+ _: 2
1395
+ }, 1032, ["index"])) : (w(), ce(y(He), {
1396
+ key: 1,
1397
+ index: a.menuUrl
1398
+ }, {
1399
+ default: X(() => [
1400
+ s("span", Rn, [
1401
+ s("span", Dn, [
1402
+ ee(I(a.icon)) ? (w(), ce(y(Z), {
1403
+ key: 0,
1404
+ name: I(a.icon),
1405
+ size: 16
1406
+ }, null, 8, ["name"])) : (w(), E("span", Fn, q(J(a.menuName)), 1))
1407
+ ]),
1408
+ s("span", Vn, q(a.menuName), 1)
1409
+ ])
1410
+ ]),
1411
+ _: 2
1412
+ }, 1032, ["index"]))
1413
+ ], 64))), 128))
1414
+ ]),
1415
+ _: 2
1416
+ }, 1032, ["index"])) : (w(), ce(y(He), {
1417
+ key: 1,
1418
+ index: n.menuUrl
1419
+ }, {
1420
+ default: X(() => [
1421
+ s("span", jn, [
1422
+ n.menuName !== "首页" ? (w(), E("span", qn, [
1423
+ ee(I(n.icon)) ? (w(), ce(y(Z), {
1424
+ key: 0,
1425
+ name: I(n.icon),
1426
+ size: 16
1427
+ }, null, 8, ["name"])) : (w(), E("span", Gn, q(J(n.menuName)), 1))
1428
+ ])) : le("", !0),
1429
+ s("span", Kn, q(n.menuName), 1)
1430
+ ])
1431
+ ]),
1432
+ _: 2
1433
+ }, 1032, ["index"]))
1434
+ ], 64))), 128))
1435
+ ]),
1436
+ _: 1
1437
+ }, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
1438
+ s("div", Hn, [
1439
+ s("div", {
1440
+ class: "top-menu__search",
1441
+ ref_key: "searchRef",
1442
+ ref: Y
1443
+ }, [
1444
+ z(y(Z), {
1445
+ name: "search",
1446
+ size: 14,
1447
+ class: "top-menu__search-icon"
1448
+ }),
1449
+ lt(s("input", {
1450
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => W.value = n),
1451
+ type: "text",
1452
+ class: "top-menu__search-input",
1453
+ placeholder: "搜索菜单...",
1454
+ onFocus: o[1] || (o[1] = (n) => L.value = !0)
1455
+ }, null, 544), [
1456
+ [yt, W.value]
1457
+ ]),
1458
+ z(Ve, { name: "search-dropdown" }, {
1459
+ default: X(() => [
1460
+ L.value && (_.value.length > 0 || W.value) ? (w(), E("div", Wn, [
1461
+ _.value.length > 0 ? (w(), E("div", Xn, [
1462
+ (w(!0), E(he, null, ge(_.value, (n) => (w(), E("div", {
1463
+ key: n.path,
1464
+ class: "top-menu__search-item",
1465
+ onClick: (a) => Ce(n.path)
1466
+ }, [
1467
+ n.title !== "首页" ? (w(), E("span", Jn, [
1468
+ ee(I(n.icon)) ? (w(), ce(y(Z), {
1469
+ key: 0,
1470
+ name: I(n.icon),
1471
+ size: 16
1472
+ }, null, 8, ["name"])) : (w(), E("span", Zn, q(J(n.title)), 1))
1473
+ ])) : le("", !0),
1474
+ s("span", Qn, q(n.title), 1),
1475
+ n.parentTitle ? (w(), E("span", eo, q(n.parentTitle), 1)) : le("", !0)
1476
+ ], 8, Yn))), 128))
1477
+ ])) : (w(), E("div", to, " 未找到匹配的菜单 "))
1478
+ ])) : le("", !0)
1479
+ ]),
1480
+ _: 1
1481
+ })
1482
+ ], 512),
1483
+ s("div", {
1484
+ class: "top-menu__action",
1485
+ onClick: re,
1486
+ title: O.value ? "退出全屏" : "全屏"
1487
+ }, [
1488
+ z(y(Z), {
1489
+ name: O.value ? "fullscreen-exit" : "fullscreen",
1490
+ size: 16
1491
+ }, null, 8, ["name"])
1492
+ ], 8, so),
1493
+ s("div", {
1494
+ class: "top-menu__action",
1495
+ onClick: fe,
1496
+ title: "换肤设置"
1497
+ }, [
1498
+ z(y(Z), {
1499
+ name: "skin",
1500
+ size: 16
1501
+ })
1502
+ ]),
1503
+ s("div", {
1504
+ class: "top-menu__action",
1505
+ onClick: $,
1506
+ title: "切换主题"
1507
+ }, [
1508
+ z(y(Z), {
1509
+ name: y(h).isDark ? "sun" : "moon",
1510
+ size: 16
1511
+ }, null, 8, ["name"])
1512
+ ]),
1513
+ s("div", {
1514
+ class: "top-menu__user",
1515
+ ref_key: "dropdownRef",
1516
+ ref: Q
1517
+ }, [
1518
+ s("div", {
1519
+ class: "top-menu__user-trigger",
1520
+ onClick: it(D, ["stop"])
1521
+ }, [
1522
+ s("div", no, [
1523
+ s("span", null, q(((c = y(b).userName) == null ? void 0 : c.charAt(0)) || "U"), 1)
1524
+ ]),
1525
+ s("span", oo, q(y(b).userName), 1),
1526
+ s("span", {
1527
+ class: _e(["top-menu__user-arrow", { "is-active": G.value }])
1528
+ }, "▼", 2)
1529
+ ]),
1530
+ z(Ve, { name: "dropdown" }, {
1531
+ default: X(() => {
1532
+ var n;
1533
+ return [
1534
+ G.value ? (w(), E("div", ro, [
1535
+ s("div", ao, [
1536
+ s("div", lo, [
1537
+ s("span", null, q(((n = y(b).userName) == null ? void 0 : n.charAt(0)) || "U"), 1)
1538
+ ]),
1539
+ s("div", io, [
1540
+ s("div", co, q(y(b).userName), 1),
1541
+ s("div", uo, q(y(b).departmentName), 1)
1542
+ ])
1543
+ ]),
1544
+ o[8] || (o[8] = s("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1545
+ s("div", fo, [
1546
+ s("div", {
1547
+ class: "top-menu__dropdown-item",
1548
+ onClick: Be
1549
+ }, [
1550
+ z(y(Z), {
1551
+ name: "user",
1552
+ size: 16
1553
+ }),
1554
+ o[4] || (o[4] = s("span", null, "个人信息", -1))
1555
+ ]),
1556
+ s("div", {
1557
+ class: "top-menu__dropdown-item",
1558
+ onClick: Me
1559
+ }, [
1560
+ z(y(Z), {
1561
+ name: "lock",
1562
+ size: 16
1563
+ }),
1564
+ o[5] || (o[5] = s("span", null, "修改密码", -1))
1565
+ ]),
1566
+ o[7] || (o[7] = s("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1567
+ s("div", {
1568
+ class: "top-menu__dropdown-item top-menu__dropdown-item--danger",
1569
+ onClick: H
1570
+ }, [
1571
+ z(y(Z), {
1572
+ name: "logout",
1573
+ size: 16
1574
+ }),
1575
+ o[6] || (o[6] = s("span", null, "退出登录", -1))
1576
+ ])
1577
+ ])
1578
+ ])) : le("", !0)
1579
+ ];
1580
+ }),
1581
+ _: 1
1582
+ })
1583
+ ], 512)
1584
+ ]),
1585
+ z(y(Nt), {
1586
+ modelValue: T.value,
1587
+ "onUpdate:modelValue": o[2] || (o[2] = (n) => T.value = n),
1588
+ title: "换肤设置",
1589
+ direction: "rtl",
1590
+ size: "320px"
1591
+ }, {
1592
+ default: X(() => [
1593
+ s("div", po, [
1594
+ s("div", mo, [
1595
+ o[12] || (o[12] = s("div", { class: "settings-title" }, "布局模式", -1)),
1596
+ s("div", ho, [
1597
+ (w(), E(he, null, ge(Te, (n) => s("div", {
1598
+ key: n.value,
1599
+ class: _e(["layout-option", { "is-active": Ne.value === n.value }]),
1600
+ onClick: (a) => Oe(n.value)
1601
+ }, [
1602
+ s("div", go, [
1603
+ n.value === "sidebar" ? (w(), E("div", _o, [...o[9] || (o[9] = [
1604
+ s("div", { class: "preview-aside" }, null, -1),
1605
+ s("div", { class: "preview-main" }, [
1606
+ s("div", { class: "preview-header" }),
1607
+ s("div", { class: "preview-content" })
1608
+ ], -1)
1609
+ ])])) : n.value === "top" ? (w(), E("div", wo, [...o[10] || (o[10] = [
1610
+ s("div", { class: "preview-header-full" }, null, -1),
1611
+ s("div", { class: "preview-content-full" }, null, -1)
1612
+ ])])) : (w(), E("div", yo, [...o[11] || (o[11] = [
1613
+ s("div", { class: "preview-header-mix" }, [
1614
+ s("div", { class: "preview-mix-left" })
1615
+ ], -1),
1616
+ s("div", { class: "preview-mix-body" }, [
1617
+ s("div", { class: "preview-mix-aside" }),
1618
+ s("div", { class: "preview-mix-content" })
1619
+ ], -1)
1620
+ ])]))
1621
+ ]),
1622
+ s("span", ko, q(n.label), 1)
1623
+ ], 10, vo)), 64))
1624
+ ])
1625
+ ]),
1626
+ s("div", bo, [
1627
+ o[13] || (o[13] = s("div", { class: "settings-title" }, "主题色", -1)),
1628
+ s("div", xo, [
1629
+ (w(), E(he, null, ge(N, (n) => s("div", {
1630
+ key: n.value,
1631
+ class: _e(["color-option", { "is-active": y(h).primaryColor === n.value }]),
1632
+ style: Ye({ backgroundColor: n.value }),
1633
+ title: n.label,
1634
+ onClick: (a) => Ue(n.value)
1635
+ }, [
1636
+ y(h).primaryColor === n.value ? (w(), ce(y(Z), {
1637
+ key: 0,
1638
+ name: "check",
1639
+ size: 12,
1640
+ color: "#fff"
1641
+ })) : le("", !0)
1642
+ ], 14, Co)), 64))
1643
+ ])
1644
+ ]),
1645
+ s("div", No, [
1646
+ o[18] || (o[18] = s("div", { class: "settings-title" }, "功能设置", -1)),
1647
+ s("div", Eo, [
1648
+ s("div", $o, [
1649
+ o[15] || (o[15] = s("span", null, "灰色模式", -1)),
1650
+ s("div", {
1651
+ class: _e(["switch-wrapper", { "is-checked": V.value }]),
1652
+ onClick: be
1653
+ }, [...o[14] || (o[14] = [
1654
+ s("span", { class: "switch-core" }, null, -1)
1655
+ ])], 2)
1656
+ ]),
1657
+ s("div", So, [
1658
+ o[17] || (o[17] = s("span", null, "暗黑模式", -1)),
1659
+ s("div", {
1660
+ class: _e(["switch-wrapper", { "is-checked": y(h).isDark }]),
1661
+ onClick: we
1662
+ }, [...o[16] || (o[16] = [
1663
+ s("span", { class: "switch-core" }, null, -1)
1664
+ ])], 2)
1665
+ ])
1666
+ ])
1667
+ ])
1668
+ ])
1669
+ ]),
1670
+ _: 1
1671
+ }, 8, ["modelValue"])
1672
+ ]);
1673
+ };
1674
+ }
1675
+ }), Lo = /* @__PURE__ */ Se(Mo, [["__scopeId", "data-v-5b8c9d39"]]), Io = { class: "mix-top-menu" }, Ao = { class: "mix-top-menu__logo" }, To = { class: "mix-top-menu__logo-text" }, Oo = { class: "mix-top-menu__menu-content" }, Uo = {
1676
+ key: 0,
1677
+ class: "mix-top-menu__menu-icon"
1678
+ }, Bo = {
1679
+ key: 1,
1680
+ class: "mix-top-menu__menu-char"
1681
+ }, Po = { class: "mix-top-menu__menu-text" }, zo = { class: "mix-top-menu__actions" }, Ro = {
1682
+ key: 0,
1683
+ class: "mix-top-menu__search-dropdown"
1684
+ }, Do = {
1685
+ key: 0,
1686
+ class: "mix-top-menu__search-results"
1687
+ }, Fo = ["onClick"], Vo = {
1688
+ key: 0,
1689
+ class: "mix-top-menu__search-icon-item"
1690
+ }, jo = {
1691
+ key: 1,
1692
+ class: "mix-top-menu__search-char"
1693
+ }, qo = { class: "mix-top-menu__search-item-title" }, Go = {
1694
+ key: 1,
1695
+ class: "mix-top-menu__search-item-parent"
1696
+ }, Ko = {
1697
+ key: 1,
1698
+ class: "mix-top-menu__search-empty"
1699
+ }, Ho = ["title"], Wo = { class: "mix-top-menu__avatar" }, Xo = { class: "mix-top-menu__user-name" }, Yo = {
1700
+ key: 0,
1701
+ class: "mix-top-menu__dropdown"
1702
+ }, Jo = { class: "mix-top-menu__dropdown-header" }, Zo = { class: "mix-top-menu__dropdown-avatar" }, Qo = { class: "mix-top-menu__dropdown-info" }, er = { class: "mix-top-menu__dropdown-name" }, tr = { class: "mix-top-menu__dropdown-role" }, sr = { class: "mix-top-menu__dropdown-menu" }, nr = { class: "settings-drawer" }, or = { class: "settings-section" }, rr = { class: "settings-layout-options" }, ar = ["onClick"], lr = { class: "layout-option__preview" }, ir = {
1703
+ key: 0,
1704
+ class: "layout-preview-sidebar"
1705
+ }, cr = {
1706
+ key: 1,
1707
+ class: "layout-preview-top"
1708
+ }, ur = {
1709
+ key: 2,
1710
+ class: "layout-preview-mix"
1711
+ }, dr = { class: "layout-option__label" }, fr = { class: "settings-section" }, pr = { class: "settings-color-options" }, mr = ["title", "onClick"], hr = { class: "settings-section" }, vr = { class: "settings-switch-list" }, gr = { class: "settings-switch-item" }, _r = { class: "settings-switch-item" }, wr = /* @__PURE__ */ Ae({
1712
+ __name: "MixTopMenu",
1713
+ setup(r) {
1714
+ const f = qe(), v = Pe(), p = De(), h = ze(), b = $e(), A = Ze(), g = P(""), S = (n, a = "") => {
1715
+ const u = [];
1716
+ return n.forEach((l) => {
1717
+ l.children && l.children.length > 0 ? u.push(...S(l.children, l.menuName)) : u.push({ ...l, parentTitle: a, title: l.menuName, path: l.menuUrl });
1718
+ }), u;
1719
+ }, _ = j(() => I.value.trim() ? S(p.menuList).filter(
1720
+ (a) => a.title.toLowerCase().includes(I.value.toLowerCase())
1721
+ ) : []), x = j(() => {
1722
+ const n = p.menuList.find((a) => a.menuUrl === g.value);
1723
+ return (n == null ? void 0 : n.children) || [];
1724
+ }), M = j(() => p.menuList.find((n) => !!(f.path === n.menuUrl || n.children && n.children.some((a) => f.path.startsWith(a.menuUrl) || f.path === a.menuUrl)))), C = () => {
1725
+ M.value ? g.value = M.value.menuUrl : p.menuList.length > 0 && (g.value = p.menuList[0].menuUrl);
1726
+ }, G = (n) => {
1727
+ g.value = n;
1728
+ const a = p.menuList.find((u) => u.menuUrl === n);
1729
+ if (a)
1730
+ if (a.children && a.children.length > 0) {
1731
+ const u = a.children[0].menuUrl;
1732
+ f.path !== u && v.push(u);
1733
+ } else
1734
+ f.path !== n && v.push(n);
1735
+ }, Q = j(() => h.isDark ? "#1d1e1f" : "#fff"), O = j(() => h.isDark ? "#cfd3dc" : "#303133"), T = j(() => "#409eff"), V = P(!1), L = P(null), W = P(!1), Y = P(!1), oe = P(!1), U = P(!1), I = P(""), J = P(null);
1736
+ Xe(() => f.path, () => {
1737
+ C(), h.setMixSubMenus(x.value);
1738
+ }), Xe(() => p.menuList, (n) => {
1739
+ n && n.length > 0 && (C(), h.setMixSubMenus(x.value));
1740
+ }, { immediate: !0 });
1741
+ const ee = /* @__PURE__ */ new Set([
1742
+ "arrow-up",
1743
+ "arrow-down",
1744
+ "arrow-left",
1745
+ "arrow-right",
1746
+ "caret-down",
1747
+ "caret-right",
1748
+ "plus",
1749
+ "minus",
1750
+ "close",
1751
+ "check",
1752
+ "edit",
1753
+ "delete",
1754
+ "copy",
1755
+ "download",
1756
+ "upload",
1757
+ "refresh",
1758
+ "search",
1759
+ "filter",
1760
+ "more",
1761
+ "setting",
1762
+ "share",
1763
+ "loading",
1764
+ "info",
1765
+ "success",
1766
+ "warning",
1767
+ "error",
1768
+ "question",
1769
+ "user",
1770
+ "user-add",
1771
+ "user-group",
1772
+ "logout",
1773
+ "login",
1774
+ "file",
1775
+ "folder",
1776
+ "folder-open",
1777
+ "document",
1778
+ "image",
1779
+ "video",
1780
+ "music",
1781
+ "camera",
1782
+ "mail",
1783
+ "phone",
1784
+ "chat",
1785
+ "bell",
1786
+ "message",
1787
+ "eye",
1788
+ "eye-off",
1789
+ "calendar",
1790
+ "clock",
1791
+ "history",
1792
+ "timer",
1793
+ "location",
1794
+ "map",
1795
+ "globe",
1796
+ "star",
1797
+ "heart",
1798
+ "thumb-up",
1799
+ "link",
1800
+ "external-link",
1801
+ "lock",
1802
+ "unlock",
1803
+ "key",
1804
+ "home",
1805
+ "menu",
1806
+ "menu-fold",
1807
+ "menu-unfold",
1808
+ "sidebar-fold",
1809
+ "sidebar-expand",
1810
+ "sidebar-left",
1811
+ "dashboard",
1812
+ "chart",
1813
+ "chart-pie",
1814
+ "chart-line",
1815
+ "report",
1816
+ "analytics",
1817
+ "system",
1818
+ "permission",
1819
+ "role",
1820
+ "user-manage",
1821
+ "log",
1822
+ "notification",
1823
+ "app",
1824
+ "list",
1825
+ "grid",
1826
+ "fullscreen",
1827
+ "fullscreen-exit",
1828
+ "zoom-in",
1829
+ "zoom-out",
1830
+ "print",
1831
+ "bookmark",
1832
+ "tag",
1833
+ "code",
1834
+ "terminal",
1835
+ "database",
1836
+ "server",
1837
+ "cloud",
1838
+ "gift",
1839
+ "moon",
1840
+ "sun",
1841
+ "theme",
1842
+ "skin"
1843
+ ]), $ = (n) => {
1844
+ if (!n || n === "") return "";
1845
+ if (n.startsWith("tineco-icon-")) {
1846
+ const u = n.replace("tineco-icon-", "");
1847
+ return {
1848
+ home: "home",
1849
+ dashboard: "dashboard",
1850
+ system: "system",
1851
+ user: "user",
1852
+ role: "role",
1853
+ menu: "list",
1854
+ setting: "setting",
1855
+ file: "file",
1856
+ folder: "folder",
1857
+ chart: "chart",
1858
+ report: "report",
1859
+ analytics: "analytics"
1860
+ }[u] || u;
1861
+ }
1862
+ return {
1863
+ dashboard: "dashboard",
1864
+ system: "system",
1865
+ user: "user",
1866
+ role: "role",
1867
+ menu: "list",
1868
+ setting: "setting",
1869
+ home: "home",
1870
+ chart: "chart",
1871
+ report: "report",
1872
+ analytics: "analytics",
1873
+ permission: "permission",
1874
+ log: "log",
1875
+ notification: "notification",
1876
+ app: "app",
1877
+ list: "list",
1878
+ grid: "grid"
1879
+ }[n] || n;
1880
+ }, re = (n) => n ? n.charAt(0) : "", te = (n) => ee.has(n), D = () => {
1881
+ h.toggleTheme(), Y.value = !1;
1882
+ }, ie = () => {
1883
+ document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1884
+ }, de = () => {
1885
+ W.value = !!document.fullscreenElement;
1886
+ }, Ce = () => {
1887
+ V.value = !V.value;
1888
+ }, fe = () => {
1889
+ V.value = !1;
1890
+ }, ke = () => {
1891
+ U.value = !1, I.value = "";
1892
+ }, be = (n) => {
1893
+ v.push(n), ke();
1894
+ }, we = () => {
1895
+ Y.value = !0;
1896
+ }, Te = (n) => {
1897
+ oe.value = n;
1898
+ const a = document.documentElement;
1899
+ n ? a.classList.add("grey-mode") : a.classList.remove("grey-mode");
1900
+ }, Ne = () => {
1901
+ Te(!oe.value), Y.value = !1;
1902
+ }, Oe = () => {
1903
+ h.toggleTheme(), Y.value = !1;
1904
+ }, N = [
1905
+ { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1906
+ { value: "top", label: "顶部菜单", icon: "menu" },
1907
+ { value: "mix", label: "混合菜单", icon: "grid" }
1908
+ ], Ue = j(() => h.layout), Be = (n) => {
1909
+ h.setLayout(n), Y.value = !1;
1910
+ }, Me = [
1911
+ { value: "#409eff", label: "默认蓝" },
1912
+ { value: "#1890ff", label: "科技蓝" },
1913
+ { value: "#52c41a", label: "极光绿" },
1914
+ { value: "#faad14", label: "日落橙" },
1915
+ { value: "#f5222d", label: "薄暮红" },
1916
+ { value: "#722ed1", label: "酱紫" }
1917
+ ], H = (n) => {
1918
+ h.setPrimaryColor(n), Y.value = !1;
1919
+ }, B = () => {
1920
+ fe(), v.push("/profile");
1921
+ }, t = () => {
1922
+ fe(), v.push("/change-password");
1923
+ }, e = () => {
1924
+ fe(), A.logout(), b.clearUserInfo(), p.clearMenu(), v.push("/login");
1925
+ }, o = (n) => {
1926
+ L.value && !L.value.contains(n.target) && fe(), J.value && !J.value.contains(n.target) && ke();
1927
+ }, c = (n) => {
1928
+ n.key === "Escape" && (ke(), fe());
1929
+ };
1930
+ return _t(() => {
1931
+ document.addEventListener("click", o), document.addEventListener("fullscreenchange", de), document.addEventListener("keydown", c), oe.value = document.documentElement.classList.contains("grey-mode"), C();
1932
+ }), wt(() => {
1933
+ document.removeEventListener("click", o), document.removeEventListener("fullscreenchange", de), document.removeEventListener("keydown", c);
1934
+ }), (n, a) => {
1935
+ var u;
1936
+ return w(), E("div", Io, [
1937
+ s("div", Ao, [
1938
+ a[3] || (a[3] = s("img", {
1939
+ src: Et,
1940
+ alt: "Logo",
1941
+ class: "mix-top-menu__logo-img"
1942
+ }, null, -1)),
1943
+ s("span", To, q(y(h).appName), 1)
1944
+ ]),
1945
+ z(y(Ct), {
1946
+ "model-value": g.value,
1947
+ mode: "horizontal",
1948
+ "background-color": Q.value,
1949
+ "text-color": O.value,
1950
+ "active-text-color": T.value,
1951
+ class: "mix-top-menu__menu",
1952
+ onSelect: G
1953
+ }, {
1954
+ default: X(() => [
1955
+ (w(!0), E(he, null, ge(y(p).menuList, (l) => (w(), ce(y(He), {
1956
+ key: l.menuUrl,
1957
+ index: l.menuUrl
1958
+ }, {
1959
+ default: X(() => [
1960
+ s("span", Oo, [
1961
+ l.menuName !== "首页" ? (w(), E("span", Uo, [
1962
+ te($(l.icon)) ? (w(), ce(y(Z), {
1963
+ key: 0,
1964
+ name: $(l.icon),
1965
+ size: 16
1966
+ }, null, 8, ["name"])) : (w(), E("span", Bo, q(re(l.menuName)), 1))
1967
+ ])) : le("", !0),
1968
+ s("span", Po, q(l.menuName), 1)
1969
+ ])
1970
+ ]),
1971
+ _: 2
1972
+ }, 1032, ["index"]))), 128))
1973
+ ]),
1974
+ _: 1
1975
+ }, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
1976
+ s("div", zo, [
1977
+ s("div", {
1978
+ class: "mix-top-menu__search",
1979
+ ref_key: "searchRef",
1980
+ ref: J
1981
+ }, [
1982
+ z(y(Z), {
1983
+ name: "search",
1984
+ size: 14,
1985
+ class: "mix-top-menu__search-icon"
1986
+ }),
1987
+ lt(s("input", {
1988
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => I.value = l),
1989
+ type: "text",
1990
+ class: "mix-top-menu__search-input",
1991
+ placeholder: "搜索菜单...",
1992
+ onFocus: a[1] || (a[1] = (l) => U.value = !0)
1993
+ }, null, 544), [
1994
+ [yt, I.value]
1995
+ ]),
1996
+ z(Ve, { name: "search-dropdown" }, {
1997
+ default: X(() => [
1998
+ U.value && (_.value.length > 0 || I.value) ? (w(), E("div", Ro, [
1999
+ _.value.length > 0 ? (w(), E("div", Do, [
2000
+ (w(!0), E(he, null, ge(_.value, (l) => (w(), E("div", {
2001
+ key: l.path,
2002
+ class: "mix-top-menu__search-item",
2003
+ onClick: (i) => be(l.path)
2004
+ }, [
2005
+ l.title !== "首页" ? (w(), E("span", Vo, [
2006
+ te($(l.icon)) ? (w(), ce(y(Z), {
2007
+ key: 0,
2008
+ name: $(l.icon),
2009
+ size: 16
2010
+ }, null, 8, ["name"])) : (w(), E("span", jo, q(re(l.title)), 1))
2011
+ ])) : le("", !0),
2012
+ s("span", qo, q(l.title), 1),
2013
+ l.parentTitle ? (w(), E("span", Go, q(l.parentTitle), 1)) : le("", !0)
2014
+ ], 8, Fo))), 128))
2015
+ ])) : (w(), E("div", Ko, " 未找到匹配的菜单 "))
2016
+ ])) : le("", !0)
2017
+ ]),
2018
+ _: 1
2019
+ })
2020
+ ], 512),
2021
+ s("div", {
2022
+ class: "mix-top-menu__action",
2023
+ onClick: ie,
2024
+ title: W.value ? "退出全屏" : "全屏"
2025
+ }, [
2026
+ z(y(Z), {
2027
+ name: W.value ? "fullscreen-exit" : "fullscreen",
2028
+ size: 16
2029
+ }, null, 8, ["name"])
2030
+ ], 8, Ho),
2031
+ s("div", {
2032
+ class: "mix-top-menu__action",
2033
+ onClick: we,
2034
+ title: "换肤设置"
2035
+ }, [
2036
+ z(y(Z), {
2037
+ name: "skin",
2038
+ size: 16
2039
+ })
2040
+ ]),
2041
+ s("div", {
2042
+ class: "mix-top-menu__action",
2043
+ onClick: D,
2044
+ title: "切换主题"
2045
+ }, [
2046
+ z(y(Z), {
2047
+ name: y(h).isDark ? "sun" : "moon",
2048
+ size: 16
2049
+ }, null, 8, ["name"])
2050
+ ]),
2051
+ s("div", {
2052
+ class: "mix-top-menu__user",
2053
+ ref_key: "dropdownRef",
2054
+ ref: L
2055
+ }, [
2056
+ s("div", {
2057
+ class: "mix-top-menu__user-trigger",
2058
+ onClick: it(Ce, ["stop"])
2059
+ }, [
2060
+ s("div", Wo, [
2061
+ s("span", null, q(((u = y(b).userName) == null ? void 0 : u.charAt(0)) || "U"), 1)
2062
+ ]),
2063
+ s("span", Xo, q(y(b).userName), 1),
2064
+ s("span", {
2065
+ class: _e(["mix-top-menu__user-arrow", { "is-active": V.value }])
2066
+ }, "▼", 2)
2067
+ ]),
2068
+ z(Ve, { name: "dropdown" }, {
2069
+ default: X(() => {
2070
+ var l;
2071
+ return [
2072
+ V.value ? (w(), E("div", Yo, [
2073
+ s("div", Jo, [
2074
+ s("div", Zo, [
2075
+ s("span", null, q(((l = y(b).userName) == null ? void 0 : l.charAt(0)) || "U"), 1)
2076
+ ]),
2077
+ s("div", Qo, [
2078
+ s("div", er, q(y(b).userName), 1),
2079
+ s("div", tr, q(y(b).departmentName), 1)
2080
+ ])
2081
+ ]),
2082
+ a[8] || (a[8] = s("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
2083
+ s("div", sr, [
2084
+ s("div", {
2085
+ class: "mix-top-menu__dropdown-item",
2086
+ onClick: B
2087
+ }, [
2088
+ z(y(Z), {
2089
+ name: "user",
2090
+ size: 16
2091
+ }),
2092
+ a[4] || (a[4] = s("span", null, "个人信息", -1))
2093
+ ]),
2094
+ s("div", {
2095
+ class: "mix-top-menu__dropdown-item",
2096
+ onClick: t
2097
+ }, [
2098
+ z(y(Z), {
2099
+ name: "lock",
2100
+ size: 16
2101
+ }),
2102
+ a[5] || (a[5] = s("span", null, "修改密码", -1))
2103
+ ]),
2104
+ a[7] || (a[7] = s("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
2105
+ s("div", {
2106
+ class: "mix-top-menu__dropdown-item mix-top-menu__dropdown-item--danger",
2107
+ onClick: e
2108
+ }, [
2109
+ z(y(Z), {
2110
+ name: "logout",
2111
+ size: 16
2112
+ }),
2113
+ a[6] || (a[6] = s("span", null, "退出登录", -1))
2114
+ ])
2115
+ ])
2116
+ ])) : le("", !0)
2117
+ ];
2118
+ }),
2119
+ _: 1
2120
+ })
2121
+ ], 512)
2122
+ ]),
2123
+ z(y(Nt), {
2124
+ modelValue: Y.value,
2125
+ "onUpdate:modelValue": a[2] || (a[2] = (l) => Y.value = l),
2126
+ title: "换肤设置",
2127
+ direction: "rtl",
2128
+ size: "320px"
2129
+ }, {
2130
+ default: X(() => [
2131
+ s("div", nr, [
2132
+ s("div", or, [
2133
+ a[12] || (a[12] = s("div", { class: "settings-title" }, "布局模式", -1)),
2134
+ s("div", rr, [
2135
+ (w(), E(he, null, ge(N, (l) => s("div", {
2136
+ key: l.value,
2137
+ class: _e(["layout-option", { "is-active": Ue.value === l.value }]),
2138
+ onClick: (i) => Be(l.value)
2139
+ }, [
2140
+ s("div", lr, [
2141
+ l.value === "sidebar" ? (w(), E("div", ir, [...a[9] || (a[9] = [
2142
+ s("div", { class: "preview-aside" }, null, -1),
2143
+ s("div", { class: "preview-main" }, [
2144
+ s("div", { class: "preview-header" }),
2145
+ s("div", { class: "preview-content" })
2146
+ ], -1)
2147
+ ])])) : l.value === "top" ? (w(), E("div", cr, [...a[10] || (a[10] = [
2148
+ s("div", { class: "preview-header-full" }, null, -1),
2149
+ s("div", { class: "preview-content-full" }, null, -1)
2150
+ ])])) : (w(), E("div", ur, [...a[11] || (a[11] = [
2151
+ s("div", { class: "preview-header-mix" }, [
2152
+ s("div", { class: "preview-mix-left" })
2153
+ ], -1),
2154
+ s("div", { class: "preview-mix-body" }, [
2155
+ s("div", { class: "preview-mix-aside" }),
2156
+ s("div", { class: "preview-mix-content" })
2157
+ ], -1)
2158
+ ])]))
2159
+ ]),
2160
+ s("span", dr, q(l.label), 1)
2161
+ ], 10, ar)), 64))
2162
+ ])
2163
+ ]),
2164
+ s("div", fr, [
2165
+ a[13] || (a[13] = s("div", { class: "settings-title" }, "主题色", -1)),
2166
+ s("div", pr, [
2167
+ (w(), E(he, null, ge(Me, (l) => s("div", {
2168
+ key: l.value,
2169
+ class: _e(["color-option", { "is-active": y(h).primaryColor === l.value }]),
2170
+ style: Ye({ backgroundColor: l.value }),
2171
+ title: l.label,
2172
+ onClick: (i) => H(l.value)
2173
+ }, [
2174
+ y(h).primaryColor === l.value ? (w(), ce(y(Z), {
2175
+ key: 0,
2176
+ name: "check",
2177
+ size: 12,
2178
+ color: "#fff"
2179
+ })) : le("", !0)
2180
+ ], 14, mr)), 64))
2181
+ ])
2182
+ ]),
2183
+ s("div", hr, [
2184
+ a[18] || (a[18] = s("div", { class: "settings-title" }, "功能设置", -1)),
2185
+ s("div", vr, [
2186
+ s("div", gr, [
2187
+ a[15] || (a[15] = s("span", null, "灰色模式", -1)),
2188
+ s("div", {
2189
+ class: _e(["switch-wrapper", { "is-checked": oe.value }]),
2190
+ onClick: Ne
2191
+ }, [...a[14] || (a[14] = [
2192
+ s("span", { class: "switch-core" }, null, -1)
2193
+ ])], 2)
2194
+ ]),
2195
+ s("div", _r, [
2196
+ a[17] || (a[17] = s("span", null, "暗黑模式", -1)),
2197
+ s("div", {
2198
+ class: _e(["switch-wrapper", { "is-checked": y(h).isDark }]),
2199
+ onClick: Oe
2200
+ }, [...a[16] || (a[16] = [
2201
+ s("span", { class: "switch-core" }, null, -1)
2202
+ ])], 2)
2203
+ ])
2204
+ ])
2205
+ ])
2206
+ ])
2207
+ ]),
2208
+ _: 1
2209
+ }, 8, ["modelValue"])
2210
+ ]);
2211
+ };
2212
+ }
2213
+ }), yr = /* @__PURE__ */ Se(wr, [["__scopeId", "data-v-25806305"]]), kr = {
2214
+ key: 0,
2215
+ class: "layout layout--sidebar"
2216
+ }, br = { class: "layout__main" }, xr = { class: "layout__header" }, Cr = { class: "layout__content" }, Nr = {
2217
+ key: 1,
2218
+ class: "layout layout--top"
2219
+ }, Er = { class: "layout__top-menu" }, $r = { class: "layout__main" }, Sr = { class: "layout__content" }, Mr = {
2220
+ key: 2,
2221
+ class: "layout layout--mix"
2222
+ }, Lr = { class: "layout__mix-top-menu" }, Ir = { class: "layout__mix-body" }, Ar = { class: "layout__content" }, Tr = /* @__PURE__ */ Ae({
2223
+ __name: "index",
2224
+ setup(r) {
2225
+ const f = ze(), v = De(), p = j(
2226
+ () => f.isCollapsed ? "64px" : "210px"
2227
+ ), h = j(() => f.layout), b = j(() => h.value === "mix"), A = j(() => h.value === "sidebar" ? v.menuList : h.value === "mix" ? f.mixSubMenus : []), g = j(() => b.value ? A.value.length > 0 : !1);
2228
+ return (S, _) => {
2229
+ const x = Pt("router-view");
2230
+ return w(), E(he, null, [
2231
+ h.value === "sidebar" ? (w(), E("div", kr, [
2232
+ s("aside", {
2233
+ class: "layout__aside",
2234
+ style: Ye({ width: p.value })
2235
+ }, [
2236
+ z(Bt, {
2237
+ "menu-list": A.value,
2238
+ "show-logo": !0,
2239
+ "show-user": !0
2240
+ }, null, 8, ["menu-list"])
2241
+ ], 4),
2242
+ s("div", br, [
2243
+ s("header", xr, [
2244
+ z(xn)
2245
+ ]),
2246
+ s("main", Cr, [
2247
+ z(x)
2248
+ ])
2249
+ ])
2250
+ ])) : le("", !0),
2251
+ h.value === "top" ? (w(), E("div", Nr, [
2252
+ s("div", Er, [
2253
+ z(Lo)
2254
+ ]),
2255
+ s("div", $r, [
2256
+ s("main", Sr, [
2257
+ z(x)
2258
+ ])
2259
+ ])
2260
+ ])) : le("", !0),
2261
+ h.value === "mix" ? (w(), E("div", Mr, [
2262
+ s("div", Lr, [
2263
+ z(yr)
2264
+ ]),
2265
+ s("div", Ir, [
2266
+ g.value ? (w(), E("aside", {
2267
+ key: 0,
2268
+ class: "layout__aside",
2269
+ style: Ye({ width: p.value })
2270
+ }, [
2271
+ z(Bt, {
2272
+ "menu-list": A.value,
2273
+ "show-logo": !1,
2274
+ "show-user": !1
2275
+ }, null, 8, ["menu-list"])
2276
+ ], 4)) : le("", !0),
2277
+ s("main", Ar, [
2278
+ z(x)
2279
+ ])
2280
+ ])
2281
+ ])) : le("", !0)
2282
+ ], 64);
2283
+ };
2284
+ }
2285
+ }), Vt = /* @__PURE__ */ Se(Tr, [["__scopeId", "data-v-fb6a0b14"]]), Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2286
+ __proto__: null,
2287
+ default: Vt
2288
+ }, Symbol.toStringTag, { value: "Module" })), Ur = { class: "tabs-wrapper" }, Br = { class: "tab-label" }, Pr = ["onClick"], zr = /* @__PURE__ */ Ae({
2289
+ __name: "Tabs",
2290
+ setup(r) {
2291
+ const f = qe(), v = Pe(), p = j(() => {
2292
+ const g = [];
2293
+ return f.matched.forEach((S) => {
2294
+ var _;
2295
+ (_ = S.meta) != null && _.affix && g.push({
2296
+ name: S.name,
2297
+ title: S.meta.title,
2298
+ path: S.path,
2299
+ affix: !0
2300
+ });
2301
+ }), g;
2302
+ }), h = j(() => f.path), b = (g) => {
2303
+ v.push(g);
2304
+ }, A = (g) => {
2305
+ const S = p.value.find((_) => _.path === g);
2306
+ if (!(S != null && S.affix) && g === h.value) {
2307
+ const _ = p.value.findIndex((M) => M.path === g), x = p.value[_ - 1] || p.value[_ + 1];
2308
+ x && v.push(x.path);
2309
+ }
2310
+ };
2311
+ return (g, S) => (w(), E("div", Ur, [
2312
+ z(y(es), {
2313
+ modelValue: h.value,
2314
+ "onUpdate:modelValue": S[0] || (S[0] = (_) => h.value = _),
2315
+ type: "card",
2316
+ onTabClick: b
2317
+ }, {
2318
+ default: X(() => [
2319
+ (w(!0), E(he, null, ge(p.value, (_) => (w(), ce(y(ts), {
2320
+ key: _.path,
2321
+ name: _.path,
2322
+ label: _.title,
2323
+ closable: !_.affix
2324
+ }, {
2325
+ label: X(() => [
2326
+ s("span", Br, [
2327
+ Re(q(_.title) + " ", 1),
2328
+ _.affix ? le("", !0) : (w(), E("span", {
2329
+ key: 0,
2330
+ class: "tab-close",
2331
+ onClick: it((x) => A(_.path), ["stop"])
2332
+ }, " ✕ ", 8, Pr))
2333
+ ])
2334
+ ]),
2335
+ _: 2
2336
+ }, 1032, ["name", "label", "closable"]))), 128))
2337
+ ]),
2338
+ _: 1
2339
+ }, 8, ["modelValue"])
2340
+ ]));
2341
+ }
2342
+ }), Ga = /* @__PURE__ */ Se(zr, [["__scopeId", "data-v-9156d8cd"]]), Rr = {}, Dr = { class: "footer" };
2343
+ function Fr(r, f) {
2344
+ return w(), E("div", Dr, [...f[0] || (f[0] = [
2345
+ s("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
2346
+ ])]);
2347
+ }
2348
+ const Ka = /* @__PURE__ */ Se(Rr, [["render", Fr], ["__scopeId", "data-v-4852826a"]]);
2349
+ var Vr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2350
+ function jr(r) {
2351
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
2352
+ }
2353
+ var dt = { exports: {} }, jt = { exports: {} }, qt = { exports: {} };
2354
+ (function(r) {
2355
+ (function(f) {
2356
+ var v, p = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, h = Math.ceil, b = Math.floor, A = "[BigNumber Error] ", g = A + "Number primitive has more than 15 significant digits: ", S = 1e14, _ = 14, x = 9007199254740991, M = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], C = 1e7, G = 1e9;
2357
+ function Q(U) {
2358
+ var I, J, ee, $ = N.prototype = { constructor: N, toString: null, valueOf: null }, re = new N(1), te = 20, D = 4, ie = -7, de = 21, Ce = -1e7, fe = 1e7, ke = !1, be = 1, we = 0, Te = {
2359
+ prefix: "",
2360
+ groupSize: 3,
2361
+ secondaryGroupSize: 0,
2362
+ groupSeparator: ",",
2363
+ decimalSeparator: ".",
2364
+ fractionGroupSize: 0,
2365
+ fractionGroupSeparator: " ",
2366
+ // non-breaking space
2367
+ suffix: ""
2368
+ }, Ne = "0123456789abcdefghijklmnopqrstuvwxyz", Oe = !0;
2369
+ function N(t, e) {
2370
+ var o, c, n, a, u, l, i, m, d = this;
2371
+ if (!(d instanceof N)) return new N(t, e);
2372
+ if (e == null) {
2373
+ if (t && t._isBigNumber === !0) {
2374
+ d.s = t.s, !t.c || t.e > fe ? d.c = d.e = null : t.e < Ce ? d.c = [d.e = 0] : (d.e = t.e, d.c = t.c.slice());
2375
+ return;
2376
+ }
2377
+ if ((l = typeof t == "number") && t * 0 == 0) {
2378
+ if (d.s = 1 / t < 0 ? (t = -t, -1) : 1, t === ~~t) {
2379
+ for (a = 0, u = t; u >= 10; u /= 10, a++) ;
2380
+ a > fe ? d.c = d.e = null : (d.e = a, d.c = [t]);
2381
+ return;
2382
+ }
2383
+ m = String(t);
2384
+ } else {
2385
+ if (!p.test(m = String(t))) return ee(d, m, l);
2386
+ d.s = m.charCodeAt(0) == 45 ? (m = m.slice(1), -1) : 1;
2387
+ }
2388
+ (a = m.indexOf(".")) > -1 && (m = m.replace(".", "")), (u = m.search(/e/i)) > 0 ? (a < 0 && (a = u), a += +m.slice(u + 1), m = m.substring(0, u)) : a < 0 && (a = m.length);
2389
+ } else {
2390
+ if (L(e, 2, Ne.length, "Base"), e == 10 && Oe)
2391
+ return d = new N(t), H(d, te + d.e + 1, D);
2392
+ if (m = String(t), l = typeof t == "number") {
2393
+ if (t * 0 != 0) return ee(d, m, l, e);
2394
+ if (d.s = 1 / t < 0 ? (m = m.slice(1), -1) : 1, N.DEBUG && m.replace(/^0\.0*|\./, "").length > 15)
2395
+ throw Error(g + t);
2396
+ } else
2397
+ d.s = m.charCodeAt(0) === 45 ? (m = m.slice(1), -1) : 1;
2398
+ for (o = Ne.slice(0, e), a = u = 0, i = m.length; u < i; u++)
2399
+ if (o.indexOf(c = m.charAt(u)) < 0) {
2400
+ if (c == ".") {
2401
+ if (u > a) {
2402
+ a = i;
2403
+ continue;
2404
+ }
2405
+ } else if (!n && (m == m.toUpperCase() && (m = m.toLowerCase()) || m == m.toLowerCase() && (m = m.toUpperCase()))) {
2406
+ n = !0, u = -1, a = 0;
2407
+ continue;
2408
+ }
2409
+ return ee(d, String(t), l, e);
2410
+ }
2411
+ l = !1, m = J(m, e, 10, d.s), (a = m.indexOf(".")) > -1 ? m = m.replace(".", "") : a = m.length;
2412
+ }
2413
+ for (u = 0; m.charCodeAt(u) === 48; u++) ;
2414
+ for (i = m.length; m.charCodeAt(--i) === 48; ) ;
2415
+ if (m = m.slice(u, ++i)) {
2416
+ if (i -= u, l && N.DEBUG && i > 15 && (t > x || t !== b(t)))
2417
+ throw Error(g + d.s * t);
2418
+ if ((a = a - u - 1) > fe)
2419
+ d.c = d.e = null;
2420
+ else if (a < Ce)
2421
+ d.c = [d.e = 0];
2422
+ else {
2423
+ if (d.e = a, d.c = [], u = (a + 1) % _, a < 0 && (u += _), u < i) {
2424
+ for (u && d.c.push(+m.slice(0, u)), i -= _; u < i; )
2425
+ d.c.push(+m.slice(u, u += _));
2426
+ u = _ - (m = m.slice(u)).length;
2427
+ } else
2428
+ u -= i;
2429
+ for (; u--; m += "0") ;
2430
+ d.c.push(+m);
2431
+ }
2432
+ } else
2433
+ d.c = [d.e = 0];
2434
+ }
2435
+ N.clone = Q, N.ROUND_UP = 0, N.ROUND_DOWN = 1, N.ROUND_CEIL = 2, N.ROUND_FLOOR = 3, N.ROUND_HALF_UP = 4, N.ROUND_HALF_DOWN = 5, N.ROUND_HALF_EVEN = 6, N.ROUND_HALF_CEIL = 7, N.ROUND_HALF_FLOOR = 8, N.EUCLID = 9, N.config = N.set = function(t) {
2436
+ var e, o;
2437
+ if (t != null)
2438
+ if (typeof t == "object") {
2439
+ if (t.hasOwnProperty(e = "DECIMAL_PLACES") && (o = t[e], L(o, 0, G, e), te = o), t.hasOwnProperty(e = "ROUNDING_MODE") && (o = t[e], L(o, 0, 8, e), D = o), t.hasOwnProperty(e = "EXPONENTIAL_AT") && (o = t[e], o && o.pop ? (L(o[0], -G, 0, e), L(o[1], 0, G, e), ie = o[0], de = o[1]) : (L(o, -G, G, e), ie = -(de = o < 0 ? -o : o))), t.hasOwnProperty(e = "RANGE"))
2440
+ if (o = t[e], o && o.pop)
2441
+ L(o[0], -G, -1, e), L(o[1], 1, G, e), Ce = o[0], fe = o[1];
2442
+ else if (L(o, -G, G, e), o)
2443
+ Ce = -(fe = o < 0 ? -o : o);
2444
+ else
2445
+ throw Error(A + e + " cannot be zero: " + o);
2446
+ if (t.hasOwnProperty(e = "CRYPTO"))
2447
+ if (o = t[e], o === !!o)
2448
+ if (o)
2449
+ if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
2450
+ ke = o;
2451
+ else
2452
+ throw ke = !o, Error(A + "crypto unavailable");
2453
+ else
2454
+ ke = o;
2455
+ else
2456
+ throw Error(A + e + " not true or false: " + o);
2457
+ if (t.hasOwnProperty(e = "MODULO_MODE") && (o = t[e], L(o, 0, 9, e), be = o), t.hasOwnProperty(e = "POW_PRECISION") && (o = t[e], L(o, 0, G, e), we = o), t.hasOwnProperty(e = "FORMAT"))
2458
+ if (o = t[e], typeof o == "object") Te = o;
2459
+ else throw Error(A + e + " not an object: " + o);
2460
+ if (t.hasOwnProperty(e = "ALPHABET"))
2461
+ if (o = t[e], typeof o == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(o))
2462
+ Oe = o.slice(0, 10) == "0123456789", Ne = o;
2463
+ else
2464
+ throw Error(A + e + " invalid: " + o);
2465
+ } else
2466
+ throw Error(A + "Object expected: " + t);
2467
+ return {
2468
+ DECIMAL_PLACES: te,
2469
+ ROUNDING_MODE: D,
2470
+ EXPONENTIAL_AT: [ie, de],
2471
+ RANGE: [Ce, fe],
2472
+ CRYPTO: ke,
2473
+ MODULO_MODE: be,
2474
+ POW_PRECISION: we,
2475
+ FORMAT: Te,
2476
+ ALPHABET: Ne
2477
+ };
2478
+ }, N.isBigNumber = function(t) {
2479
+ if (!t || t._isBigNumber !== !0) return !1;
2480
+ if (!N.DEBUG) return !0;
2481
+ var e, o, c = t.c, n = t.e, a = t.s;
2482
+ e: if ({}.toString.call(c) == "[object Array]") {
2483
+ if ((a === 1 || a === -1) && n >= -G && n <= G && n === b(n)) {
2484
+ if (c[0] === 0) {
2485
+ if (n === 0 && c.length === 1) return !0;
2486
+ break e;
2487
+ }
2488
+ if (e = (n + 1) % _, e < 1 && (e += _), String(c[0]).length == e) {
2489
+ for (e = 0; e < c.length; e++)
2490
+ if (o = c[e], o < 0 || o >= S || o !== b(o)) break e;
2491
+ if (o !== 0) return !0;
2492
+ }
2493
+ }
2494
+ } else if (c === null && n === null && (a === null || a === 1 || a === -1))
2495
+ return !0;
2496
+ throw Error(A + "Invalid BigNumber: " + t);
2497
+ }, N.maximum = N.max = function() {
2498
+ return Be(arguments, -1);
2499
+ }, N.minimum = N.min = function() {
2500
+ return Be(arguments, 1);
2501
+ }, N.random = function() {
2502
+ var t = 9007199254740992, e = Math.random() * t & 2097151 ? function() {
2503
+ return b(Math.random() * t);
2504
+ } : function() {
2505
+ return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
2506
+ };
2507
+ return function(o) {
2508
+ var c, n, a, u, l, i = 0, m = [], d = new N(re);
2509
+ if (o == null ? o = te : L(o, 0, G), u = h(o / _), ke)
2510
+ if (crypto.getRandomValues) {
2511
+ for (c = crypto.getRandomValues(new Uint32Array(u *= 2)); i < u; )
2512
+ l = c[i] * 131072 + (c[i + 1] >>> 11), l >= 9e15 ? (n = crypto.getRandomValues(new Uint32Array(2)), c[i] = n[0], c[i + 1] = n[1]) : (m.push(l % 1e14), i += 2);
2513
+ i = u / 2;
2514
+ } else if (crypto.randomBytes) {
2515
+ for (c = crypto.randomBytes(u *= 7); i < u; )
2516
+ l = (c[i] & 31) * 281474976710656 + c[i + 1] * 1099511627776 + c[i + 2] * 4294967296 + c[i + 3] * 16777216 + (c[i + 4] << 16) + (c[i + 5] << 8) + c[i + 6], l >= 9e15 ? crypto.randomBytes(7).copy(c, i) : (m.push(l % 1e14), i += 7);
2517
+ i = u / 7;
2518
+ } else
2519
+ throw ke = !1, Error(A + "crypto unavailable");
2520
+ if (!ke)
2521
+ for (; i < u; )
2522
+ l = e(), l < 9e15 && (m[i++] = l % 1e14);
2523
+ for (u = m[--i], o %= _, u && o && (l = M[_ - o], m[i] = b(u / l) * l); m[i] === 0; m.pop(), i--) ;
2524
+ if (i < 0)
2525
+ m = [a = 0];
2526
+ else {
2527
+ for (a = -1; m[0] === 0; m.splice(0, 1), a -= _) ;
2528
+ for (i = 1, l = m[0]; l >= 10; l /= 10, i++) ;
2529
+ i < _ && (a -= _ - i);
2530
+ }
2531
+ return d.e = a, d.c = m, d;
2532
+ };
2533
+ }(), N.sum = function() {
2534
+ for (var t = 1, e = arguments, o = new N(e[0]); t < e.length; ) o = o.plus(e[t++]);
2535
+ return o;
2536
+ }, J = /* @__PURE__ */ function() {
2537
+ var t = "0123456789";
2538
+ function e(o, c, n, a) {
2539
+ for (var u, l = [0], i, m = 0, d = o.length; m < d; ) {
2540
+ for (i = l.length; i--; l[i] *= c) ;
2541
+ for (l[0] += a.indexOf(o.charAt(m++)), u = 0; u < l.length; u++)
2542
+ l[u] > n - 1 && (l[u + 1] == null && (l[u + 1] = 0), l[u + 1] += l[u] / n | 0, l[u] %= n);
2543
+ }
2544
+ return l.reverse();
2545
+ }
2546
+ return function(o, c, n, a, u) {
2547
+ var l, i, m, d, k, R, F, ne, pe = o.indexOf("."), ve = te, se = D;
2548
+ for (pe >= 0 && (d = we, we = 0, o = o.replace(".", ""), ne = new N(c), R = ne.pow(o.length - pe), we = d, ne.c = e(
2549
+ oe(T(R.c), R.e, "0"),
2550
+ 10,
2551
+ n,
2552
+ t
2553
+ ), ne.e = ne.c.length), F = e(o, c, n, u ? (l = Ne, t) : (l = t, Ne)), m = d = F.length; F[--d] == 0; F.pop()) ;
2554
+ if (!F[0]) return l.charAt(0);
2555
+ if (pe < 0 ? --m : (R.c = F, R.e = m, R.s = a, R = I(R, ne, ve, se, n), F = R.c, k = R.r, m = R.e), i = m + ve + 1, pe = F[i], d = n / 2, k = k || i < 0 || F[i + 1] != null, k = se < 4 ? (pe != null || k) && (se == 0 || se == (R.s < 0 ? 3 : 2)) : pe > d || pe == d && (se == 4 || k || se == 6 && F[i - 1] & 1 || se == (R.s < 0 ? 8 : 7)), i < 1 || !F[0])
2556
+ o = k ? oe(l.charAt(1), -ve, l.charAt(0)) : l.charAt(0);
2557
+ else {
2558
+ if (F.length = i, k)
2559
+ for (--n; ++F[--i] > n; )
2560
+ F[i] = 0, i || (++m, F = [1].concat(F));
2561
+ for (d = F.length; !F[--d]; ) ;
2562
+ for (pe = 0, o = ""; pe <= d; o += l.charAt(F[pe++])) ;
2563
+ o = oe(o, m, l.charAt(0));
2564
+ }
2565
+ return o;
2566
+ };
2567
+ }(), I = /* @__PURE__ */ function() {
2568
+ function t(c, n, a) {
2569
+ var u, l, i, m, d = 0, k = c.length, R = n % C, F = n / C | 0;
2570
+ for (c = c.slice(); k--; )
2571
+ i = c[k] % C, m = c[k] / C | 0, u = F * i + m * R, l = R * i + u % C * C + d, d = (l / a | 0) + (u / C | 0) + F * m, c[k] = l % a;
2572
+ return d && (c = [d].concat(c)), c;
2573
+ }
2574
+ function e(c, n, a, u) {
2575
+ var l, i;
2576
+ if (a != u)
2577
+ i = a > u ? 1 : -1;
2578
+ else
2579
+ for (l = i = 0; l < a; l++)
2580
+ if (c[l] != n[l]) {
2581
+ i = c[l] > n[l] ? 1 : -1;
2582
+ break;
2583
+ }
2584
+ return i;
2585
+ }
2586
+ function o(c, n, a, u) {
2587
+ for (var l = 0; a--; )
2588
+ c[a] -= l, l = c[a] < n[a] ? 1 : 0, c[a] = l * u + c[a] - n[a];
2589
+ for (; !c[0] && c.length > 1; c.splice(0, 1)) ;
2590
+ }
2591
+ return function(c, n, a, u, l) {
2592
+ var i, m, d, k, R, F, ne, pe, ve, se, ae, ye, Qe, ft, pt, Le, Ge, Ee = c.s == n.s ? 1 : -1, xe = c.c, me = n.c;
2593
+ if (!xe || !xe[0] || !me || !me[0])
2594
+ return new N(
2595
+ // Return NaN if either NaN, or both Infinity or 0.
2596
+ !c.s || !n.s || (xe ? me && xe[0] == me[0] : !me) ? NaN : (
2597
+ // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
2598
+ xe && xe[0] == 0 || !me ? Ee * 0 : Ee / 0
2599
+ )
2600
+ );
2601
+ for (pe = new N(Ee), ve = pe.c = [], m = c.e - n.e, Ee = a + m + 1, l || (l = S, m = O(c.e / _) - O(n.e / _), Ee = Ee / _ | 0), d = 0; me[d] == (xe[d] || 0); d++) ;
2602
+ if (me[d] > (xe[d] || 0) && m--, Ee < 0)
2603
+ ve.push(1), k = !0;
2604
+ else {
2605
+ for (ft = xe.length, Le = me.length, d = 0, Ee += 2, R = b(l / (me[0] + 1)), R > 1 && (me = t(me, R, l), xe = t(xe, R, l), Le = me.length, ft = xe.length), Qe = Le, se = xe.slice(0, Le), ae = se.length; ae < Le; se[ae++] = 0) ;
2606
+ Ge = me.slice(), Ge = [0].concat(Ge), pt = me[0], me[1] >= l / 2 && pt++;
2607
+ do {
2608
+ if (R = 0, i = e(me, se, Le, ae), i < 0) {
2609
+ if (ye = se[0], Le != ae && (ye = ye * l + (se[1] || 0)), R = b(ye / pt), R > 1)
2610
+ for (R >= l && (R = l - 1), F = t(me, R, l), ne = F.length, ae = se.length; e(F, se, ne, ae) == 1; )
2611
+ R--, o(F, Le < ne ? Ge : me, ne, l), ne = F.length, i = 1;
2612
+ else
2613
+ R == 0 && (i = R = 1), F = me.slice(), ne = F.length;
2614
+ if (ne < ae && (F = [0].concat(F)), o(se, F, ae, l), ae = se.length, i == -1)
2615
+ for (; e(me, se, Le, ae) < 1; )
2616
+ R++, o(se, Le < ae ? Ge : me, ae, l), ae = se.length;
2617
+ } else i === 0 && (R++, se = [0]);
2618
+ ve[d++] = R, se[0] ? se[ae++] = xe[Qe] || 0 : (se = [xe[Qe]], ae = 1);
2619
+ } while ((Qe++ < ft || se[0] != null) && Ee--);
2620
+ k = se[0] != null, ve[0] || ve.splice(0, 1);
2621
+ }
2622
+ if (l == S) {
2623
+ for (d = 1, Ee = ve[0]; Ee >= 10; Ee /= 10, d++) ;
2624
+ H(pe, a + (pe.e = d + m * _ - 1) + 1, u, k);
2625
+ } else
2626
+ pe.e = m, pe.r = +k;
2627
+ return pe;
2628
+ };
2629
+ }();
2630
+ function Ue(t, e, o, c) {
2631
+ var n, a, u, l, i;
2632
+ if (o == null ? o = D : L(o, 0, 8), !t.c) return t.toString();
2633
+ if (n = t.c[0], u = t.e, e == null)
2634
+ i = T(t.c), i = c == 1 || c == 2 && (u <= ie || u >= de) ? Y(i, u) : oe(i, u, "0");
2635
+ else if (t = H(new N(t), e, o), a = t.e, i = T(t.c), l = i.length, c == 1 || c == 2 && (e <= a || a <= ie)) {
2636
+ for (; l < e; i += "0", l++) ;
2637
+ i = Y(i, a);
2638
+ } else if (e -= u + (c === 2 && a > u), i = oe(i, a, "0"), a + 1 > l) {
2639
+ if (--e > 0) for (i += "."; e--; i += "0") ;
2640
+ } else if (e += a - l, e > 0)
2641
+ for (a + 1 == l && (i += "."); e--; i += "0") ;
2642
+ return t.s < 0 && n ? "-" + i : i;
2643
+ }
2644
+ function Be(t, e) {
2645
+ for (var o, c, n = 1, a = new N(t[0]); n < t.length; n++)
2646
+ c = new N(t[n]), (!c.s || (o = V(a, c)) === e || o === 0 && a.s === e) && (a = c);
2647
+ return a;
2648
+ }
2649
+ function Me(t, e, o) {
2650
+ for (var c = 1, n = e.length; !e[--n]; e.pop()) ;
2651
+ for (n = e[0]; n >= 10; n /= 10, c++) ;
2652
+ return (o = c + o * _ - 1) > fe ? t.c = t.e = null : o < Ce ? t.c = [t.e = 0] : (t.e = o, t.c = e), t;
2653
+ }
2654
+ ee = /* @__PURE__ */ function() {
2655
+ var t = /^(-?)0([xbo])(?=\w[\w.]*$)/i, e = /^([^.]+)\.$/, o = /^\.([^.]+)$/, c = /^-?(Infinity|NaN)$/, n = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
2656
+ return function(a, u, l, i) {
2657
+ var m, d = l ? u : u.replace(n, "");
2658
+ if (c.test(d))
2659
+ a.s = isNaN(d) ? null : d < 0 ? -1 : 1;
2660
+ else {
2661
+ if (!l && (d = d.replace(t, function(k, R, F) {
2662
+ return m = (F = F.toLowerCase()) == "x" ? 16 : F == "b" ? 2 : 8, !i || i == m ? R : k;
2663
+ }), i && (m = i, d = d.replace(e, "$1").replace(o, "0.$1")), u != d))
2664
+ return new N(d, m);
2665
+ if (N.DEBUG)
2666
+ throw Error(A + "Not a" + (i ? " base " + i : "") + " number: " + u);
2667
+ a.s = null;
2668
+ }
2669
+ a.c = a.e = null;
2670
+ };
2671
+ }();
2672
+ function H(t, e, o, c) {
2673
+ var n, a, u, l, i, m, d, k = t.c, R = M;
2674
+ if (k) {
2675
+ e: {
2676
+ for (n = 1, l = k[0]; l >= 10; l /= 10, n++) ;
2677
+ if (a = e - n, a < 0)
2678
+ a += _, u = e, i = k[m = 0], d = b(i / R[n - u - 1] % 10);
2679
+ else if (m = h((a + 1) / _), m >= k.length)
2680
+ if (c) {
2681
+ for (; k.length <= m; k.push(0)) ;
2682
+ i = d = 0, n = 1, a %= _, u = a - _ + 1;
2683
+ } else
2684
+ break e;
2685
+ else {
2686
+ for (i = l = k[m], n = 1; l >= 10; l /= 10, n++) ;
2687
+ a %= _, u = a - _ + n, d = u < 0 ? 0 : b(i / R[n - u - 1] % 10);
2688
+ }
2689
+ if (c = c || e < 0 || // Are there any non-zero digits after the rounding digit?
2690
+ // The expression n % pows10[d - j - 1] returns all digits of n to the right
2691
+ // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
2692
+ k[m + 1] != null || (u < 0 ? i : i % R[n - u - 1]), c = o < 4 ? (d || c) && (o == 0 || o == (t.s < 0 ? 3 : 2)) : d > 5 || d == 5 && (o == 4 || c || o == 6 && // Check whether the digit to the left of the rounding digit is odd.
2693
+ (a > 0 ? u > 0 ? i / R[n - u] : 0 : k[m - 1]) % 10 & 1 || o == (t.s < 0 ? 8 : 7)), e < 1 || !k[0])
2694
+ return k.length = 0, c ? (e -= t.e + 1, k[0] = R[(_ - e % _) % _], t.e = -e || 0) : k[0] = t.e = 0, t;
2695
+ if (a == 0 ? (k.length = m, l = 1, m--) : (k.length = m + 1, l = R[_ - a], k[m] = u > 0 ? b(i / R[n - u] % R[u]) * l : 0), c)
2696
+ for (; ; )
2697
+ if (m == 0) {
2698
+ for (a = 1, u = k[0]; u >= 10; u /= 10, a++) ;
2699
+ for (u = k[0] += l, l = 1; u >= 10; u /= 10, l++) ;
2700
+ a != l && (t.e++, k[0] == S && (k[0] = 1));
2701
+ break;
2702
+ } else {
2703
+ if (k[m] += l, k[m] != S) break;
2704
+ k[m--] = 0, l = 1;
2705
+ }
2706
+ for (a = k.length; k[--a] === 0; k.pop()) ;
2707
+ }
2708
+ t.e > fe ? t.c = t.e = null : t.e < Ce && (t.c = [t.e = 0]);
2709
+ }
2710
+ return t;
2711
+ }
2712
+ function B(t) {
2713
+ var e, o = t.e;
2714
+ return o === null ? t.toString() : (e = T(t.c), e = o <= ie || o >= de ? Y(e, o) : oe(e, o, "0"), t.s < 0 ? "-" + e : e);
2715
+ }
2716
+ return $.absoluteValue = $.abs = function() {
2717
+ var t = new N(this);
2718
+ return t.s < 0 && (t.s = 1), t;
2719
+ }, $.comparedTo = function(t, e) {
2720
+ return V(this, new N(t, e));
2721
+ }, $.decimalPlaces = $.dp = function(t, e) {
2722
+ var o, c, n, a = this;
2723
+ if (t != null)
2724
+ return L(t, 0, G), e == null ? e = D : L(e, 0, 8), H(new N(a), t + a.e + 1, e);
2725
+ if (!(o = a.c)) return null;
2726
+ if (c = ((n = o.length - 1) - O(this.e / _)) * _, n = o[n]) for (; n % 10 == 0; n /= 10, c--) ;
2727
+ return c < 0 && (c = 0), c;
2728
+ }, $.dividedBy = $.div = function(t, e) {
2729
+ return I(this, new N(t, e), te, D);
2730
+ }, $.dividedToIntegerBy = $.idiv = function(t, e) {
2731
+ return I(this, new N(t, e), 0, 1);
2732
+ }, $.exponentiatedBy = $.pow = function(t, e) {
2733
+ var o, c, n, a, u, l, i, m, d, k = this;
2734
+ if (t = new N(t), t.c && !t.isInteger())
2735
+ throw Error(A + "Exponent not an integer: " + B(t));
2736
+ if (e != null && (e = new N(e)), l = t.e > 14, !k.c || !k.c[0] || k.c[0] == 1 && !k.e && k.c.length == 1 || !t.c || !t.c[0])
2737
+ return d = new N(Math.pow(+B(k), l ? t.s * (2 - W(t)) : +B(t))), e ? d.mod(e) : d;
2738
+ if (i = t.s < 0, e) {
2739
+ if (e.c ? !e.c[0] : !e.s) return new N(NaN);
2740
+ c = !i && k.isInteger() && e.isInteger(), c && (k = k.mod(e));
2741
+ } else {
2742
+ if (t.e > 9 && (k.e > 0 || k.e < -1 || (k.e == 0 ? k.c[0] > 1 || l && k.c[1] >= 24e7 : k.c[0] < 8e13 || l && k.c[0] <= 9999975e7)))
2743
+ return a = k.s < 0 && W(t) ? -0 : 0, k.e > -1 && (a = 1 / a), new N(i ? 1 / a : a);
2744
+ we && (a = h(we / _ + 2));
2745
+ }
2746
+ for (l ? (o = new N(0.5), i && (t.s = 1), m = W(t)) : (n = Math.abs(+B(t)), m = n % 2), d = new N(re); ; ) {
2747
+ if (m) {
2748
+ if (d = d.times(k), !d.c) break;
2749
+ a ? d.c.length > a && (d.c.length = a) : c && (d = d.mod(e));
2750
+ }
2751
+ if (n) {
2752
+ if (n = b(n / 2), n === 0) break;
2753
+ m = n % 2;
2754
+ } else if (t = t.times(o), H(t, t.e + 1, 1), t.e > 14)
2755
+ m = W(t);
2756
+ else {
2757
+ if (n = +B(t), n === 0) break;
2758
+ m = n % 2;
2759
+ }
2760
+ k = k.times(k), a ? k.c && k.c.length > a && (k.c.length = a) : c && (k = k.mod(e));
2761
+ }
2762
+ return c ? d : (i && (d = re.div(d)), e ? d.mod(e) : a ? H(d, we, D, u) : d);
2763
+ }, $.integerValue = function(t) {
2764
+ var e = new N(this);
2765
+ return t == null ? t = D : L(t, 0, 8), H(e, e.e + 1, t);
2766
+ }, $.isEqualTo = $.eq = function(t, e) {
2767
+ return V(this, new N(t, e)) === 0;
2768
+ }, $.isFinite = function() {
2769
+ return !!this.c;
2770
+ }, $.isGreaterThan = $.gt = function(t, e) {
2771
+ return V(this, new N(t, e)) > 0;
2772
+ }, $.isGreaterThanOrEqualTo = $.gte = function(t, e) {
2773
+ return (e = V(this, new N(t, e))) === 1 || e === 0;
2774
+ }, $.isInteger = function() {
2775
+ return !!this.c && O(this.e / _) > this.c.length - 2;
2776
+ }, $.isLessThan = $.lt = function(t, e) {
2777
+ return V(this, new N(t, e)) < 0;
2778
+ }, $.isLessThanOrEqualTo = $.lte = function(t, e) {
2779
+ return (e = V(this, new N(t, e))) === -1 || e === 0;
2780
+ }, $.isNaN = function() {
2781
+ return !this.s;
2782
+ }, $.isNegative = function() {
2783
+ return this.s < 0;
2784
+ }, $.isPositive = function() {
2785
+ return this.s > 0;
2786
+ }, $.isZero = function() {
2787
+ return !!this.c && this.c[0] == 0;
2788
+ }, $.minus = function(t, e) {
2789
+ var o, c, n, a, u = this, l = u.s;
2790
+ if (t = new N(t, e), e = t.s, !l || !e) return new N(NaN);
2791
+ if (l != e)
2792
+ return t.s = -e, u.plus(t);
2793
+ var i = u.e / _, m = t.e / _, d = u.c, k = t.c;
2794
+ if (!i || !m) {
2795
+ if (!d || !k) return d ? (t.s = -e, t) : new N(k ? u : NaN);
2796
+ if (!d[0] || !k[0])
2797
+ return k[0] ? (t.s = -e, t) : new N(d[0] ? u : (
2798
+ // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
2799
+ D == 3 ? -0 : 0
2800
+ ));
2801
+ }
2802
+ if (i = O(i), m = O(m), d = d.slice(), l = i - m) {
2803
+ for ((a = l < 0) ? (l = -l, n = d) : (m = i, n = k), n.reverse(), e = l; e--; n.push(0)) ;
2804
+ n.reverse();
2805
+ } else
2806
+ for (c = (a = (l = d.length) < (e = k.length)) ? l : e, l = e = 0; e < c; e++)
2807
+ if (d[e] != k[e]) {
2808
+ a = d[e] < k[e];
2809
+ break;
2810
+ }
2811
+ if (a && (n = d, d = k, k = n, t.s = -t.s), e = (c = k.length) - (o = d.length), e > 0) for (; e--; d[o++] = 0) ;
2812
+ for (e = S - 1; c > l; ) {
2813
+ if (d[--c] < k[c]) {
2814
+ for (o = c; o && !d[--o]; d[o] = e) ;
2815
+ --d[o], d[c] += S;
2816
+ }
2817
+ d[c] -= k[c];
2818
+ }
2819
+ for (; d[0] == 0; d.splice(0, 1), --m) ;
2820
+ return d[0] ? Me(t, d, m) : (t.s = D == 3 ? -1 : 1, t.c = [t.e = 0], t);
2821
+ }, $.modulo = $.mod = function(t, e) {
2822
+ var o, c, n = this;
2823
+ return t = new N(t, e), !n.c || !t.s || t.c && !t.c[0] ? new N(NaN) : !t.c || n.c && !n.c[0] ? new N(n) : (be == 9 ? (c = t.s, t.s = 1, o = I(n, t, 0, 3), t.s = c, o.s *= c) : o = I(n, t, 0, be), t = n.minus(o.times(t)), !t.c[0] && be == 1 && (t.s = n.s), t);
2824
+ }, $.multipliedBy = $.times = function(t, e) {
2825
+ var o, c, n, a, u, l, i, m, d, k, R, F, ne, pe, ve, se = this, ae = se.c, ye = (t = new N(t, e)).c;
2826
+ if (!ae || !ye || !ae[0] || !ye[0])
2827
+ return !se.s || !t.s || ae && !ae[0] && !ye || ye && !ye[0] && !ae ? t.c = t.e = t.s = null : (t.s *= se.s, !ae || !ye ? t.c = t.e = null : (t.c = [0], t.e = 0)), t;
2828
+ for (c = O(se.e / _) + O(t.e / _), t.s *= se.s, i = ae.length, k = ye.length, i < k && (ne = ae, ae = ye, ye = ne, n = i, i = k, k = n), n = i + k, ne = []; n--; ne.push(0)) ;
2829
+ for (pe = S, ve = C, n = k; --n >= 0; ) {
2830
+ for (o = 0, R = ye[n] % ve, F = ye[n] / ve | 0, u = i, a = n + u; a > n; )
2831
+ m = ae[--u] % ve, d = ae[u] / ve | 0, l = F * m + d * R, m = R * m + l % ve * ve + ne[a] + o, o = (m / pe | 0) + (l / ve | 0) + F * d, ne[a--] = m % pe;
2832
+ ne[a] = o;
2833
+ }
2834
+ return o ? ++c : ne.splice(0, 1), Me(t, ne, c);
2835
+ }, $.negated = function() {
2836
+ var t = new N(this);
2837
+ return t.s = -t.s || null, t;
2838
+ }, $.plus = function(t, e) {
2839
+ var o, c = this, n = c.s;
2840
+ if (t = new N(t, e), e = t.s, !n || !e) return new N(NaN);
2841
+ if (n != e)
2842
+ return t.s = -e, c.minus(t);
2843
+ var a = c.e / _, u = t.e / _, l = c.c, i = t.c;
2844
+ if (!a || !u) {
2845
+ if (!l || !i) return new N(n / 0);
2846
+ if (!l[0] || !i[0]) return i[0] ? t : new N(l[0] ? c : n * 0);
2847
+ }
2848
+ if (a = O(a), u = O(u), l = l.slice(), n = a - u) {
2849
+ for (n > 0 ? (u = a, o = i) : (n = -n, o = l), o.reverse(); n--; o.push(0)) ;
2850
+ o.reverse();
2851
+ }
2852
+ for (n = l.length, e = i.length, n - e < 0 && (o = i, i = l, l = o, e = n), n = 0; e; )
2853
+ n = (l[--e] = l[e] + i[e] + n) / S | 0, l[e] = S === l[e] ? 0 : l[e] % S;
2854
+ return n && (l = [n].concat(l), ++u), Me(t, l, u);
2855
+ }, $.precision = $.sd = function(t, e) {
2856
+ var o, c, n, a = this;
2857
+ if (t != null && t !== !!t)
2858
+ return L(t, 1, G), e == null ? e = D : L(e, 0, 8), H(new N(a), t, e);
2859
+ if (!(o = a.c)) return null;
2860
+ if (n = o.length - 1, c = n * _ + 1, n = o[n]) {
2861
+ for (; n % 10 == 0; n /= 10, c--) ;
2862
+ for (n = o[0]; n >= 10; n /= 10, c++) ;
2863
+ }
2864
+ return t && a.e + 1 > c && (c = a.e + 1), c;
2865
+ }, $.shiftedBy = function(t) {
2866
+ return L(t, -x, x), this.times("1e" + t);
2867
+ }, $.squareRoot = $.sqrt = function() {
2868
+ var t, e, o, c, n, a = this, u = a.c, l = a.s, i = a.e, m = te + 4, d = new N("0.5");
2869
+ if (l !== 1 || !u || !u[0])
2870
+ return new N(!l || l < 0 && (!u || u[0]) ? NaN : u ? a : 1 / 0);
2871
+ if (l = Math.sqrt(+B(a)), l == 0 || l == 1 / 0 ? (e = T(u), (e.length + i) % 2 == 0 && (e += "0"), l = Math.sqrt(+e), i = O((i + 1) / 2) - (i < 0 || i % 2), l == 1 / 0 ? e = "5e" + i : (e = l.toExponential(), e = e.slice(0, e.indexOf("e") + 1) + i), o = new N(e)) : o = new N(l + ""), o.c[0]) {
2872
+ for (i = o.e, l = i + m, l < 3 && (l = 0); ; )
2873
+ if (n = o, o = d.times(n.plus(I(a, n, m, 1))), T(n.c).slice(0, l) === (e = T(o.c)).slice(0, l))
2874
+ if (o.e < i && --l, e = e.slice(l - 3, l + 1), e == "9999" || !c && e == "4999") {
2875
+ if (!c && (H(n, n.e + te + 2, 0), n.times(n).eq(a))) {
2876
+ o = n;
2877
+ break;
2878
+ }
2879
+ m += 4, l += 4, c = 1;
2880
+ } else {
2881
+ (!+e || !+e.slice(1) && e.charAt(0) == "5") && (H(o, o.e + te + 2, 1), t = !o.times(o).eq(a));
2882
+ break;
2883
+ }
2884
+ }
2885
+ return H(o, o.e + te + 1, D, t);
2886
+ }, $.toExponential = function(t, e) {
2887
+ return t != null && (L(t, 0, G), t++), Ue(this, t, e, 1);
2888
+ }, $.toFixed = function(t, e) {
2889
+ return t != null && (L(t, 0, G), t = t + this.e + 1), Ue(this, t, e);
2890
+ }, $.toFormat = function(t, e, o) {
2891
+ var c, n = this;
2892
+ if (o == null)
2893
+ t != null && e && typeof e == "object" ? (o = e, e = null) : t && typeof t == "object" ? (o = t, t = e = null) : o = Te;
2894
+ else if (typeof o != "object")
2895
+ throw Error(A + "Argument not an object: " + o);
2896
+ if (c = n.toFixed(t, e), n.c) {
2897
+ var a, u = c.split("."), l = +o.groupSize, i = +o.secondaryGroupSize, m = o.groupSeparator || "", d = u[0], k = u[1], R = n.s < 0, F = R ? d.slice(1) : d, ne = F.length;
2898
+ if (i && (a = l, l = i, i = a, ne -= a), l > 0 && ne > 0) {
2899
+ for (a = ne % l || l, d = F.substr(0, a); a < ne; a += l) d += m + F.substr(a, l);
2900
+ i > 0 && (d += m + F.slice(a)), R && (d = "-" + d);
2901
+ }
2902
+ c = k ? d + (o.decimalSeparator || "") + ((i = +o.fractionGroupSize) ? k.replace(
2903
+ new RegExp("\\d{" + i + "}\\B", "g"),
2904
+ "$&" + (o.fractionGroupSeparator || "")
2905
+ ) : k) : d;
2906
+ }
2907
+ return (o.prefix || "") + c + (o.suffix || "");
2908
+ }, $.toFraction = function(t) {
2909
+ var e, o, c, n, a, u, l, i, m, d, k, R, F = this, ne = F.c;
2910
+ if (t != null && (l = new N(t), !l.isInteger() && (l.c || l.s !== 1) || l.lt(re)))
2911
+ throw Error(A + "Argument " + (l.isInteger() ? "out of range: " : "not an integer: ") + B(l));
2912
+ if (!ne) return new N(F);
2913
+ for (e = new N(re), m = o = new N(re), c = i = new N(re), R = T(ne), a = e.e = R.length - F.e - 1, e.c[0] = M[(u = a % _) < 0 ? _ + u : u], t = !t || l.comparedTo(e) > 0 ? a > 0 ? e : m : l, u = fe, fe = 1 / 0, l = new N(R), i.c[0] = 0; d = I(l, e, 0, 1), n = o.plus(d.times(c)), n.comparedTo(t) != 1; )
2914
+ o = c, c = n, m = i.plus(d.times(n = m)), i = n, e = l.minus(d.times(n = e)), l = n;
2915
+ return n = I(t.minus(o), c, 0, 1), i = i.plus(n.times(m)), o = o.plus(n.times(c)), i.s = m.s = F.s, a = a * 2, k = I(m, c, a, D).minus(F).abs().comparedTo(
2916
+ I(i, o, a, D).minus(F).abs()
2917
+ ) < 1 ? [m, c] : [i, o], fe = u, k;
2918
+ }, $.toNumber = function() {
2919
+ return +B(this);
2920
+ }, $.toPrecision = function(t, e) {
2921
+ return t != null && L(t, 1, G), Ue(this, t, e, 2);
2922
+ }, $.toString = function(t) {
2923
+ var e, o = this, c = o.s, n = o.e;
2924
+ return n === null ? c ? (e = "Infinity", c < 0 && (e = "-" + e)) : e = "NaN" : (t == null ? e = n <= ie || n >= de ? Y(T(o.c), n) : oe(T(o.c), n, "0") : t === 10 && Oe ? (o = H(new N(o), te + n + 1, D), e = oe(T(o.c), o.e, "0")) : (L(t, 2, Ne.length, "Base"), e = J(oe(T(o.c), n, "0"), 10, t, c, !0)), c < 0 && o.c[0] && (e = "-" + e)), e;
2925
+ }, $.valueOf = $.toJSON = function() {
2926
+ return B(this);
2927
+ }, $._isBigNumber = !0, U != null && N.set(U), N;
2928
+ }
2929
+ function O(U) {
2930
+ var I = U | 0;
2931
+ return U > 0 || U === I ? I : I - 1;
2932
+ }
2933
+ function T(U) {
2934
+ for (var I, J, ee = 1, $ = U.length, re = U[0] + ""; ee < $; ) {
2935
+ for (I = U[ee++] + "", J = _ - I.length; J--; I = "0" + I) ;
2936
+ re += I;
2937
+ }
2938
+ for ($ = re.length; re.charCodeAt(--$) === 48; ) ;
2939
+ return re.slice(0, $ + 1 || 1);
2940
+ }
2941
+ function V(U, I) {
2942
+ var J, ee, $ = U.c, re = I.c, te = U.s, D = I.s, ie = U.e, de = I.e;
2943
+ if (!te || !D) return null;
2944
+ if (J = $ && !$[0], ee = re && !re[0], J || ee) return J ? ee ? 0 : -D : te;
2945
+ if (te != D) return te;
2946
+ if (J = te < 0, ee = ie == de, !$ || !re) return ee ? 0 : !$ ^ J ? 1 : -1;
2947
+ if (!ee) return ie > de ^ J ? 1 : -1;
2948
+ for (D = (ie = $.length) < (de = re.length) ? ie : de, te = 0; te < D; te++) if ($[te] != re[te]) return $[te] > re[te] ^ J ? 1 : -1;
2949
+ return ie == de ? 0 : ie > de ^ J ? 1 : -1;
2950
+ }
2951
+ function L(U, I, J, ee) {
2952
+ if (U < I || U > J || U !== b(U))
2953
+ throw Error(A + (ee || "Argument") + (typeof U == "number" ? U < I || U > J ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(U));
2954
+ }
2955
+ function W(U) {
2956
+ var I = U.c.length - 1;
2957
+ return O(U.e / _) == I && U.c[I] % 2 != 0;
2958
+ }
2959
+ function Y(U, I) {
2960
+ return (U.length > 1 ? U.charAt(0) + "." + U.slice(1) : U) + (I < 0 ? "e" : "e+") + I;
2961
+ }
2962
+ function oe(U, I, J) {
2963
+ var ee, $;
2964
+ if (I < 0) {
2965
+ for ($ = J + "."; ++I; $ += J) ;
2966
+ U = $ + U;
2967
+ } else if (ee = U.length, ++I > ee) {
2968
+ for ($ = J, I -= ee; --I; $ += J) ;
2969
+ U += $;
2970
+ } else I < ee && (U = U.slice(0, I) + "." + U.slice(I));
2971
+ return U;
2972
+ }
2973
+ v = Q(), v.default = v.BigNumber = v, r.exports ? r.exports = v : (f || (f = typeof self < "u" && self ? self : window), f.BigNumber = v);
2974
+ })(Vr);
2975
+ })(qt);
2976
+ var Gt = qt.exports;
2977
+ (function(r) {
2978
+ var f = Gt, v = r.exports;
2979
+ (function() {
2980
+ var p = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, h, b, A = {
2981
+ // table of character substitutions
2982
+ "\b": "\\b",
2983
+ " ": "\\t",
2984
+ "\n": "\\n",
2985
+ "\f": "\\f",
2986
+ "\r": "\\r",
2987
+ '"': '\\"',
2988
+ "\\": "\\\\"
2989
+ }, g;
2990
+ function S(x) {
2991
+ return p.lastIndex = 0, p.test(x) ? '"' + x.replace(p, function(M) {
2992
+ var C = A[M];
2993
+ return typeof C == "string" ? C : "\\u" + ("0000" + M.charCodeAt(0).toString(16)).slice(-4);
2994
+ }) + '"' : '"' + x + '"';
2995
+ }
2996
+ function _(x, M) {
2997
+ var C, G, Q, O, T = h, V, L = M[x], W = L != null && (L instanceof f || f.isBigNumber(L));
2998
+ switch (L && typeof L == "object" && typeof L.toJSON == "function" && (L = L.toJSON(x)), typeof g == "function" && (L = g.call(M, x, L)), typeof L) {
2999
+ case "string":
3000
+ return W ? L : S(L);
3001
+ case "number":
3002
+ return isFinite(L) ? String(L) : "null";
3003
+ case "boolean":
3004
+ case "null":
3005
+ case "bigint":
3006
+ return String(L);
3007
+ case "object":
3008
+ if (!L)
3009
+ return "null";
3010
+ if (h += b, V = [], Object.prototype.toString.apply(L) === "[object Array]") {
3011
+ for (O = L.length, C = 0; C < O; C += 1)
3012
+ V[C] = _(C, L) || "null";
3013
+ return Q = V.length === 0 ? "[]" : h ? `[
3014
+ ` + h + V.join(`,
3015
+ ` + h) + `
3016
+ ` + T + "]" : "[" + V.join(",") + "]", h = T, Q;
3017
+ }
3018
+ if (g && typeof g == "object")
3019
+ for (O = g.length, C = 0; C < O; C += 1)
3020
+ typeof g[C] == "string" && (G = g[C], Q = _(G, L), Q && V.push(S(G) + (h ? ": " : ":") + Q));
3021
+ else
3022
+ Object.keys(L).forEach(function(Y) {
3023
+ var oe = _(Y, L);
3024
+ oe && V.push(S(Y) + (h ? ": " : ":") + oe);
3025
+ });
3026
+ return Q = V.length === 0 ? "{}" : h ? `{
3027
+ ` + h + V.join(`,
3028
+ ` + h) + `
3029
+ ` + T + "}" : "{" + V.join(",") + "}", h = T, Q;
3030
+ }
3031
+ }
3032
+ typeof v.stringify != "function" && (v.stringify = function(x, M, C) {
3033
+ var G;
3034
+ if (h = "", b = "", typeof C == "number")
3035
+ for (G = 0; G < C; G += 1)
3036
+ b += " ";
3037
+ else typeof C == "string" && (b = C);
3038
+ if (g = M, M && typeof M != "function" && (typeof M != "object" || typeof M.length != "number"))
3039
+ throw new Error("JSON.stringify");
3040
+ return _("", { "": x });
3041
+ });
3042
+ })();
3043
+ })(jt);
3044
+ var qr = jt.exports, st = null;
3045
+ const Gr = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/, Kr = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;
3046
+ var Hr = function(r) {
3047
+ var f = {
3048
+ strict: !1,
3049
+ // not being strict means do not generate syntax errors for "duplicate key"
3050
+ storeAsString: !1,
3051
+ // toggles whether the values should be stored as BigNumber (default) or a string
3052
+ alwaysParseAsBig: !1,
3053
+ // toggles whether all numbers should be Big
3054
+ useNativeBigInt: !1,
3055
+ // toggles whether to use native BigInt instead of bignumber.js
3056
+ protoAction: "error",
3057
+ constructorAction: "error"
3058
+ };
3059
+ if (r != null) {
3060
+ if (r.strict === !0 && (f.strict = !0), r.storeAsString === !0 && (f.storeAsString = !0), f.alwaysParseAsBig = r.alwaysParseAsBig === !0 ? r.alwaysParseAsBig : !1, f.useNativeBigInt = r.useNativeBigInt === !0 ? r.useNativeBigInt : !1, typeof r.constructorAction < "u")
3061
+ if (r.constructorAction === "error" || r.constructorAction === "ignore" || r.constructorAction === "preserve")
3062
+ f.constructorAction = r.constructorAction;
3063
+ else
3064
+ throw new Error(
3065
+ `Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${r.constructorAction}`
3066
+ );
3067
+ if (typeof r.protoAction < "u")
3068
+ if (r.protoAction === "error" || r.protoAction === "ignore" || r.protoAction === "preserve")
3069
+ f.protoAction = r.protoAction;
3070
+ else
3071
+ throw new Error(
3072
+ `Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${r.protoAction}`
3073
+ );
3074
+ }
3075
+ var v, p, h = {
3076
+ '"': '"',
3077
+ "\\": "\\",
3078
+ "/": "/",
3079
+ b: "\b",
3080
+ f: "\f",
3081
+ n: `
3082
+ `,
3083
+ r: "\r",
3084
+ t: " "
3085
+ }, b, A = function(O) {
3086
+ throw {
3087
+ name: "SyntaxError",
3088
+ message: O,
3089
+ at: v,
3090
+ text: b
3091
+ };
3092
+ }, g = function(O) {
3093
+ return O && O !== p && A("Expected '" + O + "' instead of '" + p + "'"), p = b.charAt(v), v += 1, p;
3094
+ }, S = function() {
3095
+ var O, T = "";
3096
+ for (p === "-" && (T = "-", g("-")); p >= "0" && p <= "9"; )
3097
+ T += p, g();
3098
+ if (p === ".")
3099
+ for (T += "."; g() && p >= "0" && p <= "9"; )
3100
+ T += p;
3101
+ if (p === "e" || p === "E")
3102
+ for (T += p, g(), (p === "-" || p === "+") && (T += p, g()); p >= "0" && p <= "9"; )
3103
+ T += p, g();
3104
+ if (O = +T, !isFinite(O))
3105
+ A("Bad number");
3106
+ else
3107
+ return st == null && (st = Gt), T.length > 15 ? f.storeAsString ? T : f.useNativeBigInt ? BigInt(T) : new st(T) : f.alwaysParseAsBig ? f.useNativeBigInt ? BigInt(O) : new st(O) : O;
3108
+ }, _ = function() {
3109
+ var O, T, V = "", L;
3110
+ if (p === '"')
3111
+ for (var W = v; g(); ) {
3112
+ if (p === '"')
3113
+ return v - 1 > W && (V += b.substring(W, v - 1)), g(), V;
3114
+ if (p === "\\") {
3115
+ if (v - 1 > W && (V += b.substring(W, v - 1)), g(), p === "u") {
3116
+ for (L = 0, T = 0; T < 4 && (O = parseInt(g(), 16), !!isFinite(O)); T += 1)
3117
+ L = L * 16 + O;
3118
+ V += String.fromCharCode(L);
3119
+ } else if (typeof h[p] == "string")
3120
+ V += h[p];
3121
+ else
3122
+ break;
3123
+ W = v;
3124
+ }
3125
+ }
3126
+ A("Bad string");
3127
+ }, x = function() {
3128
+ for (; p && p <= " "; )
3129
+ g();
3130
+ }, M = function() {
3131
+ switch (p) {
3132
+ case "t":
3133
+ return g("t"), g("r"), g("u"), g("e"), !0;
3134
+ case "f":
3135
+ return g("f"), g("a"), g("l"), g("s"), g("e"), !1;
3136
+ case "n":
3137
+ return g("n"), g("u"), g("l"), g("l"), null;
3138
+ }
3139
+ A("Unexpected '" + p + "'");
3140
+ }, C, G = function() {
3141
+ var O = [];
3142
+ if (p === "[") {
3143
+ if (g("["), x(), p === "]")
3144
+ return g("]"), O;
3145
+ for (; p; ) {
3146
+ if (O.push(C()), x(), p === "]")
3147
+ return g("]"), O;
3148
+ g(","), x();
3149
+ }
3150
+ }
3151
+ A("Bad array");
3152
+ }, Q = function() {
3153
+ var O, T = /* @__PURE__ */ Object.create(null);
3154
+ if (p === "{") {
3155
+ if (g("{"), x(), p === "}")
3156
+ return g("}"), T;
3157
+ for (; p; ) {
3158
+ if (O = _(), x(), g(":"), f.strict === !0 && Object.hasOwnProperty.call(T, O) && A('Duplicate key "' + O + '"'), Gr.test(O) === !0 ? f.protoAction === "error" ? A("Object contains forbidden prototype property") : f.protoAction === "ignore" ? C() : T[O] = C() : Kr.test(O) === !0 ? f.constructorAction === "error" ? A("Object contains forbidden constructor property") : f.constructorAction === "ignore" ? C() : T[O] = C() : T[O] = C(), x(), p === "}")
3159
+ return g("}"), T;
3160
+ g(","), x();
3161
+ }
3162
+ }
3163
+ A("Bad object");
3164
+ };
3165
+ return C = function() {
3166
+ switch (x(), p) {
3167
+ case "{":
3168
+ return Q();
3169
+ case "[":
3170
+ return G();
3171
+ case '"':
3172
+ return _();
3173
+ case "-":
3174
+ return S();
3175
+ default:
3176
+ return p >= "0" && p <= "9" ? S() : M();
3177
+ }
3178
+ }, function(O, T) {
3179
+ var V;
3180
+ return b = O + "", v = 0, p = " ", V = C(), x(), p && A("Syntax error"), typeof T == "function" ? function L(W, Y) {
3181
+ var oe, U = W[Y];
3182
+ return U && typeof U == "object" && Object.keys(U).forEach(function(I) {
3183
+ oe = L(U, I), oe !== void 0 ? U[I] = oe : delete U[I];
3184
+ }), T.call(W, Y, U);
3185
+ }({ "": V }, "") : V;
3186
+ };
3187
+ }, Wr = Hr, Kt = qr.stringify, Ht = Wr;
3188
+ dt.exports = function(r) {
3189
+ return {
3190
+ parse: Ht(r),
3191
+ stringify: Kt
3192
+ };
3193
+ };
3194
+ dt.exports.parse = Ht();
3195
+ dt.exports.stringify = Kt;
3196
+ var Xr = dt.exports;
3197
+ const Yr = /* @__PURE__ */ jr(Xr), Jr = Yr({ storeAsString: !0 }), Zr = () => {
3198
+ const r = os.create({
3199
+ baseURL: void 0,
3200
+ timeout: 3e4,
3201
+ headers: {
3202
+ "Content-Type": "application/json"
3203
+ },
3204
+ // 使用 json-bigint 解析响应数据,避免大整数精度丢失
3205
+ transformResponse: [
3206
+ (f) => {
3207
+ if (typeof f == "string")
3208
+ try {
3209
+ return Jr.parse(f);
3210
+ } catch {
3211
+ return f;
3212
+ }
3213
+ return f;
3214
+ }
3215
+ ]
3216
+ });
3217
+ return r.interceptors.request.use(
3218
+ (f) => {
3219
+ const v = ut(), p = fs() || "Bearer";
3220
+ return v && (f.headers.Authorization = `${p} ${v}`), f;
3221
+ },
3222
+ (f) => Promise.reject(f)
3223
+ ), r.interceptors.response.use(
3224
+ (f) => {
3225
+ const { data: v } = f;
3226
+ return v.code === 200 || v.code === 0 ? v.data : v.code === 9121 ? (Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login", Promise.reject(new Error(v.message || "EXPIRED OR INVALID TOKEN"))) : (Ie.error(v.message || "请求失败"), Promise.reject(new Error(v.message || "请求失败")));
3227
+ },
3228
+ (f) => {
3229
+ var p;
3230
+ const { response: v } = f;
3231
+ if (v) {
3232
+ const { data: h } = v;
3233
+ if ((h == null ? void 0 : h.code) === 9121)
3234
+ return Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login", Promise.reject(f);
3235
+ switch (v.status) {
3236
+ case 401:
3237
+ Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login";
3238
+ break;
3239
+ case 403:
3240
+ Ie.error("没有权限访问");
3241
+ break;
3242
+ case 404:
3243
+ Ie.error("请求资源不存在");
3244
+ break;
3245
+ case 500:
3246
+ Ie.error("服务器错误");
3247
+ break;
3248
+ default:
3249
+ Ie.error(((p = v.data) == null ? void 0 : p.message) || "请求失败");
3250
+ }
3251
+ } else
3252
+ Ie.error("网络连接失败");
3253
+ return Promise.reject(f);
3254
+ }
3255
+ ), r;
3256
+ }, Fe = Zr(), ue = {
3257
+ get(r, f) {
3258
+ return Fe.get(r, f);
3259
+ },
3260
+ post(r, f, v) {
3261
+ return Fe.post(r, f, v);
3262
+ },
3263
+ put(r, f, v) {
3264
+ return Fe.put(r, f, v);
3265
+ },
3266
+ patch(r, f, v) {
3267
+ return Fe.patch(r, f, v);
3268
+ },
3269
+ delete(r, f) {
3270
+ return Fe.delete(r, f);
3271
+ },
3272
+ // 文件下载 - 返回 Blob 对象
3273
+ download(r, f) {
3274
+ return Fe.get(r, { ...f, responseType: "blob" });
3275
+ }
3276
+ };
3277
+ function Qr(r) {
3278
+ return ue.post("/user/v1.0/login/by-domain", r);
3279
+ }
3280
+ function Ha() {
3281
+ return ue.put("/user/v1.0/user/logout");
3282
+ }
3283
+ function ea() {
3284
+ return ue.get("/user/v1.0/user/get-me");
3285
+ }
3286
+ function Wa(r) {
3287
+ return ue.post("/user/v1.0/refresh", { refreshToken: r });
3288
+ }
3289
+ const ta = { class: "login-page" }, sa = { class: "login-form-section" }, na = { class: "form-container" }, oa = { class: "input-wrapper" }, ra = { class: "input-wrapper" }, aa = { class: "form-options" }, la = { key: 0 }, ia = { key: 1 }, ca = /* @__PURE__ */ Ae({
3290
+ __name: "index",
3291
+ setup(r) {
3292
+ const f = Pe(), v = qe(), p = P(!1), h = P(!1), b = kt({
3293
+ uid: "",
3294
+ password: ""
3295
+ }), A = {
3296
+ uid: [
3297
+ { required: !0, message: "请输入用户名", trigger: "blur" }
3298
+ ],
3299
+ password: [
3300
+ { required: !0, message: "请输入密码", trigger: "blur" },
3301
+ { min: 6, message: "密码长度至少6位", trigger: "blur" }
3302
+ ]
3303
+ }, g = P(), S = async () => {
3304
+ var _;
3305
+ try {
3306
+ await ((_ = g.value) == null ? void 0 : _.validate()), p.value = !0;
3307
+ const x = await Qr({
3308
+ appId: ct(),
3309
+ clientId: zt(),
3310
+ uid: b.uid,
3311
+ password: b.password,
3312
+ code: !0
3313
+ });
3314
+ Dt(x), Ie.success("登录成功");
3315
+ const M = v.query.redirect || "/";
3316
+ f.push(M);
3317
+ } catch (x) {
3318
+ console.error("登录失败:", x);
3319
+ } finally {
3320
+ p.value = !1;
3321
+ }
3322
+ };
3323
+ return (_, x) => (w(), E("div", ta, [
3324
+ x[10] || (x[10] = nt('<div class="login-brand" data-v-15fc7de5><div class="brand-content" data-v-15fc7de5><div class="brand-logo" data-v-15fc7de5><div class="logo-icon" data-v-15fc7de5><svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-15fc7de5><rect width="48" height="48" rx="12" fill="currentColor" data-v-15fc7de5></rect><path d="M14 24L20 30L34 16" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" data-v-15fc7de5></path></svg></div><span class="logo-text" data-v-15fc7de5>XTO</span></div><div class="brand-slogan" data-v-15fc7de5><h1 data-v-15fc7de5>企业级后台管理解决方案</h1><p data-v-15fc7de5>开箱即用的中后台前端/设计解决方案</p></div><div class="brand-features" data-v-15fc7de5><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>高性能</h4><p data-v-15fc7de5>极致的渲染性能与响应速度</p></div></div><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><rect x="3" y="3" width="18" height="18" rx="2" data-v-15fc7de5></rect><path d="M9 9h6M9 12h6M9 15h4" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>丰富组件</h4><p data-v-15fc7de5>60+ 高质量业务组件</p></div></div><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><circle cx="12" cy="12" r="10" data-v-15fc7de5></circle><path d="M12 6v6l4 2" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>持续更新</h4><p data-v-15fc7de5>活跃的社区与快速迭代</p></div></div></div><div class="brand-decoration" data-v-15fc7de5><div class="decoration-line" data-v-15fc7de5></div><div class="decoration-dots" data-v-15fc7de5><span data-v-15fc7de5></span><span data-v-15fc7de5></span><span data-v-15fc7de5></span></div></div></div><div class="brand-bg" data-v-15fc7de5><div class="bg-grid" data-v-15fc7de5></div><div class="bg-glow" data-v-15fc7de5></div><div class="bg-pattern" data-v-15fc7de5></div></div></div>', 1)),
3325
+ s("div", sa, [
3326
+ s("div", na, [
3327
+ x[7] || (x[7] = s("div", { class: "form-header" }, [
3328
+ s("h2", null, "欢迎登录"),
3329
+ s("p", null, "请输入您的账户信息")
3330
+ ], -1)),
3331
+ z(y(ss), {
3332
+ ref_key: "formRef",
3333
+ ref: g,
3334
+ model: b,
3335
+ rules: A,
3336
+ class: "login-form",
3337
+ "label-width": "0"
3338
+ }, {
3339
+ default: X(() => [
3340
+ z(y(mt), { prop: "uid" }, {
3341
+ default: X(() => [
3342
+ s("div", oa, [
3343
+ x[3] || (x[3] = s("label", { class: "input-label" }, "用户名", -1)),
3344
+ z(y(Ot), {
3345
+ modelValue: b.uid,
3346
+ "onUpdate:modelValue": x[0] || (x[0] = (M) => b.uid = M),
3347
+ placeholder: "请输入用户名",
3348
+ size: "large"
3349
+ }, {
3350
+ prefix: X(() => [
3351
+ z(y(Z), {
3352
+ name: "user",
3353
+ size: 18
3354
+ })
3355
+ ]),
3356
+ _: 1
3357
+ }, 8, ["modelValue"])
3358
+ ])
3359
+ ]),
3360
+ _: 1
3361
+ }),
3362
+ z(y(mt), { prop: "password" }, {
3363
+ default: X(() => [
3364
+ s("div", ra, [
3365
+ x[4] || (x[4] = s("label", { class: "input-label" }, "密码", -1)),
3366
+ z(y(Ot), {
3367
+ modelValue: b.password,
3368
+ "onUpdate:modelValue": x[1] || (x[1] = (M) => b.password = M),
3369
+ type: "password",
3370
+ placeholder: "请输入密码",
3371
+ size: "large",
3372
+ "show-password": "",
3373
+ onKeyup: Qt(S, ["enter"])
3374
+ }, {
3375
+ prefix: X(() => [
3376
+ z(y(Z), {
3377
+ name: "lock",
3378
+ size: 18
3379
+ })
3380
+ ]),
3381
+ _: 1
3382
+ }, 8, ["modelValue"])
3383
+ ])
3384
+ ]),
3385
+ _: 1
3386
+ }),
3387
+ s("div", aa, [
3388
+ z(y(ns), {
3389
+ modelValue: h.value,
3390
+ "onUpdate:modelValue": x[2] || (x[2] = (M) => h.value = M)
3391
+ }, {
3392
+ default: X(() => [...x[5] || (x[5] = [
3393
+ Re("记住我", -1)
3394
+ ])]),
3395
+ _: 1
3396
+ }, 8, ["modelValue"]),
3397
+ x[6] || (x[6] = s("a", {
3398
+ href: "#",
3399
+ class: "forgot-link"
3400
+ }, "忘记密码?", -1))
3401
+ ]),
3402
+ z(y(mt), null, {
3403
+ default: X(() => [
3404
+ z(y(je), {
3405
+ type: "primary",
3406
+ size: "large",
3407
+ loading: p.value,
3408
+ class: "login-btn",
3409
+ onClick: S
3410
+ }, {
3411
+ default: X(() => [
3412
+ p.value ? (w(), E("span", ia, "登录中...")) : (w(), E("span", la, "登 录"))
3413
+ ]),
3414
+ _: 1
3415
+ }, 8, ["loading"])
3416
+ ]),
3417
+ _: 1
3418
+ })
3419
+ ]),
3420
+ _: 1
3421
+ }, 8, ["model"]),
3422
+ x[8] || (x[8] = nt('<div class="form-footer" data-v-15fc7de5><p data-v-15fc7de5>其他登录方式</p><div class="social-login" data-v-15fc7de5><button class="social-btn" title="企业微信" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" data-v-15fc7de5></path></svg></button><button class="social-btn" title="钉钉" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 00-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z" data-v-15fc7de5></path></svg></button><button class="social-btn" title="飞书" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" data-v-15fc7de5></path></svg></button></div></div>', 1))
3423
+ ]),
3424
+ x[9] || (x[9] = s("div", { class: "copyright" }, [
3425
+ s("p", null, "© 2024 XTO Team. All rights reserved.")
3426
+ ], -1))
3427
+ ])
3428
+ ]));
3429
+ }
3430
+ }), ua = /* @__PURE__ */ Se(ca, [["__scopeId", "data-v-15fc7de5"]]), da = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3431
+ __proto__: null,
3432
+ default: ua
3433
+ }, Symbol.toStringTag, { value: "Module" })), fa = { class: "error-page" }, pa = { class: "error-container" }, ma = { class: "error-content" }, ha = { class: "error-actions" }, va = /* @__PURE__ */ Ae({
3434
+ __name: "404",
3435
+ setup(r) {
3436
+ const f = Pe(), v = () => {
3437
+ f.push("/");
3438
+ };
3439
+ return (p, h) => (w(), E("div", fa, [
3440
+ s("div", pa, [
3441
+ h[7] || (h[7] = s("div", { class: "error-bg" }, [
3442
+ s("div", { class: "bg-circle circle-1" }),
3443
+ s("div", { class: "bg-circle circle-2" }),
3444
+ s("div", { class: "bg-circle circle-3" })
3445
+ ], -1)),
3446
+ s("div", ma, [
3447
+ h[5] || (h[5] = nt('<div class="error-code" data-v-3a9e61ae><span class="code-digit" data-v-3a9e61ae>4</span><span class="code-zero" data-v-3a9e61ae><span class="zero-inner" data-v-3a9e61ae>0</span></span><span class="code-digit" data-v-3a9e61ae>4</span></div><div class="error-illustration" data-v-3a9e61ae><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-3a9e61ae><rect x="40" y="20" width="120" height="80" rx="8" fill="var(--color-fill)" stroke="var(--color-border)" stroke-width="2" data-v-3a9e61ae></rect><rect x="50" y="30" width="100" height="60" rx="4" fill="var(--bg-color)" data-v-3a9e61ae></rect><line x1="60" y1="45" x2="140" y2="45" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><line x1="60" y1="55" x2="120" y2="55" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><line x1="60" y1="65" x2="100" y2="65" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><text x="100" y="75" text-anchor="middle" fill="var(--color-primary)" font-size="24" font-weight="600" data-v-3a9e61ae>?</text><circle cx="150" cy="35" r="12" stroke="var(--color-primary)" stroke-width="2" fill="none" data-v-3a9e61ae></circle><line x1="158" y1="43" x2="168" y2="53" stroke="var(--color-primary)" stroke-width="2" stroke-linecap="round" data-v-3a9e61ae></line></svg></div><h1 class="error-title" data-v-3a9e61ae>页面不存在</h1><p class="error-desc" data-v-3a9e61ae>抱歉,您访问的页面不存在或已被删除</p>', 4)),
3448
+ s("div", ha, [
3449
+ z(y(je), {
3450
+ type: "primary",
3451
+ size: "large",
3452
+ onClick: v
3453
+ }, {
3454
+ icon: X(() => [...h[1] || (h[1] = [
3455
+ s("svg", {
3456
+ viewBox: "0 0 24 24",
3457
+ fill: "none",
3458
+ stroke: "currentColor",
3459
+ "stroke-width": "2"
3460
+ }, [
3461
+ s("path", { d: "M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" }),
3462
+ s("polyline", { points: "9,22 9,12 15,12 15,22" })
3463
+ ], -1)
3464
+ ])]),
3465
+ default: X(() => [
3466
+ h[2] || (h[2] = Re(" 返回首页 ", -1))
3467
+ ]),
3468
+ _: 1
3469
+ }),
3470
+ z(y(je), {
3471
+ size: "large",
3472
+ onClick: h[0] || (h[0] = (b) => y(f).go(-1))
3473
+ }, {
3474
+ icon: X(() => [...h[3] || (h[3] = [
3475
+ s("svg", {
3476
+ viewBox: "0 0 24 24",
3477
+ fill: "none",
3478
+ stroke: "currentColor",
3479
+ "stroke-width": "2"
3480
+ }, [
3481
+ s("path", { d: "M19 12H5M12 19l-7-7 7-7" })
3482
+ ], -1)
3483
+ ])]),
3484
+ default: X(() => [
3485
+ h[4] || (h[4] = Re(" 返回上一页 ", -1))
3486
+ ]),
3487
+ _: 1
3488
+ })
3489
+ ]),
3490
+ h[6] || (h[6] = s("div", { class: "error-tip" }, [
3491
+ s("p", null, "您可以尝试:"),
3492
+ s("ul", null, [
3493
+ s("li", null, "检查您输入的网址是否正确"),
3494
+ s("li", null, "返回首页重新浏览"),
3495
+ s("li", null, "联系管理员反馈问题")
3496
+ ])
3497
+ ], -1))
3498
+ ])
3499
+ ])
3500
+ ]));
3501
+ }
3502
+ }), ga = /* @__PURE__ */ Se(va, [["__scopeId", "data-v-3a9e61ae"]]), Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3503
+ __proto__: null,
3504
+ default: ga
3505
+ }, Symbol.toStringTag, { value: "Module" })), _a = { class: "error-page" }, wa = { class: "error-container" }, ya = { class: "error-content" }, ka = { class: "error-actions" }, ba = /* @__PURE__ */ Ae({
3506
+ __name: "403",
3507
+ setup(r) {
3508
+ const f = Pe(), v = () => {
3509
+ f.push("/");
3510
+ };
3511
+ return (p, h) => (w(), E("div", _a, [
3512
+ s("div", wa, [
3513
+ h[7] || (h[7] = s("div", { class: "error-bg" }, [
3514
+ s("div", { class: "bg-circle circle-1" }),
3515
+ s("div", { class: "bg-circle circle-2" }),
3516
+ s("div", { class: "bg-circle circle-3" })
3517
+ ], -1)),
3518
+ s("div", ya, [
3519
+ h[5] || (h[5] = nt('<div class="error-code" data-v-c733ebac><span class="code-digit" data-v-c733ebac>4</span><span class="code-zero warning" data-v-c733ebac><span class="zero-inner" data-v-c733ebac>0</span></span><span class="code-digit" data-v-c733ebac>3</span></div><div class="error-illustration" data-v-c733ebac><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c733ebac><path d="M100 15 L150 35 L150 70 C150 95 100 110 100 110 C100 110 50 95 50 70 L50 35 Z" fill="var(--color-warning-lighter)" stroke="var(--color-warning)" stroke-width="2" data-v-c733ebac></path><rect x="85" y="55" width="30" height="25" rx="4" fill="var(--color-warning)" data-v-c733ebac></rect><path d="M92 55 V48 A8 8 0 0 1 108 48 V55" fill="none" stroke="var(--color-warning)" stroke-width="3" data-v-c733ebac></path><circle cx="100" cy="67" r="6" fill="none" stroke="#fff" stroke-width="2" data-v-c733ebac></circle><line x1="96" y1="63" x2="104" y2="71" stroke="#fff" stroke-width="2" data-v-c733ebac></line></svg></div><h1 class="error-title" data-v-c733ebac>无访问权限</h1><p class="error-desc" data-v-c733ebac>抱歉,您没有权限访问此页面,请联系管理员获取权限</p>', 4)),
3520
+ s("div", ka, [
3521
+ z(y(je), {
3522
+ type: "primary",
3523
+ size: "large",
3524
+ onClick: v
3525
+ }, {
3526
+ icon: X(() => [...h[1] || (h[1] = [
3527
+ s("svg", {
3528
+ viewBox: "0 0 24 24",
3529
+ fill: "none",
3530
+ stroke: "currentColor",
3531
+ "stroke-width": "2"
3532
+ }, [
3533
+ s("path", { d: "M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" }),
3534
+ s("polyline", { points: "9,22 9,12 15,12 15,22" })
3535
+ ], -1)
3536
+ ])]),
3537
+ default: X(() => [
3538
+ h[2] || (h[2] = Re(" 返回首页 ", -1))
3539
+ ]),
3540
+ _: 1
3541
+ }),
3542
+ z(y(je), {
3543
+ size: "large",
3544
+ onClick: h[0] || (h[0] = (b) => y(f).go(-1))
3545
+ }, {
3546
+ icon: X(() => [...h[3] || (h[3] = [
3547
+ s("svg", {
3548
+ viewBox: "0 0 24 24",
3549
+ fill: "none",
3550
+ stroke: "currentColor",
3551
+ "stroke-width": "2"
3552
+ }, [
3553
+ s("path", { d: "M19 12H5M12 19l-7-7 7-7" })
3554
+ ], -1)
3555
+ ])]),
3556
+ default: X(() => [
3557
+ h[4] || (h[4] = Re(" 返回上一页 ", -1))
3558
+ ]),
3559
+ _: 1
3560
+ })
3561
+ ]),
3562
+ h[6] || (h[6] = s("div", { class: "error-tip" }, [
3563
+ s("p", null, "可能的原因:"),
3564
+ s("ul", null, [
3565
+ s("li", null, "您的账号权限不足"),
3566
+ s("li", null, "该页面需要特定角色才能访问"),
3567
+ s("li", null, "您的登录状态已过期")
3568
+ ])
3569
+ ], -1))
3570
+ ])
3571
+ ])
3572
+ ]));
3573
+ }
3574
+ }), Xa = /* @__PURE__ */ Se(ba, [["__scopeId", "data-v-c733ebac"]]);
3575
+ function Ya() {
3576
+ const r = ze(), f = $e(), v = Ze(), p = j(() => f.userName || ""), h = j(() => f.userInfo), b = j(() => r.appName), A = j(() => v.isLoggedIn), g = j(() => r.isDark), S = j(() => r.theme), _ = j(() => r.isCollapsed), x = j(() => r.layout);
3577
+ return {
3578
+ userName: p,
3579
+ userInfo: h,
3580
+ appName: b,
3581
+ isLoggedIn: A,
3582
+ isDark: g,
3583
+ theme: S,
3584
+ isCollapsed: _,
3585
+ layout: x,
3586
+ toggleTheme: () => {
3587
+ r.toggleTheme();
3588
+ },
3589
+ toggleCollapse: () => {
3590
+ r.toggleCollapse();
3591
+ }
3592
+ };
3593
+ }
3594
+ function Ja() {
3595
+ const r = $e();
3596
+ return {
3597
+ isLoggedIn: j(() => r.isLoggedIn)
3598
+ };
3599
+ }
3600
+ function Za(r, f = {}) {
3601
+ const { rules: v, onSubmit: p } = f, h = P(), b = kt({ ...r }), A = P(!1), g = P(!1), S = P(!1), _ = () => {
3602
+ C(), S.value = !1, g.value = !0;
3603
+ }, x = (Q) => {
3604
+ Object.assign(b, Q), S.value = !0, g.value = !0;
3605
+ }, M = () => {
3606
+ g.value = !1, C();
3607
+ }, C = () => {
3608
+ var Q;
3609
+ Object.keys(r).forEach((O) => {
3610
+ b[O] = r[O];
3611
+ }), (Q = h.value) == null || Q.resetFields();
3612
+ };
3613
+ return {
3614
+ formRef: h,
3615
+ formData: b,
3616
+ rules: v,
3617
+ loading: A,
3618
+ visible: g,
3619
+ isEdit: S,
3620
+ openAdd: _,
3621
+ openEdit: x,
3622
+ close: M,
3623
+ resetForm: C,
3624
+ handleSubmit: async () => {
3625
+ var Q;
3626
+ try {
3627
+ await ((Q = h.value) == null ? void 0 : Q.validate()), A.value = !0, await (p == null ? void 0 : p(b)), M();
3628
+ } catch (O) {
3629
+ console.error(O);
3630
+ } finally {
3631
+ A.value = !1;
3632
+ }
3633
+ }
3634
+ };
3635
+ }
3636
+ function Qa(r) {
3637
+ const { fetchData: f, defaultPageSize: v = 10 } = r, p = P(!1), h = P([]), b = P(0), A = P(1), g = P(v), S = kt({}), _ = async () => {
3638
+ p.value = !0;
3639
+ try {
3640
+ const T = {
3641
+ ...S,
3642
+ page: A.value,
3643
+ pageSize: g.value
3644
+ }, V = await f(T);
3645
+ h.value = V.list, b.value = V.total;
3646
+ } catch (T) {
3647
+ console.error(T);
3648
+ } finally {
3649
+ p.value = !1;
3650
+ }
3651
+ }, x = () => {
3652
+ A.value = 1, _();
3653
+ }, M = () => {
3654
+ Object.keys(S).forEach((T) => {
3655
+ S[T] = void 0;
3656
+ }), A.value = 1, _();
3657
+ }, C = (T) => {
3658
+ A.value = T, _();
3659
+ }, G = (T) => {
3660
+ g.value = T, A.value = 1, _();
3661
+ }, Q = () => {
3662
+ _();
3663
+ }, O = j(() => ({
3664
+ current: A.value,
3665
+ pageSize: g.value,
3666
+ total: b.value
3667
+ }));
3668
+ return {
3669
+ loading: p,
3670
+ data: h,
3671
+ total: b,
3672
+ currentPage: A,
3673
+ pageSize: g,
3674
+ searchParams: S,
3675
+ pagination: O,
3676
+ getData: _,
3677
+ handleSearch: x,
3678
+ handleReset: M,
3679
+ handlePageChange: C,
3680
+ handleSizeChange: G,
3681
+ refresh: Q
3682
+ };
3683
+ }
3684
+ const Tt = Je("locale", () => {
3685
+ const r = K.get("locale") || "zh-CN", f = rs(r), v = P(r), p = as(), { t: h, messages: b, setLocale: A, mergeMessages: g } = ls(), S = j(() => {
3686
+ const C = p.find((G) => G.code === v.value);
3687
+ return (C == null ? void 0 : C.name) || v.value;
3688
+ });
3689
+ return {
3690
+ locale: v,
3691
+ localeName: S,
3692
+ locales: p,
3693
+ messages: b,
3694
+ t: h,
3695
+ changeLocale: (C) => {
3696
+ v.value = C, A(C), K.set("locale", C), f.setLocale(C);
3697
+ },
3698
+ addMessages: (C) => {
3699
+ g(C);
3700
+ },
3701
+ initLocale: () => {
3702
+ A(r);
3703
+ },
3704
+ provider: f
3705
+ };
3706
+ }), xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3707
+ __proto__: null,
3708
+ useLocaleStore: Tt
3709
+ }, Symbol.toStringTag, { value: "Module" }));
3710
+ function el() {
3711
+ const r = Tt();
3712
+ return {
3713
+ /** 当前语言代码 */
3714
+ locale: r.locale,
3715
+ /** 当前语言名称 */
3716
+ localeName: r.localeName,
3717
+ /** 支持的语言列表 */
3718
+ locales: r.locales,
3719
+ /** 翻译函数 */
3720
+ t: r.t,
3721
+ /** 当前语言包 */
3722
+ messages: r.messages,
3723
+ /** 切换语言 */
3724
+ setLocale: r.changeLocale,
3725
+ /** 添加自定义翻译 */
3726
+ addMessages: r.addMessages
3727
+ };
3728
+ }
3729
+ function tl() {
3730
+ return Tt().t;
3731
+ }
3732
+ function sl(r) {
3733
+ return $e().isLoggedIn;
3734
+ }
3735
+ function nl(r) {
3736
+ return $e().isLoggedIn;
3737
+ }
3738
+ function ol() {
3739
+ return !0;
3740
+ }
3741
+ const Xt = [
3742
+ {
3743
+ path: "/login",
3744
+ name: "Login",
3745
+ component: () => Promise.resolve().then(() => da),
3746
+ meta: {
3747
+ title: "登录",
3748
+ hidden: !0
3749
+ }
3750
+ }
3751
+ ], Yt = {
3752
+ path: "/",
3753
+ name: "Layout",
3754
+ component: () => Promise.resolve().then(() => Or),
3755
+ redirect: "/dashboard",
3756
+ children: [
3757
+ {
3758
+ path: "/dashboard",
3759
+ name: "Dashboard",
3760
+ component: () => import("./index-Bmf0YbVq.js"),
3761
+ meta: {
3762
+ title: "仪表盘",
3763
+ icon: "dashboard",
3764
+ keepAlive: !0,
3765
+ affix: !0
3766
+ }
3767
+ },
3768
+ {
3769
+ path: "/system/user",
3770
+ name: "SystemUser",
3771
+ component: () => import("./index-BRvi9qW-.js"),
3772
+ meta: {
3773
+ title: "用户管理",
3774
+ icon: "user",
3775
+ keepAlive: !0
3776
+ }
3777
+ },
3778
+ {
3779
+ path: "/system/role",
3780
+ name: "SystemRole",
3781
+ component: () => import("./index-D25KzR0I.js"),
3782
+ meta: {
3783
+ title: "角色管理",
3784
+ icon: "role",
3785
+ keepAlive: !0
3786
+ }
3787
+ },
3788
+ {
3789
+ path: "/system/menu",
3790
+ name: "SystemMenu",
3791
+ component: () => import("./index-DEYOivza.js"),
3792
+ meta: {
3793
+ title: "菜单管理",
3794
+ icon: "menu",
3795
+ keepAlive: !0
3796
+ }
3797
+ },
3798
+ // catch-all 路由:让 404 在 Layout 内部渲染,保持左侧菜单显示
3799
+ {
3800
+ path: "/:pathMatch(.*)*",
3801
+ name: "CatchAll",
3802
+ component: () => Promise.resolve().then(() => Wt),
3803
+ meta: {
3804
+ title: "404",
3805
+ hidden: !0
3806
+ }
3807
+ }
3808
+ ]
3809
+ }, rl = [
3810
+ {
3811
+ path: "/dashboard",
3812
+ name: "Dashboard",
3813
+ component: () => import("./index-Bmf0YbVq.js"),
3814
+ meta: {
3815
+ title: "仪表盘",
3816
+ icon: "dashboard",
3817
+ keepAlive: !0,
3818
+ affix: !0
3819
+ }
3820
+ },
3821
+ {
3822
+ path: "/system",
3823
+ name: "System",
3824
+ redirect: "/system/user",
3825
+ meta: {
3826
+ title: "系统管理",
3827
+ icon: "setting"
3828
+ },
3829
+ children: [
3830
+ {
3831
+ path: "user",
3832
+ name: "SystemUser",
3833
+ component: () => import("./index-BRvi9qW-.js"),
3834
+ meta: {
3835
+ title: "用户管理",
3836
+ icon: "user",
3837
+ keepAlive: !0
3838
+ }
3839
+ },
3840
+ {
3841
+ path: "role",
3842
+ name: "SystemRole",
3843
+ component: () => import("./index-D25KzR0I.js"),
3844
+ meta: {
3845
+ title: "角色管理",
3846
+ icon: "role",
3847
+ keepAlive: !0
3848
+ }
3849
+ },
3850
+ {
3851
+ path: "menu",
3852
+ name: "SystemMenu",
3853
+ component: () => import("./index-DEYOivza.js"),
3854
+ meta: {
3855
+ title: "菜单管理",
3856
+ icon: "menu",
3857
+ keepAlive: !0
3858
+ }
3859
+ }
3860
+ ]
3861
+ }
3862
+ ], Ca = [
3863
+ {
3864
+ menuCode: "dashboard",
3865
+ menuName: "仪表盘",
3866
+ menuUrl: "/dashboard",
3867
+ icon: "dashboard",
3868
+ closable: !0,
3869
+ isDefault: !0,
3870
+ isOut: !1
3871
+ },
3872
+ {
3873
+ menuCode: "system",
3874
+ menuName: "系统管理",
3875
+ menuUrl: "/system",
3876
+ icon: "setting",
3877
+ closable: !1,
3878
+ isDefault: !1,
3879
+ isOut: !1,
3880
+ children: [
3881
+ {
3882
+ menuCode: "system_user",
3883
+ menuName: "用户管理",
3884
+ menuUrl: "/system/user",
3885
+ icon: "user",
3886
+ closable: !0,
3887
+ isDefault: !1,
3888
+ isOut: !1
3889
+ },
3890
+ {
3891
+ menuCode: "system_role",
3892
+ menuName: "角色管理",
3893
+ menuUrl: "/system/role",
3894
+ icon: "role",
3895
+ closable: !0,
3896
+ isDefault: !1,
3897
+ isOut: !1
3898
+ },
3899
+ {
3900
+ menuCode: "system_menu",
3901
+ menuName: "菜单管理",
3902
+ menuUrl: "/system/menu",
3903
+ icon: "menu",
3904
+ closable: !0,
3905
+ isDefault: !1,
3906
+ isOut: !1
3907
+ }
3908
+ ]
3909
+ }
3910
+ ], Jt = bt({
3911
+ history: xt(),
3912
+ routes: [...Xt, Yt],
3913
+ scrollBehavior: () => ({ left: 0, top: 0 })
3914
+ }), Na = ["/login"];
3915
+ Jt.beforeEach(async (r, f, v) => {
3916
+ const p = ze();
3917
+ if (p.initTheme(), Ft())
3918
+ if (r.path === "/login")
3919
+ v({ path: "/" });
3920
+ else {
3921
+ const h = $e();
3922
+ h.isLoggedIn || (h.setUserInfo({
3923
+ appId: ct(),
3924
+ userId: "1",
3925
+ userName: "管理员",
3926
+ departmentName: "技术部",
3927
+ email: "admin@example.com",
3928
+ mobilePhone: "13800138000",
3929
+ positionName: "管理员",
3930
+ avatar: ""
3931
+ }), De().setMenuList(Ca)), r.name && r.meta.keepAlive && p.addCachedView(r.name), v();
3932
+ }
3933
+ else
3934
+ Na.includes(r.path) ? v() : v("/login");
3935
+ });
3936
+ function al() {
3937
+ const r = bt({
3938
+ history: xt(),
3939
+ routes: [...Xt, Yt]
3940
+ });
3941
+ Jt.matcher = r.matcher;
3942
+ }
3943
+ function ll(r, f = {}) {
3944
+ const v = f.indexPath || "/dashboard", p = {
3945
+ path: "/:pathMatch(.*)*",
3946
+ name: "CatchAll",
3947
+ component: () => Promise.resolve().then(() => Wt),
3948
+ meta: {
3949
+ title: "404"
3950
+ }
3951
+ };
3952
+ return {
3953
+ path: "/",
3954
+ name: "Layout",
3955
+ component: Vt,
3956
+ redirect: v,
3957
+ children: [...r, p]
3958
+ };
3959
+ }
3960
+ function il(r) {
3961
+ return bt({
3962
+ history: xt(),
3963
+ routes: r,
3964
+ scrollBehavior: () => ({ left: 0, top: 0 })
3965
+ });
3966
+ }
3967
+ function cl(r) {
3968
+ return ue.get("/role/list", { params: r });
3969
+ }
3970
+ function ul(r) {
3971
+ return ue.get(`/role/${r}`);
3972
+ }
3973
+ function dl(r) {
3974
+ return ue.post("/role", r);
3975
+ }
3976
+ function fl(r, f) {
3977
+ return ue.put(`/role/${r}`, f);
3978
+ }
3979
+ function pl(r) {
3980
+ return ue.delete(`/role/${r}`);
3981
+ }
3982
+ function ml(r, f) {
3983
+ return ue.patch(`/role/${r}/status`, { status: f });
3984
+ }
3985
+ function hl() {
3986
+ return ue.get("/user/v1.0/menu/list");
3987
+ }
3988
+ function Ea(r) {
3989
+ const f = r || ct();
3990
+ return ue.get(`/user/v1.0/menu/get-menu?appId=${f}`);
3991
+ }
3992
+ function vl(r) {
3993
+ return ue.post("/menu", r);
3994
+ }
3995
+ function gl(r, f) {
3996
+ return ue.put(`/menu/${r}`, f);
3997
+ }
3998
+ function _l(r) {
3999
+ return ue.delete(`/menu/${r}`);
4000
+ }
4001
+ const $a = ["/login", "/404", "/403"];
4002
+ function wl(r, f = {}) {
4003
+ const v = f.whiteList || $a, p = f.loginPath || "/login", h = f.homePath || "/";
4004
+ r.beforeEach(async (b, A, g) => {
4005
+ const S = ze(), _ = $e(), x = De();
4006
+ if (S.initTheme(), ut())
4007
+ if (b.path === p)
4008
+ g({ path: h });
4009
+ else if (_.isLoggedIn)
4010
+ b.name && b.meta.keepAlive && S.addCachedView(b.name), g();
4011
+ else
4012
+ try {
4013
+ if (f.fetchUserInfo) {
4014
+ const C = await f.fetchUserInfo();
4015
+ _.setUserInfo(C);
4016
+ } else {
4017
+ const C = await ea();
4018
+ _.setUserInfo(C);
4019
+ }
4020
+ if (f.fetchMenu) {
4021
+ const C = await f.fetchMenu();
4022
+ x.setMenuList(C);
4023
+ } else {
4024
+ const C = await Ea(f.appId);
4025
+ x.setMenuList(C);
4026
+ }
4027
+ f.onLoginSuccess && f.onLoginSuccess(), b.name && b.meta.keepAlive && S.addCachedView(b.name), g({ ...b, replace: !0 });
4028
+ } catch (C) {
4029
+ console.error("获取用户信息失败:", C), _.clearUserInfo(), x.clearMenu(), We(), g({ path: p, query: { redirect: b.fullPath } });
4030
+ }
4031
+ else
4032
+ v.includes(b.path) ? g() : g({ path: p, query: { redirect: b.fullPath } });
4033
+ }), r.afterEach(() => {
4034
+ });
4035
+ }
4036
+ function yl(r) {
4037
+ return ue.get("/user/list", { params: r });
4038
+ }
4039
+ function kl(r) {
4040
+ return ue.get(`/user/${r}`);
4041
+ }
4042
+ function bl(r) {
4043
+ return ue.post("/user", r);
4044
+ }
4045
+ function xl(r, f) {
4046
+ return ue.put(`/user/${r}`, f);
4047
+ }
4048
+ function Cl(r) {
4049
+ return ue.delete(`/user/${r}`);
4050
+ }
4051
+ function Nl(r) {
4052
+ return ue.post("/user/batch-delete", { ids: r });
4053
+ }
4054
+ function El(r, f) {
4055
+ return ue.patch(`/user/${r}/status`, { status: f });
4056
+ }
4057
+ function $l(r) {
4058
+ return ue.post(`/user/${r}/reset-password`);
4059
+ }
4060
+ var Sa = /* @__PURE__ */ ((r) => (r[r.ENABLED = 1] = "ENABLED", r[r.DISABLED = 0] = "DISABLED", r))(Sa || {}), Ma = /* @__PURE__ */ ((r) => (r[r.UNKNOWN = 0] = "UNKNOWN", r[r.MALE = 1] = "MALE", r[r.FEMALE = 2] = "FEMALE", r))(Ma || {}), La = /* @__PURE__ */ ((r) => (r[r.DIRECTORY = 0] = "DIRECTORY", r[r.MENU = 1] = "MENU", r[r.BUTTON = 2] = "BUTTON", r))(La || {});
4061
+ const Sl = {
4062
+ 1: "启用",
4063
+ 0: "禁用"
4064
+ }, Ml = {
4065
+ 0: "未知",
4066
+ 1: "男",
4067
+ 2: "女"
4068
+ }, Ll = {
4069
+ 0: "目录",
4070
+ 1: "菜单",
4071
+ 2: "按钮"
4072
+ }, Il = [
4073
+ {
4074
+ label: "启用",
4075
+ value: 1
4076
+ /* ENABLED */
4077
+ },
4078
+ {
4079
+ label: "禁用",
4080
+ value: 0
4081
+ /* DISABLED */
4082
+ }
4083
+ ], Al = [
4084
+ {
4085
+ label: "未知",
4086
+ value: 0
4087
+ /* UNKNOWN */
4088
+ },
4089
+ {
4090
+ label: "男",
4091
+ value: 1
4092
+ /* MALE */
4093
+ },
4094
+ {
4095
+ label: "女",
4096
+ value: 2
4097
+ /* FEMALE */
4098
+ }
4099
+ ], Tl = [
4100
+ {
4101
+ label: "目录",
4102
+ value: 0
4103
+ /* DIRECTORY */
4104
+ },
4105
+ {
4106
+ label: "菜单",
4107
+ value: 1
4108
+ /* MENU */
4109
+ },
4110
+ {
4111
+ label: "按钮",
4112
+ value: 2
4113
+ /* BUTTON */
4114
+ }
4115
+ ], Ol = {
4116
+ mounted(r, f) {
4117
+ var p;
4118
+ $e().isLoggedIn || (p = r.parentNode) == null || p.removeChild(r);
4119
+ }
4120
+ };
4121
+ function Ul(r) {
4122
+ return is({
4123
+ appId: r.appId,
4124
+ clientId: r.clientId,
4125
+ apiBaseUrl: r.apiBaseUrl
4126
+ }), r.locale && Promise.resolve().then(() => xa).then(({ useLocaleStore: f }) => {
4127
+ f().changeLocale(r.locale);
4128
+ }), {
4129
+ config: {
4130
+ appName: r.appName || "XTO App",
4131
+ appId: ct(),
4132
+ clientId: zt(),
4133
+ apiBaseUrl: cs(),
4134
+ indexPath: r.indexPath || "/dashboard",
4135
+ loginPath: r.loginPath || "/login",
4136
+ locale: r.locale || "zh-CN"
4137
+ }
4138
+ };
4139
+ }
4140
+ export {
4141
+ ol as $,
4142
+ zt as A,
4143
+ qa as B,
4144
+ hl as C,
4145
+ Ea as D,
4146
+ ja as E,
4147
+ Ka as F,
4148
+ Ma as G,
4149
+ xn as H,
4150
+ Va as I,
4151
+ ul as J,
4152
+ cl as K,
4153
+ Vt as L,
4154
+ La as M,
4155
+ ut as N,
4156
+ hs as O,
4157
+ fs as P,
4158
+ kl as Q,
4159
+ ea as R,
4160
+ Sa as S,
4161
+ Ga as T,
4162
+ yl as U,
4163
+ sl as V,
4164
+ nl as W,
4165
+ Ft as X,
4166
+ ue as Y,
4167
+ is as Z,
4168
+ Se as _,
4169
+ Il as a,
4170
+ ws as a0,
4171
+ Yt as a1,
4172
+ K as a2,
4173
+ et as a3,
4174
+ Qr as a4,
4175
+ Ha as a5,
4176
+ Ca as a6,
4177
+ Ol as a7,
4178
+ Wa as a8,
4179
+ $l as a9,
4180
+ Qa as aA,
4181
+ $e as aB,
4182
+ al as aa,
4183
+ Jt as ab,
4184
+ Fa as ac,
4185
+ tt as ad,
4186
+ _s as ae,
4187
+ gs as af,
4188
+ ms as ag,
4189
+ ds as ah,
4190
+ vs as ai,
4191
+ Dt as aj,
4192
+ ps as ak,
4193
+ wl as al,
4194
+ Xt as am,
4195
+ gl as an,
4196
+ fl as ao,
4197
+ ml as ap,
4198
+ xl as aq,
4199
+ El as ar,
4200
+ Ya as as,
4201
+ ze as at,
4202
+ Ja as au,
4203
+ Ze as av,
4204
+ Za as aw,
4205
+ el as ax,
4206
+ Tt as ay,
4207
+ De as az,
4208
+ Tl as b,
4209
+ Xa as c,
4210
+ Al as d,
4211
+ Ml as e,
4212
+ Ll as f,
4213
+ ga as g,
4214
+ Bt as h,
4215
+ ua as i,
4216
+ Sl as j,
4217
+ Da as k,
4218
+ Nl as l,
4219
+ We as m,
4220
+ ll as n,
4221
+ vl as o,
4222
+ dl as p,
4223
+ il as q,
4224
+ tl as r,
4225
+ bl as s,
4226
+ Ul as t,
4227
+ rl as u,
4228
+ _l as v,
4229
+ pl as w,
4230
+ Cl as x,
4231
+ cs as y,
4232
+ ct as z
4233
+ };