iobroker.javascript 9.0.18 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +13 -6
  2. package/admin/assets/OpenAiDialog-Dx-XNET0.js +13 -0
  3. package/admin/assets/{Save-C-o2LLTD.js → Save-Cld9qv9i.js} +1 -1
  4. package/admin/assets/ScriptEditor-BVaX7Hcs.js +2 -0
  5. package/admin/assets/ScriptEditorVanillaMonaco-yq11eIYC.js +1 -0
  6. package/admin/assets/createSvgIcon-DPvF8xqu.js +8 -0
  7. package/admin/assets/hostInit-LzITLWDa.js +1 -0
  8. package/admin/assets/index-BkyLyaYT.js +8 -0
  9. package/admin/assets/index-CLJ6-h9Q.js +1 -0
  10. package/admin/assets/index-COZhHfBn.js +1230 -0
  11. package/admin/assets/index-CVZSzCXy.js +1 -0
  12. package/admin/assets/index-Cu-TydZj.js +5 -0
  13. package/admin/assets/index-D8iYqogF.js +16 -0
  14. package/admin/assets/index-DlDUIfpA.js +193 -0
  15. package/admin/assets/index-Dnbw7_L3.js +986 -0
  16. package/admin/assets/index-Dsh1HfIY.js +1 -0
  17. package/admin/assets/index-gIA8x-8f.js +1 -0
  18. package/admin/assets/inheritsLoose-B0Ba5G9z.js +29 -0
  19. package/admin/assets/iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js +1 -0
  20. package/admin/assets/iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-QWG5Arqe.js +1 -0
  21. package/admin/assets/iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js +1 -0
  22. package/admin/assets/iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js +1 -0
  23. package/admin/assets/iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js +1 -0
  24. package/admin/assets/iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js +1 -0
  25. package/admin/assets/iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js +1 -0
  26. package/admin/assets/localSharedImportMap-AxgBkrOR.js +1 -0
  27. package/admin/assets/useTheme-hy6f3gra.js +1 -0
  28. package/admin/assets/virtualExposes-BPsCufin.js +1 -0
  29. package/admin/assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-C9suQF96.js +8 -0
  30. package/admin/custom/assets/Components-FfVbavBM.js +1 -0
  31. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-B7D2xOvV.js +1 -0
  32. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__.mjs-ClsgYnEX.js +1 -0
  33. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.mjs-B551AMx-.js +1 -0
  34. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-KsT5vKjV.js +1 -0
  35. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_x_mf_2_date_mf_2_pickers__loadShare__.mjs-DgHZUNxn.js +1 -0
  36. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare__leaflet__loadShare__.mjs-BYONkEgA.js +1 -0
  37. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs-0SjJESw9.js +1 -0
  38. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs_commonjs-proxy-CInLgMWW.js +1 -0
  39. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__.mjs-CL--xmjC.js +1 -0
  40. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-CorOEig8.js +1 -0
  41. package/admin/custom/assets/DefaultPropsProvider-CGb21NGY.js +1 -0
  42. package/admin/custom/assets/TextField-DNzklBSl.js +139 -0
  43. package/admin/custom/assets/ThemeProvider-B4G3jidj.js +29 -0
  44. package/admin/custom/assets/blue-CagzI6CQ.js +1 -0
  45. package/admin/custom/assets/createSvgIcon-ZdrQ8zSU.js +1 -0
  46. package/admin/custom/assets/createTheme-Wd4QxQE0.js +8 -0
  47. package/admin/custom/assets/defaultTheme-F2iJF2G2.js +1 -0
  48. package/admin/custom/assets/hostInit-iUL-wyj1.js +1 -0
  49. package/admin/custom/assets/index-AZB1OHDH.js +1 -0
  50. package/admin/custom/assets/index-Be7j5wvd.js +1523 -0
  51. package/admin/custom/assets/index-BptSiKBK.js +55 -0
  52. package/admin/custom/assets/index-Bvwv5H7k.js +1 -0
  53. package/admin/custom/assets/index-C0RmLaAj.js +1 -0
  54. package/admin/custom/assets/index-CYc31Gwg.js +960 -0
  55. package/admin/custom/assets/index-CmJ8HzSc.js +1 -0
  56. package/admin/custom/assets/index-D0iTiVVG.js +8 -0
  57. package/admin/custom/assets/index-DNdWk-cT.js +1 -0
  58. package/admin/custom/assets/index-Dp7A3XHd.js +7 -0
  59. package/admin/custom/assets/index-YBvFYuP6.js +31 -0
  60. package/admin/custom/assets/index-huvZQhZw.js +1 -0
  61. package/admin/custom/assets/index-iRHaQfi-.js +1 -0
  62. package/admin/custom/assets/isSameWeek-DDsSIa_t.js +1 -0
  63. package/admin/custom/assets/jsx-runtime-DfVU3AZG.js +1 -0
  64. package/admin/custom/assets/leaflet-src-k2rCV-Ix.js +1 -0
  65. package/admin/custom/assets/localSharedImportMap-BRxFonIn.js +1 -0
  66. package/admin/custom/assets/useTheme-BfhDdtAr.js +1 -0
  67. package/admin/custom/assets/useTheme-DWZ6jNyq.js +1 -0
  68. package/admin/custom/assets/virtualExposes-DyedJotb.js +2 -0
  69. package/admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-BtJxKB87.js +8 -0
  70. package/admin/custom/customComponents.js +1 -2
  71. package/admin/i18n/de.json +10 -1
  72. package/admin/i18n/en.json +10 -1
  73. package/admin/i18n/es.json +10 -1
  74. package/admin/i18n/fr.json +10 -1
  75. package/admin/i18n/it.json +10 -1
  76. package/admin/i18n/nl.json +10 -1
  77. package/admin/i18n/pl.json +10 -1
  78. package/admin/i18n/pt.json +10 -1
  79. package/admin/i18n/ru.json +10 -1
  80. package/admin/i18n/uk.json +10 -1
  81. package/admin/i18n/zh-cn.json +10 -1
  82. package/admin/jsonConfig.json +195 -130
  83. package/admin/mf-manifest.json +1 -1
  84. package/admin/remoteEntry.js +1 -2
  85. package/admin/tab.html +13 -8
  86. package/build/lib/javascript.d.ts +4 -2
  87. package/build/lib/nodeModulesManagement.js +3 -2
  88. package/build/lib/nodeModulesManagement.js.map +1 -1
  89. package/build/lib/protectFs.js +27 -12
  90. package/build/lib/protectFs.js.map +1 -1
  91. package/build/lib/sandbox.js +3 -3
  92. package/build/lib/sandbox.js.map +1 -1
  93. package/build/lib/tools.js +7 -2
  94. package/build/lib/tools.js.map +1 -1
  95. package/build/main.js +236 -19
  96. package/build/main.js.map +1 -1
  97. package/build/types.d.ts +5 -0
  98. package/docs/de/README.md +75 -0
  99. package/docs/en/README.md +75 -0
  100. package/io-package.json +19 -15
  101. package/package.json +14 -14
  102. package/admin/assets/OpenAiDialog-BVH3CrDi.js +0 -36
  103. package/admin/assets/ScriptEditor-CAoVSrVf.js +0 -2
  104. package/admin/assets/ScriptEditorVanillaMonaco-Cf9lA3Q5.js +0 -1
  105. package/admin/assets/_commonjsHelpers-Cpj98o6Y.js +0 -1
  106. package/admin/assets/createSvgIcon-XLoRKyxt.js +0 -30
  107. package/admin/assets/hostInit-OBG53iVO.js +0 -2
  108. package/admin/assets/index-BDco9K7T.js +0 -942
  109. package/admin/assets/index-C96hfBFW.js +0 -16
  110. package/admin/assets/index-CFhFEZTW.js +0 -5
  111. package/admin/assets/index-Cm-iTDHo.js +0 -193
  112. package/admin/assets/index-DCTpQXgR.js +0 -1294
  113. package/admin/assets/index-DKvqhUY5.js +0 -24
  114. package/admin/assets/index-DQiceR5U.js +0 -1
  115. package/admin/assets/index-DZ3lKVw8.js +0 -1
  116. package/admin/assets/index-DcrzW8Zn.js +0 -1
  117. package/admin/assets/index-Do-nCdWy.js +0 -9
  118. package/admin/assets/inheritsLoose-tR_kcxUR.js +0 -36
  119. package/admin/assets/iobroker_javascript__loadShare__react__loadShare__-6sH5wUl6.js +0 -1
  120. package/admin/assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CMP-NJnH.js +0 -8
  121. package/admin/assets/useTheme-C2oUi01-.js +0 -1
  122. package/admin/assets/virtualExposes-BIHI7g3E.js +0 -1
  123. package/admin/custom/assets/Components-DjQ_LxKw.js +0 -1
  124. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DaN0pfsw.js +0 -1
  125. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-BqzgglHd.js +0 -1
  126. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare__react__loadShare__-BNbscXK6.js +0 -1
  127. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-N2_tx_mJ.js +0 -1
  128. package/admin/custom/assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-jdUmHa_i.js +0 -5
  129. package/admin/custom/assets/DefaultPropsProvider-B8ZCC-c2.js +0 -1
  130. package/admin/custom/assets/DefaultPropsProvider-DfdXSIBu.js +0 -1
  131. package/admin/custom/assets/FilledInput-CSjr0QT8.js +0 -2
  132. package/admin/custom/assets/Tabs-CiTQkBjL.js +0 -138
  133. package/admin/custom/assets/ThemeProvider-C50pIiW4.js +0 -29
  134. package/admin/custom/assets/_commonjsHelpers-CE1G-McA.js +0 -1
  135. package/admin/custom/assets/createSvgIcon-C7qUEvjp.js +0 -1
  136. package/admin/custom/assets/createTheme-Bm92JF8u.js +0 -8
  137. package/admin/custom/assets/defaultTheme-BlO0eCf6.js +0 -1
  138. package/admin/custom/assets/hostInit-BJ6gSofk.js +0 -2
  139. package/admin/custom/assets/index-4wMOc304.js +0 -1
  140. package/admin/custom/assets/index-5CTGLw4h.js +0 -55
  141. package/admin/custom/assets/index-BkjEWGjf.js +0 -1
  142. package/admin/custom/assets/index-Bym4WjyH.js +0 -908
  143. package/admin/custom/assets/index-COcxCdeX.js +0 -8
  144. package/admin/custom/assets/index-CnpybLRW.js +0 -1
  145. package/admin/custom/assets/index-Db8nkuMR.js +0 -7
  146. package/admin/custom/assets/index-DcK0RDrH.js +0 -1
  147. package/admin/custom/assets/index-Df6OaCxx.js +0 -1
  148. package/admin/custom/assets/index-Dx7rDE4p.js +0 -1
  149. package/admin/custom/assets/index-t-NMdeH5.js +0 -31
  150. package/admin/custom/assets/index-u8R8UVCf.js +0 -1393
  151. package/admin/custom/assets/jsx-runtime-C1csJtRx.js +0 -1
  152. package/admin/custom/assets/leaflet-src-DpWQqQWv.js +0 -1
  153. package/admin/custom/assets/useEnhancedEffect-aUb-5tTL.js +0 -1
  154. package/admin/custom/assets/useTheme-Cgjfsi-1.js +0 -1
  155. package/admin/custom/assets/useTheme-DFGylj2o.js +0 -1
  156. package/admin/custom/assets/virtualExposes-C_DtjFte.js +0 -2
@@ -1,9 +0,0 @@
1
- import{g as T}from"./_commonjsHelpers-Cpj98o6Y.js";function V(e,t){for(var n=0;n<t.length;n++){const u=t[n];if(typeof u!="string"&&!Array.isArray(u)){for(const o in u)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(u,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>u[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var g={exports:{}},r={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var y=Symbol.for("react.element"),F=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),N=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),H=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),k=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=k&&e[k]||e["@@iterator"],typeof e=="function"?e:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,C={};function p(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||R}p.prototype.isReactComponent={};p.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};p.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function x(){}x.prototype=p.prototype;function v(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||R}var S=v.prototype=new x;S.constructor=v;j(S,p.prototype);S.isPureReactComponent=!0;var w=Array.isArray,O=Object.prototype.hasOwnProperty,E={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function I(e,t,n){var u,o={},i=null,s=null;if(t!=null)for(u in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)O.call(t,u)&&!P.hasOwnProperty(u)&&(o[u]=t[u]);var f=arguments.length-2;if(f===1)o.children=n;else if(1<f){for(var c=Array(f),a=0;a<f;a++)c[a]=arguments[a+2];o.children=c}if(e&&e.defaultProps)for(u in f=e.defaultProps,f)o[u]===void 0&&(o[u]=f[u]);return{$$typeof:y,type:e,key:i,ref:s,props:o,_owner:E.current}}function J(e,t){return{$$typeof:y,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function b(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}function K(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var $=/\/+/g;function m(e,t){return typeof e=="object"&&e!==null&&e.key!=null?K(""+e.key):t.toString(36)}function _(e,t,n,u,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case y:case F:s=!0}}if(s)return s=e,o=o(s),e=u===""?"."+m(s,0):u,w(o)?(n="",e!=null&&(n=e.replace($,"$&/")+"/"),_(o,t,n,"",function(a){return a})):o!=null&&(b(o)&&(o=J(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace($,"$&/")+"/")+e)),t.push(o)),1;if(s=0,u=u===""?".":u+":",w(e))for(var f=0;f<e.length;f++){i=e[f];var c=u+m(i,f);s+=_(i,t,n,c,o)}else if(c=G(e),typeof c=="function")for(e=c.call(e),f=0;!(i=e.next()).done;)i=i.value,c=u+m(i,f++),s+=_(i,t,n,c,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function d(e,t,n){if(e==null)return e;var u=[],o=0;return _(e,u,"","",function(i){return t.call(n,i,o++)}),u}function Q(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var l={current:null},h={transition:null},X={ReactCurrentDispatcher:l,ReactCurrentBatchConfig:h,ReactCurrentOwner:E};function A(){throw Error("act(...) is not supported in production builds of React.")}r.Children={map:d,forEach:function(e,t,n){d(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return d(e,function(){t++}),t},toArray:function(e){return d(e,function(t){return t})||[]},only:function(e){if(!b(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};r.Component=p;r.Fragment=U;r.Profiler=L;r.PureComponent=v;r.StrictMode=q;r.Suspense=B;r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X;r.act=A;r.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var u=j({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=E.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var f=e.type.defaultProps;for(c in t)O.call(t,c)&&!P.hasOwnProperty(c)&&(u[c]=t[c]===void 0&&f!==void 0?f[c]:t[c])}var c=arguments.length-2;if(c===1)u.children=n;else if(1<c){f=Array(c);for(var a=0;a<c;a++)f[a]=arguments[a+2];u.children=f}return{$$typeof:y,type:e.type,key:o,ref:i,props:u,_owner:s}};r.createContext=function(e){return e={$$typeof:N,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:M,_context:e},e.Consumer=e};r.createElement=I;r.createFactory=function(e){var t=I.bind(null,e);return t.type=e,t};r.createRef=function(){return{current:null}};r.forwardRef=function(e){return{$$typeof:z,render:e}};r.isValidElement=b;r.lazy=function(e){return{$$typeof:W,_payload:{_status:-1,_result:e},_init:Q}};r.memo=function(e,t){return{$$typeof:H,type:e,compare:t===void 0?null:t}};r.startTransition=function(e){var t=h.transition;h.transition={};try{e()}finally{h.transition=t}};r.unstable_act=A;r.useCallback=function(e,t){return l.current.useCallback(e,t)};r.useContext=function(e){return l.current.useContext(e)};r.useDebugValue=function(){};r.useDeferredValue=function(e){return l.current.useDeferredValue(e)};r.useEffect=function(e,t){return l.current.useEffect(e,t)};r.useId=function(){return l.current.useId()};r.useImperativeHandle=function(e,t,n){return l.current.useImperativeHandle(e,t,n)};r.useInsertionEffect=function(e,t){return l.current.useInsertionEffect(e,t)};r.useLayoutEffect=function(e,t){return l.current.useLayoutEffect(e,t)};r.useMemo=function(e,t){return l.current.useMemo(e,t)};r.useReducer=function(e,t,n){return l.current.useReducer(e,t,n)};r.useRef=function(e){return l.current.useRef(e)};r.useState=function(e){return l.current.useState(e)};r.useSyncExternalStore=function(e,t,n){return l.current.useSyncExternalStore(e,t,n)};r.useTransition=function(){return l.current.useTransition()};r.version="18.3.1";g.exports=r;var D=g.exports;const Y=T(D),ee=V({__proto__:null,default:Y},[D]);export{ee as i};
@@ -1,36 +0,0 @@
1
- import{g as Be}from"./_commonjsHelpers-Cpj98o6Y.js";import{a as gt}from"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CMP-NJnH.js";import{i,a as bt}from"./iobroker_javascript__loadShare__react__loadShare__-6sH5wUl6.js";import{ai as Qe,aj as Ct,ak as Ze,al as Fe,am as vt,an as _t,ao as $t,ap as xt,j as b,aq as Mt,ar as Et,as as Tt,u as wt,at as Pt,n as et,au as jt,T as N,b as kt,ad as Ot,h as It}from"./createSvgIcon-XLoRKyxt.js";const{initPromise:At}=gt,Lt=At.then(e=>e.loadShare("react-dom",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),Rt=await Lt.then(e=>e());var Dt=Rt;const wr=Be(Dt);var tt={exports:{}},d={};/** @license React v16.13.1
2
- * react-is.production.min.js
3
- *
4
- * Copyright (c) Facebook, Inc. and its affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */var C=typeof Symbol=="function"&&Symbol.for,ye=C?Symbol.for("react.element"):60103,pe=C?Symbol.for("react.portal"):60106,J=C?Symbol.for("react.fragment"):60107,X=C?Symbol.for("react.strict_mode"):60108,W=C?Symbol.for("react.profiler"):60114,B=C?Symbol.for("react.provider"):60109,Q=C?Symbol.for("react.context"):60110,Se=C?Symbol.for("react.async_mode"):60111,Z=C?Symbol.for("react.concurrent_mode"):60111,ee=C?Symbol.for("react.forward_ref"):60112,te=C?Symbol.for("react.suspense"):60113,Vt=C?Symbol.for("react.suspense_list"):60120,re=C?Symbol.for("react.memo"):60115,oe=C?Symbol.for("react.lazy"):60116,Nt=C?Symbol.for("react.block"):60121,Ft=C?Symbol.for("react.fundamental"):60117,Kt=C?Symbol.for("react.responder"):60118,qt=C?Symbol.for("react.scope"):60119;function M(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ye:switch(e=e.type,e){case Se:case Z:case J:case W:case X:case te:return e;default:switch(e=e&&e.$$typeof,e){case Q:case ee:case oe:case re:case B:return e;default:return t}}case pe:return t}}}function rt(e){return M(e)===Z}d.AsyncMode=Se;d.ConcurrentMode=Z;d.ContextConsumer=Q;d.ContextProvider=B;d.Element=ye;d.ForwardRef=ee;d.Fragment=J;d.Lazy=oe;d.Memo=re;d.Portal=pe;d.Profiler=W;d.StrictMode=X;d.Suspense=te;d.isAsyncMode=function(e){return rt(e)||M(e)===Se};d.isConcurrentMode=rt;d.isContextConsumer=function(e){return M(e)===Q};d.isContextProvider=function(e){return M(e)===B};d.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ye};d.isForwardRef=function(e){return M(e)===ee};d.isFragment=function(e){return M(e)===J};d.isLazy=function(e){return M(e)===oe};d.isMemo=function(e){return M(e)===re};d.isPortal=function(e){return M(e)===pe};d.isProfiler=function(e){return M(e)===W};d.isStrictMode=function(e){return M(e)===X};d.isSuspense=function(e){return M(e)===te};d.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===J||e===Z||e===W||e===X||e===te||e===Vt||typeof e=="object"&&e!==null&&(e.$$typeof===oe||e.$$typeof===re||e.$$typeof===B||e.$$typeof===Q||e.$$typeof===ee||e.$$typeof===Ft||e.$$typeof===Kt||e.$$typeof===qt||e.$$typeof===Nt)};d.typeOf=M;tt.exports=d;var Gt=tt.exports,ge=Gt,zt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ht={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ut={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ot={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},be={};be[ge.ForwardRef]=Ut;be[ge.Memo]=ot;function Ke(e){return ge.isMemo(e)?ot:be[e.$$typeof]||zt}var Yt=Object.defineProperty,Jt=Object.getOwnPropertyNames,qe=Object.getOwnPropertySymbols,Xt=Object.getOwnPropertyDescriptor,Wt=Object.getPrototypeOf,Ge=Object.prototype;function nt(e,t,r){if(typeof t!="string"){if(Ge){var o=Wt(t);o&&o!==Ge&&nt(e,o,r)}var c=Jt(t);qe&&(c=c.concat(qe(t)));for(var s=Ke(e),n=Ke(t),l=0;l<c.length;++l){var a=c[l];if(!Ht[a]&&!(r&&r[a])&&!(n&&n[a])&&!(s&&s[a])){var S=Xt(t,a);try{Yt(e,a,S)}catch{}}}}return e}var Bt=nt;const Pr=Be(Bt);var ze=function(t,r){var o=arguments;if(r==null||!_t.call(r,"css"))return i.createElement.apply(void 0,o);var c=o.length,s=new Array(c);s[0]=$t,s[1]=xt(t,r);for(var n=2;n<c;n++)s[n]=o[n];return i.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(ze||(ze={}));var Qt=Ct(function(e,t){var r=e.styles,o=Qe([r],void 0,i.useContext(Ze)),c=i.useRef();return Fe(function(){var s=t.key+"-global",n=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,a=document.querySelector('style[data-emotion="'+s+" "+o.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),a!==null&&(l=!0,a.setAttribute("data-emotion",s),n.hydrate([a])),c.current=[n,l],function(){n.flush()}},[t]),Fe(function(){var s=c.current,n=s[0],l=s[1];if(l){s[1]=!1;return}if(o.next!==void 0&&vt(t,o.next,!0),n.tags.length){var a=n.tags[n.tags.length-1].nextElementSibling;n.before=a,n.flush()}t.insert("",o,n,!1)},[t,o.name]),null});function Zt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Qe(t)}function jr(){var e=Zt.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const fe=new Map,er=(e,t)=>{const r=Et(e);return r.sheet=new t({key:r.key,nonce:r.sheet.nonce,container:r.sheet.container,speedy:r.sheet.isSpeedy,prepend:r.sheet.prepend,insertionPoint:r.sheet.insertionPoint}),r};let I;if(typeof document=="object"&&(I=document.querySelector('[name="emotion-insertion-point"]'),!I)){I=document.createElement("meta"),I.setAttribute("name","emotion-insertion-point"),I.setAttribute("content","");const e=document.querySelector("head");e&&e.prepend(I)}function tr(e,t){if(e||t){class r extends Tt{insert(s,n){return this.key&&this.key.endsWith("global")&&(this.before=I),super.insert(s,n)}}const o=er({key:"css",insertionPoint:e?I:void 0},r);if(t){const c=o.insert;o.insert=(...s)=>(s[1].styles.match(/^@layer\s+[^{]*$/)||(s[1].styles=`@layer mui {${s[1].styles}}`),c(...s))}return o}}function kr(e){const{injectFirst:t,enableCssLayer:r,children:o}=e,c=i.useMemo(()=>{const s=`${t}-${r}`;if(typeof document=="object"&&fe.has(s))return fe.get(s);const n=tr(t,r);return fe.set(s,n),n},[t,r]);return c?b.jsx(Mt,{value:c,children:o}):o}function rr(e){return e==null||Object.keys(e).length===0}function st(e){const{styles:t,defaultTheme:r={}}=e,o=typeof t=="function"?c=>t(rr(c)?r:c):t;return b.jsx(Qt,{styles:o})}function de(e){const t=Pt(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function or({styles:e,themeId:t,defaultTheme:r={}}){const o=wt(r),c=t&&o[t]||o;let s=typeof e=="function"?e(c):e;return c.modularCssLayers&&(Array.isArray(s)?s=s.map(n=>de(typeof n=="function"?n(c):n)):s=de(s)),b.jsx(st,{styles:s})}const ct=typeof window<"u"?i.useLayoutEffect:i.useEffect;let He=0;function nr(e){const[t,r]=i.useState(e),o=e||t;return i.useEffect(()=>{t==null&&(He+=1,r(`mui-${He}`))},[t]),o}const sr={...bt},Ue=sr.useId;function cr(e){if(Ue!==void 0){const t=Ue();return e??t}return nr(e)}const it=i.createContext(null);function Ce(){return i.useContext(it)}const ir=typeof Symbol=="function"&&Symbol.for,ar=ir?Symbol.for("mui.nested"):"__THEME_NESTED__";function lr(e,t){return typeof t=="function"?t(e):{...e,...t}}function ur(e){const{children:t,theme:r}=e,o=Ce(),c=i.useMemo(()=>{const s=o===null?{...r}:lr(o,r);return s!=null&&(s[ar]=o!==null),s},[r,o]);return b.jsx(it.Provider,{value:c,children:t})}const at=i.createContext();function fr({value:e,...t}){return b.jsx(at.Provider,{value:e??!0,...t})}const Or=()=>i.useContext(at)??!1;function dr(e){const t=et(),r=cr()||"",{modularCssLayers:o}=e;let c="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!o||t!==null?c="":typeof o=="string"?c=o.replace(/mui(?!\.)/g,c):c=`@layer ${c};`,ct(()=>{var l,a;const s=document.querySelector("head");if(!s)return;const n=s.firstChild;if(c){if(n&&((l=n.hasAttribute)!=null&&l.call(n,"data-mui-layer-order"))&&n.getAttribute("data-mui-layer-order")===r)return;const S=document.createElement("style");S.setAttribute("data-mui-layer-order",r),S.textContent=c,s.prepend(S)}else(a=s.querySelector(`style[data-mui-layer-order="${r}"]`))==null||a.remove()},[c,r]),c?b.jsx(or,{styles:c}):null}const Ye={};function Je(e,t,r,o=!1){return i.useMemo(()=>{const c=e&&t[e]||t;if(typeof r=="function"){const s=r(c),n=e?{...t,[e]:s}:s;return o?()=>n:n}return e?{...t,[e]:r}:{...t,...r}},[e,t,r,o])}function lt(e){const{children:t,theme:r,themeId:o}=e,c=et(Ye),s=Ce()||Ye,n=Je(o,c,r),l=Je(o,s,r,!0),a=(o?n[o]:n).direction==="rtl",S=dr(n);return b.jsx(ur,{theme:l,children:b.jsx(Ze.Provider,{value:n,children:b.jsx(fr,{value:a,children:b.jsxs(jt,{value:o?n[o].components:n.components,children:[S,t]})})})})}const ve="mode",_e="color-scheme",mr="data-color-scheme";function hr(e){const{defaultMode:t="system",defaultLightColorScheme:r="light",defaultDarkColorScheme:o="dark",modeStorageKey:c=ve,colorSchemeStorageKey:s=_e,attribute:n=mr,colorSchemeNode:l="document.documentElement",nonce:a}=e||{};let S="",v=n;if(n==="class"&&(v=".%s"),n==="data"&&(v="[data-%s]"),v.startsWith(".")){const p=v.substring(1);S+=`${l}.classList.remove('${p}'.replace('%s', light), '${p}'.replace('%s', dark));
9
- ${l}.classList.add('${p}'.replace('%s', colorScheme));`}const P=v.match(/\[([^\]]+)\]/);if(P){const[p,h]=P[1].split("=");h||(S+=`${l}.removeAttribute('${p}'.replace('%s', light));
10
- ${l}.removeAttribute('${p}'.replace('%s', dark));`),S+=`
11
- ${l}.setAttribute('${p}'.replace('%s', colorScheme), ${h?`${h}.replace('%s', colorScheme)`:'""'});`}else S+=`${l}.setAttribute('${v}', colorScheme);`;return b.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?a:"",dangerouslySetInnerHTML:{__html:`(function() {
12
- try {
13
- let colorScheme = '';
14
- const mode = localStorage.getItem('${c}') || '${t}';
15
- const dark = localStorage.getItem('${s}-dark') || '${o}';
16
- const light = localStorage.getItem('${s}-light') || '${r}';
17
- if (mode === 'system') {
18
- // handle system mode
19
- const mql = window.matchMedia('(prefers-color-scheme: dark)');
20
- if (mql.matches) {
21
- colorScheme = dark
22
- } else {
23
- colorScheme = light
24
- }
25
- }
26
- if (mode === 'light') {
27
- colorScheme = light;
28
- }
29
- if (mode === 'dark') {
30
- colorScheme = dark;
31
- }
32
- if (colorScheme) {
33
- ${S}
34
- }
35
- } catch(e){}})();`}},"mui-color-scheme-init")}function yr(){}const pr=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(r){if(typeof window>"u")return;if(!t)return r;let o;try{o=t.localStorage.getItem(e)}catch{}return o||r},set:r=>{if(t)try{t.localStorage.setItem(e,r)}catch{}},subscribe:r=>{if(!t)return yr;const o=c=>{const s=c.newValue;c.key===e&&r(s)};return t.addEventListener("storage",o),()=>{t.removeEventListener("storage",o)}}});function me(){}function Xe(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ut(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function Sr(e){return ut(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function gr(e){const{defaultMode:t="light",defaultLightColorScheme:r,defaultDarkColorScheme:o,supportedColorSchemes:c=[],modeStorageKey:s=ve,colorSchemeStorageKey:n=_e,storageWindow:l=typeof window>"u"?void 0:window,storageManager:a=pr,noSsr:S=!1}=e,v=c.join(","),P=c.length>1,p=i.useMemo(()=>a==null?void 0:a({key:s,storageWindow:l}),[a,s,l]),h=i.useMemo(()=>a==null?void 0:a({key:`${n}-light`,storageWindow:l}),[a,n,l]),g=i.useMemo(()=>a==null?void 0:a({key:`${n}-dark`,storageWindow:l}),[a,n,l]),[k,R]=i.useState(()=>{const u=(p==null?void 0:p.get(t))||t,f=(h==null?void 0:h.get(r))||r,m=(g==null?void 0:g.get(o))||o;return{mode:u,systemMode:Xe(u),lightColorScheme:f,darkColorScheme:m}}),[A,ne]=i.useState(S||!P);i.useEffect(()=>{ne(!0)},[]);const F=Sr(k),K=i.useCallback(u=>{R(f=>{if(u===f.mode)return f;const m=u??t;return p==null||p.set(m),{...f,mode:m,systemMode:Xe(m)}})},[p,t]),D=i.useCallback(u=>{u?typeof u=="string"?u&&!v.includes(u)?console.error(`\`${u}\` does not exist in \`theme.colorSchemes\`.`):R(f=>{const m={...f};return ut(f,y=>{y==="light"&&(h==null||h.set(u),m.lightColorScheme=u),y==="dark"&&(g==null||g.set(u),m.darkColorScheme=u)}),m}):R(f=>{const m={...f},y=u.light===null?r:u.light,L=u.dark===null?o:u.dark;return y&&(v.includes(y)?(m.lightColorScheme=y,h==null||h.set(y)):console.error(`\`${y}\` does not exist in \`theme.colorSchemes\`.`)),L&&(v.includes(L)?(m.darkColorScheme=L,g==null||g.set(L)):console.error(`\`${L}\` does not exist in \`theme.colorSchemes\`.`)),m}):R(f=>(h==null||h.set(r),g==null||g.set(o),{...f,lightColorScheme:r,darkColorScheme:o}))},[v,h,g,r,o]),q=i.useCallback(u=>{k.mode==="system"&&R(f=>{const m=u!=null&&u.matches?"dark":"light";return f.systemMode===m?f:{...f,systemMode:m}})},[k.mode]),U=i.useRef(q);return U.current=q,i.useEffect(()=>{if(typeof window.matchMedia!="function"||!P)return;const u=(...m)=>U.current(...m),f=window.matchMedia("(prefers-color-scheme: dark)");return f.addListener(u),u(f),()=>{f.removeListener(u)}},[P]),i.useEffect(()=>{if(P){const u=(p==null?void 0:p.subscribe(y=>{(!y||["light","dark","system"].includes(y))&&K(y||t)}))||me,f=(h==null?void 0:h.subscribe(y=>{(!y||v.match(y))&&D({light:y})}))||me,m=(g==null?void 0:g.subscribe(y=>{(!y||v.match(y))&&D({dark:y})}))||me;return()=>{u(),f(),m()}}},[D,K,v,t,l,P,p,h,g]),{...k,mode:A?k.mode:void 0,systemMode:A?k.systemMode:void 0,colorScheme:A?F:void 0,setMode:K,setColorScheme:D}}const br="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Cr(e){const{themeId:t,theme:r={},modeStorageKey:o=ve,colorSchemeStorageKey:c=_e,disableTransitionOnChange:s=!1,defaultColorScheme:n,resolveTheme:l}=e,a={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},S=i.createContext(void 0),v=()=>i.useContext(S)||a,P={},p={};function h(A){var Re,De,Ve,Ne;const{children:ne,theme:F,modeStorageKey:K=o,colorSchemeStorageKey:D=c,disableTransitionOnChange:q=s,storageManager:U,storageWindow:u=typeof window>"u"?void 0:window,documentNode:f=typeof document>"u"?void 0:document,colorSchemeNode:m=typeof document>"u"?void 0:document.documentElement,disableNestedContext:y=!1,disableStyleSheetGeneration:L=!1,defaultMode:dt="system",noSsr:mt}=A,se=i.useRef(!1),ce=Ce(),ie=i.useContext(S),ae=!!ie&&!y,$e=i.useMemo(()=>F||(typeof r=="function"?r():r),[F]),xe=$e[t],E=xe||$e,{colorSchemes:O=P,components:Me=p,cssVarPrefix:le}=E,Ee=Object.keys(O).filter(_=>!!O[_]).join(","),V=i.useMemo(()=>Ee.split(","),[Ee]),Te=typeof n=="string"?n:n.light,we=typeof n=="string"?n:n.dark,ht=O[Te]&&O[we]?dt:((De=(Re=O[E.defaultColorScheme])==null?void 0:Re.palette)==null?void 0:De.mode)||((Ve=E.palette)==null?void 0:Ve.mode),{mode:yt,setMode:Pe,systemMode:je,lightColorScheme:ke,darkColorScheme:Oe,colorScheme:pt,setColorScheme:Ie}=gr({supportedColorSchemes:V,defaultLightColorScheme:Te,defaultDarkColorScheme:we,modeStorageKey:K,colorSchemeStorageKey:D,defaultMode:ht,storageManager:U,storageWindow:u,noSsr:mt});let ue=yt,T=pt;ae&&(ue=ie.mode,T=ie.colorScheme);const G=i.useMemo(()=>{var H;const _=T||E.defaultColorScheme,$=((H=E.generateThemeVars)==null?void 0:H.call(E))||E.vars,x={...E,components:Me,colorSchemes:O,cssVarPrefix:le,vars:$};if(typeof x.generateSpacing=="function"&&(x.spacing=x.generateSpacing()),_){const w=O[_];w&&typeof w=="object"&&Object.keys(w).forEach(j=>{w[j]&&typeof w[j]=="object"?x[j]={...x[j],...w[j]}:x[j]=w[j]})}return l?l(x):x},[E,T,Me,O,le]),z=E.colorSchemeSelector;ct(()=>{if(T&&m&&z&&z!=="media"){const _=z;let $=z;if(_==="class"&&($=".%s"),_==="data"&&($="[data-%s]"),_!=null&&_.startsWith("data-")&&!_.includes("%s")&&($=`[${_}="%s"]`),$.startsWith("."))m.classList.remove(...V.map(x=>$.substring(1).replace("%s",x))),m.classList.add($.substring(1).replace("%s",T));else{const x=$.replace("%s",T).match(/\[([^\]]+)\]/);if(x){const[H,w]=x[1].split("=");w||V.forEach(j=>{m.removeAttribute(H.replace(T,j))}),m.setAttribute(H,w?w.replace(/"|'/g,""):"")}else m.setAttribute($,T)}}},[T,z,m,V]),i.useEffect(()=>{let _;if(q&&se.current&&f){const $=f.createElement("style");$.appendChild(f.createTextNode(br)),f.head.appendChild($),window.getComputedStyle(f.body),_=setTimeout(()=>{f.head.removeChild($)},1)}return()=>{clearTimeout(_)}},[T,q,f]),i.useEffect(()=>(se.current=!0,()=>{se.current=!1}),[]);const St=i.useMemo(()=>({allColorSchemes:V,colorScheme:T,darkColorScheme:Oe,lightColorScheme:ke,mode:ue,setColorScheme:Ie,setMode:Pe,systemMode:je}),[V,T,Oe,ke,ue,Ie,Pe,je,G.colorSchemeSelector]);let Ae=!0;(L||E.cssVariables===!1||ae&&(ce==null?void 0:ce.cssVarPrefix)===le)&&(Ae=!1);const Le=b.jsxs(i.Fragment,{children:[b.jsx(lt,{themeId:xe?t:void 0,theme:G,children:ne}),Ae&&b.jsx(st,{styles:((Ne=G.generateStyleSheets)==null?void 0:Ne.call(G))||[]})]});return ae?Le:b.jsx(S.Provider,{value:St,children:Le})}const g=typeof n=="string"?n:n.light,k=typeof n=="string"?n:n.dark;return{CssVarsProvider:h,useColorScheme:v,getInitColorSchemeScript:A=>hr({colorSchemeStorageKey:c,defaultLightColorScheme:g,defaultDarkColorScheme:k,modeStorageKey:o,...A})}}function vr({theme:e,...t}){const r=N in e?e[N]:void 0;return b.jsx(lt,{...t,themeId:r?N:void 0,theme:r||e})}const Y={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:ft,useColorScheme:Ir,getInitColorSchemeScript:_r}=Cr({themeId:N,theme:()=>kt({cssVariables:!0}),colorSchemeStorageKey:Y.colorSchemeStorageKey,modeStorageKey:Y.modeStorageKey,defaultColorScheme:{light:Y.defaultLightColorScheme,dark:Y.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:Ot(e.palette,e.typography)};return t.unstable_sx=function(o){return It({sx:o,theme:this})},t}});function Ar(e){return b.jsx(ft,{...e})}let We=!1;const Lr=e=>(We||(console.warn(["MUI: The getInitColorSchemeScript function has been deprecated.","","You should use `import InitColorSchemeScript from '@mui/material/InitColorSchemeScript'`","and replace the function call with `<InitColorSchemeScript />` instead."].join(`
36
- `)),We=!0),_r(e)),$r=ft;function Rr({theme:e,...t}){const r=i.useMemo(()=>{if(typeof e=="function")return e;const o=N in e?e[N]:e;return"colorSchemes"in o?null:"vars"in o?e:{...e,vars:null}},[e]);return r?b.jsx(vr,{theme:r,...t}):b.jsx($r,{theme:e,...t})}const Dr={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"};function Vr(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},he(e,t)}function Nr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,he(e,t)}export{$r as C,Ar as E,or as G,wr as R,kr as S,Rr as T,Nr as _,Vr as a,cr as b,Zt as c,Or as d,Ir as e,Lr as g,Dt as i,jr as k,Pr as m,ct as u,Dr as y};
@@ -1 +0,0 @@
1
- import{g as i}from"./_commonjsHelpers-Cpj98o6Y.js";import{a as _}from"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CMP-NJnH.js";function c(e,n){for(var o=0;o<n.length;o++){const r=n[o];if(typeof r!="string"&&!Array.isArray(r)){for(const t in r)if(t!=="default"&&!(t in e)){const a=Object.getOwnPropertyDescriptor(r,t);a&&Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>r[t]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const{initPromise:f}=_,l=f.then(e=>e.loadShare("react",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),u=await l.then(e=>e());var s=u;const p=i(s),d=c({__proto__:null,default:p},[s]);export{p as R,d as a,s as i};
@@ -1,8 +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==null?void 0: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 o=t.split(r),n=getProcessEnv().NODE_ENV==="development"&&e,a="*",i=s=>s.startsWith("http")||s.includes(MANIFEST_EXT);if(o.length>=2){let[s,...c]=o;t.startsWith(r)&&(s=o.slice(0,2).join(r),c=[n||o.slice(2).join(r)]);let l=n||c.join(r);return i(l)?{name:s,entry:l}:{name:s,version:l||a}}else if(o.length===1){const[s]=o;return n&&i(n)?{name:s,entry:n}:{name:s,version:n||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 o=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])}${o}`}catch(o){throw o}},decodeName=function(t,e,r){try{let o=t;if(e){if(!o.startsWith(e))return o;o=o.replace(new RegExp(e,"g"),"")}return o=o.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&&(o=o.replace(".js","")),o}catch(o){throw o}},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 o=(n=>{if(n===".")return"";if(n.startsWith("./"))return n.replace("./","");if(n.startsWith("/")){const a=n.slice(1);return a.endsWith("/")?a.slice(0,-1):a}return n})(t);return o?o.endsWith("/")?`${o}${e}`:`${o}/${e}`:e};function inferAutoPublicPath(t){return t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function generateSnapshotFromManifest(t,e={}){var S,b,I;const{remotes:r={},overrides:o={},version:n}=e;let a;const i=()=>"publicPath"in t.metaData?t.metaData.publicPath==="auto"&&n?inferAutoPublicPath(n):t.metaData.publicPath:t.metaData.getPublicPath,s=Object.keys(o);let c={};Object.keys(r).length||(c=((S=t.remotes)==null?void 0:S.reduce((E,R)=>{let T;const $=R.federationContainerName;return s.includes($)?T=o[$]:"version"in R?T=R.version:T=R.entry,E[$]={matchedVersion:T},E},{}))||{}),Object.keys(r).forEach(E=>c[E]={matchedVersion:s.includes(E)?o[E]:r[E]});const{remoteEntry:{path:l,name:d,type:u},types:h={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:m},globalName:_,ssrRemoteEntry:g}=t.metaData,{exposes:p}=t;let y={version:n||"",buildVersion:m,globalName:_,remoteEntry:simpleJoinRemoteEntry(l,d),remoteEntryType:u,remoteTypes:simpleJoinRemoteEntry(h.path,h.name),remoteTypesZip:h.zip||"",remoteTypesAPI:h.api||"",remotesInfo:c,shared:t==null?void 0:t.shared.map(E=>({assets:E.assets,sharedName:E.name,version:E.version})),modules:p==null?void 0:p.map(E=>({moduleName:E.name,modulePath:E.path,assets:E.assets}))};if((b=t.metaData)!=null&&b.prefetchInterface){const E=t.metaData.prefetchInterface;y={...y,prefetchInterface:E}}if((I=t.metaData)!=null&&I.prefetchEntry){const{path:E,name:R,type:T}=t.metaData.prefetchEntry;y={...y,prefetchEntry:simpleJoinRemoteEntry(E,R),prefetchEntryType:T}}if("publicPath"in t.metaData?a={...y,publicPath:i(),ssrPublicPath:t.metaData.ssrPublicPath}:a={...y,getPublicPath:i()},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 o=".json",n=c=>c.endsWith(o)?c:`${c}${o}`,a=(c,l)=>c.replace(o,`${l}${o}`),i=r?n(r):ManifestFileName,s=r?a(i,"-stats"):StatsFileName;return{statsFileName:simpleJoinRemoteEntry(e,s),manifestFileName:simpleJoinRemoteEntry(e,i)}}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(n=>!LOGGER_STACK_SKIP_TOKENS.some(a=>n.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 o=this.delegate,a=isDebugMode()?captureStackTrace():void 0,i=a?[...r,a]:r,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"];case"debug":default:return["debug","log"]}})();for(const c of s){const l=o[c];if(typeof l=="function"){l.call(o,this.prefix,...i);return}}for(const c of s){const l=DEFAULT_DELEGATE[c];if(typeof l=="function"){l.call(DEFAULT_DELEGATE,this.prefix,...i);return}}}log(...e){this.emit("log",e)}warn(...e){this.emit("warn",e)}error(...e){this.emit("error",e)}success(...e){this.emit("info",e)}info(...e){this.emit("info",e)}ready(...e){this.emit("info",e)}debug(...e){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!=null&&e.getInfrastructureLogger)try{const o=e.getInfrastructureLogger(r);o&&typeof o=="object"&&(typeof o.log=="function"||typeof o.info=="function"||typeof o.warn=="function"||typeof o.error=="function")&&t.setDelegate(o)}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,o=t.replace(r,"").replace(/\/$/,""),n=e.replace(r,"").replace(/\/$/,"");return o===n}function createScript(t){let e=null,r=!0,o=2e4,n;const a=document.getElementsByTagName("script");for(let s=0;s<a.length;s++){const c=a[s],l=c.getAttribute("src");if(l&&isStaticResourcesEqual$1(l,t.url)){e=c,r=!1;break}}if(!e){const s=t.attrs;e=document.createElement("script"),e.type=(s==null?void 0:s.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&&(o=c.timeout))),e.src||(e.src=t.url),s&&!c&&Object.keys(s).forEach(l=>{e&&(l==="async"||l==="defer"?e[l]=s[l]:e.getAttribute(l)||e.setAttribute(l,s[l]))})}const i=async(s,c)=>{clearTimeout(n);const l=()=>{(c==null?void 0:c.type)==="error"?t!=null&&t.onErrorCallback&&(t==null||t.onErrorCallback(c)):t!=null&&t.cb&&(t==null||t.cb())};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteScript:d=!0}=t;d&&e!=null&&e.parentNode&&e.parentNode.removeChild(e)}),s&&typeof s=="function")){const d=s(c);if(d instanceof Promise){const u=await d;return l(),u}return l(),d}l()};return e.onerror=i.bind(null,e.onerror),e.onload=i.bind(null,e.onload),n=setTimeout(()=>{i(null,new Error(`Remote script "${t.url}" time-outed.`))},o),{script:e,needAttach:r}}function createLink(t){let e=null,r=!0;const o=document.getElementsByTagName("link");for(let a=0;a<o.length;a++){const i=o[a],s=i.getAttribute("href"),c=i.getAttribute("rel");if(s&&isStaticResourcesEqual$1(s,t.url)&&c===t.attrs.rel){e=i,r=!1;break}}if(!e){e=document.createElement("link"),e.setAttribute("href",t.url);let a;const i=t.attrs;t.createLinkHook&&(a=t.createLinkHook(t.url,i),a instanceof HTMLLinkElement&&(e=a)),i&&!a&&Object.keys(i).forEach(s=>{e&&!e.getAttribute(s)&&e.setAttribute(s,i[s])})}const n=(a,i)=>{const s=()=>{(i==null?void 0:i.type)==="error"?t!=null&&t.onErrorCallback&&(t==null||t.onErrorCallback(i)):t!=null&&t.cb&&(t==null||t.cb())};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteLink:c=!0}=t;c&&e!=null&&e.parentNode&&e.parentNode.removeChild(e)}),a)){const c=a(i);return s(),c}s()};return e.onerror=n.bind(null,e.onerror),e.onload=n.bind(null,e.onload),{link:e,needAttach:r}}function loadScript(t,e){const{attrs:r={},createScriptHook:o}=e;return new Promise((n,a)=>{const{script:i,needAttach:s}=createScript({url:t,cb:n,onErrorCallback:a,attrs:{fetchpriority:"high",...r},createScriptHook:o,needDeleteScript:!0});s&&document.head.appendChild(i)})}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(o=>o).catch(o=>{throw console.error(`Error importing module ${t}:`,o),sdkImportCache.delete(t),o});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 n=await((a,i)=>r.lifecycle.fetch.emit(a,i))(t,e||{});return!n||!(n instanceof Response)?(typeof fetch>"u"?await loadNodeFetch():fetch)(t,e||{}):n},createScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(url,cb,attrs,loaderHook)=>{if(loaderHook!=null&&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!=null&&loaderHook.fetch?(t,e)=>lazyLoaderHookFetch(t,e,loaderHook):typeof fetch>"u"?loadNodeFetch():fetch,handleScriptFetch=async(f,urlObj)=>{var t;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:((t=vm.constants)==null?void 0:t.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 e=exportedInterface[attrs.globalName]||exportedInterface;cb(void 0,e);return}cb(void 0,exportedInterface)}catch(e){cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))}};getFetch().then(async t=>{if((attrs==null?void 0:attrs.type)==="esm"||(attrs==null?void 0: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,o)=>{e(new Error("createScriptNode is disabled in non-Node.js environment"))},loadScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(t,e)=>new Promise((r,o)=>{createScriptNode(t,(n,a)=>{var i,s;if(n)o(n);else{const c=((i=e==null?void 0:e.attrs)==null?void 0:i.globalName)||`__FEDERATION_${(s=e==null?void 0:e.attrs)==null?void 0:s.name}:custom__`,l=globalThis[c]=a;r(l)}},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:o}=e,a=await(await r(t)).text(),i=new o.SourceTextModule(a,{importModuleDynamically:async(s,c)=>{const l=new URL(s,t).href;return loadModule(l,e)}});return esmModuleCache.set(t,i),await i.link(async s=>{const c=new URL(s,t).href;return await loadModule(c,e)}),i}function normalizeOptions(t,e,r){return function(o){if(o===!1)return!1;if(typeof o>"u")return t?e:!1;if(o===!0)return e;if(o&&typeof o=="object")return{...e,...o};throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof o}`)}}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,o)=>{const n=[`${[e[t]]} #${t}`];return r&&n.push(`args: ${JSON.stringify(r)}`),n.push(getDocsUrl(t)),o&&n.push(`Original Error Message:
6
- ${o}`),n.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$1=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,o=t.replace(r,"").replace(/\/$/,""),n=e.replace(r,"").replace(/\/$/,"");return o===n}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 o=Object.keys(t);for(const n of o){const[a,i]=n.split(":"),s=`${a}:${e}`,c=t[s];if(c)return{value:c,key:s}}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),o=getInfoWithoutType(e,r).value;if(o&&!o.version&&"version"in t&&t.version&&(o.version=t.version),o)return o;if("version"in t&&t.version){const{version:n,...a}=t,i=getFMId(a),s=getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo,i).value;if((s==null?void 0:s.version)===n)return s}},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__`,o=CurrentGlobal[r];return{remoteEntryKey:r,entryExports:o}},registerGlobalPlugins=t=>{const{__GLOBAL_PLUGIN__:e}=nativeGlobal.__FEDERATION__;t.forEach(r=>{e.findIndex(o=>o.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,o)=>o(r),e)}function extractComparator(t){return t.match(parseRegex(comparator))}function combineVersion(t,e,r,o){const n=`${t}.${e}.${r}`;return o?`${n}-${o}`:n}function parseHyphen(t){return t.replace(parseRegex(hyphenRange),(e,r,o,n,a,i,s,c,l,d,u,h)=>(isXVersion(o)?r="":isXVersion(n)?r=`>=${o}.0.0`:isXVersion(a)?r=`>=${o}.${n}.0`:r=`>=${r}`,isXVersion(l)?c="":isXVersion(d)?c=`<${Number(l)+1}.0.0-0`:isXVersion(u)?c=`<${l}.${Number(d)+1}.0-0`:h?c=`<=${l}.${d}.${u}-${h}`: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,o,n,a,i)=>isXVersion(o)?"":isXVersion(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:isXVersion(a)?o==="0"?`>=${o}.${n}.0 <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.0 <${Number(o)+1}.0.0-0`:i?o==="0"?n==="0"?`>=${o}.${n}.${a}-${i} <${o}.${n}.${Number(a)+1}-0`:`>=${o}.${n}.${a}-${i} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${a}-${i} <${Number(o)+1}.0.0-0`:o==="0"?n==="0"?`>=${o}.${n}.${a} <${o}.${n}.${Number(a)+1}-0`:`>=${o}.${n}.${a} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${a} <${Number(o)+1}.0.0-0`)).join(" ")}function parseTildes(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(tilde),(r,o,n,a,i)=>isXVersion(o)?"":isXVersion(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:isXVersion(a)?`>=${o}.${n}.0 <${o}.${Number(n)+1}.0-0`:i?`>=${o}.${n}.${a}-${i} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${a} <${o}.${Number(n)+1}.0-0`)).join(" ")}function parseXRanges(t){return t.split(/\s+/).map(e=>e.trim().replace(parseRegex(xRange),(r,o,n,a,i,s)=>{const c=isXVersion(n),l=c||isXVersion(a),d=l||isXVersion(i);return o==="="&&d&&(o=""),s="",c?o===">"||o==="<"?"<0.0.0-0":"*":o&&d?(l&&(a=0),i=0,o===">"?(o=">=",l?(n=Number(n)+1,a=0,i=0):(a=Number(a)+1,i=0)):o==="<="&&(o="<",l?n=Number(n)+1:a=Number(a)+1),o==="<"&&(s="-0"),`${o+n}.${a}.${i}${s}`):l?`>=${n}.0.0${s} <${Number(n)+1}.0.0-0`:d?`>=${n}.${a}.0${s} <${n}.${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:o}=e;if(r===void 0&&o)return 1;if(r&&o===void 0)return-1;if(r===void 0&&o===void 0)return 0;for(let n=0,a=r.length;n<=a;n++){const i=r[n],s=o[n];if(i!==s)return i===void 0&&s===void 0?0:i?s?compareAtom(i,s):-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[,o,,n,a,i,s]=r,c={operator:o,version:combineVersion(n,a,i,s),major:n,minor:a,patch:i,preRelease:s==null?void 0:s.split(".")},l=e.split("||");for(const d of l){const u=d.trim();if(!u||u==="*"||u==="x")return!0;try{const h=parseRange(u);if(!h.trim())return!0;const m=h.split(" ").map(p=>parseComparatorString(p)).join(" ");if(!m.trim())return!0;const _=m.split(/\s+/).map(p=>parseGTE0(p)).filter(Boolean);if(_.length===0)continue;let g=!0;for(const p of _){const y=extractComparator(p);if(!y){g=!1;break}const[,S,,b,I,E,R]=y,T={operator:S,version:combineVersion(b,I,E,R),major:b,minor:I,patch:E,preRelease:R==null?void 0:R.split(".")};if(!compare(T,c)){g=!1;break}}if(g)return!0}catch(h){console.error(`[semver] Error processing range part "${u}":`,h);continue}}return!1}function formatShare(t,e,r,o){let n;return"get"in t?n=t.get:"lib"in t?n=()=>Promise.resolve(t.lib):n=()=>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:n,loaded:t!=null&&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??o)||"version-first"}}function formatShareConfigs(t,e){const r=e.shared||{},o=e.name,n=Object.keys(r).reduce((i,s)=>{const c=arrayOptions(r[s]);return i[s]=i[s]||[],c.forEach(l=>{i[s].push(formatShare(l,o,s,e.shareStrategy))}),i},{}),a={...t.shared};return Object.keys(n).forEach(i=>{a[i]?n[i].forEach(s=>{a[i].find(l=>l.version===s.version)||a[i].push(s)}):a[i]=n[i]}),{shared:a,shareInfos:n}}function versionLt(t,e){const r=o=>{if(!Number.isNaN(Number(o))){const a=o.split(".");let i=o;for(let s=0;s<3-a.length;s++)i+=".0";return i}return o};return!!satisfy(r(t),`<=${r(e)}`)}const findVersion=(t,e)=>{const r=e||function(o,n){return versionLt(o,n)};return Object.keys(t).reduce((o,n)=>!o||r(o,n)||o==="0"?n:o,0)},isLoaded=t=>!!t.loaded||typeof t.lib=="function",isLoading=t=>!!t.loading;function findSingletonVersionOrderByVersion(t,e,r){const o=t[e][r],n=function(a,i){return!isLoaded(o[a])&&versionLt(a,i)};return findVersion(t[e][r],n)}function findSingletonVersionOrderByLoaded(t,e,r){const o=t[e][r],n=function(a,i){const s=c=>isLoaded(c)||isLoading(c);return s(o[i])?s(o[a])?!!versionLt(a,i):!0:s(o[a])?!1:versionLt(a,i)};return findVersion(t[e][r],n)}function getFindShareFunction(t){return t==="loaded-first"?findSingletonVersionOrderByLoaded:findSingletonVersionOrderByVersion}function getRegisteredShare(t,e,r,o){if(!t)return;const{shareConfig:n,scope:a=DEFAULT_SCOPE,strategy:i}=r,s=Array.isArray(a)?a:[a];for(const c of s)if(n&&t[c]&&t[c][e]){const{requiredVersion:l}=n,u=getFindShareFunction(i)(t,c,e),h=()=>{if(n.singleton){if(typeof l=="string"&&!satisfy(u,l)){const g=`Version ${u} from ${u&&t[c][e][u].from} of shared singleton module ${e} does not satisfy the requirement of ${r.from} which needs ${l})`;n.strictVersion?error(g):warn(g)}return t[c][e][u]}else{if(l===!1||l==="*"||satisfy(u,l))return t[c][e][u];for(const[g,p]of Object.entries(t[c][e]))if(satisfy(g,l))return p}},m={shareScopeMap:t,scope:c,pkgName:e,version:u,GlobalFederation:Global.__FEDERATION__,resolver:h};return(o.emit(m)||m).resolver()}}function getGlobalShareScope(){return Global.__FEDERATION__.__SHARE__}function getTargetSharedOptions(t){const{pkgName:e,extraOptions:r,shareInfos:o}=t,n=i=>{if(!i)return;const s={};i.forEach(d=>{s[d.version]=d});const l=findVersion(s,function(d,u){return!isLoaded(s[d])&&versionLt(d,u)});return s[l]},a=(r==null?void 0:r.resolver)??n;return Object.assign({},a(o[e]),r==null?void 0:r.customShareInfo)}function getBuilderId$1(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function matchRemoteWithNameAndExpose(t,e){for(const r of t){const o=e.startsWith(r.name);let n=e.replace(r.name,"");if(o){if(n.startsWith("/")){const s=r.name;return n=`.${n}`,{pkgNameOrAlias:s,expose:n,remote:r}}else if(n==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const a=r.alias&&e.startsWith(r.alias);let i=r.alias&&e.replace(r.alias,"");if(r.alias&&a){if(i&&i.startsWith("/")){const s=r.alias;return i=`.${i}`,{pkgNameOrAlias:s,expose:i,remote:r}}else if(i==="")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(),o=[e.hooks,e.remoteHandler.hooks,e.sharedHandler.hooks,e.snapshotHandler.hooks,e.loaderHook,e.bridgeHook];return r.length>0&&r.forEach(n=>{t!=null&&t.find(a=>a.name!==n.name)&&t.push(n)}),t&&t.length>0&&t.forEach(n=>{o.forEach(a=>{a.applyPlugin(n,e)})}),t}const importCallback=".then(callbacks[0]).catch(callbacks[1])";async function loadEsmEntry({entry:t,remoteEntryExports:e}){return new Promise((r,o)=>{try{e?r(e):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${t}")${importCallback}`)([r,o]):import(t).then(r).catch(o)}catch(n){o(n)}})}async function loadSystemJsEntry({entry:t,remoteEntryExports:e}){return new Promise((r,o)=>{try{e?r(e):typeof __system_context__>"u"?System.import(t).then(r).catch(o):new Function("callbacks",`System.import("${t}")${importCallback}`)([r,o])}catch(n){o(n)}})}function handleRemoteEntryLoaded(t,e,r){const{remoteEntryKey:o,entryExports:n}=getRemoteEntryExports(t,e);return assert(n,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_001,errorCodes$1.runtimeDescMap,{remoteName:t,remoteEntryUrl:r,remoteEntryKey:o})),n}async function loadEntryScript({name:t,globalName:e,entry:r,loaderHook:o,getEntryUrl:n}){const{entryExports:a}=getRemoteEntryExports(t,e);if(a)return a;const i=n?n(r):r;return sdk.loadScript(i,{attrs:{},createScriptHook:(s,c)=>{const l=o.lifecycle.createScript.emit({url:s,attrs:c});if(l&&(l instanceof HTMLScriptElement||"script"in l||"timeout"in l))return l}}).then(()=>handleRemoteEntryLoaded(t,e,r)).catch(s=>{throw assert(void 0,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_008,errorCodes$1.runtimeDescMap,{remoteName:t,resourceUrl:r})),s})}async function loadEntryDom({remoteInfo:t,remoteEntryExports:e,loaderHook:r,getEntryUrl:o}){const{entry:n,entryGlobalName:a,name:i,type:s}=t;switch(s){case"esm":case"module":return loadEsmEntry({entry:n,remoteEntryExports:e});case"system":return loadSystemJsEntry({entry:n,remoteEntryExports:e});default:return loadEntryScript({entry:n,globalName:a,name:i,loaderHook:r,getEntryUrl:o})}}async function loadEntryNode({remoteInfo:t,loaderHook:e}){const{entry:r,entryGlobalName:o,name:n,type:a}=t,{entryExports:i}=getRemoteEntryExports(n,o);return i||sdk.loadScriptNode(r,{attrs:{name:n,globalName:o,type:a},loaderHook:{createScriptHook:(s,c={})=>{const l=e.lifecycle.createScript.emit({url:s,attrs:c});if(l&&"url"in l)return l}}}).then(()=>handleRemoteEntryLoaded(n,o,r)).catch(s=>{throw s})}function getRemoteEntryUniqueKey(t){const{entry:e,name:r}=t;return sdk.composeKeyWithSeparator(r,e)}async function getRemoteEntry(t){const{origin:e,remoteEntryExports:r,remoteInfo:o,getEntryUrl:n,_inErrorHandling:a=!1}=t,i=getRemoteEntryUniqueKey(o);if(r)return r;if(!globalLoading[i]){const s=e.remoteHandler.hooks.lifecycle.loadEntry,c=e.loaderHook;globalLoading[i]=s.emit({loaderHook:c,remoteInfo:o,remoteEntryExports:r}).then(l=>l||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":sdk.isBrowserEnv())?loadEntryDom({remoteInfo:o,remoteEntryExports:r,loaderHook:c,getEntryUrl:n}):loadEntryNode({remoteInfo:o,loaderHook:c}))).catch(async l=>{const d=getRemoteEntryUniqueKey(o);if(l instanceof Error&&l.message.includes(errorCodes$1.RUNTIME_008)&&!a){const h=_=>getRemoteEntry({..._,_inErrorHandling:!0}),m=await e.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:h,origin:e,remoteInfo:o,remoteEntryExports:r,globalLoading,uniqueKey:d});if(m)return m}throw l})}return globalLoading[i]}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 o=matchRemote(t,r.nameOrAlias);return assert(o,`Unable to preload ${r.nameOrAlias} as it is not included in ${!o&&sdk.safeToString({remoteInfo:o,remotes:t})}`),{remote:o,preloadConfig:defaultPreloadArgs(r)}})}function normalizePreloadExposes(t){return t?t.map(e=>e==="."?e:e.startsWith("./")?e.replace("./",""):e):[]}function preloadAssets(t,e,r,o=!0){const{cssAssets:n,jsAssetsWithoutEntry:a,entryAssets:i}=r;if(e.options.inBrowser){if(i.forEach(s=>{const{moduleInfo:c}=s,l=e.moduleCache.get(t.name);getRemoteEntry(l?{origin:e,remoteInfo:c,remoteEntryExports:l.remoteEntryExports}:{origin:e,remoteInfo:c,remoteEntryExports:void 0})}),o){const s={rel:"preload",as:"style"};n.forEach(c=>{const{link:l,needAttach:d}=sdk.createLink({url:c,cb:()=>{},attrs:s,createLinkHook:(u,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:u,attrs:h});if(m instanceof HTMLLinkElement)return m}});d&&document.head.appendChild(l)})}else{const s={rel:"stylesheet",type:"text/css"};n.forEach(c=>{const{link:l,needAttach:d}=sdk.createLink({url:c,cb:()=>{},attrs:s,createLinkHook:(u,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:u,attrs:h});if(m instanceof HTMLLinkElement)return m},needDeleteLink:!1});d&&document.head.appendChild(l)})}if(o){const s={rel:"preload",as:"script"};a.forEach(c=>{const{link:l,needAttach:d}=sdk.createLink({url:c,cb:()=>{},attrs:s,createLinkHook:(u,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:u,attrs:h});if(m instanceof HTMLLinkElement)return m}});d&&document.head.appendChild(l)})}else{const s={fetchpriority:"high",type:(t==null?void 0:t.type)==="module"?"module":"text/javascript"};a.forEach(c=>{const{script:l,needAttach:d}=sdk.createScript({url:c,cb:()=>{},attrs:s,createScriptHook:(u,h)=>{const m=e.loaderHook.lifecycle.createScript.emit({url:u,attrs:h});if(m instanceof HTMLScriptElement)return m},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,o,n){const{loadFactory:a=!0}=o||{loadFactory:!0},i=await this.getEntry();if(!this.inited){const u=this.host.shareScopeMap,h=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope];h.length||h.push("default"),h.forEach(y=>{u[y]||(u[y]={})});const m=u[h[0]],_=[],g={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?h:this.remoteInfo.shareScope||"default"};Object.defineProperty(g,"shareScopeMap",{value:u,enumerable:!1});const p=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:m,remoteEntryInitOptions:g,initScope:_,remoteInfo:this.remoteInfo,origin:this.host});typeof(i==null?void 0:i.init)>"u"&&error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_002,errorCodes$1.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),await i.init(p.shareScope,p.initScope,p.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...p,id:e,remoteSnapshot:n,remoteEntryExports:i})}this.lib=i,this.inited=!0;let s;s=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:i,expose:r,moduleInfo:this.remoteInfo}),s||(s=await i.get(r)),assert(s,`${getFMId(this.remoteInfo)} remote don't export ${r}.`);const c=processModuleAlias(this.remoteInfo.name,r),l=this.wraperFactory(s,c);return a?await l():l}wraperFactory(e,r){function o(n,a){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:a,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return o(n,r),n}:()=>{const n=e();return o(n,r),n}}}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 o(...n){return r.remove(o),e.apply(null,n)})}emit(...e){let r;return this.listeners.size>0&&this.listeners.forEach(o=>{r=o(...e)}),r}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}}class AsyncHook extends SyncHook{emit(...e){let r;const o=Array.from(this.listeners);if(o.length>0){let n=0;const a=i=>i===!1?!1:n<o.length?Promise.resolve(o[n++].apply(null,e)).then(a):i;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 o=r(e);if(checkReturnData(e,o))e=o;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(o){warn(o),this.onerror(o)}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 o=0;const n=i=>(warn(i),this.onerror(i),e),a=i=>{if(checkReturnData(e,i)){if(e=i,o<r.length)try{return Promise.resolve(r[o++](e)).then(a,n)}catch(s){return n(s)}}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){var n;assert(isPlainObject(e),"Plugin configuration is invalid.");const o=e.name;assert(o,"A name must be provided by the plugin."),this.registerPlugins[o]||(this.registerPlugins[o]=e,(n=e.apply)==null||n.call(e,r),Object.keys(this.lifecycle).forEach(a=>{const i=e[a];i&&this.lifecycle[a].on(i)}))}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(o=>{o!=="name"&&this.lifecycle[o].remove(r[o])})}}function assignRemoteInfo(t,e){const r=getRemoteEntryInfoFromSnapshot(e);r.url||error(`The attribute remoteEntry of ${t.name} must not be undefined.`);let o=sdk.getResourceUrl(e,r.url);!sdk.isBrowserEnv()&&!o.startsWith("http")&&(o=`https:${o}`),t.type=r.type,t.entryGlobalName=r.globalName,t.entry=o,t.version=e.version,t.buildVersion=e.buildVersion}function snapshotPlugin(){return{name:"snapshot-plugin",async afterResolve(t){const{remote:e,pkgNameOrAlias:r,expose:o,origin:n,remoteInfo:a,id:i}=t;if(!isRemoteInfoWithEntry(e)||!isPureRemoteEntry(e)){const{remoteSnapshot:s,globalSnapshot:c}=await n.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:e,id:i});assignRemoteInfo(a,s);const l={remote:e,preloadConfig:{nameOrAlias:r,exposes:[o],resourceCategory:"sync",share:!1,depsRemote:!1}},d=await n.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:n,preloadOptions:l,remoteInfo:a,remote:e,remoteSnapshot:s,globalSnapshot:c});return d&&preloadAssets(a,n,d,!1),{...t,remoteSnapshot:s}}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,o,n={},a){const i=getFMId(e),{value:s}=getInfoWithoutType(t,i),c=a||s;if(c&&!sdk.isManifestProvider(c)&&(r(c,e,o),c.remotesInfo)){const l=Object.keys(c.remotesInfo);for(const d of l){if(n[d])continue;n[d]=!0;const u=splitId(d),h=c.remotesInfo[d];traverseModuleInfo(t,{name:u.name,version:h.matchedVersion},r,!1,n,void 0)}}}const isExisted=(t,e)=>document.querySelector(`${t}[${t==="link"?"href":"src"}="${e}"]`);function generatePreloadAssets(t,e,r,o,n){const a=[],i=[],s=[],c=new Set,l=new Set,{options:d}=t,{preloadConfig:u}=e,{depsRemote:h}=u;if(traverseModuleInfo(o,r,(p,y,S)=>{var $;let b;if(S)b=u;else if(Array.isArray(h)){const M=h.find(N=>N.nameOrAlias===y.name||N.nameOrAlias===y.alias);if(!M)return;b=defaultPreloadArgs(M)}else if(h===!0)b=u;else return;const I=sdk.getResourceUrl(p,getRemoteEntryInfoFromSnapshot(p).url);I&&s.push({name:y.name,moduleInfo:{name:y.name,entry:I,type:"remoteEntryType"in p?p.remoteEntryType:"global",entryGlobalName:"globalName"in p?p.globalName:y.name,shareScope:"",version:"version"in p?p.version:void 0},url:I});let E="modules"in p?p.modules:[];const R=normalizePreloadExposes(b.exposes);R.length&&"modules"in p&&(E=($=p==null?void 0:p.modules)==null?void 0:$.reduce((M,N)=>((R==null?void 0:R.indexOf(N.moduleName))!==-1&&M.push(N),M),[]));function T(M){const N=M.map(A=>sdk.getResourceUrl(p,A));return b.filter?N.filter(b.filter):N}if(E){const M=E.length;for(let N=0;N<M;N++){const A=E[N],P=`${y.name}/${A.moduleName}`;t.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:A.moduleName==="."?y.name:P,name:y.name,remoteSnapshot:p,preloadConfig:b,remote:y,origin:t}),!getPreloaded(P)&&(b.resourceCategory==="all"?(a.push(...T(A.assets.css.async)),a.push(...T(A.assets.css.sync)),i.push(...T(A.assets.js.async)),i.push(...T(A.assets.js.sync))):(b.resourceCategory="sync")&&(a.push(...T(A.assets.css.sync)),i.push(...T(A.assets.js.sync))),setPreloaded(P))}}},!0,{},n),n.shared&&n.shared.length>0){const p=(y,S)=>{const b=getRegisteredShare(t.shareScopeMap,S.sharedName,y,t.sharedHandler.hooks.lifecycle.resolveShare);b&&typeof b.lib=="function"&&(S.assets.js.sync.forEach(I=>{c.add(I)}),S.assets.css.sync.forEach(I=>{l.add(I)}))};n.shared.forEach(y=>{var E;const S=(E=d.shared)==null?void 0:E[y.sharedName];if(!S)return;const b=y.version?S.find(R=>R.version===y.version):S;if(!b)return;arrayOptions(b).forEach(R=>{p(R,y)})})}const _=i.filter(p=>!c.has(p)&&!isExisted("script",p));return{cssAssets:a.filter(p=>!l.has(p)&&!isExisted("link",p)),jsAssetsWithoutEntry:_,entryAssets:s.filter(p=>!isExisted("script",p.url))}}const generatePreloadAssetsPlugin=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(t){const{origin:e,preloadOptions:r,remoteInfo:o,remote:n,globalSnapshot:a,remoteSnapshot:i}=t;return sdk.isBrowserEnv()?isRemoteInfoWithEntry(n)&&isPureRemoteEntry(n)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:n.name,url:n.entry,moduleInfo:{name:o.name,entry:n.entry,type:o.type||"global",entryGlobalName:"",shareScope:""}}]}:(assignRemoteInfo(o,i),generatePreloadAssets(e,r,o,a,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function getGlobalRemoteInfo(t,e){const r=getGlobalSnapshotInfoByModuleInfo({name:e.name,version:e.options.version}),o=r&&"remotesInfo"in r&&r.remotesInfo&&getInfoWithoutType(r.remotesInfo,t.name).value;return o&&o.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:o.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:o}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,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==null?void 0:a.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:i,remoteSnapshot:s,globalSnapshot:c}=this.getGlobalRemoteInfo(e),{remoteSnapshot:l,globalSnapshot:d}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:i,remoteSnapshot:s,globalSnapshot:c});let u,h;if(l)if(sdk.isManifestProvider(l)){const m=sdk.isBrowserEnv()?l.remoteEntry:l.ssrRemoteEntry||l.remoteEntry||"",_=await this.getManifestJson(m,e,{}),g=setGlobalSnapshotInfoByModuleInfo({...e,entry:m},_);u=_,h=g}else{const{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:l,from:"global"});u=m,h=d}else if(isRemoteInfoWithEntry(e)){const m=await this.getManifestJson(e.entry,e,{}),_=setGlobalSnapshotInfoByModuleInfo(e,m),{remoteSnapshot:g}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:m,from:"global"});u=g,h=_}else error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_007,errorCodes$1.runtimeDescMap,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(d)}));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:r,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:h}}getGlobalRemoteInfo(e){return getGlobalRemoteInfo(e,this.HostInstance)}async getManifestJson(e,r,o){const n=async()=>{let i=this.manifestCache.get(e);if(i)return i;try{let s=await this.loaderHook.lifecycle.fetch.emit(e,{});(!s||!(s instanceof Response))&&(s=await fetch(e,{})),i=await s.json()}catch(s){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:s,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),i||(delete this.manifestLoading[e],error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_003,errorCodes$1.runtimeDescMap,{manifestUrl:e,moduleName:r.name,hostName:this.HostInstance.options.name},`${s}`)))}return assert(i.metaData&&i.exposes&&i.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,i),i},a=async()=>{const i=await n(),s=sdk.generateSnapshotFromManifest(i,{version:e}),{remoteSnapshot:c}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:r,manifestJson:i,remoteSnapshot:s,manifestUrl:e,from:"manifest"});return c};return this.manifestLoading[e]||(this.manifestLoading[e]=a().then(i=>i)),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:o,shared:n}=formatShareConfigs(e,r);return Object.keys(o).forEach(i=>{o[i].forEach(c=>{c.scope.forEach(l=>{var u;((u=this.shareScopeMap[l])==null?void 0:u[i])||this.setShared({pkgName:i,lib:c.lib,get:c.get,loaded:c.loaded||!!c.lib,shared:c,from:r.name})})})}),{shareInfos:o,shared:n}}async loadShare(e,r){const{host:o}=this,n=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:o.options.shared});n!=null&&n.scope&&await Promise.all(n.scope.map(async l=>{await Promise.all(this.initializeSharing(l,{strategy:n.strategy}))}));const a=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:o.options.shared,origin:o}),{shareInfo:i}=a;assert(i,`Cannot find ${e} Share in the ${o.options.name}. Please ensure that the ${e} Share parameters have been injected`);const s=getRegisteredShare(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare),c=l=>{l.useIn||(l.useIn=[]),addUniqueItem(l.useIn,o.options.name)};if(s&&s.lib)return c(s),s.lib;if(s&&s.loading&&!s.loaded){const l=await s.loading;return s.loaded=!0,s.lib||(s.lib=l),c(s),l}else if(s){const d=(async()=>{const u=await s.get();return c(s),s.loaded=!0,s.lib=u,u})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:o.options.name,lib:null,loading:d}),d}else{if(r!=null&&r.customShareInfo)return!1;const d=(async()=>{const u=await i.get();i.lib=u,i.loaded=!0,c(i);const h=getRegisteredShare(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare);return h&&(h.lib=u,h.loaded=!0,h.from=i.from),u})();return this.setShared({pkgName:e,loaded:!1,shared:i,from:o.options.name,lib:null,loading:d}),d}}initializeSharing(e=DEFAULT_SCOPE,r){const{host:o}=this,n=r==null?void 0:r.from,a=r==null?void 0:r.strategy;let i=r==null?void 0:r.initScope;const s=[];if(n!=="build"){const{initTokens:_}=this;i||(i=[]);let g=_[e];if(g||(g=_[e]={from:this.host.name}),i.indexOf(g)>=0)return s;i.push(g)}const c=this.shareScopeMap,l=o.options.name;c[e]||(c[e]={});const d=c[e],u=(_,g)=>{var E;const{version:p,eager:y}=g;d[_]=d[_]||{};const S=d[_],b=S[p],I=!!(b&&(b.eager||(E=b.shareConfig)!=null&&E.eager));(!b||b.strategy!=="loaded-first"&&!b.loaded&&(!y!=!I?y:l>b.from))&&(S[p]=g)},h=_=>_&&_.init&&_.init(c[e],i),m=async _=>{const{module:g}=await o.remoteHandler.getRemoteModuleAndOptions({id:_});if(g.getEntry){let p;try{p=await g.getEntry()}catch(y){p=await o.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:_,error:y,from:"runtime",lifecycle:"beforeLoadShare",origin:o})}g.inited||(await h(p),g.inited=!0)}};return Object.keys(o.options.shared).forEach(_=>{o.options.shared[_].forEach(p=>{p.scope.includes(e)&&u(_,p)})}),(o.options.shareStrategy==="version-first"||a==="version-first")&&o.options.remotes.forEach(_=>{_.shareScope===e&&s.push(m(_.name))}),s}loadShareSync(e,r){const{host:o}=this,n=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:o.options.shared});n!=null&&n.scope&&n.scope.forEach(s=>{this.initializeSharing(s,{strategy:n.strategy})});const a=getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare),i=s=>{s.useIn||(s.useIn=[]),addUniqueItem(s.useIn,o.options.name)};if(a){if(typeof a.lib=="function")return i(a),a.loaded||(a.loaded=!0,a.from===o.options.name&&(n.loaded=!0)),a.lib;if(typeof a.get=="function"){const s=a.get();if(!(s instanceof Promise))return i(a),this.setShared({pkgName:e,loaded:!0,from:o.options.name,lib:s,shared:a}),s}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const s=n.get();if(s instanceof Promise){const c=(r==null?void 0:r.from)==="build"?errorCodes$1.RUNTIME_005:errorCodes$1.RUNTIME_006;throw new Error(errorCodes$1.getShortErrorMsg(c,errorCodes$1.runtimeDescMap,{hostName:o.options.name,sharedPkgName:e}))}return n.lib=s,this.setShared({pkgName:e,loaded:!0,from:o.options.name,lib:n.lib,shared:n}),n.lib}throw new Error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_006,errorCodes$1.runtimeDescMap,{hostName:o.options.name,sharedPkgName:e}))}initShareScopeMap(e,r,o={}){const{host:n}=this;this.shareScopeMap[e]=r,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:r,options:n.options,origin:n,scopeName:e,hostShareScopeMap:o.hostShareScopeMap})}setShared({pkgName:e,shared:r,from:o,lib:n,loading:a,loaded:i,get:s}){const{version:c,scope:l="default",...d}=r;(Array.isArray(l)?l:[l]).forEach(h=>{if(this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),!this.shareScopeMap[h][e][c]){this.shareScopeMap[h][e][c]={version:c,scope:[h],...d,lib:n,loaded:i,loading:a},s&&(this.shareScopeMap[h][e][c].get=s);return}const m=this.shareScopeMap[h][e][c];a&&!m.loading&&(m.loading=a),i&&!m.loaded&&(m.loaded=i),o&&m.from!==o&&(m.from=o)})}_setGlobalShareScopeMap(e){const r=getGlobalShareScope(),o=e.id||e.name;o&&!r[o]&&(r[o]=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((n,a)=>(this.registerRemote(a,n,{force:!1}),n),e.remotes)}setIdToRemoteMap(e,r){const{remote:o,expose:n}=r,{name:a,alias:i}=o;if(this.idToRemoteMap[e]={name:o.name,expose:n},i&&e.startsWith(a)){const s=e.replace(a,i);this.idToRemoteMap[s]={name:o.name,expose:n};return}if(i&&e.startsWith(i)){const s=e.replace(i,a);this.idToRemoteMap[s]={name:o.name,expose:n}}}async loadRemote(e,r){const{host:o}=this;try{const{loadFactory:n=!0}=r||{loadFactory:!0},{module:a,moduleOptions:i,remoteMatchInfo:s}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:c,remote:l,expose:d,id:u,remoteSnapshot:h}=s,m=await a.get(u,d,r,h),_=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:c,expose:d,exposeModule:n?m:void 0,exposeModuleFactory:n?void 0:m,remote:l,options:i,moduleInstance:a,origin:o});return this.setIdToRemoteMap(e,s),typeof _=="function"?_:m}catch(n){const{from:a="runtime"}=r||{from:"runtime"},i=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:a,lifecycle:"onLoad",origin:o});if(!i)throw n;return i}}async preloadRemote(e){const{host:r}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:r.options,origin:r});const o=formatPreloadArgs(r.options.remotes,e);await Promise.all(o.map(async n=>{const{remote:a}=n,i=getRemoteInfo(a),{globalSnapshot:s,remoteSnapshot:c}=await r.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:r,preloadOptions:n,remote:a,remoteInfo:i,globalSnapshot:s,remoteSnapshot:c});l&&preloadAssets(i,r,l)}))}registerRemotes(e,r){const{host:o}=this;e.forEach(n=>{this.registerRemote(n,o.options.remotes,{force:r==null?void 0:r.force})})}async getRemoteModuleAndOptions(e){const{host:r}=this,{id:o}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:o,options:r.options,origin:r})}catch(_){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:o,options:r.options,origin:r,from:"runtime",error:_,lifecycle:"beforeRequest"}),!n)throw _}const{id:a}=n,i=matchRemoteWithNameAndExpose(r.options.remotes,a);assert(i,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_004,errorCodes$1.runtimeDescMap,{hostName:r.options.name,requestId:a}));const{remote:s}=i,c=getRemoteInfo(s),l=await r.sharedHandler.hooks.lifecycle.afterResolve.emit({id:a,...i,options:r.options,origin:r,remoteInfo:c}),{remote:d,expose:u}=l;assert(d&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${a}.`);let h=r.moduleCache.get(d.name);const m={host:r,remoteInfo:c};return h||(h=new Module(m),r.moduleCache.set(d.name,h)),{module:h,moduleOptions:m,remoteMatchInfo:l}}registerRemote(e,r,o){const{host:n}=this,a=()=>{if(e.alias){const s=r.find(c=>{var l;return e.alias&&(c.name.startsWith(e.alias)||((l=c.alias)==null?void 0:l.startsWith(e.alias)))});assert(!s,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${s&&s.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:n});const i=r.find(s=>s.name===e.name);if(!i)a(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const s=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];o!=null&&o.force&&(this.removeRemote(i),a(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),sdk.warn(s.join(" ")))}}removeRemote(e){var r;try{const{host:o}=this,{name:n}=e,a=o.options.remotes.findIndex(s=>s.name===n);a!==-1&&o.options.remotes.splice(a,1);const i=o.moduleCache.get(e.name);if(i){const s=i.remoteInfo,c=s.entryGlobalName;CurrentGlobal[c]&&((r=Object.getOwnPropertyDescriptor(CurrentGlobal,c))!=null&&r.configurable?delete CurrentGlobal[c]:CurrentGlobal[c]=void 0);const l=getRemoteEntryUniqueKey(i.remoteInfo);globalLoading[l]&&delete globalLoading[l],o.snapshotHandler.manifestCache.delete(s.entry);let d=s.buildVersion?sdk.composeKeyWithSeparator(s.name,s.buildVersion):s.name;const u=CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(m=>s.buildVersion?m.options.id===d:m.name===d);if(u!==-1){const m=CurrentGlobal.__FEDERATION__.__INSTANCES__[u];d=m.options.id||d;const _=getGlobalShareScope();let g=!0;const p=[];Object.keys(_).forEach(y=>{const S=_[y];S&&Object.keys(S).forEach(b=>{const I=S[b];I&&Object.keys(I).forEach(E=>{const R=I[E];R&&Object.keys(R).forEach(T=>{const $=R[T];$&&typeof $=="object"&&$.from===s.name&&($.loaded||$.loading?($.useIn=$.useIn.filter(M=>M!==s.name),$.useIn.length?g=!1:p.push([y,b,E,T])):p.push([y,b,E,T]))})})})}),g&&(m.shareScopeMap={},delete _[d]),p.forEach(([y,S,b,I])=>{var E,R,T;(T=(R=(E=_[y])==null?void 0:E[S])==null?void 0:R[b])==null||delete T[I]}),CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(u,1)}const{hostGlobalSnapshot:h}=getGlobalRemoteInfo(e,o);if(h){const m=h&&"remotesInfo"in h&&h.remotesInfo&&getInfoWithoutType(h.remotesInfo,e.name).key;m&&(delete h.remotesInfo[m],Global.__FEDERATION__.__MANIFEST_LOADING__[m]&&delete Global.__FEDERATION__.__MANIFEST_LOADING__[m])}o.moduleCache.delete(e.name)}}catch(o){logger.log("removeRemote fail: ",o)}}}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()]:[],o={id:getBuilderId$1(),name:e.name,plugins:r,remotes:[],shared:{},inBrowser:sdk.isBrowserEnv()};this.name=e.name,this.options=o,this.snapshotHandler=new SnapshotHandler(this),this.sharedHandler=new SharedHandler(this),this.remoteHandler=new RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...o.plugins,...e.plugins||[]]),this.options=this.formatOptions(o,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,o){const n=getRemoteInfo({name:e,entry:r}),a=new Module({host:this,remoteInfo:n});return a.remoteEntryExports=o,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,o={}){this.sharedHandler.initShareScopeMap(e,r,o)}formatOptions(e,r){const{shared:o}=formatShareConfigs(e,r),{userOptions:n,options:a}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:r,options:e,shareInfo:o}),i=this.remoteHandler.formatAndRegisterRemote(a,n),{shared:s}=this.sharedHandler.registerShared(a,n),c=[...a.plugins];n.plugins&&n.plugins.forEach(d=>{c.includes(d)||c.push(d)});const l={...e,...r,plugins:c,remotes:i,shared:s};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((o,n)=>(n&&o&&!o.find(a=>a.name===n.name)&&o.push(n),o),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(o=>!!(r&&o.options.id===r||o.options.name===t&&!o.options.version&&!e||o.options.name===t&&e&&o.options.version===e))}utils_cjs.getGlobalFederationInstance=getGlobalFederationInstance;var runtimeCore=index_cjs$2,errorCodes=index_cjs,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)}function loadRemote(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadRemote.apply(FederationInstance,t)}function registerRemotes(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerRemotes.apply(FederationInstance,t)}runtimeCore.setGlobalFederationConstructor(runtimeCore.ModuleFederation);runtimeCore.Module;runtimeCore.ModuleFederation;runtimeCore.getRemoteEntry;runtimeCore.getRemoteInfo;runtimeCore.loadScript;runtimeCore.loadScriptNode;runtimeCore.registerGlobalPlugins;var init_1=init,loadRemote_1=loadRemote,registerRemotes_1=registerRemotes;const globalKey="__mf_init____mf__virtual/iobroker_javascript__mf_v__runtimeInit__mf_v__.js__";if(!globalThis[globalKey]){let t,e;const r=new Promise((o,n)=>{t=o,e=n});globalThis[globalKey]={initPromise:r,initResolve:t,initReject:e}}var iobroker_javascript__mf_v__runtimeInit__mf_v__=globalThis[globalKey];export{iobroker_javascript__mf_v__runtimeInit__mf_v__ as a,init_1 as i,loadRemote_1 as l,registerRemotes_1 as r};
@@ -1 +0,0 @@
1
- import"./iobroker_javascript__loadShare__react__loadShare__-6sH5wUl6.js";import{u as t,T as m,F as s}from"./createSvgIcon-XLoRKyxt.js";function r(){const e=t(s);return e[m]||e}export{r as u};
@@ -1 +0,0 @@
1
- const e={};export{e as default};