jmash-core 0.0.11 → 0.0.13

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 (165) hide show
  1. package/dist/401-LzXAVxnC.mjs +101 -0
  2. package/dist/404-BaS1xZmV.mjs +37 -0
  3. package/dist/{BarChart-CbBhpMpZ.mjs → BarChart-ClnlJEhi.mjs} +41 -41
  4. package/dist/{FileSaver.min-CivbhzMe.mjs → FileSaver.min-C7ddeQoo.mjs} +1 -1
  5. package/dist/{FunnelChart-Czy2TVI1.mjs → FunnelChart-CcCVox9E.mjs} +16 -15
  6. package/dist/{PieChart-B8Tay-HH.mjs → PieChart-BHM8amLk.mjs} +1 -1
  7. package/dist/{PieChart.vue_vue_type_script_setup_true_lang-CH5ME8e4.mjs → PieChart.vue_vue_type_script_setup_true_lang-BaJNQr7Z.mjs} +25 -24
  8. package/dist/{RadarChart-BzUQwTnX.mjs → RadarChart-ChaevZtZ.mjs} +1 -1
  9. package/dist/{RadarChart.vue_vue_type_script_setup_true_lang-DC-Ww3Mu.mjs → RadarChart.vue_vue_type_script_setup_true_lang-DF4axEB-.mjs} +27 -26
  10. package/dist/{edit-DaxU7bBz.mjs → edit-5MpAgj0J.mjs} +1 -1
  11. package/dist/{edit-C0aHXOi3.mjs → edit-Bz0L-kJZ.mjs} +1 -1
  12. package/dist/{edit-B95ajyfH.mjs → edit-ClmR7gql.mjs} +1 -1
  13. package/dist/{edit-BJAAEDVd.mjs → edit-D2udSsbu.mjs} +1 -1
  14. package/dist/edit-DXSp7oE2.mjs +4 -0
  15. package/dist/{edit-CR7ZiKuo.mjs → edit-FahW6Usp.mjs} +51 -51
  16. package/dist/{edit-5ZpeysVY.mjs → edit-oUUjQ6s5.mjs} +47 -47
  17. package/dist/edit-zLDTi0zt.mjs +4 -0
  18. package/dist/{edit.vue_vue_type_script_setup_true_lang-0Q5XHHkN.mjs → edit.vue_vue_type_script_setup_true_lang-BFSwE0WY.mjs} +24 -24
  19. package/dist/{edit.vue_vue_type_script_setup_true_lang-DqqWi384.mjs → edit.vue_vue_type_script_setup_true_lang-BRk4mulZ.mjs} +22 -22
  20. package/dist/{edit.vue_vue_type_script_setup_true_lang-CCq_E2KT.mjs → edit.vue_vue_type_script_setup_true_lang-BpmgWV6c.mjs} +14 -14
  21. package/dist/{edit.vue_vue_type_script_setup_true_lang-C-BRxRH6.mjs → edit.vue_vue_type_script_setup_true_lang-C5DH8_ra.mjs} +30 -30
  22. package/dist/edit.vue_vue_type_script_setup_true_lang-F-7AWta2.mjs +588 -0
  23. package/dist/{edit.vue_vue_type_script_setup_true_lang-D4w7Aa9M.mjs → edit.vue_vue_type_script_setup_true_lang-yaBZyiFi.mjs} +25 -25
  24. package/dist/{el-card-acRFAeYD.mjs → el-card-CjFpAXC4.mjs} +1 -1
  25. package/dist/{el-col-BFrxkvh3.mjs → el-col-D9kCVYAq.mjs} +17 -17
  26. package/dist/{el-date-picker-CjE5H0IY.mjs → el-date-picker-_cuHa2hi.mjs} +474 -474
  27. package/dist/el-divider-8Ov9f55F.mjs +45 -0
  28. package/dist/{el-dropdown-item-SBcx6_kX.mjs → el-dropdown-item-CSpUSfWV.mjs} +95 -95
  29. package/dist/{el-tree-select-RwYP-GEn.mjs → el-tree-select-BUK1QB3u.mjs} +75 -75
  30. package/dist/{index-CQlxUoOf.mjs → index-BYYYSOkP.mjs} +1 -1
  31. package/dist/{index-Bqg1CGw2.mjs → index-BeFhB4ZJ.mjs} +1 -1
  32. package/dist/{index-B7zhho5d.mjs → index-BkPB5eHC.mjs} +92 -92
  33. package/dist/{index-CcXjdXcD.mjs → index-C34zVC-7.mjs} +67 -67
  34. package/dist/{index-BcstP65E.mjs → index-C68JBxAE.mjs} +100 -100
  35. package/dist/{index-ChzNa2kp.mjs → index-CPqNZOs9.mjs} +21463 -21235
  36. package/dist/{index-u66O7nvc.mjs → index-CXJ-WW3h.mjs} +112 -111
  37. package/dist/{index-DvrFzTq2.mjs → index-CYAfQz-w.mjs} +1 -1
  38. package/dist/index-Cuk7sDz9.mjs +277 -0
  39. package/dist/{index-Dyn0k8Ib.mjs → index-D8zb68MK.mjs} +64 -64
  40. package/dist/{index-DBmv4w5y.mjs → index-D9itg8P7.mjs} +1 -1
  41. package/dist/{index-DAIdsjwj.mjs → index-DHQQEEWW.mjs} +53 -53
  42. package/dist/{index-DQtth-qu.mjs → index-DW1L3U1A.mjs} +53 -53
  43. package/dist/{index-B-lo0ywJ.mjs → index-Dav45Y13.mjs} +72 -72
  44. package/dist/index-DhjUimfd.mjs +272 -0
  45. package/dist/{index-DQbHbpgW.mjs → index-GPbjfqQg.mjs} +4 -4
  46. package/dist/{index-hr-nwn6C.mjs → index-W4pvCYhJ.mjs} +1 -1
  47. package/dist/{index-SUlMvdOg.mjs → index-gaeN4E1_.mjs} +88 -88
  48. package/dist/index-hZzxBNan.mjs +3447 -0
  49. package/dist/{index-4UdK9Nb9.mjs → index-l9Oeu9G-.mjs} +49 -49
  50. package/dist/index.mjs +27 -28
  51. package/dist/index.vue_vue_type_script_setup_true_lang-DWjQT4jn.mjs +54 -0
  52. package/dist/picture-DRU19T9b.mjs +587 -0
  53. package/dist/position-Ba7wRAlR.mjs +23 -0
  54. package/dist/{profile-BfDHQ_n5.mjs → profile-3Wsx53aV.mjs} +25 -25
  55. package/dist/runAs-CE2R49GJ.mjs +4 -0
  56. package/dist/runAs.vue_vue_type_script_setup_true_lang-i0DdmfK1.mjs +113 -0
  57. package/dist/style.css +1 -1
  58. package/dist/{types-D2vHMNqn.mjs → types-D3sIBzF1.mjs} +13 -13
  59. package/dist/{updatePwd-Dc31cBOV.mjs → updatePwd-2Dc9-bnF.mjs} +1 -1
  60. package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-Do-jRGf0.mjs → updatePwd.vue_vue_type_script_setup_true_lang-3mhiAxD4.mjs} +9 -9
  61. package/dts/src/components/AppLink/index.vue.d.ts +19 -0
  62. package/dts/src/components/DictSelect/index.vue.d.ts +1 -1
  63. package/dts/src/components/Dictionary/index.vue.d.ts +1 -1
  64. package/dts/src/components/IconSelect/requireIcons.d.ts +1 -1
  65. package/dts/src/components/Pagination/index.vue.d.ts +3 -3
  66. package/dts/src/enums/DeviceEnum.d.ts +13 -0
  67. package/dts/src/enums/LayoutEnum.d.ts +17 -0
  68. package/dts/src/enums/MenuTypeEnum.d.ts +4 -1
  69. package/dts/src/enums/SidebarStatusEnum.d.ts +13 -0
  70. package/dts/src/enums/ThemeEnum.d.ts +17 -0
  71. package/dts/src/index.d.ts +10 -3
  72. package/dts/src/lang/index.d.ts +90 -0
  73. package/dts/src/lang/package/en.d.ts +42 -0
  74. package/dts/src/lang/package/zh-cn.d.ts +48 -0
  75. package/dts/src/layout/components/AppMain/index.vue.d.ts +2 -0
  76. package/dts/src/layout/components/NavBar/components/NavbarLeft.vue.d.ts +2 -0
  77. package/dts/src/layout/components/NavBar/components/NavbarRight.vue.d.ts +2 -0
  78. package/dts/src/layout/components/Settings/components/LayoutSelect.vue.d.ts +10 -0
  79. package/dts/src/layout/components/Settings/components/ThemeColorPicker.vue.d.ts +10 -0
  80. package/dts/src/layout/components/Sidebar/components/SidebarLogo.vue.d.ts +12 -0
  81. package/dts/src/layout/components/Sidebar/components/SidebarMenu.vue.d.ts +50 -0
  82. package/dts/src/layout/components/Sidebar/components/SidebarMenuItem.vue.d.ts +42 -0
  83. package/dts/src/layout/components/Sidebar/components/SidebarMenuItemTitle.vue.d.ts +23 -0
  84. package/dts/src/layout/components/Sidebar/components/SidebarMixTopMenu.vue.d.ts +2 -0
  85. package/dts/src/stores/index.d.ts +5 -0
  86. package/dts/src/utils/color.d.ts +69 -0
  87. package/dts/src/utils/index.d.ts +9 -0
  88. package/dts/src/utils/nprogress.d.ts +4 -0
  89. package/dts/src/views/my/runAs.vue.d.ts +6 -0
  90. package/dts/tsconfig.tsbuildinfo +1 -1
  91. package/package.json +2 -2
  92. package/dist/401-BjFOoJaQ.mjs +0 -101
  93. package/dist/404-CT8Yk873.mjs +0 -37
  94. package/dist/anquanrizhi-BMAtNRi-.mjs +0 -4
  95. package/dist/api-DA2t0sYn.mjs +0 -4
  96. package/dist/bumenguanli-_DtFk-Tc.mjs +0 -4
  97. package/dist/caozuoguanliyuan-YxDi1qyM.mjs +0 -4
  98. package/dist/captcha-G9RskXh1.mjs +0 -4
  99. package/dist/caret-bottom-Lhe9M7aA.mjs +0 -59
  100. package/dist/cascader-CysbB3DR.mjs +0 -4
  101. package/dist/client-CmoE5d0v.mjs +0 -4
  102. package/dist/close-DwiHyvYJ.mjs +0 -4
  103. package/dist/close_all-ri0Fg4Yg.mjs +0 -4
  104. package/dist/close_left-DLmFYlJS.mjs +0 -4
  105. package/dist/close_other-B705ZMV6.mjs +0 -4
  106. package/dist/close_right-BUdNHbs5.mjs +0 -4
  107. package/dist/dict-C2cGjFov.mjs +0 -4
  108. package/dist/document-Bf2gTChB.mjs +0 -4
  109. package/dist/download-cG3k-vnb.mjs +0 -4
  110. package/dist/drag-CwjZNuUJ.mjs +0 -4
  111. package/dist/edit-CIq1RPVx.mjs +0 -4
  112. package/dist/edit-Di-ksvTh.mjs +0 -4
  113. package/dist/edit-II1vFfNu.mjs +0 -4
  114. package/dist/edit.vue_vue_type_script_setup_true_lang-VlMd6HAa.mjs +0 -575
  115. package/dist/email-B2AUCEGq.mjs +0 -4
  116. package/dist/exit-fullscreen-BJ7HY1Sq.mjs +0 -4
  117. package/dist/eye-DeDz_5CQ.mjs +0 -4
  118. package/dist/eye-open-Cm0N1Rcz.mjs +0 -4
  119. package/dist/fullscreen-BFXljl9l.mjs +0 -4
  120. package/dist/gangweiguanli-bkwyhEXB.mjs +0 -4
  121. package/dist/github-CL2t8fd5.mjs +0 -4
  122. package/dist/homepage-IeZtzO8Q.mjs +0 -4
  123. package/dist/icon-DwZ6Hkfk.mjs +0 -4
  124. package/dist/index-CF6p3ONN.mjs +0 -319
  125. package/dist/index-CJvo28Bb.mjs +0 -275
  126. package/dist/index-CS-ceXqM.mjs +0 -2580
  127. package/dist/ip-DOLbS1rT.mjs +0 -4
  128. package/dist/jiemianxijietubiao-26-mnbzByc9.mjs +0 -4
  129. package/dist/language-C1tgLxuP.mjs +0 -4
  130. package/dist/link-Cjm7RVX7.mjs +0 -4
  131. package/dist/log-ZFSIG9ZQ.mjs +0 -4
  132. package/dist/menu-B7SOjMUJ.mjs +0 -4
  133. package/dist/message-Bws5C_1u.mjs +0 -4
  134. package/dist/mokuaiguanli-nzRpK-Pe.mjs +0 -4
  135. package/dist/money-DM0ZKWD3.mjs +0 -4
  136. package/dist/monitor-CxsUJkcx.mjs +0 -4
  137. package/dist/order-DZ28J7CD.mjs +0 -4
  138. package/dist/password-BbtiGVLy.mjs +0 -4
  139. package/dist/peoples-3fyh79uv.mjs +0 -4
  140. package/dist/phone-CdpLww4_.mjs +0 -4
  141. package/dist/picture-877nN1qH.mjs +0 -598
  142. package/dist/project-DgVsw9u_.mjs +0 -4
  143. package/dist/publish-BCri5HbT.mjs +0 -4
  144. package/dist/quanxianguanli-Cpcc8C4D.mjs +0 -4
  145. package/dist/redis-fjUUmFu3.mjs +0 -4
  146. package/dist/refresh-BWNjEt3t.mjs +0 -4
  147. package/dist/role-BYKzPG5H.mjs +0 -4
  148. package/dist/security-BsMRfWoG.mjs +0 -4
  149. package/dist/shoujihao-BFt1tDJn.mjs +0 -4
  150. package/dist/shrink-kEdKK3G7.mjs +0 -4
  151. package/dist/size-jLonAeyJ.mjs +0 -4
  152. package/dist/system-BlPhikZo.mjs +0 -4
  153. package/dist/table-CCqA2qBP.mjs +0 -4
  154. package/dist/todolist-Ul73X2IJ.mjs +0 -4
  155. package/dist/tree-DrEt7UUZ.mjs +0 -4
  156. package/dist/user-B9bSWq2E.mjs +0 -4
  157. package/dist/visit-w_hKTLb6.mjs +0 -4
  158. package/dist/xingming-DHM4olm-.mjs +0 -4
  159. package/dist/yonghuguanli-B3vRkdqw.mjs +0 -4
  160. package/dist/youxiang-D68Zx-02.mjs +0 -4
  161. package/dist//345/210/227/350/241/250-nphA7BPW.mjs +0 -4
  162. package/dist//345/233/272/345/256/232_/345/233/276/351/222/211-CXYo1gbQ.mjs +0 -4
  163. package/dist//346/250/241/345/235/227-D528qA63.mjs +0 -4
  164. package/dist//347/234/274/347/235/233-BaPHKGgj.mjs +0 -4
  165. package/dist//351/227/255/347/234/274/347/235/233-D6BjbTd5.mjs +0 -4
@@ -0,0 +1,3447 @@
1
+ import { b as ke, i as Ee, u as ne, _ as ue, d as Ve, E as we, w as at, a as lt, c as cn, e as vt, f as dn, U as _t, g as ve, h as Fe, C as fn, j as xt, k as Dt, l as mn, m as pn, n as hn, o as vn, p as _n, q as gn, r as je, s as bn, t as Et, v as zt, x as Ht, y as Wt, z as Tt, A as re, B as yn, D as kn, F as Cn, G as $n, H as Mn, I as wn, J as Qe, K as Je, L as ut, M as Sn, T as xn, N as nt, O as En, P as It, Q as Tn, R as In, S as An, V as Pn, W as Vn, X as _e, Y as Ln, Z as Ne, $ as gt, a0 as Nn, a1 as Se, a2 as et, a3 as On, a4 as ze, a5 as Bn, a6 as ie, a7 as At, a8 as Pt, a9 as Xe, aa as ct, ab as Rn, ac as Fn, ad as Dn, ae as zn, af as bt, ag as He, ah as Hn } from "./index-CPqNZOs9.mjs";
2
+ import { E as qt, a as Kt, b as Ut } from "./el-dropdown-item-CSpUSfWV.mjs";
3
+ import { _ as Wn } from "./index.vue_vue_type_script_setup_true_lang-DWjQT4jn.mjs";
4
+ import { defineComponent as D, ref as T, provide as We, onMounted as pe, openBlock as m, createElementBlock as $, normalizeClass as w, unref as r, renderSlot as ae, getCurrentInstance as ge, inject as Le, createElementVNode as C, createBlock as L, withCtx as M, resolveDynamicComponent as st, toDisplayString as U, shallowRef as Vt, watch as ee, computed as E, normalizeStyle as ye, watchEffect as yt, Fragment as oe, renderList as xe, reactive as rt, nextTick as $e, withDirectives as Me, withKeys as Lt, createVNode as _, createCommentVNode as H, createTextVNode as Q, vShow as qe, useSlots as qn, Teleport as Kn, Transition as it, mergeProps as jt, withModifiers as Te, onBeforeUnmount as Xt, h as te, toRef as Un, resolveComponent as Oe, isRef as ot, onBeforeMount as jn, TransitionGroup as Xn, pushScopeId as Gn, popScopeId as Yn, KeepAlive as Zn, normalizeProps as Jn, guardReactiveProps as Qn } from "vue";
5
+ import { useRoute as Ge, useRouter as kt } from "vue-router";
6
+ import { _ as eo } from "./updatePwd.vue_vue_type_script_setup_true_lang-3mhiAxD4.mjs";
7
+ import { _ as to } from "./runAs.vue_vue_type_script_setup_true_lang-i0DdmfK1.mjs";
8
+ import { g as Ct } from "./position-Ba7wRAlR.mjs";
9
+ import { E as no } from "./el-divider-8Ov9f55F.mjs";
10
+ import { storeToRefs as oo } from "pinia";
11
+ import { _ as ao } from "./index-W4pvCYhJ.mjs";
12
+ const Gt = Symbol("breadcrumbKey"), lo = ke({
13
+ separator: {
14
+ type: String,
15
+ default: "/"
16
+ },
17
+ separatorIcon: {
18
+ type: Ee
19
+ }
20
+ }), so = D({
21
+ name: "ElBreadcrumb"
22
+ }), ro = /* @__PURE__ */ D({
23
+ ...so,
24
+ props: lo,
25
+ setup(e) {
26
+ const n = e, t = ne("breadcrumb"), o = T();
27
+ return We(Gt, n), pe(() => {
28
+ const s = o.value.querySelectorAll(`.${t.e("item")}`);
29
+ s.length && s[s.length - 1].setAttribute("aria-current", "page");
30
+ }), (s, a) => (m(), $("div", {
31
+ ref_key: "breadcrumb",
32
+ ref: o,
33
+ class: w(r(t).b()),
34
+ "aria-label": "Breadcrumb",
35
+ role: "navigation"
36
+ }, [
37
+ ae(s.$slots, "default")
38
+ ], 2));
39
+ }
40
+ });
41
+ var io = /* @__PURE__ */ ue(ro, [["__file", "breadcrumb.vue"]]);
42
+ const uo = ke({
43
+ to: {
44
+ type: Ve([String, Object]),
45
+ default: ""
46
+ },
47
+ replace: {
48
+ type: Boolean,
49
+ default: !1
50
+ }
51
+ }), co = D({
52
+ name: "ElBreadcrumbItem"
53
+ }), fo = /* @__PURE__ */ D({
54
+ ...co,
55
+ props: uo,
56
+ setup(e) {
57
+ const n = e, t = ge(), o = Le(Gt, void 0), s = ne("breadcrumb"), a = t.appContext.config.globalProperties.$router, l = T(), u = () => {
58
+ !n.to || !a || (n.replace ? a.replace(n.to) : a.push(n.to));
59
+ };
60
+ return (i, c) => {
61
+ var f, d;
62
+ return m(), $("span", {
63
+ class: w(r(s).e("item"))
64
+ }, [
65
+ C("span", {
66
+ ref_key: "link",
67
+ ref: l,
68
+ class: w([r(s).e("inner"), r(s).is("link", !!i.to)]),
69
+ role: "link",
70
+ onClick: u
71
+ }, [
72
+ ae(i.$slots, "default")
73
+ ], 2),
74
+ (f = r(o)) != null && f.separatorIcon ? (m(), L(r(we), {
75
+ key: 0,
76
+ class: w(r(s).e("separator"))
77
+ }, {
78
+ default: M(() => [
79
+ (m(), L(st(r(o).separatorIcon)))
80
+ ]),
81
+ _: 1
82
+ }, 8, ["class"])) : (m(), $("span", {
83
+ key: 1,
84
+ class: w(r(s).e("separator")),
85
+ role: "presentation"
86
+ }, U((d = r(o)) == null ? void 0 : d.separator), 3))
87
+ ], 2);
88
+ };
89
+ }
90
+ });
91
+ var Yt = /* @__PURE__ */ ue(fo, [["__file", "breadcrumb-item.vue"]]);
92
+ const mo = at(io, {
93
+ BreadcrumbItem: Yt
94
+ }), po = lt(Yt), ho = ke({
95
+ color: {
96
+ type: Ve(Object),
97
+ required: !0
98
+ },
99
+ vertical: {
100
+ type: Boolean,
101
+ default: !1
102
+ }
103
+ });
104
+ let dt = !1;
105
+ function Ke(e, n) {
106
+ if (!cn)
107
+ return;
108
+ const t = function(a) {
109
+ var l;
110
+ (l = n.drag) == null || l.call(n, a);
111
+ }, o = function(a) {
112
+ var l;
113
+ document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", o), document.removeEventListener("touchmove", t), document.removeEventListener("touchend", o), document.onselectstart = null, document.ondragstart = null, dt = !1, (l = n.end) == null || l.call(n, a);
114
+ }, s = function(a) {
115
+ var l;
116
+ dt || (a.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", t), document.addEventListener("mouseup", o), document.addEventListener("touchmove", t), document.addEventListener("touchend", o), dt = !0, (l = n.start) == null || l.call(n, a));
117
+ };
118
+ e.addEventListener("mousedown", s), e.addEventListener("touchstart", s);
119
+ }
120
+ const vo = (e) => {
121
+ const n = ge(), t = Vt(), o = Vt();
122
+ function s(l) {
123
+ l.target !== t.value && a(l);
124
+ }
125
+ function a(l) {
126
+ if (!o.value || !t.value)
127
+ return;
128
+ const i = n.vnode.el.getBoundingClientRect(), { clientX: c, clientY: f } = Ct(l);
129
+ if (e.vertical) {
130
+ let d = f - i.top;
131
+ d = Math.max(t.value.offsetHeight / 2, d), d = Math.min(d, i.height - t.value.offsetHeight / 2), e.color.set("alpha", Math.round((d - t.value.offsetHeight / 2) / (i.height - t.value.offsetHeight) * 100));
132
+ } else {
133
+ let d = c - i.left;
134
+ d = Math.max(t.value.offsetWidth / 2, d), d = Math.min(d, i.width - t.value.offsetWidth / 2), e.color.set("alpha", Math.round((d - t.value.offsetWidth / 2) / (i.width - t.value.offsetWidth) * 100));
135
+ }
136
+ }
137
+ return {
138
+ thumb: t,
139
+ bar: o,
140
+ handleDrag: a,
141
+ handleClick: s
142
+ };
143
+ }, _o = (e, {
144
+ bar: n,
145
+ thumb: t,
146
+ handleDrag: o
147
+ }) => {
148
+ const s = ge(), a = ne("color-alpha-slider"), l = T(0), u = T(0), i = T();
149
+ function c() {
150
+ if (!t.value || e.vertical)
151
+ return 0;
152
+ const N = s.vnode.el, b = e.color.get("alpha");
153
+ return N ? Math.round(b * (N.offsetWidth - t.value.offsetWidth / 2) / 100) : 0;
154
+ }
155
+ function f() {
156
+ if (!t.value)
157
+ return 0;
158
+ const N = s.vnode.el;
159
+ if (!e.vertical)
160
+ return 0;
161
+ const b = e.color.get("alpha");
162
+ return N ? Math.round(b * (N.offsetHeight - t.value.offsetHeight / 2) / 100) : 0;
163
+ }
164
+ function d() {
165
+ if (e.color && e.color.value) {
166
+ const { r: N, g: b, b: Z } = e.color.toRgb();
167
+ return `linear-gradient(to right, rgba(${N}, ${b}, ${Z}, 0) 0%, rgba(${N}, ${b}, ${Z}, 1) 100%)`;
168
+ }
169
+ return "";
170
+ }
171
+ function p() {
172
+ l.value = c(), u.value = f(), i.value = d();
173
+ }
174
+ pe(() => {
175
+ if (!n.value || !t.value)
176
+ return;
177
+ const N = {
178
+ drag: (b) => {
179
+ o(b);
180
+ },
181
+ end: (b) => {
182
+ o(b);
183
+ }
184
+ };
185
+ Ke(n.value, N), Ke(t.value, N), p();
186
+ }), ee(() => e.color.get("alpha"), () => p()), ee(() => e.color.value, () => p());
187
+ const v = E(() => [a.b(), a.is("vertical", e.vertical)]), g = E(() => a.e("bar")), k = E(() => a.e("thumb")), S = E(() => ({ background: i.value })), R = E(() => ({
188
+ left: vt(l.value),
189
+ top: vt(u.value)
190
+ }));
191
+ return { rootKls: v, barKls: g, barStyle: S, thumbKls: k, thumbStyle: R, update: p };
192
+ }, go = "ElColorAlphaSlider", bo = D({
193
+ name: go
194
+ }), yo = /* @__PURE__ */ D({
195
+ ...bo,
196
+ props: ho,
197
+ setup(e, { expose: n }) {
198
+ const t = e, { bar: o, thumb: s, handleDrag: a, handleClick: l } = vo(t), { rootKls: u, barKls: i, barStyle: c, thumbKls: f, thumbStyle: d, update: p } = _o(t, {
199
+ bar: o,
200
+ thumb: s,
201
+ handleDrag: a
202
+ });
203
+ return n({
204
+ update: p,
205
+ bar: o,
206
+ thumb: s
207
+ }), (v, g) => (m(), $("div", {
208
+ class: w(r(u))
209
+ }, [
210
+ C("div", {
211
+ ref_key: "bar",
212
+ ref: o,
213
+ class: w(r(i)),
214
+ style: ye(r(c)),
215
+ onClick: g[0] || (g[0] = (...k) => r(l) && r(l)(...k))
216
+ }, null, 6),
217
+ C("div", {
218
+ ref_key: "thumb",
219
+ ref: s,
220
+ class: w(r(f)),
221
+ style: ye(r(d))
222
+ }, null, 6)
223
+ ], 2));
224
+ }
225
+ });
226
+ var ko = /* @__PURE__ */ ue(yo, [["__file", "alpha-slider.vue"]]);
227
+ const Co = D({
228
+ name: "ElColorHueSlider",
229
+ props: {
230
+ color: {
231
+ type: Object,
232
+ required: !0
233
+ },
234
+ vertical: Boolean
235
+ },
236
+ setup(e) {
237
+ const n = ne("color-hue-slider"), t = ge(), o = T(), s = T(), a = T(0), l = T(0), u = E(() => e.color.get("hue"));
238
+ ee(() => u.value, () => {
239
+ p();
240
+ });
241
+ function i(v) {
242
+ v.target !== o.value && c(v);
243
+ }
244
+ function c(v) {
245
+ if (!s.value || !o.value)
246
+ return;
247
+ const k = t.vnode.el.getBoundingClientRect(), { clientX: S, clientY: R } = Ct(v);
248
+ let N;
249
+ if (e.vertical) {
250
+ let b = R - k.top;
251
+ b = Math.min(b, k.height - o.value.offsetHeight / 2), b = Math.max(o.value.offsetHeight / 2, b), N = Math.round((b - o.value.offsetHeight / 2) / (k.height - o.value.offsetHeight) * 360);
252
+ } else {
253
+ let b = S - k.left;
254
+ b = Math.min(b, k.width - o.value.offsetWidth / 2), b = Math.max(o.value.offsetWidth / 2, b), N = Math.round((b - o.value.offsetWidth / 2) / (k.width - o.value.offsetWidth) * 360);
255
+ }
256
+ e.color.set("hue", N);
257
+ }
258
+ function f() {
259
+ if (!o.value)
260
+ return 0;
261
+ const v = t.vnode.el;
262
+ if (e.vertical)
263
+ return 0;
264
+ const g = e.color.get("hue");
265
+ return v ? Math.round(g * (v.offsetWidth - o.value.offsetWidth / 2) / 360) : 0;
266
+ }
267
+ function d() {
268
+ if (!o.value)
269
+ return 0;
270
+ const v = t.vnode.el;
271
+ if (!e.vertical)
272
+ return 0;
273
+ const g = e.color.get("hue");
274
+ return v ? Math.round(g * (v.offsetHeight - o.value.offsetHeight / 2) / 360) : 0;
275
+ }
276
+ function p() {
277
+ a.value = f(), l.value = d();
278
+ }
279
+ return pe(() => {
280
+ if (!s.value || !o.value)
281
+ return;
282
+ const v = {
283
+ drag: (g) => {
284
+ c(g);
285
+ },
286
+ end: (g) => {
287
+ c(g);
288
+ }
289
+ };
290
+ Ke(s.value, v), Ke(o.value, v), p();
291
+ }), {
292
+ bar: s,
293
+ thumb: o,
294
+ thumbLeft: a,
295
+ thumbTop: l,
296
+ hueValue: u,
297
+ handleClick: i,
298
+ update: p,
299
+ ns: n
300
+ };
301
+ }
302
+ });
303
+ function $o(e, n, t, o, s, a) {
304
+ return m(), $("div", {
305
+ class: w([e.ns.b(), e.ns.is("vertical", e.vertical)])
306
+ }, [
307
+ C("div", {
308
+ ref: "bar",
309
+ class: w(e.ns.e("bar")),
310
+ onClick: n[0] || (n[0] = (...l) => e.handleClick && e.handleClick(...l))
311
+ }, null, 2),
312
+ C("div", {
313
+ ref: "thumb",
314
+ class: w(e.ns.e("thumb")),
315
+ style: ye({
316
+ left: e.thumbLeft + "px",
317
+ top: e.thumbTop + "px"
318
+ })
319
+ }, null, 6)
320
+ ], 2);
321
+ }
322
+ var Mo = /* @__PURE__ */ ue(Co, [["render", $o], ["__file", "hue-slider.vue"]]);
323
+ const wo = ke({
324
+ modelValue: String,
325
+ id: String,
326
+ showAlpha: Boolean,
327
+ colorFormat: String,
328
+ disabled: Boolean,
329
+ size: dn,
330
+ popperClass: {
331
+ type: String,
332
+ default: ""
333
+ },
334
+ label: {
335
+ type: String,
336
+ default: void 0
337
+ },
338
+ tabindex: {
339
+ type: [String, Number],
340
+ default: 0
341
+ },
342
+ predefine: {
343
+ type: Ve(Array)
344
+ },
345
+ validateEvent: {
346
+ type: Boolean,
347
+ default: !0
348
+ }
349
+ }), So = {
350
+ [_t]: (e) => ve(e) || Fe(e),
351
+ [fn]: (e) => ve(e) || Fe(e),
352
+ activeChange: (e) => ve(e) || Fe(e),
353
+ focus: (e) => e instanceof FocusEvent,
354
+ blur: (e) => e instanceof FocusEvent
355
+ }, Zt = Symbol("colorPickerContextKey"), Nt = function(e, n, t) {
356
+ return [
357
+ e,
358
+ n * t / ((e = (2 - n) * t) < 1 ? e : 2 - e) || 0,
359
+ e / 2
360
+ ];
361
+ }, xo = function(e) {
362
+ return typeof e == "string" && e.includes(".") && Number.parseFloat(e) === 1;
363
+ }, Eo = function(e) {
364
+ return typeof e == "string" && e.includes("%");
365
+ }, Ie = function(e, n) {
366
+ xo(e) && (e = "100%");
367
+ const t = Eo(e);
368
+ return e = Math.min(n, Math.max(0, Number.parseFloat(`${e}`))), t && (e = Number.parseInt(`${e * n}`, 10) / 100), Math.abs(e - n) < 1e-6 ? 1 : e % n / Number.parseFloat(n);
369
+ }, Ot = {
370
+ 10: "A",
371
+ 11: "B",
372
+ 12: "C",
373
+ 13: "D",
374
+ 14: "E",
375
+ 15: "F"
376
+ }, tt = (e) => {
377
+ e = Math.min(Math.round(e), 255);
378
+ const n = Math.floor(e / 16), t = e % 16;
379
+ return `${Ot[n] || n}${Ot[t] || t}`;
380
+ }, Bt = function({ r: e, g: n, b: t }) {
381
+ return Number.isNaN(+e) || Number.isNaN(+n) || Number.isNaN(+t) ? "" : `#${tt(e)}${tt(n)}${tt(t)}`;
382
+ }, ft = {
383
+ A: 10,
384
+ B: 11,
385
+ C: 12,
386
+ D: 13,
387
+ E: 14,
388
+ F: 15
389
+ }, Ce = function(e) {
390
+ return e.length === 2 ? (ft[e[0].toUpperCase()] || +e[0]) * 16 + (ft[e[1].toUpperCase()] || +e[1]) : ft[e[1].toUpperCase()] || +e[1];
391
+ }, To = function(e, n, t) {
392
+ n = n / 100, t = t / 100;
393
+ let o = n;
394
+ const s = Math.max(t, 0.01);
395
+ t *= 2, n *= t <= 1 ? t : 2 - t, o *= s <= 1 ? s : 2 - s;
396
+ const a = (t + n) / 2, l = t === 0 ? 2 * o / (s + o) : 2 * n / (t + n);
397
+ return {
398
+ h: e,
399
+ s: l * 100,
400
+ v: a * 100
401
+ };
402
+ }, Rt = (e, n, t) => {
403
+ e = Ie(e, 255), n = Ie(n, 255), t = Ie(t, 255);
404
+ const o = Math.max(e, n, t), s = Math.min(e, n, t);
405
+ let a;
406
+ const l = o, u = o - s, i = o === 0 ? 0 : u / o;
407
+ if (o === s)
408
+ a = 0;
409
+ else {
410
+ switch (o) {
411
+ case e: {
412
+ a = (n - t) / u + (n < t ? 6 : 0);
413
+ break;
414
+ }
415
+ case n: {
416
+ a = (t - e) / u + 2;
417
+ break;
418
+ }
419
+ case t: {
420
+ a = (e - n) / u + 4;
421
+ break;
422
+ }
423
+ }
424
+ a /= 6;
425
+ }
426
+ return { h: a * 360, s: i * 100, v: l * 100 };
427
+ }, Re = function(e, n, t) {
428
+ e = Ie(e, 360) * 6, n = Ie(n, 100), t = Ie(t, 100);
429
+ const o = Math.floor(e), s = e - o, a = t * (1 - n), l = t * (1 - s * n), u = t * (1 - (1 - s) * n), i = o % 6, c = [t, l, a, a, u, t][i], f = [u, t, t, l, a, a][i], d = [a, a, u, t, t, l][i];
430
+ return {
431
+ r: Math.round(c * 255),
432
+ g: Math.round(f * 255),
433
+ b: Math.round(d * 255)
434
+ };
435
+ };
436
+ class De {
437
+ constructor(n = {}) {
438
+ this._hue = 0, this._saturation = 100, this._value = 100, this._alpha = 100, this.enableAlpha = !1, this.format = "hex", this.value = "";
439
+ for (const t in n)
440
+ xt(n, t) && (this[t] = n[t]);
441
+ n.value ? this.fromString(n.value) : this.doOnChange();
442
+ }
443
+ set(n, t) {
444
+ if (arguments.length === 1 && typeof n == "object") {
445
+ for (const o in n)
446
+ xt(n, o) && this.set(o, n[o]);
447
+ return;
448
+ }
449
+ this[`_${n}`] = t, this.doOnChange();
450
+ }
451
+ get(n) {
452
+ return n === "alpha" ? Math.floor(this[`_${n}`]) : this[`_${n}`];
453
+ }
454
+ toRgb() {
455
+ return Re(this._hue, this._saturation, this._value);
456
+ }
457
+ fromString(n) {
458
+ if (!n) {
459
+ this._hue = 0, this._saturation = 100, this._value = 100, this.doOnChange();
460
+ return;
461
+ }
462
+ const t = (o, s, a) => {
463
+ this._hue = Math.max(0, Math.min(360, o)), this._saturation = Math.max(0, Math.min(100, s)), this._value = Math.max(0, Math.min(100, a)), this.doOnChange();
464
+ };
465
+ if (n.includes("hsl")) {
466
+ const o = n.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((s) => s !== "").map((s, a) => a > 2 ? Number.parseFloat(s) : Number.parseInt(s, 10));
467
+ if (o.length === 4 ? this._alpha = Number.parseFloat(o[3]) * 100 : o.length === 3 && (this._alpha = 100), o.length >= 3) {
468
+ const { h: s, s: a, v: l } = To(o[0], o[1], o[2]);
469
+ t(s, a, l);
470
+ }
471
+ } else if (n.includes("hsv")) {
472
+ const o = n.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((s) => s !== "").map((s, a) => a > 2 ? Number.parseFloat(s) : Number.parseInt(s, 10));
473
+ o.length === 4 ? this._alpha = Number.parseFloat(o[3]) * 100 : o.length === 3 && (this._alpha = 100), o.length >= 3 && t(o[0], o[1], o[2]);
474
+ } else if (n.includes("rgb")) {
475
+ const o = n.replace(/rgba|rgb|\(|\)/gm, "").split(/\s|,/g).filter((s) => s !== "").map((s, a) => a > 2 ? Number.parseFloat(s) : Number.parseInt(s, 10));
476
+ if (o.length === 4 ? this._alpha = Number.parseFloat(o[3]) * 100 : o.length === 3 && (this._alpha = 100), o.length >= 3) {
477
+ const { h: s, s: a, v: l } = Rt(o[0], o[1], o[2]);
478
+ t(s, a, l);
479
+ }
480
+ } else if (n.includes("#")) {
481
+ const o = n.replace("#", "").trim();
482
+ if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(o))
483
+ return;
484
+ let s, a, l;
485
+ o.length === 3 ? (s = Ce(o[0] + o[0]), a = Ce(o[1] + o[1]), l = Ce(o[2] + o[2])) : (o.length === 6 || o.length === 8) && (s = Ce(o.slice(0, 2)), a = Ce(o.slice(2, 4)), l = Ce(o.slice(4, 6))), o.length === 8 ? this._alpha = Ce(o.slice(6)) / 255 * 100 : (o.length === 3 || o.length === 6) && (this._alpha = 100);
486
+ const { h: u, s: i, v: c } = Rt(s, a, l);
487
+ t(u, i, c);
488
+ }
489
+ }
490
+ compare(n) {
491
+ return Math.abs(n._hue - this._hue) < 2 && Math.abs(n._saturation - this._saturation) < 1 && Math.abs(n._value - this._value) < 1 && Math.abs(n._alpha - this._alpha) < 1;
492
+ }
493
+ doOnChange() {
494
+ const { _hue: n, _saturation: t, _value: o, _alpha: s, format: a } = this;
495
+ if (this.enableAlpha)
496
+ switch (a) {
497
+ case "hsl": {
498
+ const l = Nt(n, t / 100, o / 100);
499
+ this.value = `hsla(${n}, ${Math.round(l[1] * 100)}%, ${Math.round(l[2] * 100)}%, ${this.get("alpha") / 100})`;
500
+ break;
501
+ }
502
+ case "hsv": {
503
+ this.value = `hsva(${n}, ${Math.round(t)}%, ${Math.round(o)}%, ${this.get("alpha") / 100})`;
504
+ break;
505
+ }
506
+ case "hex": {
507
+ this.value = `${Bt(Re(n, t, o))}${tt(s * 255 / 100)}`;
508
+ break;
509
+ }
510
+ default: {
511
+ const { r: l, g: u, b: i } = Re(n, t, o);
512
+ this.value = `rgba(${l}, ${u}, ${i}, ${this.get("alpha") / 100})`;
513
+ }
514
+ }
515
+ else
516
+ switch (a) {
517
+ case "hsl": {
518
+ const l = Nt(n, t / 100, o / 100);
519
+ this.value = `hsl(${n}, ${Math.round(l[1] * 100)}%, ${Math.round(l[2] * 100)}%)`;
520
+ break;
521
+ }
522
+ case "hsv": {
523
+ this.value = `hsv(${n}, ${Math.round(t)}%, ${Math.round(o)}%)`;
524
+ break;
525
+ }
526
+ case "rgb": {
527
+ const { r: l, g: u, b: i } = Re(n, t, o);
528
+ this.value = `rgb(${l}, ${u}, ${i})`;
529
+ break;
530
+ }
531
+ default:
532
+ this.value = Bt(Re(n, t, o));
533
+ }
534
+ }
535
+ }
536
+ const Io = D({
537
+ props: {
538
+ colors: {
539
+ type: Array,
540
+ required: !0
541
+ },
542
+ color: {
543
+ type: Object,
544
+ required: !0
545
+ }
546
+ },
547
+ setup(e) {
548
+ const n = ne("color-predefine"), { currentColor: t } = Le(Zt), o = T(a(e.colors, e.color));
549
+ ee(() => t.value, (l) => {
550
+ const u = new De();
551
+ u.fromString(l), o.value.forEach((i) => {
552
+ i.selected = u.compare(i);
553
+ });
554
+ }), yt(() => {
555
+ o.value = a(e.colors, e.color);
556
+ });
557
+ function s(l) {
558
+ e.color.fromString(e.colors[l]);
559
+ }
560
+ function a(l, u) {
561
+ return l.map((i) => {
562
+ const c = new De();
563
+ return c.enableAlpha = !0, c.format = "rgba", c.fromString(i), c.selected = c.value === u.value, c;
564
+ });
565
+ }
566
+ return {
567
+ rgbaColors: o,
568
+ handleSelect: s,
569
+ ns: n
570
+ };
571
+ }
572
+ }), Ao = ["onClick"];
573
+ function Po(e, n, t, o, s, a) {
574
+ return m(), $("div", {
575
+ class: w(e.ns.b())
576
+ }, [
577
+ C("div", {
578
+ class: w(e.ns.e("colors"))
579
+ }, [
580
+ (m(!0), $(oe, null, xe(e.rgbaColors, (l, u) => (m(), $("div", {
581
+ key: e.colors[u],
582
+ class: w([
583
+ e.ns.e("color-selector"),
584
+ e.ns.is("alpha", l._alpha < 100),
585
+ { selected: l.selected }
586
+ ]),
587
+ onClick: (i) => e.handleSelect(u)
588
+ }, [
589
+ C("div", {
590
+ style: ye({ backgroundColor: l.value })
591
+ }, null, 4)
592
+ ], 10, Ao))), 128))
593
+ ], 2)
594
+ ], 2);
595
+ }
596
+ var Vo = /* @__PURE__ */ ue(Io, [["render", Po], ["__file", "predefine.vue"]]);
597
+ const Lo = D({
598
+ name: "ElSlPanel",
599
+ props: {
600
+ color: {
601
+ type: Object,
602
+ required: !0
603
+ }
604
+ },
605
+ setup(e) {
606
+ const n = ne("color-svpanel"), t = ge(), o = T(0), s = T(0), a = T("hsl(0, 100%, 50%)"), l = E(() => {
607
+ const c = e.color.get("hue"), f = e.color.get("value");
608
+ return { hue: c, value: f };
609
+ });
610
+ function u() {
611
+ const c = e.color.get("saturation"), f = e.color.get("value"), d = t.vnode.el, { clientWidth: p, clientHeight: v } = d;
612
+ s.value = c * p / 100, o.value = (100 - f) * v / 100, a.value = `hsl(${e.color.get("hue")}, 100%, 50%)`;
613
+ }
614
+ function i(c) {
615
+ const d = t.vnode.el.getBoundingClientRect(), { clientX: p, clientY: v } = Ct(c);
616
+ let g = p - d.left, k = v - d.top;
617
+ g = Math.max(0, g), g = Math.min(g, d.width), k = Math.max(0, k), k = Math.min(k, d.height), s.value = g, o.value = k, e.color.set({
618
+ saturation: g / d.width * 100,
619
+ value: 100 - k / d.height * 100
620
+ });
621
+ }
622
+ return ee(() => l.value, () => {
623
+ u();
624
+ }), pe(() => {
625
+ Ke(t.vnode.el, {
626
+ drag: (c) => {
627
+ i(c);
628
+ },
629
+ end: (c) => {
630
+ i(c);
631
+ }
632
+ }), u();
633
+ }), {
634
+ cursorTop: o,
635
+ cursorLeft: s,
636
+ background: a,
637
+ colorValue: l,
638
+ handleDrag: i,
639
+ update: u,
640
+ ns: n
641
+ };
642
+ }
643
+ }), No = /* @__PURE__ */ C("div", null, null, -1), Oo = [
644
+ No
645
+ ];
646
+ function Bo(e, n, t, o, s, a) {
647
+ return m(), $("div", {
648
+ class: w(e.ns.b()),
649
+ style: ye({
650
+ backgroundColor: e.background
651
+ })
652
+ }, [
653
+ C("div", {
654
+ class: w(e.ns.e("white"))
655
+ }, null, 2),
656
+ C("div", {
657
+ class: w(e.ns.e("black"))
658
+ }, null, 2),
659
+ C("div", {
660
+ class: w(e.ns.e("cursor")),
661
+ style: ye({
662
+ top: e.cursorTop + "px",
663
+ left: e.cursorLeft + "px"
664
+ })
665
+ }, Oo, 6)
666
+ ], 6);
667
+ }
668
+ var Ro = /* @__PURE__ */ ue(Lo, [["render", Bo], ["__file", "sv-panel.vue"]]);
669
+ const Fo = ["onKeydown"], Do = ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex"], zo = D({
670
+ name: "ElColorPicker"
671
+ }), Ho = /* @__PURE__ */ D({
672
+ ...zo,
673
+ props: wo,
674
+ emits: So,
675
+ setup(e, { expose: n, emit: t }) {
676
+ const o = e, { t: s } = Dt(), a = ne("color"), { formItem: l } = mn(), u = pn(), i = hn(), { inputId: c, isLabeledByFormItem: f } = vn(o, {
677
+ formItemContext: l
678
+ }), d = T(), p = T(), v = T(), g = T(), k = T(), S = T(), {
679
+ isFocused: R,
680
+ handleFocus: N,
681
+ handleBlur: b
682
+ } = _n(k, {
683
+ beforeBlur(V) {
684
+ var J;
685
+ return (J = g.value) == null ? void 0 : J.isFocusInsideContent(V);
686
+ },
687
+ afterBlur() {
688
+ B(!1), h();
689
+ }
690
+ }), Z = (V) => {
691
+ if (i.value)
692
+ return Mt();
693
+ N(V);
694
+ };
695
+ let Y = !0;
696
+ const O = rt(new De({
697
+ enableAlpha: o.showAlpha,
698
+ format: o.colorFormat || "",
699
+ value: o.modelValue
700
+ })), j = T(!1), P = T(!1), W = T(""), le = E(() => !o.modelValue && !P.value ? "transparent" : I(O, o.showAlpha)), ce = E(() => !o.modelValue && !P.value ? "" : O.value), de = E(() => f.value ? void 0 : o.label || s("el.colorpicker.defaultLabel")), be = E(() => f.value ? l == null ? void 0 : l.labelId : void 0), x = E(() => [
701
+ a.b("picker"),
702
+ a.is("disabled", i.value),
703
+ a.bm("picker", u.value),
704
+ a.is("focused", R.value)
705
+ ]);
706
+ function I(V, J) {
707
+ if (!(V instanceof De))
708
+ throw new TypeError("color should be instance of _color Class");
709
+ const { r: fe, g: wt, b: St } = V.toRgb();
710
+ return J ? `rgba(${fe}, ${wt}, ${St}, ${V.get("alpha") / 100})` : `rgb(${fe}, ${wt}, ${St})`;
711
+ }
712
+ function B(V) {
713
+ j.value = V;
714
+ }
715
+ const X = gn(B, 100, { leading: !0 });
716
+ function K() {
717
+ i.value || B(!0);
718
+ }
719
+ function y() {
720
+ X(!1), h();
721
+ }
722
+ function h() {
723
+ $e(() => {
724
+ o.modelValue ? O.fromString(o.modelValue) : (O.value = "", $e(() => {
725
+ P.value = !1;
726
+ }));
727
+ });
728
+ }
729
+ function A() {
730
+ i.value || X(!j.value);
731
+ }
732
+ function F() {
733
+ O.fromString(W.value);
734
+ }
735
+ function q() {
736
+ const V = O.value;
737
+ t(_t, V), t("change", V), o.validateEvent && (l == null || l.validate("change").catch((J) => Tt(J))), X(!1), $e(() => {
738
+ const J = new De({
739
+ enableAlpha: o.showAlpha,
740
+ format: o.colorFormat || "",
741
+ value: o.modelValue
742
+ });
743
+ O.compare(J) || h();
744
+ });
745
+ }
746
+ function z() {
747
+ X(!1), t(_t, null), t("change", null), o.modelValue !== null && o.validateEvent && (l == null || l.validate("change").catch((V) => Tt(V))), h();
748
+ }
749
+ function G(V) {
750
+ if (j.value && (y(), R.value)) {
751
+ const J = new FocusEvent("focus", V);
752
+ b(J);
753
+ }
754
+ }
755
+ function se(V) {
756
+ V.preventDefault(), V.stopPropagation(), B(!1), h();
757
+ }
758
+ function Ye(V) {
759
+ switch (V.code) {
760
+ case re.enter:
761
+ case re.space:
762
+ V.preventDefault(), V.stopPropagation(), K(), S.value.focus();
763
+ break;
764
+ case re.esc:
765
+ se(V);
766
+ break;
767
+ }
768
+ }
769
+ function Ze() {
770
+ k.value.focus();
771
+ }
772
+ function Mt() {
773
+ k.value.blur();
774
+ }
775
+ return pe(() => {
776
+ o.modelValue && (W.value = ce.value);
777
+ }), ee(() => o.modelValue, (V) => {
778
+ V ? V && V !== O.value && (Y = !1, O.fromString(V)) : P.value = !1;
779
+ }), ee(() => ce.value, (V) => {
780
+ W.value = V, Y && t("activeChange", V), Y = !0;
781
+ }), ee(() => O.value, () => {
782
+ !o.modelValue && !P.value && (P.value = !0);
783
+ }), ee(() => j.value, () => {
784
+ $e(() => {
785
+ var V, J, fe;
786
+ (V = d.value) == null || V.update(), (J = p.value) == null || J.update(), (fe = v.value) == null || fe.update();
787
+ });
788
+ }), We(Zt, {
789
+ currentColor: ce
790
+ }), n({
791
+ color: O,
792
+ show: K,
793
+ hide: y,
794
+ focus: Ze,
795
+ blur: Mt
796
+ }), (V, J) => (m(), L(r(je), {
797
+ ref_key: "popper",
798
+ ref: g,
799
+ visible: j.value,
800
+ "show-arrow": !1,
801
+ "fallback-placements": ["bottom", "top", "right", "left"],
802
+ offset: 0,
803
+ "gpu-acceleration": !1,
804
+ "popper-class": [r(a).be("picker", "panel"), r(a).b("dropdown"), V.popperClass],
805
+ "stop-popper-mouse-event": !1,
806
+ effect: "light",
807
+ trigger: "click",
808
+ transition: `${r(a).namespace.value}-zoom-in-top`,
809
+ persistent: "",
810
+ onHide: J[2] || (J[2] = (fe) => B(!1))
811
+ }, {
812
+ content: M(() => [
813
+ Me((m(), $("div", {
814
+ onKeydown: Lt(se, ["esc"])
815
+ }, [
816
+ C("div", {
817
+ class: w(r(a).be("dropdown", "main-wrapper"))
818
+ }, [
819
+ _(Mo, {
820
+ ref_key: "hue",
821
+ ref: d,
822
+ class: "hue-slider",
823
+ color: r(O),
824
+ vertical: ""
825
+ }, null, 8, ["color"]),
826
+ _(Ro, {
827
+ ref_key: "sv",
828
+ ref: p,
829
+ color: r(O)
830
+ }, null, 8, ["color"])
831
+ ], 2),
832
+ V.showAlpha ? (m(), L(ko, {
833
+ key: 0,
834
+ ref_key: "alpha",
835
+ ref: v,
836
+ color: r(O)
837
+ }, null, 8, ["color"])) : H("v-if", !0),
838
+ V.predefine ? (m(), L(Vo, {
839
+ key: 1,
840
+ ref: "predefine",
841
+ color: r(O),
842
+ colors: V.predefine
843
+ }, null, 8, ["color", "colors"])) : H("v-if", !0),
844
+ C("div", {
845
+ class: w(r(a).be("dropdown", "btns"))
846
+ }, [
847
+ C("span", {
848
+ class: w(r(a).be("dropdown", "value"))
849
+ }, [
850
+ _(r(bn), {
851
+ ref_key: "inputRef",
852
+ ref: S,
853
+ modelValue: W.value,
854
+ "onUpdate:modelValue": J[0] || (J[0] = (fe) => W.value = fe),
855
+ "validate-event": !1,
856
+ size: "small",
857
+ onKeyup: Lt(F, ["enter"]),
858
+ onBlur: F
859
+ }, null, 8, ["modelValue", "onKeyup"])
860
+ ], 2),
861
+ _(r(Et), {
862
+ class: w(r(a).be("dropdown", "link-btn")),
863
+ text: "",
864
+ size: "small",
865
+ onClick: z
866
+ }, {
867
+ default: M(() => [
868
+ Q(U(r(s)("el.colorpicker.clear")), 1)
869
+ ]),
870
+ _: 1
871
+ }, 8, ["class"]),
872
+ _(r(Et), {
873
+ plain: "",
874
+ size: "small",
875
+ class: w(r(a).be("dropdown", "btn")),
876
+ onClick: q
877
+ }, {
878
+ default: M(() => [
879
+ Q(U(r(s)("el.colorpicker.confirm")), 1)
880
+ ]),
881
+ _: 1
882
+ }, 8, ["class"])
883
+ ], 2)
884
+ ], 40, Fo)), [
885
+ [r(zt), G]
886
+ ])
887
+ ]),
888
+ default: M(() => [
889
+ C("div", {
890
+ id: r(c),
891
+ ref_key: "triggerRef",
892
+ ref: k,
893
+ class: w(r(x)),
894
+ role: "button",
895
+ "aria-label": r(de),
896
+ "aria-labelledby": r(be),
897
+ "aria-description": r(s)("el.colorpicker.description", { color: V.modelValue || "" }),
898
+ "aria-disabled": r(i),
899
+ tabindex: r(i) ? -1 : V.tabindex,
900
+ onKeydown: Ye,
901
+ onFocus: Z,
902
+ onBlur: J[1] || (J[1] = (...fe) => r(b) && r(b)(...fe))
903
+ }, [
904
+ r(i) ? (m(), $("div", {
905
+ key: 0,
906
+ class: w(r(a).be("picker", "mask"))
907
+ }, null, 2)) : H("v-if", !0),
908
+ C("div", {
909
+ class: w(r(a).be("picker", "trigger")),
910
+ onClick: A
911
+ }, [
912
+ C("span", {
913
+ class: w([r(a).be("picker", "color"), r(a).is("alpha", V.showAlpha)])
914
+ }, [
915
+ C("span", {
916
+ class: w(r(a).be("picker", "color-inner")),
917
+ style: ye({
918
+ backgroundColor: r(le)
919
+ })
920
+ }, [
921
+ Me(_(r(we), {
922
+ class: w([r(a).be("picker", "icon"), r(a).is("icon-arrow-down")])
923
+ }, {
924
+ default: M(() => [
925
+ _(r(Ht))
926
+ ]),
927
+ _: 1
928
+ }, 8, ["class"]), [
929
+ [qe, V.modelValue || P.value]
930
+ ]),
931
+ Me(_(r(we), {
932
+ class: w([r(a).be("picker", "empty"), r(a).is("icon-close")])
933
+ }, {
934
+ default: M(() => [
935
+ _(r(Wt))
936
+ ]),
937
+ _: 1
938
+ }, 8, ["class"]), [
939
+ [qe, !V.modelValue && !P.value]
940
+ ])
941
+ ], 6)
942
+ ], 2)
943
+ ], 2)
944
+ ], 42, Do)
945
+ ]),
946
+ _: 1
947
+ }, 8, ["visible", "popper-class", "transition"]));
948
+ }
949
+ });
950
+ var Wo = /* @__PURE__ */ ue(Ho, [["__file", "color-picker.vue"]]);
951
+ const qo = at(Wo), Ko = ke({
952
+ ...yn,
953
+ direction: {
954
+ type: String,
955
+ default: "rtl",
956
+ values: ["ltr", "rtl", "ttb", "btt"]
957
+ },
958
+ size: {
959
+ type: [String, Number],
960
+ default: "30%"
961
+ },
962
+ withHeader: {
963
+ type: Boolean,
964
+ default: !0
965
+ },
966
+ modalFade: {
967
+ type: Boolean,
968
+ default: !0
969
+ },
970
+ headerAriaLevel: {
971
+ type: String,
972
+ default: "2"
973
+ }
974
+ }), Uo = kn, jo = ["aria-label", "aria-labelledby", "aria-describedby"], Xo = ["id", "aria-level"], Go = ["aria-label"], Yo = ["id"], Zo = D({
975
+ name: "ElDrawer",
976
+ inheritAttrs: !1
977
+ }), Jo = /* @__PURE__ */ D({
978
+ ...Zo,
979
+ props: Ko,
980
+ emits: Uo,
981
+ setup(e, { expose: n }) {
982
+ const t = e, o = qn();
983
+ Cn({
984
+ scope: "el-drawer",
985
+ from: "the title slot",
986
+ replacement: "the header slot",
987
+ version: "3.0.0",
988
+ ref: "https://element-plus.org/en-US/component/drawer.html#slots"
989
+ }, E(() => !!o.title));
990
+ const s = T(), a = T(), l = ne("drawer"), { t: u } = Dt(), {
991
+ afterEnter: i,
992
+ afterLeave: c,
993
+ beforeLeave: f,
994
+ visible: d,
995
+ rendered: p,
996
+ titleId: v,
997
+ bodyId: g,
998
+ zIndex: k,
999
+ onModalClick: S,
1000
+ onOpenAutoFocus: R,
1001
+ onCloseAutoFocus: N,
1002
+ onFocusoutPrevented: b,
1003
+ onCloseRequested: Z,
1004
+ handleClose: Y
1005
+ } = $n(t, s), O = E(() => t.direction === "rtl" || t.direction === "ltr"), j = E(() => vt(t.size));
1006
+ return n({
1007
+ handleClose: Y,
1008
+ afterEnter: i,
1009
+ afterLeave: c
1010
+ }), (P, W) => (m(), L(Kn, {
1011
+ to: "body",
1012
+ disabled: !P.appendToBody
1013
+ }, [
1014
+ _(it, {
1015
+ name: r(l).b("fade"),
1016
+ onAfterEnter: r(i),
1017
+ onAfterLeave: r(c),
1018
+ onBeforeLeave: r(f),
1019
+ persisted: ""
1020
+ }, {
1021
+ default: M(() => [
1022
+ Me(_(r(Mn), {
1023
+ mask: P.modal,
1024
+ "overlay-class": P.modalClass,
1025
+ "z-index": r(k),
1026
+ onClick: r(S)
1027
+ }, {
1028
+ default: M(() => [
1029
+ _(r(wn), {
1030
+ loop: "",
1031
+ trapped: r(d),
1032
+ "focus-trap-el": s.value,
1033
+ "focus-start-el": a.value,
1034
+ onFocusAfterTrapped: r(R),
1035
+ onFocusAfterReleased: r(N),
1036
+ onFocusoutPrevented: r(b),
1037
+ onReleaseRequested: r(Z)
1038
+ }, {
1039
+ default: M(() => [
1040
+ C("div", jt({
1041
+ ref_key: "drawerRef",
1042
+ ref: s,
1043
+ "aria-modal": "true",
1044
+ "aria-label": P.title || void 0,
1045
+ "aria-labelledby": P.title ? void 0 : r(v),
1046
+ "aria-describedby": r(g)
1047
+ }, P.$attrs, {
1048
+ class: [r(l).b(), P.direction, r(d) && "open"],
1049
+ style: r(O) ? "width: " + r(j) : "height: " + r(j),
1050
+ role: "dialog",
1051
+ onClick: W[1] || (W[1] = Te(() => {
1052
+ }, ["stop"]))
1053
+ }), [
1054
+ C("span", {
1055
+ ref_key: "focusStartRef",
1056
+ ref: a,
1057
+ class: w(r(l).e("sr-focus")),
1058
+ tabindex: "-1"
1059
+ }, null, 2),
1060
+ P.withHeader ? (m(), $("header", {
1061
+ key: 0,
1062
+ class: w(r(l).e("header"))
1063
+ }, [
1064
+ P.$slots.title ? ae(P.$slots, "title", { key: 1 }, () => [
1065
+ H(" DEPRECATED SLOT ")
1066
+ ]) : ae(P.$slots, "header", {
1067
+ key: 0,
1068
+ close: r(Y),
1069
+ titleId: r(v),
1070
+ titleClass: r(l).e("title")
1071
+ }, () => [
1072
+ P.$slots.title ? H("v-if", !0) : (m(), $("span", {
1073
+ key: 0,
1074
+ id: r(v),
1075
+ role: "heading",
1076
+ "aria-level": P.headerAriaLevel,
1077
+ class: w(r(l).e("title"))
1078
+ }, U(P.title), 11, Xo))
1079
+ ]),
1080
+ P.showClose ? (m(), $("button", {
1081
+ key: 2,
1082
+ "aria-label": r(u)("el.drawer.close"),
1083
+ class: w(r(l).e("close-btn")),
1084
+ type: "button",
1085
+ onClick: W[0] || (W[0] = (...le) => r(Y) && r(Y)(...le))
1086
+ }, [
1087
+ _(r(we), {
1088
+ class: w(r(l).e("close"))
1089
+ }, {
1090
+ default: M(() => [
1091
+ _(r(Wt))
1092
+ ]),
1093
+ _: 1
1094
+ }, 8, ["class"])
1095
+ ], 10, Go)) : H("v-if", !0)
1096
+ ], 2)) : H("v-if", !0),
1097
+ r(p) ? (m(), $("div", {
1098
+ key: 1,
1099
+ id: r(g),
1100
+ class: w(r(l).e("body"))
1101
+ }, [
1102
+ ae(P.$slots, "default")
1103
+ ], 10, Yo)) : H("v-if", !0),
1104
+ P.$slots.footer ? (m(), $("div", {
1105
+ key: 2,
1106
+ class: w(r(l).e("footer"))
1107
+ }, [
1108
+ ae(P.$slots, "footer")
1109
+ ], 2)) : H("v-if", !0)
1110
+ ], 16, jo)
1111
+ ]),
1112
+ _: 3
1113
+ }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
1114
+ ]),
1115
+ _: 3
1116
+ }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
1117
+ [qe, r(d)]
1118
+ ])
1119
+ ]),
1120
+ _: 3
1121
+ }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
1122
+ ], 8, ["disabled"]));
1123
+ }
1124
+ });
1125
+ var Qo = /* @__PURE__ */ ue(Jo, [["__file", "drawer.vue"]]);
1126
+ const ea = at(Qo);
1127
+ let ta = class {
1128
+ constructor(n, t) {
1129
+ this.parent = n, this.domNode = t, this.subIndex = 0, this.subIndex = 0, this.init();
1130
+ }
1131
+ init() {
1132
+ this.subMenuItems = this.domNode.querySelectorAll("li"), this.addListeners();
1133
+ }
1134
+ gotoSubIndex(n) {
1135
+ n === this.subMenuItems.length ? n = 0 : n < 0 && (n = this.subMenuItems.length - 1), this.subMenuItems[n].focus(), this.subIndex = n;
1136
+ }
1137
+ addListeners() {
1138
+ const n = this.parent.domNode;
1139
+ Array.prototype.forEach.call(this.subMenuItems, (t) => {
1140
+ t.addEventListener("keydown", (o) => {
1141
+ let s = !1;
1142
+ switch (o.code) {
1143
+ case re.down: {
1144
+ this.gotoSubIndex(this.subIndex + 1), s = !0;
1145
+ break;
1146
+ }
1147
+ case re.up: {
1148
+ this.gotoSubIndex(this.subIndex - 1), s = !0;
1149
+ break;
1150
+ }
1151
+ case re.tab: {
1152
+ Qe(n, "mouseleave");
1153
+ break;
1154
+ }
1155
+ case re.enter:
1156
+ case re.space: {
1157
+ s = !0, o.currentTarget.click();
1158
+ break;
1159
+ }
1160
+ }
1161
+ return s && (o.preventDefault(), o.stopPropagation()), !1;
1162
+ });
1163
+ });
1164
+ }
1165
+ }, na = class {
1166
+ constructor(n, t) {
1167
+ this.domNode = n, this.submenu = null, this.submenu = null, this.init(t);
1168
+ }
1169
+ init(n) {
1170
+ this.domNode.setAttribute("tabindex", "0");
1171
+ const t = this.domNode.querySelector(`.${n}-menu`);
1172
+ t && (this.submenu = new ta(this, t)), this.addListeners();
1173
+ }
1174
+ addListeners() {
1175
+ this.domNode.addEventListener("keydown", (n) => {
1176
+ let t = !1;
1177
+ switch (n.code) {
1178
+ case re.down: {
1179
+ Qe(n.currentTarget, "mouseenter"), this.submenu && this.submenu.gotoSubIndex(0), t = !0;
1180
+ break;
1181
+ }
1182
+ case re.up: {
1183
+ Qe(n.currentTarget, "mouseenter"), this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1), t = !0;
1184
+ break;
1185
+ }
1186
+ case re.tab: {
1187
+ Qe(n.currentTarget, "mouseleave");
1188
+ break;
1189
+ }
1190
+ case re.enter:
1191
+ case re.space: {
1192
+ t = !0, n.currentTarget.click();
1193
+ break;
1194
+ }
1195
+ }
1196
+ t && n.preventDefault();
1197
+ });
1198
+ }
1199
+ }, oa = class {
1200
+ constructor(n, t) {
1201
+ this.domNode = n, this.init(t);
1202
+ }
1203
+ init(n) {
1204
+ const t = this.domNode.childNodes;
1205
+ Array.from(t).forEach((o) => {
1206
+ o.nodeType === 1 && new na(o, n);
1207
+ });
1208
+ }
1209
+ };
1210
+ const aa = D({
1211
+ name: "ElMenuCollapseTransition",
1212
+ setup() {
1213
+ const e = ne("menu");
1214
+ return {
1215
+ listeners: {
1216
+ onBeforeEnter: (t) => t.style.opacity = "0.2",
1217
+ onEnter(t, o) {
1218
+ Je(t, `${e.namespace.value}-opacity-transition`), t.style.opacity = "1", o();
1219
+ },
1220
+ onAfterEnter(t) {
1221
+ ut(t, `${e.namespace.value}-opacity-transition`), t.style.opacity = "";
1222
+ },
1223
+ onBeforeLeave(t) {
1224
+ t.dataset || (t.dataset = {}), Sn(t, e.m("collapse")) ? (ut(t, e.m("collapse")), t.dataset.oldOverflow = t.style.overflow, t.dataset.scrollWidth = t.clientWidth.toString(), Je(t, e.m("collapse"))) : (Je(t, e.m("collapse")), t.dataset.oldOverflow = t.style.overflow, t.dataset.scrollWidth = t.clientWidth.toString(), ut(t, e.m("collapse"))), t.style.width = `${t.scrollWidth}px`, t.style.overflow = "hidden";
1225
+ },
1226
+ onLeave(t) {
1227
+ Je(t, "horizontal-collapse-transition"), t.style.width = `${t.dataset.scrollWidth}px`;
1228
+ }
1229
+ }
1230
+ };
1231
+ }
1232
+ });
1233
+ function la(e, n, t, o, s, a) {
1234
+ return m(), L(it, jt({ mode: "out-in" }, e.listeners), {
1235
+ default: M(() => [
1236
+ ae(e.$slots, "default")
1237
+ ]),
1238
+ _: 3
1239
+ }, 16);
1240
+ }
1241
+ var sa = /* @__PURE__ */ ue(aa, [["render", la], ["__file", "menu-collapse-transition.vue"]]);
1242
+ function Jt(e, n) {
1243
+ const t = E(() => {
1244
+ let s = e.parent;
1245
+ const a = [n.value];
1246
+ for (; s.type.name !== "ElMenu"; )
1247
+ s.props.index && a.unshift(s.props.index), s = s.parent;
1248
+ return a;
1249
+ });
1250
+ return {
1251
+ parentMenu: E(() => {
1252
+ let s = e.parent;
1253
+ for (; s && !["ElMenu", "ElSubMenu"].includes(s.type.name); )
1254
+ s = s.parent;
1255
+ return s;
1256
+ }),
1257
+ indexPath: t
1258
+ };
1259
+ }
1260
+ function ra(e) {
1261
+ return E(() => {
1262
+ const t = e.backgroundColor;
1263
+ return t ? new xn(t).shade(20).toString() : "";
1264
+ });
1265
+ }
1266
+ const Qt = (e, n) => {
1267
+ const t = ne("menu");
1268
+ return E(() => t.cssVarBlock({
1269
+ "text-color": e.textColor || "",
1270
+ "hover-text-color": e.textColor || "",
1271
+ "bg-color": e.backgroundColor || "",
1272
+ "hover-bg-color": ra(e).value || "",
1273
+ "active-color": e.activeTextColor || "",
1274
+ level: `${n}`
1275
+ }));
1276
+ }, ia = ke({
1277
+ index: {
1278
+ type: String,
1279
+ required: !0
1280
+ },
1281
+ showTimeout: Number,
1282
+ hideTimeout: Number,
1283
+ popperClass: String,
1284
+ disabled: Boolean,
1285
+ teleported: {
1286
+ type: Boolean,
1287
+ default: void 0
1288
+ },
1289
+ popperOffset: Number,
1290
+ expandCloseIcon: {
1291
+ type: Ee
1292
+ },
1293
+ expandOpenIcon: {
1294
+ type: Ee
1295
+ },
1296
+ collapseCloseIcon: {
1297
+ type: Ee
1298
+ },
1299
+ collapseOpenIcon: {
1300
+ type: Ee
1301
+ }
1302
+ }), mt = "ElSubMenu";
1303
+ var $t = D({
1304
+ name: mt,
1305
+ props: ia,
1306
+ setup(e, { slots: n, expose: t }) {
1307
+ const o = ge(), { indexPath: s, parentMenu: a } = Jt(o, E(() => e.index)), l = ne("menu"), u = ne("sub-menu"), i = Le("rootMenu");
1308
+ i || nt(mt, "can not inject root menu");
1309
+ const c = Le(`subMenu:${a.value.uid}`);
1310
+ c || nt(mt, "can not inject sub menu");
1311
+ const f = T({}), d = T({});
1312
+ let p;
1313
+ const v = T(!1), g = T(), k = T(null), S = E(() => P.value === "horizontal" && N.value ? "bottom-start" : "right-start"), R = E(() => P.value === "horizontal" && N.value || P.value === "vertical" && !i.props.collapse ? e.expandCloseIcon && e.expandOpenIcon ? O.value ? e.expandOpenIcon : e.expandCloseIcon : Ht : e.collapseCloseIcon && e.collapseOpenIcon ? O.value ? e.collapseOpenIcon : e.collapseCloseIcon : En), N = E(() => c.level === 0), b = E(() => {
1314
+ const h = e.teleported;
1315
+ return h === void 0 ? N.value : h;
1316
+ }), Z = E(() => i.props.collapse ? `${l.namespace.value}-zoom-in-left` : `${l.namespace.value}-zoom-in-top`), Y = E(() => P.value === "horizontal" && N.value ? [
1317
+ "bottom-start",
1318
+ "bottom-end",
1319
+ "top-start",
1320
+ "top-end",
1321
+ "right-start",
1322
+ "left-start"
1323
+ ] : [
1324
+ "right-start",
1325
+ "right",
1326
+ "right-end",
1327
+ "left-start",
1328
+ "bottom-start",
1329
+ "bottom-end",
1330
+ "top-start",
1331
+ "top-end"
1332
+ ]), O = E(() => i.openedMenus.includes(e.index)), j = E(() => {
1333
+ let h = !1;
1334
+ return Object.values(f.value).forEach((A) => {
1335
+ A.active && (h = !0);
1336
+ }), Object.values(d.value).forEach((A) => {
1337
+ A.active && (h = !0);
1338
+ }), h;
1339
+ }), P = E(() => i.props.mode), W = rt({
1340
+ index: e.index,
1341
+ indexPath: s,
1342
+ active: j
1343
+ }), le = Qt(i.props, c.level + 1), ce = E(() => {
1344
+ var h;
1345
+ return (h = e.popperOffset) != null ? h : i.props.popperOffset;
1346
+ }), de = E(() => {
1347
+ var h;
1348
+ return (h = e.popperClass) != null ? h : i.props.popperClass;
1349
+ }), be = E(() => {
1350
+ var h;
1351
+ return (h = e.showTimeout) != null ? h : i.props.showTimeout;
1352
+ }), x = E(() => {
1353
+ var h;
1354
+ return (h = e.hideTimeout) != null ? h : i.props.hideTimeout;
1355
+ }), I = () => {
1356
+ var h, A, F;
1357
+ return (F = (A = (h = k.value) == null ? void 0 : h.popperRef) == null ? void 0 : A.popperInstanceRef) == null ? void 0 : F.destroy();
1358
+ }, B = (h) => {
1359
+ h || I();
1360
+ }, X = () => {
1361
+ i.props.menuTrigger === "hover" && i.props.mode === "horizontal" || i.props.collapse && i.props.mode === "vertical" || e.disabled || i.handleSubMenuClick({
1362
+ index: e.index,
1363
+ indexPath: s.value,
1364
+ active: j.value
1365
+ });
1366
+ }, K = (h, A = be.value) => {
1367
+ var F;
1368
+ if (h.type !== "focus") {
1369
+ if (i.props.menuTrigger === "click" && i.props.mode === "horizontal" || !i.props.collapse && i.props.mode === "vertical" || e.disabled) {
1370
+ c.mouseInChild.value = !0;
1371
+ return;
1372
+ }
1373
+ c.mouseInChild.value = !0, p == null || p(), { stop: p } = It(() => {
1374
+ i.openMenu(e.index, s.value);
1375
+ }, A), b.value && ((F = a.value.vnode.el) == null || F.dispatchEvent(new MouseEvent("mouseenter")));
1376
+ }
1377
+ }, y = (h = !1) => {
1378
+ var A;
1379
+ if (i.props.menuTrigger === "click" && i.props.mode === "horizontal" || !i.props.collapse && i.props.mode === "vertical") {
1380
+ c.mouseInChild.value = !1;
1381
+ return;
1382
+ }
1383
+ p == null || p(), c.mouseInChild.value = !1, { stop: p } = It(() => !v.value && i.closeMenu(e.index, s.value), x.value), b.value && h && ((A = c.handleMouseleave) == null || A.call(c, !0));
1384
+ };
1385
+ ee(() => i.props.collapse, (h) => B(!!h));
1386
+ {
1387
+ const h = (F) => {
1388
+ d.value[F.index] = F;
1389
+ }, A = (F) => {
1390
+ delete d.value[F.index];
1391
+ };
1392
+ We(`subMenu:${o.uid}`, {
1393
+ addSubMenu: h,
1394
+ removeSubMenu: A,
1395
+ handleMouseleave: y,
1396
+ mouseInChild: v,
1397
+ level: c.level + 1
1398
+ });
1399
+ }
1400
+ return t({
1401
+ opened: O
1402
+ }), pe(() => {
1403
+ i.addSubMenu(W), c.addSubMenu(W);
1404
+ }), Xt(() => {
1405
+ c.removeSubMenu(W), i.removeSubMenu(W);
1406
+ }), () => {
1407
+ var h;
1408
+ const A = [
1409
+ (h = n.title) == null ? void 0 : h.call(n),
1410
+ te(we, {
1411
+ class: u.e("icon-arrow"),
1412
+ style: {
1413
+ transform: O.value ? e.expandCloseIcon && e.expandOpenIcon || e.collapseCloseIcon && e.collapseOpenIcon && i.props.collapse ? "none" : "rotateZ(180deg)" : "none"
1414
+ }
1415
+ }, {
1416
+ default: () => ve(R.value) ? te(o.appContext.components[R.value]) : te(R.value)
1417
+ })
1418
+ ], F = i.isMenuPopup ? te(je, {
1419
+ ref: k,
1420
+ visible: O.value,
1421
+ effect: "light",
1422
+ pure: !0,
1423
+ offset: ce.value,
1424
+ showArrow: !1,
1425
+ persistent: !0,
1426
+ popperClass: de.value,
1427
+ placement: S.value,
1428
+ teleported: b.value,
1429
+ fallbackPlacements: Y.value,
1430
+ transition: Z.value,
1431
+ gpuAcceleration: !1
1432
+ }, {
1433
+ content: () => {
1434
+ var q;
1435
+ return te("div", {
1436
+ class: [
1437
+ l.m(P.value),
1438
+ l.m("popup-container"),
1439
+ de.value
1440
+ ],
1441
+ onMouseenter: (z) => K(z, 100),
1442
+ onMouseleave: () => y(!0),
1443
+ onFocus: (z) => K(z, 100)
1444
+ }, [
1445
+ te("ul", {
1446
+ class: [
1447
+ l.b(),
1448
+ l.m("popup"),
1449
+ l.m(`popup-${S.value}`)
1450
+ ],
1451
+ style: le.value
1452
+ }, [(q = n.default) == null ? void 0 : q.call(n)])
1453
+ ]);
1454
+ },
1455
+ default: () => te("div", {
1456
+ class: u.e("title"),
1457
+ onClick: X
1458
+ }, A)
1459
+ }) : te(oe, {}, [
1460
+ te("div", {
1461
+ class: u.e("title"),
1462
+ ref: g,
1463
+ onClick: X
1464
+ }, A),
1465
+ te(ao, {}, {
1466
+ default: () => {
1467
+ var q;
1468
+ return Me(te("ul", {
1469
+ role: "menu",
1470
+ class: [l.b(), l.m("inline")],
1471
+ style: le.value
1472
+ }, [(q = n.default) == null ? void 0 : q.call(n)]), [[qe, O.value]]);
1473
+ }
1474
+ })
1475
+ ]);
1476
+ return te("li", {
1477
+ class: [
1478
+ u.b(),
1479
+ u.is("active", j.value),
1480
+ u.is("opened", O.value),
1481
+ u.is("disabled", e.disabled)
1482
+ ],
1483
+ role: "menuitem",
1484
+ ariaHaspopup: !0,
1485
+ ariaExpanded: O.value,
1486
+ onMouseenter: K,
1487
+ onMouseleave: () => y(),
1488
+ onFocus: K
1489
+ }, [F]);
1490
+ };
1491
+ }
1492
+ });
1493
+ const ua = ke({
1494
+ mode: {
1495
+ type: String,
1496
+ values: ["horizontal", "vertical"],
1497
+ default: "vertical"
1498
+ },
1499
+ defaultActive: {
1500
+ type: String,
1501
+ default: ""
1502
+ },
1503
+ defaultOpeneds: {
1504
+ type: Ve(Array),
1505
+ default: () => An([])
1506
+ },
1507
+ uniqueOpened: Boolean,
1508
+ router: Boolean,
1509
+ menuTrigger: {
1510
+ type: String,
1511
+ values: ["hover", "click"],
1512
+ default: "hover"
1513
+ },
1514
+ collapse: Boolean,
1515
+ backgroundColor: String,
1516
+ textColor: String,
1517
+ activeTextColor: String,
1518
+ closeOnClickOutside: Boolean,
1519
+ collapseTransition: {
1520
+ type: Boolean,
1521
+ default: !0
1522
+ },
1523
+ ellipsis: {
1524
+ type: Boolean,
1525
+ default: !0
1526
+ },
1527
+ popperOffset: {
1528
+ type: Number,
1529
+ default: 6
1530
+ },
1531
+ ellipsisIcon: {
1532
+ type: Ee,
1533
+ default: () => Pn
1534
+ },
1535
+ popperEffect: {
1536
+ type: String,
1537
+ values: ["dark", "light"],
1538
+ default: "dark"
1539
+ },
1540
+ popperClass: String,
1541
+ showTimeout: {
1542
+ type: Number,
1543
+ default: 300
1544
+ },
1545
+ hideTimeout: {
1546
+ type: Number,
1547
+ default: 300
1548
+ }
1549
+ }), pt = (e) => Array.isArray(e) && e.every((n) => ve(n)), ca = {
1550
+ close: (e, n) => ve(e) && pt(n),
1551
+ open: (e, n) => ve(e) && pt(n),
1552
+ select: (e, n, t, o) => ve(e) && pt(n) && Vn(t) && (o === void 0 || o instanceof Promise)
1553
+ };
1554
+ var da = D({
1555
+ name: "ElMenu",
1556
+ props: ua,
1557
+ emits: ca,
1558
+ setup(e, { emit: n, slots: t, expose: o }) {
1559
+ const s = ge(), a = s.appContext.config.globalProperties.$router, l = T(), u = ne("menu"), i = ne("sub-menu"), c = T(-1), f = T(e.defaultOpeneds && !e.collapse ? e.defaultOpeneds.slice(0) : []), d = T(e.defaultActive), p = T({}), v = T({}), g = E(() => e.mode === "horizontal" || e.mode === "vertical" && e.collapse), k = () => {
1560
+ const x = d.value && p.value[d.value];
1561
+ if (!x || e.mode === "horizontal" || e.collapse)
1562
+ return;
1563
+ x.indexPath.forEach((B) => {
1564
+ const X = v.value[B];
1565
+ X && S(B, X.indexPath);
1566
+ });
1567
+ }, S = (x, I) => {
1568
+ f.value.includes(x) || (e.uniqueOpened && (f.value = f.value.filter((B) => I.includes(B))), f.value.push(x), n("open", x, I));
1569
+ }, R = (x) => {
1570
+ const I = f.value.indexOf(x);
1571
+ I !== -1 && f.value.splice(I, 1);
1572
+ }, N = (x, I) => {
1573
+ R(x), n("close", x, I);
1574
+ }, b = ({
1575
+ index: x,
1576
+ indexPath: I
1577
+ }) => {
1578
+ f.value.includes(x) ? N(x, I) : S(x, I);
1579
+ }, Z = (x) => {
1580
+ (e.mode === "horizontal" || e.collapse) && (f.value = []);
1581
+ const { index: I, indexPath: B } = x;
1582
+ if (!(Fe(I) || Fe(B)))
1583
+ if (e.router && a) {
1584
+ const X = x.route || I, K = a.push(X).then((y) => (y || (d.value = I), y));
1585
+ n("select", I, B, { index: I, indexPath: B, route: X }, K);
1586
+ } else
1587
+ d.value = I, n("select", I, B, { index: I, indexPath: B });
1588
+ }, Y = (x) => {
1589
+ const I = p.value, B = I[x] || d.value && I[d.value] || I[e.defaultActive];
1590
+ B ? d.value = B.index : d.value = x;
1591
+ }, O = (x) => {
1592
+ const I = getComputedStyle(x), B = Number.parseInt(I.marginLeft, 10), X = Number.parseInt(I.marginRight, 10);
1593
+ return x.offsetWidth + B + X || 0;
1594
+ }, j = () => {
1595
+ var x, I;
1596
+ if (!l.value)
1597
+ return -1;
1598
+ const B = Array.from((I = (x = l.value) == null ? void 0 : x.childNodes) != null ? I : []).filter((z) => z.nodeName !== "#comment" && (z.nodeName !== "#text" || z.nodeValue)), X = 64, K = getComputedStyle(l.value), y = Number.parseInt(K.paddingLeft, 10), h = Number.parseInt(K.paddingRight, 10), A = l.value.clientWidth - y - h;
1599
+ let F = 0, q = 0;
1600
+ return B.forEach((z, G) => {
1601
+ F += O(z), F <= A - X && (q = G + 1);
1602
+ }), q === B.length ? -1 : q;
1603
+ }, P = (x) => v.value[x].indexPath, W = (x, I = 33.34) => {
1604
+ let B;
1605
+ return () => {
1606
+ B && clearTimeout(B), B = setTimeout(() => {
1607
+ x();
1608
+ }, I);
1609
+ };
1610
+ };
1611
+ let le = !0;
1612
+ const ce = () => {
1613
+ if (c.value === j())
1614
+ return;
1615
+ const x = () => {
1616
+ c.value = -1, $e(() => {
1617
+ c.value = j();
1618
+ });
1619
+ };
1620
+ le ? x() : W(x)(), le = !1;
1621
+ };
1622
+ ee(() => e.defaultActive, (x) => {
1623
+ p.value[x] || (d.value = ""), Y(x);
1624
+ }), ee(() => e.collapse, (x) => {
1625
+ x && (f.value = []);
1626
+ }), ee(p.value, k);
1627
+ let de;
1628
+ yt(() => {
1629
+ e.mode === "horizontal" && e.ellipsis ? de = Tn(l, ce).stop : de == null || de();
1630
+ });
1631
+ const be = T(!1);
1632
+ {
1633
+ const x = (K) => {
1634
+ v.value[K.index] = K;
1635
+ }, I = (K) => {
1636
+ delete v.value[K.index];
1637
+ };
1638
+ We("rootMenu", rt({
1639
+ props: e,
1640
+ openedMenus: f,
1641
+ items: p,
1642
+ subMenus: v,
1643
+ activeIndex: d,
1644
+ isMenuPopup: g,
1645
+ addMenuItem: (K) => {
1646
+ p.value[K.index] = K;
1647
+ },
1648
+ removeMenuItem: (K) => {
1649
+ delete p.value[K.index];
1650
+ },
1651
+ addSubMenu: x,
1652
+ removeSubMenu: I,
1653
+ openMenu: S,
1654
+ closeMenu: N,
1655
+ handleMenuItemClick: Z,
1656
+ handleSubMenuClick: b
1657
+ })), We(`subMenu:${s.uid}`, {
1658
+ addSubMenu: x,
1659
+ removeSubMenu: I,
1660
+ mouseInChild: be,
1661
+ level: 0
1662
+ });
1663
+ }
1664
+ return pe(() => {
1665
+ e.mode === "horizontal" && new oa(s.vnode.el, u.namespace.value);
1666
+ }), o({
1667
+ open: (I) => {
1668
+ const { indexPath: B } = v.value[I];
1669
+ B.forEach((X) => S(X, B));
1670
+ },
1671
+ close: R,
1672
+ handleResize: ce
1673
+ }), () => {
1674
+ var x, I;
1675
+ let B = (I = (x = t.default) == null ? void 0 : x.call(t)) != null ? I : [];
1676
+ const X = [];
1677
+ if (e.mode === "horizontal" && l.value) {
1678
+ const A = In(B), F = c.value === -1 ? A : A.slice(0, c.value), q = c.value === -1 ? [] : A.slice(c.value);
1679
+ q != null && q.length && e.ellipsis && (B = F, X.push(te($t, {
1680
+ index: "sub-menu-more",
1681
+ class: i.e("hide-arrow"),
1682
+ popperOffset: e.popperOffset
1683
+ }, {
1684
+ title: () => te(we, {
1685
+ class: i.e("icon-more")
1686
+ }, {
1687
+ default: () => te(e.ellipsisIcon)
1688
+ }),
1689
+ default: () => q
1690
+ })));
1691
+ }
1692
+ const K = Qt(e, 0), y = e.closeOnClickOutside ? [
1693
+ [
1694
+ zt,
1695
+ () => {
1696
+ f.value.length && (be.value || (f.value.forEach((A) => n("close", A, P(A))), f.value = []));
1697
+ }
1698
+ ]
1699
+ ] : [], h = Me(te("ul", {
1700
+ key: String(e.collapse),
1701
+ role: "menubar",
1702
+ ref: l,
1703
+ style: K.value,
1704
+ class: {
1705
+ [u.b()]: !0,
1706
+ [u.m(e.mode)]: !0,
1707
+ [u.m("collapse")]: e.collapse
1708
+ }
1709
+ }, [...B, ...X]), y);
1710
+ return e.collapseTransition && e.mode === "vertical" ? te(sa, () => h) : h;
1711
+ };
1712
+ }
1713
+ });
1714
+ const fa = ke({
1715
+ index: {
1716
+ type: Ve([String, null]),
1717
+ default: null
1718
+ },
1719
+ route: {
1720
+ type: Ve([String, Object])
1721
+ },
1722
+ disabled: Boolean
1723
+ }), ma = {
1724
+ click: (e) => ve(e.index) && Array.isArray(e.indexPath)
1725
+ }, ht = "ElMenuItem", pa = D({
1726
+ name: ht,
1727
+ components: {
1728
+ ElTooltip: je
1729
+ },
1730
+ props: fa,
1731
+ emits: ma,
1732
+ setup(e, { emit: n }) {
1733
+ const t = ge(), o = Le("rootMenu"), s = ne("menu"), a = ne("menu-item");
1734
+ o || nt(ht, "can not inject root menu");
1735
+ const { parentMenu: l, indexPath: u } = Jt(t, Un(e, "index")), i = Le(`subMenu:${l.value.uid}`);
1736
+ i || nt(ht, "can not inject sub menu");
1737
+ const c = E(() => e.index === o.activeIndex), f = rt({
1738
+ index: e.index,
1739
+ indexPath: u,
1740
+ active: c
1741
+ }), d = () => {
1742
+ e.disabled || (o.handleMenuItemClick({
1743
+ index: e.index,
1744
+ indexPath: u.value,
1745
+ route: e.route
1746
+ }), n("click", f));
1747
+ };
1748
+ return pe(() => {
1749
+ i.addSubMenu(f), o.addMenuItem(f);
1750
+ }), Xt(() => {
1751
+ i.removeSubMenu(f), o.removeMenuItem(f);
1752
+ }), {
1753
+ parentMenu: l,
1754
+ rootMenu: o,
1755
+ active: c,
1756
+ nsMenu: s,
1757
+ nsMenuItem: a,
1758
+ handleClick: d
1759
+ };
1760
+ }
1761
+ });
1762
+ function ha(e, n, t, o, s, a) {
1763
+ const l = Oe("el-tooltip");
1764
+ return m(), $("li", {
1765
+ class: w([
1766
+ e.nsMenuItem.b(),
1767
+ e.nsMenuItem.is("active", e.active),
1768
+ e.nsMenuItem.is("disabled", e.disabled)
1769
+ ]),
1770
+ role: "menuitem",
1771
+ tabindex: "-1",
1772
+ onClick: n[0] || (n[0] = (...u) => e.handleClick && e.handleClick(...u))
1773
+ }, [
1774
+ e.parentMenu.type.name === "ElMenu" && e.rootMenu.props.collapse && e.$slots.title ? (m(), L(l, {
1775
+ key: 0,
1776
+ effect: e.rootMenu.props.popperEffect,
1777
+ placement: "right",
1778
+ "fallback-placements": ["left"],
1779
+ persistent: ""
1780
+ }, {
1781
+ content: M(() => [
1782
+ ae(e.$slots, "title")
1783
+ ]),
1784
+ default: M(() => [
1785
+ C("div", {
1786
+ class: w(e.nsMenu.be("tooltip", "trigger"))
1787
+ }, [
1788
+ ae(e.$slots, "default")
1789
+ ], 2)
1790
+ ]),
1791
+ _: 3
1792
+ }, 8, ["effect"])) : (m(), $(oe, { key: 1 }, [
1793
+ ae(e.$slots, "default"),
1794
+ ae(e.$slots, "title")
1795
+ ], 64))
1796
+ ], 2);
1797
+ }
1798
+ var en = /* @__PURE__ */ ue(pa, [["render", ha], ["__file", "menu-item.vue"]]);
1799
+ const va = {
1800
+ title: String
1801
+ }, _a = "ElMenuItemGroup", ga = D({
1802
+ name: _a,
1803
+ props: va,
1804
+ setup() {
1805
+ return {
1806
+ ns: ne("menu-item-group")
1807
+ };
1808
+ }
1809
+ });
1810
+ function ba(e, n, t, o, s, a) {
1811
+ return m(), $("li", {
1812
+ class: w(e.ns.b())
1813
+ }, [
1814
+ C("div", {
1815
+ class: w(e.ns.e("title"))
1816
+ }, [
1817
+ e.$slots.title ? ae(e.$slots, "title", { key: 1 }) : (m(), $(oe, { key: 0 }, [
1818
+ Q(U(e.title), 1)
1819
+ ], 64))
1820
+ ], 2),
1821
+ C("ul", null, [
1822
+ ae(e.$slots, "default")
1823
+ ])
1824
+ ], 2);
1825
+ }
1826
+ var tn = /* @__PURE__ */ ue(ga, [["render", ba], ["__file", "menu-item-group.vue"]]);
1827
+ const nn = at(da, {
1828
+ MenuItem: en,
1829
+ MenuItemGroup: tn,
1830
+ SubMenu: $t
1831
+ }), on = lt(en);
1832
+ lt(tn);
1833
+ const ya = lt($t), ka = /* @__PURE__ */ D({
1834
+ __name: "index",
1835
+ setup(e) {
1836
+ const n = _e(), t = T([
1837
+ { label: "默认", value: "default" },
1838
+ { label: "大型", value: "large" },
1839
+ { label: "小型", value: "small" }
1840
+ ]);
1841
+ function o(s) {
1842
+ n.changeSize(s), Ln.success("切换布局大小成功");
1843
+ }
1844
+ return (s, a) => {
1845
+ const l = Ne, u = qt, i = Kt, c = Ut;
1846
+ return m(), L(c, {
1847
+ trigger: "click",
1848
+ onCommand: o
1849
+ }, {
1850
+ dropdown: M(() => [
1851
+ _(i, null, {
1852
+ default: M(() => [
1853
+ (m(!0), $(oe, null, xe(r(t), (f) => (m(), L(u, {
1854
+ key: f.value,
1855
+ disabled: r(n).size == f.value,
1856
+ command: f.value
1857
+ }, {
1858
+ default: M(() => [
1859
+ Q(U(f.label), 1)
1860
+ ]),
1861
+ _: 2
1862
+ }, 1032, ["disabled", "command"]))), 128))
1863
+ ]),
1864
+ _: 1
1865
+ })
1866
+ ]),
1867
+ default: M(() => [
1868
+ C("div", null, [
1869
+ _(l, { "icon-class": "size" })
1870
+ ])
1871
+ ]),
1872
+ _: 1
1873
+ });
1874
+ };
1875
+ }
1876
+ }), Ca = { class: "flex" }, $a = { class: "flex-center h100% p10px" }, Ma = ["src"], wa = /* @__PURE__ */ D({
1877
+ __name: "NavbarRight",
1878
+ setup(e) {
1879
+ const n = _e(), t = gt(), o = Nn(), s = Se(), a = Ge(), l = kt(), u = E(() => n.device === et.MOBILE), i = T(!1), c = T(!1), { isFullscreen: f, toggle: d } = On();
1880
+ function p() {
1881
+ c.value = !0;
1882
+ }
1883
+ function v() {
1884
+ Bn.confirm("确定注销并退出系统吗?", "提示", {
1885
+ confirmButtonText: "确定",
1886
+ cancelButtonText: "取消",
1887
+ type: "warning",
1888
+ lockScroll: !1
1889
+ }).then(() => {
1890
+ o.logout().then(() => {
1891
+ t.delAllViews();
1892
+ }).then(() => {
1893
+ l.push(`/login?redirect=${a.fullPath}`);
1894
+ });
1895
+ });
1896
+ }
1897
+ function g(k) {
1898
+ i.value = k;
1899
+ }
1900
+ return (k, S) => {
1901
+ const R = Ne, N = ka, b = je, Z = Wn, Y = qt, O = Oe("router-link"), j = Kt, P = Ut;
1902
+ return m(), $("div", Ca, [
1903
+ r(u) ? H("", !0) : (m(), $(oe, { key: 0 }, [
1904
+ C("div", {
1905
+ class: "setting-item",
1906
+ onClick: S[0] || (S[0] = //@ts-ignore
1907
+ (...W) => r(d) && r(d)(...W))
1908
+ }, [
1909
+ _(R, {
1910
+ "icon-class": r(f) ? "fullscreen-exit" : "fullscreen"
1911
+ }, null, 8, ["icon-class"])
1912
+ ]),
1913
+ _(b, {
1914
+ content: k.$t("sizeSelect.tooltip"),
1915
+ effect: "dark",
1916
+ placement: "bottom"
1917
+ }, {
1918
+ default: M(() => [
1919
+ _(N, { class: "setting-item" })
1920
+ ]),
1921
+ _: 1
1922
+ }, 8, ["content"]),
1923
+ _(Z, { class: "setting-item" })
1924
+ ], 64)),
1925
+ _(P, {
1926
+ class: "setting-item",
1927
+ trigger: "click"
1928
+ }, {
1929
+ dropdown: M(() => [
1930
+ _(j, null, {
1931
+ default: M(() => [
1932
+ _(O, { to: "/" }, {
1933
+ default: M(() => [
1934
+ _(Y, null, {
1935
+ default: M(() => [
1936
+ Q(U(k.$t("navbar.dashboard")), 1)
1937
+ ]),
1938
+ _: 1
1939
+ })
1940
+ ]),
1941
+ _: 1
1942
+ }),
1943
+ _(Y, null, {
1944
+ default: M(() => [
1945
+ _(O, { to: "/my/profile" }, {
1946
+ default: M(() => [
1947
+ Q(U(k.$t("navbar.profile")), 1)
1948
+ ]),
1949
+ _: 1
1950
+ })
1951
+ ]),
1952
+ _: 1
1953
+ }),
1954
+ _(Y, {
1955
+ onClick: S[1] || (S[1] = (W) => i.value = !0)
1956
+ }, {
1957
+ default: M(() => [
1958
+ Q(U(k.$t("navbar.changePwd")), 1)
1959
+ ]),
1960
+ _: 1
1961
+ }),
1962
+ _(Y, { onClick: p }, {
1963
+ default: M(() => [
1964
+ Q(U(k.$t("navbar.runAs")), 1)
1965
+ ]),
1966
+ _: 1
1967
+ }),
1968
+ _(Y, {
1969
+ divided: "",
1970
+ onClick: v
1971
+ }, {
1972
+ default: M(() => [
1973
+ Q(U(k.$t("navbar.logout")), 1)
1974
+ ]),
1975
+ _: 1
1976
+ })
1977
+ ]),
1978
+ _: 1
1979
+ })
1980
+ ]),
1981
+ default: M(() => [
1982
+ C("div", $a, [
1983
+ C("img", {
1984
+ src: r(o).user.avatar,
1985
+ class: "rounded-full mr-10px w24px w24px"
1986
+ }, null, 8, Ma),
1987
+ C("span", null, U(r(o).user.nickName), 1)
1988
+ ])
1989
+ ]),
1990
+ _: 1
1991
+ }),
1992
+ r(ze).showSettings ? (m(), $("div", {
1993
+ key: 1,
1994
+ class: "setting-item",
1995
+ onClick: S[2] || (S[2] = (W) => r(s).settingsVisible = !0)
1996
+ }, [
1997
+ _(R, { "icon-class": "setting" })
1998
+ ])) : H("", !0),
1999
+ r(i) ? (m(), L(eo, {
2000
+ key: 2,
2001
+ "pwd-visible": r(i),
2002
+ onDialogActionChange: g
2003
+ }, null, 8, ["pwd-visible"])) : H("", !0),
2004
+ r(c) ? (m(), L(to, {
2005
+ key: 3,
2006
+ modelValue: r(c),
2007
+ "onUpdate:modelValue": S[3] || (S[3] = (W) => ot(c) ? c.value = W : null)
2008
+ }, null, 8, ["modelValue"])) : H("", !0)
2009
+ ]);
2010
+ };
2011
+ }
2012
+ }), an = /* @__PURE__ */ ie(wa, [["__scopeId", "data-v-33a2d98b"]]);
2013
+ function Sa(e) {
2014
+ for (var n = [], t = 0; t < e.length; ) {
2015
+ var o = e[t];
2016
+ if (o === "*" || o === "+" || o === "?") {
2017
+ n.push({ type: "MODIFIER", index: t, value: e[t++] });
2018
+ continue;
2019
+ }
2020
+ if (o === "\\") {
2021
+ n.push({ type: "ESCAPED_CHAR", index: t++, value: e[t++] });
2022
+ continue;
2023
+ }
2024
+ if (o === "{") {
2025
+ n.push({ type: "OPEN", index: t, value: e[t++] });
2026
+ continue;
2027
+ }
2028
+ if (o === "}") {
2029
+ n.push({ type: "CLOSE", index: t, value: e[t++] });
2030
+ continue;
2031
+ }
2032
+ if (o === ":") {
2033
+ for (var s = "", a = t + 1; a < e.length; ) {
2034
+ var l = e.charCodeAt(a);
2035
+ if (
2036
+ // `0-9`
2037
+ l >= 48 && l <= 57 || // `A-Z`
2038
+ l >= 65 && l <= 90 || // `a-z`
2039
+ l >= 97 && l <= 122 || // `_`
2040
+ l === 95
2041
+ ) {
2042
+ s += e[a++];
2043
+ continue;
2044
+ }
2045
+ break;
2046
+ }
2047
+ if (!s)
2048
+ throw new TypeError("Missing parameter name at ".concat(t));
2049
+ n.push({ type: "NAME", index: t, value: s }), t = a;
2050
+ continue;
2051
+ }
2052
+ if (o === "(") {
2053
+ var u = 1, i = "", a = t + 1;
2054
+ if (e[a] === "?")
2055
+ throw new TypeError('Pattern cannot start with "?" at '.concat(a));
2056
+ for (; a < e.length; ) {
2057
+ if (e[a] === "\\") {
2058
+ i += e[a++] + e[a++];
2059
+ continue;
2060
+ }
2061
+ if (e[a] === ")") {
2062
+ if (u--, u === 0) {
2063
+ a++;
2064
+ break;
2065
+ }
2066
+ } else if (e[a] === "(" && (u++, e[a + 1] !== "?"))
2067
+ throw new TypeError("Capturing groups are not allowed at ".concat(a));
2068
+ i += e[a++];
2069
+ }
2070
+ if (u)
2071
+ throw new TypeError("Unbalanced pattern at ".concat(t));
2072
+ if (!i)
2073
+ throw new TypeError("Missing pattern at ".concat(t));
2074
+ n.push({ type: "PATTERN", index: t, value: i }), t = a;
2075
+ continue;
2076
+ }
2077
+ n.push({ type: "CHAR", index: t, value: e[t++] });
2078
+ }
2079
+ return n.push({ type: "END", index: t, value: "" }), n;
2080
+ }
2081
+ function xa(e, n) {
2082
+ n === void 0 && (n = {});
2083
+ for (var t = Sa(e), o = n.prefixes, s = o === void 0 ? "./" : o, a = "[^".concat(Ia(n.delimiter || "/#?"), "]+?"), l = [], u = 0, i = 0, c = "", f = function(O) {
2084
+ if (i < t.length && t[i].type === O)
2085
+ return t[i++].value;
2086
+ }, d = function(O) {
2087
+ var j = f(O);
2088
+ if (j !== void 0)
2089
+ return j;
2090
+ var P = t[i], W = P.type, le = P.index;
2091
+ throw new TypeError("Unexpected ".concat(W, " at ").concat(le, ", expected ").concat(O));
2092
+ }, p = function() {
2093
+ for (var O = "", j; j = f("CHAR") || f("ESCAPED_CHAR"); )
2094
+ O += j;
2095
+ return O;
2096
+ }; i < t.length; ) {
2097
+ var v = f("CHAR"), g = f("NAME"), k = f("PATTERN");
2098
+ if (g || k) {
2099
+ var S = v || "";
2100
+ s.indexOf(S) === -1 && (c += S, S = ""), c && (l.push(c), c = ""), l.push({
2101
+ name: g || u++,
2102
+ prefix: S,
2103
+ suffix: "",
2104
+ pattern: k || a,
2105
+ modifier: f("MODIFIER") || ""
2106
+ });
2107
+ continue;
2108
+ }
2109
+ var R = v || f("ESCAPED_CHAR");
2110
+ if (R) {
2111
+ c += R;
2112
+ continue;
2113
+ }
2114
+ c && (l.push(c), c = "");
2115
+ var N = f("OPEN");
2116
+ if (N) {
2117
+ var S = p(), b = f("NAME") || "", Z = f("PATTERN") || "", Y = p();
2118
+ d("CLOSE"), l.push({
2119
+ name: b || (Z ? u++ : ""),
2120
+ pattern: b && !Z ? a : Z,
2121
+ prefix: S,
2122
+ suffix: Y,
2123
+ modifier: f("MODIFIER") || ""
2124
+ });
2125
+ continue;
2126
+ }
2127
+ d("END");
2128
+ }
2129
+ return l;
2130
+ }
2131
+ function Ea(e, n) {
2132
+ return Ta(xa(e, n), n);
2133
+ }
2134
+ function Ta(e, n) {
2135
+ n === void 0 && (n = {});
2136
+ var t = Aa(n), o = n.encode, s = o === void 0 ? function(i) {
2137
+ return i;
2138
+ } : o, a = n.validate, l = a === void 0 ? !0 : a, u = e.map(function(i) {
2139
+ if (typeof i == "object")
2140
+ return new RegExp("^(?:".concat(i.pattern, ")$"), t);
2141
+ });
2142
+ return function(i) {
2143
+ for (var c = "", f = 0; f < e.length; f++) {
2144
+ var d = e[f];
2145
+ if (typeof d == "string") {
2146
+ c += d;
2147
+ continue;
2148
+ }
2149
+ var p = i ? i[d.name] : void 0, v = d.modifier === "?" || d.modifier === "*", g = d.modifier === "*" || d.modifier === "+";
2150
+ if (Array.isArray(p)) {
2151
+ if (!g)
2152
+ throw new TypeError('Expected "'.concat(d.name, '" to not repeat, but got an array'));
2153
+ if (p.length === 0) {
2154
+ if (v)
2155
+ continue;
2156
+ throw new TypeError('Expected "'.concat(d.name, '" to not be empty'));
2157
+ }
2158
+ for (var k = 0; k < p.length; k++) {
2159
+ var S = s(p[k], d);
2160
+ if (l && !u[f].test(S))
2161
+ throw new TypeError('Expected all "'.concat(d.name, '" to match "').concat(d.pattern, '", but got "').concat(S, '"'));
2162
+ c += d.prefix + S + d.suffix;
2163
+ }
2164
+ continue;
2165
+ }
2166
+ if (typeof p == "string" || typeof p == "number") {
2167
+ var S = s(String(p), d);
2168
+ if (l && !u[f].test(S))
2169
+ throw new TypeError('Expected "'.concat(d.name, '" to match "').concat(d.pattern, '", but got "').concat(S, '"'));
2170
+ c += d.prefix + S + d.suffix;
2171
+ continue;
2172
+ }
2173
+ if (!v) {
2174
+ var R = g ? "an array" : "a string";
2175
+ throw new TypeError('Expected "'.concat(d.name, '" to be ').concat(R));
2176
+ }
2177
+ }
2178
+ return c;
2179
+ };
2180
+ }
2181
+ function Ia(e) {
2182
+ return e.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
2183
+ }
2184
+ function Aa(e) {
2185
+ return e && e.sensitive ? "" : "i";
2186
+ }
2187
+ function Ue(e) {
2188
+ return At.global.te("route." + e) ? At.global.t("route." + e) : e;
2189
+ }
2190
+ const Pa = {
2191
+ key: 0,
2192
+ class: "color-gray-400"
2193
+ }, Va = ["onClick"], La = /* @__PURE__ */ D({
2194
+ __name: "index",
2195
+ setup(e) {
2196
+ const n = Ge(), t = (u) => {
2197
+ const { params: i } = n;
2198
+ return Ea(u)(i);
2199
+ }, o = T([]);
2200
+ function s() {
2201
+ let u = n.matched.filter(
2202
+ (c) => c.meta && c.meta.title
2203
+ );
2204
+ const i = u[0];
2205
+ a(i) || (u = [
2206
+ { path: "/dashboard", meta: { title: "dashboard" } }
2207
+ ].concat(u)), o.value = u.filter((c) => c.meta && c.meta.title && c.meta.breadcrumb !== !1);
2208
+ }
2209
+ function a(u) {
2210
+ const i = u && u.name;
2211
+ return i ? i.toString().trim().toLocaleLowerCase() === "Dashboard".toLocaleLowerCase() : !1;
2212
+ }
2213
+ function l(u) {
2214
+ const { redirect: i, path: c } = u;
2215
+ if (i) {
2216
+ Pt.push(i).catch((f) => {
2217
+ console.warn(f);
2218
+ });
2219
+ return;
2220
+ }
2221
+ Pt.push(t(c)).catch((f) => {
2222
+ console.warn(f);
2223
+ });
2224
+ }
2225
+ return ee(
2226
+ () => n.path,
2227
+ (u) => {
2228
+ u.startsWith("/redirect/") || s();
2229
+ }
2230
+ ), jn(() => {
2231
+ s();
2232
+ }), (u, i) => {
2233
+ const c = po, f = mo;
2234
+ return m(), L(f, { class: "flex-y-center" }, {
2235
+ default: M(() => [
2236
+ _(Xn, { "enter-active-class": "animate__animated animate__fadeInRight" }, {
2237
+ default: M(() => [
2238
+ (m(!0), $(oe, null, xe(r(o), (d, p) => (m(), L(c, {
2239
+ key: d.path
2240
+ }, {
2241
+ default: M(() => [
2242
+ d.redirect === "noredirect" || p === r(o).length - 1 ? (m(), $("span", Pa, U(r(Ue)(d.meta.title)), 1)) : (m(), $("a", {
2243
+ key: 1,
2244
+ onClick: Te((v) => l(d), ["prevent"])
2245
+ }, U(r(Ue)(d.meta.title)), 9, Va))
2246
+ ]),
2247
+ _: 2
2248
+ }, 1024))), 128))
2249
+ ]),
2250
+ _: 1
2251
+ })
2252
+ ]),
2253
+ _: 1
2254
+ });
2255
+ };
2256
+ }
2257
+ }), Na = /* @__PURE__ */ ie(La, [["__scopeId", "data-v-07060d8f"]]), Oa = /* @__PURE__ */ D({
2258
+ __name: "index",
2259
+ props: {
2260
+ isActive: {
2261
+ required: !0,
2262
+ type: Boolean,
2263
+ default: !1
2264
+ }
2265
+ },
2266
+ emits: ["toggleClick"],
2267
+ setup(e, { emit: n }) {
2268
+ const t = n;
2269
+ function o() {
2270
+ t("toggleClick");
2271
+ }
2272
+ return (s, a) => {
2273
+ const l = Ne;
2274
+ return m(), $("div", {
2275
+ class: "px-[15px] flex items-center justify-center color-[var(--el-text-color-regular)]",
2276
+ onClick: o
2277
+ }, [
2278
+ _(l, {
2279
+ class: w(["hamburger", { "is-active": e.isActive }]),
2280
+ "icon-class": "indent-decrease"
2281
+ }, null, 8, ["class"])
2282
+ ]);
2283
+ };
2284
+ }
2285
+ }), ln = /* @__PURE__ */ ie(Oa, [["__scopeId", "data-v-42e37629"]]), Ba = { class: "flex" }, Ra = /* @__PURE__ */ D({
2286
+ __name: "NavbarLeft",
2287
+ setup(e) {
2288
+ const n = _e();
2289
+ function t() {
2290
+ n.toggleSidebar();
2291
+ }
2292
+ return (o, s) => {
2293
+ const a = ln, l = Na;
2294
+ return m(), $("div", Ba, [
2295
+ _(a, {
2296
+ "is-active": r(n).sidebar.opened,
2297
+ onToggleClick: t
2298
+ }, null, 8, ["is-active"]),
2299
+ _(l)
2300
+ ]);
2301
+ };
2302
+ }
2303
+ }), Fa = {}, Da = { class: "navbar-container" };
2304
+ function za(e, n) {
2305
+ const t = Ra, o = an;
2306
+ return m(), $("div", Da, [
2307
+ _(t),
2308
+ _(o)
2309
+ ]);
2310
+ }
2311
+ const Ha = /* @__PURE__ */ ie(Fa, [["render", za], ["__scopeId", "data-v-b1624593"]]);
2312
+ var he = /* @__PURE__ */ ((e) => (e.LEFT = "left", e.TOP = "top", e.MIX = "mix", e))(he || {});
2313
+ const Be = (e) => (Gn("data-v-2bdf1403"), e = e(), Yn(), e), Wa = { class: "flex flex-wrap justify-around w-full h-12" }, qa = /* @__PURE__ */ Be(() => /* @__PURE__ */ C("div", null, null, -1)), Ka = /* @__PURE__ */ Be(() => /* @__PURE__ */ C("div", null, null, -1)), Ua = [
2314
+ qa,
2315
+ Ka
2316
+ ], ja = /* @__PURE__ */ Be(() => /* @__PURE__ */ C("div", null, null, -1)), Xa = /* @__PURE__ */ Be(() => /* @__PURE__ */ C("div", null, null, -1)), Ga = [
2317
+ ja,
2318
+ Xa
2319
+ ], Ya = /* @__PURE__ */ Be(() => /* @__PURE__ */ C("div", null, null, -1)), Za = /* @__PURE__ */ Be(() => /* @__PURE__ */ C("div", null, null, -1)), Ja = [
2320
+ Ya,
2321
+ Za
2322
+ ], Qa = /* @__PURE__ */ D({
2323
+ __name: "LayoutSelect",
2324
+ props: {
2325
+ modelValue: String
2326
+ },
2327
+ emits: ["update:modelValue"],
2328
+ setup(e, { emit: n }) {
2329
+ const t = n;
2330
+ function o(s) {
2331
+ t("update:modelValue", s);
2332
+ }
2333
+ return (s, a) => {
2334
+ const l = je;
2335
+ return m(), $("div", Wa, [
2336
+ _(l, {
2337
+ content: "左侧模式",
2338
+ placement: "bottom"
2339
+ }, {
2340
+ default: M(() => [
2341
+ C("div", {
2342
+ class: w(["layout-item left", { "is-active": e.modelValue === r(he).LEFT }]),
2343
+ onClick: a[0] || (a[0] = (u) => o(r(he).LEFT))
2344
+ }, Ua, 2)
2345
+ ]),
2346
+ _: 1
2347
+ }),
2348
+ _(l, {
2349
+ content: "顶部模式",
2350
+ placement: "bottom"
2351
+ }, {
2352
+ default: M(() => [
2353
+ C("div", {
2354
+ class: w(["layout-item top", { "is-active": e.modelValue === r(he).TOP }]),
2355
+ onClick: a[1] || (a[1] = (u) => o(r(he).TOP))
2356
+ }, Ga, 2)
2357
+ ]),
2358
+ _: 1
2359
+ }),
2360
+ _(l, {
2361
+ content: "混合模式",
2362
+ placement: "bottom"
2363
+ }, {
2364
+ default: M(() => [
2365
+ C("div", {
2366
+ class: w(["layout-item mix", { "is-active": e.modelValue === r(he).MIX }]),
2367
+ onClick: a[2] || (a[2] = (u) => o(r(he).MIX))
2368
+ }, Ja, 2)
2369
+ ]),
2370
+ _: 1
2371
+ })
2372
+ ]);
2373
+ };
2374
+ }
2375
+ }), el = /* @__PURE__ */ ie(Qa, [["__scopeId", "data-v-2bdf1403"]]), tl = /* @__PURE__ */ D({
2376
+ __name: "ThemeColorPicker",
2377
+ props: {
2378
+ modelValue: String
2379
+ },
2380
+ emits: ["update:modelValue"],
2381
+ setup(e, { emit: n }) {
2382
+ const t = e, o = n, s = [
2383
+ "#409EFF",
2384
+ "#ff4500",
2385
+ "#ff8c00",
2386
+ "#90ee90",
2387
+ "#00ced1",
2388
+ "#1e90ff",
2389
+ "#c71585",
2390
+ "rgba(255, 69, 0, 0.68)",
2391
+ "rgb(255, 120, 0)",
2392
+ "hsva(120, 40, 94)"
2393
+ ], a = T(t.modelValue);
2394
+ return ee(a, (l) => {
2395
+ o("update:modelValue", l);
2396
+ }), (l, u) => {
2397
+ const i = qo;
2398
+ return m(), L(i, {
2399
+ modelValue: r(a),
2400
+ "onUpdate:modelValue": u[0] || (u[0] = (c) => ot(a) ? a.value = c : null),
2401
+ predefine: s,
2402
+ "popper-class": "theme-picker-dropdown"
2403
+ }, null, 8, ["modelValue"]);
2404
+ };
2405
+ }
2406
+ }), nl = /* @__PURE__ */ ie(tl, [["__scopeId", "data-v-92c1fd79"]]), ol = { class: "flex-center" }, al = { class: "settings-option" }, ll = { class: "text-xs" }, sl = { class: "settings-option" }, rl = { class: "text-xs" }, il = { class: "settings-option" }, ul = { class: "text-xs" }, cl = { class: "settings-option" }, dl = { class: "text-xs" }, fl = { class: "settings-option" }, ml = { class: "text-xs" }, pl = /* @__PURE__ */ D({
2407
+ __name: "index",
2408
+ setup(e) {
2409
+ const n = Ge(), t = _e(), o = Se(), s = Xe(), a = E({
2410
+ get() {
2411
+ return o.settingsVisible;
2412
+ },
2413
+ set() {
2414
+ o.settingsVisible = !1;
2415
+ }
2416
+ });
2417
+ function l(p) {
2418
+ o.changeThemeColor(p);
2419
+ }
2420
+ const u = T(o.theme === ct.DARK), i = (p) => {
2421
+ u.value = p, o.changeTheme(u.value ? ct.DARK : ct.LIGHT);
2422
+ };
2423
+ function c(p) {
2424
+ o.changeLayout(p), p === he.MIX ? n.name && f(n.name) : p === he.TOP && t.openSideBar();
2425
+ }
2426
+ function f(p) {
2427
+ const v = d(s.routes, p);
2428
+ t.activeTopMenu !== v.path && t.activeTopMenu(v.path);
2429
+ }
2430
+ function d(p, v) {
2431
+ let g = {};
2432
+ function k(R, N) {
2433
+ if (g[R.name] = N, R.children)
2434
+ for (let b = 0; b < R.children.length; b++)
2435
+ k(R.children[b], R);
2436
+ }
2437
+ for (let R = 0; R < p.length; R++)
2438
+ k(p[R], null);
2439
+ let S = g[v];
2440
+ for (; S; ) {
2441
+ if (!g[S.name])
2442
+ return S;
2443
+ S = g[S.name];
2444
+ }
2445
+ return null;
2446
+ }
2447
+ return (p, v) => {
2448
+ const g = no, k = Dn, S = nl, R = el, N = ea;
2449
+ return m(), L(N, {
2450
+ modelValue: r(a),
2451
+ "onUpdate:modelValue": v[7] || (v[7] = (b) => ot(a) ? a.value = b : null),
2452
+ size: "300",
2453
+ title: p.$t("settings.project")
2454
+ }, {
2455
+ default: M(() => [
2456
+ _(g, null, {
2457
+ default: M(() => [
2458
+ Q(U(p.$t("settings.theme")), 1)
2459
+ ]),
2460
+ _: 1
2461
+ }),
2462
+ C("div", ol, [
2463
+ _(k, {
2464
+ modelValue: r(u),
2465
+ "onUpdate:modelValue": v[0] || (v[0] = (b) => ot(u) ? u.value = b : null),
2466
+ "active-icon": r(Rn),
2467
+ "inactive-icon": r(Fn),
2468
+ onChange: i
2469
+ }, null, 8, ["modelValue", "active-icon", "inactive-icon"])
2470
+ ]),
2471
+ _(g, null, {
2472
+ default: M(() => [
2473
+ Q(U(p.$t("settings.interface")), 1)
2474
+ ]),
2475
+ _: 1
2476
+ }),
2477
+ C("div", al, [
2478
+ C("span", ll, U(p.$t("settings.themeColor")), 1),
2479
+ _(S, {
2480
+ modelValue: r(o).themeColor,
2481
+ "onUpdate:modelValue": [
2482
+ v[1] || (v[1] = (b) => r(o).themeColor = b),
2483
+ l
2484
+ ]
2485
+ }, null, 8, ["modelValue"])
2486
+ ]),
2487
+ C("div", sl, [
2488
+ C("span", rl, U(p.$t("settings.tagsView")), 1),
2489
+ _(k, {
2490
+ modelValue: r(o).tagsView,
2491
+ "onUpdate:modelValue": v[2] || (v[2] = (b) => r(o).tagsView = b)
2492
+ }, null, 8, ["modelValue"])
2493
+ ]),
2494
+ C("div", il, [
2495
+ C("span", ul, U(p.$t("settings.fixedHeader")), 1),
2496
+ _(k, {
2497
+ modelValue: r(o).fixedHeader,
2498
+ "onUpdate:modelValue": v[3] || (v[3] = (b) => r(o).fixedHeader = b)
2499
+ }, null, 8, ["modelValue"])
2500
+ ]),
2501
+ C("div", cl, [
2502
+ C("span", dl, U(p.$t("settings.sidebarLogo")), 1),
2503
+ _(k, {
2504
+ modelValue: r(o).sidebarLogo,
2505
+ "onUpdate:modelValue": v[4] || (v[4] = (b) => r(o).sidebarLogo = b)
2506
+ }, null, 8, ["modelValue"])
2507
+ ]),
2508
+ C("div", fl, [
2509
+ C("span", ml, U(p.$t("settings.watermark")), 1),
2510
+ _(k, {
2511
+ modelValue: r(o).watermarkEnabled,
2512
+ "onUpdate:modelValue": v[5] || (v[5] = (b) => r(o).watermarkEnabled = b)
2513
+ }, null, 8, ["modelValue"])
2514
+ ]),
2515
+ _(g, null, {
2516
+ default: M(() => [
2517
+ Q(U(p.$t("settings.navigation")), 1)
2518
+ ]),
2519
+ _: 1
2520
+ }),
2521
+ _(R, {
2522
+ modelValue: r(o).layout,
2523
+ "onUpdate:modelValue": [
2524
+ v[6] || (v[6] = (b) => r(o).layout = b),
2525
+ c
2526
+ ]
2527
+ }, null, 8, ["modelValue"])
2528
+ ]),
2529
+ _: 1
2530
+ }, 8, ["modelValue", "title"]);
2531
+ };
2532
+ }
2533
+ }), hl = /* @__PURE__ */ ie(pl, [["__scopeId", "data-v-70f5bf10"]]), vl = { class: "app-main" }, _l = /* @__PURE__ */ D({
2534
+ __name: "index",
2535
+ setup(e) {
2536
+ const n = E(() => gt().cachedViews);
2537
+ return (t, o) => {
2538
+ const s = Oe("router-view");
2539
+ return m(), $("section", vl, [
2540
+ _(s, null, {
2541
+ default: M(({ Component: a, route: l }) => [
2542
+ _(it, {
2543
+ "enter-active-class": "animate__animated animate__fadeIn",
2544
+ mode: "out-in"
2545
+ }, {
2546
+ default: M(() => [
2547
+ (m(), L(Zn, { include: r(n) }, [
2548
+ (m(), L(st(a), {
2549
+ key: l.path
2550
+ }))
2551
+ ], 1032, ["include"]))
2552
+ ]),
2553
+ _: 2
2554
+ }, 1024)
2555
+ ]),
2556
+ _: 1
2557
+ })
2558
+ ]);
2559
+ };
2560
+ }
2561
+ }), gl = /* @__PURE__ */ ie(_l, [["__scopeId", "data-v-37d096bd"]]), bl = {
2562
+ viewBox: "0 0 1024 1024",
2563
+ width: "1.2em",
2564
+ height: "1.2em"
2565
+ }, yl = /* @__PURE__ */ C("path", {
2566
+ fill: "currentColor",
2567
+ d: "M764.288 214.592L512 466.88L259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512L214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
2568
+ }, null, -1), kl = [
2569
+ yl
2570
+ ];
2571
+ function Cl(e, n) {
2572
+ return m(), $("svg", bl, [...kl]);
2573
+ }
2574
+ const $l = { name: "ep-close", render: Cl };
2575
+ function me(e) {
2576
+ if (typeof e != "string")
2577
+ throw new TypeError("Path must be a string. Received " + JSON.stringify(e));
2578
+ }
2579
+ function Ft(e, n) {
2580
+ for (var t = "", o = 0, s = -1, a = 0, l, u = 0; u <= e.length; ++u) {
2581
+ if (u < e.length)
2582
+ l = e.charCodeAt(u);
2583
+ else {
2584
+ if (l === 47)
2585
+ break;
2586
+ l = 47;
2587
+ }
2588
+ if (l === 47) {
2589
+ if (!(s === u - 1 || a === 1))
2590
+ if (s !== u - 1 && a === 2) {
2591
+ if (t.length < 2 || o !== 2 || t.charCodeAt(t.length - 1) !== 46 || t.charCodeAt(t.length - 2) !== 46) {
2592
+ if (t.length > 2) {
2593
+ var i = t.lastIndexOf("/");
2594
+ if (i !== t.length - 1) {
2595
+ i === -1 ? (t = "", o = 0) : (t = t.slice(0, i), o = t.length - 1 - t.lastIndexOf("/")), s = u, a = 0;
2596
+ continue;
2597
+ }
2598
+ } else if (t.length === 2 || t.length === 1) {
2599
+ t = "", o = 0, s = u, a = 0;
2600
+ continue;
2601
+ }
2602
+ }
2603
+ n && (t.length > 0 ? t += "/.." : t = "..", o = 2);
2604
+ } else
2605
+ t.length > 0 ? t += "/" + e.slice(s + 1, u) : t = e.slice(s + 1, u), o = u - s - 1;
2606
+ s = u, a = 0;
2607
+ } else
2608
+ l === 46 && a !== -1 ? ++a : a = -1;
2609
+ }
2610
+ return t;
2611
+ }
2612
+ function Ml(e, n) {
2613
+ var t = n.dir || n.root, o = n.base || (n.name || "") + (n.ext || "");
2614
+ return t ? t === n.root ? t + o : t + e + o : o;
2615
+ }
2616
+ var Ae = {
2617
+ // path.resolve([from ...], to)
2618
+ resolve: function() {
2619
+ for (var n = "", t = !1, o, s = arguments.length - 1; s >= -1 && !t; s--) {
2620
+ var a;
2621
+ s >= 0 ? a = arguments[s] : (o === void 0 && (o = process.cwd()), a = o), me(a), a.length !== 0 && (n = a + "/" + n, t = a.charCodeAt(0) === 47);
2622
+ }
2623
+ return n = Ft(n, !t), t ? n.length > 0 ? "/" + n : "/" : n.length > 0 ? n : ".";
2624
+ },
2625
+ normalize: function(n) {
2626
+ if (me(n), n.length === 0)
2627
+ return ".";
2628
+ var t = n.charCodeAt(0) === 47, o = n.charCodeAt(n.length - 1) === 47;
2629
+ return n = Ft(n, !t), n.length === 0 && !t && (n = "."), n.length > 0 && o && (n += "/"), t ? "/" + n : n;
2630
+ },
2631
+ isAbsolute: function(n) {
2632
+ return me(n), n.length > 0 && n.charCodeAt(0) === 47;
2633
+ },
2634
+ join: function() {
2635
+ if (arguments.length === 0)
2636
+ return ".";
2637
+ for (var n, t = 0; t < arguments.length; ++t) {
2638
+ var o = arguments[t];
2639
+ me(o), o.length > 0 && (n === void 0 ? n = o : n += "/" + o);
2640
+ }
2641
+ return n === void 0 ? "." : Ae.normalize(n);
2642
+ },
2643
+ relative: function(n, t) {
2644
+ if (me(n), me(t), n === t || (n = Ae.resolve(n), t = Ae.resolve(t), n === t))
2645
+ return "";
2646
+ for (var o = 1; o < n.length && n.charCodeAt(o) === 47; ++o)
2647
+ ;
2648
+ for (var s = n.length, a = s - o, l = 1; l < t.length && t.charCodeAt(l) === 47; ++l)
2649
+ ;
2650
+ for (var u = t.length, i = u - l, c = a < i ? a : i, f = -1, d = 0; d <= c; ++d) {
2651
+ if (d === c) {
2652
+ if (i > c) {
2653
+ if (t.charCodeAt(l + d) === 47)
2654
+ return t.slice(l + d + 1);
2655
+ if (d === 0)
2656
+ return t.slice(l + d);
2657
+ } else
2658
+ a > c && (n.charCodeAt(o + d) === 47 ? f = d : d === 0 && (f = 0));
2659
+ break;
2660
+ }
2661
+ var p = n.charCodeAt(o + d), v = t.charCodeAt(l + d);
2662
+ if (p !== v)
2663
+ break;
2664
+ p === 47 && (f = d);
2665
+ }
2666
+ var g = "";
2667
+ for (d = o + f + 1; d <= s; ++d)
2668
+ (d === s || n.charCodeAt(d) === 47) && (g.length === 0 ? g += ".." : g += "/..");
2669
+ return g.length > 0 ? g + t.slice(l + f) : (l += f, t.charCodeAt(l) === 47 && ++l, t.slice(l));
2670
+ },
2671
+ _makeLong: function(n) {
2672
+ return n;
2673
+ },
2674
+ dirname: function(n) {
2675
+ if (me(n), n.length === 0)
2676
+ return ".";
2677
+ for (var t = n.charCodeAt(0), o = t === 47, s = -1, a = !0, l = n.length - 1; l >= 1; --l)
2678
+ if (t = n.charCodeAt(l), t === 47) {
2679
+ if (!a) {
2680
+ s = l;
2681
+ break;
2682
+ }
2683
+ } else
2684
+ a = !1;
2685
+ return s === -1 ? o ? "/" : "." : o && s === 1 ? "//" : n.slice(0, s);
2686
+ },
2687
+ basename: function(n, t) {
2688
+ if (t !== void 0 && typeof t != "string")
2689
+ throw new TypeError('"ext" argument must be a string');
2690
+ me(n);
2691
+ var o = 0, s = -1, a = !0, l;
2692
+ if (t !== void 0 && t.length > 0 && t.length <= n.length) {
2693
+ if (t.length === n.length && t === n)
2694
+ return "";
2695
+ var u = t.length - 1, i = -1;
2696
+ for (l = n.length - 1; l >= 0; --l) {
2697
+ var c = n.charCodeAt(l);
2698
+ if (c === 47) {
2699
+ if (!a) {
2700
+ o = l + 1;
2701
+ break;
2702
+ }
2703
+ } else
2704
+ i === -1 && (a = !1, i = l + 1), u >= 0 && (c === t.charCodeAt(u) ? --u === -1 && (s = l) : (u = -1, s = i));
2705
+ }
2706
+ return o === s ? s = i : s === -1 && (s = n.length), n.slice(o, s);
2707
+ } else {
2708
+ for (l = n.length - 1; l >= 0; --l)
2709
+ if (n.charCodeAt(l) === 47) {
2710
+ if (!a) {
2711
+ o = l + 1;
2712
+ break;
2713
+ }
2714
+ } else
2715
+ s === -1 && (a = !1, s = l + 1);
2716
+ return s === -1 ? "" : n.slice(o, s);
2717
+ }
2718
+ },
2719
+ extname: function(n) {
2720
+ me(n);
2721
+ for (var t = -1, o = 0, s = -1, a = !0, l = 0, u = n.length - 1; u >= 0; --u) {
2722
+ var i = n.charCodeAt(u);
2723
+ if (i === 47) {
2724
+ if (!a) {
2725
+ o = u + 1;
2726
+ break;
2727
+ }
2728
+ continue;
2729
+ }
2730
+ s === -1 && (a = !1, s = u + 1), i === 46 ? t === -1 ? t = u : l !== 1 && (l = 1) : t !== -1 && (l = -1);
2731
+ }
2732
+ return t === -1 || s === -1 || // We saw a non-dot character immediately before the dot
2733
+ l === 0 || // The (right-most) trimmed path component is exactly '..'
2734
+ l === 1 && t === s - 1 && t === o + 1 ? "" : n.slice(t, s);
2735
+ },
2736
+ format: function(n) {
2737
+ if (n === null || typeof n != "object")
2738
+ throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof n);
2739
+ return Ml("/", n);
2740
+ },
2741
+ parse: function(n) {
2742
+ me(n);
2743
+ var t = { root: "", dir: "", base: "", ext: "", name: "" };
2744
+ if (n.length === 0)
2745
+ return t;
2746
+ var o = n.charCodeAt(0), s = o === 47, a;
2747
+ s ? (t.root = "/", a = 1) : a = 0;
2748
+ for (var l = -1, u = 0, i = -1, c = !0, f = n.length - 1, d = 0; f >= a; --f) {
2749
+ if (o = n.charCodeAt(f), o === 47) {
2750
+ if (!c) {
2751
+ u = f + 1;
2752
+ break;
2753
+ }
2754
+ continue;
2755
+ }
2756
+ i === -1 && (c = !1, i = f + 1), o === 46 ? l === -1 ? l = f : d !== 1 && (d = 1) : l !== -1 && (d = -1);
2757
+ }
2758
+ return l === -1 || i === -1 || // We saw a non-dot character immediately before the dot
2759
+ d === 0 || // The (right-most) trimmed path component is exactly '..'
2760
+ d === 1 && l === i - 1 && l === u + 1 ? i !== -1 && (u === 0 && s ? t.base = t.name = n.slice(1, i) : t.base = t.name = n.slice(u, i)) : (u === 0 && s ? (t.name = n.slice(1, l), t.base = n.slice(1, i)) : (t.name = n.slice(u, l), t.base = n.slice(u, i)), t.ext = n.slice(l, i)), u > 0 ? t.dir = n.slice(0, u - 1) : s && (t.dir = "/"), t;
2761
+ },
2762
+ sep: "/",
2763
+ delimiter: ":",
2764
+ win32: null,
2765
+ posix: null
2766
+ };
2767
+ Ae.posix = Ae;
2768
+ var sn = Ae;
2769
+ const rn = /* @__PURE__ */ zn(sn), wl = { class: "tags-container" }, Sl = /* @__PURE__ */ D({
2770
+ __name: "index",
2771
+ setup(e) {
2772
+ const { proxy: n } = ge(), t = kt(), o = Ge(), s = Xe(), a = gt(), l = _e(), { visitedViews: u } = oo(a), i = Se(), c = E(() => i.layout), f = T({
2773
+ path: "",
2774
+ fullPath: "",
2775
+ name: "",
2776
+ title: "",
2777
+ affix: !1,
2778
+ keepAlive: !1
2779
+ }), d = T([]), p = T(0), v = T(0);
2780
+ ee(
2781
+ o,
2782
+ () => {
2783
+ R(), N();
2784
+ },
2785
+ {
2786
+ immediate: !0
2787
+ //初始化立即执行
2788
+ }
2789
+ );
2790
+ const g = T(!1);
2791
+ ee(g, (y) => {
2792
+ y ? document.body.addEventListener("click", I) : document.body.removeEventListener("click", I);
2793
+ });
2794
+ function k(y, h = "/") {
2795
+ let A = [];
2796
+ return y.forEach((F) => {
2797
+ var z, G, se, Ye;
2798
+ const q = sn.resolve(h, F.path);
2799
+ if ((z = F.meta) != null && z.affix && A.push({
2800
+ path: q,
2801
+ fullPath: q,
2802
+ name: String(F.name),
2803
+ title: ((G = F.meta) == null ? void 0 : G.title) || "no-name",
2804
+ affix: (se = F.meta) == null ? void 0 : se.affix,
2805
+ keepAlive: (Ye = F.meta) == null ? void 0 : Ye.keepAlive
2806
+ }), F.children) {
2807
+ const Ze = k(F.children, h + F.path);
2808
+ Ze.length >= 1 && (A = [...A, ...Ze]);
2809
+ }
2810
+ }), A;
2811
+ }
2812
+ function S() {
2813
+ const y = k(s.routes);
2814
+ d.value = y;
2815
+ for (const h of y)
2816
+ h.name && a.addVisitedView(h);
2817
+ }
2818
+ function R() {
2819
+ var y, h;
2820
+ o.meta.title && a.addView({
2821
+ name: o.name,
2822
+ title: o.meta.title,
2823
+ path: o.path,
2824
+ fullPath: o.fullPath,
2825
+ affix: (y = o.meta) == null ? void 0 : y.affix,
2826
+ keepAlive: (h = o.meta) == null ? void 0 : h.keepAlive
2827
+ });
2828
+ }
2829
+ function N() {
2830
+ $e(() => {
2831
+ var y, h;
2832
+ for (const A of u.value)
2833
+ A.path === o.path && A.fullPath !== o.fullPath && a.updateVisitedView({
2834
+ name: o.name,
2835
+ title: o.meta.title || "",
2836
+ path: o.path,
2837
+ fullPath: o.fullPath,
2838
+ affix: (y = o.meta) == null ? void 0 : y.affix,
2839
+ keepAlive: (h = o.meta) == null ? void 0 : h.keepAlive
2840
+ });
2841
+ });
2842
+ }
2843
+ function b(y) {
2844
+ return y.path === o.path;
2845
+ }
2846
+ function Z(y) {
2847
+ return y == null ? void 0 : y.affix;
2848
+ }
2849
+ function Y() {
2850
+ try {
2851
+ return f.value.path === "/dashboard" || f.value.fullPath === a.visitedViews[1].fullPath;
2852
+ } catch {
2853
+ return !1;
2854
+ }
2855
+ }
2856
+ function O() {
2857
+ try {
2858
+ return f.value.fullPath === a.visitedViews[a.visitedViews.length - 1].fullPath;
2859
+ } catch {
2860
+ return !1;
2861
+ }
2862
+ }
2863
+ function j(y) {
2864
+ a.delCachedView(y);
2865
+ const { fullPath: h } = y;
2866
+ $e(() => {
2867
+ t.replace({ path: "/redirect" + h });
2868
+ });
2869
+ }
2870
+ function P(y, h) {
2871
+ const A = y.slice(-1)[0];
2872
+ A && A.fullPath ? t.push(A.fullPath) : (h == null ? void 0 : h.name) === "Dashboard" ? t.replace({ path: "/redirect" + h.fullPath }) : t.push("/");
2873
+ }
2874
+ function W(y) {
2875
+ a.delView(y).then((h) => {
2876
+ b(y) && P(h.visitedViews, y);
2877
+ });
2878
+ }
2879
+ function le() {
2880
+ a.delLeftViews(f.value).then((y) => {
2881
+ y.visitedViews.find((h) => h.path === o.path) || P(y.visitedViews);
2882
+ });
2883
+ }
2884
+ function ce() {
2885
+ a.delRightViews(f.value).then((y) => {
2886
+ y.visitedViews.find((h) => h.path === o.path) || P(y.visitedViews);
2887
+ });
2888
+ }
2889
+ function de() {
2890
+ t.push(f.value), a.delOtherViews(f.value).then(() => {
2891
+ N();
2892
+ });
2893
+ }
2894
+ function be(y) {
2895
+ a.delAllViews().then((h) => {
2896
+ P(h.visitedViews, y);
2897
+ });
2898
+ }
2899
+ function x(y, h) {
2900
+ const F = n == null ? void 0 : n.$el.getBoundingClientRect().left, z = (n == null ? void 0 : n.$el.offsetWidth) - 105, G = h.clientX - F + 15;
2901
+ G > z ? p.value = z : p.value = G, c.value === "mix" ? v.value = h.clientY - 50 : v.value = h.clientY, g.value = !0, f.value = y;
2902
+ }
2903
+ function I() {
2904
+ g.value = !1;
2905
+ }
2906
+ function B() {
2907
+ I();
2908
+ }
2909
+ function X(y, h) {
2910
+ let A = {};
2911
+ function F(z, G) {
2912
+ if (A[z.name] = G, z.children)
2913
+ for (let se = 0; se < z.children.length; se++)
2914
+ F(z.children[se], z);
2915
+ }
2916
+ for (let z = 0; z < y.length; z++)
2917
+ F(y[z], null);
2918
+ let q = A[h];
2919
+ for (; q; ) {
2920
+ if (!A[q.name])
2921
+ return q;
2922
+ q = A[q.name];
2923
+ }
2924
+ return null;
2925
+ }
2926
+ const K = (y) => {
2927
+ if (c.value !== "mix")
2928
+ return;
2929
+ const h = X(s.routes, y);
2930
+ l.activeTopMenu !== h.path && l.activeTopMenu(h.path);
2931
+ };
2932
+ return ee(
2933
+ () => o.name,
2934
+ (y) => {
2935
+ y && K(y);
2936
+ },
2937
+ {
2938
+ deep: !0
2939
+ }
2940
+ ), pe(() => {
2941
+ S();
2942
+ }), (y, h) => {
2943
+ const A = $l, F = Oe("router-link"), q = bt, z = Ne;
2944
+ return m(), $("div", wl, [
2945
+ _(q, {
2946
+ class: "scroll-container",
2947
+ vertical: !1,
2948
+ onWheel: Te(B, ["prevent"])
2949
+ }, {
2950
+ default: M(() => [
2951
+ (m(!0), $(oe, null, xe(r(u), (G) => (m(), L(F, {
2952
+ ref_for: !0,
2953
+ ref: "tagRef",
2954
+ key: G.fullPath,
2955
+ class: w("tags-item " + (b(G) ? "active" : "")),
2956
+ to: { path: G.path, query: G.query },
2957
+ onMouseup: Te((se) => Z(G) ? "" : W(G), ["middle"]),
2958
+ onContextmenu: Te((se) => x(G, se), ["prevent"])
2959
+ }, {
2960
+ default: M(() => [
2961
+ Q(U(r(Ue)(G.title)) + " ", 1),
2962
+ Z(G) ? H("", !0) : (m(), L(A, {
2963
+ key: 0,
2964
+ class: "close-icon",
2965
+ size: "12px",
2966
+ onClick: Te((se) => W(G), ["prevent", "stop"])
2967
+ }, null, 8, ["onClick"]))
2968
+ ]),
2969
+ _: 2
2970
+ }, 1032, ["class", "to", "onMouseup", "onContextmenu"]))), 128))
2971
+ ]),
2972
+ _: 1
2973
+ }),
2974
+ Me(C("ul", {
2975
+ class: "contextmenu",
2976
+ style: ye({ left: r(p) + "px", top: r(v) + "px" })
2977
+ }, [
2978
+ C("li", {
2979
+ onClick: h[0] || (h[0] = (G) => j(r(f)))
2980
+ }, [
2981
+ _(z, { "icon-class": "refresh" }),
2982
+ Q(" 刷新 ")
2983
+ ]),
2984
+ Z(r(f)) ? H("", !0) : (m(), $("li", {
2985
+ key: 0,
2986
+ onClick: h[1] || (h[1] = (G) => W(r(f)))
2987
+ }, [
2988
+ _(z, { "icon-class": "close" }),
2989
+ Q(" 关闭 ")
2990
+ ])),
2991
+ C("li", { onClick: de }, [
2992
+ _(z, { "icon-class": "close_other" }),
2993
+ Q(" 关闭其它 ")
2994
+ ]),
2995
+ Y() ? H("", !0) : (m(), $("li", {
2996
+ key: 1,
2997
+ onClick: le
2998
+ }, [
2999
+ _(z, { "icon-class": "close_left" }),
3000
+ Q(" 关闭左侧 ")
3001
+ ])),
3002
+ O() ? H("", !0) : (m(), $("li", {
3003
+ key: 2,
3004
+ onClick: ce
3005
+ }, [
3006
+ _(z, { "icon-class": "close_right" }),
3007
+ Q(" 关闭右侧 ")
3008
+ ])),
3009
+ C("li", {
3010
+ onClick: h[2] || (h[2] = (G) => be(r(f)))
3011
+ }, [
3012
+ _(z, { "icon-class": "close_all" }),
3013
+ Q(" 关闭所有 ")
3014
+ ])
3015
+ ], 4), [
3016
+ [qe, r(g)]
3017
+ ])
3018
+ ]);
3019
+ };
3020
+ }
3021
+ }), xl = /* @__PURE__ */ ie(Sl, [["__scopeId", "data-v-c6247b96"]]), El = /* @__PURE__ */ D({
3022
+ name: "AppLink",
3023
+ inheritAttrs: !1,
3024
+ __name: "index",
3025
+ props: {
3026
+ to: {
3027
+ type: String,
3028
+ required: !0
3029
+ }
3030
+ },
3031
+ setup(e) {
3032
+ const n = e, t = E(() => He(n.to)), o = E(() => t.value ? "a" : "router-link"), s = (a) => t.value ? { href: a, target: "_blank", rel: "noopener noreferrer" } : { to: a };
3033
+ return (a, l) => (m(), L(st(r(o)), Jn(Qn(s(e.to))), {
3034
+ default: M(() => [
3035
+ ae(a.$slots, "default")
3036
+ ]),
3037
+ _: 3
3038
+ }, 16));
3039
+ }
3040
+ }), Tl = {
3041
+ key: 3,
3042
+ class: "ml-1"
3043
+ }, Il = /* @__PURE__ */ D({
3044
+ __name: "SidebarMenuItemTitle",
3045
+ props: {
3046
+ icon: {
3047
+ type: String,
3048
+ default: ""
3049
+ },
3050
+ title: {
3051
+ type: String,
3052
+ default: ""
3053
+ }
3054
+ },
3055
+ setup(e) {
3056
+ return (n, t) => {
3057
+ const o = we, s = Ne;
3058
+ return m(), $(oe, null, [
3059
+ e.icon && e.icon.startsWith("el-icon") ? (m(), L(o, {
3060
+ key: 0,
3061
+ class: "sub-el-icon"
3062
+ }, {
3063
+ default: M(() => [
3064
+ (m(), L(st(e.icon.replace("el-icon-", ""))))
3065
+ ]),
3066
+ _: 1
3067
+ })) : e.icon ? (m(), L(s, {
3068
+ key: 1,
3069
+ "icon-class": e.icon
3070
+ }, null, 8, ["icon-class"])) : (m(), L(s, {
3071
+ key: 2,
3072
+ "icon-class": "menu"
3073
+ })),
3074
+ e.title ? (m(), $("span", Tl, U(r(Ue)(e.title)), 1)) : H("", !0)
3075
+ ], 64);
3076
+ };
3077
+ }
3078
+ }), Al = /* @__PURE__ */ ie(Il, [["__scopeId", "data-v-891a12f6"]]), Pl = { key: 0 }, Vl = /* @__PURE__ */ D({
3079
+ name: "SidebarMenuItem",
3080
+ inheritAttrs: !1,
3081
+ __name: "SidebarMenuItem",
3082
+ props: {
3083
+ /**
3084
+ * 路由(eg:user)
3085
+ */
3086
+ item: {
3087
+ type: Object,
3088
+ required: !0
3089
+ },
3090
+ /**
3091
+ * 父层级完整路由路径(eg:/system)
3092
+ */
3093
+ basePath: {
3094
+ type: String,
3095
+ required: !0
3096
+ },
3097
+ isNest: {
3098
+ type: Boolean,
3099
+ default: !1
3100
+ }
3101
+ },
3102
+ setup(e) {
3103
+ const n = e, t = T();
3104
+ function o(a = [], l) {
3105
+ const u = a.filter((i) => {
3106
+ var c;
3107
+ return (c = i.meta) != null && c.hidden ? !1 : (i.meta.hidden = !1, t.value = i, !0);
3108
+ });
3109
+ return u.length === 1 ? !0 : u.length === 0 ? (t.value = { ...l, path: "", noShowingChildren: !0 }, !0) : !1;
3110
+ }
3111
+ function s(a) {
3112
+ return He(a) ? a : He(n.basePath) ? n.basePath : rn.resolve(n.basePath, a);
3113
+ }
3114
+ return (a, l) => {
3115
+ var p;
3116
+ const u = Al, i = on, c = El, f = Oe("SidebarMenuItem", !0), d = ya;
3117
+ return !e.item.meta || !e.item.meta.hidden ? (m(), $("div", Pl, [
3118
+ o(e.item.children, e.item) && (!r(t).children || r(t).noShowingChildren) && !((p = e.item.meta) != null && p.alwaysShow) ? (m(), $(oe, { key: 0 }, [
3119
+ r(t).meta ? (m(), L(c, {
3120
+ key: 0,
3121
+ to: s(r(t).path)
3122
+ }, {
3123
+ default: M(() => [
3124
+ _(i, {
3125
+ index: s(r(t).path),
3126
+ class: w({ "submenu-title-noDropdown": !e.isNest })
3127
+ }, {
3128
+ default: M(() => [
3129
+ _(u, {
3130
+ icon: r(t).meta.icon || e.item.meta && e.item.meta.icon,
3131
+ title: r(t).meta.title
3132
+ }, null, 8, ["icon", "title"])
3133
+ ]),
3134
+ _: 1
3135
+ }, 8, ["index", "class"])
3136
+ ]),
3137
+ _: 1
3138
+ }, 8, ["to"])) : H("", !0)
3139
+ ], 64)) : (m(), L(d, {
3140
+ key: 1,
3141
+ index: s(e.item.path),
3142
+ teleported: ""
3143
+ }, {
3144
+ title: M(() => [
3145
+ e.item.meta ? (m(), L(u, {
3146
+ key: 0,
3147
+ icon: e.item.meta && e.item.meta.icon,
3148
+ title: e.item.meta.title
3149
+ }, null, 8, ["icon", "title"])) : H("", !0)
3150
+ ]),
3151
+ default: M(() => [
3152
+ (m(!0), $(oe, null, xe(e.item.children, (v) => (m(), L(f, {
3153
+ key: v.path,
3154
+ "is-nest": !0,
3155
+ item: v,
3156
+ "base-path": s(v.path)
3157
+ }, null, 8, ["item", "base-path"]))), 128))
3158
+ ]),
3159
+ _: 1
3160
+ }, 8, ["index"]))
3161
+ ])) : H("", !0);
3162
+ };
3163
+ }
3164
+ }), Ll = "_dark_168i3_12", Pe = {
3165
+ "sidebar-width": "210px",
3166
+ "navbar-height": "50px",
3167
+ "menu-background": "var(--menu-background)",
3168
+ "menu-text": "var(--menu-text)",
3169
+ "menu-active-text": "var(--menu-active-text)",
3170
+ "menu-hover": "var(--menu-hover)",
3171
+ dark: Ll
3172
+ }, un = /* @__PURE__ */ D({
3173
+ __name: "SidebarMenu",
3174
+ props: {
3175
+ menuList: {
3176
+ required: !0,
3177
+ default: () => [],
3178
+ type: Array
3179
+ },
3180
+ basePath: {
3181
+ type: String,
3182
+ required: !0
3183
+ }
3184
+ },
3185
+ setup(e) {
3186
+ const n = Se(), t = _e(), o = Ge(), s = E(() => n.layout), a = e;
3187
+ function l(u) {
3188
+ return He(u) ? u : He(a.basePath) ? a.basePath : rn.resolve(a.basePath, u);
3189
+ }
3190
+ return (u, i) => {
3191
+ const c = Vl, f = nn;
3192
+ return m(), L(f, {
3193
+ "default-active": r(o).path,
3194
+ collapse: !r(t).sidebar.opened,
3195
+ "background-color": r(Pe)["menu-background"],
3196
+ "text-color": r(Pe)["menu-text"],
3197
+ "active-text-color": r(Pe)["menu-active-text"],
3198
+ "unique-opened": !1,
3199
+ "collapse-transition": !1,
3200
+ mode: r(s) === "top" ? "horizontal" : "vertical"
3201
+ }, {
3202
+ default: M(() => [
3203
+ (m(!0), $(oe, null, xe(e.menuList, (d) => (m(), L(c, {
3204
+ key: d.path,
3205
+ item: d,
3206
+ "base-path": l(d.path),
3207
+ "is-collapse": !r(t).sidebar.opened
3208
+ }, null, 8, ["item", "base-path", "is-collapse"]))), 128))
3209
+ ]),
3210
+ _: 1
3211
+ }, 8, ["default-active", "collapse", "background-color", "text-color", "active-text-color", "mode"]);
3212
+ };
3213
+ }
3214
+ }), Nl = { key: 1 }, Ol = {
3215
+ key: 0,
3216
+ class: "ml-1"
3217
+ }, Bl = /* @__PURE__ */ D({
3218
+ __name: "SidebarMixTopMenu",
3219
+ setup(e) {
3220
+ const n = _e(), t = Xe(), o = kt(), s = E(() => n.activeTopMenuPath), a = T([]), l = (i) => {
3221
+ n.activeTopMenu(i), t.setMixLeftMenus(i);
3222
+ const c = t.mixLeftMenus;
3223
+ u(c);
3224
+ }, u = (i) => {
3225
+ if (i.length === 0)
3226
+ return;
3227
+ const [c] = i;
3228
+ c.children && c.children.length > 0 ? u(c.children) : c.name && o.push({
3229
+ name: c.name
3230
+ });
3231
+ };
3232
+ return pe(() => {
3233
+ a.value = t.routes.filter(
3234
+ (i) => !i.meta || !i.meta.hidden
3235
+ );
3236
+ }), (i, c) => {
3237
+ const f = Ne, d = on, p = nn, v = bt;
3238
+ return m(), L(v, null, {
3239
+ default: M(() => [
3240
+ _(p, {
3241
+ mode: "horizontal",
3242
+ "default-active": r(s),
3243
+ "background-color": r(Pe)["menu-background"],
3244
+ "text-color": r(Pe)["menu-text"],
3245
+ "active-text-color": r(Pe)["menu-active-text"],
3246
+ onSelect: l
3247
+ }, {
3248
+ default: M(() => [
3249
+ (m(!0), $(oe, null, xe(r(a), (g) => (m(), L(d, {
3250
+ key: g.path,
3251
+ index: g.path
3252
+ }, {
3253
+ title: M(() => [
3254
+ g.meta && g.meta.icon ? (m(), L(f, {
3255
+ key: 0,
3256
+ "icon-class": g.meta.icon
3257
+ }, null, 8, ["icon-class"])) : H("", !0),
3258
+ g.path === "/" ? (m(), $("span", Nl, " 首页 ")) : (m(), $(oe, { key: 2 }, [
3259
+ g.meta && g.meta.title ? (m(), $("span", Ol, U(r(Ue)(g.meta.title)), 1)) : H("", !0)
3260
+ ], 64))
3261
+ ]),
3262
+ _: 2
3263
+ }, 1032, ["index"]))), 128))
3264
+ ]),
3265
+ _: 1
3266
+ }, 8, ["default-active", "background-color", "text-color", "active-text-color"])
3267
+ ]),
3268
+ _: 1
3269
+ });
3270
+ };
3271
+ }
3272
+ }), Rl = { class: "logo-container" }, Fl = ["src"], Dl = ["src"], zl = { class: "logo-title" }, Hl = /* @__PURE__ */ D({
3273
+ __name: "SidebarLogo",
3274
+ props: {
3275
+ collapse: {
3276
+ type: Boolean,
3277
+ required: !0
3278
+ }
3279
+ },
3280
+ setup(e) {
3281
+ const n = Se(), t = ze.logo;
3282
+ return (o, s) => {
3283
+ const a = Oe("router-link");
3284
+ return m(), $("div", Rl, [
3285
+ _(it, { "enter-active-class": "animate__animated animate__fadeInLeft" }, {
3286
+ default: M(() => [
3287
+ e.collapse ? (m(), L(a, {
3288
+ key: 0,
3289
+ class: "wh-full flex-center",
3290
+ to: "/"
3291
+ }, {
3292
+ default: M(() => [
3293
+ r(n).sidebarLogo ? (m(), $("img", {
3294
+ key: 0,
3295
+ src: r(t),
3296
+ class: "logo-image"
3297
+ }, null, 8, Fl)) : H("", !0)
3298
+ ]),
3299
+ _: 1
3300
+ })) : (m(), L(a, {
3301
+ key: 1,
3302
+ class: "wh-full flex-center",
3303
+ to: "/"
3304
+ }, {
3305
+ default: M(() => [
3306
+ r(n).sidebarLogo ? (m(), $("img", {
3307
+ key: 0,
3308
+ src: r(t),
3309
+ class: "logo-image"
3310
+ }, null, 8, Dl)) : H("", !0),
3311
+ C("span", zl, U(r(ze).title), 1)
3312
+ ]),
3313
+ _: 1
3314
+ }))
3315
+ ]),
3316
+ _: 1
3317
+ })
3318
+ ]);
3319
+ };
3320
+ }
3321
+ }), Wl = /* @__PURE__ */ ie(Hl, [["__scopeId", "data-v-210c85a9"]]), ql = {
3322
+ key: 0,
3323
+ class: "flex w-full"
3324
+ }, Kl = /* @__PURE__ */ D({
3325
+ __name: "index",
3326
+ setup(e) {
3327
+ const n = _e(), t = Se(), o = Xe(), s = E(() => t.sidebarLogo), a = E(() => t.layout);
3328
+ return (l, u) => {
3329
+ const i = Wl, c = Bl, f = an, d = un, p = bt;
3330
+ return m(), $("div", {
3331
+ class: w({ "has-logo": r(s) })
3332
+ }, [
3333
+ r(a) == "mix" ? (m(), $("div", ql, [
3334
+ r(s) ? (m(), L(i, {
3335
+ key: 0,
3336
+ collapse: !r(n).sidebar.opened
3337
+ }, null, 8, ["collapse"])) : H("", !0),
3338
+ _(c, { class: "flex-1" }),
3339
+ _(f)
3340
+ ])) : (m(), $(oe, { key: 1 }, [
3341
+ r(s) ? (m(), L(i, {
3342
+ key: 0,
3343
+ collapse: !r(n).sidebar.opened
3344
+ }, null, 8, ["collapse"])) : H("", !0),
3345
+ _(p, null, {
3346
+ default: M(() => [
3347
+ _(d, {
3348
+ "menu-list": r(o).routes,
3349
+ "base-path": ""
3350
+ }, null, 8, ["menu-list"])
3351
+ ]),
3352
+ _: 1
3353
+ }),
3354
+ r(a) === "top" ? (m(), L(f, { key: 1 })) : H("", !0)
3355
+ ], 64))
3356
+ ], 2);
3357
+ };
3358
+ }
3359
+ }), Ul = /* @__PURE__ */ ie(Kl, [["__scopeId", "data-v-a6d3f8e9"]]), jl = {
3360
+ key: 1,
3361
+ class: "mix-container"
3362
+ }, Xl = { class: "mix-container__left" }, Gl = { class: "sidebar-toggle" }, Yl = 992, Zl = /* @__PURE__ */ D({
3363
+ __name: "index",
3364
+ setup(e) {
3365
+ const n = _e(), t = Se(), o = Xe(), s = E(() => t.fixedHeader), a = E(() => t.tagsView), l = E(() => t.layout), u = E(() => n.activeTopMenuPath), i = E(() => o.mixLeftMenus);
3366
+ ee(
3367
+ () => u.value,
3368
+ (v) => {
3369
+ o.setMixLeftMenus(v);
3370
+ },
3371
+ {
3372
+ deep: !0,
3373
+ immediate: !0
3374
+ }
3375
+ );
3376
+ const c = E(() => ({
3377
+ hideSidebar: !n.sidebar.opened,
3378
+ openSidebar: n.sidebar.opened,
3379
+ mobile: n.device === et.MOBILE,
3380
+ "layout-left": l.value === "left",
3381
+ "layout-top": l.value === "top",
3382
+ "layout-mix": l.value === "mix"
3383
+ })), f = Hn().width;
3384
+ yt(() => {
3385
+ f.value < Yl ? (n.toggleDevice(et.MOBILE), n.closeSideBar()) : (n.toggleDevice(et.DESKTOP), f.value >= 1200 ? n.openSideBar() : n.closeSideBar());
3386
+ });
3387
+ function d() {
3388
+ n.closeSideBar();
3389
+ }
3390
+ function p() {
3391
+ n.toggleSidebar();
3392
+ }
3393
+ return (v, g) => {
3394
+ const k = Ul, S = un, R = ln, N = xl, b = gl, Z = hl, Y = Ha;
3395
+ return m(), $("div", {
3396
+ class: w(["wh-full", r(c)])
3397
+ }, [
3398
+ r(c).mobile && r(c).openSidebar ? (m(), $("div", {
3399
+ key: 0,
3400
+ class: "wh-full fixed-lt z-999 bg-black bg-opacity-30",
3401
+ onClick: d
3402
+ })) : H("", !0),
3403
+ _(k, { class: "sidebar-container" }),
3404
+ r(l) === "mix" ? (m(), $("div", jl, [
3405
+ C("div", Xl, [
3406
+ _(S, {
3407
+ "menu-list": r(i),
3408
+ "base-path": r(u)
3409
+ }, null, 8, ["menu-list", "base-path"]),
3410
+ C("div", Gl, [
3411
+ _(R, {
3412
+ "is-active": r(n).sidebar.opened,
3413
+ onToggleClick: p
3414
+ }, null, 8, ["is-active"])
3415
+ ])
3416
+ ]),
3417
+ C("div", {
3418
+ class: w([{ hasTagsView: r(a) }, "main-container"])
3419
+ }, [
3420
+ C("div", {
3421
+ class: w({ "fixed-header": r(s) })
3422
+ }, [
3423
+ r(a) ? (m(), L(N, { key: 0 })) : H("", !0)
3424
+ ], 2),
3425
+ _(b),
3426
+ r(ze).showSettings ? (m(), L(Z, { key: 0 })) : H("", !0)
3427
+ ], 2)
3428
+ ])) : (m(), $("div", {
3429
+ key: 2,
3430
+ class: w([{ hasTagsView: r(a) }, "main-container"])
3431
+ }, [
3432
+ C("div", {
3433
+ class: w({ "fixed-header": r(s) })
3434
+ }, [
3435
+ r(l) === "left" ? (m(), L(Y, { key: 0 })) : H("", !0),
3436
+ r(a) ? (m(), L(N, { key: 1 })) : H("", !0)
3437
+ ], 2),
3438
+ _(b),
3439
+ r(ze).showSettings ? (m(), L(Z, { key: 0 })) : H("", !0)
3440
+ ], 2))
3441
+ ], 2);
3442
+ };
3443
+ }
3444
+ }), fs = /* @__PURE__ */ ie(Zl, [["__scopeId", "data-v-71891bc2"]]);
3445
+ export {
3446
+ fs as default
3447
+ };