1import{_ as P}from"./BbN13KHT.js";import{_ as D}from"./BK-tONi_.js";import{_ as F}from"./D4H9sm2l.js";import{_ as $}from"./DQ5VXAOF.js";import{u as j}from"./_uaEYg-m.js";import{_ as z,r as n,k as A,am as E,m as G,o as H,e as l,a as o,i as v,f as h,c as M,g as e,b as r,t as m,v as U,F as J,l as K,G as O,w as Q}from"./t8OAlijK.js";import"./CJVmOESB.js";import"./BLEvCVP7.js";const T={class:"p-10 col l8 s12"},W={key:0,class:"fs-11 d-flex align-items-center justify-content-between"},X={class:"d-flex align-items-center gap-1"},Y={class:"fw-bold"},Z={key:0,class:"text-grey fs-12"},ee={__name:"search",setup(ae){const u=n(!1),g=j(),p=A(),c=n("relevance"),i=n(null),a=n(null),y=n(1),x=n(10),d=E({title:"Search"});G(d);const f=async s=>{s?(u.value=!0,d.title=`Search Results for ${s}`,a.value=await g.searchContent({search:s,take:x.value,sort_by:c.value,page:y.value}),u.value=!1):(a.value={},d.title="Search")},V=()=>{i.value.search&&f(i.value.search)},B=s=>{y.value=s,f(i.value.search)};return H(async()=>{p.query.value&&(a.value=await g.searchContent({search:p.query.value,sort_by:"relevance",take:x.value}))}),(s,_)=>{var k,b,S,C,w,I;const N=P,R=D,q=F,L=$;return o(),l("div",T,[v(N,{ref_key:"searchInput",ref:i,"initial-value":e(p).query.value,"ontype-trigger":!1,"show-result":!1,loading:e(u),onSearch:f},null,8,["initial-value","loading"]),e(a)?(o(),l("div",W,[r("div",null,"About "+m((b=(k=e(a))==null?void 0:k.meta)==null?void 0:b.total)+" results",1),r("div",X,[_[1]||(_[1]=r("span",null,"Sort by",-1)),v(R,{margin:0,id:"sort_by",modelValue:e(c),"onUpdate:modelValue":_[0]||(_[0]=t=>U(c)?c.value=t:null),options:[{name:"Relevance",value:"relevance"},{name:"Date",value:"updated_at"}],onChange:V},null,8,["modelValue"])])])):h("",!0),(o(!0),l(J,null,K((S=e(a))==null?void 0:S.data,t=>(o(),l("div",{key:t.id,class:O(["d-flex flex-column mt-10",{disabled:e(u)}])},[v(q,{to:t.url},{default:Q(()=>[r("span",Y,m(t.title),1)]),_:2},1032,["to"]),t.h2_subtitle?(o(),l("span",Z,m(t.h2_subtitle),1)):h("",!0),r("span",null,m(t.meta_description),1)],2))),128)),((w=(C=e(a))==null?void 0:C.meta)==null?void 0:w.total)>0?(o(),M(L,{key:1,pagination:(I=e(a))==null?void 0:I.meta,onPageChange:B},null,8,["pagination"])):h("",!0)])}}},ie=z(ee,[["__scopeId","data-v-a502aa32"]]);export{ie 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.