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","./ChartContainer-1.0.74-CIxuF-m0.js","./RestApiError-1.0.74-Bb1un17k.js","./Chart-1.0.74-BOylOstd.js","./useChartSettings-1.0.74-C6-5LBxk.js","./hooks-1.0.74-NYCTWeI9.js","./Languages-1.0.74-DaJcF5OJ.js","./useMetadata-1.0.74--jxfVI7W.js","./useLocaleMrt-1.0.74-BUIBUKA0.js","./useLocaleUd-1.0.74-DiRzsyAi.js","./RestApi-1.0.74-5XKxNzpR.js","./Box-1.0.74-DEbuVvGV.js","./index-1.0.74-DxwH6OqZ.js","./ThemeProvider-1.0.74-4uzbYYLM.js","./Portal-1.0.74-BrUPeMX9.js","./useLocaleApp-1.0.74-BAnA1P2j.js","./useRemoveAppFromStore-1.0.74-CJatuZ_l.js","./useTheme-1.0.74-CW3awVDs.js","./index-1.0.74-iJ_9eGZx.js","./getThemeProps-1.0.74-DOfDN6_V.js","./useFullScreen-1.0.74-DAWjksdW.js","./AdminTheme-1.0.74-BtTaJUu_.js"])))=>i.map(i=>d[i]);
import{j as r}from"./tanstack-1.0.74-aU0azVkW.js";import{l as n,g as x,a as _,s as S,S as g,b as p}from"./lib-1.0.74-B5IEqfHg.js";import{S as j}from"./utils-1.0.74-7xWhx9mc.js";import{r as e,P as D}from"./redux-1.0.74-D8bIc6ki.js";import{u as b}from"./useViewHeight-1.0.74-CuK7XWCG.js";import{_ as l}from"./RestApiError-1.0.74-Bb1un17k.js";import{u as h}from"./useLoadAppMetaData-1.0.74-BqAxVdHB.js";/* empty css                    */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";const d=e.lazy(()=>l(()=>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=e.lazy(()=>l(()=>import("./ChartContainer-1.0.74-CIxuF-m0.js"),__vite__mapDeps([15,16,3,1,2,17,18,19,7,8,20,21,22,23,24,25,6,10,26,9,11,27,28,5,29,30,31,32,33,34,35]),import.meta.url)),v=({appId:a,dataSource:o,shortcodeArgs:s})=>{n.debug(o,s);const i=x(o);n.debug(i);const t=Number(i==null?void 0:i.id);if(n.debug(t),isNaN(t))return r.jsx(e.Suspense,{children:r.jsx(d,{severity:"error",message:"Invalid arguments",close:!1})});const{loadAppMetaData:c,processMetaData:f,metaDataLoaded:m,loadError:u}=h(a,t);return e.useEffect(()=>{m||_(t,f)||(n.debug("load metadata"),c())},[t]),u!==""?(S(a),r.jsx(e.Suspense,{children:r.jsx(d,{severity:"error",message:u,close:!0})})):m?r.jsx(e.Suspense,{children:r.jsx(E,{appId:a,appDbId:t,shortcodeArgs:s})}):null},I=({appId:a,dataSource:o,shortcodeArgs:s})=>(b(),r.jsxs(D,{store:g,children:[r.jsx(j,{maxSnack:p.maxSnack,autoHideDuration:p.autoHideDuration}),r.jsx(v,{appId:a,dataSource:o,shortcodeArgs:s})]}));export{I as default};
