PageSourceSearch

https://jhpiego.org/_nuxt/DAAT4cHs.js

js jhpiego.org collected 2026-09-24 17:10:34 UTC 4,948 bytes, 1 lines download raw bytes

1import{_ as J}from"./C7gZApvz.js";import{_ as K}from"./CdGrSfsC.js";import{_ as A}from"./DolIx7DB.js";import{d as q,c,e as o,h as a,t as i,k as f,F as y,i as g,v as S,f as s,H as P,m as j,E as Q,z as W,r as w,I as X,p as x,w as Z,l as d,T as ee,j as $}from"./Dv1iPJXt.js";import{f as te}from"./O11-YUeY.js";import{_ as se}from"./CYgIEGmB.js";import{_ as re}from"./GeqrJLQ2.js";import"./ld4GrQlu.js";import"./BUovhd0C.js";import"./J1fhuzAr.js";import"./D_Pzyved.js";import"./DjqqUiF9.js";import"./Djym0X7L.js";import"./B39VQO78.js";import"./DzGkX6xj.js";import"./5ZtUjSQr.js";const oe={class:"search-result-stories"},ae={class:"stories"},ne=["datetime"],le={class:"story-title"},ce={class:"excerpt"},ue=q({__name:"search-result-stories",props:{items:{}},setup(B){return(k,h)=>{const p=A;return o(),c("div",oe,[h[0]||(h[0]=a("h2",{class:"title"}," Related Stories ",-1)),a("div",ae,[i(P,{name:"fade"},{default:f(()=>[(o(!0),c(y,null,g(k.items,u=>(o(),c("div",{key:u.id||u.to,class:"story"},[i(p,{to:u.to,class:"link"},{default:f(()=>[a("time",{datetime:u.date,class:"date"},S(s(te)(u.date)),9,ne),a("h4",le,S(u.title),1),a("div",ce,S(u.text),1)]),_:2},1032,["to"])]))),128))]),_:1})])])}}}),ie=Object.assign(j(ue,[["__scopeId","data-v-d375053a"]]),{__name:"SearchResultStories"}),_e={class:"page-search"},de={class:"content-below"},pe={class:"search-results"},me={class:"search-title"},fe={class:"term"},he={key:0,class:"related-results"},ve={key:0,class:"areas-of-expertise"},xe=["innerHTML"],ke={key:1,class:"counties"},ye=["innerHTML"],ge={key:2,class:"experts"},Se=["innerHTML"],$e={key:0,class:"related-stories"},Ie={key:1,class:"resources"},Le={key:2,class:"no-results"},Re=q({__name:"search",setup(B){const k=Q(),h=W(),p=w(!0),u=w(k.query.q||""),{data:v,pending:be,refresh:N}=X(()=>`${h.settings.backendUrl}/wp-json/fuxt/v1/search?term=${u.value}&engine=default`,{immediate:!!u.value},"$c02gJMxSum"),O=x(()=>{var e,t;if(((e=v.value)==null?void 0:e.length)==0)return((t=h.settings)==null?void 0:t.searchHeaderImage)||null;for(const r of Array.isArray(v.value)?v.value:[])if(r.featuredImage&&r.featuredImage.srcSet)return r.featuredImage;return null}),n=x(()=>{var t;return(t=v.value)==null?void 0:t.reduce((r,m)=>{const _=V(m.type.toLowerCase(),"-");return r[_]||(r[_]=[]),r[_].push(m),r},{})}),F=x(()=>p.value?n.value.post.slice(0,3).map(e=>({title:e.title,text:e.excerpt,date:e.date,to:e.uri})):n.value.post.map(e=>({title:e.title,text:e.excerpt,date:e.date,to:e.uri}))),U=x(()=>n.value.resource.map(e=>{var t,r;return{title:e.title||"",text:e.content||"",to:((t=e==null?void 0:e.meta)==null?void 0:t.file)||"",technicalArea:((r=e==null?void 0:e.meta)==null?void 0:r.technicalArea)||""}})),D=x(()=>n.value.expert.map(e=>({title:e.title||"",to:(e==null?void 0:e.uri)||""}))),V=(e,t="-")=>e.split(t).map((r,m)=>m===0?r.toLowerCase():r.charAt(0).toUpperCase()+r.slice(1)).join("");return Z(()=>k.query.q,e=>{e!==u.value&&(u.value=e,N())}),(e,t)=>{var I,L,R,b,C,T,E,H,M;const r=J,m=K,_=A,Y=ie,z=se,G=re;return o(),c("section",_e,[i(r,{title:"Search Results",image:s(O),"match-text":"Search Results",scribble:"Yellow Underline 8"},null,8,["image"]),a("div",de,[i(m,{color:"--color-blue-6"}),a("div",pe,[a("div",me,[t[1]||(t[1]=a("h3",{class:"search"}," You searched for ",-1)),a("h4",fe,' "'+S(s(u))+'" ',1)])]),(I=s(n))!=null&&I.areaOfExpertise||(L=s(n))!=null&&L.country||(R=s(n))!=null&&R.expert?(o(),c("div",he,[(b=s(n))!=null&&b.areaOfExpertise?(o(),c("div",ve,[t[2]||(t[2]=a("h4",{class:"related-title"}," Related Areas of Expertise ",-1)),(o(!0),c(y,null,g((C=s(n))==null?void 0:C.areaOfExpertise,l=>(o(),$(_,{key:l.id,to:l.uri,class:"area"},{default:f(()=>[a("div",{class:"area-link",innerHTML:l.title},null,8,xe)]),_:2},1032,["to"]))),128))])):d("",!0),(T=s(n))!=null&&T.country?(o(),c("div",ke,[t[3]||(t[3]=a("h4",{class:"related-title"}," Related Countries ",-1)),(o(!0),c(y,null,g((E=s(n))==null?void 0:E.country,l=>(o(),$(_,{key:l.id,to:l.uri,class:"area"},{default:f(()=>[a("div",{class:"area-link",innerHTML:l.title},null,8,ye)]),_:2},1032,["to"]))),128))])):d("",!0),(H=s(n))!=null&&H.expert?(o(),c("div",ge,[t[4]||(t[4]=a("h4",{class:"related-title"}," Related Experts ",-1)),(o(!0),c(y,null,g(s(D),l=>(o(),$(_,{key:l.id,to:l.to,class:"area"},{default:f(()=>[a("div",{class:"area-link",innerHTML:l.title},null,8,Se)]),_:2},1032,["to"]))),128))])):d("",!0)])):d("",!0),i(ee,{name:"fade"},{default:f(()=>{var l;return[(l=s(n))!=null&&l.post?(o(),c("div",$e,[i(Y,{items:s(F)},null,8,["items"]),i(z,{class:"load-more-button",text:s(p)?"Load More":"Show Less",onClick:t[0]||(t[0]=Ce=>p.value=!s(p))},null,8,["text"])])):d("",!0)]}),_:1}),(M=s(n))!=null&&M.resource?(o(),c("div",Ie,[t[5]||(t[5]=a("h4",{class:"related-title resources"}," Related Resources ",-1)),i(G,{items:s(U)},null,8,["items"])])):d("",!0),s(v)?d("",!0):(o(),c("p",Le," No results found. "))])])}}}),ze=j(Re,[["__scopeId","data-v-40f672bc"]]);export{ze 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.