import { ref as Ft, reactive as gn, watch as Vt, onMounted as bn, openBlock as mn, createElementBlock as wn, createElementVNode as vn, createVNode as Tn } from "vue"; import { useRouter as An } from "vue-router"; import { cl as Sn, ck as V, n as Cn, ad as kt, cL as Kn } from "./index2.js"; var k = { exports: {} }; k.exports; (function(p, h) { var K = 200, m = "__lodash_hash_undefined__", a = 9007199254740991, _ = "[object Arguments]", W = "[object Array]", $ = "[object Boolean]", s = "[object Date]", u = "[object Error]", i = "[object Function]", d = "[object GeneratorFunction]", w = "[object Map]", R = "[object Number]", T = "[object Object]", M = "[object Promise]", at = "[object RegExp]", B = "[object Set]", st = "[object String]", it = "[object Symbol]", q = "[object WeakMap]", ct = "[object ArrayBuffer]", G = "[object DataView]", ut = "[object Float32Array]", ft = "[object Float64Array]", lt = "[object Int8Array]", pt = "[object Int16Array]", ht = "[object Int32Array]", dt = "[object Uint8Array]", _t = "[object Uint8ClampedArray]", yt = "[object Uint16Array]", gt = "[object Uint32Array]", Wt = /[\\^$.*+?()[\]{}|]/g, qt = /\w*$/, zt = /^\[object .+?Constructor\]$/, Jt = /^(?:0|[1-9]\d*)$/, o = {}; o[_] = o[W] = o[ct] = o[G] = o[$] = o[s] = o[ut] = o[ft] = o[lt] = o[pt] = o[ht] = o[w] = o[R] = o[T] = o[at] = o[B] = o[st] = o[it] = o[dt] = o[_t] = o[yt] = o[gt] = !0, o[u] = o[i] = o[q] = !1; var Xt = typeof V == "object" && V && V.Object === Object && V, Yt = typeof self == "object" && self && self.Object === Object && self, y = Xt || Yt || Function("return this")(), bt = h && !h.nodeType && h, mt = bt && !0 && p && !p.nodeType && p, Zt = mt && mt.exports === bt; function Qt(t, e) { return t.set(e[0], e[1]), t; } function te(t, e) { return t.add(e), t; } function ee(t, e) { for (var n = -1, r = t ? t.length : 0; ++n < r && e(t[n], n, t) !== !1; ) ; return t; } function ne(t, e) { for (var n = -1, r = e.length, c = t.length; ++n < r; ) t[c + n] = e[n]; return t; } function wt(t, e, n, r) { for (var c = -1, f = t ? t.length : 0; ++c < f; ) n = e(n, t[c], c, t); return n; } function re(t, e) { for (var n = -1, r = Array(t); ++n < t; ) r[n] = e(n); return r; } function oe(t, e) { return t == null ? void 0 : t[e]; } function vt(t) { var e = !1; if (t != null && typeof t.toString != "function") try { e = !!(t + ""); } catch (n) { } return e; } function Tt(t) { var e = -1, n = Array(t.size); return t.forEach(function(r, c) { n[++e] = [c, r]; }), n; } function z(t, e) { return function(n) { return t(e(n)); }; } function At(t) { var e = -1, n = Array(t.size); return t.forEach(function(r) { n[++e] = r; }), n; } var ae = Array.prototype, se = Function.prototype, U = Object.prototype, J = y["__core-js_shared__"], St = function() { var t = /[^.]+$/.exec(J && J.keys && J.keys.IE_PROTO || ""); return t ? "Symbol(src)_1." + t : ""; }(), Ct = se.toString, v = U.hasOwnProperty, L = U.toString, ie = RegExp( "^" + Ct.call(v).replace(Wt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ), Kt = Zt ? y.Buffer : void 0, Ot = y.Symbol, xt = y.Uint8Array, ce = z(Object.getPrototypeOf, Object), ue = Object.create, fe = U.propertyIsEnumerable, le = ae.splice, jt = Object.getOwnPropertySymbols, pe = Kt ? Kt.isBuffer : void 0, he = z(Object.keys, Object), X = j(y, "DataView"), I = j(y, "Map"), Y = j(y, "Promise"), Z = j(y, "Set"), Q = j(y, "WeakMap"), P = j(Object, "create"), de = C(X), _e = C(I), ye = C(Y), ge = C(Z), be = C(Q), Et = Ot ? Ot.prototype : void 0, Mt = Et ? Et.valueOf : void 0; function A(t) { var e = -1, n = t ? t.length : 0; for (this.clear(); ++e < n; ) { var r = t[e]; this.set(r[0], r[1]); } } function me() { this.__data__ = P ? P(null) : {}; } function we(t) { return this.has(t) && delete this.__data__[t]; } function ve(t) { var e = this.__data__; if (P) { var n = e[t]; return n === m ? void 0 : n; } return v.call(e, t) ? e[t] : void 0; } function Te(t) { var e = this.__data__; return P ? e[t] !== void 0 : v.call(e, t); } function Ae(t, e) { var n = this.__data__; return n[t] = P && e === void 0 ? m : e, this; } A.prototype.clear = me, A.prototype.delete = we, A.prototype.get = ve, A.prototype.has = Te, A.prototype.set = Ae; function g(t) { var e = -1, n = t ? t.length : 0; for (this.clear(); ++e < n; ) { var r = t[e]; this.set(r[0], r[1]); } } function Se() { this.__data__ = []; } function Ce(t) { var e = this.__data__, n = H(e, t); if (n < 0) return !1; var r = e.length - 1; return n == r ? e.pop() : le.call(e, n, 1), !0; } function Ke(t) { var e = this.__data__, n = H(e, t); return n < 0 ? void 0 : e[n][1]; } function Oe(t) { return H(this.__data__, t) > -1; } function xe(t, e) { var n = this.__data__, r = H(n, t); return r < 0 ? n.push([t, e]) : n[r][1] = e, this; } g.prototype.clear = Se, g.prototype.delete = Ce, g.prototype.get = Ke, g.prototype.has = Oe, g.prototype.set = xe; function O(t) { var e = -1, n = t ? t.length : 0; for (this.clear(); ++e < n; ) { var r = t[e]; this.set(r[0], r[1]); } } function je() { this.__data__ = { hash: new A(), map: new (I || g)(), string: new A() }; } function Ee(t) { return N(this, t).delete(t); } function Me(t) { return N(this, t).get(t); } function Ie(t) { return N(this, t).has(t); } function Pe(t, e) { return N(this, t).set(t, e), this; } O.prototype.clear = je, O.prototype.delete = Ee, O.prototype.get = Me, O.prototype.has = Ie, O.prototype.set = Pe; function x(t) { this.__data__ = new g(t); } function $e() { this.__data__ = new g(); } function Re(t) { return this.__data__.delete(t); } function Be(t) { return this.__data__.get(t); } function Ge(t) { return this.__data__.has(t); } function Ue(t, e) { var n = this.__data__; if (n instanceof g) { var r = n.__data__; if (!I || r.length < K - 1) return r.push([t, e]), this; n = this.__data__ = new O(r); } return n.set(t, e), this; } x.prototype.clear = $e, x.prototype.delete = Re, x.prototype.get = Be, x.prototype.has = Ge, x.prototype.set = Ue; function Le(t, e) { var n = nt(t) || fn(t) ? re(t.length, String) : [], r = n.length, c = !!r; for (var f in t) v.call(t, f) && !(c && (f == "length" || an(f, r))) && n.push(f); return n; } function It(t, e, n) { var r = t[e]; (!(v.call(t, e) && Bt(r, n)) || n === void 0 && !(e in t)) && (t[e] = n); } function H(t, e) { for (var n = t.length; n--; ) if (Bt(t[n][0], e)) return n; return -1; } function He(t, e) { return t && Pt(e, rt(e), t); } function tt(t, e, n, r, c, f, b) { var l; if (r && (l = f ? r(t, c, f, b) : r(t)), l !== void 0) return l; if (!D(t)) return t; var Lt = nt(t); if (Lt) { if (l = nn(t), !e) return Qe(t, l); } else { var E = S(t), Ht = E == i || E == d; if (pn(t)) return We(t, e); if (E == T || E == _ || Ht && !f) { if (vt(t)) return f ? t : {}; if (l = rn(Ht ? {} : t), !e) return tn(t, He(l, t)); } else { if (!o[E]) return f ? t : {}; l = on(t, E, tt, e); } } b || (b = new x()); var Nt = b.get(t); if (Nt) return Nt; if (b.set(t, l), !Lt) var Dt = n ? en(t) : rt(t); return ee(Dt || t, function(ot, F) { Dt && (F = ot, ot = t[F]), It(l, F, tt(ot, e, n, r, F, t, b)); }), l; } function Ne(t) { return D(t) ? ue(t) : {}; } function De(t, e, n) { var r = e(t); return nt(t) ? r : ne(r, n(t)); } function Fe(t) { return L.call(t); } function Ve(t) { if (!D(t) || cn(t)) return !1; var e = Ut(t) || vt(t) ? ie : zt; return e.test(C(t)); } function ke(t) { if (!Rt(t)) return he(t); var e = []; for (var n in Object(t)) v.call(t, n) && n != "constructor" && e.push(n); return e; } function We(t, e) { if (e) return t.slice(); var n = new t.constructor(t.length); return t.copy(n), n; } function et(t) { var e = new t.constructor(t.byteLength); return new xt(e).set(new xt(t)), e; } function qe(t, e) { var n = e ? et(t.buffer) : t.buffer; return new t.constructor(n, t.byteOffset, t.byteLength); } function ze(t, e, n) { var r = e ? n(Tt(t), !0) : Tt(t); return wt(r, Qt, new t.constructor()); } function Je(t) { var e = new t.constructor(t.source, qt.exec(t)); return e.lastIndex = t.lastIndex, e; } function Xe(t, e, n) { var r = e ? n(At(t), !0) : At(t); return wt(r, te, new t.constructor()); } function Ye(t) { return Mt ? Object(Mt.call(t)) : {}; } function Ze(t, e) { var n = e ? et(t.buffer) : t.buffer; return new t.constructor(n, t.byteOffset, t.length); } function Qe(t, e) { var n = -1, r = t.length; for (e || (e = Array(r)); ++n < r; ) e[n] = t[n]; return e; } function Pt(t, e, n, r) { n || (n = {}); for (var c = -1, f = e.length; ++c < f; ) { var b = e[c], l = void 0; It(n, b, l === void 0 ? t[b] : l); } return n; } function tn(t, e) { return Pt(t, $t(t), e); } function en(t) { return De(t, rt, $t); } function N(t, e) { var n = t.__data__; return sn(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map; } function j(t, e) { var n = oe(t, e); return Ve(n) ? n : void 0; } var $t = jt ? z(jt, Object) : _n, S = Fe; (X && S(new X(new ArrayBuffer(1))) != G || I && S(new I()) != w || Y && S(Y.resolve()) != M || Z && S(new Z()) != B || Q && S(new Q()) != q) && (S = function(t) { var e = L.call(t), n = e == T ? t.constructor : void 0, r = n ? C(n) : void 0; if (r) switch (r) { case de: return G; case _e: return w; case ye: return M; case ge: return B; case be: return q; } return e; }); function nn(t) { var e = t.length, n = t.constructor(e); return e && typeof t[0] == "string" && v.call(t, "index") && (n.index = t.index, n.input = t.input), n; } function rn(t) { return typeof t.constructor == "function" && !Rt(t) ? Ne(ce(t)) : {}; } function on(t, e, n, r) { var c = t.constructor; switch (e) { case ct: return et(t); case $: case s: return new c(+t); case G: return qe(t, r); case ut: case ft: case lt: case pt: case ht: case dt: case _t: case yt: case gt: return Ze(t, r); case w: return ze(t, r, n); case R: case st: return new c(t); case at: return Je(t); case B: return Xe(t, r, n); case it: return Ye(t); } } function an(t, e) { return e = e == null ? a : e, !!e && (typeof t == "number" || Jt.test(t)) && t > -1 && t % 1 == 0 && t < e; } function sn(t) { var e = typeof t; return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null; } function cn(t) { return !!St && St in t; } function Rt(t) { var e = t && t.constructor, n = typeof e == "function" && e.prototype || U; return t === n; } function C(t) { if (t != null) { try { return Ct.call(t); } catch (e) { } try { return t + ""; } catch (e) { } } return ""; } function un(t) { return tt(t, !0, !0); } function Bt(t, e) { return t === e || t !== t && e !== e; } function fn(t) { return ln(t) && v.call(t, "callee") && (!fe.call(t, "callee") || L.call(t) == _); } var nt = Array.isArray; function Gt(t) { return t != null && hn(t.length) && !Ut(t); } function ln(t) { return dn(t) && Gt(t); } var pn = pe || yn; function Ut(t) { var e = D(t) ? L.call(t) : ""; return e == i || e == d; } function hn(t) { return typeof t == "number" && t > -1 && t % 1 == 0 && t <= a; } function D(t) { var e = typeof t; return !!t && (e == "object" || e == "function"); } function dn(t) { return !!t && typeof t == "object"; } function rt(t) { return Gt(t) ? Le(t) : ke(t); } function _n() { return []; } function yn() { return !1; } p.exports = un; })(k, k.exports); var On = k.exports; const xn = /* @__PURE__ */ Sn(On); function jn(p) { if (!p) return null; p = xn(p); let h = Array.isArray(p) ? p.concat() : [p]; for (; h.length; ) { const K = h.length; for (let m = 0; m < K; m++) { const a = h.shift(); !a.children || !a.children.length || (a.children.forEach((_) => { _.path[0] !== "/" && !_.path.startsWith("http") && (_.path = a.path.replace(/(\w*)[/]*$/, `$1/${_.path}`)); }), h = h.concat(a.children)); } } return p; } const En = { class: "s-menu-top-common" }, Mn = { class: "menu-wrap" }, In = { __name: "STopMenu", setup(p) { const h = An(), K = Ft([]), m = Ft(""), a = gn({ collapsed: !1, selectedKeys: [], openKeys: [], preOpenKeys: [] }); Vt( () => a.openKeys, (s, u) => { a.preOpenKeys = u; } ); const _ = (s) => s.map((i) => { const d = { key: i.path, // icon: item.icon ? () => h(item.icon) : null, icon: null, label: window.$l(i.name || i.meta.title), title: window.$l(i.name || i), path: i.path }; return i.children && (d.children = _(i.children)), d; }), W = (s) => { h.push(s.key), a.selectedKeys = [s.key], window.$utils.ls.set("selectedKeys", a.selectedKeys); }, $ = (s) => { const u = s.filter((w) => !a.preOpenKeys.includes(w)), i = u[u.length - 1]; a.openKeys = [i], kt().setMenuOpenKeys(a.openKeys); }; return bn(() => { m.value = window.$utils.env.VITE_APP_MENU_THEME || "dark"; const s = kt(), u = s.dynamics, i = jn(u.find((T) => T.path === "/")), d = i && i.children || []; K.value = _([...d].filter((T) => { var M; return !((M = T.meta) != null && M.hidden); })); const w = location.pathname; window.$utils.ls.set("selectedKeys", [w]), a.selectedKeys = window.$utils.ls.get("selectedKeys") || []; const R = s.openKeys || []; a.openKeys = R; }), Vt( () => { var s; return (s = h.currentRoute.value) == null ? void 0 : s.path; }, (s) => { s && (a.selectedKeys = [s], window.$utils.ls.set("selectedKeys", a.selectedKeys)); } ), (s, u) => { const i = Kn; return mn(), wn("div", En, [ vn("div", Mn, [ Tn(i, { openKeys: a.openKeys, "onUpdate:openKeys": u[0] || (u[0] = (d) => a.openKeys = d), selectedKeys: a.selectedKeys, "onUpdate:selectedKeys": u[1] || (u[1] = (d) => a.selectedKeys = d), mode: "horizontal", theme: m.value, items: K.value, onSelect: W, onOpenChange: $ }, null, 8, ["openKeys", "selectedKeys", "theme", "items"]) ]) ]); }; } }, Bn = /* @__PURE__ */ Cn(In, [["__scopeId", "data-v-48e1b3d0"]]); export { Bn as default };