PageSourceSearch

https://healthymale.org.au/_next/static/chunks/861.a961c3bc69d765fe.js

js healthymale.org.au collected 2026-10-02 12:51:25 UTC 11,263 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[861],{71931:function(e,t,r){r.d(t,{Nr:function(){return a}});var n=r(2265);function l(e,t){return e===t}function a(e,t,r){var a=r&&r.equalityFn||l,c=(0,n.useRef)(e),s=(0,n.useState)({})[1],o=function(e,t,r){var l=this,a=(0,n.useRef)(null),c=(0,n.useRef)(0),s=(0,n.useRef)(null),o=(0,n.useRef)([]),u=(0,n.useRef)(),i=(0,n.useRef)(),x=(0,n.useRef)(e),d=(0,n.useRef)(!0);x.current=e;var f="undefined"!=typeof window,m=!t&&0!==t&&f;if("function"!=typeof e)throw TypeError("Expected a function");t=+t||0;var h=!!(r=r||{}).leading,p=!("trailing"in r)||!!r.trailing,w="maxWait"in r,b="debounceOnServer"in r&&!!r.debounceOnServer,v=w?Math.max(+r.maxWait||0,t):null;return(0,n.useEffect)(function(){return d.current=!0,function(){d.current=!1}},[]),(0,n.useMemo)(function(){var e=function(e){var t=o.current,r=u.current;return o.current=u.current=null,c.current=e,i.current=x.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(s.current),s.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!d.current)return!1;var r=e-a.current;return!a.current||r>=t||r<0||w&&e-c.current>=v},j=function(t){return s.current=null,p&&o.current?e(t):(o.current=u.current=null,i.current)},y=function e(){var l=Date.now();if(n(l))return j(l);if(d.current){var s=t-(l-a.current);r(e,w?Math.min(s,v-(l-c.current)):s)}},g=function(){if(f||b){var x=Date.now(),m=n(x);if(o.current=[].slice.call(arguments),u.current=l,a.current=x,m){if(!s.current&&d.current)return c.current=a.current,r(y,t),h?e(a.current):i.current;if(w)return r(y,t),e(a.current)}return s.current||r(y,t),i.current}};return g.cancel=function(){s.current&&(m?cancelAnimationFrame(s.current):clearTimeout(s.current)),c.current=0,o.current=a.current=u.current=s.current=null},g.isPending=function(){return!!s.current},g.flush=function(){return s.current?j(Date.now()):i.current},g},[h,w,t,v,p,m,f,b])}((0,n.useCallback)(function(e){c.current=e,s({})},[s]),t,r),u=(0,n.useRef)(e);return a(u.current,e)||(o(e),u.current=e),[c.current,o]}},34943:function(e,t,r){r.d(t,{J:function(){return n}});let n=e=>{let{method:t,url:r,data:n,withCredentials:l,headers:a={},contentType:c="application/json"}=e;return{method:t,url:"".concat(r),data:n,withCredentials:l,headers:{"Content-Type":c,...a}}}},98432:function(e,t,r){r.d(t,{b:function(){return s}});var n=r(83464),l=r(2265);let a=n.Z.create({baseURL:"https://wp.healthymale.org.au"}),c=e=>new Promise(t=>setTimeout(t,e));a.interceptors.response.use(e=>e,async e=>{var t;let r=e.config;if((null===(t=e.response)||void 0===t?void 0:t.status)===429&&r){let e=r.__retryCount||0;if(e<5){r.__retryCount=e+1;let t=1e3*Math.pow(2,e);return await c(t+.3*Math.random()*t),a(r)}}return Promise.reject(e)});let s=(0,l.cache)(a)},44035:function(e,t,r){var n=r(57437),l=r(2265);t.Z=e=>{let{icon:t,variant:r="teal-icon",handleClick:a,svgIcon:c}=e;return(0,n.jsx)("button",{className:(()=>{switch(r){case"teal-icon":return"text-teal bg-[#D2ECEC] text-xl rounded-lg p-2";case"mustard-icon":return"text-teal bg-bg-beigelight text-xl rounded-lg p-2";case"darkteal-icon":return"bg-teal text-white text-xl rounded-lg p-2"}})(),onClick:a,children:t?(0,l.createElement)(t,{className:"button-icon m-auto"}):c})}},95438:function(e,t,r){var n=r(57437),l=r(2265);t.Z=e=>{let{id:t,label:r,variant:a="default",ficon:c,bicon:s,onClick:o,buttoncolor:u,frontIcon:i,backicon:x,textClass:d="line-clamp-1",disabled:f,borderColor:m="",textColor:h="",buttonHoverColor:p="",isProjectDownloadButton:w=!1,buttonClassOverride:b=""}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{id:t,className:"".concat((()=>{switch(a){case"purple":return"text-white w-full justify-center sm:w-fit text-base  bg-purple rounded-full px-7 py-3 flex flex-row space-x-2 my-auto hover:!bg-purpleDark";case"teal":return" text-white  w-full justify-center sm:w-fit text-base  bg-teal rounded-full px-7 py-3 flex flex-row space-x-2 my-auto hover:!bg-tealDark";case"teal-outline":return"text-teal w-full justify-center sm:w-fit text-base  rounded-full px-7 py-3 flex flex-row space-x-2 border border-teal my-auto hover:bg-teal hover:text-white";case"primary":return"text-text space-x-2 w-full  sm:w-fit  text-base rounded-full px-7 py-3 flex flex-row   border border-text my-auto justify-center hover:!bg-tealDark hover:!text-white ";case"underline":return m?"text-teal  border-b flex flex-row ".concat(m):"text-teal  border-b border-teal flex flex-row ";case"textunderline":return"text-text text-base font-normal underline flex flex-row line-clamp-1 ";case"whiteunderline":return"text-white text-sm sm:text-base font-normal underline flex flex-row";case"white":return"text-text text-base bg-white rounded-md py-2 px-4 hover:bg-teal hover:text-white text-left"}})()," ").concat(w?"hm-project-download-button":""," ").concat(b),onClick:o,style:{backgroundColor:"".concat(u)},disabled:f,children:[c?(0,l.createElement)(c,{className:"button-icon my-auto",color:h}):(0,n.jsx)("p",{className:"my-auto",style:{color:h},children:i}),(0,n.jsxs)("p",{className:d,style:{color:h},children:[" ",r]}),s?(0,l.createElement)(s,{className:"button-icon my-auto"}):(0,n.jsxs)("p",{className:"my-auto",style:{color:h},children:[" ",x," "]})]}),u&&w&&(0,n.jsx)("style",{children:"\n            button.hm-project-download-button {\n              background-color: ".concat(u?"".concat(u," !important"):void 0,";\n              border-color: ").concat(m?"".concat(m," !important"):void 0,";\n              border-width: 1px;\n            }\n            button.hm-project-download-button:hover {\n              background-color: ").concat(p?"".concat(p," !important"):void 0,"\n            }\n          ")})]})}},55826:function(e,t,r){var n=r(57437),l=r(95438),a=r(27648);t.Z=e=>{let{data:t,handleClick:r}=e;return(0,n.jsxs)("div",{className:"p-4 sm:p-6 flex flex-col space-y-4 text-text w-full bg-white rounded-lg",children:[(0,n.jsx)("p",{className:" underline text-lg",dangerouslySetInnerHTML:{__html:t.title||""}}),(0,n.jsx)("p",{className:"text-sm line-clamp-2",dangerouslySetInnerHTML:{__html:(null==t?void 0:t.excerpt)||""}}),(0,n.jsx)(a.default,{href:{pathname:t.link},children:(0,n.jsx)(l.Z,{label:"Read more",variant:"underline",onClick:r})})]})}},96617:function(e,t,r){var n=r(57437),l=r(2265),a=r(44035);t.Z=e=>{let{icons:t,variants:r,placeholder:c="SearchBar",onInputChange:s,value:o,handleClick:u}=e,[i,x]=(0,l.useState)("");return(0,n.jsxs)("span",{className:" border border-[#006068] rounded-lg flex flex-row w-full justify-between px-4 py-3 space-x-4 bg-white ",children:[(0,n.jsx)("input",{type:"text",placeholder:c,className:"text-text border-none focus:outline-none text-lg  px-1 py-1 w-full",value:o||i,onChange:e=>{let t=e.target.value||"";x(t),s&&s(t)}}),(0,n.jsxs)("span",{className:"flex flex-row space-x-4",children:[i?(0,n.jsx)(a.Z,{icon:t,variant:r,handleClick:()=>{x(""),s&&s("")}}):null,(0,n.jsx)("button",{onClick:u,children:(0,n.jsxs)("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M11 19C15.4183 19 19 15.4183 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19Z",stroke:"#006068",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M21.0004 21L16.6504 16.65",stroke:"#006068",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})})]})]})}},73558:function(e,t,r){r.d(t,{G:function(){return c},z:function(){return s}});var n=r(57437),l=r(2265);let a=(0,l.createContext)(void 0),c=()=>{let e=(0,l.useContext)(a);if(!e)throw Error("useInput must be used within an InputProvider");return e},s=e=>{let{children:t}=e,[r,c]=(0,l.useState)("");return(0,n.jsx)(a.Provider,{value:{Value:r,setValue:c},children:t})}},50861:function(e,t,r){r.r(t);var n=r(57437),l=r(98432),a=r(34943),c=r(95438),s=r(55826),o=r(96617),u=r(8177),i=r(73558),x=r(27648),d=r(2265),f=r(94295),m=r(1326),h=r(71931);t.default=e=>{let{handleclose:t}=e,{Value:r,setValue:p}=(0,i.G)(),{popular:w,symptom:b}=(0,u.b)(),[v,j]=(0,d.useState)([]),[y,g]=(0,d.useState)(""),[N]=(0,h.Nr)(y,
1600),[k,C]=(0,d.useState)(""),[_,S]=(0,d.useState)(""),[E,R]=(0,d.useState)(""),Z=async e=>{let{data:t,status:r}=await (0,l.b)((0,a.J)({method:"GET",url:"".concat(e&&"/wp-json/wp/v2/search?search=".concat(e,"&per_page=3")," ")}));200===r?j(t):j([])};(0,d.useEffect)(()=>{N?Z(N):j([])},[N]);let M=e=>{C(e.subtype)},T=e=>{S(e.post_type)},L=e=>{R(e.taxonomy)};return(0,n.jsxs)("div",{className:"px-6 py-6 sm:py-10 md:py-12 lg:py-16 xl:py-20 md:px-7 lg:px-8 xl:px-10 w-full sm:w-11/12 md:w-5/6 lg:w-3/4 xl:w-2/3 mx-auto flex flex-col space-y-10 h-full md:h-screen bg-[#EAF5F5]",children:[(0,n.jsxs)("div",{className:"flex flex-row justify-between align-middle",children:[(0,n.jsx)("p",{className:"text-xl md:text-2xl xl:text-3xl text-text font-medium",children:"Search"}),(0,n.jsxs)("span",{className:"flex flex-row  space-x-2 cursor-pointer align-middle items-center",onClick:t,children:[(0,n.jsx)("p",{className:"text-base text-text font-medium ",children:"Close"}),(0,n.jsx)("span",{className:"text-text bg-white rounded-md text-xl p-1.5 h-fit w-fit",children:(0,n.jsx)(m.$iT,{})})]})]}),(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(o.Z,{variants:"teal-icon",icons:m.$iT,placeholder:"Search conditions, symptoms and more...",onInputChange:e=>{g(e),p(e)}})}),(0,n.jsxs)("div",{className:"flex flex-col space-y-10",children:[0===v.length&&N?(0,n.jsxs)("p",{className:"text-xl md:text-2xl text-teal text-center",children:["Results not found for query ",(0,n.jsx)("span",{className:"font-bold",children:"'".concat(N,"'")})]}):"",v.length>0&&y?(0,n.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,n.jsxs)("div",{className:"flex flex-row w-full justify-between",children:[(0,n.jsx)("p",{className:"text-text  text-xl font-medium",children:"Most Relevant"}),(0,n.jsx)(x.default,{href:{pathname:"/search",query:{search:y}},className:"",children:(0,n.jsx)(c.Z,{label:"View all results",bicon:f.fNt,variant:"textunderline",onClick:()=>{}})})]}),(0,n.jsx)("div",{className:"overflow-y-scroll space-y-6 flex flex-col custom-scrollbar h-[100vh] sm:max-h-[50vh]",children:v.map((e,r)=>(0,n.jsx)(x.default,{href:e.link?e.link:e.url||"",onClick:t,children:(0,n.jsx)(s.Z,{data:e,handleClick:()=>M(e)},r)},r))})]}):(0,n.jsxs)("div",{className:"flex flex-col space-y-4 md:space-y-6",children:[(0,n.jsx)("p",{className:"text-text text-xl font-medium",children:"Popular topics"}),(0,n.jsx)("div",{className:"flex flex-row flex-wrap items-end",children:null==w?void 0:w.map((e,r)=>(0,n.jsx)(x.default,{href:{pathname:"/mens-health/".concat(e.post_name)},className:"me-2 mt-2 ",onClick:t,children:(0,n.jsx)(c.Z,{variant:"white",label:e.post_title,onClick:()=>T(e)},r)},r))}),(0,n.jsxs)("div",{className:"flex flex-col space-y-4 md:space-y-6",children:[(0,n.jsx)("p",{className:"text-text text-xl font-medium ",children:"Common symptoms"}),(0,n.jsx)("div",{className:"flex flex-row flex-wrap items-end",children:null==b?void 0:b.map((e,r)=>(0,n.jsx)(x.default,{href:{pathname:"/mens-health",query:{id:e.term_id}},className:"me-2 mt-2",onClick:t,children:(0,n.jsx)(c.Z,{variant:"white",label:e.name,onClick:()=>L(e)},r)},r))})]})]})]})]})}}}]);

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.