1import{j as e}from"./vendor-query-BgfFx4gZ.js";import{h as s,r as t,L as a}from"./vendor-react-Bd4b23er.js";import{u as l,f as d,g as o}from"./index-CMQCNUjM.js";import{M as n}from"./marketing-page-shell-tMY_6-_L.js";import"./vendor-editor-BoCi9fGe.js";import{R as r}from"./rich-html-body-Dd4Jay6k.js";import{A as i}from"./vendor-ui-IBV4yzoM.js";import"./vendor-zustand-B2xOjIeg.js";import"./linkify-BILqzwg6.js";function c(){return e.jsxs("div",{className:"animate-pulse space-y-8","aria-busy":"true","aria-label":"Loading",children:[e.jsx("div",{className:"h-5 w-28 rounded bg-[#00053d]/10"}),e.jsx("div",{className:"aspect-[16/9] w-full rounded-2xl bg-[#00053d]/5"}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"h-10 w-4/5 rounded bg-[#00053d]/10 md:h-12"}),e.jsx("div",{className:"h-4 w-40 rounded bg-[#00053d]/5"}),e.jsx("div",{className:"h-5 w-full rounded bg-[#00053d]/5"}),e.jsx("div",{className:"h-5 w-2/3 rounded bg-[#00053d]/5"})]}),e.jsxs("div",{className:"space-y-3 pt-2",children:[e.jsx("div",{className:"h-4 w-full rounded bg-[#00053d]/5"}),e.jsx("div",{className:"h-4 w-full rounded bg-[#00053d]/5"}),e.jsx("div",{className:"h-4 w-11/12 rounded bg-[#00053d]/5"}),e.jsx("div",{className:"h-4 w-full rounded bg-[#00053d]/5"}),e.jsx("div",{className:"h-4 w-3/4 rounded bg-[#00053d]/5"}),e.jsx("div",{className:"h-4 w-full rounded bg-[#00053d]/5"}),e.jsx("div",{className:"h-4 w-5/6 rounded bg-[#00053d]/5"})]})]})}function m(){const{slug:m}=s(),{t:u}=l("marketing"),[x,f]=t.useState(null),[h,p]=t.useState(!0),[g,j]=t.useState(!1);return t.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[m]),t.useEffect(()=>{if(!m)return;let e=!1;return(async()=>{try{p(!0),j(!1);const s=await d.get(`${o}/api/blog/posts/${encodeURIComponent(m)}`);if(e)return;f(s.data.post??null),document.title=s.data.post?.metaTitle||s.data.post?.title||document.title;const t=document.querySelector('meta[name="description"]');t&&s.data.post?.metaDescription&&t.setAttribute("content",s.data.post.metaDescription)}catch(s){if(e)return;const t="object"==typeof s&&null!==s&&"response"in s?s.response?.status:void 0;j(404===t),f(null)}finally{e||p(!1)}})(),()=>{e=!0}},[m]),e.jsx(n,{children:e.jsx("section",{className:"flex min-h-[calc(100dvh-4rem)] flex-col border-b",children:e.jsx("div",{className:"mx-auto flex w-full max-w-3xl flex-1 flex-col px-4 py-10 md:px-6 md:py-14 lg:py-16",children:h?e.jsx(c,{}):g||!x?e.jsxs("div",{className:"space-y-4",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:u("blog.notFound",{defaultValue:"Post not found"})}),e.jsxs(a,{to:"/blogs",className:"inline-flex min-h-11 cursor-pointer items-center gap-2 text-sm font-medium text-[#0b5cff] underline-offset-4 hover:underline",children:[e.jsx(i,{className:"h-4 w-4","aria-hidden":!0}),u("blog.backToBlog",{defaultValue:"Back to blog"})]})]}):e.jsxs("article",{children:[e.jsxs(a,{to:"/blogs",className:"mb-8 inline-flex min-h-11 cursor-pointer items-center gap-2 text-sm font-medium text-[#0b5cff] underline-offset-4 hover:underline",children:[e.jsx(i,{className:"h-4 w-4","aria-hidden":!0}),u("blog.backToBlog",{defaultValue:"Back to blog"})]}),x.coverImageUrl?e.jsx("img",{src:x.coverImageUrl,alt:"",className:"mb-8 aspect-[16/9] w-full rounded-2xl object-cover"}):null,e.jsxs("header",{className:"mb-8 space-y-4",children:[e.jsx("h1",{className:"text-3xl font-bold tracking-tight md:text-5xl",children:x.title}),e.jsxs("p",{className:"text-sm font-medium text-[#00053d]/50",children:[x.authorName,x.publishedAt?` · ${new Date(x.publishedAt).toLocaleDateString()}`:""]}),x.excerpt?e.jsx("p",{className:"text-lg font-medium leading-relaxed text-[#00053d]/60 md:text-xl",children:x.excerpt}):null]}),e.jsx(r,{html:x.content??"",className:"text-[#00053d] [&_a]:text-[#0b5cff] [&_img]:my-4 [&_img]:max-w-full [&_img]:rounded-xl [&_video]:my-4 [&_video]:max-w-full"})]})})})})}export{m as BlogPostPage};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.