@signalk/server-admin-ui 2.21.0 → 2.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./bootstrap-D-Os68-G.js","./adminUI__loadShare__react__loadShare__.mjs--w0ddnpC.js","./runtimeInit-Baie1-Qs.js","./adminUI__loadShare__react_mf_2_dom__loadShare__.mjs-Bd7rzsY6.js","./adminUI__loadShare__react__loadShare__.mjs_commonjs-proxy-CRC2LUlp.js","./preload-helper-Ct5FWWRu.js","./index-CHqwNyl4.js"])))=>i.map(i=>d[i]);
2
+ import{_ as n}from"./preload-helper-Ct5FWWRu.js";import"./index-CHqwNyl4.js";import"./runtimeInit-Baie1-Qs.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=s(e);fetch(e.href,r)}})();n(()=>import("./bootstrap-D-Os68-G.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);
3
+ //# sourceMappingURL=index-ByslkIyw.js.map
@@ -1,4 +1,4 @@
1
- import{g as L}from"./_commonjsHelpers-D6-XlEtG.js";import{o as N}from"./index-LtR7LJbL.js";function T(e,r){for(var t=0;t<r.length;t++){const o=r[t];if(typeof o!="string"&&!Array.isArray(o)){for(const n in o)if(n!=="default"&&!(n in e)){const f=Object.getOwnPropertyDescriptor(o,n);f&&Object.defineProperty(e,n,f.get?f:{enumerable:!0,get:()=>o[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var P={exports:{}},u={};/** @license React v16.14.0
1
+ function L(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import{o as N}from"./index-LtR7LJbL.js";function T(e,r){for(var t=0;t<r.length;t++){const o=r[t];if(typeof o!="string"&&!Array.isArray(o)){for(const n in o)if(n!=="default"&&!(n in e)){const f=Object.getOwnPropertyDescriptor(o,n);f&&Object.defineProperty(e,n,f.get?f:{enumerable:!0,get:()=>o[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var P={exports:{}},u={};/** @license React v16.14.0
2
2
  * react.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,4 +6,4 @@ import{g as L}from"./_commonjsHelpers-D6-XlEtG.js";import{o as N}from"./index-Lt
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */var x=N,s=typeof Symbol=="function"&&Symbol.for,d=s?Symbol.for("react.element"):60103,V=s?Symbol.for("react.portal"):60106,z=s?Symbol.for("react.fragment"):60107,B=s?Symbol.for("react.strict_mode"):60108,H=s?Symbol.for("react.profiler"):60114,W=s?Symbol.for("react.provider"):60109,Y=s?Symbol.for("react.context"):60110,G=s?Symbol.for("react.forward_ref"):60112,J=s?Symbol.for("react.suspense"):60113,K=s?Symbol.for("react.memo"):60115,Q=s?Symbol.for("react.lazy"):60116,E=typeof Symbol=="function"&&Symbol.iterator;function m(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t<arguments.length;t++)r+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j={};function a(e,r,t){this.props=e,this.context=r,this.refs=j,this.updater=t||R}a.prototype.isReactComponent={};a.prototype.setState=function(e,r){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(m(85));this.updater.enqueueSetState(this,e,r,"setState")};a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function O(){}O.prototype=a.prototype;function $(e,r,t){this.props=e,this.context=r,this.refs=j,this.updater=t||R}var w=$.prototype=new O;w.constructor=$;x(w,a.prototype);w.isPureReactComponent=!0;var k={current:null},A=Object.prototype.hasOwnProperty,b={key:!0,ref:!0,__self:!0,__source:!0};function I(e,r,t){var o,n={},f=null,i=null;if(r!=null)for(o in r.ref!==void 0&&(i=r.ref),r.key!==void 0&&(f=""+r.key),r)A.call(r,o)&&!b.hasOwnProperty(o)&&(n[o]=r[o]);var l=arguments.length-2;if(l===1)n.children=t;else if(1<l){for(var c=Array(l),p=0;p<l;p++)c[p]=arguments[p+2];n.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)n[o]===void 0&&(n[o]=l[o]);return{$$typeof:d,type:e,key:f,ref:i,props:n,_owner:k.current}}function X(e,r){return{$$typeof:d,type:e.type,key:r,ref:e.ref,props:e.props,_owner:e._owner}}function C(e){return typeof e=="object"&&e!==null&&e.$$typeof===d}function Z(e){var r={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(t){return r[t]})}var U=/\/+/g,v=[];function D(e,r,t,o){if(v.length){var n=v.pop();return n.result=e,n.keyPrefix=r,n.func=t,n.context=o,n.count=0,n}return{result:e,keyPrefix:r,func:t,context:o,count:0}}function F(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>v.length&&v.push(e)}function g(e,r,t,o){var n=typeof e;(n==="undefined"||n==="boolean")&&(e=null);var f=!1;if(e===null)f=!0;else switch(n){case"string":case"number":f=!0;break;case"object":switch(e.$$typeof){case d:case V:f=!0}}if(f)return t(o,e,r===""?"."+h(e,0):r),1;if(f=0,r=r===""?".":r+":",Array.isArray(e))for(var i=0;i<e.length;i++){n=e[i];var l=r+h(n,i);f+=g(n,l,t,o)}else if(e===null||typeof e!="object"?l=null:(l=E&&e[E]||e["@@iterator"],l=typeof l=="function"?l:null),typeof l=="function")for(e=l.call(e),i=0;!(n=e.next()).done;)n=n.value,l=r+h(n,i++),f+=g(n,l,t,o);else if(n==="object")throw t=""+e,Error(m(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t,""));return f}function _(e,r,t){return e==null?0:g(e,"",r,t)}function h(e,r){return typeof e=="object"&&e!==null&&e.key!=null?Z(e.key):r.toString(36)}function ee(e,r){e.func.call(e.context,r,e.count++)}function re(e,r,t){var o=e.result,n=e.keyPrefix;e=e.func.call(e.context,r,e.count++),Array.isArray(e)?S(e,o,t,function(f){return f}):e!=null&&(C(e)&&(e=X(e,n+(!e.key||r&&r.key===e.key?"":(""+e.key).replace(U,"$&/")+"/")+t)),o.push(e))}function S(e,r,t,o,n){var f="";t!=null&&(f=(""+t).replace(U,"$&/")+"/"),r=D(r,f,o,n),_(e,re,r),F(r)}var M={current:null};function y(){var e=M.current;if(e===null)throw Error(m(321));return e}var te={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:x};u.Children={map:function(e,r,t){if(e==null)return e;var o=[];return S(e,o,null,r,t),o},forEach:function(e,r,t){if(e==null)return e;r=D(null,null,r,t),_(e,ee,r),F(r)},count:function(e){return _(e,function(){return null},null)},toArray:function(e){var r=[];return S(e,r,null,function(t){return t}),r},only:function(e){if(!C(e))throw Error(m(143));return e}};u.Component=a;u.Fragment=z;u.Profiler=H;u.PureComponent=$;u.StrictMode=B;u.Suspense=J;u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te;u.cloneElement=function(e,r,t){if(e==null)throw Error(m(267,e));var o=x({},e.props),n=e.key,f=e.ref,i=e._owner;if(r!=null){if(r.ref!==void 0&&(f=r.ref,i=k.current),r.key!==void 0&&(n=""+r.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in r)A.call(r,c)&&!b.hasOwnProperty(c)&&(o[c]=r[c]===void 0&&l!==void 0?l[c]:r[c])}var c=arguments.length-2;if(c===1)o.children=t;else if(1<c){l=Array(c);for(var p=0;p<c;p++)l[p]=arguments[p+2];o.children=l}return{$$typeof:d,type:e.type,key:n,ref:f,props:o,_owner:i}};u.createContext=function(e,r){return r===void 0&&(r=null),e={$$typeof:Y,_calculateChangedBits:r,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:W,_context:e},e.Consumer=e};u.createElement=I;u.createFactory=function(e){var r=I.bind(null,e);return r.type=e,r};u.createRef=function(){return{current:null}};u.forwardRef=function(e){return{$$typeof:G,render:e}};u.isValidElement=C;u.lazy=function(e){return{$$typeof:Q,_ctor:e,_status:-1,_result:null}};u.memo=function(e,r){return{$$typeof:K,type:e,compare:r===void 0?null:r}};u.useCallback=function(e,r){return y().useCallback(e,r)};u.useContext=function(e,r){return y().useContext(e,r)};u.useDebugValue=function(){};u.useEffect=function(e,r){return y().useEffect(e,r)};u.useImperativeHandle=function(e,r,t){return y().useImperativeHandle(e,r,t)};u.useLayoutEffect=function(e,r){return y().useLayoutEffect(e,r)};u.useMemo=function(e,r){return y().useMemo(e,r)};u.useReducer=function(e,r,t){return y().useReducer(e,r,t)};u.useRef=function(e){return y().useRef(e)};u.useState=function(e){return y().useState(e)};u.version="16.14.0";P.exports=u;var q=P.exports;const ne=L(q),le=T({__proto__:null,default:ne},[q]);export{le as i};
9
- //# sourceMappingURL=index-03avmwGu.js.map
9
+ //# sourceMappingURL=index-C5SbDtSm.js.map
@@ -0,0 +1,8 @@
1
+ var Ur={},jt={},_t={},T={},w={},N={};const Wr="federation-manifest.json",Br=".json",jr="FEDERATION_DEBUG",B={AT:"@",HYPHEN:"-",SLASH:"/"},we={[B.AT]:"scope_",[B.HYPHEN]:"_",[B.SLASH]:"__"},Vr={[we[B.AT]]:B.AT,[we[B.HYPHEN]]:B.HYPHEN,[we[B.SLASH]]:B.SLASH},Xr=":",xr="mf-manifest.json",Kr="mf-stats.json",Yr={NPM:"npm",APP:"app"},zr="__MF_DEVTOOLS_MODULE_INFO__",Jr="ENCODE_NAME_PREFIX",Zr=".federation",Qr={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};let en=(function(e){return e[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e})({});N.BROWSER_LOG_KEY=jr;N.ENCODE_NAME_PREFIX=Jr;N.EncodedNameTransformMap=Vr;N.FederationModuleManifest=Wr;N.MANIFEST_EXT=Br;N.MFModuleType=Yr;N.MFPrefetchCommon=Qr;N.MODULE_DEVTOOL_IDENTIFIER=zr;N.ManifestFileName=xr;N.NameTransformMap=we;N.NameTransformSymbol=B;N.SEPARATOR=Xr;N.StatsFileName=Kr;N.TEMP_DIR=Zr;N.TreeShakingStatus=en;var Vt={},Me={},Nt=Object.defineProperty,tn=(e,t)=>{let r={};for(var n in e)Nt(r,n,{get:e[n],enumerable:!0});return t||Nt(r,Symbol.toStringTag,{value:"Module"}),r};Me.__exportAll=tn;(function(e){var r=Me.__exportAll({});Object.defineProperty(e,"ContainerPlugin_exports",{enumerable:!0,get:function(){return r}})})(Vt);var Xt={};(function(e){var r=Me.__exportAll({});Object.defineProperty(e,"ContainerReferencePlugin_exports",{enumerable:!0,get:function(){return r}})})(Xt);var xt={};(function(e){var r=Me.__exportAll({});Object.defineProperty(e,"ModuleFederationPlugin_exports",{enumerable:!0,get:function(){return r}})})(xt);var Kt={};(function(e){var r=Me.__exportAll({});Object.defineProperty(e,"SharePlugin_exports",{enumerable:!0,get:function(){return r}})})(Kt);var te={},be={};const rn=N;function Yt(){return typeof window<"u"&&typeof window.document<"u"}function nn(){return typeof navigator<"u"&&navigator?.product==="ReactNative"}function on(){try{if(Yt()&&window.localStorage)return!!localStorage.getItem(rn.BROWSER_LOG_KEY)}catch{return!1}return!1}function sn(){return typeof process<"u"&&be&&be.FEDERATION_DEBUG?!!be.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:on()}const an=function(){return typeof process<"u"&&be?be:{}};te.getProcessEnv=an;te.isBrowserEnv=Yt;te.isDebugMode=sn;te.isReactNativeEnv=nn;var L={};const y=N,lt=te,zt="[ Federation Runtime ]",ln=(e,t,r=y.SEPARATOR)=>{const n=e.split(r),o=lt.getProcessEnv().NODE_ENV==="development"&&t,s="*",i=a=>a.startsWith("http")||a.includes(y.MANIFEST_EXT);if(n.length>=2){let[a,...l]=n;e.startsWith(r)&&(a=n.slice(0,2).join(r),l=[o||n.slice(2).join(r)]);let c=o||l.join(r);return i(c)?{name:a,entry:c}:{name:a,version:c||s}}else if(n.length===1){const[a]=n;return o&&i(o)?{name:a,entry:o}:{name:a,version:o||s}}else throw`Invalid entry value: ${e}`},cn=function(...e){return e.length?e.reduce((t,r)=>r?t?`${t}${y.SEPARATOR}${r}`:r:t,""):""},Et=function(e,t="",r=!1){try{const n=r?".js":"";return`${t}${e.replace(new RegExp(`${y.NameTransformSymbol.AT}`,"g"),y.NameTransformMap[y.NameTransformSymbol.AT]).replace(new RegExp(`${y.NameTransformSymbol.HYPHEN}`,"g"),y.NameTransformMap[y.NameTransformSymbol.HYPHEN]).replace(new RegExp(`${y.NameTransformSymbol.SLASH}`,"g"),y.NameTransformMap[y.NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},un=function(e,t,r){try{let n=e;if(t){if(!n.startsWith(t))return n;n=n.replace(new RegExp(t,"g"),"")}return n=n.replace(new RegExp(`${y.NameTransformMap[y.NameTransformSymbol.AT]}`,"g"),y.EncodedNameTransformMap[y.NameTransformMap[y.NameTransformSymbol.AT]]).replace(new RegExp(`${y.NameTransformMap[y.NameTransformSymbol.SLASH]}`,"g"),y.EncodedNameTransformMap[y.NameTransformMap[y.NameTransformSymbol.SLASH]]).replace(new RegExp(`${y.NameTransformMap[y.NameTransformSymbol.HYPHEN]}`,"g"),y.EncodedNameTransformMap[y.NameTransformMap[y.NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},fn=(e,t)=>{if(!e)return"";let r=e;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),Et(r,"__federation_expose_",t)},dn=(e,t)=>e?Et(e,"__federation_shared_",t):"",hn=(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?!lt.isBrowserEnv()&&!lt.isReactNativeEnv()&&"ssrPublicPath"in e&&typeof e.ssrPublicPath=="string"?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},mn=(e,t)=>{e||Jt(t)},Jt=e=>{throw new Error(`${zt}: ${e}`)},pn=e=>{console.warn(`${zt}: ${e}`)};function gn(e){try{return JSON.stringify(e,null,2)}catch{return""}}const _n=/^([\d^=v<>~]|[*xX]$)/;function En(e){return _n.test(e)}L.assert=mn;L.composeKeyWithSeparator=cn;L.decodeName=un;L.encodeName=Et;L.error=Jt;L.generateExposeFilename=fn;L.generateShareFilename=dn;L.getResourceUrl=hn;L.isRequiredVersion=En;L.parseEntry=ln;L.safeToString=gn;L.warn=pn;var fe={};const Ee=N,Z=(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 Zt(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function yn(e,t={}){const{remotes:r={},overrides:n={},version:o}=t;let s;const i=()=>"publicPath"in e.metaData?(e.metaData.publicPath==="auto"||e.metaData.publicPath==="")&&o?Zt(o):e.metaData.publicPath:e.metaData.getPublicPath,a=Object.keys(n);let l={};Object.keys(r).length||(l=e.remotes?.reduce((g,M)=>{let $;const A=M.federationContainerName;return a.includes(A)?$=n[A]:"version"in M?$=M.version:$=M.entry,g[A]={matchedVersion:$},g},{})||{}),Object.keys(r).forEach(g=>l[g]={matchedVersion:a.includes(g)?n[g]:r[g]});const{remoteEntry:{path:c,name:f,type:d},types:u={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:h},globalName:p,ssrRemoteEntry:m}=e.metaData,{exposes:E}=e;let _={version:o||"",buildVersion:h,globalName:p,remoteEntry:Z(c,f),remoteEntryType:d,remoteTypes:Z(u.path,u.name),remoteTypesZip:u.zip||"",remoteTypesAPI:u.api||"",remotesInfo:l,shared:e?.shared.map(g=>({assets:g.assets,sharedName:g.name,version:g.version,usedExports:g.referenceExports||[]})),modules:E?.map(g=>({moduleName:g.name,modulePath:g.path,assets:g.assets}))};if(e.metaData?.prefetchInterface){const g=e.metaData.prefetchInterface;_={..._,prefetchInterface:g}}if(e.metaData?.prefetchEntry){const{path:g,name:M,type:$}=e.metaData.prefetchEntry;_={..._,prefetchEntry:Z(g,M),prefetchEntryType:$}}if("publicPath"in e.metaData?(s={..._,publicPath:i()},typeof e.metaData.ssrPublicPath=="string"&&(s.ssrPublicPath=e.metaData.ssrPublicPath)):s={..._,getPublicPath:i()},m){const g=Z(m.path,m.name);s.ssrRemoteEntry=g,s.ssrRemoteEntryType=m.type||"commonjs-module"}return s}function Sn(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(Ee.MANIFEST_EXT))}function bn(e){if(!e)return{statsFileName:Ee.StatsFileName,manifestFileName:Ee.ManifestFileName};let t=typeof e=="boolean"?"":e.filePath||"",r=typeof e=="boolean"?"":e.fileName||"";const n=".json",o=a=>a.endsWith(n)?a:`${a}${n}`,s=(a,l)=>a.replace(n,`${l}${n}`),i=r?o(r):Ee.ManifestFileName;return{statsFileName:Z(t,r?s(i,"-stats"):Ee.StatsFileName),manifestFileName:Z(t,i)}}fe.generateSnapshotFromManifest=yn;fe.getManifestFileName=bn;fe.inferAutoPublicPath=Zt;fe.isManifestProvider=Sn;fe.simpleJoinRemoteEntry=Z;var de={};const Mt=te,Qt="[ Module Federation ]",_e=console,Rn=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function In(){try{const e=new Error().stack;if(!e)return;const[,...t]=e.split(`
2
+ `),r=t.filter(n=>!Rn.some(o=>n.includes(o)));return r.length?`Stack trace:
3
+ ${r.slice(0,5).join(`
4
+ `)}`:void 0}catch{return}}var er=class{constructor(e,t=_e){this.prefix=e,this.delegate=t??_e}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??_e}emit(e,t){const r=this.delegate,n=Mt.isDebugMode()?In():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=_e[i];if(typeof a=="function"){a.call(_e,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){Mt.isDebugMode()&&this.emit("debug",e)}};function tr(e){return new er(e)}function rr(e){const t=new er(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function Tn(e,t,r){if(e.__mf_infrastructure_logger__&&t?.getInfrastructureLogger)try{const n=t.getInfrastructureLogger(r);n&&typeof n=="object"&&(typeof n.log=="function"||typeof n.info=="function"||typeof n.warn=="function"||typeof n.error=="function")&&e.setDelegate(n)}catch{e.setDelegate(void 0)}}const Nn=tr(Qt),Mn=rr(Qt);de.bindLoggerToCompiler=Tn;de.createInfrastructureLogger=rr;de.createLogger=tr;de.infrastructureLogger=Mn;de.logger=Nn;var he={};const Pn=L;async function yt(e,t){try{return await e()}catch(r){!t&&Pn.warn(r);return}}function St(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function nr(e){let t=null,r=!0,n=2e4,o;const s=document.getElementsByTagName("script");for(let a=0;a<s.length;a++){const l=s[a],c=l.getAttribute("src");if(c&&St(c,e.url)){t=l,r=!1;break}}if(!t){const a=e.attrs;t=document.createElement("script"),t.type=a?.type==="module"?"module":"text/javascript";let l;e.createScriptHook&&(l=e.createScriptHook(e.url,e.attrs),l instanceof HTMLScriptElement?t=l:typeof l=="object"&&("script"in l&&l.script&&(t=l.script),"timeout"in l&&l.timeout&&(n=l.timeout))),t.src||(t.src=e.url),a&&!l&&Object.keys(a).forEach(c=>{t&&(c==="async"||c==="defer"?t[c]=a[c]:t.getAttribute(c)||t.setAttribute(c,a[c]))})}const i=async(a,l)=>{clearTimeout(o);const c=()=>{l?.type==="error"?e?.onErrorCallback&&e?.onErrorCallback(l):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,yt(()=>{const{needDeleteScript:f=!0}=e;f&&t?.parentNode&&t.parentNode.removeChild(t)}),a&&typeof a=="function")){const f=a(l);if(f instanceof Promise){const d=await f;return c(),d}return c(),f}c()};return t.onerror=i.bind(null,t.onerror),t.onload=i.bind(null,t.onload),o=setTimeout(()=>{i(null,new Error(`Remote script "${e.url}" time-outed.`))},n),{script:t,needAttach:r}}function vn(e){let t=null,r=!0;const n=document.getElementsByTagName("link");for(let s=0;s<n.length;s++){const i=n[s],a=i.getAttribute("href"),l=i.getAttribute("rel");if(a&&St(a,e.url)&&l===e.attrs.rel){t=i,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let s;const i=e.attrs;e.createLinkHook&&(s=e.createLinkHook(e.url,i),s instanceof HTMLLinkElement&&(t=s)),i&&!s&&Object.keys(i).forEach(a=>{t&&!t.getAttribute(a)&&t.setAttribute(a,i[a])})}const o=(s,i)=>{const a=()=>{i?.type==="error"?e?.onErrorCallback&&e?.onErrorCallback(i):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,yt(()=>{const{needDeleteLink:l=!0}=e;l&&t?.parentNode&&t.parentNode.removeChild(t)}),s)){const l=s(i);return a(),l}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),{link:t,needAttach:r}}function An(e,t){const{attrs:r={},createScriptHook:n}=t;return new Promise((o,s)=>{const{script:i,needAttach:a}=nr({url:e,cb:o,onErrorCallback:s,attrs:{fetchpriority:"high",...r},createScriptHook:n,needDeleteScript:!0});a&&document.head.appendChild(i)})}he.createLink=vn;he.createScript=nr;he.isStaticResourcesEqual=St;he.loadScript=An;he.safeWrapper=yt;var bt={};const On=(e,t,r,n)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},$n=(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")};bt.createScriptNode=On;bt.loadScriptNode=$n;var or={};function kn(e,t,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return e?t:!1;if(n===!0)return t;if(n&&typeof n=="object")return{...t,...n};throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}or.normalizeOptions=kn;var sr={};const Fn=e=>e;sr.createModuleFederationConfig=Fn;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=N,r=Vt,n=Xt,o=xt,s=Kt,i=te,a=L,l=fe,c=de,f=he,d=bt,u=or,h=sr;e.BROWSER_LOG_KEY=t.BROWSER_LOG_KEY,e.ENCODE_NAME_PREFIX=t.ENCODE_NAME_PREFIX,e.EncodedNameTransformMap=t.EncodedNameTransformMap,e.FederationModuleManifest=t.FederationModuleManifest,e.MANIFEST_EXT=t.MANIFEST_EXT,e.MFModuleType=t.MFModuleType,e.MFPrefetchCommon=t.MFPrefetchCommon,e.MODULE_DEVTOOL_IDENTIFIER=t.MODULE_DEVTOOL_IDENTIFIER,e.ManifestFileName=t.ManifestFileName,e.NameTransformMap=t.NameTransformMap,e.NameTransformSymbol=t.NameTransformSymbol,e.SEPARATOR=t.SEPARATOR,e.StatsFileName=t.StatsFileName,e.TEMP_DIR=t.TEMP_DIR,e.TreeShakingStatus=t.TreeShakingStatus,e.assert=a.assert,e.bindLoggerToCompiler=c.bindLoggerToCompiler,e.composeKeyWithSeparator=a.composeKeyWithSeparator,Object.defineProperty(e,"containerPlugin",{enumerable:!0,get:function(){return r.ContainerPlugin_exports}}),Object.defineProperty(e,"containerReferencePlugin",{enumerable:!0,get:function(){return n.ContainerReferencePlugin_exports}}),e.createInfrastructureLogger=c.createInfrastructureLogger,e.createLink=f.createLink,e.createLogger=c.createLogger,e.createModuleFederationConfig=h.createModuleFederationConfig,e.createScript=f.createScript,e.createScriptNode=d.createScriptNode,e.decodeName=a.decodeName,e.encodeName=a.encodeName,e.error=a.error,e.generateExposeFilename=a.generateExposeFilename,e.generateShareFilename=a.generateShareFilename,e.generateSnapshotFromManifest=l.generateSnapshotFromManifest,e.getManifestFileName=l.getManifestFileName,e.getProcessEnv=i.getProcessEnv,e.getResourceUrl=a.getResourceUrl,e.inferAutoPublicPath=l.inferAutoPublicPath,e.infrastructureLogger=c.infrastructureLogger,e.isBrowserEnv=i.isBrowserEnv,e.isDebugMode=i.isDebugMode,e.isManifestProvider=l.isManifestProvider,e.isReactNativeEnv=i.isReactNativeEnv,e.isRequiredVersion=a.isRequiredVersion,e.isStaticResourcesEqual=f.isStaticResourcesEqual,e.loadScript=f.loadScript,e.loadScriptNode=d.loadScriptNode,e.logger=c.logger,Object.defineProperty(e,"moduleFederationPlugin",{enumerable:!0,get:function(){return o.ModuleFederationPlugin_exports}}),e.normalizeOptions=u.normalizeOptions,e.parseEntry=a.parseEntry,e.safeToString=a.safeToString,e.safeWrapper=f.safeWrapper,Object.defineProperty(e,"sharePlugin",{enumerable:!0,get:function(){return s.SharePlugin_exports}}),e.simpleJoinRemoteEntry=l.simpleJoinRemoteEntry,e.warn=a.warn})(w);let wn=w;const ce="[ Federation Runtime ]",ct=(0,wn.createLogger)(ce);function Ln(e,t){e||ir(t)}function ir(e){throw e instanceof Error?(e.message.startsWith(ce)||(e.message=`${ce}: ${e.message}`),e):new Error(`${ce}: ${e}`)}function Dn(e){e instanceof Error&&(e.message.startsWith(ce)||(e.message=`${ce}: ${e.message}`)),ct.warn(e)}T.assert=Ln;T.error=ir;T.logger=ct;T.warn=Dn;var R={};const Hn=T;let Pt=w;function Gn(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function Cn(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function qn(e){return typeof e.entry<"u"}function Un(e){return!e.entry.includes(".json")}async function Wn(e,t){try{return await e()}catch(r){!t&&Hn.warn(r);return}}function Bn(e){return e&&typeof e=="object"}const ar=Object.prototype.toString;function jn(e){return ar.call(e)==="[object Object]"}function Vn(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function Xn(e){return Array.isArray(e)?e:[e]}function xn(e){const t={url:"",type:"global",globalName:""};return(0,Pt.isBrowserEnv)()||(0,Pt.isReactNativeEnv)()||!("ssrRemoteEntry"in e)?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}const Kn=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r};R.addUniqueItem=Gn;R.arrayOptions=Xn;R.getFMId=Cn;R.getRemoteEntryInfoFromSnapshot=xn;R.isObject=Bn;R.isPlainObject=jn;R.isPureRemoteEntry=Un;R.isRemoteInfoWithEntry=qn;R.isStaticResourcesEqual=Vn;R.objectToString=ar;R.processModuleAlias=Kn;R.safeWrapper=Wn;var S={};const Yn=T,ut=R;let zn=w;const v=typeof globalThis=="object"?globalThis:window,H=(()=>{try{return document.defaultView}catch{return v}})(),Jn=H;function Le(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function De(e,t){return Object.hasOwnProperty.call(e,t)}De(v,"__GLOBAL_LOADING_REMOTE_ENTRY__")||Le(v,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const ft=v.__GLOBAL_LOADING_REMOTE_ENTRY__;function lr(e){De(e,"__VMOK__")&&!De(e,"__FEDERATION__")&&Le(e,"__FEDERATION__",e.__VMOK__),De(e,"__FEDERATION__")||(Le(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),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}lr(v);lr(H);function Zn(){v.__FEDERATION__.__GLOBAL_PLUGIN__=[],v.__FEDERATION__.__INSTANCES__=[],v.__FEDERATION__.moduleInfo={},v.__FEDERATION__.__SHARE__={},v.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(ft).forEach(e=>{delete ft[e]})}function Qn(e){v.__FEDERATION__.__INSTANCES__.push(e)}function eo(){return v.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function to(e,t=(0,zn.isDebugMode)()){t&&(v.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,v.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.1.0")}function dt(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 throw new Error("key must be string")}const ro=()=>H.__FEDERATION__.moduleInfo,cr=(e,t)=>{const r=dt(t,ut.getFMId(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=ut.getFMId(o),i=dt(H.__FEDERATION__.moduleInfo,s).value;if(i?.version===n)return i}},no=e=>cr(e,H.__FEDERATION__.moduleInfo),oo=(e,t)=>{const r=ut.getFMId(e);return H.__FEDERATION__.moduleInfo[r]=t,H.__FEDERATION__.moduleInfo},so=e=>(H.__FEDERATION__.moduleInfo={...H.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete H.__FEDERATION__.moduleInfo[r]}),io=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:v[r]}},ao=e=>{const{__GLOBAL_PLUGIN__:t}=H.__FEDERATION__;e.forEach(r=>{t.findIndex(n=>n.name===r.name)===-1?t.push(r):Yn.warn(`The plugin ${r.name} has been registered.`)})},lo=()=>H.__FEDERATION__.__GLOBAL_PLUGIN__,co=e=>v.__FEDERATION__.__PRELOADED_MAP__.get(e),uo=e=>v.__FEDERATION__.__PRELOADED_MAP__.set(e,!0);S.CurrentGlobal=v;S.Global=Jn;S.addGlobalSnapshot=so;S.getGlobalFederationConstructor=eo;S.getGlobalHostPlugins=lo;S.getGlobalSnapshot=ro;S.getGlobalSnapshotInfoByModuleInfo=no;S.getInfoWithoutType=dt;S.getPreloaded=co;S.getRemoteEntryExports=io;S.getTargetSnapshotInfoByModuleInfo=cr;S.globalLoading=ft;S.nativeGlobal=H;S.registerGlobalPlugins=ao;S.resetFederationGlobalInfo=Zn;S.setGlobalFederationConstructor=to;S.setGlobalFederationInstance=Qn;S.setGlobalSnapshotInfoByModuleInfo=oo;S.setPreloaded=uo;var Rt={},re={},U={};const vt="[0-9A-Za-z-]+",It=`(?:\\+(${vt}(?:\\.${vt})*))`,Re="0|[1-9]\\d*",He="[0-9]+",ur="\\d*[a-zA-Z-][a-zA-Z0-9-]*",At=`(?:${He}|${ur})`,fo=`(?:-?(${At}(?:\\.${At})*))`,Ot=`(?:${Re}|${ur})`,fr=`(?:-(${Ot}(?:\\.${Ot})*))`,Ve=`${Re}|x|X|\\*`,ue=`[v=\\s]*(${Ve})(?:\\.(${Ve})(?:\\.(${Ve})(?:${fr})?${It}?)?)?`,ho=`^\\s*(${ue})\\s+-\\s+(${ue})\\s*$`,mo=`[v=\\s]*${`(${He})\\.(${He})\\.(${He})`}${fo}?${It}?`,Tt="((?:<|>)?=?)",po=`(\\s*)${Tt}\\s*(${mo}|${ue})`,dr="(?:~>?)",go=`(\\s*)${dr}\\s+`,hr="(?:\\^)",_o=`(\\s*)${hr}\\s+`,Eo="(<|>)?=?\\s*\\*",yo=`^${hr}${ue}$`,So=`v?${`(${Re})\\.(${Re})\\.(${Re})`}${fr}?${It}?`,bo=`^${dr}${ue}$`,Ro=`^${Tt}\\s*${ue}$`,Io=`^${Tt}\\s*(${So})$|^$`,To="^\\s*>=\\s*0.0.0\\s*$";U.caret=yo;U.caretTrim=_o;U.comparator=Io;U.comparatorTrim=po;U.gte0=To;U.hyphenRange=ho;U.star=Eo;U.tilde=bo;U.tildeTrim=go;U.xRange=Ro;const No=U;function mr(e){return new RegExp(e)}function Mo(e){return!e||e.toLowerCase()==="x"||e==="*"}function Po(...e){return t=>e.reduce((r,n)=>n(r),t)}function vo(e){return e.match(mr(No.comparator))}function Ao(e,t,r,n){const o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}re.combineVersion=Ao;re.extractComparator=vo;re.isXVersion=Mo;re.parseRegex=mr;re.pipe=Po;var j={};const X=U,b=re;function Oo(e){return e.replace(b.parseRegex(X.hyphenRange),(t,r,n,o,s,i,a,l,c,f,d,u)=>(b.isXVersion(n)?r="":b.isXVersion(o)?r=`>=${n}.0.0`:b.isXVersion(s)?r=`>=${n}.${o}.0`:r=`>=${r}`,b.isXVersion(c)?l="":b.isXVersion(f)?l=`<${Number(c)+1}.0.0-0`:b.isXVersion(d)?l=`<${c}.${Number(f)+1}.0-0`:u?l=`<=${c}.${f}.${d}-${u}`:l=`<=${l}`,`${r} ${l}`.trim()))}function $o(e){return e.replace(b.parseRegex(X.comparatorTrim),"$1$2$3")}function ko(e){return e.replace(b.parseRegex(X.tildeTrim),"$1~")}function Fo(e){return e.replace(b.parseRegex(X.caretTrim),"$1^")}function wo(e){return e.trim().split(/\s+/).map(t=>t.replace(b.parseRegex(X.caret),(r,n,o,s,i)=>b.isXVersion(n)?"":b.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:b.isXVersion(s)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:i?n==="0"?o==="0"?`>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s}-${i} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${s} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${Number(n)+1}.0.0-0`)).join(" ")}function Lo(e){return e.trim().split(/\s+/).map(t=>t.replace(b.parseRegex(X.tilde),(r,n,o,s,i)=>b.isXVersion(n)?"":b.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:b.isXVersion(s)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:i?`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`)).join(" ")}function Do(e){return e.split(/\s+/).map(t=>t.trim().replace(b.parseRegex(X.xRange),(r,n,o,s,i,a)=>{const l=b.isXVersion(o),c=l||b.isXVersion(s),f=c||b.isXVersion(i);return n==="="&&f&&(n=""),a="",l?n===">"||n==="<"?"<0.0.0-0":"*":n&&f?(c&&(s=0),i=0,n===">"?(n=">=",c?(o=Number(o)+1,s=0,i=0):(s=Number(s)+1,i=0)):n==="<="&&(n="<",c?o=Number(o)+1:s=Number(s)+1),n==="<"&&(a="-0"),`${n+o}.${s}.${i}${a}`):c?`>=${o}.0.0${a} <${Number(o)+1}.0.0-0`:f?`>=${o}.${s}.0${a} <${o}.${Number(s)+1}.0-0`:r})).join(" ")}function Ho(e){return e.trim().replace(b.parseRegex(X.star),"")}function Go(e){return e.trim().replace(b.parseRegex(X.gte0),"")}j.parseCaretTrim=Fo;j.parseCarets=wo;j.parseComparatorTrim=$o;j.parseGTE0=Go;j.parseHyphen=Oo;j.parseStar=Ho;j.parseTildeTrim=ko;j.parseTildes=Lo;j.parseXRanges=Do;var pr={};function Ge(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function Co(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?Ge(i,a):-1:1}return 0}function $e(e,t){return Ge(e.major,t.major)||Ge(e.minor,t.minor)||Ge(e.patch,t.patch)||Co(e,t)}function Xe(e,t){return e.version===t.version}function qo(e,t){switch(e.operator){case"":case"=":return Xe(e,t);case">":return $e(e,t)<0;case">=":return Xe(e,t)||$e(e,t)<0;case"<":return $e(e,t)>0;case"<=":return Xe(e,t)||$e(e,t)>0;case void 0:return!0;default:return!1}}pr.compare=qo;const ae=re,V=j,Uo=pr;function Wo(e){return ae.pipe(V.parseCarets,V.parseTildes,V.parseXRanges,V.parseStar)(e)}function Bo(e){return ae.pipe(V.parseHyphen,V.parseComparatorTrim,V.parseTildeTrim,V.parseCaretTrim)(e.trim()).split(/\s+/).join(" ")}function jo(e,t){if(!e)return!1;const r=ae.extractComparator(e);if(!r)return!1;const[,n,,o,s,i,a]=r,l={operator:n,version:ae.combineVersion(o,s,i,a),major:o,minor:s,patch:i,preRelease:a?.split(".")},c=t.split("||");for(const f of c){const d=f.trim();if(!d||d==="*"||d==="x")return!0;try{const u=Bo(d);if(!u.trim())return!0;const h=u.split(" ").map(E=>Wo(E)).join(" ");if(!h.trim())return!0;const p=h.split(/\s+/).map(E=>V.parseGTE0(E)).filter(Boolean);if(p.length===0)continue;let m=!0;for(const E of p){const _=ae.extractComparator(E);if(!_){m=!1;break}const[,g,,M,$,A,I]=_;if(!Uo.compare({operator:g,version:ae.combineVersion(M,$,A,I),major:M,minor:$,patch:A,preRelease:I?.split(".")},l)){m=!1;break}}if(m)return!0}catch(u){console.error(`[semver] Error processing range part "${d}":`,u);continue}}return!1}Rt.satisfy=jo;var G={},ne={};const Vo="default",Xo="global";ne.DEFAULT_REMOTE_TYPE=Xo;ne.DEFAULT_SCOPE=Vo;const $t=T,gr=R,_r=S,xo=ne,ye=Rt;let ht=w;function Ko(e,t,r,n){let o;if("get"in e?o=e.get:"lib"in e?o=()=>Promise.resolve(e.lib):o=()=>Promise.resolve(()=>{throw new Error(`Can not get shared '${r}'!`)}),e.shareConfig?.eager&&e.treeShaking?.mode)throw new Error('Can not set "eager:true" and "treeShaking" at the same time!');return{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e?.loaded||"lib"in e?!0:void 0,version:e.version??"0",scope:Array.isArray(e.scope)?e.scope:[e.scope??"default"],strategy:(e.strategy??n)||"version-first",treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??ht.TreeShakingStatus.UNKNOWN,useIn:[]}:void 0}}function Yo(e,t){const r=t.shared||{},n=t.name,o=Object.keys(r).reduce((i,a)=>{const l=gr.arrayOptions(r[a]);return i[a]=i[a]||[],l.forEach(c=>{i[a].push(Ko(c,n,a,t.shareStrategy))}),i},{}),s={...e.shared};return Object.keys(o).forEach(i=>{s[i]?o[i].forEach(a=>{s[i].find(l=>l.version===a.version)||s[i].push(a)}):s[i]=o[i]}),{allShareInfos:s,newShareInfos:o}}function Ie(e,t){if(!e)return!1;const{status:r,mode:n}=e;return r===ht.TreeShakingStatus.NO_USE?!1:r===ht.TreeShakingStatus.CALCULATED?!0:n==="runtime-infer"?t?Jo(e,t):!0:!1}function Q(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!!ye.satisfy(r(e),`<=${r(t)}`)}const Te=(e,t)=>{const r=t||function(n,o){return Q(n,o)};return Object.keys(e).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},Ce=e=>!!e.loaded||typeof e.lib=="function",zo=e=>!!e.loading,Jo=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(n=>r.includes(n)):!1};function Zo(e,t,r,n){const o=e[t][r];let s="",i=Ie(n);const a=function(l,c){return i?o[l].treeShaking?o[c].treeShaking?!Ce(o[l].treeShaking)&&Q(l,c):!1:!0:!Ce(o[l])&&Q(l,c)};if(i){if(s=Te(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Te(e[t][r],a),useTreesShaking:i}}const oe=e=>Ce(e)||zo(e);function Qo(e,t,r,n){const o=e[t][r];let s="",i=Ie(n);const a=function(l,c){if(i){if(!o[l].treeShaking)return!0;if(!o[c].treeShaking)return!1;if(oe(o[c].treeShaking))return oe(o[l].treeShaking)?!!Q(l,c):!0;if(oe(o[l].treeShaking))return!1}return oe(o[c])?oe(o[l])?!!Q(l,c):!0:oe(o[l])?!1:Q(l,c)};if(i){if(s=Te(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Te(e[t][r],a),useTreesShaking:i}}function es(e){return e==="loaded-first"?Qo:Zo}function ts(e,t,r,n){if(!e)return;const{shareConfig:o,scope:s=xo.DEFAULT_SCOPE,strategy:i,treeShaking:a}=r,l=Array.isArray(s)?s:[s];for(const c of l)if(o&&e[c]&&e[c][t]){const{requiredVersion:f}=o,{version:d,useTreesShaking:u}=es(i)(e,c,t,a),h=()=>{const m=e[c][t][d];if(o.singleton){if(typeof f=="string"&&!ye.satisfy(d,f)){const E=`Version ${d} from ${d&&m.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${f})`;o.strictVersion?$t.error(E):$t.warn(E)}return{shared:m,useTreesShaking:u}}else{if(f===!1||f==="*")return{shared:m,useTreesShaking:u};if(ye.satisfy(d,f))return{shared:m,useTreesShaking:u};const E=Ie(a);if(E){for(const[_,g]of Object.entries(e[c][t]))if(Ie(g.treeShaking,a?.usedExports)&&ye.satisfy(_,f))return{shared:g,useTreesShaking:E}}for(const[_,g]of Object.entries(e[c][t]))if(ye.satisfy(_,f))return{shared:g,useTreesShaking:!1}}},p={shareScopeMap:e,scope:c,pkgName:t,version:d,GlobalFederation:_r.Global.__FEDERATION__,shareInfo:r,resolver:h};return(n.emit(p)||p).resolver()}}function rs(){return _r.Global.__FEDERATION__.__SHARE__}function ns(e){const{pkgName:t,extraOptions:r,shareInfos:n}=e,o=l=>{if(!l)return;const c={};return l.forEach(d=>{c[d.version]=d}),c[Te(c,function(d,u){return!Ce(c[d])&&Q(d,u)})]},s=r?.resolver??o,i=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),a=(...l)=>{const c={};for(const f of l)if(f)for(const[d,u]of Object.entries(f)){const h=c[d];i(h)&&i(u)?c[d]=a(h,u):u!==void 0&&(c[d]=u)}return c};return a(s(n[t]),r?.customShareInfo)}const os=(e,t)=>{e.useIn||(e.useIn=[]),gr.addUniqueItem(e.useIn,t)};function ss(e,t){return t&&e.treeShaking?e.treeShaking:e}G.addUseIn=os;G.directShare=ss;G.formatShareConfigs=Yo;G.getGlobalShareScope=rs;G.getRegisteredShare=ts;G.getTargetSharedOptions=ns;G.shouldUseTreeShaking=Ie;var me={};function is(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 as(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}me.matchRemote=as;me.matchRemoteWithNameAndExpose=is;var x={},Y={},k={};const ls="RUNTIME-001",cs="RUNTIME-002",us="RUNTIME-003",fs="RUNTIME-004",ds="RUNTIME-005",hs="RUNTIME-006",ms="RUNTIME-007",ps="RUNTIME-008",gs="RUNTIME-009",_s="RUNTIME-010",Es="TYPE-001",ys="BUILD-001",Ss="BUILD-002";k.BUILD_001=ys;k.BUILD_002=Ss;k.RUNTIME_001=ls;k.RUNTIME_002=cs;k.RUNTIME_003=us;k.RUNTIME_004=fs;k.RUNTIME_005=ds;k.RUNTIME_006=hs;k.RUNTIME_007=ms;k.RUNTIME_008=ps;k.RUNTIME_009=gs;k.RUNTIME_010=_s;k.TYPE_001=Es;var Er={};const bs=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,Rs=(e,t,r,n)=>{const o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(bs(e)),n&&o.push(`Original Error Message:
5
+ ${n}`),o.join(`
6
+ `)};Er.getShortErrorMsg=Rs;var Pe={};const D=k,yr={[D.RUNTIME_001]:"Failed to get remoteEntry exports.",[D.RUNTIME_002]:'The remote entry interface does not contain "init"',[D.RUNTIME_003]:"Failed to get manifest.",[D.RUNTIME_004]:"Failed to locate remote.",[D.RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[D.RUNTIME_006]:"Invalid loadShareSync function call from runtime",[D.RUNTIME_007]:"Failed to get remote snapshot.",[D.RUNTIME_008]:"Failed to load script resources.",[D.RUNTIME_009]:"Please call createInstance first.",[D.RUNTIME_010]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.'},Sr={[D.TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},br={[D.BUILD_001]:"Failed to find expose module.",[D.BUILD_002]:"PublicPath is required in prod mode."},Is={...yr,...Sr,...br};Pe.buildDescMap=br;Pe.errorDescMap=Is;Pe.runtimeDescMap=yr;Pe.typeDescMap=Sr;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=k,r=Er,n=Pe;e.BUILD_001=t.BUILD_001,e.BUILD_002=t.BUILD_002,e.RUNTIME_001=t.RUNTIME_001,e.RUNTIME_002=t.RUNTIME_002,e.RUNTIME_003=t.RUNTIME_003,e.RUNTIME_004=t.RUNTIME_004,e.RUNTIME_005=t.RUNTIME_005,e.RUNTIME_006=t.RUNTIME_006,e.RUNTIME_007=t.RUNTIME_007,e.RUNTIME_008=t.RUNTIME_008,e.RUNTIME_009=t.RUNTIME_009,e.RUNTIME_010=t.RUNTIME_010,e.TYPE_001=t.TYPE_001,e.buildDescMap=n.buildDescMap,e.errorDescMap=n.errorDescMap,e.getShortErrorMsg=r.getShortErrorMsg,e.runtimeDescMap=n.runtimeDescMap,e.typeDescMap=n.typeDescMap})(Y);const Rr=T,le=S,kt=ne;let Ir=w,ee=Y;const Tr=".then(callbacks[0]).catch(callbacks[1])";async function Ts({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${e}")${Tr}`)([r,n]):import(e).then(r).catch(n)}catch(o){n(o)}})}async function Ns({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}")${Tr}`)([r,n])}catch(o){n(o)}})}function Ms(e,t,r){const{remoteEntryKey:n,entryExports:o}=le.getRemoteEntryExports(e,t);return Rr.assert(o,(0,ee.getShortErrorMsg)(ee.RUNTIME_001,ee.runtimeDescMap,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n})),o}async function Ps({name:e,globalName:t,entry:r,loaderHook:n,getEntryUrl:o}){const{entryExports:s}=le.getRemoteEntryExports(e,t);return s||(0,Ir.loadScript)(o?o(r):r,{attrs:{},createScriptHook:(i,a)=>{const l=n.lifecycle.createScript.emit({url:i,attrs:a});if(l&&(l instanceof HTMLScriptElement||"script"in l||"timeout"in l))return l}}).then(()=>Ms(e,t,r)).catch(i=>{throw Rr.assert(void 0,(0,ee.getShortErrorMsg)(ee.RUNTIME_008,ee.runtimeDescMap,{remoteName:e,resourceUrl:r})),i})}async function vs({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n}){const{entry:o,entryGlobalName:s,name:i,type:a}=e;switch(a){case"esm":case"module":return Ts({entry:o,remoteEntryExports:t});case"system":return Ns({entry:o,remoteEntryExports:t});default:return Ps({entry:o,globalName:s,name:i,loaderHook:r,getEntryUrl:n})}}function mt(e){const{entry:t,name:r}=e;return(0,Ir.composeKeyWithSeparator)(r,t)}async function Nr(e){const{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:s=!1}=e,i=mt(n);if(r)return r;if(!le.globalLoading[i]){const a=t.remoteHandler.hooks.lifecycle.loadEntry,l=t.loaderHook;le.globalLoading[i]=a.emit({loaderHook:l,remoteInfo:n,remoteEntryExports:r}).then(c=>c||vs({remoteInfo:n,remoteEntryExports:r,loaderHook:l,getEntryUrl:o})).catch(async c=>{const f=mt(n);if(c instanceof Error&&c.message.includes(ee.RUNTIME_008)&&!s){const d=h=>Nr({...h,_inErrorHandling:!0}),u=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:d,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:le.globalLoading,uniqueKey:f});if(u)return u}throw c})}return le.globalLoading[i]}function As(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||kt.DEFAULT_REMOTE_TYPE,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||kt.DEFAULT_SCOPE}}x.getRemoteEntry=Nr;x.getRemoteEntryUniqueKey=mt;x.getRemoteInfo=As;var Mr={};function Os(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}Mr.getBuilderId=Os;var Pr={};const $s=S;function ks(e,t){const r=$s.getGlobalHostPlugins(),n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(o=>{e?.find(s=>s.name!==o.name)&&e.push(o)}),e&&e.length>0&&e.forEach(o=>{n.forEach(s=>{s.applyPlugin(o,t)})}),e}Pr.registerPlugins=ks;var vr={},z={};const Fs=T,ws=me,Ft=x;let Se=w;function Ar(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1,...e}}function Ls(e,t){return t.map(r=>{const n=ws.matchRemote(e,r.nameOrAlias);return Fs.assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&(0,Se.safeToString)({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Ar(r)}})}function Ds(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function Hs(e,t,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:i}=r;if(t.options.inBrowser){if(i.forEach(a=>{const{moduleInfo:l}=a,c=t.moduleCache.get(e.name);c?Ft.getRemoteEntry({origin:t,remoteInfo:l,remoteEntryExports:c.remoteEntryExports}):Ft.getRemoteEntry({origin:t,remoteInfo:l,remoteEntryExports:void 0})}),n){const a={rel:"preload",as:"style"};o.forEach(l=>{const{link:c,needAttach:f}=(0,Se.createLink)({url:l,cb:()=>{},attrs:a,createLinkHook:(d,u)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:u});if(h instanceof HTMLLinkElement)return h}});f&&document.head.appendChild(c)})}else{const a={rel:"stylesheet",type:"text/css"};o.forEach(l=>{const{link:c,needAttach:f}=(0,Se.createLink)({url:l,cb:()=>{},attrs:a,createLinkHook:(d,u)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:u});if(h instanceof HTMLLinkElement)return h},needDeleteLink:!1});f&&document.head.appendChild(c)})}if(n){const a={rel:"preload",as:"script"};s.forEach(l=>{const{link:c,needAttach:f}=(0,Se.createLink)({url:l,cb:()=>{},attrs:a,createLinkHook:(d,u)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:u});if(h instanceof HTMLLinkElement)return h}});f&&document.head.appendChild(c)})}else{const a={fetchpriority:"high",type:e?.type==="module"?"module":"text/javascript"};s.forEach(l=>{const{script:c,needAttach:f}=(0,Se.createScript)({url:l,cb:()=>{},attrs:a,createScriptHook:(d,u)=>{const h=t.loaderHook.lifecycle.createScript.emit({url:d,attrs:u});if(h instanceof HTMLScriptElement)return h},needDeleteScript:!0});f&&document.head.appendChild(c)})}}}z.defaultPreloadArgs=Ar;z.formatPreloadArgs=Ls;z.normalizePreloadExposes=Ds;z.preloadAssets=Hs;const O=S,wt=G,Gs=me,Cs=x,qs=z,Us={getRegisteredShare:wt.getRegisteredShare,getGlobalShareScope:wt.getGlobalShareScope},Ws={Global:O.Global,nativeGlobal:O.nativeGlobal,resetFederationGlobalInfo:O.resetFederationGlobalInfo,setGlobalFederationInstance:O.setGlobalFederationInstance,getGlobalFederationConstructor:O.getGlobalFederationConstructor,setGlobalFederationConstructor:O.setGlobalFederationConstructor,getInfoWithoutType:O.getInfoWithoutType,getGlobalSnapshot:O.getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo:O.getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo:O.getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo:O.setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot:O.addGlobalSnapshot,getRemoteEntryExports:O.getRemoteEntryExports,registerGlobalPlugins:O.registerGlobalPlugins,getGlobalHostPlugins:O.getGlobalHostPlugins,getPreloaded:O.getPreloaded,setPreloaded:O.setPreloaded};var Bs={global:Ws,share:Us,utils:{matchRemoteWithNameAndExpose:Gs.matchRemoteWithNameAndExpose,preloadAssets:qs.preloadAssets,getRemoteInfo:Cs.getRemoteInfo}};vr.default=Bs;var Ue={};const xe=T,Lt=R,js=x;let Vs=w,Ke=Y;function Xs(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 xs=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;const e=await js.getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports});return xe.assert(e,`remoteEntryExports is undefined
7
+ ${(0,Vs.safeToString)(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async init(e,t,r){const n=await this.getEntry();if(this.inited)return n;if(this.initPromise)return await this.initPromise,n;this.initing=!0,this.initPromise=(async()=>{const{remoteEntryInitOptions:o,shareScope:s,initScope:i}=Xs(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:o,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});typeof n?.init>"u"&&xe.error((0,Ke.getShortErrorMsg)(Ke.RUNTIME_002,Ke.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n);this.lib=s;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),i||(i=await s.get(t)),xe.assert(i,`${Lt.getFMId(this.remoteInfo)} remote don't export ${t}.`);const a=Lt.processModuleAlias(this.remoteInfo.name,t),l=this.wraperFactory(i,a);return o?await l():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 e instanceof Promise?async()=>{const n=await e();return r(n,t),n}:()=>{const n=e();return r(n,t),n}}};Ue.Module=xs;var Or={},pe={},Ks=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=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}};pe.SyncHook=Ks;var ve={};const Ys=pe;var zs=class extends Ys.SyncHook{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(o):s;t=o()}return Promise.resolve(t)}};ve.AsyncHook=zs;var ge={};const Ye=T,$r=R,Js=pe;function kr(e,t){if(!$r.isObject(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var Zs=class extends Js.SyncHook{constructor(e){super(),this.onerror=Ye.error,this.type=e}emit(e){$r.isObject(e)||Ye.error(`The data for the "${this.type}" hook should be an object.`);for(const t of this.listeners)try{const r=t(e);if(kr(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){Ye.warn(r),this.onerror(r)}return e}};ge.SyncWaterfallHook=Zs;ge.checkReturnData=kr;var Ae={};const ze=T,Qs=R,ei=pe,ti=ge;var ri=class extends ei.SyncHook{constructor(e){super(),this.onerror=ze.error,this.type=e}emit(e){Qs.isObject(e)||ze.error(`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=>(ze.warn(s),this.onerror(s),e),o=s=>{if(ti.checkReturnData(e,s)){if(e=s,r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(i){return n(i)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(o(e))}return Promise.resolve(e)}};Ae.AsyncWaterfallHook=ri;var Oe={};const ke=T,ni=R;var oi=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){ke.assert(ni.isPlainObject(e),"Plugin configuration is invalid.");const r=e.name;ke.assert(r,"A name must be provided by the plugin."),this.registerPlugins[r]||(this.registerPlugins[r]=e,e.apply?.(t),Object.keys(this.lifecycle).forEach(n=>{const o=e[n];o&&this.lifecycle[n].on(o)}))}removePlugin(e){ke.assert(e,"A name is required.");const t=this.registerPlugins[e];ke.assert(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};Oe.PluginSystem=oi;var We={};const si=T,pt=R,ii=z;let Dt=w;function Fr(e,t){const r=pt.getRemoteEntryInfoFromSnapshot(t);r.url||si.error(`The attribute remoteEntry of ${e.name} must not be undefined.`);let n=(0,Dt.getResourceUrl)(t,r.url);!(0,Dt.isBrowserEnv)()&&!n.startsWith("http")&&(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function ai(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!pt.isRemoteInfoWithEntry(t)||!pt.isPureRemoteEntry(t)){const{remoteSnapshot:a,globalSnapshot:l}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i});Fr(s,a);const c={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},f=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:c,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:l});return f&&ii.preloadAssets(s,o,f,!1),{...e,remoteSnapshot:a}}return e}}}We.assignRemoteInfo=Fr;We.snapshotPlugin=ai;var wr={};const Ne=R,gt=S,li=G,Ht=z,ci=We;let qe=w;function ui(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 Lr(e,t,r,n,o={},s){const{value:i}=gt.getInfoWithoutType(e,Ne.getFMId(t)),a=s||i;if(a&&!(0,qe.isManifestProvider)(a)&&(r(a,t,n),a.remotesInfo)){const l=Object.keys(a.remotesInfo);for(const c of l){if(o[c])continue;o[c]=!0;const f=ui(c),d=a.remotesInfo[c];Lr(e,{name:f.name,version:d.matchedVersion},r,!1,o,void 0)}}}const Je=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function fi(e,t,r,n,o){const s=[],i=[],a=[],l=new Set,c=new Set,{options:f}=e,{preloadConfig:d}=t,{depsRemote:u}=d;if(Lr(n,r,(p,m,E)=>{let _;if(E)_=d;else if(Array.isArray(u)){const I=u.find(F=>F.nameOrAlias===m.name||F.nameOrAlias===m.alias);if(!I)return;_=Ht.defaultPreloadArgs(I)}else if(u===!0)_=d;else return;const g=(0,qe.getResourceUrl)(p,Ne.getRemoteEntryInfoFromSnapshot(p).url);g&&a.push({name:m.name,moduleInfo:{name:m.name,entry:g,type:"remoteEntryType"in p?p.remoteEntryType:"global",entryGlobalName:"globalName"in p?p.globalName:m.name,shareScope:"",version:"version"in p?p.version:void 0},url:g});let M="modules"in p?p.modules:[];const $=Ht.normalizePreloadExposes(_.exposes);$.length&&"modules"in p&&(M=p?.modules?.reduce((I,F)=>($?.indexOf(F.moduleName)!==-1&&I.push(F),I),[]));function A(I){const F=I.map(W=>(0,qe.getResourceUrl)(p,W));return _.filter?F.filter(_.filter):F}if(M){const I=M.length;for(let F=0;F<I;F++){const W=M[F],je=`${m.name}/${W.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:W.moduleName==="."?m.name:je,name:m.name,remoteSnapshot:p,preloadConfig:_,remote:m,origin:e}),!gt.getPreloaded(je)&&(_.resourceCategory==="all"?(s.push(...A(W.assets.css.async)),s.push(...A(W.assets.css.sync)),i.push(...A(W.assets.js.async)),i.push(...A(W.assets.js.sync))):(_.resourceCategory="sync")&&(s.push(...A(W.assets.css.sync)),i.push(...A(W.assets.js.sync))),gt.setPreloaded(je))}}},!0,{},o),o.shared&&o.shared.length>0){const p=(m,E)=>{const{shared:_}=li.getRegisteredShare(e.shareScopeMap,E.sharedName,m,e.sharedHandler.hooks.lifecycle.resolveShare)||{};_&&typeof _.lib=="function"&&(E.assets.js.sync.forEach(g=>{l.add(g)}),E.assets.css.sync.forEach(g=>{c.add(g)}))};o.shared.forEach(m=>{const E=f.shared?.[m.sharedName];if(!E)return;const _=m.version?E.find(g=>g.version===m.version):E;_&&Ne.arrayOptions(_).forEach(g=>{p(g,m)})})}const h=i.filter(p=>!l.has(p)&&!Je("script",p));return{cssAssets:s.filter(p=>!c.has(p)&&!Je("link",p)),jsAssetsWithoutEntry:h,entryAssets:a.filter(p=>!Je("script",p.url))}}const di=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(0,qe.isBrowserEnv)()?Ne.isRemoteInfoWithEntry(o)&&Ne.isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(ci.assignRemoteInfo(n,i),fi(t,r,n,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};wr.generatePreloadAssetsPlugin=di;var Be={};const Ze=T,hi=R,q=S,mi=ve,Qe=Ae,pi=Oe;let et=w,se=Y;function Dr(e,t){const r=q.getGlobalSnapshotInfoByModuleInfo({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&q.getInfoWithoutType(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:q.getGlobalSnapshot(),remoteSnapshot:q.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:q.getGlobalSnapshot(),remoteSnapshot:q.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:"version"in e?e.version:void 0})}}var gi=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new pi.PluginSystem({beforeLoadRemoteSnapshot:new mi.AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new Qe.AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new Qe.AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new Qe.AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=q.Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,expose:r}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=q.getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},q.addGlobalSnapshot({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!q.getInfoWithoutType(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o?.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:l,globalSnapshot:c}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let f,d;if(l)if((0,et.isManifestProvider)(l)){const u=(0,et.isBrowserEnv)()?l.remoteEntry:l.ssrRemoteEntry||l.remoteEntry||"",h=await this.getManifestJson(u,e,{}),p=q.setGlobalSnapshotInfoByModuleInfo({...e,entry:u},h);f=h,d=p}else{const{remoteSnapshot:u}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:l,from:"global"});f=u,d=c}else if(hi.isRemoteInfoWithEntry(e)){const u=await this.getManifestJson(e.entry,e,{}),h=q.setGlobalSnapshotInfoByModuleInfo(e,u),{remoteSnapshot:p}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:u,from:"global"});f=p,d=h}else Ze.error((0,se.getShortErrorMsg)(se.RUNTIME_007,se.runtimeDescMap,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(c)}));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:f}),{remoteSnapshot:f,globalSnapshot:d}}getGlobalRemoteInfo(e){return Dr(e,this.HostInstance)}async getManifestJson(e,t,r){const n=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{});(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],Ze.error((0,se.getShortErrorMsg)(se.RUNTIME_003,se.runtimeDescMap,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`)))}return Ze.assert(s.metaData&&s.exposes&&s.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,s),s},o=async()=>{const s=await n(),i=(0,et.generateSnapshotFromManifest)(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]}};Be.SnapshotHandler=gi;Be.getGlobalRemoteInfo=Dr;var Hr={};const _i=T,Ei=ne,P=G,yi=ve,tt=ge,Gt=Ae,Si=Oe;let J=Y;var bi=class{constructor(e){this.hooks=new Si.PluginSystem({beforeRegisterShare:new tt.SyncWaterfallHook("beforeRegisterShare"),afterResolve:new Gt.AsyncWaterfallHook("afterResolve"),beforeLoadShare:new Gt.AsyncWaterfallHook("beforeLoadShare"),loadShare:new yi.AsyncHook,resolveShare:new tt.SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new tt.SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=P.formatShareConfigs(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s}),this.shareScopeMap[i]?.[o]||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this,n=P.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n?.scope&&await Promise.all(n.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:n.strategy}))}));const{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});_i.assert(o,`Cannot find ${e} Share in the ${r.options.name}. Please ensure that the ${e} Share parameters have been injected`);const{shared:s,useTreesShaking:i}=P.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(s){const a=P.directShare(s,i);if(a.lib)return P.addUseIn(a,r.options.name),a.lib;if(a.loading&&!a.loaded){const l=await a.loading;return a.loaded=!0,a.lib||(a.lib=l),P.addUseIn(a,r.options.name),l}else{const c=(async()=>{const f=await a.get();return P.addUseIn(a,r.options.name),a.loaded=!0,a.lib=f,f})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:c,treeShaking:i?a:void 0}),c}}else{if(t?.customShareInfo)return!1;const a=P.shouldUseTreeShaking(o.treeShaking),l=P.directShare(o,a),f=(async()=>{const d=await l.get();l.lib=d,l.loaded=!0,P.addUseIn(l,r.options.name);const{shared:u,useTreesShaking:h}=P.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(u){const p=P.directShare(u,h);p.lib=d,p.loaded=!0,u.from=o.from}return d})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:f,treeShaking:a?l:void 0}),f}}initializeSharing(e=Ei.DEFAULT_SCOPE,t){const{host:r}=this,n=t?.from,o=t?.strategy;let s=t?.initScope;const i=[];if(n!=="build"){const{initTokens:u}=this;s||(s=[]);let h=u[e];if(h||(h=u[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const a=this.shareScopeMap,l=r.options.name;a[e]||(a[e]={});const c=a[e],f=(u,h)=>{const{version:p,eager:m}=h;c[u]=c[u]||{};const E=c[u],_=E[p]&&P.directShare(E[p]),g=!!(_&&("eager"in _&&_.eager||"shareConfig"in _&&_.shareConfig?.eager));(!_||_.strategy!=="loaded-first"&&!_.loaded&&(!m!=!g?m:l>E[p].from))&&(E[p]=h)},d=async u=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:u});let p;try{p=await h.getEntry()}catch(m){p=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:u,error:m,from:"runtime",lifecycle:"beforeLoadShare",origin:r})}finally{p?.init&&!h.initing&&(h.remoteEntryExports=p,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(u=>{r.options.shared[u].forEach(h=>{h.scope.includes(e)&&f(u,h)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(u=>{u.shareScope===e&&i.push(d(u.name))}),i}loadShareSync(e,t){const{host:r}=this,n=P.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n?.scope&&n.scope.forEach(i=>{this.initializeSharing(i,{strategy:n.strategy})});const{shared:o,useTreesShaking:s}=P.getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(o){if(typeof o.lib=="function")return P.addUseIn(o,r.options.name),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if(typeof o.get=="function"){const i=o.get();if(!(i instanceof Promise))return P.addUseIn(o,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:o}),i}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const i=n.get();if(i instanceof Promise){const a=t?.from==="build"?J.RUNTIME_005:J.RUNTIME_006;throw new Error((0,J.getShortErrorMsg)(a,J.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e}))}return n.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}throw new Error((0,J.getShortErrorMsg)(J.RUNTIME_006,J.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e}))}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:l,scope:c="default",...f}=t,d=Array.isArray(c)?c:[c],u=h=>{const p=(E,_,g)=>{g&&!E[_]&&(E[_]=g)},m=a?h.treeShaking:h;p(m,"loaded",s),p(m,"loading",o),p(m,"get",i)};d.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][l]||(this.shareScopeMap[h][e][l]={version:l,scope:[h],...f,lib:n});const p=this.shareScopeMap[h][e][l];u(p),r&&p.from!==r&&(p.from=r)})}_setGlobalShareScopeMap(e){const t=P.getGlobalShareScope(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};Hr.SharedHandler=bi;var Gr={};const Fe=T,C=S,Ct=ne,Ri=G,Ii=me,rt=x,qt=z,Ti=Ue,Ni=pe,ie=ve,Ut=ge,Mi=Ae,Pi=Oe,vi=Be;let nt=w,ot=Y;var Ai=class{constructor(e){this.hooks=new Pi.PluginSystem({beforeRegisterRemote:new Ut.SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new Ut.SyncWaterfallHook("registerRemote"),beforeRequest:new Mi.AsyncWaterfallHook("beforeRequest"),onLoad:new ie.AsyncHook("onLoad"),handlePreloadModule:new Ni.SyncHook("handlePreloadModule"),errorLoadRemote:new ie.AsyncHook("errorLoadRemote"),beforePreloadRemote:new ie.AsyncHook("beforePreloadRemote"),generatePreloadAssets:new ie.AsyncHook("generatePreloadAssets"),afterPreloadRemote:new ie.AsyncHook,loadEntry:new ie.AsyncHook}),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;try{const{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:a,remote:l,expose:c,id:f,remoteSnapshot:d}=i,u=await o.get(f,c,t,d),h=await this.hooks.lifecycle.onLoad.emit({id:f,pkgNameOrAlias:a,expose:c,exposeModule:n?u:void 0,exposeModuleFactory:n?void 0:u,remote:l,options:s,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,i),typeof h=="function"?h:u}catch(n){const{from:o="runtime"}=t||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!s)throw n;return s}}async preloadRemote(e){const{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const r=qt.formatPreloadArgs(t.options.remotes,e);await Promise.all(r.map(async n=>{const{remote:o}=n,s=rt.getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:o}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:n,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});l&&qt.preloadAssets(s,t,l)}))}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t?.force})})}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(h){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!n)throw h}const{id:o}=n,s=Ii.matchRemoteWithNameAndExpose(t.options.remotes,o);Fe.assert(s,(0,ot.getShortErrorMsg)(ot.RUNTIME_004,ot.runtimeDescMap,{hostName:t.options.name,requestId:o}));const{remote:i}=s,a=rt.getRemoteInfo(i),l=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:c,expose:f}=l;Fe.assert(c&&f,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let d=t.moduleCache.get(c.name);const u={host:t,remoteInfo:a};return d||(d=new Ti.Module(u),t.moduleCache.set(c.name,d)),{module:d,moduleOptions:u,remoteMatchInfo:l}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>e.alias&&(a.name.startsWith(e.alias)||a.alias?.startsWith(e.alias)));Fe.assert(!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&&(0,nt.isBrowserEnv)()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=Ct.DEFAULT_SCOPE),e.type||(e.type=Ct.DEFAULT_REMOTE_TYPE)};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?.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),(0,nt.warn)(i.join(" ")))}}removeRemote(e){try{const{host:t}=this,{name:r}=e,n=t.options.remotes.findIndex(s=>s.name===r);n!==-1&&t.options.remotes.splice(n,1);const o=t.moduleCache.get(e.name);if(o){const s=o.remoteInfo,i=s.entryGlobalName;C.CurrentGlobal[i]&&(Object.getOwnPropertyDescriptor(C.CurrentGlobal,i)?.configurable?delete C.CurrentGlobal[i]:C.CurrentGlobal[i]=void 0);const a=rt.getRemoteEntryUniqueKey(o.remoteInfo);C.globalLoading[a]&&delete C.globalLoading[a],t.snapshotHandler.manifestCache.delete(s.entry);let l=s.buildVersion?(0,nt.composeKeyWithSeparator)(s.name,s.buildVersion):s.name;const c=C.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(d=>s.buildVersion?d.options.id===l:d.name===l);if(c!==-1){const d=C.CurrentGlobal.__FEDERATION__.__INSTANCES__[c];l=d.options.id||l;const u=Ri.getGlobalShareScope();let h=!0;const p=[];Object.keys(u).forEach(m=>{const E=u[m];E&&Object.keys(E).forEach(_=>{const g=E[_];g&&Object.keys(g).forEach(M=>{const $=g[M];$&&Object.keys($).forEach(A=>{const I=$[A];I&&typeof I=="object"&&I.from===s.name&&(I.loaded||I.loading?(I.useIn=I.useIn.filter(F=>F!==s.name),I.useIn.length?h=!1:p.push([m,_,M,A])):p.push([m,_,M,A]))})})})}),h&&(d.shareScopeMap={},delete u[l]),p.forEach(([m,E,_,g])=>{delete u[m]?.[E]?.[_]?.[g]}),C.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(c,1)}const{hostGlobalSnapshot:f}=vi.getGlobalRemoteInfo(e,t);if(f){const d=f&&"remotesInfo"in f&&f.remotesInfo&&C.getInfoWithoutType(f.remotesInfo,e.name).key;d&&(delete f.remotesInfo[d],C.Global.__FEDERATION__.__MANIFEST_LOADING__[d]&&delete C.Global.__FEDERATION__.__MANIFEST_LOADING__[d])}t.moduleCache.delete(e.name)}}catch(t){Fe.logger.log("removeRemote fail: ",t)}}};Gr.RemoteHandler=Ai;const Oi=T,$i=ne,ki=G,Fi=Mr,wi=Pr,Li=x,Di=Ue,K=pe,st=ve,Hi=ge,Wt=Ae,it=Oe,Gi=We,Ci=wr,qi=Be,Ui=Hr,Wi=Gr;let Bi=w,at=Y;const ji=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var Vi=class{constructor(e){this.hooks=new it.PluginSystem({beforeInit:new Hi.SyncWaterfallHook("beforeInit"),init:new K.SyncHook,beforeInitContainer:new Wt.AsyncWaterfallHook("beforeInitContainer"),initContainer:new Wt.AsyncWaterfallHook("initContainer")}),this.version="2.1.0",this.moduleCache=new Map,this.loaderHook=new it.PluginSystem({getModuleInfo:new K.SyncHook,createScript:new K.SyncHook,createLink:new K.SyncHook,fetch:new st.AsyncHook,loadEntryError:new st.AsyncHook,getModuleFactory:new st.AsyncHook}),this.bridgeHook=new it.PluginSystem({beforeBridgeRender:new K.SyncHook,afterBridgeRender:new K.SyncHook,beforeBridgeDestroy:new K.SyncHook,afterBridgeDestroy:new K.SyncHook});const t=ji?[Gi.snapshotPlugin(),Ci.generatePreloadAssetsPlugin()]:[],r={id:Fi.getBuilderId(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:(0,Bi.isBrowserEnv)()};this.name=e.name,this.options=r,this.snapshotHandler=new qi.SnapshotHandler(this),this.sharedHandler=new Ui.SharedHandler(this),this.remoteHandler=new Wi.RemoteHandler(this),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&&Oi.error((0,at.getShortErrorMsg)(at.RUNTIME_010,at.runtimeDescMap)),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=$i.DEFAULT_SCOPE,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const n=Li.getRemoteInfo({name:e,entry:t}),o=new Di.Module({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}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{allShareInfos:r}=ki.formatShareConfigs(e,t),{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(c=>{a.includes(c)||a.push(c)});const l={...e,...t,plugins:a,remotes:s,shared:i};return this.hooks.lifecycle.init.emit({origin:this,options:l}),l}registerPlugins(e){const t=wi.registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((r,n)=>(n&&r&&!r.find(o=>o.name===n.name)&&r.push(n),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};Or.ModuleFederation=Vi;var Cr={},qr={},Bt=Object.defineProperty,Xi=(e,t)=>{let r={};for(var n in e)Bt(r,n,{get:e[n],enumerable:!0});return t||Bt(r,Symbol.toStringTag,{value:"Module"}),r};qr.__exportAll=Xi;(function(e){var r=qr.__exportAll({});Object.defineProperty(e,"type_exports",{enumerable:!0,get:function(){return r}})})(Cr);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=T,r=R,n=S,o=Rt,s=G,i=me,a=x,l=vr,c=Ue,f=Or,d=Cr;let u=w;const h=l.default;e.CurrentGlobal=n.CurrentGlobal,e.Global=n.Global,e.Module=c.Module,e.ModuleFederation=f.ModuleFederation,e.addGlobalSnapshot=n.addGlobalSnapshot,e.assert=t.assert,e.getGlobalFederationConstructor=n.getGlobalFederationConstructor,e.getGlobalSnapshot=n.getGlobalSnapshot,e.getInfoWithoutType=n.getInfoWithoutType,e.getRegisteredShare=s.getRegisteredShare,e.getRemoteEntry=a.getRemoteEntry,e.getRemoteInfo=a.getRemoteInfo,e.helpers=h,e.isStaticResourcesEqual=r.isStaticResourcesEqual,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return u.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return u.loadScriptNode}}),e.matchRemoteWithNameAndExpose=i.matchRemoteWithNameAndExpose,e.registerGlobalPlugins=n.registerGlobalPlugins,e.resetFederationGlobalInfo=n.resetFederationGlobalInfo,e.safeWrapper=r.safeWrapper,e.satisfy=o.satisfy,e.setGlobalFederationConstructor=n.setGlobalFederationConstructor,e.setGlobalFederationInstance=n.setGlobalFederationInstance,Object.defineProperty(e,"types",{enumerable:!0,get:function(){return d.type_exports}})})(_t);let xi=_t;function Ki(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function Yi(e,t){const r=Ki();return xi.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}jt.getGlobalFederationInstance=Yi;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jt;let r=_t,n=Y;function o(m){const E=new((0,r.getGlobalFederationConstructor)()||r.ModuleFederation)(m);return(0,r.setGlobalFederationInstance)(E),E}let s=null;function i(m){const E=t.getGlobalFederationInstance(m.name,m.version);return E?(E.initOptions(m),s||(s=E),E):(s=o(m),s)}function a(...m){return(0,r.assert)(s,(0,n.getShortErrorMsg)(n.RUNTIME_009,n.runtimeDescMap)),s.loadRemote.apply(s,m)}function l(...m){return(0,r.assert)(s,(0,n.getShortErrorMsg)(n.RUNTIME_009,n.runtimeDescMap)),s.loadShare.apply(s,m)}function c(...m){return(0,r.assert)(s,(0,n.getShortErrorMsg)(n.RUNTIME_009,n.runtimeDescMap)),s.loadShareSync.apply(s,m)}function f(...m){return(0,r.assert)(s,(0,n.getShortErrorMsg)(n.RUNTIME_009,n.runtimeDescMap)),s.preloadRemote.apply(s,m)}function d(...m){return(0,r.assert)(s,(0,n.getShortErrorMsg)(n.RUNTIME_009,n.runtimeDescMap)),s.registerRemotes.apply(s,m)}function u(...m){return(0,r.assert)(s,(0,n.getShortErrorMsg)(n.RUNTIME_009,n.runtimeDescMap)),s.registerPlugins.apply(s,m)}function h(){return s}function p(...m){return(0,r.assert)(s,(0,n.getShortErrorMsg)(n.RUNTIME_009,n.runtimeDescMap)),s.registerShared.apply(s,m)}(0,r.setGlobalFederationConstructor)(r.ModuleFederation),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),e.ModuleFederation=r.ModuleFederation,e.createInstance=o,e.getInstance=h,Object.defineProperty(e,"getRemoteEntry",{enumerable:!0,get:function(){return r.getRemoteEntry}}),Object.defineProperty(e,"getRemoteInfo",{enumerable:!0,get:function(){return r.getRemoteInfo}}),e.init=i,e.loadRemote=a,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return r.loadScriptNode}}),e.loadShare=l,e.loadShareSync=c,e.preloadRemote=f,Object.defineProperty(e,"registerGlobalPlugins",{enumerable:!0,get:function(){return r.registerGlobalPlugins}}),e.registerPlugins=u,e.registerRemotes=d,e.registerShared=p})(Ur);export{Ur as d};
8
+ //# sourceMappingURL=index-CHqwNyl4.js.map
@@ -0,0 +1,2 @@
1
+ import{R as r}from"./adminUI__loadShare__react__loadShare__.mjs--w0ddnpC.js";import"./runtimeInit-Baie1-Qs.js";const t=Error=()=>r.createElement("div",null,"Error loading component");export{t as default};
2
+ //# sourceMappingURL=loadingerror-CYUXWN8J.js.map
@@ -0,0 +1,2 @@
1
+ const i="__mf_init____mf__virtual/adminUI__mf_v__runtimeInit__mf_v__.js__";if(!globalThis[i]){let _,t;const e=new Promise((n,s)=>{_=n,t=s});globalThis[i]={initPromise:e,initResolve:_,initReject:t}}const{initPromise:o,initResolve:l,initReject:a}=globalThis[i];export{l as a,o as i};
2
+ //# sourceMappingURL=runtimeInit-Baie1-Qs.js.map
package/public/index.html CHANGED
@@ -15,9 +15,10 @@
15
15
 
16
16
  <link rel="shortcut icon" href="img/favicon.ico" />
17
17
  <title>Signal K Server</title>
18
- <script type="module" crossorigin src="./assets/index-Dlc1dzC4.js"></script>
18
+ <script type="module" crossorigin src="./assets/index-ByslkIyw.js"></script>
19
19
  <link rel="modulepreload" crossorigin href="./assets/preload-helper-Ct5FWWRu.js">
20
- <link rel="modulepreload" crossorigin href="./assets/adminUI__mf_v__runtimeInit__mf_v__-Cm0AUItX.js">
20
+ <link rel="modulepreload" crossorigin href="./assets/index-CHqwNyl4.js">
21
+ <link rel="modulepreload" crossorigin href="./assets/runtimeInit-Baie1-Qs.js">
21
22
  <link rel="stylesheet" crossorigin href="./assets/style-CzSZ78W4.css">
22
23
  </head>
23
24
  <body
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-03avmwGu.js","./assets/_commonjsHelpers-D6-XlEtG.js","./assets/index-LtR7LJbL.js","./assets/index-5hkOWmYo.js","./assets/adminUI__loadShare__react__loadShare__-Cn7x_nA9.js","./assets/adminUI__mf_v__runtimeInit__mf_v__-Cm0AUItX.js"])))=>i.map(i=>d[i]);
2
- import{i as l,a as f}from"./assets/adminUI__mf_v__runtimeInit__mf_v__-Cm0AUItX.js";import a from"./assets/virtualExposes-BIHI7g3E.js";import{_ as i}from"./assets/preload-helper-Ct5FWWRu.js";const s={react:async()=>await i(()=>import("./assets/index-03avmwGu.js").then(t=>t.i),__vite__mapDeps([0,1,2]),import.meta.url),"react-dom":async()=>await i(()=>import("./assets/index-5hkOWmYo.js").then(t=>t.i),__vite__mapDeps([3,1,4,5,2]),import.meta.url)},o={react:{name:"react",version:"16.14.0",scope:["default"],loaded:!1,from:"adminUI",async get(){o.react.loaded=!0;const{react:e}=s,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^16.14.0"}},"react-dom":{name:"react-dom",version:"16.14.0",scope:["default"],loaded:!1,from:"adminUI",async get(){o["react-dom"].loaded=!0;const{"react-dom":e}=s,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^16.14.0"}}},p=[],u={},c="default",m="adminUI";async function v(e={},t=[]){const r=l({name:m,remotes:p,shared:o,plugins:[],shareStrategy:"version-first"});var n=u[c];if(n||(n=u[c]={from:m}),!(t.indexOf(n)>=0)){t.push(n),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(d){console.error(d)}return f.initResolve(r),r}}function y(e){if(!(e in a))throw new Error(`Module ${e} does not exist in container.`);return a[e]().then(t=>()=>t)}export{y as get,v as init};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-C5SbDtSm.js","./assets/adminUI__loadShare__react__loadShare__.mjs_commonjs-proxy-CRC2LUlp.js","./assets/adminUI__loadShare__react__loadShare__.mjs--w0ddnpC.js","./assets/runtimeInit-Baie1-Qs.js","./assets/index-LtR7LJbL.js","./assets/index-BO-OvZjH.js"])))=>i.map(i=>d[i]);
2
+ import{d as l}from"./assets/index-CHqwNyl4.js";import a from"./assets/virtualExposes-BIHI7g3E.js";import{_ as i}from"./assets/preload-helper-Ct5FWWRu.js";import{a as f}from"./assets/runtimeInit-Baie1-Qs.js";const s={react:async()=>await i(()=>import("./assets/index-C5SbDtSm.js").then(t=>t.i),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"react-dom":async()=>await i(()=>import("./assets/index-BO-OvZjH.js").then(t=>t.i),__vite__mapDeps([5,1,2,3,4]),import.meta.url)},n={react:{name:"react",version:"16.14.0",scope:["default"],loaded:!1,from:"adminUI",async get(){n.react.loaded=!0;const{react:e}=s,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^16.14.0"}},"react-dom":{name:"react-dom",version:"16.14.0",scope:["default"],loaded:!1,from:"adminUI",async get(){n["react-dom"].loaded=!0;const{"react-dom":e}=s,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^16.14.0"}}},p=[],c={},u="default",d="adminUI";async function v(e={},t=[]){const r=l.init({name:d,remotes:p,shared:n,plugins:[],shareStrategy:"version-first"});var o=c[u];if(o||(o=c[u]={from:d}),!(t.indexOf(o)>=0)){t.push(o),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(m){console.error(m)}return f(r),r}}function k(e){if(!(e in a))throw new Error(`Module ${e} does not exist in container.`);return a[e]().then(t=>()=>t)}export{k as get,v as init};
3
3
  //# sourceMappingURL=remoteEntry.js.map
package/vite.config.js CHANGED
@@ -2,8 +2,9 @@ import { defineConfig } from 'vite'
2
2
  import react from '@vitejs/plugin-react'
3
3
  import { federation } from '@module-federation/vite'
4
4
 
5
- // Validate peer dependencies for Module Federation compatibility
6
- import '@signalk/server-admin-ui-dependencies'
5
+ // Note: Peer dependency validation skipped for legacy admin UI
6
+ // The @signalk/server-admin-ui-dependencies package expects React 19
7
+ // This legacy UI uses React 16 and is kept as a fallback
7
8
 
8
9
  export default defineConfig({
9
10
  base: './',
@@ -1,2 +0,0 @@
1
- var u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if(typeof r=="function"){var t=function o(){return this instanceof o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t}export{l as a,u as c,f as g};
2
- //# sourceMappingURL=_commonjsHelpers-D6-XlEtG.js.map
@@ -1,2 +0,0 @@
1
- import{g as r}from"./_commonjsHelpers-D6-XlEtG.js";import{a as t}from"./adminUI__mf_v__runtimeInit__mf_v__-Cm0AUItX.js";const{initPromise:a}=t,o=a.then(e=>e.loadShare("react",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"^16.14.0"}}})),s=await o.then(e=>e());var _=s;const m=r(_);export{m as R,_ as a};
2
- //# sourceMappingURL=adminUI__loadShare__react__loadShare__-Cn7x_nA9.js.map
@@ -1,9 +0,0 @@
1
- var index_cjs$2={},index_cjs$1={},define_process_env_default={};const FederationModuleManifest="federation-manifest.json",MANIFEST_EXT=".json",BROWSER_LOG_KEY="FEDERATION_DEBUG",NameTransformSymbol={AT:"@",HYPHEN:"-",SLASH:"/"},NameTransformMap={[NameTransformSymbol.AT]:"scope_",[NameTransformSymbol.HYPHEN]:"_",[NameTransformSymbol.SLASH]:"__"},EncodedNameTransformMap={[NameTransformMap[NameTransformSymbol.AT]]:NameTransformSymbol.AT,[NameTransformMap[NameTransformSymbol.HYPHEN]]:NameTransformSymbol.HYPHEN,[NameTransformMap[NameTransformSymbol.SLASH]]:NameTransformSymbol.SLASH},SEPARATOR=":",ManifestFileName="mf-manifest.json",StatsFileName="mf-stats.json",MFModuleType={NPM:"npm",APP:"app"},MODULE_DEVTOOL_IDENTIFIER="__MF_DEVTOOLS_MODULE_INFO__",ENCODE_NAME_PREFIX="ENCODE_NAME_PREFIX",TEMP_DIR=".federation",MFPrefetchCommon={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};var ContainerPlugin=Object.freeze({__proto__:null}),ContainerReferencePlugin=Object.freeze({__proto__:null}),ModuleFederationPlugin=Object.freeze({__proto__:null}),SharePlugin=Object.freeze({__proto__:null});function isBrowserEnv(){return typeof window<"u"&&typeof window.document<"u"}function isReactNativeEnv(){return typeof navigator<"u"&&navigator?.product==="ReactNative"}function isBrowserDebug(){try{if(isBrowserEnv()&&window.localStorage)return!!localStorage.getItem(BROWSER_LOG_KEY)}catch{return!1}return!1}function isDebugMode(){return typeof process<"u"&&define_process_env_default&&define_process_env_default.FEDERATION_DEBUG?!!define_process_env_default.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:isBrowserDebug()}const getProcessEnv=function(){return typeof process<"u"&&define_process_env_default?define_process_env_default:{}},LOG_CATEGORY$1="[ Federation Runtime ]",parseEntry=(t,e,r=SEPARATOR)=>{const n=t.split(r),o=getProcessEnv().NODE_ENV==="development"&&e,a="*",s=i=>i.startsWith("http")||i.includes(MANIFEST_EXT);if(n.length>=2){let[i,...c]=n;t.startsWith(r)&&(i=n.slice(0,2).join(r),c=[o||n.slice(2).join(r)]);let l=o||c.join(r);return s(l)?{name:i,entry:l}:{name:i,version:l||a}}else if(n.length===1){const[i]=n;return o&&s(o)?{name:i,entry:o}:{name:i,version:o||a}}else throw`Invalid entry value: ${t}`},composeKeyWithSeparator=function(...t){return t.length?t.reduce((e,r)=>r?e?`${e}${SEPARATOR}${r}`:r:e,""):""},encodeName=function(t,e="",r=!1){try{const n=r?".js":"";return`${e}${t.replace(new RegExp(`${NameTransformSymbol.AT}`,"g"),NameTransformMap[NameTransformSymbol.AT]).replace(new RegExp(`${NameTransformSymbol.HYPHEN}`,"g"),NameTransformMap[NameTransformSymbol.HYPHEN]).replace(new RegExp(`${NameTransformSymbol.SLASH}`,"g"),NameTransformMap[NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},decodeName=function(t,e,r){try{let n=t;if(e){if(!n.startsWith(e))return n;n=n.replace(new RegExp(e,"g"),"")}return n=n.replace(new RegExp(`${NameTransformMap[NameTransformSymbol.AT]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.AT]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.SLASH]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.SLASH]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.HYPHEN]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},generateExposeFilename=(t,e)=>{if(!t)return"";let r=t;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),encodeName(r,"__federation_expose_",e)},generateShareFilename=(t,e)=>t?encodeName(t,"__federation_shared_",e):"",getResourceUrl=(t,e)=>{if("getPublicPath"in t){let r;return t.getPublicPath.startsWith("function")?r=new Function("return "+t.getPublicPath)()():r=new Function(t.getPublicPath)(),`${r}${e}`}else return"publicPath"in t?!isBrowserEnv()&&!isReactNativeEnv()&&"ssrPublicPath"in t?`${t.ssrPublicPath}${e}`:`${t.publicPath}${e}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",t,e),"")},assert$1=(t,e)=>{t||error$1(e)},error$1=t=>{throw new Error(`${LOG_CATEGORY$1}: ${t}`)},warn$1=t=>{console.warn(`${LOG_CATEGORY$1}: ${t}`)};function safeToString(t){try{return JSON.stringify(t,null,2)}catch{return""}}const VERSION_PATTERN_REGEXP=/^([\d^=v<>~]|[*xX]$)/;function isRequiredVersion(t){return VERSION_PATTERN_REGEXP.test(t)}const simpleJoinRemoteEntry=(t,e)=>{if(!t)return e;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const a=o.slice(1);return a.endsWith("/")?a.slice(0,-1):a}return o})(t);return n?n.endsWith("/")?`${n}${e}`:`${n}/${e}`:e};function inferAutoPublicPath(t){return t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function generateSnapshotFromManifest(t,e={}){const{remotes:r={},overrides:n={},version:o}=e;let a;const s=()=>"publicPath"in t.metaData?t.metaData.publicPath==="auto"&&o?inferAutoPublicPath(o):t.metaData.publicPath:t.metaData.getPublicPath,i=Object.keys(n);let c={};Object.keys(r).length||(c=t.remotes?.reduce((E,b)=>{let R;const S=b.federationContainerName;return i.includes(S)?R=n[S]:"version"in b?R=b.version:R=b.entry,E[S]={matchedVersion:R},E},{})||{}),Object.keys(r).forEach(E=>c[E]={matchedVersion:i.includes(E)?n[E]:r[E]});const{remoteEntry:{path:l,name:d,type:h},types:u={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:p},globalName:_,ssrRemoteEntry:g}=t.metaData,{exposes:m}=t;let y={version:o||"",buildVersion:p,globalName:_,remoteEntry:simpleJoinRemoteEntry(l,d),remoteEntryType:h,remoteTypes:simpleJoinRemoteEntry(u.path,u.name),remoteTypesZip:u.zip||"",remoteTypesAPI:u.api||"",remotesInfo:c,shared:t?.shared.map(E=>({assets:E.assets,sharedName:E.name,version:E.version})),modules:m?.map(E=>({moduleName:E.name,modulePath:E.path,assets:E.assets}))};if(t.metaData?.prefetchInterface){const E=t.metaData.prefetchInterface;y={...y,prefetchInterface:E}}if(t.metaData?.prefetchEntry){const{path:E,name:b,type:R}=t.metaData.prefetchEntry;y={...y,prefetchEntry:simpleJoinRemoteEntry(E,b),prefetchEntryType:R}}if("publicPath"in t.metaData?a={...y,publicPath:s(),ssrPublicPath:t.metaData.ssrPublicPath}:a={...y,getPublicPath:s()},g){const E=simpleJoinRemoteEntry(g.path,g.name);a.ssrRemoteEntry=E,a.ssrRemoteEntryType=g.type||"commonjs-module"}return a}function isManifestProvider(t){return!!("remoteEntry"in t&&t.remoteEntry.includes(MANIFEST_EXT))}function getManifestFileName(t){if(!t)return{statsFileName:StatsFileName,manifestFileName:ManifestFileName};let e=typeof t=="boolean"?"":t.filePath||"",r=typeof t=="boolean"?"":t.fileName||"";const n=".json",o=c=>c.endsWith(n)?c:`${c}${n}`,a=(c,l)=>c.replace(n,`${l}${n}`),s=r?o(r):ManifestFileName,i=r?a(s,"-stats"):StatsFileName;return{statsFileName:simpleJoinRemoteEntry(e,i),manifestFileName:simpleJoinRemoteEntry(e,s)}}const PREFIX="[ Module Federation ]",DEFAULT_DELEGATE=console,LOGGER_STACK_SKIP_TOKENS=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function captureStackTrace(){try{const t=new Error().stack;if(!t)return;const[,...e]=t.split(`
2
- `),r=e.filter(o=>!LOGGER_STACK_SKIP_TOKENS.some(a=>o.includes(a)));return r.length?`Stack trace:
3
- ${r.slice(0,5).join(`
4
- `)}`:void 0}catch{return}}class Logger{constructor(e,r=DEFAULT_DELEGATE){this.prefix=e,this.delegate=r??DEFAULT_DELEGATE}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??DEFAULT_DELEGATE}emit(e,r){const n=this.delegate,a=isDebugMode()?captureStackTrace():void 0,s=a?[...r,a]:r,i=(()=>{switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];case"debug":default:return["debug","log"]}})();for(const c of i){const l=n[c];if(typeof l=="function"){l.call(n,this.prefix,...s);return}}for(const c of i){const l=DEFAULT_DELEGATE[c];if(typeof l=="function"){l.call(DEFAULT_DELEGATE,this.prefix,...s);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){isDebugMode()&&this.emit("debug",e)}}function createLogger(t){return new Logger(t)}function createInfrastructureLogger(t){const e=new Logger(t);return Object.defineProperty(e,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),e}function bindLoggerToCompiler(t,e,r){if(t.__mf_infrastructure_logger__&&e?.getInfrastructureLogger)try{const n=e.getInfrastructureLogger(r);n&&typeof n=="object"&&(typeof n.log=="function"||typeof n.info=="function"||typeof n.warn=="function"||typeof n.error=="function")&&t.setDelegate(n)}catch{t.setDelegate(void 0)}}const logger$1=createLogger(PREFIX),infrastructureLogger=createInfrastructureLogger(PREFIX);async function safeWrapper$1(t,e){try{return await t()}catch(r){!e&&warn$1(r);return}}function isStaticResourcesEqual$1(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function createScript(t){let e=null,r=!0,n=2e4,o;const a=document.getElementsByTagName("script");for(let i=0;i<a.length;i++){const c=a[i],l=c.getAttribute("src");if(l&&isStaticResourcesEqual$1(l,t.url)){e=c,r=!1;break}}if(!e){const i=t.attrs;e=document.createElement("script"),e.type=i?.type==="module"?"module":"text/javascript";let c;t.createScriptHook&&(c=t.createScriptHook(t.url,t.attrs),c instanceof HTMLScriptElement?e=c:typeof c=="object"&&("script"in c&&c.script&&(e=c.script),"timeout"in c&&c.timeout&&(n=c.timeout))),e.src||(e.src=t.url),i&&!c&&Object.keys(i).forEach(l=>{e&&(l==="async"||l==="defer"?e[l]=i[l]:e.getAttribute(l)||e.setAttribute(l,i[l]))})}const s=async(i,c)=>{clearTimeout(o);const l=()=>{c?.type==="error"?t?.onErrorCallback&&t?.onErrorCallback(c):t?.cb&&t?.cb()};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteScript:d=!0}=t;d&&e?.parentNode&&e.parentNode.removeChild(e)}),i&&typeof i=="function")){const d=i(c);if(d instanceof Promise){const h=await d;return l(),h}return l(),d}l()};return e.onerror=s.bind(null,e.onerror),e.onload=s.bind(null,e.onload),o=setTimeout(()=>{s(null,new Error(`Remote script "${t.url}" time-outed.`))},n),{script:e,needAttach:r}}function createLink(t){let e=null,r=!0;const n=document.getElementsByTagName("link");for(let a=0;a<n.length;a++){const s=n[a],i=s.getAttribute("href"),c=s.getAttribute("rel");if(i&&isStaticResourcesEqual$1(i,t.url)&&c===t.attrs.rel){e=s,r=!1;break}}if(!e){e=document.createElement("link"),e.setAttribute("href",t.url);let a;const s=t.attrs;t.createLinkHook&&(a=t.createLinkHook(t.url,s),a instanceof HTMLLinkElement&&(e=a)),s&&!a&&Object.keys(s).forEach(i=>{e&&!e.getAttribute(i)&&e.setAttribute(i,s[i])})}const o=(a,s)=>{const i=()=>{s?.type==="error"?t?.onErrorCallback&&t?.onErrorCallback(s):t?.cb&&t?.cb()};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteLink:c=!0}=t;c&&e?.parentNode&&e.parentNode.removeChild(e)}),a)){const c=a(s);return i(),c}i()};return e.onerror=o.bind(null,e.onerror),e.onload=o.bind(null,e.onload),{link:e,needAttach:r}}function loadScript(t,e){const{attrs:r={},createScriptHook:n}=e;return new Promise((o,a)=>{const{script:s,needAttach:i}=createScript({url:t,cb:o,onErrorCallback:a,attrs:{fetchpriority:"high",...r},createScriptHook:n,needDeleteScript:!0});i&&document.head.appendChild(s)})}const sdkImportCache=new Map;function importNodeModule(t){if(!t)throw new Error("import specifier is required");if(sdkImportCache.has(t))return sdkImportCache.get(t);const r=new Function("name","return import(name)")(t).then(n=>n).catch(n=>{throw console.error(`Error importing module ${t}:`,n),sdkImportCache.delete(t),n});return sdkImportCache.set(t,r),r}const loadNodeFetch=async()=>{const t=await importNodeModule("node-fetch");return t.default||t},lazyLoaderHookFetch=async(t,e,r)=>{const o=await((a,s)=>r.lifecycle.fetch.emit(a,s))(t,e||{});return!o||!(o instanceof Response)?(typeof fetch>"u"?await loadNodeFetch():fetch)(t,e||{}):o},createScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(url,cb,attrs,loaderHook)=>{if(loaderHook?.createScriptHook){const t=loaderHook.createScriptHook(url);t&&typeof t=="object"&&"url"in t&&(url=t.url)}let urlObj;try{urlObj=new URL(url)}catch(t){console.error("Error constructing URL:",t),cb(new Error(`Invalid URL: ${t}`));return}const getFetch=async()=>loaderHook?.fetch?(t,e)=>lazyLoaderHookFetch(t,e,loaderHook):typeof fetch>"u"?loadNodeFetch():fetch,handleScriptFetch=async(f,urlObj)=>{try{const res=await f(urlObj.href),data=await res.text(),[path,vm]=await Promise.all([importNodeModule("path"),importNodeModule("vm")]),scriptContext={exports:{},module:{exports:{}}},urlDirname=urlObj.pathname.split("/").slice(0,-1).join("/"),filename=path.basename(urlObj.pathname),script=new vm.Script(`(function(exports, module, require, __dirname, __filename) {${data}
5
- })`,{filename,importModuleDynamically:vm.constants?.USE_MAIN_CONTEXT_DEFAULT_LOADER??importNodeModule});script.runInThisContext()(scriptContext.exports,scriptContext.module,eval("require"),urlDirname,filename);const exportedInterface=scriptContext.module.exports||scriptContext.exports;if(attrs&&exportedInterface&&attrs.globalName){const t=exportedInterface[attrs.globalName]||exportedInterface;cb(void 0,t);return}cb(void 0,exportedInterface)}catch(t){cb(t instanceof Error?t:new Error(`Script execution error: ${t}`))}};getFetch().then(async t=>{if(attrs?.type==="esm"||attrs?.type==="module")return loadModule(urlObj.href,{fetch:t,vm:await importNodeModule("vm")}).then(async e=>{await e.evaluate(),cb(void 0,e.namespace)}).catch(e=>{cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))});handleScriptFetch(t,urlObj)}).catch(t=>{cb(t)})}:(t,e,r,n)=>{e(new Error("createScriptNode is disabled in non-Node.js environment"))},loadScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(t,e)=>new Promise((r,n)=>{createScriptNode(t,(o,a)=>{if(o)n(o);else{const s=e?.attrs?.globalName||`__FEDERATION_${e?.attrs?.name}:custom__`,i=globalThis[s]=a;r(i)}},e.attrs,e.loaderHook)}):(t,e)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")},esmModuleCache=new Map;async function loadModule(t,e){if(esmModuleCache.has(t))return esmModuleCache.get(t);const{fetch:r,vm:n}=e,a=await(await r(t)).text(),s=new n.SourceTextModule(a,{importModuleDynamically:async(i,c)=>{const l=new URL(i,t).href;return loadModule(l,e)}});return esmModuleCache.set(t,s),await s.link(async i=>{const c=new URL(i,t).href;return await loadModule(c,e)}),s}function normalizeOptions(t,e,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return t?e:!1;if(n===!0)return e;if(n&&typeof n=="object")return{...e,...n};throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}const createModuleFederationConfig=t=>t;index_cjs$1.BROWSER_LOG_KEY=BROWSER_LOG_KEY;index_cjs$1.ENCODE_NAME_PREFIX=ENCODE_NAME_PREFIX;index_cjs$1.EncodedNameTransformMap=EncodedNameTransformMap;index_cjs$1.FederationModuleManifest=FederationModuleManifest;index_cjs$1.MANIFEST_EXT=MANIFEST_EXT;index_cjs$1.MFModuleType=MFModuleType;index_cjs$1.MFPrefetchCommon=MFPrefetchCommon;index_cjs$1.MODULE_DEVTOOL_IDENTIFIER=MODULE_DEVTOOL_IDENTIFIER;index_cjs$1.ManifestFileName=ManifestFileName;index_cjs$1.NameTransformMap=NameTransformMap;index_cjs$1.NameTransformSymbol=NameTransformSymbol;index_cjs$1.SEPARATOR=SEPARATOR;index_cjs$1.StatsFileName=StatsFileName;index_cjs$1.TEMP_DIR=TEMP_DIR;index_cjs$1.assert=assert$1;index_cjs$1.bindLoggerToCompiler=bindLoggerToCompiler;index_cjs$1.composeKeyWithSeparator=composeKeyWithSeparator;index_cjs$1.containerPlugin=ContainerPlugin;index_cjs$1.containerReferencePlugin=ContainerReferencePlugin;index_cjs$1.createInfrastructureLogger=createInfrastructureLogger;index_cjs$1.createLink=createLink;index_cjs$1.createLogger=createLogger;index_cjs$1.createModuleFederationConfig=createModuleFederationConfig;index_cjs$1.createScript=createScript;index_cjs$1.createScriptNode=createScriptNode;index_cjs$1.decodeName=decodeName;index_cjs$1.encodeName=encodeName;index_cjs$1.error=error$1;index_cjs$1.generateExposeFilename=generateExposeFilename;index_cjs$1.generateShareFilename=generateShareFilename;index_cjs$1.generateSnapshotFromManifest=generateSnapshotFromManifest;index_cjs$1.getManifestFileName=getManifestFileName;index_cjs$1.getProcessEnv=getProcessEnv;index_cjs$1.getResourceUrl=getResourceUrl;index_cjs$1.inferAutoPublicPath=inferAutoPublicPath;index_cjs$1.infrastructureLogger=infrastructureLogger;index_cjs$1.isBrowserEnv=isBrowserEnv;index_cjs$1.isDebugMode=isDebugMode;index_cjs$1.isManifestProvider=isManifestProvider;index_cjs$1.isReactNativeEnv=isReactNativeEnv;index_cjs$1.isRequiredVersion=isRequiredVersion;index_cjs$1.isStaticResourcesEqual=isStaticResourcesEqual$1;index_cjs$1.loadScript=loadScript;index_cjs$1.loadScriptNode=loadScriptNode;index_cjs$1.logger=logger$1;index_cjs$1.moduleFederationPlugin=ModuleFederationPlugin;index_cjs$1.normalizeOptions=normalizeOptions;index_cjs$1.parseEntry=parseEntry;index_cjs$1.safeToString=safeToString;index_cjs$1.safeWrapper=safeWrapper$1;index_cjs$1.sharePlugin=SharePlugin;index_cjs$1.simpleJoinRemoteEntry=simpleJoinRemoteEntry;index_cjs$1.warn=warn$1;var index_cjs={};const RUNTIME_001="RUNTIME-001",RUNTIME_002="RUNTIME-002",RUNTIME_003="RUNTIME-003",RUNTIME_004="RUNTIME-004",RUNTIME_005="RUNTIME-005",RUNTIME_006="RUNTIME-006",RUNTIME_007="RUNTIME-007",RUNTIME_008="RUNTIME-008",RUNTIME_009="RUNTIME-009",TYPE_001="TYPE-001",BUILD_001="BUILD-001",BUILD_002="BUILD-002",getDocsUrl=t=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${t.split("-")[0].toLowerCase()}/${t}`,getShortErrorMsg=(t,e,r,n)=>{const o=[`${[e[t]]} #${t}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(getDocsUrl(t)),n&&o.push(`Original Error Message:
6
- ${n}`),o.join(`
7
- `)},runtimeDescMap={[RUNTIME_001]:"Failed to get remoteEntry exports.",[RUNTIME_002]:'The remote entry interface does not contain "init"',[RUNTIME_003]:"Failed to get manifest.",[RUNTIME_004]:"Failed to locate remote.",[RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[RUNTIME_006]:"Invalid loadShareSync function call from runtime",[RUNTIME_007]:"Failed to get remote snapshot.",[RUNTIME_008]:"Failed to load script resources.",[RUNTIME_009]:"Please call createInstance first."},typeDescMap={[TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},buildDescMap={[BUILD_001]:"Failed to find expose module.",[BUILD_002]:"PublicPath is required in prod mode."},errorDescMap={...runtimeDescMap,...typeDescMap,...buildDescMap};index_cjs.BUILD_001=BUILD_001;index_cjs.BUILD_002=BUILD_002;index_cjs.RUNTIME_001=RUNTIME_001;index_cjs.RUNTIME_002=RUNTIME_002;index_cjs.RUNTIME_003=RUNTIME_003;index_cjs.RUNTIME_004=RUNTIME_004;index_cjs.RUNTIME_005=RUNTIME_005;index_cjs.RUNTIME_006=RUNTIME_006;index_cjs.RUNTIME_007=RUNTIME_007;index_cjs.RUNTIME_008=RUNTIME_008;index_cjs.RUNTIME_009=RUNTIME_009;index_cjs.TYPE_001=TYPE_001;index_cjs.buildDescMap=buildDescMap;index_cjs.errorDescMap=errorDescMap;index_cjs.getShortErrorMsg=getShortErrorMsg;index_cjs.runtimeDescMap=runtimeDescMap;index_cjs.typeDescMap=typeDescMap;var sdk=index_cjs$1,errorCodes=index_cjs;const LOG_CATEGORY="[ Federation Runtime ]",logger=sdk.createLogger(LOG_CATEGORY);function assert(t,e){t||error(e)}function error(t){throw t instanceof Error?(t.message.startsWith(LOG_CATEGORY)||(t.message=`${LOG_CATEGORY}: ${t.message}`),t):new Error(`${LOG_CATEGORY}: ${t}`)}function warn(t){t instanceof Error&&(t.message.startsWith(LOG_CATEGORY)||(t.message=`${LOG_CATEGORY}: ${t.message}`)),logger.warn(t)}function addUniqueItem(t,e){return t.findIndex(r=>r===e)===-1&&t.push(e),t}function getFMId(t){return"version"in t&&t.version?`${t.name}:${t.version}`:"entry"in t&&t.entry?`${t.name}:${t.entry}`:`${t.name}`}function isRemoteInfoWithEntry(t){return typeof t.entry<"u"}function isPureRemoteEntry(t){return!t.entry.includes(".json")}async function safeWrapper(t,e){try{return await t()}catch(r){!e&&warn(r);return}}function isObject(t){return t&&typeof t=="object"}const objectToString=Object.prototype.toString;function isPlainObject(t){return objectToString.call(t)==="[object Object]"}function isStaticResourcesEqual(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function arrayOptions(t){return Array.isArray(t)?t:[t]}function getRemoteEntryInfoFromSnapshot(t){const e={url:"",type:"global",globalName:""};return sdk.isBrowserEnv()||sdk.isReactNativeEnv()?"remoteEntry"in t?{url:t.remoteEntry,type:t.remoteEntryType,globalName:t.globalName}:e:"ssrRemoteEntry"in t?{url:t.ssrRemoteEntry||e.url,type:t.ssrRemoteEntryType||e.type,globalName:t.globalName}:e}const processModuleAlias=(t,e)=>{let r;return t.endsWith("/")?r=t.slice(0,-1):r=t,e.startsWith(".")&&(e=e.slice(1)),r=r+e,r},CurrentGlobal=typeof globalThis=="object"?globalThis:window,nativeGlobal=(()=>{try{return document.defaultView}catch{return CurrentGlobal}})(),Global=nativeGlobal;function definePropertyGlobalVal(t,e,r){Object.defineProperty(t,e,{value:r,configurable:!1,writable:!0})}function includeOwnProperty(t,e){return Object.hasOwnProperty.call(t,e)}includeOwnProperty(CurrentGlobal,"__GLOBAL_LOADING_REMOTE_ENTRY__")||definePropertyGlobalVal(CurrentGlobal,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const globalLoading=CurrentGlobal.__GLOBAL_LOADING_REMOTE_ENTRY__;function setGlobalDefaultVal(t){includeOwnProperty(t,"__VMOK__")&&!includeOwnProperty(t,"__FEDERATION__")&&definePropertyGlobalVal(t,"__FEDERATION__",t.__VMOK__),includeOwnProperty(t,"__FEDERATION__")||(definePropertyGlobalVal(t,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),definePropertyGlobalVal(t,"__VMOK__",t.__FEDERATION__)),t.__FEDERATION__.__GLOBAL_PLUGIN__??=[],t.__FEDERATION__.__INSTANCES__??=[],t.__FEDERATION__.moduleInfo??={},t.__FEDERATION__.__SHARE__??={},t.__FEDERATION__.__MANIFEST_LOADING__??={},t.__FEDERATION__.__PRELOADED_MAP__??=new Map}setGlobalDefaultVal(CurrentGlobal);setGlobalDefaultVal(nativeGlobal);function resetFederationGlobalInfo(){CurrentGlobal.__FEDERATION__.__GLOBAL_PLUGIN__=[],CurrentGlobal.__FEDERATION__.__INSTANCES__=[],CurrentGlobal.__FEDERATION__.moduleInfo={},CurrentGlobal.__FEDERATION__.__SHARE__={},CurrentGlobal.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(globalLoading).forEach(t=>{delete globalLoading[t]})}function setGlobalFederationInstance(t){CurrentGlobal.__FEDERATION__.__INSTANCES__.push(t)}function getGlobalFederationConstructor(){return CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function setGlobalFederationConstructor(t,e=sdk.isDebugMode()){e&&(CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__=t,CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.21.6")}function getInfoWithoutType(t,e){if(typeof e=="string"){if(t[e])return{value:t[e],key:e};{const n=Object.keys(t);for(const o of n){const[a,s]=o.split(":"),i=`${a}:${e}`,c=t[i];if(c)return{value:c,key:i}}return{value:void 0,key:e}}}else throw new Error("key must be string")}const getGlobalSnapshot=()=>nativeGlobal.__FEDERATION__.moduleInfo,getTargetSnapshotInfoByModuleInfo=(t,e)=>{const r=getFMId(t),n=getInfoWithoutType(e,r).value;if(n&&!n.version&&"version"in t&&t.version&&(n.version=t.version),n)return n;if("version"in t&&t.version){const{version:o,...a}=t,s=getFMId(a),i=getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo,s).value;if(i?.version===o)return i}},getGlobalSnapshotInfoByModuleInfo=t=>getTargetSnapshotInfoByModuleInfo(t,nativeGlobal.__FEDERATION__.moduleInfo),setGlobalSnapshotInfoByModuleInfo=(t,e)=>{const r=getFMId(t);return nativeGlobal.__FEDERATION__.moduleInfo[r]=e,nativeGlobal.__FEDERATION__.moduleInfo},addGlobalSnapshot=t=>(nativeGlobal.__FEDERATION__.moduleInfo={...nativeGlobal.__FEDERATION__.moduleInfo,...t},()=>{const e=Object.keys(t);for(const r of e)delete nativeGlobal.__FEDERATION__.moduleInfo[r]}),getRemoteEntryExports=(t,e)=>{const r=e||`__FEDERATION_${t}:custom__`,n=CurrentGlobal[r];return{remoteEntryKey:r,entryExports:n}},registerGlobalPlugins=t=>{const{__GLOBAL_PLUGIN__:e}=nativeGlobal.__FEDERATION__;t.forEach(r=>{e.findIndex(n=>n.name===r.name)===-1?e.push(r):warn(`The plugin ${r.name} has been registered.`)})},getGlobalHostPlugins=()=>nativeGlobal.__FEDERATION__.__GLOBAL_PLUGIN__,getPreloaded=t=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.get(t),setPreloaded=t=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.set(t,!0),DEFAULT_SCOPE="default",DEFAULT_REMOTE_TYPE="global",buildIdentifier="[0-9A-Za-z-]+",build=`(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`,numericIdentifier="0|[1-9]\\d*",numericIdentifierLoose="[0-9]+",nonNumericIdentifier="\\d*[a-zA-Z-][a-zA-Z0-9-]*",preReleaseIdentifierLoose=`(?:${numericIdentifierLoose}|${nonNumericIdentifier})`,preReleaseLoose=`(?:-?(${preReleaseIdentifierLoose}(?:\\.${preReleaseIdentifierLoose})*))`,preReleaseIdentifier=`(?:${numericIdentifier}|${nonNumericIdentifier})`,preRelease=`(?:-(${preReleaseIdentifier}(?:\\.${preReleaseIdentifier})*))`,xRangeIdentifier=`${numericIdentifier}|x|X|\\*`,xRangePlain=`[v=\\s]*(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:${preRelease})?${build}?)?)?`,hyphenRange=`^\\s*(${xRangePlain})\\s+-\\s+(${xRangePlain})\\s*$`,mainVersionLoose=`(${numericIdentifierLoose})\\.(${numericIdentifierLoose})\\.(${numericIdentifierLoose})`,loosePlain=`[v=\\s]*${mainVersionLoose}${preReleaseLoose}?${build}?`,gtlt="((?:<|>)?=?)",comparatorTrim=`(\\s*)${gtlt}\\s*(${loosePlain}|${xRangePlain})`,loneTilde="(?:~>?)",tildeTrim=`(\\s*)${loneTilde}\\s+`,loneCaret="(?:\\^)",caretTrim=`(\\s*)${loneCaret}\\s+`,star="(<|>)?=?\\s*\\*",caret=`^${loneCaret}${xRangePlain}$`,mainVersion=`(${numericIdentifier})\\.(${numericIdentifier})\\.(${numericIdentifier})`,fullPlain=`v?${mainVersion}${preRelease}?${build}?`,tilde=`^${loneTilde}${xRangePlain}$`,xRange=`^${gtlt}\\s*${xRangePlain}$`,comparator=`^${gtlt}\\s*(${fullPlain})$|^$`,gte0="^\\s*>=\\s*0.0.0\\s*$";function parseRegex(t){return new RegExp(t)}function isXVersion(t){return!t||t.toLowerCase()==="x"||t==="*"}function pipe(...t){return e=>t.reduce((r,n)=>n(r),e)}function extractComparator(t){return t.match(parseRegex(comparator))}function combineVersion(t,e,r,n){const o=`${t}.${e}.${r}`;return n?`${o}-${n}`:o}function parseHyphen(t){return t.replace(parseRegex(hyphenRange),(e,r,n,o,a,s,i,c,l,d,h,u)=>(isXVersion(n)?r="":isXVersion(o)?r=`>=${n}.0.0`:isXVersion(a)?r=`>=${n}.${o}.0`:r=`>=${r}`,isXVersion(l)?c="":isXVersion(d)?c=`<${Number(l)+1}.0.0-0`:isXVersion(h)?c=`<${l}.${Number(d)+1}.0-0`:u?c=`<=${l}.${d}.${h}-${u}`:c=`<=${c}`,`${r} ${c}`.trim()))}function parseComparatorTrim(t){return t.replace(parseRegex(comparatorTrim),"$1$2$3")}function parseTildeTrim(t){return t.replace(parseRegex(tildeTrim),"$1~")}function parseCaretTrim(t){return t.replace(parseRegex(caretTrim),"$1^")}function parseCarets(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(caret),(r,n,o,a,s)=>isXVersion(n)?"":isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:isXVersion(a)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:s?n==="0"?o==="0"?`>=${n}.${o}.${a}-${s} <${n}.${o}.${Number(a)+1}-0`:`>=${n}.${o}.${a}-${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${a}-${s} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${a} <${n}.${o}.${Number(a)+1}-0`:`>=${n}.${o}.${a} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${a} <${Number(n)+1}.0.0-0`)).join(" ")}function parseTildes(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(tilde),(r,n,o,a,s)=>isXVersion(n)?"":isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:isXVersion(a)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:s?`>=${n}.${o}.${a}-${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${a} <${n}.${Number(o)+1}.0-0`)).join(" ")}function parseXRanges(t){return t.split(/\s+/).map(e=>e.trim().replace(parseRegex(xRange),(r,n,o,a,s,i)=>{const c=isXVersion(o),l=c||isXVersion(a),d=l||isXVersion(s);return n==="="&&d&&(n=""),i="",c?n===">"||n==="<"?"<0.0.0-0":"*":n&&d?(l&&(a=0),s=0,n===">"?(n=">=",l?(o=Number(o)+1,a=0,s=0):(a=Number(a)+1,s=0)):n==="<="&&(n="<",l?o=Number(o)+1:a=Number(a)+1),n==="<"&&(i="-0"),`${n+o}.${a}.${s}${i}`):l?`>=${o}.0.0${i} <${Number(o)+1}.0.0-0`:d?`>=${o}.${a}.0${i} <${o}.${Number(a)+1}.0-0`:r})).join(" ")}function parseStar(t){return t.trim().replace(parseRegex(star),"")}function parseGTE0(t){return t.trim().replace(parseRegex(gte0),"")}function compareAtom(t,e){return t=Number(t)||t,e=Number(e)||e,t>e?1:t===e?0:-1}function comparePreRelease(t,e){const{preRelease:r}=t,{preRelease:n}=e;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,a=r.length;o<=a;o++){const s=r[o],i=n[o];if(s!==i)return s===void 0&&i===void 0?0:s?i?compareAtom(s,i):-1:1}return 0}function compareVersion(t,e){return compareAtom(t.major,e.major)||compareAtom(t.minor,e.minor)||compareAtom(t.patch,e.patch)||comparePreRelease(t,e)}function eq(t,e){return t.version===e.version}function compare(t,e){switch(t.operator){case"":case"=":return eq(t,e);case">":return compareVersion(t,e)<0;case">=":return eq(t,e)||compareVersion(t,e)<0;case"<":return compareVersion(t,e)>0;case"<=":return eq(t,e)||compareVersion(t,e)>0;case void 0:return!0;default:return!1}}function parseComparatorString(t){return pipe(parseCarets,parseTildes,parseXRanges,parseStar)(t)}function parseRange(t){return pipe(parseHyphen,parseComparatorTrim,parseTildeTrim,parseCaretTrim)(t.trim()).split(/\s+/).join(" ")}function satisfy(t,e){if(!t)return!1;const r=extractComparator(t);if(!r)return!1;const[,n,,o,a,s,i]=r,c={operator:n,version:combineVersion(o,a,s,i),major:o,minor:a,patch:s,preRelease:i?.split(".")},l=e.split("||");for(const d of l){const h=d.trim();if(!h||h==="*"||h==="x")return!0;try{const u=parseRange(h);if(!u.trim())return!0;const p=u.split(" ").map(m=>parseComparatorString(m)).join(" ");if(!p.trim())return!0;const _=p.split(/\s+/).map(m=>parseGTE0(m)).filter(Boolean);if(_.length===0)continue;let g=!0;for(const m of _){const y=extractComparator(m);if(!y){g=!1;break}const[,E,,b,R,S,M]=y,I={operator:E,version:combineVersion(b,R,S,M),major:b,minor:R,patch:S,preRelease:M?.split(".")};if(!compare(I,c)){g=!1;break}}if(g)return!0}catch(u){console.error(`[semver] Error processing range part "${h}":`,u);continue}}return!1}function formatShare(t,e,r,n){let o;return"get"in t?o=t.get:"lib"in t?o=()=>Promise.resolve(t.lib):o=()=>Promise.resolve(()=>{throw new Error(`Can not get shared '${r}'!`)}),{deps:[],useIn:[],from:e,loading:null,...t,shareConfig:{requiredVersion:`^${t.version}`,singleton:!1,eager:!1,strictVersion:!1,...t.shareConfig},get:o,loaded:t?.loaded||"lib"in t?!0:void 0,version:t.version??"0",scope:Array.isArray(t.scope)?t.scope:[t.scope??"default"],strategy:(t.strategy??n)||"version-first"}}function formatShareConfigs(t,e){const r=e.shared||{},n=e.name,o=Object.keys(r).reduce((s,i)=>{const c=arrayOptions(r[i]);return s[i]=s[i]||[],c.forEach(l=>{s[i].push(formatShare(l,n,i,e.shareStrategy))}),s},{}),a={...t.shared};return Object.keys(o).forEach(s=>{a[s]?o[s].forEach(i=>{a[s].find(l=>l.version===i.version)||a[s].push(i)}):a[s]=o[s]}),{shared:a,shareInfos:o}}function versionLt(t,e){const r=n=>{if(!Number.isNaN(Number(n))){const a=n.split(".");let s=n;for(let i=0;i<3-a.length;i++)s+=".0";return s}return n};return!!satisfy(r(t),`<=${r(e)}`)}const findVersion=(t,e)=>{const r=e||function(n,o){return versionLt(n,o)};return Object.keys(t).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},isLoaded=t=>!!t.loaded||typeof t.lib=="function",isLoading=t=>!!t.loading;function findSingletonVersionOrderByVersion(t,e,r){const n=t[e][r],o=function(a,s){return!isLoaded(n[a])&&versionLt(a,s)};return findVersion(t[e][r],o)}function findSingletonVersionOrderByLoaded(t,e,r){const n=t[e][r],o=function(a,s){const i=c=>isLoaded(c)||isLoading(c);return i(n[s])?i(n[a])?!!versionLt(a,s):!0:i(n[a])?!1:versionLt(a,s)};return findVersion(t[e][r],o)}function getFindShareFunction(t){return t==="loaded-first"?findSingletonVersionOrderByLoaded:findSingletonVersionOrderByVersion}function getRegisteredShare(t,e,r,n){if(!t)return;const{shareConfig:o,scope:a=DEFAULT_SCOPE,strategy:s}=r,i=Array.isArray(a)?a:[a];for(const c of i)if(o&&t[c]&&t[c][e]){const{requiredVersion:l}=o,h=getFindShareFunction(s)(t,c,e),u=()=>{if(o.singleton){if(typeof l=="string"&&!satisfy(h,l)){const g=`Version ${h} from ${h&&t[c][e][h].from} of shared singleton module ${e} does not satisfy the requirement of ${r.from} which needs ${l})`;o.strictVersion?error(g):warn(g)}return t[c][e][h]}else{if(l===!1||l==="*"||satisfy(h,l))return t[c][e][h];for(const[g,m]of Object.entries(t[c][e]))if(satisfy(g,l))return m}},p={shareScopeMap:t,scope:c,pkgName:e,version:h,GlobalFederation:Global.__FEDERATION__,resolver:u};return(n.emit(p)||p).resolver()}}function getGlobalShareScope(){return Global.__FEDERATION__.__SHARE__}function getTargetSharedOptions(t){const{pkgName:e,extraOptions:r,shareInfos:n}=t,o=s=>{if(!s)return;const i={};s.forEach(d=>{i[d.version]=d});const l=findVersion(i,function(d,h){return!isLoaded(i[d])&&versionLt(d,h)});return i[l]},a=r?.resolver??o;return Object.assign({},a(n[e]),r?.customShareInfo)}function getBuilderId$1(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function matchRemoteWithNameAndExpose(t,e){for(const r of t){const n=e.startsWith(r.name);let o=e.replace(r.name,"");if(n){if(o.startsWith("/")){const i=r.name;return o=`.${o}`,{pkgNameOrAlias:i,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const a=r.alias&&e.startsWith(r.alias);let s=r.alias&&e.replace(r.alias,"");if(r.alias&&a){if(s&&s.startsWith("/")){const i=r.alias;return s=`.${s}`,{pkgNameOrAlias:i,expose:s,remote:r}}else if(s==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function matchRemote(t,e){for(const r of t)if(e===r.name||r.alias&&e===r.alias)return r}function registerPlugins(t,e){const r=getGlobalHostPlugins(),n=[e.hooks,e.remoteHandler.hooks,e.sharedHandler.hooks,e.snapshotHandler.hooks,e.loaderHook,e.bridgeHook];return r.length>0&&r.forEach(o=>{t?.find(a=>a.name!==o.name)&&t.push(o)}),t&&t.length>0&&t.forEach(o=>{n.forEach(a=>{a.applyPlugin(o,e)})}),t}const importCallback=".then(callbacks[0]).catch(callbacks[1])";async function loadEsmEntry({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${t}")${importCallback}`)([r,n]):import(t).then(r).catch(n)}catch(o){n(o)}})}async function loadSystemJsEntry({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof __system_context__>"u"?System.import(t).then(r).catch(n):new Function("callbacks",`System.import("${t}")${importCallback}`)([r,n])}catch(o){n(o)}})}function handleRemoteEntryLoaded(t,e,r){const{remoteEntryKey:n,entryExports:o}=getRemoteEntryExports(t,e);return assert(o,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_001,errorCodes.runtimeDescMap,{remoteName:t,remoteEntryUrl:r,remoteEntryKey:n})),o}async function loadEntryScript({name:t,globalName:e,entry:r,loaderHook:n,getEntryUrl:o}){const{entryExports:a}=getRemoteEntryExports(t,e);if(a)return a;const s=o?o(r):r;return sdk.loadScript(s,{attrs:{},createScriptHook:(i,c)=>{const l=n.lifecycle.createScript.emit({url:i,attrs:c});if(l&&(l instanceof HTMLScriptElement||"script"in l||"timeout"in l))return l}}).then(()=>handleRemoteEntryLoaded(t,e,r)).catch(i=>{throw assert(void 0,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_008,errorCodes.runtimeDescMap,{remoteName:t,resourceUrl:r})),i})}async function loadEntryDom({remoteInfo:t,remoteEntryExports:e,loaderHook:r,getEntryUrl:n}){const{entry:o,entryGlobalName:a,name:s,type:i}=t;switch(i){case"esm":case"module":return loadEsmEntry({entry:o,remoteEntryExports:e});case"system":return loadSystemJsEntry({entry:o,remoteEntryExports:e});default:return loadEntryScript({entry:o,globalName:a,name:s,loaderHook:r,getEntryUrl:n})}}async function loadEntryNode({remoteInfo:t,loaderHook:e}){const{entry:r,entryGlobalName:n,name:o,type:a}=t,{entryExports:s}=getRemoteEntryExports(o,n);return s||sdk.loadScriptNode(r,{attrs:{name:o,globalName:n,type:a},loaderHook:{createScriptHook:(i,c={})=>{const l=e.lifecycle.createScript.emit({url:i,attrs:c});if(l&&"url"in l)return l}}}).then(()=>handleRemoteEntryLoaded(o,n,r)).catch(i=>{throw i})}function getRemoteEntryUniqueKey(t){const{entry:e,name:r}=t;return sdk.composeKeyWithSeparator(r,e)}async function getRemoteEntry(t){const{origin:e,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:a=!1}=t,s=getRemoteEntryUniqueKey(n);if(r)return r;if(!globalLoading[s]){const i=e.remoteHandler.hooks.lifecycle.loadEntry,c=e.loaderHook;globalLoading[s]=i.emit({loaderHook:c,remoteInfo:n,remoteEntryExports:r}).then(l=>l||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":sdk.isBrowserEnv())?loadEntryDom({remoteInfo:n,remoteEntryExports:r,loaderHook:c,getEntryUrl:o}):loadEntryNode({remoteInfo:n,loaderHook:c}))).catch(async l=>{const d=getRemoteEntryUniqueKey(n);if(l instanceof Error&&l.message.includes(errorCodes.RUNTIME_008)&&!a){const u=_=>getRemoteEntry({..._,_inErrorHandling:!0}),p=await e.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:u,origin:e,remoteInfo:n,remoteEntryExports:r,globalLoading,uniqueKey:d});if(p)return p}throw l})}return globalLoading[s]}function getRemoteInfo(t){return{...t,entry:"entry"in t?t.entry:"",type:t.type||DEFAULT_REMOTE_TYPE,entryGlobalName:t.entryGlobalName||t.name,shareScope:t.shareScope||DEFAULT_SCOPE}}function defaultPreloadArgs(t){return{resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1,...t}}function formatPreloadArgs(t,e){return e.map(r=>{const n=matchRemote(t,r.nameOrAlias);return assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&sdk.safeToString({remoteInfo:n,remotes:t})}`),{remote:n,preloadConfig:defaultPreloadArgs(r)}})}function normalizePreloadExposes(t){return t?t.map(e=>e==="."?e:e.startsWith("./")?e.replace("./",""):e):[]}function preloadAssets(t,e,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:a,entryAssets:s}=r;if(e.options.inBrowser){if(s.forEach(i=>{const{moduleInfo:c}=i,l=e.moduleCache.get(t.name);getRemoteEntry(l?{origin:e,remoteInfo:c,remoteEntryExports:l.remoteEntryExports}:{origin:e,remoteInfo:c,remoteEntryExports:void 0})}),n){const i={rel:"preload",as:"style"};o.forEach(c=>{const{link:l,needAttach:d}=sdk.createLink({url:c,cb:()=>{},attrs:i,createLinkHook:(h,u)=>{const p=e.loaderHook.lifecycle.createLink.emit({url:h,attrs:u});if(p instanceof HTMLLinkElement)return p}});d&&document.head.appendChild(l)})}else{const i={rel:"stylesheet",type:"text/css"};o.forEach(c=>{const{link:l,needAttach:d}=sdk.createLink({url:c,cb:()=>{},attrs:i,createLinkHook:(h,u)=>{const p=e.loaderHook.lifecycle.createLink.emit({url:h,attrs:u});if(p instanceof HTMLLinkElement)return p},needDeleteLink:!1});d&&document.head.appendChild(l)})}if(n){const i={rel:"preload",as:"script"};a.forEach(c=>{const{link:l,needAttach:d}=sdk.createLink({url:c,cb:()=>{},attrs:i,createLinkHook:(h,u)=>{const p=e.loaderHook.lifecycle.createLink.emit({url:h,attrs:u});if(p instanceof HTMLLinkElement)return p}});d&&document.head.appendChild(l)})}else{const i={fetchpriority:"high",type:t?.type==="module"?"module":"text/javascript"};a.forEach(c=>{const{script:l,needAttach:d}=sdk.createScript({url:c,cb:()=>{},attrs:i,createScriptHook:(h,u)=>{const p=e.loaderHook.lifecycle.createScript.emit({url:h,attrs:u});if(p instanceof HTMLScriptElement)return p},needDeleteScript:!0});d&&document.head.appendChild(l)})}}}const ShareUtils={getRegisteredShare,getGlobalShareScope},GlobalUtils={Global,nativeGlobal,resetFederationGlobalInfo,setGlobalFederationInstance,getGlobalFederationConstructor,setGlobalFederationConstructor,getInfoWithoutType,getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot,getRemoteEntryExports,registerGlobalPlugins,getGlobalHostPlugins,getPreloaded,setPreloaded};var helpers={global:GlobalUtils,share:ShareUtils,utils:{matchRemoteWithNameAndExpose,preloadAssets,getRemoteInfo}};class Module{constructor({remoteInfo:e,host:r}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=r}async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;let e;return e=await getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports}),assert(e,`remoteEntryExports is undefined
8
- ${sdk.safeToString(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async get(e,r,n,o){const{loadFactory:a=!0}=n||{loadFactory:!0},s=await this.getEntry();if(!this.inited){const h=this.host.shareScopeMap,u=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope];u.length||u.push("default"),u.forEach(y=>{h[y]||(h[y]={})});const p=h[u[0]],_=[],g={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?u:this.remoteInfo.shareScope||"default"};Object.defineProperty(g,"shareScopeMap",{value:h,enumerable:!1});const m=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:p,remoteEntryInitOptions:g,initScope:_,remoteInfo:this.remoteInfo,origin:this.host});typeof s?.init>"u"&&error(errorCodes.getShortErrorMsg(errorCodes.RUNTIME_002,errorCodes.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),await s.init(m.shareScope,m.initScope,m.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...m,id:e,remoteSnapshot:o,remoteEntryExports:s})}this.lib=s,this.inited=!0;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:r,moduleInfo:this.remoteInfo}),i||(i=await s.get(r)),assert(i,`${getFMId(this.remoteInfo)} remote don't export ${r}.`);const c=processModuleAlias(this.remoteInfo.name,r),l=this.wraperFactory(i,c);return a?await l():l}wraperFactory(e,r){function n(o,a){o&&typeof o=="object"&&Object.isExtensible(o)&&!Object.getOwnPropertyDescriptor(o,Symbol.for("mf_module_id"))&&Object.defineProperty(o,Symbol.for("mf_module_id"),{value:a,enumerable:!1})}return e instanceof Promise?async()=>{const o=await e();return n(o,r),o}:()=>{const o=e();return n(o,r),o}}}class SyncHook{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const r=this;this.on(function n(...o){return r.remove(n),e.apply(null,o)})}emit(...e){let r;return this.listeners.size>0&&this.listeners.forEach(n=>{r=n(...e)}),r}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}}class AsyncHook extends SyncHook{emit(...e){let r;const n=Array.from(this.listeners);if(n.length>0){let o=0;const a=s=>s===!1?!1:o<n.length?Promise.resolve(n[o++].apply(null,e)).then(a):s;r=a()}return Promise.resolve(r)}}function checkReturnData(t,e){if(!isObject(e))return!1;if(t!==e){for(const r in t)if(!(r in e))return!1}return!0}class SyncWaterfallHook extends SyncHook{constructor(e){super(),this.onerror=error,this.type=e}emit(e){isObject(e)||error(`The data for the "${this.type}" hook should be an object.`);for(const r of this.listeners)try{const n=r(e);if(checkReturnData(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(n){warn(n),this.onerror(n)}return e}}class AsyncWaterfallHook extends SyncHook{constructor(e){super(),this.onerror=error,this.type=e}emit(e){isObject(e)||error(`The response data for the "${this.type}" hook must be an object.`);const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>(warn(s),this.onerror(s),e),a=s=>{if(checkReturnData(e,s)){if(e=s,n<r.length)try{return Promise.resolve(r[n++](e)).then(a,o)}catch(i){return o(i)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(a(e))}return Promise.resolve(e)}}class PluginSystem{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,r){assert(isPlainObject(e),"Plugin configuration is invalid.");const n=e.name;assert(n,"A name must be provided by the plugin."),this.registerPlugins[n]||(this.registerPlugins[n]=e,e.apply?.(r),Object.keys(this.lifecycle).forEach(o=>{const a=e[o];a&&this.lifecycle[o].on(a)}))}removePlugin(e){assert(e,"A name is required.");const r=this.registerPlugins[e];assert(r,`The plugin "${e}" is not registered.`),Object.keys(r).forEach(n=>{n!=="name"&&this.lifecycle[n].remove(r[n])})}}function assignRemoteInfo(t,e){const r=getRemoteEntryInfoFromSnapshot(e);r.url||error(`The attribute remoteEntry of ${t.name} must not be undefined.`);let n=sdk.getResourceUrl(e,r.url);!sdk.isBrowserEnv()&&!n.startsWith("http")&&(n=`https:${n}`),t.type=r.type,t.entryGlobalName=r.globalName,t.entry=n,t.version=e.version,t.buildVersion=e.buildVersion}function snapshotPlugin(){return{name:"snapshot-plugin",async afterResolve(t){const{remote:e,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:a,id:s}=t;if(!isRemoteInfoWithEntry(e)||!isPureRemoteEntry(e)){const{remoteSnapshot:i,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:e,id:s});assignRemoteInfo(a,i);const l={remote:e,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},d=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:a,remote:e,remoteSnapshot:i,globalSnapshot:c});return d&&preloadAssets(a,o,d,!1),{...t,remoteSnapshot:i}}return t}}}function splitId(t){const e=t.split(":");return e.length===1?{name:e[0],version:void 0}:e.length===2?{name:e[0],version:e[1]}:{name:e[1],version:e[2]}}function traverseModuleInfo(t,e,r,n,o={},a){const s=getFMId(e),{value:i}=getInfoWithoutType(t,s),c=a||i;if(c&&!sdk.isManifestProvider(c)&&(r(c,e,n),c.remotesInfo)){const l=Object.keys(c.remotesInfo);for(const d of l){if(o[d])continue;o[d]=!0;const h=splitId(d),u=c.remotesInfo[d];traverseModuleInfo(t,{name:h.name,version:u.matchedVersion},r,!1,o,void 0)}}}const isExisted=(t,e)=>document.querySelector(`${t}[${t==="link"?"href":"src"}="${e}"]`);function generatePreloadAssets(t,e,r,n,o){const a=[],s=[],i=[],c=new Set,l=new Set,{options:d}=t,{preloadConfig:h}=e,{depsRemote:u}=h;if(traverseModuleInfo(n,r,(m,y,E)=>{let b;if(E)b=h;else if(Array.isArray(u)){const N=u.find(T=>T.nameOrAlias===y.name||T.nameOrAlias===y.alias);if(!N)return;b=defaultPreloadArgs(N)}else if(u===!0)b=h;else return;const R=sdk.getResourceUrl(m,getRemoteEntryInfoFromSnapshot(m).url);R&&i.push({name:y.name,moduleInfo:{name:y.name,entry:R,type:"remoteEntryType"in m?m.remoteEntryType:"global",entryGlobalName:"globalName"in m?m.globalName:y.name,shareScope:"",version:"version"in m?m.version:void 0},url:R});let S="modules"in m?m.modules:[];const M=normalizePreloadExposes(b.exposes);M.length&&"modules"in m&&(S=m?.modules?.reduce((N,T)=>(M?.indexOf(T.moduleName)!==-1&&N.push(T),N),[]));function I(N){const T=N.map($=>sdk.getResourceUrl(m,$));return b.filter?T.filter(b.filter):T}if(S){const N=S.length;for(let T=0;T<N;T++){const $=S[T],A=`${y.name}/${$.moduleName}`;t.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:$.moduleName==="."?y.name:A,name:y.name,remoteSnapshot:m,preloadConfig:b,remote:y,origin:t}),!getPreloaded(A)&&(b.resourceCategory==="all"?(a.push(...I($.assets.css.async)),a.push(...I($.assets.css.sync)),s.push(...I($.assets.js.async)),s.push(...I($.assets.js.sync))):(b.resourceCategory="sync")&&(a.push(...I($.assets.css.sync)),s.push(...I($.assets.js.sync))),setPreloaded(A))}}},!0,{},o),o.shared&&o.shared.length>0){const m=(y,E)=>{const b=getRegisteredShare(t.shareScopeMap,E.sharedName,y,t.sharedHandler.hooks.lifecycle.resolveShare);b&&typeof b.lib=="function"&&(E.assets.js.sync.forEach(R=>{c.add(R)}),E.assets.css.sync.forEach(R=>{l.add(R)}))};o.shared.forEach(y=>{const E=d.shared?.[y.sharedName];if(!E)return;const b=y.version?E.find(S=>S.version===y.version):E;if(!b)return;arrayOptions(b).forEach(S=>{m(S,y)})})}const _=s.filter(m=>!c.has(m)&&!isExisted("script",m));return{cssAssets:a.filter(m=>!l.has(m)&&!isExisted("link",m)),jsAssetsWithoutEntry:_,entryAssets:i.filter(m=>!isExisted("script",m.url))}}const generatePreloadAssetsPlugin=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(t){const{origin:e,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:a,remoteSnapshot:s}=t;return sdk.isBrowserEnv()?isRemoteInfoWithEntry(o)&&isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(assignRemoteInfo(n,s),generatePreloadAssets(e,r,n,a,s)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function getGlobalRemoteInfo(t,e){const r=getGlobalSnapshotInfoByModuleInfo({name:e.name,version:e.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&getInfoWithoutType(r.remotesInfo,t.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:"version"in t?t.version:void 0})}}class SnapshotHandler{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new PluginSystem({beforeLoadRemoteSnapshot:new AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:r,expose:n}){const{options:o}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:o,moduleInfo:e});let a=getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});a||(a={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},addGlobalSnapshot({[this.HostInstance.options.name]:a})),a&&"remotesInfo"in a&&!getInfoWithoutType(a.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(a.remotesInfo={...a?.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:c}=this.getGlobalRemoteInfo(e),{remoteSnapshot:l,globalSnapshot:d}=await this.hooks.lifecycle.loadSnapshot.emit({options:o,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:c});let h,u;if(l)if(sdk.isManifestProvider(l)){const p=sdk.isBrowserEnv()?l.remoteEntry:l.ssrRemoteEntry||l.remoteEntry||"",_=await this.getManifestJson(p,e,{}),g=setGlobalSnapshotInfoByModuleInfo({...e,entry:p},_);h=_,u=g}else{const{remoteSnapshot:p}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:l,from:"global"});h=p,u=d}else if(isRemoteInfoWithEntry(e)){const p=await this.getManifestJson(e.entry,e,{}),_=setGlobalSnapshotInfoByModuleInfo(e,p),{remoteSnapshot:g}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:p,from:"global"});h=g,u=_}else error(errorCodes.getShortErrorMsg(errorCodes.RUNTIME_007,errorCodes.runtimeDescMap,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(d)}));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:r,host:this.HostInstance,options:o,moduleInfo:e,remoteSnapshot:h}),{remoteSnapshot:h,globalSnapshot:u}}getGlobalRemoteInfo(e){return getGlobalRemoteInfo(e,this.HostInstance)}async getManifestJson(e,r,n){const o=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{});(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],error(errorCodes.getShortErrorMsg(errorCodes.RUNTIME_003,errorCodes.runtimeDescMap,{manifestUrl:e,moduleName:r.name,hostName:this.HostInstance.options.name},`${i}`)))}return assert(s.metaData&&s.exposes&&s.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,s),s},a=async()=>{const s=await o(),i=sdk.generateSnapshotFromManifest(s,{version:e}),{remoteSnapshot:c}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:r,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return c};return this.manifestLoading[e]||(this.manifestLoading[e]=a().then(s=>s)),this.manifestLoading[e]}}class SharedHandler{constructor(e){this.hooks=new PluginSystem({afterResolve:new AsyncWaterfallHook("afterResolve"),beforeLoadShare:new AsyncWaterfallHook("beforeLoadShare"),loadShare:new AsyncHook,resolveShare:new SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,r){const{shareInfos:n,shared:o}=formatShareConfigs(e,r);return Object.keys(n).forEach(s=>{n[s].forEach(c=>{c.scope.forEach(l=>{this.shareScopeMap[l]?.[s]||this.setShared({pkgName:s,lib:c.lib,get:c.get,loaded:c.loaded||!!c.lib,shared:c,from:r.name})})})}),{shareInfos:n,shared:o}}async loadShare(e,r){const{host:n}=this,o=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o?.scope&&await Promise.all(o.scope.map(async l=>{await Promise.all(this.initializeSharing(l,{strategy:o.strategy}))}));const a=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:n.options.shared,origin:n}),{shareInfo:s}=a;assert(s,`Cannot find ${e} Share in the ${n.options.name}. Please ensure that the ${e} Share parameters have been injected`);const i=getRegisteredShare(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare),c=l=>{l.useIn||(l.useIn=[]),addUniqueItem(l.useIn,n.options.name)};if(i&&i.lib)return c(i),i.lib;if(i&&i.loading&&!i.loaded){const l=await i.loading;return i.loaded=!0,i.lib||(i.lib=l),c(i),l}else if(i){const d=(async()=>{const h=await i.get();return c(i),i.loaded=!0,i.lib=h,h})();return this.setShared({pkgName:e,loaded:!1,shared:i,from:n.options.name,lib:null,loading:d}),d}else{if(r?.customShareInfo)return!1;const d=(async()=>{const h=await s.get();s.lib=h,s.loaded=!0,c(s);const u=getRegisteredShare(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare);return u&&(u.lib=h,u.loaded=!0,u.from=s.from),h})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:d}),d}}initializeSharing(e=DEFAULT_SCOPE,r){const{host:n}=this,o=r?.from,a=r?.strategy;let s=r?.initScope;const i=[];if(o!=="build"){const{initTokens:_}=this;s||(s=[]);let g=_[e];if(g||(g=_[e]={from:this.host.name}),s.indexOf(g)>=0)return i;s.push(g)}const c=this.shareScopeMap,l=n.options.name;c[e]||(c[e]={});const d=c[e],h=(_,g)=>{const{version:m,eager:y}=g;d[_]=d[_]||{};const E=d[_],b=E[m],R=!!(b&&(b.eager||b.shareConfig?.eager));(!b||b.strategy!=="loaded-first"&&!b.loaded&&(!y!=!R?y:l>b.from))&&(E[m]=g)},u=_=>_&&_.init&&_.init(c[e],s),p=async _=>{const{module:g}=await n.remoteHandler.getRemoteModuleAndOptions({id:_});if(g.getEntry){let m;try{m=await g.getEntry()}catch(y){m=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:_,error:y,from:"runtime",lifecycle:"beforeLoadShare",origin:n})}g.inited||(await u(m),g.inited=!0)}};return Object.keys(n.options.shared).forEach(_=>{n.options.shared[_].forEach(m=>{m.scope.includes(e)&&h(_,m)})}),(n.options.shareStrategy==="version-first"||a==="version-first")&&n.options.remotes.forEach(_=>{_.shareScope===e&&i.push(p(_.name))}),i}loadShareSync(e,r){const{host:n}=this,o=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o?.scope&&o.scope.forEach(i=>{this.initializeSharing(i,{strategy:o.strategy})});const a=getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare),s=i=>{i.useIn||(i.useIn=[]),addUniqueItem(i.useIn,n.options.name)};if(a){if(typeof a.lib=="function")return s(a),a.loaded||(a.loaded=!0,a.from===n.options.name&&(o.loaded=!0)),a.lib;if(typeof a.get=="function"){const i=a.get();if(!(i instanceof Promise))return s(a),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:i,shared:a}),i}}if(o.lib)return o.loaded||(o.loaded=!0),o.lib;if(o.get){const i=o.get();if(i instanceof Promise){const c=r?.from==="build"?errorCodes.RUNTIME_005:errorCodes.RUNTIME_006;throw new Error(errorCodes.getShortErrorMsg(c,errorCodes.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}return o.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:o.lib,shared:o}),o.lib}throw new Error(errorCodes.getShortErrorMsg(errorCodes.RUNTIME_006,errorCodes.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}initShareScopeMap(e,r,n={}){const{host:o}=this;this.shareScopeMap[e]=r,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:r,options:o.options,origin:o,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:r,from:n,lib:o,loading:a,loaded:s,get:i}){const{version:c,scope:l="default",...d}=r;(Array.isArray(l)?l:[l]).forEach(u=>{if(this.shareScopeMap[u]||(this.shareScopeMap[u]={}),this.shareScopeMap[u][e]||(this.shareScopeMap[u][e]={}),!this.shareScopeMap[u][e][c]){this.shareScopeMap[u][e][c]={version:c,scope:[u],...d,lib:o,loaded:s,loading:a},i&&(this.shareScopeMap[u][e][c].get=i);return}const p=this.shareScopeMap[u][e][c];a&&!p.loading&&(p.loading=a),s&&!p.loaded&&(p.loaded=s),n&&p.from!==n&&(p.from=n)})}_setGlobalShareScopeMap(e){const r=getGlobalShareScope(),n=e.id||e.name;n&&!r[n]&&(r[n]=this.shareScopeMap)}}class RemoteHandler{constructor(e){this.hooks=new PluginSystem({beforeRegisterRemote:new SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new SyncWaterfallHook("registerRemote"),beforeRequest:new AsyncWaterfallHook("beforeRequest"),onLoad:new AsyncHook("onLoad"),handlePreloadModule:new SyncHook("handlePreloadModule"),errorLoadRemote:new AsyncHook("errorLoadRemote"),beforePreloadRemote:new AsyncHook("beforePreloadRemote"),generatePreloadAssets:new AsyncHook("generatePreloadAssets"),afterPreloadRemote:new AsyncHook,loadEntry:new AsyncHook}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,r){return(r.remotes||[]).reduce((o,a)=>(this.registerRemote(a,o,{force:!1}),o),e.remotes)}setIdToRemoteMap(e,r){const{remote:n,expose:o}=r,{name:a,alias:s}=n;if(this.idToRemoteMap[e]={name:n.name,expose:o},s&&e.startsWith(a)){const i=e.replace(a,s);this.idToRemoteMap[i]={name:n.name,expose:o};return}if(s&&e.startsWith(s)){const i=e.replace(s,a);this.idToRemoteMap[i]={name:n.name,expose:o}}}async loadRemote(e,r){const{host:n}=this;try{const{loadFactory:o=!0}=r||{loadFactory:!0},{module:a,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:c,remote:l,expose:d,id:h,remoteSnapshot:u}=i,p=await a.get(h,d,r,u),_=await this.hooks.lifecycle.onLoad.emit({id:h,pkgNameOrAlias:c,expose:d,exposeModule:o?p:void 0,exposeModuleFactory:o?void 0:p,remote:l,options:s,moduleInstance:a,origin:n});return this.setIdToRemoteMap(e,i),typeof _=="function"?_:p}catch(o){const{from:a="runtime"}=r||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:o,from:a,lifecycle:"onLoad",origin:n});if(!s)throw o;return s}}async preloadRemote(e){const{host:r}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:r.options,origin:r});const n=formatPreloadArgs(r.options.remotes,e);await Promise.all(n.map(async o=>{const{remote:a}=o,s=getRemoteInfo(a),{globalSnapshot:i,remoteSnapshot:c}=await r.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:r,preloadOptions:o,remote:a,remoteInfo:s,globalSnapshot:i,remoteSnapshot:c});l&&preloadAssets(s,r,l)}))}registerRemotes(e,r){const{host:n}=this;e.forEach(o=>{this.registerRemote(o,n.options.remotes,{force:r?.force})})}async getRemoteModuleAndOptions(e){const{host:r}=this,{id:n}=e;let o;try{o=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:r.options,origin:r})}catch(_){if(o=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:r.options,origin:r,from:"runtime",error:_,lifecycle:"beforeRequest"}),!o)throw _}const{id:a}=o,s=matchRemoteWithNameAndExpose(r.options.remotes,a);assert(s,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_004,errorCodes.runtimeDescMap,{hostName:r.options.name,requestId:a}));const{remote:i}=s,c=getRemoteInfo(i),l=await r.sharedHandler.hooks.lifecycle.afterResolve.emit({id:a,...s,options:r.options,origin:r,remoteInfo:c}),{remote:d,expose:h}=l;assert(d&&h,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${a}.`);let u=r.moduleCache.get(d.name);const p={host:r,remoteInfo:c};return u||(u=new Module(p),r.moduleCache.set(d.name,u)),{module:u,moduleOptions:p,remoteMatchInfo:l}}registerRemote(e,r,n){const{host:o}=this,a=()=>{if(e.alias){const i=r.find(c=>e.alias&&(c.name.startsWith(e.alias)||c.alias?.startsWith(e.alias)));assert(!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&&sdk.isBrowserEnv()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=DEFAULT_SCOPE),e.type||(e.type=DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:o});const s=r.find(i=>i.name===e.name);if(!s)a(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];n?.force&&(this.removeRemote(s),a(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o}),sdk.warn(i.join(" ")))}}removeRemote(e){try{const{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(s=>s.name===n);o!==-1&&r.options.remotes.splice(o,1);const a=r.moduleCache.get(e.name);if(a){const s=a.remoteInfo,i=s.entryGlobalName;CurrentGlobal[i]&&(Object.getOwnPropertyDescriptor(CurrentGlobal,i)?.configurable?delete CurrentGlobal[i]:CurrentGlobal[i]=void 0);const c=getRemoteEntryUniqueKey(a.remoteInfo);globalLoading[c]&&delete globalLoading[c],r.snapshotHandler.manifestCache.delete(s.entry);let l=s.buildVersion?sdk.composeKeyWithSeparator(s.name,s.buildVersion):s.name;const d=CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(u=>s.buildVersion?u.options.id===l:u.name===l);if(d!==-1){const u=CurrentGlobal.__FEDERATION__.__INSTANCES__[d];l=u.options.id||l;const p=getGlobalShareScope();let _=!0;const g=[];Object.keys(p).forEach(m=>{const y=p[m];y&&Object.keys(y).forEach(E=>{const b=y[E];b&&Object.keys(b).forEach(R=>{const S=b[R];S&&Object.keys(S).forEach(M=>{const I=S[M];I&&typeof I=="object"&&I.from===s.name&&(I.loaded||I.loading?(I.useIn=I.useIn.filter(N=>N!==s.name),I.useIn.length?_=!1:g.push([m,E,R,M])):g.push([m,E,R,M]))})})})}),_&&(u.shareScopeMap={},delete p[l]),g.forEach(([m,y,E,b])=>{delete p[m]?.[y]?.[E]?.[b]}),CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(d,1)}const{hostGlobalSnapshot:h}=getGlobalRemoteInfo(e,r);if(h){const u=h&&"remotesInfo"in h&&h.remotesInfo&&getInfoWithoutType(h.remotesInfo,e.name).key;u&&(delete h.remotesInfo[u],Global.__FEDERATION__.__MANIFEST_LOADING__[u]&&delete Global.__FEDERATION__.__MANIFEST_LOADING__[u])}r.moduleCache.delete(e.name)}}catch(r){logger.log("removeRemote fail: ",r)}}}const USE_SNAPSHOT=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;class ModuleFederation{constructor(e){this.hooks=new PluginSystem({beforeInit:new SyncWaterfallHook("beforeInit"),init:new SyncHook,beforeInitContainer:new AsyncWaterfallHook("beforeInitContainer"),initContainer:new AsyncWaterfallHook("initContainer")}),this.version="0.21.6",this.moduleCache=new Map,this.loaderHook=new PluginSystem({getModuleInfo:new SyncHook,createScript:new SyncHook,createLink:new SyncHook,fetch:new AsyncHook,loadEntryError:new AsyncHook,getModuleFactory:new AsyncHook}),this.bridgeHook=new PluginSystem({beforeBridgeRender:new SyncHook,afterBridgeRender:new SyncHook,beforeBridgeDestroy:new SyncHook,afterBridgeDestroy:new SyncHook});const r=USE_SNAPSHOT?[snapshotPlugin(),generatePreloadAssetsPlugin()]:[],n={id:getBuilderId$1(),name:e.name,plugins:r,remotes:[],shared:{},inBrowser:sdk.isBrowserEnv()};this.name=e.name,this.options=n,this.snapshotHandler=new SnapshotHandler(this),this.sharedHandler=new SharedHandler(this),this.remoteHandler=new RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){this.registerPlugins(e.plugins);const r=this.formatOptions(this.options,e);return this.options=r,r}async loadShare(e,r){return this.sharedHandler.loadShare(e,r)}loadShareSync(e,r){return this.sharedHandler.loadShareSync(e,r)}initializeSharing(e=DEFAULT_SCOPE,r){return this.sharedHandler.initializeSharing(e,r)}initRawContainer(e,r,n){const o=getRemoteInfo({name:e,entry:r}),a=new Module({host:this,remoteInfo:o});return a.remoteEntryExports=n,this.moduleCache.set(e,a),a}async loadRemote(e,r){return this.remoteHandler.loadRemote(e,r)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,r,n={}){this.sharedHandler.initShareScopeMap(e,r,n)}formatOptions(e,r){const{shared:n}=formatShareConfigs(e,r),{userOptions:o,options:a}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:r,options:e,shareInfo:n}),s=this.remoteHandler.formatAndRegisterRemote(a,o),{shared:i}=this.sharedHandler.registerShared(a,o),c=[...a.plugins];o.plugins&&o.plugins.forEach(d=>{c.includes(d)||c.push(d)});const l={...e,...r,plugins:c,remotes:s,shared:i};return this.hooks.lifecycle.init.emit({origin:this,options:l}),l}registerPlugins(e){const r=registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((n,o)=>(o&&n&&!n.find(a=>a.name===o.name)&&n.push(o),n),r||[])}registerRemotes(e,r){return this.remoteHandler.registerRemotes(e,r)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}}var index=Object.freeze({__proto__:null});index_cjs$2.loadScript=sdk.loadScript;index_cjs$2.loadScriptNode=sdk.loadScriptNode;index_cjs$2.CurrentGlobal=CurrentGlobal;index_cjs$2.Global=Global;index_cjs$2.Module=Module;index_cjs$2.ModuleFederation=ModuleFederation;index_cjs$2.addGlobalSnapshot=addGlobalSnapshot;index_cjs$2.assert=assert;index_cjs$2.getGlobalFederationConstructor=getGlobalFederationConstructor;index_cjs$2.getGlobalSnapshot=getGlobalSnapshot;index_cjs$2.getInfoWithoutType=getInfoWithoutType;index_cjs$2.getRegisteredShare=getRegisteredShare;index_cjs$2.getRemoteEntry=getRemoteEntry;index_cjs$2.getRemoteInfo=getRemoteInfo;index_cjs$2.helpers=helpers;index_cjs$2.isStaticResourcesEqual=isStaticResourcesEqual;index_cjs$2.matchRemoteWithNameAndExpose=matchRemoteWithNameAndExpose;index_cjs$2.registerGlobalPlugins=registerGlobalPlugins;index_cjs$2.resetFederationGlobalInfo=resetFederationGlobalInfo;index_cjs$2.safeWrapper=safeWrapper;index_cjs$2.satisfy=satisfy;index_cjs$2.setGlobalFederationConstructor=setGlobalFederationConstructor;index_cjs$2.setGlobalFederationInstance=setGlobalFederationInstance;index_cjs$2.types=index;var utils_cjs={},runtimeCore$1=index_cjs$2;function getBuilderId(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function getGlobalFederationInstance(t,e){const r=getBuilderId();return runtimeCore$1.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===t&&!n.options.version&&!e||n.options.name===t&&e&&n.options.version===e))}utils_cjs.getGlobalFederationInstance=getGlobalFederationInstance;var runtimeCore=index_cjs$2,utils=utils_cjs;function createInstance(t){const e=runtimeCore.getGlobalFederationConstructor()||runtimeCore.ModuleFederation,r=new e(t);return runtimeCore.setGlobalFederationInstance(r),r}let FederationInstance=null;function init(t){const e=utils.getGlobalFederationInstance(t.name,t.version);return e?(e.initOptions(t),FederationInstance||(FederationInstance=e),e):(FederationInstance=createInstance(t),FederationInstance)}runtimeCore.setGlobalFederationConstructor(runtimeCore.ModuleFederation);runtimeCore.Module;runtimeCore.ModuleFederation;runtimeCore.getRemoteEntry;runtimeCore.getRemoteInfo;runtimeCore.loadScript;runtimeCore.loadScriptNode;runtimeCore.registerGlobalPlugins;var init_1=init;const globalKey="__mf_init____mf__virtual/adminUI__mf_v__runtimeInit__mf_v__.js__";if(!globalThis[globalKey]){let t,e;const r=new Promise((n,o)=>{t=n,e=o});globalThis[globalKey]={initPromise:r,initResolve:t,initReject:e}}var adminUI__mf_v__runtimeInit__mf_v__=globalThis[globalKey];export{adminUI__mf_v__runtimeInit__mf_v__ as a,init_1 as i};
9
- //# sourceMappingURL=adminUI__mf_v__runtimeInit__mf_v__-Cm0AUItX.js.map