@skyfox2000/webui 1.6.4 → 1.6.5

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.
@@ -2,11 +2,11 @@ var pr = Object.defineProperty;
2
2
  var _r = (e, t, a) => t in e ? pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
3
  var ne = (e, t, a) => _r(e, typeof t != "symbol" ? t + "" : t, a);
4
4
  import * as wa from "vue";
5
- import { effectScope as gr, ref as w, shallowRef as ke, computed as tt, watch as B, isRef as hr, defineComponent as De, h as Ie, Fragment as Ye, inject as nt, onMounted as wt, onUnmounted as dt, createVNode as Be, Text as Er, nextTick as vr, provide as ka, toRaw as ds, reactive as br, createBlock as zt, createCommentVNode as ot, openBlock as le, unref as X, mergeProps as kt, useAttrs as Zt, onActivated as ea, createElementBlock as ge, withCtx as xe, createTextVNode as ta, toDisplayString as je, renderList as nn, normalizeClass as ms, createElementVNode as Ir } from "vue";
5
+ import { effectScope as gr, ref as w, shallowRef as ke, computed as tt, watch as B, isRef as hr, defineComponent as De, h as Ie, Fragment as Ye, inject as nt, onMounted as wt, onUnmounted as dt, createVNode as Be, Text as Er, nextTick as vr, provide as ka, toRaw as ds, reactive as br, createBlock as zt, createCommentVNode as ot, openBlock as le, unref as X, mergeProps as kt, useAttrs as Zt, onActivated as ea, createElementBlock as ge, withCtx as Me, createTextVNode as ta, toDisplayString as je, renderList as nn, normalizeClass as ms, createElementVNode as Ir } from "vue";
6
6
  import { Switch as yr, AutoComplete as Nr, Input as Sr, CheckboxGroup as Tr, Checkbox as Lr, RadioGroup as Or, Radio as Ar, Select as Pr, SelectOption as Rr } from "ant-design-vue";
7
7
  import { createPinia as wr, defineStore as Dt } from "pinia";
8
8
  import kr from "pinia-plugin-persistedstate";
9
- import { EnvConfig as Fe, AppAction as Sn, AppSource as Tn, isMicroApp as Ce, isBaseMicroApp as Dr, combineParams as Ct } from "@skyfox2000/microbase";
9
+ import { EnvConfig as Ce, AppAction as Sn, AppSource as Tn, isMicroApp as We, isBaseMicroApp as Dr, combineParams as Ct } from "@skyfox2000/microbase";
10
10
  import { httpPost as qe, ResStatus as ie, setToken as Wt, httpGet as ps, fieldMapping as Cr, parseFieldTemplate as Qt, API_HOST as Da, SERVER_HOST as Ln } from "@skyfox2000/fapi";
11
11
  import se from "vue-m-message";
12
12
  import { createRouter as Fr, createWebHashHistory as Mr } from "vue-router";
@@ -533,7 +533,7 @@ function oo(e, t = {}) {
533
533
  /* TokenChars.BraceRight */
534
534
  ), f.braceNest--, f.braceNest > 0 && O(u), f.inLinked && f.braceNest === 0 && (f.inLinked = !1), N;
535
535
  case "@":
536
- return f.braceNest > 0 && g(D.UNTERMINATED_CLOSING_BRACE, r(), 0), N = $e(u, f) || y(f), f.braceNest = 0, N;
536
+ return f.braceNest > 0 && g(D.UNTERMINATED_CLOSING_BRACE, r(), 0), N = Ve(u, f) || y(f), f.braceNest = 0, N;
537
537
  default: {
538
538
  let j = !0, q = !0, V = !0;
539
539
  if (K(u))
@@ -553,7 +553,7 @@ function oo(e, t = {}) {
553
553
  }
554
554
  return N;
555
555
  }
556
- function $e(u, f) {
556
+ function Ve(u, f) {
557
557
  const { currentType: N } = f;
558
558
  let k = null;
559
559
  const j = u.currentChar();
@@ -580,7 +580,7 @@ function oo(e, t = {}) {
580
580
  /* TokenChars.LinkedDelimiter */
581
581
  );
582
582
  default:
583
- return K(u) ? (k = p(f, 1, gt(u)), f.braceNest = 0, f.inLinked = !1, k) : L(u, f) || C(u, f) ? (O(u), $e(u, f)) : v(u, f) ? (O(u), p(f, 11, Aa(u))) : M(u, f) ? (O(u), j === "{" ? ht(u, f) || k : p(f, 10, Pa(u))) : (N === 7 && g(D.INVALID_LINKED_FORMAT, r(), 0), f.braceNest = 0, f.inLinked = !1, Et(u, f));
583
+ return K(u) ? (k = p(f, 1, gt(u)), f.braceNest = 0, f.inLinked = !1, k) : L(u, f) || C(u, f) ? (O(u), Ve(u, f)) : v(u, f) ? (O(u), p(f, 11, Aa(u))) : M(u, f) ? (O(u), j === "{" ? ht(u, f) || k : p(f, 10, Pa(u))) : (N === 7 && g(D.INVALID_LINKED_FORMAT, r(), 0), f.braceNest = 0, f.inLinked = !1, Et(u, f));
584
584
  }
585
585
  }
586
586
  function Et(u, f) {
@@ -591,7 +591,7 @@ function oo(e, t = {}) {
591
591
  if (f.braceNest > 0)
592
592
  return ht(u, f) || y(f);
593
593
  if (f.inLinked)
594
- return $e(u, f) || y(f);
594
+ return Ve(u, f) || y(f);
595
595
  switch (u.currentChar()) {
596
596
  case "{":
597
597
  return ht(u, f) || y(f);
@@ -603,7 +603,7 @@ function oo(e, t = {}) {
603
603
  /* TokenChars.BraceRight */
604
604
  );
605
605
  case "@":
606
- return $e(u, f) || y(f);
606
+ return Ve(u, f) || y(f);
607
607
  default: {
608
608
  if (K(u))
609
609
  return N = p(f, 1, gt(u)), f.braceNest = 0, f.inLinked = !1, N;
@@ -1085,38 +1085,38 @@ function he(e) {
1085
1085
  }
1086
1086
  const gs = ["b", "body"];
1087
1087
  function To(e) {
1088
- return Ue(e, gs);
1088
+ return xe(e, gs);
1089
1089
  }
1090
1090
  const hs = ["c", "cases"];
1091
1091
  function Lo(e) {
1092
- return Ue(e, hs, []);
1092
+ return xe(e, hs, []);
1093
1093
  }
1094
1094
  const Es = ["s", "static"];
1095
1095
  function Oo(e) {
1096
- return Ue(e, Es);
1096
+ return xe(e, Es);
1097
1097
  }
1098
1098
  const vs = ["i", "items"];
1099
1099
  function Ao(e) {
1100
- return Ue(e, vs, []);
1100
+ return xe(e, vs, []);
1101
1101
  }
1102
1102
  const bs = ["t", "type"];
1103
1103
  function un(e) {
1104
- return Ue(e, bs);
1104
+ return xe(e, bs);
1105
1105
  }
1106
1106
  const Is = ["v", "value"];
1107
1107
  function Kt(e, t) {
1108
- const a = Ue(e, Is);
1108
+ const a = xe(e, Is);
1109
1109
  if (a != null)
1110
1110
  return a;
1111
1111
  throw St(t);
1112
1112
  }
1113
1113
  const ys = ["m", "modifier"];
1114
1114
  function Po(e) {
1115
- return Ue(e, ys);
1115
+ return xe(e, ys);
1116
1116
  }
1117
1117
  const Ns = ["k", "key"];
1118
1118
  function Ro(e) {
1119
- const t = Ue(e, Ns);
1119
+ const t = xe(e, Ns);
1120
1120
  if (t)
1121
1121
  return t;
1122
1122
  throw St(
@@ -1124,7 +1124,7 @@ function Ro(e) {
1124
1124
  /* NodeTypes.Linked */
1125
1125
  );
1126
1126
  }
1127
- function Ue(e, t, a) {
1127
+ function xe(e, t, a) {
1128
1128
  for (let n = 0; n < t.length; n++) {
1129
1129
  const s = t[n];
1130
1130
  if (be(e, s) && e[s] != null)
@@ -1350,8 +1350,8 @@ function Yo(e, t, a) {
1350
1350
  }
1351
1351
  return n;
1352
1352
  }
1353
- const Ve = [];
1354
- Ve[
1353
+ const Ue = [];
1354
+ Ue[
1355
1355
  0
1356
1356
  /* States.BEFORE_PATH */
1357
1357
  ] = {
@@ -1373,7 +1373,7 @@ Ve[
1373
1373
  /* States.AFTER_PATH */
1374
1374
  ]
1375
1375
  };
1376
- Ve[
1376
+ Ue[
1377
1377
  1
1378
1378
  /* States.IN_PATH */
1379
1379
  ] = {
@@ -1394,7 +1394,7 @@ Ve[
1394
1394
  /* States.AFTER_PATH */
1395
1395
  ]
1396
1396
  };
1397
- Ve[
1397
+ Ue[
1398
1398
  2
1399
1399
  /* States.BEFORE_IDENT */
1400
1400
  ] = {
@@ -1413,7 +1413,7 @@ Ve[
1413
1413
  /* Actions.APPEND */
1414
1414
  ]
1415
1415
  };
1416
- Ve[
1416
+ Ue[
1417
1417
  3
1418
1418
  /* States.IN_IDENT */
1419
1419
  ] = {
@@ -1448,7 +1448,7 @@ Ve[
1448
1448
  /* Actions.PUSH */
1449
1449
  ]
1450
1450
  };
1451
- Ve[
1451
+ Ue[
1452
1452
  4
1453
1453
  /* States.IN_SUB_PATH */
1454
1454
  ] = {
@@ -1479,7 +1479,7 @@ Ve[
1479
1479
  /* Actions.APPEND */
1480
1480
  ]
1481
1481
  };
1482
- Ve[
1482
+ Ue[
1483
1483
  5
1484
1484
  /* States.IN_SINGLE_QUOTE */
1485
1485
  ] = {
@@ -1495,7 +1495,7 @@ Ve[
1495
1495
  /* Actions.APPEND */
1496
1496
  ]
1497
1497
  };
1498
- Ve[
1498
+ Ue[
1499
1499
  6
1500
1500
  /* States.IN_DOUBLE_QUOTE */
1501
1501
  ] = {
@@ -1610,7 +1610,7 @@ function qo(e) {
1610
1610
  }
1611
1611
  for (; n !== null; )
1612
1612
  if (a++, r = e[a], !(r === "\\" && y())) {
1613
- if (i = Qo(r), g = Ve[n], c = g[i] || g.l || 8, c === 8 || (n = c[0], c[1] !== void 0 && (m = p[c[1]], m && (l = r, m() === !1))))
1613
+ if (i = Qo(r), g = Ue[n], c = g[i] || g.l || 8, c === 8 || (n = c[0], c[1] !== void 0 && (m = p[c[1]], m && (l = r, m() === !1))))
1614
1614
  return;
1615
1615
  if (n === 7)
1616
1616
  return t;
@@ -2494,7 +2494,7 @@ function pn(e = {}) {
2494
2494
  function Ia(h, T) {
2495
2495
  return h !== "translate" || !T.resolvedMessage;
2496
2496
  }
2497
- const Ae = (h, T, H, z, He, Ht) => {
2497
+ const Ae = (h, T, H, z, $e, Ht) => {
2498
2498
  M();
2499
2499
  let Ze;
2500
2500
  try {
@@ -2504,20 +2504,20 @@ function pn(e = {}) {
2504
2504
  }
2505
2505
  if (H !== "translate exists" && // for not `te` (e.g `t`)
2506
2506
  ee(Ze) && Ze === ra || H === "translate exists" && !Ze) {
2507
- const [We, mr] = T();
2508
- if (process.env.NODE_ENV !== "production" && t && A(We) && Ia(H, mr) && (R && (oa(y, We) || ws(p, We)) && Le(ct(_e.FALLBACK_TO_ROOT, {
2509
- key: We,
2507
+ const [He, mr] = T();
2508
+ if (process.env.NODE_ENV !== "production" && t && A(He) && Ia(H, mr) && (R && (oa(y, He) || ws(p, He)) && Le(ct(_e.FALLBACK_TO_ROOT, {
2509
+ key: He,
2510
2510
  type: H
2511
2511
  })), process.env.NODE_ENV !== "production")) {
2512
2512
  const { __v_emitter: Nn } = v;
2513
2513
  Nn && R && Nn.emit("fallback", {
2514
2514
  type: H,
2515
- key: We,
2515
+ key: He,
2516
2516
  to: "global",
2517
- groupId: `${H}:${We}`
2517
+ groupId: `${H}:${He}`
2518
2518
  });
2519
2519
  }
2520
- return t && R ? z(t) : He(We);
2520
+ return t && R ? z(t) : $e(He);
2521
2521
  } else {
2522
2522
  if (Ht(Ze))
2523
2523
  return Ze;
@@ -2572,15 +2572,15 @@ function pn(e = {}) {
2572
2572
  return Ae(() => {
2573
2573
  if (!h)
2574
2574
  return !1;
2575
- const H = A(T) ? T : l.value, z = $e(H), He = v.messageResolver(z, h);
2576
- return he(He) || pe(He) || A(He);
2575
+ const H = A(T) ? T : l.value, z = Ve(H), $e = v.messageResolver(z, h);
2576
+ return he($e) || pe($e) || A($e);
2577
2577
  }, () => [h], "translate exists", (H) => Reflect.apply(H.te, H, [h, T]), xl, (H) => U(H));
2578
2578
  }
2579
2579
  function gt(h) {
2580
2580
  let T = null;
2581
2581
  const H = Ts(v, i.value, l.value);
2582
2582
  for (let z = 0; z < H.length; z++) {
2583
- const He = c.value[H[z]] || {}, Ht = v.messageResolver(He, h);
2583
+ const $e = c.value[H[z]] || {}, Ht = v.messageResolver($e, h);
2584
2584
  if (Ht != null) {
2585
2585
  T = Ht;
2586
2586
  break;
@@ -2592,7 +2592,7 @@ function pn(e = {}) {
2592
2592
  const T = gt(h);
2593
2593
  return T ?? (t ? t.tm(h) || {} : {});
2594
2594
  }
2595
- function $e(h) {
2595
+ function Ve(h) {
2596
2596
  return c.value[h] || {};
2597
2597
  }
2598
2598
  function Et(h, T) {
@@ -2695,7 +2695,7 @@ function pn(e = {}) {
2695
2695
  E = h, v.escapeParameter = h;
2696
2696
  },
2697
2697
  t: _t,
2698
- getLocaleMessage: $e,
2698
+ getLocaleMessage: Ve,
2699
2699
  setLocaleMessage: Et,
2700
2700
  mergeLocaleMessage: Ra,
2701
2701
  getPostTranslationHandler: ha,
@@ -4065,7 +4065,7 @@ async function qs(e) {
4065
4065
  let s = t;
4066
4066
  a && Object.keys(a).length > 0 && (s = Rt(s, a)), n && Object.keys(n).length > 0 && (s = Rt(s, n)), Js[e] = s, me.global.setLocaleMessage(e, s), Xs(e, s);
4067
4067
  }
4068
- async function vc(e = "/", t) {
4068
+ async function Ec(e = "/", t) {
4069
4069
  za = e;
4070
4070
  try {
4071
4071
  const n = await fetch(`${za}locales/languages.json`);
@@ -4076,14 +4076,14 @@ async function vc(e = "/", t) {
4076
4076
  const a = localStorage.getItem("language") || t || "zh-CN";
4077
4077
  me.global.locale.value = a, localStorage.setItem("language", a), await qs(a);
4078
4078
  }
4079
- async function bc(e) {
4079
+ async function vc(e) {
4080
4080
  await qs(e), me.global.locale.value = e, localStorage.setItem("language", e);
4081
4081
  }
4082
- function Ic(e = "code") {
4082
+ function bc(e = "code") {
4083
4083
  const t = me.global.locale.value;
4084
4084
  return e === "display" ? qt[t] : t;
4085
4085
  }
4086
- function yc() {
4086
+ function Ic() {
4087
4087
  return Object.keys(qt).map((e) => ({
4088
4088
  label: qt[e],
4089
4089
  key: e
@@ -4240,7 +4240,7 @@ const ia = {
4240
4240
  hideErrorToast: !0
4241
4241
  }
4242
4242
  };
4243
- function Nc() {
4243
+ function yc() {
4244
4244
  zs = P("webui.stores.userInfo.tokenParseFailed"), ia.logout.loadingText = P("webui.stores.userInfo.exiting"), Zs.host.loadingText = P("webui.stores.hostInfo.loading");
4245
4245
  }
4246
4246
  const Ft = {
@@ -4332,11 +4332,11 @@ const Ft = {
4332
4332
  return a.length === 0 && !n;
4333
4333
  if (t) {
4334
4334
  const o = ye();
4335
- if (Fe.VITE_PERMISSION_MODE === "none")
4335
+ if (Ce.VITE_PERMISSION_MODE === "none")
4336
4336
  return !0;
4337
- if (Fe.VITE_PERMISSION_MODE === "role")
4337
+ if (Ce.VITE_PERMISSION_MODE === "role")
4338
4338
  return a.length === 0 ? !0 : o.hasRole(a);
4339
- if (Fe.VITE_PERMISSION_MODE === "permit") {
4339
+ if (Ce.VITE_PERMISSION_MODE === "permit") {
4340
4340
  if (a.length === 0 && !n)
4341
4341
  return !0;
4342
4342
  let l = !1, i = !1;
@@ -4356,7 +4356,7 @@ ca.beforeEach((e, t, a) => {
4356
4356
  return a();
4357
4357
  const s = n.meta, o = ((s == null ? void 0 : s.roles) ?? []).length > 0 || ((l = s == null ? void 0 : s.permission) == null ? void 0 : l.length);
4358
4358
  if (e.path === "/") {
4359
- const i = Me();
4359
+ const i = Fe();
4360
4360
  if (!i.menuLoaded) {
4361
4361
  yt.value = {
4362
4362
  to: e,
@@ -4376,7 +4376,7 @@ ca.beforeEach((e, t, a) => {
4376
4376
  if (!i.isLogin)
4377
4377
  a({ path: cs });
4378
4378
  else {
4379
- if (!Me().menuLoaded) {
4379
+ if (!Fe().menuLoaded) {
4380
4380
  yt.value = {
4381
4381
  to: e,
4382
4382
  next: a
@@ -4413,7 +4413,7 @@ const Si = (e) => {
4413
4413
  */
4414
4414
  removeTabPane(e) {
4415
4415
  if (this.TabEnabled) {
4416
- Me().excludeComponent(e);
4416
+ Fe().excludeComponent(e);
4417
4417
  let a = 0, n = [...this.TabPanes];
4418
4418
  for (let s = 0; s < n.length; s++)
4419
4419
  if (n[s].key === e) {
@@ -4434,7 +4434,7 @@ const Si = (e) => {
4434
4434
  * @returns
4435
4435
  */
4436
4436
  async setTabActive(e) {
4437
- let a = Me().findRoute(e);
4437
+ let a = Fe().findRoute(e);
4438
4438
  if (!a) return;
4439
4439
  const n = {
4440
4440
  key: e,
@@ -4564,11 +4564,11 @@ const Nt = {
4564
4564
  }
4565
4565
  }, Ua = /* @__PURE__ */ new Map(), Ai = (e) => {
4566
4566
  const t = ye(), { roles: a, permission: n } = e.meta || {};
4567
- if (ve(a) && ve(n) || Fe.VITE_PERMISSION_MODE === "none")
4567
+ if (ve(a) && ve(n) || Ce.VITE_PERMISSION_MODE === "none")
4568
4568
  return !0;
4569
- if (Fe.VITE_PERMISSION_MODE === "role")
4569
+ if (Ce.VITE_PERMISSION_MODE === "role")
4570
4570
  return ve(a) ? !0 : t.hasRole(a);
4571
- if (Fe.VITE_PERMISSION_MODE === "permit") {
4571
+ if (Ce.VITE_PERMISSION_MODE === "permit") {
4572
4572
  let s = !1, r = !1;
4573
4573
  return ve(a) || (s = t.hasRole(a)), t.isAdmin() ? s : (ve(n) || (r = t.hasPermit(e.path, n)), s || r);
4574
4574
  }
@@ -4588,7 +4588,7 @@ const Nt = {
4588
4588
  return n;
4589
4589
  }
4590
4590
  }
4591
- }, Me = Dt("appInfo", {
4591
+ }, Fe = Dt("appInfo", {
4592
4592
  state: () => ({
4593
4593
  appInfo: {
4594
4594
  Id: "",
@@ -4666,9 +4666,9 @@ const Nt = {
4666
4666
  flattenRoutes: {},
4667
4667
  Routes: t ?? [],
4668
4668
  defaultPage: ""
4669
- }), !Ce() || !Dr())) {
4669
+ }), !We() || !Dr())) {
4670
4670
  const n = ye();
4671
- Fe.VITE_PERMISSION_MODE !== "none" && await n.getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes);
4671
+ Ce.VITE_PERMISSION_MODE !== "none" && await n.getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes);
4672
4672
  }
4673
4673
  },
4674
4674
  /**
@@ -4691,7 +4691,7 @@ const Nt = {
4691
4691
  }), ye().isLogin) {
4692
4692
  const a = tr(this.appInfo.Routes);
4693
4693
  if (yi(a), this.appInfo.defaultPage = ar(a) || "", this.appInfo.defaultPage) {
4694
- if (this.menuLoaded = !0, Ce()) {
4694
+ if (this.menuLoaded = !0, We()) {
4695
4695
  const n = this.formatRoute(this.appInfo.defaultPage);
4696
4696
  Nt.mainAppPush(n);
4697
4697
  }
@@ -4714,7 +4714,7 @@ const Nt = {
4714
4714
  */
4715
4715
  push(e) {
4716
4716
  this.findRoute(e) && hn().setTabActive(e), vr(() => {
4717
- if (ca.push({ path: e }), Ce()) {
4717
+ if (ca.push({ path: e }), We()) {
4718
4718
  const a = this.formatRoute(e);
4719
4719
  Nt.mainAppPush(a);
4720
4720
  }
@@ -4784,74 +4784,11 @@ const Nt = {
4784
4784
  }, this.CachedComponents.splice(0, this.CachedComponents.length), this.ExcludeComponents.splice(0, this.ExcludeComponents.length), this.appList.splice(0, this.appList.length), this.menuLoaded = !1;
4785
4785
  },
4786
4786
  logout() {
4787
- this.clean(), Ce() ? Nt.mainAppPush("/") : window.location.assign("/");
4788
- }
4789
- },
4790
- persist: !1
4791
- }), Pi = Dt("settingInfo", {
4792
- state: () => ({
4793
- fullscreen: !1,
4794
- menuCollapse: !1,
4795
- tableColumns: {},
4796
- userInfoPersist: !0,
4797
- showExit: !0,
4798
- showLanguage: !0
4799
- }),
4800
- actions: {
4801
- /**
4802
- * 设置全屏
4803
- */
4804
- setFullscreen(e) {
4805
- this.$patch({
4806
- fullscreen: e
4807
- });
4808
- },
4809
- /**
4810
- * 设置主菜单区折叠
4811
- */
4812
- setMenuCollapse(e) {
4813
- this.$patch({
4814
- menuCollapse: e
4815
- });
4816
- },
4817
- /**
4818
- * 获取表格头配置
4819
- */
4820
- getTableColumns(e) {
4821
- return this.tableColumns[e];
4822
- },
4823
- /**
4824
- * 设置表格头配置
4825
- */
4826
- setTableColumns(e, t) {
4827
- this.$patch({
4828
- tableColumns: {
4829
- ...this.tableColumns,
4830
- [e]: t
4831
- }
4832
- });
4833
- },
4834
- /**
4835
- * 设置用户信息是否持久化
4836
- */
4837
- setUserInfoPersist(e) {
4838
- this.userInfoPersist = e;
4839
- },
4840
- /**
4841
- * 设置是否显示退出按钮
4842
- */
4843
- setShowExit(e) {
4844
- this.showExit = e;
4845
- },
4846
- /**
4847
- * 设置是否显示语言选择
4848
- */
4849
- setShowLanguage(e) {
4850
- this.showLanguage = e;
4787
+ this.clean(), We() ? Nt.mainAppPush("/") : window.location.assign("/");
4851
4788
  }
4852
4789
  },
4853
4790
  persist: !1
4854
- }), ua = 1400, Ri = (e) => {
4791
+ }), ua = 1400, Pi = (e) => {
4855
4792
  let t = {
4856
4793
  Option: {
4857
4794
  Mode: "MicroApp"
@@ -4859,7 +4796,7 @@ const Nt = {
4859
4796
  Query: e
4860
4797
  };
4861
4798
  return qe(ia.login, t).then((a) => (a == null ? void 0 : a.status) === ie.SUCCESS ? a : null);
4862
- }, wi = (e) => {
4799
+ }, Ri = (e) => {
4863
4800
  let t = {
4864
4801
  Query: {
4865
4802
  AppId: e
@@ -4874,13 +4811,13 @@ const Nt = {
4874
4811
  }
4875
4812
  return se.error(P("webui.stores.userInfo.authInfoFailed") + "," + (a == null ? void 0 : a.msg)), null;
4876
4813
  });
4877
- }, ki = () => {
4814
+ }, wi = () => {
4878
4815
  let e = {
4879
4816
  Option: {},
4880
4817
  Query: {}
4881
4818
  };
4882
4819
  return qe(ia.logout, e).then((t) => (t == null ? void 0 : t.status) === ie.SUCCESS ? t.data : null);
4883
- }, Di = (e) => {
4820
+ }, ki = (e) => {
4884
4821
  try {
4885
4822
  const t = JSON.parse(atob(e.token.split(".")[1]));
4886
4823
  return t.user = JSON.parse(t.user), e.UserInfo = t.user, !0;
@@ -4905,7 +4842,7 @@ const Nt = {
4905
4842
  * 启动时初始化用户信息
4906
4843
  */
4907
4844
  init() {
4908
- Ce() || (this.token ? (Wt(this.token), de.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
4845
+ We() || (this.token ? (Wt(this.token), de.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
4909
4846
  },
4910
4847
  /**
4911
4848
  * 登录操作
@@ -4913,14 +4850,14 @@ const Nt = {
4913
4850
  * @returns
4914
4851
  */
4915
4852
  async login(e, t) {
4916
- const a = await Ri(e);
4853
+ const a = await Pi(e);
4917
4854
  if (a) {
4918
4855
  const n = a;
4919
4856
  if (n.errno)
4920
4857
  return n;
4921
4858
  {
4922
4859
  const s = a.data;
4923
- if (this.token = s.token, Wt(this.token), this.isLogin = !0, Di(s))
4860
+ if (this.token = s.token, Wt(this.token), this.isLogin = !0, ki(s))
4924
4861
  this.userInfo = {
4925
4862
  ...this.userInfo,
4926
4863
  ...s.UserInfo
@@ -4929,7 +4866,7 @@ const Nt = {
4929
4866
  se.error(P("webui.stores.userInfo.userInfoParseFailed"));
4930
4867
  return;
4931
4868
  }
4932
- t && Me().toDefaultApp();
4869
+ t && Fe().toDefaultApp();
4933
4870
  }
4934
4871
  }
4935
4872
  },
@@ -4941,10 +4878,10 @@ const Nt = {
4941
4878
  async getRolePermits(e) {
4942
4879
  if (!this.isLogin || !this.token)
4943
4880
  return !1;
4944
- if (Fe.VITE_PERMISSION_MODE === "none" || bt.value && bt.value.appId === e)
4881
+ if (Ce.VITE_PERMISSION_MODE === "none" || bt.value && bt.value.appId === e)
4945
4882
  return !0;
4946
4883
  try {
4947
- const t = await wi(e);
4884
+ const t = await Ri(e);
4948
4885
  return t ? (bt.value = {
4949
4886
  appId: e,
4950
4887
  permits: t.permits || [],
@@ -5028,7 +4965,7 @@ const Nt = {
5028
4965
  Code: "",
5029
4966
  TenantId: "",
5030
4967
  UserLevel: ""
5031
- }, this.token = "", Wt(this.token), this.isLogin = !1, bt.value = null, de.value = "", Me().clean(), Promise.resolve();
4968
+ }, this.token = "", Wt(this.token), this.isLogin = !1, bt.value = null, de.value = "", Fe().clean(), Promise.resolve();
5032
4969
  },
5033
4970
  /**
5034
4971
  * 登出操作
@@ -5036,30 +4973,23 @@ const Nt = {
5036
4973
  * @returns
5037
4974
  */
5038
4975
  async logout(e) {
5039
- if (Ce())
4976
+ if (We())
5040
4977
  return Nt.userLogout(), Promise.resolve();
5041
4978
  try {
5042
- e && await ki();
4979
+ e && await wi();
5043
4980
  } catch (t) {
5044
4981
  console.error("调用登出接口失败", t);
5045
4982
  } finally {
5046
4983
  await this.clean(), e && setTimeout(async () => {
5047
4984
  se.success(P("webui.stores.userInfo.logoutSuccess"));
5048
4985
  }, 1e3), setTimeout(async () => {
5049
- Me().logout();
4986
+ Fe().logout();
5050
4987
  }, 2e3);
5051
4988
  }
5052
4989
  return Promise.resolve();
5053
4990
  }
5054
4991
  },
5055
- persist: !Ce() && Pi().userInfoPersist ? {
5056
- key: "MICROAPP_USER_INFO",
5057
- storage: localStorage,
5058
- pick: ["token", "userInfo"],
5059
- afterHydrate: (e) => {
5060
- e.store.init();
5061
- }
5062
- } : !1
4992
+ persist: !1
5063
4993
  }), fa = (e, t) => {
5064
4994
  var s;
5065
4995
  const a = e.page;
@@ -5086,7 +5016,7 @@ const Nt = {
5086
5016
  t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
5087
5017
  const a = fa(e, t);
5088
5018
  return t.url = a, da(e, t);
5089
- }, Sc = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || P("webui.utils.data.startExecute"), t.url = fa(e, t), da(e, t).then((a) => ((a == null ? void 0 : a.status) === ie.SUCCESS && (t.hideErrorToast || se.success(P("webui.utils.data.executeSuccess"))), a))), nr = (e, t = {}) => {
5019
+ }, Nc = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || P("webui.utils.data.startExecute"), t.url = fa(e, t), da(e, t).then((a) => ((a == null ? void 0 : a.status) === ie.SUCCESS && (t.hideErrorToast || se.success(P("webui.utils.data.executeSuccess"))), a))), nr = (e, t = {}) => {
5090
5020
  const a = t.primaryKey || "Id";
5091
5021
  if (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), !t.params.Data)
5092
5022
  return se.error(P("webui.utils.data.noSaveData")), Promise.resolve(null);
@@ -5098,7 +5028,7 @@ const Nt = {
5098
5028
  n.params.Query[a] = n.params.Data[a];
5099
5029
  const s = fa(e, n);
5100
5030
  return n.url = s, da(e, n).then((r) => ((r == null ? void 0 : r.status) === ie.SUCCESS && (t.hideErrorToast || se.success(P("webui.utils.data.saveSuccess"))), r));
5101
- }, Ci = (e, t, a = {}) => {
5031
+ }, Di = (e, t, a = {}) => {
5102
5032
  const n = a.primaryKey || "Id";
5103
5033
  a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
5104
5034
  const s = {
@@ -5110,22 +5040,85 @@ const Nt = {
5110
5040
  return se.error(P("webui.utils.data.forbidDeleteWithoutCondition")), Promise.resolve(null);
5111
5041
  const r = fa(e, s);
5112
5042
  return s.url = r, da(e, s).then((o) => ((o == null ? void 0 : o.status) === ie.SUCCESS && (a.hideErrorToast || se.success(P("webui.utils.data.deleteSuccess"))), o));
5113
- }, Fi = (e, t) => En(e, {
5043
+ }, Ci = (e, t) => En(e, {
5114
5044
  urlKey: "tree",
5115
5045
  params: {},
5116
5046
  loadingState: e.isTreeLoading,
5117
5047
  loadingText: !1,
5118
5048
  processParams: () => Ct(e.treeQuery, t)
5119
- }).then((a) => (a == null ? void 0 : a.status) === ie.SUCCESS ? (e.data.value = a.data || [], e.afterLoad && e.afterLoad(e.data.value), e.data.value) : (e.afterLoad && e.afterLoad((a == null ? void 0 : a.data) || []), [])), Mi = (e, t) => {
5049
+ }).then((a) => (a == null ? void 0 : a.status) === ie.SUCCESS ? (e.data.value = a.data || [], e.afterLoad && e.afterLoad(e.data.value), e.data.value) : (e.afterLoad && e.afterLoad((a == null ? void 0 : a.data) || []), [])), Fi = (e, t) => {
5120
5050
  for (const a of e) {
5121
5051
  if (a.key === t) return a;
5122
5052
  if (a.children) {
5123
- const n = Mi(a.children, t);
5053
+ const n = Fi(a.children, t);
5124
5054
  if (n) return n;
5125
5055
  }
5126
5056
  }
5127
5057
  return null;
5128
- };
5058
+ }, Sc = Dt("settingInfo", {
5059
+ state: () => ({
5060
+ fullscreen: !1,
5061
+ menuCollapse: !1,
5062
+ tableColumns: {},
5063
+ userInfoPersist: !0,
5064
+ showExit: !0,
5065
+ showLanguage: !0
5066
+ }),
5067
+ actions: {
5068
+ /**
5069
+ * 设置全屏
5070
+ */
5071
+ setFullscreen(e) {
5072
+ this.$patch({
5073
+ fullscreen: e
5074
+ });
5075
+ },
5076
+ /**
5077
+ * 设置主菜单区折叠
5078
+ */
5079
+ setMenuCollapse(e) {
5080
+ this.$patch({
5081
+ menuCollapse: e
5082
+ });
5083
+ },
5084
+ /**
5085
+ * 获取表格头配置
5086
+ */
5087
+ getTableColumns(e) {
5088
+ return this.tableColumns[e];
5089
+ },
5090
+ /**
5091
+ * 设置表格头配置
5092
+ */
5093
+ setTableColumns(e, t) {
5094
+ this.$patch({
5095
+ tableColumns: {
5096
+ ...this.tableColumns,
5097
+ [e]: t
5098
+ }
5099
+ });
5100
+ },
5101
+ /**
5102
+ * 设置用户信息是否持久化
5103
+ */
5104
+ setUserInfoPersist(e) {
5105
+ this.userInfoPersist = e;
5106
+ },
5107
+ /**
5108
+ * 设置是否显示退出按钮
5109
+ */
5110
+ setShowExit(e) {
5111
+ this.showExit = e;
5112
+ },
5113
+ /**
5114
+ * 设置是否显示语言选择
5115
+ */
5116
+ setShowLanguage(e) {
5117
+ this.showLanguage = e;
5118
+ }
5119
+ },
5120
+ persist: !1
5121
+ });
5129
5122
  let ut;
5130
5123
  const Tc = (e) => {
5131
5124
  ut = new aa({}), ut.messages({
@@ -5226,7 +5219,7 @@ const Tc = (e) => {
5226
5219
  ruleKey: a,
5227
5220
  errInfo: n
5228
5221
  };
5229
- }, xi = (e, t) => {
5222
+ }, Mi = (e, t) => {
5230
5223
  let a = w({
5231
5224
  msg: "",
5232
5225
  errClass: ""
@@ -5238,7 +5231,7 @@ const Tc = (e) => {
5238
5231
  () => n == null ? void 0 : n.value,
5239
5232
  (s) => {
5240
5233
  if (a.value.errClass = "", a.value.msg = "", !ve(s)) {
5241
- const r = Ui(
5234
+ const r = xi(
5242
5235
  {
5243
5236
  label: e.label,
5244
5237
  rule: e.rule
@@ -5251,7 +5244,7 @@ const Tc = (e) => {
5251
5244
  },
5252
5245
  { deep: !0 }
5253
5246
  ), a;
5254
- }, Ui = (e, t, a) => {
5247
+ }, xi = (e, t, a) => {
5255
5248
  const n = w([]), s = w(""), r = w("");
5256
5249
  if (!e.rule || !t || !a)
5257
5250
  return { msg: s, ruleErrors: n, errClass: r };
@@ -5280,16 +5273,16 @@ const Tc = (e) => {
5280
5273
  }), n.value.length > 0 && (r.value = "error"), { msg: s, ruleErrors: n, errClass: r };
5281
5274
  }, Pc = (e, t) => {
5282
5275
  ka(Re.LabelText, e.label || ""), ka(Re.RuleKey, e.rule || "");
5283
- const a = xi(e, t);
5276
+ const a = Mi(e, t);
5284
5277
  return ka(Re.ErrInfo, a), a;
5285
- }, Vi = (e, t) => {
5278
+ }, Ui = (e, t) => {
5286
5279
  if (!t)
5287
5280
  return;
5288
5281
  const [a, ...n] = e;
5289
5282
  if (e.length === 1)
5290
5283
  return t[a];
5291
5284
  if (t[a])
5292
- return Vi(n, t[a].fields);
5285
+ return Ui(n, t[a].fields);
5293
5286
  }, Rc = (e) => {
5294
5287
  sr(e);
5295
5288
  }, wc = (e) => {
@@ -5385,7 +5378,7 @@ const Tc = (e) => {
5385
5378
  return s ? { ...n, ...s } : !1;
5386
5379
  });
5387
5380
  return [...a || [], ...e.filter((n) => !(a != null && a.includes(n)))];
5388
- }, $i = (e) => or(e).then((t) => t.rows), or = (e) => {
5381
+ }, Vi = (e) => or(e).then((t) => t.rows), or = (e) => {
5389
5382
  var a, n, s, r;
5390
5383
  e.gridQuery || (e.gridQuery = {});
5391
5384
  const t = e.remotePage ? "find" : "list";
@@ -5419,7 +5412,7 @@ const Tc = (e) => {
5419
5412
  rows: []
5420
5413
  };
5421
5414
  });
5422
- }, Hi = (e, t, a = {}) => nr(e, {
5415
+ }, $i = (e, t, a = {}) => nr(e, {
5423
5416
  urlKey: "update",
5424
5417
  url: e.updateUrl,
5425
5418
  params: {
@@ -5432,7 +5425,7 @@ const Tc = (e) => {
5432
5425
  e.reload.value = !0, e.afterUpdate && e.afterUpdate(t);
5433
5426
  }, 50), n)), xc = (e, t) => {
5434
5427
  const a = {};
5435
- return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], Hi(e, a, {
5428
+ return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], $i(e, a, {
5436
5429
  loadingText: !1,
5437
5430
  hideErrorToast: !0
5438
5431
  });
@@ -5447,14 +5440,14 @@ const Tc = (e) => {
5447
5440
  }, Vc = (e, t) => {
5448
5441
  let a = e.editor;
5449
5442
  e.rowData.value = t, a && (rr(a, t), a.visible.value = !0);
5450
- }, $c = (e, t) => Ci(e, t, {
5443
+ }, $c = (e, t) => Di(e, t, {
5451
5444
  url: e.deleteUrl,
5452
5445
  primaryKey: e.primaryKey
5453
5446
  }).then((a) => ((a == null ? void 0 : a.status) === ie.SUCCESS && setTimeout(() => {
5454
5447
  e.reload.value = !0, e.afterDelete && !Array.isArray(t) && e.afterDelete(t);
5455
5448
  }, 50), a));
5456
5449
  var tn = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(tn || {});
5457
- class Wi {
5450
+ class Hi {
5458
5451
  constructor() {
5459
5452
  ne(this, "listeners", {});
5460
5453
  }
@@ -5500,11 +5493,11 @@ class Wi {
5500
5493
  this.listeners[t] && this.listeners[t].forEach((n) => n(t, ...a));
5501
5494
  }
5502
5495
  }
5503
- const st = new Wi(), pt = (e, t, a) => {
5496
+ const st = new Hi(), pt = (e, t, a) => {
5504
5497
  if (t.inputFactory && (a != null && a.reloadEvent)) {
5505
5498
  const n = t.inputFactory.value;
5506
5499
  n.reloadHandler = (s, r) => {
5507
- Gi(t.url, t, r);
5500
+ Wi(t.url, t, r);
5508
5501
  }, st.on(a.reloadEvent, n.reloadHandler);
5509
5502
  }
5510
5503
  if (a != null && a.data)
@@ -5534,17 +5527,17 @@ const st = new Wi(), pt = (e, t, a) => {
5534
5527
  label: P("webui.components.form.radio.all"),
5535
5528
  value: e.allValue ?? void 0
5536
5529
  }), e.options.value = t;
5537
- }, Gi = (e, t, a) => {
5530
+ }, Wi = (e, t, a) => {
5538
5531
  Array.isArray(a) ? In(t, a, !0) : ir(e, t, a);
5539
5532
  }, xt = (e, t) => {
5540
5533
  var a;
5541
5534
  (a = e.inputFactory) != null && a.value && t.reloadEvent && e.inputFactory.value.reloadHandler && st.off(t.reloadEvent, e.inputFactory.value.reloadHandler);
5542
5535
  }, ir = (e, t, a) => {
5543
5536
  const n = JSON.parse(JSON.stringify(e.params ?? {})), s = JSON.parse(JSON.stringify(t.params ?? {})), r = Ct(n, s, a);
5544
- Ki(e, t, t.fieldMap, r).then((o) => {
5537
+ Gi(e, t, t.fieldMap, r).then((o) => {
5545
5538
  In(t, o, !1);
5546
5539
  });
5547
- }, Ki = (e, t, a, n) => {
5540
+ }, Gi = (e, t, a, n) => {
5548
5541
  const { fieldMap: s, ...r } = e, l = {
5549
5542
  ...{
5550
5543
  url: "",
@@ -5568,7 +5561,7 @@ const st = new Wi(), pt = (e, t, a) => {
5568
5561
  }).finally(() => {
5569
5562
  t.isOptionLoading.value = !1;
5570
5563
  });
5571
- }, Yi = (e, t, a) => {
5564
+ }, Ki = (e, t, a) => {
5572
5565
  if (e === void 0) return;
5573
5566
  const n = (r) => {
5574
5567
  const o = { ...r };
@@ -5629,7 +5622,7 @@ const st = new Wi(), pt = (e, t, a) => {
5629
5622
  var r, o;
5630
5623
  const n = (r = e.inputFactory) == null ? void 0 : r.value;
5631
5624
  n != null && n.editorCtrl && ((o = n.errInfo) != null && o.value.errClass) && Mt(n.editorCtrl), e.selected.value = a;
5632
- const s = Yi(a, e.options.value);
5625
+ const s = Ki(a, e.options.value);
5633
5626
  if (e.selectedOptions.value = s, t.formData && t.outFields && cr(t.formData, t.outFields, s), t.changeEvent) {
5634
5627
  const [l, i] = t.changeEvent;
5635
5628
  if (i)
@@ -5713,7 +5706,7 @@ const st = new Wi(), pt = (e, t, a) => {
5713
5706
  }, _a = (e) => {
5714
5707
  for (let t in e.urls)
5715
5708
  e.urls[t].api || (e.urls[t].api = e.api), e.urls[t].authorize === void 0 && (e.urls[t].authorize = e.authorize);
5716
- }, Bi = (e, t, a, n) => (_a(e), {
5709
+ }, Yi = (e, t, a, n) => (_a(e), {
5717
5710
  editorCtrl: {
5718
5711
  ...Z.EditorOption,
5719
5712
  name: "",
@@ -5729,7 +5722,7 @@ const st = new Wi(), pt = (e, t, a) => {
5729
5722
  isFormSaving: w(!1),
5730
5723
  isFormLoading: w(!1)
5731
5724
  }
5732
- }), ji = (e, t, a) => {
5725
+ }), Bi = (e, t, a) => {
5733
5726
  _a(e);
5734
5727
  const n = {
5735
5728
  ...Z.GridOption,
@@ -5763,7 +5756,7 @@ const st = new Wi(), pt = (e, t, a) => {
5763
5756
  (s) => {
5764
5757
  s && (setTimeout(() => {
5765
5758
  n.reload.value = !1;
5766
- }, 1), n.remotePage ? or(n) : $i(n));
5759
+ }, 1), n.remotePage ? or(n) : Vi(n));
5767
5760
  }
5768
5761
  ), {
5769
5762
  gridCtrl: n
@@ -5784,7 +5777,7 @@ const st = new Wi(), pt = (e, t, a) => {
5784
5777
  (n) => {
5785
5778
  n && (setTimeout(() => {
5786
5779
  a.reload.value = !1;
5787
- }, 1), Fi(a));
5780
+ }, 1), Ci(a));
5788
5781
  }
5789
5782
  ), {
5790
5783
  treeCtrl: a
@@ -5816,19 +5809,19 @@ const st = new Wi(), pt = (e, t, a) => {
5816
5809
  const n = {
5817
5810
  ...Z.PageOption,
5818
5811
  ...e
5819
- }, { editorCtrl: s } = Bi(e, n, t, a), { gridCtrl: r } = ji(e, n);
5812
+ }, { editorCtrl: s } = Yi(e, n, t, a), { gridCtrl: r } = Bi(e, n);
5820
5813
  return n.editor = s, n.grid = r, r.editor = s, r.tools = ["Reload", "RowHeight", "TableHeadset", "Fullscreen"], s.grid = r, {
5821
5814
  pageCtrl: n,
5822
5815
  editorCtrl: s,
5823
5816
  gridCtrl: r
5824
5817
  };
5825
- }, Ji = 10080 * 60 * 1e3, Va = /* @__PURE__ */ new Map(), us = /* @__PURE__ */ new Set(), Ke = w({}), Kc = Ke, Yc = (e) => {
5818
+ }, ji = 10080 * 60 * 1e3, Va = /* @__PURE__ */ new Map(), us = /* @__PURE__ */ new Set(), Ke = w({}), Kc = Ke, Yc = (e) => {
5826
5819
  var s;
5827
5820
  if (!e.iconUrl) return an;
5828
5821
  const t = w(!0), a = w("");
5829
5822
  let n = !0;
5830
- return (s = e.icons) != null && s.length && (n = e.icons.every((r) => Ke.value[r] !== void 0)), (e.icon && !Ke.value[e.icon] || !n) && Qi(e, t).then(() => {
5831
- zi(e.iconUrl, e.monoColor || !1), t.value = !0;
5823
+ return (s = e.icons) != null && s.length && (n = e.icons.every((r) => Ke.value[r] !== void 0)), (e.icon && !Ke.value[e.icon] || !n) && Ji(e, t).then(() => {
5824
+ qi(e.iconUrl, e.monoColor || !1), t.value = !0;
5832
5825
  }), De({
5833
5826
  props: {
5834
5827
  icon: {
@@ -5896,12 +5889,12 @@ const st = new Wi(), pt = (e, t, a) => {
5896
5889
  style: {
5897
5890
  fill: "currentColor",
5898
5891
  cursor: this.$props.clickable ? "pointer" : "default",
5899
- transform: ec(this.angle, this.flip)
5892
+ transform: Zi(this.angle, this.flip)
5900
5893
  }
5901
5894
  }) : Ie("div", { class: "w-[14px] h-[14px]" });
5902
5895
  }
5903
5896
  });
5904
- }, Qi = (e, t) => {
5897
+ }, Ji = (e, t) => {
5905
5898
  let a = e.iconUrl;
5906
5899
  if (!a)
5907
5900
  return console.error("图标库地址不能为空"), Promise.resolve();
@@ -5912,10 +5905,10 @@ const st = new Wi(), pt = (e, t, a) => {
5912
5905
  return new Promise(async (r) => (ur(n.scriptContent), r()));
5913
5906
  t.value = !1;
5914
5907
  const s = new Promise(async (r) => {
5915
- await Xi(a, e.monoColor || !1), r(), Va.delete(a);
5908
+ await Qi(a, e.monoColor || !1), r(), Va.delete(a);
5916
5909
  });
5917
5910
  return Va.set(a, s), s;
5918
- }, Xi = async (e, t) => {
5911
+ }, Qi = async (e, t) => {
5919
5912
  try {
5920
5913
  const a = await fetch(e);
5921
5914
  if (!a.ok) {
@@ -5928,7 +5921,7 @@ const st = new Wi(), pt = (e, t, a) => {
5928
5921
  const r = n.match(s);
5929
5922
  if (r && r.length > 1) {
5930
5923
  let o = r[1];
5931
- qi(e, o, t, n);
5924
+ Xi(e, o, t, n);
5932
5925
  }
5933
5926
  ur(n);
5934
5927
  return;
@@ -5938,13 +5931,13 @@ const st = new Wi(), pt = (e, t, a) => {
5938
5931
  }, ur = (e) => {
5939
5932
  const t = document.createElement("script");
5940
5933
  t.textContent = e, document.head.appendChild(t);
5941
- }, qi = (e, t, a, n) => {
5934
+ }, Xi = (e, t, a, n) => {
5942
5935
  let s = `icon_cache:${e}`;
5943
5936
  const r = {
5944
5937
  windowKey: t,
5945
5938
  monoColor: a,
5946
5939
  scriptContent: n,
5947
- expireTime: Date.now() + Ji
5940
+ expireTime: Date.now() + ji
5948
5941
  // 缓存时间:7天
5949
5942
  };
5950
5943
  localStorage.setItem(s, JSON.stringify(r));
@@ -5990,12 +5983,12 @@ const st = new Wi(), pt = (e, t, a) => {
5990
5983
  fill: "currentColor"
5991
5984
  })
5992
5985
  ]
5993
- ), zi = (e, t) => {
5986
+ ), qi = (e, t) => {
5994
5987
  const a = fr(e);
5995
5988
  Object.keys(window).forEach((n) => {
5996
- n.startsWith("_iconfont_svg_string_") && (a == null ? void 0 : a.windowKey) === n && !us.has(n) && (us.add(n), Zi(n, t));
5989
+ n.startsWith("_iconfont_svg_string_") && (a == null ? void 0 : a.windowKey) === n && !us.has(n) && (us.add(n), zi(n, t));
5997
5990
  });
5998
- }, Zi = (e, t) => {
5991
+ }, zi = (e, t) => {
5999
5992
  const a = window[e], r = new DOMParser().parseFromString(a, "image/svg+xml").getElementsByTagName("symbol"), o = document.querySelectorAll("symbol");
6000
5993
  for (const l of r) {
6001
5994
  const i = l.id, c = Array.from(o).find((m) => m.id === i);
@@ -6003,7 +5996,7 @@ const st = new Wi(), pt = (e, t, a) => {
6003
5996
  m.hasAttribute("fill") && m.removeAttribute("fill");
6004
5997
  })), Ke.value[i] || (Ke.value[i] = Ie("svg", { fill: "currentColor" }, [Ie("use", { "xlink:href": `#${i}` })]));
6005
5998
  }
6006
- }, ec = (e, t) => {
5999
+ }, Zi = (e, t) => {
6007
6000
  let a = "";
6008
6001
  return e && (a += `rotate(${e}deg)`), t && (a += " scaleX(-1)"), a;
6009
6002
  }, jc = (e, t, a, n) => {
@@ -6029,7 +6022,7 @@ const st = new Wi(), pt = (e, t, a) => {
6029
6022
  return s;
6030
6023
  }, fs = br([]), Jc = () => {
6031
6024
  fs.length = 0;
6032
- const e = Me();
6025
+ const e = Fe();
6033
6026
  let a = hn().TabActive;
6034
6027
  e.matchedRoutes(a).forEach((s, r) => {
6035
6028
  var l;
@@ -6064,7 +6057,7 @@ const st = new Wi(), pt = (e, t, a) => {
6064
6057
  * @param hostKey 站点信息,默认为当前主域名
6065
6058
  */
6066
6059
  async loadHostInfo(e, t) {
6067
- if (Ce()) {
6060
+ if (We()) {
6068
6061
  const n = await Nt.getHostInfo();
6069
6062
  this._setHostInfo(n);
6070
6063
  return;
@@ -6273,10 +6266,10 @@ const st = new Wi(), pt = (e, t, a) => {
6273
6266
  onSearch: y,
6274
6267
  onSelect: R
6275
6268
  }, X(n), { "allow-clear": !1 }), {
6276
- option: xe(({ label: _ }) => [
6269
+ option: Me(({ label: _ }) => [
6277
6270
  ta(je(_), 1)
6278
6271
  ]),
6279
- default: xe(() => [
6272
+ default: Me(() => [
6280
6273
  Be(X(Sr), {
6281
6274
  "allow-clear": "",
6282
6275
  placeholder: "请输入并选择" + X(m)
@@ -6287,7 +6280,7 @@ const st = new Wi(), pt = (e, t, a) => {
6287
6280
  ]);
6288
6281
  };
6289
6282
  }
6290
- }), tc = { class: "min-h-[32px] pt-[5px]" }, ac = {
6283
+ }), ec = { class: "min-h-[32px] pt-[5px]" }, tc = {
6291
6284
  key: 1,
6292
6285
  class: "text-center text-gray-500"
6293
6286
  }, zc = /* @__PURE__ */ De({
@@ -6345,12 +6338,12 @@ const st = new Wi(), pt = (e, t, a) => {
6345
6338
  }), o && pt(o.autoload, o, a);
6346
6339
  }), dt(() => {
6347
6340
  o && xt(o, a);
6348
- }), (S, O) => (le(), ge("div", tc, [
6341
+ }), (S, O) => (le(), ge("div", ec, [
6349
6342
  Be(X(Tr), kt({
6350
6343
  onChange: g,
6351
6344
  class: "w-full mb-[-3px]"
6352
6345
  }, X(n)), {
6353
- default: xe(() => [
6346
+ default: Me(() => [
6354
6347
  m.value.length > 0 ? (le(!0), ge(Ye, { key: 0 }, nn(m.value, (d) => {
6355
6348
  var _;
6356
6349
  return le(), zt(X(Lr), {
@@ -6364,18 +6357,18 @@ const st = new Wi(), pt = (e, t, a) => {
6364
6357
  e.wrap ? `w-1/${a.wrap}` : ""
6365
6358
  ])
6366
6359
  }, {
6367
- default: xe(() => [
6360
+ default: Me(() => [
6368
6361
  ta(je(d.label), 1)
6369
6362
  ]),
6370
6363
  _: 2
6371
6364
  }, 1032, ["value", "disabled", "class"]);
6372
- }), 128)) : e.nodata ? (le(), ge("div", ac, je(e.nodata), 1)) : ot("", !0)
6365
+ }), 128)) : e.nodata ? (le(), ge("div", tc, je(e.nodata), 1)) : ot("", !0)
6373
6366
  ]),
6374
6367
  _: 1
6375
6368
  }, 16)
6376
6369
  ]));
6377
6370
  }
6378
- }), nc = { class: "min-h-[32px] pt-1" }, sc = {
6371
+ }), ac = { class: "min-h-[32px] pt-1" }, nc = {
6379
6372
  key: 1,
6380
6373
  class: "text-center text-gray-500"
6381
6374
  }, Zc = /* @__PURE__ */ De({
@@ -6447,7 +6440,7 @@ const st = new Wi(), pt = (e, t, a) => {
6447
6440
  }), o && pt(o.autoload, o, a);
6448
6441
  }), dt(() => {
6449
6442
  o && xt(o, a);
6450
- }), (d, _) => (le(), ge("div", nc, [
6443
+ }), (d, _) => (le(), ge("div", ac, [
6451
6444
  Be(X(Or), kt({
6452
6445
  value: i.value,
6453
6446
  "onUpdate:value": _[0] || (_[0] = (I) => i.value = I),
@@ -6455,7 +6448,7 @@ const st = new Wi(), pt = (e, t, a) => {
6455
6448
  onChange: y,
6456
6449
  class: "w-full flex align-items flex-wrap mb-[-3px]"
6457
6450
  }, X(n)), {
6458
- default: xe(() => [
6451
+ default: Me(() => [
6459
6452
  m.value.length > 0 ? (le(!0), ge(Ye, { key: 0 }, nn(m.value, (I) => {
6460
6453
  var E;
6461
6454
  return le(), ge(Ye, {
@@ -6472,19 +6465,19 @@ const st = new Wi(), pt = (e, t, a) => {
6472
6465
  e.wrap ? `w-1/${a.wrap}` : ""
6473
6466
  ])
6474
6467
  }, {
6475
- default: xe(() => [
6468
+ default: Me(() => [
6476
6469
  ta(je(I.label), 1)
6477
6470
  ]),
6478
6471
  _: 2
6479
6472
  }, 1032, ["checked", "value", "class"])) : ot("", !0)
6480
6473
  ], 64);
6481
- }), 128)) : e.nodata ? (le(), ge("div", sc, je(e.nodata), 1)) : ot("", !0)
6474
+ }), 128)) : e.nodata ? (le(), ge("div", nc, je(e.nodata), 1)) : ot("", !0)
6482
6475
  ]),
6483
6476
  _: 1
6484
6477
  }, 16, ["value"])
6485
6478
  ]));
6486
6479
  }
6487
- }), rc = {
6480
+ }), sc = {
6488
6481
  key: 0,
6489
6482
  class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
6490
6483
  }, eu = /* @__PURE__ */ De({
@@ -6603,7 +6596,7 @@ const st = new Wi(), pt = (e, t, a) => {
6603
6596
  }), (b, L) => {
6604
6597
  var v, C, M;
6605
6598
  return le(), ge("div", null, [
6606
- (C = (v = X(c)) == null ? void 0 : v.url) != null && C.loading ? (le(), ge("div", rc, [
6599
+ (C = (v = X(c)) == null ? void 0 : v.url) != null && C.loading ? (le(), ge("div", sc, [
6607
6600
  Be(X(an), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
6608
6601
  Ir("span", null, je(X(P)("webui.components.form.upload.dataLoading")), 1)
6609
6602
  ])) : ot("", !0),
@@ -6616,7 +6609,7 @@ const st = new Wi(), pt = (e, t, a) => {
6616
6609
  placeholder: p.value,
6617
6610
  "label-in-value": !1
6618
6611
  }, X(m)), {
6619
- default: xe(() => [
6612
+ default: Me(() => [
6620
6613
  (le(!0), ge(Ye, null, nn(O.value, (K) => (le(), ge(Ye, {
6621
6614
  key: K.value
6622
6615
  }, [
@@ -6624,7 +6617,7 @@ const st = new Wi(), pt = (e, t, a) => {
6624
6617
  key: 0,
6625
6618
  value: K.value
6626
6619
  }, {
6627
- default: xe(() => [
6620
+ default: Me(() => [
6628
6621
  ta(je(K.label), 1)
6629
6622
  ]),
6630
6623
  _: 2
@@ -6636,13 +6629,13 @@ const st = new Wi(), pt = (e, t, a) => {
6636
6629
  ]);
6637
6630
  };
6638
6631
  }
6639
- }), oc = w(!1), tu = {
6632
+ }), rc = w(!1), tu = {
6640
6633
  label: P("webui.utils.tools.templateManagement"),
6641
6634
  key: "uploadTemp",
6642
6635
  type: "primary",
6643
6636
  icon: "icon-download",
6644
6637
  click: () => {
6645
- oc.value = !0;
6638
+ rc.value = !0;
6646
6639
  }
6647
6640
  };
6648
6641
  export {
@@ -6656,25 +6649,25 @@ export {
6656
6649
  eu as G,
6657
6650
  En as H,
6658
6651
  xr as I,
6659
- Nc as J,
6652
+ yc as J,
6660
6653
  Hc as K,
6661
6654
  ua as L,
6662
6655
  Nt as M,
6663
- Bi as N,
6656
+ Yi as N,
6664
6657
  en as O,
6665
6658
  Re as P,
6666
- ji as Q,
6659
+ Bi as Q,
6667
6660
  Wc as R,
6668
6661
  Gc as S,
6669
- Yi as T,
6662
+ Ki as T,
6670
6663
  cr as U,
6671
6664
  Kc as V,
6672
6665
  Bc as W,
6673
- Zi as X,
6674
- ec as Y,
6666
+ zi as X,
6667
+ Zi as Y,
6675
6668
  jc as Z,
6676
6669
  Xc as _,
6677
- Pi as a,
6670
+ Sc as a,
6678
6671
  fs as a0,
6679
6672
  Jc as a1,
6680
6673
  sr as a2,
@@ -6686,43 +6679,43 @@ export {
6686
6679
  Lc as a8,
6687
6680
  Oc as a9,
6688
6681
  Mc as aa,
6689
- Hi as ab,
6682
+ $i as ab,
6690
6683
  lr as ac,
6691
6684
  Uc as ad,
6692
- Sc as ae,
6685
+ Nc as ae,
6693
6686
  nr as af,
6694
- Ci as ag,
6687
+ Di as ag,
6695
6688
  tn as ah,
6696
6689
  st as ai,
6697
6690
  yt as aj,
6698
6691
  Jt as ak,
6699
- Me as al,
6692
+ Fe as al,
6700
6693
  Qc as am,
6701
6694
  hn as an,
6702
- oc as ao,
6695
+ rc as ao,
6703
6696
  tu as ap,
6704
6697
  me as aq,
6705
- vc as ar,
6706
- yc as as,
6707
- Ic as at,
6708
- bc as au,
6698
+ Ec as ar,
6699
+ Ic as as,
6700
+ bc as at,
6701
+ vc as au,
6709
6702
  ut as av,
6710
6703
  wc as b,
6711
6704
  Yc as c,
6712
6705
  kc as d,
6713
6706
  Pc as e,
6714
6707
  Vc as f,
6715
- Vi as g,
6708
+ Ui as g,
6716
6709
  $c as h,
6717
6710
  ve as i,
6718
6711
  Fc as j,
6719
6712
  Cc as k,
6720
6713
  or as l,
6721
- $i as m,
6714
+ Vi as m,
6722
6715
  xc as n,
6723
6716
  Rc as o,
6724
- Mi as p,
6725
- Fi as q,
6717
+ Fi as p,
6718
+ Ci as q,
6726
6719
  ca as r,
6727
6720
  qc as s,
6728
6721
  Ft as t,