@camstack/addon-admin-ui 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddLocationWizard-r5xWfOLZ.js → AddLocationWizard-D6fen1i6.js} +1 -1
- package/dist/assets/{AddonCollectionPage-BmcSdSkl.js → AddonCollectionPage-DjjLAakC.js} +1 -1
- package/dist/assets/{Addons-CLf82zRJ.js → Addons-CXr5vMqb.js} +1 -1
- package/dist/assets/{AdminTabs-7mkfimpe.js → AdminTabs-BJRjY_1m.js} +1 -1
- package/dist/assets/{AiProfiles-R33NnzxL.js → AiProfiles-CotyzzkL.js} +1 -1
- package/dist/assets/{BrokerForm-SDrahZJq.js → BrokerForm-C-3EFaie.js} +1 -1
- package/dist/assets/{Capabilities-BS_pV5kK.js → Capabilities-BCiXjZBP.js} +1 -1
- package/dist/assets/{CapabilityBadges-B5gVN9yo.js → CapabilityBadges-45tBBMsf.js} +1 -1
- package/dist/assets/{Cluster-DwLZwcXa.js → Cluster-DbmNk7f_.js} +1 -1
- package/dist/assets/{ClusterRecordingTab-CFs8rzNM.js → ClusterRecordingTab-Clznfxb3.js} +1 -1
- package/dist/assets/{Dashboard-DaH-7MeN.js → Dashboard-Dg8uO72E.js} +1 -1
- package/dist/assets/{Data-DM2CB0tr.js → Data-Dog5TEcu.js} +1 -1
- package/dist/assets/{DetectionIntelligence-DTA_96Ae.js → DetectionIntelligence-Cyd5voKC.js} +1 -1
- package/dist/assets/{DeviceDetail-Cobtc6wN.js → DeviceDetail-DQUyIHpU.js} +1 -1
- package/dist/assets/{Devices-BYHdwUA9.js → Devices-DeHQDSZl.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-BpW4lsWq.js → EmbedPlayerPage-6QQjX8h0.js} +1 -1
- package/dist/assets/Events-CbLjRcl6.js +1 -0
- package/dist/assets/{FormBuilder-BwFnNOpt.js → FormBuilder-6TC6os5t.js} +1 -1
- package/dist/assets/{Identity-C_r6Mgc9.js → Identity-Cv-aviGr.js} +1 -1
- package/dist/assets/{IntegrationDetail-B3nptv5G.js → IntegrationDetail-C4cN1MTc.js} +1 -1
- package/dist/assets/{Integrations-BF1ngbno.js → Integrations-CJkxtlsV.js} +1 -1
- package/dist/assets/{Integrations-BNxwRAw3.js → Integrations-Dtj2iRS2.js} +1 -1
- package/dist/assets/{Logs-CR6FjpSE.js → Logs-D7IJL-YA.js} +1 -1
- package/dist/assets/{MotionZonesSettings-CH8c2gQJ.js → MotionZonesSettings-B04ag-FD.js} +1 -1
- package/dist/assets/{MyAccess-D6FVIObH.js → MyAccess-sCtkdxGH.js} +1 -1
- package/dist/assets/{Network-DZjk05lH.js → Network-Dvrq7kkZ.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-BvaibJiq.js → NodeAddonsSettingsPanel-dPCJdy3W.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-Ch5rjESF.js → NodeInferenceDevices-CxMALQ4X.js} +1 -1
- package/dist/assets/{NotificationTargets-3YNCICGO.js → NotificationTargets-B6Jb1HKW.js} +1 -1
- package/dist/assets/Pipeline-DzcNkW20.js +1 -0
- package/dist/assets/{Plates-C48k-46Q.js → Plates-BZb74ld1.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-BwJCGD0l.js → PrivacyMaskSettings-Ck4WvgTL.js} +1 -1
- package/dist/assets/{ProviderIcon-BNV0FRHJ.js → ProviderIcon-B2XumXvt.js} +1 -1
- package/dist/assets/{Recordings-CT0gChTC.js → Recordings-Aka2AWIx.js} +1 -1
- package/dist/assets/{ScanNetworkModal-BOpbimbE.js → ScanNetworkModal-RKiLzbSl.js} +1 -1
- package/dist/assets/{Settings-BdPbbCyr.js → Settings-DKI37zfV.js} +1 -1
- package/dist/assets/{Showroom-BjnHBP5S.js → Showroom-piA5FnmB.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-D5_wAHv9.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-C4scCSJo.js} +1 -1
- package/dist/assets/{build-cluster-graph-CY__30ZO.js → build-cluster-graph-CzeQDd2s.js} +1 -1
- package/dist/assets/circle-check-big-CrFL7IwS.js +1 -0
- package/dist/assets/clock-D038Mw8B.js +1 -0
- package/dist/assets/{copy-D5asBldD.js → copy-ia0pscQq.js} +1 -1
- package/dist/assets/{debounced-invalidate-DYWZ0mPG.js → debounced-invalidate-CXKTwc6e.js} +1 -1
- package/dist/assets/{dist-DFASlyrs.js → dist-BkamvsUd.js} +1 -1
- package/dist/assets/dist-C9qj5V_V.js +7 -0
- package/dist/assets/{download-CeG-HJtH.js → download-OTC0Sxxp.js} +1 -1
- package/dist/assets/{face-bbox-6vUFpDk7.js → face-bbox-1jNmgNy9.js} +1 -1
- package/dist/assets/{hostInit-BT2qoJBv.js → hostInit-B9Qb1083.js} +1 -1
- package/dist/assets/{index-CS131rnv.js → index-Bwcru_fD.js} +3 -3
- package/dist/assets/index-C-ZEPJCU.css +2 -0
- package/dist/assets/{key-round-DPrVlcVK.js → key-round-BpRdlTa6.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-cc4be7d0.js → mf-entry-bootstrap-0-64cf5a9a.js} +2 -2
- package/dist/assets/{pencil-BGFPzGyL.js → pencil-kg0CABsA.js} +1 -1
- package/dist/assets/{player-overlays-CWRGbPFt.js → player-overlays-CkvkdCY0.js} +1 -1
- package/dist/assets/plus-D2eqipNa.js +1 -0
- package/dist/assets/{radio-BW_yEv9p.js → radio-B_rqJF_i.js} +1 -1
- package/dist/assets/{refresh-cw-53RBMMNj.js → refresh-cw-j1HMg9iU.js} +1 -1
- package/dist/assets/remoteEntry-Dwav_U6A.js +1 -0
- package/dist/assets/{rotate-ccw-CLPp2z9s.js → rotate-ccw-PUiT6OgF.js} +1 -1
- package/dist/assets/rotate-cw-D4rJCopd.js +1 -0
- package/dist/assets/search-3K_e5u0d.js +1 -0
- package/dist/assets/{send-DUPHYluz.js → send-BWhiZEW3.js} +1 -1
- package/dist/assets/{server-DRSIdxSw.js → server-DW40cj0E.js} +1 -1
- package/dist/assets/square-DeBex6JC.js +1 -0
- package/dist/assets/{square-check-big-2shiyBaF.js → square-check-big-NL5xKvpU.js} +1 -1
- package/dist/assets/{src-CjlMsFRd.js → src-BsW9vu50.js} +5 -5
- package/dist/assets/src-lbvXy3B8.js +7 -0
- package/dist/assets/{upload-BmROjXzl.js → upload-CsGmyfTd.js} +1 -1
- package/dist/assets/{useEventInvalidation-DD_0VNer.js → useEventInvalidation-CgaM2Mu4.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BNFfTwsx.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-dSIkZqCS.js} +2 -2
- package/dist/assets/{wifi-_GGDG2Kl.js → wifi-DiweUKR5.js} +1 -1
- package/dist/assets/{zap-CNKAzXbX.js → zap-jhsAzYYo.js} +1 -1
- package/dist/index.html +6 -6
- package/dist/server/addon.js +69 -8
- package/package.json +1 -1
- package/dist/assets/Events-Db4fPx9x.js +0 -1
- package/dist/assets/Pipeline-BzxPuzJh.js +0 -1
- package/dist/assets/circle-check-big-CE4wAvoQ.js +0 -1
- package/dist/assets/clock-B9UjbLDl.js +0 -1
- package/dist/assets/dist-Dx_vZxMI.js +0 -7
- package/dist/assets/index-BKBKdGDb.css +0 -2
- package/dist/assets/plus-CnPG0Tyf.js +0 -1
- package/dist/assets/remoteEntry-CNnEAmGt.js +0 -1
- package/dist/assets/rotate-cw-BgRV22iV.js +0 -1
- package/dist/assets/search-BGpt8p5m.js +0 -1
- package/dist/assets/square-TBVq6Wu4.js +0 -1
- package/dist/assets/src-BS1NDJr1.js +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as e}from"./index-
|
|
1
|
+
import{W as e}from"./index-Bwcru_fD.js";var t=e(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./src-
|
|
1
|
+
import"./src-BsW9vu50.js";import{Q as e,o as t,q as n,z as r}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js";import{p as i}from"./player-overlays-CkvkdCY0.js";e();function a(e,a){let o=i(),s=t(),[c,l]=n(o.connectionVersion);r(()=>o.subscribeConnectionEvents((e,t)=>{e===`connected`&&l(t)}),[o]);let u=a.join(`|`),d=JSON.stringify(e);r(()=>{let e=[],t=()=>{let e=JSON.parse(d),t=e.length===1&&Array.isArray(e[0])?e:[e];s.invalidateQueries({queryKey:t})};t();for(let n of u.split(`|`))if(n)try{e.push(o.subscribeEvent(n,t))}catch{}return()=>{for(let t of e)t()}},[o,s,u,d,c])}export{a as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-C9qj5V_V.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/vite-preload-helper-zJ_50EbN.js","assets/compat-CbwIzIXq.js","assets/src-lbvXy3B8.js","assets/src-BsW9vu50.js","assets/player-overlays-CkvkdCY0.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{t as e}from"./vite-preload-helper-zJ_50EbN.js";var t=`FEDERATION_DEBUG`,n={AT:`@`,HYPHEN:`-`,SLASH:`/`},r={[n.AT]:`scope_`,[n.HYPHEN]:`_`,[n.SLASH]:`__`};r[n.AT],n.AT,r[n.HYPHEN],n.HYPHEN,r[n.SLASH],n.SLASH;var i=function(e){return e[e.UNKNOWN=1]=`UNKNOWN`,e[e.CALCULATED=2]=`CALCULATED`,e[e.NO_USE=0]=`NO_USE`,e}({});function a(){return!0}function o(){return typeof navigator<`u`&&navigator?.product===`ReactNative`}function s(){try{if(a()&&window.localStorage)return!!localStorage.getItem(t)}catch{return!1}return!1}function c(){return typeof process<`u`&&{}.FEDERATION_DEBUG?!!{}.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<`u`&&FEDERATION_DEBUG?!0:s()}var l=`[ Federation Runtime ]`,u=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}:${t}`:t:e,``):``},d=(e,t)=>{if(`getPublicPath`in e){let n;return n=e.getPublicPath.startsWith(`function`)?Function(`return `+e.getPublicPath)()():Function(e.getPublicPath)(),`${n}${t}`}else if(`publicPath`in e)return!a()&&!o()&&`ssrPublicPath`in e&&typeof e.ssrPublicPath==`string`?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`;else return console.warn(`Cannot get resource URL. If in debug mode, please ignore.`,e,t),``},f=e=>{console.warn(`${l}: ${e}`)};function p(e){try{return JSON.stringify(e,null,2)}catch{return``}}var m=(e,t)=>{if(!e)return t;let n=(e=>{if(e===`.`)return``;if(e.startsWith(`./`))return e.replace(`./`,``);if(e.startsWith(`/`)){let t=e.slice(1);return t.endsWith(`/`)?t.slice(0,-1):t}return e})(e);return n?n.endsWith(`/`)?`${n}${t}`:`${n}/${t}`:t};function ee(e){return e.replace(/#.*$/,``).replace(/\?.*$/,``).replace(/\/[^\/]+$/,`/`)}function h(e,t={}){let{remotes:n={},overrides:r={},version:i}=t,a,o=()=>`publicPath`in e.metaData?(e.metaData.publicPath===`auto`||e.metaData.publicPath===``)&&i?ee(i):e.metaData.publicPath:e.metaData.getPublicPath,s=Object.keys(r),c={};Object.keys(n).length||(c=e.remotes?.reduce((e,t)=>{let n,i=t.federationContainerName;return n=s.includes(i)?r[i]:`version`in t?t.version:t.entry,e[i]={matchedVersion:n},e},{})||{}),Object.keys(n).forEach(e=>c[e]={matchedVersion:s.includes(e)?r[e]:n[e]});let{remoteEntry:{path:l,name:u,type:d},types:f={path:``,name:``,zip:``,api:``},buildInfo:{buildVersion:p},globalName:h,ssrRemoteEntry:g}=e.metaData,{exposes:te}=e,_={version:i||``,buildVersion:p,globalName:h,remoteEntry:m(l,u),remoteEntryType:d,remoteTypes:m(f.path,f.name),remoteTypesZip:f.zip||``,remoteTypesAPI:f.api||``,remotesInfo:c,shared:e?.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version,usedExports:e.referenceExports||[]})),modules:te?.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(`publicPath`in e.metaData?(a={..._,publicPath:o()},typeof e.metaData.ssrPublicPath==`string`&&(a.ssrPublicPath=e.metaData.ssrPublicPath)):a={..._,getPublicPath:o()},g){let e=m(g.path,g.name);a.ssrRemoteEntry=e,a.ssrRemoteEntryType=g.type||`commonjs-module`}return a}function g(e){return!!(`remoteEntry`in e&&e.remoteEntry.includes(`.json`))}var te=`[ Module Federation ]`,_=console,ne=[`logger.ts`,`logger.js`,`captureStackTrace`,`Logger.emit`,`Logger.log`,`Logger.info`,`Logger.warn`,`Logger.error`,`Logger.debug`];function re(){try{let e=Error().stack;if(!e)return;let[,...t]=e.split(`
|
|
3
3
|
`),n=t.filter(e=>!ne.some(t=>e.includes(t)));return n.length?`Stack trace:\n${n.slice(0,5).join(`
|
|
4
4
|
`)}`:void 0}catch{return}}var ie=class{constructor(e,t=_){this.prefix=e,this.delegate=t??_}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??_}emit(e,t){let n=this.delegate,r=c()?re():void 0,i=r?[...t,r]:t,a=(()=>{switch(e){case`log`:return[`log`,`info`];case`info`:return[`info`,`log`];case`warn`:return[`warn`,`info`,`log`];case`error`:return[`error`,`warn`,`log`];default:return[`debug`,`log`]}})();for(let e of a){let t=n[e];if(typeof t==`function`){t.call(n,this.prefix,...i);return}}for(let e of a){let t=_[e];if(typeof t==`function`){t.call(_,this.prefix,...i);return}}}log(...e){this.emit(`log`,e)}warn(...e){this.emit(`warn`,e)}error(...e){this.emit(`error`,e)}success(...e){this.emit(`info`,e)}info(...e){this.emit(`info`,e)}ready(...e){this.emit(`info`,e)}debug(...e){c()&&this.emit(`debug`,e)}};function ae(e){return new ie(e)}function oe(e){let t=new ie(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}ae(te),oe(te);async function se(e,t){try{return await e()}catch(e){!t&&f(e);return}}function ce(e,t){let n=/^(https?:)?\/\//i;return e.replace(n,``).replace(/\/$/,``)===t.replace(n,``).replace(/\/$/,``)}function le(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`script`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`src`);if(o&&ce(o,e.url)){t=i,n=!1;break}}if(!t){let n=e.attrs;t=document.createElement(`script`),t.type=n?.type===`module`?`module`:`text/javascript`;let i;e.createScriptHook&&(i=e.createScriptHook(e.url,e.attrs),i instanceof HTMLScriptElement?t=i:typeof i==`object`&&(`script`in i&&i.script&&(t=i.script),`timeout`in i&&i.timeout&&(r=i.timeout))),t.src||=e.url,n&&!i&&Object.keys(n).forEach(e=>{t&&(e===`async`||e===`defer`?t[e]=n[e]:t.getAttribute(e)||t.setAttribute(e,n[e]))})}let o=null,s=typeof window<`u`?t=>{if(t.filename&&ce(t.filename,e.url)){let n=Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`);n.name=`ScriptExecutionError`,o=n}}:null;s&&window.addEventListener(`error`,s);let c=async(n,r)=>{clearTimeout(i),s&&window.removeEventListener(`error`,s);let a=()=>{if(r?.type===`error`){let t=Error(r?.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);t.name=`ScriptNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else o?e?.onErrorCallback&&e?.onErrorCallback(o):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,se(()=>{let{needDeleteScript:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n&&typeof n==`function`)){let e=n(r);if(e instanceof Promise){let t=await e;return a(),t}return a(),e}a()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),i=setTimeout(()=>{c(null,{type:`error`,isTimeout:!0})},r),{script:t,needAttach:n}}function ue(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`link`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`href`),s=i.getAttribute(`rel`);if(o&&ce(o,e.url)&&s===e.attrs.rel){t=i,n=!1;break}}if(!t){t=document.createElement(`link`),t.setAttribute(`href`,e.url);let n,i=!0,a=e.attrs;e.createLinkHook&&(n=e.createLinkHook(e.url,a),n instanceof HTMLLinkElement?(t=n,i=!1):typeof n==`object`&&(`link`in n&&n.link&&(t=n.link,i=!1),`timeout`in n&&n.timeout&&(r=n.timeout))),a&&i&&Object.keys(a).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,a[e])})}if(!n)return Promise.resolve().then(()=>{e?.cb&&e?.cb()}),{link:t,needAttach:n};let o=(n,r)=>{i&&clearTimeout(i);let a=()=>{if(r?.type===`error`){let t=Error(r?.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);t.name=`LinkNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,se(()=>{let{needDeleteLink:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n)){let e=n(r);return a(),e}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),i=setTimeout(()=>{o(null,{type:`error`,isTimeout:!0})},r),{link:t,needAttach:n}}function de(e,t){let{attrs:n={},createScriptHook:r}=t;return new Promise((t,i)=>{let{script:a,needAttach:o}=le({url:e,cb:t,onErrorCallback:i,attrs:{fetchpriority:`high`,...n},createScriptHook:r,needDeleteScript:!0});o&&document.head.appendChild(a)})}var fe=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split(`-`)[0].toLowerCase()}#${e.toLowerCase()}`,pe=(e,t,n,r)=>{let i=[`${[t[e]]} #${e}`];return n&&i.push(`args: ${JSON.stringify(n)}`),i.push(fe(e)),r&&i.push(`Original Error Message:\n ${r}`),i.join(`
|
|
5
|
-
`)};function me(e,t,n,r,i,a){return r(pe(e,t,n,i))}var v=`[ Federation Runtime ]`,he=ae(v);function y(e,t,n,r,i){e||(n===void 0?b(t):b(t,n,r,void 0,i))}function b(e,t,n,r,i){if(t!==void 0)return me(e,t,n??{},e=>{throw Error(`${v}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(v)||(a.message=`${v}: ${a.message}`),a):Error(`${v}: ${a}`)}function x(e){e instanceof Error&&(e.message.startsWith(v)||(e.message=`${v}: ${e.message}`)),he.warn(e)}function ge(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function _e(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ve(e){return e.entry!==void 0}function ye(e){return!e.entry.includes(`.json`)}function be(e){return e&&typeof e==`object`}var xe=Object.prototype.toString;function Se(e){return xe.call(e)===`[object Object]`}function Ce(e){return Array.isArray(e)?e:[e]}function we(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var Te=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},S=typeof globalThis==`object`?globalThis:window,C=(()=>{try{return document.defaultView}catch{return S}})(),w=C;function T(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function Ee(e,t){return Object.hasOwnProperty.call(e,t)}Ee(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||T(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var E=S.__GLOBAL_LOADING_REMOTE_ENTRY__;function De(e){Ee(e,`__VMOK__`)&&!Ee(e,`__FEDERATION__`)&&T(e,`__FEDERATION__`,e.__VMOK__),Ee(e,`__FEDERATION__`)||(T(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),T(e,`__VMOK__`,e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}De(S),De(C);function Oe(e){S.__FEDERATION__.__INSTANCES__.push(e)}function ke(){return S.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Ae(e,t=c()){t&&(S.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,S.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.5.1`)}function D(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}else b(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var je=()=>C.__FEDERATION__.moduleInfo,Me=(e,t)=>{let n=D(t,_e(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=_e(n),i=D(C.__FEDERATION__.moduleInfo,r).value;if(i?.version===t)return i}},Ne=e=>Me(e,C.__FEDERATION__.moduleInfo),Pe=(e,t)=>{let n=_e(e);return C.__FEDERATION__.moduleInfo[n]=t,C.__FEDERATION__.moduleInfo},Fe=e=>(C.__FEDERATION__.moduleInfo={...C.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete C.__FEDERATION__.moduleInfo[e]}),Ie=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:S[n]}},Le=()=>C.__FEDERATION__.__GLOBAL_PLUGIN__,Re=e=>S.__FEDERATION__.__PRELOADED_MAP__.get(e),ze=e=>S.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),Be=`[0-9A-Za-z-]+`,Ve=`(?:\\+(${Be}(?:\\.${Be})*))`,O=`0|[1-9]\\d*`,k=`[0-9]+`,He=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,Ue=`(?:${k}|${He})`,We=`(?:-?(${Ue}(?:\\.${Ue})*))`,Ge=`(?:${O}|${He})`,Ke=`(?:-(${Ge}(?:\\.${Ge})*))`,qe=`${O}|x|X|\\*`,A=`[v=\\s]*(${qe})(?:\\.(${qe})(?:\\.(${qe})(?:${Ke})?${Ve}?)?)?`,Je=`^\\s*(${A})\\s+-\\s+(${A})\\s*$`,Ye=`[v=\\s]*${`(${k})\\.(${k})\\.(${k})`}${We}?${Ve}?`,Xe=`((?:<|>)?=?)`,Ze=`(\\s*)${Xe}\\s*(${Ye}|${A})`,Qe=`(?:~>?)`,$e=`(\\s*)${Qe}\\s+`,et=`(?:\\^)`,tt=`(\\s*)${et}\\s+`,nt=`(<|>)?=?\\s*\\*`,rt=`^${et}${A}$`,it=`v?${`(${O})\\.(${O})\\.(${O})`}${Ke}?${Ve}?`,at=`^${Qe}${A}$`,ot=`^${Xe}\\s*${A}$`,st=`^${Xe}\\s*(${it})$|^$`,ct=`^\\s*>=\\s*0.0.0\\s*$`;function j(e){return new RegExp(e)}function M(e){return!e||e.toLowerCase()===`x`||e===`*`}function lt(...e){return t=>e.reduce((e,t)=>t(e),t)}function ut(e){return e.match(j(st))}function dt(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function ft(e){return e.replace(j(Je),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=M(n)?``:M(r)?`>=${n}.0.0`:M(i)?`>=${n}.${r}.0`:`>=${t}`,s=M(c)?``:M(l)?`<${Number(c)+1}.0.0-0`:M(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function pt(e){return e.replace(j(Ze),`$1$2$3`)}function mt(e){return e.replace(j($e),`$1~`)}function ht(e){return e.replace(j(tt),`$1^`)}function gt(e){return e.trim().split(/\s+/).map(e=>e.replace(j(rt),(e,t,n,r,i)=>M(t)?``:M(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:M(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function _t(e){return e.trim().split(/\s+/).map(e=>e.replace(j(at),(e,t,n,r,i)=>M(t)?``:M(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:M(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function vt(e){return e.split(/\s+/).map(e=>e.trim().replace(j(ot),(e,t,n,r,i,a)=>{let o=M(n),s=o||M(r),c=s||M(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function yt(e){return e.trim().replace(j(nt),``)}function bt(e){return e.trim().replace(j(ct),``)}function xt(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function St(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?xt(t,i):-1:1}return 0}function N(e,t){return xt(e.major,t.major)||xt(e.minor,t.minor)||xt(e.patch,t.patch)||St(e,t)}function Ct(e,t){return e.version===t.version}function wt(e,t){switch(e.operator){case``:case`=`:return Ct(e,t);case`>`:return N(e,t)<0;case`>=`:return Ct(e,t)||N(e,t)<0;case`<`:return N(e,t)>0;case`<=`:return Ct(e,t)||N(e,t)>0;case void 0:return!0;default:return!1}}function Tt(e){return lt(gt,_t,vt,yt)(e)}function Et(e){return lt(ft,pt,mt,ht)(e.trim()).split(/\s+/).join(` `)}function P(e,t){if(!e)return!1;let n=ut(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:dt(i,a,o,s),major:i,minor:a,patch:o,preRelease:s?.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=Et(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>Tt(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>bt(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=ut(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!wt({operator:n,version:dt(r,a,o,s),major:r,minor:a,patch:o,preRelease:s?.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var Dt=`default`,Ot=`global`;function kt(e,t,n,r){let a;return a=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{b(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&b(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:a,loaded:e?.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??r)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??i.UNKNOWN,useIn:[]}:void 0}}function At(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=Ce(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(kt(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function F(e,t){if(!e)return!1;let{status:n,mode:r}=e;return n===i.NO_USE?!1:n===i.CALCULATED?!0:r===`runtime-infer`?t?Nt(e,t):!0:!1}function I(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!P(n(e),`<=${n(t)}`)}var L=(e,t)=>{let n=t||function(e,t){return I(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},jt=e=>!!e.loaded||typeof e.lib==`function`,Mt=e=>!!e.loading,Nt=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Pt(e,t,n,r){let i=e[t][n],a=``,o=F(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!jt(i[e].treeShaking)&&I(e,t):!1:!0:!jt(i[e])&&I(e,t)};if(o){if(a=L(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:L(e[t][n],s),useTreesShaking:o}}var R=e=>jt(e)||Mt(e);function Ft(e,t,n,r){let i=e[t][n],a=``,o=F(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(R(i[t].treeShaking))return R(i[e].treeShaking)?!!I(e,t):!0;if(R(i[e].treeShaking))return!1}return R(i[t])?R(i[e])?!!I(e,t):!0:R(i[e])?!1:I(e,t)};if(o){if(a=L(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:L(e[t][n],s),useTreesShaking:o}}function It(e){return e===`loaded-first`?Ft:Pt}function z(e,t,n,r){if(!e)return;let{shareConfig:i,scope:a=Dt,strategy:o,treeShaking:s}=n,c=Array.isArray(a)?a:[a];for(let a of c)if(i&&e[a]&&e[a][t]){let{requiredVersion:c}=i,{version:l,useTreesShaking:u}=It(o)(e,a,t,s),d={shareScopeMap:e,scope:a,pkgName:t,version:l,GlobalFederation:w.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[a][t][l];if(i.singleton){if(typeof c==`string`&&!P(l,c)){let e=`Version ${l} from ${l&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${c})`;i.strictVersion?b(e):x(e)}return{shared:r,useTreesShaking:u}}else{if(c===!1||c===`*`||P(l,c))return{shared:r,useTreesShaking:u};let n=F(s);if(n){for(let[r,i]of Object.entries(e[a][t]))if(F(i.treeShaking,s?.usedExports)&&P(r,c))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[a][t]))if(P(n,c))return{shared:r,useTreesShaking:!1}}}};return(r.emit(d)||d).resolver()}}function Lt(){return w.__FEDERATION__.__SHARE__}function Rt(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=n?.resolver??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[L(t,function(e,n){return!jt(t[e])&&I(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n?.customShareInfo)}var B=(e,t)=>{e.useIn||=[],ge(e.useIn,t)};function V(e,t){return t&&e.treeShaking?e.treeShaking:e}function zt(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Bt(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}else if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}else if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Vt(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Ht=`RUNTIME-001`,Ut=`RUNTIME-002`,Wt=`RUNTIME-003`,Gt=`RUNTIME-004`,Kt=`RUNTIME-005`,qt=`RUNTIME-006`,Jt=`RUNTIME-007`,Yt=`RUNTIME-008`,Xt=`RUNTIME-009`,Zt=`RUNTIME-010`,Qt=`RUNTIME-011`,$t=`RUNTIME-012`,en=`RUNTIME-013`,tn=`RUNTIME-014`,nn=`RUNTIME-015`,rn=`TYPE-001`,an=`BUILD-001`,on=`BUILD-002`,H={[Ht]:`Failed to get remoteEntry exports.`,[Ut]:`The remote entry interface does not contain "init"`,[Wt]:`Failed to get manifest.`,[Gt]:`Failed to locate remote.`,[Kt]:`Invalid loadShareSync function call from bundler runtime`,[qt]:`Invalid loadShareSync function call from runtime`,[Jt]:`Failed to get remote snapshot.`,[Yt]:`Failed to load script resources.`,[Xt]:`Please call createInstance first.`,[Zt]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[Qt]:`The remoteEntry URL is missing from the remote snapshot.`,[$t]:`The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.`,[en]:`The manifest is not a valid Module Federation manifest.`,[tn]:`The remote does not expose the requested module.`,[nn]:`Remote container initialization failed.`},sn={[rn]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},cn={[an]:`Failed to find expose module.`,[on]:`PublicPath is required in prod mode.`};({...H,...sn,...cn});var ln=`.then(callbacks[0]).catch(callbacks[1])`;async function un({entry:t,remoteEntryExports:n}){return new Promise((r,i)=>{try{n?r(n):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${t}")${ln}`)([r,i]):e(()=>import(t).then(r),[]).catch(i)}catch(e){b(`Failed to load ESM entry from "${t}". ${e instanceof Error?e.message:String(e)}`)}})}async function dn({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${ln}`)([n,r])}catch(t){b(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function fn(e,t,n){let{remoteEntryKey:r,entryExports:i}=Ie(e,t);return i||b(Ht,H,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function pn({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Ie(e,t);if(s)return s;let c=a?a(n):n;return de(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>fn(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);b(Yt,H,{remoteName:e,resourceUrl:c},n)})}async function mn({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;switch(c){case`esm`:case`module`:return un({entry:a,remoteEntryExports:t});case`system`:return dn({entry:a,remoteEntryExports:t});default:return pn({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}}function hn(e){let{entry:t,name:n}=e;return u(n,t)}async function gn(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=hn(r);if(n)return n;if(!E[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;E[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n}).then(e=>e||mn({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e}),e)).catch(async e=>{let i=hn(r),a=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!a&&!o){let e=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>gn({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:E,uniqueKey:i});if(e)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,recovered:!0}),e}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,error:e}),e})}return E[s]}function U(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function _n(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function vn(e,t){let n=Le(),r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return n.length>0&&n.forEach(t=>{e?.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{r.forEach(n=>{n.applyPlugin(e,t)})}),e}function yn(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function W(e){let t={};for(let[n,r]of Object.entries(e.shared)){let e=r[0];e&&(t[n]={version:e.version,singleton:e.shareConfig?.singleton,requiredVersion:e.shareConfig?.requiredVersion===!1?!1:e.shareConfig?.requiredVersion,eager:e.eager,strictVersion:e.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:e.remotes?.map(yn)??[],shared:t}}}function bn(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,...e}}function xn(e,t){return t.map(t=>{let n=Vt(e,t.nameOrAlias);return y(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&p({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:bn(t)}})}function Sn(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function Cn(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function G(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}async function wn(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i?.remoteEntryExports)return G(r,a,`cached`);try{if(!await gn({origin:e,remoteInfo:n,remoteEntryExports:i?.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return G(r,a,`success`)}catch(e){return G(r,a,Cn(e)?`timeout`:`error`,e)}}function Tn({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=ue({url:n,cb:()=>{o(G(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(G(i,n,Cn(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function En({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=le({url:n,cb:()=>{a(G(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(G(i,n,Cn(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function K(e,t){return{...e,resourceType:t}}function Dn(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name}){let{cssAssets:a,jsAssetsWithoutEntry:o,entryAssets:s}=n,c=[];if(t.options.inBrowser){if(s.forEach(n=>{let{moduleInfo:r}=n;c.push(wn(t,e,r,K(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};a.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`css`)}))})}else{let n={rel:`stylesheet`,type:`text/css`};a.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:K(i,`css`)}))})}if(r){let n={rel:`preload`,as:`script`};o.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`js`)}))})}else{let n={fetchpriority:`high`,type:e?.type===`module`?`module`:`text/javascript`};o.forEach(r=>{c.push(En({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`js`)}))})}}return Promise.all(c)}function On(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function kn(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var An=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;let t=await gn({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:`loadRemote`,id:zt(this.remoteInfo.name,e),resourceType:`remoteEntry`}});return y(t,`remoteEntryExports is undefined \n ${p(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,n,r){let i=await this.getEntry(r);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host}),i;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,cached:!0,origin:this.host}),n}return i}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:a,initScope:o}=kn(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});i?.init===void 0&&b(Ut,H,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,W(this.host.options));try{await i.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){b(nn,H,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,W(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:i}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return i}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||b(tn,H,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:On(r)},void 0,W(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=Te(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},q=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},J=class extends q{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function jn(e,t){if(!be(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Y=class extends q{constructor(e){super(),this.onerror=b,this.type=e}emit(e){be(e)||b(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(jn(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){x(e),this.onerror(e)}return e}},X=class extends q{constructor(e){super(),this.onerror=b,this.type=e}emit(e){be(e)||b(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(x(t),this.onerror(t),e),i=a=>{if(a!==void 0&&jn(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},Z=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){y(Se(e),`Plugin configuration is invalid.`);let n=e.name;y(n,`A name must be provided by the plugin.`),this.registerPlugins[n]||(this.registerPlugins[n]=e,e.apply?.(t),Object.keys(this.lifecycle).forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)}))}removePlugin(e){y(e,`A name is required.`);let t=this.registerPlugins[e];y(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{e!==`name`&&this.lifecycle[e].remove(t[e])})}};function Mn(e,t){let n=we(t);n.url||b(Qt,H,{remoteName:e.name});let r=d(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Nn(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!ve(t)||!ye(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:zt(t.name,r)});Mn(a,s);let l={remote:t,preloadConfig:{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1}},u=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:l,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});return u&&Dn(a,i,u,!1,{initiator:`loadRemote`,id:o}).catch(()=>void 0),{...e,remoteSnapshot:s}}return e}}}function Pn(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function Fn(e,t,n,r,i={},a){let{value:o}=D(e,_e(t)),s=a||o;if(s&&!g(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=Pn(r),a=s.remotesInfo[r];Fn(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var In=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function Ln(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:p}=f;if(Fn(r,n,(t,n,r)=>{let i;if(r)i=f;else if(Array.isArray(p)){let e=p.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;i=bn(e)}else if(p===!0)i=f;else return;let c=d(t,we(t).url);c&&s.push({name:n.name,moduleInfo:{name:n.name,entry:c,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:c});let l=`modules`in t?t.modules:[],u=Sn(i.exposes);u.length&&`modules`in t&&(l=t?.modules?.reduce((e,t)=>(u?.indexOf(t.moduleName)!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>d(t,e));return i.filter?n.filter(i.filter):n}if(l){let r=l.length;for(let s=0;s<r;s++){let r=l[s],c=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:c,name:n.name,remoteSnapshot:t,preloadConfig:i,remote:n,origin:e}),!Re(c)&&(i.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):i.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),ze(c))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=z(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{l.add(e)}))};i.shared.forEach(e=>{let n=u.shared?.[e.sharedName];if(!n)return;let r=e.version?n.find(t=>t.version===e.version):n;r&&Ce(r).forEach(n=>{t(n,e)})})}let m=o.filter(e=>!c.has(e)&&!In(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!In(`link`,e)),jsAssetsWithoutEntry:m,entryAssets:s.filter(e=>!In(`script`,e.url))}}var Rn=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return ve(i)&&ye(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Mn(r,o),Ln(t,n,r,a,o))}}};function zn(e,t){let n=Ne({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&D(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:je(),remoteSnapshot:Ne({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:je(),remoteSnapshot:Ne({name:e.name,version:`version`in e?e.version:void 0})}}var Bn=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Z({beforeLoadRemoteSnapshot:new J(`beforeLoadRemoteSnapshot`),loadSnapshot:new X(`loadGlobalSnapshot`),loadRemoteSnapshot:new X(`loadRemoteSnapshot`),afterLoadSnapshot:new X(`afterLoadSnapshot`)}),this.manifestLoading=w.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=Ne({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Fe({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!D(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i?.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c)if(g(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=Pe({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}else if(ve(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Pe(e,r);u=r,d=i}else b(Jt,H,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,W(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return zn(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=U(t),i=this.manifestCache.get(e);if(i)return i;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);(!t||!(t instanceof Response))&&(t=await fetch(e,{})),i=await t.json()}catch(r){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],b(Wt,H,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${r}`,W(this.HostInstance.options)))}let a=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean);return a.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${a.join(`, `)}.`),from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),a.length>0&&b(en,H,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:a.join(`,`)},void 0,W(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=h(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},Vn=class{constructor(e){this.hooks=new Z({beforeRegisterShare:new Y(`beforeRegisterShare`),afterResolve:new X(`afterResolve`),beforeLoadShare:new X(`beforeLoadShare`),loadShare:new J,afterLoadShare:new q(`afterLoadShare`),errorLoadShare:new q(`errorLoadShare`),resolveShare:new Y(`resolveShare`),initContainerShareScopeMap:new Y(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(e){x(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i})}catch(e){x(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=At(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n}),this.shareScopeMap[r]?.[e]||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),i=r;try{r?.scope&&await Promise.all(r.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:r.strategy}))})),i=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:r,shared:n.options.shared,origin:n})).shareInfo,y(i,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let a=i,{shared:o,useTreesShaking:s}=z(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare)||{};if(o){let t=V(o,s);if(t.lib)return B(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),t.lib;if(t.loading&&!t.loaded){let r=await t.loading;return t.loaded=!0,t.lib||=r,B(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),r}else{let r=(async()=>{let e=await t.get();return B(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:o,from:n.options.name,lib:null,loading:r,treeShaking:s?t:void 0});let i=await r;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),i}}else{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,recovered:!0}),!1;let r=F(a.treeShaking),i=V(a,r),o=(async()=>{let t=await i.get();i.lib=t,i.loaded=!0,B(i,n.options.name);let{shared:r,useTreesShaking:o}=z(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare)||{};if(r){let e=V(r,o);e.lib=t,e.loaded=!0,r.from=a.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:o,treeShaking:r?i:void 0});let s=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:a}),s}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:i,error:t}),t}}initializeSharing(e=Dt,t){let{host:n}=this,r=t?.from,i=t?.strategy,a=t?.initScope,o=[];if(r!==`build`){let{initTokens:t}=this;a||=[];let n=t[e];if(n||=t[e]={from:this.host.name},a.indexOf(n)>=0)return o;a.push(n)}let s=this.shareScopeMap,c=n.options.name;s[e]||(s[e]={});let l=s[e],u=(e,t)=>{let{version:n,eager:r}=t;l[e]=l[e]||{};let i=l[e],a=i[n]&&V(i[n]),o=!!(a&&(`eager`in a&&a.eager||`shareConfig`in a&&a.shareConfig?.eager));(!a||a.strategy!==`loaded-first`&&!a.loaded&&(!r==!o?c>i[n].from:r))&&(i[n]=t)},d=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r;try{r=await t.getEntry()}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r?.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,a))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&u(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&o.push(d(t.name))}),o}loadShareSync(e,t){let{host:n}=this,r=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{r?.scope&&r.scope.forEach(e=>{this.initializeSharing(e,{strategy:r.strategy})});let{shared:i}=z(this.shareScopeMap,e,r,this.hooks.lifecycle.resolveShare)||{};if(i){if(typeof i.lib==`function`)return B(i,n.options.name),i.loaded||(i.loaded=!0,i.from===n.options.name&&(r.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),i.lib;if(typeof i.get==`function`){let t=i.get();if(!(t instanceof Promise))return B(i,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),t}}if(r.lib)return r.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib;if(r.get){let i=r.get();return i instanceof Promise&&b(t?.from===`build`?Kt:qt,H,{hostName:n.options.name,sharedPkgName:e},void 0,W(n.options)),r.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:r.lib,shared:r}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib}b(qt,H,{hostName:n.options.name,sharedPkgName:e},void 0,W(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,error:t}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=Lt(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},Hn=class{constructor(e){this.hooks=new Z({beforeRegisterRemote:new Y(`beforeRegisterRemote`),registerRemote:new Y(`registerRemote`),beforeRequest:new X(`beforeRequest`),afterMatchRemote:new J(`afterMatchRemote`),onLoad:new J(`onLoad`),afterLoadRemote:new J(`afterLoadRemote`),handlePreloadModule:new q(`handlePreloadModule`),errorLoadRemote:new J(`errorLoadRemote`),beforePreloadRemote:new J(`beforePreloadRemote`),generatePreloadAssets:new J(`generatePreloadAssets`),afterPreloadRemote:new J(`afterPreloadRemote`),loadEntry:new J}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r};return}if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Bt(n.options.remotes,e),i=e,a=r?.expose,o=r?U(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:ee}=u;i=m,a=p,o=U(f);let h=await c.get(m,p,t,ee),g=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?h:void 0,exposeModuleFactory:r?void 0:h,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof g==`function`?g:h}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=xn(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:zt(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=U(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await Dn(s,t,l,!0,{initiator:`preloadRemote`,id:i});n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t?.force})})}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Bt(t.options.remotes,i);if(!a)try{b(Gt,H,{hostName:t.options.name,requestId:i},void 0,W(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=U(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;y(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new An(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>e.alias&&(t.name.startsWith(e.alias)||t.alias?.startsWith(e.alias)));y(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=Dt,e.type||=Ot};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n?.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),f(o.join(` `)))}}removeRemote(e){try{let{host:t}=this,{name:n}=e,r=t.options.remotes.findIndex(e=>e.name===n);r!==-1&&t.options.remotes.splice(r,1);let i=t.moduleCache.get(e.name);if(i){let n=i.remoteInfo,r=n.entryGlobalName;S[r]&&(Object.getOwnPropertyDescriptor(S,r)?.configurable?delete S[r]:S[r]=void 0);let a=hn(i.remoteInfo);E[a]&&delete E[a],t.snapshotHandler.manifestCache.delete(n.entry);let o=n.buildVersion?u(n.name,n.buildVersion):n.name,s=S.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===o:e.name===o);if(s!==-1){let e=S.__FEDERATION__.__INSTANCES__[s];o=e.options.id||o;let t=Lt(),r=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===n.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==n.name),c.useIn.length?r=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),r&&(e.shareScopeMap={},delete t[o]),i.forEach(([e,n,r,i])=>{delete t[e]?.[n]?.[r]?.[i]}),S.__FEDERATION__.__INSTANCES__.splice(s,1)}let{hostGlobalSnapshot:c}=zn(e,t);if(c){let t=c&&`remotesInfo`in c&&c.remotesInfo&&D(c.remotesInfo,e.name).key;t&&(delete c.remotesInfo[t],w.__FEDERATION__.__MANIFEST_LOADING__[t]&&delete w.__FEDERATION__.__MANIFEST_LOADING__[t])}t.moduleCache.delete(e.name)}}catch(e){he.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},Un=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN==`boolean`?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0,Wn=class{constructor(e){this.hooks=new Z({beforeInit:new Y(`beforeInit`),init:new q,beforeInitContainer:new X(`beforeInitContainer`),initContainer:new X(`initContainer`)}),this.version=`2.5.1`,this.moduleCache=new Map,this.loaderHook=new Z({getModuleInfo:new q,createScript:new q,createLink:new q,fetch:new J,loadEntryError:new J,afterLoadEntry:new J(`afterLoadEntry`),beforeInitRemote:new J(`beforeInitRemote`),afterInitRemote:new J(`afterInitRemote`),beforeGetExpose:new J(`beforeGetExpose`),afterGetExpose:new J(`afterGetExpose`),beforeExecuteFactory:new J(`beforeExecuteFactory`),afterExecuteFactory:new J(`afterExecuteFactory`),getModuleFactory:new J}),this.bridgeHook=new Z({beforeBridgeRender:new q,afterBridgeRender:new q,beforeBridgeDestroy:new q,afterBridgeDestroy:new q});let t=Un?[Nn(),Rn()]:[],n={id:_n(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=new Bn(this),this.sharedHandler=new Vn(this),this.remoteHandler=new Hn(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&b(pe(Zt,H)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=Dt,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){let r=U({name:e,entry:t}),i=new An({host:this,remoteInfo:r});return i.remoteEntryExports=n,this.moduleCache.set(e,i),i}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let{allShareInfos:n}=At(e,t),{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){let t=vn(e,this);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};function Gn(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function Kn(e,t){let n=Gn();return S.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}function qn(e){let t=new((ke())||Wn)({id:`${e.name}@${e.version||Date.now()}`,...e});return Oe(t),t}var Q=null;function Jn(e){let t=Kn(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),Q||=t,t):(Q=qn(n),Q)}function Yn(...e){return y(Q,Xt,H),Q.loadRemote.apply(Q,e)}function Xn(...e){return y(Q,Xt,H),Q.registerRemotes.apply(Q,e)}function Zn(e){return e?S.__FEDERATION__.__INSTANCES__.find(e)||null:Q}Ae(Wn),typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var Qn=`__mf_init__virtual:mf:__mfe_internal__admin_ui_host__mf_v__runtimeInit__mf_v__.js__`,$n=globalThis[Qn];if(!$n){let e,t,n=new Promise((n,r)=>{e=n,t=r});$n=globalThis[Qn]={initPromise:n,initResolve:e,initReject:t}}var er=$n.initResolve,tr=`__mf_module_cache__`;globalThis[tr]||={share:{},remote:{}},globalThis[tr].share||={},globalThis[tr].remote||={};var $=globalThis[tr],nr={},rr=`default`,ir=`admin_ui_host`,ar,or;async function sr(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}async function cr(){return ar||=sr(()=>e(()=>import(`./_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-D5_wAHv9.js`),[])).catch(e=>{throw ar=void 0,e}),ar}async function lr(){return or||=sr(()=>e(()=>import(`./virtualExposes-SIMIW5lI.js`),[])).then(e=>e.default??e).catch(e=>{throw or=void 0,e}),or}async function ur(t={},n=[]){let r=(e,t,n,r)=>{let i=((Array.isArray(r)?r[0]:r)||`default`)+`:`;return t||!n?i+e:i+e+`@`+n},{usedShared:i,usedRemotes:a}=await cr();try{let e=globalThis.__FEDERATION__?.__SHARE__;if(e){let t=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t};for(let[,n]of Object.entries(e)){let e=n?.default;if(e)for(let[n,a]of Object.entries(e))for(let[e,o]of Object.entries(a)){if(!o.lib)continue;let a=r(n,o.shareConfig?.singleton,e,`default`);if($.share[a]!==void 0)continue;let s=typeof o.lib==`function`?o.lib():o.lib,c=t(await Promise.resolve(s));$.share[a]=c;let l=i?.[n];if(o.shareConfig?.singleton&&l){let e=r(n,l.shareConfig?.singleton,l.version,l.scope);$.share[e]===void 0&&($.share[e]=c)}}}}}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}for(let[e,t]of Object.entries(i)){let n=r(e,t.shareConfig?.singleton,t.version,t.scope);if($.share[n]!==void 0)continue;let i=r(e,!0,t.version,t.scope);$.share[i]!==void 0&&($.share[n]=$.share[i])}if($.share[`default:react`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js`).then(e=>(e.Q(),e.Z)),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react`]=r}if($.share[`default:react-dom`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-D9-wIasd.js`).then(e=>(e.r(),e.n)),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-dom`]=r}if($.share[`default:react/jsx-runtime`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js`).then(e=>e.C),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react/jsx-runtime`]=r}if($.share[`default:@camstack/types`]===void 0){let t=await e(()=>import(`./dist-Dx_vZxMI.js`),__vite__mapDeps([0,1,2,3])),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/types`]=r}if($.share[`default:@camstack/sdk`]===void 0){let t=await e(()=>import(`./dist-DFASlyrs.js`),__vite__mapDeps([4,3])),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/sdk`]=r}if($.share[`default:@tanstack/react-query`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js`).then(e=>e.v),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@tanstack/react-query`]=r}if($.share[`default:@trpc/client`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-CSJxMxg6.js`).then(e=>e.k),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@trpc/client`]=r}if($.share[`default:@trpc/react-query`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DkcC9IVF.js`).then(e=>e.n),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@trpc/react-query`]=r}if($.share[`default:konva`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__konva__loadShare__.js-B7XYY0cV.js`).then(e=>e.t),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:konva`]=r}if($.share[`default:react-konva`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.js-BBBrLLEa.js`).then(e=>e.l),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-konva`]=r}if($.share[`default:@camstack/ui-library`]===void 0){let t=await e(()=>import(`./src-CjlMsFRd.js`).then(e=>e.t),__vite__mapDeps([5,3,4,6])),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/ui-library`]=r}if($.share[`default:react-dom/client`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DstpX0yz.js`).then(e=>e.n),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-dom/client`]=r}let o=[],s=globalThis.window===void 0?await Promise.all([]):[],c=Jn({name:ir,remotes:a,shared:i,plugins:[...o,...s],shareStrategy:`version-first`});var l=nr[rr];if(l||=nr[rr]={from:ir},!(n.indexOf(l)>=0)){n.push(l),c.initShareScopeMap(`default`,t),er(c);try{await sr(async()=>{await Promise.all(await c.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}for(let[e,n]of Object.entries(i)){let i=r(e,n.shareConfig?.singleton,n.version,n.scope);if(n.shareConfig?.import!==!1||$.share[i]!==void 0)continue;let a=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},o=t?.[e],s=o&&o[Object.keys(o)[0]];if(!s)continue;let c=s.lib||(s.loading?await s.loading:await s.get?.()),l=typeof c==`function`?c():c,u=await Promise.resolve(l);$.share[i]=a(u)}return c}}async function dr(e){let t=await lr();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return t[e]().then(e=>()=>e)}export{Yn as a,Jn as i,ur as n,Xn as o,Zn as r,dr as t};
|
|
5
|
+
`)};function me(e,t,n,r,i,a){return r(pe(e,t,n,i))}var v=`[ Federation Runtime ]`,he=ae(v);function y(e,t,n,r,i){e||(n===void 0?b(t):b(t,n,r,void 0,i))}function b(e,t,n,r,i){if(t!==void 0)return me(e,t,n??{},e=>{throw Error(`${v}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(v)||(a.message=`${v}: ${a.message}`),a):Error(`${v}: ${a}`)}function x(e){e instanceof Error&&(e.message.startsWith(v)||(e.message=`${v}: ${e.message}`)),he.warn(e)}function ge(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function _e(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ve(e){return e.entry!==void 0}function ye(e){return!e.entry.includes(`.json`)}function be(e){return e&&typeof e==`object`}var xe=Object.prototype.toString;function Se(e){return xe.call(e)===`[object Object]`}function Ce(e){return Array.isArray(e)?e:[e]}function we(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var Te=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},S=typeof globalThis==`object`?globalThis:window,C=(()=>{try{return document.defaultView}catch{return S}})(),w=C;function T(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function Ee(e,t){return Object.hasOwnProperty.call(e,t)}Ee(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||T(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var E=S.__GLOBAL_LOADING_REMOTE_ENTRY__;function De(e){Ee(e,`__VMOK__`)&&!Ee(e,`__FEDERATION__`)&&T(e,`__FEDERATION__`,e.__VMOK__),Ee(e,`__FEDERATION__`)||(T(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),T(e,`__VMOK__`,e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}De(S),De(C);function Oe(e){S.__FEDERATION__.__INSTANCES__.push(e)}function ke(){return S.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Ae(e,t=c()){t&&(S.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,S.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.5.1`)}function D(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}else b(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var je=()=>C.__FEDERATION__.moduleInfo,Me=(e,t)=>{let n=D(t,_e(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=_e(n),i=D(C.__FEDERATION__.moduleInfo,r).value;if(i?.version===t)return i}},Ne=e=>Me(e,C.__FEDERATION__.moduleInfo),Pe=(e,t)=>{let n=_e(e);return C.__FEDERATION__.moduleInfo[n]=t,C.__FEDERATION__.moduleInfo},Fe=e=>(C.__FEDERATION__.moduleInfo={...C.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete C.__FEDERATION__.moduleInfo[e]}),Ie=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:S[n]}},Le=()=>C.__FEDERATION__.__GLOBAL_PLUGIN__,Re=e=>S.__FEDERATION__.__PRELOADED_MAP__.get(e),ze=e=>S.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),Be=`[0-9A-Za-z-]+`,Ve=`(?:\\+(${Be}(?:\\.${Be})*))`,O=`0|[1-9]\\d*`,k=`[0-9]+`,He=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,Ue=`(?:${k}|${He})`,We=`(?:-?(${Ue}(?:\\.${Ue})*))`,Ge=`(?:${O}|${He})`,Ke=`(?:-(${Ge}(?:\\.${Ge})*))`,qe=`${O}|x|X|\\*`,A=`[v=\\s]*(${qe})(?:\\.(${qe})(?:\\.(${qe})(?:${Ke})?${Ve}?)?)?`,Je=`^\\s*(${A})\\s+-\\s+(${A})\\s*$`,Ye=`[v=\\s]*${`(${k})\\.(${k})\\.(${k})`}${We}?${Ve}?`,Xe=`((?:<|>)?=?)`,Ze=`(\\s*)${Xe}\\s*(${Ye}|${A})`,Qe=`(?:~>?)`,$e=`(\\s*)${Qe}\\s+`,et=`(?:\\^)`,tt=`(\\s*)${et}\\s+`,nt=`(<|>)?=?\\s*\\*`,rt=`^${et}${A}$`,it=`v?${`(${O})\\.(${O})\\.(${O})`}${Ke}?${Ve}?`,at=`^${Qe}${A}$`,ot=`^${Xe}\\s*${A}$`,st=`^${Xe}\\s*(${it})$|^$`,ct=`^\\s*>=\\s*0.0.0\\s*$`;function j(e){return new RegExp(e)}function M(e){return!e||e.toLowerCase()===`x`||e===`*`}function lt(...e){return t=>e.reduce((e,t)=>t(e),t)}function ut(e){return e.match(j(st))}function dt(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function ft(e){return e.replace(j(Je),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=M(n)?``:M(r)?`>=${n}.0.0`:M(i)?`>=${n}.${r}.0`:`>=${t}`,s=M(c)?``:M(l)?`<${Number(c)+1}.0.0-0`:M(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function pt(e){return e.replace(j(Ze),`$1$2$3`)}function mt(e){return e.replace(j($e),`$1~`)}function ht(e){return e.replace(j(tt),`$1^`)}function gt(e){return e.trim().split(/\s+/).map(e=>e.replace(j(rt),(e,t,n,r,i)=>M(t)?``:M(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:M(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function _t(e){return e.trim().split(/\s+/).map(e=>e.replace(j(at),(e,t,n,r,i)=>M(t)?``:M(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:M(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function vt(e){return e.split(/\s+/).map(e=>e.trim().replace(j(ot),(e,t,n,r,i,a)=>{let o=M(n),s=o||M(r),c=s||M(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function yt(e){return e.trim().replace(j(nt),``)}function bt(e){return e.trim().replace(j(ct),``)}function xt(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function St(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?xt(t,i):-1:1}return 0}function N(e,t){return xt(e.major,t.major)||xt(e.minor,t.minor)||xt(e.patch,t.patch)||St(e,t)}function Ct(e,t){return e.version===t.version}function wt(e,t){switch(e.operator){case``:case`=`:return Ct(e,t);case`>`:return N(e,t)<0;case`>=`:return Ct(e,t)||N(e,t)<0;case`<`:return N(e,t)>0;case`<=`:return Ct(e,t)||N(e,t)>0;case void 0:return!0;default:return!1}}function Tt(e){return lt(gt,_t,vt,yt)(e)}function Et(e){return lt(ft,pt,mt,ht)(e.trim()).split(/\s+/).join(` `)}function P(e,t){if(!e)return!1;let n=ut(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:dt(i,a,o,s),major:i,minor:a,patch:o,preRelease:s?.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=Et(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>Tt(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>bt(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=ut(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!wt({operator:n,version:dt(r,a,o,s),major:r,minor:a,patch:o,preRelease:s?.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var Dt=`default`,Ot=`global`;function kt(e,t,n,r){let a;return a=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{b(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&b(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:a,loaded:e?.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??r)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??i.UNKNOWN,useIn:[]}:void 0}}function At(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=Ce(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(kt(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function F(e,t){if(!e)return!1;let{status:n,mode:r}=e;return n===i.NO_USE?!1:n===i.CALCULATED?!0:r===`runtime-infer`?t?Nt(e,t):!0:!1}function I(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!P(n(e),`<=${n(t)}`)}var L=(e,t)=>{let n=t||function(e,t){return I(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},jt=e=>!!e.loaded||typeof e.lib==`function`,Mt=e=>!!e.loading,Nt=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Pt(e,t,n,r){let i=e[t][n],a=``,o=F(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!jt(i[e].treeShaking)&&I(e,t):!1:!0:!jt(i[e])&&I(e,t)};if(o){if(a=L(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:L(e[t][n],s),useTreesShaking:o}}var R=e=>jt(e)||Mt(e);function Ft(e,t,n,r){let i=e[t][n],a=``,o=F(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(R(i[t].treeShaking))return R(i[e].treeShaking)?!!I(e,t):!0;if(R(i[e].treeShaking))return!1}return R(i[t])?R(i[e])?!!I(e,t):!0:R(i[e])?!1:I(e,t)};if(o){if(a=L(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:L(e[t][n],s),useTreesShaking:o}}function It(e){return e===`loaded-first`?Ft:Pt}function z(e,t,n,r){if(!e)return;let{shareConfig:i,scope:a=Dt,strategy:o,treeShaking:s}=n,c=Array.isArray(a)?a:[a];for(let a of c)if(i&&e[a]&&e[a][t]){let{requiredVersion:c}=i,{version:l,useTreesShaking:u}=It(o)(e,a,t,s),d={shareScopeMap:e,scope:a,pkgName:t,version:l,GlobalFederation:w.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[a][t][l];if(i.singleton){if(typeof c==`string`&&!P(l,c)){let e=`Version ${l} from ${l&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${c})`;i.strictVersion?b(e):x(e)}return{shared:r,useTreesShaking:u}}else{if(c===!1||c===`*`||P(l,c))return{shared:r,useTreesShaking:u};let n=F(s);if(n){for(let[r,i]of Object.entries(e[a][t]))if(F(i.treeShaking,s?.usedExports)&&P(r,c))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[a][t]))if(P(n,c))return{shared:r,useTreesShaking:!1}}}};return(r.emit(d)||d).resolver()}}function Lt(){return w.__FEDERATION__.__SHARE__}function Rt(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=n?.resolver??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[L(t,function(e,n){return!jt(t[e])&&I(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n?.customShareInfo)}var B=(e,t)=>{e.useIn||=[],ge(e.useIn,t)};function V(e,t){return t&&e.treeShaking?e.treeShaking:e}function zt(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Bt(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}else if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}else if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Vt(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Ht=`RUNTIME-001`,Ut=`RUNTIME-002`,Wt=`RUNTIME-003`,Gt=`RUNTIME-004`,Kt=`RUNTIME-005`,qt=`RUNTIME-006`,Jt=`RUNTIME-007`,Yt=`RUNTIME-008`,Xt=`RUNTIME-009`,Zt=`RUNTIME-010`,Qt=`RUNTIME-011`,$t=`RUNTIME-012`,en=`RUNTIME-013`,tn=`RUNTIME-014`,nn=`RUNTIME-015`,rn=`TYPE-001`,an=`BUILD-001`,on=`BUILD-002`,H={[Ht]:`Failed to get remoteEntry exports.`,[Ut]:`The remote entry interface does not contain "init"`,[Wt]:`Failed to get manifest.`,[Gt]:`Failed to locate remote.`,[Kt]:`Invalid loadShareSync function call from bundler runtime`,[qt]:`Invalid loadShareSync function call from runtime`,[Jt]:`Failed to get remote snapshot.`,[Yt]:`Failed to load script resources.`,[Xt]:`Please call createInstance first.`,[Zt]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[Qt]:`The remoteEntry URL is missing from the remote snapshot.`,[$t]:`The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.`,[en]:`The manifest is not a valid Module Federation manifest.`,[tn]:`The remote does not expose the requested module.`,[nn]:`Remote container initialization failed.`},sn={[rn]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},cn={[an]:`Failed to find expose module.`,[on]:`PublicPath is required in prod mode.`};({...H,...sn,...cn});var ln=`.then(callbacks[0]).catch(callbacks[1])`;async function un({entry:t,remoteEntryExports:n}){return new Promise((r,i)=>{try{n?r(n):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${t}")${ln}`)([r,i]):e(()=>import(t).then(r),[]).catch(i)}catch(e){b(`Failed to load ESM entry from "${t}". ${e instanceof Error?e.message:String(e)}`)}})}async function dn({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${ln}`)([n,r])}catch(t){b(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function fn(e,t,n){let{remoteEntryKey:r,entryExports:i}=Ie(e,t);return i||b(Ht,H,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function pn({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Ie(e,t);if(s)return s;let c=a?a(n):n;return de(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>fn(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);b(Yt,H,{remoteName:e,resourceUrl:c},n)})}async function mn({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;switch(c){case`esm`:case`module`:return un({entry:a,remoteEntryExports:t});case`system`:return dn({entry:a,remoteEntryExports:t});default:return pn({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}}function hn(e){let{entry:t,name:n}=e;return u(n,t)}async function gn(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=hn(r);if(n)return n;if(!E[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;E[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n}).then(e=>e||mn({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e}),e)).catch(async e=>{let i=hn(r),a=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!a&&!o){let e=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>gn({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:E,uniqueKey:i});if(e)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,recovered:!0}),e}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,error:e}),e})}return E[s]}function U(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function _n(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function vn(e,t){let n=Le(),r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return n.length>0&&n.forEach(t=>{e?.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{r.forEach(n=>{n.applyPlugin(e,t)})}),e}function yn(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function W(e){let t={};for(let[n,r]of Object.entries(e.shared)){let e=r[0];e&&(t[n]={version:e.version,singleton:e.shareConfig?.singleton,requiredVersion:e.shareConfig?.requiredVersion===!1?!1:e.shareConfig?.requiredVersion,eager:e.eager,strictVersion:e.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:e.remotes?.map(yn)??[],shared:t}}}function bn(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,...e}}function xn(e,t){return t.map(t=>{let n=Vt(e,t.nameOrAlias);return y(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&p({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:bn(t)}})}function Sn(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function Cn(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function G(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}async function wn(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i?.remoteEntryExports)return G(r,a,`cached`);try{if(!await gn({origin:e,remoteInfo:n,remoteEntryExports:i?.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return G(r,a,`success`)}catch(e){return G(r,a,Cn(e)?`timeout`:`error`,e)}}function Tn({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=ue({url:n,cb:()=>{o(G(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(G(i,n,Cn(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function En({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=le({url:n,cb:()=>{a(G(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(G(i,n,Cn(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function K(e,t){return{...e,resourceType:t}}function Dn(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name}){let{cssAssets:a,jsAssetsWithoutEntry:o,entryAssets:s}=n,c=[];if(t.options.inBrowser){if(s.forEach(n=>{let{moduleInfo:r}=n;c.push(wn(t,e,r,K(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};a.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`css`)}))})}else{let n={rel:`stylesheet`,type:`text/css`};a.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:K(i,`css`)}))})}if(r){let n={rel:`preload`,as:`script`};o.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`js`)}))})}else{let n={fetchpriority:`high`,type:e?.type===`module`?`module`:`text/javascript`};o.forEach(r=>{c.push(En({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`js`)}))})}}return Promise.all(c)}function On(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function kn(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var An=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;let t=await gn({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:`loadRemote`,id:zt(this.remoteInfo.name,e),resourceType:`remoteEntry`}});return y(t,`remoteEntryExports is undefined \n ${p(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,n,r){let i=await this.getEntry(r);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host}),i;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,cached:!0,origin:this.host}),n}return i}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:a,initScope:o}=kn(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});i?.init===void 0&&b(Ut,H,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,W(this.host.options));try{await i.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){b(nn,H,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,W(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:i}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return i}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||b(tn,H,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:On(r)},void 0,W(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=Te(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},q=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},J=class extends q{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function jn(e,t){if(!be(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Y=class extends q{constructor(e){super(),this.onerror=b,this.type=e}emit(e){be(e)||b(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(jn(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){x(e),this.onerror(e)}return e}},X=class extends q{constructor(e){super(),this.onerror=b,this.type=e}emit(e){be(e)||b(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(x(t),this.onerror(t),e),i=a=>{if(a!==void 0&&jn(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},Z=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){y(Se(e),`Plugin configuration is invalid.`);let n=e.name;y(n,`A name must be provided by the plugin.`),this.registerPlugins[n]||(this.registerPlugins[n]=e,e.apply?.(t),Object.keys(this.lifecycle).forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)}))}removePlugin(e){y(e,`A name is required.`);let t=this.registerPlugins[e];y(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{e!==`name`&&this.lifecycle[e].remove(t[e])})}};function Mn(e,t){let n=we(t);n.url||b(Qt,H,{remoteName:e.name});let r=d(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Nn(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!ve(t)||!ye(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:zt(t.name,r)});Mn(a,s);let l={remote:t,preloadConfig:{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1}},u=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:l,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});return u&&Dn(a,i,u,!1,{initiator:`loadRemote`,id:o}).catch(()=>void 0),{...e,remoteSnapshot:s}}return e}}}function Pn(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function Fn(e,t,n,r,i={},a){let{value:o}=D(e,_e(t)),s=a||o;if(s&&!g(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=Pn(r),a=s.remotesInfo[r];Fn(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var In=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function Ln(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:p}=f;if(Fn(r,n,(t,n,r)=>{let i;if(r)i=f;else if(Array.isArray(p)){let e=p.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;i=bn(e)}else if(p===!0)i=f;else return;let c=d(t,we(t).url);c&&s.push({name:n.name,moduleInfo:{name:n.name,entry:c,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:c});let l=`modules`in t?t.modules:[],u=Sn(i.exposes);u.length&&`modules`in t&&(l=t?.modules?.reduce((e,t)=>(u?.indexOf(t.moduleName)!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>d(t,e));return i.filter?n.filter(i.filter):n}if(l){let r=l.length;for(let s=0;s<r;s++){let r=l[s],c=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:c,name:n.name,remoteSnapshot:t,preloadConfig:i,remote:n,origin:e}),!Re(c)&&(i.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):i.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),ze(c))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=z(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{l.add(e)}))};i.shared.forEach(e=>{let n=u.shared?.[e.sharedName];if(!n)return;let r=e.version?n.find(t=>t.version===e.version):n;r&&Ce(r).forEach(n=>{t(n,e)})})}let m=o.filter(e=>!c.has(e)&&!In(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!In(`link`,e)),jsAssetsWithoutEntry:m,entryAssets:s.filter(e=>!In(`script`,e.url))}}var Rn=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return ve(i)&&ye(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Mn(r,o),Ln(t,n,r,a,o))}}};function zn(e,t){let n=Ne({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&D(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:je(),remoteSnapshot:Ne({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:je(),remoteSnapshot:Ne({name:e.name,version:`version`in e?e.version:void 0})}}var Bn=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Z({beforeLoadRemoteSnapshot:new J(`beforeLoadRemoteSnapshot`),loadSnapshot:new X(`loadGlobalSnapshot`),loadRemoteSnapshot:new X(`loadRemoteSnapshot`),afterLoadSnapshot:new X(`afterLoadSnapshot`)}),this.manifestLoading=w.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=Ne({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Fe({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!D(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i?.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c)if(g(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=Pe({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}else if(ve(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Pe(e,r);u=r,d=i}else b(Jt,H,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,W(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return zn(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=U(t),i=this.manifestCache.get(e);if(i)return i;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);(!t||!(t instanceof Response))&&(t=await fetch(e,{})),i=await t.json()}catch(r){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],b(Wt,H,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${r}`,W(this.HostInstance.options)))}let a=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean);return a.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${a.join(`, `)}.`),from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),a.length>0&&b(en,H,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:a.join(`,`)},void 0,W(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=h(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},Vn=class{constructor(e){this.hooks=new Z({beforeRegisterShare:new Y(`beforeRegisterShare`),afterResolve:new X(`afterResolve`),beforeLoadShare:new X(`beforeLoadShare`),loadShare:new J,afterLoadShare:new q(`afterLoadShare`),errorLoadShare:new q(`errorLoadShare`),resolveShare:new Y(`resolveShare`),initContainerShareScopeMap:new Y(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(e){x(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i})}catch(e){x(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=At(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n}),this.shareScopeMap[r]?.[e]||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),i=r;try{r?.scope&&await Promise.all(r.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:r.strategy}))})),i=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:r,shared:n.options.shared,origin:n})).shareInfo,y(i,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let a=i,{shared:o,useTreesShaking:s}=z(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare)||{};if(o){let t=V(o,s);if(t.lib)return B(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),t.lib;if(t.loading&&!t.loaded){let r=await t.loading;return t.loaded=!0,t.lib||=r,B(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),r}else{let r=(async()=>{let e=await t.get();return B(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:o,from:n.options.name,lib:null,loading:r,treeShaking:s?t:void 0});let i=await r;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),i}}else{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,recovered:!0}),!1;let r=F(a.treeShaking),i=V(a,r),o=(async()=>{let t=await i.get();i.lib=t,i.loaded=!0,B(i,n.options.name);let{shared:r,useTreesShaking:o}=z(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare)||{};if(r){let e=V(r,o);e.lib=t,e.loaded=!0,r.from=a.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:o,treeShaking:r?i:void 0});let s=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:a}),s}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:i,error:t}),t}}initializeSharing(e=Dt,t){let{host:n}=this,r=t?.from,i=t?.strategy,a=t?.initScope,o=[];if(r!==`build`){let{initTokens:t}=this;a||=[];let n=t[e];if(n||=t[e]={from:this.host.name},a.indexOf(n)>=0)return o;a.push(n)}let s=this.shareScopeMap,c=n.options.name;s[e]||(s[e]={});let l=s[e],u=(e,t)=>{let{version:n,eager:r}=t;l[e]=l[e]||{};let i=l[e],a=i[n]&&V(i[n]),o=!!(a&&(`eager`in a&&a.eager||`shareConfig`in a&&a.shareConfig?.eager));(!a||a.strategy!==`loaded-first`&&!a.loaded&&(!r==!o?c>i[n].from:r))&&(i[n]=t)},d=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r;try{r=await t.getEntry()}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r?.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,a))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&u(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&o.push(d(t.name))}),o}loadShareSync(e,t){let{host:n}=this,r=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{r?.scope&&r.scope.forEach(e=>{this.initializeSharing(e,{strategy:r.strategy})});let{shared:i}=z(this.shareScopeMap,e,r,this.hooks.lifecycle.resolveShare)||{};if(i){if(typeof i.lib==`function`)return B(i,n.options.name),i.loaded||(i.loaded=!0,i.from===n.options.name&&(r.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),i.lib;if(typeof i.get==`function`){let t=i.get();if(!(t instanceof Promise))return B(i,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),t}}if(r.lib)return r.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib;if(r.get){let i=r.get();return i instanceof Promise&&b(t?.from===`build`?Kt:qt,H,{hostName:n.options.name,sharedPkgName:e},void 0,W(n.options)),r.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:r.lib,shared:r}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib}b(qt,H,{hostName:n.options.name,sharedPkgName:e},void 0,W(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,error:t}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=Lt(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},Hn=class{constructor(e){this.hooks=new Z({beforeRegisterRemote:new Y(`beforeRegisterRemote`),registerRemote:new Y(`registerRemote`),beforeRequest:new X(`beforeRequest`),afterMatchRemote:new J(`afterMatchRemote`),onLoad:new J(`onLoad`),afterLoadRemote:new J(`afterLoadRemote`),handlePreloadModule:new q(`handlePreloadModule`),errorLoadRemote:new J(`errorLoadRemote`),beforePreloadRemote:new J(`beforePreloadRemote`),generatePreloadAssets:new J(`generatePreloadAssets`),afterPreloadRemote:new J(`afterPreloadRemote`),loadEntry:new J}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r};return}if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Bt(n.options.remotes,e),i=e,a=r?.expose,o=r?U(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:ee}=u;i=m,a=p,o=U(f);let h=await c.get(m,p,t,ee),g=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?h:void 0,exposeModuleFactory:r?void 0:h,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof g==`function`?g:h}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=xn(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:zt(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=U(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await Dn(s,t,l,!0,{initiator:`preloadRemote`,id:i});n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t?.force})})}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Bt(t.options.remotes,i);if(!a)try{b(Gt,H,{hostName:t.options.name,requestId:i},void 0,W(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=U(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;y(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new An(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>e.alias&&(t.name.startsWith(e.alias)||t.alias?.startsWith(e.alias)));y(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=Dt,e.type||=Ot};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n?.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),f(o.join(` `)))}}removeRemote(e){try{let{host:t}=this,{name:n}=e,r=t.options.remotes.findIndex(e=>e.name===n);r!==-1&&t.options.remotes.splice(r,1);let i=t.moduleCache.get(e.name);if(i){let n=i.remoteInfo,r=n.entryGlobalName;S[r]&&(Object.getOwnPropertyDescriptor(S,r)?.configurable?delete S[r]:S[r]=void 0);let a=hn(i.remoteInfo);E[a]&&delete E[a],t.snapshotHandler.manifestCache.delete(n.entry);let o=n.buildVersion?u(n.name,n.buildVersion):n.name,s=S.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===o:e.name===o);if(s!==-1){let e=S.__FEDERATION__.__INSTANCES__[s];o=e.options.id||o;let t=Lt(),r=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===n.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==n.name),c.useIn.length?r=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),r&&(e.shareScopeMap={},delete t[o]),i.forEach(([e,n,r,i])=>{delete t[e]?.[n]?.[r]?.[i]}),S.__FEDERATION__.__INSTANCES__.splice(s,1)}let{hostGlobalSnapshot:c}=zn(e,t);if(c){let t=c&&`remotesInfo`in c&&c.remotesInfo&&D(c.remotesInfo,e.name).key;t&&(delete c.remotesInfo[t],w.__FEDERATION__.__MANIFEST_LOADING__[t]&&delete w.__FEDERATION__.__MANIFEST_LOADING__[t])}t.moduleCache.delete(e.name)}}catch(e){he.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},Un=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN==`boolean`?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0,Wn=class{constructor(e){this.hooks=new Z({beforeInit:new Y(`beforeInit`),init:new q,beforeInitContainer:new X(`beforeInitContainer`),initContainer:new X(`initContainer`)}),this.version=`2.5.1`,this.moduleCache=new Map,this.loaderHook=new Z({getModuleInfo:new q,createScript:new q,createLink:new q,fetch:new J,loadEntryError:new J,afterLoadEntry:new J(`afterLoadEntry`),beforeInitRemote:new J(`beforeInitRemote`),afterInitRemote:new J(`afterInitRemote`),beforeGetExpose:new J(`beforeGetExpose`),afterGetExpose:new J(`afterGetExpose`),beforeExecuteFactory:new J(`beforeExecuteFactory`),afterExecuteFactory:new J(`afterExecuteFactory`),getModuleFactory:new J}),this.bridgeHook=new Z({beforeBridgeRender:new q,afterBridgeRender:new q,beforeBridgeDestroy:new q,afterBridgeDestroy:new q});let t=Un?[Nn(),Rn()]:[],n={id:_n(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=new Bn(this),this.sharedHandler=new Vn(this),this.remoteHandler=new Hn(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&b(pe(Zt,H)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=Dt,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){let r=U({name:e,entry:t}),i=new An({host:this,remoteInfo:r});return i.remoteEntryExports=n,this.moduleCache.set(e,i),i}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let{allShareInfos:n}=At(e,t),{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){let t=vn(e,this);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};function Gn(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function Kn(e,t){let n=Gn();return S.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}function qn(e){let t=new((ke())||Wn)({id:`${e.name}@${e.version||Date.now()}`,...e});return Oe(t),t}var Q=null;function Jn(e){let t=Kn(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),Q||=t,t):(Q=qn(n),Q)}function Yn(...e){return y(Q,Xt,H),Q.loadRemote.apply(Q,e)}function Xn(...e){return y(Q,Xt,H),Q.registerRemotes.apply(Q,e)}function Zn(e){return e?S.__FEDERATION__.__INSTANCES__.find(e)||null:Q}Ae(Wn),typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var Qn=`__mf_init__virtual:mf:__mfe_internal__admin_ui_host__mf_v__runtimeInit__mf_v__.js__`,$n=globalThis[Qn];if(!$n){let e,t,n=new Promise((n,r)=>{e=n,t=r});$n=globalThis[Qn]={initPromise:n,initResolve:e,initReject:t}}var er=$n.initResolve,tr=`__mf_module_cache__`;globalThis[tr]||={share:{},remote:{}},globalThis[tr].share||={},globalThis[tr].remote||={};var $=globalThis[tr],nr={},rr=`default`,ir=`admin_ui_host`,ar,or;async function sr(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}async function cr(){return ar||=sr(()=>e(()=>import(`./_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-C4scCSJo.js`),[])).catch(e=>{throw ar=void 0,e}),ar}async function lr(){return or||=sr(()=>e(()=>import(`./virtualExposes-SIMIW5lI.js`),[])).then(e=>e.default??e).catch(e=>{throw or=void 0,e}),or}async function ur(t={},n=[]){let r=(e,t,n,r)=>{let i=((Array.isArray(r)?r[0]:r)||`default`)+`:`;return t||!n?i+e:i+e+`@`+n},{usedShared:i,usedRemotes:a}=await cr();try{let e=globalThis.__FEDERATION__?.__SHARE__;if(e){let t=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t};for(let[,n]of Object.entries(e)){let e=n?.default;if(e)for(let[n,a]of Object.entries(e))for(let[e,o]of Object.entries(a)){if(!o.lib)continue;let a=r(n,o.shareConfig?.singleton,e,`default`);if($.share[a]!==void 0)continue;let s=typeof o.lib==`function`?o.lib():o.lib,c=t(await Promise.resolve(s));$.share[a]=c;let l=i?.[n];if(o.shareConfig?.singleton&&l){let e=r(n,l.shareConfig?.singleton,l.version,l.scope);$.share[e]===void 0&&($.share[e]=c)}}}}}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}for(let[e,t]of Object.entries(i)){let n=r(e,t.shareConfig?.singleton,t.version,t.scope);if($.share[n]!==void 0)continue;let i=r(e,!0,t.version,t.scope);$.share[i]!==void 0&&($.share[n]=$.share[i])}if($.share[`default:react`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js`).then(e=>(e.Q(),e.Z)),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react`]=r}if($.share[`default:react-dom`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-D9-wIasd.js`).then(e=>(e.r(),e.n)),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-dom`]=r}if($.share[`default:react/jsx-runtime`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js`).then(e=>e.C),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react/jsx-runtime`]=r}if($.share[`default:@camstack/types`]===void 0){let t=await e(()=>import(`./dist-C9qj5V_V.js`),__vite__mapDeps([0,1,2,3])),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/types`]=r}if($.share[`default:@camstack/sdk`]===void 0){let t=await e(()=>import(`./dist-BkamvsUd.js`),__vite__mapDeps([4,3])),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/sdk`]=r}if($.share[`default:@tanstack/react-query`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js`).then(e=>e.v),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@tanstack/react-query`]=r}if($.share[`default:@trpc/client`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-CSJxMxg6.js`).then(e=>e.k),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@trpc/client`]=r}if($.share[`default:@trpc/react-query`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DkcC9IVF.js`).then(e=>e.n),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@trpc/react-query`]=r}if($.share[`default:konva`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__konva__loadShare__.js-B7XYY0cV.js`).then(e=>e.t),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:konva`]=r}if($.share[`default:react-konva`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.js-BBBrLLEa.js`).then(e=>e.l),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-konva`]=r}if($.share[`default:@camstack/ui-library`]===void 0){let t=await e(()=>import(`./src-BsW9vu50.js`).then(e=>e.t),__vite__mapDeps([5,3,4,6])),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/ui-library`]=r}if($.share[`default:react-dom/client`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DstpX0yz.js`).then(e=>e.n),[]),n=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-dom/client`]=r}let o=[],s=globalThis.window===void 0?await Promise.all([]):[],c=Jn({name:ir,remotes:a,shared:i,plugins:[...o,...s],shareStrategy:`version-first`});var l=nr[rr];if(l||=nr[rr]={from:ir},!(n.indexOf(l)>=0)){n.push(l),c.initShareScopeMap(`default`,t),er(c);try{await sr(async()=>{await Promise.all(await c.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}for(let[e,n]of Object.entries(i)){let i=r(e,n.shareConfig?.singleton,n.version,n.scope);if(n.shareConfig?.import!==!1||$.share[i]!==void 0)continue;let a=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},o=t?.[e],s=o&&o[Object.keys(o)[0]];if(!s)continue;let c=s.lib||(s.loading?await s.loading:await s.get?.()),l=typeof c==`function`?c():c,u=await Promise.resolve(l);$.share[i]=a(u)}return c}}async function dr(e){let t=await lr();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return t[e]().then(e=>()=>e)}export{Yn as a,Jn as i,ur as n,Xn as o,Zn as r,dr as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as e}from"./index-
|
|
1
|
+
import{W as e}from"./index-Bwcru_fD.js";var t=e(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as e}from"./index-
|
|
1
|
+
import{W as e}from"./index-Bwcru_fD.js";var t=e(`mic`,[[`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z`,key:`131961`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`,key:`x3vr5v`}]]),n=e(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),r=e(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);export{n,t as r,r as t};
|
package/dist/index.html
CHANGED
|
@@ -99,13 +99,13 @@
|
|
|
99
99
|
})
|
|
100
100
|
})()
|
|
101
101
|
</script>
|
|
102
|
-
<script type="module" crossorigin src="/assets/mf-entry-bootstrap-0-
|
|
102
|
+
<script type="module" crossorigin src="/assets/mf-entry-bootstrap-0-64cf5a9a.js"></script>
|
|
103
103
|
<link rel="modulepreload" crossorigin href="/assets/compat-CbwIzIXq.js">
|
|
104
|
-
<link rel="modulepreload" crossorigin href="/assets/src-
|
|
105
|
-
<link rel="modulepreload" crossorigin href="/assets/player-overlays-
|
|
106
|
-
<link rel="modulepreload" crossorigin href="/assets/src-
|
|
107
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
108
|
-
<link rel="modulepreload" crossorigin href="/assets/hostInit-
|
|
104
|
+
<link rel="modulepreload" crossorigin href="/assets/src-lbvXy3B8.js">
|
|
105
|
+
<link rel="modulepreload" crossorigin href="/assets/player-overlays-CkvkdCY0.js">
|
|
106
|
+
<link rel="modulepreload" crossorigin href="/assets/src-BsW9vu50.js">
|
|
107
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C-ZEPJCU.css">
|
|
108
|
+
<link rel="modulepreload" crossorigin href="/assets/hostInit-B9Qb1083.js"><link rel="modulepreload" crossorigin href="/assets/index-Bwcru_fD.js"><link rel="modulepreload" crossorigin href="/assets/remoteEntry-Dwav_U6A.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-C4scCSJo.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-CSJxMxg6.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DkcC9IVF.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-D9-wIasd.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DstpX0yz.js"></head>
|
|
109
109
|
<body>
|
|
110
110
|
<div id="root"></div>
|
|
111
111
|
<!-- Lock the app shell at 1x zoom. iOS Safari ignores `user-scalable=no`
|
package/dist/server/addon.js
CHANGED
|
@@ -11024,7 +11024,8 @@ var PipelineStepInputSchema = lazy(() => object({
|
|
|
11024
11024
|
modelId: string().optional(),
|
|
11025
11025
|
enabled: boolean().default(true),
|
|
11026
11026
|
children: array(PipelineStepInputSchema).optional(),
|
|
11027
|
-
settings: record(string(), unknown()).optional()
|
|
11027
|
+
settings: record(string(), unknown()).optional(),
|
|
11028
|
+
jumpDeviceKey: string().optional()
|
|
11028
11029
|
}));
|
|
11029
11030
|
var ModelSubstitutionSchema = object({
|
|
11030
11031
|
addonId: string(),
|
|
@@ -11330,8 +11331,24 @@ var NativeCropBboxSchema = object({
|
|
|
11330
11331
|
});
|
|
11331
11332
|
/** Result of a best-effort native-resolution crop (`getNativeCrop`). */
|
|
11332
11333
|
var NativeCropResultSchema = object({
|
|
11333
|
-
/**
|
|
11334
|
-
|
|
11334
|
+
/**
|
|
11335
|
+
* Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
|
|
11336
|
+
* same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
|
|
11337
|
+
* OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
|
|
11338
|
+
* path below), where shipping raw RGB is both an invariant violation and, for
|
|
11339
|
+
* a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
|
|
11340
|
+
* `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
|
|
11341
|
+
* the cross-node native-media miss: `bytes` is replaced by `jpeg`.
|
|
11342
|
+
*/
|
|
11343
|
+
bytes: _instanceof(Uint8Array).optional(),
|
|
11344
|
+
/**
|
|
11345
|
+
* Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
|
|
11346
|
+
* (which holds the native surface) encodes it in-process, so a native 4K frame
|
|
11347
|
+
* ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
|
|
11348
|
+
* a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
|
|
11349
|
+
* set `encodeJpeg: true`; `bytes` is then absent.
|
|
11350
|
+
*/
|
|
11351
|
+
jpeg: string().optional(),
|
|
11335
11352
|
width: number().int().positive(),
|
|
11336
11353
|
height: number().int().positive(),
|
|
11337
11354
|
/**
|
|
@@ -11477,6 +11494,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
11477
11494
|
hubHostnameOverride: string().optional()
|
|
11478
11495
|
})]).describe("Per-camera frame-source mode for the runner (P2c)");
|
|
11479
11496
|
/**
|
|
11497
|
+
* One ENABLED inference device on the runner's node, as the step-tree
|
|
11498
|
+
* device-jump resolver sees it (phase 1). The orchestrator populates this
|
|
11499
|
+
* roster on the attach payload whenever the camera is elected onto a specific
|
|
11500
|
+
* `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
|
|
11501
|
+
* runner auto-jumps an enrichment step to when the elected device's format
|
|
11502
|
+
* cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
|
|
11503
|
+
* per-device knobs so the auto choice is weighted-least-loaded.
|
|
11504
|
+
*/
|
|
11505
|
+
var RunnerInferenceDeviceSchema = object({
|
|
11506
|
+
deviceKey: string(),
|
|
11507
|
+
weight: number().positive().default(1),
|
|
11508
|
+
maxSessions: number().int().positive().nullable().default(null)
|
|
11509
|
+
});
|
|
11510
|
+
/**
|
|
11480
11511
|
* Camera assignment payload sent by `addon-pipeline-orchestrator` to a
|
|
11481
11512
|
* specific runner instance via `attachCamera`. Carries everything the
|
|
11482
11513
|
* runner needs to subscribe to the local broker and execute inference.
|
|
@@ -11594,7 +11625,16 @@ var RunnerCameraConfigSchema = object({
|
|
|
11594
11625
|
* omitted ⇒ the runner's default device. The engine itself stays node-local —
|
|
11595
11626
|
* this only selects WHICH device pool of that node runs the session.
|
|
11596
11627
|
*/
|
|
11597
|
-
deviceKey: string().optional()
|
|
11628
|
+
deviceKey: string().optional(),
|
|
11629
|
+
/**
|
|
11630
|
+
* Step-tree device-jump roster (phase 1): the node's ENABLED inference
|
|
11631
|
+
* devices, populated by the orchestrator ONLY when `deviceKey` is set and the
|
|
11632
|
+
* node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
|
|
11633
|
+
* step whose model has no build for the elected device's format onto another
|
|
11634
|
+
* enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
|
|
11635
|
+
* ⇒ no jump possible; the step runs on `deviceKey`.
|
|
11636
|
+
*/
|
|
11637
|
+
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
11598
11638
|
});
|
|
11599
11639
|
motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
|
|
11600
11640
|
/**
|
|
@@ -11650,7 +11690,18 @@ var RunnerLocalMetricsSchema = object({
|
|
|
11650
11690
|
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
|
|
11651
11691
|
handle: FrameHandleSchema,
|
|
11652
11692
|
bbox: NativeCropBboxSchema,
|
|
11653
|
-
maxWidth: number().int().positive().optional()
|
|
11693
|
+
maxWidth: number().int().positive().optional(),
|
|
11694
|
+
/**
|
|
11695
|
+
* When `true`, the runner encodes the resolved crop to JPEG ON THE
|
|
11696
|
+
* OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
|
|
11697
|
+
* Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
|
|
11698
|
+
* agent) so the compressed payload fits Moleculer's `maxPacketSize` and
|
|
11699
|
+
* no raw pixels cross the process boundary. Same-node callers omit it
|
|
11700
|
+
* and keep the zero-copy raw `bytes` path. Additive + optional: a
|
|
11701
|
+
* pre-encode runner (version skew) ignores it and returns `bytes`, so
|
|
11702
|
+
* the caller falls back to encoding locally.
|
|
11703
|
+
*/
|
|
11704
|
+
encodeJpeg: boolean().optional()
|
|
11654
11705
|
}), NativeCropResultSchema.nullable()), method(object({
|
|
11655
11706
|
deviceId: number(),
|
|
11656
11707
|
frameHandle: FrameHandleSchema.optional(),
|
|
@@ -16448,7 +16499,8 @@ var MediaFileKindEnum = _enum([
|
|
|
16448
16499
|
"faceCrop",
|
|
16449
16500
|
"plateCrop",
|
|
16450
16501
|
"keyFrame",
|
|
16451
|
-
"keyFrameSmall"
|
|
16502
|
+
"keyFrameSmall",
|
|
16503
|
+
"thumbnailSmall"
|
|
16452
16504
|
]);
|
|
16453
16505
|
var MediaFileSchema = object({
|
|
16454
16506
|
key: string(),
|
|
@@ -16779,7 +16831,16 @@ var PipelineTemplateSchema = object({
|
|
|
16779
16831
|
});
|
|
16780
16832
|
var DeviceStepConfigSchema = object({
|
|
16781
16833
|
modelId: string().optional(),
|
|
16782
|
-
settings: record(string(), unknown()).optional()
|
|
16834
|
+
settings: record(string(), unknown()).optional(),
|
|
16835
|
+
/**
|
|
16836
|
+
* Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
|
|
16837
|
+
* When set, this step runs on the named enabled device of the SAME node
|
|
16838
|
+
* (`<backend>:<device>`) instead of the camera's elected device, bypassing
|
|
16839
|
+
* the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
|
|
16840
|
+
* at a disabled/absent device on that node at save time. Absent ⇒ the runner
|
|
16841
|
+
* auto-jumps only when the effective device's format cannot run the step.
|
|
16842
|
+
*/
|
|
16843
|
+
jumpDeviceKey: string().optional()
|
|
16783
16844
|
});
|
|
16784
16845
|
var AgentPipelineSettingsSchema = object({
|
|
16785
16846
|
maxCameras: number().int().nonnegative().nullable().default(null),
|
|
@@ -25297,7 +25358,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
25297
25358
|
capability: adminUiCapability,
|
|
25298
25359
|
provider: {
|
|
25299
25360
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
25300
|
-
getVersion: async () => ({ version: "1.2.
|
|
25361
|
+
getVersion: async () => ({ version: "1.2.3" })
|
|
25301
25362
|
}
|
|
25302
25363
|
}];
|
|
25303
25364
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as e,Gr as t,Jr as n,Na as r,Wa as i,Wr as a,Zr as o,bo as s,do as c,jn as l,jr as u,q as d,qr as f,uo as p,xt as m,z as h}from"./src-CjlMsFRd.js";import{I as g,K as _,Q as v,S as y,W as b,b as x,i as S,o as C,q as w,x as T,z as E}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js";import{E as D,K as O,P as k,s as A}from"./src-BS1NDJr1.js";import{p as j}from"./player-overlays-CWRGbPFt.js";import{t as M}from"./clock-B9UjbLDl.js";import{t as N}from"./copy-D5asBldD.js";import{a as ee,c as te,d as P,f as F,i as ne,m as I,n as re,o as ie,p as L,r as ae,s as R,t as z}from"./debounced-invalidate-DYWZ0mPG.js";import{t as B}from"./search-BGpt8p5m.js";import{t as V}from"./square-check-big-2shiyBaF.js";import{t as oe}from"./square-TBVq6Wu4.js";import{E as se,I as H,L as U,P as ce,S as W,U as G,W as K,i as le,s as ue,t as de}from"./index-CS131rnv.js";import{t as fe}from"./AdminPage-BwmGKnRf.js";import{r as pe,t as q}from"./authed-media-XfBD4Ma-.js";var me=K(`arrow-down-wide-narrow`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M11 4h10`,key:`1w87gc`}],[`path`,{d:`M11 8h7`,key:`djye34`}],[`path`,{d:`M11 12h4`,key:`q8tih4`}]]),he=K(`square-parking`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 17V7h4a3 3 0 0 1 0 6H9`,key:`1dfk2c`}]]),ge=K(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]);v();var _e=720*60*60*1e3;function ve(e){let t=[];for(let n of e)t.push(...n);return t}function ye(e,t){let n=[...e];return n.sort((e,n)=>t===`importance`?n.importance-e.importance:n.timestamp-e.timestamp),n}function be(e,t){return e.filter(e=>!(e.importance<t.minImportance||t.cameras.size>0&&!t.cameras.has(e.deviceId)||t.classes.size>0&&!t.classes.has(e.className)))}function J(e,t){return`${String(e)}:${t}`}function xe(e,t){let n=new Map,r=new Set;for(let i of e){let e=J(i.deviceId,i.trackId);if(!t.has(e)||r.has(e))continue;r.add(e);let a=n.get(i.deviceId);a?a.push(i.trackId):n.set(i.deviceId,[i.trackId])}return n}function Se(e,t){return{since:e.fromMs??t-_e,until:e.toMs??t}}var Y=typeof a==`function`,Ce=`Track deletion arrives with the next server update`;function we(){return{mutateAsync:async()=>{throw Error(`deleteTracks unavailable`)},isPending:!1}}var Te=Y?a:we,Ee=200,De=3e4;function Oe(e){let t=j(),n=S({queries:e.deviceIds.map(n=>({queryKey:[`events-feed`,n,e.since,e.until,e.minImportance??null,e.classFilter??null],staleTime:De,refetchInterval:De,queryFn:async()=>(await t.trpcClient.pipelineAnalytics.getKeyEvents.query({deviceId:n,since:e.since,until:e.until,limit:Ee,...e.minImportance===void 0?{}:{minImportance:e.minImportance},...e.classFilter===void 0?{}:{classFilter:e.classFilter}})).map(e=>({...e,deviceId:n}))}))});return{rows:ye(ve(n.map(e=>e.data??[])),`importance`),isLoading:n.some(e=>e.isLoading)}}var ke=[`events-feed`],Ae=2e3;function je(){let e=C(),t=_(e);t.current=e;let n=_(void 0);n.current||=z({delayMs:Ae,invalidate:()=>{t.current.invalidateQueries({queryKey:ke})}}),E(()=>()=>n.current?.cancel(),[]),i(O.PipelineAnalyticsDetectionEvent,()=>{n.current?.trigger()}),i(O.PipelineAnalyticsTrackEnded,()=>{n.current?.trigger()})}v();function Me(){return Object.values(k).filter(e=>e.level===`macro`).map(e=>({macro:e,subs:Object.values(k).filter(t=>t.parentKind===e.kind).sort((e,t)=>e.label.localeCompare(t.label))})).sort((e,t)=>e.macro.label.localeCompare(t.macro.label))}function Ne({selected:t,onChange:n}){let{t:r}=de(),[i,a]=w(!1),[o,s]=w(``),[c,l]=w(new Set),u=b(Me,[]),d=o.trim().toLowerCase(),f=e=>d.length===0||h(e,r).toLowerCase().includes(d),p=b(()=>u.map(e=>({macro:e.macro,subs:e.subs.filter(t=>f(t)||f(e.macro))})).filter(e=>f(e.macro)||e.subs.length>0),[u,d]),m=e=>l(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),g=e=>{let r=new Set(t),i=t.has(e.macro.kind)&&e.subs.every(e=>t.has(e.kind)),a=[e.macro.kind,...e.subs.map(e=>e.kind)];if(i)for(let e of a)r.delete(e);else for(let e of a)r.add(e);n(r)},_=e=>{let r=new Set(t);r.has(e)?r.delete(e):r.add(e),n(r)},v=()=>n(new Set),x=t.size;return y(`div`,{className:`relative`,children:[y(`button`,{type:`button`,onClick:()=>a(e=>!e),className:`flex items-center gap-1 rounded-md px-2.5 py-1 text-xs transition-colors ${x>0?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:[T(ge,{className:`h-3.5 w-3.5`}),x>0?`Kinds (${String(x)})`:`Kinds`,T(H,{className:`h-3 w-3`})]}),i&&y(`div`,{className:`absolute z-20 mt-1 max-h-80 w-64 overflow-auto rounded-md border border-border bg-surface p-2 shadow-lg`,children:[y(`div`,{className:`mb-2 flex items-center gap-1 rounded border border-border px-1.5`,children:[T(B,{className:`h-3.5 w-3.5 text-foreground-subtle`}),T(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:`Search kinds…`,className:`w-full bg-transparent py-1 text-xs outline-none`}),x>0&&T(`button`,{type:`button`,onClick:v,className:`text-[10px] text-foreground-subtle hover:text-foreground`,children:`Clear`})]}),p.map(n=>{let i=e(n.macro.iconId),a=c.has(n.macro.kind)||d.length>0,o=t.has(n.macro.kind);return y(`div`,{className:`mb-0.5`,children:[y(`div`,{className:`flex items-center gap-1`,children:[n.subs.length>0?T(`button`,{type:`button`,onClick:()=>m(n.macro.kind),className:`text-foreground-subtle hover:text-foreground`,"aria-label":`Expand`,children:T(a?H:ce,{className:`h-3 w-3`})}):T(`span`,{className:`w-3`}),y(`label`,{className:`flex flex-1 cursor-pointer items-center gap-1.5 rounded px-1 py-0.5 text-xs hover:bg-surface-hover`,children:[T(`input`,{type:`checkbox`,checked:o,onChange:()=>g(n),className:`accent-primary`}),T(i,{className:`h-3.5 w-3.5`,style:{color:n.macro.color}}),T(`span`,{className:`font-medium`,children:h(n.macro,r)})]})]}),a&&n.subs.map(n=>{let i=e(n.iconId);return y(`label`,{className:`ml-5 flex cursor-pointer items-center gap-1.5 rounded px-1 py-0.5 text-xs hover:bg-surface-hover`,children:[T(`input`,{type:`checkbox`,checked:t.has(n.kind),onChange:()=>_(n.kind),className:`accent-primary`}),T(i,{className:`h-3.5 w-3.5`,style:{color:n.color}}),T(`span`,{children:h(n,r)})]},n.kind)})]},n.macro.kind)})]})]})}var X=100,Pe=120,Fe={polyline:``,points:[],snapshots:[],start:null,end:null,peakBox:null},Z=e=>e<0?0:e>1?1:e,Q=e=>Math.round(e*100)/100;function Ie(e,t){if(e.length<=t)return[...e];let n=(e.length-1)/(t-1),r=[];for(let i=0;i<t;i++)r.push(e[Math.round(i*n)]);return r[r.length-1]=e[e.length-1],r}function Le(e,t,n){if(e.length===0||t===null)return Fe;let{width:r,height:i}=t;if(!Number.isFinite(r)||!Number.isFinite(i)||r<=0||i<=0)return Fe;let a=Ie(e,n?.maxPoints??Pe).map(e=>({x:Q(Z(e.x/r)*X),y:Q(Z(e.y/i)*X)})),o=a[0]??null,s=a[a.length-1]??null,c=a.length>=2?a.map(e=>`${e.x},${e.y}`).join(` `):``,l=(n?.snapshots??[]).map(e=>({x:Q(Z(e.x/r)*X),y:Q(Z(e.y/i)*X),mediaKey:e.mediaKey})),u=null,d=-1;for(let t of e){let e=Z(t.bbox.w/r)*Z(t.bbox.h/i);e>d&&(d=e,u=t)}return{polyline:c,points:a,snapshots:l,start:o,end:s,peakBox:u?{x:Q(Z(u.bbox.x/r)*X),y:Q(Z(u.bbox.y/i)*X),w:Q(Z(u.bbox.w/r)*X),h:Q(Z(u.bbox.h/i)*X)}:null}}var Re={firstFrame:`First frame (track start)`,lastFrame:`Last frame (track end)`,thumbnail:`Best detection`,snapshot:`Snapshot`,keyFrame:`Key frame (native-res)`,keyFrameSmall:`Key frame (960)`,crop:`Object crop`,fullFrame:`Full frame`,fullFrameBoxed:`Full frame (boxed)`,faceCrop:`Face crop`,plateCrop:`Plate crop`};function ze(e){return e in Re}function Be(e){return ze(e)?Re[e]:e}function Ve(e,t){return`${e}${q}/${encodeURIComponent(t)}`}v();var He=1400,Ue=`Admin-gated URL — opens only inside an authenticated session`;function We({label:e,value:t,title:n}){let[r,i]=w(!1);return E(()=>{if(!r)return;let e=setTimeout(()=>i(!1),He);return()=>clearTimeout(e)},[r]),y(`button`,{type:`button`,onClick:g(()=>{(async()=>{try{await navigator.clipboard.writeText(t),i(!0)}catch{window.prompt(`Copy the media URL:`,t)}})()},[t]),title:n,"aria-label":`Copy ${e} URL`,className:`flex min-w-0 items-center gap-1 rounded border px-1.5 py-0.5 text-[10px] font-medium transition-colors ${r?`border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:`border-border text-foreground-subtle hover:border-primary hover:text-foreground`}`,children:[T(r?U:N,{className:`h-2.5 w-2.5 shrink-0`}),T(`span`,{className:`truncate`,children:r?`Copied`:e})]})}function Ge({localUrl:e,publicUrl:t}){return y(`div`,{className:`flex flex-wrap gap-1`,children:[T(We,{label:`Local`,value:e,title:`Copy LAN URL — ${Ue}`}),t&&T(We,{label:`Public`,value:t,title:`Copy public URL — ${Ue}`})]})}v();var Ke=3e4;function qe(e){let[t,n]=w(null),r=g(e=>{n(t=>t??e)},[]);return E(()=>{e||n(null)},[e]),{publicOrigin:t,probes:e?T(Je,{onOrigin:r}):null}}function Je({onOrigin:e}){let{data:t}=m({capName:`network-access`});return T(x,{children:(t??[]).map(t=>T(Ye,{addonId:t.addonId,onOrigin:e},t.addonId))})}function Ye({addonId:e,onOrigin:t}){let{data:n}=u({addonId:e},{refetchInterval:Ke,retry:!1});return E(()=>{let e=n?A.safeParse(n):null,r=e?.success?e.data.endpoint?.url:void 0;if(r)try{t(new URL(r).origin)}catch{}},[n,t]),null}v();var Xe=15e3,Ze=window.location.origin,Qe=new Set([`firstFrame`,`lastFrame`,`thumbnail`,`snapshot`]),$e=new Set([`keyFrame`,`fullFrame`,`fullFrameBoxed`,`firstFrame`,`lastFrame`,`thumbnail`,`snapshot`]);function et(e){let[t,n]=w(null);return E(()=>{if(n(null),!e)return;let t=!1,r=new Image;return r.onload=()=>{t||n({width:r.naturalWidth,height:r.naturalHeight})},r.src=e,()=>{t=!0,r.onload=null}},[e]),t}function tt({overlay:e,onPickSnapshot:t}){return!e.polyline&&!e.peakBox&&e.snapshots.length===0?null:y(`svg`,{viewBox:`0 0 100 100`,preserveAspectRatio:`none`,className:`pointer-events-none absolute inset-0 h-full w-full`,children:[e.peakBox&&T(`rect`,{x:e.peakBox.x,y:e.peakBox.y,width:e.peakBox.w,height:e.peakBox.h,fill:`none`,stroke:`#f59e0b`,strokeWidth:2,vectorEffect:`non-scaling-stroke`,rx:1}),e.polyline&&T(`polyline`,{points:e.polyline,fill:`none`,stroke:`#38bdf8`,strokeWidth:2,strokeLinejoin:`round`,strokeLinecap:`round`,strokeOpacity:.85,vectorEffect:`non-scaling-stroke`}),e.points.map((e,t)=>T(`circle`,{cx:e.x,cy:e.y,r:1,fill:`#38bdf8`,fillOpacity:.6,vectorEffect:`non-scaling-stroke`},`${String(e.x)}-${String(e.y)}-${String(t)}`)),e.snapshots.map((e,n)=>T(`circle`,{cx:e.x,cy:e.y,r:1.9,fill:`#0ea5e9`,fillOpacity:.95,stroke:`#082f49`,strokeWidth:.7,vectorEffect:`non-scaling-stroke`,className:t?`pointer-events-auto cursor-pointer`:void 0,onClick:t?n=>{n.stopPropagation(),t(e.mediaKey)}:void 0,children:T(`title`,{children:`Snapshot checkpoint — click to view this frame`})},`snap-${e.mediaKey}-${String(n)}`)),e.start&&T(`circle`,{cx:e.start.x,cy:e.start.y,r:2.4,fill:`#22c55e`,stroke:`#052e16`,strokeWidth:.6,vectorEffect:`non-scaling-stroke`}),e.end&&T(`circle`,{cx:e.end.x,cy:e.end.y,r:2.4,fill:`#ef4444`,stroke:`#450a0a`,strokeWidth:.6,vectorEffect:`non-scaling-stroke`})]})}function $({label:e,value:t,mono:n}){return y(`div`,{className:`flex items-baseline justify-between gap-3 border-b border-border/60 py-1.5 last:border-0`,children:[T(`span`,{className:`shrink-0 text-[11px] uppercase tracking-wide text-foreground-subtle`,children:e}),T(`span`,{className:`min-w-0 truncate text-right text-xs font-medium text-foreground ${n?`font-mono text-[11px]`:``}`,title:t,children:t})]})}function nt({row:e,cameraName:i,deleteAvailable:a,onClose:o,onDeleted:l}){let u=j(),d=Te(),m=e!==null,h=e?.deviceId??0,_=e?.trackId??``,v=e?.bestEventId??``,S=e?.timestamp??0,C=e?.windowMs??0,{data:D}=f({deviceId:h,trackId:_},{enabled:m}),{data:O}=n({trackId:_},{enabled:m}),{data:k}=t({eventId:v},{enabled:m&&v!==``}),{data:A}=r({deviceId:h,since:S-Xe,until:S+C+Xe},{enabled:m}),[M,N]=w(null),[ee,te]=w(!1),{publicOrigin:F,probes:re}=qe(m);E(()=>{N(null)},[h,_]);let ie=b(()=>{let e=O??[],t=k??[];return e.find(e=>e.kind===`keyFrame`)||t.find(e=>e.kind===`fullFrameBoxed`)||([...t,...e].find(e=>e.kind===`crop`)??null)},[O,k]),ae=pe(ie?`${q}/${encodeURIComponent(ie.key)}`:void 0),R=b(()=>{let e=new Set,t=[];for(let n of[...k??[],...O??[]])!n.base64||e.has(n.key)||(e.add(n.key),t.push(n));return t},[k,O]),z=b(()=>R.find(e=>Qe.has(e.kind))??null,[R]),B=et(z?`data:image/jpeg;base64,${z.base64}`:null),V=b(()=>Le(D?.positions??[],B,{snapshots:(D?.snapshots??[]).map(e=>({x:e.position.x,y:e.position.y,mediaKey:e.mediaKey}))}),[D?.positions,D?.snapshots,B]),oe=g(e=>{let t=R.find(t=>t.key===e);t&&N(t)},[R]);if(e===null)return null;let H=M?`data:image/jpeg;base64,${M.base64}`:ae.src,U=M?.kind??ie?.kind,ce=U!==void 0&&$e.has(U)&&B!==null&&(D?.positions.length??0)>=2,G=A&&A.length>0?A[0]:null,K=()=>{G&&(te(!0),(async()=>{try{let t=await u.trpcClient.videoclips.getClipPlayback.query({deviceId:e.deviceId,clipId:G.id});window.open(t.playbackUrl,`_blank`,`noopener`)}catch{window.alert(`Could not resolve clip playback. Check the server logs.`)}finally{te(!1)}})())},de=()=>{!a||d.isPending||window.confirm(`Delete this track and all its media? This cannot be undone.`)&&(async()=>{try{await d.mutateAsync({deviceId:e.deviceId,trackIds:[e.trackId]}),l()}catch{window.alert(`Failed to delete this track. Check the server logs.`)}})()},fe=Math.round(e.importance*100),me=D?.importanceReason?`${String(fe)}% · ${D.importanceReason}`:`${String(fe)}%`,he=D?.zonesVisited&&D.zonesVisited.length>0?D.zonesVisited.join(`, `):`—`,ge=D?.audioLabels&&D.audioLabels.length>0?D.audioLabels.map(e=>`${e.label} ×${String(e.count)} (${String(Math.round(e.peakScore*100))}%)`).join(` · `):`—`,_e=D?D.totalDistance.toFixed(2):`—`,ve=L(D?D.firstSeen:S),ye=D?L(D.lastSeen):`—`;return T(p,{open:!0,onOpenChange:e=>!e&&o(),children:y(c,{width:`lg`,placement:`sheet-on-mobile`,"aria-label":`Event detail`,className:`flex h-[92dvh] flex-col gap-0 overflow-hidden p-0 bottom-0 left-0 right-0 top-auto w-full max-w-full translate-x-0 translate-y-0 rounded-b-none md:bottom-auto md:left-1/2 md:right-auto md:top-1/2 md:h-auto md:w-[calc(100vw-2rem)] md:max-w-xl md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-lg md:max-h-[calc(100dvh-2rem)]`,children:[y(`header`,{className:`flex shrink-0 items-start justify-between gap-2 border-b border-border px-4 py-3`,children:[y(`div`,{className:`min-w-0`,children:[y(`div`,{className:`truncate text-sm font-semibold text-foreground`,children:[e.className,e.label?y(`span`,{className:`text-foreground-subtle`,children:[` · `,e.label]}):null]}),T(`div`,{className:`mt-0.5 truncate text-[11px] text-foreground-subtle`,children:i})]}),T(`button`,{type:`button`,onClick:o,className:`rounded p-1 text-foreground-subtle hover:bg-surface-hover hover:text-foreground`,"aria-label":`Close`,children:T(le,{className:`h-4 w-4`})})]}),y(`div`,{className:`min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain px-4 py-3`,children:[H?T(`div`,{className:`overflow-hidden rounded-lg border border-border bg-background`,children:T(ne,{src:H,alt:`Key frame from ${i}`,fit:`natural`,className:`w-full`,overlay:ce?T(tt,{overlay:V,onPickSnapshot:oe}):void 0})}):T(`div`,{className:`flex aspect-video w-full flex-col items-center justify-center gap-1.5 rounded-lg border border-border bg-surface-hover text-foreground-subtle`,children:ae.failed?y(x,{children:[T(I,{className:`h-8 w-8 opacity-60`}),T(`span`,{className:`text-[11px]`,children:`Key-frame media unavailable`})]}):T(W,{className:`h-6 w-6 animate-spin opacity-70`})}),R.length>0&&T(`div`,{className:`-mx-1 flex gap-2 overflow-x-auto px-1 pb-1`,children:R.map(e=>{let t=`data:image/jpeg;base64,${e.base64}`,n=Be(e.kind),r=Ve(Ze,e.key),i=F?Ve(F,e.key):null;return y(`figure`,{className:`flex w-32 shrink-0 flex-col gap-1`,children:[T(`button`,{type:`button`,onClick:()=>N(e),className:`relative h-16 w-full overflow-hidden rounded border border-border hover:border-primary`,title:`${n} · ${L(e.timestamp)}`,children:T(`img`,{src:t,alt:n,className:`h-full w-full object-cover`})}),y(`figcaption`,{className:`min-w-0 px-0.5`,children:[T(`div`,{className:`truncate text-[10px] font-medium leading-tight text-foreground`,title:n,children:n}),T(`div`,{className:`text-[10px] leading-tight text-foreground-subtle`,title:L(e.timestamp),children:P(e.timestamp)})]}),T(Ge,{localUrl:r,publicUrl:i})]},e.key)})}),re,G&&y(s,{variant:`secondary`,onClick:K,disabled:ee,children:[ee?T(W,{className:`h-3.5 w-3.5 animate-spin`}):T(se,{className:`h-3.5 w-3.5`}),` `,`View clip`]}),y(`div`,{className:`rounded-lg border border-border bg-surface px-3 py-1`,children:[T($,{label:`Camera`,value:i}),T($,{label:`Class`,value:e.className}),T($,{label:`Label`,value:e.label??`—`}),T($,{label:`Importance`,value:me}),T($,{label:`Zones visited`,value:he}),T($,{label:`Audio heard`,value:ge}),T($,{label:`Total distance`,value:_e}),T($,{label:`First seen`,value:ve}),T($,{label:`Last seen`,value:ye}),T($,{label:`Track`,value:e.trackId,mono:!0})]})]}),T(`footer`,{className:`flex shrink-0 items-center justify-end gap-2 border-t border-border px-4 py-3 pb-[max(0.75rem,env(safe-area-inset-bottom))]`,children:T(`span`,{title:a?void 0:Ce,children:y(s,{variant:`secondary`,onClick:de,disabled:!a||d.isPending,children:[d.isPending?T(W,{className:`h-3.5 w-3.5 animate-spin`}):T(ue,{className:`h-3.5 w-3.5`}),` `,`Delete track`]})})})]})})}function rt(e){if(e===void 0||!Number.isFinite(e)||e<=0)return``;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let n=Math.floor(t/60),r=Math.round(t%60);return`${String(n)}m ${String(r).padStart(2,`0`)}s`}function it({row:e,cameraName:t,nowMs:n,onOpenDetail:r,selected:i=!1,onToggleSelect:a,score:o}){let s=pe(e.bestEventId?`${q}/${e.bestEventId}`:void 0),c=Math.round(e.importance*100),l=o===void 0?void 0:Math.round(o*100),u=rt(e.windowMs),d=()=>r(e);return y(`div`,{className:`relative flex flex-col rounded-md border bg-surface overflow-hidden ${i?`border-primary ring-1 ring-primary`:`border-border`}`,children:[y(`div`,{className:`aspect-video relative overflow-hidden bg-surface-hover`,children:[s.src?T(`img`,{src:s.src,alt:`Event from ${t}`,onClick:d,className:`h-full w-full cursor-zoom-in object-cover`}):T(`button`,{type:`button`,onClick:d,className:`flex h-full w-full flex-col items-center justify-center gap-1 bg-surface-hover text-foreground-subtle`,title:s.failed?`Key-event media unavailable`:`No key-event media`,children:T(I,{className:`h-6 w-6 opacity-60`})}),a&&T(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),a(J(e.deviceId,e.trackId))},className:`absolute left-0 top-0 z-10 rounded-br-md bg-black/50 p-1.5 text-white hover:bg-black/70`,"aria-label":i?`Deselect`:`Select`,children:i?T(V,{className:`h-4 w-4 text-primary`}):T(oe,{className:`h-4 w-4`})}),l!==void 0&&y(`span`,{className:`absolute left-1 top-1 z-10 rounded bg-primary/85 px-1.5 py-0.5 text-[10px] font-semibold text-white tabular-nums`,title:`CLIP semantic-match score`,children:[String(l),`%`]}),c>0&&T(`span`,{className:`absolute right-1 top-1 z-10 rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-semibold text-white`,children:String(c)})]}),y(`button`,{type:`button`,onClick:d,className:`min-w-0 px-2 py-1.5 text-left space-y-0.5`,children:[y(`p`,{className:`text-[11px] font-medium text-foreground truncate`,title:e.className,children:[e.className,e.label?y(`span`,{className:`text-foreground-subtle`,children:[` · `,e.label]}):null]}),T(`p`,{className:`text-[10px] text-foreground-subtle truncate`,title:t,children:t}),y(`div`,{className:`flex items-center justify-between gap-2`,children:[T(`span`,{className:`text-[10px] text-foreground-subtle truncate`,children:F(e.timestamp,n)}),u&&T(`span`,{className:`text-[10px] text-foreground-subtle shrink-0`,children:u})]})]})]})}v();var at=[`events-feed`],ot=60,st=[{value:`importance`,label:`Importance`,icon:me},{value:`time`,label:`Recent`,icon:M}];function ct(){let e=C(),[t,n]=w(R),[r,i]=w(new Set),[a,o]=w(new Set),[c,u]=w(0),[d,f]=w(`time`),[p,m]=w(new Set),[h,g]=w(null),[_,v]=w(()=>Date.now());E(()=>{let e=setInterval(()=>v(Date.now()),6e4);return()=>clearInterval(e)},[]);let{since:S,until:O}=b(()=>Se({fromMs:t.fromMs,toMs:t.toMs},_),[t.fromMs,t.toMs,_]);je();let{data:k}=l({}),A=b(()=>(k??[]).filter(e=>e.type===D.Camera),[k]),j=b(()=>A.map(e=>e.id),[A]),M=Te(),N=M.isPending,{rows:P,isLoading:F}=Oe({deviceIds:j,since:S,until:O,minImportance:c>0?c:void 0,classFilter:a.size===1?[...a][0]:void 0}),ne=b(()=>{let e=new Map;for(let t of A??[])e.set(t.id,t.name);return e},[A]),I=e=>ne.get(e)??`Camera #${String(e)}`,L=b(()=>te(P).map(e=>({id:e,name:I(e)})).sort((e,t)=>e.name.localeCompare(t.name)),[P,ne]),z=b(()=>ye(be(P,{cameras:r,classes:a,minImportance:c}),d),[P,r,a,c,d]),B=re(z,ot,b(()=>JSON.stringify([[...r].sort((e,t)=>e-t),[...a].sort(),c,d,S,O]),[r,a,c,d,S,O])),V=()=>{e.invalidateQueries({queryKey:at})},oe=()=>m(new Set);function se(e){m(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function H(){if(p.size===0||!Y)return;let e=xe(P,p),t=[...e.values()].reduce((e,t)=>e+t.length,0);if(t===0||!window.confirm(`Delete ${String(t)} track${t===1?``:`s`} and all their media? This cannot be undone.`))return;let n=[...e];Promise.allSettled(n.map(([e,t])=>M.mutateAsync({deviceId:e,trackIds:t}))).then(e=>{V();let t=[],r=new Set;if(e.forEach((e,i)=>{let a=n[i];if(!a)return;let[o,s]=a;if(e.status===`fulfilled`)for(let e of s)r.add(J(o,e));else t.push(o)}),m(e=>{let t=new Set(e);for(let e of r)t.delete(e);return t}),t.length>0){let e=t.map(e=>I(e)).join(`, `);window.alert(`Failed to delete tracks on: ${e}. They remain selected — retry, or check the server logs.`)}})}let U=z.length!==P.length;return y(`div`,{className:`relative space-y-3`,children:[y(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[T(ee,{onChange:n}),T(ie,{cameras:L,selected:r,onChange:i}),T(Ne,{selected:a,onChange:o}),y(`label`,{className:`flex items-center gap-1.5 text-[11px] text-foreground-subtle`,children:[T(`span`,{children:`Min score`}),T(`input`,{type:`range`,min:0,max:1,step:.05,value:c,onChange:e=>u(Number(e.target.value)),className:`h-1 w-24 cursor-pointer accent-primary`,"aria-label":`Minimum importance`}),T(`span`,{className:`w-6 tabular-nums text-foreground`,children:Math.round(c*100)})]}),T(`div`,{className:`flex items-center gap-1 rounded-md border border-border p-0.5`,children:st.map(e=>{let t=e.icon;return y(`button`,{type:`button`,onClick:()=>f(e.value),className:`flex items-center gap-1 rounded px-2 py-1 text-[11px] transition-colors ${d===e.value?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:[T(t,{className:`h-3.5 w-3.5`}),` `,e.label]},e.value)})}),!F&&T(`span`,{className:`ml-auto text-[10px] text-foreground-subtle`,children:U?`${String(z.length)} of ${String(P.length)} events`:`${String(z.length)} event${z.length===1?``:`s`}`})]}),p.size>0&&y(`div`,{className:`flex flex-wrap items-center gap-2 rounded-md border border-primary/40 bg-primary/8 px-3 py-2`,children:[y(`span`,{className:`text-xs font-medium text-foreground`,children:[p.size,` selected`]}),y(`div`,{className:`ml-auto flex flex-wrap items-center gap-1.5`,children:[T(`span`,{title:Y?void 0:`Track deletion arrives with the next server update`,children:y(s,{variant:`secondary`,onClick:H,disabled:!Y||N,children:[N?T(W,{className:`h-3.5 w-3.5 animate-spin`}):T(ue,{className:`h-3.5 w-3.5`}),` `,`Delete`]})}),T(s,{variant:`ghost`,onClick:oe,disabled:N,children:T(le,{className:`h-3.5 w-3.5`})})]})]}),F&&y(`div`,{className:`flex items-center gap-2 py-4 text-xs text-foreground-subtle`,children:[T(W,{className:`h-4 w-4 animate-spin`}),` Loading events…`]}),!F&&z.length===0&&T(`p`,{className:`py-4 text-xs text-foreground-subtle`,children:`No key events in this window.`}),!F&&z.length>0&&y(x,{children:[T(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(11rem,1fr))] gap-2`,children:B.pageItems.map(e=>T(it,{row:e,cameraName:I(e.deviceId),nowMs:_,selected:p.has(J(e.deviceId,e.trackId)),onToggleSelect:se,onOpenDetail:g},J(e.deviceId,e.trackId)))}),T(ae,{currentPage:B.page,totalItems:B.totalItems,pageSize:B.pageSize,onPageChange:B.setPage,itemNoun:`events`})]}),h&&T(nt,{row:h,cameraName:I(h.deviceId),deleteAvailable:Y,onClose:()=>g(null),onDeleted:()=>{V(),g(null)}})]})}v();var lt=50,ut=350,dt=[`person`,`vehicle`,`animal`],ft=[{value:.2,label:`Loose`},{value:.25,label:`Balanced`},{value:.3,label:`Strict`}];function pt(e){return{id:e.id,trackId:e.trackId??e.id,deviceId:e.deviceId,timestamp:e.timestamp,className:e.className,label:e.label,importance:e.importance??0,bestEventId:e.mediaKey??e.trackId??e.id,windowMs:void 0}}function mt({onActiveChange:e}){let[t,n]=w(``),[r,i]=w(.2),[a,s]=w(null),[c,u]=w(null),[f,p]=w(null),m=d(t,ut).trim(),h=m.length>0;E(()=>{e(h)},[h,e]);let[g,_]=w(()=>Date.now());E(()=>{let e=setInterval(()=>_(Date.now()),6e4);return()=>clearInterval(e)},[]);let{data:v}=l({}),x=b(()=>(v??[]).filter(e=>e.type===D.Camera),[v]),S=b(()=>{let e=new Map;for(let t of v??[])e.set(t.id,t.name);return e},[v]),C=e=>S.get(e)??`Camera #${String(e)}`,{data:O,isFetching:k,isError:A,error:j}=o({text:m,minScore:r,limit:lt,classFilter:a??void 0,deviceId:c??void 0},{enabled:h}),M=b(()=>[...O??[]].sort((e,t)=>t.score-e.score).map(e=>({...pt(e),score:e.score})),[O]);function N(e){s(t=>t===e?null:e)}return y(`div`,{className:`space-y-3`,children:[y(`div`,{className:`rounded-lg border border-border bg-surface p-3 space-y-3`,children:[y(`div`,{className:`flex flex-wrap items-center gap-2`,children:[y(`div`,{className:`relative min-w-[16rem] flex-1`,children:[T(B,{className:`pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-foreground-subtle`}),T(`input`,{type:`text`,value:t,onChange:e=>n(e.target.value),placeholder:`Semantic search — describe what you're looking for…`,className:`h-9 w-full rounded-md border border-border bg-background pl-8 pr-8 text-sm text-foreground placeholder:text-foreground-subtle focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary`,"aria-label":`Semantic event search`}),t&&T(`button`,{type:`button`,onClick:()=>n(``),className:`absolute right-2 top-1/2 -translate-y-1/2 rounded p-0.5 text-foreground-subtle hover:bg-surface-hover hover:text-foreground`,"aria-label":`Clear search`,children:T(le,{className:`h-3.5 w-3.5`})})]}),k&&h&&T(W,{className:`h-4 w-4 shrink-0 animate-spin text-foreground-subtle`})]}),y(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2`,children:[T(`div`,{className:`flex items-center gap-1`,children:dt.map(e=>T(`button`,{type:`button`,onClick:()=>N(e),className:`rounded-md px-2.5 py-1 text-xs capitalize transition-colors ${a===e?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:e},e))}),y(`label`,{className:`flex items-center gap-1.5 text-[11px] text-foreground-subtle`,children:[T(`span`,{children:`Camera`}),y(`select`,{value:c===null?``:String(c),onChange:e=>u(e.target.value===``?null:Number(e.target.value)),className:`h-7 rounded-md border border-border bg-background px-1.5 text-xs text-foreground focus:border-primary focus:outline-none`,"aria-label":`Filter by camera`,children:[T(`option`,{value:``,children:`All`}),x.map(e=>T(`option`,{value:String(e.id),children:e.name},e.id))]})]}),y(`div`,{className:`flex items-center gap-1.5 text-[11px] text-foreground-subtle`,children:[T(`span`,{children:`Match`}),T(`div`,{className:`flex items-center gap-1 rounded-md border border-border p-0.5`,children:ft.map(e=>T(`button`,{type:`button`,onClick:()=>i(e.value),className:`rounded px-2 py-1 text-[11px] transition-colors ${r===e.value?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,title:`Minimum CLIP score ${e.value.toFixed(2)}`,children:e.label},e.value))})]}),h&&!k&&!A&&y(`span`,{className:`ml-auto text-[10px] text-foreground-subtle`,children:[M.length,` match`,M.length===1?``:`es`]})]})]}),h&&y(`div`,{className:`space-y-3`,children:[A&&y(`p`,{className:`py-4 text-xs text-danger`,children:[`Search failed: `,j instanceof Error?j.message:`unknown error`,`. Check that the CLIP embedding step is enabled.`]}),!A&&k&&M.length===0&&y(`div`,{className:`flex items-center gap-2 py-4 text-xs text-foreground-subtle`,children:[T(W,{className:`h-4 w-4 animate-spin`}),` Searching…`]}),!A&&!k&&M.length===0&&y(`p`,{className:`py-4 text-xs text-foreground-subtle`,children:[`No semantic matches for “`,m,`”. Try a looser match threshold or a different phrasing.`]}),!A&&M.length>0&&T(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(11rem,1fr))] gap-2`,children:M.map(e=>T(it,{row:e,cameraName:C(e.deviceId),nowMs:g,score:e.score,onOpenDetail:p},e.id))})]}),f&&T(nt,{row:f,cameraName:C(f.deviceId),deleteAvailable:Y,onClose:()=>p(null),onDeleted:()=>p(null)})]})}var ht=15e3;function gt(e){let t=j(),n=S({queries:e.map(e=>({queryKey:[`stationary-objects`,e],staleTime:ht,refetchInterval:ht,queryFn:async()=>((await t.trpcClient.zoneAnalytics.getCurrentSnapshot.query({deviceId:e}))?.stationaryObjects??[]).map(t=>({...t,deviceId:e}))}))});return{rows:n.flatMap(e=>e.data??[]).toSorted((e,t)=>t.becameStationaryAt-e.becameStationaryAt),isLoading:n.some(e=>e.isLoading)}}v();function _t(e,t){let n=Math.max(0,Math.round((e-t)/6e4));if(n<1)return`just now`;if(n<60)return`${String(n)}m`;let r=Math.floor(n/60);return`${String(r)}h ${String(n%60)}m`}function vt({row:e,cameraName:t,nowMs:n}){let r=e.keyFrameMediaKey?.startsWith(`track:`)?e.keyFrameMediaKey.split(`:`)[1]:e.keyFrameMediaKey,i=pe(r?`${q}/${r}`:void 0);return y(`div`,{className:`flex flex-col overflow-hidden rounded-md border border-border bg-surface`,children:[y(`div`,{className:`relative aspect-video overflow-hidden bg-surface-hover`,children:[i.src?T(`img`,{src:i.src,alt:`Parked ${e.className} on ${t}`,className:`h-full w-full object-cover`}):T(`div`,{className:`flex h-full w-full items-center justify-center text-foreground-subtle`,children:T(he,{className:`h-6 w-6`})}),T(`span`,{className:`absolute left-1 top-1 rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-medium capitalize text-white`,children:e.label??e.className})]}),y(`div`,{className:`flex flex-col gap-0.5 p-1.5`,children:[T(`span`,{className:`truncate text-[11px] text-foreground`,children:t}),y(`span`,{className:`text-[10px] text-foreground-subtle`,children:[`parked `,_t(n,e.becameStationaryAt)]})]})]})}function yt(){let[e,t]=w(!1),n=Date.now(),{data:r}=l({}),i=b(()=>(r??[]).filter(e=>e.type===D.Camera),[r]),a=b(()=>i.map(e=>e.id),[i]),o=b(()=>{let e=new Map;for(let t of i)e.set(t.id,t.name);return e},[i]),{rows:s}=gt(a);return s.length===0?null:y(`div`,{className:`rounded-md border border-border bg-surface/40`,children:[y(`button`,{type:`button`,onClick:()=>t(e=>!e),className:`flex w-full items-center gap-2 px-3 py-2 text-left`,children:[T(e?H:ce,{className:`h-4 w-4 text-foreground-subtle`}),T(he,{className:`h-4 w-4 text-foreground-subtle`}),T(`span`,{className:`text-sm font-semibold text-foreground`,children:`Stationary`}),T(`span`,{className:`rounded-full bg-surface-hover px-2 py-0.5 text-[10px] font-medium text-foreground-subtle`,children:s.length}),T(`span`,{className:`ml-2 text-[11px] text-foreground-subtle`,children:`Parked objects — kept out of the event feed`})]}),e&&T(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(9rem,1fr))] gap-2 p-3 pt-0`,children:s.map(e=>T(vt,{row:e,cameraName:o.get(e.deviceId)??`Camera #${String(e.deviceId)}`,nowMs:n},e.id))})]})}v();function bt(){je();let[e,t]=w(!1);return T(fe,{icon:G,title:`Events`,subtitle:`Every captured key event across all cameras — trajectory, media, and clips.`,children:y(`section`,{className:`space-y-3`,children:[T(mt,{onActiveChange:t}),!e&&T(yt,{}),!e&&T(ct,{})]})})}export{bt as EventsPage};
|