@camstack/addon-benchmark 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/{__mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-CCBTZBOa.mjs → __mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-h5aXOPSA.mjs} +1 -1
  2. package/dist/__mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-BDmWQEu5.mjs +16 -0
  3. package/dist/{__mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.mjs-D0mCkXl6.mjs → __mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.mjs-DrODo4jp.mjs} +8 -8
  4. package/dist/{__mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.mjs_commonjs-proxy-Y5C1IdnH.mjs → __mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.mjs_commonjs-proxy-JW-pexXa.mjs} +1 -1
  5. package/dist/{__mfe_internal__addon_benchmark_page__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-DHyNsEqy.mjs → __mfe_internal__addon_benchmark_page__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-B7BvuptH.mjs} +1 -1
  6. package/dist/_stub.js +8176 -3997
  7. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-Cc3NF30a.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-BeLfGVa1.mjs} +10 -11
  8. package/dist/addon-benchmark.css +1 -1
  9. package/dist/{client-CcDLM_13.mjs → client-DFXd_CTL.mjs} +2 -2
  10. package/dist/{hostInit-CAVqKr6S.mjs → hostInit-CVXvnQQ4.mjs} +12 -12
  11. package/dist/{index-DaSo_2kE.mjs → index-B3DDm3f_.mjs} +1 -1
  12. package/dist/index-B9MIeX8E.mjs +1617 -0
  13. package/dist/index-BHDPHRYK.mjs +19109 -0
  14. package/dist/{index-DnFVXz0U.mjs → index-CRN37Hr9.mjs} +12367 -11334
  15. package/dist/{index-Dh5vmX_b.mjs → index-CwX5nq5R.mjs} +1 -1
  16. package/dist/{index-BJiPhUp0.mjs → index-DIVnrURN.mjs} +1 -1
  17. package/dist/{index-DDFHp1Wk.mjs → index-DqipDAUg.mjs} +1 -1
  18. package/dist/{jsx-runtime-Dnzp-FK_.mjs → jsx-runtime-BblBcpPM.mjs} +1 -1
  19. package/dist/remoteEntry.js +2933 -45
  20. package/package.json +6 -2
  21. package/dist/__mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-DqxRPOgh.mjs +0 -16
  22. package/dist/index-BumDn7Si.mjs +0 -3402
  23. package/dist/index-C3iAUQqS.mjs +0 -533
  24. package/dist/index-CMtMiC4k.mjs +0 -2464
  25. package/dist/index-CWhCtlI6.mjs +0 -14567
  26. package/dist/index-D0dNM7_R.mjs +0 -2892
@@ -1,17 +1,2905 @@
1
- import { d as y } from "./index-D0dNM7_R.mjs";
1
+ var ir = {}, ar = {}, It = {}, I = {}, L = {}, M = {};
2
+ const ln = "federation-manifest.json", cn = ".json", un = "FEDERATION_DEBUG", B = {
3
+ AT: "@",
4
+ HYPHEN: "-",
5
+ SLASH: "/"
6
+ }, He = {
7
+ [B.AT]: "scope_",
8
+ [B.HYPHEN]: "_",
9
+ [B.SLASH]: "__"
10
+ }, fn = {
11
+ [He[B.AT]]: B.AT,
12
+ [He[B.HYPHEN]]: B.HYPHEN,
13
+ [He[B.SLASH]]: B.SLASH
14
+ }, dn = ":", hn = "mf-manifest.json", mn = "mf-stats.json", pn = {
15
+ NPM: "npm",
16
+ APP: "app"
17
+ }, _n = "__MF_DEVTOOLS_MODULE_INFO__", gn = "ENCODE_NAME_PREFIX", yn = ".federation";
18
+ let En = /* @__PURE__ */ (function(e) {
19
+ return e[e.UNKNOWN = 1] = "UNKNOWN", e[e.CALCULATED = 2] = "CALCULATED", e[e.NO_USE = 0] = "NO_USE", e;
20
+ })({});
21
+ M.BROWSER_LOG_KEY = un;
22
+ M.ENCODE_NAME_PREFIX = gn;
23
+ M.EncodedNameTransformMap = fn;
24
+ M.FederationModuleManifest = ln;
25
+ M.MANIFEST_EXT = cn;
26
+ M.MFModuleType = pn;
27
+ M.MODULE_DEVTOOL_IDENTIFIER = _n;
28
+ M.ManifestFileName = hn;
29
+ M.NameTransformMap = He;
30
+ M.NameTransformSymbol = B;
31
+ M.SEPARATOR = dn;
32
+ M.StatsFileName = mn;
33
+ M.TEMP_DIR = yn;
34
+ M.TreeShakingStatus = En;
35
+ var lr = {}, ee = {}, Ft = Object.defineProperty, Sn = (e, t) => {
36
+ let r = {};
37
+ for (var n in e)
38
+ Ft(r, n, {
39
+ get: e[n],
40
+ enumerable: !0
41
+ });
42
+ return t || Ft(r, Symbol.toStringTag, { value: "Module" }), r;
43
+ };
44
+ ee.__exportAll = Sn;
45
+ (function(e) {
46
+ var r = /* @__PURE__ */ ee.__exportAll({});
47
+ Object.defineProperty(e, "ContainerPlugin_exports", {
48
+ enumerable: !0,
49
+ get: function() {
50
+ return r;
51
+ }
52
+ });
53
+ })(lr);
54
+ var cr = {};
55
+ (function(e) {
56
+ var r = /* @__PURE__ */ ee.__exportAll({});
57
+ Object.defineProperty(e, "ContainerReferencePlugin_exports", {
58
+ enumerable: !0,
59
+ get: function() {
60
+ return r;
61
+ }
62
+ });
63
+ })(cr);
64
+ var ur = {};
65
+ (function(e) {
66
+ var r = /* @__PURE__ */ ee.__exportAll({});
67
+ Object.defineProperty(e, "ModuleFederationPlugin_exports", {
68
+ enumerable: !0,
69
+ get: function() {
70
+ return r;
71
+ }
72
+ });
73
+ })(ur);
74
+ var fr = {};
75
+ (function(e) {
76
+ var r = /* @__PURE__ */ ee.__exportAll({});
77
+ Object.defineProperty(e, "SharePlugin_exports", {
78
+ enumerable: !0,
79
+ get: function() {
80
+ return r;
81
+ }
82
+ });
83
+ })(fr);
84
+ var dr = {};
85
+ (function(e) {
86
+ var r = /* @__PURE__ */ ee.__exportAll({});
87
+ Object.defineProperty(e, "ConsumeSharedPlugin_exports", {
88
+ enumerable: !0,
89
+ get: function() {
90
+ return r;
91
+ }
92
+ });
93
+ })(dr);
94
+ var hr = {};
95
+ (function(e) {
96
+ var r = /* @__PURE__ */ ee.__exportAll({});
97
+ Object.defineProperty(e, "ProvideSharedPlugin_exports", {
98
+ enumerable: !0,
99
+ get: function() {
100
+ return r;
101
+ }
102
+ });
103
+ })(hr);
104
+ var z = {};
105
+ const bn = M, mr = !0;
106
+ function pr() {
107
+ return mr;
108
+ }
109
+ function Rn() {
110
+ return typeof navigator < "u" && navigator?.product === "ReactNative";
111
+ }
112
+ function Tn() {
113
+ try {
114
+ if (pr() && window.localStorage) return !!localStorage.getItem(bn.BROWSER_LOG_KEY);
115
+ } catch {
116
+ return !1;
117
+ }
118
+ return !1;
119
+ }
120
+ function In() {
121
+ return typeof process < "u" && process.env && process.env.FEDERATION_DEBUG ? !!process.env.FEDERATION_DEBUG : typeof FEDERATION_DEBUG < "u" && FEDERATION_DEBUG ? !0 : Tn();
122
+ }
123
+ const Nn = function() {
124
+ return typeof process < "u" && process.env ? process.env : {};
125
+ };
126
+ z.getProcessEnv = Nn;
127
+ z.isBrowserEnv = pr;
128
+ z.isBrowserEnvValue = mr;
129
+ z.isDebugMode = In;
130
+ z.isReactNativeEnv = Rn;
131
+ var D = {};
132
+ const E = M, ht = z, _r = "[ Federation Runtime ]", $n = (e, t, r = E.SEPARATOR) => {
133
+ const n = e.split(r), o = ht.getProcessEnv().NODE_ENV === "development" && t, s = "*", i = (a) => a.startsWith("http") || a.includes(E.MANIFEST_EXT);
134
+ if (n.length >= 2) {
135
+ let [a, ...c] = n;
136
+ e.startsWith(r) && (a = n.slice(0, 2).join(r), c = [o || n.slice(2).join(r)]);
137
+ let l = o || c.join(r);
138
+ return i(l) ? {
139
+ name: a,
140
+ entry: l
141
+ } : {
142
+ name: a,
143
+ version: l || s
144
+ };
145
+ } else if (n.length === 1) {
146
+ const [a] = n;
147
+ return o && i(o) ? {
148
+ name: a,
149
+ entry: o
150
+ } : {
151
+ name: a,
152
+ version: o || s
153
+ };
154
+ } else throw `Invalid entry value: ${e}`;
155
+ }, Mn = function(...e) {
156
+ return e.length ? e.reduce((t, r) => r ? t ? `${t}${E.SEPARATOR}${r}` : r : t, "") : "";
157
+ }, Nt = function(e, t = "", r = !1) {
158
+ try {
159
+ const n = r ? ".js" : "";
160
+ return `${t}${e.replace(new RegExp(`${E.NameTransformSymbol.AT}`, "g"), E.NameTransformMap[E.NameTransformSymbol.AT]).replace(new RegExp(`${E.NameTransformSymbol.HYPHEN}`, "g"), E.NameTransformMap[E.NameTransformSymbol.HYPHEN]).replace(new RegExp(`${E.NameTransformSymbol.SLASH}`, "g"), E.NameTransformMap[E.NameTransformSymbol.SLASH])}${n}`;
161
+ } catch (n) {
162
+ throw n;
163
+ }
164
+ }, Pn = function(e, t, r) {
165
+ try {
166
+ let n = e;
167
+ if (t) {
168
+ if (!n.startsWith(t)) return n;
169
+ n = n.replace(new RegExp(t, "g"), "");
170
+ }
171
+ return n = n.replace(new RegExp(`${E.NameTransformMap[E.NameTransformSymbol.AT]}`, "g"), E.EncodedNameTransformMap[E.NameTransformMap[E.NameTransformSymbol.AT]]).replace(new RegExp(`${E.NameTransformMap[E.NameTransformSymbol.SLASH]}`, "g"), E.EncodedNameTransformMap[E.NameTransformMap[E.NameTransformSymbol.SLASH]]).replace(new RegExp(`${E.NameTransformMap[E.NameTransformSymbol.HYPHEN]}`, "g"), E.EncodedNameTransformMap[E.NameTransformMap[E.NameTransformSymbol.HYPHEN]]), r && (n = n.replace(".js", "")), n;
172
+ } catch (n) {
173
+ throw n;
174
+ }
175
+ }, vn = (e, t) => {
176
+ if (!e) return "";
177
+ let r = e;
178
+ return r === "." && (r = "default_export"), r.startsWith("./") && (r = r.replace("./", "")), Nt(r, "__federation_expose_", t);
179
+ }, On = (e, t) => e ? Nt(e, "__federation_shared_", t) : "", An = (e, t) => {
180
+ if ("getPublicPath" in e) {
181
+ let r;
182
+ return e.getPublicPath.startsWith("function") ? r = new Function("return " + e.getPublicPath)()() : r = new Function(e.getPublicPath)(), `${r}${t}`;
183
+ } else return "publicPath" in e ? !ht.isBrowserEnv() && !ht.isReactNativeEnv() && "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), "");
184
+ }, kn = (e, t) => {
185
+ e || gr(t);
186
+ }, gr = (e) => {
187
+ throw new Error(`${_r}: ${e}`);
188
+ }, wn = (e) => {
189
+ console.warn(`${_r}: ${e}`);
190
+ };
191
+ function Fn(e) {
192
+ try {
193
+ return JSON.stringify(e, null, 2);
194
+ } catch {
195
+ return "";
196
+ }
197
+ }
198
+ const Ln = /^([\d^=v<>~]|[*xX]$)/;
199
+ function Dn(e) {
200
+ return Ln.test(e);
201
+ }
202
+ D.assert = kn;
203
+ D.composeKeyWithSeparator = Mn;
204
+ D.decodeName = Pn;
205
+ D.encodeName = Nt;
206
+ D.error = gr;
207
+ D.generateExposeFilename = vn;
208
+ D.generateShareFilename = On;
209
+ D.getResourceUrl = An;
210
+ D.isRequiredVersion = Dn;
211
+ D.parseEntry = $n;
212
+ D.safeToString = Fn;
213
+ D.warn = wn;
214
+ var ce = {};
215
+ const ge = M, ae = (e, t) => {
216
+ if (!e) return t;
217
+ const n = ((o) => {
218
+ if (o === ".") return "";
219
+ if (o.startsWith("./")) return o.replace("./", "");
220
+ if (o.startsWith("/")) {
221
+ const s = o.slice(1);
222
+ return s.endsWith("/") ? s.slice(0, -1) : s;
223
+ }
224
+ return o;
225
+ })(e);
226
+ return n ? n.endsWith("/") ? `${n}${t}` : `${n}/${t}` : t;
227
+ };
228
+ function yr(e) {
229
+ return e.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
230
+ }
231
+ function Hn(e, t = {}) {
232
+ const { remotes: r = {}, overrides: n = {}, version: o } = t;
233
+ let s;
234
+ const i = () => "publicPath" in e.metaData ? (e.metaData.publicPath === "auto" || e.metaData.publicPath === "") && o ? yr(o) : e.metaData.publicPath : e.metaData.getPublicPath, a = Object.keys(n);
235
+ let c = {};
236
+ Object.keys(r).length || (c = e.remotes?.reduce((_, A) => {
237
+ let w;
238
+ const P = A.federationContainerName;
239
+ return a.includes(P) ? w = n[P] : "version" in A ? w = A.version : w = A.entry, _[P] = { matchedVersion: w }, _;
240
+ }, {}) || {}), Object.keys(r).forEach((_) => c[_] = { matchedVersion: a.includes(_) ? n[_] : r[_] });
241
+ const { remoteEntry: { path: l, name: u, type: f }, types: d = {
242
+ path: "",
243
+ name: "",
244
+ zip: "",
245
+ api: ""
246
+ }, buildInfo: { buildVersion: h }, globalName: p, ssrRemoteEntry: m } = e.metaData, { exposes: y } = e;
247
+ let g = {
248
+ version: o || "",
249
+ buildVersion: h,
250
+ globalName: p,
251
+ remoteEntry: ae(l, u),
252
+ remoteEntryType: f,
253
+ remoteTypes: ae(d.path, d.name),
254
+ remoteTypesZip: d.zip || "",
255
+ remoteTypesAPI: d.api || "",
256
+ remotesInfo: c,
257
+ shared: e?.shared.map((_) => ({
258
+ assets: _.assets,
259
+ sharedName: _.name,
260
+ version: _.version,
261
+ usedExports: _.referenceExports || []
262
+ })),
263
+ modules: y?.map((_) => ({
264
+ moduleName: _.name,
265
+ modulePath: _.path,
266
+ assets: _.assets
267
+ }))
268
+ };
269
+ if ("publicPath" in e.metaData ? (s = {
270
+ ...g,
271
+ publicPath: i()
272
+ }, typeof e.metaData.ssrPublicPath == "string" && (s.ssrPublicPath = e.metaData.ssrPublicPath)) : s = {
273
+ ...g,
274
+ getPublicPath: i()
275
+ }, m) {
276
+ const _ = ae(m.path, m.name);
277
+ s.ssrRemoteEntry = _, s.ssrRemoteEntryType = m.type || "commonjs-module";
278
+ }
279
+ return s;
280
+ }
281
+ function qn(e) {
282
+ return !!("remoteEntry" in e && e.remoteEntry.includes(ge.MANIFEST_EXT));
283
+ }
284
+ function Cn(e) {
285
+ if (!e) return {
286
+ statsFileName: ge.StatsFileName,
287
+ manifestFileName: ge.ManifestFileName
288
+ };
289
+ let t = typeof e == "boolean" ? "" : e.filePath || "", r = typeof e == "boolean" ? "" : e.fileName || "";
290
+ const n = ".json", o = (a) => a.endsWith(n) ? a : `${a}${n}`, s = (a, c) => a.replace(n, `${c}${n}`), i = r ? o(r) : ge.ManifestFileName;
291
+ return {
292
+ statsFileName: ae(t, r ? s(i, "-stats") : ge.StatsFileName),
293
+ manifestFileName: ae(t, i)
294
+ };
295
+ }
296
+ ce.generateSnapshotFromManifest = Hn;
297
+ ce.getManifestFileName = Cn;
298
+ ce.inferAutoPublicPath = yr;
299
+ ce.isManifestProvider = qn;
300
+ ce.simpleJoinRemoteEntry = ae;
301
+ var ue = {};
302
+ const Lt = z, Er = "[ Module Federation ]", pe = console, Un = [
303
+ "logger.ts",
304
+ "logger.js",
305
+ "captureStackTrace",
306
+ "Logger.emit",
307
+ "Logger.log",
308
+ "Logger.info",
309
+ "Logger.warn",
310
+ "Logger.error",
311
+ "Logger.debug"
312
+ ];
313
+ function Gn() {
314
+ try {
315
+ const e = (/* @__PURE__ */ new Error()).stack;
316
+ if (!e) return;
317
+ const [, ...t] = e.split(`
318
+ `), r = t.filter((n) => !Un.some((o) => n.includes(o)));
319
+ return r.length ? `Stack trace:
320
+ ${r.slice(0, 5).join(`
321
+ `)}` : void 0;
322
+ } catch {
323
+ return;
324
+ }
325
+ }
326
+ var Sr = class {
327
+ constructor(e, t = pe) {
328
+ this.prefix = e, this.delegate = t ?? pe;
329
+ }
330
+ setPrefix(e) {
331
+ this.prefix = e;
332
+ }
333
+ setDelegate(e) {
334
+ this.delegate = e ?? pe;
335
+ }
336
+ emit(e, t) {
337
+ const r = this.delegate, n = Lt.isDebugMode() ? Gn() : void 0, o = n ? [...t, n] : t, s = (() => {
338
+ switch (e) {
339
+ case "log":
340
+ return ["log", "info"];
341
+ case "info":
342
+ return ["info", "log"];
343
+ case "warn":
344
+ return [
345
+ "warn",
346
+ "info",
347
+ "log"
348
+ ];
349
+ case "error":
350
+ return [
351
+ "error",
352
+ "warn",
353
+ "log"
354
+ ];
355
+ default:
356
+ return ["debug", "log"];
357
+ }
358
+ })();
359
+ for (const i of s) {
360
+ const a = r[i];
361
+ if (typeof a == "function") {
362
+ a.call(r, this.prefix, ...o);
363
+ return;
364
+ }
365
+ }
366
+ for (const i of s) {
367
+ const a = pe[i];
368
+ if (typeof a == "function") {
369
+ a.call(pe, this.prefix, ...o);
370
+ return;
371
+ }
372
+ }
373
+ }
374
+ log(...e) {
375
+ this.emit("log", e);
376
+ }
377
+ warn(...e) {
378
+ this.emit("warn", e);
379
+ }
380
+ error(...e) {
381
+ this.emit("error", e);
382
+ }
383
+ success(...e) {
384
+ this.emit("info", e);
385
+ }
386
+ info(...e) {
387
+ this.emit("info", e);
388
+ }
389
+ ready(...e) {
390
+ this.emit("info", e);
391
+ }
392
+ debug(...e) {
393
+ Lt.isDebugMode() && this.emit("debug", e);
394
+ }
395
+ };
396
+ function br(e) {
397
+ return new Sr(e);
398
+ }
399
+ function Rr(e) {
400
+ const t = new Sr(e);
401
+ return Object.defineProperty(t, "__mf_infrastructure_logger__", {
402
+ value: !0,
403
+ enumerable: !1,
404
+ configurable: !1
405
+ }), t;
406
+ }
407
+ function Wn(e, t, r) {
408
+ if (e.__mf_infrastructure_logger__ && t?.getInfrastructureLogger)
409
+ try {
410
+ const n = t.getInfrastructureLogger(r);
411
+ n && typeof n == "object" && (typeof n.log == "function" || typeof n.info == "function" || typeof n.warn == "function" || typeof n.error == "function") && e.setDelegate(n);
412
+ } catch {
413
+ e.setDelegate(void 0);
414
+ }
415
+ }
416
+ const Bn = br(Er), Vn = Rr(Er);
417
+ ue.bindLoggerToCompiler = Wn;
418
+ ue.createInfrastructureLogger = Rr;
419
+ ue.createLogger = br;
420
+ ue.infrastructureLogger = Vn;
421
+ ue.logger = Bn;
422
+ var fe = {};
423
+ const jn = D;
424
+ async function $t(e, t) {
425
+ try {
426
+ return await e();
427
+ } catch (r) {
428
+ !t && jn.warn(r);
429
+ return;
430
+ }
431
+ }
432
+ function We(e, t) {
433
+ const r = /^(https?:)?\/\//i;
434
+ return e.replace(r, "").replace(/\/$/, "") === t.replace(r, "").replace(/\/$/, "");
435
+ }
436
+ function Tr(e) {
437
+ let t = null, r = !0, n = 2e4, o;
438
+ const s = document.getElementsByTagName("script");
439
+ for (let l = 0; l < s.length; l++) {
440
+ const u = s[l], f = u.getAttribute("src");
441
+ if (f && We(f, e.url)) {
442
+ t = u, r = !1;
443
+ break;
444
+ }
445
+ }
446
+ if (!t) {
447
+ const l = e.attrs;
448
+ t = document.createElement("script"), t.type = l?.type === "module" ? "module" : "text/javascript";
449
+ let u;
450
+ 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), l && !u && Object.keys(l).forEach((f) => {
451
+ t && (f === "async" || f === "defer" ? t[f] = l[f] : t.getAttribute(f) || t.setAttribute(f, l[f]));
452
+ });
453
+ }
454
+ let i = null;
455
+ const a = typeof window < "u" ? (l) => {
456
+ if (l.filename && We(l.filename, e.url)) {
457
+ const u = /* @__PURE__ */ new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${l.message} (${l.filename}:${l.lineno}:${l.colno})`);
458
+ u.name = "ScriptExecutionError", i = u;
459
+ }
460
+ } : null;
461
+ a && window.addEventListener("error", a);
462
+ const c = async (l, u) => {
463
+ clearTimeout(o), a && window.removeEventListener("error", a);
464
+ const f = () => {
465
+ if (u?.type === "error") {
466
+ const d = /* @__PURE__ */ new Error(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.)`);
467
+ d.name = "ScriptNetworkError", e?.onErrorCallback && e?.onErrorCallback(d);
468
+ } else i ? e?.onErrorCallback && e?.onErrorCallback(i) : e?.cb && e?.cb();
469
+ };
470
+ if (t && (t.onerror = null, t.onload = null, $t(() => {
471
+ const { needDeleteScript: d = !0 } = e;
472
+ d && t?.parentNode && t.parentNode.removeChild(t);
473
+ }), l && typeof l == "function")) {
474
+ const d = l(u);
475
+ if (d instanceof Promise) {
476
+ const h = await d;
477
+ return f(), h;
478
+ }
479
+ return f(), d;
480
+ }
481
+ f();
482
+ };
483
+ return t.onerror = c.bind(null, t.onerror), t.onload = c.bind(null, t.onload), o = setTimeout(() => {
484
+ c(null, {
485
+ type: "error",
486
+ isTimeout: !0
487
+ });
488
+ }, n), {
489
+ script: t,
490
+ needAttach: r
491
+ };
492
+ }
493
+ function xn(e) {
494
+ let t = null, r = !0;
495
+ const n = document.getElementsByTagName("link");
496
+ for (let s = 0; s < n.length; s++) {
497
+ const i = n[s], a = i.getAttribute("href"), c = i.getAttribute("rel");
498
+ if (a && We(a, e.url) && c === e.attrs.rel) {
499
+ t = i, r = !1;
500
+ break;
501
+ }
502
+ }
503
+ if (!t) {
504
+ t = document.createElement("link"), t.setAttribute("href", e.url);
505
+ let s;
506
+ const i = e.attrs;
507
+ e.createLinkHook && (s = e.createLinkHook(e.url, i), s instanceof HTMLLinkElement && (t = s)), i && !s && Object.keys(i).forEach((a) => {
508
+ t && !t.getAttribute(a) && t.setAttribute(a, i[a]);
509
+ });
510
+ }
511
+ const o = (s, i) => {
512
+ const a = () => {
513
+ i?.type === "error" ? e?.onErrorCallback && e?.onErrorCallback(i) : e?.cb && e?.cb();
514
+ };
515
+ if (t && (t.onerror = null, t.onload = null, $t(() => {
516
+ const { needDeleteLink: c = !0 } = e;
517
+ c && t?.parentNode && t.parentNode.removeChild(t);
518
+ }), s)) {
519
+ const c = s(i);
520
+ return a(), c;
521
+ }
522
+ a();
523
+ };
524
+ return t.onerror = o.bind(null, t.onerror), t.onload = o.bind(null, t.onload), {
525
+ link: t,
526
+ needAttach: r
527
+ };
528
+ }
529
+ function Xn(e, t) {
530
+ const { attrs: r = {}, createScriptHook: n } = t;
531
+ return new Promise((o, s) => {
532
+ const { script: i, needAttach: a } = Tr({
533
+ url: e,
534
+ cb: o,
535
+ onErrorCallback: s,
536
+ attrs: {
537
+ fetchpriority: "high",
538
+ ...r
539
+ },
540
+ createScriptHook: n,
541
+ needDeleteScript: !0
542
+ });
543
+ a && document.head.appendChild(i);
544
+ });
545
+ }
546
+ fe.createLink = xn;
547
+ fe.createScript = Tr;
548
+ fe.isStaticResourcesEqual = We;
549
+ fe.loadScript = Xn;
550
+ fe.safeWrapper = $t;
551
+ var Mt = {};
552
+ const Kn = (e, t, r, n) => {
553
+ t(/* @__PURE__ */ new Error("createScriptNode is disabled in non-Node.js environment"));
554
+ }, Yn = (e, t) => {
555
+ throw new Error("loadScriptNode is disabled in non-Node.js environment");
556
+ };
557
+ Mt.createScriptNode = Kn;
558
+ Mt.loadScriptNode = Yn;
559
+ var Ir = {};
560
+ function zn(e, t, r) {
561
+ return function(n) {
562
+ if (n === !1) return !1;
563
+ if (typeof n > "u") return e ? t : !1;
564
+ if (n === !0) return t;
565
+ if (n && typeof n == "object") return {
566
+ ...t,
567
+ ...n
568
+ };
569
+ throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`);
570
+ };
571
+ }
572
+ Ir.normalizeOptions = zn;
573
+ var Nr = {};
574
+ const Jn = (e) => e;
575
+ Nr.createModuleFederationConfig = Jn;
576
+ (function(e) {
577
+ Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
578
+ const t = M, r = lr, n = cr, o = ur, s = fr, i = dr, a = hr, c = z, l = D, u = ce, f = ue, d = fe, h = Mt, p = Ir, m = Nr;
579
+ e.BROWSER_LOG_KEY = t.BROWSER_LOG_KEY, e.ENCODE_NAME_PREFIX = t.ENCODE_NAME_PREFIX, e.EncodedNameTransformMap = t.EncodedNameTransformMap, e.FederationModuleManifest = t.FederationModuleManifest, e.MANIFEST_EXT = t.MANIFEST_EXT, e.MFModuleType = t.MFModuleType, e.MODULE_DEVTOOL_IDENTIFIER = t.MODULE_DEVTOOL_IDENTIFIER, e.ManifestFileName = t.ManifestFileName, e.NameTransformMap = t.NameTransformMap, e.NameTransformSymbol = t.NameTransformSymbol, e.SEPARATOR = t.SEPARATOR, e.StatsFileName = t.StatsFileName, e.TEMP_DIR = t.TEMP_DIR, e.TreeShakingStatus = t.TreeShakingStatus, e.assert = l.assert, e.bindLoggerToCompiler = f.bindLoggerToCompiler, e.composeKeyWithSeparator = l.composeKeyWithSeparator, Object.defineProperty(e, "consumeSharedPlugin", {
580
+ enumerable: !0,
581
+ get: function() {
582
+ return i.ConsumeSharedPlugin_exports;
583
+ }
584
+ }), Object.defineProperty(e, "containerPlugin", {
585
+ enumerable: !0,
586
+ get: function() {
587
+ return r.ContainerPlugin_exports;
588
+ }
589
+ }), Object.defineProperty(e, "containerReferencePlugin", {
590
+ enumerable: !0,
591
+ get: function() {
592
+ return n.ContainerReferencePlugin_exports;
593
+ }
594
+ }), e.createInfrastructureLogger = f.createInfrastructureLogger, e.createLink = d.createLink, e.createLogger = f.createLogger, e.createModuleFederationConfig = m.createModuleFederationConfig, e.createScript = d.createScript, e.createScriptNode = h.createScriptNode, e.decodeName = l.decodeName, e.encodeName = l.encodeName, e.error = l.error, e.generateExposeFilename = l.generateExposeFilename, e.generateShareFilename = l.generateShareFilename, e.generateSnapshotFromManifest = u.generateSnapshotFromManifest, e.getManifestFileName = u.getManifestFileName, e.getProcessEnv = c.getProcessEnv, e.getResourceUrl = l.getResourceUrl, e.inferAutoPublicPath = u.inferAutoPublicPath, e.infrastructureLogger = f.infrastructureLogger, e.isBrowserEnv = c.isBrowserEnv, e.isBrowserEnvValue = c.isBrowserEnvValue, e.isDebugMode = c.isDebugMode, e.isManifestProvider = u.isManifestProvider, e.isReactNativeEnv = c.isReactNativeEnv, e.isRequiredVersion = l.isRequiredVersion, e.isStaticResourcesEqual = d.isStaticResourcesEqual, e.loadScript = d.loadScript, e.loadScriptNode = h.loadScriptNode, e.logger = f.logger, Object.defineProperty(e, "moduleFederationPlugin", {
595
+ enumerable: !0,
596
+ get: function() {
597
+ return o.ModuleFederationPlugin_exports;
598
+ }
599
+ }), e.normalizeOptions = p.normalizeOptions, e.parseEntry = l.parseEntry, Object.defineProperty(e, "provideSharedPlugin", {
600
+ enumerable: !0,
601
+ get: function() {
602
+ return a.ProvideSharedPlugin_exports;
603
+ }
604
+ }), e.safeToString = l.safeToString, e.safeWrapper = d.safeWrapper, Object.defineProperty(e, "sharePlugin", {
605
+ enumerable: !0,
606
+ get: function() {
607
+ return s.SharePlugin_exports;
608
+ }
609
+ }), e.simpleJoinRemoteEntry = u.simpleJoinRemoteEntry, e.warn = l.warn;
610
+ })(L);
611
+ var $r = {}, Pt = {};
612
+ const Zn = (e) => `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`, Qn = (e, t, r, n) => {
613
+ const o = [`${[t[e]]} #${e}`];
614
+ return r && o.push(`args: ${JSON.stringify(r)}`), o.push(Zn(e)), n && o.push(`Original Error Message:
615
+ ${n}`), o.join(`
616
+ `);
617
+ };
618
+ Pt.getShortErrorMsg = Qn;
619
+ (function(e) {
620
+ Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
621
+ const t = Pt;
622
+ function r(n, o, s, i, a, c) {
623
+ return i(t.getShortErrorMsg(n, o, s, a));
624
+ }
625
+ e.logAndReport = r;
626
+ })($r);
627
+ let eo = L, to = $r;
628
+ const Z = "[ Federation Runtime ]", mt = (0, eo.createLogger)(Z);
629
+ function ro(e, t, r, n, o) {
630
+ e || (r !== void 0 ? pt(t, r, n, void 0, o) : pt(t));
631
+ }
632
+ function pt(e, t, r, n, o) {
633
+ if (t !== void 0) return (0, to.logAndReport)(e, t, r ?? {}, (i) => {
634
+ throw new Error(`${Z}: ${i}`);
635
+ }, n, o);
636
+ const s = e;
637
+ throw s instanceof Error ? (s.message.startsWith(Z) || (s.message = `${Z}: ${s.message}`), s) : new Error(`${Z}: ${s}`);
638
+ }
639
+ function no(e) {
640
+ e instanceof Error && (e.message.startsWith(Z) || (e.message = `${Z}: ${e.message}`)), mt.warn(e);
641
+ }
642
+ I.assert = ro;
643
+ I.error = pt;
644
+ I.logger = mt;
645
+ I.warn = no;
646
+ var R = {};
647
+ const oo = I;
648
+ let Dt = L;
649
+ function so(e, t) {
650
+ return e.findIndex((r) => r === t) === -1 && e.push(t), e;
651
+ }
652
+ function io(e) {
653
+ return "version" in e && e.version ? `${e.name}:${e.version}` : "entry" in e && e.entry ? `${e.name}:${e.entry}` : `${e.name}`;
654
+ }
655
+ function ao(e) {
656
+ return typeof e.entry < "u";
657
+ }
658
+ function lo(e) {
659
+ return !e.entry.includes(".json");
660
+ }
661
+ async function co(e, t) {
662
+ try {
663
+ return await e();
664
+ } catch (r) {
665
+ !t && oo.warn(r);
666
+ return;
667
+ }
668
+ }
669
+ function uo(e) {
670
+ return e && typeof e == "object";
671
+ }
672
+ const Mr = Object.prototype.toString;
673
+ function fo(e) {
674
+ return Mr.call(e) === "[object Object]";
675
+ }
676
+ function ho(e, t) {
677
+ const r = /^(https?:)?\/\//i;
678
+ return e.replace(r, "").replace(/\/$/, "") === t.replace(r, "").replace(/\/$/, "");
679
+ }
680
+ function mo(e) {
681
+ return Array.isArray(e) ? e : [e];
682
+ }
683
+ function po(e) {
684
+ const t = {
685
+ url: "",
686
+ type: "global",
687
+ globalName: ""
688
+ };
689
+ return Dt.isBrowserEnvValue || (0, Dt.isReactNativeEnv)() || !("ssrRemoteEntry" in e) ? "remoteEntry" in e ? {
690
+ url: e.remoteEntry,
691
+ type: e.remoteEntryType,
692
+ globalName: e.globalName
693
+ } : t : "ssrRemoteEntry" in e ? {
694
+ url: e.ssrRemoteEntry || t.url,
695
+ type: e.ssrRemoteEntryType || t.type,
696
+ globalName: e.globalName
697
+ } : t;
698
+ }
699
+ const _o = (e, t) => {
700
+ let r;
701
+ return e.endsWith("/") ? r = e.slice(0, -1) : r = e, t.startsWith(".") && (t = t.slice(1)), r = r + t, r;
702
+ };
703
+ R.addUniqueItem = so;
704
+ R.arrayOptions = mo;
705
+ R.getFMId = io;
706
+ R.getRemoteEntryInfoFromSnapshot = po;
707
+ R.isObject = uo;
708
+ R.isPlainObject = fo;
709
+ R.isPureRemoteEntry = lo;
710
+ R.isRemoteInfoWithEntry = ao;
711
+ R.isStaticResourcesEqual = ho;
712
+ R.objectToString = Mr;
713
+ R.processModuleAlias = _o;
714
+ R.safeWrapper = co;
715
+ var S = {};
716
+ const Pr = I, _t = R;
717
+ let go = L;
718
+ const $ = typeof globalThis == "object" ? globalThis : window, H = (() => {
719
+ try {
720
+ return document.defaultView;
721
+ } catch {
722
+ return $;
723
+ }
724
+ })(), yo = H;
725
+ function qe(e, t, r) {
726
+ Object.defineProperty(e, t, {
727
+ value: r,
728
+ configurable: !1,
729
+ writable: !0
730
+ });
731
+ }
732
+ function Ce(e, t) {
733
+ return Object.hasOwnProperty.call(e, t);
734
+ }
735
+ Ce($, "__GLOBAL_LOADING_REMOTE_ENTRY__") || qe($, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
736
+ const gt = $.__GLOBAL_LOADING_REMOTE_ENTRY__;
737
+ function vr(e) {
738
+ Ce(e, "__VMOK__") && !Ce(e, "__FEDERATION__") && qe(e, "__FEDERATION__", e.__VMOK__), Ce(e, "__FEDERATION__") || (qe(e, "__FEDERATION__", {
739
+ __GLOBAL_PLUGIN__: [],
740
+ __INSTANCES__: [],
741
+ moduleInfo: {},
742
+ __SHARE__: {},
743
+ __MANIFEST_LOADING__: {},
744
+ __PRELOADED_MAP__: /* @__PURE__ */ new Map()
745
+ }), qe(e, "__VMOK__", e.__FEDERATION__)), e.__FEDERATION__.__GLOBAL_PLUGIN__ ??= [], e.__FEDERATION__.__INSTANCES__ ??= [], e.__FEDERATION__.moduleInfo ??= {}, e.__FEDERATION__.__SHARE__ ??= {}, e.__FEDERATION__.__MANIFEST_LOADING__ ??= {}, e.__FEDERATION__.__PRELOADED_MAP__ ??= /* @__PURE__ */ new Map();
746
+ }
747
+ vr($);
748
+ vr(H);
749
+ function Eo() {
750
+ $.__FEDERATION__.__GLOBAL_PLUGIN__ = [], $.__FEDERATION__.__INSTANCES__ = [], $.__FEDERATION__.moduleInfo = {}, $.__FEDERATION__.__SHARE__ = {}, $.__FEDERATION__.__MANIFEST_LOADING__ = {}, Object.keys(gt).forEach((e) => {
751
+ delete gt[e];
752
+ });
753
+ }
754
+ function So(e) {
755
+ $.__FEDERATION__.__INSTANCES__.push(e);
756
+ }
757
+ function bo() {
758
+ return $.__FEDERATION__.__DEBUG_CONSTRUCTOR__;
759
+ }
760
+ function Ro(e, t = (0, go.isDebugMode)()) {
761
+ t && ($.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, $.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.4.0");
762
+ }
763
+ function yt(e, t) {
764
+ if (typeof t == "string") {
765
+ if (e[t]) return {
766
+ value: e[t],
767
+ key: t
768
+ };
769
+ {
770
+ const r = Object.keys(e);
771
+ for (const n of r) {
772
+ const [o, s] = n.split(":"), i = `${o}:${t}`, a = e[i];
773
+ if (a) return {
774
+ value: a,
775
+ key: i
776
+ };
777
+ }
778
+ return {
779
+ value: void 0,
780
+ key: t
781
+ };
782
+ }
783
+ } else Pr.error(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`);
784
+ }
785
+ const To = () => H.__FEDERATION__.moduleInfo, Or = (e, t) => {
786
+ const r = yt(t, _t.getFMId(e)).value;
787
+ if (r && !r.version && "version" in e && e.version && (r.version = e.version), r) return r;
788
+ if ("version" in e && e.version) {
789
+ const { version: n, ...o } = e, s = _t.getFMId(o), i = yt(H.__FEDERATION__.moduleInfo, s).value;
790
+ if (i?.version === n) return i;
791
+ }
792
+ }, Io = (e) => Or(e, H.__FEDERATION__.moduleInfo), No = (e, t) => {
793
+ const r = _t.getFMId(e);
794
+ return H.__FEDERATION__.moduleInfo[r] = t, H.__FEDERATION__.moduleInfo;
795
+ }, $o = (e) => (H.__FEDERATION__.moduleInfo = {
796
+ ...H.__FEDERATION__.moduleInfo,
797
+ ...e
798
+ }, () => {
799
+ const t = Object.keys(e);
800
+ for (const r of t) delete H.__FEDERATION__.moduleInfo[r];
801
+ }), Mo = (e, t) => {
802
+ const r = t || `__FEDERATION_${e}:custom__`;
803
+ return {
804
+ remoteEntryKey: r,
805
+ entryExports: $[r]
806
+ };
807
+ }, Po = (e) => {
808
+ const { __GLOBAL_PLUGIN__: t } = H.__FEDERATION__;
809
+ e.forEach((r) => {
810
+ t.findIndex((n) => n.name === r.name) === -1 ? t.push(r) : Pr.warn(`The plugin ${r.name} has been registered.`);
811
+ });
812
+ }, vo = () => H.__FEDERATION__.__GLOBAL_PLUGIN__, Oo = (e) => $.__FEDERATION__.__PRELOADED_MAP__.get(e), Ao = (e) => $.__FEDERATION__.__PRELOADED_MAP__.set(e, !0);
813
+ S.CurrentGlobal = $;
814
+ S.Global = yo;
815
+ S.addGlobalSnapshot = $o;
816
+ S.getGlobalFederationConstructor = bo;
817
+ S.getGlobalHostPlugins = vo;
818
+ S.getGlobalSnapshot = To;
819
+ S.getGlobalSnapshotInfoByModuleInfo = Io;
820
+ S.getInfoWithoutType = yt;
821
+ S.getPreloaded = Oo;
822
+ S.getRemoteEntryExports = Mo;
823
+ S.getTargetSnapshotInfoByModuleInfo = Or;
824
+ S.globalLoading = gt;
825
+ S.nativeGlobal = H;
826
+ S.registerGlobalPlugins = Po;
827
+ S.resetFederationGlobalInfo = Eo;
828
+ S.setGlobalFederationConstructor = Ro;
829
+ S.setGlobalFederationInstance = So;
830
+ S.setGlobalSnapshotInfoByModuleInfo = No;
831
+ S.setPreloaded = Ao;
832
+ var vt = {}, te = {}, G = {};
833
+ const Ht = "[0-9A-Za-z-]+", Ot = `(?:\\+(${Ht}(?:\\.${Ht})*))`, Se = "0|[1-9]\\d*", Ue = "[0-9]+", Ar = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", qt = `(?:${Ue}|${Ar})`, ko = `(?:-?(${qt}(?:\\.${qt})*))`, Ct = `(?:${Se}|${Ar})`, kr = `(?:-(${Ct}(?:\\.${Ct})*))`, Je = `${Se}|x|X|\\*`, le = `[v=\\s]*(${Je})(?:\\.(${Je})(?:\\.(${Je})(?:${kr})?${Ot}?)?)?`, wo = `^\\s*(${le})\\s+-\\s+(${le})\\s*$`, Fo = `[v=\\s]*${`(${Ue})\\.(${Ue})\\.(${Ue})`}${ko}?${Ot}?`, At = "((?:<|>)?=?)", Lo = `(\\s*)${At}\\s*(${Fo}|${le})`, wr = "(?:~>?)", Do = `(\\s*)${wr}\\s+`, Fr = "(?:\\^)", Ho = `(\\s*)${Fr}\\s+`, qo = "(<|>)?=?\\s*\\*", Co = `^${Fr}${le}$`, Uo = `v?${`(${Se})\\.(${Se})\\.(${Se})`}${kr}?${Ot}?`, Go = `^${wr}${le}$`, Wo = `^${At}\\s*${le}$`, Bo = `^${At}\\s*(${Uo})$|^$`, Vo = "^\\s*>=\\s*0.0.0\\s*$";
834
+ G.caret = Co;
835
+ G.caretTrim = Ho;
836
+ G.comparator = Bo;
837
+ G.comparatorTrim = Lo;
838
+ G.gte0 = Vo;
839
+ G.hyphenRange = wo;
840
+ G.star = qo;
841
+ G.tilde = Go;
842
+ G.tildeTrim = Do;
843
+ G.xRange = Wo;
844
+ const jo = G;
845
+ function Lr(e) {
846
+ return new RegExp(e);
847
+ }
848
+ function xo(e) {
849
+ return !e || e.toLowerCase() === "x" || e === "*";
850
+ }
851
+ function Xo(...e) {
852
+ return (t) => e.reduce((r, n) => n(r), t);
853
+ }
854
+ function Ko(e) {
855
+ return e.match(Lr(jo.comparator));
856
+ }
857
+ function Yo(e, t, r, n) {
858
+ const o = `${e}.${t}.${r}`;
859
+ return n ? `${o}-${n}` : o;
860
+ }
861
+ te.combineVersion = Yo;
862
+ te.extractComparator = Ko;
863
+ te.isXVersion = xo;
864
+ te.parseRegex = Lr;
865
+ te.pipe = Xo;
866
+ var V = {};
867
+ const X = G, b = te;
868
+ function zo(e) {
869
+ return e.replace(b.parseRegex(X.hyphenRange), (t, r, n, o, s, i, a, c, l, u, f, d) => (b.isXVersion(n) ? r = "" : b.isXVersion(o) ? r = `>=${n}.0.0` : b.isXVersion(s) ? r = `>=${n}.${o}.0` : r = `>=${r}`, b.isXVersion(l) ? c = "" : b.isXVersion(u) ? c = `<${Number(l) + 1}.0.0-0` : b.isXVersion(f) ? c = `<${l}.${Number(u) + 1}.0-0` : d ? c = `<=${l}.${u}.${f}-${d}` : c = `<=${c}`, `${r} ${c}`.trim()));
870
+ }
871
+ function Jo(e) {
872
+ return e.replace(b.parseRegex(X.comparatorTrim), "$1$2$3");
873
+ }
874
+ function Zo(e) {
875
+ return e.replace(b.parseRegex(X.tildeTrim), "$1~");
876
+ }
877
+ function Qo(e) {
878
+ return e.replace(b.parseRegex(X.caretTrim), "$1^");
879
+ }
880
+ function es(e) {
881
+ return e.trim().split(/\s+/).map((t) => t.replace(b.parseRegex(X.caret), (r, n, o, s, i) => b.isXVersion(n) ? "" : b.isXVersion(o) ? `>=${n}.0.0 <${Number(n) + 1}.0.0-0` : b.isXVersion(s) ? n === "0" ? `>=${n}.${o}.0 <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.0 <${Number(n) + 1}.0.0-0` : i ? n === "0" ? o === "0" ? `>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s) + 1}-0` : `>=${n}.${o}.${s}-${i} <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.${s}-${i} <${Number(n) + 1}.0.0-0` : n === "0" ? o === "0" ? `>=${n}.${o}.${s} <${n}.${o}.${Number(s) + 1}-0` : `>=${n}.${o}.${s} <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.${s} <${Number(n) + 1}.0.0-0`)).join(" ");
882
+ }
883
+ function ts(e) {
884
+ return e.trim().split(/\s+/).map((t) => t.replace(b.parseRegex(X.tilde), (r, n, o, s, i) => b.isXVersion(n) ? "" : b.isXVersion(o) ? `>=${n}.0.0 <${Number(n) + 1}.0.0-0` : b.isXVersion(s) ? `>=${n}.${o}.0 <${n}.${Number(o) + 1}.0-0` : i ? `>=${n}.${o}.${s}-${i} <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.${s} <${n}.${Number(o) + 1}.0-0`)).join(" ");
885
+ }
886
+ function rs(e) {
887
+ return e.split(/\s+/).map((t) => t.trim().replace(b.parseRegex(X.xRange), (r, n, o, s, i, a) => {
888
+ const c = b.isXVersion(o), l = c || b.isXVersion(s), u = l || b.isXVersion(i);
889
+ return n === "=" && u && (n = ""), a = "", c ? n === ">" || n === "<" ? "<0.0.0-0" : "*" : n && u ? (l && (s = 0), i = 0, n === ">" ? (n = ">=", l ? (o = Number(o) + 1, s = 0, i = 0) : (s = Number(s) + 1, i = 0)) : n === "<=" && (n = "<", l ? o = Number(o) + 1 : s = Number(s) + 1), n === "<" && (a = "-0"), `${n + o}.${s}.${i}${a}`) : l ? `>=${o}.0.0${a} <${Number(o) + 1}.0.0-0` : u ? `>=${o}.${s}.0${a} <${o}.${Number(s) + 1}.0-0` : r;
890
+ })).join(" ");
891
+ }
892
+ function ns(e) {
893
+ return e.trim().replace(b.parseRegex(X.star), "");
894
+ }
895
+ function os(e) {
896
+ return e.trim().replace(b.parseRegex(X.gte0), "");
897
+ }
898
+ V.parseCaretTrim = Qo;
899
+ V.parseCarets = es;
900
+ V.parseComparatorTrim = Jo;
901
+ V.parseGTE0 = os;
902
+ V.parseHyphen = zo;
903
+ V.parseStar = ns;
904
+ V.parseTildeTrim = Zo;
905
+ V.parseTildes = ts;
906
+ V.parseXRanges = rs;
907
+ var Dr = {};
908
+ function Ge(e, t) {
909
+ return e = Number(e) || e, t = Number(t) || t, e > t ? 1 : e === t ? 0 : -1;
910
+ }
911
+ function ss(e, t) {
912
+ const { preRelease: r } = e, { preRelease: n } = t;
913
+ if (r === void 0 && n) return 1;
914
+ if (r && n === void 0) return -1;
915
+ if (r === void 0 && n === void 0) return 0;
916
+ for (let o = 0, s = r.length; o <= s; o++) {
917
+ const i = r[o], a = n[o];
918
+ if (i !== a)
919
+ return i === void 0 && a === void 0 ? 0 : i ? a ? Ge(i, a) : -1 : 1;
920
+ }
921
+ return 0;
922
+ }
923
+ function Oe(e, t) {
924
+ return Ge(e.major, t.major) || Ge(e.minor, t.minor) || Ge(e.patch, t.patch) || ss(e, t);
925
+ }
926
+ function Ze(e, t) {
927
+ return e.version === t.version;
928
+ }
929
+ function is(e, t) {
930
+ switch (e.operator) {
931
+ case "":
932
+ case "=":
933
+ return Ze(e, t);
934
+ case ">":
935
+ return Oe(e, t) < 0;
936
+ case ">=":
937
+ return Ze(e, t) || Oe(e, t) < 0;
938
+ case "<":
939
+ return Oe(e, t) > 0;
940
+ case "<=":
941
+ return Ze(e, t) || Oe(e, t) > 0;
942
+ case void 0:
943
+ return !0;
944
+ default:
945
+ return !1;
946
+ }
947
+ }
948
+ Dr.compare = is;
949
+ const se = te, x = V, as = Dr;
950
+ function ls(e) {
951
+ return se.pipe(x.parseCarets, x.parseTildes, x.parseXRanges, x.parseStar)(e);
952
+ }
953
+ function cs(e) {
954
+ return se.pipe(x.parseHyphen, x.parseComparatorTrim, x.parseTildeTrim, x.parseCaretTrim)(e.trim()).split(/\s+/).join(" ");
955
+ }
956
+ function us(e, t) {
957
+ if (!e) return !1;
958
+ const r = se.extractComparator(e);
959
+ if (!r) return !1;
960
+ const [, n, , o, s, i, a] = r, c = {
961
+ operator: n,
962
+ version: se.combineVersion(o, s, i, a),
963
+ major: o,
964
+ minor: s,
965
+ patch: i,
966
+ preRelease: a?.split(".")
967
+ }, l = t.split("||");
968
+ for (const u of l) {
969
+ const f = u.trim();
970
+ if (!f || f === "*" || f === "x") return !0;
971
+ try {
972
+ const d = cs(f);
973
+ if (!d.trim()) return !0;
974
+ const h = d.split(" ").map((y) => ls(y)).join(" ");
975
+ if (!h.trim()) return !0;
976
+ const p = h.split(/\s+/).map((y) => x.parseGTE0(y)).filter(Boolean);
977
+ if (p.length === 0) continue;
978
+ let m = !0;
979
+ for (const y of p) {
980
+ const g = se.extractComparator(y);
981
+ if (!g) {
982
+ m = !1;
983
+ break;
984
+ }
985
+ const [, _, , A, w, P, T] = g;
986
+ if (!as.compare({
987
+ operator: _,
988
+ version: se.combineVersion(A, w, P, T),
989
+ major: A,
990
+ minor: w,
991
+ patch: P,
992
+ preRelease: T?.split(".")
993
+ }, c)) {
994
+ m = !1;
995
+ break;
996
+ }
997
+ }
998
+ if (m) return !0;
999
+ } catch (d) {
1000
+ console.error(`[semver] Error processing range part "${f}":`, d);
1001
+ continue;
1002
+ }
1003
+ }
1004
+ return !1;
1005
+ }
1006
+ vt.satisfy = us;
1007
+ var q = {}, re = {};
1008
+ const fs = "default", ds = "global";
1009
+ re.DEFAULT_REMOTE_TYPE = ds;
1010
+ re.DEFAULT_SCOPE = fs;
1011
+ const Be = I, Hr = R, qr = S, hs = re, ye = vt;
1012
+ let Et = L;
1013
+ function ms(e, t, r, n) {
1014
+ let o;
1015
+ return "get" in e ? o = e.get : "lib" in e ? o = () => Promise.resolve(e.lib) : o = () => Promise.resolve(() => {
1016
+ Be.error(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`);
1017
+ }), e.shareConfig?.eager && e.treeShaking?.mode && Be.error(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`), {
1018
+ deps: [],
1019
+ useIn: [],
1020
+ from: t,
1021
+ loading: null,
1022
+ ...e,
1023
+ shareConfig: {
1024
+ requiredVersion: `^${e.version}`,
1025
+ singleton: !1,
1026
+ eager: !1,
1027
+ strictVersion: !1,
1028
+ ...e.shareConfig
1029
+ },
1030
+ get: o,
1031
+ loaded: e?.loaded || "lib" in e ? !0 : void 0,
1032
+ version: e.version ?? "0",
1033
+ scope: Array.isArray(e.scope) ? e.scope : [e.scope ?? "default"],
1034
+ strategy: (e.strategy ?? n) || "version-first",
1035
+ treeShaking: e.treeShaking ? {
1036
+ ...e.treeShaking,
1037
+ mode: e.treeShaking.mode ?? "server-calc",
1038
+ status: e.treeShaking.status ?? Et.TreeShakingStatus.UNKNOWN,
1039
+ useIn: []
1040
+ } : void 0
1041
+ };
1042
+ }
1043
+ function ps(e, t) {
1044
+ const r = t.shared || {}, n = t.name, o = Object.keys(r).reduce((i, a) => {
1045
+ const c = Hr.arrayOptions(r[a]);
1046
+ return i[a] = i[a] || [], c.forEach((l) => {
1047
+ i[a].push(ms(l, n, a, t.shareStrategy));
1048
+ }), i;
1049
+ }, {}), s = { ...e.shared };
1050
+ return Object.keys(o).forEach((i) => {
1051
+ s[i] ? o[i].forEach((a) => {
1052
+ s[i].find((c) => c.version === a.version) || s[i].push(a);
1053
+ }) : s[i] = o[i];
1054
+ }), {
1055
+ allShareInfos: s,
1056
+ newShareInfos: o
1057
+ };
1058
+ }
1059
+ function be(e, t) {
1060
+ if (!e) return !1;
1061
+ const { status: r, mode: n } = e;
1062
+ return r === Et.TreeShakingStatus.NO_USE ? !1 : r === Et.TreeShakingStatus.CALCULATED ? !0 : n === "runtime-infer" ? t ? gs(e, t) : !0 : !1;
1063
+ }
1064
+ function Q(e, t) {
1065
+ const r = (n) => {
1066
+ if (!Number.isNaN(Number(n))) {
1067
+ const o = n.split(".");
1068
+ let s = n;
1069
+ for (let i = 0; i < 3 - o.length; i++) s += ".0";
1070
+ return s;
1071
+ }
1072
+ return n;
1073
+ };
1074
+ return !!ye.satisfy(r(e), `<=${r(t)}`);
1075
+ }
1076
+ const Re = (e, t) => {
1077
+ const r = t || function(n, o) {
1078
+ return Q(n, o);
1079
+ };
1080
+ return Object.keys(e).reduce((n, o) => !n || r(n, o) || n === "0" ? o : n, 0);
1081
+ }, Ve = (e) => !!e.loaded || typeof e.lib == "function", _s = (e) => !!e.loading, gs = (e, t) => {
1082
+ if (!e || !t) return !1;
1083
+ const { usedExports: r } = e;
1084
+ return r ? !!t.every((n) => r.includes(n)) : !1;
1085
+ };
1086
+ function ys(e, t, r, n) {
1087
+ const o = e[t][r];
1088
+ let s = "", i = be(n);
1089
+ const a = function(c, l) {
1090
+ return i ? o[c].treeShaking ? o[l].treeShaking ? !Ve(o[c].treeShaking) && Q(c, l) : !1 : !0 : !Ve(o[c]) && Q(c, l);
1091
+ };
1092
+ if (i) {
1093
+ if (s = Re(e[t][r], a), s) return {
1094
+ version: s,
1095
+ useTreesShaking: i
1096
+ };
1097
+ i = !1;
1098
+ }
1099
+ return {
1100
+ version: Re(e[t][r], a),
1101
+ useTreesShaking: i
1102
+ };
1103
+ }
1104
+ const ne = (e) => Ve(e) || _s(e);
1105
+ function Es(e, t, r, n) {
1106
+ const o = e[t][r];
1107
+ let s = "", i = be(n);
1108
+ const a = function(c, l) {
1109
+ if (i) {
1110
+ if (!o[c].treeShaking) return !0;
1111
+ if (!o[l].treeShaking) return !1;
1112
+ if (ne(o[l].treeShaking)) return ne(o[c].treeShaking) ? !!Q(c, l) : !0;
1113
+ if (ne(o[c].treeShaking)) return !1;
1114
+ }
1115
+ return ne(o[l]) ? ne(o[c]) ? !!Q(c, l) : !0 : ne(o[c]) ? !1 : Q(c, l);
1116
+ };
1117
+ if (i) {
1118
+ if (s = Re(e[t][r], a), s) return {
1119
+ version: s,
1120
+ useTreesShaking: i
1121
+ };
1122
+ i = !1;
1123
+ }
1124
+ return {
1125
+ version: Re(e[t][r], a),
1126
+ useTreesShaking: i
1127
+ };
1128
+ }
1129
+ function Ss(e) {
1130
+ return e === "loaded-first" ? Es : ys;
1131
+ }
1132
+ function bs(e, t, r, n) {
1133
+ if (!e) return;
1134
+ const { shareConfig: o, scope: s = hs.DEFAULT_SCOPE, strategy: i, treeShaking: a } = r, c = Array.isArray(s) ? s : [s];
1135
+ for (const l of c) if (o && e[l] && e[l][t]) {
1136
+ const { requiredVersion: u } = o, { version: f, useTreesShaking: d } = Ss(i)(e, l, t, a), h = () => {
1137
+ const m = e[l][t][f];
1138
+ if (o.singleton) {
1139
+ if (typeof u == "string" && !ye.satisfy(f, u)) {
1140
+ const y = `Version ${f} from ${f && m.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;
1141
+ o.strictVersion ? Be.error(y) : Be.warn(y);
1142
+ }
1143
+ return {
1144
+ shared: m,
1145
+ useTreesShaking: d
1146
+ };
1147
+ } else {
1148
+ if (u === !1 || u === "*") return {
1149
+ shared: m,
1150
+ useTreesShaking: d
1151
+ };
1152
+ if (ye.satisfy(f, u)) return {
1153
+ shared: m,
1154
+ useTreesShaking: d
1155
+ };
1156
+ const y = be(a);
1157
+ if (y) {
1158
+ for (const [g, _] of Object.entries(e[l][t]))
1159
+ if (be(_.treeShaking, a?.usedExports) && ye.satisfy(g, u))
1160
+ return {
1161
+ shared: _,
1162
+ useTreesShaking: y
1163
+ };
1164
+ }
1165
+ for (const [g, _] of Object.entries(e[l][t])) if (ye.satisfy(g, u)) return {
1166
+ shared: _,
1167
+ useTreesShaking: !1
1168
+ };
1169
+ }
1170
+ }, p = {
1171
+ shareScopeMap: e,
1172
+ scope: l,
1173
+ pkgName: t,
1174
+ version: f,
1175
+ GlobalFederation: qr.Global.__FEDERATION__,
1176
+ shareInfo: r,
1177
+ resolver: h
1178
+ };
1179
+ return (n.emit(p) || p).resolver();
1180
+ }
1181
+ }
1182
+ function Rs() {
1183
+ return qr.Global.__FEDERATION__.__SHARE__;
1184
+ }
1185
+ function Ts(e) {
1186
+ const { pkgName: t, extraOptions: r, shareInfos: n } = e, o = (c) => {
1187
+ if (!c) return;
1188
+ const l = {};
1189
+ return c.forEach((f) => {
1190
+ l[f.version] = f;
1191
+ }), l[Re(l, function(f, d) {
1192
+ return !Ve(l[f]) && Q(f, d);
1193
+ })];
1194
+ }, s = r?.resolver ?? o, i = (c) => c !== null && typeof c == "object" && !Array.isArray(c), a = (...c) => {
1195
+ const l = {};
1196
+ for (const u of c)
1197
+ if (u)
1198
+ for (const [f, d] of Object.entries(u)) {
1199
+ const h = l[f];
1200
+ i(h) && i(d) ? l[f] = a(h, d) : d !== void 0 && (l[f] = d);
1201
+ }
1202
+ return l;
1203
+ };
1204
+ return a(s(n[t]), r?.customShareInfo);
1205
+ }
1206
+ const Is = (e, t) => {
1207
+ e.useIn || (e.useIn = []), Hr.addUniqueItem(e.useIn, t);
1208
+ };
1209
+ function Ns(e, t) {
1210
+ return t && e.treeShaking ? e.treeShaking : e;
1211
+ }
1212
+ q.addUseIn = Is;
1213
+ q.directShare = Ns;
1214
+ q.formatShareConfigs = ps;
1215
+ q.getGlobalShareScope = Rs;
1216
+ q.getRegisteredShare = bs;
1217
+ q.getTargetSharedOptions = Ts;
1218
+ q.shouldUseTreeShaking = be;
1219
+ var de = {};
1220
+ function $s(e, t) {
1221
+ for (const r of e) {
1222
+ const n = t.startsWith(r.name);
1223
+ let o = t.replace(r.name, "");
1224
+ if (n) {
1225
+ if (o.startsWith("/")) {
1226
+ const a = r.name;
1227
+ return o = `.${o}`, {
1228
+ pkgNameOrAlias: a,
1229
+ expose: o,
1230
+ remote: r
1231
+ };
1232
+ } else if (o === "") return {
1233
+ pkgNameOrAlias: r.name,
1234
+ expose: ".",
1235
+ remote: r
1236
+ };
1237
+ }
1238
+ const s = r.alias && t.startsWith(r.alias);
1239
+ let i = r.alias && t.replace(r.alias, "");
1240
+ if (r.alias && s) {
1241
+ if (i && i.startsWith("/")) {
1242
+ const a = r.alias;
1243
+ return i = `.${i}`, {
1244
+ pkgNameOrAlias: a,
1245
+ expose: i,
1246
+ remote: r
1247
+ };
1248
+ } else if (i === "") return {
1249
+ pkgNameOrAlias: r.alias,
1250
+ expose: ".",
1251
+ remote: r
1252
+ };
1253
+ }
1254
+ }
1255
+ }
1256
+ function Ms(e, t) {
1257
+ for (const r of e)
1258
+ if (t === r.name || r.alias && t === r.alias) return r;
1259
+ }
1260
+ de.matchRemote = Ms;
1261
+ de.matchRemoteWithNameAndExpose = $s;
1262
+ var j = {}, K = {}, O = {};
1263
+ const Ps = "RUNTIME-001", vs = "RUNTIME-002", Os = "RUNTIME-003", As = "RUNTIME-004", ks = "RUNTIME-005", ws = "RUNTIME-006", Fs = "RUNTIME-007", Ls = "RUNTIME-008", Ds = "RUNTIME-009", Hs = "RUNTIME-010", qs = "RUNTIME-011", Cs = "RUNTIME-012", Us = "TYPE-001", Gs = "BUILD-001", Ws = "BUILD-002";
1264
+ O.BUILD_001 = Gs;
1265
+ O.BUILD_002 = Ws;
1266
+ O.RUNTIME_001 = Ps;
1267
+ O.RUNTIME_002 = vs;
1268
+ O.RUNTIME_003 = Os;
1269
+ O.RUNTIME_004 = As;
1270
+ O.RUNTIME_005 = ks;
1271
+ O.RUNTIME_006 = ws;
1272
+ O.RUNTIME_007 = Fs;
1273
+ O.RUNTIME_008 = Ls;
1274
+ O.RUNTIME_009 = Ds;
1275
+ O.RUNTIME_010 = Hs;
1276
+ O.RUNTIME_011 = qs;
1277
+ O.RUNTIME_012 = Cs;
1278
+ O.TYPE_001 = Us;
1279
+ var Ne = {};
1280
+ const k = O, Cr = {
1281
+ [k.RUNTIME_001]: "Failed to get remoteEntry exports.",
1282
+ [k.RUNTIME_002]: 'The remote entry interface does not contain "init"',
1283
+ [k.RUNTIME_003]: "Failed to get manifest.",
1284
+ [k.RUNTIME_004]: "Failed to locate remote.",
1285
+ [k.RUNTIME_005]: "Invalid loadShareSync function call from bundler runtime",
1286
+ [k.RUNTIME_006]: "Invalid loadShareSync function call from runtime",
1287
+ [k.RUNTIME_007]: "Failed to get remote snapshot.",
1288
+ [k.RUNTIME_008]: "Failed to load script resources.",
1289
+ [k.RUNTIME_009]: "Please call createInstance first.",
1290
+ [k.RUNTIME_010]: 'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',
1291
+ [k.RUNTIME_011]: "The remoteEntry URL is missing from the remote snapshot.",
1292
+ [k.RUNTIME_012]: '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.'
1293
+ }, Ur = { [k.TYPE_001]: "Failed to generate type declaration. Execute the below cmd to reproduce and fix the error." }, Gr = {
1294
+ [k.BUILD_001]: "Failed to find expose module.",
1295
+ [k.BUILD_002]: "PublicPath is required in prod mode."
1296
+ }, Bs = {
1297
+ ...Cr,
1298
+ ...Ur,
1299
+ ...Gr
1300
+ };
1301
+ Ne.buildDescMap = Gr;
1302
+ Ne.errorDescMap = Bs;
1303
+ Ne.runtimeDescMap = Cr;
1304
+ Ne.typeDescMap = Ur;
1305
+ (function(e) {
1306
+ Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
1307
+ const t = O, r = Pt, n = Ne;
1308
+ e.BUILD_001 = t.BUILD_001, e.BUILD_002 = t.BUILD_002, e.RUNTIME_001 = t.RUNTIME_001, e.RUNTIME_002 = t.RUNTIME_002, e.RUNTIME_003 = t.RUNTIME_003, e.RUNTIME_004 = t.RUNTIME_004, e.RUNTIME_005 = t.RUNTIME_005, e.RUNTIME_006 = t.RUNTIME_006, e.RUNTIME_007 = t.RUNTIME_007, e.RUNTIME_008 = t.RUNTIME_008, e.RUNTIME_009 = t.RUNTIME_009, e.RUNTIME_010 = t.RUNTIME_010, e.RUNTIME_011 = t.RUNTIME_011, e.RUNTIME_012 = t.RUNTIME_012, e.TYPE_001 = t.TYPE_001, e.buildDescMap = n.buildDescMap, e.errorDescMap = n.errorDescMap, e.getShortErrorMsg = r.getShortErrorMsg, e.runtimeDescMap = n.runtimeDescMap, e.typeDescMap = n.typeDescMap;
1309
+ })(K);
1310
+ const xe = I, ie = S, Ut = re;
1311
+ let Wr = L, Te = K;
1312
+ const Br = ".then(callbacks[0]).catch(callbacks[1])";
1313
+ async function Vs({ entry: e, remoteEntryExports: t }) {
1314
+ return new Promise((r, n) => {
1315
+ try {
1316
+ t ? r(t) : typeof FEDERATION_ALLOW_NEW_FUNCTION < "u" ? new Function("callbacks", `import("${e}")${Br}`)([r, n]) : import(
1317
+ /* webpackIgnore: true */
1318
+ /* @vite-ignore */
1319
+ e
1320
+ ).then(r).catch(n);
1321
+ } catch (o) {
1322
+ xe.error(`Failed to load ESM entry from "${e}". ${o instanceof Error ? o.message : String(o)}`);
1323
+ }
1324
+ });
1325
+ }
1326
+ async function js({ entry: e, remoteEntryExports: t }) {
1327
+ return new Promise((r, n) => {
1328
+ try {
1329
+ t ? r(t) : typeof __system_context__ > "u" ? System.import(e).then(r).catch(n) : new Function("callbacks", `System.import("${e}")${Br}`)([r, n]);
1330
+ } catch (o) {
1331
+ xe.error(`Failed to load SystemJS entry from "${e}". ${o instanceof Error ? o.message : String(o)}`);
1332
+ }
1333
+ });
1334
+ }
1335
+ function xs(e, t, r) {
1336
+ const { remoteEntryKey: n, entryExports: o } = ie.getRemoteEntryExports(e, t);
1337
+ return o || xe.error(Te.RUNTIME_001, Te.runtimeDescMap, {
1338
+ remoteName: e,
1339
+ remoteEntryUrl: r,
1340
+ remoteEntryKey: n
1341
+ }), o;
1342
+ }
1343
+ async function Xs({ name: e, globalName: t, entry: r, remoteInfo: n, loaderHook: o, getEntryUrl: s }) {
1344
+ const { entryExports: i } = ie.getRemoteEntryExports(e, t);
1345
+ if (i) return i;
1346
+ const a = s ? s(r) : r;
1347
+ return (0, Wr.loadScript)(a, {
1348
+ attrs: {},
1349
+ createScriptHook: (c, l) => {
1350
+ const u = o.lifecycle.createScript.emit({
1351
+ url: c,
1352
+ attrs: l,
1353
+ remoteInfo: n
1354
+ });
1355
+ if (u && (u instanceof HTMLScriptElement || "script" in u || "timeout" in u))
1356
+ return u;
1357
+ }
1358
+ }).then(() => xs(e, t, r), (c) => {
1359
+ const l = c instanceof Error ? c.message : String(c);
1360
+ xe.error(Te.RUNTIME_008, Te.runtimeDescMap, {
1361
+ remoteName: e,
1362
+ resourceUrl: a
1363
+ }, l);
1364
+ });
1365
+ }
1366
+ async function Ks({ remoteInfo: e, remoteEntryExports: t, loaderHook: r, getEntryUrl: n }) {
1367
+ const { entry: o, entryGlobalName: s, name: i, type: a } = e;
1368
+ switch (a) {
1369
+ case "esm":
1370
+ case "module":
1371
+ return Vs({
1372
+ entry: o,
1373
+ remoteEntryExports: t
1374
+ });
1375
+ case "system":
1376
+ return js({
1377
+ entry: o,
1378
+ remoteEntryExports: t
1379
+ });
1380
+ default:
1381
+ return Xs({
1382
+ entry: o,
1383
+ globalName: s,
1384
+ name: i,
1385
+ remoteInfo: e,
1386
+ loaderHook: r,
1387
+ getEntryUrl: n
1388
+ });
1389
+ }
1390
+ }
1391
+ function St(e) {
1392
+ const { entry: t, name: r } = e;
1393
+ return (0, Wr.composeKeyWithSeparator)(r, t);
1394
+ }
1395
+ async function Vr(e) {
1396
+ const { origin: t, remoteEntryExports: r, remoteInfo: n, getEntryUrl: o, _inErrorHandling: s = !1 } = e, i = St(n);
1397
+ if (r) return r;
1398
+ if (!ie.globalLoading[i]) {
1399
+ const a = t.remoteHandler.hooks.lifecycle.loadEntry, c = t.loaderHook;
1400
+ ie.globalLoading[i] = a.emit({
1401
+ loaderHook: c,
1402
+ remoteInfo: n,
1403
+ remoteEntryExports: r
1404
+ }).then((l) => l || Ks({
1405
+ remoteInfo: n,
1406
+ remoteEntryExports: r,
1407
+ loaderHook: c,
1408
+ getEntryUrl: o
1409
+ })).catch(async (l) => {
1410
+ const u = St(n), f = l instanceof Error && l.message.includes("ScriptExecutionError");
1411
+ if (l instanceof Error && l.message.includes(Te.RUNTIME_008) && !f && !s) {
1412
+ const d = (p) => Vr({
1413
+ ...p,
1414
+ _inErrorHandling: !0
1415
+ }), h = await t.loaderHook.lifecycle.loadEntryError.emit({
1416
+ getRemoteEntry: d,
1417
+ origin: t,
1418
+ remoteInfo: n,
1419
+ remoteEntryExports: r,
1420
+ globalLoading: ie.globalLoading,
1421
+ uniqueKey: u
1422
+ });
1423
+ if (h) return h;
1424
+ }
1425
+ throw l;
1426
+ });
1427
+ }
1428
+ return ie.globalLoading[i];
1429
+ }
1430
+ function Ys(e) {
1431
+ return {
1432
+ ...e,
1433
+ entry: "entry" in e ? e.entry : "",
1434
+ type: e.type || Ut.DEFAULT_REMOTE_TYPE,
1435
+ entryGlobalName: e.entryGlobalName || e.name,
1436
+ shareScope: e.shareScope || Ut.DEFAULT_SCOPE
1437
+ };
1438
+ }
1439
+ j.getRemoteEntry = Vr;
1440
+ j.getRemoteEntryUniqueKey = St;
1441
+ j.getRemoteInfo = Ys;
1442
+ var jr = {};
1443
+ function zs() {
1444
+ return typeof FEDERATION_BUILD_IDENTIFIER < "u" ? FEDERATION_BUILD_IDENTIFIER : "";
1445
+ }
1446
+ jr.getBuilderId = zs;
1447
+ var xr = {};
1448
+ const Js = S;
1449
+ function Zs(e, t) {
1450
+ const r = Js.getGlobalHostPlugins(), n = [
1451
+ t.hooks,
1452
+ t.remoteHandler.hooks,
1453
+ t.sharedHandler.hooks,
1454
+ t.snapshotHandler.hooks,
1455
+ t.loaderHook,
1456
+ t.bridgeHook
1457
+ ];
1458
+ return r.length > 0 && r.forEach((o) => {
1459
+ e?.find((s) => s.name !== o.name) && e.push(o);
1460
+ }), e && e.length > 0 && e.forEach((o) => {
1461
+ n.forEach((s) => {
1462
+ s.applyPlugin(o, t);
1463
+ });
1464
+ }), e;
1465
+ }
1466
+ xr.registerPlugins = Zs;
1467
+ var $e = {};
1468
+ function Qs(e) {
1469
+ return {
1470
+ name: e.name,
1471
+ alias: e.alias,
1472
+ entry: "entry" in e ? e.entry : void 0,
1473
+ version: "version" in e ? e.version : void 0,
1474
+ type: e.type,
1475
+ entryGlobalName: e.entryGlobalName,
1476
+ shareScope: e.shareScope
1477
+ };
1478
+ }
1479
+ function ei(e) {
1480
+ const t = {};
1481
+ for (const [r, n] of Object.entries(e.shared)) {
1482
+ const o = n[0];
1483
+ o && (t[r] = {
1484
+ version: o.version,
1485
+ singleton: o.shareConfig?.singleton,
1486
+ requiredVersion: o.shareConfig?.requiredVersion === !1 ? !1 : o.shareConfig?.requiredVersion,
1487
+ eager: o.eager,
1488
+ strictVersion: o.shareConfig?.strictVersion
1489
+ });
1490
+ }
1491
+ return {
1492
+ project: {
1493
+ name: e.name,
1494
+ mfRole: e.remotes?.length > 0 ? "host" : "unknown"
1495
+ },
1496
+ mfConfig: {
1497
+ name: e.name,
1498
+ remotes: e.remotes?.map(Qs) ?? [],
1499
+ shared: t
1500
+ }
1501
+ };
1502
+ }
1503
+ $e.optionsToMFContext = ei;
1504
+ var Xr = {}, J = {};
1505
+ const ti = I, ri = de, Gt = j;
1506
+ let Ee = L;
1507
+ function Kr(e) {
1508
+ return {
1509
+ resourceCategory: "sync",
1510
+ share: !0,
1511
+ depsRemote: !0,
1512
+ ...e
1513
+ };
1514
+ }
1515
+ function ni(e, t) {
1516
+ return t.map((r) => {
1517
+ const n = ri.matchRemote(e, r.nameOrAlias);
1518
+ return ti.assert(n, `Unable to preload ${r.nameOrAlias} as it is not included in ${!n && (0, Ee.safeToString)({
1519
+ remoteInfo: n,
1520
+ remotes: e
1521
+ })}`), {
1522
+ remote: n,
1523
+ preloadConfig: Kr(r)
1524
+ };
1525
+ });
1526
+ }
1527
+ function oi(e) {
1528
+ return e ? e.map((t) => t === "." ? t : t.startsWith("./") ? t.replace("./", "") : t) : [];
1529
+ }
1530
+ function si(e, t, r, n = !0) {
1531
+ const { cssAssets: o, jsAssetsWithoutEntry: s, entryAssets: i } = r;
1532
+ if (t.options.inBrowser) {
1533
+ if (i.forEach((a) => {
1534
+ const { moduleInfo: c } = a, l = t.moduleCache.get(e.name);
1535
+ l ? Gt.getRemoteEntry({
1536
+ origin: t,
1537
+ remoteInfo: c,
1538
+ remoteEntryExports: l.remoteEntryExports
1539
+ }) : Gt.getRemoteEntry({
1540
+ origin: t,
1541
+ remoteInfo: c,
1542
+ remoteEntryExports: void 0
1543
+ });
1544
+ }), n) {
1545
+ const a = {
1546
+ rel: "preload",
1547
+ as: "style"
1548
+ };
1549
+ o.forEach((c) => {
1550
+ const { link: l, needAttach: u } = (0, Ee.createLink)({
1551
+ url: c,
1552
+ cb: () => {
1553
+ },
1554
+ attrs: a,
1555
+ createLinkHook: (f, d) => {
1556
+ const h = t.loaderHook.lifecycle.createLink.emit({
1557
+ url: f,
1558
+ attrs: d,
1559
+ remoteInfo: e
1560
+ });
1561
+ if (h instanceof HTMLLinkElement) return h;
1562
+ }
1563
+ });
1564
+ u && document.head.appendChild(l);
1565
+ });
1566
+ } else {
1567
+ const a = {
1568
+ rel: "stylesheet",
1569
+ type: "text/css"
1570
+ };
1571
+ o.forEach((c) => {
1572
+ const { link: l, needAttach: u } = (0, Ee.createLink)({
1573
+ url: c,
1574
+ cb: () => {
1575
+ },
1576
+ attrs: a,
1577
+ createLinkHook: (f, d) => {
1578
+ const h = t.loaderHook.lifecycle.createLink.emit({
1579
+ url: f,
1580
+ attrs: d,
1581
+ remoteInfo: e
1582
+ });
1583
+ if (h instanceof HTMLLinkElement) return h;
1584
+ },
1585
+ needDeleteLink: !1
1586
+ });
1587
+ u && document.head.appendChild(l);
1588
+ });
1589
+ }
1590
+ if (n) {
1591
+ const a = {
1592
+ rel: "preload",
1593
+ as: "script"
1594
+ };
1595
+ s.forEach((c) => {
1596
+ const { link: l, needAttach: u } = (0, Ee.createLink)({
1597
+ url: c,
1598
+ cb: () => {
1599
+ },
1600
+ attrs: a,
1601
+ createLinkHook: (f, d) => {
1602
+ const h = t.loaderHook.lifecycle.createLink.emit({
1603
+ url: f,
1604
+ attrs: d,
1605
+ remoteInfo: e
1606
+ });
1607
+ if (h instanceof HTMLLinkElement) return h;
1608
+ }
1609
+ });
1610
+ u && document.head.appendChild(l);
1611
+ });
1612
+ } else {
1613
+ const a = {
1614
+ fetchpriority: "high",
1615
+ type: e?.type === "module" ? "module" : "text/javascript"
1616
+ };
1617
+ s.forEach((c) => {
1618
+ const { script: l, needAttach: u } = (0, Ee.createScript)({
1619
+ url: c,
1620
+ cb: () => {
1621
+ },
1622
+ attrs: a,
1623
+ createScriptHook: (f, d) => {
1624
+ const h = t.loaderHook.lifecycle.createScript.emit({
1625
+ url: f,
1626
+ attrs: d,
1627
+ remoteInfo: e
1628
+ });
1629
+ if (h instanceof HTMLScriptElement) return h;
1630
+ },
1631
+ needDeleteScript: !0
1632
+ });
1633
+ u && document.head.appendChild(l);
1634
+ });
1635
+ }
1636
+ }
1637
+ }
1638
+ J.defaultPreloadArgs = Kr;
1639
+ J.formatPreloadArgs = ni;
1640
+ J.normalizePreloadExposes = oi;
1641
+ J.preloadAssets = si;
1642
+ const v = S, Wt = q, ii = de, ai = j, li = J, ci = {
1643
+ getRegisteredShare: Wt.getRegisteredShare,
1644
+ getGlobalShareScope: Wt.getGlobalShareScope
1645
+ }, ui = {
1646
+ Global: v.Global,
1647
+ nativeGlobal: v.nativeGlobal,
1648
+ resetFederationGlobalInfo: v.resetFederationGlobalInfo,
1649
+ setGlobalFederationInstance: v.setGlobalFederationInstance,
1650
+ getGlobalFederationConstructor: v.getGlobalFederationConstructor,
1651
+ setGlobalFederationConstructor: v.setGlobalFederationConstructor,
1652
+ getInfoWithoutType: v.getInfoWithoutType,
1653
+ getGlobalSnapshot: v.getGlobalSnapshot,
1654
+ getTargetSnapshotInfoByModuleInfo: v.getTargetSnapshotInfoByModuleInfo,
1655
+ getGlobalSnapshotInfoByModuleInfo: v.getGlobalSnapshotInfoByModuleInfo,
1656
+ setGlobalSnapshotInfoByModuleInfo: v.setGlobalSnapshotInfoByModuleInfo,
1657
+ addGlobalSnapshot: v.addGlobalSnapshot,
1658
+ getRemoteEntryExports: v.getRemoteEntryExports,
1659
+ registerGlobalPlugins: v.registerGlobalPlugins,
1660
+ getGlobalHostPlugins: v.getGlobalHostPlugins,
1661
+ getPreloaded: v.getPreloaded,
1662
+ setPreloaded: v.setPreloaded
1663
+ };
1664
+ var fi = {
1665
+ global: ui,
1666
+ share: ci,
1667
+ utils: {
1668
+ matchRemoteWithNameAndExpose: ii.matchRemoteWithNameAndExpose,
1669
+ preloadAssets: li.preloadAssets,
1670
+ getRemoteInfo: ai.getRemoteInfo
1671
+ }
1672
+ };
1673
+ Xr.default = fi;
1674
+ var Xe = {};
1675
+ const Qe = I, Bt = R, di = j, hi = $e;
1676
+ let mi = L, Vt = K;
1677
+ function pi(e, t, r) {
1678
+ const n = t, o = Array.isArray(e.shareScope) ? e.shareScope : [e.shareScope];
1679
+ o.length || o.push("default"), o.forEach((i) => {
1680
+ n[i] || (n[i] = {});
1681
+ });
1682
+ const s = {
1683
+ version: e.version || "",
1684
+ shareScopeKeys: Array.isArray(e.shareScope) ? o : e.shareScope || "default"
1685
+ };
1686
+ return Object.defineProperty(s, "shareScopeMap", {
1687
+ value: n,
1688
+ enumerable: !1
1689
+ }), {
1690
+ remoteEntryInitOptions: s,
1691
+ shareScope: n[o[0]],
1692
+ initScope: r ?? []
1693
+ };
1694
+ }
1695
+ var _i = class {
1696
+ constructor({ remoteInfo: e, host: t }) {
1697
+ this.inited = !1, this.initing = !1, this.lib = void 0, this.remoteInfo = e, this.host = t;
1698
+ }
1699
+ async getEntry() {
1700
+ if (this.remoteEntryExports) return this.remoteEntryExports;
1701
+ const e = await di.getRemoteEntry({
1702
+ origin: this.host,
1703
+ remoteInfo: this.remoteInfo,
1704
+ remoteEntryExports: this.remoteEntryExports
1705
+ });
1706
+ return Qe.assert(e, `remoteEntryExports is undefined
1707
+ ${(0, mi.safeToString)(this.remoteInfo)}`), this.remoteEntryExports = e, this.remoteEntryExports;
1708
+ }
1709
+ async init(e, t, r) {
1710
+ const n = await this.getEntry();
1711
+ if (this.inited) return n;
1712
+ if (this.initPromise)
1713
+ return await this.initPromise, n;
1714
+ this.initing = !0, this.initPromise = (async () => {
1715
+ const { remoteEntryInitOptions: o, shareScope: s, initScope: i } = pi(this.remoteInfo, this.host.shareScopeMap, r), a = await this.host.hooks.lifecycle.beforeInitContainer.emit({
1716
+ shareScope: s,
1717
+ remoteEntryInitOptions: o,
1718
+ initScope: i,
1719
+ remoteInfo: this.remoteInfo,
1720
+ origin: this.host
1721
+ });
1722
+ typeof n?.init > "u" && Qe.error(Vt.RUNTIME_002, Vt.runtimeDescMap, {
1723
+ hostName: this.host.name,
1724
+ remoteName: this.remoteInfo.name,
1725
+ remoteEntryUrl: this.remoteInfo.entry,
1726
+ remoteEntryKey: this.remoteInfo.entryGlobalName
1727
+ }, void 0, hi.optionsToMFContext(this.host.options)), await n.init(a.shareScope, a.initScope, a.remoteEntryInitOptions), await this.host.hooks.lifecycle.initContainer.emit({
1728
+ ...a,
1729
+ id: e,
1730
+ remoteSnapshot: t,
1731
+ remoteEntryExports: n
1732
+ }), this.inited = !0;
1733
+ })();
1734
+ try {
1735
+ await this.initPromise;
1736
+ } finally {
1737
+ this.initing = !1, this.initPromise = void 0;
1738
+ }
1739
+ return n;
1740
+ }
1741
+ async get(e, t, r, n) {
1742
+ const { loadFactory: o = !0 } = r || { loadFactory: !0 }, s = await this.init(e, n);
1743
+ this.lib = s;
1744
+ let i;
1745
+ i = await this.host.loaderHook.lifecycle.getModuleFactory.emit({
1746
+ remoteEntryExports: s,
1747
+ expose: t,
1748
+ moduleInfo: this.remoteInfo
1749
+ }), i || (i = await s.get(t)), Qe.assert(i, `${Bt.getFMId(this.remoteInfo)} remote don't export ${t}.`);
1750
+ const a = Bt.processModuleAlias(this.remoteInfo.name, t), c = this.wraperFactory(i, a);
1751
+ return o ? await c() : c;
1752
+ }
1753
+ wraperFactory(e, t) {
1754
+ function r(n, o) {
1755
+ n && typeof n == "object" && Object.isExtensible(n) && !Object.getOwnPropertyDescriptor(n, Symbol.for("mf_module_id")) && Object.defineProperty(n, Symbol.for("mf_module_id"), {
1756
+ value: o,
1757
+ enumerable: !1
1758
+ });
1759
+ }
1760
+ return e instanceof Promise ? async () => {
1761
+ const n = await e();
1762
+ return r(n, t), n;
1763
+ } : () => {
1764
+ const n = e();
1765
+ return r(n, t), n;
1766
+ };
1767
+ }
1768
+ };
1769
+ Xe.Module = _i;
1770
+ var Yr = {}, he = {}, gi = class {
1771
+ constructor(e) {
1772
+ this.type = "", this.listeners = /* @__PURE__ */ new Set(), e && (this.type = e);
1773
+ }
1774
+ on(e) {
1775
+ typeof e == "function" && this.listeners.add(e);
1776
+ }
1777
+ once(e) {
1778
+ const t = this;
1779
+ this.on(function r(...n) {
1780
+ return t.remove(r), e.apply(null, n);
1781
+ });
1782
+ }
1783
+ emit(...e) {
1784
+ let t;
1785
+ return this.listeners.size > 0 && this.listeners.forEach((r) => {
1786
+ t = r(...e);
1787
+ }), t;
1788
+ }
1789
+ remove(e) {
1790
+ this.listeners.delete(e);
1791
+ }
1792
+ removeAll() {
1793
+ this.listeners.clear();
1794
+ }
1795
+ };
1796
+ he.SyncHook = gi;
1797
+ var Me = {};
1798
+ const yi = he;
1799
+ var Ei = class extends yi.SyncHook {
1800
+ emit(...e) {
1801
+ let t;
1802
+ const r = Array.from(this.listeners);
1803
+ if (r.length > 0) {
1804
+ let n = 0;
1805
+ const o = (s) => s === !1 ? !1 : n < r.length ? Promise.resolve(r[n++].apply(null, e)).then(o) : s;
1806
+ t = o();
1807
+ }
1808
+ return Promise.resolve(t);
1809
+ }
1810
+ };
1811
+ Me.AsyncHook = Ei;
1812
+ var me = {};
1813
+ const et = I, zr = R, Si = he;
1814
+ function Jr(e, t) {
1815
+ if (!zr.isObject(t)) return !1;
1816
+ if (e !== t) {
1817
+ for (const r in e) if (!(r in t)) return !1;
1818
+ }
1819
+ return !0;
1820
+ }
1821
+ var bi = class extends Si.SyncHook {
1822
+ constructor(e) {
1823
+ super(), this.onerror = et.error, this.type = e;
1824
+ }
1825
+ emit(e) {
1826
+ zr.isObject(e) || et.error(`The data for the "${this.type}" hook should be an object.`);
1827
+ for (const t of this.listeners) try {
1828
+ const r = t(e);
1829
+ if (Jr(e, r)) e = r;
1830
+ else {
1831
+ this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);
1832
+ break;
1833
+ }
1834
+ } catch (r) {
1835
+ et.warn(r), this.onerror(r);
1836
+ }
1837
+ return e;
1838
+ }
1839
+ };
1840
+ me.SyncWaterfallHook = bi;
1841
+ me.checkReturnData = Jr;
1842
+ var Pe = {};
1843
+ const tt = I, Ri = R, Ti = he, Ii = me;
1844
+ var Ni = class extends Ti.SyncHook {
1845
+ constructor(e) {
1846
+ super(), this.onerror = tt.error, this.type = e;
1847
+ }
1848
+ emit(e) {
1849
+ Ri.isObject(e) || tt.error(`The response data for the "${this.type}" hook must be an object.`);
1850
+ const t = Array.from(this.listeners);
1851
+ if (t.length > 0) {
1852
+ let r = 0;
1853
+ const n = (s) => (tt.warn(s), this.onerror(s), e), o = (s) => {
1854
+ if (Ii.checkReturnData(e, s)) {
1855
+ if (e = s, r < t.length) try {
1856
+ return Promise.resolve(t[r++](e)).then(o, n);
1857
+ } catch (i) {
1858
+ return n(i);
1859
+ }
1860
+ } else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);
1861
+ return e;
1862
+ };
1863
+ return Promise.resolve(o(e));
1864
+ }
1865
+ return Promise.resolve(e);
1866
+ }
1867
+ };
1868
+ Pe.AsyncWaterfallHook = Ni;
1869
+ var ve = {};
1870
+ const Ae = I, $i = R;
1871
+ var Mi = class {
1872
+ constructor(e) {
1873
+ this.registerPlugins = {}, this.lifecycle = e, this.lifecycleKeys = Object.keys(e);
1874
+ }
1875
+ applyPlugin(e, t) {
1876
+ Ae.assert($i.isPlainObject(e), "Plugin configuration is invalid.");
1877
+ const r = e.name;
1878
+ Ae.assert(r, "A name must be provided by the plugin."), this.registerPlugins[r] || (this.registerPlugins[r] = e, e.apply?.(t), Object.keys(this.lifecycle).forEach((n) => {
1879
+ const o = e[n];
1880
+ o && this.lifecycle[n].on(o);
1881
+ }));
1882
+ }
1883
+ removePlugin(e) {
1884
+ Ae.assert(e, "A name is required.");
1885
+ const t = this.registerPlugins[e];
1886
+ Ae.assert(t, `The plugin "${e}" is not registered.`), Object.keys(t).forEach((r) => {
1887
+ r !== "name" && this.lifecycle[r].remove(t[r]);
1888
+ });
1889
+ }
1890
+ };
1891
+ ve.PluginSystem = Mi;
1892
+ var Ke = {};
1893
+ const Pi = I, bt = R, vi = J;
1894
+ let jt = L, xt = K;
1895
+ function Zr(e, t) {
1896
+ const r = bt.getRemoteEntryInfoFromSnapshot(t);
1897
+ r.url || Pi.error(xt.RUNTIME_011, xt.runtimeDescMap, { remoteName: e.name });
1898
+ let n = (0, jt.getResourceUrl)(t, r.url);
1899
+ !jt.isBrowserEnvValue && !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;
1900
+ }
1901
+ function Oi() {
1902
+ return {
1903
+ name: "snapshot-plugin",
1904
+ async afterResolve(e) {
1905
+ const { remote: t, pkgNameOrAlias: r, expose: n, origin: o, remoteInfo: s, id: i } = e;
1906
+ if (!bt.isRemoteInfoWithEntry(t) || !bt.isPureRemoteEntry(t)) {
1907
+ const { remoteSnapshot: a, globalSnapshot: c } = await o.snapshotHandler.loadRemoteSnapshotInfo({
1908
+ moduleInfo: t,
1909
+ id: i
1910
+ });
1911
+ Zr(s, a);
1912
+ const l = {
1913
+ remote: t,
1914
+ preloadConfig: {
1915
+ nameOrAlias: r,
1916
+ exposes: [n],
1917
+ resourceCategory: "sync",
1918
+ share: !1,
1919
+ depsRemote: !1
1920
+ }
1921
+ }, u = await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({
1922
+ origin: o,
1923
+ preloadOptions: l,
1924
+ remoteInfo: s,
1925
+ remote: t,
1926
+ remoteSnapshot: a,
1927
+ globalSnapshot: c
1928
+ });
1929
+ return u && vi.preloadAssets(s, o, u, !1), {
1930
+ ...e,
1931
+ remoteSnapshot: a
1932
+ };
1933
+ }
1934
+ return e;
1935
+ }
1936
+ };
1937
+ }
1938
+ Ke.assignRemoteInfo = Zr;
1939
+ Ke.snapshotPlugin = Oi;
1940
+ var Qr = {};
1941
+ const Ie = R, Rt = S, Ai = q, Xt = J, ki = Ke;
1942
+ let je = L;
1943
+ function wi(e) {
1944
+ const t = e.split(":");
1945
+ return t.length === 1 ? {
1946
+ name: t[0],
1947
+ version: void 0
1948
+ } : t.length === 2 ? {
1949
+ name: t[0],
1950
+ version: t[1]
1951
+ } : {
1952
+ name: t[1],
1953
+ version: t[2]
1954
+ };
1955
+ }
1956
+ function en(e, t, r, n, o = {}, s) {
1957
+ const { value: i } = Rt.getInfoWithoutType(e, Ie.getFMId(t)), a = s || i;
1958
+ if (a && !(0, je.isManifestProvider)(a) && (r(a, t, n), a.remotesInfo)) {
1959
+ const c = Object.keys(a.remotesInfo);
1960
+ for (const l of c) {
1961
+ if (o[l]) continue;
1962
+ o[l] = !0;
1963
+ const u = wi(l), f = a.remotesInfo[l];
1964
+ en(e, {
1965
+ name: u.name,
1966
+ version: f.matchedVersion
1967
+ }, r, !1, o, void 0);
1968
+ }
1969
+ }
1970
+ }
1971
+ const rt = (e, t) => document.querySelector(`${e}[${e === "link" ? "href" : "src"}="${t}"]`);
1972
+ function Fi(e, t, r, n, o) {
1973
+ const s = [], i = [], a = [], c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), { options: u } = e, { preloadConfig: f } = t, { depsRemote: d } = f;
1974
+ if (en(n, r, (p, m, y) => {
1975
+ let g;
1976
+ if (y) g = f;
1977
+ else if (Array.isArray(d)) {
1978
+ const T = d.find((F) => F.nameOrAlias === m.name || F.nameOrAlias === m.alias);
1979
+ if (!T) return;
1980
+ g = Xt.defaultPreloadArgs(T);
1981
+ } else if (d === !0) g = f;
1982
+ else return;
1983
+ const _ = (0, je.getResourceUrl)(p, Ie.getRemoteEntryInfoFromSnapshot(p).url);
1984
+ _ && a.push({
1985
+ name: m.name,
1986
+ moduleInfo: {
1987
+ name: m.name,
1988
+ entry: _,
1989
+ type: "remoteEntryType" in p ? p.remoteEntryType : "global",
1990
+ entryGlobalName: "globalName" in p ? p.globalName : m.name,
1991
+ shareScope: "",
1992
+ version: "version" in p ? p.version : void 0
1993
+ },
1994
+ url: _
1995
+ });
1996
+ let A = "modules" in p ? p.modules : [];
1997
+ const w = Xt.normalizePreloadExposes(g.exposes);
1998
+ w.length && "modules" in p && (A = p?.modules?.reduce((T, F) => (w?.indexOf(F.moduleName) !== -1 && T.push(F), T), []));
1999
+ function P(T) {
2000
+ const F = T.map((W) => (0, je.getResourceUrl)(p, W));
2001
+ return g.filter ? F.filter(g.filter) : F;
2002
+ }
2003
+ if (A) {
2004
+ const T = A.length;
2005
+ for (let F = 0; F < T; F++) {
2006
+ const W = A[F], ze = `${m.name}/${W.moduleName}`;
2007
+ e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({
2008
+ id: W.moduleName === "." ? m.name : ze,
2009
+ name: m.name,
2010
+ remoteSnapshot: p,
2011
+ preloadConfig: g,
2012
+ remote: m,
2013
+ origin: e
2014
+ }), !Rt.getPreloaded(ze) && (g.resourceCategory === "all" ? (s.push(...P(W.assets.css.async)), s.push(...P(W.assets.css.sync)), i.push(...P(W.assets.js.async)), i.push(...P(W.assets.js.sync))) : g.resourceCategory === "sync" && (s.push(...P(W.assets.css.sync)), i.push(...P(W.assets.js.sync))), Rt.setPreloaded(ze));
2015
+ }
2016
+ }
2017
+ }, !0, {}, o), o.shared && o.shared.length > 0) {
2018
+ const p = (m, y) => {
2019
+ const { shared: g } = Ai.getRegisteredShare(e.shareScopeMap, y.sharedName, m, e.sharedHandler.hooks.lifecycle.resolveShare) || {};
2020
+ g && typeof g.lib == "function" && (y.assets.js.sync.forEach((_) => {
2021
+ c.add(_);
2022
+ }), y.assets.css.sync.forEach((_) => {
2023
+ l.add(_);
2024
+ }));
2025
+ };
2026
+ o.shared.forEach((m) => {
2027
+ const y = u.shared?.[m.sharedName];
2028
+ if (!y) return;
2029
+ const g = m.version ? y.find((_) => _.version === m.version) : y;
2030
+ g && Ie.arrayOptions(g).forEach((_) => {
2031
+ p(_, m);
2032
+ });
2033
+ });
2034
+ }
2035
+ const h = i.filter((p) => !c.has(p) && !rt("script", p));
2036
+ return {
2037
+ cssAssets: s.filter((p) => !l.has(p) && !rt("link", p)),
2038
+ jsAssetsWithoutEntry: h,
2039
+ entryAssets: a.filter((p) => !rt("script", p.url))
2040
+ };
2041
+ }
2042
+ const Li = function() {
2043
+ return {
2044
+ name: "generate-preload-assets-plugin",
2045
+ async generatePreloadAssets(e) {
2046
+ const { origin: t, preloadOptions: r, remoteInfo: n, remote: o, globalSnapshot: s, remoteSnapshot: i } = e;
2047
+ return je.isBrowserEnvValue ? Ie.isRemoteInfoWithEntry(o) && Ie.isPureRemoteEntry(o) ? {
2048
+ cssAssets: [],
2049
+ jsAssetsWithoutEntry: [],
2050
+ entryAssets: [{
2051
+ name: o.name,
2052
+ url: o.entry,
2053
+ moduleInfo: {
2054
+ name: n.name,
2055
+ entry: o.entry,
2056
+ type: n.type || "global",
2057
+ entryGlobalName: "",
2058
+ shareScope: ""
2059
+ }
2060
+ }]
2061
+ } : (ki.assignRemoteInfo(n, i), Fi(t, r, n, s, i)) : {
2062
+ cssAssets: [],
2063
+ jsAssetsWithoutEntry: [],
2064
+ entryAssets: []
2065
+ };
2066
+ }
2067
+ };
2068
+ };
2069
+ Qr.generatePreloadAssetsPlugin = Li;
2070
+ var Ye = {};
2071
+ const nt = I, Di = R, U = S, Hi = j, Kt = $e, qi = Me, ot = Pe, Ci = ve;
2072
+ let st = L, ke = K;
2073
+ function tn(e, t) {
2074
+ const r = U.getGlobalSnapshotInfoByModuleInfo({
2075
+ name: t.name,
2076
+ version: t.options.version
2077
+ }), n = r && "remotesInfo" in r && r.remotesInfo && U.getInfoWithoutType(r.remotesInfo, e.name).value;
2078
+ return n && n.matchedVersion ? {
2079
+ hostGlobalSnapshot: r,
2080
+ globalSnapshot: U.getGlobalSnapshot(),
2081
+ remoteSnapshot: U.getGlobalSnapshotInfoByModuleInfo({
2082
+ name: e.name,
2083
+ version: n.matchedVersion
2084
+ })
2085
+ } : {
2086
+ hostGlobalSnapshot: void 0,
2087
+ globalSnapshot: U.getGlobalSnapshot(),
2088
+ remoteSnapshot: U.getGlobalSnapshotInfoByModuleInfo({
2089
+ name: e.name,
2090
+ version: "version" in e ? e.version : void 0
2091
+ })
2092
+ };
2093
+ }
2094
+ var Ui = class {
2095
+ constructor(e) {
2096
+ this.loadingHostSnapshot = null, this.manifestCache = /* @__PURE__ */ new Map(), this.hooks = new Ci.PluginSystem({
2097
+ beforeLoadRemoteSnapshot: new qi.AsyncHook("beforeLoadRemoteSnapshot"),
2098
+ loadSnapshot: new ot.AsyncWaterfallHook("loadGlobalSnapshot"),
2099
+ loadRemoteSnapshot: new ot.AsyncWaterfallHook("loadRemoteSnapshot"),
2100
+ afterLoadSnapshot: new ot.AsyncWaterfallHook("afterLoadSnapshot")
2101
+ }), this.manifestLoading = U.Global.__FEDERATION__.__MANIFEST_LOADING__, this.HostInstance = e, this.loaderHook = e.loaderHook;
2102
+ }
2103
+ async loadRemoteSnapshotInfo({ moduleInfo: e, id: t, expose: r }) {
2104
+ const { options: n } = this.HostInstance;
2105
+ await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({
2106
+ options: n,
2107
+ moduleInfo: e
2108
+ });
2109
+ let o = U.getGlobalSnapshotInfoByModuleInfo({
2110
+ name: this.HostInstance.options.name,
2111
+ version: this.HostInstance.options.version
2112
+ });
2113
+ o || (o = {
2114
+ version: this.HostInstance.options.version || "",
2115
+ remoteEntry: "",
2116
+ remotesInfo: {}
2117
+ }, U.addGlobalSnapshot({ [this.HostInstance.options.name]: o })), o && "remotesInfo" in o && !U.getInfoWithoutType(o.remotesInfo, e.name).value && ("version" in e || "entry" in e) && (o.remotesInfo = {
2118
+ ...o?.remotesInfo,
2119
+ [e.name]: { matchedVersion: "version" in e ? e.version : e.entry }
2120
+ });
2121
+ const { hostGlobalSnapshot: s, remoteSnapshot: i, globalSnapshot: a } = this.getGlobalRemoteInfo(e), { remoteSnapshot: c, globalSnapshot: l } = await this.hooks.lifecycle.loadSnapshot.emit({
2122
+ options: n,
2123
+ moduleInfo: e,
2124
+ hostGlobalSnapshot: s,
2125
+ remoteSnapshot: i,
2126
+ globalSnapshot: a
2127
+ });
2128
+ let u, f;
2129
+ if (c) if ((0, st.isManifestProvider)(c)) {
2130
+ const d = st.isBrowserEnvValue ? c.remoteEntry : c.ssrRemoteEntry || c.remoteEntry || "", h = await this.getManifestJson(d, e, {}), p = U.setGlobalSnapshotInfoByModuleInfo({
2131
+ ...e,
2132
+ entry: d
2133
+ }, h);
2134
+ u = h, f = p;
2135
+ } else {
2136
+ const { remoteSnapshot: d } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
2137
+ options: this.HostInstance.options,
2138
+ moduleInfo: e,
2139
+ remoteSnapshot: c,
2140
+ from: "global"
2141
+ });
2142
+ u = d, f = l;
2143
+ }
2144
+ else if (Di.isRemoteInfoWithEntry(e)) {
2145
+ const d = await this.getManifestJson(e.entry, e, {}), h = U.setGlobalSnapshotInfoByModuleInfo(e, d), { remoteSnapshot: p } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
2146
+ options: this.HostInstance.options,
2147
+ moduleInfo: e,
2148
+ remoteSnapshot: d,
2149
+ from: "global"
2150
+ });
2151
+ u = p, f = h;
2152
+ } else nt.error(ke.RUNTIME_007, ke.runtimeDescMap, {
2153
+ remoteName: e.name,
2154
+ remoteVersion: e.version,
2155
+ hostName: this.HostInstance.options.name,
2156
+ globalSnapshot: JSON.stringify(l)
2157
+ }, void 0, Kt.optionsToMFContext(this.HostInstance.options));
2158
+ return await this.hooks.lifecycle.afterLoadSnapshot.emit({
2159
+ id: t,
2160
+ host: this.HostInstance,
2161
+ options: n,
2162
+ moduleInfo: e,
2163
+ remoteSnapshot: u
2164
+ }), {
2165
+ remoteSnapshot: u,
2166
+ globalSnapshot: f
2167
+ };
2168
+ }
2169
+ getGlobalRemoteInfo(e) {
2170
+ return tn(e, this.HostInstance);
2171
+ }
2172
+ async getManifestJson(e, t, r) {
2173
+ const n = async () => {
2174
+ let s = this.manifestCache.get(e);
2175
+ if (s) return s;
2176
+ try {
2177
+ let i = await this.loaderHook.lifecycle.fetch.emit(e, {}, Hi.getRemoteInfo(t));
2178
+ (!i || !(i instanceof Response)) && (i = await fetch(e, {})), s = await i.json();
2179
+ } catch (i) {
2180
+ s = await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
2181
+ id: e,
2182
+ error: i,
2183
+ from: "runtime",
2184
+ lifecycle: "afterResolve",
2185
+ origin: this.HostInstance
2186
+ }), s || (delete this.manifestLoading[e], nt.error(ke.RUNTIME_003, ke.runtimeDescMap, {
2187
+ manifestUrl: e,
2188
+ moduleName: t.name,
2189
+ hostName: this.HostInstance.options.name
2190
+ }, `${i}`, Kt.optionsToMFContext(this.HostInstance.options)));
2191
+ }
2192
+ return nt.assert(s.metaData && s.exposes && s.shared, `"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[
2193
+ !s.metaData && "metaData",
2194
+ !s.exposes && "exposes",
2195
+ !s.shared && "shared"
2196
+ ].filter(Boolean).join(", ")}.`), this.manifestCache.set(e, s), s;
2197
+ }, o = async () => {
2198
+ const s = await n(), i = (0, st.generateSnapshotFromManifest)(s, { version: e }), { remoteSnapshot: a } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
2199
+ options: this.HostInstance.options,
2200
+ moduleInfo: t,
2201
+ manifestJson: s,
2202
+ remoteSnapshot: i,
2203
+ manifestUrl: e,
2204
+ from: "manifest"
2205
+ });
2206
+ return a;
2207
+ };
2208
+ return this.manifestLoading[e] || (this.manifestLoading[e] = o().then((s) => s)), this.manifestLoading[e];
2209
+ }
2210
+ };
2211
+ Ye.SnapshotHandler = Ui;
2212
+ Ye.getGlobalRemoteInfo = tn;
2213
+ var rn = {};
2214
+ const it = I, Gi = re, N = q, Yt = $e, Wi = Me, at = me, zt = Pe, Bi = ve;
2215
+ let _e = K;
2216
+ var Vi = class {
2217
+ constructor(e) {
2218
+ this.hooks = new Bi.PluginSystem({
2219
+ beforeRegisterShare: new at.SyncWaterfallHook("beforeRegisterShare"),
2220
+ afterResolve: new zt.AsyncWaterfallHook("afterResolve"),
2221
+ beforeLoadShare: new zt.AsyncWaterfallHook("beforeLoadShare"),
2222
+ loadShare: new Wi.AsyncHook(),
2223
+ resolveShare: new at.SyncWaterfallHook("resolveShare"),
2224
+ initContainerShareScopeMap: new at.SyncWaterfallHook("initContainerShareScopeMap")
2225
+ }), this.host = e, this.shareScopeMap = {}, this.initTokens = {}, this._setGlobalShareScopeMap(e.options);
2226
+ }
2227
+ registerShared(e, t) {
2228
+ const { newShareInfos: r, allShareInfos: n } = N.formatShareConfigs(e, t);
2229
+ return Object.keys(r).forEach((o) => {
2230
+ r[o].forEach((s) => {
2231
+ s.scope.forEach((i) => {
2232
+ this.hooks.lifecycle.beforeRegisterShare.emit({
2233
+ origin: this.host,
2234
+ pkgName: o,
2235
+ shared: s
2236
+ }), this.shareScopeMap[i]?.[o] || this.setShared({
2237
+ pkgName: o,
2238
+ lib: s.lib,
2239
+ get: s.get,
2240
+ loaded: s.loaded || !!s.lib,
2241
+ shared: s,
2242
+ from: t.name
2243
+ });
2244
+ });
2245
+ });
2246
+ }), {
2247
+ newShareInfos: r,
2248
+ allShareInfos: n
2249
+ };
2250
+ }
2251
+ async loadShare(e, t) {
2252
+ const { host: r } = this, n = N.getTargetSharedOptions({
2253
+ pkgName: e,
2254
+ extraOptions: t,
2255
+ shareInfos: r.options.shared
2256
+ });
2257
+ n?.scope && await Promise.all(n.scope.map(async (a) => {
2258
+ await Promise.all(this.initializeSharing(a, { strategy: n.strategy }));
2259
+ }));
2260
+ const { shareInfo: o } = await this.hooks.lifecycle.beforeLoadShare.emit({
2261
+ pkgName: e,
2262
+ shareInfo: n,
2263
+ shared: r.options.shared,
2264
+ origin: r
2265
+ });
2266
+ it.assert(o, `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.`);
2267
+ const { shared: s, useTreesShaking: i } = N.getRegisteredShare(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
2268
+ if (s) {
2269
+ const a = N.directShare(s, i);
2270
+ if (a.lib)
2271
+ return N.addUseIn(a, r.options.name), a.lib;
2272
+ if (a.loading && !a.loaded) {
2273
+ const c = await a.loading;
2274
+ return a.loaded = !0, a.lib || (a.lib = c), N.addUseIn(a, r.options.name), c;
2275
+ } else {
2276
+ const l = (async () => {
2277
+ const u = await a.get();
2278
+ return N.addUseIn(a, r.options.name), a.loaded = !0, a.lib = u, u;
2279
+ })();
2280
+ return this.setShared({
2281
+ pkgName: e,
2282
+ loaded: !1,
2283
+ shared: s,
2284
+ from: r.options.name,
2285
+ lib: null,
2286
+ loading: l,
2287
+ treeShaking: i ? a : void 0
2288
+ }), l;
2289
+ }
2290
+ } else {
2291
+ if (t?.customShareInfo) return !1;
2292
+ const a = N.shouldUseTreeShaking(o.treeShaking), c = N.directShare(o, a), u = (async () => {
2293
+ const f = await c.get();
2294
+ c.lib = f, c.loaded = !0, N.addUseIn(c, r.options.name);
2295
+ const { shared: d, useTreesShaking: h } = N.getRegisteredShare(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
2296
+ if (d) {
2297
+ const p = N.directShare(d, h);
2298
+ p.lib = f, p.loaded = !0, d.from = o.from;
2299
+ }
2300
+ return f;
2301
+ })();
2302
+ return this.setShared({
2303
+ pkgName: e,
2304
+ loaded: !1,
2305
+ shared: o,
2306
+ from: r.options.name,
2307
+ lib: null,
2308
+ loading: u,
2309
+ treeShaking: a ? c : void 0
2310
+ }), u;
2311
+ }
2312
+ }
2313
+ /**
2314
+ * This function initializes the sharing sequence (executed only once per share scope).
2315
+ * It accepts one argument, the name of the share scope.
2316
+ * If the share scope does not exist, it creates one.
2317
+ */
2318
+ initializeSharing(e = Gi.DEFAULT_SCOPE, t) {
2319
+ const { host: r } = this, n = t?.from, o = t?.strategy;
2320
+ let s = t?.initScope;
2321
+ const i = [];
2322
+ if (n !== "build") {
2323
+ const { initTokens: d } = this;
2324
+ s || (s = []);
2325
+ let h = d[e];
2326
+ if (h || (h = d[e] = { from: this.host.name }), s.indexOf(h) >= 0) return i;
2327
+ s.push(h);
2328
+ }
2329
+ const a = this.shareScopeMap, c = r.options.name;
2330
+ a[e] || (a[e] = {});
2331
+ const l = a[e], u = (d, h) => {
2332
+ const { version: p, eager: m } = h;
2333
+ l[d] = l[d] || {};
2334
+ const y = l[d], g = y[p] && N.directShare(y[p]), _ = !!(g && ("eager" in g && g.eager || "shareConfig" in g && g.shareConfig?.eager));
2335
+ (!g || g.strategy !== "loaded-first" && !g.loaded && (!m != !_ ? m : c > y[p].from)) && (y[p] = h);
2336
+ }, f = async (d) => {
2337
+ const { module: h } = await r.remoteHandler.getRemoteModuleAndOptions({ id: d });
2338
+ let p;
2339
+ try {
2340
+ p = await h.getEntry();
2341
+ } catch (m) {
2342
+ if (p = await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
2343
+ id: d,
2344
+ error: m,
2345
+ from: "runtime",
2346
+ lifecycle: "beforeLoadShare",
2347
+ origin: r
2348
+ }), !p) return;
2349
+ } finally {
2350
+ p?.init && !h.initing && (h.remoteEntryExports = p, await h.init(void 0, void 0, s));
2351
+ }
2352
+ };
2353
+ return Object.keys(r.options.shared).forEach((d) => {
2354
+ r.options.shared[d].forEach((h) => {
2355
+ h.scope.includes(e) && u(d, h);
2356
+ });
2357
+ }), (r.options.shareStrategy === "version-first" || o === "version-first") && r.options.remotes.forEach((d) => {
2358
+ d.shareScope === e && i.push(f(d.name));
2359
+ }), i;
2360
+ }
2361
+ loadShareSync(e, t) {
2362
+ const { host: r } = this, n = N.getTargetSharedOptions({
2363
+ pkgName: e,
2364
+ extraOptions: t,
2365
+ shareInfos: r.options.shared
2366
+ });
2367
+ n?.scope && n.scope.forEach((i) => {
2368
+ this.initializeSharing(i, { strategy: n.strategy });
2369
+ });
2370
+ const { shared: o, useTreesShaking: s } = N.getRegisteredShare(this.shareScopeMap, e, n, this.hooks.lifecycle.resolveShare) || {};
2371
+ if (o) {
2372
+ if (typeof o.lib == "function")
2373
+ return N.addUseIn(o, r.options.name), o.loaded || (o.loaded = !0, o.from === r.options.name && (n.loaded = !0)), o.lib;
2374
+ if (typeof o.get == "function") {
2375
+ const i = o.get();
2376
+ if (!(i instanceof Promise))
2377
+ return N.addUseIn(o, r.options.name), this.setShared({
2378
+ pkgName: e,
2379
+ loaded: !0,
2380
+ from: r.options.name,
2381
+ lib: i,
2382
+ shared: o
2383
+ }), i;
2384
+ }
2385
+ }
2386
+ if (n.lib)
2387
+ return n.loaded || (n.loaded = !0), n.lib;
2388
+ if (n.get) {
2389
+ const i = n.get();
2390
+ return i instanceof Promise && it.error(t?.from === "build" ? _e.RUNTIME_005 : _e.RUNTIME_006, _e.runtimeDescMap, {
2391
+ hostName: r.options.name,
2392
+ sharedPkgName: e
2393
+ }, void 0, Yt.optionsToMFContext(r.options)), n.lib = i, this.setShared({
2394
+ pkgName: e,
2395
+ loaded: !0,
2396
+ from: r.options.name,
2397
+ lib: n.lib,
2398
+ shared: n
2399
+ }), n.lib;
2400
+ }
2401
+ it.error(_e.RUNTIME_006, _e.runtimeDescMap, {
2402
+ hostName: r.options.name,
2403
+ sharedPkgName: e
2404
+ }, void 0, Yt.optionsToMFContext(r.options));
2405
+ }
2406
+ initShareScopeMap(e, t, r = {}) {
2407
+ const { host: n } = this;
2408
+ this.shareScopeMap[e] = t, this.hooks.lifecycle.initContainerShareScopeMap.emit({
2409
+ shareScope: t,
2410
+ options: n.options,
2411
+ origin: n,
2412
+ scopeName: e,
2413
+ hostShareScopeMap: r.hostShareScopeMap
2414
+ });
2415
+ }
2416
+ setShared({ pkgName: e, shared: t, from: r, lib: n, loading: o, loaded: s, get: i, treeShaking: a }) {
2417
+ const { version: c, scope: l = "default", ...u } = t, f = Array.isArray(l) ? l : [l], d = (h) => {
2418
+ const p = (y, g, _) => {
2419
+ _ && !y[g] && (y[g] = _);
2420
+ }, m = a ? h.treeShaking : h;
2421
+ p(m, "loaded", s), p(m, "loading", o), p(m, "get", i);
2422
+ };
2423
+ f.forEach((h) => {
2424
+ this.shareScopeMap[h] || (this.shareScopeMap[h] = {}), this.shareScopeMap[h][e] || (this.shareScopeMap[h][e] = {}), this.shareScopeMap[h][e][c] || (this.shareScopeMap[h][e][c] = {
2425
+ version: c,
2426
+ scope: [h],
2427
+ ...u,
2428
+ lib: n
2429
+ });
2430
+ const p = this.shareScopeMap[h][e][c];
2431
+ d(p), r && p.from !== r && (p.from = r);
2432
+ });
2433
+ }
2434
+ _setGlobalShareScopeMap(e) {
2435
+ const t = N.getGlobalShareScope(), r = e.id || e.name;
2436
+ r && !t[r] && (t[r] = this.shareScopeMap);
2437
+ }
2438
+ };
2439
+ rn.SharedHandler = Vi;
2440
+ var nn = {};
2441
+ const we = I, C = S, Jt = re, ji = q, xi = de, lt = j, Xi = $e, Zt = J, Ki = Xe, Yi = he, oe = Me, Qt = me, zi = Pe, Ji = ve, Zi = Ye;
2442
+ let ct = L, er = K;
2443
+ var Qi = class {
2444
+ constructor(e) {
2445
+ this.hooks = new Ji.PluginSystem({
2446
+ beforeRegisterRemote: new Qt.SyncWaterfallHook("beforeRegisterRemote"),
2447
+ registerRemote: new Qt.SyncWaterfallHook("registerRemote"),
2448
+ beforeRequest: new zi.AsyncWaterfallHook("beforeRequest"),
2449
+ onLoad: new oe.AsyncHook("onLoad"),
2450
+ handlePreloadModule: new Yi.SyncHook("handlePreloadModule"),
2451
+ errorLoadRemote: new oe.AsyncHook("errorLoadRemote"),
2452
+ beforePreloadRemote: new oe.AsyncHook("beforePreloadRemote"),
2453
+ generatePreloadAssets: new oe.AsyncHook("generatePreloadAssets"),
2454
+ afterPreloadRemote: new oe.AsyncHook(),
2455
+ loadEntry: new oe.AsyncHook()
2456
+ }), this.host = e, this.idToRemoteMap = {};
2457
+ }
2458
+ formatAndRegisterRemote(e, t) {
2459
+ return (t.remotes || []).reduce((r, n) => (this.registerRemote(n, r, { force: !1 }), r), e.remotes);
2460
+ }
2461
+ setIdToRemoteMap(e, t) {
2462
+ const { remote: r, expose: n } = t, { name: o, alias: s } = r;
2463
+ if (this.idToRemoteMap[e] = {
2464
+ name: r.name,
2465
+ expose: n
2466
+ }, s && e.startsWith(o)) {
2467
+ const i = e.replace(o, s);
2468
+ this.idToRemoteMap[i] = {
2469
+ name: r.name,
2470
+ expose: n
2471
+ };
2472
+ return;
2473
+ }
2474
+ if (s && e.startsWith(s)) {
2475
+ const i = e.replace(s, o);
2476
+ this.idToRemoteMap[i] = {
2477
+ name: r.name,
2478
+ expose: n
2479
+ };
2480
+ }
2481
+ }
2482
+ async loadRemote(e, t) {
2483
+ const { host: r } = this;
2484
+ try {
2485
+ const { loadFactory: n = !0 } = t || { loadFactory: !0 }, { module: o, moduleOptions: s, remoteMatchInfo: i } = await this.getRemoteModuleAndOptions({ id: e }), { pkgNameOrAlias: a, remote: c, expose: l, id: u, remoteSnapshot: f } = i, d = await o.get(u, l, t, f), h = await this.hooks.lifecycle.onLoad.emit({
2486
+ id: u,
2487
+ pkgNameOrAlias: a,
2488
+ expose: l,
2489
+ exposeModule: n ? d : void 0,
2490
+ exposeModuleFactory: n ? void 0 : d,
2491
+ remote: c,
2492
+ options: s,
2493
+ moduleInstance: o,
2494
+ origin: r
2495
+ });
2496
+ return this.setIdToRemoteMap(e, i), typeof h == "function" ? h : d;
2497
+ } catch (n) {
2498
+ const { from: o = "runtime" } = t || { from: "runtime" }, s = await this.hooks.lifecycle.errorLoadRemote.emit({
2499
+ id: e,
2500
+ error: n,
2501
+ from: o,
2502
+ lifecycle: "onLoad",
2503
+ origin: r
2504
+ });
2505
+ if (!s) throw n;
2506
+ return s;
2507
+ }
2508
+ }
2509
+ async preloadRemote(e) {
2510
+ const { host: t } = this;
2511
+ await this.hooks.lifecycle.beforePreloadRemote.emit({
2512
+ preloadOps: e,
2513
+ options: t.options,
2514
+ origin: t
2515
+ });
2516
+ const r = Zt.formatPreloadArgs(t.options.remotes, e);
2517
+ await Promise.all(r.map(async (n) => {
2518
+ const { remote: o } = n, s = lt.getRemoteInfo(o), { globalSnapshot: i, remoteSnapshot: a } = await t.snapshotHandler.loadRemoteSnapshotInfo({ moduleInfo: o }), c = await this.hooks.lifecycle.generatePreloadAssets.emit({
2519
+ origin: t,
2520
+ preloadOptions: n,
2521
+ remote: o,
2522
+ remoteInfo: s,
2523
+ globalSnapshot: i,
2524
+ remoteSnapshot: a
2525
+ });
2526
+ c && Zt.preloadAssets(s, t, c);
2527
+ }));
2528
+ }
2529
+ registerRemotes(e, t) {
2530
+ const { host: r } = this;
2531
+ e.forEach((n) => {
2532
+ this.registerRemote(n, r.options.remotes, { force: t?.force });
2533
+ });
2534
+ }
2535
+ async getRemoteModuleAndOptions(e) {
2536
+ const { host: t } = this, { id: r } = e;
2537
+ let n;
2538
+ try {
2539
+ n = await this.hooks.lifecycle.beforeRequest.emit({
2540
+ id: r,
2541
+ options: t.options,
2542
+ origin: t
2543
+ });
2544
+ } catch (h) {
2545
+ if (n = await this.hooks.lifecycle.errorLoadRemote.emit({
2546
+ id: r,
2547
+ options: t.options,
2548
+ origin: t,
2549
+ from: "runtime",
2550
+ error: h,
2551
+ lifecycle: "beforeRequest"
2552
+ }), !n) throw h;
2553
+ }
2554
+ const { id: o } = n, s = xi.matchRemoteWithNameAndExpose(t.options.remotes, o);
2555
+ s || we.error(er.RUNTIME_004, er.runtimeDescMap, {
2556
+ hostName: t.options.name,
2557
+ requestId: o
2558
+ }, void 0, Xi.optionsToMFContext(t.options));
2559
+ const { remote: i } = s, a = lt.getRemoteInfo(i), c = await t.sharedHandler.hooks.lifecycle.afterResolve.emit({
2560
+ id: o,
2561
+ ...s,
2562
+ options: t.options,
2563
+ origin: t,
2564
+ remoteInfo: a
2565
+ }), { remote: l, expose: u } = c;
2566
+ we.assert(l && u, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);
2567
+ let f = t.moduleCache.get(l.name);
2568
+ const d = {
2569
+ host: t,
2570
+ remoteInfo: a
2571
+ };
2572
+ return f || (f = new Ki.Module(d), t.moduleCache.set(l.name, f)), {
2573
+ module: f,
2574
+ moduleOptions: d,
2575
+ remoteMatchInfo: c
2576
+ };
2577
+ }
2578
+ registerRemote(e, t, r) {
2579
+ const { host: n } = this, o = () => {
2580
+ if (e.alias) {
2581
+ const i = t.find((a) => e.alias && (a.name.startsWith(e.alias) || a.alias?.startsWith(e.alias)));
2582
+ we.assert(!i, `The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i && i.name} name or alias`);
2583
+ }
2584
+ "entry" in e && ct.isBrowserEnvValue && typeof window < "u" && !e.entry.startsWith("http") && (e.entry = new URL(e.entry, window.location.origin).href), e.shareScope || (e.shareScope = Jt.DEFAULT_SCOPE), e.type || (e.type = Jt.DEFAULT_REMOTE_TYPE);
2585
+ };
2586
+ this.hooks.lifecycle.beforeRegisterRemote.emit({
2587
+ remote: e,
2588
+ origin: n
2589
+ });
2590
+ const s = t.find((i) => i.name === e.name);
2591
+ if (!s)
2592
+ o(), t.push(e), this.hooks.lifecycle.registerRemote.emit({
2593
+ remote: e,
2594
+ origin: n
2595
+ });
2596
+ else {
2597
+ const i = [`The remote "${e.name}" is already registered.`, "Please note that overriding it may cause unexpected errors."];
2598
+ r?.force && (this.removeRemote(s), o(), t.push(e), this.hooks.lifecycle.registerRemote.emit({
2599
+ remote: e,
2600
+ origin: n
2601
+ }), (0, ct.warn)(i.join(" ")));
2602
+ }
2603
+ }
2604
+ removeRemote(e) {
2605
+ try {
2606
+ const { host: t } = this, { name: r } = e, n = t.options.remotes.findIndex((s) => s.name === r);
2607
+ n !== -1 && t.options.remotes.splice(n, 1);
2608
+ const o = t.moduleCache.get(e.name);
2609
+ if (o) {
2610
+ const s = o.remoteInfo, i = s.entryGlobalName;
2611
+ C.CurrentGlobal[i] && (Object.getOwnPropertyDescriptor(C.CurrentGlobal, i)?.configurable ? delete C.CurrentGlobal[i] : C.CurrentGlobal[i] = void 0);
2612
+ const a = lt.getRemoteEntryUniqueKey(o.remoteInfo);
2613
+ C.globalLoading[a] && delete C.globalLoading[a], t.snapshotHandler.manifestCache.delete(s.entry);
2614
+ let c = s.buildVersion ? (0, ct.composeKeyWithSeparator)(s.name, s.buildVersion) : s.name;
2615
+ const l = C.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex((f) => s.buildVersion ? f.options.id === c : f.name === c);
2616
+ if (l !== -1) {
2617
+ const f = C.CurrentGlobal.__FEDERATION__.__INSTANCES__[l];
2618
+ c = f.options.id || c;
2619
+ const d = ji.getGlobalShareScope();
2620
+ let h = !0;
2621
+ const p = [];
2622
+ Object.keys(d).forEach((m) => {
2623
+ const y = d[m];
2624
+ y && Object.keys(y).forEach((g) => {
2625
+ const _ = y[g];
2626
+ _ && Object.keys(_).forEach((A) => {
2627
+ const w = _[A];
2628
+ w && Object.keys(w).forEach((P) => {
2629
+ const T = w[P];
2630
+ T && typeof T == "object" && T.from === s.name && (T.loaded || T.loading ? (T.useIn = T.useIn.filter((F) => F !== s.name), T.useIn.length ? h = !1 : p.push([
2631
+ m,
2632
+ g,
2633
+ A,
2634
+ P
2635
+ ])) : p.push([
2636
+ m,
2637
+ g,
2638
+ A,
2639
+ P
2640
+ ]));
2641
+ });
2642
+ });
2643
+ });
2644
+ }), h && (f.shareScopeMap = {}, delete d[c]), p.forEach(([m, y, g, _]) => {
2645
+ delete d[m]?.[y]?.[g]?.[_];
2646
+ }), C.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(l, 1);
2647
+ }
2648
+ const { hostGlobalSnapshot: u } = Zi.getGlobalRemoteInfo(e, t);
2649
+ if (u) {
2650
+ const f = u && "remotesInfo" in u && u.remotesInfo && C.getInfoWithoutType(u.remotesInfo, e.name).key;
2651
+ f && (delete u.remotesInfo[f], C.Global.__FEDERATION__.__MANIFEST_LOADING__[f] && delete C.Global.__FEDERATION__.__MANIFEST_LOADING__[f]);
2652
+ }
2653
+ t.moduleCache.delete(e.name);
2654
+ }
2655
+ } catch (t) {
2656
+ we.logger.error(`removeRemote failed: ${t instanceof Error ? t.message : String(t)}`);
2657
+ }
2658
+ }
2659
+ };
2660
+ nn.RemoteHandler = Qi;
2661
+ const ea = I, ta = re, ra = q, na = jr, oa = xr, sa = j, ia = Xe, Y = he, ut = Me, aa = me, tr = Pe, ft = ve, la = Ke, ca = Qr, ua = Ye, fa = rn, da = nn;
2662
+ let ha = L, dt = K;
2663
+ const ma = typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN == "boolean" ? !FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN : !0;
2664
+ var pa = class {
2665
+ constructor(e) {
2666
+ this.hooks = new ft.PluginSystem({
2667
+ beforeInit: new aa.SyncWaterfallHook("beforeInit"),
2668
+ init: new Y.SyncHook(),
2669
+ beforeInitContainer: new tr.AsyncWaterfallHook("beforeInitContainer"),
2670
+ initContainer: new tr.AsyncWaterfallHook("initContainer")
2671
+ }), this.version = "2.4.0", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new ft.PluginSystem({
2672
+ getModuleInfo: new Y.SyncHook(),
2673
+ createScript: new Y.SyncHook(),
2674
+ createLink: new Y.SyncHook(),
2675
+ fetch: new ut.AsyncHook(),
2676
+ loadEntryError: new ut.AsyncHook(),
2677
+ getModuleFactory: new ut.AsyncHook()
2678
+ }), this.bridgeHook = new ft.PluginSystem({
2679
+ beforeBridgeRender: new Y.SyncHook(),
2680
+ afterBridgeRender: new Y.SyncHook(),
2681
+ beforeBridgeDestroy: new Y.SyncHook(),
2682
+ afterBridgeDestroy: new Y.SyncHook()
2683
+ });
2684
+ const t = ma ? [la.snapshotPlugin(), ca.generatePreloadAssetsPlugin()] : [], r = {
2685
+ id: na.getBuilderId(),
2686
+ name: e.name,
2687
+ plugins: t,
2688
+ remotes: [],
2689
+ shared: {},
2690
+ inBrowser: ha.isBrowserEnvValue
2691
+ };
2692
+ this.name = e.name, this.options = r, this.snapshotHandler = new ua.SnapshotHandler(this), this.sharedHandler = new fa.SharedHandler(this), this.remoteHandler = new da.RemoteHandler(this), this.shareScopeMap = this.sharedHandler.shareScopeMap, this.registerPlugins([...r.plugins, ...e.plugins || []]), this.options = this.formatOptions(r, e);
2693
+ }
2694
+ initOptions(e) {
2695
+ e.name && e.name !== this.options.name && ea.error((0, dt.getShortErrorMsg)(dt.RUNTIME_010, dt.runtimeDescMap)), this.registerPlugins(e.plugins);
2696
+ const t = this.formatOptions(this.options, e);
2697
+ return this.options = t, t;
2698
+ }
2699
+ async loadShare(e, t) {
2700
+ return this.sharedHandler.loadShare(e, t);
2701
+ }
2702
+ loadShareSync(e, t) {
2703
+ return this.sharedHandler.loadShareSync(e, t);
2704
+ }
2705
+ initializeSharing(e = ta.DEFAULT_SCOPE, t) {
2706
+ return this.sharedHandler.initializeSharing(e, t);
2707
+ }
2708
+ initRawContainer(e, t, r) {
2709
+ const n = sa.getRemoteInfo({
2710
+ name: e,
2711
+ entry: t
2712
+ }), o = new ia.Module({
2713
+ host: this,
2714
+ remoteInfo: n
2715
+ });
2716
+ return o.remoteEntryExports = r, this.moduleCache.set(e, o), o;
2717
+ }
2718
+ async loadRemote(e, t) {
2719
+ return this.remoteHandler.loadRemote(e, t);
2720
+ }
2721
+ async preloadRemote(e) {
2722
+ return this.remoteHandler.preloadRemote(e);
2723
+ }
2724
+ initShareScopeMap(e, t, r = {}) {
2725
+ this.sharedHandler.initShareScopeMap(e, t, r);
2726
+ }
2727
+ formatOptions(e, t) {
2728
+ const { allShareInfos: r } = ra.formatShareConfigs(e, t), { userOptions: n, options: o } = this.hooks.lifecycle.beforeInit.emit({
2729
+ origin: this,
2730
+ userOptions: t,
2731
+ options: e,
2732
+ shareInfo: r
2733
+ }), s = this.remoteHandler.formatAndRegisterRemote(o, n), { allShareInfos: i } = this.sharedHandler.registerShared(o, n), a = [...o.plugins];
2734
+ n.plugins && n.plugins.forEach((l) => {
2735
+ a.includes(l) || a.push(l);
2736
+ });
2737
+ const c = {
2738
+ ...e,
2739
+ ...t,
2740
+ plugins: a,
2741
+ remotes: s,
2742
+ shared: i,
2743
+ id: n.id || e.id
2744
+ };
2745
+ return this.hooks.lifecycle.init.emit({
2746
+ origin: this,
2747
+ options: c
2748
+ }), c;
2749
+ }
2750
+ registerPlugins(e) {
2751
+ const t = oa.registerPlugins(e, this);
2752
+ this.options.plugins = this.options.plugins.reduce((r, n) => (n && r && !r.find((o) => o.name === n.name) && r.push(n), r), t || []);
2753
+ }
2754
+ registerRemotes(e, t) {
2755
+ return this.remoteHandler.registerRemotes(e, t);
2756
+ }
2757
+ registerShared(e) {
2758
+ this.sharedHandler.registerShared(this.options, {
2759
+ ...this.options,
2760
+ shared: e
2761
+ });
2762
+ }
2763
+ };
2764
+ Yr.ModuleFederation = pa;
2765
+ var on = {}, sn = {}, rr = Object.defineProperty, _a = (e, t) => {
2766
+ let r = {};
2767
+ for (var n in e)
2768
+ rr(r, n, {
2769
+ get: e[n],
2770
+ enumerable: !0
2771
+ });
2772
+ return t || rr(r, Symbol.toStringTag, { value: "Module" }), r;
2773
+ };
2774
+ sn.__exportAll = _a;
2775
+ (function(e) {
2776
+ var r = /* @__PURE__ */ sn.__exportAll({});
2777
+ Object.defineProperty(e, "type_exports", {
2778
+ enumerable: !0,
2779
+ get: function() {
2780
+ return r;
2781
+ }
2782
+ });
2783
+ })(on);
2784
+ (function(e) {
2785
+ Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
2786
+ const t = I, r = R, n = S, o = vt, s = q, i = de, a = j, c = Xr, l = Xe, u = Yr, f = on;
2787
+ let d = L;
2788
+ const h = c.default;
2789
+ e.CurrentGlobal = n.CurrentGlobal, e.Global = n.Global, e.Module = l.Module, e.ModuleFederation = u.ModuleFederation, e.addGlobalSnapshot = n.addGlobalSnapshot, e.assert = t.assert, e.error = t.error, e.getGlobalFederationConstructor = n.getGlobalFederationConstructor, e.getGlobalSnapshot = n.getGlobalSnapshot, e.getInfoWithoutType = n.getInfoWithoutType, e.getRegisteredShare = s.getRegisteredShare, e.getRemoteEntry = a.getRemoteEntry, e.getRemoteInfo = a.getRemoteInfo, e.helpers = h, e.isStaticResourcesEqual = r.isStaticResourcesEqual, Object.defineProperty(e, "loadScript", {
2790
+ enumerable: !0,
2791
+ get: function() {
2792
+ return d.loadScript;
2793
+ }
2794
+ }), Object.defineProperty(e, "loadScriptNode", {
2795
+ enumerable: !0,
2796
+ get: function() {
2797
+ return d.loadScriptNode;
2798
+ }
2799
+ }), e.matchRemoteWithNameAndExpose = i.matchRemoteWithNameAndExpose, e.registerGlobalPlugins = n.registerGlobalPlugins, e.resetFederationGlobalInfo = n.resetFederationGlobalInfo, e.safeWrapper = r.safeWrapper, e.satisfy = o.satisfy, e.setGlobalFederationConstructor = n.setGlobalFederationConstructor, e.setGlobalFederationInstance = n.setGlobalFederationInstance, Object.defineProperty(e, "types", {
2800
+ enumerable: !0,
2801
+ get: function() {
2802
+ return f.type_exports;
2803
+ }
2804
+ });
2805
+ })(It);
2806
+ let ga = It;
2807
+ function ya() {
2808
+ return typeof FEDERATION_BUILD_IDENTIFIER < "u" ? FEDERATION_BUILD_IDENTIFIER : "";
2809
+ }
2810
+ function Ea(e, t) {
2811
+ const r = ya();
2812
+ return ga.CurrentGlobal.__FEDERATION__.__INSTANCES__.find((n) => !!(r && n.options.id === r || n.options.name === e && !n.options.version && !t || n.options.name === e && t && n.options.version === t));
2813
+ }
2814
+ ar.getGlobalFederationInstance = Ea;
2815
+ (function(e) {
2816
+ Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
2817
+ const t = ar;
2818
+ let r = It, n = K;
2819
+ function o(m) {
2820
+ const y = new ((0, r.getGlobalFederationConstructor)() || r.ModuleFederation)({
2821
+ id: `${m.name}@${m.version || Date.now()}`,
2822
+ ...m
2823
+ });
2824
+ return (0, r.setGlobalFederationInstance)(y), y;
2825
+ }
2826
+ let s = null;
2827
+ function i(m) {
2828
+ const y = t.getGlobalFederationInstance(m.name, m.version), g = {
2829
+ ...m,
2830
+ id: m.id || ""
2831
+ };
2832
+ return y ? (y.initOptions(g), s || (s = y), y) : (s = o(g), s);
2833
+ }
2834
+ function a(...m) {
2835
+ return (0, r.assert)(s, n.RUNTIME_009, n.runtimeDescMap), s.loadRemote.apply(s, m);
2836
+ }
2837
+ function c(...m) {
2838
+ return (0, r.assert)(s, n.RUNTIME_009, n.runtimeDescMap), s.loadShare.apply(s, m);
2839
+ }
2840
+ function l(...m) {
2841
+ return (0, r.assert)(s, n.RUNTIME_009, n.runtimeDescMap), s.loadShareSync.apply(s, m);
2842
+ }
2843
+ function u(...m) {
2844
+ return (0, r.assert)(s, n.RUNTIME_009, n.runtimeDescMap), s.preloadRemote.apply(s, m);
2845
+ }
2846
+ function f(...m) {
2847
+ return (0, r.assert)(s, n.RUNTIME_009, n.runtimeDescMap), s.registerRemotes.apply(s, m);
2848
+ }
2849
+ function d(...m) {
2850
+ return (0, r.assert)(s, n.RUNTIME_009, n.runtimeDescMap), s.registerPlugins.apply(s, m);
2851
+ }
2852
+ function h() {
2853
+ return s;
2854
+ }
2855
+ function p(...m) {
2856
+ return (0, r.assert)(s, n.RUNTIME_009, n.runtimeDescMap), s.registerShared.apply(s, m);
2857
+ }
2858
+ (0, r.setGlobalFederationConstructor)(r.ModuleFederation), Object.defineProperty(e, "Module", {
2859
+ enumerable: !0,
2860
+ get: function() {
2861
+ return r.Module;
2862
+ }
2863
+ }), e.ModuleFederation = r.ModuleFederation, e.createInstance = o, e.getInstance = h, Object.defineProperty(e, "getRemoteEntry", {
2864
+ enumerable: !0,
2865
+ get: function() {
2866
+ return r.getRemoteEntry;
2867
+ }
2868
+ }), Object.defineProperty(e, "getRemoteInfo", {
2869
+ enumerable: !0,
2870
+ get: function() {
2871
+ return r.getRemoteInfo;
2872
+ }
2873
+ }), e.init = i, e.loadRemote = a, Object.defineProperty(e, "loadScript", {
2874
+ enumerable: !0,
2875
+ get: function() {
2876
+ return r.loadScript;
2877
+ }
2878
+ }), Object.defineProperty(e, "loadScriptNode", {
2879
+ enumerable: !0,
2880
+ get: function() {
2881
+ return r.loadScriptNode;
2882
+ }
2883
+ }), e.loadShare = c, e.loadShareSync = l, e.preloadRemote = u, Object.defineProperty(e, "registerGlobalPlugins", {
2884
+ enumerable: !0,
2885
+ get: function() {
2886
+ return r.registerGlobalPlugins;
2887
+ }
2888
+ }), e.registerPlugins = d, e.registerRemotes = f, e.registerShared = p;
2889
+ })(ir);
2
2890
  typeof __VUE_HMR_RUNTIME__ > "u" && (globalThis.__VUE_HMR_RUNTIME__ = { createRecord() {
3
2891
  }, rerender() {
4
2892
  }, reload() {
5
2893
  } });
6
- const p = "__mf_init____mf__virtual/__mfe_internal__addon_benchmark_page__mf_v__runtimeInit__mf_v__.js__";
7
- let c = globalThis[p];
8
- if (!c) {
2894
+ const an = "__mf_init____mf__virtual/__mfe_internal__addon_benchmark_page__mf_v__runtimeInit__mf_v__.js__";
2895
+ let Tt = globalThis[an];
2896
+ if (!Tt) {
9
2897
  let e, t;
10
- const n = new Promise((l, i) => {
11
- e = l, t = i;
2898
+ const r = new Promise((n, o) => {
2899
+ e = n, t = o;
12
2900
  });
13
- c = globalThis[p] = {
14
- initPromise: n,
2901
+ Tt = globalThis[an] = {
2902
+ initPromise: r,
15
2903
  initResolve: e,
16
2904
  initReject: t
17
2905
  }, typeof window > "u" && e({
@@ -23,63 +2911,63 @@ if (!c) {
23
2911
  }
24
2912
  });
25
2913
  }
26
- const w = c.initResolve, f = "__mf_module_cache__";
27
- globalThis[f] ||= { share: {}, remote: {} };
28
- globalThis[f].share ||= {};
29
- globalThis[f].remote ||= {};
30
- const m = {}, u = "default", h = "__mfe_internal__addon_benchmark_page";
31
- let a, s, _;
32
- async function d(e) {
2914
+ const Sa = Tt.initResolve, kt = "__mf_module_cache__";
2915
+ globalThis[kt] ||= { share: {}, remote: {} };
2916
+ globalThis[kt].share ||= {};
2917
+ globalThis[kt].remote ||= {};
2918
+ const nr = {}, or = "default", sr = "__mfe_internal__addon_benchmark_page";
2919
+ let Fe, Le, De;
2920
+ async function wt(e) {
33
2921
  for (let t = 0; ; t++)
34
2922
  try {
35
2923
  return await e();
36
- } catch (n) {
37
- throw n;
2924
+ } catch (r) {
2925
+ throw r;
38
2926
  }
39
2927
  }
40
- async function R() {
41
- return s || (s = d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-Cc3NF30a.mjs")).catch((e) => {
42
- throw s = void 0, e;
43
- })), s;
2928
+ async function ba() {
2929
+ return Le || (Le = wt(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-BeLfGVa1.mjs")).catch((e) => {
2930
+ throw Le = void 0, e;
2931
+ })), Le;
44
2932
  }
45
- async function v() {
46
- return _ || (_ = d(() => import("./virtualExposes-pfue1WZv.mjs")).then((e) => e.default ?? e).catch((e) => {
47
- throw _ = void 0, e;
48
- })), _;
2933
+ async function Ra() {
2934
+ return De || (De = wt(() => import("./virtualExposes-pfue1WZv.mjs")).then((e) => e.default ?? e).catch((e) => {
2935
+ throw De = void 0, e;
2936
+ })), De;
49
2937
  }
50
- async function b(e = {}, t = []) {
51
- const { usedShared: n, usedRemotes: l } = await R(), i = {
52
- name: h,
53
- remotes: l,
54
- shared: n,
2938
+ async function Ta(e = {}, t = []) {
2939
+ const { usedShared: r, usedRemotes: n } = await ba(), o = {
2940
+ name: sr,
2941
+ remotes: n,
2942
+ shared: r,
55
2943
  plugins: [],
56
2944
  shareStrategy: "version-first"
57
2945
  };
58
- a ? a.initOptions(i) : a = y.createInstance(i);
59
- const o = a;
60
- var r = m[u];
61
- if (r || (r = m[u] = { from: h }), !(t.indexOf(r) >= 0)) {
62
- t.push(r), o.initShareScopeMap("default", e), w(o);
2946
+ Fe ? Fe.initOptions(o) : Fe = ir.createInstance(o);
2947
+ const s = Fe;
2948
+ var i = nr[or];
2949
+ if (i || (i = nr[or] = { from: sr }), !(t.indexOf(i) >= 0)) {
2950
+ t.push(i), s.initShareScopeMap("default", e), Sa(s);
63
2951
  try {
64
- await d(async () => {
65
- await Promise.all(await o.initializeSharing("default", {
2952
+ await wt(async () => {
2953
+ await Promise.all(await s.initializeSharing("default", {
66
2954
  strategy: "version-first",
67
2955
  from: "build",
68
2956
  initScope: t
69
2957
  }));
70
2958
  });
71
- } catch (g) {
72
- console.error("[Module Federation]", g);
2959
+ } catch (a) {
2960
+ console.error("[Module Federation]", a);
73
2961
  }
74
- return o;
2962
+ return s;
75
2963
  }
76
2964
  }
77
- async function T(e) {
78
- const t = await v();
2965
+ async function Ia(e) {
2966
+ const t = await Ra();
79
2967
  if (!(e in t)) throw new Error(`[Module Federation] Module ${e} does not exist in container.`);
80
- return t[e]().then((n) => () => n);
2968
+ return t[e]().then((r) => () => r);
81
2969
  }
82
2970
  export {
83
- T as get,
84
- b as init
2971
+ Ia as get,
2972
+ Ta as init
85
2973
  };