@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
@@ -1,82 +1,81 @@
1
- import { effectScope as K, ref as D, markRaw as U, toRaw as $, watch as q, unref as X, createApp as Z } from "vue";
2
- import { initTheme as ee } from "@das-fed/web/packages/theme/index";
3
- import { initI18n as te } from "@das-fed/web/packages/i18n/index";
4
- import { initMainApp as ne, initMicroApp as re } from "@das-fed/web/packages/micro-frontend/index";
5
- import { DasWebLayout as oe } from "@das-fed/web/packages/layout/index";
6
- import { createRouter as se, createWebHistory as ie } from "vue-router";
7
- const ae = {
1
+ import { effectScope as re, ref as H, markRaw as B, toRaw as A, watch as oe, unref as se, createApp as ie } from "vue";
2
+ import { initTheme as ae } from "@das-fed/web/packages/theme/index";
3
+ import { initI18n as ce } from "@das-fed/web/packages/i18n/index";
4
+ import { DasWebLayout as le } from "@das-fed/web/packages/layout/index";
5
+ import { createRouter as ue, createWebHistory as fe } from "vue-router";
6
+ const de = {
8
7
  install: (e, t) => {
9
8
  var n;
10
9
  const r = (n = t == null ? void 0 : t.plugins) == null ? void 0 : n.glob;
11
- r && Object.values(r).sort((o, a) => (o.index ?? 0) - (a.index ?? 0)).filter((o) => o ? !!(o.default && o.default.install || o.install) : !1).forEach((o) => {
10
+ r && Object.values(r).sort((o, s) => (o.index ?? 0) - (s.index ?? 0)).filter((o) => o ? !!(o.default && o.default.install || o.install) : !1).forEach((o) => {
12
11
  o.default && o.default.install && e.use(o.default, t), o.install && e.use(o, t);
13
12
  });
14
13
  }
15
14
  };
16
- var ce = !1;
17
- function le() {
18
- return C().__VUE_DEVTOOLS_GLOBAL_HOOK__;
15
+ var ge = !1;
16
+ function he() {
17
+ return J().__VUE_DEVTOOLS_GLOBAL_HOOK__;
19
18
  }
20
- function C() {
19
+ function J() {
21
20
  return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
22
21
  }
23
- const ue = typeof Proxy == "function", fe = "devtools-plugin:setup", de = "plugin:settings:set";
24
- let b, E;
25
- function ge() {
22
+ const pe = typeof Proxy == "function", me = "devtools-plugin:setup", _e = "plugin:settings:set";
23
+ let v, R;
24
+ function ye() {
26
25
  var e;
27
- return b !== void 0 || (typeof window < "u" && window.performance ? (b = !0, E = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (b = !0, E = globalThis.perf_hooks.performance) : b = !1), b;
26
+ return v !== void 0 || (typeof window < "u" && window.performance ? (v = !0, R = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (v = !0, R = globalThis.perf_hooks.performance) : v = !1), v;
28
27
  }
29
- function he() {
30
- return ge() ? E.now() : Date.now();
28
+ function be() {
29
+ return ye() ? R.now() : Date.now();
31
30
  }
32
- class pe {
31
+ class Se {
33
32
  constructor(t, r) {
34
33
  this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = r;
35
34
  const n = {};
36
35
  if (t.settings)
37
- for (const s in t.settings) {
38
- const i = t.settings[s];
39
- n[s] = i.defaultValue;
36
+ for (const i in t.settings) {
37
+ const a = t.settings[i];
38
+ n[i] = a.defaultValue;
40
39
  }
41
40
  const o = `__vue-devtools-plugin-settings__${t.id}`;
42
- let a = Object.assign({}, n);
41
+ let s = Object.assign({}, n);
43
42
  try {
44
- const s = localStorage.getItem(o), i = JSON.parse(s);
45
- Object.assign(a, i);
43
+ const i = localStorage.getItem(o), a = JSON.parse(i);
44
+ Object.assign(s, a);
46
45
  } catch {
47
46
  }
48
47
  this.fallbacks = {
49
48
  getSettings() {
50
- return a;
49
+ return s;
51
50
  },
52
- setSettings(s) {
51
+ setSettings(i) {
53
52
  try {
54
- localStorage.setItem(o, JSON.stringify(s));
53
+ localStorage.setItem(o, JSON.stringify(i));
55
54
  } catch {
56
55
  }
57
- a = s;
56
+ s = i;
58
57
  },
59
58
  now() {
60
- return he();
59
+ return be();
61
60
  }
62
- }, r && r.on(de, (s, i) => {
63
- s === this.plugin.id && this.fallbacks.setSettings(i);
61
+ }, r && r.on(_e, (i, a) => {
62
+ i === this.plugin.id && this.fallbacks.setSettings(a);
64
63
  }), this.proxiedOn = new Proxy({}, {
65
- get: (s, i) => this.target ? this.target.on[i] : (...c) => {
64
+ get: (i, a) => this.target ? this.target.on[a] : (...c) => {
66
65
  this.onQueue.push({
67
- method: i,
66
+ method: a,
68
67
  args: c
69
68
  });
70
69
  }
71
70
  }), this.proxiedTarget = new Proxy({}, {
72
- get: (s, i) => this.target ? this.target[i] : i === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(i) ? (...c) => (this.targetQueue.push({
73
- method: i,
71
+ get: (i, a) => this.target ? this.target[a] : a === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(a) ? (...c) => (this.targetQueue.push({
72
+ method: a,
74
73
  args: c,
75
74
  resolve: () => {
76
75
  }
77
- }), this.fallbacks[i](...c)) : (...c) => new Promise((l) => {
76
+ }), this.fallbacks[a](...c)) : (...c) => new Promise((l) => {
78
77
  this.targetQueue.push({
79
- method: i,
78
+ method: a,
80
79
  args: c,
81
80
  resolve: l
82
81
  });
@@ -91,44 +90,44 @@ class pe {
91
90
  r.resolve(await this.target[r.method](...r.args));
92
91
  }
93
92
  }
94
- function M(e, t) {
95
- const r = e, n = C(), o = le(), a = ue && r.enableEarlyProxy;
96
- if (o && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !a))
97
- o.emit(fe, e, t);
93
+ function z(e, t) {
94
+ const r = e, n = J(), o = he(), s = pe && r.enableEarlyProxy;
95
+ if (o && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
96
+ o.emit(me, e, t);
98
97
  else {
99
- const s = a ? new pe(r, o) : null;
98
+ const i = s ? new Se(r, o) : null;
100
99
  (n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
101
100
  pluginDescriptor: r,
102
101
  setupFn: t,
103
- proxy: s
104
- }), s && t(s.proxiedTarget);
102
+ proxy: i
103
+ }), i && t(i.proxiedTarget);
105
104
  }
106
105
  }
107
106
  /*!
108
- * pinia v2.1.7
109
- * (c) 2023 Eduardo San Martin Morote
107
+ * pinia v2.2.0
108
+ * (c) 2024 Eduardo San Martin Morote
110
109
  * @license MIT
111
110
  */
112
- const me = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
111
+ const ve = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
113
112
  /* istanbul ignore next */
114
113
  Symbol()
115
114
  );
116
- var y;
115
+ var S;
117
116
  (function(e) {
118
117
  e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
119
- })(y || (y = {}));
120
- const G = typeof window < "u", L = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && G, R = 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 };
121
- function _e(e, { autoBom: t = !1 } = {}) {
118
+ })(S || (S = {}));
119
+ const W = typeof window < "u", U = 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 };
120
+ function we(e, { autoBom: t = !1 } = {}) {
122
121
  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;
123
122
  }
124
- function P(e, t, r) {
123
+ function L(e, t, r) {
125
124
  const n = new XMLHttpRequest();
126
125
  n.open("GET", e), n.responseType = "blob", n.onload = function() {
127
- B(n.response, t, r);
126
+ K(n.response, t, r);
128
127
  }, n.onerror = function() {
129
128
  }, n.send();
130
129
  }
131
- function F(e) {
130
+ function Q(e) {
132
131
  const t = new XMLHttpRequest();
133
132
  t.open("HEAD", e, !1);
134
133
  try {
@@ -137,7 +136,7 @@ function F(e) {
137
136
  }
138
137
  return t.status >= 200 && t.status <= 299;
139
138
  }
140
- function v(e) {
139
+ function I(e) {
141
140
  try {
142
141
  e.dispatchEvent(new MouseEvent("click"));
143
142
  } catch {
@@ -145,54 +144,54 @@ function v(e) {
145
144
  r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(r);
146
145
  }
147
146
  }
148
- const w = typeof navigator == "object" ? navigator : { userAgent: "" }, H = /Macintosh/.test(w.userAgent) && /AppleWebKit/.test(w.userAgent) && !/Safari/.test(w.userAgent), B = G ? (
147
+ const E = typeof navigator == "object" ? navigator : { userAgent: "" }, Y = /Macintosh/.test(E.userAgent) && /AppleWebKit/.test(E.userAgent) && !/Safari/.test(E.userAgent), K = W ? (
149
148
  // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
150
- typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !H ? ye : (
149
+ typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Y ? Oe : (
151
150
  // Use msSaveOrOpenBlob as a second approach
152
- "msSaveOrOpenBlob" in w ? be : (
151
+ "msSaveOrOpenBlob" in E ? Ie : (
153
152
  // Fallback to using FileReader and a popup
154
- Se
153
+ Ee
155
154
  )
156
155
  )
157
156
  ) : () => {
158
157
  };
159
- function ye(e, t = "download", r) {
158
+ function Oe(e, t = "download", r) {
160
159
  const n = document.createElement("a");
161
- n.download = t, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? F(n.href) ? P(e, t, r) : (n.target = "_blank", v(n)) : v(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
160
+ n.download = t, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Q(n.href) ? L(e, t, r) : (n.target = "_blank", I(n)) : I(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
162
161
  URL.revokeObjectURL(n.href);
163
162
  }, 4e4), setTimeout(function() {
164
- v(n);
163
+ I(n);
165
164
  }, 0));
166
165
  }
167
- function be(e, t = "download", r) {
166
+ function Ie(e, t = "download", r) {
168
167
  if (typeof e == "string")
169
- if (F(e))
170
- P(e, t, r);
168
+ if (Q(e))
169
+ L(e, t, r);
171
170
  else {
172
171
  const n = document.createElement("a");
173
172
  n.href = e, n.target = "_blank", setTimeout(function() {
174
- v(n);
173
+ I(n);
175
174
  });
176
175
  }
177
176
  else
178
- navigator.msSaveOrOpenBlob(_e(e, r), t);
177
+ navigator.msSaveOrOpenBlob(we(e, r), t);
179
178
  }
180
- function Se(e, t, r, n) {
179
+ function Ee(e, t, r, n) {
181
180
  if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
182
- return P(e, t, r);
183
- const o = e.type === "application/octet-stream", a = /constructor/i.test(String(R.HTMLElement)) || "safari" in R, s = /CriOS\/[\d]+/.test(navigator.userAgent);
184
- if ((s || o && a || H) && typeof FileReader < "u") {
185
- const i = new FileReader();
186
- i.onloadend = function() {
187
- let c = i.result;
181
+ return L(e, t, r);
182
+ const o = e.type === "application/octet-stream", s = /constructor/i.test(String(U.HTMLElement)) || "safari" in U, i = /CriOS\/[\d]+/.test(navigator.userAgent);
183
+ if ((i || o && s || Y) && typeof FileReader < "u") {
184
+ const a = new FileReader();
185
+ a.onloadend = function() {
186
+ let c = a.result;
188
187
  if (typeof c != "string")
189
188
  throw n = null, new Error("Wrong reader.result type");
190
- c = s ? c : c.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = c : location.assign(c), n = null;
191
- }, i.readAsDataURL(e);
189
+ c = i ? c : c.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = c : location.assign(c), n = null;
190
+ }, a.readAsDataURL(e);
192
191
  } else {
193
- const i = URL.createObjectURL(e);
194
- n ? n.location.assign(i) : location.href = i, n = null, setTimeout(function() {
195
- URL.revokeObjectURL(i);
192
+ const a = URL.createObjectURL(e);
193
+ n ? n.location.assign(a) : location.href = a, n = null, setTimeout(function() {
194
+ URL.revokeObjectURL(a);
196
195
  }, 4e4);
197
196
  }
198
197
  }
@@ -200,73 +199,73 @@ function u(e, t) {
200
199
  const r = "🍍 " + e;
201
200
  typeof __VUE_DEVTOOLS_TOAST__ == "function" && __VUE_DEVTOOLS_TOAST__(r, t);
202
201
  }
203
- function k(e) {
202
+ function j(e) {
204
203
  return "_a" in e && "install" in e;
205
204
  }
206
- function J() {
205
+ function q() {
207
206
  if (!("clipboard" in navigator))
208
207
  return u("Your browser doesn't support the Clipboard API", "error"), !0;
209
208
  }
210
- function z(e) {
209
+ function X(e) {
211
210
  return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (u('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
212
211
  }
213
- async function ve(e) {
214
- if (!J())
212
+ async function Te(e) {
213
+ if (!q())
215
214
  try {
216
215
  await navigator.clipboard.writeText(JSON.stringify(e.state.value)), u("Global state copied to clipboard.");
217
216
  } catch (t) {
218
- if (z(t))
217
+ if (X(t))
219
218
  return;
220
219
  u("Failed to serialize the state. Check the console for more details.", "error");
221
220
  }
222
221
  }
223
- async function we(e) {
224
- if (!J())
222
+ async function $e(e) {
223
+ if (!q())
225
224
  try {
226
- W(e, JSON.parse(await navigator.clipboard.readText())), u("Global state pasted from clipboard.");
225
+ Z(e, JSON.parse(await navigator.clipboard.readText())), u("Global state pasted from clipboard.");
227
226
  } catch (t) {
228
- if (z(t))
227
+ if (X(t))
229
228
  return;
230
229
  u("Failed to deserialize the state from clipboard. Check the console for more details.", "error");
231
230
  }
232
231
  }
233
- async function Oe(e) {
232
+ async function Ae(e) {
234
233
  try {
235
- B(new Blob([JSON.stringify(e.state.value)], {
234
+ K(new Blob([JSON.stringify(e.state.value)], {
236
235
  type: "text/plain;charset=utf-8"
237
236
  }), "pinia-state.json");
238
237
  } catch {
239
238
  u("Failed to export the state as JSON. Check the console for more details.", "error");
240
239
  }
241
240
  }
242
- let h;
243
- function Ie() {
244
- h || (h = document.createElement("input"), h.type = "file", h.accept = ".json");
241
+ let m;
242
+ function Pe() {
243
+ m || (m = document.createElement("input"), m.type = "file", m.accept = ".json");
245
244
  function e() {
246
245
  return new Promise((t, r) => {
247
- h.onchange = async () => {
248
- const n = h.files;
246
+ m.onchange = async () => {
247
+ const n = m.files;
249
248
  if (!n)
250
249
  return t(null);
251
250
  const o = n.item(0);
252
251
  return t(o ? { text: await o.text(), file: o } : null);
253
- }, h.oncancel = () => t(null), h.onerror = r, h.click();
252
+ }, m.oncancel = () => t(null), m.onerror = r, m.click();
254
253
  });
255
254
  }
256
255
  return e;
257
256
  }
258
- async function Ee(e) {
257
+ async function ke(e) {
259
258
  try {
260
- const r = await Ie()();
259
+ const r = await Pe()();
261
260
  if (!r)
262
261
  return;
263
262
  const { text: n, file: o } = r;
264
- W(e, JSON.parse(n)), u(`Global state imported from "${o.name}".`);
263
+ Z(e, JSON.parse(n)), u(`Global state imported from "${o.name}".`);
265
264
  } catch {
266
265
  u("Failed to import the state from JSON. Check the console for more details.", "error");
267
266
  }
268
267
  }
269
- function W(e, t) {
268
+ function Z(e, t) {
270
269
  for (const r in t) {
271
270
  const n = e.state.value[r];
272
271
  n ? Object.assign(n, t[r]) : e.state.value[r] = t[r];
@@ -279,31 +278,31 @@ function g(e) {
279
278
  }
280
279
  };
281
280
  }
282
- const Q = "🍍 Pinia (root)", T = "_root";
283
- function Te(e) {
284
- return k(e) ? {
281
+ const ee = "🍍 Pinia (root)", T = "_root";
282
+ function Re(e) {
283
+ return j(e) ? {
285
284
  id: T,
286
- label: Q
285
+ label: ee
287
286
  } : {
288
287
  id: e.$id,
289
288
  label: e.$id
290
289
  };
291
290
  }
292
- function Ae(e) {
293
- if (k(e)) {
291
+ function Ne(e) {
292
+ if (j(e)) {
294
293
  const r = Array.from(e._s.keys()), n = e._s;
295
294
  return {
296
- state: r.map((a) => ({
295
+ state: r.map((s) => ({
297
296
  editable: !0,
298
- key: a,
299
- value: e.state.value[a]
297
+ key: s,
298
+ value: e.state.value[s]
300
299
  })),
301
- getters: r.filter((a) => n.get(a)._getters).map((a) => {
302
- const s = n.get(a);
300
+ getters: r.filter((s) => n.get(s)._getters).map((s) => {
301
+ const i = n.get(s);
303
302
  return {
304
303
  editable: !1,
305
- key: a,
306
- value: s._getters.reduce((i, c) => (i[c] = s[c], i), {})
304
+ key: s,
305
+ value: i._getters.reduce((a, c) => (a[c] = i[c], a), {})
307
306
  };
308
307
  })
309
308
  };
@@ -325,7 +324,7 @@ function Ae(e) {
325
324
  value: e[r]
326
325
  }))), t;
327
326
  }
328
- function $e(e) {
327
+ function Le(e) {
329
328
  return e ? Array.isArray(e) ? e.reduce((t, r) => (t.keys.push(r.key), t.operations.push(r.type), t.oldValue[r.key] = r.oldValue, t.newValue[r.key] = r.newValue, t), {
330
329
  oldValue: {},
331
330
  keys: [],
@@ -338,36 +337,36 @@ function $e(e) {
338
337
  newValue: e.newValue
339
338
  } : {};
340
339
  }
341
- function Pe(e) {
340
+ function je(e) {
342
341
  switch (e) {
343
- case y.direct:
342
+ case S.direct:
344
343
  return "mutation";
345
- case y.patchFunction:
344
+ case S.patchFunction:
346
345
  return "$patch";
347
- case y.patchObject:
346
+ case S.patchObject:
348
347
  return "$patch";
349
348
  default:
350
349
  return "unknown";
351
350
  }
352
351
  }
353
- let S = !0;
354
- const O = [], _ = "pinia:mutations", d = "pinia", { assign: ke } = Object, I = (e) => "🍍 " + e;
355
- function Le(e, t) {
356
- M({
352
+ let w = !0;
353
+ const $ = [], b = "pinia:mutations", f = "pinia", { assign: xe } = Object, P = (e) => "🍍 " + e;
354
+ function De(e, t) {
355
+ z({
357
356
  id: "dev.esm.pinia",
358
357
  label: "Pinia 🍍",
359
358
  logo: "https://pinia.vuejs.org/logo.svg",
360
359
  packageName: "pinia",
361
360
  homepage: "https://pinia.vuejs.org",
362
- componentStateTypes: O,
361
+ componentStateTypes: $,
363
362
  app: e
364
363
  }, (r) => {
365
364
  typeof r.now != "function" && u("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."), r.addTimelineLayer({
366
- id: _,
365
+ id: b,
367
366
  label: "Pinia 🍍",
368
367
  color: 15064968
369
368
  }), r.addInspector({
370
- id: d,
369
+ id: f,
371
370
  label: "Pinia 🍍",
372
371
  icon: "storage",
373
372
  treeFilterPlaceholder: "Search stores",
@@ -375,28 +374,28 @@ function Le(e, t) {
375
374
  {
376
375
  icon: "content_copy",
377
376
  action: () => {
378
- ve(t);
377
+ Te(t);
379
378
  },
380
379
  tooltip: "Serialize and copy the state"
381
380
  },
382
381
  {
383
382
  icon: "content_paste",
384
383
  action: async () => {
385
- await we(t), r.sendInspectorTree(d), r.sendInspectorState(d);
384
+ await $e(t), r.sendInspectorTree(f), r.sendInspectorState(f);
386
385
  },
387
386
  tooltip: "Replace the state with the content of your clipboard"
388
387
  },
389
388
  {
390
389
  icon: "save",
391
390
  action: () => {
392
- Oe(t);
391
+ Ae(t);
393
392
  },
394
393
  tooltip: "Save the state as a JSON file"
395
394
  },
396
395
  {
397
396
  icon: "folder_open",
398
397
  action: async () => {
399
- await Ee(t), r.sendInspectorTree(d), r.sendInspectorState(d);
398
+ await ke(t), r.sendInspectorTree(f), r.sendInspectorState(f);
400
399
  },
401
400
  tooltip: "Import the state from a JSON file"
402
401
  }
@@ -412,38 +411,38 @@ function Le(e, t) {
412
411
  }
413
412
  ]
414
413
  }), r.on.inspectComponent((n, o) => {
415
- const a = n.componentInstance && n.componentInstance.proxy;
416
- if (a && a._pStores) {
417
- const s = n.componentInstance.proxy._pStores;
418
- Object.values(s).forEach((i) => {
414
+ const s = n.componentInstance && n.componentInstance.proxy;
415
+ if (s && s._pStores) {
416
+ const i = n.componentInstance.proxy._pStores;
417
+ Object.values(i).forEach((a) => {
419
418
  n.instanceData.state.push({
420
- type: I(i.$id),
419
+ type: P(a.$id),
421
420
  key: "state",
422
421
  editable: !0,
423
- value: i._isOptionsAPI ? {
422
+ value: a._isOptionsAPI ? {
424
423
  _custom: {
425
- value: $(i.$state),
424
+ value: A(a.$state),
426
425
  actions: [
427
426
  {
428
427
  icon: "restore",
429
428
  tooltip: "Reset the state of this store",
430
- action: () => i.$reset()
429
+ action: () => a.$reset()
431
430
  }
432
431
  ]
433
432
  }
434
433
  } : (
435
434
  // NOTE: workaround to unwrap transferred refs
436
- Object.keys(i.$state).reduce((c, l) => (c[l] = i.$state[l], c), {})
435
+ Object.keys(a.$state).reduce((c, l) => (c[l] = a.$state[l], c), {})
437
436
  )
438
- }), i._getters && i._getters.length && n.instanceData.state.push({
439
- type: I(i.$id),
437
+ }), a._getters && a._getters.length && n.instanceData.state.push({
438
+ type: P(a.$id),
440
439
  key: "getters",
441
440
  editable: !1,
442
- value: i._getters.reduce((c, l) => {
441
+ value: a._getters.reduce((c, l) => {
443
442
  try {
444
- c[l] = i[l];
445
- } catch (f) {
446
- c[l] = f;
443
+ c[l] = a[l];
444
+ } catch (d) {
445
+ c[l] = d;
447
446
  }
448
447
  return c;
449
448
  }, {})
@@ -451,48 +450,48 @@ function Le(e, t) {
451
450
  });
452
451
  }
453
452
  }), r.on.getInspectorTree((n) => {
454
- if (n.app === e && n.inspectorId === d) {
453
+ if (n.app === e && n.inspectorId === f) {
455
454
  let o = [t];
456
- o = o.concat(Array.from(t._s.values())), n.rootNodes = (n.filter ? o.filter((a) => "$id" in a ? a.$id.toLowerCase().includes(n.filter.toLowerCase()) : Q.toLowerCase().includes(n.filter.toLowerCase())) : o).map(Te);
455
+ o = o.concat(Array.from(t._s.values())), n.rootNodes = (n.filter ? o.filter((s) => "$id" in s ? s.$id.toLowerCase().includes(n.filter.toLowerCase()) : ee.toLowerCase().includes(n.filter.toLowerCase())) : o).map(Re);
457
456
  }
458
- }), r.on.getInspectorState((n) => {
459
- if (n.app === e && n.inspectorId === d) {
457
+ }), globalThis.$pinia = t, r.on.getInspectorState((n) => {
458
+ if (n.app === e && n.inspectorId === f) {
460
459
  const o = n.nodeId === T ? t : t._s.get(n.nodeId);
461
460
  if (!o)
462
461
  return;
463
- o && (n.state = Ae(o));
462
+ o && (n.nodeId !== T && (globalThis.$store = A(o)), n.state = Ne(o));
464
463
  }
465
464
  }), r.on.editInspectorState((n, o) => {
466
- if (n.app === e && n.inspectorId === d) {
467
- const a = n.nodeId === T ? t : t._s.get(n.nodeId);
468
- if (!a)
465
+ if (n.app === e && n.inspectorId === f) {
466
+ const s = n.nodeId === T ? t : t._s.get(n.nodeId);
467
+ if (!s)
469
468
  return u(`store "${n.nodeId}" not found`, "error");
470
- const { path: s } = n;
471
- k(a) ? s.unshift("state") : (s.length !== 1 || !a._customProperties.has(s[0]) || s[0] in a.$state) && s.unshift("$state"), S = !1, n.set(a, s, n.state.value), S = !0;
469
+ const { path: i } = n;
470
+ j(s) ? i.unshift("state") : (i.length !== 1 || !s._customProperties.has(i[0]) || i[0] in s.$state) && i.unshift("$state"), w = !1, n.set(s, i, n.state.value), w = !0;
472
471
  }
473
472
  }), r.on.editComponentState((n) => {
474
473
  if (n.type.startsWith("🍍")) {
475
- const o = n.type.replace(/^🍍\s*/, ""), a = t._s.get(o);
476
- if (!a)
474
+ const o = n.type.replace(/^🍍\s*/, ""), s = t._s.get(o);
475
+ if (!s)
477
476
  return u(`store "${o}" not found`, "error");
478
- const { path: s } = n;
479
- if (s[0] !== "state")
477
+ const { path: i } = n;
478
+ if (i[0] !== "state")
480
479
  return u(`Invalid path for store "${o}":
481
- ${s}
480
+ ${i}
482
481
  Only state can be modified.`);
483
- s[0] = "$state", S = !1, n.set(a, s, n.state.value), S = !0;
482
+ i[0] = "$state", w = !1, n.set(s, i, n.state.value), w = !0;
484
483
  }
485
484
  });
486
485
  });
487
486
  }
488
- function Re(e, t) {
489
- O.includes(I(t.$id)) || O.push(I(t.$id)), M({
487
+ function Ve(e, t) {
488
+ $.includes(P(t.$id)) || $.push(P(t.$id)), z({
490
489
  id: "dev.esm.pinia",
491
490
  label: "Pinia 🍍",
492
491
  logo: "https://pinia.vuejs.org/logo.svg",
493
492
  packageName: "pinia",
494
493
  homepage: "https://pinia.vuejs.org",
495
- componentStateTypes: O,
494
+ componentStateTypes: $,
496
495
  app: e,
497
496
  settings: {
498
497
  logStoreChanges: {
@@ -508,10 +507,10 @@ function Re(e, t) {
508
507
  }
509
508
  }, (r) => {
510
509
  const n = typeof r.now == "function" ? r.now.bind(r) : Date.now;
511
- t.$onAction(({ after: s, onError: i, name: c, args: l }) => {
512
- const f = Y++;
510
+ t.$onAction(({ after: i, onError: a, name: c, args: l }) => {
511
+ const d = te++;
513
512
  r.addTimelineEvent({
514
- layerId: _,
513
+ layerId: b,
515
514
  event: {
516
515
  time: n(),
517
516
  title: "🛫 " + c,
@@ -521,11 +520,11 @@ function Re(e, t) {
521
520
  action: g(c),
522
521
  args: l
523
522
  },
524
- groupId: f
523
+ groupId: d
525
524
  }
526
- }), s((m) => {
527
- p = void 0, r.addTimelineEvent({
528
- layerId: _,
525
+ }), i((h) => {
526
+ _ = void 0, r.addTimelineEvent({
527
+ layerId: b,
529
528
  event: {
530
529
  time: n(),
531
530
  title: "🛬 " + c,
@@ -534,14 +533,14 @@ function Re(e, t) {
534
533
  store: g(t.$id),
535
534
  action: g(c),
536
535
  args: l,
537
- result: m
536
+ result: h
538
537
  },
539
- groupId: f
538
+ groupId: d
540
539
  }
541
540
  });
542
- }), i((m) => {
543
- p = void 0, r.addTimelineEvent({
544
- layerId: _,
541
+ }), a((h) => {
542
+ _ = void 0, r.addTimelineEvent({
543
+ layerId: b,
545
544
  event: {
546
545
  time: n(),
547
546
  logType: "error",
@@ -551,53 +550,53 @@ function Re(e, t) {
551
550
  store: g(t.$id),
552
551
  action: g(c),
553
552
  args: l,
554
- error: m
553
+ error: h
555
554
  },
556
- groupId: f
555
+ groupId: d
557
556
  }
558
557
  });
559
558
  });
560
- }, !0), t._customProperties.forEach((s) => {
561
- q(() => X(t[s]), (i, c) => {
562
- r.notifyComponentUpdate(), r.sendInspectorState(d), S && r.addTimelineEvent({
563
- layerId: _,
559
+ }, !0), t._customProperties.forEach((i) => {
560
+ oe(() => se(t[i]), (a, c) => {
561
+ r.notifyComponentUpdate(), r.sendInspectorState(f), w && r.addTimelineEvent({
562
+ layerId: b,
564
563
  event: {
565
564
  time: n(),
566
565
  title: "Change",
567
- subtitle: s,
566
+ subtitle: i,
568
567
  data: {
569
- newValue: i,
568
+ newValue: a,
570
569
  oldValue: c
571
570
  },
572
- groupId: p
571
+ groupId: _
573
572
  }
574
573
  });
575
574
  }, { deep: !0 });
576
- }), t.$subscribe(({ events: s, type: i }, c) => {
577
- if (r.notifyComponentUpdate(), r.sendInspectorState(d), !S)
575
+ }), t.$subscribe(({ events: i, type: a }, c) => {
576
+ if (r.notifyComponentUpdate(), r.sendInspectorState(f), !w)
578
577
  return;
579
578
  const l = {
580
579
  time: n(),
581
- title: Pe(i),
582
- data: ke({ store: g(t.$id) }, $e(s)),
583
- groupId: p
580
+ title: je(a),
581
+ data: xe({ store: g(t.$id) }, Le(i)),
582
+ groupId: _
584
583
  };
585
- i === y.patchFunction ? l.subtitle = "⤵️" : i === y.patchObject ? l.subtitle = "🧩" : s && !Array.isArray(s) && (l.subtitle = s.type), s && (l.data["rawEvent(s)"] = {
584
+ a === S.patchFunction ? l.subtitle = "⤵️" : a === S.patchObject ? l.subtitle = "🧩" : i && !Array.isArray(i) && (l.subtitle = i.type), i && (l.data["rawEvent(s)"] = {
586
585
  _custom: {
587
586
  display: "DebuggerEvent",
588
587
  type: "object",
589
588
  tooltip: "raw DebuggerEvent[]",
590
- value: s
589
+ value: i
591
590
  }
592
591
  }), r.addTimelineEvent({
593
- layerId: _,
592
+ layerId: b,
594
593
  event: l
595
594
  });
596
595
  }, { detached: !0, flush: "sync" });
597
596
  const o = t._hotUpdate;
598
- t._hotUpdate = U((s) => {
599
- o(s), r.addTimelineEvent({
600
- layerId: _,
597
+ t._hotUpdate = B((i) => {
598
+ o(i), r.addTimelineEvent({
599
+ layerId: b,
601
600
  event: {
602
601
  time: n(),
603
602
  title: "🔥 " + t.$id,
@@ -607,54 +606,57 @@ function Re(e, t) {
607
606
  info: g("HMR update")
608
607
  }
609
608
  }
610
- }), r.notifyComponentUpdate(), r.sendInspectorTree(d), r.sendInspectorState(d);
609
+ }), r.notifyComponentUpdate(), r.sendInspectorTree(f), r.sendInspectorState(f);
611
610
  });
612
- const { $dispose: a } = t;
611
+ const { $dispose: s } = t;
613
612
  t.$dispose = () => {
614
- a(), r.notifyComponentUpdate(), r.sendInspectorTree(d), r.sendInspectorState(d), r.getSettings().logStoreChanges && u(`Disposed "${t.$id}" store 🗑`);
615
- }, r.notifyComponentUpdate(), r.sendInspectorTree(d), r.sendInspectorState(d), r.getSettings().logStoreChanges && u(`"${t.$id}" store installed 🆕`);
613
+ s(), r.notifyComponentUpdate(), r.sendInspectorTree(f), r.sendInspectorState(f), r.getSettings().logStoreChanges && u(`Disposed "${t.$id}" store 🗑`);
614
+ }, r.notifyComponentUpdate(), r.sendInspectorTree(f), r.sendInspectorState(f), r.getSettings().logStoreChanges && u(`"${t.$id}" store installed 🆕`);
616
615
  });
617
616
  }
618
- let Y = 0, p;
619
- function N(e, t, r) {
620
- const n = t.reduce((o, a) => (o[a] = $(e)[a], o), {});
617
+ let te = 0, _;
618
+ function C(e, t, r) {
619
+ const n = t.reduce((o, s) => (o[s] = A(e)[s], o), {});
621
620
  for (const o in n)
622
621
  e[o] = function() {
623
- const a = Y, s = r ? new Proxy(e, {
622
+ const s = te, i = r ? new Proxy(e, {
624
623
  get(...c) {
625
- return p = a, Reflect.get(...c);
624
+ return _ = s, Reflect.get(...c);
626
625
  },
627
626
  set(...c) {
628
- return p = a, Reflect.set(...c);
627
+ return _ = s, Reflect.set(...c);
629
628
  }
630
629
  }) : e;
631
- p = a;
632
- const i = n[o].apply(s, arguments);
633
- return p = void 0, i;
630
+ _ = s;
631
+ const a = n[o].apply(i, arguments);
632
+ return _ = void 0, a;
634
633
  };
635
634
  }
636
- function Ne({ app: e, store: t, options: r }) {
637
- if (t.$id.startsWith("__hot:"))
638
- return;
639
- t._isOptionsAPI = !!r.state, N(t, Object.keys(r.actions), t._isOptionsAPI);
640
- const n = t._hotUpdate;
641
- $(t)._hotUpdate = function(o) {
642
- n.apply(this, arguments), N(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
643
- }, Re(
644
- e,
645
- // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
646
- t
647
- );
648
- }
649
- function je() {
650
- const e = K(!0), t = e.run(() => D({}));
635
+ function Ue({ app: e, store: t, options: r }) {
636
+ if (!t.$id.startsWith("__hot:")) {
637
+ if (t._isOptionsAPI = !!r.state, !t._p._testing) {
638
+ C(t, Object.keys(r.actions), t._isOptionsAPI);
639
+ const n = t._hotUpdate;
640
+ A(t)._hotUpdate = function(o) {
641
+ n.apply(this, arguments), C(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
642
+ };
643
+ }
644
+ Ve(
645
+ e,
646
+ // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
647
+ t
648
+ );
649
+ }
650
+ }
651
+ function Ce() {
652
+ const e = re(!0), t = e.run(() => H({}));
651
653
  let r = [], n = [];
652
- const o = U({
653
- install(a) {
654
- o._a = a, a.provide(me, o), a.config.globalProperties.$pinia = o, L && Le(a, o), n.forEach((s) => r.push(s)), n = [];
654
+ const o = B({
655
+ install(s) {
656
+ o._a = s, s.provide(ve, o), s.config.globalProperties.$pinia = o, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W && De(s, o), n.forEach((i) => r.push(i)), n = [];
655
657
  },
656
- use(a) {
657
- return !this._a && !ce ? n.push(a) : r.push(a), this;
658
+ use(s) {
659
+ return !this._a && !ge ? n.push(s) : r.push(s), this;
658
660
  },
659
661
  _p: r,
660
662
  // it's actually undefined here
@@ -664,107 +666,107 @@ function je() {
664
666
  _s: /* @__PURE__ */ new Map(),
665
667
  state: t
666
668
  });
667
- return L && typeof Proxy < "u" && o.use(Ne), o;
669
+ return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof Proxy < "u" && o.use(Ue), o;
668
670
  }
669
671
  process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
670
672
  /* istanbul ignore next */
671
673
  Symbol()
672
674
  );
673
- function xe(e) {
675
+ function Me(e) {
674
676
  return typeof e == "object" && e !== null;
675
677
  }
676
- function j(e, t) {
677
- return e = xe(e) ? e : /* @__PURE__ */ Object.create(null), new Proxy(e, {
678
+ function M(e, t) {
679
+ return e = Me(e) ? e : /* @__PURE__ */ Object.create(null), new Proxy(e, {
678
680
  get(r, n, o) {
679
681
  return n === "key" ? Reflect.get(r, n, o) : Reflect.get(r, n, o) || Reflect.get(t, n, o);
680
682
  }
681
683
  });
682
684
  }
683
- function Ve(e, t) {
685
+ function Ge(e, t) {
684
686
  return t.reduce((r, n) => r == null ? void 0 : r[n], e);
685
687
  }
686
- function De(e, t, r) {
688
+ function Fe(e, t, r) {
687
689
  return t.slice(0, -1).reduce((n, o) => /^(__proto__)$/.test(o) ? {} : n[o] = n[o] || {}, e)[t[t.length - 1]] = r, e;
688
690
  }
689
- function Ue(e, t) {
691
+ function He(e, t) {
690
692
  return t.reduce((r, n) => {
691
693
  const o = n.split(".");
692
- return De(r, o, Ve(e, o));
694
+ return Fe(r, o, Ge(e, o));
693
695
  }, {});
694
696
  }
695
- function Ce(e, t) {
697
+ function Be(e, t) {
696
698
  return (r) => {
697
699
  var n;
698
700
  try {
699
701
  const {
700
702
  storage: o = localStorage,
701
- beforeRestore: a = void 0,
702
- afterRestore: s = void 0,
703
- serializer: i = {
703
+ beforeRestore: s = void 0,
704
+ afterRestore: i = void 0,
705
+ serializer: a = {
704
706
  serialize: JSON.stringify,
705
707
  deserialize: JSON.parse
706
708
  },
707
709
  key: c = t.$id,
708
710
  paths: l = null,
709
- debug: f = !1
711
+ debug: d = !1
710
712
  } = r;
711
713
  return {
712
714
  storage: o,
713
- beforeRestore: a,
714
- afterRestore: s,
715
- serializer: i,
716
- key: ((n = e.key) != null ? n : (m) => m)(typeof c == "string" ? c : c(t.$id)),
715
+ beforeRestore: s,
716
+ afterRestore: i,
717
+ serializer: a,
718
+ key: ((n = e.key) != null ? n : (h) => h)(typeof c == "string" ? c : c(t.$id)),
717
719
  paths: l,
718
- debug: f
720
+ debug: d
719
721
  };
720
722
  } catch {
721
723
  return r.debug, null;
722
724
  }
723
725
  };
724
726
  }
725
- function x(e, { storage: t, serializer: r, key: n, debug: o }) {
727
+ function G(e, { storage: t, serializer: r, key: n, debug: o }) {
726
728
  try {
727
- const a = t == null ? void 0 : t.getItem(n);
728
- a && e.$patch(r == null ? void 0 : r.deserialize(a));
729
+ const s = t == null ? void 0 : t.getItem(n);
730
+ s && e.$patch(r == null ? void 0 : r.deserialize(s));
729
731
  } catch {
730
732
  }
731
733
  }
732
- function V(e, { storage: t, serializer: r, key: n, paths: o, debug: a }) {
734
+ function F(e, { storage: t, serializer: r, key: n, paths: o, debug: s }) {
733
735
  try {
734
- const s = Array.isArray(o) ? Ue(e, o) : e;
735
- t.setItem(n, r.serialize(s));
736
+ const i = Array.isArray(o) ? He(e, o) : e;
737
+ t.setItem(n, r.serialize(i));
736
738
  } catch {
737
739
  }
738
740
  }
739
- function Me(e = {}) {
741
+ function Je(e = {}) {
740
742
  return (t) => {
741
743
  const { auto: r = !1 } = e, {
742
744
  options: { persist: n = r },
743
745
  store: o,
744
- pinia: a
746
+ pinia: s
745
747
  } = t;
746
748
  if (!n)
747
749
  return;
748
- if (!(o.$id in a.state.value)) {
749
- const i = a._s.get(o.$id.replace("__hot:", ""));
750
- i && Promise.resolve().then(() => i.$persist());
750
+ if (!(o.$id in s.state.value)) {
751
+ const a = s._s.get(o.$id.replace("__hot:", ""));
752
+ a && Promise.resolve().then(() => a.$persist());
751
753
  return;
752
754
  }
753
- const s = (Array.isArray(n) ? n.map((i) => j(i, e)) : [j(n, e)]).map(Ce(e, o)).filter(Boolean);
755
+ const i = (Array.isArray(n) ? n.map((a) => M(a, e)) : [M(n, e)]).map(Be(e, o)).filter(Boolean);
754
756
  o.$persist = () => {
755
- s.forEach((i) => {
756
- V(o.$state, i);
757
+ i.forEach((a) => {
758
+ F(o.$state, a);
757
759
  });
758
- }, o.$hydrate = ({ runHooks: i = !0 } = {}) => {
759
- s.forEach((c) => {
760
- const { beforeRestore: l, afterRestore: f } = c;
761
- i && (l == null || l(t)), x(o, c), i && (f == null || f(t));
760
+ }, o.$hydrate = ({ runHooks: a = !0 } = {}) => {
761
+ i.forEach((c) => {
762
+ const { beforeRestore: l, afterRestore: d } = c;
763
+ a && (l == null || l(t)), G(o, c), a && (d == null || d(t));
762
764
  });
763
- }, s.forEach((i) => {
764
- const { beforeRestore: c, afterRestore: l } = i;
765
- c == null || c(t), x(o, i), l == null || l(t), o.$subscribe(
766
- (f, m) => {
767
- V(m, i);
765
+ }, i.forEach((a) => {
766
+ const { beforeRestore: c, afterRestore: l } = a;
767
+ c == null || c(t), G(o, a), l == null || l(t), o.$subscribe(
768
+ (d, h) => {
769
+ F(h, a);
768
770
  },
769
771
  {
770
772
  detached: !0
@@ -773,27 +775,43 @@ function Me(e = {}) {
773
775
  });
774
776
  };
775
777
  }
776
- var Ge = Me();
777
- const A = je();
778
- A.use(Ge);
779
- const Fe = (e) => {
780
- var s, i, c;
781
- const t = ((s = e == null ? void 0 : e.router) == null ? void 0 : s.routerBase) ?? "/", r = ((i = e == null ? void 0 : e.router) == null ? void 0 : i.options) || {}, o = Object.values(((c = e == null ? void 0 : e.router) == null ? void 0 : c.glob) || []).filter((l) => !!l).flat().sort((l, f) => (l.index ?? 0) - (f.index ?? 0)).map((l) => {
782
- const f = l.meta || {};
783
- return f.keepAlive = f.keepAlive ?? e.keepAlive ?? !0, { ...l, meta: f };
778
+ var ze = Je();
779
+ const N = Ce();
780
+ N.use(ze);
781
+ const We = (e) => {
782
+ var l, d, h, x, D;
783
+ const t = ((l = e == null ? void 0 : e.router) == null ? void 0 : l.routerBase) ?? "/", r = ((d = e == null ? void 0 : e.router) == null ? void 0 : d.options) || {};
784
+ let n = Object.assign(((h = e == null ? void 0 : e.router) == null ? void 0 : h.glob) || {});
785
+ const o = Object.values(n).filter((y) => !!y).flat().sort((y, O) => (y.index ?? 0) - (O.index ?? 0)), s = [];
786
+ (x = e == null ? void 0 : e.microApps) == null || x.map((y) => {
787
+ var V;
788
+ const O = Object.values(((V = y.router) == null ? void 0 : V.glob) || {}).filter((p) => !!p).flat().sort((p, ne) => (p.index ?? 0) - (ne.index ?? 0));
789
+ s.push(
790
+ ...O.map((p) => ({ ...p, path: `/${y.microAppName}${p.path}` }))
791
+ ), s.push(
792
+ ...O.map((p) => ({ path: p.path, redirect: `/${y.microAppName}${p.path}` }))
793
+ );
784
794
  });
785
- return { router: se({ history: ie(t), routes: o, ...r }) };
786
- }, He = () => window.config || {}, Ke = (e) => {
787
- e || (e = {}), e = { ...e, ...He() };
788
- const t = D(!0);
789
- Promise.all([ee(e), te(e)]).then(() => {
795
+ const i = ((D = e == null ? void 0 : e.router) == null ? void 0 : D.routers) || [], a = [
796
+ ...k(o, e),
797
+ ...k(i, e),
798
+ ...k(s, e)
799
+ ];
800
+ return { router: ue({ history: fe(t), routes: a, ...r }) };
801
+ }, k = (e, t) => e.map((r) => {
802
+ const n = r.meta || {};
803
+ return n.keepAlive = n.keepAlive ?? (t == null ? void 0 : t.keepAlive) ?? !0, { ...r, meta: n };
804
+ }), Ze = (e) => {
805
+ e || (e = {});
806
+ const t = H(!0);
807
+ Promise.all([ae(e), ce(e)]).then(() => {
790
808
  t.value = !1;
791
809
  });
792
- const { container: r, component: n, props: o } = (e == null ? void 0 : e.root) || {}, a = Z(n || oe, o);
793
- a.use(ae, e), a.use(A);
794
- const { router: s } = Fe(e);
795
- return e.microApps && e.microApps.length > 0 && ne(e, s), e.microAppName && re(e, s), a.use(s), a.mount(r || "#app"), { app: a, router: s, loading: t, store: A };
810
+ const { container: r, component: n, props: o } = (e == null ? void 0 : e.root) || {}, s = ie(n || le, o);
811
+ s.use(de, e), s.use(N);
812
+ const { router: i } = We(e);
813
+ return s.use(i), s.mount(r || "#app"), { app: s, router: i, loading: t, store: N };
796
814
  };
797
815
  export {
798
- Ke as createDasWebApp
816
+ Ze as createDasWebApp
799
817
  };