1import{u,r as a,j as t,L as c,a as x,H as h,b as f}from"./react-vendor-B6sX7i9s.js";import{N as r,B as l,F as n}from"./index-fWCN746L.js";import{b as P}from"./blog-data-D6wdfajR.js";import{a as B}from"./automatedBlogPosts-C7hxL1Nv.js";import"./trpc-DrjY0t2M.js";import"./vendor-BAmwwOli.js";import"./ui-Dc_FVRD7.js";import"./markdown-CJ-2kjB2.js";const j=[...B,...P],b=o=>o.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();function S(){const[,o]=u("/blog/:slug"),[s,i]=a.useState(null),[p,d]=a.useState(!1);a.useEffect(()=>{if(o?.slug){const e=j.find(g=>g.slug===o.slug);e?(i(e),d(!1)):(i(null),d(!0))}},[o?.slug]);const m=e=>{try{return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return e}};return p?t.jsxs("div",{"data-loc":"client/src/pages/BlogPost.tsx:65",className:"min-h-screen flex flex-col",children:[t.jsx(r,{"data-loc":"client/src/pages/BlogPost.tsx:66"}),t.jsx("div",{"data-loc":"client/src/pages/BlogPost.tsx:67",className:"flex-grow flex items-center justify-center",children:t.jsxs("div",{"data-loc":"client/src/pages/BlogPost.tsx:68",className:"text-center",children:[t.jsx("h2",{"data-loc":"client/src/pages/BlogPost.tsx:69",className:"text-4xl font-bold mb-4",children:"Post Not Found"}),t.jsx("p",{"data-loc":"client/src/pages/BlogPost.tsx:70",className:"text-muted-foreground mb-6",children:"Sorry, we couldn't find the blog post you're looking for."}),t.jsx(c,{"data-loc":"client/src/pages/BlogPost.tsx:73",href:"/blog",children:t.jsxs(l,{"data-loc":"client/src/pages/BlogPost.tsx:74",children:[t.jsx(x,{"data-loc":"client/src/pages/BlogPost.tsx:75",className:"mr-2 h-4 w-4"}),"Back to Blog"]})})]})}),t.jsx(n,{"data-loc":"client/src/pages/BlogPost.tsx:81"})]}):s?t.jsxs("div",{"data-loc":"client/src/pages/BlogPost.tsx:99",className:"min-h-screen flex flex-col",children:[t.jsxs(h,{"data-loc":"client/src/pages/BlogPost.tsx:100",children:[t.jsx("title",{"data-loc":"client/src/pages/BlogPost.tsx:101",children:s.metaTitle||`${s.title} | Dustin Pest Control`}),t.jsx("meta",{"data-loc":"client/src/pages/BlogPost.tsx:102",name:"description",content:s.metaDescription||s.excerpt||b(s.content).slice(0,155)}),t.jsx("link",{"data-loc":"client/src/pages/BlogPost.tsx:103",rel:"canonical",href:`https://dustinpestcontrol.com/blog/${s.slug}`}),s.featuredImage&&t.jsx("meta",{"data-loc":"client/src/pages/BlogPost.tsx:104",property:"og:image",content:s.featuredImage}),t.jsx("script",{"data-loc":"client/src/pages/BlogPost.tsx:105",type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BlogPosting",headline:s.title,datePublished:s.publishedDate,dateModified:s.updatedDate||s.publishedDate,author:{"@type":"Organization",name:s.author||"Dustin Pest Control"},publisher:{"@type":"Organization",name:"Dustin Pest Control"},mainEntityOfPage:`https://dustinpestcontrol.com/blog/${s.slug}`,image:s.featuredImage})}),s.faqs&&s.faqs.length>0&&t.jsx("script",{"data-loc":"client/src/pages/BlogPost.tsx:117",type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:s.faqs.map(e=>({"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer}}))})})]}),t.jsx(r,{"data-loc":"client/src/pages/BlogPost.tsx:128"}),t.jsx("div",{"data-loc":"client/src/pages/BlogPost.tsx:131",className:"bg-muted/30 py-4 border-b",children:t.jsx("div",{"data-loc":"client/src/pages/BlogPost.tsx:132",className:"container mx-auto px-4",children:t.jsx(c,{"data-loc":"client/src/pages/BlogPost.tsx:133",href:"/blog",children:t.jsxs(l,{"data-loc":"client/src/pages/BlogPost.tsx:134",variant:"ghost",size:"sm",children:[t.jsx(x,{"data-loc":"client/src/pages/BlogPost.tsx:135",className:"mr-2 h-4 w-4"}),"Back to Blog"]})})})}),t.jsx("article",{"data-loc":"client/src/pages/BlogPost.tsx:143",className:"flex-grow py-12",children:t.jsxs("div",{"data-loc":"client/src/pages/BlogPost.tsx:144",className:"container mx-auto px-4 max-w-4xl",children:[t.jsxs("header",{"data-loc":"client/src/pages/BlogPost.tsx:146",className:"mb-8",children:[t.jsx("h1",{"data-loc":"client/src/pages/BlogPost.tsx:147",className:"text-4xl md:text-5xl font-bold text-foreground mb-4",children:s.title}),t.jsxs("div",{"data-loc":"client/src/pages/BlogPost.tsx:150",className:"flex items-center text-muted-foreground",children:[t.jsx(f,{"data-loc":"client/src/pages/BlogPost.tsx:151",className:"h-4 w-4 mr-2"}),t.jsx("time",{"data-loc":"client/src/pages/BlogPost.tsx:152",dateTime:s.publishedDate,children:m(s.publishedDate)})]})]}),s.featuredImage&&t.jsx("img",{"data-loc":"client/src/pages/BlogPost.tsx:159",src:s.featuredImage,alt:s.imageAlt||s.title,className:"w-full aspect-video object-cover rounded-xl mb-10"}),t.jsx("div",{"data-loc":"client/src/pages/BlogPost.tsx:167",className:`prose prose-lg max-w-none 2 prose-headings:text-foreground
3 prose-p:text-foreground/90 4 prose-a:text-primary hover:prose-a:text-primary/80 5 prose-strong:text-foreground 6 prose-ul:text-foreground/90 7 prose-ol:text-foreground/90 8 prose-li:text-foreground/90 9 prose-blockquote:text-foreground/80 10 prose-blockquote:border-primary 11 prose-code:text-foreground 12 prose-pre:bg-muted`,dangerouslySetInnerHTML:{__html:s.content}}),s.faqs&&s.faqs.length>0&&t.jsxs("section",{"data-loc":"client/src/pages/BlogPost.tsx:184",className:"mt-12",children:[t.jsx("h2",{"data-loc":"client/src/pages/BlogPost.tsx:185",className:"text-3xl font-bold mb-5",children:"Frequently asked questions"}),t.jsx("div",{"data-loc":"client/src/pages/BlogPost.tsx:186",className:"space-y-4",children:s.faqs.map(e=>t.jsxs("div",{"data-loc":"client/src/pages/BlogPost.tsx:188",className:"rounded-lg border border-border p-5",children:[t.jsx("h3",{"data-loc":"client/src/pages/BlogPost.tsx:189",className:"text-lg font-semibold",children:e.question}),t.jsx("p",{"data-loc":"client/src/pages/BlogPost.tsx:190",className:"mt-2 text-muted-foreground",children:e.answer})]},e.question))})]}),s.sources&&s.sources.length>0&&t.jsxs("section",{"data-loc":"client/src/pages/BlogPost.tsx:198",className:"mt-12 rounded-xl bg-muted/50 p-6",children:[t.jsx("h2",{"data-loc":"client/src/pages/BlogPost.tsx:199",className:"text-2xl font-bold mb-4",children:"Sources"}),t.jsx("ul",{"data-loc":"client/src/pages/BlogPost.tsx:200",className:"space-y-3",children:s.sources.map(e=>t.jsxs("li",{"data-loc":"client/src/pages/BlogPost.tsx:202",children:[t.jsx("a",{"data-loc":"client/src/pages/BlogPost.tsx:203",className:"font-medium text-primary underline underline-offset-4",href:e.url,target:"_blank",rel:"noreferrer",children:e.title}),t.jsxs("span",{"data-loc":"client/src/pages/BlogPost.tsx:206",className:"text-muted-foreground",children:[" â ",e.publisher]})]},e.url))})]}),t.jsxs("div",{"data-loc":"client/src/pages/BlogPost.tsx:214",className:"mt-12 p-6 bg-primary/5 border border-primary/20 rounded-lg",children:[t.jsx("h3",{"data-loc":"client/src/pages/BlogPost.tsx:215",className:"text-2xl font-bold mb-3",children:"Need Pest Control Services?"}),t.jsx("p",{"data-loc":"client/src/pages/BlogPost.tsx:216",className:"text-muted-foreground mb-4",children:"Contact Dustin Pest Control today for expert pest control, lawn care, and bird control services throughout Central Valley, California."}),t.jsxs("div",{"data-loc":"client/src/pages/BlogPost.tsx:219",className:"flex flex-wrap gap-4",children:[t.jsx(c,{"data-loc":"client/src/pages/BlogPost.tsx:220",href:"/contact",children:t.jsx(l,{"data-loc":"client/src/pages/BlogPost.tsx:221",size:"lg",children:"Get Free Quote"})}),t.jsx("a",{"data-loc":"client/src/pages/BlogPost.tsx:225",href:"tel:559-205-9898",children:t.jsx(l,{"data-loc":"client/src/pages/BlogPost.tsx:226",size:"lg",variant:"outline",children:"Call 559-205-9898"})})]})]})]})}),t.jsx(n,{"data-loc":"client/src/pages/BlogPost.tsx:235"})]}):t.jsxs("div",{"data-loc":"client/src/pages/BlogPost.tsx:88",className:"min-h-screen flex flex-col",children:[t.jsx(r,{"data-loc":"client/src/pages/BlogPost.tsx:89"}),t.jsx("div",{"data-loc":"client/src/pages/BlogPost.tsx:90",className:"flex-grow flex items-center justify-center",children:t.jsx("p",{"data-loc":"client/src/pages/BlogPost.tsx:91",className:"text-muted-foreground",children:"Loading..."})}),t.jsx(n,{"data-loc":"client/src/pages/BlogPost.tsx:93"})]})}export{S as default};
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.