1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="b7073445-d068-460a-abbd-0db0f8d57fac",e._sentryDebugIdIdentifier="sentry-dbid-b7073445-d068-460a-abbd-0db0f8d57fac")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7786],{1251:e=>{e.exports={template:"searchResults_template__W7bit",resultsGrid:"searchResults_resultsGrid__wxPMg",refine:"searchResults_refine__bEFB9",refineTitle:"searchResults_refineTitle__UkUFa",showMore:"searchResults_showMore__qG_q_",item:"searchResults_item__N0Ac9",count:"searchResults_count__wQcRe",selectedItem:"searchResults_selectedItem__I0al3"}},5004:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/search/[...slug]",function(){return t(6374)}])},6374:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSG:()=>F,default:()=>G});var l=t(7876),r=t(852),n=t(5077),a=t(1941),c=t(4099),i=t(7077),u=t(9099),d=t.n(u),o=t(5912),h=t(6478),f=t(2988),m=t(7502),_=t(7706),x=t(6848),j=t(458),g=t(5126),R=t(3435),b=t.n(R),p=t(4587),w=t.n(p),N=t(7691),y=t.n(N),v=t(8230),E=t.n(v);let S=e=>{var s,t,r;let{result:n}=e,{cardImage:a,title:c,slug:i,cardDescription:u,externalUrl:d}=n,o={url:null!=(s=a.url)?s:"/search-no-image.png",alt:null!=(t=a.alt)?t:"No image available"},h=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:y().searchResultImg,children:(0,l.jsx)(w(),{src:o.url,alt:null!=(r=o.alt)?r:"",width:"319",height:"196"})}),(0,l.jsxs)("div",{className:y().searchResultText,children:[(0,l.jsx)("h3",{className:y().searchResultTitle,children:c}),(0,l.jsx)("p",{className:y().searchResultDetails,children:u})]})]});return d?(0,l.jsx)("a",{href:d,className:y().searchResult,children:h}):(0,l.jsx)(E(),{href:"/".concat(i),className:y().searchResult,children:h})};var I=t(2927),T=t(1251),k=t.n(T),C=t(6059),A=t(4232);let D=b()("ZIKLADOFCA","f4c1d65ca797d2f26b03cc4b422f18c9"),q=()=>{let e=(0,u.useRouter)().query.slug[0],s=(0,o.c)({singletonRouter:d()}),[t,r]=(0,A.useState)(!1),[n,a]=(0,A.useState)(0),[c,i]=(0,A.useState)(null),R=(0,A.useRef)([]),b=(0,A.useRef)(null),p=e=>"loading"!==e&&"stalled"!==e;return(0,A.useEffect)(()=>{let e=b.current;null!==e&&null!==t&&(document.documentElement.scrollTop=n,e.focus())},[t,n]),(0,A.useEffect)(()=>{e&&"object"==typeof window.dataLayer&&window.dataLayer.push({event:"view_search_results",search_term:e})},[e]),(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(_.G,{searchClient:D,indexName:I.ne,routing:{router:s},future:{preserveSharedStateOnUnmount:!0},children:(0,l.jsxs)("div",{className:k().template,children:[(0,l.jsx)(()=>{let{nbHits:e,page:s,query:t,hitsPerPage:r}=(0,f.J)(),{status:n}=(0,h.J)();return(0,l.jsx)(C.A,{large:!0,query:t,nbHits:e,displayString:p(n)?((e,s,t)=>{let l=e*s;return l>t&&(l=t),"Displaying ".concat(e*s-s+1," - ").concat(l)})(s+1,r,e):null,status:n})},{}),(0,l.jsx)(x.Z,{hitsPerPage:20,query:e}),(0,l.jsxs)("div",{className:k().resultsGrid,children:[(0,l.jsx)(()=>{let{items:e,createURL:s,refine:n,isShowingMore:u,toggleShowMore:d,canToggleShowMore:o}=(0,m.b)({attribute:"facet",limit:50,showMore:!0,showMoreLimit:100,sortBy:["name:asc"]});return(0,A.useEffect)(()=>{null!==c&&R.current[c]&&R.current[c].focus()},[e]),0===e.length?null:(0,l.jsxs)("div",{className:k().refine,children:[(0,l.jsx)("button",{className:k().refineTitle,onClick:function(){i(null),a(window?document.documentElement.scrollTop:0),r(!t)},"aria-expanded":t,"aria-label":"Search refinement options",ref:b,children:"Refine results"}),(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:"Refine results"})}),e.map((e,t)=>((e,t)=>(0,l.jsxs)("a",{ref:e=>R.current[t]=e,className:"\n ".concat(k().item,"\n ").concat(e.isRefined?k().selectedItem:"","\n "),href:s(e.value),onClick:s=>{s.preventDefault(),i(t),n(e.value)},"aria-current":e.isRefined,children:[(0,l.jsx)("span",{children:e.label}),(0,l.jsx)("span",{className:k().count,children:e.count})]},e.label))(e,t)),o&&(0,l.jsx)("button",{className:k().showMore,onClick:d,children:u?"- Show fewer refinements":"+ View all refinements"})]})},{style:{gridArea:"filters"}}),(0,l.jsx)("div",{style:{gridArea:"results"},children:(0,l.jsx)(j.f,{hitComponent:function(e){let{hit:s}=e,{status:t}=(0,h.J)();return p(t)&&(0,l.jsx)(S,{result:s})}})})]}),(0,l.jsx)(g.d,{padding:4,classNames:{noRefinementRoot:k().noRefinements},onClick:e=>{e.preventDefault(),"ais-Pagination-link"===e.target.className&&(i(null),window.scrollTo({top:0,left:0,behavior:"smooth"}),document.getElementsByClassName("ais-Hits-list")[0].querySelector("li").querySelector("a").focus())}})]})})})};var M=t(8198),P=t(5174),F=!0;let G=e=>{let{headerSubscription:s,globalSubscription:t}=e,u=(0,r.l)(s).data,d=(0,r.l)(t).data.global,{showAlertBanner:o}=(0,P.S)();return(0,A.useEffect)(()=>{document.documentElement.lang="en"},[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.A,{title:"Search results | Te Papa"}),o&&(0,l.jsx)(M.A,{...d.alertBanner[0]}),(0,l.jsx)(n.A,{content:u}),(0,l.jsx)("main",{children:(0,l.jsx)("div",{style:{backgroundColor:"#f9f9f2"},children:(0,l.jsx)(i.A,{children:(0,l.jsx)(q,{})})})}),(0,l.jsx)(a.A,{})]})}},7691:e=>{e.exports={searchResult:"searchResult_searchResult__ioVRQ",searchResultImg:"searchResult_searchResultImg__OZz2a",searchResultText:"searchResult_searchResultText__C9MUV"}}},e=>{e.O(0,[6593,7725,8449,7460,7225,6329,649,7689,5,5872,636,8792],()=>e(e.s=5004)),_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.