PageSourceSearch

https://www.homeand.co/_next/static/chunks/pages/help-advice/search-9893fdc87865cc1f.js

js homeand.co collected 2026-10-04 14:58:29 UTC 8,312 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[781],{187:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/help-advice/search",function(){return s(1137)}])},6571:function(e,t,s){"use strict";var _=s(5893),n=s(31),i=s(9714),r=s.n(i);t.Z=e=>{let{children:t,refEl:s}=e;return(0,_.jsx)(n.Z,{refEl:s||null,children:(0,_.jsx)("div",{className:r()["container-content"],children:t})})}},4814:function(e,t,s){"use strict";var _=s(5893),n=s(8840),i=s.n(n);t.Z=e=>{let{children:t}=e;return(0,_.jsxs)("div",{className:i()["sticky-content"],children:[(0,_.jsx)("div",{className:i()["sticky-content__left"],children:t[0]}),(0,_.jsx)("div",{className:i()["sticky-content__right"],children:t[1]})]})}},1137:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSG:function(){return j},default:function(){return search}});var _=s(5893),n=s(2581),i=s(2096),r=s.n(i),c=s(7013),a=s.n(c),l=s(1664),o=s.n(l),h=s(7771),u=s(5833),d=s(7294),m=s(31),p=s(6571),f=s(8346),x=s(1163),g=s(1715),y=s(4814),q=s(642),b=s(8968),search_Search=e=>{let{search_placeholder:t,suggested_links_title:s,suggestedLinks:n,your_search_results:i}=e,[c,l]=(0,d.useState)(""),[j,k]=(0,d.useState)([]),[v,N]=(0,d.useState)(0),[T,w]=(0,d.useState)(!1);(0,b.s)();let{t:S}=(0,q.Z)(),E=S("faq"),R=-1,F=(0,x.useRouter)(),Z=(0,g.Y)(F.locale),searchEndpoint=e=>"/api/search?q=".concat(e,"&lang=").concat(Z);var I=null;let C=(0,d.useCallback)(e=>{clearTimeout(I);let t=e.target.value;I=setTimeout(()=>{t.length?fetch(searchEndpoint(t)).then(e=>e.json()).then(e=>{let{search:t}=e;w(!1),k(t);let s=0;if(0!==t.length)for(let e=0;e<t.length;e++){let _=t[e].data;_.title&&0!==_.title.length&&s++}N(s)}):k([])},400),w(!0),l(t)},[]);return(0,_.jsxs)("div",{className:r().search,children:[(0,_.jsx)("div",{className:"".concat(r()["search-hero"]," ").concat(""!==c?r()["search-hero--fluid"]:null),children:(0,_.jsx)(m.Z,{children:(0,_.jsx)("div",{className:r()["search-hero__input-wrapper"],children:(0,_.jsxs)("div",{className:r()["search-hero__input-wrapper-inner"],children:[(0,_.jsx)("input",{className:r()["search-hero__input"],onChange:C,autoFocus:!0,placeholder:u.RichText.asText(t),type:"text",value:c}),""===c?(0,_.jsxs)("div",{className:r()["search-suggestions"],children:[(0,_.jsx)("p",{className:"".concat(r()["search-suggestions__title"]," ").concat(r().body),children:u.RichText.asText(s)}),(0,_.jsx)("div",{className:r()["search-suggestions-list"],children:n.map((e,t)=>{let{link:s}=e;return s.title?(R++,(0,_.jsxs)(o(),{href:(0,h.k)(s),className:"".concat(r()["search-suggestion-list__item"]," ").concat(r()["title-small"]),children:[u.RichText.asText(s.title)," ",t!==R-1?"/ ":""]},t)):null})})]}):(0,_.jsx)("div",{className:"".concat(r()["search-amount"]," ").concat(r().body),children:T?(0,_.jsxs)("p",{children:[S("global").loading,"..."]}):(0,_.jsx)(_.Fragment,{children:0===v?(0,_.jsxs)("div",{className:a()["faq-hero__list-empty"],children:[(0,_.jsx)("p",{children:E.noResultsFound}),(0,_.jsx)("div",{className:a()["faq-hero__list-empty__current"],children:c}),(0,_.jsx)("p",{children:E.noResultsTip})]}):(0,_.jsxs)("p",{children:[(0,_.jsx)("span",{children:v})," ",1===v?S("global").result:S("global").results]})})})]})})})}),(0,_.jsx)("div",{className:r()["search-results"],children:(0,_.jsx)(p.Z,{children:""!==c&&0!==v&&(0,_.jsxs)(y.Z,{children:[(0,_.jsx)("div",{children:(0,_.jsx)("h2",{className:r()["title-small"],children:u.RichText.asText(i)})}),(0,_.jsx)("div",{children:j.map((e,t)=>{let{data:s}=e;if(s.title)return(0,_.jsxs)("div",{className:r()["search-results__item"],children:[(0,_.jsxs)(o(),{href:"/"+e.type.split("_")[0]+"/"+e.uid,className:r()["search-results__item-link"],children:[(0,_.jsx)("p",{children:s.seoTitle?u.RichText.asText(s.seo_title):u.RichText.asText(s.title)}),(0,_.jsx)(f.Z,{})]}),s.seo_description&&(0,_.jsx)("p",{children:u.RichText.asText(s.seo_description)})]},t)})})]})})})]})},j=!0,search=e=>{let{doc:{data:t}}=e;return(0,_.jsx)(n.Z,{customPadding:!0,customFooter:!0,seoTitle:t.seo_title,seoDescription:t.seo_description,seoImage:t.seo_image,noIndexNoFollow:t?t.noindex_nofollow_tag:null,children:(0,_.jsx)(search_Search,{...t,suggestedLinks:t.suggested_links})})}},9714:function(e){e.exports={title:"container-content_title__llSbj",standard:"container-content_standard__uVQ2_","title-medium":"container-content_title-medium__177RI","title-medium--center":"container-content_title-medium--center__rJ9nb","title-small":"container-content_title-small__K5eD3","title-small--center":"container-content_title-small--center__PjBxD",body:"container-content_body__lZvOv","body--center":"container-content_body--center__ILaY_","module-subtitle":"container-content_module-subtitle__ev_Mk","module-subtitle--no-padding":"container-content_module-subtitle--no-padding__6fNh6","usp-title":"container-content_usp-title__nq0Xw",richtext:"container-content_richtext__GiA_5","container-content":"container-content_container-content__V4LkV"}},8840:function(e){e.exports={title:"sticky-content_title__O_m8n",standard:"sticky-content_standard__m_7zX","title-medium":"sticky-content_title-medium__8Egym","title-medium--center":"sticky-content_title-medium--center__HN4GI","title-small":"sticky-content_title-small__PhMHo","title-small--center":"sticky-content_title-small--center__soVjq",body:"sticky-content_body__eqtv1","body--center":"sticky-content_body--center__tiuwv","module-subtitle":"sticky-content_module-subtitle__t8KcP","module-subtitle--no-padding":"sticky-content_module-subtitle--no-padding__RtlFz","usp-title":"sticky-content_usp-title__HJIef",richtext:"sticky-content_richtext__WQsdt","sticky-content":"sticky-content_sticky-content__37XpS","sticky-content__left":"sticky-content_sticky-content__left__ozT20","sticky-content__right":"sticky-content_sticky-content__right__hFwoV"}},7013:function(e){e.exports={title:"faq-hero_title__mNbqn",standard:"faq-hero_standard__Ug8WZ","title-medium":"faq-hero_title-medium__9h3VG","title-medium--center":"faq-hero_title-medium--center__9kcKv","title-small":"faq-hero_title-small__YEqdk","title-small--center":"faq-hero_title-small--center__cvCq0",body:"faq-hero_body__hiAoJ","body--center":"faq-hero_body--center__3crAM","module-subtitle":"faq-hero_module-subtitle__GMlr7","module-subtitle--no-padding":"faq-hero_module-subtitle--no-padding__sQXB_","usp-title":"faq-hero_usp-title___TOOo",richtext:"faq-hero_richtext__v_IIX","faq-hero":"faq-hero_faq-hero__J21Wv","faq-hero__input-wrapper":"faq-hero_faq-hero__input-wrapper__cFaEO","faq-hero__input-wrapper-inner":"faq-hero_faq-hero__input-wrapper-inner__bSWa9","faq-hero__input":"faq-hero_faq-hero__input__IoEaz","faq-hero__input-close":"faq-hero_faq-hero__input-close__34mZu","faq-hero__list":"faq-hero_faq-hero__list__BhHub","faq-hero__list-cta":"faq-hero_faq-hero__list-cta__a_H8T","faq-hero__list-empty":"faq-hero_faq-hero__list-empty__zBAvF","faq-hero__list-empty__current":"faq-hero_faq-hero__list-empty__current__dd1dr"}},2096:function(e){e.exports={title:"search_title__2Ts1P",standard:"search_standard__FkCkc","title-medium":"search_title-medium__citB2","t
1itle-medium--center":"search_title-medium--center__y_5qB","title-small":"search_title-small__xd__u","title-small--center":"search_title-small--center__5WI5v",body:"search_body__chwbT","body--center":"search_body--center__HXF_S","module-subtitle":"search_module-subtitle__a4Mh9","module-subtitle--no-padding":"search_module-subtitle--no-padding__s1usf","usp-title":"search_usp-title__VD9hR",richtext:"search_richtext__rUoKE","search-hero":"search_search-hero__SD_5a","search-hero--fluid":"search_search-hero--fluid__CtNzI","search-hero__input-wrapper":"search_search-hero__input-wrapper__fpz6Y","search-hero__input-wrapper-inner":"search_search-hero__input-wrapper-inner__SljHH","search-hero__input":"search_search-hero__input__xsF5s","search-amount":"search_search-amount__Jvf_u","search-suggestions":"search_search-suggestions__C6ddC","search-suggestions__title":"search_search-suggestions__title__fNr4g","search-suggestion-list__item":"search_search-suggestion-list__item__LKxwx","search-results":"search_search-results__lA4HO","search-results__item":"search_search-results__item__85Pch","search-results__item-link":"search_search-results__item-link__vVceP"}}},function(e){e.O(0,[2581,9774,2888,179],function(){return e(e.s=187)}),_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.