1import{_ as S}from"./BeDTnonf.js";import{z as N,H as B,M as n,N as o,V as e,J as y,_ as v,Z as f,Q as $,P as D,L as b,k as x,w as C,a0 as I,ac as k,u as m,X as H}from"./CrQeYvpp.js";import{_ as M,d as P,e as F,a as E,b as O,f as R,u as X,g as z}from"./C677hslQ.js";const T={class:"relative -my-1 -ml-5 rounded-bl-xl py-7 pl-5 transition-colors hover:bg-gray-100"},q={class:"grid gap-x-5 gap-y-3 sm:grid-cols-2 lg:grid-cols-3"},G=["innerHTML"],V={key:0,class:"flex flex-wrap"},j={class:"hidden lg:block"},J={class:"space-y-2 pr-5"},Q=["innerHTML"],w=N({__name:"SearchResult",props:{hit:{type:Object,default:()=>({})},showBreadcrumbs:{type:Boolean,default:!1}},setup(l){function a(r,s=[],c=0){c++;for(const i in r)c===1&&i==="title"||i==="url"||i==="breadcrumbs"||r[i]&&typeof r[i]=="object"&&(r[i].hasOwnProperty("matchLevel")&&r[i].matchLevel!=="none"?s.push(r[i]):a(r[i],s));return s}function d(r){return r.split(new RegExp("(?<=[.?!])\\s+")).find(c=>c.includes("<em>"))}return(r,s)=>{const c=B("AppImage"),i=M;return n(),o("div",T,[e("div",q,[e("div",null,[e("h3",{class:"typo-h-3 font-normal text-red-500 md:mb-2",innerHTML:l.hit.heading||l.hit.title},null,8,G),l.showBreadcrumbs?(n(),o("ul",V,[(n(!0),o(y,null,v(l.hit.breadcrumbs.slice(0,-1),(g,_)=>(n(),o("li",{key:_},[e("span",null,f(g.title),1),s[0]||(s[0]=e("span",{class:"mx-1"},"/",-1))]))),128))])):$("",!0)]),e("div",j,[l.hit.image?(n(),D(c,{key:0,class:"size-full",src:l.hit.image},null,8,["src"])):$("",!0)]),e("ul",J,[(n(!0),o(y,null,v(a(l.hit._highlightResult,[]),(g,_)=>(n(),o("li",{key:_},[e("p",{class:"highlight",innerHTML:d(g.value)},null,8,Q)]))),128))])]),b(i,{to:l.hit.url,class:"before:absolute before:inset-0","aria-label":l.hit.heading||l.hit.title},null,8,["to","aria-label"])])}}}),W=()=>P().$algolia;function Z(l){const a=W();return a==null?void 0:a.initIndex(l)}function K(l){const a=E(),d=l||a.public.algolia.globalIndex;if(!d)throw new Error("`[@nuxtjs/algolia]` Cannot search in Algolia without `globalIndex` or `indexName` passed as a parameter");const r=Z(d),s=F(`${d}-search-result`,()=>null),c=async({query:i,requestOptions:g})=>{const _=await r.search(i,g);return s.value=_,_};return{result:x(()=>s.value),search:c}}const U={class:"space-y-5 md:space-y-10"},Y={class:"typo-h-2 mb-2 text-black"},ee={class:"divide-y-2"},te={class:"typo-h-2 mb-2 text-black"},se={class:"divide-y-2"},ne={class:"typo-h-2 mb-2 text-black"},le={class:"divide-y-2"},ae={class:"typo-h-2 mb-2 text-black"},ie={class:"divide-y-2"},oe={key:0,class:"text-center"},re={__name:"Search",setup(l){const a=E().public.ALGOLIA_INDEX_PREFIX;if(!a)throw new Error("ALGOLIA_INDEX_PREFIX not set in runtime config");const d=O(),{locale:r}=R(),{result:s,search:c}=K(`${a}default`),i=x(()=>{var t,u;return((u=(t=s.value)==null?void 0:t.hits)==null?void 0:u.filter(p=>p.blueprint==="page"))||[]}),g=x(()=>{var t,u;return((u=(t=s.value)==null?void 0:t.hits)==null?void 0:u.filter(p=>p.blueprint==="news_article"))||[]}),_=x(()=>{var t,u;return((u=(t=s.value)==null?void 0:t.hits)==null?void 0:u.filter(p=>p.blueprint==="event"))||[]}),L=x(()=>{var t,u;return((u=(t=s.value)==null?void 0:t.hits)==null?void 0:u.filter(p=>p.blueprint==="publication"))||[]});return C(()=>d.query.search,async t=>{t&&await c({query:t,requestOptions:{facetFilters:[`locale:${r.value}`]}})},{immediate:!0}),(t,u)=>{var A;const p=S;return n(),o("div",U,[I(e("div",null,[e("h2",Y,f(t.$t("pages")),1),e("ul",ee,[(n(!0),o(y,null,v(m(i),h=>(n(),o("li",{key:h.objectID},[b(w,{"show-breadcrumbs":"",hit:h},null,8,["hit"])]))),128))])],512),[[k,m(i).length]]),I(e("div",null,[e("h2",te,f(t.$t("news")),1),e("ul",se,[(n(!0),o(y,null,v(m(g),h=>(n(),o("li",{key:h.objectID},[b(w,{hit:h},null,8,["hit"])]))),128))])],512),[[k,m(g).length]]),I(e("div",null,[e("h2",ne,f(t.$t("events")),1),e("ul",le,[(n(!0),o(y,null,v(m(_),h=>(n(),o("li",{key:h.objectID},[b(w,{hit:h},null,8,["hit"])]))),128))])],512),[[k,m(_).length]]),I(e("div",null,[e("h2",ae,f(t.$t("publications")),1),e("ul",ie,[(n(!0),o(y,null,v(m(L),h=>(n(),o("li",{key:h.objectID},[b(w,{hit:h},null,8,["hit"])]))),128))])],512),[[k,m(L).length]]),!m(s)||((A=m(s))==null?void 0:A.hits.length)===0?(n(),o("div",oe,[b(p,{class:"mx-auto mb-3 size-6 sm:mb-5 sm:size-10"}),e("p",null,f(t.$t("no_entries_found")),1)])):$("",!0)])}}},ce={class:"typo-h-1 mb-5 md:mb-10"},me=N({__name:"search",setup(l){const{t:a}=R();return X({title:a("search_page.title"),meta:[{name:"description",content:a("search_page.content")},{name:"keywords",content:a("search_page.keywords")}]}),(d,r)=>{const s=re,c=z;return n(),D(c,{class:"w-full"},{default:H(()=>[e("h1",ce,f(d.$t("search_results")),1),b(s)]),_:1})}}});
1export{me as default}; 2//# sourceMappingURL=dvBn8D42.js.map
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.