@das-fed/web 6.3.0-beta.8 → 6.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/esm-map.json +10 -9
  2. package/index-CTiS2AQx.js +68 -0
  3. package/index-CTiS2AQx.js.gz +0 -0
  4. package/index-DZPzbqdK.js +10 -0
  5. package/index-DjsZCo03.js +70 -0
  6. package/index-DjsZCo03.js.gz +0 -0
  7. package/index-LVjuqzoG.js +11086 -0
  8. package/index-LVjuqzoG.js.gz +0 -0
  9. package/index.js +27 -2202
  10. package/package.json +11 -7
  11. package/packages/create-das-web-app/index.js +307 -289
  12. package/packages/create-das-web-app/index.js.gz +0 -0
  13. package/packages/i18n/index.js +29 -30
  14. package/packages/i18n/index.js.gz +0 -0
  15. package/packages/layout/index.js +302 -290
  16. package/packages/layout/index.js.gz +0 -0
  17. package/packages/layout/style.css +1 -1
  18. package/packages/layout/style.css.gz +0 -0
  19. package/packages/main-app-framework/index-2WWk8ggi.js +9022 -0
  20. package/packages/main-app-framework/index-2WWk8ggi.js.gz +0 -0
  21. package/packages/main-app-framework/index-BqkWKMMe.js +70 -0
  22. package/packages/main-app-framework/index-BqkWKMMe.js.gz +0 -0
  23. package/packages/main-app-framework/index-CRT8yHn-.js +10 -0
  24. package/packages/main-app-framework/index-Twj2RXRy.js +68 -0
  25. package/packages/main-app-framework/index-Twj2RXRy.js.gz +0 -0
  26. package/packages/main-app-framework/index.js +5 -0
  27. package/packages/main-app-framework/style.css +1 -0
  28. package/packages/main-app-framework/style.css.gz +0 -0
  29. package/packages/micro-frontend/index.js +174 -170
  30. package/packages/micro-frontend/index.js.gz +0 -0
  31. package/packages/style/index.js +5 -2
  32. package/packages/theme/index.js +38 -39
  33. package/packages/theme/index.js.gz +0 -0
  34. package/style.css +1 -1
  35. package/style.css.gz +0 -0
  36. package/types/create-das-web-app/index.d.ts +1 -1
  37. package/types/create-das-web-app/router/index.d.ts +2 -1
  38. package/types/i18n/index.d.ts +2 -2
  39. package/types/index.d.ts +1 -0
  40. package/types/layout/store/index.d.ts +1 -1
  41. package/types/main-app-framework/business/alarm/api.d.ts +34 -0
  42. package/types/main-app-framework/business/alarm/components/hooks/use-handle-alarm.d.ts +7 -0
  43. package/types/main-app-framework/business/alarm/use-alarm.d.ts +12 -0
  44. package/types/main-app-framework/business/index.d.ts +4 -0
  45. package/types/main-app-framework/business/message-notify/index.d.ts +1 -0
  46. package/types/main-app-framework/business/remote-control/apis.d.ts +6 -0
  47. package/types/main-app-framework/business/remote-control/createServiceConnection.d.ts +3 -0
  48. package/types/main-app-framework/business/remote-control/index.d.ts +1 -0
  49. package/types/main-app-framework/business/video-link/api.d.ts +28 -0
  50. package/types/main-app-framework/business/video-link/index.d.ts +6 -0
  51. package/types/main-app-framework/business/video-link/open.d.ts +4 -0
  52. package/types/main-app-framework/business/video-link/video-dialog/hooks/PlayerProvider.d.ts +4 -0
  53. package/types/main-app-framework/business/video-link/video-dialog/hooks/index.d.ts +6 -0
  54. package/types/main-app-framework/components/entry-page-tip/index.d.ts +3 -0
  55. package/types/main-app-framework/components/entry-page-tip/src/index.d.ts +1 -0
  56. package/types/main-app-framework/components/entry-page-tip/src/open.d.ts +5 -0
  57. package/types/main-app-framework/components/entry-page-tip/theme/index.d.ts +6 -0
  58. package/types/main-app-framework/components/index.d.ts +3 -0
  59. package/types/main-app-framework/components/person-set-dialog/index.d.ts +4 -0
  60. package/types/main-app-framework/components/person-set-dialog/src/api.d.ts +2 -0
  61. package/types/main-app-framework/components/watermark/index.d.ts +3 -0
  62. package/types/main-app-framework/components/watermark/src/api.d.ts +1 -0
  63. package/types/main-app-framework/constant/index.d.ts +6 -0
  64. package/types/main-app-framework/index.d.ts +28 -0
  65. package/types/main-app-framework/init-config/get-manu-config/api.d.ts +4 -0
  66. package/types/main-app-framework/init-config/get-manu-config/getInstanceInfo.d.ts +1 -0
  67. package/types/main-app-framework/init-config/get-manu-config/index.d.ts +47 -0
  68. package/types/main-app-framework/init-config/get-nav-config/api.d.ts +2 -0
  69. package/types/main-app-framework/init-config/get-nav-config/index.d.ts +4 -0
  70. package/types/main-app-framework/init-config/get-project-config/api.d.ts +4 -0
  71. package/types/main-app-framework/init-config/get-project-config/index.d.ts +1 -0
  72. package/types/main-app-framework/init-config/get-system-config/api.d.ts +8 -0
  73. package/types/main-app-framework/init-config/get-system-config/index.d.ts +11 -0
  74. package/types/main-app-framework/init-config/get-tenant-config/api.d.ts +6 -0
  75. package/types/main-app-framework/init-config/get-tenant-config/index.d.ts +6 -0
  76. package/types/main-app-framework/init-config/index.d.ts +5 -0
  77. package/types/main-app-framework/init-layout/apis/index.d.ts +2 -0
  78. package/types/main-app-framework/init-layout/hooks/nav-slots/index.d.ts +4 -0
  79. package/types/main-app-framework/init-layout/hooks/nav-slots/use-change-enterprises.d.ts +8 -0
  80. package/types/main-app-framework/init-layout/hooks/nav-slots/use-project.d.ts +1 -0
  81. package/types/main-app-framework/init-layout/hooks/nav-slots/use-search.d.ts +4 -0
  82. package/types/main-app-framework/init-layout/hooks/nav-slots/use-user-command.d.ts +4 -0
  83. package/types/main-app-framework/init-layout/hooks/use-entry-app.d.ts +11 -0
  84. package/types/main-app-framework/init-layout/hooks/use-entry-menu.d.ts +7 -0
  85. package/types/main-app-framework/init-layout/hooks/use-initialization.d.ts +8 -0
  86. package/types/main-app-framework/init-layout/hooks/use-menu.d.ts +1 -0
  87. package/types/main-app-framework/init-layout/hooks/use-nav.d.ts +1 -0
  88. package/types/main-app-framework/init-layout/hooks/use-route-reload-unload.d.ts +4 -0
  89. package/types/main-app-framework/init-layout/hooks/use-route-watcher.d.ts +3 -0
  90. package/types/main-app-framework/init-layout/hooks/use-system-confirm.d.ts +1 -0
  91. package/types/main-app-framework/init-layout/hooks/use-tabs.d.ts +5 -0
  92. package/types/main-app-framework/init-layout/index.d.ts +11 -0
  93. package/types/main-app-framework/init-layout/store/index.d.ts +4 -0
  94. package/types/main-app-framework/init-platform/api.d.ts +2 -0
  95. package/types/main-app-framework/init-platform/index.d.ts +4 -0
  96. package/types/main-app-framework/micro-apps/index.d.ts +3 -0
  97. package/types/main-app-framework/micro-apps/use-device-panel-watcher.d.ts +1 -0
  98. package/types/main-app-framework/micro-apps/use-iot-watcher.d.ts +1 -0
  99. package/types/main-app-framework/micro-apps/use-user-info-watcher.d.ts +3 -0
  100. package/types/main-app-framework/pages/app/api.d.ts +2 -0
  101. package/types/main-app-framework/utils/index.d.ts +3 -0
  102. package/types/main-app-framework/utils/src/layout-confirm.d.ts +12 -0
  103. package/types/main-app-framework/utils/src/set-common-info.d.ts +62 -0
  104. package/types/main-app-framework/utils/src/tools.d.ts +1 -0
  105. package/types/micro-frontend/store.d.ts +5 -5
  106. package/types/theme/index.d.ts +1 -1
  107. package/index.js.gz +0 -0
  108. package/types/create-das-web-app/get-global-config.d.ts +0 -2
package/index.js CHANGED
@@ -1,2204 +1,29 @@
1
- import { effectScope as kt, ref as S, markRaw as ut, toRaw as Ve, watch as N, unref as b, createApp as Rt, reactive as ee, computed as p, defineComponent as G, openBlock as g, createElementBlock as C, Fragment as me, createBlock as R, TransitionGroup as $t, normalizeProps as Pe, mergeProps as Ie, withCtx as z, renderList as ke, withDirectives as x, resolveDynamicComponent as re, vShow as F, createCommentVNode as E, nextTick as _e, resolveComponent as Dt, createElementVNode as U, normalizeClass as Nt, normalizeStyle as Vt, renderSlot as W, createVNode as Y, Transition as ze, guardReactiveProps as Ge, KeepAlive as Qe, h as Te, onBeforeMount as xt, onMounted as dt, onUnmounted as Ft, onActivated as jt, getCurrentScope as Ut, onScopeDispose as Bt, getCurrentInstance as Ht } from "vue";
2
- import { initTheme as Wt } from "@das-fed/web/packages/theme/index";
3
- import { initI18n as zt } from "@das-fed/web/packages/i18n/index";
4
- import { initMainApp as Gt, initMicroApp as Qt } from "@das-fed/web/packages/micro-frontend/index";
5
- import { DasWebLayout as ft, DasWebNav as qt, DasWebMenu as Jt, DasWebTabs as Kt } from "@das-fed/web/packages/layout/index";
6
- import { createRouter as Yt, createWebHistory as Xt, useRouter as Zt, useRoute as mt } from "vue-router";
7
- import { flatTree as en } from "@das-fed/utils/common-tools/nest-tree-format";
8
- import { setHtmlMinWH as Ce } from "@das-fed/utils/common-tools/setHtmlMinWH";
9
- import { createCeNav as tn, createCeTabs as nn, createCeMenu as sn } from "@das-fed/web-components";
10
- const rn = {
11
- install: (e, t) => {
12
- var s;
13
- const n = (s = t == null ? void 0 : t.plugins) == null ? void 0 : s.glob;
14
- n && Object.values(n).sort((r, a) => (r.index ?? 0) - (a.index ?? 0)).filter((r) => r ? !!(r.default && r.default.install || r.install) : !1).forEach((r) => {
15
- r.default && r.default.install && e.use(r.default, t), r.install && e.use(r, t);
16
- });
17
- }
18
- };
19
- var an = !1;
20
- function on() {
21
- return pt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
22
- }
23
- function pt() {
24
- return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
25
- }
26
- const cn = typeof Proxy == "function", ln = "devtools-plugin:setup", un = "plugin:settings:set";
27
- let te, Re;
28
- function dn() {
29
- var e;
30
- return te !== void 0 || (typeof window < "u" && window.performance ? (te = !0, Re = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (te = !0, Re = globalThis.perf_hooks.performance) : te = !1), te;
31
- }
32
- function fn() {
33
- return dn() ? Re.now() : Date.now();
34
- }
35
- class mn {
36
- constructor(t, n) {
37
- this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
38
- const s = {};
39
- if (t.settings)
40
- for (const i in t.settings) {
41
- const o = t.settings[i];
42
- s[i] = o.defaultValue;
43
- }
44
- const r = `__vue-devtools-plugin-settings__${t.id}`;
45
- let a = Object.assign({}, s);
46
- try {
47
- const i = localStorage.getItem(r), o = JSON.parse(i);
48
- Object.assign(a, o);
49
- } catch {
50
- }
51
- this.fallbacks = {
52
- getSettings() {
53
- return a;
54
- },
55
- setSettings(i) {
56
- try {
57
- localStorage.setItem(r, JSON.stringify(i));
58
- } catch {
59
- }
60
- a = i;
61
- },
62
- now() {
63
- return fn();
64
- }
65
- }, n && n.on(un, (i, o) => {
66
- i === this.plugin.id && this.fallbacks.setSettings(o);
67
- }), this.proxiedOn = new Proxy({}, {
68
- get: (i, o) => this.target ? this.target.on[o] : (...c) => {
69
- this.onQueue.push({
70
- method: o,
71
- args: c
72
- });
73
- }
74
- }), this.proxiedTarget = new Proxy({}, {
75
- get: (i, o) => this.target ? this.target[o] : o === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(o) ? (...c) => (this.targetQueue.push({
76
- method: o,
77
- args: c,
78
- resolve: () => {
79
- }
80
- }), this.fallbacks[o](...c)) : (...c) => new Promise((l) => {
81
- this.targetQueue.push({
82
- method: o,
83
- args: c,
84
- resolve: l
85
- });
86
- })
87
- });
88
- }
89
- async setRealTarget(t) {
90
- this.target = t;
91
- for (const n of this.onQueue)
92
- this.target.on[n.method](...n.args);
93
- for (const n of this.targetQueue)
94
- n.resolve(await this.target[n.method](...n.args));
95
- }
96
- }
97
- function vt(e, t) {
98
- const n = e, s = pt(), r = on(), a = cn && n.enableEarlyProxy;
99
- if (r && (s.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !a))
100
- r.emit(ln, e, t);
101
- else {
102
- const i = a ? new mn(n, r) : null;
103
- (s.__VUE_DEVTOOLS_PLUGINS__ = s.__VUE_DEVTOOLS_PLUGINS__ || []).push({
104
- pluginDescriptor: n,
105
- setupFn: t,
106
- proxy: i
107
- }), i && t(i.proxiedTarget);
108
- }
109
- }
110
- /*!
111
- * pinia v2.1.7
112
- * (c) 2023 Eduardo San Martin Morote
113
- * @license MIT
114
- */
115
- const pn = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
116
- /* istanbul ignore next */
117
- Symbol()
118
- );
119
- var X;
120
- (function(e) {
121
- e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
122
- })(X || (X = {}));
123
- const gt = typeof window < "u", qe = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && gt, Je = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
124
- function vn(e, { autoBom: t = !1 } = {}) {
125
- return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
126
- }
127
- function xe(e, t, n) {
128
- const s = new XMLHttpRequest();
129
- s.open("GET", e), s.responseType = "blob", s.onload = function() {
130
- yt(s.response, t, n);
131
- }, s.onerror = function() {
132
- }, s.send();
133
- }
134
- function ht(e) {
135
- const t = new XMLHttpRequest();
136
- t.open("HEAD", e, !1);
137
- try {
138
- t.send();
139
- } catch {
140
- }
141
- return t.status >= 200 && t.status <= 299;
142
- }
143
- function ge(e) {
144
- try {
145
- e.dispatchEvent(new MouseEvent("click"));
146
- } catch {
147
- const n = document.createEvent("MouseEvents");
148
- n.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(n);
149
- }
150
- }
151
- const he = typeof navigator == "object" ? navigator : { userAgent: "" }, wt = /Macintosh/.test(he.userAgent) && /AppleWebKit/.test(he.userAgent) && !/Safari/.test(he.userAgent), yt = gt ? (
152
- // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
153
- typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !wt ? gn : (
154
- // Use msSaveOrOpenBlob as a second approach
155
- "msSaveOrOpenBlob" in he ? hn : (
156
- // Fallback to using FileReader and a popup
157
- wn
158
- )
159
- )
160
- ) : () => {
161
- };
162
- function gn(e, t = "download", n) {
163
- const s = document.createElement("a");
164
- s.download = t, s.rel = "noopener", typeof e == "string" ? (s.href = e, s.origin !== location.origin ? ht(s.href) ? xe(e, t, n) : (s.target = "_blank", ge(s)) : ge(s)) : (s.href = URL.createObjectURL(e), setTimeout(function() {
165
- URL.revokeObjectURL(s.href);
166
- }, 4e4), setTimeout(function() {
167
- ge(s);
168
- }, 0));
169
- }
170
- function hn(e, t = "download", n) {
171
- if (typeof e == "string")
172
- if (ht(e))
173
- xe(e, t, n);
174
- else {
175
- const s = document.createElement("a");
176
- s.href = e, s.target = "_blank", setTimeout(function() {
177
- ge(s);
178
- });
179
- }
180
- else
181
- navigator.msSaveOrOpenBlob(vn(e, n), t);
182
- }
183
- function wn(e, t, n, s) {
184
- if (s = s || open("", "_blank"), s && (s.document.title = s.document.body.innerText = "downloading..."), typeof e == "string")
185
- return xe(e, t, n);
186
- const r = e.type === "application/octet-stream", a = /constructor/i.test(String(Je.HTMLElement)) || "safari" in Je, i = /CriOS\/[\d]+/.test(navigator.userAgent);
187
- if ((i || r && a || wt) && typeof FileReader < "u") {
188
- const o = new FileReader();
189
- o.onloadend = function() {
190
- let c = o.result;
191
- if (typeof c != "string")
192
- throw s = null, new Error("Wrong reader.result type");
193
- c = i ? c : c.replace(/^data:[^;]*;/, "data:attachment/file;"), s ? s.location.href = c : location.assign(c), s = null;
194
- }, o.readAsDataURL(e);
195
- } else {
196
- const o = URL.createObjectURL(e);
197
- s ? s.location.assign(o) : location.href = o, s = null, setTimeout(function() {
198
- URL.revokeObjectURL(o);
199
- }, 4e4);
200
- }
201
- }
202
- function T(e, t) {
203
- const n = "🍍 " + e;
204
- typeof __VUE_DEVTOOLS_TOAST__ == "function" && __VUE_DEVTOOLS_TOAST__(n, t);
205
- }
206
- function Fe(e) {
207
- return "_a" in e && "install" in e;
208
- }
209
- function _t() {
210
- if (!("clipboard" in navigator))
211
- return T("Your browser doesn't support the Clipboard API", "error"), !0;
212
- }
213
- function bt(e) {
214
- return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (T('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
215
- }
216
- async function yn(e) {
217
- if (!_t())
218
- try {
219
- await navigator.clipboard.writeText(JSON.stringify(e.state.value)), T("Global state copied to clipboard.");
220
- } catch (t) {
221
- if (bt(t))
222
- return;
223
- T("Failed to serialize the state. Check the console for more details.", "error");
224
- }
225
- }
226
- async function _n(e) {
227
- if (!_t())
228
- try {
229
- At(e, JSON.parse(await navigator.clipboard.readText())), T("Global state pasted from clipboard.");
230
- } catch (t) {
231
- if (bt(t))
232
- return;
233
- T("Failed to deserialize the state from clipboard. Check the console for more details.", "error");
234
- }
235
- }
236
- async function bn(e) {
237
- try {
238
- yt(new Blob([JSON.stringify(e.state.value)], {
239
- type: "text/plain;charset=utf-8"
240
- }), "pinia-state.json");
241
- } catch {
242
- T("Failed to export the state as JSON. Check the console for more details.", "error");
243
- }
244
- }
245
- let B;
246
- function An() {
247
- B || (B = document.createElement("input"), B.type = "file", B.accept = ".json");
248
- function e() {
249
- return new Promise((t, n) => {
250
- B.onchange = async () => {
251
- const s = B.files;
252
- if (!s)
253
- return t(null);
254
- const r = s.item(0);
255
- return t(r ? { text: await r.text(), file: r } : null);
256
- }, B.oncancel = () => t(null), B.onerror = n, B.click();
257
- });
258
- }
259
- return e;
260
- }
261
- async function In(e) {
262
- try {
263
- const n = await An()();
264
- if (!n)
265
- return;
266
- const { text: s, file: r } = n;
267
- At(e, JSON.parse(s)), T(`Global state imported from "${r.name}".`);
268
- } catch {
269
- T("Failed to import the state from JSON. Check the console for more details.", "error");
270
- }
271
- }
272
- function At(e, t) {
273
- for (const n in t) {
274
- const s = e.state.value[n];
275
- s ? Object.assign(s, t[n]) : e.state.value[n] = t[n];
276
- }
277
- }
278
- function V(e) {
279
- return {
280
- _custom: {
281
- display: e
282
- }
283
- };
284
- }
285
- const It = "🍍 Pinia (root)", $e = "_root";
286
- function Sn(e) {
287
- return Fe(e) ? {
288
- id: $e,
289
- label: It
290
- } : {
291
- id: e.$id,
292
- label: e.$id
293
- };
294
- }
295
- function Ln(e) {
296
- if (Fe(e)) {
297
- const n = Array.from(e._s.keys()), s = e._s;
298
- return {
299
- state: n.map((a) => ({
300
- editable: !0,
301
- key: a,
302
- value: e.state.value[a]
303
- })),
304
- getters: n.filter((a) => s.get(a)._getters).map((a) => {
305
- const i = s.get(a);
306
- return {
307
- editable: !1,
308
- key: a,
309
- value: i._getters.reduce((o, c) => (o[c] = i[c], o), {})
310
- };
311
- })
312
- };
313
- }
314
- const t = {
315
- state: Object.keys(e.$state).map((n) => ({
316
- editable: !0,
317
- key: n,
318
- value: e.$state[n]
319
- }))
320
- };
321
- return e._getters && e._getters.length && (t.getters = e._getters.map((n) => ({
322
- editable: !1,
323
- key: n,
324
- value: e[n]
325
- }))), e._customProperties.size && (t.customProperties = Array.from(e._customProperties).map((n) => ({
326
- editable: !0,
327
- key: n,
328
- value: e[n]
329
- }))), t;
330
- }
331
- function En(e) {
332
- return e ? Array.isArray(e) ? e.reduce((t, n) => (t.keys.push(n.key), t.operations.push(n.type), t.oldValue[n.key] = n.oldValue, t.newValue[n.key] = n.newValue, t), {
333
- oldValue: {},
334
- keys: [],
335
- operations: [],
336
- newValue: {}
337
- }) : {
338
- operation: V(e.type),
339
- key: V(e.key),
340
- oldValue: e.oldValue,
341
- newValue: e.newValue
342
- } : {};
343
- }
344
- function Tn(e) {
345
- switch (e) {
346
- case X.direct:
347
- return "mutation";
348
- case X.patchFunction:
349
- return "$patch";
350
- case X.patchObject:
351
- return "$patch";
352
- default:
353
- return "unknown";
354
- }
355
- }
356
- let ae = !0;
357
- const we = [], K = "pinia:mutations", O = "pinia", { assign: Cn } = Object, be = (e) => "🍍 " + e;
358
- function Mn(e, t) {
359
- vt({
360
- id: "dev.esm.pinia",
361
- label: "Pinia 🍍",
362
- logo: "https://pinia.vuejs.org/logo.svg",
363
- packageName: "pinia",
364
- homepage: "https://pinia.vuejs.org",
365
- componentStateTypes: we,
366
- app: e
367
- }, (n) => {
368
- typeof n.now != "function" && T("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), n.addTimelineLayer({
369
- id: K,
370
- label: "Pinia 🍍",
371
- color: 15064968
372
- }), n.addInspector({
373
- id: O,
374
- label: "Pinia 🍍",
375
- icon: "storage",
376
- treeFilterPlaceholder: "Search stores",
377
- actions: [
378
- {
379
- icon: "content_copy",
380
- action: () => {
381
- yn(t);
382
- },
383
- tooltip: "Serialize and copy the state"
384
- },
385
- {
386
- icon: "content_paste",
387
- action: async () => {
388
- await _n(t), n.sendInspectorTree(O), n.sendInspectorState(O);
389
- },
390
- tooltip: "Replace the state with the content of your clipboard"
391
- },
392
- {
393
- icon: "save",
394
- action: () => {
395
- bn(t);
396
- },
397
- tooltip: "Save the state as a JSON file"
398
- },
399
- {
400
- icon: "folder_open",
401
- action: async () => {
402
- await In(t), n.sendInspectorTree(O), n.sendInspectorState(O);
403
- },
404
- tooltip: "Import the state from a JSON file"
405
- }
406
- ],
407
- nodeActions: [
408
- {
409
- icon: "restore",
410
- tooltip: 'Reset the state (with "$reset")',
411
- action: (s) => {
412
- const r = t._s.get(s);
413
- r ? typeof r.$reset != "function" ? T(`Cannot reset "${s}" store because it doesn't have a "$reset" method implemented.`, "warn") : (r.$reset(), T(`Store "${s}" reset.`)) : T(`Cannot reset "${s}" store because it wasn't found.`, "warn");
414
- }
415
- }
416
- ]
417
- }), n.on.inspectComponent((s, r) => {
418
- const a = s.componentInstance && s.componentInstance.proxy;
419
- if (a && a._pStores) {
420
- const i = s.componentInstance.proxy._pStores;
421
- Object.values(i).forEach((o) => {
422
- s.instanceData.state.push({
423
- type: be(o.$id),
424
- key: "state",
425
- editable: !0,
426
- value: o._isOptionsAPI ? {
427
- _custom: {
428
- value: Ve(o.$state),
429
- actions: [
430
- {
431
- icon: "restore",
432
- tooltip: "Reset the state of this store",
433
- action: () => o.$reset()
434
- }
435
- ]
436
- }
437
- } : (
438
- // NOTE: workaround to unwrap transferred refs
439
- Object.keys(o.$state).reduce((c, l) => (c[l] = o.$state[l], c), {})
440
- )
441
- }), o._getters && o._getters.length && s.instanceData.state.push({
442
- type: be(o.$id),
443
- key: "getters",
444
- editable: !1,
445
- value: o._getters.reduce((c, l) => {
446
- try {
447
- c[l] = o[l];
448
- } catch (u) {
449
- c[l] = u;
450
- }
451
- return c;
452
- }, {})
453
- });
454
- });
455
- }
456
- }), n.on.getInspectorTree((s) => {
457
- if (s.app === e && s.inspectorId === O) {
458
- let r = [t];
459
- r = r.concat(Array.from(t._s.values())), s.rootNodes = (s.filter ? r.filter((a) => "$id" in a ? a.$id.toLowerCase().includes(s.filter.toLowerCase()) : It.toLowerCase().includes(s.filter.toLowerCase())) : r).map(Sn);
460
- }
461
- }), n.on.getInspectorState((s) => {
462
- if (s.app === e && s.inspectorId === O) {
463
- const r = s.nodeId === $e ? t : t._s.get(s.nodeId);
464
- if (!r)
465
- return;
466
- r && (s.state = Ln(r));
467
- }
468
- }), n.on.editInspectorState((s, r) => {
469
- if (s.app === e && s.inspectorId === O) {
470
- const a = s.nodeId === $e ? t : t._s.get(s.nodeId);
471
- if (!a)
472
- return T(`store "${s.nodeId}" not found`, "error");
473
- const { path: i } = s;
474
- Fe(a) ? i.unshift("state") : (i.length !== 1 || !a._customProperties.has(i[0]) || i[0] in a.$state) && i.unshift("$state"), ae = !1, s.set(a, i, s.state.value), ae = !0;
475
- }
476
- }), n.on.editComponentState((s) => {
477
- if (s.type.startsWith("🍍")) {
478
- const r = s.type.replace(/^🍍\s*/, ""), a = t._s.get(r);
479
- if (!a)
480
- return T(`store "${r}" not found`, "error");
481
- const { path: i } = s;
482
- if (i[0] !== "state")
483
- return T(`Invalid path for store "${r}":
484
- ${i}
485
- Only state can be modified.`);
486
- i[0] = "$state", ae = !1, s.set(a, i, s.state.value), ae = !0;
487
- }
488
- });
489
- });
490
- }
491
- function On(e, t) {
492
- we.includes(be(t.$id)) || we.push(be(t.$id)), vt({
493
- id: "dev.esm.pinia",
494
- label: "Pinia 🍍",
495
- logo: "https://pinia.vuejs.org/logo.svg",
496
- packageName: "pinia",
497
- homepage: "https://pinia.vuejs.org",
498
- componentStateTypes: we,
499
- app: e,
500
- settings: {
501
- logStoreChanges: {
502
- label: "Notify about new/deleted stores",
503
- type: "boolean",
504
- defaultValue: !0
505
- }
506
- // useEmojis: {
507
- // label: 'Use emojis in messages ⚡️',
508
- // type: 'boolean',
509
- // defaultValue: true,
510
- // },
511
- }
512
- }, (n) => {
513
- const s = typeof n.now == "function" ? n.now.bind(n) : Date.now;
514
- t.$onAction(({ after: i, onError: o, name: c, args: l }) => {
515
- const u = St++;
516
- n.addTimelineEvent({
517
- layerId: K,
518
- event: {
519
- time: s(),
520
- title: "🛫 " + c,
521
- subtitle: "start",
522
- data: {
523
- store: V(t.$id),
524
- action: V(c),
525
- args: l
526
- },
527
- groupId: u
528
- }
529
- }), i((d) => {
530
- Q = void 0, n.addTimelineEvent({
531
- layerId: K,
532
- event: {
533
- time: s(),
534
- title: "🛬 " + c,
535
- subtitle: "end",
536
- data: {
537
- store: V(t.$id),
538
- action: V(c),
539
- args: l,
540
- result: d
541
- },
542
- groupId: u
543
- }
544
- });
545
- }), o((d) => {
546
- Q = void 0, n.addTimelineEvent({
547
- layerId: K,
548
- event: {
549
- time: s(),
550
- logType: "error",
551
- title: "💥 " + c,
552
- subtitle: "end",
553
- data: {
554
- store: V(t.$id),
555
- action: V(c),
556
- args: l,
557
- error: d
558
- },
559
- groupId: u
560
- }
561
- });
562
- });
563
- }, !0), t._customProperties.forEach((i) => {
564
- N(() => b(t[i]), (o, c) => {
565
- n.notifyComponentUpdate(), n.sendInspectorState(O), ae && n.addTimelineEvent({
566
- layerId: K,
567
- event: {
568
- time: s(),
569
- title: "Change",
570
- subtitle: i,
571
- data: {
572
- newValue: o,
573
- oldValue: c
574
- },
575
- groupId: Q
576
- }
577
- });
578
- }, { deep: !0 });
579
- }), t.$subscribe(({ events: i, type: o }, c) => {
580
- if (n.notifyComponentUpdate(), n.sendInspectorState(O), !ae)
581
- return;
582
- const l = {
583
- time: s(),
584
- title: Tn(o),
585
- data: Cn({ store: V(t.$id) }, En(i)),
586
- groupId: Q
587
- };
588
- o === X.patchFunction ? l.subtitle = "⤵️" : o === X.patchObject ? l.subtitle = "🧩" : i && !Array.isArray(i) && (l.subtitle = i.type), i && (l.data["rawEvent(s)"] = {
589
- _custom: {
590
- display: "DebuggerEvent",
591
- type: "object",
592
- tooltip: "raw DebuggerEvent[]",
593
- value: i
594
- }
595
- }), n.addTimelineEvent({
596
- layerId: K,
597
- event: l
598
- });
599
- }, { detached: !0, flush: "sync" });
600
- const r = t._hotUpdate;
601
- t._hotUpdate = ut((i) => {
602
- r(i), n.addTimelineEvent({
603
- layerId: K,
604
- event: {
605
- time: s(),
606
- title: "🔥 " + t.$id,
607
- subtitle: "HMR update",
608
- data: {
609
- store: V(t.$id),
610
- info: V("HMR update")
611
- }
612
- }
613
- }), n.notifyComponentUpdate(), n.sendInspectorTree(O), n.sendInspectorState(O);
614
- });
615
- const { $dispose: a } = t;
616
- t.$dispose = () => {
617
- a(), n.notifyComponentUpdate(), n.sendInspectorTree(O), n.sendInspectorState(O), n.getSettings().logStoreChanges && T(`Disposed "${t.$id}" store 🗑`);
618
- }, n.notifyComponentUpdate(), n.sendInspectorTree(O), n.sendInspectorState(O), n.getSettings().logStoreChanges && T(`"${t.$id}" store installed 🆕`);
619
- });
620
- }
621
- let St = 0, Q;
622
- function Ke(e, t, n) {
623
- const s = t.reduce((r, a) => (r[a] = Ve(e)[a], r), {});
624
- for (const r in s)
625
- e[r] = function() {
626
- const a = St, i = n ? new Proxy(e, {
627
- get(...c) {
628
- return Q = a, Reflect.get(...c);
629
- },
630
- set(...c) {
631
- return Q = a, Reflect.set(...c);
632
- }
633
- }) : e;
634
- Q = a;
635
- const o = s[r].apply(i, arguments);
636
- return Q = void 0, o;
637
- };
638
- }
639
- function Pn({ app: e, store: t, options: n }) {
640
- if (t.$id.startsWith("__hot:"))
641
- return;
642
- t._isOptionsAPI = !!n.state, Ke(t, Object.keys(n.actions), t._isOptionsAPI);
643
- const s = t._hotUpdate;
644
- Ve(t)._hotUpdate = function(r) {
645
- s.apply(this, arguments), Ke(t, Object.keys(r._hmrPayload.actions), !!t._isOptionsAPI);
646
- }, On(
647
- e,
648
- // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
649
- t
650
- );
651
- }
652
- function kn() {
653
- const e = kt(!0), t = e.run(() => S({}));
654
- let n = [], s = [];
655
- const r = ut({
656
- install(a) {
657
- r._a = a, a.provide(pn, r), a.config.globalProperties.$pinia = r, qe && Mn(a, r), s.forEach((i) => n.push(i)), s = [];
658
- },
659
- use(a) {
660
- return !this._a && !an ? s.push(a) : n.push(a), this;
661
- },
662
- _p: n,
663
- // it's actually undefined here
664
- // @ts-expect-error
665
- _a: null,
666
- _e: e,
667
- _s: /* @__PURE__ */ new Map(),
668
- state: t
669
- });
670
- return qe && typeof Proxy < "u" && r.use(Pn), r;
671
- }
672
- process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
673
- /* istanbul ignore next */
674
- Symbol()
675
- );
676
- function Rn(e) {
677
- return typeof e == "object" && e !== null;
678
- }
679
- function Ye(e, t) {
680
- return e = Rn(e) ? e : /* @__PURE__ */ Object.create(null), new Proxy(e, {
681
- get(n, s, r) {
682
- return s === "key" ? Reflect.get(n, s, r) : Reflect.get(n, s, r) || Reflect.get(t, s, r);
683
- }
684
- });
685
- }
686
- function $n(e, t) {
687
- return t.reduce((n, s) => n == null ? void 0 : n[s], e);
688
- }
689
- function Dn(e, t, n) {
690
- return t.slice(0, -1).reduce((s, r) => /^(__proto__)$/.test(r) ? {} : s[r] = s[r] || {}, e)[t[t.length - 1]] = n, e;
691
- }
692
- function Nn(e, t) {
693
- return t.reduce((n, s) => {
694
- const r = s.split(".");
695
- return Dn(n, r, $n(e, r));
696
- }, {});
697
- }
698
- function Vn(e, t) {
699
- return (n) => {
700
- var s;
701
- try {
702
- const {
703
- storage: r = localStorage,
704
- beforeRestore: a = void 0,
705
- afterRestore: i = void 0,
706
- serializer: o = {
707
- serialize: JSON.stringify,
708
- deserialize: JSON.parse
709
- },
710
- key: c = t.$id,
711
- paths: l = null,
712
- debug: u = !1
713
- } = n;
714
- return {
715
- storage: r,
716
- beforeRestore: a,
717
- afterRestore: i,
718
- serializer: o,
719
- key: ((s = e.key) != null ? s : (d) => d)(typeof c == "string" ? c : c(t.$id)),
720
- paths: l,
721
- debug: u
722
- };
723
- } catch {
724
- return n.debug, null;
725
- }
726
- };
727
- }
728
- function Xe(e, { storage: t, serializer: n, key: s, debug: r }) {
729
- try {
730
- const a = t == null ? void 0 : t.getItem(s);
731
- a && e.$patch(n == null ? void 0 : n.deserialize(a));
732
- } catch {
733
- }
734
- }
735
- function Ze(e, { storage: t, serializer: n, key: s, paths: r, debug: a }) {
736
- try {
737
- const i = Array.isArray(r) ? Nn(e, r) : e;
738
- t.setItem(s, n.serialize(i));
739
- } catch {
740
- }
741
- }
742
- function xn(e = {}) {
743
- return (t) => {
744
- const { auto: n = !1 } = e, {
745
- options: { persist: s = n },
746
- store: r,
747
- pinia: a
748
- } = t;
749
- if (!s)
750
- return;
751
- if (!(r.$id in a.state.value)) {
752
- const o = a._s.get(r.$id.replace("__hot:", ""));
753
- o && Promise.resolve().then(() => o.$persist());
754
- return;
755
- }
756
- const i = (Array.isArray(s) ? s.map((o) => Ye(o, e)) : [Ye(s, e)]).map(Vn(e, r)).filter(Boolean);
757
- r.$persist = () => {
758
- i.forEach((o) => {
759
- Ze(r.$state, o);
760
- });
761
- }, r.$hydrate = ({ runHooks: o = !0 } = {}) => {
762
- i.forEach((c) => {
763
- const { beforeRestore: l, afterRestore: u } = c;
764
- o && (l == null || l(t)), Xe(r, c), o && (u == null || u(t));
765
- });
766
- }, i.forEach((o) => {
767
- const { beforeRestore: c, afterRestore: l } = o;
768
- c == null || c(t), Xe(r, o), l == null || l(t), r.$subscribe(
769
- (u, d) => {
770
- Ze(d, o);
771
- },
772
- {
773
- detached: !0
774
- }
775
- );
776
- });
777
- };
778
- }
779
- var Fn = xn();
780
- const De = kn();
781
- De.use(Fn);
782
- const jn = (e) => {
783
- var i, o, c;
784
- const t = ((i = e == null ? void 0 : e.router) == null ? void 0 : i.routerBase) ?? "/", n = ((o = e == null ? void 0 : e.router) == null ? void 0 : o.options) || {}, r = Object.values(((c = e == null ? void 0 : e.router) == null ? void 0 : c.glob) || []).filter((l) => !!l).flat().sort((l, u) => (l.index ?? 0) - (u.index ?? 0)).map((l) => {
785
- const u = l.meta || {};
786
- return u.keepAlive = u.keepAlive ?? e.keepAlive ?? !0, { ...l, meta: u };
787
- });
788
- return { router: Yt({ history: Xt(t), routes: r, ...n }) };
789
- }, Un = () => window.config || {}, tr = (e) => {
790
- e || (e = {}), e = { ...e, ...Un() };
791
- const t = S(!0);
792
- Promise.all([Wt(e), zt(e)]).then(() => {
793
- t.value = !1;
794
- });
795
- const { container: n, component: s, props: r } = (e == null ? void 0 : e.root) || {}, a = Rt(s || ft, r);
796
- a.use(rn, e), a.use(De);
797
- const { router: i } = jn(e);
798
- return e.microApps && e.microApps.length > 0 && Gt(e, i), e.microAppName && Qt(e, i), a.use(i), a.mount(n || "#app"), { app: a, router: i, loading: t, store: De };
799
- }, Lt = ee({}), Et = ee({}), Ae = S("zh-CN"), Bn = "dasI18n", et = (e, t) => {
800
- const n = t === "global", s = !n;
801
- for (const r in e)
802
- n && (Et[r] = e[r]), s && (Lt[r] = e[r]);
803
- }, nr = async (e) => {
804
- var s;
805
- const t = window[Bn];
806
- t && et(t, "global");
807
- const n = (s = e == null ? void 0 : e.i18n) == null ? void 0 : s.glob;
808
- if (n) {
809
- const r = Object.values(n).filter((a) => !!a).flat();
810
- for (const a of r)
811
- et(a);
812
- }
813
- }, Hn = (e, ...t) => p(() => {
814
- const n = Et[e] || Lt[e] || e;
815
- if (n === e) return e;
816
- let s = n[Ae.value];
817
- return Ae.value === "zh-CN" && n["zh-cn"] && !n["zh-CN"] && (s = n["zh-cn"]), t.map((r, a) => {
818
- s = s.replace(`$${a}`, r);
819
- }), s;
820
- }), Wn = Hn, sr = (e, ...t) => Wn(e, ...t).value, rr = (e) => {
821
- Ae.value = e;
822
- }, ar = () => Ae, oe = S("light"), ce = S({
823
- light: {},
824
- dark: {}
825
- }), le = S({
826
- light: {},
827
- dark: {}
828
- }), zn = "dasTheme", pe = "das-theme", Gn = (e) => {
829
- let t = {
830
- light: {},
831
- dark: {}
832
- };
833
- if (!e) return t;
834
- const { light: n = {}, dark: s = {}, base: r = {}, ...a } = e || {};
835
- t.light = { ...n, ...r }, t.dark = s || {};
836
- for (const i in a) {
837
- const o = a[i];
838
- if (typeof o == "string" && (t.light[i] = o), typeof o == "object")
839
- for (const c in o)
840
- t[c] || (t[c] = {}), t[c][i] || (t[c][i] = {}), t[c][i] = o[c];
841
- }
842
- return t;
843
- };
844
- function Qn(e) {
845
- const t = "das-global-theme", n = "das-custom-theme";
846
- if (!document.getElementById(n)) {
847
- const r = document.createElement("style");
848
- r.appendChild(document.createTextNode("")), r.setAttribute("id", n), document.head.appendChild(r);
849
- }
850
- if (!document.getElementById(t)) {
851
- const r = document.createElement("style");
852
- r.appendChild(document.createTextNode("")), r.setAttribute("id", t), document.head.appendChild(r);
853
- }
854
- e || (e = "custom");
855
- let s = document.getElementById(n);
856
- return e === "global" && (s = document.getElementById(t)), s.sheet;
857
- }
858
- const tt = (e, t) => {
859
- t || (t = "custom");
860
- const n = Qn(t), s = Gn(e);
861
- for (const a in s) {
862
- const i = s[a];
863
- for (const o in i) {
864
- const c = i[o], l = `${pe}-${a}`;
865
- n.insertRule(`.${l} { ${o}:${c} } `, n.cssRules.length);
866
- }
867
- t === "global" && (le.value[a] || (le.value[a] = {}), le.value[a] = { ...le.value[a], ...i }), t === "custom" && (ce.value[a] || (ce.value[a] = {}), ce.value[a] = { ...ce.value[a], ...i });
868
- }
869
- const r = `${pe}-${oe.value}`;
870
- document.body.classList.contains(r) || document.body.classList.add(r);
871
- }, or = async (e) => {
872
- var s;
873
- const t = window[zn];
874
- t && tt(t, "global");
875
- const n = (s = e == null ? void 0 : e.theme) == null ? void 0 : s.glob;
876
- if (n) {
877
- const r = Object.values(n).filter((a) => !!a).flat();
878
- for (const a of r)
879
- tt(a);
880
- }
881
- }, ir = (e) => {
882
- document.body.classList.add(`${pe}-light`), e === "light" && document.body.classList.remove(`${pe}-${oe.value}`), oe.value = e, document.body.classList.add(`${pe}-${oe.value}`);
883
- }, qn = (e) => p(() => {
884
- var t, n, s, r;
885
- return ((n = (t = le.value) == null ? void 0 : t[oe.value]) == null ? void 0 : n[e]) || ((r = (s = ce.value) == null ? void 0 : s[oe.value]) == null ? void 0 : r[e]) || e;
886
- }), cr = (e) => `var(${e})`, lr = qn, _ = ee({
887
- visible: !1,
888
- logo: "",
889
- items: [],
890
- projects: [],
891
- userInfo: {},
892
- config: {},
893
- searchConfig: {},
894
- // activeItem: '',
895
- // activeProject: {},
896
- eventListeners: {}
897
- }), Jn = {
898
- show: () => {
899
- _.visible = !0;
900
- },
901
- hide: () => {
902
- _.visible = !1;
903
- },
904
- setLogo: (e) => {
905
- _.logo = e;
906
- },
907
- setItems: (e) => {
908
- _.visible || (_.visible = !0), _.items = e;
909
- },
910
- getItems: () => _.items,
911
- removeItem: (e) => {
912
- const t = _.items.filter((n) => n.value !== e);
913
- _.items = t;
914
- },
915
- appendItem: (e) => {
916
- _.visible || (_.visible = !0), !_.items.find((n) => n.value == e.value) && _.items.push(e);
917
- },
918
- setActiveItem: (e) => {
919
- _.activeItem = e;
920
- },
921
- setConfig: (e) => {
922
- _.config = e;
923
- },
924
- setProjects: (e) => {
925
- _.projects = e;
926
- },
927
- setProjectConfig: (e) => {
928
- _.projectConfig = e;
929
- },
930
- setActiveProject: (e) => {
931
- _.activeProject = e;
932
- },
933
- setUserInfo: (e) => {
934
- _.userInfo = e;
935
- },
936
- setSearchConfig: (e) => {
937
- _.searchConfig = e;
938
- },
939
- triggerEventListener: (e, t, n) => {
940
- var i;
941
- const s = _.eventListeners, { autoRemove: r = !1 } = n || {}, a = [];
942
- for (const o in s) {
943
- const c = s[o];
944
- c.type === e && a.push(
945
- (i = c == null ? void 0 : c.handler) == null ? void 0 : i.call(c, t).then(() => {
946
- r && c.remove();
947
- })
948
- );
949
- }
950
- return Promise.all(a).then(() => !0).catch(() => !1);
951
- },
952
- addEventListener: (e, t) => {
953
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
954
- _.eventListeners[n] && delete _.eventListeners[n];
955
- };
956
- return _.eventListeners[n] = {
957
- type: e,
958
- handler: async (r) => {
959
- try {
960
- await t(r);
961
- } catch (a) {
962
- throw a;
963
- }
964
- },
965
- remove: s
966
- }, {
967
- remove: s
968
- };
969
- }
970
- }, H = ee({
971
- items: [],
972
- eventListeners: {}
973
- }), Kn = {
974
- setItems: (e) => {
975
- H.items = e;
976
- },
977
- getItems: () => H.items,
978
- setActiveItem: (e) => {
979
- H.activeItem = e;
980
- },
981
- setPopupClassName: (e) => {
982
- H.popupClassName = e;
983
- },
984
- triggerEventListener: (e, t, n) => {
985
- var i;
986
- const s = H.eventListeners, { autoRemove: r = !1 } = n || {}, a = [];
987
- for (const o in s) {
988
- const c = s[o];
989
- c.type === e && a.push(
990
- (i = c == null ? void 0 : c.handler) == null ? void 0 : i.call(c, t).then(() => {
991
- r && c.remove();
992
- })
993
- );
994
- }
995
- return Promise.all(a).then(() => !0).catch(() => !1);
996
- },
997
- addEventListener: (e, t) => {
998
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
999
- H.eventListeners[n] && delete H.eventListeners[n];
1000
- };
1001
- return H.eventListeners[n] = {
1002
- type: e,
1003
- handler: async (r) => {
1004
- try {
1005
- await t(r);
1006
- } catch (a) {
1007
- throw a;
1008
- }
1009
- },
1010
- remove: s
1011
- }, {
1012
- remove: s
1013
- };
1014
- }
1015
- }, k = ee({
1016
- items: [],
1017
- eventListeners: {}
1018
- }), Yn = {
1019
- setItems: (e) => {
1020
- k.items = e;
1021
- },
1022
- getItems: () => k.items,
1023
- removeItem: (e) => {
1024
- const t = k.items.filter((n) => n.value !== e);
1025
- k.items = t;
1026
- },
1027
- appendItem: (e) => {
1028
- const t = k.items.findIndex((n) => n.value == e.value);
1029
- t !== -1 ? k.items.splice(t, 1, e) : k.items.push(e);
1030
- },
1031
- setActiveItem: (e) => {
1032
- k.activeItem = e;
1033
- },
1034
- triggerEventListener: (e, t, n) => {
1035
- var i;
1036
- const s = k.eventListeners, { autoRemove: r = !1 } = n || {}, a = [];
1037
- for (const o in s) {
1038
- const c = s[o];
1039
- c.type === e && a.push(
1040
- (i = c == null ? void 0 : c.handler) == null ? void 0 : i.call(c, t).then(() => {
1041
- r && c.remove();
1042
- })
1043
- );
1044
- }
1045
- return Promise.all(a).then(() => !0).catch(() => !1);
1046
- },
1047
- addEventListener: (e, t) => {
1048
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
1049
- k.eventListeners[n] && delete k.eventListeners[n];
1050
- };
1051
- return k.eventListeners[n] = {
1052
- type: e,
1053
- handler: async (r) => {
1054
- try {
1055
- await t(r);
1056
- } catch (a) {
1057
- throw a;
1058
- }
1059
- },
1060
- remove: s
1061
- }, {
1062
- remove: s
1063
- };
1064
- }
1065
- }, ue = ee({
1066
- eventListeners: {}
1067
- }), Xn = {
1068
- triggerEventListener: (e, t, n) => {
1069
- var i;
1070
- const s = ue.eventListeners, { autoRemove: r = !1 } = n || {}, a = [];
1071
- for (const o in s) {
1072
- const c = s[o];
1073
- c.type === e && a.push(
1074
- (i = c == null ? void 0 : c.handler) == null ? void 0 : i.call(c, t).then(() => {
1075
- r && c.remove();
1076
- })
1077
- );
1078
- }
1079
- return Promise.all(a).then(() => !0).catch(() => !1);
1080
- },
1081
- addEventListener: (e, t) => {
1082
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
1083
- ue.eventListeners[n] && delete ue.eventListeners[n];
1084
- };
1085
- return ue.eventListeners[n] = {
1086
- type: e,
1087
- handler: async (r) => {
1088
- try {
1089
- await t(r);
1090
- } catch (a) {
1091
- throw a;
1092
- }
1093
- },
1094
- remove: s
1095
- }, {
1096
- remove: s
1097
- };
1098
- }
1099
- }, Ne = ee({
1100
- visible: !1,
1101
- style: {}
1102
- }), Zn = {
1103
- set: (e, t) => {
1104
- Ne.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (Ne.style = t);
1105
- }
1106
- }, Z = {
1107
- nav: _,
1108
- menu: H,
1109
- tab: k,
1110
- overlay: Ne,
1111
- iframeView: ue,
1112
- visible: S(!0)
1113
- }, w = {
1114
- nav: Jn,
1115
- menu: Kn,
1116
- tab: Yn,
1117
- overlay: Zn,
1118
- iframeView: Xn,
1119
- setVisible: (e) => Z.visible.value = e
1120
- }, es = ["name"], ts = ["name"], ns = /* @__PURE__ */ G({
1121
- __name: "das-iframe-router-view",
1122
- props: {
1123
- needTransition: { type: Boolean },
1124
- transitionConfig: {},
1125
- exclude: { default: () => [] }
1126
- },
1127
- setup(e) {
1128
- const t = e, n = p(() => {
1129
- const { mode: d = "", ...f } = {
1130
- mode: "out-in",
1131
- "enter-active-class": "animate__animated animate__fadeInLeft",
1132
- ...t.transitionConfig || {}
1133
- };
1134
- return f;
1135
- }), s = Zt(), r = mt(), a = S([]), i = p(() => a.value.filter((d) => {
1136
- var f;
1137
- return (f = d.meta) == null ? void 0 : f.isOpen;
1138
- })), o = (d) => {
1139
- const f = d.lastIndexOf("-");
1140
- let m = f !== -1 ? d.substring(f + 1) : "";
1141
- m === "0" ? m = "1" : m = "0", i.value.forEach((y) => {
1142
- y.meta.key === d && (y.meta.key = `${y.path}-${m}`);
1143
- });
1144
- };
1145
- N(
1146
- () => t.exclude,
1147
- (d) => {
1148
- if (!d || !d.length) return;
1149
- const f = i.value.find((m) => d.includes(m.path));
1150
- f && o(f.meta.key);
1151
- },
1152
- { deep: !0 }
1153
- );
1154
- const c = async (d) => {
1155
- const f = d.component;
1156
- let m = null;
1157
- return typeof f == "function" ? m = (await f()).default : m = f, m;
1158
- }, l = async () => {
1159
- var f;
1160
- const d = s.options.routes;
1161
- for (const m of d)
1162
- if ((f = m == null ? void 0 : m.meta) != null && f.isIframe) {
1163
- const y = await c(m);
1164
- a.value.push({
1165
- ...m,
1166
- meta: { ...m.meta, key: `${m.path}-0`, componentInstance: y, isOpen: !1, isShow: !1 }
1167
- });
1168
- }
1169
- u();
1170
- }, u = async () => {
1171
- var m, y;
1172
- if (!a.value || !a.value.length) return;
1173
- const d = a.value.find((L) => L.meta.isShow);
1174
- d && (d.meta.isShow = !1, await _e(), w.iframeView.triggerEventListener("onDeactivated", { route: d }));
1175
- const f = a.value.find((L) => L.path === r.path);
1176
- f && ((m = f.meta) != null && m.isOpen || (f.meta.isOpen = !0), (y = f.meta) != null && y.isShow || (f.meta.isShow = !0), await _e(), w.iframeView.triggerEventListener("onActivated", { route: f }));
1177
- };
1178
- return l(), N(
1179
- () => r.path,
1180
- () => {
1181
- u();
1182
- }
1183
- ), (d, f) => (g(), C(
1184
- me,
1185
- null,
1186
- [
1187
- d.needTransition ? (g(), R(
1188
- $t,
1189
- Pe(Ie({ key: 0 }, n.value)),
1190
- {
1191
- default: z(() => [
1192
- (g(!0), C(
1193
- me,
1194
- null,
1195
- ke(i.value, ({ path: m, meta: y }) => x((g(), C("div", {
1196
- class: "das-iframe-router-view",
1197
- key: m,
1198
- name: m
1199
- }, [
1200
- (g(), R(re(y.componentInstance), {
1201
- key: y.key
1202
- }))
1203
- ], 8, es)), [
1204
- [F, y.componentInstance && m === b(r).path]
1205
- ])),
1206
- 128
1207
- /* KEYED_FRAGMENT */
1208
- ))
1209
- ]),
1210
- _: 1
1211
- /* STABLE */
1212
- },
1213
- 16
1214
- /* FULL_PROPS */
1215
- )) : E("v-if", !0),
1216
- d.needTransition ? E("v-if", !0) : (g(!0), C(
1217
- me,
1218
- { key: 1 },
1219
- ke(i.value, ({ path: m, meta: y }) => x((g(), C("div", {
1220
- class: "das-iframe-router-view",
1221
- key: m,
1222
- name: m
1223
- }, [
1224
- (g(), R(re(y.componentInstance), {
1225
- key: y.key
1226
- }))
1227
- ], 8, ts)), [
1228
- [F, y.componentInstance && m === b(r).path]
1229
- ])),
1230
- 128
1231
- /* KEYED_FRAGMENT */
1232
- ))
1233
- ],
1234
- 64
1235
- /* STABLE_FRAGMENT */
1236
- ));
1237
- }
1238
- }), Se = (e, t) => {
1239
- const n = e.__vccOpts || e;
1240
- for (const [s, r] of t)
1241
- n[s] = r;
1242
- return n;
1243
- }, ss = /* @__PURE__ */ Se(ns, [["__scopeId", "data-v-71479406"]]), nt = S("/das-micro-app"), M = S([]), ye = S(!1), de = S([]), fe = S(!0), rs = { class: "das-web-app-container" }, as = {
1244
- key: 0,
1245
- class: "das-web-app-header"
1246
- }, os = { class: "das-web-app-main" }, is = {
1247
- key: 0,
1248
- class: "aside"
1249
- }, cs = { class: "das-web-app-main-container" }, ls = {
1250
- key: 0,
1251
- class: "tab"
1252
- }, us = { class: "das-web-app-main-content" }, ds = { class: "banner" }, fs = { class: "das-web-app-main-router-view" }, ms = { style: { width: "100%", height: "100%" } }, ps = {
1253
- key: 0,
1254
- style: { width: "100%", height: "100%" }
1255
- }, vs = {
1256
- key: 1,
1257
- style: { width: "100%", height: "100%" }
1258
- }, gs = { style: { width: "100%", height: "100%" } }, hs = {
1259
- class: "micro-app",
1260
- style: { height: "100%", width: "100%" }
1261
- }, ws = /* @__PURE__ */ G({
1262
- __name: "das-web-layout",
1263
- props: {
1264
- needTransition: { type: Boolean, default: !0 },
1265
- transitionConfig: {},
1266
- showLayout: { type: Boolean, default: !0 },
1267
- showAside: { type: Boolean, default: !0 },
1268
- showTabs: { type: Boolean, default: !0 },
1269
- routerViewVisible: { type: Boolean, default: !0 }
1270
- },
1271
- setup(e) {
1272
- const t = e;
1273
- tn(), nn(), sn();
1274
- const n = mt(), s = S(!1), r = S(!1), a = S(!1), i = p(() => s.value && t.showLayout), o = p(() => r.value && t.showLayout && t.showAside), c = p(() => s.value && t.showLayout && t.showTabs), l = p(() => t.routerViewVisible ?? !0), u = p(() => Z.overlay.visible ?? !1), d = p(() => ({
1275
- "das-web-app-overlay-show": u.value === !0,
1276
- "das-web-app-overlay-hide": u.value === !1,
1277
- "das-web-app-overlay-destroy": u.value === "destroy"
1278
- })), f = p(() => Z.overlay.style ?? { backgroundColor: "rgba(0,0,0,0.5)" }), m = p(() => de.value), y = p(() => fe.value);
1279
- N(
1280
- () => [n.meta, n.query],
1281
- ([P, v]) => {
1282
- const { showLayout: h = !0, showAside: I = !0, showTabs: j = !0, layout: J = {} } = P, {
1283
- showLayout: Ue = !0,
1284
- showAside: Be = !0,
1285
- showTabs: He = !0,
1286
- app: Pt
1287
- } = v;
1288
- window.__IN_DAS_MAIN_APP && (Pt ? Ce({ minHeight: "auto", minWidth: "auto" }) : Ce({ minHeight: "600px", minWidth: "1200px" })), window.__IN_DAS_MICRO_APP && Ce(J);
1289
- let We = !0, Le = !0, Ee = !0;
1290
- (h === !1 || Ue === !1 || Ue === "false") && (We = !1, Le = !1, Ee = !1), (I === !1 || Be === !1 || Be === "false") && (Le = !1), (j === !1 || He === !1 || He === "false") && (Ee = !1), s.value = We, r.value = Le, a.value = Ee;
1291
- }
1292
- );
1293
- const L = p(() => ({
1294
- mode: "out-in",
1295
- "enter-active-class": "animate__animated animate__fadeInLeft",
1296
- ...t.transitionConfig || {}
1297
- }));
1298
- let ie = /* @__PURE__ */ new Map();
1299
- const ve = (P, v) => {
1300
- let h;
1301
- return ie.has(v) ? h = ie.get(v) : (h = {
1302
- name: v,
1303
- render() {
1304
- return Te("div", { style: { width: "100%", height: "100%" } }, [Te(P)]);
1305
- }
1306
- }, ie.set(v, h)), Te(h);
1307
- }, q = p(() => Z.visible.value);
1308
- return (P, v) => {
1309
- const h = Dt("router-view");
1310
- return g(), C("div", rs, [
1311
- x(U(
1312
- "div",
1313
- {
1314
- class: Nt(["das-web-app-overlay", d.value]),
1315
- style: Vt(f.value)
1316
- },
1317
- null,
1318
- 6
1319
- /* CLASS, STYLE */
1320
- ), [
1321
- [F, q.value]
1322
- ]),
1323
- i.value ? x((g(), C(
1324
- "div",
1325
- as,
1326
- [
1327
- W(P.$slots, "header", {}, void 0, !0)
1328
- ],
1329
- 512
1330
- /* NEED_PATCH */
1331
- )), [
1332
- [F, q.value]
1333
- ]) : E("v-if", !0),
1334
- U("div", os, [
1335
- o.value ? x((g(), C(
1336
- "div",
1337
- is,
1338
- [
1339
- W(P.$slots, "aside", {}, void 0, !0)
1340
- ],
1341
- 512
1342
- /* NEED_PATCH */
1343
- )), [
1344
- [F, q.value]
1345
- ]) : E("v-if", !0),
1346
- U("div", cs, [
1347
- c.value ? x((g(), C(
1348
- "div",
1349
- ls,
1350
- [
1351
- W(P.$slots, "tab", {}, void 0, !0)
1352
- ],
1353
- 512
1354
- /* NEED_PATCH */
1355
- )), [
1356
- [F, q.value]
1357
- ]) : E("v-if", !0),
1358
- U("div", us, [
1359
- x(U(
1360
- "div",
1361
- ds,
1362
- [
1363
- W(P.$slots, "banner", {}, void 0, !0)
1364
- ],
1365
- 512
1366
- /* NEED_PATCH */
1367
- ), [
1368
- [F, q.value]
1369
- ]),
1370
- U("div", fs, [
1371
- x(U(
1372
- "div",
1373
- ms,
1374
- [
1375
- W(P.$slots, "router-view", {}, () => [
1376
- E(" 有动画 "),
1377
- P.needTransition ? (g(), R(h, { key: 0 }, {
1378
- default: z(({ Component: I }) => [
1379
- Y(
1380
- ze,
1381
- Pe(Ge(L.value)),
1382
- {
1383
- default: z(() => [
1384
- b(n).meta.keepAlive ? (g(), R(Qe, {
1385
- key: 0,
1386
- exclude: m.value
1387
- }, [
1388
- y.value && !b(n).meta.isIframe ? (g(), R(re(ve(I, b(n).path)), {
1389
- key: b(n).path
1390
- })) : E("v-if", !0)
1391
- ], 1032, ["exclude"])) : E("v-if", !0)
1392
- ]),
1393
- _: 2
1394
- /* DYNAMIC */
1395
- },
1396
- 1040
1397
- /* FULL_PROPS, DYNAMIC_SLOTS */
1398
- ),
1399
- Y(
1400
- ze,
1401
- Pe(Ge(L.value)),
1402
- {
1403
- default: z(() => [
1404
- !b(n).meta.keepAlive && !b(n).meta.isIframe ? (g(), C("div", ps, [
1405
- (g(), R(re(I), {
1406
- key: b(n).path
1407
- }))
1408
- ])) : E("v-if", !0)
1409
- ]),
1410
- _: 2
1411
- /* DYNAMIC */
1412
- },
1413
- 1040
1414
- /* FULL_PROPS, DYNAMIC_SLOTS */
1415
- )
1416
- ]),
1417
- _: 1
1418
- /* STABLE */
1419
- })) : E("v-if", !0),
1420
- E(" 无动画 "),
1421
- P.needTransition ? E("v-if", !0) : (g(), R(h, { key: 1 }, {
1422
- default: z(({ Component: I }) => [
1423
- b(n).meta.keepAlive ? (g(), R(Qe, {
1424
- key: 0,
1425
- exclude: m.value
1426
- }, [
1427
- y.value && !b(n).meta.isIframe ? (g(), R(re(ve(I, b(n).path)), {
1428
- key: b(n).path
1429
- })) : E("v-if", !0)
1430
- ], 1032, ["exclude"])) : E("v-if", !0),
1431
- !b(n).meta.keepAlive && !b(n).meta.isIframe ? (g(), C("div", vs, [
1432
- (g(), R(re(I), {
1433
- key: b(n).path
1434
- }))
1435
- ])) : E("v-if", !0)
1436
- ]),
1437
- _: 1
1438
- /* STABLE */
1439
- })),
1440
- x(U(
1441
- "div",
1442
- gs,
1443
- [
1444
- Y(ss, {
1445
- exclude: m.value,
1446
- transitionConfig: L.value,
1447
- needTransition: P.needTransition
1448
- }, null, 8, ["exclude", "transitionConfig", "needTransition"])
1449
- ],
1450
- 512
1451
- /* NEED_PATCH */
1452
- ), [
1453
- [F, b(n).meta.isIframe]
1454
- ])
1455
- ], !0)
1456
- ],
1457
- 512
1458
- /* NEED_PATCH */
1459
- ), [
1460
- [F, l.value]
1461
- ]),
1462
- x(U(
1463
- "div",
1464
- hs,
1465
- [
1466
- W(P.$slots, "default", {}, void 0, !0)
1467
- ],
1468
- 512
1469
- /* NEED_PATCH */
1470
- ), [
1471
- [F, !l.value]
1472
- ])
1473
- ])
1474
- ])
1475
- ])
1476
- ])
1477
- ]);
1478
- };
1479
- }
1480
- }), ur = /* @__PURE__ */ Se(ws, [["__scopeId", "data-v-0c14299d"]]), ys = ["modelValue", "logoUrl", "config", "innerPagesConfig", "searchConfig", "projectTreeConfig", "userInfoConfig"], dr = /* @__PURE__ */ G({
1481
- __name: "das-web-nav",
1482
- setup(e) {
1483
- const { nav: t } = Z, n = p(() => t.logo || ""), s = p(() => t.activeItem || ""), r = p(() => (t.items || []).filter((h) => h.fixed)), a = p(() => (t.items || []).filter((h) => !h.fixed)), i = p(() => {
1484
- var v, h, I;
1485
- return {
1486
- showChangeEnterprise: ((v = t.config) == null ? void 0 : v.showChangeEnterprise) ?? !1,
1487
- showSearch: ((h = t.config) == null ? void 0 : h.showSearch) ?? !0,
1488
- showProjectTree: ((I = t.config) == null ? void 0 : I.showProjectTree) ?? !0,
1489
- subAppList: a.value.map((j) => ({ code: j.value, name: j.label, ...j }))
1490
- };
1491
- }), o = p(() => {
1492
- const v = r.value.find((h) => h.value === t.activeItem);
1493
- return {
1494
- activeInnerPagePath: (v == null ? void 0 : v.path) || "",
1495
- innerPages: r.value.map((h) => ({ title: h.label, ...h }))
1496
- };
1497
- }), c = p(() => ({
1498
- projectStore: {
1499
- projectTree: t.projects,
1500
- currentProject: t.activeProject
1501
- },
1502
- ...t.projectConfig
1503
- })), l = p(() => t.userInfo), u = p(() => t.searchConfig), d = async (v) => {
1504
- const h = v.detail[0], I = r.value.find((J) => h.value === J.value);
1505
- await w.nav.triggerEventListener("onItemClick", I) && w.nav.setActiveItem(I.value);
1506
- }, f = async (v) => {
1507
- const h = v.detail[0], I = a.value.find((J) => h === J.value);
1508
- await w.nav.triggerEventListener("onItemClick", I) && w.nav.setActiveItem(I.value);
1509
- }, m = async (v) => {
1510
- const h = v.detail[0], I = a.value.find((J) => h === J.value);
1511
- await w.nav.triggerEventListener("onItemRemove", I) && w.nav.removeItem(I.value);
1512
- }, y = async (v) => {
1513
- const [h, I] = v.detail;
1514
- !h || !await w.nav.triggerEventListener("onProjectChange", I) || w.nav.setActiveProject(I);
1515
- }, L = (v) => {
1516
- w.nav.triggerEventListener("onUserCommandChange", v.detail[0]);
1517
- }, ie = (v) => {
1518
- w.nav.triggerEventListener("searchToPage", { item: v.detail[0], keyword: v.detail[1], cb: v.detail[2] });
1519
- }, ve = (v) => {
1520
- w.nav.triggerEventListener("clearSearchList", { cb: v.detail[0] });
1521
- }, q = (v) => {
1522
- w.nav.triggerEventListener("deleteSearchItem", { value: v.detail[0], cb: v.detail[1] });
1523
- }, P = () => {
1524
- w.nav.triggerEventListener("changeEnterpriseHandle");
1525
- };
1526
- return xt(() => {
1527
- w.nav.triggerEventListener("onBeforeMount", null, { autoRemove: !0 });
1528
- }), dt(() => {
1529
- w.nav.triggerEventListener("onMounted", null, { autoRemove: !0 });
1530
- }), Ft(() => {
1531
- w.nav.triggerEventListener("onUnmounted", null, { autoRemove: !0 });
1532
- }), (v, h) => (g(), C("das-ce-nav", {
1533
- modelValue: s.value,
1534
- logoUrl: n.value,
1535
- config: i.value,
1536
- innerPagesConfig: o.value,
1537
- searchConfig: u.value,
1538
- projectTreeConfig: c.value,
1539
- userInfoConfig: l.value,
1540
- "on:userCommandHandle": L,
1541
- "on:changeInnerPage": d,
1542
- "on:handleTabClick": f,
1543
- "on:handleTabDelete": m,
1544
- "on:changeTreeHandle": y,
1545
- "on:searchToPage": ie,
1546
- "on:clearSearchList": ve,
1547
- "on:deleteSearchItem": q,
1548
- "on:changeEnterpriseHandle": P
1549
- }, null, 40, ys));
1550
- }
1551
- }), _s = ["modelValue", "data", "collapse", "fixedTopMenu", "subMenuAttrs"], fr = /* @__PURE__ */ G({
1552
- __name: "das-web-menu",
1553
- props: {
1554
- menuAttr: {}
1555
- },
1556
- setup(e) {
1557
- const { menu: t } = Z, n = e, s = p(() => n.menuAttr || {}), r = p(() => t.items), a = p(() => t.items.find((u) => u.fixed)), i = p(() => t.activeItem || ""), o = p(() => t.collapse ?? !1), c = p(() => ({ popupClassName: t.popupClassName ?? "" })), l = async (u) => {
1558
- const d = u.detail[0], f = en(r.value).find((y) => d === y.id);
1559
- await w.menu.triggerEventListener("onItemClick", f) && w.menu.setActiveItem(f.id);
1560
- };
1561
- return (u, d) => r.value.length > 0 ? (g(), C("das-ce-menu", Ie({
1562
- key: 0,
1563
- modelValue: i.value,
1564
- data: r.value,
1565
- collapse: o.value,
1566
- fixedTopMenu: a.value,
1567
- subMenuAttrs: c.value
1568
- }, s.value, { onChange: l }), null, 16, _s)) : E("v-if", !0);
1569
- }
1570
- }), bs = ["modelValue", "options"], mr = /* @__PURE__ */ G({
1571
- __name: "das-web-tabs",
1572
- props: {
1573
- tabsAttr: {}
1574
- },
1575
- setup(e) {
1576
- const { tab: t } = Z, n = e, s = p(() => n.tabsAttr || {}), r = p(() => t.items.map((d) => ({
1577
- ...d,
1578
- key: d.value,
1579
- tab: d.label
1580
- }))), a = p(() => t.activeItem || ""), i = async (d) => {
1581
- const f = d.detail[0], m = r.value.find((L) => f === L.value);
1582
- await w.tab.triggerEventListener("onItemClick", m) && w.tab.setActiveItem(m.value);
1583
- }, o = async (d) => {
1584
- const f = d.detail[0], m = r.value.find((L) => f === L.value);
1585
- await w.tab.triggerEventListener("onItemRemove", m) && w.tab.removeItem(m.value);
1586
- }, c = async (d) => {
1587
- await w.tab.triggerEventListener("onMenuClick", { type: d.detail[0], data: d.detail[1] });
1588
- }, l = async (d) => {
1589
- await w.tab.triggerEventListener("onPageRefresh", d.detail[0]);
1590
- }, u = () => {
1591
- w.tab.triggerEventListener("onToggleFullScreen");
1592
- };
1593
- return (d, f) => r.value.length > 0 ? (g(), C("das-ce-tabs", Ie({
1594
- key: 0,
1595
- modelValue: a.value,
1596
- options: r.value
1597
- }, s.value, {
1598
- "on:tabClick": i,
1599
- "on:tabDelete": o,
1600
- "on:menuClick": c,
1601
- "on:pageRefresh": l,
1602
- "on:toggleFullScreen": u
1603
- }), null, 16, bs)) : E("v-if", !0);
1604
- }
1605
- }), As = ["src", "entry", "name"], Is = /* @__PURE__ */ G({
1606
- __name: "das-micro-app",
1607
- props: {
1608
- src: {},
1609
- name: {},
1610
- actived: { type: Boolean }
1611
- },
1612
- emits: ["onLoaded", "onActivated", "onDeactivated"],
1613
- setup(e, { emit: t }) {
1614
- const n = e, s = t, r = (o) => {
1615
- s("onLoaded", o);
1616
- }, a = p(() => n.actived);
1617
- return N(() => a.value, (o) => {
1618
- o && s("onActivated"), o || s("onDeactivated");
1619
- }), (o, c) => (g(), C("iframe", {
1620
- class: "das-micro-app",
1621
- src: n.src,
1622
- entry: n.src,
1623
- name: n.name,
1624
- frameborder: "0",
1625
- onLoad: r
1626
- }, null, 40, As));
1627
- }
1628
- }), Ss = /* @__PURE__ */ Se(Is, [["__scopeId", "data-v-2266bab0"]]);
1629
- let $ = null, D = null, ne = null;
1630
- const se = (e, t, n) => {
1631
- var r, a, i, o;
1632
- const s = M.value.find((c) => c.name === e);
1633
- if (s) {
1634
- if (s.entry.startsWith("/") || s.entry.match(location.origin)) {
1635
- (a = (r = s.dom) == null ? void 0 : r.contentWindow) == null || a.postMessage({ type: t, data: n });
1636
- return;
1637
- }
1638
- (o = (i = s.dom) == null ? void 0 : i.contentWindow) == null || o.postMessage({ type: t, data: n }, s.entry);
1639
- }
1640
- }, Me = (e, t) => {
1641
- var a;
1642
- const { __IN_DAS_MICRO_APP: n, __DAS_MAIN_APP_HREF: s } = window;
1643
- if (!n || !s) return;
1644
- const { origin: r } = new URL(s);
1645
- (a = window.top) == null || a.postMessage({ type: e, data: t }, r);
1646
- }, Ls = () => {
1647
- D || (D || (D = {}), window.addEventListener(
1648
- "message",
1649
- (e) => {
1650
- const { type: t, source: n } = e.data || {};
1651
- if (n !== "react-devtools-content-script" && D[t])
1652
- for (const s in D[t])
1653
- D[t][s](e.data);
1654
- },
1655
- !1
1656
- ));
1657
- }, Es = () => {
1658
- $ || ($ || ($ = {}), window.addEventListener(
1659
- "message",
1660
- (e) => {
1661
- const { type: t } = e.data || {};
1662
- if ($[t])
1663
- for (const n in $[t])
1664
- $[t][n](e.data);
1665
- },
1666
- !1
1667
- ));
1668
- }, Ts = (e, t) => {
1669
- Es();
1670
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
1671
- return $[e] || ($[e] = {}), $[e][n] = t, {
1672
- remove: () => {
1673
- $[e] && $[e][n] && delete $[e][n];
1674
- }
1675
- };
1676
- }, Cs = (e, t) => {
1677
- Ls();
1678
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
1679
- return D[e] || (D[e] = {}), D[e][n] = t, {
1680
- remove: () => {
1681
- D[e] && D[e][n] && delete D[e][n];
1682
- }
1683
- };
1684
- }, Oe = async (e) => {
1685
- await Promise.all(
1686
- M.value.filter((t) => t.loaded).map((t) => new Promise(async (n) => {
1687
- t.dom || await new Promise((s) => N(() => t.dom, s)), setTimeout(() => {
1688
- se(t.name, "sessionStorage", e), n(!0);
1689
- }, 0);
1690
- }))
1691
- );
1692
- }, A = {
1693
- loadMicroApp: (e) => {
1694
- ye.value = !0;
1695
- const t = M.value.find((i) => i.name === e), n = M.value.find((i) => i.actived), s = !!t, r = !(t != null && t.loaded), a = t == null ? void 0 : t.actived;
1696
- if (!s) {
1697
- n && (n.actived = !1);
1698
- return;
1699
- }
1700
- if (t.isFirstActived = !0, r) {
1701
- t.src = t.entry;
1702
- const i = M.value.find((o) => o.actived);
1703
- i && (i.actived = !1), t.loaded = !0, t.actived = !0;
1704
- return;
1705
- }
1706
- if (!a) {
1707
- n && (n.actived = !1), t.actived = !0;
1708
- return;
1709
- }
1710
- },
1711
- hideMicroApp: async (e) => {
1712
- const t = M.value.find((n) => n.name === e);
1713
- t && t.loaded && (t.dom || await new Promise((n) => N(() => t.dom, n)), se(e, "router", {
1714
- cmd: "push",
1715
- route: {
1716
- name: "das-micro-app-ghost",
1717
- microAppName: e
1718
- }
1719
- }));
1720
- },
1721
- hideAllMicroApp: () => {
1722
- ye.value = !1, M.value.map((e) => {
1723
- e.actived = !1;
1724
- });
1725
- },
1726
- unloadMicroApp: (e) => {
1727
- const t = M.value.find((n) => n.name === e);
1728
- t && (t.loaded = !1, t.actived = !1, t.dom = void 0);
1729
- },
1730
- unloadAllMicroApp: () => {
1731
- ye.value = !1, M.value.map((e) => {
1732
- e.loaded = !1, e.actived = !1, e.dom = void 0;
1733
- });
1734
- },
1735
- setMicroAppRoute: async (e, t, n) => {
1736
- const s = M.value.find((o) => o.name === t);
1737
- if (!s || !s.loaded || !s.actived || (s.dom || await new Promise((o) => N(() => s.dom, o)), !s.actived)) return s;
1738
- const r = n.path || n, a = n.query || {}, i = n.params || {};
1739
- return e.push({
1740
- path: `/${t}${r}`,
1741
- query: a,
1742
- // @ts-ignore
1743
- params: i
1744
- }), setTimeout(() => {
1745
- const { isFirstActived: o } = s;
1746
- se(t, "router", {
1747
- cmd: o ? "replace" : "push",
1748
- route: n,
1749
- microAppName: t
1750
- }), o && (s.isFirstActived = !1);
1751
- }, 0), s;
1752
- },
1753
- sendMessageToMicroApp: se,
1754
- sendMessageToMainApp: Me,
1755
- addEventListenerFromMainApp: Ts,
1756
- addEventListenerFromMicroApp: Cs,
1757
- setMainAppOverlay: (e, t) => {
1758
- Me("bodyOverlay", { visible: e, style: t });
1759
- },
1760
- sessionStorage: {
1761
- key: window.sessionStorage.key,
1762
- getItem: window.sessionStorage.getItem,
1763
- setItem: (e, t) => {
1764
- window.sessionStorage.setItem(e, t), Oe({ cmd: "setItem", key: e, value: t });
1765
- },
1766
- removeItem: (e) => {
1767
- window.sessionStorage.removeItem(e), Oe({ cmd: "removeItem", key: e });
1768
- },
1769
- clear: () => {
1770
- window.sessionStorage.clear(), Oe({ cmd: "clear" });
1771
- }
1772
- },
1773
- addMicroAppLifeCycleListener: (e, t) => {
1774
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
1775
- ne || (ne = {});
1776
- const s = () => {
1777
- ne[n] && delete ne[n];
1778
- };
1779
- return ne[n] = {
1780
- type: e,
1781
- handler: async (r) => await t(r),
1782
- remove: s
1783
- }, { remove: s };
1784
- },
1785
- triggerMicroAppLifeCycleListener: (e, t, n) => {
1786
- var a;
1787
- const s = ne, { autoRemove: r = !1 } = n || {};
1788
- for (const i in s) {
1789
- const o = s[i];
1790
- o.type === e && ((a = o == null ? void 0 : o.handler) == null || a.call(o, t).then(() => {
1791
- r && o.remove();
1792
- }));
1793
- }
1794
- },
1795
- reloadMicroAppRoute: async (e, t) => {
1796
- const n = M.value.find((s) => s.name === e);
1797
- n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => N(() => n.dom, s)), se(e, "route", { cmd: "reload", path: t })));
1798
- },
1799
- unloadMicroAppRoute: async (e, t) => {
1800
- const n = M.value.find((s) => s.name === e);
1801
- n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => N(() => n.dom, s)), se(e, "route", { cmd: "unload", path: t })));
1802
- },
1803
- setMainAppLayoutVisible: (e) => {
1804
- Me("layoutVisible", { visible: e });
1805
- }
1806
- }, Ms = /* @__PURE__ */ G({
1807
- __name: "das-micro-apps",
1808
- setup(e) {
1809
- const t = S(null), n = async (a, i) => {
1810
- const o = M.value.find((f) => f.name === i);
1811
- if (!o) return;
1812
- o.dom = a.target, await _e(), await new Promise((f) => setTimeout(f, 50));
1813
- const c = () => {
1814
- const f = t.value.getBoundingClientRect() || {};
1815
- return f.width = t.value.clientWidth, f.height = t.value.clientHeight, f;
1816
- };
1817
- A.sendMessageToMicroApp(i, "onLoaded", {
1818
- href: location.href,
1819
- microAppContainerRect: c(),
1820
- entry: o.entry,
1821
- name: o.name
1822
- });
1823
- const { dom: l, ...u } = o;
1824
- A.triggerMicroAppLifeCycleListener("onLoaded", u), new ResizeObserver(() => {
1825
- A.sendMessageToMicroApp(i, "resize", c());
1826
- }).observe(t.value), A.sendMessageToMicroApp(i, "setProxyMessageStatus", { visible: !0, parentHref: location.href }), A.sendMessageToMicroApp(i, "setProxSsoStatus", { visible: !0, parentHref: location.href });
1827
- }, s = (a, i) => {
1828
- const o = M.value.find((u) => u.name === i);
1829
- if (!o) return;
1830
- const { dom: c, ...l } = o;
1831
- A.sendMessageToMicroApp(i, "onActivated"), A.triggerMicroAppLifeCycleListener("onActivated", l);
1832
- }, r = (a, i) => {
1833
- const o = M.value.find((u) => u.name === i);
1834
- if (!o) return;
1835
- const { dom: c, ...l } = o;
1836
- A.sendMessageToMicroApp(i, "onDeactivated"), A.triggerMicroAppLifeCycleListener("onDeactivated", l);
1837
- };
1838
- return (a, i) => (g(), C(
1839
- "div",
1840
- {
1841
- ref_key: "containerRef",
1842
- ref: t,
1843
- class: "das-micro-app-container"
1844
- },
1845
- [
1846
- (g(!0), C(
1847
- me,
1848
- null,
1849
- ke(b(M), (o) => (g(), C(
1850
- me,
1851
- null,
1852
- [
1853
- o.loaded ? x((g(), R(Ss, {
1854
- key: 0,
1855
- src: o.src || "",
1856
- name: o.name,
1857
- actived: o.actived,
1858
- onOnLoaded: (c) => n(c, o.name),
1859
- onOnActivated: (c) => s(c, o.name),
1860
- onOnDeactivated: (c) => r(c, o.name)
1861
- }, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
1862
- [F, o.actived]
1863
- ]) : E("v-if", !0)
1864
- ],
1865
- 64
1866
- /* STABLE_FRAGMENT */
1867
- ))),
1868
- 256
1869
- /* UNKEYED_FRAGMENT */
1870
- ))
1871
- ],
1872
- 512
1873
- /* NEED_PATCH */
1874
- ));
1875
- }
1876
- }), Os = /* @__PURE__ */ Se(Ms, [["__scopeId", "data-v-2e3798bc"]]), pr = /* @__PURE__ */ G({
1877
- __name: "das-main-app-layout",
1878
- props: {
1879
- transitionConfig: {},
1880
- showLayout: { type: Boolean },
1881
- showAside: { type: Boolean },
1882
- showTabs: { type: Boolean },
1883
- menuAttr: {},
1884
- tabsAttr: {}
1885
- },
1886
- setup(e) {
1887
- const t = e, n = p(() => !ye.value), s = p(() => t.showLayout ?? !0), r = p(() => t.showAside ?? !0), a = p(() => t.showTabs ?? !0), i = p(() => t.menuAttr ?? {}), o = p(() => t.tabsAttr ?? {}), c = p(() => ({
1888
- "enter-active-class": "animate__animated animate__fadeInLeft",
1889
- ...t.transitionConfig || {}
1890
- })), l = p(() => ({ showLayout: s.value, showAside: r.value, showTabs: a.value }));
1891
- return (u, d) => (g(), R(b(ft), Ie({
1892
- "transition-config": c.value,
1893
- "router-view-visible": n.value
1894
- }, l.value), {
1895
- header: z(() => [
1896
- W(u.$slots, "header", {}, () => [
1897
- Y(b(qt))
1898
- ])
1899
- ]),
1900
- aside: z(() => [
1901
- W(u.$slots, "aside", {}, () => [
1902
- Y(b(Jt), { menuAttr: i.value }, null, 8, ["menuAttr"])
1903
- ])
1904
- ]),
1905
- tab: z(() => [
1906
- W(u.$slots, "tab", {}, () => [
1907
- Y(b(Kt), { tabsAttr: o.value }, null, 8, ["tabsAttr"])
1908
- ])
1909
- ]),
1910
- default: z(() => [
1911
- Y(Os)
1912
- ]),
1913
- _: 3
1914
- /* FORWARDED */
1915
- }, 16, ["transition-config", "router-view-visible"]));
1916
- }
1917
- }), Tt = /* @__PURE__ */ G({
1918
- __name: "das-micro-app-ghost",
1919
- setup(e) {
1920
- return jt(() => {
1921
- setTimeout(() => {
1922
- document.documentElement.checkVisibility() && history.back();
1923
- }, 300);
1924
- }), (t, n) => null;
1925
- }
1926
- });
1927
- var st;
1928
- const je = typeof window < "u", Ps = (e) => typeof e == "string", ks = () => {
1929
- };
1930
- je && ((st = window == null ? void 0 : window.navigator) != null && st.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
1931
- function Ct(e) {
1932
- return typeof e == "function" ? e() : b(e);
1933
- }
1934
- function Rs(e) {
1935
- return e;
1936
- }
1937
- function Mt(e) {
1938
- return Ut() ? (Bt(e), !0) : !1;
1939
- }
1940
- function $s(e, t = !0) {
1941
- Ht() ? dt(e) : t ? e() : _e(e);
1942
- }
1943
- function Ot(e) {
1944
- var t;
1945
- const n = Ct(e);
1946
- return (t = n == null ? void 0 : n.$el) != null ? t : n;
1947
- }
1948
- const Ds = je ? window : void 0, Ns = je ? window.document : void 0;
1949
- function Vs(...e) {
1950
- let t, n, s, r;
1951
- if (Ps(e[0]) || Array.isArray(e[0]) ? ([n, s, r] = e, t = Ds) : [t, n, s, r] = e, !t)
1952
- return ks;
1953
- Array.isArray(n) || (n = [n]), Array.isArray(s) || (s = [s]);
1954
- const a = [], i = () => {
1955
- a.forEach((u) => u()), a.length = 0;
1956
- }, o = (u, d, f, m) => (u.addEventListener(d, f, m), () => u.removeEventListener(d, f, m)), c = N(() => [Ot(t), Ct(r)], ([u, d]) => {
1957
- i(), u && a.push(...n.flatMap((f) => s.map((m) => o(u, f, m, d))));
1958
- }, { immediate: !0, flush: "post" }), l = () => {
1959
- c(), i();
1960
- };
1961
- return Mt(l), l;
1962
- }
1963
- function xs(e, t = !1) {
1964
- const n = S(), s = () => n.value = !!e();
1965
- return s(), $s(s, t), n;
1966
- }
1967
- const rt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, at = "__vueuse_ssr_handlers__";
1968
- rt[at] = rt[at] || {};
1969
- const ot = [
1970
- [
1971
- "requestFullscreen",
1972
- "exitFullscreen",
1973
- "fullscreenElement",
1974
- "fullscreenEnabled",
1975
- "fullscreenchange",
1976
- "fullscreenerror"
1977
- ],
1978
- [
1979
- "webkitRequestFullscreen",
1980
- "webkitExitFullscreen",
1981
- "webkitFullscreenElement",
1982
- "webkitFullscreenEnabled",
1983
- "webkitfullscreenchange",
1984
- "webkitfullscreenerror"
1985
- ],
1986
- [
1987
- "webkitRequestFullScreen",
1988
- "webkitCancelFullScreen",
1989
- "webkitCurrentFullScreenElement",
1990
- "webkitCancelFullScreen",
1991
- "webkitfullscreenchange",
1992
- "webkitfullscreenerror"
1993
- ],
1994
- [
1995
- "mozRequestFullScreen",
1996
- "mozCancelFullScreen",
1997
- "mozFullScreenElement",
1998
- "mozFullScreenEnabled",
1999
- "mozfullscreenchange",
2000
- "mozfullscreenerror"
2001
- ],
2002
- [
2003
- "msRequestFullscreen",
2004
- "msExitFullscreen",
2005
- "msFullscreenElement",
2006
- "msFullscreenEnabled",
2007
- "MSFullscreenChange",
2008
- "MSFullscreenError"
2009
- ]
2010
- ];
2011
- function Fs(e, t = {}) {
2012
- const { document: n = Ns, autoExit: s = !1 } = t, r = n == null ? void 0 : n.querySelector("html"), a = S(!1);
2013
- let i = ot[0];
2014
- const o = xs(() => {
2015
- if (n) {
2016
- for (const L of ot)
2017
- if (L[1] in n)
2018
- return i = L, !0;
2019
- } else
2020
- return !1;
2021
- return !1;
2022
- }), [c, l, u, , d] = i;
2023
- async function f() {
2024
- o.value && (n != null && n[u] && await n[l](), a.value = !1);
2025
- }
2026
- async function m() {
2027
- if (!o.value)
2028
- return;
2029
- await f();
2030
- const L = Ot(r);
2031
- L && (await L[c](), a.value = !0);
2032
- }
2033
- async function y() {
2034
- a.value ? await f() : await m();
2035
- }
2036
- return n && Vs(n, d, () => {
2037
- a.value = !!(n != null && n[u]);
2038
- }, !1), s && Mt(f), {
2039
- isSupported: o,
2040
- isFullscreen: a,
2041
- enter: m,
2042
- exit: f,
2043
- toggle: y
2044
- };
2045
- }
2046
- var it;
2047
- (function(e) {
2048
- e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
2049
- })(it || (it = {}));
2050
- var js = Object.defineProperty, ct = Object.getOwnPropertySymbols, Us = Object.prototype.hasOwnProperty, Bs = Object.prototype.propertyIsEnumerable, lt = (e, t, n) => t in e ? js(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Hs = (e, t) => {
2051
- for (var n in t || (t = {}))
2052
- Us.call(t, n) && lt(e, n, t[n]);
2053
- if (ct)
2054
- for (var n of ct(t))
2055
- Bs.call(t, n) && lt(e, n, t[n]);
2056
- return e;
2057
- };
2058
- const Ws = {
2059
- easeInSine: [0.12, 0, 0.39, 0],
2060
- easeOutSine: [0.61, 1, 0.88, 1],
2061
- easeInOutSine: [0.37, 0, 0.63, 1],
2062
- easeInQuad: [0.11, 0, 0.5, 0],
2063
- easeOutQuad: [0.5, 1, 0.89, 1],
2064
- easeInOutQuad: [0.45, 0, 0.55, 1],
2065
- easeInCubic: [0.32, 0, 0.67, 0],
2066
- easeOutCubic: [0.33, 1, 0.68, 1],
2067
- easeInOutCubic: [0.65, 0, 0.35, 1],
2068
- easeInQuart: [0.5, 0, 0.75, 0],
2069
- easeOutQuart: [0.25, 1, 0.5, 1],
2070
- easeInOutQuart: [0.76, 0, 0.24, 1],
2071
- easeInQuint: [0.64, 0, 0.78, 0],
2072
- easeOutQuint: [0.22, 1, 0.36, 1],
2073
- easeInOutQuint: [0.83, 0, 0.17, 1],
2074
- easeInExpo: [0.7, 0, 0.84, 0],
2075
- easeOutExpo: [0.16, 1, 0.3, 1],
2076
- easeInOutExpo: [0.87, 0, 0.13, 1],
2077
- easeInCirc: [0.55, 0, 1, 0.45],
2078
- easeOutCirc: [0, 0.55, 0.45, 1],
2079
- easeInOutCirc: [0.85, 0, 0.15, 1],
2080
- easeInBack: [0.36, 0, 0.66, -0.56],
2081
- easeOutBack: [0.34, 1.56, 0.64, 1],
2082
- easeInOutBack: [0.68, -0.6, 0.32, 1.6]
2083
- };
2084
- Hs({
2085
- linear: Rs
2086
- }, Ws);
2087
- const zs = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, vr = (e, t) => {
2088
- if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
2089
- window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (nt.value = e.microAppRouterPrefix), M.value = (e.microApps || []).filter((r) => !!r.name).map((r) => ({ ...r, entry: zs(r.entry || r.name) })), t == null || t.addRoute({
2090
- name: "das-micro-app",
2091
- path: `${nt.value}/:pathMatch(.*)*`,
2092
- component: Tt,
2093
- meta: { isMicroApp: !0, keepAlive: !0 }
2094
- }), A.addEventListenerFromMicroApp("bodyOverlay", (r) => {
2095
- const { visible: a, style: i } = r.data;
2096
- w.overlay.set(a, i);
2097
- }), A.addEventListenerFromMicroApp("layoutVisible", (r) => {
2098
- const { visible: a } = r.data;
2099
- w.setVisible(a);
2100
- }), A.addEventListenerFromMicroApp("route", (r) => {
2101
- const { name: a, cmd: i, path: o } = r.data;
2102
- i === "reload" && A.reloadMicroAppRoute(a, o), i === "unload" && A.unloadMicroAppRoute(a, o);
2103
- });
2104
- const { enter: n, exit: s } = Fs();
2105
- A.addEventListenerFromMicroApp("fullscreen", (r) => {
2106
- const a = r.data;
2107
- a && n(), a || s();
2108
- }), A.addEventListenerFromMicroApp("location", (r) => {
2109
- const { cmd: a, isAutoCloseApp: i } = r.data || {};
2110
- a === "reload" && (i !== void 0 && (window.__isAutoCloseApp = i), location.reload());
2111
- });
2112
- }, gr = (e, t) => {
2113
- if (!(e != null && e.microAppName)) return;
2114
- window.config.microAppName = e.microAppName, window.self !== window.top && e.microAppName && (window.__IN_DAS_MICRO_APP = !0);
2115
- const n = "das-micro-app-ghost";
2116
- t == null || t.addRoute({
2117
- name: n,
2118
- path: `/${n}/:pathMatch(.*)*`,
2119
- component: Tt,
2120
- meta: { isMicroApp: !0, keepAlive: !0 }
2121
- });
2122
- const s = S(!1), r = S(!1), a = S("");
2123
- N(
2124
- () => t.currentRoute.value,
2125
- (i) => {
2126
- if (s.value) {
2127
- s.value = !1;
2128
- return;
2129
- }
2130
- if (r.value) {
2131
- r.value = !1;
2132
- return;
2133
- }
2134
- const { path: o, query: c, params: l, meta: u } = i;
2135
- if (a.value.includes(i.path)) {
2136
- a.value = "";
2137
- return;
2138
- }
2139
- A.sendMessageToMainApp("router", {
2140
- cmd: "push",
2141
- route: {
2142
- path: o,
2143
- query: { ...c, microAppName: e.microAppName },
2144
- params: l,
2145
- meta: u
2146
- }
2147
- });
2148
- }
2149
- ), A.addEventListenerFromMainApp("router", async (i) => {
2150
- var u;
2151
- const { cmd: o, route: c, microAppName: l = "" } = i.data;
2152
- a.value = ("/" + l + c.path).replace(/\/\//g, "/"), (u = t == null ? void 0 : t[o]) == null || u.call(t, c);
2153
- }), A.addEventListenerFromMainApp("onLoaded", (i) => {
2154
- const { href: o, microAppContainerRect: c } = i.data;
2155
- window.__IN_DAS_MICRO_APP = !0, window.__DAS_MICRO_APP_NAME = e.microAppName, window.__DAS_MAIN_APP_HREF = o, window.__DAS_MICRO_APP_CONTAINER_RECT = c;
2156
- }), A.addEventListenerFromMainApp("onDeactivated", (i) => {
2157
- const { name: o = "", path: c, params: l = {}, query: u = {} } = t.currentRoute.value;
2158
- r.value = !0, t == null || t.push({
2159
- name: n,
2160
- query: { microAppName: e.microAppName, fromQuery: JSON.stringify(u), fromPath: c },
2161
- params: l
2162
- });
2163
- }), A.addEventListenerFromMainApp("onActivated", (i) => {
2164
- const { name: o = "", params: c = {}, query: l = {} } = t.currentRoute.value, { fromPath: u = "", fromQuery: d = "{}" } = l || {};
2165
- s.value = !0, t == null || t.push({ path: u, query: JSON.parse(d), params: c });
2166
- }), A.addEventListenerFromMainApp("sessionStorage", (i) => {
2167
- const { cmd: o, key: c, value: l } = i.data;
2168
- o === "setItem" && window.sessionStorage.setItem(c, l), o === "getItem" && window.sessionStorage.getItem(c), o === "removeItem" && window.sessionStorage.removeItem(c), o === "clear" && window.sessionStorage.clear();
2169
- }), A.addEventListenerFromMainApp("route", (i) => {
2170
- const { cmd: o, path: c } = i.data;
2171
- o === "reload" && (de.value.push(c), fe.value = !1, setTimeout(() => {
2172
- fe.value = !0, de.value = [];
2173
- }, 300)), o === "unload" && (de.value.push(c), fe.value = !1, setTimeout(() => {
2174
- fe.value = !0, de.value = [];
2175
- }, 100));
2176
- });
2177
- };
1
+ import { F as s, x as t, z as n, y as i, A as r, f as p, m as u, q as m, g as o, k as g, p as D, v as b, w as h, h as l, i as A, C as T, D as c, n as L, B as W, G as y, E as M, s as R, j as F, o as I, r as V, t as f } from "./index-LVjuqzoG.js";
2178
2
  export {
2179
- pr as DasMainAppLayout,
2180
- ur as DasWebLayout,
2181
- fr as DasWebMenu,
2182
- dr as DasWebNav,
2183
- mr as DasWebTabs,
2184
- tr as createDasWebApp,
2185
- Ae as currentLang,
2186
- oe as currentTheme,
2187
- Hn as getI18nRule,
2188
- ar as getLang,
2189
- qn as getThemeRule,
2190
- cr as getVar,
2191
- lr as getVarValue,
2192
- Wn as i18n,
2193
- nr as initI18n,
2194
- vr as initMainApp,
2195
- gr as initMicroApp,
2196
- or as initTheme,
2197
- w as layout,
2198
- A as microFrontend,
2199
- et as setI18nRule,
2200
- rr as setLang,
2201
- ir as setTheme,
2202
- tt as setThemeRule,
2203
- sr as t
3
+ s as DasMainAppLayout,
4
+ t as DasWebLayout,
5
+ n as DasWebMenu,
6
+ i as DasWebNav,
7
+ r as DasWebTabs,
8
+ p as createDasWebApp,
9
+ u as currentLang,
10
+ m as currentTheme,
11
+ o as getI18nRule,
12
+ g as getLang,
13
+ D as getThemeRule,
14
+ b as getVar,
15
+ h as getVarValue,
16
+ l as i18n,
17
+ A as initI18n,
18
+ T as initMainApp,
19
+ c as initMicroApp,
20
+ L as initTheme,
21
+ W as layout,
22
+ y as mainAppFramework,
23
+ M as microFrontend,
24
+ R as setI18nRule,
25
+ F as setLang,
26
+ I as setTheme,
27
+ V as setThemeRule,
28
+ f as t
2204
29
  };