PageSourceSearch

https://arcview.ca/assets/KnowledgeArticle-CtFi4LXJ.js

js arcview.ca collected 2026-10-04 02:32:51 UTC 8,604 bytes, 18 lines download raw bytes

1import{j as e}from"./trpc-vendor-BPGbB09s.js";import{ai as v,t as N,u as k,N as x,F as h,b as u,J as w,q as b,$ as A}from"./index-mnzSZuPs.js";import{d as j,m as y,q as I,E as B,ad as L}from"./ui-vendor-CPcQkr8f.js";import{M as E,r as M}from"./index-waIFKq6d.js";import{f as S}from"./format-Dx8HDyBA.js";import"./react-vendor-DfSJUp79.js";const $=/^(a|an|the|and|or|for|to|of|with|in|on|by|from|at|as|vs|&)$/i,g=/[\s,;:\-–—«»"'“”‘’(\[]+$/;function C(a,t){const s=a[a.length-1];return a.length>1&&new RegExp(`^${t.source}`,"i").test(s)}function O(a,t){const s=t.max,n=(a||"").replace(/\s+/g," ").trim();if(!n)return n;const r=n.split(/\s*[:|—–]\s*/).map(l=>l.trim()).filter(Boolean),o=t.brand?t.brand.test(n):!1;if(o&&n.length<=s)return n;const c=t.brand&&C(r,t.brand)?r.slice(0,-1):r;for(let l=c.length;l>=1;l-=1){const d=c.slice(0,l).join(": ");if(l===c.length&&t.longSuffix&&d.length+t.longSuffix.length<=s)return d+t.longSuffix;if(d.length+t.suffix.length<=s)return d+t.suffix;if(t.allowNoSuffixWhenBranded&&o&&d.length<=s)return d}const m=Math.max(0,s-t.suffix.length),i=c[0].split(" ");for(;i.length>1&&i.join(" ").length>m;)i.pop();for(;i.length>1&&$.test(i[i.length-1].replace(g,""));)i.pop();const p=i.join(" ").replace(g,"");return(p.length>m?p.slice(0,m).replace(g,""):p)+t.suffix}const T=62,f=160;function D(a){return O(a.metaTitle?.trim()||a.title,{longSuffix:" | ArcView Knowledge Base",suffix:" | ArcView",brand:/arcview/i,max:T})}function P(a){const t=(a.metaDescription?.trim()||a.excerpt?.trim()||a.title).replace(/\s+/g," ");if(t.length<=f)return t;const s=t.slice(0,f),n=Math.max(s.lastIndexOf(". "),s.lastIndexOf("! "),s.lastIndexOf("? "));if(n>=80)return s.slice(0,n+1);const r=s.lastIndexOf(" ");return`${s.slice(0,r>80?r:f-1).replace(/[,;:\-–—]$/,"")}…`}function K(a){return a.replace(/([^\n])\n(?!\n)/g,`$1  
2`)}const R={knowledge:"Knowledge","industry-news":"Industry News","installation-guide":"Installation Guide",maintenance:"Maintenance","design-trends":"Design Trends","case-study":"Case Study"};function z(){const[,a]=v("/knowledge/:slug"),t=a?.slug,{data:s,isLoading:n}=N.blogPosts.getBySlug.useQuery({slug:t},{enabled:!!t});return k({title:s?D(s):"Article",description:s?P(s):"ArcView knowledge base article",canonical:s?`https://arcview.ca/knowledge/${s.slug}`:void 0,ogImage:s?.featuredImage?`https://arcview.ca${s.featuredImage}`:void 0,ogType:"article"},{enabled:!!s}),n?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(x,{activeLink:"/knowledge"}),e.jsx("div",{className:"container px-4 sm:px-6 py-32",children:e.jsx("div",{className:"text-center",children:e.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})})}),e.jsx(h,{})]}):s?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(w,{data:{"@context":"https://schema.org","@type":"BlogPosting",headline:s.title,description:s.excerpt||s.title,image:s.featuredImage?`https://arcview.ca${s.featuredImage}`:void 0,author:s.author?{"@type":"Person",name:s.author}:{"@type":"Organization",name:"ArcView Windows & Doors"},publisher:{"@type":"Organization",name:"ArcView Windows & Doors",logo:{"@type":"ImageObject",url:"https://arcview.ca/logo-full.jpg"}},datePublished:s.publishedAt,dateModified:s.updatedAt||s.publishedAt,mainEntityOfPage:`https://arcview.ca/knowledge/${s.slug}`}}),e.jsx(w,{data:{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://arcview.ca/"},{"@type":"ListItem",position:2,name:"Knowledge Base",item:"https://arcview.ca/knowledge"},{"@type":"ListItem",position:3,name:s.title,item:`https://arcview.ca/knowledge/${s.slug}`}]}}),e.jsx(x,{activeLink:"/knowledge"}),e.jsx("section",{className:"pt-32 pb-16",children:e.jsx("div",{className:"container px-4 sm:px-6",children:e.jsxs(y.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"max-w-4xl mx-auto",children:[e.jsx("a",{href:"/knowledge",children:e.jsxs(u,{variant:"ghost",className:"mb-6",children:[e.jsx(j,{className:"w-4 h-4 mr-2"}),"Back to Knowledge Base"]})}),e.jsx(b,{className:"mb-4 bg-primary/10 text-primary border-primary/20",children:R[s.category]}),e.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-semibold mb-6 text-foreground leading-tight",children:s.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-6 text-muted-foreground mb-8",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(I,{className:"w-4 h-4"}),e.jsx("span",{children:s.publishedAt&&S(new Date(s.publishedAt),"MMMM d, yyyy")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(B,{className:"w-4 h-4"}),e.jsxs("span",{children:[s.viewCount," views"]})]}),s.author&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-foreground",children:s.author}),s.authorRole&&e.jsxs("span",{className:"text-sm",children:["• ",s.authorRole]})]})]}),s.featuredImage&&e.jsx("div",{className:"mb-12 rounded-2xl overflow-hidden",children:e.jsx("img",{src:`${s.featuredImage}?v=webp`,alt:s.title,className:"w-full h-auto",fetchPriority:"high"})})]})})}),e.jsx("section",{className:"pb-24",children:e.jsx("div",{className:"container px-4 sm:px-6",children:e.jsxs(y.div,{initial:{opacity:0,y:20}
2,animate:{opacity:1,y:0},transition:{delay:.2},className:"max-w-4xl mx-auto",children:[e.jsx("div",{className:`prose prose-sm sm:prose-base md:prose-lg max-w-none
3                prose-headings:font-bold prose-headings:text-foreground
4                prose-h1:text-4xl prose-h1:mb-6
5                prose-h2:text-3xl prose-h2:mt-12 prose-h2:mb-4
6                prose-h3:text-2xl prose-h3:mt-8 prose-h3:mb-3
7                prose-p:text-muted-foreground prose-p:leading-relaxed prose-p:mb-6
8                prose-strong:text-foreground prose-strong:font-semibold
9                prose-ul:my-6 prose-ul:list-disc prose-ul:pl-6
10                prose-ol:my-6 prose-ol:list-decimal prose-ol:pl-6
11                prose-li:text-muted-foreground prose-li:mb-2
12                prose-blockquote:border-l-4 prose-blockquote:border-primary
13                prose-blockquote:pl-6 prose-blockquote:italic
14                prose-blockquote:text-muted-foreground
15                prose-code:bg-muted prose-code:px-2 prose-code:py-1
16                prose-code:rounded prose-code:text-sm
17                prose-pre:bg-muted prose-pre:p-4 prose-pre:rounded-lg
18                prose-a:text-primary prose-a:no-underline hover:prose-a:underline`,children:e.jsx(E,{remarkPlugins:[M],components:{h1:"h2",h2:"h3",h3:"h4",h4:"h5",h5:"h6",h6:"h6"},children:K(s.content)})}),s.tags&&e.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:e.jsx("div",{className:"flex flex-wrap gap-2",children:s.tags.split(",").map((r,o)=>e.jsx(b,{variant:"secondary",children:r.trim()},o))})}),e.jsxs("nav",{"aria-label":"Buyer guides",className:"mt-12 pt-8 border-t border-border",children:[e.jsx("h3",{className:"text-xl font-bold text-foreground mb-4",children:"Buyer guides"}),e.jsx("ul",{className:"grid gap-2 sm:grid-cols-2 text-sm",children:[["/aluminum-windows-buying-guide-canada","Aluminum windows buying guide for Canada"],["/aluminum-vs-vinyl-windows-canada","Aluminum vs vinyl windows in Canada"],["/aluminum-windows-comparison-canada","ArcView vs Canadian vinyl brands"],["/vinyl-windows-canada","ArcView vinyl window line"],["/sliding-patio-doors-canada","Sliding patio doors for Canada"],["/folding-doors-canada","Folding doors for Canada"]].map(([r,o])=>e.jsx("li",{children:e.jsx(A,{href:r,className:"text-primary hover:underline",children:o})},r))})]}),e.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-xl font-bold text-foreground",children:"Share this article"}),e.jsxs(u,{variant:"outline",size:"sm",children:[e.jsx(L,{className:"w-4 h-4 mr-2"}),"Share"]})]})})]})})}),e.jsx(h,{})]}):e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(x,{activeLink:"/knowledge"}),e.jsx("div",{className:"container px-4 sm:px-6 py-32",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Article Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-8",children:"The article you're looking for doesn't exist or has been removed."}),e.jsx("a",{href:"/knowledge",children:e.jsxs(u,{children:[e.jsx(j,{className:"w-4 h-4 mr-2"}),"Back to Knowledge Base"]})})]})}),e.jsx(h,{})]})}export{z 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.