x-essential-lib 0.4.6 → 0.5.1

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,6 +1,5 @@
1
1
  export * from './color';
2
- export * from './hotkey';
2
+ export * from './microApp';
3
3
  export * from './permission';
4
- export * from './pullPermission';
5
4
  export * from './system';
6
5
  export * from './viewStack';
@@ -0,0 +1,2 @@
1
+ import { AxiosInstance } from 'axios';
2
+ export declare function useMicroApp(prod: boolean, instance?: AxiosInstance): void;
package/dist/index.js CHANGED
@@ -1,28 +1,29 @@
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 f, watch as H, computed as i, onMounted as C, onBeforeUnmount as V, defineComponent as I, resolveComponent as m, openBlock as b, createBlock as j, unref as W, isRef as X, withKeys as z, withModifiers as B, withCtx as h, createVNode as y, createTextVNode as O, toDisplayString as q, createElementBlock as F, normalizeStyle as ve, pushScopeId as me, popScopeId as he, createElementVNode as v, 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";
2
+ import { ref as f, watch as F, computed as g, onMounted as V, onBeforeUnmount as O, defineComponent as M, resolveComponent as h, openBlock as R, createBlock as B, unref as W, isRef as G, withKeys as z, withModifiers as K, withCtx as w, createVNode as k, createTextVNode as E, toDisplayString as T, createElementBlock as J, normalizeStyle as ve, pushScopeId as me, popScopeId as he, createElementVNode as m, reactive as we, Fragment as ye, renderList as xe, createCommentVNode as ke } from "vue";
3
+ import { useTheme as H, useLocale as Q, useDisplay as be } from "vuetify";
4
4
  import { defineStore as re } from "pinia";
5
5
  import Ce from "axios";
6
- import { useRouter as ne, useRoute as De } from "vue-router";
7
- const Q = re(
6
+ import { useRouter as le, useRoute as De } from "vue-router";
7
+ const ne = re(
8
8
  "global",
9
9
  () => {
10
- const e = N(), a = f();
11
- H(
12
- a,
13
- (n) => {
14
- e.global.name.value = n ? "dark" : "light";
10
+ const e = H(), a = f(!0), t = f();
11
+ F(
12
+ t,
13
+ (l) => {
14
+ e.global.name.value = l ? "dark" : "light";
15
15
  },
16
16
  {
17
17
  immediate: !0
18
18
  }
19
19
  );
20
- const t = f("en"), l = f({}), o = f("");
20
+ const r = f("en"), o = f({}), n = f("");
21
21
  return {
22
- dark: a,
23
- locale: t,
24
- permissionObjects: l,
25
- permissionChecksum: o
22
+ running: a,
23
+ dark: t,
24
+ locale: r,
25
+ permissionObjects: o,
26
+ permissionChecksum: n
26
27
  };
27
28
  },
28
29
  {
@@ -43,30 +44,30 @@ const Q = re(
43
44
  if (u > 0)
44
45
  return e.value[u - 1];
45
46
  }
46
- function l(u) {
47
- return e.value.find((s) => s === u) !== void 0;
47
+ function r(u) {
48
+ return e.value.find((_) => _ === u) !== void 0;
48
49
  }
49
50
  function o(u) {
50
51
  n(u), e.value.push(u);
51
52
  }
52
53
  function n(u) {
53
- const s = e.value.findIndex((g) => g === u);
54
- s !== -1 && e.value.splice(s, 1);
54
+ const _ = e.value.findIndex((v) => v === u);
55
+ _ !== -1 && e.value.splice(_, 1);
55
56
  }
56
- function r() {
57
+ function l() {
57
58
  e.value.pop();
58
59
  }
59
60
  function c() {
60
61
  e.value = [];
61
62
  }
62
- return { isEmpty: a, lastView: t, hasView: l, addView: o, delView: n, popView: r, clearViews: c };
63
+ return { isEmpty: a, lastView: t, hasView: r, addView: o, delView: n, popView: l, clearViews: c };
63
64
  });
64
65
  /*! js-cookie v3.0.5 | MIT */
65
- function K(e) {
66
+ function L(e) {
66
67
  for (var a = 1; a < arguments.length; a++) {
67
68
  var t = arguments[a];
68
- for (var l in t)
69
- e[l] = t[l];
69
+ for (var r in t)
70
+ e[r] = t[r];
70
71
  }
71
72
  return e;
72
73
  }
@@ -81,48 +82,48 @@ var Se = {
81
82
  );
82
83
  }
83
84
  };
84
- function J(e, a) {
85
- function t(o, n, r) {
85
+ function X(e, a) {
86
+ function t(o, n, l) {
86
87
  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
+ l = L({}, a, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
88
89
  var c = "";
89
- for (var u in r)
90
- r[u] && (c += "; " + u, r[u] !== !0 && (c += "=" + r[u].split(";")[0]));
90
+ for (var u in l)
91
+ l[u] && (c += "; " + u, l[u] !== !0 && (c += "=" + l[u].split(";")[0]));
91
92
  return document.cookie = o + "=" + e.write(n, o) + c;
92
93
  }
93
94
  }
94
- function l(o) {
95
+ function r(o) {
95
96
  if (!(typeof document > "u" || arguments.length && !o)) {
96
- for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < n.length; c++) {
97
- var u = n[c].split("="), s = u.slice(1).join("=");
97
+ for (var n = document.cookie ? document.cookie.split("; ") : [], l = {}, c = 0; c < n.length; c++) {
98
+ var u = n[c].split("="), _ = u.slice(1).join("=");
98
99
  try {
99
- var g = decodeURIComponent(u[0]);
100
- if (r[g] = e.read(s, g), o === g)
100
+ var v = decodeURIComponent(u[0]);
101
+ if (l[v] = e.read(_, v), o === v)
101
102
  break;
102
103
  } catch {
103
104
  }
104
105
  }
105
- return o ? r[o] : r;
106
+ return o ? l[o] : l;
106
107
  }
107
108
  }
108
109
  return Object.create(
109
110
  {
110
111
  set: t,
111
- get: l,
112
+ get: r,
112
113
  remove: function(o, n) {
113
114
  t(
114
115
  o,
115
116
  "",
116
- K({}, n, {
117
+ L({}, n, {
117
118
  expires: -1
118
119
  })
119
120
  );
120
121
  },
121
122
  withAttributes: function(o) {
122
- return J(this.converter, K({}, this.attributes, o));
123
+ return X(this.converter, L({}, this.attributes, o));
123
124
  },
124
125
  withConverter: function(o) {
125
- return J(K({}, this.converter, o), this.attributes);
126
+ return X(L({}, this.converter, o), this.attributes);
126
127
  }
127
128
  },
128
129
  {
@@ -131,8 +132,8 @@ function J(e, a) {
131
132
  }
132
133
  );
133
134
  }
134
- var T = J(Se, { path: "/" });
135
- function lt(e) {
135
+ var A = X(Se, { path: "/" });
136
+ function rt(e) {
136
137
  const a = Ce.create({
137
138
  timeout: 6e3
138
139
  });
@@ -147,7 +148,7 @@ function lt(e) {
147
148
  ), a;
148
149
  }
149
150
  function qe(e) {
150
- const a = T.get("accessToken") ?? "";
151
+ const a = A.get("accessToken") ?? "";
151
152
  return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
152
153
  }
153
154
  function Ve(e, a) {
@@ -162,50 +163,50 @@ function Oe(e, a) {
162
163
  if (!t)
163
164
  return Promise.reject(e);
164
165
  t.status === 401 && Te();
165
- let l = (o = t.data) == null ? void 0 : o.message;
166
- return l || (l = {
166
+ let r = (o = t.data) == null ? void 0 : o.message;
167
+ return r || (r = {
167
168
  code: t.status,
168
169
  message: t.statusText
169
- }), a(l), Promise.reject(e);
170
+ }), a(r), Promise.reject(e);
170
171
  }
171
172
  function Te() {
172
- T.remove("accessToken"), T.remove("refreshToken"), T.remove("activeOrg"), ne().replace({ path: "/passport/login" });
173
+ A.remove("accessToken"), A.remove("refreshToken"), A.remove("activeOrg"), le().replace({ path: "/passport/login" });
173
174
  }
174
175
  function je(e) {
175
176
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
176
- var l = e.get(a);
177
- l ? l.push(t) : e.set(a, [t]);
177
+ var r = e.get(a);
178
+ r ? r.push(t) : e.set(a, [t]);
178
179
  }, off: function(a, t) {
179
- var l = e.get(a);
180
- l && (t ? l.splice(l.indexOf(t) >>> 0, 1) : e.set(a, []));
180
+ var r = e.get(a);
181
+ r && (t ? r.splice(r.indexOf(t) >>> 0, 1) : e.set(a, []));
181
182
  }, emit: function(a, t) {
182
- var l = e.get(a);
183
- l && l.slice().map(function(o) {
183
+ var r = e.get(a);
184
+ r && r.slice().map(function(o) {
184
185
  o(t);
185
- }), (l = e.get("*")) && l.slice().map(function(o) {
186
+ }), (r = e.get("*")) && r.slice().map(function(o) {
186
187
  o(a, t);
187
188
  });
188
189
  } };
189
190
  }
190
- const p = je();
191
- async function rt(e) {
191
+ const s = je();
192
+ async function lt(e) {
192
193
  return new Promise((a) => {
193
194
  setTimeout(a, e);
194
195
  });
195
196
  }
196
197
  async function Y(e, a, t) {
197
- const l = Date.now();
198
+ const r = Date.now();
198
199
  return new Promise((o) => {
199
200
  const n = async () => {
200
- e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(n, t ?? 30);
201
+ e() ? o(!0) : a && Date.now() - r > a ? o(!1) : setTimeout(n, t ?? 30);
201
202
  };
202
203
  n();
203
204
  });
204
205
  }
205
- let te = Date.now();
206
+ let ee = Date.now();
206
207
  function ue() {
207
208
  const e = Date.now();
208
- return e - te > 500 ? (te = e, !0) : !1;
209
+ return e - ee > 500 ? (ee = e, !0) : !1;
209
210
  }
210
211
  let Ie = 0;
211
212
  function se() {
@@ -215,51 +216,51 @@ async function nt(e) {
215
216
  if (!ue())
216
217
  return;
217
218
  let a = !1, t;
218
- const l = (n) => {
219
+ const r = (n) => {
219
220
  t = n, a = !0;
220
221
  }, o = se();
221
- return p.on("confirmDlgResult" + o, l), p.emit("confirmDlg", { ...e, seq: o }), await Y(() => a), p.off("confirmDlgResult" + o, l), t;
222
+ return s.on("confirmDlgResult" + o, r), s.emit("confirmDlg", { ...e, seq: o }), await Y(() => a), s.off("confirmDlgResult" + o, r), t;
222
223
  }
223
224
  async function ct(e) {
224
225
  if (!ue())
225
226
  return;
226
227
  let a = !1, t;
227
- const l = (n) => {
228
+ const r = (n) => {
228
229
  t = n, a = !0;
229
230
  }, o = se();
230
- return p.on("promptDlgResult" + o, l), p.emit("promptDlg", { ...e, seq: o }), await Y(() => a), p.off("promptDlgResult" + o, l), t;
231
+ return s.on("promptDlgResult" + o, r), s.emit("promptDlg", { ...e, seq: o }), await Y(() => a), s.off("promptDlgResult" + o, r), t;
231
232
  }
232
233
  function ut() {
233
- p.emit("openWaitDlg");
234
+ s.emit("openWaitDlg");
234
235
  }
235
236
  function st() {
236
- p.emit("closeWaitDlg");
237
+ s.emit("closeWaitDlg");
237
238
  }
238
239
  function pt(e, a) {
239
- p.emit("message", { type: "error", text: e, timeout: a });
240
+ s.emit("message", { type: "error", text: e, timeout: a });
240
241
  }
241
242
  function _t(e, a) {
242
- p.emit("message", { type: "info", text: e, timeout: a });
243
+ s.emit("message", { type: "info", text: e, timeout: a });
243
244
  }
244
245
  function dt(e, a) {
245
- p.emit("message", { type: "success", text: e, timeout: a });
246
+ s.emit("message", { type: "success", text: e, timeout: a });
246
247
  }
247
248
  function it(e, a) {
248
- p.emit("message", { type: "warning", text: e, timeout: a });
249
+ s.emit("message", { type: "warning", text: e, timeout: a });
249
250
  }
250
251
  function ft(e) {
251
- var l, o;
252
+ var r, o;
252
253
  if (!window.appAppear) {
253
254
  window.appAppear = !0;
254
255
  return;
255
256
  }
256
- const a = "single-spa-application:" + e, t = (l = document.getElementById(a)) == null ? void 0 : l.classList;
257
+ const a = "single-spa-application:" + e, t = (r = document.getElementById(a)) == null ? void 0 : r.classList;
257
258
  t && (t.remove("app-left", "app-right", "app-reset"), (o = window.routeExtras) != null && o.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
258
259
  t.add("app-reset");
259
260
  }, 0));
260
261
  }
261
262
  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) {
263
+ function te(e, a) {
263
264
  if (!e)
264
265
  return !1;
265
266
  let t = e;
@@ -272,7 +273,7 @@ function ae(e, a) {
272
273
  return !1;
273
274
  }), Object.keys(t).length <= 0);
274
275
  }
275
- const Ue = [
276
+ const Ae = [
276
277
  { path: "/passport/login", level: 0 },
277
278
  { path: "/passport/loginAccount", level: 1 },
278
279
  { path: "/passport/register", level: 1 },
@@ -292,81 +293,81 @@ const Ue = [
292
293
  { path: "/calc", level: 1, requiredState: "org" },
293
294
  { path: "/data", level: 1, requiredState: "org" }
294
295
  ];
295
- function Z(e) {
296
+ function N(e) {
296
297
  let a, t = 0;
297
- const l = e.split("/");
298
- return Ue.forEach((o) => {
298
+ const r = e.split("/");
299
+ return Ae.forEach((o) => {
299
300
  const n = o.path.split("/");
300
- let r = 0;
301
- for (let c = 0; c < l.length && !(c >= n.length || l[c] !== n[c]); c++)
302
- r++;
303
- r >= t && (a = o, t = r);
301
+ let l = 0;
302
+ for (let c = 0; c < r.length && !(c >= n.length || r[c] !== n[c]); c++)
303
+ l++;
304
+ l >= t && (a = o, t = l);
304
305
  }), a;
305
306
  }
306
- function oe(e) {
307
+ function ae(e) {
307
308
  if (e === "/")
308
309
  return { app: "", path: "/", level: -1 };
309
- const a = Z(e);
310
+ const a = N(e);
310
311
  if (!a)
311
312
  return { app: "invalidApp", path: "/invalidApp/invalidRoute", level: -1 };
312
313
  const t = e.split("/");
313
314
  return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
314
315
  }
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;
316
+ const oe = f("");
317
+ function q(e, a) {
318
+ const t = ae(e), r = ae(a), o = t.app === r.app, n = t.path === r.path, l = t.level >= r.level;
318
319
  console.info(
319
- `~~~~before route change~~~~ ${l.path} -> ${t.path} inner=${o} forward=${r}`
320
- ), o ? n ? le.value = "" : le.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
321
- }
322
- function Ae() {
323
- return !!T.get("accessToken");
320
+ `~~~~before route change~~~~ ${r.path} -> ${t.path} inner=${o} forward=${l}`
321
+ ), o ? n ? oe.value = "" : oe.value = l ? "inner-left" : "inner-right" : window.routeExtras = { forward: l };
324
322
  }
325
323
  function Be() {
326
- return !!T.get("activeOrg");
324
+ return !!A.get("accessToken");
325
+ }
326
+ function Me() {
327
+ return !!A.get("activeOrg");
327
328
  }
328
329
  function gt(e, a, t) {
329
- const l = Ae(), o = Be(), n = Z(e.path);
330
+ const r = Be(), o = Me(), n = N(e.path);
330
331
  if (!n) {
331
332
  t();
332
333
  return;
333
334
  }
334
335
  if (n.requiredState === "auth")
335
- if (l)
336
+ if (r)
336
337
  if (o) {
337
- const r = "/main";
338
- k(r, a.path), t({ path: r });
338
+ const l = "/main";
339
+ q(l, a.path), t({ path: l });
339
340
  } else
340
- k(e.path, a.path), t();
341
+ q(e.path, a.path), t();
341
342
  else {
342
- const r = "/passport/login";
343
- k(r, a.path), t({ path: r });
343
+ const l = "/passport/login";
344
+ q(l, a.path), t({ path: l });
344
345
  }
345
346
  else if (n.requiredState === "org")
346
- if (l)
347
+ if (r)
347
348
  if (o)
348
- k(e.path, a.path), t();
349
+ q(e.path, a.path), t();
349
350
  else {
350
- const r = "/org/joinOrCreate";
351
- k(r, a.path), t({ path: r });
351
+ const l = "/org/joinOrCreate";
352
+ q(l, a.path), t({ path: l });
352
353
  }
353
354
  else {
354
- const r = "/passport/login";
355
- k(r, a.path), t({ path: r });
355
+ const l = "/passport/login";
356
+ q(l, a.path), t({ path: l });
356
357
  }
357
- else if (l)
358
+ else if (r)
358
359
  if (o) {
359
- const r = "/main";
360
- k(r, a.path), t({ path: r });
360
+ const l = "/main";
361
+ q(l, a.path), t({ path: l });
361
362
  } else {
362
- const r = "/org/joinOrCreate";
363
- k(r, a.path), t({ path: r });
363
+ const l = "/org/joinOrCreate";
364
+ q(l, a.path), t({ path: l });
364
365
  }
365
366
  else
366
- k(e.path, a.path), t();
367
+ q(e.path, a.path), t();
367
368
  }
368
- function P(e, a) {
369
- const t = ce(), l = i({
369
+ function Z(e, a) {
370
+ const t = ce(), r = g({
370
371
  get() {
371
372
  return t.hasView(e);
372
373
  },
@@ -374,84 +375,84 @@ function P(e, a) {
374
375
  n ? t.addView(e) : t.delView(e);
375
376
  }
376
377
  }), o = (n) => {
377
- a == null || a(n), l.value = !0;
378
+ a == null || a(n), r.value = !0;
378
379
  };
379
- return C(() => {
380
- p.on(e, o);
381
- }), V(() => {
382
- p.off(e, o);
383
- }), { open: l };
380
+ return V(() => {
381
+ s.on(e, o);
382
+ }), O(() => {
383
+ s.off(e, o);
384
+ }), { open: r };
384
385
  }
385
- const Me = /* @__PURE__ */ I({
386
+ const Ue = /* @__PURE__ */ M({
386
387
  __name: "index",
387
388
  setup(e) {
388
- const a = G(), { open: t } = P("confirmDlg"), l = f(""), o = f(""), n = f(), r = f(), c = i(() => {
389
- var d;
390
- return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
391
- }), u = i(() => {
392
- var d;
393
- return ((d = n.value) == null ? void 0 : d.text) ?? a.t("cancel");
394
- }), s = i(() => {
395
- var d;
396
- return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
397
- }), g = i(() => {
398
- var d;
399
- return ((d = r.value) == null ? void 0 : d.text) ?? a.t("confirm");
389
+ const a = Q(), { open: t } = Z("confirmDlg"), r = f(""), o = f(""), n = f(), l = f(), c = g(() => {
390
+ var p;
391
+ return ((p = n.value) == null ? void 0 : p.color) ?? "primary";
392
+ }), u = g(() => {
393
+ var p;
394
+ return ((p = n.value) == null ? void 0 : p.text) ?? a.t("cancel");
395
+ }), _ = g(() => {
396
+ var p;
397
+ return ((p = l.value) == null ? void 0 : p.color) ?? "primary";
398
+ }), v = g(() => {
399
+ var p;
400
+ return ((p = l.value) == null ? void 0 : p.text) ?? a.t("confirm");
400
401
  });
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;
402
+ let D = 0, b = !1;
403
+ const j = (p) => {
404
+ r.value = p.title, o.value = p.text, n.value = p.cancel, l.value = p.confirm, D = p.seq, b = !1, t.value = !0;
404
405
  };
405
- C(() => {
406
- p.on("confirmDlg", M);
407
- }), V(() => {
408
- p.off("confirmDlg", M);
406
+ V(() => {
407
+ s.on("confirmDlg", j);
408
+ }), O(() => {
409
+ s.off("confirmDlg", j);
409
410
  });
410
- const $ = () => {
411
- t.value = !1, D || (p.emit("confirmDlgResult" + R, !0), D = !0);
411
+ const i = () => {
412
+ t.value = !1, b || (s.emit("confirmDlgResult" + D, !0), b = !0);
412
413
  };
413
- return H(t, (d) => {
414
- !d && !D && (p.emit("confirmDlgResult" + R, !1), D = !0);
415
- }), (d, x) => {
416
- const S = m("v-card-text"), E = m("v-btn"), L = m("v-card-actions"), _ = m("v-card"), w = m("v-dialog");
417
- return b(), j(w, {
414
+ return F(t, (p) => {
415
+ !p && !b && (s.emit("confirmDlgResult" + D, !1), b = !0);
416
+ }), (p, y) => {
417
+ const C = h("v-card-text"), S = h("v-btn"), I = h("v-card-actions"), d = h("v-card"), x = h("v-dialog");
418
+ return R(), B(x, {
418
419
  modelValue: W(t),
419
- "onUpdate:modelValue": x[1] || (x[1] = (U) => X(t) ? t.value = U : null),
420
+ "onUpdate:modelValue": y[1] || (y[1] = (U) => G(t) ? t.value = U : null),
420
421
  onKeydown: [
421
- x[2] || (x[2] = z(B((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
422
- z(B($, ["stop", "prevent"]), ["enter"])
422
+ y[2] || (y[2] = z(K((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
423
+ z(K(i, ["stop", "prevent"]), ["enter"])
423
424
  ],
424
425
  transition: "dialog-top-transition",
425
426
  "max-width": "600px"
426
427
  }, {
427
- default: h(() => [
428
- y(_, { title: l.value }, {
429
- default: h(() => [
430
- y(S, null, {
431
- default: h(() => [
432
- O(q(o.value), 1)
428
+ default: w(() => [
429
+ k(d, { title: r.value }, {
430
+ default: w(() => [
431
+ k(C, null, {
432
+ default: w(() => [
433
+ E(T(o.value), 1)
433
434
  ]),
434
435
  _: 1
435
436
  }),
436
- y(L, { class: "d-flex justify-end" }, {
437
- default: h(() => [
438
- y(E, {
439
- onClick: x[0] || (x[0] = (U) => t.value = !1),
437
+ k(I, { class: "d-flex justify-end" }, {
438
+ default: w(() => [
439
+ k(S, {
440
+ onClick: y[0] || (y[0] = (U) => t.value = !1),
440
441
  color: c.value,
441
442
  variant: "text"
442
443
  }, {
443
- default: h(() => [
444
- O(q(u.value), 1)
444
+ default: w(() => [
445
+ E(T(u.value), 1)
445
446
  ]),
446
447
  _: 1
447
448
  }, 8, ["color"]),
448
- y(E, {
449
- onClick: $,
450
- color: s.value,
449
+ k(S, {
450
+ onClick: i,
451
+ color: _.value,
451
452
  variant: "text"
452
453
  }, {
453
- default: h(() => [
454
- O(q(g.value), 1)
454
+ default: w(() => [
455
+ E(T(v.value), 1)
455
456
  ]),
456
457
  _: 1
457
458
  }, 8, ["color"])
@@ -466,22 +467,22 @@ const Me = /* @__PURE__ */ I({
466
467
  }, 8, ["modelValue", "onKeydown"]);
467
468
  };
468
469
  }
469
- }), $e = (e) => (me("data-v-f4ad116e"), e = e(), he(), e), Le = /* @__PURE__ */ $e(() => /* @__PURE__ */ v("div", { class: "lds-spinner" }, [
470
- /* @__PURE__ */ v("div"),
471
- /* @__PURE__ */ v("div"),
472
- /* @__PURE__ */ v("div"),
473
- /* @__PURE__ */ v("div"),
474
- /* @__PURE__ */ v("div"),
475
- /* @__PURE__ */ v("div"),
476
- /* @__PURE__ */ v("div"),
477
- /* @__PURE__ */ v("div"),
478
- /* @__PURE__ */ v("div"),
479
- /* @__PURE__ */ v("div"),
480
- /* @__PURE__ */ v("div"),
481
- /* @__PURE__ */ v("div")
482
- ], -1)), Ke = [
483
- Le
484
- ], We = /* @__PURE__ */ I({
470
+ }), $e = (e) => (me("data-v-f4ad116e"), e = e(), he(), e), Ke = /* @__PURE__ */ $e(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
471
+ /* @__PURE__ */ m("div"),
472
+ /* @__PURE__ */ m("div"),
473
+ /* @__PURE__ */ m("div"),
474
+ /* @__PURE__ */ m("div"),
475
+ /* @__PURE__ */ m("div"),
476
+ /* @__PURE__ */ m("div"),
477
+ /* @__PURE__ */ m("div"),
478
+ /* @__PURE__ */ m("div"),
479
+ /* @__PURE__ */ m("div"),
480
+ /* @__PURE__ */ m("div"),
481
+ /* @__PURE__ */ m("div"),
482
+ /* @__PURE__ */ m("div")
483
+ ], -1)), Le = [
484
+ Ke
485
+ ], We = /* @__PURE__ */ M({
485
486
  __name: "index",
486
487
  props: {
487
488
  zIndex: {
@@ -490,21 +491,21 @@ const Me = /* @__PURE__ */ I({
490
491
  }
491
492
  },
492
493
  setup(e) {
493
- const a = N(), t = e, l = i(() => ({
494
+ const a = H(), t = e, r = g(() => ({
494
495
  background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
495
496
  zIndex: t.zIndex
496
497
  }));
497
- return (o, n) => (b(), F("div", {
498
+ return (o, n) => (R(), J("div", {
498
499
  class: "x-cont",
499
- style: ve(l.value)
500
- }, Ke, 4));
500
+ style: ve(r.value)
501
+ }, Le, 4));
501
502
  }
502
503
  }), pe = (e, a) => {
503
504
  const t = e.__vccOpts || e;
504
- for (const [l, o] of a)
505
- t[l] = o;
505
+ for (const [r, o] of a)
506
+ t[r] = o;
506
507
  return t;
507
- }, ze = /* @__PURE__ */ pe(We, [["__scopeId", "data-v-f4ad116e"]]), He = /* @__PURE__ */ I({
508
+ }, ze = /* @__PURE__ */ pe(We, [["__scopeId", "data-v-f4ad116e"]]), Ne = /* @__PURE__ */ M({
508
509
  __name: "item",
509
510
  props: {
510
511
  id: {
@@ -526,35 +527,35 @@ const Me = /* @__PURE__ */ I({
526
527
  },
527
528
  emits: ["timeout"],
528
529
  setup(e, { emit: a }) {
529
- const t = e, l = f(!0), o = a, n = i(() => {
530
- let r = "";
530
+ const t = e, r = f(!0), o = a, n = g(() => {
531
+ let l = "";
531
532
  switch (t.type) {
532
533
  case "error":
533
- r = "cancel";
534
+ l = "cancel";
534
535
  break;
535
536
  case "info":
536
- r = "info";
537
+ l = "info";
537
538
  break;
538
539
  case "success":
539
- r = "check-circle";
540
+ l = "check-circle";
540
541
  break;
541
542
  case "warning":
542
- r = "error";
543
+ l = "error";
543
544
  break;
544
545
  }
545
- return r;
546
+ return l;
546
547
  });
547
- return C(() => {
548
+ return V(() => {
548
549
  setTimeout(() => {
549
550
  o("timeout", t.id);
550
551
  }, t.timeout);
551
- }), H(l, (r) => {
552
- r || o("timeout", t.id);
553
- }), (r, c) => {
554
- const u = m("v-alert");
555
- return b(), j(u, {
556
- modelValue: l.value,
557
- "onUpdate:modelValue": c[0] || (c[0] = (s) => l.value = s),
552
+ }), F(r, (l) => {
553
+ l || o("timeout", t.id);
554
+ }), (l, c) => {
555
+ const u = h("v-alert");
556
+ return R(), B(u, {
557
+ modelValue: r.value,
558
+ "onUpdate:modelValue": c[0] || (c[0] = (_) => r.value = _),
558
559
  class: "mt-2",
559
560
  type: e.type,
560
561
  icon: n.value,
@@ -567,128 +568,128 @@ const Me = /* @__PURE__ */ I({
567
568
  }, null, 8, ["modelValue", "type", "icon", "text"]);
568
569
  };
569
570
  }
570
- }), Ne = /* @__PURE__ */ I({
571
+ }), Fe = /* @__PURE__ */ M({
571
572
  __name: "index",
572
573
  setup(e) {
573
574
  const a = we({ items: [] });
574
- C(() => {
575
- p.on("message", t);
576
- }), V(() => {
577
- p.off("message", t);
575
+ V(() => {
576
+ s.on("message", t);
577
+ }), O(() => {
578
+ s.off("message", t);
578
579
  });
579
580
  const t = (c) => {
580
581
  n(c.type, c.text, c.timeout);
581
- }, l = (c) => {
582
- r(c);
582
+ }, r = (c) => {
583
+ l(c);
583
584
  };
584
585
  let o = 0;
585
- const n = (c, u, s) => {
586
- const g = o++;
587
- a.items.push({ id: g, type: c, text: u, timeout: s });
588
- }, r = (c) => {
589
- const u = a.items.findIndex((s) => s.id === c);
586
+ const n = (c, u, _) => {
587
+ const v = o++;
588
+ a.items.push({ id: v, type: c, text: u, timeout: _ });
589
+ }, l = (c) => {
590
+ const u = a.items.findIndex((_) => _.id === c);
590
591
  u >= 0 && a.items.splice(u, 1);
591
592
  };
592
- return (c, u) => (b(), F("div", {
593
- onClick: u[0] || (u[0] = B(() => {
593
+ return (c, u) => (R(), J("div", {
594
+ onClick: u[0] || (u[0] = K(() => {
594
595
  }, ["stop"])),
595
596
  class: "x-cont d-flex flex-column-reverse align-center"
596
597
  }, [
597
- (b(!0), F(ye, null, xe(a.items, (s) => (b(), j(He, {
598
- onTimeout: l,
599
- id: s.id,
600
- type: s.type,
601
- text: s.text,
602
- timeout: s.timeout,
603
- key: s.id
598
+ (R(!0), J(ye, null, xe(a.items, (_) => (R(), B(Ne, {
599
+ onTimeout: r,
600
+ id: _.id,
601
+ type: _.type,
602
+ text: _.text,
603
+ timeout: _.timeout,
604
+ key: _.id
604
605
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
605
606
  ]));
606
607
  }
607
- }), Fe = /* @__PURE__ */ pe(Ne, [["__scopeId", "data-v-70ed4b89"]]), Je = /* @__PURE__ */ I({
608
+ }), He = /* @__PURE__ */ pe(Fe, [["__scopeId", "data-v-70ed4b89"]]), Je = /* @__PURE__ */ M({
608
609
  __name: "index",
609
610
  setup(e) {
610
- const a = G(), { open: t } = P("promptDlg"), l = f(""), o = f(""), n = f(), r = f(), c = f(), u = f(""), s = f(), g = f(), R = i(() => {
611
- var _;
612
- return ((_ = s.value) == null ? void 0 : _.color) ?? "primary";
613
- }), D = i(() => {
614
- var _;
615
- return ((_ = s.value) == null ? void 0 : _.text) ?? a.t("cancel");
616
- }), M = i(() => {
617
- var _;
618
- return ((_ = g.value) == null ? void 0 : _.color) ?? "primary";
619
- }), $ = i(() => {
620
- var _;
621
- return ((_ = g.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, c.value = _.rules, u.value = _.value, s.value = _.cancel, g.value = _.confirm, x = _.seq, S = !1, t.value = !0, await Y(() => d.value !== void 0, 1e3), (w = d.value) == null || w.focus();
611
+ const a = Q(), { open: t } = Z("promptDlg"), r = f(""), o = f(""), n = f(), l = f(), c = f(), u = f(""), _ = f(), v = f(), D = g(() => {
612
+ var d;
613
+ return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
614
+ }), b = g(() => {
615
+ var d;
616
+ return ((d = _.value) == null ? void 0 : d.text) ?? a.t("cancel");
617
+ }), j = g(() => {
618
+ var d;
619
+ return ((d = v.value) == null ? void 0 : d.color) ?? "primary";
620
+ }), i = g(() => {
621
+ var d;
622
+ return ((d = v.value) == null ? void 0 : d.text) ?? a.t("confirm");
623
+ }), p = f();
624
+ let y = 0, C = !1;
625
+ const S = async (d) => {
626
+ var x;
627
+ r.value = d.title, o.value = d.text, n.value = d.label, l.value = d.placeholder, c.value = d.rules, u.value = d.value, _.value = d.cancel, v.value = d.confirm, y = d.seq, C = !1, t.value = !0, await Y(() => p.value !== void 0, 1e3), (x = p.value) == null || x.focus();
627
628
  };
628
- C(() => {
629
- p.on("promptDlg", E);
630
- }), V(() => {
631
- p.off("promptDlg", E);
629
+ V(() => {
630
+ s.on("promptDlg", S);
631
+ }), O(() => {
632
+ s.off("promptDlg", S);
632
633
  });
633
- const L = () => {
634
- t.value = !1, S || (p.emit("promptDlgResult" + x, u.value ?? ""), S = !0);
634
+ const I = () => {
635
+ t.value = !1, C || (s.emit("promptDlgResult" + y, u.value ?? ""), C = !0);
635
636
  };
636
- return H(t, (_) => {
637
- !_ && !S && (p.emit("promptDlgResult" + x, void 0), S = !0);
638
- }), (_, w) => {
639
- const U = m("v-card-text"), _e = m("v-text-field"), de = m("v-form"), ee = m("v-btn"), ie = m("v-card-actions"), fe = m("v-card"), ge = m("v-dialog");
640
- return b(), j(ge, {
637
+ return F(t, (d) => {
638
+ !d && !C && (s.emit("promptDlgResult" + y, void 0), C = !0);
639
+ }), (d, x) => {
640
+ const U = h("v-card-text"), _e = h("v-text-field"), de = h("v-form"), P = h("v-btn"), ie = h("v-card-actions"), fe = h("v-card"), ge = h("v-dialog");
641
+ return R(), B(ge, {
641
642
  modelValue: W(t),
642
- "onUpdate:modelValue": w[2] || (w[2] = (A) => X(t) ? t.value = A : null),
643
+ "onUpdate:modelValue": x[2] || (x[2] = ($) => G(t) ? t.value = $ : null),
643
644
  onKeydown: [
644
- w[3] || (w[3] = z(B((A) => t.value = !1, ["stop", "prevent"]), ["esc"])),
645
- z(B(L, ["stop", "prevent"]), ["enter"])
645
+ x[3] || (x[3] = z(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
646
+ z(K(I, ["stop", "prevent"]), ["enter"])
646
647
  ],
647
648
  transition: "dialog-top-transition",
648
649
  "max-width": "600px"
649
650
  }, {
650
- default: h(() => [
651
- y(fe, { title: l.value }, {
652
- default: h(() => [
653
- o.value ? (b(), j(U, { key: 0 }, {
654
- default: h(() => [
655
- O(q(o.value), 1)
651
+ default: w(() => [
652
+ k(fe, { title: r.value }, {
653
+ default: w(() => [
654
+ o.value ? (R(), B(U, { key: 0 }, {
655
+ default: w(() => [
656
+ E(T(o.value), 1)
656
657
  ]),
657
658
  _: 1
658
659
  })) : ke("", !0),
659
- y(de, { class: "mx-3" }, {
660
- default: h(() => [
661
- y(_e, {
660
+ k(de, { class: "mx-3" }, {
661
+ default: w(() => [
662
+ k(_e, {
662
663
  modelValue: u.value,
663
- "onUpdate:modelValue": w[0] || (w[0] = (A) => u.value = A),
664
+ "onUpdate:modelValue": x[0] || (x[0] = ($) => u.value = $),
664
665
  label: n.value,
665
- placeholder: r.value,
666
+ placeholder: l.value,
666
667
  rules: c.value,
667
668
  ref_key: "target",
668
- ref: d
669
+ ref: p
669
670
  }, null, 8, ["modelValue", "label", "placeholder", "rules"])
670
671
  ]),
671
672
  _: 1
672
673
  }),
673
- y(ie, { class: "d-flex justify-end" }, {
674
- default: h(() => [
675
- y(ee, {
676
- onClick: w[1] || (w[1] = (A) => t.value = !1),
677
- color: R.value,
674
+ k(ie, { class: "d-flex justify-end" }, {
675
+ default: w(() => [
676
+ k(P, {
677
+ onClick: x[1] || (x[1] = ($) => t.value = !1),
678
+ color: D.value,
678
679
  variant: "text"
679
680
  }, {
680
- default: h(() => [
681
- O(q(D.value), 1)
681
+ default: w(() => [
682
+ E(T(b.value), 1)
682
683
  ]),
683
684
  _: 1
684
685
  }, 8, ["color"]),
685
- y(ee, {
686
- onClick: L,
687
- color: M.value,
686
+ k(P, {
687
+ onClick: I,
688
+ color: j.value,
688
689
  variant: "text"
689
690
  }, {
690
- default: h(() => [
691
- O(q($.value), 1)
691
+ default: w(() => [
692
+ E(T(i.value), 1)
692
693
  ]),
693
694
  _: 1
694
695
  }, 8, ["color"])
@@ -703,37 +704,37 @@ const Me = /* @__PURE__ */ I({
703
704
  }, 8, ["modelValue", "onKeydown"]);
704
705
  };
705
706
  }
706
- }), Xe = { class: "mx-auto my-auto" }, Ge = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ I({
707
+ }), Xe = { class: "mx-auto my-auto" }, Ge = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ M({
707
708
  __name: "index",
708
709
  setup(e) {
709
- const a = G(), { open: t } = P("waitDlg"), l = () => {
710
+ const a = Q(), { open: t } = Z("waitDlg"), r = () => {
710
711
  t.value = !0;
711
712
  }, o = () => {
712
713
  t.value = !1;
713
714
  };
714
- return C(() => {
715
- p.on("openWaitDlg", l), p.on("closeWaitDlg", o);
716
- }), V(() => {
717
- p.off("openWaitDlg", l), p.off("closeWaitDlg", o);
718
- }), (n, r) => {
719
- const c = m("v-card"), u = m("v-dialog");
720
- return b(), j(u, {
715
+ return V(() => {
716
+ s.on("openWaitDlg", r), s.on("closeWaitDlg", o);
717
+ }), O(() => {
718
+ s.off("openWaitDlg", r), s.off("closeWaitDlg", o);
719
+ }), (n, l) => {
720
+ const c = h("v-card"), u = h("v-dialog");
721
+ return R(), B(u, {
721
722
  modelValue: W(t),
722
- "onUpdate:modelValue": r[0] || (r[0] = (s) => X(t) ? t.value = s : null),
723
+ "onUpdate:modelValue": l[0] || (l[0] = (_) => G(t) ? t.value = _ : null),
723
724
  persistent: "",
724
725
  "no-click-animation": "",
725
726
  fullscreen: ""
726
727
  }, {
727
- default: h(() => [
728
- v("div", Xe, [
729
- y(c, {
728
+ default: w(() => [
729
+ m("div", Xe, [
730
+ k(c, {
730
731
  width: "300px",
731
732
  height: "80px",
732
733
  loading: ""
733
734
  }, {
734
- default: h(() => [
735
- v("div", Ge, [
736
- v("span", null, q(W(a).t("waitingResponse")), 1)
735
+ default: w(() => [
736
+ m("div", Ge, [
737
+ m("span", null, T(W(a).t("waitingResponse")), 1)
737
738
  ])
738
739
  ]),
739
740
  _: 1
@@ -745,115 +746,124 @@ const Me = /* @__PURE__ */ I({
745
746
  };
746
747
  }
747
748
  }), 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);
749
+ e.component("x-confirm-dlg", Ue), e.component("x-loading", ze), e.component("x-message", He), e.component("x-prompt-dlg", Je), e.component("x-wait-dlg", Qe);
749
750
  };
750
751
  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"), c = i(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
752
+ const e = H(), a = g(() => e.global.current.value.colors.primary), t = g(() => e.global.current.value.colors.secondary), r = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = g(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), l = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
752
753
  return {
753
754
  primaryColor: a,
754
755
  secondaryColor: t,
755
- backgroundColor0: l,
756
+ backgroundColor0: r,
756
757
  backgroundColor1: o,
757
758
  backgroundColor2: n,
758
- highlightColor: r,
759
+ highlightColor: l,
759
760
  borderColor: c
760
761
  };
761
762
  }
762
- function mt(e) {
763
- const a = De(), t = ne(), l = Q(), o = ce(), n = (s) => {
764
- if (s.key === "Escape") {
765
- r();
763
+ function Ze(e, a) {
764
+ return e.post("pullPermission", a);
765
+ }
766
+ function mt(e, a) {
767
+ const t = De(), r = le(), o = ne(), n = ce(), l = () => {
768
+ o.running = !1;
769
+ }, c = () => {
770
+ o.running = !0;
771
+ }, u = () => {
772
+ var p;
773
+ if (!n.isEmpty()) {
774
+ n.hasView("waitDlg") || n.popView();
766
775
  return;
767
776
  }
768
- if (!e && s.ctrlKey && s.shiftKey && s.key.toLowerCase() === "d") {
769
- c();
777
+ const i = N(t.path);
778
+ (i == null ? void 0 : i.level) === 0 ? (p = navigator == null ? void 0 : navigator.Backbutton) == null || p.goHome(
779
+ () => {
780
+ },
781
+ () => {
782
+ }
783
+ ) : r.back();
784
+ };
785
+ V(() => {
786
+ s.on("pause", l), s.on("resume", c), s.on("backbutton", u);
787
+ }), O(() => {
788
+ s.off("pause", l), s.off("resume", c), s.off("backbutton", u);
789
+ });
790
+ const _ = (i) => {
791
+ if (i.key === "Escape") {
792
+ u();
770
793
  return;
771
794
  }
772
- if (!e && s.ctrlKey && s.shiftKey && s.key.toLowerCase() === "l") {
773
- u();
795
+ if (!e && i.ctrlKey && i.shiftKey && i.key.toLowerCase() === "d") {
796
+ o.dark = !o.dark;
774
797
  return;
775
798
  }
776
- }, r = () => {
777
- var g;
778
- if (!o.isEmpty()) {
779
- o.hasView("waitDlg") || o.popView();
799
+ if (!e && i.ctrlKey && i.shiftKey && i.key.toLowerCase() === "l") {
800
+ o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
780
801
  return;
781
802
  }
782
- const s = Z(a.path);
783
- (s == null ? void 0 : s.level) === 0 ? (g = navigator == null ? void 0 : navigator.Backbutton) == null || g.goHome(
784
- () => {
785
- },
786
- () => {
803
+ };
804
+ V(() => {
805
+ window.addEventListener("keydown", _, !1);
806
+ }), O(() => {
807
+ window.removeEventListener("keydown", _, !1);
808
+ });
809
+ let v;
810
+ const D = async () => {
811
+ if (!o.running)
812
+ return;
813
+ const i = N(t.path);
814
+ if (console.log("pullPermission", t.path, i), !(!i || i.requiredState !== "org"))
815
+ try {
816
+ const { update: p, permissions: y } = await Ze(a, {
817
+ checksum: o.permissionChecksum
818
+ });
819
+ if (!p)
820
+ return;
821
+ const C = {};
822
+ for (const S in y) {
823
+ if (S === "checksum")
824
+ continue;
825
+ const I = y[S];
826
+ C[S] = JSON.parse(I);
827
+ }
828
+ o.permissionObjects = C, o.permissionChecksum = y.checksum ?? "";
829
+ } catch (p) {
830
+ console.error(p);
787
831
  }
788
- ) : t.back();
789
- }, c = () => {
790
- l.dark = !l.dark;
791
- }, u = () => {
792
- l.locale === "en" ? l.locale = "zhHans" : l.locale = "en";
832
+ }, b = async (i) => {
833
+ i && await D(), clearTimeout(v), v = setTimeout(async () => {
834
+ await D(), v && b();
835
+ }, 3e3);
836
+ }, j = () => {
837
+ clearTimeout(v), v = void 0;
793
838
  };
794
- return C(() => {
795
- window.addEventListener("keydown", n, !1);
796
- }), V(() => {
797
- window.removeEventListener("keydown", n, !1);
798
- }), { onHotkeyEscape: r, onHotkeyCtrlShiftD: c, onHotkeyCtrlShiftL: u };
839
+ V(() => {
840
+ a && b(!0);
841
+ }), O(() => {
842
+ j();
843
+ });
799
844
  }
800
845
  function ht() {
801
- const e = Q();
802
- function a(t, l) {
846
+ const e = ne();
847
+ function a(t, r) {
803
848
  const o = e.permissionObjects[t];
804
- return o ? l ? !(!ae(o.includes, l) || ae(o.excludes, l)) : !0 : !1;
849
+ return o ? r ? !(!te(o.includes, r) || te(o.excludes, r)) : !0 : !1;
805
850
  }
806
851
  return { verifyPermission: a };
807
852
  }
808
- function Ze(e, a) {
809
- return e.post("pullPermission", a);
810
- }
811
- function wt(e) {
812
- const a = Q();
813
- let t;
814
- const l = () => {
815
- clearTimeout(t), t = setTimeout(async () => {
816
- await o(), t && l();
817
- }, 3e3);
818
- }, o = async () => {
819
- try {
820
- const { update: n, permissions: r } = await Ze(e, {
821
- checksum: a.permissionChecksum
822
- });
823
- if (!n)
824
- return;
825
- const c = {};
826
- for (const u in r) {
827
- if (u === "checksum")
828
- continue;
829
- const s = r[u];
830
- c[u] = JSON.parse(s);
831
- }
832
- a.permissionObjects = c, a.permissionChecksum = r.checksum ?? "";
833
- } catch (n) {
834
- console.error(n);
835
- }
836
- };
837
- return C(() => {
838
- o(), l();
839
- }), V(() => {
840
- clearTimeout(t), t = void 0;
841
- }), {};
842
- }
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");
845
- return { dark: t, sysBarAvail: l, compactWidth: o };
853
+ function wt() {
854
+ const e = H(), a = be(), t = g(() => e.current.value.dark), r = g(() => !!window.cordova), o = g(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
855
+ return { dark: t, sysBarAvail: r, compactWidth: o };
846
856
  }
847
- const xt = { install: Ye };
857
+ const yt = { install: Ye };
848
858
  export {
849
859
  Ee as Permission,
850
860
  ft as appAppear,
851
861
  st as closeWaitDlg,
852
- lt as createAxios,
853
- xt as default,
854
- p as eventBus,
855
- ae as isExist,
856
- Z as matchRouteMeta,
862
+ rt as createAxios,
863
+ yt as default,
864
+ s as eventBus,
865
+ te as isExist,
866
+ N as matchRouteMeta,
857
867
  pt as messageError,
858
868
  _t as messageInfo,
859
869
  dt as messageSuccess,
@@ -862,15 +872,14 @@ export {
862
872
  nt as openConfirmDlg,
863
873
  ct as openPromptDlg,
864
874
  ut as openWaitDlg,
865
- le as routeTransName,
875
+ oe as routeTransName,
866
876
  vt as useColor,
867
- Q as useGlobalStore,
868
- mt as useHotkey,
877
+ ne as useGlobalStore,
878
+ mt as useMicroApp,
869
879
  ht as usePermission,
870
- wt as usePullPermission,
871
- yt as useSystem,
880
+ wt as useSystem,
872
881
  ce as useViewMgrStore,
873
- P as useViewStack,
874
- rt as waitMs,
882
+ Z as useViewStack,
883
+ lt as waitMs,
875
884
  Y as waitUtil
876
885
  };
@@ -1,15 +1,18 @@
1
1
  import { PermissionObjects } from '../utils/permission';
2
2
  export declare const useGlobalStore: import("pinia").StoreDefinition<"global", import("pinia")._UnwrapAll<Pick<{
3
+ running: import("vue").Ref<boolean>;
3
4
  dark: import("vue").Ref<boolean | undefined>;
4
5
  locale: import("vue").Ref<string>;
5
6
  permissionObjects: import("vue").Ref<PermissionObjects>;
6
7
  permissionChecksum: import("vue").Ref<string>;
7
- }, "dark" | "locale" | "permissionObjects" | "permissionChecksum">>, Pick<{
8
+ }, "dark" | "locale" | "permissionObjects" | "permissionChecksum" | "running">>, Pick<{
9
+ running: import("vue").Ref<boolean>;
8
10
  dark: import("vue").Ref<boolean | undefined>;
9
11
  locale: import("vue").Ref<string>;
10
12
  permissionObjects: import("vue").Ref<PermissionObjects>;
11
13
  permissionChecksum: import("vue").Ref<string>;
12
14
  }, never>, Pick<{
15
+ running: import("vue").Ref<boolean>;
13
16
  dark: import("vue").Ref<boolean | undefined>;
14
17
  locale: import("vue").Ref<string>;
15
18
  permissionObjects: import("vue").Ref<PermissionObjects>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.4.6",
4
+ "version": "0.5.1",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",