"use strict";(self.webpackChunkhhgDiscoverV1=self.webpackChunkhhgDiscoverV1||[]).push([[9418],{OESL:function(e,t,a){a.d(t,{A:function(){return AuthorBadge},B:function(){return BookingBtn}});var l=a("vEfc"),o=a("+OUp"),n=a.n(o),i=a("sFNn"),r=a("vH4S"),s=a("LrmT"),c=a("LuOk"),d=a("abax"),p=a("d/ZZ"),m=a("xrdX"),u=a("GOBr"),g=(0,r.createStyles)(e=>({root:{display:"inline-block",flexShrink:0,padding:"2px 0.5rem",marginLeft:"4px",borderRadius:e.radius.xs,fontSize:"12px",fontWeight:400,lineHeight:"18px",'&[data-label-type="admin"]':{background:e.primaryColor[0],color:e.primaryColor[9]},'&[data-label-type="local admin"]':{background:e.primaryColor[8]},'&[data-label-type="ambassador"]':{background:e.colors.green[4]},'&[data-label-type="expert"]':{background:e.colors.yellow[6]},'&[data-label-type="moderator"]':{background:e.colors.red[0],color:e.colors.red[8]},'&[data-label-type="sponsor"]':{background:e.colors.teal[4]},'&[data-label-type="guide"]':{background:e.colors.teal[4]},'&[data-label-type="influencer"]':{background:e.colors.teal[4]}}}));let h={admin:"cardAuthor.admin",moderator:"cardAuthor.moderator",ambassador:"cardAuthor.ambassador",expert:"cardAuthor.expert",sponsor:"cardAuthor.sponsor",guide:"cardAuthor.guide",influencer:"cardAuthor.influencer"},looselyMatchRole=e=>["admin","moderator","ambassador","expert","sponsor","guide","influencer"].find(t=>t===e),AuthorBadge=e=>{var{siteType:t,role:a,title:o,styles:r,className:s}=e,c=(0,l.a)(e,["siteType","role","title","styles","className"]);let{t:d}=(0,i.u)(),p=a?looselyMatchRole(a):"",{classes:m,cx:u}=g(void 0,{name:"AuthorBadge",styles:r});return p&&h[p]?n().createElement("div",Object.assign({className:u(m.root,s),"data-label-type":p,"data-is-marrybaby":"marryBaby"===t},c),o||d(h[p])):null},BookingBtn=e=>{var{label:t,bookingId:a,bookingType:r="doctor",locale:g="vi-VN"}=e,h=(0,l.a)(e,["label","bookingId","bookingType","locale"]);let{t:v}=(0,i.u)(),[b,x]=(0,o.useState)(!1),E=(0,o.useMemo)(()=>"undefined"!=typeof window?window.location.href:"",[]),f=(0,o.useCallback)(()=>(0,l._)(void 0,void 0,void 0,function*(){var e,t,l,o,n,i,d,h,v,b,E,f,y,w,C;let k="doctor"===r?s.P.GET_DOCTOR_DETAIL:"hospital"===r?s.P.GET_HOSPITAL_DETAIL:"service"===r?s.P.GET_SERVICE_DETAIL:"";try{x(!0);let s=yield(0,p.c)((0,p.b)(k,{id:a,site:m.y[g]}),"get");if((null==s?void 0:s._status)===1){let a="doctor"===r?{id:null===(t=null===(e=null==s?void 0:s._data)||void 0===e?void 0:e.doctor)||void 0===t?void 0:t.id,slug:null===(o=null===(l=null==s?void 0:s._data)||void 0===l?void 0:l.doctor)||void 0===o?void 0:o.slug,localSlug:null===(n=c.L[g])||void 0===n?void 0:n.DOCTOR}:"hospital"===r?{id:null===(d=null===(i=null==s?void 0:s._data)||void 0===i?void 0:i.branch)||void 0===d?void 0:d.id,slug:null===(v=null===(h=null==s?void 0:s._data)||void 0===h?void 0:h.branch)||void 0===v?void 0:v.slug,localSlug:null===(b=c.L[g])||void 0===b?void 0:b.HOSPITAL}:{id:null===(f=null===(E=null==s?void 0:s._data)||void 0===E?void 0:E.service)||void 0===f?void 0:f.id,slug:null===(w=null===(y=null==s?void 0:s._data)||void 0===y?void 0:y.service)||void 0===w?void 0:w.slug,localSlug:null===(C=c.L[g])||void 0===C?void 0:C.SERVICE};window.location.href=`https://${u.K?"":"discover."}${m.y[g]}/care/${a.localSlug}/${a.slug}-${a.id}/`}else x(!1)}catch(e){console.log(e),x(!1)}}),[]);return a&&r?n().createElement(d.B,Object.assign({dataEventCategory:"Care",dataEventAction:"Comment - Quick Booking",dataEventLabel:E,onClick:f,loading:b},h),t||v("careBooking.bookAnAppointment")):null}},g9Qi: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("+OUp"),o=a.n(l),n=a("Frvz"),i=a("xePj"),__rest=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,l=Object.getOwnPropertySymbols(e);ot.indexOf(l[o])&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(a[l[o]]=e[l[o]]);return a},other_ShieldCheck=e=>{var{size:t=24,color:a=i.fT}=e,l=__rest(e,["size","color"]);return o().createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 16 16",fill:"none"},l),o().createElement("path",{d:"M7.29998 8.71005L6.24868 7.64851C6.14527 7.54509 6.02647 7.49338 5.89228 7.49338C5.75811 7.49338 5.63931 7.54509 5.53588 7.64851C5.43247 7.75192 5.38012 7.87179 5.37883 8.00811C5.37756 8.14444 5.42649 8.26217 5.52563 8.36131L6.8782 9.71386C6.99871 9.83437 7.13931 9.89463 7.29998 9.89463C7.46066 9.89463 7.60126 9.83437 7.72177 9.71386L10.4846 6.95105C10.588 6.84764 10.6397 6.72884 10.6397 6.59465C10.6397 6.46047 10.588 6.34167 10.4846 6.23825C10.3812 6.13484 10.2613 6.0842 10.125 6.08633C9.98866 6.08846 9.87093 6.1391 9.77178 6.23825L7.29998 8.71005ZM7.99998 14.2703H7.84293C7.79379 14.2703 7.74913 14.2592 7.70897 14.2369C6.34743 13.7857 5.22222 12.9235 4.33333 11.6504C3.44444 10.3773 3 8.96046 3 7.39978V4.39723C3 4.1451 3.07308 3.91754 3.21923 3.71455C3.36539 3.51155 3.55342 3.36432 3.78333 3.27288L7.5782 1.85621C7.72093 1.80494 7.86153 1.7793 7.99998 1.7793C8.13844 1.7793 8.27903 1.80494 8.42177 1.85621L12.2166 3.27288C12.4465 3.36432 12.6346 3.51155 12.7807 3.71455C12.9269 3.91754 13 4.1451 13 4.39723V7.39978C13 8.96046 12.5555 10.3773 11.6666 11.6504C10.7777 12.9235 9.65253 13.7857 8.291 14.2369C8.23972 14.2592 8.14272 14.2703 7.99998 14.2703Z",fill:a}))},r=a("vH4S"),s=a("8BcA"),c=a.n(s),d=a("QgiU"),p=a.n(d),m=a("sFNn"),u=a("CL9C"),g=a("OESL"),h=a("oz0L"),v=a("vEfc"),b=a("KoWj"),x=a("RBzE"),E=a("Wbba"),f=a("d/ZZ"),y=a("tuDO"),w=a("uzh1"),C=a("iBNF"),k=a("rBCA"),A=a("IQVP"),N=a("EiMf"),z=a("U+Ez"),T=a("mFV0"),$=a("xrdX");let MainText=({children:e,className:t=""})=>o().createElement("div",{className:`tMiOKib ${t}`},e),SubText=({children:e,className:t=""})=>o().createElement("div",{className:`uDcqD-2 ${t}`},e);var S={container:"sTU4T4I",info:"tCql9Je",avatarWrapper:"_3j7uYhH",avatarIcon:"PHABgoT"};let CardAuthor$1=({avatarProps:e,title:t,subTitle:a,children:l,className:n="",style:i,onAvatarClick:r,avatarIcon:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:p})=>o().createElement("div",{className:`${S.container} ${n}`,style:i},o().createElement("div",{className:S.avatarWrapper,onClick:r,"data-event-category":c,"data-event-action":d,"data-event-label":p},o().createElement(b.U,Object.assign({},e)),s&&o().createElement("div",{className:S.avatarIcon},s)),o().createElement("div",{className:`${S.info} ${n}`,style:{minHeight:`${(null==e?void 0:e.size)||40}px`}},l||o().createElement(o().Fragment,null,t&&o().createElement(MainText,null,t),a&&o().createElement(SubText,null,a))));CardAuthor$1.MainText=MainText,CardAuthor$1.SubText=SubText,CardAuthor$1.SubDivider=({className:e=""})=>o().createElement("span",{className:`m-HVXw1 ${e}`}),CardAuthor$1.Row=({children:e,className:t=""})=>o().createElement("div",{className:`dZWeHns ${t} row`},e),CardAuthor$1.ColLeft=({children:e,className:t=""})=>o().createElement("div",{className:`${t} col-left`},e),CardAuthor$1.ColRight=({children:e,className:t=""})=>o().createElement("div",{className:`${t} col-right`},e),CardAuthor$1.SubTextRow=e=>{var{children:t,className:a=""}=e,l=(0,v.a)(e,["children","className"]);return o().createElement("div",Object.assign({className:`pDlsows ${a}`},l),t)};var O=(0,r.createStyles)(()=>({root:{verticalAlign:"bottom"}}));let P=(0,l.createContext)({}),AuthorBadgeItem=({styles:e,className:t,classNames:a})=>{let{role:n,siteType:i,title:r}=(0,l.useContext)(P),{cx:s,classes:c}=O(void 0,{name:"AuthorBadgeItem",styles:e,classNames:a});return n?o().createElement(g.A,{className:s(c.root,t),siteType:i,role:n,title:r}):null};var B=(0,r.createStyles)(()=>({root:{}}));let j=k.A.div` position: fixed; left: 50%; width: 343px; background-color: ${C.w.colors.white}; border-radius: ${C.w.borderRadius}; box-shadow: 0px 0px 4px ${C.w.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${u.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 { ${u.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: ${C.w.colors.primary50}; border-radius: ${C.w.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,_=k.A.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; } `,D=k.A.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; } `,F=k.A.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; } `,M=k.A.ul` padding-left: 18px; li { list-style-type: disc; } `;var I="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",L="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:i,isMobile:r,overwriteProfileProps:s,avatarFallback:c=E.C.getAssetPath("avatar.jpg"),trackingCategory:d="Together"})=>{var p,u,g;let{t:h}=(0,m.u)(),[v,b]=(0,l.useState)(null),[k,z]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(e&&n&&String(null==v?void 0:v.id)!==String(n)){z(!0);try{b(null),(0,f.c)((0,f.b)(A.PO.GET_DOCTOR_INFO,{doctorId:n,website_url:f.m[i]}),"get").then(e=>{b(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),s))})}catch(e){console.error(e)}z(!1)}},[e,n,null==v?void 0:v.id]);let T=(null==v?void 0:v.experiences)||[],$=(null==v?void 0:v.specialties)||[],S=$.map(e=>(null==e?void 0:e.name)||e).join(" • "),O=T.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 o().createElement(o().Fragment,null,o().createElement(j,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},k||!v?o().createElement(N.L,null):o().createElement("div",{className:"popup-content"},o().createElement("div",{className:"close-button",onClick:t},o().createElement("img",{src:I,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),o().createElement("div",{className:"main-info"},o().createElement("div",{className:"border-banner"}),o().createElement("div",{className:"avatar-title"},o().createElement(D,null,o().createElement("div",{className:"image-container"},o().createElement("div",{style:{position:"relative"}},o().createElement(x.I,{src:null==v?void 0:v.avatar,backupSrc:c,className:"profile-image",alt:"avatar"}),o().createElement("img",{className:"badge-avatar",src:L,alt:"badge",loading:"lazy"})))),o().createElement(F,null,o().createElement(w.T,{size:"s3",weight:"semiBold",className:"full-name"},null==v?void 0:v.name),o().createElement("div",{className:"specialty"},S&&o().createElement(o().Fragment,null,o().createElement(w.T,{size:"p4",color:C.w.colors.gray800},S," • ")),o().createElement("a",{href:(0,f.n)({id:null===(p=null==v?void 0:v.organization)||void 0===p?void 0:p.id,name:null===(u=null==v?void 0:v.organization)||void 0===u?void 0:u.name,slug:null===(g=null==v?void 0:v.organization)||void 0===g?void 0:g.slug,locale:i}),className:"organisation",target:"_blank",rel:"noreferrer"},o().createElement(w.T,{size:"p4",className:"organisation",color:C.w.colors.gray800,style:{textDecoration:"underline"}},null==v?void 0:v.organization.name))))),!r&&o().createElement("div",{className:"btn-wrapper"},o().createElement("a",{href:(0,f.o)({name:v.name,id:v.id,locale:i})},o().createElement(y.B,{color:"primary",size:"md",className:"btn-booking"},h("careBooking.bookAnAppointment"))))),O&&o().createElement(F,null,o().createElement("div",{className:"experience"},o().createElement(w.T,{weight:"bold",size:"s3",color:C.w.colors.gray800,style:{paddingBottom:16}},h("expert.content.description").toUpperCase()),o().createElement(M,null,O.map((e,t)=>o().createElement("li",{key:t},o().createElement(w.T,{size:"p2"},renderExperienceText(e))))),r?o().createElement("div",{className:"btn-wrapper"},o().createElement("a",{href:(0,f.o)({name:v.name,id:v.id,locale:i})},o().createElement(y.B,{color:"primary",size:"md",className:"btn-booking"},h("careBooking.bookAnAppointment")))):o().createElement("a",{href:(0,f.o)({name:v.name,id:v.id,locale:i})},o().createElement(w.T,{size:"s4",color:"#2D87F3",style:{paddingTop:24},"data-event-category":d,"data-event-action":"See Full Doctor Profile","data-event-label":(0,f.l)(i)+(0,f.o)({name:v.name,id:v.id,locale:i})},h("home.seeExpert"))))))),o().createElement(_,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},H=k.A.div` position: fixed; left: 50%; width: 343px; background-color: ${C.w.colors.white}; border-radius: ${C.w.borderRadius}; box-shadow: 0px 0px 4px ${C.w.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${u.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 { ${u.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: ${C.w.colors.primary50}; border-radius: ${C.w.borderRadius}; .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,R=k.A.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; } `,V=k.A.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; } `,U=k.A.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; } `,Z=k.A.div` display: flex; margin-top: 8px; .bullet-point { width: 24px; height: 24px; } `;var W="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 G={author:W,edtior:W,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:L},PopupExpert=({trackingCategory:e="Together",locale:t,isOpen:a=!0,onClose:n,enableAnimation:i=!0,expertId:r,overwriteProfileProps:s,avatarFallback:c=E.C.getAssetPath("avatar.jpg")})=>{let{t:d}=(0,m.u)(),[p,u]=(0,l.useState)(null),[g,h]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{if(a&&r&&String(null==p?void 0:p.user_id)!==String(r)){h(!0);try{u(null),(0,f.c)((0,f.g)(A.d6.GET_EXPERT_BY_ID,{id:r}),"get").then(e=>{u(Object.assign(Object.assign({},null==e?void 0:e.data),s))})}catch(e){console.error(e)}h(!1)}},[a,r,null==p?void 0:p.user_id]),o().createElement(o().Fragment,null,o().createElement(H,{"data-open":a,"data-animation":i,onClick:e=>e.stopPropagation()},g||!p?o().createElement(N.L,null):o().createElement("div",{className:"popup-content"},o().createElement("div",{className:"close-button",onClick:n},o().createElement("img",{src:I,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),o().createElement("div",{className:"main-info"},o().createElement("div",{className:"border-banner"}),o().createElement("div",{className:"avatar-title"},o().createElement(V,null,o().createElement("div",{className:"image-container"},o().createElement("div",{style:{position:"relative"}},o().createElement(x.I,{src:null==p?void 0:p.avatar,className:"profile-image",alt:"avatar",backupSrc:c}),o().createElement("img",{className:"badge-avatar",src:G[null==p?void 0:p.role],alt:"badge",loading:"lazy"})))),o().createElement(U,null,o().createElement(w.T,{size:"s3",className:"full-name",weight:"semiBold"},null==p?void 0:p.display_name),o().createElement("div",null,o().createElement(w.T,{size:"p4",color:C.w.colors.gray800},null==p?void 0:p.specialty," • "),o().createElement("a",{href:null==p?void 0:p.organisation_url,className:"organisation",target:"_blank",rel:"noreferrer"},o().createElement(w.T,{size:"p4",className:"organisation",color:C.w.colors.gray800,style:{textDecoration:"underline"}},null==p?void 0:p.organisation)))))),o().createElement(U,null,o().createElement("div",{className:"experience"},o().createElement(w.T,{weight:"bold",size:"p4",color:C.w.colors.gray800,style:{paddingBottom:16}},d("expert.content.description").toUpperCase()),o().createElement("div",{className:"list-items"},null!=p&&!!p.experiences&&p.experiences.filter(e=>!!(e&&(e.title||e.organization))).slice(0,3).map((e,t)=>o().createElement(Z,{key:t},o().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"}),o().createElement("div",{className:"text-contain"},o().createElement(z.H,{tag:"h6",color:C.w.colors.gray800},null==e?void 0:e.title),o().createElement(w.T,{size:"p2",color:C.w.colors.gray500},null==e?void 0:e.organization))))),o().createElement("a",{href:null==p?void 0:p.profile_url,style:{display:"inline-block",paddingTop:24}},o().createElement(w.T,{as:"span",size:"s4",color:"#2D87F3","data-event-category":e,"data-event-action":"See Full Doctor Profile","data-event-label":(0,f.l)(t)+(null==p?void 0:p.profile_url)},d("home.seeExpert"))))))),o().createElement(R,{"data-open":a,onClick:e=>{e.stopPropagation(),n()}}))},K=k.A.div` position: fixed; left: 50%; width: 343px; background-color: ${C.w.colors.white}; border-radius: ${C.w.borderRadius}; box-shadow: 0px 0px 4px ${C.w.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${u.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 { ${u.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: ${C.w.colors.primary50}; border-radius: ${C.w.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,Q=k.A.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=k.A.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; } `,q=k.A.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:i,isMobile:r,overwriteProfileProps:s,avatarFallback:c=E.C.getAssetPath("avatar.jpg"),trackingCategory:d="Together"})=>{let{t:p}=(0,m.u)(),[u,g]=(0,l.useState)(null),[h,v]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(e&&n&&String(null==u?void 0:u.id)!==String(n)){v(!0);try{g(null),(0,f.c)((0,f.b)(A.PO.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:f.m[i]}),"get").then(e=>{g(Object.assign(Object.assign({},null==e?void 0:e._data.branch),s))})}catch(e){console.error(e)}v(!1)}},[e,n,null==u?void 0:u.id]);let b=(null==u?void 0:u.specialties)||[],k=(0,l.useMemo)(()=>b.map(e=>e.name),[b]);return o().createElement(o().Fragment,null,o().createElement(K,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},h||!u?o().createElement(N.L,null):o().createElement("div",{className:"popup-content"},o().createElement("div",{className:"close-button",onClick:t},o().createElement("img",{src:I,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),o().createElement("div",{className:"main-info"},o().createElement("div",{className:"border-banner"}),o().createElement("div",{className:"avatar-title"},o().createElement(X,null,o().createElement("div",{className:"image-container"},o().createElement("div",{style:{position:"relative"}},o().createElement(x.I,{src:null==u?void 0:u.logo,className:"profile-image",alt:"avatar",backupSrc:c}),o().createElement("img",{className:"badge-avatar",src:L,alt:"badge",loading:"lazy"})))),o().createElement(q,null,o().createElement(w.T,{size:"s3",weight:"semiBold",className:"full-name"},null==u?void 0:u.name),o().createElement("div",{className:"specialty"},b&&o().createElement(w.T,{size:"p4",color:C.w.colors.gray800},k.join(" • "),"•"),o().createElement("a",{href:(0,f.n)({id:u.id,name:u.name,slug:u.slug,locale:i}),className:"organisation",target:"_blank",rel:"noreferrer"},o().createElement(w.T,{size:"p4",className:"organisation",color:C.w.colors.gray800,style:{textDecoration:"underline"}},null==u?void 0:u.name))))),!r&&o().createElement("a",{href:(0,f.n)({id:u.id,name:u.name,slug:u.slug,locale:i})},o().createElement("div",{className:"btn-wrapper"},o().createElement(y.B,{color:"primary",size:"md",className:"btn-booking"},p("careBooking.bookAnAppointment"))))),o().createElement(q,null,o().createElement("div",{className:"experience"},o().createElement(w.T,{weight:"bold",size:"s3",color:C.w.colors.gray800,style:{paddingBottom:16}},p("hospital.content.description").toUpperCase()),o().createElement(w.T,{size:"p2",color:C.w.colors.gray500},u.about),r?o().createElement("a",{href:(0,f.n)({id:u.id,name:u.name,slug:u.slug,locale:i})},o().createElement("div",{className:"btn-wrapper"},o().createElement(y.B,{color:"primary",size:"md",className:"btn-booking"},p("careBooking.bookAnAppointment")))):o().createElement("a",{href:(0,f.n)({id:u.id,name:u.name,slug:u.slug,locale:i})},o().createElement(w.T,{size:"s4",color:"#2D87F3",as:"span","data-event-category":d,"data-event-action":"See Full Hospital Profile","data-event-label":(0,f.l)(i)+(0,f.n)({id:u.id,name:u.name,slug:u.slug,locale:i})},p("home.seeHospital"))))))),o().createElement(Q,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},ProfileDetailModal=({open:e,onClose:t,children:a,profileModalProps:l})=>{let{t:n}=(0,m.u)();return o().createElement(T.M,Object.assign({title:n("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}}},l),a)};c().extend(p());let CardAuthor=e=>{let{className:t="",community:i,name:s,username:c,url:d,avatar:p,role:v,title:b,userType:y="user",expertId:w,specialty:k,organisation:A,isMarryBaby:N,doctorId:z,hospitalId:T,hasQuickBooking:S,handleMakeAppointment:O,communityTrackingAttr:j,isAnonymous:_,showDetailPopup:D,showChatbotButton:F=!1,subLine:M,authActionWrapper:I,profileProps:L,profileModalProps:H,extendEle:R,avatarProps:V,hideInfo:U,timeText:Z,onCloseFromPost:W,onChatWithBot:G,avatarIcon:K,badgeIconSize:Q,hideBackground:X,children:q,styles:J,dataEventCategory:Y,dataEventAction:ee,dataEventLabel:et}=e,{data:{locale:ea,router:el,env:{isMarryBaby:eo,togetherBasePath:en}}}=(0,l.useContext)(f.T),{isMobile:ei}=(0,x.u)(),{t:er}=(0,m.u)(),{classes:es}=B(void 0,{name:"CardAuthor",styles:J}),ec="boolean"==typeof N?N:eo,ed=ec?"marryBaby":"helloSites",ep=_?er("cardPost.anonymous"):s||c||"",em=_?E.C.getAssetPath("avatar.jpg"):p,eu=_?void 0:v,[eg,eh]=(0,l.useState)(!1),{asPath:ev}=el||{},eb=`https://${$.y[ea]}${ev}`,onAuthorClick=()=>{if(_)return!1;D?eE(!0):d&&(window.location.href=d)};(0,l.useEffect)(()=>{(0,u.t)(eg)},[eg]);let[ex,eE]=(0,l.useState)(!1),ef=(null==e?void 0:e.role)==="expert",ey=!!(z||T),ew=["expert"===eu&&A&&o().createElement("span",null,A),"expert"===eu&&k&&o().createElement("span",null,k),!("expert"===eu&&k&&A)&&(null==i?void 0:i.name)&&o().createElement("a",Object.assign({href:(null==i?void 0:i.slug)&&i.isActive&&!i.isHidden?`${en}/${null==i?void 0:i.slug}/`:void 0,className:"author-community-name"},j),`${null==i?void 0:i.name}`),Z&&o().createElement("span",null,Z)].filter(Boolean),[eC,ek]=(0,l.useState)(null);return(0,l.useEffect)(()=>{ex&&!eC&&("chatbot"===y?a.e(1371).then(a.bind(a,"JYbS")).then(e=>{ek(()=>e.ProfileChatbot)}):Promise.all([a.e(381),a.e(3449)]).then(a.bind(a,"aUqw")).then(e=>{ek(()=>e.ProfileDetail)}))},[ex,y]),o().createElement(P.Provider,{value:{displayName:ep,title:b,role:eu,siteType:ed,handleMakeAppointment:O,doctorId:z,hospitalId:T,currentUrl:eb}},o().createElement(ProfileDetailModal,{open:ex,onClose:()=>eE(!1),profileModalProps:H},eC&&o().createElement(eC,Object.assign({currentPageUrl:et,authActionWrapper:I,onCloseFromPost:()=>{eE(!1),null==W||W()},onChatWithBot:G},L,{authorProps:Object.assign({userId:null==e?void 0:e.userId,avatar:em,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title,doctorId:z,hospitalId:T,hasQuickBooking:S,userType:y},null==L?void 0:L.authorProps)}))),"expert"===eu&&w?o().createElement(PopupExpert,{isOpen:eg,onClose:()=>eh(!1),expertId:w}):null,"expert"===eu&&z?o().createElement(PopupDoctor,{isOpen:eg,onClose:()=>eh(!1),doctorId:z,locale:ea}):null,"expert"===eu&&T?o().createElement(PopupHospital,{isOpen:eg,onClose:()=>eh(!1),hospitalId:T,locale:ea}):null,o().createElement("div",{className:`hhg-card-author ${es.root} ${t} ${ef?"expert-author":""}`,"data-background":!X&&ef,"data-is-marrybaby":ec},o().createElement(CardAuthor$1,{dataEventCategory:Y,dataEventAction:ee,dataEventLabel:et,onAvatarClick:onAuthorClick,avatarProps:Object.assign(Object.assign({avatar:_?E.C.getAssetPath(ec?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):em,username:ep},V),{style:{cursor:!_&&(d||D)?"pointer":"default"}}),avatarIcon:K||ef&&o().createElement(n.A,{size:Q||15})},q?o().createElement("div",{onClick:onAuthorClick},q):!U&&o().createElement(CardAuthor$1.Row,null,o().createElement(CardAuthor$1.ColLeft,null,o().createElement(r.Flex,{align:"center",onClick:onAuthorClick},o().createElement(CardAuthor$1.MainText,{onClick:onAuthorClick},ep,"chatbot"===y?o().createElement(o().Fragment,null," ",o().createElement(other_ShieldCheck,{color:C.w.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}}),F&&o().createElement("div",{style:{marginTop:"8px"}},o().createElement(r.Button,{color:"primary",size:"xs",variant:"filled",type:"button",leftIcon:o().createElement(h.I.App,{size:16}),onClick:()=>{null==G||G()}},er("chatbot.with.me")))):o().createElement(AuthorBadgeItem,null))),M||o().createElement(CardAuthor$1.SubTextRow,{style:S?{position:"relative"}:{}},ew.map((e,t)=>o().createElement(o().Fragment,null,0!==t&&o().createElement(CardAuthor$1.SubDivider,null),o().createElement(CardAuthor$1.SubText,null,e))),S&&ey&&o().createElement(r.Box,{sx:{marginTop:(0,r.rem)(5)}},o().createElement(g.B,{bookingId:z||T,bookingType:z?"doctor":T?"hospital":void 0,size:ei?"xs":"sm"})))))),R&&R))};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)(P);return o().createElement(r.Box,null,e)}},Frvz:function(e,t,a){var l=a("+OUp"),o=a.n(l),__rest=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,l=Object.getOwnPropertySymbols(e);ot.indexOf(l[o])&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(a[l[o]]=e[l[o]]);return a};t.A=e=>{var{size:t=15}=e,a=__rest(e,["size"]);return o().createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 15 15",fill:"none"},a),o().createElement("path",{d:"M7.43701 14C11.0614 14 13.9995 11.0619 13.9995 7.4375C13.9995 3.81313 11.0614 0.875 7.43701 0.875C3.81264 0.875 0.874512 3.81313 0.874512 7.4375C0.874512 11.0619 3.81264 14 7.43701 14Z",fill:"white",stroke:"#E4E8EC",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),o().createElement("path",{d:"M8.53125 6.34375V4.15625H6.34375V6.34375H4.15625V8.53125H6.34375V10.7188H8.53125V8.53125H10.7188V6.34375H8.53125Z",fill:"#FF5331"}))}}}]);