@module-federation/bridge-vue3 2.3.1 → 2.3.3

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,9 +1,9 @@
1
1
  import * as Ft from "vue";
2
- import { defineComponent as Ht, ref as ge, useAttrs as Gt, watch as xt, onMounted as Ut, onBeforeUnmount as Vt, createVNode as Bt, mergeProps as Wt, defineAsyncComponent as jt, h as qt } from "vue";
2
+ import { defineComponent as Ht, ref as Ee, useAttrs as Gt, watch as xt, onMounted as Ut, onBeforeUnmount as Bt, createVNode as Vt, mergeProps as Wt, defineAsyncComponent as jt, h as qt } from "vue";
3
3
  import * as ae from "vue-router";
4
4
  import { useRoute as Ke } from "vue-router";
5
5
  const Kt = ".json", zt = "FEDERATION_DEBUG", Jt = ":";
6
- let $e = /* @__PURE__ */ function(e) {
6
+ let we = /* @__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
  }({});
9
9
  const F = typeof ENV_TARGET < "u" ? ENV_TARGET === "web" : typeof window < "u" && typeof window.document < "u";
@@ -21,12 +21,12 @@ function Xt() {
21
21
  }
22
22
  return !1;
23
23
  }
24
- function we() {
24
+ function Ne() {
25
25
  return typeof process < "u" && process.env && process.env.FEDERATION_DEBUG ? !!process.env.FEDERATION_DEBUG : typeof FEDERATION_DEBUG < "u" && FEDERATION_DEBUG ? !0 : Xt();
26
26
  }
27
27
  const Yt = "[ Federation Runtime ]", Xe = function(...e) {
28
28
  return e.length ? e.reduce((t, r) => r ? t ? `${t}${Jt}${r}` : r : t, "") : "";
29
- }, Ne = (e, t) => {
29
+ }, Ie = (e, t) => {
30
30
  if ("getPublicPath" in e) {
31
31
  let r;
32
32
  return e.getPublicPath.startsWith("function") ? r = new Function("return " + e.getPublicPath)()() : r = new Function(e.getPublicPath)(), `${r}${t}`;
@@ -58,68 +58,68 @@ function Zt(e) {
58
58
  return e.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
59
59
  }
60
60
  function Qt(e, t = {}) {
61
- var E, b, N;
61
+ var _, b, R;
62
62
  const { remotes: r = {}, overrides: n = {}, version: o } = t;
63
63
  let s;
64
64
  const i = () => "publicPath" in e.metaData ? (e.metaData.publicPath === "auto" || e.metaData.publicPath === "") && o ? Zt(o) : e.metaData.publicPath : e.metaData.getPublicPath, a = Object.keys(n);
65
65
  let l = {};
66
- Object.keys(r).length || (l = ((E = e.remotes) == null ? void 0 : E.reduce((_, $) => {
67
- let R;
68
- const w = $.federationContainerName;
69
- return a.includes(w) ? R = n[w] : "version" in $ ? R = $.version : R = $.entry, _[w] = { matchedVersion: R }, _;
70
- }, {})) || {}), Object.keys(r).forEach((_) => l[_] = { matchedVersion: a.includes(_) ? n[_] : r[_] });
71
- const { remoteEntry: { path: c, name: f, type: h }, types: u = {
66
+ Object.keys(r).length || (l = ((_ = e.remotes) == null ? void 0 : _.reduce((E, w) => {
67
+ let S;
68
+ const N = w.federationContainerName;
69
+ return a.includes(N) ? S = n[N] : "version" in w ? S = w.version : S = w.entry, E[N] = { matchedVersion: S }, E;
70
+ }, {})) || {}), Object.keys(r).forEach((E) => l[E] = { matchedVersion: a.includes(E) ? n[E] : r[E] });
71
+ const { remoteEntry: { path: c, name: u, type: d }, types: h = {
72
72
  path: "",
73
73
  name: "",
74
74
  zip: "",
75
75
  api: ""
76
- }, buildInfo: { buildVersion: d }, globalName: m, ssrRemoteEntry: y } = e.metaData, { exposes: g } = e;
77
- let p = {
76
+ }, buildInfo: { buildVersion: f }, globalName: p, ssrRemoteEntry: m } = e.metaData, { exposes: g } = e;
77
+ let y = {
78
78
  version: o || "",
79
- buildVersion: d,
80
- globalName: m,
81
- remoteEntry: ne(c, f),
82
- remoteEntryType: h,
83
- remoteTypes: ne(u.path, u.name),
84
- remoteTypesZip: u.zip || "",
85
- remoteTypesAPI: u.api || "",
79
+ buildVersion: f,
80
+ globalName: p,
81
+ remoteEntry: ne(c, u),
82
+ remoteEntryType: d,
83
+ remoteTypes: ne(h.path, h.name),
84
+ remoteTypesZip: h.zip || "",
85
+ remoteTypesAPI: h.api || "",
86
86
  remotesInfo: l,
87
- shared: e == null ? void 0 : e.shared.map((_) => ({
88
- assets: _.assets,
89
- sharedName: _.name,
90
- version: _.version,
91
- usedExports: _.referenceExports || []
87
+ shared: e == null ? void 0 : e.shared.map((E) => ({
88
+ assets: E.assets,
89
+ sharedName: E.name,
90
+ version: E.version,
91
+ usedExports: E.referenceExports || []
92
92
  })),
93
- modules: g == null ? void 0 : g.map((_) => ({
94
- moduleName: _.name,
95
- modulePath: _.path,
96
- assets: _.assets
93
+ modules: g == null ? void 0 : g.map((E) => ({
94
+ moduleName: E.name,
95
+ modulePath: E.path,
96
+ assets: E.assets
97
97
  }))
98
98
  };
99
99
  if ((b = e.metaData) != null && b.prefetchInterface) {
100
- const _ = e.metaData.prefetchInterface;
101
- p = {
102
- ...p,
103
- prefetchInterface: _
100
+ const E = e.metaData.prefetchInterface;
101
+ y = {
102
+ ...y,
103
+ prefetchInterface: E
104
104
  };
105
105
  }
106
- if ((N = e.metaData) != null && N.prefetchEntry) {
107
- const { path: _, name: $, type: R } = e.metaData.prefetchEntry;
108
- p = {
109
- ...p,
110
- prefetchEntry: ne(_, $),
111
- prefetchEntryType: R
106
+ if ((R = e.metaData) != null && R.prefetchEntry) {
107
+ const { path: E, name: w, type: S } = e.metaData.prefetchEntry;
108
+ y = {
109
+ ...y,
110
+ prefetchEntry: ne(E, w),
111
+ prefetchEntryType: S
112
112
  };
113
113
  }
114
114
  if ("publicPath" in e.metaData ? (s = {
115
- ...p,
115
+ ...y,
116
116
  publicPath: i()
117
117
  }, typeof e.metaData.ssrPublicPath == "string" && (s.ssrPublicPath = e.metaData.ssrPublicPath)) : s = {
118
- ...p,
118
+ ...y,
119
119
  getPublicPath: i()
120
- }, y) {
121
- const _ = ne(y.path, y.name);
122
- s.ssrRemoteEntry = _, s.ssrRemoteEntryType = y.type || "commonjs-module";
120
+ }, m) {
121
+ const E = ne(m.path, m.name);
122
+ s.ssrRemoteEntry = E, s.ssrRemoteEntryType = m.type || "commonjs-module";
123
123
  }
124
124
  return s;
125
125
  }
@@ -161,7 +161,7 @@ var et = class {
161
161
  this.delegate = e ?? J;
162
162
  }
163
163
  emit(e, t) {
164
- const r = this.delegate, n = we() ? rr() : void 0, o = n ? [...t, n] : t, s = (() => {
164
+ const r = this.delegate, n = Ne() ? rr() : void 0, o = n ? [...t, n] : t, s = (() => {
165
165
  switch (e) {
166
166
  case "log":
167
167
  return ["log", "info"];
@@ -217,7 +217,7 @@ var et = class {
217
217
  this.emit("info", e);
218
218
  }
219
219
  debug(...e) {
220
- we() && this.emit("debug", e);
220
+ Ne() && this.emit("debug", e);
221
221
  }
222
222
  };
223
223
  function tt(e) {
@@ -240,7 +240,7 @@ async function rt(e, t) {
240
240
  return;
241
241
  }
242
242
  }
243
- function Ie(e, t) {
243
+ function Te(e, t) {
244
244
  const r = /^(https?:)?\/\//i;
245
245
  return e.replace(r, "").replace(/\/$/, "") === t.replace(r, "").replace(/\/$/, "");
246
246
  }
@@ -248,48 +248,48 @@ function nt(e) {
248
248
  let t = null, r = !0, n = 2e4, o;
249
249
  const s = document.getElementsByTagName("script");
250
250
  for (let c = 0; c < s.length; c++) {
251
- const f = s[c], h = f.getAttribute("src");
252
- if (h && Ie(h, e.url)) {
253
- t = f, r = !1;
251
+ const u = s[c], d = u.getAttribute("src");
252
+ if (d && Te(d, e.url)) {
253
+ t = u, r = !1;
254
254
  break;
255
255
  }
256
256
  }
257
257
  if (!t) {
258
258
  const c = e.attrs;
259
259
  t = document.createElement("script"), t.type = (c == null ? void 0 : c.type) === "module" ? "module" : "text/javascript";
260
- let f;
261
- e.createScriptHook && (f = e.createScriptHook(e.url, e.attrs), f instanceof HTMLScriptElement ? t = f : typeof f == "object" && ("script" in f && f.script && (t = f.script), "timeout" in f && f.timeout && (n = f.timeout))), t.src || (t.src = e.url), c && !f && Object.keys(c).forEach((h) => {
262
- t && (h === "async" || h === "defer" ? t[h] = c[h] : t.getAttribute(h) || t.setAttribute(h, c[h]));
260
+ let u;
261
+ 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 && (n = u.timeout))), t.src || (t.src = e.url), c && !u && Object.keys(c).forEach((d) => {
262
+ t && (d === "async" || d === "defer" ? t[d] = c[d] : t.getAttribute(d) || t.setAttribute(d, c[d]));
263
263
  });
264
264
  }
265
265
  let i = null;
266
266
  const a = typeof window < "u" ? (c) => {
267
- if (c.filename && Ie(c.filename, e.url)) {
268
- const f = /* @__PURE__ */ new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${c.message} (${c.filename}:${c.lineno}:${c.colno})`);
269
- f.name = "ScriptExecutionError", i = f;
267
+ if (c.filename && Te(c.filename, e.url)) {
268
+ const u = /* @__PURE__ */ new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${c.message} (${c.filename}:${c.lineno}:${c.colno})`);
269
+ u.name = "ScriptExecutionError", i = u;
270
270
  }
271
271
  } : null;
272
272
  a && window.addEventListener("error", a);
273
- const l = async (c, f) => {
273
+ const l = async (c, u) => {
274
274
  clearTimeout(o), a && window.removeEventListener("error", a);
275
- const h = () => {
276
- if ((f == null ? void 0 : f.type) === "error") {
277
- const u = /* @__PURE__ */ new Error(f != null && f.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.)`);
278
- u.name = "ScriptNetworkError", e != null && e.onErrorCallback && (e == null || e.onErrorCallback(u));
275
+ const d = () => {
276
+ if ((u == null ? void 0 : u.type) === "error") {
277
+ const h = /* @__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.)`);
278
+ h.name = "ScriptNetworkError", e != null && e.onErrorCallback && (e == null || e.onErrorCallback(h));
279
279
  } else i ? e != null && e.onErrorCallback && (e == null || e.onErrorCallback(i)) : e != null && e.cb && (e == null || e.cb());
280
280
  };
281
281
  if (t && (t.onerror = null, t.onload = null, rt(() => {
282
- const { needDeleteScript: u = !0 } = e;
283
- u && t != null && t.parentNode && t.parentNode.removeChild(t);
282
+ const { needDeleteScript: h = !0 } = e;
283
+ h && t != null && t.parentNode && t.parentNode.removeChild(t);
284
284
  }), c && typeof c == "function")) {
285
- const u = c(f);
286
- if (u instanceof Promise) {
287
- const d = await u;
288
- return h(), d;
285
+ const h = c(u);
286
+ if (h instanceof Promise) {
287
+ const f = await h;
288
+ return d(), f;
289
289
  }
290
- return h(), u;
290
+ return d(), h;
291
291
  }
292
- h();
292
+ d();
293
293
  };
294
294
  return t.onerror = l.bind(null, t.onerror), t.onload = l.bind(null, t.onload), o = setTimeout(() => {
295
295
  l(null, {
@@ -301,12 +301,12 @@ function nt(e) {
301
301
  needAttach: r
302
302
  };
303
303
  }
304
- function Ee(e) {
304
+ function _e(e) {
305
305
  let t = null, r = !0;
306
306
  const n = document.getElementsByTagName("link");
307
307
  for (let s = 0; s < n.length; s++) {
308
308
  const i = n[s], a = i.getAttribute("href"), l = i.getAttribute("rel");
309
- if (a && Ie(a, e.url) && l === e.attrs.rel) {
309
+ if (a && Te(a, e.url) && l === e.attrs.rel) {
310
310
  t = i, r = !1;
311
311
  break;
312
312
  }
@@ -355,7 +355,7 @@ function or(e, t) {
355
355
  });
356
356
  }
357
357
  const oe = /* @__PURE__ */ new Map();
358
- function V(e) {
358
+ function B(e) {
359
359
  if (!e) throw new Error("import specifier is required");
360
360
  if (oe.has(e)) return oe.get(e);
361
361
  const t = new Function("name", "return import(name)")(e).then((r) => r).catch((r) => {
@@ -364,7 +364,7 @@ function V(e) {
364
364
  return oe.set(e, t), t;
365
365
  }
366
366
  const ot = async () => {
367
- const e = await V("node-fetch");
367
+ const e = await B("node-fetch");
368
368
  return e.default || e;
369
369
  }, sr = async (e, t, r) => {
370
370
  const o = await ((s, i) => r.lifecycle.fetch.emit(s, i))(e, t || {});
@@ -384,30 +384,30 @@ const ot = async () => {
384
384
  const s = async () => n != null && n.fetch ? (a, l) => sr(a, l, n) : typeof fetch > "u" ? ot() : fetch, i = async (a, l) => {
385
385
  var c;
386
386
  try {
387
- const h = await (await a(l.href)).text(), [u, d] = await Promise.all([V("path"), V("vm")]), m = {
387
+ const d = await (await a(l.href)).text(), [h, f] = await Promise.all([B("path"), B("vm")]), p = {
388
388
  exports: {},
389
389
  module: { exports: {} }
390
- }, y = l.pathname.split("/").slice(0, -1).join("/"), g = u.basename(l.pathname), p = new d.Script(`(function(exports, module, require, __dirname, __filename) {${h}
390
+ }, m = l.pathname.split("/").slice(0, -1).join("/"), g = h.basename(l.pathname), y = new f.Script(`(function(exports, module, require, __dirname, __filename) {${d}
391
391
  })`, {
392
392
  filename: g,
393
- importModuleDynamically: ((c = d.constants) == null ? void 0 : c.USE_MAIN_CONTEXT_DEFAULT_LOADER) ?? V
393
+ importModuleDynamically: ((c = f.constants) == null ? void 0 : c.USE_MAIN_CONTEXT_DEFAULT_LOADER) ?? B
394
394
  });
395
- let E;
396
- E = (await V("node:module")).createRequire(l.protocol === "file:" || l.protocol === "node:" ? l.href : u.join(process.cwd(), "__mf_require_base__.js")), p.runInThisContext()(m.exports, m.module, E, y, g);
397
- const b = m.module.exports || m.exports;
395
+ let _;
396
+ _ = (await B("node:module")).createRequire(l.protocol === "file:" || l.protocol === "node:" ? l.href : h.join(process.cwd(), "__mf_require_base__.js")), y.runInThisContext()(p.exports, p.module, _, m, g);
397
+ const b = p.module.exports || p.exports;
398
398
  if (r && b && r.globalName) {
399
399
  t(void 0, b[r.globalName] || b);
400
400
  return;
401
401
  }
402
402
  t(void 0, b);
403
- } catch (f) {
404
- t(f instanceof Error ? f : /* @__PURE__ */ new Error(`Script execution error: ${f}`));
403
+ } catch (u) {
404
+ t(u instanceof Error ? u : /* @__PURE__ */ new Error(`Script execution error: ${u}`));
405
405
  }
406
406
  };
407
407
  s().then(async (a) => {
408
- if ((r == null ? void 0 : r.type) === "esm" || (r == null ? void 0 : r.type) === "module") return Te(o.href, {
408
+ if ((r == null ? void 0 : r.type) === "esm" || (r == null ? void 0 : r.type) === "module") return ve(o.href, {
409
409
  fetch: a,
410
- vm: await V("vm")
410
+ vm: await B("vm")
411
411
  }).then(async (l) => {
412
412
  await l.evaluate(), t(void 0, l.namespace);
413
413
  }).catch((l) => {
@@ -430,16 +430,16 @@ const ot = async () => {
430
430
  }, t.attrs, t.loaderHook);
431
431
  }) : (e, t) => {
432
432
  throw new Error("loadScriptNode is disabled in non-Node.js environment");
433
- }, _e = /* @__PURE__ */ new Map();
434
- async function Te(e, t) {
435
- if (_e.has(e)) return _e.get(e);
433
+ }, be = /* @__PURE__ */ new Map();
434
+ async function ve(e, t) {
435
+ if (be.has(e)) return be.get(e);
436
436
  const { fetch: r, vm: n } = t, o = await (await r(e)).text(), s = new n.SourceTextModule(o, { importModuleDynamically: async (i, a) => {
437
437
  const l = new URL(i, e).href;
438
- return Te(l, t);
438
+ return ve(l, t);
439
439
  } });
440
- return _e.set(e, s), await s.link(async (i) => {
440
+ return be.set(e, s), await s.link(async (i) => {
441
441
  const a = new URL(i, e).href;
442
- return await Te(a, t);
442
+ return await ve(a, t);
443
443
  }), s;
444
444
  }
445
445
  const C = tt("[ Module Federation Bridge Vue3 ]"), cr = (e) => `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`, st = (e, t, r, n) => {
@@ -451,11 +451,11 @@ const C = tt("[ Module Federation Bridge Vue3 ]"), cr = (e) => `View the docs to
451
451
  function lr(e, t, r, n, o, s) {
452
452
  return n(st(e, t, r, o));
453
453
  }
454
- const H = "[ Federation Runtime ]", ve = tt(H);
454
+ const H = "[ Federation Runtime ]", Ae = tt(H);
455
455
  function P(e, t, r, n, o) {
456
- e || S(t);
456
+ e || $(t);
457
457
  }
458
- function S(e, t, r, n, o) {
458
+ function $(e, t, r, n, o) {
459
459
  if (t !== void 0) return lr(e, t, r ?? {}, (i) => {
460
460
  throw new Error(`${H}: ${i}`);
461
461
  }, n);
@@ -463,7 +463,7 @@ function S(e, t, r, n, o) {
463
463
  throw s instanceof Error ? (s.message.startsWith(H) || (s.message = `${H}: ${s.message}`), s) : new Error(`${H}: ${s}`);
464
464
  }
465
465
  function Oe(e) {
466
- e instanceof Error && (e.message.startsWith(H) || (e.message = `${H}: ${e.message}`)), ve.warn(e);
466
+ e instanceof Error && (e.message.startsWith(H) || (e.message = `${H}: ${e.message}`)), Ae.warn(e);
467
467
  }
468
468
  function ur(e, t) {
469
469
  return e.findIndex((r) => r === t) === -1 && e.push(t), e;
@@ -524,7 +524,7 @@ function le(e, t) {
524
524
  return Object.hasOwnProperty.call(e, t);
525
525
  }
526
526
  le(I, "__GLOBAL_LOADING_REMOTE_ENTRY__") || ce(I, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
527
- const B = I.__GLOBAL_LOADING_REMOTE_ENTRY__;
527
+ const V = I.__GLOBAL_LOADING_REMOTE_ENTRY__;
528
528
  function lt(e) {
529
529
  var t, r, n, o, s, i;
530
530
  le(e, "__VMOK__") && !le(e, "__FEDERATION__") && ce(e, "__FEDERATION__", e.__VMOK__), le(e, "__FEDERATION__") || (ce(e, "__FEDERATION__", {
@@ -538,8 +538,8 @@ function lt(e) {
538
538
  }
539
539
  lt(I);
540
540
  lt(k);
541
- function mr(e, t = we()) {
542
- t && (I.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, I.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.3.1");
541
+ function pr(e, t = Ne()) {
542
+ t && (I.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, I.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.3.3");
543
543
  }
544
544
  function q(e, t) {
545
545
  if (typeof t == "string") {
@@ -561,16 +561,16 @@ function q(e, t) {
561
561
  key: t
562
562
  };
563
563
  }
564
- } else S(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`);
564
+ } else $(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`);
565
565
  }
566
- const Ge = () => k.__FEDERATION__.moduleInfo, pr = (e, t) => {
566
+ const Ge = () => k.__FEDERATION__.moduleInfo, mr = (e, t) => {
567
567
  const r = q(t, Z(e)).value;
568
568
  if (r && !r.version && "version" in e && e.version && (r.version = e.version), r) return r;
569
569
  if ("version" in e && e.version) {
570
570
  const { version: n, ...o } = e, s = Z(o), i = q(k.__FEDERATION__.moduleInfo, s).value;
571
571
  if ((i == null ? void 0 : i.version) === n) return i;
572
572
  }
573
- }, ue = (e) => pr(e, k.__FEDERATION__.moduleInfo), xe = (e, t) => {
573
+ }, ue = (e) => mr(e, k.__FEDERATION__.moduleInfo), xe = (e, t) => {
574
574
  const r = Z(e);
575
575
  return k.__FEDERATION__.moduleInfo[r] = t, k.__FEDERATION__.moduleInfo;
576
576
  }, yr = (e) => (k.__FEDERATION__.moduleInfo = {
@@ -585,14 +585,14 @@ const Ge = () => k.__FEDERATION__.moduleInfo, pr = (e, t) => {
585
585
  remoteEntryKey: r,
586
586
  entryExports: I[r]
587
587
  };
588
- }, gr = () => k.__FEDERATION__.__GLOBAL_PLUGIN__, Er = (e) => I.__FEDERATION__.__PRELOADED_MAP__.get(e), _r = (e) => I.__FEDERATION__.__PRELOADED_MAP__.set(e, !0), Ue = "[0-9A-Za-z-]+", De = `(?:\\+(${Ue}(?:\\.${Ue})*))`, Y = "0|[1-9]\\d*", fe = "[0-9]+", ut = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", Ve = `(?:${fe}|${ut})`, br = `(?:-?(${Ve}(?:\\.${Ve})*))`, Be = `(?:${Y}|${ut})`, ft = `(?:-(${Be}(?:\\.${Be})*))`, be = `${Y}|x|X|\\*`, K = `[v=\\s]*(${be})(?:\\.(${be})(?:\\.(${be})(?:${ft})?${De}?)?)?`, Rr = `^\\s*(${K})\\s+-\\s+(${K})\\s*$`, Sr = `[v=\\s]*${`(${fe})\\.(${fe})\\.(${fe})`}${br}?${De}?`, Fe = "((?:<|>)?=?)", $r = `(\\s*)${Fe}\\s*(${Sr}|${K})`, ht = "(?:~>?)", wr = `(\\s*)${ht}\\s+`, dt = "(?:\\^)", Nr = `(\\s*)${dt}\\s+`, Ir = "(<|>)?=?\\s*\\*", Tr = `^${dt}${K}$`, vr = `v?${`(${Y})\\.(${Y})\\.(${Y})`}${ft}?${De}?`, Ar = `^${ht}${K}$`, Pr = `^${Fe}\\s*${K}$`, kr = `^${Fe}\\s*(${vr})$|^$`, Or = "^\\s*>=\\s*0.0.0\\s*$";
588
+ }, gr = () => k.__FEDERATION__.__GLOBAL_PLUGIN__, Er = (e) => I.__FEDERATION__.__PRELOADED_MAP__.get(e), _r = (e) => I.__FEDERATION__.__PRELOADED_MAP__.set(e, !0), Ue = "[0-9A-Za-z-]+", De = `(?:\\+(${Ue}(?:\\.${Ue})*))`, Y = "0|[1-9]\\d*", fe = "[0-9]+", ut = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", Be = `(?:${fe}|${ut})`, br = `(?:-?(${Be}(?:\\.${Be})*))`, Ve = `(?:${Y}|${ut})`, ft = `(?:-(${Ve}(?:\\.${Ve})*))`, Re = `${Y}|x|X|\\*`, K = `[v=\\s]*(${Re})(?:\\.(${Re})(?:\\.(${Re})(?:${ft})?${De}?)?)?`, Rr = `^\\s*(${K})\\s+-\\s+(${K})\\s*$`, Sr = `[v=\\s]*${`(${fe})\\.(${fe})\\.(${fe})`}${br}?${De}?`, Fe = "((?:<|>)?=?)", $r = `(\\s*)${Fe}\\s*(${Sr}|${K})`, ht = "(?:~>?)", wr = `(\\s*)${ht}\\s+`, dt = "(?:\\^)", Nr = `(\\s*)${dt}\\s+`, Ir = "(<|>)?=?\\s*\\*", Tr = `^${dt}${K}$`, vr = `v?${`(${Y})\\.(${Y})\\.(${Y})`}${ft}?${De}?`, Ar = `^${ht}${K}$`, Pr = `^${Fe}\\s*${K}$`, kr = `^${Fe}\\s*(${vr})$|^$`, Or = "^\\s*>=\\s*0.0.0\\s*$";
589
589
  function M(e) {
590
590
  return new RegExp(e);
591
591
  }
592
592
  function T(e) {
593
593
  return !e || e.toLowerCase() === "x" || e === "*";
594
594
  }
595
- function mt(...e) {
595
+ function pt(...e) {
596
596
  return (t) => e.reduce((r, n) => n(r), t);
597
597
  }
598
598
  function We(e) {
@@ -603,7 +603,7 @@ function je(e, t, r, n) {
603
603
  return n ? `${o}-${n}` : o;
604
604
  }
605
605
  function Lr(e) {
606
- return e.replace(M(Rr), (t, r, n, o, s, i, a, l, c, f, h, u) => (T(n) ? r = "" : T(o) ? r = `>=${n}.0.0` : T(s) ? r = `>=${n}.${o}.0` : r = `>=${r}`, T(c) ? l = "" : T(f) ? l = `<${Number(c) + 1}.0.0-0` : T(h) ? l = `<${c}.${Number(f) + 1}.0-0` : u ? l = `<=${c}.${f}.${h}-${u}` : l = `<=${l}`, `${r} ${l}`.trim()));
606
+ return e.replace(M(Rr), (t, r, n, o, s, i, a, l, c, u, d, h) => (T(n) ? r = "" : T(o) ? r = `>=${n}.0.0` : T(s) ? r = `>=${n}.${o}.0` : r = `>=${r}`, T(c) ? l = "" : T(u) ? l = `<${Number(c) + 1}.0.0-0` : T(d) ? l = `<${c}.${Number(u) + 1}.0-0` : h ? l = `<=${c}.${u}.${d}-${h}` : l = `<=${l}`, `${r} ${l}`.trim()));
607
607
  }
608
608
  function Mr(e) {
609
609
  return e.replace(M($r), "$1$2$3");
@@ -622,8 +622,8 @@ function Hr(e) {
622
622
  }
623
623
  function Gr(e) {
624
624
  return e.split(/\s+/).map((t) => t.trim().replace(M(Pr), (r, n, o, s, i, a) => {
625
- const l = T(o), c = l || T(s), f = c || T(i);
626
- return n === "=" && f && (n = ""), a = "", l ? n === ">" || n === "<" ? "<0.0.0-0" : "*" : n && f ? (c && (s = 0), i = 0, n === ">" ? (n = ">=", c ? (o = Number(o) + 1, s = 0, i = 0) : (s = Number(s) + 1, i = 0)) : n === "<=" && (n = "<", c ? o = Number(o) + 1 : s = Number(s) + 1), n === "<" && (a = "-0"), `${n + o}.${s}.${i}${a}`) : c ? `>=${o}.0.0${a} <${Number(o) + 1}.0.0-0` : f ? `>=${o}.${s}.0${a} <${o}.${Number(s) + 1}.0-0` : r;
625
+ const l = T(o), c = l || T(s), u = c || T(i);
626
+ return n === "=" && u && (n = ""), a = "", l ? n === ">" || n === "<" ? "<0.0.0-0" : "*" : n && u ? (c && (s = 0), i = 0, n === ">" ? (n = ">=", c ? (o = Number(o) + 1, s = 0, i = 0) : (s = Number(s) + 1, i = 0)) : n === "<=" && (n = "<", c ? o = Number(o) + 1 : s = Number(s) + 1), n === "<" && (a = "-0"), `${n + o}.${s}.${i}${a}`) : c ? `>=${o}.0.0${a} <${Number(o) + 1}.0.0-0` : u ? `>=${o}.${s}.0${a} <${o}.${Number(s) + 1}.0-0` : r;
627
627
  })).join(" ");
628
628
  }
629
629
  function xr(e) {
@@ -635,7 +635,7 @@ function Ur(e) {
635
635
  function he(e, t) {
636
636
  return e = Number(e) || e, t = Number(t) || t, e > t ? 1 : e === t ? 0 : -1;
637
637
  }
638
- function Vr(e, t) {
638
+ function Br(e, t) {
639
639
  const { preRelease: r } = e, { preRelease: n } = t;
640
640
  if (r === void 0 && n) return 1;
641
641
  if (r && n === void 0) return -1;
@@ -648,24 +648,24 @@ function Vr(e, t) {
648
648
  return 0;
649
649
  }
650
650
  function se(e, t) {
651
- return he(e.major, t.major) || he(e.minor, t.minor) || he(e.patch, t.patch) || Vr(e, t);
651
+ return he(e.major, t.major) || he(e.minor, t.minor) || he(e.patch, t.patch) || Br(e, t);
652
652
  }
653
- function Re(e, t) {
653
+ function Se(e, t) {
654
654
  return e.version === t.version;
655
655
  }
656
- function Br(e, t) {
656
+ function Vr(e, t) {
657
657
  switch (e.operator) {
658
658
  case "":
659
659
  case "=":
660
- return Re(e, t);
660
+ return Se(e, t);
661
661
  case ">":
662
662
  return se(e, t) < 0;
663
663
  case ">=":
664
- return Re(e, t) || se(e, t) < 0;
664
+ return Se(e, t) || se(e, t) < 0;
665
665
  case "<":
666
666
  return se(e, t) > 0;
667
667
  case "<=":
668
- return Re(e, t) || se(e, t) > 0;
668
+ return Se(e, t) || se(e, t) > 0;
669
669
  case void 0:
670
670
  return !0;
671
671
  default:
@@ -673,10 +673,10 @@ function Br(e, t) {
673
673
  }
674
674
  }
675
675
  function Wr(e) {
676
- return mt(Fr, Hr, Gr, xr)(e);
676
+ return pt(Fr, Hr, Gr, xr)(e);
677
677
  }
678
678
  function jr(e) {
679
- return mt(Lr, Mr, Cr, Dr)(e.trim()).split(/\s+/).join(" ");
679
+ return pt(Lr, Mr, Cr, Dr)(e.trim()).split(/\s+/).join(" ");
680
680
  }
681
681
  function X(e, t) {
682
682
  if (!e) return !1;
@@ -690,51 +690,51 @@ function X(e, t) {
690
690
  patch: i,
691
691
  preRelease: a == null ? void 0 : a.split(".")
692
692
  }, c = t.split("||");
693
- for (const f of c) {
694
- const h = f.trim();
695
- if (!h || h === "*" || h === "x") return !0;
693
+ for (const u of c) {
694
+ const d = u.trim();
695
+ if (!d || d === "*" || d === "x") return !0;
696
696
  try {
697
- const u = jr(h);
698
- if (!u.trim()) return !0;
699
- const d = u.split(" ").map((g) => Wr(g)).join(" ");
700
- if (!d.trim()) return !0;
701
- const m = d.split(/\s+/).map((g) => Ur(g)).filter(Boolean);
702
- if (m.length === 0) continue;
703
- let y = !0;
704
- for (const g of m) {
705
- const p = We(g);
706
- if (!p) {
707
- y = !1;
697
+ const h = jr(d);
698
+ if (!h.trim()) return !0;
699
+ const f = h.split(" ").map((g) => Wr(g)).join(" ");
700
+ if (!f.trim()) return !0;
701
+ const p = f.split(/\s+/).map((g) => Ur(g)).filter(Boolean);
702
+ if (p.length === 0) continue;
703
+ let m = !0;
704
+ for (const g of p) {
705
+ const y = We(g);
706
+ if (!y) {
707
+ m = !1;
708
708
  break;
709
709
  }
710
- const [, E, , b, N, _, $] = p;
711
- if (!Br({
712
- operator: E,
713
- version: je(b, N, _, $),
710
+ const [, _, , b, R, E, w] = y;
711
+ if (!Vr({
712
+ operator: _,
713
+ version: je(b, R, E, w),
714
714
  major: b,
715
- minor: N,
716
- patch: _,
717
- preRelease: $ == null ? void 0 : $.split(".")
715
+ minor: R,
716
+ patch: E,
717
+ preRelease: w == null ? void 0 : w.split(".")
718
718
  }, l)) {
719
- y = !1;
719
+ m = !1;
720
720
  break;
721
721
  }
722
722
  }
723
- if (y) return !0;
724
- } catch (u) {
725
- console.error(`[semver] Error processing range part "${h}":`, u);
723
+ if (m) return !0;
724
+ } catch (h) {
725
+ console.error(`[semver] Error processing range part "${d}":`, h);
726
726
  continue;
727
727
  }
728
728
  }
729
729
  return !1;
730
730
  }
731
- const re = "default", pt = "global";
731
+ const re = "default", mt = "global";
732
732
  function qr(e, t, r, n) {
733
733
  var s, i;
734
734
  let o;
735
735
  return "get" in e ? o = e.get : "lib" in e ? o = () => Promise.resolve(e.lib) : o = () => Promise.resolve(() => {
736
- S(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`);
737
- }), (s = e.shareConfig) != null && s.eager && ((i = e.treeShaking) != null && i.mode) && S(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`), {
736
+ $(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`);
737
+ }), (s = e.shareConfig) != null && s.eager && ((i = e.treeShaking) != null && i.mode) && $(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`), {
738
738
  deps: [],
739
739
  useIn: [],
740
740
  from: t,
@@ -755,7 +755,7 @@ function qr(e, t, r, n) {
755
755
  treeShaking: e.treeShaking ? {
756
756
  ...e.treeShaking,
757
757
  mode: e.treeShaking.mode ?? "server-calc",
758
- status: e.treeShaking.status ?? $e.UNKNOWN,
758
+ status: e.treeShaking.status ?? we.UNKNOWN,
759
759
  useIn: []
760
760
  } : void 0
761
761
  };
@@ -779,7 +779,7 @@ function yt(e, t) {
779
779
  function ee(e, t) {
780
780
  if (!e) return !1;
781
781
  const { status: r, mode: n } = e;
782
- return r === $e.NO_USE ? !1 : r === $e.CALCULATED ? !0 : n === "runtime-infer" ? t ? zr(e, t) : !0 : !1;
782
+ return r === we.NO_USE ? !1 : r === we.CALCULATED ? !0 : n === "runtime-infer" ? t ? zr(e, t) : !0 : !1;
783
783
  }
784
784
  function G(e, t) {
785
785
  const r = (n) => {
@@ -798,7 +798,7 @@ const te = (e, t) => {
798
798
  return G(n, o);
799
799
  };
800
800
  return Object.keys(e).reduce((n, o) => !n || r(n, o) || n === "0" ? o : n, 0);
801
- }, me = (e) => !!e.loaded || typeof e.lib == "function", Kr = (e) => !!e.loading, zr = (e, t) => {
801
+ }, pe = (e) => !!e.loaded || typeof e.lib == "function", Kr = (e) => !!e.loading, zr = (e, t) => {
802
802
  if (!e || !t) return !1;
803
803
  const { usedExports: r } = e;
804
804
  return r ? !!t.every((n) => r.includes(n)) : !1;
@@ -807,7 +807,7 @@ function Jr(e, t, r, n) {
807
807
  const o = e[t][r];
808
808
  let s = "", i = ee(n);
809
809
  const a = function(l, c) {
810
- return i ? o[l].treeShaking ? o[c].treeShaking ? !me(o[l].treeShaking) && G(l, c) : !1 : !0 : !me(o[l]) && G(l, c);
810
+ return i ? o[l].treeShaking ? o[c].treeShaking ? !pe(o[l].treeShaking) && G(l, c) : !1 : !0 : !pe(o[l]) && G(l, c);
811
811
  };
812
812
  if (i) {
813
813
  if (s = te(e[t][r], a), s) return {
@@ -821,7 +821,7 @@ function Jr(e, t, r, n) {
821
821
  useTreesShaking: i
822
822
  };
823
823
  }
824
- const x = (e) => me(e) || Kr(e);
824
+ const x = (e) => pe(e) || Kr(e);
825
825
  function Xr(e, t, r, n) {
826
826
  const o = e[t][r];
827
827
  let s = "", i = ee(n);
@@ -853,50 +853,50 @@ function de(e, t, r, n) {
853
853
  if (!e) return;
854
854
  const { shareConfig: o, scope: s = re, strategy: i, treeShaking: a } = r, l = Array.isArray(s) ? s : [s];
855
855
  for (const c of l) if (o && e[c] && e[c][t]) {
856
- const { requiredVersion: f } = o, { version: h, useTreesShaking: u } = Yr(i)(e, c, t, a), d = () => {
857
- const y = e[c][t][h];
856
+ const { requiredVersion: u } = o, { version: d, useTreesShaking: h } = Yr(i)(e, c, t, a), f = () => {
857
+ const m = e[c][t][d];
858
858
  if (o.singleton) {
859
- if (typeof f == "string" && !X(h, f)) {
860
- const g = `Version ${h} from ${h && y.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${f})`;
861
- o.strictVersion ? S(g) : Oe(g);
859
+ if (typeof u == "string" && !X(d, u)) {
860
+ const g = `Version ${d} from ${d && m.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;
861
+ o.strictVersion ? $(g) : Oe(g);
862
862
  }
863
863
  return {
864
- shared: y,
865
- useTreesShaking: u
864
+ shared: m,
865
+ useTreesShaking: h
866
866
  };
867
867
  } else {
868
- if (f === !1 || f === "*") return {
869
- shared: y,
870
- useTreesShaking: u
868
+ if (u === !1 || u === "*") return {
869
+ shared: m,
870
+ useTreesShaking: h
871
871
  };
872
- if (X(h, f)) return {
873
- shared: y,
874
- useTreesShaking: u
872
+ if (X(d, u)) return {
873
+ shared: m,
874
+ useTreesShaking: h
875
875
  };
876
876
  const g = ee(a);
877
877
  if (g) {
878
- for (const [p, E] of Object.entries(e[c][t]))
879
- if (ee(E.treeShaking, a == null ? void 0 : a.usedExports) && X(p, f))
878
+ for (const [y, _] of Object.entries(e[c][t]))
879
+ if (ee(_.treeShaking, a == null ? void 0 : a.usedExports) && X(y, u))
880
880
  return {
881
- shared: E,
881
+ shared: _,
882
882
  useTreesShaking: g
883
883
  };
884
884
  }
885
- for (const [p, E] of Object.entries(e[c][t])) if (X(p, f)) return {
886
- shared: E,
885
+ for (const [y, _] of Object.entries(e[c][t])) if (X(y, u)) return {
886
+ shared: _,
887
887
  useTreesShaking: !1
888
888
  };
889
889
  }
890
- }, m = {
890
+ }, p = {
891
891
  shareScopeMap: e,
892
892
  scope: c,
893
893
  pkgName: t,
894
- version: h,
894
+ version: d,
895
895
  GlobalFederation: Q.__FEDERATION__,
896
896
  shareInfo: r,
897
- resolver: d
897
+ resolver: f
898
898
  };
899
- return (n.emit(m) || m).resolver();
899
+ return (n.emit(p) || p).resolver();
900
900
  }
901
901
  }
902
902
  function gt() {
@@ -906,18 +906,18 @@ function qe(e) {
906
906
  const { pkgName: t, extraOptions: r, shareInfos: n } = e, o = (l) => {
907
907
  if (!l) return;
908
908
  const c = {};
909
- return l.forEach((h) => {
910
- c[h.version] = h;
911
- }), c[te(c, function(h, u) {
912
- return !me(c[h]) && G(h, u);
909
+ return l.forEach((d) => {
910
+ c[d.version] = d;
911
+ }), c[te(c, function(d, h) {
912
+ return !pe(c[d]) && G(d, h);
913
913
  })];
914
914
  }, s = (r == null ? void 0 : r.resolver) ?? o, i = (l) => l !== null && typeof l == "object" && !Array.isArray(l), a = (...l) => {
915
915
  const c = {};
916
- for (const f of l)
917
- if (f)
918
- for (const [h, u] of Object.entries(f)) {
919
- const d = c[h];
920
- i(d) && i(u) ? c[h] = a(d, u) : u !== void 0 && (c[h] = u);
916
+ for (const u of l)
917
+ if (u)
918
+ for (const [d, h] of Object.entries(u)) {
919
+ const f = c[d];
920
+ i(f) && i(h) ? c[d] = a(f, h) : h !== void 0 && (c[d] = h);
921
921
  }
922
922
  return c;
923
923
  };
@@ -969,13 +969,13 @@ function Qr(e, t) {
969
969
  for (const r of e)
970
970
  if (t === r.name || r.alias && t === r.alias) return r;
971
971
  }
972
- const Et = "RUNTIME-001", _t = "RUNTIME-002", bt = "RUNTIME-003", Rt = "RUNTIME-004", St = "RUNTIME-005", Ae = "RUNTIME-006", $t = "RUNTIME-007", He = "RUNTIME-008", en = "RUNTIME-009", wt = "RUNTIME-010", Nt = "RUNTIME-011", tn = "RUNTIME-012", O = {
972
+ const Et = "RUNTIME-001", _t = "RUNTIME-002", bt = "RUNTIME-003", Rt = "RUNTIME-004", St = "RUNTIME-005", Pe = "RUNTIME-006", $t = "RUNTIME-007", He = "RUNTIME-008", en = "RUNTIME-009", wt = "RUNTIME-010", Nt = "RUNTIME-011", tn = "RUNTIME-012", O = {
973
973
  [Et]: "Failed to get remoteEntry exports.",
974
974
  [_t]: 'The remote entry interface does not contain "init"',
975
975
  [bt]: "Failed to get manifest.",
976
976
  [Rt]: "Failed to locate remote.",
977
977
  [St]: "Invalid loadShareSync function call from bundler runtime",
978
- [Ae]: "Invalid loadShareSync function call from runtime",
978
+ [Pe]: "Invalid loadShareSync function call from runtime",
979
979
  [$t]: "Failed to get remote snapshot.",
980
980
  [He]: "Failed to load script resources.",
981
981
  [en]: "Please call createInstance first.",
@@ -996,7 +996,7 @@ async function rn({ entry: e, remoteEntryExports: t }) {
996
996
  e
997
997
  ).then(r).catch(n);
998
998
  } catch (o) {
999
- S(`Failed to load ESM entry from "${e}". ${o instanceof Error ? o.message : String(o)}`);
999
+ $(`Failed to load ESM entry from "${e}". ${o instanceof Error ? o.message : String(o)}`);
1000
1000
  }
1001
1001
  });
1002
1002
  }
@@ -1005,38 +1005,39 @@ async function nn({ entry: e, remoteEntryExports: t }) {
1005
1005
  try {
1006
1006
  t ? r(t) : typeof __system_context__ > "u" ? System.import(e).then(r).catch(n) : new Function("callbacks", `System.import("${e}")${It}`)([r, n]);
1007
1007
  } catch (o) {
1008
- S(`Failed to load SystemJS entry from "${e}". ${o instanceof Error ? o.message : String(o)}`);
1008
+ $(`Failed to load SystemJS entry from "${e}". ${o instanceof Error ? o.message : String(o)}`);
1009
1009
  }
1010
1010
  });
1011
1011
  }
1012
1012
  function Tt(e, t, r) {
1013
1013
  const { remoteEntryKey: n, entryExports: o } = Ce(e, t);
1014
- return o || S(Et, O, {
1014
+ return o || $(Et, O, {
1015
1015
  remoteName: e,
1016
1016
  remoteEntryUrl: r,
1017
1017
  remoteEntryKey: n
1018
1018
  }), o;
1019
1019
  }
1020
- async function on({ name: e, globalName: t, entry: r, loaderHook: n, getEntryUrl: o }) {
1021
- const { entryExports: s } = Ce(e, t);
1022
- if (s) return s;
1023
- const i = o ? o(r) : r;
1024
- return or(i, {
1020
+ async function on({ name: e, globalName: t, entry: r, remoteInfo: n, loaderHook: o, getEntryUrl: s }) {
1021
+ const { entryExports: i } = Ce(e, t);
1022
+ if (i) return i;
1023
+ const a = s ? s(r) : r;
1024
+ return or(a, {
1025
1025
  attrs: {},
1026
- createScriptHook: (a, l) => {
1027
- const c = n.lifecycle.createScript.emit({
1028
- url: a,
1029
- attrs: l
1026
+ createScriptHook: (l, c) => {
1027
+ const u = o.lifecycle.createScript.emit({
1028
+ url: l,
1029
+ attrs: c,
1030
+ remoteInfo: n
1030
1031
  });
1031
- if (c && (c instanceof HTMLScriptElement || "script" in c || "timeout" in c))
1032
- return c;
1032
+ if (u && (u instanceof HTMLScriptElement || "script" in u || "timeout" in u))
1033
+ return u;
1033
1034
  }
1034
- }).then(() => Tt(e, t, r), (a) => {
1035
- const l = a instanceof Error ? a.message : String(a);
1036
- S(He, O, {
1035
+ }).then(() => Tt(e, t, r), (l) => {
1036
+ const c = l instanceof Error ? l.message : String(l);
1037
+ $(He, O, {
1037
1038
  remoteName: e,
1038
- resourceUrl: i
1039
- }, l);
1039
+ resourceUrl: a
1040
+ }, c);
1040
1041
  });
1041
1042
  }
1042
1043
  async function sn({ remoteInfo: e, remoteEntryExports: t, loaderHook: r, getEntryUrl: n }) {
@@ -1058,6 +1059,7 @@ async function sn({ remoteInfo: e, remoteEntryExports: t, loaderHook: r, getEntr
1058
1059
  entry: o,
1059
1060
  globalName: s,
1060
1061
  name: i,
1062
+ remoteInfo: e,
1061
1063
  loaderHook: r,
1062
1064
  getEntryUrl: n
1063
1065
  });
@@ -1074,25 +1076,26 @@ async function an({ remoteInfo: e, loaderHook: t }) {
1074
1076
  loaderHook: { createScriptHook: (a, l = {}) => {
1075
1077
  const c = t.lifecycle.createScript.emit({
1076
1078
  url: a,
1077
- attrs: l
1079
+ attrs: l,
1080
+ remoteInfo: e
1078
1081
  });
1079
1082
  if (c && "url" in c)
1080
1083
  return c;
1081
1084
  } }
1082
1085
  }).then(() => Tt(o, n, r)).catch((a) => {
1083
- S(`Failed to load Node.js entry for remote "${o}" from "${r}". ${a instanceof Error ? a.message : String(a)}`);
1086
+ $(`Failed to load Node.js entry for remote "${o}" from "${r}". ${a instanceof Error ? a.message : String(a)}`);
1084
1087
  });
1085
1088
  }
1086
- function Pe(e) {
1089
+ function ke(e) {
1087
1090
  const { entry: t, name: r } = e;
1088
1091
  return Xe(r, t);
1089
1092
  }
1090
- async function pe(e) {
1091
- const { origin: t, remoteEntryExports: r, remoteInfo: n, getEntryUrl: o, _inErrorHandling: s = !1 } = e, i = Pe(n);
1093
+ async function me(e) {
1094
+ const { origin: t, remoteEntryExports: r, remoteInfo: n, getEntryUrl: o, _inErrorHandling: s = !1 } = e, i = ke(n);
1092
1095
  if (r) return r;
1093
- if (!B[i]) {
1096
+ if (!V[i]) {
1094
1097
  const a = t.remoteHandler.hooks.lifecycle.loadEntry, l = t.loaderHook;
1095
- B[i] = a.emit({
1098
+ V[i] = a.emit({
1096
1099
  loaderHook: l,
1097
1100
  remoteInfo: n,
1098
1101
  remoteEntryExports: r
@@ -1105,31 +1108,31 @@ async function pe(e) {
1105
1108
  remoteInfo: n,
1106
1109
  loaderHook: l
1107
1110
  }))).catch(async (c) => {
1108
- const f = Pe(n), h = c instanceof Error && c.message.includes("ScriptExecutionError");
1109
- if (c instanceof Error && c.message.includes(He) && !h && !s) {
1110
- const u = (m) => pe({
1111
- ...m,
1111
+ const u = ke(n), d = c instanceof Error && c.message.includes("ScriptExecutionError");
1112
+ if (c instanceof Error && c.message.includes(He) && !d && !s) {
1113
+ const h = (p) => me({
1114
+ ...p,
1112
1115
  _inErrorHandling: !0
1113
- }), d = await t.loaderHook.lifecycle.loadEntryError.emit({
1114
- getRemoteEntry: u,
1116
+ }), f = await t.loaderHook.lifecycle.loadEntryError.emit({
1117
+ getRemoteEntry: h,
1115
1118
  origin: t,
1116
1119
  remoteInfo: n,
1117
1120
  remoteEntryExports: r,
1118
- globalLoading: B,
1119
- uniqueKey: f
1121
+ globalLoading: V,
1122
+ uniqueKey: u
1120
1123
  });
1121
- if (d) return d;
1124
+ if (f) return f;
1122
1125
  }
1123
1126
  throw c;
1124
1127
  });
1125
1128
  }
1126
- return B[i];
1129
+ return V[i];
1127
1130
  }
1128
- function ke(e) {
1131
+ function ye(e) {
1129
1132
  return {
1130
1133
  ...e,
1131
1134
  entry: "entry" in e ? e.entry : "",
1132
- type: e.type || pt,
1135
+ type: e.type || mt,
1133
1136
  entryGlobalName: e.entryGlobalName || e.name,
1134
1137
  shareScope: e.shareScope || re
1135
1138
  };
@@ -1169,13 +1172,13 @@ function z(e) {
1169
1172
  var r, n, o, s, i, a;
1170
1173
  const t = {};
1171
1174
  for (const [l, c] of Object.entries(e.shared)) {
1172
- const f = c[0];
1173
- f && (t[l] = {
1174
- version: f.version,
1175
- singleton: (r = f.shareConfig) == null ? void 0 : r.singleton,
1176
- requiredVersion: ((n = f.shareConfig) == null ? void 0 : n.requiredVersion) === !1 ? !1 : (o = f.shareConfig) == null ? void 0 : o.requiredVersion,
1177
- eager: f.eager,
1178
- strictVersion: (s = f.shareConfig) == null ? void 0 : s.strictVersion
1175
+ const u = c[0];
1176
+ u && (t[l] = {
1177
+ version: u.version,
1178
+ singleton: (r = u.shareConfig) == null ? void 0 : r.singleton,
1179
+ requiredVersion: ((n = u.shareConfig) == null ? void 0 : n.requiredVersion) === !1 ? !1 : (o = u.shareConfig) == null ? void 0 : o.requiredVersion,
1180
+ eager: u.eager,
1181
+ strictVersion: (s = u.shareConfig) == null ? void 0 : s.strictVersion
1179
1182
  });
1180
1183
  }
1181
1184
  return {
@@ -1219,7 +1222,7 @@ function At(e, t, r, n = !0) {
1219
1222
  if (t.options.inBrowser) {
1220
1223
  if (i.forEach((a) => {
1221
1224
  const { moduleInfo: l } = a, c = t.moduleCache.get(e.name);
1222
- pe(c ? {
1225
+ me(c ? {
1223
1226
  origin: t,
1224
1227
  remoteInfo: l,
1225
1228
  remoteEntryExports: c.remoteEntryExports
@@ -1234,20 +1237,21 @@ function At(e, t, r, n = !0) {
1234
1237
  as: "style"
1235
1238
  };
1236
1239
  o.forEach((l) => {
1237
- const { link: c, needAttach: f } = Ee({
1240
+ const { link: c, needAttach: u } = _e({
1238
1241
  url: l,
1239
1242
  cb: () => {
1240
1243
  },
1241
1244
  attrs: a,
1242
- createLinkHook: (h, u) => {
1243
- const d = t.loaderHook.lifecycle.createLink.emit({
1244
- url: h,
1245
- attrs: u
1245
+ createLinkHook: (d, h) => {
1246
+ const f = t.loaderHook.lifecycle.createLink.emit({
1247
+ url: d,
1248
+ attrs: h,
1249
+ remoteInfo: e
1246
1250
  });
1247
- if (d instanceof HTMLLinkElement) return d;
1251
+ if (f instanceof HTMLLinkElement) return f;
1248
1252
  }
1249
1253
  });
1250
- f && document.head.appendChild(c);
1254
+ u && document.head.appendChild(c);
1251
1255
  });
1252
1256
  } else {
1253
1257
  const a = {
@@ -1255,21 +1259,22 @@ function At(e, t, r, n = !0) {
1255
1259
  type: "text/css"
1256
1260
  };
1257
1261
  o.forEach((l) => {
1258
- const { link: c, needAttach: f } = Ee({
1262
+ const { link: c, needAttach: u } = _e({
1259
1263
  url: l,
1260
1264
  cb: () => {
1261
1265
  },
1262
1266
  attrs: a,
1263
- createLinkHook: (h, u) => {
1264
- const d = t.loaderHook.lifecycle.createLink.emit({
1265
- url: h,
1266
- attrs: u
1267
+ createLinkHook: (d, h) => {
1268
+ const f = t.loaderHook.lifecycle.createLink.emit({
1269
+ url: d,
1270
+ attrs: h,
1271
+ remoteInfo: e
1267
1272
  });
1268
- if (d instanceof HTMLLinkElement) return d;
1273
+ if (f instanceof HTMLLinkElement) return f;
1269
1274
  },
1270
1275
  needDeleteLink: !1
1271
1276
  });
1272
- f && document.head.appendChild(c);
1277
+ u && document.head.appendChild(c);
1273
1278
  });
1274
1279
  }
1275
1280
  if (n) {
@@ -1278,20 +1283,21 @@ function At(e, t, r, n = !0) {
1278
1283
  as: "script"
1279
1284
  };
1280
1285
  s.forEach((l) => {
1281
- const { link: c, needAttach: f } = Ee({
1286
+ const { link: c, needAttach: u } = _e({
1282
1287
  url: l,
1283
1288
  cb: () => {
1284
1289
  },
1285
1290
  attrs: a,
1286
- createLinkHook: (h, u) => {
1287
- const d = t.loaderHook.lifecycle.createLink.emit({
1288
- url: h,
1289
- attrs: u
1291
+ createLinkHook: (d, h) => {
1292
+ const f = t.loaderHook.lifecycle.createLink.emit({
1293
+ url: d,
1294
+ attrs: h,
1295
+ remoteInfo: e
1290
1296
  });
1291
- if (d instanceof HTMLLinkElement) return d;
1297
+ if (f instanceof HTMLLinkElement) return f;
1292
1298
  }
1293
1299
  });
1294
- f && document.head.appendChild(c);
1300
+ u && document.head.appendChild(c);
1295
1301
  });
1296
1302
  } else {
1297
1303
  const a = {
@@ -1299,21 +1305,22 @@ function At(e, t, r, n = !0) {
1299
1305
  type: (e == null ? void 0 : e.type) === "module" ? "module" : "text/javascript"
1300
1306
  };
1301
1307
  s.forEach((l) => {
1302
- const { script: c, needAttach: f } = nt({
1308
+ const { script: c, needAttach: u } = nt({
1303
1309
  url: l,
1304
1310
  cb: () => {
1305
1311
  },
1306
1312
  attrs: a,
1307
- createScriptHook: (h, u) => {
1308
- const d = t.loaderHook.lifecycle.createScript.emit({
1309
- url: h,
1310
- attrs: u
1313
+ createScriptHook: (d, h) => {
1314
+ const f = t.loaderHook.lifecycle.createScript.emit({
1315
+ url: d,
1316
+ attrs: h,
1317
+ remoteInfo: e
1311
1318
  });
1312
- if (d instanceof HTMLScriptElement) return d;
1319
+ if (f instanceof HTMLScriptElement) return f;
1313
1320
  },
1314
1321
  needDeleteScript: !0
1315
1322
  });
1316
- f && document.head.appendChild(c);
1323
+ u && document.head.appendChild(c);
1317
1324
  });
1318
1325
  }
1319
1326
  }
@@ -1342,7 +1349,7 @@ var Pt = class {
1342
1349
  }
1343
1350
  async getEntry() {
1344
1351
  if (this.remoteEntryExports) return this.remoteEntryExports;
1345
- const e = await pe({
1352
+ const e = await me({
1346
1353
  origin: this.host,
1347
1354
  remoteInfo: this.remoteInfo,
1348
1355
  remoteEntryExports: this.remoteEntryExports
@@ -1363,7 +1370,7 @@ var Pt = class {
1363
1370
  remoteInfo: this.remoteInfo,
1364
1371
  origin: this.host
1365
1372
  });
1366
- typeof (n == null ? void 0 : n.init) > "u" && S(_t, O, {
1373
+ typeof (n == null ? void 0 : n.init) > "u" && $(_t, O, {
1367
1374
  hostName: this.host.name,
1368
1375
  remoteName: this.remoteInfo.name,
1369
1376
  remoteEntryUrl: this.remoteInfo.entry,
@@ -1455,10 +1462,10 @@ function kt(e, t) {
1455
1462
  }
1456
1463
  var W = class extends v {
1457
1464
  constructor(e) {
1458
- super(), this.onerror = S, this.type = e;
1465
+ super(), this.onerror = $, this.type = e;
1459
1466
  }
1460
1467
  emit(e) {
1461
- Me(e) || S(`The data for the "${this.type}" hook should be an object.`);
1468
+ Me(e) || $(`The data for the "${this.type}" hook should be an object.`);
1462
1469
  for (const t of this.listeners) try {
1463
1470
  const r = t(e);
1464
1471
  if (kt(e, r)) e = r;
@@ -1473,10 +1480,10 @@ var W = class extends v {
1473
1480
  }
1474
1481
  }, D = class extends v {
1475
1482
  constructor(e) {
1476
- super(), this.onerror = S, this.type = e;
1483
+ super(), this.onerror = $, this.type = e;
1477
1484
  }
1478
1485
  emit(e) {
1479
- Me(e) || S(`The response data for the "${this.type}" hook must be an object.`);
1486
+ Me(e) || $(`The response data for the "${this.type}" hook must be an object.`);
1480
1487
  const t = Array.from(this.listeners);
1481
1488
  if (t.length > 0) {
1482
1489
  let r = 0;
@@ -1517,11 +1524,11 @@ var W = class extends v {
1517
1524
  };
1518
1525
  function Ot(e, t) {
1519
1526
  const r = ct(t);
1520
- r.url || S(Nt, O, { remoteName: e.name });
1521
- let n = Ne(t, r.url);
1527
+ r.url || $(Nt, O, { remoteName: e.name });
1528
+ let n = Ie(t, r.url);
1522
1529
  !F && !n.startsWith("http") && (n = `https:${n}`), e.type = r.type, e.entryGlobalName = r.globalName, e.entry = n, e.version = t.version, e.buildVersion = t.buildVersion;
1523
1530
  }
1524
- function mn() {
1531
+ function pn() {
1525
1532
  return {
1526
1533
  name: "snapshot-plugin",
1527
1534
  async afterResolve(e) {
@@ -1541,7 +1548,7 @@ function mn() {
1541
1548
  share: !1,
1542
1549
  depsRemote: !1
1543
1550
  }
1544
- }, f = await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({
1551
+ }, u = await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({
1545
1552
  origin: o,
1546
1553
  preloadOptions: c,
1547
1554
  remoteInfo: s,
@@ -1549,7 +1556,7 @@ function mn() {
1549
1556
  remoteSnapshot: a,
1550
1557
  globalSnapshot: l
1551
1558
  });
1552
- return f && At(s, o, f, !1), {
1559
+ return u && At(s, o, u, !1), {
1553
1560
  ...e,
1554
1561
  remoteSnapshot: a
1555
1562
  };
@@ -1558,7 +1565,7 @@ function mn() {
1558
1565
  }
1559
1566
  };
1560
1567
  }
1561
- function pn(e) {
1568
+ function mn(e) {
1562
1569
  const t = e.split(":");
1563
1570
  return t.length === 1 ? {
1564
1571
  name: t[0],
@@ -1578,85 +1585,85 @@ function Lt(e, t, r, n, o = {}, s) {
1578
1585
  for (const c of l) {
1579
1586
  if (o[c]) continue;
1580
1587
  o[c] = !0;
1581
- const f = pn(c), h = a.remotesInfo[c];
1588
+ const u = mn(c), d = a.remotesInfo[c];
1582
1589
  Lt(e, {
1583
- name: f.name,
1584
- version: h.matchedVersion
1590
+ name: u.name,
1591
+ version: d.matchedVersion
1585
1592
  }, r, !1, o, void 0);
1586
1593
  }
1587
1594
  }
1588
1595
  }
1589
- const Se = (e, t) => document.querySelector(`${e}[${e === "link" ? "href" : "src"}="${t}"]`);
1596
+ const $e = (e, t) => document.querySelector(`${e}[${e === "link" ? "href" : "src"}="${t}"]`);
1590
1597
  function yn(e, t, r, n, o) {
1591
- const s = [], i = [], a = [], l = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), { options: f } = e, { preloadConfig: h } = t, { depsRemote: u } = h;
1592
- if (Lt(n, r, (m, y, g) => {
1593
- var $;
1594
- let p;
1595
- if (g) p = h;
1596
- else if (Array.isArray(u)) {
1597
- const R = u.find((w) => w.nameOrAlias === y.name || w.nameOrAlias === y.alias);
1598
- if (!R) return;
1599
- p = vt(R);
1600
- } else if (u === !0) p = h;
1598
+ const s = [], i = [], a = [], l = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), { options: u } = e, { preloadConfig: d } = t, { depsRemote: h } = d;
1599
+ if (Lt(n, r, (p, m, g) => {
1600
+ var w;
1601
+ let y;
1602
+ if (g) y = d;
1603
+ else if (Array.isArray(h)) {
1604
+ const S = h.find((N) => N.nameOrAlias === m.name || N.nameOrAlias === m.alias);
1605
+ if (!S) return;
1606
+ y = vt(S);
1607
+ } else if (h === !0) y = d;
1601
1608
  else return;
1602
- const E = Ne(m, ct(m).url);
1603
- E && a.push({
1604
- name: y.name,
1609
+ const _ = Ie(p, ct(p).url);
1610
+ _ && a.push({
1611
+ name: m.name,
1605
1612
  moduleInfo: {
1606
- name: y.name,
1607
- entry: E,
1608
- type: "remoteEntryType" in m ? m.remoteEntryType : "global",
1609
- entryGlobalName: "globalName" in m ? m.globalName : y.name,
1613
+ name: m.name,
1614
+ entry: _,
1615
+ type: "remoteEntryType" in p ? p.remoteEntryType : "global",
1616
+ entryGlobalName: "globalName" in p ? p.globalName : m.name,
1610
1617
  shareScope: "",
1611
- version: "version" in m ? m.version : void 0
1618
+ version: "version" in p ? p.version : void 0
1612
1619
  },
1613
- url: E
1620
+ url: _
1614
1621
  });
1615
- let b = "modules" in m ? m.modules : [];
1616
- const N = hn(p.exposes);
1617
- N.length && "modules" in m && (b = ($ = m == null ? void 0 : m.modules) == null ? void 0 : $.reduce((R, w) => ((N == null ? void 0 : N.indexOf(w.moduleName)) !== -1 && R.push(w), R), []));
1618
- function _(R) {
1619
- const w = R.map((L) => Ne(m, L));
1620
- return p.filter ? w.filter(p.filter) : w;
1622
+ let b = "modules" in p ? p.modules : [];
1623
+ const R = hn(y.exposes);
1624
+ R.length && "modules" in p && (b = (w = p == null ? void 0 : p.modules) == null ? void 0 : w.reduce((S, N) => ((R == null ? void 0 : R.indexOf(N.moduleName)) !== -1 && S.push(N), S), []));
1625
+ function E(S) {
1626
+ const N = S.map((L) => Ie(p, L));
1627
+ return y.filter ? N.filter(y.filter) : N;
1621
1628
  }
1622
1629
  if (b) {
1623
- const R = b.length;
1624
- for (let w = 0; w < R; w++) {
1625
- const L = b[w], ye = `${y.name}/${L.moduleName}`;
1630
+ const S = b.length;
1631
+ for (let N = 0; N < S; N++) {
1632
+ const L = b[N], ge = `${m.name}/${L.moduleName}`;
1626
1633
  e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({
1627
- id: L.moduleName === "." ? y.name : ye,
1628
- name: y.name,
1629
- remoteSnapshot: m,
1630
- preloadConfig: p,
1631
- remote: y,
1634
+ id: L.moduleName === "." ? m.name : ge,
1635
+ name: m.name,
1636
+ remoteSnapshot: p,
1637
+ preloadConfig: y,
1638
+ remote: m,
1632
1639
  origin: e
1633
- }), !Er(ye) && (p.resourceCategory === "all" ? (s.push(..._(L.assets.css.async)), s.push(..._(L.assets.css.sync)), i.push(..._(L.assets.js.async)), i.push(..._(L.assets.js.sync))) : p.resourceCategory === "sync" && (s.push(..._(L.assets.css.sync)), i.push(..._(L.assets.js.sync))), _r(ye));
1640
+ }), !Er(ge) && (y.resourceCategory === "all" ? (s.push(...E(L.assets.css.async)), s.push(...E(L.assets.css.sync)), i.push(...E(L.assets.js.async)), i.push(...E(L.assets.js.sync))) : y.resourceCategory === "sync" && (s.push(...E(L.assets.css.sync)), i.push(...E(L.assets.js.sync))), _r(ge));
1634
1641
  }
1635
1642
  }
1636
1643
  }, !0, {}, o), o.shared && o.shared.length > 0) {
1637
- const m = (y, g) => {
1638
- const { shared: p } = de(e.shareScopeMap, g.sharedName, y, e.sharedHandler.hooks.lifecycle.resolveShare) || {};
1639
- p && typeof p.lib == "function" && (g.assets.js.sync.forEach((E) => {
1640
- l.add(E);
1641
- }), g.assets.css.sync.forEach((E) => {
1642
- c.add(E);
1644
+ const p = (m, g) => {
1645
+ const { shared: y } = de(e.shareScopeMap, g.sharedName, m, e.sharedHandler.hooks.lifecycle.resolveShare) || {};
1646
+ y && typeof y.lib == "function" && (g.assets.js.sync.forEach((_) => {
1647
+ l.add(_);
1648
+ }), g.assets.css.sync.forEach((_) => {
1649
+ c.add(_);
1643
1650
  }));
1644
1651
  };
1645
- o.shared.forEach((y) => {
1646
- var E;
1647
- const g = (E = f.shared) == null ? void 0 : E[y.sharedName];
1652
+ o.shared.forEach((m) => {
1653
+ var _;
1654
+ const g = (_ = u.shared) == null ? void 0 : _[m.sharedName];
1648
1655
  if (!g) return;
1649
- const p = y.version ? g.find((b) => b.version === y.version) : g;
1650
- p && at(p).forEach((b) => {
1651
- m(b, y);
1656
+ const y = m.version ? g.find((b) => b.version === m.version) : g;
1657
+ y && at(y).forEach((b) => {
1658
+ p(b, m);
1652
1659
  });
1653
1660
  });
1654
1661
  }
1655
- const d = i.filter((m) => !l.has(m) && !Se("script", m));
1662
+ const f = i.filter((p) => !l.has(p) && !$e("script", p));
1656
1663
  return {
1657
- cssAssets: s.filter((m) => !c.has(m) && !Se("link", m)),
1658
- jsAssetsWithoutEntry: d,
1659
- entryAssets: a.filter((m) => !Se("script", m.url))
1664
+ cssAssets: s.filter((p) => !c.has(p) && !$e("link", p)),
1665
+ jsAssetsWithoutEntry: f,
1666
+ entryAssets: a.filter((p) => !$e("script", p.url))
1660
1667
  };
1661
1668
  }
1662
1669
  const gn = function() {
@@ -1741,31 +1748,31 @@ var En = class {
1741
1748
  remoteSnapshot: i,
1742
1749
  globalSnapshot: a
1743
1750
  });
1744
- let f, h;
1751
+ let u, d;
1745
1752
  if (l) if (Qe(l)) {
1746
- const u = F ? l.remoteEntry : l.ssrRemoteEntry || l.remoteEntry || "", d = await this.getManifestJson(u, e, {}), m = xe({
1753
+ const h = F ? l.remoteEntry : l.ssrRemoteEntry || l.remoteEntry || "", f = await this.getManifestJson(h, e, {}), p = xe({
1747
1754
  ...e,
1748
- entry: u
1749
- }, d);
1750
- f = d, h = m;
1755
+ entry: h
1756
+ }, f);
1757
+ u = f, d = p;
1751
1758
  } else {
1752
- const { remoteSnapshot: u } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
1759
+ const { remoteSnapshot: h } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
1753
1760
  options: this.HostInstance.options,
1754
1761
  moduleInfo: e,
1755
1762
  remoteSnapshot: l,
1756
1763
  from: "global"
1757
1764
  });
1758
- f = u, h = c;
1765
+ u = h, d = c;
1759
1766
  }
1760
1767
  else if (Le(e)) {
1761
- const u = await this.getManifestJson(e.entry, e, {}), d = xe(e, u), { remoteSnapshot: m } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
1768
+ const h = await this.getManifestJson(e.entry, e, {}), f = xe(e, h), { remoteSnapshot: p } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
1762
1769
  options: this.HostInstance.options,
1763
1770
  moduleInfo: e,
1764
- remoteSnapshot: u,
1771
+ remoteSnapshot: h,
1765
1772
  from: "global"
1766
1773
  });
1767
- f = m, h = d;
1768
- } else S($t, O, {
1774
+ u = p, d = f;
1775
+ } else $($t, O, {
1769
1776
  remoteName: e.name,
1770
1777
  remoteVersion: e.version,
1771
1778
  hostName: this.HostInstance.options.name,
@@ -1776,10 +1783,10 @@ var En = class {
1776
1783
  host: this.HostInstance,
1777
1784
  options: n,
1778
1785
  moduleInfo: e,
1779
- remoteSnapshot: f
1786
+ remoteSnapshot: u
1780
1787
  }), {
1781
- remoteSnapshot: f,
1782
- globalSnapshot: h
1788
+ remoteSnapshot: u,
1789
+ globalSnapshot: d
1783
1790
  };
1784
1791
  }
1785
1792
  getGlobalRemoteInfo(e) {
@@ -1790,7 +1797,7 @@ var En = class {
1790
1797
  let s = this.manifestCache.get(e);
1791
1798
  if (s) return s;
1792
1799
  try {
1793
- let i = await this.loaderHook.lifecycle.fetch.emit(e, {});
1800
+ let i = await this.loaderHook.lifecycle.fetch.emit(e, {}, ye(t));
1794
1801
  (!i || !(i instanceof Response)) && (i = await fetch(e, {})), s = await i.json();
1795
1802
  } catch (i) {
1796
1803
  s = await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
@@ -1799,7 +1806,7 @@ var En = class {
1799
1806
  from: "runtime",
1800
1807
  lifecycle: "afterResolve",
1801
1808
  origin: this.HostInstance
1802
- }), s || (delete this.manifestLoading[e], S(bt, O, {
1809
+ }), s || (delete this.manifestLoading[e], $(bt, O, {
1803
1810
  manifestUrl: e,
1804
1811
  moduleName: t.name,
1805
1812
  hostName: this.HostInstance.options.name
@@ -1885,8 +1892,8 @@ var En = class {
1885
1892
  return a.loaded = !0, a.lib || (a.lib = l), U(a, r.options.name), l;
1886
1893
  } else {
1887
1894
  const c = (async () => {
1888
- const f = await a.get();
1889
- return U(a, r.options.name), a.loaded = !0, a.lib = f, f;
1895
+ const u = await a.get();
1896
+ return U(a, r.options.name), a.loaded = !0, a.lib = u, u;
1890
1897
  })();
1891
1898
  return this.setShared({
1892
1899
  pkgName: e,
@@ -1900,15 +1907,15 @@ var En = class {
1900
1907
  }
1901
1908
  } else {
1902
1909
  if (t != null && t.customShareInfo) return !1;
1903
- const a = ee(o.treeShaking), l = ie(o, a), f = (async () => {
1904
- const h = await l.get();
1905
- l.lib = h, l.loaded = !0, U(l, r.options.name);
1906
- const { shared: u, useTreesShaking: d } = de(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
1907
- if (u) {
1908
- const m = ie(u, d);
1909
- m.lib = h, m.loaded = !0, u.from = o.from;
1910
+ const a = ee(o.treeShaking), l = ie(o, a), u = (async () => {
1911
+ const d = await l.get();
1912
+ l.lib = d, l.loaded = !0, U(l, r.options.name);
1913
+ const { shared: h, useTreesShaking: f } = de(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
1914
+ if (h) {
1915
+ const p = ie(h, f);
1916
+ p.lib = d, p.loaded = !0, h.from = o.from;
1910
1917
  }
1911
- return h;
1918
+ return d;
1912
1919
  })();
1913
1920
  return this.setShared({
1914
1921
  pkgName: e,
@@ -1916,9 +1923,9 @@ var En = class {
1916
1923
  shared: o,
1917
1924
  from: r.options.name,
1918
1925
  lib: null,
1919
- loading: f,
1926
+ loading: u,
1920
1927
  treeShaking: a ? l : void 0
1921
- }), f;
1928
+ }), u;
1922
1929
  }
1923
1930
  }
1924
1931
  /**
@@ -1931,43 +1938,43 @@ var En = class {
1931
1938
  let s = t == null ? void 0 : t.initScope;
1932
1939
  const i = [];
1933
1940
  if (n !== "build") {
1934
- const { initTokens: u } = this;
1941
+ const { initTokens: h } = this;
1935
1942
  s || (s = []);
1936
- let d = u[e];
1937
- if (d || (d = u[e] = { from: this.host.name }), s.indexOf(d) >= 0) return i;
1938
- s.push(d);
1943
+ let f = h[e];
1944
+ if (f || (f = h[e] = { from: this.host.name }), s.indexOf(f) >= 0) return i;
1945
+ s.push(f);
1939
1946
  }
1940
1947
  const a = this.shareScopeMap, l = r.options.name;
1941
1948
  a[e] || (a[e] = {});
1942
- const c = a[e], f = (u, d) => {
1949
+ const c = a[e], u = (h, f) => {
1943
1950
  var b;
1944
- const { version: m, eager: y } = d;
1945
- c[u] = c[u] || {};
1946
- const g = c[u], p = g[m] && ie(g[m]), E = !!(p && ("eager" in p && p.eager || "shareConfig" in p && ((b = p.shareConfig) != null && b.eager)));
1947
- (!p || p.strategy !== "loaded-first" && !p.loaded && (!y != !E ? y : l > g[m].from)) && (g[m] = d);
1948
- }, h = async (u) => {
1949
- const { module: d } = await r.remoteHandler.getRemoteModuleAndOptions({ id: u });
1950
- let m;
1951
+ const { version: p, eager: m } = f;
1952
+ c[h] = c[h] || {};
1953
+ const g = c[h], y = g[p] && ie(g[p]), _ = !!(y && ("eager" in y && y.eager || "shareConfig" in y && ((b = y.shareConfig) != null && b.eager)));
1954
+ (!y || y.strategy !== "loaded-first" && !y.loaded && (!m != !_ ? m : l > g[p].from)) && (g[p] = f);
1955
+ }, d = async (h) => {
1956
+ const { module: f } = await r.remoteHandler.getRemoteModuleAndOptions({ id: h });
1957
+ let p;
1951
1958
  try {
1952
- m = await d.getEntry();
1953
- } catch (y) {
1954
- if (m = await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
1955
- id: u,
1956
- error: y,
1959
+ p = await f.getEntry();
1960
+ } catch (m) {
1961
+ if (p = await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
1962
+ id: h,
1963
+ error: m,
1957
1964
  from: "runtime",
1958
1965
  lifecycle: "beforeLoadShare",
1959
1966
  origin: r
1960
- }), !m) return;
1967
+ }), !p) return;
1961
1968
  } finally {
1962
- m != null && m.init && !d.initing && (d.remoteEntryExports = m, await d.init(void 0, void 0, s));
1969
+ p != null && p.init && !f.initing && (f.remoteEntryExports = p, await f.init(void 0, void 0, s));
1963
1970
  }
1964
1971
  };
1965
- return Object.keys(r.options.shared).forEach((u) => {
1966
- r.options.shared[u].forEach((d) => {
1967
- d.scope.includes(e) && f(u, d);
1972
+ return Object.keys(r.options.shared).forEach((h) => {
1973
+ r.options.shared[h].forEach((f) => {
1974
+ f.scope.includes(e) && u(h, f);
1968
1975
  });
1969
- }), (r.options.shareStrategy === "version-first" || o === "version-first") && r.options.remotes.forEach((u) => {
1970
- u.shareScope === e && i.push(h(u.name));
1976
+ }), (r.options.shareStrategy === "version-first" || o === "version-first") && r.options.remotes.forEach((h) => {
1977
+ h.shareScope === e && i.push(d(h.name));
1971
1978
  }), i;
1972
1979
  }
1973
1980
  loadShareSync(e, t) {
@@ -1999,7 +2006,7 @@ var En = class {
1999
2006
  return n.loaded || (n.loaded = !0), n.lib;
2000
2007
  if (n.get) {
2001
2008
  const i = n.get();
2002
- return i instanceof Promise && S((t == null ? void 0 : t.from) === "build" ? St : Ae, O, {
2009
+ return i instanceof Promise && $((t == null ? void 0 : t.from) === "build" ? St : Pe, O, {
2003
2010
  hostName: r.options.name,
2004
2011
  sharedPkgName: e
2005
2012
  }, void 0, z(r.options)), n.lib = i, this.setShared({
@@ -2010,7 +2017,7 @@ var En = class {
2010
2017
  shared: n
2011
2018
  }), n.lib;
2012
2019
  }
2013
- S(Ae, O, {
2020
+ $(Pe, O, {
2014
2021
  hostName: r.options.name,
2015
2022
  sharedPkgName: e
2016
2023
  }, void 0, z(r.options));
@@ -2026,21 +2033,21 @@ var En = class {
2026
2033
  });
2027
2034
  }
2028
2035
  setShared({ pkgName: e, shared: t, from: r, lib: n, loading: o, loaded: s, get: i, treeShaking: a }) {
2029
- const { version: l, scope: c = "default", ...f } = t, h = Array.isArray(c) ? c : [c], u = (d) => {
2030
- const m = (g, p, E) => {
2031
- E && !g[p] && (g[p] = E);
2032
- }, y = a ? d.treeShaking : d;
2033
- m(y, "loaded", s), m(y, "loading", o), m(y, "get", i);
2036
+ const { version: l, scope: c = "default", ...u } = t, d = Array.isArray(c) ? c : [c], h = (f) => {
2037
+ const p = (g, y, _) => {
2038
+ _ && !g[y] && (g[y] = _);
2039
+ }, m = a ? f.treeShaking : f;
2040
+ p(m, "loaded", s), p(m, "loading", o), p(m, "get", i);
2034
2041
  };
2035
- h.forEach((d) => {
2036
- this.shareScopeMap[d] || (this.shareScopeMap[d] = {}), this.shareScopeMap[d][e] || (this.shareScopeMap[d][e] = {}), this.shareScopeMap[d][e][l] || (this.shareScopeMap[d][e][l] = {
2042
+ d.forEach((f) => {
2043
+ this.shareScopeMap[f] || (this.shareScopeMap[f] = {}), this.shareScopeMap[f][e] || (this.shareScopeMap[f][e] = {}), this.shareScopeMap[f][e][l] || (this.shareScopeMap[f][e][l] = {
2037
2044
  version: l,
2038
- scope: [d],
2039
- ...f,
2045
+ scope: [f],
2046
+ ...u,
2040
2047
  lib: n
2041
2048
  });
2042
- const m = this.shareScopeMap[d][e][l];
2043
- u(m), r && m.from !== r && (m.from = r);
2049
+ const p = this.shareScopeMap[f][e][l];
2050
+ h(p), r && p.from !== r && (p.from = r);
2044
2051
  });
2045
2052
  }
2046
2053
  _setGlobalShareScopeMap(e) {
@@ -2089,18 +2096,18 @@ var En = class {
2089
2096
  async loadRemote(e, t) {
2090
2097
  const { host: r } = this;
2091
2098
  try {
2092
- const { loadFactory: n = !0 } = t || { loadFactory: !0 }, { module: o, moduleOptions: s, remoteMatchInfo: i } = await this.getRemoteModuleAndOptions({ id: e }), { pkgNameOrAlias: a, remote: l, expose: c, id: f, remoteSnapshot: h } = i, u = await o.get(f, c, t, h), d = await this.hooks.lifecycle.onLoad.emit({
2093
- id: f,
2099
+ const { loadFactory: n = !0 } = t || { loadFactory: !0 }, { module: o, moduleOptions: s, remoteMatchInfo: i } = await this.getRemoteModuleAndOptions({ id: e }), { pkgNameOrAlias: a, remote: l, expose: c, id: u, remoteSnapshot: d } = i, h = await o.get(u, c, t, d), f = await this.hooks.lifecycle.onLoad.emit({
2100
+ id: u,
2094
2101
  pkgNameOrAlias: a,
2095
2102
  expose: c,
2096
- exposeModule: n ? u : void 0,
2097
- exposeModuleFactory: n ? void 0 : u,
2103
+ exposeModule: n ? h : void 0,
2104
+ exposeModuleFactory: n ? void 0 : h,
2098
2105
  remote: l,
2099
2106
  options: s,
2100
2107
  moduleInstance: o,
2101
2108
  origin: r
2102
2109
  });
2103
- return this.setIdToRemoteMap(e, i), typeof d == "function" ? d : u;
2110
+ return this.setIdToRemoteMap(e, i), typeof f == "function" ? f : h;
2104
2111
  } catch (n) {
2105
2112
  const { from: o = "runtime" } = t || { from: "runtime" }, s = await this.hooks.lifecycle.errorLoadRemote.emit({
2106
2113
  id: e,
@@ -2122,7 +2129,7 @@ var En = class {
2122
2129
  });
2123
2130
  const r = fn(t.options.remotes, e);
2124
2131
  await Promise.all(r.map(async (n) => {
2125
- const { remote: o } = n, s = ke(o), { globalSnapshot: i, remoteSnapshot: a } = await t.snapshotHandler.loadRemoteSnapshotInfo({ moduleInfo: o }), l = await this.hooks.lifecycle.generatePreloadAssets.emit({
2132
+ const { remote: o } = n, s = ye(o), { globalSnapshot: i, remoteSnapshot: a } = await t.snapshotHandler.loadRemoteSnapshotInfo({ moduleInfo: o }), l = await this.hooks.lifecycle.generatePreloadAssets.emit({
2126
2133
  origin: t,
2127
2134
  preloadOptions: n,
2128
2135
  remote: o,
@@ -2148,37 +2155,37 @@ var En = class {
2148
2155
  options: t.options,
2149
2156
  origin: t
2150
2157
  });
2151
- } catch (d) {
2158
+ } catch (f) {
2152
2159
  if (n = await this.hooks.lifecycle.errorLoadRemote.emit({
2153
2160
  id: r,
2154
2161
  options: t.options,
2155
2162
  origin: t,
2156
2163
  from: "runtime",
2157
- error: d,
2164
+ error: f,
2158
2165
  lifecycle: "beforeRequest"
2159
- }), !n) throw d;
2166
+ }), !n) throw f;
2160
2167
  }
2161
2168
  const { id: o } = n, s = Zr(t.options.remotes, o);
2162
- s || S(Rt, O, {
2169
+ s || $(Rt, O, {
2163
2170
  hostName: t.options.name,
2164
2171
  requestId: o
2165
2172
  }, void 0, z(t.options));
2166
- const { remote: i } = s, a = ke(i), l = await t.sharedHandler.hooks.lifecycle.afterResolve.emit({
2173
+ const { remote: i } = s, a = ye(i), l = await t.sharedHandler.hooks.lifecycle.afterResolve.emit({
2167
2174
  id: o,
2168
2175
  ...s,
2169
2176
  options: t.options,
2170
2177
  origin: t,
2171
2178
  remoteInfo: a
2172
- }), { remote: c, expose: f } = l;
2173
- P(c && f, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);
2174
- let h = t.moduleCache.get(c.name);
2175
- const u = {
2179
+ }), { remote: c, expose: u } = l;
2180
+ P(c && u, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);
2181
+ let d = t.moduleCache.get(c.name);
2182
+ const h = {
2176
2183
  host: t,
2177
2184
  remoteInfo: a
2178
2185
  };
2179
- return h || (h = new Pt(u), t.moduleCache.set(c.name, h)), {
2180
- module: h,
2181
- moduleOptions: u,
2186
+ return d || (d = new Pt(h), t.moduleCache.set(c.name, d)), {
2187
+ module: d,
2188
+ moduleOptions: h,
2182
2189
  remoteMatchInfo: l
2183
2190
  };
2184
2191
  }
@@ -2191,7 +2198,7 @@ var En = class {
2191
2198
  });
2192
2199
  P(!i, `The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i && i.name} name or alias`);
2193
2200
  }
2194
- "entry" in e && F && typeof window < "u" && !e.entry.startsWith("http") && (e.entry = new URL(e.entry, window.location.origin).href), e.shareScope || (e.shareScope = re), e.type || (e.type = pt);
2201
+ "entry" in e && F && typeof window < "u" && !e.entry.startsWith("http") && (e.entry = new URL(e.entry, window.location.origin).href), e.shareScope || (e.shareScope = re), e.type || (e.type = mt);
2195
2202
  };
2196
2203
  this.hooks.lifecycle.beforeRegisterRemote.emit({
2197
2204
  remote: e,
@@ -2220,52 +2227,52 @@ var En = class {
2220
2227
  if (s) {
2221
2228
  const i = s.remoteInfo, a = i.entryGlobalName;
2222
2229
  I[a] && ((t = Object.getOwnPropertyDescriptor(I, a)) != null && t.configurable ? delete I[a] : I[a] = void 0);
2223
- const l = Pe(s.remoteInfo);
2224
- B[l] && delete B[l], r.snapshotHandler.manifestCache.delete(i.entry);
2230
+ const l = ke(s.remoteInfo);
2231
+ V[l] && delete V[l], r.snapshotHandler.manifestCache.delete(i.entry);
2225
2232
  let c = i.buildVersion ? Xe(i.name, i.buildVersion) : i.name;
2226
- const f = I.__FEDERATION__.__INSTANCES__.findIndex((u) => i.buildVersion ? u.options.id === c : u.name === c);
2227
- if (f !== -1) {
2228
- const u = I.__FEDERATION__.__INSTANCES__[f];
2229
- c = u.options.id || c;
2230
- const d = gt();
2231
- let m = !0;
2232
- const y = [];
2233
- Object.keys(d).forEach((g) => {
2234
- const p = d[g];
2235
- p && Object.keys(p).forEach((E) => {
2236
- const b = p[E];
2237
- b && Object.keys(b).forEach((N) => {
2238
- const _ = b[N];
2239
- _ && Object.keys(_).forEach(($) => {
2240
- const R = _[$];
2241
- R && typeof R == "object" && R.from === i.name && (R.loaded || R.loading ? (R.useIn = R.useIn.filter((w) => w !== i.name), R.useIn.length ? m = !1 : y.push([
2233
+ const u = I.__FEDERATION__.__INSTANCES__.findIndex((h) => i.buildVersion ? h.options.id === c : h.name === c);
2234
+ if (u !== -1) {
2235
+ const h = I.__FEDERATION__.__INSTANCES__[u];
2236
+ c = h.options.id || c;
2237
+ const f = gt();
2238
+ let p = !0;
2239
+ const m = [];
2240
+ Object.keys(f).forEach((g) => {
2241
+ const y = f[g];
2242
+ y && Object.keys(y).forEach((_) => {
2243
+ const b = y[_];
2244
+ b && Object.keys(b).forEach((R) => {
2245
+ const E = b[R];
2246
+ E && Object.keys(E).forEach((w) => {
2247
+ const S = E[w];
2248
+ S && typeof S == "object" && S.from === i.name && (S.loaded || S.loading ? (S.useIn = S.useIn.filter((N) => N !== i.name), S.useIn.length ? p = !1 : m.push([
2242
2249
  g,
2243
- E,
2244
- N,
2245
- $
2246
- ])) : y.push([
2250
+ _,
2251
+ R,
2252
+ w
2253
+ ])) : m.push([
2247
2254
  g,
2248
- E,
2249
- N,
2250
- $
2255
+ _,
2256
+ R,
2257
+ w
2251
2258
  ]));
2252
2259
  });
2253
2260
  });
2254
2261
  });
2255
- }), m && (u.shareScopeMap = {}, delete d[c]), y.forEach(([g, p, E, b]) => {
2256
- var N, _, $;
2257
- ($ = (_ = (N = d[g]) == null ? void 0 : N[p]) == null ? void 0 : _[E]) == null || delete $[b];
2258
- }), I.__FEDERATION__.__INSTANCES__.splice(f, 1);
2262
+ }), p && (h.shareScopeMap = {}, delete f[c]), m.forEach(([g, y, _, b]) => {
2263
+ var R, E, w;
2264
+ (w = (E = (R = f[g]) == null ? void 0 : R[y]) == null ? void 0 : E[_]) == null || delete w[b];
2265
+ }), I.__FEDERATION__.__INSTANCES__.splice(u, 1);
2259
2266
  }
2260
- const { hostGlobalSnapshot: h } = Mt(e, r);
2261
- if (h) {
2262
- const u = h && "remotesInfo" in h && h.remotesInfo && q(h.remotesInfo, e.name).key;
2263
- u && (delete h.remotesInfo[u], Q.__FEDERATION__.__MANIFEST_LOADING__[u] && delete Q.__FEDERATION__.__MANIFEST_LOADING__[u]);
2267
+ const { hostGlobalSnapshot: d } = Mt(e, r);
2268
+ if (d) {
2269
+ const h = d && "remotesInfo" in d && d.remotesInfo && q(d.remotesInfo, e.name).key;
2270
+ h && (delete d.remotesInfo[h], Q.__FEDERATION__.__MANIFEST_LOADING__[h] && delete Q.__FEDERATION__.__MANIFEST_LOADING__[h]);
2264
2271
  }
2265
2272
  r.moduleCache.delete(e.name);
2266
2273
  }
2267
2274
  } catch (r) {
2268
- ve.error(`removeRemote failed: ${r instanceof Error ? r.message : String(r)}`);
2275
+ Ae.error(`removeRemote failed: ${r instanceof Error ? r.message : String(r)}`);
2269
2276
  }
2270
2277
  }
2271
2278
  };
@@ -2277,7 +2284,7 @@ var Sn = class {
2277
2284
  init: new v(),
2278
2285
  beforeInitContainer: new D("beforeInitContainer"),
2279
2286
  initContainer: new D("initContainer")
2280
- }), this.version = "2.3.1", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new j({
2287
+ }), this.version = "2.3.3", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new j({
2281
2288
  getModuleInfo: new v(),
2282
2289
  createScript: new v(),
2283
2290
  createLink: new v(),
@@ -2290,7 +2297,7 @@ var Sn = class {
2290
2297
  beforeBridgeDestroy: new v(),
2291
2298
  afterBridgeDestroy: new v()
2292
2299
  });
2293
- const t = Rn ? [mn(), gn()] : [], r = {
2300
+ const t = Rn ? [pn(), gn()] : [], r = {
2294
2301
  id: cn(),
2295
2302
  name: e.name,
2296
2303
  plugins: t,
@@ -2301,7 +2308,7 @@ var Sn = class {
2301
2308
  this.name = e.name, this.options = r, this.snapshotHandler = new En(this), this.sharedHandler = new _n(this), this.remoteHandler = new bn(this), this.shareScopeMap = this.sharedHandler.shareScopeMap, this.registerPlugins([...r.plugins, ...e.plugins || []]), this.options = this.formatOptions(r, e);
2302
2309
  }
2303
2310
  initOptions(e) {
2304
- e.name && e.name !== this.options.name && S(st(wt, O)), this.registerPlugins(e.plugins);
2311
+ e.name && e.name !== this.options.name && $(st(wt, O)), this.registerPlugins(e.plugins);
2305
2312
  const t = this.formatOptions(this.options, e);
2306
2313
  return this.options = t, t;
2307
2314
  }
@@ -2315,7 +2322,7 @@ var Sn = class {
2315
2322
  return this.sharedHandler.initializeSharing(e, t);
2316
2323
  }
2317
2324
  initRawContainer(e, t, r) {
2318
- const n = ke({
2325
+ const n = ye({
2319
2326
  name: e,
2320
2327
  entry: t
2321
2328
  }), o = new Pt({
@@ -2373,9 +2380,10 @@ let $n = null;
2373
2380
  function Ct() {
2374
2381
  return $n;
2375
2382
  }
2376
- mr(Sn);
2383
+ pr(Sn);
2377
2384
  function Dt(e, t) {
2378
2385
  const r = (n) => {
2386
+ if (!n.startsWith("/")) return n;
2379
2387
  const o = n.length > 1 && n.endsWith("/"), s = `${t}/${n}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/";
2380
2388
  return o ? `${s}/` : s;
2381
2389
  };
@@ -2394,46 +2402,53 @@ function Dt(e, t) {
2394
2402
  });
2395
2403
  }
2396
2404
  function wn(e) {
2405
+ const t = e.replace(/\/+$/, ""), r = (s) => s.startsWith("/") && s !== t && !s.startsWith(t + "/"), n = (s) => `${t}${s}`.replace(/\/+/g, "/"), o = (s) => typeof s == "string" ? r(s) ? n(s) : s : "path" in s && typeof s.path == "string" && r(s.path) ? { ...s, path: n(s.path) } : s;
2406
+ return (s) => {
2407
+ const i = s.push.bind(s), a = s.replace.bind(s), l = s.resolve.bind(s);
2408
+ s.push = (c) => i(o(c)), s.replace = (c) => a(o(c)), s.resolve = (c, ...u) => l(o(c), ...u);
2409
+ };
2410
+ }
2411
+ function Nn(e) {
2397
2412
  const { router: t, basename: r, memoryRoute: n, hashRoute: o } = e, s = t.getRoutes().sort(
2398
- (u, d) => u.path.split("/").filter((m) => m).length - d.path.split("/").filter((m) => m).length
2413
+ (f, p) => f.path.split("/").filter((m) => m).length - p.path.split("/").filter((m) => m).length
2399
2414
  ), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
2400
- s.forEach((u) => {
2401
- i.set(u.path, u);
2415
+ s.forEach((f) => {
2416
+ const p = i.get(f.path) || [];
2417
+ p.push(f), i.set(f.path, p);
2402
2418
  });
2403
- const l = (u, d) => `${u}/${d}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/", c = (u, d = "") => {
2404
- if (!u.children || u.children.length === 0)
2405
- return u;
2406
- for (let m = 0; m < u.children.length; m++) {
2407
- const y = u.children[m], g = l(d, y.path), p = i.get(g);
2408
- if (p && !a.has(p)) {
2409
- const E = {
2410
- ...p,
2411
- path: y.path
2419
+ const l = (f, p) => `${f}/${p}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/", c = (f, p = "") => {
2420
+ if (!f.children || f.children.length === 0)
2421
+ return f;
2422
+ for (let m = 0; m < f.children.length; m++) {
2423
+ const g = f.children[m], y = l(p, g.path), b = (i.get(y) || []).find(
2424
+ (R) => !a.has(R) && R !== f && (g.name == null || R.name === g.name)
2425
+ );
2426
+ if (b) {
2427
+ const R = {
2428
+ ...b,
2429
+ path: g.path
2412
2430
  // Keep the original relative path from static route
2413
2431
  };
2414
- u.children[m] = E, a.add(p), c(E, g);
2432
+ f.children[m] = R, a.add(b), c(R, y);
2415
2433
  }
2416
2434
  }
2417
- return u;
2435
+ return f;
2418
2436
  };
2419
- let f = [];
2420
- for (const u of s)
2421
- if (!a.has(u)) {
2422
- const d = c(u, u.path);
2423
- a.add(u), f.push(d);
2437
+ let u = [];
2438
+ for (const f of s)
2439
+ if (!a.has(f)) {
2440
+ const p = c(f, f.path);
2441
+ a.add(f), u.push(p);
2424
2442
  }
2425
- let h;
2426
- return n ? h = ae.createMemoryHistory(r) : o ? (h = ae.createWebHashHistory(), r && (f = Dt(f, r))) : h = ae.createWebHistory(r), {
2427
- history: h,
2428
- routes: f
2429
- };
2443
+ let d, h;
2444
+ return n ? d = ae.createMemoryHistory(r) : o ? (d = ae.createWebHashHistory(), r && (u = Dt(u, r), h = wn(r))) : d = ae.createWebHistory(r), { history: d, routes: u, patchRouter: h };
2430
2445
  }
2431
- function Pn(e) {
2446
+ function kn(e) {
2432
2447
  const t = /* @__PURE__ */ new Map(), r = Ct();
2433
2448
  return () => ({
2434
- __APP_VERSION__: "2.3.1",
2449
+ __APP_VERSION__: "2.3.3",
2435
2450
  async render(n) {
2436
- var m, y, g;
2451
+ var p, m, g;
2437
2452
  C.debug("createBridgeComponent render Info", n);
2438
2453
  const {
2439
2454
  moduleName: o,
@@ -2442,33 +2457,33 @@ function Pn(e) {
2442
2457
  memoryRoute: a,
2443
2458
  hashRoute: l,
2444
2459
  ...c
2445
- } = n, f = Ft.createApp(e.rootComponent, c);
2446
- t.set(s, f);
2447
- const h = await ((g = (y = (m = r == null ? void 0 : r.bridgeHook) == null ? void 0 : m.lifecycle) == null ? void 0 : y.beforeBridgeRender) == null ? void 0 : g.emit(n)), u = h && typeof h == "object" && (h != null && h.extraProps) ? h == null ? void 0 : h.extraProps : {}, d = e.appOptions({
2448
- app: f,
2460
+ } = n, u = Ft.createApp(e.rootComponent, c);
2461
+ t.set(s, u);
2462
+ const d = await ((g = (m = (p = r == null ? void 0 : r.bridgeHook) == null ? void 0 : p.lifecycle) == null ? void 0 : m.beforeBridgeRender) == null ? void 0 : g.emit(n)), h = d && typeof d == "object" && (d != null && d.extraProps) ? d == null ? void 0 : d.extraProps : {}, f = e.appOptions({
2463
+ app: u,
2449
2464
  basename: i,
2450
2465
  memoryRoute: a,
2451
2466
  hashRoute: l,
2452
2467
  ...c,
2453
- ...u
2468
+ ...h
2454
2469
  });
2455
- if (d != null && d.router) {
2456
- const { history: p, routes: E } = wn({
2457
- router: d.router,
2470
+ if (f != null && f.router) {
2471
+ const { history: y, routes: _, patchRouter: b } = Nn({
2472
+ router: f.router,
2458
2473
  basename: n.basename,
2459
2474
  memoryRoute: n.memoryRoute,
2460
2475
  hashRoute: n.hashRoute
2461
- }), b = ae.createRouter({
2462
- ...d.router.options,
2463
- history: p,
2464
- routes: E
2476
+ }), R = ae.createRouter({
2477
+ ...f.router.options,
2478
+ history: y,
2479
+ routes: _
2465
2480
  });
2466
- C.debug("createBridgeComponent render router info>>>", {
2481
+ b && b(R), f.afterRouterCreate && f.afterRouterCreate(R), C.debug("createBridgeComponent render router info>>>", {
2467
2482
  moduleName: o,
2468
- router: b
2469
- }), a && await b.push(a.entryPath), f.use(b);
2483
+ router: R
2484
+ }), a && await R.push(a.entryPath), u.use(R);
2470
2485
  }
2471
- f.mount(s);
2486
+ u.mount(s);
2472
2487
  },
2473
2488
  destroy(n) {
2474
2489
  C.debug("createBridgeComponent destroy Info", n);
@@ -2477,11 +2492,11 @@ function Pn(e) {
2477
2492
  }
2478
2493
  });
2479
2494
  }
2480
- function Nn() {
2495
+ function In() {
2481
2496
  const e = new PopStateEvent("popstate", { state: window.history.state });
2482
2497
  window.dispatchEvent(e);
2483
2498
  }
2484
- const In = /* @__PURE__ */ Ht({
2499
+ const Tn = /* @__PURE__ */ Ht({
2485
2500
  name: "RemoteApp",
2486
2501
  props: {
2487
2502
  moduleName: String,
@@ -2493,11 +2508,11 @@ const In = /* @__PURE__ */ Ht({
2493
2508
  },
2494
2509
  inheritAttrs: !1,
2495
2510
  setup(e) {
2496
- const t = ge(null), r = ge(null), n = ge(""), o = Ke(), s = Ct(), i = Gt(), a = async () => {
2497
- var u, d, m, y;
2498
- const c = (u = e.providerInfo) == null ? void 0 : u.call(e);
2511
+ const t = Ee(null), r = Ee(null), n = Ee(""), o = Ke(), s = Ct(), i = Gt(), a = async () => {
2512
+ var h, f, p, m;
2513
+ const c = (h = e.providerInfo) == null ? void 0 : h.call(e);
2499
2514
  r.value = c;
2500
- let f = {
2515
+ let u = {
2501
2516
  ...i,
2502
2517
  moduleName: e.moduleName,
2503
2518
  dom: t.value,
@@ -2505,35 +2520,35 @@ const In = /* @__PURE__ */ Ht({
2505
2520
  memoryRoute: e.memoryRoute,
2506
2521
  hashRoute: e.hashRoute
2507
2522
  };
2508
- C.debug("createRemoteAppComponent LazyComponent render >>>", f);
2509
- const h = await ((y = (m = (d = s == null ? void 0 : s.bridgeHook) == null ? void 0 : d.lifecycle) == null ? void 0 : m.beforeBridgeRender) == null ? void 0 : y.emit(f)) || {};
2510
- f = {
2511
- ...f,
2512
- ...h.extraProps
2513
- }, c.render(f);
2523
+ C.debug("createRemoteAppComponent LazyComponent render >>>", u);
2524
+ const d = await ((m = (p = (f = s == null ? void 0 : s.bridgeHook) == null ? void 0 : f.lifecycle) == null ? void 0 : p.beforeBridgeRender) == null ? void 0 : m.emit(u)) || {};
2525
+ u = {
2526
+ ...u,
2527
+ ...d.extraProps
2528
+ }, c.render(u);
2514
2529
  }, l = xt(() => o == null ? void 0 : o.path, (c) => {
2515
2530
  c !== o.path && a(), n.value !== "" && n.value !== c && (C.debug("createRemoteAppComponent dispatchPopstateEnv >>>", {
2516
2531
  ...e,
2517
2532
  pathname: o.path
2518
- }), Nn()), n.value = c;
2533
+ }), In()), n.value = c;
2519
2534
  });
2520
2535
  return Ut(() => {
2521
2536
  a();
2522
- }), Vt(() => {
2537
+ }), Bt(() => {
2523
2538
  var c;
2524
2539
  C.debug("createRemoteAppComponent LazyComponent destroy >>>", {
2525
2540
  ...e
2526
2541
  }), l(), (c = r.value) == null || c.destroy({
2527
2542
  dom: t.value
2528
2543
  });
2529
- }), () => Bt("div", Wt(e.rootAttrs || {}, {
2544
+ }), () => Vt("div", Wt(e.rootAttrs || {}, {
2530
2545
  ref: t
2531
2546
  }), null);
2532
2547
  }
2533
2548
  });
2534
- function Tn(e) {
2549
+ function vn(e) {
2535
2550
  return jt({
2536
- __APP_VERSION__: "2.3.1",
2551
+ __APP_VERSION__: "2.3.3",
2537
2552
  ...e.asyncComponentOptions,
2538
2553
  //@ts-ignore
2539
2554
  loader: async () => {
@@ -2557,7 +2572,7 @@ function Tn(e) {
2557
2572
  ), o in s && typeof a == "function")
2558
2573
  return {
2559
2574
  render() {
2560
- return qt(In, {
2575
+ return qt(Tn, {
2561
2576
  moduleName: i,
2562
2577
  providerInfo: a,
2563
2578
  basename: r,
@@ -2571,13 +2586,13 @@ function Tn(e) {
2571
2586
  }
2572
2587
  });
2573
2588
  }
2574
- function kn(e) {
2589
+ function On(e) {
2575
2590
  return C.warn(
2576
2591
  "createRemoteComponent is deprecated, please use createRemoteAppComponent instead!"
2577
- ), Tn(e);
2592
+ ), vn(e);
2578
2593
  }
2579
2594
  export {
2580
- Pn as createBridgeComponent,
2581
- Tn as createRemoteAppComponent,
2582
- kn as createRemoteComponent
2595
+ kn as createBridgeComponent,
2596
+ vn as createRemoteAppComponent,
2597
+ On as createRemoteComponent
2583
2598
  };