x-essential-lib 0.5.14 → 0.5.16

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