x-essential-lib 0.3.19 → 0.4.0

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