1import{_ as N}from"./CabxhyZL.js";import{_ as P}from"./CWJhUnXq.js";import{d as q,e as B,w as E,v as F,u as V,f as $,N as y,a2 as z,o as c,c as h,a as R,m as A,i as e,x as r,F as H,j as M,z as T,l as v,n as Q,C as d}from"./DBXVTj02.js";import"./Dv3IKxac.js";import"./CpuKX2Cn.js";import"./Cs2IV45D.js";import"./5PyF7hHB.js";import"./DlwTQUuT.js";import"./CFjRaLDM.js";const U=()=>({check(s){let o=!1;return!s||typeof s!="object"||this.checkType(s)&&(o=!0),o},checkType(s){return"total"in s&&"data"in s}}),D={class:"container mbs-2"},G={class:"row"},I={key:1,class:"row justify-content-center"},J={class:"col-12 text-center"},K={class:"row justify-content-center pt-4"},O={key:0,class:"col-3 justify-content-center d-flex"},W={key:0,class:"row justify-content-center pt-4"},ce=q({__name:"SearchPage",async setup(s){let o,g;const p=B();p.search.enabled||([o,g]=E(()=>F({path:"/"})),await o,g());const k=V();let w="";if(p.localization?.enabled){const[t]=k.fullPath.split("/").filter(Boolean)||[];w="/"+$(t).value.current}let l=d(!1),i=d([]),m=d(""),u=d(1),_=d(!1);const S=p.search.limit||9,j={headline:y("searchHeadline")||""},b=async()=>{let t="/api/search"+w+"?";l.value=!1;const a={q:m.value,p:u.value,l:S},f=new URLSearchParams(a).toString(),n=await $fetch(t+f);U().check(n)&&n.data._embedded.hits&&n.data._embedded.hits.length&&(n.data._embedded.hits.forEach(L=>{i.value.push(L)}),_.value=n.total>S*u.value),l.value=!0},x=async()=>{u.value++,await b()};return z(k,async t=>{const a=t.query;i.value=[],_.value=!1,a&&(m.value=a.q||"",u.value=a.p||1),await b()},{deep:!0,immediate:!0}),(t,a)=>{const f=N,n=P,C=Q;return c(),h("div",null,[R(C,{name:"default"},{main_content:A(()=>[R(f,{"component-data":j,"search-query":e(m)},null,8,["search-query"]),r("section",D,[r("div",G,[e(l)||e(u)>1?(c(),h(H,{key:0},[e(i)&&e(i).length>0?(c(),M(n,{key:0,"search-result":e(i)},null,8,["search-result"])):(c(),h("div",I,[r("div",J,T(("getTranslation"in t?t.getTranslation:e(y))("searchResultEmpty")),1)]))],64)):v("",!0)]),r("div",K,[e(l)&&e(_)?(c(),h("div",O,[r("button",{class:"btn btn-primary",onClick:x},T(("getTranslation"in t?t.getTranslation:e(y))("loadMore")),1)])):v("",!0)]),e(l)?v("",!0):(c(),h("div",W,[...a[0]||(a[0]=[r("div",{class:"loader-module p-0"},null,-1)])]))])]),_:1})])}}});export{ce 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.