@das-fed/web 6.4.0-dev.10 → 6.4.0-dev.100

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 (79) hide show
  1. package/esm-map.json +4 -1
  2. package/index-BMFHnTrf.js +13345 -0
  3. package/index-BMFHnTrf.js.gz +0 -0
  4. package/index-CcI7GoXH.js +81 -0
  5. package/index-CcI7GoXH.js.gz +0 -0
  6. package/{packages/main-app-framework/index-CXsP6QiJ.js → index-ViptWX9-.js} +1 -1
  7. package/index.js +24 -21
  8. package/package.json +8 -6
  9. package/packages/create-das-web-app/index.js +40 -40
  10. package/packages/create-das-web-app/index.js.gz +0 -0
  11. package/packages/i18n/index.js +172 -31
  12. package/packages/i18n/index.js.gz +0 -0
  13. package/packages/layout/index.js +460 -507
  14. package/packages/layout/index.js.gz +0 -0
  15. package/packages/layout/style.css +2 -2
  16. package/packages/layout/style.css.gz +0 -0
  17. package/packages/main-app-framework/index-BG5UFi50.js +11961 -0
  18. package/packages/main-app-framework/index-BG5UFi50.js.gz +0 -0
  19. package/{index-BePRIUZj.js → packages/main-app-framework/index-CqiT3SAw.js} +1 -1
  20. package/packages/main-app-framework/index-CsbSa1Vl.js +81 -0
  21. package/packages/main-app-framework/index-CsbSa1Vl.js.gz +0 -0
  22. package/packages/main-app-framework/index.js +3 -2
  23. package/packages/main-app-framework/style.css +1 -1
  24. package/packages/main-app-framework/style.css.gz +0 -0
  25. package/packages/micro-frontend/index.js +315 -305
  26. package/packages/micro-frontend/index.js.gz +0 -0
  27. package/packages/micro-frontend/style.css +1 -1
  28. package/packages/style/style.css +1 -1
  29. package/packages/style/style.css.gz +0 -0
  30. package/packages/theme/index.js.gz +0 -0
  31. package/style.css +2 -2
  32. package/style.css.gz +0 -0
  33. package/types/i18n/global.d.ts +583 -0
  34. package/types/i18n/index.d.ts +4 -2
  35. package/types/layout/index.d.ts +1 -1
  36. package/types/layout/store/index.d.ts +6 -1
  37. package/types/layout/store/menu.d.ts +2 -0
  38. package/types/layout/store/nav.d.ts +2 -1
  39. package/types/layout/store/tab.d.ts +1 -0
  40. package/types/main-app-framework/business/video-link/api.d.ts +2 -0
  41. package/types/main-app-framework/components/iframe-page/index.d.ts +3 -0
  42. package/types/main-app-framework/components/index.d.ts +1 -0
  43. package/types/main-app-framework/components/person-set-dialog/src/api.d.ts +2 -0
  44. package/types/main-app-framework/components/person-set-dialog/src/components/index.d.ts +2 -0
  45. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/api.d.ts +20 -0
  46. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-builtIn-dialog.d.ts +19 -0
  47. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-notBuiltIn-dialog.d.ts +22 -0
  48. package/types/main-app-framework/constant/index.d.ts +1 -1
  49. package/types/main-app-framework/data-track/api.d.ts +2 -0
  50. package/types/main-app-framework/data-track/index.d.ts +2 -0
  51. package/types/main-app-framework/i18n/index.d.ts +523 -0
  52. package/types/main-app-framework/index.d.ts +1 -0
  53. package/types/main-app-framework/init-config/get-nav-config/api.d.ts +2 -0
  54. package/types/main-app-framework/init-config/get-nav-config/index.d.ts +3 -2
  55. package/types/main-app-framework/init-config/get-project-config/api.d.ts +3 -2
  56. package/types/main-app-framework/init-config/get-system-config/api.d.ts +2 -0
  57. package/types/main-app-framework/init-config/get-system-config/index.d.ts +3 -3
  58. package/types/main-app-framework/init-config/get-tenant-config/api.d.ts +1 -1
  59. package/types/main-app-framework/init-layout/hooks/use-initialization.d.ts +1 -0
  60. package/types/main-app-framework/utils/src/get-portal-url/crypto.d.ts +14 -0
  61. package/types/main-app-framework/utils/src/get-portal-url/encrypt.d.ts +42 -0
  62. package/types/main-app-framework/utils/src/get-portal-url/generate-url.d.ts +4 -0
  63. package/types/main-app-framework/utils/src/get-portal-url/handle-portal-params.d.ts +2 -0
  64. package/types/main-app-framework/utils/src/get-portal-url/index.d.ts +2 -0
  65. package/types/main-app-framework/utils/src/get-portal-url/type.d.ts +16 -0
  66. package/types/main-app-framework/utils/src/set-common-info.d.ts +4 -2
  67. package/types/main-app-framework/utils/src/tools.d.ts +5 -1
  68. package/index-3xCfFiyN.js +0 -68
  69. package/index-3xCfFiyN.js.gz +0 -0
  70. package/index-CIytPmSg.js +0 -70
  71. package/index-CIytPmSg.js.gz +0 -0
  72. package/index-Cp6SD-TQ.js +0 -7344
  73. package/index-Cp6SD-TQ.js.gz +0 -0
  74. package/packages/main-app-framework/index-CY7DAPNF.js +0 -68
  75. package/packages/main-app-framework/index-CY7DAPNF.js.gz +0 -0
  76. package/packages/main-app-framework/index-DQRCs8SS.js +0 -70
  77. package/packages/main-app-framework/index-DQRCs8SS.js.gz +0 -0
  78. package/packages/main-app-framework/index-DtmpkTTl.js +0 -6045
  79. package/packages/main-app-framework/index-DtmpkTTl.js.gz +0 -0
@@ -1,56 +1,66 @@
1
1
  import '@das-fed/web/packages/micro-frontend/style.css';
2
- import { ref as w, watch as y, reactive as O, getCurrentScope as oe, onScopeDispose as ce, unref as I, getCurrentInstance as le, onMounted as ue, nextTick as Z, defineComponent as x, computed as T, openBlock as E, createElementBlock as N, Fragment as $, renderList as de, withDirectives as pe, createBlock as ee, vShow as me, createCommentVNode as fe, mergeProps as ve, withCtx as C, renderSlot as V, createVNode as F, onActivated as Ae } from "vue";
3
- import { DasWebLayout as he, DasWebNav as we, DasWebMenu as ge, DasWebTabs as _e } from "@das-fed/web/packages/layout/index";
4
- const z = w("/das-micro-app"), f = w([]), k = w(!1), R = w([]), D = w(!0);
5
- let A = null, h = null, L = null;
6
- const b = (e, t, n) => {
7
- var c, a, i, s;
8
- const r = f.value.find((o) => o.name === e);
9
- if (r) {
10
- if (r.entry.startsWith("/") || r.entry.match(location.origin)) {
11
- (a = (c = r.dom) == null ? void 0 : c.contentWindow) == null || a.postMessage({ type: t, data: n });
12
- return;
13
- }
14
- (s = (i = r.dom) == null ? void 0 : i.contentWindow) == null || s.postMessage({ type: t, data: n }, r.entry);
15
- }
16
- }, q = (e, t) => {
2
+ import { ref as w, watch as M, reactive as T, getCurrentScope as ue, onScopeDispose as de, unref as I, getCurrentInstance as pe, onMounted as me, nextTick as ne, defineComponent as x, computed as N, openBlock as E, createElementBlock as D, Fragment as z, renderList as fe, withDirectives as ve, createBlock as se, vShow as he, createCommentVNode as Ae, mergeProps as we, withCtx as C, renderSlot as V, createVNode as O, onActivated as ge } from "vue";
3
+ import { DasWebLayout as ye, DasWebNav as Me, DasWebMenu as Le, DasWebTabs as _e } from "@das-fed/web/packages/layout/index";
4
+ const W = w("/das-micro-app"), f = w([]), k = w(!1), F = w([]), R = w(!0);
5
+ let v = null, h = null, _ = null;
6
+ const be = (e) => new Promise((t) => {
7
+ const n = () => {
8
+ if (v != null && v[e]) return t();
9
+ setTimeout(() => n(), 50);
10
+ };
11
+ n();
12
+ }), b = (e, t, n, s) => {
13
+ var i;
14
+ const { awaitListener: c = !1 } = s || {}, { origin: a } = new URL(location.href);
15
+ c ? be(t).then(() => {
16
+ var r;
17
+ (r = window.self) == null || r.postMessage({ type: t, data: n }, a);
18
+ }) : (i = window.self) == null || i.postMessage({ type: t, data: n }, a);
19
+ }, Ie = (e) => new Promise((t) => {
20
+ const n = () => {
21
+ if (h != null && h[e]) return t();
22
+ setTimeout(() => n(), 50);
23
+ };
24
+ n();
25
+ }), q = (e, t, n) => {
17
26
  var a;
18
- const { __IN_DAS_MICRO_APP: n, __DAS_MAIN_APP_HREF: r } = window;
19
- if (!n || !r) return;
20
- const { origin: c } = new URL(r);
21
- (a = window.top) == null || a.postMessage({ type: e, data: t }, c);
22
- }, ye = () => {
27
+ const { awaitListener: s = !1 } = n || {}, { origin: c } = new URL(location.href);
28
+ s ? Ie(e).then(() => {
29
+ var i;
30
+ (i = window.self) == null || i.postMessage({ type: e, data: t }, c);
31
+ }) : (a = window.self) == null || a.postMessage({ type: e, data: t }, c);
32
+ }, Ee = () => {
23
33
  h || (h || (h = {}), window.addEventListener(
24
34
  "message",
25
35
  (e) => {
26
36
  const { type: t, source: n } = e.data || {};
27
37
  if (n !== "react-devtools-content-script" && h[t])
28
- for (const r in h[t])
29
- h[t][r](e.data);
38
+ for (const s in h[t])
39
+ h[t][s](e.data);
30
40
  },
31
41
  !1
32
42
  ));
33
- }, Me = () => {
34
- A || (A || (A = {}), window.addEventListener(
43
+ }, Se = () => {
44
+ v || (v || (v = {}), window.addEventListener(
35
45
  "message",
36
46
  (e) => {
37
47
  const { type: t } = e.data || {};
38
- if (A[t])
39
- for (const n in A[t])
40
- A[t][n](e.data);
48
+ if (v[t])
49
+ for (const n in v[t])
50
+ v[t][n](e.data);
41
51
  },
42
52
  !1
43
53
  ));
44
- }, Le = (e, t) => {
45
- Me();
54
+ }, Pe = (e, t) => {
55
+ Se();
46
56
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
47
- return A[e] || (A[e] = {}), A[e][n] = t, {
57
+ return v[e] || (v[e] = {}), v[e][n] = t, {
48
58
  remove: () => {
49
- A[e] && A[e][n] && delete A[e][n];
59
+ v[e] && v[e][n] && delete v[e][n];
50
60
  }
51
61
  };
52
- }, be = (e, t) => {
53
- ye();
62
+ }, Te = (e, t) => {
63
+ Ee();
54
64
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
55
65
  return h[e] || (h[e] = {}), h[e][n] = t, {
56
66
  remove: () => {
@@ -60,7 +70,7 @@ const b = (e, t, n) => {
60
70
  }, Q = async (e) => {
61
71
  await Promise.all(
62
72
  f.value.filter((t) => t.loaded).map((t) => new Promise(async (n) => {
63
- t.dom || await new Promise((r) => y(() => t.dom, r)), setTimeout(() => {
73
+ t.dom || await new Promise((s) => M(() => t.dom, s)), setTimeout(() => {
64
74
  b(t.name, "sessionStorage", e), n(!0);
65
75
  }, 0);
66
76
  }))
@@ -68,14 +78,14 @@ const b = (e, t, n) => {
68
78
  }, d = {
69
79
  loadMicroApp: (e) => {
70
80
  k.value = !0;
71
- const t = f.value.find((i) => i.name === e), n = f.value.find((i) => i.actived), r = !!t, c = !(t != null && t.loaded), a = t == null ? void 0 : t.actived;
72
- if (!r) {
81
+ const t = f.value.find((i) => i.name === e), n = f.value.find((i) => i.actived), s = !!t, c = !(t != null && t.loaded), a = t == null ? void 0 : t.actived;
82
+ if (!s) {
73
83
  n && (n.actived = !1);
74
84
  return;
75
85
  }
76
86
  if (t.isFirstActived = !0, c) {
77
87
  t.src = t.entry;
78
- const i = f.value.find((s) => s.actived);
88
+ const i = f.value.find((r) => r.actived);
79
89
  i && (i.actived = !1), t.loaded = !0, t.actived = !0;
80
90
  return;
81
91
  }
@@ -86,7 +96,7 @@ const b = (e, t, n) => {
86
96
  },
87
97
  hideMicroApp: async (e) => {
88
98
  const t = f.value.find((n) => n.name === e);
89
- t && t.loaded && (t.dom || await new Promise((n) => y(() => t.dom, n)), b(e, "router", {
99
+ t && t.loaded && (t.dom || await new Promise((n) => M(() => t.dom, n)), b(e, "router", {
90
100
  cmd: "push",
91
101
  route: {
92
102
  name: "das-micro-app-ghost",
@@ -109,8 +119,8 @@ const b = (e, t, n) => {
109
119
  });
110
120
  },
111
121
  setMicroAppRoute: async (e, t, n) => {
112
- const r = f.value.find((s) => s.name === t);
113
- if (!r || !r.loaded || !r.actived || (r.dom || await new Promise((s) => y(() => r.dom, s)), !r.actived)) return r;
122
+ const s = f.value.find((r) => r.name === t);
123
+ if (!s || !s.loaded || !s.actived || (s.dom || await new Promise((r) => M(() => s.dom, r)), !s.actived)) return s;
114
124
  const c = n.path || n, a = n.query || {}, i = n.params || {};
115
125
  return e.push({
116
126
  path: `/${t}${c}`,
@@ -118,18 +128,18 @@ const b = (e, t, n) => {
118
128
  // @ts-ignore
119
129
  params: i
120
130
  }), setTimeout(() => {
121
- const { isFirstActived: s } = r;
131
+ const { isFirstActived: r } = s;
122
132
  b(t, "router", {
123
- cmd: s ? "replace" : "push",
133
+ cmd: r ? "replace" : "push",
124
134
  route: n,
125
135
  microAppName: t
126
- }), s && (r.isFirstActived = !1);
127
- }, 0), r;
136
+ }), r && (s.isFirstActived = !1);
137
+ }, 0), s;
128
138
  },
129
139
  sendMessageToMicroApp: b,
130
140
  sendMessageToMainApp: q,
131
- addEventListenerFromMainApp: Le,
132
- addEventListenerFromMicroApp: be,
141
+ addEventListenerFromMainApp: Pe,
142
+ addEventListenerFromMicroApp: Te,
133
143
  setMainAppOverlay: (e, t) => {
134
144
  q("bodyOverlay", { visible: e, style: t });
135
145
  },
@@ -148,39 +158,40 @@ const b = (e, t, n) => {
148
158
  },
149
159
  addMicroAppLifeCycleListener: (e, t) => {
150
160
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
151
- L || (L = {});
152
- const r = () => {
153
- L[n] && delete L[n];
161
+ _ || (_ = {});
162
+ const s = () => {
163
+ _[n] && delete _[n];
154
164
  };
155
- return L[n] = {
165
+ return _[n] = {
156
166
  type: e,
157
167
  handler: async (c) => await t(c),
158
- remove: r
159
- }, { remove: r };
168
+ remove: s
169
+ }, { remove: s };
160
170
  },
161
171
  triggerMicroAppLifeCycleListener: (e, t, n) => {
162
172
  var a;
163
- const r = L, { autoRemove: c = !1 } = n || {};
164
- for (const i in r) {
165
- const s = r[i];
166
- s.type === e && ((a = s == null ? void 0 : s.handler) == null || a.call(s, t).then(() => {
167
- c && s.remove();
173
+ const s = _, { autoRemove: c = !1 } = n || {};
174
+ for (const i in s) {
175
+ const r = s[i];
176
+ r.type === e && ((a = r == null ? void 0 : r.handler) == null || a.call(r, t).then(() => {
177
+ c && r.remove();
168
178
  }));
169
179
  }
170
180
  },
171
181
  reloadMicroAppRoute: async (e, t) => {
172
- const n = f.value.find((r) => r.name === e);
173
- n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => y(() => n.dom, r)), b(e, "route", { cmd: "reload", path: t })));
182
+ const n = f.value.find((s) => s.name === e);
183
+ n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "reload", path: t })));
174
184
  },
175
185
  unloadMicroAppRoute: async (e, t) => {
176
- const n = f.value.find((r) => r.name === e);
177
- n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => y(() => n.dom, r)), b(e, "route", { cmd: "unload", path: t })));
186
+ const n = f.value.find((s) => s.name === e);
187
+ n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "unload", path: t })));
178
188
  },
179
189
  setMainAppLayoutVisible: (e) => {
180
190
  q("layoutVisible", { visible: e });
181
191
  }
182
- }, u = O({
192
+ }, l = T({
183
193
  visible: !1,
194
+ theme: "default",
184
195
  logo: "",
185
196
  items: [],
186
197
  projects: [],
@@ -190,53 +201,56 @@ const b = (e, t, n) => {
190
201
  // activeItem: '',
191
202
  // activeProject: {},
192
203
  eventListeners: {}
193
- }), Ie = {
204
+ }), j = {
194
205
  show: () => {
195
- u.visible = !0;
206
+ l.visible = !0;
196
207
  },
197
208
  hide: () => {
198
- u.visible = !1;
209
+ l.visible = !1;
199
210
  },
200
211
  setLogo: (e) => {
201
- u.logo = e;
212
+ l.logo = e;
213
+ },
214
+ setTheme: (e) => {
215
+ l.theme = e;
202
216
  },
203
217
  setItems: (e) => {
204
- u.visible || (u.visible = !0), u.items = e;
218
+ l.visible || (l.visible = !0), l.items = e;
205
219
  },
206
- getItems: () => u.items,
220
+ getItems: () => l.items,
207
221
  removeItem: (e) => {
208
- const t = u.items.filter((n) => n.value !== e);
209
- u.items = t;
222
+ const t = l.items.filter((n) => n.value !== e);
223
+ l.items = t;
210
224
  },
211
225
  appendItem: (e) => {
212
- u.visible || (u.visible = !0), !u.items.find((n) => n.value == e.value) && u.items.push(e);
226
+ l.visible || (l.visible = !0), !l.items.find((n) => n.value == e.value) && l.items.push(e);
213
227
  },
214
228
  setActiveItem: (e) => {
215
- u.activeItem = e;
229
+ l.activeItem = e;
216
230
  },
217
231
  setConfig: (e) => {
218
- u.config = e;
232
+ l.config = e;
219
233
  },
220
234
  setProjects: (e) => {
221
- u.projects = e;
235
+ l.projects = e;
222
236
  },
223
237
  setProjectConfig: (e) => {
224
- u.projectConfig = e;
238
+ l.projectConfig = e;
225
239
  },
226
240
  setActiveProject: (e) => {
227
- u.activeProject = e;
241
+ l.activeProject = e;
228
242
  },
229
243
  setUserInfo: (e) => {
230
- u.userInfo = e;
244
+ l.userInfo = e;
231
245
  },
232
246
  setSearchConfig: (e) => {
233
- u.searchConfig = e;
247
+ l.searchConfig = e;
234
248
  },
235
249
  triggerEventListener: (e, t, n) => {
236
250
  var i;
237
- const r = u.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
238
- for (const s in r) {
239
- const o = r[s];
251
+ const s = l.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
252
+ for (const r in s) {
253
+ const o = s[r];
240
254
  o.type === e && a.push(
241
255
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
242
256
  c && o.remove();
@@ -246,10 +260,10 @@ const b = (e, t, n) => {
246
260
  return Promise.all(a).then(() => !0).catch(() => !1);
247
261
  },
248
262
  addEventListener: (e, t) => {
249
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
250
- u.eventListeners[n] && delete u.eventListeners[n];
263
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
264
+ l.eventListeners[n] && delete l.eventListeners[n];
251
265
  };
252
- return u.eventListeners[n] = {
266
+ return l.eventListeners[n] = {
253
267
  type: e,
254
268
  handler: async (c) => {
255
269
  try {
@@ -258,30 +272,38 @@ const b = (e, t, n) => {
258
272
  throw a;
259
273
  }
260
274
  },
261
- remove: r
275
+ remove: s
262
276
  }, {
263
- remove: r
277
+ remove: s
264
278
  };
265
279
  }
266
- }, _ = O({
280
+ }, g = T({
281
+ theme: "default",
267
282
  items: [],
283
+ collapse: !1,
268
284
  eventListeners: {}
269
- }), Ee = {
285
+ }), H = {
270
286
  setItems: (e) => {
271
- _.items = e;
287
+ g.items = e;
288
+ },
289
+ getItems: () => g.items,
290
+ setTheme: (e) => {
291
+ g.theme = e;
272
292
  },
273
- getItems: () => _.items,
274
293
  setActiveItem: (e) => {
275
- _.activeItem = e;
294
+ g.activeItem = e;
295
+ },
296
+ setCollapse: (e) => {
297
+ g.collapse = e;
276
298
  },
277
299
  setPopupClassName: (e) => {
278
- _.popupClassName = e;
300
+ g.popupClassName = e;
279
301
  },
280
302
  triggerEventListener: (e, t, n) => {
281
303
  var i;
282
- const r = _.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
283
- for (const s in r) {
284
- const o = r[s];
304
+ const s = g.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
305
+ for (const r in s) {
306
+ const o = s[r];
285
307
  o.type === e && a.push(
286
308
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
287
309
  c && o.remove();
@@ -291,10 +313,10 @@ const b = (e, t, n) => {
291
313
  return Promise.all(a).then(() => !0).catch(() => !1);
292
314
  },
293
315
  addEventListener: (e, t) => {
294
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
295
- _.eventListeners[n] && delete _.eventListeners[n];
316
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
317
+ g.eventListeners[n] && delete g.eventListeners[n];
296
318
  };
297
- return _.eventListeners[n] = {
319
+ return g.eventListeners[n] = {
298
320
  type: e,
299
321
  handler: async (c) => {
300
322
  try {
@@ -303,35 +325,39 @@ const b = (e, t, n) => {
303
325
  throw a;
304
326
  }
305
327
  },
306
- remove: r
328
+ remove: s
307
329
  }, {
308
- remove: r
330
+ remove: s
309
331
  };
310
332
  }
311
- }, v = O({
333
+ }, A = T({
334
+ theme: "default",
312
335
  items: [],
313
336
  eventListeners: {}
314
- }), Se = {
337
+ }), U = {
315
338
  setItems: (e) => {
316
- v.items = e;
339
+ A.items = e;
340
+ },
341
+ getItems: () => A.items,
342
+ setTheme: (e) => {
343
+ A.theme = e;
317
344
  },
318
- getItems: () => v.items,
319
345
  removeItem: (e) => {
320
- const t = v.items.filter((n) => n.value !== e);
321
- v.items = t;
346
+ const t = A.items.filter((n) => n.value !== e);
347
+ A.items = t;
322
348
  },
323
349
  appendItem: (e) => {
324
- const t = v.items.findIndex((n) => n.value == e.value);
325
- t !== -1 ? v.items.splice(t, 1, e) : v.items.push(e);
350
+ const t = A.items.findIndex((n) => n.value == e.value);
351
+ t !== -1 ? A.items.splice(t, 1, e) : A.items.push(e);
326
352
  },
327
353
  setActiveItem: (e) => {
328
- v.activeItem = e;
354
+ A.activeItem = e;
329
355
  },
330
356
  triggerEventListener: (e, t, n) => {
331
357
  var i;
332
- const r = v.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
333
- for (const s in r) {
334
- const o = r[s];
358
+ const s = A.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
359
+ for (const r in s) {
360
+ const o = s[r];
335
361
  o.type === e && a.push(
336
362
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
337
363
  c && o.remove();
@@ -341,10 +367,10 @@ const b = (e, t, n) => {
341
367
  return Promise.all(a).then(() => !0).catch(() => !1);
342
368
  },
343
369
  addEventListener: (e, t) => {
344
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
345
- v.eventListeners[n] && delete v.eventListeners[n];
370
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
371
+ A.eventListeners[n] && delete A.eventListeners[n];
346
372
  };
347
- return v.eventListeners[n] = {
373
+ return A.eventListeners[n] = {
348
374
  type: e,
349
375
  handler: async (c) => {
350
376
  try {
@@ -353,19 +379,19 @@ const b = (e, t, n) => {
353
379
  throw a;
354
380
  }
355
381
  },
356
- remove: r
382
+ remove: s
357
383
  }, {
358
- remove: r
384
+ remove: s
359
385
  };
360
386
  }
361
- }, P = O({
387
+ }, P = T({
362
388
  eventListeners: {}
363
- }), Pe = {
389
+ }), Ce = {
364
390
  triggerEventListener: (e, t, n) => {
365
391
  var i;
366
- const r = P.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
367
- for (const s in r) {
368
- const o = r[s];
392
+ const s = P.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
393
+ for (const r in s) {
394
+ const o = s[r];
369
395
  o.type === e && a.push(
370
396
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
371
397
  c && o.remove();
@@ -375,7 +401,7 @@ const b = (e, t, n) => {
375
401
  return Promise.all(a).then(() => !0).catch(() => !1);
376
402
  },
377
403
  addEventListener: (e, t) => {
378
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
404
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
379
405
  P.eventListeners[n] && delete P.eventListeners[n];
380
406
  };
381
407
  return P.eventListeners[n] = {
@@ -387,81 +413,84 @@ const b = (e, t, n) => {
387
413
  throw a;
388
414
  }
389
415
  },
390
- remove: r
416
+ remove: s
391
417
  }, {
392
- remove: r
418
+ remove: s
393
419
  };
394
420
  }
395
- }, W = O({
421
+ }, B = T({
396
422
  visible: !1,
397
423
  style: {}
398
424
  }), Oe = {
399
425
  set: (e, t) => {
400
- W.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (W.style = t);
426
+ B.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (B.style = t);
401
427
  }
402
- }, Ce = {
403
- nav: u,
404
- menu: _,
405
- tab: v,
406
- overlay: W,
428
+ }, Fe = {
429
+ nav: l,
430
+ menu: g,
431
+ tab: A,
432
+ overlay: B,
407
433
  iframeView: P,
408
434
  visible: w(!0)
409
- }, j = {
410
- nav: Ie,
411
- menu: Ee,
412
- tab: Se,
435
+ }, G = {
436
+ nav: j,
437
+ menu: H,
438
+ tab: U,
413
439
  overlay: Oe,
414
- iframeView: Pe,
415
- setVisible: (e) => Ce.visible.value = e
416
- }, te = (e, t) => {
440
+ iframeView: Ce,
441
+ setVisible: (e) => Fe.visible.value = e,
442
+ setTheme: (e) => {
443
+ j.setTheme(e), H.setTheme(e), U.setTheme(e);
444
+ }
445
+ }, re = (e, t) => {
417
446
  const n = e.__vccOpts || e;
418
- for (const [r, c] of t)
419
- n[r] = c;
447
+ for (const [s, c] of t)
448
+ n[s] = c;
420
449
  return n;
421
450
  };
422
- var H;
423
- const B = typeof window < "u", Fe = (e) => typeof e == "string", Re = () => {
451
+ var J;
452
+ const $ = typeof window < "u", Re = (e) => typeof e == "string", Ne = () => {
424
453
  };
425
- B && ((H = window == null ? void 0 : window.navigator) != null && H.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
426
- function ne(e) {
454
+ $ && ((J = window == null ? void 0 : window.navigator) != null && J.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
455
+ function ae(e) {
427
456
  return typeof e == "function" ? e() : I(e);
428
457
  }
429
458
  function De(e) {
430
459
  return e;
431
460
  }
432
- function re(e) {
433
- return oe() ? (ce(e), !0) : !1;
461
+ function ie(e) {
462
+ return ue() ? (de(e), !0) : !1;
434
463
  }
435
- function Te(e, t = !0) {
436
- le() ? ue(e) : t ? e() : Z(e);
464
+ function ke(e, t = !0) {
465
+ pe() ? me(e) : t ? e() : ne(e);
437
466
  }
438
- function se(e) {
467
+ function oe(e) {
439
468
  var t;
440
- const n = ne(e);
469
+ const n = ae(e);
441
470
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
442
471
  }
443
- const Ne = B ? window : void 0, ke = B ? window.document : void 0;
444
- function xe(...e) {
445
- let t, n, r, c;
446
- if (Fe(e[0]) || Array.isArray(e[0]) ? ([n, r, c] = e, t = Ne) : [t, n, r, c] = e, !t)
447
- return Re;
448
- Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
472
+ const xe = $ ? window : void 0, Ve = $ ? window.document : void 0;
473
+ function qe(...e) {
474
+ let t, n, s, c;
475
+ if (Re(e[0]) || Array.isArray(e[0]) ? ([n, s, c] = e, t = xe) : [t, n, s, c] = e, !t)
476
+ return Ne;
477
+ Array.isArray(n) || (n = [n]), Array.isArray(s) || (s = [s]);
449
478
  const a = [], i = () => {
450
- a.forEach((l) => l()), a.length = 0;
451
- }, s = (l, g, m, M) => (l.addEventListener(g, m, M), () => l.removeEventListener(g, m, M)), o = y(() => [se(t), ne(c)], ([l, g]) => {
452
- i(), l && a.push(...n.flatMap((m) => r.map((M) => s(l, m, M, g))));
479
+ a.forEach((u) => u()), a.length = 0;
480
+ }, r = (u, y, m, L) => (u.addEventListener(y, m, L), () => u.removeEventListener(y, m, L)), o = M(() => [oe(t), ae(c)], ([u, y]) => {
481
+ i(), u && a.push(...n.flatMap((m) => s.map((L) => r(u, m, L, y))));
453
482
  }, { immediate: !0, flush: "post" }), p = () => {
454
483
  o(), i();
455
484
  };
456
- return re(p), p;
485
+ return ie(p), p;
457
486
  }
458
- function Ve(e, t = !1) {
459
- const n = w(), r = () => n.value = !!e();
460
- return r(), Te(r, t), n;
487
+ function Qe(e, t = !1) {
488
+ const n = w(), s = () => n.value = !!e();
489
+ return s(), ke(s, t), n;
461
490
  }
462
- const U = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, G = "__vueuse_ssr_handlers__";
463
- U[G] = U[G] || {};
464
- const J = [
491
+ const K = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, X = "__vueuse_ssr_handlers__";
492
+ K[X] = K[X] || {};
493
+ const Y = [
465
494
  [
466
495
  "requestFullscreen",
467
496
  "exitFullscreen",
@@ -503,54 +532,54 @@ const J = [
503
532
  "MSFullscreenError"
504
533
  ]
505
534
  ];
506
- function qe(e, t = {}) {
507
- const { document: n = ke, autoExit: r = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
508
- let i = J[0];
509
- const s = Ve(() => {
535
+ function Be(e, t = {}) {
536
+ const { document: n = Ve, autoExit: s = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
537
+ let i = Y[0];
538
+ const r = Qe(() => {
510
539
  if (n) {
511
- for (const S of J)
540
+ for (const S of Y)
512
541
  if (S[1] in n)
513
542
  return i = S, !0;
514
543
  } else
515
544
  return !1;
516
545
  return !1;
517
- }), [o, p, l, , g] = i;
546
+ }), [o, p, u, , y] = i;
518
547
  async function m() {
519
- s.value && (n != null && n[l] && await n[p](), a.value = !1);
548
+ r.value && (n != null && n[u] && await n[p](), a.value = !1);
520
549
  }
521
- async function M() {
522
- if (!s.value)
550
+ async function L() {
551
+ if (!r.value)
523
552
  return;
524
553
  await m();
525
- const S = se(c);
554
+ const S = oe(c);
526
555
  S && (await S[o](), a.value = !0);
527
556
  }
528
- async function ie() {
529
- a.value ? await m() : await M();
557
+ async function le() {
558
+ a.value ? await m() : await L();
530
559
  }
531
- return n && xe(n, g, () => {
532
- a.value = !!(n != null && n[l]);
533
- }, !1), r && re(m), {
534
- isSupported: s,
560
+ return n && qe(n, y, () => {
561
+ a.value = !!(n != null && n[u]);
562
+ }, !1), s && ie(m), {
563
+ isSupported: r,
535
564
  isFullscreen: a,
536
- enter: M,
565
+ enter: L,
537
566
  exit: m,
538
- toggle: ie
567
+ toggle: le
539
568
  };
540
569
  }
541
- var K;
570
+ var Z;
542
571
  (function(e) {
543
572
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
544
- })(K || (K = {}));
545
- var Qe = Object.defineProperty, X = Object.getOwnPropertySymbols, We = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable, Y = (e, t, n) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, $e = (e, t) => {
573
+ })(Z || (Z = {}));
574
+ var $e = Object.defineProperty, ee = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable, te = (e, t, n) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, je = (e, t) => {
546
575
  for (var n in t || (t = {}))
547
- We.call(t, n) && Y(e, n, t[n]);
548
- if (X)
549
- for (var n of X(t))
550
- Be.call(t, n) && Y(e, n, t[n]);
576
+ ze.call(t, n) && te(e, n, t[n]);
577
+ if (ee)
578
+ for (var n of ee(t))
579
+ We.call(t, n) && te(e, n, t[n]);
551
580
  return e;
552
581
  };
553
- const ze = {
582
+ const He = {
554
583
  easeInSine: [0.12, 0, 0.39, 0],
555
584
  easeOutSine: [0.61, 1, 0.88, 1],
556
585
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -576,10 +605,10 @@ const ze = {
576
605
  easeOutBack: [0.34, 1.56, 0.64, 1],
577
606
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
578
607
  };
579
- $e({
608
+ je({
580
609
  linear: De
581
- }, ze);
582
- const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
610
+ }, He);
611
+ const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
583
612
  __name: "das-micro-app",
584
613
  props: {
585
614
  src: {},
@@ -588,27 +617,27 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
588
617
  },
589
618
  emits: ["onLoaded", "onActivated", "onDeactivated"],
590
619
  setup(e, { emit: t }) {
591
- const n = e, r = t, c = (s) => {
592
- r("onLoaded", s);
593
- }, a = T(() => n.actived);
594
- return y(() => a.value, (s) => {
595
- s && r("onActivated"), s || r("onDeactivated");
596
- }), (s, o) => (E(), N("iframe", {
620
+ const n = e, s = t, c = (r) => {
621
+ s("onLoaded", r);
622
+ }, a = N(() => n.actived);
623
+ return M(() => a.value, (r) => {
624
+ r && s("onActivated"), r || s("onDeactivated");
625
+ }), (r, o) => (E(), D("iframe", {
597
626
  class: "das-micro-app",
598
627
  src: n.src,
599
628
  entry: n.src,
600
629
  name: n.name,
601
630
  frameborder: "0",
602
631
  onLoad: c
603
- }, null, 40, je));
632
+ }, null, 40, Ue));
604
633
  }
605
- }), Ue = /* @__PURE__ */ te(He, [["__scopeId", "data-v-2266bab0"]]), Ge = /* @__PURE__ */ x({
634
+ }), Je = /* @__PURE__ */ re(Ge, [["__scopeId", "data-v-8ae871f6"]]), Ke = /* @__PURE__ */ x({
606
635
  __name: "das-micro-apps",
607
636
  setup(e) {
608
637
  const t = w(null), n = async (a, i) => {
609
- const s = f.value.find((m) => m.name === i);
610
- if (!s) return;
611
- s.dom = a.target, await Z(), await new Promise((m) => setTimeout(m, 50));
638
+ const r = f.value.find((m) => m.name === i);
639
+ if (!r) return;
640
+ r.dom = a.target, await ne(), await new Promise((m) => setTimeout(m, 50));
612
641
  const o = () => {
613
642
  const m = t.value.getBoundingClientRect() || {};
614
643
  return m.width = t.value.clientWidth, m.height = t.value.clientHeight, m;
@@ -616,63 +645,45 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
616
645
  d.sendMessageToMicroApp(i, "onLoaded", {
617
646
  href: location.href,
618
647
  microAppContainerRect: o(),
619
- entry: s.entry,
620
- name: s.name
648
+ entry: r.entry,
649
+ name: r.name
621
650
  });
622
- const { dom: p, ...l } = s;
623
- d.triggerMicroAppLifeCycleListener("onLoaded", l), new ResizeObserver(() => {
651
+ const { dom: p, ...u } = r;
652
+ d.triggerMicroAppLifeCycleListener("onLoaded", u), new ResizeObserver(() => {
624
653
  d.sendMessageToMicroApp(i, "resize", o());
625
654
  }).observe(t.value), d.sendMessageToMicroApp(i, "setProxyMessageStatus", { visible: !0, parentHref: location.href }), d.sendMessageToMicroApp(i, "setProxSsoStatus", { visible: !0, parentHref: location.href });
626
- }, r = (a, i) => {
627
- const s = f.value.find((l) => l.name === i);
628
- if (!s) return;
629
- const { dom: o, ...p } = s;
655
+ }, s = (a, i) => {
656
+ const r = f.value.find((u) => u.name === i);
657
+ if (!r) return;
658
+ const { dom: o, ...p } = r;
630
659
  d.sendMessageToMicroApp(i, "onActivated"), d.triggerMicroAppLifeCycleListener("onActivated", p);
631
660
  }, c = (a, i) => {
632
- const s = f.value.find((l) => l.name === i);
633
- if (!s) return;
634
- const { dom: o, ...p } = s;
661
+ const r = f.value.find((u) => u.name === i);
662
+ if (!r) return;
663
+ const { dom: o, ...p } = r;
635
664
  d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
636
665
  };
637
- return (a, i) => (E(), N(
638
- "div",
639
- {
640
- ref_key: "containerRef",
641
- ref: t,
642
- class: "das-micro-app-container"
643
- },
644
- [
645
- (E(!0), N(
646
- $,
647
- null,
648
- de(I(f), (s) => (E(), N(
649
- $,
650
- null,
651
- [
652
- s.loaded ? pe((E(), ee(Ue, {
653
- key: 0,
654
- src: s.src || "",
655
- name: s.name,
656
- actived: s.actived,
657
- onOnLoaded: (o) => n(o, s.name),
658
- onOnActivated: (o) => r(o, s.name),
659
- onOnDeactivated: (o) => c(o, s.name)
660
- }, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
661
- [me, s.actived]
662
- ]) : fe("v-if", !0)
663
- ],
664
- 64
665
- /* STABLE_FRAGMENT */
666
- ))),
667
- 256
668
- /* UNKEYED_FRAGMENT */
669
- ))
670
- ],
671
- 512
672
- /* NEED_PATCH */
673
- ));
666
+ return (a, i) => (E(), D("div", {
667
+ ref_key: "containerRef",
668
+ ref: t,
669
+ class: "das-micro-app-container"
670
+ }, [
671
+ (E(!0), D(z, null, fe(I(f), (r) => (E(), D(z, null, [
672
+ r.loaded ? ve((E(), se(Je, {
673
+ key: 0,
674
+ src: r.src || "",
675
+ name: r.name,
676
+ actived: r.actived,
677
+ onOnLoaded: (o) => n(o, r.name),
678
+ onOnActivated: (o) => s(o, r.name),
679
+ onOnDeactivated: (o) => c(o, r.name)
680
+ }, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
681
+ [he, r.actived]
682
+ ]) : Ae("", !0)
683
+ ], 64))), 256))
684
+ ], 512));
674
685
  }
675
- }), Je = /* @__PURE__ */ te(Ge, [["__scopeId", "data-v-2e3798bc"]]), Ze = /* @__PURE__ */ x({
686
+ }), Xe = /* @__PURE__ */ re(Ke, [["__scopeId", "data-v-3abdb1e9"]]), tt = /* @__PURE__ */ x({
676
687
  __name: "das-main-app-layout",
677
688
  props: {
678
689
  transitionConfig: { default: () => {
@@ -686,93 +697,92 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
686
697
  } }
687
698
  },
688
699
  setup(e) {
689
- const t = e, n = T(() => !k.value), r = T(() => ({
700
+ const t = e, n = N(() => !k.value), s = N(() => ({
690
701
  "enter-active-class": "animate__animated animate__fadeInLeft",
691
702
  ...t.transitionConfig
692
- })), c = T(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
693
- return (a, i) => (E(), ee(I(he), ve({
694
- "transition-config": r.value,
703
+ })), c = N(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
704
+ return (a, i) => (E(), se(I(ye), we({
705
+ "transition-config": s.value,
695
706
  "router-view-visible": n.value
696
707
  }, c.value), {
697
708
  header: C(() => [
698
709
  V(a.$slots, "header", {}, () => [
699
- F(I(we))
710
+ O(I(Me))
700
711
  ])
701
712
  ]),
702
713
  aside: C(() => [
703
714
  V(a.$slots, "aside", {}, () => [
704
- F(I(ge), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
715
+ O(I(Le), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
705
716
  ])
706
717
  ]),
707
718
  tab: C(() => [
708
719
  V(a.$slots, "tab", {}, () => [
709
- F(I(_e), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
720
+ O(I(_e), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
710
721
  ])
711
722
  ]),
712
723
  default: C(() => [
713
- F(Je)
724
+ O(Xe)
714
725
  ]),
715
726
  _: 3
716
- /* FORWARDED */
717
727
  }, 16, ["transition-config", "router-view-visible"]));
718
728
  }
719
- }), ae = /* @__PURE__ */ x({
729
+ }), ce = /* @__PURE__ */ x({
720
730
  __name: "das-micro-app-ghost",
721
731
  setup(e) {
722
- return Ae(() => {
732
+ return ge(() => {
723
733
  setTimeout(() => {
724
734
  document.documentElement.checkVisibility() && history.back();
725
735
  }, 300);
726
736
  }), (t, n) => null;
727
737
  }
728
- }), Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, et = (e, t) => {
738
+ }), Ye = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, nt = (e, t) => {
729
739
  if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
730
- window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (z.value = e.microAppRouterPrefix), f.value = (e.microApps || []).filter((c) => !!c.name).map((c) => ({ ...c, entry: Ke(c.entry || c.name) })), t == null || t.addRoute({
740
+ window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (W.value = e.microAppRouterPrefix), f.value = (e.microApps || []).filter((c) => !!c.name).map((c) => ({ ...c, entry: Ye(c.entry || c.name) })), t == null || t.addRoute({
731
741
  name: "das-micro-app",
732
- path: `${z.value}/:pathMatch(.*)*`,
733
- component: ae,
742
+ path: `${W.value}/:pathMatch(.*)*`,
743
+ component: ce,
734
744
  meta: { isMicroApp: !0, keepAlive: !0 }
735
745
  }), d.addEventListenerFromMicroApp("bodyOverlay", (c) => {
736
746
  const { visible: a, style: i } = c.data;
737
- j.overlay.set(a, i);
747
+ G.overlay.set(a, i);
738
748
  }), d.addEventListenerFromMicroApp("layoutVisible", (c) => {
739
749
  const { visible: a } = c.data;
740
- j.setVisible(a);
750
+ G.setVisible(a);
741
751
  }), d.addEventListenerFromMicroApp("route", (c) => {
742
- const { name: a, cmd: i, path: s } = c.data;
743
- i === "reload" && d.reloadMicroAppRoute(a, s), i === "unload" && d.unloadMicroAppRoute(a, s);
752
+ const { name: a, cmd: i, path: r } = c.data;
753
+ i === "reload" && d.reloadMicroAppRoute(a, r), i === "unload" && d.unloadMicroAppRoute(a, r);
744
754
  });
745
- const { enter: n, exit: r } = qe();
755
+ const { enter: n, exit: s } = Be();
746
756
  d.addEventListenerFromMicroApp("fullscreen", (c) => {
747
757
  const a = c.data;
748
- a && n(), a || r();
758
+ a && n(), a || s();
749
759
  }), d.addEventListenerFromMicroApp("location", (c) => {
750
760
  const { cmd: a, isAutoCloseApp: i } = c.data || {};
751
761
  a === "reload" && (i !== void 0 && (window.__isAutoCloseApp = i), location.reload());
752
762
  });
753
- }, tt = (e, t) => {
763
+ }, st = (e, t) => {
754
764
  if (!(e != null && e.microAppName)) return;
755
765
  window.config.microAppName = e.microAppName, window.self !== window.top && e.microAppName && (window.__IN_DAS_MICRO_APP = !0);
756
766
  const n = "das-micro-app-ghost";
757
767
  t == null || t.addRoute({
758
768
  name: n,
759
769
  path: `/${n}/:pathMatch(.*)*`,
760
- component: ae,
770
+ component: ce,
761
771
  meta: { isMicroApp: !0, keepAlive: !0 }
762
772
  });
763
- const r = w(!1), c = w(!1), a = w("");
764
- y(
773
+ const s = w(!1), c = w(!1), a = w("");
774
+ M(
765
775
  () => t.currentRoute.value,
766
776
  (i) => {
767
- if (r.value) {
768
- r.value = !1;
777
+ if (s.value) {
778
+ s.value = !1;
769
779
  return;
770
780
  }
771
781
  if (c.value) {
772
782
  c.value = !1;
773
783
  return;
774
784
  }
775
- const { path: s, query: o, params: p, meta: l } = i;
785
+ const { path: r, query: o, params: p, meta: u } = i;
776
786
  if (a.value.includes(i.path)) {
777
787
  a.value = "";
778
788
  return;
@@ -780,45 +790,45 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
780
790
  d.sendMessageToMainApp("router", {
781
791
  cmd: "push",
782
792
  route: {
783
- path: s,
793
+ path: r,
784
794
  query: { ...o, microAppName: e.microAppName },
785
795
  params: p,
786
- meta: l
796
+ meta: u
787
797
  }
788
798
  });
789
799
  }
790
800
  ), d.addEventListenerFromMainApp("router", async (i) => {
791
- var l;
792
- const { cmd: s, route: o, microAppName: p = "" } = i.data;
793
- a.value = ("/" + p + o.path).replace(/\/\//g, "/"), (l = t == null ? void 0 : t[s]) == null || l.call(t, o);
801
+ var u;
802
+ const { cmd: r, route: o, microAppName: p = "" } = i.data;
803
+ a.value = ("/" + p + o.path).replace(/\/\//g, "/"), (u = t == null ? void 0 : t[r]) == null || u.call(t, o);
794
804
  }), d.addEventListenerFromMainApp("onLoaded", (i) => {
795
- const { href: s, microAppContainerRect: o } = i.data;
796
- window.__IN_DAS_MICRO_APP = !0, window.__DAS_MICRO_APP_NAME = e.microAppName, window.__DAS_MAIN_APP_HREF = s, window.__DAS_MICRO_APP_CONTAINER_RECT = o;
805
+ const { href: r, microAppContainerRect: o } = i.data;
806
+ window.__IN_DAS_MICRO_APP = !0, window.__DAS_MICRO_APP_NAME = e.microAppName, window.__DAS_MAIN_APP_HREF = r, window.__DAS_MICRO_APP_CONTAINER_RECT = o;
797
807
  }), d.addEventListenerFromMainApp("onDeactivated", (i) => {
798
- const { name: s = "", path: o, params: p = {}, query: l = {} } = t.currentRoute.value;
808
+ const { name: r = "", path: o, params: p = {}, query: u = {} } = t.currentRoute.value;
799
809
  c.value = !0, t == null || t.push({
800
810
  name: n,
801
- query: { microAppName: e.microAppName, fromQuery: JSON.stringify(l), fromPath: o },
811
+ query: { microAppName: e.microAppName, fromQuery: JSON.stringify(u), fromPath: o },
802
812
  params: p
803
813
  });
804
814
  }), d.addEventListenerFromMainApp("onActivated", (i) => {
805
- const { name: s = "", params: o = {}, query: p = {} } = t.currentRoute.value, { fromPath: l = "", fromQuery: g = "{}" } = p || {};
806
- r.value = !0, t == null || t.push({ path: l, query: JSON.parse(g), params: o });
815
+ const { name: r = "", params: o = {}, query: p = {} } = t.currentRoute.value, { fromPath: u = "", fromQuery: y = "{}" } = p || {};
816
+ s.value = !0, t == null || t.push({ path: u, query: JSON.parse(y), params: o });
807
817
  }), d.addEventListenerFromMainApp("sessionStorage", (i) => {
808
- const { cmd: s, key: o, value: p } = i.data;
809
- s === "setItem" && window.sessionStorage.setItem(o, p), s === "getItem" && window.sessionStorage.getItem(o), s === "removeItem" && window.sessionStorage.removeItem(o), s === "clear" && window.sessionStorage.clear();
818
+ const { cmd: r, key: o, value: p } = i.data;
819
+ r === "setItem" && window.sessionStorage.setItem(o, p), r === "getItem" && window.sessionStorage.getItem(o), r === "removeItem" && window.sessionStorage.removeItem(o), r === "clear" && window.sessionStorage.clear();
810
820
  }), d.addEventListenerFromMainApp("route", (i) => {
811
- const { cmd: s, path: o } = i.data;
812
- s === "reload" && (R.value.push(o), D.value = !1, setTimeout(() => {
813
- D.value = !0, R.value = [];
814
- }, 300)), s === "unload" && (R.value.push(o), D.value = !1, setTimeout(() => {
815
- D.value = !0, R.value = [];
821
+ const { cmd: r, path: o } = i.data;
822
+ r === "reload" && (F.value.push(o), R.value = !1, setTimeout(() => {
823
+ R.value = !0, F.value = [];
824
+ }, 300)), r === "unload" && (F.value.push(o), R.value = !1, setTimeout(() => {
825
+ R.value = !0, F.value = [];
816
826
  }, 100));
817
827
  });
818
828
  };
819
829
  export {
820
- Ze as DasMainAppLayout,
821
- et as initMainApp,
822
- tt as initMicroApp,
830
+ tt as DasMainAppLayout,
831
+ nt as initMainApp,
832
+ st as initMicroApp,
823
833
  d as microFrontend
824
834
  };