const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Alert-1.0.63-BLYiE2Yx.js","./cm-1.0.63-CSIRHMXC.js","./redux-1.0.63-Df-eBzJn.js","./vendor-1.0.63-CN03Eozo.js","./index-1.0.63-BbQj9wqD.js","./iconBase-1.0.63-CFvHhC4t.js","./Typography-1.0.63-mecuj_Wl.js","./lib-1.0.63-DJZPtMem.js","./loglevel-1.0.63-BZ7XahX3.js","./lodash-1.0.63-hMxolcpJ.js","./moment-1.0.63-C5S46NFB.js","./ButtonBase-1.0.63-CF10PFMS.js","./useEnhancedEffect-1.0.63-DnR0ZFqV.js","./AlertTitle-1.0.63-B6QMQB-K.js","./createSvgIcon-1.0.63-DWL3J-DK.js","./Close-1.0.63-Dvbopfj5.js","./MapContainer-1.0.63-DoQKUWW-.js","./cmJson-1.0.63-CyZ2MfFg.js","./rehyperaw-1.0.63-AkovKNCK.js","./markdown-1.0.63-BJvkzZkj.js","./notistack-1.0.63-B49ULGrj.js","./hooks-1.0.63-CWs3kTdT.js","./AdminTheme-1.0.63-DhJ0rrw5.js","./RestApi-1.0.63-BUfzocgq.js","./dompurify-1.0.63-DhD2mIk-.js","./useMetadata-1.0.63-SO3BYgAj.js","./useRemoveAppFromStore-1.0.63-DNpeLtWd.js","./Languages-1.0.63-DsTK0dJK.js","./index-1.0.63-oIDff4nA.js","./ThemeProvider-1.0.63-Cq0KMgkh.js","./Modal-1.0.63-fMXTbfks.js","./Spinner-1.0.63-zcgIyS7Z.js","./FallbackSpinner-1.0.63-BLl5ldYH.js","./AppTheme-1.0.63-CLc-SnB5.js","./index-1.0.63-BT4mpIxR.js","./getThemeProps-1.0.63-5ZzcWe3G.js","./index-1.0.63-Dw7N6DsT.js","./Select-1.0.63-BMejr8a7.js","./Menu-1.0.63-DLh4HkF0.js","./MenuItem-1.0.63-Bvb3IjMP.js","./ToggleButtonGroup-1.0.63-C7rCX82E.js","./tab-1.0.63-Dmjvx_Wl.js"])))=>i.map(i=>d[i]);
import{_ as j}from"./cmJson-1.0.63-CyZ2MfFg.js";import{j as n}from"./cm-1.0.63-CSIRHMXC.js";import{r}from"./redux-1.0.63-Df-eBzJn.js";import{u as v}from"./useMetadata-1.0.63-SO3BYgAj.js";import{e as A}from"./notistack-1.0.63-B49ULGrj.js";import{F as E}from"./FallbackSpinner-1.0.63-BLl5ldYH.js";const y=r.lazy(()=>j(()=>import("./Alert-1.0.63-BLYiE2Yx.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url)),K=r.lazy(()=>j(()=>import("./MapContainer-1.0.63-DoQKUWW-.js"),__vite__mapDeps([16,17,1,2,3,7,8,9,10,18,19,20,21,22,6,23,24,25,26,27,28,11,12,29,30,5,31,32,33,34,35,36,37,38,14,39,40,41]),import.meta.url)),N=({appId:u,tableStore:i,shortcodeArgs:M})=>{var p,m;const o=v(u),t=i==null?void 0:i.table,a=r.useMemo(()=>{var c,l,d,_,f,g,x,L;const s={apiKey:"",columnLatitude:"",columnLongitude:""};if(t===void 0)try{const e=JSON.parse((l=(c=o==null?void 0:o.app)==null?void 0:c.app[0])==null?void 0:l.app_settings);s.apiKey=(_=(d=e==null?void 0:e.settings)==null?void 0:d.app_map)==null?void 0:_.api_key,s.columnLatitude=(g=(f=e==null?void 0:e.settings)==null?void 0:f.app_map)==null?void 0:g.column_latitude,s.columnLongitude=(L=(x=e==null?void 0:e.settings)==null?void 0:x.app_map)==null?void 0:L.column_longitude}catch(e){console.error("Invalid JSON - app settings"),console.error(e),A("Invalid JSON, check console",{variant:"error"})}else s.apiKey=t.maps.apiKey,s.columnLatitude=t.maps.columnLatitude,s.columnLongitude=t.maps.columnLongitude;return s},[u,(m=(p=o==null?void 0:o.app)==null?void 0:p.app[0])==null?void 0:m.app_settings]);return a.columnLatitude==""||a.columnLongitude==""?n.jsx(r.Suspense,{children:n.jsx(y,{severity:"error",message:"Latitude and/or longitude column not defined - use App Manager to fix issue",close:!1})}):a.apiKey===""?n.jsx(r.Suspense,{children:n.jsx(y,{severity:"error",message:"Missing Google Maps API Key - use App Manager to fix issue",close:!1})}):n.jsx(r.Suspense,{fallback:n.jsx(E,{}),children:n.jsx(K,{appId:u,mapSetup:a,tableStore:i,shortcodeArgs:M})})};export{N as M};
