iobroker.shoppingroute 0.4.4 → 0.5.0
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 +147 -23
- package/README_DE.md +13 -1
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteAdminSet__mf_owner__1-DPLVD4vF.js +1 -0
- package/admin/custom/assets/helpers-CsVkgmeS.js +1 -0
- package/admin/custom/assets/hostInit-BOPgFMXR.js +1 -0
- package/admin/custom/assets/index-0cn00gCp.js +1 -0
- package/admin/custom/{markets/assets/index-2HOz3j7B.js → assets/index-12xv0FYP.js} +5 -5
- package/admin/custom/{review/assets/pendingShares-Cpf2lozX.js → assets/pendingShares-1oZLrQ_M.js} +2 -2
- package/admin/custom/assets/{route-editor-components-rW7iuBNT.js → route-editor-components-DXuRqdfo.js} +2 -2
- package/admin/custom/catalogManager/assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteCatalogSet__mf_owner__1-DINIg-s7.js +1 -0
- package/admin/custom/catalogManager/assets/_virtual_mf___mfe_internal__ShoppingRouteCatalogSet__mf_owner__270978611965008__loadShare__react__loadShare__.js-Bw3vMJzu.js +1 -0
- package/admin/custom/catalogManager/assets/_virtual_mf___mfe_internal__ShoppingRouteCatalogSet__mf_owner__270978611965008__prebuild__react__prebuild__-B27G_6sf.js +9 -0
- package/admin/custom/catalogManager/assets/catalog-manager-components-D2quJvPg.js +153 -0
- package/admin/custom/catalogManager/assets/helpers-CsVkgmeS.js +1 -0
- package/admin/custom/catalogManager/assets/hostInit-CX4Yac1I.js +1 -0
- package/admin/custom/catalogManager/assets/index-0cn00gCp.js +1 -0
- package/admin/custom/{productGroups/assets/index-2HOz3j7B.js → catalogManager/assets/index-12xv0FYP.js} +5 -5
- package/admin/custom/{assets/pendingShares-JrGCtzTF.js → catalogManager/assets/pendingShares-iypADtDA.js} +2 -2
- package/admin/custom/catalogManager/assets/vite-preload-helper-Dp1pzeXC.js +1 -0
- package/admin/custom/catalogManager/catalogManager.js +13 -0
- package/admin/custom/catalogManager/mf-manifest.json +1 -0
- package/admin/custom/catalogManager/mf-stats.json +1 -0
- package/admin/custom/markets/assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteMarketsSet__mf_owner__1-DWD9ARvx.js +1 -0
- package/admin/custom/markets/assets/helpers-CsVkgmeS.js +1 -0
- package/admin/custom/markets/assets/hostInit-O4vB_3aJ.js +1 -0
- package/admin/custom/markets/assets/index-0cn00gCp.js +1 -0
- package/admin/custom/{assets/index-2HOz3j7B.js → markets/assets/index-12xv0FYP.js} +5 -5
- package/admin/custom/markets/assets/{markets-editor-components-CUcyPBPl.js → markets-editor-components-BAsgTAV7.js} +3 -3
- package/admin/custom/markets/assets/pendingShares-mvCLhLzv.js +2 -0
- package/admin/custom/markets/marketsEditor.js +2 -2
- package/admin/custom/markets/mf-manifest.json +1 -1
- package/admin/custom/markets/mf-stats.json +1 -1
- package/admin/custom/mf-manifest.json +1 -1
- package/admin/custom/mf-stats.json +1 -1
- package/admin/custom/productGroups/assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteProductGroupsSet__mf_owner__1-CuVRE3L9.js +1 -0
- package/admin/custom/productGroups/assets/helpers-CsVkgmeS.js +1 -0
- package/admin/custom/productGroups/assets/hostInit-BO6YEhS7.js +1 -0
- package/admin/custom/productGroups/assets/index-0cn00gCp.js +1 -0
- package/admin/custom/{review/assets/index-2HOz3j7B.js → productGroups/assets/index-12xv0FYP.js} +5 -5
- package/admin/custom/productGroups/assets/{pendingShares-Cmc6I2xN.js → pendingShares-CnxCGNGe.js} +2 -2
- package/admin/custom/productGroups/assets/{product-groups-editor-components-CLVNuU40.js → product-groups-editor-components-B7aO0sA_.js} +2 -2
- package/admin/custom/productGroups/mf-manifest.json +1 -1
- package/admin/custom/productGroups/mf-stats.json +1 -1
- package/admin/custom/productGroups/productGroupsEditor.js +2 -2
- package/admin/custom/review/assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteReviewSet__mf_owner__1-FjU0cujc.js +1 -0
- package/admin/custom/review/assets/helpers-CsVkgmeS.js +1 -0
- package/admin/custom/review/assets/hostInit-B25pGNwS.js +1 -0
- package/admin/custom/review/assets/index-0cn00gCp.js +1 -0
- package/admin/custom/review/assets/index-12xv0FYP.js +7 -0
- package/admin/custom/{markets/assets/pendingShares-DaxGcdrd.js → review/assets/pendingShares-DIMEss5x.js} +2 -2
- package/admin/custom/review/assets/{review-editor-components-BrjR0Z85.js → review-editor-components-BD-k-o3i.js} +2 -2
- package/admin/custom/review/mf-manifest.json +1 -1
- package/admin/custom/review/mf-stats.json +1 -1
- package/admin/custom/review/reviewEditor.js +2 -2
- package/admin/custom/routeEditor.js +2 -2
- package/admin/custom/shoppingList/assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1-a7n9bT1O.js +1 -0
- package/admin/custom/shoppingList/assets/helpers-CsVkgmeS.js +1 -0
- package/admin/custom/shoppingList/assets/hostInit-D9RbSpMP.js +1 -0
- package/admin/custom/shoppingList/assets/index-0cn00gCp.js +1 -0
- package/admin/custom/shoppingList/assets/index-12xv0FYP.js +7 -0
- package/admin/custom/shoppingList/assets/{pendingShares-DUnOFOkU.js → pendingShares-CrfC535i.js} +2 -2
- package/admin/custom/shoppingList/assets/{shopping-list-editor-components-DdXx3Xxu.js → shopping-list-editor-components-Q9aad4al.js} +2 -2
- package/admin/custom/shoppingList/mf-manifest.json +1 -1
- package/admin/custom/shoppingList/mf-stats.json +1 -1
- package/admin/custom/shoppingList/shoppingListEditor.js +2 -2
- package/admin/jsonConfig.json +16 -17
- package/admin/jsonTab.json +18 -0
- package/build/lib/config-protection.js +50 -0
- package/build/main.js +126 -6
- package/io-package.json +54 -2
- package/package.json +2 -2
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteAdminSet__mf_owner__1-CifzZTJE.js +0 -1
- package/admin/custom/assets/hostInit-BFP_9qwB.js +0 -1
- package/admin/custom/assets/virtualExposes-D8D1innc.js +0 -1
- package/admin/custom/markets/assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteMarketsSet__mf_owner__1-CdXcBfjG.js +0 -1
- package/admin/custom/markets/assets/hostInit-CrDCY7SQ.js +0 -1
- package/admin/custom/markets/assets/virtualExposes-BhGZWOBB.js +0 -1
- package/admin/custom/productGroups/assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteProductGroupsSet__mf_owner__1-DXUHDGDp.js +0 -1
- package/admin/custom/productGroups/assets/hostInit-D8t8XJ7f.js +0 -1
- package/admin/custom/productGroups/assets/virtualExposes-Cci9-KkN.js +0 -1
- package/admin/custom/review/assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteReviewSet__mf_owner__1-CSWI0Knk.js +0 -1
- package/admin/custom/review/assets/hostInit-Bi90nPL8.js +0 -1
- package/admin/custom/review/assets/virtualExposes-C4BXYjQJ.js +0 -1
- package/admin/custom/shoppingList/assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1-DRCeDtVc.js +0 -1
- package/admin/custom/shoppingList/assets/hostInit-usOXh1g1.js +0 -1
- package/admin/custom/shoppingList/assets/index-2HOz3j7B.js +0 -7
- package/admin/custom/shoppingList/assets/virtualExposes-9FoWCC98.js +0 -1
package/README.md
CHANGED
|
@@ -1,45 +1,169 @@
|
|
|
1
1
|
# ShoppingRoute for ioBroker
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="admin/shoppingroute.png" alt="ShoppingRoute" width="160">
|
|
5
|
+
</p>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>Smart Alexa shopping lists — sorted by store, product group and your real walking route.</strong>
|
|
9
|
+
</p>
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
<p align="center">
|
|
12
|
+
<img src="http://iobroker.live/badges/shoppingroute-installed.svg" alt="ioBroker installations">
|
|
13
|
+
<img src="http://iobroker.live/badges/shoppingroute-stable.svg" alt="ioBroker stable installations">
|
|
14
|
+
<a href="https://www.npmjs.com/package/iobroker.shoppingroute"><img src="https://img.shields.io/npm/v/iobroker.shoppingroute.svg" alt="npm version"></a>
|
|
15
|
+
<a href="https://www.npmjs.com/package/iobroker.shoppingroute"><img src="https://img.shields.io/npm/dm/iobroker.shoppingroute.svg" alt="npm downloads"></a>
|
|
16
|
+
<a href="https://github.com/RaviniZib/ioBroker.shoppingroute/actions/workflows/test-and-release.yml"><img src="https://github.com/RaviniZib/ioBroker.shoppingroute/actions/workflows/test-and-release.yml/badge.svg" alt="Test and Release"></a>
|
|
17
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT license"></a>
|
|
18
|
+
</p>
|
|
8
19
|
|
|
9
|
-
|
|
20
|
+
> **Current version: 0.4.4**
|
|
21
|
+
> ShoppingRoute is available in the ioBroker **latest** repository.
|
|
10
22
|
|
|
11
|
-
|
|
12
|
-
🇩🇪 [**Deutsche Bedienungsanleitung**](BEDIENUNGSANLEITUNG_DE.md)
|
|
23
|
+
## What ShoppingRoute does
|
|
13
24
|
|
|
14
|
-
|
|
25
|
+
ShoppingRoute turns an ordinary Alexa shopping list into a list that follows the way you actually shop.
|
|
15
26
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
Instead of keeping items only in the order Alexa received them, the adapter can assign them to stores, product groups and a configurable walking route inside each store. It uses visible two-digit prefixes such as `20> Bananas` and optional market headings such as `40> ═════ ALDI ═════`.
|
|
28
|
+
|
|
29
|
+
That means a list can automatically become something like:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
10> Apples
|
|
33
|
+
20> Bananas
|
|
34
|
+
30> Bread
|
|
35
|
+
40> ═════ ALDI ═════
|
|
36
|
+
50> Milk
|
|
37
|
+
60> Cheese
|
|
38
|
+
70> Coffee
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Managed Alexa lists must be set to **A–Z** in the Alexa app. ShoppingRoute then controls the effective order through its prefixes.
|
|
42
|
+
|
|
43
|
+
ShoppingRoute reuses the local authentication of the ioBroker **Alexa2** adapter for direct item updates, deletions and batch creation. Alexa2 list states remain the external change trigger.
|
|
44
|
+
|
|
45
|
+
**Service / manufacturer reference:** ShoppingRoute works with Amazon Alexa shopping lists. Amazon documents Alexa lists as a customer feature of the Alexa ecosystem; customers can access Alexa shopping and to-do lists through the Alexa app, Amazon app and Amazon retail site. See the [official Amazon Alexa developer documentation](https://www.developer.amazon.com/en-US/docs/alexa/ask-overviews/deprecated-features.html#list-skills-and-alexa-shopping-and-to-do-lists).
|
|
46
|
+
|
|
47
|
+
## Documentation
|
|
48
|
+
|
|
49
|
+
Choose your language:
|
|
50
|
+
|
|
51
|
+
- 🇬🇧 **English:** [User guide](USER_GUIDE_EN.md)
|
|
52
|
+
- 🇩🇪 **Deutsch:** [Bedienungsanleitung](BEDIENUNGSANLEITUNG_DE.md) · [Ausführliche README](README_DE.md)
|
|
53
|
+
|
|
54
|
+
Community and support:
|
|
55
|
+
|
|
56
|
+
- 🧪 [ioBroker tester forum – ShoppingRoute v0.4.4](https://forum.iobroker.net/topic/85510/test-adapter-shoppingroute-v0.4.4)
|
|
57
|
+
- 🐞 [GitHub issues](https://github.com/RaviniZib/ioBroker.shoppingroute/issues)
|
|
58
|
+
|
|
59
|
+
The Admin interface itself supports all 11 standard ioBroker Admin languages.
|
|
60
|
+
|
|
61
|
+
## Main features
|
|
62
|
+
|
|
63
|
+
- dedicated **ShoppingRoute management page** in the ioBroker sidebar for shopping list, products, markets, product groups, routes, lists and review items
|
|
64
|
+
- catalogue changes are persisted at runtime and do not require an adapter restart
|
|
65
|
+
- market names are always stored in **UPPERCASE**, regardless of how they are entered, with all references normalized consistently
|
|
66
|
+
- defensive protection against accidental catalogue resets during Admin/update flows
|
|
67
|
+
|
|
68
|
+
### Store and route based sorting
|
|
69
|
+
|
|
70
|
+
- configurable stores and store aliases
|
|
71
|
+
- individual walking route for every store
|
|
72
|
+
- product groups with independent sort order
|
|
73
|
+
- preferred and available markets per product
|
|
74
|
+
- global, per-list and temporary priority markets
|
|
75
|
+
- optional market headings such as `═════ ALDI ═════`
|
|
76
|
+
- optional cross-market consolidation using a minimum-item threshold
|
|
77
|
+
- explicit market requests are never moved to another store
|
|
78
|
+
|
|
79
|
+
### Smart product handling
|
|
80
|
+
|
|
81
|
+
- product catalogue with aliases
|
|
82
|
+
- duplicate-resistant learning
|
|
25
83
|
- review queue for unknown products
|
|
26
|
-
- automatic
|
|
84
|
+
- automatic, review and off learning modes
|
|
27
85
|
- category and alias suggestions
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
|
|
86
|
+
- quantity parsing for digits, number words, packs, half-kilo expressions and `6x` forms
|
|
87
|
+
- manual per-item market and position overrides
|
|
88
|
+
|
|
89
|
+
### Alexa-safe list updates
|
|
90
|
+
|
|
91
|
+
- incremental `00>`–`99>` prefix sorting
|
|
92
|
+
- gap-preserving inserts to avoid unnecessary rewrites
|
|
93
|
+
- suffix-only rebuilds when a numeric gap is exhausted
|
|
94
|
+
- direct Amazon responses used to confirm operations
|
|
95
|
+
- final direct list read for verification
|
|
96
|
+
- exclusive transaction handling to prevent overlapping writes
|
|
97
|
+
- recovery journal for interrupted operations
|
|
31
98
|
- API Safe Mode with configurable write-rate limiting
|
|
99
|
+
- bounded Alexa callbacks and polling with backoff
|
|
100
|
+
|
|
101
|
+
### Admin and diagnostics
|
|
102
|
+
|
|
103
|
+
- interactive current shopping-list view
|
|
104
|
+
- drag & drop plus touch-friendly controls
|
|
105
|
+
- sorting preview before writes
|
|
32
106
|
- local-only shopping statistics
|
|
33
|
-
- configuration backup
|
|
107
|
+
- configuration backup and restore
|
|
34
108
|
- shareable market-route profiles
|
|
35
|
-
- privacy-safe diagnostic
|
|
109
|
+
- privacy-safe diagnostic and feedback report
|
|
36
110
|
- Alexa2/alexa-remote2 direct-session diagnostics
|
|
37
111
|
- Dry Run safety mode
|
|
38
112
|
|
|
39
|
-
|
|
113
|
+
## Requirements
|
|
114
|
+
|
|
115
|
+
- ioBroker with **Admin 8 or newer**
|
|
116
|
+
- **js-controller 7.1.0 or newer**
|
|
117
|
+
- a working ioBroker **Alexa2** adapter instance
|
|
118
|
+
- the Alexa shopping list managed by ShoppingRoute must be sorted **A–Z** in the Alexa app
|
|
119
|
+
|
|
120
|
+
## How it works
|
|
121
|
+
|
|
122
|
+
1. Alexa2 reports a shopping-list change to ioBroker.
|
|
123
|
+
2. ShoppingRoute reads the affected list and normalizes the item names.
|
|
124
|
+
3. Products are matched against aliases, product groups and market assignments.
|
|
125
|
+
4. The adapter builds the best market and route plan.
|
|
126
|
+
5. Only the required list changes are written back to Amazon.
|
|
127
|
+
6. The final remote list is read again and verified.
|
|
128
|
+
|
|
129
|
+
The browser-based Admin interface never receives Alexa or Amazon credentials.
|
|
130
|
+
|
|
131
|
+
## Privacy and safety
|
|
132
|
+
|
|
133
|
+
ShoppingRoute does not require its own Amazon login. It reuses the locally stored Alexa2 session and does not log authentication secrets.
|
|
134
|
+
|
|
135
|
+
Statistics are stored locally. The feedback report is designed to be privacy-safe, and Dry Run can be used to inspect planned changes without modifying the shopping list.
|
|
136
|
+
|
|
137
|
+
## Installation
|
|
138
|
+
|
|
139
|
+
Install ShoppingRoute from the ioBroker **Adapters** page while using the **latest** repository.
|
|
140
|
+
|
|
141
|
+
After installation:
|
|
142
|
+
|
|
143
|
+
1. create an instance of ShoppingRoute,
|
|
144
|
+
2. select/configure the Alexa shopping list,
|
|
145
|
+
3. define markets and product groups,
|
|
146
|
+
4. configure the walking route for each store,
|
|
147
|
+
5. set the managed Alexa list to **A–Z**,
|
|
148
|
+
6. start with **Dry Run** if you want to inspect the result before enabling writes.
|
|
149
|
+
|
|
150
|
+
For all configuration details, see the [English user guide](USER_GUIDE_EN.md) or the [German user guide](BEDIENUNGSANLEITUNG_DE.md).
|
|
151
|
+
|
|
152
|
+
## Feedback and support
|
|
153
|
+
|
|
154
|
+
ShoppingRoute is still young, so real-world feedback is especially valuable.
|
|
155
|
+
|
|
156
|
+
Please use the [ioBroker tester thread](https://forum.iobroker.net/topic/85510/test-adapter-shoppingroute-v0.4.4) for general testing feedback and the [GitHub issue tracker](https://github.com/RaviniZib/ioBroker.shoppingroute/issues) for reproducible bugs or feature requests.
|
|
40
157
|
|
|
41
158
|
## Changelog
|
|
42
159
|
|
|
160
|
+
### 0.5.0 (2026-10-05)
|
|
161
|
+
- Add a dedicated ShoppingRoute management page in the ioBroker sidebar with a fixed header and direct management of shopping list, products, markets, product groups, routes, lists and review queue.
|
|
162
|
+
- Persist large catalogue data outside normal instance configuration so catalogue edits no longer require an adapter restart.
|
|
163
|
+
- Add defensive recovery and regression coverage for the destructive Admin/default reset reported in issue #59, including a successful real-instance reproduction test.
|
|
164
|
+
- Normalize every market name to UPPERCASE on create, rename, load and save, and update market references consistently.
|
|
165
|
+
- Refine the management UI with a stable sticky header, logo and shaded/zebra list blocks.
|
|
166
|
+
|
|
43
167
|
### 0.4.4 (2026-09-25)
|
|
44
168
|
- (RaviniZib) Use `No Market` for new fallback-market defaults, add all 11 admin languages to the backup utility, and remove six unused translation keys. Existing market names, routes and product data remain unchanged.
|
|
45
169
|
|
package/README_DE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
**Aktuelle Version: 0.
|
|
5
|
+
**Aktuelle Version: 0.5.0**
|
|
6
6
|
|
|
7
7
|
ShoppingRoute sortiert Alexa-Einkaufslisteneinträge nach Markt, Produktgruppe und dem individuellen Laufweg durch den jeweiligen Markt. Dazu vergibt es sichtbare zweistellige Schlüssel wie `20> Bananen` und `40> ═════ ALDI ═════`; verwaltete Listen müssen deshalb in der Alexa-App auf **A–Z** stehen. ShoppingRoute übernimmt lokal die Alexa2-Authentifizierung für direkte Updates, Deletes und Batch-Creates; Alexa2-Listenstates bleiben die Triggerquelle für externe Änderungen.
|
|
8
8
|
|
|
@@ -13,6 +13,11 @@ ShoppingRoute sortiert Alexa-Einkaufslisteneinträge nach Markt, Produktgruppe u
|
|
|
13
13
|
|
|
14
14
|
## Funktionen
|
|
15
15
|
|
|
16
|
+
- eigene **ShoppingRoute-Verwaltungsseite** in der ioBroker-Seitenleiste für Einkaufsliste, Artikel, Märkte, Produktgruppen, Laufwege, Listen und Prüfung
|
|
17
|
+
- Katalogänderungen werden zur Laufzeit gespeichert und benötigen keinen Adapter-Neustart
|
|
18
|
+
- Marktnamen werden unabhängig von der Eingabe automatisch in **GROSSBUCHSTABEN** gespeichert; alle Marktverweise werden konsistent mit normalisiert
|
|
19
|
+
- Schutz vor versehentlichem Zurücksetzen großer Katalogdaten durch Admin-/Update-Vorgänge
|
|
20
|
+
|
|
16
21
|
- mehrere Alexa-Einkaufslisten mit eigenem Prioritätsmarkt
|
|
17
22
|
- globale, listenbezogene und temporäre Marktpriorität
|
|
18
23
|
- Markt-Aliase und automatische Erkennung häufiger Marktvarianten
|
|
@@ -73,6 +78,13 @@ ShoppingRoute wird unter der **[MIT-Lizenz](LICENSE)** veröffentlicht. Frühere
|
|
|
73
78
|
|
|
74
79
|
## Changelog
|
|
75
80
|
|
|
81
|
+
### 0.5.0 (2026-10-05)
|
|
82
|
+
- Neue eigenständige ShoppingRoute-Verwaltungsseite in der ioBroker-Seitenleiste mit fester Kopfzeile sowie Einkaufsliste, Artikel-, Markt-, Produktgruppen-, Laufweg-, Listen- und Prüfverwaltung.
|
|
83
|
+
- Große Katalogdaten werden außerhalb der normalen Instanzkonfiguration als Laufzeitdaten gespeichert; Änderungen benötigen keinen Adapter-Neustart mehr.
|
|
84
|
+
- Schutzmechanismus und Regressionstests verhindern den in Issue #59 beobachteten Rückfall auf Paket-Standarddaten; zusätzlich auf einer realen ioBroker-Instanz geprüft.
|
|
85
|
+
- Marktnamen werden beim Anlegen, Umbenennen, Laden und Speichern immer in GROSSBUCHSTABEN normalisiert; Marktverweise werden konsistent mitgezogen.
|
|
86
|
+
- Überarbeitete Verwaltungsoberfläche mit festem Header, Logo und dezenter Block-/Zebra-Darstellung.
|
|
87
|
+
|
|
76
88
|
### 0.4.4 (2026-09-25)
|
|
77
89
|
- (RaviniZib) `No Market` als Standard-Ausweichmarkt für neue Konfigurationen, Backup-Seite in allen 11 Admin-Sprachen und sechs ungenutzte Übersetzungsschlüssel entfernt. Vorhandene Marktnamen, Laufwege und Produktdaten bleiben unverändert.
|
|
78
90
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./index-0cn00gCp.js";import"./index-12xv0FYP.js";const l=e=>{let t=e;for(let o=0;o<5;o++){const r=t==null?void 0:t.default;if(!r||typeof r!="object"||Object.keys(r).length===0)break;const n=Object.keys(t).filter(a=>a!=="default").map(a=>t[a]);if(n.length>0&&n.some(a=>a!==void 0))break;t=r}return t},s={react:async()=>await import("./_virtual_mf___mfe_internal__ShoppingRouteAdminSet__mf_owner__195137731327240__prebuild__react__prebuild__-Dj6dAy_K.js")},u={react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,materialize:!0,eager:!1,from:"ShoppingRouteAdminSet",canLiveRebind:!0,get(){const e=u.react;return e.lib?e.lib:(e.loading||(e.loading=(async()=>{try{const{react:t}=s,o=await t(),r=l({...o});return r.__esModule!==!0&&Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return r},e.loaded=!0,e.lib}finally{e.loading=void 0}})()),e.loading)},shareConfig:{singleton:!0,requiredVersion:">=18",strictVersion:!1,eager:!1}}},m=[];export{m as usedRemotes,u as usedShared};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as s}from"./index-12xv0FYP.js";const e=s.share;export{e as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as G}from"./vite-preload-helper-Dp1pzeXC.js";import{s as Y}from"./helpers-CsVkgmeS.js";import"./index-12xv0FYP.js";const w="__mf_module_cache__";globalThis[w]||={share:{},remote:{}};globalThis[w].share||={};globalThis[w].remote||={};const l=globalThis[w];for(const _ of Object.keys(l.share))if(_.startsWith("default:")){const S=_.slice(8);l.share[S]===void 0&&(l.share[S]=l.share[_])}else if(!_.includes(":")){const S="default:"+_;l.share[S]===void 0&&(l.share[S]=l.share[_])}let v;async function Z(){return v||(v=(async()=>{const _=(o,e,t,s)=>{const n=(Array.isArray(s)?s[0]:s)||"default",i=e||!t?o:o+"@"+t,f={canonical:n+":"+i};return n==="default"&&(f.aliases=[i]),f},S=(o,e)=>{const t=o[e.canonical];if(t!==void 0)return t;const s=e.aliases||[];for(const r of s){if(!Object.prototype.hasOwnProperty.call(o,r))continue;const n=o[r];if(n!==void 0)return o[e.canonical]=n,n}},L=Symbol.for("module-federation.shared-cache-listeners"),j=Symbol.for("module-federation.shared-cache-owners"),B=o=>{let e=o[j];return e===void 0&&(e=Object.create(null),Object.defineProperty(o,j,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},x=(o,e)=>{var t;return(t=o[j])==null?void 0:t[e.canonical]},W=(o,e,t,s)=>{var i;o[e.canonical]=t;const r=e.aliases||[];for(const f of r)Object.defineProperty(o,f,{value:t,enumerable:!0,configurable:!0,writable:!0});o[j],B(o)[e.canonical]=s;const n=(i=o[L])==null?void 0:i[e.canonical];if(n)for(const f of n)f(t);return t},m=await(await import("../routeEditor.js")).init(),{usedShared:k}=await G(async()=>{const{usedShared:o}=await import("./_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteAdminSet__mf_owner__1-DPLVD4vF.js");return{usedShared:o}},[],import.meta.url),F=o=>{let e=o;for(let t=0;t<5;t++){const s=e==null?void 0:e.default;if(!s||typeof s!="object"||Object.keys(s).length===0)break;const r=Object.keys(e).filter(n=>n!=="default").map(n=>e[n]);if(r.length>0&&r.some(n=>n!==void 0))break;e=s}return e},U=(o,e)=>A(e).some(t=>{var s,r;return Object.keys(((r=(s=m.shareScopeMap)==null?void 0:s[t])==null?void 0:r[o])||{}).some(n=>n!==e.version)}),q=[["react"]],E=Symbol("mf.originalSharedProvider"),J={emit:o=>o},A=o=>Array.isArray(o.scope)?o.scope:[o.scope||"default"],Q=(o,e)=>{const t={};for(const[s,r]of Object.entries(o))t[s]=Object.assign({},r,{[E]:r});return t},X=(o,e,t,s)=>{var C;if(!o||!t)return;const r=Object.fromEntries(Object.entries(o).filter(([,d])=>{var b;return((b=d==null?void 0:d.shareConfig)==null?void 0:b.import)!==!1}));if(Object.keys(r).length===0)return;const n=A(t),i=Q(r),f={};for(const d of n)f[d||"default"]={[e]:i};const p=(C=Y.getRegisteredShare(f,e,{...t,scope:n,strategy:s},J))==null?void 0:C.shared;return(p==null?void 0:p[E])||p},R=(o,e,t,s)=>{var r;return(r=t.shareConfig)!=null&&r.singleton?Object.values(o||{}).some(n=>{var i;return((i=n==null?void 0:n.shareConfig)==null?void 0:i.import)!==!1}):!!X(o,e,{...t,scope:[s]},"version-first")};for(const o of q)await Promise.all(o.map(async e=>{var r,n,i,f,p,C,d,b,K,N,T,I,V,H;const t=k[e];if(!t||t.materialize===!1||t.treeShaking)return;const s=_(e,(r=t.shareConfig)==null?void 0:r.singleton,t.version,t.scope);if(!(S(l.share,s)!==void 0&&(!((n=t.shareConfig)!=null&&n.singleton)&&x(l.share,s)==="ShoppingRouteAdminSet"||(i=t.shareConfig)!=null&&i.singleton&&!U(e,t)))){if(((f=t.shareConfig)==null?void 0:f.import)===!1){const u=A(t),O=c=>{var a,h;return!R((h=(a=m.shareScopeMap)==null?void 0:a[c])==null?void 0:h[e],e,t,c)};if(u.some(O)){m.__mfKeepAdoptedProviders||(m.__mfKeepAdoptedProviders=!0,(K=(b=(d=(C=(p=m.sharedHandler)==null?void 0:p.hooks)==null?void 0:C.lifecycle)==null?void 0:d.afterRegisterShare)==null?void 0:b.on)==null||K.call(b,c=>{var g,M,D,z;const{shared:a,previousShared:h,registeredShared:P}=c||{};if(((g=a==null?void 0:a.shareConfig)==null?void 0:g.import)!==!1||P!==a||!h||((M=h.shareConfig)==null?void 0:M.import)===!1)return;const y=(z=(D=m.shareScopeMap)==null?void 0:D[c.scope])==null?void 0:z[c.pkgName];y&&y[a.version]===a&&(y[a.version]=h)}));for(const c of((N=globalThis.__FEDERATION__)==null?void 0:N.__INSTANCES__)||[])for(const a of u){const h=(I=(T=c==null?void 0:c.shareScopeMap)==null?void 0:T[a])==null?void 0:I[e];if(!R(h,e,t,a)||!O(a))continue;const P=(m.shareScopeMap[a]||={})[e]||={};for(const[y,g]of Object.entries(h))((V=g==null?void 0:g.shareConfig)==null?void 0:V.import)!==!1&&(P[y]&&((H=P[y].shareConfig)==null?void 0:H.import)!==!1||(P[y]=g))}}if(u.every(O))return}await m.loadShare(e,{customShareInfo:{shareConfig:t.shareConfig}}).then(async u=>{if(u===!1)return;const O=typeof u=="function"?u():u;let c=F(await Promise.resolve(O));W(l.share,s,c,"ShoppingRouteAdminSet")})}}));return m})()),v}v=Z();export{v as hostInitPromise,Z as initHost};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as a,M as o,g as u,s,a as d}from"./index-12xv0FYP.js";function l(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function f(e,n){const t=l();return a.__FEDERATION__.__INSTANCES__.find(r=>!!(t&&r.options.id===t||r.options.name===e&&!r.options.version&&!n||r.options.name===e&&n&&r.options.version===n))}function I(e){const n=new(u()||o)({id:`${e.name}@${e.version||Date.now()}`,...e});return s(n),n}let i=null;function _(e){const n=f(e.name,e.version),t={...e,id:e.id||""};return n?(n.initOptions(t),i||(i=n),n):(i=I(t),i)}d(o);export{_ as i};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
`),r=t.filter(n=>!
|
|
1
|
+
const Ct=".json",Gt="FEDERATION_DEBUG";let we=(function(e){return e[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e})({});var Ee={};const Ze=!0;function xt(){return Ze}function Ut(){try{if(xt()&&window.localStorage)return!!localStorage.getItem(Gt)}catch{return!1}return!1}function $e(){return typeof process<"u"&&Ee&&Ee.FEDERATION_DEBUG?!!Ee.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:Ut()}const Bt="[ Federation Runtime ]",Xe=function(...e){return e.length?e.reduce((t,r)=>r?t?`${t}:${r}`:r:t,""):""};function Te(e,t){if("getPublicPath"in e){let r;return e.getPublicPath.startsWith("function")?r=new Function("return "+e.getPublicPath)()():r=new Function(e.getPublicPath)(),`${r}${t}`}else return"publicPath"in e?`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")}const Ye=e=>{console.warn(`${Bt}: ${e}`)};function Qe(e){try{return JSON.stringify(e,null,2)}catch{return""}}const ge=(e,t)=>{if(!e)return t;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const s=o.slice(1);return s.endsWith("/")?s.slice(0,-1):s}return o})(e);return n?n.endsWith("/")?`${n}${t}`:`${n}/${t}`:t};function Wt(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Vt(e,t={}){var _;const{remotes:r={},overrides:n={},version:o}=t;let s;const i=()=>"publicPath"in e.metaData?(e.metaData.publicPath==="auto"||e.metaData.publicPath==="")&&o?Wt(o):e.metaData.publicPath:e.metaData.getPublicPath,a=Object.keys(n);let c={};Object.keys(r).length||(c=((_=e.remotes)==null?void 0:_.reduce((g,S)=>{let b;const $=S.federationContainerName;return a.includes($)?b=n[$]:"version"in S?b=S.version:b=S.entry,g[$]={matchedVersion:b},g},{}))||{}),Object.keys(r).forEach(g=>c[g]={matchedVersion:a.includes(g)?n[g]:r[g]});const{remoteEntry:{path:l,name:f,type:u},types:h={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:m},globalName:d,ssrRemoteEntry:p}=e.metaData,{exposes:y}=e;let E={version:o||"",buildVersion:m,globalName:d,remoteEntry:ge(l,f),remoteEntryType:u,remoteTypes:ge(h.path,h.name),remoteTypesZip:h.zip||"",remoteTypesAPI:h.api||"",remotesInfo:c,shared:e==null?void 0:e.shared.map(g=>({assets:g.assets,sharedName:g.name,version:g.version,usedExports:g.referenceExports||[]})),modules:y==null?void 0:y.map(g=>({moduleName:g.name,modulePath:g.path,assets:g.assets}))};if("publicPath"in e.metaData?(s={...E,publicPath:i()},typeof e.metaData.ssrPublicPath=="string"&&(s.ssrPublicPath=e.metaData.ssrPublicPath)):s={...E,getPublicPath:i()},p){const g=ge(p.path,p.name);s.ssrRemoteEntry=g,s.ssrRemoteEntryType=p.type||"commonjs-module"}return s}function et(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(Ct))}const jt="[ Module Federation ]",z=console,qt=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Kt(){try{const e=new Error().stack;if(!e)return;const[,...t]=e.split(`
|
|
2
|
+
`),r=t.filter(n=>!qt.some(o=>n.includes(o)));return r.length?`Stack trace:
|
|
3
3
|
${r.slice(0,5).join(`
|
|
4
|
-
`)}`:void 0}catch{return}}var
|
|
4
|
+
`)}`:void 0}catch{return}}var tt=class{constructor(e,t=z){this.prefix=e,this.delegate=t??z}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??z}emit(e,t){const r=this.delegate,n=$e()?Kt():void 0,o=n?[...t,n]:t,s=(()=>{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(const i of s){const a=r[i];if(typeof a=="function"){a.call(r,this.prefix,...o);return}}for(const i of s){const a=z[i];if(typeof a=="function"){a.call(z,this.prefix,...o);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){$e()&&this.emit("debug",e)}};function zt(e){return new tt(e)}function Jt(e){const t=new tt(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}Jt(jt);async function rt(e,t){try{return await e()}catch(r){Ye(r);return}}function Ae(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function ot(e){let t=null,r=!0,n=2e4,o;const s=document.getElementsByTagName("script");for(let l=0;l<s.length;l++){const f=s[l],u=f.getAttribute("src");if(u&&Ae(u,e.url)){t=f,r=!1;break}}if(!t){const l=e.attrs;t=document.createElement("script"),t.type=(l==null?void 0:l.type)==="module"?"module":"text/javascript";let f;e.createScriptHook&&(f=e.createScriptHook(e.url,e.attrs),f instanceof HTMLScriptElement?t=f:typeof f=="object"&&("script"in f&&f.script&&(t=f.script),"timeout"in f&&f.timeout&&(n=f.timeout))),t.src||(t.src=e.url),l&&!f&&Object.keys(l).forEach(u=>{t&&(u==="async"||u==="defer"?t[u]=l[u]:t.getAttribute(u)||t.setAttribute(u,l[u]))})}let i=null;const a=typeof window<"u"?l=>{if(l.filename&&Ae(l.filename,e.url)){const f=new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${l.message} (${l.filename}:${l.lineno}:${l.colno})`);f.name="ScriptExecutionError",i=f}}:null;a&&window.addEventListener("error",a);const c=async(l,f)=>{clearTimeout(o),a&&window.removeEventListener("error",a);const u=()=>{if((f==null?void 0:f.type)==="error"){const h=new Error(f!=null&&f.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);h.name="ScriptNetworkError",e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(h))}else i?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(i)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,rt(()=>{const{needDeleteScript:h=!0}=e;h&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),l&&typeof l=="function")){const h=l(f);if(h instanceof Promise){const m=await h;return u(),m}return u(),h}u()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),o=setTimeout(()=>{c(null,{type:"error",isTimeout:!0})},n),{script:t,needAttach:r}}function Zt(e){let t=null,r=!0,n=2e4,o;const s=document.getElementsByTagName("link");for(let a=0;a<s.length;a++){const c=s[a],l=c.getAttribute("href"),f=c.getAttribute("rel");if(l&&Ae(l,e.url)&&f===e.attrs.rel){t=c,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let a,c=!0;const l=e.attrs;e.createLinkHook&&(a=e.createLinkHook(e.url,l),a instanceof HTMLLinkElement?(t=a,c=!1):typeof a=="object"&&("link"in a&&a.link&&(t=a.link,c=!1),"timeout"in a&&a.timeout&&(n=a.timeout))),l&&c&&Object.keys(l).forEach(f=>{t&&!t.getAttribute(f)&&t.setAttribute(f,l[f])})}if(!r)return Promise.resolve().then(()=>{e!=null&&e.cb&&(e==null||e.cb())}),{link:t,needAttach:r};const i=(a,c)=>{o&&clearTimeout(o);const l=()=>{if((c==null?void 0:c.type)==="error"){const f=new Error(c!=null&&c.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);f.name="LinkNetworkError",e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(f))}else e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,rt(()=>{const{needDeleteLink:f=!0}=e;f&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),a)){const f=a(c);return l(),f}l()};return t.onerror=i.bind(null,t.onerror),t.onload=i.bind(null,t.onload),o=setTimeout(()=>{i(null,{type:"error",isTimeout:!0})},n),{link:t,needAttach:r}}function Xt(e,t){const{attrs:r={},createScriptHook:n}=t;return new Promise((o,s)=>{const{script:i,needAttach:a}=ot({url:e,cb:o,onErrorCallback:s,attrs:{fetchpriority:"high",...r},createScriptHook:n,needDeleteScript:!0});a&&document.head.appendChild(i)})}const Yt=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,nt=(e,t,r,n)=>{const o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(Yt(e)),n&&o.push(`Original Error Message:
|
|
5
5
|
${n}`),o.join(`
|
|
6
|
-
`)};function tr(e,t,r,n,o,s){return n(st(e,t,r,o))}const U="[ Federation Runtime ]",ve=Zt(U);function P(e,t,r,n,o){e||R(t)}function R(e,t,r,n,o){if(t!==void 0)return tr(e,t,r??{},i=>{throw new Error(`${U}: ${i}`)},n);const s=e;throw s instanceof Error?(s.message.startsWith(U)||(s.message=`${U}: ${s.message}`),s):new Error(`${U}: ${s}`)}function Q(e){e instanceof Error&&(e.message.startsWith(U)||(e.message=`${U}: ${e.message}`)),ve.warn(e)}function rr(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function ee(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function Le(e){return typeof e.entry<"u"}function it(e){return!e.entry.includes(".json")}function Pe(e){return e&&typeof e=="object"}const or=Object.prototype.toString;function at(e){return or.call(e)==="[object Object]"}function ct(e){return Array.isArray(e)?e:[e]}function lt(e){const t={url:"",type:"global",globalName:""};return"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t}const nr=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r},sr=2e3,b=typeof globalThis=="object"?globalThis:window,M=(()=>{try{return document.defaultView}catch{return b}})(),pe=M;function le(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function fe(e,t){return Object.hasOwnProperty.call(e,t)}fe(b,"__GLOBAL_LOADING_REMOTE_ENTRY__")||le(b,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const G=b.__GLOBAL_LOADING_REMOTE_ENTRY__;function ft(e){fe(e,"__VMOK__")&&!fe(e,"__FEDERATION__")&&le(e,"__FEDERATION__",e.__VMOK__),fe(e,"__FEDERATION__")||(le(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map,__PRELOADED_ASSETS__:new Set}),le(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}ft(b);ft(M);function ir(e){b.__FEDERATION__.__INSTANCES__.push(e)}function ar(){return b.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function cr(e,t=Te()){t&&(b.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,b.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.9.0")}function B(e,t){if(typeof t=="string"){if(e[t])return{value:e[t],key:t};{const r=Object.keys(e);for(const n of r){const[o,s]=n.split(":"),i=`${o}:${t}`,a=e[i];if(a)return{value:a,key:i}}return{value:void 0,key:t}}}else R(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const Ge=()=>M.__FEDERATION__.moduleInfo,lr=(e,t)=>{const r=B(t,ee(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){const{version:n,...o}=e,s=ee(o),i=B(M.__FEDERATION__.moduleInfo,s).value;if((i==null?void 0:i.version)===n)return i}},ue=e=>lr(e,M.__FEDERATION__.moduleInfo),Ue=(e,t)=>{const r=ee(e);return M.__FEDERATION__.moduleInfo[r]=t,M.__FEDERATION__.moduleInfo},fr=e=>(M.__FEDERATION__.moduleInfo={...M.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete M.__FEDERATION__.moduleInfo[r]}),ut=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:b[r]}},ur=()=>M.__FEDERATION__.__GLOBAL_PLUGIN__,hr=e=>b.__FEDERATION__.__PRELOADED_MAP__.get(e),dr=e=>b.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),mr=e=>b.__FEDERATION__.__PRELOADED_ASSETS__.has(e),pr=e=>{const t=b.__FEDERATION__.__PRELOADED_ASSETS__;if(t.add(e),t.size>sr){const r=t.values().next().value;r!==void 0&&t.delete(r)}},xe="[0-9A-Za-z-]+",Me=`(?:\\+(${xe}(?:\\.${xe})*))`,X="0|[1-9]\\d*",he="[0-9]+",ht="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Be=`(?:${he}|${ht})`,yr=`(?:-?(${Be}(?:\\.${Be})*))`,We=`(?:${X}|${ht})`,dt=`(?:-(${We}(?:\\.${We})*))`,Se=`${X}|x|X|\\*`,K=`[v=\\s]*(${Se})(?:\\.(${Se})(?:\\.(${Se})(?:${dt})?${Me}?)?)?`,Er=`^\\s*(${K})\\s+-\\s+(${K})\\s*$`,gr=`[v=\\s]*${`(${he})\\.(${he})\\.(${he})`}${yr}?${Me}?`,Oe="((?:<|>)?=?)",_r=`(\\s*)${Oe}\\s*(${gr}|${K})`,mt="(?:~>?)",Sr=`(\\s*)${mt}\\s+`,pt="(?:\\^)",Rr=`(\\s*)${pt}\\s+`,br="(<|>)?=?\\s*\\*",Ir=`^${pt}${K}$`,wr=`v?${`(${X})\\.(${X})\\.(${X})`}${dt}?${Me}?`,$r=`^${mt}${K}$`,Tr=`^${Oe}\\s*${K}$`,Ar=`^${Oe}\\s*(${wr})$|^$`,Nr="^\\s*>=\\s*0.0.0\\s*$";function O(e){return new RegExp(e)}function v(e){return!e||e.toLowerCase()==="x"||e==="*"}function yt(...e){return t=>e.reduce((r,n)=>n(r),t)}function Ve(e){return e.match(O(Ar))}function je(e,t,r,n){const o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}function vr(e){return e.replace(O(Er),(t,r,n,o,s,i,a,c,l,f,u,h)=>(v(n)?r="":v(o)?r=`>=${n}.0.0`:v(s)?r=`>=${n}.${o}.0`:r=`>=${r}`,v(l)?c="":v(f)?c=`<${Number(l)+1}.0.0-0`:v(u)?c=`<${l}.${Number(f)+1}.0-0`:h?c=`<=${l}.${f}.${u}-${h}`:c=`<=${c}`,`${r} ${c}`.trim()))}function kr(e){return e.replace(O(_r),"$1$2$3")}function Lr(e){return e.replace(O(Sr),"$1~")}function Pr(e){return e.replace(O(Rr),"$1^")}function Mr(e){return e.trim().split(/\s+/).map(t=>t.replace(O(Ir),(r,n,o,s,i)=>v(n)?"":v(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:v(s)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:i?n==="0"?o==="0"?`>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s}-${i} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${s} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${Number(n)+1}.0.0-0`)).join(" ")}function Or(e){return e.trim().split(/\s+/).map(t=>t.replace(O($r),(r,n,o,s,i)=>v(n)?"":v(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:v(s)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:i?`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`)).join(" ")}function Dr(e){return e.split(/\s+/).map(t=>t.trim().replace(O(Tr),(r,n,o,s,i,a)=>{const c=v(o),l=c||v(s),f=l||v(i);return n==="="&&f&&(n=""),a="",c?n===">"||n==="<"?"<0.0.0-0":"*":n&&f?(l&&(s=0),i=0,n===">"?(n=">=",l?(o=Number(o)+1,s=0,i=0):(s=Number(s)+1,i=0)):n==="<="&&(n="<",l?o=Number(o)+1:s=Number(s)+1),n==="<"&&(a="-0"),`${n+o}.${s}.${i}${a}`):l?`>=${o}.0.0${a} <${Number(o)+1}.0.0-0`:f?`>=${o}.${s}.0${a} <${o}.${Number(s)+1}.0-0`:r})).join(" ")}function Fr(e){return e.trim().replace(O(br),"")}function Hr(e){return e.trim().replace(O(Nr),"")}function de(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function Cr(e,t){const{preRelease:r}=e,{preRelease:n}=t;if(r===void 0&&n)return 1;if(r&&n===void 0)return-1;if(r===void 0&&n===void 0)return 0;for(let o=0,s=r.length;o<=s;o++){const i=r[o],a=n[o];if(i!==a)return i===void 0&&a===void 0?0:i?a?de(i,a):-1:1}return 0}function ne(e,t){return de(e.major,t.major)||de(e.minor,t.minor)||de(e.patch,t.patch)||Cr(e,t)}function Re(e,t){return e.version===t.version}function Gr(e,t){switch(e.operator){case"":case"=":return Re(e,t);case">":return ne(e,t)<0;case">=":return Re(e,t)||ne(e,t)<0;case"<":return ne(e,t)>0;case"<=":return Re(e,t)||ne(e,t)>0;case void 0:return!0;default:return!1}}function Ur(e){return yt(Mr,Or,Dr,Fr)(e)}function xr(e){return yt(vr,kr,Lr,Pr)(e.trim()).split(/\s+/).join(" ")}function Z(e,t){if(!e)return!1;const r=Ve(e);if(!r)return!1;const[,n,,o,s,i,a]=r,c={operator:n,version:je(o,s,i,a),major:o,minor:s,patch:i,preRelease:a==null?void 0:a.split(".")},l=t.split("||");for(const f of l){const u=f.trim();if(!u||u==="*"||u==="x")return!0;try{const h=xr(u);if(!h.trim())return!0;const m=h.split(" ").map(y=>Ur(y)).join(" ");if(!m.trim())return!0;const d=m.split(/\s+/).map(y=>Hr(y)).filter(Boolean);if(d.length===0)continue;let p=!0;for(const y of d){const E=Ve(y);if(!E){p=!1;break}const[,_,,g,S,I,$]=E;if(!Gr({operator:_,version:je(g,S,I,$),major:g,minor:S,patch:I,preRelease:$==null?void 0:$.split(".")},c)){p=!1;break}}if(p)return!0}catch(h){console.error(`[semver] Error processing range part "${u}":`,h);continue}}return!1}const oe="default",Et="global";function Br(e,t,r,n){var s,i;let o;return"get"in e?o=e.get:"lib"in e?o=()=>Promise.resolve(e.lib):o=()=>Promise.resolve(()=>{R(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(s=e.shareConfig)!=null&&s.eager&&((i=e.treeShaking)!=null&&i.mode)&&R(`Invalid shared config for "${r}" 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:o,loaded:e!=null&&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??n)||"version-first",treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??$e.UNKNOWN,useIn:[]}:void 0}}function gt(e,t){const r=t.shared||{},n=t.name,o=Object.keys(r).reduce((i,a)=>{const c=ct(r[a]);return i[a]=i[a]||[],c.forEach(l=>{i[a].push(Br(l,n,a,t.shareStrategy))}),i},{}),s={...e.shared};return Object.keys(o).forEach(i=>{s[i]?o[i].forEach(a=>{s[i].find(c=>c.version===a.version)||s[i].push(a)}):s[i]=o[i]}),{allShareInfos:s,newShareInfos:o}}function te(e,t){if(!e)return!1;const{status:r,mode:n}=e;return r===$e.NO_USE?!1:r===$e.CALCULATED?!0:n==="runtime-infer"?t?Vr(e,t):!0:!1}function x(e,t){const r=n=>{if(!Number.isNaN(Number(n))){const o=n.split(".");let s=n;for(let i=0;i<3-o.length;i++)s+=".0";return s}return n};return!!Z(r(e),`<=${r(t)}`)}const re=(e,t)=>{const r=t||function(n,o){return x(n,o)};return Object.keys(e).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},me=e=>!!e.loaded||typeof e.lib=="function",Wr=e=>!!e.loading,Vr=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(n=>r.includes(n)):!1};function jr(e,t,r,n){const o=e[t][r];let s="",i=te(n);const a=function(c,l){return i?o[c].treeShaking?o[l].treeShaking?!me(o[c].treeShaking)&&x(c,l):!1:!0:!me(o[c])&&x(c,l)};if(i){if(s=re(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:re(e[t][r],a),useTreesShaking:i}}const W=e=>me(e)||Wr(e);function qr(e,t,r,n){const o=e[t][r];let s="",i=te(n);const a=function(c,l){if(i){if(!o[c].treeShaking)return!0;if(!o[l].treeShaking)return!1;if(W(o[l].treeShaking))return W(o[c].treeShaking)?!!x(c,l):!0;if(W(o[c].treeShaking))return!1}return W(o[l])?W(o[c])?!!x(c,l):!0:W(o[c])?!1:x(c,l)};if(i){if(s=re(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:re(e[t][r],a),useTreesShaking:i}}function Kr(e){return e==="loaded-first"?qr:jr}function Y(e,t,r,n,o){if(!e)return;const{shareConfig:s,scope:i=oe,strategy:a,treeShaking:c}=r,l=Array.isArray(i)?i:[i];for(const f of l)if(s&&e[f]&&e[f][t]){const{requiredVersion:u}=s,{version:h,useTreesShaking:m}=Kr(a)(e,f,t,c),d=()=>{const y=e[f][t][h];if(s.singleton){if(typeof u=="string"&&!Z(h,u)){const E=`Version ${h} from ${h&&y.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;s.strictVersion?R(E):Q(E)}return{shared:y,useTreesShaking:m}}else{if(u===!1||u==="*")return{shared:y,useTreesShaking:m};if(Z(h,u))return{shared:y,useTreesShaking:m};const E=te(c);if(E){for(const[_,g]of Object.entries(e[f][t]))if(te(g.treeShaking,c==null?void 0:c.usedExports)&&Z(_,u))return{shared:g,useTreesShaking:E}}for(const[_,g]of Object.entries(e[f][t]))if(Z(_,u))return{shared:g,useTreesShaking:!1}}},p={shareScopeMap:e,scope:f,pkgName:t,version:h,GlobalFederation:pe.__FEDERATION__,shareInfo:r,resolver:d,loadContext:o};return(n.emit(p)||p).resolver()}}function De(){return pe.__FEDERATION__.__SHARE__}function qe(e){const{pkgName:t,extraOptions:r,shareInfos:n}=e,o=c=>{if(!c)return;const l={};return c.forEach(u=>{l[u.version]=u}),l[re(l,function(u,h){return!me(l[u])&&x(u,h)})]},s=(r==null?void 0:r.resolver)??o,i=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),a=(...c)=>{const l={};for(const f of c)if(f)for(const[u,h]of Object.entries(f)){const m=l[u];i(m)&&i(h)?l[u]=a(m,h):h!==void 0&&(l[u]=h)}return l};return a(s(n[t]),r==null?void 0:r.customShareInfo)}const V=(e,t)=>{e.useIn||(e.useIn=[]),rr(e.useIn,t)};function se(e,t){return t&&e.treeShaking?e.treeShaking:e}function Fe(e,t){return!t||t==="."?e:`${e}/${t.replace(/^\.\//,"")}`}function Ke(e,t){for(const r of e){const n=t.startsWith(r.name);let o=t.replace(r.name,"");if(n){if(o.startsWith("/")){const a=r.name;return o=`.${o}`,{pkgNameOrAlias:a,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const s=r.alias&&t.startsWith(r.alias);let i=r.alias&&t.replace(r.alias,"");if(r.alias&&s){if(i&&i.startsWith("/")){const a=r.alias;return i=`.${i}`,{pkgNameOrAlias:a,expose:i,remote:r}}else if(i==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function zr(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}const _t="RUNTIME-001",St="RUNTIME-002",Rt="RUNTIME-003",bt="RUNTIME-004",It="RUNTIME-005",ke="RUNTIME-006",wt="RUNTIME-007",ye="RUNTIME-008",Jr="RUNTIME-009",$t="RUNTIME-010",Tt="RUNTIME-011",Zr="RUNTIME-012",At="RUNTIME-013",Nt="RUNTIME-014",vt="RUNTIME-015",k={[_t]:"Failed to get remoteEntry exports.",[St]:'The remote entry interface does not contain "init"',[Rt]:"Failed to get manifest.",[bt]:"Failed to locate remote.",[It]:"Invalid loadShareSync function call from bundler runtime",[ke]:"Invalid loadShareSync function call from runtime",[wt]:"Failed to get remote snapshot.",[ye]:"Failed to load script resources.",[Jr]:"Please call createInstance first.",[$t]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[Tt]:"The remoteEntry URL is missing from the remote snapshot.",[Zr]:'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.',[At]:"The manifest is not a valid Module Federation manifest.",[Nt]:"The remote does not expose the requested module.",[vt]:"Remote container initialization failed."};({...k});const kt=".then(callbacks[0]).catch(callbacks[1])",ze=new WeakMap,Xr=["Failed to fetch dynamically imported module","Importing a module script failed","error loading dynamically imported module"];function Yr(e){return e instanceof TypeError?Xr.some(t=>e.message.includes(t)):!1}function Lt(e){return e==="esm"||e==="module"}async function Qr({entry:e,remoteEntryExports:t,name:r,getEntryUrl:n}){return new Promise((o,s)=>{const i=c=>{if(Yr(c)){const l=c instanceof Error?c.message:String(c);try{R(ye,k,{remoteName:r,resourceUrl:a},l)}catch(f){s(f);return}}s(c)},a=n?n(e):e;try{t?o(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${a}")${kt}`)([o,i]):import(a).then(o).catch(i)}catch(c){R(`Failed to load ESM entry from "${a}". ${c instanceof Error?c.message:String(c)}`)}})}async function eo({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof __system_context__>"u"?System.import(e).then(r).catch(n):new Function("callbacks",`System.import("${e}")${kt}`)([r,n])}catch(o){R(`Failed to load SystemJS entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}function to(e,t,r){const{remoteEntryKey:n,entryExports:o}=ut(e,t);return o||R(_t,k,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n}),o}async function ro({name:e,globalName:t,entry:r,remoteInfo:n,loaderHook:o,getEntryUrl:s,resourceContext:i}){const{entryExports:a}=ut(e,t);if(a)return a;const c=s?s(r):r;return Qt(c,{attrs:{},createScriptHook:(l,f)=>{const u=o.lifecycle.createScript.emit({url:l,attrs:f,remoteInfo:n,resourceContext:i?{...i,url:l}:void 0});if(u&&(u instanceof HTMLScriptElement||"script"in u||"timeout"in u))return u}}).then(()=>to(e,t,r),l=>{const f=l instanceof Error?l.message:String(l);R(ye,k,{remoteName:e,resourceUrl:c},f)})}async function oo({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n,resourceContext:o}){const{entry:s,entryGlobalName:i,name:a,type:c}=e;return Lt(c)?Qr({entry:s,remoteEntryExports:t,name:a,getEntryUrl:n}):c==="system"?eo({entry:s,remoteEntryExports:t}):ro({entry:s,globalName:i,name:a,remoteInfo:e,loaderHook:r,getEntryUrl:n,resourceContext:o})}function Pt(e){const{entry:t,name:r}=e;return Ye(r,t)}async function He(e){const{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,resourceContext:s,_inErrorHandling:i=!1}=e,a=Pt(n);if(r)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,remoteEntryExports:r,resourceContext:s,cached:!0}),r;if(!G[a]){const l=t.remoteHandler.hooks.lifecycle.loadEntry,f=t.loaderHook;G[a]=l.emit({origin:t,loaderHook:f,remoteInfo:n,remoteEntryExports:r,resourceContext:s}).then(u=>u||oo({remoteInfo:n,remoteEntryExports:r,loaderHook:f,getEntryUrl:o,resourceContext:s})).then(async u=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,remoteEntryExports:u,resourceContext:s}),u)).catch(async u=>{const h=u instanceof Error&&u.message.includes("ScriptExecutionError");if(u instanceof Error&&u.message.includes(ye)&&!h&&!i){const m=p=>He({...p,_inErrorHandling:!0}),d=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:m,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:G,uniqueKey:a});if(d)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,remoteEntryExports:d,resourceContext:s,error:u,recovered:!0}),d}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,resourceContext:s,error:u}),u}),ze.set(G[a],t)}const c=G[a];if(ze.get(c)!==t)try{const l=await c;return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,remoteEntryExports:l,resourceContext:s}),l}catch(l){throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,resourceContext:s,error:l}),l}return c}function j(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||Et,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||oe}}function no(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function so(e){const t=new Map;return[...e||[],...ur()].forEach(r=>{r&&(P(at(r),"Plugin configuration is invalid."),P(r.name,"A name must be provided by the plugin."),t.has(r.name)||t.set(r.name,r))}),Array.from(t.values())}function io(e,t){return t===void 0?e:{...t,name:e.name,version:e.version}}function ao(e,t){const r=new Map;t.options.plugins.forEach(o=>{o&&r.set(o.name,o)});const n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return so(e).forEach(o=>{var i;if(r.set(o.name,o),t.hooks.registerPlugins[o.name])return;const s=io(o,(i=o.apply)==null?void 0:i.call(o,t));n.forEach(a=>{a.applyPlugin(s)})}),Array.from(r.values())}function co(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 D(e){var r,n,o,s,i,a;const t={};for(const[c,l]of Object.entries(e.shared)){const f=l[0];f&&(t[c]={version:f.version,singleton:(r=f.shareConfig)==null?void 0:r.singleton,requiredVersion:((n=f.shareConfig)==null?void 0:n.requiredVersion)===!1?!1:(o=f.shareConfig)==null?void 0:o.requiredVersion,eager:f.eager,strictVersion:(s=f.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((i=e.remotes)==null?void 0:i.length)>0?"host":"unknown"},mfConfig:{name:e.name,remotes:((a=e.remotes)==null?void 0:a.map(co))??[],shared:t}}}function Mt(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,recordPreloadedAssets:!0,...e}}function lo(e,t){return t.map(r=>{const n=zr(e,r.nameOrAlias);return P(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&et({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Mt(r)}})}function fo(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function Ce(e){return e instanceof Error?e.message.includes("timed out")||e.name.includes("Timeout"):!1}function C(e,t,r,n){return{url:t,status:r,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:n}}function be(e,t,r,n){return r?mr(t)?Promise.resolve(C(e,t,"cached")):(pr(t),n()):n()}async function uo(e,t,r,n){const o=e.moduleCache.get(r.name),s=r.entry;if(o!=null&&o.remoteEntryExports)return C(n,s,"cached");try{if(!await He({origin:e,remoteInfo:r,remoteEntryExports:o==null?void 0:o.remoteEntryExports,resourceContext:{...n,url:s}}))throw new Error(`Failed to load remoteEntry "${s}".`);return C(n,s,"success")}catch(i){return C(n,s,Ce(i)?"timeout":"error",i)}}function ie({host:e,remoteInfo:t,url:r,attrs:n,context:o,needDeleteLink:s}){return new Promise(i=>{const{link:a,needAttach:c}=Yt({url:r,cb:()=>{i(C(o,r,c?"success":"cached"))},onErrorCallback:l=>{i(C(o,r,Ce(l)?"timeout":"error",l))},attrs:n,createLinkHook:(l,f)=>{const u=e.loaderHook.lifecycle.createLink.emit({url:l,attrs:f,remoteInfo:t,resourceContext:{...o,url:l}});return u instanceof HTMLLinkElement,u},needDeleteLink:s});c&&document.head.appendChild(a)})}function ho({host:e,remoteInfo:t,url:r,attrs:n,context:o}){return new Promise(s=>{const{script:i,needAttach:a}=nt({url:r,cb:()=>{s(C(o,r,a?"success":"cached"))},onErrorCallback:c=>{s(C(o,r,Ce(c)?"timeout":"error",c))},attrs:n,createScriptHook:(c,l)=>{const f=e.loaderHook.lifecycle.createScript.emit({url:c,attrs:l,remoteInfo:t,resourceContext:{...o,url:c}});return f instanceof HTMLScriptElement,f},needDeleteScript:!0});a&&document.head.appendChild(i)})}function ae(e,t){return{...e,resourceType:t}}function Ot(e,t,r,n=!0,o={initiator:"preloadRemote",id:e.name},s=!0){const{cssAssets:i,jsAssetsWithoutEntry:a,entryAssets:c}=r,l=[];if(t.options.inBrowser){if(c.forEach(h=>{const{moduleInfo:m}=h;l.push(uo(t,e,m,ae(o,"remoteEntry")))}),n){const h={rel:"preload",as:"style"};i.forEach(m=>{const d=ae(o,"css");l.push(be(d,m,s,()=>ie({host:t,remoteInfo:e,url:m,attrs:h,context:d})))})}else{const h={rel:"stylesheet",type:"text/css"};i.forEach(m=>{const d=ae(o,"css");l.push(be(d,m,s,()=>ie({host:t,remoteInfo:e,url:m,attrs:h,needDeleteLink:!1,context:d})))})}let f=ho,u={fetchpriority:"high",type:"text/javascript"};n?(f=ie,u={rel:"preload",as:"script"}):Lt(e.type)&&(f=ie,u={rel:"modulepreload",fetchpriority:"high"}),a.forEach(h=>{const m=ae(o,"js");l.push(be(m,h,s,()=>f({host:t,remoteInfo:e,url:h,attrs:u,context:m})))})}return Promise.all(l)}const mo={getRegisteredShare:Y,getGlobalShareScope:De};var po={share:mo};function yo(e){if(!e||!("modules"in e)||!Array.isArray(e.modules))return;const t=e.modules.map(r=>r.moduleName).filter(Boolean);return t.length?t.join(","):void 0}function Eo(e,t,r){const n=t,o=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];o.length||o.push("default"),o.forEach(i=>{n[i]||(n[i]={})});const s={version:e.version||"",shareScopeKeys:Array.isArray(e.shareScope)?o:e.shareScope||"default"};return Object.defineProperty(s,"shareScopeMap",{value:n,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:n[o[0]],initScope:r??[]}}var Je=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){const r=t||{initiator:"loadRemote",id:Fe(this.remoteInfo.name,e),resourceType:"remoteEntry",url:this.remoteInfo.entry,expose:e},n=await He({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:r});return P(n,`remoteEntryExports is undefined
|
|
7
|
-
${et(this.remoteInfo)}`),this.remoteEntryExports=n,this.remoteEntryExports}async init(e,t,r,n,o){const s=await this.getEntry(n,o);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:s,cached:!0,origin:this.host}),s;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:s,cached:!0,origin:this.host})}catch(i){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:s,error:i,cached:!0,origin:this.host}),i}return s}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});const{remoteEntryInitOptions:i,shareScope:a,initScope:c}=Eo(this.remoteInfo,this.host.shareScopeMap,r),l=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:i,initScope:c,remoteInfo:this.remoteInfo,origin:this.host});typeof(s==null?void 0:s.init)>"u"&&R(St,k,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,D(this.host.options));try{await s.init(l.shareScope,l.initScope,l.remoteEntryInitOptions)}catch(f){R(vt,k,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${f}`,D(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...l,id:e,remoteSnapshot:t,remoteEntryExports:s}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:s,origin:this.host})}catch(i){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:s,error:i,origin:this.host}),i}finally{this.initing=!1,this.initPromise=void 0}return s}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n,void 0,t);this.lib=s,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,origin:this.host});let i;try{const l=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo});i=typeof l=="function"?l:void 0,i||(i=await s.get(t)),i||R(Nt,k,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:yo(n)},void 0,D(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,moduleFactory:i,origin:this.host})}catch(l){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,error:l,origin:this.host}),l}const a=nr(this.remoteInfo.name,t),c=this.wraperFactory(i,a);if(!o)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:o,origin:this.host});try{const l=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:o,exposeModule:l,origin:this.host}),l}catch(l){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:o,error:l,origin:this.host}),l}}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return()=>{const n=e();return n instanceof Promise?n.then(o=>(r(o,t),o)):(r(n,t),n)}}},F=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e){P(at(e),"Plugin configuration is invalid.");const t=e.name;P(t,"A name must be provided by the plugin."),this.registerPlugins[t]||(this.registerPlugins[t]=e,this.lifecycleKeys.forEach(r=>{const n=e[r];n&&this.lifecycle[r].on(n)}))}removePlugin(e){P(e,"A name is required.");const t=this.registerPlugins[e];P(t,`The plugin "${e}" is not registered.`),this.lifecycleKeys.forEach(r=>{const n=t[r];n&&this.lifecycle[r].remove(n)}),delete this.registerPlugins[e]}},N=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const t=this;this.on(function r(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{const n=r(...e);n!==void 0&&(t=n)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},w=class extends N{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n<r.length?Promise.resolve(r[n++].apply(null,e)).then(i=>i===void 0||e.length===1&&i===e[0]?o(s):o(i)):s;t=o()}return Promise.resolve(t)}};function Dt(e,t){if(!Pe(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var q=class extends N{constructor(e){super(),this.onerror=R,this.type=e}emit(e){Pe(e)||R(`The data for the "${this.type}" hook should be an object.`);for(const t of this.listeners)try{const r=t(e);if(r===void 0)continue;if(Dt(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){Q(r),this.onerror(r)}return e}},H=class extends N{constructor(e){super(),this.onerror=R,this.type=e}emit(e){Pe(e)||R(`The response data for the "${this.type}" hook must be an object.`);const t=Array.from(this.listeners);if(t.length>0){let r=0;const n=s=>(Q(s),this.onerror(s),e),o=s=>{if(s!==void 0&&Dt(e,s))e=s;else if(s!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(i){return n(i)}return e};return Promise.resolve(o(e))}return Promise.resolve(e)}};const J="Remote loading is disabled by experiments.optimization.disableRemote.";var go=class{constructor(){this.hooks=new F({})}formatAndRegisterRemote(){return[]}loadRemote(){throw new Error(J)}preloadRemote(){throw new Error(J)}registerRemotes(){throw new Error(J)}getRemoteModuleAndOptions(){throw new Error(J)}initRawContainer(){throw new Error(J)}};function Ft(e,t){const r=lt(t);r.url||R(Tt,k,{remoteName:e.name});let n=Ae(t,r.url);e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function _o(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!Le(t)||!it(t)){const{remoteSnapshot:a,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Fe(t.name,n)});Ft(s,a);const l=[{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1,recordPreloadedAssets:!0}];await o.remoteHandler.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:l,options:o.options,origin:o});const[f]=l;if(f){const u={remote:t,preloadConfig:f},h=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:u,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:c});h&&Ot(s,o,h,!1,{initiator:"loadRemote",id:i},f.recordPreloadedAssets).catch(()=>{})}return{...e,remoteSnapshot:a}}return e}}}function So(e){const 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 Ht(e,t,r,n,o={},s){const{value:i}=B(e,ee(t)),a=s||i;if(a&&!tt(a)&&(r(a,t,n),a.remotesInfo)){const c=Object.keys(a.remotesInfo);for(const l of c){if(o[l])continue;o[l]=!0;const f=So(l),u=a.remotesInfo[l];Ht(e,{name:f.name,version:u.matchedVersion},r,!1,o,void 0)}}}const Ie=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Ro(e,t,r,n,o){const s=[],i=[],a=[],c=new Set,l=new Set,{options:f}=e,{preloadConfig:u}=t,{depsRemote:h}=u;if(Ht(n,r,(d,p,y)=>{var $;let E;if(y)E=u;else if(Array.isArray(h)){const A=h.find(T=>T.nameOrAlias===p.name||T.nameOrAlias===p.alias);if(!A)return;E=Mt(A)}else if(h===!0)E=u;else return;const _=Ae(d,lt(d).url);_&&a.push({name:p.name,moduleInfo:{name:p.name,entry:_,type:"remoteEntryType"in d?d.remoteEntryType:"global",entryGlobalName:"globalName"in d?d.globalName:p.name,shareScope:"",version:"version"in d?d.version:void 0},url:_});let g="modules"in d?d.modules:[];const S=fo(E.exposes);S.length&&"modules"in d&&(g=($=d==null?void 0:d.modules)==null?void 0:$.reduce((A,T)=>((S==null?void 0:S.indexOf(T.moduleName))!==-1&&A.push(T),A),[]));function I(A){const T=A.map(L=>Ae(d,L));return E.filter?T.filter(E.filter):T}if(g){const A=g.length;for(let T=0;T<A;T++){const L=g[T],Ee=`${p.name}/${L.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:L.moduleName==="."?p.name:Ee,name:p.name,remoteSnapshot:d,preloadConfig:E,remote:p,origin:e}),!hr(Ee)&&(E.resourceCategory==="all"?(s.push(...I(L.assets.css.async)),s.push(...I(L.assets.css.sync)),i.push(...I(L.assets.js.async)),i.push(...I(L.assets.js.sync))):E.resourceCategory==="sync"&&(s.push(...I(L.assets.css.sync)),i.push(...I(L.assets.js.sync))),dr(Ee))}}},!0,{},o),o.shared&&o.shared.length>0){const d=(p,y)=>{const{shared:E}=Y(e.shareScopeMap,y.sharedName,p,e.sharedHandler.hooks.lifecycle.resolveShare)||{};E&&typeof E.lib=="function"&&(y.assets.js.sync.forEach(_=>{c.add(_)}),y.assets.css.sync.forEach(_=>{l.add(_)}))};o.shared.forEach(p=>{var _;const y=(_=f.shared)==null?void 0:_[p.sharedName];if(!y)return;const E=p.version?y.find(g=>g.version===p.version):y;E&&ct(E).forEach(g=>{d(g,p)})})}const m=i.filter(d=>!c.has(d)&&!Ie("script",d));return{cssAssets:s.filter(d=>!l.has(d)&&!Ie("link",d)),jsAssetsWithoutEntry:m,entryAssets:a.filter(d=>!Ie("script",d.url))}}const bo=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return Le(o)&&it(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(Ft(n,i),Ro(t,r,n,s,i))}}};function Ct(e,t){const r=ue({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&B(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:Ge(),remoteSnapshot:ue({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Ge(),remoteSnapshot:ue({name:e.name,version:"version"in e?e.version:void 0})}}var Io=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new F({beforeLoadRemoteSnapshot:new w("beforeLoadRemoteSnapshot"),loadSnapshot:new H("loadGlobalSnapshot"),loadRemoteSnapshot:new H("loadRemoteSnapshot"),afterLoadSnapshot:new H("afterLoadSnapshot"),beforeLoadManifest:new w("beforeLoadManifest"),afterLoadManifest:new w("afterLoadManifest")}),this.manifestLoading=pe.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:r="loadRemote"}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e,origin:this.HostInstance});let o=ue({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},fr({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!B(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o==null?void 0:o.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let f,u;if(c)if(tt(c)){const h=c.remoteEntry,m=await this.loadManifestSnapshot(h,e,{},{initiator:r,id:t||e.name}),d=Ue({...e,entry:h},m);f=m,u=d}else{const{remoteSnapshot:h}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});f=h,u=l}else if(Le(e)){const h=await this.loadManifestSnapshot(e.entry,e,{},{initiator:r,id:t||e.name}),m=Ue(e,h);f=h,u=m}else R(wt,k,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,D(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:f}),{remoteSnapshot:f,globalSnapshot:u}}getGlobalRemoteInfo(e){return Ct(e,this.HostInstance)}async getManifestJson(e,t,r,n){return(async()=>{const s=j(t);let i=this.manifestCache.get(e);if(i)return await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:n,manifestJson:i,cached:!0,origin:this.HostInstance}),i;await this.hooks.lifecycle.beforeLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:n,origin:this.HostInstance});let a,c,l=!1;try{let h=await this.loaderHook.lifecycle.fetch.emit(e,{},s,n?{...n,url:e,resourceType:"manifest"}:void 0);(!h||!(h instanceof Response))&&(h=await fetch(e,{})),a=h,i=await h.json()}catch(h){c=h,i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:h,from:"runtime",lifecycle:"afterResolve",remote:s,origin:this.HostInstance}),i||(delete this.manifestLoading[e],await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:n,response:a,error:h,origin:this.HostInstance}),R(Rt,k,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${h}`,D(this.HostInstance.options))),l=!0}const f=[!i.metaData&&"metaData",!i.exposes&&"exposes",!i.shared&&"shared"].filter(Boolean),u=f.length>0?new Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${f.join(", ")}.`):void 0;return u&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:u,from:"runtime",lifecycle:"afterResolve",remote:s,origin:this.HostInstance}),await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:n,manifestJson:i,response:a,error:u||c,recovered:u?void 0:l||void 0,origin:this.HostInstance}),u&&R(At,k,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:f.join(",")},void 0,D(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,r,n){const o=async()=>{const s=await this.getManifestJson(e,t,r,n),i=qt(s,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=o().then(s=>s)),this.manifestLoading[e]}},wo=class{constructor(){this.hooks=new F({})}},$o=class{constructor(e){this.hooks=new F({beforeRegisterShare:new q("beforeRegisterShare"),afterRegisterShare:new N("afterRegisterShare"),afterResolve:new H("afterResolve"),beforeLoadShare:new H("beforeLoadShare"),loadShare:new w,afterLoadShare:new N("afterLoadShare"),errorLoadShare:new N("errorLoadShare"),resolveShare:new q("resolveShare"),initContainerShareScopeMap:new q("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:r,selectedShared:n,loadContext:o}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:r,selectedShared:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,loadContext:o,origin:this.host})}catch(s){Q(s)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:r,error:n,recovered:o,loadContext:s}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:n,recovered:o,loadContext:s})}catch(i){Q(i)}}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=gt(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{var l,f,u;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s});const a=(l=this.shareScopeMap[i])==null?void 0:l[o],c=a==null?void 0:a[s.version];a||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name}),this.emitAfterRegisterShare(o,{scope:i,shared:s,previousShared:c,registeredShared:(u=(f=this.shareScopeMap[i])==null?void 0:f[o])==null?void 0:u[s.version],trigger:"runtime"})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this;let n=t==null?void 0:t.context;const o=qe({pkgName:e,extraOptions:t,shareInfos:r.options.shared});let s=o;try{o!=null&&o.scope&&await Promise.all(o.scope.map(async f=>{await Promise.all(this.initializeSharing(f,{strategy:o.strategy,context:n}))}));const i=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:r.options.shared,origin:r,loadContext:n});s=i.shareInfo,n=i.loadContext||n,P(s,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);const a=s,{shared:c,useTreesShaking:l}=Y(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare,n)||{};if(c){const f=se(c,l);if(f.lib)return V(f,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:a,selectedShared:c,loadContext:n}),f.lib;if(f.loading&&!f.loaded){const u=await f.loading;return f.loaded=!0,f.lib||(f.lib=u),V(f,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:a,selectedShared:c,loadContext:n}),u}else{const h=(async()=>{const d=await f.get();return V(f,r.options.name),f.loaded=!0,f.lib=d,d})();this.setShared({pkgName:e,loaded:!1,shared:c,from:r.options.name,lib:null,loading:h,treeShaking:l?f:void 0});const m=await h;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:a,selectedShared:c,loadContext:n}),m}}else{if(t!=null&&t.customShareInfo)return this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:a,recovered:!0,loadContext:n}),!1;const f=te(a.treeShaking),u=se(a,f),m=(async()=>{const p=await u.get();u.lib=p,u.loaded=!0,V(u,r.options.name);const{shared:y,useTreesShaking:E}=Y(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare,n)||{};if(y){const _=se(y,E);_.lib=p,_.loaded=!0,y.from=a.from}return p})();this.setShared({pkgName:e,loaded:!1,shared:a,from:r.options.name,lib:null,loading:m,treeShaking:f?u:void 0});const d=await m;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:a,selectedShared:a,loadContext:n}),d}}catch(i){throw this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,error:i,loadContext:n}),i}}initializeSharing(e=oe,t){var m;const{host:r}=this,n=t==null?void 0:t.from,o=t==null?void 0:t.strategy,s=((m=t==null?void 0:t.context)==null?void 0:m.trigger)||n||"runtime";let i=t==null?void 0:t.initScope;const a=[];if(n!=="build"){const{initTokens:d}=this;i||(i=[]);let p=d[e];if(p||(p=d[e]={from:this.host.name}),i.indexOf(p)>=0)return a;i.push(p)}const c=this.shareScopeMap,l=r.options.name;c[e]||(c[e]={});const f=c[e],u=(d,p)=>{var $;const{version:y,eager:E}=p;f[d]=f[d]||{};const _=f[d],g=_[y],S=g&&se(g),I=!!(S&&("eager"in S&&S.eager||"shareConfig"in S&&(($=S.shareConfig)!=null&&$.eager)));(!S||S.strategy!=="loaded-first"&&!S.loaded&&(!E!=!I?E:l>_[y].from))&&(_[y]=p),this.emitAfterRegisterShare(d,{scope:e,shared:p,previousShared:g,registeredShared:_[y],trigger:s})},h=async d=>{const{module:p}=await r.remoteHandler.getRemoteModuleAndOptions({id:d});let y;const E={initiator:"loadShare",id:d,resourceType:"remoteEntry",url:p.remoteInfo.entry};try{y=await p.getEntry(void 0,E)}catch(_){if(y=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:d,error:_,from:"runtime",lifecycle:"beforeLoadShare",remote:p.remoteInfo,origin:r}),!y)return}finally{y!=null&&y.init&&!p.initing&&(p.remoteEntryExports=y,await p.init(void 0,void 0,i,void 0,E))}};return Object.keys(r.options.shared).forEach(d=>{r.options.shared[d].forEach(p=>{p.scope.includes(e)&&u(d,p)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(d=>{d.shareScope===e&&a.push(h(d.name))}),a}loadShareSync(e,t){const{host:r}=this,n=t==null?void 0:t.context,o=qe({pkgName:e,extraOptions:t,shareInfos:r.options.shared});try{o!=null&&o.scope&&o.scope.forEach(i=>{this.initializeSharing(i,{strategy:o.strategy,from:t==null?void 0:t.from,context:n})});const{shared:s}=Y(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare,n)||{};if(s){if(typeof s.lib=="function")return V(s,r.options.name),s.loaded||(s.loaded=!0,s.from===r.options.name&&(o.loaded=!0)),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:s,loadContext:n}),s.lib;if(typeof s.get=="function"){const i=s.get();if(!(i instanceof Promise))return V(s,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:s}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:s,loadContext:n}),i}}if(o.lib)return o.loaded||(o.loaded=!0),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o,loadContext:n}),o.lib;if(o.get){const i=o.get();return i instanceof Promise&&R((t==null?void 0:t.from)==="build"?It:ke,k,{hostName:r.options.name,sharedPkgName:e},void 0,D(r.options)),o.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:o.lib,shared:o}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o,loadContext:n}),o.lib}R(ke,k,{hostName:r.options.name,sharedPkgName:e},void 0,D(r.options))}catch(s){throw this.emitErrorLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,error:s,loadContext:n}),s}}initShareScopeMap(e,t,r={}){const{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:n,loading:o,loaded:s,get:i,treeShaking:a}){const{version:c,scope:l="default",...f}=t,u=Array.isArray(l)?l:[l],h=m=>{const d=(y,E,_)=>{_&&!y[E]&&(y[E]=_)},p=a?m.treeShaking:m;d(p,"loaded",s),d(p,"loading",o),d(p,"get",i),d(p,"lib",n)};u.forEach(m=>{this.shareScopeMap[m]||(this.shareScopeMap[m]={}),this.shareScopeMap[m][e]||(this.shareScopeMap[m][e]={}),this.shareScopeMap[m][e][c]||(this.shareScopeMap[m][e][c]={version:c,scope:[m],...f,lib:n});const d=this.shareScopeMap[m][e][c];h(d),r&&d.from!==r&&(d.from=r)})}_setGlobalShareScopeMap(e){const t=De(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}},To=class{constructor(){this.shareScopeMap={},this.hooks=new F({afterResolve:new H("afterResolve")})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.")}loadShareSync(){throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.")}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},Ao=class{constructor(e){this.hooks=new F({beforeRegisterRemote:new q("beforeRegisterRemote"),registerRemote:new q("registerRemote"),beforeRequest:new H("beforeRequest"),afterMatchRemote:new w("afterMatchRemote"),onLoad:new w("onLoad"),afterLoadRemote:new w("afterLoadRemote"),handlePreloadModule:new N("handlePreloadModule"),errorLoadRemote:new w("errorLoadRemote"),beforePreloadRemote:new w("beforePreloadRemote"),generatePreloadAssets:new w("generatePreloadAssets"),afterPreloadRemote:new w("afterPreloadRemote"),loadEntry:new w}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this,n=Ke(r.options.remotes,e);let o=e,s=n==null?void 0:n.expose,i=n?j(n.remote):void 0,a;try{const{loadFactory:c=!0}=t||{loadFactory:!0},{module:l,moduleOptions:f,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:h,remote:m,expose:d,id:p,remoteSnapshot:y}=u;o=p,s=d,i=j(m);const E=await l.get(p,d,t,y),_=await this.hooks.lifecycle.onLoad.emit({id:p,pkgNameOrAlias:h,expose:d,exposeModule:c?E:void 0,exposeModuleFactory:c?void 0:E,remote:m,options:f,moduleInstance:l,origin:r});return this.setIdToRemoteMap(e,u),a={id:o,expose:s,remote:i,options:t,origin:r},typeof _=="function"?_:E}catch(c){const{from:l="runtime"}=t||{from:"runtime"};let f;try{f=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:l,lifecycle:"onLoad",expose:s,remote:i,origin:r})}catch(u){throw a={id:o,expose:s,remote:i,options:t,error:u,origin:r},u}if(!f)throw a={id:o,expose:s,remote:i,options:t,error:c,origin:r},c;return a={id:o,expose:s,remote:i,options:t,error:c,origin:r,recovered:!0},f}finally{a&&await this.hooks.lifecycle.afterLoadRemote.emit(a)}}async preloadRemote(e){const{host:t}=this,r=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const n=lo(t.options.remotes,e),o=a=>{const{preloadConfig:c,remote:l}=a,f=c.exposes||[];return f.length?f.map(u=>({ops:{...a,preloadConfig:{...c,exposes:[u]}},id:Fe(l.name,u)})):[{ops:a,id:`${l.name}/*`}]};let s;await Promise.all(n.flatMap(o).map(async a=>{const{ops:c,id:l}=a,{remote:f,preloadConfig:u}=c,h=j(f);try{const{globalSnapshot:m,remoteSnapshot:d}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:f,id:l,initiator:"preloadRemote"}),p=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:c,remote:f,remoteInfo:h,globalSnapshot:m,remoteSnapshot:d});if(!p)return;const y=await Ot(h,t,p,!0,{initiator:"preloadRemote",id:l},u.recordPreloadedAssets);r.push({remote:f,remoteInfo:h,preloadConfig:u,id:l,results:y})}catch(m){r.push({remote:f,remoteInfo:h,preloadConfig:u,id:l,results:[{url:h.entry,status:"error",resourceType:/\.json(?:$|[?#])/i.test(h.entry)?"manifest":"remoteEntry",initiator:"preloadRemote",id:l,error:m}]})}}));const i=r.flatMap(a=>a.results.filter(c=>c.status==="error"||c.status==="timeout"));if(i.length>0&&(s=new Error(`preloadRemote failed to load ${i.length} resource(s).`),Object.assign(s,{results:r,failedResults:i})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:r,error:s}),s)throw s}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t==null?void 0:t.force})})}initRawContainer(e,t,r){const{host:n}=this,o=new Je({host:n,remoteInfo:j({name:e,entry:t})});return o.remoteEntryExports=r,n.moduleCache.set(e,o),o}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(m){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:m,lifecycle:"beforeRequest"}),!n)throw m}const{id:o}=n,s=Ke(t.options.remotes,o);if(!s)try{R(bt,k,{hostName:t.options.name,requestId:o},void 0,D(t.options))}catch(m){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:o,options:t.options,error:m,origin:t}),m}const{remote:i}=s,a=j(i);await this.hooks.lifecycle.afterMatchRemote.emit({id:o,...s,options:t.options,remoteInfo:a,origin:t});const c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:l,expose:f}=c;P(l&&f,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let u=t.moduleCache.get(l.name);const h={host:t,remoteInfo:a};return u||(u=new Je(h),t.moduleCache.set(l.name,u)),{module:u,moduleOptions:h,remoteMatchInfo:c}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>{var c;return e.alias&&(a.name.startsWith(e.alias)||((c=a.alias)==null?void 0:c.startsWith(e.alias)))});P(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.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||(e.shareScope=oe),e.type||(e.type=Et)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r!=null&&r.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),Qe(i.join(" ")))}}removeRemote(e){var t;try{const{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(c=>c.name===n);o!==-1&&r.options.remotes.splice(o,1);const s=B(b.__FEDERATION__.moduleInfo,ee(e)).key;delete b.__FEDERATION__.moduleInfo[s],"entry"in e&&(r.snapshotHandler.manifestCache.delete(e.entry),delete pe.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);const{hostGlobalSnapshot:i}=Ct(e,r);if(i){const c=i&&"remotesInfo"in i&&i.remotesInfo&&B(i.remotesInfo,e.name).key;c&&delete i.remotesInfo[c]}const a=r.moduleCache.get(e.name);if(a){const c=a.remoteInfo,l=c.entryGlobalName;b[l]&&((t=Object.getOwnPropertyDescriptor(b,l))!=null&&t.configurable?delete b[l]:b[l]=void 0);const f=Pt(a.remoteInfo);G[f]&&delete G[f];let u=c.buildVersion?Ye(c.name,c.buildVersion):c.name;const h=b.__FEDERATION__.__INSTANCES__.findIndex(m=>c.buildVersion?m.options.id===u:m.name===u);if(h!==-1){const m=b.__FEDERATION__.__INSTANCES__[h];u=m.options.id||u;const d=De();let p=!0;const y=[];Object.keys(d).forEach(E=>{const _=d[E];_&&Object.keys(_).forEach(g=>{const S=_[g];S&&Object.keys(S).forEach(I=>{const $=S[I];$&&Object.keys($).forEach(A=>{const T=$[A];T&&typeof T=="object"&&T.from===c.name&&(T.loaded||T.loading?(T.useIn=T.useIn.filter(L=>L!==c.name),T.useIn.length?p=!1:y.push([E,g,I,A])):y.push([E,g,I,A]))})})})}),p&&(m.shareScopeMap={},delete d[u]),y.forEach(([E,_,g,S])=>{var I,$,A;(A=($=(I=d[E])==null?void 0:I[_])==null?void 0:$[g])==null||delete A[S]}),b.__FEDERATION__.__INSTANCES__.splice(h,1)}r.moduleCache.delete(e.name)}}catch(r){ve.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};const No=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0,we=typeof FEDERATION_OPTIMIZE_NO_REMOTE=="boolean"?!FEDERATION_OPTIMIZE_NO_REMOTE:!0,Ze=typeof FEDERATION_OPTIMIZE_NO_SHARED=="boolean"?!FEDERATION_OPTIMIZE_NO_SHARED:!0;var Gt=class{constructor(e){this.hooks=new F({beforeInit:new q("beforeInit"),init:new N,beforeInitContainer:new H("beforeInitContainer"),initContainer:new H("initContainer")}),this.version="2.9.0",this.moduleCache=new Map,this.loaderHook=new F({getModuleInfo:new N,createScript:new N,createLink:new N,fetch:new w,loadEntryError:new w,afterLoadEntry:new w("afterLoadEntry"),beforeInitRemote:new w("beforeInitRemote"),afterInitRemote:new w("afterInitRemote"),beforeGetExpose:new w("beforeGetExpose"),afterGetExpose:new w("afterGetExpose"),beforeExecuteFactory:new w("beforeExecuteFactory"),afterExecuteFactory:new w("afterExecuteFactory"),getModuleFactory:new w}),this.bridgeHook=new F({beforeBridgeRender:new N,afterBridgeRender:new N,beforeBridgeDestroy:new N,afterBridgeDestroy:new N,afterBridgeRouteSync:new N});const t=we&&No?[_o(),bo()]:[],r={id:no(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:Xe};this.name=e.name,this.options=r,this.snapshotHandler=we?new Io(this):new wo,this.sharedHandler=Ze?new $o(this):new To,this.remoteHandler=we?new Ao(this):new go,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&R(st($t,k)),this.registerPlugins(e.plugins);const 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=oe,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){return this.remoteHandler.initRawContainer(e,t,r)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){const r=Ze?gt(e,t).allShareInfos:{},{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(l=>{a.includes(l)||a.push(l)});const c={...e,...t,plugins:a,remotes:s,shared:i,id:n.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){this.options.plugins=ao(e,this)}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};const Po=po;function vo(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function ko(e,t){const r=vo();return b.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}function Lo(e){const t=new(ar()||Gt)({id:`${e.name}@${e.version||Date.now()}`,...e});return ir(t),t}let ce=null;function Mo(e){const t=ko(e.name,e.version),r={...e,id:e.id||""};return t?(t.initOptions(r),ce||(ce=t),t):(ce=Lo(r),ce)}cr(Gt);export{Po as h,Mo as i};
|
|
6
|
+
`)};function Qt(e,t,r,n,o,s){return n(nt(e,t,r,o))}const x="[ Federation Runtime ]",ve=zt(x);function M(e,t,r,n,o){e||R(t)}function R(e,t,r,n,o){if(t!==void 0)return Qt(e,t,r??{},i=>{throw new Error(`${x}: ${i}`)},n);const s=e;throw s instanceof Error?(s.message.startsWith(x)||(s.message=`${x}: ${s.message}`),s):new Error(`${x}: ${s}`)}function Q(e){e instanceof Error&&(e.message.startsWith(x)||(e.message=`${x}: ${e.message}`)),ve.warn(e)}function er(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function ee(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ke(e){return typeof e.entry<"u"}function st(e){return!e.entry.includes(".json")}function Le(e){return e&&typeof e=="object"}const tr=Object.prototype.toString;function it(e){return tr.call(e)==="[object Object]"}function at(e){return Array.isArray(e)?e:[e]}function ct(e){const t={url:"",type:"global",globalName:""};return"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t}const rr=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r},or=2e3,I=typeof globalThis=="object"?globalThis:window,P=(()=>{try{return document.defaultView}catch{return I}})(),me=P;function ce(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function le(e,t){return Object.hasOwnProperty.call(e,t)}le(I,"__GLOBAL_LOADING_REMOTE_ENTRY__")||ce(I,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const G=I.__GLOBAL_LOADING_REMOTE_ENTRY__;function lt(e){le(e,"__VMOK__")&&!le(e,"__FEDERATION__")&&ce(e,"__FEDERATION__",e.__VMOK__),le(e,"__FEDERATION__")||(ce(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map,__PRELOADED_ASSETS__:new Set}),ce(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}lt(I);lt(P);function wo(e){I.__FEDERATION__.__INSTANCES__.push(e)}function $o(){return I.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function To(e,t=$e()){t&&(I.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,I.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.9.0")}function B(e,t){if(typeof t=="string"){if(e[t])return{value:e[t],key:t};{const r=Object.keys(e);for(const n of r){const[o,s]=n.split(":"),i=`${o}:${t}`,a=e[i];if(a)return{value:a,key:i}}return{value:void 0,key:t}}}else R(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const Ce=()=>P.__FEDERATION__.moduleInfo,nr=(e,t)=>{const r=B(t,ee(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){const{version:n,...o}=e,s=ee(o),i=B(P.__FEDERATION__.moduleInfo,s).value;if((i==null?void 0:i.version)===n)return i}},fe=e=>nr(e,P.__FEDERATION__.moduleInfo),Ge=(e,t)=>{const r=ee(e);return P.__FEDERATION__.moduleInfo[r]=t,P.__FEDERATION__.moduleInfo},sr=e=>(P.__FEDERATION__.moduleInfo={...P.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete P.__FEDERATION__.moduleInfo[r]}),ft=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:I[r]}},ir=()=>P.__FEDERATION__.__GLOBAL_PLUGIN__,ar=e=>I.__FEDERATION__.__PRELOADED_MAP__.get(e),cr=e=>I.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),lr=e=>I.__FEDERATION__.__PRELOADED_ASSETS__.has(e),fr=e=>{const t=I.__FEDERATION__.__PRELOADED_ASSETS__;if(t.add(e),t.size>or){const r=t.values().next().value;r!==void 0&&t.delete(r)}},xe="[0-9A-Za-z-]+",Me=`(?:\\+(${xe}(?:\\.${xe})*))`,X="0|[1-9]\\d*",ue="[0-9]+",ut="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Ue=`(?:${ue}|${ut})`,ur=`(?:-?(${Ue}(?:\\.${Ue})*))`,Be=`(?:${X}|${ut})`,ht=`(?:-(${Be}(?:\\.${Be})*))`,_e=`${X}|x|X|\\*`,K=`[v=\\s]*(${_e})(?:\\.(${_e})(?:\\.(${_e})(?:${ht})?${Me}?)?)?`,hr=`^\\s*(${K})\\s+-\\s+(${K})\\s*$`,dr=`[v=\\s]*${`(${ue})\\.(${ue})\\.(${ue})`}${ur}?${Me}?`,Pe="((?:<|>)?=?)",mr=`(\\s*)${Pe}\\s*(${dr}|${K})`,dt="(?:~>?)",pr=`(\\s*)${dt}\\s+`,mt="(?:\\^)",yr=`(\\s*)${mt}\\s+`,Er="(<|>)?=?\\s*\\*",gr=`^${mt}${K}$`,_r=`v?${`(${X})\\.(${X})\\.(${X})`}${ht}?${Me}?`,Sr=`^${dt}${K}$`,Rr=`^${Pe}\\s*${K}$`,br=`^${Pe}\\s*(${_r})$|^$`,Ir="^\\s*>=\\s*0.0.0\\s*$";function O(e){return new RegExp(e)}function N(e){return!e||e.toLowerCase()==="x"||e==="*"}function pt(...e){return t=>e.reduce((r,n)=>n(r),t)}function We(e){return e.match(O(br))}function Ve(e,t,r,n){const o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}function wr(e){return e.replace(O(hr),(t,r,n,o,s,i,a,c,l,f,u,h)=>(N(n)?r="":N(o)?r=`>=${n}.0.0`:N(s)?r=`>=${n}.${o}.0`:r=`>=${r}`,N(l)?c="":N(f)?c=`<${Number(l)+1}.0.0-0`:N(u)?c=`<${l}.${Number(f)+1}.0-0`:h?c=`<=${l}.${f}.${u}-${h}`:c=`<=${c}`,`${r} ${c}`.trim()))}function $r(e){return e.replace(O(mr),"$1$2$3")}function Tr(e){return e.replace(O(pr),"$1~")}function Ar(e){return e.replace(O(yr),"$1^")}function vr(e){return e.trim().split(/\s+/).map(t=>t.replace(O(gr),(r,n,o,s,i)=>N(n)?"":N(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:N(s)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:i?n==="0"?o==="0"?`>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s}-${i} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${s} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${Number(n)+1}.0.0-0`)).join(" ")}function Nr(e){return e.trim().split(/\s+/).map(t=>t.replace(O(Sr),(r,n,o,s,i)=>N(n)?"":N(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:N(s)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:i?`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`)).join(" ")}function kr(e){return e.split(/\s+/).map(t=>t.trim().replace(O(Rr),(r,n,o,s,i,a)=>{const c=N(o),l=c||N(s),f=l||N(i);return n==="="&&f&&(n=""),a="",c?n===">"||n==="<"?"<0.0.0-0":"*":n&&f?(l&&(s=0),i=0,n===">"?(n=">=",l?(o=Number(o)+1,s=0,i=0):(s=Number(s)+1,i=0)):n==="<="&&(n="<",l?o=Number(o)+1:s=Number(s)+1),n==="<"&&(a="-0"),`${n+o}.${s}.${i}${a}`):l?`>=${o}.0.0${a} <${Number(o)+1}.0.0-0`:f?`>=${o}.${s}.0${a} <${o}.${Number(s)+1}.0-0`:r})).join(" ")}function Lr(e){return e.trim().replace(O(Er),"")}function Mr(e){return e.trim().replace(O(Ir),"")}function he(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function Pr(e,t){const{preRelease:r}=e,{preRelease:n}=t;if(r===void 0&&n)return 1;if(r&&n===void 0)return-1;if(r===void 0&&n===void 0)return 0;for(let o=0,s=r.length;o<=s;o++){const i=r[o],a=n[o];if(i!==a)return i===void 0&&a===void 0?0:i?a?he(i,a):-1:1}return 0}function ne(e,t){return he(e.major,t.major)||he(e.minor,t.minor)||he(e.patch,t.patch)||Pr(e,t)}function Se(e,t){return e.version===t.version}function Or(e,t){switch(e.operator){case"":case"=":return Se(e,t);case">":return ne(e,t)<0;case">=":return Se(e,t)||ne(e,t)<0;case"<":return ne(e,t)>0;case"<=":return Se(e,t)||ne(e,t)>0;case void 0:return!0;default:return!1}}function Dr(e){return pt(vr,Nr,kr,Lr)(e)}function Hr(e){return pt(wr,$r,Tr,Ar)(e.trim()).split(/\s+/).join(" ")}function Z(e,t){if(!e)return!1;const r=We(e);if(!r)return!1;const[,n,,o,s,i,a]=r,c={operator:n,version:Ve(o,s,i,a),major:o,minor:s,patch:i,preRelease:a==null?void 0:a.split(".")},l=t.split("||");for(const f of l){const u=f.trim();if(!u||u==="*"||u==="x")return!0;try{const h=Hr(u);if(!h.trim())return!0;const m=h.split(" ").map(y=>Dr(y)).join(" ");if(!m.trim())return!0;const d=m.split(/\s+/).map(y=>Mr(y)).filter(Boolean);if(d.length===0)continue;let p=!0;for(const y of d){const E=We(y);if(!E){p=!1;break}const[,_,,g,S,b,$]=E;if(!Or({operator:_,version:Ve(g,S,b,$),major:g,minor:S,patch:b,preRelease:$==null?void 0:$.split(".")},c)){p=!1;break}}if(p)return!0}catch(h){console.error(`[semver] Error processing range part "${u}":`,h);continue}}return!1}const oe="default",yt="global";function Fr(e,t,r,n){var s,i;let o;return"get"in e?o=e.get:"lib"in e?o=()=>Promise.resolve(e.lib):o=()=>Promise.resolve(()=>{R(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(s=e.shareConfig)!=null&&s.eager&&((i=e.treeShaking)!=null&&i.mode)&&R(`Invalid shared config for "${r}" 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:o,loaded:e!=null&&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??n)||"version-first",treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??we.UNKNOWN,useIn:[]}:void 0}}function Et(e,t){const r=t.shared||{},n=t.name,o=Object.keys(r).reduce((i,a)=>{const c=at(r[a]);return i[a]=i[a]||[],c.forEach(l=>{i[a].push(Fr(l,n,a,t.shareStrategy))}),i},{}),s={...e.shared};return Object.keys(o).forEach(i=>{s[i]?o[i].forEach(a=>{s[i].find(c=>c.version===a.version)||s[i].push(a)}):s[i]=o[i]}),{allShareInfos:s,newShareInfos:o}}function te(e,t){if(!e)return!1;const{status:r,mode:n}=e;return r===we.NO_USE?!1:r===we.CALCULATED?!0:n==="runtime-infer"?t?Gr(e,t):!0:!1}function U(e,t){const r=n=>{if(!Number.isNaN(Number(n))){const o=n.split(".");let s=n;for(let i=0;i<3-o.length;i++)s+=".0";return s}return n};return!!Z(r(e),`<=${r(t)}`)}const re=(e,t)=>{const r=t||function(n,o){return U(n,o)};return Object.keys(e).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},de=e=>!!e.loaded||typeof e.lib=="function",Cr=e=>!!e.loading,Gr=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(n=>r.includes(n)):!1};function xr(e,t,r,n){const o=e[t][r];let s="",i=te(n);const a=function(c,l){return i?o[c].treeShaking?o[l].treeShaking?!de(o[c].treeShaking)&&U(c,l):!1:!0:!de(o[c])&&U(c,l)};if(i){if(s=re(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:re(e[t][r],a),useTreesShaking:i}}const W=e=>de(e)||Cr(e);function Ur(e,t,r,n){const o=e[t][r];let s="",i=te(n);const a=function(c,l){if(i){if(!o[c].treeShaking)return!0;if(!o[l].treeShaking)return!1;if(W(o[l].treeShaking))return W(o[c].treeShaking)?!!U(c,l):!0;if(W(o[c].treeShaking))return!1}return W(o[l])?W(o[c])?!!U(c,l):!0:W(o[c])?!1:U(c,l)};if(i){if(s=re(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:re(e[t][r],a),useTreesShaking:i}}function Br(e){return e==="loaded-first"?Ur:xr}function Y(e,t,r,n,o){if(!e)return;const{shareConfig:s,scope:i=oe,strategy:a,treeShaking:c}=r,l=Array.isArray(i)?i:[i];for(const f of l)if(s&&e[f]&&e[f][t]){const{requiredVersion:u}=s,{version:h,useTreesShaking:m}=Br(a)(e,f,t,c),d=()=>{const y=e[f][t][h];if(s.singleton){if(typeof u=="string"&&!Z(h,u)){const E=`Version ${h} from ${h&&y.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;s.strictVersion?R(E):Q(E)}return{shared:y,useTreesShaking:m}}else{if(u===!1||u==="*")return{shared:y,useTreesShaking:m};if(Z(h,u))return{shared:y,useTreesShaking:m};const E=te(c);if(E){for(const[_,g]of Object.entries(e[f][t]))if(te(g.treeShaking,c==null?void 0:c.usedExports)&&Z(_,u))return{shared:g,useTreesShaking:E}}for(const[_,g]of Object.entries(e[f][t]))if(Z(_,u))return{shared:g,useTreesShaking:!1}}},p={shareScopeMap:e,scope:f,pkgName:t,version:h,GlobalFederation:me.__FEDERATION__,shareInfo:r,resolver:d,loadContext:o};return(n.emit(p)||p).resolver()}}function Oe(){return me.__FEDERATION__.__SHARE__}function je(e){const{pkgName:t,extraOptions:r,shareInfos:n}=e,o=c=>{if(!c)return;const l={};return c.forEach(u=>{l[u.version]=u}),l[re(l,function(u,h){return!de(l[u])&&U(u,h)})]},s=(r==null?void 0:r.resolver)??o,i=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),a=(...c)=>{const l={};for(const f of c)if(f)for(const[u,h]of Object.entries(f)){const m=l[u];i(m)&&i(h)?l[u]=a(m,h):h!==void 0&&(l[u]=h)}return l};return a(s(n[t]),r==null?void 0:r.customShareInfo)}const V=(e,t)=>{e.useIn||(e.useIn=[]),er(e.useIn,t)};function se(e,t){return t&&e.treeShaking?e.treeShaking:e}function De(e,t){return!t||t==="."?e:`${e}/${t.replace(/^\.\//,"")}`}function qe(e,t){for(const r of e){const n=t.startsWith(r.name);let o=t.replace(r.name,"");if(n){if(o.startsWith("/")){const a=r.name;return o=`.${o}`,{pkgNameOrAlias:a,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const s=r.alias&&t.startsWith(r.alias);let i=r.alias&&t.replace(r.alias,"");if(r.alias&&s){if(i&&i.startsWith("/")){const a=r.alias;return i=`.${i}`,{pkgNameOrAlias:a,expose:i,remote:r}}else if(i==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function Wr(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}const gt="RUNTIME-001",_t="RUNTIME-002",St="RUNTIME-003",Rt="RUNTIME-004",bt="RUNTIME-005",Ne="RUNTIME-006",It="RUNTIME-007",pe="RUNTIME-008",Vr="RUNTIME-009",wt="RUNTIME-010",$t="RUNTIME-011",jr="RUNTIME-012",Tt="RUNTIME-013",At="RUNTIME-014",vt="RUNTIME-015",k={[gt]:"Failed to get remoteEntry exports.",[_t]:'The remote entry interface does not contain "init"',[St]:"Failed to get manifest.",[Rt]:"Failed to locate remote.",[bt]:"Invalid loadShareSync function call from bundler runtime",[Ne]:"Invalid loadShareSync function call from runtime",[It]:"Failed to get remote snapshot.",[pe]:"Failed to load script resources.",[Vr]:"Please call createInstance first.",[wt]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[$t]:"The remoteEntry URL is missing from the remote snapshot.",[jr]:'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.',[Tt]:"The manifest is not a valid Module Federation manifest.",[At]:"The remote does not expose the requested module.",[vt]:"Remote container initialization failed."};({...k});const Nt=".then(callbacks[0]).catch(callbacks[1])",Ke=new WeakMap,qr=["Failed to fetch dynamically imported module","Importing a module script failed","error loading dynamically imported module"];function Kr(e){return e instanceof TypeError?qr.some(t=>e.message.includes(t)):!1}function kt(e){return e==="esm"||e==="module"}async function zr({entry:e,remoteEntryExports:t,name:r,getEntryUrl:n}){return new Promise((o,s)=>{const i=c=>{if(Kr(c)){const l=c instanceof Error?c.message:String(c);try{R(pe,k,{remoteName:r,resourceUrl:a},l)}catch(f){s(f);return}}s(c)},a=n?n(e):e;try{t?o(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${a}")${Nt}`)([o,i]):import(a).then(o).catch(i)}catch(c){R(`Failed to load ESM entry from "${a}". ${c instanceof Error?c.message:String(c)}`)}})}async function Jr({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof __system_context__>"u"?System.import(e).then(r).catch(n):new Function("callbacks",`System.import("${e}")${Nt}`)([r,n])}catch(o){R(`Failed to load SystemJS entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}function Zr(e,t,r){const{remoteEntryKey:n,entryExports:o}=ft(e,t);return o||R(gt,k,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n}),o}async function Xr({name:e,globalName:t,entry:r,remoteInfo:n,loaderHook:o,getEntryUrl:s,resourceContext:i}){const{entryExports:a}=ft(e,t);if(a)return a;const c=s?s(r):r;return Xt(c,{attrs:{},createScriptHook:(l,f)=>{const u=o.lifecycle.createScript.emit({url:l,attrs:f,remoteInfo:n,resourceContext:i?{...i,url:l}:void 0});if(u&&(u instanceof HTMLScriptElement||"script"in u||"timeout"in u))return u}}).then(()=>Zr(e,t,r),l=>{const f=l instanceof Error?l.message:String(l);R(pe,k,{remoteName:e,resourceUrl:c},f)})}async function Yr({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n,resourceContext:o}){const{entry:s,entryGlobalName:i,name:a,type:c}=e;return kt(c)?zr({entry:s,remoteEntryExports:t,name:a,getEntryUrl:n}):c==="system"?Jr({entry:s,remoteEntryExports:t}):Xr({entry:s,globalName:i,name:a,remoteInfo:e,loaderHook:r,getEntryUrl:n,resourceContext:o})}function Lt(e){const{entry:t,name:r}=e;return Xe(r,t)}async function He(e){const{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,resourceContext:s,_inErrorHandling:i=!1}=e,a=Lt(n);if(r)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,remoteEntryExports:r,resourceContext:s,cached:!0}),r;if(!G[a]){const l=t.remoteHandler.hooks.lifecycle.loadEntry,f=t.loaderHook;G[a]=l.emit({origin:t,loaderHook:f,remoteInfo:n,remoteEntryExports:r,resourceContext:s}).then(u=>u||Yr({remoteInfo:n,remoteEntryExports:r,loaderHook:f,getEntryUrl:o,resourceContext:s})).then(async u=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,remoteEntryExports:u,resourceContext:s}),u)).catch(async u=>{const h=u instanceof Error&&u.message.includes("ScriptExecutionError");if(u instanceof Error&&u.message.includes(pe)&&!h&&!i){const m=p=>He({...p,_inErrorHandling:!0}),d=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:m,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:G,uniqueKey:a});if(d)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,remoteEntryExports:d,resourceContext:s,error:u,recovered:!0}),d}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,resourceContext:s,error:u}),u}),Ke.set(G[a],t)}const c=G[a];if(Ke.get(c)!==t)try{const l=await c;return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,remoteEntryExports:l,resourceContext:s}),l}catch(l){throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:n,resourceContext:s,error:l}),l}return c}function j(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||yt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||oe}}function Qr(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function eo(e){const t=new Map;return[...e||[],...ir()].forEach(r=>{r&&(M(it(r),"Plugin configuration is invalid."),M(r.name,"A name must be provided by the plugin."),t.has(r.name)||t.set(r.name,r))}),Array.from(t.values())}function to(e,t){return t===void 0?e:{...t,name:e.name,version:e.version}}function ro(e,t){const r=new Map;t.options.plugins.forEach(o=>{o&&r.set(o.name,o)});const n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return eo(e).forEach(o=>{var i;if(r.set(o.name,o),t.hooks.registerPlugins[o.name])return;const s=to(o,(i=o.apply)==null?void 0:i.call(o,t));n.forEach(a=>{a.applyPlugin(s)})}),Array.from(r.values())}function oo(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 D(e){var r,n,o,s,i,a;const t={};for(const[c,l]of Object.entries(e.shared)){const f=l[0];f&&(t[c]={version:f.version,singleton:(r=f.shareConfig)==null?void 0:r.singleton,requiredVersion:((n=f.shareConfig)==null?void 0:n.requiredVersion)===!1?!1:(o=f.shareConfig)==null?void 0:o.requiredVersion,eager:f.eager,strictVersion:(s=f.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((i=e.remotes)==null?void 0:i.length)>0?"host":"unknown"},mfConfig:{name:e.name,remotes:((a=e.remotes)==null?void 0:a.map(oo))??[],shared:t}}}function Mt(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,recordPreloadedAssets:!0,...e}}function no(e,t){return t.map(r=>{const n=Wr(e,r.nameOrAlias);return M(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&Qe({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Mt(r)}})}function so(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function Fe(e){return e instanceof Error?e.message.includes("timed out")||e.name.includes("Timeout"):!1}function C(e,t,r,n){return{url:t,status:r,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:n}}function Re(e,t,r,n){return r?lr(t)?Promise.resolve(C(e,t,"cached")):(fr(t),n()):n()}async function io(e,t,r,n){const o=e.moduleCache.get(r.name),s=r.entry;if(o!=null&&o.remoteEntryExports)return C(n,s,"cached");try{if(!await He({origin:e,remoteInfo:r,remoteEntryExports:o==null?void 0:o.remoteEntryExports,resourceContext:{...n,url:s}}))throw new Error(`Failed to load remoteEntry "${s}".`);return C(n,s,"success")}catch(i){return C(n,s,Fe(i)?"timeout":"error",i)}}function ie({host:e,remoteInfo:t,url:r,attrs:n,context:o,needDeleteLink:s}){return new Promise(i=>{const{link:a,needAttach:c}=Zt({url:r,cb:()=>{i(C(o,r,c?"success":"cached"))},onErrorCallback:l=>{i(C(o,r,Fe(l)?"timeout":"error",l))},attrs:n,createLinkHook:(l,f)=>{const u=e.loaderHook.lifecycle.createLink.emit({url:l,attrs:f,remoteInfo:t,resourceContext:{...o,url:l}});return u instanceof HTMLLinkElement,u},needDeleteLink:s});c&&document.head.appendChild(a)})}function ao({host:e,remoteInfo:t,url:r,attrs:n,context:o}){return new Promise(s=>{const{script:i,needAttach:a}=ot({url:r,cb:()=>{s(C(o,r,a?"success":"cached"))},onErrorCallback:c=>{s(C(o,r,Fe(c)?"timeout":"error",c))},attrs:n,createScriptHook:(c,l)=>{const f=e.loaderHook.lifecycle.createScript.emit({url:c,attrs:l,remoteInfo:t,resourceContext:{...o,url:c}});return f instanceof HTMLScriptElement,f},needDeleteScript:!0});a&&document.head.appendChild(i)})}function ae(e,t){return{...e,resourceType:t}}function Pt(e,t,r,n=!0,o={initiator:"preloadRemote",id:e.name},s=!0){const{cssAssets:i,jsAssetsWithoutEntry:a,entryAssets:c}=r,l=[];if(t.options.inBrowser){if(c.forEach(h=>{const{moduleInfo:m}=h;l.push(io(t,e,m,ae(o,"remoteEntry")))}),n){const h={rel:"preload",as:"style"};i.forEach(m=>{const d=ae(o,"css");l.push(Re(d,m,s,()=>ie({host:t,remoteInfo:e,url:m,attrs:h,context:d})))})}else{const h={rel:"stylesheet",type:"text/css"};i.forEach(m=>{const d=ae(o,"css");l.push(Re(d,m,s,()=>ie({host:t,remoteInfo:e,url:m,attrs:h,needDeleteLink:!1,context:d})))})}let f=ao,u={fetchpriority:"high",type:"text/javascript"};n?(f=ie,u={rel:"preload",as:"script"}):kt(e.type)&&(f=ie,u={rel:"modulepreload",fetchpriority:"high"}),a.forEach(h=>{const m=ae(o,"js");l.push(Re(m,h,s,()=>f({host:t,remoteInfo:e,url:h,attrs:u,context:m})))})}return Promise.all(l)}const co={getRegisteredShare:Y,getGlobalShareScope:Oe};var lo={share:co};function fo(e){if(!e||!("modules"in e)||!Array.isArray(e.modules))return;const t=e.modules.map(r=>r.moduleName).filter(Boolean);return t.length?t.join(","):void 0}function uo(e,t,r){const n=t,o=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];o.length||o.push("default"),o.forEach(i=>{n[i]||(n[i]={})});const s={version:e.version||"",shareScopeKeys:Array.isArray(e.shareScope)?o:e.shareScope||"default"};return Object.defineProperty(s,"shareScopeMap",{value:n,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:n[o[0]],initScope:r??[]}}var ze=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){const r=t||{initiator:"loadRemote",id:De(this.remoteInfo.name,e),resourceType:"remoteEntry",url:this.remoteInfo.entry,expose:e},n=await He({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:r});return M(n,`remoteEntryExports is undefined
|
|
7
|
+
${Qe(this.remoteInfo)}`),this.remoteEntryExports=n,this.remoteEntryExports}async init(e,t,r,n,o){const s=await this.getEntry(n,o);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:s,cached:!0,origin:this.host}),s;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:s,cached:!0,origin:this.host})}catch(i){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:s,error:i,cached:!0,origin:this.host}),i}return s}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});const{remoteEntryInitOptions:i,shareScope:a,initScope:c}=uo(this.remoteInfo,this.host.shareScopeMap,r),l=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:i,initScope:c,remoteInfo:this.remoteInfo,origin:this.host});typeof(s==null?void 0:s.init)>"u"&&R(_t,k,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,D(this.host.options));try{await s.init(l.shareScope,l.initScope,l.remoteEntryInitOptions)}catch(f){R(vt,k,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${f}`,D(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...l,id:e,remoteSnapshot:t,remoteEntryExports:s}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:s,origin:this.host})}catch(i){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:s,error:i,origin:this.host}),i}finally{this.initing=!1,this.initPromise=void 0}return s}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n,void 0,t);this.lib=s,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,origin:this.host});let i;try{const l=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo});i=typeof l=="function"?l:void 0,i||(i=await s.get(t)),i||R(At,k,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:fo(n)},void 0,D(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,moduleFactory:i,origin:this.host})}catch(l){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,error:l,origin:this.host}),l}const a=rr(this.remoteInfo.name,t),c=this.wraperFactory(i,a);if(!o)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:o,origin:this.host});try{const l=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:o,exposeModule:l,origin:this.host}),l}catch(l){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:o,error:l,origin:this.host}),l}}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return()=>{const n=e();return n instanceof Promise?n.then(o=>(r(o,t),o)):(r(n,t),n)}}},H=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e){M(it(e),"Plugin configuration is invalid.");const t=e.name;M(t,"A name must be provided by the plugin."),this.registerPlugins[t]||(this.registerPlugins[t]=e,this.lifecycleKeys.forEach(r=>{const n=e[r];n&&this.lifecycle[r].on(n)}))}removePlugin(e){M(e,"A name is required.");const t=this.registerPlugins[e];M(t,`The plugin "${e}" is not registered.`),this.lifecycleKeys.forEach(r=>{const n=t[r];n&&this.lifecycle[r].remove(n)}),delete this.registerPlugins[e]}},v=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const t=this;this.on(function r(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{const n=r(...e);n!==void 0&&(t=n)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},w=class extends v{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n<r.length?Promise.resolve(r[n++].apply(null,e)).then(i=>i===void 0||e.length===1&&i===e[0]?o(s):o(i)):s;t=o()}return Promise.resolve(t)}};function Ot(e,t){if(!Le(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var q=class extends v{constructor(e){super(),this.onerror=R,this.type=e}emit(e){Le(e)||R(`The data for the "${this.type}" hook should be an object.`);for(const t of this.listeners)try{const r=t(e);if(r===void 0)continue;if(Ot(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){Q(r),this.onerror(r)}return e}},F=class extends v{constructor(e){super(),this.onerror=R,this.type=e}emit(e){Le(e)||R(`The response data for the "${this.type}" hook must be an object.`);const t=Array.from(this.listeners);if(t.length>0){let r=0;const n=s=>(Q(s),this.onerror(s),e),o=s=>{if(s!==void 0&&Ot(e,s))e=s;else if(s!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(i){return n(i)}return e};return Promise.resolve(o(e))}return Promise.resolve(e)}};const J="Remote loading is disabled by experiments.optimization.disableRemote.";var ho=class{constructor(){this.hooks=new H({})}formatAndRegisterRemote(){return[]}loadRemote(){throw new Error(J)}preloadRemote(){throw new Error(J)}registerRemotes(){throw new Error(J)}getRemoteModuleAndOptions(){throw new Error(J)}initRawContainer(){throw new Error(J)}};function Dt(e,t){const r=ct(t);r.url||R($t,k,{remoteName:e.name});let n=Te(t,r.url);e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function mo(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!ke(t)||!st(t)){const{remoteSnapshot:a,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:De(t.name,n)});Dt(s,a);const l=[{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1,recordPreloadedAssets:!0}];await o.remoteHandler.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:l,options:o.options,origin:o});const[f]=l;if(f){const u={remote:t,preloadConfig:f},h=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:u,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:c});h&&Pt(s,o,h,!1,{initiator:"loadRemote",id:i},f.recordPreloadedAssets).catch(()=>{})}return{...e,remoteSnapshot:a}}return e}}}function po(e){const 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 Ht(e,t,r,n,o={},s){const{value:i}=B(e,ee(t)),a=s||i;if(a&&!et(a)&&(r(a,t,n),a.remotesInfo)){const c=Object.keys(a.remotesInfo);for(const l of c){if(o[l])continue;o[l]=!0;const f=po(l),u=a.remotesInfo[l];Ht(e,{name:f.name,version:u.matchedVersion},r,!1,o,void 0)}}}const be=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function yo(e,t,r,n,o){const s=[],i=[],a=[],c=new Set,l=new Set,{options:f}=e,{preloadConfig:u}=t,{depsRemote:h}=u;if(Ht(n,r,(d,p,y)=>{var $;let E;if(y)E=u;else if(Array.isArray(h)){const A=h.find(T=>T.nameOrAlias===p.name||T.nameOrAlias===p.alias);if(!A)return;E=Mt(A)}else if(h===!0)E=u;else return;const _=Te(d,ct(d).url);_&&a.push({name:p.name,moduleInfo:{name:p.name,entry:_,type:"remoteEntryType"in d?d.remoteEntryType:"global",entryGlobalName:"globalName"in d?d.globalName:p.name,shareScope:"",version:"version"in d?d.version:void 0},url:_});let g="modules"in d?d.modules:[];const S=so(E.exposes);S.length&&"modules"in d&&(g=($=d==null?void 0:d.modules)==null?void 0:$.reduce((A,T)=>((S==null?void 0:S.indexOf(T.moduleName))!==-1&&A.push(T),A),[]));function b(A){const T=A.map(L=>Te(d,L));return E.filter?T.filter(E.filter):T}if(g){const A=g.length;for(let T=0;T<A;T++){const L=g[T],ye=`${p.name}/${L.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:L.moduleName==="."?p.name:ye,name:p.name,remoteSnapshot:d,preloadConfig:E,remote:p,origin:e}),!ar(ye)&&(E.resourceCategory==="all"?(s.push(...b(L.assets.css.async)),s.push(...b(L.assets.css.sync)),i.push(...b(L.assets.js.async)),i.push(...b(L.assets.js.sync))):E.resourceCategory==="sync"&&(s.push(...b(L.assets.css.sync)),i.push(...b(L.assets.js.sync))),cr(ye))}}},!0,{},o),o.shared&&o.shared.length>0){const d=(p,y)=>{const{shared:E}=Y(e.shareScopeMap,y.sharedName,p,e.sharedHandler.hooks.lifecycle.resolveShare)||{};E&&typeof E.lib=="function"&&(y.assets.js.sync.forEach(_=>{c.add(_)}),y.assets.css.sync.forEach(_=>{l.add(_)}))};o.shared.forEach(p=>{var _;const y=(_=f.shared)==null?void 0:_[p.sharedName];if(!y)return;const E=p.version?y.find(g=>g.version===p.version):y;E&&at(E).forEach(g=>{d(g,p)})})}const m=i.filter(d=>!c.has(d)&&!be("script",d));return{cssAssets:s.filter(d=>!l.has(d)&&!be("link",d)),jsAssetsWithoutEntry:m,entryAssets:a.filter(d=>!be("script",d.url))}}const Eo=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return ke(o)&&st(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(Dt(n,i),yo(t,r,n,s,i))}}};function Ft(e,t){const r=fe({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&B(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:Ce(),remoteSnapshot:fe({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Ce(),remoteSnapshot:fe({name:e.name,version:"version"in e?e.version:void 0})}}var go=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new H({beforeLoadRemoteSnapshot:new w("beforeLoadRemoteSnapshot"),loadSnapshot:new F("loadGlobalSnapshot"),loadRemoteSnapshot:new F("loadRemoteSnapshot"),afterLoadSnapshot:new F("afterLoadSnapshot"),beforeLoadManifest:new w("beforeLoadManifest"),afterLoadManifest:new w("afterLoadManifest")}),this.manifestLoading=me.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:r="loadRemote"}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e,origin:this.HostInstance});let o=fe({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},sr({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!B(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o==null?void 0:o.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let f,u;if(c)if(et(c)){const h=c.remoteEntry,m=await this.loadManifestSnapshot(h,e,{},{initiator:r,id:t||e.name}),d=Ge({...e,entry:h},m);f=m,u=d}else{const{remoteSnapshot:h}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});f=h,u=l}else if(ke(e)){const h=await this.loadManifestSnapshot(e.entry,e,{},{initiator:r,id:t||e.name}),m=Ge(e,h);f=h,u=m}else R(It,k,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,D(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:f}),{remoteSnapshot:f,globalSnapshot:u}}getGlobalRemoteInfo(e){return Ft(e,this.HostInstance)}async getManifestJson(e,t,r,n){return(async()=>{const s=j(t);let i=this.manifestCache.get(e);if(i)return await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:n,manifestJson:i,cached:!0,origin:this.HostInstance}),i;await this.hooks.lifecycle.beforeLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:n,origin:this.HostInstance});let a,c,l=!1;try{let h=await this.loaderHook.lifecycle.fetch.emit(e,{},s,n?{...n,url:e,resourceType:"manifest"}:void 0);(!h||!(h instanceof Response))&&(h=await fetch(e,{})),a=h,i=await h.json()}catch(h){c=h,i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:h,from:"runtime",lifecycle:"afterResolve",remote:s,origin:this.HostInstance}),i||(delete this.manifestLoading[e],await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:n,response:a,error:h,origin:this.HostInstance}),R(St,k,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${h}`,D(this.HostInstance.options))),l=!0}const f=[!i.metaData&&"metaData",!i.exposes&&"exposes",!i.shared&&"shared"].filter(Boolean),u=f.length>0?new Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${f.join(", ")}.`):void 0;return u&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:u,from:"runtime",lifecycle:"afterResolve",remote:s,origin:this.HostInstance}),await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:n,manifestJson:i,response:a,error:u||c,recovered:u?void 0:l||void 0,origin:this.HostInstance}),u&&R(Tt,k,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:f.join(",")},void 0,D(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,r,n){const o=async()=>{const s=await this.getManifestJson(e,t,r,n),i=Vt(s,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=o().then(s=>s)),this.manifestLoading[e]}},_o=class{constructor(){this.hooks=new H({})}},So=class{constructor(e){this.hooks=new H({beforeRegisterShare:new q("beforeRegisterShare"),afterRegisterShare:new v("afterRegisterShare"),afterResolve:new F("afterResolve"),beforeLoadShare:new F("beforeLoadShare"),loadShare:new w,afterLoadShare:new v("afterLoadShare"),errorLoadShare:new v("errorLoadShare"),resolveShare:new q("resolveShare"),initContainerShareScopeMap:new q("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:r,selectedShared:n,loadContext:o}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:r,selectedShared:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,loadContext:o,origin:this.host})}catch(s){Q(s)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:r,error:n,recovered:o,loadContext:s}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:n,recovered:o,loadContext:s})}catch(i){Q(i)}}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=Et(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{var l,f,u;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s});const a=(l=this.shareScopeMap[i])==null?void 0:l[o],c=a==null?void 0:a[s.version];a||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name}),this.emitAfterRegisterShare(o,{scope:i,shared:s,previousShared:c,registeredShared:(u=(f=this.shareScopeMap[i])==null?void 0:f[o])==null?void 0:u[s.version],trigger:"runtime"})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this;let n=t==null?void 0:t.context;const o=je({pkgName:e,extraOptions:t,shareInfos:r.options.shared});let s=o;try{o!=null&&o.scope&&await Promise.all(o.scope.map(async f=>{await Promise.all(this.initializeSharing(f,{strategy:o.strategy,context:n}))}));const i=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:r.options.shared,origin:r,loadContext:n});s=i.shareInfo,n=i.loadContext||n,M(s,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);const a=s,{shared:c,useTreesShaking:l}=Y(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare,n)||{};if(c){const f=se(c,l);if(f.lib)return V(f,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:a,selectedShared:c,loadContext:n}),f.lib;if(f.loading&&!f.loaded){const u=await f.loading;return f.loaded=!0,f.lib||(f.lib=u),V(f,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:a,selectedShared:c,loadContext:n}),u}else{const h=(async()=>{const d=await f.get();return V(f,r.options.name),f.loaded=!0,f.lib=d,d})();this.setShared({pkgName:e,loaded:!1,shared:c,from:r.options.name,lib:null,loading:h,treeShaking:l?f:void 0});const m=await h;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:a,selectedShared:c,loadContext:n}),m}}else{if(t!=null&&t.customShareInfo)return this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:a,recovered:!0,loadContext:n}),!1;const f=te(a.treeShaking),u=se(a,f),m=(async()=>{const p=await u.get();u.lib=p,u.loaded=!0,V(u,r.options.name);const{shared:y,useTreesShaking:E}=Y(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare,n)||{};if(y){const _=se(y,E);_.lib=p,_.loaded=!0,y.from=a.from}return p})();this.setShared({pkgName:e,loaded:!1,shared:a,from:r.options.name,lib:null,loading:m,treeShaking:f?u:void 0});const d=await m;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:a,selectedShared:a,loadContext:n}),d}}catch(i){throw this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,error:i,loadContext:n}),i}}initializeSharing(e=oe,t){var m;const{host:r}=this,n=t==null?void 0:t.from,o=t==null?void 0:t.strategy,s=((m=t==null?void 0:t.context)==null?void 0:m.trigger)||n||"runtime";let i=t==null?void 0:t.initScope;const a=[];if(n!=="build"){const{initTokens:d}=this;i||(i=[]);let p=d[e];if(p||(p=d[e]={from:this.host.name}),i.indexOf(p)>=0)return a;i.push(p)}const c=this.shareScopeMap,l=r.options.name;c[e]||(c[e]={});const f=c[e],u=(d,p)=>{var $;const{version:y,eager:E}=p;f[d]=f[d]||{};const _=f[d],g=_[y],S=g&&se(g),b=!!(S&&("eager"in S&&S.eager||"shareConfig"in S&&(($=S.shareConfig)!=null&&$.eager)));(!S||S.strategy!=="loaded-first"&&!S.loaded&&(!E!=!b?E:l>_[y].from))&&(_[y]=p),this.emitAfterRegisterShare(d,{scope:e,shared:p,previousShared:g,registeredShared:_[y],trigger:s})},h=async d=>{const{module:p}=await r.remoteHandler.getRemoteModuleAndOptions({id:d});let y;const E={initiator:"loadShare",id:d,resourceType:"remoteEntry",url:p.remoteInfo.entry};try{y=await p.getEntry(void 0,E)}catch(_){if(y=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:d,error:_,from:"runtime",lifecycle:"beforeLoadShare",remote:p.remoteInfo,origin:r}),!y)return}finally{y!=null&&y.init&&!p.initing&&(p.remoteEntryExports=y,await p.init(void 0,void 0,i,void 0,E))}};return Object.keys(r.options.shared).forEach(d=>{r.options.shared[d].forEach(p=>{p.scope.includes(e)&&u(d,p)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(d=>{d.shareScope===e&&a.push(h(d.name))}),a}loadShareSync(e,t){const{host:r}=this,n=t==null?void 0:t.context,o=je({pkgName:e,extraOptions:t,shareInfos:r.options.shared});try{o!=null&&o.scope&&o.scope.forEach(i=>{this.initializeSharing(i,{strategy:o.strategy,from:t==null?void 0:t.from,context:n})});const{shared:s}=Y(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare,n)||{};if(s){if(typeof s.lib=="function")return V(s,r.options.name),s.loaded||(s.loaded=!0,s.from===r.options.name&&(o.loaded=!0)),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:s,loadContext:n}),s.lib;if(typeof s.get=="function"){const i=s.get();if(!(i instanceof Promise))return V(s,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:s}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:s,loadContext:n}),i}}if(o.lib)return o.loaded||(o.loaded=!0),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o,loadContext:n}),o.lib;if(o.get){const i=o.get();return i instanceof Promise&&R((t==null?void 0:t.from)==="build"?bt:Ne,k,{hostName:r.options.name,sharedPkgName:e},void 0,D(r.options)),o.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:o.lib,shared:o}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o,loadContext:n}),o.lib}R(Ne,k,{hostName:r.options.name,sharedPkgName:e},void 0,D(r.options))}catch(s){throw this.emitErrorLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,error:s,loadContext:n}),s}}initShareScopeMap(e,t,r={}){const{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:n,loading:o,loaded:s,get:i,treeShaking:a}){const{version:c,scope:l="default",...f}=t,u=Array.isArray(l)?l:[l],h=m=>{const d=(y,E,_)=>{_&&!y[E]&&(y[E]=_)},p=a?m.treeShaking:m;d(p,"loaded",s),d(p,"loading",o),d(p,"get",i),d(p,"lib",n)};u.forEach(m=>{this.shareScopeMap[m]||(this.shareScopeMap[m]={}),this.shareScopeMap[m][e]||(this.shareScopeMap[m][e]={}),this.shareScopeMap[m][e][c]||(this.shareScopeMap[m][e][c]={version:c,scope:[m],...f,lib:n});const d=this.shareScopeMap[m][e][c];h(d),r&&d.from!==r&&(d.from=r)})}_setGlobalShareScopeMap(e){const t=Oe(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}},Ro=class{constructor(){this.shareScopeMap={},this.hooks=new H({afterResolve:new F("afterResolve")})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.")}loadShareSync(){throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.")}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},bo=class{constructor(e){this.hooks=new H({beforeRegisterRemote:new q("beforeRegisterRemote"),registerRemote:new q("registerRemote"),beforeRequest:new F("beforeRequest"),afterMatchRemote:new w("afterMatchRemote"),onLoad:new w("onLoad"),afterLoadRemote:new w("afterLoadRemote"),handlePreloadModule:new v("handlePreloadModule"),errorLoadRemote:new w("errorLoadRemote"),beforePreloadRemote:new w("beforePreloadRemote"),generatePreloadAssets:new w("generatePreloadAssets"),afterPreloadRemote:new w("afterPreloadRemote"),loadEntry:new w}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this,n=qe(r.options.remotes,e);let o=e,s=n==null?void 0:n.expose,i=n?j(n.remote):void 0,a;try{const{loadFactory:c=!0}=t||{loadFactory:!0},{module:l,moduleOptions:f,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:h,remote:m,expose:d,id:p,remoteSnapshot:y}=u;o=p,s=d,i=j(m);const E=await l.get(p,d,t,y),_=await this.hooks.lifecycle.onLoad.emit({id:p,pkgNameOrAlias:h,expose:d,exposeModule:c?E:void 0,exposeModuleFactory:c?void 0:E,remote:m,options:f,moduleInstance:l,origin:r});return this.setIdToRemoteMap(e,u),a={id:o,expose:s,remote:i,options:t,origin:r},typeof _=="function"?_:E}catch(c){const{from:l="runtime"}=t||{from:"runtime"};let f;try{f=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:l,lifecycle:"onLoad",expose:s,remote:i,origin:r})}catch(u){throw a={id:o,expose:s,remote:i,options:t,error:u,origin:r},u}if(!f)throw a={id:o,expose:s,remote:i,options:t,error:c,origin:r},c;return a={id:o,expose:s,remote:i,options:t,error:c,origin:r,recovered:!0},f}finally{a&&await this.hooks.lifecycle.afterLoadRemote.emit(a)}}async preloadRemote(e){const{host:t}=this,r=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const n=no(t.options.remotes,e),o=a=>{const{preloadConfig:c,remote:l}=a,f=c.exposes||[];return f.length?f.map(u=>({ops:{...a,preloadConfig:{...c,exposes:[u]}},id:De(l.name,u)})):[{ops:a,id:`${l.name}/*`}]};let s;await Promise.all(n.flatMap(o).map(async a=>{const{ops:c,id:l}=a,{remote:f,preloadConfig:u}=c,h=j(f);try{const{globalSnapshot:m,remoteSnapshot:d}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:f,id:l,initiator:"preloadRemote"}),p=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:c,remote:f,remoteInfo:h,globalSnapshot:m,remoteSnapshot:d});if(!p)return;const y=await Pt(h,t,p,!0,{initiator:"preloadRemote",id:l},u.recordPreloadedAssets);r.push({remote:f,remoteInfo:h,preloadConfig:u,id:l,results:y})}catch(m){r.push({remote:f,remoteInfo:h,preloadConfig:u,id:l,results:[{url:h.entry,status:"error",resourceType:/\.json(?:$|[?#])/i.test(h.entry)?"manifest":"remoteEntry",initiator:"preloadRemote",id:l,error:m}]})}}));const i=r.flatMap(a=>a.results.filter(c=>c.status==="error"||c.status==="timeout"));if(i.length>0&&(s=new Error(`preloadRemote failed to load ${i.length} resource(s).`),Object.assign(s,{results:r,failedResults:i})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:r,error:s}),s)throw s}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t==null?void 0:t.force})})}initRawContainer(e,t,r){const{host:n}=this,o=new ze({host:n,remoteInfo:j({name:e,entry:t})});return o.remoteEntryExports=r,n.moduleCache.set(e,o),o}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(m){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:m,lifecycle:"beforeRequest"}),!n)throw m}const{id:o}=n,s=qe(t.options.remotes,o);if(!s)try{R(Rt,k,{hostName:t.options.name,requestId:o},void 0,D(t.options))}catch(m){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:o,options:t.options,error:m,origin:t}),m}const{remote:i}=s,a=j(i);await this.hooks.lifecycle.afterMatchRemote.emit({id:o,...s,options:t.options,remoteInfo:a,origin:t});const c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:l,expose:f}=c;M(l&&f,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let u=t.moduleCache.get(l.name);const h={host:t,remoteInfo:a};return u||(u=new ze(h),t.moduleCache.set(l.name,u)),{module:u,moduleOptions:h,remoteMatchInfo:c}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>{var c;return e.alias&&(a.name.startsWith(e.alias)||((c=a.alias)==null?void 0:c.startsWith(e.alias)))});M(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.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||(e.shareScope=oe),e.type||(e.type=yt)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r!=null&&r.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),Ye(i.join(" ")))}}removeRemote(e){var t;try{const{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(c=>c.name===n);o!==-1&&r.options.remotes.splice(o,1);const s=B(I.__FEDERATION__.moduleInfo,ee(e)).key;delete I.__FEDERATION__.moduleInfo[s],"entry"in e&&(r.snapshotHandler.manifestCache.delete(e.entry),delete me.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);const{hostGlobalSnapshot:i}=Ft(e,r);if(i){const c=i&&"remotesInfo"in i&&i.remotesInfo&&B(i.remotesInfo,e.name).key;c&&delete i.remotesInfo[c]}const a=r.moduleCache.get(e.name);if(a){const c=a.remoteInfo,l=c.entryGlobalName;I[l]&&((t=Object.getOwnPropertyDescriptor(I,l))!=null&&t.configurable?delete I[l]:I[l]=void 0);const f=Lt(a.remoteInfo);G[f]&&delete G[f];let u=c.buildVersion?Xe(c.name,c.buildVersion):c.name;const h=I.__FEDERATION__.__INSTANCES__.findIndex(m=>c.buildVersion?m.options.id===u:m.name===u);if(h!==-1){const m=I.__FEDERATION__.__INSTANCES__[h];u=m.options.id||u;const d=Oe();let p=!0;const y=[];Object.keys(d).forEach(E=>{const _=d[E];_&&Object.keys(_).forEach(g=>{const S=_[g];S&&Object.keys(S).forEach(b=>{const $=S[b];$&&Object.keys($).forEach(A=>{const T=$[A];T&&typeof T=="object"&&T.from===c.name&&(T.loaded||T.loading?(T.useIn=T.useIn.filter(L=>L!==c.name),T.useIn.length?p=!1:y.push([E,g,b,A])):y.push([E,g,b,A]))})})})}),p&&(m.shareScopeMap={},delete d[u]),y.forEach(([E,_,g,S])=>{var b,$,A;(A=($=(b=d[E])==null?void 0:b[_])==null?void 0:$[g])==null||delete A[S]}),I.__FEDERATION__.__INSTANCES__.splice(h,1)}r.moduleCache.delete(e.name)}}catch(r){ve.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};const Io=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0,Ie=typeof FEDERATION_OPTIMIZE_NO_REMOTE=="boolean"?!FEDERATION_OPTIMIZE_NO_REMOTE:!0,Je=typeof FEDERATION_OPTIMIZE_NO_SHARED=="boolean"?!FEDERATION_OPTIMIZE_NO_SHARED:!0;var Ao=class{constructor(e){this.hooks=new H({beforeInit:new q("beforeInit"),init:new v,beforeInitContainer:new F("beforeInitContainer"),initContainer:new F("initContainer")}),this.version="2.9.0",this.moduleCache=new Map,this.loaderHook=new H({getModuleInfo:new v,createScript:new v,createLink:new v,fetch:new w,loadEntryError:new w,afterLoadEntry:new w("afterLoadEntry"),beforeInitRemote:new w("beforeInitRemote"),afterInitRemote:new w("afterInitRemote"),beforeGetExpose:new w("beforeGetExpose"),afterGetExpose:new w("afterGetExpose"),beforeExecuteFactory:new w("beforeExecuteFactory"),afterExecuteFactory:new w("afterExecuteFactory"),getModuleFactory:new w}),this.bridgeHook=new H({beforeBridgeRender:new v,afterBridgeRender:new v,beforeBridgeDestroy:new v,afterBridgeDestroy:new v,afterBridgeRouteSync:new v});const t=Ie&&Io?[mo(),Eo()]:[],r={id:Qr(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:Ze};this.name=e.name,this.options=r,this.snapshotHandler=Ie?new go(this):new _o,this.sharedHandler=Je?new So(this):new Ro,this.remoteHandler=Ie?new bo(this):new ho,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&R(nt(wt,k)),this.registerPlugins(e.plugins);const 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=oe,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){return this.remoteHandler.initRawContainer(e,t,r)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){const r=Je?Et(e,t).allShareInfos:{},{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(l=>{a.includes(l)||a.push(l)});const c={...e,...t,plugins:a,remotes:s,shared:i,id:n.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){this.options.plugins=ro(e,this)}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};const vo=lo;export{I as C,Ao as M,To as a,$o as g,vo as h,wo as s};
|