x-essential-lib 0.4.2 → 0.4.4

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.
@@ -1 +1 @@
1
- export declare function useHotkey(prod: boolean): {};
1
+ export declare function useHotkey(): {};
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.id="x-essential-lib",t.appendChild(document.createTextNode('.inner-left-enter-active,.inner-right-enter-active{transition:transform .35s ease}.inner-left-enter-from{transform:translate(-100%)}.inner-right-enter-from{transform:translate(100%)}.inner-left-enter-to,.inner-right-enter-to{transform:translate(0)}.x-cont[data-v-f4ad116e]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-f4ad116e]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-f4ad116e]{transform-origin:20px 20px;animation:lds-spinner-f4ad116e 1.2s linear infinite}.lds-spinner div[data-v-f4ad116e]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-f4ad116e]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-f4ad116e]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-f4ad116e]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-f4ad116e]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-f4ad116e]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-f4ad116e]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-f4ad116e]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-f4ad116e]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-f4ad116e]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-f4ad116e]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-f4ad116e{0%{opacity:1}to{opacity:0}}.x-cont[data-v-70ed4b89]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- import { ref as i, watch as W, computed as f, onMounted as C, onBeforeUnmount as V, defineComponent as R, resolveComponent as v, openBlock as b, createBlock as O, unref as N, isRef as F, withKeys as U, withModifiers as M, withCtx as m, createVNode as y, createTextVNode as T, toDisplayString as D, createElementBlock as z, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as g, reactive as he, Fragment as we, renderList as ye, createCommentVNode as ke } from "vue";
3
- import { useTheme as H, useLocale as J, useDisplay as xe } from "vuetify";
4
- import { defineStore as le } from "pinia";
5
- import be from "axios";
6
- import { useRouter as oe, useRoute as Ce } from "vue-router";
7
- const X = le(
2
+ import { ref as f, watch as H, computed as i, onMounted as C, onBeforeUnmount as V, defineComponent as I, resolveComponent as v, openBlock as b, createBlock as j, unref as W, isRef as X, withKeys as z, withModifiers as B, withCtx as m, createVNode as y, createTextVNode as O, toDisplayString as q, createElementBlock as F, normalizeStyle as ve, pushScopeId as me, popScopeId as he, createElementVNode as g, reactive as we, Fragment as ye, renderList as xe, createCommentVNode as ke } from "vue";
3
+ import { useTheme as N, useLocale as G, useDisplay as be } from "vuetify";
4
+ import { defineStore as re } from "pinia";
5
+ import Ce from "axios";
6
+ import { useRouter as ne, useRoute as De } from "vue-router";
7
+ const Q = re(
8
8
  "global",
9
9
  () => {
10
- const e = H(), a = i();
11
- W(
10
+ const e = N(), a = f();
11
+ H(
12
12
  a,
13
13
  (n) => {
14
14
  e.global.name.value = n ? "dark" : "light";
@@ -17,7 +17,7 @@ const X = le(
17
17
  immediate: !0
18
18
  }
19
19
  );
20
- const t = i("en"), l = i({}), o = i("");
20
+ const t = f("en"), l = f({}), o = f("");
21
21
  return {
22
22
  dark: a,
23
23
  locale: t,
@@ -33,25 +33,25 @@ const X = le(
33
33
  }
34
34
  ]
35
35
  }
36
- ), re = le("viewMgr", () => {
37
- const e = i([]);
36
+ ), ce = re("viewMgr", () => {
37
+ const e = f([]);
38
38
  function a() {
39
39
  return e.value.length <= 0;
40
40
  }
41
41
  function t() {
42
- const s = e.value.length;
43
- if (s > 0)
44
- return e.value[s - 1];
42
+ const c = e.value.length;
43
+ if (c > 0)
44
+ return e.value[c - 1];
45
45
  }
46
- function l(s) {
47
- return e.value.find((c) => c === s) !== void 0;
46
+ function l(c) {
47
+ return e.value.find((s) => s === c) !== void 0;
48
48
  }
49
- function o(s) {
50
- n(s), e.value.push(s);
49
+ function o(c) {
50
+ n(c), e.value.push(c);
51
51
  }
52
- function n(s) {
53
- const c = e.value.findIndex((w) => w === s);
54
- c !== -1 && e.value.splice(c, 1);
52
+ function n(c) {
53
+ const s = e.value.findIndex((h) => h === c);
54
+ s !== -1 && e.value.splice(s, 1);
55
55
  }
56
56
  function r() {
57
57
  e.value.pop();
@@ -60,32 +60,103 @@ const X = le(
60
60
  e.value = [];
61
61
  }
62
62
  return { isEmpty: a, lastView: t, hasView: l, addView: o, delView: n, popView: r, clearViews: u };
63
- }), K = require("js-cookie");
64
- function at(e) {
65
- const a = be.create({
63
+ });
64
+ /*! js-cookie v3.0.5 | MIT */
65
+ function K(e) {
66
+ for (var a = 1; a < arguments.length; a++) {
67
+ var t = arguments[a];
68
+ for (var l in t)
69
+ e[l] = t[l];
70
+ }
71
+ return e;
72
+ }
73
+ var Se = {
74
+ read: function(e) {
75
+ return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
76
+ },
77
+ write: function(e) {
78
+ return encodeURIComponent(e).replace(
79
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
80
+ decodeURIComponent
81
+ );
82
+ }
83
+ };
84
+ function J(e, a) {
85
+ function t(o, n, r) {
86
+ if (!(typeof document > "u")) {
87
+ r = K({}, a, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
88
+ var u = "";
89
+ for (var c in r)
90
+ r[c] && (u += "; " + c, r[c] !== !0 && (u += "=" + r[c].split(";")[0]));
91
+ return document.cookie = o + "=" + e.write(n, o) + u;
92
+ }
93
+ }
94
+ function l(o) {
95
+ if (!(typeof document > "u" || arguments.length && !o)) {
96
+ for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, u = 0; u < n.length; u++) {
97
+ var c = n[u].split("="), s = c.slice(1).join("=");
98
+ try {
99
+ var h = decodeURIComponent(c[0]);
100
+ if (r[h] = e.read(s, h), o === h)
101
+ break;
102
+ } catch {
103
+ }
104
+ }
105
+ return o ? r[o] : r;
106
+ }
107
+ }
108
+ return Object.create(
109
+ {
110
+ set: t,
111
+ get: l,
112
+ remove: function(o, n) {
113
+ t(
114
+ o,
115
+ "",
116
+ K({}, n, {
117
+ expires: -1
118
+ })
119
+ );
120
+ },
121
+ withAttributes: function(o) {
122
+ return J(this.converter, K({}, this.attributes, o));
123
+ },
124
+ withConverter: function(o) {
125
+ return J(K({}, this.converter, o), this.attributes);
126
+ }
127
+ },
128
+ {
129
+ attributes: { value: Object.freeze(a) },
130
+ converter: { value: Object.freeze(e) }
131
+ }
132
+ );
133
+ }
134
+ var T = J(Se, { path: "/" });
135
+ function lt(e) {
136
+ const a = Ce.create({
66
137
  timeout: 6e3
67
138
  });
68
139
  return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
69
- (t) => Se(t),
140
+ (t) => qe(t),
70
141
  (t) => {
71
- qe(t, e.onError);
142
+ Ve(t, e.onError);
72
143
  }
73
144
  ), a.interceptors.response.use(
74
- (t) => De(t),
75
- (t) => Ve(t, e.onError)
145
+ (t) => Re(t),
146
+ (t) => Oe(t, e.onError)
76
147
  ), a;
77
148
  }
78
- function Se(e) {
79
- const a = K.get("accessToken") ?? "";
149
+ function qe(e) {
150
+ const a = T.get("accessToken") ?? "";
80
151
  return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
81
152
  }
82
- function qe(e, a) {
153
+ function Ve(e, a) {
83
154
  console.error(e), a("request timeout");
84
155
  }
85
- function De(e) {
156
+ function Re(e) {
86
157
  return e.data;
87
158
  }
88
- function Ve(e, a) {
159
+ function Oe(e, a) {
89
160
  var o;
90
161
  const t = e.response;
91
162
  if (!t)
@@ -98,9 +169,9 @@ function Ve(e, a) {
98
169
  }), a(l), Promise.reject(e);
99
170
  }
100
171
  function Te() {
101
- K.remove("accessToken"), K.remove("refreshToken"), K.remove("activeOrg"), oe().replace({ path: "/passport/login" });
172
+ T.remove("accessToken"), T.remove("refreshToken"), T.remove("activeOrg"), ne().replace({ path: "/passport/login" });
102
173
  }
103
- function Oe(e) {
174
+ function je(e) {
104
175
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
105
176
  var l = e.get(a);
106
177
  l ? l.push(t) : e.set(a, [t]);
@@ -116,13 +187,13 @@ function Oe(e) {
116
187
  });
117
188
  } };
118
189
  }
119
- const p = Oe();
120
- async function lt(e) {
190
+ const p = je();
191
+ async function rt(e) {
121
192
  return new Promise((a) => {
122
193
  setTimeout(a, e);
123
194
  });
124
195
  }
125
- async function G(e, a, t) {
196
+ async function Y(e, a, t) {
126
197
  const l = Date.now();
127
198
  return new Promise((o) => {
128
199
  const n = async () => {
@@ -131,52 +202,52 @@ async function G(e, a, t) {
131
202
  n();
132
203
  });
133
204
  }
134
- let P = Date.now();
135
- function ne() {
205
+ let te = Date.now();
206
+ function ue() {
136
207
  const e = Date.now();
137
- return e - P > 500 ? (P = e, !0) : !1;
208
+ return e - te > 500 ? (te = e, !0) : !1;
138
209
  }
139
- let Re = 0;
140
- function ce() {
141
- return ++Re;
210
+ let Ie = 0;
211
+ function se() {
212
+ return ++Ie;
142
213
  }
143
- async function ot(e) {
144
- if (!ne())
214
+ async function nt(e) {
215
+ if (!ue())
145
216
  return;
146
217
  let a = !1, t;
147
218
  const l = (n) => {
148
219
  t = n, a = !0;
149
- }, o = ce();
150
- return p.on("confirmDlgResult" + o, l), p.emit("confirmDlg", { ...e, seq: o }), await G(() => a), p.off("confirmDlgResult" + o, l), t;
220
+ }, o = se();
221
+ return p.on("confirmDlgResult" + o, l), p.emit("confirmDlg", { ...e, seq: o }), await Y(() => a), p.off("confirmDlgResult" + o, l), t;
151
222
  }
152
- async function rt(e) {
153
- if (!ne())
223
+ async function ct(e) {
224
+ if (!ue())
154
225
  return;
155
226
  let a = !1, t;
156
227
  const l = (n) => {
157
228
  t = n, a = !0;
158
- }, o = ce();
159
- return p.on("promptDlgResult" + o, l), p.emit("promptDlg", { ...e, seq: o }), await G(() => a), p.off("promptDlgResult" + o, l), t;
229
+ }, o = se();
230
+ return p.on("promptDlgResult" + o, l), p.emit("promptDlg", { ...e, seq: o }), await Y(() => a), p.off("promptDlgResult" + o, l), t;
160
231
  }
161
- function nt() {
232
+ function ut() {
162
233
  p.emit("openWaitDlg");
163
234
  }
164
- function ct() {
235
+ function st() {
165
236
  p.emit("closeWaitDlg");
166
237
  }
167
- function ut(e, a) {
238
+ function pt(e, a) {
168
239
  p.emit("message", { type: "error", text: e, timeout: a });
169
240
  }
170
- function st(e, a) {
241
+ function _t(e, a) {
171
242
  p.emit("message", { type: "info", text: e, timeout: a });
172
243
  }
173
- function pt(e, a) {
244
+ function dt(e, a) {
174
245
  p.emit("message", { type: "success", text: e, timeout: a });
175
246
  }
176
- function _t(e, a) {
247
+ function it(e, a) {
177
248
  p.emit("message", { type: "warning", text: e, timeout: a });
178
249
  }
179
- function dt(e) {
250
+ function ft(e) {
180
251
  var l, o;
181
252
  if (!window.appAppear) {
182
253
  window.appAppear = !0;
@@ -187,8 +258,8 @@ function dt(e) {
187
258
  t.add("app-reset");
188
259
  }, 0));
189
260
  }
190
- var je = /* @__PURE__ */ ((e) => (e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.list_calc_space = "list_calc_space", e.get_calc_space = "get_calc_space", e.create_calc_space = "create_calc_space", e.delete_calc_space = "delete_calc_space", e.update_calc_space = "update_calc_space", e.arrange_calc_space = "arrange_calc_space", e.list_func_group = "list_func_group", e.create_func_group = "create_func_group", e.delete_func_group = "delete_func_group", e.update_func_group = "update_func_group", e.arrange_func_group = "arrange_func_group", e.list_func = "list_func", e.get_func = "get_func", e.create_func = "create_func", e.delete_func = "delete_func", e.update_func = "update_func", e.debug_func = "debug_func", e.call_func = "call_func", e.list_func_release = "list_func_release", e.get_func_release = "get_func_release", e.create_func_release = "create_func_release", e.delete_func_release = "delete_func_release", e.deploy_func_release = "deploy_func_release", e.list_flow_group = "list_flow_group", e.create_flow_group = "create_flow_group", e.delete_flow_group = "delete_flow_group", e.update_flow_group = "update_flow_group", e.arrange_flow_group = "arrange_flow_group", e.list_flow = "list_flow", e.get_flow = "get_flow", e.create_flow = "create_flow", e.delete_flow = "delete_flow", e.update_flow = "update_flow", e.call_flow = "call_flow", e.list_flow_release = "list_flow_release", e.get_flow_release = "get_flow_release", e.create_flow_release = "create_flow_release", e.delete_flow_release = "delete_flow_release", e.deploy_flow_release = "deploy_flow_release", e.list_task = "list_task", e.get_task = "get_task", e.create_task = "create_task", e.delete_task = "delete_task", e.update_task = "update_task", e.call_task = "call_task", e.open_calc_layer = "open_calc_layer", e.list_db_space = "list_db_space", e.get_db_space = "get_db_space", e.create_db_space = "create_db_space", e.delete_db_space = "delete_db_space", e.update_db_space = "update_db_space", e.arrange_db_space = "arrange_db_space", e.list_model_group = "list_model_group", e.create_model_group = "create_model_group", e.delete_model_group = "delete_model_group", e.update_model_group = "update_model_group", e.arrange_model_group = "arrange_model_group", e.list_model = "list_model", e.get_model = "get_model", e.create_model = "create_model", e.delete_model = "delete_model", e.update_model = "update_model", e.get_model_data = "get_model_data", e.create_model_data = "create_model_data", e.delete_model_data = "delete_model_data", e.update_model_data = "update_model_data", e.get_graph = "get_graph", e.update_graph = "update_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_asset_space = "list_asset_space", e.get_asset_space = "get_asset_space", e.create_asset_space = "create_asset_space", e.delete_asset_space = "delete_asset_space", e.update_asset_space = "update_asset_space", e.arrange_asset_space = "arrange_asset_space", e.list_dir = "list_dir", e.create_dir = "create_dir", e.delete_dir = "delete_dir", e.update_dir = "update_dir", e.move_dir = "move_dir", e.list_asset = "list_asset", e.get_asset = "get_asset", e.create_asset = "create_asset", e.delete_asset = "delete_asset", e.update_asset = "update_asset", e.move_asset = "move_asset", e.open_asset_layer = "open_asset_layer", e.list_org_member = "list_org_member", e.add_org_member = "add_org_member", e.remove_org_member = "remove_org_member", e.update_org_member = "update_org_member", e.list_org_role = "list_org_role", e.get_org_role = "get_org_role", e.create_org_role = "create_org_role", e.delete_org_role = "delete_org_role", e.update_org_role = "update_org_role", e.arrange_org_role = "arrange_org_role", e.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_model = "filter_model", e))(je || {});
191
- function ee(e, a) {
261
+ var Ee = /* @__PURE__ */ ((e) => (e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.list_calc_space = "list_calc_space", e.get_calc_space = "get_calc_space", e.create_calc_space = "create_calc_space", e.delete_calc_space = "delete_calc_space", e.update_calc_space = "update_calc_space", e.arrange_calc_space = "arrange_calc_space", e.list_func_group = "list_func_group", e.create_func_group = "create_func_group", e.delete_func_group = "delete_func_group", e.update_func_group = "update_func_group", e.arrange_func_group = "arrange_func_group", e.list_func = "list_func", e.get_func = "get_func", e.create_func = "create_func", e.delete_func = "delete_func", e.update_func = "update_func", e.debug_func = "debug_func", e.call_func = "call_func", e.list_func_release = "list_func_release", e.get_func_release = "get_func_release", e.create_func_release = "create_func_release", e.delete_func_release = "delete_func_release", e.deploy_func_release = "deploy_func_release", e.list_flow_group = "list_flow_group", e.create_flow_group = "create_flow_group", e.delete_flow_group = "delete_flow_group", e.update_flow_group = "update_flow_group", e.arrange_flow_group = "arrange_flow_group", e.list_flow = "list_flow", e.get_flow = "get_flow", e.create_flow = "create_flow", e.delete_flow = "delete_flow", e.update_flow = "update_flow", e.call_flow = "call_flow", e.list_flow_release = "list_flow_release", e.get_flow_release = "get_flow_release", e.create_flow_release = "create_flow_release", e.delete_flow_release = "delete_flow_release", e.deploy_flow_release = "deploy_flow_release", e.list_task = "list_task", e.get_task = "get_task", e.create_task = "create_task", e.delete_task = "delete_task", e.update_task = "update_task", e.call_task = "call_task", e.open_calc_layer = "open_calc_layer", e.list_db_space = "list_db_space", e.get_db_space = "get_db_space", e.create_db_space = "create_db_space", e.delete_db_space = "delete_db_space", e.update_db_space = "update_db_space", e.arrange_db_space = "arrange_db_space", e.list_model_group = "list_model_group", e.create_model_group = "create_model_group", e.delete_model_group = "delete_model_group", e.update_model_group = "update_model_group", e.arrange_model_group = "arrange_model_group", e.list_model = "list_model", e.get_model = "get_model", e.create_model = "create_model", e.delete_model = "delete_model", e.update_model = "update_model", e.get_model_data = "get_model_data", e.create_model_data = "create_model_data", e.delete_model_data = "delete_model_data", e.update_model_data = "update_model_data", e.get_graph = "get_graph", e.update_graph = "update_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_asset_space = "list_asset_space", e.get_asset_space = "get_asset_space", e.create_asset_space = "create_asset_space", e.delete_asset_space = "delete_asset_space", e.update_asset_space = "update_asset_space", e.arrange_asset_space = "arrange_asset_space", e.list_dir = "list_dir", e.create_dir = "create_dir", e.delete_dir = "delete_dir", e.update_dir = "update_dir", e.move_dir = "move_dir", e.list_asset = "list_asset", e.get_asset = "get_asset", e.create_asset = "create_asset", e.delete_asset = "delete_asset", e.update_asset = "update_asset", e.move_asset = "move_asset", e.open_asset_layer = "open_asset_layer", e.list_org_member = "list_org_member", e.add_org_member = "add_org_member", e.remove_org_member = "remove_org_member", e.update_org_member = "update_org_member", e.list_org_role = "list_org_role", e.get_org_role = "get_org_role", e.create_org_role = "create_org_role", e.delete_org_role = "delete_org_role", e.update_org_role = "update_org_role", e.arrange_org_role = "arrange_org_role", e.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_model = "filter_model", e))(Ee || {});
262
+ function ae(e, a) {
192
263
  if (!e)
193
264
  return !1;
194
265
  let t = e;
@@ -201,7 +272,7 @@ function ee(e, a) {
201
272
  return !1;
202
273
  }), Object.keys(t).length <= 0);
203
274
  }
204
- const ue = require("js-cookie"), Ie = [
275
+ const Ue = [
205
276
  { path: "/passport/login", level: 0 },
206
277
  { path: "/passport/loginAccount", level: 1 },
207
278
  { path: "/passport/register", level: 1 },
@@ -221,10 +292,10 @@ const ue = require("js-cookie"), Ie = [
221
292
  { path: "/calc", level: 1, requiredState: "org" },
222
293
  { path: "/data", level: 1, requiredState: "org" }
223
294
  ];
224
- function Q(e) {
295
+ function Z(e) {
225
296
  let a, t = 0;
226
297
  const l = e.split("/");
227
- return Ie.forEach((o) => {
298
+ return Ue.forEach((o) => {
228
299
  const n = o.path.split("/");
229
300
  let r = 0;
230
301
  for (let u = 0; u < l.length && !(u >= n.length || l[u] !== n[u]); u++)
@@ -232,30 +303,30 @@ function Q(e) {
232
303
  r >= t && (a = o, t = r);
233
304
  }), a;
234
305
  }
235
- function te(e) {
306
+ function oe(e) {
236
307
  if (e === "/")
237
308
  return { app: "", path: "/", level: -1 };
238
- const a = Q(e);
309
+ const a = Z(e);
239
310
  if (!a)
240
311
  return { app: "invalidApp", path: "/invalidApp/invalidRoute", level: -1 };
241
312
  const t = e.split("/");
242
313
  return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
243
314
  }
244
- const ae = i("");
245
- function x(e, a) {
246
- const t = te(e), l = te(a), o = t.app === l.app, n = t.path === l.path, r = t.level >= l.level;
315
+ const le = f("");
316
+ function k(e, a) {
317
+ const t = oe(e), l = oe(a), o = t.app === l.app, n = t.path === l.path, r = t.level >= l.level;
247
318
  console.info(
248
319
  `~~~~before route change~~~~ ${l.path} -> ${t.path} inner=${o} forward=${r}`
249
- ), o ? n ? ae.value = "" : ae.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
320
+ ), o ? n ? le.value = "" : le.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
250
321
  }
251
- function Ee() {
252
- return !!ue.get("accessToken");
322
+ function Ae() {
323
+ return !!T.get("accessToken");
253
324
  }
254
- function $e() {
255
- return !!ue.get("activeOrg");
325
+ function Be() {
326
+ return !!T.get("activeOrg");
256
327
  }
257
- function ft(e, a, t) {
258
- const l = Ee(), o = $e(), n = Q(e.path);
328
+ function gt(e, a, t) {
329
+ const l = Ae(), o = Be(), n = Z(e.path);
259
330
  if (!n) {
260
331
  t();
261
332
  return;
@@ -264,38 +335,38 @@ function ft(e, a, t) {
264
335
  if (l)
265
336
  if (o) {
266
337
  const r = "/main";
267
- x(r, a.path), t({ path: r });
338
+ k(r, a.path), t({ path: r });
268
339
  } else
269
- x(e.path, a.path), t();
340
+ k(e.path, a.path), t();
270
341
  else {
271
342
  const r = "/passport/login";
272
- x(r, a.path), t({ path: r });
343
+ k(r, a.path), t({ path: r });
273
344
  }
274
345
  else if (n.requiredState === "org")
275
346
  if (l)
276
347
  if (o)
277
- x(e.path, a.path), t();
348
+ k(e.path, a.path), t();
278
349
  else {
279
350
  const r = "/org/joinOrCreate";
280
- x(r, a.path), t({ path: r });
351
+ k(r, a.path), t({ path: r });
281
352
  }
282
353
  else {
283
354
  const r = "/passport/login";
284
- x(r, a.path), t({ path: r });
355
+ k(r, a.path), t({ path: r });
285
356
  }
286
357
  else if (l)
287
358
  if (o) {
288
359
  const r = "/main";
289
- x(r, a.path), t({ path: r });
360
+ k(r, a.path), t({ path: r });
290
361
  } else {
291
362
  const r = "/org/joinOrCreate";
292
- x(r, a.path), t({ path: r });
363
+ k(r, a.path), t({ path: r });
293
364
  }
294
365
  else
295
- x(e.path, a.path), t();
366
+ k(e.path, a.path), t();
296
367
  }
297
- function Y(e, a) {
298
- const t = re(), l = f({
368
+ function P(e, a) {
369
+ const t = ce(), l = i({
299
370
  get() {
300
371
  return t.hasView(e);
301
372
  },
@@ -311,44 +382,44 @@ function Y(e, a) {
311
382
  p.off(e, o);
312
383
  }), { open: l };
313
384
  }
314
- const Me = /* @__PURE__ */ R({
385
+ const Me = /* @__PURE__ */ I({
315
386
  __name: "index",
316
387
  setup(e) {
317
- const a = J(), { open: t } = Y("confirmDlg"), l = i(""), o = i(""), n = i(), r = i(), u = f(() => {
388
+ const a = G(), { open: t } = P("confirmDlg"), l = f(""), o = f(""), n = f(), r = f(), u = i(() => {
318
389
  var d;
319
390
  return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
320
- }), s = f(() => {
391
+ }), c = i(() => {
321
392
  var d;
322
393
  return ((d = n.value) == null ? void 0 : d.text) ?? a.t("cancel");
323
- }), c = f(() => {
394
+ }), s = i(() => {
324
395
  var d;
325
396
  return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
326
- }), w = f(() => {
397
+ }), h = i(() => {
327
398
  var d;
328
399
  return ((d = r.value) == null ? void 0 : d.text) ?? a.t("confirm");
329
400
  });
330
- let j = 0, S = !1;
331
- const A = (d) => {
332
- l.value = d.title, o.value = d.text, n.value = d.cancel, r.value = d.confirm, j = d.seq, S = !1, t.value = !0;
401
+ let R = 0, D = !1;
402
+ const M = (d) => {
403
+ l.value = d.title, o.value = d.text, n.value = d.cancel, r.value = d.confirm, R = d.seq, D = !1, t.value = !0;
333
404
  };
334
405
  C(() => {
335
- p.on("confirmDlg", A);
406
+ p.on("confirmDlg", M);
336
407
  }), V(() => {
337
- p.off("confirmDlg", A);
408
+ p.off("confirmDlg", M);
338
409
  });
339
- const B = () => {
340
- t.value = !1, S || (p.emit("confirmDlgResult" + j, !0), S = !0);
410
+ const $ = () => {
411
+ t.value = !1, D || (p.emit("confirmDlgResult" + R, !0), D = !0);
341
412
  };
342
- return W(t, (d) => {
343
- !d && !S && (p.emit("confirmDlgResult" + j, !1), S = !0);
344
- }), (d, k) => {
345
- const q = v("v-card-text"), I = v("v-btn"), L = v("v-card-actions"), _ = v("v-card"), h = v("v-dialog");
346
- return b(), O(h, {
347
- modelValue: N(t),
348
- "onUpdate:modelValue": k[1] || (k[1] = (E) => F(t) ? t.value = E : null),
413
+ return H(t, (d) => {
414
+ !d && !D && (p.emit("confirmDlgResult" + R, !1), D = !0);
415
+ }), (d, x) => {
416
+ const S = v("v-card-text"), E = v("v-btn"), L = v("v-card-actions"), _ = v("v-card"), w = v("v-dialog");
417
+ return b(), j(w, {
418
+ modelValue: W(t),
419
+ "onUpdate:modelValue": x[1] || (x[1] = (U) => X(t) ? t.value = U : null),
349
420
  onKeydown: [
350
- k[2] || (k[2] = U(M((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
351
- U(M(B, ["stop", "prevent"]), ["enter"])
421
+ x[2] || (x[2] = z(B((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
422
+ z(B($, ["stop", "prevent"]), ["enter"])
352
423
  ],
353
424
  transition: "dialog-top-transition",
354
425
  "max-width": "600px"
@@ -356,31 +427,31 @@ const Me = /* @__PURE__ */ R({
356
427
  default: m(() => [
357
428
  y(_, { title: l.value }, {
358
429
  default: m(() => [
359
- y(q, null, {
430
+ y(S, null, {
360
431
  default: m(() => [
361
- T(D(o.value), 1)
432
+ O(q(o.value), 1)
362
433
  ]),
363
434
  _: 1
364
435
  }),
365
436
  y(L, { class: "d-flex justify-end" }, {
366
437
  default: m(() => [
367
- y(I, {
368
- onClick: k[0] || (k[0] = (E) => t.value = !1),
438
+ y(E, {
439
+ onClick: x[0] || (x[0] = (U) => t.value = !1),
369
440
  color: u.value,
370
441
  variant: "text"
371
442
  }, {
372
443
  default: m(() => [
373
- T(D(s.value), 1)
444
+ O(q(c.value), 1)
374
445
  ]),
375
446
  _: 1
376
447
  }, 8, ["color"]),
377
- y(I, {
378
- onClick: B,
379
- color: c.value,
448
+ y(E, {
449
+ onClick: $,
450
+ color: s.value,
380
451
  variant: "text"
381
452
  }, {
382
453
  default: m(() => [
383
- T(D(w.value), 1)
454
+ O(q(h.value), 1)
384
455
  ]),
385
456
  _: 1
386
457
  }, 8, ["color"])
@@ -395,7 +466,7 @@ const Me = /* @__PURE__ */ R({
395
466
  }, 8, ["modelValue", "onKeydown"]);
396
467
  };
397
468
  }
398
- }), Ae = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), Be = /* @__PURE__ */ Ae(() => /* @__PURE__ */ g("div", { class: "lds-spinner" }, [
469
+ }), $e = (e) => (me("data-v-f4ad116e"), e = e(), he(), e), Le = /* @__PURE__ */ $e(() => /* @__PURE__ */ g("div", { class: "lds-spinner" }, [
399
470
  /* @__PURE__ */ g("div"),
400
471
  /* @__PURE__ */ g("div"),
401
472
  /* @__PURE__ */ g("div"),
@@ -408,9 +479,9 @@ const Me = /* @__PURE__ */ R({
408
479
  /* @__PURE__ */ g("div"),
409
480
  /* @__PURE__ */ g("div"),
410
481
  /* @__PURE__ */ g("div")
411
- ], -1)), Le = [
412
- Be
413
- ], Ke = /* @__PURE__ */ R({
482
+ ], -1)), Ke = [
483
+ Le
484
+ ], We = /* @__PURE__ */ I({
414
485
  __name: "index",
415
486
  props: {
416
487
  zIndex: {
@@ -419,21 +490,21 @@ const Me = /* @__PURE__ */ R({
419
490
  }
420
491
  },
421
492
  setup(e) {
422
- const a = H(), t = e, l = f(() => ({
493
+ const a = N(), t = e, l = i(() => ({
423
494
  background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
424
495
  zIndex: t.zIndex
425
496
  }));
426
- return (o, n) => (b(), z("div", {
497
+ return (o, n) => (b(), F("div", {
427
498
  class: "x-cont",
428
- style: ge(l.value)
429
- }, Le, 4));
499
+ style: ve(l.value)
500
+ }, Ke, 4));
430
501
  }
431
- }), se = (e, a) => {
502
+ }), pe = (e, a) => {
432
503
  const t = e.__vccOpts || e;
433
504
  for (const [l, o] of a)
434
505
  t[l] = o;
435
506
  return t;
436
- }, Ne = /* @__PURE__ */ se(Ke, [["__scopeId", "data-v-f4ad116e"]]), Ue = /* @__PURE__ */ R({
507
+ }, ze = /* @__PURE__ */ pe(We, [["__scopeId", "data-v-f4ad116e"]]), He = /* @__PURE__ */ I({
437
508
  __name: "item",
438
509
  props: {
439
510
  id: {
@@ -455,7 +526,7 @@ const Me = /* @__PURE__ */ R({
455
526
  },
456
527
  emits: ["timeout"],
457
528
  setup(e, { emit: a }) {
458
- const t = e, l = i(!0), o = a, n = f(() => {
529
+ const t = e, l = f(!0), o = a, n = i(() => {
459
530
  let r = "";
460
531
  switch (t.type) {
461
532
  case "error":
@@ -477,13 +548,13 @@ const Me = /* @__PURE__ */ R({
477
548
  setTimeout(() => {
478
549
  o("timeout", t.id);
479
550
  }, t.timeout);
480
- }), W(l, (r) => {
551
+ }), H(l, (r) => {
481
552
  r || o("timeout", t.id);
482
553
  }), (r, u) => {
483
- const s = v("v-alert");
484
- return b(), O(s, {
554
+ const c = v("v-alert");
555
+ return b(), j(c, {
485
556
  modelValue: l.value,
486
- "onUpdate:modelValue": u[0] || (u[0] = (c) => l.value = c),
557
+ "onUpdate:modelValue": u[0] || (u[0] = (s) => l.value = s),
487
558
  class: "mt-2",
488
559
  type: e.type,
489
560
  icon: n.value,
@@ -496,10 +567,10 @@ const Me = /* @__PURE__ */ R({
496
567
  }, null, 8, ["modelValue", "type", "icon", "text"]);
497
568
  };
498
569
  }
499
- }), We = /* @__PURE__ */ R({
570
+ }), Ne = /* @__PURE__ */ I({
500
571
  __name: "index",
501
572
  setup(e) {
502
- const a = he({ items: [] });
573
+ const a = we({ items: [] });
503
574
  C(() => {
504
575
  p.on("message", t);
505
576
  }), V(() => {
@@ -511,67 +582,67 @@ const Me = /* @__PURE__ */ R({
511
582
  r(u);
512
583
  };
513
584
  let o = 0;
514
- const n = (u, s, c) => {
515
- const w = o++;
516
- a.items.push({ id: w, type: u, text: s, timeout: c });
585
+ const n = (u, c, s) => {
586
+ const h = o++;
587
+ a.items.push({ id: h, type: u, text: c, timeout: s });
517
588
  }, r = (u) => {
518
- const s = a.items.findIndex((c) => c.id === u);
519
- s >= 0 && a.items.splice(s, 1);
589
+ const c = a.items.findIndex((s) => s.id === u);
590
+ c >= 0 && a.items.splice(c, 1);
520
591
  };
521
- return (u, s) => (b(), z("div", {
522
- onClick: s[0] || (s[0] = M(() => {
592
+ return (u, c) => (b(), F("div", {
593
+ onClick: c[0] || (c[0] = B(() => {
523
594
  }, ["stop"])),
524
595
  class: "x-cont d-flex flex-column-reverse align-center"
525
596
  }, [
526
- (b(!0), z(we, null, ye(a.items, (c) => (b(), O(Ue, {
597
+ (b(!0), F(ye, null, xe(a.items, (s) => (b(), j(He, {
527
598
  onTimeout: l,
528
- id: c.id,
529
- type: c.type,
530
- text: c.text,
531
- timeout: c.timeout,
532
- key: c.id
599
+ id: s.id,
600
+ type: s.type,
601
+ text: s.text,
602
+ timeout: s.timeout,
603
+ key: s.id
533
604
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
534
605
  ]));
535
606
  }
536
- }), He = /* @__PURE__ */ se(We, [["__scopeId", "data-v-70ed4b89"]]), ze = /* @__PURE__ */ R({
607
+ }), Fe = /* @__PURE__ */ pe(Ne, [["__scopeId", "data-v-70ed4b89"]]), Je = /* @__PURE__ */ I({
537
608
  __name: "index",
538
609
  setup(e) {
539
- const a = J(), { open: t } = Y("promptDlg"), l = i(""), o = i(""), n = i(), r = i(), u = i(), s = i(""), c = i(), w = i(), j = f(() => {
610
+ const a = G(), { open: t } = P("promptDlg"), l = f(""), o = f(""), n = f(), r = f(), u = f(), c = f(""), s = f(), h = f(), R = i(() => {
540
611
  var _;
541
- return ((_ = c.value) == null ? void 0 : _.color) ?? "primary";
542
- }), S = f(() => {
612
+ return ((_ = s.value) == null ? void 0 : _.color) ?? "primary";
613
+ }), D = i(() => {
543
614
  var _;
544
- return ((_ = c.value) == null ? void 0 : _.text) ?? a.t("cancel");
545
- }), A = f(() => {
615
+ return ((_ = s.value) == null ? void 0 : _.text) ?? a.t("cancel");
616
+ }), M = i(() => {
546
617
  var _;
547
- return ((_ = w.value) == null ? void 0 : _.color) ?? "primary";
548
- }), B = f(() => {
618
+ return ((_ = h.value) == null ? void 0 : _.color) ?? "primary";
619
+ }), $ = i(() => {
549
620
  var _;
550
- return ((_ = w.value) == null ? void 0 : _.text) ?? a.t("confirm");
551
- }), d = i();
552
- let k = 0, q = !1;
553
- const I = async (_) => {
554
- var h;
555
- l.value = _.title, o.value = _.text, n.value = _.label, r.value = _.placeholder, u.value = _.rules, s.value = _.value, c.value = _.cancel, w.value = _.confirm, k = _.seq, q = !1, t.value = !0, await G(() => d.value !== void 0, 1e3), (h = d.value) == null || h.focus();
621
+ return ((_ = h.value) == null ? void 0 : _.text) ?? a.t("confirm");
622
+ }), d = f();
623
+ let x = 0, S = !1;
624
+ const E = async (_) => {
625
+ var w;
626
+ l.value = _.title, o.value = _.text, n.value = _.label, r.value = _.placeholder, u.value = _.rules, c.value = _.value, s.value = _.cancel, h.value = _.confirm, x = _.seq, S = !1, t.value = !0, await Y(() => d.value !== void 0, 1e3), (w = d.value) == null || w.focus();
556
627
  };
557
628
  C(() => {
558
- p.on("promptDlg", I);
629
+ p.on("promptDlg", E);
559
630
  }), V(() => {
560
- p.off("promptDlg", I);
631
+ p.off("promptDlg", E);
561
632
  });
562
633
  const L = () => {
563
- t.value = !1, q || (p.emit("promptDlgResult" + k, s.value ?? ""), q = !0);
634
+ t.value = !1, S || (p.emit("promptDlgResult" + x, c.value ?? ""), S = !0);
564
635
  };
565
- return W(t, (_) => {
566
- !_ && !q && (p.emit("promptDlgResult" + k, void 0), q = !0);
567
- }), (_, h) => {
568
- const E = v("v-card-text"), pe = v("v-text-field"), _e = v("v-form"), Z = v("v-btn"), de = v("v-card-actions"), fe = v("v-card"), ie = v("v-dialog");
569
- return b(), O(ie, {
570
- modelValue: N(t),
571
- "onUpdate:modelValue": h[2] || (h[2] = ($) => F(t) ? t.value = $ : null),
636
+ return H(t, (_) => {
637
+ !_ && !S && (p.emit("promptDlgResult" + x, void 0), S = !0);
638
+ }), (_, w) => {
639
+ const U = v("v-card-text"), _e = v("v-text-field"), de = v("v-form"), ee = v("v-btn"), ie = v("v-card-actions"), fe = v("v-card"), ge = v("v-dialog");
640
+ return b(), j(ge, {
641
+ modelValue: W(t),
642
+ "onUpdate:modelValue": w[2] || (w[2] = (A) => X(t) ? t.value = A : null),
572
643
  onKeydown: [
573
- h[3] || (h[3] = U(M(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
574
- U(M(L, ["stop", "prevent"]), ["enter"])
644
+ w[3] || (w[3] = z(B((A) => t.value = !1, ["stop", "prevent"]), ["esc"])),
645
+ z(B(L, ["stop", "prevent"]), ["enter"])
575
646
  ],
576
647
  transition: "dialog-top-transition",
577
648
  "max-width": "600px"
@@ -579,17 +650,17 @@ const Me = /* @__PURE__ */ R({
579
650
  default: m(() => [
580
651
  y(fe, { title: l.value }, {
581
652
  default: m(() => [
582
- o.value ? (b(), O(E, { key: 0 }, {
653
+ o.value ? (b(), j(U, { key: 0 }, {
583
654
  default: m(() => [
584
- T(D(o.value), 1)
655
+ O(q(o.value), 1)
585
656
  ]),
586
657
  _: 1
587
658
  })) : ke("", !0),
588
- y(_e, { class: "mx-3" }, {
659
+ y(de, { class: "mx-3" }, {
589
660
  default: m(() => [
590
- y(pe, {
591
- modelValue: s.value,
592
- "onUpdate:modelValue": h[0] || (h[0] = ($) => s.value = $),
661
+ y(_e, {
662
+ modelValue: c.value,
663
+ "onUpdate:modelValue": w[0] || (w[0] = (A) => c.value = A),
593
664
  label: n.value,
594
665
  placeholder: r.value,
595
666
  rules: u.value,
@@ -599,25 +670,25 @@ const Me = /* @__PURE__ */ R({
599
670
  ]),
600
671
  _: 1
601
672
  }),
602
- y(de, { class: "d-flex justify-end" }, {
673
+ y(ie, { class: "d-flex justify-end" }, {
603
674
  default: m(() => [
604
- y(Z, {
605
- onClick: h[1] || (h[1] = ($) => t.value = !1),
606
- color: j.value,
675
+ y(ee, {
676
+ onClick: w[1] || (w[1] = (A) => t.value = !1),
677
+ color: R.value,
607
678
  variant: "text"
608
679
  }, {
609
680
  default: m(() => [
610
- T(D(S.value), 1)
681
+ O(q(D.value), 1)
611
682
  ]),
612
683
  _: 1
613
684
  }, 8, ["color"]),
614
- y(Z, {
685
+ y(ee, {
615
686
  onClick: L,
616
- color: A.value,
687
+ color: M.value,
617
688
  variant: "text"
618
689
  }, {
619
690
  default: m(() => [
620
- T(D(B.value), 1)
691
+ O(q($.value), 1)
621
692
  ]),
622
693
  _: 1
623
694
  }, 8, ["color"])
@@ -632,10 +703,10 @@ const Me = /* @__PURE__ */ R({
632
703
  }, 8, ["modelValue", "onKeydown"]);
633
704
  };
634
705
  }
635
- }), Fe = { class: "mx-auto my-auto" }, Je = { class: "d-flex align-center justify-center w-100 h-100" }, Xe = /* @__PURE__ */ R({
706
+ }), Xe = { class: "mx-auto my-auto" }, Ge = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ I({
636
707
  __name: "index",
637
708
  setup(e) {
638
- const a = J(), { open: t } = Y("waitDlg"), l = () => {
709
+ const a = G(), { open: t } = P("waitDlg"), l = () => {
639
710
  t.value = !0;
640
711
  }, o = () => {
641
712
  t.value = !1;
@@ -645,24 +716,24 @@ const Me = /* @__PURE__ */ R({
645
716
  }), V(() => {
646
717
  p.off("openWaitDlg", l), p.off("closeWaitDlg", o);
647
718
  }), (n, r) => {
648
- const u = v("v-card"), s = v("v-dialog");
649
- return b(), O(s, {
650
- modelValue: N(t),
651
- "onUpdate:modelValue": r[0] || (r[0] = (c) => F(t) ? t.value = c : null),
719
+ const u = v("v-card"), c = v("v-dialog");
720
+ return b(), j(c, {
721
+ modelValue: W(t),
722
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => X(t) ? t.value = s : null),
652
723
  persistent: "",
653
724
  "no-click-animation": "",
654
725
  fullscreen: ""
655
726
  }, {
656
727
  default: m(() => [
657
- g("div", Fe, [
728
+ g("div", Xe, [
658
729
  y(u, {
659
730
  width: "300px",
660
731
  height: "80px",
661
732
  loading: ""
662
733
  }, {
663
734
  default: m(() => [
664
- g("div", Je, [
665
- g("span", null, D(N(a).t("waitingResponse")), 1)
735
+ g("div", Ge, [
736
+ g("span", null, q(W(a).t("waitingResponse")), 1)
666
737
  ])
667
738
  ]),
668
739
  _: 1
@@ -673,11 +744,11 @@ const Me = /* @__PURE__ */ R({
673
744
  }, 8, ["modelValue"]);
674
745
  };
675
746
  }
676
- }), Ge = (e) => {
677
- e.component("x-confirm-dlg", Me), e.component("x-loading", Ne), e.component("x-message", He), e.component("x-prompt-dlg", ze), e.component("x-wait-dlg", Xe);
747
+ }), Ye = (e) => {
748
+ e.component("x-confirm-dlg", Me), e.component("x-loading", ze), e.component("x-message", Fe), e.component("x-prompt-dlg", Je), e.component("x-wait-dlg", Qe);
678
749
  };
679
- function it() {
680
- const e = H(), a = f(() => e.global.current.value.colors.primary), t = f(() => e.global.current.value.colors.secondary), l = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = f(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), u = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
750
+ function vt() {
751
+ const e = N(), a = i(() => e.global.current.value.colors.primary), t = i(() => e.global.current.value.colors.secondary), l = i(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = i(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = i(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = i(() => e.current.value.dark ? "#303030" : "#f6f6f6"), u = i(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
681
752
  return {
682
753
  primaryColor: a,
683
754
  secondaryColor: t,
@@ -688,57 +759,57 @@ function it() {
688
759
  borderColor: u
689
760
  };
690
761
  }
691
- function gt(e) {
692
- const a = Ce(), t = oe(), l = X(), o = re(), n = (c) => {
762
+ function mt() {
763
+ const e = De(), a = ne(), t = Q(), l = ce(), o = (c) => {
693
764
  if (c.key === "Escape") {
694
- r();
765
+ n();
695
766
  return;
696
767
  }
697
- if (!e && c.ctrlKey && c.shiftKey && c.key.toLowerCase() === "d") {
698
- u();
768
+ if (c.ctrlKey && c.shiftKey && c.key.toLowerCase() === "d") {
769
+ r();
699
770
  return;
700
771
  }
701
- if (!e && c.ctrlKey && c.shiftKey && c.key.toLowerCase() === "l") {
702
- s();
772
+ if (c.ctrlKey && c.shiftKey && c.key.toLowerCase() === "l") {
773
+ u();
703
774
  return;
704
775
  }
705
- }, r = () => {
706
- var w;
707
- if (!o.isEmpty()) {
708
- o.hasView("waitDlg") || o.popView();
776
+ }, n = () => {
777
+ var s;
778
+ if (!l.isEmpty()) {
779
+ l.hasView("waitDlg") || l.popView();
709
780
  return;
710
781
  }
711
- const c = Q(a.path);
712
- (c == null ? void 0 : c.level) === 0 ? (w = navigator == null ? void 0 : navigator.Backbutton) == null || w.goHome(
782
+ const c = Z(e.path);
783
+ (c == null ? void 0 : c.level) === 0 ? (s = navigator == null ? void 0 : navigator.Backbutton) == null || s.goHome(
713
784
  () => {
714
785
  },
715
786
  () => {
716
787
  }
717
- ) : t.back();
788
+ ) : a.back();
789
+ }, r = () => {
790
+ t.dark = !t.dark;
718
791
  }, u = () => {
719
- l.dark = !l.dark;
720
- }, s = () => {
721
- l.locale === "en" ? l.locale = "zhHans" : l.locale = "en";
792
+ t.locale === "en" ? t.locale = "zhHans" : t.locale = "en";
722
793
  };
723
794
  return C(() => {
724
- window.addEventListener("keydown", n, !1);
795
+ window.addEventListener("keydown", o, !1);
725
796
  }), V(() => {
726
- window.removeEventListener("keydown", n, !1);
797
+ window.removeEventListener("keydown", o, !1);
727
798
  }), {};
728
799
  }
729
- function vt() {
730
- const e = X();
800
+ function ht() {
801
+ const e = Q();
731
802
  function a(t, l) {
732
803
  const o = e.permissionObjects[t];
733
- return o ? l ? !(!ee(o.includes, l) || ee(o.excludes, l)) : !0 : !1;
804
+ return o ? l ? !(!ae(o.includes, l) || ae(o.excludes, l)) : !0 : !1;
734
805
  }
735
806
  return { verifyPermission: a };
736
807
  }
737
- function Qe(e, a) {
808
+ function Ze(e, a) {
738
809
  return e.post("pullPermission", a);
739
810
  }
740
- function mt(e) {
741
- const a = X();
811
+ function wt(e) {
812
+ const a = Q();
742
813
  let t;
743
814
  const l = () => {
744
815
  clearTimeout(t), t = setTimeout(async () => {
@@ -746,17 +817,17 @@ function mt(e) {
746
817
  }, 3e3);
747
818
  }, o = async () => {
748
819
  try {
749
- const { update: n, permissions: r } = await Qe(e, {
820
+ const { update: n, permissions: r } = await Ze(e, {
750
821
  checksum: a.permissionChecksum
751
822
  });
752
823
  if (!n)
753
824
  return;
754
825
  const u = {};
755
- for (const s in r) {
756
- if (s === "checksum")
826
+ for (const c in r) {
827
+ if (c === "checksum")
757
828
  continue;
758
- const c = r[s];
759
- u[s] = JSON.parse(c);
829
+ const s = r[c];
830
+ u[c] = JSON.parse(s);
760
831
  }
761
832
  a.permissionObjects = u, a.permissionChecksum = r.checksum ?? "";
762
833
  } catch (n) {
@@ -769,37 +840,37 @@ function mt(e) {
769
840
  clearTimeout(t), t = void 0;
770
841
  }), {};
771
842
  }
772
- function ht() {
773
- const e = H(), a = xe(), t = f(() => e.current.value.dark), l = f(() => !!window.cordova), o = f(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
843
+ function yt() {
844
+ const e = N(), a = be(), t = i(() => e.current.value.dark), l = i(() => !!window.cordova), o = i(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
774
845
  return { dark: t, sysBarAvail: l, compactWidth: o };
775
846
  }
776
- const wt = { install: Ge };
847
+ const xt = { install: Ye };
777
848
  export {
778
- je as Permission,
779
- dt as appAppear,
780
- ct as closeWaitDlg,
781
- at as createAxios,
782
- wt as default,
849
+ Ee as Permission,
850
+ ft as appAppear,
851
+ st as closeWaitDlg,
852
+ lt as createAxios,
853
+ xt as default,
783
854
  p as eventBus,
784
- ee as isExist,
785
- Q as matchRouteMeta,
786
- ut as messageError,
787
- st as messageInfo,
788
- pt as messageSuccess,
789
- _t as messageWarning,
790
- ft as onBeforeEach,
791
- ot as openConfirmDlg,
792
- rt as openPromptDlg,
793
- nt as openWaitDlg,
794
- ae as routeTransName,
795
- it as useColor,
796
- X as useGlobalStore,
797
- gt as useHotkey,
798
- vt as usePermission,
799
- mt as usePullPermission,
800
- ht as useSystem,
801
- re as useViewMgrStore,
802
- Y as useViewStack,
803
- lt as waitMs,
804
- G as waitUtil
855
+ ae as isExist,
856
+ Z as matchRouteMeta,
857
+ pt as messageError,
858
+ _t as messageInfo,
859
+ dt as messageSuccess,
860
+ it as messageWarning,
861
+ gt as onBeforeEach,
862
+ nt as openConfirmDlg,
863
+ ct as openPromptDlg,
864
+ ut as openWaitDlg,
865
+ le as routeTransName,
866
+ vt as useColor,
867
+ Q as useGlobalStore,
868
+ mt as useHotkey,
869
+ ht as usePermission,
870
+ wt as usePullPermission,
871
+ yt as useSystem,
872
+ ce as useViewMgrStore,
873
+ P as useViewStack,
874
+ rt as waitMs,
875
+ Y as waitUtil
805
876
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.4.2",
4
+ "version": "0.4.4",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",