1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94909,(e,l,s)=>{"use strict";e.i(47167),Object.defineProperty(s,"__esModule",{value:!0});var t={default:function(){return d},getImageProps:function(){return o}};for(var a in t)Object.defineProperty(s,a,{enumerable:!0,get:t[a]});let r=e.r(55682),i=e.r(8927),n=e.r(85437),c=r._(e.r(1948));function o(e){let{props:l}=(0,i.getImgProps)(e,{defaultLoader:c.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,s]of Object.entries(l))void 0===s&&delete l[e];return{props:l}}let d=n.Image},57688,(e,l,s)=>{l.exports=e.r(94909)},18566,(e,l,s)=>{l.exports=e.r(76562)},7335,e=>{"use strict";var l=e.i(38232),s=e.i(22016),t=e.i(18566);let a=/(\S+)|(.)/g,r=/[\.#][\p{L}\p{N}]/u,i=/\p{Ll}(?=[\p{Lu}])/u,n=/[\p{L}\p{N}]+/gu,c=/^([^\p{L}])*(?:\p{L}\.){2,}([^\p{L}])*$/u,o=new Set(["â","â","-","â","/"]),d=new Set([".","!","?"]),h=new Set([...d,":",'"',"'","â"]),u=new Set(["a","an","and","as","at","because","but","by","en","for","if","in","neither","nor","of","on","only","or","over","per","so","some","than","that","the","to","up","upon","v","versus","via","vs","when","with","without","yet"]);function m(e,l,s){return e.slice(0,l)+e.charAt(l).toLocaleUpperCase(s)+e.slice(l+1)}e.s(["default",0,({title:e})=>{let p=((0,t.usePathname)()??"/").split("/").filter(Boolean),x=[{label:"Home",href:"/"},...p.map((e,l)=>({label:(function(e,l={}){let{locale:s,sentenceCase:t=!1,sentenceTerminators:p=d,titleTerminators:x=h,smallWords:f=u,wordSeparators:g=o}="string"==typeof l||Array.isArray(l)?{locale:l}:l,j=t?p:x,b="",N=!0;for(let l of e.matchAll(a)){let{1:a,2:o,index:d=0}=l;if(o){b+=o;continue}if(r.test(a)){let e=a.match(c);if(e){let[l,r="",i=""]=e;b+=t&&!N?a:m(a,r.length,s),N=j.has(i.charAt(0));continue}b+=a,N=j.has(a.charAt(a.length-1))}else{let l=Array.from(a.matchAll(n)),r=a,c=!1;for(let n=0;n<l.length;n++){let{0:o,index:h=0}=l[n],u=a.charAt(h+o.length);if(c=j.has(u),N)N=!1;else if(t||i.test(o))continue;else if(1===l.length){if(f.has(o)&&d+a.length!==e.length&&!c)continue}else if(n>0&&(!g.has(a.charAt(h-1))||f.has(o)&&g.has(u)))continue;r=m(r,h,s)}b+=r,N=c||j.has(a.charAt(a.length-1))}}return b})(decodeURIComponent(e)).replaceAll("-"," "),href:"/"+p.slice(0,l+1).join("/")}))];return(0,l.jsx)("div",{children:(0,l.jsx)("nav",{className:"breadcrumbs mt-2","aria-label":"Breadcrumb",children:(0,l.jsx)("ol",{className:"flex gap-4",children:x.map((e,t)=>{let a=t===x.length-1;return(0,l.jsx)("li",{className:a?"text-sm font-bold relative line-clamp-1":"text-sm text-darkblue relative",children:(0,l.jsx)(s.default,{href:e.href,"aria-current":a?"page":void 0,children:e.label})},e.href)})})})})}],7335)},58925,e=>{"use strict";var l=e.i(38232),s=e.i(15010),t=e.i(22016),a=e.i(57688);
1let r=({post:{title:e,image:s,body:r,link:i}})=>{let n,c,o;return(0,l.jsxs)("div",{className:"mb-8 flex flex-col gap-8",children:[(0,l.jsxs)(t.default,{href:i,className:"grid grid-cols-10 gap-8",children:[(0,l.jsx)("div",{className:"col-span-3 md:col-span-4",children:s?.asset&&(0,l.jsx)(a.default,{src:`${s.asset.url}?w=1200&dpr=2&fm=webp`,alt:e||"",width:Math.floor(s.asset.metadata.dimensions.width/3),height:Math.floor(s.asset.metadata.dimensions.height/3),className:"w-full h-auto",style:{width:"auto",height:"auto"}})}),(0,l.jsxs)("article",{className:"flex flex-col gap-4 col-span-6",children:[(0,l.jsx)("header",{children:(0,l.jsx)("h1",{className:"text-lg lg:text-2xl font-bold line-clamp-4 lg:line-clamp-none",children:e})}),(0,l.jsx)("div",{className:"hidden lg:block",children:r&&(0,l.jsxs)("p",{className:"line-clamp-3",children:[(n=new TextEncoder,c=new TextDecoder("utf-8"),o=n.encode(r).slice(0,250),c.decode(o)),"..."]})})]})]}),(0,l.jsx)("hr",{})]})},i=e=>(0,l.jsx)("div",{className:"grid grid-cols-10 gap-12",children:e.children}),n={nonTextBehavior:"remove"};var c=e.i(47163);let o="flex",d="flex border w-full",h="text-lg p-2 w-full",u="mb-12",m="flex gap-4 items-center",p="",x="font-bold",f="opacity-50 cursor-not-allowed",g="px-2 py-1 hover:underline",j="px-2 py-1 text-gray-500",b="border-t w-full",N="",v="flex gap-2 items-center w-full justify-start py-1 border-b py-4 cursor-pointer",y="cursor-pointer",w="text-lg";e.s(["default",0,()=>{let[e,t]=(0,s.useState)(""),[a,S]=(0,s.useState)(""),[$,C]=(0,s.useState)([]),[k,A]=(0,s.useState)(1),[L,T]=(0,s.useState)([]),[_,P]=(0,s.useState)([]),[M,O]=(0,s.useState)(0),[B,E]=(0,s.useState)(!1),U=(0,s.useMemo)(()=>{var e;let l;return e=e=>{S(e),A(1)},l=null,function(...s){l&&clearTimeout(l),l=setTimeout(()=>{l=null,e(...s)},300)}},[]);(0,s.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/categories");if(e.ok){let l=await e.json();P(l)}}catch(e){console.error("Error fetching categories:",e)}})()},[]),(0,s.useEffect)(()=>{(async()=>{E(!0);try{let e=new URLSearchParams({searchQuery:a,selectedCategories:JSON.stringify($),page:k.toString()}),l=await fetch(`/api/posts/search?${e}`);if(l.ok){let{posts:e,totalCount:s}=await l.json(),t=e.map(e=>({...e,body:e.body?function(e=[],l={}){let s=Object.assign({},n,l);return e.map(e=>"block"===e._type&&e.children?e.children.map(e=>e.text).join(""):"remove"===s.nonTextBehavior?"":`[${e._type} block]`).join("\n\n")}(e.body):"",link:`/media/${e.slug.current}`}));T(t),O(s)}else throw Error("Failed to fetch posts")}catch(e){console.error("Error fetching posts:",e),T([]),O(0)}finally{E(!1)}})()},[a,$,k]);let I=Math.ceil(M/10),R=e=>{A(e),window.scrollTo({top:0,behavior:"smooth"})},z=(()=>{let e=[];
1if(I<=7)return Array.from({length:I},(e,l)=>l+1);e.push(1);let l=Math.max(2,k-2),s=Math.min(I-1,k+2);k<=4&&(s=Math.min(6,I-1)),k>=I-2-1&&(l=Math.max(2,I-5)),l>2&&e.push("ellipsis-start");for(let t=l;t<=s;t++)e.push(t);return s<I-1&&e.push("ellipsis-end"),I>1&&e.push(I),e})();return(0,l.jsxs)(i,{children:[(0,l.jsxs)("div",{className:"col-span-10 md:col-span-7",children:[I>1&&(0,l.jsx)("div",{className:u,children:(0,l.jsxs)("ul",{className:m,children:[(0,l.jsx)("li",{className:p,children:(0,l.jsx)("button",{onClick:()=>R(k-1),disabled:1===k,className:`${g} ${1===k?f:""}`,children:"Previous"})}),z.map((e,s)=>"string"==typeof e?(0,l.jsx)("li",{className:p,children:(0,l.jsx)("span",{className:j,children:"..."})},`${e}-${s}`):(0,l.jsx)("li",{className:p,children:(0,l.jsx)("button",{onClick:()=>R(e),className:`${g} ${k===e?x:""}`,children:e})},e)),(0,l.jsx)("li",{className:p,children:(0,l.jsx)("button",{onClick:()=>R(k+1),disabled:k===I,className:`${g} ${k===I?f:""}`,children:"Next"})})]})}),B&&(0,l.jsx)("div",{className:"mb-8 text-center",children:"Loading..."}),!B&&L.length>0?L.map(e=>(0,l.jsx)(r,{post:e},e._id)):B?null:(0,l.jsx)("div",{className:"mb-8",children:"No posts found"}),I>1&&(0,l.jsx)("div",{className:u,children:(0,l.jsxs)("ul",{className:m,children:[(0,l.jsx)("li",{className:p,children:(0,l.jsx)("button",{onClick:()=>R(k-1),disabled:1===k,className:`${g} ${1===k?f:""}`,children:"Previous"})}),z.map((e,s)=>"string"==typeof e?(0,l.jsx)("li",{className:p,children:(0,l.jsx)("span",{className:j,children:"..."})},`${e}-${s}`):(0,l.jsx)("li",{className:p,children:(0,l.jsx)("button",{onClick:()=>R(e),className:`${g} ${k===e?x:""}`,children:e})},e)),(0,l.jsx)("li",{className:p,children:(0,l.jsx)("button",{onClick:()=>R(k+1),disabled:k===I,className:`${g} ${k===I?f:""}`,children:"Next"})})]})})]}),(0,l.jsxs)("div",{className:"col-span-3 md:flex flex-col gap-8 hidden",children:[(0,l.jsx)("div",{className:(0,c.cn)(o),children:(0,l.jsx)("form",{className:d,onSubmit:e=>e.preventDefault(),children:(0,l.jsx)("input",{type:"text",value:e,onChange:e=>{let l=e.target.value;t(l),U(l)},placeholder:"Search",className:h})})}),($.length>0||a)&&(0,l.jsxs)("div",{className:"mb-4",children:[(0,l.jsx)("h3",{className:"text-lg mb-2",children:"Active Filters"}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a&&(0,l.jsxs)("span",{className:"px-2 py-1 bg-gray-200 rounded text-sm flex items-center gap-2",children:["Search: â",a,"â",(0,l.jsx)("button",{onClick:()=>{t(""),S(""),A(1)},className:"ml-1",children:"Ã"})]}),$.map(e=>{let s=_.find(l=>l._id===e);return s?(0,l.jsxs)("span",{className:"px-2 py-1 bg-gray-200 rounded text-sm flex items-center gap-2",children:[s.title,(0,l.jsx)("button",{onClick:()=>{C(l=>l.filter(l=>l!==e)),A(1)},children:"Ã"})]},e):null}),($.length>0||a)&&(0,l.jsx)("button",{onClick:()=>{C([]),t(""),S(""),A(1)},className:"px-2 py-1 bg-gray-300 rounded text-sm",children:"Clear all"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-xl mb-4",children:"Categories"}),(0,l.jsx)("ul",{className:b,children:_.map(e=>{let s=$.includes(e._id);return(0,l.jsx)("li",{className:N,children:(0,l.jsxs)("label",{className:v,children:[(0,l.jsx)("input",{type:"checkbox",checked:s,onChange:()=>{var l;return l=e._id,void(C(e=>e.includes(l)?e.filter(e=>e!==l):[...e,l]),A(1))},className:y}),(0,l.jsx)("span",{className:w,children:e.title})]})},e._id)})})]})]})]})}],58925)}]);
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.