1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3667],{22595:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/blog/search",function(){return n(29528)}])},49528:function(e,t,n){"use strict";n.d(t,{m:function(){return a}});var l=n(52322),s=n(2784),r=n(59119);let a=(0,s.forwardRef)(function(e,t){let{label:n,id:s,className:a="",wrapperClassName:i="",...c}=e;return(0,l.jsx)("div",{className:"flex min-h-[3rem] items-center justify-start rounded-[3px] bg-neutral-10 px-3 focus-within:outline ".concat(i),children:(0,l.jsxs)("div",{className:"relative flex-1 pl-12 lg:pl-16",children:[(0,l.jsx)(r.J,{icon:"Search",className:"absolute left-0 top-1/2 h-full w-auto -translate-y-1/2 text-neutral-40"}),(0,l.jsx)("input",{id:s,ref:t,title:n,type:"search",...c,className:"text-b20 w-full bg-neutral-10 pl-2 leading-legacy-none outline-none ".concat(a)}),(0,l.jsx)("label",{htmlFor:s,className:"sr-only",children:n})]})})})},57583:function(e,t,n){"use strict";n.d(t,{E:function(){return c}});var l=n(52322),s=n(44905),r=n(39097),a=n.n(r);let i=(0,s.j)(["flex items-center gap-4"],{variants:{disabled:{true:"opacity-40",false:"hover:text-blue-50"}}}),c=e=>{let{disabled:t=!1,className:n="",as:s="button",children:r,...c}=e;return"button"===s||t?(0,l.jsx)("button",{className:"".concat(i({disabled:t})," ").concat(n),disabled:t,...c,children:r}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(a(),{className:"".concat(i({disabled:t})," ").concat(n),...c,children:r})})}},73684:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var l=n(52322),s=n(59119),r=n(57583);let a=e=>(0,l.jsxs)(r.E,{...e,children:[(0,l.jsx)("span",{children:"Next"}),(0,l.jsx)("span",{className:"sr-only",children:" page"}),(0,l.jsx)(s.J,{icon:"ChevronRight",className:"h-8 w-auto"})]})},7368:function(e,t,n){"use strict";n.d(t,{L:function(){return a}});var l=n(52322),s=n(59119),r=n(57583);let a=e=>(0,l.jsxs)(r.E,{...e,children:[(0,l.jsx)(s.J,{icon:"ChevronLeft",className:"h-8 w-auto"}),(0,l.jsx)("span",{children:"Previous"}),(0,l.jsx)("span",{className:"sr-only",children:" page"})]})},29528:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return X},default:function(){return Y}});var l=n(52322),s=n(43931),r=n.n(s),a=n(75619);let i=r()(a.MQ,a.Ob);var c=n(2784),o=n(39698),u=n(49528);let d=()=>{var e;let{query:t,refine:n}=(0,o.l)(),s=(0,c.useRef)(null);return(0,l.jsx)("div",{className:"w-[52rem] max-w-full",children:(0,l.jsx)(u.m,{label:"Search for...",id:"search",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",maxLength:512,autoComplete:"off",value:t,ref:s,onChange:()=>{var t;return n(null!==(e=null===(t=s.current)||void 0===t?void 0:t.value)&&void 0!==e?e:"")}})})};var h=n(5632),x=n.n(h),m=n(98979);let f=e=>{let{value:t,onChange:n,label:s}=e;return(0,l.jsxs)("label",{htmlFor:"ais-".concat(t),className:"cursor-pointer",children:[(0,l.jsx)("input",{id:"ais-".concat(t),value:t,type:"checkbox",className:"sr-only",onChange:n}),(0,l.jsx)("span",{className:"font-bold text-blue-40",children:s})]})},j=e=>{let{className:t="",blogs:n}=e,{items:s,refine:r}=(0,m.c)({attribute:"blog.name"}),{clear:a}=(0,o.l)(),i=s.find(e=>e.isRefined),u=n.filter(e=>e!==(null==i?void 0:i.label));return(0,l.jsx)("div",{className:t,children:(0,l.jsxs)("p",{children:["Currently searching"," ",(0,l.jsx)("span",{className:"font-bold",children:null==i?void 0:i.label})," blog posts. Switch to:"," ",u.map((e,t)=>(0,l.jsxs)(c.Fragment,{children:[(0,l.jsx)(f,{value:e,label:e,onChange:()=>{void 0!==i&&r(null==i?void 0:i.value),a(),r(e)}}),t<u.length-1?", ":null]},e))]})})};var b=n(73664),p=n(73684),v=n(7368);let g=e=>{let{resultsId:t}=e,{isFirstPage:n,isLastPage:s,refine:r,currentRefinement:a}=(0,b.h)(),i=e=>{r(e),setTimeout(()=>{var e;null===(e=document.getElementById(t))||void 0===e||e.scrollIntoView({behavior:"smooth"})},0)};return(0,l.jsxs)("div",{className:"flex justify-between",children:[(0,l.jsx)(v.L,{disabled:n,onClick:()=>i(a-1)}),(0,l.jsx)(p.o,{disabled:s,onClick:()=>i(a+1)})]})};var N=n(54033);let y=e=>{let{className:t=""}=e,{query:n}=(0,N.V)();return(0,l.jsxs)("p",{className:"uppercase italic ".concat(t),children:["no results were found for ",(0,l.jsx)("span",{className:"font-bold",children:n})]})};var w=n(39097),_=n.n(w),C=n(43074);let L=e=>{let{title:t,excerpt:n}=e;return(0,l.jsx)("li",{className:"mb-8 border-b border-b-black",children:(0,l.jsxs)(_(),{href:(0,C._Y)(e),className:"block",children:[(0,l.jsx)("h2",{className:"text-b10 mb-4 font-bold",children:t}),(0,l.jsx)("p",{className:"text-b30 pb-12",children:n})]})})},k=e=>{let{className:t=""}=e,{nbHits:n}=(0,N.V)();return n>0?(0,l.jsxs)("p",{className:"uppercase italic ".concat(t),children:[n," results found"]}
1):(0,l.jsx)(l.Fragment,{})};var S=n(23277);let E=()=>{let{hits:e}=(0,S.O)();return(0,l.jsxs)("div",{children:[(0,l.jsx)(k,{className:"pb-10"}),(0,l.jsx)("ul",{children:e.map(e=>(0,l.jsx)(L,{...e},e.__position))})]})},F=e=>{let{label:t,value:n,onChange:s,selected:r}=e;return(0,l.jsx)("li",{className:"my-4",children:(0,l.jsxs)("label",{htmlFor:"ais-".concat(n),className:"cursor-pointer",children:[(0,l.jsx)("input",{id:"ais-".concat(n),value:n,type:"checkbox",className:"sr-only",onChange:s,checked:r}),(0,l.jsx)("span",{className:"text-blue-50".concat(r?" font-bold":""),children:t})]})})},R=e=>{let{attribute:t,title:n}=e,{items:s,refine:r}=(0,m.c)({operator:"or",attribute:t,sortBy:["count"]});return(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"text-b20 font-bold",children:n}),(0,l.jsx)("ul",{children:s.map(e=>{let{label:t,value:n,isRefined:a}=e;return(0,l.jsx)(F,{label:t,value:n,onChange:()=>{s.forEach(e=>{let{value:t,isRefined:n}=e;n&&r(t)}),a||r(n)},selected:a},t)})})]})},O=e=>{var t;let{className:n=""}=e,{items:s}=(0,m.c)({attribute:"blog.name"}),r=null===(t=s.find(e=>e.isRefined))||void 0===t?void 0:t.label;return(0,l.jsx)("aside",{className:"h-min bg-neutral-10 p-10 ".concat(n),children:(0,l.jsx)(R,{attribute:"categories.name",title:"".concat(void 0!==r?"".concat(r," "):"","Categories")})})},P=()=>{let{nbHits:e}=(0,N.V)();return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("section",{className:"scroll-mt-12 pb-20 lg:flex lg:gap-10",id:"results",children:[e>0?(0,l.jsx)(E,{}):(0,l.jsx)(y,{className:"flex-1"}),(0,l.jsx)(O,{className:"hidden w-2/5 lg:block ".concat(0===e?"!hidden":"")})]})})};var T=n(27967);let V=()=>{let{query:e}=(0,o.l)();return(0,l.jsx)(T.H,{title:""!==e?"You searched for: ".concat(e):"Search Blog Posts"})};var q=n(46721),B=n(91208),I=n(91695),J=n(46586);let H="sanity_posts",M=e=>{let{blogs:t}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(V,{}),(0,l.jsxs)("div",{className:"container pb-20",children:[(0,l.jsxs)("div",{className:"flex flex-col items-center px-2 pb-12 pt-10 lg:pb-20",children:[(0,l.jsx)("h1",{className:"text-h40 mb-12",children:"Search Results"}),(0,l.jsx)(d,{}),(0,l.jsx)(j,{className:"pt-8",blogs:t})]}),(0,l.jsx)(P,{}),(0,l.jsx)(g,{resultsId:"results"})]})]})},U=e=>{let{serverUrl:t,serverState:n,blogs:s}=e;return(0,l.jsx)(B.H,{...n,children:(0,l.jsx)(I.p,{searchClient:i,indexName:H,future:{preserveSharedStateOnUnmount:!1},routing:{router:(0,J.v)({singletonRouter:x(),serverUrl:t,routerOptions:{cleanUrlOnDispose:!0}}),stateMapping:{routeToState:e=>{try{var t,n;return void 0===(null===(t=e.refinementList)||void 0===t?void 0:t["blog.name"])&&(e.refinementList=null!==(n=e.refinementList)&&void 0!==n?n:{},e.refinementList["blog.name"]=["Students"]),{[H]:e}}catch(t){if(console.log(t),"object"==typeof e&&"string"==typeof e.query)return{[H]:{query:e.query}};return{[H]:{}}}},stateToRoute:e=>{if(H in e&&"refinementList"in e[H]&&void 0!==e[H].refinementList&&"blog.name"in e[H].refinementList&&"Students"===e[H].refinementList["blog.name"][0]){var t;return{...e[H],refinementList:{...null!==(t=e[H].refinementList)&&void 0!==t?t:{},"blog.name":[]}}}return e[H]}}},children:(0,l.jsx)(M,{blogs:s})})})};U.getLayout=(0,q.W)("blog");var X=!0,Y=U}},function(e){e.O(0,[2182,9097,4622,7926,7450,2058,6439,7967,6721,9774,2888,179],function(){return e(e.s=22595)}),_N_E=e.O()}]);
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.