"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9050],{sept:function(e,t,a){a.d(t,{S:function(){return SocialLinkPreview}});var l=a("ubET"),n=a("q1tI"),r=a("Eso5"),i=a("8vDj"),o=a("I/35"),s=a("pOUU"),c=a("Hcm0"),d=a("rBCA"),h=a("IQVP"),p=a("990U"),m=a("elhQ"),u=a("vec8");let g=d.Z.div` .link-info-container { padding: 0.5rem 1rem; background: ${e=>e.color||"#f4faff"}; } .link-image-wrapper { position: relative; overflow: hidden; width: 100%; background-color: #000; padding-top: ${e=>{var t;return null!==(t=e.aspectPaddingTop)&&void 0!==t?t:e.isShort?"179.58%":"56.25%"}}; &.fetching { background: lightgray; } .loading-spinner { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .link-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: ${e=>{var t;return null!==(t=e.posterFit)&&void 0!==t?t:"cover"}}; object-position: center; } } a { text-decoration: none; } &[data-is-marrybaby='true'] { overflow: hidden; border-radius: 1rem; } `,useExternalScript=({url:e,onLoad:t,onError:a})=>{let[l,r]=(0,n.useState)(e?"loading":"idle");return(0,n.useEffect)(()=>{if(!e){r("idle");return}let l=document.querySelector(`script[src="${e}"]`),handleLoadScript=()=>{r("ready"),null==t||t()},handleErrorScript=()=>{r("error"),null==a||a()};return l||((l=document.createElement("script")).type="application/javascript",l.src=e,l.async=!0,document.body.appendChild(l),l.addEventListener("load",handleLoadScript),l.addEventListener("error",handleErrorScript)),l.addEventListener("load",handleLoadScript),l.addEventListener("error",handleErrorScript),()=>{l.removeEventListener("load",handleLoadScript),l.removeEventListener("error",handleErrorScript)}},[e]),l},YoutubePlyr=({id:e,autoplay:t,posterFit:a="cover"})=>{let l=(0,n.useRef)(null),i=useExternalScript({url:"https://cdn.plyr.io/3.7.8/plyr.js"});return(0,n.useEffect)(()=>{var e;if(!document.getElementById("hhg-plyr-player")){let e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href="https://cdn.plyr.io/3.7.8/plyr.css",e.id="hhg-plyr-player",document.head.appendChild(e)}let a="ready"===i||"undefined"!=typeof Plyr;if(!a)return;let n=null===(e=l.current)||void 0===e?void 0:e.querySelector('[data-id="player"]');if(!n)return;let r=new Plyr(n,{autoplay:t,muted:!0});return()=>{r.destroy()}},[i,t,e]),n.createElement(r.x,{ref:l,sx:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"#000","&, & > div":{width:"100%",height:"100%"},"& .plyr":{width:"100%",height:"100%",maxWidth:"none"},"& .plyr__video-wrapper":{height:"100%",width:"100%"},"& .plyr__video-embed":{paddingBottom:"0 !important",height:"100% !important",position:"relative"},"& .plyr__video-embed iframe":{position:"absolute",top:0,left:0,width:"100%",height:"100%"},"& .plyr__poster":{backgroundSize:"cover"===a?"cover !important":"contain !important",backgroundPosition:"center !important",backgroundRepeat:"no-repeat",width:"100% !important",height:"100% !important",top:0,left:0}}},n.createElement("div",{key:e,"data-id":"player",className:"plyr__video-embed"},n.createElement("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${e}?mute=1&enablejsapi=1&rel=0`,allow:"autoplay; fullscreen",allowFullScreen:!0,title:"YouTube preview",frameBorder:"0"})))},SocialLinkPreview=({url:e,image:t,className:a,style:r,baseUrl:d="",autoPlay:v=!0,forceType:b,detectTypeFromUrl:f=!1,ratio:x,posterFit:E="cover",onPushStatus:y})=>{let{data:{locale:w}}=(0,n.useContext)(c.T),[k,C]=(0,n.useState)(null);(0,n.useEffect)(()=>{(0,l._)(void 0,void 0,void 0,function*(){if(!t){if(!e)return C(null);C(e=>Object.assign(Object.assign({},e),{isFetching:!0})),(0,c.c)((0,c.f)(h.yy.FETCH_PREVIEW,{_locale:w},void 0,d),"POST",{data:{link:e},headers:{"Content-Type":"application/json"}},!!d).then(t=>{var a,l;C({url:e,image:(null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.image)||(null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.logo)})}).catch(()=>{C(null)})}})},[e,t]);let N=t||(null==k?void 0:k.image),S=(null==k?void 0:k.url)||e,T=(0,n.useMemo)(()=>(0,m.y)(S),[S]),z=(0,n.useMemo)(()=>S.includes("facebook.com")||S.includes("fb.watch"),[S]),$=(0,n.useMemo)(()=>(0,m.i)(S),[S]),A=(0,n.useMemo)(()=>!!(T||z),[z,T]),B=(0,n.useMemo)(()=>b===s.V.SHORTS||b!==s.V.VIDEO&&!!f&&$,[f,b,$]),P=(0,n.useMemo)(()=>x?function(e){let t=e.trim().match(/^(\d+(?:\.\d+)?)\s*:\s*(\d+(?:\.\d+)?)$/);if(!t)return;let a=Number(t[1]),l=Number(t[2]);if(Number.isFinite(a)&&Number.isFinite(l)&&!(a<=0)&&!(l<=0))return`${l/a*100}%`}(x):void 0,[x]),F=(0,n.useRef)(null),j=(0,n.useRef)(0),D=(0,n.useRef)(0),[I,O]=(0,n.useState)(!1),M=(0,n.useCallback)(e=>{var t;let a=null===(t=F.current)||void 0===t?void 0:t.getBoundingClientRect();if(!(null==a?void 0:a.width))return;let l=Math.floor(a.width),n=Math.floor(a.height),r=!1;e?((!j.current||Math.abs((j.current-l)/a.width)>.2)&&(j.current=l,r=!0),(!D.current||Math.abs((D.current-n)/(a.height||1))>.2)&&(D.current=n,r=!0)):(l!==j.current||n!==D.current)&&(j.current=l,D.current=n,r=!0),r&&O(e=>!e)},[]);(0,n.useLayoutEffect)(()=>{M(!1)},[P,x,B,S,M]),(0,n.useEffect)(()=>{let handleResize=()=>M(!0);return handleResize(),window.addEventListener("resize",handleResize,{passive:!0}),()=>{window.removeEventListener("resize",handleResize)}},[M]),(0,n.useEffect)(()=>{(null==k?void 0:k.image)&&(null==k?void 0:k.url)&&(null==y||y(!0))},[k]);let _=(0,i.rZ)();return n.createElement(g,{className:`${a} no-replace-click`,style:r,color:_.colors[_.primaryColor][0],isShort:B,aspectPaddingTop:P,posterFit:E},A&&(!t||$)?n.createElement("div",{ref:F,className:"link-image-wrapper"},T?n.createElement(YoutubePlyr,{key:`${T}-${null!=x?x:"auto"}`,id:T,autoplay:v,isShort:B,ratio:x,posterFit:E}):z?n.createElement("iframe",{key:String(I),src:`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(S)}&autoplay=${v?1:0}&show_text=false&t=0&width=${j.current}&height=${D.current}`,style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:D.current,width:j.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share",loading:"lazy"}):null):n.createElement("a",{href:S,target:"_blank",rel:"noreferrer"},n.createElement("div",{className:`link-image-wrapper ${(null==k?void 0:k.isFetching)?"fetching":""}`},(null==k?void 0:k.isFetching)?n.createElement(u.L,{className:"loading-spinner"}):n.createElement(o.I,{className:"link-image",src:N||p.a,backupSrc:p.a,alt:S}))))}},DSg0:function(e,t,a){a.d(t,{T:function(){return Text}});var l=a("ubET"),n=a("q1tI"),r=a("lhAG");let Text=e=>{var{size:t="base",type:a="regular"}=e,i=(0,l.a)(e,["size","type"]);return n.createElement(r.T,Object.assign({size:t,weight:"caption"===a?"bold":a,"data-size":t,"data-type":a,"data-word-wrap":i.wordWrap,"data-is-uppercase":i.isUppercase},i))}},usMy:function(e,t,a){a.d(t,{C:function(){return r},F:function(){return i},G:function(){return GlobalTextStyleNew},T:function(){return TemplateProvider},a:function(){return c},u:function(){return useTemplateVariant}});var l,n,r,i,o=a("mYVa"),s=a("q1tI");(l=r||(r={})).LEADGEN="leadgen",l.NONE="none",(n=i||(i={}))[n.regular=400]="regular",n[n.halfBold=500]="halfBold",n[n.semiBold=600]="semiBold",n[n.bold=700]="bold";let c={[r.NONE]:{fontSize:{base:[(0,o.h)(16),(0,o.h)(16)],lg:[(0,o.h)(18),(0,o.h)(16)],md:[(0,o.h)(18),(0,o.h)(16)],sm:[(0,o.h)(16),(0,o.h)(14)],xs:[(0,o.h)(14),(0,o.h)(12)],s1:[(0,o.h)(22),(0,o.h)(18)],s2:[(0,o.h)(18),(0,o.h)(16)],s3:[(0,o.h)(16),(0,o.h)(14)],s4:[(0,o.h)(14),(0,o.h)(12)],s5:[(0,o.h)(12),(0,o.h)(12)],p1:[(0,o.h)(18),(0,o.h)(16)],p2:[(0,o.h)(16),(0,o.h)(16)],p3:[(0,o.h)(16),(0,o.h)(14)],p4:[(0,o.h)(14),(0,o.h)(12)],p5:[(0,o.h)(12),(0,o.h)(12)],c1:[(0,o.h)(16),(0,o.h)(14)],c2:[(0,o.h)(14),(0,o.h)(12)],n1:[(0,o.h)(12),(0,o.h)(12)],label1:[(0,o.h)(14),(0,o.h)(14)],label2:[(0,o.h)(12),(0,o.h)(12)],h1:[(0,o.h)(40),(0,o.h)(26)],h2:[(0,o.h)(32),(0,o.h)(24)],h3:[(0,o.h)(26),(0,o.h)(20)],h4:[(0,o.h)(22),(0,o.h)(18)],h5:[(0,o.h)(18),(0,o.h)(16)],h5New:[(0,o.h)(20),(0,o.h)(18)],h6:[(0,o.h)(16),(0,o.h)(14)],title1:[(0,o.h)(17),(0,o.h)(17)],title2:[(0,o.h)(15),(0,o.h)(15)],body2:[(0,o.h)(15),(0,o.h)(15)]},lineHeight:{base:[(0,o.h)(24),(0,o.h)(24)],lg:[(0,o.h)(32),(0,o.h)(28)],md:[(0,o.h)(32),(0,o.h)(28)],sm:[(0,o.h)(24),(0,o.h)(22)],xs:[(0,o.h)(24),(0,o.h)(18)],s1:[(0,o.h)(32),(0,o.h)(26)],s2:[(0,o.h)(28),(0,o.h)(24)],s3:[(0,o.h)(24),(0,o.h)(24)],s4:[(0,o.h)(22),(0,o.h)(18)],s5:[(0,o.h)(18),(0,o.h)(18)],p1:[(0,o.h)(28),(0,o.h)(28)],p2:[(0,o.h)(24),(0,o.h)(24)],p3:[(0,o.h)(24),(0,o.h)(22)],p4:[(0,o.h)(22),(0,o.h)(18)],c1:[(0,o.h)(24),(0,o.h)(22)],c2:[(0,o.h)(22),(0,o.h)(18)],n1:[(0,o.h)(18),(0,o.h)(18)],label1:[(0,o.h)(22),(0,o.h)(22)],label2:[(0,o.h)(18),(0,o.h)(18)],h1:[(0,o.h)(52),(0,o.h)(34)],h2:[(0,o.h)(42),(0,o.h)(32)],h3:[(0,o.h)(36),(0,o.h)(26)],h4:[(0,o.h)(32),(0,o.h)(26)],h5:[(0,o.h)(28),(0,o.h)(24)],h5New:[(0,o.h)(28),(0,o.h)(24)],h6:[(0,o.h)(24),(0,o.h)(22)],title1:[(0,o.h)(24),(0,o.h)(24)],title2:[(0,o.h)(24),(0,o.h)(24)],body2:[(0,o.h)(24),(0,o.h)(24)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.2,-.2],p2:[0,-.2],p3:[0,-.2],p4:[-.2,0],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.8,-.7],h4:[-.6,-.6],h5:[-.2,-.2],h5New:[-.4,-.4],h6:[0,-.2],title1:[-.4,-.4],title2:[-.3,-.3],body2:[-.3,-.3]},fontWeightBySize:{s1:i.semiBold,s2:i.semiBold,s3:i.semiBold,s4:i.semiBold,h1:i.bold,h2:i.bold,h3:i.bold,h4:i.bold,h5:i.bold,h5New:i.semiBold,h6:i.bold},fontWeight:i},[r.LEADGEN]:{fontSize:{base:[(0,o.h)(16),(0,o.h)(16)],lg:[(0,o.h)(18),(0,o.h)(16)],md:[(0,o.h)(18),(0,o.h)(16)],sm:[(0,o.h)(16),(0,o.h)(14)],xs:[(0,o.h)(14),(0,o.h)(12)],s1:[(0,o.h)(22),(0,o.h)(18)],s2:[(0,o.h)(18),(0,o.h)(16)],s3:[(0,o.h)(16),(0,o.h)(14)],s4:[(0,o.h)(14),(0,o.h)(12)],s5:[(0,o.h)(12),(0,o.h)(12)],p1:[(0,o.h)(17),(0,o.h)(17)],p2:[(0,o.h)(15),(0,o.h)(15)],p3:[(0,o.h)(13),(0,o.h)(13)],p4:[(0,o.h)(14),(0,o.h)(12)],p5:[(0,o.h)(12),(0,o.h)(12)],c1:[(0,o.h)(12),(0,o.h)(12)],c2:[(0,o.h)(11),(0,o.h)(11)],n1:[(0,o.h)(12),(0,o.h)(12)],label1:[(0,o.h)(14),(0,o.h)(14)],label2:[(0,o.h)(12),(0,o.h)(12)],h1:[(0,o.h)(40),(0,o.h)(26)],h2:[(0,o.h)(32),(0,o.h)(24)],h3:[(0,o.h)(26),(0,o.h)(22)],h4:[(0,o.h)(22),(0,o.h)(20)],h5:[(0,o.h)(18),(0,o.h)(16)],h5New:[(0,o.h)(20),(0,o.h)(18)],h6:[(0,o.h)(16),(0,o.h)(14)],title1:[(0,o.h)(17),(0,o.h)(17)],title2:[(0,o.h)(15),(0,o.h)(15)],body2:[(0,o.h)(15),(0,o.h)(15)],overline:[(0,o.h)(11),(0,o.h)(11)],subText:[(0,o.h)(10),(0,o.h)(10)]},lineHeight:{base:[(0,o.h)(24),(0,o.h)(24)],lg:[(0,o.h)(32),(0,o.h)(28)],md:[(0,o.h)(32),(0,o.h)(28)],sm:[(0,o.h)(24),(0,o.h)(22)],xs:[(0,o.h)(24),(0,o.h)(18)],s1:[(0,o.h)(32),(0,o.h)(26)],s2:[(0,o.h)(28),(0,o.h)(24)],s3:[(0,o.h)(24),(0,o.h)(24)],s4:[(0,o.h)(22),(0,o.h)(18)],s5:[(0,o.h)(18),(0,o.h)(18)],p1:[(0,o.h)(28),(0,o.h)(28)],p2:[(0,o.h)(24),(0,o.h)(24)],p3:[(0,o.h)(20),(0,o.h)(20)],p4:[(0,o.h)(22),(0,o.h)(18)],c1:[(0,o.h)(16),(0,o.h)(16)],c2:[(0,o.h)(22),(0,o.h)(18)],n1:[(0,o.h)(18),(0,o.h)(18)],label1:[(0,o.h)(22),(0,o.h)(22)],label2:[(0,o.h)(18),(0,o.h)(18)],h1:[(0,o.h)(48),(0,o.h)(34)],h2:[(0,o.h)(40),(0,o.h)(32)],h3:[(0,o.h)(32),(0,o.h)(32)],h4:[(0,o.h)(32),(0,o.h)(28)],h5:[(0,o.h)(28),(0,o.h)(24)],h5New:[(0,o.h)(28),(0,o.h)(24)],h6:[(0,o.h)(24),(0,o.h)(22)],title1:[(0,o.h)(24),(0,o.h)(24)],title2:[(0,o.h)(24),(0,o.h)(24)],body2:[(0,o.h)(24),(0,o.h)(24)],overline:[(0,o.h)(12),(0,o.h)(12)],subText:[(0,o.h)(12),(0,o.h)(12)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.4,-.4],p2:[-.3,-.3],p3:[-.3,-.3],p4:[-.2,0],c1:[-.2,-.2],c2:[-.2,-.2],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.6,-.6],h4:[-.6,-.4],h5:[-.2,-.2],h5New:[-.4,-.4],h6:[0,-.2],n1:[-.2,-.2],title1:[-.4,-.4],title2:[-.3,-.3],body2:[-.3,-.3],overline:[-.2,-.2],subText:[-.2,-.2]},fontWeightBySize:{s1:i.semiBold,s2:i.semiBold,s3:i.semiBold,s4:i.semiBold,h1:i.bold,h2:i.bold,h3:i.bold,h4:i.bold,h5:i.bold,h5New:i.semiBold,h6:i.bold},fontWeight:i}},GlobalTextStyleNew=e=>({[r.LEADGEN]:{h1:{fontSize:(0,o.h)(40),lineHeight:(0,o.h)(48),letterSpacing:"-1.2px",[e.fn.smallerThan("sm")]:{fontSize:(0,o.h)(26),lineHeight:(0,o.h)(32),letterSpacing:"-0.6px"}},h2:{fontSize:(0,o.h)(32),lineHeight:(0,o.h)(40),letterSpacing:"-1px",[e.fn.smallerThan("sm")]:{fontSize:(0,o.h)(20),lineHeight:(0,o.h)(28),letterSpacing:"-0.4px"}},h3:{fontSize:(0,o.h)(26),lineHeight:(0,o.h)(32),letterSpacing:"-0.6px",[e.fn.smallerThan("sm")]:{fontSize:(0,o.h)(20),lineHeight:(0,o.h)(28),letterSpacing:"-0.4px"}},p1:{fontSize:(0,o.h)(17),lineHeight:(0,o.h)(28),letterSpacing:"-0.4px"},p2:{fontSize:(0,o.h)(15),lineHeight:(0,o.h)(24),letterSpacing:"-0.3px"}}}),d=(0,s.createContext)(r.NONE),TemplateProvider=({variant:e=r.NONE,children:t})=>s.createElement(d.Provider,{value:e},t),useTemplateVariant=()=>(0,s.useContext)(d)},"2iOd":function(e,t,a){a.d(t,{B:function(){return BabyPoopForm}});var l=a("ubET"),n=a("q1tI"),r=a("/npG"),i=a("mYVa"),o=a("Eso5"),s=a("iuhU"),c=a("lhAG"),d=a("krdG"),h=a("RF7b"),p=a("yoWs"),m=a("GyZF"),u=(0,r.k)((e,{hasOnClickFn:t})=>({root:{position:"relative",display:"flex",flexDirection:"column",gap:(0,i.h)(16)},sponsorBox:{display:"flex",gap:(0,i.h)(12),alignItems:"center",backgroundColor:e.colors.neutral[0],border:`1px solid ${e.colors.neutral[1]}`,borderRadius:(0,i.h)(4),padding:"4px 12px",alignSelf:"flex-start"},sponsorLogo:{maxHeight:(0,i.h)(32)},btn:{minWidth:(0,i.h)(180),[e.fn.largerThan("sm")]:{alignSelf:"flex-end"},visibility:t?"visible":"hidden"}}));let BabyPoopForm=e=>{var{babyPoopPage:t,onClickFindOut:a,currentUrl:r,sponsorLogo:i,btnProps:g,styles:v,classNames:b}=e,f=(0,l.a)(e,["babyPoopPage","onClickFindOut","currentUrl","sponsorLogo","btnProps","styles","classNames"]);let{t:x}=(0,h.u)(),{classes:E}=u({hasOnClickFn:!!a},{name:"BabyPoopForm",styles:v,classNames:b}),{classes:y={}}=(0,n.useContext)(p.C);return n.createElement(m.H.FormRow,null,n.createElement(o.x,Object.assign({className:E.root},f),i&&n.createElement(o.x,{className:E.sponsorBox},n.createElement(c.T,{size:"p4"},x("common.sponsoredBy")),n.createElement("img",{loading:"lazy",src:i,alt:"sponsor",className:E.sponsorLogo})),n.createElement(c.T,{size:"p3",as:"div",className:"description",dangerouslySetInnerHTML:{__html:t.description}}),n.createElement(d.B,Object.assign({className:(0,s.default)(E.btn,y.submitBtn),onClick:a,dataEventCategory:"Health Tool",dataEventAction:"Baby Stool Inquiry",dataEventLabel:r},g),x("babyPoop.findOut"))))}},WbBJ:function(e,t,a){a.d(t,{C:function(){return CardAuthor},P:function(){return PopupExpert},a:function(){return PopupDoctor},b:function(){return PopupHospital},c:function(){return ProfileDetailModal},d:function(){return CardAuthor$1}});var l=a("q1tI"),n=a("Frvz"),r=a("daqB"),i=a("/npG"),o=a("Eso5"),s=a("SPK5"),c=a("mAfZ"),d=a("mYVa"),h=a("Wgwc"),p=a.n(h),m=a("QgiU"),u=a.n(m),g=a("RF7b"),v=a("nm4t"),b=a("Ga1d"),f=a("5auN"),x=a("ubET"),E=a("rRTB"),y=a("I/35"),w=a("x9hL"),k=a("Hcm0"),C=a("kqU0"),N=a("lhAG"),S=a("iBNF"),T=a("rBCA"),z=a("IQVP"),$=a("vec8"),A=a("VgLc"),B=a("PBoO"),P=a("xrdX");let MainText=({children:e,className:t=""})=>l.createElement("div",{className:`tMiOKib ${t}`},e),SubText=({children:e,className:t=""})=>l.createElement("div",{className:`uDcqD-2 ${t}`},e);var F={container:"sTU4T4I",info:"tCql9Je",avatarWrapper:"_3j7uYhH",avatarIcon:"PHABgoT"};let CardAuthor$1=({avatarProps:e,title:t,subTitle:a,children:n,className:r="",style:i,onAvatarClick:o,avatarIcon:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:h})=>l.createElement("div",{className:`${F.container} ${r}`,style:i},l.createElement("div",{className:F.avatarWrapper,onClick:o,"data-event-category":c,"data-event-action":d,"data-event-label":h},l.createElement(E.U,Object.assign({},e)),s&&l.createElement("div",{className:F.avatarIcon},s)),l.createElement("div",{className:`${F.info} ${r}`,style:{minHeight:`${(null==e?void 0:e.size)||40}px`}},n||l.createElement(l.Fragment,null,t&&l.createElement(MainText,null,t),a&&l.createElement(SubText,null,a))));CardAuthor$1.MainText=MainText,CardAuthor$1.SubText=SubText,CardAuthor$1.SubDivider=({className:e=""})=>l.createElement("span",{className:`m-HVXw1 ${e}`}),CardAuthor$1.Row=({children:e,className:t=""})=>l.createElement("div",{className:`dZWeHns ${t} row`},e),CardAuthor$1.ColLeft=({children:e,className:t=""})=>l.createElement("div",{className:`${t} col-left`},e),CardAuthor$1.ColRight=({children:e,className:t=""})=>l.createElement("div",{className:`${t} col-right`},e),CardAuthor$1.SubTextRow=e=>{var{children:t,className:a=""}=e,n=(0,x.a)(e,["children","className"]);return l.createElement("div",Object.assign({className:`pDlsows ${a}`},n),t)};var j=(0,i.k)(()=>({root:{verticalAlign:"bottom"}}));let D=(0,l.createContext)({}),AuthorBadgeItem=({styles:e,className:t,classNames:a})=>{let{role:n,siteType:r,title:i}=(0,l.useContext)(D),{cx:o,classes:s}=j(void 0,{name:"AuthorBadgeItem",styles:e,classNames:a});return n?l.createElement(b.A,{className:o(s.root,t),siteType:r,role:n,title:i}):null};var I=(0,i.k)(()=>({root:{}}));let O=T.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${S.r.colors.white}; border-radius: ${S.r.borderRadius}; box-shadow: 0px 0px 4px ${S.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${v.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${v.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${S.r.colors.primary50}; border-radius: ${S.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,M=T.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,_=T.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,L=T.Z.div` position: relative; z-index: 9; .specialty { display: flex; flex-wrap: wrap; justify-content: center; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; -webkit-line-clamp: 4; -webkit-box-orient: vertical; text-overflow: ellipsis; overflow: hidden; } `,H=T.Z.ul` padding-left: 18px; li { list-style-type: disc; } `;var R="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6 6 18M6 6l12 12'/%3e%3c/svg%3e",Z="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'%3e%3cpath fill='white' stroke='%23E4E8EC' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16'/%3e%3cpath fill='%23FF5331' d='M10.333 7.667V5H7.667v2.667H5v2.667h2.667V13h2.666v-2.666H13V7.667z'/%3e%3c/svg%3e";let PopupDoctor=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,doctorId:n,locale:r,isMobile:i,overwriteProfileProps:o,avatarFallback:s=w.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{var d,h,p;let{t:m}=(0,g.u)(),[u,v]=(0,l.useState)(null),[b,f]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(e&&n&&String(null==u?void 0:u.id)!==String(n)){f(!0);try{v(null),(0,k.c)((0,k.b)(z.tC.GET_DOCTOR_INFO,{doctorId:n,website_url:k.m[r]}),"get").then(e=>{v(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),o))})}catch(e){console.error(e)}f(!1)}},[e,n,null==u?void 0:u.id]);let x=(null==u?void 0:u.experiences)||[],E=(null==u?void 0:u.specialties)||[],T=E.map(e=>(null==e?void 0:e.name)||e).join(" • "),A=x.map(e=>{try{return JSON.parse(e.description)}catch(t){return e.description}}).filter(e=>e.content),renderExperienceText=e=>(null==e?void 0:e.year)?`${e.year} ${null==e?void 0:e.content}`:(null==e?void 0:e.content)?e.content:"string"==typeof e?e:"";return l.createElement(l.Fragment,null,l.createElement(O,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},b||!u?l.createElement($.L,null):l.createElement("div",{className:"popup-content"},l.createElement("div",{className:"close-button",onClick:t},l.createElement("img",{src:R,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),l.createElement("div",{className:"main-info"},l.createElement("div",{className:"border-banner"}),l.createElement("div",{className:"avatar-title"},l.createElement(_,null,l.createElement("div",{className:"image-container"},l.createElement("div",{style:{position:"relative"}},l.createElement(y.I,{src:null==u?void 0:u.avatar,backupSrc:s,className:"profile-image",alt:"avatar"}),l.createElement("img",{className:"badge-avatar",src:Z,alt:"badge",loading:"lazy"})))),l.createElement(L,null,l.createElement(N.T,{size:"s3",weight:"semiBold",className:"full-name"},null==u?void 0:u.name),l.createElement("div",{className:"specialty"},T&&l.createElement(l.Fragment,null,l.createElement(N.T,{size:"p4",color:S.r.colors.gray800},T," • ")),l.createElement("a",{href:(0,k.n)({id:null===(d=null==u?void 0:u.organization)||void 0===d?void 0:d.id,name:null===(h=null==u?void 0:u.organization)||void 0===h?void 0:h.name,slug:null===(p=null==u?void 0:u.organization)||void 0===p?void 0:p.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},l.createElement(N.T,{size:"p4",className:"organisation",color:S.r.colors.gray800,style:{textDecoration:"underline"}},null==u?void 0:u.organization.name))))),!i&&l.createElement("div",{className:"btn-wrapper"},l.createElement("a",{href:(0,k.o)({name:u.name,id:u.id,locale:r})},l.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},m("careBooking.bookAnAppointment"))))),A&&l.createElement(L,null,l.createElement("div",{className:"experience"},l.createElement(N.T,{weight:"bold",size:"s3",color:S.r.colors.gray800,style:{paddingBottom:16}},m("expert.content.description").toUpperCase()),l.createElement(H,null,A.map((e,t)=>l.createElement("li",{key:t},l.createElement(N.T,{size:"p2"},renderExperienceText(e))))),i?l.createElement("div",{className:"btn-wrapper"},l.createElement("a",{href:(0,k.o)({name:u.name,id:u.id,locale:r})},l.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},m("careBooking.bookAnAppointment")))):l.createElement("a",{href:(0,k.o)({name:u.name,id:u.id,locale:r})},l.createElement(N.T,{size:"s4",color:"#2D87F3",style:{paddingTop:24},"data-event-category":c,"data-event-action":"See Full Doctor Profile","data-event-label":(0,k.l)(r)+(0,k.o)({name:u.name,id:u.id,locale:r})},m("home.seeExpert"))))))),l.createElement(M,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},U=T.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${S.r.colors.white}; border-radius: ${S.r.borderRadius}; box-shadow: 0px 0px 4px ${S.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${v.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${v.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${S.r.colors.primary50}; border-radius: ${S.r.borderRadius}; .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,G=T.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,q=T.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,V=T.Z.div` position: relative; z-index: 9; .specialty { display: flex; flex-wrap: wrap; justify-content: center; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; -webkit-line-clamp: 4; -webkit-box-orient: vertical; text-overflow: ellipsis; overflow: hidden; } `,W=T.Z.div` display: flex; margin-top: 8px; .bullet-point { width: 24px; height: 24px; } `;var Y="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%2345A4FF' d='M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12'/%3e%3cpath fill='%232D87F3' d='M24 12a12 12 0 0 0-.128-1.758l-5.077-5.077L5.041 18.958l4.858 4.858c.682.12 1.384.184 2.1.184 6.628 0 12-5.373 12-12Z'/%3e%3cpath fill='white' d='M9.014 17.824 5.04 18.959l1.135-3.973 2.368.47z'/%3e%3cpath fill='%23F7F9FC' d='M8.544 15.456 5.041 18.96l3.972-1.135z'/%3e%3cpath fill='%23E4E8EC' d='M6.467 18.552 5.45 17.533l-.41 1.427 1.426-.407Z'/%3e%3cpath fill='%23D2D6DC' d='m5.957 18.043-.916.916 1.426-.407z'/%3e%3cpath fill='%23FFD658' d='m15.828 5.331 2.837 2.837-9.651 9.652-2.838-2.837z'/%3e%3cpath fill='%23FFC326' d='m7.594 16.404 9.651-9.651 1.419 1.418-9.652 9.652z'/%3e%3cpath fill='%23FF5331' d='m18.312 8.525-2.837-2.838 1.123-1.123c.44-.44 1.154-.44 1.595 0l1.243 1.243c.44.44.44 1.154 0 1.594z'/%3e%3cpath fill='%23F44D2C' d='m18.816 5.186-1.921 1.92 1.418 1.419 1.124-1.124c.44-.44.44-1.154 0-1.594l-.622-.621Z'/%3e%3c/svg%3e";let Q={author:Y,edtior:Y,expert:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='12' fill='%23FFCB37'/%3e%3ccircle cx='12' cy='12' r='10.5' fill='%23FE921D'/%3e%3cpath fill='white' d='M11.443 5.137a.6.6 0 0 1 1.114 0l1.436 3.577a.6.6 0 0 0 .516.375l3.846.26a.6.6 0 0 1 .344 1.06l-2.958 2.471a.6.6 0 0 0-.197.607l.94 3.738a.6.6 0 0 1-.9.655l-3.265-2.05a.6.6 0 0 0-.638 0l-3.265 2.05a.6.6 0 0 1-.9-.655l.94-3.738a.6.6 0 0 0-.198-.607L5.3 10.41a.6.6 0 0 1 .344-1.06l3.846-.26a.6.6 0 0 0 .517-.375z'/%3e%3c/svg%3e","fact-check":"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath fill='%2300C076' d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m11.946 5.466-5.28 4.8-2.4-2.182'/%3e%3c/svg%3e",medical:Z},PopupExpert=({trackingCategory:e="Together",locale:t,isOpen:a=!0,onClose:n,enableAnimation:r=!0,expertId:i,overwriteProfileProps:o,avatarFallback:s=w.C.getAssetPath("avatar.jpg")})=>{let{t:c}=(0,g.u)(),[d,h]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{if(a&&i&&String(null==d?void 0:d.user_id)!==String(i)){m(!0);try{h(null),(0,k.c)((0,k.g)(z.D9.GET_EXPERT_BY_ID,{id:i}),"get").then(e=>{h(Object.assign(Object.assign({},null==e?void 0:e.data),o))})}catch(e){console.error(e)}m(!1)}},[a,i,null==d?void 0:d.user_id]),l.createElement(l.Fragment,null,l.createElement(U,{"data-open":a,"data-animation":r,onClick:e=>e.stopPropagation()},p||!d?l.createElement($.L,null):l.createElement("div",{className:"popup-content"},l.createElement("div",{className:"close-button",onClick:n},l.createElement("img",{src:R,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),l.createElement("div",{className:"main-info"},l.createElement("div",{className:"border-banner"}),l.createElement("div",{className:"avatar-title"},l.createElement(q,null,l.createElement("div",{className:"image-container"},l.createElement("div",{style:{position:"relative"}},l.createElement(y.I,{src:null==d?void 0:d.avatar,className:"profile-image",alt:"avatar",backupSrc:s}),l.createElement("img",{className:"badge-avatar",src:Q[null==d?void 0:d.role],alt:"badge",loading:"lazy"})))),l.createElement(V,null,l.createElement(N.T,{size:"s3",className:"full-name",weight:"semiBold"},null==d?void 0:d.display_name),l.createElement("div",null,l.createElement(N.T,{size:"p4",color:S.r.colors.gray800},null==d?void 0:d.specialty," • "),l.createElement("a",{href:null==d?void 0:d.organisation_url,className:"organisation",target:"_blank",rel:"noreferrer"},l.createElement(N.T,{size:"p4",className:"organisation",color:S.r.colors.gray800,style:{textDecoration:"underline"}},null==d?void 0:d.organisation)))))),l.createElement(V,null,l.createElement("div",{className:"experience"},l.createElement(N.T,{weight:"bold",size:"p4",color:S.r.colors.gray800,style:{paddingBottom:16}},c("expert.content.description").toUpperCase()),l.createElement("div",{className:"list-items"},null!=d&&!!d.experiences&&d.experiences.filter(e=>!!(e&&(e.title||e.organization))).slice(0,3).map((e,t)=>l.createElement(W,{key:t},l.createElement("img",{className:"bullet-point",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='2' fill='%232D87F3'/%3e%3c/svg%3e",alt:"point",loading:"lazy"}),l.createElement("div",{className:"text-contain"},l.createElement(A.H,{tag:"h6",color:S.r.colors.gray800},null==e?void 0:e.title),l.createElement(N.T,{size:"p2",color:S.r.colors.gray500},null==e?void 0:e.organization))))),l.createElement("a",{href:null==d?void 0:d.profile_url,style:{display:"inline-block",paddingTop:24}},l.createElement(N.T,{as:"span",size:"s4",color:"#2D87F3","data-event-category":e,"data-event-action":"See Full Doctor Profile","data-event-label":(0,k.l)(t)+(null==d?void 0:d.profile_url)},c("home.seeExpert"))))))),l.createElement(G,{"data-open":a,onClick:e=>{e.stopPropagation(),n()}}))},J=T.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${S.r.colors.white}; border-radius: ${S.r.borderRadius}; box-shadow: 0px 0px 4px ${S.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${v.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${v.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${S.r.colors.primary50}; border-radius: ${S.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,K=T.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,X=T.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,ee=T.Z.div` position: relative; z-index: 9; .specialty { display: block; min-width: 240px; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; } `,PopupHospital=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,hospitalId:n,locale:r,isMobile:i,overwriteProfileProps:o,avatarFallback:s=w.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{let{t:d}=(0,g.u)(),[h,p]=(0,l.useState)(null),[m,u]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(e&&n&&String(null==h?void 0:h.id)!==String(n)){u(!0);try{p(null),(0,k.c)((0,k.b)(z.tC.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:k.m[r]}),"get").then(e=>{p(Object.assign(Object.assign({},null==e?void 0:e._data.branch),o))})}catch(e){console.error(e)}u(!1)}},[e,n,null==h?void 0:h.id]);let v=(null==h?void 0:h.specialties)||[],b=(0,l.useMemo)(()=>v.map(e=>e.name),[v]);return l.createElement(l.Fragment,null,l.createElement(J,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},m||!h?l.createElement($.L,null):l.createElement("div",{className:"popup-content"},l.createElement("div",{className:"close-button",onClick:t},l.createElement("img",{src:R,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),l.createElement("div",{className:"main-info"},l.createElement("div",{className:"border-banner"}),l.createElement("div",{className:"avatar-title"},l.createElement(X,null,l.createElement("div",{className:"image-container"},l.createElement("div",{style:{position:"relative"}},l.createElement(y.I,{src:null==h?void 0:h.logo,className:"profile-image",alt:"avatar",backupSrc:s}),l.createElement("img",{className:"badge-avatar",src:Z,alt:"badge",loading:"lazy"})))),l.createElement(ee,null,l.createElement(N.T,{size:"s3",weight:"semiBold",className:"full-name"},null==h?void 0:h.name),l.createElement("div",{className:"specialty"},v&&l.createElement(N.T,{size:"p4",color:S.r.colors.gray800},b.join(" • "),"•"),l.createElement("a",{href:(0,k.n)({id:h.id,name:h.name,slug:h.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},l.createElement(N.T,{size:"p4",className:"organisation",color:S.r.colors.gray800,style:{textDecoration:"underline"}},null==h?void 0:h.name))))),!i&&l.createElement("a",{href:(0,k.n)({id:h.id,name:h.name,slug:h.slug,locale:r})},l.createElement("div",{className:"btn-wrapper"},l.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment"))))),l.createElement(ee,null,l.createElement("div",{className:"experience"},l.createElement(N.T,{weight:"bold",size:"s3",color:S.r.colors.gray800,style:{paddingBottom:16}},d("hospital.content.description").toUpperCase()),l.createElement(N.T,{size:"p2",color:S.r.colors.gray500},h.about),i?l.createElement("a",{href:(0,k.n)({id:h.id,name:h.name,slug:h.slug,locale:r})},l.createElement("div",{className:"btn-wrapper"},l.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment")))):l.createElement("a",{href:(0,k.n)({id:h.id,name:h.name,slug:h.slug,locale:r})},l.createElement(N.T,{size:"s4",color:"#2D87F3",as:"span","data-event-category":c,"data-event-action":"See Full Hospital Profile","data-event-label":(0,k.l)(r)+(0,k.n)({id:h.id,name:h.name,slug:h.slug,locale:r})},d("home.seeHospital"))))))),l.createElement(K,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},ProfileDetailModal=({open:e,onClose:t,children:a,profileModalProps:n})=>{let{t:r}=(0,g.u)();return l.createElement(B.M,Object.assign({title:r("profilePanel.modal.heading"),titleProps:!0,className:"_2UKyiK1",opened:e,onClose:t,overlayOpacity:.2,overflow:"inside",transitionProps:{transition:"slide-left"},styles:{header:{borderBottom:0},inner:{padding:0,justifyContent:"flex-end"},modal:{height:"100%",borderRadius:0},body:{maxHeight:"100%"},content:{maxHeight:"100%",height:"100%",borderRadius:0}}},n),a)};p().extend(u());let CardAuthor=e=>{let{className:t="",community:i,name:h,username:p,url:m,avatar:u,role:x,title:E,userType:C="user",expertId:N,specialty:T,organisation:z,isMarryBaby:$,doctorId:A,hospitalId:B,hasQuickBooking:F,handleMakeAppointment:j,communityTrackingAttr:O,isAnonymous:M,showDetailPopup:_,showChatbotButton:L=!1,subLine:H,authActionWrapper:R,profileProps:Z,profileModalProps:U,extendEle:G,avatarProps:q,hideInfo:V,timeText:W,onCloseFromPost:Y,onChatWithBot:Q,avatarIcon:J,badgeIconSize:K,hideBackground:X,children:ee,styles:et,dataEventCategory:ea,dataEventAction:el,dataEventLabel:en}=e,{data:{locale:er,router:ei,env:{isMarryBaby:eo,togetherBasePath:es}}}=(0,l.useContext)(k.T),{isMobile:ec}=(0,y.u)(),{t:ed}=(0,g.u)(),{classes:eh}=I(void 0,{name:"CardAuthor",styles:et}),ep="boolean"==typeof $?$:eo,em=ep?"marryBaby":"helloSites",eu=M?ed("cardPost.anonymous"):h||p||"",eg=M?w.C.getAssetPath("avatar.jpg"):u,ev=M?void 0:x,[eb,ef]=(0,l.useState)(!1),{asPath:ex}=ei||{},eE=`https://${P.v[er]}${ex}`,onAuthorClick=()=>{if(M)return!1;_?ew(!0):m&&(window.location.href=m)};(0,l.useEffect)(()=>{(0,v.t)(eb)},[eb]);let[ey,ew]=(0,l.useState)(!1),ek=(null==e?void 0:e.role)==="expert",eC=!!(A||B),eN=["expert"===ev&&z&&l.createElement("span",null,z),"expert"===ev&&T&&l.createElement("span",null,T),!("expert"===ev&&T&&z)&&(null==i?void 0:i.name)&&l.createElement("a",Object.assign({href:(null==i?void 0:i.slug)&&i.isActive&&!i.isHidden?`${es}/${null==i?void 0:i.slug}/`:void 0,className:"author-community-name"},O),`${null==i?void 0:i.name}`),W&&l.createElement("span",null,W)].filter(Boolean),[eS,eT]=(0,l.useState)(null);return(0,l.useEffect)(()=>{ey&&!eS&&("chatbot"===C?Promise.all([a.e(5231),a.e(5329),a.e(9226),a.e(5454),a.e(5481),a.e(106),a.e(3684),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(4584),a.e(4437),a.e(2582),a.e(8261),a.e(1130),a.e(8674),a.e(4071),a.e(9050),a.e(7730),a.e(137),a.e(4414),a.e(7613),a.e(8098),a.e(3416),a.e(3012),a.e(1570),a.e(6192),a.e(6918),a.e(5965),a.e(3301),a.e(1413)]).then(a.bind(a,"xIO0")).then(e=>{eT(()=>e.ProfileChatbot)}):Promise.all([a.e(9409),a.e(6259),a.e(1818),a.e(7519),a.e(761),a.e(2189),a.e(5231),a.e(5329),a.e(9226),a.e(5454),a.e(5481),a.e(106),a.e(3684),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(4584),a.e(4437),a.e(2582),a.e(8261),a.e(1130),a.e(8674),a.e(4071),a.e(9050),a.e(7730),a.e(137),a.e(4414),a.e(7613),a.e(8098),a.e(3416),a.e(3012),a.e(1570),a.e(6192),a.e(6918),a.e(5965),a.e(3301),a.e(1413)]).then(a.bind(a,"aUqw")).then(e=>{eT(()=>e.ProfileDetail)}))},[ey,C]),l.createElement(D.Provider,{value:{displayName:eu,title:E,role:ev,siteType:em,handleMakeAppointment:j,doctorId:A,hospitalId:B,currentUrl:eE}},l.createElement(ProfileDetailModal,{open:ey,onClose:()=>ew(!1),profileModalProps:U},eS&&l.createElement(eS,Object.assign({currentPageUrl:en,authActionWrapper:R,onCloseFromPost:()=>{ew(!1),null==Y||Y()},onChatWithBot:Q},Z,{authorProps:Object.assign({userId:null==e?void 0:e.userId,avatar:eg,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title,doctorId:A,hospitalId:B,hasQuickBooking:F,userType:C},null==Z?void 0:Z.authorProps)}))),"expert"===ev&&N?l.createElement(PopupExpert,{isOpen:eb,onClose:()=>ef(!1),expertId:N}):null,"expert"===ev&&A?l.createElement(PopupDoctor,{isOpen:eb,onClose:()=>ef(!1),doctorId:A,locale:er}):null,"expert"===ev&&B?l.createElement(PopupHospital,{isOpen:eb,onClose:()=>ef(!1),hospitalId:B,locale:er}):null,l.createElement("div",{className:`hhg-card-author ${eh.root} ${t} ${ek?"expert-author":""}`,"data-background":!X&&ek,"data-is-marrybaby":ep},l.createElement(CardAuthor$1,{dataEventCategory:ea,dataEventAction:el,dataEventLabel:en,onAvatarClick:onAuthorClick,avatarProps:Object.assign(Object.assign({avatar:M?w.C.getAssetPath(ep?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):eg,username:eu},q),{style:{cursor:!M&&(m||_)?"pointer":"default"}}),avatarIcon:J||ek&&l.createElement(n.Z,{size:K||15})},ee?l.createElement("div",{onClick:onAuthorClick},ee):!V&&l.createElement(CardAuthor$1.Row,null,l.createElement(CardAuthor$1.ColLeft,null,l.createElement(s.k,{align:"center",onClick:onAuthorClick},l.createElement(CardAuthor$1.MainText,{onClick:onAuthorClick},eu,"chatbot"===C?l.createElement(l.Fragment,null," ",l.createElement(r.Z,{color:S.r.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}}),L&&l.createElement("div",{style:{marginTop:"8px"}},l.createElement(c.z,{color:"primary",size:"xs",variant:"filled",type:"button",leftIcon:l.createElement(f.I.App,{size:16}),onClick:()=>{null==Q||Q()}},ed("chatbot.with.me")))):l.createElement(AuthorBadgeItem,null))),H||l.createElement(CardAuthor$1.SubTextRow,{style:F?{position:"relative"}:{}},eN.map((e,t)=>l.createElement(l.Fragment,null,0!==t&&l.createElement(CardAuthor$1.SubDivider,null),l.createElement(CardAuthor$1.SubText,null,e))),F&&eC&&l.createElement(o.x,{sx:{marginTop:(0,d.h)(5)}},l.createElement(b.B,{bookingId:A||B,bookingType:A?"doctor":B?"hospital":void 0,size:ec?"xs":"sm"})))))),G&&G))};CardAuthor.MainText=CardAuthor$1.MainText,CardAuthor.SubText=CardAuthor$1.SubText,CardAuthor.SubTextRow=CardAuthor$1.SubTextRow,CardAuthor.SubDivider=CardAuthor$1.SubDivider,CardAuthor.AuthorBadge=AuthorBadgeItem,CardAuthor.DisplayName=()=>{let{displayName:e}=(0,l.useContext)(D);return l.createElement(o.x,null,e)}},YYls:function(e,t,a){a.d(t,{I:function(){return Indicator}});var l=a("ubET"),n=a("q1tI"),r=a("QJsO"),i=a("iBNF");let Indicator=e=>{var{styles:t,color:a=i.r.colors.red700}=e,o=(0,l.a)(e,["styles","color"]);return n.createElement(r.z,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({processing:{animationDirection:"alternate"}},t),color:a},o))}},wTqk:function(e,t,a){a.d(t,{D:function(){return Divider}});var l=a("q1tI"),n=a("rBCA"),r=a("iBNF");let i=n.Z.hr` border-width: 1px; border-color: ${r.r.colors.neutral200}; border-style: ${e=>e.dividerType}; `,Divider=({type:e="solid",className:t,style:a})=>l.createElement(i,{style:a,className:t,"data-diver-type":e,dividerType:e})},rnvG:function(e,t,a){a.d(t,{B:function(){return BtnChoice}});var l=a("q1tI"),n=a("krdG"),r=a("rBCA");let i=r.Z.div` display: flex; align-items: center; gap: 8px; button[data-color='tertiary'] { background: white; } `,BtnChoice=({value:e,choices:t,className:a,onChange:r})=>{let[o,s]=(0,l.useState)(e);return(0,l.useEffect)(()=>{s(e)},[e]),l.createElement(i,{className:a},t.map((e,t)=>l.createElement(n.B,{dataEventCategory:e.dataEventCategory,dataEventAction:e.dataEventAction,dataEventLabel:e.dataEventLabel,size:"sm",variant:e.value===o?"primary":"tertiary",className:e.value===o?"btn-choice-selected":"",key:t,onClick:()=>{s(e.value),null==r||r(e.value)}},e.label||"")))}}}]);