const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Alert-1.0.74-i5fZ05RU.js","./tanstack-1.0.74-aU0azVkW.js","./redux-1.0.74-D8bIc6ki.js","./vendor-1.0.74-CN03Eozo.js","./index-1.0.74-C9JunOsO.js","./iconBase-1.0.74-Cs0vntJu.js","./CircularProgress-1.0.74-QfwfRJ7i.js","./lib-1.0.74-B5IEqfHg.js","./utils-1.0.74-7xWhx9mc.js","./ButtonBase-1.0.74-W6tAH7AI.js","./Typography-1.0.74-B4mhsevh.js","./useEnhancedEffect-1.0.74-B56M26dS.js","./AlertTitle-1.0.74-BmkdSyE6.js","./createSvgIcon-1.0.74-Cw_ZFbxi.js","./Close-1.0.74-Ce0z5IFm.js"])))=>i.map(i=>d[i]);
import{j as r}from"./tanstack-1.0.74-aU0azVkW.js";import{l as s,g as c,a as x,s as g,S,b as u}from"./lib-1.0.74-B5IEqfHg.js";import{S as j}from"./utils-1.0.74-7xWhx9mc.js";import{r as i,P as D}from"./redux-1.0.74-D8bIc6ki.js";import{u as M}from"./useViewHeight-1.0.74-CuK7XWCG.js";import{_}from"./RestApiError-1.0.74-Bb1un17k.js";import{u as b}from"./useLoadAppMetaData-1.0.74-BqAxVdHB.js";/* empty css                    */import{M as v}from"./MapPrepare-1.0.74-Ce2WlC-i.js";import"./vendor-1.0.74-CN03Eozo.js";import"./RestApi-1.0.74-5XKxNzpR.js";import"./StoreTypeEnum-1.0.74-BO7CLiE1.js";import"./hooks-1.0.74-NYCTWeI9.js";import"./index-1.0.74-FmkvObU2.js";import"./useMetadata-1.0.74--jxfVI7W.js";import"./FallbackSpinner-1.0.74-7h-h2HIM.js";import"./Spinner-1.0.74-B63QTBL9.js";import"./Box-1.0.74-DEbuVvGV.js";import"./CircularProgress-1.0.74-QfwfRJ7i.js";import"./Typography-1.0.74-B4mhsevh.js";const d=i.lazy(()=>_(()=>import("./Alert-1.0.74-i5fZ05RU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url)),E=({appId:t,dataSource:a,shortcodeArgs:m})=>{s.debug(a);const o=c(a);s.debug(o);const e=Number(o==null?void 0:o.id);if(s.debug(e),isNaN(e))return r.jsx(i.Suspense,{children:r.jsx(d,{severity:"error",message:"Invalid arguments",close:!1})});const{loadAppMetaData:l,processMetaData:f,metaDataLoaded:p,loadError:n}=b(t,e);return i.useEffect(()=>{p||x(e,f)||(s.debug("load metadata"),l())},[e]),n!==""?(g(t),r.jsx(i.Suspense,{children:r.jsx(d,{severity:"error",message:n,close:!0})})):p?r.jsx(v,{appId:t,shortcodeArgs:m}):null},J=({appId:t,dataSource:a,shortcodeArgs:m})=>(M(),r.jsxs(D,{store:S,children:[r.jsx(j,{maxSnack:u.maxSnack,autoHideDuration:u.autoHideDuration}),r.jsx(E,{appId:t,dataSource:a,shortcodeArgs:m})]}));export{J as default};
