!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5b2d2d0f-e502-58a4-a4b2-f2a275122ee0")}catch(e){}}(); import{j as s}from"./jsx-runtime-D_zvdyIk.js";import{a as f,u as N,r as y}from"./index-DwaoyV61.js";import{c}from"./index-Bc72ctNv.js";import{u as p}from"./useTranslation-CqXWvxCZ.js";import{L as g,u as b}from"./components-DhFN5rxT.js";const w=({isFullWidth:t=!1})=>{const{t:a}=p(),e=f(),m=a("errors.refresh.title"),x=a("errors.refresh.description"),i=a("errors.refresh.label");return s.jsx("div",{className:c("mx-auto flex min-h-screen items-center justify-center bg-white px-4 py-24",t?"w-full":"max-w-3xl"),children:s.jsx("div",{className:c("mx-auto",t?"max-w-screen-lg":"max-w-max"),children:s.jsx("main",{className:"sm:flex",children:s.jsx("div",{className:"sm:ml-6",children:s.jsxs("div",{className:"sm:pl-6",children:[s.jsx("h1",{className:"text-4xl font-extrabold tracking-tight text-gray-900 sm:text-5xl",children:m}),s.jsx("p",{className:"my-4 text-base text-gray-500",children:x}),s.jsx(g,{to:e.pathname+e.search,reloadDocument:!0,className:"mt-1 text-base text-gray-600 underline",children:i})]})})})})})},L=({isFullWidth:t=!1,inline:a=!1,errorCode:e="404",publicationPresent:m=!0,customTitle:x,customDescription:i,error:r})=>{const{t:l,i18n:n}=p(),o=N(),{pathname:h}=f(),[d]=b();if(y.useEffect(()=>{e==="404"&&!d.has("404")&&o(`/?${new URLSearchParams({404:h})}`)},[e,h,d,o]),r?.message==="RefreshPageError")return s.jsx(w,{isFullWidth:t});const j=n.exists(`errors.${e}.title`)?l(`errors.${e}.title`):l("errors.fallback.title"),u=n.exists(`errors.${e}.description`)?l(`errors.${e}.description`):l("errors.fallback.description");return s.jsx("div",{className:c("mx-auto flex items-center justify-center bg-white px-4 py-24",a?"":"min-h-screen",t?"w-full":"max-w-3xl"),children:s.jsx("div",{className:c("mx-auto",t?"max-w-screen-lg":"max-w-max"),children:s.jsxs("main",{className:"sm:flex",children:[e!=="0"&&s.jsx("p",{className:"text-4xl font-extrabold text-gray-600 sm:text-5xl",children:e}),s.jsx("div",{className:"sm:ml-6",children:s.jsxs("div",{className:c("sm:pl-6",e!=="0"&&"sm:border-l sm:border-gray-200"),children:[s.jsx("h1",{className:"text-4xl font-extrabold tracking-tight text-gray-900 sm:text-5xl",children:x||j}),s.jsx("p",{className:"mb-2 mt-2 text-base text-gray-500",children:i||u}),m&&s.jsx(g,{to:"/",className:"offset-1 mt-1 text-base text-gray-600 underline hover:text-gray-700",children:l("errors.back")}),r&&s.jsxs("details",{className:"mt-4",children:[s.jsx("summary",{className:"text-sm font-medium text-gray-500",children:"Error Details"}),s.jsx("p",{className:"mt-2 text-sm text-gray-900",children:r.message}),r?.stack&&s.jsx("pre",{className:"mt-2 w-[360px] overflow-x-auto text-sm text-gray-900 sm:w-[480px]",children:r.stack})]})]})})]})})})};export{L as F}; //# sourceMappingURL=index-B9soWe_S.js.map //# debugId=5b2d2d0f-e502-58a4-a4b2-f2a275122ee0