signalk-questdb 2.1.2 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/container-env.js +68 -2
- package/dist/container-env.js.map +1 -1
- package/dist/restore.js +22 -10
- package/dist/restore.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/{_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-I2PEpnTA.js → _virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-7tb3Q-Bx.js} +1 -1
- package/public/assets/dist-BgxWXJ5y.js +4 -0
- package/public/assets/{hostInit-CUx4ptQ-.js → hostInit-CyS9_M1c.js} +1 -1
- package/public/assets/{index-CyI4zKUm.js → index-Dh-t5VMR.js} +1 -1
- package/public/remoteEntry.js +12 -1
- package/public/assets/dist-BxwXn66h.js +0 -4
package/README.md
CHANGED
|
@@ -417,7 +417,7 @@ The plugin is optimized for Raspberry Pi and similar low-power devices:
|
|
|
417
417
|
|
|
418
418
|
- **Default sampling rate** of 2000ms limits each path to 1 write per 2 seconds, keeping write volume modest on busy NMEA 2000 buses
|
|
419
419
|
- **Resource caps** of 768 MB RAM and 1.5 CPU cores (cgroup limits via signalk-container) keep QuestDB from squeezing co-resident containers like Grafana, mayara, or signalk-backup. The JVM auto-sizes its heap to a fraction of the memory cap, so total footprint (heap + off-heap) is bounded
|
|
420
|
-
- **QuestDB worker
|
|
420
|
+
- **QuestDB worker tuning** cuts idle CPU on low-power hosts. QuestDB sizes its worker pools from the host core count and busy-polls before sleeping — sensible on a server, wasteful on a mostly idle boat database, where threads burn CPU waiting for work that never arrives. The plugin pins its worker pools down and quiets QuestDB's per-commit logging, keeping the messages that matter. One caveat worth knowing when upgrading the QuestDB image: an unrecognised setting is ignored silently, so a property renamed between releases looks exactly like one that worked
|
|
421
421
|
- **ILP batching** commits every 5s (configurable via "Write batch interval"; a large backlog of buffered rows commits early). Each commit is one WAL transaction per table, and with deduplicated tables the apply cost of a transaction grows with partition size — frequent tiny commits eventually outpace what a Pi can apply and recording stalls. Bigger batches keep the WAL healthy; the cost is that at most one interval of buffered samples is lost on a hard crash
|
|
422
422
|
- Per-path overrides allow faster rates for critical paths (e.g. `{ "environment.wind.*": 200 }`) while keeping slow-changing paths throttled
|
|
423
423
|
- Set the memory limit to empty or CPU limit to `0` to disable the cap entirely on roomier hosts
|
package/dist/container-env.js
CHANGED
|
@@ -21,16 +21,82 @@
|
|
|
21
21
|
// handful of fsyncs per commit interval (ILP batches at `ilpFlushIntervalMs`,
|
|
22
22
|
// 5s by default), which at boat data rates is noise against losing a table.
|
|
23
23
|
export const QUESTDB_COMMIT_MODE = "sync";
|
|
24
|
+
// Poll cycles a worker spins before sleeping. QuestDB's default is 10000,
|
|
25
|
+
// which keeps threads hot on a database that is idle most of the time. Low
|
|
26
|
+
// enough to sleep promptly, high enough that a burst of ingest does not pay a
|
|
27
|
+
// wake-up per batch.
|
|
28
|
+
const WORKER_SLEEP_THRESHOLD = "100";
|
|
24
29
|
export function buildContainerEnv(config) {
|
|
25
30
|
return {
|
|
26
31
|
QDB_TELEMETRY_ENABLED: "false",
|
|
27
32
|
QDB_HTTP_ENABLED: "true",
|
|
28
33
|
QDB_LINE_TCP_ENABLED: "true",
|
|
29
34
|
QDB_CAIRO_COMMIT_MODE: QUESTDB_COMMIT_MODE,
|
|
30
|
-
//
|
|
31
|
-
|
|
35
|
+
// ── Low-power tuning (Pi, Cerbo) ──────────────────────────────────────
|
|
36
|
+
//
|
|
37
|
+
// QuestDB sizes most worker pools from the host core count and defaults
|
|
38
|
+
// each pool to a busy-poll before it sleeps. That is right for a server
|
|
39
|
+
// and wrong for a boat: on a mostly idle database the threads burn CPU
|
|
40
|
+
// waiting for work that never comes, and the cost is a fixed floor rather
|
|
41
|
+
// than something that scales with the data.
|
|
42
|
+
//
|
|
43
|
+
// NOTE ON NAMING: QuestDB ignores an unrecognised QDB_* variable in
|
|
44
|
+
// silence — no warning, no startup failure — so a wrong name is
|
|
45
|
+
// indistinguishable from a setting that worked. Verify any change here
|
|
46
|
+
// against the running server rather than against the docs:
|
|
47
|
+
//
|
|
48
|
+
// SELECT property_path, value, value_source FROM (SHOW PARAMETERS)
|
|
49
|
+
// WHERE value_source = 'env'
|
|
50
|
+
//
|
|
51
|
+
// A key that reports `default` there was not applied, whatever was
|
|
52
|
+
// passed. (The startup log names each pool's `workers=N` too, but
|
|
53
|
+
// QDB_LOG_W_STDOUT_LEVEL below suppresses those lines, so the query is
|
|
54
|
+
// the reliable check.)
|
|
55
|
+
//
|
|
56
|
+
// `wal.apply.worker.count` has NO `cairo.` prefix, unlike its neighbours
|
|
57
|
+
// `cairo.wal.apply.*` — the one spelling in this block most likely to be
|
|
58
|
+
// guessed wrong.
|
|
59
|
+
QDB_WAL_APPLY_WORKER_COUNT: "1",
|
|
32
60
|
QDB_SHARED_WORKER_COUNT: "1",
|
|
33
61
|
QDB_LINE_TCP_WRITER_WORKER_COUNT: "1",
|
|
62
|
+
// Zero is this pool's default and does NOT mean "share the common pool"
|
|
63
|
+
// the way it does elsewhere — ILP keys per-worker state by worker id, so
|
|
64
|
+
// it gets a dedicated pool sized 2 regardless of the core count. Leaving
|
|
65
|
+
// it unset was our own gap: the writer pool was pinned to 1 while the io
|
|
66
|
+
// pool beside it still ran two threads.
|
|
67
|
+
QDB_LINE_TCP_IO_WORKER_COUNT: "1",
|
|
68
|
+
// Pools for features this plugin never uses. They are sized and polled
|
|
69
|
+
// regardless, which makes them precisely the ones nobody thinks to set.
|
|
70
|
+
QDB_VIEW_COMPILER_WORKER_COUNT: "1",
|
|
71
|
+
QDB_MAT_VIEW_REFRESH_WORKER_COUNT: "1",
|
|
72
|
+
QDB_LIVE_VIEW_REFRESH_WORKER_COUNT: "1",
|
|
73
|
+
QDB_EXPORT_WORKER_COUNT: "1",
|
|
74
|
+
// Poll cycles a worker spins before sleeping. There is no global default,
|
|
75
|
+
// so every pool needs its own — one left out keeps the full spin.
|
|
76
|
+
QDB_SHARED_WORKER_SLEEP_THRESHOLD: WORKER_SLEEP_THRESHOLD,
|
|
77
|
+
// The HTTP and pg-wire pools take their own threshold even though both
|
|
78
|
+
// currently draw workers from `shared-network` — QuestDB reports them at
|
|
79
|
+
// the 10000 default there rather than inheriting the shared value. Set
|
|
80
|
+
// one of the two `*.worker.count` keys and each becomes a dedicated pool
|
|
81
|
+
// where its own threshold is what governs, so leaving these unset is a
|
|
82
|
+
// gap that only opens when a default changes.
|
|
83
|
+
QDB_HTTP_WORKER_SLEEP_THRESHOLD: WORKER_SLEEP_THRESHOLD,
|
|
84
|
+
QDB_PG_WORKER_SLEEP_THRESHOLD: WORKER_SLEEP_THRESHOLD,
|
|
85
|
+
QDB_WAL_APPLY_WORKER_SLEEP_THRESHOLD: WORKER_SLEEP_THRESHOLD,
|
|
86
|
+
QDB_LINE_TCP_IO_WORKER_SLEEP_THRESHOLD: WORKER_SLEEP_THRESHOLD,
|
|
87
|
+
QDB_LINE_TCP_WRITER_WORKER_SLEEP_THRESHOLD: WORKER_SLEEP_THRESHOLD,
|
|
88
|
+
QDB_VIEW_COMPILER_WORKER_SLEEP_THRESHOLD: WORKER_SLEEP_THRESHOLD,
|
|
89
|
+
QDB_MAT_VIEW_REFRESH_WORKER_SLEEP_THRESHOLD: WORKER_SLEEP_THRESHOLD,
|
|
90
|
+
QDB_LIVE_VIEW_REFRESH_WORKER_SLEEP_THRESHOLD: WORKER_SLEEP_THRESHOLD,
|
|
91
|
+
QDB_EXPORT_WORKER_SLEEP_THRESHOLD: WORKER_SLEEP_THRESHOLD,
|
|
92
|
+
// QuestDB narrates every WAL commit at INFO — several lines a second of
|
|
93
|
+
// pure noise, written to the container log forever. ERROR is a floor, not
|
|
94
|
+
// an exact set, so CRITICAL and ADVISORY still come through: table
|
|
95
|
+
// suspension, ILP parse failures and the max_map_count warning all
|
|
96
|
+
// survive. What it drops is the INFO band — which also carries the WAL
|
|
97
|
+
// apply memory-pressure backoff that precedes a suspension, so raise this
|
|
98
|
+
// back to INFO when diagnosing a database that has stopped recording.
|
|
99
|
+
QDB_LOG_W_STDOUT_LEVEL: "ERROR",
|
|
34
100
|
QDB_CAIRO_O3_COLUMN_MEMORY_SIZE: "262144",
|
|
35
101
|
...(config.compression && config.compression !== "none"
|
|
36
102
|
? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-env.js","sourceRoot":"","sources":["../src/container-env.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,EAAE;AACF,wEAAwE;AACxE,8EAA8E;AAC9E,6EAA6E;AAC7E,0EAA0E;AAC1E,6EAA6E;AAC7E,yBAAyB;AAIzB,kEAAkE;AAClE,6EAA6E;AAC7E,0EAA0E;AAC1E,0EAA0E;AAC1E,yEAAyE;AACzE,0EAA0E;AAC1E,6EAA6E;AAC7E,2EAA2E;AAC3E,0EAA0E;AAC1E,QAAQ;AACR,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAE1C,MAAM,UAAU,iBAAiB,CAC/B,MAAuB;IAEvB,OAAO;QACL,qBAAqB,EAAE,OAAO;QAC9B,gBAAgB,EAAE,MAAM;QACxB,oBAAoB,EAAE,MAAM;QAC5B,qBAAqB,EAAE,mBAAmB;
|
|
1
|
+
{"version":3,"file":"container-env.js","sourceRoot":"","sources":["../src/container-env.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,EAAE;AACF,wEAAwE;AACxE,8EAA8E;AAC9E,6EAA6E;AAC7E,0EAA0E;AAC1E,6EAA6E;AAC7E,yBAAyB;AAIzB,kEAAkE;AAClE,6EAA6E;AAC7E,0EAA0E;AAC1E,0EAA0E;AAC1E,yEAAyE;AACzE,0EAA0E;AAC1E,6EAA6E;AAC7E,2EAA2E;AAC3E,0EAA0E;AAC1E,QAAQ;AACR,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAE1C,0EAA0E;AAC1E,2EAA2E;AAC3E,8EAA8E;AAC9E,qBAAqB;AACrB,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAErC,MAAM,UAAU,iBAAiB,CAC/B,MAAuB;IAEvB,OAAO;QACL,qBAAqB,EAAE,OAAO;QAC9B,gBAAgB,EAAE,MAAM;QACxB,oBAAoB,EAAE,MAAM;QAC5B,qBAAqB,EAAE,mBAAmB;QAE1C,yEAAyE;QACzE,EAAE;QACF,wEAAwE;QACxE,wEAAwE;QACxE,uEAAuE;QACvE,0EAA0E;QAC1E,4CAA4C;QAC5C,EAAE;QACF,oEAAoE;QACpE,gEAAgE;QAChE,uEAAuE;QACvE,2DAA2D;QAC3D,EAAE;QACF,qEAAqE;QACrE,iCAAiC;QACjC,EAAE;QACF,mEAAmE;QACnE,kEAAkE;QAClE,uEAAuE;QACvE,uBAAuB;QACvB,EAAE;QACF,yEAAyE;QACzE,yEAAyE;QACzE,iBAAiB;QACjB,0BAA0B,EAAE,GAAG;QAC/B,uBAAuB,EAAE,GAAG;QAC5B,gCAAgC,EAAE,GAAG;QACrC,wEAAwE;QACxE,yEAAyE;QACzE,yEAAyE;QACzE,yEAAyE;QACzE,wCAAwC;QACxC,4BAA4B,EAAE,GAAG;QACjC,uEAAuE;QACvE,wEAAwE;QACxE,8BAA8B,EAAE,GAAG;QACnC,iCAAiC,EAAE,GAAG;QACtC,kCAAkC,EAAE,GAAG;QACvC,uBAAuB,EAAE,GAAG;QAE5B,0EAA0E;QAC1E,kEAAkE;QAClE,iCAAiC,EAAE,sBAAsB;QACzD,uEAAuE;QACvE,yEAAyE;QACzE,uEAAuE;QACvE,yEAAyE;QACzE,uEAAuE;QACvE,8CAA8C;QAC9C,+BAA+B,EAAE,sBAAsB;QACvD,6BAA6B,EAAE,sBAAsB;QACrD,oCAAoC,EAAE,sBAAsB;QAC5D,sCAAsC,EAAE,sBAAsB;QAC9D,0CAA0C,EAAE,sBAAsB;QAClE,wCAAwC,EAAE,sBAAsB;QAChE,2CAA2C,EAAE,sBAAsB;QACnE,4CAA4C,EAAE,sBAAsB;QACpE,iCAAiC,EAAE,sBAAsB;QAEzD,wEAAwE;QACxE,0EAA0E;QAC1E,mEAAmE;QACnE,mEAAmE;QACnE,uEAAuE;QACvE,0EAA0E;QAC1E,sEAAsE;QACtE,sBAAsB,EAAE,OAAO;QAE/B,+BAA+B,EAAE,QAAQ;QACzC,GAAG,CAAC,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,KAAK,MAAM;YACrD,CAAC,CAAC;gBACE,uCAAuC,EACrC,MAAM,CAAC,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK;gBAChD,GAAG,CAAC,MAAM,CAAC,WAAW,KAAK,MAAM,IAAI,MAAM,CAAC,gBAAgB;oBAC1D,CAAC,CAAC;wBACE,uCAAuC,EAAE,MAAM,CAC7C,MAAM,CAAC,gBAAgB,CACxB;qBACF;oBACH,CAAC,CAAC,EAAE,CAAC;aACR;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC"}
|
package/dist/restore.js
CHANGED
|
@@ -90,23 +90,35 @@ const IDENTITY_PATHS = [
|
|
|
90
90
|
/**
|
|
91
91
|
* How far back identity is looked up, independent of the motion window.
|
|
92
92
|
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
93
|
+
* Fixed rather than a multiple of `maxAgeMs`: identity has nothing to do with
|
|
94
|
+
* how fresh a fix must be, so scaling it off that window made the default
|
|
95
|
+
* (9 min x 40 = 6h) too short on a quiet day. Measured on a live install,
|
|
96
|
+
* 6 hours reached exactly ONE named vessel; 24 hours reached 192.
|
|
97
|
+
*
|
|
98
|
+
* Seven days, not 24 hours, because 24h was still short for ship type
|
|
99
|
+
* (issue #163). A vessel moored nearby broadcasts its position every few
|
|
100
|
+
* seconds but its STATIC report — the one carrying ship type — only while
|
|
101
|
+
* something prompts it; a target seen daily can easily have a type older than
|
|
102
|
+
* a day. It comes back drawn but uncoloured, which is what "all targets are
|
|
103
|
+
* default purple" looks like. Measured on the same install: of 415 vessels
|
|
104
|
+
* holding a ship type, 24h reached 190 and 7d reached 312.
|
|
98
105
|
*
|
|
99
106
|
* There is no staleness risk to trade against. An MMSI is a unique, durable
|
|
100
107
|
* identifier — over a week of real AIS traffic here, not one vessel broadcast
|
|
101
|
-
* a different name — so an older
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
108
|
+
* a different name or type — so an older identity is not a wronger one.
|
|
109
|
+
*
|
|
110
|
+
* The cost is NOT flat, which an earlier version of this comment claimed.
|
|
111
|
+
* `LATEST ON` does collapse to one row per (path, context), so the row count
|
|
112
|
+
* plateaus (547 at 24h, 899 at 7d, 1250 at 30d). But the SCAN grows: on a
|
|
113
|
+
* 155M-row table this query warms to ~100ms at 24h, ~3s at 7d and ~6-9s at
|
|
114
|
+
* 30d. Since it runs once at plugin start, 7d buys most of the coverage for a
|
|
115
|
+
* few seconds; 30d would reach every vessel but pay several times over for
|
|
116
|
+
* the last quarter of them.
|
|
105
117
|
*
|
|
106
118
|
* A vessel is still only restored if it has a RECENT position, so this cannot
|
|
107
119
|
* resurrect anything; it only labels what motion already brought back.
|
|
108
120
|
*/
|
|
109
|
-
const IDENTITY_WINDOW_MS = 24 * 60 * 60 * 1000;
|
|
121
|
+
const IDENTITY_WINDOW_MS = 7 * 24 * 60 * 60 * 1000;
|
|
110
122
|
/**
|
|
111
123
|
* True for a path fetched over the long identity window. The row-level age
|
|
112
124
|
* check must agree with the SQL, or it discards what the query deliberately
|
package/dist/restore.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restore.js","sourceRoot":"","sources":["../src/restore.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAmCxD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,YAAY,GAAG;IACnB,qBAAqB;IACrB,iCAAiC;IACjC,4BAA4B;IAC5B,wBAAwB;IACxB,4BAA4B;IAC5B,kBAAkB;CACV,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,MAAM,cAAc,GAAG;IACrB,yEAAyE;IACzE,4EAA4E;IAC5E,kEAAkE;IAClE,6EAA6E;IAC7E,yEAAyE;IACzE,2EAA2E;IAC3E,yEAAyE;IACzE,oBAAoB;IACpB,uBAAuB;IACvB,yBAAyB;IACzB,uEAAuE;IACvE,2EAA2E;IAC3E,4EAA4E;IAC5E,uEAAuE;IACvE,mEAAmE;IACnE,eAAe;IACf,uBAAuB;IACvB,aAAa;IACb,wDAAwD;IACxD,4EAA4E;IAC5E,uEAAuE;IACvE,0EAA0E;IAC1E,6EAA6E;IAC7E,2EAA2E;IAC3E,uEAAuE;IACvE,SAAS;IACT,MAAM;CACE,CAAC;AAEX
|
|
1
|
+
{"version":3,"file":"restore.js","sourceRoot":"","sources":["../src/restore.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAmCxD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,YAAY,GAAG;IACnB,qBAAqB;IACrB,iCAAiC;IACjC,4BAA4B;IAC5B,wBAAwB;IACxB,4BAA4B;IAC5B,kBAAkB;CACV,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,MAAM,cAAc,GAAG;IACrB,yEAAyE;IACzE,4EAA4E;IAC5E,kEAAkE;IAClE,6EAA6E;IAC7E,yEAAyE;IACzE,2EAA2E;IAC3E,yEAAyE;IACzE,oBAAoB;IACpB,uBAAuB;IACvB,yBAAyB;IACzB,uEAAuE;IACvE,2EAA2E;IAC3E,4EAA4E;IAC5E,uEAAuE;IACvE,mEAAmE;IACnE,eAAe;IACf,uBAAuB;IACvB,aAAa;IACb,wDAAwD;IACxD,4EAA4E;IAC5E,uEAAuE;IACvE,0EAA0E;IAC1E,6EAA6E;IAC7E,2EAA2E;IAC3E,uEAAuE;IACvE,SAAS;IACT,MAAM;CACE,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEnD;;;;GAIG;AACH,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC,cAAc,CAAC,CAAC;AAEvE,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,OAAO,CAAC,MAAyB;IACxC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpE,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,WAAW,CAClB,QAAgB,EAChB,gBAAwB,EACxB,QAAiB;IAEjB,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IACzC,0EAA0E;IAC1E,4EAA4E;IAC5E,uEAAuE;IACvE,2EAA2E;IAC3E,4EAA4E;IAC5E,0EAA0E;IAC1E,oEAAoE;IACpE,8DAA8D;IAC9D,MAAM,IAAI,GAAG,QAAQ;QACnB,CAAC,CAAC,4BAA4B;QAC9B,CAAC,CAAC,uEAAuE,CAAC;IAE5E,2EAA2E;IAC3E,2EAA2E;IAC3E,0EAA0E;IAC1E,wDAAwD;IACxD,EAAE;IACF,4EAA4E;IAC5E,yEAAyE;IACzE,kEAAkE;IAClE,MAAM,MAAM,GACV,YAAY,QAAQ,kBAAkB,MAAM,QAAQ;QACpD,WAAW,gBAAgB,kBAAkB,QAAQ,KAAK,CAAC;IAE7D,MAAM,GAAG,GACP,6DAA6D;QAC7D,oCAAoC,MAAM,EAAE;QAC5C,0CAA0C,CAAC;IAE7C,MAAM,GAAG,GACP,kDAAkD,IAAI,QAAQ;QAC9D,0BAA0B,MAAM,EAAE;QAClC,0CAA0C,CAAC;IAE7C,2EAA2E;IAC3E,gCAAgC;IAChC,MAAM,GAAG,GACP,kDAAkD;QAClD,mEAAmE;QACnE,sDAAsD,QAAQ,GAAG;QACjE,oCAAoC,CAAC;IAEvC,OAAO,IAAI,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,GAAG,CAAC;AAC1D,CAAC;AAED,6EAA6E;AAC7E,0EAA0E;AAC1E,qDAAqD;AACrD,SAAS,mBAAmB,CAAC,GAAY;IACvC,OAAO,+BAA+B,CAAC,IAAI,CACzC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CACjD,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,GAA4B;IAC/C,MAAM,IAAI,GAAG,GAAG,CAAC,SAAS,CAAC;IAC3B,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACrD,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;YACvB,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACvC,CAAC;QACD,KAAK,SAAS;YACZ,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC;QACjC,KAAK,UAAU,CAAC,CAAC,CAAC;YAChB,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC3C,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YAC7B,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YAC9B,OAAO,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAC5D,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE;gBACzB,CAAC,CAAC,IAAI,CAAC;QACX,CAAC;QACD;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,IAAiB,EACjB,OAAuB;IAEvB,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAChE,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IACrD,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;IAChE,uEAAuE;IACvE,MAAM,gBAAgB,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,kBAAkB,CAAC,CAAC,WAAW,EAAE,CAAC;IAE1E,MAAM,MAAM,GAAG,MAAM,WAAW;SAC7B,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAC;SACnD,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;QACtB,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC;YAAE,MAAM,GAAG,CAAC;QACzC,OAAO,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;IAEL,MAAM,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAE3C,4EAA4E;IAC5E,8EAA8E;IAC9E,0EAA0E;IAC1E,2EAA2E;IAC3E,yEAAyE;IACzE,eAAe;IACf,MAAM,SAAS,GAAG,IAAI,GAAG,EAQtB,CAAC;IAEJ,IAAI,YAAY,GAAG,CAAC,CAAC;IAErB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,aAAa,GAAI,GAAG,CAAC,OAAkB,IAAI,MAAM,CAAC;QACxD,MAAM,MAAM,GAAG,aAAa,KAAK,MAAM,CAAC;QACxC,IAAI,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW;YAAE,SAAS;QAC7C,IAAI,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa;YAAE,SAAS;QAEhD,MAAM,EAAE,GAAG,GAAG,CAAC,EAAY,CAAC;QAC5B,MAAM,IAAI,GAAG,GAAG,CAAC,IAAc,CAAC;QAChC,yEAAyE;QACzE,gEAAgE;QAChE,EAAE;QACF,sEAAsE;QACtE,uEAAuE;QACvE,sEAAsE;QACtE,yCAAyC;QACzC,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QAC5E,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,GAAG,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC;YACxD,YAAY,EAAE,CAAC;YACf,SAAS;QACX,CAAC;QAED,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,KAAK,KAAK,IAAI;YAAE,SAAS;QAE7B,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI;YAC5C,MAAM,EAAE,IAAI,GAAG,EAGZ;SACJ,CAAC;QAEF,kEAAkE;QAClE,sEAAsE;QACtE,0EAA0E;QAC1E,qDAAqD;QACrD,MAAM,MAAM,GACV,IAAI,KAAK,MAAM,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;QAE1E,sEAAsE;QACtE,0EAA0E;QAC1E,0EAA0E;QAC1E,2CAA2C;QAC3C,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,QAAQ,IAAI,OAAO,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;YACzC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAC/D,CAAC;QAED,SAAS,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,WAAW,GAAG,CAAC,CAAC;IAEpB,KAAK,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,SAAS,EAAE,CAAC;QAC/C,0EAA0E;QAC1E,qEAAqE;QACrE,6BAA6B;QAC7B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC;YAAE,SAAS;QAEvD,wEAAwE;QACxE,oEAAoE;QACpE,oBAAoB;QACpB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;YACtC,WAAW,EAAE,CAAC;YACd,SAAS;QACX,CAAC;QAED,qEAAqE;QACrE,0EAA0E;QAC1E,mEAAmE;QACnE,sEAAsE;QACtE,MAAM,WAAW,GAAG,IAAI,GAAG,EAA8C,CAAC;QAC1E,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YACvC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YAC5C,KAAK,CAAC,IAAI,CACR,GAAG,CAAC,MAAM;gBACR,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,KAAe,EAAE,EAAE;gBACpD,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAC/B,CAAC;YACF,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QACjC,CAAC;QAED,yEAAyE;QACzE,qEAAqE;QACrE,MAAM,OAAO,GAAG,aAAa,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC;QAEvE,aAAa,CAAC;YACZ,OAAO;YACP,OAAO,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;gBACtD,mEAAmE;gBACnE,iEAAiE;gBACjE,OAAO,EAAE,cAAc;gBACvB,SAAS;gBACT,MAAM;aACP,CAAC,CAAC;SACJ,CAAC,CAAC;QAEH,QAAQ,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED,KAAK,CACH,YAAY,QAAQ,gBAAgB,MAAM,wBAAwB;QAChE,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,YAAY,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9D,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,WAAW,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAC/D,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AACzD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vite-preload-helper-HclGiUj8.js";import"./dist-
|
|
1
|
+
import{t as e}from"./vite-preload-helper-HclGiUj8.js";import"./dist-BgxWXJ5y.js";var t={react:async()=>await e(()=>import(`./_virtual_mf___mfe_internal__signalk_questdb__mf_owner__1__loadShare__react__loadShare__.js-DzhF4wXp.js`).then(e=>e.o),[],import.meta.url)},n={react:{name:`react`,version:`19.2.8`,scope:[`default`],loaded:!1,materialize:!0,eager:!1,from:`signalk_questdb`,canLiveRebind:!0,async get(){n.react.loaded=!0;let{react:e}=t,r={...await e()};return r.__esModule!==!0&&Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^19.2.4`,strictVersion:!1,eager:!1}}},r=[];export{r as usedRemotes,n as usedShared};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{t as e}from"./vite-preload-helper-HclGiUj8.js";var t=`FEDERATION_DEBUG`,n={AT:`@`,HYPHEN:`-`,SLASH:`/`},r={[n.AT]:`scope_`,[n.HYPHEN]:`_`,[n.SLASH]:`__`};r[n.AT],n.AT,r[n.HYPHEN],n.HYPHEN,r[n.SLASH],n.SLASH;var i=function(e){return e[e.UNKNOWN=1]=`UNKNOWN`,e[e.CALCULATED=2]=`CALCULATED`,e[e.NO_USE=0]=`NO_USE`,e}({});function a(){return!0}function o(){return typeof navigator<`u`&&navigator?.product===`ReactNative`}function s(){try{if(a()&&window.localStorage)return!!localStorage.getItem(t)}catch{return!1}return!1}function c(){return typeof process<`u`&&{}.FEDERATION_DEBUG?!!{}.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<`u`&&FEDERATION_DEBUG?!0:s()}var l=`[ Federation Runtime ]`,u=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}:${t}`:t:e,``):``};function d(e,t){if(`getPublicPath`in e){let n;return n=e.getPublicPath.startsWith(`function`)?Function(`return `+e.getPublicPath)()():Function(e.getPublicPath)(),`${n}${t}`}return`publicPath`in e?!a()&&!o()&&`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),``)}var f=e=>{console.warn(`${l}: ${e}`)};function p(e){try{return JSON.stringify(e,null,2)}catch{return``}}var m=(e,t)=>{if(!e)return t;let n=(e=>{if(e===`.`)return``;if(e.startsWith(`./`))return e.replace(`./`,``);if(e.startsWith(`/`)){let t=e.slice(1);return t.endsWith(`/`)?t.slice(0,-1):t}return e})(e);return n?n.endsWith(`/`)?`${n}${t}`:`${n}/${t}`:t};function ee(e){return e.replace(/#.*$/,``).replace(/\?.*$/,``).replace(/\/[^\/]+$/,`/`)}function h(e,t={}){let{remotes:n={},overrides:r={},version:i}=t,a,o=()=>`publicPath`in e.metaData?(e.metaData.publicPath===`auto`||e.metaData.publicPath===``)&&i?ee(i):e.metaData.publicPath:e.metaData.getPublicPath,s=Object.keys(r),c={};Object.keys(n).length||(c=e.remotes?.reduce((e,t)=>{let n,i=t.federationContainerName;return n=s.includes(i)?r[i]:`version`in t?t.version:t.entry,e[i]={matchedVersion:n},e},{})||{}),Object.keys(n).forEach(e=>c[e]={matchedVersion:s.includes(e)?r[e]:n[e]});let{remoteEntry:{path:l,name:u,type:d},types:f={path:``,name:``,zip:``,api:``},buildInfo:{buildVersion:p},globalName:h,ssrRemoteEntry:g}=e.metaData,{exposes:te}=e,_={version:i||``,buildVersion:p,globalName:h,remoteEntry:m(l,u),remoteEntryType:d,remoteTypes:m(f.path,f.name),remoteTypesZip:f.zip||``,remoteTypesAPI:f.api||``,remotesInfo:c,shared:e?.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version,usedExports:e.referenceExports||[]})),modules:te?.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(`publicPath`in e.metaData?(a={..._,publicPath:o()},typeof e.metaData.ssrPublicPath==`string`&&(a.ssrPublicPath=e.metaData.ssrPublicPath)):a={..._,getPublicPath:o()},g){let e=m(g.path,g.name);a.ssrRemoteEntry=e,a.ssrRemoteEntryType=g.type||`commonjs-module`}return a}function g(e){return!!(`remoteEntry`in e&&e.remoteEntry.includes(`.json`))}var te=`[ Module Federation ]`,_=console,ne=[`logger.ts`,`logger.js`,`captureStackTrace`,`Logger.emit`,`Logger.log`,`Logger.info`,`Logger.warn`,`Logger.error`,`Logger.debug`];function re(){try{let e=Error().stack;if(!e)return;let[,...t]=e.split(`
|
|
2
|
+
`),n=t.filter(e=>!ne.some(t=>e.includes(t)));return n.length?`Stack trace:\n${n.slice(0,5).join(`
|
|
3
|
+
`)}`:void 0}catch{return}}var ie=class{constructor(e,t=_){this.prefix=e,this.delegate=t??_}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??_}emit(e,t){let n=this.delegate,r=c()?re():void 0,i=r?[...t,r]:t,a=(()=>{switch(e){case`log`:return[`log`,`info`];case`info`:return[`info`,`log`];case`warn`:return[`warn`,`info`,`log`];case`error`:return[`error`,`warn`,`log`];default:return[`debug`,`log`]}})();for(let e of a){let t=n[e];if(typeof t==`function`){t.call(n,this.prefix,...i);return}}for(let e of a){let t=_[e];if(typeof t==`function`){t.call(_,this.prefix,...i);return}}}log(...e){this.emit(`log`,e)}warn(...e){this.emit(`warn`,e)}error(...e){this.emit(`error`,e)}success(...e){this.emit(`info`,e)}info(...e){this.emit(`info`,e)}ready(...e){this.emit(`info`,e)}debug(...e){c()&&this.emit(`debug`,e)}};function ae(e){return new ie(e)}function oe(e){let t=new ie(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}ae(te),oe(te);async function se(e,t){try{return await e()}catch(e){!t&&f(e);return}}function ce(e,t){let n=/^(https?:)?\/\//i;return e.replace(n,``).replace(/\/$/,``)===t.replace(n,``).replace(/\/$/,``)}function le(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`script`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`src`);if(o&&ce(o,e.url)){t=i,n=!1;break}}if(!t){let n=e.attrs;t=document.createElement(`script`),t.type=n?.type===`module`?`module`:`text/javascript`;let i;e.createScriptHook&&(i=e.createScriptHook(e.url,e.attrs),i instanceof HTMLScriptElement?t=i:typeof i==`object`&&(`script`in i&&i.script&&(t=i.script),`timeout`in i&&i.timeout&&(r=i.timeout))),t.src||(t.src=e.url),n&&!i&&Object.keys(n).forEach(e=>{t&&(e===`async`||e===`defer`?t[e]=n[e]:t.getAttribute(e)||t.setAttribute(e,n[e]))})}let o=null,s=typeof window<`u`?t=>{if(t.filename&&ce(t.filename,e.url)){let n=Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`);n.name=`ScriptExecutionError`,o=n}}:null;s&&window.addEventListener(`error`,s);let c=async(n,r)=>{clearTimeout(i),s&&window.removeEventListener(`error`,s);let a=()=>{if(r?.type===`error`){let t=Error(r?.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.)`);t.name=`ScriptNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else o?e?.onErrorCallback&&e?.onErrorCallback(o):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,se(()=>{let{needDeleteScript:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n&&typeof n==`function`)){let e=n(r);if(e instanceof Promise){let t=await e;return a(),t}return a(),e}a()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),i=setTimeout(()=>{c(null,{type:`error`,isTimeout:!0})},r),{script:t,needAttach:n}}function ue(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`link`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`href`),s=i.getAttribute(`rel`);if(o&&ce(o,e.url)&&s===e.attrs.rel){t=i,n=!1;break}}if(!t){t=document.createElement(`link`),t.setAttribute(`href`,e.url);let n,i=!0,a=e.attrs;e.createLinkHook&&(n=e.createLinkHook(e.url,a),n instanceof HTMLLinkElement?(t=n,i=!1):typeof n==`object`&&(`link`in n&&n.link&&(t=n.link,i=!1),`timeout`in n&&n.timeout&&(r=n.timeout))),a&&i&&Object.keys(a).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,a[e])})}if(!n)return Promise.resolve().then(()=>{e?.cb&&e?.cb()}),{link:t,needAttach:n};let o=(n,r)=>{i&&clearTimeout(i);let a=()=>{if(r?.type===`error`){let t=Error(r?.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);t.name=`LinkNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,se(()=>{let{needDeleteLink:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n)){let e=n(r);return a(),e}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),i=setTimeout(()=>{o(null,{type:`error`,isTimeout:!0})},r),{link:t,needAttach:n}}function de(e,t){let{attrs:n={},createScriptHook:r}=t;return new Promise((t,i)=>{let{script:a,needAttach:o}=le({url:e,cb:t,onErrorCallback:i,attrs:{fetchpriority:`high`,...n},createScriptHook:r,needDeleteScript:!0});o&&document.head.appendChild(a)})}var fe=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split(`-`)[0].toLowerCase()}#${e.toLowerCase()}`,pe=(e,t,n,r)=>{let i=[`${[t[e]]} #${e}`];return n&&i.push(`args: ${JSON.stringify(n)}`),i.push(fe(e)),r&&i.push(`Original Error Message:\n ${r}`),i.join(`
|
|
4
|
+
`)};function me(e,t,n,r,i,a){return r(pe(e,t,n,i))}var v=`[ Federation Runtime ]`,he=ae(v);function y(e,t,n,r,i){e||(n===void 0?b(t):b(t,n,r,void 0,i))}function b(e,t,n,r,i){if(t!==void 0)return me(e,t,n??{},e=>{throw Error(`${v}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(v)||(a.message=`${v}: ${a.message}`),a):Error(`${v}: ${a}`)}function x(e){e instanceof Error&&(e.message.startsWith(v)||(e.message=`${v}: ${e.message}`)),he.warn(e)}function ge(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function S(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function _e(e){return e.entry!==void 0}function ve(e){return!e.entry.includes(`.json`)}function ye(e){return e&&typeof e==`object`}var be=Object.prototype.toString;function xe(e){return be.call(e)===`[object Object]`}function Se(e){return Array.isArray(e)?e:[e]}function Ce(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var we=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},Te=2e3,C=typeof globalThis==`object`?globalThis:window,w=(()=>{try{return document.defaultView}catch{return C}})(),T=w;function Ee(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function De(e,t){return Object.hasOwnProperty.call(e,t)}De(C,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||Ee(C,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var E=C.__GLOBAL_LOADING_REMOTE_ENTRY__;function Oe(e){De(e,`__VMOK__`)&&!De(e,`__FEDERATION__`)&&Ee(e,`__FEDERATION__`,e.__VMOK__),De(e,`__FEDERATION__`)||(Ee(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map,__PRELOADED_ASSETS__:new Set}),Ee(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__??=new Map,e.__FEDERATION__.__PRELOADED_ASSETS__??=new Set}Oe(C),Oe(w);function ke(){C.__FEDERATION__.__GLOBAL_PLUGIN__=[],C.__FEDERATION__.__INSTANCES__=[],C.__FEDERATION__.moduleInfo={},C.__FEDERATION__.__SHARE__={},C.__FEDERATION__.__MANIFEST_LOADING__={},C.__FEDERATION__.__PRELOADED_ASSETS__.clear(),Object.keys(E).forEach(e=>{delete E[e]})}function Ae(e){C.__FEDERATION__.__INSTANCES__.push(e)}function je(){return C.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Me(e,t=c()){t&&(C.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,C.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.9.0`)}function D(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}b(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var Ne=()=>w.__FEDERATION__.moduleInfo,Pe=(e,t)=>{let n=D(t,S(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=S(n),i=D(w.__FEDERATION__.moduleInfo,r).value;if(i?.version===t)return i}},O=e=>Pe(e,w.__FEDERATION__.moduleInfo),Fe=(e,t)=>{let n=S(e);return w.__FEDERATION__.moduleInfo[n]=t,w.__FEDERATION__.moduleInfo},Ie=e=>(w.__FEDERATION__.moduleInfo={...w.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete w.__FEDERATION__.moduleInfo[e]}),Le=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:C[n]}},Re=e=>{let{__GLOBAL_PLUGIN__:t}=w.__FEDERATION__;e.forEach(e=>{t.findIndex(t=>t.name===e.name)===-1?t.push(e):x(`The plugin ${e.name} has been registered.`)})},ze=()=>w.__FEDERATION__.__GLOBAL_PLUGIN__,Be=e=>C.__FEDERATION__.__PRELOADED_MAP__.get(e),Ve=e=>C.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),He=e=>C.__FEDERATION__.__PRELOADED_ASSETS__.has(e),Ue=e=>{let t=C.__FEDERATION__.__PRELOADED_ASSETS__;if(t.add(e),t.size>Te){let e=t.values().next().value;e!==void 0&&t.delete(e)}},We=`[0-9A-Za-z-]+`,Ge=`(?:\\+(${We}(?:\\.${We})*))`,k=`0|[1-9]\\d*`,A=`[0-9]+`,Ke=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,qe=`(?:${A}|${Ke})`,Je=`(?:-?(${qe}(?:\\.${qe})*))`,Ye=`(?:${k}|${Ke})`,Xe=`(?:-(${Ye}(?:\\.${Ye})*))`,Ze=`${k}|x|X|\\*`,j=`[v=\\s]*(${Ze})(?:\\.(${Ze})(?:\\.(${Ze})(?:${Xe})?${Ge}?)?)?`,Qe=`^\\s*(${j})\\s+-\\s+(${j})\\s*$`,$e=`[v=\\s]*${`(${A})\\.(${A})\\.(${A})`}${Je}?${Ge}?`,et=`((?:<|>)?=?)`,tt=`(\\s*)${et}\\s*(${$e}|${j})`,nt=`(?:~>?)`,rt=`(\\s*)${nt}\\s+`,it=`(?:\\^)`,at=`(\\s*)${it}\\s+`,ot=`(<|>)?=?\\s*\\*`,st=`^${it}${j}$`,ct=`v?${`(${k})\\.(${k})\\.(${k})`}${Xe}?${Ge}?`,lt=`^${nt}${j}$`,ut=`^${et}\\s*${j}$`,dt=`^${et}\\s*(${ct})$|^$`,ft=`^\\s*>=\\s*0.0.0\\s*$`;function M(e){return new RegExp(e)}function N(e){return!e||e.toLowerCase()===`x`||e===`*`}function pt(...e){return t=>e.reduce((e,t)=>t(e),t)}function mt(e){return e.match(M(dt))}function ht(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function gt(e){return e.replace(M(Qe),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=N(n)?``:N(r)?`>=${n}.0.0`:N(i)?`>=${n}.${r}.0`:`>=${t}`,s=N(c)?``:N(l)?`<${Number(c)+1}.0.0-0`:N(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function _t(e){return e.replace(M(tt),`$1$2$3`)}function vt(e){return e.replace(M(rt),`$1~`)}function yt(e){return e.replace(M(at),`$1^`)}function bt(e){return e.trim().split(/\s+/).map(e=>e.replace(M(st),(e,t,n,r,i)=>N(t)?``:N(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:N(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function xt(e){return e.trim().split(/\s+/).map(e=>e.replace(M(lt),(e,t,n,r,i)=>N(t)?``:N(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:N(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function St(e){return e.split(/\s+/).map(e=>e.trim().replace(M(ut),(e,t,n,r,i,a)=>{let o=N(n),s=o||N(r),c=s||N(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function Ct(e){return e.trim().replace(M(ot),``)}function wt(e){return e.trim().replace(M(ft),``)}function P(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function Tt(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?P(t,i):-1:1}return 0}function F(e,t){return P(e.major,t.major)||P(e.minor,t.minor)||P(e.patch,t.patch)||Tt(e,t)}function Et(e,t){return e.version===t.version}function Dt(e,t){switch(e.operator){case``:case`=`:return Et(e,t);case`>`:return F(e,t)<0;case`>=`:return Et(e,t)||F(e,t)<0;case`<`:return F(e,t)>0;case`<=`:return Et(e,t)||F(e,t)>0;case void 0:return!0;default:return!1}}function Ot(e){return pt(bt,xt,St,Ct)(e)}function kt(e){return pt(gt,_t,vt,yt)(e.trim()).split(/\s+/).join(` `)}function I(e,t){if(!e)return!1;let n=mt(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:ht(i,a,o,s),major:i,minor:a,patch:o,preRelease:s?.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=kt(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>Ot(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>wt(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=mt(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!Dt({operator:n,version:ht(r,a,o,s),major:r,minor:a,patch:o,preRelease:s?.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var At=`default`,jt=`global`;function Mt(e,t,n,r){let a;return a=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{b(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&b(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:a,loaded:e?.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??r)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??i.UNKNOWN,useIn:[]}:void 0}}function Nt(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=Se(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(Mt(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function L(e,t){if(!e)return!1;let{status:n,mode:r}=e;return n===i.NO_USE?!1:n===i.CALCULATED?!0:r===`runtime-infer`?!t||It(e,t):!1}function R(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!I(n(e),`<=${n(t)}`)}var z=(e,t)=>{let n=t||function(e,t){return R(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},Pt=e=>!!e.loaded||typeof e.lib==`function`,Ft=e=>!!e.loading,It=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Lt(e,t,n,r){let i=e[t][n],a=``,o=L(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!Pt(i[e].treeShaking)&&R(e,t):!1:!0:!Pt(i[e])&&R(e,t)};if(o){if(a=z(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:z(e[t][n],s),useTreesShaking:o}}var B=e=>Pt(e)||Ft(e);function Rt(e,t,n,r){let i=e[t][n],a=``,o=L(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(B(i[t].treeShaking))return!B(i[e].treeShaking)||!!R(e,t);if(B(i[e].treeShaking))return!1}return B(i[t])?!B(i[e])||!!R(e,t):!B(i[e])&&R(e,t)};if(o){if(a=z(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:z(e[t][n],s),useTreesShaking:o}}function zt(e){return e===`loaded-first`?Rt:Lt}function V(e,t,n,r,i){if(!e)return;let{shareConfig:a,scope:o=At,strategy:s,treeShaking:c}=n,l=Array.isArray(o)?o:[o];for(let o of l)if(a&&e[o]&&e[o][t]){let{requiredVersion:l}=a,{version:u,useTreesShaking:d}=zt(s)(e,o,t,c),f={shareScopeMap:e,scope:o,pkgName:t,version:u,GlobalFederation:T.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[o][t][u];if(a.singleton){if(typeof l==`string`&&!I(u,l)){let e=`Version ${u} from ${u&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${l})`;a.strictVersion?b(e):x(e)}return{shared:r,useTreesShaking:d}}{if(l===!1||l===`*`||I(u,l))return{shared:r,useTreesShaking:d};let n=L(c);if(n){for(let[r,i]of Object.entries(e[o][t]))if(L(i.treeShaking,c?.usedExports)&&I(r,l))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[o][t]))if(I(n,l))return{shared:r,useTreesShaking:!1}}},loadContext:i};return(r.emit(f)||f).resolver()}}function Bt(){return T.__FEDERATION__.__SHARE__}function Vt(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=n?.resolver??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[z(t,function(e,n){return!Pt(t[e])&&R(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n?.customShareInfo)}var H=(e,t)=>{e.useIn||=[],ge(e.useIn,t)};function Ht(e,t){return t&&e.treeShaking?e.treeShaking:e}function Ut(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Wt(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Gt(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Kt=`RUNTIME-001`,qt=`RUNTIME-002`,Jt=`RUNTIME-003`,Yt=`RUNTIME-004`,Xt=`RUNTIME-005`,Zt=`RUNTIME-006`,Qt=`RUNTIME-007`,$t=`RUNTIME-008`,en=`RUNTIME-009`,tn=`RUNTIME-010`,nn=`RUNTIME-011`,rn=`RUNTIME-012`,an=`RUNTIME-013`,on=`RUNTIME-014`,sn=`RUNTIME-015`,cn=`TYPE-001`,ln=`BUILD-001`,un=`BUILD-002`,U={[Kt]:`Failed to get remoteEntry exports.`,[qt]:`The remote entry interface does not contain "init"`,[Jt]:`Failed to get manifest.`,[Yt]:`Failed to locate remote.`,[Xt]:`Invalid loadShareSync function call from bundler runtime`,[Zt]:`Invalid loadShareSync function call from runtime`,[Qt]:`Failed to get remote snapshot.`,[$t]:`Failed to load script resources.`,[en]:`Please call createInstance first.`,[tn]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[nn]:`The remoteEntry URL is missing from the remote snapshot.`,[rn]:`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.`,[an]:`The manifest is not a valid Module Federation manifest.`,[on]:`The remote does not expose the requested module.`,[sn]:`Remote container initialization failed.`},dn={[cn]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},fn={[ln]:`Failed to find expose module.`,[un]:`PublicPath is required in prod mode.`};({...U,...dn,...fn});var pn=`.then(callbacks[0]).catch(callbacks[1])`,mn=new WeakMap,hn=[`Failed to fetch dynamically imported module`,`Importing a module script failed`,`error loading dynamically imported module`];function gn(e){return e instanceof TypeError&&hn.some(t=>e.message.includes(t))}function _n(e){return e===`esm`||e===`module`}async function vn({entry:t,remoteEntryExports:n,name:r,getEntryUrl:i}){return new Promise((a,o)=>{let s=e=>{if(gn(e)){let t=e instanceof Error?e.message:String(e);try{b($t,U,{remoteName:r,resourceUrl:c},t)}catch(e){o(e);return}}o(e)},c=i?i(t):t;try{n?a(n):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${c}")${pn}`)([a,s]):e(()=>import(c).then(a),[],import.meta.url).catch(s)}catch(e){b(`Failed to load ESM entry from "${c}". ${e instanceof Error?e.message:String(e)}`)}})}async function yn({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${pn}`)([n,r])}catch(t){b(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function bn(e,t,n){let{remoteEntryKey:r,entryExports:i}=Le(e,t);return i||b(Kt,U,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function xn({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Le(e,t);if(s)return s;let c=a?a(n):n;return de(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>bn(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);b($t,U,{remoteName:e,resourceUrl:c},n)})}async function Sn({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return _n(c)?vn({entry:a,remoteEntryExports:t,name:s,getEntryUrl:r}):c===`system`?yn({entry:a,remoteEntryExports:t}):xn({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}function Cn(e){let{entry:t,name:n}=e;return u(n,t)}async function wn(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=Cn(r);if(n)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:n,resourceContext:a,cached:!0}),n;if(!E[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;E[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n,resourceContext:a}).then(e=>e||Sn({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e)).catch(async e=>{let i=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!i&&!o){let i=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>wn({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:E,uniqueKey:s});if(i)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:i,resourceContext:a,error:e,recovered:!0}),i}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e}),mn.set(E[s],t)}let c=E[s];if(mn.get(c)!==t)try{let e=await c;return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e}catch(e){throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e}return c}function W(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function Tn(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function En(e){let t=new Map;return[...e||[],...ze()].forEach(e=>{e&&(y(xe(e),`Plugin configuration is invalid.`),y(e.name,`A name must be provided by the plugin.`),t.has(e.name)||t.set(e.name,e))}),Array.from(t.values())}function Dn(e,t){return t===void 0?e:{...t,name:e.name,version:e.version}}function On(e,t){let n=new Map;t.options.plugins.forEach(e=>{e&&n.set(e.name,e)});let r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return En(e).forEach(e=>{if(n.set(e.name,e),t.hooks.registerPlugins[e.name])return;let i=Dn(e,e.apply?.(t));r.forEach(e=>{e.applyPlugin(i)})}),Array.from(n.values())}function kn(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function G(e){let t={};for(let[n,r]of Object.entries(e.shared)){let e=r[0];e&&(t[n]={version:e.version,singleton:e.shareConfig?.singleton,requiredVersion:e.shareConfig?.requiredVersion!==!1&&e.shareConfig?.requiredVersion,eager:e.eager,strictVersion:e.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:e.remotes?.map(kn)??[],shared:t}}}function An(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,recordPreloadedAssets:!0,...e}}function jn(e,t){return t.map(t=>{let n=Gt(e,t.nameOrAlias);return y(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&p({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:An(t)}})}function Mn(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function Nn(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function K(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}function Pn(e,t,n,r){return n?He(t)?Promise.resolve(K(e,t,`cached`)):(Ue(t),r()):r()}async function Fn(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i?.remoteEntryExports)return K(r,a,`cached`);try{if(!await wn({origin:e,remoteInfo:n,remoteEntryExports:i?.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return K(r,a,`success`)}catch(e){return K(r,a,Nn(e)?`timeout`:`error`,e)}}function In({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=ue({url:n,cb:()=>{o(K(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(K(i,n,Nn(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function Ln({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=le({url:n,cb:()=>{a(K(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(K(i,n,Nn(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function q(e,t){return{...e,resourceType:t}}function Rn(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name},a=!0){let{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:c}=n,l=[];if(t.options.inBrowser){if(c.forEach(n=>{let{moduleInfo:r}=n;l.push(Fn(t,e,r,q(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};o.forEach(r=>{let o=q(i,`css`);l.push(Pn(o,r,a,()=>In({host:t,remoteInfo:e,url:r,attrs:n,context:o})))})}else{let n={rel:`stylesheet`,type:`text/css`};o.forEach(r=>{let o=q(i,`css`);l.push(Pn(o,r,a,()=>In({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:o})))})}let n=Ln,u={fetchpriority:`high`,type:`text/javascript`};r?(n=In,u={rel:`preload`,as:`script`}):_n(e.type)&&(n=In,u={rel:`modulepreload`,fetchpriority:`high`}),s.forEach(r=>{let o=q(i,`js`);l.push(Pn(o,r,a,()=>n({host:t,remoteInfo:e,url:r,attrs:u,context:o})))})}return Promise.all(l)}var zn={global:{Global:T,nativeGlobal:w,resetFederationGlobalInfo:ke,setGlobalFederationInstance:Ae,getGlobalFederationConstructor:je,setGlobalFederationConstructor:Me,getInfoWithoutType:D,getGlobalSnapshot:Ne,getTargetSnapshotInfoByModuleInfo:Pe,getGlobalSnapshotInfoByModuleInfo:O,setGlobalSnapshotInfoByModuleInfo:Fe,addGlobalSnapshot:Ie,getRemoteEntryExports:Le,registerGlobalPlugins:Re,getGlobalHostPlugins:ze,getPreloaded:Be,setPreloaded:Ve},share:{getRegisteredShare:V,getGlobalShareScope:Bt},utils:{matchRemoteWithNameAndExpose:Wt,preloadAssets:Rn,getRemoteInfo:W}};function Bn(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function Vn(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var Hn=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e,t){let n=t||{initiator:`loadRemote`,id:Ut(this.remoteInfo.name,e),resourceType:`remoteEntry`,url:this.remoteInfo.entry,expose:e},r=await wn({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:n});return y(r,`remoteEntryExports is undefined \n ${p(this.remoteInfo)}`),this.remoteEntryExports=r,this.remoteEntryExports}async init(e,t,n,r,i){let a=await this.getEntry(r,i);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host}),a;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,cached:!0,origin:this.host}),n}return a}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:i,initScope:o}=Vn(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:i,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});a?.init===void 0&&b(qt,U,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,G(this.host.options));try{await a.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){b(sn,U,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,G(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:a}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return a}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||b(on,U,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:Bn(r)},void 0,G(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=we(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},J=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e){y(xe(e),`Plugin configuration is invalid.`);let t=e.name;y(t,`A name must be provided by the plugin.`),this.registerPlugins[t]||(this.registerPlugins[t]=e,this.lifecycleKeys.forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)}))}removePlugin(e){y(e,`A name is required.`);let t=this.registerPlugins[e];y(t,`The plugin "${e}" is not registered.`),this.lifecycleKeys.forEach(e=>{let n=t[e];n&&this.lifecycle[e].remove(n)}),delete this.registerPlugins[e]}},Y=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},X=class extends Y{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function Un(e,t){if(!ye(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Z=class extends Y{constructor(e){super(),this.onerror=b,this.type=e}emit(e){ye(e)||b(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(Un(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){x(e),this.onerror(e)}return e}},Q=class extends Y{constructor(e){super(),this.onerror=b,this.type=e}emit(e){ye(e)||b(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(x(t),this.onerror(t),e),i=a=>{if(a!==void 0&&Un(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},$=`Remote loading is disabled by experiments.optimization.disableRemote.`,Wn=class{constructor(){this.hooks=new J({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error($)}preloadRemote(){throw Error($)}registerRemotes(){throw Error($)}getRemoteModuleAndOptions(){throw Error($)}initRawContainer(){throw Error($)}};function Gn(e,t){let n=Ce(t);n.url||b(nn,U,{remoteName:e.name});let r=d(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Kn(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!_e(t)||!ve(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Ut(t.name,r)});Gn(a,s);let l=[{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1,recordPreloadedAssets:!0}];await i.remoteHandler.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:l,options:i.options,origin:i});let[u]=l;if(u){let e={remote:t,preloadConfig:u},n=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:e,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});n&&Rn(a,i,n,!1,{initiator:`loadRemote`,id:o},u.recordPreloadedAssets).catch(()=>void 0)}return{...e,remoteSnapshot:s}}return e}}}function qn(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function Jn(e,t,n,r,i={},a){let{value:o}=D(e,S(t)),s=a||o;if(s&&!g(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=qn(r),a=s.remotesInfo[r];Jn(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var Yn=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function Xn(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:p}=f;if(Jn(r,n,(t,n,r)=>{let i;if(r)i=f;else if(Array.isArray(p)){let e=p.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;i=An(e)}else if(p===!0)i=f;else return;let c=d(t,Ce(t).url);c&&s.push({name:n.name,moduleInfo:{name:n.name,entry:c,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:c});let l=`modules`in t?t.modules:[],u=Mn(i.exposes);u.length&&`modules`in t&&(l=t?.modules?.reduce((e,t)=>(u?.indexOf(t.moduleName)!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>d(t,e));return i.filter?n.filter(i.filter):n}if(l){let r=l.length;for(let s=0;s<r;s++){let r=l[s],c=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:c,name:n.name,remoteSnapshot:t,preloadConfig:i,remote:n,origin:e}),!Be(c)&&(i.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):i.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),Ve(c))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=V(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{l.add(e)}))};i.shared.forEach(e=>{let n=u.shared?.[e.sharedName];if(!n)return;let r=e.version?n.find(t=>t.version===e.version):n;r&&Se(r).forEach(n=>{t(n,e)})})}let m=o.filter(e=>!c.has(e)&&!Yn(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!Yn(`link`,e)),jsAssetsWithoutEntry:m,entryAssets:s.filter(e=>!Yn(`script`,e.url))}}var Zn=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return _e(i)&&ve(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Gn(r,o),Xn(t,n,r,a,o))}}};function Qn(e,t){let n=O({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&D(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:Ne(),remoteSnapshot:O({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Ne(),remoteSnapshot:O({name:e.name,version:`version`in e?e.version:void 0})}}var $n=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new J({beforeLoadRemoteSnapshot:new X(`beforeLoadRemoteSnapshot`),loadSnapshot:new Q(`loadGlobalSnapshot`),loadRemoteSnapshot:new Q(`loadRemoteSnapshot`),afterLoadSnapshot:new Q(`afterLoadSnapshot`),beforeLoadManifest:new X(`beforeLoadManifest`),afterLoadManifest:new X(`afterLoadManifest`)}),this.manifestLoading=T.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=O({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Ie({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!D(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i?.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c){if(g(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=Fe({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}}else if(_e(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Fe(e,r);u=r,d=i}else b(Qt,U,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,G(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return Qn(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=W(t),i=this.manifestCache.get(e);if(i)return await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,cached:!0,origin:this.HostInstance}),i;await this.hooks.lifecycle.beforeLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,origin:this.HostInstance});let a,o,s=!1;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);(!t||!(t instanceof Response))&&(t=await fetch(e,{})),a=t,i=await t.json()}catch(c){o=c,i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,response:a,error:c,origin:this.HostInstance}),b(Jt,U,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${c}`,G(this.HostInstance.options))),s=!0}let c=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean),l=c.length>0?Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${c.join(`, `)}.`):void 0;return l&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:l,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,response:a,error:l||o,recovered:l?void 0:s||void 0,origin:this.HostInstance}),l&&b(an,U,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:c.join(`,`)},void 0,G(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=h(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},er=class{constructor(){this.hooks=new J({})}},tr=class{constructor(e){this.hooks=new J({beforeRegisterShare:new Z(`beforeRegisterShare`),afterRegisterShare:new Y(`afterRegisterShare`),afterResolve:new Q(`afterResolve`),beforeLoadShare:new Q(`beforeLoadShare`),loadShare:new X,afterLoadShare:new Y(`afterLoadShare`),errorLoadShare:new Y(`errorLoadShare`),resolveShare:new Z(`resolveShare`),initContainerShareScopeMap:new Z(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterRegisterShare(e,t){this.hooks.lifecycle.afterRegisterShare.emit({pkgName:e,...t,shareScopeMap:this.shareScopeMap,origin:this.host})}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r,loadContext:i}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,loadContext:i,origin:this.host})}catch(e){x(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i,loadContext:a}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i,loadContext:a})}catch(e){x(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=Nt(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n});let i=this.shareScopeMap[r]?.[e],a=i?.[n.version];i||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name}),this.emitAfterRegisterShare(e,{scope:r,shared:n,previousShared:a,registeredShared:this.shareScopeMap[r]?.[e]?.[n.version],trigger:`runtime`})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=t?.context,i=Vt({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),a=i;try{i?.scope&&await Promise.all(i.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:i.strategy,context:r}))}));let o=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:i,shared:n.options.shared,origin:n,loadContext:r});a=o.shareInfo,r=o.loadContext||r,y(a,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let s=a,{shared:c,useTreesShaking:l}=V(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare,r)||{};if(c){let t=Ht(c,l);if(t.lib)return H(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),t.lib;if(t.loading&&!t.loaded){let i=await t.loading;return t.loaded=!0,t.lib||=i,H(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),i}{let i=(async()=>{let e=await t.get();return H(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:c,from:n.options.name,lib:null,loading:i,treeShaking:l?t:void 0});let a=await i;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),a}}{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,recovered:!0,loadContext:r}),!1;let i=L(s.treeShaking),a=Ht(s,i),o=(async()=>{let t=await a.get();a.lib=t,a.loaded=!0,H(a,n.options.name);let{shared:i,useTreesShaking:o}=V(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare,r)||{};if(i){let e=Ht(i,o);e.lib=t,e.loaded=!0,i.from=s.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:o,treeShaking:i?a:void 0});let c=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:s,loadContext:r}),c}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,error:t,loadContext:r}),t}}initializeSharing(e=At,t){let{host:n}=this,r=t?.from,i=t?.strategy,a=t?.context?.trigger||r||`runtime`,o=t?.initScope,s=[];if(r!==`build`){let{initTokens:t}=this;o||=[];let n=t[e];if(n||=t[e]={from:this.host.name},o.indexOf(n)>=0)return s;o.push(n)}let c=this.shareScopeMap,l=n.options.name;c[e]||(c[e]={});let u=c[e],d=(t,n)=>{let{version:r,eager:i}=n;u[t]=u[t]||{};let o=u[t],s=o[r],c=s&&Ht(s),d=!!(c&&(`eager`in c&&c.eager||`shareConfig`in c&&c.shareConfig?.eager));(!c||c.strategy!==`loaded-first`&&!c.loaded&&(!i==!d?l>o[r].from:i))&&(o[r]=n),this.emitAfterRegisterShare(t,{scope:e,shared:n,previousShared:s,registeredShared:o[r],trigger:a})},f=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r,i={initiator:`loadShare`,id:e,resourceType:`remoteEntry`,url:t.remoteInfo.entry};try{r=await t.getEntry(void 0,i)}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r?.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,o,void 0,i))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&d(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&s.push(f(t.name))}),s}loadShareSync(e,t){let{host:n}=this,r=t?.context,i=Vt({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{i?.scope&&i.scope.forEach(e=>{this.initializeSharing(e,{strategy:i.strategy,from:t?.from,context:r})});let{shared:a}=V(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare,r)||{};if(a){if(typeof a.lib==`function`)return H(a,n.options.name),a.loaded||(a.loaded=!0,a.from===n.options.name&&(i.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),a.lib;if(typeof a.get==`function`){let t=a.get();if(!(t instanceof Promise))return H(a,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:a}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),t}}if(i.lib)return i.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib;if(i.get){let a=i.get();return a instanceof Promise&&b(t?.from===`build`?Xt:Zt,U,{hostName:n.options.name,sharedPkgName:e},void 0,G(n.options)),i.lib=a,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:i.lib,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib}b(Zt,U,{hostName:n.options.name,sharedPkgName:e},void 0,G(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,error:t,loadContext:r}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o),t(n,`lib`,r)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=Bt(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},nr=class{constructor(){this.shareScopeMap={},this.hooks=new J({afterResolve:new Q(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},rr=class{constructor(e){this.hooks=new J({beforeRegisterRemote:new Z(`beforeRegisterRemote`),registerRemote:new Z(`registerRemote`),beforeRequest:new Q(`beforeRequest`),afterMatchRemote:new X(`afterMatchRemote`),onLoad:new X(`onLoad`),afterLoadRemote:new X(`afterLoadRemote`),handlePreloadModule:new Y(`handlePreloadModule`),errorLoadRemote:new X(`errorLoadRemote`),beforePreloadRemote:new X(`beforePreloadRemote`),generatePreloadAssets:new X(`generatePreloadAssets`),afterPreloadRemote:new X(`afterPreloadRemote`),loadEntry:new X}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r};return}if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Wt(n.options.remotes,e),i=e,a=r?.expose,o=r?W(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:ee}=u;i=m,a=p,o=W(f);let h=await c.get(m,p,t,ee),g=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?h:void 0,exposeModuleFactory:r?void 0:h,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof g==`function`?g:h}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=jn(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:Ut(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=W(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await Rn(s,t,l,!0,{initiator:`preloadRemote`,id:i},o.recordPreloadedAssets);n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t?.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new Hn({host:r,remoteInfo:W({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Wt(t.options.remotes,i);if(!a)try{b(Yt,U,{hostName:t.options.name,requestId:i},void 0,G(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=W(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;y(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new Hn(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>e.alias&&(t.name.startsWith(e.alias)||t.alias?.startsWith(e.alias)));y(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=At,e.type||=jt};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n?.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),f(o.join(` `)))}}removeRemote(e){try{let{host:t}=this,{name:n}=e,r=t.options.remotes.findIndex(e=>e.name===n);r!==-1&&t.options.remotes.splice(r,1);let i=D(C.__FEDERATION__.moduleInfo,S(e)).key;delete C.__FEDERATION__.moduleInfo[i],`entry`in e&&(t.snapshotHandler.manifestCache.delete(e.entry),delete T.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:a}=Qn(e,t);if(a){let t=a&&`remotesInfo`in a&&a.remotesInfo&&D(a.remotesInfo,e.name).key;t&&delete a.remotesInfo[t]}let o=t.moduleCache.get(e.name);if(o){let n=o.remoteInfo,r=n.entryGlobalName;C[r]&&(Object.getOwnPropertyDescriptor(C,r)?.configurable?delete C[r]:C[r]=void 0);let i=Cn(o.remoteInfo);E[i]&&delete E[i];let a=n.buildVersion?u(n.name,n.buildVersion):n.name,s=C.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===a:e.name===a);if(s!==-1){let e=C.__FEDERATION__.__INSTANCES__[s];a=e.options.id||a;let t=Bt(),r=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===n.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==n.name),c.useIn.length?r=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),r&&(e.shareScopeMap={},delete t[a]),i.forEach(([e,n,r,i])=>{delete t[e]?.[n]?.[r]?.[i]}),C.__FEDERATION__.__INSTANCES__.splice(s,1)}t.moduleCache.delete(e.name)}}catch(e){he.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},ir=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,ar=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,or=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,sr=class{constructor(e){this.hooks=new J({beforeInit:new Z(`beforeInit`),init:new Y,beforeInitContainer:new Q(`beforeInitContainer`),initContainer:new Q(`initContainer`)}),this.version=`2.9.0`,this.moduleCache=new Map,this.loaderHook=new J({getModuleInfo:new Y,createScript:new Y,createLink:new Y,fetch:new X,loadEntryError:new X,afterLoadEntry:new X(`afterLoadEntry`),beforeInitRemote:new X(`beforeInitRemote`),afterInitRemote:new X(`afterInitRemote`),beforeGetExpose:new X(`beforeGetExpose`),afterGetExpose:new X(`afterGetExpose`),beforeExecuteFactory:new X(`beforeExecuteFactory`),afterExecuteFactory:new X(`afterExecuteFactory`),getModuleFactory:new X}),this.bridgeHook=new J({beforeBridgeRender:new Y,afterBridgeRender:new Y,beforeBridgeDestroy:new Y,afterBridgeDestroy:new Y,afterBridgeRouteSync:new Y});let t=ar&&ir?[Kn(),Zn()]:[],n={id:Tn(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=ar?new $n(this):new er,this.sharedHandler=or?new tr(this):new nr,this.remoteHandler=ar?new rr(this):new Wn,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&b(pe(tn,U)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=At,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let n=or?Nt(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){this.options.plugins=On(e,this)}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}},cr=zn;function lr(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function ur(e,t){let n=lr();return C.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}function dr(e){let t=new((je())||sr)({id:`${e.name}@${e.version||Date.now()}`,...e});return Ae(t),t}var fr=null;function pr(e){let t=ur(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),fr||=t,t):(fr=dr(n),fr)}Me(sr);export{ur as n,cr as r,pr as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vite-preload-helper-HclGiUj8.js";var t=`__mf_module_cache__`;globalThis[t]||={share:{},remote:{}},globalThis[t].share||={},globalThis[t].remote||={};var n=globalThis[t];for(let e of Object.keys(n.share))if(e.startsWith(`default:`)){let t=e.slice(8);n.share[t]===void 0&&(n.share[t]=n.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;n.share[t]===void 0&&(n.share[t]=n.share[e])}var r;async function i(){return r||=(async()=>{let t=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},r=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},i=Symbol.for(`module-federation.shared-cache-listeners`),a=Symbol.for(`module-federation.shared-cache-owners`),o=e=>{let t=e[a];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,a,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},s=(e,t)=>e[a]?.[t.canonical],c=(e,t,n,r)=>{e[t.canonical]=n;let s=t.aliases||[];for(let t of s)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let c=e[a];r===void 0?c&&delete c[t.canonical]:o(e)[t.canonical]=r;let l=e[i]?.[t.canonical];if(l)for(let e of l)e(n);return n},l=await(await e(()=>import(`../remoteEntry.js`),[],import.meta.url)).init(),{usedShared:u}=await e(async()=>{let{usedShared:e}=await import(`./_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-
|
|
1
|
+
import{t as e}from"./vite-preload-helper-HclGiUj8.js";var t=`__mf_module_cache__`;globalThis[t]||={share:{},remote:{}},globalThis[t].share||={},globalThis[t].remote||={};var n=globalThis[t];for(let e of Object.keys(n.share))if(e.startsWith(`default:`)){let t=e.slice(8);n.share[t]===void 0&&(n.share[t]=n.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;n.share[t]===void 0&&(n.share[t]=n.share[e])}var r;async function i(){return r||=(async()=>{let t=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},r=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},i=Symbol.for(`module-federation.shared-cache-listeners`),a=Symbol.for(`module-federation.shared-cache-owners`),o=e=>{let t=e[a];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,a,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},s=(e,t)=>e[a]?.[t.canonical],c=(e,t,n,r)=>{e[t.canonical]=n;let s=t.aliases||[];for(let t of s)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let c=e[a];r===void 0?c&&delete c[t.canonical]:o(e)[t.canonical]=r;let l=e[i]?.[t.canonical];if(l)for(let e of l)e(n);return n},l=await(await e(()=>import(`../remoteEntry.js`),[],import.meta.url)).init(),{usedShared:u}=await e(async()=>{let{usedShared:e}=await import(`./_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-7tb3Q-Bx.js`);return{usedShared:e}},[],import.meta.url),d=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t};for(let e of[[`react`]])await Promise.all(e.map(async e=>{let i=u[e];if(!i||i.materialize===!1||i.treeShaking)return;let a=t(e,i.shareConfig?.singleton,i.version,i.scope);(r(n.share,a)===void 0||s(n.share,a)!==`signalk_questdb`)&&await l.loadShare(e,{customShareInfo:{shareConfig:i.shareConfig}}).then(async e=>{let t=typeof e==`function`?e():e,r=d(await Promise.resolve(t));c(n.share,a,r,`signalk_questdb`)})}));return l})(),r}r=i();export{r as hostInitPromise,i as initHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vite-preload-helper-HclGiUj8.js";import"./virtualExposes-BBIkbTtD.js";var t=`__mf_module_cache__`;globalThis[t]||={share:{},remote:{}},globalThis[t].share||={},globalThis[t].remote||={};var n=globalThis[t];for(let e of Object.keys(n.share))if(e.startsWith(`default:`)){let t=e.slice(8);n.share[t]===void 0&&(n.share[t]=n.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;n.share[t]===void 0&&(n.share[t]=n.share[e])}(async()=>{let t=await e(()=>import(`./hostInit-
|
|
1
|
+
import{t as e}from"./vite-preload-helper-HclGiUj8.js";import"./virtualExposes-BBIkbTtD.js";var t=`__mf_module_cache__`;globalThis[t]||={share:{},remote:{}},globalThis[t].share||={},globalThis[t].remote||={};var n=globalThis[t];for(let e of Object.keys(n.share))if(e.startsWith(`default:`)){let t=e.slice(8);n.share[t]===void 0&&(n.share[t]=n.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;n.share[t]===void 0&&(n.share[t]=n.share[e])}(async()=>{let t=await e(()=>import(`./hostInit-CyS9_M1c.js`),[],import.meta.url);await t.__tla;let{initHost:r}=t;await r(),n.pendingShareLoads&&await Promise.all(n.pendingShareLoads);let i=globalThis.__mf_module_cache_react_server__;i?.pendingShareLoads&&await Promise.all(i.pendingShareLoads)})().then(()=>e(()=>import(`./configpanel-BvRk9kiK.js`),[],import.meta.url));
|
package/public/remoteEntry.js
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import{t as e}from"./assets/vite-preload-helper-HclGiUj8.js";import{r as t,t as n}from"./assets/dist-BxwXn66h.js";({...t.global});var r=t.share;t.utils,typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var i=`__mf_init__virtual:mf:__mfe_internal__signalk_questdb__mf_owner__1__mf_v__runtimeInit__mf_v__.js__`,a=globalThis[i];if(!a){let e,t,n=new Promise((n,r)=>{e=n,t=r});a=globalThis[i]={initPromise:n,initResolve:e,initReject:t}}var o=a.initResolve,s=`__mf_module_cache__`;globalThis[s]||={share:{},remote:{}},globalThis[s].share||={},globalThis[s].remote||={};var c=globalThis[s];for(let e of Object.keys(c.share))if(e.startsWith(`default:`)){let t=e.slice(8);c.share[t]===void 0&&(c.share[t]=c.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;c.share[t]===void 0&&(c.share[t]=c.share[e])}var l={},u=Array.isArray(`default`)?`default`:[`default`],d=`default`,f=`signalk_questdb`,p=[[`react`]],m,h,g;async function _(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}var v=Symbol(`mf.originalSharedProvider`),y={emit:e=>e},b=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[v]:r});return n},x=(e,t)=>{if(!t)return;let n=Object.entries(e||{}),r=n.find(([,e])=>e===t);if(r)return{version:r[0],provider:t,registered:!0};if(typeof t.version==`string`&&t.version)return{version:t.version,provider:t,registered:!1};let i=n.filter(([,e])=>e===t||!!(t.from&&e?.from===t.from));if(i.length===1)return{version:i[0][0],provider:t,registered:!1}},S=(e,t,n,i)=>{if(!e||!n)return;let a=Array.isArray(n.scope)?n.scope:[n.scope||`default`],o=b(e,i),s={};for(let e of a)s[e||`default`]={[t]:o};let c=r.getRegisteredShare(s,t,{...n,scope:a,strategy:i},y)?.shared;return c?.[v]||c},C=(e,t,n,r)=>{let i=e=>w(e,n),a=Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!i(e)));n?.version&&n.shareConfig?.import!==!1&&(a[n.version]||(a[n.version]=n));let o=S(a,t,n,r);return i(o)?void 0:o},w=(e,t)=>e===t||!!(t?.from&&e?.from===t.from),T=(e,t,n,r,i,a,o,s,c)=>{if(c!==`version-first`||!s)return;let l=t?.options?.shared?.[i],u=Array.isArray(l)?l.find(e=>e?.version===a):void 0,d=(s?.from===t?.options?.name?s:void 0)||(w(u,s)?u:t?void 0:s);if(d)return e.some(e=>e!==t&&e?.options?.name===o?.from&&e?.shareScopeMap?.[r]===n)?d:void 0},ee=(e,t,n,r,i,a,o,s,c)=>{let l=a.registered?T(e,t,n,r,i,a.version,a.provider,s,c):void 0,u=l||o;if(u&&!(a.registered&&!w(u,s)))return{provider:u,scopeRootProvider:l}};async function E(){return m||=_(()=>e(()=>import(`./assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-I2PEpnTA.js`),[],import.meta.url)).catch(e=>{throw m=void 0,e}),m}async function D(){return h||=_(()=>e(()=>import(`./assets/virtualExposes-BBIkbTtD.js`),[],import.meta.url)).then(e=>e.default??e).catch(e=>{throw h=void 0,e}),h}async function O(e={},t=[]){let r=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},i=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},a=Symbol.for(`module-federation.shared-cache-listeners`),s=Symbol.for(`module-federation.shared-cache-owners`),m=e=>{let t=e[s];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,s,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},h=(e,t)=>e[s]?.[t.canonical],v=(e,t,n,r)=>{e[t.canonical]=n;let i=t.aliases||[];for(let t of i)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[s];r===void 0?o&&delete o[t.canonical]:m(e)[t.canonical]=r;let c=e[a]?.[t.canonical];if(c)for(let e of c)e(n);return n},y=Symbol.for(`module-federation.tree-shaking-shared-cache`),b=e=>{let t=e[y];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,y,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},T=(e,t,n,r)=>{if(!Array.isArray(n))return r;let i=[...new Set(n)].sort(),a=b(e),o=a[t.canonical]||=[],s=o.find(e=>e.providedExports.length===i.length&&e.providedExports.every((e,t)=>e===i[t]));return s?s.value=r:o.push({providedExports:i,value:r}),r},D=Symbol.for(`module-federation.tree-shaking-shared-selection-cache`),O=e=>{let t=e[D];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,D,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},k=(e,t,n)=>{let r=i(e,t);return r===void 0?e[D]?.[t.canonical]?.[n]:r},A=(e,t,n,r)=>{let i=O(e),a=i[t.canonical]||=Object.create(null);return a[n]=r,r},j=globalThis.__FEDERATION__?.__INSTANCES__||[],M=t.find(e=>e?.from)?.from,N=j.find(t=>t?.options?.name===M&&t?.shareScopeMap?.default===e)||j.find(t=>t?.options?.name!==f&&t?.shareScopeMap?.default===e),P=Object.create(null),F=e=>{let t=Object.create(null);for(let[n,r]of Object.entries(e||{}))t[n]=Object.assign(Object.create(null),r);return t},I=(e,t)=>{let n=!N&&Object.values(t||{}).some(e=>Object.values(e||{}).some(B)),r=n?F(t):t;return P[e]={host:t,runtime:r,isWebpackScope:n},r},L=()=>{let e=Object.values(P).filter(({isWebpackScope:e})=>e);if(e.length!==0)for(let{host:t,runtime:n}of e)for(let[e,r]of Object.entries(t||{})){let t=n[e]||=Object.create(null);for(let[e,n]of Object.entries(r||{}))t[e]=n}},R=Object.create(null);for(let[t,n]of Object.entries(e)){let e=R[t]=Object.create(null);for(let[t,r]of Object.entries(n))e[t]=Object.assign({},r)}let{usedShared:z,usedRemotes:te}=await E();function B(e){return typeof e?.get==`function`&&Function.prototype.toString.call(e.get).includes(`__webpack_require__`)}let ne=Object.values(R).some(e=>Object.values(e||{}).some(B)),re=e=>{let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]},V=(t,n,r)=>{if(typeof C!=`function`)return;let i=re(t),a=i===t?[[t,n]]:[[t,n],[i,z[i]]];for(let[n,i]of a){if(!i)continue;let a=C(r?n===t?r:R[n]:e[n],n,i,`version-first`);if(a&&B(a)&&!a.lib&&!a.loaded)return a}};var H=l[d];if(H||=l[d]={from:f},t.indexOf(H)>=0)return;t.push(H);let U=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},ie=[],ae=globalThis.window===void 0?await Promise.all([]):[],W=`__mf_vite_runtime_share_load_id__`,oe=0,G=new Map,K=new Map,q=n({name:f,remotes:te,shared:z,plugins:[se(),...ie,...ae],shareStrategy:`version-first`});q.initShareScopeMap(`default`,I(`default`,e));function se(){return{name:`vite-share-pin-lifecycle-plugin`,resolveShare(e){let t=e.shareInfo?.[W],n=t===void 0?void 0:K.get(t);if(!n)return e;let r=e.resolver;return e.resolver=(...e)=>(n.pinned.reapply(),r(...e)),n.pinned.reveal(),e}}}let ce=q.sharedHandler.hooks.lifecycle.resolveShare,J=new WeakMap;ce.on(e=>{let t=e.shareInfo?.[W],n=e.resolver;return typeof n==`function`&&(e.resolver=(...e)=>{let r=n(...e),i=r?.shared;return i&&(typeof i==`object`||typeof i==`function`)&&!J.has(i)&&J.set(i,{from:i.from}),t!==void 0&&i&&G.set(t,i),r}),e});let le=(e,t,n,r)=>{if(!e||e[t]!==n)return;let i=Object.assign({},r,{version:r.version??t,scope:r.scope??n?.scope??[`default`],strategy:`loaded-first`}),a=r.from;e[t]=i;let o=()=>n===void 0?e[t]===void 0:e[t]===n;return{provider:i,reveal(){return e[t]===i&&(n===void 0?delete e[t]:e[t]=n,!0)},reapply(){return o()?(e[t]=i,!0):!1},release(s,c=!0){return r.from=a,e[t]===i?c?s?(i.from=a,s&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete e[t]:e[t]=n,!1):(n===void 0?delete e[t]:e[t]=n,!0):!c&&o()}}},ue=e=>Object.entries(e||{}).map(([e,t])=>({provider:t,version:e,from:t.from,registered:!0})),de=(e,t)=>{if(t===void 0)return;let n;for(let r of e){let e=r.provider,i=e.treeShaking||e;if(r.loadedFactory===t||e.lib===t||i.lib===t){if(n)return;n=r}}return n},fe=async(e,t,n)=>{let r=++oe;K.set(r,{pinned:n});try{let n=await q.loadShare(e,{customShareInfo:{shareConfig:t,[W]:r}});return{factory:n===!1?void 0:n,selectedProvider:G.get(r)}}finally{G.delete(r),K.delete(r)}},Y=async(e,t,n,r,i,a,o=!0)=>{let s=a.from,c=le(n,r,i,a);if(!c)return;let l;try{l=await fe(e,t,c)}catch(e){throw c.release(!1),e}let u=l?.factory;if(u===void 0){c.release(!1);return}let d=ue(n),f=c.provider.treeShaking||c.provider,p=c.provider.lib===u||f.lib===u;if(!o&&p){let e=d.findIndex(e=>e.provider===c.provider);e!==-1&&d.splice(e,1)}!o&&!d.some(e=>e.provider===a)&&d.push({provider:a,version:r,from:s,registered:!1,loadedFactory:p?u:void 0});let m=!o&&l.selectedProvider===c.provider&&p?a:l.selectedProvider;if(m&&!d.some(e=>e.provider===m)){let e=J.get(m),t=typeof m.version==`string`&&m.version?m.version:r;d.push({provider:m,version:t,from:e?e.from:m.from,registered:n?.[t]===m,loadedFactory:u})}let h=d.find(e=>e.provider===m)??de(d,u);if(!c.release(!0,h?.provider===c.provider)||!h)return;let g=J.get(h.provider);h.from=h.provider===a?s:g?g.from:h.provider.from,g&&(h.provider.from=g.from);let _=typeof u==`function`?u():u,v=await Promise.resolve(_);if(!(h.registered&&n?.[h.version]!==h.provider))return{provider:h.provider,selection:h,resolved:v}},X=new Set,Z=new Map,pe=async(t,n,a)=>{let o=!!n.shareConfig?.singleton;if(!o&&n.canLiveRebind!==!1)try{let s=C(a,t,n,`version-first`),l=x(a,s);if(!l)return;let{version:u}=l;if(!o&&u!==n.version||!s.lib&&!s.loading&&!(s.loaded&&typeof s.get==`function`))return;let d=r(t,o,n.version,n.scope);if(i(c.share,d)!==void 0)return;let f=e[t],p=f?.[u];if(l.registered&&!w(p,s))return;let m,h=s.lib;if(!h&&B(s)||(!h&&s.loading&&(h=await s.loading),!h&&s.loaded&&typeof s.get==`function`&&(h=await s.get()),!h))return;let g=typeof h==`function`?h():h,_=await Promise.resolve(g),y=l.registered?p:s;m={provider:y,selection:{provider:y,version:u,from:s.from,registered:l.registered},resolved:_};let b=m?.provider,S=m?.selection;if(!S)return;let T=m?.resolved;if(T===void 0||i(c.share,d)!==void 0||S.registered&&f?.[S.version]!==b)return;v(c.share,d,U(T),S.from),X.add(b)}catch(e){console.error(`[Module Federation] Failed to bridge materialized shared module "`+t+`"`,e)}},me=async(t,n,a,o,s)=>{try{if(V(t,n))return;let l=r(t,n.shareConfig?.singleton,n.version,n.scope),u=i(c.share,l),d=h(c.share,l),p=C(a,t,n,`version-first`),m=p||S(a,t,n,`version-first`)||n,g=x(a,m);if(!g)return;let _=w(m,n),{version:y}=g;if(!n.shareConfig?.singleton&&y!==n.version)return;let b=o?.[y],T=ee(j,N,e,`default`,t,g,p,b,`version-first`);if(!T&&!_)return;let{provider:E,scopeRootProvider:D}=T||{provider:m,scopeRootProvider:void 0};if(n.canLiveRebind===!1||u!==void 0&&d!==f)return;let O=e[t],k=O?.[y];if(g.registered&&!D&&!w(k,E)||!_&&B(E)&&!E.lib&&!E.loaded)return;let A=await Y(t,n.shareConfig,O,y,k,E,g.registered&&!_),M=A?.provider,P=A?.selection;if(!P||w(M,n)||s&&(s.version!==P.version||!w({from:P.from},s.provider))||X.has(M))return;let F=A?.resolved;if(F===void 0)return;let I=i(c.share,l),L=h(c.share,l);if(I!==void 0&&L!==f||P.registered&&O?.[P.version]!==M)return;s||Z.set(t,{version:P.version,provider:{from:P.from}}),X.add(M);let R=U(F);v(c.share,l,R,P.from)}catch(e){console.error(`[Module Federation] Failed to bridge external shared module "`+t+`"`,e)}};for(let e of p)await Promise.all(e.map(async e=>{let t=z[e];!t||t.materialize===!1||t.treeShaking||await pe(e,t,R[e])}));for(let[e,t]of Object.entries(z)){if(t.treeShaking)continue;let n=r(e,t.shareConfig?.singleton,t.version,t.scope);if(i(c.share,n)!==void 0)continue;let a=r(e,!0,t.version,t.scope),o=i(c.share,a);o!==void 0&&v(c.share,n,o,h(c.share,a))}let he=[`react`],ge=[[`react`]],Q=he.filter(e=>z[e]&&z[e].materialize!==!1);c.providerInit||=new Map;let _e=(e,t)=>{let n=c.providerInit.get(e);if(n)return n;let r=Promise.resolve().then(t);return c.providerInit.set(e,r),r.catch(()=>c.providerInit.delete(e)),r};var ve=async e=>{let t=new Set(e);for(let e of ge)await Promise.all(e.filter(e=>t.has(e)).map(async e=>{let t=z[e],n=r(e,t.shareConfig?.singleton,t.version,t.scope);if(t.shareConfig?.import===!1||t.treeShaking||i(c.share,n)!==void 0)return;let a=r(e,!0,t.version,t.scope),o=i(c.share,a);if(o!==void 0){v(c.share,n,o,h(c.share,a));return}let s=typeof V==`function`?V(e,t):void 0;if(s&&!s.lib&&!s.loaded)return;let l=n.canonical,u=await _e(l,async()=>{let e=await t.get(),n=typeof e==`function`?e():e;return Promise.resolve(n)}),d=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(u),p=d===u?{...u}:d;p.__esModule!==!0&&Object.defineProperty(p,"__esModule",{value:!0,enumerable:!1}),v(c.share,n,p,f)}))};let ye=e=>{let t=z[e];if(!t.treeShaking&&t.shareConfig?.import!==!1)return!1;let n=r(e,t.shareConfig?.singleton,t.version,t.scope);return t.treeShaking?k(c.share,n,f)===void 0&&i(c.share,n)===void 0:i(c.share,n)===void 0},$=Q.findIndex(e=>{let t=z[e],n=r(e,t.shareConfig?.singleton,t.version,t.scope);return(t.treeShaking?k(c.share,n,f)??i(c.share,n):i(c.share,n))===void 0?t.treeShaking||t.shareConfig?.import===!1?!0:typeof C==`function`&&!!C(R[e],e,t,`version-first`):!1}),be=$===-1?Q:Q.slice(0,$);var xe=$===-1?[]:Q.slice($);await ve(be);try{await _(async()=>{await Promise.all(await q.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:t}))})}catch(e){console.error(`[Module Federation]`,e)}L();let Se=async()=>{for(let t of p)await Promise.all(t.map(async t=>{let n=z[t];!n||n.materialize===!1||n.treeShaking||await me(t,n,e[t],R[t],void 0)}))};await Se(),ne&&(g=Se);try{let e=globalThis.__FEDERATION__?.__SHARE__,t=Object.create(null);if(e)for(let[,n]of Object.entries(e))for(let e of u){let r=n?.[e];if(r)for(let[e,n]of Object.entries(r)){let r=z?.[e],i=R[e],a=Z.get(e);if(!r||!i||!a||r.treeShaking)continue;let o=t[e]||(t[e]=Object.create(null));for(let[e,t]of Object.entries(n)){if(!t.lib||a.version!==e||!w(t,a.provider))continue;let n=i[e];(t===n||n?.from&&t.from===n.from)&&(t===r||r.from&&t.from===r.from||o[e]===void 0&&(o[e]=t))}}}for(let e of p)await Promise.all(e.map(async e=>{let n=t[e];n&&await me(e,z[e],n,R[e],Z.get(e))}))}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}let Ce=async()=>{},we=async(t,n)=>{let a=r(t,n.shareConfig?.singleton,n.version,n.scope),o=n.treeShaking?k(c.share,a,f):i(c.share,a);if(n.shareConfig?.import!==!1||o!==void 0||V(t,n,R[t]))return;let s=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},l=e?.[t],u=S(l,t,n,`version-first`)||n,d=x(l,u);if(!d)return;let{version:p}=d,m=l?.[p],h=await Y(t,n.shareConfig,l,p,m,u,d.registered&&!w(u,n)),g=h?.selection,_=h?.provider,y=h?.resolved;if(!g||w(_,n)||y===void 0||(n.treeShaking?k(c.share,a,f):i(c.share,a))!==void 0||g.registered&&l?.[g.version]!==_)return;let b=s(y);if(n.treeShaking){let e=n.treeShaking.providedExports??n.treeShaking.usedExports??[];T(c.share,a,e,b),A(c.share,a,f,b)}else v(c.share,a,b,g.from)},Te=[];for(let e of xe){let t=z[e];if(ye(e))try{t.treeShaking?await Ce(e,t):t.shareConfig?.import===!1&&await we(e,t)}catch(t){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${e}"`,t);break}if(ye(e))break;Te.push(e)}return await ve(Te),o(q),q}async function k(e){let t=await D();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return g&&await g(),c.pendingShareLoads&&await Promise.all(c.pendingShareLoads),t[e]().then(e=>()=>e)}export{k as get,O as init};
|
|
1
|
+
import{t as e}from"./assets/vite-preload-helper-HclGiUj8.js";import{r as t,t as n}from"./assets/dist-BgxWXJ5y.js";({...t.global});var r=t.share;t.utils,typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var i=`__mf_init__virtual:mf:__mfe_internal__signalk_questdb__mf_owner__1__mf_v__runtimeInit__mf_v__.js__`,a=globalThis[i];if(!a){let e,t,n=new Promise((n,r)=>{e=n,t=r});a=globalThis[i]={initPromise:n,initResolve:e,initReject:t}}var o=a.initResolve,s=`__mf_module_cache__`;globalThis[s]||={share:{},remote:{}},globalThis[s].share||={},globalThis[s].remote||={};var c=globalThis[s];for(let e of Object.keys(c.share))if(e.startsWith(`default:`)){let t=e.slice(8);c.share[t]===void 0&&(c.share[t]=c.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;c.share[t]===void 0&&(c.share[t]=c.share[e])}var l={},u=Array.isArray(`default`)?`default`:[`default`],d=`default`,f=`signalk_questdb`,p=[[`react`]],m,h,g;async function _(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}var v=Symbol(`mf.originalSharedProvider`),y={emit:e=>e},b=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[v]:r});return n},x=(e,t)=>{if(!t)return;let n=Object.entries(e||{}),r=n.find(([,e])=>e===t);if(r)return{version:r[0],provider:t,registered:!0};if(typeof t.version==`string`&&t.version)return{version:t.version,provider:t,registered:!1};let i=n.filter(([,e])=>e===t||!!(t.from&&e?.from===t.from));if(i.length===1)return{version:i[0][0],provider:t,registered:!1}},S=(e,t,n,i)=>{if(!e||!n)return;let a=Array.isArray(n.scope)?n.scope:[n.scope||`default`],o=b(e,i),s={};for(let e of a)s[e||`default`]={[t]:o};let c=r.getRegisteredShare(s,t,{...n,scope:a,strategy:i},y)?.shared;return c?.[v]||c},C=(e,t,n,r)=>{let i=e=>w(e,n),a=Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!i(e)));n?.version&&n.shareConfig?.import!==!1&&(a[n.version]||(a[n.version]=n));let o=S(a,t,n,r);return i(o)?void 0:o},w=(e,t)=>e===t||!!(t?.from&&e?.from===t.from),T=(e,t,n,r,i,a,o,s,c)=>{if(c!==`version-first`||!s)return;let l=t?.options?.shared?.[i],u=Array.isArray(l)?l.find(e=>e?.version===a):void 0,d=(s?.from===t?.options?.name?s:void 0)||(w(u,s)?u:t?void 0:s);if(d)return e.some(e=>e!==t&&e?.options?.name===o?.from&&e?.shareScopeMap?.[r]===n)?d:void 0},ee=(e,t,n,r,i,a,o,s,c)=>{let l=a.registered?T(e,t,n,r,i,a.version,a.provider,s,c):void 0,u=l||o;if(u&&!(a.registered&&!w(u,s)))return{provider:u,scopeRootProvider:l}};async function E(){return m||=_(()=>e(()=>import(`./assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-7tb3Q-Bx.js`),[],import.meta.url)).catch(e=>{throw m=void 0,e}),m}async function D(){return h||=_(()=>e(()=>import(`./assets/virtualExposes-BBIkbTtD.js`),[],import.meta.url)).then(e=>e.default??e).catch(e=>{throw h=void 0,e}),h}async function O(e={},t=[]){let r=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},i=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},a=Symbol.for(`module-federation.shared-cache-listeners`),s=Symbol.for(`module-federation.shared-cache-owners`),m=e=>{let t=e[s];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,s,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},h=(e,t)=>e[s]?.[t.canonical],v=(e,t,n,r)=>{e[t.canonical]=n;let i=t.aliases||[];for(let t of i)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[s];r===void 0?o&&delete o[t.canonical]:m(e)[t.canonical]=r;let c=e[a]?.[t.canonical];if(c)for(let e of c)e(n);return n},y=Symbol.for(`module-federation.tree-shaking-shared-cache`),b=e=>{let t=e[y];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,y,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},T=(e,t,n,r)=>{if(!Array.isArray(n))return r;let i=[...new Set(n)].sort(),a=b(e),o=a[t.canonical]||=[],s=o.find(e=>e.providedExports.length===i.length&&e.providedExports.every((e,t)=>e===i[t]));return s?s.value=r:o.push({providedExports:i,value:r}),r},D=Symbol.for(`module-federation.tree-shaking-shared-selection-cache`),O=e=>{let t=e[D];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,D,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},k=(e,t,n)=>{let r=i(e,t);return r===void 0?e[D]?.[t.canonical]?.[n]:r},A=(e,t,n,r)=>{let i=O(e),a=i[t.canonical]||=Object.create(null);return a[n]=r,r},j=globalThis.__FEDERATION__?.__INSTANCES__||[],M=t.find(e=>e?.from)?.from,N=j.find(t=>t?.options?.name===M&&t?.shareScopeMap?.default===e)||j.find(t=>t?.options?.name!==f&&t?.shareScopeMap?.default===e),P=Object.create(null),F=e=>{let t=Object.create(null);for(let[n,r]of Object.entries(e||{}))t[n]=Object.assign(Object.create(null),r);return t},te=(e,t)=>{let n=!N&&Object.values(t||{}).some(e=>Object.values(e||{}).some(z)),r=n?F(t):t;return P[e]={host:t,runtime:r,isWebpackScope:n},r},I=()=>{let e=Object.values(P).filter(({isWebpackScope:e})=>e);if(e.length!==0)for(let{host:t,runtime:n}of e)for(let[e,r]of Object.entries(t||{})){let t=n[e]||=Object.create(null);for(let[e,n]of Object.entries(r||{}))t[e]=n}},L=Object.create(null);for(let[t,n]of Object.entries(e)){let e=L[t]=Object.create(null);for(let[t,r]of Object.entries(n))e[t]=Object.assign({},r)}let{usedShared:R,usedRemotes:ne}=await E();function z(e){if(typeof e?.get!=`function`)return!1;let t=Function.prototype.toString.call(e.get);return t.includes(`__webpack_require__`)||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(t)}let re=Object.values(L).some(e=>Object.values(e||{}).some(z)),ie=e=>{let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]},B=(t,n,r)=>{if(typeof C!=`function`)return;let i=ie(t),a=i===t?[[t,n]]:[[t,n],[i,R[i]]];for(let[n,i]of a){if(!i)continue;let a=C(r?n===t?r:L[n]:e[n],n,i,`version-first`);if(a&&z(a)&&!a.lib&&!a.loaded)return a}};var V=l[d];if(V||=l[d]={from:f},t.indexOf(V)>=0)return;t.push(V);let H=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},ae=[],oe=globalThis.window===void 0?await Promise.all([]):[],U=`__mf_vite_runtime_share_load_id__`,se=0,W=new Map,G=new Map,K=n({name:f,remotes:ne,shared:R,plugins:[ce(),le(),...ae,...oe],shareStrategy:`version-first`});K.initShareScopeMap(`default`,te(`default`,e));function ce(){return{name:`vite-share-pin-lifecycle-plugin`,resolveShare(e){let t=e.shareInfo?.[U],n=t===void 0?void 0:G.get(t);if(!n)return e;let r=e.resolver;return e.resolver=(...e)=>(n.pinned.reapply(),r(...e)),n.pinned.reveal(),e}}}function le(){return{name:`vite-real-name-snapshot-plugin`,afterLoadSnapshot(e){let t=e&&e.remoteSnapshot,n=t&&t.globalName,r=t&&t.version;if(!n||!r||!t.remoteEntry)return e;let i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,a=n+`:`+r;return i&&!i[a]&&(i[a]=t),e}}}let ue=K.sharedHandler.hooks.lifecycle.resolveShare,q=new WeakMap;ue.on(e=>{let t=e.shareInfo?.[U],n=e.resolver;return typeof n==`function`&&(e.resolver=(...e)=>{let r=n(...e),i=r?.shared;return i&&(typeof i==`object`||typeof i==`function`)&&!q.has(i)&&q.set(i,{from:i.from}),t!==void 0&&i&&W.set(t,i),r}),e});let de=(e,t,n,r)=>{if(!e||e[t]!==n)return;let i=Object.assign({},r,{version:r.version??t,scope:r.scope??n?.scope??[`default`],strategy:`loaded-first`}),a=r.from;e[t]=i;let o=()=>n===void 0?e[t]===void 0:e[t]===n;return{provider:i,reveal(){return e[t]===i&&(n===void 0?delete e[t]:e[t]=n,!0)},reapply(){return o()?(e[t]=i,!0):!1},release(s,c=!0){return r.from=a,e[t]===i?c?s?(i.from=a,s&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete e[t]:e[t]=n,!1):(n===void 0?delete e[t]:e[t]=n,!0):!c&&o()}}},fe=e=>Object.entries(e||{}).map(([e,t])=>({provider:t,version:e,from:t.from,registered:!0})),pe=(e,t)=>{if(t===void 0)return;let n;for(let r of e){let e=r.provider,i=e.treeShaking||e;if(r.loadedFactory===t||e.lib===t||i.lib===t){if(n)return;n=r}}return n},me=async(e,t,n)=>{let r=++se;G.set(r,{pinned:n});try{let n=await K.loadShare(e,{customShareInfo:{shareConfig:t,[U]:r}});return{factory:n===!1?void 0:n,selectedProvider:W.get(r)}}finally{W.delete(r),G.delete(r)}},J=async(e,t,n,r,i,a,o=!0)=>{let s=a.from,c=de(n,r,i,a);if(!c)return;let l;try{l=await me(e,t,c)}catch(e){throw c.release(!1),e}let u=l?.factory;if(u===void 0){c.release(!1);return}let d=fe(n),f=c.provider.treeShaking||c.provider,p=c.provider.lib===u||f.lib===u;if(!o&&p){let e=d.findIndex(e=>e.provider===c.provider);e!==-1&&d.splice(e,1)}!o&&!d.some(e=>e.provider===a)&&d.push({provider:a,version:r,from:s,registered:!1,loadedFactory:p?u:void 0});let m=!o&&l.selectedProvider===c.provider&&p?a:l.selectedProvider;if(m&&!d.some(e=>e.provider===m)){let e=q.get(m),t=typeof m.version==`string`&&m.version?m.version:r;d.push({provider:m,version:t,from:e?e.from:m.from,registered:n?.[t]===m,loadedFactory:u})}let h=d.find(e=>e.provider===m)??pe(d,u);if(!c.release(!0,h?.provider===c.provider)||!h)return;let g=q.get(h.provider);h.from=h.provider===a?s:g?g.from:h.provider.from,g&&(h.provider.from=g.from);let _=typeof u==`function`?u():u,v=await Promise.resolve(_);if(!(h.registered&&n?.[h.version]!==h.provider))return{provider:h.provider,selection:h,resolved:v}},Y=new Set,X=new Map,he=async(t,n,a)=>{let o=!!n.shareConfig?.singleton;if(!o&&n.canLiveRebind!==!1)try{let s=C(a,t,n,`version-first`),l=x(a,s);if(!l)return;let{version:u}=l;if(!o&&u!==n.version||!s.lib&&!s.loading&&!(s.loaded&&typeof s.get==`function`))return;let d=r(t,o,n.version,n.scope);if(i(c.share,d)!==void 0)return;let f=e[t],p=f?.[u];if(l.registered&&!w(p,s))return;let m,h=s.lib;if(!h&&z(s)||(!h&&s.loading&&(h=await s.loading),!h&&s.loaded&&typeof s.get==`function`&&(h=await s.get()),!h))return;let g=typeof h==`function`?h():h,_=await Promise.resolve(g),y=l.registered?p:s;m={provider:y,selection:{provider:y,version:u,from:s.from,registered:l.registered},resolved:_};let b=m?.provider,S=m?.selection;if(!S)return;let T=m?.resolved;if(T===void 0||i(c.share,d)!==void 0||S.registered&&f?.[S.version]!==b)return;v(c.share,d,H(T),S.from),Y.add(b)}catch(e){console.error(`[Module Federation] Failed to bridge materialized shared module "`+t+`"`,e)}},Z=async(t,n,a,o,s)=>{try{let l=r(t,n.shareConfig?.singleton,n.version,n.scope),u=i(c.share,l),d=h(c.share,l),p=C(a,t,n,`version-first`),m=p||S(a,t,n,`version-first`)||n,g=x(a,m);if(!g)return;let _=w(m,n),{version:y}=g;if(!n.shareConfig?.singleton&&y!==n.version)return;let b=o?.[y],T=ee(j,N,e,`default`,t,g,p,b,`version-first`);if(!T&&!_)return;let{provider:E,scopeRootProvider:D}=T||{provider:m,scopeRootProvider:void 0};if(n.canLiveRebind===!1||u!==void 0&&d!==f)return;let O=e[t],k=O?.[y];if(g.registered&&!D&&!w(k,E))return;let A=await J(t,n.shareConfig,O,y,k,E,g.registered&&!_),M=A?.provider,P=A?.selection;if(!P||w(M,n)||s&&(s.version!==P.version||!w({from:P.from},s.provider))||Y.has(M))return;let F=A?.resolved;if(F===void 0)return;let te=i(c.share,l),I=h(c.share,l);if(te!==void 0&&I!==f||P.registered&&O?.[P.version]!==M)return;s||X.set(t,{version:P.version,provider:{from:P.from}}),Y.add(M);let L=H(F);v(c.share,l,L,P.from)}catch(e){console.error(`[Module Federation] Failed to bridge external shared module "`+t+`"`,e)}};for(let e of p)await Promise.all(e.map(async e=>{let t=R[e];!t||t.materialize===!1||t.treeShaking||await he(e,t,L[e])}));for(let[e,t]of Object.entries(R)){if(t.treeShaking)continue;let n=r(e,t.shareConfig?.singleton,t.version,t.scope);if(i(c.share,n)!==void 0)continue;let a=r(e,!0,t.version,t.scope),o=i(c.share,a);o!==void 0&&v(c.share,n,o,h(c.share,a))}let ge=[`react`],_e=[[`react`]],Q=ge.filter(e=>R[e]&&(R[e].materialize!==!1||R[e].shareConfig?.import===!1));c.providerInit||=new Map;let ve=(e,t)=>{let n=c.providerInit.get(e);if(n)return n;let r=Promise.resolve().then(t);return c.providerInit.set(e,r),r.catch(()=>c.providerInit.delete(e)),r};var ye=async e=>{let t=new Set(e);for(let e of _e)await Promise.all(e.filter(e=>t.has(e)).map(async e=>{let t=R[e],n=r(e,t.shareConfig?.singleton,t.version,t.scope);if(t.shareConfig?.import===!1||t.treeShaking||i(c.share,n)!==void 0)return;let a=r(e,!0,t.version,t.scope),o=i(c.share,a);if(o!==void 0){v(c.share,n,o,h(c.share,a));return}let s=typeof B==`function`?B(e,t):void 0;if(s&&!s.lib&&!s.loaded)return;let l=n.canonical,u=await ve(l,async()=>{let e=await t.get(),n=typeof e==`function`?e():e;return Promise.resolve(n)}),d=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(u),p=d===u?{...u}:d;p.__esModule!==!0&&Object.defineProperty(p,"__esModule",{value:!0,enumerable:!1}),v(c.share,n,p,f)}))};let be=e=>{let t=R[e];if(!t.treeShaking&&t.shareConfig?.import!==!1)return!1;let n=r(e,t.shareConfig?.singleton,t.version,t.scope);return t.treeShaking?k(c.share,n,f)===void 0&&i(c.share,n)===void 0:i(c.share,n)===void 0},$=Q.findIndex(e=>{let t=R[e],n=r(e,t.shareConfig?.singleton,t.version,t.scope);return(t.treeShaking?k(c.share,n,f)??i(c.share,n):i(c.share,n))===void 0?t.treeShaking||t.shareConfig?.import===!1?!0:typeof C==`function`&&!!C(L[e],e,t,`version-first`):!1}),xe=$===-1?Q:Q.slice(0,$);var Se=$===-1?[]:Q.slice($);await ye(xe);try{await _(async()=>{await Promise.all(await K.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:t}))})}catch(e){console.error(`[Module Federation]`,e)}I();let Ce=async()=>{for(let t of p)await Promise.all(t.map(async t=>{let n=R[t];!n||n.materialize===!1||n.treeShaking||await Z(t,n,e[t],L[t],void 0)}))};await Ce(),re&&(g=Ce);try{let e=globalThis.__FEDERATION__?.__SHARE__,t=Object.create(null);if(e)for(let[,n]of Object.entries(e))for(let e of u){let r=n?.[e];if(r)for(let[e,n]of Object.entries(r)){let r=R?.[e],i=L[e],a=X.get(e);if(!r||!i||!a||r.treeShaking)continue;let o=t[e]||(t[e]=Object.create(null));for(let[e,t]of Object.entries(n)){if(!t.lib||a.version!==e||!w(t,a.provider))continue;let n=i[e];(t===n||n?.from&&t.from===n.from)&&(t===r||r.from&&t.from===r.from||o[e]===void 0&&(o[e]=t))}}}for(let e of p)await Promise.all(e.map(async e=>{let n=t[e];n&&await Z(e,R[e],n,L[e],X.get(e))}))}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}let we=async()=>{},Te=async(t,n)=>{let a=r(t,n.shareConfig?.singleton,n.version,n.scope),o=n.treeShaking?k(c.share,a,f):i(c.share,a);if(n.shareConfig?.import!==!1||o!==void 0||B(t,n,L[t]))return;let s=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},l=e?.[t],u=S(l,t,n,`version-first`)||n,d=x(l,u);if(!d)return;let{version:p}=d,m=l?.[p],h=await J(t,n.shareConfig,l,p,m,u,d.registered&&!w(u,n)),g=h?.selection,_=h?.provider,y=h?.resolved;if(!g||w(_,n)||y===void 0||(n.treeShaking?k(c.share,a,f):i(c.share,a))!==void 0||g.registered&&l?.[g.version]!==_)return;let b=s(y);if(n.treeShaking){let e=n.treeShaking.providedExports??n.treeShaking.usedExports??[];T(c.share,a,e,b),A(c.share,a,f,b)}else v(c.share,a,b,g.from)},Ee=[];for(let e of Se){let t=R[e];if(be(e))try{t.treeShaking?await we(e,t):t.shareConfig?.import===!1&&await Te(e,t)}catch(t){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${e}"`,t);break}if(be(e))break;Ee.push(e)}return await ye(Ee),o(K),K}async function k(e){let t=await D();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return g&&await g(),c.pendingShareLoads&&await Promise.all(c.pendingShareLoads),t[e]().then(e=>()=>e)}export{k as get,O as init};
|
|
2
|
+
if (typeof document !== 'undefined' && document.head) {
|
|
3
|
+
try {
|
|
4
|
+
for (const __mfWarmupPath of ["assets/virtualExposes-BBIkbTtD.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-7tb3Q-Bx.js","assets/vite-preload-helper-HclGiUj8.js","assets/dist-BgxWXJ5y.js"]) {
|
|
5
|
+
const __mfWarmupLink = document.createElement('link');
|
|
6
|
+
__mfWarmupLink.rel = 'modulepreload';
|
|
7
|
+
__mfWarmupLink.crossOrigin = '';
|
|
8
|
+
__mfWarmupLink.href = new URL(__mfWarmupPath, import.meta.url).href;
|
|
9
|
+
document.head.appendChild(__mfWarmupLink);
|
|
10
|
+
}
|
|
11
|
+
} catch (__mfWarmupError) {}
|
|
12
|
+
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./vite-preload-helper-HclGiUj8.js";var t=`FEDERATION_DEBUG`,n={AT:`@`,HYPHEN:`-`,SLASH:`/`},r={[n.AT]:`scope_`,[n.HYPHEN]:`_`,[n.SLASH]:`__`};r[n.AT],n.AT,r[n.HYPHEN],n.HYPHEN,r[n.SLASH],n.SLASH;var i=function(e){return e[e.UNKNOWN=1]=`UNKNOWN`,e[e.CALCULATED=2]=`CALCULATED`,e[e.NO_USE=0]=`NO_USE`,e}({});function a(){return!0}function o(){return typeof navigator<`u`&&navigator?.product===`ReactNative`}function s(){try{if(a()&&window.localStorage)return!!localStorage.getItem(t)}catch{return!1}return!1}function c(){return typeof process<`u`&&{}.FEDERATION_DEBUG?!!{}.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<`u`&&FEDERATION_DEBUG?!0:s()}var l=`[ Federation Runtime ]`,u=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}:${t}`:t:e,``):``};function d(e,t){if(`getPublicPath`in e){let n;return n=e.getPublicPath.startsWith(`function`)?Function(`return `+e.getPublicPath)()():Function(e.getPublicPath)(),`${n}${t}`}return`publicPath`in e?!a()&&!o()&&`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),``)}var f=e=>{console.warn(`${l}: ${e}`)};function p(e){try{return JSON.stringify(e,null,2)}catch{return``}}var m=(e,t)=>{if(!e)return t;let n=(e=>{if(e===`.`)return``;if(e.startsWith(`./`))return e.replace(`./`,``);if(e.startsWith(`/`)){let t=e.slice(1);return t.endsWith(`/`)?t.slice(0,-1):t}return e})(e);return n?n.endsWith(`/`)?`${n}${t}`:`${n}/${t}`:t};function ee(e){return e.replace(/#.*$/,``).replace(/\?.*$/,``).replace(/\/[^\/]+$/,`/`)}function h(e,t={}){let{remotes:n={},overrides:r={},version:i}=t,a,o=()=>`publicPath`in e.metaData?(e.metaData.publicPath===`auto`||e.metaData.publicPath===``)&&i?ee(i):e.metaData.publicPath:e.metaData.getPublicPath,s=Object.keys(r),c={};Object.keys(n).length||(c=e.remotes?.reduce((e,t)=>{let n,i=t.federationContainerName;return n=s.includes(i)?r[i]:`version`in t?t.version:t.entry,e[i]={matchedVersion:n},e},{})||{}),Object.keys(n).forEach(e=>c[e]={matchedVersion:s.includes(e)?r[e]:n[e]});let{remoteEntry:{path:l,name:u,type:d},types:f={path:``,name:``,zip:``,api:``},buildInfo:{buildVersion:p},globalName:h,ssrRemoteEntry:g}=e.metaData,{exposes:te}=e,_={version:i||``,buildVersion:p,globalName:h,remoteEntry:m(l,u),remoteEntryType:d,remoteTypes:m(f.path,f.name),remoteTypesZip:f.zip||``,remoteTypesAPI:f.api||``,remotesInfo:c,shared:e?.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version,usedExports:e.referenceExports||[]})),modules:te?.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(`publicPath`in e.metaData?(a={..._,publicPath:o()},typeof e.metaData.ssrPublicPath==`string`&&(a.ssrPublicPath=e.metaData.ssrPublicPath)):a={..._,getPublicPath:o()},g){let e=m(g.path,g.name);a.ssrRemoteEntry=e,a.ssrRemoteEntryType=g.type||`commonjs-module`}return a}function g(e){return!!(`remoteEntry`in e&&e.remoteEntry.includes(`.json`))}var te=`[ Module Federation ]`,_=console,ne=[`logger.ts`,`logger.js`,`captureStackTrace`,`Logger.emit`,`Logger.log`,`Logger.info`,`Logger.warn`,`Logger.error`,`Logger.debug`];function re(){try{let e=Error().stack;if(!e)return;let[,...t]=e.split(`
|
|
2
|
-
`),n=t.filter(e=>!ne.some(t=>e.includes(t)));return n.length?`Stack trace:\n${n.slice(0,5).join(`
|
|
3
|
-
`)}`:void 0}catch{return}}var ie=class{constructor(e,t=_){this.prefix=e,this.delegate=t??_}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??_}emit(e,t){let n=this.delegate,r=c()?re():void 0,i=r?[...t,r]:t,a=(()=>{switch(e){case`log`:return[`log`,`info`];case`info`:return[`info`,`log`];case`warn`:return[`warn`,`info`,`log`];case`error`:return[`error`,`warn`,`log`];default:return[`debug`,`log`]}})();for(let e of a){let t=n[e];if(typeof t==`function`){t.call(n,this.prefix,...i);return}}for(let e of a){let t=_[e];if(typeof t==`function`){t.call(_,this.prefix,...i);return}}}log(...e){this.emit(`log`,e)}warn(...e){this.emit(`warn`,e)}error(...e){this.emit(`error`,e)}success(...e){this.emit(`info`,e)}info(...e){this.emit(`info`,e)}ready(...e){this.emit(`info`,e)}debug(...e){c()&&this.emit(`debug`,e)}};function ae(e){return new ie(e)}function oe(e){let t=new ie(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}ae(te),oe(te);async function se(e,t){try{return await e()}catch(e){!t&&f(e);return}}function ce(e,t){let n=/^(https?:)?\/\//i;return e.replace(n,``).replace(/\/$/,``)===t.replace(n,``).replace(/\/$/,``)}function le(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`script`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`src`);if(o&&ce(o,e.url)){t=i,n=!1;break}}if(!t){let n=e.attrs;t=document.createElement(`script`),t.type=n?.type===`module`?`module`:`text/javascript`;let i;e.createScriptHook&&(i=e.createScriptHook(e.url,e.attrs),i instanceof HTMLScriptElement?t=i:typeof i==`object`&&(`script`in i&&i.script&&(t=i.script),`timeout`in i&&i.timeout&&(r=i.timeout))),t.src||(t.src=e.url),n&&!i&&Object.keys(n).forEach(e=>{t&&(e===`async`||e===`defer`?t[e]=n[e]:t.getAttribute(e)||t.setAttribute(e,n[e]))})}let o=null,s=typeof window<`u`?t=>{if(t.filename&&ce(t.filename,e.url)){let n=Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`);n.name=`ScriptExecutionError`,o=n}}:null;s&&window.addEventListener(`error`,s);let c=async(n,r)=>{clearTimeout(i),s&&window.removeEventListener(`error`,s);let a=()=>{if(r?.type===`error`){let t=Error(r?.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.)`);t.name=`ScriptNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else o?e?.onErrorCallback&&e?.onErrorCallback(o):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,se(()=>{let{needDeleteScript:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n&&typeof n==`function`)){let e=n(r);if(e instanceof Promise){let t=await e;return a(),t}return a(),e}a()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),i=setTimeout(()=>{c(null,{type:`error`,isTimeout:!0})},r),{script:t,needAttach:n}}function ue(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`link`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`href`),s=i.getAttribute(`rel`);if(o&&ce(o,e.url)&&s===e.attrs.rel){t=i,n=!1;break}}if(!t){t=document.createElement(`link`),t.setAttribute(`href`,e.url);let n,i=!0,a=e.attrs;e.createLinkHook&&(n=e.createLinkHook(e.url,a),n instanceof HTMLLinkElement?(t=n,i=!1):typeof n==`object`&&(`link`in n&&n.link&&(t=n.link,i=!1),`timeout`in n&&n.timeout&&(r=n.timeout))),a&&i&&Object.keys(a).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,a[e])})}if(!n)return Promise.resolve().then(()=>{e?.cb&&e?.cb()}),{link:t,needAttach:n};let o=(n,r)=>{i&&clearTimeout(i);let a=()=>{if(r?.type===`error`){let t=Error(r?.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);t.name=`LinkNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,se(()=>{let{needDeleteLink:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n)){let e=n(r);return a(),e}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),i=setTimeout(()=>{o(null,{type:`error`,isTimeout:!0})},r),{link:t,needAttach:n}}function de(e,t){let{attrs:n={},createScriptHook:r}=t;return new Promise((t,i)=>{let{script:a,needAttach:o}=le({url:e,cb:t,onErrorCallback:i,attrs:{fetchpriority:`high`,...n},createScriptHook:r,needDeleteScript:!0});o&&document.head.appendChild(a)})}var fe=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split(`-`)[0].toLowerCase()}#${e.toLowerCase()}`,pe=(e,t,n,r)=>{let i=[`${[t[e]]} #${e}`];return n&&i.push(`args: ${JSON.stringify(n)}`),i.push(fe(e)),r&&i.push(`Original Error Message:\n ${r}`),i.join(`
|
|
4
|
-
`)};function me(e,t,n,r,i,a){return r(pe(e,t,n,i))}var v=`[ Federation Runtime ]`,he=ae(v);function y(e,t,n,r,i){e||(n===void 0?b(t):b(t,n,r,void 0,i))}function b(e,t,n,r,i){if(t!==void 0)return me(e,t,n??{},e=>{throw Error(`${v}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(v)||(a.message=`${v}: ${a.message}`),a):Error(`${v}: ${a}`)}function x(e){e instanceof Error&&(e.message.startsWith(v)||(e.message=`${v}: ${e.message}`)),he.warn(e)}function ge(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function S(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function _e(e){return e.entry!==void 0}function ve(e){return!e.entry.includes(`.json`)}function ye(e){return e&&typeof e==`object`}var be=Object.prototype.toString;function xe(e){return be.call(e)===`[object Object]`}function Se(e){return Array.isArray(e)?e:[e]}function Ce(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var we=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},C=typeof globalThis==`object`?globalThis:window,w=(()=>{try{return document.defaultView}catch{return C}})(),T=w;function Te(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function E(e,t){return Object.hasOwnProperty.call(e,t)}E(C,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||Te(C,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var D=C.__GLOBAL_LOADING_REMOTE_ENTRY__;function Ee(e){E(e,`__VMOK__`)&&!E(e,`__FEDERATION__`)&&Te(e,`__FEDERATION__`,e.__VMOK__),E(e,`__FEDERATION__`)||(Te(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),Te(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__??=new Map}Ee(C),Ee(w);function De(){C.__FEDERATION__.__GLOBAL_PLUGIN__=[],C.__FEDERATION__.__INSTANCES__=[],C.__FEDERATION__.moduleInfo={},C.__FEDERATION__.__SHARE__={},C.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(D).forEach(e=>{delete D[e]})}function Oe(e){C.__FEDERATION__.__INSTANCES__.push(e)}function ke(){return C.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Ae(e,t=c()){t&&(C.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,C.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.8.2`)}function O(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}b(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var je=()=>w.__FEDERATION__.moduleInfo,Me=(e,t)=>{let n=O(t,S(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=S(n),i=O(w.__FEDERATION__.moduleInfo,r).value;if(i?.version===t)return i}},k=e=>Me(e,w.__FEDERATION__.moduleInfo),Ne=(e,t)=>{let n=S(e);return w.__FEDERATION__.moduleInfo[n]=t,w.__FEDERATION__.moduleInfo},Pe=e=>(w.__FEDERATION__.moduleInfo={...w.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete w.__FEDERATION__.moduleInfo[e]}),Fe=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:C[n]}},Ie=e=>{let{__GLOBAL_PLUGIN__:t}=w.__FEDERATION__;e.forEach(e=>{t.findIndex(t=>t.name===e.name)===-1?t.push(e):x(`The plugin ${e.name} has been registered.`)})},Le=()=>w.__FEDERATION__.__GLOBAL_PLUGIN__,Re=e=>C.__FEDERATION__.__PRELOADED_MAP__.get(e),ze=e=>C.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),Be=`[0-9A-Za-z-]+`,Ve=`(?:\\+(${Be}(?:\\.${Be})*))`,A=`0|[1-9]\\d*`,He=`[0-9]+`,Ue=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,We=`(?:${He}|${Ue})`,Ge=`(?:-?(${We}(?:\\.${We})*))`,Ke=`(?:${A}|${Ue})`,qe=`(?:-(${Ke}(?:\\.${Ke})*))`,Je=`${A}|x|X|\\*`,j=`[v=\\s]*(${Je})(?:\\.(${Je})(?:\\.(${Je})(?:${qe})?${Ve}?)?)?`,Ye=`^\\s*(${j})\\s+-\\s+(${j})\\s*$`,Xe=`[v=\\s]*${`(${He})\\.(${He})\\.(${He})`}${Ge}?${Ve}?`,Ze=`((?:<|>)?=?)`,Qe=`(\\s*)${Ze}\\s*(${Xe}|${j})`,$e=`(?:~>?)`,et=`(\\s*)${$e}\\s+`,tt=`(?:\\^)`,nt=`(\\s*)${tt}\\s+`,rt=`(<|>)?=?\\s*\\*`,it=`^${tt}${j}$`,at=`v?${`(${A})\\.(${A})\\.(${A})`}${qe}?${Ve}?`,ot=`^${$e}${j}$`,st=`^${Ze}\\s*${j}$`,ct=`^${Ze}\\s*(${at})$|^$`,lt=`^\\s*>=\\s*0.0.0\\s*$`;function M(e){return new RegExp(e)}function N(e){return!e||e.toLowerCase()===`x`||e===`*`}function ut(...e){return t=>e.reduce((e,t)=>t(e),t)}function dt(e){return e.match(M(ct))}function ft(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function pt(e){return e.replace(M(Ye),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=N(n)?``:N(r)?`>=${n}.0.0`:N(i)?`>=${n}.${r}.0`:`>=${t}`,s=N(c)?``:N(l)?`<${Number(c)+1}.0.0-0`:N(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function mt(e){return e.replace(M(Qe),`$1$2$3`)}function ht(e){return e.replace(M(et),`$1~`)}function gt(e){return e.replace(M(nt),`$1^`)}function _t(e){return e.trim().split(/\s+/).map(e=>e.replace(M(it),(e,t,n,r,i)=>N(t)?``:N(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:N(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function vt(e){return e.trim().split(/\s+/).map(e=>e.replace(M(ot),(e,t,n,r,i)=>N(t)?``:N(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:N(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function yt(e){return e.split(/\s+/).map(e=>e.trim().replace(M(st),(e,t,n,r,i,a)=>{let o=N(n),s=o||N(r),c=s||N(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function bt(e){return e.trim().replace(M(rt),``)}function xt(e){return e.trim().replace(M(lt),``)}function St(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function Ct(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?St(t,i):-1:1}return 0}function P(e,t){return St(e.major,t.major)||St(e.minor,t.minor)||St(e.patch,t.patch)||Ct(e,t)}function wt(e,t){return e.version===t.version}function Tt(e,t){switch(e.operator){case``:case`=`:return wt(e,t);case`>`:return P(e,t)<0;case`>=`:return wt(e,t)||P(e,t)<0;case`<`:return P(e,t)>0;case`<=`:return wt(e,t)||P(e,t)>0;case void 0:return!0;default:return!1}}function Et(e){return ut(_t,vt,yt,bt)(e)}function Dt(e){return ut(pt,mt,ht,gt)(e.trim()).split(/\s+/).join(` `)}function F(e,t){if(!e)return!1;let n=dt(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:ft(i,a,o,s),major:i,minor:a,patch:o,preRelease:s?.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=Dt(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>Et(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>xt(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=dt(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!Tt({operator:n,version:ft(r,a,o,s),major:r,minor:a,patch:o,preRelease:s?.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var I=`default`,Ot=`global`;function kt(e,t,n,r){let a;return a=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{b(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&b(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:a,loaded:e?.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??r)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??i.UNKNOWN,useIn:[]}:void 0}}function At(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=Se(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(kt(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function L(e,t){if(!e)return!1;let{status:n,mode:r}=e;return n===i.NO_USE?!1:n===i.CALCULATED?!0:r===`runtime-infer`?!t||Mt(e,t):!1}function R(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!F(n(e),`<=${n(t)}`)}var z=(e,t)=>{let n=t||function(e,t){return R(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},B=e=>!!e.loaded||typeof e.lib==`function`,jt=e=>!!e.loading,Mt=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Nt(e,t,n,r){let i=e[t][n],a=``,o=L(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!B(i[e].treeShaking)&&R(e,t):!1:!0:!B(i[e])&&R(e,t)};if(o){if(a=z(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:z(e[t][n],s),useTreesShaking:o}}var V=e=>B(e)||jt(e);function Pt(e,t,n,r){let i=e[t][n],a=``,o=L(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(V(i[t].treeShaking))return!V(i[e].treeShaking)||!!R(e,t);if(V(i[e].treeShaking))return!1}return V(i[t])?!V(i[e])||!!R(e,t):!V(i[e])&&R(e,t)};if(o){if(a=z(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:z(e[t][n],s),useTreesShaking:o}}function Ft(e){return e===`loaded-first`?Pt:Nt}function H(e,t,n,r){if(!e)return;let{shareConfig:i,scope:a=I,strategy:o,treeShaking:s}=n,c=Array.isArray(a)?a:[a];for(let a of c)if(i&&e[a]&&e[a][t]){let{requiredVersion:c}=i,{version:l,useTreesShaking:u}=Ft(o)(e,a,t,s),d={shareScopeMap:e,scope:a,pkgName:t,version:l,GlobalFederation:T.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[a][t][l];if(i.singleton){if(typeof c==`string`&&!F(l,c)){let e=`Version ${l} from ${l&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${c})`;i.strictVersion?b(e):x(e)}return{shared:r,useTreesShaking:u}}{if(c===!1||c===`*`||F(l,c))return{shared:r,useTreesShaking:u};let n=L(s);if(n){for(let[r,i]of Object.entries(e[a][t]))if(L(i.treeShaking,s?.usedExports)&&F(r,c))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[a][t]))if(F(n,c))return{shared:r,useTreesShaking:!1}}}};return(r.emit(d)||d).resolver()}}function It(){return T.__FEDERATION__.__SHARE__}function Lt(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=n?.resolver??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[z(t,function(e,n){return!B(t[e])&&R(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n?.customShareInfo)}var U=(e,t)=>{e.useIn||=[],ge(e.useIn,t)};function Rt(e,t){return t&&e.treeShaking?e.treeShaking:e}function zt(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Bt(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Vt(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Ht=`RUNTIME-001`,Ut=`RUNTIME-002`,Wt=`RUNTIME-003`,Gt=`RUNTIME-004`,Kt=`RUNTIME-005`,qt=`RUNTIME-006`,Jt=`RUNTIME-007`,Yt=`RUNTIME-008`,Xt=`RUNTIME-009`,Zt=`RUNTIME-010`,Qt=`RUNTIME-011`,$t=`RUNTIME-012`,en=`RUNTIME-013`,tn=`RUNTIME-014`,nn=`RUNTIME-015`,rn=`TYPE-001`,an=`BUILD-001`,on=`BUILD-002`,W={[Ht]:`Failed to get remoteEntry exports.`,[Ut]:`The remote entry interface does not contain "init"`,[Wt]:`Failed to get manifest.`,[Gt]:`Failed to locate remote.`,[Kt]:`Invalid loadShareSync function call from bundler runtime`,[qt]:`Invalid loadShareSync function call from runtime`,[Jt]:`Failed to get remote snapshot.`,[Yt]:`Failed to load script resources.`,[Xt]:`Please call createInstance first.`,[Zt]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[Qt]:`The remoteEntry URL is missing from the remote snapshot.`,[$t]:`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.`,[en]:`The manifest is not a valid Module Federation manifest.`,[tn]:`The remote does not expose the requested module.`,[nn]:`Remote container initialization failed.`},sn={[rn]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},cn={[an]:`Failed to find expose module.`,[on]:`PublicPath is required in prod mode.`};({...W,...sn,...cn});var ln=`.then(callbacks[0]).catch(callbacks[1])`,un=[`Failed to fetch dynamically imported module`,`Importing a module script failed`,`error loading dynamically imported module`];function dn(e){return e instanceof TypeError&&un.some(t=>e.message.includes(t))}function fn(e){return e===`esm`||e===`module`}async function pn({entry:t,remoteEntryExports:n,name:r,getEntryUrl:i}){return new Promise((a,o)=>{let s=e=>{if(dn(e)){let t=e instanceof Error?e.message:String(e);try{b(Yt,W,{remoteName:r,resourceUrl:c},t)}catch(e){o(e);return}}o(e)},c=i?i(t):t;try{n?a(n):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${c}")${ln}`)([a,s]):e(()=>import(c).then(a),[],import.meta.url).catch(s)}catch(e){b(`Failed to load ESM entry from "${c}". ${e instanceof Error?e.message:String(e)}`)}})}async function mn({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${ln}`)([n,r])}catch(t){b(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function hn(e,t,n){let{remoteEntryKey:r,entryExports:i}=Fe(e,t);return i||b(Ht,W,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function gn({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Fe(e,t);if(s)return s;let c=a?a(n):n;return de(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>hn(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);b(Yt,W,{remoteName:e,resourceUrl:c},n)})}async function _n({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return fn(c)?pn({entry:a,remoteEntryExports:t,name:s,getEntryUrl:r}):c===`system`?mn({entry:a,remoteEntryExports:t}):gn({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}function vn(e){let{entry:t,name:n}=e;return u(n,t)}async function yn(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=vn(r);if(n)return n;if(!D[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;D[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n}).then(e=>e||_n({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e}),e)).catch(async e=>{let i=vn(r),a=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!a&&!o){let e=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>yn({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:D,uniqueKey:i});if(e)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,recovered:!0}),e}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,error:e}),e})}return D[s]}function G(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function bn(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function xn(e,t){let n=Le(),r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return n.length>0&&n.forEach(t=>{e?.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{r.forEach(n=>{n.applyPlugin(e,t)})}),e}function Sn(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function K(e){let t={};for(let[n,r]of Object.entries(e.shared)){let e=r[0];e&&(t[n]={version:e.version,singleton:e.shareConfig?.singleton,requiredVersion:e.shareConfig?.requiredVersion!==!1&&e.shareConfig?.requiredVersion,eager:e.eager,strictVersion:e.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:e.remotes?.map(Sn)??[],shared:t}}}function Cn(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,...e}}function wn(e,t){return t.map(t=>{let n=Vt(e,t.nameOrAlias);return y(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&p({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Cn(t)}})}function Tn(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function En(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function q(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}async function Dn(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i?.remoteEntryExports)return q(r,a,`cached`);try{if(!await yn({origin:e,remoteInfo:n,remoteEntryExports:i?.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return q(r,a,`success`)}catch(e){return q(r,a,En(e)?`timeout`:`error`,e)}}function On({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=ue({url:n,cb:()=>{o(q(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(q(i,n,En(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function kn({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=le({url:n,cb:()=>{a(q(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(q(i,n,En(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function An(e,t){return{...e,resourceType:t}}function jn(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name}){let{cssAssets:a,jsAssetsWithoutEntry:o,entryAssets:s}=n,c=[];if(t.options.inBrowser){if(s.forEach(n=>{let{moduleInfo:r}=n;c.push(Dn(t,e,r,An(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};a.forEach(r=>{c.push(On({host:t,remoteInfo:e,url:r,attrs:n,context:An(i,`css`)}))})}else{let n={rel:`stylesheet`,type:`text/css`};a.forEach(r=>{c.push(On({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:An(i,`css`)}))})}let n=kn,l={fetchpriority:`high`,type:`text/javascript`};r?(n=On,l={rel:`preload`,as:`script`}):fn(e.type)&&(n=On,l={rel:`modulepreload`,fetchpriority:`high`}),o.forEach(r=>{c.push(n({host:t,remoteInfo:e,url:r,attrs:l,context:An(i,`js`)}))})}return Promise.all(c)}var Mn={global:{Global:T,nativeGlobal:w,resetFederationGlobalInfo:De,setGlobalFederationInstance:Oe,getGlobalFederationConstructor:ke,setGlobalFederationConstructor:Ae,getInfoWithoutType:O,getGlobalSnapshot:je,getTargetSnapshotInfoByModuleInfo:Me,getGlobalSnapshotInfoByModuleInfo:k,setGlobalSnapshotInfoByModuleInfo:Ne,addGlobalSnapshot:Pe,getRemoteEntryExports:Fe,registerGlobalPlugins:Ie,getGlobalHostPlugins:Le,getPreloaded:Re,setPreloaded:ze},share:{getRegisteredShare:H,getGlobalShareScope:It},utils:{matchRemoteWithNameAndExpose:Bt,preloadAssets:jn,getRemoteInfo:G}};function Nn(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function Pn(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var Fn=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;let t=await yn({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:`loadRemote`,id:zt(this.remoteInfo.name,e),resourceType:`remoteEntry`}});return y(t,`remoteEntryExports is undefined \n ${p(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,n,r){let i=await this.getEntry(r);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host}),i;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,cached:!0,origin:this.host}),n}return i}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:a,initScope:o}=Pn(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});i?.init===void 0&&b(Ut,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,K(this.host.options));try{await i.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){b(nn,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,K(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:i}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return i}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||b(tn,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:Nn(r)},void 0,K(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=we(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},J=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){y(xe(e),`Plugin configuration is invalid.`);let n=e.name;y(n,`A name must be provided by the plugin.`),this.registerPlugins[n]||(this.registerPlugins[n]=e,e.apply?.(t),Object.keys(this.lifecycle).forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)}))}removePlugin(e){y(e,`A name is required.`);let t=this.registerPlugins[e];y(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{e!==`name`&&this.lifecycle[e].remove(t[e])})}},Y=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},X=class extends Y{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function In(e,t){if(!ye(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Z=class extends Y{constructor(e){super(),this.onerror=b,this.type=e}emit(e){ye(e)||b(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(In(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){x(e),this.onerror(e)}return e}},Q=class extends Y{constructor(e){super(),this.onerror=b,this.type=e}emit(e){ye(e)||b(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(x(t),this.onerror(t),e),i=a=>{if(a!==void 0&&In(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},$=`Remote loading is disabled by experiments.optimization.disableRemote.`,Ln=class{constructor(){this.hooks=new J({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error($)}preloadRemote(){throw Error($)}registerRemotes(){throw Error($)}getRemoteModuleAndOptions(){throw Error($)}initRawContainer(){throw Error($)}};function Rn(e,t){let n=Ce(t);n.url||b(Qt,W,{remoteName:e.name});let r=d(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function zn(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!_e(t)||!ve(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:zt(t.name,r)});Rn(a,s);let l={remote:t,preloadConfig:{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1}},u=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:l,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});return u&&jn(a,i,u,!1,{initiator:`loadRemote`,id:o}).catch(()=>void 0),{...e,remoteSnapshot:s}}return e}}}function Bn(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function Vn(e,t,n,r,i={},a){let{value:o}=O(e,S(t)),s=a||o;if(s&&!g(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=Bn(r),a=s.remotesInfo[r];Vn(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var Hn=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function Un(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:p}=f;if(Vn(r,n,(t,n,r)=>{let i;if(r)i=f;else if(Array.isArray(p)){let e=p.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;i=Cn(e)}else if(p===!0)i=f;else return;let c=d(t,Ce(t).url);c&&s.push({name:n.name,moduleInfo:{name:n.name,entry:c,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:c});let l=`modules`in t?t.modules:[],u=Tn(i.exposes);u.length&&`modules`in t&&(l=t?.modules?.reduce((e,t)=>(u?.indexOf(t.moduleName)!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>d(t,e));return i.filter?n.filter(i.filter):n}if(l){let r=l.length;for(let s=0;s<r;s++){let r=l[s],c=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:c,name:n.name,remoteSnapshot:t,preloadConfig:i,remote:n,origin:e}),!Re(c)&&(i.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):i.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),ze(c))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=H(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{l.add(e)}))};i.shared.forEach(e=>{let n=u.shared?.[e.sharedName];if(!n)return;let r=e.version?n.find(t=>t.version===e.version):n;r&&Se(r).forEach(n=>{t(n,e)})})}let m=o.filter(e=>!c.has(e)&&!Hn(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!Hn(`link`,e)),jsAssetsWithoutEntry:m,entryAssets:s.filter(e=>!Hn(`script`,e.url))}}var Wn=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return _e(i)&&ve(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Rn(r,o),Un(t,n,r,a,o))}}};function Gn(e,t){let n=k({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&O(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:je(),remoteSnapshot:k({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:je(),remoteSnapshot:k({name:e.name,version:`version`in e?e.version:void 0})}}var Kn=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new J({beforeLoadRemoteSnapshot:new X(`beforeLoadRemoteSnapshot`),loadSnapshot:new Q(`loadGlobalSnapshot`),loadRemoteSnapshot:new Q(`loadRemoteSnapshot`),afterLoadSnapshot:new Q(`afterLoadSnapshot`)}),this.manifestLoading=T.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=k({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Pe({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!O(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i?.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c){if(g(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=Ne({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}}else if(_e(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Ne(e,r);u=r,d=i}else b(Jt,W,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,K(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return Gn(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=G(t),i=this.manifestCache.get(e);if(i)return i;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);(!t||!(t instanceof Response))&&(t=await fetch(e,{})),i=await t.json()}catch(r){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],b(Wt,W,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${r}`,K(this.HostInstance.options)))}let a=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean);return a.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${a.join(`, `)}.`),from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),a.length>0&&b(en,W,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:a.join(`,`)},void 0,K(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=h(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},qn=class{constructor(){this.hooks=new J({})}},Jn=class{constructor(e){this.hooks=new J({beforeRegisterShare:new Z(`beforeRegisterShare`),afterResolve:new Q(`afterResolve`),beforeLoadShare:new Q(`beforeLoadShare`),loadShare:new X,afterLoadShare:new Y(`afterLoadShare`),errorLoadShare:new Y(`errorLoadShare`),resolveShare:new Z(`resolveShare`),initContainerShareScopeMap:new Z(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(e){x(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i})}catch(e){x(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=At(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n}),this.shareScopeMap[r]?.[e]||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=Lt({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),i=r;try{r?.scope&&await Promise.all(r.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:r.strategy}))})),i=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:r,shared:n.options.shared,origin:n})).shareInfo,y(i,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let a=i,{shared:o,useTreesShaking:s}=H(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare)||{};if(o){let t=Rt(o,s);if(t.lib)return U(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),t.lib;if(t.loading&&!t.loaded){let r=await t.loading;return t.loaded=!0,t.lib||=r,U(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),r}{let r=(async()=>{let e=await t.get();return U(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:o,from:n.options.name,lib:null,loading:r,treeShaking:s?t:void 0});let i=await r;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),i}}{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,recovered:!0}),!1;let r=L(a.treeShaking),i=Rt(a,r),o=(async()=>{let t=await i.get();i.lib=t,i.loaded=!0,U(i,n.options.name);let{shared:r,useTreesShaking:o}=H(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare)||{};if(r){let e=Rt(r,o);e.lib=t,e.loaded=!0,r.from=a.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:o,treeShaking:r?i:void 0});let s=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:a}),s}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:i,error:t}),t}}initializeSharing(e=I,t){let{host:n}=this,r=t?.from,i=t?.strategy,a=t?.initScope,o=[];if(r!==`build`){let{initTokens:t}=this;a||=[];let n=t[e];if(n||=t[e]={from:this.host.name},a.indexOf(n)>=0)return o;a.push(n)}let s=this.shareScopeMap,c=n.options.name;s[e]||(s[e]={});let l=s[e],u=(e,t)=>{let{version:n,eager:r}=t;l[e]=l[e]||{};let i=l[e],a=i[n]&&Rt(i[n]),o=!!(a&&(`eager`in a&&a.eager||`shareConfig`in a&&a.shareConfig?.eager));(!a||a.strategy!==`loaded-first`&&!a.loaded&&(!r==!o?c>i[n].from:r))&&(i[n]=t)},d=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r;try{r=await t.getEntry()}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r?.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,a))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&u(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&o.push(d(t.name))}),o}loadShareSync(e,t){let{host:n}=this,r=Lt({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{r?.scope&&r.scope.forEach(e=>{this.initializeSharing(e,{strategy:r.strategy})});let{shared:i}=H(this.shareScopeMap,e,r,this.hooks.lifecycle.resolveShare)||{};if(i){if(typeof i.lib==`function`)return U(i,n.options.name),i.loaded||(i.loaded=!0,i.from===n.options.name&&(r.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),i.lib;if(typeof i.get==`function`){let t=i.get();if(!(t instanceof Promise))return U(i,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),t}}if(r.lib)return r.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib;if(r.get){let i=r.get();return i instanceof Promise&&b(t?.from===`build`?Kt:qt,W,{hostName:n.options.name,sharedPkgName:e},void 0,K(n.options)),r.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:r.lib,shared:r}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib}b(qt,W,{hostName:n.options.name,sharedPkgName:e},void 0,K(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,error:t}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=It(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},Yn=class{constructor(){this.shareScopeMap={},this.hooks=new J({afterResolve:new Q(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},Xn=class{constructor(e){this.hooks=new J({beforeRegisterRemote:new Z(`beforeRegisterRemote`),registerRemote:new Z(`registerRemote`),beforeRequest:new Q(`beforeRequest`),afterMatchRemote:new X(`afterMatchRemote`),onLoad:new X(`onLoad`),afterLoadRemote:new X(`afterLoadRemote`),handlePreloadModule:new Y(`handlePreloadModule`),errorLoadRemote:new X(`errorLoadRemote`),beforePreloadRemote:new X(`beforePreloadRemote`),generatePreloadAssets:new X(`generatePreloadAssets`),afterPreloadRemote:new X(`afterPreloadRemote`),loadEntry:new X}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r};return}if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Bt(n.options.remotes,e),i=e,a=r?.expose,o=r?G(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:ee}=u;i=m,a=p,o=G(f);let h=await c.get(m,p,t,ee),g=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?h:void 0,exposeModuleFactory:r?void 0:h,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof g==`function`?g:h}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=wn(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:zt(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=G(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await jn(s,t,l,!0,{initiator:`preloadRemote`,id:i});n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t?.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new Fn({host:r,remoteInfo:G({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Bt(t.options.remotes,i);if(!a)try{b(Gt,W,{hostName:t.options.name,requestId:i},void 0,K(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=G(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;y(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new Fn(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>e.alias&&(t.name.startsWith(e.alias)||t.alias?.startsWith(e.alias)));y(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=I,e.type||=Ot};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n?.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),f(o.join(` `)))}}removeRemote(e){try{let{host:t}=this,{name:n}=e,r=t.options.remotes.findIndex(e=>e.name===n);r!==-1&&t.options.remotes.splice(r,1);let i=O(C.__FEDERATION__.moduleInfo,S(e)).key;delete C.__FEDERATION__.moduleInfo[i],`entry`in e&&(t.snapshotHandler.manifestCache.delete(e.entry),delete T.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:a}=Gn(e,t);if(a){let t=a&&`remotesInfo`in a&&a.remotesInfo&&O(a.remotesInfo,e.name).key;t&&delete a.remotesInfo[t]}let o=t.moduleCache.get(e.name);if(o){let n=o.remoteInfo,r=n.entryGlobalName;C[r]&&(Object.getOwnPropertyDescriptor(C,r)?.configurable?delete C[r]:C[r]=void 0);let i=vn(o.remoteInfo);D[i]&&delete D[i];let a=n.buildVersion?u(n.name,n.buildVersion):n.name,s=C.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===a:e.name===a);if(s!==-1){let e=C.__FEDERATION__.__INSTANCES__[s];a=e.options.id||a;let t=It(),r=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===n.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==n.name),c.useIn.length?r=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),r&&(e.shareScopeMap={},delete t[a]),i.forEach(([e,n,r,i])=>{delete t[e]?.[n]?.[r]?.[i]}),C.__FEDERATION__.__INSTANCES__.splice(s,1)}t.moduleCache.delete(e.name)}}catch(e){he.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},Zn=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,Qn=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,$n=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,er=class{constructor(e){this.hooks=new J({beforeInit:new Z(`beforeInit`),init:new Y,beforeInitContainer:new Q(`beforeInitContainer`),initContainer:new Q(`initContainer`)}),this.version=`2.8.2`,this.moduleCache=new Map,this.loaderHook=new J({getModuleInfo:new Y,createScript:new Y,createLink:new Y,fetch:new X,loadEntryError:new X,afterLoadEntry:new X(`afterLoadEntry`),beforeInitRemote:new X(`beforeInitRemote`),afterInitRemote:new X(`afterInitRemote`),beforeGetExpose:new X(`beforeGetExpose`),afterGetExpose:new X(`afterGetExpose`),beforeExecuteFactory:new X(`beforeExecuteFactory`),afterExecuteFactory:new X(`afterExecuteFactory`),getModuleFactory:new X}),this.bridgeHook=new J({beforeBridgeRender:new Y,afterBridgeRender:new Y,beforeBridgeDestroy:new Y,afterBridgeDestroy:new Y});let t=Qn&&Zn?[zn(),Wn()]:[],n={id:bn(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=Qn?new Kn(this):new qn,this.sharedHandler=$n?new Jn(this):new Yn,this.remoteHandler=Qn?new Xn(this):new Ln,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&b(pe(Zt,W)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=I,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let n=$n?At(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){let t=xn(e,this);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}},tr=Mn;function nr(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function rr(e,t){let n=nr();return C.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}function ir(e){let t=new((ke())||er)({id:`${e.name}@${e.version||Date.now()}`,...e});return Oe(t),t}var ar=null;function or(e){let t=rr(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),ar||=t,t):(ar=ir(n),ar)}Ae(er);export{rr as n,tr as r,or as t};
|