const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/entity-page-BXu8UL1Q.js","assets/index-CfKY7XrC.js","assets/index-Daq-F8CW.css","assets/string-utils-CYRucSbB.js","assets/memory-browse-layout-B_YNXhu9.js","assets/connection-label-BobuYiAG.js","assets/section-mark-F5ZGiWj1.js","assets/dynamic-schema-form-CIymiUev.js","assets/table-DTtlXi_k.js","assets/tabs-CmXP_Un4.js","assets/renderer-BkkEGkOd.js","assets/markdown-text-DG_zVSzx.js","assets/card-DM3GEpFz.js"])))=>i.map(i=>d[i]);
import{r as o,$ as x,a0 as h,a1 as g,a2 as m,g as f,c as v,j as t,a3 as y,a4 as j,a5 as R,a6 as b}from"./index-CfKY7XrC.js";function c(){return o.useEffect(()=>{x()},[]),null}const E=R(async()=>({default:(await b(async()=>{const{EntityPage:a}=await import("./entity-page-BXu8UL1Q.js");return{EntityPage:a}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))).EntityPage}));function u(){return t.jsx("div",{className:"px-4 py-6 lg:px-6","data-public-loading":"true",children:t.jsx(j,{label:"page"})})}function S(){const{owner:a,_splat:d}=h.useParams(),{path:p}=g(a,d||""),{data:e,isLoading:s,error:n}=m(p,{slug:a},{includeBootstrap:!0}),{session:r,isReady:i}=f(),l=v();return o.useEffect(()=>{if(!s&&i&&!r&&(n||!e)){if(y()?.ownerSlug===a)return;l({to:"/auth/login",search:{callbackUrl:window.location.pathname+window.location.search,mode:void 0,error:void 0,errorDescription:void 0,loginHint:void 0,invitationOrg:void 0,intent:"sign-in"},replace:!0})}},[s,i,r,e,n,l,a]),s||!i&&!e?t.jsx(u,{}):n||!e||!e.entity?t.jsxs(t.Fragment,{children:[t.jsx(c,{}),t.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[t.jsx("h1",{className:"text-2xl font-semibold",children:"Not Found"}),t.jsx("p",{className:"text-muted-foreground mt-2",children:"We couldn't resolve this path."})]})]}):t.jsxs(t.Fragment,{children:[t.jsx(c,{}),t.jsx(o.Suspense,{fallback:t.jsx(u,{}),children:t.jsx(E,{namespace:e.workspace,path:e.path,entity:e.entity})})]})}export{S as component};
