1import{j as e}from"./three-CNbotivt.js";import{r as s}from"./vendor-DiYG-AHo.js";import{b as t,L as l}from"./router-DvrrpPvl.js";import{b as r}from"./blogPosts-Dt9V38J-.js";import{b as a}from"./blogService-C2b4CszB.js";import{m as o}from"./blogMapping-BvzdNtGG.js";import{w as i,v as c,C as n,g as d,A as x}from"./icons-8oIMpdE3.js";const m=()=>{var m;const{slug:h}=t(),g=r.find(e=>e.slug===h),[p,j]=s.useState(null),[u,f]=s.useState(!g);s.useEffect(()=>{window.scrollTo(0,0)},[h]),s.useEffect(()=>{if(j(null),g||!h)return void f(!1);let e=!0;return f(!0),a.getApprovedPostBySlug(h).then(s=>{e&&(s.success&&s.data&&j(o(s.data)),f(!1))}),()=>{e=!1}},[h,g]);const b=g||p;if(!b)return u?e.jsx("div",{className:"pt-16 min-h-screen flex items-center justify-center",children:e.jsx("div",{className:"text-gray-500",children:"Loading article..."})}):e.jsx("div",{className:"pt-16 min-h-screen flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Blog Post Not Found"}),e.jsx(l,{to:"/blog",className:"text-accent-orange hover:underline",children:"â Back to Blog"})]})});const N=g?r.findIndex(e=>e.slug===h):-1,y=N>0?r[N-1]:null,v=-1!==N&&N<r.length-1?r[N+1]:null;return e.jsxs("div",{className:"pt-16",children:[e.jsxs("div",{className:"sr-only",children:[e.jsxs("h1",{children:[b.title," - Capital Cargo International Pvt. Ltd"]}),e.jsx("p",{children:b.excerpt}),e.jsxs("p",{children:["Keywords: ",null==(m=b.keywords)?void 0:m.join(", ")]}),e.jsxs("p",{children:["By ",b.author," | Published ",b.date," | Category: ",b.category]})]}),e.jsxs("div",{className:"relative h-96 bg-gray-900",children:[e.jsx("img",{src:b.image,alt:b.title,className:"w-full h-full object-cover opacity-70"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 to-transparent"}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-8 text-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs(l,{to:"/blog",className:"inline-flex items-center text-sm mb-4 hover:text-yellow-400",children:[e.jsx(i,{className:"h-4 w-4 mr-2"}),"Back to Blog"]}),e.jsx("span",{className:"inline-block px-3 py-1 rounded-full text-sm font-medium mb-4",style:{backgroundColor:"#F9B222"},children:b.category}),e.jsx("h1",{className:"text-3xl md:text-5xl font-bold mb-4",children:b.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(c,{className:"h-4 w-4 mr-2"}),b.author]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(n,{className:"h-4 w-4 mr-2"}),b.date]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(d,{className:"h-4 w-4 mr-2"}),b.readTime]})]})]})})]}),e.jsx("article",{className:"py-12 bg-primary-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"prose prose-lg max-w-none",children:b.content.split("\n\n").map((s,t)=>{if(s.startsWith("**")&&s.endsWith("**")){const l=s.replace(/\*\*/g,"");return e.jsx("h2",{className:"text-2xl md:text-3xl font-bold mt-8 mb-4",style:{color:"#0096C7"},children:l},t)}if(s.startsWith("- ")||s.startsWith("âï¸")||s.startsWith("ð¢")||s.startsWith("â")||s.startsWith("â
"))return e.jsx("p",{className:"text-gray-700 leading-relaxed mb-3 pl-4",children:s},t);if(s.includes("**")){const l=s.split("**");return e.jsx("p",{className:"text-gray-700 leading-relaxed mb-4 text-lg",children:l.map((s,t)=>t%2==0?s:e.jsx("strong",{className:"font-semibold text-gray-900",children:s},t))},t)}return e.jsx("p",{className:"text-gray-700 leading-relaxed mb-4 text-lg",children:s},t)})}),e.jsxs("div",{className:"mt-12 p-8 rounded-xl",style:{backgroundColor:"#f6f6f6"},children:[e.jsx("h3",{className:"text-2xl font-bold mb-3",style:{color:"#1a1a1a"},children:"Ready to Ship with Capital Cargo?"}),e.jsx("p",{className:"text-gray-600 mb-6 text-lg",children:"With 27+ years of experience, we provide reliable international shipping solutions from Nepal to anywhere in the world."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsx(l,{to:"/quote",className:"inline-block text-white px-8 py-4 rounded-lg font-semibold transition-colors duration-200 text-center hover:opacity-90",style:{backgroundColor:"#0096C7"},children:"Get Free Quote"}),e.jsx(l,{to:"/contact",className:"inline-block border-2 px-8 py-4 rounded-lg font-semibold transition-colors duration-200 text-center hover:bg-gray-50",style:{borderColor:"#F9B222",color:"#F9B222"},children:"Contact Us: +977-01-5367883"})]})]}),e.jsx("div",{className:"mt-12 p-6 border-t border-gray-200",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center",style:{backgroundColor:"#f6f6f6"},children:e.jsx(c,{className:"h-8 w-8",style:{color:"#F9B222"}})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-bold text-lg",children:b.author}),e.jsx("p",{className:"text-gray-600",children:"Logistics Expert at Capital Cargo"})]})]})}),e.jsx("div",{className:"mt-12 pt-8 border-t border-gray-200",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[y&&e.jsxs(l,{to:`/blog/${y.slug}`,className:"p-6 rounded-lg border-2 border-gray-200 hover:border-yellow-400 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 mb-2",children:[e.jsx(i,{className:"h-4 w-4"}),"Previous Article"]}),e.jsx("h4",{className:"font-bold text-lg group-hover:text-yellow-600",children:y.title})]}),v&&e.jsxs(l,{to:`/blog/${v.slug}`,className:"p-6 rounded-lg border-2 border-gray-200 hover:border-yellow-400 transition-colors group text-right",children:[e.jsxs("div",{className:"flex items-center justify-end gap-2 text-sm text-gray-500 mb-2",children:["Next Article",e.jsx(x,{className:"h-4 w-4"})]}),e.jsx("h4",{className:"font-bold text-lg group-hover:text-yellow-600",children:v.title})]})]})})]})}),e.jsx("section",{className:"py-16",style:{backgroundColor:"#f6f6f6"},children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsx("h2",{className:"text-3xl font-bold mb-8 text-center",style:{color:"#0096C7"},children:"Related Articles"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:r.filter(e=>e.category===b.category&&e.slug!==h).slice(0,3).map(s=>e.jsxs(l,{to:`/blog/${s.slug}`,className:"bg-primary-white rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition-shadow",children:[e.jsx("img",{src:s.image,alt:s.title,className:"w-full h-48 object-cover"}),e.jsxs("div",{className:"p-6",children:[e.jsx("h3",{className:"text-xl font-bold mb-3 hover:text-yellow-600",children:s.title}),e.jsx("p",{className:"text-gray-600 text-sm",children:s.excerpt})]})]},s.id))})]})})]})};export{m 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.