@module-federation/bridge-vue3 2.8.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import * as Zt from "vue";
2
- import { defineComponent as Xt, ref as V, useAttrs as Yt, watch as Qt, onMounted as er, onActivated as tr, nextTick as rr, onDeactivated as or, onBeforeUnmount as nr, createVNode as sr, mergeProps as ir, defineAsyncComponent as ar, h as cr } from "vue";
3
- import * as fe from "vue-router";
1
+ import * as Xt from "vue";
2
+ import { defineComponent as Yt, ref as V, useAttrs as Qt, watch as er, onMounted as tr, onActivated as rr, nextTick as or, onDeactivated as nr, onBeforeUnmount as sr, createVNode as ir, mergeProps as ar, defineAsyncComponent as cr, h as lr } from "vue";
3
+ import * as de from "vue-router";
4
4
  import { useRoute as rt } from "vue-router";
5
- const lr = ".json", ur = "FEDERATION_DEBUG", hr = ":";
5
+ const ur = ".json", fr = "FEDERATION_DEBUG", hr = ":";
6
6
  let Ne = /* @__PURE__ */ function(e) {
7
7
  return e[e.UNKNOWN = 1] = "UNKNOWN", e[e.CALCULATED = 2] = "CALCULATED", e[e.NO_USE = 0] = "NO_USE", e;
8
8
  }({});
@@ -13,26 +13,28 @@ function ot() {
13
13
  function nt() {
14
14
  return typeof navigator < "u" && (navigator == null ? void 0 : navigator.product) === "ReactNative";
15
15
  }
16
- function fr() {
16
+ function dr() {
17
17
  try {
18
- if (ot() && window.localStorage) return !!localStorage.getItem(ur);
18
+ if (ot() && window.localStorage) return !!localStorage.getItem(fr);
19
19
  } catch {
20
20
  return !1;
21
21
  }
22
22
  return !1;
23
23
  }
24
24
  function Ae() {
25
- return typeof process < "u" && process.env && process.env.FEDERATION_DEBUG ? !!process.env.FEDERATION_DEBUG : typeof FEDERATION_DEBUG < "u" && FEDERATION_DEBUG ? !0 : fr();
25
+ return typeof process < "u" && process.env && process.env.FEDERATION_DEBUG ? !!process.env.FEDERATION_DEBUG : typeof FEDERATION_DEBUG < "u" && FEDERATION_DEBUG ? !0 : dr();
26
26
  }
27
- const dr = "[ Federation Runtime ]", st = function(...e) {
27
+ const mr = "[ Federation Runtime ]", st = function(...e) {
28
28
  return e.length ? e.reduce((t, r) => r ? t ? `${t}${hr}${r}` : r : t, "") : "";
29
- }, Me = (e, t) => {
29
+ };
30
+ function Me(e, t) {
30
31
  if ("getPublicPath" in e) {
31
32
  let r;
32
33
  return e.getPublicPath.startsWith("function") ? r = new Function("return " + e.getPublicPath)()() : r = new Function(e.getPublicPath)(), `${r}${t}`;
33
34
  } else return "publicPath" in e ? !ot() && !nt() && "ssrPublicPath" in e && typeof e.ssrPublicPath == "string" ? `${e.ssrPublicPath}${t}` : `${e.publicPath}${t}` : (console.warn("Cannot get resource URL. If in debug mode, please ignore.", e, t), "");
34
- }, it = (e) => {
35
- console.warn(`${dr}: ${e}`);
35
+ }
36
+ const it = (e) => {
37
+ console.warn(`${mr}: ${e}`);
36
38
  };
37
39
  function at(e) {
38
40
  try {
@@ -41,7 +43,7 @@ function at(e) {
41
43
  return "";
42
44
  }
43
45
  }
44
- const be = (e, t) => {
46
+ const we = (e, t) => {
45
47
  if (!e) return t;
46
48
  const o = ((n) => {
47
49
  if (n === ".") return "";
@@ -54,33 +56,33 @@ const be = (e, t) => {
54
56
  })(e);
55
57
  return o ? o.endsWith("/") ? `${o}${t}` : `${o}/${t}` : t;
56
58
  };
57
- function mr(e) {
59
+ function pr(e) {
58
60
  return e.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
59
61
  }
60
- function pr(e, t = {}) {
62
+ function yr(e, t = {}) {
61
63
  var R;
62
64
  const { remotes: r = {}, overrides: o = {}, version: n } = t;
63
65
  let s;
64
- const i = () => "publicPath" in e.metaData ? (e.metaData.publicPath === "auto" || e.metaData.publicPath === "") && n ? mr(n) : e.metaData.publicPath : e.metaData.getPublicPath, c = Object.keys(o);
66
+ const i = () => "publicPath" in e.metaData ? (e.metaData.publicPath === "auto" || e.metaData.publicPath === "") && n ? pr(n) : e.metaData.publicPath : e.metaData.getPublicPath, c = Object.keys(o);
65
67
  let a = {};
66
68
  Object.keys(r).length || (a = ((R = e.remotes) == null ? void 0 : R.reduce((g, _) => {
67
- let S;
69
+ let b;
68
70
  const I = _.federationContainerName;
69
- return c.includes(I) ? S = o[I] : "version" in _ ? S = _.version : S = _.entry, g[I] = { matchedVersion: S }, g;
71
+ return c.includes(I) ? b = o[I] : "version" in _ ? b = _.version : b = _.entry, g[I] = { matchedVersion: b }, g;
70
72
  }, {})) || {}), Object.keys(r).forEach((g) => a[g] = { matchedVersion: c.includes(g) ? o[g] : r[g] });
71
- const { remoteEntry: { path: l, name: u, type: h }, types: m = {
73
+ const { remoteEntry: { path: l, name: u, type: f }, types: m = {
72
74
  path: "",
73
75
  name: "",
74
76
  zip: "",
75
77
  api: ""
76
- }, buildInfo: { buildVersion: f }, globalName: d, ssrRemoteEntry: p } = e.metaData, { exposes: E } = e;
78
+ }, buildInfo: { buildVersion: h }, globalName: d, ssrRemoteEntry: p } = e.metaData, { exposes: E } = e;
77
79
  let y = {
78
80
  version: n || "",
79
- buildVersion: f,
81
+ buildVersion: h,
80
82
  globalName: d,
81
- remoteEntry: be(l, u),
82
- remoteEntryType: h,
83
- remoteTypes: be(m.path, m.name),
83
+ remoteEntry: we(l, u),
84
+ remoteEntryType: f,
85
+ remoteTypes: we(m.path, m.name),
84
86
  remoteTypesZip: m.zip || "",
85
87
  remoteTypesAPI: m.api || "",
86
88
  remotesInfo: a,
@@ -103,15 +105,15 @@ function pr(e, t = {}) {
103
105
  ...y,
104
106
  getPublicPath: i()
105
107
  }, p) {
106
- const g = be(p.path, p.name);
108
+ const g = we(p.path, p.name);
107
109
  s.ssrRemoteEntry = g, s.ssrRemoteEntryType = p.type || "commonjs-module";
108
110
  }
109
111
  return s;
110
112
  }
111
113
  function ct(e) {
112
- return !!("remoteEntry" in e && e.remoteEntry.includes(lr));
114
+ return !!("remoteEntry" in e && e.remoteEntry.includes(ur));
113
115
  }
114
- const yr = "[ Module Federation ]", Q = console, Er = [
116
+ const Er = "[ Module Federation ]", Q = console, gr = [
115
117
  "logger.ts",
116
118
  "logger.js",
117
119
  "captureStackTrace",
@@ -122,12 +124,12 @@ const yr = "[ Module Federation ]", Q = console, Er = [
122
124
  "Logger.error",
123
125
  "Logger.debug"
124
126
  ];
125
- function gr() {
127
+ function Rr() {
126
128
  try {
127
129
  const e = (/* @__PURE__ */ new Error()).stack;
128
130
  if (!e) return;
129
131
  const [, ...t] = e.split(`
130
- `), r = t.filter((o) => !Er.some((n) => o.includes(n)));
132
+ `), r = t.filter((o) => !gr.some((n) => o.includes(n)));
131
133
  return r.length ? `Stack trace:
132
134
  ${r.slice(0, 5).join(`
133
135
  `)}` : void 0;
@@ -146,7 +148,7 @@ var lt = class {
146
148
  this.delegate = e ?? Q;
147
149
  }
148
150
  emit(e, t) {
149
- const r = this.delegate, o = Ae() ? gr() : void 0, n = o ? [...t, o] : t, s = (() => {
151
+ const r = this.delegate, o = Ae() ? Rr() : void 0, n = o ? [...t, o] : t, s = (() => {
150
152
  switch (e) {
151
153
  case "log":
152
154
  return ["log", "info"];
@@ -208,7 +210,7 @@ var lt = class {
208
210
  function ut(e) {
209
211
  return new lt(e);
210
212
  }
211
- function Rr(e) {
213
+ function _r(e) {
212
214
  const t = new lt(e);
213
215
  return Object.defineProperty(t, "__mf_infrastructure_logger__", {
214
216
  value: !0,
@@ -216,8 +218,8 @@ function Rr(e) {
216
218
  configurable: !1
217
219
  }), t;
218
220
  }
219
- Rr(yr);
220
- async function ht(e, t) {
221
+ _r(Er);
222
+ async function ft(e, t) {
221
223
  try {
222
224
  return await e();
223
225
  } catch (r) {
@@ -229,12 +231,12 @@ function Pe(e, t) {
229
231
  const r = /^(https?:)?\/\//i;
230
232
  return e.replace(r, "").replace(/\/$/, "") === t.replace(r, "").replace(/\/$/, "");
231
233
  }
232
- function ft(e) {
234
+ function ht(e) {
233
235
  let t = null, r = !0, o = 2e4, n;
234
236
  const s = document.getElementsByTagName("script");
235
237
  for (let l = 0; l < s.length; l++) {
236
- const u = s[l], h = u.getAttribute("src");
237
- if (h && Pe(h, e.url)) {
238
+ const u = s[l], f = u.getAttribute("src");
239
+ if (f && Pe(f, e.url)) {
238
240
  t = u, r = !1;
239
241
  break;
240
242
  }
@@ -243,8 +245,8 @@ function ft(e) {
243
245
  const l = e.attrs;
244
246
  t = document.createElement("script"), t.type = (l == null ? void 0 : l.type) === "module" ? "module" : "text/javascript";
245
247
  let u;
246
- e.createScriptHook && (u = e.createScriptHook(e.url, e.attrs), u instanceof HTMLScriptElement ? t = u : typeof u == "object" && ("script" in u && u.script && (t = u.script), "timeout" in u && u.timeout && (o = u.timeout))), t.src || (t.src = e.url), l && !u && Object.keys(l).forEach((h) => {
247
- t && (h === "async" || h === "defer" ? t[h] = l[h] : t.getAttribute(h) || t.setAttribute(h, l[h]));
248
+ e.createScriptHook && (u = e.createScriptHook(e.url, e.attrs), u instanceof HTMLScriptElement ? t = u : typeof u == "object" && ("script" in u && u.script && (t = u.script), "timeout" in u && u.timeout && (o = u.timeout))), t.src || (t.src = e.url), l && !u && Object.keys(l).forEach((f) => {
249
+ t && (f === "async" || f === "defer" ? t[f] = l[f] : t.getAttribute(f) || t.setAttribute(f, l[f]));
248
250
  });
249
251
  }
250
252
  let i = null;
@@ -257,24 +259,24 @@ function ft(e) {
257
259
  c && window.addEventListener("error", c);
258
260
  const a = async (l, u) => {
259
261
  clearTimeout(n), c && window.removeEventListener("error", c);
260
- const h = () => {
262
+ const f = () => {
261
263
  if ((u == null ? void 0 : u.type) === "error") {
262
264
  const m = /* @__PURE__ */ new Error(u != null && u.isTimeout ? `ScriptNetworkError: Script "${e.url}" timed out.` : `ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);
263
265
  m.name = "ScriptNetworkError", e != null && e.onErrorCallback && (e == null || e.onErrorCallback(m));
264
266
  } else i ? e != null && e.onErrorCallback && (e == null || e.onErrorCallback(i)) : e != null && e.cb && (e == null || e.cb());
265
267
  };
266
- if (t && (t.onerror = null, t.onload = null, ht(() => {
268
+ if (t && (t.onerror = null, t.onload = null, ft(() => {
267
269
  const { needDeleteScript: m = !0 } = e;
268
270
  m && t != null && t.parentNode && t.parentNode.removeChild(t);
269
271
  }), l && typeof l == "function")) {
270
272
  const m = l(u);
271
273
  if (m instanceof Promise) {
272
- const f = await m;
273
- return h(), f;
274
+ const h = await m;
275
+ return f(), h;
274
276
  }
275
- return h(), m;
277
+ return f(), m;
276
278
  }
277
- h();
279
+ f();
278
280
  };
279
281
  return t.onerror = a.bind(null, t.onerror), t.onload = a.bind(null, t.onload), n = setTimeout(() => {
280
282
  a(null, {
@@ -286,7 +288,7 @@ function ft(e) {
286
288
  needAttach: r
287
289
  };
288
290
  }
289
- function _r(e) {
291
+ function br(e) {
290
292
  let t = null, r = !0, o = 2e4, n;
291
293
  const s = document.getElementsByTagName("link");
292
294
  for (let c = 0; c < s.length; c++) {
@@ -319,7 +321,7 @@ function _r(e) {
319
321
  u.name = "LinkNetworkError", e != null && e.onErrorCallback && (e == null || e.onErrorCallback(u));
320
322
  } else e != null && e.cb && (e == null || e.cb());
321
323
  };
322
- if (t && (t.onerror = null, t.onload = null, ht(() => {
324
+ if (t && (t.onerror = null, t.onload = null, ft(() => {
323
325
  const { needDeleteLink: u = !0 } = e;
324
326
  u && t != null && t.parentNode && t.parentNode.removeChild(t);
325
327
  }), c)) {
@@ -341,7 +343,7 @@ function _r(e) {
341
343
  function Sr(e, t) {
342
344
  const { attrs: r = {}, createScriptHook: o } = t;
343
345
  return new Promise((n, s) => {
344
- const { script: i, needAttach: c } = ft({
346
+ const { script: i, needAttach: c } = ht({
345
347
  url: e,
346
348
  cb: n,
347
349
  onErrorCallback: s,
@@ -355,19 +357,19 @@ function Sr(e, t) {
355
357
  c && document.head.appendChild(i);
356
358
  });
357
359
  }
358
- const le = /* @__PURE__ */ new Map();
360
+ const ce = /* @__PURE__ */ new Map();
359
361
  function x(e) {
360
362
  if (!e) throw new Error("import specifier is required");
361
- if (le.has(e)) return le.get(e);
363
+ if (ce.has(e)) return ce.get(e);
362
364
  const t = new Function("name", "return import(name)")(e).then((r) => r).catch((r) => {
363
- throw console.error(`Error importing module ${e}:`, r), le.delete(e), r;
365
+ throw console.error(`Error importing module ${e}:`, r), ce.delete(e), r;
364
366
  });
365
- return le.set(e, t), t;
367
+ return ce.set(e, t), t;
366
368
  }
367
- const br = async (e, t, r) => {
369
+ const wr = async (e, t, r) => {
368
370
  const n = await ((s, i) => r.lifecycle.fetch.emit(s, i))(e, t || {});
369
371
  return !n || !(n instanceof Response) ? fetch(e, t || {}) : n;
370
- }, wr = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (e, t, r, o) => {
372
+ }, Ir = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (e, t, r, o) => {
371
373
  if (o != null && o.createScriptHook) {
372
374
  const c = o.createScriptHook(e);
373
375
  c && typeof c == "object" && "url" in c && (e = c.url);
@@ -379,16 +381,16 @@ const br = async (e, t, r) => {
379
381
  console.error("Error constructing URL:", c), t(/* @__PURE__ */ new Error(`Invalid URL: ${c}`));
380
382
  return;
381
383
  }
382
- const s = async () => o != null && o.fetch ? (c, a) => br(c, a, o) : fetch, i = async (c, a) => {
384
+ const s = async () => o != null && o.fetch ? (c, a) => wr(c, a, o) : fetch, i = async (c, a) => {
383
385
  var l;
384
386
  try {
385
- const h = await (await c(a.href)).text(), [m, f] = await Promise.all([x("path"), x("vm")]), d = {
387
+ const f = await (await c(a.href)).text(), [m, h] = await Promise.all([x("path"), x("vm")]), d = {
386
388
  exports: {},
387
389
  module: { exports: {} }
388
- }, p = a.pathname.split("/").slice(0, -1).join("/"), E = m.basename(a.pathname), y = new f.Script(`(function(exports, module, require, __dirname, __filename) {${h}
390
+ }, p = a.pathname.split("/").slice(0, -1).join("/"), E = m.basename(a.pathname), y = new h.Script(`(function(exports, module, require, __dirname, __filename) {${f}
389
391
  })`, {
390
392
  filename: E,
391
- importModuleDynamically: ((l = f.constants) == null ? void 0 : l.USE_MAIN_CONTEXT_DEFAULT_LOADER) ?? x
393
+ importModuleDynamically: ((l = h.constants) == null ? void 0 : l.USE_MAIN_CONTEXT_DEFAULT_LOADER) ?? x
392
394
  });
393
395
  let R;
394
396
  R = (await x("node:module")).createRequire(a.protocol === "file:" || a.protocol === "node:" ? a.href : m.join(process.cwd(), "__mf_require_base__.js")), y.runInThisContext()(d.exports, d.module, R, p, E);
@@ -417,8 +419,8 @@ const br = async (e, t, r) => {
417
419
  });
418
420
  } : (e, t, r, o) => {
419
421
  t(/* @__PURE__ */ new Error("createScriptNode is disabled in non-Node.js environment"));
420
- }, Ir = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (e, t) => new Promise((r, o) => {
421
- wr(e, (n, s) => {
422
+ }, $r = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (e, t) => new Promise((r, o) => {
423
+ Ir(e, (n, s) => {
422
424
  var i, c;
423
425
  if (n) o(n);
424
426
  else {
@@ -429,42 +431,42 @@ const br = async (e, t, r) => {
429
431
  }) : (e, t) => {
430
432
  throw new Error("loadScriptNode is disabled in non-Node.js environment");
431
433
  }, Z = /* @__PURE__ */ new Map(), dt = (e) => e.startsWith("http:") || e.startsWith("https:"), mt = (e) => !e.startsWith("./") && !e.startsWith("../") && !e.startsWith("/") && !e.includes(":");
432
- function $r(e) {
434
+ function Tr(e) {
433
435
  const t = new URL(e), r = encodeURIComponent(t.protocol.slice(0, -1)), o = encodeURIComponent(t.host), n = t.pathname.split("/").map((i) => encodeURIComponent(i)).join("/"), s = encodeURIComponent(`${t.search}${t.hash}`);
434
436
  return `/${r}/${o}${n}${s ? `/${s}` : ""}`;
435
437
  }
436
- function Tr(e, t) {
438
+ function vr(e, t) {
437
439
  const r = t.endsWith("/") ? t : `${t}/`;
438
- return new URL(`__module_federation_remote__${$r(e)}`, r).href;
440
+ return new URL(`__module_federation_remote__${Tr(e)}`, r).href;
439
441
  }
440
- async function vr(e) {
442
+ async function Nr(e) {
441
443
  return e.startsWith("node:") ? !0 : mt(e) ? (await x("node:module")).builtinModules.includes(e) : !1;
442
444
  }
443
- function Nr(e) {
445
+ function Ar(e) {
444
446
  const t = e && (typeof e == "object" || typeof e == "function") ? e : { default: e }, r = { ...t };
445
447
  return Object.prototype.hasOwnProperty.call(r, "default") || (r.default = t), r;
446
448
  }
447
- async function Ar(e, t, r) {
449
+ async function Mr(e, t, r) {
448
450
  if (typeof r.SyntheticModule != "function") throw new Error("vm.SyntheticModule is required to load Node.js built-in modules in ESM remote entries.");
449
- const o = Nr(t), n = Object.keys(o), s = new r.SyntheticModule(n, function() {
451
+ const o = Ar(t), n = Object.keys(o), s = new r.SyntheticModule(n, function() {
450
452
  for (const c of n) this.setExport(c, o[c]);
451
453
  }, { identifier: e });
452
454
  return Z.set(e, s), await s.link(async () => {
453
455
  throw new Error(`Node.js built-in module "${e}" should not request child modules.`);
454
456
  }), await s.evaluate(), s;
455
457
  }
456
- async function Mr(e, t) {
458
+ async function Pr(e, t) {
457
459
  const r = `node-builtin:${e}`;
458
- return Z.has(r) ? Z.get(r) : Ar(r, await x(e), t);
460
+ return Z.has(r) ? Z.get(r) : Mr(r, await x(e), t);
459
461
  }
460
462
  async function We(e, t, r) {
461
- if (await vr(e)) return Mr(e, r.vm);
463
+ if (await Nr(e)) return Pr(e, r.vm);
462
464
  if (mt(e)) throw new Error(`Unsupported ESM module specifier "${e}". Only relative or absolute http(s) remote modules and Node.js built-in modules are supported.`);
463
465
  const o = new URL(e, t).href;
464
466
  if (!dt(o)) throw new Error(`Unsupported ESM module specifier "${e}" resolved to "${o}". Only http(s) remote modules and Node.js built-in modules are supported.`);
465
467
  return pt(o, r);
466
468
  }
467
- async function Pr(e) {
469
+ async function kr(e) {
468
470
  if (e.status === "linked" && await e.evaluate(), e.status === "errored") throw e.error;
469
471
  return e;
470
472
  }
@@ -475,19 +477,19 @@ async function pt(e, t) {
475
477
  const n = await (await r(e)).text(), s = (await x("node:url")).pathToFileURL(process.cwd()).href, i = new o.SourceTextModule(n, {
476
478
  identifier: e,
477
479
  initializeImportMeta: (c) => {
478
- c.url = Tr(e, s);
480
+ c.url = vr(e, s);
479
481
  },
480
- importModuleDynamically: async (c) => Pr(await We(c, e, t))
482
+ importModuleDynamically: async (c) => kr(await We(c, e, t))
481
483
  });
482
484
  return Z.set(e, i), await i.link(async (c) => We(c, e, t)), i;
483
485
  }
484
- const C = ut("[ Module Federation Bridge Vue3 ]"), kr = (e) => `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`, yt = (e, t, r, o) => {
486
+ const C = ut("[ Module Federation Bridge Vue3 ]"), Or = (e) => `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`, yt = (e, t, r, o) => {
485
487
  const n = [`${[t[e]]} #${e}`];
486
- return r && n.push(`args: ${JSON.stringify(r)}`), n.push(kr(e)), o && n.push(`Original Error Message:
488
+ return r && n.push(`args: ${JSON.stringify(r)}`), n.push(Or(e)), o && n.push(`Original Error Message:
487
489
  ${o}`), n.join(`
488
490
  `);
489
491
  };
490
- function Or(e, t, r, o, n, s) {
492
+ function Lr(e, t, r, o, n, s) {
491
493
  return o(yt(e, t, r, n));
492
494
  }
493
495
  const U = "[ Federation Runtime ]", ke = ut(U);
@@ -495,19 +497,19 @@ function L(e, t, r, o, n) {
495
497
  e || w(t);
496
498
  }
497
499
  function w(e, t, r, o, n) {
498
- if (t !== void 0) return Or(e, t, r ?? {}, (i) => {
500
+ if (t !== void 0) return Lr(e, t, r ?? {}, (i) => {
499
501
  throw new Error(`${U}: ${i}`);
500
502
  }, o);
501
503
  const s = e;
502
504
  throw s instanceof Error ? (s.message.startsWith(U) || (s.message = `${U}: ${s.message}`), s) : new Error(`${U}: ${s}`);
503
505
  }
504
- function ne(e) {
506
+ function oe(e) {
505
507
  e instanceof Error && (e.message.startsWith(U) || (e.message = `${U}: ${e.message}`)), ke.warn(e);
506
508
  }
507
- function Lr(e, t) {
509
+ function Cr(e, t) {
508
510
  return e.findIndex((r) => r === t) === -1 && e.push(t), e;
509
511
  }
510
- function se(e) {
512
+ function ne(e) {
511
513
  return "version" in e && e.version ? `${e.name}:${e.version}` : "entry" in e && e.entry ? `${e.name}:${e.entry}` : `${e.name}`;
512
514
  }
513
515
  function Ce(e) {
@@ -519,9 +521,9 @@ function Et(e) {
519
521
  function Fe(e) {
520
522
  return e && typeof e == "object";
521
523
  }
522
- const Cr = Object.prototype.toString;
523
- function Fr(e) {
524
- return Cr.call(e) === "[object Object]";
524
+ const Fr = Object.prototype.toString;
525
+ function Hr(e) {
526
+ return Fr.call(e) === "[object Object]";
525
527
  }
526
528
  function gt(e) {
527
529
  return Array.isArray(e) ? e : [e];
@@ -542,7 +544,7 @@ function Rt(e) {
542
544
  globalName: e.globalName
543
545
  } : t;
544
546
  }
545
- const Hr = (e, t) => {
547
+ const Dr = (e, t) => {
546
548
  let r;
547
549
  return e.endsWith("/") ? r = e.slice(0, -1) : r = e, t.startsWith(".") && (t = t.slice(1)), r = r + t, r;
548
550
  }, v = typeof globalThis == "object" ? globalThis : window, k = (() => {
@@ -551,34 +553,34 @@ const Hr = (e, t) => {
551
553
  } catch {
552
554
  return v;
553
555
  }
554
- })(), _e = k;
555
- function de(e, t, r) {
556
+ })(), be = k;
557
+ function me(e, t, r) {
556
558
  Object.defineProperty(e, t, {
557
559
  value: r,
558
560
  configurable: !1,
559
561
  writable: !0
560
562
  });
561
563
  }
562
- function me(e, t) {
564
+ function pe(e, t) {
563
565
  return Object.hasOwnProperty.call(e, t);
564
566
  }
565
- me(v, "__GLOBAL_LOADING_REMOTE_ENTRY__") || de(v, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
567
+ pe(v, "__GLOBAL_LOADING_REMOTE_ENTRY__") || me(v, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
566
568
  const J = v.__GLOBAL_LOADING_REMOTE_ENTRY__;
567
569
  function _t(e) {
568
570
  var t, r, o, n, s, i;
569
- me(e, "__VMOK__") && !me(e, "__FEDERATION__") && de(e, "__FEDERATION__", e.__VMOK__), me(e, "__FEDERATION__") || (de(e, "__FEDERATION__", {
571
+ pe(e, "__VMOK__") && !pe(e, "__FEDERATION__") && me(e, "__FEDERATION__", e.__VMOK__), pe(e, "__FEDERATION__") || (me(e, "__FEDERATION__", {
570
572
  __GLOBAL_PLUGIN__: [],
571
573
  __INSTANCES__: [],
572
574
  moduleInfo: {},
573
575
  __SHARE__: {},
574
576
  __MANIFEST_LOADING__: {},
575
577
  __PRELOADED_MAP__: /* @__PURE__ */ new Map()
576
- }), de(e, "__VMOK__", e.__FEDERATION__)), (t = e.__FEDERATION__).__GLOBAL_PLUGIN__ ?? (t.__GLOBAL_PLUGIN__ = []), (r = e.__FEDERATION__).__INSTANCES__ ?? (r.__INSTANCES__ = []), (o = e.__FEDERATION__).moduleInfo ?? (o.moduleInfo = {}), (n = e.__FEDERATION__).__SHARE__ ?? (n.__SHARE__ = {}), (s = e.__FEDERATION__).__MANIFEST_LOADING__ ?? (s.__MANIFEST_LOADING__ = {}), (i = e.__FEDERATION__).__PRELOADED_MAP__ ?? (i.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
578
+ }), me(e, "__VMOK__", e.__FEDERATION__)), (t = e.__FEDERATION__).__GLOBAL_PLUGIN__ ?? (t.__GLOBAL_PLUGIN__ = []), (r = e.__FEDERATION__).__INSTANCES__ ?? (r.__INSTANCES__ = []), (o = e.__FEDERATION__).moduleInfo ?? (o.moduleInfo = {}), (n = e.__FEDERATION__).__SHARE__ ?? (n.__SHARE__ = {}), (s = e.__FEDERATION__).__MANIFEST_LOADING__ ?? (s.__MANIFEST_LOADING__ = {}), (i = e.__FEDERATION__).__PRELOADED_MAP__ ?? (i.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
577
579
  }
578
580
  _t(v);
579
581
  _t(k);
580
- function Dr(e, t = Ae()) {
581
- t && (v.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, v.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.8.0");
582
+ function xr(e, t = Ae()) {
583
+ t && (v.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, v.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.8.1");
582
584
  }
583
585
  function W(e, t) {
584
586
  if (typeof t == "string") {
@@ -602,17 +604,17 @@ function W(e, t) {
602
604
  }
603
605
  } else w(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`);
604
606
  }
605
- const Ve = () => k.__FEDERATION__.moduleInfo, xr = (e, t) => {
606
- const r = W(t, se(e)).value;
607
+ const Ve = () => k.__FEDERATION__.moduleInfo, Gr = (e, t) => {
608
+ const r = W(t, ne(e)).value;
607
609
  if (r && !r.version && "version" in e && e.version && (r.version = e.version), r) return r;
608
610
  if ("version" in e && e.version) {
609
- const { version: o, ...n } = e, s = se(n), i = W(k.__FEDERATION__.moduleInfo, s).value;
611
+ const { version: o, ...n } = e, s = ne(n), i = W(k.__FEDERATION__.moduleInfo, s).value;
610
612
  if ((i == null ? void 0 : i.version) === o) return i;
611
613
  }
612
- }, pe = (e) => xr(e, k.__FEDERATION__.moduleInfo), qe = (e, t) => {
613
- const r = se(e);
614
+ }, ye = (e) => Gr(e, k.__FEDERATION__.moduleInfo), qe = (e, t) => {
615
+ const r = ne(e);
614
616
  return k.__FEDERATION__.moduleInfo[r] = t, k.__FEDERATION__.moduleInfo;
615
- }, Gr = (e) => (k.__FEDERATION__.moduleInfo = {
617
+ }, Ur = (e) => (k.__FEDERATION__.moduleInfo = {
616
618
  ...k.__FEDERATION__.moduleInfo,
617
619
  ...e
618
620
  }, () => {
@@ -624,7 +626,7 @@ const Ve = () => k.__FEDERATION__.moduleInfo, xr = (e, t) => {
624
626
  remoteEntryKey: r,
625
627
  entryExports: v[r]
626
628
  };
627
- }, Ur = () => k.__FEDERATION__.__GLOBAL_PLUGIN__, Br = (e) => v.__FEDERATION__.__PRELOADED_MAP__.get(e), jr = (e) => v.__FEDERATION__.__PRELOADED_MAP__.set(e, !0), ze = "[0-9A-Za-z-]+", De = `(?:\\+(${ze}(?:\\.${ze})*))`, oe = "0|[1-9]\\d*", ye = "[0-9]+", St = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", Ke = `(?:${ye}|${St})`, Wr = `(?:-?(${Ke}(?:\\.${Ke})*))`, Je = `(?:${oe}|${St})`, bt = `(?:-(${Je}(?:\\.${Je})*))`, we = `${oe}|x|X|\\*`, Y = `[v=\\s]*(${we})(?:\\.(${we})(?:\\.(${we})(?:${bt})?${De}?)?)?`, Vr = `^\\s*(${Y})\\s+-\\s+(${Y})\\s*$`, qr = `[v=\\s]*${`(${ye})\\.(${ye})\\.(${ye})`}${Wr}?${De}?`, xe = "((?:<|>)?=?)", zr = `(\\s*)${xe}\\s*(${qr}|${Y})`, wt = "(?:~>?)", Kr = `(\\s*)${wt}\\s+`, It = "(?:\\^)", Jr = `(\\s*)${It}\\s+`, Zr = "(<|>)?=?\\s*\\*", Xr = `^${It}${Y}$`, Yr = `v?${`(${oe})\\.(${oe})\\.(${oe})`}${bt}?${De}?`, Qr = `^${wt}${Y}$`, eo = `^${xe}\\s*${Y}$`, to = `^${xe}\\s*(${Yr})$|^$`, ro = "^\\s*>=\\s*0.0.0\\s*$";
629
+ }, Br = () => k.__FEDERATION__.__GLOBAL_PLUGIN__, jr = (e) => v.__FEDERATION__.__PRELOADED_MAP__.get(e), Wr = (e) => v.__FEDERATION__.__PRELOADED_MAP__.set(e, !0), ze = "[0-9A-Za-z-]+", De = `(?:\\+(${ze}(?:\\.${ze})*))`, re = "0|[1-9]\\d*", Ee = "[0-9]+", bt = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", Ke = `(?:${Ee}|${bt})`, Vr = `(?:-?(${Ke}(?:\\.${Ke})*))`, Je = `(?:${re}|${bt})`, St = `(?:-(${Je}(?:\\.${Je})*))`, Ie = `${re}|x|X|\\*`, Y = `[v=\\s]*(${Ie})(?:\\.(${Ie})(?:\\.(${Ie})(?:${St})?${De}?)?)?`, qr = `^\\s*(${Y})\\s+-\\s+(${Y})\\s*$`, zr = `[v=\\s]*${`(${Ee})\\.(${Ee})\\.(${Ee})`}${Vr}?${De}?`, xe = "((?:<|>)?=?)", Kr = `(\\s*)${xe}\\s*(${zr}|${Y})`, wt = "(?:~>?)", Jr = `(\\s*)${wt}\\s+`, It = "(?:\\^)", Zr = `(\\s*)${It}\\s+`, Xr = "(<|>)?=?\\s*\\*", Yr = `^${It}${Y}$`, Qr = `v?${`(${re})\\.(${re})\\.(${re})`}${St}?${De}?`, eo = `^${wt}${Y}$`, to = `^${xe}\\s*${Y}$`, ro = `^${xe}\\s*(${Qr})$|^$`, oo = "^\\s*>=\\s*0.0.0\\s*$";
628
630
  function O(e) {
629
631
  return new RegExp(e);
630
632
  }
@@ -635,46 +637,46 @@ function $t(...e) {
635
637
  return (t) => e.reduce((r, o) => o(r), t);
636
638
  }
637
639
  function Ze(e) {
638
- return e.match(O(to));
640
+ return e.match(O(ro));
639
641
  }
640
642
  function Xe(e, t, r, o) {
641
643
  const n = `${e}.${t}.${r}`;
642
644
  return o ? `${n}-${o}` : n;
643
645
  }
644
- function oo(e) {
645
- return e.replace(O(Vr), (t, r, o, n, s, i, c, a, l, u, h, m) => (N(o) ? r = "" : N(n) ? r = `>=${o}.0.0` : N(s) ? r = `>=${o}.${n}.0` : r = `>=${r}`, N(l) ? a = "" : N(u) ? a = `<${Number(l) + 1}.0.0-0` : N(h) ? a = `<${l}.${Number(u) + 1}.0-0` : m ? a = `<=${l}.${u}.${h}-${m}` : a = `<=${a}`, `${r} ${a}`.trim()));
646
- }
647
646
  function no(e) {
648
- return e.replace(O(zr), "$1$2$3");
647
+ return e.replace(O(qr), (t, r, o, n, s, i, c, a, l, u, f, m) => (N(o) ? r = "" : N(n) ? r = `>=${o}.0.0` : N(s) ? r = `>=${o}.${n}.0` : r = `>=${r}`, N(l) ? a = "" : N(u) ? a = `<${Number(l) + 1}.0.0-0` : N(f) ? a = `<${l}.${Number(u) + 1}.0-0` : m ? a = `<=${l}.${u}.${f}-${m}` : a = `<=${a}`, `${r} ${a}`.trim()));
649
648
  }
650
649
  function so(e) {
651
- return e.replace(O(Kr), "$1~");
650
+ return e.replace(O(Kr), "$1$2$3");
652
651
  }
653
652
  function io(e) {
654
- return e.replace(O(Jr), "$1^");
653
+ return e.replace(O(Jr), "$1~");
655
654
  }
656
655
  function ao(e) {
657
- return e.trim().split(/\s+/).map((t) => t.replace(O(Xr), (r, o, n, s, i) => N(o) ? "" : N(n) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : N(s) ? o === "0" ? `>=${o}.${n}.0 <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.0 <${Number(o) + 1}.0.0-0` : i ? o === "0" ? n === "0" ? `>=${o}.${n}.${s}-${i} <${o}.${n}.${Number(s) + 1}-0` : `>=${o}.${n}.${s}-${i} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s}-${i} <${Number(o) + 1}.0.0-0` : o === "0" ? n === "0" ? `>=${o}.${n}.${s} <${o}.${n}.${Number(s) + 1}-0` : `>=${o}.${n}.${s} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s} <${Number(o) + 1}.0.0-0`)).join(" ");
656
+ return e.replace(O(Zr), "$1^");
658
657
  }
659
658
  function co(e) {
660
- return e.trim().split(/\s+/).map((t) => t.replace(O(Qr), (r, o, n, s, i) => N(o) ? "" : N(n) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : N(s) ? `>=${o}.${n}.0 <${o}.${Number(n) + 1}.0-0` : i ? `>=${o}.${n}.${s}-${i} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s} <${o}.${Number(n) + 1}.0-0`)).join(" ");
659
+ return e.trim().split(/\s+/).map((t) => t.replace(O(Yr), (r, o, n, s, i) => N(o) ? "" : N(n) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : N(s) ? o === "0" ? `>=${o}.${n}.0 <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.0 <${Number(o) + 1}.0.0-0` : i ? o === "0" ? n === "0" ? `>=${o}.${n}.${s}-${i} <${o}.${n}.${Number(s) + 1}-0` : `>=${o}.${n}.${s}-${i} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s}-${i} <${Number(o) + 1}.0.0-0` : o === "0" ? n === "0" ? `>=${o}.${n}.${s} <${o}.${n}.${Number(s) + 1}-0` : `>=${o}.${n}.${s} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s} <${Number(o) + 1}.0.0-0`)).join(" ");
661
660
  }
662
661
  function lo(e) {
663
- return e.split(/\s+/).map((t) => t.trim().replace(O(eo), (r, o, n, s, i, c) => {
662
+ return e.trim().split(/\s+/).map((t) => t.replace(O(eo), (r, o, n, s, i) => N(o) ? "" : N(n) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : N(s) ? `>=${o}.${n}.0 <${o}.${Number(n) + 1}.0-0` : i ? `>=${o}.${n}.${s}-${i} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s} <${o}.${Number(n) + 1}.0-0`)).join(" ");
663
+ }
664
+ function uo(e) {
665
+ return e.split(/\s+/).map((t) => t.trim().replace(O(to), (r, o, n, s, i, c) => {
664
666
  const a = N(n), l = a || N(s), u = l || N(i);
665
667
  return o === "=" && u && (o = ""), c = "", a ? o === ">" || o === "<" ? "<0.0.0-0" : "*" : o && u ? (l && (s = 0), i = 0, o === ">" ? (o = ">=", l ? (n = Number(n) + 1, s = 0, i = 0) : (s = Number(s) + 1, i = 0)) : o === "<=" && (o = "<", l ? n = Number(n) + 1 : s = Number(s) + 1), o === "<" && (c = "-0"), `${o + n}.${s}.${i}${c}`) : l ? `>=${n}.0.0${c} <${Number(n) + 1}.0.0-0` : u ? `>=${n}.${s}.0${c} <${n}.${Number(s) + 1}.0-0` : r;
666
668
  })).join(" ");
667
669
  }
668
- function uo(e) {
669
- return e.trim().replace(O(Zr), "");
670
+ function fo(e) {
671
+ return e.trim().replace(O(Xr), "");
670
672
  }
671
673
  function ho(e) {
672
- return e.trim().replace(O(ro), "");
674
+ return e.trim().replace(O(oo), "");
673
675
  }
674
- function Ee(e, t) {
676
+ function ge(e, t) {
675
677
  return e = Number(e) || e, t = Number(t) || t, e > t ? 1 : e === t ? 0 : -1;
676
678
  }
677
- function fo(e, t) {
679
+ function mo(e, t) {
678
680
  const { preRelease: r } = e, { preRelease: o } = t;
679
681
  if (r === void 0 && o) return 1;
680
682
  if (r && o === void 0) return -1;
@@ -682,42 +684,42 @@ function fo(e, t) {
682
684
  for (let n = 0, s = r.length; n <= s; n++) {
683
685
  const i = r[n], c = o[n];
684
686
  if (i !== c)
685
- return i === void 0 && c === void 0 ? 0 : i ? c ? Ee(i, c) : -1 : 1;
687
+ return i === void 0 && c === void 0 ? 0 : i ? c ? ge(i, c) : -1 : 1;
686
688
  }
687
689
  return 0;
688
690
  }
689
- function ue(e, t) {
690
- return Ee(e.major, t.major) || Ee(e.minor, t.minor) || Ee(e.patch, t.patch) || fo(e, t);
691
+ function le(e, t) {
692
+ return ge(e.major, t.major) || ge(e.minor, t.minor) || ge(e.patch, t.patch) || mo(e, t);
691
693
  }
692
- function Ie(e, t) {
694
+ function $e(e, t) {
693
695
  return e.version === t.version;
694
696
  }
695
- function mo(e, t) {
697
+ function po(e, t) {
696
698
  switch (e.operator) {
697
699
  case "":
698
700
  case "=":
699
- return Ie(e, t);
701
+ return $e(e, t);
700
702
  case ">":
701
- return ue(e, t) < 0;
703
+ return le(e, t) < 0;
702
704
  case ">=":
703
- return Ie(e, t) || ue(e, t) < 0;
705
+ return $e(e, t) || le(e, t) < 0;
704
706
  case "<":
705
- return ue(e, t) > 0;
707
+ return le(e, t) > 0;
706
708
  case "<=":
707
- return Ie(e, t) || ue(e, t) > 0;
709
+ return $e(e, t) || le(e, t) > 0;
708
710
  case void 0:
709
711
  return !0;
710
712
  default:
711
713
  return !1;
712
714
  }
713
715
  }
714
- function po(e) {
715
- return $t(ao, co, lo, uo)(e);
716
- }
717
716
  function yo(e) {
718
- return $t(oo, no, so, io)(e.trim()).split(/\s+/).join(" ");
717
+ return $t(co, lo, uo, fo)(e);
719
718
  }
720
- function re(e, t) {
719
+ function Eo(e) {
720
+ return $t(no, so, io, ao)(e.trim()).split(/\s+/).join(" ");
721
+ }
722
+ function te(e, t) {
721
723
  if (!e) return !1;
722
724
  const r = Ze(e);
723
725
  if (!r) return !1;
@@ -730,14 +732,14 @@ function re(e, t) {
730
732
  preRelease: c == null ? void 0 : c.split(".")
731
733
  }, l = t.split("||");
732
734
  for (const u of l) {
733
- const h = u.trim();
734
- if (!h || h === "*" || h === "x") return !0;
735
+ const f = u.trim();
736
+ if (!f || f === "*" || f === "x") return !0;
735
737
  try {
736
- const m = yo(h);
738
+ const m = Eo(f);
737
739
  if (!m.trim()) return !0;
738
- const f = m.split(" ").map((E) => po(E)).join(" ");
739
- if (!f.trim()) return !0;
740
- const d = f.split(/\s+/).map((E) => ho(E)).filter(Boolean);
740
+ const h = m.split(" ").map((E) => yo(E)).join(" ");
741
+ if (!h.trim()) return !0;
742
+ const d = h.split(/\s+/).map((E) => ho(E)).filter(Boolean);
741
743
  if (d.length === 0) continue;
742
744
  let p = !0;
743
745
  for (const E of d) {
@@ -746,13 +748,13 @@ function re(e, t) {
746
748
  p = !1;
747
749
  break;
748
750
  }
749
- const [, R, , g, _, S, I] = y;
750
- if (!mo({
751
+ const [, R, , g, _, b, I] = y;
752
+ if (!po({
751
753
  operator: R,
752
- version: Xe(g, _, S, I),
754
+ version: Xe(g, _, b, I),
753
755
  major: g,
754
756
  minor: _,
755
- patch: S,
757
+ patch: b,
756
758
  preRelease: I == null ? void 0 : I.split(".")
757
759
  }, a)) {
758
760
  p = !1;
@@ -761,14 +763,14 @@ function re(e, t) {
761
763
  }
762
764
  if (p) return !0;
763
765
  } catch (m) {
764
- console.error(`[semver] Error processing range part "${h}":`, m);
766
+ console.error(`[semver] Error processing range part "${f}":`, m);
765
767
  continue;
766
768
  }
767
769
  }
768
770
  return !1;
769
771
  }
770
- const ce = "default", Tt = "global";
771
- function Eo(e, t, r, o) {
772
+ const ae = "default", Tt = "global";
773
+ function go(e, t, r, o) {
772
774
  var s, i;
773
775
  let n;
774
776
  return "get" in e ? n = e.get : "lib" in e ? n = () => Promise.resolve(e.lib) : n = () => Promise.resolve(() => {
@@ -803,7 +805,7 @@ function vt(e, t) {
803
805
  const r = t.shared || {}, o = t.name, n = Object.keys(r).reduce((i, c) => {
804
806
  const a = gt(r[c]);
805
807
  return i[c] = i[c] || [], a.forEach((l) => {
806
- i[c].push(Eo(l, o, c, t.shareStrategy));
808
+ i[c].push(go(l, o, c, t.shareStrategy));
807
809
  }), i;
808
810
  }, {}), s = { ...e.shared };
809
811
  return Object.keys(n).forEach((i) => {
@@ -815,10 +817,10 @@ function vt(e, t) {
815
817
  newShareInfos: n
816
818
  };
817
819
  }
818
- function ie(e, t) {
820
+ function se(e, t) {
819
821
  if (!e) return !1;
820
822
  const { status: r, mode: o } = e;
821
- return r === Ne.NO_USE ? !1 : r === Ne.CALCULATED ? !0 : o === "runtime-infer" ? t ? Ro(e, t) : !0 : !1;
823
+ return r === Ne.NO_USE ? !1 : r === Ne.CALCULATED ? !0 : o === "runtime-infer" ? t ? _o(e, t) : !0 : !1;
822
824
  }
823
825
  function B(e, t) {
824
826
  const r = (o) => {
@@ -830,40 +832,40 @@ function B(e, t) {
830
832
  }
831
833
  return o;
832
834
  };
833
- return !!re(r(e), `<=${r(t)}`);
835
+ return !!te(r(e), `<=${r(t)}`);
834
836
  }
835
- const ae = (e, t) => {
837
+ const ie = (e, t) => {
836
838
  const r = t || function(o, n) {
837
839
  return B(o, n);
838
840
  };
839
841
  return Object.keys(e).reduce((o, n) => !o || r(o, n) || o === "0" ? n : o, 0);
840
- }, Re = (e) => !!e.loaded || typeof e.lib == "function", go = (e) => !!e.loading, Ro = (e, t) => {
842
+ }, _e = (e) => !!e.loaded || typeof e.lib == "function", Ro = (e) => !!e.loading, _o = (e, t) => {
841
843
  if (!e || !t) return !1;
842
844
  const { usedExports: r } = e;
843
845
  return r ? !!t.every((o) => r.includes(o)) : !1;
844
846
  };
845
- function _o(e, t, r, o) {
847
+ function bo(e, t, r, o) {
846
848
  const n = e[t][r];
847
- let s = "", i = ie(o);
849
+ let s = "", i = se(o);
848
850
  const c = function(a, l) {
849
- return i ? n[a].treeShaking ? n[l].treeShaking ? !Re(n[a].treeShaking) && B(a, l) : !1 : !0 : !Re(n[a]) && B(a, l);
851
+ return i ? n[a].treeShaking ? n[l].treeShaking ? !_e(n[a].treeShaking) && B(a, l) : !1 : !0 : !_e(n[a]) && B(a, l);
850
852
  };
851
853
  if (i) {
852
- if (s = ae(e[t][r], c), s) return {
854
+ if (s = ie(e[t][r], c), s) return {
853
855
  version: s,
854
856
  useTreesShaking: i
855
857
  };
856
858
  i = !1;
857
859
  }
858
860
  return {
859
- version: ae(e[t][r], c),
861
+ version: ie(e[t][r], c),
860
862
  useTreesShaking: i
861
863
  };
862
864
  }
863
- const q = (e) => Re(e) || go(e);
865
+ const q = (e) => _e(e) || Ro(e);
864
866
  function So(e, t, r, o) {
865
867
  const n = e[t][r];
866
- let s = "", i = ie(o);
868
+ let s = "", i = se(o);
867
869
  const c = function(a, l) {
868
870
  if (i) {
869
871
  if (!n[a].treeShaking) return !0;
@@ -874,30 +876,30 @@ function So(e, t, r, o) {
874
876
  return q(n[l]) ? q(n[a]) ? !!B(a, l) : !0 : q(n[a]) ? !1 : B(a, l);
875
877
  };
876
878
  if (i) {
877
- if (s = ae(e[t][r], c), s) return {
879
+ if (s = ie(e[t][r], c), s) return {
878
880
  version: s,
879
881
  useTreesShaking: i
880
882
  };
881
883
  i = !1;
882
884
  }
883
885
  return {
884
- version: ae(e[t][r], c),
886
+ version: ie(e[t][r], c),
885
887
  useTreesShaking: i
886
888
  };
887
889
  }
888
- function bo(e) {
889
- return e === "loaded-first" ? So : _o;
890
+ function wo(e) {
891
+ return e === "loaded-first" ? So : bo;
890
892
  }
891
- function ge(e, t, r, o) {
893
+ function Re(e, t, r, o) {
892
894
  if (!e) return;
893
- const { shareConfig: n, scope: s = ce, strategy: i, treeShaking: c } = r, a = Array.isArray(s) ? s : [s];
895
+ const { shareConfig: n, scope: s = ae, strategy: i, treeShaking: c } = r, a = Array.isArray(s) ? s : [s];
894
896
  for (const l of a) if (n && e[l] && e[l][t]) {
895
- const { requiredVersion: u } = n, { version: h, useTreesShaking: m } = bo(i)(e, l, t, c), f = () => {
896
- const p = e[l][t][h];
897
+ const { requiredVersion: u } = n, { version: f, useTreesShaking: m } = wo(i)(e, l, t, c), h = () => {
898
+ const p = e[l][t][f];
897
899
  if (n.singleton) {
898
- if (typeof u == "string" && !re(h, u)) {
899
- const E = `Version ${h} from ${h && p.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;
900
- n.strictVersion ? w(E) : ne(E);
900
+ if (typeof u == "string" && !te(f, u)) {
901
+ const E = `Version ${f} from ${f && p.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;
902
+ n.strictVersion ? w(E) : oe(E);
901
903
  }
902
904
  return {
903
905
  shared: p,
@@ -908,20 +910,20 @@ function ge(e, t, r, o) {
908
910
  shared: p,
909
911
  useTreesShaking: m
910
912
  };
911
- if (re(h, u)) return {
913
+ if (te(f, u)) return {
912
914
  shared: p,
913
915
  useTreesShaking: m
914
916
  };
915
- const E = ie(c);
917
+ const E = se(c);
916
918
  if (E) {
917
919
  for (const [y, R] of Object.entries(e[l][t]))
918
- if (ie(R.treeShaking, c == null ? void 0 : c.usedExports) && re(y, u))
920
+ if (se(R.treeShaking, c == null ? void 0 : c.usedExports) && te(y, u))
919
921
  return {
920
922
  shared: R,
921
923
  useTreesShaking: E
922
924
  };
923
925
  }
924
- for (const [y, R] of Object.entries(e[l][t])) if (re(y, u)) return {
926
+ for (const [y, R] of Object.entries(e[l][t])) if (te(y, u)) return {
925
927
  shared: R,
926
928
  useTreesShaking: !1
927
929
  };
@@ -930,42 +932,42 @@ function ge(e, t, r, o) {
930
932
  shareScopeMap: e,
931
933
  scope: l,
932
934
  pkgName: t,
933
- version: h,
934
- GlobalFederation: _e.__FEDERATION__,
935
+ version: f,
936
+ GlobalFederation: be.__FEDERATION__,
935
937
  shareInfo: r,
936
- resolver: f
938
+ resolver: h
937
939
  };
938
940
  return (o.emit(d) || d).resolver();
939
941
  }
940
942
  }
941
943
  function Nt() {
942
- return _e.__FEDERATION__.__SHARE__;
944
+ return be.__FEDERATION__.__SHARE__;
943
945
  }
944
946
  function Ye(e) {
945
947
  const { pkgName: t, extraOptions: r, shareInfos: o } = e, n = (a) => {
946
948
  if (!a) return;
947
949
  const l = {};
948
- return a.forEach((h) => {
949
- l[h.version] = h;
950
- }), l[ae(l, function(h, m) {
951
- return !Re(l[h]) && B(h, m);
950
+ return a.forEach((f) => {
951
+ l[f.version] = f;
952
+ }), l[ie(l, function(f, m) {
953
+ return !_e(l[f]) && B(f, m);
952
954
  })];
953
955
  }, s = (r == null ? void 0 : r.resolver) ?? n, i = (a) => a !== null && typeof a == "object" && !Array.isArray(a), c = (...a) => {
954
956
  const l = {};
955
957
  for (const u of a)
956
958
  if (u)
957
- for (const [h, m] of Object.entries(u)) {
958
- const f = l[h];
959
- i(f) && i(m) ? l[h] = c(f, m) : m !== void 0 && (l[h] = m);
959
+ for (const [f, m] of Object.entries(u)) {
960
+ const h = l[f];
961
+ i(h) && i(m) ? l[f] = c(h, m) : m !== void 0 && (l[f] = m);
960
962
  }
961
963
  return l;
962
964
  };
963
965
  return c(s(o[t]), r == null ? void 0 : r.customShareInfo);
964
966
  }
965
967
  const z = (e, t) => {
966
- e.useIn || (e.useIn = []), Lr(e.useIn, t);
968
+ e.useIn || (e.useIn = []), Cr(e.useIn, t);
967
969
  };
968
- function he(e, t) {
970
+ function ue(e, t) {
969
971
  return t && e.treeShaking ? e.treeShaking : e;
970
972
  }
971
973
  function Ge(e, t) {
@@ -1007,11 +1009,11 @@ function Qe(e, t) {
1007
1009
  }
1008
1010
  }
1009
1011
  }
1010
- function wo(e, t) {
1012
+ function Io(e, t) {
1011
1013
  for (const r of e)
1012
1014
  if (t === r.name || r.alias && t === r.alias) return r;
1013
1015
  }
1014
- const At = "RUNTIME-001", Mt = "RUNTIME-002", Pt = "RUNTIME-003", kt = "RUNTIME-004", Ot = "RUNTIME-005", Oe = "RUNTIME-006", Lt = "RUNTIME-007", Ue = "RUNTIME-008", Io = "RUNTIME-009", Ct = "RUNTIME-010", Ft = "RUNTIME-011", $o = "RUNTIME-012", Ht = "RUNTIME-013", Dt = "RUNTIME-014", xt = "RUNTIME-015", M = {
1016
+ const At = "RUNTIME-001", Mt = "RUNTIME-002", Pt = "RUNTIME-003", kt = "RUNTIME-004", Ot = "RUNTIME-005", Oe = "RUNTIME-006", Lt = "RUNTIME-007", Ue = "RUNTIME-008", $o = "RUNTIME-009", Ct = "RUNTIME-010", Ft = "RUNTIME-011", To = "RUNTIME-012", Ht = "RUNTIME-013", Dt = "RUNTIME-014", xt = "RUNTIME-015", M = {
1015
1017
  [At]: "Failed to get remoteEntry exports.",
1016
1018
  [Mt]: 'The remote entry interface does not contain "init"',
1017
1019
  [Pt]: "Failed to get manifest.",
@@ -1020,10 +1022,10 @@ const At = "RUNTIME-001", Mt = "RUNTIME-002", Pt = "RUNTIME-003", kt = "RUNTIME-
1020
1022
  [Oe]: "Invalid loadShareSync function call from runtime",
1021
1023
  [Lt]: "Failed to get remote snapshot.",
1022
1024
  [Ue]: "Failed to load script resources.",
1023
- [Io]: "Please call createInstance first.",
1025
+ [$o]: "Please call createInstance first.",
1024
1026
  [Ct]: 'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',
1025
1027
  [Ft]: "The remoteEntry URL is missing from the remote snapshot.",
1026
- [$o]: 'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.',
1028
+ [To]: 'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.',
1027
1029
  [Ht]: "The manifest is not a valid Module Federation manifest.",
1028
1030
  [Dt]: "The remote does not expose the requested module.",
1029
1031
  [xt]: "Remote container initialization failed."
@@ -1032,7 +1034,10 @@ const At = "RUNTIME-001", Mt = "RUNTIME-002", Pt = "RUNTIME-003", kt = "RUNTIME-
1032
1034
  ...M
1033
1035
  });
1034
1036
  const Gt = ".then(callbacks[0]).catch(callbacks[1])";
1035
- async function To({ entry: e, remoteEntryExports: t }) {
1037
+ function Ut(e) {
1038
+ return e === "esm" || e === "module";
1039
+ }
1040
+ async function vo({ entry: e, remoteEntryExports: t }) {
1036
1041
  return new Promise((r, o) => {
1037
1042
  try {
1038
1043
  t ? r(t) : typeof FEDERATION_ALLOW_NEW_FUNCTION < "u" ? new Function("callbacks", `import("${e}")${Gt}`)([r, o]) : import(
@@ -1045,7 +1050,7 @@ async function To({ entry: e, remoteEntryExports: t }) {
1045
1050
  }
1046
1051
  });
1047
1052
  }
1048
- async function vo({ entry: e, remoteEntryExports: t }) {
1053
+ async function No({ entry: e, remoteEntryExports: t }) {
1049
1054
  return new Promise((r, o) => {
1050
1055
  try {
1051
1056
  t ? r(t) : typeof __system_context__ > "u" ? System.import(e).then(r).catch(o) : new Function("callbacks", `System.import("${e}")${Gt}`)([r, o]);
@@ -1054,7 +1059,7 @@ async function vo({ entry: e, remoteEntryExports: t }) {
1054
1059
  }
1055
1060
  });
1056
1061
  }
1057
- function Ut(e, t, r) {
1062
+ function Bt(e, t, r) {
1058
1063
  const { remoteEntryKey: o, entryExports: n } = He(e, t);
1059
1064
  return n || w(At, M, {
1060
1065
  remoteName: e,
@@ -1062,14 +1067,14 @@ function Ut(e, t, r) {
1062
1067
  remoteEntryKey: o
1063
1068
  }), n;
1064
1069
  }
1065
- async function No({ name: e, globalName: t, entry: r, remoteInfo: o, loaderHook: n, getEntryUrl: s, resourceContext: i }) {
1070
+ async function Ao({ name: e, globalName: t, entry: r, remoteInfo: o, loaderHook: n, getEntryUrl: s, resourceContext: i }) {
1066
1071
  const { entryExports: c } = He(e, t);
1067
1072
  if (c) return c;
1068
1073
  const a = s ? s(r) : r;
1069
1074
  return Sr(a, {
1070
1075
  attrs: {},
1071
1076
  createScriptHook: (l, u) => {
1072
- const h = n.lifecycle.createScript.emit({
1077
+ const f = n.lifecycle.createScript.emit({
1073
1078
  url: l,
1074
1079
  attrs: u,
1075
1080
  remoteInfo: o,
@@ -1078,10 +1083,10 @@ async function No({ name: e, globalName: t, entry: r, remoteInfo: o, loaderHook:
1078
1083
  url: l
1079
1084
  } : void 0
1080
1085
  });
1081
- if (h && (h instanceof HTMLScriptElement || "script" in h || "timeout" in h))
1082
- return h;
1086
+ if (f && (f instanceof HTMLScriptElement || "script" in f || "timeout" in f))
1087
+ return f;
1083
1088
  }
1084
- }).then(() => Ut(e, t, r), (l) => {
1089
+ }).then(() => Bt(e, t, r), (l) => {
1085
1090
  const u = l instanceof Error ? l.message : String(l);
1086
1091
  w(Ue, M, {
1087
1092
  remoteName: e,
@@ -1089,35 +1094,27 @@ async function No({ name: e, globalName: t, entry: r, remoteInfo: o, loaderHook:
1089
1094
  }, u);
1090
1095
  });
1091
1096
  }
1092
- async function Ao({ remoteInfo: e, remoteEntryExports: t, loaderHook: r, getEntryUrl: o, resourceContext: n }) {
1097
+ async function Mo({ remoteInfo: e, remoteEntryExports: t, loaderHook: r, getEntryUrl: o, resourceContext: n }) {
1093
1098
  const { entry: s, entryGlobalName: i, name: c, type: a } = e;
1094
- switch (a) {
1095
- case "esm":
1096
- case "module":
1097
- return To({
1098
- entry: s,
1099
- remoteEntryExports: t
1100
- });
1101
- case "system":
1102
- return vo({
1103
- entry: s,
1104
- remoteEntryExports: t
1105
- });
1106
- default:
1107
- return No({
1108
- entry: s,
1109
- globalName: i,
1110
- name: c,
1111
- remoteInfo: e,
1112
- loaderHook: r,
1113
- getEntryUrl: o,
1114
- resourceContext: n
1115
- });
1116
- }
1099
+ return Ut(a) ? vo({
1100
+ entry: s,
1101
+ remoteEntryExports: t
1102
+ }) : a === "system" ? No({
1103
+ entry: s,
1104
+ remoteEntryExports: t
1105
+ }) : Ao({
1106
+ entry: s,
1107
+ globalName: i,
1108
+ name: c,
1109
+ remoteInfo: e,
1110
+ loaderHook: r,
1111
+ getEntryUrl: o,
1112
+ resourceContext: n
1113
+ });
1117
1114
  }
1118
- async function Mo({ remoteInfo: e, loaderHook: t, resourceContext: r }) {
1115
+ async function Po({ remoteInfo: e, loaderHook: t, resourceContext: r }) {
1119
1116
  const { entry: o, entryGlobalName: n, name: s, type: i } = e, { entryExports: c } = He(s, n);
1120
- return c || Ir(o, {
1117
+ return c || $r(o, {
1121
1118
  attrs: {
1122
1119
  name: s,
1123
1120
  globalName: n,
@@ -1136,7 +1133,7 @@ async function Mo({ remoteInfo: e, loaderHook: t, resourceContext: r }) {
1136
1133
  if (u && "url" in u)
1137
1134
  return u;
1138
1135
  } }
1139
- }).then(() => Ut(s, n, o)).catch((a) => {
1136
+ }).then(() => Bt(s, n, o)).catch((a) => {
1140
1137
  w(`Failed to load Node.js entry for remote "${s}" from "${o}". ${a instanceof Error ? a.message : String(a)}`);
1141
1138
  });
1142
1139
  }
@@ -1154,13 +1151,13 @@ async function Be(e) {
1154
1151
  loaderHook: l,
1155
1152
  remoteInfo: o,
1156
1153
  remoteEntryExports: r
1157
- }).then((u) => u || ((typeof ENV_TARGET < "u" ? ENV_TARGET === "web" : G) ? Ao({
1154
+ }).then((u) => u || ((typeof ENV_TARGET < "u" ? ENV_TARGET === "web" : G) ? Mo({
1158
1155
  remoteInfo: o,
1159
1156
  remoteEntryExports: r,
1160
1157
  loaderHook: l,
1161
1158
  getEntryUrl: n,
1162
1159
  resourceContext: s
1163
- }) : Mo({
1160
+ }) : Po({
1164
1161
  remoteInfo: o,
1165
1162
  loaderHook: l,
1166
1163
  resourceContext: s
@@ -1169,18 +1166,18 @@ async function Be(e) {
1169
1166
  remoteInfo: o,
1170
1167
  remoteEntryExports: u
1171
1168
  }), u)).catch(async (u) => {
1172
- const h = Le(o), m = u instanceof Error && u.message.includes("ScriptExecutionError");
1169
+ const f = Le(o), m = u instanceof Error && u.message.includes("ScriptExecutionError");
1173
1170
  if (u instanceof Error && u.message.includes(Ue) && !m && !i) {
1174
- const f = (p) => Be({
1171
+ const h = (p) => Be({
1175
1172
  ...p,
1176
1173
  _inErrorHandling: !0
1177
1174
  }), d = await t.loaderHook.lifecycle.loadEntryError.emit({
1178
- getRemoteEntry: f,
1175
+ getRemoteEntry: h,
1179
1176
  origin: t,
1180
1177
  remoteInfo: o,
1181
1178
  remoteEntryExports: r,
1182
1179
  globalLoading: J,
1183
- uniqueKey: h
1180
+ uniqueKey: f
1184
1181
  });
1185
1182
  if (d)
1186
1183
  return await t.loaderHook.lifecycle.afterLoadEntry.emit({
@@ -1205,14 +1202,14 @@ function K(e) {
1205
1202
  entry: "entry" in e ? e.entry : "",
1206
1203
  type: e.type || Tt,
1207
1204
  entryGlobalName: e.entryGlobalName || e.name,
1208
- shareScope: e.shareScope || ce
1205
+ shareScope: e.shareScope || ae
1209
1206
  };
1210
1207
  }
1211
- function Po() {
1208
+ function ko() {
1212
1209
  return typeof FEDERATION_BUILD_IDENTIFIER < "u" ? FEDERATION_BUILD_IDENTIFIER : "";
1213
1210
  }
1214
- function ko(e, t) {
1215
- const r = Ur(), o = [
1211
+ function Oo(e, t) {
1212
+ const r = Br(), o = [
1216
1213
  t.hooks,
1217
1214
  t.remoteHandler.hooks,
1218
1215
  t.sharedHandler.hooks,
@@ -1228,7 +1225,7 @@ function ko(e, t) {
1228
1225
  });
1229
1226
  }), e;
1230
1227
  }
1231
- function Oo(e) {
1228
+ function Lo(e) {
1232
1229
  return {
1233
1230
  name: e.name,
1234
1231
  alias: e.alias,
@@ -1259,12 +1256,12 @@ function F(e) {
1259
1256
  },
1260
1257
  mfConfig: {
1261
1258
  name: e.name,
1262
- remotes: ((c = e.remotes) == null ? void 0 : c.map(Oo)) ?? [],
1259
+ remotes: ((c = e.remotes) == null ? void 0 : c.map(Lo)) ?? [],
1263
1260
  shared: t
1264
1261
  }
1265
1262
  };
1266
1263
  }
1267
- function Bt(e) {
1264
+ function jt(e) {
1268
1265
  return {
1269
1266
  resourceCategory: "sync",
1270
1267
  share: !0,
@@ -1272,19 +1269,19 @@ function Bt(e) {
1272
1269
  ...e
1273
1270
  };
1274
1271
  }
1275
- function Lo(e, t) {
1272
+ function Co(e, t) {
1276
1273
  return t.map((r) => {
1277
- const o = wo(e, r.nameOrAlias);
1274
+ const o = Io(e, r.nameOrAlias);
1278
1275
  return L(o, `Unable to preload ${r.nameOrAlias} as it is not included in ${!o && at({
1279
1276
  remoteInfo: o,
1280
1277
  remotes: e
1281
1278
  })}`), {
1282
1279
  remote: o,
1283
- preloadConfig: Bt(r)
1280
+ preloadConfig: jt(r)
1284
1281
  };
1285
1282
  });
1286
1283
  }
1287
- function Co(e) {
1284
+ function Fo(e) {
1288
1285
  return e ? e.map((t) => t === "." ? t : t.startsWith("./") ? t.replace("./", "") : t) : [];
1289
1286
  }
1290
1287
  function je(e) {
@@ -1300,7 +1297,7 @@ function j(e, t, r, o) {
1300
1297
  error: o
1301
1298
  };
1302
1299
  }
1303
- async function Fo(e, t, r, o) {
1300
+ async function Ho(e, t, r, o) {
1304
1301
  const n = e.moduleCache.get(r.name), s = r.entry;
1305
1302
  if (n != null && n.remoteEntryExports) return j(o, s, "cached");
1306
1303
  try {
@@ -1318,9 +1315,9 @@ async function Fo(e, t, r, o) {
1318
1315
  return j(o, s, je(i) ? "timeout" : "error", i);
1319
1316
  }
1320
1317
  }
1321
- function $e({ host: e, remoteInfo: t, url: r, attrs: o, context: n, needDeleteLink: s }) {
1318
+ function fe({ host: e, remoteInfo: t, url: r, attrs: o, context: n, needDeleteLink: s }) {
1322
1319
  return new Promise((i) => {
1323
- const { link: c, needAttach: a } = _r({
1320
+ const { link: c, needAttach: a } = br({
1324
1321
  url: r,
1325
1322
  cb: () => {
1326
1323
  i(j(n, r, a ? "success" : "cached"));
@@ -1330,7 +1327,7 @@ function $e({ host: e, remoteInfo: t, url: r, attrs: o, context: n, needDeleteLi
1330
1327
  },
1331
1328
  attrs: o,
1332
1329
  createLinkHook: (l, u) => {
1333
- const h = e.loaderHook.lifecycle.createLink.emit({
1330
+ const f = e.loaderHook.lifecycle.createLink.emit({
1334
1331
  url: l,
1335
1332
  attrs: u,
1336
1333
  remoteInfo: t,
@@ -1339,16 +1336,16 @@ function $e({ host: e, remoteInfo: t, url: r, attrs: o, context: n, needDeleteLi
1339
1336
  url: l
1340
1337
  }
1341
1338
  });
1342
- return h instanceof HTMLLinkElement, h;
1339
+ return f instanceof HTMLLinkElement, f;
1343
1340
  },
1344
1341
  needDeleteLink: s
1345
1342
  });
1346
1343
  a && document.head.appendChild(c);
1347
1344
  });
1348
1345
  }
1349
- function Ho({ host: e, remoteInfo: t, url: r, attrs: o, context: n }) {
1346
+ function Do({ host: e, remoteInfo: t, url: r, attrs: o, context: n }) {
1350
1347
  return new Promise((s) => {
1351
- const { script: i, needAttach: c } = ft({
1348
+ const { script: i, needAttach: c } = ht({
1352
1349
  url: r,
1353
1350
  cb: () => {
1354
1351
  s(j(n, r, c ? "success" : "cached"));
@@ -1374,89 +1371,79 @@ function Ho({ host: e, remoteInfo: t, url: r, attrs: o, context: n }) {
1374
1371
  c && document.head.appendChild(i);
1375
1372
  });
1376
1373
  }
1377
- function ee(e, t) {
1374
+ function he(e, t) {
1378
1375
  return {
1379
1376
  ...e,
1380
1377
  resourceType: t
1381
1378
  };
1382
1379
  }
1383
- function jt(e, t, r, o = !0, n = {
1380
+ function Wt(e, t, r, o = !0, n = {
1384
1381
  initiator: "preloadRemote",
1385
1382
  id: e.name
1386
1383
  }) {
1387
1384
  const { cssAssets: s, jsAssetsWithoutEntry: i, entryAssets: c } = r, a = [];
1388
1385
  if (t.options.inBrowser) {
1389
- if (c.forEach((l) => {
1390
- const { moduleInfo: u } = l;
1391
- a.push(Fo(t, e, u, ee(n, "remoteEntry")));
1386
+ if (c.forEach((f) => {
1387
+ const { moduleInfo: m } = f;
1388
+ a.push(Ho(t, e, m, he(n, "remoteEntry")));
1392
1389
  }), o) {
1393
- const l = {
1390
+ const f = {
1394
1391
  rel: "preload",
1395
1392
  as: "style"
1396
1393
  };
1397
- s.forEach((u) => {
1398
- a.push($e({
1394
+ s.forEach((m) => {
1395
+ a.push(fe({
1399
1396
  host: t,
1400
1397
  remoteInfo: e,
1401
- url: u,
1402
- attrs: l,
1403
- context: ee(n, "css")
1398
+ url: m,
1399
+ attrs: f,
1400
+ context: he(n, "css")
1404
1401
  }));
1405
1402
  });
1406
1403
  } else {
1407
- const l = {
1404
+ const f = {
1408
1405
  rel: "stylesheet",
1409
1406
  type: "text/css"
1410
1407
  };
1411
- s.forEach((u) => {
1412
- a.push($e({
1408
+ s.forEach((m) => {
1409
+ a.push(fe({
1413
1410
  host: t,
1414
1411
  remoteInfo: e,
1415
- url: u,
1416
- attrs: l,
1412
+ url: m,
1413
+ attrs: f,
1417
1414
  needDeleteLink: !1,
1418
- context: ee(n, "css")
1419
- }));
1420
- });
1421
- }
1422
- if (o) {
1423
- const l = {
1424
- rel: "preload",
1425
- as: "script"
1426
- };
1427
- i.forEach((u) => {
1428
- a.push($e({
1429
- host: t,
1430
- remoteInfo: e,
1431
- url: u,
1432
- attrs: l,
1433
- context: ee(n, "js")
1434
- }));
1435
- });
1436
- } else {
1437
- const l = {
1438
- fetchpriority: "high",
1439
- type: (e == null ? void 0 : e.type) === "module" ? "module" : "text/javascript"
1440
- };
1441
- i.forEach((u) => {
1442
- a.push(Ho({
1443
- host: t,
1444
- remoteInfo: e,
1445
- url: u,
1446
- attrs: l,
1447
- context: ee(n, "js")
1415
+ context: he(n, "css")
1448
1416
  }));
1449
1417
  });
1450
1418
  }
1419
+ let l = Do, u = {
1420
+ fetchpriority: "high",
1421
+ type: "text/javascript"
1422
+ };
1423
+ o ? (l = fe, u = {
1424
+ rel: "preload",
1425
+ as: "script"
1426
+ }) : Ut(e.type) && (l = fe, u = {
1427
+ rel: "modulepreload",
1428
+ fetchpriority: "high"
1429
+ }), i.forEach((f) => {
1430
+ a.push(l({
1431
+ host: t,
1432
+ remoteInfo: e,
1433
+ url: f,
1434
+ attrs: u,
1435
+ context: he(n, "js")
1436
+ }));
1437
+ });
1451
1438
  }
1452
1439
  return Promise.all(a);
1453
1440
  }
1454
- function Do(e) {
1441
+ function xo(e) {
1455
1442
  if (!e || !("modules" in e) || !Array.isArray(e.modules)) return;
1456
1443
  const t = e.modules.map((r) => r.moduleName).filter(Boolean);
1457
1444
  return t.length ? t.join(",") : void 0;
1458
1445
  }
1459
- function xo(e, t, r) {
1446
+ function Go(e, t, r) {
1460
1447
  const o = t, n = Array.isArray(e.shareScope) ? e.shareScope : [e.shareScope];
1461
1448
  n.length || n.push("default"), n.forEach((i) => {
1462
1449
  o[i] || (o[i] = {});
@@ -1534,7 +1521,7 @@ var et = class {
1534
1521
  remoteSnapshot: t,
1535
1522
  origin: this.host
1536
1523
  });
1537
- const { remoteEntryInitOptions: s, shareScope: i, initScope: c } = xo(this.remoteInfo, this.host.shareScopeMap, r), a = await this.host.hooks.lifecycle.beforeInitContainer.emit({
1524
+ const { remoteEntryInitOptions: s, shareScope: i, initScope: c } = Go(this.remoteInfo, this.host.shareScopeMap, r), a = await this.host.hooks.lifecycle.beforeInitContainer.emit({
1538
1525
  shareScope: i,
1539
1526
  remoteEntryInitOptions: s,
1540
1527
  initScope: c,
@@ -1609,7 +1596,7 @@ var et = class {
1609
1596
  remoteEntryUrl: this.remoteInfo.entry,
1610
1597
  expose: t,
1611
1598
  requestId: e,
1612
- availableExposes: Do(o)
1599
+ availableExposes: xo(o)
1613
1600
  }, void 0, F(this.host.options)), await this.host.loaderHook.lifecycle.afterGetExpose.emit({
1614
1601
  id: e,
1615
1602
  expose: t,
@@ -1628,7 +1615,7 @@ var et = class {
1628
1615
  origin: this.host
1629
1616
  }), l;
1630
1617
  }
1631
- const c = Hr(this.remoteInfo.name, t), a = this.wraperFactory(i, c);
1618
+ const c = Dr(this.remoteInfo.name, t), a = this.wraperFactory(i, c);
1632
1619
  if (!n) return a;
1633
1620
  await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({
1634
1621
  id: e,
@@ -1676,7 +1663,7 @@ var et = class {
1676
1663
  }
1677
1664
  applyPlugin(e, t) {
1678
1665
  var o;
1679
- L(Fr(e), "Plugin configuration is invalid.");
1666
+ L(Hr(e), "Plugin configuration is invalid.");
1680
1667
  const r = e.name;
1681
1668
  L(r, "A name must be provided by the plugin."), this.registerPlugins[r] || (this.registerPlugins[r] = e, (o = e.apply) == null || o.call(e, t), Object.keys(this.lifecycle).forEach((n) => {
1682
1669
  const s = e[n];
@@ -1728,7 +1715,7 @@ var et = class {
1728
1715
  return Promise.resolve(t);
1729
1716
  }
1730
1717
  };
1731
- function Wt(e, t) {
1718
+ function Vt(e, t) {
1732
1719
  if (!Fe(t)) return !1;
1733
1720
  if (e !== t) {
1734
1721
  for (const r in e) if (!(r in t)) return !1;
@@ -1744,13 +1731,13 @@ var X = class extends A {
1744
1731
  for (const t of this.listeners) try {
1745
1732
  const r = t(e);
1746
1733
  if (r === void 0) continue;
1747
- if (Wt(e, r)) e = r;
1734
+ if (Vt(e, r)) e = r;
1748
1735
  else {
1749
1736
  this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);
1750
1737
  break;
1751
1738
  }
1752
1739
  } catch (r) {
1753
- ne(r), this.onerror(r);
1740
+ oe(r), this.onerror(r);
1754
1741
  }
1755
1742
  return e;
1756
1743
  }
@@ -1763,8 +1750,8 @@ var X = class extends A {
1763
1750
  const t = Array.from(this.listeners);
1764
1751
  if (t.length > 0) {
1765
1752
  let r = 0;
1766
- const o = (s) => (ne(s), this.onerror(s), e), n = (s) => {
1767
- if (s !== void 0 && Wt(e, s)) e = s;
1753
+ const o = (s) => (oe(s), this.onerror(s), e), n = (s) => {
1754
+ if (s !== void 0 && Vt(e, s)) e = s;
1768
1755
  else if (s !== void 0)
1769
1756
  return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`), e;
1770
1757
  if (r < t.length) try {
@@ -1779,8 +1766,8 @@ var X = class extends A {
1779
1766
  return Promise.resolve(e);
1780
1767
  }
1781
1768
  };
1782
- const te = "Remote loading is disabled by experiments.optimization.disableRemote.";
1783
- var Go = class {
1769
+ const ee = "Remote loading is disabled by experiments.optimization.disableRemote.";
1770
+ var Uo = class {
1784
1771
  constructor() {
1785
1772
  this.hooks = new H({});
1786
1773
  }
@@ -1788,28 +1775,28 @@ var Go = class {
1788
1775
  return [];
1789
1776
  }
1790
1777
  loadRemote() {
1791
- throw new Error(te);
1778
+ throw new Error(ee);
1792
1779
  }
1793
1780
  preloadRemote() {
1794
- throw new Error(te);
1781
+ throw new Error(ee);
1795
1782
  }
1796
1783
  registerRemotes() {
1797
- throw new Error(te);
1784
+ throw new Error(ee);
1798
1785
  }
1799
1786
  getRemoteModuleAndOptions() {
1800
- throw new Error(te);
1787
+ throw new Error(ee);
1801
1788
  }
1802
1789
  initRawContainer() {
1803
- throw new Error(te);
1790
+ throw new Error(ee);
1804
1791
  }
1805
1792
  };
1806
- function Vt(e, t) {
1793
+ function qt(e, t) {
1807
1794
  const r = Rt(t);
1808
1795
  r.url || w(Ft, M, { remoteName: e.name });
1809
1796
  let o = Me(t, r.url);
1810
1797
  !G && !o.startsWith("http") && (o = `https:${o}`), e.type = r.type, e.entryGlobalName = r.globalName, e.entry = o, e.version = t.version, e.buildVersion = t.buildVersion;
1811
1798
  }
1812
- function Uo() {
1799
+ function Bo() {
1813
1800
  return {
1814
1801
  name: "snapshot-plugin",
1815
1802
  async afterResolve(e) {
@@ -1819,7 +1806,7 @@ function Uo() {
1819
1806
  moduleInfo: t,
1820
1807
  id: Ge(t.name, o)
1821
1808
  });
1822
- Vt(s, c);
1809
+ qt(s, c);
1823
1810
  const l = {
1824
1811
  remote: t,
1825
1812
  preloadConfig: {
@@ -1837,7 +1824,7 @@ function Uo() {
1837
1824
  remoteSnapshot: c,
1838
1825
  globalSnapshot: a
1839
1826
  });
1840
- return u && jt(s, n, u, !1, {
1827
+ return u && Wt(s, n, u, !1, {
1841
1828
  initiator: "loadRemote",
1842
1829
  id: i
1843
1830
  }).catch(() => {
@@ -1850,7 +1837,7 @@ function Uo() {
1850
1837
  }
1851
1838
  };
1852
1839
  }
1853
- function Bo(e) {
1840
+ function jo(e) {
1854
1841
  const t = e.split(":");
1855
1842
  return t.length === 1 ? {
1856
1843
  name: t[0],
@@ -1863,33 +1850,33 @@ function Bo(e) {
1863
1850
  version: t[2]
1864
1851
  };
1865
1852
  }
1866
- function qt(e, t, r, o, n = {}, s) {
1867
- const { value: i } = W(e, se(t)), c = s || i;
1853
+ function zt(e, t, r, o, n = {}, s) {
1854
+ const { value: i } = W(e, ne(t)), c = s || i;
1868
1855
  if (c && !ct(c) && (r(c, t, o), c.remotesInfo)) {
1869
1856
  const a = Object.keys(c.remotesInfo);
1870
1857
  for (const l of a) {
1871
1858
  if (n[l]) continue;
1872
1859
  n[l] = !0;
1873
- const u = Bo(l), h = c.remotesInfo[l];
1874
- qt(e, {
1860
+ const u = jo(l), f = c.remotesInfo[l];
1861
+ zt(e, {
1875
1862
  name: u.name,
1876
- version: h.matchedVersion
1863
+ version: f.matchedVersion
1877
1864
  }, r, !1, n, void 0);
1878
1865
  }
1879
1866
  }
1880
1867
  }
1881
1868
  const Te = (e, t) => document.querySelector(`${e}[${e === "link" ? "href" : "src"}="${t}"]`);
1882
- function jo(e, t, r, o, n) {
1883
- const s = [], i = [], c = [], a = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), { options: u } = e, { preloadConfig: h } = t, { depsRemote: m } = h;
1884
- if (qt(o, r, (d, p, E) => {
1869
+ function Wo(e, t, r, o, n) {
1870
+ const s = [], i = [], c = [], a = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), { options: u } = e, { preloadConfig: f } = t, { depsRemote: m } = f;
1871
+ if (zt(o, r, (d, p, E) => {
1885
1872
  var I;
1886
1873
  let y;
1887
- if (E) y = h;
1874
+ if (E) y = f;
1888
1875
  else if (Array.isArray(m)) {
1889
- const b = m.find(($) => $.nameOrAlias === p.name || $.nameOrAlias === p.alias);
1890
- if (!b) return;
1891
- y = Bt(b);
1892
- } else if (m === !0) y = h;
1876
+ const S = m.find(($) => $.nameOrAlias === p.name || $.nameOrAlias === p.alias);
1877
+ if (!S) return;
1878
+ y = jt(S);
1879
+ } else if (m === !0) y = f;
1893
1880
  else return;
1894
1881
  const R = Me(d, Rt(d).url);
1895
1882
  R && c.push({
@@ -1905,15 +1892,15 @@ function jo(e, t, r, o, n) {
1905
1892
  url: R
1906
1893
  });
1907
1894
  let g = "modules" in d ? d.modules : [];
1908
- const _ = Co(y.exposes);
1909
- _.length && "modules" in d && (g = (I = d == null ? void 0 : d.modules) == null ? void 0 : I.reduce((b, $) => ((_ == null ? void 0 : _.indexOf($.moduleName)) !== -1 && b.push($), b), []));
1910
- function S(b) {
1911
- const $ = b.map((P) => Me(d, P));
1895
+ const _ = Fo(y.exposes);
1896
+ _.length && "modules" in d && (g = (I = d == null ? void 0 : d.modules) == null ? void 0 : I.reduce((S, $) => ((_ == null ? void 0 : _.indexOf($.moduleName)) !== -1 && S.push($), S), []));
1897
+ function b(S) {
1898
+ const $ = S.map((P) => Me(d, P));
1912
1899
  return y.filter ? $.filter(y.filter) : $;
1913
1900
  }
1914
1901
  if (g) {
1915
- const b = g.length;
1916
- for (let $ = 0; $ < b; $++) {
1902
+ const S = g.length;
1903
+ for (let $ = 0; $ < S; $++) {
1917
1904
  const P = g[$], Se = `${p.name}/${P.moduleName}`;
1918
1905
  e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({
1919
1906
  id: P.moduleName === "." ? p.name : Se,
@@ -1922,12 +1909,12 @@ function jo(e, t, r, o, n) {
1922
1909
  preloadConfig: y,
1923
1910
  remote: p,
1924
1911
  origin: e
1925
- }), !Br(Se) && (y.resourceCategory === "all" ? (s.push(...S(P.assets.css.async)), s.push(...S(P.assets.css.sync)), i.push(...S(P.assets.js.async)), i.push(...S(P.assets.js.sync))) : y.resourceCategory === "sync" && (s.push(...S(P.assets.css.sync)), i.push(...S(P.assets.js.sync))), jr(Se));
1912
+ }), !jr(Se) && (y.resourceCategory === "all" ? (s.push(...b(P.assets.css.async)), s.push(...b(P.assets.css.sync)), i.push(...b(P.assets.js.async)), i.push(...b(P.assets.js.sync))) : y.resourceCategory === "sync" && (s.push(...b(P.assets.css.sync)), i.push(...b(P.assets.js.sync))), Wr(Se));
1926
1913
  }
1927
1914
  }
1928
1915
  }, !0, {}, n), n.shared && n.shared.length > 0) {
1929
1916
  const d = (p, E) => {
1930
- const { shared: y } = ge(e.shareScopeMap, E.sharedName, p, e.sharedHandler.hooks.lifecycle.resolveShare) || {};
1917
+ const { shared: y } = Re(e.shareScopeMap, E.sharedName, p, e.sharedHandler.hooks.lifecycle.resolveShare) || {};
1931
1918
  y && typeof y.lib == "function" && (E.assets.js.sync.forEach((R) => {
1932
1919
  a.add(R);
1933
1920
  }), E.assets.css.sync.forEach((R) => {
@@ -1944,14 +1931,14 @@ function jo(e, t, r, o, n) {
1944
1931
  });
1945
1932
  });
1946
1933
  }
1947
- const f = i.filter((d) => !a.has(d) && !Te("script", d));
1934
+ const h = i.filter((d) => !a.has(d) && !Te("script", d));
1948
1935
  return {
1949
1936
  cssAssets: s.filter((d) => !l.has(d) && !Te("link", d)),
1950
- jsAssetsWithoutEntry: f,
1937
+ jsAssetsWithoutEntry: h,
1951
1938
  entryAssets: c.filter((d) => !Te("script", d.url))
1952
1939
  };
1953
1940
  }
1954
- const Wo = function() {
1941
+ const Vo = function() {
1955
1942
  return {
1956
1943
  name: "generate-preload-assets-plugin",
1957
1944
  async generatePreloadAssets(e) {
@@ -1970,7 +1957,7 @@ const Wo = function() {
1970
1957
  shareScope: ""
1971
1958
  }
1972
1959
  }]
1973
- } : (Vt(o, i), jo(t, r, o, s, i)) : {
1960
+ } : (qt(o, i), Wo(t, r, o, s, i)) : {
1974
1961
  cssAssets: [],
1975
1962
  jsAssetsWithoutEntry: [],
1976
1963
  entryAssets: []
@@ -1978,35 +1965,35 @@ const Wo = function() {
1978
1965
  }
1979
1966
  };
1980
1967
  };
1981
- function zt(e, t) {
1982
- const r = pe({
1968
+ function Kt(e, t) {
1969
+ const r = ye({
1983
1970
  name: t.name,
1984
1971
  version: t.options.version
1985
1972
  }), o = r && "remotesInfo" in r && r.remotesInfo && W(r.remotesInfo, e.name).value;
1986
1973
  return o && o.matchedVersion ? {
1987
1974
  hostGlobalSnapshot: r,
1988
1975
  globalSnapshot: Ve(),
1989
- remoteSnapshot: pe({
1976
+ remoteSnapshot: ye({
1990
1977
  name: e.name,
1991
1978
  version: o.matchedVersion
1992
1979
  })
1993
1980
  } : {
1994
1981
  hostGlobalSnapshot: void 0,
1995
1982
  globalSnapshot: Ve(),
1996
- remoteSnapshot: pe({
1983
+ remoteSnapshot: ye({
1997
1984
  name: e.name,
1998
1985
  version: "version" in e ? e.version : void 0
1999
1986
  })
2000
1987
  };
2001
1988
  }
2002
- var Vo = class {
1989
+ var qo = class {
2003
1990
  constructor(e) {
2004
1991
  this.loadingHostSnapshot = null, this.manifestCache = /* @__PURE__ */ new Map(), this.hooks = new H({
2005
1992
  beforeLoadRemoteSnapshot: new T("beforeLoadRemoteSnapshot"),
2006
1993
  loadSnapshot: new D("loadGlobalSnapshot"),
2007
1994
  loadRemoteSnapshot: new D("loadRemoteSnapshot"),
2008
1995
  afterLoadSnapshot: new D("afterLoadSnapshot")
2009
- }), this.manifestLoading = _e.__FEDERATION__.__MANIFEST_LOADING__, this.HostInstance = e, this.loaderHook = e.loaderHook;
1996
+ }), this.manifestLoading = be.__FEDERATION__.__MANIFEST_LOADING__, this.HostInstance = e, this.loaderHook = e.loaderHook;
2010
1997
  }
2011
1998
  async loadRemoteSnapshotInfo({ moduleInfo: e, id: t, initiator: r = "loadRemote" }) {
2012
1999
  const { options: o } = this.HostInstance;
@@ -2015,7 +2002,7 @@ var Vo = class {
2015
2002
  moduleInfo: e,
2016
2003
  origin: this.HostInstance
2017
2004
  });
2018
- let n = pe({
2005
+ let n = ye({
2019
2006
  name: this.HostInstance.options.name,
2020
2007
  version: this.HostInstance.options.version
2021
2008
  });
@@ -2023,7 +2010,7 @@ var Vo = class {
2023
2010
  version: this.HostInstance.options.version || "",
2024
2011
  remoteEntry: "",
2025
2012
  remotesInfo: {}
2026
- }, Gr({ [this.HostInstance.options.name]: n })), n && "remotesInfo" in n && !W(n.remotesInfo, e.name).value && ("version" in e || "entry" in e) && (n.remotesInfo = {
2013
+ }, Ur({ [this.HostInstance.options.name]: n })), n && "remotesInfo" in n && !W(n.remotesInfo, e.name).value && ("version" in e || "entry" in e) && (n.remotesInfo = {
2027
2014
  ...n == null ? void 0 : n.remotesInfo,
2028
2015
  [e.name]: { matchedVersion: "version" in e ? e.version : e.entry }
2029
2016
  });
@@ -2034,16 +2021,16 @@ var Vo = class {
2034
2021
  remoteSnapshot: i,
2035
2022
  globalSnapshot: c
2036
2023
  });
2037
- let u, h;
2024
+ let u, f;
2038
2025
  if (a) if (ct(a)) {
2039
- const m = G ? a.remoteEntry : a.ssrRemoteEntry || a.remoteEntry || "", f = await this.loadManifestSnapshot(m, e, {}, {
2026
+ const m = G ? a.remoteEntry : a.ssrRemoteEntry || a.remoteEntry || "", h = await this.loadManifestSnapshot(m, e, {}, {
2040
2027
  initiator: r,
2041
2028
  id: t || e.name
2042
2029
  }), d = qe({
2043
2030
  ...e,
2044
2031
  entry: m
2045
- }, f);
2046
- u = f, h = d;
2032
+ }, h);
2033
+ u = h, f = d;
2047
2034
  } else {
2048
2035
  const { remoteSnapshot: m } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
2049
2036
  options: this.HostInstance.options,
@@ -2051,14 +2038,14 @@ var Vo = class {
2051
2038
  remoteSnapshot: a,
2052
2039
  from: "global"
2053
2040
  });
2054
- u = m, h = l;
2041
+ u = m, f = l;
2055
2042
  }
2056
2043
  else if (Ce(e)) {
2057
2044
  const m = await this.loadManifestSnapshot(e.entry, e, {}, {
2058
2045
  initiator: r,
2059
2046
  id: t || e.name
2060
- }), f = qe(e, m);
2061
- u = m, h = f;
2047
+ }), h = qe(e, m);
2048
+ u = m, f = h;
2062
2049
  } else w(Lt, M, {
2063
2050
  remoteName: e.name,
2064
2051
  remoteVersion: e.version,
@@ -2073,11 +2060,11 @@ var Vo = class {
2073
2060
  remoteSnapshot: u
2074
2061
  }), {
2075
2062
  remoteSnapshot: u,
2076
- globalSnapshot: h
2063
+ globalSnapshot: f
2077
2064
  };
2078
2065
  }
2079
2066
  getGlobalRemoteInfo(e) {
2080
- return zt(e, this.HostInstance);
2067
+ return Kt(e, this.HostInstance);
2081
2068
  }
2082
2069
  async getManifestJson(e, t, r, o) {
2083
2070
  return (async () => {
@@ -2127,7 +2114,7 @@ var Vo = class {
2127
2114
  }
2128
2115
  async loadManifestSnapshot(e, t, r, o) {
2129
2116
  const n = async () => {
2130
- const s = await this.getManifestJson(e, t, r, o), i = pr(s, { version: e }), { remoteSnapshot: c } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
2117
+ const s = await this.getManifestJson(e, t, r, o), i = yr(s, { version: e }), { remoteSnapshot: c } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
2131
2118
  options: this.HostInstance.options,
2132
2119
  moduleInfo: t,
2133
2120
  manifestJson: s,
@@ -2139,11 +2126,11 @@ var Vo = class {
2139
2126
  };
2140
2127
  return this.manifestLoading[e] || (this.manifestLoading[e] = n().then((s) => s)), this.manifestLoading[e];
2141
2128
  }
2142
- }, qo = class {
2129
+ }, zo = class {
2143
2130
  constructor() {
2144
2131
  this.hooks = new H({});
2145
2132
  }
2146
- }, zo = class {
2133
+ }, Ko = class {
2147
2134
  constructor(e) {
2148
2135
  this.hooks = new H({
2149
2136
  beforeRegisterShare: new X("beforeRegisterShare"),
@@ -2168,7 +2155,7 @@ var Vo = class {
2168
2155
  origin: this.host
2169
2156
  });
2170
2157
  } catch (n) {
2171
- ne(n);
2158
+ oe(n);
2172
2159
  }
2173
2160
  }
2174
2161
  emitErrorLoadShare({ lifecycle: e, pkgName: t, shareInfo: r, error: o, recovered: n }) {
@@ -2184,7 +2171,7 @@ var Vo = class {
2184
2171
  recovered: n
2185
2172
  });
2186
2173
  } catch (s) {
2187
- ne(s);
2174
+ oe(s);
2188
2175
  }
2189
2176
  }
2190
2177
  registerShared(e, t) {
@@ -2228,9 +2215,9 @@ var Vo = class {
2228
2215
  shared: r.options.shared,
2229
2216
  origin: r
2230
2217
  })).shareInfo, L(n, `Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);
2231
- const s = n, { shared: i, useTreesShaking: c } = ge(this.shareScopeMap, e, n, this.hooks.lifecycle.resolveShare) || {};
2218
+ const s = n, { shared: i, useTreesShaking: c } = Re(this.shareScopeMap, e, n, this.hooks.lifecycle.resolveShare) || {};
2232
2219
  if (i) {
2233
- const a = he(i, c);
2220
+ const a = ue(i, c);
2234
2221
  if (a.lib)
2235
2222
  return z(a, r.options.name), this.emitAfterLoadShare({
2236
2223
  lifecycle: "loadShare",
@@ -2260,13 +2247,13 @@ var Vo = class {
2260
2247
  loading: u,
2261
2248
  treeShaking: c ? a : void 0
2262
2249
  });
2263
- const h = await u;
2250
+ const f = await u;
2264
2251
  return this.emitAfterLoadShare({
2265
2252
  lifecycle: "loadShare",
2266
2253
  pkgName: e,
2267
2254
  shareInfo: s,
2268
2255
  selectedShared: i
2269
- }), h;
2256
+ }), f;
2270
2257
  }
2271
2258
  } else {
2272
2259
  if (t != null && t.customShareInfo)
@@ -2276,15 +2263,15 @@ var Vo = class {
2276
2263
  shareInfo: s,
2277
2264
  recovered: !0
2278
2265
  }), !1;
2279
- const a = ie(s.treeShaking), l = he(s, a), h = (async () => {
2280
- const f = await l.get();
2281
- l.lib = f, l.loaded = !0, z(l, r.options.name);
2282
- const { shared: d, useTreesShaking: p } = ge(this.shareScopeMap, e, s, this.hooks.lifecycle.resolveShare) || {};
2266
+ const a = se(s.treeShaking), l = ue(s, a), f = (async () => {
2267
+ const h = await l.get();
2268
+ l.lib = h, l.loaded = !0, z(l, r.options.name);
2269
+ const { shared: d, useTreesShaking: p } = Re(this.shareScopeMap, e, s, this.hooks.lifecycle.resolveShare) || {};
2283
2270
  if (d) {
2284
- const E = he(d, p);
2285
- E.lib = f, E.loaded = !0, d.from = s.from;
2271
+ const E = ue(d, p);
2272
+ E.lib = h, E.loaded = !0, d.from = s.from;
2286
2273
  }
2287
- return f;
2274
+ return h;
2288
2275
  })();
2289
2276
  this.setShared({
2290
2277
  pkgName: e,
@@ -2292,10 +2279,10 @@ var Vo = class {
2292
2279
  shared: s,
2293
2280
  from: r.options.name,
2294
2281
  lib: null,
2295
- loading: h,
2282
+ loading: f,
2296
2283
  treeShaking: a ? l : void 0
2297
2284
  });
2298
- const m = await h;
2285
+ const m = await f;
2299
2286
  return this.emitAfterLoadShare({
2300
2287
  lifecycle: "loadShare",
2301
2288
  pkgName: e,
@@ -2317,49 +2304,49 @@ var Vo = class {
2317
2304
  * It accepts one argument, the name of the share scope.
2318
2305
  * If the share scope does not exist, it creates one.
2319
2306
  */
2320
- initializeSharing(e = ce, t) {
2307
+ initializeSharing(e = ae, t) {
2321
2308
  const { host: r } = this, o = t == null ? void 0 : t.from, n = t == null ? void 0 : t.strategy;
2322
2309
  let s = t == null ? void 0 : t.initScope;
2323
2310
  const i = [];
2324
2311
  if (o !== "build") {
2325
2312
  const { initTokens: m } = this;
2326
2313
  s || (s = []);
2327
- let f = m[e];
2328
- if (f || (f = m[e] = { from: this.host.name }), s.indexOf(f) >= 0) return i;
2329
- s.push(f);
2314
+ let h = m[e];
2315
+ if (h || (h = m[e] = { from: this.host.name }), s.indexOf(h) >= 0) return i;
2316
+ s.push(h);
2330
2317
  }
2331
2318
  const c = this.shareScopeMap, a = r.options.name;
2332
2319
  c[e] || (c[e] = {});
2333
- const l = c[e], u = (m, f) => {
2320
+ const l = c[e], u = (m, h) => {
2334
2321
  var g;
2335
- const { version: d, eager: p } = f;
2322
+ const { version: d, eager: p } = h;
2336
2323
  l[m] = l[m] || {};
2337
- const E = l[m], y = E[d] && he(E[d]), R = !!(y && ("eager" in y && y.eager || "shareConfig" in y && ((g = y.shareConfig) != null && g.eager)));
2338
- (!y || y.strategy !== "loaded-first" && !y.loaded && (!p != !R ? p : a > E[d].from)) && (E[d] = f);
2339
- }, h = async (m) => {
2340
- const { module: f } = await r.remoteHandler.getRemoteModuleAndOptions({ id: m });
2324
+ const E = l[m], y = E[d] && ue(E[d]), R = !!(y && ("eager" in y && y.eager || "shareConfig" in y && ((g = y.shareConfig) != null && g.eager)));
2325
+ (!y || y.strategy !== "loaded-first" && !y.loaded && (!p != !R ? p : a > E[d].from)) && (E[d] = h);
2326
+ }, f = async (m) => {
2327
+ const { module: h } = await r.remoteHandler.getRemoteModuleAndOptions({ id: m });
2341
2328
  let d;
2342
2329
  try {
2343
- d = await f.getEntry();
2330
+ d = await h.getEntry();
2344
2331
  } catch (p) {
2345
2332
  if (d = await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
2346
2333
  id: m,
2347
2334
  error: p,
2348
2335
  from: "runtime",
2349
2336
  lifecycle: "beforeLoadShare",
2350
- remote: f.remoteInfo,
2337
+ remote: h.remoteInfo,
2351
2338
  origin: r
2352
2339
  }), !d) return;
2353
2340
  } finally {
2354
- d != null && d.init && !f.initing && (f.remoteEntryExports = d, await f.init(void 0, void 0, s));
2341
+ d != null && d.init && !h.initing && (h.remoteEntryExports = d, await h.init(void 0, void 0, s));
2355
2342
  }
2356
2343
  };
2357
2344
  return Object.keys(r.options.shared).forEach((m) => {
2358
- r.options.shared[m].forEach((f) => {
2359
- f.scope.includes(e) && u(m, f);
2345
+ r.options.shared[m].forEach((h) => {
2346
+ h.scope.includes(e) && u(m, h);
2360
2347
  });
2361
2348
  }), (r.options.shareStrategy === "version-first" || n === "version-first") && r.options.remotes.forEach((m) => {
2362
- m.shareScope === e && i.push(h(m.name));
2349
+ m.shareScope === e && i.push(f(m.name));
2363
2350
  }), i;
2364
2351
  }
2365
2352
  loadShareSync(e, t) {
@@ -2372,7 +2359,7 @@ var Vo = class {
2372
2359
  o != null && o.scope && o.scope.forEach((s) => {
2373
2360
  this.initializeSharing(s, { strategy: o.strategy });
2374
2361
  });
2375
- const { shared: n } = ge(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
2362
+ const { shared: n } = Re(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
2376
2363
  if (n) {
2377
2364
  if (typeof n.lib == "function")
2378
2365
  return z(n, r.options.name), n.loaded || (n.loaded = !0, n.from === r.options.name && (o.loaded = !0)), this.emitAfterLoadShare({
@@ -2447,20 +2434,20 @@ var Vo = class {
2447
2434
  });
2448
2435
  }
2449
2436
  setShared({ pkgName: e, shared: t, from: r, lib: o, loading: n, loaded: s, get: i, treeShaking: c }) {
2450
- const { version: a, scope: l = "default", ...u } = t, h = Array.isArray(l) ? l : [l], m = (f) => {
2437
+ const { version: a, scope: l = "default", ...u } = t, f = Array.isArray(l) ? l : [l], m = (h) => {
2451
2438
  const d = (E, y, R) => {
2452
2439
  R && !E[y] && (E[y] = R);
2453
- }, p = c ? f.treeShaking : f;
2440
+ }, p = c ? h.treeShaking : h;
2454
2441
  d(p, "loaded", s), d(p, "loading", n), d(p, "get", i);
2455
2442
  };
2456
- h.forEach((f) => {
2457
- this.shareScopeMap[f] || (this.shareScopeMap[f] = {}), this.shareScopeMap[f][e] || (this.shareScopeMap[f][e] = {}), this.shareScopeMap[f][e][a] || (this.shareScopeMap[f][e][a] = {
2443
+ f.forEach((h) => {
2444
+ this.shareScopeMap[h] || (this.shareScopeMap[h] = {}), this.shareScopeMap[h][e] || (this.shareScopeMap[h][e] = {}), this.shareScopeMap[h][e][a] || (this.shareScopeMap[h][e][a] = {
2458
2445
  version: a,
2459
- scope: [f],
2446
+ scope: [h],
2460
2447
  ...u,
2461
2448
  lib: o
2462
2449
  });
2463
- const d = this.shareScopeMap[f][e][a];
2450
+ const d = this.shareScopeMap[h][e][a];
2464
2451
  m(d), r && d.from !== r && (d.from = r);
2465
2452
  });
2466
2453
  }
@@ -2468,7 +2455,7 @@ var Vo = class {
2468
2455
  const t = Nt(), r = e.id || e.name;
2469
2456
  r && !t[r] && (t[r] = this.shareScopeMap);
2470
2457
  }
2471
- }, Ko = class {
2458
+ }, Jo = class {
2472
2459
  constructor() {
2473
2460
  this.shareScopeMap = {}, this.hooks = new H({ afterResolve: new D("afterResolve") });
2474
2461
  }
@@ -2490,7 +2477,7 @@ var Vo = class {
2490
2477
  initShareScopeMap(e, t) {
2491
2478
  this.shareScopeMap[e] = t;
2492
2479
  }
2493
- }, Jo = class {
2480
+ }, Zo = class {
2494
2481
  constructor(e) {
2495
2482
  this.hooks = new H({
2496
2483
  beforeRegisterRemote: new X("beforeRegisterRemote"),
@@ -2535,20 +2522,20 @@ var Vo = class {
2535
2522
  const { host: r } = this, o = Qe(r.options.remotes, e);
2536
2523
  let n = e, s = o == null ? void 0 : o.expose, i = o ? K(o.remote) : void 0, c;
2537
2524
  try {
2538
- const { loadFactory: a = !0 } = t || { loadFactory: !0 }, { module: l, moduleOptions: u, remoteMatchInfo: h } = await this.getRemoteModuleAndOptions({ id: e }), { pkgNameOrAlias: m, remote: f, expose: d, id: p, remoteSnapshot: E } = h;
2539
- n = p, s = d, i = K(f);
2525
+ const { loadFactory: a = !0 } = t || { loadFactory: !0 }, { module: l, moduleOptions: u, remoteMatchInfo: f } = await this.getRemoteModuleAndOptions({ id: e }), { pkgNameOrAlias: m, remote: h, expose: d, id: p, remoteSnapshot: E } = f;
2526
+ n = p, s = d, i = K(h);
2540
2527
  const y = await l.get(p, d, t, E), R = await this.hooks.lifecycle.onLoad.emit({
2541
2528
  id: p,
2542
2529
  pkgNameOrAlias: m,
2543
2530
  expose: d,
2544
2531
  exposeModule: a ? y : void 0,
2545
2532
  exposeModuleFactory: a ? void 0 : y,
2546
- remote: f,
2533
+ remote: h,
2547
2534
  options: u,
2548
2535
  moduleInstance: l,
2549
2536
  origin: r
2550
2537
  });
2551
- return this.setIdToRemoteMap(e, h), c = {
2538
+ return this.setIdToRemoteMap(e, f), c = {
2552
2539
  id: n,
2553
2540
  expose: s,
2554
2541
  remote: i,
@@ -2568,15 +2555,15 @@ var Vo = class {
2568
2555
  remote: i,
2569
2556
  origin: r
2570
2557
  });
2571
- } catch (h) {
2558
+ } catch (f) {
2572
2559
  throw c = {
2573
2560
  id: n,
2574
2561
  expose: s,
2575
2562
  remote: i,
2576
2563
  options: t,
2577
- error: h,
2564
+ error: f,
2578
2565
  origin: r
2579
- }, h;
2566
+ }, f;
2580
2567
  }
2581
2568
  if (!u)
2582
2569
  throw c = {
@@ -2607,17 +2594,17 @@ var Vo = class {
2607
2594
  options: t.options,
2608
2595
  origin: t
2609
2596
  });
2610
- const o = Lo(t.options.remotes, e), n = (c) => {
2597
+ const o = Co(t.options.remotes, e), n = (c) => {
2611
2598
  const { preloadConfig: a, remote: l } = c, u = a.exposes || [];
2612
- return u.length ? u.map((h) => ({
2599
+ return u.length ? u.map((f) => ({
2613
2600
  ops: {
2614
2601
  ...c,
2615
2602
  preloadConfig: {
2616
2603
  ...a,
2617
- exposes: [h]
2604
+ exposes: [f]
2618
2605
  }
2619
2606
  },
2620
- id: Ge(l.name, h)
2607
+ id: Ge(l.name, f)
2621
2608
  })) : [{
2622
2609
  ops: c,
2623
2610
  id: `${l.name}/*`
@@ -2625,9 +2612,9 @@ var Vo = class {
2625
2612
  };
2626
2613
  let s;
2627
2614
  await Promise.all(o.flatMap(n).map(async (c) => {
2628
- const { ops: a, id: l } = c, { remote: u, preloadConfig: h } = a, m = K(u);
2615
+ const { ops: a, id: l } = c, { remote: u, preloadConfig: f } = a, m = K(u);
2629
2616
  try {
2630
- const { globalSnapshot: f, remoteSnapshot: d } = await t.snapshotHandler.loadRemoteSnapshotInfo({
2617
+ const { globalSnapshot: h, remoteSnapshot: d } = await t.snapshotHandler.loadRemoteSnapshotInfo({
2631
2618
  moduleInfo: u,
2632
2619
  id: l,
2633
2620
  initiator: "preloadRemote"
@@ -2636,26 +2623,26 @@ var Vo = class {
2636
2623
  preloadOptions: a,
2637
2624
  remote: u,
2638
2625
  remoteInfo: m,
2639
- globalSnapshot: f,
2626
+ globalSnapshot: h,
2640
2627
  remoteSnapshot: d
2641
2628
  });
2642
2629
  if (!p) return;
2643
- const E = await jt(m, t, p, !0, {
2630
+ const E = await Wt(m, t, p, !0, {
2644
2631
  initiator: "preloadRemote",
2645
2632
  id: l
2646
2633
  });
2647
2634
  r.push({
2648
2635
  remote: u,
2649
2636
  remoteInfo: m,
2650
- preloadConfig: h,
2637
+ preloadConfig: f,
2651
2638
  id: l,
2652
2639
  results: E
2653
2640
  });
2654
- } catch (f) {
2641
+ } catch (h) {
2655
2642
  r.push({
2656
2643
  remote: u,
2657
2644
  remoteInfo: m,
2658
- preloadConfig: h,
2645
+ preloadConfig: f,
2659
2646
  id: l,
2660
2647
  results: [{
2661
2648
  url: m.entry,
@@ -2663,7 +2650,7 @@ var Vo = class {
2663
2650
  resourceType: /\.json(?:$|[?#])/i.test(m.entry) ? "manifest" : "remoteEntry",
2664
2651
  initiator: "preloadRemote",
2665
2652
  id: l,
2666
- error: f
2653
+ error: h
2667
2654
  }]
2668
2655
  });
2669
2656
  }
@@ -2705,15 +2692,15 @@ var Vo = class {
2705
2692
  options: t.options,
2706
2693
  origin: t
2707
2694
  });
2708
- } catch (f) {
2695
+ } catch (h) {
2709
2696
  if (o = await this.hooks.lifecycle.errorLoadRemote.emit({
2710
2697
  id: r,
2711
2698
  options: t.options,
2712
2699
  origin: t,
2713
2700
  from: "runtime",
2714
- error: f,
2701
+ error: h,
2715
2702
  lifecycle: "beforeRequest"
2716
- }), !o) throw f;
2703
+ }), !o) throw h;
2717
2704
  }
2718
2705
  const { id: n } = o, s = Qe(t.options.remotes, n);
2719
2706
  if (!s) try {
@@ -2721,13 +2708,13 @@ var Vo = class {
2721
2708
  hostName: t.options.name,
2722
2709
  requestId: n
2723
2710
  }, void 0, F(t.options));
2724
- } catch (f) {
2711
+ } catch (h) {
2725
2712
  throw await this.hooks.lifecycle.afterMatchRemote.emit({
2726
2713
  id: n,
2727
2714
  options: t.options,
2728
- error: f,
2715
+ error: h,
2729
2716
  origin: t
2730
- }), f;
2717
+ }), h;
2731
2718
  }
2732
2719
  const { remote: i } = s, c = K(i);
2733
2720
  await this.hooks.lifecycle.afterMatchRemote.emit({
@@ -2745,13 +2732,13 @@ var Vo = class {
2745
2732
  remoteInfo: c
2746
2733
  }), { remote: l, expose: u } = a;
2747
2734
  L(l && u, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${n}.`);
2748
- let h = t.moduleCache.get(l.name);
2735
+ let f = t.moduleCache.get(l.name);
2749
2736
  const m = {
2750
2737
  host: t,
2751
2738
  remoteInfo: c
2752
2739
  };
2753
- return h || (h = new et(m), t.moduleCache.set(l.name, h)), {
2754
- module: h,
2740
+ return f || (f = new et(m), t.moduleCache.set(l.name, f)), {
2741
+ module: f,
2755
2742
  moduleOptions: m,
2756
2743
  remoteMatchInfo: a
2757
2744
  };
@@ -2765,7 +2752,7 @@ var Vo = class {
2765
2752
  });
2766
2753
  L(!i, `The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i && i.name} name or alias`);
2767
2754
  }
2768
- "entry" in e && G && typeof window < "u" && !e.entry.startsWith("http") && (e.entry = new URL(e.entry, window.location.origin).href), e.shareScope || (e.shareScope = ce), e.type || (e.type = Tt);
2755
+ "entry" in e && G && typeof window < "u" && !e.entry.startsWith("http") && (e.entry = new URL(e.entry, window.location.origin).href), e.shareScope || (e.shareScope = ae), e.type || (e.type = Tt);
2769
2756
  };
2770
2757
  this.hooks.lifecycle.beforeRegisterRemote.emit({
2771
2758
  remote: e,
@@ -2790,9 +2777,9 @@ var Vo = class {
2790
2777
  try {
2791
2778
  const { host: r } = this, { name: o } = e, n = r.options.remotes.findIndex((a) => a.name === o);
2792
2779
  n !== -1 && r.options.remotes.splice(n, 1);
2793
- const s = W(v.__FEDERATION__.moduleInfo, se(e)).key;
2794
- delete v.__FEDERATION__.moduleInfo[s], "entry" in e && (r.snapshotHandler.manifestCache.delete(e.entry), delete _e.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);
2795
- const { hostGlobalSnapshot: i } = zt(e, r);
2780
+ const s = W(v.__FEDERATION__.moduleInfo, ne(e)).key;
2781
+ delete v.__FEDERATION__.moduleInfo[s], "entry" in e && (r.snapshotHandler.manifestCache.delete(e.entry), delete be.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);
2782
+ const { hostGlobalSnapshot: i } = Kt(e, r);
2796
2783
  if (i) {
2797
2784
  const a = i && "remotesInfo" in i && i.remotesInfo && W(i.remotesInfo, e.name).key;
2798
2785
  a && delete i.remotesInfo[a];
@@ -2803,11 +2790,11 @@ var Vo = class {
2803
2790
  v[l] && ((t = Object.getOwnPropertyDescriptor(v, l)) != null && t.configurable ? delete v[l] : v[l] = void 0);
2804
2791
  const u = Le(c.remoteInfo);
2805
2792
  J[u] && delete J[u];
2806
- let h = a.buildVersion ? st(a.name, a.buildVersion) : a.name;
2807
- const m = v.__FEDERATION__.__INSTANCES__.findIndex((f) => a.buildVersion ? f.options.id === h : f.name === h);
2793
+ let f = a.buildVersion ? st(a.name, a.buildVersion) : a.name;
2794
+ const m = v.__FEDERATION__.__INSTANCES__.findIndex((h) => a.buildVersion ? h.options.id === f : h.name === f);
2808
2795
  if (m !== -1) {
2809
- const f = v.__FEDERATION__.__INSTANCES__[m];
2810
- h = f.options.id || h;
2796
+ const h = v.__FEDERATION__.__INSTANCES__[m];
2797
+ f = h.options.id || f;
2811
2798
  const d = Nt();
2812
2799
  let p = !0;
2813
2800
  const E = [];
@@ -2815,27 +2802,27 @@ var Vo = class {
2815
2802
  const R = d[y];
2816
2803
  R && Object.keys(R).forEach((g) => {
2817
2804
  const _ = R[g];
2818
- _ && Object.keys(_).forEach((S) => {
2819
- const I = _[S];
2820
- I && Object.keys(I).forEach((b) => {
2821
- const $ = I[b];
2805
+ _ && Object.keys(_).forEach((b) => {
2806
+ const I = _[b];
2807
+ I && Object.keys(I).forEach((S) => {
2808
+ const $ = I[S];
2822
2809
  $ && typeof $ == "object" && $.from === a.name && ($.loaded || $.loading ? ($.useIn = $.useIn.filter((P) => P !== a.name), $.useIn.length ? p = !1 : E.push([
2823
2810
  y,
2824
2811
  g,
2825
- S,
2826
- b
2812
+ b,
2813
+ S
2827
2814
  ])) : E.push([
2828
2815
  y,
2829
2816
  g,
2830
- S,
2831
- b
2817
+ b,
2818
+ S
2832
2819
  ]));
2833
2820
  });
2834
2821
  });
2835
2822
  });
2836
- }), p && (f.shareScopeMap = {}, delete d[h]), E.forEach(([y, R, g, _]) => {
2837
- var S, I, b;
2838
- (b = (I = (S = d[y]) == null ? void 0 : S[R]) == null ? void 0 : I[g]) == null || delete b[_];
2823
+ }), p && (h.shareScopeMap = {}, delete d[f]), E.forEach(([y, R, g, _]) => {
2824
+ var b, I, S;
2825
+ (S = (I = (b = d[y]) == null ? void 0 : b[R]) == null ? void 0 : I[g]) == null || delete S[_];
2839
2826
  }), v.__FEDERATION__.__INSTANCES__.splice(m, 1);
2840
2827
  }
2841
2828
  r.moduleCache.delete(e.name);
@@ -2845,15 +2832,15 @@ var Vo = class {
2845
2832
  }
2846
2833
  }
2847
2834
  };
2848
- const Zo = typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN == "boolean" ? !FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN : !0, ve = typeof FEDERATION_OPTIMIZE_NO_REMOTE == "boolean" ? !FEDERATION_OPTIMIZE_NO_REMOTE : !0, tt = typeof FEDERATION_OPTIMIZE_NO_SHARED == "boolean" ? !FEDERATION_OPTIMIZE_NO_SHARED : !0;
2849
- var Xo = class {
2835
+ const Xo = typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN == "boolean" ? !FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN : !0, ve = typeof FEDERATION_OPTIMIZE_NO_REMOTE == "boolean" ? !FEDERATION_OPTIMIZE_NO_REMOTE : !0, tt = typeof FEDERATION_OPTIMIZE_NO_SHARED == "boolean" ? !FEDERATION_OPTIMIZE_NO_SHARED : !0;
2836
+ var Yo = class {
2850
2837
  constructor(e) {
2851
2838
  this.hooks = new H({
2852
2839
  beforeInit: new X("beforeInit"),
2853
2840
  init: new A(),
2854
2841
  beforeInitContainer: new D("beforeInitContainer"),
2855
2842
  initContainer: new D("initContainer")
2856
- }), this.version = "2.8.0", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new H({
2843
+ }), this.version = "2.8.1", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new H({
2857
2844
  getModuleInfo: new A(),
2858
2845
  createScript: new A(),
2859
2846
  createLink: new A(),
@@ -2873,15 +2860,15 @@ var Xo = class {
2873
2860
  beforeBridgeDestroy: new A(),
2874
2861
  afterBridgeDestroy: new A()
2875
2862
  });
2876
- const t = ve && Zo ? [Uo(), Wo()] : [], r = {
2877
- id: Po(),
2863
+ const t = ve && Xo ? [Bo(), Vo()] : [], r = {
2864
+ id: ko(),
2878
2865
  name: e.name,
2879
2866
  plugins: t,
2880
2867
  remotes: [],
2881
2868
  shared: {},
2882
2869
  inBrowser: G
2883
2870
  };
2884
- this.name = e.name, this.options = r, this.snapshotHandler = ve ? new Vo(this) : new qo(), this.sharedHandler = tt ? new zo(this) : new Ko(), this.remoteHandler = ve ? new Jo(this) : new Go(), this.shareScopeMap = this.sharedHandler.shareScopeMap, this.registerPlugins([...r.plugins, ...e.plugins || []]), this.options = this.formatOptions(r, e);
2871
+ this.name = e.name, this.options = r, this.snapshotHandler = ve ? new qo(this) : new zo(), this.sharedHandler = tt ? new Ko(this) : new Jo(), this.remoteHandler = ve ? new Zo(this) : new Uo(), this.shareScopeMap = this.sharedHandler.shareScopeMap, this.registerPlugins([...r.plugins, ...e.plugins || []]), this.options = this.formatOptions(r, e);
2885
2872
  }
2886
2873
  initOptions(e) {
2887
2874
  e.name && e.name !== this.options.name && w(yt(Ct, M)), this.registerPlugins(e.plugins);
@@ -2894,7 +2881,7 @@ var Xo = class {
2894
2881
  loadShareSync(e, t) {
2895
2882
  return this.sharedHandler.loadShareSync(e, t);
2896
2883
  }
2897
- initializeSharing(e = ce, t) {
2884
+ initializeSharing(e = ae, t) {
2898
2885
  return this.sharedHandler.initializeSharing(e, t);
2899
2886
  }
2900
2887
  initRawContainer(e, t, r) {
@@ -2933,7 +2920,7 @@ var Xo = class {
2933
2920
  }), a;
2934
2921
  }
2935
2922
  registerPlugins(e) {
2936
- const t = ko(e, this);
2923
+ const t = Oo(e, this);
2937
2924
  this.options.plugins = this.options.plugins.reduce((r, o) => (o && r && !r.find((n) => n.name === o.name) && r.push(o), r), t || []);
2938
2925
  }
2939
2926
  registerRemotes(e, t) {
@@ -2946,12 +2933,12 @@ var Xo = class {
2946
2933
  });
2947
2934
  }
2948
2935
  };
2949
- let Yo = null;
2950
- function Kt(e) {
2951
- return Yo;
2936
+ let Qo = null;
2937
+ function Jt(e) {
2938
+ return Qo;
2952
2939
  }
2953
- Dr(Xo);
2954
- function Jt(e, t) {
2940
+ xr(Yo);
2941
+ function Zt(e, t) {
2955
2942
  const r = (o) => {
2956
2943
  if (!o.startsWith("/")) return o;
2957
2944
  const n = o.length > 1 && o.endsWith("/"), s = `${t}/${o}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/";
@@ -2965,33 +2952,33 @@ function Jt(e, t) {
2965
2952
  return typeof o.redirect == "string" ? n.redirect = r(o.redirect) : o.redirect && typeof o.redirect == "object" && "path" in o.redirect && typeof o.redirect.path == "string" && (n.redirect = {
2966
2953
  ...o.redirect,
2967
2954
  path: r(o.redirect.path)
2968
- }), o.children && o.children.length > 0 && (n.children = Jt(
2955
+ }), o.children && o.children.length > 0 && (n.children = Zt(
2969
2956
  o.children,
2970
2957
  t
2971
2958
  )), n;
2972
2959
  });
2973
2960
  }
2974
- function Qo(e) {
2961
+ function en(e) {
2975
2962
  const t = e.replace(/\/+$/, ""), r = (s) => s.startsWith("/") && s !== t && !s.startsWith(t + "/"), o = (s) => `${t}${s}`.replace(/\/+/g, "/"), n = (s) => typeof s == "string" ? r(s) ? o(s) : s : "path" in s && typeof s.path == "string" && r(s.path) ? { ...s, path: o(s.path) } : s;
2976
2963
  return (s) => {
2977
2964
  const i = s.push.bind(s), c = s.replace.bind(s), a = s.resolve.bind(s);
2978
2965
  s.push = (l) => i(n(l)), s.replace = (l) => c(n(l)), s.resolve = (l, ...u) => a(n(l), ...u);
2979
2966
  };
2980
2967
  }
2981
- function en(e) {
2968
+ function tn(e) {
2982
2969
  const { router: t, basename: r, memoryRoute: o, hashRoute: n } = e, s = t.getRoutes().sort(
2983
- (f, d) => f.path.split("/").filter((p) => p).length - d.path.split("/").filter((p) => p).length
2970
+ (h, d) => h.path.split("/").filter((p) => p).length - d.path.split("/").filter((p) => p).length
2984
2971
  ), i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set();
2985
- s.forEach((f) => {
2986
- const d = i.get(f.path) || [];
2987
- d.push(f), i.set(f.path, d);
2972
+ s.forEach((h) => {
2973
+ const d = i.get(h.path) || [];
2974
+ d.push(h), i.set(h.path, d);
2988
2975
  });
2989
- const a = (f, d) => `${f}/${d}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/", l = (f, d = "") => {
2990
- if (!f.children || f.children.length === 0)
2991
- return f;
2992
- for (let p = 0; p < f.children.length; p++) {
2993
- const E = f.children[p], y = a(d, E.path), g = (i.get(y) || []).find(
2994
- (_) => !c.has(_) && _ !== f && (E.name == null || _.name === E.name)
2976
+ const a = (h, d) => `${h}/${d}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/", l = (h, d = "") => {
2977
+ if (!h.children || h.children.length === 0)
2978
+ return h;
2979
+ for (let p = 0; p < h.children.length; p++) {
2980
+ const E = h.children[p], y = a(d, E.path), g = (i.get(y) || []).find(
2981
+ (_) => !c.has(_) && _ !== h && (E.name == null || _.name === E.name)
2995
2982
  );
2996
2983
  if (g) {
2997
2984
  const _ = {
@@ -2999,24 +2986,24 @@ function en(e) {
2999
2986
  path: E.path
3000
2987
  // Keep the original relative path from static route
3001
2988
  };
3002
- f.children[p] = _, c.add(g), l(_, y);
2989
+ h.children[p] = _, c.add(g), l(_, y);
3003
2990
  }
3004
2991
  }
3005
- return f;
2992
+ return h;
3006
2993
  };
3007
2994
  let u = [];
3008
- for (const f of s)
3009
- if (!c.has(f)) {
3010
- const d = l(f, f.path);
3011
- c.add(f), u.push(d);
2995
+ for (const h of s)
2996
+ if (!c.has(h)) {
2997
+ const d = l(h, h.path);
2998
+ c.add(h), u.push(d);
3012
2999
  }
3013
- let h, m;
3014
- return o ? h = fe.createMemoryHistory(r) : n ? (h = fe.createWebHashHistory(), r && (u = Jt(u, r), m = Qo(r))) : h = fe.createWebHistory(r), { history: h, routes: u, patchRouter: m };
3000
+ let f, m;
3001
+ return o ? f = de.createMemoryHistory(r) : n ? (f = de.createWebHashHistory(), r && (u = Zt(u, r), m = en(r))) : f = de.createWebHistory(r), { history: f, routes: u, patchRouter: m };
3015
3002
  }
3016
- function an(e) {
3017
- const t = /* @__PURE__ */ new Map(), r = Kt();
3003
+ function cn(e) {
3004
+ const t = /* @__PURE__ */ new Map(), r = Jt();
3018
3005
  return () => ({
3019
- __APP_VERSION__: "2.8.0",
3006
+ __APP_VERSION__: "2.8.1",
3020
3007
  async render(o) {
3021
3008
  var d, p, E, y, R, g;
3022
3009
  C.debug("createBridgeComponent render Info", o);
@@ -3027,9 +3014,9 @@ function an(e) {
3027
3014
  memoryRoute: c,
3028
3015
  hashRoute: a,
3029
3016
  ...l
3030
- } = o, u = Zt.createApp(e.rootComponent, l);
3017
+ } = o, u = Xt.createApp(e.rootComponent, l);
3031
3018
  t.set(s, u);
3032
- const h = await ((E = (p = (d = r == null ? void 0 : r.bridgeHook) == null ? void 0 : d.lifecycle) == null ? void 0 : p.beforeBridgeRender) == null ? void 0 : E.emit(o)), m = h && typeof h == "object" && (h != null && h.extraProps) ? h == null ? void 0 : h.extraProps : {}, f = e.appOptions({
3019
+ const f = await ((E = (p = (d = r == null ? void 0 : r.bridgeHook) == null ? void 0 : d.lifecycle) == null ? void 0 : p.beforeBridgeRender) == null ? void 0 : E.emit(o)), m = f && typeof f == "object" && (f != null && f.extraProps) ? f == null ? void 0 : f.extraProps : {}, h = e.appOptions({
3033
3020
  app: u,
3034
3021
  basename: i,
3035
3022
  memoryRoute: c,
@@ -3037,21 +3024,21 @@ function an(e) {
3037
3024
  ...l,
3038
3025
  ...m
3039
3026
  });
3040
- if (f != null && f.router) {
3041
- const { history: _, routes: S, patchRouter: I } = en({
3042
- router: f.router,
3027
+ if (h != null && h.router) {
3028
+ const { history: _, routes: b, patchRouter: I } = tn({
3029
+ router: h.router,
3043
3030
  basename: o.basename,
3044
3031
  memoryRoute: o.memoryRoute,
3045
3032
  hashRoute: o.hashRoute
3046
- }), b = fe.createRouter({
3047
- ...f.router.options,
3033
+ }), S = de.createRouter({
3034
+ ...h.router.options,
3048
3035
  history: _,
3049
- routes: S
3036
+ routes: b
3050
3037
  });
3051
- I && I(b), f.afterRouterCreate && f.afterRouterCreate(b), C.debug("createBridgeComponent render router info>>>", {
3038
+ I && I(S), h.afterRouterCreate && h.afterRouterCreate(S), C.debug("createBridgeComponent render router info>>>", {
3052
3039
  moduleName: n,
3053
- router: b
3054
- }), c && await b.push(c.entryPath), u.use(b);
3040
+ router: S
3041
+ }), c && await S.push(c.entryPath), u.use(S);
3055
3042
  }
3056
3043
  u.mount(s), (g = (R = (y = r == null ? void 0 : r.bridgeHook) == null ? void 0 : y.lifecycle) == null ? void 0 : R.afterBridgeRender) == null || g.emit(o);
3057
3044
  },
@@ -3063,11 +3050,11 @@ function an(e) {
3063
3050
  }
3064
3051
  });
3065
3052
  }
3066
- function tn() {
3053
+ function rn() {
3067
3054
  const e = new PopStateEvent("popstate", { state: window.history.state });
3068
3055
  window.dispatchEvent(e);
3069
3056
  }
3070
- const rn = /* @__PURE__ */ Xt({
3057
+ const on = /* @__PURE__ */ Yt({
3071
3058
  name: "RemoteApp",
3072
3059
  props: {
3073
3060
  moduleName: String,
@@ -3079,14 +3066,14 @@ const rn = /* @__PURE__ */ Xt({
3079
3066
  },
3080
3067
  inheritAttrs: !1,
3081
3068
  setup(e) {
3082
- const t = V(null), r = V(null), o = V(""), n = V(!1), s = V(!1), i = V(!1), c = rt(), a = Kt(), l = Yt(), u = () => ({
3069
+ const t = V(null), r = V(null), o = V(""), n = V(!1), s = V(!1), i = V(!1), c = rt(), a = Jt(), l = Qt(), u = () => ({
3083
3070
  name: e.moduleName,
3084
3071
  dom: t.value,
3085
3072
  basename: e.basename,
3086
3073
  memoryRoute: e.memoryRoute,
3087
3074
  hashRoute: e.hashRoute
3088
- }), h = async () => {
3089
- var y, R, g, _, S, I, b;
3075
+ }), f = async () => {
3076
+ var y, R, g, _, b, I, S;
3090
3077
  if (!t.value || n.value)
3091
3078
  return;
3092
3079
  const d = (y = e.providerInfo) == null ? void 0 : y.call(e);
@@ -3104,9 +3091,9 @@ const rn = /* @__PURE__ */ Xt({
3104
3091
  p = {
3105
3092
  ...p,
3106
3093
  ...E.extraProps
3107
- }, d.render(p), n.value = !0, (b = (I = (S = a == null ? void 0 : a.bridgeHook) == null ? void 0 : S.lifecycle) == null ? void 0 : I.afterBridgeRender) == null || b.emit(p);
3094
+ }, d.render(p), n.value = !0, (S = (I = (b = a == null ? void 0 : a.bridgeHook) == null ? void 0 : b.lifecycle) == null ? void 0 : I.afterBridgeRender) == null || S.emit(p);
3108
3095
  }, m = () => {
3109
- var E, y, R, g, _, S;
3096
+ var E, y, R, g, _, b;
3110
3097
  const d = r.value;
3111
3098
  if (!d || !n.value)
3112
3099
  return;
@@ -3116,30 +3103,30 @@ const rn = /* @__PURE__ */ Xt({
3116
3103
  const p = u();
3117
3104
  (R = (y = (E = a == null ? void 0 : a.bridgeHook) == null ? void 0 : E.lifecycle) == null ? void 0 : y.beforeBridgeDestroy) == null || R.emit(p), d.destroy({
3118
3105
  dom: t.value
3119
- }), r.value = null, n.value = !1, (S = (_ = (g = a == null ? void 0 : a.bridgeHook) == null ? void 0 : g.lifecycle) == null ? void 0 : _.afterBridgeDestroy) == null || S.emit(p);
3120
- }, f = Qt(() => c == null ? void 0 : c.path, (d) => {
3106
+ }), r.value = null, n.value = !1, (b = (_ = (g = a == null ? void 0 : a.bridgeHook) == null ? void 0 : g.lifecycle) == null ? void 0 : _.afterBridgeDestroy) == null || b.emit(p);
3107
+ }, h = er(() => c == null ? void 0 : c.path, (d) => {
3121
3108
  s.value && o.value !== "" && o.value !== d && (C.debug("createRemoteAppComponent dispatchPopstateEnv >>>", {
3122
3109
  ...e,
3123
3110
  pathname: c.path
3124
- }), tn()), o.value = d;
3111
+ }), rn()), o.value = d;
3125
3112
  });
3126
- return er(() => {
3127
- s.value = !0, h();
3128
- }), tr(async () => {
3129
- s.value = !0, i.value && (i.value = !1, await rr(), h());
3130
- }), or(() => {
3131
- s.value = !1, i.value = !0, m();
3113
+ return tr(() => {
3114
+ s.value = !0, f();
3115
+ }), rr(async () => {
3116
+ s.value = !0, i.value && (i.value = !1, await or(), f());
3132
3117
  }), nr(() => {
3133
- f(), m();
3134
- }), () => sr("div", ir(e.rootAttrs || {}, {
3118
+ s.value = !1, i.value = !0, m();
3119
+ }), sr(() => {
3120
+ h(), m();
3121
+ }), () => ir("div", ar(e.rootAttrs || {}, {
3135
3122
  ref: t
3136
3123
  }), null);
3137
3124
  }
3138
3125
  });
3139
- function on(e) {
3140
- return ar({
3126
+ function nn(e) {
3127
+ return cr({
3141
3128
  // @ts-ignore
3142
- __APP_VERSION__: "2.8.0",
3129
+ __APP_VERSION__: "2.8.1",
3143
3130
  ...e.asyncComponentOptions,
3144
3131
  //@ts-ignore
3145
3132
  loader: async () => {
@@ -3163,7 +3150,7 @@ function on(e) {
3163
3150
  ), n in s && typeof c == "function")
3164
3151
  return {
3165
3152
  render() {
3166
- return cr(rn, {
3153
+ return lr(on, {
3167
3154
  moduleName: i,
3168
3155
  providerInfo: c,
3169
3156
  basename: r,
@@ -3177,13 +3164,13 @@ function on(e) {
3177
3164
  }
3178
3165
  });
3179
3166
  }
3180
- function cn(e) {
3167
+ function ln(e) {
3181
3168
  return C.warn(
3182
3169
  "createRemoteComponent is deprecated, please use createRemoteAppComponent instead!"
3183
- ), on(e);
3170
+ ), nn(e);
3184
3171
  }
3185
3172
  export {
3186
- an as createBridgeComponent,
3187
- on as createRemoteAppComponent,
3188
- cn as createRemoteComponent
3173
+ cn as createBridgeComponent,
3174
+ nn as createRemoteAppComponent,
3175
+ ln as createRemoteComponent
3189
3176
  };