x-essential-lib 0.5.43 → 0.5.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +221 -220
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.id="x-essential-lib",a.appendChild(document.createTextNode('.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-8c2268ea]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { ref as i, watch as N, computed as f, onMounted as S, onBeforeUnmount as T, defineComponent as U, resolveComponent as h, openBlock as V, createBlock as E, unref as F, isRef as G, withKeys as M, withModifiers as W, withCtx as w, createVNode as k, createTextVNode as B, toDisplayString as A, createElementBlock as J, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as m, reactive as he, Fragment as we, renderList as xe, createCommentVNode as ye } from "vue";
2
+ import { ref as f, watch as N, computed as i, onMounted as S, onBeforeUnmount as O, defineComponent as M, resolveComponent as h, openBlock as R, createBlock as E, unref as L, isRef as G, withKeys as F, withModifiers as K, withCtx as w, createVNode as k, createTextVNode as I, toDisplayString as j, createElementBlock as J, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as m, reactive as he, Fragment as we, renderList as xe, createCommentVNode as ye } from "vue";
3
3
  import { useTheme as H, useLocale as Q, useDisplay as ke } from "vuetify";
4
4
  import { defineStore as le } from "pinia";
5
5
  import be from "axios";
6
- import { useRouter as ne, useRoute as Ce } from "vue-router";
6
+ import { useRouter as re, useRoute as Ce } from "vue-router";
7
7
  const Y = le(
8
8
  "global",
9
9
  () => {
10
- const e = H(), a = i(), t = i("en"), l = i({}), o = i(""), r = i("/");
10
+ const e = H(), a = f(), t = f("en"), l = f({}), o = f(""), n = f("");
11
11
  return N(
12
12
  a,
13
13
  () => {
@@ -21,7 +21,7 @@ const Y = le(
21
21
  locale: t,
22
22
  permissionObjects: l,
23
23
  permissionChecksum: o,
24
- lastAppPath: r
24
+ lastAppPath: n
25
25
  };
26
26
  },
27
27
  {
@@ -36,8 +36,8 @@ const Y = le(
36
36
  }
37
37
  ]
38
38
  }
39
- ), re = le("viewMgr", () => {
40
- const e = i([]);
39
+ ), ne = le("viewMgr", () => {
40
+ const e = f([]);
41
41
  function a() {
42
42
  return e.value.length <= 0;
43
43
  }
@@ -52,11 +52,11 @@ const Y = le(
52
52
  function o(p) {
53
53
  e.value.push(p);
54
54
  }
55
- function r(p) {
55
+ function n(p) {
56
56
  const _ = e.value.findIndex((v) => v === p);
57
57
  _ !== -1 && e.value.splice(_, e.value.length - _);
58
58
  }
59
- function n() {
59
+ function r() {
60
60
  console.assert(e.value.length > 0), e.value.pop();
61
61
  }
62
62
  function c() {
@@ -68,13 +68,13 @@ const Y = le(
68
68
  lastView: t,
69
69
  hasView: l,
70
70
  addView: o,
71
- delView: r,
72
- popView: n,
71
+ delView: n,
72
+ popView: r,
73
73
  clearViews: c
74
74
  };
75
75
  });
76
76
  /*! js-cookie v3.0.5 | MIT */
77
- function L(e) {
77
+ function z(e) {
78
78
  for (var a = 1; a < arguments.length; a++) {
79
79
  var t = arguments[a];
80
80
  for (var l in t)
@@ -94,47 +94,47 @@ var De = {
94
94
  }
95
95
  };
96
96
  function X(e, a) {
97
- function t(o, r, n) {
97
+ function t(o, n, r) {
98
98
  if (!(typeof document > "u")) {
99
- n = L({}, a, n), typeof n.expires == "number" && (n.expires = new Date(Date.now() + n.expires * 864e5)), n.expires && (n.expires = n.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
99
+ r = z({}, 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);
100
100
  var c = "";
101
- for (var p in n)
102
- n[p] && (c += "; " + p, n[p] !== !0 && (c += "=" + n[p].split(";")[0]));
103
- return document.cookie = o + "=" + e.write(r, o) + c;
101
+ for (var p in r)
102
+ r[p] && (c += "; " + p, r[p] !== !0 && (c += "=" + r[p].split(";")[0]));
103
+ return document.cookie = o + "=" + e.write(n, o) + c;
104
104
  }
105
105
  }
106
106
  function l(o) {
107
107
  if (!(typeof document > "u" || arguments.length && !o)) {
108
- for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, c = 0; c < r.length; c++) {
109
- var p = r[c].split("="), _ = p.slice(1).join("=");
108
+ for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < n.length; c++) {
109
+ var p = n[c].split("="), _ = p.slice(1).join("=");
110
110
  try {
111
111
  var v = decodeURIComponent(p[0]);
112
- if (n[v] = e.read(_, v), o === v)
112
+ if (r[v] = e.read(_, v), o === v)
113
113
  break;
114
114
  } catch {
115
115
  }
116
116
  }
117
- return o ? n[o] : n;
117
+ return o ? r[o] : r;
118
118
  }
119
119
  }
120
120
  return Object.create(
121
121
  {
122
122
  set: t,
123
123
  get: l,
124
- remove: function(o, r) {
124
+ remove: function(o, n) {
125
125
  t(
126
126
  o,
127
127
  "",
128
- L({}, r, {
128
+ z({}, n, {
129
129
  expires: -1
130
130
  })
131
131
  );
132
132
  },
133
133
  withAttributes: function(o) {
134
- return X(this.converter, L({}, this.attributes, o));
134
+ return X(this.converter, z({}, this.attributes, o));
135
135
  },
136
136
  withConverter: function(o) {
137
- return X(L({}, this.converter, o), this.attributes);
137
+ return X(z({}, this.converter, o), this.attributes);
138
138
  }
139
139
  },
140
140
  {
@@ -143,7 +143,7 @@ function X(e, a) {
143
143
  }
144
144
  );
145
145
  }
146
- var R = X(De, { path: "/" });
146
+ var B = X(De, { path: "/" });
147
147
  function lt(e) {
148
148
  const a = be.create({
149
149
  timeout: 6e3
@@ -151,39 +151,39 @@ function lt(e) {
151
151
  return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
152
152
  (t) => Se(t),
153
153
  (t) => {
154
- Ve(t, e.onError);
154
+ Re(t, e.onError);
155
155
  }
156
156
  ), a.interceptors.response.use(
157
- (t) => qe(t),
158
- (t) => Oe(t, e.onError)
157
+ (t) => Ve(t),
158
+ (t) => qe(t, e.onError)
159
159
  ), a;
160
160
  }
161
161
  function Se(e) {
162
- const a = R.get("accessToken") ?? "";
162
+ const a = B.get("accessToken") ?? "";
163
163
  return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
164
164
  }
165
- function Ve(e, a) {
165
+ function Re(e, a) {
166
166
  console.error(e), a("request timeout");
167
167
  }
168
- function qe(e) {
168
+ function Ve(e) {
169
169
  return e.data;
170
170
  }
171
- function Oe(e, a) {
171
+ function qe(e, a) {
172
172
  var o;
173
173
  const t = e.response;
174
174
  if (!t)
175
175
  return Promise.reject(e);
176
- t.status === 401 && Te();
176
+ t.status === 401 && Oe();
177
177
  let l = (o = t.data) == null ? void 0 : o.message;
178
178
  return l || (l = {
179
179
  code: t.status,
180
180
  message: t.statusText
181
181
  }), a(l), Promise.reject(e);
182
182
  }
183
- function Te() {
184
- R.remove("accessToken"), R.remove("refreshToken"), R.remove("activeOrg"), ne().replace({ path: "/passport/login" });
183
+ function Oe() {
184
+ B.remove("accessToken"), B.remove("refreshToken"), B.remove("activeOrg"), re().replace({ path: "/passport/login" });
185
185
  }
186
- function je(e) {
186
+ function Te(e) {
187
187
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
188
188
  var l = e.get(a);
189
189
  l ? l.push(t) : e.set(a, [t]);
@@ -200,9 +200,9 @@ function je(e) {
200
200
  } };
201
201
  }
202
202
  const s = function() {
203
- return window.eventBus || (window.eventBus = je()), window.eventBus;
203
+ return window.eventBus || (window.eventBus = Te()), window.eventBus;
204
204
  }();
205
- async function nt(e) {
205
+ async function rt(e) {
206
206
  return new Promise((a) => {
207
207
  setTimeout(a, e);
208
208
  });
@@ -210,18 +210,14 @@ async function nt(e) {
210
210
  async function Z(e, a, t) {
211
211
  const l = Date.now();
212
212
  return new Promise((o) => {
213
- const r = async () => {
214
- e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(r, t ?? 30);
213
+ const n = async () => {
214
+ e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(n, t ?? 30);
215
215
  };
216
- r();
216
+ n();
217
217
  });
218
218
  }
219
- function Ae(e, a) {
219
+ function je(e, a) {
220
220
  var o;
221
- if (!window.appAppear) {
222
- window.appAppear = !0;
223
- return;
224
- }
225
221
  const t = "single-spa-application:" + e, l = (o = document.getElementById(t)) == null ? void 0 : o.classList;
226
222
  l && (l.remove("app-left", "app-right", "app-reset"), a ? l.add("app-left") : l.add("app-right"), setTimeout(() => {
227
223
  l.add("app-reset");
@@ -232,16 +228,16 @@ function ce() {
232
228
  const e = Date.now();
233
229
  return e - te > 500 ? (te = e, !0) : !1;
234
230
  }
235
- let Ie = 0;
231
+ let Ae = 0;
236
232
  function ue() {
237
- return ++Ie;
233
+ return ++Ae;
238
234
  }
239
- async function rt(e) {
235
+ async function nt(e) {
240
236
  if (!ce())
241
237
  return;
242
238
  let a = !1, t;
243
- const l = (r) => {
244
- t = r, a = !0;
239
+ const l = (n) => {
240
+ t = n, a = !0;
245
241
  }, o = ue();
246
242
  return s.on("confirmDlgResult" + o, l), s.emit("confirmDlg", { ...e, seq: o }), await Z(() => a), s.off("confirmDlgResult" + o, l), t;
247
243
  }
@@ -249,8 +245,8 @@ async function ct(e) {
249
245
  if (!ce())
250
246
  return;
251
247
  let a = !1, t;
252
- const l = (r) => {
253
- t = r, a = !0;
248
+ const l = (n) => {
249
+ t = n, a = !0;
254
250
  }, o = ue();
255
251
  return s.on("promptDlgResult" + o, l), s.emit("promptDlg", { ...e, seq: o }), await Z(() => a), s.off("promptDlgResult" + o, l), t;
256
252
  }
@@ -269,10 +265,10 @@ function _t(e, a) {
269
265
  function dt(e, a) {
270
266
  s.emit("message", { type: "success", text: e, timeout: a });
271
267
  }
272
- function it(e, a) {
268
+ function ft(e, a) {
273
269
  s.emit("message", { type: "warning", text: e, timeout: a });
274
270
  }
275
- var Be = /* @__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))(Be || {});
271
+ var Ie = /* @__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))(Ie || {});
276
272
  function ae(e, a) {
277
273
  if (!e)
278
274
  return !1;
@@ -286,7 +282,7 @@ function ae(e, a) {
286
282
  return !1;
287
283
  }), Object.keys(t).length <= 0);
288
284
  }
289
- const Re = [
285
+ const Be = [
290
286
  {
291
287
  app: "x-passport-mf",
292
288
  path: "/passport/login",
@@ -394,127 +390,132 @@ const Re = [
394
390
  mainActive: 2
395
391
  }
396
392
  ];
397
- function z(e) {
393
+ function W(e) {
398
394
  let a, t = 0;
399
395
  const l = e.split("/").filter((o) => o.trim() !== "");
400
- return Re.forEach((o) => {
401
- const r = o.path.split("/").filter((c) => c.trim() !== "");
402
- let n = 0;
403
- for (let c = 0; c < l.length && !(c >= r.length || l[c] !== r[c]); c++)
404
- n++;
405
- n > 0 && n >= t && (a = o, t = n);
396
+ return Be.forEach((o) => {
397
+ const n = o.path.split("/").filter((c) => c.trim() !== "");
398
+ let r = 0;
399
+ for (let c = 0; c < l.length && !(c >= n.length || l[c] !== n[c]); c++)
400
+ r++;
401
+ r > 0 && r >= t && (a = o, t = r);
406
402
  }), a;
407
403
  }
408
- const oe = i("");
404
+ const oe = f("");
409
405
  function D(e, a) {
410
406
  const t = Y();
411
407
  a === "/" && (a = t.lastAppPath);
412
- const l = z(e), o = z(a), r = (l == null ? void 0 : l.app) === (o == null ? void 0 : o.app), n = (l == null ? void 0 : l.path) === (o == null ? void 0 : o.path), c = ((l == null ? void 0 : l.level) ?? -1) >= ((o == null ? void 0 : o.level) ?? -1);
413
- console.info(
414
- `~~~~before route change~~~~ ${a} -> ${e} inner=${r} forward=${c}`
415
- ), r ? n ? oe.value = "" : oe.value = c ? "inner-left" : "inner-right" : l && Ae(l.app, c);
408
+ const l = W(e), o = W(a);
409
+ if (!l) {
410
+ console.assert(!1, "invalid to route meta");
411
+ return;
412
+ }
413
+ if (console.info(`~~~~route~~~~ ${a} -> ${e}`), !o)
414
+ return;
415
+ const n = l.app === o.app, r = l.path === o.path, c = l.level >= l.level;
416
+ n ? r ? oe.value = "" : oe.value = c ? "inner-left" : "inner-right" : je(l.app, c), t.lastAppPath = "";
416
417
  }
417
418
  function Ee() {
418
- return !!R.get("accessToken");
419
+ return !!B.get("accessToken");
419
420
  }
420
- function Ue() {
421
- return !!R.get("activeOrg");
421
+ function Me() {
422
+ return !!B.get("activeOrg");
422
423
  }
423
- function ft(e, a, t) {
424
- const l = Ee(), o = Ue(), r = z(e.path);
425
- if (!r) {
424
+ function it(e, a, t) {
425
+ const l = Ee(), o = Me(), n = W(e.path);
426
+ if (!n) {
426
427
  t();
427
428
  return;
428
429
  }
429
- if (r.requiredState === "auth")
430
+ if (n.requiredState === "auth")
430
431
  if (l)
431
432
  if (o) {
432
- const n = "/main";
433
- D(n, a.path), t({ path: n });
433
+ const r = "/main";
434
+ D(r, a.path), t({ path: r });
434
435
  } else
435
436
  D(e.path, a.path), t();
436
437
  else {
437
- const n = "/passport/login";
438
- D(n, a.path), t({ path: n });
438
+ const r = "/passport/login";
439
+ D(r, a.path), t({ path: r });
439
440
  }
440
- else if (r.requiredState === "org")
441
+ else if (n.requiredState === "org")
441
442
  if (l)
442
443
  if (o)
443
444
  D(e.path, a.path), t();
444
445
  else {
445
- const n = "/org/joinOrCreate";
446
- D(n, a.path), t({ path: n });
446
+ const r = "/org/joinOrCreate";
447
+ D(r, a.path), t({ path: r });
447
448
  }
448
449
  else {
449
- const n = "/passport/login";
450
- D(n, a.path), t({ path: n });
450
+ const r = "/passport/login";
451
+ D(r, a.path), t({ path: r });
451
452
  }
452
453
  else if (l)
453
454
  if (o) {
454
- const n = "/main";
455
- D(n, a.path), t({ path: n });
455
+ const r = "/main";
456
+ D(r, a.path), t({ path: r });
456
457
  } else {
457
- const n = "/org/joinOrCreate";
458
- D(n, a.path), t({ path: n });
458
+ const r = "/org/joinOrCreate";
459
+ D(r, a.path), t({ path: r });
459
460
  }
460
461
  else
461
462
  D(e.path, a.path), t();
462
463
  }
463
464
  function P(e, a) {
464
- const t = re(), l = f({
465
+ const t = ne(), l = i({
465
466
  get() {
466
467
  return t.hasView(e);
467
468
  },
468
- set(r) {
469
- r ? t.addView(e) : t.delView(e);
469
+ set(n) {
470
+ n ? t.addView(e) : t.delView(e);
470
471
  }
471
- }), o = (r) => {
472
- a == null || a(r), l.value = !0;
472
+ }), o = (n) => {
473
+ a == null || a(n), l.value = !0;
473
474
  };
474
475
  return S(() => {
475
476
  s.on(e, o);
476
- }), T(() => {
477
+ }), O(() => {
477
478
  s.off(e, o);
478
479
  }), { open: l };
479
480
  }
480
- const $e = /* @__PURE__ */ U({
481
+ const Ue = /* @__PURE__ */ M({
481
482
  __name: "index",
482
483
  setup(e) {
483
- const a = Q(), { open: t } = P("confirmDlg"), l = i(""), o = i(""), r = i(), n = i(), c = f(() => {
484
+ const a = Q(), { open: t } = P("confirmDlg"), l = f(""), o = f(""), n = f(), r = f(), c = i(() => {
484
485
  var u;
485
- return ((u = r.value) == null ? void 0 : u.color) ?? "primary";
486
- }), p = f(() => {
486
+ return ((u = n.value) == null ? void 0 : u.color) ?? "primary";
487
+ }), p = i(() => {
487
488
  var u;
488
- return ((u = r.value) == null ? void 0 : u.text) ?? a.t("cancel");
489
- }), _ = f(() => {
489
+ return ((u = n.value) == null ? void 0 : u.text) ?? a.t("cancel");
490
+ }), _ = i(() => {
490
491
  var u;
491
- return ((u = n.value) == null ? void 0 : u.color) ?? "primary";
492
- }), v = f(() => {
492
+ return ((u = r.value) == null ? void 0 : u.color) ?? "primary";
493
+ }), v = i(() => {
493
494
  var u;
494
- return ((u = n.value) == null ? void 0 : u.text) ?? a.t("confirm");
495
+ return ((u = r.value) == null ? void 0 : u.text) ?? a.t("confirm");
495
496
  });
496
497
  let y = 0, C = !1;
497
- const j = (u) => {
498
- l.value = u.title, o.value = u.text, r.value = u.cancel, n.value = u.confirm, y = u.seq, C = !1, t.value = !0;
498
+ const T = (u) => {
499
+ l.value = u.title, o.value = u.text, n.value = u.cancel, r.value = u.confirm, y = u.seq, C = !1, t.value = !0;
499
500
  };
500
501
  S(() => {
501
- s.on("confirmDlg", j);
502
- }), T(() => {
503
- s.off("confirmDlg", j);
502
+ s.on("confirmDlg", T);
503
+ }), O(() => {
504
+ s.off("confirmDlg", T);
504
505
  });
505
- const I = () => {
506
+ const A = () => {
506
507
  t.value = !1, C || (s.emit("confirmDlgResult" + y, !0), C = !0);
507
508
  };
508
509
  return N(t, (u) => {
509
510
  !u && !C && (s.emit("confirmDlgResult" + y, !1), C = !0);
510
511
  }), (u, g) => {
511
- const b = h("v-card-text"), q = h("v-btn"), O = h("v-card-actions"), d = h("v-card"), x = h("v-dialog");
512
- return V(), E(x, {
513
- modelValue: F(t),
514
- "onUpdate:modelValue": g[1] || (g[1] = ($) => G(t) ? t.value = $ : null),
512
+ const b = h("v-card-text"), V = h("v-btn"), q = h("v-card-actions"), d = h("v-card"), x = h("v-dialog");
513
+ return R(), E(x, {
514
+ modelValue: L(t),
515
+ "onUpdate:modelValue": g[1] || (g[1] = (U) => G(t) ? t.value = U : null),
515
516
  onKeydown: [
516
- g[2] || (g[2] = M(W(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
517
- M(W(I, ["stop", "prevent"]), ["enter"])
517
+ g[2] || (g[2] = F(K((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
518
+ F(K(A, ["stop", "prevent"]), ["enter"])
518
519
  ],
519
520
  transition: "dialog-top-transition",
520
521
  "max-width": "600px"
@@ -524,29 +525,29 @@ const $e = /* @__PURE__ */ U({
524
525
  default: w(() => [
525
526
  k(b, null, {
526
527
  default: w(() => [
527
- B(A(o.value), 1)
528
+ I(j(o.value), 1)
528
529
  ]),
529
530
  _: 1
530
531
  }),
531
- k(O, { class: "d-flex justify-end" }, {
532
+ k(q, { class: "d-flex justify-end" }, {
532
533
  default: w(() => [
533
- k(q, {
534
- onClick: g[0] || (g[0] = ($) => t.value = !1),
534
+ k(V, {
535
+ onClick: g[0] || (g[0] = (U) => t.value = !1),
535
536
  color: c.value,
536
537
  variant: "text"
537
538
  }, {
538
539
  default: w(() => [
539
- B(A(p.value), 1)
540
+ I(j(p.value), 1)
540
541
  ]),
541
542
  _: 1
542
543
  }, 8, ["color"]),
543
- k(q, {
544
- onClick: I,
544
+ k(V, {
545
+ onClick: A,
545
546
  color: _.value,
546
547
  variant: "text"
547
548
  }, {
548
549
  default: w(() => [
549
- B(A(v.value), 1)
550
+ I(j(v.value), 1)
550
551
  ]),
551
552
  _: 1
552
553
  }, 8, ["color"])
@@ -561,7 +562,7 @@ const $e = /* @__PURE__ */ U({
561
562
  }, 8, ["modelValue", "onKeydown"]);
562
563
  };
563
564
  }
564
- }), Ke = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), We = /* @__PURE__ */ Ke(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
565
+ }), $e = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), Ke = /* @__PURE__ */ $e(() => /* @__PURE__ */ m("div", { class: "lds-spinner" }, [
565
566
  /* @__PURE__ */ m("div"),
566
567
  /* @__PURE__ */ m("div"),
567
568
  /* @__PURE__ */ m("div"),
@@ -574,9 +575,9 @@ const $e = /* @__PURE__ */ U({
574
575
  /* @__PURE__ */ m("div"),
575
576
  /* @__PURE__ */ m("div"),
576
577
  /* @__PURE__ */ m("div")
577
- ], -1)), ze = [
578
- We
579
- ], Le = /* @__PURE__ */ U({
578
+ ], -1)), We = [
579
+ Ke
580
+ ], ze = /* @__PURE__ */ M({
580
581
  __name: "index",
581
582
  props: {
582
583
  zIndex: {
@@ -585,21 +586,21 @@ const $e = /* @__PURE__ */ U({
585
586
  }
586
587
  },
587
588
  setup(e) {
588
- const a = H(), t = e, l = f(() => ({
589
+ const a = H(), t = e, l = i(() => ({
589
590
  background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
590
591
  zIndex: t.zIndex
591
592
  }));
592
- return (o, r) => (V(), J("div", {
593
+ return (o, n) => (R(), J("div", {
593
594
  class: "x-cont",
594
595
  style: ge(l.value)
595
- }, ze, 4));
596
+ }, We, 4));
596
597
  }
597
598
  }), pe = (e, a) => {
598
599
  const t = e.__vccOpts || e;
599
600
  for (const [l, o] of a)
600
601
  t[l] = o;
601
602
  return t;
602
- }, Fe = /* @__PURE__ */ pe(Le, [["__scopeId", "data-v-f4ad116e"]]), Me = /* @__PURE__ */ U({
603
+ }, Le = /* @__PURE__ */ pe(ze, [["__scopeId", "data-v-f4ad116e"]]), Fe = /* @__PURE__ */ M({
603
604
  __name: "item",
604
605
  props: {
605
606
  id: {},
@@ -609,57 +610,57 @@ const $e = /* @__PURE__ */ U({
609
610
  },
610
611
  emits: ["timeout"],
611
612
  setup(e, { emit: a }) {
612
- const t = e, l = i(!0), o = a;
613
+ const t = e, l = f(!0), o = a;
613
614
  return S(() => {
614
615
  setTimeout(() => {
615
616
  o("timeout", t.id);
616
617
  }, t.timeout);
617
- }), N(l, (r) => {
618
- r || o("timeout", t.id);
619
- }), (r, n) => {
618
+ }), N(l, (n) => {
619
+ n || o("timeout", t.id);
620
+ }), (n, r) => {
620
621
  const c = h("v-alert");
621
- return V(), E(c, {
622
+ return R(), E(c, {
622
623
  modelValue: l.value,
623
- "onUpdate:modelValue": n[0] || (n[0] = (p) => l.value = p),
624
+ "onUpdate:modelValue": r[0] || (r[0] = (p) => l.value = p),
624
625
  class: "mt-2",
625
626
  "max-width": "90%",
626
627
  width: "500px",
627
628
  elevation: "1",
628
629
  density: "compact",
629
630
  closable: "",
630
- type: r.type,
631
- text: r.text
631
+ type: n.type,
632
+ text: n.text
632
633
  }, null, 8, ["modelValue", "type", "text"]);
633
634
  };
634
635
  }
635
- }), Ne = /* @__PURE__ */ U({
636
+ }), Ne = /* @__PURE__ */ M({
636
637
  __name: "index",
637
638
  setup(e) {
638
639
  const a = he({ items: [] });
639
640
  S(() => {
640
641
  s.on("message", t);
641
- }), T(() => {
642
+ }), O(() => {
642
643
  s.off("message", t);
643
644
  });
644
645
  const t = (c) => {
645
- r(c.type, c.text, c.timeout);
646
+ n(c.type, c.text, c.timeout);
646
647
  }, l = (c) => {
647
- n(c);
648
+ r(c);
648
649
  };
649
650
  let o = 0;
650
- const r = (c, p, _) => {
651
+ const n = (c, p, _) => {
651
652
  const v = o++;
652
653
  a.items.push({ id: v, type: c, text: p, timeout: _ });
653
- }, n = (c) => {
654
+ }, r = (c) => {
654
655
  const p = a.items.findIndex((_) => _.id === c);
655
656
  p >= 0 && a.items.splice(p, 1);
656
657
  };
657
- return (c, p) => (V(), J("div", {
658
- onClick: p[0] || (p[0] = W(() => {
658
+ return (c, p) => (R(), J("div", {
659
+ onClick: p[0] || (p[0] = K(() => {
659
660
  }, ["stop"])),
660
661
  class: "x-cont d-flex flex-column-reverse align-center"
661
662
  }, [
662
- (V(!0), J(we, null, xe(a.items, (_) => (V(), E(Me, {
663
+ (R(!0), J(we, null, xe(a.items, (_) => (R(), E(Fe, {
663
664
  onTimeout: l,
664
665
  id: _.id,
665
666
  type: _.type,
@@ -669,55 +670,55 @@ const $e = /* @__PURE__ */ U({
669
670
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
670
671
  ]));
671
672
  }
672
- }), He = /* @__PURE__ */ pe(Ne, [["__scopeId", "data-v-8c2268ea"]]), Je = /* @__PURE__ */ U({
673
+ }), He = /* @__PURE__ */ pe(Ne, [["__scopeId", "data-v-8c2268ea"]]), Je = /* @__PURE__ */ M({
673
674
  __name: "index",
674
675
  setup(e) {
675
- const a = Q(), { open: t } = P("promptDlg"), l = i(""), o = i(""), r = i(), n = i(), c = i(), p = i(""), _ = i(), v = i(), y = f(() => {
676
+ const a = Q(), { open: t } = P("promptDlg"), l = f(""), o = f(""), n = f(), r = f(), c = f(), p = f(""), _ = f(), v = f(), y = i(() => {
676
677
  var d;
677
678
  return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
678
- }), C = f(() => {
679
+ }), C = i(() => {
679
680
  var d;
680
681
  return ((d = _.value) == null ? void 0 : d.text) ?? a.t("cancel");
681
- }), j = f(() => {
682
+ }), T = i(() => {
682
683
  var d;
683
684
  return ((d = v.value) == null ? void 0 : d.color) ?? "primary";
684
- }), I = f(() => {
685
+ }), A = i(() => {
685
686
  var d;
686
687
  return ((d = v.value) == null ? void 0 : d.text) ?? a.t("confirm");
687
- }), u = i();
688
+ }), u = f();
688
689
  let g = 0, b = !1;
689
- const q = async (d) => {
690
+ const V = async (d) => {
690
691
  var x;
691
- l.value = d.title, o.value = d.text, r.value = d.label, n.value = d.placeholder, c.value = d.rules, p.value = d.value, _.value = d.cancel, v.value = d.confirm, g = d.seq, b = !1, t.value = !0, await Z(() => u.value !== void 0, 1e3), (x = u.value) == null || x.focus();
692
+ l.value = d.title, o.value = d.text, n.value = d.label, r.value = d.placeholder, c.value = d.rules, p.value = d.value, _.value = d.cancel, v.value = d.confirm, g = d.seq, b = !1, t.value = !0, await Z(() => u.value !== void 0, 1e3), (x = u.value) == null || x.focus();
692
693
  };
693
694
  S(() => {
694
- s.on("promptDlg", q);
695
- }), T(() => {
696
- s.off("promptDlg", q);
695
+ s.on("promptDlg", V);
696
+ }), O(() => {
697
+ s.off("promptDlg", V);
697
698
  });
698
- const O = () => {
699
+ const q = () => {
699
700
  t.value = !1, b || (s.emit("promptDlgResult" + g, p.value ?? ""), b = !0);
700
701
  };
701
702
  return N(t, (d) => {
702
703
  !d && !b && (s.emit("promptDlgResult" + g, void 0), b = !0);
703
704
  }), (d, x) => {
704
- const $ = h("v-card-text"), se = h("v-text-field"), _e = h("v-form"), ee = h("v-btn"), de = h("v-card-actions"), ie = h("v-card"), fe = h("v-dialog");
705
- return V(), E(fe, {
706
- modelValue: F(t),
707
- "onUpdate:modelValue": x[2] || (x[2] = (K) => G(t) ? t.value = K : null),
705
+ const U = h("v-card-text"), se = h("v-text-field"), _e = h("v-form"), ee = h("v-btn"), de = h("v-card-actions"), fe = h("v-card"), ie = h("v-dialog");
706
+ return R(), E(ie, {
707
+ modelValue: L(t),
708
+ "onUpdate:modelValue": x[2] || (x[2] = ($) => G(t) ? t.value = $ : null),
708
709
  onKeydown: [
709
- x[3] || (x[3] = M(W((K) => t.value = !1, ["stop", "prevent"]), ["esc"])),
710
- M(W(O, ["stop", "prevent"]), ["enter"])
710
+ x[3] || (x[3] = F(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
711
+ F(K(q, ["stop", "prevent"]), ["enter"])
711
712
  ],
712
713
  transition: "dialog-top-transition",
713
714
  "max-width": "600px"
714
715
  }, {
715
716
  default: w(() => [
716
- k(ie, { title: l.value }, {
717
+ k(fe, { title: l.value }, {
717
718
  default: w(() => [
718
- o.value ? (V(), E($, { key: 0 }, {
719
+ o.value ? (R(), E(U, { key: 0 }, {
719
720
  default: w(() => [
720
- B(A(o.value), 1)
721
+ I(j(o.value), 1)
721
722
  ]),
722
723
  _: 1
723
724
  })) : ye("", !0),
@@ -725,9 +726,9 @@ const $e = /* @__PURE__ */ U({
725
726
  default: w(() => [
726
727
  k(se, {
727
728
  modelValue: p.value,
728
- "onUpdate:modelValue": x[0] || (x[0] = (K) => p.value = K),
729
- label: r.value,
730
- placeholder: n.value,
729
+ "onUpdate:modelValue": x[0] || (x[0] = ($) => p.value = $),
730
+ label: n.value,
731
+ placeholder: r.value,
731
732
  rules: c.value,
732
733
  ref_key: "target",
733
734
  ref: u
@@ -738,22 +739,22 @@ const $e = /* @__PURE__ */ U({
738
739
  k(de, { class: "d-flex justify-end" }, {
739
740
  default: w(() => [
740
741
  k(ee, {
741
- onClick: x[1] || (x[1] = (K) => t.value = !1),
742
+ onClick: x[1] || (x[1] = ($) => t.value = !1),
742
743
  color: y.value,
743
744
  variant: "text"
744
745
  }, {
745
746
  default: w(() => [
746
- B(A(C.value), 1)
747
+ I(j(C.value), 1)
747
748
  ]),
748
749
  _: 1
749
750
  }, 8, ["color"]),
750
751
  k(ee, {
751
- onClick: O,
752
- color: j.value,
752
+ onClick: q,
753
+ color: T.value,
753
754
  variant: "text"
754
755
  }, {
755
756
  default: w(() => [
756
- B(A(I.value), 1)
757
+ I(j(A.value), 1)
757
758
  ]),
758
759
  _: 1
759
760
  }, 8, ["color"])
@@ -768,7 +769,7 @@ const $e = /* @__PURE__ */ U({
768
769
  }, 8, ["modelValue", "onKeydown"]);
769
770
  };
770
771
  }
771
- }), Xe = { class: "mx-auto my-auto" }, Ge = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ U({
772
+ }), Xe = { class: "mx-auto my-auto" }, Ge = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ M({
772
773
  __name: "index",
773
774
  setup(e) {
774
775
  const a = Q(), { open: t } = P("waitDlg"), l = () => {
@@ -778,13 +779,13 @@ const $e = /* @__PURE__ */ U({
778
779
  };
779
780
  return S(() => {
780
781
  s.on("openWaitDlg", l), s.on("closeWaitDlg", o);
781
- }), T(() => {
782
+ }), O(() => {
782
783
  s.off("openWaitDlg", l), s.off("closeWaitDlg", o);
783
- }), (r, n) => {
784
+ }), (n, r) => {
784
785
  const c = h("v-card"), p = h("v-dialog");
785
- return V(), E(p, {
786
- modelValue: F(t),
787
- "onUpdate:modelValue": n[0] || (n[0] = (_) => G(t) ? t.value = _ : null),
786
+ return R(), E(p, {
787
+ modelValue: L(t),
788
+ "onUpdate:modelValue": r[0] || (r[0] = (_) => G(t) ? t.value = _ : null),
788
789
  persistent: "",
789
790
  "no-click-animation": "",
790
791
  fullscreen: ""
@@ -798,7 +799,7 @@ const $e = /* @__PURE__ */ U({
798
799
  }, {
799
800
  default: w(() => [
800
801
  m("div", Ge, [
801
- m("span", null, A(F(a).t("waitingResponse")), 1)
802
+ m("span", null, j(L(a).t("waitingResponse")), 1)
802
803
  ])
803
804
  ]),
804
805
  _: 1
@@ -810,17 +811,17 @@ const $e = /* @__PURE__ */ U({
810
811
  };
811
812
  }
812
813
  }), Ye = (e) => {
813
- e.component("x-confirm-dlg", $e), e.component("x-loading", Fe), e.component("x-message", He), e.component("x-prompt-dlg", Je), e.component("x-wait-dlg", Qe);
814
+ e.component("x-confirm-dlg", Ue), e.component("x-loading", Le), e.component("x-message", He), e.component("x-prompt-dlg", Je), e.component("x-wait-dlg", Qe);
814
815
  };
815
816
  function gt() {
816
- 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"), r = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), n = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
817
+ const e = H(), 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");
817
818
  return {
818
819
  primaryColor: a,
819
820
  secondaryColor: t,
820
821
  backgroundColor0: l,
821
822
  backgroundColor1: o,
822
- backgroundColor2: r,
823
- highlightColor: n,
823
+ backgroundColor2: n,
824
+ highlightColor: r,
824
825
  borderColor: c
825
826
  };
826
827
  }
@@ -828,19 +829,19 @@ function Ze(e, a) {
828
829
  return e.post("pullPermission", a);
829
830
  }
830
831
  function vt(e, a) {
831
- const t = Ce(), l = ne(), o = Y(), r = re();
832
- let n = !0;
832
+ const t = Ce(), l = re(), o = Y(), n = ne();
833
+ let r = !0;
833
834
  const c = () => {
834
- n = !1;
835
+ r = !1;
835
836
  }, p = () => {
836
- n = !0;
837
+ r = !0;
837
838
  }, _ = () => {
838
839
  var g;
839
- if (!r.isEmpty()) {
840
- r.hasView("waitDlg") || r.popView();
840
+ if (!n.isEmpty()) {
841
+ n.hasView("waitDlg") || n.popView();
841
842
  return;
842
843
  }
843
- const u = z(t.path);
844
+ const u = W(t.path);
844
845
  (u == null ? void 0 : u.level) === 0 ? (g = navigator == null ? void 0 : navigator.Backbutton) == null || g.goHome(
845
846
  () => {
846
847
  },
@@ -850,7 +851,7 @@ function vt(e, a) {
850
851
  };
851
852
  S(() => {
852
853
  s.on("pause", c), s.on("resume", p), s.on("backbutton", _);
853
- }), T(() => {
854
+ }), O(() => {
854
855
  s.off("pause", c), s.off("resume", p), s.off("backbutton", _);
855
856
  });
856
857
  const v = (u) => {
@@ -869,14 +870,14 @@ function vt(e, a) {
869
870
  };
870
871
  S(() => {
871
872
  window.addEventListener("keydown", v);
872
- }), T(() => {
873
+ }), O(() => {
873
874
  window.removeEventListener("keydown", v);
874
875
  });
875
876
  let y;
876
877
  const C = async () => {
877
- if (!n)
878
+ if (!r)
878
879
  return;
879
- const u = z(t.path);
880
+ const u = W(t.path);
880
881
  if (!(!u || u.requiredState !== "org"))
881
882
  try {
882
883
  const { update: g, permissions: b } = await Ze(a, {
@@ -884,28 +885,28 @@ function vt(e, a) {
884
885
  });
885
886
  if (!g)
886
887
  return;
887
- const q = {};
888
- for (const O in b) {
889
- if (O === "checksum")
888
+ const V = {};
889
+ for (const q in b) {
890
+ if (q === "checksum")
890
891
  continue;
891
- const d = b[O];
892
- q[O] = JSON.parse(d);
892
+ const d = b[q];
893
+ V[q] = JSON.parse(d);
893
894
  }
894
- o.permissionObjects = q, o.permissionChecksum = b.checksum ?? "";
895
+ o.permissionObjects = V, o.permissionChecksum = b.checksum ?? "";
895
896
  } catch (g) {
896
897
  console.error(g);
897
898
  }
898
- }, j = async (u) => {
899
+ }, T = async (u) => {
899
900
  u && await C(), clearTimeout(y), y = setTimeout(async () => {
900
- await C(), y && j();
901
+ await C(), y && T();
901
902
  }, 3e3);
902
- }, I = () => {
903
+ }, A = () => {
903
904
  clearTimeout(y), y = void 0;
904
905
  };
905
906
  S(() => {
906
- a && j(!0);
907
- }), T(() => {
908
- I();
907
+ a && T(!0);
908
+ }), O(() => {
909
+ A();
909
910
  });
910
911
  }
911
912
  function mt() {
@@ -917,25 +918,25 @@ function mt() {
917
918
  return { verifyPermission: a };
918
919
  }
919
920
  function ht() {
920
- const e = H(), a = ke(), 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");
921
+ const e = H(), a = ke(), 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");
921
922
  return { dark: t, sysBarAvail: l, compactWidth: o };
922
923
  }
923
924
  const wt = { install: Ye };
924
925
  export {
925
- Be as Permission,
926
- Ae as appAppear,
926
+ Ie as Permission,
927
+ je as appAppear,
927
928
  pt as closeWaitDlg,
928
929
  lt as createAxios,
929
930
  wt as default,
930
931
  s as eventBus,
931
932
  ae as isExist,
932
- z as matchRouteMeta,
933
+ W as matchRouteMeta,
933
934
  st as messageError,
934
935
  _t as messageInfo,
935
936
  dt as messageSuccess,
936
- it as messageWarning,
937
- ft as onBeforeEach,
938
- rt as openConfirmDlg,
937
+ ft as messageWarning,
938
+ it as onBeforeEach,
939
+ nt as openConfirmDlg,
939
940
  ct as openPromptDlg,
940
941
  ut as openWaitDlg,
941
942
  oe as routeTransName,
@@ -944,8 +945,8 @@ export {
944
945
  vt as useMicroApp,
945
946
  mt as usePermission,
946
947
  ht as useSystem,
947
- re as useViewMgrStore,
948
+ ne as useViewMgrStore,
948
949
  P as useViewStack,
949
- nt as waitMs,
950
+ rt as waitMs,
950
951
  Z as waitUtil
951
952
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.5.43",
4
+ "version": "0.5.45",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",