x-essential-lib 0.5.13 → 0.5.14

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