@linagora/linid-im-front-corelib 0.0.4 → 0.0.6

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 (35) hide show
  1. package/.github/workflows/pull-request.yml +26 -1
  2. package/.github/workflows/release.yml +1 -1
  3. package/CHANGELOG.md +13 -0
  4. package/CONTRIBUTING.md +7 -2
  5. package/dist/core-lib.es.js +921 -851
  6. package/dist/core-lib.umd.js +9 -9
  7. package/dist/package.json +20 -12
  8. package/dist/types/src/index.d.ts +3 -0
  9. package/dist/types/src/services/httpClientService.d.ts +13 -0
  10. package/dist/types/src/services/linIdConfigurationService.d.ts +21 -0
  11. package/dist/types/src/stores/linIdConfigurationStore.d.ts +79 -0
  12. package/dist/types/src/types/linidConfiguration.d.ts +42 -0
  13. package/docs/services.md +39 -0
  14. package/docs/types-and-interfaces.md +56 -9
  15. package/eslint.config.js +2 -1
  16. package/package.json +19 -11
  17. package/src/index.ts +11 -0
  18. package/src/services/httpClientService.ts +61 -0
  19. package/src/services/linIdConfigurationService.ts +73 -0
  20. package/src/stores/linIdConfigurationStore.ts +116 -0
  21. package/src/types/linidConfiguration.ts +70 -0
  22. package/tests/unit/components/LinidZoneRenderer.spec.js +135 -0
  23. package/tests/unit/lifecycle/skeleton.spec.js +138 -0
  24. package/tests/unit/services/federationService.spec.js +146 -0
  25. package/tests/unit/services/httpClientService.spec.js +49 -0
  26. package/tests/unit/services/linIdConfigurationService.spec.js +113 -0
  27. package/tests/unit/stores/linIdConfigurationStore.spec.js +171 -0
  28. package/tests/unit/stores/linidZoneStore.spec.js +94 -0
  29. package/tsconfig.json +11 -27
  30. package/tsconfig.lib.json +20 -0
  31. package/tsconfig.node.json +9 -0
  32. package/tsconfig.spec.json +16 -0
  33. package/vite.config.ts +11 -16
  34. package/vitest.config.ts +19 -0
  35. package/dist/types/vite.config.d.ts +0 -2
@@ -54,14 +54,14 @@ function requireIndex_cjs$3() {
54
54
  }
55
55
  const getProcessEnv = function() {
56
56
  return typeof process < "u" && process.env ? process.env : {};
57
- }, LOG_CATEGORY = "[ Federation Runtime ]", parseEntry = (t, i, h = SEPARATOR) => {
58
- const u = t.split(h), d = getProcessEnv().NODE_ENV === "development" && i, E = "*", _ = (y) => y.startsWith("http") || y.includes(MANIFEST_EXT);
57
+ }, LOG_CATEGORY = "[ Federation Runtime ]", parseEntry = (t, s, d = SEPARATOR) => {
58
+ const u = t.split(d), h = getProcessEnv().NODE_ENV === "development" && s, E = "*", _ = (y) => y.startsWith("http") || y.includes(MANIFEST_EXT);
59
59
  if (u.length >= 2) {
60
60
  let [y, ...R] = u;
61
- t.startsWith(h) && (y = u.slice(0, 2).join(h), R = [
62
- d || u.slice(2).join(h)
61
+ t.startsWith(d) && (y = u.slice(0, 2).join(d), R = [
62
+ h || u.slice(2).join(d)
63
63
  ]);
64
- let $ = d || R.join(h);
64
+ let $ = h || R.join(d);
65
65
  return _($) ? {
66
66
  name: y,
67
67
  entry: $
@@ -71,48 +71,48 @@ function requireIndex_cjs$3() {
71
71
  };
72
72
  } else if (u.length === 1) {
73
73
  const [y] = u;
74
- return d && _(d) ? {
74
+ return h && _(h) ? {
75
75
  name: y,
76
- entry: d
76
+ entry: h
77
77
  } : {
78
78
  name: y,
79
- version: d || E
79
+ version: h || E
80
80
  };
81
81
  } else
82
82
  throw `Invalid entry value: ${t}`;
83
83
  }, composeKeyWithSeparator = function(...t) {
84
- return t.length ? t.reduce((i, h) => h ? i ? `${i}${SEPARATOR}${h}` : h : i, "") : "";
85
- }, encodeName = function(t, i = "", h = !1) {
84
+ return t.length ? t.reduce((s, d) => d ? s ? `${s}${SEPARATOR}${d}` : d : s, "") : "";
85
+ }, encodeName = function(t, s = "", d = !1) {
86
86
  try {
87
- const u = h ? ".js" : "";
88
- return `${i}${t.replace(new RegExp(`${NameTransformSymbol.AT}`, "g"), NameTransformMap[NameTransformSymbol.AT]).replace(new RegExp(`${NameTransformSymbol.HYPHEN}`, "g"), NameTransformMap[NameTransformSymbol.HYPHEN]).replace(new RegExp(`${NameTransformSymbol.SLASH}`, "g"), NameTransformMap[NameTransformSymbol.SLASH])}${u}`;
87
+ const u = d ? ".js" : "";
88
+ return `${s}${t.replace(new RegExp(`${NameTransformSymbol.AT}`, "g"), NameTransformMap[NameTransformSymbol.AT]).replace(new RegExp(`${NameTransformSymbol.HYPHEN}`, "g"), NameTransformMap[NameTransformSymbol.HYPHEN]).replace(new RegExp(`${NameTransformSymbol.SLASH}`, "g"), NameTransformMap[NameTransformSymbol.SLASH])}${u}`;
89
89
  } catch (u) {
90
90
  throw u;
91
91
  }
92
- }, decodeName = function(t, i, h) {
92
+ }, decodeName = function(t, s, d) {
93
93
  try {
94
94
  let u = t;
95
- if (i) {
96
- if (!u.startsWith(i))
95
+ if (s) {
96
+ if (!u.startsWith(s))
97
97
  return u;
98
- u = u.replace(new RegExp(i, "g"), "");
98
+ u = u.replace(new RegExp(s, "g"), "");
99
99
  }
100
- return u = u.replace(new RegExp(`${NameTransformMap[NameTransformSymbol.AT]}`, "g"), EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.AT]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.SLASH]}`, "g"), EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.SLASH]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.HYPHEN]}`, "g"), EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.HYPHEN]]), h && (u = u.replace(".js", "")), u;
100
+ return u = u.replace(new RegExp(`${NameTransformMap[NameTransformSymbol.AT]}`, "g"), EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.AT]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.SLASH]}`, "g"), EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.SLASH]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.HYPHEN]}`, "g"), EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.HYPHEN]]), d && (u = u.replace(".js", "")), u;
101
101
  } catch (u) {
102
102
  throw u;
103
103
  }
104
- }, generateExposeFilename = (t, i) => {
104
+ }, generateExposeFilename = (t, s) => {
105
105
  if (!t)
106
106
  return "";
107
- let h = t;
108
- return h === "." && (h = "default_export"), h.startsWith("./") && (h = h.replace("./", "")), encodeName(h, "__federation_expose_", i);
109
- }, generateShareFilename = (t, i) => t ? encodeName(t, "__federation_shared_", i) : "", getResourceUrl = (t, i) => {
107
+ let d = t;
108
+ return d === "." && (d = "default_export"), d.startsWith("./") && (d = d.replace("./", "")), encodeName(d, "__federation_expose_", s);
109
+ }, generateShareFilename = (t, s) => t ? encodeName(t, "__federation_shared_", s) : "", getResourceUrl = (t, s) => {
110
110
  if ("getPublicPath" in t) {
111
- let h;
112
- return t.getPublicPath.startsWith("function") ? h = new Function("return " + t.getPublicPath)()() : h = new Function(t.getPublicPath)(), `${h}${i}`;
113
- } else return "publicPath" in t ? !isBrowserEnv() && !isReactNativeEnv() && "ssrPublicPath" in t ? `${t.ssrPublicPath}${i}` : `${t.publicPath}${i}` : (console.warn("Cannot get resource URL. If in debug mode, please ignore.", t, i), "");
114
- }, assert = (t, i) => {
115
- t || error(i);
111
+ let d;
112
+ return t.getPublicPath.startsWith("function") ? d = new Function("return " + t.getPublicPath)()() : d = new Function(t.getPublicPath)(), `${d}${s}`;
113
+ } else return "publicPath" in t ? !isBrowserEnv() && !isReactNativeEnv() && "ssrPublicPath" in t ? `${t.ssrPublicPath}${s}` : `${t.publicPath}${s}` : (console.warn("Cannot get resource URL. If in debug mode, please ignore.", t, s), "");
114
+ }, assert = (t, s) => {
115
+ t || error(s);
116
116
  }, error = (t) => {
117
117
  throw new Error(`${LOG_CATEGORY}: ${t}`);
118
118
  }, warn = (t) => {
@@ -129,47 +129,47 @@ function requireIndex_cjs$3() {
129
129
  function isRequiredVersion(t) {
130
130
  return VERSION_PATTERN_REGEXP.test(t);
131
131
  }
132
- const simpleJoinRemoteEntry = (t, i) => {
132
+ const simpleJoinRemoteEntry = (t, s) => {
133
133
  if (!t)
134
- return i;
135
- const u = ((d) => {
136
- if (d === ".")
134
+ return s;
135
+ const u = ((h) => {
136
+ if (h === ".")
137
137
  return "";
138
- if (d.startsWith("./"))
139
- return d.replace("./", "");
140
- if (d.startsWith("/")) {
141
- const E = d.slice(1);
138
+ if (h.startsWith("./"))
139
+ return h.replace("./", "");
140
+ if (h.startsWith("/")) {
141
+ const E = h.slice(1);
142
142
  return E.endsWith("/") ? E.slice(0, -1) : E;
143
143
  }
144
- return d;
144
+ return h;
145
145
  })(t);
146
- return u ? u.endsWith("/") ? `${u}${i}` : `${u}/${i}` : i;
146
+ return u ? u.endsWith("/") ? `${u}${s}` : `${u}/${s}` : s;
147
147
  };
148
148
  function inferAutoPublicPath(t) {
149
149
  return t.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
150
150
  }
151
- function generateSnapshotFromManifest(t, i = {}) {
152
- const { remotes: h = {}, overrides: u = {}, version: d } = i;
151
+ function generateSnapshotFromManifest(t, s = {}) {
152
+ const { remotes: d = {}, overrides: u = {}, version: h } = s;
153
153
  let E;
154
- const _ = () => "publicPath" in t.metaData ? t.metaData.publicPath === "auto" && d ? inferAutoPublicPath(d) : t.metaData.publicPath : t.metaData.getPublicPath, y = Object.keys(u);
154
+ const _ = () => "publicPath" in t.metaData ? t.metaData.publicPath === "auto" && h ? inferAutoPublicPath(h) : t.metaData.publicPath : t.metaData.getPublicPath, y = Object.keys(u);
155
155
  let R = {};
156
- Object.keys(h).length || (R = t.remotes?.reduce((D, P) => {
156
+ Object.keys(d).length || (R = t.remotes?.reduce((D, P) => {
157
157
  let F;
158
158
  const V = P.federationContainerName;
159
159
  return y.includes(V) ? F = u[V] : "version" in P ? F = P.version : F = P.entry, D[V] = {
160
160
  matchedVersion: F
161
161
  }, D;
162
- }, {}) || {}), Object.keys(h).forEach((D) => R[D] = {
162
+ }, {}) || {}), Object.keys(d).forEach((D) => R[D] = {
163
163
  // overrides will override dependencies
164
- matchedVersion: y.includes(D) ? u[D] : h[D]
164
+ matchedVersion: y.includes(D) ? u[D] : d[D]
165
165
  });
166
- const { remoteEntry: { path: $, name: w, type: C }, types: H = { path: "", name: "", zip: "", api: "" }, buildInfo: { buildVersion: B }, globalName: x, ssrRemoteEntry: U } = t.metaData, { exposes: Q } = t;
166
+ const { remoteEntry: { path: $, name: w, type: k }, types: H = { path: "", name: "", zip: "", api: "" }, buildInfo: { buildVersion: B }, globalName: x, ssrRemoteEntry: U } = t.metaData, { exposes: Q } = t;
167
167
  let J = {
168
- version: d || "",
168
+ version: h || "",
169
169
  buildVersion: B,
170
170
  globalName: x,
171
171
  remoteEntry: simpleJoinRemoteEntry($, w),
172
- remoteEntryType: C,
172
+ remoteEntryType: k,
173
173
  remoteTypes: simpleJoinRemoteEntry(H.path, H.name),
174
174
  remoteTypesZip: H.zip || "",
175
175
  remoteTypesAPI: H.api || "",
@@ -222,11 +222,11 @@ function requireIndex_cjs$3() {
222
222
  statsFileName: StatsFileName,
223
223
  manifestFileName: ManifestFileName
224
224
  };
225
- let i = typeof t == "boolean" ? "" : t.filePath || "", h = typeof t == "boolean" ? "" : t.fileName || "";
226
- const u = ".json", d = (R) => R.endsWith(u) ? R : `${R}${u}`, E = (R, $) => R.replace(u, `${$}${u}`), _ = h ? d(h) : ManifestFileName, y = h ? E(_, "-stats") : StatsFileName;
225
+ let s = typeof t == "boolean" ? "" : t.filePath || "", d = typeof t == "boolean" ? "" : t.fileName || "";
226
+ const u = ".json", h = (R) => R.endsWith(u) ? R : `${R}${u}`, E = (R, $) => R.replace(u, `${$}${u}`), _ = d ? h(d) : ManifestFileName, y = d ? E(_, "-stats") : StatsFileName;
227
227
  return {
228
- statsFileName: simpleJoinRemoteEntry(i, y),
229
- manifestFileName: simpleJoinRemoteEntry(i, _)
228
+ statsFileName: simpleJoinRemoteEntry(s, y),
229
+ manifestFileName: simpleJoinRemoteEntry(s, _)
230
230
  };
231
231
  }
232
232
  const PREFIX = "[ Module Federation ]", DEFAULT_DELEGATE = console, LOGGER_STACK_SKIP_TOKENS = [
@@ -245,28 +245,28 @@ function requireIndex_cjs$3() {
245
245
  const t = new Error().stack;
246
246
  if (!t)
247
247
  return;
248
- const [, ...i] = t.split(`
249
- `), h = i.filter((d) => !LOGGER_STACK_SKIP_TOKENS.some((E) => d.includes(E)));
250
- return h.length ? `Stack trace:
251
- ${h.slice(0, 5).join(`
248
+ const [, ...s] = t.split(`
249
+ `), d = s.filter((h) => !LOGGER_STACK_SKIP_TOKENS.some((E) => h.includes(E)));
250
+ return d.length ? `Stack trace:
251
+ ${d.slice(0, 5).join(`
252
252
  `)}` : void 0;
253
253
  } catch {
254
254
  return;
255
255
  }
256
256
  }
257
257
  class Logger {
258
- constructor(i, h = DEFAULT_DELEGATE) {
259
- this.prefix = i, this.delegate = h ?? DEFAULT_DELEGATE;
258
+ constructor(s, d = DEFAULT_DELEGATE) {
259
+ this.prefix = s, this.delegate = d ?? DEFAULT_DELEGATE;
260
260
  }
261
- setPrefix(i) {
262
- this.prefix = i;
261
+ setPrefix(s) {
262
+ this.prefix = s;
263
263
  }
264
- setDelegate(i) {
265
- this.delegate = i ?? DEFAULT_DELEGATE;
264
+ setDelegate(s) {
265
+ this.delegate = s ?? DEFAULT_DELEGATE;
266
266
  }
267
- emit(i, h) {
268
- const u = this.delegate, E = isDebugMode() ? captureStackTrace() : void 0, _ = E ? [...h, E] : h, y = (() => {
269
- switch (i) {
267
+ emit(s, d) {
268
+ const u = this.delegate, E = isDebugMode() ? captureStackTrace() : void 0, _ = E ? [...d, E] : d, y = (() => {
269
+ switch (s) {
270
270
  case "log":
271
271
  return ["log", "info"];
272
272
  case "info":
@@ -295,144 +295,144 @@ ${h.slice(0, 5).join(`
295
295
  }
296
296
  }
297
297
  }
298
- log(...i) {
299
- this.emit("log", i);
298
+ log(...s) {
299
+ this.emit("log", s);
300
300
  }
301
- warn(...i) {
302
- this.emit("warn", i);
301
+ warn(...s) {
302
+ this.emit("warn", s);
303
303
  }
304
- error(...i) {
305
- this.emit("error", i);
304
+ error(...s) {
305
+ this.emit("error", s);
306
306
  }
307
- success(...i) {
308
- this.emit("info", i);
307
+ success(...s) {
308
+ this.emit("info", s);
309
309
  }
310
- info(...i) {
311
- this.emit("info", i);
310
+ info(...s) {
311
+ this.emit("info", s);
312
312
  }
313
- ready(...i) {
314
- this.emit("info", i);
313
+ ready(...s) {
314
+ this.emit("info", s);
315
315
  }
316
- debug(...i) {
317
- isDebugMode() && this.emit("debug", i);
316
+ debug(...s) {
317
+ isDebugMode() && this.emit("debug", s);
318
318
  }
319
319
  }
320
320
  function createLogger(t) {
321
321
  return new Logger(t);
322
322
  }
323
323
  function createInfrastructureLogger(t) {
324
- const i = new Logger(t);
325
- return Object.defineProperty(i, "__mf_infrastructure_logger__", {
324
+ const s = new Logger(t);
325
+ return Object.defineProperty(s, "__mf_infrastructure_logger__", {
326
326
  value: !0,
327
327
  enumerable: !1,
328
328
  configurable: !1
329
- }), i;
329
+ }), s;
330
330
  }
331
- function bindLoggerToCompiler(t, i, h) {
332
- if (t.__mf_infrastructure_logger__ && i?.getInfrastructureLogger)
331
+ function bindLoggerToCompiler(t, s, d) {
332
+ if (t.__mf_infrastructure_logger__ && s?.getInfrastructureLogger)
333
333
  try {
334
- const u = i.getInfrastructureLogger(h);
334
+ const u = s.getInfrastructureLogger(d);
335
335
  u && typeof u == "object" && (typeof u.log == "function" || typeof u.info == "function" || typeof u.warn == "function" || typeof u.error == "function") && t.setDelegate(u);
336
336
  } catch {
337
337
  t.setDelegate(void 0);
338
338
  }
339
339
  }
340
340
  const logger = createLogger(PREFIX), infrastructureLogger = createInfrastructureLogger(PREFIX);
341
- async function safeWrapper(t, i) {
341
+ async function safeWrapper(t, s) {
342
342
  try {
343
343
  return await t();
344
- } catch (h) {
345
- !i && warn(h);
344
+ } catch (d) {
345
+ !s && warn(d);
346
346
  return;
347
347
  }
348
348
  }
349
- function isStaticResourcesEqual(t, i) {
350
- const h = /^(https?:)?\/\//i, u = t.replace(h, "").replace(/\/$/, ""), d = i.replace(h, "").replace(/\/$/, "");
351
- return u === d;
349
+ function isStaticResourcesEqual(t, s) {
350
+ const d = /^(https?:)?\/\//i, u = t.replace(d, "").replace(/\/$/, ""), h = s.replace(d, "").replace(/\/$/, "");
351
+ return u === h;
352
352
  }
353
353
  function createScript(t) {
354
- let i = null, h = !0, u = 2e4, d;
354
+ let s = null, d = !0, u = 2e4, h;
355
355
  const E = document.getElementsByTagName("script");
356
356
  for (let y = 0; y < E.length; y++) {
357
357
  const R = E[y], $ = R.getAttribute("src");
358
358
  if ($ && isStaticResourcesEqual($, t.url)) {
359
- i = R, h = !1;
359
+ s = R, d = !1;
360
360
  break;
361
361
  }
362
362
  }
363
- if (!i) {
363
+ if (!s) {
364
364
  const y = t.attrs;
365
- i = document.createElement("script"), i.type = y?.type === "module" ? "module" : "text/javascript";
365
+ s = document.createElement("script"), s.type = y?.type === "module" ? "module" : "text/javascript";
366
366
  let R;
367
- t.createScriptHook && (R = t.createScriptHook(t.url, t.attrs), R instanceof HTMLScriptElement ? i = R : typeof R == "object" && ("script" in R && R.script && (i = R.script), "timeout" in R && R.timeout && (u = R.timeout))), i.src || (i.src = t.url), y && !R && Object.keys(y).forEach(($) => {
368
- i && ($ === "async" || $ === "defer" ? i[$] = y[$] : i.getAttribute($) || i.setAttribute($, y[$]));
367
+ t.createScriptHook && (R = t.createScriptHook(t.url, t.attrs), R instanceof HTMLScriptElement ? s = R : typeof R == "object" && ("script" in R && R.script && (s = R.script), "timeout" in R && R.timeout && (u = R.timeout))), s.src || (s.src = t.url), y && !R && Object.keys(y).forEach(($) => {
368
+ s && ($ === "async" || $ === "defer" ? s[$] = y[$] : s.getAttribute($) || s.setAttribute($, y[$]));
369
369
  });
370
370
  }
371
371
  const _ = async (y, R) => {
372
- clearTimeout(d);
372
+ clearTimeout(h);
373
373
  const $ = () => {
374
374
  R?.type === "error" ? t?.onErrorCallback && t?.onErrorCallback(R) : t?.cb && t?.cb();
375
375
  };
376
- if (i && (i.onerror = null, i.onload = null, safeWrapper(() => {
376
+ if (s && (s.onerror = null, s.onload = null, safeWrapper(() => {
377
377
  const { needDeleteScript: w = !0 } = t;
378
- w && i?.parentNode && i.parentNode.removeChild(i);
378
+ w && s?.parentNode && s.parentNode.removeChild(s);
379
379
  }), y && typeof y == "function")) {
380
380
  const w = y(R);
381
381
  if (w instanceof Promise) {
382
- const C = await w;
383
- return $(), C;
382
+ const k = await w;
383
+ return $(), k;
384
384
  }
385
385
  return $(), w;
386
386
  }
387
387
  $();
388
388
  };
389
- return i.onerror = _.bind(null, i.onerror), i.onload = _.bind(null, i.onload), d = setTimeout(() => {
389
+ return s.onerror = _.bind(null, s.onerror), s.onload = _.bind(null, s.onload), h = setTimeout(() => {
390
390
  _(null, new Error(`Remote script "${t.url}" time-outed.`));
391
- }, u), { script: i, needAttach: h };
391
+ }, u), { script: s, needAttach: d };
392
392
  }
393
393
  function createLink(t) {
394
- let i = null, h = !0;
394
+ let s = null, d = !0;
395
395
  const u = document.getElementsByTagName("link");
396
396
  for (let E = 0; E < u.length; E++) {
397
397
  const _ = u[E], y = _.getAttribute("href"), R = _.getAttribute("rel");
398
398
  if (y && isStaticResourcesEqual(y, t.url) && R === t.attrs.rel) {
399
- i = _, h = !1;
399
+ s = _, d = !1;
400
400
  break;
401
401
  }
402
402
  }
403
- if (!i) {
404
- i = document.createElement("link"), i.setAttribute("href", t.url);
403
+ if (!s) {
404
+ s = document.createElement("link"), s.setAttribute("href", t.url);
405
405
  let E;
406
406
  const _ = t.attrs;
407
- t.createLinkHook && (E = t.createLinkHook(t.url, _), E instanceof HTMLLinkElement && (i = E)), _ && !E && Object.keys(_).forEach((y) => {
408
- i && !i.getAttribute(y) && i.setAttribute(y, _[y]);
407
+ t.createLinkHook && (E = t.createLinkHook(t.url, _), E instanceof HTMLLinkElement && (s = E)), _ && !E && Object.keys(_).forEach((y) => {
408
+ s && !s.getAttribute(y) && s.setAttribute(y, _[y]);
409
409
  });
410
410
  }
411
- const d = (E, _) => {
411
+ const h = (E, _) => {
412
412
  const y = () => {
413
413
  _?.type === "error" ? t?.onErrorCallback && t?.onErrorCallback(_) : t?.cb && t?.cb();
414
414
  };
415
- if (i && (i.onerror = null, i.onload = null, safeWrapper(() => {
415
+ if (s && (s.onerror = null, s.onload = null, safeWrapper(() => {
416
416
  const { needDeleteLink: R = !0 } = t;
417
- R && i?.parentNode && i.parentNode.removeChild(i);
417
+ R && s?.parentNode && s.parentNode.removeChild(s);
418
418
  }), E)) {
419
419
  const R = E(_);
420
420
  return y(), R;
421
421
  }
422
422
  y();
423
423
  };
424
- return i.onerror = d.bind(null, i.onerror), i.onload = d.bind(null, i.onload), { link: i, needAttach: h };
424
+ return s.onerror = h.bind(null, s.onerror), s.onload = h.bind(null, s.onload), { link: s, needAttach: d };
425
425
  }
426
- function loadScript(t, i) {
427
- const { attrs: h = {}, createScriptHook: u } = i;
428
- return new Promise((d, E) => {
426
+ function loadScript(t, s) {
427
+ const { attrs: d = {}, createScriptHook: u } = s;
428
+ return new Promise((h, E) => {
429
429
  const { script: _, needAttach: y } = createScript({
430
430
  url: t,
431
- cb: d,
431
+ cb: h,
432
432
  onErrorCallback: E,
433
433
  attrs: {
434
434
  fetchpriority: "high",
435
- ...h
435
+ ...d
436
436
  },
437
437
  createScriptHook: u,
438
438
  needDeleteScript: !0
@@ -446,17 +446,17 @@ ${h.slice(0, 5).join(`
446
446
  throw new Error("import specifier is required");
447
447
  if (sdkImportCache.has(t))
448
448
  return sdkImportCache.get(t);
449
- const h = new Function("name", "return import(name)")(t).then((u) => u).catch((u) => {
449
+ const d = new Function("name", "return import(name)")(t).then((u) => u).catch((u) => {
450
450
  throw console.error(`Error importing module ${t}:`, u), sdkImportCache.delete(t), u;
451
451
  });
452
- return sdkImportCache.set(t, h), h;
452
+ return sdkImportCache.set(t, d), d;
453
453
  }
454
454
  const loadNodeFetch = async () => {
455
455
  const t = await importNodeModule("node-fetch");
456
456
  return t.default || t;
457
- }, lazyLoaderHookFetch = async (t, i, h) => {
458
- const d = await ((E, _) => h.lifecycle.fetch.emit(E, _))(t, i || {});
459
- return !d || !(d instanceof Response) ? (typeof fetch > "u" ? await loadNodeFetch() : fetch)(t, i || {}) : d;
457
+ }, lazyLoaderHookFetch = async (t, s, d) => {
458
+ const h = await ((E, _) => d.lifecycle.fetch.emit(E, _))(t, s || {});
459
+ return !h || !(h instanceof Response) ? (typeof fetch > "u" ? await loadNodeFetch() : fetch)(t, s || {}) : h;
460
460
  }, createScriptNode = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (url, cb, attrs, loaderHook) => {
461
461
  if (loaderHook?.createScriptHook) {
462
462
  const t = loaderHook.createScriptHook(url);
@@ -469,7 +469,7 @@ ${h.slice(0, 5).join(`
469
469
  console.error("Error constructing URL:", t), cb(new Error(`Invalid URL: ${t}`));
470
470
  return;
471
471
  }
472
- const getFetch = async () => loaderHook?.fetch ? (t, i) => lazyLoaderHookFetch(t, i, loaderHook) : typeof fetch > "u" ? loadNodeFetch() : fetch, handleScriptFetch = async (f, urlObj) => {
472
+ const getFetch = async () => loaderHook?.fetch ? (t, s) => lazyLoaderHookFetch(t, s, loaderHook) : typeof fetch > "u" ? loadNodeFetch() : fetch, handleScriptFetch = async (f, urlObj) => {
473
473
  try {
474
474
  const res = await f(urlObj.href), data = await res.text(), [path, vm] = await Promise.all([
475
475
  importNodeModule("path"),
@@ -499,58 +499,58 @@ ${h.slice(0, 5).join(`
499
499
  return loadModule(urlObj.href, {
500
500
  fetch: t,
501
501
  vm: await importNodeModule("vm")
502
- }).then(async (i) => {
503
- await i.evaluate(), cb(void 0, i.namespace);
504
- }).catch((i) => {
505
- cb(i instanceof Error ? i : new Error(`Script execution error: ${i}`));
502
+ }).then(async (s) => {
503
+ await s.evaluate(), cb(void 0, s.namespace);
504
+ }).catch((s) => {
505
+ cb(s instanceof Error ? s : new Error(`Script execution error: ${s}`));
506
506
  });
507
507
  handleScriptFetch(t, urlObj);
508
508
  }).catch((t) => {
509
509
  cb(t);
510
510
  });
511
- } : (t, i, h, u) => {
512
- i(new Error("createScriptNode is disabled in non-Node.js environment"));
513
- }, loadScriptNode = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (t, i) => new Promise((h, u) => {
514
- createScriptNode(t, (d, E) => {
515
- if (d)
516
- u(d);
511
+ } : (t, s, d, u) => {
512
+ s(new Error("createScriptNode is disabled in non-Node.js environment"));
513
+ }, loadScriptNode = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (t, s) => new Promise((d, u) => {
514
+ createScriptNode(t, (h, E) => {
515
+ if (h)
516
+ u(h);
517
517
  else {
518
- const _ = i?.attrs?.globalName || `__FEDERATION_${i?.attrs?.name}:custom__`, y = globalThis[_] = E;
519
- h(y);
518
+ const _ = s?.attrs?.globalName || `__FEDERATION_${s?.attrs?.name}:custom__`, y = globalThis[_] = E;
519
+ d(y);
520
520
  }
521
- }, i.attrs, i.loaderHook);
522
- }) : (t, i) => {
521
+ }, s.attrs, s.loaderHook);
522
+ }) : (t, s) => {
523
523
  throw new Error("loadScriptNode is disabled in non-Node.js environment");
524
524
  }, esmModuleCache = /* @__PURE__ */ new Map();
525
- async function loadModule(t, i) {
525
+ async function loadModule(t, s) {
526
526
  if (esmModuleCache.has(t))
527
527
  return esmModuleCache.get(t);
528
- const { fetch: h, vm: u } = i, E = await (await h(t)).text(), _ = new u.SourceTextModule(E, {
528
+ const { fetch: d, vm: u } = s, E = await (await d(t)).text(), _ = new u.SourceTextModule(E, {
529
529
  // @ts-ignore
530
530
  importModuleDynamically: async (y, R) => {
531
531
  const $ = new URL(y, t).href;
532
- return loadModule($, i);
532
+ return loadModule($, s);
533
533
  }
534
534
  });
535
535
  return esmModuleCache.set(t, _), await _.link(async (y) => {
536
536
  const R = new URL(y, t).href;
537
- return await loadModule(R, i);
537
+ return await loadModule(R, s);
538
538
  }), _;
539
539
  }
540
- function normalizeOptions(t, i, h) {
540
+ function normalizeOptions(t, s, d) {
541
541
  return function(u) {
542
542
  if (u === !1)
543
543
  return !1;
544
544
  if (typeof u > "u")
545
- return t ? i : !1;
545
+ return t ? s : !1;
546
546
  if (u === !0)
547
- return i;
547
+ return s;
548
548
  if (u && typeof u == "object")
549
549
  return {
550
- ...i,
550
+ ...s,
551
551
  ...u
552
552
  };
553
- throw new Error(`Unexpected type for \`${h}\`, expect boolean/undefined/object, got: ${typeof u}`);
553
+ throw new Error(`Unexpected type for \`${d}\`, expect boolean/undefined/object, got: ${typeof u}`);
554
554
  };
555
555
  }
556
556
  const createModuleFederationConfig = (t) => t;
@@ -560,17 +560,17 @@ var index_cjs = {}, hasRequiredIndex_cjs$2;
560
560
  function requireIndex_cjs$2() {
561
561
  if (hasRequiredIndex_cjs$2) return index_cjs;
562
562
  hasRequiredIndex_cjs$2 = 1;
563
- const t = "RUNTIME-001", i = "RUNTIME-002", h = "RUNTIME-003", u = "RUNTIME-004", d = "RUNTIME-005", E = "RUNTIME-006", _ = "RUNTIME-007", y = "RUNTIME-008", R = "RUNTIME-009", $ = "TYPE-001", w = "BUILD-001", C = "BUILD-002", H = (D) => `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${D.split("-")[0].toLowerCase()}/${D}`, B = (D, P, F, V) => {
563
+ const t = "RUNTIME-001", s = "RUNTIME-002", d = "RUNTIME-003", u = "RUNTIME-004", h = "RUNTIME-005", E = "RUNTIME-006", _ = "RUNTIME-007", y = "RUNTIME-008", R = "RUNTIME-009", $ = "TYPE-001", w = "BUILD-001", k = "BUILD-002", H = (D) => `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${D.split("-")[0].toLowerCase()}/${D}`, B = (D, P, F, V) => {
564
564
  const ee = [`${[P[D]]} #${D}`];
565
565
  return F && ee.push(`args: ${JSON.stringify(F)}`), ee.push(H(D)), V && ee.push(`Original Error Message:
566
566
  ${V}`), ee.join(`
567
567
  `);
568
568
  }, x = {
569
569
  [t]: "Failed to get remoteEntry exports.",
570
- [i]: 'The remote entry interface does not contain "init"',
571
- [h]: "Failed to get manifest.",
570
+ [s]: 'The remote entry interface does not contain "init"',
571
+ [d]: "Failed to get manifest.",
572
572
  [u]: "Failed to locate remote.",
573
- [d]: "Invalid loadShareSync function call from bundler runtime",
573
+ [h]: "Invalid loadShareSync function call from bundler runtime",
574
574
  [E]: "Invalid loadShareSync function call from runtime",
575
575
  [_]: "Failed to get remote snapshot.",
576
576
  [y]: "Failed to load script resources.",
@@ -579,82 +579,82 @@ function requireIndex_cjs$2() {
579
579
  [$]: "Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."
580
580
  }, Q = {
581
581
  [w]: "Failed to find expose module.",
582
- [C]: "PublicPath is required in prod mode."
582
+ [k]: "PublicPath is required in prod mode."
583
583
  }, J = {
584
584
  ...x,
585
585
  ...U,
586
586
  ...Q
587
587
  };
588
- return index_cjs.BUILD_001 = w, index_cjs.BUILD_002 = C, index_cjs.RUNTIME_001 = t, index_cjs.RUNTIME_002 = i, index_cjs.RUNTIME_003 = h, index_cjs.RUNTIME_004 = u, index_cjs.RUNTIME_005 = d, index_cjs.RUNTIME_006 = E, index_cjs.RUNTIME_007 = _, index_cjs.RUNTIME_008 = y, index_cjs.RUNTIME_009 = R, index_cjs.TYPE_001 = $, index_cjs.buildDescMap = Q, index_cjs.errorDescMap = J, index_cjs.getShortErrorMsg = B, index_cjs.runtimeDescMap = x, index_cjs.typeDescMap = U, index_cjs;
588
+ return index_cjs.BUILD_001 = w, index_cjs.BUILD_002 = k, index_cjs.RUNTIME_001 = t, index_cjs.RUNTIME_002 = s, index_cjs.RUNTIME_003 = d, index_cjs.RUNTIME_004 = u, index_cjs.RUNTIME_005 = h, index_cjs.RUNTIME_006 = E, index_cjs.RUNTIME_007 = _, index_cjs.RUNTIME_008 = y, index_cjs.RUNTIME_009 = R, index_cjs.TYPE_001 = $, index_cjs.buildDescMap = Q, index_cjs.errorDescMap = J, index_cjs.getShortErrorMsg = B, index_cjs.runtimeDescMap = x, index_cjs.typeDescMap = U, index_cjs;
589
589
  }
590
590
  var hasRequiredIndex_cjs$1;
591
591
  function requireIndex_cjs$1() {
592
592
  if (hasRequiredIndex_cjs$1) return index_cjs$2;
593
593
  hasRequiredIndex_cjs$1 = 1;
594
- var t = /* @__PURE__ */ requireIndex_cjs$3(), i = /* @__PURE__ */ requireIndex_cjs$2();
595
- const h = "[ Federation Runtime ]", u = t.createLogger(h);
596
- function d(r, e) {
597
- r || E(e);
594
+ var t = /* @__PURE__ */ requireIndex_cjs$3(), s = /* @__PURE__ */ requireIndex_cjs$2();
595
+ const d = "[ Federation Runtime ]", u = t.createLogger(d);
596
+ function h(n, e) {
597
+ n || E(e);
598
598
  }
599
- function E(r) {
600
- throw r instanceof Error ? (r.message.startsWith(h) || (r.message = `${h}: ${r.message}`), r) : new Error(`${h}: ${r}`);
599
+ function E(n) {
600
+ throw n instanceof Error ? (n.message.startsWith(d) || (n.message = `${d}: ${n.message}`), n) : new Error(`${d}: ${n}`);
601
601
  }
602
- function _(r) {
603
- r instanceof Error && (r.message.startsWith(h) || (r.message = `${h}: ${r.message}`)), u.warn(r);
602
+ function _(n) {
603
+ n instanceof Error && (n.message.startsWith(d) || (n.message = `${d}: ${n.message}`)), u.warn(n);
604
604
  }
605
- function y(r, e) {
606
- return r.findIndex((n) => n === e) === -1 && r.push(e), r;
605
+ function y(n, e) {
606
+ return n.findIndex((r) => r === e) === -1 && n.push(e), n;
607
607
  }
608
- function R(r) {
609
- return "version" in r && r.version ? `${r.name}:${r.version}` : "entry" in r && r.entry ? `${r.name}:${r.entry}` : `${r.name}`;
608
+ function R(n) {
609
+ return "version" in n && n.version ? `${n.name}:${n.version}` : "entry" in n && n.entry ? `${n.name}:${n.entry}` : `${n.name}`;
610
610
  }
611
- function $(r) {
612
- return typeof r.entry < "u";
611
+ function $(n) {
612
+ return typeof n.entry < "u";
613
613
  }
614
- function w(r) {
615
- return !r.entry.includes(".json");
614
+ function w(n) {
615
+ return !n.entry.includes(".json");
616
616
  }
617
- async function C(r, e) {
617
+ async function k(n, e) {
618
618
  try {
619
- return await r();
620
- } catch (n) {
621
- !e && _(n);
619
+ return await n();
620
+ } catch (r) {
621
+ !e && _(r);
622
622
  return;
623
623
  }
624
624
  }
625
- function H(r) {
626
- return r && typeof r == "object";
625
+ function H(n) {
626
+ return n && typeof n == "object";
627
627
  }
628
628
  const B = Object.prototype.toString;
629
- function x(r) {
630
- return B.call(r) === "[object Object]";
629
+ function x(n) {
630
+ return B.call(n) === "[object Object]";
631
631
  }
632
- function U(r, e) {
633
- const n = /^(https?:)?\/\//i, o = r.replace(n, "").replace(/\/$/, ""), s = e.replace(n, "").replace(/\/$/, "");
634
- return o === s;
632
+ function U(n, e) {
633
+ const r = /^(https?:)?\/\//i, o = n.replace(r, "").replace(/\/$/, ""), i = e.replace(r, "").replace(/\/$/, "");
634
+ return o === i;
635
635
  }
636
- function Q(r) {
637
- return Array.isArray(r) ? r : [r];
636
+ function Q(n) {
637
+ return Array.isArray(n) ? n : [n];
638
638
  }
639
- function J(r) {
639
+ function J(n) {
640
640
  const e = {
641
641
  url: "",
642
642
  type: "global",
643
643
  globalName: ""
644
644
  };
645
- return t.isBrowserEnv() || t.isReactNativeEnv() ? "remoteEntry" in r ? {
646
- url: r.remoteEntry,
647
- type: r.remoteEntryType,
648
- globalName: r.globalName
649
- } : e : "ssrRemoteEntry" in r ? {
650
- url: r.ssrRemoteEntry || e.url,
651
- type: r.ssrRemoteEntryType || e.type,
652
- globalName: r.globalName
645
+ return t.isBrowserEnv() || t.isReactNativeEnv() ? "remoteEntry" in n ? {
646
+ url: n.remoteEntry,
647
+ type: n.remoteEntryType,
648
+ globalName: n.globalName
649
+ } : e : "ssrRemoteEntry" in n ? {
650
+ url: n.ssrRemoteEntry || e.url,
651
+ type: n.ssrRemoteEntryType || e.type,
652
+ globalName: n.globalName
653
653
  } : e;
654
654
  }
655
- const D = (r, e) => {
656
- let n;
657
- return r.endsWith("/") ? n = r.slice(0, -1) : n = r, e.startsWith(".") && (e = e.slice(1)), n = n + e, n;
655
+ const D = (n, e) => {
656
+ let r;
657
+ return n.endsWith("/") ? r = n.slice(0, -1) : r = n, e.startsWith(".") && (e = e.slice(1)), r = r + e, r;
658
658
  }, P = typeof globalThis == "object" ? globalThis : window, F = (() => {
659
659
  try {
660
660
  return document.defaultView;
@@ -662,54 +662,54 @@ function requireIndex_cjs$1() {
662
662
  return P;
663
663
  }
664
664
  })(), V = F;
665
- function ee(r, e, n) {
666
- Object.defineProperty(r, e, {
667
- value: n,
665
+ function ee(n, e, r) {
666
+ Object.defineProperty(n, e, {
667
+ value: r,
668
668
  configurable: !1,
669
669
  writable: !0
670
670
  });
671
671
  }
672
- function v(r, e) {
673
- return Object.hasOwnProperty.call(r, e);
672
+ function v(n, e) {
673
+ return Object.hasOwnProperty.call(n, e);
674
674
  }
675
675
  v(P, "__GLOBAL_LOADING_REMOTE_ENTRY__") || ee(P, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
676
676
  const ce = P.__GLOBAL_LOADING_REMOTE_ENTRY__;
677
- function ne(r) {
678
- v(r, "__VMOK__") && !v(r, "__FEDERATION__") && ee(r, "__FEDERATION__", r.__VMOK__), v(r, "__FEDERATION__") || (ee(r, "__FEDERATION__", {
677
+ function re(n) {
678
+ v(n, "__VMOK__") && !v(n, "__FEDERATION__") && ee(n, "__FEDERATION__", n.__VMOK__), v(n, "__FEDERATION__") || (ee(n, "__FEDERATION__", {
679
679
  __GLOBAL_PLUGIN__: [],
680
680
  __INSTANCES__: [],
681
681
  moduleInfo: {},
682
682
  __SHARE__: {},
683
683
  __MANIFEST_LOADING__: {},
684
684
  __PRELOADED_MAP__: /* @__PURE__ */ new Map()
685
- }), ee(r, "__VMOK__", r.__FEDERATION__)), r.__FEDERATION__.__GLOBAL_PLUGIN__ ??= [], r.__FEDERATION__.__INSTANCES__ ??= [], r.__FEDERATION__.moduleInfo ??= {}, r.__FEDERATION__.__SHARE__ ??= {}, r.__FEDERATION__.__MANIFEST_LOADING__ ??= {}, r.__FEDERATION__.__PRELOADED_MAP__ ??= /* @__PURE__ */ new Map();
685
+ }), ee(n, "__VMOK__", n.__FEDERATION__)), n.__FEDERATION__.__GLOBAL_PLUGIN__ ??= [], n.__FEDERATION__.__INSTANCES__ ??= [], n.__FEDERATION__.moduleInfo ??= {}, n.__FEDERATION__.__SHARE__ ??= {}, n.__FEDERATION__.__MANIFEST_LOADING__ ??= {}, n.__FEDERATION__.__PRELOADED_MAP__ ??= /* @__PURE__ */ new Map();
686
686
  }
687
- ne(P), ne(F);
687
+ re(P), re(F);
688
688
  function I() {
689
- P.__FEDERATION__.__GLOBAL_PLUGIN__ = [], P.__FEDERATION__.__INSTANCES__ = [], P.__FEDERATION__.moduleInfo = {}, P.__FEDERATION__.__SHARE__ = {}, P.__FEDERATION__.__MANIFEST_LOADING__ = {}, Object.keys(ce).forEach((r) => {
690
- delete ce[r];
689
+ P.__FEDERATION__.__GLOBAL_PLUGIN__ = [], P.__FEDERATION__.__INSTANCES__ = [], P.__FEDERATION__.moduleInfo = {}, P.__FEDERATION__.__SHARE__ = {}, P.__FEDERATION__.__MANIFEST_LOADING__ = {}, Object.keys(ce).forEach((n) => {
690
+ delete ce[n];
691
691
  });
692
692
  }
693
- function N(r) {
694
- P.__FEDERATION__.__INSTANCES__.push(r);
693
+ function N(n) {
694
+ P.__FEDERATION__.__INSTANCES__.push(n);
695
695
  }
696
- function k() {
696
+ function C() {
697
697
  return P.__FEDERATION__.__DEBUG_CONSTRUCTOR__;
698
698
  }
699
- function z(r, e = t.isDebugMode()) {
700
- e && (P.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = r, P.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.21.4");
699
+ function K(n, e = t.isDebugMode()) {
700
+ e && (P.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = n, P.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.21.4");
701
701
  }
702
- function Z(r, e) {
702
+ function Z(n, e) {
703
703
  if (typeof e == "string") {
704
- if (r[e])
704
+ if (n[e])
705
705
  return {
706
- value: r[e],
706
+ value: n[e],
707
707
  key: e
708
708
  };
709
709
  {
710
- const o = Object.keys(r);
711
- for (const s of o) {
712
- const [c, a] = s.split(":"), l = `${c}:${e}`, p = r[l];
710
+ const o = Object.keys(n);
711
+ for (const i of o) {
712
+ const [c, a] = i.split(":"), l = `${c}:${e}`, p = n[l];
713
713
  if (p)
714
714
  return {
715
715
  value: p,
@@ -724,127 +724,127 @@ function requireIndex_cjs$1() {
724
724
  } else
725
725
  throw new Error("key must be string");
726
726
  }
727
- const fe = () => F.__FEDERATION__.moduleInfo, Ie = (r, e) => {
728
- const n = R(r), o = Z(e, n).value;
729
- if (o && !o.version && "version" in r && r.version && (o.version = r.version), o)
727
+ const fe = () => F.__FEDERATION__.moduleInfo, Ie = (n, e) => {
728
+ const r = R(n), o = Z(e, r).value;
729
+ if (o && !o.version && "version" in n && n.version && (o.version = n.version), o)
730
730
  return o;
731
- if ("version" in r && r.version) {
732
- const { version: s, ...c } = r, a = R(c), l = Z(F.__FEDERATION__.moduleInfo, a).value;
733
- if (l?.version === s)
731
+ if ("version" in n && n.version) {
732
+ const { version: i, ...c } = n, a = R(c), l = Z(F.__FEDERATION__.moduleInfo, a).value;
733
+ if (l?.version === i)
734
734
  return l;
735
735
  }
736
- }, he = (r) => Ie(r, F.__FEDERATION__.moduleInfo), le = (r, e) => {
737
- const n = R(r);
738
- return F.__FEDERATION__.moduleInfo[n] = e, F.__FEDERATION__.moduleInfo;
739
- }, K = (r) => (F.__FEDERATION__.moduleInfo = {
736
+ }, he = (n) => Ie(n, F.__FEDERATION__.moduleInfo), le = (n, e) => {
737
+ const r = R(n);
738
+ return F.__FEDERATION__.moduleInfo[r] = e, F.__FEDERATION__.moduleInfo;
739
+ }, z = (n) => (F.__FEDERATION__.moduleInfo = {
740
740
  ...F.__FEDERATION__.moduleInfo,
741
- ...r
741
+ ...n
742
742
  }, () => {
743
- const e = Object.keys(r);
744
- for (const n of e)
745
- delete F.__FEDERATION__.moduleInfo[n];
746
- }), $e = (r, e) => {
747
- const n = e || `__FEDERATION_${r}:custom__`, o = P[n];
743
+ const e = Object.keys(n);
744
+ for (const r of e)
745
+ delete F.__FEDERATION__.moduleInfo[r];
746
+ }), $e = (n, e) => {
747
+ const r = e || `__FEDERATION_${n}:custom__`, o = P[r];
748
748
  return {
749
- remoteEntryKey: n,
749
+ remoteEntryKey: r,
750
750
  entryExports: o
751
751
  };
752
- }, Ge = (r) => {
752
+ }, Ge = (n) => {
753
753
  const { __GLOBAL_PLUGIN__: e } = F.__FEDERATION__;
754
- r.forEach((n) => {
755
- e.findIndex((o) => o.name === n.name) === -1 ? e.push(n) : _(`The plugin ${n.name} has been registered.`);
754
+ n.forEach((r) => {
755
+ e.findIndex((o) => o.name === r.name) === -1 ? e.push(r) : _(`The plugin ${r.name} has been registered.`);
756
756
  });
757
- }, Ve = () => F.__FEDERATION__.__GLOBAL_PLUGIN__, Be = (r) => P.__FEDERATION__.__PRELOADED_MAP__.get(r), qe = (r) => P.__FEDERATION__.__PRELOADED_MAP__.set(r, !0), Ee = "default", We = "global", Ke = "[0-9A-Za-z-]+", Me = `(?:\\+(${Ke}(?:\\.${Ke})*))`, ye = "0|[1-9]\\d*", Te = "[0-9]+", ze = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", Xe = `(?:${Te}|${ze})`, dt = `(?:-?(${Xe}(?:\\.${Xe})*))`, Ye = `(?:${ye}|${ze})`, Je = `(?:-(${Ye}(?:\\.${Ye})*))`, Pe = `${ye}|x|X|\\*`, pe = `[v=\\s]*(${Pe})(?:\\.(${Pe})(?:\\.(${Pe})(?:${Je})?${Me}?)?)?`, ht = `^\\s*(${pe})\\s+-\\s+(${pe})\\s*$`, pt = `[v=\\s]*${`(${Te})\\.(${Te})\\.(${Te})`}${dt}?${Me}?`, we = "((?:<|>)?=?)", mt = `(\\s*)${we}\\s*(${pt}|${pe})`, Ze = "(?:~>?)", _t = `(\\s*)${Ze}\\s+`, Qe = "(?:\\^)", Et = `(\\s*)${Qe}\\s+`, yt = "(<|>)?=?\\s*\\*", gt = `^${Qe}${pe}$`, bt = `v?${`(${ye})\\.(${ye})\\.(${ye})`}${Je}?${Me}?`, St = `^${Ze}${pe}$`, Rt = `^${we}\\s*${pe}$`, Nt = `^${we}\\s*(${bt})$|^$`, It = "^\\s*>=\\s*0.0.0\\s*$";
758
- function ie(r) {
759
- return new RegExp(r);
757
+ }, Ve = () => F.__FEDERATION__.__GLOBAL_PLUGIN__, Be = (n) => P.__FEDERATION__.__PRELOADED_MAP__.get(n), qe = (n) => P.__FEDERATION__.__PRELOADED_MAP__.set(n, !0), Ee = "default", We = "global", ze = "[0-9A-Za-z-]+", Me = `(?:\\+(${ze}(?:\\.${ze})*))`, ye = "0|[1-9]\\d*", Te = "[0-9]+", Ke = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", Xe = `(?:${Te}|${Ke})`, dt = `(?:-?(${Xe}(?:\\.${Xe})*))`, Ye = `(?:${ye}|${Ke})`, Je = `(?:-(${Ye}(?:\\.${Ye})*))`, Pe = `${ye}|x|X|\\*`, pe = `[v=\\s]*(${Pe})(?:\\.(${Pe})(?:\\.(${Pe})(?:${Je})?${Me}?)?)?`, ht = `^\\s*(${pe})\\s+-\\s+(${pe})\\s*$`, pt = `[v=\\s]*${`(${Te})\\.(${Te})\\.(${Te})`}${dt}?${Me}?`, we = "((?:<|>)?=?)", mt = `(\\s*)${we}\\s*(${pt}|${pe})`, Ze = "(?:~>?)", _t = `(\\s*)${Ze}\\s+`, Qe = "(?:\\^)", Et = `(\\s*)${Qe}\\s+`, yt = "(<|>)?=?\\s*\\*", gt = `^${Qe}${pe}$`, bt = `v?${`(${ye})\\.(${ye})\\.(${ye})`}${Je}?${Me}?`, St = `^${Ze}${pe}$`, Rt = `^${we}\\s*${pe}$`, Nt = `^${we}\\s*(${bt})$|^$`, It = "^\\s*>=\\s*0.0.0\\s*$";
758
+ function ie(n) {
759
+ return new RegExp(n);
760
760
  }
761
- function X(r) {
762
- return !r || r.toLowerCase() === "x" || r === "*";
761
+ function X(n) {
762
+ return !n || n.toLowerCase() === "x" || n === "*";
763
763
  }
764
- function et(...r) {
765
- return (e) => r.reduce((n, o) => o(n), e);
764
+ function et(...n) {
765
+ return (e) => n.reduce((r, o) => o(r), e);
766
766
  }
767
- function tt(r) {
768
- return r.match(ie(Nt));
767
+ function tt(n) {
768
+ return n.match(ie(Nt));
769
769
  }
770
- function rt(r, e, n, o) {
771
- const s = `${r}.${e}.${n}`;
772
- return o ? `${s}-${o}` : s;
770
+ function nt(n, e, r, o) {
771
+ const i = `${n}.${e}.${r}`;
772
+ return o ? `${i}-${o}` : i;
773
773
  }
774
- function $t(r) {
775
- return r.replace(ie(ht), (e, n, o, s, c, a, l, p, m, b, S, g) => (X(o) ? n = "" : X(s) ? n = `>=${o}.0.0` : X(c) ? n = `>=${o}.${s}.0` : n = `>=${n}`, X(m) ? p = "" : X(b) ? p = `<${Number(m) + 1}.0.0-0` : X(S) ? p = `<${m}.${Number(b) + 1}.0-0` : g ? p = `<=${m}.${b}.${S}-${g}` : p = `<=${p}`, `${n} ${p}`.trim()));
774
+ function $t(n) {
775
+ return n.replace(ie(ht), (e, r, o, i, c, a, l, p, m, b, S, g) => (X(o) ? r = "" : X(i) ? r = `>=${o}.0.0` : X(c) ? r = `>=${o}.${i}.0` : r = `>=${r}`, X(m) ? p = "" : X(b) ? p = `<${Number(m) + 1}.0.0-0` : X(S) ? p = `<${m}.${Number(b) + 1}.0-0` : g ? p = `<=${m}.${b}.${S}-${g}` : p = `<=${p}`, `${r} ${p}`.trim()));
776
776
  }
777
- function Tt(r) {
778
- return r.replace(ie(mt), "$1$2$3");
777
+ function Tt(n) {
778
+ return n.replace(ie(mt), "$1$2$3");
779
779
  }
780
- function Ot(r) {
781
- return r.replace(ie(_t), "$1~");
780
+ function Ot(n) {
781
+ return n.replace(ie(_t), "$1~");
782
782
  }
783
- function vt(r) {
784
- return r.replace(ie(Et), "$1^");
783
+ function vt(n) {
784
+ return n.replace(ie(Et), "$1^");
785
785
  }
786
- function Mt(r) {
787
- return r.trim().split(/\s+/).map((e) => e.replace(ie(gt), (n, o, s, c, a) => X(o) ? "" : X(s) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : X(c) ? o === "0" ? `>=${o}.${s}.0 <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.0 <${Number(o) + 1}.0.0-0` : a ? o === "0" ? s === "0" ? `>=${o}.${s}.${c}-${a} <${o}.${s}.${Number(c) + 1}-0` : `>=${o}.${s}.${c}-${a} <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.${c}-${a} <${Number(o) + 1}.0.0-0` : o === "0" ? s === "0" ? `>=${o}.${s}.${c} <${o}.${s}.${Number(c) + 1}-0` : `>=${o}.${s}.${c} <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.${c} <${Number(o) + 1}.0.0-0`)).join(" ");
786
+ function Mt(n) {
787
+ return n.trim().split(/\s+/).map((e) => e.replace(ie(gt), (r, o, i, c, a) => X(o) ? "" : X(i) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : X(c) ? o === "0" ? `>=${o}.${i}.0 <${o}.${Number(i) + 1}.0-0` : `>=${o}.${i}.0 <${Number(o) + 1}.0.0-0` : a ? o === "0" ? i === "0" ? `>=${o}.${i}.${c}-${a} <${o}.${i}.${Number(c) + 1}-0` : `>=${o}.${i}.${c}-${a} <${o}.${Number(i) + 1}.0-0` : `>=${o}.${i}.${c}-${a} <${Number(o) + 1}.0.0-0` : o === "0" ? i === "0" ? `>=${o}.${i}.${c} <${o}.${i}.${Number(c) + 1}-0` : `>=${o}.${i}.${c} <${o}.${Number(i) + 1}.0-0` : `>=${o}.${i}.${c} <${Number(o) + 1}.0.0-0`)).join(" ");
788
788
  }
789
- function Pt(r) {
790
- return r.trim().split(/\s+/).map((e) => e.replace(ie(St), (n, o, s, c, a) => X(o) ? "" : X(s) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : X(c) ? `>=${o}.${s}.0 <${o}.${Number(s) + 1}.0-0` : a ? `>=${o}.${s}.${c}-${a} <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.${c} <${o}.${Number(s) + 1}.0-0`)).join(" ");
789
+ function Pt(n) {
790
+ return n.trim().split(/\s+/).map((e) => e.replace(ie(St), (r, o, i, c, a) => X(o) ? "" : X(i) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : X(c) ? `>=${o}.${i}.0 <${o}.${Number(i) + 1}.0-0` : a ? `>=${o}.${i}.${c}-${a} <${o}.${Number(i) + 1}.0-0` : `>=${o}.${i}.${c} <${o}.${Number(i) + 1}.0-0`)).join(" ");
791
791
  }
792
- function wt(r) {
793
- return r.split(/\s+/).map((e) => e.trim().replace(ie(Rt), (n, o, s, c, a, l) => {
794
- const p = X(s), m = p || X(c), b = m || X(a);
795
- return o === "=" && b && (o = ""), l = "", p ? o === ">" || o === "<" ? "<0.0.0-0" : "*" : o && b ? (m && (c = 0), a = 0, o === ">" ? (o = ">=", m ? (s = Number(s) + 1, c = 0, a = 0) : (c = Number(c) + 1, a = 0)) : o === "<=" && (o = "<", m ? s = Number(s) + 1 : c = Number(c) + 1), o === "<" && (l = "-0"), `${o + s}.${c}.${a}${l}`) : m ? `>=${s}.0.0${l} <${Number(s) + 1}.0.0-0` : b ? `>=${s}.${c}.0${l} <${s}.${Number(c) + 1}.0-0` : n;
792
+ function wt(n) {
793
+ return n.split(/\s+/).map((e) => e.trim().replace(ie(Rt), (r, o, i, c, a, l) => {
794
+ const p = X(i), m = p || X(c), b = m || X(a);
795
+ return o === "=" && b && (o = ""), l = "", p ? o === ">" || o === "<" ? "<0.0.0-0" : "*" : o && b ? (m && (c = 0), a = 0, o === ">" ? (o = ">=", m ? (i = Number(i) + 1, c = 0, a = 0) : (c = Number(c) + 1, a = 0)) : o === "<=" && (o = "<", m ? i = Number(i) + 1 : c = Number(c) + 1), o === "<" && (l = "-0"), `${o + i}.${c}.${a}${l}`) : m ? `>=${i}.0.0${l} <${Number(i) + 1}.0.0-0` : b ? `>=${i}.${c}.0${l} <${i}.${Number(c) + 1}.0-0` : r;
796
796
  })).join(" ");
797
797
  }
798
- function xt(r) {
799
- return r.trim().replace(ie(yt), "");
798
+ function xt(n) {
799
+ return n.trim().replace(ie(yt), "");
800
800
  }
801
- function jt(r) {
802
- return r.trim().replace(ie(It), "");
801
+ function jt(n) {
802
+ return n.trim().replace(ie(It), "");
803
803
  }
804
- function Oe(r, e) {
805
- return r = Number(r) || r, e = Number(e) || e, r > e ? 1 : r === e ? 0 : -1;
804
+ function Oe(n, e) {
805
+ return n = Number(n) || n, e = Number(e) || e, n > e ? 1 : n === e ? 0 : -1;
806
806
  }
807
- function At(r, e) {
808
- const { preRelease: n } = r, { preRelease: o } = e;
809
- if (n === void 0 && o)
807
+ function At(n, e) {
808
+ const { preRelease: r } = n, { preRelease: o } = e;
809
+ if (r === void 0 && o)
810
810
  return 1;
811
- if (n && o === void 0)
811
+ if (r && o === void 0)
812
812
  return -1;
813
- if (n === void 0 && o === void 0)
813
+ if (r === void 0 && o === void 0)
814
814
  return 0;
815
- for (let s = 0, c = n.length; s <= c; s++) {
816
- const a = n[s], l = o[s];
815
+ for (let i = 0, c = r.length; i <= c; i++) {
816
+ const a = r[i], l = o[i];
817
817
  if (a !== l)
818
818
  return a === void 0 && l === void 0 ? 0 : a ? l ? Oe(a, l) : -1 : 1;
819
819
  }
820
820
  return 0;
821
821
  }
822
- function ve(r, e) {
823
- return Oe(r.major, e.major) || Oe(r.minor, e.minor) || Oe(r.patch, e.patch) || At(r, e);
822
+ function ve(n, e) {
823
+ return Oe(n.major, e.major) || Oe(n.minor, e.minor) || Oe(n.patch, e.patch) || At(n, e);
824
824
  }
825
- function xe(r, e) {
826
- return r.version === e.version;
825
+ function xe(n, e) {
826
+ return n.version === e.version;
827
827
  }
828
- function Dt(r, e) {
829
- switch (r.operator) {
828
+ function Dt(n, e) {
829
+ switch (n.operator) {
830
830
  case "":
831
831
  case "=":
832
- return xe(r, e);
832
+ return xe(n, e);
833
833
  case ">":
834
- return ve(r, e) < 0;
834
+ return ve(n, e) < 0;
835
835
  case ">=":
836
- return xe(r, e) || ve(r, e) < 0;
836
+ return xe(n, e) || ve(n, e) < 0;
837
837
  case "<":
838
- return ve(r, e) > 0;
838
+ return ve(n, e) > 0;
839
839
  case "<=":
840
- return xe(r, e) || ve(r, e) > 0;
840
+ return xe(n, e) || ve(n, e) > 0;
841
841
  case void 0:
842
842
  return !0;
843
843
  default:
844
844
  return !1;
845
845
  }
846
846
  }
847
- function Lt(r) {
847
+ function Lt(n) {
848
848
  return et(
849
849
  // handle caret
850
850
  // ^ --> * (any, kinda silly)
@@ -864,9 +864,9 @@ function requireIndex_cjs$1() {
864
864
  Pt,
865
865
  wt,
866
866
  xt
867
- )(r);
867
+ )(n);
868
868
  }
869
- function Ft(r) {
869
+ function Ft(n) {
870
870
  return et(
871
871
  // handle hyphenRange
872
872
  // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
@@ -880,19 +880,19 @@ function requireIndex_cjs$1() {
880
880
  // handle trim caret
881
881
  // `^ 1.2.3` => `^1.2.3`
882
882
  vt
883
- )(r.trim()).split(/\s+/).join(" ");
883
+ )(n.trim()).split(/\s+/).join(" ");
884
884
  }
885
- function ge(r, e) {
886
- if (!r)
887
- return !1;
888
- const n = tt(r);
885
+ function ge(n, e) {
889
886
  if (!n)
890
887
  return !1;
891
- const [, o, , s, c, a, l] = n, p = {
888
+ const r = tt(n);
889
+ if (!r)
890
+ return !1;
891
+ const [, o, , i, c, a, l] = r, p = {
892
892
  operator: o,
893
- version: rt(s, c, a, l),
893
+ version: nt(i, c, a, l),
894
894
  // exclude build atom
895
- major: s,
895
+ major: i,
896
896
  minor: c,
897
897
  patch: a,
898
898
  preRelease: l?.split(".")
@@ -920,7 +920,7 @@ function requireIndex_cjs$1() {
920
920
  }
921
921
  const [, G, , L, q, Y, ue] = A, W = {
922
922
  operator: G,
923
- version: rt(L, q, Y, ue),
923
+ version: nt(L, q, Y, ue),
924
924
  major: L,
925
925
  minor: q,
926
926
  patch: Y,
@@ -940,47 +940,47 @@ function requireIndex_cjs$1() {
940
940
  }
941
941
  return !1;
942
942
  }
943
- function kt(r, e, n, o) {
944
- let s;
945
- return "get" in r ? s = r.get : "lib" in r ? s = () => Promise.resolve(r.lib) : s = () => Promise.resolve(() => {
946
- throw new Error(`Can not get shared '${n}'!`);
943
+ function Ct(n, e, r, o) {
944
+ let i;
945
+ return "get" in n ? i = n.get : "lib" in n ? i = () => Promise.resolve(n.lib) : i = () => Promise.resolve(() => {
946
+ throw new Error(`Can not get shared '${r}'!`);
947
947
  }), {
948
948
  deps: [],
949
949
  useIn: [],
950
950
  from: e,
951
951
  loading: null,
952
- ...r,
952
+ ...n,
953
953
  shareConfig: {
954
- requiredVersion: `^${r.version}`,
954
+ requiredVersion: `^${n.version}`,
955
955
  singleton: !1,
956
956
  eager: !1,
957
957
  strictVersion: !1,
958
- ...r.shareConfig
958
+ ...n.shareConfig
959
959
  },
960
- get: s,
961
- loaded: r?.loaded || "lib" in r ? !0 : void 0,
962
- version: r.version ?? "0",
963
- scope: Array.isArray(r.scope) ? r.scope : [r.scope ?? "default"],
964
- strategy: (r.strategy ?? o) || "version-first"
960
+ get: i,
961
+ loaded: n?.loaded || "lib" in n ? !0 : void 0,
962
+ version: n.version ?? "0",
963
+ scope: Array.isArray(n.scope) ? n.scope : [n.scope ?? "default"],
964
+ strategy: (n.strategy ?? o) || "version-first"
965
965
  };
966
966
  }
967
- function nt(r, e) {
968
- const n = e.shared || {}, o = e.name, s = Object.keys(n).reduce((a, l) => {
969
- const p = Q(n[l]);
967
+ function rt(n, e) {
968
+ const r = e.shared || {}, o = e.name, i = Object.keys(r).reduce((a, l) => {
969
+ const p = Q(r[l]);
970
970
  return a[l] = a[l] || [], p.forEach((m) => {
971
- a[l].push(kt(m, o, l, e.shareStrategy));
971
+ a[l].push(Ct(m, o, l, e.shareStrategy));
972
972
  }), a;
973
973
  }, {}), c = {
974
- ...r.shared
974
+ ...n.shared
975
975
  };
976
- return Object.keys(s).forEach((a) => {
977
- c[a] ? s[a].forEach((l) => {
976
+ return Object.keys(i).forEach((a) => {
977
+ c[a] ? i[a].forEach((l) => {
978
978
  c[a].find((m) => m.version === l.version) || c[a].push(l);
979
- }) : c[a] = s[a];
980
- }), { shared: c, shareInfos: s };
979
+ }) : c[a] = i[a];
980
+ }), { shared: c, shareInfos: i };
981
981
  }
982
- function be(r, e) {
983
- const n = (o) => {
982
+ function be(n, e) {
983
+ const r = (o) => {
984
984
  if (!Number.isNaN(Number(o))) {
985
985
  const c = o.split(".");
986
986
  let a = o;
@@ -990,52 +990,52 @@ function requireIndex_cjs$1() {
990
990
  }
991
991
  return o;
992
992
  };
993
- return !!ge(n(r), `<=${n(e)}`);
993
+ return !!ge(r(n), `<=${r(e)}`);
994
994
  }
995
- const je = (r, e) => {
996
- const n = e || function(o, s) {
997
- return be(o, s);
995
+ const je = (n, e) => {
996
+ const r = e || function(o, i) {
997
+ return be(o, i);
998
998
  };
999
- return Object.keys(r).reduce((o, s) => !o || n(o, s) || o === "0" ? s : o, 0);
1000
- }, Ae = (r) => !!r.loaded || typeof r.lib == "function", Ct = (r) => !!r.loading;
1001
- function Ht(r, e, n) {
1002
- const o = r[e][n], s = function(c, a) {
999
+ return Object.keys(n).reduce((o, i) => !o || r(o, i) || o === "0" ? i : o, 0);
1000
+ }, Ae = (n) => !!n.loaded || typeof n.lib == "function", kt = (n) => !!n.loading;
1001
+ function Ht(n, e, r) {
1002
+ const o = n[e][r], i = function(c, a) {
1003
1003
  return !Ae(o[c]) && be(c, a);
1004
1004
  };
1005
- return je(r[e][n], s);
1005
+ return je(n[e][r], i);
1006
1006
  }
1007
- function Ut(r, e, n) {
1008
- const o = r[e][n], s = function(c, a) {
1009
- const l = (p) => Ae(p) || Ct(p);
1007
+ function Ut(n, e, r) {
1008
+ const o = n[e][r], i = function(c, a) {
1009
+ const l = (p) => Ae(p) || kt(p);
1010
1010
  return l(o[a]) ? l(o[c]) ? !!be(c, a) : !0 : l(o[c]) ? !1 : be(c, a);
1011
1011
  };
1012
- return je(r[e][n], s);
1012
+ return je(n[e][r], i);
1013
1013
  }
1014
- function Gt(r) {
1015
- return r === "loaded-first" ? Ut : Ht;
1014
+ function Gt(n) {
1015
+ return n === "loaded-first" ? Ut : Ht;
1016
1016
  }
1017
- function me(r, e, n, o) {
1018
- if (!r)
1017
+ function me(n, e, r, o) {
1018
+ if (!n)
1019
1019
  return;
1020
- const { shareConfig: s, scope: c = Ee, strategy: a } = n, l = Array.isArray(c) ? c : [c];
1020
+ const { shareConfig: i, scope: c = Ee, strategy: a } = r, l = Array.isArray(c) ? c : [c];
1021
1021
  for (const p of l)
1022
- if (s && r[p] && r[p][e]) {
1023
- const { requiredVersion: m } = s, S = Gt(a)(r, p, e), g = () => {
1024
- if (s.singleton) {
1022
+ if (i && n[p] && n[p][e]) {
1023
+ const { requiredVersion: m } = i, S = Gt(a)(n, p, e), g = () => {
1024
+ if (i.singleton) {
1025
1025
  if (typeof m == "string" && !ge(S, m)) {
1026
- const j = `Version ${S} from ${S && r[p][e][S].from} of shared singleton module ${e} does not satisfy the requirement of ${n.from} which needs ${m})`;
1027
- s.strictVersion ? E(j) : _(j);
1026
+ const j = `Version ${S} from ${S && n[p][e][S].from} of shared singleton module ${e} does not satisfy the requirement of ${r.from} which needs ${m})`;
1027
+ i.strictVersion ? E(j) : _(j);
1028
1028
  }
1029
- return r[p][e][S];
1029
+ return n[p][e][S];
1030
1030
  } else {
1031
1031
  if (m === !1 || m === "*" || ge(S, m))
1032
- return r[p][e][S];
1033
- for (const [j, T] of Object.entries(r[p][e]))
1032
+ return n[p][e][S];
1033
+ for (const [j, T] of Object.entries(n[p][e]))
1034
1034
  if (ge(j, m))
1035
1035
  return T;
1036
1036
  }
1037
1037
  }, O = {
1038
- shareScopeMap: r,
1038
+ shareScopeMap: n,
1039
1039
  scope: p,
1040
1040
  pkgName: e,
1041
1041
  version: S,
@@ -1048,8 +1048,8 @@ function requireIndex_cjs$1() {
1048
1048
  function De() {
1049
1049
  return V.__FEDERATION__.__SHARE__;
1050
1050
  }
1051
- function ot(r) {
1052
- const { pkgName: e, extraOptions: n, shareInfos: o } = r, s = (a) => {
1051
+ function ot(n) {
1052
+ const { pkgName: e, extraOptions: r, shareInfos: o } = n, i = (a) => {
1053
1053
  if (!a)
1054
1054
  return;
1055
1055
  const l = {};
@@ -1060,8 +1060,8 @@ function requireIndex_cjs$1() {
1060
1060
  return !Ae(l[b]) && be(b, S);
1061
1061
  });
1062
1062
  return l[m];
1063
- }, c = n?.resolver ?? s;
1064
- return Object.assign({}, c(o[e]), n?.customShareInfo);
1063
+ }, c = r?.resolver ?? i;
1064
+ return Object.assign({}, c(o[e]), r?.customShareInfo);
1065
1065
  }
1066
1066
  function Vt() {
1067
1067
  return typeof FEDERATION_BUILD_IDENTIFIER < "u" ? (
@@ -1069,51 +1069,51 @@ function requireIndex_cjs$1() {
1069
1069
  FEDERATION_BUILD_IDENTIFIER
1070
1070
  ) : "";
1071
1071
  }
1072
- function Le(r, e) {
1073
- for (const n of r) {
1074
- const o = e.startsWith(n.name);
1075
- let s = e.replace(n.name, "");
1072
+ function Le(n, e) {
1073
+ for (const r of n) {
1074
+ const o = e.startsWith(r.name);
1075
+ let i = e.replace(r.name, "");
1076
1076
  if (o) {
1077
- if (s.startsWith("/")) {
1078
- const l = n.name;
1079
- return s = `.${s}`, {
1077
+ if (i.startsWith("/")) {
1078
+ const l = r.name;
1079
+ return i = `.${i}`, {
1080
1080
  pkgNameOrAlias: l,
1081
- expose: s,
1082
- remote: n
1081
+ expose: i,
1082
+ remote: r
1083
1083
  };
1084
- } else if (s === "")
1084
+ } else if (i === "")
1085
1085
  return {
1086
- pkgNameOrAlias: n.name,
1086
+ pkgNameOrAlias: r.name,
1087
1087
  expose: ".",
1088
- remote: n
1088
+ remote: r
1089
1089
  };
1090
1090
  }
1091
- const c = n.alias && e.startsWith(n.alias);
1092
- let a = n.alias && e.replace(n.alias, "");
1093
- if (n.alias && c) {
1091
+ const c = r.alias && e.startsWith(r.alias);
1092
+ let a = r.alias && e.replace(r.alias, "");
1093
+ if (r.alias && c) {
1094
1094
  if (a && a.startsWith("/")) {
1095
- const l = n.alias;
1095
+ const l = r.alias;
1096
1096
  return a = `.${a}`, {
1097
1097
  pkgNameOrAlias: l,
1098
1098
  expose: a,
1099
- remote: n
1099
+ remote: r
1100
1100
  };
1101
1101
  } else if (a === "")
1102
1102
  return {
1103
- pkgNameOrAlias: n.alias,
1103
+ pkgNameOrAlias: r.alias,
1104
1104
  expose: ".",
1105
- remote: n
1105
+ remote: r
1106
1106
  };
1107
1107
  }
1108
1108
  }
1109
1109
  }
1110
- function Bt(r, e) {
1111
- for (const n of r)
1112
- if (e === n.name || n.alias && e === n.alias)
1113
- return n;
1110
+ function Bt(n, e) {
1111
+ for (const r of n)
1112
+ if (e === r.name || r.alias && e === r.alias)
1113
+ return r;
1114
1114
  }
1115
- function qt(r, e) {
1116
- const n = Ve(), o = [
1115
+ function qt(n, e) {
1116
+ const r = Ve(), o = [
1117
1117
  e.hooks,
1118
1118
  e.remoteHandler.hooks,
1119
1119
  e.sharedHandler.hooks,
@@ -1121,53 +1121,53 @@ function requireIndex_cjs$1() {
1121
1121
  e.loaderHook,
1122
1122
  e.bridgeHook
1123
1123
  ];
1124
- return n.length > 0 && n.forEach((s) => {
1125
- r?.find((c) => c.name !== s.name) && r.push(s);
1126
- }), r && r.length > 0 && r.forEach((s) => {
1124
+ return r.length > 0 && r.forEach((i) => {
1125
+ n?.find((c) => c.name !== i.name) && n.push(i);
1126
+ }), n && n.length > 0 && n.forEach((i) => {
1127
1127
  o.forEach((c) => {
1128
- c.applyPlugin(s, e);
1128
+ c.applyPlugin(i, e);
1129
1129
  });
1130
- }), r;
1130
+ }), n;
1131
1131
  }
1132
1132
  const st = ".then(callbacks[0]).catch(callbacks[1])";
1133
- async function Wt({ entry: r, remoteEntryExports: e }) {
1134
- return new Promise((n, o) => {
1133
+ async function Wt({ entry: n, remoteEntryExports: e }) {
1134
+ return new Promise((r, o) => {
1135
1135
  try {
1136
- e ? n(e) : typeof FEDERATION_ALLOW_NEW_FUNCTION < "u" ? new Function("callbacks", `import("${r}")${st}`)([
1137
- n,
1136
+ e ? r(e) : typeof FEDERATION_ALLOW_NEW_FUNCTION < "u" ? new Function("callbacks", `import("${n}")${st}`)([
1137
+ r,
1138
1138
  o
1139
1139
  ]) : import(
1140
1140
  /* webpackIgnore: true */
1141
1141
  /* @vite-ignore */
1142
- r
1143
- ).then(n).catch(o);
1144
- } catch (s) {
1145
- o(s);
1142
+ n
1143
+ ).then(r).catch(o);
1144
+ } catch (i) {
1145
+ o(i);
1146
1146
  }
1147
1147
  });
1148
1148
  }
1149
- async function Kt({ entry: r, remoteEntryExports: e }) {
1150
- return new Promise((n, o) => {
1149
+ async function zt({ entry: n, remoteEntryExports: e }) {
1150
+ return new Promise((r, o) => {
1151
1151
  try {
1152
- e ? n(e) : typeof __system_context__ > "u" ? System.import(r).then(n).catch(o) : new Function("callbacks", `System.import("${r}")${st}`)([n, o]);
1153
- } catch (s) {
1154
- o(s);
1152
+ e ? r(e) : typeof __system_context__ > "u" ? System.import(n).then(r).catch(o) : new Function("callbacks", `System.import("${n}")${st}`)([r, o]);
1153
+ } catch (i) {
1154
+ o(i);
1155
1155
  }
1156
1156
  });
1157
1157
  }
1158
- function it(r, e, n) {
1159
- const { remoteEntryKey: o, entryExports: s } = $e(r, e);
1160
- return d(s, i.getShortErrorMsg(i.RUNTIME_001, i.runtimeDescMap, {
1161
- remoteName: r,
1162
- remoteEntryUrl: n,
1158
+ function it(n, e, r) {
1159
+ const { remoteEntryKey: o, entryExports: i } = $e(n, e);
1160
+ return h(i, s.getShortErrorMsg(s.RUNTIME_001, s.runtimeDescMap, {
1161
+ remoteName: n,
1162
+ remoteEntryUrl: r,
1163
1163
  remoteEntryKey: o
1164
- })), s;
1164
+ })), i;
1165
1165
  }
1166
- async function zt({ name: r, globalName: e, entry: n, loaderHook: o, getEntryUrl: s }) {
1167
- const { entryExports: c } = $e(r, e);
1166
+ async function Kt({ name: n, globalName: e, entry: r, loaderHook: o, getEntryUrl: i }) {
1167
+ const { entryExports: c } = $e(n, e);
1168
1168
  if (c)
1169
1169
  return c;
1170
- const a = s ? s(n) : n;
1170
+ const a = i ? i(r) : r;
1171
1171
  return t.loadScript(a, {
1172
1172
  attrs: {},
1173
1173
  createScriptHook: (l, p) => {
@@ -1175,35 +1175,35 @@ function requireIndex_cjs$1() {
1175
1175
  if (m && (m instanceof HTMLScriptElement || "script" in m || "timeout" in m))
1176
1176
  return m;
1177
1177
  }
1178
- }).then(() => it(r, e, n)).catch((l) => {
1179
- throw d(void 0, i.getShortErrorMsg(i.RUNTIME_008, i.runtimeDescMap, {
1180
- remoteName: r,
1181
- resourceUrl: n
1178
+ }).then(() => it(n, e, r)).catch((l) => {
1179
+ throw h(void 0, s.getShortErrorMsg(s.RUNTIME_008, s.runtimeDescMap, {
1180
+ remoteName: n,
1181
+ resourceUrl: r
1182
1182
  })), l;
1183
1183
  });
1184
1184
  }
1185
- async function Xt({ remoteInfo: r, remoteEntryExports: e, loaderHook: n, getEntryUrl: o }) {
1186
- const { entry: s, entryGlobalName: c, name: a, type: l } = r;
1185
+ async function Xt({ remoteInfo: n, remoteEntryExports: e, loaderHook: r, getEntryUrl: o }) {
1186
+ const { entry: i, entryGlobalName: c, name: a, type: l } = n;
1187
1187
  switch (l) {
1188
1188
  case "esm":
1189
1189
  case "module":
1190
- return Wt({ entry: s, remoteEntryExports: e });
1190
+ return Wt({ entry: i, remoteEntryExports: e });
1191
1191
  case "system":
1192
- return Kt({ entry: s, remoteEntryExports: e });
1192
+ return zt({ entry: i, remoteEntryExports: e });
1193
1193
  default:
1194
- return zt({
1195
- entry: s,
1194
+ return Kt({
1195
+ entry: i,
1196
1196
  globalName: c,
1197
1197
  name: a,
1198
- loaderHook: n,
1198
+ loaderHook: r,
1199
1199
  getEntryUrl: o
1200
1200
  });
1201
1201
  }
1202
1202
  }
1203
- async function Yt({ remoteInfo: r, loaderHook: e }) {
1204
- const { entry: n, entryGlobalName: o, name: s, type: c } = r, { entryExports: a } = $e(s, o);
1205
- return a || t.loadScriptNode(n, {
1206
- attrs: { name: s, globalName: o, type: c },
1203
+ async function Yt({ remoteInfo: n, loaderHook: e }) {
1204
+ const { entry: r, entryGlobalName: o, name: i, type: c } = n, { entryExports: a } = $e(i, o);
1205
+ return a || t.loadScriptNode(r, {
1206
+ attrs: { name: i, globalName: o, type: c },
1207
1207
  loaderHook: {
1208
1208
  createScriptHook: (l, p = {}) => {
1209
1209
  const m = e.lifecycle.createScript.emit({ url: l, attrs: p });
@@ -1211,37 +1211,37 @@ function requireIndex_cjs$1() {
1211
1211
  return m;
1212
1212
  }
1213
1213
  }
1214
- }).then(() => it(s, o, n)).catch((l) => {
1214
+ }).then(() => it(i, o, r)).catch((l) => {
1215
1215
  throw l;
1216
1216
  });
1217
1217
  }
1218
- function Fe(r) {
1219
- const { entry: e, name: n } = r;
1220
- return t.composeKeyWithSeparator(n, e);
1218
+ function Fe(n) {
1219
+ const { entry: e, name: r } = n;
1220
+ return t.composeKeyWithSeparator(r, e);
1221
1221
  }
1222
- async function Se(r) {
1223
- const { origin: e, remoteEntryExports: n, remoteInfo: o, getEntryUrl: s, _inErrorHandling: c = !1 } = r, a = Fe(o);
1224
- if (n)
1225
- return n;
1222
+ async function Se(n) {
1223
+ const { origin: e, remoteEntryExports: r, remoteInfo: o, getEntryUrl: i, _inErrorHandling: c = !1 } = n, a = Fe(o);
1224
+ if (r)
1225
+ return r;
1226
1226
  if (!ce[a]) {
1227
1227
  const l = e.remoteHandler.hooks.lifecycle.loadEntry, p = e.loaderHook;
1228
1228
  ce[a] = l.emit({
1229
1229
  loaderHook: p,
1230
1230
  remoteInfo: o,
1231
- remoteEntryExports: n
1231
+ remoteEntryExports: r
1232
1232
  }).then((m) => m || ((typeof ENV_TARGET < "u" ? ENV_TARGET === "web" : t.isBrowserEnv()) ? Xt({
1233
1233
  remoteInfo: o,
1234
- remoteEntryExports: n,
1234
+ remoteEntryExports: r,
1235
1235
  loaderHook: p,
1236
- getEntryUrl: s
1236
+ getEntryUrl: i
1237
1237
  }) : Yt({ remoteInfo: o, loaderHook: p }))).catch(async (m) => {
1238
1238
  const b = Fe(o);
1239
- if (m instanceof Error && m.message.includes(i.RUNTIME_008) && !c) {
1239
+ if (m instanceof Error && m.message.includes(s.RUNTIME_008) && !c) {
1240
1240
  const g = (M) => Se({ ...M, _inErrorHandling: !0 }), O = await e.loaderHook.lifecycle.loadEntryError.emit({
1241
1241
  getRemoteEntry: g,
1242
1242
  origin: e,
1243
1243
  remoteInfo: o,
1244
- remoteEntryExports: n,
1244
+ remoteEntryExports: r,
1245
1245
  globalLoading: ce,
1246
1246
  uniqueKey: b
1247
1247
  });
@@ -1253,44 +1253,44 @@ function requireIndex_cjs$1() {
1253
1253
  }
1254
1254
  return ce[a];
1255
1255
  }
1256
- function Re(r) {
1256
+ function Re(n) {
1257
1257
  return {
1258
- ...r,
1259
- entry: "entry" in r ? r.entry : "",
1260
- type: r.type || We,
1261
- entryGlobalName: r.entryGlobalName || r.name,
1262
- shareScope: r.shareScope || Ee
1258
+ ...n,
1259
+ entry: "entry" in n ? n.entry : "",
1260
+ type: n.type || We,
1261
+ entryGlobalName: n.entryGlobalName || n.name,
1262
+ shareScope: n.shareScope || Ee
1263
1263
  };
1264
1264
  }
1265
- function at(r) {
1265
+ function at(n) {
1266
1266
  return {
1267
1267
  resourceCategory: "sync",
1268
1268
  share: !0,
1269
1269
  depsRemote: !0,
1270
1270
  prefetchInterface: !1,
1271
- ...r
1271
+ ...n
1272
1272
  };
1273
1273
  }
1274
- function Jt(r, e) {
1275
- return e.map((n) => {
1276
- const o = Bt(r, n.nameOrAlias);
1277
- return d(o, `Unable to preload ${n.nameOrAlias} as it is not included in ${!o && t.safeToString({
1274
+ function Jt(n, e) {
1275
+ return e.map((r) => {
1276
+ const o = Bt(n, r.nameOrAlias);
1277
+ return h(o, `Unable to preload ${r.nameOrAlias} as it is not included in ${!o && t.safeToString({
1278
1278
  remoteInfo: o,
1279
- remotes: r
1279
+ remotes: n
1280
1280
  })}`), {
1281
1281
  remote: o,
1282
- preloadConfig: at(n)
1282
+ preloadConfig: at(r)
1283
1283
  };
1284
1284
  });
1285
1285
  }
1286
- function Zt(r) {
1287
- return r ? r.map((e) => e === "." ? e : e.startsWith("./") ? e.replace("./", "") : e) : [];
1286
+ function Zt(n) {
1287
+ return n ? n.map((e) => e === "." ? e : e.startsWith("./") ? e.replace("./", "") : e) : [];
1288
1288
  }
1289
- function ke(r, e, n, o = !0) {
1290
- const { cssAssets: s, jsAssetsWithoutEntry: c, entryAssets: a } = n;
1289
+ function Ce(n, e, r, o = !0) {
1290
+ const { cssAssets: i, jsAssetsWithoutEntry: c, entryAssets: a } = r;
1291
1291
  if (e.options.inBrowser) {
1292
1292
  if (a.forEach((l) => {
1293
- const { moduleInfo: p } = l, m = e.moduleCache.get(r.name);
1293
+ const { moduleInfo: p } = l, m = e.moduleCache.get(n.name);
1294
1294
  Se(m ? {
1295
1295
  origin: e,
1296
1296
  remoteInfo: p,
@@ -1305,7 +1305,7 @@ function requireIndex_cjs$1() {
1305
1305
  rel: "preload",
1306
1306
  as: "style"
1307
1307
  };
1308
- s.forEach((p) => {
1308
+ i.forEach((p) => {
1309
1309
  const { link: m, needAttach: b } = t.createLink({
1310
1310
  url: p,
1311
1311
  cb: () => {
@@ -1327,7 +1327,7 @@ function requireIndex_cjs$1() {
1327
1327
  rel: "stylesheet",
1328
1328
  type: "text/css"
1329
1329
  };
1330
- s.forEach((p) => {
1330
+ i.forEach((p) => {
1331
1331
  const { link: m, needAttach: b } = t.createLink({
1332
1332
  url: p,
1333
1333
  cb: () => {
@@ -1371,7 +1371,7 @@ function requireIndex_cjs$1() {
1371
1371
  } else {
1372
1372
  const l = {
1373
1373
  fetchpriority: "high",
1374
- type: r?.type === "module" ? "module" : "text/javascript"
1374
+ type: n?.type === "module" ? "module" : "text/javascript"
1375
1375
  };
1376
1376
  c.forEach((p) => {
1377
1377
  const { script: m, needAttach: b } = t.createScript({
@@ -1400,14 +1400,14 @@ function requireIndex_cjs$1() {
1400
1400
  nativeGlobal: F,
1401
1401
  resetFederationGlobalInfo: I,
1402
1402
  setGlobalFederationInstance: N,
1403
- getGlobalFederationConstructor: k,
1404
- setGlobalFederationConstructor: z,
1403
+ getGlobalFederationConstructor: C,
1404
+ setGlobalFederationConstructor: K,
1405
1405
  getInfoWithoutType: Z,
1406
1406
  getGlobalSnapshot: fe,
1407
1407
  getTargetSnapshotInfoByModuleInfo: Ie,
1408
1408
  getGlobalSnapshotInfoByModuleInfo: he,
1409
1409
  setGlobalSnapshotInfoByModuleInfo: le,
1410
- addGlobalSnapshot: K,
1410
+ addGlobalSnapshot: z,
1411
1411
  getRemoteEntryExports: $e,
1412
1412
  registerGlobalPlugins: Ge,
1413
1413
  getGlobalHostPlugins: Ve,
@@ -1420,13 +1420,13 @@ function requireIndex_cjs$1() {
1420
1420
  },
1421
1421
  utils: {
1422
1422
  matchRemoteWithNameAndExpose: Le,
1423
- preloadAssets: ke,
1423
+ preloadAssets: Ce,
1424
1424
  getRemoteInfo: Re
1425
1425
  }
1426
1426
  };
1427
- class Ce {
1428
- constructor({ remoteInfo: e, host: n }) {
1429
- this.inited = !1, this.lib = void 0, this.remoteInfo = e, this.host = n;
1427
+ class ke {
1428
+ constructor({ remoteInfo: e, host: r }) {
1429
+ this.inited = !1, this.lib = void 0, this.remoteInfo = e, this.host = r;
1430
1430
  }
1431
1431
  async getEntry() {
1432
1432
  if (this.remoteEntryExports)
@@ -1436,11 +1436,11 @@ function requireIndex_cjs$1() {
1436
1436
  origin: this.host,
1437
1437
  remoteInfo: this.remoteInfo,
1438
1438
  remoteEntryExports: this.remoteEntryExports
1439
- }), d(e, `remoteEntryExports is undefined
1439
+ }), h(e, `remoteEntryExports is undefined
1440
1440
  ${t.safeToString(this.remoteInfo)}`), this.remoteEntryExports = e, this.remoteEntryExports;
1441
1441
  }
1442
1442
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
1443
- async get(e, n, o, s) {
1443
+ async get(e, r, o, i) {
1444
1444
  const { loadFactory: c = !0 } = o || { loadFactory: !0 }, a = await this.getEntry();
1445
1445
  if (!this.inited) {
1446
1446
  const S = this.host.shareScopeMap, g = Array.isArray(this.remoteInfo.shareScope) ? this.remoteInfo.shareScope : [this.remoteInfo.shareScope];
@@ -1464,7 +1464,7 @@ function requireIndex_cjs$1() {
1464
1464
  remoteInfo: this.remoteInfo,
1465
1465
  origin: this.host
1466
1466
  });
1467
- typeof a?.init > "u" && E(i.getShortErrorMsg(i.RUNTIME_002, i.runtimeDescMap, {
1467
+ typeof a?.init > "u" && E(s.getShortErrorMsg(s.RUNTIME_002, s.runtimeDescMap, {
1468
1468
  hostName: this.host.name,
1469
1469
  remoteName: this.remoteInfo.name,
1470
1470
  remoteEntryUrl: this.remoteInfo.entry,
@@ -1472,7 +1472,7 @@ function requireIndex_cjs$1() {
1472
1472
  })), await a.init(T.shareScope, T.initScope, T.remoteEntryInitOptions), await this.host.hooks.lifecycle.initContainer.emit({
1473
1473
  ...T,
1474
1474
  id: e,
1475
- remoteSnapshot: s,
1475
+ remoteSnapshot: i,
1476
1476
  remoteEntryExports: a
1477
1477
  });
1478
1478
  }
@@ -1480,25 +1480,25 @@ function requireIndex_cjs$1() {
1480
1480
  let l;
1481
1481
  l = await this.host.loaderHook.lifecycle.getModuleFactory.emit({
1482
1482
  remoteEntryExports: a,
1483
- expose: n,
1483
+ expose: r,
1484
1484
  moduleInfo: this.remoteInfo
1485
- }), l || (l = await a.get(n)), d(l, `${R(this.remoteInfo)} remote don't export ${n}.`);
1486
- const p = D(this.remoteInfo.name, n), m = this.wraperFactory(l, p);
1485
+ }), l || (l = await a.get(r)), h(l, `${R(this.remoteInfo)} remote don't export ${r}.`);
1486
+ const p = D(this.remoteInfo.name, r), m = this.wraperFactory(l, p);
1487
1487
  return c ? await m() : m;
1488
1488
  }
1489
- wraperFactory(e, n) {
1490
- function o(s, c) {
1491
- s && typeof s == "object" && Object.isExtensible(s) && !Object.getOwnPropertyDescriptor(s, Symbol.for("mf_module_id")) && Object.defineProperty(s, Symbol.for("mf_module_id"), {
1489
+ wraperFactory(e, r) {
1490
+ function o(i, c) {
1491
+ i && typeof i == "object" && Object.isExtensible(i) && !Object.getOwnPropertyDescriptor(i, Symbol.for("mf_module_id")) && Object.defineProperty(i, Symbol.for("mf_module_id"), {
1492
1492
  value: c,
1493
1493
  enumerable: !1
1494
1494
  });
1495
1495
  }
1496
1496
  return e instanceof Promise ? async () => {
1497
- const s = await e();
1498
- return o(s, n), s;
1497
+ const i = await e();
1498
+ return o(i, r), i;
1499
1499
  } : () => {
1500
- const s = e();
1501
- return o(s, n), s;
1500
+ const i = e();
1501
+ return o(i, r), i;
1502
1502
  };
1503
1503
  }
1504
1504
  }
@@ -1510,16 +1510,16 @@ function requireIndex_cjs$1() {
1510
1510
  typeof e == "function" && this.listeners.add(e);
1511
1511
  }
1512
1512
  once(e) {
1513
- const n = this;
1514
- this.on(function o(...s) {
1515
- return n.remove(o), e.apply(null, s);
1513
+ const r = this;
1514
+ this.on(function o(...i) {
1515
+ return r.remove(o), e.apply(null, i);
1516
1516
  });
1517
1517
  }
1518
1518
  emit(...e) {
1519
- let n;
1519
+ let r;
1520
1520
  return this.listeners.size > 0 && this.listeners.forEach((o) => {
1521
- n = o(...e);
1522
- }), n;
1521
+ r = o(...e);
1522
+ }), r;
1523
1523
  }
1524
1524
  remove(e) {
1525
1525
  this.listeners.delete(e);
@@ -1530,22 +1530,22 @@ function requireIndex_cjs$1() {
1530
1530
  }
1531
1531
  class oe extends te {
1532
1532
  emit(...e) {
1533
- let n;
1533
+ let r;
1534
1534
  const o = Array.from(this.listeners);
1535
1535
  if (o.length > 0) {
1536
- let s = 0;
1537
- const c = (a) => a === !1 ? !1 : s < o.length ? Promise.resolve(o[s++].apply(null, e)).then(c) : a;
1538
- n = c();
1536
+ let i = 0;
1537
+ const c = (a) => a === !1 ? !1 : i < o.length ? Promise.resolve(o[i++].apply(null, e)).then(c) : a;
1538
+ r = c();
1539
1539
  }
1540
- return Promise.resolve(n);
1540
+ return Promise.resolve(r);
1541
1541
  }
1542
1542
  }
1543
- function ct(r, e) {
1543
+ function ct(n, e) {
1544
1544
  if (!H(e))
1545
1545
  return !1;
1546
- if (r !== e) {
1547
- for (const n in r)
1548
- if (!(n in e))
1546
+ if (n !== e) {
1547
+ for (const r in n)
1548
+ if (!(r in e))
1549
1549
  return !1;
1550
1550
  }
1551
1551
  return !0;
@@ -1556,9 +1556,9 @@ function requireIndex_cjs$1() {
1556
1556
  }
1557
1557
  emit(e) {
1558
1558
  H(e) || E(`The data for the "${this.type}" hook should be an object.`);
1559
- for (const n of this.listeners)
1559
+ for (const r of this.listeners)
1560
1560
  try {
1561
- const o = n(e);
1561
+ const o = r(e);
1562
1562
  if (ct(e, o))
1563
1563
  e = o;
1564
1564
  else {
@@ -1577,16 +1577,16 @@ function requireIndex_cjs$1() {
1577
1577
  }
1578
1578
  emit(e) {
1579
1579
  H(e) || E(`The response data for the "${this.type}" hook must be an object.`);
1580
- const n = Array.from(this.listeners);
1581
- if (n.length > 0) {
1580
+ const r = Array.from(this.listeners);
1581
+ if (r.length > 0) {
1582
1582
  let o = 0;
1583
- const s = (a) => (_(a), this.onerror(a), e), c = (a) => {
1583
+ const i = (a) => (_(a), this.onerror(a), e), c = (a) => {
1584
1584
  if (ct(e, a)) {
1585
- if (e = a, o < n.length)
1585
+ if (e = a, o < r.length)
1586
1586
  try {
1587
- return Promise.resolve(n[o++](e)).then(c, s);
1587
+ return Promise.resolve(r[o++](e)).then(c, i);
1588
1588
  } catch (l) {
1589
- return s(l);
1589
+ return i(l);
1590
1590
  }
1591
1591
  } else
1592
1592
  this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);
@@ -1601,35 +1601,35 @@ function requireIndex_cjs$1() {
1601
1601
  constructor(e) {
1602
1602
  this.registerPlugins = {}, this.lifecycle = e, this.lifecycleKeys = Object.keys(e);
1603
1603
  }
1604
- applyPlugin(e, n) {
1605
- d(x(e), "Plugin configuration is invalid.");
1604
+ applyPlugin(e, r) {
1605
+ h(x(e), "Plugin configuration is invalid.");
1606
1606
  const o = e.name;
1607
- d(o, "A name must be provided by the plugin."), this.registerPlugins[o] || (this.registerPlugins[o] = e, e.apply?.(n), Object.keys(this.lifecycle).forEach((s) => {
1608
- const c = e[s];
1609
- c && this.lifecycle[s].on(c);
1607
+ h(o, "A name must be provided by the plugin."), this.registerPlugins[o] || (this.registerPlugins[o] = e, e.apply?.(r), Object.keys(this.lifecycle).forEach((i) => {
1608
+ const c = e[i];
1609
+ c && this.lifecycle[i].on(c);
1610
1610
  }));
1611
1611
  }
1612
1612
  removePlugin(e) {
1613
- d(e, "A name is required.");
1614
- const n = this.registerPlugins[e];
1615
- d(n, `The plugin "${e}" is not registered.`), Object.keys(n).forEach((o) => {
1616
- o !== "name" && this.lifecycle[o].remove(n[o]);
1613
+ h(e, "A name is required.");
1614
+ const r = this.registerPlugins[e];
1615
+ h(r, `The plugin "${e}" is not registered.`), Object.keys(r).forEach((o) => {
1616
+ o !== "name" && this.lifecycle[o].remove(r[o]);
1617
1617
  });
1618
1618
  }
1619
1619
  }
1620
- function lt(r, e) {
1621
- const n = J(e);
1622
- n.url || E(`The attribute remoteEntry of ${r.name} must not be undefined.`);
1623
- let o = t.getResourceUrl(e, n.url);
1624
- !t.isBrowserEnv() && !o.startsWith("http") && (o = `https:${o}`), r.type = n.type, r.entryGlobalName = n.globalName, r.entry = o, r.version = e.version, r.buildVersion = e.buildVersion;
1620
+ function lt(n, e) {
1621
+ const r = J(e);
1622
+ r.url || E(`The attribute remoteEntry of ${n.name} must not be undefined.`);
1623
+ let o = t.getResourceUrl(e, r.url);
1624
+ !t.isBrowserEnv() && !o.startsWith("http") && (o = `https:${o}`), n.type = r.type, n.entryGlobalName = r.globalName, n.entry = o, n.version = e.version, n.buildVersion = e.buildVersion;
1625
1625
  }
1626
- function er() {
1626
+ function en() {
1627
1627
  return {
1628
1628
  name: "snapshot-plugin",
1629
- async afterResolve(r) {
1630
- const { remote: e, pkgNameOrAlias: n, expose: o, origin: s, remoteInfo: c, id: a } = r;
1629
+ async afterResolve(n) {
1630
+ const { remote: e, pkgNameOrAlias: r, expose: o, origin: i, remoteInfo: c, id: a } = n;
1631
1631
  if (!$(e) || !w(e)) {
1632
- const { remoteSnapshot: l, globalSnapshot: p } = await s.snapshotHandler.loadRemoteSnapshotInfo({
1632
+ const { remoteSnapshot: l, globalSnapshot: p } = await i.snapshotHandler.loadRemoteSnapshotInfo({
1633
1633
  moduleInfo: e,
1634
1634
  id: a
1635
1635
  });
@@ -1637,31 +1637,31 @@ function requireIndex_cjs$1() {
1637
1637
  const m = {
1638
1638
  remote: e,
1639
1639
  preloadConfig: {
1640
- nameOrAlias: n,
1640
+ nameOrAlias: r,
1641
1641
  exposes: [o],
1642
1642
  resourceCategory: "sync",
1643
1643
  share: !1,
1644
1644
  depsRemote: !1
1645
1645
  }
1646
- }, b = await s.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({
1647
- origin: s,
1646
+ }, b = await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({
1647
+ origin: i,
1648
1648
  preloadOptions: m,
1649
1649
  remoteInfo: c,
1650
1650
  remote: e,
1651
1651
  remoteSnapshot: l,
1652
1652
  globalSnapshot: p
1653
1653
  });
1654
- return b && ke(c, s, b, !1), {
1655
- ...r,
1654
+ return b && Ce(c, i, b, !1), {
1655
+ ...n,
1656
1656
  remoteSnapshot: l
1657
1657
  };
1658
1658
  }
1659
- return r;
1659
+ return n;
1660
1660
  }
1661
1661
  };
1662
1662
  }
1663
- function tr(r) {
1664
- const e = r.split(":");
1663
+ function tn(n) {
1664
+ const e = n.split(":");
1665
1665
  return e.length === 1 ? {
1666
1666
  name: e[0],
1667
1667
  version: void 0
@@ -1673,31 +1673,31 @@ function requireIndex_cjs$1() {
1673
1673
  version: e[2]
1674
1674
  };
1675
1675
  }
1676
- function ut(r, e, n, o, s = {}, c) {
1677
- const a = R(e), { value: l } = Z(r, a), p = c || l;
1678
- if (p && !t.isManifestProvider(p) && (n(p, e, o), p.remotesInfo)) {
1676
+ function ut(n, e, r, o, i = {}, c) {
1677
+ const a = R(e), { value: l } = Z(n, a), p = c || l;
1678
+ if (p && !t.isManifestProvider(p) && (r(p, e, o), p.remotesInfo)) {
1679
1679
  const m = Object.keys(p.remotesInfo);
1680
1680
  for (const b of m) {
1681
- if (s[b])
1681
+ if (i[b])
1682
1682
  continue;
1683
- s[b] = !0;
1684
- const S = tr(b), g = p.remotesInfo[b];
1685
- ut(r, {
1683
+ i[b] = !0;
1684
+ const S = tn(b), g = p.remotesInfo[b];
1685
+ ut(n, {
1686
1686
  name: S.name,
1687
1687
  version: g.matchedVersion
1688
- }, n, !1, s, void 0);
1688
+ }, r, !1, i, void 0);
1689
1689
  }
1690
1690
  }
1691
1691
  }
1692
- const He = (r, e) => document.querySelector(`${r}[${r === "link" ? "href" : "src"}="${e}"]`);
1693
- function rr(r, e, n, o, s) {
1694
- const c = [], a = [], l = [], p = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), { options: b } = r, { preloadConfig: S } = e, { depsRemote: g } = S;
1695
- if (ut(o, n, (T, A, G) => {
1692
+ const He = (n, e) => document.querySelector(`${n}[${n === "link" ? "href" : "src"}="${e}"]`);
1693
+ function nn(n, e, r, o, i) {
1694
+ const c = [], a = [], l = [], p = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), { options: b } = n, { preloadConfig: S } = e, { depsRemote: g } = S;
1695
+ if (ut(o, r, (T, A, G) => {
1696
1696
  let L;
1697
1697
  if (G)
1698
1698
  L = S;
1699
1699
  else if (Array.isArray(g)) {
1700
- const se = g.find((re) => re.nameOrAlias === A.name || re.nameOrAlias === A.alias);
1700
+ const se = g.find((ne) => ne.nameOrAlias === A.name || ne.nameOrAlias === A.alias);
1701
1701
  if (!se)
1702
1702
  return;
1703
1703
  L = at(se);
@@ -1720,35 +1720,35 @@ function requireIndex_cjs$1() {
1720
1720
  });
1721
1721
  let Y = "modules" in T ? T.modules : [];
1722
1722
  const ue = Zt(L.exposes);
1723
- ue.length && "modules" in T && (Y = T?.modules?.reduce((se, re) => (ue?.indexOf(re.moduleName) !== -1 && se.push(re), se), []));
1723
+ ue.length && "modules" in T && (Y = T?.modules?.reduce((se, ne) => (ue?.indexOf(ne.moduleName) !== -1 && se.push(ne), se), []));
1724
1724
  function W(se) {
1725
- const re = se.map((ae) => t.getResourceUrl(T, ae));
1726
- return L.filter ? re.filter(L.filter) : re;
1725
+ const ne = se.map((ae) => t.getResourceUrl(T, ae));
1726
+ return L.filter ? ne.filter(L.filter) : ne;
1727
1727
  }
1728
1728
  if (Y) {
1729
1729
  const se = Y.length;
1730
- for (let re = 0; re < se; re++) {
1731
- const ae = Y[re], Ue = `${A.name}/${ae.moduleName}`;
1732
- r.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({
1730
+ for (let ne = 0; ne < se; ne++) {
1731
+ const ae = Y[ne], Ue = `${A.name}/${ae.moduleName}`;
1732
+ n.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({
1733
1733
  id: ae.moduleName === "." ? A.name : Ue,
1734
1734
  name: A.name,
1735
1735
  remoteSnapshot: T,
1736
1736
  preloadConfig: L,
1737
1737
  remote: A,
1738
- origin: r
1738
+ origin: n
1739
1739
  }), !Be(Ue) && (L.resourceCategory === "all" ? (c.push(...W(ae.assets.css.async)), c.push(...W(ae.assets.css.sync)), a.push(...W(ae.assets.js.async)), a.push(...W(ae.assets.js.sync))) : (L.resourceCategory = "sync") && (c.push(...W(ae.assets.css.sync)), a.push(...W(ae.assets.js.sync))), qe(Ue));
1740
1740
  }
1741
1741
  }
1742
- }, !0, {}, s), s.shared && s.shared.length > 0) {
1742
+ }, !0, {}, i), i.shared && i.shared.length > 0) {
1743
1743
  const T = (A, G) => {
1744
- const L = me(r.shareScopeMap, G.sharedName, A, r.sharedHandler.hooks.lifecycle.resolveShare);
1744
+ const L = me(n.shareScopeMap, G.sharedName, A, n.sharedHandler.hooks.lifecycle.resolveShare);
1745
1745
  L && typeof L.lib == "function" && (G.assets.js.sync.forEach((q) => {
1746
1746
  p.add(q);
1747
1747
  }), G.assets.css.sync.forEach((q) => {
1748
1748
  m.add(q);
1749
1749
  }));
1750
1750
  };
1751
- s.shared.forEach((A) => {
1751
+ i.shared.forEach((A) => {
1752
1752
  const G = b.shared?.[A.sharedName];
1753
1753
  if (!G)
1754
1754
  return;
@@ -1767,28 +1767,28 @@ function requireIndex_cjs$1() {
1767
1767
  entryAssets: l.filter((T) => !He("script", T.url))
1768
1768
  };
1769
1769
  }
1770
- const nr = function() {
1770
+ const rn = function() {
1771
1771
  return {
1772
1772
  name: "generate-preload-assets-plugin",
1773
- async generatePreloadAssets(r) {
1774
- const { origin: e, preloadOptions: n, remoteInfo: o, remote: s, globalSnapshot: c, remoteSnapshot: a } = r;
1775
- return t.isBrowserEnv() ? $(s) && w(s) ? {
1773
+ async generatePreloadAssets(n) {
1774
+ const { origin: e, preloadOptions: r, remoteInfo: o, remote: i, globalSnapshot: c, remoteSnapshot: a } = n;
1775
+ return t.isBrowserEnv() ? $(i) && w(i) ? {
1776
1776
  cssAssets: [],
1777
1777
  jsAssetsWithoutEntry: [],
1778
1778
  entryAssets: [
1779
1779
  {
1780
- name: s.name,
1781
- url: s.entry,
1780
+ name: i.name,
1781
+ url: i.entry,
1782
1782
  moduleInfo: {
1783
1783
  name: o.name,
1784
- entry: s.entry,
1784
+ entry: i.entry,
1785
1785
  type: o.type || "global",
1786
1786
  entryGlobalName: "",
1787
1787
  shareScope: ""
1788
1788
  }
1789
1789
  }
1790
1790
  ]
1791
- } : (lt(o, a), rr(e, n, o, c, a)) : {
1791
+ } : (lt(o, a), nn(e, r, o, c, a)) : {
1792
1792
  cssAssets: [],
1793
1793
  jsAssetsWithoutEntry: [],
1794
1794
  entryAssets: []
@@ -1796,28 +1796,28 @@ function requireIndex_cjs$1() {
1796
1796
  }
1797
1797
  };
1798
1798
  };
1799
- function ft(r, e) {
1800
- const n = he({
1799
+ function ft(n, e) {
1800
+ const r = he({
1801
1801
  name: e.name,
1802
1802
  version: e.options.version
1803
- }), o = n && "remotesInfo" in n && n.remotesInfo && Z(n.remotesInfo, r.name).value;
1803
+ }), o = r && "remotesInfo" in r && r.remotesInfo && Z(r.remotesInfo, n.name).value;
1804
1804
  return o && o.matchedVersion ? {
1805
- hostGlobalSnapshot: n,
1805
+ hostGlobalSnapshot: r,
1806
1806
  globalSnapshot: fe(),
1807
1807
  remoteSnapshot: he({
1808
- name: r.name,
1808
+ name: n.name,
1809
1809
  version: o.matchedVersion
1810
1810
  })
1811
1811
  } : {
1812
1812
  hostGlobalSnapshot: void 0,
1813
1813
  globalSnapshot: fe(),
1814
1814
  remoteSnapshot: he({
1815
- name: r.name,
1816
- version: "version" in r ? r.version : void 0
1815
+ name: n.name,
1816
+ version: "version" in n ? n.version : void 0
1817
1817
  })
1818
1818
  };
1819
1819
  }
1820
- class or {
1820
+ class on {
1821
1821
  constructor(e) {
1822
1822
  this.loadingHostSnapshot = null, this.manifestCache = /* @__PURE__ */ new Map(), this.hooks = new _e({
1823
1823
  beforeLoadRemoteSnapshot: new oe("beforeLoadRemoteSnapshot"),
@@ -1827,10 +1827,10 @@ function requireIndex_cjs$1() {
1827
1827
  }), this.manifestLoading = V.__FEDERATION__.__MANIFEST_LOADING__, this.HostInstance = e, this.loaderHook = e.loaderHook;
1828
1828
  }
1829
1829
  // eslint-disable-next-line max-lines-per-function
1830
- async loadRemoteSnapshotInfo({ moduleInfo: e, id: n, expose: o }) {
1831
- const { options: s } = this.HostInstance;
1830
+ async loadRemoteSnapshotInfo({ moduleInfo: e, id: r, expose: o }) {
1831
+ const { options: i } = this.HostInstance;
1832
1832
  await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({
1833
- options: s,
1833
+ options: i,
1834
1834
  moduleInfo: e
1835
1835
  });
1836
1836
  let c = he({
@@ -1841,7 +1841,7 @@ function requireIndex_cjs$1() {
1841
1841
  version: this.HostInstance.options.version || "",
1842
1842
  remoteEntry: "",
1843
1843
  remotesInfo: {}
1844
- }, K({
1844
+ }, z({
1845
1845
  [this.HostInstance.options.name]: c
1846
1846
  })), c && "remotesInfo" in c && !Z(c.remotesInfo, e.name).value && ("version" in e || "entry" in e) && (c.remotesInfo = {
1847
1847
  ...c?.remotesInfo,
@@ -1850,7 +1850,7 @@ function requireIndex_cjs$1() {
1850
1850
  }
1851
1851
  });
1852
1852
  const { hostGlobalSnapshot: a, remoteSnapshot: l, globalSnapshot: p } = this.getGlobalRemoteInfo(e), { remoteSnapshot: m, globalSnapshot: b } = await this.hooks.lifecycle.loadSnapshot.emit({
1853
- options: s,
1853
+ options: i,
1854
1854
  moduleInfo: e,
1855
1855
  hostGlobalSnapshot: a,
1856
1856
  remoteSnapshot: l,
@@ -1884,15 +1884,15 @@ function requireIndex_cjs$1() {
1884
1884
  });
1885
1885
  S = j, g = M;
1886
1886
  } else
1887
- E(i.getShortErrorMsg(i.RUNTIME_007, i.runtimeDescMap, {
1887
+ E(s.getShortErrorMsg(s.RUNTIME_007, s.runtimeDescMap, {
1888
1888
  hostName: e.name,
1889
1889
  hostVersion: e.version,
1890
1890
  globalSnapshot: JSON.stringify(b)
1891
1891
  }));
1892
1892
  return await this.hooks.lifecycle.afterLoadSnapshot.emit({
1893
- id: n,
1893
+ id: r,
1894
1894
  host: this.HostInstance,
1895
- options: s,
1895
+ options: i,
1896
1896
  moduleInfo: e,
1897
1897
  remoteSnapshot: S
1898
1898
  }), {
@@ -1903,8 +1903,8 @@ function requireIndex_cjs$1() {
1903
1903
  getGlobalRemoteInfo(e) {
1904
1904
  return ft(e, this.HostInstance);
1905
1905
  }
1906
- async getManifestJson(e, n, o) {
1907
- const s = async () => {
1906
+ async getManifestJson(e, r, o) {
1907
+ const i = async () => {
1908
1908
  let a = this.manifestCache.get(e);
1909
1909
  if (a)
1910
1910
  return a;
@@ -1918,19 +1918,19 @@ function requireIndex_cjs$1() {
1918
1918
  from: "runtime",
1919
1919
  lifecycle: "afterResolve",
1920
1920
  origin: this.HostInstance
1921
- }), a || (delete this.manifestLoading[e], E(i.getShortErrorMsg(i.RUNTIME_003, i.runtimeDescMap, {
1921
+ }), a || (delete this.manifestLoading[e], E(s.getShortErrorMsg(s.RUNTIME_003, s.runtimeDescMap, {
1922
1922
  manifestUrl: e,
1923
- moduleName: n.name,
1923
+ moduleName: r.name,
1924
1924
  hostName: this.HostInstance.options.name
1925
1925
  }, `${l}`)));
1926
1926
  }
1927
- return d(a.metaData && a.exposes && a.shared, `${e} is not a federation manifest`), this.manifestCache.set(e, a), a;
1927
+ return h(a.metaData && a.exposes && a.shared, `${e} is not a federation manifest`), this.manifestCache.set(e, a), a;
1928
1928
  }, c = async () => {
1929
- const a = await s(), l = t.generateSnapshotFromManifest(a, {
1929
+ const a = await i(), l = t.generateSnapshotFromManifest(a, {
1930
1930
  version: e
1931
1931
  }), { remoteSnapshot: p } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
1932
1932
  options: this.HostInstance.options,
1933
- moduleInfo: n,
1933
+ moduleInfo: r,
1934
1934
  manifestJson: a,
1935
1935
  remoteSnapshot: l,
1936
1936
  manifestUrl: e,
@@ -1941,7 +1941,7 @@ function requireIndex_cjs$1() {
1941
1941
  return this.manifestLoading[e] || (this.manifestLoading[e] = c().then((a) => a)), this.manifestLoading[e];
1942
1942
  }
1943
1943
  }
1944
- class sr {
1944
+ class sn {
1945
1945
  constructor(e) {
1946
1946
  this.hooks = new _e({
1947
1947
  afterResolve: new de("afterResolve"),
@@ -1954,8 +1954,8 @@ function requireIndex_cjs$1() {
1954
1954
  }), this.host = e, this.shareScopeMap = {}, this.initTokens = {}, this._setGlobalShareScopeMap(e.options);
1955
1955
  }
1956
1956
  // register shared in shareScopeMap
1957
- registerShared(e, n) {
1958
- const { shareInfos: o, shared: s } = nt(e, n);
1957
+ registerShared(e, r) {
1958
+ const { shareInfos: o, shared: i } = rt(e, r);
1959
1959
  return Object.keys(o).forEach((a) => {
1960
1960
  o[a].forEach((p) => {
1961
1961
  p.scope.forEach((m) => {
@@ -1965,33 +1965,33 @@ function requireIndex_cjs$1() {
1965
1965
  get: p.get,
1966
1966
  loaded: p.loaded || !!p.lib,
1967
1967
  shared: p,
1968
- from: n.name
1968
+ from: r.name
1969
1969
  });
1970
1970
  });
1971
1971
  });
1972
1972
  }), {
1973
1973
  shareInfos: o,
1974
- shared: s
1974
+ shared: i
1975
1975
  };
1976
1976
  }
1977
- async loadShare(e, n) {
1978
- const { host: o } = this, s = ot({
1977
+ async loadShare(e, r) {
1978
+ const { host: o } = this, i = ot({
1979
1979
  pkgName: e,
1980
- extraOptions: n,
1980
+ extraOptions: r,
1981
1981
  shareInfos: o.options.shared
1982
1982
  });
1983
- s?.scope && await Promise.all(s.scope.map(async (m) => {
1983
+ i?.scope && await Promise.all(i.scope.map(async (m) => {
1984
1984
  await Promise.all(this.initializeSharing(m, {
1985
- strategy: s.strategy
1985
+ strategy: i.strategy
1986
1986
  }));
1987
1987
  }));
1988
1988
  const c = await this.hooks.lifecycle.beforeLoadShare.emit({
1989
1989
  pkgName: e,
1990
- shareInfo: s,
1990
+ shareInfo: i,
1991
1991
  shared: o.options.shared,
1992
1992
  origin: o
1993
1993
  }), { shareInfo: a } = c;
1994
- d(a, `Cannot find ${e} Share in the ${o.options.name}. Please ensure that the ${e} Share parameters have been injected`);
1994
+ h(a, `Cannot find ${e} Share in the ${o.options.name}. Please ensure that the ${e} Share parameters have been injected`);
1995
1995
  const l = me(this.shareScopeMap, e, a, this.hooks.lifecycle.resolveShare), p = (m) => {
1996
1996
  m.useIn || (m.useIn = []), y(m.useIn, o.options.name);
1997
1997
  };
@@ -2014,7 +2014,7 @@ function requireIndex_cjs$1() {
2014
2014
  loading: b
2015
2015
  }), b;
2016
2016
  } else {
2017
- if (n?.customShareInfo)
2017
+ if (r?.customShareInfo)
2018
2018
  return !1;
2019
2019
  const b = (async () => {
2020
2020
  const S = await a.get();
@@ -2038,11 +2038,11 @@ function requireIndex_cjs$1() {
2038
2038
  * If the share scope does not exist, it creates one.
2039
2039
  */
2040
2040
  // eslint-disable-next-line @typescript-eslint/member-ordering
2041
- initializeSharing(e = Ee, n) {
2042
- const { host: o } = this, s = n?.from, c = n?.strategy;
2043
- let a = n?.initScope;
2041
+ initializeSharing(e = Ee, r) {
2042
+ const { host: o } = this, i = r?.from, c = r?.strategy;
2043
+ let a = r?.initScope;
2044
2044
  const l = [];
2045
- if (s !== "build") {
2045
+ if (i !== "build") {
2046
2046
  const { initTokens: M } = this;
2047
2047
  a || (a = []);
2048
2048
  let j = M[e];
@@ -2089,21 +2089,21 @@ function requireIndex_cjs$1() {
2089
2089
  // 1. If the loaded shared already exists globally, then it will be reused
2090
2090
  // 2. If lib exists in local shared, it will be used directly
2091
2091
  // 3. If the local get returns something other than Promise, then it will be used directly
2092
- loadShareSync(e, n) {
2093
- const { host: o } = this, s = ot({
2092
+ loadShareSync(e, r) {
2093
+ const { host: o } = this, i = ot({
2094
2094
  pkgName: e,
2095
- extraOptions: n,
2095
+ extraOptions: r,
2096
2096
  shareInfos: o.options.shared
2097
2097
  });
2098
- s?.scope && s.scope.forEach((l) => {
2099
- this.initializeSharing(l, { strategy: s.strategy });
2098
+ i?.scope && i.scope.forEach((l) => {
2099
+ this.initializeSharing(l, { strategy: i.strategy });
2100
2100
  });
2101
- const c = me(this.shareScopeMap, e, s, this.hooks.lifecycle.resolveShare), a = (l) => {
2101
+ const c = me(this.shareScopeMap, e, i, this.hooks.lifecycle.resolveShare), a = (l) => {
2102
2102
  l.useIn || (l.useIn = []), y(l.useIn, o.options.name);
2103
2103
  };
2104
2104
  if (c) {
2105
2105
  if (typeof c.lib == "function")
2106
- return a(c), c.loaded || (c.loaded = !0, c.from === o.options.name && (s.loaded = !0)), c.lib;
2106
+ return a(c), c.loaded || (c.loaded = !0, c.from === o.options.name && (i.loaded = !0)), c.lib;
2107
2107
  if (typeof c.get == "function") {
2108
2108
  const l = c.get();
2109
2109
  if (!(l instanceof Promise))
@@ -2116,49 +2116,49 @@ function requireIndex_cjs$1() {
2116
2116
  }), l;
2117
2117
  }
2118
2118
  }
2119
- if (s.lib)
2120
- return s.loaded || (s.loaded = !0), s.lib;
2121
- if (s.get) {
2122
- const l = s.get();
2119
+ if (i.lib)
2120
+ return i.loaded || (i.loaded = !0), i.lib;
2121
+ if (i.get) {
2122
+ const l = i.get();
2123
2123
  if (l instanceof Promise) {
2124
- const p = n?.from === "build" ? i.RUNTIME_005 : i.RUNTIME_006;
2125
- throw new Error(i.getShortErrorMsg(p, i.runtimeDescMap, {
2124
+ const p = r?.from === "build" ? s.RUNTIME_005 : s.RUNTIME_006;
2125
+ throw new Error(s.getShortErrorMsg(p, s.runtimeDescMap, {
2126
2126
  hostName: o.options.name,
2127
2127
  sharedPkgName: e
2128
2128
  }));
2129
2129
  }
2130
- return s.lib = l, this.setShared({
2130
+ return i.lib = l, this.setShared({
2131
2131
  pkgName: e,
2132
2132
  loaded: !0,
2133
2133
  from: o.options.name,
2134
- lib: s.lib,
2135
- shared: s
2136
- }), s.lib;
2134
+ lib: i.lib,
2135
+ shared: i
2136
+ }), i.lib;
2137
2137
  }
2138
- throw new Error(i.getShortErrorMsg(i.RUNTIME_006, i.runtimeDescMap, {
2138
+ throw new Error(s.getShortErrorMsg(s.RUNTIME_006, s.runtimeDescMap, {
2139
2139
  hostName: o.options.name,
2140
2140
  sharedPkgName: e
2141
2141
  }));
2142
2142
  }
2143
- initShareScopeMap(e, n, o = {}) {
2144
- const { host: s } = this;
2145
- this.shareScopeMap[e] = n, this.hooks.lifecycle.initContainerShareScopeMap.emit({
2146
- shareScope: n,
2147
- options: s.options,
2148
- origin: s,
2143
+ initShareScopeMap(e, r, o = {}) {
2144
+ const { host: i } = this;
2145
+ this.shareScopeMap[e] = r, this.hooks.lifecycle.initContainerShareScopeMap.emit({
2146
+ shareScope: r,
2147
+ options: i.options,
2148
+ origin: i,
2149
2149
  scopeName: e,
2150
2150
  hostShareScopeMap: o.hostShareScopeMap
2151
2151
  });
2152
2152
  }
2153
- setShared({ pkgName: e, shared: n, from: o, lib: s, loading: c, loaded: a, get: l }) {
2154
- const { version: p, scope: m = "default", ...b } = n;
2153
+ setShared({ pkgName: e, shared: r, from: o, lib: i, loading: c, loaded: a, get: l }) {
2154
+ const { version: p, scope: m = "default", ...b } = r;
2155
2155
  (Array.isArray(m) ? m : [m]).forEach((g) => {
2156
2156
  if (this.shareScopeMap[g] || (this.shareScopeMap[g] = {}), this.shareScopeMap[g][e] || (this.shareScopeMap[g][e] = {}), !this.shareScopeMap[g][e][p]) {
2157
2157
  this.shareScopeMap[g][e][p] = {
2158
2158
  version: p,
2159
2159
  scope: [g],
2160
2160
  ...b,
2161
- lib: s,
2161
+ lib: i,
2162
2162
  loaded: a,
2163
2163
  loading: c
2164
2164
  }, l && (this.shareScopeMap[g][e][p].get = l);
@@ -2169,11 +2169,11 @@ function requireIndex_cjs$1() {
2169
2169
  });
2170
2170
  }
2171
2171
  _setGlobalShareScopeMap(e) {
2172
- const n = De(), o = e.id || e.name;
2173
- o && !n[o] && (n[o] = this.shareScopeMap);
2172
+ const r = De(), o = e.id || e.name;
2173
+ o && !r[o] && (r[o] = this.shareScopeMap);
2174
2174
  }
2175
2175
  }
2176
- class ir {
2176
+ class an {
2177
2177
  constructor(e) {
2178
2178
  this.hooks = new _e({
2179
2179
  beforeRegisterRemote: new Ne("beforeRegisterRemote"),
@@ -2189,160 +2189,160 @@ function requireIndex_cjs$1() {
2189
2189
  loadEntry: new oe()
2190
2190
  }), this.host = e, this.idToRemoteMap = {};
2191
2191
  }
2192
- formatAndRegisterRemote(e, n) {
2193
- return (n.remotes || []).reduce((s, c) => (this.registerRemote(c, s, { force: !1 }), s), e.remotes);
2192
+ formatAndRegisterRemote(e, r) {
2193
+ return (r.remotes || []).reduce((i, c) => (this.registerRemote(c, i, { force: !1 }), i), e.remotes);
2194
2194
  }
2195
- setIdToRemoteMap(e, n) {
2196
- const { remote: o, expose: s } = n, { name: c, alias: a } = o;
2197
- if (this.idToRemoteMap[e] = { name: o.name, expose: s }, a && e.startsWith(c)) {
2195
+ setIdToRemoteMap(e, r) {
2196
+ const { remote: o, expose: i } = r, { name: c, alias: a } = o;
2197
+ if (this.idToRemoteMap[e] = { name: o.name, expose: i }, a && e.startsWith(c)) {
2198
2198
  const l = e.replace(c, a);
2199
- this.idToRemoteMap[l] = { name: o.name, expose: s };
2199
+ this.idToRemoteMap[l] = { name: o.name, expose: i };
2200
2200
  return;
2201
2201
  }
2202
2202
  if (a && e.startsWith(a)) {
2203
2203
  const l = e.replace(a, c);
2204
- this.idToRemoteMap[l] = { name: o.name, expose: s };
2204
+ this.idToRemoteMap[l] = { name: o.name, expose: i };
2205
2205
  }
2206
2206
  }
2207
2207
  // eslint-disable-next-line max-lines-per-function
2208
2208
  // eslint-disable-next-line @typescript-eslint/member-ordering
2209
- async loadRemote(e, n) {
2209
+ async loadRemote(e, r) {
2210
2210
  const { host: o } = this;
2211
2211
  try {
2212
- const { loadFactory: s = !0 } = n || {
2212
+ const { loadFactory: i = !0 } = r || {
2213
2213
  loadFactory: !0
2214
2214
  }, { module: c, moduleOptions: a, remoteMatchInfo: l } = await this.getRemoteModuleAndOptions({
2215
2215
  id: e
2216
- }), { pkgNameOrAlias: p, remote: m, expose: b, id: S, remoteSnapshot: g } = l, O = await c.get(S, b, n, g), M = await this.hooks.lifecycle.onLoad.emit({
2216
+ }), { pkgNameOrAlias: p, remote: m, expose: b, id: S, remoteSnapshot: g } = l, O = await c.get(S, b, r, g), M = await this.hooks.lifecycle.onLoad.emit({
2217
2217
  id: S,
2218
2218
  pkgNameOrAlias: p,
2219
2219
  expose: b,
2220
- exposeModule: s ? O : void 0,
2221
- exposeModuleFactory: s ? void 0 : O,
2220
+ exposeModule: i ? O : void 0,
2221
+ exposeModuleFactory: i ? void 0 : O,
2222
2222
  remote: m,
2223
2223
  options: a,
2224
2224
  moduleInstance: c,
2225
2225
  origin: o
2226
2226
  });
2227
2227
  return this.setIdToRemoteMap(e, l), typeof M == "function" ? M : O;
2228
- } catch (s) {
2229
- const { from: c = "runtime" } = n || { from: "runtime" }, a = await this.hooks.lifecycle.errorLoadRemote.emit({
2228
+ } catch (i) {
2229
+ const { from: c = "runtime" } = r || { from: "runtime" }, a = await this.hooks.lifecycle.errorLoadRemote.emit({
2230
2230
  id: e,
2231
- error: s,
2231
+ error: i,
2232
2232
  from: c,
2233
2233
  lifecycle: "onLoad",
2234
2234
  origin: o
2235
2235
  });
2236
2236
  if (!a)
2237
- throw s;
2237
+ throw i;
2238
2238
  return a;
2239
2239
  }
2240
2240
  }
2241
2241
  // eslint-disable-next-line @typescript-eslint/member-ordering
2242
2242
  async preloadRemote(e) {
2243
- const { host: n } = this;
2243
+ const { host: r } = this;
2244
2244
  await this.hooks.lifecycle.beforePreloadRemote.emit({
2245
2245
  preloadOps: e,
2246
- options: n.options,
2247
- origin: n
2246
+ options: r.options,
2247
+ origin: r
2248
2248
  });
2249
- const o = Jt(n.options.remotes, e);
2250
- await Promise.all(o.map(async (s) => {
2251
- const { remote: c } = s, a = Re(c), { globalSnapshot: l, remoteSnapshot: p } = await n.snapshotHandler.loadRemoteSnapshotInfo({
2249
+ const o = Jt(r.options.remotes, e);
2250
+ await Promise.all(o.map(async (i) => {
2251
+ const { remote: c } = i, a = Re(c), { globalSnapshot: l, remoteSnapshot: p } = await r.snapshotHandler.loadRemoteSnapshotInfo({
2252
2252
  moduleInfo: c
2253
2253
  }), m = await this.hooks.lifecycle.generatePreloadAssets.emit({
2254
- origin: n,
2255
- preloadOptions: s,
2254
+ origin: r,
2255
+ preloadOptions: i,
2256
2256
  remote: c,
2257
2257
  remoteInfo: a,
2258
2258
  globalSnapshot: l,
2259
2259
  remoteSnapshot: p
2260
2260
  });
2261
- m && ke(a, n, m);
2261
+ m && Ce(a, r, m);
2262
2262
  }));
2263
2263
  }
2264
- registerRemotes(e, n) {
2264
+ registerRemotes(e, r) {
2265
2265
  const { host: o } = this;
2266
- e.forEach((s) => {
2267
- this.registerRemote(s, o.options.remotes, {
2268
- force: n?.force
2266
+ e.forEach((i) => {
2267
+ this.registerRemote(i, o.options.remotes, {
2268
+ force: r?.force
2269
2269
  });
2270
2270
  });
2271
2271
  }
2272
2272
  async getRemoteModuleAndOptions(e) {
2273
- const { host: n } = this, { id: o } = e;
2274
- let s;
2273
+ const { host: r } = this, { id: o } = e;
2274
+ let i;
2275
2275
  try {
2276
- s = await this.hooks.lifecycle.beforeRequest.emit({
2276
+ i = await this.hooks.lifecycle.beforeRequest.emit({
2277
2277
  id: o,
2278
- options: n.options,
2279
- origin: n
2278
+ options: r.options,
2279
+ origin: r
2280
2280
  });
2281
2281
  } catch (M) {
2282
- if (s = await this.hooks.lifecycle.errorLoadRemote.emit({
2282
+ if (i = await this.hooks.lifecycle.errorLoadRemote.emit({
2283
2283
  id: o,
2284
- options: n.options,
2285
- origin: n,
2284
+ options: r.options,
2285
+ origin: r,
2286
2286
  from: "runtime",
2287
2287
  error: M,
2288
2288
  lifecycle: "beforeRequest"
2289
- }), !s)
2289
+ }), !i)
2290
2290
  throw M;
2291
2291
  }
2292
- const { id: c } = s, a = Le(n.options.remotes, c);
2293
- d(a, i.getShortErrorMsg(i.RUNTIME_004, i.runtimeDescMap, {
2294
- hostName: n.options.name,
2292
+ const { id: c } = i, a = Le(r.options.remotes, c);
2293
+ h(a, s.getShortErrorMsg(s.RUNTIME_004, s.runtimeDescMap, {
2294
+ hostName: r.options.name,
2295
2295
  requestId: c
2296
2296
  }));
2297
- const { remote: l } = a, p = Re(l), m = await n.sharedHandler.hooks.lifecycle.afterResolve.emit({
2297
+ const { remote: l } = a, p = Re(l), m = await r.sharedHandler.hooks.lifecycle.afterResolve.emit({
2298
2298
  id: c,
2299
2299
  ...a,
2300
- options: n.options,
2301
- origin: n,
2300
+ options: r.options,
2301
+ origin: r,
2302
2302
  remoteInfo: p
2303
2303
  }), { remote: b, expose: S } = m;
2304
- d(b && S, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${c}.`);
2305
- let g = n.moduleCache.get(b.name);
2304
+ h(b && S, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${c}.`);
2305
+ let g = r.moduleCache.get(b.name);
2306
2306
  const O = {
2307
- host: n,
2307
+ host: r,
2308
2308
  remoteInfo: p
2309
2309
  };
2310
- return g || (g = new Ce(O), n.moduleCache.set(b.name, g)), {
2310
+ return g || (g = new ke(O), r.moduleCache.set(b.name, g)), {
2311
2311
  module: g,
2312
2312
  moduleOptions: O,
2313
2313
  remoteMatchInfo: m
2314
2314
  };
2315
2315
  }
2316
- registerRemote(e, n, o) {
2317
- const { host: s } = this, c = () => {
2316
+ registerRemote(e, r, o) {
2317
+ const { host: i } = this, c = () => {
2318
2318
  if (e.alias) {
2319
- const l = n.find((p) => e.alias && (p.name.startsWith(e.alias) || p.alias?.startsWith(e.alias)));
2320
- d(!l, `The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${l && l.name} name or alias`);
2319
+ const l = r.find((p) => e.alias && (p.name.startsWith(e.alias) || p.alias?.startsWith(e.alias)));
2320
+ h(!l, `The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${l && l.name} name or alias`);
2321
2321
  }
2322
2322
  "entry" in e && t.isBrowserEnv() && !e.entry.startsWith("http") && (e.entry = new URL(e.entry, window.location.origin).href), e.shareScope || (e.shareScope = Ee), e.type || (e.type = We);
2323
2323
  };
2324
- this.hooks.lifecycle.beforeRegisterRemote.emit({ remote: e, origin: s });
2325
- const a = n.find((l) => l.name === e.name);
2324
+ this.hooks.lifecycle.beforeRegisterRemote.emit({ remote: e, origin: i });
2325
+ const a = r.find((l) => l.name === e.name);
2326
2326
  if (!a)
2327
- c(), n.push(e), this.hooks.lifecycle.registerRemote.emit({ remote: e, origin: s });
2327
+ c(), r.push(e), this.hooks.lifecycle.registerRemote.emit({ remote: e, origin: i });
2328
2328
  else {
2329
2329
  const l = [
2330
2330
  `The remote "${e.name}" is already registered.`,
2331
2331
  "Please note that overriding it may cause unexpected errors."
2332
2332
  ];
2333
- o?.force && (this.removeRemote(a), c(), n.push(e), this.hooks.lifecycle.registerRemote.emit({ remote: e, origin: s }), t.warn(l.join(" ")));
2333
+ o?.force && (this.removeRemote(a), c(), r.push(e), this.hooks.lifecycle.registerRemote.emit({ remote: e, origin: i }), t.warn(l.join(" ")));
2334
2334
  }
2335
2335
  }
2336
2336
  removeRemote(e) {
2337
2337
  try {
2338
- const { host: n } = this, { name: o } = e, s = n.options.remotes.findIndex((a) => a.name === o);
2339
- s !== -1 && n.options.remotes.splice(s, 1);
2340
- const c = n.moduleCache.get(e.name);
2338
+ const { host: r } = this, { name: o } = e, i = r.options.remotes.findIndex((a) => a.name === o);
2339
+ i !== -1 && r.options.remotes.splice(i, 1);
2340
+ const c = r.moduleCache.get(e.name);
2341
2341
  if (c) {
2342
2342
  const a = c.remoteInfo, l = a.entryGlobalName;
2343
2343
  P[l] && (Object.getOwnPropertyDescriptor(P, l)?.configurable ? delete P[l] : P[l] = void 0);
2344
2344
  const p = Fe(c.remoteInfo);
2345
- ce[p] && delete ce[p], n.snapshotHandler.manifestCache.delete(a.entry);
2345
+ ce[p] && delete ce[p], r.snapshotHandler.manifestCache.delete(a.entry);
2346
2346
  let m = a.buildVersion ? t.composeKeyWithSeparator(a.name, a.buildVersion) : a.name;
2347
2347
  const b = P.__FEDERATION__.__INSTANCES__.findIndex((g) => a.buildVersion ? g.options.id === m : g.name === m);
2348
2348
  if (b !== -1) {
@@ -2377,20 +2377,20 @@ function requireIndex_cjs$1() {
2377
2377
  delete O[T]?.[A]?.[G]?.[L];
2378
2378
  }), P.__FEDERATION__.__INSTANCES__.splice(b, 1);
2379
2379
  }
2380
- const { hostGlobalSnapshot: S } = ft(e, n);
2380
+ const { hostGlobalSnapshot: S } = ft(e, r);
2381
2381
  if (S) {
2382
2382
  const g = S && "remotesInfo" in S && S.remotesInfo && Z(S.remotesInfo, e.name).key;
2383
2383
  g && (delete S.remotesInfo[g], V.__FEDERATION__.__MANIFEST_LOADING__[g] && delete V.__FEDERATION__.__MANIFEST_LOADING__[g]);
2384
2384
  }
2385
- n.moduleCache.delete(e.name);
2385
+ r.moduleCache.delete(e.name);
2386
2386
  }
2387
- } catch (n) {
2388
- u.log("removeRemote fail: ", n);
2387
+ } catch (r) {
2388
+ u.log("removeRemote fail: ", r);
2389
2389
  }
2390
2390
  }
2391
2391
  }
2392
- const ar = typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN == "boolean" ? !FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN : !0;
2393
- class cr {
2392
+ const cn = typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN == "boolean" ? !FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN : !0;
2393
+ class ln {
2394
2394
  constructor(e) {
2395
2395
  this.hooks = new _e({
2396
2396
  beforeInit: new Ne("beforeInit"),
@@ -2413,66 +2413,66 @@ function requireIndex_cjs$1() {
2413
2413
  beforeBridgeDestroy: new te(),
2414
2414
  afterBridgeDestroy: new te()
2415
2415
  });
2416
- const n = ar ? [er(), nr()] : [], o = {
2416
+ const r = cn ? [en(), rn()] : [], o = {
2417
2417
  id: Vt(),
2418
2418
  name: e.name,
2419
- plugins: n,
2419
+ plugins: r,
2420
2420
  remotes: [],
2421
2421
  shared: {},
2422
2422
  inBrowser: t.isBrowserEnv()
2423
2423
  };
2424
- this.name = e.name, this.options = o, this.snapshotHandler = new or(this), this.sharedHandler = new sr(this), this.remoteHandler = new ir(this), this.shareScopeMap = this.sharedHandler.shareScopeMap, this.registerPlugins([
2424
+ this.name = e.name, this.options = o, this.snapshotHandler = new on(this), this.sharedHandler = new sn(this), this.remoteHandler = new an(this), this.shareScopeMap = this.sharedHandler.shareScopeMap, this.registerPlugins([
2425
2425
  ...o.plugins,
2426
2426
  ...e.plugins || []
2427
2427
  ]), this.options = this.formatOptions(o, e);
2428
2428
  }
2429
2429
  initOptions(e) {
2430
2430
  this.registerPlugins(e.plugins);
2431
- const n = this.formatOptions(this.options, e);
2432
- return this.options = n, n;
2431
+ const r = this.formatOptions(this.options, e);
2432
+ return this.options = r, r;
2433
2433
  }
2434
- async loadShare(e, n) {
2435
- return this.sharedHandler.loadShare(e, n);
2434
+ async loadShare(e, r) {
2435
+ return this.sharedHandler.loadShare(e, r);
2436
2436
  }
2437
2437
  // The lib function will only be available if the shared set by eager or runtime init is set or the shared is successfully loaded.
2438
2438
  // 1. If the loaded shared already exists globally, then it will be reused
2439
2439
  // 2. If lib exists in local shared, it will be used directly
2440
2440
  // 3. If the local get returns something other than Promise, then it will be used directly
2441
- loadShareSync(e, n) {
2442
- return this.sharedHandler.loadShareSync(e, n);
2441
+ loadShareSync(e, r) {
2442
+ return this.sharedHandler.loadShareSync(e, r);
2443
2443
  }
2444
- initializeSharing(e = Ee, n) {
2445
- return this.sharedHandler.initializeSharing(e, n);
2444
+ initializeSharing(e = Ee, r) {
2445
+ return this.sharedHandler.initializeSharing(e, r);
2446
2446
  }
2447
- initRawContainer(e, n, o) {
2448
- const s = Re({ name: e, entry: n }), c = new Ce({ host: this, remoteInfo: s });
2447
+ initRawContainer(e, r, o) {
2448
+ const i = Re({ name: e, entry: r }), c = new ke({ host: this, remoteInfo: i });
2449
2449
  return c.remoteEntryExports = o, this.moduleCache.set(e, c), c;
2450
2450
  }
2451
2451
  // eslint-disable-next-line max-lines-per-function
2452
2452
  // eslint-disable-next-line @typescript-eslint/member-ordering
2453
- async loadRemote(e, n) {
2454
- return this.remoteHandler.loadRemote(e, n);
2453
+ async loadRemote(e, r) {
2454
+ return this.remoteHandler.loadRemote(e, r);
2455
2455
  }
2456
2456
  // eslint-disable-next-line @typescript-eslint/member-ordering
2457
2457
  async preloadRemote(e) {
2458
2458
  return this.remoteHandler.preloadRemote(e);
2459
2459
  }
2460
- initShareScopeMap(e, n, o = {}) {
2461
- this.sharedHandler.initShareScopeMap(e, n, o);
2460
+ initShareScopeMap(e, r, o = {}) {
2461
+ this.sharedHandler.initShareScopeMap(e, r, o);
2462
2462
  }
2463
- formatOptions(e, n) {
2464
- const { shared: o } = nt(e, n), { userOptions: s, options: c } = this.hooks.lifecycle.beforeInit.emit({
2463
+ formatOptions(e, r) {
2464
+ const { shared: o } = rt(e, r), { userOptions: i, options: c } = this.hooks.lifecycle.beforeInit.emit({
2465
2465
  origin: this,
2466
- userOptions: n,
2466
+ userOptions: r,
2467
2467
  options: e,
2468
2468
  shareInfo: o
2469
- }), a = this.remoteHandler.formatAndRegisterRemote(c, s), { shared: l } = this.sharedHandler.registerShared(c, s), p = [...c.plugins];
2470
- s.plugins && s.plugins.forEach((b) => {
2469
+ }), a = this.remoteHandler.formatAndRegisterRemote(c, i), { shared: l } = this.sharedHandler.registerShared(c, i), p = [...c.plugins];
2470
+ i.plugins && i.plugins.forEach((b) => {
2471
2471
  p.includes(b) || p.push(b);
2472
2472
  });
2473
2473
  const m = {
2474
2474
  ...e,
2475
- ...n,
2475
+ ...r,
2476
2476
  plugins: p,
2477
2477
  remotes: a,
2478
2478
  shared: l
@@ -2483,11 +2483,11 @@ function requireIndex_cjs$1() {
2483
2483
  }), m;
2484
2484
  }
2485
2485
  registerPlugins(e) {
2486
- const n = qt(e, this);
2487
- this.options.plugins = this.options.plugins.reduce((o, s) => (s && o && !o.find((c) => c.name === s.name) && o.push(s), o), n || []);
2486
+ const r = qt(e, this);
2487
+ this.options.plugins = this.options.plugins.reduce((o, i) => (i && o && !o.find((c) => c.name === i.name) && o.push(i), o), r || []);
2488
2488
  }
2489
- registerRemotes(e, n) {
2490
- return this.remoteHandler.registerRemotes(e, n);
2489
+ registerRemotes(e, r) {
2490
+ return this.remoteHandler.registerRemotes(e, r);
2491
2491
  }
2492
2492
  registerShared(e) {
2493
2493
  this.sharedHandler.registerShared(this.options, {
@@ -2496,103 +2496,103 @@ function requireIndex_cjs$1() {
2496
2496
  });
2497
2497
  }
2498
2498
  }
2499
- var lr = /* @__PURE__ */ Object.freeze({
2499
+ var un = /* @__PURE__ */ Object.freeze({
2500
2500
  __proto__: null
2501
2501
  });
2502
- return index_cjs$2.loadScript = t.loadScript, index_cjs$2.loadScriptNode = t.loadScriptNode, index_cjs$2.CurrentGlobal = P, index_cjs$2.Global = V, index_cjs$2.Module = Ce, index_cjs$2.ModuleFederation = cr, index_cjs$2.addGlobalSnapshot = K, index_cjs$2.assert = d, index_cjs$2.getGlobalFederationConstructor = k, index_cjs$2.getGlobalSnapshot = fe, index_cjs$2.getInfoWithoutType = Z, index_cjs$2.getRegisteredShare = me, index_cjs$2.getRemoteEntry = Se, index_cjs$2.getRemoteInfo = Re, index_cjs$2.helpers = Qt, index_cjs$2.isStaticResourcesEqual = U, index_cjs$2.matchRemoteWithNameAndExpose = Le, index_cjs$2.registerGlobalPlugins = Ge, index_cjs$2.resetFederationGlobalInfo = I, index_cjs$2.safeWrapper = C, index_cjs$2.satisfy = ge, index_cjs$2.setGlobalFederationConstructor = z, index_cjs$2.setGlobalFederationInstance = N, index_cjs$2.types = lr, index_cjs$2;
2502
+ return index_cjs$2.loadScript = t.loadScript, index_cjs$2.loadScriptNode = t.loadScriptNode, index_cjs$2.CurrentGlobal = P, index_cjs$2.Global = V, index_cjs$2.Module = ke, index_cjs$2.ModuleFederation = ln, index_cjs$2.addGlobalSnapshot = z, index_cjs$2.assert = h, index_cjs$2.getGlobalFederationConstructor = C, index_cjs$2.getGlobalSnapshot = fe, index_cjs$2.getInfoWithoutType = Z, index_cjs$2.getRegisteredShare = me, index_cjs$2.getRemoteEntry = Se, index_cjs$2.getRemoteInfo = Re, index_cjs$2.helpers = Qt, index_cjs$2.isStaticResourcesEqual = U, index_cjs$2.matchRemoteWithNameAndExpose = Le, index_cjs$2.registerGlobalPlugins = Ge, index_cjs$2.resetFederationGlobalInfo = I, index_cjs$2.safeWrapper = k, index_cjs$2.satisfy = ge, index_cjs$2.setGlobalFederationConstructor = K, index_cjs$2.setGlobalFederationInstance = N, index_cjs$2.types = un, index_cjs$2;
2503
2503
  }
2504
2504
  var utils_cjs = {}, hasRequiredUtils_cjs;
2505
2505
  function requireUtils_cjs() {
2506
2506
  if (hasRequiredUtils_cjs) return utils_cjs;
2507
2507
  hasRequiredUtils_cjs = 1;
2508
2508
  var t = requireIndex_cjs$1();
2509
- function i() {
2509
+ function s() {
2510
2510
  return typeof FEDERATION_BUILD_IDENTIFIER < "u" ? (
2511
2511
  //@ts-ignore
2512
2512
  FEDERATION_BUILD_IDENTIFIER
2513
2513
  ) : "";
2514
2514
  }
2515
- function h(u, d) {
2516
- const E = i();
2517
- return t.CurrentGlobal.__FEDERATION__.__INSTANCES__.find((_) => !!(E && _.options.id === E || _.options.name === u && !_.options.version && !d || _.options.name === u && d && _.options.version === d));
2515
+ function d(u, h) {
2516
+ const E = s();
2517
+ return t.CurrentGlobal.__FEDERATION__.__INSTANCES__.find((_) => !!(E && _.options.id === E || _.options.name === u && !_.options.version && !h || _.options.name === u && h && _.options.version === h));
2518
2518
  }
2519
- return utils_cjs.getGlobalFederationInstance = h, utils_cjs;
2519
+ return utils_cjs.getGlobalFederationInstance = d, utils_cjs;
2520
2520
  }
2521
2521
  var hasRequiredIndex_cjs;
2522
2522
  function requireIndex_cjs() {
2523
2523
  if (hasRequiredIndex_cjs) return index_cjs$3;
2524
2524
  hasRequiredIndex_cjs = 1;
2525
- var t = requireIndex_cjs$1(), i = /* @__PURE__ */ requireIndex_cjs$2(), h = requireUtils_cjs();
2525
+ var t = requireIndex_cjs$1(), s = /* @__PURE__ */ requireIndex_cjs$2(), d = requireUtils_cjs();
2526
2526
  function u(x) {
2527
2527
  const U = t.getGlobalFederationConstructor() || t.ModuleFederation, Q = new U(x);
2528
2528
  return t.setGlobalFederationInstance(Q), Q;
2529
2529
  }
2530
- let d = null;
2530
+ let h = null;
2531
2531
  function E(x) {
2532
- const U = h.getGlobalFederationInstance(x.name, x.version);
2533
- return U ? (U.initOptions(x), d || (d = U), U) : (d = u(x), d);
2532
+ const U = d.getGlobalFederationInstance(x.name, x.version);
2533
+ return U ? (U.initOptions(x), h || (h = U), U) : (h = u(x), h);
2534
2534
  }
2535
2535
  function _(...x) {
2536
- return t.assert(d, i.getShortErrorMsg(i.RUNTIME_009, i.runtimeDescMap)), d.loadRemote.apply(d, x);
2536
+ return t.assert(h, s.getShortErrorMsg(s.RUNTIME_009, s.runtimeDescMap)), h.loadRemote.apply(h, x);
2537
2537
  }
2538
2538
  function y(...x) {
2539
- return t.assert(d, i.getShortErrorMsg(i.RUNTIME_009, i.runtimeDescMap)), d.loadShare.apply(d, x);
2539
+ return t.assert(h, s.getShortErrorMsg(s.RUNTIME_009, s.runtimeDescMap)), h.loadShare.apply(h, x);
2540
2540
  }
2541
2541
  function R(...x) {
2542
- return t.assert(d, i.getShortErrorMsg(i.RUNTIME_009, i.runtimeDescMap)), d.loadShareSync.apply(d, x);
2542
+ return t.assert(h, s.getShortErrorMsg(s.RUNTIME_009, s.runtimeDescMap)), h.loadShareSync.apply(h, x);
2543
2543
  }
2544
2544
  function $(...x) {
2545
- return t.assert(d, i.getShortErrorMsg(i.RUNTIME_009, i.runtimeDescMap)), d.preloadRemote.apply(d, x);
2545
+ return t.assert(h, s.getShortErrorMsg(s.RUNTIME_009, s.runtimeDescMap)), h.preloadRemote.apply(h, x);
2546
2546
  }
2547
2547
  function w(...x) {
2548
- return t.assert(d, i.getShortErrorMsg(i.RUNTIME_009, i.runtimeDescMap)), d.registerRemotes.apply(d, x);
2548
+ return t.assert(h, s.getShortErrorMsg(s.RUNTIME_009, s.runtimeDescMap)), h.registerRemotes.apply(h, x);
2549
2549
  }
2550
- function C(...x) {
2551
- return t.assert(d, i.getShortErrorMsg(i.RUNTIME_009, i.runtimeDescMap)), d.registerPlugins.apply(d, x);
2550
+ function k(...x) {
2551
+ return t.assert(h, s.getShortErrorMsg(s.RUNTIME_009, s.runtimeDescMap)), h.registerPlugins.apply(h, x);
2552
2552
  }
2553
2553
  function H() {
2554
- return d;
2554
+ return h;
2555
2555
  }
2556
2556
  function B(...x) {
2557
- return t.assert(d, i.getShortErrorMsg(i.RUNTIME_009, i.runtimeDescMap)), d.registerShared.apply(d, x);
2557
+ return t.assert(h, s.getShortErrorMsg(s.RUNTIME_009, s.runtimeDescMap)), h.registerShared.apply(h, x);
2558
2558
  }
2559
- return t.setGlobalFederationConstructor(t.ModuleFederation), index_cjs$3.Module = t.Module, index_cjs$3.ModuleFederation = t.ModuleFederation, index_cjs$3.getRemoteEntry = t.getRemoteEntry, index_cjs$3.getRemoteInfo = t.getRemoteInfo, index_cjs$3.loadScript = t.loadScript, index_cjs$3.loadScriptNode = t.loadScriptNode, index_cjs$3.registerGlobalPlugins = t.registerGlobalPlugins, index_cjs$3.createInstance = u, index_cjs$3.getInstance = H, index_cjs$3.init = E, index_cjs$3.loadRemote = _, index_cjs$3.loadShare = y, index_cjs$3.loadShareSync = R, index_cjs$3.preloadRemote = $, index_cjs$3.registerPlugins = C, index_cjs$3.registerRemotes = w, index_cjs$3.registerShared = B, index_cjs$3;
2559
+ return t.setGlobalFederationConstructor(t.ModuleFederation), index_cjs$3.Module = t.Module, index_cjs$3.ModuleFederation = t.ModuleFederation, index_cjs$3.getRemoteEntry = t.getRemoteEntry, index_cjs$3.getRemoteInfo = t.getRemoteInfo, index_cjs$3.loadScript = t.loadScript, index_cjs$3.loadScriptNode = t.loadScriptNode, index_cjs$3.registerGlobalPlugins = t.registerGlobalPlugins, index_cjs$3.createInstance = u, index_cjs$3.getInstance = H, index_cjs$3.init = E, index_cjs$3.loadRemote = _, index_cjs$3.loadShare = y, index_cjs$3.loadShareSync = R, index_cjs$3.preloadRemote = $, index_cjs$3.registerPlugins = k, index_cjs$3.registerRemotes = w, index_cjs$3.registerShared = B, index_cjs$3;
2560
2560
  }
2561
2561
  var hasRequiredRuntime_cjs;
2562
2562
  function requireRuntime_cjs() {
2563
2563
  return hasRequiredRuntime_cjs || (hasRequiredRuntime_cjs = 1, (function(t) {
2564
- var i = requireIndex_cjs();
2565
- Object.prototype.hasOwnProperty.call(i, "__proto__") && !Object.prototype.hasOwnProperty.call(t, "__proto__") && Object.defineProperty(t, "__proto__", {
2564
+ var s = requireIndex_cjs();
2565
+ Object.prototype.hasOwnProperty.call(s, "__proto__") && !Object.prototype.hasOwnProperty.call(t, "__proto__") && Object.defineProperty(t, "__proto__", {
2566
2566
  enumerable: !0,
2567
- value: i.__proto__
2568
- }), Object.keys(i).forEach(function(h) {
2569
- h !== "default" && !Object.prototype.hasOwnProperty.call(t, h) && (t[h] = i[h]);
2567
+ value: s.__proto__
2568
+ }), Object.keys(s).forEach(function(d) {
2569
+ d !== "default" && !Object.prototype.hasOwnProperty.call(t, d) && (t[d] = s[d]);
2570
2570
  });
2571
2571
  })(runtime_cjs)), runtime_cjs;
2572
2572
  }
2573
2573
  var hasRequiredRuntime;
2574
2574
  function requireRuntime() {
2575
2575
  return hasRequiredRuntime || (hasRequiredRuntime = 1, (function(t) {
2576
- var i = runtime && runtime.__createBinding || (Object.create ? (function(u, d, E, _) {
2576
+ var s = runtime && runtime.__createBinding || (Object.create ? (function(u, h, E, _) {
2577
2577
  _ === void 0 && (_ = E);
2578
- var y = Object.getOwnPropertyDescriptor(d, E);
2579
- (!y || ("get" in y ? !d.__esModule : y.writable || y.configurable)) && (y = { enumerable: !0, get: function() {
2580
- return d[E];
2578
+ var y = Object.getOwnPropertyDescriptor(h, E);
2579
+ (!y || ("get" in y ? !h.__esModule : y.writable || y.configurable)) && (y = { enumerable: !0, get: function() {
2580
+ return h[E];
2581
2581
  } }), Object.defineProperty(u, _, y);
2582
- }) : (function(u, d, E, _) {
2583
- _ === void 0 && (_ = E), u[_] = d[E];
2584
- })), h = runtime && runtime.__exportStar || function(u, d) {
2585
- for (var E in u) E !== "default" && !Object.prototype.hasOwnProperty.call(d, E) && i(d, u, E);
2582
+ }) : (function(u, h, E, _) {
2583
+ _ === void 0 && (_ = E), u[_] = h[E];
2584
+ })), d = runtime && runtime.__exportStar || function(u, h) {
2585
+ for (var E in u) E !== "default" && !Object.prototype.hasOwnProperty.call(h, E) && s(h, u, E);
2586
2586
  };
2587
- Object.defineProperty(t, "__esModule", { value: !0 }), h(requireRuntime_cjs(), t);
2587
+ Object.defineProperty(t, "__esModule", { value: !0 }), d(requireRuntime_cjs(), t);
2588
2588
  })(runtime)), runtime;
2589
2589
  }
2590
2590
  var runtimeExports = requireRuntime();
2591
2591
  const loadAsyncComponent = (t) => defineAsyncComponent(
2592
- () => runtimeExports.loadRemote(t).then((i) => {
2593
- if (!i?.default)
2592
+ () => runtimeExports.loadRemote(t).then((s) => {
2593
+ if (!s?.default)
2594
2594
  throw new Error(`Failed to load component from ${t}`);
2595
- return i.default;
2595
+ return s.default;
2596
2596
  })
2597
2597
  );
2598
2598
  const IS_CLIENT = typeof window < "u";
@@ -2610,38 +2610,38 @@ var MutationType;
2610
2610
  (function(t) {
2611
2611
  t.direct = "direct", t.patchObject = "patch object", t.patchFunction = "patch function";
2612
2612
  })(MutationType || (MutationType = {}));
2613
- function patchObject(t, i) {
2614
- for (const h in i) {
2615
- const u = i[h];
2616
- if (!(h in t))
2613
+ function patchObject(t, s) {
2614
+ for (const d in s) {
2615
+ const u = s[d];
2616
+ if (!(d in t))
2617
2617
  continue;
2618
- const d = t[h];
2619
- isPlainObject(d) && isPlainObject(u) && !isRef(u) && !isReactive(u) ? t[h] = patchObject(d, u) : t[h] = u;
2618
+ const h = t[d];
2619
+ isPlainObject(h) && isPlainObject(u) && !isRef(u) && !isReactive(u) ? t[d] = patchObject(h, u) : t[d] = u;
2620
2620
  }
2621
2621
  return t;
2622
2622
  }
2623
2623
  const noop = () => {
2624
2624
  };
2625
- function addSubscription(t, i, h, u = noop) {
2626
- t.add(i);
2627
- const d = () => {
2628
- t.delete(i) && u();
2625
+ function addSubscription(t, s, d, u = noop) {
2626
+ t.add(s);
2627
+ const h = () => {
2628
+ t.delete(s) && u();
2629
2629
  };
2630
- return !h && getCurrentScope() && onScopeDispose(d), d;
2630
+ return !d && getCurrentScope() && onScopeDispose(h), h;
2631
2631
  }
2632
- function triggerSubscriptions(t, ...i) {
2633
- t.forEach((h) => {
2634
- h(...i);
2632
+ function triggerSubscriptions(t, ...s) {
2633
+ t.forEach((d) => {
2634
+ d(...s);
2635
2635
  });
2636
2636
  }
2637
2637
  const fallbackRunWithContext = (t) => t(), ACTION_MARKER = Symbol(), ACTION_NAME = Symbol();
2638
- function mergeReactiveObjects(t, i) {
2639
- t instanceof Map && i instanceof Map ? i.forEach((h, u) => t.set(u, h)) : t instanceof Set && i instanceof Set && i.forEach(t.add, t);
2640
- for (const h in i) {
2641
- if (!i.hasOwnProperty(h))
2638
+ function mergeReactiveObjects(t, s) {
2639
+ t instanceof Map && s instanceof Map ? s.forEach((d, u) => t.set(u, d)) : t instanceof Set && s instanceof Set && s.forEach(t.add, t);
2640
+ for (const d in s) {
2641
+ if (!s.hasOwnProperty(d))
2642
2642
  continue;
2643
- const u = i[h], d = t[h];
2644
- isPlainObject(d) && isPlainObject(u) && t.hasOwnProperty(h) && !isRef(u) && !isReactive(u) ? t[h] = mergeReactiveObjects(d, u) : t[h] = u;
2643
+ const u = s[d], h = t[d];
2644
+ isPlainObject(h) && isPlainObject(u) && t.hasOwnProperty(d) && !isRef(u) && !isReactive(u) ? t[d] = mergeReactiveObjects(h, u) : t[d] = u;
2645
2645
  }
2646
2646
  return t;
2647
2647
  }
@@ -2656,35 +2656,35 @@ const { assign } = Object;
2656
2656
  function isComputed(t) {
2657
2657
  return !!(isRef(t) && t.effect);
2658
2658
  }
2659
- function createOptionsStore(t, i, h, u) {
2660
- const { state: d, actions: E, getters: _ } = i, y = h.state.value[t];
2659
+ function createOptionsStore(t, s, d, u) {
2660
+ const { state: h, actions: E, getters: _ } = s, y = d.state.value[t];
2661
2661
  let R;
2662
2662
  function $() {
2663
- !y && (process.env.NODE_ENV === "production" || !u) && (h.state.value[t] = d ? d() : {});
2663
+ !y && (process.env.NODE_ENV === "production" || !u) && (d.state.value[t] = h ? h() : {});
2664
2664
  const w = process.env.NODE_ENV !== "production" && u ? (
2665
2665
  // use ref() to unwrap refs inside state TODO: check if this is still necessary
2666
- toRefs(ref(d ? d() : {}).value)
2667
- ) : toRefs(h.state.value[t]);
2668
- return assign(w, E, Object.keys(_ || {}).reduce((C, H) => (process.env.NODE_ENV !== "production" && H in w && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${H}" in store "${t}".`), C[H] = markRaw(computed(() => {
2669
- setActivePinia(h);
2670
- const B = h._s.get(t);
2666
+ toRefs(ref(h ? h() : {}).value)
2667
+ ) : toRefs(d.state.value[t]);
2668
+ return assign(w, E, Object.keys(_ || {}).reduce((k, H) => (process.env.NODE_ENV !== "production" && H in w && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${H}" in store "${t}".`), k[H] = markRaw(computed(() => {
2669
+ setActivePinia(d);
2670
+ const B = d._s.get(t);
2671
2671
  return _[H].call(B, B);
2672
- })), C), {}));
2672
+ })), k), {}));
2673
2673
  }
2674
- return R = createSetupStore(t, $, i, h, u, !0), R;
2674
+ return R = createSetupStore(t, $, s, d, u, !0), R;
2675
2675
  }
2676
- function createSetupStore(t, i, h = {}, u, d, E) {
2676
+ function createSetupStore(t, s, d = {}, u, h, E) {
2677
2677
  let _;
2678
- const y = assign({ actions: {} }, h);
2678
+ const y = assign({ actions: {} }, d);
2679
2679
  if (process.env.NODE_ENV !== "production" && !u._e.active)
2680
2680
  throw new Error("Pinia destroyed");
2681
2681
  const R = { deep: !0 };
2682
2682
  process.env.NODE_ENV !== "production" && (R.onTrigger = (I) => {
2683
2683
  $ ? B = I : $ == !1 && !v._hotUpdating && (Array.isArray(B) ? B.push(I) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
2684
2684
  });
2685
- let $, w, C = /* @__PURE__ */ new Set(), H = /* @__PURE__ */ new Set(), B;
2685
+ let $, w, k = /* @__PURE__ */ new Set(), H = /* @__PURE__ */ new Set(), B;
2686
2686
  const x = u.state.value[t];
2687
- !E && !x && (process.env.NODE_ENV === "production" || !d) && (u.state.value[t] = {});
2687
+ !E && !x && (process.env.NODE_ENV === "production" || !h) && (u.state.value[t] = {});
2688
2688
  const U = ref({});
2689
2689
  let Q;
2690
2690
  function J(I) {
@@ -2699,15 +2699,15 @@ function createSetupStore(t, i, h = {}, u, d, E) {
2699
2699
  storeId: t,
2700
2700
  events: B
2701
2701
  });
2702
- const k = Q = Symbol();
2702
+ const C = Q = Symbol();
2703
2703
  nextTick().then(() => {
2704
- Q === k && ($ = !0);
2705
- }), w = !0, triggerSubscriptions(C, N, u.state.value[t]);
2704
+ Q === C && ($ = !0);
2705
+ }), w = !0, triggerSubscriptions(k, N, u.state.value[t]);
2706
2706
  }
2707
2707
  const D = E ? function() {
2708
- const { state: N } = h, k = N ? N() : {};
2709
- this.$patch((z) => {
2710
- assign(z, k);
2708
+ const { state: N } = d, C = N ? N() : {};
2709
+ this.$patch((K) => {
2710
+ assign(K, C);
2711
2711
  });
2712
2712
  } : (
2713
2713
  /* istanbul ignore next */
@@ -2716,36 +2716,36 @@ function createSetupStore(t, i, h = {}, u, d, E) {
2716
2716
  } : noop
2717
2717
  );
2718
2718
  function P() {
2719
- _.stop(), C.clear(), H.clear(), u._s.delete(t);
2719
+ _.stop(), k.clear(), H.clear(), u._s.delete(t);
2720
2720
  }
2721
2721
  const F = (I, N = "") => {
2722
2722
  if (ACTION_MARKER in I)
2723
2723
  return I[ACTION_NAME] = N, I;
2724
- const k = function() {
2724
+ const C = function() {
2725
2725
  setActivePinia(u);
2726
- const z = Array.from(arguments), Z = /* @__PURE__ */ new Set(), fe = /* @__PURE__ */ new Set();
2727
- function Ie(K) {
2728
- Z.add(K);
2726
+ const K = Array.from(arguments), Z = /* @__PURE__ */ new Set(), fe = /* @__PURE__ */ new Set();
2727
+ function Ie(z) {
2728
+ Z.add(z);
2729
2729
  }
2730
- function he(K) {
2731
- fe.add(K);
2730
+ function he(z) {
2731
+ fe.add(z);
2732
2732
  }
2733
2733
  triggerSubscriptions(H, {
2734
- args: z,
2735
- name: k[ACTION_NAME],
2734
+ args: K,
2735
+ name: C[ACTION_NAME],
2736
2736
  store: v,
2737
2737
  after: Ie,
2738
2738
  onError: he
2739
2739
  });
2740
2740
  let le;
2741
2741
  try {
2742
- le = I.apply(this && this.$id === t ? this : v, z);
2743
- } catch (K) {
2744
- throw triggerSubscriptions(fe, K), K;
2742
+ le = I.apply(this && this.$id === t ? this : v, K);
2743
+ } catch (z) {
2744
+ throw triggerSubscriptions(fe, z), z;
2745
2745
  }
2746
- return le instanceof Promise ? le.then((K) => (triggerSubscriptions(Z, K), K)).catch((K) => (triggerSubscriptions(fe, K), Promise.reject(K))) : (triggerSubscriptions(Z, le), le);
2746
+ return le instanceof Promise ? le.then((z) => (triggerSubscriptions(Z, z), z)).catch((z) => (triggerSubscriptions(fe, z), Promise.reject(z))) : (triggerSubscriptions(Z, le), le);
2747
2747
  };
2748
- return k[ACTION_MARKER] = !0, k[ACTION_NAME] = N, k;
2748
+ return C[ACTION_MARKER] = !0, C[ACTION_NAME] = N, C;
2749
2749
  }, V = /* @__PURE__ */ markRaw({
2750
2750
  actions: {},
2751
2751
  getters: {},
@@ -2759,14 +2759,14 @@ function createSetupStore(t, i, h = {}, u, d, E) {
2759
2759
  $patch: J,
2760
2760
  $reset: D,
2761
2761
  $subscribe(I, N = {}) {
2762
- const k = addSubscription(C, I, N.detached, () => z()), z = _.run(() => watch(() => u.state.value[t], (Z) => {
2762
+ const C = addSubscription(k, I, N.detached, () => K()), K = _.run(() => watch(() => u.state.value[t], (Z) => {
2763
2763
  (N.flush === "sync" ? w : $) && I({
2764
2764
  storeId: t,
2765
2765
  type: MutationType.direct,
2766
2766
  events: B
2767
2767
  }, Z);
2768
2768
  }, assign({}, R, N)));
2769
- return k;
2769
+ return C;
2770
2770
  },
2771
2771
  $dispose: P
2772
2772
  }, v = reactive(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && IS_CLIENT ? assign(
@@ -2780,24 +2780,24 @@ function createSetupStore(t, i, h = {}, u, d, E) {
2780
2780
  // setupStore
2781
2781
  ) : ee);
2782
2782
  u._s.set(t, v);
2783
- const ne = (u._a && u._a.runWithContext || fallbackRunWithContext)(() => u._e.run(() => (_ = effectScope()).run(() => i({ action: F }))));
2784
- for (const I in ne) {
2785
- const N = ne[I];
2783
+ const re = (u._a && u._a.runWithContext || fallbackRunWithContext)(() => u._e.run(() => (_ = effectScope()).run(() => s({ action: F }))));
2784
+ for (const I in re) {
2785
+ const N = re[I];
2786
2786
  if (isRef(N) && !isComputed(N) || isReactive(N))
2787
- process.env.NODE_ENV !== "production" && d ? U.value[I] = toRef(ne, I) : E || (x && shouldHydrate(N) && (isRef(N) ? N.value = x[I] : mergeReactiveObjects(N, x[I])), u.state.value[t][I] = N), process.env.NODE_ENV !== "production" && V.state.push(I);
2787
+ process.env.NODE_ENV !== "production" && h ? U.value[I] = toRef(re, I) : E || (x && shouldHydrate(N) && (isRef(N) ? N.value = x[I] : mergeReactiveObjects(N, x[I])), u.state.value[t][I] = N), process.env.NODE_ENV !== "production" && V.state.push(I);
2788
2788
  else if (typeof N == "function") {
2789
- const k = process.env.NODE_ENV !== "production" && d ? N : F(N, I);
2790
- ne[I] = k, process.env.NODE_ENV !== "production" && (V.actions[I] = N), y.actions[I] = N;
2789
+ const C = process.env.NODE_ENV !== "production" && h ? N : F(N, I);
2790
+ re[I] = C, process.env.NODE_ENV !== "production" && (V.actions[I] = N), y.actions[I] = N;
2791
2791
  } else process.env.NODE_ENV !== "production" && isComputed(N) && (V.getters[I] = E ? (
2792
2792
  // @ts-expect-error
2793
- h.getters[I]
2794
- ) : N, IS_CLIENT && (ne._getters || // @ts-expect-error: same
2795
- (ne._getters = markRaw([]))).push(I));
2793
+ d.getters[I]
2794
+ ) : N, IS_CLIENT && (re._getters || // @ts-expect-error: same
2795
+ (re._getters = markRaw([]))).push(I));
2796
2796
  }
2797
- if (assign(v, ne), assign(toRaw(v), ne), Object.defineProperty(v, "$state", {
2798
- get: () => process.env.NODE_ENV !== "production" && d ? U.value : u.state.value[t],
2797
+ if (assign(v, re), assign(toRaw(v), re), Object.defineProperty(v, "$state", {
2798
+ get: () => process.env.NODE_ENV !== "production" && h ? U.value : u.state.value[t],
2799
2799
  set: (I) => {
2800
- if (process.env.NODE_ENV !== "production" && d)
2800
+ if (process.env.NODE_ENV !== "production" && h)
2801
2801
  throw new Error("cannot set hotState");
2802
2802
  J((N) => {
2803
2803
  assign(N, I);
@@ -2806,8 +2806,8 @@ function createSetupStore(t, i, h = {}, u, d, E) {
2806
2806
  }), process.env.NODE_ENV !== "production" && (v._hotUpdate = markRaw((I) => {
2807
2807
  v._hotUpdating = !0, I._hmrPayload.state.forEach((N) => {
2808
2808
  if (N in v.$state) {
2809
- const k = I.$state[N], z = v.$state[N];
2810
- typeof k == "object" && isPlainObject(k) && isPlainObject(z) ? patchObject(k, z) : I.$state[N] = z;
2809
+ const C = I.$state[N], K = v.$state[N];
2810
+ typeof C == "object" && isPlainObject(C) && isPlainObject(K) ? patchObject(C, K) : I.$state[N] = K;
2811
2811
  }
2812
2812
  v[N] = toRef(I.$state, N);
2813
2813
  }), Object.keys(v.$state).forEach((N) => {
@@ -2816,17 +2816,17 @@ function createSetupStore(t, i, h = {}, u, d, E) {
2816
2816
  $ = !0;
2817
2817
  });
2818
2818
  for (const N in I._hmrPayload.actions) {
2819
- const k = I[N];
2819
+ const C = I[N];
2820
2820
  v[N] = //
2821
- F(k, N);
2821
+ F(C, N);
2822
2822
  }
2823
2823
  for (const N in I._hmrPayload.getters) {
2824
- const k = I._hmrPayload.getters[N], z = E ? (
2824
+ const C = I._hmrPayload.getters[N], K = E ? (
2825
2825
  // special handling of options api
2826
- computed(() => (setActivePinia(u), k.call(v, v)))
2827
- ) : k;
2826
+ computed(() => (setActivePinia(u), C.call(v, v)))
2827
+ ) : C;
2828
2828
  v[N] = //
2829
- z;
2829
+ K;
2830
2830
  }
2831
2831
  Object.keys(v._hmrPayload.getters).forEach((N) => {
2832
2832
  N in I._hmrPayload.getters || delete v[N];
@@ -2852,7 +2852,7 @@ function createSetupStore(t, i, h = {}, u, d, E) {
2852
2852
  pinia: u,
2853
2853
  options: y
2854
2854
  }));
2855
- Object.keys(N || {}).forEach((k) => v._customProperties.add(k)), assign(v, N);
2855
+ Object.keys(N || {}).forEach((C) => v._customProperties.add(C)), assign(v, N);
2856
2856
  } else
2857
2857
  assign(v, _.run(() => I({
2858
2858
  store: v,
@@ -2862,13 +2862,13 @@ function createSetupStore(t, i, h = {}, u, d, E) {
2862
2862
  })));
2863
2863
  }), process.env.NODE_ENV !== "production" && v.$state && typeof v.$state == "object" && typeof v.$state.constructor == "function" && !v.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
2864
2864
  state: () => new MyClass()
2865
- Found in store "${v.$id}".`), x && E && h.hydrate && h.hydrate(v.$state, x), $ = !0, w = !0, v;
2865
+ Found in store "${v.$id}".`), x && E && d.hydrate && d.hydrate(v.$state, x), $ = !0, w = !0, v;
2866
2866
  }
2867
2867
  // @__NO_SIDE_EFFECTS__
2868
- function defineStore(t, i, h) {
2868
+ function defineStore(t, s, d) {
2869
2869
  let u;
2870
- const d = typeof i == "function";
2871
- u = d ? h : i;
2870
+ const h = typeof s == "function";
2871
+ u = h ? d : s;
2872
2872
  function E(_, y) {
2873
2873
  const R = hasInjectionContext();
2874
2874
  if (_ = // in test mode, ignore the argument provided as we can always retrieve a
@@ -2877,17 +2877,17 @@ function defineStore(t, i, h) {
2877
2877
  throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
2878
2878
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
2879
2879
  This will fail in production.`);
2880
- _ = activePinia, _._s.has(t) || (d ? createSetupStore(t, i, u, _) : createOptionsStore(t, u, _), process.env.NODE_ENV !== "production" && (E._pinia = _));
2880
+ _ = activePinia, _._s.has(t) || (h ? createSetupStore(t, s, u, _) : createOptionsStore(t, u, _), process.env.NODE_ENV !== "production" && (E._pinia = _));
2881
2881
  const $ = _._s.get(t);
2882
2882
  if (process.env.NODE_ENV !== "production" && y) {
2883
- const w = "__hot:" + t, C = d ? createSetupStore(w, i, u, _, !0) : createOptionsStore(w, assign({}, u), _, !0);
2884
- y._hotUpdate(C), delete _.state.value[w], _._s.delete(w);
2883
+ const w = "__hot:" + t, k = h ? createSetupStore(w, s, u, _, !0) : createOptionsStore(w, assign({}, u), _, !0);
2884
+ y._hotUpdate(k), delete _.state.value[w], _._s.delete(w);
2885
2885
  }
2886
2886
  if (process.env.NODE_ENV !== "production" && IS_CLIENT) {
2887
2887
  const w = getCurrentInstance();
2888
2888
  if (w && w.proxy && // avoid adding stores that are just built for hot module replacement
2889
2889
  !y) {
2890
- const C = w.proxy, H = "_pStores" in C ? C._pStores : C._pStores = {};
2890
+ const k = w.proxy, H = "_pStores" in k ? k._pStores : k._pStores = {};
2891
2891
  H[t] = $;
2892
2892
  }
2893
2893
  }
@@ -2905,8 +2905,8 @@ const useLinidZoneStore = /* @__PURE__ */ defineStore("linidZoneStore", {
2905
2905
  * @param zone - The name of the zone.
2906
2906
  * @param entry - The entry to register.
2907
2907
  */
2908
- register(t, i) {
2909
- this.zones[t] || (this.zones[t] = []), this.zones[t].push(i);
2908
+ register(t, s) {
2909
+ this.zones[t] || (this.zones[t] = []), this.zones[t].push(s);
2910
2910
  }
2911
2911
  }
2912
2912
  }), _sfc_main = /* @__PURE__ */ defineComponent({
@@ -2915,26 +2915,93 @@ const useLinidZoneStore = /* @__PURE__ */ defineStore("linidZoneStore", {
2915
2915
  zone: {}
2916
2916
  },
2917
2917
  setup(t) {
2918
- const i = t, h = useLinidZoneStore(), u = ref([]), d = ref(!1);
2918
+ const s = t, d = useLinidZoneStore(), u = ref([]), h = ref(!1);
2919
2919
  return watchEffect(() => {
2920
- d.value = !1;
2921
- const E = h.zones[i.zone] || [];
2920
+ h.value = !1;
2921
+ const E = d.zones[s.zone] || [];
2922
2922
  u.value = E.map((_) => ({
2923
2923
  ..._,
2924
2924
  component: loadAsyncComponent(_.plugin)
2925
2925
  })), Promise.resolve().then(() => {
2926
- d.value = !0;
2926
+ h.value = !0;
2927
2927
  });
2928
2928
  }), (E, _) => (openBlock(), createElementBlock(Fragment, null, [
2929
2929
  (openBlock(!0), createElementBlock(Fragment, null, renderList(u.value, (y, R) => (openBlock(), createBlock(resolveDynamicComponent(y.component), mergeProps({
2930
2930
  key: y.plugin + R
2931
2931
  }, { ref_for: !0 }, y.props), null, 16))), 128)),
2932
- d.value && u.value.length === 0 ? renderSlot(E.$slots, "default", { key: 0 }, () => [
2932
+ h.value && u.value.length === 0 ? renderSlot(E.$slots, "default", { key: 0 }, () => [
2933
2933
  _[0] || (_[0] = createElementVNode("div", null, "No components to render in this zone.", -1))
2934
2934
  ]) : createCommentVNode("", !0)
2935
2935
  ], 64));
2936
2936
  }
2937
2937
  });
2938
+ let httpClient = null;
2939
+ function setHttpClient(t) {
2940
+ if (httpClient !== null) {
2941
+ console.warn(
2942
+ "[LinID CoreLib] HTTP client has already been initialized. Re-initialization is ignored."
2943
+ );
2944
+ return;
2945
+ }
2946
+ httpClient = t;
2947
+ }
2948
+ function getHttpClient() {
2949
+ if (httpClient === null)
2950
+ throw new Error(
2951
+ "[LinID CoreLib] HTTP client is not initialized. Call setHttpClient() first."
2952
+ );
2953
+ return httpClient;
2954
+ }
2955
+ async function getEntitiesConfiguration() {
2956
+ return (await getHttpClient().get("/metadata/entities")).data;
2957
+ }
2958
+ async function getRoutesConfiguration() {
2959
+ return (await getHttpClient().get("/metadata/routes")).data;
2960
+ }
2961
+ const useLinIdConfigurationStore = /* @__PURE__ */ defineStore(
2962
+ "linidConfigurationStore",
2963
+ {
2964
+ state: () => ({
2965
+ entities: [],
2966
+ routes: [],
2967
+ loading: !1,
2968
+ error: null
2969
+ }),
2970
+ getters: {
2971
+ /**
2972
+ * Returns an entity configuration by name.
2973
+ * @param state - The store state.
2974
+ * @returns A function that takes an entity name and returns the configuration.
2975
+ */
2976
+ getEntityByName: (t) => (s) => t.entities.find((d) => d.name === s),
2977
+ /**
2978
+ * Returns all routes for a specific entity.
2979
+ * @param state - The store state.
2980
+ * @returns A function that takes an entity name and returns its routes.
2981
+ */
2982
+ getRoutesByEntity: (t) => (s) => t.routes.filter((d) => d.entity === s)
2983
+ },
2984
+ actions: {
2985
+ /**
2986
+ * Fetches all entity and route configurations from the backend.
2987
+ */
2988
+ async fetchConfiguration() {
2989
+ this.loading = !0, this.error = null;
2990
+ try {
2991
+ const [t, s] = await Promise.all([
2992
+ getEntitiesConfiguration(),
2993
+ getRoutesConfiguration()
2994
+ ]);
2995
+ this.entities = t, this.routes = s;
2996
+ } catch (t) {
2997
+ this.error = t instanceof Error ? t.message : "Failed to fetch configuration", console.error("[LinID CoreLib] Failed to fetch configuration:", t);
2998
+ } finally {
2999
+ this.loading = !1;
3000
+ }
3001
+ }
3002
+ }
3003
+ }
3004
+ );
2938
3005
  var ModuleLifecyclePhase = /* @__PURE__ */ ((t) => (t.SETUP = "setup", t.CONFIGURE = "configure", t.INITIALIZE = "initialize", t.READY = "ready", t.POST_INIT = "postInit", t))(ModuleLifecyclePhase || {});
2939
3006
  class BasicRemoteModule {
2940
3007
  /**
@@ -2962,8 +3029,8 @@ class BasicRemoteModule {
2962
3029
  * @param version - Module version (semver).
2963
3030
  * @param description - Optional module description.
2964
3031
  */
2965
- constructor(i, h, u, d) {
2966
- this.id = i, this.name = h, this.version = u, this.description = d;
3032
+ constructor(s, d, u, h) {
3033
+ this.id = s, this.name = d, this.version = u, this.description = h;
2967
3034
  }
2968
3035
  /**
2969
3036
  * Setup phase - validate dependencies and prepare the module.
@@ -2989,7 +3056,7 @@ class BasicRemoteModule {
2989
3056
  * @param config - Module-specific configuration from host.
2990
3057
  * @returns Promise resolving to the lifecycle result.
2991
3058
  */
2992
- async configure(i) {
3059
+ async configure(s) {
2993
3060
  return { success: !0 };
2994
3061
  }
2995
3062
  /**
@@ -3036,5 +3103,8 @@ export {
3036
3103
  BasicRemoteModule,
3037
3104
  _sfc_main as LinidZoneRenderer,
3038
3105
  ModuleLifecyclePhase,
3106
+ getHttpClient,
3107
+ setHttpClient,
3108
+ useLinIdConfigurationStore,
3039
3109
  useLinidZoneStore
3040
3110
  };